@party-stack/runtime 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/coordinator/createPersistedCollectionCoordinator.d.ts +4 -2
- package/lib/coordinator/createPersistedCollectionCoordinator.d.ts.map +1 -1
- package/lib/coordinator/createPersistedCollectionCoordinator.js +506 -555
- package/lib/coordinator/createPersistedCollectionCoordinator.js.map +1 -1
- package/lib/coordinator/index.d.ts +2 -2
- package/lib/coordinator/index.js +0 -1
- package/lib/effection/index.d.ts +4 -2
- package/lib/effection/index.d.ts.map +1 -1
- package/lib/effection/index.js +25 -25
- package/lib/effection/index.js.map +1 -1
- package/lib/index.d.ts +11 -11
- package/lib/index.js +10 -9
- package/lib/memory/MemoryBlobBytesStore.d.ts +8 -6
- package/lib/memory/MemoryBlobBytesStore.d.ts.map +1 -1
- package/lib/memory/MemoryBlobBytesStore.js +22 -20
- package/lib/memory/MemoryBlobBytesStore.js.map +1 -1
- package/lib/types.d.ts +31 -29
- package/lib/types.d.ts.map +1 -1
- package/lib/types.js +0 -1
- package/lib/utils/BrowserAuthenticationCancelledError.d.ts +3 -1
- package/lib/utils/BrowserAuthenticationCancelledError.d.ts.map +1 -1
- package/lib/utils/BrowserAuthenticationCancelledError.js +10 -6
- package/lib/utils/BrowserAuthenticationCancelledError.js.map +1 -1
- package/lib/utils/createCollectionPersistence.d.ts +4 -2
- package/lib/utils/createCollectionPersistence.d.ts.map +1 -1
- package/lib/utils/createCollectionPersistence.js +20 -16
- package/lib/utils/createCollectionPersistence.js.map +1 -1
- package/lib/utils/createDefaultRuntime.d.ts +4 -1
- package/lib/utils/createDefaultRuntime.d.ts.map +1 -1
- package/lib/utils/createDefaultRuntime.js +15 -11
- package/lib/utils/createDefaultRuntime.js.map +1 -1
- package/lib/utils/createLocalCollection.d.ts +8 -6
- package/lib/utils/createLocalCollection.d.ts.map +1 -1
- package/lib/utils/createLocalCollection.js +19 -15
- package/lib/utils/createLocalCollection.js.map +1 -1
- package/lib/utils/defineRuntime.d.ts +3 -1
- package/lib/utils/defineRuntime.d.ts.map +1 -1
- package/lib/utils/defineRuntime.js +26 -30
- package/lib/utils/defineRuntime.js.map +1 -1
- package/package.json +12 -18
- package/lib/coordinator/index.d.ts.map +0 -1
- package/lib/coordinator/index.js.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/memory/MemoryBlobBytesStore.test.d.ts +0 -2
- package/lib/memory/MemoryBlobBytesStore.test.d.ts.map +0 -1
- package/lib/memory/MemoryBlobBytesStore.test.js +0 -12
- package/lib/memory/MemoryBlobBytesStore.test.js.map +0 -1
- package/lib/types.js.map +0 -1
- package/lib/utils/createLocalCollection.test.d.ts +0 -2
- package/lib/utils/createLocalCollection.test.d.ts.map +0 -1
- package/lib/utils/createLocalCollection.test.js +0 -748
- package/lib/utils/createLocalCollection.test.js.map +0 -1
- package/lib/utils/defineRuntime.test.d.ts +0 -2
- package/lib/utils/defineRuntime.test.d.ts.map +0 -1
- package/lib/utils/defineRuntime.test.js +0 -40
- package/lib/utils/defineRuntime.test.js.map +0 -1
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { RuntimeAdapter } from "../types.js";
|
|
2
|
+
//#region src/utils/createDefaultRuntime.d.ts
|
|
3
|
+
export declare const createDefaultRuntime: (owner: string, namespace: string) => RuntimeAdapter;
|
|
4
|
+
//#endregion
|
|
2
5
|
//# sourceMappingURL=createDefaultRuntime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDefaultRuntime.d.ts","
|
|
1
|
+
{"version":3,"file":"createDefaultRuntime.d.ts","names":["_$___types_js0.RuntimeAdapter"],"sources":["../../src/utils/createDefaultRuntime.ts"],"mappings":";;qBAIa,uBAAoB,eAAA,sBAApBA"}
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
-
import { SingleProcessCoordination } from "@party-stack/coordination";
|
|
2
1
|
import { MemoryBlobBytesStore } from "../memory/MemoryBlobBytesStore.js";
|
|
3
2
|
import { defineRuntime } from "./defineRuntime.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
3
|
+
import { SingleProcessCoordination } from "@party-stack/coordination";
|
|
4
|
+
//#region src/utils/createDefaultRuntime.ts
|
|
5
|
+
const createDefaultRuntime = defineRuntime((owner, namespace) => {
|
|
6
|
+
const scope = `party-stack:${owner}:${namespace}`;
|
|
7
|
+
const coordination = new SingleProcessCoordination({ scope });
|
|
8
|
+
return {
|
|
9
|
+
owner,
|
|
10
|
+
namespace,
|
|
11
|
+
blobBytes: new MemoryBlobBytesStore(),
|
|
12
|
+
coordination,
|
|
13
|
+
cleanup: () => coordination.close()
|
|
14
|
+
};
|
|
14
15
|
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { createDefaultRuntime };
|
|
18
|
+
|
|
15
19
|
//# sourceMappingURL=createDefaultRuntime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createDefaultRuntime.js","
|
|
1
|
+
{"version":3,"file":"createDefaultRuntime.js","names":[],"sources":["../../src/utils/createDefaultRuntime.ts"],"sourcesContent":["import { SingleProcessCoordination } from \"@party-stack/coordination\";\nimport { MemoryBlobBytesStore } from \"../memory/MemoryBlobBytesStore.js\";\nimport { defineRuntime } from \"./defineRuntime.js\";\n\nexport const createDefaultRuntime = defineRuntime((owner, namespace) => {\n const scope = `party-stack:${owner}:${namespace}`;\n const coordination = new SingleProcessCoordination({ scope });\n return {\n owner,\n namespace,\n blobBytes: new MemoryBlobBytesStore(),\n coordination,\n cleanup: () => coordination.close(),\n };\n});\n"],"mappings":";;;;AAIA,MAAa,uBAAuB,eAAe,OAAO,cAAc;CACpE,MAAM,QAAQ,eAAe,MAAM,GAAG;CACtC,MAAM,eAAe,IAAI,0BAA0B,EAAE,MAAM,CAAC;CAC5D,OAAO;EACH;EACA;EACA,WAAW,IAAI,qBAAqB;EACpC;EACA,eAAe,aAAa,MAAM;CACtC;AACJ,CAAC"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { RuntimeAdapter } from "../types.js";
|
|
2
|
+
import { Collection } from "@tanstack/db";
|
|
3
|
+
//#region src/utils/createLocalCollection.d.ts
|
|
3
4
|
export declare function createLocalCollection<T extends object, TKey extends string | number>(options: {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
name: string;
|
|
6
|
+
getKey: (value: T) => TKey;
|
|
7
|
+
runtime: RuntimeAdapter;
|
|
8
|
+
schemaVersion?: number;
|
|
8
9
|
}): Collection<T, TKey>;
|
|
10
|
+
//#endregion
|
|
9
11
|
//# sourceMappingURL=createLocalCollection.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLocalCollection.d.ts","
|
|
1
|
+
{"version":3,"file":"createLocalCollection.d.ts","names":[],"sources":["../../src/utils/createLocalCollection.ts"],"mappings":";;;wBAKgB,sBAAsB,kBAAkB,8BAA8B;EAClF;EACA,SAAS,OAAO,MAAM;EACtB,SAAS;EACT;IACA,WAAW,GAAG"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import { createCollection, localOnlyCollectionOptions } from "@tanstack/db";
|
|
2
|
-
import { persistedCollectionOptions } from "@tanstack/db-sqlite-persistence-core";
|
|
3
1
|
import { createCollectionPersistence } from "./createCollectionPersistence.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
2
|
+
import { persistedCollectionOptions } from "@tanstack/db-sqlite-persistence-core";
|
|
3
|
+
import { BasicIndex, createCollection, localOnlyCollectionOptions } from "@tanstack/db";
|
|
4
|
+
//#region src/utils/createLocalCollection.ts
|
|
5
|
+
function createLocalCollection(options) {
|
|
6
|
+
const collectionOptions = {
|
|
7
|
+
id: `party-stack:${options.runtime.owner}:${options.runtime.namespace}:${options.name}`,
|
|
8
|
+
getKey: options.getKey,
|
|
9
|
+
defaultIndexType: BasicIndex,
|
|
10
|
+
autoIndex: "eager"
|
|
11
|
+
};
|
|
12
|
+
const persistence = options.runtime.persistence;
|
|
13
|
+
return createCollection(persistence ? persistedCollectionOptions({
|
|
14
|
+
...collectionOptions,
|
|
15
|
+
schemaVersion: options.schemaVersion,
|
|
16
|
+
persistence: createCollectionPersistence(options.runtime.coordination, persistence)
|
|
17
|
+
}) : localOnlyCollectionOptions(collectionOptions));
|
|
17
18
|
}
|
|
19
|
+
//#endregion
|
|
20
|
+
export { createLocalCollection };
|
|
21
|
+
|
|
18
22
|
//# sourceMappingURL=createLocalCollection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createLocalCollection.js","
|
|
1
|
+
{"version":3,"file":"createLocalCollection.js","names":[],"sources":["../../src/utils/createLocalCollection.ts"],"sourcesContent":["import { BasicIndex, createCollection, localOnlyCollectionOptions, type Collection } from \"@tanstack/db\";\nimport { persistedCollectionOptions } from \"@tanstack/db-sqlite-persistence-core\";\nimport { createCollectionPersistence } from \"./createCollectionPersistence.js\";\nimport type { RuntimeAdapter } from \"../types.js\";\n\nexport function createLocalCollection<T extends object, TKey extends string | number>(options: {\n name: string;\n getKey: (value: T) => TKey;\n runtime: RuntimeAdapter;\n schemaVersion?: number;\n}): Collection<T, TKey> {\n const collectionOptions = {\n id: `party-stack:${options.runtime.owner}:${options.runtime.namespace}:${options.name}`,\n getKey: options.getKey,\n defaultIndexType: BasicIndex,\n autoIndex: \"eager\" as const,\n };\n const persistence = options.runtime.persistence;\n\n return createCollection(\n persistence\n ? persistedCollectionOptions<T, TKey>({\n ...collectionOptions,\n schemaVersion: options.schemaVersion,\n persistence: createCollectionPersistence(options.runtime.coordination, persistence),\n })\n : localOnlyCollectionOptions<T, TKey>(collectionOptions)\n );\n}\n"],"mappings":";;;;AAKA,SAAgB,sBAAsE,SAK9D;CACpB,MAAM,oBAAoB;EACtB,IAAI,eAAe,QAAQ,QAAQ,MAAM,GAAG,QAAQ,QAAQ,UAAU,GAAG,QAAQ;EACjF,QAAQ,QAAQ;EAChB,kBAAkB;EAClB,WAAW;CACf;CACA,MAAM,cAAc,QAAQ,QAAQ;CAEpC,OAAO,iBACH,cACM,2BAAoC;EAChC,GAAG;EACH,eAAe,QAAQ;EACvB,aAAa,4BAA4B,QAAQ,QAAQ,cAAc,WAAW;CACtF,CAAC,IACD,2BAAoC,iBAAiB,CAC/D;AACJ"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { RuntimeAdapter } from "../types.js";
|
|
2
|
+
//#region src/utils/defineRuntime.d.ts
|
|
2
3
|
type SyncRuntimeAdapterProvider = (owner: string, namespace: string) => RuntimeAdapter;
|
|
3
4
|
type AsyncRuntimeAdapterProvider = (owner: string, namespace: string) => Promise<RuntimeAdapter>;
|
|
4
5
|
export declare function defineRuntime(provider: SyncRuntimeAdapterProvider): SyncRuntimeAdapterProvider;
|
|
5
6
|
export declare function defineRuntime(provider: AsyncRuntimeAdapterProvider): AsyncRuntimeAdapterProvider;
|
|
7
|
+
//#endregion
|
|
6
8
|
export {};
|
|
7
9
|
//# sourceMappingURL=defineRuntime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineRuntime.d.ts","
|
|
1
|
+
{"version":3,"file":"defineRuntime.d.ts","names":[],"sources":["../../src/utils/defineRuntime.ts"],"mappings":";;KAEK,8BAA8B,eAAe,sBAAsB;KAEnE,+BAA+B,eAAe,sBAAsB,QAAQ;wBA8BjE,cAAc,UAAU,6BAA6B;wBACrD,cAAc,UAAU,8BAA8B"}
|
|
@@ -1,34 +1,30 @@
|
|
|
1
|
+
//#region src/utils/defineRuntime.ts
|
|
1
2
|
function manageRuntime(runtime) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
: undefined;
|
|
20
|
-
return {
|
|
21
|
-
...runtime,
|
|
22
|
-
cleanup,
|
|
23
|
-
destroy,
|
|
24
|
-
};
|
|
3
|
+
const rawCleanup = runtime.cleanup?.bind(runtime);
|
|
4
|
+
const rawDestroy = runtime.destroy?.bind(runtime);
|
|
5
|
+
let cleanupPromise;
|
|
6
|
+
let destroyPromise;
|
|
7
|
+
const cleanup = () => {
|
|
8
|
+
cleanupPromise ??= Promise.resolve().then(() => rawCleanup?.()).then(() => void 0);
|
|
9
|
+
return cleanupPromise;
|
|
10
|
+
};
|
|
11
|
+
const destroy = rawDestroy ? () => {
|
|
12
|
+
destroyPromise ??= cleanup().then(() => rawDestroy()).then(() => void 0);
|
|
13
|
+
return destroyPromise;
|
|
14
|
+
} : void 0;
|
|
15
|
+
return {
|
|
16
|
+
...runtime,
|
|
17
|
+
cleanup,
|
|
18
|
+
destroy
|
|
19
|
+
};
|
|
25
20
|
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
: manageRuntime(runtime);
|
|
32
|
-
};
|
|
21
|
+
function defineRuntime(provider) {
|
|
22
|
+
return (owner, namespace) => {
|
|
23
|
+
const runtime = provider(owner, namespace);
|
|
24
|
+
return runtime instanceof Promise ? runtime.then(manageRuntime) : manageRuntime(runtime);
|
|
25
|
+
};
|
|
33
26
|
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { defineRuntime };
|
|
29
|
+
|
|
34
30
|
//# sourceMappingURL=defineRuntime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defineRuntime.js","
|
|
1
|
+
{"version":3,"file":"defineRuntime.js","names":[],"sources":["../../src/utils/defineRuntime.ts"],"sourcesContent":["import type { RuntimeAdapter, RuntimeAdapterProvider } from \"../types.js\";\n\ntype SyncRuntimeAdapterProvider = (owner: string, namespace: string) => RuntimeAdapter;\n\ntype AsyncRuntimeAdapterProvider = (owner: string, namespace: string) => Promise<RuntimeAdapter>;\n\nfunction manageRuntime(runtime: RuntimeAdapter): RuntimeAdapter {\n const rawCleanup = runtime.cleanup?.bind(runtime);\n const rawDestroy = runtime.destroy?.bind(runtime);\n let cleanupPromise: Promise<void> | undefined;\n let destroyPromise: Promise<void> | undefined;\n\n const cleanup = (): Promise<void> => {\n cleanupPromise ??= Promise.resolve()\n .then(() => rawCleanup?.())\n .then(() => undefined);\n return cleanupPromise;\n };\n const destroy = rawDestroy\n ? (): Promise<void> => {\n destroyPromise ??= cleanup()\n .then(() => rawDestroy())\n .then(() => undefined);\n return destroyPromise;\n }\n : undefined;\n\n return {\n ...runtime,\n cleanup,\n destroy,\n };\n}\n\nexport function defineRuntime(provider: SyncRuntimeAdapterProvider): SyncRuntimeAdapterProvider;\nexport function defineRuntime(provider: AsyncRuntimeAdapterProvider): AsyncRuntimeAdapterProvider;\nexport function defineRuntime(provider: RuntimeAdapterProvider): RuntimeAdapterProvider {\n return (owner, namespace) => {\n const runtime = provider(owner, namespace);\n return runtime instanceof Promise ? runtime.then(manageRuntime) : manageRuntime(runtime);\n };\n}\n"],"mappings":";AAMA,SAAS,cAAc,SAAyC;CAC5D,MAAM,aAAa,QAAQ,SAAS,KAAK,OAAO;CAChD,MAAM,aAAa,QAAQ,SAAS,KAAK,OAAO;CAChD,IAAI;CACJ,IAAI;CAEJ,MAAM,gBAA+B;EACjC,mBAAmB,QAAQ,QAAQ,CAAC,CAC/B,WAAW,aAAa,CAAC,CAAC,CAC1B,WAAW,KAAA,CAAS;EACzB,OAAO;CACX;CACA,MAAM,UAAU,mBACW;EACjB,mBAAmB,QAAQ,CAAC,CACvB,WAAW,WAAW,CAAC,CAAC,CACxB,WAAW,KAAA,CAAS;EACzB,OAAO;CACX,IACA,KAAA;CAEN,OAAO;EACH,GAAG;EACH;EACA;CACJ;AACJ;AAIA,SAAgB,cAAc,UAA0D;CACpF,QAAQ,OAAO,cAAc;EACzB,MAAM,UAAU,SAAS,OAAO,SAAS;EACzC,OAAO,mBAAmB,UAAU,QAAQ,KAAK,aAAa,IAAI,cAAc,OAAO;CAC3F;AACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@party-stack/runtime",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
|
+
"files": [
|
|
5
|
+
"lib"
|
|
6
|
+
],
|
|
4
7
|
"type": "module",
|
|
5
8
|
"exports": {
|
|
6
9
|
".": {
|
|
@@ -12,28 +15,19 @@
|
|
|
12
15
|
"default": "./lib/effection/index.js"
|
|
13
16
|
}
|
|
14
17
|
},
|
|
15
|
-
"files": [
|
|
16
|
-
"lib"
|
|
17
|
-
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"effection": "^4.0.2",
|
|
20
|
-
"@party-stack/coordination": "0.3.
|
|
20
|
+
"@party-stack/coordination": "0.3.1"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@
|
|
24
|
-
"@tanstack/db": "0.
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"vitest": "^3.1.1"
|
|
23
|
+
"@tanstack/db": "0.14.0",
|
|
24
|
+
"@tanstack/db-sqlite-persistence-core": "0.4.9",
|
|
25
|
+
"typescript": "~7.0.2",
|
|
26
|
+
"vite-plus": "1.2.0",
|
|
27
|
+
"@party-stack/build-config": "0.1.3"
|
|
29
28
|
},
|
|
30
29
|
"peerDependencies": {
|
|
31
|
-
"@tanstack/db": "0.
|
|
32
|
-
"@tanstack/db-sqlite-persistence-core": "0.4.
|
|
33
|
-
},
|
|
34
|
-
"scripts": {
|
|
35
|
-
"build": "tsc",
|
|
36
|
-
"lint": "eslint",
|
|
37
|
-
"test": "vitest run"
|
|
30
|
+
"@tanstack/db": "0.14.0",
|
|
31
|
+
"@tanstack/db-sqlite-persistence-core": "0.4.9"
|
|
38
32
|
}
|
|
39
33
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/coordinator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,2CAA2C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/coordinator/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,2CAA2C,CAAC"}
|
package/lib/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,mCAAmC,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,GACrB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EACR,cAAc,EACd,qBAAqB,EACrB,iCAAiC,EACjC,4BAA4B,EAC5B,WAAW,EACX,mBAAmB,EACnB,kBAAkB,EAClB,cAAc,EACd,sBAAsB,GACzB,MAAM,YAAY,CAAC;AACpB,YAAY,EACR,YAAY,EACZ,uBAAuB,EACvB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,EACnB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,gCAAgC,GACnC,MAAM,2BAA2B,CAAC"}
|
package/lib/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oCAAoC,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AACzD,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AACrF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,EAAE,mCAAmC,EAAE,MAAM,gDAAgD,CAAC;AACrG,OAAO,EACH,uBAAuB,EACvB,iBAAiB,EACjB,yBAAyB,EACzB,wBAAwB,EACxB,6BAA6B,EAC7B,0BAA0B,EAC1B,yBAAyB,EACzB,yBAAyB,EACzB,kBAAkB,GACrB,MAAM,2BAA2B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryBlobBytesStore.test.d.ts","sourceRoot":"","sources":["../../src/memory/MemoryBlobBytesStore.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { MemoryBlobBytesStore } from "./MemoryBlobBytesStore.js";
|
|
3
|
-
describe("MemoryBlobBytesStore", () => {
|
|
4
|
-
it("stores, reads, and deletes blobs", async () => {
|
|
5
|
-
const store = new MemoryBlobBytesStore();
|
|
6
|
-
await store.write("folder/blob", new Blob(["hello"]));
|
|
7
|
-
expect(await (await store.read("folder/blob")).text()).toBe("hello");
|
|
8
|
-
await store.delete("folder/blob");
|
|
9
|
-
await expect(store.read("folder/blob")).rejects.toThrow('Blob bytes not found for "folder/blob".');
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
//# sourceMappingURL=MemoryBlobBytesStore.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MemoryBlobBytesStore.test.js","sourceRoot":"","sources":["../../src/memory/MemoryBlobBytesStore.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEjE,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IAClC,EAAE,CAAC,kCAAkC,EAAE,KAAK,IAAI,EAAE;QAC9C,MAAM,KAAK,GAAG,IAAI,oBAAoB,EAAE,CAAC;QACzC,MAAM,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;QAEtD,MAAM,CAAC,MAAM,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAErE,MAAM,KAAK,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;QAClC,MAAM,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CACnD,yCAAyC,CAC5C,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
package/lib/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createLocalCollection.test.d.ts","sourceRoot":"","sources":["../../src/utils/createLocalCollection.test.ts"],"names":[],"mappings":""}
|