@wildshard/engine 0.1.18 → 0.1.19
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/CHANGELOG.md +8 -0
- package/budgets/shard-size-baseline.json +10 -4
- package/index.html +6 -4
- package/lint/engine-sides.json +14 -0
- package/lint/ratchet.json +0 -68
- package/lint/ratchet.mjs +1 -4
- package/package.json +17 -15
- package/scripts/agent-sync.mjs +27 -8
- package/scripts/app-build/appCook.ts +8 -2
- package/scripts/app-build/catalogue.ts +10 -7
- package/scripts/app-build/gen.ts +22 -2
- package/scripts/app-build/isolation.d.mts +10 -0
- package/scripts/app-build/isolation.mjs +47 -0
- package/scripts/app-build/outputProducts.mjs +4 -0
- package/scripts/app-build/previousDeploy.d.mts +2 -0
- package/scripts/app-build/previousDeploy.mjs +10 -1
- package/scripts/app-build/serviceWorker.ts +10 -3
- package/scripts/app-build/splitOutput.mjs +4 -2
- package/scripts/app-build/standaloneOutput.d.mts +1 -1
- package/scripts/app-build/standaloneOutput.mjs +5 -3
- package/scripts/app-build/titlePreloads.d.mts +8 -0
- package/scripts/app-build/titlePreloads.mjs +69 -0
- package/scripts/app-build/worldMapAtlas.ts +10 -6
- package/scripts/app-build-pipeline.mjs +31 -3
- package/scripts/built-product.mjs +1 -1
- package/scripts/cell-mem-bench.mjs +81 -23
- package/scripts/check-custom-sections-zero.mjs +1 -1
- package/scripts/check-devserver.mjs +2 -0
- package/scripts/check-models.mjs +2 -0
- package/scripts/check-paths.allow.json +0 -115
- package/scripts/check-paths.mjs +2 -2
- package/scripts/check-platform-ratchets.mjs +2 -3
- package/scripts/chromium-keychain.d.mts +1 -1
- package/scripts/ci-static.sh +1 -1
- package/scripts/committed-fast-checks.mjs +0 -2
- package/scripts/content-sw-proof.mjs +2 -1
- package/scripts/cook-worker.mjs +9 -3
- package/scripts/cook.mjs +18 -5
- package/scripts/docs-inputs-proof.mjs +6 -6
- package/scripts/e7-voice-staging-proof.mjs +1 -1
- package/scripts/gate-related-tests.mjs +1 -1
- package/scripts/git-source-view.mjs +1 -1
- package/scripts/goldens/capture.mjs +17 -5
- package/scripts/grid-crossing-nightly.mjs +59 -0
- package/scripts/grid-crossing-qa.mjs +44 -0
- package/scripts/grid-crossing-ratchet.d.mts +6 -0
- package/scripts/grid-crossing-ratchet.mjs +52 -0
- package/scripts/grid-crossing-report.mjs +122 -0
- package/scripts/grid-crossing-stages.mjs +47 -0
- package/scripts/grid-crossing-tour.mjs +277 -0
- package/scripts/grid-crossing-walk-proof.mjs +124 -17
- package/scripts/host-ruler/roots.mjs +2 -2
- package/scripts/host-ruler.d.mts +91 -0
- package/scripts/host-ruler.mjs +565 -0
- package/scripts/live-prepush.py +3 -5
- package/scripts/loading-flow/benchmax.mjs +3 -1
- package/scripts/look-loop/test_look_loop.py +1 -38
- package/scripts/memory-proof.mjs +61 -6
- package/scripts/mmo-bots.mjs +8 -2
- package/scripts/net-lag-proof.mjs +219 -0
- package/scripts/night-market-kit-budget.mjs +2 -2
- package/scripts/offline-proof-rules.d.mts +2 -2
- package/scripts/offline-proof-rules.mjs +15 -4
- package/scripts/offline-proof.mjs +74 -13
- package/scripts/{shard-platform-output.mjs → output-reader.mjs} +1 -1
- package/scripts/page-release/content.d.mts +9 -1
- package/scripts/page-release/content.mjs +131 -17
- package/scripts/page-release/flow.mjs +36 -10
- package/scripts/page-release/stamp-content.mjs +24 -0
- package/scripts/page-release.mjs +28 -6
- package/scripts/page-size.mjs +2 -1
- package/scripts/pin-packs.ts +1 -1
- package/scripts/pins.ts +4 -4
- package/scripts/precommit-checks.mjs +1 -7
- package/scripts/precommit-jobs.mjs +0 -1
- package/scripts/precommit-source.py +1 -9
- package/scripts/program-discovery.mjs +1 -1
- package/scripts/ring-cook.mjs +2 -1
- package/scripts/ring-step.ts +1 -1
- package/scripts/script-scenario-metrics.mjs +1 -1
- package/scripts/shard-output-content.d.mts +1 -1
- package/scripts/shard-output-content.mjs +2 -2
- package/scripts/shard-outputs.mjs +1 -1
- package/scripts/shard-public.mjs +1 -1
- package/scripts/shard-wire-meter.mjs +24 -9
- package/scripts/side-parity.mjs +4 -2
- package/scripts/standalone-smoke.mjs +8 -3
- package/scripts/tier-textures.mjs +22 -4
- package/scripts/tile-bake-report.mjs +1 -1
- package/scripts/tile-bakes.mjs +1 -1
- package/scripts/title-assets.generated.json +2 -0
- package/scripts/tsconfig.json +0 -2
- package/scripts/vendor/basisu/LICENSE +201 -0
- package/scripts/vendor/basisu/basis_encoder.cjs +2 -0
- package/scripts/vendor/basisu/basis_encoder.wasm +0 -0
- package/scripts/vitest-push-guards.config.ts +1 -1
- package/scripts/vps/harden-apply.sh +4 -1
- package/scripts/vps/harden-prometheus.sh +176 -0
- package/scripts/vps/harden.sh +16 -0
- package/scripts/vps/rebuild.sh +18 -0
- package/scripts/vps/wildshard-config +6 -2
- package/scripts/worker-client-play.mjs +6 -2
- package/scripts/worktree-reap.mjs +5 -5
- package/src/.oxlintrc.json +3 -182
- package/src/client/app/entry.ts +10 -2
- package/src/client/engine/boot/bootCache.ts +2 -2
- package/src/client/engine/boot/bootTrace.ts +12 -4
- package/src/client/engine/boot/browserChunkRecovery.ts +4 -0
- package/src/client/engine/boot/clearDownloads.ts +5 -2
- package/src/client/engine/boot/contentRead.ts +11 -0
- package/src/client/engine/boot/gpuFiles.ts +4 -2
- package/src/client/engine/boot/lastEnd.ts +99 -12
- package/src/client/engine/boot/texturePack.ts +2 -2
- package/src/client/engine/net/netPlayer.ts +19 -2
- package/src/client/engine/net/otherPlayers.ts +55 -8
- package/src/client/engine/net/predictor.ts +33 -9
- package/src/client/engine/net/redial.ts +29 -6
- package/src/client/engine/pwa/cacheNames.ts +58 -1
- package/src/client/engine/pwa/sw.js +41 -11
- package/src/client/engine/render/dataLook.ts +152 -40
- package/src/client/engine/render/families/detail.ts +89 -0
- package/src/client/engine/render/families/pbr.ts +7 -1
- package/src/client/engine/render/look.ts +6 -0
- package/src/client/engine/render/lookLight.ts +103 -11
- package/src/client/engine/render/lookRender.ts +105 -0
- package/src/client/engine/saves/indexed.ts +2 -2
- package/src/client/engine/telemetry/browserErrors.ts +24 -3
- package/src/client/engine/telemetry/staleBuildReport.ts +22 -1
- package/src/client/engine/ui/debugOptions.ts +1 -1
- package/src/client/engine/ui/lookLightOption.ts +10 -6
- package/src/client/engine/ui/namePrompt.ts +7 -0
- package/src/client/game/boot/audio.generated.ts +114 -114
- package/src/client/game/boot/bytes.generated.ts +118 -220
- package/src/client/game/boot/placedSpawn.ts +35 -0
- package/src/client/game/boot/spawnDownload.ts +25 -6
- package/src/client/game/boot/versions.generated.ts +7 -5
- package/src/client/game/devScene/hook.ts +291 -0
- package/src/client/game/grid/cellLoading.ts +12 -2
- package/src/client/game/grid/live.ts +112 -16
- package/src/client/game/grid/liveSession.ts +33 -2
- package/src/client/game/grid/mapAtlas.ts +18 -4
- package/src/client/game/grid/minimapBlend.ts +15 -5
- package/src/client/game/grid/oneWayIn.ts +5 -1
- package/src/client/game/grid/placedCells.ts +114 -12
- package/src/client/game/grid/placedContent.ts +85 -0
- package/src/client/game/grid/prefetch.ts +9 -1
- package/src/client/game/grid/productInputs.ts +3 -1
- package/src/client/game/grid/productLeases.ts +4 -1
- package/src/client/game/grid/products.ts +8 -4
- package/src/client/game/grid/roadLook.ts +24 -15
- package/src/client/game/grid/roadLookPlatform.ts +4 -2
- package/src/client/game/grid/roadResources.ts +24 -0
- package/src/client/game/grid/roadSign.worker.ts +4 -3
- package/src/client/game/grid/roadSignPaint.ts +16 -5
- package/src/client/game/grid/roadSignPreparation.ts +4 -3
- package/src/client/game/grid/roadSignScale.ts +8 -0
- package/src/client/game/grid/roadTileCapture.worker.ts +3 -1
- package/src/client/game/grid/roadTileCaptureWorker.ts +2 -1
- package/src/client/game/grid/roadTileWrite.worker.ts +4 -2
- package/src/client/game/grid/roadTileWriter.ts +2 -1
- package/src/client/game/grid/screenReports.ts +39 -0
- package/src/client/game/grid/session.ts +20 -4
- package/src/client/game/grid/softWallLook.ts +25 -8
- package/src/client/game/mainMenu.ts +6 -2
- package/src/client/game/plugin/context.ts +2 -1
- package/src/client/game/plugin/followedMovers.ts +7 -1
- package/src/client/game/quest/figures.ts +2 -0
- package/src/client/game/session/finish.ts +6 -0
- package/src/client/game/shardfile/assetCache.ts +4 -4
- package/src/client/game/shardfile/client.ts +4 -1
- package/src/client/game/shardfile/clientAssets.ts +9 -5
- package/src/client/game/shardfile/clientLibrary.ts +1 -1
- package/src/client/game/shardfile/clientWater.ts +51 -9
- package/src/client/game/shardfile/clientWorker.ts +19 -7
- package/src/client/game/shardfile/look.ts +8 -3
- package/src/client/game/shardfile/product.ts +34 -7
- package/src/client/game/shardfile/productChecks.ts +2 -2
- package/src/client/game/shardfile/productCost.ts +2 -2
- package/src/client/game/shardfile/readAsset.ts +2 -2
- package/src/client/game/shardfile/reflectingWater.ts +73 -0
- package/src/client/game/shardfile/seatGrace.ts +9 -0
- package/src/client/game/shardfile/skinPlayback.ts +1 -1
- package/src/client/game/systems/npc/figureRows.ts +9 -0
- package/src/client/host/online/doctor.ts +2 -0
- package/src/client/host/online/linkScreens.ts +30 -4
- package/src/client/host/standalone/shell.ts +4 -0
- package/src/cook/game/astc6Encode.ts +55 -0
- package/src/cook/game/astc6Wasm.ts +176 -0
- package/src/cook/game/cookJob.ts +30 -6
- package/src/cook/game/cookWorker.ts +38 -11
- package/src/cook/game/entryTotals.ts +51 -24
- package/src/cook/game/shardCook.ts +35 -7
- package/src/cook/game/spawnParts.ts +33 -8
- package/src/cook/game/tierTextures.ts +87 -14
- package/src/server/engine/ai/bossContenders.ts +27 -3
- package/src/server/engine/ai/phases.ts +1 -1
- package/src/server/engine/entities/creatureRefill.ts +9 -2
- package/src/server/engine/net/ledgerBook.ts +2 -0
- package/src/server/engine/net/room.ts +15 -0
- package/src/server/engine/sim/respawn.ts +8 -0
- package/src/server/game/boss/arenaRoomEntry.ts +5 -1
- package/src/server/game/boss/arenaRoomNative.ts +2 -0
- package/src/server/game/boss/native.ts +2 -1
- package/src/server/game/boss/nativeWake.ts +9 -5
- package/src/server/game/boss/openArenaNative.ts +2 -2
- package/src/server/game/boss/openArenaRoom.ts +3 -1
- package/src/server/game/grid/room.ts +44 -3
- package/src/server/game/grid/simulation.ts +23 -0
- package/src/server/game/population/mixedRoster.ts +11 -3
- package/src/server/game/population/nativeBake.ts +8 -3
- package/src/server/game/population/nativeReturns.ts +6 -3
- package/src/server/game/population/roster.ts +5 -3
- package/src/server/game/quest/eliteDrops.ts +15 -4
- package/src/server/game/quest/nativeChapter.ts +1 -1
- package/src/server/game/quest/nativeComposition.ts +5 -1
- package/src/server/game/riding/nativeTaming.ts +10 -6
- package/src/server/game/riding/wildRefill.ts +3 -2
- package/src/server/game/shardfile/bossRow.ts +4 -2
- package/src/server/game/shardfile/homeKeeper.ts +4 -2
- package/src/server/host/bake/headlessWorker.ts +1 -1
- package/src/server/host/dedicated/cellHost.ts +98 -16
- package/src/server/host/dedicated/cellProtocol.ts +16 -1
- package/src/server/host/dedicated/cellWorker.ts +8 -5
- package/src/server/host/dedicated/dedicatedRoom.ts +16 -6
- package/src/server/host/dedicated/gridCells.ts +15 -6
- package/src/server/host/dedicated/loopLag.ts +21 -0
- package/src/server/host/dedicated/main.ts +13 -5
- package/src/server/host/dedicated/packReader.ts +3 -3
- package/src/server/host/dedicated/placementFile.ts +3 -2
- package/src/server/host/dedicated/roadRoom.ts +34 -4
- package/src/server/host/dedicated/serverMetrics.ts +126 -0
- package/src/server/host/dedicated/socketPump.ts +21 -4
- package/src/server/host/dedicated/workerTable.ts +15 -4
- package/src/server/host/dedicated/world.ts +65 -7
- package/src/server/host/headless.ts +1 -1
- package/src/server/host/headlessRuntime.ts +1 -1
- package/src/server/host/standalone/roadWorld.ts +15 -3
- package/src/server/host/standalone/serverHost.ts +4 -1
- package/src/server/host/standalone/serverProduct.ts +41 -11
- package/src/shared/engine/ai/BossBrain.ts +8 -0
- package/src/shared/game/boss/wake.ts +6 -0
- package/src/shared/game/devColliders.ts +47 -0
- package/src/shared/game/eliteSystem.ts +8 -0
- package/src/shared/game/grid/allocator.ts +3 -0
- package/src/shared/game/grid/placementRows.ts +5 -2
- package/src/shared/game/plugin/bossRecord.ts +3 -2
- package/src/shared/game/shardfile/ktx2Targets.ts +23 -3
- package/src/shared/game/shardfile/outputDescriptor.ts +9 -5
- package/src/shared/game/shardfile/packReads.ts +28 -3
- package/src/shared/game/shardfile/serverPack.ts +9 -0
- package/src/shared/game/systems/looks/trampleField.ts +2 -0
- package/src/shared/host/formatJsonSchema.ts +2 -2
- package/src/tsconfig.json +1 -27
- package/lint/host-reviews.json +0 -14
- package/lint/listed-view-code.json +0 -13
- package/lint/platform-pending-users.json +0 -2520
- package/lint/platform-pending-users.md +0 -18
- package/scripts/cell-mem/metrics-preload.mjs +0 -65
- package/scripts/check-closed-components.d.mts +0 -7
- package/scripts/check-closed-components.mjs +0 -87
- package/scripts/g571-hosts.d.mts +0 -3
- package/scripts/g571-hosts.mjs +0 -54
- package/scripts/host-ruler/register-migrate.mjs +0 -242
- package/scripts/listed-view-code.d.mts +0 -7
- package/scripts/listed-view-code.mjs +0 -93
- package/scripts/look-loop/fit-lut.py +0 -142
- package/scripts/look-loop/palette-delta.py +0 -183
- package/scripts/look-loop/regions/driftwood-isle.json +0 -25
- package/scripts/look-loop/regions/far-reach.json +0 -225
- package/scripts/look-loop/regions/open-plot-night-market.json +0 -855
- package/scripts/look-loop/regions/pine-hollow.json +0 -22
- package/scripts/look-loop/regions/sunscar-dunes.json +0 -281
- package/scripts/platform-chargebacks.d.mts +0 -9
- package/scripts/platform-chargebacks.mjs +0 -135
- package/scripts/shard-component-spans.d.mts +0 -15
- package/scripts/shard-component-spans.mjs +0 -18
- package/scripts/shard-components.d.mts +0 -16
- package/scripts/shard-components.mjs +0 -363
- package/scripts/shard-platform-hosts.d.mts +0 -2
- package/scripts/shard-platform-hosts.mjs +0 -93
- package/scripts/shard-platform-sections.d.mts +0 -2
- package/scripts/shard-platform-sections.mjs +0 -9
- package/scripts/shard-platform.d.mts +0 -76
- package/scripts/shard-platform.mjs +0 -1072
- package/src/.oxfmtrc.json +0 -48
- package/src/scripts/ask-new.sh +0 -29
- package/src/scripts/asks.mjs +0 -142
- package/src/scripts/herdr-prompt.sh +0 -34
- package/src/scripts/herdr-question-open.sh +0 -67
- package/src/scripts/md-wrap.mjs +0 -229
- /package/scripts/{shard-platform-format.d.mts → node-format.d.mts} +0 -0
- /package/scripts/{shard-platform-format.mjs → node-format.mjs} +0 -0
- /package/scripts/{shard-platform-output.d.mts → output-reader.d.mts} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -9,6 +9,14 @@ run `../repo-kit/release.sh vX.Y.Z --prepare` and `--finish` as before (the help
|
|
|
9
9
|
`scripts/changelog.mjs` checks the format; the pre-push hook and CI refuse a push whose `package.json` version has no
|
|
10
10
|
valid section, and a `vX.Y.Z` tag whose commit has none.
|
|
11
11
|
|
|
12
|
+
## v0.1.19 (2026-11-13)
|
|
13
|
+
|
|
14
|
+
- Mossgate Hollow and Brasscap Mesa have new looks: sunset sky, warm lamps, mossy stone, and a beach edge on Mossgate's pond.
|
|
15
|
+
- Walking from one shard into the next no longer stops at a loading wall: the shard ahead warms up while you are on the road.
|
|
16
|
+
- The game keeps playing through a dropped connection, loads from cache offline, and reconnects once you are back online.
|
|
17
|
+
- Far Reach is on its third version with docks at its exits, and the map tab no longer breaks on a missing tile.
|
|
18
|
+
- Behind the scenes: shards can ask for mirror water, lamp halos, glowing motes and exposure; the server reports to monitoring.
|
|
19
|
+
|
|
12
20
|
## v0.1.18 (2026-11-13)
|
|
13
21
|
|
|
14
22
|
- Share a shard with a link: play.wildshard.io/slug/driftwood-isle opens that shard and shows its name and picture in chat previews.
|
|
@@ -70,6 +70,12 @@
|
|
|
70
70
|
"toBytes": 34683878,
|
|
71
71
|
"decision": "J299",
|
|
72
72
|
"why": "AUDIO AU1 (J299, Jake 2026-11-12: audio downloads at DOWNLOAD and is cached): the boot audio set moved into the phone download, +2.29 MB over the 32.40 MB latch, inside J303's 10 MB audio budget. Raised by opus-rel14 for v0.1.14."
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"shard": "far-reach",
|
|
76
|
+
"toBytes": 26340742,
|
|
77
|
+
"decision": "J338",
|
|
78
|
+
"why": "GC30b (J338, Jake 2026-11-13: \"let's have it look GREAT FIRST ; then optimize megabytes later\", up to 50 MB a shard, 100 MB the hard ceiling): Sky Reach rev 3 (cdbb400c) gives Far Reach its entry docks and ships its phone tier as copies of the desktop GLBs, +0.36 MB over the 25.98 MB latch. The look stays; megabytes are optimised later. Raised by opus-farreach."
|
|
73
79
|
}
|
|
74
80
|
],
|
|
75
81
|
"shards": {
|
|
@@ -157,7 +163,7 @@
|
|
|
157
163
|
"driftwood-isle": {
|
|
158
164
|
"baselinePhoneBytes": 23757802,
|
|
159
165
|
"recordedPhoneBytes": 26278506,
|
|
160
|
-
"ceilingPhoneBytes":
|
|
166
|
+
"ceilingPhoneBytes": 21082585,
|
|
161
167
|
"shrinkOnly": true,
|
|
162
168
|
"baseline": {
|
|
163
169
|
"phone": {
|
|
@@ -233,12 +239,12 @@
|
|
|
233
239
|
"bytes": 94310912,
|
|
234
240
|
"mountsAssetsBytes": 12076637
|
|
235
241
|
},
|
|
236
|
-
"latchedPhoneBytes":
|
|
242
|
+
"latchedPhoneBytes": 21082585
|
|
237
243
|
},
|
|
238
244
|
"far-reach": {
|
|
239
245
|
"baselinePhoneBytes": 49888072,
|
|
240
246
|
"recordedPhoneBytes": 53585115,
|
|
241
|
-
"ceilingPhoneBytes":
|
|
247
|
+
"ceilingPhoneBytes": 26340742,
|
|
242
248
|
"shrinkOnly": true,
|
|
243
249
|
"baseline": {
|
|
244
250
|
"phone": {
|
|
@@ -310,7 +316,7 @@
|
|
|
310
316
|
"bytes": 66691072,
|
|
311
317
|
"mountsAssetsBytes": 29602062
|
|
312
318
|
},
|
|
313
|
-
"latchedPhoneBytes":
|
|
319
|
+
"latchedPhoneBytes": 25980736
|
|
314
320
|
},
|
|
315
321
|
"sunscar-dunes": {
|
|
316
322
|
"baselinePhoneBytes": 12421514,
|
package/index.html
CHANGED
|
@@ -215,7 +215,7 @@
|
|
|
215
215
|
<script>
|
|
216
216
|
// Plain launch: the shard selector is the first screen, with no world or loading panel underneath it.
|
|
217
217
|
// BEGIN TITLE URLS
|
|
218
|
-
const titleAssetURLs = {"/assets/title/driftwood-isle-portrait.jpg":"/assets/title/driftwood-isle-portrait-e9d5c9aedd5c5920.jpg","/assets/title/launch-1206x2622-6afc7dd7eee8.png":"/assets/title/launch-1206x2622-6afc7dd7eee8.png","/assets/title/main-crossroads-landscape.jpg":"/assets/title/main-crossroads-landscape-9437ac10c599548a.jpg","/assets/title/main-crossroads-square.jpg":"/assets/title/main-crossroads-square-24abf23d2606ae3f.jpg","/assets/title/nalati-grasslands-portrait.jpg":"/assets/title/nalati-grasslands-portrait-5ac0c2e430a5a22b.jpg","/assets/title/nine-dragon-stack-portrait.jpg":"/assets/title/nine-dragon-stack-portrait-d92d65e333c1ccba.jpg","/assets/title/pine-hollow-portrait.jpg":"/assets/title/pine-hollow-portrait-30a60f74489265a0.jpg"};
|
|
218
|
+
const titleAssetURLs = {"/assets/title/driftwood-isle-portrait.jpg":"/assets/title/driftwood-isle-portrait-e9d5c9aedd5c5920.jpg","/assets/title/launch-1206x2622-6afc7dd7eee8.png":"/assets/title/launch-1206x2622-6afc7dd7eee8.png","/assets/title/main-crossroads-landscape-first.jpg":"/assets/title/main-crossroads-landscape-first-f3f196486b3476a0.jpg","/assets/title/main-crossroads-landscape.jpg":"/assets/title/main-crossroads-landscape-9437ac10c599548a.jpg","/assets/title/main-crossroads-square-first.jpg":"/assets/title/main-crossroads-square-first-98ef65b2b3433656.jpg","/assets/title/main-crossroads-square.jpg":"/assets/title/main-crossroads-square-24abf23d2606ae3f.jpg","/assets/title/nalati-grasslands-portrait.jpg":"/assets/title/nalati-grasslands-portrait-5ac0c2e430a5a22b.jpg","/assets/title/nine-dragon-stack-portrait.jpg":"/assets/title/nine-dragon-stack-portrait-d92d65e333c1ccba.jpg","/assets/title/pine-hollow-portrait.jpg":"/assets/title/pine-hollow-portrait-30a60f74489265a0.jpg"};
|
|
219
219
|
// END TITLE URLS
|
|
220
220
|
const homeParams = new URLSearchParams(location.search);
|
|
221
221
|
// The environment flags select no level (src/client/app/bootRoute.ts keeps the same list): a launch with only them is the title.
|
|
@@ -224,7 +224,9 @@
|
|
|
224
224
|
if (document.documentElement.classList.contains('title-first')) {
|
|
225
225
|
const hero = document.createElement('link');
|
|
226
226
|
hero.rel = 'preload'; hero.as = 'image'; hero.fetchPriority = 'high';
|
|
227
|
-
|
|
227
|
+
// PZ19: the shell's hero is the ~30 kB first cut, so it no longer outruns the entry's code on a slow line; the title's
|
|
228
|
+
// own hero (mainMenu.ts) brings the full image in over it once the title is up
|
|
229
|
+
hero.href = titleAssetURLs['/assets/title/main-crossroads-' + (matchMedia('(orientation: portrait)').matches ? 'square' : 'landscape') + '-first.jpg'];
|
|
228
230
|
document.head.appendChild(hero);
|
|
229
231
|
}
|
|
230
232
|
</script>
|
|
@@ -483,9 +485,9 @@ html[data-ws-keyboard] #game, html[data-ws-keyboard] #hud { top: var(--ws-kb-top
|
|
|
483
485
|
html.standalone #ws-top-edge { display: block; position: fixed; top: 0; left: 0; right: 0; height: 12px; z-index: 2147483647; background: rgba(5, 8, 16, 0.004); pointer-events: none; }
|
|
484
486
|
.ws-launch { display: none; }
|
|
485
487
|
html.title-first .ws-launch { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: #0b1622; color: #eaf8ff; font-family: Rajdhani, system-ui, sans-serif; }
|
|
486
|
-
.ws-launch-hero { position: absolute; inset: 0; background: url('/assets/title/main-crossroads-landscape-
|
|
488
|
+
.ws-launch-hero { position: absolute; inset: 0; background: url('/assets/title/main-crossroads-landscape-first-f3f196486b3476a0.jpg') center / cover no-repeat; }
|
|
487
489
|
.ws-launch-brand { position: relative; margin: calc(24px + env(safe-area-inset-top, 0px)) 24px 0; font-size: 44px; font-weight: 700; line-height: 1; letter-spacing: .16em; text-shadow: 0 0 18px #8fe3ff73; }
|
|
488
|
-
@media (orientation: portrait) { .ws-launch-hero { top: 50%; bottom: auto; width: 100%; aspect-ratio: 1; transform: translateY(-50%); background-image: url('/assets/title/main-crossroads-square-
|
|
490
|
+
@media (orientation: portrait) { .ws-launch-hero { top: 50%; bottom: auto; width: 100%; aspect-ratio: 1; transform: translateY(-50%); background-image: url('/assets/title/main-crossroads-square-first-98ef65b2b3433656.jpg'); } }
|
|
489
491
|
/* QA 11-13 (Jake: "is it broken? Is it doing something?"): before any bundle the static title wears the build pill
|
|
490
492
|
(update.css's .ws-update, copied, 5 px higher so it clears the wordmark: no module may be needed to see or tap it) and a bar that moves until StartTitle removes it */
|
|
491
493
|
.ws-launch-pill { position: absolute; right: 16px; top: calc(14px + env(safe-area-inset-top, 0px)); transform: translateY(-50%); z-index: 1; display: flex; align-items: center; gap: 6px; box-sizing: border-box; height: 19px; max-width: calc(100vw - 32px); margin: 0; padding: 0 8px; background: var(--ws-glass-deep); border: 1px solid var(--ws-cyan-line); color: var(--ws-text-dim); font: 8px/1 var(--ws-mono); letter-spacing: .14em; text-transform: uppercase; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
|
package/lint/engine-sides.json
CHANGED
|
@@ -391,6 +391,8 @@
|
|
|
391
391
|
"src/client/engine/render/regionLook.ts": "client",
|
|
392
392
|
"src/client/engine/render/releasedArrays.ts": "client",
|
|
393
393
|
"src/client/engine/render/drawCheck.ts": "client",
|
|
394
|
+
"src/client/engine/render/families/detail.ts": "client",
|
|
395
|
+
"src/client/engine/render/lookRender.ts": "client",
|
|
394
396
|
"src/client/engine/render/renderer.ts": "client",
|
|
395
397
|
"src/client/engine/render/scatterInstances.ts": "client",
|
|
396
398
|
"src/client/engine/render/scenePreparation.ts": "client",
|
|
@@ -577,6 +579,7 @@
|
|
|
577
579
|
"src/client/game/boot/bytes.generated.ts": "client",
|
|
578
580
|
"src/client/game/boot/loadingPaths.ts": "client",
|
|
579
581
|
"src/client/game/boot/packs.generated.ts": "client",
|
|
582
|
+
"src/client/game/boot/placedSpawn.ts": "client",
|
|
580
583
|
"src/client/game/boot/spawnDownload.ts": "client",
|
|
581
584
|
"src/client/game/boot/versions.generated.ts": "client",
|
|
582
585
|
"src/client/game/Boss.ts": "client",
|
|
@@ -653,6 +656,7 @@
|
|
|
653
656
|
"src/client/game/grid/memoryRows.ts": "client",
|
|
654
657
|
"src/client/game/grid/memoryWarning.ts": "client",
|
|
655
658
|
"src/client/game/grid/menu.ts": "client",
|
|
659
|
+
"src/client/game/devScene/hook.ts": "client",
|
|
656
660
|
"src/client/game/grid/minimapBlend.ts": "client",
|
|
657
661
|
"src/client/game/grid/nearGrain.ts": "client",
|
|
658
662
|
"src/client/game/grid/nearPlaceholderPlan.ts": "client",
|
|
@@ -662,6 +666,7 @@
|
|
|
662
666
|
"src/client/game/grid/neighbourRows.ts": "client",
|
|
663
667
|
"src/client/game/grid/oneWayIn.ts": "client",
|
|
664
668
|
"src/client/game/grid/placedCells.ts": "client",
|
|
669
|
+
"src/client/game/grid/placedContent.ts": "client",
|
|
665
670
|
"src/client/game/grid/placedCards.ts": "client",
|
|
666
671
|
"src/client/game/grid/pageEntry.ts": "client",
|
|
667
672
|
"src/client/game/grid/pageResidency.ts": "client",
|
|
@@ -697,6 +702,7 @@
|
|
|
697
702
|
"src/client/game/grid/roadSignPaint.ts": "client",
|
|
698
703
|
"src/client/game/grid/roadSignPixels.ts": "client",
|
|
699
704
|
"src/client/game/grid/roadSignPreparation.ts": "client",
|
|
705
|
+
"src/client/game/grid/roadSignScale.ts": "client",
|
|
700
706
|
"src/client/game/grid/roadSky.ts": "client",
|
|
701
707
|
"src/client/game/grid/roadSolid.ts": "client",
|
|
702
708
|
"src/client/game/grid/roadTileArchive.ts": "client",
|
|
@@ -711,6 +717,7 @@
|
|
|
711
717
|
"src/client/game/grid/roadTileWrite.worker.ts": "client",
|
|
712
718
|
"src/client/game/grid/roadTileWriter.ts": "client",
|
|
713
719
|
"src/client/game/grid/runtimeCost.ts": "client",
|
|
720
|
+
"src/client/game/grid/screenReports.ts": "client",
|
|
714
721
|
"src/client/game/grid/seamLook.ts": "client",
|
|
715
722
|
"src/client/game/grid/session.ts": "client",
|
|
716
723
|
"src/client/game/grid/shardfileFar.ts": "client",
|
|
@@ -942,6 +949,7 @@
|
|
|
942
949
|
"src/client/game/shardfile/clientWater.ts": "client",
|
|
943
950
|
"src/client/game/shardfile/clientWaterSurfaces.ts": "client",
|
|
944
951
|
"src/client/game/shardfile/clientWorker.ts": "client",
|
|
952
|
+
"src/client/game/shardfile/seatGrace.ts": "client",
|
|
945
953
|
"src/client/game/shardfile/clientWorldAssembly.ts": "client",
|
|
946
954
|
"src/client/game/shardfile/constructionCheckpoint.ts": "client",
|
|
947
955
|
"src/client/game/shardfile/controlFiles.ts": "client",
|
|
@@ -983,6 +991,7 @@
|
|
|
983
991
|
"src/client/game/shardfile/productPreflight.ts": "client",
|
|
984
992
|
"src/client/game/shardfile/questWorld.ts": "client",
|
|
985
993
|
"src/client/game/shardfile/readAsset.ts": "client",
|
|
994
|
+
"src/client/game/shardfile/reflectingWater.ts": "client",
|
|
986
995
|
"src/client/game/shardfile/reusableWholeLibrary.ts": "client",
|
|
987
996
|
"src/client/game/shardfile/runtimeProduct.ts": "client",
|
|
988
997
|
"src/client/game/shardfile/sceneBakeFiles.ts": "client",
|
|
@@ -1093,6 +1102,8 @@
|
|
|
1093
1102
|
"src/client/host/online/voice.ts": "client",
|
|
1094
1103
|
"src/client/host/online/voiceUi.ts": "client",
|
|
1095
1104
|
"src/client/host/standalone/shell.ts": "client",
|
|
1105
|
+
"src/cook/game/astc6Encode.ts": "cook",
|
|
1106
|
+
"src/cook/game/astc6Wasm.ts": "cook",
|
|
1096
1107
|
"src/cook/game/audioReport.ts": "cook",
|
|
1097
1108
|
"src/cook/game/brotliSizeCache.d.mts": "cook",
|
|
1098
1109
|
"src/cook/game/brotliSizeCache.mjs": "cook",
|
|
@@ -1294,6 +1305,7 @@
|
|
|
1294
1305
|
"src/client/game/shardfile/serverRoute.ts": "client",
|
|
1295
1306
|
"src/server/host/dedicated/cellHost.ts": "server",
|
|
1296
1307
|
"src/server/host/dedicated/crossing.ts": "server",
|
|
1308
|
+
"src/server/host/dedicated/loopLag.ts": "server",
|
|
1297
1309
|
"src/server/host/dedicated/roadRoom.ts": "server",
|
|
1298
1310
|
"src/server/host/dedicated/cellProtocol.ts": "server",
|
|
1299
1311
|
"src/server/host/dedicated/cellWorker.ts": "server",
|
|
@@ -1316,6 +1328,7 @@
|
|
|
1316
1328
|
"src/server/host/dedicated/saves/saveStore.ts": "server",
|
|
1317
1329
|
"src/server/host/dedicated/saves/writeQueue.ts": "server",
|
|
1318
1330
|
"src/server/host/dedicated/seats.ts": "server",
|
|
1331
|
+
"src/server/host/dedicated/serverMetrics.ts": "server",
|
|
1319
1332
|
"src/server/host/dedicated/serverReports.ts": "server",
|
|
1320
1333
|
"src/server/host/dedicated/serverSentry.ts": "server",
|
|
1321
1334
|
"src/server/host/dedicated/shopGate.ts": "server",
|
|
@@ -1590,6 +1603,7 @@
|
|
|
1590
1603
|
"src/shared/engine/world/windStrength.ts": "shared",
|
|
1591
1604
|
"src/shared/engine/world/yawFrame.ts": "shared",
|
|
1592
1605
|
"src/shared/game/achievements.ts": "shared",
|
|
1606
|
+
"src/shared/game/devColliders.ts": "shared",
|
|
1593
1607
|
"src/shared/game/ambient/flock.ts": "shared",
|
|
1594
1608
|
"src/shared/game/animation/limbBlend.ts": "shared",
|
|
1595
1609
|
"src/shared/game/animation/limbRig.ts": "shared",
|
package/lint/ratchet.json
CHANGED
|
@@ -158,73 +158,5 @@
|
|
|
158
158
|
},
|
|
159
159
|
"wildshard/shard-sandbox": {
|
|
160
160
|
"src/shards/pine-hollow/generators/coatProducer.ts": 1
|
|
161
|
-
},
|
|
162
|
-
"closedComponents": {
|
|
163
|
-
"far-reach": [
|
|
164
|
-
"C1",
|
|
165
|
-
"C2",
|
|
166
|
-
"C3",
|
|
167
|
-
"C4",
|
|
168
|
-
"C5",
|
|
169
|
-
"C6",
|
|
170
|
-
"C7",
|
|
171
|
-
"C8",
|
|
172
|
-
"C9"
|
|
173
|
-
],
|
|
174
|
-
"sunscar-dunes": [
|
|
175
|
-
"C1",
|
|
176
|
-
"C2",
|
|
177
|
-
"C3",
|
|
178
|
-
"C4",
|
|
179
|
-
"C5",
|
|
180
|
-
"C6",
|
|
181
|
-
"C7",
|
|
182
|
-
"C8",
|
|
183
|
-
"C9"
|
|
184
|
-
],
|
|
185
|
-
"pine-hollow": [
|
|
186
|
-
"C1",
|
|
187
|
-
"C2",
|
|
188
|
-
"C3",
|
|
189
|
-
"C4",
|
|
190
|
-
"C5",
|
|
191
|
-
"C6",
|
|
192
|
-
"C7",
|
|
193
|
-
"C8",
|
|
194
|
-
"C9"
|
|
195
|
-
],
|
|
196
|
-
"driftwood-isle": [
|
|
197
|
-
"C1",
|
|
198
|
-
"C2",
|
|
199
|
-
"C3",
|
|
200
|
-
"C4",
|
|
201
|
-
"C5",
|
|
202
|
-
"C6",
|
|
203
|
-
"C7",
|
|
204
|
-
"C8",
|
|
205
|
-
"C9"
|
|
206
|
-
],
|
|
207
|
-
"nalati-grasslands": [
|
|
208
|
-
"C1",
|
|
209
|
-
"C2",
|
|
210
|
-
"C3",
|
|
211
|
-
"C4",
|
|
212
|
-
"C5",
|
|
213
|
-
"C6",
|
|
214
|
-
"C7",
|
|
215
|
-
"C8",
|
|
216
|
-
"C9"
|
|
217
|
-
],
|
|
218
|
-
"nine-dragon-stack": [
|
|
219
|
-
"C1",
|
|
220
|
-
"C2",
|
|
221
|
-
"C3",
|
|
222
|
-
"C4",
|
|
223
|
-
"C5",
|
|
224
|
-
"C6",
|
|
225
|
-
"C7",
|
|
226
|
-
"C8",
|
|
227
|
-
"C9"
|
|
228
|
-
]
|
|
229
161
|
}
|
|
230
162
|
}
|
package/lint/ratchet.mjs
CHANGED
|
@@ -8,14 +8,13 @@ import { relative, resolve } from 'node:path';
|
|
|
8
8
|
import { fileURLToPath } from 'node:url';
|
|
9
9
|
import { TIME_ALLOW } from './wildshard-plugin.js';
|
|
10
10
|
import { compareCounts, hardRules, requiredGuardRules } from '../scripts/guard-counts.mjs';
|
|
11
|
-
import { closedComponents } from '../scripts/check-closed-components.mjs';
|
|
12
11
|
import { parseSync } from 'vite';
|
|
13
12
|
import { pruneSchemaTypeAllowances } from './schema-types.mjs';
|
|
14
13
|
import { SCHEMA_TYPE_RULE } from '../scripts/ratchet-approval.mjs';
|
|
15
14
|
import { fullRatchetFiles } from './ratchet-files.mjs';
|
|
16
15
|
|
|
17
16
|
const REPO = fileURLToPath(new URL('../', import.meta.url));
|
|
18
|
-
const NON_FILE = new Set(['allow', 'budgets', 'debugRows'
|
|
17
|
+
const NON_FILE = new Set(['allow', 'budgets', 'debugRows']);
|
|
19
18
|
const configFile = resolve(REPO, '.oxlintrc.ratchet.json');
|
|
20
19
|
const ruleNames = new Set(Object.keys(JSON.parse(readFileSync(configFile, 'utf8')).rules));
|
|
21
20
|
const object = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
@@ -37,8 +36,6 @@ function validate(baseline, root) {
|
|
|
37
36
|
if (identity.startsWith('src/')) requireFile(rule, identity.split('#')[0]);
|
|
38
37
|
} else if (key === 'budgets') {
|
|
39
38
|
if (!object(value) || Object.values(value).some((n) => !number(n))) throw new Error('Invalid budgets section');
|
|
40
|
-
} else if (key === 'closedComponents') {
|
|
41
|
-
closedComponents(value);
|
|
42
39
|
} else if (key === 'debugRows') {
|
|
43
40
|
if (!object(value) || !number(value.max) || !Number.isInteger(value.max) || !Array.isArray(value.raisedBy)) throw new Error('Invalid debugRows section');
|
|
44
41
|
} else if (!ruleNames.has(key) || !object(value) || Object.values(value).some((n) => !number(n) || !Number.isInteger(n))) throw new Error(`Invalid or unconfigured rule section: ${key}`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildshard/engine",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.19",
|
|
4
4
|
"description": "The Wildshard engine: one repo with shared, client, server and cook code and three build targets (client, dedicated server, standalone listen server), shaped like Unreal or Source.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -24,14 +24,14 @@
|
|
|
24
24
|
"build": "node src/tools/build-web.ts",
|
|
25
25
|
"typecheck": "pnpm typecheck:kit && pnpm gen:inputs && npr tsc -b tsconfig.layers.json --builders 8",
|
|
26
26
|
"lint": "pnpm lint:kit && pnpm lint:game",
|
|
27
|
-
"lint:fix": "node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --fix --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts'",
|
|
28
|
-
"format": "npr oxfmt -c
|
|
29
|
-
"format:check": "npr oxfmt -c
|
|
27
|
+
"lint:fix": "node scripts/lint-cli.mjs -c kit/.oxlintrc.json --type-aware --fix --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --ignore-pattern 'src/**' --no-error-on-unmatched-pattern && node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --fix --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --no-error-on-unmatched-pattern src",
|
|
28
|
+
"format": "npr oxfmt -c kit/.oxfmtrc.json kit src/cli src/tools src/e2e src/scripts",
|
|
29
|
+
"format:check": "npr oxfmt -c kit/.oxfmtrc.json --check kit src/cli src/tools src/e2e src/scripts",
|
|
30
30
|
"test": "pnpm test:kit && pnpm test:fast",
|
|
31
31
|
"test:e2e": "playwright test --config src/e2e/playwright.config.ts",
|
|
32
32
|
"test:e2e:faults": "node scripts/e2e-faults.mjs",
|
|
33
33
|
"check:sides": "node src/scripts/check-sides.mjs && node scripts/check-engine-sides.mjs",
|
|
34
|
-
"check:asks": "node
|
|
34
|
+
"check:asks": "node kit/scripts/asks.mjs check",
|
|
35
35
|
"check:agents": "node .githooks/agents-md.mjs lint",
|
|
36
36
|
"check:parity": "node scripts/agent-parity.mjs --strict",
|
|
37
37
|
"check:agent-sync": "node scripts/agent-sync.mjs --check",
|
|
@@ -40,12 +40,12 @@
|
|
|
40
40
|
"check:page-events": "node scripts/check-page-events.mjs",
|
|
41
41
|
"check:wire": "node node_modules/@wildshard/wire/bin.mjs check",
|
|
42
42
|
"check:saves": "env -u WS_PUSH_GATE_PROFILE -u WS_CPU_ADMISSION vitest run test/saves-lock.test.ts",
|
|
43
|
-
"md:wrap": "node
|
|
43
|
+
"md:wrap": "node kit/scripts/md-wrap.mjs",
|
|
44
44
|
"inbox:pull": "node scripts/inbox-pull.mjs",
|
|
45
45
|
"test:hooks": "node --test '.githooks/*.test.mjs'",
|
|
46
46
|
"check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm test && pnpm check:sides && pnpm check:asks && pnpm check:agents && pnpm check:agent-sync && pnpm test:agent-hooks && pnpm check:parity && pnpm check:page-events && pnpm check:wire && pnpm check:saves",
|
|
47
47
|
"typecheck:kit": "npr tsc -p src/tsconfig.json && npr tsc -p src/client/tsconfig.json",
|
|
48
|
-
"lint:kit": "node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --deny-warnings --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts'",
|
|
48
|
+
"lint:kit": "node scripts/lint-cli.mjs -c kit/.oxlintrc.json --type-aware --deny-warnings --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --ignore-pattern 'src/**' --no-error-on-unmatched-pattern && node scripts/lint-cli.mjs -c src/.oxlintrc.json --type-aware --deny-warnings --ignore-pattern '.githooks/**' --ignore-pattern '.agents/**' --ignore-pattern 'tmp/**' --ignore-pattern 'src/client/engine/**' --ignore-pattern 'src/shared/engine/**' --ignore-pattern 'src/server/engine/**' --ignore-pattern 'src/client/game/**' --ignore-pattern 'src/shared/game/**' --ignore-pattern 'src/server/game/**' --ignore-pattern 'src/cook/game/**' --ignore-pattern 'src/client/host/**' --ignore-pattern 'src/shared/host/**' --ignore-pattern 'src/server/host/**' --ignore-pattern 'src/client/app/**' --ignore-pattern 'src/test/engine/**' --ignore-pattern 'src/test/game/**' --ignore-pattern 'scripts/**' --ignore-pattern 'test/**' --ignore-pattern 'lint/**' --ignore-pattern 'vite/**' --ignore-pattern 'types/**' --ignore-pattern 'calibration/**' --ignore-pattern 'budgets/**' --ignore-pattern 'public/**' --ignore-pattern 'vite.config.ts' --ignore-pattern 'vitest.config.ts' --no-error-on-unmatched-pattern src",
|
|
49
49
|
"lint:game": "node scripts/lint-game.mjs",
|
|
50
50
|
"test:kit": "node --test 'src/cli/*.test.ts' 'src/server/*.test.ts' 'src/test/helpers/*.test.ts'",
|
|
51
51
|
"test:fast": "python3 scripts/heavy-lane.py full-test -- node scripts/vitest-tmp.ts run",
|
|
@@ -63,10 +63,11 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@dimforge/rapier3d-simd": "0.21.0",
|
|
65
65
|
"@hono/node-server": "2.1.5",
|
|
66
|
+
"@prometheus-io/client": "0.16.1",
|
|
66
67
|
"@sentry/browser": "11.0.0",
|
|
67
68
|
"@sentry/core": "11.0.0",
|
|
68
69
|
"@valibot/to-json-schema": "1.8.0",
|
|
69
|
-
"@wildshard/format": "npm:@wildshard/shard-format@^0.
|
|
70
|
+
"@wildshard/format": "npm:@wildshard/shard-format@^0.5.2",
|
|
70
71
|
"@wildshard/wire": "^0.1.0",
|
|
71
72
|
"ajv": "6.15.0",
|
|
72
73
|
"fflate": "0.8.3",
|
|
@@ -891,6 +892,7 @@
|
|
|
891
892
|
"./game/grid/gridCollision": "./src/shared/game/grid/gridCollision.ts",
|
|
892
893
|
"./game/grid/voidFloor": "./src/shared/game/grid/voidFloor.ts",
|
|
893
894
|
"./game/grid/assembly": "./src/shared/game/grid/assembly.ts",
|
|
895
|
+
"./game/devColliders": "./src/shared/game/devColliders.ts",
|
|
894
896
|
"./game/grid/catalogueSlot": "./src/shared/game/grid/catalogueSlot.ts",
|
|
895
897
|
"./game/grid/placedCells": "./src/client/game/grid/placedCells.ts",
|
|
896
898
|
"./game/grid/placedCards": "./src/client/game/grid/placedCards.ts",
|
|
@@ -1187,7 +1189,10 @@
|
|
|
1187
1189
|
"./game/grid/runtimeCost": "./src/client/game/grid/runtimeCost.ts",
|
|
1188
1190
|
"./game/generators/pickups": "./src/client/game/generators/pickups.ts",
|
|
1189
1191
|
"./game/draftTitles": "./src/client/game/draftTitles.ts",
|
|
1192
|
+
"./game/boot/audio.generated": "./src/client/game/boot/audio.generated.ts",
|
|
1193
|
+
"./game/boot/bytes.generated": "./src/client/game/boot/bytes.generated.ts",
|
|
1190
1194
|
"./game/boot/packs.generated": "./src/client/game/boot/packs.generated.ts",
|
|
1195
|
+
"./game/boot/versions.generated": "./src/client/game/boot/versions.generated.ts",
|
|
1191
1196
|
"./host/headlessProduct": "./src/server/host/headlessProduct.ts",
|
|
1192
1197
|
"./host/shardfile": "./src/shared/host/shardfile.ts",
|
|
1193
1198
|
"./host/headless": "./src/server/host/headless.ts",
|
|
@@ -1217,7 +1222,6 @@
|
|
|
1217
1222
|
"./scripts/boot-publication.mjs": "./scripts/boot-publication.mjs",
|
|
1218
1223
|
"./scripts/build-cache-report.mjs": "./scripts/build-cache-report.mjs",
|
|
1219
1224
|
"./scripts/built-product.mjs": "./scripts/built-product.mjs",
|
|
1220
|
-
"./scripts/check-closed-components.mjs": "./scripts/check-closed-components.mjs",
|
|
1221
1225
|
"./scripts/debug-settings.mjs": "./scripts/debug-settings.mjs",
|
|
1222
1226
|
"./scripts/decision-legacy-lines.mjs": "./scripts/decision-legacy-lines.mjs",
|
|
1223
1227
|
"./scripts/format-package.mjs": "./scripts/format-package.mjs",
|
|
@@ -1243,15 +1247,13 @@
|
|
|
1243
1247
|
"./scripts/program-discovery.mjs": "./scripts/program-discovery.mjs",
|
|
1244
1248
|
"./scripts/quiet-cli.mjs": "./scripts/quiet-cli.mjs",
|
|
1245
1249
|
"./scripts/script-scenario-metrics.mjs": "./scripts/script-scenario-metrics.mjs",
|
|
1246
|
-
"./scripts/shard-component-spans.mjs": "./scripts/shard-component-spans.mjs",
|
|
1247
|
-
"./scripts/shard-components.mjs": "./scripts/shard-components.mjs",
|
|
1248
1250
|
"./scripts/shard-net-lines.mjs": "./scripts/shard-net-lines.mjs",
|
|
1249
1251
|
"./scripts/shard-output-content.mjs": "./scripts/shard-output-content.mjs",
|
|
1250
1252
|
"./scripts/shard-outputs.mjs": "./scripts/shard-outputs.mjs",
|
|
1251
|
-
"./scripts/
|
|
1252
|
-
"./scripts/
|
|
1253
|
-
"./scripts/shard-platform-
|
|
1254
|
-
"./scripts/shard-platform.mjs": "./scripts/
|
|
1253
|
+
"./scripts/node-format.mjs": "./scripts/node-format.mjs",
|
|
1254
|
+
"./scripts/output-reader.mjs": "./scripts/output-reader.mjs",
|
|
1255
|
+
"./scripts/shard-platform-format.mjs": "./scripts/node-format.mjs",
|
|
1256
|
+
"./scripts/shard-platform-output.mjs": "./scripts/output-reader.mjs",
|
|
1255
1257
|
"./scripts/shard-public.mjs": "./scripts/shard-public.mjs",
|
|
1256
1258
|
"./scripts/shard-runtime-closure.mjs": "./scripts/shard-runtime-closure.mjs",
|
|
1257
1259
|
"./scripts/shardfile-cache.mjs": "./scripts/shardfile-cache.mjs",
|
package/scripts/agent-sync.mjs
CHANGED
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
// every replaced byte, and nothing outside these paths is touched.
|
|
36
36
|
// Exit 0 ok, 1 stale, invalid or refused, 2 usage.
|
|
37
37
|
import { spawnSync } from 'node:child_process';
|
|
38
|
+
import { createHash } from 'node:crypto';
|
|
38
39
|
import { chmodSync, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, rmdirSync, statSync, symlinkSync, unlinkSync, writeFileSync } from 'node:fs';
|
|
39
40
|
import { dirname, isAbsolute, join, relative, resolve } from 'node:path';
|
|
40
41
|
import { pathToFileURL } from 'node:url';
|
|
@@ -283,6 +284,18 @@ export function kitFiles(kit) {
|
|
|
283
284
|
export const kitSkills = (kit) => (isRealDir(join(kit, SKILLS)) ? readdirSync(join(kit, SKILLS)).filter((name) => isRealDir(join(kit, SKILLS, name))).sort() : []);
|
|
284
285
|
|
|
285
286
|
const gitOut = (root, args) => spawnSync('git', ['-C', root, ...args], { encoding: 'utf8' });
|
|
287
|
+
/** A file's git blob id, as `git hash-object` gives it. */
|
|
288
|
+
const blobId = (bytes) => createHash('sha1').update(`blob ${bytes.length}\0`).update(bytes).digest('hex');
|
|
289
|
+
/**
|
|
290
|
+
* MA10 (e): every blob the kit's history held at any of `paths` (its current path and, for a moved file, the
|
|
291
|
+
* repo's old path), so a copy the stamp replaces reads as an older kit copy, not a local edit. Empty when the
|
|
292
|
+
* kit is not a git checkout.
|
|
293
|
+
*/
|
|
294
|
+
function kitBlobs(kit, paths) {
|
|
295
|
+
const log = gitOut(kit, ['--literal-pathspecs', 'log', '--format=', '--raw', '--no-abbrev', '--no-renames', 'HEAD', '--', ...paths]);
|
|
296
|
+
if (log.status !== 0) return new Set();
|
|
297
|
+
return new Set(log.stdout.split('\n').flatMap((line) => line.startsWith(':') ? line.split(' ').slice(2, 4) : []).filter((id) => !/^0+$/u.test(id)));
|
|
298
|
+
}
|
|
286
299
|
|
|
287
300
|
/** The first symlink at or above `rel` inside root, component by component, or null. */
|
|
288
301
|
function linkOnPath(root, rel) {
|
|
@@ -362,7 +375,7 @@ const realOr = (path) => {
|
|
|
362
375
|
* Stamp the kit's agent layout into a repo. Everything is checked before anything is written: the kit,
|
|
363
376
|
* the repo's specs and manifests, every registration the new manifests would drop, symlinks on every
|
|
364
377
|
* path it writes or removes, and uncommitted, untracked or ignored files under those paths.
|
|
365
|
-
* @returns {{ changed: string[], replaced: string[], problems: string[] }}
|
|
378
|
+
* @returns {{ changed: string[], replaced: string[], older?: string[], problems: string[] }}
|
|
366
379
|
*/
|
|
367
380
|
export function stamp(kitDir, rootDir) {
|
|
368
381
|
const kit = resolve(kitDir);
|
|
@@ -428,11 +441,16 @@ export function stamp(kitDir, rootDir) {
|
|
|
428
441
|
if (problems.length) return refuse(problems);
|
|
429
442
|
|
|
430
443
|
const changed = new Set();
|
|
431
|
-
// Copies the stamp replaces whose bytes differ from the kit's: git keeps the old bytes
|
|
444
|
+
// Copies the stamp replaces whose bytes differ from the kit's: git keeps the old bytes. One the kit's history
|
|
445
|
+
// held is an older kit copy (`older`); any other is a local edit the caller reviews (`replaced`).
|
|
432
446
|
const replaced = [];
|
|
447
|
+
const older = [];
|
|
448
|
+
const differs = (path, kitPath) => {
|
|
449
|
+
(kitBlobs(kit, [...new Set([kitPath, path])]).has(blobId(readFileSync(join(root, path)))) ? older : replaced).push(path);
|
|
450
|
+
};
|
|
433
451
|
for (const path of legacy) {
|
|
434
452
|
const want = join(kit, '.agents/hooks', path.slice('.claude/hooks/'.length));
|
|
435
|
-
if (!existsSync(want) || !readFileSync(join(root, path)).equals(readFileSync(want)))
|
|
453
|
+
if (!existsSync(want) || !readFileSync(join(root, path)).equals(readFileSync(want))) differs(path, `.agents/hooks/${path.slice('.claude/hooks/'.length)}`);
|
|
436
454
|
rmSync(join(root, path));
|
|
437
455
|
changed.add(path);
|
|
438
456
|
}
|
|
@@ -440,7 +458,7 @@ export function stamp(kitDir, rootDir) {
|
|
|
440
458
|
for (const name of oldKitSkills) {
|
|
441
459
|
const path = `${CLAUDE_SKILLS}/${name}`;
|
|
442
460
|
for (const file of entriesUnder(root, path)) {
|
|
443
|
-
if (!readFileSync(join(root, file)).equals(readFileSync(join(kit, SKILLS, name, relative(path, file)))))
|
|
461
|
+
if (!readFileSync(join(root, file)).equals(readFileSync(join(kit, SKILLS, name, relative(path, file))))) differs(file, `${SKILLS}/${name}/${relative(path, file)}`);
|
|
444
462
|
changed.add(file);
|
|
445
463
|
}
|
|
446
464
|
rmSync(join(root, path), { recursive: true });
|
|
@@ -460,7 +478,7 @@ export function stamp(kitDir, rootDir) {
|
|
|
460
478
|
const mode = statSync(from).mode & 0o777;
|
|
461
479
|
const same = existsSync(to) && readFileSync(to).equals(bytes);
|
|
462
480
|
if (!same || (statSync(to).mode & 0o777) !== mode) {
|
|
463
|
-
if (existsSync(to) && !same)
|
|
481
|
+
if (existsSync(to) && !same) differs(path, path);
|
|
464
482
|
mkdirSync(dirname(to), { recursive: true });
|
|
465
483
|
writeFileSync(to, bytes);
|
|
466
484
|
chmodSync(to, mode);
|
|
@@ -468,10 +486,10 @@ export function stamp(kitDir, rootDir) {
|
|
|
468
486
|
}
|
|
469
487
|
}
|
|
470
488
|
const next = plan(root);
|
|
471
|
-
if (next.problems.length) return { changed: [...changed].sort(), replaced, problems: next.problems };
|
|
489
|
+
if (next.problems.length) return { changed: [...changed].sort(), replaced, older, problems: next.problems };
|
|
472
490
|
apply(root, next.actions);
|
|
473
491
|
for (const action of next.actions) changed.add(action.path);
|
|
474
|
-
return { changed: [...changed].sort(), replaced: [...new Set(replaced)].sort(), problems: [] };
|
|
492
|
+
return { changed: [...changed].sort(), replaced: [...new Set(replaced)].sort(), older: [...new Set(older)].sort(), problems: [] };
|
|
475
493
|
}
|
|
476
494
|
|
|
477
495
|
// ---------------------------------------------------------------- main
|
|
@@ -497,8 +515,9 @@ function main(argv) {
|
|
|
497
515
|
}
|
|
498
516
|
root = resolve(root);
|
|
499
517
|
if (from) {
|
|
500
|
-
const { changed, replaced, problems } = stamp(resolve(from), root);
|
|
518
|
+
const { changed, replaced, older = [], problems } = stamp(resolve(from), root);
|
|
501
519
|
for (const path of changed) process.stdout.write(`stamped ${path}\n`);
|
|
520
|
+
for (const path of older) process.stdout.write(`updated ${path}: it was an older kit copy (its blob is in the kit's history)\n`);
|
|
502
521
|
for (const path of replaced) process.stdout.write(`replaced ${path}: its bytes differed from the kit's; check git diff for a local edit\n`);
|
|
503
522
|
for (const problem of problems) process.stderr.write(`agent-sync: ${problem}\n`);
|
|
504
523
|
return problems.length ? 1 : 0;
|
|
@@ -5,11 +5,17 @@ import {writeSpawnManifests as cookManifests, type BuildHalf} from '../../src/co
|
|
|
5
5
|
import {assetTableAddresses, readAssetTables} from './assetTables.mjs';
|
|
6
6
|
import {readGridSeams} from './gridSeams.mjs';
|
|
7
7
|
import {rendererRevision} from '../renderer-revision.mjs';
|
|
8
|
+
import {defaultCookTiers} from '../../src/cook/game/shardCook';
|
|
9
|
+
import {homedir} from 'node:os';
|
|
10
|
+
import {resolve} from 'node:path';
|
|
8
11
|
|
|
9
12
|
/** C1: the page's half of the cook's input, which the app build owns: its tables, seams and names. */
|
|
10
|
-
const {WILDSHARD_PREPARATION_ONLY} = process.env;
|
|
13
|
+
const {WILDSHARD_PREPARATION_ONLY, WILDSHARD_ASTC6_CACHE} = process.env;
|
|
14
|
+
/** S12d: the phone tier's 6×6 encodes, kept by input between builds. Beside the spawn parts' bodies, so CI's cache of
|
|
15
|
+
* `~/.cache/wildshard/gen/spawn-parts-br` keeps them too (a cold Pine is minutes of encode). */
|
|
16
|
+
const astc6Cache = WILDSHARD_ASTC6_CACHE ?? resolve(homedir(), '.cache/wildshard/gen/spawn-parts-br/astc6-1');
|
|
11
17
|
const build: BuildHalf = {cacheName: ASSET_CACHE_NAME, gpuFiles: GPU_FILES, tables: readAssetTables,
|
|
12
|
-
preparationOnly: WILDSHARD_PREPARATION_ONLY === '1', rendererRevision: rendererRevision(),
|
|
18
|
+
preparationOnly: WILDSHARD_PREPARATION_ONLY === '1', rendererRevision: rendererRevision(), tiers: () => defaultCookTiers(astc6Cache),
|
|
13
19
|
tableAddresses: root => assetTableAddresses(readAssetTables(root)), seams: root => readGridSeams(root).address};
|
|
14
20
|
|
|
15
21
|
export const writeSpawnManifests = (outDir: string, input: unknown, strips: Parameters<typeof cookManifests>[2], root: string, report?: Parameters<typeof cookManifests>[5]): ReturnType<typeof cookManifests> =>
|
|
@@ -4,8 +4,8 @@ import {tmpdir} from 'node:os';
|
|
|
4
4
|
import {dirname, join} from 'node:path';
|
|
5
5
|
import * as v from 'valibot';
|
|
6
6
|
import {packsBookPath, readSpawnManifest} from '../../src/shared/game/shardfile/spawnManifest';
|
|
7
|
-
import {prepareAssetDecoders} from '@wildshard/format/
|
|
8
|
-
import {
|
|
7
|
+
import {prepareAssetDecoders} from '@wildshard/format/shardfileAssets';
|
|
8
|
+
import {validateShardfileFolder} from '@wildshard/format/shardfileValidation';
|
|
9
9
|
import {assertKtx2TableTargets} from '../../src/shared/game/shardfile/ktx2Targets';
|
|
10
10
|
import {StandaloneCatalogueSchema, type StandaloneCatalogue} from '@wildshard/format/standaloneCatalogue';
|
|
11
11
|
import {readTar} from '@wildshard/format/tar';
|
|
@@ -15,6 +15,7 @@ import {bareSlug} from '../../src/shared/game/grid/catalogueSlot';
|
|
|
15
15
|
import {serverPackBookPath} from '../../src/shared/game/shardfile/serverPack';
|
|
16
16
|
import {productTarball} from '../../src/cook/game/productTarball';
|
|
17
17
|
import {titleMetadata, type TitleManifest} from '../../src/client/game/shard/titleList';
|
|
18
|
+
import {servedDiscoveryPath} from '../../src/cook/game/entryTotals';
|
|
18
19
|
|
|
19
20
|
/** C3 (J61, D7): every build bakes `catalogue.json`, so a build needs no server, and inlines it in `index.html`, so the
|
|
20
21
|
* first paint waits on no new fetch. `WILDSHARD_CATALOGUE` names a file a deploy took from `api-server`'s
|
|
@@ -45,10 +46,12 @@ export function titleRowOf(bytes: Uint8Array, home = ''): TitleManifest {
|
|
|
45
46
|
return {...titleMetadata(data), card: {thumb: at(thumb), portrait: at(portrait), landscape: at(landscape)}, discovery: `${home}/shardfiles/${data.slug}/discovery.json?v=${hash8(bytes)}`};
|
|
46
47
|
}
|
|
47
48
|
/** Every built product's title row, in title order. */
|
|
48
|
-
export function productTitleRows(products: string): readonly TitleManifest[] {
|
|
49
|
+
export function productTitleRows(products: string, outDir?: string): readonly TitleManifest[] {
|
|
49
50
|
const rows = readdirSync(products, {withFileTypes: true}).flatMap(entry => {
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
// S12d: the document as this build serves it (`servedDiscoveryPath`, the phone tier's table), so the title's `?v=` is its hash.
|
|
52
|
+
const own = join(products, entry.name, 'mounts/shardfiles', entry.name, 'discovery.json'), served = outDir === undefined ? undefined : servedDiscoveryPath(outDir, entry.name);
|
|
53
|
+
const file = served !== undefined && existsSync(served) ? served : own;
|
|
54
|
+
return entry.isDirectory() && existsSync(own) ? [titleRowOf(readFileSync(file))] : [];
|
|
52
55
|
});
|
|
53
56
|
return rows.sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
|
|
54
57
|
}
|
|
@@ -84,7 +87,7 @@ export function inTreeCatalogue(root: string, products: string, listed: readonly
|
|
|
84
87
|
/** The build's step: the file a deploy names, else the tree's. */
|
|
85
88
|
export function bakeCatalogue(outDir: string, root: string): void {
|
|
86
89
|
const {WILDSHARD_CATALOGUE: source} = process.env;
|
|
87
|
-
const rows = productTitleRows(join(root, 'out'));
|
|
90
|
+
const rows = productTitleRows(join(root, 'out'), outDir);
|
|
88
91
|
const document = source === undefined ? inTreeCatalogue(root, join(root, 'out'), rows) : v.parse(StandaloneCatalogueSchema, JSON.parse(readFileSync(source, 'utf8')));
|
|
89
92
|
writeCatalogueDocument(outDir, document);
|
|
90
93
|
writeTitleRows(outDir, rows);
|
|
@@ -151,7 +154,7 @@ export function addCookedShards(outDir: string, shards: readonly CookedShard[],
|
|
|
151
154
|
export async function productVerdict(tarball: Uint8Array, out: string): Promise<{readonly verdict: unknown; readonly discovery?: Uint8Array}> {
|
|
152
155
|
await prepareAssetDecoders();
|
|
153
156
|
const files = readTar(tarball);
|
|
154
|
-
|
|
157
|
+
validateShardfileFolder({read: (path, maximum) => { const bytes = files.get(path); if (bytes === undefined || bytes.length > maximum) throw new Error(`No ${path}`); return bytes; }, paths: () => files.keys()},
|
|
155
158
|
{hash: bytes => createHash('sha256').update(bytes).digest('hex')});
|
|
156
159
|
// S11: a deploy's added shard serves its KTX2 targets itself, or the build already holds them.
|
|
157
160
|
assertKtx2TableTargets({paths: () => files.keys(), read: path => { const bytes = files.get(path); if (bytes === undefined) throw new Error(`No ${path}`); return bytes; }},
|
package/scripts/app-build/gen.ts
CHANGED
|
@@ -27,9 +27,29 @@ export function assetIndex(): string {
|
|
|
27
27
|
|
|
28
28
|
// src/client/game/boot/bytes.generated.ts: the same table as a committed TS module, so the boot plan's declared
|
|
29
29
|
// denominators need no fetch and `pnpm tsc` fails when a file a chunk declares disappears.
|
|
30
|
+
const BYTES_TABLE = 'src/client/game/boot/bytes.generated.ts';
|
|
30
31
|
function bytesModule(): string {
|
|
31
|
-
const rows = JSON.parse(assetIndex()) as Record<string, number
|
|
32
|
-
|
|
32
|
+
const rows = Object.fromEntries(Object.entries(JSON.parse(assetIndex()) as Record<string, number>).filter(([name]) => !name.endsWith('.DS_Store')));
|
|
33
|
+
// The staged table is the baseline (HEAD's, unless a fix to it is staged on purpose), not the file a local run last
|
|
34
|
+
// wrote: that may hold an older public/'s sizes.
|
|
35
|
+
let committed = '';
|
|
36
|
+
try { committed = execFileSync('git', ['show', `:${BYTES_TABLE}`], { encoding: 'utf8', maxBuffer: 16_000_000, stdio: ['ignore', 'pipe', 'ignore'] }); }
|
|
37
|
+
catch { /* no git history here (an installed package): nothing to compare */ }
|
|
38
|
+
const changed = changedContentNamed(committed, rows);
|
|
39
|
+
if (changed.length > 0) throw new Error(`${changed.length} content-named file(s) changed bytes under one URL, which players keep for a year (AUDIO AU21): ${changed.slice(0, 5).join(', ')}. A changed file needs a new name (sharddev 0.2.10 renames a re-encoded recording); a stale public/ copy needs \`pnpm pins\``);
|
|
40
|
+
return publicBytesTableSource(rows);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** AUDIO AU21: a content-named file (`contentNamed`: no `?v=`, kept by the worker, `/assets/*` immutable) is served for a
|
|
44
|
+
* year under its URL, so a new byte table may not give one of the previous table's content-named paths another size.
|
|
45
|
+
* A renamed file is a new row and passes; same size with other bytes slips past (the table holds sizes only). */
|
|
46
|
+
export function changedContentNamed(previous: string, rows: Readonly<Record<string, number>>): string[] {
|
|
47
|
+
const out: string[] = [];
|
|
48
|
+
for (const [, name, size] of previous.matchAll(/^\s*"([^"]+)": (\d+),?$/gmu)) {
|
|
49
|
+
const now = name === undefined ? undefined : rows[name];
|
|
50
|
+
if (name !== undefined && now !== undefined && contentNamed(name) && now !== Number(size)) out.push(`${name} (${size} to ${now} bytes)`);
|
|
51
|
+
}
|
|
52
|
+
return out;
|
|
33
53
|
}
|
|
34
54
|
|
|
35
55
|
// src/client/game/boot/versions.generated.ts: a content hash per file under public/assets (E160; NALATI-MERGE F4 started it for
|