@keyv/mongo 3.0.1 → 3.0.3
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/index.cjs +6 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -4
- package/package.json +80 -80
package/dist/index.cjs
CHANGED
|
@@ -28,16 +28,16 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
|
|
30
30
|
// src/index.ts
|
|
31
|
-
var
|
|
32
|
-
__export(
|
|
31
|
+
var index_exports = {};
|
|
32
|
+
__export(index_exports, {
|
|
33
33
|
KeyvMongo: () => KeyvMongo,
|
|
34
|
-
default: () =>
|
|
34
|
+
default: () => index_default
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
36
|
+
module.exports = __toCommonJS(index_exports);
|
|
37
37
|
var import_events = __toESM(require("events"), 1);
|
|
38
38
|
var import_buffer = require("buffer");
|
|
39
39
|
var import_mongodb = require("mongodb");
|
|
40
|
-
var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect"]);
|
|
40
|
+
var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect", "db"]);
|
|
41
41
|
var KeyvMongo = class extends import_events.default {
|
|
42
42
|
ttlSupport = false;
|
|
43
43
|
opts;
|
|
@@ -106,7 +106,6 @@ var KeyvMongo = class extends import_events.default {
|
|
|
106
106
|
}
|
|
107
107
|
} catch (error) {
|
|
108
108
|
this.emit("error", error);
|
|
109
|
-
reject(error);
|
|
110
109
|
}
|
|
111
110
|
});
|
|
112
111
|
}
|
|
@@ -296,7 +295,7 @@ var KeyvMongo = class extends import_events.default {
|
|
|
296
295
|
await client.mongoClient.close();
|
|
297
296
|
}
|
|
298
297
|
};
|
|
299
|
-
var
|
|
298
|
+
var index_default = KeyvMongo;
|
|
300
299
|
// Annotate the CommonJS export names for ESM import in node:
|
|
301
300
|
0 && (module.exports = {
|
|
302
301
|
KeyvMongo
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
GridFSBucket,
|
|
7
7
|
MongoServerError
|
|
8
8
|
} from "mongodb";
|
|
9
|
-
var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect"]);
|
|
9
|
+
var keyvMongoKeys = /* @__PURE__ */ new Set(["url", "collection", "namespace", "serialize", "deserialize", "uri", "useGridFS", "dialect", "db"]);
|
|
10
10
|
var KeyvMongo = class extends EventEmitter {
|
|
11
11
|
ttlSupport = false;
|
|
12
12
|
opts;
|
|
@@ -75,7 +75,6 @@ var KeyvMongo = class extends EventEmitter {
|
|
|
75
75
|
}
|
|
76
76
|
} catch (error) {
|
|
77
77
|
this.emit("error", error);
|
|
78
|
-
reject(error);
|
|
79
78
|
}
|
|
80
79
|
});
|
|
81
80
|
}
|
|
@@ -265,8 +264,8 @@ var KeyvMongo = class extends EventEmitter {
|
|
|
265
264
|
await client.mongoClient.close();
|
|
266
265
|
}
|
|
267
266
|
};
|
|
268
|
-
var
|
|
267
|
+
var index_default = KeyvMongo;
|
|
269
268
|
export {
|
|
270
269
|
KeyvMongo,
|
|
271
|
-
|
|
270
|
+
index_default as default
|
|
272
271
|
};
|
package/package.json
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
1
|
{
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
2
|
+
"name": "@keyv/mongo",
|
|
3
|
+
"version": "3.0.3",
|
|
4
|
+
"description": "MongoDB storage adapter for Keyv",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.cjs",
|
|
7
|
+
"module": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"require": "./dist/index.cjs",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"xo": {
|
|
16
|
+
"rules": {
|
|
17
|
+
"import/no-named-as-default": "off",
|
|
18
|
+
"unicorn/prefer-module": "off",
|
|
19
|
+
"unicorn/prefer-event-target": "off",
|
|
20
|
+
"unicorn/no-array-reduce": "off",
|
|
21
|
+
"unicorn/prefer-object-from-entries": "off",
|
|
22
|
+
"unicorn/prefer-node-protocol": "off",
|
|
23
|
+
"@typescript-eslint/no-unsafe-assignment": "off",
|
|
24
|
+
"@typescript-eslint/no-unsafe-call": "off",
|
|
25
|
+
"@typescript-eslint/no-unsafe-return": "off",
|
|
26
|
+
"@typescript-eslint/no-unsafe-argument": "off",
|
|
27
|
+
"import/extensions": "off",
|
|
28
|
+
"@typescript-eslint/consistent-type-imports": "off",
|
|
29
|
+
"@typescript-eslint/naming-convention": "off",
|
|
30
|
+
"@typescript-eslint/no-floating-promises": "off",
|
|
31
|
+
"import/no-extraneous-dependencies": "off",
|
|
32
|
+
"@typescript-eslint/no-confusing-void-expression": "off",
|
|
33
|
+
"@typescript-eslint/no-empty-function": "off"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/jaredwray/keyv.git"
|
|
39
|
+
},
|
|
40
|
+
"keywords": [
|
|
41
|
+
"mongo",
|
|
42
|
+
"mongodb",
|
|
43
|
+
"keyv",
|
|
44
|
+
"storage",
|
|
45
|
+
"adapter",
|
|
46
|
+
"key",
|
|
47
|
+
"value",
|
|
48
|
+
"store",
|
|
49
|
+
"cache",
|
|
50
|
+
"ttl"
|
|
51
|
+
],
|
|
52
|
+
"author": "Jared Wray <me@jaredwray.com> (https://jaredwray.com)",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/jaredwray/keyv/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/jaredwray/keyv",
|
|
58
|
+
"dependencies": {
|
|
59
|
+
"mongodb": "^6.8.0"
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"keyv": "^5.0.0",
|
|
63
|
+
"rimraf": "^6.0.1",
|
|
64
|
+
"tsd": "^0.31.1",
|
|
65
|
+
"xo": "^0.59.3",
|
|
66
|
+
"@keyv/test-suite": "^2.0.7"
|
|
67
|
+
},
|
|
68
|
+
"tsd": {
|
|
69
|
+
"directory": "test"
|
|
70
|
+
},
|
|
71
|
+
"files": [
|
|
72
|
+
"dist",
|
|
73
|
+
"LICENSE"
|
|
74
|
+
],
|
|
75
|
+
"scripts": {
|
|
76
|
+
"build": "rimraf ./dist && tsup src/index.ts --format cjs,esm --dts --clean",
|
|
77
|
+
"test": "xo --fix && vitest run --coverage",
|
|
78
|
+
"test:ci": "xo && vitest --run --sequence.setupFiles=list",
|
|
79
|
+
"clean": "rimraf ./node_modules ./coverage ./dist"
|
|
80
|
+
}
|
|
81
|
+
}
|