@wildshard/shard-format 0.82.6 → 0.82.8
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wildshard/shard-format",
|
|
3
|
-
"version": "0.82.
|
|
3
|
+
"version": "0.82.8",
|
|
4
4
|
"description": "The raw shardfile format: the spec, the validator and a validate CLI. The public, versioned contract every other repo builds on.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"repository": {
|
|
@@ -39,8 +39,9 @@ const ENGINE_PINS =
|
|
|
39
39
|
'https://raw.githubusercontent.com/project-wildshard/engine/main/test/pins'
|
|
40
40
|
/** ZS3 (J507): the next releases, production's and staging's, as engine pins them. */
|
|
41
41
|
const LIVE_PINS = `${ENGINE_PINS}/shardfiles.json,${ENGINE_PINS}/staging.json`
|
|
42
|
-
/** The signed release and placement files api-server's prune reads, public
|
|
43
|
-
|
|
42
|
+
/** The signed release and placement files api-server's prune reads, public: R2 layout RL10 moved them from
|
|
43
|
+
* `packs.wildshard.io/releases/` to the root of `wildshard-releases` and removed the old keys. */
|
|
44
|
+
const RELEASES = 'https://releases.wildshard.io'
|
|
44
45
|
|
|
45
46
|
interface LiveSet {
|
|
46
47
|
readonly pins: readonly Pin[]
|
|
@@ -57,7 +58,7 @@ async function liveSet(args: MarkedArgs): Promise<LiveSet> {
|
|
|
57
58
|
validator: '',
|
|
58
59
|
fetch: args.get,
|
|
59
60
|
})
|
|
60
|
-
const live = await liveHashes({
|
|
61
|
+
const live = await liveHashes({ releases: RELEASES, listed, pins }, args.get)
|
|
61
62
|
return { pins, listed, live }
|
|
62
63
|
}
|
|
63
64
|
|
package/src/cli/corpus-live.ts
CHANGED
|
@@ -4,7 +4,7 @@ import type { Pin } from './corpus-pins.ts'
|
|
|
4
4
|
import type { StoredRecord } from './corpus.ts'
|
|
5
5
|
|
|
6
6
|
// ZONE-SNAPSHOTS ZS3 (J507): the corpus counts only what players load. Live is what the signed release files name and
|
|
7
|
-
// the signed placements place (public at
|
|
7
|
+
// the signed placements place (public at releases.wildshard.io since RL10, the files api-server's prune reads), plus
|
|
8
8
|
// engine's pins (the next release's). The API keeps more: each live revision's 3 earlier revisions as rollback copies
|
|
9
9
|
// (api-server ZS2), which roll back with their engine release and never count as users, and whatever a channel's own
|
|
10
10
|
// pointer still names (`/api/catalogue.json`). A listed original that is none of these is store drift: the prune
|
|
@@ -178,7 +178,7 @@ async function channelHashes(
|
|
|
178
178
|
/** The hashes players load: each signed release file's shards and placement's cells, and engine's pins. */
|
|
179
179
|
async function liveHashes(
|
|
180
180
|
input: Readonly<{
|
|
181
|
-
|
|
181
|
+
releases: string
|
|
182
182
|
listed: readonly StoredRecord[]
|
|
183
183
|
pins: readonly Readonly<Pin>[]
|
|
184
184
|
}>,
|
|
@@ -193,11 +193,7 @@ async function liveHashes(
|
|
|
193
193
|
const channels = await Promise.all(
|
|
194
194
|
RELEASE_CHANNELS.map(
|
|
195
195
|
async (channel: string): Promise<readonly string[]> =>
|
|
196
|
-
await channelHashes(
|
|
197
|
-
`${input.packs}/releases/${channel}`,
|
|
198
|
-
byRevision,
|
|
199
|
-
get,
|
|
200
|
-
),
|
|
196
|
+
await channelHashes(`${input.releases}/${channel}`, byRevision, get),
|
|
201
197
|
),
|
|
202
198
|
)
|
|
203
199
|
const pinned = input.pins.map((pin: Readonly<Pin>): string => pin.hash)
|
|
@@ -139,7 +139,7 @@ function namedKeys(
|
|
|
139
139
|
* tables), but not its textures (`ktx2`, OF27b): no later check reads a texture's bytes (`validateSkinAssets` reads the
|
|
140
140
|
* JSON and the GLB, and each texture's own costs were checked as it streamed, by `admitFileBytes`). Holding them put
|
|
141
141
|
* Nalati r7's declared skin looks (OF30: 18 textures, 15.7 MB) over `PLACED_HOLD_CAP`. */
|
|
142
|
-
const
|
|
142
|
+
const UNHELD_DEPENDENCY_KINDS: ReadonlySet<string> = new Set(['ktx2', 'image'])
|
|
143
143
|
|
|
144
144
|
/** The placed keys, and the listed dependencies of the JSON among them (a skin file names its GLB; Codex review). */
|
|
145
145
|
function placedKeys(
|
|
@@ -163,7 +163,7 @@ function placedKeys(
|
|
|
163
163
|
for (const dependency of row.dependencies) {
|
|
164
164
|
for (const found of hashKeys(dependency, paths).filter(
|
|
165
165
|
(held: string): boolean =>
|
|
166
|
-
rows.get(held)?.kind
|
|
166
|
+
!UNHELD_DEPENDENCY_KINDS.has(rows.get(held)?.kind ?? ''),
|
|
167
167
|
)) {
|
|
168
168
|
keys.add(found)
|
|
169
169
|
}
|