veryfront 0.1.39 → 0.1.40

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.39",
3
+ "version": "0.1.40",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -283,7 +283,7 @@ export default {
283
283
  "proxy": "deno run --allow-all cli/main.ts serve --mode=proxy",
284
284
  "dev": "deno run --allow-all cli/main.ts dev",
285
285
  "production": "deno run --allow-all cli/main.ts serve --mode=production",
286
- "build": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/generate-templates-manifest.ts && deno run -A scripts/build/generate-dev-ui-manifest.ts && deno run -A scripts/build/prepare-framework-sources.ts && deno run -A scripts/build/prebundle-client-scripts.ts && deno compile --allow-all --include src/platform/polyfills --include src/proxy/main.ts --include dist/framework-src --output ./bin/veryfront cli/main.ts",
286
+ "build": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/generate-templates-manifest.ts && deno run -A scripts/build/generate-dev-ui-manifest.ts && deno run -A scripts/build/prepare-framework-sources.ts && deno run -A scripts/build/prebundle-client-scripts.ts && deno run -A scripts/build/prebundle-bridge.ts && deno compile --allow-all --include src/platform/polyfills --include src/proxy/main.ts --include dist/framework-src --output ./bin/veryfront cli/main.ts",
287
287
  "build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/build-npm-dnt.ts",
288
288
  "release": "deno run -A scripts/release.ts",
289
289
  "test": "VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net",
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Studio Bridge Handler
3
3
  *
4
- * Bundles the decomposed bridge TypeScript modules into a single JS file
5
- * using esbuild (same JIT pipeline as DevFileHandler).
4
+ * Serves the studio bridge script. In compiled binaries, uses a pre-bundled
5
+ * version generated at build time. In dev mode, bundles on-the-fly with esbuild.
6
6
  *
7
7
  * Route: /_veryfront/studio-bridge.js
8
8
  *
@@ -1 +1 @@
1
- {"version":3,"file":"bridge-modules.handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/studio/bridge-modules.handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,aAAa,EACd,MAAM,aAAa,CAAC;AAkDrB,qBAAa,0BAA2B,SAAQ,WAAW;IACzD,QAAQ,EAAE,eAAe,CAKvB;IAEI,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAwChF;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
1
+ {"version":3,"file":"bridge-modules.handler.d.ts","sourceRoot":"","sources":["../../../../../src/src/server/handlers/studio/bridge-modules.handler.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,KAAK,OAAO,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EAEf,aAAa,EACd,MAAM,aAAa,CAAC;AA4DrB,qBAAa,0BAA2B,SAAQ,WAAW;IACzD,QAAQ,EAAE,eAAe,CAKvB;IAEI,MAAM,CAAC,GAAG,EAAE,OAAO,CAAC,OAAO,EAAE,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC;CAwChF;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Studio Bridge Handler
3
3
  *
4
- * Bundles the decomposed bridge TypeScript modules into a single JS file
5
- * using esbuild (same JIT pipeline as DevFileHandler).
4
+ * Serves the studio bridge script. In compiled binaries, uses a pre-bundled
5
+ * version generated at build time. In dev mode, bundles on-the-fly with esbuild.
6
6
  *
7
7
  * Route: /_veryfront/studio-bridge.js
8
8
  *
@@ -11,6 +11,7 @@
11
11
  import * as dntShim from "../../../../_dnt.shims.js";
12
12
  import { BaseHandler } from "../../../security/index.js";
13
13
  import { HTTP_OK, PRIORITY_HIGH_DEV } from "../../../utils/constants/index.js";
14
+ import { STUDIO_BRIDGE_BUNDLE } from "../../../studio/bridge/bridge-bundle.generated.js";
14
15
  /** Cached bundle output. */
15
16
  let bundleCache = null;
16
17
  /** Resolve the bridge source directory from this module's location. */
@@ -26,11 +27,19 @@ async function computeEtag(content) {
26
27
  }
27
28
  /**
28
29
  * Bundle the bridge coordinator (and all its imports) into a single JS file.
29
- * Uses esbuild.build() with bundle:true same approach as DevFileHandler.
30
+ * Uses pre-bundled output when available (compiled binary), falls back to
31
+ * esbuild JIT bundling in dev mode.
30
32
  */
31
33
  async function bundleBridge() {
32
34
  if (bundleCache)
33
35
  return bundleCache;
36
+ // Use pre-bundled output if available (compiled binary / CI builds)
37
+ if (STUDIO_BRIDGE_BUNDLE) {
38
+ const etag = await computeEtag(STUDIO_BRIDGE_BUNDLE);
39
+ bundleCache = { js: STUDIO_BRIDGE_BUNDLE, etag };
40
+ return bundleCache;
41
+ }
42
+ // Dev mode: bundle on-the-fly with esbuild
34
43
  const entryPoint = `${BRIDGE_DIR}bridge-coordinator.ts`;
35
44
  const source = await dntShim.Deno.readTextFile(entryPoint);
36
45
  const { build } = await import("esbuild");
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Pre-bundled Studio Bridge Script
3
+ *
4
+ * AUTO-GENERATED by scripts/build/prebundle-bridge.ts
5
+ * Do not edit manually — run `deno task build` to regenerate.
6
+ * @module
7
+ */
8
+ export declare const STUDIO_BRIDGE_BUNDLE: string | undefined;
9
+ //# sourceMappingURL=bridge-bundle.generated.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge-bundle.generated.d.ts","sourceRoot":"","sources":["../../../../src/src/studio/bridge/bridge-bundle.generated.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,eAAO,MAAM,oBAAoB,EAAE,MAAM,GAAG,SAAqB,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Pre-bundled Studio Bridge Script
3
+ *
4
+ * AUTO-GENERATED by scripts/build/prebundle-bridge.ts
5
+ * Do not edit manually — run `deno task build` to regenerate.
6
+ * @module
7
+ */
8
+ export const STUDIO_BRIDGE_BUNDLE = undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfront",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "description": "The simplest way to build AI-powered apps",
5
5
  "keywords": [
6
6
  "react",
package/src/deno.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export default {
2
2
  "name": "veryfront",
3
- "version": "0.1.39",
3
+ "version": "0.1.40",
4
4
  "license": "Apache-2.0",
5
5
  "nodeModulesDir": "auto",
6
6
  "exclude": [
@@ -283,7 +283,7 @@ export default {
283
283
  "proxy": "deno run --allow-all cli/main.ts serve --mode=proxy",
284
284
  "dev": "deno run --allow-all cli/main.ts dev",
285
285
  "production": "deno run --allow-all cli/main.ts serve --mode=production",
286
- "build": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/generate-templates-manifest.ts && deno run -A scripts/build/generate-dev-ui-manifest.ts && deno run -A scripts/build/prepare-framework-sources.ts && deno run -A scripts/build/prebundle-client-scripts.ts && deno compile --allow-all --include src/platform/polyfills --include src/proxy/main.ts --include dist/framework-src --output ./bin/veryfront cli/main.ts",
286
+ "build": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/generate-templates-manifest.ts && deno run -A scripts/build/generate-dev-ui-manifest.ts && deno run -A scripts/build/prepare-framework-sources.ts && deno run -A scripts/build/prebundle-client-scripts.ts && deno run -A scripts/build/prebundle-bridge.ts && deno compile --allow-all --include src/platform/polyfills --include src/proxy/main.ts --include dist/framework-src --output ./bin/veryfront cli/main.ts",
287
287
  "build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno run -A scripts/build/build-npm-dnt.ts",
288
288
  "release": "deno run -A scripts/release.ts",
289
289
  "test": "VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --allow-all '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' --unstable-worker-options --unstable-net",
@@ -1,8 +1,8 @@
1
1
  /**
2
2
  * Studio Bridge Handler
3
3
  *
4
- * Bundles the decomposed bridge TypeScript modules into a single JS file
5
- * using esbuild (same JIT pipeline as DevFileHandler).
4
+ * Serves the studio bridge script. In compiled binaries, uses a pre-bundled
5
+ * version generated at build time. In dev mode, bundles on-the-fly with esbuild.
6
6
  *
7
7
  * Route: /_veryfront/studio-bridge.js
8
8
  *
@@ -19,6 +19,7 @@ import type {
19
19
  HandlerResult,
20
20
  } from "../types.js";
21
21
  import { HTTP_OK, PRIORITY_HIGH_DEV } from "../../../utils/constants/index.js";
22
+ import { STUDIO_BRIDGE_BUNDLE } from "../../../studio/bridge/bridge-bundle.generated.js";
22
23
 
23
24
  /** Cached bundle output. */
24
25
  let bundleCache: { js: string; etag: string } | null = null;
@@ -38,11 +39,20 @@ async function computeEtag(content: string): Promise<string> {
38
39
 
39
40
  /**
40
41
  * Bundle the bridge coordinator (and all its imports) into a single JS file.
41
- * Uses esbuild.build() with bundle:true same approach as DevFileHandler.
42
+ * Uses pre-bundled output when available (compiled binary), falls back to
43
+ * esbuild JIT bundling in dev mode.
42
44
  */
43
45
  async function bundleBridge(): Promise<{ js: string; etag: string }> {
44
46
  if (bundleCache) return bundleCache;
45
47
 
48
+ // Use pre-bundled output if available (compiled binary / CI builds)
49
+ if (STUDIO_BRIDGE_BUNDLE) {
50
+ const etag = await computeEtag(STUDIO_BRIDGE_BUNDLE);
51
+ bundleCache = { js: STUDIO_BRIDGE_BUNDLE, etag };
52
+ return bundleCache;
53
+ }
54
+
55
+ // Dev mode: bundle on-the-fly with esbuild
46
56
  const entryPoint = `${BRIDGE_DIR}bridge-coordinator.ts`;
47
57
  const source = await dntShim.Deno.readTextFile(entryPoint);
48
58
 
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Pre-bundled Studio Bridge Script
3
+ *
4
+ * AUTO-GENERATED by scripts/build/prebundle-bridge.ts
5
+ * Do not edit manually — run `deno task build` to regenerate.
6
+ * @module
7
+ */
8
+
9
+ export const STUDIO_BRIDGE_BUNDLE: string | undefined = undefined;