veryfront 0.1.931 → 0.1.932

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.931",
3
+ "version": "0.1.932",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "minimumDependencyAge": {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/request/rsc/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,aAAa,EACd,MAAM,gBAAgB,CAAC;AASxB,qBAAa,UAAW,SAAQ,WAAW;IACzC,QAAQ,EAAE,eAAe,CAIvB;IAEF,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CA2DlE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/src/server/handlers/request/rsc/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,aAAa,EACd,MAAM,gBAAgB,CAAC;AAWxB,qBAAa,UAAW,SAAQ,WAAW;IACzC,QAAQ,EAAE,eAAe,CAIvB;IAEF,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAiFlE"}
@@ -11,6 +11,8 @@ import { applyCORSHeaders } from "../../../../security/index.js";
11
11
  import { HTTP_NOT_FOUND, PRIORITY_MEDIUM } from "../../../../utils/constants/index.js";
12
12
  import { withSpan } from "../../../../observability/tracing/otlp-setup.js";
13
13
  import { generateNonce } from "../../../../security/http/response/security-handler.js";
14
+ import { isExtendedFSAdapter } from "../../../../platform/adapters/fs/wrapper.js";
15
+ import { getHostEnv } from "../../../../platform/compat/process.js";
14
16
  export class RSCHandler extends BaseHandler {
15
17
  metadata = {
16
18
  name: "RSCHandler",
@@ -34,7 +36,7 @@ export class RSCHandler extends BaseHandler {
34
36
  return this.respond(new Response("Not Found", { status: HTTP_NOT_FOUND }));
35
37
  }
36
38
  const nonce = generateNonce();
37
- const res = await handleRSCEndpoint({
39
+ const execute = () => handleRSCEndpoint({
38
40
  req,
39
41
  pathname,
40
42
  projectDir: ctx.projectDir,
@@ -43,6 +45,20 @@ export class RSCHandler extends BaseHandler {
43
45
  config: ctx.config,
44
46
  nonce,
45
47
  });
48
+ const fsAdapter = ctx.adapter.fs;
49
+ const isMultiProject = ctx.projectSlug &&
50
+ isExtendedFSAdapter(fsAdapter) &&
51
+ fsAdapter.isMultiProjectMode();
52
+ const res = isMultiProject
53
+ ? await fsAdapter.runWithContext(ctx.projectSlug, ctx.proxyToken || getHostEnv("VERYFRONT_API_TOKEN") || "", execute, ctx.projectId, {
54
+ productionMode: isRSCProductionMode(ctx),
55
+ releaseId: ctx.releaseId,
56
+ branch: ctx.resolvedEnvironment === "production"
57
+ ? null
58
+ : ctx.requestContext?.branch ?? ctx.parsedDomain?.branch ?? null,
59
+ environmentName: ctx.environmentName,
60
+ })
61
+ : await execute();
46
62
  if (!res) {
47
63
  return this.continue();
48
64
  }
@@ -61,3 +77,8 @@ export class RSCHandler extends BaseHandler {
61
77
  }, { "rsc.pathname": pathname, "rsc.endpoint": endpoint });
62
78
  }
63
79
  }
80
+ function isRSCProductionMode(ctx) {
81
+ if (ctx.config?.fs?.veryfront?.productionMode === true)
82
+ return true;
83
+ return (ctx.resolvedEnvironment ?? ctx.requestContext?.mode) === "production";
84
+ }
@@ -1,3 +1,3 @@
1
1
  /** Shared version value. */
2
- export declare const VERSION = "0.1.931";
2
+ export declare const VERSION = "0.1.932";
3
3
  //# sourceMappingURL=version-constant.d.ts.map
@@ -1,4 +1,4 @@
1
1
  // Keep in sync with deno.json version.
2
2
  // scripts/release.ts updates this constant during releases.
3
3
  /** Shared version value. */
4
- export const VERSION = "0.1.931";
4
+ export const VERSION = "0.1.932";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.931",
3
+ "version": "0.1.932",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",