@koishijs/plugin-database-mongo 4.7.0 → 4.8.1

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 CHANGED
@@ -1,3 +1,2 @@
1
- import { MongoDriver } from '@minatojs/driver-mongo';
2
- declare const _default: import("koishi").Plugin.Object<MongoDriver.Config, any>;
1
+ declare const _default: Plugin.Object<import("koishi").Context, T>;
3
2
  export default _default;
package/lib/index.js.map CHANGED
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/locales/zh-CN.yml", "../src/index.ts"],
4
- "sourcesContent": ["{\"protocol\":\"要使用的协议名。\",\"host\":\"要连接到的主机名。\",\"port\":\"要连接到的端口号。\",\"username\":\"要使用的用户名。\",\"password\":\"要使用的密码。\",\"database\":\"要访问的数据库名。\"}", "import { defineDriver, Schema } from 'koishi'\nimport { MongoDriver } from '@minatojs/driver-mongo'\n\nexport default defineDriver(MongoDriver, Schema.object({\n protocol: Schema.string().default('mongodb'),\n host: Schema.string().default('localhost'),\n port: Schema.natural().max(65535),\n username: Schema.string(),\n password: Schema.string().role('secret'),\n database: Schema.string().default('koishi'),\n}).i18n({\n 'zh-CN': require('./locales/zh-CN'),\n}))\n"],
5
4
  "mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA,iEAAAA,SAAA;AAAA,IAAAA,QAAA,YAAC,UAAW,YAAW,MAAO,aAAY,MAAO,aAAY,UAAW,YAAW,UAAW,WAAU,UAAW,YAAW;AAAA;AAAA;;;ACA9H;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAqC;AACrC,0BAA4B;AAE5B,IAAO,kBAAQ,4BAAa,iCAAa,qBAAO,OAAO;AAAA,EACrD,UAAU,qBAAO,OAAO,EAAE,QAAQ,SAAS;AAAA,EAC3C,MAAM,qBAAO,OAAO,EAAE,QAAQ,WAAW;AAAA,EACzC,MAAM,qBAAO,QAAQ,EAAE,IAAI,KAAK;AAAA,EAChC,UAAU,qBAAO,OAAO;AAAA,EACxB,UAAU,qBAAO,OAAO,EAAE,KAAK,QAAQ;AAAA,EACvC,UAAU,qBAAO,OAAO,EAAE,QAAQ,QAAQ;AAC5C,CAAC,EAAE,KAAK;AAAA,EACN,SAAS;AACX,CAAC,CAAC;",
6
5
  "names": ["module"]
7
6
  }
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "@koishijs/plugin-database-mongo",
3
3
  "description": "MongoDB support for Koishi",
4
- "version": "4.7.0",
4
+ "version": "4.8.1",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
8
- "lib"
8
+ "lib",
9
+ "src"
9
10
  ],
10
11
  "author": "undefined <masnn0@outlook.com>",
11
12
  "contributors": [
@@ -42,12 +43,12 @@
42
43
  }
43
44
  },
44
45
  "peerDependencies": {
45
- "koishi": "^4.14.2"
46
+ "koishi": "^4.15.2"
46
47
  },
47
48
  "devDependencies": {
48
- "koishi": "^4.14.2"
49
+ "koishi": "^4.15.2"
49
50
  },
50
51
  "dependencies": {
51
- "@minatojs/driver-mongo": "^2.7.0"
52
+ "@minatojs/driver-mongo": "^2.8.1"
52
53
  }
53
54
  }
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
1
+ import { defineDriver, Schema } from 'koishi'
2
+ import { MongoDriver } from '@minatojs/driver-mongo'
3
+
4
+ export default defineDriver(MongoDriver, Schema.object({
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
+ }).i18n({
12
+ 'zh-CN': require('./locales/zh-CN'),
13
+ }))
@@ -0,0 +1,6 @@
1
+ protocol: 要使用的协议名。
2
+ host: 要连接到的主机名。
3
+ port: 要连接到的端口号。
4
+ username: 要使用的用户名。
5
+ password: 要使用的密码。
6
+ database: 要访问的数据库名。
@@ -0,0 +1,6 @@
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 to use.
5
+ password: The password to use.
6
+ database: The database name to use.
@@ -0,0 +1,6 @@
1
+ protocol: 要使用的协议名。
2
+ host: 要连接到的主机名。
3
+ port: 要连接到的端口号。
4
+ username: 要使用的用户名。
5
+ password: 要使用的密码。
6
+ database: 要访问的数据库名。
@@ -0,0 +1,6 @@
1
+ protocol: 要使用的协议名。
2
+ host: 要连接到的主机名。
3
+ port: 要连接到的端口号。
4
+ username: 要使用的用户名。
5
+ password: 要使用的密码。
6
+ database: 要访问的数据库名。
@@ -0,0 +1,6 @@
1
+ protocol: 要使用的协议名。
2
+ host: 要连接到的主机名。
3
+ port: 要连接到的端口号。
4
+ username: 要使用的用户名。
5
+ password: 要使用的密码。
6
+ database: 要访问的数据库名。
@@ -0,0 +1,6 @@
1
+ protocol: 要使用的协议名。
2
+ host: 要连接到的主机名。
3
+ port: 要连接到的端口号。
4
+ username: 要使用的用户名。
5
+ password: 要使用的密码。
6
+ database: 要访问的数据库名。
@@ -0,0 +1,6 @@
1
+ protocol: 要使用的協議名。
2
+ host: 要連接到的主機名。
3
+ port: 要連接到的端口號。
4
+ username: 要使用的使用者名。
5
+ password: 要使用的密碼。
6
+ database: 要訪問的數據庫名。