(config: Config)
| 30 | ) {} |
| 31 | |
| 32 | async process(config: Config): Promise<Object> { |
| 33 | const unorderedHashTable = {}; |
| 34 | const assetGroups = await this.processAssetGroups(config, unorderedHashTable); |
| 35 | |
| 36 | return { |
| 37 | configVersion: 1, |
| 38 | timestamp: Date.now(), |
| 39 | appData: config.appData, |
| 40 | index: joinUrls(this.baseHref, config.index), |
| 41 | assetGroups, |
| 42 | dataGroups: this.processDataGroups(config), |
| 43 | hashTable: withOrderedKeys(unorderedHashTable), |
| 44 | navigationUrls: processNavigationUrls(this.baseHref, config.navigationUrls), |
| 45 | navigationRequestStrategy: config.navigationRequestStrategy ?? 'performance', |
| 46 | applicationMaxAge: config.applicationMaxAge |
| 47 | ? parseDurationToMs(config.applicationMaxAge) |
| 48 | : undefined, |
| 49 | }; |
| 50 | } |
| 51 | |
| 52 | private async processAssetGroups( |
| 53 | config: Config, |
no test coverage detected