@bitmagic/cli 0.1.52-dev.8 → 0.1.52

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.
Files changed (94) hide show
  1. package/README.md +45 -9
  2. package/dist/assets/add.js +2 -1
  3. package/dist/assets/add.js.map +1 -1
  4. package/dist/assets/voxelize-glb.d.ts +17 -1
  5. package/dist/assets/voxelize-glb.js +43 -19
  6. package/dist/assets/voxelize-glb.js.map +1 -1
  7. package/dist/bin.js +25 -0
  8. package/dist/bin.js.map +1 -1
  9. package/dist/cli.d.ts +10 -0
  10. package/dist/cli.js +17 -7
  11. package/dist/cli.js.map +1 -1
  12. package/dist/commands/generate.d.ts +27 -0
  13. package/dist/commands/generate.js +132 -46
  14. package/dist/commands/generate.js.map +1 -1
  15. package/dist/commands/judge.d.ts +5 -0
  16. package/dist/commands/judge.js +28 -7
  17. package/dist/commands/judge.js.map +1 -1
  18. package/dist/commands/levels.d.ts +10 -17
  19. package/dist/commands/levels.js +48 -48
  20. package/dist/commands/levels.js.map +1 -1
  21. package/dist/commands/publish.d.ts +6 -1
  22. package/dist/commands/publish.js +29 -15
  23. package/dist/commands/publish.js.map +1 -1
  24. package/dist/commands/verify.d.ts +4 -0
  25. package/dist/commands/verify.js +94 -51
  26. package/dist/commands/verify.js.map +1 -1
  27. package/dist/editor/journal.d.ts +4 -1
  28. package/dist/editor/journal.js +13 -7
  29. package/dist/editor/journal.js.map +1 -1
  30. package/dist/editor/server.js +3 -1
  31. package/dist/editor/server.js.map +1 -1
  32. package/dist/generate/model.d.ts +13 -2
  33. package/dist/generate/model.js +70 -21
  34. package/dist/generate/model.js.map +1 -1
  35. package/dist/generate/prop.d.ts +60 -4
  36. package/dist/generate/prop.js +169 -46
  37. package/dist/generate/prop.js.map +1 -1
  38. package/dist/generate/stream.d.ts +7 -0
  39. package/dist/generate/stream.js +2 -1
  40. package/dist/generate/stream.js.map +1 -1
  41. package/dist/judge/record.d.ts +3 -0
  42. package/dist/judge/record.js +3 -0
  43. package/dist/judge/record.js.map +1 -1
  44. package/dist/levels/registry.d.ts +5 -2
  45. package/dist/levels/registry.js +32 -27
  46. package/dist/levels/registry.js.map +1 -1
  47. package/dist/messages/check.d.ts +30 -0
  48. package/dist/messages/check.js +119 -0
  49. package/dist/messages/check.js.map +1 -0
  50. package/dist/messages/notice.d.ts +58 -0
  51. package/dist/messages/notice.js +54 -0
  52. package/dist/messages/notice.js.map +1 -0
  53. package/dist/messages/refresh.d.ts +19 -0
  54. package/dist/messages/refresh.js +42 -0
  55. package/dist/messages/refresh.js.map +1 -0
  56. package/dist/project/jobs.d.ts +1 -1
  57. package/dist/project/jobs.js +16 -20
  58. package/dist/project/jobs.js.map +1 -1
  59. package/dist/project/platform-declaration.d.ts +51 -0
  60. package/dist/project/platform-declaration.js +81 -0
  61. package/dist/project/platform-declaration.js.map +1 -0
  62. package/dist/publish/platform.d.ts +4 -8
  63. package/dist/publish/platform.js +19 -53
  64. package/dist/publish/platform.js.map +1 -1
  65. package/dist/scaffold/project-files.js +54 -21
  66. package/dist/scaffold/project-files.js.map +1 -1
  67. package/dist/verify/artifacts.d.ts +19 -0
  68. package/dist/verify/artifacts.js +34 -0
  69. package/dist/verify/artifacts.js.map +1 -0
  70. package/dist/verify/browser.d.ts +10 -0
  71. package/dist/verify/browser.js +79 -9
  72. package/dist/verify/browser.js.map +1 -1
  73. package/dist/verify/classify.d.ts +37 -1
  74. package/dist/verify/classify.js +66 -2
  75. package/dist/verify/classify.js.map +1 -1
  76. package/dist/verify/device.d.ts +43 -0
  77. package/dist/verify/device.js +59 -0
  78. package/dist/verify/device.js.map +1 -0
  79. package/dist/verify/iterate.d.ts +21 -2
  80. package/dist/verify/iterate.js +43 -36
  81. package/dist/verify/iterate.js.map +1 -1
  82. package/dist/verify/mobile-parity.d.ts +42 -0
  83. package/dist/verify/mobile-parity.js +84 -0
  84. package/dist/verify/mobile-parity.js.map +1 -0
  85. package/dist/verify/platform.d.ts +47 -0
  86. package/dist/verify/platform.js +89 -0
  87. package/dist/verify/platform.js.map +1 -0
  88. package/dist/verify/result.d.ts +90 -6
  89. package/dist/verify/result.js +89 -10
  90. package/dist/verify/result.js.map +1 -1
  91. package/dist/verify/url.d.ts +9 -1
  92. package/dist/verify/url.js +10 -2
  93. package/dist/verify/url.js.map +1 -1
  94. package/package.json +4 -4
