@finbheara/archive-client 0.18.0 → 0.19.0
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/README.md +4 -1
- package/dist/chunks/{index-tr14vc1c.js → index-gpaf165j.js} +13 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/types/assets.d.ts +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -100,7 +100,10 @@ A spec is `pinned` (the default: the user-local pin, else the latest), `latest`,
|
|
|
100
100
|
|
|
101
101
|
EVERY FILE IS CHECKED before it lands: the downloaded bytes against the host's own sha256 digest,
|
|
102
102
|
and the content against the manifest (a database's decompressed bytes against
|
|
103
|
-
`databases.<name>.sha256`, a
|
|
103
|
+
`databases.<name>.sha256`, a side file's decompressed bytes against `sideFiles.<name>.sha256`, a
|
|
104
|
+
parquet file against `parquet.files[<name>].sha256`). A side file the manifest names under
|
|
105
|
+
`sideFiles` is published zstd'd (`<name>.zst`, or the `file` it states) and lands plain under its
|
|
106
|
+
own name. A mismatch
|
|
104
107
|
refuses and leaves nothing in place. A file nothing vouches for is kept and its receipt says so
|
|
105
108
|
(`strict: true` refuses it). A database is decompressed in process, streamed, never through a
|
|
106
109
|
`zstd` binary.
|
|
@@ -27,6 +27,17 @@ function planAsset2(name, manifest) {
|
|
|
27
27
|
contentSha256: manifest?.databases?.[name]?.sha256 ?? null
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
|
+
const side = manifest?.sideFiles?.[name];
|
|
31
|
+
if (side !== undefined) {
|
|
32
|
+
const file = side.file ?? `${name}.zst`;
|
|
33
|
+
return {
|
|
34
|
+
asked: name,
|
|
35
|
+
published: file === name ? [name] : [file, name],
|
|
36
|
+
local: name,
|
|
37
|
+
decompress: true,
|
|
38
|
+
contentSha256: side.sha256 ?? null
|
|
39
|
+
};
|
|
40
|
+
}
|
|
30
41
|
return {
|
|
31
42
|
asked: name,
|
|
32
43
|
published: [name],
|
|
@@ -3746,7 +3757,8 @@ class ReleaseManager2 {
|
|
|
3746
3757
|
copyFileSync(src, raw);
|
|
3747
3758
|
}
|
|
3748
3759
|
const base = name.replace(/\.sqlite(\.zst)?$/, "");
|
|
3749
|
-
const
|
|
3760
|
+
const side = Object.entries(manifest.sideFiles ?? {}).find(([k, f]) => (f.file ?? `${k}.zst`) === name)?.[0];
|
|
3761
|
+
const asked = base !== name && isDatabase(base) ? base : side ?? name;
|
|
3750
3762
|
const plan = planAsset2(asked, manifest);
|
|
3751
3763
|
const landed = await land(raw, { name, digest: null }, plan, join4(dest, plan.local), this.opts, log);
|
|
3752
3764
|
receipt.files[plan.local] = landed;
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/dist/types/assets.d.ts
CHANGED
|
@@ -14,6 +14,11 @@ export interface ReleaseManifest {
|
|
|
14
14
|
table?: string;
|
|
15
15
|
}>;
|
|
16
16
|
};
|
|
17
|
+
sideFiles?: Record<string, {
|
|
18
|
+
file?: string;
|
|
19
|
+
bytes?: number;
|
|
20
|
+
sha256?: string;
|
|
21
|
+
}>;
|
|
17
22
|
[k: string]: unknown;
|
|
18
23
|
}
|
|
19
24
|
export declare const DATABASES: readonly ["results", "majors"];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finbheara/archive-client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Open a versioned release of an Irish dance results archive: download, verify, decompress and cache it by tag, keep the cache, and resolve feises and schools against it",
|
|
5
5
|
"keywords": ["irish-dance", "results", "release", "cache", "sqlite"],
|
|
6
6
|
"license": "MIT",
|