@bitmagic/cli 0.1.64-dev.9 → 0.1.65-dev.1
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 +28 -15
- package/assets/blender-level/README.md +6 -1
- package/assets/blender-level/bmlevel/core.py +78 -1
- package/assets/blender-level/review.py +106 -11
- package/assets/blender-level/tests/test_core.py +49 -0
- package/dist/cli.d.ts +8 -0
- package/dist/commands/forge.d.ts +8 -2
- package/dist/commands/forge.js +10 -4
- package/dist/commands/forge.js.map +1 -1
- package/dist/commands/generate.js +48 -24
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/publish.d.ts +5 -0
- package/dist/commands/publish.js +29 -3
- package/dist/commands/publish.js.map +1 -1
- package/dist/editor/design.d.ts +1 -0
- package/dist/editor/design.js +7 -3
- package/dist/editor/design.js.map +1 -1
- package/dist/editor/game-info-panel.d.ts +33 -0
- package/dist/editor/game-info-panel.js +179 -0
- package/dist/editor/game-info-panel.js.map +1 -0
- package/dist/editor/game-info.d.ts +55 -0
- package/dist/editor/game-info.js +126 -0
- package/dist/editor/game-info.js.map +1 -0
- package/dist/editor/server.js +59 -3
- package/dist/editor/server.js.map +1 -1
- package/dist/editor/shell-page.js +196 -11
- package/dist/editor/shell-page.js.map +1 -1
- package/dist/forge/two-d-gate.d.ts +10 -0
- package/dist/forge/two-d-gate.js +85 -82
- package/dist/forge/two-d-gate.js.map +1 -1
- package/dist/ios/collect-urls.d.ts +2 -0
- package/dist/ios/collect-urls.js +2 -2
- package/dist/ios/collect-urls.js.map +1 -1
- package/dist/publish/client.d.ts +18 -0
- package/dist/publish/client.js.map +1 -1
- package/dist/publish/record.d.ts +9 -1
- package/dist/publish/record.js +2 -0
- package/dist/publish/record.js.map +1 -1
- package/dist/publish/urls.d.ts +29 -0
- package/dist/publish/urls.js +39 -0
- package/dist/publish/urls.js.map +1 -0
- package/dist/scaffold/blender-level-skill-files.d.ts +7 -0
- package/dist/scaffold/blender-level-skill-files.js +129 -21
- package/dist/scaffold/blender-level-skill-files.js.map +1 -1
- package/dist/scaffold/project-files.js +2 -2
- package/dist/scaffold/skill-files.js +18 -1
- package/dist/scaffold/skill-files.js.map +1 -1
- package/package.json +4 -4
package/dist/forge/two-d-gate.js
CHANGED
|
@@ -13,40 +13,49 @@
|
|
|
13
13
|
*/
|
|
14
14
|
import * as fs from 'fs';
|
|
15
15
|
import * as path from 'path';
|
|
16
|
-
import { classifyGame2D } from '@bitmagic/world-forger/physics-mode.js';
|
|
16
|
+
import { classifyGame2D, runsGroundPlanePhysics } from '@bitmagic/world-forger/physics-mode.js';
|
|
17
17
|
import { CliError } from '../errors.js';
|
|
18
|
-
import {
|
|
18
|
+
import { isJsonObject } from '../project/world-json.js';
|
|
19
|
+
import { aliasSourceDir } from '../scaffold/aliases.js';
|
|
19
20
|
/**
|
|
20
|
-
*
|
|
21
|
+
* One of the project's `work/` JSON files, or null when it is missing,
|
|
22
|
+
* unparseable or not an object.
|
|
21
23
|
*
|
|
22
|
-
*
|
|
24
|
+
* Null rather than a throw for every reader in this module: they all run as a
|
|
25
|
+
* FREE pre-flight over a project this gate does not own, and the forge's own
|
|
23
26
|
* later reads produce the real, better-contextualized error for a broken
|
|
24
|
-
* project
|
|
27
|
+
* project. Resolved through the alias model rather than a hardcoded `src/work`
|
|
28
|
+
* — `scaffold/aliases.ts` is the one source of truth for where the game lives.
|
|
25
29
|
*/
|
|
26
|
-
|
|
27
|
-
let gameGenre = '';
|
|
28
|
-
let gameDimension;
|
|
29
|
-
let physicsMode;
|
|
30
|
-
let cameraMode;
|
|
31
|
-
try {
|
|
32
|
-
const game = JSON.parse(fs.readFileSync(path.join(root, 'src', 'work', 'game.json'), 'utf-8'));
|
|
33
|
-
if (typeof game.gameGenre === 'string')
|
|
34
|
-
gameGenre = game.gameGenre;
|
|
35
|
-
gameDimension = game.gameDimension;
|
|
36
|
-
physicsMode = game.physicsMode;
|
|
37
|
-
}
|
|
38
|
-
catch {
|
|
39
|
-
// Unreadable game.json → treat as not-2d; see the doc comment.
|
|
40
|
-
}
|
|
30
|
+
function readWorkJson(root, name) {
|
|
41
31
|
try {
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
cameraMode = profile?.cameraMode;
|
|
32
|
+
const parsed = JSON.parse(fs.readFileSync(path.join(root, aliasSourceDir('work'), name), 'utf-8'));
|
|
33
|
+
return isJsonObject(parsed) ? parsed : null;
|
|
45
34
|
}
|
|
46
35
|
catch {
|
|
47
|
-
|
|
36
|
+
return null;
|
|
48
37
|
}
|
|
49
|
-
|
|
38
|
+
}
|
|
39
|
+
/** The project's `worldProfileData`, or undefined when there is no readable world.json. */
|
|
40
|
+
function readWorldProfile(root) {
|
|
41
|
+
const profile = readWorkJson(root, 'world.json')?.worldProfileData;
|
|
42
|
+
return isJsonObject(profile) ? profile : undefined;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* The project's 2D classification, from its work game.json + world.json.
|
|
46
|
+
*
|
|
47
|
+
* Missing or unreadable files classify as `not-2d` on purpose: the forge's own
|
|
48
|
+
* later reads produce the real, better-contextualized error for a broken
|
|
49
|
+
* project, and a gate must never block a healthy 3D game over a parse hiccup.
|
|
50
|
+
*/
|
|
51
|
+
export function readGame2DClass(root) {
|
|
52
|
+
const game = readWorkJson(root, 'game.json');
|
|
53
|
+
return classifyGame2D({
|
|
54
|
+
gameGenre: typeof game?.gameGenre === 'string' ? game.gameGenre : '',
|
|
55
|
+
gameDimension: game?.gameDimension,
|
|
56
|
+
physicsMode: game?.physicsMode,
|
|
57
|
+
cameraMode: readWorldProfile(root)?.cameraMode,
|
|
58
|
+
});
|
|
50
59
|
}
|
|
51
60
|
/**
|
|
52
61
|
* Route `bitmagic forge` by the project's dimension, before anything is sent
|
|
@@ -107,15 +116,8 @@ export function resolveForgeLaneForRun(options) {
|
|
|
107
116
|
* refuse while it is still free.
|
|
108
117
|
*/
|
|
109
118
|
export function assertNotOpenWater(root) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
const profile = world.worldProfileData;
|
|
113
|
-
if (!profile?.openWater)
|
|
114
|
-
return;
|
|
115
|
-
}
|
|
116
|
-
catch {
|
|
117
|
-
return; // unreadable world.json → the forge's own later error is better
|
|
118
|
-
}
|
|
119
|
+
if (!readWorldProfile(root)?.openWater)
|
|
120
|
+
return;
|
|
119
121
|
throw new CliError('This project is an OPEN-WATER world (`worldProfileData.openWater`), which generates no terrain at all — '
|
|
120
122
|
+ 'so a side-on level would have no ground to stand on and the player would fall straight through. Remove '
|
|
121
123
|
+ '`openWater` from src/work/world.json first, then forge. Nothing was sent or billed.');
|
|
@@ -130,38 +132,32 @@ export function assertNotOpenWater(root) {
|
|
|
130
132
|
* gate. The registry itself is preserved on the carrier; the objects are not.
|
|
131
133
|
*/
|
|
132
134
|
export function describeSideonRegistryLoss(root) {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (levels.length === 0)
|
|
138
|
-
return null;
|
|
139
|
-
const objects = Array.isArray(world.environmentObjects) ? world.environmentObjects : [];
|
|
140
|
-
// Counted the SAME way persist-sideon removes them (taggedness, not registry
|
|
141
|
-
// membership) and across all three arrays — doors and key items are the part
|
|
142
|
-
// the stash does NOT preserve, so under-reporting them is the worst thing
|
|
143
|
-
// this message could do.
|
|
144
|
-
const scoped = (list) => (Array.isArray(list)
|
|
145
|
-
? list.filter((e) => e.levelId !== undefined).length
|
|
146
|
-
: 0);
|
|
147
|
-
const doomedObjects = objects.filter((o) => o.levelId !== undefined).length;
|
|
148
|
-
const doomedDoors = scoped(profile?.doors);
|
|
149
|
-
const doomedKeys = scoped(profile?.keyItems);
|
|
150
|
-
const extra = [
|
|
151
|
-
doomedDoors > 0 ? `${doomedDoors} door${doomedDoors === 1 ? '' : 's'}` : '',
|
|
152
|
-
doomedKeys > 0 ? `${doomedKeys} key item${doomedKeys === 1 ? '' : 's'}` : '',
|
|
153
|
-
].filter(Boolean).join(' and ');
|
|
154
|
-
const names = levels.map((l) => String(l.name ?? l.id ?? '?')).join(', ');
|
|
155
|
-
return `This project has ${levels.length} level${levels.length === 1 ? '' : 's'} (${names}). A 2D side-view level `
|
|
156
|
-
+ 'is a single flat strip and cannot live in the levels registry, so this forge REPLACES them: the registry is '
|
|
157
|
-
+ `emptied and ${doomedObjects} object${doomedObjects === 1 ? '' : 's'}`
|
|
158
|
-
+ `${extra ? ` (plus ${extra})` : ''} belonging to those levels are removed. The .vwld assets stay in the `
|
|
159
|
-
+ 'project and the registry is saved under worldForgerSideon.replacedLevels — but the placed objects, doors '
|
|
160
|
-
+ 'and key items are NOT recoverable. Stop here and back up world.json if that is not what you want.';
|
|
161
|
-
}
|
|
162
|
-
catch {
|
|
135
|
+
const world = readWorkJson(root, 'world.json');
|
|
136
|
+
const profile = world && isJsonObject(world.worldProfileData) ? world.worldProfileData : undefined;
|
|
137
|
+
const levels = Array.isArray(profile?.levels) ? profile.levels : [];
|
|
138
|
+
if (levels.length === 0)
|
|
163
139
|
return null;
|
|
164
|
-
|
|
140
|
+
// Counted the SAME way persist-sideon removes them (taggedness, not registry
|
|
141
|
+
// membership) and across all three arrays — doors and key items are the part
|
|
142
|
+
// the stash does NOT preserve, so under-reporting them is the worst thing
|
|
143
|
+
// this message could do.
|
|
144
|
+
const scoped = (list) => (Array.isArray(list)
|
|
145
|
+
? list.filter((e) => e.levelId !== undefined).length
|
|
146
|
+
: 0);
|
|
147
|
+
const doomedObjects = scoped(world?.environmentObjects);
|
|
148
|
+
const doomedDoors = scoped(profile?.doors);
|
|
149
|
+
const doomedKeys = scoped(profile?.keyItems);
|
|
150
|
+
const extra = [
|
|
151
|
+
doomedDoors > 0 ? `${doomedDoors} door${doomedDoors === 1 ? '' : 's'}` : '',
|
|
152
|
+
doomedKeys > 0 ? `${doomedKeys} key item${doomedKeys === 1 ? '' : 's'}` : '',
|
|
153
|
+
].filter(Boolean).join(' and ');
|
|
154
|
+
const names = levels.map((l) => String(l.name ?? l.id ?? '?')).join(', ');
|
|
155
|
+
return `This project has ${levels.length} level${levels.length === 1 ? '' : 's'} (${names}). A 2D side-view level `
|
|
156
|
+
+ 'is a single flat strip and cannot live in the levels registry, so this forge REPLACES them: the registry is '
|
|
157
|
+
+ `emptied and ${doomedObjects} object${doomedObjects === 1 ? '' : 's'}`
|
|
158
|
+
+ `${extra ? ` (plus ${extra})` : ''} belonging to those levels are removed. The .vwld assets stay in the `
|
|
159
|
+
+ 'project and the registry is saved under worldForgerSideon.replacedLevels — but the placed objects, doors '
|
|
160
|
+
+ 'and key items are NOT recoverable. Stop here and back up world.json if that is not what you want.';
|
|
165
161
|
}
|
|
166
162
|
/**
|
|
167
163
|
* The project's `characterConfig.runSpeed` (work world.json) — the one movement
|
|
@@ -169,15 +165,9 @@ export function describeSideonRegistryLoss(root) {
|
|
|
169
165
|
* unreadable (the server falls back to the generic kit's default).
|
|
170
166
|
*/
|
|
171
167
|
export function readCharacterRunSpeed(root) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
const character = profile?.characterConfig;
|
|
176
|
-
return typeof character?.runSpeed === 'number' && character.runSpeed > 0 ? character.runSpeed : undefined;
|
|
177
|
-
}
|
|
178
|
-
catch {
|
|
179
|
-
return undefined;
|
|
180
|
-
}
|
|
168
|
+
const character = readWorldProfile(root)?.characterConfig;
|
|
169
|
+
const runSpeed = isJsonObject(character) ? character.runSpeed : undefined;
|
|
170
|
+
return typeof runSpeed === 'number' && runSpeed > 0 ? runSpeed : undefined;
|
|
181
171
|
}
|
|
182
172
|
/**
|
|
183
173
|
* The project's `worldProfileData.voxelBlockSize` (work world.json) — the side-on
|
|
@@ -186,13 +176,26 @@ export function readCharacterRunSpeed(root) {
|
|
|
186
176
|
* when unset or unreadable (the server falls back to the 1 m default).
|
|
187
177
|
*/
|
|
188
178
|
export function readVoxelBlockSize(root) {
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
179
|
+
const size = readWorldProfile(root)?.voxelBlockSize;
|
|
180
|
+
return typeof size === 'number' && size > 0 ? size : undefined;
|
|
181
|
+
}
|
|
182
|
+
/**
|
|
183
|
+
* Does this project collide on the engine's GROUND PLANE (top-down 2D physics)?
|
|
184
|
+
*
|
|
185
|
+
* The forge sends it so the designer builds FLAT terrain: that lane turns an
|
|
186
|
+
* unclimbable rise into a wall and a dug basin into a pit, so a normal 3D
|
|
187
|
+
* landscape is unplayable there. Same rule the web lane applies
|
|
188
|
+
* (`runsGroundPlanePhysics`); unreadable project files answer `false`, which is
|
|
189
|
+
* the ordinary 3D world.
|
|
190
|
+
*/
|
|
191
|
+
export function readGroundPlane(root) {
|
|
192
|
+
const game = readWorkJson(root, 'game.json');
|
|
193
|
+
return runsGroundPlanePhysics({
|
|
194
|
+
gameGenre: typeof game?.gameGenre === 'string' ? game.gameGenre : '',
|
|
195
|
+
physicsMode: game?.physicsMode,
|
|
196
|
+
physics2d: game?.physics2d,
|
|
197
|
+
// A project with no readable world.json has no camera to be top-down.
|
|
198
|
+
cameraMode: readWorldProfile(root)?.cameraMode,
|
|
199
|
+
});
|
|
197
200
|
}
|
|
198
201
|
//# sourceMappingURL=two-d-gate.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"two-d-gate.js","sourceRoot":"","sources":["../../src/forge/two-d-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAoB,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"two-d-gate.js","sourceRoot":"","sources":["../../src/forge/two-d-gate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AA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I,CAAC,EAAE,eAAe,CAAC;IAC1D,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC1E,OAAO,OAAO,QAAQ,KAAK,QAAQ,IAAI,QAAQ,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7E,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAY;IAC7C,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,EAAE,cAAc,CAAC;IACpD,OAAO,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe,CAAC,IAAY;IAC1C,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;IAC7C,OAAO,sBAAsB,CAAC;QAC5B,SAAS,EAAE,OAAO,IAAI,EAAE,SAAS,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE;QACpE,WAAW,EAAE,IAAI,EAAE,WAAW;QAC9B,SAAS,EAAE,IAAI,EAAE,SAAS;QAC1B,sEAAsE;QACtE,UAAU,EAAE,gBAAgB,CAAC,IAAI,CAAC,EAAE,UAAU;KAC/C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -18,6 +18,8 @@ export declare function scanCompiledCodeUrls(compiledCode: string): Set<string>;
|
|
|
18
18
|
export declare function readCompiledGameCode(root: string): string;
|
|
19
19
|
interface AnimationEntry {
|
|
20
20
|
file: string;
|
|
21
|
+
/** Absolute URL overriding `<base>/<file>` — the capture-backed default locomotion uses it. */
|
|
22
|
+
url?: string;
|
|
21
23
|
motionId: string;
|
|
22
24
|
}
|
|
23
25
|
interface WeaponAnimationEntry {
|
package/dist/ios/collect-urls.js
CHANGED
|
@@ -140,7 +140,7 @@ export function collectAnimationUrls(assets, worldData, compiledCode) {
|
|
|
140
140
|
const cdnLibrary = [
|
|
141
141
|
...assets.coreAnimations.map((entry) => ({
|
|
142
142
|
...entry,
|
|
143
|
-
url: `${assets.animationBaseUrl}/${entry.file}`,
|
|
143
|
+
url: entry.url ?? `${assets.animationBaseUrl}/${entry.file}`,
|
|
144
144
|
})),
|
|
145
145
|
...assets.meleeWeaponAnimations,
|
|
146
146
|
];
|
|
@@ -150,7 +150,7 @@ export function collectAnimationUrls(assets, worldData, compiledCode) {
|
|
|
150
150
|
assets.generatedRangedWeaponAnimations,
|
|
151
151
|
assets.generatedDirectionalAnimations,
|
|
152
152
|
assets.generatedPostureAnimations,
|
|
153
|
-
].flatMap((pack) => pack.map((entry) => ({ ...entry, url: `${assets.generatedAnimationBaseUrl}/${entry.file}` })));
|
|
153
|
+
].flatMap((pack) => pack.map((entry) => ({ ...entry, url: entry.url ?? `${assets.generatedAnimationBaseUrl}/${entry.file}` })));
|
|
154
154
|
const generatedActive = assets.activeLibrary === 'generated';
|
|
155
155
|
const active = generatedActive ? generatedLibrary : cdnLibrary;
|
|
156
156
|
const inactive = generatedActive ? cdnLibrary : generatedLibrary;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-urls.js","sourceRoot":"","sources":["../../src/ios/collect-urls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,yFAAyF;AACzF,MAAM,WAAW,GAAwB,IAAI,GAAG,CAAC;IAC/C,eAAe;IACf,cAAc;IACd,sBAAsB;IACtB,oBAA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AAS,CAAC,KAAK;YAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACtD,CAAC;IAED,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAChC,CAAC"}
|
package/dist/publish/client.d.ts
CHANGED
|
@@ -150,7 +150,25 @@ export interface SourceCheckResult {
|
|
|
150
150
|
warnings?: string[];
|
|
151
151
|
}
|
|
152
152
|
export interface CompletePublishResponse {
|
|
153
|
+
/**
|
|
154
|
+
* The VERSIONED key this publish wrote — `games/<id>/indexN.html`. The one URL that names
|
|
155
|
+
* these exact bytes, which is why the smoke check loads it; a poor thing to share, because
|
|
156
|
+
* the next publish writes `indexN+1.html` and a link handed out today freezes on today's
|
|
157
|
+
* build. `promotedPublishUrl` (publish/urls.ts) decides what the creator actually sees.
|
|
158
|
+
*/
|
|
153
159
|
url: string;
|
|
160
|
+
/**
|
|
161
|
+
* The directory form `games/<id>/`, which always resolves to the newest publish. Correct for
|
|
162
|
+
* every game, listed or not. Absent from an older server, which `promotedPublishUrl` recovers
|
|
163
|
+
* from `url`.
|
|
164
|
+
*/
|
|
165
|
+
latestUrl?: string;
|
|
166
|
+
/**
|
|
167
|
+
* The player-facing `/play/` page, at the game's vanity slug when it has one. Sent only for a
|
|
168
|
+
* public publish whose page bake actually landed — and absent from an older server — so its
|
|
169
|
+
* presence is the server saying there IS a page to send someone to.
|
|
170
|
+
*/
|
|
171
|
+
playUrl?: string;
|
|
154
172
|
publishVersion: number;
|
|
155
173
|
/** The EFFECTIVE visibility the publish landed on — set even when the request omitted it. */
|
|
156
174
|
visibility: 'public' | 'private';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/publish/client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACnE,OA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,IAAI,CACL,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY,CAChC,MAA0B,EAC1B,KAAiB,EACjB,WAAmB,EACnB,IAAa;IAEb,MAAM,eAAe,CAAC,MAAM,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,wBAAwB,EAAE,CAAC,CAAC;AAClG,CAAC"}
|
package/dist/publish/record.d.ts
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export declare function publishRecordPath(root: string): string;
|
|
2
2
|
export interface PublishRecord {
|
|
3
|
-
/** The
|
|
3
|
+
/** The versioned URL of this exact publish, exactly as api-server issued it. */
|
|
4
4
|
url: string;
|
|
5
|
+
/**
|
|
6
|
+
* The directory form that always resolves to the newest publish, and the `/play/` page when
|
|
7
|
+
* the game is public and has one. Both absent from a record written by an older CLI, or
|
|
8
|
+
* against an older api-server — readers fall back to `url`, which is what that record knew.
|
|
9
|
+
* See `promotedPublishUrl` for which one a reader should show.
|
|
10
|
+
*/
|
|
11
|
+
latestUrl?: string;
|
|
12
|
+
playUrl?: string;
|
|
5
13
|
visibility: string;
|
|
6
14
|
publishVersion: number;
|
|
7
15
|
gameId: string;
|
package/dist/publish/record.js
CHANGED
|
@@ -55,6 +55,8 @@ export function readPublishRecord(root) {
|
|
|
55
55
|
publishVersion: record.publishVersion,
|
|
56
56
|
gameId: record.gameId,
|
|
57
57
|
at: record.at,
|
|
58
|
+
...(typeof record.latestUrl === 'string' ? { latestUrl: record.latestUrl } : {}),
|
|
59
|
+
...(typeof record.playUrl === 'string' ? { playUrl: record.playUrl } : {}),
|
|
58
60
|
...(typeof record.manageUrl === 'string' ? { manageUrl: record.manageUrl } : {}),
|
|
59
61
|
...(typeof record.name === 'string' ? { name: record.name } : {}),
|
|
60
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"record.js","sourceRoot":"","sources":["../../src/publish/record.ts"],"names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C,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAClE,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of a publish's URLs to put in front of the creator.
|
|
3
|
+
*
|
|
4
|
+
* `complete` hands back three (see `CompletePublishResponse`), and the one that used to be
|
|
5
|
+
* printed — the versioned `games/<id>/indexN.html` key — is the one least worth sharing: the
|
|
6
|
+
* next publish writes `indexN+1.html`, so a link handed out today is frozen on today's build.
|
|
7
|
+
* The other two are both stable, and the choice between them is exactly the choice the portal's
|
|
8
|
+
* own My Games page makes (`playPath` vs `directPlayUrl` in `portal/src/my-games-helpers.ts`).
|
|
9
|
+
*/
|
|
10
|
+
/** The fields of a completed publish this decision needs. */
|
|
11
|
+
export interface PromotableUrls {
|
|
12
|
+
url: string;
|
|
13
|
+
visibility: string;
|
|
14
|
+
latestUrl?: string;
|
|
15
|
+
playUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The URL the creator should see and share.
|
|
19
|
+
*
|
|
20
|
+
* A public game gets its `/play/` page: that is the address with the game's name, cover and
|
|
21
|
+
* comments on it, and the one every other Bitmagic surface links to. A private game has no such
|
|
22
|
+
* page — `publishComplete` deliberately takes it down — so it gets the directory form, which is
|
|
23
|
+
* what "private" actually means here: world-readable at its own URL, simply not listed.
|
|
24
|
+
*
|
|
25
|
+
* `playUrl` is honoured only for a public publish. A game that was public a moment ago can be
|
|
26
|
+
* published private in the same breath, and a server that still sent a page URL alongside a
|
|
27
|
+
* private verdict must not talk this into linking a page that was just unlisted.
|
|
28
|
+
*/
|
|
29
|
+
export declare function promotedPublishUrl(done: PromotableUrls): string;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which of a publish's URLs to put in front of the creator.
|
|
3
|
+
*
|
|
4
|
+
* `complete` hands back three (see `CompletePublishResponse`), and the one that used to be
|
|
5
|
+
* printed — the versioned `games/<id>/indexN.html` key — is the one least worth sharing: the
|
|
6
|
+
* next publish writes `indexN+1.html`, so a link handed out today is frozen on today's build.
|
|
7
|
+
* The other two are both stable, and the choice between them is exactly the choice the portal's
|
|
8
|
+
* own My Games page makes (`playPath` vs `directPlayUrl` in `portal/src/my-games-helpers.ts`).
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The directory form of a versioned publish URL — `.../games/<id>/index7.html` becomes
|
|
12
|
+
* `.../games/<id>/`, which GCS resolves to the alias `publishComplete` keeps pointing at the
|
|
13
|
+
* newest publish.
|
|
14
|
+
*
|
|
15
|
+
* Only reached against an api-server too old to send `latestUrl`. Safe because `url` is already
|
|
16
|
+
* built from the server's own `PORTAL_URL`: this changes a path within a base the server chose,
|
|
17
|
+
* it does not guess a base. A URL that does not end in an index filename is returned unchanged —
|
|
18
|
+
* printing something real beats printing nothing.
|
|
19
|
+
*/
|
|
20
|
+
function directoryForm(url) {
|
|
21
|
+
return url.replace(/\/index\d*\.html$/, '/');
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* The URL the creator should see and share.
|
|
25
|
+
*
|
|
26
|
+
* A public game gets its `/play/` page: that is the address with the game's name, cover and
|
|
27
|
+
* comments on it, and the one every other Bitmagic surface links to. A private game has no such
|
|
28
|
+
* page — `publishComplete` deliberately takes it down — so it gets the directory form, which is
|
|
29
|
+
* what "private" actually means here: world-readable at its own URL, simply not listed.
|
|
30
|
+
*
|
|
31
|
+
* `playUrl` is honoured only for a public publish. A game that was public a moment ago can be
|
|
32
|
+
* published private in the same breath, and a server that still sent a page URL alongside a
|
|
33
|
+
* private verdict must not talk this into linking a page that was just unlisted.
|
|
34
|
+
*/
|
|
35
|
+
export function promotedPublishUrl(done) {
|
|
36
|
+
const latest = done.latestUrl ?? directoryForm(done.url);
|
|
37
|
+
return done.visibility === 'public' ? done.playUrl ?? latest : latest;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=urls.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls.js","sourceRoot":"","sources":["../../src/publish/urls.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH;;;;;;;;;GASG;AACH,SAAS,aAAa,CAAC,GAAW;IAChC,OAAO,GAAG,CAAC,OAAO,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAoB;IACrD,MAAM,MAAM,GAAG,IAAI,CAAC,SAAS,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACzD,OAAO,IAAI,CAAC,UAAU,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,IAAI,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AACxE,CAAC"}
|
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
* and everything else goes to `bitmagic forge`. The CLI cannot tell which model drives it, so the
|
|
17
17
|
* gate is the agent's own call — stated once, plainly, where the planning skill sends it.
|
|
18
18
|
*
|
|
19
|
+
* Steps 4-9 are shaped around two loops, because the first creator to use this took the whole
|
|
20
|
+
* chain — build, upload, verify, judge — round on every edit, and the costs are nothing alike: a
|
|
21
|
+
* Blender build, render and ray audit are seconds and local, while `assets add` uploads, `verify`
|
|
22
|
+
* type-checks and drives real Chrome, and `judge` spends sparks. So the geometry loop is named as
|
|
23
|
+
* the inner one, the engine handoff is gated on it being clean, and `review.py --lighting game`
|
|
24
|
+
* exists so even the lighting pass can stay inside it.
|
|
25
|
+
*
|
|
19
26
|
* Backticks and `${` are escaped for the template literal; `project-files.test.ts` checks the
|
|
20
27
|
* rendered frontmatter and that no escape leaks into the output.
|
|
21
28
|
*/
|