@koishijs/plugin-database-mysql 4.3.3 → 4.4.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 +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/package.json +3 -3
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Context, Schema } from 'koishi';
|
|
2
|
-
import MySQLDriver from '@
|
|
2
|
+
import MySQLDriver from '@minatojs/driver-mysql';
|
|
3
3
|
export declare const name = "MemoryDatabase";
|
|
4
4
|
export declare type Config = MySQLDriver.Config;
|
|
5
5
|
export declare const Config: Schema<Config>;
|
package/lib/index.js
CHANGED
|
@@ -30,7 +30,7 @@ __export(exports, {
|
|
|
30
30
|
name: () => name
|
|
31
31
|
});
|
|
32
32
|
var import_koishi = __toModule(require("koishi"));
|
|
33
|
-
var import_driver_mysql = __toModule(require("@
|
|
33
|
+
var import_driver_mysql = __toModule(require("@minatojs/driver-mysql"));
|
|
34
34
|
var name = "MemoryDatabase";
|
|
35
35
|
var Config = import_koishi.Schema.object({
|
|
36
36
|
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 MySQLDriver from '@
|
|
4
|
+
"sourcesContent": ["import { Context, Schema } from 'koishi'\nimport MySQLDriver from '@minatojs/driver-mysql'\n\nexport const name = 'MemoryDatabase'\n\nexport type Config = MySQLDriver.Config\n\nexport const Config: Schema<Config> = Schema.object({\n host: Schema.string().description('要连接到的主机名。').default('localhost'),\n port: Schema.natural().max(65535).description('要连接到的端口号。').default(3306),\n user: Schema.string().description('要使用的用户名。').default('root'),\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 MySQLDriver(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,MAAM,qBAAO,SAAS,YAAY,aAAa,QAAQ;AAAA,EACvD,MAAM,qBAAO,UAAU,IAAI,OAAO,YAAY,aAAa,QAAQ;AAAA,EACnE,MAAM,qBAAO,SAAS,YAAY,YAAY,QAAQ;AAAA,EACtD,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-mysql",
|
|
3
3
|
"description": "MySQL support for Koishi",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.4.0",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
7
7
|
"files": [
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"impl:database"
|
|
31
31
|
],
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"koishi": "^4.
|
|
33
|
+
"koishi": "^4.7.0"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@
|
|
36
|
+
"@minatojs/driver-mysql": "^1.0.6"
|
|
37
37
|
}
|
|
38
38
|
}
|