()
| 543 | } |
| 544 | |
| 545 | async function writeAssetDeclarationDTSFile() { |
| 546 | let dts = ` |
| 547 | export type AssetUrl = string | { src: string } |
| 548 | export type AssetUrlOptions = { baseUrl?: string } | ((assetUrl: string) => string) |
| 549 | export type AssetUrls = { |
| 550 | ` |
| 551 | |
| 552 | for (const [type, assets] of Object.entries(collectedAssetUrls)) { |
| 553 | dts += `${type}: {\n` |
| 554 | for (const name of Object.keys(assets)) { |
| 555 | dts += `${JSON.stringify(name)}: string,\n` |
| 556 | } |
| 557 | dts += '},\n' |
| 558 | } |
| 559 | |
| 560 | dts += ` |
| 561 | } |
| 562 | ` |
| 563 | |
| 564 | const assetDeclarationFilePath = join(REPO_ROOT, 'packages', 'assets', 'types.d.ts') |
| 565 | await writeCodeFile( |
| 566 | 'internal/scripts/refresh-assets.ts', |
| 567 | 'typescript', |
| 568 | assetDeclarationFilePath, |
| 569 | dts |
| 570 | ) |
| 571 | } |
| 572 | |
| 573 | function getNewPublishDates(packageVersion: string) { |
| 574 | const currentVersion = new SemVer(version) |
no test coverage detected
searching dependent graphs…