@quillmark/registry 0.5.1 → 0.5.2
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 +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ Unified API for discovering, loading, and registering Quills with the Quillmark
|
|
|
8
8
|
npm install @quillmark/registry
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
**Peer dependency:** Requires `@quillmark/wasm
|
|
11
|
+
**Peer dependency:** Requires `@quillmark/wasm@>=0.39.0` — you provide the engine instance.
|
|
12
12
|
|
|
13
13
|
## Quick Start
|
|
14
14
|
|
|
@@ -55,8 +55,8 @@ const registry = new QuillRegistry({ source, engine });
|
|
|
55
55
|
|
|
56
56
|
| Method | Description |
|
|
57
57
|
|---|---|
|
|
58
|
-
| `resolve(
|
|
59
|
-
| `preload(
|
|
58
|
+
| `resolve(ref)` | Resolves a quill reference (`name` or `name@version`). Fetches from source, caches, and registers with the engine. Returns a `QuillBundle`. |
|
|
59
|
+
| `preload(refs)` | Resolves multiple quill references in parallel. Fail-fast — rejects immediately if any quill fails. |
|
|
60
60
|
| `getManifest()` | Returns the full `QuillManifest` from the source. |
|
|
61
61
|
| `getAvailableQuills()` | Returns `QuillMetadata[]` for all quills in the source. |
|
|
62
62
|
| `isLoaded(name)` | Returns `true` if the quill is registered in the engine. |
|
|
@@ -77,7 +77,7 @@ Zip URLs use the format `{baseUrl}{name}@{version}.zip?v={version}` for cache-bu
|
|
|
77
77
|
|
|
78
78
|
### `FileSystemSource`
|
|
79
79
|
|
|
80
|
-
Node.js-only source that reads quill directories from disk. Each
|
|
80
|
+
Node.js-only source that reads quill directories from disk. Each version directory must contain a `Quill.yaml` file; name and version are derived from the directory structure.
|
|
81
81
|
|
|
82
82
|
```ts
|
|
83
83
|
const source = new FileSystemSource('/path/to/quills');
|
|
@@ -126,7 +126,7 @@ try {
|
|
|
126
126
|
|
|
127
127
|
## Version Resolution
|
|
128
128
|
|
|
129
|
-
|
|
129
|
+
The `ref` parameter accepts either `name` (for example, `usaf_memo`) or `name@version` (for example, `usaf_memo@1.0.0`). When version is omitted, it resolves to the latest available. The registry checks the engine first (via `resolveQuill()`) to avoid redundant fetches, then checks its in-memory cache, and only hits the source if needed.
|
|
130
130
|
|
|
131
131
|
## License
|
|
132
132
|
|
package/package.json
CHANGED