@workglow/storage 0.1.1 → 0.2.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/README.md +1 -16
- package/dist/browser.js +89 -19
- package/dist/browser.js.map +11 -10
- package/dist/bun.js +61 -15
- package/dist/bun.js.map +14 -13
- package/dist/common.d.ts +1 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/credentials/LazyEncryptedCredentialStore.d.ts +63 -0
- package/dist/credentials/LazyEncryptedCredentialStore.d.ts.map +1 -0
- package/dist/kv/IKvStorage.d.ts.map +1 -1
- package/dist/node.js +61 -15
- package/dist/node.js.map +14 -13
- package/dist/postgres/browser.d.ts.map +1 -1
- package/dist/postgres/node-bun.d.ts.map +1 -1
- package/dist/queue/IQueueStorage.d.ts.map +1 -1
- package/dist/queue/InMemoryQueueStorage.d.ts.map +1 -1
- package/dist/queue/SqliteQueueStorage.d.ts.map +1 -1
- package/dist/sqlite/browser.d.ts.map +1 -1
- package/dist/sqlite/bun.d.ts.map +1 -1
- package/dist/sqlite/node.d.ts.map +1 -1
- package/dist/tabular/BaseSqlTabularStorage.d.ts.map +1 -1
- package/dist/tabular/BaseTabularStorage.d.ts +2 -2
- package/dist/tabular/BaseTabularStorage.d.ts.map +1 -1
- package/dist/tabular/IndexedDbTabularStorage.d.ts.map +1 -1
- package/dist/tabular/PostgresTabularStorage.d.ts.map +1 -1
- package/dist/tabular/SharedInMemoryTabularStorage.d.ts +2 -0
- package/dist/tabular/SharedInMemoryTabularStorage.d.ts.map +1 -1
- package/dist/tabular/SqliteTabularStorage.d.ts.map +1 -1
- package/dist/tabular/StorageError.d.ts +0 -2
- package/dist/tabular/StorageError.d.ts.map +1 -1
- package/dist/tabular/SupabaseTabularStorage.d.ts.map +1 -1
- package/dist/tabular/TabularStorageRegistry.d.ts.map +1 -1
- package/dist/vector/InMemoryVectorStorage.d.ts +2 -2
- package/dist/vector/InMemoryVectorStorage.d.ts.map +1 -1
- package/dist/vector/IndexedDbVectorStorage.d.ts +2 -2
- package/dist/vector/IndexedDbVectorStorage.d.ts.map +1 -1
- package/dist/vector/PostgresVectorStorage.d.ts +2 -2
- package/dist/vector/PostgresVectorStorage.d.ts.map +1 -1
- package/dist/vector/SqliteAiVectorStorage.d.ts +2 -2
- package/dist/vector/SqliteAiVectorStorage.d.ts.map +1 -1
- package/dist/vector/SqliteVectorStorage.d.ts +2 -2
- package/dist/vector/SqliteVectorStorage.d.ts.map +1 -1
- package/package.json +12 -15
package/dist/common.d.ts
CHANGED
|
@@ -28,4 +28,5 @@ export * from "./vector/InMemoryVectorStorage";
|
|
|
28
28
|
export * from "./vector/IVectorStorage";
|
|
29
29
|
export * from "./vector/TelemetryVectorStorage";
|
|
30
30
|
export * from "./credentials/EncryptedKvCredentialStore";
|
|
31
|
+
export * from "./credentials/LazyEncryptedCredentialStore";
|
|
31
32
|
//# sourceMappingURL=common.d.ts.map
|
package/dist/common.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAElD,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AAExC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAE9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAE9B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,0CAA0C,CAAC"}
|
|
1
|
+
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAC1C,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAElD,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,yBAAyB,CAAC;AAExC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAE9C,cAAc,4CAA4C,CAAC;AAC3D,cAAc,qCAAqC,CAAC;AAEpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,mCAAmC,CAAC;AAClD,cAAc,eAAe,CAAC;AAE9B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAEhD,cAAc,0CAA0C,CAAC;AACzD,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Steven Roussey <sroussey@gmail.com>
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { CredentialPutOptions, ICredentialStore } from "@workglow/util";
|
|
7
|
+
import type { IKvStorage } from "../kv/IKvStorage";
|
|
8
|
+
/**
|
|
9
|
+
* An {@link ICredentialStore} wrapper that starts in a locked state and defers
|
|
10
|
+
* construction of the underlying {@link EncryptedKvCredentialStore} until
|
|
11
|
+
* {@link unlock} is called with a passphrase.
|
|
12
|
+
*
|
|
13
|
+
* **Locked behavior** (before {@link unlock}):
|
|
14
|
+
* - `get()` returns `undefined` (falls through in a {@link ChainedCredentialStore})
|
|
15
|
+
* - `has()` returns `false`
|
|
16
|
+
* - `keys()` returns `[]`
|
|
17
|
+
* - `put()` throws an error
|
|
18
|
+
* - `delete()` returns `false`
|
|
19
|
+
* - `deleteAll()` is a no-op
|
|
20
|
+
*
|
|
21
|
+
* **Unlocked behavior**: all methods delegate to the inner
|
|
22
|
+
* {@link EncryptedKvCredentialStore}.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const lazy = new LazyEncryptedCredentialStore(kvStorage);
|
|
27
|
+
* await lazy.get("key"); // undefined (locked)
|
|
28
|
+
*
|
|
29
|
+
* lazy.unlock("my-passphrase");
|
|
30
|
+
* await lazy.get("key"); // decrypted value
|
|
31
|
+
*
|
|
32
|
+
* lazy.lock(); // discards inner store
|
|
33
|
+
* await lazy.get("key"); // undefined again
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare class LazyEncryptedCredentialStore implements ICredentialStore {
|
|
37
|
+
private readonly kv;
|
|
38
|
+
private inner;
|
|
39
|
+
constructor(kv: IKvStorage<string, unknown>);
|
|
40
|
+
/**
|
|
41
|
+
* Whether the store is currently unlocked and able to decrypt credentials.
|
|
42
|
+
*/
|
|
43
|
+
get isUnlocked(): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Unlock the store by providing a passphrase. Creates the underlying
|
|
46
|
+
* {@link EncryptedKvCredentialStore} using the same KV backend.
|
|
47
|
+
*
|
|
48
|
+
* @throws if the passphrase is empty
|
|
49
|
+
*/
|
|
50
|
+
unlock(passphrase: string): void;
|
|
51
|
+
/**
|
|
52
|
+
* Lock the store, discarding the inner {@link EncryptedKvCredentialStore}
|
|
53
|
+
* and its derived key cache.
|
|
54
|
+
*/
|
|
55
|
+
lock(): void;
|
|
56
|
+
get(key: string): Promise<string | undefined>;
|
|
57
|
+
put(key: string, value: string, options?: CredentialPutOptions): Promise<void>;
|
|
58
|
+
delete(key: string): Promise<boolean>;
|
|
59
|
+
has(key: string): Promise<boolean>;
|
|
60
|
+
keys(): Promise<readonly string[]>;
|
|
61
|
+
deleteAll(): Promise<void>;
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=LazyEncryptedCredentialStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LazyEncryptedCredentialStore.d.ts","sourceRoot":"","sources":["../../src/credentials/LazyEncryptedCredentialStore.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC7E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAGnD;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,qBAAa,4BAA6B,YAAW,gBAAgB;IAGvD,OAAO,CAAC,QAAQ,CAAC,EAAE;IAF/B,OAAO,CAAC,KAAK,CAAyC;IAEtD,YAA6B,EAAE,EAAE,UAAU,CAAC,MAAM,EAAE,OAAO,CAAC,EAAI;IAEhE;;OAEG;IACH,IAAI,UAAU,IAAI,OAAO,CAExB;IAED;;;;;OAKG;IACH,MAAM,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAE/B;IAED;;;OAGG;IACH,IAAI,IAAI,IAAI,CAEX;IAEK,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAGlD;IAEK,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC,CAKnF;IAEK,MAAM,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAG1C;IAEK,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGvC;IAEK,IAAI,IAAI,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAGvC;IAEK,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAG/B;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IKvStorage.d.ts","sourceRoot":"","sources":["../../src/kv/IKvStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"IKvStorage.d.ts","sourceRoot":"","sources":["../../src/kv/IKvStorage.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAEvD;;GAEG;AACH,eAAO,MAAM,qBAAqB;mBAC1B,QAAQ;;iBAEZ,GAAG;qBAAI,IAAI,EAAE,QAAQ;;iBACrB,KAAK;;;CAGgC,CAAC;AAC1C,eAAO,MAAM,kBAAkB,YAAI,KAAK,CAAU,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,IAAI;IACnD,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACtC,GAAG,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,SAAS,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,GAAG,SAAS,KAAK,IAAI,CAAC;IAClD,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAChE,MAAM,MAAM,eAAe,CAAC,KAAK,SAAS,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,IAAI,gBAAgB,CAC7F,GAAG,EACH,KAAK,EACL,QAAQ,CACT,CAAC,KAAK,CAAC,CAAC;AAET,MAAM,MAAM,iBAAiB,CAAC,KAAK,SAAS,WAAW,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,IAAI,eAAe,CAC9F,gBAAgB,CAAC,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,EACtC,KAAK,CACN,CAAC;AAEF;;;;;;;;GAQG;AACH,MAAM,WAAW,UAAU,CACzB,GAAG,SAAS,MAAM,GAAG,MAAM,GAAG,MAAM,EACpC,KAAK,SAAS,GAAG,GAAG,GAAG,EACvB,QAAQ,GAAG;IAAE,GAAG,EAAE,GAAG,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE;IAGrC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,OAAO,CAAC,KAAK,EAAE,KAAK,CAAC;QAAE,GAAG,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjE,GAAG,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;IAC1C,MAAM,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,IAAI,OAAO,CAAC,QAAQ,EAAE,GAAG,SAAS,CAAC,CAAC;IAC1C,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3B,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAExB,mBAAmB,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAGxD,EAAE,CAAC,KAAK,SAAS,WAAW,EAC1B,IAAI,EAAE,KAAK,EACX,EAAE,EAAE,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,GAC/C,IAAI,CAAC;IACR,GAAG,CAAC,KAAK,SAAS,WAAW,EAC3B,IAAI,EAAE,KAAK,EACX,EAAE,EAAE,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,GAC/C,IAAI,CAAC;IACR,IAAI,CAAC,KAAK,SAAS,WAAW,EAC5B,IAAI,EAAE,KAAK,EACX,GAAG,IAAI,EAAE,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,GACtD,IAAI,CAAC;IACR,IAAI,CAAC,KAAK,SAAS,WAAW,EAC5B,IAAI,EAAE,KAAK,EACX,EAAE,EAAE,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,GAC/C,IAAI,CAAC;IACR,MAAM,CAAC,KAAK,SAAS,WAAW,EAC9B,IAAI,EAAE,KAAK,GACV,OAAO,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC;CAC5D"}
|
package/dist/node.js
CHANGED
|
@@ -14,16 +14,10 @@ import { BaseError } from "@workglow/util";
|
|
|
14
14
|
|
|
15
15
|
class StorageError extends BaseError {
|
|
16
16
|
static type = "StorageError";
|
|
17
|
-
constructor(message) {
|
|
18
|
-
super(message);
|
|
19
|
-
}
|
|
20
17
|
}
|
|
21
18
|
|
|
22
19
|
class StorageValidationError extends StorageError {
|
|
23
20
|
static type = "StorageValidationError";
|
|
24
|
-
constructor(message) {
|
|
25
|
-
super(message);
|
|
26
|
-
}
|
|
27
21
|
}
|
|
28
22
|
|
|
29
23
|
class StorageEmptyCriteriaError extends StorageValidationError {
|
|
@@ -124,14 +118,10 @@ class BaseTabularStorage {
|
|
|
124
118
|
}
|
|
125
119
|
}
|
|
126
120
|
if (autoGeneratedKeys.length > 1) {
|
|
127
|
-
throw new Error(`Multiple auto-generated keys detected: ${autoGeneratedKeys.join(", ")}. ` + `
|
|
121
|
+
throw new Error(`Multiple auto-generated keys detected: ${autoGeneratedKeys.join(", ")}. ` + `At most one primary key column can be auto-generated.`);
|
|
128
122
|
}
|
|
129
123
|
if (autoGeneratedKeys.length > 0) {
|
|
130
124
|
const autoGenKeyName = autoGeneratedKeys[0];
|
|
131
|
-
const firstPrimaryKey = String(primaryKeyNames[0]);
|
|
132
|
-
if (autoGenKeyName !== firstPrimaryKey) {
|
|
133
|
-
throw new Error(`Auto-generated key "${autoGenKeyName}" must be the first primary key column. ` + `Current first primary key is "${firstPrimaryKey}".`);
|
|
134
|
-
}
|
|
135
125
|
this.autoGeneratedKeyName = autoGenKeyName;
|
|
136
126
|
this.autoGeneratedKeyStrategy = this.determineGenerationStrategy(autoGenKeyName, schema.properties[autoGenKeyName]);
|
|
137
127
|
}
|
|
@@ -1113,12 +1103,11 @@ function hfFeatureToJsonSchema(feature) {
|
|
|
1113
1103
|
import {
|
|
1114
1104
|
createServiceToken as createServiceToken5,
|
|
1115
1105
|
globalServiceRegistry,
|
|
1106
|
+
registerInputCompactor,
|
|
1116
1107
|
registerInputResolver
|
|
1117
1108
|
} from "@workglow/util";
|
|
1118
1109
|
var TABULAR_REPOSITORIES = createServiceToken5("storage.tabular.repositories");
|
|
1119
|
-
|
|
1120
|
-
globalServiceRegistry.register(TABULAR_REPOSITORIES, () => new Map, true);
|
|
1121
|
-
}
|
|
1110
|
+
globalServiceRegistry.registerIfAbsent(TABULAR_REPOSITORIES, () => new Map, true);
|
|
1122
1111
|
function getGlobalTabularRepositories() {
|
|
1123
1112
|
return globalServiceRegistry.get(TABULAR_REPOSITORIES);
|
|
1124
1113
|
}
|
|
@@ -1138,6 +1127,14 @@ function resolveRepositoryFromRegistry(id, format, registry) {
|
|
|
1138
1127
|
return repo;
|
|
1139
1128
|
}
|
|
1140
1129
|
registerInputResolver("storage:tabular", resolveRepositoryFromRegistry);
|
|
1130
|
+
registerInputCompactor("storage:tabular", (value, _format, registry) => {
|
|
1131
|
+
const repos = registry.has(TABULAR_REPOSITORIES) ? registry.get(TABULAR_REPOSITORIES) : getGlobalTabularRepositories();
|
|
1132
|
+
for (const [id, repo] of repos) {
|
|
1133
|
+
if (repo === value)
|
|
1134
|
+
return id;
|
|
1135
|
+
}
|
|
1136
|
+
return;
|
|
1137
|
+
});
|
|
1141
1138
|
// src/util/traced.ts
|
|
1142
1139
|
import { getTelemetryProvider, SpanStatusCode } from "@workglow/util";
|
|
1143
1140
|
async function traced(spanName, storageName, fn) {
|
|
@@ -2237,6 +2234,54 @@ class EncryptedKvCredentialStore {
|
|
|
2237
2234
|
await this.kv.deleteAll();
|
|
2238
2235
|
}
|
|
2239
2236
|
}
|
|
2237
|
+
// src/credentials/LazyEncryptedCredentialStore.ts
|
|
2238
|
+
class LazyEncryptedCredentialStore {
|
|
2239
|
+
kv;
|
|
2240
|
+
inner;
|
|
2241
|
+
constructor(kv) {
|
|
2242
|
+
this.kv = kv;
|
|
2243
|
+
}
|
|
2244
|
+
get isUnlocked() {
|
|
2245
|
+
return this.inner !== undefined;
|
|
2246
|
+
}
|
|
2247
|
+
unlock(passphrase) {
|
|
2248
|
+
this.inner = new EncryptedKvCredentialStore(this.kv, passphrase);
|
|
2249
|
+
}
|
|
2250
|
+
lock() {
|
|
2251
|
+
this.inner = undefined;
|
|
2252
|
+
}
|
|
2253
|
+
async get(key) {
|
|
2254
|
+
if (!this.inner)
|
|
2255
|
+
return;
|
|
2256
|
+
return this.inner.get(key);
|
|
2257
|
+
}
|
|
2258
|
+
async put(key, value, options) {
|
|
2259
|
+
if (!this.inner) {
|
|
2260
|
+
throw new Error("Credential store is locked. Call unlock() before storing credentials.");
|
|
2261
|
+
}
|
|
2262
|
+
return this.inner.put(key, value, options);
|
|
2263
|
+
}
|
|
2264
|
+
async delete(key) {
|
|
2265
|
+
if (!this.inner)
|
|
2266
|
+
return false;
|
|
2267
|
+
return this.inner.delete(key);
|
|
2268
|
+
}
|
|
2269
|
+
async has(key) {
|
|
2270
|
+
if (!this.inner)
|
|
2271
|
+
return false;
|
|
2272
|
+
return this.inner.has(key);
|
|
2273
|
+
}
|
|
2274
|
+
async keys() {
|
|
2275
|
+
if (!this.inner)
|
|
2276
|
+
return [];
|
|
2277
|
+
return this.inner.keys();
|
|
2278
|
+
}
|
|
2279
|
+
async deleteAll() {
|
|
2280
|
+
if (!this.inner)
|
|
2281
|
+
return;
|
|
2282
|
+
return this.inner.deleteAll();
|
|
2283
|
+
}
|
|
2284
|
+
}
|
|
2240
2285
|
// src/tabular/FsFolderTabularStorage.ts
|
|
2241
2286
|
import { createServiceToken as createServiceToken12, getLogger as getLogger3, makeFingerprint as makeFingerprint5, sleep as sleep3, uuid4 as uuid43 } from "@workglow/util";
|
|
2242
2287
|
import { mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
@@ -8282,6 +8327,7 @@ export {
|
|
|
8282
8327
|
POSTGRES_KV_REPOSITORY,
|
|
8283
8328
|
MEMORY_TABULAR_REPOSITORY,
|
|
8284
8329
|
MEMORY_KV_REPOSITORY,
|
|
8330
|
+
LazyEncryptedCredentialStore,
|
|
8285
8331
|
KvViaTabularStorage,
|
|
8286
8332
|
KvStorage,
|
|
8287
8333
|
KV_REPOSITORY,
|
|
@@ -8320,4 +8366,4 @@ export {
|
|
|
8320
8366
|
BaseTabularStorage
|
|
8321
8367
|
};
|
|
8322
8368
|
|
|
8323
|
-
//# debugId=
|
|
8369
|
+
//# debugId=9CB3D41A4B06ADAC64756E2164756E21
|