@quillmark/quiver 0.5.0 → 0.5.1
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 +8 -6
- package/dist/bundle.js +8 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,8 +19,8 @@ an npm package. Consumers decide how to consume it:
|
|
|
19
19
|
output as static assets, loading it with `Quiver.fromBuilt`.
|
|
20
20
|
|
|
21
21
|
Each loader names exactly what it loads: `fromPackage` and `fromDir` always
|
|
22
|
-
read source layouts; `fromBuilt` always reads build output over HTTP
|
|
23
|
-
No auto-detection, no branching on artifact shape.
|
|
22
|
+
read source layouts; `fromBuilt` always reads build output over an HTTP(S)
|
|
23
|
+
or origin-relative URL. No auto-detection, no branching on artifact shape.
|
|
24
24
|
|
|
25
25
|
This keeps the author flow to a single command (`npm publish` or `git tag`)
|
|
26
26
|
and puts the deployment-topology decision where it belongs: with the
|
|
@@ -115,10 +115,12 @@ const quiver = await Quiver.fromBuilt("https://cdn.example.com/quivers/my-quiver
|
|
|
115
115
|
await quiver.warm();
|
|
116
116
|
```
|
|
117
117
|
|
|
118
|
-
`warm()` is
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
118
|
+
`warm()` is I/O-only: it loads every quill's tree (over the network for
|
|
119
|
+
`fromBuilt`, off the filesystem for `fromPackage`/`fromDir`) and caches
|
|
120
|
+
them. It does not require an engine and does not materialize Quill
|
|
121
|
+
instances — that happens lazily on the first `getQuill` call, which is
|
|
122
|
+
microseconds. A subsequent `getQuill` reuses the cached tree, skipping
|
|
123
|
+
the load.
|
|
122
124
|
|
|
123
125
|
Once a tree has been turned into a Quill, the cached tree is dropped so
|
|
124
126
|
its bytes can be GC'd — the materialized Quill is the runtime artifact.
|
package/dist/bundle.js
CHANGED
|
@@ -4,9 +4,15 @@
|
|
|
4
4
|
import { zipSync, unzipSync } from "fflate";
|
|
5
5
|
/**
|
|
6
6
|
* Fixed epoch mtime for deterministic zip output.
|
|
7
|
-
*
|
|
7
|
+
*
|
|
8
|
+
* fflate reads mtime via local-time getters (getFullYear/getMonth/...) and rejects
|
|
9
|
+
* years before 1980. Date.UTC(1980, 0, 1) becomes 1979-12-31 in any TZ west of UTC,
|
|
10
|
+
* which both crashes the encoder and (where it doesn't crash) produces TZ-dependent
|
|
11
|
+
* bytes. Using the local-time constructor anchors the components to 1980-01-01
|
|
12
|
+
* 00:00:00 in *every* timezone, so the DOS timestamp written into the zip header
|
|
13
|
+
* is always identical.
|
|
8
14
|
*/
|
|
9
|
-
const ZIP_EPOCH = new Date(
|
|
15
|
+
const ZIP_EPOCH = new Date(1980, 0, 1, 0, 0, 0, 0);
|
|
10
16
|
/**
|
|
11
17
|
* Pack a flat file map into a deterministic zip.
|
|
12
18
|
* Keys are sorted before zipping so insertion order doesn't affect output.
|