@@ -36,14 +36,89 @@ export function readVerifyRecord(artifactDir) {
36
36
  }
37
37
  }
38
38
  /**
39
- * What a classified verify run produces: the record to write, and whether the command then
40
- * fails.
39
+ * One platform's finished run, ready to merge.
41
40
  *
42
- * Split out of the command so the ORDER is testable. The record must be written even when the
43
- * run failed publish distinguishes "verify failed" from "verify never ran", and those have
44
- * different messages and different remedies. Inside `run()` that ordering is only observable by
45
- * spawning vite and a browser, which is why it went unguarded.
41
+ * Shared by the one-shot command and the watch loop because both assemble exactly this from
42
+ * exactly these parts, and the only interesting thing about the assembly which observations
43
+ * belong to the platform and which to the run as a whole — is the thing that would drift if it
44
+ * were written twice.
46
45
  */
46
+ export function toVerifyPlatformRun(platform, result, observations, retriedWithSoftwareGl, paths, fast) {
47
+ return {
48
+ platform,
49
+ ok: result.ok,
50
+ failures: result.failures,
51
+ warnings: result.warnings,
52
+ renderer: observations.renderer,
53
+ ...(retriedWithSoftwareGl ? { retriedWithSoftwareGl } : {}),
54
+ settle: observations.settle,
55
+ snapshot: observations.snapshot,
56
+ events: observations.events,
57
+ ...(observations.touchControls !== undefined ? { touchControls: observations.touchControls } : {}),
58
+ consoleFile: path.basename(paths.consolePath),
59
+ ...(fast ? {} : { screenshotFile: path.basename(paths.screenshotPath) }),
60
+ };
61
+ }
62
+ /**
63
+ * One verdict, and one set of top-level fields, from however many platforms the run covered.
64
+ *
65
+ * The prefixing rule is what keeps a `both` run readable. A finding EVERY platform produced is
66
+ * one problem, not two — a missing `Loaded world.json` is the same missing file whichever
67
+ * viewport asked for it — so it is reported once, unprefixed. A finding only some platforms
68
+ * produced is prefixed with the platform, because there the platform IS the information. A
69
+ * single-platform run therefore comes out byte-identical to what it produced before this
70
+ * existed: every finding is in every run, so nothing is prefixed.
71
+ *
72
+ * The top-level observations are the LEAD run's (`runs[0]`), which `resolveVerifyPlatforms`
73
+ * chooses as the platform the game is actually for. `platforms` is only attached for a genuine
74
+ * multi-platform run, so a single-platform record grows no keys.
75
+ */
76
+ export function mergeVerifyPlatformRuns(runs, mobileParity) {
77
+ if (runs.length === 0) {
78
+ throw new CliError('A verify run covered no platforms, which should be impossible.');
79
+ }
80
+ const lead = runs[0];
81
+ return {
82
+ result: {
83
+ ok: runs.every((run) => run.ok),
84
+ failures: mergeFindings(runs, (run) => run.failures),
85
+ warnings: mergeFindings(runs, (run) => run.warnings),
86
+ },
87
+ extras: {
88
+ ...(lead.renderer !== undefined ? { renderer: lead.renderer } : {}),
89
+ ...(lead.retriedWithSoftwareGl === true ? { retriedWithSoftwareGl: true } : {}),
90
+ ...(lead.settle !== undefined ? { settle: lead.settle } : {}),
91
+ ...(lead.snapshot !== undefined ? { snapshot: lead.snapshot } : {}),
92
+ ...(lead.events !== undefined ? { events: lead.events } : {}),
93
+ platform: lead.platform,
94
+ ...(lead.touchControls !== undefined ? { touchControls: lead.touchControls } : {}),
95
+ ...(mobileParity !== undefined ? { mobileParity } : {}),
96
+ ...(runs.length > 1 ? { platforms: runs } : {}),
97
+ },
98
+ };
99
+ }
100
+ /** Findings from every run, deduplicated, in first-seen order, prefixed only where they differ. */
101
+ function mergeFindings(runs, pick) {
102
+ const seenIn = new Map();
103
+ for (const run of runs) {
104
+ for (const finding of pick(run)) {
105
+ const platforms = seenIn.get(finding);
106
+ if (platforms === undefined)
107
+ seenIn.set(finding, [run.platform]);
108
+ else if (!platforms.includes(run.platform))
109
+ platforms.push(run.platform);
110
+ }
111
+ }
112
+ const merged = [];
113
+ for (const [finding, platforms] of seenIn) {
114
+ if (platforms.length === runs.length)
115
+ merged.push(finding);
116
+ else
117
+ for (const platform of platforms)
118
+ merged.push(`[${platform}] ${finding}`);
119
+ }
120
+ return merged;
121
+ }
47
122
  export function decideVerifyOutcome(result, fingerprint, at, extras) {
48
123
  return {
49
124
  record: {
@@ -66,16 +141,20 @@ export function decideVerifyOutcome(result, fingerprint, at, extras) {
66
141
  * survives a failing run — inside `run()` it was observable only by spawning vite and a browser,
67
142
  * which is why it went unguarded.
68
143
  */
69
- export function recordAndGateVerify(artifactDir, outcome, paths, reporter) {
144
+ export function recordAndGateVerify(artifactDir, outcome,
145
+ /**
146
+ * Every file this run actually wrote, in the order to list them. A list rather than a
147
+ * console/screenshot pair because a run can now cover two platforms and write four files, and
148
+ * because a `--fast` run captures no screenshot at all — naming a file that does not exist
149
+ * (or worse, a stale one from an earlier run) is exactly what this avoids.
150
+ */
151
+ artifacts, reporter) {
70
152
  reporter.write(artifactDir, outcome.record);
71
153
  for (const warning of outcome.record.warnings)
72
154
  reporter.info(`warning: ${warning}`);
73
155
  if (outcome.shouldThrow) {
74
156
  for (const failure of outcome.record.failures)
75
157
  reporter.error(`✗ ${failure}`);
76
- // screenshotPath is absent on a `--fast` run, which captures none — listing it would point
77
- // the reader at a file that does not exist (or worse, a stale one from an earlier run).
78
- const artifacts = [paths.consolePath, paths.screenshotPath].filter((p) => p !== undefined);
79
158
  reporter.error(`\nArtifacts: ${artifacts.join(', ')}`);
80
159
  throw new CliError('Verification failed.');
81
160
  }
@@ -1 +1 @@
1
- {"version":3,"file":"result.js","sourceRoot":"","sources":["../../src/verify/result.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAQ7B,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,MAAM,CAAC,MAAM,sBAAsB,GAAG,aAAa,CAAC;AAiCpD,MAAM,UAAU,iBAAiB,CAAC,WAAmB,EAAE,MAAuB;IAC5E,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE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C,WAAW,EAAE,CAAC,CAAC;AACpE,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import type { RendererChoice } from '../browser-gl.js';
2
+ import type { VerifyPlatform } from './platform.js';
2
3
  /**
3
4
  * The URL verify boots the game at — one place, because one-shot and watch
4
5
  * mode were already building it separately and drift here is invisible until
@@ -8,5 +9,12 @@ import type { RendererChoice } from '../browser-gl.js';
8
9
  * localStorage preference. `?eventlog=1` asks the engine to run a passive
9
10
  * GameEventLog session for the semantic-events probe — an engine too old to
10
11
  * know the param ignores it, and the probe then reads null ("not observed").
12
+ *
13
+ * `?platform=mobile` is the engine's own boot override and wins over every
14
+ * device probe (`isMobileRuntime.ts`), which is what makes the mobile run
15
+ * exercise the real branch — the touch HUD, the pixel-ratio clamp, the
16
+ * level-detail tier, the light warmup — rather than a resized desktop page.
17
+ * A desktop run sends NO platform param rather than `?platform=desktop`, so a
18
+ * vendored engine that predates the override boots exactly as it always has.
11
19
  */
12
- export declare function buildVerifyUrl(port: number, renderer: RendererChoice): string;
20
+ export declare function buildVerifyUrl(port: number, renderer: RendererChoice, platform?: VerifyPlatform): string;
@@ -7,8 +7,16 @@
7
7
  * localStorage preference. `?eventlog=1` asks the engine to run a passive
8
8
  * GameEventLog session for the semantic-events probe — an engine too old to
9
9
  * know the param ignores it, and the probe then reads null ("not observed").
10
+ *
11
+ * `?platform=mobile` is the engine's own boot override and wins over every
12
+ * device probe (`isMobileRuntime.ts`), which is what makes the mobile run
13
+ * exercise the real branch — the touch HUD, the pixel-ratio clamp, the
14
+ * level-detail tier, the light warmup — rather than a resized desktop page.
15
+ * A desktop run sends NO platform param rather than `?platform=desktop`, so a
16
+ * vendored engine that predates the override boots exactly as it always has.
10
17
  */
11
- export function buildVerifyUrl(port, renderer) {
12
- return `http://localhost:${port}/?renderer=${renderer}&eventlog=1`;
18
+ export function buildVerifyUrl(port, renderer, platform = 'desktop') {
19
+ const base = `http://localhost:${port}/?renderer=${renderer}&eventlog=1`;
20
+ return platform === 'mobile' ? `${base}&platform=mobile` : base;
13
21
  }
14
22
  //# sourceMappingURL=url.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/verify/url.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,QAAwB;IACnE,OAAO,oBAAoB,IAAI,cAAc,QAAQ,aAAa,CAAC;AACrE,CAAC"}
1
+ {"version":3,"file":"url.js","sourceRoot":"","sources":["../../src/verify/url.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,cAAc,CAC5B,IAAY,EACZ,QAAwB,EACxB,WAA2B,SAAS;IAEpC,MAAM,IAAI,GAAG,oBAAoB,IAAI,cAAc,QAAQ,aAAa,CAAC;IACzE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,kBAAkB,CAAC,CAAC,CAAC,IAAI,CAAC;AAClE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitmagic/cli",
3
- "version": "0.1.52-dev.8",
3
+ "version": "0.1.52",
4
4
  "description": "Build Bitmagic games from your own agent tool",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "author": "Bitmagic Oy",
@@ -23,9 +23,9 @@
23
23
  "fflate": "^0.8.2",
24
24
  "playwright-core": "^1.59.1",
25
25
  "tar": "^7.4.3",
26
- "@bitmagic/animation-forger": "0.1.7-dev.8",
27
- "@bitmagic/world-forger": "0.1.12-dev.8",
28
- "@bitmagic/asset-core": "0.2.7-dev.8"
26
+ "@bitmagic/animation-forger": "0.1.7",
27
+ "@bitmagic/world-forger": "0.1.12",
28
+ "@bitmagic/asset-core": "0.2.7"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@eslint/js": "^9.38.0",