@wavehouse/chtypes 0.4.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/CHANGELOG.md +33 -0
- package/dist/cli.js.map +1 -1
- package/dist/fetch.d.ts +63 -14
- package/dist/fetch.d.ts.map +1 -1
- package/dist/fetch.js +419 -95
- package/dist/fetch.js.map +1 -1
- package/dist/format.d.ts +9 -4
- package/dist/format.d.ts.map +1 -1
- package/dist/format.js +9 -4
- package/dist/format.js.map +1 -1
- package/dist/index.d.ts +12 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/registry.d.ts +176 -66
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +475 -161
- package/dist/registry.js.map +1 -1
- package/dist/schema.d.ts +65 -14
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +91 -32
- package/dist/schema.js.map +1 -1
- package/package.json +1 -1
package/dist/registry.d.ts
CHANGED
|
@@ -1,8 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The artifact-directory loader: one subdirectory per ClickHouse minor line,
|
|
3
|
-
* each self-contained (docs/reference/artifact.md)
|
|
3
|
+
* each self-contained (docs/reference/artifact.md), plus — since #284 — every
|
|
4
|
+
* OTHER installed exact patch of a line, in a sibling `patches/` tree:
|
|
4
5
|
*
|
|
5
6
|
* <registry>/25.8/{manifest.json, libchtypes.dylib, CH_VERSION, unsafe_families.txt}
|
|
7
|
+
* <registry>/patches/25.8/25.8.28.1-lts/{manifest.json, libchtypes.dylib, ...}
|
|
8
|
+
*
|
|
9
|
+
* The flat `<registry>/<minor>/` slot is what a LINE request resolves to —
|
|
10
|
+
* exactly the pre-#284 layout, so every SDK through 0.4.x keeps reading it
|
|
11
|
+
* unchanged. Any OTHER exact patch of that line lives in
|
|
12
|
+
* `<registry>/patches/<minor>/<clickhouse_version>/`, which no released SDK
|
|
13
|
+
* (0.4.x and earlier) scans, fetches into or deletes (measured, issue #284
|
|
14
|
+
* comment 5919199794): it is a new, additive tree, not a migration of the old
|
|
15
|
+
* one. When a line fetch changes which patch occupies the flat slot, the
|
|
16
|
+
* outgoing install is DEMOTED — an atomic, same-filesystem rename into
|
|
17
|
+
* `patches/<minor>/<its version>/` — never deleted, so a server still on the
|
|
18
|
+
* older patch keeps its exact match with no re-fetch.
|
|
6
19
|
*
|
|
7
20
|
* Two rules here were paid for and are not negotiable:
|
|
8
21
|
*
|
|
@@ -14,16 +27,29 @@
|
|
|
14
27
|
* the platform that matters.
|
|
15
28
|
* - **Each artifact is loaded into its own symbol scope (`RTLD_LOCAL`).** That
|
|
16
29
|
* is the entire mechanism by which two builds that both define
|
|
17
|
-
* `DB::DataTypeFactory` live in one process
|
|
18
|
-
*
|
|
19
|
-
*
|
|
30
|
+
* `DB::DataTypeFactory` live in one process — now routinely two builds of
|
|
31
|
+
* the SAME minor line, one per patch. ffi-rs loads through libloading,
|
|
32
|
+
* which uses `RTLD_LAZY | RTLD_LOCAL`; `assertLocalSymbolScope()` in the
|
|
33
|
+
* test suite proves it from outside rather than trusting the claim.
|
|
20
34
|
*
|
|
21
35
|
* Where a registry IS follows the search path of docs/guides/fetch.md §1 (`paths.ts`):
|
|
22
36
|
* the explicit directory, `CHTYPES_REGISTRY`, the per-user cache, then the
|
|
23
37
|
* reserved system locations. Construction READS THE MANIFESTS on that path and
|
|
24
|
-
* `dlopen`s nothing; a
|
|
25
|
-
* has it.
|
|
26
|
-
*
|
|
38
|
+
* `dlopen`s nothing; a version is taken, on request, from the first directory
|
|
39
|
+
* that has it. Resolution (docs/reference/bindings.md §Version selection):
|
|
40
|
+
*
|
|
41
|
+
* - **A line request** ("25.8") never falls back and never crosses lines: the
|
|
42
|
+
* newest patch of the line, in the first search-path directory that holds
|
|
43
|
+
* any patch of it (a nested install beating a flat one on a version tie),
|
|
44
|
+
* pinned for this registry for as long as it runs.
|
|
45
|
+
* - **A patch request** ("25.8.28.1-lts") loads that exact patch when it is
|
|
46
|
+
* open or installed anywhere on the search path. Otherwise it falls back to
|
|
47
|
+
* the newest installed patch of the same line, flags the result
|
|
48
|
+
* `exact: false`, and warns once per (requested, actual) pair per process —
|
|
49
|
+
* never another line, which stays the one §7 error, `ArtifactMissingError`.
|
|
50
|
+
*
|
|
51
|
+
* A patch spelled with no channel suffix matches that patch on any channel
|
|
52
|
+
* (docs/guides/fetch.md Decision 7); ordering is numeric, channel ignored.
|
|
27
53
|
*/
|
|
28
54
|
import { type EnsureOptions } from './fetch.js';
|
|
29
55
|
import { Library } from './library.js';
|
|
@@ -74,7 +100,8 @@ export interface RegistryOptions {
|
|
|
74
100
|
* path. They are opened in the order given, before the constructor returns,
|
|
75
101
|
* and an entry no directory on the §1 search path holds is
|
|
76
102
|
* `ArtifactMissingError` — the same §7 error the first `for()` would have
|
|
77
|
-
* thrown, thrown earlier.
|
|
103
|
+
* thrown, thrown earlier. A patch entry that falls back to its line warns at
|
|
104
|
+
* construction, exactly as `for()` would.
|
|
78
105
|
*
|
|
79
106
|
* It NEVER fetches, even with `autofetch` on: this constructor is
|
|
80
107
|
* synchronous and `ensure()` is not, and autofetch is a first-use behavior
|
|
@@ -86,27 +113,58 @@ export interface RegistryOptions {
|
|
|
86
113
|
*/
|
|
87
114
|
preload?: readonly string[] | undefined;
|
|
88
115
|
/**
|
|
89
|
-
* Lazy fetch on first open (docs/guides/fetch.md §6): `open()` of a
|
|
116
|
+
* Lazy fetch on first open (docs/guides/fetch.md §6): `open()` of a version no
|
|
90
117
|
* directory on the search path holds runs `ensure()` first, into the
|
|
91
|
-
* directory a fetch writes to (§1), once per process per
|
|
92
|
-
* default — a production process must not begin a 250 MB
|
|
93
|
-
* a request — and `CHTYPES_AUTOFETCH=1` turns it on from the
|
|
94
|
-
* `for()`
|
|
118
|
+
* directory a fetch writes to (§1), once per process per (destination,
|
|
119
|
+
* spelling). Off by default — a production process must not begin a 250 MB
|
|
120
|
+
* download inside a request — and `CHTYPES_AUTOFETCH=1` turns it on from the
|
|
121
|
+
* environment. `for()` / `resolve()` stay synchronous and never fetch.
|
|
95
122
|
*/
|
|
96
123
|
autofetch?: boolean | undefined;
|
|
97
124
|
/** Options handed to `ensure()` by autofetch: source (`url`/`tag`), lock, keys, progress. */
|
|
98
125
|
fetch?: EnsureOptions | undefined;
|
|
99
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* What a `resolve()` / `openResolution()` call hands back: the loaded
|
|
129
|
+
* `Library`, the caller's own spelling, what actually loaded, and whether the
|
|
130
|
+
* two are the same patch (docs/reference/bindings.md §Version selection).
|
|
131
|
+
* `for()` / `open()` run the same resolution and hand back only `.library`.
|
|
132
|
+
*/
|
|
133
|
+
export interface Resolution {
|
|
134
|
+
/** The `Library` this resolution loaded (or found already loaded). */
|
|
135
|
+
readonly library: Library;
|
|
136
|
+
/** The caller's own spelling, trimmed — never normalized further. */
|
|
137
|
+
readonly requested: string;
|
|
138
|
+
/**
|
|
139
|
+
* What actually loaded, i.e. `library.version`. Equal to the requested
|
|
140
|
+
* patch when `exact` is true; the newest installed/published patch of the
|
|
141
|
+
* requested line otherwise.
|
|
142
|
+
*/
|
|
143
|
+
readonly version: string;
|
|
144
|
+
/**
|
|
145
|
+
* `true` for a line request — it asked for "a patch of this line" and got
|
|
146
|
+
* one. For a patch request, `true` only when the loaded version matches the
|
|
147
|
+
* requested patch (a spelled channel matches only itself; an unspelled one
|
|
148
|
+
* matches on any channel). `false` means the fallback within the line was
|
|
149
|
+
* taken, and a warning was already issued for this (requested, actual) pair
|
|
150
|
+
* — once per pair per process.
|
|
151
|
+
*/
|
|
152
|
+
readonly exact: boolean;
|
|
153
|
+
}
|
|
154
|
+
/** TEST-ONLY: forget every warned pair, so a suite can assert a fresh warning fires. Not re-exported from index.ts. */
|
|
155
|
+
export declare function resetPatchFallbackWarnings(): void;
|
|
100
156
|
/**
|
|
101
157
|
* The artifact-directory loader — the multi-version entry point of this
|
|
102
158
|
* package.
|
|
103
159
|
*
|
|
104
160
|
* **Construction reads `manifest.json` files and `dlopen`s nothing**, with or
|
|
105
161
|
* without a directory. Nothing in this package opens an artifact except a
|
|
106
|
-
* request for a specific version (`for()` / `
|
|
107
|
-
* `preload` — not `versions()`, not
|
|
108
|
-
* about 120 MB resident per
|
|
109
|
-
* caller's behalf
|
|
162
|
+
* request for a specific version (`for()` / `resolve()` / `open()` /
|
|
163
|
+
* `openResolution()`) or an explicit `preload` — not `versions()`, not
|
|
164
|
+
* `libraries()`, not `has()`. An open costs about 120 MB resident per patch,
|
|
165
|
+
* which a listing call must not spend on a caller's behalf, and which grows
|
|
166
|
+
* with every DISTINCT patch a process is asked for — libraries are never
|
|
167
|
+
* dlclosed (docs/guides/multi-version.md).
|
|
110
168
|
*
|
|
111
169
|
* An open dlopens the artifact into its own symbol scope (`RTLD_LOCAL`),
|
|
112
170
|
* verifies its ABI revision against this binding's `ABI_REVISION` (a different
|
|
@@ -129,14 +187,17 @@ export declare class Registry {
|
|
|
129
187
|
readonly searchPath: readonly string[];
|
|
130
188
|
/** This host's platform key, e.g. `darwin-arm64` — the only artifacts a process can dlopen. */
|
|
131
189
|
readonly platform: string;
|
|
132
|
-
private readonly byId;
|
|
133
190
|
private readonly byPath;
|
|
134
191
|
private readonly loaded;
|
|
192
|
+
/** Line -> the library currently answering FOR THE LINE. Set once per line; never re-pointed while this registry runs (R3/R8). */
|
|
193
|
+
private readonly linePins;
|
|
135
194
|
/**
|
|
136
|
-
*
|
|
137
|
-
*
|
|
138
|
-
*
|
|
139
|
-
*
|
|
195
|
+
* Line -> every patch the construction-time manifest scan found for it,
|
|
196
|
+
* across the whole search path. What `versions()` answers from, and what
|
|
197
|
+
* makes "no artifact anywhere" and a bad `preload` entry decidable at
|
|
198
|
+
* construction without a single `dlopen`. Resolution itself re-scans the
|
|
199
|
+
* live filesystem on every call (a patch installed after construction, by
|
|
200
|
+
* this process or another, is used from the next call on).
|
|
140
201
|
*/
|
|
141
202
|
private readonly known;
|
|
142
203
|
private readonly timezone;
|
|
@@ -144,9 +205,13 @@ export declare class Registry {
|
|
|
144
205
|
private readonly autofetch;
|
|
145
206
|
private readonly fetchOptions;
|
|
146
207
|
private readonly explicit;
|
|
208
|
+
/** (dest, line) already `Ensure()`d successfully by THIS registry's autofetch — never re-read over the network again. */
|
|
209
|
+
private readonly ensuredLines;
|
|
210
|
+
/** (dest, exact patch) autofetch has already confirmed CHTYPES_ARTIFACT_UNPUBLISHED for — never retried within this registry's lifetime. */
|
|
211
|
+
private readonly unpublishedPatches;
|
|
147
212
|
/**
|
|
148
213
|
* Scan a registry. Reads manifests; opens nothing unless `preload` names a
|
|
149
|
-
*
|
|
214
|
+
* version.
|
|
150
215
|
*
|
|
151
216
|
* @param dir - the registry root; the head of the search path. Absent, the
|
|
152
217
|
* path is `CHTYPES_REGISTRY`, the per-user artifact cache, then the system
|
|
@@ -156,7 +221,7 @@ export declare class Registry {
|
|
|
156
221
|
* @throws {RegistryError} for what manifests can decide, and only that: a
|
|
157
222
|
* directory named explicitly (the argument or `CHTYPES_REGISTRY`) that does
|
|
158
223
|
* not exist, and no directory on the search path holding a readable
|
|
159
|
-
*
|
|
224
|
+
* manifest at either slot — both suppressed when autofetch is on. A
|
|
160
225
|
* `preload` entry no directory holds is `ArtifactMissingError`. Everything
|
|
161
226
|
* a bad artifact can be wrong about — a failed checksum, a load failure, a
|
|
162
227
|
* library whose ClickHouse version disagrees with its manifest — is
|
|
@@ -169,28 +234,44 @@ export declare class Registry {
|
|
|
169
234
|
constructor(dir?: string, options?: RegistryOptions);
|
|
170
235
|
/**
|
|
171
236
|
* Open one `preload` entry, before the constructor returns, without
|
|
172
|
-
* fetching. Resolution is `for()`'s, and so is the
|
|
173
|
-
* directory holds is the same
|
|
237
|
+
* fetching. Resolution is `for()`'s (minus any fetch), and so is the
|
|
238
|
+
* failure: a version no directory holds anywhere is the same
|
|
239
|
+
* `ArtifactMissingError`, raised earlier. A patch entry that falls back
|
|
240
|
+
* warns here, at construction, exactly as `for()` would.
|
|
174
241
|
*/
|
|
175
242
|
private preloadLine;
|
|
176
243
|
/** dlopen one artifact directory, cross-check it, `chs_init` it, index it. */
|
|
177
244
|
private load;
|
|
178
|
-
/** Load
|
|
179
|
-
private
|
|
180
|
-
|
|
245
|
+
/** Load an artifact directory whose manifest is already known-readable, or return null when it is not one. */
|
|
246
|
+
private loadDir;
|
|
247
|
+
/** Every patch (both slots, every search-path root) this registry can currently see for `minor` — a live scan. */
|
|
248
|
+
private scanLine;
|
|
249
|
+
/** R3: line request — the pin if this registry already has one, else the newest patch in the first root that holds any. */
|
|
250
|
+
private resolveLineSync;
|
|
251
|
+
/** R4 steps 1-2: an exact match, already open or anywhere on the search path — never a fallback. */
|
|
252
|
+
private resolveExactPatchSync;
|
|
181
253
|
/**
|
|
182
|
-
*
|
|
183
|
-
*
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
187
|
-
*
|
|
254
|
+
* R4 in full, synchronous shape: exact, else the newest-installed fallback
|
|
255
|
+
* within the line. R-c: the already-open check is free (no I/O) and always
|
|
256
|
+
* current; everything past it needs a directory read per search-path entry,
|
|
257
|
+
* so once a request has fallen back, the WHOLE re-check — retrying the exact
|
|
258
|
+
* match and picking the fallback alike — is throttled together, at most
|
|
259
|
+
* once per `FALLBACK_RECHECK_MS` per requested patch per process.
|
|
260
|
+
*
|
|
261
|
+
* §3: the warning fires as soon as the fallback patch is CHOSEN — its
|
|
262
|
+
* version is already known from the manifest scan, before `loadDir` ever
|
|
263
|
+
* runs — so a caller sees the warning even when the chosen directory then
|
|
264
|
+
* fails to load (a broken artifact is still a fallback that was taken).
|
|
188
265
|
*/
|
|
189
|
-
private
|
|
266
|
+
private resolvePatchSync;
|
|
267
|
+
private resolveSync;
|
|
268
|
+
/** Would `req` resolve without opening anything? Mirrors `resolveSync` with no `load()` call. */
|
|
269
|
+
private wouldResolve;
|
|
270
|
+
private warnFallback;
|
|
190
271
|
/**
|
|
191
272
|
* Every ClickHouse minor line this registry CAN ANSWER FOR, oldest first —
|
|
192
273
|
* the ones it has opened plus the ones its construction-time manifest scan
|
|
193
|
-
* discovered on the search path.
|
|
274
|
+
* discovered on the search path, at either slot.
|
|
194
275
|
*
|
|
195
276
|
* That is one meaning in all four bindings, and it is the meaning that
|
|
196
277
|
* survives lazy loading: "the lines that happen to be open" would read as an
|
|
@@ -198,54 +279,79 @@ export declare class Registry {
|
|
|
198
279
|
*/
|
|
199
280
|
versions(): string[];
|
|
200
281
|
/**
|
|
201
|
-
* The libraries this registry has OPENED, in
|
|
202
|
-
*
|
|
203
|
-
*
|
|
204
|
-
* and
|
|
282
|
+
* The libraries this registry has OPENED, in full numeric version order —
|
|
283
|
+
* what is open right now, never what could be. Two patches of one line both
|
|
284
|
+
* appear, each in its own slot in this order. A discovered patch that no
|
|
285
|
+
* `for()` and no `preload` has opened appears in `versions()` and not here.
|
|
286
|
+
* It opens nothing.
|
|
205
287
|
*/
|
|
206
288
|
libraries(): readonly Library[];
|
|
207
289
|
/**
|
|
208
|
-
* Resolve a version to its library. A minor line ("25.8")
|
|
209
|
-
*
|
|
210
|
-
*
|
|
290
|
+
* Resolve a version to its library. A minor line ("25.8") never falls back:
|
|
291
|
+
* the newest patch of the line, from the first search-path directory that
|
|
292
|
+
* holds any patch of it. An exact patch ("25.8.28.1-lts") loads that patch
|
|
293
|
+
* when it is open or installed anywhere on the search path; otherwise the
|
|
294
|
+
* newest installed patch of the same line is loaded instead, and one
|
|
295
|
+
* warning is written per (requested, actual) pair per process — `resolve()`
|
|
296
|
+
* reports the same fallback as `exact: false` instead of only warning.
|
|
211
297
|
*
|
|
212
|
-
* **This is what opens an artifact.** Construction does not:
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* may fetch.
|
|
298
|
+
* **This is what opens an artifact.** Construction does not: a version is
|
|
299
|
+
* loaded on first request, `dlopen`ed once, and joins `libraries()` from
|
|
300
|
+
* then on. Never a fetch: this call is synchronous; `open()` /
|
|
301
|
+
* `openResolution()` are the ones that may fetch.
|
|
217
302
|
*
|
|
218
|
-
* Failure is the one §7 error, never a fallback to
|
|
219
|
-
*
|
|
220
|
-
*
|
|
303
|
+
* Failure is the one §7 error, never a fallback to another line: answering
|
|
304
|
+
* 26.7 semantics from a 25.8 artifact is a lie, and silent wrongness is what
|
|
305
|
+
* the rigs score hardest.
|
|
221
306
|
*
|
|
222
307
|
* @param version - a minor line (`"25.8"`) or an exact patch
|
|
223
308
|
* (`"25.8.28.1-lts"`), e.g. what `parseVersionResult` discovered.
|
|
224
309
|
* @returns the loaded `Library` for that version.
|
|
225
310
|
* @throws {ArtifactMissingError} (`code` `CHTYPES_ARTIFACT_MISSING`, a
|
|
226
|
-
* `RegistryError`) when no directory on the search path holds
|
|
227
|
-
* the message names every directory looked in and the
|
|
228
|
-
*
|
|
311
|
+
* `RegistryError`) when no directory on the search path holds a matching
|
|
312
|
+
* or fallback patch; the message names every directory looked in and the
|
|
313
|
+
* fetch command.
|
|
314
|
+
* @throws {ChtypesError} when `version` is not a ClickHouse version spelling at all.
|
|
315
|
+
* @throws {RegistryError} when a directory holds a version but it does not load.
|
|
229
316
|
*/
|
|
230
317
|
for(version: string): Library;
|
|
231
318
|
/**
|
|
232
|
-
* `for()`,
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
237
|
-
*
|
|
319
|
+
* `for()`, but returns the full `Resolution` — the requested spelling, what
|
|
320
|
+
* actually loaded, and whether the two are the same patch. Never fetches;
|
|
321
|
+
* `openResolution()` is the async twin that may.
|
|
322
|
+
*
|
|
323
|
+
* @throws {ArtifactMissingError} as `for()`.
|
|
324
|
+
* @throws {ChtypesError} when `version` is not a ClickHouse version spelling at all.
|
|
325
|
+
*/
|
|
326
|
+
resolve(version: string): Resolution;
|
|
327
|
+
/**
|
|
328
|
+
* `for()`, with the lazy fetch of docs/guides/fetch.md §6 in front of it. A
|
|
329
|
+
* LINE request no directory holds is fetched through `ensure()` and loaded.
|
|
330
|
+
* A PATCH request tries `ensure()` of that exact patch first; on
|
|
331
|
+
* `CHTYPES_ARTIFACT_UNPUBLISHED` (remembered for this registry, so it costs
|
|
332
|
+
* one network round trip, not one per call) it falls back to `ensure()` of
|
|
333
|
+
* the line and loads whatever that installs, with `exact: false` and one
|
|
334
|
+
* warning. Any other fetch failure (untrusted, corrupt, pinned, source
|
|
335
|
+
* unreachable) surfaces as itself and is never remembered, so a later call
|
|
336
|
+
* retries. With `autofetch` off, this is `for()` behind a promise.
|
|
238
337
|
*
|
|
239
|
-
* @throws {ArtifactMissingError} when
|
|
338
|
+
* @throws {ArtifactMissingError} when nothing is found and autofetch is off.
|
|
240
339
|
* @throws {FetchError} the §7 fetch verdicts (`CHTYPES_ARTIFACT_UNTRUSTED`,
|
|
241
340
|
* `…_CORRUPT`, `…_PINNED`, `…_UNPUBLISHED`, `CHTYPES_SOURCE_UNREACHABLE`).
|
|
242
341
|
* @throws {RegistryError} when the fetched artifact does not load.
|
|
243
342
|
*/
|
|
244
343
|
open(version: string): Promise<Library>;
|
|
344
|
+
/** `open()`, but returns the full `Resolution` — see `resolve()` and `open()`. */
|
|
345
|
+
openResolution(version: string): Promise<Resolution>;
|
|
346
|
+
/** `ensure(line)`, at most once per (dest, line) over this registry's lifetime — never re-read over the network again. */
|
|
347
|
+
private ensureLineOnce;
|
|
245
348
|
/**
|
|
246
|
-
* True when this registry can answer for a version
|
|
247
|
-
* by a directory on the search path (
|
|
248
|
-
*
|
|
349
|
+
* True when this registry can answer for a version without fetching or
|
|
350
|
+
* loading: already open, or held by a directory on the search path (at
|
|
351
|
+
* either slot) which `for()` would load. A patch resolves true when the
|
|
352
|
+
* patch itself, or any patch of its line, is installed or open — the same
|
|
353
|
+
* condition `for()` would resolve, fallback included. Never a fetch, and
|
|
354
|
+
* never a load.
|
|
249
355
|
*/
|
|
250
356
|
has(version: string): boolean;
|
|
251
357
|
/**
|
|
@@ -278,6 +384,10 @@ export declare function resolveRegistryDir(explicit?: string): string | null;
|
|
|
278
384
|
* not a promise: `Registry` still throws if nothing is there.
|
|
279
385
|
*/
|
|
280
386
|
export declare function defaultRegistryDir(): string;
|
|
281
|
-
/**
|
|
387
|
+
/**
|
|
388
|
+
* Does this directory hold at least one artifact with a usable manifest, at
|
|
389
|
+
* either slot — the flat `<dir>/<minor>/` layout or the `<dir>/patches/<minor>/<version>/`
|
|
390
|
+
* sibling tree? A registry that holds only nested installs is not empty.
|
|
391
|
+
*/
|
|
282
392
|
export declare function looksLikeRegistry(dir: string): boolean;
|
|
283
393
|
//# sourceMappingURL=registry.d.ts.map
|
package/dist/registry.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AAMH,OAAO,EAAmB,KAAK,aAAa,EAAmE,MAAM,YAAY,CAAC;AAElI,OAAO,EAAE,OAAO,EAAW,MAAM,cAAc,CAAC;AAWhD,yEAAyE;AACzE,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,gDAAgD;AAChD,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;;;;;;;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