@fireproof/core 0.19.112-dev-web → 0.19.112-dev-dyn
Sign up to get free protection for your applications and to get access to all the features.
- package/{chunk-GZANCVTS.js → chunk-D4E6UX6S.js} +1 -8
- package/{chunk-GZANCVTS.js.map → chunk-D4E6UX6S.js.map} +1 -1
- package/{web/chunk-S4HRSKEO.js → chunk-PWEDYV5H.js} +26 -30
- package/chunk-PWEDYV5H.js.map +1 -0
- package/chunk-PZ5AY32C.js +10 -0
- package/{gateway@skip-iife-OZ2V32XH.js → gateway-72EUHYEL.js} +5 -4
- package/gateway-72EUHYEL.js.map +1 -0
- package/gateway-SK2ERWD3.js +70 -0
- package/gateway-SK2ERWD3.js.map +1 -0
- package/index.cjs +105 -286
- package/index.cjs.map +1 -1
- package/index.d.cts +2 -3
- package/index.d.ts +2 -3
- package/index.global.js +233 -188
- package/index.global.js.map +1 -1
- package/index.js +17 -17
- package/index.js.map +1 -1
- package/{key-bag-file-4TYN2H7F.js → key-bag-file-VP6Y7N26.js} +4 -3
- package/{key-bag-file-4TYN2H7F.js.map → key-bag-file-VP6Y7N26.js.map} +1 -1
- package/{key-bag-indexdb-JEOAS4WM.js → key-bag-indexdb-N5GQ5GSH.js} +4 -3
- package/{key-bag-indexdb-JEOAS4WM.js.map → key-bag-indexdb-N5GQ5GSH.js.map} +1 -1
- package/metafile-cjs.json +1 -1
- package/metafile-esm.json +1 -1
- package/metafile-iife.json +1 -1
- package/node/chunk-4A4RAVNS.js +17 -0
- package/node/chunk-4A4RAVNS.js.map +1 -0
- package/node/mem-filesystem.cjs +72 -0
- package/node/mem-filesystem.cjs.map +1 -0
- package/node/mem-filesystem.d.cts +25 -0
- package/node/mem-filesystem.d.ts +25 -0
- package/{mem-filesystem@skip-iife-CJI7IIKV.js → node/mem-filesystem.js} +3 -4
- package/node/mem-filesystem.js.map +1 -0
- package/node/metafile-cjs.json +1 -0
- package/node/metafile-esm.json +1 -0
- package/node/node-filesystem.cjs +86 -0
- package/node/node-filesystem.cjs.map +1 -0
- package/node/node-filesystem.d.cts +36 -0
- package/node/node-filesystem.d.ts +36 -0
- package/{node-filesystem@skip-iife-O74VAABQ.js → node/node-filesystem.js} +3 -4
- package/node/node-filesystem.js.map +1 -0
- package/node/types-DARSfXlb.d.cts +23 -0
- package/node/types-DARSfXlb.d.ts +23 -0
- package/package.json +1 -1
- package/utils-WS4AZWA7.js +13 -0
- package/web/gateway-impl.cjs +319 -0
- package/web/gateway-impl.cjs.map +1 -0
- package/web/gateway-impl.d.cts +86 -0
- package/web/gateway-impl.d.ts +86 -0
- package/{gateway@skip-esm-O655UEIP.js → web/gateway-impl.js} +165 -20
- package/web/gateway-impl.js.map +1 -0
- package/web/metafile-cjs.json +1 -1
- package/web/metafile-esm.json +1 -1
- package/chunk-LNFBDD6E.js +0 -75
- package/chunk-LNFBDD6E.js.map +0 -1
- package/chunk-PB4BKL4O.js +0 -7
- package/chunk-PB4BKL4O.js.map +0 -1
- package/gateway@skip-esm-O655UEIP.js.map +0 -1
- package/gateway@skip-iife-OZ2V32XH.js.map +0 -1
- package/mem-filesystem@skip-iife-CJI7IIKV.js.map +0 -1
- package/node-filesystem@skip-iife-O74VAABQ.js.map +0 -1
- package/utils-L7MUZUJX.js +0 -14
- package/web/bundle-not-impl-UH74NK5L.js +0 -5
- package/web/bundle-not-impl-UH74NK5L.js.map +0 -1
- package/web/chunk-2DC5ZIR4.js +0 -7
- package/web/chunk-2DC5ZIR4.js.map +0 -1
- package/web/chunk-Q5W7UNMP.js +0 -292
- package/web/chunk-Q5W7UNMP.js.map +0 -1
- package/web/chunk-S4HRSKEO.js.map +0 -1
- package/web/gateway@skip-esm-GI5PRACF.js +0 -165
- package/web/gateway@skip-esm-GI5PRACF.js.map +0 -1
- package/web/index.cjs +0 -4138
- package/web/index.cjs.map +0 -1
- package/web/index.d.cts +0 -1139
- package/web/index.d.ts +0 -1139
- package/web/index.js +0 -3478
- package/web/index.js.map +0 -1
- package/web/key-bag-file-4SJQGORQ.js +0 -54
- package/web/key-bag-file-4SJQGORQ.js.map +0 -1
- package/web/key-bag-indexdb-GSQOUUVQ.js +0 -50
- package/web/key-bag-indexdb-GSQOUUVQ.js.map +0 -1
- package/web/utils-EFZJNXH5.js +0 -14
- /package/{utils-L7MUZUJX.js.map → chunk-PZ5AY32C.js.map} +0 -0
- /package/{web/utils-EFZJNXH5.js.map → utils-WS4AZWA7.js.map} +0 -0
@@ -1,17 +1,162 @@
|
|
1
|
+
// src/runtime/gateways/indexdb/web/gateway-impl.ts
|
2
|
+
import { openDB } from "idb";
|
3
|
+
import { exception2Result, KeyedResolvOnce, Result as Result2 } from "@adviser/cement";
|
4
|
+
|
5
|
+
// src/runtime/gateways/indexdb/version.ts
|
6
|
+
var INDEXDB_VERSION = "v0.19-indexdb";
|
7
|
+
|
8
|
+
// src/utils.ts
|
1
9
|
import {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
10
|
+
LoggerImpl,
|
11
|
+
IsLogger,
|
12
|
+
Result,
|
13
|
+
ResolveOnce,
|
14
|
+
isURL,
|
15
|
+
URI,
|
16
|
+
runtimeFn,
|
17
|
+
envFactory,
|
18
|
+
toCryptoRuntime,
|
19
|
+
JSONFormatter,
|
20
|
+
YAMLFormatter
|
21
|
+
} from "@adviser/cement";
|
22
|
+
import { base58btc } from "multiformats/bases/base58";
|
23
|
+
var globalLogger = new LoggerImpl();
|
24
|
+
var registerFP_DEBUG = new ResolveOnce();
|
25
|
+
var pathOpsImpl = class {
|
26
|
+
join(...paths) {
|
27
|
+
return paths.map((i) => i.replace(/\/+$/, "")).join("/");
|
28
|
+
}
|
29
|
+
dirname(path) {
|
30
|
+
return path.split("/").slice(0, -1).join("/");
|
31
|
+
}
|
32
|
+
// homedir() {
|
33
|
+
// throw new Error("SysContainer:homedir is not available in seeded state");
|
34
|
+
// }
|
35
|
+
};
|
36
|
+
var pathOps = new pathOpsImpl();
|
37
|
+
function ensureLogger(sthis, componentName, ctx) {
|
38
|
+
let logger = globalLogger;
|
39
|
+
if (IsLogger(sthis)) {
|
40
|
+
logger = sthis;
|
41
|
+
} else if (sthis && IsLogger(sthis.logger)) {
|
42
|
+
logger = sthis.logger;
|
43
|
+
}
|
44
|
+
const cLogger = logger.With().Module(componentName);
|
45
|
+
const debug = [];
|
46
|
+
let exposeStack = false;
|
47
|
+
if (ctx) {
|
48
|
+
if ("debug" in ctx) {
|
49
|
+
if (typeof ctx.debug === "string" && ctx.debug.length > 0) {
|
50
|
+
debug.push(ctx.debug);
|
51
|
+
} else {
|
52
|
+
debug.push(componentName);
|
53
|
+
}
|
54
|
+
delete ctx.debug;
|
55
|
+
}
|
56
|
+
if ("exposeStack" in ctx) {
|
57
|
+
exposeStack = true;
|
58
|
+
delete ctx.exposeStack;
|
59
|
+
}
|
60
|
+
if ("this" in ctx) {
|
61
|
+
cLogger.Str("this", sthis.nextId(4).str);
|
62
|
+
delete ctx.this;
|
63
|
+
}
|
64
|
+
for (const [key, value] of Object.entries(ctx)) {
|
65
|
+
switch (typeof value) {
|
66
|
+
case "string":
|
67
|
+
cLogger.Str(key, value);
|
68
|
+
break;
|
69
|
+
case "number":
|
70
|
+
cLogger.Uint64(key, value);
|
71
|
+
break;
|
72
|
+
default:
|
73
|
+
if (value instanceof Date) {
|
74
|
+
cLogger.Str(key, value.toISOString());
|
75
|
+
} else if (isURL(value)) {
|
76
|
+
cLogger.Str(key, value.toString());
|
77
|
+
} else if (typeof value === "function") {
|
78
|
+
cLogger.Ref(key, value);
|
79
|
+
} else {
|
80
|
+
cLogger.Any(key, value);
|
81
|
+
}
|
82
|
+
break;
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
registerFP_DEBUG.once(async () => {
|
87
|
+
sthis.env.onSet(
|
88
|
+
(key, value) => {
|
89
|
+
switch (key) {
|
90
|
+
case "FP_FORMAT": {
|
91
|
+
switch (value) {
|
92
|
+
case "jsonice":
|
93
|
+
logger.SetFormatter(new JSONFormatter(logger.TxtEnDe(), 2));
|
94
|
+
break;
|
95
|
+
case "yaml":
|
96
|
+
logger.SetFormatter(new YAMLFormatter(logger.TxtEnDe(), 2));
|
97
|
+
break;
|
98
|
+
case "json":
|
99
|
+
default:
|
100
|
+
logger.SetFormatter(new JSONFormatter(logger.TxtEnDe()));
|
101
|
+
break;
|
102
|
+
}
|
103
|
+
break;
|
104
|
+
}
|
105
|
+
case "FP_DEBUG":
|
106
|
+
logger.SetDebug(value || []);
|
107
|
+
break;
|
108
|
+
case "FP_STACK":
|
109
|
+
logger.SetExposeStack(!!value);
|
110
|
+
break;
|
111
|
+
}
|
112
|
+
},
|
113
|
+
"FP_FORMAT",
|
114
|
+
"FP_DEBUG",
|
115
|
+
"FP_STACK"
|
116
|
+
);
|
117
|
+
}).finally(() => {
|
118
|
+
});
|
119
|
+
if (debug.length > 0) {
|
120
|
+
logger.SetDebug(debug);
|
121
|
+
}
|
122
|
+
if (exposeStack) {
|
123
|
+
logger.SetExposeStack(true);
|
124
|
+
}
|
125
|
+
const out = cLogger.Logger();
|
126
|
+
return out;
|
127
|
+
}
|
128
|
+
function getStore(url, sthis, joiner) {
|
129
|
+
const store = url.getParam("store");
|
130
|
+
switch (store) {
|
131
|
+
case "data":
|
132
|
+
case "wal":
|
133
|
+
case "meta":
|
134
|
+
break;
|
135
|
+
default:
|
136
|
+
throw sthis.logger.Error().Url(url).Msg(`store not found`).AsError();
|
137
|
+
}
|
138
|
+
let name = store;
|
139
|
+
if (url.hasParam("index")) {
|
140
|
+
name = joiner(url.getParam("index") || "idx", name);
|
141
|
+
}
|
142
|
+
return { store, name };
|
143
|
+
}
|
144
|
+
function getKey(url, logger) {
|
145
|
+
const result = url.getParam("key");
|
146
|
+
if (!result) throw logger.Error().Str("url", url.toString()).Msg(`key not found`).AsError();
|
147
|
+
return result;
|
148
|
+
}
|
149
|
+
async function exceptionWrapper(fn) {
|
150
|
+
return fn().catch((e) => Result.Err(e));
|
151
|
+
}
|
152
|
+
var NotFoundError = class extends Error {
|
153
|
+
constructor() {
|
154
|
+
super(...arguments);
|
155
|
+
this.code = "ENOENT";
|
156
|
+
}
|
157
|
+
};
|
11
158
|
|
12
|
-
// src/runtime/gateways/indexdb/gateway
|
13
|
-
import { openDB } from "idb";
|
14
|
-
import { exception2Result, KeyedResolvOnce, Result } from "@adviser/cement";
|
159
|
+
// src/runtime/gateways/indexdb/web/gateway-impl.ts
|
15
160
|
function ensureVersion(url) {
|
16
161
|
return url.build().defParam("version", INDEXDB_VERSION).URI();
|
17
162
|
}
|
@@ -66,7 +211,7 @@ function getIndexDBName(iurl, sthis) {
|
|
66
211
|
dbName
|
67
212
|
};
|
68
213
|
}
|
69
|
-
var
|
214
|
+
var IndexDBGatewayImpl = class {
|
70
215
|
constructor(sthis) {
|
71
216
|
this._db = {};
|
72
217
|
this.logger = ensureLogger(sthis, "IndexDBGateway");
|
@@ -83,7 +228,7 @@ var IndexDBGateway = class {
|
|
83
228
|
});
|
84
229
|
}
|
85
230
|
async close() {
|
86
|
-
return
|
231
|
+
return Result2.Ok(void 0);
|
87
232
|
}
|
88
233
|
async destroy(baseUrl) {
|
89
234
|
return exception2Result(async () => {
|
@@ -102,7 +247,7 @@ var IndexDBGateway = class {
|
|
102
247
|
});
|
103
248
|
}
|
104
249
|
buildUrl(baseUrl, key) {
|
105
|
-
return Promise.resolve(
|
250
|
+
return Promise.resolve(Result2.Ok(baseUrl.build().setParam("key", key).URI()));
|
106
251
|
}
|
107
252
|
async get(url) {
|
108
253
|
return exceptionWrapper(async () => {
|
@@ -113,9 +258,9 @@ var IndexDBGateway = class {
|
|
113
258
|
const bytes = await tx.objectStore(store).get(sanitzeKey(key));
|
114
259
|
await tx.done;
|
115
260
|
if (!bytes) {
|
116
|
-
return
|
261
|
+
return Result2.Err(new NotFoundError(`missing ${key}`));
|
117
262
|
}
|
118
|
-
return
|
263
|
+
return Result2.Ok(bytes);
|
119
264
|
});
|
120
265
|
}
|
121
266
|
async put(url, value) {
|
@@ -136,7 +281,7 @@ var IndexDBGateway = class {
|
|
136
281
|
const tx = this._db.transaction([store], "readwrite");
|
137
282
|
await tx.objectStore(store).delete(sanitzeKey(key));
|
138
283
|
await tx.done;
|
139
|
-
return
|
284
|
+
return Result2.Ok(void 0);
|
140
285
|
});
|
141
286
|
}
|
142
287
|
};
|
@@ -158,8 +303,8 @@ var IndexDBTestStore = class {
|
|
158
303
|
}
|
159
304
|
};
|
160
305
|
export {
|
161
|
-
|
306
|
+
IndexDBGatewayImpl,
|
162
307
|
IndexDBTestStore,
|
163
308
|
getIndexDBName
|
164
309
|
};
|
165
|
-
//# sourceMappingURL=gateway
|
310
|
+
//# sourceMappingURL=gateway-impl.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["../../../src/runtime/gateways/indexdb/web/gateway-impl.ts","../../../src/runtime/gateways/indexdb/version.ts","../../../src/utils.ts"],"sourcesContent":["import { openDB, IDBPDatabase } from \"idb\";\nimport { exception2Result, KeyedResolvOnce, Logger, Result, URI } from \"@adviser/cement\";\n\nimport { INDEXDB_VERSION } from \"../version.js\";\nimport { ensureLogger, exceptionWrapper, getKey, getStore, NotFoundError } from \"../../../../utils.js\";\nimport { Gateway, GetResult, TestGateway } from \"../../../../blockstore/gateway.js\";\nimport { SuperThis } from \"../../../../types.js\";\n\nfunction ensureVersion(url: URI): URI {\n return url.build().defParam(\"version\", INDEXDB_VERSION).URI();\n}\n\ninterface IDBConn {\n readonly db: IDBPDatabase<unknown>;\n readonly dbName: DbName;\n readonly version: string;\n readonly url: URI;\n}\nconst onceIndexDB = new KeyedResolvOnce<IDBConn>();\n\nfunction sanitzeKey(key: string | string[]): string | string[] {\n if (key.length === 1) {\n key = key[0];\n }\n return key;\n}\n\nasync function connectIdb(url: URI, sthis: SuperThis): Promise<IDBConn> {\n const dbName = getIndexDBName(url, sthis);\n const once = await onceIndexDB.get(dbName.fullDb).once(async () => {\n const db = await openDB(dbName.fullDb, 1, {\n upgrade(db) {\n [\"version\", \"data\", \"wal\", \"meta\", \"idx.data\", \"idx.wal\", \"idx.meta\"].map((store) => {\n db.createObjectStore(store, {\n autoIncrement: false,\n });\n });\n },\n });\n const found = await db.get(\"version\", \"version\");\n const version = ensureVersion(url).getParam(\"version\") as string;\n if (!found) {\n await db.put(\"version\", { version }, \"version\");\n } else if (found.version !== version) {\n sthis.logger.Warn().Str(\"url\", url.toString()).Str(\"version\", version).Str(\"found\", found.version).Msg(\"version mismatch\");\n }\n return { db, dbName, version, url };\n });\n return {\n ...once,\n url: url.build().setParam(\"version\", once.version).URI(),\n };\n}\n\nexport interface DbName {\n readonly fullDb: string;\n readonly objStore: string;\n readonly connectionKey: string;\n readonly dbName: string;\n}\n\nfunction joinDBName(...names: string[]): string {\n return names\n .map((i) => i.replace(/^[^a-zA-Z0-9]+/g, \"\").replace(/[^a-zA-Z0-9]+/g, \"_\"))\n .filter((i) => i.length)\n .join(\".\");\n}\n\n// const schemaVersion = new Map<string, number>();\nexport function getIndexDBName(iurl: URI, sthis: SuperThis): DbName {\n const url = ensureVersion(iurl);\n const fullDb = url.pathname.replace(/^\\/+/, \"\").replace(/\\?.*$/, \"\"); // cut leading slashes\n // const type = getStore(url);\n // const storageVersion = url.searchParams.get(\"version\");\n // not nice but we need to pass the version to the db name\n // url.searchParams.set(\"version\", storageVersion);\n // console.log(\"getIndexDBName:\", url.toString(), { fullDb, type, branch });\n // const dbName = fullDb.replace(new RegExp(`^fp.${storageVersion}.`), \"\"); // cut fp prefix\n const dbName = url.getParam(\"name\");\n if (!dbName) throw sthis.logger.Error().Str(\"url\", url.toString()).Msg(`name not found`).AsError();\n const result = joinDBName(fullDb, dbName);\n const objStore = getStore(url, sthis, joinDBName).name;\n const connectionKey = [result, objStore].join(\":\");\n return {\n fullDb: result,\n objStore,\n connectionKey,\n dbName,\n };\n}\n\nexport class IndexDBGatewayImpl implements Gateway {\n readonly logger: Logger;\n readonly sthis: SuperThis;\n constructor(sthis: SuperThis) {\n this.logger = ensureLogger(sthis, \"IndexDBGateway\");\n this.sthis = sthis;\n }\n _db: IDBPDatabase<unknown> = {} as IDBPDatabase<unknown>;\n\n async start(baseURL: URI): Promise<Result<URI>> {\n return exception2Result(async () => {\n this.logger.Debug().Url(baseURL).Msg(\"starting\");\n await this.sthis.start();\n const ic = await connectIdb(baseURL, this.sthis);\n this._db = ic.db;\n this.logger.Debug().Url(ic.url).Msg(\"started\");\n return ic.url;\n });\n }\n async close(): Promise<Result<void>> {\n return Result.Ok(undefined);\n }\n async destroy(baseUrl: URI): Promise<Result<void>> {\n return exception2Result(async () => {\n // return deleteDB(getIndexDBName(this.url).fullDb);\n const type = getStore(baseUrl, this.sthis, joinDBName).name;\n // console.log(\"IndexDBDataStore:destroy\", type);\n const idb = this._db;\n const trans = idb.transaction(type, \"readwrite\");\n const object_store = trans.objectStore(type);\n const toDelete = [];\n for (let cursor = await object_store.openCursor(); cursor; cursor = await cursor.continue()) {\n toDelete.push(cursor.primaryKey);\n }\n for (const key of toDelete) {\n await trans.db.delete(type, key);\n }\n await trans.done;\n });\n }\n\n buildUrl(baseUrl: URI, key: string): Promise<Result<URI>> {\n return Promise.resolve(Result.Ok(baseUrl.build().setParam(\"key\", key).URI()));\n }\n\n async get(url: URI): Promise<GetResult> {\n return exceptionWrapper(async () => {\n const key = getKey(url, this.logger);\n const store = getStore(url, this.sthis, joinDBName).name;\n this.logger.Debug().Url(url).Str(\"key\", key).Str(\"store\", store).Msg(\"getting\");\n const tx = this._db.transaction([store], \"readonly\");\n const bytes = await tx.objectStore(store).get(sanitzeKey(key));\n await tx.done;\n if (!bytes) {\n return Result.Err(new NotFoundError(`missing ${key}`));\n }\n return Result.Ok(bytes as Uint8Array);\n });\n }\n async put(url: URI, value: Uint8Array) {\n return exception2Result(async () => {\n const key = getKey(url, this.logger);\n const store = getStore(url, this.sthis, joinDBName).name;\n this.logger.Debug().Url(url).Str(\"key\", key).Str(\"store\", store).Msg(\"putting\");\n const tx = this._db.transaction([store], \"readwrite\");\n await tx.objectStore(store).put(value, sanitzeKey(key));\n await tx.done;\n });\n }\n async delete(url: URI) {\n return exception2Result(async () => {\n const key = getKey(url, this.logger);\n const store = getStore(url, this.sthis, joinDBName).name;\n this.logger.Debug().Url(url).Str(\"key\", key).Str(\"store\", store).Msg(\"deleting\");\n const tx = this._db.transaction([store], \"readwrite\");\n await tx.objectStore(store).delete(sanitzeKey(key));\n await tx.done;\n return Result.Ok(undefined);\n });\n }\n}\n\n// export class IndexDBDataGateway extends IndexDBGateway {\n// readonly storeType = \"data\";\n// constructor(logger: Logger) {\n// super(ensureLogger(logger, \"IndexDBDataGateway\"));\n// }\n// }\n\n// export class IndexDBWalGateway extends IndexDBGateway {\n// readonly storeType = \"wal\";\n// constructor(logger: Logger) {\n// super(ensureLogger(logger, \"IndexDBWalGateway\"));\n// }\n// }\n// export class IndexDBMetaGateway extends IndexDBGateway {\n// readonly storeType = \"meta\";\n// constructor(logger: Logger) {\n// super(ensureLogger(logger, \"IndexDBMetaGateway\"));\n// }\n// }\n\nexport class IndexDBTestStore implements TestGateway {\n readonly logger: Logger;\n readonly sthis: SuperThis;\n constructor(sthis: SuperThis) {\n this.sthis = sthis;\n this.logger = ensureLogger(sthis, \"IndexDBTestStore\", {});\n }\n async get(url: URI, key: string) {\n const ic = await connectIdb(url, this.sthis);\n const store = getStore(ic.url, this.sthis, joinDBName).name;\n this.logger.Debug().Str(\"key\", key).Str(\"store\", store).Msg(\"getting\");\n let bytes = await ic.db.get(store, sanitzeKey(key));\n this.logger.Debug().Str(\"key\", key).Str(\"store\", store).Int(\"len\", bytes.length).Msg(\"got\");\n if (typeof bytes === \"string\") {\n bytes = this.sthis.txt.encode(bytes);\n }\n return bytes as Uint8Array;\n }\n}\n","export const INDEXDB_VERSION = \"v0.19-indexdb\";\n","import {\n Logger,\n LoggerImpl,\n IsLogger,\n Result,\n ResolveOnce,\n isURL,\n URI,\n CoerceURI,\n runtimeFn,\n envFactory,\n Env,\n toCryptoRuntime,\n CryptoRuntime,\n JSONFormatter,\n YAMLFormatter,\n} from \"@adviser/cement\";\nimport { PathOps, StoreType, SuperThis, SuperThisOpts, TextEndeCoder } from \"./types\";\nimport { base58btc } from \"multiformats/bases/base58\";\n\nexport type { Logger };\nexport { Result };\n\nconst globalLogger: Logger = new LoggerImpl();\n\nconst registerFP_DEBUG = new ResolveOnce();\n\ninterface superThisOpts {\n readonly logger: Logger;\n readonly env: Env;\n readonly pathOps: PathOps;\n readonly crypto: CryptoRuntime;\n readonly ctx: Record<string, unknown>;\n readonly txt: TextEndeCoder;\n}\n\nclass superThis implements SuperThis {\n readonly logger: Logger;\n readonly env: Env;\n readonly pathOps: PathOps;\n readonly ctx: Record<string, unknown>;\n readonly txt: TextEndeCoder;\n readonly crypto: CryptoRuntime;\n\n constructor(opts: superThisOpts) {\n this.logger = opts.logger;\n this.env = opts.env;\n this.crypto = opts.crypto;\n this.pathOps = opts.pathOps;\n this.txt = opts.txt;\n this.ctx = { ...opts.ctx };\n // console.log(\"superThis\", this);\n }\n\n nextId(bytes = 6): { str: string; bin: Uint8Array } {\n const bin = this.crypto.randomBytes(bytes);\n return {\n str: base58btc.encode(bin),\n bin,\n };\n }\n\n timeOrderedNextId(now?: number): { str: string } {\n now = typeof now === \"number\" ? now : new Date().getTime();\n // 49th bit\n const t = (0x1000000000000 + now).toString(16).replace(/^1/, \"\");\n const bin = this.crypto.randomBytes(10);\n bin[1] = (bin[1] & 0xf0) | (bin[1] | 0x08 && 0x0b);\n const hex = Array.from(bin)\n .map((i) => i.toString(16).padStart(2, \"0\"))\n .join(\"\");\n return {\n str: `${t.slice(0, 8)}-${t.slice(8)}-7${hex.slice(0, 3)}-${hex.slice(3, 7)}-${hex.slice(7, 19)}`,\n };\n }\n\n start(): Promise<void> {\n return Promise.resolve();\n }\n\n clone(override: Partial<SuperThisOpts>): SuperThis {\n return new superThis({\n logger: override.logger || this.logger,\n env: envFactory(override.env) || this.env,\n crypto: override.crypto || this.crypto,\n pathOps: override.pathOps || this.pathOps,\n txt: override.txt || this.txt,\n ctx: { ...this.ctx, ...override.ctx },\n });\n }\n}\n\n// const pathOps =\nfunction presetEnv() {\n const penv = new Map([\n // [\"FP_DEBUG\", \"xxx\"],\n // [\"FP_ENV\", \"development\"],\n ...Array.from(\n Object.entries(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ((globalThis as any)[Symbol.for(\"FP_PRESET_ENV\")] || {}) as Record<string, string>,\n ),\n ), // .map(([k, v]) => [k, v as string])\n ]);\n // console.log(\">>>>>>\", penv)\n return penv;\n}\n// const envImpl = envFactory({\n// symbol: \"FP_ENV\",\n// presetEnv: presetEnv(),\n// });\nclass pathOpsImpl implements PathOps {\n join(...paths: string[]): string {\n return paths.map((i) => i.replace(/\\/+$/, \"\")).join(\"/\");\n }\n dirname(path: string) {\n return path.split(\"/\").slice(0, -1).join(\"/\");\n }\n // homedir() {\n // throw new Error(\"SysContainer:homedir is not available in seeded state\");\n // }\n}\nconst pathOps = new pathOpsImpl();\nconst txtOps = {\n // eslint-disable-next-line no-restricted-globals\n encode: (input: string) => new TextEncoder().encode(input),\n // eslint-disable-next-line no-restricted-globals\n decode: (input: Uint8Array) => new TextDecoder().decode(input),\n};\n\nexport function ensureSuperThis(osthis?: Partial<SuperThisOpts>): SuperThis {\n const env = envFactory({\n symbol: osthis?.env?.symbol || \"FP_ENV\",\n presetEnv: osthis?.env?.presetEnv || presetEnv(),\n });\n return new superThis({\n logger: osthis?.logger || globalLogger,\n env,\n crypto: osthis?.crypto || toCryptoRuntime(),\n ctx: osthis?.ctx || {},\n pathOps,\n txt: osthis?.txt || txtOps,\n });\n}\n\n// // eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function ensureSuperLog(sthis: SuperThis, componentName: string, ctx?: Record<string, unknown>): SuperThis {\n return sthis.clone({\n logger: ensureLogger(sthis, componentName, ctx),\n });\n}\n\nexport function ensureLogger(\n sthis: SuperThis /* Partial<LoggerOpts> | Logger */,\n componentName: string,\n ctx?: Record<string, unknown>,\n): Logger {\n // if (!opts?.logger) {\n // throw new Error(\"logger is required\");\n // }\n let logger = globalLogger;\n if (IsLogger(sthis)) {\n logger = sthis;\n } else if (sthis && IsLogger(sthis.logger)) {\n logger = sthis.logger;\n }\n const cLogger = logger.With().Module(componentName); //.Str(\"this\", uuidv7());\n const debug: string[] = [];\n let exposeStack = false;\n if (ctx) {\n if (\"debug\" in ctx) {\n if (typeof ctx.debug === \"string\" && ctx.debug.length > 0) {\n debug.push(ctx.debug);\n } else {\n debug.push(componentName);\n }\n delete ctx.debug;\n }\n if (\"exposeStack\" in ctx) {\n exposeStack = true;\n delete ctx.exposeStack;\n }\n if (\"this\" in ctx) {\n cLogger.Str(\"this\", sthis.nextId(4).str);\n delete ctx.this;\n }\n for (const [key, value] of Object.entries(ctx)) {\n switch (typeof value) {\n case \"string\":\n cLogger.Str(key, value);\n break;\n case \"number\":\n cLogger.Uint64(key, value);\n break;\n default:\n if (value instanceof Date) {\n cLogger.Str(key, value.toISOString());\n } else if (isURL(value)) {\n cLogger.Str(key, value.toString());\n } else if (typeof value === \"function\") {\n cLogger.Ref(key, value);\n } else {\n cLogger.Any(key, value);\n }\n break;\n }\n }\n }\n registerFP_DEBUG\n .once(async () => {\n // console.log(\"registerFP_DEBUG\", SysContainer.env)\n sthis.env.onSet(\n (key, value) => {\n // console.log(\"FP_DEBUG\", key, value, debug)\n switch (key) {\n case \"FP_FORMAT\": {\n switch (value) {\n case \"jsonice\":\n logger.SetFormatter(new JSONFormatter(logger.TxtEnDe(), 2));\n break;\n case \"yaml\":\n logger.SetFormatter(new YAMLFormatter(logger.TxtEnDe(), 2));\n break;\n case \"json\":\n default:\n logger.SetFormatter(new JSONFormatter(logger.TxtEnDe()));\n break;\n }\n break;\n }\n case \"FP_DEBUG\":\n logger.SetDebug(value || []);\n break;\n case \"FP_STACK\":\n logger.SetExposeStack(!!value);\n break;\n }\n },\n \"FP_FORMAT\",\n \"FP_DEBUG\",\n \"FP_STACK\",\n );\n })\n .finally(() => {\n /* do nothing */\n });\n\n if (debug.length > 0) {\n logger.SetDebug(debug);\n }\n if (exposeStack) {\n logger.SetExposeStack(true);\n }\n const out = cLogger.Logger();\n // out.Debug().Msg(\"logger ready\");\n return out;\n}\n\nexport type Joiner = (...toJoin: string[]) => string;\n\nexport interface Store {\n readonly store: StoreType;\n readonly name: string;\n}\n\nexport function getStore(url: URI, sthis: SuperThis, joiner: Joiner): Store {\n const store = url.getParam(\"store\");\n switch (store) {\n case \"data\":\n case \"wal\":\n case \"meta\":\n break;\n default:\n throw sthis.logger.Error().Url(url).Msg(`store not found`).AsError();\n }\n let name: string = store;\n if (url.hasParam(\"index\")) {\n name = joiner(url.getParam(\"index\") || \"idx\", name);\n }\n return { store, name };\n}\n\nexport function getKey(url: URI, logger: Logger): string {\n const result = url.getParam(\"key\");\n if (!result) throw logger.Error().Str(\"url\", url.toString()).Msg(`key not found`).AsError();\n return result;\n}\n\nexport function getName(sthis: SuperThis, url: URI): string {\n let result = url.getParam(\"name\");\n if (!result) {\n result = sthis.pathOps.dirname(url.pathname);\n if (result.length === 0) {\n throw sthis.logger.Error().Str(\"url\", url.toString()).Msg(`name not found`).AsError();\n }\n }\n return result;\n}\n\n// export function exception2Result<T = void>(fn: () => Promise<T>): Promise<Result<T>> {\n// return fn()\n// .then((value) => Result.Ok(value))\n// .catch((e) => Result.Err(e));\n// }\n\nexport async function exceptionWrapper<T, E extends Error>(fn: () => Promise<Result<T, E>>): Promise<Result<T, E>> {\n return fn().catch((e) => Result.Err(e));\n}\n\n// // the big side effect party --- hate it\n// export function sanitizeURL(url: URL) {\n// url.searchParams.sort();\n// // const searchParams = Object.entries(url.searchParams).sort(([a], [b]) => a.localeCompare(b));\n// // console.log(\"searchParams\", searchParams);\n// // for (const [key] of searchParams) {\n// // url.searchParams.delete(key);\n// // }\n// // for (const [key, value] of searchParams) {\n// // url.searchParams.set(key, value);\n// // }\n// }\n\nexport class NotFoundError extends Error {\n readonly code = \"ENOENT\";\n}\n\nexport function isNotFoundError(e: Error | Result<unknown> | unknown): e is NotFoundError {\n if (Result.Is(e)) {\n if (e.isOk()) return false;\n e = e.Err();\n }\n if ((e as NotFoundError).code === \"ENOENT\") return true;\n return false;\n}\n\nexport function dataDir(sthis: SuperThis, name?: string, base?: CoerceURI): URI {\n if (!base) {\n if (!runtimeFn().isBrowser) {\n const home = sthis.env.get(\"HOME\") || \"./\";\n base = sthis.env.get(\"FP_STORAGE_URL\") || `file://${sthis.pathOps.join(home, \".fireproof\")}`;\n } else {\n base = sthis.env.get(\"FP_STORAGE_URL\") || `indexdb://fp`;\n }\n }\n return URI.from(base.toString())\n .build()\n .setParam(\"name\", name || \"\")\n .URI();\n}\n\nexport function UInt8ArrayEqual(a: Uint8Array, b: Uint8Array): boolean {\n if (a.length !== b.length) {\n return false;\n }\n for (let i = 0; i < a.length; i++) {\n if (a[i] !== b[i]) {\n return false;\n }\n }\n return true;\n}\n"],"mappings":";AAAA,SAAS,cAA4B;AACrC,SAAS,kBAAkB,iBAAyB,UAAAA,eAAmB;;;ACDhE,IAAM,kBAAkB;;;ACA/B;AAAA,EAEE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,EACA;AAAA,EAEA;AAAA,EAEA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,iBAAiB;AAK1B,IAAM,eAAuB,IAAI,WAAW;AAE5C,IAAM,mBAAmB,IAAI,YAAY;AAsFzC,IAAM,cAAN,MAAqC;AAAA,EACnC,QAAQ,OAAyB;AAC/B,WAAO,MAAM,IAAI,CAAC,MAAM,EAAE,QAAQ,QAAQ,EAAE,CAAC,EAAE,KAAK,GAAG;AAAA,EACzD;AAAA,EACA,QAAQ,MAAc;AACpB,WAAO,KAAK,MAAM,GAAG,EAAE,MAAM,GAAG,EAAE,EAAE,KAAK,GAAG;AAAA,EAC9C;AAAA;AAAA;AAAA;AAIF;AACA,IAAM,UAAU,IAAI,YAAY;AA8BzB,SAAS,aACd,OACA,eACA,KACQ;AAIR,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oBAAoB,CAAC,CAAC;AAAA,EAC1D;AAAA,EACA,MAAM,IAAI,KAAU,KAAa;AAC/B,UAAM,KAAK,MAAM,WAAW,KAAK,KAAK,KAAK;AAC3C,UAAM,QAAQ,SAAS,GAAG,KAAK,KAAK,OAAO,UAAU,EAAE;AACvD,SAAK,OAAO,MAAM,EAAE,IAAI,OAAO,GAAG,EAAE,IAAI,SAAS,KAAK,EAAE,IAAI,SAAS;AACrE,QAAI,QAAQ,MAAM,GAAG,GAAG,IAAI,OAAO,WAAW,GAAG,CAAC;AAClD,SAAK,OAAO,MAAM,EAAE,IAAI,OAAO,GAAG,EAAE,IAAI,SAAS,KAAK,EAAE,IAAI,OAAO,MAAM,MAAM,EAAE,IAAI,KAAK;AAC1F,QAAI,OAAO,UAAU,UAAU;AAC7B,cAAQ,KAAK,MAAM,IAAI,OAAO,KAAK;AAAA,IACrC;AACA,WAAO;AAAA,EACT;AACF;","names":["Result","db","Result"]}
|
package/web/metafile-cjs.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"inputs":{"src/write-queue.ts":{"bytes":1816,"imports":[{"path":"./types.js","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/wait-pr-multiformats/block.ts":{"bytes":3971,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/block","kind":"import-statement","external":true},{"path":"./codec-interface","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/types.ts":{"bytes":10512,"imports":[{"path":"../types.js","kind":"import-statement","external":true},{"path":"./transaction.js","kind":"import-statement","external":true},{"path":"../utils.js","kind":"import-statement","external":true},{"path":"./commit-queue.js","kind":"import-statement","external":true},{"path":"../runtime/key-bag.js","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"./task-manager","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/files.ts":{"bytes":2373,"imports":[{"path":"@ipld/unixfs","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"@ipld/unixfs/file/chunker/fixed","kind":"import-statement","external":true},{"path":"@ipld/unixfs/file/layout/balanced","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"ipfs-unixfs-exporter","kind":"import-statement","external":true},{"path":"../blockstore/index.js","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7640,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":10025,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/loader-helpers.ts":{"bytes":2094,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"../runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/transaction.ts":{"bytes":9652,"imports":[{"path":"@web3-storage/pail/block","kind":"import-statement","external":true},{"path":"@web3-storage/pail/api","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"src/blockstore/loader.ts","kind":"import-statement","original":"./loader.js"},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"},{"path":"src/blockstore/store-factory.ts","kind":"import-statement","original":"./store-factory.js"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/blockstore/commit-queue.ts":{"bytes":1375,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/bundle-not-impl.ts":{"bytes":129,"imports":[]},"src/runtime/gateways/file/utils.ts":{"bytes":2376,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../../../utils.js"},{"path":"../../../types.js","kind":"import-statement","external":true},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"./mem-filesystem@skip-iife.js"},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"./node-filesystem@skip-iife.js"}],"format":"esm"},"src/runtime/key-bag-file.ts":{"bytes":1897,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"./key-bag.js","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/runtime/gateways/file/utils.ts","kind":"dynamic-import","original":"./gateways/file/utils.js"}],"format":"esm"},"src/runtime/key-bag-indexdb.ts":{"bytes":1590,"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"./key-bag.js","kind":"import-statement","external":true},{"path":"src/runtime/gateways/file/utils.ts","kind":"import-statement","original":"./gateways/file/utils.js"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"use-fireproof","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/key-bag.ts":{"bytes":8285,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"../blockstore/types.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/runtime/key-bag-file.ts","kind":"dynamic-import","original":"./key-bag-file.js"},{"path":"src/runtime/key-bag-indexdb.ts","kind":"dynamic-import","original":"./key-bag-indexdb.js"}],"format":"esm"},"src/blockstore/commitor.ts":{"bytes":6155,"imports":[{"path":"../types","kind":"import-statement","external":true},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./transaction"},{"path":"src/blockstore/types.ts","kind":"import-statement","original":"./types"},{"path":"@ipld/car/buffer-writer","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"../runtime/wait-pr-multiformats/block.js"},{"path":"../runtime/wait-pr-multiformats/codec-interface.js","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/task-manager.ts":{"bytes":1997,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/loader.ts":{"bytes":15815,"imports":[{"path":"p-limit","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"src/blockstore/loader-helpers.ts","kind":"import-statement","original":"./loader-helpers.js"},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./transaction.js"},{"path":"src/blockstore/commit-queue.ts","kind":"import-statement","original":"./commit-queue.js"},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"},{"path":"src/blockstore/commitor.ts","kind":"import-statement","original":"./commitor.js"},{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"../runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"src/blockstore/task-manager.ts","kind":"import-statement","original":"./task-manager.js"}],"format":"esm"},"src/runtime/keyed-crypto.ts":{"bytes":7441,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"../blockstore","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"./key-bag","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"cborg","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/fragment-gateway.ts":{"bytes":6208,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"cborg","kind":"import-statement","external":true},{"path":"./gateway.js","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/blockstore/meta-key-helper.ts":{"bytes":5030,"imports":[{"path":"@ipld/dag-json","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock/api","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/bases/base64","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"}],"format":"esm"},"src/blockstore/store.ts":{"bytes":17442,"imports":[{"path":"@ipld/dag-json","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"},{"path":"./gateway.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"src/blockstore/loader.ts","kind":"import-statement","original":"./loader.js"},{"path":"src/blockstore/commit-queue.ts","kind":"import-statement","original":"./commit-queue.js"},{"path":"src/runtime/keyed-crypto.ts","kind":"import-statement","original":"../runtime/keyed-crypto.js"},{"path":"../runtime/key-bag.js","kind":"import-statement","external":true},{"path":"src/blockstore/fragment-gateway.ts","kind":"import-statement","original":"./fragment-gateway.js"},{"path":"src/blockstore/meta-key-helper.ts","kind":"import-statement","original":"./meta-key-helper.js"},{"path":"p-retry","kind":"import-statement","external":true},{"path":"p-map","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/gateways/indexdb/version.ts":{"bytes":48,"imports":[],"format":"esm"},"src/runtime/gateways/indexdb/gateway@skip-esm.ts":{"bytes":7577,"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/gateways/indexdb/version.ts","kind":"import-statement","original":"./version.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../../../utils.js"},{"path":"../../../blockstore/gateway.js","kind":"import-statement","external":true},{"path":"../../../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/store-factory.ts":{"bytes":11341,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/files.ts","kind":"import-statement","original":"../runtime/files.js"},{"path":"src/blockstore/store.ts","kind":"import-statement","original":"./store.js"},{"path":"./types.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"./gateway.js","kind":"import-statement","external":true},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"../runtime/gateways/file/gateway@skip-iife.js"},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"../runtime/gateways/file/gateway@skip-iife.js"},{"path":"src/runtime/gateways/indexdb/gateway@skip-esm.ts","kind":"dynamic-import","original":"../runtime/gateways/indexdb/gateway@skip-esm.js"},{"path":"src/runtime/gateways/indexdb/gateway@skip-esm.ts","kind":"dynamic-import","original":"../runtime/gateways/indexdb/gateway@skip-esm.js"}],"format":"esm"},"src/blockstore/gateway.ts":{"bytes":1065,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"../utils.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/store-remote.ts":{"bytes":1913,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/blockstore/store.ts","kind":"import-statement","original":"./store.js"},{"path":"../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/connection-base.ts":{"bytes":5382,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"},{"path":"./task-manager.js","kind":"import-statement","external":true},{"path":"./loader.js","kind":"import-statement","external":true},{"path":"src/blockstore/store-remote.ts","kind":"import-statement","original":"./store-remote.js"},{"path":"src/blockstore/store-factory.ts","kind":"import-statement","original":"./store-factory.js"},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"}],"format":"esm"},"src/blockstore/index.ts":{"bytes":718,"imports":[{"path":"src/blockstore/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/blockstore/store-factory.ts","kind":"import-statement","original":"./store-factory.js"},{"path":"src/blockstore/gateway.ts","kind":"import-statement","original":"./gateway.js"},{"path":"src/blockstore/fragment-gateway.ts","kind":"import-statement","original":"./fragment-gateway.js"},{"path":"./connection-base.js","kind":"import-statement","external":true},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./transaction.js"},{"path":"src/blockstore/loader.ts","kind":"import-statement","original":"./loader.js"},{"path":"src/blockstore/loader-helpers.ts","kind":"import-statement","original":"./loader-helpers.js"},{"path":"src/blockstore/connection-base.ts","kind":"import-statement","original":"./connection-base.js"},{"path":"src/blockstore/meta-key-helper.ts","kind":"import-statement","original":"./meta-key-helper.js"}],"format":"esm"},"src/crdt-helpers.ts":{"bytes":12364,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"./runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/link","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt/api","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt/batch","kind":"import-statement","external":true},{"path":"src/blockstore/index.ts","kind":"import-statement","original":"./blockstore/index.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"@web3-storage/pail/crdt/api","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/indexer-helpers.ts":{"bytes":7330,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"./runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"charwise","kind":"import-statement","external":true},{"path":"prolly-trees/db-index","kind":"import-statement","external":true},{"path":"prolly-trees/utils","kind":"import-statement","external":true},{"path":"prolly-trees/cache","kind":"import-statement","external":true},{"path":"prolly-trees/db-index","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"./crdt.js","kind":"import-statement","external":true}],"format":"esm"},"src/indexer.ts":{"bytes":10901,"imports":[{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"src/indexer-helpers.ts","kind":"import-statement","original":"./indexer-helpers.js"},{"path":"./crdt.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/apply-head-queue.ts":{"bytes":2240,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true}],"format":"esm"},"src/crdt-clock.ts":{"bytes":5315,"imports":[{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/crdt-helpers.ts","kind":"import-statement","original":"./crdt-helpers.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/apply-head-queue.ts","kind":"import-statement","original":"./apply-head-queue.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/crdt.ts":{"bytes":5805,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"src/crdt-helpers.ts","kind":"import-statement","original":"./crdt-helpers.js"},{"path":"src/indexer.ts","kind":"import-statement","original":"./indexer.js"},{"path":"src/crdt-clock.ts","kind":"import-statement","original":"./crdt-clock.js"},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./blockstore/transaction.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/database.ts":{"bytes":8223,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/write-queue.ts","kind":"import-statement","original":"./write-queue.js"},{"path":"src/crdt.ts","kind":"import-statement","original":"./crdt.js"},{"path":"src/indexer.ts","kind":"import-statement","original":"./indexer.js"},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/runtime/wait-pr-multiformats/codec-interface.ts":{"bytes":665,"imports":[],"format":"esm"},"src/runtime/wait-pr-multiformats/index.ts":{"bytes":84,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"./block.js"},{"path":"src/runtime/wait-pr-multiformats/codec-interface.ts","kind":"import-statement","original":"./codec-interface.js"}],"format":"esm"},"src/runtime/gateways/file/version.ts":{"bytes":47,"imports":[],"format":"esm"},"src/runtime/index.ts":{"bytes":545,"imports":[{"path":"src/runtime/gateways/file/utils.ts","kind":"import-statement","original":"./gateways/file/utils.js"},{"path":"src/runtime/files.ts","kind":"import-statement","original":"./files.js"},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"./key-bag.js"},{"path":"src/runtime/keyed-crypto.ts","kind":"import-statement","original":"./keyed-crypto.js"},{"path":"src/runtime/wait-pr-multiformats/index.ts","kind":"import-statement","original":"./wait-pr-multiformats/index.js"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/gateways/file/version.ts","kind":"import-statement","original":"./gateways/file/version.js"},{"path":"src/runtime/gateways/indexdb/version.ts","kind":"import-statement","original":"./gateways/indexdb/version.js"}],"format":"esm"},"src/version.ts":{"bytes":92,"imports":[],"format":"esm"},"src/index.ts":{"bytes":441,"imports":[{"path":"src/database.ts","kind":"import-statement","original":"./database.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/crdt.ts","kind":"import-statement","original":"./crdt.js"},{"path":"src/indexer.ts","kind":"import-statement","original":"./indexer.js"},{"path":"src/blockstore/index.ts","kind":"import-statement","original":"./blockstore/index.js"},{"path":"src/blockstore/index.ts","kind":"import-statement","original":"./blockstore/index.js"},{"path":"./blockstore","kind":"import-statement","external":true},{"path":"src/runtime/index.ts","kind":"import-statement","original":"./runtime/index.js"},{"path":"src/runtime/index.ts","kind":"import-statement","original":"./runtime/index.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/version.ts","kind":"import-statement","original":"./version.js"}],"format":"esm"}},"outputs":{"dist/fireproof-core/web/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":317448},"dist/fireproof-core/web/index.cjs":{"imports":[{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"multiformats/bases/base58","kind":"require-call","external":true},{"path":"idb","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"idb","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"multiformats","kind":"require-call","external":true},{"path":"multiformats/block","kind":"require-call","external":true},{"path":"multiformats/link","kind":"require-call","external":true},{"path":"multiformats/hashes/sha2","kind":"require-call","external":true},{"path":"@ipld/dag-cbor","kind":"require-call","external":true},{"path":"@web3-storage/pail/crdt","kind":"require-call","external":true},{"path":"@web3-storage/pail/clock","kind":"require-call","external":true},{"path":"@web3-storage/pail/crdt/batch","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@ipld/unixfs","kind":"require-call","external":true},{"path":"multiformats/codecs/raw","kind":"require-call","external":true},{"path":"@ipld/unixfs/file/chunker/fixed","kind":"require-call","external":true},{"path":"@ipld/unixfs/file/layout/balanced","kind":"require-call","external":true},{"path":"ipfs-unixfs-exporter","kind":"require-call","external":true},{"path":"@ipld/dag-json","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"p-limit","kind":"require-call","external":true},{"path":"@ipld/car","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"multiformats/hashes/sha2","kind":"require-call","external":true},{"path":"@ipld/dag-cbor","kind":"require-call","external":true},{"path":"@web3-storage/pail/block","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"multiformats/bases/base58","kind":"require-call","external":true},{"path":"@ipld/car/buffer-writer","kind":"require-call","external":true},{"path":"multiformats/hashes/sha2","kind":"require-call","external":true},{"path":"@ipld/dag-cbor","kind":"require-call","external":true},{"path":"multiformats/hashes/sha2","kind":"require-call","external":true},{"path":"multiformats/bases/base58","kind":"require-call","external":true},{"path":"multiformats/hashes/sha2","kind":"require-call","external":true},{"path":"cborg","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"multiformats/bases/base58","kind":"require-call","external":true},{"path":"cborg","kind":"require-call","external":true},{"path":"@ipld/dag-json","kind":"require-call","external":true},{"path":"@web3-storage/pail/clock","kind":"require-call","external":true},{"path":"multiformats","kind":"require-call","external":true},{"path":"multiformats/bases/base64","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"p-retry","kind":"require-call","external":true},{"path":"p-map","kind":"require-call","external":true},{"path":"multiformats/hashes/sha2","kind":"require-call","external":true},{"path":"@ipld/dag-cbor","kind":"require-call","external":true},{"path":"charwise","kind":"require-call","external":true},{"path":"prolly-trees/db-index","kind":"require-call","external":true},{"path":"prolly-trees/utils","kind":"require-call","external":true},{"path":"prolly-trees/cache","kind":"require-call","external":true},{"path":"@web3-storage/pail/clock","kind":"require-call","external":true},{"path":"@web3-storage/pail/crdt","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/utils.ts":{"bytesInOutput":7779},"src/bundle-not-impl.ts":{"bytesInOutput":200},"src/runtime/gateways/file/utils.ts":{"bytesInOutput":2186},"src/runtime/key-bag-file.ts":{"bytesInOutput":1790},"src/runtime/key-bag-indexdb.ts":{"bytesInOutput":1532},"src/runtime/gateways/indexdb/version.ts":{"bytesInOutput":161},"src/runtime/gateways/indexdb/gateway@skip-esm.ts":{"bytesInOutput":6183},"src/index.ts":{"bytesInOutput":926},"src/database.ts":{"bytesInOutput":5782},"src/write-queue.ts":{"bytesInOutput":1118},"src/crdt.ts":{"bytesInOutput":3871},"src/runtime/wait-pr-multiformats/block.ts":{"bytesInOutput":2206},"src/crdt-helpers.ts":{"bytesInOutput":8675},"src/blockstore/index.ts":{"bytesInOutput":787},"src/blockstore/types.ts":{"bytesInOutput":47},"src/blockstore/store-factory.ts":{"bytesInOutput":6928},"src/runtime/files.ts":{"bytesInOutput":2166},"src/blockstore/store.ts":{"bytesInOutput":14335},"src/types.ts":{"bytesInOutput":302},"src/blockstore/loader.ts":{"bytesInOutput":12318},"src/blockstore/loader-helpers.ts":{"bytesInOutput":556},"src/blockstore/transaction.ts":{"bytesInOutput":6456},"src/blockstore/commit-queue.ts":{"bytesInOutput":1249},"src/runtime/key-bag.ts":{"bytesInOutput":6369},"src/blockstore/commitor.ts":{"bytesInOutput":3532},"src/blockstore/task-manager.ts":{"bytesInOutput":1551},"src/runtime/keyed-crypto.ts":{"bytesInOutput":5513},"src/blockstore/fragment-gateway.ts":{"bytesInOutput":5320},"src/blockstore/meta-key-helper.ts":{"bytesInOutput":4359},"src/blockstore/store-remote.ts":{"bytesInOutput":332},"src/blockstore/connection-base.ts":{"bytesInOutput":3517},"src/indexer-helpers.ts":{"bytesInOutput":4118},"src/indexer.ts":{"bytesInOutput":7578},"src/crdt-clock.ts":{"bytesInOutput":4026},"src/apply-head-queue.ts":{"bytesInOutput":1260},"src/runtime/index.ts":{"bytesInOutput":543},"src/runtime/wait-pr-multiformats/index.ts":{"bytesInOutput":153},"src/runtime/wait-pr-multiformats/codec-interface.ts":{"bytesInOutput":34},"src/runtime/gateways/file/version.ts":{"bytesInOutput":38},"src/version.ts":{"bytesInOutput":72}},"bytes":139088}}}
|
1
|
+
{"inputs":{"src/runtime/gateways/indexdb/version.ts":{"bytes":48,"imports":[],"format":"esm"},"src/utils.ts":{"bytes":10025,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/gateways/indexdb/web/gateway-impl.ts":{"bytes":7591,"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/gateways/indexdb/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../../../../utils.js"},{"path":"../../../../blockstore/gateway.js","kind":"import-statement","external":true},{"path":"../../../../types.js","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/fireproof-core/web/gateway-impl.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26033},"dist/fireproof-core/web/gateway-impl.cjs":{"imports":[{"path":"idb","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"@adviser/cement","kind":"require-call","external":true},{"path":"multiformats/bases/base58","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/runtime/gateways/indexdb/web/gateway-impl.ts","inputs":{"src/runtime/gateways/indexdb/web/gateway-impl.ts":{"bytesInOutput":5633},"src/runtime/gateways/indexdb/version.ts":{"bytesInOutput":39},"src/utils.ts":{"bytesInOutput":3844}},"bytes":10482}}}
|
package/web/metafile-esm.json
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"inputs":{"src/write-queue.ts":{"bytes":1816,"imports":[{"path":"./types.js","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/wait-pr-multiformats/block.ts":{"bytes":3971,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/block","kind":"import-statement","external":true},{"path":"./codec-interface","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/types.ts":{"bytes":10512,"imports":[{"path":"../types.js","kind":"import-statement","external":true},{"path":"./transaction.js","kind":"import-statement","external":true},{"path":"../utils.js","kind":"import-statement","external":true},{"path":"./commit-queue.js","kind":"import-statement","external":true},{"path":"../runtime/key-bag.js","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"./task-manager","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/files.ts":{"bytes":2373,"imports":[{"path":"@ipld/unixfs","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"@ipld/unixfs/file/chunker/fixed","kind":"import-statement","external":true},{"path":"@ipld/unixfs/file/layout/balanced","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"ipfs-unixfs-exporter","kind":"import-statement","external":true},{"path":"../blockstore/index.js","kind":"import-statement","external":true}],"format":"esm"},"src/types.ts":{"bytes":7640,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/utils.ts":{"bytes":10025,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/loader-helpers.ts":{"bytes":2094,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"../runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/transaction.ts":{"bytes":9652,"imports":[{"path":"@web3-storage/pail/block","kind":"import-statement","external":true},{"path":"@web3-storage/pail/api","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"src/blockstore/loader.ts","kind":"import-statement","original":"./loader.js"},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"},{"path":"src/blockstore/store-factory.ts","kind":"import-statement","original":"./store-factory.js"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/blockstore/commit-queue.ts":{"bytes":1375,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/bundle-not-impl.ts":{"bytes":129,"imports":[]},"src/runtime/gateways/file/utils.ts":{"bytes":2376,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../../../utils.js"},{"path":"../../../types.js","kind":"import-statement","external":true},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"./mem-filesystem@skip-iife.js"},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"./node-filesystem@skip-iife.js"}],"format":"esm"},"src/runtime/key-bag-file.ts":{"bytes":1897,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"./key-bag.js","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/runtime/gateways/file/utils.ts","kind":"dynamic-import","original":"./gateways/file/utils.js"}],"format":"esm"},"src/runtime/key-bag-indexdb.ts":{"bytes":1590,"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"./key-bag.js","kind":"import-statement","external":true},{"path":"src/runtime/gateways/file/utils.ts","kind":"import-statement","original":"./gateways/file/utils.js"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"use-fireproof","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/key-bag.ts":{"bytes":8285,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"../blockstore/types.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/runtime/key-bag-file.ts","kind":"dynamic-import","original":"./key-bag-file.js"},{"path":"src/runtime/key-bag-indexdb.ts","kind":"dynamic-import","original":"./key-bag-indexdb.js"}],"format":"esm"},"src/blockstore/commitor.ts":{"bytes":6155,"imports":[{"path":"../types","kind":"import-statement","external":true},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./transaction"},{"path":"src/blockstore/types.ts","kind":"import-statement","original":"./types"},{"path":"@ipld/car/buffer-writer","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"../runtime/wait-pr-multiformats/block.js"},{"path":"../runtime/wait-pr-multiformats/codec-interface.js","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/task-manager.ts":{"bytes":1997,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/loader.ts":{"bytes":15815,"imports":[{"path":"p-limit","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"src/blockstore/loader-helpers.ts","kind":"import-statement","original":"./loader-helpers.js"},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./transaction.js"},{"path":"src/blockstore/commit-queue.ts","kind":"import-statement","original":"./commit-queue.js"},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"},{"path":"src/blockstore/commitor.ts","kind":"import-statement","original":"./commitor.js"},{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"../runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"src/blockstore/task-manager.ts","kind":"import-statement","original":"./task-manager.js"}],"format":"esm"},"src/runtime/keyed-crypto.ts":{"bytes":7441,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"../blockstore","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"./key-bag","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"cborg","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/fragment-gateway.ts":{"bytes":6208,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"cborg","kind":"import-statement","external":true},{"path":"./gateway.js","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"}],"format":"esm"},"src/blockstore/meta-key-helper.ts":{"bytes":5030,"imports":[{"path":"@ipld/dag-json","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock/api","kind":"import-statement","external":true},{"path":"../types.js","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/bases/base64","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"}],"format":"esm"},"src/blockstore/store.ts":{"bytes":17442,"imports":[{"path":"@ipld/dag-json","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"},{"path":"./gateway.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"src/blockstore/loader.ts","kind":"import-statement","original":"./loader.js"},{"path":"src/blockstore/commit-queue.ts","kind":"import-statement","original":"./commit-queue.js"},{"path":"src/runtime/keyed-crypto.ts","kind":"import-statement","original":"../runtime/keyed-crypto.js"},{"path":"../runtime/key-bag.js","kind":"import-statement","external":true},{"path":"src/blockstore/fragment-gateway.ts","kind":"import-statement","original":"./fragment-gateway.js"},{"path":"src/blockstore/meta-key-helper.ts","kind":"import-statement","original":"./meta-key-helper.js"},{"path":"p-retry","kind":"import-statement","external":true},{"path":"p-map","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/gateways/indexdb/version.ts":{"bytes":48,"imports":[],"format":"esm"},"src/runtime/gateways/indexdb/gateway@skip-esm.ts":{"bytes":7577,"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/gateways/indexdb/version.ts","kind":"import-statement","original":"./version.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../../../utils.js"},{"path":"../../../blockstore/gateway.js","kind":"import-statement","external":true},{"path":"../../../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/store-factory.ts":{"bytes":11341,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/files.ts","kind":"import-statement","original":"../runtime/files.js"},{"path":"src/blockstore/store.ts","kind":"import-statement","original":"./store.js"},{"path":"./types.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"../utils.js"},{"path":"./gateway.js","kind":"import-statement","external":true},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"},{"path":"../types.js","kind":"import-statement","external":true},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"../runtime/gateways/file/gateway@skip-iife.js"},{"path":"src/bundle-not-impl.ts","kind":"dynamic-import","original":"../runtime/gateways/file/gateway@skip-iife.js"},{"path":"src/runtime/gateways/indexdb/gateway@skip-esm.ts","kind":"dynamic-import","original":"../runtime/gateways/indexdb/gateway@skip-esm.js"},{"path":"src/runtime/gateways/indexdb/gateway@skip-esm.ts","kind":"dynamic-import","original":"../runtime/gateways/indexdb/gateway@skip-esm.js"}],"format":"esm"},"src/blockstore/gateway.ts":{"bytes":1065,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"../utils.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/store-remote.ts":{"bytes":1913,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/blockstore/store.ts","kind":"import-statement","original":"./store.js"},{"path":"../types.js","kind":"import-statement","external":true}],"format":"esm"},"src/blockstore/connection-base.ts":{"bytes":5382,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/types.ts","kind":"import-statement","original":"../types.js"},{"path":"./task-manager.js","kind":"import-statement","external":true},{"path":"./loader.js","kind":"import-statement","external":true},{"path":"src/blockstore/store-remote.ts","kind":"import-statement","original":"./store-remote.js"},{"path":"src/blockstore/store-factory.ts","kind":"import-statement","original":"./store-factory.js"},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"../runtime/key-bag.js"}],"format":"esm"},"src/blockstore/index.ts":{"bytes":718,"imports":[{"path":"src/blockstore/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/blockstore/store-factory.ts","kind":"import-statement","original":"./store-factory.js"},{"path":"src/blockstore/gateway.ts","kind":"import-statement","original":"./gateway.js"},{"path":"src/blockstore/fragment-gateway.ts","kind":"import-statement","original":"./fragment-gateway.js"},{"path":"./connection-base.js","kind":"import-statement","external":true},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./transaction.js"},{"path":"src/blockstore/loader.ts","kind":"import-statement","original":"./loader.js"},{"path":"src/blockstore/loader-helpers.ts","kind":"import-statement","original":"./loader-helpers.js"},{"path":"src/blockstore/connection-base.ts","kind":"import-statement","original":"./connection-base.js"},{"path":"src/blockstore/meta-key-helper.ts","kind":"import-statement","original":"./meta-key-helper.js"}],"format":"esm"},"src/crdt-helpers.ts":{"bytes":12364,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"./runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/link","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt/api","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt/batch","kind":"import-statement","external":true},{"path":"src/blockstore/index.ts","kind":"import-statement","original":"./blockstore/index.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"@web3-storage/pail/crdt/api","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/indexer-helpers.ts":{"bytes":7330,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"./runtime/wait-pr-multiformats/block.js"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"charwise","kind":"import-statement","external":true},{"path":"prolly-trees/db-index","kind":"import-statement","external":true},{"path":"prolly-trees/utils","kind":"import-statement","external":true},{"path":"prolly-trees/cache","kind":"import-statement","external":true},{"path":"prolly-trees/db-index","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"./crdt.js","kind":"import-statement","external":true}],"format":"esm"},"src/indexer.ts":{"bytes":10901,"imports":[{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"src/indexer-helpers.ts","kind":"import-statement","original":"./indexer-helpers.js"},{"path":"./crdt.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"@adviser/cement","kind":"import-statement","external":true}],"format":"esm"},"src/apply-head-queue.ts":{"bytes":2240,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types.js","kind":"import-statement","external":true}],"format":"esm"},"src/crdt-clock.ts":{"bytes":5315,"imports":[{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/crdt-helpers.ts","kind":"import-statement","original":"./crdt-helpers.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/apply-head-queue.ts","kind":"import-statement","original":"./apply-head-queue.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/crdt.ts":{"bytes":5805,"imports":[{"path":"multiformats","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"src/crdt-helpers.ts","kind":"import-statement","original":"./crdt-helpers.js"},{"path":"src/indexer.ts","kind":"import-statement","original":"./indexer.js"},{"path":"src/crdt-clock.ts","kind":"import-statement","original":"./crdt-clock.js"},{"path":"src/blockstore/transaction.ts","kind":"import-statement","original":"./blockstore/transaction.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/database.ts":{"bytes":8223,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/write-queue.ts","kind":"import-statement","original":"./write-queue.js"},{"path":"src/crdt.ts","kind":"import-statement","original":"./crdt.js"},{"path":"src/indexer.ts","kind":"import-statement","original":"./indexer.js"},{"path":"./blockstore/index.js","kind":"import-statement","external":true},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/runtime/wait-pr-multiformats/codec-interface.ts":{"bytes":665,"imports":[],"format":"esm"},"src/runtime/wait-pr-multiformats/index.ts":{"bytes":84,"imports":[{"path":"src/runtime/wait-pr-multiformats/block.ts","kind":"import-statement","original":"./block.js"},{"path":"src/runtime/wait-pr-multiformats/codec-interface.ts","kind":"import-statement","original":"./codec-interface.js"}],"format":"esm"},"src/runtime/gateways/file/version.ts":{"bytes":47,"imports":[],"format":"esm"},"src/runtime/index.ts":{"bytes":545,"imports":[{"path":"src/runtime/gateways/file/utils.ts","kind":"import-statement","original":"./gateways/file/utils.js"},{"path":"src/runtime/files.ts","kind":"import-statement","original":"./files.js"},{"path":"src/runtime/key-bag.ts","kind":"import-statement","original":"./key-bag.js"},{"path":"src/runtime/keyed-crypto.ts","kind":"import-statement","original":"./keyed-crypto.js"},{"path":"src/runtime/wait-pr-multiformats/index.ts","kind":"import-statement","original":"./wait-pr-multiformats/index.js"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/gateways/file/version.ts","kind":"import-statement","original":"./gateways/file/version.js"},{"path":"src/runtime/gateways/indexdb/version.ts","kind":"import-statement","original":"./gateways/indexdb/version.js"}],"format":"esm"},"src/version.ts":{"bytes":92,"imports":[],"format":"esm"},"src/index.ts":{"bytes":441,"imports":[{"path":"src/database.ts","kind":"import-statement","original":"./database.js"},{"path":"src/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/crdt.ts","kind":"import-statement","original":"./crdt.js"},{"path":"src/indexer.ts","kind":"import-statement","original":"./indexer.js"},{"path":"src/blockstore/index.ts","kind":"import-statement","original":"./blockstore/index.js"},{"path":"src/blockstore/index.ts","kind":"import-statement","original":"./blockstore/index.js"},{"path":"./blockstore","kind":"import-statement","external":true},{"path":"src/runtime/index.ts","kind":"import-statement","original":"./runtime/index.js"},{"path":"src/runtime/index.ts","kind":"import-statement","original":"./runtime/index.js"},{"path":"src/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/version.ts","kind":"import-statement","original":"./version.js"}],"format":"esm"}},"outputs":{"dist/fireproof-core/web/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":277410},"dist/fireproof-core/web/index.js":{"imports":[{"path":"dist/fireproof-core/web/chunk-S4HRSKEO.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/chunk-2DC5ZIR4.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/chunk-Q5W7UNMP.js","kind":"import-statement"},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/block","kind":"import-statement","external":true},{"path":"multiformats/link","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt/batch","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@ipld/unixfs","kind":"import-statement","external":true},{"path":"multiformats/codecs/raw","kind":"import-statement","external":true},{"path":"@ipld/unixfs/file/chunker/fixed","kind":"import-statement","external":true},{"path":"@ipld/unixfs/file/layout/balanced","kind":"import-statement","external":true},{"path":"ipfs-unixfs-exporter","kind":"import-statement","external":true},{"path":"@ipld/dag-json","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"p-limit","kind":"import-statement","external":true},{"path":"@ipld/car","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"@web3-storage/pail/block","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"dist/fireproof-core/web/key-bag-file-4SJQGORQ.js","kind":"dynamic-import"},{"path":"dist/fireproof-core/web/key-bag-indexdb-GSQOUUVQ.js","kind":"dynamic-import"},{"path":"@ipld/car/buffer-writer","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"cborg","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true},{"path":"cborg","kind":"import-statement","external":true},{"path":"@ipld/dag-json","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"multiformats","kind":"import-statement","external":true},{"path":"multiformats/bases/base64","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"p-retry","kind":"import-statement","external":true},{"path":"p-map","kind":"import-statement","external":true},{"path":"dist/fireproof-core/web/bundle-not-impl-UH74NK5L.js","kind":"dynamic-import"},{"path":"dist/fireproof-core/web/bundle-not-impl-UH74NK5L.js","kind":"dynamic-import"},{"path":"dist/fireproof-core/web/gateway@skip-esm-GI5PRACF.js","kind":"dynamic-import"},{"path":"dist/fireproof-core/web/gateway@skip-esm-GI5PRACF.js","kind":"dynamic-import"},{"path":"multiformats/hashes/sha2","kind":"import-statement","external":true},{"path":"@ipld/dag-cbor","kind":"import-statement","external":true},{"path":"charwise","kind":"import-statement","external":true},{"path":"prolly-trees/db-index","kind":"import-statement","external":true},{"path":"prolly-trees/utils","kind":"import-statement","external":true},{"path":"prolly-trees/cache","kind":"import-statement","external":true},{"path":"@web3-storage/pail/clock","kind":"import-statement","external":true},{"path":"@web3-storage/pail/crdt","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true}],"exports":["CRDT","Database","Index","NotFoundError","PACKAGE_VERSION","Result","UInt8ArrayEqual","blockstore","bs","dataDir","ensureLogger","ensureSuperLog","ensureSuperThis","exceptionWrapper","falsyToUndef","fireproof","getKey","getName","getStore","index","isFalsy","isNotFoundError","rt","runtime","throwFalsy"],"entryPoint":"src/index.ts","inputs":{"src/database.ts":{"bytesInOutput":5766},"src/write-queue.ts":{"bytesInOutput":1118},"src/crdt.ts":{"bytesInOutput":3855},"src/runtime/wait-pr-multiformats/block.ts":{"bytesInOutput":2121},"src/crdt-helpers.ts":{"bytesInOutput":8498},"src/blockstore/index.ts":{"bytesInOutput":787},"src/blockstore/types.ts":{"bytesInOutput":47},"src/blockstore/store-factory.ts":{"bytesInOutput":6682},"src/runtime/files.ts":{"bytesInOutput":2056},"src/blockstore/store.ts":{"bytesInOutput":14115},"src/types.ts":{"bytesInOutput":302},"src/blockstore/loader.ts":{"bytesInOutput":12236},"src/blockstore/loader-helpers.ts":{"bytesInOutput":532},"src/blockstore/transaction.ts":{"bytesInOutput":6414},"src/blockstore/commit-queue.ts":{"bytesInOutput":1227},"src/runtime/key-bag.ts":{"bytesInOutput":6037},"src/blockstore/commitor.ts":{"bytesInOutput":3494},"src/blockstore/task-manager.ts":{"bytesInOutput":1537},"src/runtime/keyed-crypto.ts":{"bytesInOutput":5437},"src/blockstore/fragment-gateway.ts":{"bytesInOutput":5081},"src/blockstore/meta-key-helper.ts":{"bytesInOutput":4177},"src/blockstore/store-remote.ts":{"bytesInOutput":332},"src/blockstore/connection-base.ts":{"bytesInOutput":3517},"src/indexer-helpers.ts":{"bytesInOutput":3826},"src/indexer.ts":{"bytesInOutput":7564},"src/crdt-clock.ts":{"bytesInOutput":3971},"src/apply-head-queue.ts":{"bytesInOutput":1260},"src/index.ts":{"bytesInOutput":0},"src/runtime/index.ts":{"bytesInOutput":506},"src/runtime/wait-pr-multiformats/index.ts":{"bytesInOutput":153},"src/runtime/wait-pr-multiformats/codec-interface.ts":{"bytesInOutput":34},"src/runtime/gateways/file/version.ts":{"bytesInOutput":38},"src/version.ts":{"bytesInOutput":72}},"bytes":114815},"dist/fireproof-core/web/bundle-not-impl-UH74NK5L.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":333},"dist/fireproof-core/web/bundle-not-impl-UH74NK5L.js":{"imports":[],"exports":[],"entryPoint":"src/bundle-not-impl.ts","inputs":{"src/bundle-not-impl.ts":{"bytesInOutput":88}},"bytes":114},"dist/fireproof-core/web/utils-EFZJNXH5.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"dist/fireproof-core/web/utils-EFZJNXH5.js":{"imports":[{"path":"dist/fireproof-core/web/chunk-S4HRSKEO.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/chunk-Q5W7UNMP.js","kind":"import-statement"}],"exports":["getFileName","getFileSystem","getPath","toArrayBuffer"],"entryPoint":"src/runtime/gateways/file/utils.ts","inputs":{},"bytes":199},"dist/fireproof-core/web/key-bag-file-4SJQGORQ.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3276},"dist/fireproof-core/web/key-bag-file-4SJQGORQ.js":{"imports":[{"path":"dist/fireproof-core/web/chunk-Q5W7UNMP.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/utils-EFZJNXH5.js","kind":"dynamic-import"}],"exports":["KeyBagProviderFile"],"entryPoint":"src/runtime/key-bag-file.ts","inputs":{"src/runtime/key-bag-file.ts":{"bytesInOutput":1315}},"bytes":1437},"dist/fireproof-core/web/key-bag-indexdb-GSQOUUVQ.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":2704},"dist/fireproof-core/web/key-bag-indexdb-GSQOUUVQ.js":{"imports":[{"path":"dist/fireproof-core/web/chunk-S4HRSKEO.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/chunk-Q5W7UNMP.js","kind":"import-statement"},{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true}],"exports":["KeyBagProviderIndexDB"],"entryPoint":"src/runtime/key-bag-indexdb.ts","inputs":{"src/runtime/key-bag-indexdb.ts":{"bytesInOutput":1047}},"bytes":1197},"dist/fireproof-core/web/chunk-S4HRSKEO.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":4089},"dist/fireproof-core/web/chunk-S4HRSKEO.js":{"imports":[{"path":"dist/fireproof-core/web/chunk-Q5W7UNMP.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/bundle-not-impl-UH74NK5L.js","kind":"dynamic-import"},{"path":"dist/fireproof-core/web/bundle-not-impl-UH74NK5L.js","kind":"dynamic-import"}],"exports":["getFileName","getFileSystem","getPath","toArrayBuffer"],"inputs":{"src/runtime/gateways/file/utils.ts":{"bytesInOutput":1828}},"bytes":1989},"dist/fireproof-core/web/gateway@skip-esm-GI5PRACF.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":12543},"dist/fireproof-core/web/gateway@skip-esm-GI5PRACF.js":{"imports":[{"path":"dist/fireproof-core/web/chunk-2DC5ZIR4.js","kind":"import-statement"},{"path":"dist/fireproof-core/web/chunk-Q5W7UNMP.js","kind":"import-statement"},{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true}],"exports":["IndexDBGateway","IndexDBTestStore","getIndexDBName"],"entryPoint":"src/runtime/gateways/indexdb/gateway@skip-esm.ts","inputs":{"src/runtime/gateways/indexdb/gateway@skip-esm.ts":{"bytesInOutput":5216}},"bytes":5506},"dist/fireproof-core/web/chunk-2DC5ZIR4.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":214},"dist/fireproof-core/web/chunk-2DC5ZIR4.js":{"imports":[],"exports":["INDEXDB_VERSION"],"inputs":{"src/runtime/gateways/indexdb/version.ts":{"bytesInOutput":39}},"bytes":113},"dist/fireproof-core/web/chunk-Q5W7UNMP.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":16426},"dist/fireproof-core/web/chunk-Q5W7UNMP.js":{"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true}],"exports":["NotFoundError","Result","UInt8ArrayEqual","__export","dataDir","ensureLogger","ensureSuperLog","ensureSuperThis","exceptionWrapper","getKey","getName","getStore","isNotFoundError"],"inputs":{"src/utils.ts":{"bytesInOutput":7220}},"bytes":7610}}}
|
1
|
+
{"inputs":{"src/runtime/gateways/indexdb/version.ts":{"bytes":48,"imports":[],"format":"esm"},"src/utils.ts":{"bytes":10025,"imports":[{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"./types","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true}],"format":"esm"},"src/runtime/gateways/indexdb/web/gateway-impl.ts":{"bytes":7591,"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"src/runtime/gateways/indexdb/version.ts","kind":"import-statement","original":"../version.js"},{"path":"src/utils.ts","kind":"import-statement","original":"../../../../utils.js"},{"path":"../../../../blockstore/gateway.js","kind":"import-statement","external":true},{"path":"../../../../types.js","kind":"import-statement","external":true}],"format":"esm"}},"outputs":{"dist/fireproof-core/web/gateway-impl.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":26112},"dist/fireproof-core/web/gateway-impl.js":{"imports":[{"path":"idb","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"@adviser/cement","kind":"import-statement","external":true},{"path":"multiformats/bases/base58","kind":"import-statement","external":true}],"exports":["IndexDBGatewayImpl","IndexDBTestStore","getIndexDBName"],"entryPoint":"src/runtime/gateways/indexdb/web/gateway-impl.ts","inputs":{"src/runtime/gateways/indexdb/web/gateway-impl.ts":{"bytesInOutput":5236},"src/runtime/gateways/indexdb/version.ts":{"bytesInOutput":39},"src/utils.ts":{"bytesInOutput":3833}},"bytes":9345}}}
|
package/chunk-LNFBDD6E.js
DELETED
@@ -1,75 +0,0 @@
|
|
1
|
-
import {
|
2
|
-
getStore
|
3
|
-
} from "./chunk-GZANCVTS.js";
|
4
|
-
|
5
|
-
// src/runtime/gateways/file/utils.ts
|
6
|
-
async function getFileSystem(url) {
|
7
|
-
const name = url.getParam("fs");
|
8
|
-
let fs;
|
9
|
-
switch (name) {
|
10
|
-
case "mem":
|
11
|
-
{
|
12
|
-
const { MemFileSystem } = await import("./mem-filesystem@skip-iife-CJI7IIKV.js");
|
13
|
-
fs = new MemFileSystem();
|
14
|
-
}
|
15
|
-
break;
|
16
|
-
// case 'deno': {
|
17
|
-
// const { DenoFileSystem } = await import("./deno-filesystem.js");
|
18
|
-
// fs = new DenoFileSystem();
|
19
|
-
// break;
|
20
|
-
// }
|
21
|
-
case "node": {
|
22
|
-
const { NodeFileSystem } = await import("./node-filesystem@skip-iife-O74VAABQ.js");
|
23
|
-
fs = new NodeFileSystem();
|
24
|
-
break;
|
25
|
-
}
|
26
|
-
case "sys":
|
27
|
-
default: {
|
28
|
-
return getFileSystem(url.build().setParam("fs", "node").URI());
|
29
|
-
}
|
30
|
-
}
|
31
|
-
return fs.start();
|
32
|
-
}
|
33
|
-
function getPath(url, sthis) {
|
34
|
-
const basePath = url.pathname;
|
35
|
-
const name = url.getParam("name");
|
36
|
-
if (name) {
|
37
|
-
const version = url.getParam("version");
|
38
|
-
if (!version) throw sthis.logger.Error().Url(url).Msg(`version not found`).AsError();
|
39
|
-
return sthis.pathOps.join(basePath, version, name);
|
40
|
-
}
|
41
|
-
return sthis.pathOps.join(basePath);
|
42
|
-
}
|
43
|
-
function getFileName(url, sthis) {
|
44
|
-
const key = url.getParam("key");
|
45
|
-
if (!key) throw sthis.logger.Error().Url(url).Msg(`key not found`).AsError();
|
46
|
-
const res = getStore(url, sthis, (...a) => a.join("-"));
|
47
|
-
switch (res.store) {
|
48
|
-
case "data":
|
49
|
-
return sthis.pathOps.join(res.name, key + ".car");
|
50
|
-
case "wal":
|
51
|
-
case "meta":
|
52
|
-
return sthis.pathOps.join(res.name, key + ".json");
|
53
|
-
default:
|
54
|
-
throw sthis.logger.Error().Url(url).Msg(`unsupported store type`).AsError();
|
55
|
-
}
|
56
|
-
}
|
57
|
-
function toArrayBuffer(buffer) {
|
58
|
-
if (typeof buffer === "string") {
|
59
|
-
buffer = Buffer.from(buffer);
|
60
|
-
}
|
61
|
-
const ab = new ArrayBuffer(buffer.length);
|
62
|
-
const view = new Uint8Array(ab);
|
63
|
-
for (let i = 0; i < buffer.length; ++i) {
|
64
|
-
view[i] = buffer[i];
|
65
|
-
}
|
66
|
-
return view;
|
67
|
-
}
|
68
|
-
|
69
|
-
export {
|
70
|
-
getFileSystem,
|
71
|
-
getPath,
|
72
|
-
getFileName,
|
73
|
-
toArrayBuffer
|
74
|
-
};
|
75
|
-
//# sourceMappingURL=chunk-LNFBDD6E.js.map
|