@koishijs/plugin-database-mongo 4.5.1 → 4.5.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.js CHANGED
@@ -2,6 +2,9 @@ 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
+ };
5
8
  var __export = (target, all) => {
6
9
  for (var name in all)
7
10
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -16,6 +19,13 @@ var __copyProps = (to, from, except, desc) => {
16
19
  };
17
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
21
 
22
+ // koishi/plugins/database/mongo/src/locales/zh-CN.yml
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: "要访问的数据库名。" };
26
+ }
27
+ });
28
+
19
29
  // koishi/plugins/database/mongo/src/index.ts
20
30
  var src_exports = {};
21
31
  __export(src_exports, {
@@ -25,13 +35,13 @@ module.exports = __toCommonJS(src_exports);
25
35
  var import_koishi = require("koishi");
26
36
  var import_driver_mongo = require("@minatojs/driver-mongo");
27
37
  var src_default = (0, import_koishi.defineDriver)(import_driver_mongo.MongoDriver, import_koishi.Schema.object({
28
- protocol: import_koishi.Schema.string().description("要使用的协议名。").default("mongodb"),
29
- host: import_koishi.Schema.string().description("要连接到的主机名。").default("localhost"),
30
- port: import_koishi.Schema.natural().max(65535).description("要连接到的端口号。"),
31
- username: import_koishi.Schema.string().description("要使用的用户名。"),
32
- password: import_koishi.Schema.string().description("要使用的密码。").role("secret"),
33
- database: import_koishi.Schema.string().description("要访问的数据库名。").default("koishi")
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
+ }).i18n({
45
+ "zh-CN": require_zh_CN()
34
46
  }));
35
- // Annotate the CommonJS export names for ESM import in node:
36
- 0 && (module.exports = {});
37
47
  //# sourceMappingURL=index.js.map
package/lib/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../src/index.ts"],
4
- "sourcesContent": ["import { defineDriver, Schema } from 'koishi'\nimport { MongoDriver } from '@minatojs/driver-mongo'\n\nexport default defineDriver(MongoDriver, 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"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAqC;AACrC,0BAA4B;AAE5B,IAAO,kBAAQ,4BAAa,iCAAa,qBAAO,OAAO;AAAA,EACrD,UAAU,qBAAO,OAAO,EAAE,YAAY,UAAU,EAAE,QAAQ,SAAS;AAAA,EACnE,MAAM,qBAAO,OAAO,EAAE,YAAY,WAAW,EAAE,QAAQ,WAAW;AAAA,EAClE,MAAM,qBAAO,QAAQ,EAAE,IAAI,KAAK,EAAE,YAAY,WAAW;AAAA,EACzD,UAAU,qBAAO,OAAO,EAAE,YAAY,UAAU;AAAA,EAChD,UAAU,qBAAO,OAAO,EAAE,YAAY,SAAS,EAAE,KAAK,QAAQ;AAAA,EAC9D,UAAU,qBAAO,OAAO,EAAE,YAAY,WAAW,EAAE,QAAQ,QAAQ;AACrE,CAAC,CAAC;",
6
- "names": []
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
+ "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
+ "names": ["module"]
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": "4.5.1",
4
+ "version": "4.5.2",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
7
7
  "files": [
@@ -42,12 +42,12 @@
42
42
  }
43
43
  },
44
44
  "peerDependencies": {
45
- "koishi": "^4.11.9"
45
+ "koishi": "^4.13.4"
46
46
  },
47
47
  "devDependencies": {
48
- "koishi": "^4.11.9"
48
+ "koishi": "^4.13.4"
49
49
  },
50
50
  "dependencies": {
51
- "@minatojs/driver-mongo": "^2.5.1"
51
+ "@minatojs/driver-mongo": "^2.5.2"
52
52
  }
53
53
  }