@koishijs/plugin-database-mongo 4.11.0 → 5.0.0-alpha.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/lib/index.d.ts +2 -2
- package/lib/index.js +2 -31
- package/lib/index.js.map +3 -3
- package/package.json +4 -4
- package/src/index.ts +1 -20
- package/src/locales/de-DE.yml +0 -6
- package/src/locales/en-US.yml +0 -16
- package/src/locales/fr-FR.yml +0 -6
- package/src/locales/ja-JP.yml +0 -6
- package/src/locales/ru-RU.yml +0 -6
- package/src/locales/zh-CN.yml +0 -16
- package/src/locales/zh-TW.yml +0 -6
package/lib/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export default
|
|
1
|
+
import { MongoDriver } from '@minatojs/driver-mongo';
|
|
2
|
+
export default MongoDriver;
|
package/lib/index.js
CHANGED
|
@@ -2,9 +2,6 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
3
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
4
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __commonJS = (cb, mod) => function __require() {
|
|
6
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
7
|
-
};
|
|
8
5
|
var __export = (target, all) => {
|
|
9
6
|
for (var name in all)
|
|
10
7
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -19,38 +16,12 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
19
16
|
};
|
|
20
17
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
21
18
|
|
|
22
|
-
// koishi/
|
|
23
|
-
var require_zh_CN = __commonJS({
|
|
24
|
-
"koishi/plugins/database/mongo/src/locales/zh-CN.yml"(exports, module2) {
|
|
25
|
-
module2.exports = { protocol: "要使用的协议名。", host: "要连接到的主机名。", port: "要连接到的端口号。", username: "要使用的用户名。", password: "要使用的密码。", database: "要访问的数据库名。", writeConcern: { $description: "Write Concern", w: { $description: "The write concern.", $value: ["Default", "Custom", "Majority"] }, wtimeoutMS: "The write concern timeout.", journal: "The journal write concern." } };
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
// koishi/plugins/database/mongo/src/index.ts
|
|
19
|
+
// koishi/external/upstream/database/mongo/src/index.ts
|
|
30
20
|
var src_exports = {};
|
|
31
21
|
__export(src_exports, {
|
|
32
22
|
default: () => src_default
|
|
33
23
|
});
|
|
34
24
|
module.exports = __toCommonJS(src_exports);
|
|
35
|
-
var import_koishi = require("koishi");
|
|
36
25
|
var import_driver_mongo = require("@minatojs/driver-mongo");
|
|
37
|
-
var src_default =
|
|
38
|
-
protocol: import_koishi.Schema.string().default("mongodb"),
|
|
39
|
-
host: import_koishi.Schema.string().default("localhost"),
|
|
40
|
-
port: import_koishi.Schema.natural().max(65535),
|
|
41
|
-
username: import_koishi.Schema.string(),
|
|
42
|
-
password: import_koishi.Schema.string().role("secret"),
|
|
43
|
-
database: import_koishi.Schema.string().default("koishi"),
|
|
44
|
-
writeConcern: import_koishi.Schema.object({
|
|
45
|
-
w: import_koishi.Schema.union([
|
|
46
|
-
import_koishi.Schema.const(void 0),
|
|
47
|
-
import_koishi.Schema.number().required(),
|
|
48
|
-
import_koishi.Schema.const("majority").required()
|
|
49
|
-
]),
|
|
50
|
-
wtimeoutMS: import_koishi.Schema.number(),
|
|
51
|
-
journal: import_koishi.Schema.boolean()
|
|
52
|
-
})
|
|
53
|
-
}).i18n({
|
|
54
|
-
"zh-CN": require_zh_CN()
|
|
55
|
-
}));
|
|
26
|
+
var src_default = import_driver_mongo.MongoDriver;
|
|
56
27
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../src/
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": [
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA4B;AAE5B,IAAO,cAAQ;",
|
|
5
|
+
"names": []
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@koishijs/plugin-database-mongo",
|
|
3
3
|
"description": "MongoDB support for Koishi",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "5.0.0-alpha.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
|
-
"koishi": "^4.
|
|
46
|
+
"koishi": "^4.17.0-alpha.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"koishi": "^4.
|
|
49
|
+
"koishi": "^4.17.0-alpha.0"
|
|
50
50
|
},
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@minatojs/driver-mongo": "^
|
|
52
|
+
"@minatojs/driver-mongo": "^3.0.0-alpha.0"
|
|
53
53
|
}
|
|
54
54
|
}
|
package/src/index.ts
CHANGED
|
@@ -1,22 +1,3 @@
|
|
|
1
|
-
import { defineDriver, Schema } from 'koishi'
|
|
2
1
|
import { MongoDriver } from '@minatojs/driver-mongo'
|
|
3
2
|
|
|
4
|
-
export default
|
|
5
|
-
protocol: Schema.string().default('mongodb'),
|
|
6
|
-
host: Schema.string().default('localhost'),
|
|
7
|
-
port: Schema.natural().max(65535),
|
|
8
|
-
username: Schema.string(),
|
|
9
|
-
password: Schema.string().role('secret'),
|
|
10
|
-
database: Schema.string().default('koishi'),
|
|
11
|
-
writeConcern: Schema.object({
|
|
12
|
-
w: Schema.union([
|
|
13
|
-
Schema.const(undefined),
|
|
14
|
-
Schema.number().required(),
|
|
15
|
-
Schema.const('majority').required(),
|
|
16
|
-
]),
|
|
17
|
-
wtimeoutMS: Schema.number(),
|
|
18
|
-
journal: Schema.boolean(),
|
|
19
|
-
}),
|
|
20
|
-
}).i18n({
|
|
21
|
-
'zh-CN': require('./locales/zh-CN'),
|
|
22
|
-
}))
|
|
3
|
+
export default MongoDriver
|
package/src/locales/de-DE.yml
DELETED
package/src/locales/en-US.yml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
protocol: The protocol to use.
|
|
2
|
-
host: The host to connect to.
|
|
3
|
-
port: The port number to be connected.
|
|
4
|
-
username: The username used for authentication.
|
|
5
|
-
password: The password used for authentication.
|
|
6
|
-
database: The name of the database we want to use.
|
|
7
|
-
writeConcern:
|
|
8
|
-
$description: Write Concern
|
|
9
|
-
w:
|
|
10
|
-
$description: The write concern.
|
|
11
|
-
$value:
|
|
12
|
-
- Default
|
|
13
|
-
- Custom
|
|
14
|
-
- Majority
|
|
15
|
-
wtimeoutMS: The write concern timeout.
|
|
16
|
-
journal: The journal write concern.
|
package/src/locales/fr-FR.yml
DELETED
package/src/locales/ja-JP.yml
DELETED
package/src/locales/ru-RU.yml
DELETED
package/src/locales/zh-CN.yml
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
protocol: 要使用的协议名。
|
|
2
|
-
host: 要连接到的主机名。
|
|
3
|
-
port: 要连接到的端口号。
|
|
4
|
-
username: 要使用的用户名。
|
|
5
|
-
password: 要使用的密码。
|
|
6
|
-
database: 要访问的数据库名。
|
|
7
|
-
writeConcern:
|
|
8
|
-
$description: Write Concern
|
|
9
|
-
w:
|
|
10
|
-
$description: The write concern.
|
|
11
|
-
$value:
|
|
12
|
-
- Default
|
|
13
|
-
- Custom
|
|
14
|
-
- Majority
|
|
15
|
-
wtimeoutMS: The write concern timeout.
|
|
16
|
-
journal: The journal write concern.
|