@octaviaflow/telemetry 1.1.1 → 1.1.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/dist/__tests__/mocks/mongodb.mock.d.ts +22 -0
- package/dist/__tests__/mocks/mongodb.mock.d.ts.map +1 -0
- package/dist/__tests__/mocks/mongodb.mock.js +87 -0
- package/dist/__tests__/mocks/mongodb.mock.js.map +1 -0
- package/dist/__tests__/setup.d.ts +10 -0
- package/dist/__tests__/setup.d.ts.map +1 -0
- package/dist/__tests__/setup.js +28 -0
- package/dist/__tests__/setup.js.map +1 -0
- package/dist/collect.bundle.js +71 -19
- package/dist/collect.bundle.js.map +3 -3
- package/dist/collect.js +14 -20
- package/dist/collect.js.map +1 -1
- package/dist/config/__tests__/config-loader.test.d.ts +10 -0
- package/dist/config/__tests__/config-loader.test.d.ts.map +1 -0
- package/dist/config/__tests__/config-loader.test.js +378 -0
- package/dist/config/__tests__/config-loader.test.js.map +1 -0
- package/dist/config/__tests__/credential-manager.test.d.ts +10 -0
- package/dist/config/__tests__/credential-manager.test.d.ts.map +1 -0
- package/dist/config/__tests__/credential-manager.test.js +297 -0
- package/dist/config/__tests__/credential-manager.test.js.map +1 -0
- package/dist/config/config-loader.d.ts +3 -3
- package/dist/config/config-loader.d.ts.map +1 -1
- package/dist/config/config-loader.js +20 -20
- package/dist/config/config-loader.js.map +1 -1
- package/dist/config/credential-manager.d.ts +3 -3
- package/dist/config/credential-manager.d.ts.map +1 -1
- package/dist/config/credential-manager.js +49 -49
- package/dist/config/credential-manager.js.map +1 -1
- package/dist/core/telemetry-collector.d.ts +4 -4
- package/dist/core/telemetry-collector.d.ts.map +1 -1
- package/dist/core/telemetry-collector.js +72 -65
- package/dist/core/telemetry-collector.js.map +1 -1
- package/dist/index.d.ts +19 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -7
- package/dist/index.js.map +1 -1
- package/dist/integrations/__tests__/react-telemetry.test.d.ts +10 -0
- package/dist/integrations/__tests__/react-telemetry.test.d.ts.map +1 -0
- package/dist/integrations/__tests__/react-telemetry.test.js +166 -0
- package/dist/integrations/__tests__/react-telemetry.test.js.map +1 -0
- package/dist/integrations/react-telemetry.d.ts +6 -2
- package/dist/integrations/react-telemetry.d.ts.map +1 -1
- package/dist/integrations/react-telemetry.js +64 -42
- package/dist/integrations/react-telemetry.js.map +1 -1
- package/dist/storage/__tests__/file-storage.test.d.ts +10 -0
- package/dist/storage/__tests__/file-storage.test.d.ts.map +1 -0
- package/dist/storage/__tests__/file-storage.test.js +260 -0
- package/dist/storage/__tests__/file-storage.test.js.map +1 -0
- package/dist/storage/__tests__/mongodb-storage.test.d.ts +10 -0
- package/dist/storage/__tests__/mongodb-storage.test.d.ts.map +1 -0
- package/dist/storage/__tests__/mongodb-storage.test.js +308 -0
- package/dist/storage/__tests__/mongodb-storage.test.js.map +1 -0
- package/dist/storage/mongodb-storage.d.ts +4 -4
- package/dist/storage/mongodb-storage.d.ts.map +1 -1
- package/dist/storage/mongodb-storage.js +34 -31
- package/dist/storage/mongodb-storage.js.map +1 -1
- package/dist/storage/resilient-storage.d.ts +8 -5
- package/dist/storage/resilient-storage.d.ts.map +1 -1
- package/dist/storage/resilient-storage.js +35 -26
- package/dist/storage/resilient-storage.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 31/January/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* MongoDB mock for testing
|
|
11
|
+
*/
|
|
12
|
+
export declare class MockMongoClient {
|
|
13
|
+
private connected;
|
|
14
|
+
private mockDb;
|
|
15
|
+
constructor(connectionString: string, options?: any);
|
|
16
|
+
connect(): Promise<void>;
|
|
17
|
+
close(): Promise<void>;
|
|
18
|
+
db(name: string): any;
|
|
19
|
+
isConnected(): boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const mockMongoClient: typeof MockMongoClient;
|
|
22
|
+
//# sourceMappingURL=mongodb.mock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongodb.mock.d.ts","sourceRoot":"","sources":["../../../src/__tests__/mocks/mongodb.mock.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AAEH,qBAAa,eAAe;IAC1B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,MAAM,CAAM;gBAER,gBAAgB,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,GAAG;IAI7C,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAIxB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAI5B,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG;IAIrB,WAAW,IAAI,OAAO;CAGvB;AAmED,eAAO,MAAM,eAAe,wBAAkB,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 31/January/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* MongoDB mock for testing
|
|
11
|
+
*/
|
|
12
|
+
export class MockMongoClient {
|
|
13
|
+
connected = false;
|
|
14
|
+
mockDb;
|
|
15
|
+
constructor(connectionString, options) {
|
|
16
|
+
this.mockDb = new MockDb();
|
|
17
|
+
}
|
|
18
|
+
async connect() {
|
|
19
|
+
this.connected = true;
|
|
20
|
+
}
|
|
21
|
+
async close() {
|
|
22
|
+
this.connected = false;
|
|
23
|
+
}
|
|
24
|
+
db(name) {
|
|
25
|
+
return this.mockDb;
|
|
26
|
+
}
|
|
27
|
+
isConnected() {
|
|
28
|
+
return this.connected;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
class MockDb {
|
|
32
|
+
collections = new Map();
|
|
33
|
+
collection(name) {
|
|
34
|
+
if (!this.collections.has(name)) {
|
|
35
|
+
this.collections.set(name, new MockCollection());
|
|
36
|
+
}
|
|
37
|
+
return this.collections.get(name);
|
|
38
|
+
}
|
|
39
|
+
async stats() {
|
|
40
|
+
return {
|
|
41
|
+
collections: this.collections.size,
|
|
42
|
+
dataSize: 1024,
|
|
43
|
+
storageSize: 2048,
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
async command(cmd) {
|
|
47
|
+
if (cmd.ping) {
|
|
48
|
+
return { ok: 1 };
|
|
49
|
+
}
|
|
50
|
+
if (cmd.collStats) {
|
|
51
|
+
return {
|
|
52
|
+
count: 100,
|
|
53
|
+
size: 1024,
|
|
54
|
+
avgObjSize: 10,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
return { ok: 1 };
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class MockCollection {
|
|
61
|
+
documents = [];
|
|
62
|
+
indexes = [];
|
|
63
|
+
async insertOne(doc) {
|
|
64
|
+
this.documents.push(doc);
|
|
65
|
+
return { insertedId: "mock-id", acknowledged: true };
|
|
66
|
+
}
|
|
67
|
+
async insertMany(docs, options) {
|
|
68
|
+
this.documents.push(...docs);
|
|
69
|
+
return {
|
|
70
|
+
insertedCount: docs.length,
|
|
71
|
+
insertedIds: docs.map((_, i) => `mock-id-${i}`),
|
|
72
|
+
acknowledged: true,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
async createIndex(keys) {
|
|
76
|
+
this.indexes.push(keys);
|
|
77
|
+
return "mock-index";
|
|
78
|
+
}
|
|
79
|
+
getDocuments() {
|
|
80
|
+
return this.documents;
|
|
81
|
+
}
|
|
82
|
+
clearDocuments() {
|
|
83
|
+
this.documents = [];
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
export const mockMongoClient = MockMongoClient;
|
|
87
|
+
//# sourceMappingURL=mongodb.mock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mongodb.mock.js","sourceRoot":"","sources":["../../../src/__tests__/mocks/mongodb.mock.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AAEH,MAAM,OAAO,eAAe;IAClB,SAAS,GAAG,KAAK,CAAC;IAClB,MAAM,CAAM;IAEpB,YAAY,gBAAwB,EAAE,OAAa;QACjD,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;IAC7B,CAAC;IAED,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IACxB,CAAC;IAED,KAAK,CAAC,KAAK;QACT,IAAI,CAAC,SAAS,GAAG,KAAK,CAAC;IACzB,CAAC;IAED,EAAE,CAAC,IAAY;QACb,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,WAAW;QACT,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF;AAED,MAAM,MAAM;IACF,WAAW,GAAG,IAAI,GAAG,EAAE,CAAC;IAEhC,UAAU,CAAC,IAAY;QACrB,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,cAAc,EAAE,CAAC,CAAC;QACnD,CAAC;QACD,OAAO,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,KAAK,CAAC,KAAK;QACT,OAAO;YACL,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,IAAI;YAClC,QAAQ,EAAE,IAAI;YACd,WAAW,EAAE,IAAI;SAClB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAQ;QACpB,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;YACb,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;QACnB,CAAC;QACD,IAAI,GAAG,CAAC,SAAS,EAAE,CAAC;YAClB,OAAO;gBACL,KAAK,EAAE,GAAG;gBACV,IAAI,EAAE,IAAI;gBACV,UAAU,EAAE,EAAE;aACf,CAAC;QACJ,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC;IACnB,CAAC;CACF;AAED,MAAM,cAAc;IACV,SAAS,GAAU,EAAE,CAAC;IACtB,OAAO,GAAU,EAAE,CAAC;IAE5B,KAAK,CAAC,SAAS,CAAC,GAAQ;QACtB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACzB,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC;IACvD,CAAC;IAED,KAAK,CAAC,UAAU,CAAC,IAAW,EAAE,OAAa;QACzC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;QAC7B,OAAO;YACL,aAAa,EAAE,IAAI,CAAC,MAAM;YAC1B,WAAW,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,WAAW,CAAC,EAAE,CAAC;YAC/C,YAAY,EAAE,IAAI;SACnB,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,WAAW,CAAC,IAAS;QACzB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACxB,OAAO,YAAY,CAAC;IACtB,CAAC;IAED,YAAY;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;IAED,cAAc;QACZ,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IACtB,CAAC;CACF;AAED,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 31/January/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright OctaviaFlow
|
|
3
|
+
* Author: Vishal Kumar
|
|
4
|
+
* Created: 31/January/2025
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Test setup and global configuration
|
|
11
|
+
*/
|
|
12
|
+
import { beforeAll, afterAll, afterEach } from "vitest";
|
|
13
|
+
// Mock environment variables
|
|
14
|
+
beforeAll(() => {
|
|
15
|
+
process.env.NODE_ENV = "test";
|
|
16
|
+
});
|
|
17
|
+
// Clean up after each test
|
|
18
|
+
afterEach(() => {
|
|
19
|
+
// Clear any test-specific environment variables
|
|
20
|
+
delete process.env.OCTAVIAFLOW_TELEMETRY_DISABLED;
|
|
21
|
+
delete process.env.OCTAVIAFLOW_TELEMETRY_DB_USERNAME;
|
|
22
|
+
delete process.env.OCTAVIAFLOW_TELEMETRY_DB_PASSWORD;
|
|
23
|
+
});
|
|
24
|
+
// Global teardown
|
|
25
|
+
afterAll(() => {
|
|
26
|
+
// Clean up any resources
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.js","sourceRoot":"","sources":["../../src/__tests__/setup.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAExD,6BAA6B;AAC7B,SAAS,CAAC,GAAG,EAAE;IACb,OAAO,CAAC,GAAG,CAAC,QAAQ,GAAG,MAAM,CAAC;AAChC,CAAC,CAAC,CAAC;AAEH,2BAA2B;AAC3B,SAAS,CAAC,GAAG,EAAE;IACb,gDAAgD;IAChD,OAAO,OAAO,CAAC,GAAG,CAAC,8BAA8B,CAAC;IAClD,OAAO,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC;IACrD,OAAO,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC;AACvD,CAAC,CAAC,CAAC;AAEH,kBAAkB;AAClB,QAAQ,CAAC,GAAG,EAAE;IACZ,yBAAyB;AAC3B,CAAC,CAAC,CAAC"}
|
package/dist/collect.bundle.js
CHANGED
|
@@ -3025,9 +3025,9 @@ var require_commander = __commonJS({
|
|
|
3025
3025
|
}
|
|
3026
3026
|
});
|
|
3027
3027
|
|
|
3028
|
-
// ../../node_modules/.bun/bson@7.
|
|
3028
|
+
// ../../node_modules/.bun/bson@7.1.1/node_modules/bson/lib/bson.cjs
|
|
3029
3029
|
var require_bson = __commonJS({
|
|
3030
|
-
"../../node_modules/.bun/bson@7.
|
|
3030
|
+
"../../node_modules/.bun/bson@7.1.1/node_modules/bson/lib/bson.cjs"(exports) {
|
|
3031
3031
|
"use strict";
|
|
3032
3032
|
var TypedArrayPrototypeGetSymbolToStringTag = (() => {
|
|
3033
3033
|
const g = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag).get;
|
|
@@ -3232,6 +3232,7 @@ var require_bson = __commonJS({
|
|
|
3232
3232
|
}
|
|
3233
3233
|
})();
|
|
3234
3234
|
var nodeJsByteUtils = {
|
|
3235
|
+
isUint8Array,
|
|
3235
3236
|
toLocalBufferType(potentialBuffer) {
|
|
3236
3237
|
if (Buffer.isBuffer(potentialBuffer)) {
|
|
3237
3238
|
return potentialBuffer;
|
|
@@ -3251,6 +3252,12 @@ var require_bson = __commonJS({
|
|
|
3251
3252
|
allocateUnsafe(size) {
|
|
3252
3253
|
return Buffer.allocUnsafe(size);
|
|
3253
3254
|
},
|
|
3255
|
+
compare(a, b) {
|
|
3256
|
+
return nodeJsByteUtils.toLocalBufferType(a).compare(b);
|
|
3257
|
+
},
|
|
3258
|
+
concat(list) {
|
|
3259
|
+
return Buffer.concat(list);
|
|
3260
|
+
},
|
|
3254
3261
|
equals(a, b) {
|
|
3255
3262
|
return nodeJsByteUtils.toLocalBufferType(a).equals(b);
|
|
3256
3263
|
},
|
|
@@ -3260,6 +3267,9 @@ var require_bson = __commonJS({
|
|
|
3260
3267
|
fromBase64(base64) {
|
|
3261
3268
|
return Buffer.from(base64, "base64");
|
|
3262
3269
|
},
|
|
3270
|
+
fromUTF8(utf8) {
|
|
3271
|
+
return Buffer.from(utf8, "utf8");
|
|
3272
|
+
},
|
|
3263
3273
|
toBase64(buffer2) {
|
|
3264
3274
|
return nodeJsByteUtils.toLocalBufferType(buffer2).toString("base64");
|
|
3265
3275
|
},
|
|
@@ -3332,6 +3342,7 @@ var require_bson = __commonJS({
|
|
|
3332
3342
|
})();
|
|
3333
3343
|
var HEX_DIGIT = /(\d|[a-f])/i;
|
|
3334
3344
|
var webByteUtils = {
|
|
3345
|
+
isUint8Array,
|
|
3335
3346
|
toLocalBufferType(potentialUint8array) {
|
|
3336
3347
|
const stringTag = potentialUint8array?.[Symbol.toStringTag] ?? Object.prototype.toString.call(potentialUint8array);
|
|
3337
3348
|
if (stringTag === "Uint8Array") {
|
|
@@ -3354,12 +3365,43 @@ var require_bson = __commonJS({
|
|
|
3354
3365
|
allocateUnsafe(size) {
|
|
3355
3366
|
return webByteUtils.allocate(size);
|
|
3356
3367
|
},
|
|
3357
|
-
|
|
3358
|
-
if (
|
|
3368
|
+
compare(uint8Array, otherUint8Array) {
|
|
3369
|
+
if (uint8Array === otherUint8Array)
|
|
3370
|
+
return 0;
|
|
3371
|
+
const len = Math.min(uint8Array.length, otherUint8Array.length);
|
|
3372
|
+
for (let i = 0; i < len; i++) {
|
|
3373
|
+
if (uint8Array[i] < otherUint8Array[i])
|
|
3374
|
+
return -1;
|
|
3375
|
+
if (uint8Array[i] > otherUint8Array[i])
|
|
3376
|
+
return 1;
|
|
3377
|
+
}
|
|
3378
|
+
if (uint8Array.length < otherUint8Array.length)
|
|
3379
|
+
return -1;
|
|
3380
|
+
if (uint8Array.length > otherUint8Array.length)
|
|
3381
|
+
return 1;
|
|
3382
|
+
return 0;
|
|
3383
|
+
},
|
|
3384
|
+
concat(uint8Arrays) {
|
|
3385
|
+
if (uint8Arrays.length === 0)
|
|
3386
|
+
return webByteUtils.allocate(0);
|
|
3387
|
+
let totalLength = 0;
|
|
3388
|
+
for (const uint8Array of uint8Arrays) {
|
|
3389
|
+
totalLength += uint8Array.length;
|
|
3390
|
+
}
|
|
3391
|
+
const result = webByteUtils.allocate(totalLength);
|
|
3392
|
+
let offset = 0;
|
|
3393
|
+
for (const uint8Array of uint8Arrays) {
|
|
3394
|
+
result.set(uint8Array, offset);
|
|
3395
|
+
offset += uint8Array.length;
|
|
3396
|
+
}
|
|
3397
|
+
return result;
|
|
3398
|
+
},
|
|
3399
|
+
equals(uint8Array, otherUint8Array) {
|
|
3400
|
+
if (uint8Array.byteLength !== otherUint8Array.byteLength) {
|
|
3359
3401
|
return false;
|
|
3360
3402
|
}
|
|
3361
|
-
for (let i = 0; i <
|
|
3362
|
-
if (
|
|
3403
|
+
for (let i = 0; i < uint8Array.byteLength; i++) {
|
|
3404
|
+
if (uint8Array[i] !== otherUint8Array[i]) {
|
|
3363
3405
|
return false;
|
|
3364
3406
|
}
|
|
3365
3407
|
}
|
|
@@ -3371,6 +3413,9 @@ var require_bson = __commonJS({
|
|
|
3371
3413
|
fromBase64(base64) {
|
|
3372
3414
|
return Uint8Array.from(atob(base64), (c) => c.charCodeAt(0));
|
|
3373
3415
|
},
|
|
3416
|
+
fromUTF8(utf8) {
|
|
3417
|
+
return new TextEncoder().encode(utf8);
|
|
3418
|
+
},
|
|
3374
3419
|
toBase64(uint8array) {
|
|
3375
3420
|
return btoa(webByteUtils.toISO88591(uint8array));
|
|
3376
3421
|
},
|
|
@@ -7244,6 +7289,7 @@ var require_bson = __commonJS({
|
|
|
7244
7289
|
BSONValue,
|
|
7245
7290
|
BSONVersionError,
|
|
7246
7291
|
Binary,
|
|
7292
|
+
ByteUtils,
|
|
7247
7293
|
Code,
|
|
7248
7294
|
DBRef,
|
|
7249
7295
|
Decimal128,
|
|
@@ -7253,6 +7299,7 @@ var require_bson = __commonJS({
|
|
|
7253
7299
|
Long,
|
|
7254
7300
|
MaxKey,
|
|
7255
7301
|
MinKey,
|
|
7302
|
+
NumberUtils,
|
|
7256
7303
|
ObjectId,
|
|
7257
7304
|
Timestamp,
|
|
7258
7305
|
UUID,
|
|
@@ -7275,6 +7322,7 @@ var require_bson = __commonJS({
|
|
|
7275
7322
|
exports.BSONValue = BSONValue;
|
|
7276
7323
|
exports.BSONVersionError = BSONVersionError;
|
|
7277
7324
|
exports.Binary = Binary;
|
|
7325
|
+
exports.ByteUtils = ByteUtils;
|
|
7278
7326
|
exports.Code = Code;
|
|
7279
7327
|
exports.DBRef = DBRef;
|
|
7280
7328
|
exports.Decimal128 = Decimal128;
|
|
@@ -7284,6 +7332,7 @@ var require_bson = __commonJS({
|
|
|
7284
7332
|
exports.Long = Long;
|
|
7285
7333
|
exports.MaxKey = MaxKey;
|
|
7286
7334
|
exports.MinKey = MinKey;
|
|
7335
|
+
exports.NumberUtils = NumberUtils;
|
|
7287
7336
|
exports.ObjectId = ObjectId;
|
|
7288
7337
|
exports.Timestamp = Timestamp;
|
|
7289
7338
|
exports.UUID = UUID;
|
|
@@ -26712,9 +26761,9 @@ var require_whatwg_url = __commonJS({
|
|
|
26712
26761
|
}
|
|
26713
26762
|
});
|
|
26714
26763
|
|
|
26715
|
-
// ../../node_modules/.bun/mongodb-connection-string-url@7.0.
|
|
26764
|
+
// ../../node_modules/.bun/mongodb-connection-string-url@7.0.1/node_modules/mongodb-connection-string-url/lib/redact.js
|
|
26716
26765
|
var require_redact = __commonJS({
|
|
26717
|
-
"../../node_modules/.bun/mongodb-connection-string-url@7.0.
|
|
26766
|
+
"../../node_modules/.bun/mongodb-connection-string-url@7.0.1/node_modules/mongodb-connection-string-url/lib/redact.js"(exports) {
|
|
26718
26767
|
"use strict";
|
|
26719
26768
|
var __createBinding = exports && exports.__createBinding || (Object.create ? (function(o, m, k, k2) {
|
|
26720
26769
|
if (k2 === void 0) k2 = k;
|
|
@@ -26813,9 +26862,9 @@ var require_redact = __commonJS({
|
|
|
26813
26862
|
}
|
|
26814
26863
|
});
|
|
26815
26864
|
|
|
26816
|
-
// ../../node_modules/.bun/mongodb-connection-string-url@7.0.
|
|
26865
|
+
// ../../node_modules/.bun/mongodb-connection-string-url@7.0.1/node_modules/mongodb-connection-string-url/lib/index.js
|
|
26817
26866
|
var require_lib2 = __commonJS({
|
|
26818
|
-
"../../node_modules/.bun/mongodb-connection-string-url@7.0.
|
|
26867
|
+
"../../node_modules/.bun/mongodb-connection-string-url@7.0.1/node_modules/mongodb-connection-string-url/lib/index.js"(exports) {
|
|
26819
26868
|
"use strict";
|
|
26820
26869
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26821
26870
|
exports.CommaAndColonSeparatedRecord = exports.ConnectionString = exports.redactConnectionString = void 0;
|
|
@@ -34480,9 +34529,9 @@ var require_plain = __commonJS({
|
|
|
34480
34529
|
}
|
|
34481
34530
|
});
|
|
34482
34531
|
|
|
34483
|
-
// ../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34532
|
+
// ../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/index.js
|
|
34484
34533
|
var require_dist = __commonJS({
|
|
34485
|
-
"../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34534
|
+
"../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/index.js"(exports, module) {
|
|
34486
34535
|
"use strict";
|
|
34487
34536
|
var getCodePoint = (character) => character.codePointAt(0);
|
|
34488
34537
|
var first = (x) => x[0];
|
|
@@ -34757,9 +34806,9 @@ var require_sparse_bitfield = __commonJS({
|
|
|
34757
34806
|
}
|
|
34758
34807
|
});
|
|
34759
34808
|
|
|
34760
|
-
// ../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34809
|
+
// ../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js
|
|
34761
34810
|
var require_memory_code_points = __commonJS({
|
|
34762
|
-
"../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34811
|
+
"../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/memory-code-points.js"(exports) {
|
|
34763
34812
|
"use strict";
|
|
34764
34813
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
34765
34814
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -34794,9 +34843,9 @@ var require_memory_code_points = __commonJS({
|
|
|
34794
34843
|
}
|
|
34795
34844
|
});
|
|
34796
34845
|
|
|
34797
|
-
// ../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34846
|
+
// ../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/code-points-data.js
|
|
34798
34847
|
var require_code_points_data = __commonJS({
|
|
34799
|
-
"../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34848
|
+
"../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/code-points-data.js"(exports) {
|
|
34800
34849
|
"use strict";
|
|
34801
34850
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
34802
34851
|
var zlib_1 = __require("zlib");
|
|
@@ -34804,9 +34853,9 @@ var require_code_points_data = __commonJS({
|
|
|
34804
34853
|
}
|
|
34805
34854
|
});
|
|
34806
34855
|
|
|
34807
|
-
// ../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34856
|
+
// ../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/node.js
|
|
34808
34857
|
var require_node = __commonJS({
|
|
34809
|
-
"../../node_modules/.bun/@mongodb-js+saslprep@1.
|
|
34858
|
+
"../../node_modules/.bun/@mongodb-js+saslprep@1.4.5/node_modules/@mongodb-js/saslprep/dist/node.js"(exports, module) {
|
|
34810
34859
|
"use strict";
|
|
34811
34860
|
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
34812
34861
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
@@ -39102,7 +39151,10 @@ var MongoDBStorage = class {
|
|
|
39102
39151
|
if (!this.db || !this.isConnected) {
|
|
39103
39152
|
return {
|
|
39104
39153
|
database: { name: this.config.databaseName, status: "disconnected" },
|
|
39105
|
-
collection: {
|
|
39154
|
+
collection: {
|
|
39155
|
+
name: this.config.collectionName,
|
|
39156
|
+
status: "disconnected"
|
|
39157
|
+
}
|
|
39106
39158
|
};
|
|
39107
39159
|
}
|
|
39108
39160
|
try {
|