@koishijs/plugin-database-mongo 3.2.2 → 3.3.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/lib/index.d.ts +2 -2
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/package.json +15 -5
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Context, Schema } from 'koishi';
|
|
2
|
-
import MongoDriver from '@
|
|
3
|
-
export declare const name = "
|
|
2
|
+
import MongoDriver from '@minatojs/driver-mongo';
|
|
3
|
+
export declare const name = "MongoDatabase";
|
|
4
4
|
export declare type Config = MongoDriver.Config;
|
|
5
5
|
export declare const Config: Schema<Config>;
|
|
6
6
|
export declare function apply(ctx: Context, config: Config): void;
|
package/lib/index.js
CHANGED
|
@@ -30,8 +30,8 @@ __export(exports, {
|
|
|
30
30
|
name: () => name
|
|
31
31
|
});
|
|
32
32
|
var import_koishi = __toModule(require("koishi"));
|
|
33
|
-
var import_driver_mongo = __toModule(require("@
|
|
34
|
-
var name = "
|
|
33
|
+
var import_driver_mongo = __toModule(require("@minatojs/driver-mongo"));
|
|
34
|
+
var name = "MongoDatabase";
|
|
35
35
|
var Config = import_koishi.Schema.object({
|
|
36
36
|
protocol: import_koishi.Schema.string().description("要使用的协议名。").default("mongodb"),
|
|
37
37
|
host: import_koishi.Schema.string().description("要连接到的主机名。").default("localhost"),
|
package/lib/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts"],
|
|
4
|
-
"sourcesContent": ["import { Context, Schema } from 'koishi'\nimport MongoDriver from '@
|
|
4
|
+
"sourcesContent": ["import { Context, Schema } from 'koishi'\nimport MongoDriver from '@minatojs/driver-mongo'\n\nexport const name = 'MongoDatabase'\n\nexport type Config = MongoDriver.Config\n\nexport const Config: Schema<Config> = Schema.object({\n protocol: Schema.string().description('要使用的协议名。').default('mongodb'),\n host: Schema.string().description('要连接到的主机名。').default('localhost'),\n port: Schema.natural().max(65535).description('要连接到的端口号。'),\n username: Schema.string().description('要使用的用户名。'),\n password: Schema.string().description('要使用的密码。').role('secret'),\n database: Schema.string().description('要访问的数据库名。').default('koishi'),\n})\n\nexport function apply(ctx: Context, config: Config) {\n const driver = new MongoDriver(ctx.model, config)\n ctx.on('ready', () => driver.start())\n ctx.on('dispose', () => driver.stop())\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAgC;AAChC,0BAAwB;AAEjB,IAAM,OAAO;AAIb,IAAM,SAAyB,qBAAO,OAAO;AAAA,EAClD,UAAU,qBAAO,SAAS,YAAY,YAAY,QAAQ;AAAA,EAC1D,MAAM,qBAAO,SAAS,YAAY,aAAa,QAAQ;AAAA,EACvD,MAAM,qBAAO,UAAU,IAAI,OAAO,YAAY;AAAA,EAC9C,UAAU,qBAAO,SAAS,YAAY;AAAA,EACtC,UAAU,qBAAO,SAAS,YAAY,WAAW,KAAK;AAAA,EACtD,UAAU,qBAAO,SAAS,YAAY,aAAa,QAAQ;AAAA;AAGtD,eAAe,KAAc,QAAgB;AAClD,QAAM,SAAS,IAAI,4BAAY,IAAI,OAAO;AAC1C,MAAI,GAAG,SAAS,MAAM,OAAO;AAC7B,MAAI,GAAG,WAAW,MAAM,OAAO;AAAA;AAHjB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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": "3.
|
|
4
|
+
"version": "3.3.2",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -27,13 +27,23 @@
|
|
|
27
27
|
"chatbot",
|
|
28
28
|
"koishi",
|
|
29
29
|
"database",
|
|
30
|
-
"
|
|
31
|
-
"impl:database"
|
|
30
|
+
"mongo"
|
|
32
31
|
],
|
|
32
|
+
"koishi": {
|
|
33
|
+
"description": {
|
|
34
|
+
"en": "MongoDB support",
|
|
35
|
+
"zh": "MongoDB 支持"
|
|
36
|
+
},
|
|
37
|
+
"service": {
|
|
38
|
+
"implements": [
|
|
39
|
+
"database"
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
},
|
|
33
43
|
"peerDependencies": {
|
|
34
|
-
"koishi": "^4.
|
|
44
|
+
"koishi": "^4.7.3"
|
|
35
45
|
},
|
|
36
46
|
"dependencies": {
|
|
37
|
-
"@
|
|
47
|
+
"@minatojs/driver-mongo": "^1.1.2"
|
|
38
48
|
}
|
|
39
49
|
}
|