@bitmagic/cli 0.1.9 → 0.1.11

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 CHANGED
@@ -110,6 +110,7 @@ invalidate the verify you just checked.
110
110
  | 4 | Engine below the publish floor |
111
111
  | 5 | Not the game's owner, or the account/game is banned |
112
112
  | 6 | Upload or finalize failed — usually transient (network/storage), but also covers permanent failures such as an unknown game or a rejected request. Retry once; if it fails identically, stop and report it. |
113
+ | 7 | The game published, but did not render when loaded the way the portal loads it. The game IS live — fix it and publish again rather than retrying the publish. Artifacts in `.bitmagic/smoke/`. |
113
114
 
114
115
  `bitmagic build` alone exits 1 on a build failure and 0 on success.
115
116
 
package/dist/cli.d.ts CHANGED
@@ -121,6 +121,10 @@ declare const rawCommands: {
121
121
  readonly type: "boolean";
122
122
  readonly description: "Publish despite a stale or failed verify. Does NOT bypass a missing verify record.";
123
123
  };
124
+ readonly 'skip-smoke': {
125
+ readonly type: "boolean";
126
+ readonly description: "Skip the post-publish render check. The game still publishes; it is simply not confirmed to render.";
127
+ };
124
128
  }>;
125
129
  };
126
130
  type CommandName = keyof typeof rawCommands;
@@ -1,3 +1,4 @@
1
+ import type { VerifyResult } from '../verify/classify.js';
1
2
  import { type BuildManifest } from '../publish/bundle.js';
2
3
  /** `'public' | 'private'`, defaulting to private — a typo is rejected rather than silently
3
4
  * coerced, matching the server's own asymmetric contract (see cli-publish.ts). */
@@ -13,12 +14,19 @@ export interface PublishRunDeps {
13
14
  /** Injectable so a test can assert reuse-vs-rebuild without a real tsc/vite toolchain. */
14
15
  runBuild: (root: string, engineVersion: string) => BuildManifest;
15
16
  readBuildManifest: (root: string) => BuildManifest | null;
17
+ /** Injectable so a test can assert the smoke check's wiring without launching a browser. */
18
+ runSmokeCheck: (options: {
19
+ publishedUrl: string;
20
+ artifactDir: string;
21
+ }) => Promise<VerifyResult>;
16
22
  }
17
23
  export interface PublishArgs {
18
24
  visibility?: string;
19
25
  name?: string;
20
26
  description?: string;
21
27
  force?: boolean;
28
+ /** Hyphenated to match the flag citty parses; there is no camelCase alias. */
29
+ 'skip-smoke'?: boolean;
22
30
  }
