@zenithbuild/bundler 0.7.5 → 0.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenithbuild/bundler",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "scripts": {
5
5
  "build": "rm -rf dist && cargo build --release && tsc -p tsconfig.meta.json && node ../../scripts/stage-bundler-platform-package.mjs",
6
6
  "contract:deps": "node dependency_contract.spec.js",
@@ -36,14 +36,14 @@
36
36
  },
37
37
  "homepage": "https://github.com/zenithbuild/framework#readme",
38
38
  "dependencies": {
39
- "@zenithbuild/router": "0.7.5",
40
- "@zenithbuild/runtime": "0.7.5"
39
+ "@zenithbuild/router": "0.7.7",
40
+ "@zenithbuild/runtime": "0.7.7"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@zenithbuild/bundler-darwin-arm64": "0.7.5",
44
- "@zenithbuild/bundler-darwin-x64": "0.7.5",
45
- "@zenithbuild/bundler-linux-x64": "0.7.5",
46
- "@zenithbuild/bundler-win32-x64": "0.7.5"
43
+ "@zenithbuild/bundler-darwin-arm64": "0.7.7",
44
+ "@zenithbuild/bundler-darwin-x64": "0.7.7",
45
+ "@zenithbuild/bundler-linux-x64": "0.7.7",
46
+ "@zenithbuild/bundler-win32-x64": "0.7.7"
47
47
  },
48
48
  "type": "module",
49
49
  "private": false
@@ -1,4 +1,4 @@
1
- import { runtimeModuleSource } from '@zenithbuild/runtime/template';
1
+ import { runtimeModuleProfileSnapshot } from '@zenithbuild/runtime/template';
2
2
  import { renderRouterModule } from '@zenithbuild/router/template';
3
3
 
4
4
  const IR_VERSION = 1;
@@ -29,21 +29,40 @@ async function main() {
29
29
  ? parsed.coreImport
30
30
  : '/assets/core.placeholder.js';
31
31
  const routeCheck = parsed.routeCheck === true;
32
+ const formsEnabled = parsed.formsEnabled !== false;
33
+ const runtimeProfile = typeof parsed.runtimeProfile === 'string' && parsed.runtimeProfile.length > 0
34
+ ? parsed.runtimeProfile
35
+ : 'default';
32
36
 
33
- const runtimeSource = normalizeNewlines(runtimeModuleSource());
37
+ const runtimeSnapshot = runtimeModuleProfileSnapshot(runtimeProfile);
38
+ const runtimeSource = normalizeNewlines(runtimeSnapshot.source || '');
39
+ const runtimeContributors = Array.isArray(runtimeSnapshot.contributors)
40
+ ? runtimeSnapshot.contributors.map((entry) => ({
41
+ id: String(entry?.id || ''),
42
+ sourceFile: String(entry?.sourceFile || ''),
43
+ bytes: Number.isFinite(entry?.bytes) ? Number(entry.bytes) : 0
44
+ }))
45
+ : [];
46
+ const runtimeCoverageBytes = Number.isFinite(runtimeSnapshot.coverageBytes)
47
+ ? Number(runtimeSnapshot.coverageBytes)
48
+ : Buffer.byteLength(runtimeSource, 'utf8');
34
49
  const routerSource = normalizeNewlines(
35
50
  renderRouterModule({
36
51
  manifestJson,
37
52
  runtimeImport,
38
53
  coreImport,
39
- routeCheck
54
+ routeCheck,
55
+ formsEnabled
40
56
  })
41
57
  );
42
58
 
43
59
  // Keep output key order deterministic.
44
60
  const output = {
45
61
  irVersion: IR_VERSION,
62
+ runtimeProfile,
46
63
  runtimeSource,
64
+ runtimeContributors,
65
+ runtimeCoverageBytes,
47
66
  routerSource
48
67
  };
49
68