@langchain/langgraph-checkpoint 0.1.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/base.cjs +74 -88
- package/dist/base.cjs.map +1 -0
- package/dist/base.d.cts +95 -0
- package/dist/base.d.cts.map +1 -0
- package/dist/base.d.ts +79 -73
- package/dist/base.d.ts.map +1 -0
- package/dist/base.js +69 -80
- package/dist/base.js.map +1 -1
- package/dist/cache/base.cjs +17 -21
- package/dist/cache/base.cjs.map +1 -0
- package/dist/cache/base.d.cts +43 -0
- package/dist/cache/base.d.cts.map +1 -0
- package/dist/cache/base.d.ts +41 -36
- package/dist/cache/base.d.ts.map +1 -0
- package/dist/cache/base.js +16 -16
- package/dist/cache/base.js.map +1 -1
- package/dist/cache/index.cjs +2 -19
- package/dist/cache/index.js +4 -3
- package/dist/cache/memory.cjs +53 -58
- package/dist/cache/memory.cjs.map +1 -0
- package/dist/cache/memory.d.cts +19 -0
- package/dist/cache/memory.d.cts.map +1 -0
- package/dist/cache/memory.d.ts +18 -13
- package/dist/cache/memory.d.ts.map +1 -0
- package/dist/cache/memory.js +52 -53
- package/dist/cache/memory.js.map +1 -1
- package/dist/id.cjs +12 -16
- package/dist/id.cjs.map +1 -0
- package/dist/id.d.cts +10 -0
- package/dist/id.d.cts.map +1 -0
- package/dist/id.d.ts +10 -2
- package/dist/id.d.ts.map +1 -0
- package/dist/id.js +10 -12
- package/dist/id.js.map +1 -1
- package/dist/index.cjs +36 -27
- package/dist/index.d.cts +12 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +12 -9
- package/dist/memory.cjs +194 -268
- package/dist/memory.cjs.map +1 -0
- package/dist/memory.d.cts +22 -0
- package/dist/memory.d.cts.map +1 -0
- package/dist/memory.d.ts +19 -12
- package/dist/memory.d.ts.map +1 -0
- package/dist/memory.js +193 -263
- package/dist/memory.js.map +1 -1
- package/dist/serde/base.d.cts +10 -0
- package/dist/serde/base.d.cts.map +1 -0
- package/dist/serde/base.d.ts +9 -3
- package/dist/serde/base.d.ts.map +1 -0
- package/dist/serde/jsonplus.cjs +92 -141
- package/dist/serde/jsonplus.cjs.map +1 -0
- package/dist/serde/jsonplus.js +90 -136
- package/dist/serde/jsonplus.js.map +1 -1
- package/dist/serde/types.cjs +15 -9
- package/dist/serde/types.cjs.map +1 -0
- package/dist/serde/types.d.cts +55 -0
- package/dist/serde/types.d.cts.map +1 -0
- package/dist/serde/types.d.ts +53 -47
- package/dist/serde/types.d.ts.map +1 -0
- package/dist/serde/types.js +9 -5
- package/dist/serde/types.js.map +1 -1
- package/dist/serde/utils/fast-safe-stringify/index.cjs +88 -208
- package/dist/serde/utils/fast-safe-stringify/index.cjs.map +1 -0
- package/dist/serde/utils/fast-safe-stringify/index.js +87 -205
- package/dist/serde/utils/fast-safe-stringify/index.js.map +1 -1
- package/dist/store/base.cjs +200 -209
- package/dist/store/base.cjs.map +1 -0
- package/dist/store/base.d.cts +392 -0
- package/dist/store/base.d.cts.map +1 -0
- package/dist/store/base.d.ts +336 -332
- package/dist/store/base.d.ts.map +1 -0
- package/dist/store/base.js +198 -204
- package/dist/store/base.js.map +1 -1
- package/dist/store/batch.cjs +116 -147
- package/dist/store/batch.cjs.map +1 -0
- package/dist/store/batch.d.cts +49 -0
- package/dist/store/batch.d.cts.map +1 -0
- package/dist/store/batch.d.ts +48 -40
- package/dist/store/batch.d.ts.map +1 -0
- package/dist/store/batch.js +116 -143
- package/dist/store/batch.js.map +1 -1
- package/dist/store/memory.cjs +262 -363
- package/dist/store/memory.cjs.map +1 -0
- package/dist/store/memory.d.cts +64 -0
- package/dist/store/memory.d.cts.map +1 -0
- package/dist/store/memory.d.ts +30 -24
- package/dist/store/memory.d.ts.map +1 -0
- package/dist/store/memory.js +261 -358
- package/dist/store/memory.js.map +1 -1
- package/dist/store/utils.cjs +141 -249
- package/dist/store/utils.cjs.map +1 -0
- package/dist/store/utils.js +140 -245
- package/dist/store/utils.js.map +1 -1
- package/dist/types.d.cts +35 -0
- package/dist/types.d.cts.map +1 -0
- package/dist/types.d.ts +29 -28
- package/dist/types.d.ts.map +1 -0
- package/package.json +16 -18
- package/dist/cache/index.d.ts +0 -2
- package/dist/cache/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/serde/base.cjs +0 -3
- package/dist/serde/base.js +0 -2
- package/dist/serde/base.js.map +0 -1
- package/dist/serde/jsonplus.d.ts +0 -7
- package/dist/serde/utils/fast-safe-stringify/index.d.ts +0 -1
- package/dist/store/index.cjs +0 -20
- package/dist/store/index.d.ts +0 -3
- package/dist/store/index.js +0 -4
- package/dist/store/index.js.map +0 -1
- package/dist/store/utils.d.ts +0 -26
- package/dist/types.cjs +0 -3
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/index.cjs +0 -1
- package/index.d.cts +0 -1
- package/index.d.ts +0 -1
- package/index.js +0 -1
package/dist/cache/memory.d.ts
CHANGED
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { BaseCache,
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { BaseCache, CacheFullKey, CacheNamespace } from "./base.js";
|
|
2
|
+
|
|
3
|
+
//#region src/cache/memory.d.ts
|
|
4
|
+
declare class InMemoryCache<V = unknown> extends BaseCache<V> {
|
|
5
|
+
private cache;
|
|
6
|
+
get(keys: CacheFullKey[]): Promise<{
|
|
7
|
+
key: CacheFullKey;
|
|
8
|
+
value: V;
|
|
9
|
+
}[]>;
|
|
10
|
+
set(pairs: {
|
|
11
|
+
key: CacheFullKey;
|
|
12
|
+
value: V;
|
|
13
|
+
ttl?: number;
|
|
14
|
+
}[]): Promise<void>;
|
|
15
|
+
clear(namespaces: CacheNamespace[]): Promise<void>;
|
|
14
16
|
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { InMemoryCache };
|
|
19
|
+
//# sourceMappingURL=memory.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"memory.d.ts","names":["BaseCache","CacheFullKey","CacheNamespace","InMemoryCache","V","Promise"],"sources":["../../src/cache/memory.d.ts"],"sourcesContent":["import { BaseCache, type CacheFullKey, type CacheNamespace } from \"./base.js\";\nexport declare class InMemoryCache<V = unknown> extends BaseCache<V> {\n private cache;\n get(keys: CacheFullKey[]): Promise<{\n key: CacheFullKey;\n value: V;\n }[]>;\n set(pairs: {\n key: CacheFullKey;\n value: V;\n ttl?: number;\n }[]): Promise<void>;\n clear(namespaces: CacheNamespace[]): Promise<void>;\n}\n"],"mappings":";;;cACqBG,mCAAmCH,UAAUI;;EAA7CD,GAAAA,CAAAA,IAAAA,EAEPF,YAFoB,EAAA,CAAA,EAEHI,OAFG,CAAA;IAAA,GAAA,EAGrBJ,YAHqB;IAAgCG,KAAAA,EAInDA,CAJmDA;KAEpDH,CAAAA;KACDA,CAAAA,KAAAA,EAAAA;IACEG,GAAAA,EAGFH,YAHEG;IAFgBC,KAAAA,EAMhBD,CANgBC;IAKlBJ,GAAAA,CAAAA,EAAAA,MAAAA;KACEG,CAAAA,EAELC,OAFKD,CAAAA,IAAAA,CAAAA;OAELC,CAAAA,UAAAA,EACYH,cADZG,EAAAA,CAAAA,EAC+BA,OAD/BA,CAAAA,IAAAA,CAAAA"}
|
package/dist/cache/memory.js
CHANGED
|
@@ -1,55 +1,54 @@
|
|
|
1
1
|
import { BaseCache } from "./base.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
2
|
+
|
|
3
|
+
//#region src/cache/memory.ts
|
|
4
|
+
var InMemoryCache = class extends BaseCache {
|
|
5
|
+
cache = {};
|
|
6
|
+
async get(keys) {
|
|
7
|
+
if (!keys.length) return [];
|
|
8
|
+
const now = Date.now();
|
|
9
|
+
return (await Promise.all(keys.map(async (fullKey) => {
|
|
10
|
+
const [namespace, key] = fullKey;
|
|
11
|
+
const strNamespace = namespace.join(",");
|
|
12
|
+
if (strNamespace in this.cache && key in this.cache[strNamespace]) {
|
|
13
|
+
const cached = this.cache[strNamespace][key];
|
|
14
|
+
if (cached.exp == null || now < cached.exp) {
|
|
15
|
+
const value = await this.serde.loadsTyped(cached.enc, cached.val);
|
|
16
|
+
return [{
|
|
17
|
+
key: fullKey,
|
|
18
|
+
value
|
|
19
|
+
}];
|
|
20
|
+
} else delete this.cache[strNamespace][key];
|
|
21
|
+
}
|
|
22
|
+
return [];
|
|
23
|
+
}))).flat();
|
|
24
|
+
}
|
|
25
|
+
async set(pairs) {
|
|
26
|
+
const now = Date.now();
|
|
27
|
+
for (const { key: fullKey, value, ttl } of pairs) {
|
|
28
|
+
const [namespace, key] = fullKey;
|
|
29
|
+
const strNamespace = namespace.join(",");
|
|
30
|
+
const [enc, val] = await this.serde.dumpsTyped(value);
|
|
31
|
+
const exp = ttl != null ? ttl * 1e3 + now : null;
|
|
32
|
+
this.cache[strNamespace] ??= {};
|
|
33
|
+
this.cache[strNamespace][key] = {
|
|
34
|
+
enc,
|
|
35
|
+
val,
|
|
36
|
+
exp
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async clear(namespaces) {
|
|
41
|
+
if (!namespaces.length) {
|
|
42
|
+
this.cache = {};
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
for (const namespace of namespaces) {
|
|
46
|
+
const strNamespace = namespace.join(",");
|
|
47
|
+
if (strNamespace in this.cache) delete this.cache[strNamespace];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
//#endregion
|
|
53
|
+
export { InMemoryCache };
|
|
55
54
|
//# sourceMappingURL=memory.js.map
|
package/dist/cache/memory.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.js","
|
|
1
|
+
{"version":3,"file":"memory.js","names":[],"sources":["../../src/cache/memory.ts"],"sourcesContent":["import { BaseCache, type CacheFullKey, type CacheNamespace } from \"./base.js\";\n\nexport class InMemoryCache<V = unknown> extends BaseCache<V> {\n private cache: {\n [namespace: string]: {\n [key: string]: {\n enc: string;\n val: Uint8Array | string;\n exp: number | null;\n };\n };\n } = {};\n\n async get(keys: CacheFullKey[]): Promise<{ key: CacheFullKey; value: V }[]> {\n if (!keys.length) return [];\n const now = Date.now();\n return (\n await Promise.all(\n keys.map(\n async (fullKey): Promise<{ key: CacheFullKey; value: V }[]> => {\n const [namespace, key] = fullKey;\n const strNamespace = namespace.join(\",\");\n\n if (strNamespace in this.cache && key in this.cache[strNamespace]) {\n const cached = this.cache[strNamespace][key];\n if (cached.exp == null || now < cached.exp) {\n const value = await this.serde.loadsTyped(\n cached.enc,\n cached.val\n );\n return [{ key: fullKey, value }];\n } else {\n delete this.cache[strNamespace][key];\n }\n }\n\n return [];\n }\n )\n )\n ).flat();\n }\n\n async set(\n pairs: { key: CacheFullKey; value: V; ttl?: number }[]\n ): Promise<void> {\n const now = Date.now();\n for (const { key: fullKey, value, ttl } of pairs) {\n const [namespace, key] = fullKey;\n const strNamespace = namespace.join(\",\");\n const [enc, val] = await this.serde.dumpsTyped(value);\n const exp = ttl != null ? ttl * 1000 + now : null;\n\n this.cache[strNamespace] ??= {};\n this.cache[strNamespace][key] = { enc, val, exp };\n }\n }\n\n async clear(namespaces: CacheNamespace[]): Promise<void> {\n if (!namespaces.length) {\n this.cache = {};\n return;\n }\n\n for (const namespace of namespaces) {\n const strNamespace = namespace.join(\",\");\n if (strNamespace in this.cache) delete this.cache[strNamespace];\n }\n }\n}\n"],"mappings":";;;AAEA,IAAa,gBAAb,cAAgD,UAAa;CAC3D,AAAQ,QAQJ;CAEJ,MAAM,IAAI,MAAkE;AAC1E,MAAI,CAAC,KAAK,OAAQ,QAAO;EACzB,MAAM,MAAM,KAAK;AACjB,UACE,MAAM,QAAQ,IACZ,KAAK,IACH,OAAO,YAAwD;GAC7D,MAAM,CAAC,WAAW,OAAO;GACzB,MAAM,eAAe,UAAU,KAAK;AAEpC,OAAI,gBAAgB,KAAK,SAAS,OAAO,KAAK,MAAM,eAAe;IACjE,MAAM,SAAS,KAAK,MAAM,cAAc;AACxC,QAAI,OAAO,OAAO,QAAQ,MAAM,OAAO,KAAK;KAC1C,MAAM,QAAQ,MAAM,KAAK,MAAM,WAC7B,OAAO,KACP,OAAO;AAET,YAAO,CAAC;MAAE,KAAK;MAAS;;UAExB,QAAO,KAAK,MAAM,cAAc;;AAIpC,UAAO;OAIb;;CAGJ,MAAM,IACJ,OACe;EACf,MAAM,MAAM,KAAK;AACjB,OAAK,MAAM,EAAE,KAAK,SAAS,OAAO,SAAS,OAAO;GAChD,MAAM,CAAC,WAAW,OAAO;GACzB,MAAM,eAAe,UAAU,KAAK;GACpC,MAAM,CAAC,KAAK,OAAO,MAAM,KAAK,MAAM,WAAW;GAC/C,MAAM,MAAM,OAAO,OAAO,MAAM,MAAO,MAAM;AAE7C,QAAK,MAAM,kBAAkB;AAC7B,QAAK,MAAM,cAAc,OAAO;IAAE;IAAK;IAAK;;;;CAIhD,MAAM,MAAM,YAA6C;AACvD,MAAI,CAAC,WAAW,QAAQ;AACtB,QAAK,QAAQ;AACb;;AAGF,OAAK,MAAM,aAAa,YAAY;GAClC,MAAM,eAAe,UAAU,KAAK;AACpC,OAAI,gBAAgB,KAAK,MAAO,QAAO,KAAK,MAAM"}
|
package/dist/id.cjs
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const uuid_1 = require("uuid");
|
|
1
|
+
const require_rolldown_runtime = require('./_virtual/rolldown_runtime.cjs');
|
|
2
|
+
const uuid = require_rolldown_runtime.__toESM(require("uuid"));
|
|
3
|
+
|
|
4
|
+
//#region src/id.ts
|
|
6
5
|
function uuid6(clockseq) {
|
|
7
|
-
|
|
6
|
+
return (0, uuid.v6)({ clockseq });
|
|
8
7
|
}
|
|
9
|
-
// Skip UUID validation check, since UUID6s
|
|
10
|
-
// generated with negative clockseq are not
|
|
11
|
-
// technically compliant, but still work.
|
|
12
|
-
// See: https://github.com/uuidjs/uuid/issues/511
|
|
13
8
|
function uuid5(name, namespace) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
.match(/.{2}/g)
|
|
17
|
-
.map((byte) => parseInt(byte, 16));
|
|
18
|
-
return (0, uuid_1.v5)(name, new Uint8Array(namespaceBytes));
|
|
9
|
+
const namespaceBytes = namespace.replace(/-/g, "").match(/.{2}/g).map((byte) => parseInt(byte, 16));
|
|
10
|
+
return (0, uuid.v5)(name, new Uint8Array(namespaceBytes));
|
|
19
11
|
}
|
|
20
|
-
|
|
12
|
+
|
|
13
|
+
//#endregion
|
|
14
|
+
exports.uuid5 = uuid5;
|
|
15
|
+
exports.uuid6 = uuid6;
|
|
16
|
+
//# sourceMappingURL=id.cjs.map
|
package/dist/id.cjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.cjs","names":[],"sources":["../src/id.ts"],"sourcesContent":["import { v5, v6 } from \"uuid\";\n\nexport function uuid6(clockseq: number): string {\n return v6({ clockseq });\n}\n\n// Skip UUID validation check, since UUID6s\n// generated with negative clockseq are not\n// technically compliant, but still work.\n// See: https://github.com/uuidjs/uuid/issues/511\nexport function uuid5(name: string, namespace: string): string {\n const namespaceBytes = namespace\n .replace(/-/g, \"\")\n .match(/.{2}/g)!\n .map((byte) => parseInt(byte, 16));\n return v5(name, new Uint8Array(namespaceBytes));\n}\n"],"mappings":";;;;AAEA,SAAgB,MAAM,UAA0B;AAC9C,qBAAU,EAAE;;AAOd,SAAgB,MAAM,MAAc,WAA2B;CAC7D,MAAM,iBAAiB,UACpB,QAAQ,MAAM,IACd,MAAM,SACN,KAAK,SAAS,SAAS,MAAM;AAChC,qBAAU,MAAM,IAAI,WAAW"}
|
package/dist/id.d.cts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/id.d.ts
|
|
2
|
+
declare function uuid6(clockseq: number): string;
|
|
3
|
+
// Skip UUID validation check, since UUID6s
|
|
4
|
+
// generated with negative clockseq are not
|
|
5
|
+
// technically compliant, but still work.
|
|
6
|
+
// See: https://github.com/uuidjs/uuid/issues/511
|
|
7
|
+
declare function uuid5(name: string, namespace: string): string;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { uuid5, uuid6 };
|
|
10
|
+
//# sourceMappingURL=id.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.cts","names":["uuid6","uuid5"],"sources":["../src/id.d.ts"],"sourcesContent":["export declare function uuid6(clockseq: number): string;\n// Skip UUID validation check, since UUID6s\n// generated with negative clockseq are not\n// technically compliant, but still work.\n// See: https://github.com/uuidjs/uuid/issues/511\nexport declare function uuid5(name: string, namespace: string): string;\n"],"mappings":";iBAAwBA,KAAAA;AAAxB;AAKA;;;iBAAwBC,KAAAA"}
|
package/dist/id.d.ts
CHANGED
|
@@ -1,2 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/id.d.ts
|
|
2
|
+
declare function uuid6(clockseq: number): string;
|
|
3
|
+
// Skip UUID validation check, since UUID6s
|
|
4
|
+
// generated with negative clockseq are not
|
|
5
|
+
// technically compliant, but still work.
|
|
6
|
+
// See: https://github.com/uuidjs/uuid/issues/511
|
|
7
|
+
declare function uuid5(name: string, namespace: string): string;
|
|
8
|
+
//#endregion
|
|
9
|
+
export { uuid5, uuid6 };
|
|
10
|
+
//# sourceMappingURL=id.d.ts.map
|
package/dist/id.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"id.d.ts","names":["uuid6","uuid5"],"sources":["../src/id.d.ts"],"sourcesContent":["export declare function uuid6(clockseq: number): string;\n// Skip UUID validation check, since UUID6s\n// generated with negative clockseq are not\n// technically compliant, but still work.\n// See: https://github.com/uuidjs/uuid/issues/511\nexport declare function uuid5(name: string, namespace: string): string;\n"],"mappings":";iBAAwBA,KAAAA;AAAxB;AAKA;;;iBAAwBC,KAAAA"}
|
package/dist/id.js
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
import { v5, v6 } from "uuid";
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
//#region src/id.ts
|
|
4
|
+
function uuid6(clockseq) {
|
|
5
|
+
return v6({ clockseq });
|
|
4
6
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
// See: https://github.com/uuidjs/uuid/issues/511
|
|
9
|
-
export function uuid5(name, namespace) {
|
|
10
|
-
const namespaceBytes = namespace
|
|
11
|
-
.replace(/-/g, "")
|
|
12
|
-
.match(/.{2}/g)
|
|
13
|
-
.map((byte) => parseInt(byte, 16));
|
|
14
|
-
return v5(name, new Uint8Array(namespaceBytes));
|
|
7
|
+
function uuid5(name, namespace) {
|
|
8
|
+
const namespaceBytes = namespace.replace(/-/g, "").match(/.{2}/g).map((byte) => parseInt(byte, 16));
|
|
9
|
+
return v5(name, new Uint8Array(namespaceBytes));
|
|
15
10
|
}
|
|
11
|
+
|
|
12
|
+
//#endregion
|
|
13
|
+
export { uuid5, uuid6 };
|
|
16
14
|
//# sourceMappingURL=id.js.map
|
package/dist/id.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"id.js","
|
|
1
|
+
{"version":3,"file":"id.js","names":[],"sources":["../src/id.ts"],"sourcesContent":["import { v5, v6 } from \"uuid\";\n\nexport function uuid6(clockseq: number): string {\n return v6({ clockseq });\n}\n\n// Skip UUID validation check, since UUID6s\n// generated with negative clockseq are not\n// technically compliant, but still work.\n// See: https://github.com/uuidjs/uuid/issues/511\nexport function uuid5(name: string, namespace: string): string {\n const namespaceBytes = namespace\n .replace(/-/g, \"\")\n .match(/.{2}/g)!\n .map((byte) => parseInt(byte, 16));\n return v5(name, new Uint8Array(namespaceBytes));\n}\n"],"mappings":";;;AAEA,SAAgB,MAAM,UAA0B;AAC9C,QAAO,GAAG,EAAE;;AAOd,SAAgB,MAAM,MAAc,WAA2B;CAC7D,MAAM,iBAAiB,UACpB,QAAQ,MAAM,IACd,MAAM,SACN,KAAK,SAAS,SAAS,MAAM;AAChC,QAAO,GAAG,MAAM,IAAI,WAAW"}
|
package/dist/index.cjs
CHANGED
|
@@ -1,27 +1,36 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
1
|
+
const require_id = require('./id.cjs');
|
|
2
|
+
const require_types = require('./serde/types.cjs');
|
|
3
|
+
const require_base = require('./base.cjs');
|
|
4
|
+
const require_memory = require('./memory.cjs');
|
|
5
|
+
const require_base$1 = require('./store/base.cjs');
|
|
6
|
+
const require_batch = require('./store/batch.cjs');
|
|
7
|
+
const require_memory$1 = require('./store/memory.cjs');
|
|
8
|
+
const require_base$2 = require('./cache/base.cjs');
|
|
9
|
+
const require_memory$2 = require('./cache/memory.cjs');
|
|
10
|
+
require('./cache/index.cjs');
|
|
11
|
+
|
|
12
|
+
exports.AsyncBatchedStore = require_batch.AsyncBatchedStore;
|
|
13
|
+
exports.BaseCache = require_base$2.BaseCache;
|
|
14
|
+
exports.BaseCheckpointSaver = require_base.BaseCheckpointSaver;
|
|
15
|
+
exports.BaseStore = require_base$1.BaseStore;
|
|
16
|
+
exports.ERROR = require_types.ERROR;
|
|
17
|
+
exports.INTERRUPT = require_types.INTERRUPT;
|
|
18
|
+
exports.InMemoryCache = require_memory$2.InMemoryCache;
|
|
19
|
+
exports.InMemoryStore = require_memory$1.InMemoryStore;
|
|
20
|
+
exports.InvalidNamespaceError = require_base$1.InvalidNamespaceError;
|
|
21
|
+
exports.MemorySaver = require_memory.MemorySaver;
|
|
22
|
+
exports.MemoryStore = require_memory$1.MemoryStore;
|
|
23
|
+
exports.RESUME = require_types.RESUME;
|
|
24
|
+
exports.SCHEDULED = require_types.SCHEDULED;
|
|
25
|
+
exports.TASKS = require_types.TASKS;
|
|
26
|
+
exports.WRITES_IDX_MAP = require_base.WRITES_IDX_MAP;
|
|
27
|
+
exports.compareChannelVersions = require_base.compareChannelVersions;
|
|
28
|
+
exports.copyCheckpoint = require_base.copyCheckpoint;
|
|
29
|
+
exports.deepCopy = require_base.deepCopy;
|
|
30
|
+
exports.emptyCheckpoint = require_base.emptyCheckpoint;
|
|
31
|
+
exports.getCheckpointId = require_base.getCheckpointId;
|
|
32
|
+
exports.getTextAtPath = require_base$1.getTextAtPath;
|
|
33
|
+
exports.maxChannelVersion = require_base.maxChannelVersion;
|
|
34
|
+
exports.tokenizePath = require_base$1.tokenizePath;
|
|
35
|
+
exports.uuid5 = require_id.uuid5;
|
|
36
|
+
exports.uuid6 = require_id.uuid6;
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SerializerProtocol } from "./serde/base.cjs";
|
|
2
|
+
import { All, CheckpointMetadata, CheckpointPendingWrite, PendingWrite, PendingWriteValue } from "./types.cjs";
|
|
3
|
+
import { BaseCheckpointSaver, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointTuple, ReadonlyCheckpoint, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, maxChannelVersion } from "./base.cjs";
|
|
4
|
+
import { MemorySaver } from "./memory.cjs";
|
|
5
|
+
import { uuid5, uuid6 } from "./id.cjs";
|
|
6
|
+
import { ChannelProtocol, ERROR, INTERRUPT, RESUME, SCHEDULED, SendProtocol, TASKS } from "./serde/types.cjs";
|
|
7
|
+
import { BaseStore, GetOperation, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchItem, SearchOperation, getTextAtPath, tokenizePath } from "./store/base.cjs";
|
|
8
|
+
import { AsyncBatchedStore } from "./store/batch.cjs";
|
|
9
|
+
import { InMemoryStore, MemoryStore } from "./store/memory.cjs";
|
|
10
|
+
import { BaseCache, CacheFullKey, CacheNamespace } from "./cache/base.cjs";
|
|
11
|
+
import { InMemoryCache } from "./cache/memory.cjs";
|
|
12
|
+
export { All, AsyncBatchedStore, BaseCache, BaseCheckpointSaver, BaseStore, CacheFullKey, CacheNamespace, ChannelProtocol, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointMetadata, CheckpointPendingWrite, CheckpointTuple, ERROR, GetOperation, INTERRUPT, InMemoryCache, InMemoryStore, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, MemorySaver, MemoryStore, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PendingWrite, PendingWriteValue, PutOperation, RESUME, ReadonlyCheckpoint, SCHEDULED, SearchItem, SearchOperation, SendProtocol, SerializerProtocol, TASKS, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, getTextAtPath, maxChannelVersion, tokenizePath, uuid5, uuid6 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { SerializerProtocol } from "./serde/base.js";
|
|
2
|
+
import { All, CheckpointMetadata, CheckpointPendingWrite, PendingWrite, PendingWriteValue } from "./types.js";
|
|
3
|
+
import { BaseCheckpointSaver, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointTuple, ReadonlyCheckpoint, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, maxChannelVersion } from "./base.js";
|
|
4
|
+
import { MemorySaver } from "./memory.js";
|
|
5
|
+
import { uuid5, uuid6 } from "./id.js";
|
|
6
|
+
import { ChannelProtocol, ERROR, INTERRUPT, RESUME, SCHEDULED, SendProtocol, TASKS } from "./serde/types.js";
|
|
7
|
+
import { BaseStore, GetOperation, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PutOperation, SearchItem, SearchOperation, getTextAtPath, tokenizePath } from "./store/base.js";
|
|
8
|
+
import { AsyncBatchedStore } from "./store/batch.js";
|
|
9
|
+
import { InMemoryStore, MemoryStore } from "./store/memory.js";
|
|
10
|
+
import { BaseCache, CacheFullKey, CacheNamespace } from "./cache/base.js";
|
|
11
|
+
import { InMemoryCache } from "./cache/memory.js";
|
|
12
|
+
export { All, AsyncBatchedStore, BaseCache, BaseCheckpointSaver, BaseStore, CacheFullKey, CacheNamespace, ChannelProtocol, ChannelVersions, Checkpoint, CheckpointListOptions, CheckpointMetadata, CheckpointPendingWrite, CheckpointTuple, ERROR, GetOperation, INTERRUPT, InMemoryCache, InMemoryStore, IndexConfig, InvalidNamespaceError, Item, ListNamespacesOperation, MatchCondition, MemorySaver, MemoryStore, NameSpacePath, NamespaceMatchType, Operation, OperationResults, PendingWrite, PendingWriteValue, PutOperation, RESUME, ReadonlyCheckpoint, SCHEDULED, SearchItem, SearchOperation, SendProtocol, SerializerProtocol, TASKS, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, getTextAtPath, maxChannelVersion, tokenizePath, uuid5, uuid6 };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { uuid5, uuid6 } from "./id.js";
|
|
2
|
+
import { ERROR, INTERRUPT, RESUME, SCHEDULED, TASKS } from "./serde/types.js";
|
|
3
|
+
import { BaseCheckpointSaver, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, maxChannelVersion } from "./base.js";
|
|
4
|
+
import { MemorySaver } from "./memory.js";
|
|
5
|
+
import { BaseStore, InvalidNamespaceError, getTextAtPath, tokenizePath } from "./store/base.js";
|
|
6
|
+
import { AsyncBatchedStore } from "./store/batch.js";
|
|
7
|
+
import { InMemoryStore, MemoryStore } from "./store/memory.js";
|
|
8
|
+
import { BaseCache } from "./cache/base.js";
|
|
9
|
+
import { InMemoryCache } from "./cache/memory.js";
|
|
10
|
+
import "./cache/index.js";
|
|
11
|
+
|
|
12
|
+
export { AsyncBatchedStore, BaseCache, BaseCheckpointSaver, BaseStore, ERROR, INTERRUPT, InMemoryCache, InMemoryStore, InvalidNamespaceError, MemorySaver, MemoryStore, RESUME, SCHEDULED, TASKS, WRITES_IDX_MAP, compareChannelVersions, copyCheckpoint, deepCopy, emptyCheckpoint, getCheckpointId, getTextAtPath, maxChannelVersion, tokenizePath, uuid5, uuid6 };
|