@workglow/util 0.0.102 → 0.0.104
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/dist/browser.js +641 -117
- package/dist/browser.js.map +17 -7
- package/dist/bun.js +641 -113
- package/dist/bun.js.map +17 -7
- package/dist/common.d.ts +5 -0
- package/dist/common.d.ts.map +1 -1
- package/dist/credentials/ChainedCredentialStore.d.ts +34 -0
- package/dist/credentials/ChainedCredentialStore.d.ts.map +1 -0
- package/dist/credentials/CredentialStoreRegistry.d.ts +27 -0
- package/dist/credentials/CredentialStoreRegistry.d.ts.map +1 -0
- package/dist/credentials/EnvCredentialStore.d.ts +41 -0
- package/dist/credentials/EnvCredentialStore.d.ts.map +1 -0
- package/dist/credentials/ICredentialStore.d.ts +95 -0
- package/dist/credentials/ICredentialStore.d.ts.map +1 -0
- package/dist/credentials/InMemoryCredentialStore.d.ts +23 -0
- package/dist/credentials/InMemoryCredentialStore.d.ts.map +1 -0
- package/dist/credentials/index.d.ts +11 -0
- package/dist/credentials/index.d.ts.map +1 -0
- package/dist/crypto/{Crypto.bun.d.ts → Crypto.d.ts} +1 -1
- package/dist/crypto/Crypto.d.ts.map +1 -0
- package/dist/crypto/WebCrypto.d.ts +29 -0
- package/dist/crypto/WebCrypto.d.ts.map +1 -0
- package/dist/json-schema/JsonSchema.d.ts +2 -1
- package/dist/json-schema/JsonSchema.d.ts.map +1 -1
- package/dist/json-schema/parsePartialJson.d.ts +21 -0
- package/dist/json-schema/parsePartialJson.d.ts.map +1 -0
- package/dist/logging/ConsoleLogger.d.ts +27 -0
- package/dist/logging/ConsoleLogger.d.ts.map +1 -0
- package/dist/logging/ILogger.d.ts +22 -0
- package/dist/logging/ILogger.d.ts.map +1 -0
- package/dist/logging/LoggerRegistry.d.ts +19 -0
- package/dist/logging/LoggerRegistry.d.ts.map +1 -0
- package/dist/logging/NullLogger.d.ts +23 -0
- package/dist/logging/NullLogger.d.ts.map +1 -0
- package/dist/logging/index.d.ts +10 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/node.js +641 -114
- package/dist/node.js.map +17 -7
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/worker/WorkerManager.d.ts +4 -0
- package/dist/worker/WorkerManager.d.ts.map +1 -1
- package/dist/worker/WorkerServer.d.ts +6 -0
- package/dist/worker/WorkerServer.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/crypto/Crypto.browser.d.ts +0 -10
- package/dist/crypto/Crypto.browser.d.ts.map +0 -1
- package/dist/crypto/Crypto.bun.d.ts.map +0 -1
- package/dist/crypto/Crypto.node.d.ts +0 -10
- package/dist/crypto/Crypto.node.d.ts.map +0 -1
package/dist/bun.js
CHANGED
|
@@ -1,4 +1,87 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
// src/utilities/Misc.ts
|
|
3
|
+
function forceArray(input) {
|
|
4
|
+
if (Array.isArray(input))
|
|
5
|
+
return input;
|
|
6
|
+
return [input];
|
|
7
|
+
}
|
|
8
|
+
async function sleep(ms) {
|
|
9
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
10
|
+
}
|
|
11
|
+
function collectPropertyValues(input) {
|
|
12
|
+
const output = {};
|
|
13
|
+
(input || []).forEach((item) => {
|
|
14
|
+
Object.keys(item).forEach((key) => {
|
|
15
|
+
const value = item[key];
|
|
16
|
+
if (output[key]) {
|
|
17
|
+
output[key].push(value);
|
|
18
|
+
} else {
|
|
19
|
+
output[key] = [value];
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
return output;
|
|
24
|
+
}
|
|
25
|
+
function toSQLiteTimestamp(date) {
|
|
26
|
+
if (!date)
|
|
27
|
+
return null;
|
|
28
|
+
const pad = (number) => number < 10 ? "0" + number : number;
|
|
29
|
+
const year = date.getUTCFullYear();
|
|
30
|
+
const month = pad(date.getUTCMonth() + 1);
|
|
31
|
+
const day = pad(date.getUTCDate());
|
|
32
|
+
const hours = pad(date.getUTCHours());
|
|
33
|
+
const minutes = pad(date.getUTCMinutes());
|
|
34
|
+
const seconds = pad(date.getUTCSeconds());
|
|
35
|
+
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
|
36
|
+
}
|
|
37
|
+
function deepEqual(a, b) {
|
|
38
|
+
if (a === b) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (typeof a !== "object" || typeof b !== "object" || a == null || b == null) {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
const keysA = Object.keys(a);
|
|
45
|
+
const keysB = Object.keys(b);
|
|
46
|
+
if (keysA.length !== keysB.length) {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
for (const key of keysA) {
|
|
50
|
+
if (!keysB.includes(key)) {
|
|
51
|
+
return false;
|
|
52
|
+
}
|
|
53
|
+
if (!deepEqual(a[key], b[key])) {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
function sortObject(obj) {
|
|
60
|
+
return Object.keys(obj).sort().reduce((result, key) => {
|
|
61
|
+
result[key] = obj[key];
|
|
62
|
+
return result;
|
|
63
|
+
}, {});
|
|
64
|
+
}
|
|
65
|
+
function serialize(obj) {
|
|
66
|
+
const sortedObj = sortObject(obj);
|
|
67
|
+
return JSON.stringify(sortedObj);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// src/crypto/Crypto.ts
|
|
71
|
+
async function sha256(data) {
|
|
72
|
+
const encoder = new TextEncoder;
|
|
73
|
+
const hashBuffer = await crypto.subtle.digest("SHA-256", encoder.encode(data));
|
|
74
|
+
const hashArray = Array.from(new Uint8Array(hashBuffer));
|
|
75
|
+
return hashArray.map((b) => b.toString(16).padStart(2, "0")).join("");
|
|
76
|
+
}
|
|
77
|
+
async function makeFingerprint(input) {
|
|
78
|
+
const serializedObj = serialize(input);
|
|
79
|
+
const hash = await sha256(serializedObj);
|
|
80
|
+
return hash;
|
|
81
|
+
}
|
|
82
|
+
function uuid4() {
|
|
83
|
+
return crypto.randomUUID();
|
|
84
|
+
}
|
|
2
85
|
// src/di/Container.ts
|
|
3
86
|
class Container {
|
|
4
87
|
services = new Map;
|
|
@@ -144,6 +227,117 @@ class EventEmitter {
|
|
|
144
227
|
return () => this.off(event, listener);
|
|
145
228
|
}
|
|
146
229
|
}
|
|
230
|
+
// src/logging/ConsoleLogger.ts
|
|
231
|
+
class ConsoleLogger {
|
|
232
|
+
bindings;
|
|
233
|
+
constructor(bindings = {}) {
|
|
234
|
+
this.bindings = bindings;
|
|
235
|
+
}
|
|
236
|
+
info(message, meta) {
|
|
237
|
+
const merged = this.merge(meta);
|
|
238
|
+
if (merged) {
|
|
239
|
+
console.info(message, merged);
|
|
240
|
+
} else {
|
|
241
|
+
console.info(message);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
warn(message, meta) {
|
|
245
|
+
const merged = this.merge(meta);
|
|
246
|
+
if (merged) {
|
|
247
|
+
console.warn(message, merged);
|
|
248
|
+
} else {
|
|
249
|
+
console.warn(message);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
error(message, meta) {
|
|
253
|
+
const merged = this.merge(meta);
|
|
254
|
+
if (merged) {
|
|
255
|
+
console.error(message, merged);
|
|
256
|
+
} else {
|
|
257
|
+
console.error(message);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
debug(message, meta) {
|
|
261
|
+
const merged = this.merge(meta);
|
|
262
|
+
if (merged) {
|
|
263
|
+
console.debug(message, merged);
|
|
264
|
+
} else {
|
|
265
|
+
console.debug(message);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
fatal(err, message, meta) {
|
|
269
|
+
const merged = this.merge(meta);
|
|
270
|
+
if (merged) {
|
|
271
|
+
console.error(message, { ...merged, error: err });
|
|
272
|
+
} else {
|
|
273
|
+
console.error(message, { error: err });
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
time(label, meta) {
|
|
277
|
+
const merged = this.merge(meta);
|
|
278
|
+
if (merged) {
|
|
279
|
+
console.info(`[time] ${label}`, merged);
|
|
280
|
+
}
|
|
281
|
+
console.time(label);
|
|
282
|
+
}
|
|
283
|
+
timeEnd(label, meta) {
|
|
284
|
+
console.timeEnd(label);
|
|
285
|
+
const merged = this.merge(meta);
|
|
286
|
+
if (merged) {
|
|
287
|
+
console.info(`[timeEnd] ${label}`, merged);
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
group(label, meta) {
|
|
291
|
+
const merged = this.merge(meta);
|
|
292
|
+
if (merged) {
|
|
293
|
+
console.group(label, merged);
|
|
294
|
+
} else {
|
|
295
|
+
console.group(label);
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
groupEnd() {
|
|
299
|
+
console.groupEnd();
|
|
300
|
+
}
|
|
301
|
+
child(bindings) {
|
|
302
|
+
return new ConsoleLogger({ ...this.bindings, ...bindings });
|
|
303
|
+
}
|
|
304
|
+
merge(meta) {
|
|
305
|
+
const hasBindings = Object.keys(this.bindings).length > 0;
|
|
306
|
+
if (!hasBindings && !meta)
|
|
307
|
+
return;
|
|
308
|
+
if (!hasBindings)
|
|
309
|
+
return meta;
|
|
310
|
+
if (!meta)
|
|
311
|
+
return this.bindings;
|
|
312
|
+
return { ...this.bindings, ...meta };
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
// src/logging/NullLogger.ts
|
|
316
|
+
class NullLogger {
|
|
317
|
+
info(_message, _meta) {}
|
|
318
|
+
error(_message, _meta) {}
|
|
319
|
+
warn(_message, _meta) {}
|
|
320
|
+
debug(_message, _meta) {}
|
|
321
|
+
fatal(_err, _message, _meta) {}
|
|
322
|
+
time(_label, _meta) {}
|
|
323
|
+
timeEnd(_label, _meta) {}
|
|
324
|
+
group(_label, _meta) {}
|
|
325
|
+
groupEnd() {}
|
|
326
|
+
child(_bindings) {
|
|
327
|
+
return this;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
// src/logging/LoggerRegistry.ts
|
|
331
|
+
var LOGGER = createServiceToken("logger");
|
|
332
|
+
if (!globalServiceRegistry.has(LOGGER)) {
|
|
333
|
+
globalServiceRegistry.register(LOGGER, () => new ConsoleLogger, true);
|
|
334
|
+
}
|
|
335
|
+
function getLogger() {
|
|
336
|
+
return globalServiceRegistry.get(LOGGER);
|
|
337
|
+
}
|
|
338
|
+
function setLogger(logger) {
|
|
339
|
+
globalServiceRegistry.registerInstance(LOGGER, logger);
|
|
340
|
+
}
|
|
147
341
|
// src/utilities/BaseError.ts
|
|
148
342
|
class BaseError {
|
|
149
343
|
static type = "BaseError";
|
|
@@ -978,72 +1172,168 @@ function areObjectSchemasSemanticallyCompatible(sourceSchema, targetSchema) {
|
|
|
978
1172
|
}
|
|
979
1173
|
// src/json-schema/SchemaValidation.ts
|
|
980
1174
|
import { compileSchema } from "@sroussey/json-schema-library";
|
|
981
|
-
// src/
|
|
982
|
-
function
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
1175
|
+
// src/json-schema/parsePartialJson.ts
|
|
1176
|
+
function parsePartialJson(text) {
|
|
1177
|
+
const trimmed = text.trim();
|
|
1178
|
+
if (!trimmed)
|
|
1179
|
+
return;
|
|
1180
|
+
try {
|
|
1181
|
+
const result = JSON.parse(trimmed);
|
|
1182
|
+
if (typeof result === "object" && result !== null && !Array.isArray(result)) {
|
|
1183
|
+
return result;
|
|
1184
|
+
}
|
|
1185
|
+
return;
|
|
1186
|
+
} catch {}
|
|
1187
|
+
if (trimmed[0] !== "{")
|
|
1188
|
+
return;
|
|
1189
|
+
const repaired = repairJson(trimmed);
|
|
1190
|
+
if (repaired === undefined)
|
|
1191
|
+
return;
|
|
1192
|
+
try {
|
|
1193
|
+
const result = JSON.parse(repaired);
|
|
1194
|
+
if (typeof result === "object" && result !== null && !Array.isArray(result)) {
|
|
1195
|
+
return result;
|
|
1196
|
+
}
|
|
1197
|
+
return;
|
|
1198
|
+
} catch {
|
|
1199
|
+
return;
|
|
1200
|
+
}
|
|
989
1201
|
}
|
|
990
|
-
function
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1202
|
+
function repairJson(text) {
|
|
1203
|
+
let result = "";
|
|
1204
|
+
let i = 0;
|
|
1205
|
+
const len = text.length;
|
|
1206
|
+
const stack = [];
|
|
1207
|
+
let inString = false;
|
|
1208
|
+
let escaped = false;
|
|
1209
|
+
let lastSafeEnd = 0;
|
|
1210
|
+
while (i < len) {
|
|
1211
|
+
const ch = text[i];
|
|
1212
|
+
if (escaped) {
|
|
1213
|
+
escaped = false;
|
|
1214
|
+
result += ch;
|
|
1215
|
+
i++;
|
|
1216
|
+
continue;
|
|
1217
|
+
}
|
|
1218
|
+
if (ch === "\\") {
|
|
1219
|
+
escaped = true;
|
|
1220
|
+
result += ch;
|
|
1221
|
+
i++;
|
|
1222
|
+
continue;
|
|
1223
|
+
}
|
|
1224
|
+
if (inString) {
|
|
1225
|
+
if (ch === '"') {
|
|
1226
|
+
inString = false;
|
|
1227
|
+
result += ch;
|
|
1228
|
+
i++;
|
|
1229
|
+
lastSafeEnd = result.length;
|
|
1230
|
+
continue;
|
|
999
1231
|
}
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
}
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1232
|
+
result += ch;
|
|
1233
|
+
i++;
|
|
1234
|
+
continue;
|
|
1235
|
+
}
|
|
1236
|
+
switch (ch) {
|
|
1237
|
+
case '"':
|
|
1238
|
+
inString = true;
|
|
1239
|
+
result += ch;
|
|
1240
|
+
i++;
|
|
1241
|
+
break;
|
|
1242
|
+
case "{":
|
|
1243
|
+
stack.push("}");
|
|
1244
|
+
result += ch;
|
|
1245
|
+
i++;
|
|
1246
|
+
break;
|
|
1247
|
+
case "[":
|
|
1248
|
+
stack.push("]");
|
|
1249
|
+
result += ch;
|
|
1250
|
+
i++;
|
|
1251
|
+
break;
|
|
1252
|
+
case "}":
|
|
1253
|
+
if (stack.length > 0 && stack[stack.length - 1] === "}") {
|
|
1254
|
+
stack.pop();
|
|
1255
|
+
result += ch;
|
|
1256
|
+
i++;
|
|
1257
|
+
lastSafeEnd = result.length;
|
|
1258
|
+
} else {
|
|
1259
|
+
return closeStack(result, stack);
|
|
1260
|
+
}
|
|
1261
|
+
break;
|
|
1262
|
+
case "]":
|
|
1263
|
+
if (stack.length > 0 && stack[stack.length - 1] === "]") {
|
|
1264
|
+
stack.pop();
|
|
1265
|
+
result += ch;
|
|
1266
|
+
i++;
|
|
1267
|
+
lastSafeEnd = result.length;
|
|
1268
|
+
} else {
|
|
1269
|
+
return closeStack(result, stack);
|
|
1270
|
+
}
|
|
1271
|
+
break;
|
|
1272
|
+
default:
|
|
1273
|
+
result += ch;
|
|
1274
|
+
i++;
|
|
1275
|
+
break;
|
|
1276
|
+
}
|
|
1019
1277
|
}
|
|
1020
|
-
if (
|
|
1021
|
-
|
|
1278
|
+
if (inString) {
|
|
1279
|
+
result += '"';
|
|
1022
1280
|
}
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
if (keysA.length !== keysB.length) {
|
|
1026
|
-
return false;
|
|
1281
|
+
if (stack.length === 0) {
|
|
1282
|
+
return result;
|
|
1027
1283
|
}
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1284
|
+
return closeStack(cleanTrailing(result), stack);
|
|
1285
|
+
}
|
|
1286
|
+
function cleanTrailing(text) {
|
|
1287
|
+
let s = text.trimEnd();
|
|
1288
|
+
let changed = true;
|
|
1289
|
+
while (changed) {
|
|
1290
|
+
changed = false;
|
|
1291
|
+
const trimmed = s.trimEnd();
|
|
1292
|
+
if (trimmed.endsWith(",")) {
|
|
1293
|
+
s = trimmed.slice(0, -1);
|
|
1294
|
+
changed = true;
|
|
1295
|
+
continue;
|
|
1031
1296
|
}
|
|
1032
|
-
if (
|
|
1033
|
-
|
|
1297
|
+
if (trimmed.endsWith(":")) {
|
|
1298
|
+
const withoutColon = trimmed.slice(0, -1).trimEnd();
|
|
1299
|
+
if (withoutColon.endsWith('"')) {
|
|
1300
|
+
const keyStart = withoutColon.lastIndexOf('"', withoutColon.length - 2);
|
|
1301
|
+
if (keyStart >= 0) {
|
|
1302
|
+
let before = withoutColon.slice(0, keyStart).trimEnd();
|
|
1303
|
+
if (before.endsWith(",")) {
|
|
1304
|
+
before = before.slice(0, -1);
|
|
1305
|
+
}
|
|
1306
|
+
s = before;
|
|
1307
|
+
changed = true;
|
|
1308
|
+
continue;
|
|
1309
|
+
}
|
|
1310
|
+
}
|
|
1311
|
+
s = withoutColon;
|
|
1312
|
+
changed = true;
|
|
1313
|
+
continue;
|
|
1314
|
+
}
|
|
1315
|
+
const bareTokenMatch = trimmed.match(/,\s*"[^"]*"\s*:\s*(?:tru|fal|nul|true|false|null|[\d.eE+-]+)$/);
|
|
1316
|
+
if (bareTokenMatch) {
|
|
1317
|
+
const valueStr = trimmed.slice(trimmed.lastIndexOf(":") + 1).trim();
|
|
1318
|
+
try {
|
|
1319
|
+
JSON.parse(valueStr);
|
|
1320
|
+
} catch {
|
|
1321
|
+
s = trimmed.slice(0, bareTokenMatch.index).trimEnd();
|
|
1322
|
+
if (s.endsWith(","))
|
|
1323
|
+
s = s.slice(0, -1);
|
|
1324
|
+
changed = true;
|
|
1325
|
+
continue;
|
|
1326
|
+
}
|
|
1034
1327
|
}
|
|
1035
1328
|
}
|
|
1036
|
-
return
|
|
1329
|
+
return s;
|
|
1037
1330
|
}
|
|
1038
|
-
function
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
function serialize(obj) {
|
|
1045
|
-
const sortedObj = sortObject(obj);
|
|
1046
|
-
return JSON.stringify(sortedObj);
|
|
1331
|
+
function closeStack(text, stack) {
|
|
1332
|
+
let result = text;
|
|
1333
|
+
for (let i = stack.length - 1;i >= 0; i--) {
|
|
1334
|
+
result += stack[i];
|
|
1335
|
+
}
|
|
1336
|
+
return result;
|
|
1047
1337
|
}
|
|
1048
1338
|
// src/utilities/objectOfArraysAsArrayOfObjects.ts
|
|
1049
1339
|
function objectOfArraysAsArrayOfObjects(data) {
|
|
@@ -1582,43 +1872,12 @@ function normalizeNumberArray(values, throwOnZero = false) {
|
|
|
1582
1872
|
return values.map((v) => v / norm);
|
|
1583
1873
|
}
|
|
1584
1874
|
// src/worker/WorkerManager.ts
|
|
1585
|
-
function extractTransferables(obj) {
|
|
1586
|
-
const transferables = [];
|
|
1587
|
-
const seen = new WeakSet;
|
|
1588
|
-
function findTransferables(value) {
|
|
1589
|
-
if (value && typeof value === "object" && seen.has(value)) {
|
|
1590
|
-
return;
|
|
1591
|
-
}
|
|
1592
|
-
if (value && typeof value === "object") {
|
|
1593
|
-
seen.add(value);
|
|
1594
|
-
}
|
|
1595
|
-
if (value instanceof Float32Array || value instanceof Int16Array) {
|
|
1596
|
-
transferables.push(value.buffer);
|
|
1597
|
-
} else if (value instanceof Uint8Array || value instanceof Uint8ClampedArray || value instanceof Int8Array || value instanceof Uint16Array || value instanceof Int32Array || value instanceof Uint32Array || value instanceof Float64Array || value instanceof BigInt64Array || value instanceof BigUint64Array) {
|
|
1598
|
-
transferables.push(value.buffer);
|
|
1599
|
-
} else if (typeof OffscreenCanvas !== "undefined" && value instanceof OffscreenCanvas) {
|
|
1600
|
-
transferables.push(value);
|
|
1601
|
-
} else if (typeof ImageBitmap !== "undefined" && value instanceof ImageBitmap) {
|
|
1602
|
-
transferables.push(value);
|
|
1603
|
-
} else if (typeof VideoFrame !== "undefined" && value instanceof VideoFrame) {
|
|
1604
|
-
transferables.push(value);
|
|
1605
|
-
} else if (typeof MessagePort !== "undefined" && value instanceof MessagePort) {
|
|
1606
|
-
transferables.push(value);
|
|
1607
|
-
} else if (value instanceof ArrayBuffer) {
|
|
1608
|
-
transferables.push(value);
|
|
1609
|
-
} else if (Array.isArray(value)) {
|
|
1610
|
-
value.forEach(findTransferables);
|
|
1611
|
-
} else if (value && typeof value === "object") {
|
|
1612
|
-
Object.values(value).forEach(findTransferables);
|
|
1613
|
-
}
|
|
1614
|
-
}
|
|
1615
|
-
findTransferables(obj);
|
|
1616
|
-
return transferables;
|
|
1617
|
-
}
|
|
1618
|
-
|
|
1619
1875
|
class WorkerManager {
|
|
1620
1876
|
workers = new Map;
|
|
1621
1877
|
readyWorkers = new Map;
|
|
1878
|
+
workerFunctions = new Map;
|
|
1879
|
+
workerStreamFunctions = new Map;
|
|
1880
|
+
workerReactiveFunctions = new Map;
|
|
1622
1881
|
registerWorker(name, worker) {
|
|
1623
1882
|
if (this.workers.has(name))
|
|
1624
1883
|
throw new Error(`Worker ${name} is already registered.`);
|
|
@@ -1634,6 +1893,9 @@ class WorkerManager {
|
|
|
1634
1893
|
const handleReady = (event) => {
|
|
1635
1894
|
if (event.data?.type === "ready") {
|
|
1636
1895
|
worker.removeEventListener("message", handleReady);
|
|
1896
|
+
this.workerFunctions.set(name, new Set(event.data.functions ?? []));
|
|
1897
|
+
this.workerStreamFunctions.set(name, new Set(event.data.streamFunctions ?? []));
|
|
1898
|
+
this.workerReactiveFunctions.set(name, new Set(event.data.reactiveFunctions ?? []));
|
|
1637
1899
|
resolve();
|
|
1638
1900
|
}
|
|
1639
1901
|
};
|
|
@@ -1652,6 +1914,10 @@ class WorkerManager {
|
|
|
1652
1914
|
if (!worker)
|
|
1653
1915
|
throw new Error(`Worker ${workerName} not found.`);
|
|
1654
1916
|
await this.readyWorkers.get(workerName);
|
|
1917
|
+
const knownFunctions = this.workerFunctions.get(workerName);
|
|
1918
|
+
if (knownFunctions && !knownFunctions.has(functionName)) {
|
|
1919
|
+
throw new Error(`Function "${functionName}" is not registered on worker "${workerName}".`);
|
|
1920
|
+
}
|
|
1655
1921
|
return new Promise((resolve, reject) => {
|
|
1656
1922
|
const requestId = crypto.randomUUID();
|
|
1657
1923
|
const handleMessage = (event) => {
|
|
@@ -1680,8 +1946,7 @@ class WorkerManager {
|
|
|
1680
1946
|
options.signal.addEventListener("abort", handleAbort, { once: true });
|
|
1681
1947
|
}
|
|
1682
1948
|
const message = { id: requestId, type: "call", functionName, args };
|
|
1683
|
-
|
|
1684
|
-
worker.postMessage(message, transferables);
|
|
1949
|
+
worker.postMessage(message);
|
|
1685
1950
|
});
|
|
1686
1951
|
}
|
|
1687
1952
|
async callWorkerReactiveFunction(workerName, functionName, args) {
|
|
@@ -1689,6 +1954,9 @@ class WorkerManager {
|
|
|
1689
1954
|
if (!worker)
|
|
1690
1955
|
return;
|
|
1691
1956
|
await this.readyWorkers.get(workerName);
|
|
1957
|
+
const knownReactive = this.workerReactiveFunctions.get(workerName);
|
|
1958
|
+
if (knownReactive && !knownReactive.has(functionName))
|
|
1959
|
+
return;
|
|
1692
1960
|
return new Promise((resolve) => {
|
|
1693
1961
|
const requestId = crypto.randomUUID();
|
|
1694
1962
|
const handleMessage = (event) => {
|
|
@@ -1708,8 +1976,7 @@ class WorkerManager {
|
|
|
1708
1976
|
};
|
|
1709
1977
|
worker.addEventListener("message", handleMessage);
|
|
1710
1978
|
const message = { id: requestId, type: "call", functionName, args, reactive: true };
|
|
1711
|
-
|
|
1712
|
-
worker.postMessage(message, transferables);
|
|
1979
|
+
worker.postMessage(message);
|
|
1713
1980
|
});
|
|
1714
1981
|
}
|
|
1715
1982
|
async* callWorkerStreamFunction(workerName, functionName, args, options) {
|
|
@@ -1717,6 +1984,11 @@ class WorkerManager {
|
|
|
1717
1984
|
if (!worker)
|
|
1718
1985
|
throw new Error(`Worker ${workerName} not found.`);
|
|
1719
1986
|
await this.readyWorkers.get(workerName);
|
|
1987
|
+
const knownStream = this.workerStreamFunctions.get(workerName);
|
|
1988
|
+
const knownFns = this.workerFunctions.get(workerName);
|
|
1989
|
+
if (knownStream && knownFns && !knownStream.has(functionName) && !knownFns.has(functionName)) {
|
|
1990
|
+
throw new Error(`Function "${functionName}" is not registered on worker "${workerName}".`);
|
|
1991
|
+
}
|
|
1720
1992
|
const requestId = crypto.randomUUID();
|
|
1721
1993
|
const queue = [];
|
|
1722
1994
|
let waiting = null;
|
|
@@ -1758,8 +2030,7 @@ class WorkerManager {
|
|
|
1758
2030
|
options.signal.addEventListener("abort", handleAbort, { once: true });
|
|
1759
2031
|
}
|
|
1760
2032
|
const message = { id: requestId, type: "call", functionName, args, stream: true };
|
|
1761
|
-
|
|
1762
|
-
worker.postMessage(message, transferables);
|
|
2033
|
+
worker.postMessage(message);
|
|
1763
2034
|
let completedNormally = false;
|
|
1764
2035
|
try {
|
|
1765
2036
|
while (true) {
|
|
@@ -1791,7 +2062,7 @@ var WORKER_MANAGER = createServiceToken("worker.manager");
|
|
|
1791
2062
|
globalServiceRegistry.register(WORKER_MANAGER, () => new WorkerManager, true);
|
|
1792
2063
|
// src/worker/WorkerServer.ts
|
|
1793
2064
|
import { parentPort } from "@workglow/util";
|
|
1794
|
-
function
|
|
2065
|
+
function extractTransferables(obj) {
|
|
1795
2066
|
const transferables = [];
|
|
1796
2067
|
const seen = new WeakSet;
|
|
1797
2068
|
function findTransferables(value) {
|
|
@@ -1845,8 +2116,9 @@ class WorkerServer {
|
|
|
1845
2116
|
return;
|
|
1846
2117
|
}
|
|
1847
2118
|
this.completedRequests.add(id);
|
|
1848
|
-
const transferables =
|
|
1849
|
-
|
|
2119
|
+
const transferables = extractTransferables(result);
|
|
2120
|
+
const uniqueTransferables = [...new Set(transferables)];
|
|
2121
|
+
postMessage({ id, type: "complete", data: result }, uniqueTransferables);
|
|
1850
2122
|
};
|
|
1851
2123
|
postError = (id, errorMessage) => {
|
|
1852
2124
|
if (this.completedRequests.has(id)) {
|
|
@@ -1861,6 +2133,14 @@ class WorkerServer {
|
|
|
1861
2133
|
}
|
|
1862
2134
|
postMessage({ id, type: "stream_chunk", data: event });
|
|
1863
2135
|
};
|
|
2136
|
+
sendReady() {
|
|
2137
|
+
postMessage({
|
|
2138
|
+
type: "ready",
|
|
2139
|
+
functions: Object.keys(this.functions),
|
|
2140
|
+
streamFunctions: Object.keys(this.streamFunctions),
|
|
2141
|
+
reactiveFunctions: Object.keys(this.reactiveFunctions)
|
|
2142
|
+
});
|
|
2143
|
+
}
|
|
1864
2144
|
registerFunction(name, fn) {
|
|
1865
2145
|
this.functions[name] = fn;
|
|
1866
2146
|
}
|
|
@@ -1976,6 +2256,248 @@ class WorkerServer {
|
|
|
1976
2256
|
}
|
|
1977
2257
|
var WORKER_SERVER = createServiceToken("worker.server");
|
|
1978
2258
|
globalServiceRegistry.register(WORKER_SERVER, () => new WorkerServer, true);
|
|
2259
|
+
// src/credentials/ICredentialStore.ts
|
|
2260
|
+
var CREDENTIAL_STORE = createServiceToken("credential.store");
|
|
2261
|
+
// src/credentials/InMemoryCredentialStore.ts
|
|
2262
|
+
class InMemoryCredentialStore {
|
|
2263
|
+
store = new Map;
|
|
2264
|
+
async get(key) {
|
|
2265
|
+
const entry = this.store.get(key);
|
|
2266
|
+
if (!entry)
|
|
2267
|
+
return;
|
|
2268
|
+
if (entry.metadata.expiresAt && entry.metadata.expiresAt <= new Date) {
|
|
2269
|
+
this.store.delete(key);
|
|
2270
|
+
return;
|
|
2271
|
+
}
|
|
2272
|
+
return entry.value;
|
|
2273
|
+
}
|
|
2274
|
+
async put(key, value, options) {
|
|
2275
|
+
const now = new Date;
|
|
2276
|
+
const existing = this.store.get(key);
|
|
2277
|
+
const metadata = {
|
|
2278
|
+
label: options?.label ?? existing?.metadata.label,
|
|
2279
|
+
provider: options?.provider ?? existing?.metadata.provider,
|
|
2280
|
+
createdAt: existing?.metadata.createdAt ?? now,
|
|
2281
|
+
updatedAt: now,
|
|
2282
|
+
expiresAt: options?.expiresAt ?? existing?.metadata.expiresAt
|
|
2283
|
+
};
|
|
2284
|
+
this.store.set(key, { key, value, metadata });
|
|
2285
|
+
}
|
|
2286
|
+
async delete(key) {
|
|
2287
|
+
return this.store.delete(key);
|
|
2288
|
+
}
|
|
2289
|
+
async has(key) {
|
|
2290
|
+
const entry = this.store.get(key);
|
|
2291
|
+
if (!entry)
|
|
2292
|
+
return false;
|
|
2293
|
+
if (entry.metadata.expiresAt && entry.metadata.expiresAt <= new Date) {
|
|
2294
|
+
this.store.delete(key);
|
|
2295
|
+
return false;
|
|
2296
|
+
}
|
|
2297
|
+
return true;
|
|
2298
|
+
}
|
|
2299
|
+
async keys() {
|
|
2300
|
+
const now = new Date;
|
|
2301
|
+
const result = [];
|
|
2302
|
+
for (const [key, entry] of this.store) {
|
|
2303
|
+
if (entry.metadata.expiresAt && entry.metadata.expiresAt <= now) {
|
|
2304
|
+
this.store.delete(key);
|
|
2305
|
+
continue;
|
|
2306
|
+
}
|
|
2307
|
+
result.push(key);
|
|
2308
|
+
}
|
|
2309
|
+
return result;
|
|
2310
|
+
}
|
|
2311
|
+
async deleteAll() {
|
|
2312
|
+
this.store.clear();
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
// src/credentials/EnvCredentialStore.ts
|
|
2316
|
+
class EnvCredentialStore {
|
|
2317
|
+
keyToEnvVar;
|
|
2318
|
+
prefix;
|
|
2319
|
+
constructor(mapping = {}, prefix) {
|
|
2320
|
+
this.keyToEnvVar = new Map(Object.entries(mapping));
|
|
2321
|
+
this.prefix = prefix;
|
|
2322
|
+
}
|
|
2323
|
+
resolveEnvVar(key) {
|
|
2324
|
+
const explicit = this.keyToEnvVar.get(key);
|
|
2325
|
+
if (explicit)
|
|
2326
|
+
return explicit;
|
|
2327
|
+
if (this.prefix) {
|
|
2328
|
+
return `${this.prefix}_${key.toUpperCase().replace(/-/g, "_")}`;
|
|
2329
|
+
}
|
|
2330
|
+
return key.toUpperCase().replace(/-/g, "_");
|
|
2331
|
+
}
|
|
2332
|
+
getEnv(envVar) {
|
|
2333
|
+
if (typeof process !== "undefined" && process.env) {
|
|
2334
|
+
return process.env[envVar];
|
|
2335
|
+
}
|
|
2336
|
+
return;
|
|
2337
|
+
}
|
|
2338
|
+
async get(key) {
|
|
2339
|
+
const envVar = this.resolveEnvVar(key);
|
|
2340
|
+
return this.getEnv(envVar);
|
|
2341
|
+
}
|
|
2342
|
+
async put(key, value, _options) {
|
|
2343
|
+
const envVar = this.resolveEnvVar(key);
|
|
2344
|
+
if (typeof process !== "undefined" && process.env) {
|
|
2345
|
+
process.env[envVar] = value;
|
|
2346
|
+
}
|
|
2347
|
+
if (!this.keyToEnvVar.has(key)) {
|
|
2348
|
+
this.keyToEnvVar.set(key, envVar);
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
async delete(key) {
|
|
2352
|
+
const envVar = this.resolveEnvVar(key);
|
|
2353
|
+
if (typeof process !== "undefined" && process.env && envVar in process.env) {
|
|
2354
|
+
delete process.env[envVar];
|
|
2355
|
+
return true;
|
|
2356
|
+
}
|
|
2357
|
+
return false;
|
|
2358
|
+
}
|
|
2359
|
+
async has(key) {
|
|
2360
|
+
const envVar = this.resolveEnvVar(key);
|
|
2361
|
+
return this.getEnv(envVar) !== undefined;
|
|
2362
|
+
}
|
|
2363
|
+
async keys() {
|
|
2364
|
+
const result = [];
|
|
2365
|
+
for (const [credKey] of this.keyToEnvVar) {
|
|
2366
|
+
if (await this.has(credKey)) {
|
|
2367
|
+
result.push(credKey);
|
|
2368
|
+
}
|
|
2369
|
+
}
|
|
2370
|
+
return result;
|
|
2371
|
+
}
|
|
2372
|
+
async deleteAll() {
|
|
2373
|
+
for (const [credKey] of this.keyToEnvVar) {
|
|
2374
|
+
await this.delete(credKey);
|
|
2375
|
+
}
|
|
2376
|
+
}
|
|
2377
|
+
}
|
|
2378
|
+
// src/credentials/ChainedCredentialStore.ts
|
|
2379
|
+
class ChainedCredentialStore {
|
|
2380
|
+
stores;
|
|
2381
|
+
constructor(stores) {
|
|
2382
|
+
this.stores = stores;
|
|
2383
|
+
if (stores.length === 0) {
|
|
2384
|
+
throw new Error("ChainedCredentialStore requires at least one store.");
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
async get(key) {
|
|
2388
|
+
for (const store of this.stores) {
|
|
2389
|
+
const value = await store.get(key);
|
|
2390
|
+
if (value !== undefined)
|
|
2391
|
+
return value;
|
|
2392
|
+
}
|
|
2393
|
+
return;
|
|
2394
|
+
}
|
|
2395
|
+
async put(key, value, options) {
|
|
2396
|
+
await this.stores[0].put(key, value, options);
|
|
2397
|
+
}
|
|
2398
|
+
async delete(key) {
|
|
2399
|
+
let deleted = false;
|
|
2400
|
+
for (const store of this.stores) {
|
|
2401
|
+
if (await store.delete(key)) {
|
|
2402
|
+
deleted = true;
|
|
2403
|
+
}
|
|
2404
|
+
}
|
|
2405
|
+
return deleted;
|
|
2406
|
+
}
|
|
2407
|
+
async has(key) {
|
|
2408
|
+
for (const store of this.stores) {
|
|
2409
|
+
if (await store.has(key))
|
|
2410
|
+
return true;
|
|
2411
|
+
}
|
|
2412
|
+
return false;
|
|
2413
|
+
}
|
|
2414
|
+
async keys() {
|
|
2415
|
+
const seen = new Set;
|
|
2416
|
+
for (const store of this.stores) {
|
|
2417
|
+
for (const key of await store.keys()) {
|
|
2418
|
+
seen.add(key);
|
|
2419
|
+
}
|
|
2420
|
+
}
|
|
2421
|
+
return [...seen];
|
|
2422
|
+
}
|
|
2423
|
+
async deleteAll() {
|
|
2424
|
+
await Promise.all(this.stores.map((s) => s.deleteAll()));
|
|
2425
|
+
}
|
|
2426
|
+
}
|
|
2427
|
+
// src/credentials/CredentialStoreRegistry.ts
|
|
2428
|
+
if (!globalServiceRegistry.has(CREDENTIAL_STORE)) {
|
|
2429
|
+
globalServiceRegistry.register(CREDENTIAL_STORE, () => new InMemoryCredentialStore, true);
|
|
2430
|
+
}
|
|
2431
|
+
function getGlobalCredentialStore() {
|
|
2432
|
+
return globalServiceRegistry.get(CREDENTIAL_STORE);
|
|
2433
|
+
}
|
|
2434
|
+
function setGlobalCredentialStore(store) {
|
|
2435
|
+
globalServiceRegistry.registerInstance(CREDENTIAL_STORE, store);
|
|
2436
|
+
}
|
|
2437
|
+
async function resolveCredential(key, registry) {
|
|
2438
|
+
const store = registry && registry.has(CREDENTIAL_STORE) ? registry.get(CREDENTIAL_STORE) : getGlobalCredentialStore();
|
|
2439
|
+
return store.get(key);
|
|
2440
|
+
}
|
|
2441
|
+
registerInputResolver("credential", async (id, _format, registry) => {
|
|
2442
|
+
return await resolveCredential(id, registry) ?? id;
|
|
2443
|
+
});
|
|
2444
|
+
// src/crypto/WebCrypto.ts
|
|
2445
|
+
var SALT_LENGTH = 16;
|
|
2446
|
+
async function deriveKey(passphrase, salt) {
|
|
2447
|
+
const enc = new TextEncoder;
|
|
2448
|
+
const keyMaterial = await crypto.subtle.importKey("raw", enc.encode(passphrase), "PBKDF2", false, [
|
|
2449
|
+
"deriveKey"
|
|
2450
|
+
]);
|
|
2451
|
+
return crypto.subtle.deriveKey({ name: "PBKDF2", salt, iterations: 1e5, hash: "SHA-256" }, keyMaterial, { name: "AES-GCM", length: 256 }, false, ["encrypt", "decrypt"]);
|
|
2452
|
+
}
|
|
2453
|
+
async function encrypt(plaintext, passphrase, keyCache) {
|
|
2454
|
+
const enc = new TextEncoder;
|
|
2455
|
+
const salt = crypto.getRandomValues(new Uint8Array(SALT_LENGTH));
|
|
2456
|
+
const saltB64 = bufToBase64(salt);
|
|
2457
|
+
let key = keyCache.get(saltB64);
|
|
2458
|
+
if (!key) {
|
|
2459
|
+
key = await deriveKey(passphrase, salt);
|
|
2460
|
+
keyCache.set(saltB64, key);
|
|
2461
|
+
}
|
|
2462
|
+
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
2463
|
+
const rawCiphertext = await crypto.subtle.encrypt({ name: "AES-GCM", iv }, key, enc.encode(plaintext));
|
|
2464
|
+
const ciphertextBytes = new Uint8Array(rawCiphertext);
|
|
2465
|
+
const combined = new Uint8Array(SALT_LENGTH + ciphertextBytes.length);
|
|
2466
|
+
combined.set(salt, 0);
|
|
2467
|
+
combined.set(ciphertextBytes, SALT_LENGTH);
|
|
2468
|
+
return {
|
|
2469
|
+
encrypted: bufToBase64(combined),
|
|
2470
|
+
iv: bufToBase64(iv)
|
|
2471
|
+
};
|
|
2472
|
+
}
|
|
2473
|
+
async function decrypt(encrypted, iv, passphrase, keyCache) {
|
|
2474
|
+
const encryptedBuf = base64ToBuf(encrypted);
|
|
2475
|
+
const salt = encryptedBuf.subarray(0, SALT_LENGTH);
|
|
2476
|
+
const ciphertextBytes = encryptedBuf.subarray(SALT_LENGTH);
|
|
2477
|
+
const saltB64 = bufToBase64(salt);
|
|
2478
|
+
let key = keyCache.get(saltB64);
|
|
2479
|
+
if (!key) {
|
|
2480
|
+
key = await deriveKey(passphrase, salt);
|
|
2481
|
+
keyCache.set(saltB64, key);
|
|
2482
|
+
}
|
|
2483
|
+
const plainBuf = await crypto.subtle.decrypt({ name: "AES-GCM", iv: base64ToBuf(iv) }, key, ciphertextBytes);
|
|
2484
|
+
return new TextDecoder().decode(plainBuf);
|
|
2485
|
+
}
|
|
2486
|
+
function bufToBase64(buf) {
|
|
2487
|
+
let binary = "";
|
|
2488
|
+
for (let i = 0;i < buf.length; i++) {
|
|
2489
|
+
binary += String.fromCharCode(buf[i]);
|
|
2490
|
+
}
|
|
2491
|
+
return btoa(binary);
|
|
2492
|
+
}
|
|
2493
|
+
function base64ToBuf(b64) {
|
|
2494
|
+
const binary = atob(b64);
|
|
2495
|
+
const buf = new Uint8Array(binary.length);
|
|
2496
|
+
for (let i = 0;i < binary.length; i++) {
|
|
2497
|
+
buf[i] = binary.charCodeAt(i);
|
|
2498
|
+
}
|
|
2499
|
+
return buf;
|
|
2500
|
+
}
|
|
1979
2501
|
// src/compress/compress.node.ts
|
|
1980
2502
|
import { promisify } from "util";
|
|
1981
2503
|
import zlib from "zlib";
|
|
@@ -1995,18 +2517,6 @@ async function decompress(input, algorithm = "gzip") {
|
|
|
1995
2517
|
const resultBuffer = await decompressAsyncTyped(sourceBuffer);
|
|
1996
2518
|
return resultBuffer.toString();
|
|
1997
2519
|
}
|
|
1998
|
-
// src/crypto/Crypto.bun.ts
|
|
1999
|
-
async function sha256(data) {
|
|
2000
|
-
return new Bun.CryptoHasher("sha256").update(data).digest("hex");
|
|
2001
|
-
}
|
|
2002
|
-
async function makeFingerprint(input) {
|
|
2003
|
-
const serializedObj = serialize(input);
|
|
2004
|
-
const hash = await sha256(serializedObj);
|
|
2005
|
-
return hash;
|
|
2006
|
-
}
|
|
2007
|
-
function uuid4() {
|
|
2008
|
-
return crypto.randomUUID();
|
|
2009
|
-
}
|
|
2010
2520
|
// src/mcp/McpClientUtil.node.ts
|
|
2011
2521
|
import { Client } from "@modelcontextprotocol/sdk/client";
|
|
2012
2522
|
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
|
|
@@ -2131,8 +2641,12 @@ export {
|
|
|
2131
2641
|
sortObject,
|
|
2132
2642
|
sleep,
|
|
2133
2643
|
sha256,
|
|
2644
|
+
setLogger,
|
|
2645
|
+
setGlobalCredentialStore,
|
|
2134
2646
|
serialize,
|
|
2647
|
+
resolveCredential,
|
|
2135
2648
|
registerInputResolver,
|
|
2649
|
+
parsePartialJson,
|
|
2136
2650
|
parseDataUri,
|
|
2137
2651
|
parentPort2 as parentPort,
|
|
2138
2652
|
objectOfArraysAsArrayOfObjects,
|
|
@@ -2150,9 +2664,14 @@ export {
|
|
|
2150
2664
|
hammingDistance,
|
|
2151
2665
|
globalServiceRegistry,
|
|
2152
2666
|
globalContainer,
|
|
2667
|
+
getLogger,
|
|
2153
2668
|
getInputResolvers,
|
|
2669
|
+
getGlobalCredentialStore,
|
|
2154
2670
|
forceArray,
|
|
2671
|
+
encrypt,
|
|
2672
|
+
deriveKey,
|
|
2155
2673
|
deepEqual,
|
|
2674
|
+
decrypt,
|
|
2156
2675
|
decompress,
|
|
2157
2676
|
createTypedArrayFrom,
|
|
2158
2677
|
createServiceToken,
|
|
@@ -2162,6 +2681,8 @@ export {
|
|
|
2162
2681
|
compress,
|
|
2163
2682
|
compileSchema,
|
|
2164
2683
|
collectPropertyValues,
|
|
2684
|
+
bufToBase64,
|
|
2685
|
+
base64ToBuf,
|
|
2165
2686
|
areSemanticallyCompatible,
|
|
2166
2687
|
areObjectSchemasSemanticallyCompatible,
|
|
2167
2688
|
WorkerServer,
|
|
@@ -2173,17 +2694,24 @@ export {
|
|
|
2173
2694
|
TensorType,
|
|
2174
2695
|
TensorSchema,
|
|
2175
2696
|
ServiceRegistry,
|
|
2697
|
+
NullLogger,
|
|
2176
2698
|
NodeDoesntExistError,
|
|
2177
2699
|
NodeAlreadyExistsError,
|
|
2700
|
+
LOGGER,
|
|
2701
|
+
InMemoryCredentialStore,
|
|
2178
2702
|
INPUT_RESOLVERS,
|
|
2179
2703
|
Graph,
|
|
2180
2704
|
FromSchemaDefaultOptions,
|
|
2181
2705
|
EventEmitter,
|
|
2706
|
+
EnvCredentialStore,
|
|
2182
2707
|
DirectedGraph,
|
|
2183
2708
|
DirectedAcyclicGraph,
|
|
2184
2709
|
CycleError,
|
|
2185
2710
|
Container,
|
|
2711
|
+
ConsoleLogger,
|
|
2712
|
+
ChainedCredentialStore,
|
|
2713
|
+
CREDENTIAL_STORE,
|
|
2186
2714
|
BaseError
|
|
2187
2715
|
};
|
|
2188
2716
|
|
|
2189
|
-
//# debugId=
|
|
2717
|
+
//# debugId=4DD1902F8EFD47AB64756E2164756E21
|