@wildshard/engine 0.1.17 → 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 +16 -0
- package/budgets/shard-size-baseline.json +10 -4
- package/index.html +6 -4
- package/lint/engine-sides.json +21 -0
- package/lint/host-callback-syntax.mjs +2 -1
- package/lint/host-callbacks.mjs +3 -3
- package/lint/host-files.mjs +5 -4
- package/lint/no-base64.mjs +3 -1
- package/lint/ratchet.json +0 -68
- package/lint/ratchet.mjs +1 -4
- package/lint/shard-imports.mjs +6 -7
- package/lint/shard-source.d.mts +9 -0
- package/lint/shard-source.mjs +91 -0
- package/lint/shardfile-boundaries.mjs +10 -8
- package/lint/sim-closure.mjs +6 -3
- package/lint/wildshard-plugin.d.ts +4 -0
- package/lint/wildshard-plugin.js +22 -23
- package/package.json +25 -16
- 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.d.mts +3 -0
- package/scripts/app-build/outputProducts.mjs +35 -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 +34 -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 +3 -1
- 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-check.mjs +4 -2
- package/scripts/chromium-keychain.d.mts +1 -1
- package/scripts/chromium-keychain.mjs +3 -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 +20 -3
- package/scripts/devices.d.mts +4 -0
- package/scripts/devices.mjs +39 -0
- package/scripts/devserver-client.d.mts +4 -2
- package/scripts/devserver-client.mjs +25 -8
- package/scripts/docs-inputs-proof.mjs +6 -6
- package/scripts/doctor-proof.mjs +1 -1
- package/scripts/e2e-faults.mjs +159 -0
- 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 +136 -18
- 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 +213 -0
- 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 +5 -3
- package/scripts/offline-proof-rules.mjs +34 -7
- package/scripts/offline-proof.mjs +88 -18
- 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-proof.mjs +101 -0
- package/scripts/tier-textures.mjs +78 -0
- 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 +1 -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 +84 -24
- package/scripts/worker-client-play.mjs +7 -2
- package/scripts/worker-client-proof.mjs +1 -1
- package/scripts/worker-client-slug.mjs +44 -0
- package/scripts/worktree-reap.mjs +5 -5
- package/src/.oxlintrc.json +3 -182
- package/src/client/app/entry.ts +47 -12
- 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/parsedPages.ts +127 -58
- package/src/client/engine/boot/texturePack.ts +2 -2
- package/src/client/engine/build.d.ts +2 -0
- package/src/client/engine/core/Game.ts +18 -0
- package/src/client/engine/core/bootstrap.ts +4 -1
- package/src/client/engine/debug/probe.ts +18 -1
- package/src/client/engine/fx/LightPool.ts +41 -1
- 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 +53 -14
- 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/render/precompile.ts +20 -14
- package/src/client/engine/saves/indexed.ts +2 -2
- package/src/client/engine/telemetry/browserErrors.ts +28 -4
- package/src/client/engine/telemetry/deviceSnapshot.ts +155 -0
- 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 -216
- package/src/client/game/boot/bytes.generated.ts +118 -238
- 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 -7
- package/src/client/game/devScene/hook.ts +291 -0
- package/src/client/game/grid/area.ts +38 -0
- package/src/client/game/grid/cellLoading.ts +12 -2
- package/src/client/game/grid/live.ts +134 -12
- package/src/client/game/grid/liveSession.ts +47 -5
- package/src/client/game/grid/mapAtlas.ts +18 -4
- package/src/client/game/grid/menu.ts +4 -0
- package/src/client/game/grid/minimapBlend.ts +15 -5
- package/src/client/game/grid/neighbourPanels.ts +10 -1
- package/src/client/game/grid/oneWayIn.ts +5 -1
- package/src/client/game/grid/placedCards.ts +55 -0
- package/src/client/game/grid/placedCells.ts +233 -0
- 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/regionalRuntime.ts +6 -0
- package/src/client/game/grid/regionalWorld.ts +15 -2
- package/src/client/game/grid/roadCull.ts +44 -14
- 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/roadTileBacking.ts +13 -3
- 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 +29 -4
- package/src/client/game/grid/shardfileFar.ts +9 -3
- 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 +11 -1
- package/src/client/game/shard/titleList.ts +6 -2
- 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 +21 -8
- 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/game/titleDeck.ts +4 -3
- package/src/client/host/online/doctor.ts +2 -0
- package/src/client/host/online/linkScreens.ts +30 -4
- package/src/client/host/online/shell.ts +14 -0
- 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 +67 -9
- package/src/cook/game/spawnParts.ts +33 -8
- package/src/cook/game/tierTextures.ts +349 -0
- package/src/e2e/smoke/game.ts +19 -14
- package/src/e2e/smoke/page-globals.d.ts +9 -8
- package/src/e2e/smoke/template2.spec.ts +8 -7
- 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 +4 -19
- 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/socketTransport.ts +2 -1
- package/src/server/host/dedicated/workerTable.ts +15 -4
- package/src/server/host/dedicated/world.ts +95 -8
- 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/engine/net/deviceWord.ts +138 -0
- package/src/shared/engine/net/socketFrames.ts +7 -4
- 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/catalogueSlot.ts +7 -0
- package/src/shared/game/grid/placementRows.ts +36 -0
- 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,22 @@ 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
|
+
|
|
20
|
+
## v0.1.18 (2026-11-13)
|
|
21
|
+
|
|
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.
|
|
23
|
+
- New shards placed on the world grid after a release, like Thin Ice, get their own card in Shard select and you can walk in.
|
|
24
|
+
- iPhones use less memory: Driftwood loads compressed textures, and the world file loads with far fewer allocations.
|
|
25
|
+
- Walking off a shard's edge no longer stalls while the next shard builds, and Driftwood Isle and Pine Hollow have their sounds back.
|
|
26
|
+
- Behind the scenes: we log each player's device to find crashes, and shard authors can prepare a release without the engine source.
|
|
27
|
+
|
|
12
28
|
## v0.1.17 (2026-11-13)
|
|
13
29
|
|
|
14
30
|
- Crossing is on: walk off one shard's edge into the next at full speed, with no invisible walls at chunk edges or seams.
|
|
@@ -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",
|
|
@@ -419,6 +421,7 @@
|
|
|
419
421
|
"src/client/engine/script/client.ts": "client",
|
|
420
422
|
"src/client/engine/telemetry/bootInbox.ts": "client",
|
|
421
423
|
"src/client/engine/telemetry/browserErrors.ts": "client",
|
|
424
|
+
"src/client/engine/telemetry/deviceSnapshot.ts": "client",
|
|
422
425
|
"src/client/engine/telemetry/screenOutbox.ts": "client",
|
|
423
426
|
"src/client/engine/telemetry/staleBuildReport.ts": "client",
|
|
424
427
|
"src/client/engine/telemetry/crossroads.ts": "client",
|
|
@@ -576,6 +579,7 @@
|
|
|
576
579
|
"src/client/game/boot/bytes.generated.ts": "client",
|
|
577
580
|
"src/client/game/boot/loadingPaths.ts": "client",
|
|
578
581
|
"src/client/game/boot/packs.generated.ts": "client",
|
|
582
|
+
"src/client/game/boot/placedSpawn.ts": "client",
|
|
579
583
|
"src/client/game/boot/spawnDownload.ts": "client",
|
|
580
584
|
"src/client/game/boot/versions.generated.ts": "client",
|
|
581
585
|
"src/client/game/Boss.ts": "client",
|
|
@@ -613,6 +617,7 @@
|
|
|
613
617
|
"src/client/game/grid/admissionPriority.ts": "client",
|
|
614
618
|
"src/client/game/grid/admissionYield.ts": "client",
|
|
615
619
|
"src/client/game/grid/approachProductInputs.ts": "client",
|
|
620
|
+
"src/client/game/grid/area.ts": "client",
|
|
616
621
|
"src/client/game/grid/assetResidency.ts": "client",
|
|
617
622
|
"src/client/game/grid/borderShimmer.ts": "client",
|
|
618
623
|
"src/client/game/grid/budgetOverlay.ts": "client",
|
|
@@ -651,6 +656,7 @@
|
|
|
651
656
|
"src/client/game/grid/memoryRows.ts": "client",
|
|
652
657
|
"src/client/game/grid/memoryWarning.ts": "client",
|
|
653
658
|
"src/client/game/grid/menu.ts": "client",
|
|
659
|
+
"src/client/game/devScene/hook.ts": "client",
|
|
654
660
|
"src/client/game/grid/minimapBlend.ts": "client",
|
|
655
661
|
"src/client/game/grid/nearGrain.ts": "client",
|
|
656
662
|
"src/client/game/grid/nearPlaceholderPlan.ts": "client",
|
|
@@ -659,6 +665,9 @@
|
|
|
659
665
|
"src/client/game/grid/neighbourPanels.ts": "client",
|
|
660
666
|
"src/client/game/grid/neighbourRows.ts": "client",
|
|
661
667
|
"src/client/game/grid/oneWayIn.ts": "client",
|
|
668
|
+
"src/client/game/grid/placedCells.ts": "client",
|
|
669
|
+
"src/client/game/grid/placedContent.ts": "client",
|
|
670
|
+
"src/client/game/grid/placedCards.ts": "client",
|
|
662
671
|
"src/client/game/grid/pageEntry.ts": "client",
|
|
663
672
|
"src/client/game/grid/pageResidency.ts": "client",
|
|
664
673
|
"src/client/game/grid/pageShell.ts": "client",
|
|
@@ -693,6 +702,7 @@
|
|
|
693
702
|
"src/client/game/grid/roadSignPaint.ts": "client",
|
|
694
703
|
"src/client/game/grid/roadSignPixels.ts": "client",
|
|
695
704
|
"src/client/game/grid/roadSignPreparation.ts": "client",
|
|
705
|
+
"src/client/game/grid/roadSignScale.ts": "client",
|
|
696
706
|
"src/client/game/grid/roadSky.ts": "client",
|
|
697
707
|
"src/client/game/grid/roadSolid.ts": "client",
|
|
698
708
|
"src/client/game/grid/roadTileArchive.ts": "client",
|
|
@@ -707,6 +717,7 @@
|
|
|
707
717
|
"src/client/game/grid/roadTileWrite.worker.ts": "client",
|
|
708
718
|
"src/client/game/grid/roadTileWriter.ts": "client",
|
|
709
719
|
"src/client/game/grid/runtimeCost.ts": "client",
|
|
720
|
+
"src/client/game/grid/screenReports.ts": "client",
|
|
710
721
|
"src/client/game/grid/seamLook.ts": "client",
|
|
711
722
|
"src/client/game/grid/session.ts": "client",
|
|
712
723
|
"src/client/game/grid/shardfileFar.ts": "client",
|
|
@@ -938,6 +949,7 @@
|
|
|
938
949
|
"src/client/game/shardfile/clientWater.ts": "client",
|
|
939
950
|
"src/client/game/shardfile/clientWaterSurfaces.ts": "client",
|
|
940
951
|
"src/client/game/shardfile/clientWorker.ts": "client",
|
|
952
|
+
"src/client/game/shardfile/seatGrace.ts": "client",
|
|
941
953
|
"src/client/game/shardfile/clientWorldAssembly.ts": "client",
|
|
942
954
|
"src/client/game/shardfile/constructionCheckpoint.ts": "client",
|
|
943
955
|
"src/client/game/shardfile/controlFiles.ts": "client",
|
|
@@ -979,6 +991,7 @@
|
|
|
979
991
|
"src/client/game/shardfile/productPreflight.ts": "client",
|
|
980
992
|
"src/client/game/shardfile/questWorld.ts": "client",
|
|
981
993
|
"src/client/game/shardfile/readAsset.ts": "client",
|
|
994
|
+
"src/client/game/shardfile/reflectingWater.ts": "client",
|
|
982
995
|
"src/client/game/shardfile/reusableWholeLibrary.ts": "client",
|
|
983
996
|
"src/client/game/shardfile/runtimeProduct.ts": "client",
|
|
984
997
|
"src/client/game/shardfile/sceneBakeFiles.ts": "client",
|
|
@@ -1089,6 +1102,8 @@
|
|
|
1089
1102
|
"src/client/host/online/voice.ts": "client",
|
|
1090
1103
|
"src/client/host/online/voiceUi.ts": "client",
|
|
1091
1104
|
"src/client/host/standalone/shell.ts": "client",
|
|
1105
|
+
"src/cook/game/astc6Encode.ts": "cook",
|
|
1106
|
+
"src/cook/game/astc6Wasm.ts": "cook",
|
|
1092
1107
|
"src/cook/game/audioReport.ts": "cook",
|
|
1093
1108
|
"src/cook/game/brotliSizeCache.d.mts": "cook",
|
|
1094
1109
|
"src/cook/game/brotliSizeCache.mjs": "cook",
|
|
@@ -1111,6 +1126,7 @@
|
|
|
1111
1126
|
"src/cook/game/shardCook.ts": "cook",
|
|
1112
1127
|
"src/cook/game/spawnParts.ts": "cook",
|
|
1113
1128
|
"src/cook/game/stripPack.ts": "cook",
|
|
1129
|
+
"src/cook/game/tierTextures.ts": "cook",
|
|
1114
1130
|
"src/server/engine/ai/bossContenders.ts": "server",
|
|
1115
1131
|
"src/server/engine/ai/burstFlyer.ts": "server",
|
|
1116
1132
|
"src/server/engine/ai/challengeGrazer.ts": "server",
|
|
@@ -1289,6 +1305,7 @@
|
|
|
1289
1305
|
"src/client/game/shardfile/serverRoute.ts": "client",
|
|
1290
1306
|
"src/server/host/dedicated/cellHost.ts": "server",
|
|
1291
1307
|
"src/server/host/dedicated/crossing.ts": "server",
|
|
1308
|
+
"src/server/host/dedicated/loopLag.ts": "server",
|
|
1292
1309
|
"src/server/host/dedicated/roadRoom.ts": "server",
|
|
1293
1310
|
"src/server/host/dedicated/cellProtocol.ts": "server",
|
|
1294
1311
|
"src/server/host/dedicated/cellWorker.ts": "server",
|
|
@@ -1311,6 +1328,7 @@
|
|
|
1311
1328
|
"src/server/host/dedicated/saves/saveStore.ts": "server",
|
|
1312
1329
|
"src/server/host/dedicated/saves/writeQueue.ts": "server",
|
|
1313
1330
|
"src/server/host/dedicated/seats.ts": "server",
|
|
1331
|
+
"src/server/host/dedicated/serverMetrics.ts": "server",
|
|
1314
1332
|
"src/server/host/dedicated/serverReports.ts": "server",
|
|
1315
1333
|
"src/server/host/dedicated/serverSentry.ts": "server",
|
|
1316
1334
|
"src/server/host/dedicated/shopGate.ts": "server",
|
|
@@ -1455,6 +1473,7 @@
|
|
|
1455
1473
|
"src/shared/engine/net/schema.ts": "shared",
|
|
1456
1474
|
"src/shared/engine/net/shardNet.ts": "shared",
|
|
1457
1475
|
"src/shared/engine/net/socketFrames.ts": "shared",
|
|
1476
|
+
"src/shared/engine/net/deviceWord.ts": "shared",
|
|
1458
1477
|
"src/shared/engine/net/transport.ts": "shared",
|
|
1459
1478
|
"src/shared/engine/net/wireFrames.ts": "shared",
|
|
1460
1479
|
"src/shared/engine/net/wireMessages.ts": "shared",
|
|
@@ -1584,6 +1603,7 @@
|
|
|
1584
1603
|
"src/shared/engine/world/windStrength.ts": "shared",
|
|
1585
1604
|
"src/shared/engine/world/yawFrame.ts": "shared",
|
|
1586
1605
|
"src/shared/game/achievements.ts": "shared",
|
|
1606
|
+
"src/shared/game/devColliders.ts": "shared",
|
|
1587
1607
|
"src/shared/game/ambient/flock.ts": "shared",
|
|
1588
1608
|
"src/shared/game/animation/limbBlend.ts": "shared",
|
|
1589
1609
|
"src/shared/game/animation/limbRig.ts": "shared",
|
|
@@ -1619,6 +1639,7 @@
|
|
|
1619
1639
|
"src/shared/game/grid/catalogue.ts": "shared",
|
|
1620
1640
|
"src/shared/game/grid/catalogueDocument.ts": "shared",
|
|
1621
1641
|
"src/shared/game/grid/catalogueSlot.ts": "shared",
|
|
1642
|
+
"src/shared/game/grid/placementRows.ts": "shared",
|
|
1622
1643
|
"src/shared/game/grid/cellEvents.ts": "shared",
|
|
1623
1644
|
"src/shared/game/grid/collisionStrips.ts": "shared",
|
|
1624
1645
|
"src/shared/game/grid/compiledStrips.ts": "shared",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// G642: callback admission from syntax; the typed catalogue is a separate build tool.
|
|
2
2
|
import { hostPlayFile } from './host-files.mjs';
|
|
3
|
+
import { shardFile } from './shard-source.mjs';
|
|
3
4
|
import { createSyntaxGraph, syntaxChild as child,
|
|
4
5
|
syntaxFunctions as functions, syntaxClasses as classes } from './syntax-values.mjs';
|
|
5
6
|
|
|
6
7
|
const platform = file => /^src\/(?:engine|game|sdk|sharddev)\//u.test(file);
|
|
7
|
-
const shard = file => file.startsWith('src/shards/');
|
|
8
8
|
const keyOf = node => node?.type === 'Identifier' ? node.name : node?.type === 'Literal' ? String(node.value) : null;
|
|
9
9
|
const unwrap = input => {
|
|
10
10
|
let node = input;
|
|
@@ -16,6 +16,7 @@ const unwrap = input => {
|
|
|
16
16
|
export function hostCallbackSites(root, file, program) {
|
|
17
17
|
if (!hostPlayFile(root, file)) return [];
|
|
18
18
|
const { primary, make, values } = createSyntaxGraph(root, file, program);
|
|
19
|
+
const shard = path => shardFile(root, path) !== null;
|
|
19
20
|
function leaves(ref, label, seen = new Set()) {
|
|
20
21
|
const node = unwrap(ref.node);
|
|
21
22
|
if (!node || seen.has(node)) return [];
|
package/lint/host-callbacks.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import { existsSync } from 'node:fs';
|
|
|
3
3
|
import { relative, resolve } from 'node:path';
|
|
4
4
|
import ts from '@typescript/typescript6';
|
|
5
5
|
import { hostPlayFile } from './host-files.mjs';
|
|
6
|
+
import { shardFile, shardSourceDirs } from './shard-source.mjs';
|
|
6
7
|
import { formatSource } from '../scripts/format-package.mjs';
|
|
7
8
|
|
|
8
9
|
const projects = new Map();
|
|
9
10
|
const localPath = (root, file) => relative(root, file).replaceAll('\\', '/');
|
|
10
11
|
const platform = file => /^src\/(?:engine|game|sdk|sharddev)\//u.test(file);
|
|
11
|
-
const shard = file => /^src\/shards\/([^/]+)\/(.+)$/u.exec(file);
|
|
12
12
|
/** One compiler/checker per immutable tree; no diagnostics or emit, only binding/signature resolution. */
|
|
13
13
|
export function hostAnalysis(inputRoot) {
|
|
14
14
|
const root = resolve(inputRoot);
|
|
@@ -16,7 +16,7 @@ export function hostAnalysis(inputRoot) {
|
|
|
16
16
|
const configFile = resolve(root, 'tsconfig.json');
|
|
17
17
|
const config = existsSync(configFile) ? ts.readConfigFile(configFile, file => ts.sys.readFile(file)).config : {};
|
|
18
18
|
const parsed = ts.parseJsonConfigFileContent(config, ts.sys, root);
|
|
19
|
-
const files = ts.sys.readDirectory(resolve(root,
|
|
19
|
+
const files = shardSourceDirs(root).flatMap(dir => ts.sys.readDirectory(resolve(root, dir), ['.ts', '.tsx', '.mts', '.cts'], ['**/node_modules/**', '**/dist/**']))
|
|
20
20
|
.filter(file => hostPlayFile(root, localPath(root, file)));
|
|
21
21
|
const sectionRegistry = formatSource(root, 'sections.ts');
|
|
22
22
|
const program = ts.createProgram([...files, ...existsSync(sectionRegistry) ? [sectionRegistry] : []], { target: ts.ScriptTarget.ES2022, module: ts.ModuleKind.ESNext,
|
|
@@ -49,7 +49,7 @@ export function hostAnalysis(inputRoot) {
|
|
|
49
49
|
if (type.getCallSignatures().length > 0) return [label];
|
|
50
50
|
return checker.getPropertiesOfType(type).flatMap(property => {
|
|
51
51
|
const decl = property.valueDeclaration;
|
|
52
|
-
if (!decl ||
|
|
52
|
+
if (!decl || shardFile(root, pathOf(decl)) === null) return [];
|
|
53
53
|
return typeLeaves(checker.getTypeOfSymbolAtLocation(property, node), node, `${label}.${property.name}`, next);
|
|
54
54
|
});
|
|
55
55
|
}
|
package/lint/host-files.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
// Path-only play boundary, shared by lint and the typed catalogue builder.
|
|
2
|
+
import { shardFile } from './shard-source.mjs';
|
|
2
3
|
|
|
3
|
-
/** Build-only functions are not play callbacks. */
|
|
4
|
-
export function hostPlayFile(
|
|
5
|
-
const
|
|
6
|
-
return
|
|
4
|
+
/** Build-only functions are not play callbacks. `file` is relative to `root`, in either shard layout (SA45). */
|
|
5
|
+
export function hostPlayFile(root, file) {
|
|
6
|
+
const shard = shardFile(root, file);
|
|
7
|
+
return shard !== null && !/^(?:data|generators|behaviour|assets|blender)\/|^shard\.config\.|\.d\.ts$|\.generated\./u.test(shard.local);
|
|
7
8
|
}
|
package/lint/no-base64.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
// G649 B3: syntactic calls only; no TypeScript program or import-graph walk.
|
|
2
2
|
import { existsSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
|
+
import { lintFile } from './shard-source.mjs';
|
|
4
5
|
|
|
5
6
|
const unwrap = node => ['TSAsExpression', 'TSTypeAssertion', 'TSNonNullExpression', 'ChainExpression', 'ParenthesizedExpression'].includes(node?.type)
|
|
6
7
|
? unwrap(node.expression) : node;
|
|
@@ -98,7 +99,8 @@ export function noBase64Rule(policyFile) {
|
|
|
98
99
|
meta: { type: 'problem', docs: { description: 'Keep binary content binary; never encode or decode base64 (G649)' },
|
|
99
100
|
schema: [{ type: 'object', properties: { count: { type: 'boolean' } }, additionalProperties: false }] },
|
|
100
101
|
create(context) {
|
|
101
|
-
|
|
102
|
+
// SA24 / SA45: shard source is keyed by its source path (src/shards/<slug>/<local>) in either layout, as the other shard rules read it
|
|
103
|
+
const shard = lintFile(context.filename, process.cwd()), file = shard.shard === null ? base64Path(context.filename) : shard.path;
|
|
102
104
|
if (!/^(?:src|scripts)\//u.test(file)) return {};
|
|
103
105
|
const limit = context.options[0]?.count === true ? 0 : Object.hasOwn(policy.files, file) ? policy.files[file] : 0;
|
|
104
106
|
let found = 0;
|
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/lint/shard-imports.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { dirname, isAbsolute, resolve } from 'node:path';
|
|
2
2
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
3
|
+
import { shardOfFilename } from './shard-source.mjs';
|
|
3
4
|
|
|
4
5
|
/** The file Node loads for relative `source` (a URL resolve, query and hash dropped), without a trailing slash; null when it cannot. */
|
|
5
6
|
const nodePath = (filename, source) => {
|
|
@@ -25,8 +26,7 @@ export function shardGameImport(filename, source) {
|
|
|
25
26
|
|
|
26
27
|
/** G307: a game's exports map is its plugin surface, never a parallel SDK facade allowlist. */
|
|
27
28
|
export function gamePluginImportViolation(filename, source, exports) {
|
|
28
|
-
const
|
|
29
|
-
const local = /(?:^|\/)src\/shards\/[^/]+\/(.+)$/u.exec(path)?.[1];
|
|
29
|
+
const local = shardOfFilename(filename)?.local;
|
|
30
30
|
if (local === undefined || !shardGameImport(filename, source)) return null;
|
|
31
31
|
if (!local.startsWith('runtime/')) return 'game imports belong only in runtime/';
|
|
32
32
|
if (!source.startsWith('@wildshard/game/')) return 'use the defining @wildshard/game package export';
|
|
@@ -72,12 +72,12 @@ function encodedImportViolation(filename, rawSource) {
|
|
|
72
72
|
* (bake commands, Blender sources, declarations) imports by a plain relative path or a package name: an escaped,
|
|
73
73
|
* absolute or file: path would slip past the layer rules, which read it with path.resolve. */
|
|
74
74
|
export function generatorImportViolation(filename, rawSource) {
|
|
75
|
-
const path=resolve(filename).replaceAll('\\','/'),
|
|
76
|
-
if(
|
|
75
|
+
const path=resolve(filename).replaceAll('\\','/'), shard=shardOfFilename(path);
|
|
76
|
+
if(shard===null || typeof rawSource!=='string')return null;
|
|
77
77
|
const encoded=encodedImportViolation(filename,rawSource);
|
|
78
78
|
if(encoded!==null)return encoded;
|
|
79
79
|
const source=pathPart(rawSource);
|
|
80
|
-
if(!(/^(?:generators|data|quests)\//u.test(
|
|
80
|
+
if(!(/^(?:generators|data|quests)\//u.test(shard.local) || shard.local==='shard.config.ts'))
|
|
81
81
|
return isAbsolute(source) || source.startsWith('file:') ? 'shard files import by relative path or package name, never an absolute path or file: URL' : null;
|
|
82
82
|
// Test runners and Node fixture tools never become producer imports.
|
|
83
83
|
if(path.endsWith('.test.ts') && source!=='<computed>' && !source.startsWith('.')
|
|
@@ -85,7 +85,6 @@ export function generatorImportViolation(filename, rawSource) {
|
|
|
85
85
|
if(/^@wildshard\/sharddev\/runtime(?:\/|$)/u.test(source))return 'trusted SDK runtime code is not an authoring import';
|
|
86
86
|
if(source==='three' || source.startsWith('three/') || /^@wildshard\/(?:engine\/host|sdk|sharddev|commons)(?:\/|$)/u.test(source))return null;
|
|
87
87
|
const local=source.startsWith('.') ? resolve(dirname(filename),source).replaceAll('\\','/') : '';
|
|
88
|
-
|
|
89
|
-
if(local.startsWith(boundary))return null;
|
|
88
|
+
if(local.startsWith(shard.dir))return null;
|
|
90
89
|
return 'author folders import only three, sdk, commons or their own shard files';
|
|
91
90
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/** SA45: a file in shard source, in either layout (`src/shards/<slug>/` or a single-shard repo's `src/`). */
|
|
2
|
+
export interface ShardFile { readonly slug: string; readonly local: string; readonly base: string; readonly path: string }
|
|
3
|
+
export interface LintFile { readonly root: string; readonly file: string; readonly path: string; readonly shard: ShardFile | null }
|
|
4
|
+
export function repoShardSlug(repo: string): string | null;
|
|
5
|
+
export function shardFile(root: string, file: string): ShardFile | null;
|
|
6
|
+
export function shardSourceDirs(root: string): string[];
|
|
7
|
+
export function lintFile(filename: string, base: string): LintFile;
|
|
8
|
+
export function sourcePath(filename: string, base: string): string;
|
|
9
|
+
export function shardOfFilename(filename: string): { readonly slug: string; readonly local: string; readonly dir: string } | null;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// SA45 (J317, J329): the one answer to "is this file shard source, which shard, and where is its root", for both
|
|
2
|
+
// layouts. Engine and multi-shard repos keep `src/shards/<slug>/`; a single-shard repo keeps its one shard at `src/`
|
|
3
|
+
// (`src/shard.config.ts`, or a hand-written `src/shard.json`), the rule sharddev's shardSource.ts (SA16) uses.
|
|
4
|
+
//
|
|
5
|
+
// Lint rules match one layout: a single-shard file `src/<local>` reads as `src/shards/<slug>/<local>` (its source path).
|
|
6
|
+
// Debt keys (lint/ratchet.json, runtime-performance.json) use that form too, so a repo's keys survive the move to `src/`.
|
|
7
|
+
// Anything that opens the file on disk uses its real path; scripts/blender/targets.json may name either form.
|
|
8
|
+
import { existsSync, readFileSync } from 'node:fs';
|
|
9
|
+
import { basename, relative, resolve, sep } from 'node:path';
|
|
10
|
+
|
|
11
|
+
const SHARD_CONFIG = 'shard.config.ts';
|
|
12
|
+
const SHARD_INDEX = 'shard.json';
|
|
13
|
+
const slash = path => path.replaceAll('\\', '/');
|
|
14
|
+
const readJson = (file) => {
|
|
15
|
+
try { return JSON.parse(readFileSync(file, 'utf8')); } catch { return null; }
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
const repoSlugs = new Map();
|
|
19
|
+
/** The slug of the one shard whose source is `<repo>/src`, or null when that `src/` is no shard source. Like
|
|
20
|
+
* sharddev's shardFolderName: a hand-written source's `identity.slug`, else `manifest.json`'s `slug`, else the repo folder. */
|
|
21
|
+
export function repoShardSlug(repo) {
|
|
22
|
+
const key = resolve(repo);
|
|
23
|
+
if (repoSlugs.has(key)) return repoSlugs.get(key);
|
|
24
|
+
const src = resolve(key, 'src'), config = existsSync(resolve(src, SHARD_CONFIG));
|
|
25
|
+
const handwritten = !config && existsSync(resolve(src, SHARD_INDEX));
|
|
26
|
+
let slug = null;
|
|
27
|
+
if (config || handwritten) {
|
|
28
|
+
const named = (handwritten ? readJson(resolve(src, SHARD_INDEX))?.identity?.slug : undefined) ?? readJson(resolve(src, 'manifest.json'))?.slug;
|
|
29
|
+
slug = typeof named === 'string' && named !== '' ? named : basename(key);
|
|
30
|
+
}
|
|
31
|
+
repoSlugs.set(key, slug);
|
|
32
|
+
return slug;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** `file` (relative to the repo `root`, real layout) as shard source: its slug, its shard-local path, its shard root
|
|
36
|
+
* relative to `root` (`src` or `src/shards/<slug>`) and its source path (`src/shards/<slug>/<local>`); else null. */
|
|
37
|
+
export function shardFile(root, file) {
|
|
38
|
+
const path = slash(file);
|
|
39
|
+
if (!path.startsWith('src/')) return null;
|
|
40
|
+
const single = repoShardSlug(root);
|
|
41
|
+
if (single !== null) {
|
|
42
|
+
const local = path.slice('src/'.length);
|
|
43
|
+
return local === '' ? null : { slug: single, local, base: 'src', path: `src/shards/${single}/${local}` };
|
|
44
|
+
}
|
|
45
|
+
const match = /^src\/shards\/([^/]+)\/(.+)$/u.exec(path);
|
|
46
|
+
return match === null ? null : { slug: match[1], local: match[2], base: `src/shards/${match[1]}`, path };
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** The folders (relative to `root`) that hold shard source: `src` in a single-shard repo, else `src/shards`. */
|
|
50
|
+
export function shardSourceDirs(root) {
|
|
51
|
+
return repoShardSlug(root) === null ? ['src/shards'] : ['src'];
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/** The innermost single-shard repo holding absolute `abs` (the folder above one of its `/src/` segments), or null. */
|
|
55
|
+
function singleRepoOf(abs) {
|
|
56
|
+
const path = slash(abs);
|
|
57
|
+
for (let index = path.lastIndexOf('/src/'); index > 0; index = path.lastIndexOf('/src/', index - 1)) {
|
|
58
|
+
if (repoShardSlug(path.slice(0, index)) !== null) return path.slice(0, index);
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** Absolute `filename` as lint sees it: `file` its repo-relative real path from the last `/src/` (or relative to
|
|
64
|
+
* `base` when it has none), `path` its source path, `root` the repo root, and `shard` its shardFile (or null). */
|
|
65
|
+
export function lintFile(filename, base) {
|
|
66
|
+
const abs = resolve(filename), repo = singleRepoOf(abs);
|
|
67
|
+
if (repo !== null) {
|
|
68
|
+
const file = slash(relative(repo, abs)), shard = shardFile(repo, file);
|
|
69
|
+
return { root: repo.split('/').join(sep), file, path: shard?.path ?? file, shard };
|
|
70
|
+
}
|
|
71
|
+
const path = slash(relative(base, abs)), index = path.lastIndexOf('/src/');
|
|
72
|
+
const file = index === -1 ? path : path.slice(index + 1);
|
|
73
|
+
const absolute = slash(abs), marker = absolute.lastIndexOf('/src/');
|
|
74
|
+
const root = marker === -1 ? resolve(base) : abs.slice(0, marker);
|
|
75
|
+
const match = /^src\/shards\/([^/]+)\/(.+)$/u.exec(file);
|
|
76
|
+
return { root, file, path: file, shard: match === null ? null : { slug: match[1], local: match[2], base: `src/shards/${match[1]}`, path: file } };
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
/** Absolute `filename`'s source path (see lintFile). */
|
|
80
|
+
export const sourcePath = (filename, base) => lintFile(filename, base).path;
|
|
81
|
+
|
|
82
|
+
/** Absolute `filename`'s shard: slug, shard-local path and the absolute shard root folder; null outside shard source. */
|
|
83
|
+
export function shardOfFilename(filename) {
|
|
84
|
+
const abs = slash(resolve(filename)), repo = singleRepoOf(abs);
|
|
85
|
+
if (repo !== null) {
|
|
86
|
+
const local = abs.slice(repo.length + '/src/'.length);
|
|
87
|
+
return local === '' ? null : { slug: repoShardSlug(repo), local, dir: `${repo}/src/` };
|
|
88
|
+
}
|
|
89
|
+
const match = /(?:^|\/)src\/shards\/([^/]+)\/(.+)$/u.exec(abs);
|
|
90
|
+
return match === null ? null : { slug: match[1], local: match[2], dir: abs.slice(0, abs.length - match[2].length) };
|
|
91
|
+
}
|