veryfront 0.1.838 → 0.1.839
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/deno.js +1 -1
- package/esm/src/modules/server/module-server.d.ts.map +1 -1
- package/esm/src/modules/server/module-server.js +15 -8
- package/esm/src/release-assets/manifest-cache.d.ts +9 -1
- package/esm/src/release-assets/manifest-cache.d.ts.map +1 -1
- package/esm/src/release-assets/manifest-cache.js +31 -10
- package/esm/src/release-assets/module-consumption.d.ts +3 -1
- package/esm/src/release-assets/module-consumption.d.ts.map +1 -1
- package/esm/src/release-assets/module-consumption.js +3 -3
- package/esm/src/utils/version-constant.d.ts +1 -1
- package/esm/src/utils/version-constant.js +1 -1
- package/package.json +1 -1
package/esm/deno.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-server.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/server/module-server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA0DtE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwDrD,CAAC;AAyEF,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"module-server.d.ts","sourceRoot":"","sources":["../../../../src/src/modules/server/module-server.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AA0DtE;;;;;;;;;GASG;AACH,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAwDrD,CAAC;AAyEF,MAAM,WAAW,mBAAmB;IAClC,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,sBAAsB;IACtB,OAAO,EAAE,cAAc,CAAC;IACxB,uBAAuB;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gFAAgF;IAChF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC7B,yDAAyD;IACzD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,wBAAgB,WAAW,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAqczF;AAwWD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAGrD"}
|
|
@@ -337,13 +337,15 @@ export function serveModule(req, options) {
|
|
|
337
337
|
shouldCacheReleaseVersionedModule(url, options, isSSR);
|
|
338
338
|
let releaseDependencyManifest = null;
|
|
339
339
|
let releaseDependencyManifestVersion = null;
|
|
340
|
-
let
|
|
340
|
+
let releaseDependencyRewriteEnabled = false;
|
|
341
341
|
if (canCacheReleaseVersionedModule) {
|
|
342
|
-
const manifestState = await getReleaseDependencyRewriteManifestState(options.releaseId
|
|
342
|
+
const manifestState = await getReleaseDependencyRewriteManifestState(options.releaseId, {
|
|
343
|
+
refreshCachedNull: true,
|
|
344
|
+
});
|
|
343
345
|
if (manifestState.enabled) {
|
|
346
|
+
releaseDependencyRewriteEnabled = true;
|
|
344
347
|
releaseDependencyManifest = manifestState.manifest;
|
|
345
348
|
releaseDependencyManifestVersion = manifestState.manifest?.manifestVersion ?? null;
|
|
346
|
-
releaseDependencyManifestRequired = manifestState.manifest === null;
|
|
347
349
|
}
|
|
348
350
|
}
|
|
349
351
|
const releaseModuleResponseCacheKey = canCacheReleaseVersionedModule
|
|
@@ -362,7 +364,7 @@ export function serveModule(req, options) {
|
|
|
362
364
|
if (releaseModuleResponseCacheKey) {
|
|
363
365
|
const cachedResponse = await getReleaseModuleResponse(releaseModuleResponseCacheKey);
|
|
364
366
|
if (cachedResponse?.entry) {
|
|
365
|
-
const canUseCachedResponse = !
|
|
367
|
+
const canUseCachedResponse = !releaseDependencyRewriteEnabled ||
|
|
366
368
|
!(await hasReleaseDependencyImportSpecifiers(cachedResponse.entry.body));
|
|
367
369
|
if (canUseCachedResponse) {
|
|
368
370
|
markRequestProfilePhase("module.response_cache_hit");
|
|
@@ -371,7 +373,7 @@ export function serveModule(req, options) {
|
|
|
371
373
|
}
|
|
372
374
|
return createModuleResponse(method, cachedResponse.entry.body, cachedResponse.entry.status, Object.fromEntries(cachedResponse.entry.headers));
|
|
373
375
|
}
|
|
374
|
-
markRequestProfilePhase("module.
|
|
376
|
+
markRequestProfilePhase("module.response_cache_dependency_blocked");
|
|
375
377
|
}
|
|
376
378
|
markRequestProfilePhase("module.response_cache_miss");
|
|
377
379
|
}
|
|
@@ -463,15 +465,20 @@ export function serveModule(req, options) {
|
|
|
463
465
|
if (!isSSR) {
|
|
464
466
|
code = await rewriteReleaseDependencyImportsForModule(code, {
|
|
465
467
|
releaseId: options.releaseId,
|
|
466
|
-
manifest: releaseDependencyManifest
|
|
468
|
+
manifest: releaseDependencyRewriteEnabled ? releaseDependencyManifest : undefined,
|
|
469
|
+
manifestReadOptions: { refreshCachedNull: true },
|
|
467
470
|
readDependencySource: (path) => platformFs.readTextFile(path),
|
|
468
471
|
});
|
|
469
472
|
code = await addReleaseVersionToFallbackImports(code, modulePath, options.releaseId);
|
|
470
473
|
}
|
|
471
474
|
}
|
|
475
|
+
const hasUnrewrittenReleaseDependencyImports = releaseDependencyRewriteEnabled &&
|
|
476
|
+
await hasReleaseDependencyImportSpecifiers(code);
|
|
472
477
|
const canCacheModuleResponse = releaseModuleResponseCacheKey !== null &&
|
|
473
|
-
|
|
474
|
-
|
|
478
|
+
!hasUnrewrittenReleaseDependencyImports;
|
|
479
|
+
if (hasUnrewrittenReleaseDependencyImports) {
|
|
480
|
+
markRequestProfilePhase("module.response_cache_dependency_blocked");
|
|
481
|
+
}
|
|
475
482
|
const headers = getModuleHeaders(modulePath, {
|
|
476
483
|
cacheable: canCacheModuleResponse,
|
|
477
484
|
});
|
|
@@ -23,6 +23,14 @@
|
|
|
23
23
|
* @module release-assets/manifest-cache
|
|
24
24
|
*/
|
|
25
25
|
import { type ReleaseAssetManifest } from "./manifest-schema.js";
|
|
26
|
+
export interface ReadyManifestReadOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Retry a cached non-ready result after a short throttle instead of waiting
|
|
29
|
+
* for the full null TTL. Used by module responses that cannot be cached
|
|
30
|
+
* safely until dependency imports can be rewritten through the manifest.
|
|
31
|
+
*/
|
|
32
|
+
refreshCachedNull?: boolean;
|
|
33
|
+
}
|
|
26
34
|
/**
|
|
27
35
|
* Fetcher used to retrieve a manifest for a release. Registered per-releaseId
|
|
28
36
|
* by the runtime adapter that owns that release, so the correct project-scoped
|
|
@@ -73,7 +81,7 @@ export declare function getReadyManifestForRender(releaseId: string | null | und
|
|
|
73
81
|
* falls back to null when the flag is off, no fetcher is registered, the
|
|
74
82
|
* manifest is unavailable, or the fetch fails.
|
|
75
83
|
*/
|
|
76
|
-
export declare function getReadyManifestForRenderAsync(releaseId: string | null | undefined): Promise<ReleaseAssetManifest | null>;
|
|
84
|
+
export declare function getReadyManifestForRenderAsync(releaseId: string | null | undefined, options?: ReadyManifestReadOptions): Promise<ReleaseAssetManifest | null>;
|
|
77
85
|
/** Clear cached manifest bodies while keeping registered fetchers intact. */
|
|
78
86
|
export declare function clearCachedReleaseAssetManifests(): void;
|
|
79
87
|
/** Clear the cache and fetcher registry (tests / adapter teardown). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWH,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAWH,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAgC5F,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAOD;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAC1B;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAChE,CAAC;CACH;AAKD;;;;;;GAMG;AACH,wBAAgB,iCAAiC,CAC/C,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,2BAA2B,GACnC,IAAI,CAEN;AAED;;;;GAIG;AACH,wBAAgB,mCAAmC,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAE3E;AAED;;;;;GAKG;AACH,wBAAgB,oCAAoC,CAClD,OAAO,EAAE,2BAA2B,GAAG,SAAS,GAC/C,IAAI,CAMN;AASD,yEAAyE;AACzE,wBAAgB,6BAA6B,IAAI,OAAO,CAKvD;AAiCD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,oBAAoB,GAAG,IAAI,CAgC7B;AAED;;;;;;;GAOG;AACH,wBAAsB,8BAA8B,CAClD,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAkCtC;AAgGD,6EAA6E;AAC7E,wBAAgB,gCAAgC,IAAI,IAAI,CAIvD;AAED,uEAAuE;AACvE,wBAAgB,8BAA8B,IAAI,IAAI,CAGrD"}
|
|
@@ -34,6 +34,8 @@ const logger = serverLogger.component("release-asset-manifest");
|
|
|
34
34
|
const MAX_CACHED_MANIFESTS = 500;
|
|
35
35
|
/** Short TTL for non-ready / missing results (ms). */
|
|
36
36
|
const NON_READY_TTL_MS = 30_000;
|
|
37
|
+
/** Minimum delay before an awaited consumer can retry a cached non-ready result. */
|
|
38
|
+
const NON_READY_REVALIDATE_MS = 5_000;
|
|
37
39
|
/** TTL for ready manifests — long but finite so superseded entries are picked up (15 min). */
|
|
38
40
|
const READY_TTL_MS = 15 * 60 * 1000;
|
|
39
41
|
/** Background revalidation interval for ready manifests (1 min). */
|
|
@@ -162,7 +164,7 @@ export function getReadyManifestForRender(releaseId) {
|
|
|
162
164
|
* falls back to null when the flag is off, no fetcher is registered, the
|
|
163
165
|
* manifest is unavailable, or the fetch fails.
|
|
164
166
|
*/
|
|
165
|
-
export async function getReadyManifestForRenderAsync(releaseId) {
|
|
167
|
+
export async function getReadyManifestForRenderAsync(releaseId, options = {}) {
|
|
166
168
|
if (!releaseId) {
|
|
167
169
|
markManifestDecision("no_release_id");
|
|
168
170
|
return null;
|
|
@@ -181,8 +183,13 @@ export async function getReadyManifestForRenderAsync(releaseId) {
|
|
|
181
183
|
maybeScheduleReadyRefresh(releaseId, best);
|
|
182
184
|
return best.manifest;
|
|
183
185
|
}
|
|
186
|
+
const now = Date.now();
|
|
184
187
|
const plain = manifestCache.get(releaseId);
|
|
185
|
-
if (plain && plain.expiresAt >
|
|
188
|
+
if (plain && plain.expiresAt > now) {
|
|
189
|
+
if (options.refreshCachedNull && (plain.refreshAfter ?? plain.expiresAt) <= now) {
|
|
190
|
+
markManifestDecision("cached_null_refresh");
|
|
191
|
+
return await fetchManifest(releaseId);
|
|
192
|
+
}
|
|
186
193
|
markManifestDecision("cached_null");
|
|
187
194
|
return null;
|
|
188
195
|
}
|
|
@@ -211,14 +218,15 @@ function fetchManifest(releaseId) {
|
|
|
211
218
|
return null;
|
|
212
219
|
if (!result) {
|
|
213
220
|
markManifestDecision("fetch_missing");
|
|
214
|
-
|
|
221
|
+
cacheNonReadyManifest(releaseId);
|
|
215
222
|
return null;
|
|
216
223
|
}
|
|
217
|
-
const
|
|
224
|
+
const manifestState = normalizeManifestState(result.state);
|
|
225
|
+
const manifest = isUsableManifestState(result.state) && result.manifest
|
|
218
226
|
? parseReleaseAssetManifest(result.manifest)
|
|
219
227
|
: null;
|
|
220
228
|
if (manifest) {
|
|
221
|
-
markManifestDecision("fetch_ready");
|
|
229
|
+
markManifestDecision(manifestState === "partial" ? "fetch_partial" : "fetch_ready");
|
|
222
230
|
const key = cacheKey(releaseId, manifest.manifestVersion);
|
|
223
231
|
manifestCache.set(key, {
|
|
224
232
|
manifest,
|
|
@@ -228,17 +236,16 @@ function fetchManifest(releaseId) {
|
|
|
228
236
|
logger.debug("Cached ready manifest", {
|
|
229
237
|
releaseId,
|
|
230
238
|
manifestVersion: manifest.manifestVersion,
|
|
239
|
+
state: result.state,
|
|
231
240
|
ttlMs: READY_TTL_MS,
|
|
232
241
|
refreshMs: READY_REVALIDATE_MS,
|
|
233
242
|
});
|
|
234
243
|
return manifest;
|
|
235
244
|
}
|
|
236
245
|
else {
|
|
246
|
+
markManifestDecision(`fetch_${manifestState}`);
|
|
237
247
|
markManifestDecision("fetch_not_ready");
|
|
238
|
-
|
|
239
|
-
manifest: null,
|
|
240
|
-
expiresAt: Date.now() + NON_READY_TTL_MS,
|
|
241
|
-
});
|
|
248
|
+
cacheNonReadyManifest(releaseId);
|
|
242
249
|
return null;
|
|
243
250
|
}
|
|
244
251
|
}
|
|
@@ -250,7 +257,7 @@ function fetchManifest(releaseId) {
|
|
|
250
257
|
if (fetchGeneration !== cacheGeneration)
|
|
251
258
|
return null;
|
|
252
259
|
markManifestDecision("fetch_failed");
|
|
253
|
-
|
|
260
|
+
cacheNonReadyManifest(releaseId);
|
|
254
261
|
return null;
|
|
255
262
|
}
|
|
256
263
|
finally {
|
|
@@ -263,6 +270,20 @@ function fetchManifest(releaseId) {
|
|
|
263
270
|
inFlight.set(releaseId, { generation: fetchGeneration, token, promise });
|
|
264
271
|
return promise;
|
|
265
272
|
}
|
|
273
|
+
function isUsableManifestState(state) {
|
|
274
|
+
return state === "ready" || state === "partial";
|
|
275
|
+
}
|
|
276
|
+
function normalizeManifestState(state) {
|
|
277
|
+
return state.toLowerCase().replace(/[^a-z0-9_]/g, "_").slice(0, 32) || "unknown";
|
|
278
|
+
}
|
|
279
|
+
function cacheNonReadyManifest(releaseId) {
|
|
280
|
+
const now = Date.now();
|
|
281
|
+
manifestCache.set(releaseId, {
|
|
282
|
+
manifest: null,
|
|
283
|
+
expiresAt: now + NON_READY_TTL_MS,
|
|
284
|
+
refreshAfter: now + NON_READY_REVALIDATE_MS,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
266
287
|
/** Clear cached manifest bodies while keeping registered fetchers intact. */
|
|
267
288
|
export function clearCachedReleaseAssetManifests() {
|
|
268
289
|
cacheGeneration++;
|
|
@@ -8,11 +8,13 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module release-assets/module-consumption
|
|
10
10
|
*/
|
|
11
|
+
import { type ReadyManifestReadOptions } from "./manifest-cache.js";
|
|
11
12
|
import type { ReleaseAssetManifest } from "./manifest-schema.js";
|
|
12
13
|
export interface RewriteReleaseDependencyImportsOptions {
|
|
13
14
|
releaseId?: string | null;
|
|
14
15
|
readDependencySource: (path: string) => Promise<string>;
|
|
15
16
|
manifest?: ReleaseAssetManifest | null;
|
|
17
|
+
manifestReadOptions?: ReadyManifestReadOptions;
|
|
16
18
|
}
|
|
17
19
|
export interface ReleaseDependencyRewriteManifestState {
|
|
18
20
|
enabled: boolean;
|
|
@@ -20,6 +22,6 @@ export interface ReleaseDependencyRewriteManifestState {
|
|
|
20
22
|
}
|
|
21
23
|
export declare function isReleaseDependencyImportMapRewriteEnabled(): boolean;
|
|
22
24
|
export declare function hasReleaseDependencyImportSpecifiers(code: string): Promise<boolean>;
|
|
23
|
-
export declare function getReleaseDependencyRewriteManifestState(releaseId: string | null | undefined): Promise<ReleaseDependencyRewriteManifestState>;
|
|
25
|
+
export declare function getReleaseDependencyRewriteManifestState(releaseId: string | null | undefined, options?: ReadyManifestReadOptions): Promise<ReleaseDependencyRewriteManifestState>;
|
|
24
26
|
export declare function rewriteReleaseDependencyImportsForModule(code: string, options: RewriteReleaseDependencyImportsOptions): Promise<string>;
|
|
25
27
|
//# sourceMappingURL=module-consumption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-consumption.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/module-consumption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"module-consumption.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/module-consumption.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,OAAO,EAAkC,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAEjE,MAAM,WAAW,sCAAsC;IACrD,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oBAAoB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,QAAQ,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACvC,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;CAChD;AAED,MAAM,WAAW,qCAAqC;IACpD,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACvC;AAED,wBAAgB,0CAA0C,IAAI,OAAO,CAEpE;AAWD,wBAAsB,oCAAoC,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CASzF;AAED,wBAAsB,wCAAwC,CAC5D,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACpC,OAAO,GAAE,wBAA6B,GACrC,OAAO,CAAC,qCAAqC,CAAC,CAShD;AAmDD,wBAAsB,wCAAwC,CAC5D,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,sCAAsC,GAC9C,OAAO,CAAC,MAAM,CAAC,CA6BjB"}
|
|
@@ -37,13 +37,13 @@ export async function hasReleaseDependencyImportSpecifiers(code) {
|
|
|
37
37
|
}
|
|
38
38
|
return false;
|
|
39
39
|
}
|
|
40
|
-
export async function getReleaseDependencyRewriteManifestState(releaseId) {
|
|
40
|
+
export async function getReleaseDependencyRewriteManifestState(releaseId, options = {}) {
|
|
41
41
|
if (!releaseId || !isReleaseDependencyImportMapRewriteEnabled()) {
|
|
42
42
|
return { enabled: false, manifest: null };
|
|
43
43
|
}
|
|
44
44
|
return {
|
|
45
45
|
enabled: true,
|
|
46
|
-
manifest: await getReadyManifestForRenderAsync(releaseId),
|
|
46
|
+
manifest: await getReadyManifestForRenderAsync(releaseId, options),
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
function dependencyAssetUrl(manifest, specifier) {
|
|
@@ -101,7 +101,7 @@ export async function rewriteReleaseDependencyImportsForModule(code, options) {
|
|
|
101
101
|
return code;
|
|
102
102
|
const manifest = options.manifest !== undefined
|
|
103
103
|
? options.manifest
|
|
104
|
-
: await getReadyManifestForRenderAsync(options.releaseId);
|
|
104
|
+
: await getReadyManifestForRenderAsync(options.releaseId, options.manifestReadOptions);
|
|
105
105
|
if (!manifest || Object.keys(manifest.dependencies).length === 0)
|
|
106
106
|
return code;
|
|
107
107
|
const replacements = new Map();
|