(
fsPath: string,
changed: Set<string>,
removed: Set<string>
)
| 423 | } |
| 424 | |
| 425 | async handleFileCreated( |
| 426 | fsPath: string, |
| 427 | changed: Set<string>, |
| 428 | removed: Set<string> |
| 429 | ): Promise<void> { |
| 430 | const name = relative(this.cwd, fsPath); |
| 431 | try { |
| 432 | await this.getVercelConfig(); |
| 433 | |
| 434 | this.files[name] = await FileFsRef.fromFsPath({ fsPath }); |
| 435 | const extensionless = this.getExtensionlessFile(name); |
| 436 | if (extensionless) { |
| 437 | this.files[extensionless] = await FileFsRef.fromFsPath({ fsPath }); |
| 438 | } |
| 439 | fileChanged(name, changed, removed); |
| 440 | output.debug(`File created: ${name}`); |
| 441 | } catch (err: unknown) { |
| 442 | if (isErrnoException(err) && err.code === 'ENOENT') { |
| 443 | output.debug(`File created, but has since been deleted: ${name}`); |
| 444 | fileRemoved(name, this.files, changed, removed); |
| 445 | } else { |
| 446 | throw err; |
| 447 | } |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | handleFileDeleted( |
| 452 | fsPath: string, |
no test coverage detected