23
31
  /**
24
32
  * The whole command. See the file header for why the order below cannot be reshuffled.
@@ -41,4 +49,8 @@ export declare const publishCommand: import("citty").CommandDef<{
41
49
  readonly type: "boolean";
42
50
  readonly description: "Publish despite a stale or failed verify. Does NOT bypass a missing verify record.";
43
51
  };
52
+ readonly 'skip-smoke': {
53
+ readonly type: "boolean";
54
+ readonly description: "Skip the post-publish render check. The game still publishes; it is simply not confirmed to render.";
55
+ };
44
56
  }>;
@@ -60,6 +60,13 @@ function defaultDeps() {
60
60
  log: (message) => console.log(message),
61
61
  runBuild: runBuildImpl,
62
62
  readBuildManifest: readBuildManifestImpl,
63
+ // Imported lazily: ../smoke/run.js reaches playwright-core, which drags a browser driver into
64
+ // the module graph of every `bitmagic` invocation — and, more sharply, into any jest suite
65
+ // that imports this command. Tests inject their own seam and must never load it.
66
+ runSmokeCheck: async (options) => {
67
+ const { runSmokeCheck } = await import('../smoke/run.js');
68
+ return runSmokeCheck(options);
69
+ },
63
70
  };
64
71
  }
65
72
  /**
@@ -171,6 +178,29 @@ export async function runPublish(args, deps = defaultDeps()) {
171
178
  if (done.visibility === 'private') {
172
179
  deps.log('Not listed. Publish with --visibility public when you are ready.');
173
180
  }
181
+ // Everything below runs AFTER the game is live. `complete` has written the bytes and the row,
182
+ // so nothing here can un-publish anything — this stage only decides what we tell the creator.
183
+ if (args['skip-smoke'] === true) {
184
+ // Said plainly, because "Published" on its own now carries a claim that the game renders.
185
+ // A skip has to visibly retract that claim, or it becomes the same silent green signal that
186
+ // let four defects reach published games.
187
+ deps.log('Smoke check skipped — this game has NOT been confirmed to render.');
188
+ return;
189
+ }
190
+ const smokeDir = path.join(context.root, '.bitmagic', 'smoke');
191
+ deps.log('Checking the published game renders…');
192
+ const smoke = await deps.runSmokeCheck({ publishedUrl: done.url, artifactDir: smokeDir });
193
+ for (const warning of smoke.warnings)
194
+ deps.log(` warning: ${warning}`);
195
+ if (!smoke.ok) {
196
+ // Exit 7, distinct from 1-6: every one of those means the publish did NOT happen. This means
197
+ // the opposite, and an agent that conflates them would retry a publish that already succeeded.
198
+ throw new CliError(`Your game IS published at ${done.url}, but it did not render when loaded the way the ` +
199
+ `portal loads it:\n${smoke.failures.map((f) => ` ✗ ${f}`).join('\n')}\n` +
200
+ `Artifacts: ${smokeDir}\n` +
201
+ 'Fix the game and publish again, or re-check without republishing once it builds.', 7);
202
+ }
203
+ deps.log('Smoke check passed — the published game renders.');
174
204
  }
175
205
  export const publishCommand = defineCommand({
176
206
  meta: {
@@ -194,6 +224,10 @@ export const publishCommand = defineCommand({
194
224
  type: 'boolean',
195
225
  description: 'Publish despite a stale or failed verify. Does NOT bypass a missing verify record.',
196
226
  },
227
+ 'skip-smoke': {
228
+ type: 'boolean',
229
+ description: 'Skip the post-publish render check. The game still publishes; it is simply not confirmed to render.',
230
+ },
197
231
  },
198
232
  async run({ args }) {
199
233
  await runPublish(args);
@@ -1 +1 @@
1
- {"version":3,"file":"publish.js","sourceRoot":"","sources":["../../src/commands/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAuB,MAAM,uBAAuB,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,oBAAoB,EAAoB,MAAM,2BAA2B,CAAC;AACvG,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CA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AAC;IACzB,CAAC;CACF,CAAC,CAAC"}
@@ -252,6 +252,19 @@ import { viteSingleFile } from 'vite-plugin-singlefile';
252
252
  // since Rollup then just treats the unmatched id as an unresolved bare specifier and fails the
253
253
  // build. Verified against a real \`vite build\` before trusting the plain-string form.
254
254
  export default defineConfig({
255
+ // The engine serves world.json/game.json two different ways, and this flag is how it chooses.
256
+ // \`utils/worldDataLoader.ts\` reads \`typeof __BUNDLED__ !== 'undefined' && __BUNDLED__\`: true
257
+ // means "the data is inlined in this bundle, import it", false means "fetch it as separate
258
+ // files". A single-file published bundle has no separate files to fetch, so omitting this
259
+ // define does not degrade gracefully — the game boots, then dies at runtime with 404s on
260
+ // src/work/world.json and "world.json not found (neither bundle nor fetch available)".
261
+ //
262
+ // The typeof guard is why nothing catches it at build time: the identifier is genuinely
263
+ // undeclared when /dist is served raw in live-edit mode, so the engine cannot just read it.
264
+ // That makes a missing define invisible until a published game is opened in a browser.
265
+ //
266
+ // Deliberately NOT set in the dev config — live-edit serving must take the fetch path.
267
+ define: { __BUNDLED__: true },
255
268
  resolve: {
256
269
  alias: {
257
270
  ${entries}
@@ -373,6 +386,15 @@ If \`bitmagic publish\` exits non-zero, branch on the exit code rather than pars
373
386
  | 4 | Engine below the publish floor | \`bitmagic upgrade\` |
374
387
  | 5 | Not this game's owner, or the account/game is banned | Not self-serve — stop and report it |
375
388
  | 6 | Upload or finalize failed | Usually transient (network/storage). Retry once; if it fails identically, stop and report it — this code also covers permanent failures such as an unknown game or a rejected request |
389
+ | 7 | Published, but the game did not render | The game IS live. Do NOT retry the publish — fix the game and publish again. Artifacts in \`.bitmagic/smoke/\` |
390
+
391
+ After a successful publish the CLI loads the published game the way the portal does — in an iframe
392
+ that starts at a zero-size viewport — and fails with exit 7 if it does not render. This catches
393
+ failures that leave no other trace: a wrong Content-Type that makes the browser download the page,
394
+ a bundle that cannot find its own world.json, a canvas nothing ever draws into.
395
+
396
+ Pass \`--skip-smoke\` to skip it. The publish still happens; it is simply not confirmed to render,
397
+ and the output says so.
376
398
 
377
399
  ## Generating assets
378
400
 
@@ -1 +1 @@
1
- {"version":3,"file":"project-files.js","sourceRoot":"","sources":["../../src/scaffold/project-files.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEjF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,YAAY,GAA2B;IAClD,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;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAA2B;IACtD,aAAa,EAAE,UAAU;IACzB,cAAc,EAAE,UAAU;IAC1B,8FAA8F;IAC9F,cAAc,EAAE,QAAQ;IACxB,4FAA4F;IAC5F,mFAAmF;IACnF,eAAe,EAAE,SAAS;IAC1B,UAAU,EAAE,QAAQ;IACpB,IAAI,EAAE,QAAQ;IACd,wBAAwB,EAAE,QAAQ;CACnC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,aAAa,GAAG,SAAS,CAAC;AAEhC;;;;;;;;;GASG;AACH,MAAM,UAAU,GAAG;IACjB,uBAAuB;IACvB,oCAAoC,aAAa,WAAW;IAC5D,kDAAkD,aAAa,2CAA2C;IAC1G,8CAA8C,aAAa,uCAAuC;IAClG,gDAAgD,aAAa,wCAAwC;CACtG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAEX,oGAAoG;AACpG,MAAM,WAAW,GAA2B;IAC1C,2FAA2F;IAC3F,4FAA4F;IAC5F,4FAA4F;IAC5F,KAAK,EAAE,UAAU;IACjB,cAAc,EAAE,wBAAwB,aAAa,SAAS;IAC9D,WAAW,EAAE,wBAAwB,aAAa,MAAM;IACxD,2F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,CAAC;AACF,CAAC;AAED,MAAM,UAAU,cAAc;IAC5B,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO;;;;CAIR,CAAC;AACF,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * How long the iframe stays at zero size before it is grown.
3
+ *
4
+ * The window this has to hit: long enough for the game to boot and construct its renderer against
5
+ * the 0-size viewport (which floors it to 1x1), short enough that the grow still lands before the
6
+ * first rendered frame — that ordering is what makes the engine's size self-heal call
7
+ * onWindowResize while the post chain is still uninitialised. Too early and there is no renderer
8
+ * to mis-size; too late and the first frame has already rendered and the hazard is gone.
9
+ */
10
+ export declare const SMOKE_FRAME_GROW_MS = 400;
11
+ /**
12
+ * A local page that loads the published bundle the way the portal does.
13
+ *
14
+ * The portal embeds a published game in an iframe, and a cold start there begins with a 0-size
15
+ * viewport. Three of the four defects found in Phase 5's manual gate were invisible to a direct
16
+ * navigation:
17
+ *
18
+ * - a wrong Content-Type makes the iframe DOWNLOAD instead of render, so no canvas ever appears
19
+ * and there is no console error at all;
20
+ * - the bloom `invSize` crash needs the renderer to be resized before its first rendered frame,
21
+ * which only happens when the viewport diverges from the renderer's size;
22
+ * - a canvas that is never claimed by a renderer keeps the 300x150 HTML default.
23
+ *
24
+ * Loading the URL directly reproduces none of the first two. This does.
25
+ */
26
+ export declare function renderSmokeHarness(publishedUrl: string): string;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * How long the iframe stays at zero size before it is grown.
3
+ *
4
+ * The window this has to hit: long enough for the game to boot and construct its renderer against
5
+ * the 0-size viewport (which floors it to 1x1), short enough that the grow still lands before the
6
+ * first rendered frame — that ordering is what makes the engine's size self-heal call
7
+ * onWindowResize while the post chain is still uninitialised. Too early and there is no renderer
8
+ * to mis-size; too late and the first frame has already rendered and the hazard is gone.
9
+ */
10
+ export const SMOKE_FRAME_GROW_MS = 400;
11
+ /** Attribute-safe. The URL is server-supplied, but it lands inside an HTML attribute either way. */
12
+ function escapeAttr(value) {
13
+ return value
14
+ .replace(/&/g, '&amp;')
15
+ .replace(/"/g, '&quot;')
16
+ .replace(/</g, '&lt;')
17
+ .replace(/>/g, '&gt;');
18
+ }
19
+ /**
20
+ * A local page that loads the published bundle the way the portal does.
21
+ *
22
+ * The portal embeds a published game in an iframe, and a cold start there begins with a 0-size
23
+ * viewport. Three of the four defects found in Phase 5's manual gate were invisible to a direct
24
+ * navigation:
25
+ *
26
+ * - a wrong Content-Type makes the iframe DOWNLOAD instead of render, so no canvas ever appears
27
+ * and there is no console error at all;
28
+ * - the bloom `invSize` crash needs the renderer to be resized before its first rendered frame,
29
+ * which only happens when the viewport diverges from the renderer's size;
30
+ * - a canvas that is never claimed by a renderer keeps the 300x150 HTML default.
31
+ *
32
+ * Loading the URL directly reproduces none of the first two. This does.
33
+ */
34
+ export function renderSmokeHarness(publishedUrl) {
35
+ const src = escapeAttr(publishedUrl);
36
+ return `<!doctype html>
37
+ <html>
38
+ <head><meta charset="utf-8"><title>bitmagic smoke</title></head>
39
+ <body style="margin:0;background:#000">
40
+ <iframe
41
+ id="smoke-frame"
42
+ src="${src}"
43
+ style="border:0;display:block;width:0;height:0"
44
+ allow="autoplay; fullscreen; xr-spatial-tracking"
45
+ ></iframe>
46
+ <script>
47
+ // Grow after the game has had time to construct its renderer against the 0-size viewport.
48
+ setTimeout(function () {
49
+ var f = document.getElementById('smoke-frame');
50
+ f.style.width = '1280px';
51
+ f.style.height = '720px';
52
+ }, ${SMOKE_FRAME_GROW_MS});
53
+ </script>
54
+ </body>
55
+ </html>
56
+ `;
57
+ }
58
+ //# sourceMappingURL=harness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harness.js","sourceRoot":"","sources":["../../src/smoke/harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CAAC;AAEvC,oGAAoG;AACpG,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3B,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,kBAAkB,CAAC,YAAoB;IACrD,MAAM,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;IACrC,OAAO;;;;;;aAMI,GAAG;;;;;;;;;;WAUL,mBAAmB;;;;CAI7B,CAAC;AACF,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { type VerifyResult } from '../verify/classify.js';
2
+ /**
3
+ * How long to let the published game settle before observing it.
4
+ *
5
+ * Longer than `verify`'s default: the bundle is fetched from the CDN rather than a local dev
6
+ * server, and a forged level pulls its .vwld and GLBs over the network too.
7
+ */
8
+ export declare const SMOKE_SETTLE_MS = 25000;
9
+ export interface SmokeCheckOptions {
10
+ /** The URL `publish/complete` returned — the versioned key, which is what was just written. */
11
+ publishedUrl: string;
12
+ /** Where console.log / screenshot.png land. */
13
+ artifactDir: string;
14
+ settleMs?: number;
15
+ }
16
+ export interface SmokeCheckPaths {
17
+ harnessPath: string;
18
+ consolePath: string;
19
+ screenshotPath: string;
20
+ }
21
+ export declare function smokeArtifactPaths(artifactDir: string): SmokeCheckPaths;
22
+ /**
23
+ * Load the just-published bundle the way the portal does, and classify what happened.
24
+ *
25
+ * Deliberately reuses `classifyVerifyRun` rather than defining a second notion of "the game
26
+ * works": it already treats an untouched 300x150 canvas, a fatal engine console line, and a
27
+ * blank-looking screenshot as failures — which between them cover every Phase 5 defect that
28
+ * reached a published game. What this adds is the harness, not the verdict.
29
+ *
30
+ * The harness is written to `artifactDir` rather than a temp dir so a failing run leaves the exact
31
+ * page behind: reproducing a smoke failure by hand is otherwise guesswork.
32
+ */
33
+ export declare function runSmokeCheck(options: SmokeCheckOptions): Promise<VerifyResult>;
@@ -0,0 +1,45 @@
1
+ import * as fs from 'fs';
2
+ import * as path from 'path';
3
+ import { classifyVerifyRun } from '../verify/classify.js';
4
+ import { runHeadlessCheck } from '../verify/browser.js';
5
+ import { renderSmokeHarness } from './harness.js';
6
+ /**
7
+ * How long to let the published game settle before observing it.
8
+ *
9
+ * Longer than `verify`'s default: the bundle is fetched from the CDN rather than a local dev
10
+ * server, and a forged level pulls its .vwld and GLBs over the network too.
11
+ */
12
+ export const SMOKE_SETTLE_MS = 25_000;
13
+ export function smokeArtifactPaths(artifactDir) {
14
+ return {
15
+ harnessPath: path.join(artifactDir, 'harness.html'),
16
+ consolePath: path.join(artifactDir, 'console.log'),
17
+ screenshotPath: path.join(artifactDir, 'screenshot.png'),
18
+ };
19
+ }
20
+ /**
21
+ * Load the just-published bundle the way the portal does, and classify what happened.
22
+ *
23
+ * Deliberately reuses `classifyVerifyRun` rather than defining a second notion of "the game
24
+ * works": it already treats an untouched 300x150 canvas, a fatal engine console line, and a
25
+ * blank-looking screenshot as failures — which between them cover every Phase 5 defect that
26
+ * reached a published game. What this adds is the harness, not the verdict.
27
+ *
28
+ * The harness is written to `artifactDir` rather than a temp dir so a failing run leaves the exact
29
+ * page behind: reproducing a smoke failure by hand is otherwise guesswork.
30
+ */
31
+ export async function runSmokeCheck(options) {
32
+ const paths = smokeArtifactPaths(options.artifactDir);
33
+ fs.mkdirSync(options.artifactDir, { recursive: true });
34
+ fs.writeFileSync(paths.harnessPath, renderSmokeHarness(options.publishedUrl));
35
+ const observations = await runHeadlessCheck({
36
+ url: `file://${paths.harnessPath}`,
37
+ screenshotPath: paths.screenshotPath,
38
+ consolePath: paths.consolePath,
39
+ settleMs: options.settleMs ?? SMOKE_SETTLE_MS,
40
+ // The canvas lives in the embedded game, not in the harness page.
41
+ probeFrameUrlIncludes: options.publishedUrl,
42
+ });
43
+ return classifyVerifyRun(observations);
44
+ }
45
+ //# sourceMappingURL=run.js.map
@@ -0,0 +1 @@
1
+ {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AqB,EAAE,OAAO,CAAC,YAAY;KAC5C,CAAC,CAAC;IAEH,OAAO,iBAAiB,CAAC,YAAY,CAAC,CAAC;AACzC,CAAC"}
@@ -5,6 +5,16 @@ export interface HeadlessCheckOptions {
5
5
  consolePath: string;
6
6
  /** How long to let the game settle after load before observing. */
7
7
  settleMs: number;
8
+ /**
9
+ * Probe for the canvas inside the first child frame whose URL contains this substring, instead
10
+ * of in the top-level document.
11
+ *
12
+ * `bitmagic verify` loads the game directly and leaves this unset. `bitmagic publish`'s smoke
13
+ * check loads a local harness that embeds the published bundle in an iframe (the shape the
14
+ * portal uses), where the canvas lives in the child — a top-level query finds nothing and
15
+ * classifies as "the game did not start" even when it rendered perfectly.
16
+ */
17
+ probeFrameUrlIncludes?: string;
8
18
  }
9
19
  /**
10
20
  * Drives the creator's installed Chrome. `channel: 'chrome'` deliberately uses the system
@@ -42,7 +42,13 @@ export async function runHeadlessCheck(options) {
42
42
  throw new CliError(`The page never finished loading at ${options.url}: ${detail}`);
43
43
  }
44
44
  await page.waitForTimeout(options.settleMs);
45
- const canvas = await page.evaluate(() => {
45
+ // Same probe either way; only the frame it runs in differs. A missing child frame leaves
46
+ // `target` null, which classifies as "no canvas" — correct, because a harness whose iframe
47
+ // never loaded (a download, a 404) is exactly the failure this mode exists to catch.
48
+ const target = options.probeFrameUrlIncludes === undefined
49
+ ? page
50
+ : page.frames().find((frame) => frame.url().includes(options.probeFrameUrlIncludes)) ?? null;
51
+ const canvas = target === null ? null : await target.evaluate(() => {
46
52
  // This callback runs inside the browser Playwright drives, not in the CLI's Node process,
47
53
  // so `document` is a real global there even though the CLI's eslint config declares no
48
54
  // DOM globals for the process it actually lints.
@@ -1 +1 @@
1
- {"version":3,"file":"browser.js","sourceRoot":"","sources":["../../src/verify/browser.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAA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,EAAE,OAAO,CAAC,MAAM;aAC7B,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,MAAM,gBAAgB,GAAG,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC;QACjD,EAAE,CAAC,aAAa,CAAC,OAAO,CAAC,cAAc,EAAE,gBAAgB,CAAC,CAAC;QAE3D,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,EAAE,eAAe,EAAE,gBAAgB,CAAC,MAAM,EAAE,CAAC;IACxF,CAAC;YAAS,CAAC;QACT,wFAAwF;QACxF,4FAA4F;QAC5F,wDAAwD;QACxD,EAAE,CAAC,aAAa,CACd,OAAO,CAAC,WAAW,EACnB,CAAC,GAAG,YAAY,EAAE,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAC1E,CAAC;QACF,MAAM,OAAO,CAAC,KAAK,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/cli",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Build Bitmagic games from your own agent tool",
5
5
  "type": "module",
6
6
  "bin": {
@@ -19,8 +19,8 @@
19
19
  "citty": "^0.2.2",
20
20
  "playwright-core": "^1.59.1",
21
21
  "tar": "^7.4.3",
22
- "@bitmagic/world-forger": "0.1.3",
23
- "@bitmagic/asset-core": "0.1.0"
22
+ "@bitmagic/asset-core": "0.1.0",
23
+ "@bitmagic/world-forger": "0.1.3"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@eslint/js": "^9.38.0",