@bitmagic/cli 0.1.83-dev.6 → 0.1.83-dev.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/README.md +25 -0
- package/dist/cli.d.ts +5 -0
- package/dist/cli.js +2 -0
- package/dist/cli.js.map +1 -1
- package/dist/commands/build.d.ts +4 -0
- package/dist/commands/build.js +20 -3
- package/dist/commands/build.js.map +1 -1
- package/dist/commands/pages.d.ts +25 -0
- package/dist/commands/pages.js +95 -0
- package/dist/commands/pages.js.map +1 -0
- package/dist/project/context.d.ts +7 -0
- package/dist/project/context.js.map +1 -1
- package/dist/publish/bundle.d.ts +43 -0
- package/dist/publish/bundle.js +135 -29
- package/dist/publish/bundle.js.map +1 -1
- package/dist/scaffold/engine-capabilities.d.ts +4 -0
- package/dist/scaffold/engine-capabilities.js.map +1 -1
- package/dist/scaffold/github-pages.d.ts +83 -0
- package/dist/scaffold/github-pages.js +200 -0
- package/dist/scaffold/github-pages.js.map +1 -0
- package/dist/scaffold/project-files.d.ts +11 -0
- package/dist/scaffold/project-files.js +13 -6
- package/dist/scaffold/project-files.js.map +1 -1
- package/dist/scaffold/skill-files.js +18 -1
- package/dist/scaffold/skill-files.js.map +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -199,6 +199,7 @@ browser reloads itself on every change and the assets panel shows each generatio
|
|
|
199
199
|
| `bitmagic reload [--port <port>]` | Tell a running `bitmagic dev` to reload the browser now. For agents: run it when you finish a round of edits. Exits 0 and does nothing when no dev server is running. Reaches only this project's own server — never another project's, whatever port that happens to be on. |
|
|
200
200
|
| `bitmagic verify [--timeout <ms>] [--renderer webgpu\|webgl] [--platform desktop\|mobile\|both] [--fast] [--watch]` | Build, boot the game in a headless browser, start the game the way a player would, and report what broke. That means clicking through whatever the pre-play screen asks for — a level chooser or any other `hud.startScreen.selections` step is answered with its first option, the same default the engine takes when a flow skips it — and then pressing the Play button. A game without the button passes as long as gameplay starts by itself (auto-starting genres, custom start UIs); a run where gameplay never starts fails. The settle is adaptive: the run ends as soon as the live engine proves stable gameplay (state, rendered frames, no fresh errors, player standing), with `--timeout` as the cap. The verdict includes live engine state — actual GPU backend, fps, player position, physics body count, gameplay events (see **Gameplay events** below) — recorded in `result.json`. `--renderer` pins the pipeline (default `webgpu`, what players run; a silent WebGPU→WebGL2 fallback **fails** the run, and `--renderer webgl` is the deliberate escape hatch). A run failing on a lost WebGL context retries once on software rendering automatically. `--fast` skips the screenshot pipeline (then there is no thumbnail candidate from this run). `--watch` keeps everything warm — incremental `tsc --watch`, one vite, one browser — and re-verifies on file change in seconds; `--fast` is the watch default (`--no-fast` restores the screenshot). `--platform` picks what the run emulates — see **Verifying the mobile path** below. Only one verify drives a browser at a time on a machine: a second one, from any project, waits its turn and says whom it is waiting for (see **One verify at a time** below). Every run also reports the engine's mobile-parity check: a desktop action with no touch button is a warning, and a **failure** when `game.json` declares `primaryPlatform: "mobile"`. Writes the artifacts the publish gate reads (see below). |
|
|
201
201
|
| `bitmagic build [--single-file]` | Bundle the game into a single `.bitmagic/build/index.html`. The engine, your game and its data are inlined; three.js, Rapier and the other third-party packages load from a CDN at the versions your import map pins — the same shape a game published from bitmagic.ai has. `--single-file` inlines those too, for a game that has to run with no network (offline, `file://`, a packaged shell); the file is several megabytes bigger. Rarely needs to be run by hand — `publish` builds automatically when the project changed. |
|
|
202
|
+
| `bitmagic pages init [--force]` / `bitmagic build --pages` | Deploy the game to GitHub Pages as a static page. `pages init` writes `.github/workflows/bitmagic-pages.yml`, which runs `bitmagic build --pages` on every push to the default branch and deploys `.bitmagic/pages/`. See [GitHub Pages](#github-pages). |
|
|
202
203
|
| `bitmagic publish [--visibility public\|coming-soon\|private] [--name <name>] [--description <desc>] [--force] [--single-file] [--version-url] [--no-qr]` | Verify-gate, build if needed, and upload straight to GCS. `--single-file` publishes the offline bundle described under `bitmagic build`; switching the flag between runs always rebuilds, since it changes nothing on disk for the reuse check to notice. **Keeps the game's current visibility**; a new game is private until published with `--visibility public`. Prints the link worth sharing: `bitmagic.ai/play/<ID>/` — the game's page, with its name, cover and comments — for a public or coming-soon game, and `bitmagic.ai/games/<ID>/` for a private one. Both always serve the newest publish, so a link handed out today keeps working after tomorrow's publish; `--version-url` also prints the URL of this one build (`.../indexN.html`), for pinning a bug report to it. Shows the shared URL as a QR code so you can scan it onto a phone — drawn in the terminal, or written to `.bitmagic/publish-qr.png` when it cannot be. `--no-qr` skips both. |
|
|
203
204
|
| `bitmagic self-update [--tag latest\|dev]` | Update the **CLI itself** to the newest build of its line, installing into the place this CLI actually lives rather than wherever the `npm` on your `PATH` would put it — which under nvm is routinely somewhere else. Reads the project's line from `bitmagic.json` when there is one, so it also fixes a wrong-line install; `--tag` overrides. Verifies the version on disk moved, and refuses (naming the path) for an `npx` run, a source checkout, or an install shape it cannot recognise. Not to be confused with `upgrade`, which is about the project's engine. |
|
|
204
205
|
| `bitmagic upgrade [--engine <version>] [--force] [--no-codemod] [--migrate-game]` | Refresh vendored platform files and the CLI's own skills to the currently published engine, and rewrite `src/` imports of engine modules that moved to their new paths (`--no-codemod` skips that). `--migrate-game` also turns an old `src/work/Game.ts` into a `VoxelGameBase` subclass when it can prove the result equivalent. Refuses a dirty git tree unless `--force`. Also records the project's `environment` in `bitmagic.json` if it has none yet — the engine it just vendored came from that api-server — and says so when it does. |
|
|
@@ -1695,6 +1696,30 @@ from, so `bitmagic verify` must have produced at least one screenshot — `scree
|
|
|
1695
1696
|
stick — and note that writing them into `game.json` yourself would change the fingerprint and
|
|
1696
1697
|
invalidate the verify you just checked.
|
|
1697
1698
|
|
|
1699
|
+
### GitHub Pages
|
|
1700
|
+
|
|
1701
|
+
```sh
|
|
1702
|
+
bitmagic pages init # writes .github/workflows/bitmagic-pages.yml — commit it
|
|
1703
|
+
bitmagic build --pages # what the workflow runs: .bitmagic/pages/index.html
|
|
1704
|
+
```
|
|
1705
|
+
|
|
1706
|
+
Then, once, on GitHub: **Settings → Pages → Build and deployment → Source: GitHub Actions**. Every
|
|
1707
|
+
push to the default branch builds and deploys the game; the Actions tab can also run it by hand.
|
|
1708
|
+
The workflow pins the CLI version that wrote it, installs with your lockfile's package manager, and
|
|
1709
|
+
checks out Git LFS files. Run `bitmagic pages init` again after a CLI update to move the pin
|
|
1710
|
+
(`--force` replaces a workflow you edited).
|
|
1711
|
+
|
|
1712
|
+
The page is **static**: no Bitmagic sign-in, cloud saves, leaderboards, multiplayer or runtime AI,
|
|
1713
|
+
so a `github.io` page never calls Bitmagic's servers. The engine's own files (characters,
|
|
1714
|
+
animations) still load from the Bitmagic CDN; `"pagesHosting"` in `bitmagic.json` chooses that:
|
|
1715
|
+
`"bitmagic-cdn"` (the default), `"github-pages"` (the open engine's own asset site — useful only once
|
|
1716
|
+
that site exists), or the root URL of your own copy. It needs an engine that has the static page;
|
|
1717
|
+
an older one is refused with a pointer to `bitmagic upgrade`.
|
|
1718
|
+
|
|
1719
|
+
GitHub Pages allows 1 GB per site and has a soft bandwidth limit of 100 GB a month, and it is not
|
|
1720
|
+
meant to run a commercial business: a game run mainly as one fits `bitmagic publish` or another host
|
|
1721
|
+
better.
|
|
1722
|
+
|
|
1698
1723
|
### Poki export
|
|
1699
1724
|
|
|
1700
1725
|
```sh
|
package/dist/cli.d.ts
CHANGED
|
@@ -381,6 +381,10 @@ declare const rawCommands: {
|
|
|
381
381
|
readonly type: "boolean";
|
|
382
382
|
readonly description: string;
|
|
383
383
|
};
|
|
384
|
+
readonly pages: {
|
|
385
|
+
readonly type: "boolean";
|
|
386
|
+
readonly description: string;
|
|
387
|
+
};
|
|
384
388
|
}>;
|
|
385
389
|
generate: CommandDef<ArgsDef>;
|
|
386
390
|
character: CommandDef<ArgsDef>;
|
|
@@ -567,6 +571,7 @@ declare const rawCommands: {
|
|
|
567
571
|
readonly description: "Print the result as JSON on stdout; all progress goes to stderr.";
|
|
568
572
|
};
|
|
569
573
|
}>;
|
|
574
|
+
pages: CommandDef<ArgsDef>;
|
|
570
575
|
ios: CommandDef<ArgsDef>;
|
|
571
576
|
steam: CommandDef<ArgsDef>;
|
|
572
577
|
tools: CommandDef<ArgsDef>;
|
package/dist/cli.js
CHANGED
|
@@ -35,6 +35,7 @@ import { referenceCommand } from './commands/reference.js';
|
|
|
35
35
|
import { judgeCommand } from './commands/judge.js';
|
|
36
36
|
import { forgeCommand } from './commands/forge.js';
|
|
37
37
|
import { publishCommand } from './commands/publish.js';
|
|
38
|
+
import { pagesCommand } from './commands/pages.js';
|
|
38
39
|
import { iosCommand } from './commands/ios.js';
|
|
39
40
|
import { steamCommand } from './commands/steam.js';
|
|
40
41
|
import { toolsCommand } from './commands/tools.js';
|
|
@@ -233,6 +234,7 @@ const rawCommands = {
|
|
|
233
234
|
judge: judgeCommand,
|
|
234
235
|
forge: forgeCommand,
|
|
235
236
|
publish: publishCommand,
|
|
237
|
+
pages: pagesCommand,
|
|
236
238
|
ios: iosCommand,
|
|
237
239
|
steam: steamCommand,
|
|
238
240
|
tools: toolsCommand,
|
package/dist/cli.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,YAAY,EAA0B,MAAM,gCAAgC,CAAC;AACtF,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAsB,MAAM,uBAAuB,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,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,IAAI,CAAC;QAE9B,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAW,CAAC;QACxC,MAAM,KAAK,GAAG,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;QACzC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC9B,OAAO,CACL,oBAAoB,IAAI,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,MAAM,IAAI,CAAC,CAAC,CAAC,EAAE,IAAI;gBAC3E,cAAc,aAAa,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;gBACjD,qBAAqB,MAAM,IAAI,IAAI,2CAA2C;gBAC9E,4DAA4D,CAC7D,CAAC;QACJ,CAAC;QAED,OAAO,GAAG,KAAK,CAAC;QAChB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAChB,SAAS,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;AACH,CAAC"}
|
package/dist/commands/build.d.ts
CHANGED
package/dist/commands/build.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { defineCommand } from 'citty';
|
|
2
2
|
import { loadProjectContext } from '../project/context.js';
|
|
3
|
-
import { buildBundlePaths, runBuild } from '../publish/bundle.js';
|
|
3
|
+
import { buildBundlePaths, runBuild, runPagesBuild } from '../publish/bundle.js';
|
|
4
4
|
import { createOutput } from '../output.js';
|
|
5
5
|
import { ORIGINAL_PROMPT_FLAG } from '../telemetry/creator-prompt.js';
|
|
6
6
|
export const buildCommand = defineCommand({
|
|
7
7
|
meta: {
|
|
8
8
|
name: 'build',
|
|
9
|
-
description: 'Bundle the game for publishing into .bitmagic/build/index.html.',
|
|
9
|
+
description: 'Bundle the game for publishing into .bitmagic/build/index.html (with --pages, .bitmagic/pages/).',
|
|
10
10
|
},
|
|
11
11
|
args: {
|
|
12
12
|
'original-prompt': ORIGINAL_PROMPT_FLAG,
|
|
@@ -19,12 +19,29 @@ export const buildCommand = defineCommand({
|
|
|
19
19
|
description: 'Inline three.js, Rapier and the other CDN packages into the bundle, so it runs with no '
|
|
20
20
|
+ 'network. Bigger; for offline or packaged distribution, not everyday publishing.',
|
|
21
21
|
},
|
|
22
|
+
pages: {
|
|
23
|
+
type: 'boolean',
|
|
24
|
+
description: 'Build the static GitHub Pages page into .bitmagic/pages/index.html instead: no Bitmagic '
|
|
25
|
+
+ 'services, the engine\'s files from the Bitmagic CDN (`pagesHosting` in bitmagic.json). '
|
|
26
|
+
+ 'What the workflow `bitmagic pages init` writes runs.',
|
|
27
|
+
},
|
|
22
28
|
},
|
|
23
29
|
async run({ args }) {
|
|
24
30
|
const output = createOutput(args.json === true);
|
|
25
31
|
const context = loadProjectContext();
|
|
26
|
-
output.info('Building…');
|
|
27
32
|
const singleFile = args['single-file'] === true;
|
|
33
|
+
if (args.pages === true) {
|
|
34
|
+
output.info('Building the GitHub Pages page…');
|
|
35
|
+
const page = runPagesBuild(context.root, {
|
|
36
|
+
singleFile,
|
|
37
|
+
stderr: args.json === true,
|
|
38
|
+
pagesHosting: context.metadata.pagesHosting,
|
|
39
|
+
});
|
|
40
|
+
output.info(`Page ready: .bitmagic/pages/index.html (${page.bytes} bytes)`);
|
|
41
|
+
output.result({ ok: true, pagesPath: page.htmlPath, ...page });
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
output.info('Building…');
|
|
28
45
|
const manifest = runBuild(context.root, context.metadata.engineVersion, { singleFile });
|
|
29
46
|
const { htmlPath, manifestPath } = buildBundlePaths(context.root);
|
|
30
47
|
output.info(`Bundle ready: .bitmagic/build/index.html (${manifest.bytes} bytes)`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build.js","sourceRoot":"","sources":["../../src/commands/build.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,a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ACxB,MAAM,CAAC,IAAI,CAAC,iCAAiC,CAAC,CAAC;YAC/C,MAAM,IAAI,GAAG,aAAa,CAAC,OAAO,CAAC,IAAI,EAAE;gBACvC,UAAU;gBACV,MAAM,EAAE,IAAI,CAAC,IAAI,KAAK,IAAI;gBAC1B,YAAY,EAAE,OAAO,CAAC,QAAQ,CAAC,YAAY;aAC5C,CAAC,CAAC;YACH,MAAM,CAAC,IAAI,CAAC,2CAA2C,IAAI,CAAC,KAAK,SAAS,CAAC,CAAC;YAC5E,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,CAAC,QAAQ,EAAE,GAAG,IAAI,EAAE,CAAC,CAAC;YAC/D,OAAO;QACT,CAAC;QACD,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QACzB,MAAM,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,aAAa,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;QACxF,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAClE,MAAM,CAAC,IAAI,CAAC,6CAA6C,QAAQ,CAAC,KAAK,SAAS,CAAC,CAAC;QAClF,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,QAAQ,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF,CAAC,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface PagesInitResult {
|
|
2
|
+
workflowPath: string;
|
|
3
|
+
/** `written` for a new or changed file, `unchanged` when the file already matched. */
|
|
4
|
+
status: 'written' | 'unchanged';
|
|
5
|
+
cliVersion: string;
|
|
6
|
+
packageManager: string;
|
|
7
|
+
/** The branch whose pushes deploy. */
|
|
8
|
+
branch: string;
|
|
9
|
+
notes: string[];
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Writes `.github/workflows/bitmagic-pages.yml` into the project at `root`.
|
|
13
|
+
*
|
|
14
|
+
* Refuses, before writing anything, an engine with no static page (the workflow would fail on its
|
|
15
|
+
* first push) and an unreadable `pagesHosting` (it would fail the same way). A workflow file that
|
|
16
|
+
* differs from what this CLI renders is the creator's, or an older CLI's: it is replaced only with
|
|
17
|
+
* `force`, since the creator may have edited it.
|
|
18
|
+
*/
|
|
19
|
+
export declare function initPagesWorkflow(root: string, options: {
|
|
20
|
+
cliVersion: string;
|
|
21
|
+
branch?: string;
|
|
22
|
+
force?: boolean;
|
|
23
|
+
pagesHosting?: unknown;
|
|
24
|
+
}): PagesInitResult;
|
|
25
|
+
export declare const pagesCommand: import("citty").CommandDef<import("citty").ArgsDef>;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as fs from 'fs';
|
|
2
|
+
import * as path from 'path';
|
|
3
|
+
import { defineCommand } from 'citty';
|
|
4
|
+
import { CliError } from '../errors.js';
|
|
5
|
+
import { createOutput } from '../output.js';
|
|
6
|
+
import { loadProjectContext } from '../project/context.js';
|
|
7
|
+
import { detectPackageManager } from '../project/package-manager.js';
|
|
8
|
+
import { readEngineCapabilities } from '../scaffold/engine-capabilities.js';
|
|
9
|
+
import { PAGES_WORKFLOW_PATH, detectDefaultBranch, pagesAssetHostMeta, pagesSetupNotes, renderGithubPagesWorkflow, requireStaticPageEngine, } from '../scaffold/github-pages.js';
|
|
10
|
+
import { ORIGINAL_PROMPT_FLAG } from '../telemetry/creator-prompt.js';
|
|
11
|
+
import { currentCliVersion } from '../update/cli-version.js';
|
|
12
|
+
/**
|
|
13
|
+
* Writes `.github/workflows/bitmagic-pages.yml` into the project at `root`.
|
|
14
|
+
*
|
|
15
|
+
* Refuses, before writing anything, an engine with no static page (the workflow would fail on its
|
|
16
|
+
* first push) and an unreadable `pagesHosting` (it would fail the same way). A workflow file that
|
|
17
|
+
* differs from what this CLI renders is the creator's, or an older CLI's: it is replaced only with
|
|
18
|
+
* `force`, since the creator may have edited it.
|
|
19
|
+
*/
|
|
20
|
+
export function initPagesWorkflow(root, options) {
|
|
21
|
+
requireStaticPageEngine(readEngineCapabilities(path.join(root, 'engine')));
|
|
22
|
+
pagesAssetHostMeta(options.pagesHosting);
|
|
23
|
+
const packageManager = detectPackageManager(root);
|
|
24
|
+
const branch = options.branch ?? detectDefaultBranch(root);
|
|
25
|
+
const rendered = renderGithubPagesWorkflow({ cliVersion: options.cliVersion, packageManager, branch });
|
|
26
|
+
const file = path.join(root, PAGES_WORKFLOW_PATH);
|
|
27
|
+
let existing = null;
|
|
28
|
+
try {
|
|
29
|
+
existing = fs.readFileSync(file, 'utf-8');
|
|
30
|
+
}
|
|
31
|
+
catch {
|
|
32
|
+
existing = null;
|
|
33
|
+
}
|
|
34
|
+
let status = 'written';
|
|
35
|
+
if (existing === rendered) {
|
|
36
|
+
status = 'unchanged';
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (existing !== null && options.force !== true) {
|
|
40
|
+
throw new CliError(`${PAGES_WORKFLOW_PATH} already exists and differs from what this CLI writes `
|
|
41
|
+
+ '(edited by hand, or written by another CLI version). Run `bitmagic pages init --force` '
|
|
42
|
+
+ 'to replace it.', 1);
|
|
43
|
+
}
|
|
44
|
+
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
45
|
+
fs.writeFileSync(file, rendered);
|
|
46
|
+
}
|
|
47
|
+
return { workflowPath: file, status, cliVersion: options.cliVersion, packageManager, branch, notes: pagesSetupNotes() };
|
|
48
|
+
}
|
|
49
|
+
const initCommand = defineCommand({
|
|
50
|
+
meta: {
|
|
51
|
+
name: 'init',
|
|
52
|
+
description: `Write ${PAGES_WORKFLOW_PATH}, a GitHub Actions workflow that builds this game and deploys it to GitHub Pages.`,
|
|
53
|
+
},
|
|
54
|
+
args: {
|
|
55
|
+
'original-prompt': ORIGINAL_PROMPT_FLAG,
|
|
56
|
+
json: {
|
|
57
|
+
type: 'boolean',
|
|
58
|
+
description: 'Print the result as JSON on stdout; all progress goes to stderr.',
|
|
59
|
+
},
|
|
60
|
+
branch: {
|
|
61
|
+
type: 'string',
|
|
62
|
+
description: 'The branch whose pushes deploy. Default: the repository\'s default branch (origin/HEAD, else the current branch, else main).',
|
|
63
|
+
},
|
|
64
|
+
force: {
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
description: 'Replace an existing workflow file that differs from what this CLI writes.',
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
async run({ args }) {
|
|
70
|
+
const output = createOutput(args.json === true);
|
|
71
|
+
const context = loadProjectContext();
|
|
72
|
+
const result = initPagesWorkflow(context.root, {
|
|
73
|
+
cliVersion: currentCliVersion(),
|
|
74
|
+
...(typeof args.branch === 'string' && args.branch.length > 0 ? { branch: args.branch } : {}),
|
|
75
|
+
force: args.force === true,
|
|
76
|
+
pagesHosting: context.metadata.pagesHosting,
|
|
77
|
+
});
|
|
78
|
+
output.info(result.status === 'unchanged'
|
|
79
|
+
? `${PAGES_WORKFLOW_PATH} is already up to date (deploys ${result.branch} with bitmagic ${result.cliVersion}, ${result.packageManager}).`
|
|
80
|
+
: `Wrote ${PAGES_WORKFLOW_PATH} (deploys ${result.branch} with bitmagic ${result.cliVersion}, ${result.packageManager}). Commit it.`);
|
|
81
|
+
for (const note of result.notes)
|
|
82
|
+
output.info(`\n${note}`);
|
|
83
|
+
output.result({ ok: true, ...result });
|
|
84
|
+
},
|
|
85
|
+
});
|
|
86
|
+
export const pagesCommand = defineCommand({
|
|
87
|
+
meta: {
|
|
88
|
+
name: 'pages',
|
|
89
|
+
description: 'Deploy this game to GitHub Pages as a static page (no Bitmagic services).',
|
|
90
|
+
},
|
|
91
|
+
subCommands: {
|
|
92
|
+
init: initCommand,
|
|
93
|
+
},
|
|
94
|
+
});
|
|
95
|
+
//# sourceMappingURL=pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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IAAI,EAAE,OAAO;QACb,WAAW,EAAE,2EAA2E;KACzF;IACD,WAAW,EAAE;QACX,IAAI,EAAE,WAAW;KAClB;CACF,CAAC,CAAC"}
|
|
@@ -30,6 +30,13 @@ export interface ProjectMetadata {
|
|
|
30
30
|
* `readRecordedAgents` does the narrowing, and reports what it dropped.
|
|
31
31
|
*/
|
|
32
32
|
agents?: string[];
|
|
33
|
+
/**
|
|
34
|
+
* Where a GitHub Pages build (`bitmagic build --pages`) loads the engine's own files from:
|
|
35
|
+
* `"bitmagic-cdn"` (the default when absent), `"github-pages"` (the open engine's asset site,
|
|
36
|
+
* useful only once that site exists), or a root URL of a self-hosted copy. Typed `unknown`
|
|
37
|
+
* because this file is hand-editable; `pagesAssetHostMeta` in scaffold/github-pages.ts parses it.
|
|
38
|
+
*/
|
|
39
|
+
pagesHosting?: unknown;
|
|
33
40
|
}
|
|
34
41
|
export interface ProjectContext {
|
|
35
42
|
root: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/project/context.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,gGAAgG;AAChG,4CAA4C;AAC5C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/project/context.ts"],"names":[],"mappings":"AAAA,kGAAkG;AAClG,gGAAgG;AAChG,4CAA4C;AAC5C,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM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D;IAC3D,MAAM,UAAU,GAAG,QAAQ,KAAK,OAAO;QACrC,CAAC,CAAC,CAAC,GAAG,IAAI,MAAM,EAAE,GAAG,IAAI,MAAM,EAAE,IAAI,CAAC;QACtC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACX,MAAM,MAAM,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IAClG,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;QACzB,uFAAuF;QACvF,iFAAiF;QACjF,mFAAmF;QACnF,MAAM,IAAI,QAAQ,CAChB,iBAAiB,IAAI,qCAAqC;cACtD,SAAS,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC,SAAS,IAAI,SAAS,CACjF,CAAC;IACJ,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
package/dist/publish/bundle.d.ts
CHANGED
|
@@ -90,3 +90,46 @@ options?: {
|
|
|
90
90
|
singleFile?: boolean;
|
|
91
91
|
stderr?: boolean;
|
|
92
92
|
}): BuildManifest;
|
|
93
|
+
/** Where `bitmagic build --pages` puts its page, and the scratch directory it builds it from. */
|
|
94
|
+
export declare function pagesBundlePaths(root: string): {
|
|
95
|
+
dir: string;
|
|
96
|
+
htmlPath: string;
|
|
97
|
+
sourceDir: string;
|
|
98
|
+
};
|
|
99
|
+
/** What `bitmagic build --pages` made. Not recorded anywhere: nothing reuses a Pages build. */
|
|
100
|
+
export interface PagesBuildResult {
|
|
101
|
+
htmlPath: string;
|
|
102
|
+
/** Whether three.js, Rapier and the other CDN packages are inlined (`--single-file`). */
|
|
103
|
+
singleFile: boolean;
|
|
104
|
+
/** The `bm:asset-host` meta the page carries, or null: the Bitmagic CDN through the platform. */
|
|
105
|
+
assetHost: string | null;
|
|
106
|
+
bytes: number;
|
|
107
|
+
sha256: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* The Vite config a Pages build runs: the project's own vendored publish config, with the static
|
|
111
|
+
* page as its input instead of the project's `index.html`. Everything else (aliases, the CDN
|
|
112
|
+
* table, `__BUNDLED__`, the Rapier stub, the licence banner, single-file output) is the vendored
|
|
113
|
+
* config's, so a Pages page ships exactly what a publish ships around a different entry module.
|
|
114
|
+
*
|
|
115
|
+
* Generated next to the page for each build rather than vendored, so the vendored configs stay
|
|
116
|
+
* byte-identical in every project and a project on an older scaffold needs no upgrade for it. Vite
|
|
117
|
+
* bundles a config's relative imports, which is how this file reaches the vendored one.
|
|
118
|
+
*/
|
|
119
|
+
export declare function renderPagesViteConfig(baseConfigFile: string, inputHtml: string): string;
|
|
120
|
+
/**
|
|
121
|
+
* `bitmagic build --pages`: compile and bundle the project into `.bitmagic/pages/index.html`, the
|
|
122
|
+
* STATIC page the GitHub Pages workflow deploys (`scaffold/github-pages.ts`).
|
|
123
|
+
*
|
|
124
|
+
* The page differs from the publish bundle in its entry and its metas only: it boots
|
|
125
|
+
* `bitmagic/boot-static.js` (no platform services, so nothing calls api-server or game-server from
|
|
126
|
+
* a `*.github.io` origin) and declares `bm:platform` `bitmagic-static`, plus `bm:asset-host` for a
|
|
127
|
+
* non-default `pagesHosting`. It never touches `.bitmagic/build/`, whose manifest `publish` reuses.
|
|
128
|
+
*
|
|
129
|
+
* An engine without `staticPage` is refused before the compile, as is an unreadable `pagesHosting`.
|
|
130
|
+
*/
|
|
131
|
+
export declare function runPagesBuild(root: string, options?: {
|
|
132
|
+
singleFile?: boolean;
|
|
133
|
+
stderr?: boolean;
|
|
134
|
+
pagesHosting?: unknown;
|
|
135
|
+
}): PagesBuildResult;
|
package/dist/publish/bundle.js
CHANGED
|
@@ -7,6 +7,9 @@ import { projectBin } from '../project/context.js';
|
|
|
7
7
|
import { spawnBinSync } from '../project/spawn-bin.js';
|
|
8
8
|
import { computeFingerprint } from './fingerprint.js';
|
|
9
9
|
import { describeDevOnlyThreeUses, scanWorkForDevOnlyThree } from '../project/published-three.js';
|
|
10
|
+
import { readEngineCapabilities } from '../scaffold/engine-capabilities.js';
|
|
11
|
+
import { PAGES_OUTPUT_DIR, pagesAssetHostMeta, requireStaticPageEngine, } from '../scaffold/github-pages.js';
|
|
12
|
+
import { renderIndexHtml } from '../scaffold/project-files.js';
|
|
10
13
|
/**
|
|
11
14
|
* The configs the scaffold vendors alongside `engine/`, one per bundle mode.
|
|
12
15
|
*
|
|
@@ -103,38 +106,22 @@ export function isCurrentBundle(root, fingerprint, singleFile) {
|
|
|
103
106
|
return createHash('sha256').update(contents).digest('hex') === manifest.sha256;
|
|
104
107
|
}
|
|
105
108
|
/**
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
* same object to confirm the meta block, so there is nowhere for a second file to go. What the
|
|
110
|
-
* mode changes is what is INSIDE it: by default the engine, the game and its data are inlined
|
|
111
|
-
* while three.js, Rapier and the other CDN packages are fetched at runtime, matching what the
|
|
112
|
-
* Creator publishes; `singleFile` inlines those too, for a game that must run with no network.
|
|
113
|
-
*
|
|
114
|
-
* Exit code 1 on failure, matching the table in the spec: a build failure is the creator's own
|
|
115
|
-
* code, and the compiler's output has already been printed.
|
|
116
|
-
*
|
|
117
|
-
* The pre-flight below runs BEFORE `tsc`, not after: a project scaffolded before the config it
|
|
118
|
-
* needs existed has none for vite to load, and without this check the creator pays a full
|
|
119
|
-
* type-check and then reads a raw vite "config not found" that names no remedy. `bitmagic upgrade`
|
|
120
|
-
* is the remedy — it vendors the file without touching game code — so the error says so. It names
|
|
121
|
-
* the config for the mode actually asked for, since a project can easily have one and not the
|
|
122
|
-
* other: the standalone config was added later than the default one.
|
|
123
|
-
*/
|
|
124
|
-
export function runBuild(root, engineVersion,
|
|
125
|
-
/**
|
|
126
|
-
* `stderr: true` sends the compiler's and bundler's own chatter to stderr instead of inheriting
|
|
127
|
-
* stdout — a `--json` run must keep stdout clean for its single result document.
|
|
109
|
+
* The pre-flight every bundle mode shares. It runs BEFORE `tsc`, not after: a project scaffolded
|
|
110
|
+
* before the config it needs existed has none for vite to load, and without this check the creator
|
|
111
|
+
* pays a full type-check and then reads a raw vite "config not found" that names no remedy.
|
|
128
112
|
*/
|
|
129
|
-
|
|
130
|
-
const singleFile = options.singleFile === true;
|
|
131
|
-
const configFile = publishConfigFor(singleFile);
|
|
113
|
+
function requirePublishConfig(root, configFile) {
|
|
132
114
|
if (!fs.existsSync(path.join(root, configFile))) {
|
|
133
115
|
throw new CliError(`This project has no ${configFile}, which \`bitmagic build\` needs to bundle it. ` +
|
|
134
116
|
'It was added to the scaffold after this project was created — run `bitmagic upgrade` to ' +
|
|
135
117
|
'vendor it (your game code is not touched), then build again.', 1);
|
|
136
118
|
}
|
|
137
|
-
|
|
119
|
+
}
|
|
120
|
+
function buildStdio(options) {
|
|
121
|
+
return options.stderr === true ? ['ignore', 2, 2] : 'inherit';
|
|
122
|
+
}
|
|
123
|
+
/** `tsc`, then the dev-only three.js scan: what has to pass before anything is bundled. */
|
|
124
|
+
function compileForBundle(root, stdio) {
|
|
138
125
|
const tsc = projectBin(root, 'tsc');
|
|
139
126
|
const compile = spawnBinSync(tsc, [], { cwd: root, stdio });
|
|
140
127
|
if (compile.error)
|
|
@@ -146,8 +133,8 @@ options = {}) {
|
|
|
146
133
|
const devOnlyThree = scanWorkForDevOnlyThree(root);
|
|
147
134
|
if (devOnlyThree.length > 0)
|
|
148
135
|
throw new CliError(`Build failed. ${describeDevOnlyThreeUses(devOnlyThree)}`, 1);
|
|
149
|
-
|
|
150
|
-
|
|
136
|
+
}
|
|
137
|
+
function bundleWithVite(root, configFile, outDir, stdio) {
|
|
151
138
|
const vite = projectBin(root, 'vite');
|
|
152
139
|
// Covers `bitmagic build`, `bitmagic publish` and `bitmagic ios` in one
|
|
153
140
|
// place: the vendored configs read BUNDLE_RAPIER_FLAVOR and stub the Rapier
|
|
@@ -155,7 +142,7 @@ options = {}) {
|
|
|
155
142
|
// variable is OWNED here — an inherited value from the caller's shell never
|
|
156
143
|
// overrides the game's own physics mode.
|
|
157
144
|
const bundleEnv = { ...process.env, BUNDLE_RAPIER_FLAVOR: resolveRapierFlavor(root) };
|
|
158
|
-
const bundle = spawnBinSync(vite, ['build', '--config', configFile, '--outDir',
|
|
145
|
+
const bundle = spawnBinSync(vite, ['build', '--config', configFile, '--outDir', outDir, '--emptyOutDir'], {
|
|
159
146
|
cwd: root,
|
|
160
147
|
stdio,
|
|
161
148
|
env: bundleEnv,
|
|
@@ -164,6 +151,40 @@ options = {}) {
|
|
|
164
151
|
throw new CliError(`Could not run vite: ${bundle.error.message}`, 1);
|
|
165
152
|
if (bundle.status !== 0)
|
|
166
153
|
throw new CliError('Build failed: the bundle did not complete.', 1);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Compile and bundle the project into one HTML file, and record what was built.
|
|
157
|
+
*
|
|
158
|
+
* One file either way — `bitmagic publish` PUTs a single object and api-server range-reads that
|
|
159
|
+
* same object to confirm the meta block, so there is nowhere for a second file to go. What the
|
|
160
|
+
* mode changes is what is INSIDE it: by default the engine, the game and its data are inlined
|
|
161
|
+
* while three.js, Rapier and the other CDN packages are fetched at runtime, matching what the
|
|
162
|
+
* Creator publishes; `singleFile` inlines those too, for a game that must run with no network.
|
|
163
|
+
*
|
|
164
|
+
* Exit code 1 on failure, matching the table in the spec: a build failure is the creator's own
|
|
165
|
+
* code, and the compiler's output has already been printed.
|
|
166
|
+
*
|
|
167
|
+
* The pre-flight below runs BEFORE `tsc`, not after: a project scaffolded before the config it
|
|
168
|
+
* needs existed has none for vite to load, and without this check the creator pays a full
|
|
169
|
+
* type-check and then reads a raw vite "config not found" that names no remedy. `bitmagic upgrade`
|
|
170
|
+
* is the remedy — it vendors the file without touching game code — so the error says so. It names
|
|
171
|
+
* the config for the mode actually asked for, since a project can easily have one and not the
|
|
172
|
+
* other: the standalone config was added later than the default one.
|
|
173
|
+
*/
|
|
174
|
+
export function runBuild(root, engineVersion,
|
|
175
|
+
/**
|
|
176
|
+
* `stderr: true` sends the compiler's and bundler's own chatter to stderr instead of inheriting
|
|
177
|
+
* stdout — a `--json` run must keep stdout clean for its single result document.
|
|
178
|
+
*/
|
|
179
|
+
options = {}) {
|
|
180
|
+
const singleFile = options.singleFile === true;
|
|
181
|
+
const configFile = publishConfigFor(singleFile);
|
|
182
|
+
requirePublishConfig(root, configFile);
|
|
183
|
+
const stdio = buildStdio(options);
|
|
184
|
+
compileForBundle(root, stdio);
|
|
185
|
+
const { dir, htmlPath } = buildBundlePaths(root);
|
|
186
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
187
|
+
bundleWithVite(root, configFile, dir, stdio);
|
|
167
188
|
if (!fs.existsSync(htmlPath)) {
|
|
168
189
|
throw new CliError(`Build produced no ${path.relative(root, htmlPath)}. Check ${configFile}.`, 1);
|
|
169
190
|
}
|
|
@@ -179,4 +200,89 @@ options = {}) {
|
|
|
179
200
|
writeBuildManifest(root, manifest);
|
|
180
201
|
return manifest;
|
|
181
202
|
}
|
|
203
|
+
/** Where `bitmagic build --pages` puts its page, and the scratch directory it builds it from. */
|
|
204
|
+
export function pagesBundlePaths(root) {
|
|
205
|
+
const dir = path.join(root, PAGES_OUTPUT_DIR);
|
|
206
|
+
return { dir, htmlPath: path.join(dir, 'index.html'), sourceDir: path.join(root, '.bitmagic', 'pages-src') };
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* The Vite config a Pages build runs: the project's own vendored publish config, with the static
|
|
210
|
+
* page as its input instead of the project's `index.html`. Everything else (aliases, the CDN
|
|
211
|
+
* table, `__BUNDLED__`, the Rapier stub, the licence banner, single-file output) is the vendored
|
|
212
|
+
* config's, so a Pages page ships exactly what a publish ships around a different entry module.
|
|
213
|
+
*
|
|
214
|
+
* Generated next to the page for each build rather than vendored, so the vendored configs stay
|
|
215
|
+
* byte-identical in every project and a project on an older scaffold needs no upgrade for it. Vite
|
|
216
|
+
* bundles a config's relative imports, which is how this file reaches the vendored one.
|
|
217
|
+
*/
|
|
218
|
+
export function renderPagesViteConfig(baseConfigFile, inputHtml) {
|
|
219
|
+
return `// Generated by \`bitmagic build --pages\` for one build; never edit it, it is rewritten every time.
|
|
220
|
+
// The project's vendored ${baseConfigFile}, with the static GitHub Pages page as the input.
|
|
221
|
+
import base from '../../${baseConfigFile}';
|
|
222
|
+
|
|
223
|
+
export default {
|
|
224
|
+
...base,
|
|
225
|
+
build: {
|
|
226
|
+
...base.build,
|
|
227
|
+
rollupOptions: {
|
|
228
|
+
...base.build.rollupOptions,
|
|
229
|
+
input: ${JSON.stringify(inputHtml)},
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
};
|
|
233
|
+
`;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* `bitmagic build --pages`: compile and bundle the project into `.bitmagic/pages/index.html`, the
|
|
237
|
+
* STATIC page the GitHub Pages workflow deploys (`scaffold/github-pages.ts`).
|
|
238
|
+
*
|
|
239
|
+
* The page differs from the publish bundle in its entry and its metas only: it boots
|
|
240
|
+
* `bitmagic/boot-static.js` (no platform services, so nothing calls api-server or game-server from
|
|
241
|
+
* a `*.github.io` origin) and declares `bm:platform` `bitmagic-static`, plus `bm:asset-host` for a
|
|
242
|
+
* non-default `pagesHosting`. It never touches `.bitmagic/build/`, whose manifest `publish` reuses.
|
|
243
|
+
*
|
|
244
|
+
* An engine without `staticPage` is refused before the compile, as is an unreadable `pagesHosting`.
|
|
245
|
+
*/
|
|
246
|
+
export function runPagesBuild(root, options = {}) {
|
|
247
|
+
const capabilities = readEngineCapabilities(path.join(root, 'engine'));
|
|
248
|
+
requireStaticPageEngine(capabilities);
|
|
249
|
+
const assetHost = pagesAssetHostMeta(options.pagesHosting);
|
|
250
|
+
const singleFile = options.singleFile === true;
|
|
251
|
+
const configFile = publishConfigFor(singleFile);
|
|
252
|
+
requirePublishConfig(root, configFile);
|
|
253
|
+
const stdio = buildStdio(options);
|
|
254
|
+
compileForBundle(root, stdio);
|
|
255
|
+
const { dir, htmlPath, sourceDir } = pagesBundlePaths(root);
|
|
256
|
+
fs.rmSync(sourceDir, { recursive: true, force: true });
|
|
257
|
+
fs.mkdirSync(sourceDir, { recursive: true });
|
|
258
|
+
const inputHtml = path.join(sourceDir, 'index.html');
|
|
259
|
+
fs.writeFileSync(inputHtml, renderIndexHtml({ capabilities, staticPage: { assetHost } }));
|
|
260
|
+
const pagesConfig = path.join(sourceDir, 'vite.pages.config.mjs');
|
|
261
|
+
fs.writeFileSync(pagesConfig, renderPagesViteConfig(configFile, inputHtml));
|
|
262
|
+
try {
|
|
263
|
+
bundleWithVite(root, path.relative(root, pagesConfig), dir, stdio);
|
|
264
|
+
// Vite writes an HTML input under its path relative to the root, so the page lands at
|
|
265
|
+
// <outDir>/.bitmagic/pages-src/index.html; Pages serves the directory's own index.html.
|
|
266
|
+
const emitted = path.join(dir, path.relative(root, inputHtml));
|
|
267
|
+
if (!fs.existsSync(emitted)) {
|
|
268
|
+
throw new CliError(`Build produced no ${path.relative(root, emitted)}. Check ${configFile}.`, 1);
|
|
269
|
+
}
|
|
270
|
+
fs.renameSync(emitted, htmlPath);
|
|
271
|
+
fs.rmSync(path.join(dir, path.relative(root, inputHtml).split(path.sep)[0]), {
|
|
272
|
+
recursive: true,
|
|
273
|
+
force: true,
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
finally {
|
|
277
|
+
fs.rmSync(sourceDir, { recursive: true, force: true });
|
|
278
|
+
}
|
|
279
|
+
const contents = fs.readFileSync(htmlPath);
|
|
280
|
+
return {
|
|
281
|
+
htmlPath,
|
|
282
|
+
singleFile,
|
|
283
|
+
assetHost,
|
|
284
|
+
bytes: contents.byteLength,
|
|
285
|
+
sha256: createHash('sha256').update(contents).digest('hex'),
|
|
286
|
+
};
|
|
287
|
+
}
|
|
182
288
|
//# sourceMappingURL=bundle.js.map
|
|
@@ -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,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAqB,MAAM,wCAAwC,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"bundle.js","sourceRoot":"","sources":["../../src/publish/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,mBAAmB,EAAqB,MAAM,wCAAwC,CAAC;AAChG,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EACL,gBAAgB,EAChB,kBAAkB,EAClB,uBAAuB,GACxB,MAAM,6BAA6B,CAAC;AACrC,OAA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AC;YAC5B,MAAM,IAAI,QAAQ,CAAC,qBAAqB,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,WAAW,UAAU,GAAG,EAAE,CAAC,CAAC,CAAC;QACnG,CAAC;QACD,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACjC,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAW,CAAC,EAAE;YACrF,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC;IACL,CAAC;YAAS,CAAC;QACT,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC3C,OAAO;QACL,QAAQ;QACR,UAAU;QACV,SAAS;QACT,KAAK,EAAE,QAAQ,CAAC,UAAU;QAC1B,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;KAC5D,CAAC;AACJ,CAAC"}
|
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
* URL tables (`loadAnimationAssets`) pass that preset explicitly instead of taking the engine's
|
|
22
22
|
* default, which stops being Bitmagic's. Without it they import the module's `animationAssets`
|
|
23
23
|
* as they always have.
|
|
24
|
+
* - `staticPage`: the engine carries `bitmagic/boot-static.js`, the entry of the static page
|
|
25
|
+
* `bitmagic build --pages` builds for GitHub Pages (no platform services, the engine's files
|
|
26
|
+
* on the Bitmagic CDN). Without it `bitmagic pages init` and `build --pages` refuse with an
|
|
27
|
+
* upgrade hint (`requireStaticPageEngine` in `github-pages.ts`).
|
|
24
28
|
*/
|
|
25
29
|
export interface EngineCapabilities {
|
|
26
30
|
readonly [name: string]: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engine-capabilities.js","sourceRoot":"","sources":["../../src/scaffold/engine-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"engine-capabilities.js","sourceRoot":"","sources":["../../src/scaffold/engine-capabilities.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAkC7B,2FAA2F;AAC3F,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,sBAAsB,CAAC,CAAC;AAEpF,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAuB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE5E;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAAC,SAAiB;IACtD,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,wBAAwB,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAChG,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,sBAAsB,CAAC;IAChC,CAAC;IACD,MAAM,GAAG,GAAG,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,KAAK,IAAI,IAAI,cAAc,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC;IACnH,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,sBAAsB,CAAC;IAC3E,MAAM,YAAY,GAA2B,EAAE,CAAC;IAChD,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAChD,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,GAAG,CAAC;YAAE,YAAY,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IACpG,CAAC;IACD,OAAO,YAAY,CAAC;AACtB,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,mBAAmB,CACjC,YAAgC,EAChC,IAAY,EACZ,OAAO,GAAG,CAAC;IAEX,MAAM,KAAK,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;IACjC,OAAO,KAAK,KAAK,SAAS,IAAI,KAAK,IAAI,OAAO,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { PackageManager } from '../project/package-manager.js';
|
|
2
|
+
import { type EngineCapabilities } from './engine-capabilities.js';
|
|
3
|
+
/**
|
|
4
|
+
* The GitHub Pages target for a standalone project (engine OSS audit W5.6 §2.6, decision H-h):
|
|
5
|
+
* `bitmagic pages init` writes the workflow below, and the workflow runs `bitmagic build --pages`
|
|
6
|
+
* on every push to the default branch and deploys `.bitmagic/pages/` with GitHub's own Pages
|
|
7
|
+
* actions.
|
|
8
|
+
*
|
|
9
|
+
* What `build --pages` makes is a STATIC page: it boots through `bitmagic/boot-static.js`, which
|
|
10
|
+
* registers no platform services, so a `*.github.io` page never calls api-server, game-server or
|
|
11
|
+
* GTM. Only the engine's own files still come from Bitmagic: the Bitmagic CDN, until the open
|
|
12
|
+
* engine's asset site exists (`pagesHosting` in `bitmagic.json` switches that).
|
|
13
|
+
*/
|
|
14
|
+
/** Where `bitmagic pages init` writes the workflow, relative to the project root. */
|
|
15
|
+
export declare const PAGES_WORKFLOW_PATH = ".github/workflows/bitmagic-pages.yml";
|
|
16
|
+
/** The directory `bitmagic build --pages` writes and the workflow uploads, relative to the root. */
|
|
17
|
+
export declare const PAGES_OUTPUT_DIR = ".bitmagic/pages";
|
|
18
|
+
/** The engine capability a vendored engine advertises once it carries `bitmagic/boot-static.ts`. */
|
|
19
|
+
export declare const STATIC_PAGE_CAPABILITY = "staticPage";
|
|
20
|
+
/** The `bm:platform` id the static page declares and `bitmagic/register-static.ts` registers. */
|
|
21
|
+
export declare const BITMAGIC_STATIC_PLATFORM_ID = "bitmagic-static";
|
|
22
|
+
/**
|
|
23
|
+
* Refuses an engine without the static page, before anything is written or built. The page boots
|
|
24
|
+
* `bitmagic/boot-static.js`; on an engine that has none, the build would compile clean and then
|
|
25
|
+
* fail in Vite on an unresolved entry, naming a file the creator never wrote.
|
|
26
|
+
*/
|
|
27
|
+
export declare function requireStaticPageEngine(capabilities: EngineCapabilities): void;
|
|
28
|
+
/** The values `pagesHosting` in `bitmagic.json` takes, besides a root URL. */
|
|
29
|
+
export declare const PAGES_HOSTING_PRESETS: readonly ["bitmagic-cdn", "github-pages"];
|
|
30
|
+
export type PagesHostingPreset = (typeof PAGES_HOSTING_PRESETS)[number];
|
|
31
|
+
/** The default: the engine's files from the Bitmagic CDN, which is where they all are today. */
|
|
32
|
+
export declare const DEFAULT_PAGES_HOSTING: PagesHostingPreset;
|
|
33
|
+
/**
|
|
34
|
+
* The `<meta name="bm:asset-host">` content the static page carries for `bitmagic.json`'s
|
|
35
|
+
* `pagesHosting`, or null for none.
|
|
36
|
+
*
|
|
37
|
+
* - absent, or `"bitmagic-cdn"`: no meta. The static platform registers the Bitmagic CDN preset,
|
|
38
|
+
* and a page with no meta takes the platform's hosting (`resolveHosting` in the engine's
|
|
39
|
+
* `runtime/hosting.ts`).
|
|
40
|
+
* - `"github-pages"`: the meta `github-pages`, the open engine's own asset site. That site does
|
|
41
|
+
* not exist yet, so a page built this way loads no engine assets until it does.
|
|
42
|
+
* - a root URL (`https://…`, `http://…`, or a page-relative `./…`, `../…` or `/…` path): the meta
|
|
43
|
+
* names that root, which the engine reads as a self-hosted copy of the engine's files.
|
|
44
|
+
*
|
|
45
|
+
* Anything else is refused: the engine would read an unknown name as an unregistered provider and
|
|
46
|
+
* silently fall back to the platform's hosting, which is the opposite of what the creator asked.
|
|
47
|
+
*/
|
|
48
|
+
export declare function pagesAssetHostMeta(pagesHosting: unknown): string | null;
|
|
49
|
+
export interface GithubPagesWorkflowOptions {
|
|
50
|
+
/**
|
|
51
|
+
* The CLI version the workflow runs, pinned: the version that scaffolded it. An unpinned `npx`
|
|
52
|
+
* would build with whatever was published last, against an engine this project may not have.
|
|
53
|
+
*/
|
|
54
|
+
cliVersion: string;
|
|
55
|
+
/** The project's package manager, from its lockfile (`detectPackageManager`). */
|
|
56
|
+
packageManager: PackageManager;
|
|
57
|
+
/**
|
|
58
|
+
* The branch whose pushes deploy: the repository's default branch (`detectDefaultBranch`).
|
|
59
|
+
* Named literally, because `$default-branch` only works in GitHub's workflow templates; in a
|
|
60
|
+
* repository's own workflow file it is a branch called `$default-branch`, and nothing deploys.
|
|
61
|
+
*/
|
|
62
|
+
branch: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* `.github/workflows/bitmagic-pages.yml`.
|
|
66
|
+
*
|
|
67
|
+
* Action majors follow this repository's own workflows (`actions/checkout@v6`,
|
|
68
|
+
* `actions/setup-node@v6`, `pnpm/action-setup@v5`); the two Pages actions, which the repository
|
|
69
|
+
* does not otherwise use, are pinned to their current majors. Checkout fetches LFS objects,
|
|
70
|
+
* because a project may keep large models there and the bundle inlines nothing it cannot read.
|
|
71
|
+
*/
|
|
72
|
+
export declare function renderGithubPagesWorkflow(options: GithubPagesWorkflowOptions): string;
|
|
73
|
+
/**
|
|
74
|
+
* What `bitmagic pages init` prints after writing the workflow: the one step only the creator can
|
|
75
|
+
* take, the limits GitHub sets, and the terms note. Lines, so `--json` can carry them as an array.
|
|
76
|
+
*/
|
|
77
|
+
export declare function pagesSetupNotes(): string[];
|
|
78
|
+
/**
|
|
79
|
+
* The repository's default branch, for the workflow's push trigger: the remote's `HEAD` when the
|
|
80
|
+
* clone knows it, else the branch checked out now, else `main` (GitHub's default for a new
|
|
81
|
+
* repository). `bitmagic pages init --branch` overrides it.
|
|
82
|
+
*/
|
|
83
|
+
export declare function detectDefaultBranch(root: string): string;
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { CliError } from '../errors.js';
|
|
2
|
+
import { spawnPathCommandSync } from '../project/spawn-bin.js';
|
|
3
|
+
import { hasEngineCapability } from './engine-capabilities.js';
|
|
4
|
+
/**
|
|
5
|
+
* The GitHub Pages target for a standalone project (engine OSS audit W5.6 §2.6, decision H-h):
|
|
6
|
+
* `bitmagic pages init` writes the workflow below, and the workflow runs `bitmagic build --pages`
|
|
7
|
+
* on every push to the default branch and deploys `.bitmagic/pages/` with GitHub's own Pages
|
|
8
|
+
* actions.
|
|
9
|
+
*
|
|
10
|
+
* What `build --pages` makes is a STATIC page: it boots through `bitmagic/boot-static.js`, which
|
|
11
|
+
* registers no platform services, so a `*.github.io` page never calls api-server, game-server or
|
|
12
|
+
* GTM. Only the engine's own files still come from Bitmagic: the Bitmagic CDN, until the open
|
|
13
|
+
* engine's asset site exists (`pagesHosting` in `bitmagic.json` switches that).
|
|
14
|
+
*/
|
|
15
|
+
/** Where `bitmagic pages init` writes the workflow, relative to the project root. */
|
|
16
|
+
export const PAGES_WORKFLOW_PATH = '.github/workflows/bitmagic-pages.yml';
|
|
17
|
+
/** The directory `bitmagic build --pages` writes and the workflow uploads, relative to the root. */
|
|
18
|
+
export const PAGES_OUTPUT_DIR = '.bitmagic/pages';
|
|
19
|
+
/** The engine capability a vendored engine advertises once it carries `bitmagic/boot-static.ts`. */
|
|
20
|
+
export const STATIC_PAGE_CAPABILITY = 'staticPage';
|
|
21
|
+
/** The `bm:platform` id the static page declares and `bitmagic/register-static.ts` registers. */
|
|
22
|
+
export const BITMAGIC_STATIC_PLATFORM_ID = 'bitmagic-static';
|
|
23
|
+
/**
|
|
24
|
+
* Refuses an engine without the static page, before anything is written or built. The page boots
|
|
25
|
+
* `bitmagic/boot-static.js`; on an engine that has none, the build would compile clean and then
|
|
26
|
+
* fail in Vite on an unresolved entry, naming a file the creator never wrote.
|
|
27
|
+
*/
|
|
28
|
+
export function requireStaticPageEngine(capabilities) {
|
|
29
|
+
if (hasEngineCapability(capabilities, STATIC_PAGE_CAPABILITY))
|
|
30
|
+
return;
|
|
31
|
+
throw new CliError('This project\'s engine predates the GitHub Pages target: it has no static page '
|
|
32
|
+
+ '(`staticPage` in engine/engine/engine-manifest.json). Run `bitmagic upgrade` to update the '
|
|
33
|
+
+ 'engine (your game code is not touched), then try again.', 1);
|
|
34
|
+
}
|
|
35
|
+
/** The values `pagesHosting` in `bitmagic.json` takes, besides a root URL. */
|
|
36
|
+
export const PAGES_HOSTING_PRESETS = ['bitmagic-cdn', 'github-pages'];
|
|
37
|
+
/** The default: the engine's files from the Bitmagic CDN, which is where they all are today. */
|
|
38
|
+
export const DEFAULT_PAGES_HOSTING = 'bitmagic-cdn';
|
|
39
|
+
/**
|
|
40
|
+
* The `<meta name="bm:asset-host">` content the static page carries for `bitmagic.json`'s
|
|
41
|
+
* `pagesHosting`, or null for none.
|
|
42
|
+
*
|
|
43
|
+
* - absent, or `"bitmagic-cdn"`: no meta. The static platform registers the Bitmagic CDN preset,
|
|
44
|
+
* and a page with no meta takes the platform's hosting (`resolveHosting` in the engine's
|
|
45
|
+
* `runtime/hosting.ts`).
|
|
46
|
+
* - `"github-pages"`: the meta `github-pages`, the open engine's own asset site. That site does
|
|
47
|
+
* not exist yet, so a page built this way loads no engine assets until it does.
|
|
48
|
+
* - a root URL (`https://…`, `http://…`, or a page-relative `./…`, `../…` or `/…` path): the meta
|
|
49
|
+
* names that root, which the engine reads as a self-hosted copy of the engine's files.
|
|
50
|
+
*
|
|
51
|
+
* Anything else is refused: the engine would read an unknown name as an unregistered provider and
|
|
52
|
+
* silently fall back to the platform's hosting, which is the opposite of what the creator asked.
|
|
53
|
+
*/
|
|
54
|
+
export function pagesAssetHostMeta(pagesHosting) {
|
|
55
|
+
if (pagesHosting === undefined || pagesHosting === DEFAULT_PAGES_HOSTING)
|
|
56
|
+
return null;
|
|
57
|
+
if (pagesHosting === 'github-pages')
|
|
58
|
+
return 'github-pages';
|
|
59
|
+
if (typeof pagesHosting === 'string' && /^(https?:\/\/[^\s"<>]+|\.{0,2}\/[^\s"<>]*)$/.test(pagesHosting)) {
|
|
60
|
+
return pagesHosting;
|
|
61
|
+
}
|
|
62
|
+
throw new CliError(`bitmagic.json's "pagesHosting" is ${JSON.stringify(pagesHosting)}, which is not one of `
|
|
63
|
+
+ `${PAGES_HOSTING_PRESETS.map((p) => `"${p}"`).join(', ')} or a root URL (https://… or ./…). `
|
|
64
|
+
+ 'Remove the field to keep the default, the Bitmagic CDN.', 1);
|
|
65
|
+
}
|
|
66
|
+
/** A branch name the workflow can carry unquoted in a YAML flow sequence. */
|
|
67
|
+
const PLAIN_BRANCH = /^[A-Za-z0-9][A-Za-z0-9._/-]*$/;
|
|
68
|
+
/**
|
|
69
|
+
* The install steps for the project's lockfile, indented to sit in the build job's `steps:`.
|
|
70
|
+
*
|
|
71
|
+
* pnpm needs its own setup action (a scaffolded package.json has no `packageManager` field, so the
|
|
72
|
+
* major version is named here) and must come before setup-node's cache. The frozen-lockfile
|
|
73
|
+
* installs are deliberate: CI must build what was committed, not re-resolve it.
|
|
74
|
+
*/
|
|
75
|
+
function installSteps(manager) {
|
|
76
|
+
if (manager === 'pnpm') {
|
|
77
|
+
return ` - uses: pnpm/action-setup@v5
|
|
78
|
+
with:
|
|
79
|
+
version: 10
|
|
80
|
+
- uses: actions/setup-node@v6
|
|
81
|
+
with:
|
|
82
|
+
node-version: 24
|
|
83
|
+
cache: pnpm
|
|
84
|
+
- run: pnpm install --frozen-lockfile`;
|
|
85
|
+
}
|
|
86
|
+
if (manager === 'yarn') {
|
|
87
|
+
return ` - uses: actions/setup-node@v6
|
|
88
|
+
with:
|
|
89
|
+
node-version: 24
|
|
90
|
+
cache: yarn
|
|
91
|
+
- run: yarn install --frozen-lockfile`;
|
|
92
|
+
}
|
|
93
|
+
return ` - uses: actions/setup-node@v6
|
|
94
|
+
with:
|
|
95
|
+
node-version: 24
|
|
96
|
+
cache: npm
|
|
97
|
+
- run: npm ci`;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* `.github/workflows/bitmagic-pages.yml`.
|
|
101
|
+
*
|
|
102
|
+
* Action majors follow this repository's own workflows (`actions/checkout@v6`,
|
|
103
|
+
* `actions/setup-node@v6`, `pnpm/action-setup@v5`); the two Pages actions, which the repository
|
|
104
|
+
* does not otherwise use, are pinned to their current majors. Checkout fetches LFS objects,
|
|
105
|
+
* because a project may keep large models there and the bundle inlines nothing it cannot read.
|
|
106
|
+
*/
|
|
107
|
+
export function renderGithubPagesWorkflow(options) {
|
|
108
|
+
if (!/^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/.test(options.cliVersion)) {
|
|
109
|
+
throw new CliError(`Cannot pin the workflow to this CLI's version (${JSON.stringify(options.cliVersion)}). `
|
|
110
|
+
+ 'Reinstall the CLI with `bitmagic self-update` and run `bitmagic pages init` again.', 1);
|
|
111
|
+
}
|
|
112
|
+
if (!PLAIN_BRANCH.test(options.branch)) {
|
|
113
|
+
throw new CliError(`Cannot deploy from the branch ${JSON.stringify(options.branch)}: name a plain branch with --branch.`, 1);
|
|
114
|
+
}
|
|
115
|
+
return `# Builds this Bitmagic game and deploys it to GitHub Pages on every push to ${options.branch}.
|
|
116
|
+
# Written by \`bitmagic pages init\`; run it again to refresh this file.
|
|
117
|
+
#
|
|
118
|
+
# One-time setup: Settings -> Pages -> Build and deployment -> Source: GitHub Actions.
|
|
119
|
+
#
|
|
120
|
+
# The page is static: no Bitmagic sign-in, cloud saves, leaderboards, multiplayer or runtime AI.
|
|
121
|
+
# The engine's own files load from the Bitmagic CDN (\`pagesHosting\` in bitmagic.json).
|
|
122
|
+
name: Deploy to GitHub Pages
|
|
123
|
+
|
|
124
|
+
on:
|
|
125
|
+
push:
|
|
126
|
+
branches: [${options.branch}]
|
|
127
|
+
workflow_dispatch:
|
|
128
|
+
|
|
129
|
+
permissions:
|
|
130
|
+
contents: read
|
|
131
|
+
pages: write
|
|
132
|
+
id-token: write
|
|
133
|
+
|
|
134
|
+
concurrency:
|
|
135
|
+
group: pages
|
|
136
|
+
cancel-in-progress: false
|
|
137
|
+
|
|
138
|
+
jobs:
|
|
139
|
+
build:
|
|
140
|
+
runs-on: ubuntu-latest
|
|
141
|
+
steps:
|
|
142
|
+
- uses: actions/checkout@v6
|
|
143
|
+
with:
|
|
144
|
+
lfs: true
|
|
145
|
+
${installSteps(options.packageManager)}
|
|
146
|
+
- run: npx --yes @bitmagic/cli@${options.cliVersion} build --pages
|
|
147
|
+
- uses: actions/upload-pages-artifact@v5
|
|
148
|
+
with:
|
|
149
|
+
path: ${PAGES_OUTPUT_DIR}/
|
|
150
|
+
|
|
151
|
+
deploy:
|
|
152
|
+
needs: build
|
|
153
|
+
runs-on: ubuntu-latest
|
|
154
|
+
environment:
|
|
155
|
+
name: github-pages
|
|
156
|
+
url: \${{ steps.deployment.outputs.page_url }}
|
|
157
|
+
steps:
|
|
158
|
+
- id: deployment
|
|
159
|
+
uses: actions/deploy-pages@v5
|
|
160
|
+
`;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* What `bitmagic pages init` prints after writing the workflow: the one step only the creator can
|
|
164
|
+
* take, the limits GitHub sets, and the terms note. Lines, so `--json` can carry them as an array.
|
|
165
|
+
*/
|
|
166
|
+
export function pagesSetupNotes() {
|
|
167
|
+
return [
|
|
168
|
+
'One manual step: on GitHub, open the repository\'s Settings -> Pages -> Build and deployment, '
|
|
169
|
+
+ 'and set Source to "GitHub Actions". Then push to the default branch (or run the workflow from '
|
|
170
|
+
+ 'the Actions tab) and the game deploys.',
|
|
171
|
+
'The page is static: no Bitmagic sign-in, cloud saves, leaderboards, multiplayer or runtime AI. '
|
|
172
|
+
+ 'The engine\'s own files (characters, animations) load from the Bitmagic CDN.',
|
|
173
|
+
'GitHub Pages limits: 1 GB per site, and a soft bandwidth limit of 100 GB per month.',
|
|
174
|
+
'GitHub Pages is not meant to run a commercial business. A game run mainly as one fits the '
|
|
175
|
+
+ 'Bitmagic CDN (`bitmagic publish`) or another host better. Your game\'s licence terms are in '
|
|
176
|
+
+ 'engine/LICENSE.md.',
|
|
177
|
+
];
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* The repository's default branch, for the workflow's push trigger: the remote's `HEAD` when the
|
|
181
|
+
* clone knows it, else the branch checked out now, else `main` (GitHub's default for a new
|
|
182
|
+
* repository). `bitmagic pages init --branch` overrides it.
|
|
183
|
+
*/
|
|
184
|
+
export function detectDefaultBranch(root) {
|
|
185
|
+
const git = (args) => {
|
|
186
|
+
const result = spawnPathCommandSync('git', ['-C', root, ...args], { encoding: 'utf-8', stdio: ['ignore', 'pipe', 'ignore'] });
|
|
187
|
+
if (result.error !== undefined || result.status !== 0)
|
|
188
|
+
return null;
|
|
189
|
+
const out = String(result.stdout).trim();
|
|
190
|
+
return out.length > 0 ? out : null;
|
|
191
|
+
};
|
|
192
|
+
const remoteHead = git(['symbolic-ref', '--short', 'refs/remotes/origin/HEAD']);
|
|
193
|
+
if (remoteHead !== null && remoteHead.startsWith('origin/'))
|
|
194
|
+
return remoteHead.slice('origin/'.length);
|
|
195
|
+
const current = git(['symbolic-ref', '--short', 'HEAD']);
|
|
196
|
+
if (current !== null)
|
|
197
|
+
return current;
|
|
198
|
+
return 'main';
|
|
199
|
+
}
|
|
200
|
+
//# sourceMappingURL=github-pages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"github-pages.js","sourceRoot":"","sources":["../../src/scaffold/github-pages.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAA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ory to load.
|
|
64
64
|
*/
|
|
65
65
|
capabilities: EngineCapabilities;
|
|
66
|
+
/**
|
|
67
|
+
* Render the STATIC page `bitmagic build --pages` bundles for GitHub Pages instead of the
|
|
68
|
+
* project's own page: it boots through `bitmagic/boot-static.js` (no platform services, the
|
|
69
|
+
* engine's files on the Bitmagic CDN) and declares `<meta name="bm:platform"
|
|
70
|
+
* content="bitmagic-static">`, plus `<meta name="bm:asset-host">` when `assetHost` is a string
|
|
71
|
+
* (`pagesAssetHostMeta` in `github-pages.ts`). Only for an engine that advertises `staticPage`.
|
|
72
|
+
* Absent, the page is byte for byte the one every project is scaffolded with.
|
|
73
|
+
*/
|
|
74
|
+
staticPage?: {
|
|
75
|
+
assetHost: string | null;
|
|
76
|
+
};
|
|
66
77
|
}
|
|
67
78
|
/** The `bm:platform` value a page carries when it boots through the Bitmagic platform package. */
|
|
68
79
|
export declare const BITMAGIC_PLATFORM_ID = "bitmagic";
|
|
@@ -2,6 +2,7 @@ import { FAVICON_LINK_ID } from '@bitmagic/asset-core/favicon';
|
|
|
2
2
|
import { describeArtStyle } from '@bitmagic/asset-core/art-style';
|
|
3
3
|
import { tsconfigPaths, importMapEntries, viteAliasEntries } from './aliases.js';
|
|
4
4
|
import { hasEngineCapability } from './engine-capabilities.js';
|
|
5
|
+
import { BITMAGIC_STATIC_PLATFORM_ID } from './github-pages.js';
|
|
5
6
|
import { currentPortLane } from '../port-lane.js';
|
|
6
7
|
import { AGENTS_MD_REFERENCE_SECTION, GAME_DESIGN_REFERENCE_HINT, GENERATE_SKILL_REFERENCE_SECTION, PLANNING_SKILL_REFERENCE_STEP1, PLANNING_SKILL_REFERENCE_STEP4, } from './reference-guidance.js';
|
|
7
8
|
import { ALWAYS_AGENTS, PRIMARY_SKILLS_DIR, joinWithAnd, skillDirsFor, } from './agent-targets.js';
|
|
@@ -273,14 +274,20 @@ export function renderIndexHtml(options) {
|
|
|
273
274
|
const imports = { ...CDN_IMPORTS, ...aliasImports };
|
|
274
275
|
// Derived from the same alias model as the import map above, not a hardcoded literal, so the
|
|
275
276
|
// two cannot drift: the entry point is an alias's import-map target plus its filename.
|
|
276
|
-
const
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
const staticPage = options.staticPage;
|
|
278
|
+
const engineEntryPoint = staticPage !== undefined
|
|
279
|
+
? `${aliasImports['bitmagic/']}boot-static.js`
|
|
280
|
+
: platformEntry
|
|
281
|
+
? `${aliasImports['bitmagic/']}boot.js`
|
|
282
|
+
: `${aliasImports['engine/']}GameTemplate.js`;
|
|
279
283
|
// Only on a page that registers the platform: the engine logs an error when a page declares a
|
|
280
284
|
// platform that never registered, so an older engine's page must not carry it.
|
|
281
|
-
const platformMeta =
|
|
282
|
-
? `\n <meta name="bm:platform" content="${
|
|
283
|
-
|
|
285
|
+
const platformMeta = staticPage !== undefined
|
|
286
|
+
? `\n <meta name="bm:platform" content="${BITMAGIC_STATIC_PLATFORM_ID}">`
|
|
287
|
+
+ (staticPage.assetHost === null ? '' : `\n <meta name="bm:asset-host" content="${staticPage.assetHost}">`)
|
|
288
|
+
: platformEntry
|
|
289
|
+
? `\n <meta name="bm:platform" content="${BITMAGIC_PLATFORM_ID}">`
|
|
290
|
+
: '';
|
|
284
291
|
// The #game-container div below is required, not decorative: GameTemplate.ts
|
|
285
292
|
// does document.getElementById('game-container') as HTMLElement, and GameEngine.ts
|
|
286
293
|
// appendChild()s into it. The "as HTMLElement" cast erases the null a missing div would
|
|
@@ -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;AAC/D,OAAO,EAAE,gBAAgB,EAAiB,MAAM,gCAAgC,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAA2B,MAAM,0BAA0B,CAA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;;;;CAwER,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAa,EAAE,QAAmB;IACnE,MAAM,KAAK,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;IAC3B,4FAA4F;IAC5F,iGAAiG;IACjG,MAAM,YAAY,GAAG,QAAQ,KAAK,SAAS;QACzC,CAAC,CAAC;;;gDAG0C;QAC5C,CAAC,CAAC,GAAG,gBAAgB,CAAC,QAAQ,CAAC;8FAC2D,CAAC;IAC7F,OAAO;;EAEP,KAAK;QACH,CAAC,CAAC,8GAA8G;QAChH,CAAC,CAAC,0KAA0K;;;;EAI9K,KAAK,IAAI,iEAAiE;;;;;;;;;;EAU1E,0BAA0B;;;;EAI1B,YAAY;;;;;CAKb,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCR,CAAC;AACF,CAAC"}
|
|
@@ -361,7 +361,7 @@ export function renderTrailerCraftReference() {
|
|
|
361
361
|
export function renderPublishingSkill() {
|
|
362
362
|
return `---
|
|
363
363
|
name: publishing-a-game
|
|
364
|
-
description: Use when publishing this Bitmagic game to bitmagic.ai, making it public, coming soon or private, building the bundle, choosing category tags or a thumbnail, sharing the game's link or QR code, or when \`bitmagic publish\` refuses or exits non-zero (verify stale, not logged in, exit 7 and the rest).
|
|
364
|
+
description: Use when publishing this Bitmagic game to bitmagic.ai, making it public, coming soon or private, building the bundle, choosing category tags or a thumbnail, sharing the game's link or QR code, deploying it to GitHub Pages, or when \`bitmagic publish\` refuses or exits non-zero (verify stale, not logged in, exit 7 and the rest).
|
|
365
365
|
---
|
|
366
366
|
|
|
367
367
|
# Publishing this game
|
|
@@ -495,6 +495,23 @@ Publish prints how many it left out, their total size, and the archive's own siz
|
|
|
495
495
|
When a newer engine exists, \`bitmagic dev\` and \`bitmagic publish\` say so and suggest
|
|
496
496
|
\`bitmagic upgrade\`. Upgrade while you are developing, when rebuilding is cheap, rather than being
|
|
497
497
|
blocked at the moment you ship.
|
|
498
|
+
|
|
499
|
+
## GitHub Pages instead
|
|
500
|
+
|
|
501
|
+
Only when the creator asks to host the game on GitHub Pages:
|
|
502
|
+
|
|
503
|
+
\`\`\`
|
|
504
|
+
bitmagic pages init # writes .github/workflows/bitmagic-pages.yml; commit it
|
|
505
|
+
bitmagic build --pages # what the workflow runs: .bitmagic/pages/index.html
|
|
506
|
+
\`\`\`
|
|
507
|
+
|
|
508
|
+
Tell the creator the one step only they can take: **Settings → Pages → Source: GitHub Actions**
|
|
509
|
+
on the repository. Then every push to the default branch deploys. The page is static — no sign-in,
|
|
510
|
+
cloud saves, leaderboards, multiplayer or runtime AI — so do not offer it for a game that uses them.
|
|
511
|
+
The engine's files still load from the Bitmagic CDN (\`pagesHosting\` in \`bitmagic.json\`). Pages
|
|
512
|
+
allows 1 GB per site and 100 GB of bandwidth a month, and is not meant for a commercial business;
|
|
513
|
+
\`bitmagic publish\` fits such a game better. An engine too old for it is refused: run
|
|
514
|
+
\`bitmagic upgrade\`.
|
|
498
515
|
`;
|
|
499
516
|
}
|
|
500
517
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"skill-files.js","sourceRoot":"","sources":["../../src/scaffold/skill-files.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;;;;;;;;;;;;;;;CAkBR,CAAC;AACF,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAAE,SA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ev.7",
|
|
4
4
|
"description": "Build Bitmagic games from your own agent tool",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"author": "Bitmagic Oy",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"resedit": "3.0.2",
|
|
27
27
|
"tar": "^7.4.3",
|
|
28
28
|
"ws": "^8.21.3",
|
|
29
|
-
"@bitmagic/
|
|
30
|
-
"@bitmagic/
|
|
31
|
-
"@bitmagic/
|
|
29
|
+
"@bitmagic/animation-forger": "0.1.38-dev.7",
|
|
30
|
+
"@bitmagic/world-forger": "0.1.43-dev.7",
|
|
31
|
+
"@bitmagic/asset-core": "0.2.38-dev.7"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@eslint/js": "^9.38.0",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"jest": "^29.7.0",
|
|
46
46
|
"ts-jest": "^29.4.12",
|
|
47
47
|
"typescript": "^6.0.3",
|
|
48
|
-
"@bitmagic/
|
|
49
|
-
"@bitmagic/
|
|
48
|
+
"@bitmagic/hud-theme": "0.1.0",
|
|
49
|
+
"@bitmagic/engine-protocol": "0.1.0"
|
|
50
50
|
},
|
|
51
51
|
"jest": {
|
|
52
52
|
"preset": "ts-jest/presets/default-esm",
|