()
| 528 | } |
| 529 | |
| 530 | private async findMostRecentSourceMtimeMs(): Promise<number> { |
| 531 | let mostRecentMtimeMs = -Infinity; |
| 532 | for await (const file of this.effects.visitFiles(this.deployOptions.config.root)) { |
| 533 | const joinedPath = join(this.deployOptions.config.root, file); |
| 534 | const stat = await this.effects.stat(joinedPath); |
| 535 | if (stat.mtimeMs > mostRecentMtimeMs) { |
| 536 | mostRecentMtimeMs = stat.mtimeMs; |
| 537 | } |
| 538 | } |
| 539 | const cachePath = join(this.deployOptions.config.root, ".observablehq/cache"); |
| 540 | try { |
| 541 | const cacheStat = await this.effects.stat(cachePath); |
| 542 | if (cacheStat.mtimeMs > mostRecentMtimeMs) { |
| 543 | mostRecentMtimeMs = cacheStat.mtimeMs; |
| 544 | } |
| 545 | } catch (error) { |
| 546 | if (!isEnoent(error)) { |
| 547 | throw error; |
| 548 | } |
| 549 | } |
| 550 | return mostRecentMtimeMs; |
| 551 | } |
| 552 | |
| 553 | private async findLeastRecentBuildMtimeMs(): Promise<number> { |
| 554 | let leastRecentMtimeMs = Infinity; |
no test coverage detected