veryfront 0.1.790 → 0.1.793
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/agent/runtime/skill-policy-enforcement.d.ts.map +1 -1
- package/esm/src/agent/runtime/skill-policy-enforcement.js +4 -2
- package/esm/src/html/html-shell-generator.d.ts.map +1 -1
- package/esm/src/html/html-shell-generator.js +9 -4
- package/esm/src/html/hydration-script-builder/templates/router.d.ts.map +1 -1
- package/esm/src/html/hydration-script-builder/templates/router.js +8 -2
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts +1 -0
- package/esm/src/platform/adapters/fs/veryfront/adapter.d.ts.map +1 -1
- package/esm/src/platform/adapters/fs/veryfront/adapter.js +38 -18
- package/esm/src/release-assets/build-executor.d.ts +1 -2
- package/esm/src/release-assets/build-executor.d.ts.map +1 -1
- package/esm/src/release-assets/build-executor.js +2 -9
- package/esm/src/release-assets/manifest-cache.d.ts.map +1 -1
- package/esm/src/release-assets/manifest-cache.js +3 -1
- package/esm/src/release-assets/route-path.d.ts +3 -0
- package/esm/src/release-assets/route-path.d.ts.map +1 -0
- package/esm/src/release-assets/route-path.js +9 -0
- package/esm/src/rendering/orchestrator/pipeline-helpers.d.ts +1 -0
- package/esm/src/rendering/orchestrator/pipeline-helpers.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline-helpers.js +4 -0
- package/esm/src/rendering/orchestrator/pipeline.d.ts +1 -0
- package/esm/src/rendering/orchestrator/pipeline.d.ts.map +1 -1
- package/esm/src/rendering/orchestrator/pipeline.js +25 -5
- package/esm/src/rendering/orchestrator/types.d.ts +2 -0
- package/esm/src/rendering/orchestrator/types.d.ts.map +1 -1
- package/esm/src/server/handlers/request/ssr/ssr-response-builder.js +1 -1
- 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":"skill-policy-enforcement.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/skill-policy-enforcement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAO3C,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,iCAAiC,CAAC;AAIzC,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAC/C,eAAO,MAAM,kBAAkB,eAAe,CAAC;AAO/C,wBAAgB,mCAAmC,CACjD,QAAQ,EAAE,SAAS,OAAO,EAAE,GAC3B;IACD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACxC,8BAA8B,EAAE,wBAAwB,GAAG,SAAS,CAAC;CACtE,CAeA;AAED,wBAAgB,cAAc,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAIlE;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,OAAO,GAAG,MAAM,EAAE,GAAG,SAAS,CAyBxE;AAOD,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,GAAG,OAAO,CAQjF;AAED,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,MAAM,EAChB,MAAM,EAAE,OAAO,EACf,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,GACtC,MAAM,EAAE,GAAG,SAAS,CAStB;AAED,wBAAgB,8BAA8B,CAC5C,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,iBAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,GACtC,MAAM,EAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"skill-policy-enforcement.d.ts","sourceRoot":"","sources":["../../../../src/src/agent/runtime/skill-policy-enforcement.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,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BAAiB,EAAE,MAAM,EAAE,GAAG,SAAS,EACvC,kBAAkB,EAAE,OAAO,EAC3B,OAAO,GAAE,kBAAuB,GAC/B,iBAAiB,CAsBnB"}
|
|
@@ -78,9 +78,11 @@ export function narrowPolicyAfterSubmittedForm(activeSkillId, activeSkillPolicy)
|
|
|
78
78
|
"update_file",
|
|
79
79
|
].includes(allowedToolName));
|
|
80
80
|
}
|
|
81
|
-
if (activeSkillId === "
|
|
82
|
-
activeSkillId === "create-agent" ||
|
|
81
|
+
if (activeSkillId === "create-agent" ||
|
|
83
82
|
activeSkillId === "create-agentic-workflow") {
|
|
83
|
+
return activeSkillPolicy.filter((allowedToolName) => allowedToolName !== FORM_INPUT_TOOL_ID);
|
|
84
|
+
}
|
|
85
|
+
if (activeSkillId === "plan") {
|
|
84
86
|
return activeSkillPolicy.filter((allowedToolName) => [
|
|
85
87
|
"studio_suggestions",
|
|
86
88
|
"list_files",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-shell-generator.d.ts","sourceRoot":"","sources":["../../../src/src/html/html-shell-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"html-shell-generator.d.ts","sourceRoot":"","sources":["../../../src/src/html/html-shell-generator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AA2BxE,OAAO,EAGL,aAAa,EACd,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAqCxD,KAAK,gBAAgB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,GAAG,IAAI,CAAC;AAqFzE,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAC1C,KAAK,CAAC,EAAE,cAAc,EACtB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAC5C,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC,CAmBzC;AA8QD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE,qBAAqB,EAC9B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,EAC1C,KAAK,CAAC,EAAE,cAAc,EACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,GAC5C,OAAO,CAAC,MAAM,CAAC,CAoBjB"}
|
|
@@ -7,6 +7,7 @@ import { isMarkdownPreview as checkMarkdownPreview } from "../transforms/md/util
|
|
|
7
7
|
import { generateModulePreloadHintsFromManifest, getRouteManifest, } from "../modules/manifest/route-module-manifest.js";
|
|
8
8
|
import { getReadyManifestForRender } from "../release-assets/manifest-cache.js";
|
|
9
9
|
import { resolveManifestModuleUrl, resolveManifestRoutePreloadUrls, } from "../release-assets/html-consumption.js";
|
|
10
|
+
import { routeForPage } from "../release-assets/route-path.js";
|
|
10
11
|
import { buildNonceAttribute, escapeHTML } from "./html-escape.js";
|
|
11
12
|
import { generateHydrationData, getDevScripts, getProdScripts, PROD_HYDRATION_MODULE_PATH, } from "./hydration-script-builder/index.js";
|
|
12
13
|
import { getPreviewStylesheetLink, getStudioScripts } from "./dev-scripts.js";
|
|
@@ -72,23 +73,27 @@ function generateModulePreloadHints(options) {
|
|
|
72
73
|
if (studioEmbed || options.environment === "preview") {
|
|
73
74
|
return hints.join("\n ");
|
|
74
75
|
}
|
|
75
|
-
const
|
|
76
|
+
const relativePagePath = options.pagePath
|
|
76
77
|
? getRelativePagePath(options.pagePath, projectDir)
|
|
78
|
+
: "";
|
|
79
|
+
const releaseManifestRoute = relativePagePath ? routeForPage(relativePagePath) ?? "" : "";
|
|
80
|
+
const legacyModuleManifestRoute = relativePagePath
|
|
81
|
+
? relativePagePath
|
|
77
82
|
.replace(/\.(tsx|ts|jsx|mdx)$/, "")
|
|
78
83
|
.replace(/^pages\//, "")
|
|
79
84
|
: "";
|
|
80
85
|
// Manifest-covered routes: preload the full closure from the manifest.
|
|
81
86
|
if (releaseManifest) {
|
|
82
|
-
for (const url of resolveManifestRoutePreloadUrls(releaseManifest,
|
|
87
|
+
for (const url of resolveManifestRoutePreloadUrls(releaseManifest, releaseManifestRoute)) {
|
|
83
88
|
addHint(url);
|
|
84
89
|
}
|
|
85
90
|
return hints.join("\n ");
|
|
86
91
|
}
|
|
87
92
|
const projectSlug = options.projectSlug ?? options.projectId;
|
|
88
|
-
const manifest = getRouteManifest(projectSlug,
|
|
93
|
+
const manifest = getRouteManifest(projectSlug, legacyModuleManifestRoute);
|
|
89
94
|
if (!manifest || manifest.renderCount <= 0)
|
|
90
95
|
return hints.join("\n ");
|
|
91
|
-
for (const hint of generateModulePreloadHintsFromManifest(projectSlug,
|
|
96
|
+
for (const hint of generateModulePreloadHintsFromManifest(projectSlug, legacyModuleManifestRoute, 50)) {
|
|
92
97
|
const href = hint.match(/href="([^"]+)"/)?.[1];
|
|
93
98
|
if (!href || addedUrls.has(href))
|
|
94
99
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,
|
|
1
|
+
{"version":3,"file":"router.d.ts","sourceRoot":"","sources":["../../../../../src/src/html/hydration-script-builder/templates/router.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,cAyrB3B,CAAC"}
|
|
@@ -401,8 +401,8 @@ export const getRouterScript = () => `
|
|
|
401
401
|
// Render page from page data
|
|
402
402
|
// ============================================
|
|
403
403
|
async function renderPageFromData(pageData, targetPath) {
|
|
404
|
-
if (
|
|
405
|
-
window.__veryfrontSetReleaseAssetModules(pageData.releaseAssetModules);
|
|
404
|
+
if (window.__veryfrontSetReleaseAssetModules) {
|
|
405
|
+
window.__veryfrontSetReleaseAssetModules(pageData.releaseAssetModules || null);
|
|
406
406
|
}
|
|
407
407
|
|
|
408
408
|
perfStart('render:loadAll');
|
|
@@ -444,6 +444,12 @@ export const getRouterScript = () => `
|
|
|
444
444
|
document.head.appendChild(styleEl);
|
|
445
445
|
}
|
|
446
446
|
log('Injected CSS for SPA navigation', { cssLength: pageData.css.length });
|
|
447
|
+
} else if (pageData.cssAction === 'clear') {
|
|
448
|
+
const existingStyle = document.getElementById('veryfront-spa-css');
|
|
449
|
+
if (existingStyle) {
|
|
450
|
+
existingStyle.remove();
|
|
451
|
+
log('Cleared SPA CSS for release stylesheet navigation');
|
|
452
|
+
}
|
|
447
453
|
}
|
|
448
454
|
|
|
449
455
|
let tree = React.createElement(PageComponent, {
|
|
@@ -31,6 +31,7 @@ export declare class VeryfrontFSAdapter implements FSAdapter {
|
|
|
31
31
|
/** Whether running in proxy mode (shared adapter with per-request OAuth tokens) */
|
|
32
32
|
private proxyMode;
|
|
33
33
|
private getCurrentFileListCacheKey;
|
|
34
|
+
private syncClientContext;
|
|
34
35
|
private getCachedFileListSync;
|
|
35
36
|
private getCachedFileListAsync;
|
|
36
37
|
constructor(config: FSAdapterConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../../../../../src/src/platform/adapters/fs/veryfront/adapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,UAAU,EAEV,cAAc,EACd,SAAS,EACT,eAAe,EAEf,sBAAsB,EAGvB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,M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;IA0BvD,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAIpC,iBAAiB,IAAI,IAAI;IAIzB,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAK7C,gBAAgB,IAAI,MAAM,GAAG,IAAI;IAIjC,kBAAkB,IAAI,IAAI;IAK1B,iBAAiB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI;IAqDxD,iBAAiB,IAAI,sBAAsB,GAAG,IAAI;IAWlD,SAAS,IAAI,kBAAkB;YAIjB,iBAAiB;IAK/B;;;;;OAKG;YACW,uBAAuB;CAsCtC"}
|
|
@@ -61,6 +61,18 @@ export class VeryfrontFSAdapter {
|
|
|
61
61
|
getCurrentFileListCacheKey() {
|
|
62
62
|
return this.contentContext ? buildFileListCacheKey(this.contentContext) : undefined;
|
|
63
63
|
}
|
|
64
|
+
syncClientContext() {
|
|
65
|
+
this.client.clearRequestBranch();
|
|
66
|
+
if (this.contentContext) {
|
|
67
|
+
this.client.setContext(toClientContext(this.contentContext));
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
this.client.clearContext();
|
|
71
|
+
}
|
|
72
|
+
if (this.requestBranch) {
|
|
73
|
+
this.client.setRequestBranch(this.requestBranch);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
64
76
|
getCachedFileListSync() {
|
|
65
77
|
const cacheKey = this.getCurrentFileListCacheKey();
|
|
66
78
|
if (!cacheKey)
|
|
@@ -204,10 +216,11 @@ export class VeryfrontFSAdapter {
|
|
|
204
216
|
if (!this.contentContext) {
|
|
205
217
|
logger.debug("Step 3: resolveContentSource START", { projectSlug });
|
|
206
218
|
const step3Start = performance.now();
|
|
207
|
-
|
|
219
|
+
const resolvedContext = await resolveContentContext(this.client, this.contentSource, this.projectSlug);
|
|
220
|
+
this.setContentContext(resolvedContext);
|
|
208
221
|
logger.debug("Step 3: resolveContentSource DONE", {
|
|
209
222
|
projectSlug,
|
|
210
|
-
sourceType:
|
|
223
|
+
sourceType: resolvedContext.sourceType,
|
|
211
224
|
duration: `${(performance.now() - step3Start).toFixed(2)}ms`,
|
|
212
225
|
});
|
|
213
226
|
}
|
|
@@ -217,17 +230,24 @@ export class VeryfrontFSAdapter {
|
|
|
217
230
|
sourceType: this.contentContext.sourceType,
|
|
218
231
|
});
|
|
219
232
|
}
|
|
233
|
+
const contentContext = this.contentContext;
|
|
234
|
+
if (!contentContext) {
|
|
235
|
+
throw toError(createError({
|
|
236
|
+
type: "config",
|
|
237
|
+
message: "Veryfront adapter content context resolution failed",
|
|
238
|
+
}));
|
|
239
|
+
}
|
|
220
240
|
logger.debug("Content context resolved", {
|
|
221
|
-
sourceType:
|
|
222
|
-
projectSlug:
|
|
223
|
-
branch:
|
|
224
|
-
environmentName:
|
|
225
|
-
releaseId:
|
|
241
|
+
sourceType: contentContext.sourceType,
|
|
242
|
+
projectSlug: contentContext.projectSlug,
|
|
243
|
+
branch: contentContext.branch,
|
|
244
|
+
environmentName: contentContext.environmentName,
|
|
245
|
+
releaseId: contentContext.releaseId,
|
|
226
246
|
});
|
|
227
|
-
const cacheKey = buildFileListCacheKey(
|
|
247
|
+
const cacheKey = buildFileListCacheKey(contentContext);
|
|
228
248
|
logger.debug("Step 4: fetchFileList START", { projectSlug, cacheKey });
|
|
229
249
|
try {
|
|
230
|
-
const files = await fetchFileListForContext(this.client,
|
|
250
|
+
const files = await fetchFileListForContext(this.client, contentContext);
|
|
231
251
|
const fileSummary = summarizeFileList(files);
|
|
232
252
|
await this.cache.setAsync(cacheKey, files);
|
|
233
253
|
this.fileListReadyResolve?.();
|
|
@@ -253,11 +273,11 @@ export class VeryfrontFSAdapter {
|
|
|
253
273
|
fileCount: files.length,
|
|
254
274
|
totalDuration: `${(performance.now() - initStartTime).toFixed(2)}ms`,
|
|
255
275
|
});
|
|
256
|
-
if (
|
|
276
|
+
if (contentContext.sourceType === "branch") {
|
|
257
277
|
logger.debug("Initialized (branch mode)", {
|
|
258
278
|
projectId: this.client.getProjectId(),
|
|
259
279
|
files: files.length,
|
|
260
|
-
branch:
|
|
280
|
+
branch: contentContext.branch,
|
|
261
281
|
proxyMode: this.proxyMode,
|
|
262
282
|
});
|
|
263
283
|
this.wsManager.connect(projectId);
|
|
@@ -266,13 +286,13 @@ export class VeryfrontFSAdapter {
|
|
|
266
286
|
logger.debug("Initialized (published mode)", {
|
|
267
287
|
projectId: this.client.getProjectId(),
|
|
268
288
|
files: files.length,
|
|
269
|
-
sourceType:
|
|
270
|
-
environmentName:
|
|
271
|
-
releaseId:
|
|
289
|
+
sourceType: contentContext.sourceType,
|
|
290
|
+
environmentName: contentContext.environmentName,
|
|
291
|
+
releaseId: contentContext.releaseId,
|
|
272
292
|
});
|
|
273
293
|
// Keep a WebSocket connection in environment mode to receive deployment pokes.
|
|
274
294
|
// Release mode is immutable, so no need to keep a live connection.
|
|
275
|
-
if (
|
|
295
|
+
if (contentContext.sourceType === "environment") {
|
|
276
296
|
this.wsManager.connect(projectId);
|
|
277
297
|
}
|
|
278
298
|
}
|
|
@@ -475,14 +495,14 @@ export class VeryfrontFSAdapter {
|
|
|
475
495
|
}
|
|
476
496
|
setRequestBranch(branch) {
|
|
477
497
|
this.requestBranch = branch;
|
|
478
|
-
this.
|
|
498
|
+
this.syncClientContext();
|
|
479
499
|
}
|
|
480
500
|
getRequestBranch() {
|
|
481
501
|
return this.requestBranch;
|
|
482
502
|
}
|
|
483
503
|
clearRequestBranch() {
|
|
484
504
|
this.requestBranch = null;
|
|
485
|
-
this.
|
|
505
|
+
this.syncClientContext();
|
|
486
506
|
}
|
|
487
507
|
setContentContext(context) {
|
|
488
508
|
const oldContext = this.contentContext;
|
|
@@ -513,7 +533,7 @@ export class VeryfrontFSAdapter {
|
|
|
513
533
|
registerManifestFetcherForRelease(nextReleaseId, buildManifestFetcher(this.client));
|
|
514
534
|
}
|
|
515
535
|
this.contentContext = context;
|
|
516
|
-
this.
|
|
536
|
+
this.syncClientContext();
|
|
517
537
|
if (contextChanged) {
|
|
518
538
|
this.statOps.clearIndex();
|
|
519
539
|
this.dirOps.clearTree();
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
*
|
|
15
15
|
* @module release-assets/build-executor
|
|
16
16
|
*/
|
|
17
|
+
export { routeForPage } from "./route-path.js";
|
|
17
18
|
export interface ReleaseAssetBuildInput {
|
|
18
19
|
/** Project reference (slug or id) used for API calls. */
|
|
19
20
|
projectReference: string;
|
|
@@ -92,8 +93,6 @@ export interface ReleaseAssetBuildResult {
|
|
|
92
93
|
gaps: string[];
|
|
93
94
|
error?: string;
|
|
94
95
|
}
|
|
95
|
-
/** Derive a route path from a page module logical path. */
|
|
96
|
-
export declare function routeForPage(logicalPath: string): string | null;
|
|
97
96
|
/**
|
|
98
97
|
* Execute a release asset build. Pure orchestration over the injected client
|
|
99
98
|
* and a runtime-provided temp dir + react version.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-executor.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/build-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"build-executor.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/build-executor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAqBH,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAe/C,MAAM,WAAW,sBAAsB;IACrC,yDAAyD;IACzD,gBAAgB,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,iCAAiC;IACjC,cAAc,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,iBAAiB,EAAE,MAAM,CAAC;IAC1B,oCAAoC;IACpC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gDAAgD;IAChD,MAAM,EAAE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S,GAAG,QAAQ,EAC3B,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,OAAO,CAAC,CAAC;IACpB;;;;;;;OAOG;IACH,iBAAiB,CAAC,CAChB,UAAU,EAAE,GAAG,CAAC,MAAM,CAAC,EACvB,UAAU,EAAE,MAAM,GAAG,SAAS,GAC7B,OAAO,CAAC;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,uBAAuB;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA2cD;;;GAGG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,sBAAsB,EAC7B,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
|
|
@@ -25,6 +25,8 @@ import { PLATFORM_UTILITIES } from "../html/utils.js";
|
|
|
25
25
|
import { extractCandidatesFromFiles } from "../html/styles-builder/candidate-extractor.js";
|
|
26
26
|
import { sha256HexBytes } from "./hash.js";
|
|
27
27
|
import { RELEASE_ASSET_BASE_PATH, RELEASE_ASSET_CONTENT_TYPES, RELEASE_ASSET_MANIFEST_SCHEMA_VERSION, RELEASE_ASSET_MAX_SIZE_BYTES, RELEASE_ASSET_UPLOAD_CONCURRENCY, releaseAssetUrl, } from "./constants.js";
|
|
28
|
+
import { routeForPage } from "./route-path.js";
|
|
29
|
+
export { routeForPage } from "./route-path.js";
|
|
28
30
|
const logger = serverLogger.component("release-asset-build");
|
|
29
31
|
/** Browser module source extensions eligible for transform. */
|
|
30
32
|
const BROWSER_MODULE_EXTENSIONS = [".tsx", ".ts", ".jsx", ".js", ".mdx"];
|
|
@@ -51,15 +53,6 @@ function isBrowserModule(path) {
|
|
|
51
53
|
return false;
|
|
52
54
|
return BROWSER_MODULE_DIRS.some((dir) => path.startsWith(dir));
|
|
53
55
|
}
|
|
54
|
-
/** Derive a route path from a page module logical path. */
|
|
55
|
-
export function routeForPage(logicalPath) {
|
|
56
|
-
if (!logicalPath.startsWith("pages/"))
|
|
57
|
-
return null;
|
|
58
|
-
const withoutPrefix = logicalPath.slice("pages/".length);
|
|
59
|
-
const withoutExt = withoutPrefix.replace(/\.(tsx|ts|jsx|mdx|js)$/, "");
|
|
60
|
-
const route = withoutExt.replace(/\/index$/, "").replace(/^index$/, "");
|
|
61
|
-
return `/${route}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
62
|
-
}
|
|
63
56
|
/**
|
|
64
57
|
* Statically resolve relative imports in a source file to logical paths.
|
|
65
58
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAkC5F;;;;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;AAOD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,oBAAoB,GAAG,IAAI,
|
|
1
|
+
{"version":3,"file":"manifest-cache.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/manifest-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAOH,OAAO,EAA6B,KAAK,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAkC5F;;;;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;AAOD;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GACnC,oBAAoB,GAAG,IAAI,CAsC7B;AA2DD,6EAA6E;AAC7E,wBAAgB,gCAAgC,IAAI,IAAI,CAIvD;AAED,uEAAuE;AACvE,wBAAgB,8BAA8B,IAAI,IAAI,CAGrD"}
|
|
@@ -122,7 +122,9 @@ export function getReadyManifestForRender(releaseId) {
|
|
|
122
122
|
}
|
|
123
123
|
}
|
|
124
124
|
if (best) {
|
|
125
|
-
|
|
125
|
+
const now = Date.now();
|
|
126
|
+
if ((best.refreshAfter ?? best.expiresAt) <= now) {
|
|
127
|
+
best.refreshAfter = now + READY_REVALIDATE_MS;
|
|
126
128
|
scheduleFetch(releaseId);
|
|
127
129
|
}
|
|
128
130
|
return best.manifest;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"route-path.d.ts","sourceRoot":"","sources":["../../../src/src/release-assets/route-path.ts"],"names":[],"mappings":"AAAA,2DAA2D;AAC3D,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAM/D"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** Derive a route path from a page module logical path. */
|
|
2
|
+
export function routeForPage(logicalPath) {
|
|
3
|
+
if (!logicalPath.startsWith("pages/"))
|
|
4
|
+
return null;
|
|
5
|
+
const withoutPrefix = logicalPath.slice("pages/".length);
|
|
6
|
+
const withoutExt = withoutPrefix.replace(/\.(tsx|ts|jsx|mdx|js)$/, "");
|
|
7
|
+
const route = withoutExt.replace(/\/index$/, "").replace(/^index$/, "");
|
|
8
|
+
return `/${route}`.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
9
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LayoutItem } from "../../types/index.js";
|
|
2
2
|
export declare function extractRenderedCssHash(html: string): string | undefined;
|
|
3
|
+
export declare function hasRenderedReleaseAssetCss(html: string): boolean;
|
|
3
4
|
export declare function serializeLayouts(nestedLayouts: LayoutItem[], projectDir: string): Array<{
|
|
4
5
|
kind: LayoutItem["kind"];
|
|
5
6
|
path: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/pipeline-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"pipeline-helpers.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/pipeline-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAMvD,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEvE;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,wBAAgB,gBAAgB,CAC9B,aAAa,EAAE,UAAU,EAAE,EAC3B,UAAU,EAAE,MAAM,GACjB,KAAK,CAAC;IAAE,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAUnD;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAChD,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAQzC"}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import { extractRelativePath as extractRelativePathShared } from "../../utils/route-path-utils.js";
|
|
2
2
|
const RENDERED_CSS_HASH_RE = /href="\/_vf\/css\/([a-z0-9-]{1,16})\.css"/i;
|
|
3
|
+
const RENDERED_RELEASE_ASSET_CSS_RE = /href="\/_vf\/assets\/([a-f0-9]{64})\.css"/i;
|
|
3
4
|
export function extractRenderedCssHash(html) {
|
|
4
5
|
return html.match(RENDERED_CSS_HASH_RE)?.[1];
|
|
5
6
|
}
|
|
7
|
+
export function hasRenderedReleaseAssetCss(html) {
|
|
8
|
+
return RENDERED_RELEASE_ASSET_CSS_RE.test(html);
|
|
9
|
+
}
|
|
6
10
|
export function serializeLayouts(nestedLayouts, projectDir) {
|
|
7
11
|
return nestedLayouts
|
|
8
12
|
.filter((layout) => layout.componentPath || layout.path)
|
|
@@ -78,6 +78,7 @@ export declare class RenderPipeline {
|
|
|
78
78
|
private resolveAppPath;
|
|
79
79
|
private resolveProjectUpdatedAt;
|
|
80
80
|
private resolvePageDataCss;
|
|
81
|
+
private hasReadyReleaseCss;
|
|
81
82
|
private generatePageCssFromHtml;
|
|
82
83
|
/**
|
|
83
84
|
* Build a cache key that is safe for multi-tenant + query-param aware caching.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;
|
|
1
|
+
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAsBH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AA4ChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,wBAAwB;IACvC,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IACxE,aAAa,CAAC,MAAM,EAA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.js";
|
|
|
22
22
|
import { FILE_NOT_FOUND, RENDER_ERROR } from "../../errors/error-registry.js";
|
|
23
23
|
import { buildQueryAwareCacheKey } from "../../cache/keys.js";
|
|
24
24
|
import { extractRelativePath as extractRelativePathShared, extractRouteParams as extractRouteParamsShared, } from "../../utils/route-path-utils.js";
|
|
25
|
-
import { extractRenderedCssHash, serializeLayoutProps, serializeLayouts, } from "./pipeline-helpers.js";
|
|
25
|
+
import { extractRenderedCssHash, hasRenderedReleaseAssetCss, serializeLayoutProps, serializeLayouts, } from "./pipeline-helpers.js";
|
|
26
26
|
import { join } from "../../platform/compat/path/index.js";
|
|
27
27
|
import { isExtendedFSAdapter } from "../../platform/adapters/fs/wrapper.js";
|
|
28
28
|
import { DataFetcher } from "../../data/index.js";
|
|
@@ -32,6 +32,7 @@ import { LAYOUT_EXTENSIONS } from "../layouts/types.js";
|
|
|
32
32
|
import { withTimeout, withTimeoutThrow } from "../utils/stream-utils.js";
|
|
33
33
|
import { extractCandidates, generateTailwindCSS } from "../../html/styles-builder/index.js";
|
|
34
34
|
import { getCSSByHashAsync, regenerateCSSByHash, } from "../../html/styles-builder/tailwind-compiler.js";
|
|
35
|
+
import { getReadyManifestForRender } from "../../release-assets/manifest-cache.js";
|
|
35
36
|
import { createEsmCache, createModuleCache, loadModule } from "./module-loader/index.js";
|
|
36
37
|
import { getCSSImports, runWithCSSCollector, } from "../../modules/react-loader/css-import-collector.js";
|
|
37
38
|
// Extracted modules
|
|
@@ -410,7 +411,7 @@ export class RenderPipeline {
|
|
|
410
411
|
const providers = [];
|
|
411
412
|
const projectUpdatedAt = this.resolveProjectUpdatedAt();
|
|
412
413
|
const appPath = await this.resolveAppPath();
|
|
413
|
-
const { css, cssError } = await this.resolvePageDataCss(slug, options, projectUpdatedAt);
|
|
414
|
+
const { css, cssAction, cssError } = await this.resolvePageDataCss(slug, options, projectUpdatedAt);
|
|
414
415
|
resolvePageDataLog.debug("Resolved page data", {
|
|
415
416
|
slug,
|
|
416
417
|
pagePath,
|
|
@@ -419,6 +420,7 @@ export class RenderPipeline {
|
|
|
419
420
|
appPath,
|
|
420
421
|
headingsCount: headings.length,
|
|
421
422
|
hasCss: !!css,
|
|
423
|
+
cssAction,
|
|
422
424
|
hasCssError: !!cssError,
|
|
423
425
|
});
|
|
424
426
|
return {
|
|
@@ -435,6 +437,7 @@ export class RenderPipeline {
|
|
|
435
437
|
appPath,
|
|
436
438
|
headings,
|
|
437
439
|
css,
|
|
440
|
+
cssAction,
|
|
438
441
|
cssError,
|
|
439
442
|
};
|
|
440
443
|
}
|
|
@@ -484,11 +487,14 @@ export class RenderPipeline {
|
|
|
484
487
|
return wrappedAdapter.getProjectData?.()?.updated_at;
|
|
485
488
|
}
|
|
486
489
|
async resolvePageDataCss(slug, options, projectUpdatedAt) {
|
|
490
|
+
if (this.hasReadyReleaseCss(options)) {
|
|
491
|
+
return { css: undefined, cssAction: "clear", cssError: undefined };
|
|
492
|
+
}
|
|
487
493
|
const cssCacheKey = getPageCssCacheKey(options?.projectId, options?.environment, slug, projectUpdatedAt);
|
|
488
494
|
const cachedCss = getCachedPageCss(cssCacheKey);
|
|
489
495
|
if (cachedCss) {
|
|
490
496
|
resolvePageDataLog.debug("CSS cache hit", { slug, cssLength: cachedCss.length });
|
|
491
|
-
return { css: cachedCss, cssError: undefined };
|
|
497
|
+
return { css: cachedCss, cssAction: undefined, cssError: undefined };
|
|
492
498
|
}
|
|
493
499
|
try {
|
|
494
500
|
const renderResult = await withTimeout(this.renderPage(slug, {
|
|
@@ -498,8 +504,9 @@ export class RenderPipeline {
|
|
|
498
504
|
skipCachePersist: true,
|
|
499
505
|
}), CSS_SSR_TIMEOUT_MS, `CSS SSR for ${slug}`);
|
|
500
506
|
if (!renderResult?.html) {
|
|
501
|
-
return { css: undefined, cssError: undefined };
|
|
507
|
+
return { css: undefined, cssAction: undefined, cssError: undefined };
|
|
502
508
|
}
|
|
509
|
+
let cssAction;
|
|
503
510
|
let css = await this.resolveCssFromRenderedHtml(renderResult.html, options?.projectSlug ?? options?.projectId);
|
|
504
511
|
if (css) {
|
|
505
512
|
resolvePageDataLog.debug("Reused SSR CSS for page data", {
|
|
@@ -508,12 +515,18 @@ export class RenderPipeline {
|
|
|
508
515
|
source: "rendered-html-hash",
|
|
509
516
|
});
|
|
510
517
|
}
|
|
518
|
+
else if (hasRenderedReleaseAssetCss(renderResult.html)) {
|
|
519
|
+
cssAction = "clear";
|
|
520
|
+
resolvePageDataLog.debug("Skipped SPA CSS fallback; rendered HTML uses release CSS asset", {
|
|
521
|
+
slug,
|
|
522
|
+
});
|
|
523
|
+
}
|
|
511
524
|
else {
|
|
512
525
|
css = await this.generatePageCssFromHtml(slug, renderResult.html, options);
|
|
513
526
|
}
|
|
514
527
|
if (css)
|
|
515
528
|
cachePageCss(cssCacheKey, css);
|
|
516
|
-
return { css, cssError: undefined };
|
|
529
|
+
return { css, cssAction, cssError: undefined };
|
|
517
530
|
}
|
|
518
531
|
catch (error) {
|
|
519
532
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -526,10 +539,17 @@ export class RenderPipeline {
|
|
|
526
539
|
});
|
|
527
540
|
return {
|
|
528
541
|
css: undefined,
|
|
542
|
+
cssAction: undefined,
|
|
529
543
|
cssError: `CSS generation failed: ${errorMessage}`,
|
|
530
544
|
};
|
|
531
545
|
}
|
|
532
546
|
}
|
|
547
|
+
hasReadyReleaseCss(options) {
|
|
548
|
+
if (options?.environment !== "production")
|
|
549
|
+
return false;
|
|
550
|
+
const releaseManifest = getReadyManifestForRender(options?.releaseId);
|
|
551
|
+
return (releaseManifest?.css?.length ?? 0) > 0;
|
|
552
|
+
}
|
|
533
553
|
async generatePageCssFromHtml(slug, html, options) {
|
|
534
554
|
const candidates = extractCandidates(html);
|
|
535
555
|
const generatedCss = (await generateTailwindCSS(undefined, candidates, {
|
|
@@ -86,6 +86,8 @@ export interface PageDataResponse {
|
|
|
86
86
|
}>;
|
|
87
87
|
/** JIT-compiled Tailwind CSS for this page (for SPA navigation in prod mode) */
|
|
88
88
|
css?: string;
|
|
89
|
+
/** Client action for the SPA CSS tag when no route CSS payload is sent. */
|
|
90
|
+
cssAction?: "clear";
|
|
89
91
|
/**
|
|
90
92
|
* Error message if CSS generation failed.
|
|
91
93
|
* When set, the css field will be undefined and clients should fall back
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/orchestrator/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,YAAY,EAAE,YAAY,EAAE,CAAC;AAE7B,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,MAAM,CAAC,EAAE,eAAe,CAAC;IACzB,sEAAsE;IACtE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE;QACZ,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;KACvB,CAAC;CACH;AAED,MAAM,WAAW,aAAa;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC,CAAC;IAC3C,KAA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M,CAAC;IACjB,6DAA6D;IAC7D,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9D,gFAAgF;IAChF,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,2EAA2E;IAC3E,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -45,7 +45,7 @@ export async function buildSSRResponse(req, ctx, result, builder) {
|
|
|
45
45
|
return new Response(null, { status: response.status, headers: response.headers });
|
|
46
46
|
}
|
|
47
47
|
// ETag match → 304 Not Modified (production only)
|
|
48
|
-
if (!isDev && result.etag && hasMatchingEtag(req, result.etag)) {
|
|
48
|
+
if (!isDev && !builder.nonce && result.etag && hasMatchingEtag(req, result.etag)) {
|
|
49
49
|
return builder
|
|
50
50
|
.withCORS(req, ctx.securityConfig?.cors)
|
|
51
51
|
.withSecurity(ctx.securityConfig ?? undefined, req)
|