zen-fs-config 0.7.10 → 0.7.11
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.
|
@@ -160,6 +160,7 @@ function unregisterBackend(type) {
|
|
|
160
160
|
return registry.delete(type);
|
|
161
161
|
}
|
|
162
162
|
async function createBackend(descriptor) {
|
|
163
|
+
traceCreateBackend(descriptor.type, descriptor.options);
|
|
163
164
|
const factory = registry.get(descriptor.type);
|
|
164
165
|
if (!factory) {
|
|
165
166
|
throw new Error(
|
|
@@ -168,6 +169,19 @@ async function createBackend(descriptor) {
|
|
|
168
169
|
}
|
|
169
170
|
return factory(descriptor.options);
|
|
170
171
|
}
|
|
172
|
+
function traceCreateBackend(type, options) {
|
|
173
|
+
const g = globalThis;
|
|
174
|
+
try {
|
|
175
|
+
if (!Array.isArray(g.__zenfsBackendTrace)) g.__zenfsBackendTrace = [];
|
|
176
|
+
g.__zenfsBackendTrace.push({
|
|
177
|
+
type,
|
|
178
|
+
storeName: options?.storeName ?? null,
|
|
179
|
+
registered: registry.has(type),
|
|
180
|
+
at: Date.now()
|
|
181
|
+
});
|
|
182
|
+
} catch {
|
|
183
|
+
}
|
|
184
|
+
}
|
|
171
185
|
function hasBackend(type) {
|
|
172
186
|
return registry.has(type);
|
|
173
187
|
}
|
package/dist/index.js
CHANGED
|
@@ -209,6 +209,7 @@ function unregisterBackend(type) {
|
|
|
209
209
|
return registry.delete(type);
|
|
210
210
|
}
|
|
211
211
|
async function createBackend(descriptor) {
|
|
212
|
+
traceCreateBackend(descriptor.type, descriptor.options);
|
|
212
213
|
const factory = registry.get(descriptor.type);
|
|
213
214
|
if (!factory) {
|
|
214
215
|
throw new Error(
|
|
@@ -217,6 +218,19 @@ async function createBackend(descriptor) {
|
|
|
217
218
|
}
|
|
218
219
|
return factory(descriptor.options);
|
|
219
220
|
}
|
|
221
|
+
function traceCreateBackend(type, options) {
|
|
222
|
+
const g = globalThis;
|
|
223
|
+
try {
|
|
224
|
+
if (!Array.isArray(g.__zenfsBackendTrace)) g.__zenfsBackendTrace = [];
|
|
225
|
+
g.__zenfsBackendTrace.push({
|
|
226
|
+
type,
|
|
227
|
+
storeName: options?.storeName ?? null,
|
|
228
|
+
registered: registry.has(type),
|
|
229
|
+
at: Date.now()
|
|
230
|
+
});
|
|
231
|
+
} catch {
|
|
232
|
+
}
|
|
233
|
+
}
|
|
220
234
|
function hasBackend(type) {
|
|
221
235
|
return registry.has(type);
|
|
222
236
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
registerBackend,
|
|
10
10
|
unregisterBackend,
|
|
11
11
|
wrapZenFSFileSystem
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-JS3F3RBC.mjs";
|
|
13
13
|
|
|
14
14
|
// src/config-repo.ts
|
|
15
15
|
import {
|
|
@@ -465,7 +465,7 @@ function registerFolderBackend() {
|
|
|
465
465
|
const pathMod = await import("path");
|
|
466
466
|
const dir = options.path;
|
|
467
467
|
const store = new FolderStore({ path: dir, label: options.label, fs, pathMod });
|
|
468
|
-
return (await import("./backend-registry-
|
|
468
|
+
return (await import("./backend-registry-KRGXHZRB.mjs")).wrapZenFSFileSystem({ backend: FolderBackend, path: dir, label: options.label });
|
|
469
469
|
},
|
|
470
470
|
{
|
|
471
471
|
type: "Folder",
|
package/dist/zen-fs-config.js
CHANGED
|
@@ -24522,6 +24522,7 @@ var ZenFSConfig = (() => {
|
|
|
24522
24522
|
return registry.delete(type);
|
|
24523
24523
|
}
|
|
24524
24524
|
async function createBackend(descriptor) {
|
|
24525
|
+
traceCreateBackend(descriptor.type, descriptor.options);
|
|
24525
24526
|
const factory = registry.get(descriptor.type);
|
|
24526
24527
|
if (!factory) {
|
|
24527
24528
|
throw new Error(
|
|
@@ -24530,6 +24531,19 @@ var ZenFSConfig = (() => {
|
|
|
24530
24531
|
}
|
|
24531
24532
|
return factory(descriptor.options);
|
|
24532
24533
|
}
|
|
24534
|
+
function traceCreateBackend(type, options) {
|
|
24535
|
+
const g = globalThis;
|
|
24536
|
+
try {
|
|
24537
|
+
if (!Array.isArray(g.__zenfsBackendTrace)) g.__zenfsBackendTrace = [];
|
|
24538
|
+
g.__zenfsBackendTrace.push({
|
|
24539
|
+
type,
|
|
24540
|
+
storeName: options?.storeName ?? null,
|
|
24541
|
+
registered: registry.has(type),
|
|
24542
|
+
at: Date.now()
|
|
24543
|
+
});
|
|
24544
|
+
} catch {
|
|
24545
|
+
}
|
|
24546
|
+
}
|
|
24533
24547
|
function hasBackend(type) {
|
|
24534
24548
|
return registry.has(type);
|
|
24535
24549
|
}
|