veryfront 0.1.742 → 0.1.743
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/rendering/context/render-context.d.ts.map +1 -1
- package/esm/src/rendering/context/render-context.js +7 -1
- package/esm/src/server/context/enriched-context.d.ts.map +1 -1
- package/esm/src/server/context/enriched-context.js +15 -3
- package/esm/src/server/handlers/request/api/project-discovery.js +2 -2
- 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":"render-context.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/context/render-context.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,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAIL,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,YAAY,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,2GAA2G;IAC3G,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,cAAc,EACnB,OAAO,CAAC,EAAE,0BAA0B,GACnC,aAAa,CA4Cf;
|
|
1
|
+
{"version":3,"file":"render-context.d.ts","sourceRoot":"","sources":["../../../../src/src/rendering/context/render-context.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,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,EAIL,mBAAmB,EACpB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,YAAY,CAAC;AAEzD,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,aAAa,GAAG,YAAY,CAAC;IACnC,OAAO,EAAE,cAAc,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,iBAAiB,CAAC;IAC/B,2GAA2G;IAC3G,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,0BAA0B;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,cAAc,EACnB,OAAO,CAAC,EAAE,0BAA0B,GACnC,aAAa,CA4Cf;AAoBD,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,eAAe,EACzB,OAAO,CAAC,EAAE,0BAA0B,GACnC,aAAa,CA8Bf;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAE7E;AAED,eAAO,MAAM,aAAa,4BAAsB,CAAC;AAEjD,wBAAgB,YAAY,CAAC,CAAC,EAAE,aAAa,EAAE,CAAC,EAAE,aAAa,GAAG,OAAO,CAExE"}
|
|
@@ -40,8 +40,14 @@ export function createRenderContext(ctx, options) {
|
|
|
40
40
|
function getReleaseKey(isLocal, environment, branch, releaseId) {
|
|
41
41
|
if (isLocal)
|
|
42
42
|
return branch ?? "main";
|
|
43
|
-
if (environment === "production")
|
|
43
|
+
if (environment === "production") {
|
|
44
|
+
if (!releaseId) {
|
|
45
|
+
throw INVALID_ARGUMENT.create({
|
|
46
|
+
detail: "Production requires releaseId for cache isolation",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
44
49
|
return releaseId;
|
|
50
|
+
}
|
|
45
51
|
return branch ?? "main";
|
|
46
52
|
}
|
|
47
53
|
export function createRenderContextFromEnriched(enriched, options) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"enriched-context.d.ts","sourceRoot":"","sources":["../../../../src/src/server/context/enriched-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAChG,YAAY,EACV,2BAA2B,EAC3B,eAAe,EACf,WAAW,GACZ,MAAM,6BAA6B,CAAC;AAErC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"enriched-context.d.ts","sourceRoot":"","sources":["../../../../src/src/server/context/enriched-context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,KAAK,EAAE,2BAA2B,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAChG,YAAY,EACV,2BAA2B,EAC3B,eAAe,EACf,WAAW,GACZ,MAAM,6BAA6B,CAAC;AAErC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,2BAA2B,GAAG,eAAe,CA8C1F;AAMD,wBAAgB,kCAAkC,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAK/E"}
|
|
@@ -4,9 +4,21 @@ export function buildEnrichedContext(options) {
|
|
|
4
4
|
if (!options.contentSourceId) {
|
|
5
5
|
throw INVALID_ARGUMENT.create({ detail: `Missing contentSourceId for ${options.projectSlug}` });
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
let releaseKey;
|
|
8
|
+
if (options.isLocalProject) {
|
|
9
|
+
releaseKey = options.branch ?? "main";
|
|
10
|
+
}
|
|
11
|
+
else if (options.environment === "production") {
|
|
12
|
+
if (!options.releaseId) {
|
|
13
|
+
throw INVALID_ARGUMENT.create({
|
|
14
|
+
detail: "Production requires releaseId for cache isolation",
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
releaseKey = options.releaseId;
|
|
18
|
+
}
|
|
19
|
+
else {
|
|
20
|
+
releaseKey = options.branch ?? "main";
|
|
21
|
+
}
|
|
10
22
|
return {
|
|
11
23
|
projectId: options.projectId,
|
|
12
24
|
projectSlug: options.projectSlug,
|
|
@@ -13,7 +13,7 @@ function discoveryKey(ctx) {
|
|
|
13
13
|
const environment = ctx.enriched?.environment ?? ctx.resolvedEnvironment ??
|
|
14
14
|
(ctx.releaseId ? "production" : "preview");
|
|
15
15
|
if (environment === "production") {
|
|
16
|
-
return `${slug}:release:${ctx.releaseId
|
|
16
|
+
return ctx.releaseId ? `${slug}:release:${ctx.releaseId}` : `${slug}:production:unreleased`;
|
|
17
17
|
}
|
|
18
18
|
const branch = ctx.requestContext?.branch ?? ctx.enriched?.branch ?? ctx.parsedDomain?.branch ??
|
|
19
19
|
"main";
|
|
@@ -26,7 +26,7 @@ function shouldCacheCompletedDiscovery(ctx) {
|
|
|
26
26
|
}
|
|
27
27
|
const environment = ctx.enriched?.environment ?? ctx.resolvedEnvironment ??
|
|
28
28
|
(ctx.releaseId ? "production" : "preview");
|
|
29
|
-
return environment === "production";
|
|
29
|
+
return environment === "production" && !!ctx.releaseId;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* Run primitive discovery (agents, tools) for a project if not already done.
|