@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
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
# Pending platform users (G419)
|
|
2
|
-
|
|
3
|
-
A general, documented W1 platform feature may await a second real user in
|
|
4
|
-
W2 or W3. Each JSON entry names its defining module, optional exported
|
|
5
|
-
binding, later-wave shard, existing plan table row, documentation, and
|
|
6
|
-
`rechecked-by: "end of W3"`. An export entry excludes only that exported
|
|
7
|
-
span; omitting `export` excludes a sole-user module. Helpers remain charged.
|
|
8
|
-
|
|
9
|
-
The reader refuses missing exports, docs, later-wave rows, duplicate entries,
|
|
10
|
-
path escapes and shard-specific source. The JSON report lists excluded spans
|
|
11
|
-
as `pending second user`, with their lines and plan records. They are not
|
|
12
|
-
actual import-graph users. Source inventories and component totals include
|
|
13
|
-
only the remaining charged spans.
|
|
14
|
-
|
|
15
|
-
At the end of W3 remove every unresolved entry: any feature still single-user
|
|
16
|
-
then counts again. Card fields have no allowance; their real paired consumers
|
|
17
|
-
are being merged. The initial required-ground allowance is Driftwood's G384
|
|
18
|
-
admitted query lattice, approved by the coordinator and confirmed by its owner.
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
// SERVER-CELLS (draft, opus-cellmem): Prometheus text for a dedicated server under a bench, with no change to the server. Loaded with
|
|
2
|
-
// `node --import ./scripts/cell-mem/metrics-preload.mjs main.mjs` and `METRICS_PORT` set; without that env it does nothing.
|
|
3
|
-
// The main thread serves `/metrics` on 127.0.0.1 only. Every worker thread (the same preload runs there) sends its own event-loop
|
|
4
|
-
// delay and heap over a BroadcastChannel. The door's own `{"at":"worker"}` log rows (cells resident and awake, players, tick time)
|
|
5
|
-
// are read off `console.info` as they are written, and still written. Nothing leaves loopback; nothing here alters a reply or a tick.
|
|
6
|
-
import { createServer } from 'node:http';
|
|
7
|
-
import { monitorEventLoopDelay } from 'node:perf_hooks';
|
|
8
|
-
import { BroadcastChannel, isMainThread, threadId } from 'node:worker_threads';
|
|
9
|
-
|
|
10
|
-
const port = Number(process.env.METRICS_PORT ?? 0);
|
|
11
|
-
if (Number.isInteger(port) && port > 0) {
|
|
12
|
-
const channel = new BroadcastChannel('wildshard-cell-metrics'), delay = monitorEventLoopDelay({ resolution: 10 });
|
|
13
|
-
delay.enable();
|
|
14
|
-
// The histogram's samples include its own 10 ms timer: what is past that is lag.
|
|
15
|
-
const ms = (/** @type {number} */ ns) => Math.max(0, ns / 1e6 - 10);
|
|
16
|
-
const own = () => { const memory = process.memoryUsage(); return { thread: threadId, p50: ms(delay.percentile(50)), p99: ms(delay.percentile(99)), max: ms(delay.max), heap: memory.heapUsed, heapTotal: memory.heapTotal, external: memory.external, arrayBuffers: memory.arrayBuffers }; };
|
|
17
|
-
if (!isMainThread) {
|
|
18
|
-
// oxlint-disable-next-line unicorn/require-post-message-target-origin -- A BroadcastChannel has no origin to name.
|
|
19
|
-
const timer = setInterval(() => { channel.postMessage(own()); delay.reset(); }, 5_000);
|
|
20
|
-
timer.unref(); channel.unref();
|
|
21
|
-
} else {
|
|
22
|
-
/** @type {Map<number, ReturnType<typeof own>>} */
|
|
23
|
-
const threads = new Map();
|
|
24
|
-
/** @type {Map<number, Record<string, number>>} */
|
|
25
|
-
const workers = new Map();
|
|
26
|
-
channel.onmessage = event => { const row = /** @type {ReturnType<typeof own>} */ (/** @type {{ data: unknown }} */ (event).data); threads.set(row.thread, row); };
|
|
27
|
-
channel.unref();
|
|
28
|
-
const info = console.info.bind(console);
|
|
29
|
-
console.info = (...args) => {
|
|
30
|
-
const [line] = args;
|
|
31
|
-
if (typeof line === 'string' && line.startsWith('{"at":"worker"')) try { const row = JSON.parse(line); workers.set(row.index, row); } catch { /* still logged */ }
|
|
32
|
-
info(...args);
|
|
33
|
-
};
|
|
34
|
-
let main = own();
|
|
35
|
-
setInterval(() => { main = own(); delay.reset(); }, 5_000).unref();
|
|
36
|
-
/** @param {string} labels */
|
|
37
|
-
const pair = (labels, /** @type {number} */ value) => /** @type {[string, number]} */ ([labels, value]);
|
|
38
|
-
const text = () => {
|
|
39
|
-
const memory = process.memoryUsage(), cpu = process.cpuUsage(), rows = /** @type {string[]} */ ([]);
|
|
40
|
-
const metric = (/** @type {string} */ name, /** @type {string} */ type, /** @type {[string, number][]} */ values) => { rows.push(`# TYPE ${name} ${type}`); for (const [labels, value] of values) rows.push(`${name}${labels} ${String(value)}`); };
|
|
41
|
-
const perThread = (/** @type {'heap' | 'external' | 'arrayBuffers'} */ field, /** @type {number} */ mainValue) => [pair('{thread="main"}', mainValue), ...[...threads.values()].map(row => pair(`{thread="${String(row.thread)}"}`, row[field]))];
|
|
42
|
-
metric('process_resident_memory_bytes', 'gauge', [pair('', memory.rss)]);
|
|
43
|
-
metric('process_cpu_seconds_total', 'counter', [pair('', (cpu.user + cpu.system) / 1e6)]);
|
|
44
|
-
metric('nodejs_heap_used_bytes', 'gauge', perThread('heap', memory.heapUsed));
|
|
45
|
-
metric('nodejs_external_bytes', 'gauge', perThread('external', memory.external));
|
|
46
|
-
metric('nodejs_array_buffers_bytes', 'gauge', perThread('arrayBuffers', memory.arrayBuffers));
|
|
47
|
-
metric('nodejs_eventloop_lag_seconds', 'summary', [main, ...threads.values()].flatMap(row => {
|
|
48
|
-
const name = row === main ? 'main' : String(row.thread);
|
|
49
|
-
return [pair(`{thread="${name}",quantile="0.5"}`, row.p50 / 1000), pair(`{thread="${name}",quantile="0.99"}`, row.p99 / 1000), pair(`{thread="${name}",quantile="1"}`, row.max / 1000)];
|
|
50
|
-
}));
|
|
51
|
-
const each = (/** @type {string} */ field) => [...workers.entries()].map(([index, row]) => pair(`{worker="${String(index)}"}`, row[field] ?? 0));
|
|
52
|
-
metric('wildshard_cells_resident', 'gauge', each('cells'));
|
|
53
|
-
metric('wildshard_cells_awake', 'gauge', each('awake'));
|
|
54
|
-
metric('wildshard_players', 'gauge', each('players'));
|
|
55
|
-
metric('wildshard_tick_seconds', 'summary', [...workers.entries()].flatMap(([index, row]) => [['0.5', 'p50'], ['0.95', 'p95'], ['0.99', 'p99'], ['1', 'max']].map(([q, field]) => pair(`{worker="${String(index)}",quantile="${q}"}`, (row[field] ?? 0) / 1000))));
|
|
56
|
-
metric('wildshard_ticks_per_second', 'gauge', each('ticksPerSecond'));
|
|
57
|
-
metric('wildshard_tick_drops', 'gauge', each('drops'));
|
|
58
|
-
return `${rows.join('\n')}\n`;
|
|
59
|
-
};
|
|
60
|
-
createServer((request, response) => {
|
|
61
|
-
if (request.url !== '/metrics') { response.writeHead(404).end(); return; }
|
|
62
|
-
response.writeHead(200, { 'content-type': 'text/plain; version=0.0.4' }).end(text());
|
|
63
|
-
}).on('error', error => { console.error(JSON.stringify({ at: 'metrics.refused', port, error: String(error) })); }).listen(port, '127.0.0.1').unref();
|
|
64
|
-
}
|
|
65
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { Component, ComponentInventory } from './shard-components.mjs';
|
|
2
|
-
|
|
3
|
-
export type ClosedComponents = Record<string, Component[]>;
|
|
4
|
-
export function closedComponents(input?: unknown): ClosedComponents;
|
|
5
|
-
export function compareClosedComponents(before: unknown, after: unknown): string[];
|
|
6
|
-
export function closedComponentFailures(rows: Record<string, {components?: ComponentInventory}>, input: unknown): string[];
|
|
7
|
-
export function closedComponentSources(root: string, input: unknown): string[];
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { existsSync, globSync, readFileSync, readdirSync } from 'node:fs';
|
|
2
|
-
import { resolve } from 'node:path';
|
|
3
|
-
import { pathToFileURL } from 'node:url';
|
|
4
|
-
import * as v from 'valibot';
|
|
5
|
-
import { COMPONENTS, COMPONENT_SHARDS, componentInventory } from './shard-components.mjs';
|
|
6
|
-
import { codeLines, declarationOnlyConfig, declarationOnlyManifest, jsonTypeContract, rawShaderLines, shaderCodeLines, sourceProgressInventory } from './shard-platform.mjs';
|
|
7
|
-
|
|
8
|
-
/** Closed component policy contains identities only: no adjustable line budgets.
|
|
9
|
-
* @param {unknown} [input] */
|
|
10
|
-
export function closedComponents(input = {}) {
|
|
11
|
-
if (input === null || typeof input !== 'object' || Array.isArray(input)) throw new Error('Invalid closedComponents policy');
|
|
12
|
-
for (const [shard, components] of Object.entries(input)) {
|
|
13
|
-
if (!COMPONENT_SHARDS.includes(shard) || !Array.isArray(components) || components.length === 0
|
|
14
|
-
|| new Set(components).size !== components.length || components.some(id => !Object.hasOwn(COMPONENTS, id)))
|
|
15
|
-
throw new Error(`Invalid closedComponents policy for ${shard}`);
|
|
16
|
-
}
|
|
17
|
-
return input;
|
|
18
|
-
}
|
|
19
|
-
/** Locks only accumulate; deleting a lock is a policy regression too. */
|
|
20
|
-
export function compareClosedComponents(before, after) {
|
|
21
|
-
const previous = closedComponents(before), next = closedComponents(after), failures = [];
|
|
22
|
-
for (const [shard, components] of Object.entries(previous)) for (const id of components)
|
|
23
|
-
if (!next[shard]?.includes(id)) failures.push(`${shard}: closed component ${id} lock removed`);
|
|
24
|
-
return failures;
|
|
25
|
-
}
|
|
26
|
-
/** The official component inventories also include sole-user platform charges. */
|
|
27
|
-
export function closedComponentFailures(rows, input) {
|
|
28
|
-
const failures = [];
|
|
29
|
-
for (const [shard, components] of Object.entries(closedComponents(input))) {
|
|
30
|
-
const row = rows[shard]?.components;
|
|
31
|
-
if (row === undefined) { failures.push(`${shard}: closed component inventory missing`); continue; }
|
|
32
|
-
for (const id of components) {
|
|
33
|
-
const lines = row.counts[id];
|
|
34
|
-
if (lines !== 0) failures.push(`${shard}: CLOSED ${id} ${COMPONENTS[id]} has ${lines} custom lines`);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
return failures;
|
|
38
|
-
}
|
|
39
|
-
/** Fast staged-source check. The push check adds G294's verified product/host census. */
|
|
40
|
-
export function closedComponentSources(root, input) {
|
|
41
|
-
const locks = structuredClone(closedComponents(input)), rows = {}, failures = [];
|
|
42
|
-
const directory = resolve(root, 'src/shards');
|
|
43
|
-
const shards = new Set(Object.keys(locks));
|
|
44
|
-
if (existsSync(directory)) for (const entry of readdirSync(directory, { withFileTypes: true }))
|
|
45
|
-
if (entry.isDirectory() && !entry.name.endsWith('-legacy')) shards.add(entry.name);
|
|
46
|
-
/** @type {Set<string>} */
|
|
47
|
-
const generated = new Set();
|
|
48
|
-
const retained = resolve(root, 'scripts/source-generation-outputs.json');
|
|
49
|
-
if (existsSync(retained)) {
|
|
50
|
-
const catalogue = v.parse(v.strictObject({ schema: v.literal('source-generation-outputs/1'),
|
|
51
|
-
producers: v.record(v.string(), v.array(v.string())) }), JSON.parse(readFileSync(retained, 'utf8')));
|
|
52
|
-
for (const outputs of Object.values(catalogue.producers)) for (const path of outputs) generated.add(path);
|
|
53
|
-
}
|
|
54
|
-
for (const shard of shards) {
|
|
55
|
-
const sources = [];
|
|
56
|
-
for (const path of globSync(`src/shards/${shard}/**/*.{ts,tsx,glsl}`, { cwd: root })) {
|
|
57
|
-
if (generated.has(path) || /(?:\/generators\/|\.d\.ts$|\.(?:test|spec)\.tsx?$|\/test\/)/u.test(path)) continue;
|
|
58
|
-
const source = readFileSync(resolve(root, path), 'utf8');
|
|
59
|
-
if (jsonTypeContract(source, path) || path.endsWith('/manifest.ts') && declarationOnlyManifest(source, path)
|
|
60
|
-
|| path.endsWith('/shard.config.ts') && declarationOnlyConfig(source, path)) continue;
|
|
61
|
-
const shader = path.endsWith('.glsl'), lines = shader ? shaderCodeLines(source) : codeLines(source, path);
|
|
62
|
-
if (lines > 0) sources.push({ path, kind: shader ? 'additional-glsl' : 'runtime-ts', lines });
|
|
63
|
-
}
|
|
64
|
-
// G480 holds for art/ too: an art-only commit must still meet the push gate.
|
|
65
|
-
for (const path of globSync(`src/shards/${shard}/art/**/*.json`, { cwd: root })) {
|
|
66
|
-
const lines = rawShaderLines(readFileSync(resolve(root, path), 'utf8'), path);
|
|
67
|
-
if (lines > 0) failures.push(`${shard}: CLOSED art ${path} has ${lines} custom lines`);
|
|
68
|
-
}
|
|
69
|
-
if (COMPONENT_SHARDS.includes(shard)) {
|
|
70
|
-
// Every source folder is frozen, regardless of an old partial lock list.
|
|
71
|
-
locks[shard] = Object.keys(COMPONENTS);
|
|
72
|
-
rows[shard] = { components: componentInventory(root, shard, sources, sources.reduce((sum, row) => sum + row.lines, 0)) };
|
|
73
|
-
} else for (const source of sources)
|
|
74
|
-
failures.push(`${shard}: CLOSED source ${source.path} has ${source.lines} countable lines`);
|
|
75
|
-
}
|
|
76
|
-
return [...closedComponentFailures(rows, locks), ...failures];
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
if (process.argv[1] && import.meta.url === pathToFileURL(resolve(process.argv[1])).href) {
|
|
80
|
-
const root = resolve(import.meta.dirname, '..');
|
|
81
|
-
const policy = JSON.parse(readFileSync(resolve(root, 'lint/ratchet.json'), 'utf8'));
|
|
82
|
-
const locks = closedComponents(policy.closedComponents);
|
|
83
|
-
const failures = closedComponentSources(root, locks);
|
|
84
|
-
if (!process.argv.includes('--source-only')) failures.push(...closedComponentFailures(sourceProgressInventory(root), locks));
|
|
85
|
-
if (failures.length > 0) { console.error(failures.join('\n')); process.exitCode = 1; }
|
|
86
|
-
else console.log('Closed components: no custom lines reintroduced');
|
|
87
|
-
}
|
package/scripts/g571-hosts.d.mts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
/** Exact G571 or unconditional Jake-approved G599-G603 or exact G614 selectors from HOST-BAR. */
|
|
2
|
-
export function g571HostApprovals(root:string):Map<string,Set<string>|null>;
|
|
3
|
-
export function approvedG571Host(approvals:ReadonlyMap<string,ReadonlySet<string>|null>,path:string,name?:string):boolean;
|
package/scripts/g571-hosts.mjs
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
// Credit only exact G571 entries or explicitly tagged Jake-picked hosts.
|
|
2
|
-
import { existsSync, readFileSync } from 'node:fs';
|
|
3
|
-
import { resolve } from 'node:path';
|
|
4
|
-
import { onDisk } from './format-package.mjs';
|
|
5
|
-
import { unsortedPath } from '../lint/layer-exports.mjs';
|
|
6
|
-
|
|
7
|
-
/** Decisions name a host however it was tagged then, and a retag moves the file, not the approval. @param {string} root @param {string} path */
|
|
8
|
-
function hostFile(root, path) {
|
|
9
|
-
if (existsSync(onDisk(root, path))) return path;
|
|
10
|
-
const sided = ['client', 'cook', 'server', 'shared'].map(side => unsortedPath(path).replace(/^src\/(engine|game)\//u, `src/$1/${side}/`));
|
|
11
|
-
return sided.find(candidate => existsSync(onDisk(root, candidate))) ?? path;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
/** Read exact selectors from G571 entries or unconditional G599-G603 or exact G614/G665/G667/G677 entries
|
|
15
|
-
* tagged "Jake-approved host:". Only G599-G603 may include a row id.
|
|
16
|
-
* Missing documentation, ordinary prose and conditional approval grant no credit.
|
|
17
|
-
* A binding never approves its module; imports retain their own attribution.
|
|
18
|
-
* @param {string} root @returns {Map<string,Set<string>|null>} */
|
|
19
|
-
export function g571HostApprovals(root) {
|
|
20
|
-
const file = resolve(root, 'docs/HOST-BAR.md');
|
|
21
|
-
/** @type {Map<string,Set<string>|null>} */
|
|
22
|
-
const result = new Map();
|
|
23
|
-
if (!existsSync(file)) return result;
|
|
24
|
-
for (const line of readFileSync(file, 'utf8').split('\n')) {
|
|
25
|
-
const legacy = /^- G571\b/u.test(line);
|
|
26
|
-
const picked = /^- (?:G(?:599|600|601|602|603)(?: [A-Z]\d+[a-z]?)?|G(?:614|665|667|677)) Jake-approved host:/u.test(line);
|
|
27
|
-
if (!legacy && (!picked || /\b(?:conditional(?:ly)?|condition|until|unless|if)\b/iu.test(line))) continue;
|
|
28
|
-
for (const match of line.matchAll(/`((?:engine|game|sdk|sharddev|format)\/[A-Za-z0-9_./-]+)(?:#([A-Za-z_$][\w$]*))?`/gu)) {
|
|
29
|
-
/** @type {readonly (string|undefined)[]} */
|
|
30
|
-
const captures = match;
|
|
31
|
-
const module = captures[1], name = captures[2];
|
|
32
|
-
if (module === undefined) throw new Error('Invalid G571 host selector');
|
|
33
|
-
if (module.split('/').some(part => part === '.' || part === '..' || part === '') || module.endsWith('.ts')) throw new Error(`Invalid G571 host selector: ${module}`);
|
|
34
|
-
const path = hostFile(root, `src/${module}.ts`);
|
|
35
|
-
if (!existsSync(onDisk(root, path))) { console.warn(`Missing G571 host: ${path}; approval skipped`); continue; }
|
|
36
|
-
if (name === undefined) {
|
|
37
|
-
if (result.has(path)) throw new Error(`Overlapping G571 host: ${path}`);
|
|
38
|
-
result.set(path, null);
|
|
39
|
-
} else {
|
|
40
|
-
if (result.has(path) && result.get(path) === null) throw new Error(`Overlapping G571 host: ${path}`);
|
|
41
|
-
const names = result.get(path) ?? new Set();
|
|
42
|
-
if (names.has(name)) throw new Error(`Duplicate G571 host: ${path}#${name}`);
|
|
43
|
-
names.add(name); result.set(path, names);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
return result;
|
|
48
|
-
}
|
|
49
|
-
/** @param {ReadonlyMap<string,ReadonlySet<string>|null>} approvals
|
|
50
|
-
* @param {string} path @param {string} [name] */
|
|
51
|
-
export function approvedG571Host(approvals, path, name) {
|
|
52
|
-
const names = approvals.get(path);
|
|
53
|
-
return names === null || names !== undefined && name !== undefined && names.has(name);
|
|
54
|
-
}
|
|
@@ -1,242 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// HOST-RULER HR5 (meta docs/plans/HOST-RULER-PLAN.md): build lint/host-register.json from the old lists, once.
|
|
3
|
-
// Sources: engine lint/platform-pending-users.json, scripts/platform-chargebacks.mjs, lint/host-reviews.json,
|
|
4
|
-
// lint/listed-view-code.json, and singleplayer docs/HOST-BAR.md's G571 and G599–G677 lines at a pinned SHA. HR9
|
|
5
|
-
// deletes the engine lists (and this script) with the old ruler; the register is then the only list.
|
|
6
|
-
// Usage: node scripts/host-ruler/register-migrate.mjs [--write|--check] [--singleplayer <dir>] [--meta <dir>]
|
|
7
|
-
// --check (default) rebuilds the register and refuses if the committed one differs; --write rewrites it.
|
|
8
|
-
import { execFileSync } from 'node:child_process';
|
|
9
|
-
import { readFileSync, writeFileSync } from 'node:fs';
|
|
10
|
-
import { join, resolve } from 'node:path';
|
|
11
|
-
import { platformChargeback } from '../platform-chargebacks.mjs';
|
|
12
|
-
import { ENGINE_ROOT } from './roots.mjs';
|
|
13
|
-
import { RECHECK, REGISTER, TESTS, formatRegister, moduleFile, namesBinding, readHostRegister } from './register.mjs';
|
|
14
|
-
|
|
15
|
-
const SINGLEPLAYER_SHA = '48d24fdbbd';
|
|
16
|
-
const META_PLAN = 'docs/plans/multi-repo/MULTI-REPO-PLAN.md';
|
|
17
|
-
const args = process.argv.slice(2);
|
|
18
|
-
/** @param {string} name @param {string} fallback */
|
|
19
|
-
const option = (name, fallback) => { const at = args.indexOf(name); return at === -1 ? fallback : args[at + 1] ?? fallback; };
|
|
20
|
-
const singleplayer = resolve(option('--singleplayer', join(ENGINE_ROOT, '../../wildshard-singleplayer')));
|
|
21
|
-
const meta = resolve(option('--meta', join(ENGINE_ROOT, '../../project-wildshard-meta')));
|
|
22
|
-
/** @param {string} dir @param {string} rev @param {string} path */
|
|
23
|
-
const show = (dir, rev, path) => execFileSync('git', ['-C', dir, 'show', `${rev}:${path}`], { encoding: 'utf8', maxBuffer: 1 << 26 });
|
|
24
|
-
const META_SHA = '4112be3';
|
|
25
|
-
const ENGINE_SOURCES = ['lint/platform-pending-users.json', 'scripts/platform-chargebacks.mjs', 'lint/host-reviews.json', 'lint/listed-view-code.json'];
|
|
26
|
-
if (execFileSync('git', ['-C', ENGINE_ROOT, 'status', '--porcelain', '--', ...ENGINE_SOURCES], { encoding: 'utf8' }).trim() !== '') throw new Error('register-migrate: an old list has uncommitted edits; its SHA would not describe it');
|
|
27
|
-
const engineSha = execFileSync('git', ['-C', ENGINE_ROOT, 'log', '-1', '--format=%h', '--', 'lint/platform-pending-users.json', 'scripts/platform-chargebacks.mjs', 'lint/host-reviews.json', 'lint/listed-view-code.json'], { encoding: 'utf8' }).trim();
|
|
28
|
-
|
|
29
|
-
// The written path rule (as g571-hosts.mjs's hostFile): HOST-BAR's `format/x` is the pinned format package's
|
|
30
|
-
// `@wildshard/format/src/format/x.ts`; `engine|game/<side>/x` is side-first `src/<side>/<layer>/x.ts` (J122), tried on
|
|
31
|
-
// the named side first and then the others, since a retag moves the file, not the approval; an unsided `engine|game/x`
|
|
32
|
-
// takes the first side that has it. The old `src/<layer>/<side>/x.ts` and `src/format/x.ts` paths map the same way.
|
|
33
|
-
const SIDES = ['client', 'shared', 'server', 'cook'];
|
|
34
|
-
/** @param {string} selector @returns {{module:string, binding?:string}|null} */
|
|
35
|
-
export function sideFirst(selector) {
|
|
36
|
-
const [path = '', binding] = selector.split('#');
|
|
37
|
-
const bare = path.replace(/^src\//u, '').replace(/\.ts$/u, '');
|
|
38
|
-
/** @param {string} module */
|
|
39
|
-
const found = module => moduleFile(module) === null ? null : module;
|
|
40
|
-
let module = null;
|
|
41
|
-
if (bare.startsWith('format/')) module = found(`@wildshard/format/src/${bare}.ts`);
|
|
42
|
-
else {
|
|
43
|
-
const match = /^(engine|game)\/(?:(client|shared|server|cook)\/)?(.+)$/u.exec(bare);
|
|
44
|
-
if (match !== null) {
|
|
45
|
-
const [, layer, side, rest] = match;
|
|
46
|
-
for (const candidate of side === undefined ? SIDES : [side, ...SIDES.filter(other => other !== side)]) module ??= found(`src/${candidate}/${layer}/${rest}.ts`);
|
|
47
|
-
} else if (SIDES.includes(bare.split('/')[0] ?? '')) module = found(`src/${bare}.ts`);
|
|
48
|
-
}
|
|
49
|
-
return module === null ? null : binding === undefined ? { module } : { module, binding };
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
/** @typedef {{source:string, line:number, selector:string}} From */
|
|
53
|
-
/** @typedef {{key:string, verdict:string, decision:string, users:string[], recheck?:string, score?:Record<string,0|1>, note?:string, from:From[], rank:number}} Draft */
|
|
54
|
-
/** @type {Draft[]} */
|
|
55
|
-
const drafts = [];
|
|
56
|
-
/** @type {{key:string, from:From, reason:string}[]} */
|
|
57
|
-
const dropped = [];
|
|
58
|
-
/** @type {Record<string, number>} */
|
|
59
|
-
const counts = {};
|
|
60
|
-
/** @param {string} module */
|
|
61
|
-
const layerVerdict = module => /^src\/\w+\/engine\//u.test(module) ? 'engine' : 'game';
|
|
62
|
-
/** Precedence on a shared key, as the old ruler applied it: a Jake-approved HOST-BAR host beats a chargeback; a
|
|
63
|
-
* chargeback beats an approved pending-user feature; listed and reviewed rows sit between. */
|
|
64
|
-
const RANK = { hostBarApproved: 6, chargebacks: 5, listedView: 4, hostReviews: 3, pendingApproved: 2, hostBarPending: 1, pendingW3: 0 };
|
|
65
|
-
/** @param {string} source @param {number} line @param {string} selector @param {Omit<Draft,'key'|'from'|'rank'>} row @param {number} rank */
|
|
66
|
-
function add(source, line, selector, row, rank) {
|
|
67
|
-
counts[source] = (counts[source] ?? 0) + 1;
|
|
68
|
-
const from = { source, line, selector }, mapped = sideFirst(selector);
|
|
69
|
-
if (selector.endsWith('.test.ts')) { dropped.push({ key: selector, from, reason: 'a test file the line cites, not a host' }); return; }
|
|
70
|
-
if (mapped === null) { dropped.push({ key: selector, from, reason: 'no such module in engine or the pinned format package' }); return; }
|
|
71
|
-
const file = moduleFile(mapped.module);
|
|
72
|
-
if (mapped.binding !== undefined && file !== null && !namesBinding(readFileSync(file, 'utf8'), mapped.binding)) {
|
|
73
|
-
dropped.push({ key: `${mapped.module}#${mapped.binding}`, from, reason: 'the module no longer names this binding' }); return;
|
|
74
|
-
}
|
|
75
|
-
drafts.push({ key: mapped.binding === undefined ? mapped.module : `${mapped.module}#${mapped.binding}`, from: [from], rank, ...row });
|
|
76
|
-
}
|
|
77
|
-
/** @param {string} text @param {string} needle @param {string} [after] the needle's first match after this anchor */
|
|
78
|
-
const lineOf = (text, needle, after = '') => {
|
|
79
|
-
const index = text.indexOf(needle, after === '' ? 0 : text.indexOf(after));
|
|
80
|
-
if (index === -1) throw new Error(`register-migrate: not found: ${needle}`);
|
|
81
|
-
return text.slice(0, index).split('\n').length;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
// 1. Pending users (G419): an approved feature (G473–G484) is platform on its decision, also when it names a W3 shard
|
|
85
|
-
// (the old reader credited approvedFeature before the shard); a W3 entry without one is pending.
|
|
86
|
-
const pendingText = readFileSync(join(ENGINE_ROOT, 'lint/platform-pending-users.json'), 'utf8');
|
|
87
|
-
{
|
|
88
|
-
/** @type {{module:string, export?:string, shard?:string, plan?:{row:string}, approvedFeature?:{name:string, decision:{row:string}}}[]} */
|
|
89
|
-
const entries = JSON.parse(pendingText).entries;
|
|
90
|
-
let at = 0;
|
|
91
|
-
for (const entry of entries) {
|
|
92
|
-
at = pendingText.indexOf(`"module": "${entry.module}"`, at + 1);
|
|
93
|
-
if (at === -1) throw new Error(`register-migrate: entry out of order: ${entry.module}`);
|
|
94
|
-
const line = pendingText.slice(0, at).split('\n').length, selector = entry.export === undefined ? entry.module : `${entry.module}#${entry.export}`;
|
|
95
|
-
const users = entry.shard === undefined ? [] : [entry.shard];
|
|
96
|
-
if (entry.approvedFeature !== undefined) {
|
|
97
|
-
add('pending-users', line, selector, { verdict: layerVerdict(sideFirst(selector)?.module ?? ''), decision: entry.approvedFeature.decision.row, users,
|
|
98
|
-
note: `approved feature: ${entry.approvedFeature.name}${entry.plan === undefined ? '' : `; W3 row: ${entry.plan.row}`}` }, RANK.pendingApproved);
|
|
99
|
-
} else {
|
|
100
|
-
const decision = /G\d+/u.exec(entry.plan?.row ?? '')?.[0] ?? 'G419';
|
|
101
|
-
add('pending-users', line, selector, { verdict: 'pending', decision, users, recheck: RECHECK, note: `W3 row: ${entry.plan?.row ?? ''}` }, RANK.pendingW3);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
// 2. HOST-BAR at the pinned SHA. `- G571` lines and the four G599–G677 lines that are not "Jake-approved host:" are
|
|
107
|
-
// pending (G595: every one-user host needs Jake's own approval); the 31 "Jake-approved host:" lines are platform on
|
|
108
|
-
// their G number. Every backticked selector is a row; a line without one names its host in plain text (HAND).
|
|
109
|
-
const hostBar = show(singleplayer, SINGLEPLAYER_SHA, 'docs/HOST-BAR.md');
|
|
110
|
-
/** Lines whose host is not a backticked selector, by line number: the selector their prose names. */
|
|
111
|
-
const HAND = new Map([
|
|
112
|
-
[76, ['format/postGraphLook#PaintedWorldSchema', 'game/looks/postGraphLook#paintedWorld', 'game/looks/postGraphLook#paintedWorldOf']],
|
|
113
|
-
[141, ['game/quest/continuation#installQuestContinuationFile']],
|
|
114
|
-
]);
|
|
115
|
-
for (const [index, text] of hostBar.split('\n').entries()) {
|
|
116
|
-
const line = index + 1, legacy = /^- G571\b/u.test(text), later = /^- G(?:599|6[0-6]\d|67[0-7])\b/u.test(text);
|
|
117
|
-
if (!legacy && !later) continue;
|
|
118
|
-
const approved = later && /^- G\d+(?: [A-Z]\d+[a-z]?)? Jake-approved host:/u.test(text);
|
|
119
|
-
const decision = /G\d+/u.exec(text)?.[0] ?? 'G571';
|
|
120
|
-
const tag = /^- (G\d+(?: [A-Z]\d+[a-z]?)?(?: \/ G\d+ [A-Z]\d+)?)/u.exec(text)?.[1] ?? decision;
|
|
121
|
-
const selectors = [...text.matchAll(/`((?:src\/)?(?:engine|game|format|sdk|sharddev)\/[A-Za-z0-9_./-]+(?:#[A-Za-z_$][\w$]*)?)`/gu)].map(match => match[1] ?? '');
|
|
122
|
-
const hosts = HAND.get(line) ?? [...new Set(selectors)];
|
|
123
|
-
if (!hosts.some(selector => !selector.endsWith('.test.ts'))) throw new Error(`register-migrate: HOST-BAR line ${line} names no host selector; add it to HAND`);
|
|
124
|
-
for (const selector of hosts) {
|
|
125
|
-
if (approved) add('host-bar', line, selector, { verdict: layerVerdict(sideFirst(selector)?.module ?? ''), decision, users: [], note: `${tag} Jake-approved host` }, RANK.hostBarApproved);
|
|
126
|
-
else add('host-bar', line, selector, { verdict: 'pending', decision, users: [], recheck: RECHECK, note: legacy ? `${tag} day-one host (test 1 waived), not yet approved one by one (G595)` : `${tag}: not a "Jake-approved host:" line` }, RANK.hostBarPending);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
// 3. Chargebacks (G520 / G496 cut list): every reviewed single-shard charge is a silly row on its owner.
|
|
131
|
-
const chargeText = readFileSync(join(ENGINE_ROOT, 'scripts/platform-chargebacks.mjs'), 'utf8');
|
|
132
|
-
/** [selector, owner, decision, needle in platform-chargebacks.mjs, checked through platformChargeback(), anchor]
|
|
133
|
-
* @type {[string, string, string, string, boolean, string?][]} */
|
|
134
|
-
const CHARGES = ([
|
|
135
|
-
['src/game/boss/arenaScript.ts', 'nalati-grasslands', 'G520', "'game/boss/arenaScript'", true],
|
|
136
|
-
['src/game/boss/arenaField.ts', 'nalati-grasslands', 'G520', "'game/boss/arenaField'", true],
|
|
137
|
-
['src/client/game/models/mountedSpecimen.ts', 'nalati-grasslands', 'G530', "['src/client/game/models/mountedSpecimen.ts'", true],
|
|
138
|
-
['src/client/game/shardfile/worldAssembly.ts#installAssemblyArenaScript', 'nalati-grasslands', 'G665', "['installAssemblyArenaScript'", true],
|
|
139
|
-
['src/client/game/looks/speciesBook.ts#SpeciesLookBook', 'nalati-grasslands', 'G520', "'SpeciesLookBook'", true],
|
|
140
|
-
['src/client/game/looks/speciesBook.ts#packedRows', 'nalati-grasslands', 'G520', "'packedRows'", true],
|
|
141
|
-
['src/client/game/practice/course.ts#MountedCourseEntry', 'nalati-grasslands', 'G520', "'MountedCourseEntry'", true],
|
|
142
|
-
['src/client/game/practice/course.ts#GrappleCourseEntry', 'nine-dragon-stack', 'G520', "'GrappleCourseEntry'", true],
|
|
143
|
-
['src/client/game/practice/course.ts#MountEntryRows', 'nalati-grasslands', 'G520', "'MountEntryRows'", true],
|
|
144
|
-
['src/client/game/practice/course.ts#GrappleEntryRows', 'nine-dragon-stack', 'G520', "'GrappleEntryRows'", true],
|
|
145
|
-
['src/client/game/boss/encounterView.ts#SlotEncounterView', 'nalati-grasslands', 'G520', "'SlotEncounterView'", true],
|
|
146
|
-
['src/client/game/boss/encounterView.ts#PatrolEncounterView', 'nalati-grasslands', 'G520', "'PatrolEncounterView'", true],
|
|
147
|
-
['src/shared/game/boss/slotLaw.ts#SlotEncounterLaw', 'nalati-grasslands', 'G520', "'SlotEncounterLaw'", true],
|
|
148
|
-
['src/client/game/shardfile/worldScenes.ts#WorldScenePoolPublications', 'nine-dragon-stack', 'G520', "['src/client/game/shardfile/worldScenes.ts', new Map([['WorldScenePoolPublications'", true],
|
|
149
|
-
['src/client/game/shardfile/scenePools.ts#WorldSceneTierPools', 'nine-dragon-stack', 'G520', "['src/client/game/shardfile/scenePools.ts', new Map([['WorldSceneTierPools'", true],
|
|
150
|
-
['src/format/worldScenes.ts#WorldSceneTierPools', 'nine-dragon-stack', 'G520', "['src/format/worldScenes.ts', new Map([['WorldSceneTierPools'", true],
|
|
151
|
-
['src/format/worldScenes.ts#WorldScenePoolPublications', 'nine-dragon-stack', 'G520', "['WorldScenePoolPublications', 'C1']])]", true, "['src/format/worldScenes.ts', new Map([['WorldSceneTierPools'"],
|
|
152
|
-
['src/client/game/quest/carriedProp.ts', 'nalati-grasslands', 'G520', '["src/client/game/quest/carriedProp.ts", null]', false],
|
|
153
|
-
['src/shared/engine/combat/effects/types.ts#SourceMulDef', 'nalati-grasslands', 'G520', '"SourceMulDef"', false],
|
|
154
|
-
['src/shared/engine/combat/effects/types.ts#anyTag', 'nalati-grasslands', 'G520', '"anyTag"', false],
|
|
155
|
-
['src/shared/engine/combat/effects/types.ts#sourceMultiplier', 'nalati-grasslands', 'G520', '"sourceMultiplier"', false],
|
|
156
|
-
['src/client/game/shardfile/scenePools.ts#WorldSceneTierPools', 'nine-dragon-stack', 'G520', "['src/client/game/shardfile/scenePools.ts', new Map([['WorldSceneTierPools', [", false],
|
|
157
|
-
['src/client/game/shardfile/worldScenes.ts#WorldScenePoolPublications', 'nine-dragon-stack', 'G520', "['WorldScenePoolPublications', [", false],
|
|
158
|
-
['src/format/worldScenes.ts#WorldScenePoolPublications', 'nine-dragon-stack', 'G520', "['WorldScenePoolPublications', [[", false],
|
|
159
|
-
['src/format/worldScenes.ts#WorldSceneTierPools', 'nine-dragon-stack', 'G520', "['WorldSceneTierPools', [\n", false, "['src/format/worldScenes.ts', new Map([\n"],
|
|
160
|
-
]);
|
|
161
|
-
for (const [selector, owner, decision, needle, table, after] of CHARGES) {
|
|
162
|
-
const [path = '', name] = selector.split('#');
|
|
163
|
-
if (table && platformChargeback(path, name) === null && platformChargeback(path) === null) throw new Error(`register-migrate: not a chargeback: ${selector}`);
|
|
164
|
-
const kind = table ? 'chargeback' : needle.startsWith('["') || needle.startsWith('"') ? 'chapter-facet owner' : 'inline span';
|
|
165
|
-
add('chargebacks', lineOf(chargeText, needle, after), selector, { verdict: 'silly', decision, users: [owner], note: `${kind}, charged to ${owner}` }, RANK.chargebacks);
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
// 4. Host reviews (G456) and 5. listed view code (G570) carry over.
|
|
169
|
-
const reviewText = readFileSync(join(ENGINE_ROOT, 'lint/host-reviews.json'), 'utf8');
|
|
170
|
-
/** @type {Record<string,{evidence:string, verdicts:Record<string,string>}>} */
|
|
171
|
-
const reviews = JSON.parse(reviewText).entries;
|
|
172
|
-
for (const [selector, review] of Object.entries(reviews)) {
|
|
173
|
-
/** @type {Record<string,0|1>} */
|
|
174
|
-
const score = {};
|
|
175
|
-
for (const [test, verdict] of Object.entries(review.verdicts)) { if (!TESTS.includes(/** @type {typeof TESTS[number]} */ (test))) throw new Error(`register-migrate: unknown test ${test}`); score[test] = verdict === 'pass' ? 1 : 0; }
|
|
176
|
-
add('host-reviews', lineOf(reviewText, `"${selector}"`), selector.replace(/#\*$/u, ''), { verdict: 'borderline', decision: /G\d+/u.exec(review.evidence)?.[0] ?? 'G456', users: ['nalati-grasslands'], recheck: RECHECK, score, note: review.evidence }, RANK.hostReviews);
|
|
177
|
-
}
|
|
178
|
-
const viewText = readFileSync(join(ENGINE_ROOT, 'lint/listed-view-code.json'), 'utf8');
|
|
179
|
-
/** @type {Record<string,{path:string, name?:string, reason:string, decision:string}[]>} */
|
|
180
|
-
const views = JSON.parse(viewText).shards;
|
|
181
|
-
for (const [shard, rows] of Object.entries(views)) for (const row of rows) {
|
|
182
|
-
add('listed-view', lineOf(viewText, `"${row.path}"`), row.name === undefined ? row.path : `${row.path}#${row.name}`, { verdict: 'silly', decision: row.decision, users: [shard], note: `listed view code: ${row.reason}` }, RANK.listedView);
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
// Merge rows that share a key: the higher-ranked row wins and keeps every source line.
|
|
186
|
-
/** @type {Map<string, Draft>} */
|
|
187
|
-
const byKey = new Map();
|
|
188
|
-
/** @type {{key:string, kept:string, merged:string[]}[]} */
|
|
189
|
-
const merged = [];
|
|
190
|
-
for (const draft of drafts) {
|
|
191
|
-
const seen = byKey.get(draft.key);
|
|
192
|
-
if (seen === undefined) { byKey.set(draft.key, draft); continue; }
|
|
193
|
-
const [win, lose] = draft.rank > seen.rank ? [draft, seen] : [seen, draft];
|
|
194
|
-
byKey.set(draft.key, { ...win, from: [...seen.from, ...draft.from] });
|
|
195
|
-
const note = merged.find(row => row.key === draft.key) ?? (merged.push({ key: draft.key, kept: '', merged: [] }), merged[merged.length - 1]);
|
|
196
|
-
if (note === undefined) throw new Error('unreachable');
|
|
197
|
-
note.kept = `${win.verdict} ${win.decision}`;
|
|
198
|
-
note.merged.push(`${lose.verdict} ${lose.decision} (${lose.from.map(from => `${from.source}:${from.line}`).join(', ')})`);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
// The decision ids a row may cite: every G row of singleplayer's decisions.md at the pin, every J row of meta's §2.
|
|
202
|
-
const decisionsText = show(singleplayer, SINGLEPLAYER_SHA, 'docs/plans/decisions.md');
|
|
203
|
-
const gIds = [...new Set([...decisionsText.matchAll(/^\| *(G\d+) *\|/gmu)].map(match => match[1] ?? ''))];
|
|
204
|
-
const metaText = show(meta, META_SHA, META_PLAN), section = metaText.slice(metaText.indexOf('\n## 2. '), metaText.indexOf('\n## 3. '));
|
|
205
|
-
const jIds = [...new Set([...section.matchAll(/^\| *(J\d+) *\|/gmu)].map(match => match[1] ?? ''))];
|
|
206
|
-
|
|
207
|
-
/** A row in the register's field order, without its merge rank. @param {Draft} row */
|
|
208
|
-
function written(row) {
|
|
209
|
-
/** @type {Record<string, unknown>} */
|
|
210
|
-
const out = { key: row.key, verdict: row.verdict, decision: row.decision, users: row.users };
|
|
211
|
-
if (row.recheck !== undefined) out.recheck = row.recheck;
|
|
212
|
-
if (row.score !== undefined) out.score = row.score;
|
|
213
|
-
out.from = row.from;
|
|
214
|
-
if (row.note !== undefined) out.note = row.note;
|
|
215
|
-
return out;
|
|
216
|
-
}
|
|
217
|
-
const register = {
|
|
218
|
-
schema: 'wildshard.host-register/1',
|
|
219
|
-
about: 'HOST-RULER HR5: one row per host module or module#binding. Verdicts engine and game are platform; pending and borderline charge back after recheck; silly is charged to its users. Bar: docs/HOST-BAR.md. Reader: scripts/host-ruler/register.mjs.',
|
|
220
|
-
decisions: {
|
|
221
|
-
G: { source: `wildshard-singleplayer@${SINGLEPLAYER_SHA} docs/plans/decisions.md`, ids: gIds },
|
|
222
|
-
J: { source: `project-wildshard-meta@${META_SHA} ${META_PLAN} section 2`, ids: jIds },
|
|
223
|
-
},
|
|
224
|
-
sources: {
|
|
225
|
-
'pending-users': { file: `engine@${engineSha} lint/platform-pending-users.json`, rows: counts['pending-users'] ?? 0 },
|
|
226
|
-
'host-bar': { file: `wildshard-singleplayer@${SINGLEPLAYER_SHA} docs/HOST-BAR.md`, rows: counts['host-bar'] ?? 0 },
|
|
227
|
-
chargebacks: { file: `engine@${engineSha} scripts/platform-chargebacks.mjs`, rows: counts.chargebacks ?? 0 },
|
|
228
|
-
'host-reviews': { file: `engine@${engineSha} lint/host-reviews.json`, rows: counts['host-reviews'] ?? 0 },
|
|
229
|
-
'listed-view': { file: `engine@${engineSha} lint/listed-view-code.json`, rows: counts['listed-view'] ?? 0 },
|
|
230
|
-
},
|
|
231
|
-
merged: merged.sort((a, b) => a.key.localeCompare(b.key)),
|
|
232
|
-
dropped,
|
|
233
|
-
rows: [...byKey.values()].sort((a, b) => a.key.localeCompare(b.key)).map(written),
|
|
234
|
-
};
|
|
235
|
-
const text = formatRegister(register), file = join(ENGINE_ROOT, REGISTER);
|
|
236
|
-
if (args.includes('--write')) writeFileSync(file, text);
|
|
237
|
-
else if (readFileSync(file, 'utf8') !== text) { console.error(`register-migrate: ${REGISTER} differs from the old lists; rerun with --write`); process.exit(1); }
|
|
238
|
-
const read = readHostRegister(ENGINE_ROOT);
|
|
239
|
-
/** @type {Record<string, number>} */
|
|
240
|
-
const verdicts = {};
|
|
241
|
-
for (const row of read.rows) verdicts[row.verdict] = (verdicts[row.verdict] ?? 0) + 1;
|
|
242
|
-
console.log(JSON.stringify({ rows: read.rows.length, verdicts, sources: counts, merged: merged.length, dropped: dropped.length }));
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type {CustomSource} from './shard-platform.mjs';
|
|
2
|
-
|
|
3
|
-
export interface ListedViewEntry {path:string;name?:string;reason:string;decision:string}
|
|
4
|
-
export interface ListedViewRegister {schema:1;shards:Record<string,ListedViewEntry[]>}
|
|
5
|
-
export interface ListedViewInventory {totalCustomLines:number;listedViewLines:number;otherCustomLines:number;register:(ListedViewEntry&{matched:boolean;lines:number})[]}
|
|
6
|
-
export function loadListedViews(root:string):ListedViewRegister;
|
|
7
|
-
export function listedViewInventory(root:string,slug:string,sources:readonly CustomSource[],total:number,rows?:ListedViewRegister):ListedViewInventory;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
// G570: label reviewed view spans without changing custom ownership or credit.
|
|
2
|
-
import {existsSync,readFileSync} from 'node:fs';
|
|
3
|
-
import {resolve} from 'node:path';
|
|
4
|
-
import {parseSync} from 'vite';
|
|
5
|
-
import * as v from 'valibot';
|
|
6
|
-
|
|
7
|
-
const path=v.pipe(v.string(),v.regex(/^src\/(?:shards|engine|game|sdk|sharddev)\/(?!.*(?:^|\/)\.\.(?:\/|$))[^\\]+\.(?:ts|tsx|glsl)$/u));
|
|
8
|
-
const label=v.pipe(v.string(),v.minLength(1));
|
|
9
|
-
const entry=v.strictObject({path,name:v.exactOptional(v.pipe(label,v.regex(/^[A-Za-z_$][\w$]*$/u))),reason:label,decision:v.pipe(v.string(),v.regex(/^G\d+$/u))});
|
|
10
|
-
const register=v.strictObject({schema:v.literal(1),shards:v.record(label,v.array(entry))});
|
|
11
|
-
|
|
12
|
-
/** The HOST-BAR register is explicit; an isolated ruler fixture may have none.
|
|
13
|
-
* @param {string} root @returns {import('./listed-view-code.mjs').ListedViewRegister} */
|
|
14
|
-
export function loadListedViews(root){
|
|
15
|
-
const file=resolve(root,'lint/listed-view-code.json');
|
|
16
|
-
const rows=v.parse(register,existsSync(file)?JSON.parse(readFileSync(file,'utf8')):{schema:1,shards:{}});
|
|
17
|
-
for(const [slug,entries] of Object.entries(rows.shards)){
|
|
18
|
-
const seen=new Map();
|
|
19
|
-
for(const row of entries){
|
|
20
|
-
if(row.path.startsWith('src/shards/')&&!row.path.startsWith(`src/shards/${slug}/`))throw new Error(`Listed view belongs to another shard: ${row.path}`);
|
|
21
|
-
const names=seen.get(row.path)??new Set();
|
|
22
|
-
if(names.has(row.name)||names.has(undefined)||row.name===undefined&&names.size>0)throw new Error(`Overlapping listed view registration: ${slug}/${row.path}`);
|
|
23
|
-
names.add(row.name);seen.set(row.path,names);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
return rows;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
/** Select named top-level physical lines, retaining the ruler's comment unit.
|
|
30
|
-
* @param {string} text @param {string} file @param {readonly string[]} names
|
|
31
|
-
* @returns {Set<number>} */
|
|
32
|
-
function selectedLines(text,file,names){
|
|
33
|
-
const parsed=parseSync(file,text),chunks=[];let at=0;
|
|
34
|
-
for(const comment of parsed.comments){chunks.push(text.slice(at,comment.start),text.slice(comment.start,comment.end).replaceAll(/[^\n]/gu,' '));at=comment.end;}
|
|
35
|
-
chunks.push(text.slice(at));const lines=chunks.join('').split('\n');
|
|
36
|
-
const selected=new Set();
|
|
37
|
-
for(const statement of parsed.program.body){
|
|
38
|
-
const node='declaration' in statement?statement.declaration:statement;
|
|
39
|
-
if(node===null)continue;
|
|
40
|
-
const declared=node.type==='VariableDeclaration'?node.declarations.flatMap(row=>row.id.type==='Identifier'?[row.id.name]:[])
|
|
41
|
-
:'id' in node&&node.id?.type==='Identifier'?[node.id.name]:[];
|
|
42
|
-
if(!declared.some(name=>names.includes(name)))continue;
|
|
43
|
-
const first=text.slice(0,statement.start).split('\n').length-1,last=text.slice(0,statement.end).split('\n').length-1;
|
|
44
|
-
for(let line=first;line<=last;line++)if(lines[line]?.trim())selected.add(line);
|
|
45
|
-
}
|
|
46
|
-
return selected;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** An additive partition of already-counted custom contributions. A tag never
|
|
50
|
-
* supplies users, removes a charge, changes a ratio or closes a component.
|
|
51
|
-
* @param {string} root @param {string} slug
|
|
52
|
-
* @param {readonly import('./shard-platform.mjs').CustomSource[]} sources
|
|
53
|
-
* @param {number} total
|
|
54
|
-
* @param {import('./listed-view-code.mjs').ListedViewRegister} rows
|
|
55
|
-
* @returns {import('./listed-view-code.mjs').ListedViewInventory} */
|
|
56
|
-
export function listedViewInventory(root,slug,sources,total,rows=loadListedViews(root)){
|
|
57
|
-
const entries=rows.shards[slug]??[],matched=new Set();let listedViewLines=0;
|
|
58
|
-
/** @type {Map<import('./listed-view-code.mjs').ListedViewEntry,number>} */
|
|
59
|
-
const counts=new Map();
|
|
60
|
-
for(const source of sources){
|
|
61
|
-
const owner=source.ownerPath??source.path,matching=entries.filter(row=>row.path===owner);
|
|
62
|
-
if(matching.length===0)continue;
|
|
63
|
-
let lines=0;
|
|
64
|
-
const whole=matching.find(row=>row.name===undefined),named=matching.find(row=>row.name===source.name);
|
|
65
|
-
const direct=whole??(source.kind==='sole-export'?named:undefined);
|
|
66
|
-
if(direct!==undefined){
|
|
67
|
-
lines=source.lines;counts.set(direct,(counts.get(direct)??0)+lines);if(lines>0)matched.add(direct);
|
|
68
|
-
}else if(source.kind!=='sole-export'&&source.kind!=='additional-glsl'){
|
|
69
|
-
const file=resolve(root,source.path);
|
|
70
|
-
if(existsSync(file)){
|
|
71
|
-
const text=readFileSync(file,'utf8'),assigned=new Set();
|
|
72
|
-
for(const row of matching){
|
|
73
|
-
if(row.name===undefined)continue;
|
|
74
|
-
const selected=[...selectedLines(text,source.path,[row.name])].filter(line=>!source.excludedLines?.includes(line+1));let owned=0;
|
|
75
|
-
if(selected.length>0)matched.add(row);
|
|
76
|
-
for(const line of selected)if(!assigned.has(line)){assigned.add(line);owned++;}
|
|
77
|
-
counts.set(row,(counts.get(row)??0)+owned);
|
|
78
|
-
}
|
|
79
|
-
lines=assigned.size;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
if(lines>source.lines)throw new Error(`Listed view exceeds charged span: ${slug}/${owner}`);
|
|
83
|
-
listedViewLines+=lines;
|
|
84
|
-
}
|
|
85
|
-
if(listedViewLines>total)throw new Error(`Listed view exceeds custom total: ${slug}`);
|
|
86
|
-
return {totalCustomLines:total,listedViewLines,otherCustomLines:total-listedViewLines,
|
|
87
|
-
register:entries.map(row=>{
|
|
88
|
-
/** @type {import('./listed-view-code.mjs').ListedViewEntry&{matched:boolean,lines:number}} */
|
|
89
|
-
const result={path:row.path,reason:row.reason,decision:row.decision,matched:matched.has(row),lines:counts.get(row)??0};
|
|
90
|
-
if(row.name!==undefined)result.name=row.name;
|
|
91
|
-
return result;
|
|
92
|
-
})};
|
|
93
|
-
}
|