@bitmagic/cli 0.1.53-dev.8 → 0.1.53
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/README.md +31 -14
- package/dist/assets/revoxelize.d.ts +34 -0
- package/dist/assets/revoxelize.js +64 -8
- package/dist/assets/revoxelize.js.map +1 -1
- package/dist/cli.d.ts +8 -0
- package/dist/commands/build.d.ts +4 -0
- package/dist/commands/build.js +7 -1
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/generate.d.ts +20 -18
- package/dist/commands/generate.js +69 -38
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/publish.d.ts +8 -1
- package/dist/commands/publish.js +16 -6
- package/dist/commands/publish.js.map +1 -1
- package/dist/editor/asset-detail-panel.d.ts +2 -2
- package/dist/editor/asset-detail-panel.js +5 -2
- package/dist/editor/asset-detail-panel.js.map +1 -1
- package/dist/editor/server.js +5 -1
- package/dist/editor/server.js.map +1 -1
- package/dist/editor/shell-page.js +137 -5
- package/dist/editor/shell-page.js.map +1 -1
- package/dist/generate/model.d.ts +7 -5
- package/dist/generate/model.js +16 -6
- package/dist/generate/model.js.map +1 -1
- package/dist/generate/prop.d.ts +8 -6
- package/dist/generate/prop.js +48 -19
- package/dist/generate/prop.js.map +1 -1
- package/dist/publish/bundle.d.ts +35 -8
- package/dist/publish/bundle.js +41 -13
- package/dist/publish/bundle.js.map +1 -1
- package/dist/scaffold/project-files.d.ts +42 -9
- package/dist/scaffold/project-files.js +198 -16
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/scaffold/project.js +2 -1
- package/dist/scaffold/project.js.map +1 -1
- package/package.json +4 -4
package/dist/publish/bundle.js
CHANGED
|
@@ -5,8 +5,19 @@ import * as path from 'path';
|
|
|
5
5
|
import { CliError } from '../errors.js';
|
|
6
6
|
import { projectBin } from '../project/context.js';
|
|
7
7
|
import { computeFingerprint } from './fingerprint.js';
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The configs the scaffold vendors alongside `engine/`, one per bundle mode.
|
|
10
|
+
*
|
|
11
|
+
* The default leaves three.js, Rapier and the rest of the import map's packages to the CDN, which
|
|
12
|
+
* is what every production publish from the Creator does. The standalone one inlines them, for a
|
|
13
|
+
* game that has to run with no network at all.
|
|
14
|
+
*/
|
|
9
15
|
export const VITE_PUBLISH_CONFIG = 'vite.publish.config.js';
|
|
16
|
+
export const VITE_PUBLISH_STANDALONE_CONFIG = 'vite.publish-standalone.config.js';
|
|
17
|
+
/** The vendored config a build of this mode loads. */
|
|
18
|
+
export function publishConfigFor(singleFile) {
|
|
19
|
+
return singleFile ? VITE_PUBLISH_STANDALONE_CONFIG : VITE_PUBLISH_CONFIG;
|
|
20
|
+
}
|
|
10
21
|
export function buildBundlePaths(root) {
|
|
11
22
|
const dir = path.join(root, '.bitmagic', 'build');
|
|
12
23
|
return { dir, htmlPath: path.join(dir, 'index.html'), manifestPath: path.join(dir, 'manifest.json') };
|
|
@@ -20,6 +31,11 @@ function isManifest(value) {
|
|
|
20
31
|
if (typeof value !== 'object' || value === null)
|
|
21
32
|
return false;
|
|
22
33
|
const m = value;
|
|
34
|
+
// `singleFile` is deliberately NOT required. A manifest written before the flag existed has no
|
|
35
|
+
// such field, and rejecting those outright would force a rebuild on every project's first
|
|
36
|
+
// publish after upgrading. The reader below defaults it to `false`, which is the safe direction:
|
|
37
|
+
// the config now on disk is the external one, so at worst this costs one rebuild — it can never
|
|
38
|
+
// reuse a bundle built in the other mode, because there was no other mode.
|
|
23
39
|
return (typeof m.engineVersion === 'string'
|
|
24
40
|
&& typeof m.fingerprint === 'string'
|
|
25
41
|
&& typeof m.bytes === 'number'
|
|
@@ -30,27 +46,38 @@ function isManifest(value) {
|
|
|
30
46
|
export function readBuildManifest(root) {
|
|
31
47
|
try {
|
|
32
48
|
const parsed = JSON.parse(fs.readFileSync(buildBundlePaths(root).manifestPath, 'utf-8'));
|
|
33
|
-
|
|
49
|
+
if (!isManifest(parsed))
|
|
50
|
+
return null;
|
|
51
|
+
return { ...parsed, singleFile: parsed.singleFile === true };
|
|
34
52
|
}
|
|
35
53
|
catch {
|
|
36
54
|
return null;
|
|
37
55
|
}
|
|
38
56
|
}
|
|
39
57
|
/**
|
|
40
|
-
* Compile and bundle the project into one
|
|
58
|
+
* Compile and bundle the project into one HTML file, and record what was built.
|
|
59
|
+
*
|
|
60
|
+
* One file either way — `bitmagic publish` PUTs a single object and api-server range-reads that
|
|
61
|
+
* same object to confirm the meta block, so there is nowhere for a second file to go. What the
|
|
62
|
+
* mode changes is what is INSIDE it: by default the engine, the game and its data are inlined
|
|
63
|
+
* while three.js, Rapier and the other CDN packages are fetched at runtime, matching what the
|
|
64
|
+
* Creator publishes; `singleFile` inlines those too, for a game that must run with no network.
|
|
41
65
|
*
|
|
42
66
|
* Exit code 1 on failure, matching the table in the spec: a build failure is the creator's own
|
|
43
67
|
* code, and the compiler's output has already been printed.
|
|
44
68
|
*
|
|
45
|
-
* The pre-flight below runs BEFORE `tsc`, not after: a project scaffolded before
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
69
|
+
* The pre-flight below runs BEFORE `tsc`, not after: a project scaffolded before the config it
|
|
70
|
+
* needs existed has none for vite to load, and without this check the creator pays a full
|
|
71
|
+
* type-check and then reads a raw vite "config not found" that names no remedy. `bitmagic upgrade`
|
|
72
|
+
* is the remedy — it vendors the file without touching game code — so the error says so. It names
|
|
73
|
+
* the config for the mode actually asked for, since a project can easily have one and not the
|
|
74
|
+
* other: the standalone config was added later than the default one.
|
|
50
75
|
*/
|
|
51
|
-
export function runBuild(root, engineVersion) {
|
|
52
|
-
|
|
53
|
-
|
|
76
|
+
export function runBuild(root, engineVersion, options = {}) {
|
|
77
|
+
const singleFile = options.singleFile === true;
|
|
78
|
+
const configFile = publishConfigFor(singleFile);
|
|
79
|
+
if (!fs.existsSync(path.join(root, configFile))) {
|
|
80
|
+
throw new CliError(`This project has no ${configFile}, which \`bitmagic build\` needs to bundle it. ` +
|
|
54
81
|
'It was added to the scaffold after this project was created — run `bitmagic upgrade` to ' +
|
|
55
82
|
'vendor it (your game code is not touched), then build again.', 1);
|
|
56
83
|
}
|
|
@@ -63,7 +90,7 @@ export function runBuild(root, engineVersion) {
|
|
|
63
90
|
const { dir, htmlPath } = buildBundlePaths(root);
|
|
64
91
|
fs.mkdirSync(dir, { recursive: true });
|
|
65
92
|
const vite = projectBin(root, 'vite');
|
|
66
|
-
const bundle = spawnSync(vite, ['build', '--config',
|
|
93
|
+
const bundle = spawnSync(vite, ['build', '--config', configFile, '--outDir', dir, '--emptyOutDir'], {
|
|
67
94
|
cwd: root,
|
|
68
95
|
stdio: 'inherit',
|
|
69
96
|
});
|
|
@@ -72,12 +99,13 @@ export function runBuild(root, engineVersion) {
|
|
|
72
99
|
if (bundle.status !== 0)
|
|
73
100
|
throw new CliError('Build failed: the bundle did not complete.', 1);
|
|
74
101
|
if (!fs.existsSync(htmlPath)) {
|
|
75
|
-
throw new CliError(`Build produced no ${path.relative(root, htmlPath)}. Check ${
|
|
102
|
+
throw new CliError(`Build produced no ${path.relative(root, htmlPath)}. Check ${configFile}.`, 1);
|
|
76
103
|
}
|
|
77
104
|
const contents = fs.readFileSync(htmlPath);
|
|
78
105
|
const manifest = {
|
|
79
106
|
engineVersion,
|
|
80
107
|
fingerprint: computeFingerprint(root),
|
|
108
|
+
singleFile,
|
|
81
109
|
bytes: contents.byteLength,
|
|
82
110
|
sha256: createHash('sha256').update(contents).digest('hex'),
|
|
83
111
|
builtAt: new Date().toISOString(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/publish/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI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,EAAE;QAClG,GAAG,EAAE,IAAI;QACT,KAAK,EAAE,SAAS;KACjB,CAAC,CAAC;IACH,IAAI,MAAM,CAAC,KAAK;QAAE,MAAM,IAAI,QAAQ,CAAC,uBAAuB,MAAM,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IACvF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,MAAM,IAAI,QAAQ,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC;IAE7F,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,MAAM,IAAI,QAAQ,CAAC,qBAAqB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,WAAW,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC;IACpG,CAAC;IAED,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3C,MAAM,QAAQ,GAAkB;QAC9B,aAAa;QACb,WAAW,EAAE,kBAAkB,CAAC,IAAI,CAAC;QACrC,UAAU;QACV,KAAK,EAAE,QAAQ,CAAC,UAAU;QAC1B,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;QAC3D,OAAO,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KAClC,CAAC;IACF,kBAAkB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACnC,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -2,8 +2,9 @@ import type { EnvironmentName } from '../config/environments.js';
|
|
|
2
2
|
/**
|
|
3
3
|
* The legal notice stamped into every game this project publishes.
|
|
4
4
|
*
|
|
5
|
-
* **A licence obligation, not decoration.** A published game is one file with the engine
|
|
6
|
-
* third-party dependencies
|
|
5
|
+
* **A licence obligation, not decoration.** A published game is one file with the engine inlined
|
|
6
|
+
* (and, from a `--single-file` build, its third-party dependencies too), so distributing a game
|
|
7
|
+
* distributes part of the engine.
|
|
7
8
|
* PolyForm Shield's Notices section requires that anyone receiving any part of the software also
|
|
8
9
|
* receives the terms and every `Required Notice:` line; MIT and ISC require their copyright and
|
|
9
10
|
* permission notices to travel with copies; Apache-2.0 section 4 requires the licence to accompany
|
|
@@ -48,17 +49,49 @@ export declare function renderTsconfig(): string;
|
|
|
48
49
|
export declare function renderIndexHtml(): string;
|
|
49
50
|
export declare function renderViteConfig(): string;
|
|
50
51
|
/**
|
|
51
|
-
*
|
|
52
|
+
* `CDN_IMPORTS` entries a published bundle keeps INLINED rather than fetching at runtime.
|
|
52
53
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
54
|
+
* `fflate` is the whole list, and it is a decision rather than an oversight. `engine/gzip.ts`
|
|
55
|
+
* falls back to fflate's synchronous codec when `CompressionStream` is missing — that is
|
|
56
|
+
* iOS/WebKit below 16.4 and a long tail of embedded WebViews, i.e. exactly the browsers with the
|
|
57
|
+
* least reliable module-CDN story, and the file says so in as many words ("fflate is bundled (not
|
|
58
|
+
* externalized) so it works offline and without an import map"). Moving it out would break
|
|
59
|
+
* every compressed VXL/VWLD load precisely where the fallback is the only thing that works, and
|
|
60
|
+
* buys back about 30KB. `game/vite.bundle-publish.config.js` leaves it bundled for the same
|
|
61
|
+
* reason, and the two lanes have to agree.
|
|
57
62
|
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
63
|
+
* It stays in `CDN_IMPORTS` regardless: `bitmagic dev` serves raw /dist, where the browser still
|
|
64
|
+
* has to resolve the bare `fflate` specifier through the import map.
|
|
65
|
+
*/
|
|
66
|
+
export declare const INLINED_CDN_IMPORTS: ReadonlySet<string>;
|
|
67
|
+
/**
|
|
68
|
+
* The exact/prefix table a published bundle leaves OUT of itself: every `CDN_IMPORTS` entry whose
|
|
69
|
+
* value resolves on its own (an absolute https URL, or the self-contained `data:` shim `three`
|
|
70
|
+
* maps to) and that is not deliberately inlined above.
|
|
71
|
+
*
|
|
72
|
+
* The local alias prefixes `renderIndexHtml` merges in alongside these (`engine/` -> `/dist/...`)
|
|
73
|
+
* are excluded by the URL filter, which is load-bearing rather than incidental: a published bundle
|
|
74
|
+
* is one HTML file sitting in a bucket with no same-origin siblings to fetch, so everything those
|
|
75
|
+
* name has to be bundled.
|
|
76
|
+
*
|
|
77
|
+
* Returned as ordered pairs, not an object, because the order is part of the contract — `cdnUrl`
|
|
78
|
+
* in the generated config takes the FIRST matching prefix where a browser's import map takes the
|
|
79
|
+
* LONGEST. The two agree only because `three/addons/` is declared above `three/`; flip them and
|
|
80
|
+
* every addon resolves through the bare `three/` entry, which is a second copy of three.js: an
|
|
81
|
+
* unlit scene, and `instanceof THREE.Mesh` scans that find nothing.
|
|
82
|
+
*/
|
|
83
|
+
export declare function publishExternalEntries(): Array<[string, string]>;
|
|
84
|
+
/**
|
|
85
|
+
* The default config: three.js, Rapier and the rest of the import map's packages are left to the
|
|
86
|
+
* CDN, exactly as `game/vite.bundle-publish.config.js` does for every production web publish.
|
|
60
87
|
*/
|
|
61
88
|
export declare function renderVitePublishConfig(): string;
|
|
89
|
+
/**
|
|
90
|
+
* The `--single-file` config: nothing external, so the published HTML plays with no network at all
|
|
91
|
+
* once it has loaded. Bigger by roughly the size of three.js and Rapier, and the reason it exists
|
|
92
|
+
* is offline and packaged distribution (`file://`, Poki, a desktop shell), not everyday publishing.
|
|
93
|
+
*/
|
|
94
|
+
export declare function renderVitePublishStandaloneConfig(): string;
|
|
62
95
|
export declare function renderGitignore(): string;
|
|
63
96
|
export interface ProjectMetadata {
|
|
64
97
|
gameId: string;
|
|
@@ -3,8 +3,9 @@ import { tsconfigPaths, importMapEntries, viteAliasEntries } from './aliases.js'
|
|
|
3
3
|
/**
|
|
4
4
|
* The legal notice stamped into every game this project publishes.
|
|
5
5
|
*
|
|
6
|
-
* **A licence obligation, not decoration.** A published game is one file with the engine
|
|
7
|
-
* third-party dependencies
|
|
6
|
+
* **A licence obligation, not decoration.** A published game is one file with the engine inlined
|
|
7
|
+
* (and, from a `--single-file` build, its third-party dependencies too), so distributing a game
|
|
8
|
+
* distributes part of the engine.
|
|
8
9
|
* PolyForm Shield's Notices section requires that anyone receiving any part of the software also
|
|
9
10
|
* receives the terms and every `Required Notice:` line; MIT and ISC require their copyright and
|
|
10
11
|
* permission notices to travel with copies; Apache-2.0 section 4 requires the licence to accompany
|
|
@@ -328,17 +329,179 @@ ${renderAliasEntries()}
|
|
|
328
329
|
`;
|
|
329
330
|
}
|
|
330
331
|
/**
|
|
331
|
-
*
|
|
332
|
+
* `CDN_IMPORTS` entries a published bundle keeps INLINED rather than fetching at runtime.
|
|
332
333
|
*
|
|
333
|
-
*
|
|
334
|
-
*
|
|
335
|
-
*
|
|
336
|
-
*
|
|
334
|
+
* `fflate` is the whole list, and it is a decision rather than an oversight. `engine/gzip.ts`
|
|
335
|
+
* falls back to fflate's synchronous codec when `CompressionStream` is missing — that is
|
|
336
|
+
* iOS/WebKit below 16.4 and a long tail of embedded WebViews, i.e. exactly the browsers with the
|
|
337
|
+
* least reliable module-CDN story, and the file says so in as many words ("fflate is bundled (not
|
|
338
|
+
* externalized) so it works offline and without an import map"). Moving it out would break
|
|
339
|
+
* every compressed VXL/VWLD load precisely where the fallback is the only thing that works, and
|
|
340
|
+
* buys back about 30KB. `game/vite.bundle-publish.config.js` leaves it bundled for the same
|
|
341
|
+
* reason, and the two lanes have to agree.
|
|
342
|
+
*
|
|
343
|
+
* It stays in `CDN_IMPORTS` regardless: `bitmagic dev` serves raw /dist, where the browser still
|
|
344
|
+
* has to resolve the bare `fflate` specifier through the import map.
|
|
345
|
+
*/
|
|
346
|
+
export const INLINED_CDN_IMPORTS = new Set(['fflate']);
|
|
347
|
+
/**
|
|
348
|
+
* The exact/prefix table a published bundle leaves OUT of itself: every `CDN_IMPORTS` entry whose
|
|
349
|
+
* value resolves on its own (an absolute https URL, or the self-contained `data:` shim `three`
|
|
350
|
+
* maps to) and that is not deliberately inlined above.
|
|
351
|
+
*
|
|
352
|
+
* The local alias prefixes `renderIndexHtml` merges in alongside these (`engine/` -> `/dist/...`)
|
|
353
|
+
* are excluded by the URL filter, which is load-bearing rather than incidental: a published bundle
|
|
354
|
+
* is one HTML file sitting in a bucket with no same-origin siblings to fetch, so everything those
|
|
355
|
+
* name has to be bundled.
|
|
356
|
+
*
|
|
357
|
+
* Returned as ordered pairs, not an object, because the order is part of the contract — `cdnUrl`
|
|
358
|
+
* in the generated config takes the FIRST matching prefix where a browser's import map takes the
|
|
359
|
+
* LONGEST. The two agree only because `three/addons/` is declared above `three/`; flip them and
|
|
360
|
+
* every addon resolves through the bare `three/` entry, which is a second copy of three.js: an
|
|
361
|
+
* unlit scene, and `instanceof THREE.Mesh` scans that find nothing.
|
|
362
|
+
*/
|
|
363
|
+
export function publishExternalEntries() {
|
|
364
|
+
return Object.entries(CDN_IMPORTS).filter(([key, url]) => !INLINED_CDN_IMPORTS.has(key) && /^(https?:\/\/|data:)/.test(url));
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* The generated config's CDN table and its resolver, shared by the `external` predicate and
|
|
368
|
+
* Rollup's `output.paths`.
|
|
369
|
+
*
|
|
370
|
+
* The table is baked in rather than read out of the project's own index.html at build time (which
|
|
371
|
+
* is what `game/vite.external-cdn-paths.js` does for the web lane): both files are
|
|
372
|
+
* platform-generated and rewritten together by `bitmagic upgrade`, so they cannot drift, and a
|
|
373
|
+
* literal is readable — which is the whole reason this config is vendored instead of generated.
|
|
374
|
+
*
|
|
375
|
+
* Exact ids win over prefixes regardless of declaration order; only prefixes are order-sensitive.
|
|
376
|
+
*/
|
|
377
|
+
function renderCdnModuleTable() {
|
|
378
|
+
const entries = publishExternalEntries()
|
|
379
|
+
.map(([key, url]) => ` [${JSON.stringify(key)}, ${JSON.stringify(url)}],`)
|
|
380
|
+
.join('\n');
|
|
381
|
+
return `// The third-party packages this bundle deliberately does NOT contain. The browser fetches them
|
|
382
|
+
// at runtime from the same CDN, at the same pinned versions, that index.html's import map names —
|
|
383
|
+
// this table is generated from that one source, so the two cannot come to disagree.
|
|
384
|
+
//
|
|
385
|
+
// Why the emitted imports carry ABSOLUTE URLs instead of bare specifiers for the import map to
|
|
386
|
+
// resolve: a browser without import-map support — iOS Safari before 16.4, and several in-app
|
|
387
|
+
// WebViews — dies on the first bare import with "Module specifier '@dimforge/rapier3d-compat'
|
|
388
|
+
// does not start with '/', './' or '../'", and the game never loads. These are the same URLs the
|
|
389
|
+
// map points at, so nothing else changes.
|
|
390
|
+
//
|
|
391
|
+
// ORDER IS LOAD-BEARING, and it is the OPPOSITE of the rule a browser applies to the import map.
|
|
392
|
+
// A browser takes the LONGEST matching prefix; this table takes the FIRST. So a nested prefix has
|
|
393
|
+
// to be declared ABOVE the prefix it nests inside. 'three/addons/' and 'three/examples/jsm/' sit
|
|
394
|
+
// above 'three/' for that reason: 'three/' would otherwise claim every addon and resolve it
|
|
395
|
+
// against esm.sh's plain build, which inlines its own copy of three.js. That copy shares no module
|
|
396
|
+
// with the webgpu build the engine runs on, so GLTFLoader hands back Meshes from a second Mesh
|
|
397
|
+
// class and the engine's instanceof scans find nothing in the loaded scene. Reordering this table
|
|
398
|
+
// is not cosmetic, and it fails silently.
|
|
399
|
+
const CDN_MODULES = [
|
|
400
|
+
${entries}
|
|
401
|
+
];
|
|
402
|
+
|
|
403
|
+
// The CDN URL an import resolves to, or undefined when it belongs inside this bundle. A key ending
|
|
404
|
+
// in '/' is a prefix and covers everything beneath it; every other key matches exactly. Exact
|
|
405
|
+
// matches are checked first, so an exact key can never be shadowed by a prefix above it.
|
|
406
|
+
//
|
|
407
|
+
// The project's own aliases ('engine/', 'work/', 'core/', ...) are deliberately absent from the
|
|
408
|
+
// table: they are this project's compiled code, they are inlined here, and a published game is one
|
|
409
|
+
// file in object storage with no same-origin siblings to fetch. 'fflate' is absent for a different
|
|
410
|
+
// reason — see engine/gzip.ts, it is the codec fallback for browsers that would struggle to fetch
|
|
411
|
+
// it in the first place.
|
|
412
|
+
function cdnUrl(id) {
|
|
413
|
+
for (const [key, url] of CDN_MODULES) {
|
|
414
|
+
if (!key.endsWith('/') && id === key) return url;
|
|
415
|
+
}
|
|
416
|
+
for (const [key, url] of CDN_MODULES) {
|
|
417
|
+
if (key.endsWith('/') && id.startsWith(key)) return url + id.slice(key.length);
|
|
418
|
+
}
|
|
419
|
+
return undefined;
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
`;
|
|
423
|
+
}
|
|
424
|
+
/**
|
|
425
|
+
* Drops the whole creator/editor command surface out of a published bundle.
|
|
426
|
+
*
|
|
427
|
+
* A published game is player-facing and never runs in creator mode: `GameTemplate` registers the
|
|
428
|
+
* listener only behind `isCreatorMode`, so stubbing the module lets Rollup tree-shake the entire
|
|
429
|
+
* subtree behind it — FBXLoader, GLTFExporter, the voxelizer, the splat collider editors. Mirrors
|
|
430
|
+
* `game/vite.bundle-publish.config.js`, which does this for the web lane.
|
|
431
|
+
*
|
|
432
|
+
* `enforce: 'pre'` is required, not tidy: without it Vite's alias plugin resolves the `engine/`
|
|
433
|
+
* prefix to a real file first and the stub never fires.
|
|
434
|
+
*/
|
|
435
|
+
function renderCreatorHandlerStub() {
|
|
436
|
+
return `// Published games never run in creator mode, so the creator<->game command surface (and its
|
|
437
|
+
// editor-only dependencies) is dead weight. 'pre' runs before Vite's alias plugin resolves the
|
|
438
|
+
// 'engine/' prefix, which is what lets this stub win.
|
|
439
|
+
const stubCreatorHandlerPlugin = () => ({
|
|
440
|
+
name: 'stub-creator-handler',
|
|
441
|
+
enforce: 'pre',
|
|
442
|
+
resolveId(id) {
|
|
443
|
+
if (id === 'engine/template/CreatorMessageHandler.js' ||
|
|
444
|
+
id.endsWith('/engine/template/CreatorMessageHandler.js')) {
|
|
445
|
+
return '\\0creator-handler-stub';
|
|
446
|
+
}
|
|
447
|
+
return null;
|
|
448
|
+
},
|
|
449
|
+
load(id) {
|
|
450
|
+
if (id === '\\0creator-handler-stub') {
|
|
451
|
+
return 'export function registerCreatorMessageListener() {}\\n' +
|
|
452
|
+
'export function notifyPhysicsReady() {}\\n' +
|
|
453
|
+
'export function flushPendingToolMessages() {}\\n';
|
|
454
|
+
}
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
`;
|
|
459
|
+
}
|
|
460
|
+
/** Rollup's `external` predicate, indented to sit inside the generated `rollupOptions` block. */
|
|
461
|
+
const PUBLISH_CONFIG_EXTERNAL_BLOCK = ` // Anything the CDN table resolves stays OUT of the bundle. Every other id — the 'engine/',
|
|
462
|
+
// 'core/', 'work/' aliases above included — is bundled, which is what a single published
|
|
463
|
+
// HTML file with no same-origin siblings requires.
|
|
464
|
+
external: (id) => cdnUrl(id) !== undefined,`;
|
|
465
|
+
/**
|
|
466
|
+
* The counterpart note in the `--single-file` config, where there is no `external` at all.
|
|
467
|
+
*
|
|
468
|
+
* It also has to say what this config must NOT do. The web lane's standalone config strips the
|
|
469
|
+
* import map out of index.html once nothing is external any more — copying that here would break
|
|
470
|
+
* every `--single-file` publish, because `ENGINE_BUILD_MARKERS` in
|
|
471
|
+
* `@bitmagic/asset-core/publish-source` are two of the map's own entries and api-server's
|
|
472
|
+
* `publish/complete` range-reads the bundle's first 64KB looking for them.
|
|
473
|
+
*/
|
|
474
|
+
const PUBLISH_CONFIG_NO_EXTERNAL_NOTE = ` // No 'external' and no CDN rewriting: three.js, Rapier and the rest are bundled in, which is
|
|
475
|
+
// the entire difference between this config and vite.publish.config.js.
|
|
476
|
+
//
|
|
477
|
+
// The import map in index.html stays even though nothing needs it here. Two of its entries
|
|
478
|
+
// are what api-server reads back out of the uploaded bundle to confirm this is a real engine
|
|
479
|
+
// build; strip the map and every publish of this bundle is refused.`;
|
|
480
|
+
/** Rollup's `output.paths`, indented to sit inside the generated `output` block. */
|
|
481
|
+
const PUBLISH_CONFIG_PATHS_BLOCK = ` // Rewrite each externalized import to its absolute CDN URL, so the published HTML needs no
|
|
482
|
+
// import-map support to load. See the note on CDN_MODULES.
|
|
483
|
+
paths: (id) => cdnUrl(id) ?? id,
|
|
484
|
+
`;
|
|
485
|
+
/**
|
|
486
|
+
* Both production bundle configs, vendored into the project next to `engine/`.
|
|
487
|
+
*
|
|
488
|
+
* Rendered from one function because the two differ in exactly one dimension — whether three.js,
|
|
489
|
+
* Rapier and the other CDN packages are left external or inlined — and everything else about them
|
|
490
|
+
* (aliases, `__BUNDLED__`, the licence banner, the creator-handler stub) has to stay identical.
|
|
491
|
+
* Two hand-maintained copies is how the web lane's pair drifted.
|
|
492
|
+
*
|
|
493
|
+
* Either way the output is ONE index.html: `viteSingleFile` with an effectively unlimited inline
|
|
494
|
+
* limit, so the engine and all JS/CSS land inside it. `bitmagic publish` PUTs a single object and
|
|
495
|
+
* api-server range-reads that object to confirm the meta block, so a multi-file build would not
|
|
496
|
+
* ship at all. Game ASSETS are not inlined in either mode — they already live on the CDN with
|
|
497
|
+
* absolute URLs, and inlining them is what produced multi-hundred-MB bundles and OOM-killed the
|
|
498
|
+
* web publish pod.
|
|
337
499
|
*
|
|
338
500
|
* Vendored rather than generated per-build so a creator can read exactly what ships, and so it
|
|
339
501
|
* versions with the engine it was written for.
|
|
340
502
|
*/
|
|
341
|
-
|
|
503
|
+
function renderPublishConfig(mode) {
|
|
504
|
+
const cdn = mode === 'cdn';
|
|
342
505
|
return `import { defineConfig } from 'vite';
|
|
343
506
|
import { viteSingleFile } from 'vite-plugin-singlefile';
|
|
344
507
|
|
|
@@ -351,6 +514,8 @@ import { viteSingleFile } from 'vite-plugin-singlefile';
|
|
|
351
514
|
// 'dist/engine/engineGameTemplate.js' instead of 'dist/engine/engine/GameTemplate.js' — silently,
|
|
352
515
|
// since Rollup then just treats the unmatched id as an unresolved bare specifier and fails the
|
|
353
516
|
// build. Verified against a real \`vite build\` before trusting the plain-string form.
|
|
517
|
+
|
|
518
|
+
${cdn ? renderCdnModuleTable() : ''}${renderCreatorHandlerStub()}
|
|
354
519
|
export default defineConfig({
|
|
355
520
|
// The engine serves world.json/game.json two different ways, and this flag is how it chooses.
|
|
356
521
|
// \`utils/worldDataLoader.ts\` reads \`typeof __BUNDLED__ !== 'undefined' && __BUNDLED__\`: true
|
|
@@ -372,23 +537,40 @@ ${renderAliasEntries()}
|
|
|
372
537
|
},
|
|
373
538
|
build: {
|
|
374
539
|
// Effectively unlimited: everything the bundle references locally is inlined so the
|
|
375
|
-
// published artifact is a single file.
|
|
540
|
+
// published artifact is a single file. Game assets are absolute CDN URLs and are untouched${cdn ? ',\n // and so are the packages the table above externalizes' : ''}.
|
|
376
541
|
assetsInlineLimit: 100000000,
|
|
377
542
|
cssCodeSplit: false,
|
|
378
543
|
rollupOptions: {
|
|
544
|
+
${cdn ? PUBLISH_CONFIG_EXTERNAL_BLOCK : PUBLISH_CONFIG_NO_EXTERNAL_NOTE}
|
|
379
545
|
output: {
|
|
380
546
|
inlineDynamicImports: true,
|
|
381
|
-
// A licence obligation, not decoration — see engine/LICENSE.md. This bundle contains
|
|
382
|
-
// compiled engine code and third-party libraries whose licences
|
|
383
|
-
// travel with any copy. Removing this banner puts your published
|
|
547
|
+
${cdn ? PUBLISH_CONFIG_PATHS_BLOCK : ''} // A licence obligation, not decoration — see engine/LICENSE.md. This bundle contains
|
|
548
|
+
// compiled engine code${cdn ? '' : ' and the third-party libraries it uses'}, whose licences
|
|
549
|
+
// require their notices to travel with any copy. Removing this banner puts your published
|
|
550
|
+
// game out of compliance.
|
|
384
551
|
banner: ${JSON.stringify(PUBLISHED_BUNDLE_BANNER)},
|
|
385
552
|
},
|
|
386
553
|
},
|
|
387
554
|
},
|
|
388
|
-
plugins: [viteSingleFile()],
|
|
555
|
+
plugins: [stubCreatorHandlerPlugin(), viteSingleFile()],
|
|
389
556
|
});
|
|
390
557
|
`;
|
|
391
558
|
}
|
|
559
|
+
/**
|
|
560
|
+
* The default config: three.js, Rapier and the rest of the import map's packages are left to the
|
|
561
|
+
* CDN, exactly as `game/vite.bundle-publish.config.js` does for every production web publish.
|
|
562
|
+
*/
|
|
563
|
+
export function renderVitePublishConfig() {
|
|
564
|
+
return renderPublishConfig('cdn');
|
|
565
|
+
}
|
|
566
|
+
/**
|
|
567
|
+
* The `--single-file` config: nothing external, so the published HTML plays with no network at all
|
|
568
|
+
* once it has loaded. Bigger by roughly the size of three.js and Rapier, and the reason it exists
|
|
569
|
+
* is offline and packaged distribution (`file://`, Poki, a desktop shell), not everyday publishing.
|
|
570
|
+
*/
|
|
571
|
+
export function renderVitePublishStandaloneConfig() {
|
|
572
|
+
return renderPublishConfig('standalone');
|
|
573
|
+
}
|
|
392
574
|
export function renderGitignore() {
|
|
393
575
|
return ['dist/', 'node_modules/', '.bitmagic/', '.vite-cache/', ''].join('\n');
|
|
394
576
|
}
|
|
@@ -493,8 +675,8 @@ If you are unsure whether one is already running, \`bitmagic reload\` says so an
|
|
|
493
675
|
Bitmagic's IP, licensed to you under the PolyForm Shield License 1.0.0 with an additional
|
|
494
676
|
permission: build, modify, sell and distribute games anywhere you like, including off
|
|
495
677
|
bitmagic.ai and with a modified engine. What you may not do is ship the engine *as an engine*.
|
|
496
|
-
The licence obliges every published bundle to carry a notice, which is why
|
|
497
|
-
\`vite.publish
|
|
678
|
+
The licence obliges every published bundle to carry a notice, which is why both
|
|
679
|
+
\`vite.publish*.config.js\` files have a \`banner\`: leave it alone. \`engine/THIRD-PARTY-NOTICES.md\`
|
|
498
680
|
covers three.js, Rapier and the rest.
|
|
499
681
|
- \`engine/agent-docs/\` — **the engine's documentation, and the fastest thing in this project.**
|
|
500
682
|
\`engine-api/\` is a generated signature digest covering every public engine class, method and
|
|
@@ -802,7 +984,7 @@ If \`bitmagic publish\` exits non-zero, branch on the exit code rather than pars
|
|
|
802
984
|
|
|
803
985
|
| Code | Meaning | Fix |
|
|
804
986
|
|---|---|---|
|
|
805
|
-
| 1 | Build failed, or what was uploaded was not an engine build | Run \`bitmagic check\` to see the error, fix it. If the message
|
|
987
|
+
| 1 | Build failed, or what was uploaded was not an engine build | Run \`bitmagic check\` to see the error, fix it. If the message names a missing \`vite.publish*.config.js\`, this project predates it — run \`bitmagic upgrade\`. Do NOT retry an unchanged bundle; the refusal is deterministic |
|
|
806
988
|
| 2 | Not logged in | \`bitmagic login\` |
|
|
807
989
|
| 3 | Verify missing, stale, or failed | \`bitmagic verify\` (then publish again, or add \`--force\` for a stale/failed record) |
|
|
808
990
|
| 5 | Not this game's owner, or the account/game is banned | Not self-serve — stop and report it |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKjF
|
|
1
|
+
{"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKjF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;IAkBnC,CAAC;AAEL;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,2BAA2B,EAAE,SAAS;IACtC,2BAA2B,EAAE,SAAS;IACtC,kBAAkB,EAAE,QAAQ;IAC5B,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,kCAAkC,EAAE,QAAQ;IAC5C,KAAK,EAAE,SAAS;IAChB,KAAK,EAAE,UAAU;IACjB,4FAA4F;IAC5F,6FAA6F;IAC7F,4CAA4C;CACZ,CAAC;AAEnC,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,aAAa,EAAE,UA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;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa;IAC9C,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3B,OAAO;;EAEP,KAAK;QACH,CAAC,CAAC,8GAA8G;QAChH,CAAC,CAAC,0KAA0K;;;;EAI9K,KAAK,IAAI,iEAAiE;;;;;;;;;;;;;;CAc3E,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;CAwBR,CAAC;AACF,CAAC"}
|
package/dist/scaffold/project.js
CHANGED
|
@@ -2,7 +2,7 @@ import * as fs from 'fs';
|
|
|
2
2
|
import * as path from 'path';
|
|
3
3
|
import { CliError } from '../errors.js';
|
|
4
4
|
import { aliasSourceDir } from './aliases.js';
|
|
5
|
-
import { renderPackageJson, renderTsconfig, renderIndexHtml, renderViteConfig, renderVitePublishConfig, renderGitignore, renderBitmagicJson, renderAgentsMd, renderGameDesignMd, renderClaudeMd, renderJudgeSkill, renderSkillsReadme, renderGenerateSkill, renderPlanningSkill, renderEngineApiSkill, renderUsageSkill, } from './project-files.js';
|
|
5
|
+
import { renderPackageJson, renderTsconfig, renderIndexHtml, renderViteConfig, renderVitePublishConfig, renderVitePublishStandaloneConfig, renderGitignore, renderBitmagicJson, renderAgentsMd, renderGameDesignMd, renderClaudeMd, renderJudgeSkill, renderSkillsReadme, renderGenerateSkill, renderPlanningSkill, renderEngineApiSkill, renderUsageSkill, } from './project-files.js';
|
|
6
6
|
import { hashAgentsMd } from './agents-md.js';
|
|
7
7
|
import { CLAUDE_SETTINGS_FILE, renderClaudeSettings } from './claude-settings.js';
|
|
8
8
|
/**
|
|
@@ -154,6 +154,7 @@ export const PLATFORM_GENERATED_FILES = [
|
|
|
154
154
|
['tsconfig.json', renderTsconfig],
|
|
155
155
|
['vite.config.js', renderViteConfig],
|
|
156
156
|
['vite.publish.config.js', renderVitePublishConfig],
|
|
157
|
+
['vite.publish-standalone.config.js', renderVitePublishStandaloneConfig],
|
|
157
158
|
['index.html', renderIndexHtml],
|
|
158
159
|
['.claude/skills/README.md', renderSkillsReadme],
|
|
159
160
|
['.claude/skills/generating-assets/SKILL.md', renderGenerateSkill],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/scaffold/project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,uBAAuB,EACvB,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,gBAAgB,EAChB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,gBAAgB,GAEjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAelF;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,UAAU,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,aAAa,CAAC,CAAC;AAEhE;;;;;;;;;GASG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,MAAM;CACP,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,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AAQ,CAAC,IAAI,KAAK,EAAE,CAAC;QACrC,gBAAgB,CAAC,SAAS,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9C,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitmagic/cli",
|
|
3
|
-
"version": "0.1.53
|
|
3
|
+
"version": "0.1.53",
|
|
4
4
|
"description": "Build Bitmagic games from your own agent tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Bitmagic Oy",
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
"fflate": "^0.8.2",
|
|
24
24
|
"playwright-core": "^1.59.1",
|
|
25
25
|
"tar": "^7.4.3",
|
|
26
|
-
"@bitmagic/animation-forger": "0.1.8
|
|
27
|
-
"@bitmagic/asset-core": "0.2.8
|
|
28
|
-
"@bitmagic/world-forger": "0.1.13
|
|
26
|
+
"@bitmagic/animation-forger": "0.1.8",
|
|
27
|
+
"@bitmagic/asset-core": "0.2.8",
|
|
28
|
+
"@bitmagic/world-forger": "0.1.13"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@eslint/js": "^9.38.0",
|