castle-web-cli 0.4.238 → 0.4.239
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/dist/castle-host/host.js +55 -0
- package/dist/index.js +16 -0
- package/dist/init.js +1 -1
- package/dist/multiplayerDoc.d.ts +1 -1
- package/dist/multiplayerDoc.js +9 -0
- package/dist/platformDoc.js +2 -1
- package/dist/playPagePolicy.d.ts +1 -0
- package/dist/playPagePolicy.js +8 -3
- package/dist/roomLogs.d.ts +39 -0
- package/dist/roomLogs.js +166 -0
- package/kits/base/CLAUDE.md +1 -0
- package/kits/base/castle.json +1 -1
- package/kits/base/sdk/README.md +66 -2
- package/kits/base/sdk/castle.d.ts +3 -1
- package/kits/base/sdk/castle.js +1 -0
- package/kits/base/sdk/commands.d.ts +31 -0
- package/kits/base/sdk/multiplayer.js +30 -0
- package/kits/base/sdk/rooms.d.ts +11 -0
- package/kits/base/sdk/rooms.js +22 -0
- package/kits/base/sdk/store.d.ts +8 -2
- package/kits/base/sdk/store.js +5 -1
- package/kits/hub-game/castle.json +4 -4
- package/kits/hub-game/code/client/chrome.js +3 -2
- package/kits/hub-game/code/client/menuRows.js +8 -2
- package/kits/hub-game/code/client/vehicle.js +3 -1
- package/kits/hub-game/code/client/worldLabels.js +10 -1
- package/kits/hub-game/code/server/analytics.js +5 -12
- package/kits/hub-game/code/server/doorAnalytics.js +2 -5
- package/kits/hub-game/code/server/hub.js +3 -0
- package/kits/hub-game/code/server/loadAbandon.js +2 -5
- package/kits/hub-game/code/server/trackQueue.js +29 -0
- package/kits/hub-game/code/systems/hub.js +10 -3
- package/kits/hub-game/docs/analytics.md +4 -1
- package/kits/hub-game/package.json +1 -1
- package/kits/hub-game/scripts/test-analytics.mjs +1 -1
- package/kits/hub-game/scripts/test-door-analytics.mjs +1 -1
- package/kits/hub-game/scripts/test-hub-ops.mjs +28 -0
- package/kits/hub-game/scripts/test-hub-trip.mjs +20 -1
- package/kits/hub-game/scripts/test-load-abandon.mjs +2 -2
- package/kits/hub-game/scripts/test-menu-client.mjs +1 -1
- package/kits/hub-game/scripts/test-resync.mjs +13 -0
- package/kits/hub-game/scripts/test-role-client.mjs +8 -2
- package/kits/hub-game/scripts/test-track-queue.mjs +64 -0
- package/kits/hub-game/scripts/test-vehicle-client.mjs +9 -0
- package/kits/hub-game/scripts/test-world-labels.mjs +40 -0
- package/kits/hub-game/tools/hubScene/test/export-fixture.mjs +12 -0
- package/kits/hub-game/tools/hubScene/validate-manifest.mjs +12 -2
- package/kits/multiplayer-3d/castle.json +4 -4
- package/kits/physics-3d/castle.json +2 -2
- package/kits/real-time/castle.json +2 -2
- package/package.json +1 -1
|
@@ -487,7 +487,7 @@ test('row menu has complete text columns, no icon slots and a pinned footer; clo
|
|
|
487
487
|
assert.equal(card.style.maxHeight, 'calc(100vh - 24px)');
|
|
488
488
|
assert.equal(hud.style.visibility, 'hidden'); assert.equal(prompt.style.visibility, 'hidden');
|
|
489
489
|
assert.equal(record.tag, 'div'); assert.deepEqual(record.children.map(c => c.textContent), ['1st', 'abcdefghijklmnopqrstuvwx', '500 pts']);
|
|
490
|
-
assert.equal(record.style.gridTemplateColumns, 'minmax(0,
|
|
490
|
+
assert.equal(record.style.gridTemplateColumns, 'minmax(0, 6em) minmax(4em, 1fr) minmax(0, max-content)');
|
|
491
491
|
assert(!record.children.some(c => c.attrs['aria-hidden'] === 'true'));
|
|
492
492
|
assert.equal(leave.parent.parent, card); assert.equal(leave.parent.style.flexShrink, '0');
|
|
493
493
|
assert.equal(leave.textContent, 'Back to town'); assert.equal(leave.style.minHeight, '44px'); assert.equal(leave.style.aspectRatio, '');
|
|
@@ -180,4 +180,17 @@ async function strand(game) {
|
|
|
180
180
|
assert.equal(Rehello.resumed(mp, net, at), 'world', 'a re-admission still is');
|
|
181
181
|
}
|
|
182
182
|
|
|
183
|
+
// The tests above run the kits' source; a deck runs hub-game's pins. A pin from
|
|
184
|
+
// before the resync left the hook here with no client to ask for it: an iPhone
|
|
185
|
+
// back from a 180 s app switch kept the Act prompts the host dropped, and its
|
|
186
|
+
// Talk to Rowan never came (rota harness/server-after/not-acknowledged).
|
|
187
|
+
{
|
|
188
|
+
const { readFileSync } = await import('node:fs');
|
|
189
|
+
const imports = JSON.parse(readFileSync(new URL('../castle.json', import.meta.url), 'utf8')).imports;
|
|
190
|
+
const resyncSince = { 'castle.real-time': '2026-10-21T18:37:16.504Z', 'castle.multiplayer-3d': '2026-10-21T18:38:54.798Z' };
|
|
191
|
+
for (const [kit, since] of Object.entries(resyncSince)) {
|
|
192
|
+
assert.ok(Date.parse(imports[kit]?.version) >= Date.parse(since), `${kit} is pinned before its first resync publish (${since})`);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
183
196
|
console.log('test-resync: ok');
|
|
@@ -240,11 +240,15 @@ test('role chips may overlap the viewer body but still clear HUD and controls; o
|
|
|
240
240
|
const scene = sceneOf(), roles = new Map([['me', police], ['p2', doctor]]);
|
|
241
241
|
const items = () => Role.roleItems(scene, scene.local, {}, {}, roles, (cam, x) => ({ x: 287 + x * 50, y: 72 }));
|
|
242
242
|
const sign = { id: 'sign', x: 287, y: 121, text: 'Sign' };
|
|
243
|
-
|
|
243
|
+
// `hub.mark` tags (a Plaster, a Ticket) over the viewer's own head and another's.
|
|
244
|
+
const marks = [{ id: 'mark:me', x: 287, y: 90, text: 'Plaster', color: '#f4efe6' }, { id: 'mark:p2', x: 400, y: 90, text: 'Ticket', color: '#f4c04d' }];
|
|
245
|
+
chrome.setLabels([...items(), sign, ...marks]);
|
|
244
246
|
const own = dom.made.find((node) => node.textContent === 'Police');
|
|
245
247
|
const remote = dom.made.find((node) => node.textContent === 'Doctor');
|
|
246
248
|
const ordinary = dom.made.find((node) => node.textContent === 'Sign');
|
|
247
|
-
|
|
249
|
+
const ownMark = dom.made.find((node) => node.textContent === 'Plaster');
|
|
250
|
+
const remoteMark = dom.made.find((node) => node.textContent === 'Ticket');
|
|
251
|
+
for (const node of [own, remote, ordinary, ownMark, remoteMark]) {
|
|
248
252
|
Object.defineProperty(node, 'rect', { get: () => {
|
|
249
253
|
const x = parseFloat(node.style.left), y = parseFloat(node.style.top);
|
|
250
254
|
return { left: x - 40, right: x + 40, top: y - 24, bottom: y };
|
|
@@ -255,6 +259,8 @@ test('role chips may overlap the viewer body but still clear HUD and controls; o
|
|
|
255
259
|
assert.notEqual(own.style.visibility, 'hidden', 'own role belongs over the local body');
|
|
256
260
|
assert.notEqual(remote.style.visibility, 'hidden', 'remote role may overlap the viewer body');
|
|
257
261
|
assert.equal(ordinary.style.visibility, 'hidden');
|
|
262
|
+
assert.notEqual(ownMark.style.visibility, 'hidden', 'own timed tag is drawn over the local body');
|
|
263
|
+
assert.notEqual(remoteMark.style.visibility, 'hidden', 'remote tag may overlap the viewer body');
|
|
258
264
|
roles.delete('me');
|
|
259
265
|
chrome.setLabels([...items(), sign]); chrome.flushWorldLabels();
|
|
260
266
|
assert.notEqual(remote.style.visibility, 'hidden', 'remote role may overlap the viewer body without the own chip');
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import * as A from '../code/server/analytics.js';
|
|
3
|
+
import * as D from '../code/server/doorAnalytics.js';
|
|
4
|
+
import { TRACK_IN_FLIGHT, TRACK_QUEUE_MAX } from '../code/server/trackQueue.js';
|
|
5
|
+
// The host refuses a hubTrack while two are in flight per session, the way
|
|
6
|
+
// cauldron host-agent's storage broker does, and answers on a later turn.
|
|
7
|
+
function host() {
|
|
8
|
+
const recorded = [], refused = [], answers = [];
|
|
9
|
+
let inFlight = 0;
|
|
10
|
+
const session = { players: [{ playerId: 'p' }], hub: { track(playerId, event) {
|
|
11
|
+
if (inFlight >= 2) { refused.push(event); return Promise.resolve(false); }
|
|
12
|
+
inFlight += 1;
|
|
13
|
+
return new Promise((resolve) => answers.push(() => { inFlight -= 1; recorded.push(event); resolve(true); }));
|
|
14
|
+
} } };
|
|
15
|
+
const settle = async () => { while (answers.length) { answers.shift()(); await new Promise((r) => setImmediate(r)); } };
|
|
16
|
+
return { session, recorded, refused, settle, inFlight: () => inFlight };
|
|
17
|
+
}
|
|
18
|
+
const handle = (session) => ({ place: { analytics: true }, manifest: {}, sim: { timeMs: 0 }, session,
|
|
19
|
+
players: new Map([['p', { arrived: true }]]), analytics: A.create() });
|
|
20
|
+
{
|
|
21
|
+
// A purchase in one tick: token_spent plus a pulse's start and outcome.
|
|
22
|
+
const s = host(), h = handle(s.session);
|
|
23
|
+
assert.equal(A.track(h, 'p', 'token_spent', { subject: 8, value: 3 }), true);
|
|
24
|
+
assert.equal(A.track(h, 'p', 'activity_start', { subject: 8 }), true);
|
|
25
|
+
assert.equal(A.track(h, 'p', 'outcome', { subject: 8, result: 1 }), true);
|
|
26
|
+
assert.equal(D.track(h, 'p', 'door_progress', { value: 1, result: 1 }), true);
|
|
27
|
+
assert.equal(s.inFlight(), TRACK_IN_FLIGHT, 'never more than the host allows in flight');
|
|
28
|
+
await s.settle();
|
|
29
|
+
assert.deepEqual(s.refused, [], 'the host refuses nothing');
|
|
30
|
+
assert.deepEqual(s.recorded.map((e) => e.kind), [20, 5, 7, 30], 'every row arrives, in order');
|
|
31
|
+
}
|
|
32
|
+
{
|
|
33
|
+
// A runaway deck cannot grow memory: past the bound, rows are refused at once.
|
|
34
|
+
const s = host(), h = handle(s.session);
|
|
35
|
+
let accepted = 0;
|
|
36
|
+
for (let i = 0; i < TRACK_IN_FLIGHT + TRACK_QUEUE_MAX + 50; i++) {if (A.track(h, 'p', 'outcome', { value: i })) {accepted++;}}
|
|
37
|
+
assert.equal(accepted, TRACK_IN_FLIGHT + TRACK_QUEUE_MAX);
|
|
38
|
+
await s.settle();
|
|
39
|
+
assert.equal(s.recorded.length, accepted);
|
|
40
|
+
assert.deepEqual(s.refused, []);
|
|
41
|
+
assert.deepEqual(s.recorded.map((e) => e.value), [...Array(accepted).keys()]);
|
|
42
|
+
}
|
|
43
|
+
{
|
|
44
|
+
// Each session has its own two slots; a scene change does not share a queue.
|
|
45
|
+
const a = host(), b = host(), h = handle(a.session);
|
|
46
|
+
for (let i = 0; i < 3; i++) {A.track(h, 'p', 'outcome');}
|
|
47
|
+
h.session = b.session;
|
|
48
|
+
for (let i = 0; i < 3; i++) {A.track(h, 'p', 'outcome');}
|
|
49
|
+
assert.equal(a.inFlight(), 2); assert.equal(b.inFlight(), 2);
|
|
50
|
+
await a.settle(); await b.settle();
|
|
51
|
+
assert.equal(a.recorded.length, 3); assert.equal(b.recorded.length, 3);
|
|
52
|
+
}
|
|
53
|
+
{
|
|
54
|
+
// A refused or thrown send frees its slot; an old host without track records nothing.
|
|
55
|
+
let n = 0;
|
|
56
|
+
const session = { hub: { track: () => (++n % 2 ? Promise.reject(new Error('down')) : (() => { throw new Error('sync'); })()) } };
|
|
57
|
+
const h = handle(session);
|
|
58
|
+
for (let i = 0; i < 6; i++) {A.track(h, 'p', 'outcome');}
|
|
59
|
+
await new Promise((r) => setImmediate(r));
|
|
60
|
+
assert(n >= 4, 'rejections free their slots');
|
|
61
|
+
assert.equal(A.track(handle({ hub: {} }), 'p', 'outcome'), false);
|
|
62
|
+
assert.equal(A.track(handle(null), 'p', 'outcome'), false);
|
|
63
|
+
}
|
|
64
|
+
console.log('track queue ok');
|
|
@@ -104,6 +104,15 @@ const near = (a, b) => assert.ok(Math.abs(a - b) < 1e-8, `${a} ≈ ${b}`);
|
|
|
104
104
|
// Both Player camera/control branches call the same generic seam.
|
|
105
105
|
let calls = 0; scene.playerDrive = { step() {calls++;} }; scene.cameraControl = 'orbit';
|
|
106
106
|
new Player(local.components.Player).update(local, scene, 0.1); assert.equal(calls, 1);
|
|
107
|
+
// A look swap while driving keeps the speed; a dynamics change does not.
|
|
108
|
+
const drive = () => {impulses.length = 0; new Player(local.components.Player).update(local, scene, 0.1); return Math.max(...impulses.map(v => v.z));};
|
|
109
|
+
v.clear(); scene.physics3d.setVelocity(local, { x: 0, y: 0, z: 0 });
|
|
110
|
+
hub.cars = { me: car() }; v.frame(scene, local, hub.cars); drive(); drive(); const third = drive();
|
|
111
|
+
hub.cars = { me: { ...hub.cars.me, look: 'car-lit', color: '#0000ff' } }; v.frame(scene, local, hub.cars);
|
|
112
|
+
assert.ok(drive() > third, 'a look swap keeps accelerating from the current speed');
|
|
113
|
+
hub.cars = { me: { ...hub.cars.me, speed: 20 } }; v.frame(scene, local, hub.cars);
|
|
114
|
+
const fresh = drive(); hub.cars = { me: car() }; v.clear(); v.frame(scene, local, hub.cars);
|
|
115
|
+
near(fresh, drive());
|
|
107
116
|
// Restore only a seam we own; another system's replacement stays installed.
|
|
108
117
|
v.clear(); assert.equal(scene.playerDrive.step instanceof Function, true);
|
|
109
118
|
delete scene.cameraControl; scene.playerDrive = previous; v.frame(scene, local, hub.cars); v.frame(scene, local, {}); assert.equal(scene.playerDrive, previous);
|
|
@@ -155,6 +155,46 @@ console.log('world labels: bounded nearest tags, objective precedence, HUD/colum
|
|
|
155
155
|
console.log('world labels: snapshot caption reflow, shift/hide retention, repeated flush and restored-width clearance passed');
|
|
156
156
|
}
|
|
157
157
|
|
|
158
|
+
// A caption measured wholly off-screen (the Life RP repro: "2 here" at y
|
|
159
|
+
// 11702 in a 574x246 frame) is not slotted into a band labels must clear.
|
|
160
|
+
// An on-screen caption still takes its band and collapses a label under it.
|
|
161
|
+
{
|
|
162
|
+
const view = () => ({ w: 574, h: 246 });
|
|
163
|
+
const parked = node(box(118, 11702, 448, 21));
|
|
164
|
+
const chip = node(box(240, 78, 80, 20));
|
|
165
|
+
// A left column, top HUD and tall bottom bar leave 71..92 as the nearest band.
|
|
166
|
+
const controls = [node(box(0, 0, 110, 246)), node(box(118, 0, 448, 56)), node(box(118, 100, 448, 146))];
|
|
167
|
+
makeWorldLayout(() => [{ id: 'engine-look', kind: 'text', node: parked },
|
|
168
|
+
...controls.map((control) => ({ kind: 'control', node: control })), { kind: 'label', node: chip }], view).flush();
|
|
169
|
+
assert.equal(parked.style.translate, undefined, 'off-screen caption is not moved into view');
|
|
170
|
+
assert.equal(chip.style.visibility, undefined, 'near role chip stays shown');
|
|
171
|
+
|
|
172
|
+
const shown = node(box(118, 90, 448, 21));
|
|
173
|
+
const label = node(box(240, 78, 80, 32));
|
|
174
|
+
makeWorldLayout(() => [{ id: 'engine-look', kind: 'text', node: shown },
|
|
175
|
+
{ kind: 'label', node: label }], view).flush();
|
|
176
|
+
assert.equal(shown.style.translate, undefined, 'on-screen caption keeps its own band');
|
|
177
|
+
assert.equal(label.style.visibility, 'hidden', 'labels still clear an on-screen caption');
|
|
178
|
+
|
|
179
|
+
// Safe layout's `!important` translate outranks inline writes: the caption
|
|
180
|
+
// stays drawn at 150..171 whatever this pass writes. Across frames it must
|
|
181
|
+
// not be moved or measured anywhere else, so labels keep clearing it there.
|
|
182
|
+
const owned = node(box(118, 150, 448, 21));
|
|
183
|
+
owned.getBoundingClientRect = () => ({ ...box(118, 150, 448, 21), width: 448, height: 21 });
|
|
184
|
+
owned.hasAttribute = (name) => name === 'data-hub-safe-translate';
|
|
185
|
+
const over = node(box(240, 145, 80, 20)), clear = node(box(240, 78, 80, 20));
|
|
186
|
+
const frames = makeWorldLayout(() => [{ id: 'engine-look', kind: 'text', node: owned },
|
|
187
|
+
...[box(0, 0, 110, 246), box(118, 0, 448, 56), box(118, 165, 448, 81)].map((at) => ({ kind: 'control', node: node(at) })),
|
|
188
|
+
{ kind: 'label', node: over }, { kind: 'label', node: clear }], view);
|
|
189
|
+
for (let frame = 0; frame < 40; frame++) {
|
|
190
|
+
frames.flush();
|
|
191
|
+
assert.equal(owned.style.translate, undefined, `frame ${frame}: safe-placed caption is not moved again`);
|
|
192
|
+
assert.equal(over.style.visibility, 'hidden', `frame ${frame}: label over the drawn caption collapses`);
|
|
193
|
+
assert.notEqual(clear.style.visibility, 'hidden', `frame ${frame}: label clear of it stays shown`);
|
|
194
|
+
}
|
|
195
|
+
console.log('world labels: off-screen caption claims no band; safe-placed caption holds; on-screen caption unchanged passed');
|
|
196
|
+
}
|
|
197
|
+
|
|
158
198
|
// Visible prompt copy can gain a line without ever entering caption reflow.
|
|
159
199
|
{
|
|
160
200
|
const { fakeDom } = await import('./fixtures/fake-dom.mjs');
|
|
@@ -117,6 +117,18 @@ try {
|
|
|
117
117
|
assert.ok(wearFaults({ wearPieces: null }).includes('wearPieces is not an object'));
|
|
118
118
|
const missingHat = { ...m.wearModels }; delete missingHat['hat/police-cap'];
|
|
119
119
|
assert.ok(wearFaults({ wearModels: missingHat }).includes('wearModels: missing hat/police-cap'));
|
|
120
|
+
// export-hub --deck-wear: what source.wear.deck.leftOut lists may be absent, with its pieces; nothing
|
|
121
|
+
// else may, and a listed id must be a kit wear model that is really absent.
|
|
122
|
+
const deckOnly = (leftOut, models = m.wearModels, pieces = m.wearPieces) =>
|
|
123
|
+
wearFaults({ source: { ...m.source, wear: { ...m.source.wear, deck: { models: 0, leftOut } } }, wearModels: models, wearPieces: pieces });
|
|
124
|
+
const noRole = Object.fromEntries(Object.entries(m.wearModels).filter(([id]) => !id.startsWith('role/') && id !== 'hat/police-cap'));
|
|
125
|
+
const noRolePieces = Object.fromEntries(Object.entries(m.wearPieces).filter(([id]) => !id.startsWith('role/')));
|
|
126
|
+
const roleIds = Object.keys(m.wearModels).filter((id) => id.startsWith('role/'));
|
|
127
|
+
assert.deepEqual(deckOnly(['hats/police-cap', ...roleIds], noRole, noRolePieces), []);
|
|
128
|
+
assert.ok(deckOnly(roleIds, noRole, noRolePieces).includes('wearModels: missing hat/police-cap'));
|
|
129
|
+
assert.ok(deckOnly(['hats/police-cap', ...roleIds], { ...noRole, 'role/tool-torch': m.wearModels['role/tool-torch'] }, noRolePieces).includes('wearModels role/tool-torch: listed as left out'));
|
|
130
|
+
assert.ok(deckOnly(['hats/police-cap', 'hats/nonsense', ...roleIds], noRole, noRolePieces).includes('source.wear.deck.leftOut: hat/nonsense is not a kit wear model'));
|
|
131
|
+
assert.ok(deckOnly(['hats/police-cap', ...roleIds], noRole, m.wearPieces).includes('wearPieces role/top-vest: no model'));
|
|
120
132
|
const badWear = { ...m.wearModels, 'role/top-vest': { ...m.wearModels['role/top-vest'], uri: '../shared/missing.glb' } };
|
|
121
133
|
assert.ok(wearFaults({ wearModels: badWear }).some((fault) => fault.startsWith('asset wearModels role/top-vest:') && fault.endsWith('missing')));
|
|
122
134
|
const benchLayers = m.layers.filter((l) => l.role === 'prop');
|
|
@@ -66,9 +66,19 @@ export function validateManifest(m, dir, { hash = true } = {}) {
|
|
|
66
66
|
...ROLE_TOPS.flatMap((id) => [`role/top-${id}`, `role/square/top-${id}`]),
|
|
67
67
|
...ROLE_TOOLS.map((id) => `role/tool-${id}`),
|
|
68
68
|
];
|
|
69
|
+
// castle-client export-hub --deck-wear builds only the wear models the deck's own bundle ships
|
|
70
|
+
// and lists the kit's others in source.wear.deck.leftOut ('hats/<id>', 'role/...'): those may be
|
|
71
|
+
// absent (with their pieces), never present; every other id is still required.
|
|
72
|
+
const deck = m.source?.wear?.deck;
|
|
73
|
+
const leftOut = new Set(isObj(deck) && Array.isArray(deck.leftOut) ? deck.leftOut.map((rel) => String(rel).replace(/^hats\//, 'hat/')) : []);
|
|
74
|
+
if (isObj(deck) && !Array.isArray(deck.leftOut)) fault('source.wear.deck.leftOut is not a list');
|
|
69
75
|
if (!isObj(m.wearModels)) fault('wearModels is not an object');
|
|
70
76
|
else {
|
|
71
|
-
for (const id of requiredModels) if (!Object.hasOwn(m.wearModels, id)) fault(`wearModels: missing ${id}`);
|
|
77
|
+
for (const id of requiredModels) if (!Object.hasOwn(m.wearModels, id) && !leftOut.has(id)) fault(`wearModels: missing ${id}`);
|
|
78
|
+
for (const id of leftOut) {
|
|
79
|
+
if (!requiredModels.includes(id)) fault(`source.wear.deck.leftOut: ${id} is not a kit wear model`);
|
|
80
|
+
else if (Object.hasOwn(m.wearModels, id)) fault(`wearModels ${id}: listed as left out`);
|
|
81
|
+
}
|
|
72
82
|
for (const [id, asset] of Object.entries(m.wearModels)) {
|
|
73
83
|
if (!/^(hat|earned|role)\/(square\/)?[a-z0-9-]+$/.test(id)) fault(`wearModels ${id}: id`);
|
|
74
84
|
if (asset?.type !== 'glb') fault(`wearModels ${id}: not a glb asset`);
|
|
@@ -86,7 +96,7 @@ export function validateManifest(m, dir, { hash = true } = {}) {
|
|
|
86
96
|
]);
|
|
87
97
|
if (!isObj(m.wearPieces)) fault('wearPieces is not an object');
|
|
88
98
|
else {
|
|
89
|
-
for (const id of Object.keys(anchors)) if (!Object.hasOwn(m.wearPieces, id)) fault(`wearPieces: missing ${id}`);
|
|
99
|
+
for (const id of Object.keys(anchors)) if (!Object.hasOwn(m.wearPieces, id) && !leftOut.has(id)) fault(`wearPieces: missing ${id}`);
|
|
90
100
|
for (const [id, piece] of Object.entries(m.wearPieces)) {
|
|
91
101
|
if (!isObj(piece)) { fault(`wearPieces ${id}: not an object`); continue; }
|
|
92
102
|
if (!anchors[id] || piece.anchor !== anchors[id]) fault(`wearPieces ${id}: anchor`);
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
"imports": {
|
|
8
8
|
"castle.real-time": {
|
|
9
9
|
"deckId": "xFVr-afOLuUQ",
|
|
10
|
-
"version": "2026-10-
|
|
10
|
+
"version": "2026-10-23T12:14:35.623Z"
|
|
11
11
|
},
|
|
12
12
|
"castle.physics-3d": {
|
|
13
13
|
"deckId": "JH0SclbPVP0y",
|
|
14
|
-
"version": "2026-10-
|
|
14
|
+
"version": "2026-10-23T12:14:42.092Z"
|
|
15
15
|
},
|
|
16
16
|
"castle.physics-2d": {
|
|
17
17
|
"deckId": "ckRZGFW4iPrx",
|
|
@@ -20,13 +20,13 @@
|
|
|
20
20
|
},
|
|
21
21
|
"castle.base": {
|
|
22
22
|
"deckId": "yRcmH4_aYllE",
|
|
23
|
-
"version": "2026-10-
|
|
23
|
+
"version": "2026-10-23T12:08:44.010Z"
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"autoUpdateWhenImported": true,
|
|
27
27
|
"deckId": "ZwA_P_-VO-Qh",
|
|
28
28
|
"cardId": "bvRmCzyUpt_a",
|
|
29
|
-
"publishedVersion": "2026-10-
|
|
29
|
+
"publishedVersion": "2026-10-23T12:15:36.617Z",
|
|
30
30
|
"main": "main.jsx",
|
|
31
31
|
"server": {
|
|
32
32
|
"main": "code/server/index.js",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
},
|
|
55
55
|
"castle.base": {
|
|
56
56
|
"deckId": "yRcmH4_aYllE",
|
|
57
|
-
"version": "2026-10-
|
|
57
|
+
"version": "2026-10-23T12:08:44.010Z"
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"main": "main.jsx",
|
|
61
61
|
"autoUpdateWhenImported": true,
|
|
62
62
|
"deckId": "JH0SclbPVP0y",
|
|
63
63
|
"cardId": "eXfAaUdbSU5A",
|
|
64
|
-
"publishedVersion": "2026-10-
|
|
64
|
+
"publishedVersion": "2026-10-23T12:14:42.092Z"
|
|
65
65
|
}
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
"imports": {
|
|
4
4
|
"castle.base": {
|
|
5
5
|
"deckId": "yRcmH4_aYllE",
|
|
6
|
-
"version": "2026-10-
|
|
6
|
+
"version": "2026-10-23T12:08:44.010Z"
|
|
7
7
|
}
|
|
8
8
|
},
|
|
9
9
|
"autoUpdateWhenImported": true,
|
|
10
10
|
"deckId": "xFVr-afOLuUQ",
|
|
11
11
|
"cardId": "w6G45sy3_P_m",
|
|
12
|
-
"publishedVersion": "2026-10-
|
|
12
|
+
"publishedVersion": "2026-10-23T12:14:35.623Z"
|
|
13
13
|
}
|