Skip to content

Commit

Permalink
chore: add database-* plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
shigma committed Feb 8, 2024
1 parent 0c82773 commit 9a69ef8
Show file tree
Hide file tree
Showing 22 changed files with 366 additions and 0 deletions.
2 changes: 2 additions & 0 deletions database/memory/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
tsconfig.tsbuildinfo
54 changes: 54 additions & 0 deletions database/memory/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "@koishijs/plugin-database-memory",
"description": "A in-memory database implementation for Koishi",
"version": "3.0.0-alpha.0",
"main": "lib/index.cjs",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib",
"src"
],
"author": "Shigma <shigma10826@gmail.com>",
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/koishijs/koishi.git",
"directory": "plugins/database/memory"
},
"bugs": {
"url": "https://github.com/koishijs/koishi/issues"
},
"homepage": "https://koishi.chat/plugins/database/memory.html",
"keywords": [
"bot",
"chatbot",
"koishi",
"plugin",
"database",
"server",
"memory"
],
"koishi": {
"hidden": true,
"category": "storage",
"description": {
"en": "In-memory database support",
"zh": "基于内存的数据库支持 (主要用于本地测试)"
},
"service": {
"implements": [
"database"
]
}
},
"peerDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"devDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"dependencies": {
"@minatojs/driver-memory": "^3.0.0-alpha.0"
}
}
3 changes: 3 additions & 0 deletions database/memory/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { MemoryDriver } from '@minatojs/driver-memory'

export default MemoryDriver
10 changes: 10 additions & 0 deletions database/memory/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
},
"include": [
"src",
],
}
2 changes: 2 additions & 0 deletions database/mongo/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
tsconfig.tsbuildinfo
54 changes: 54 additions & 0 deletions database/mongo/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "@koishijs/plugin-database-mongo",
"description": "MongoDB support for Koishi",
"version": "5.0.0-alpha.0",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib",
"src"
],
"author": "undefined <masnn0@outlook.com>",
"contributors": [
"Shigma <shigma10826@gmail.com>",
"undefined <masnn0@outlook.com>"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/koishijs/koishi.git",
"directory": "plugins/database/mongo"
},
"bugs": {
"url": "https://github.com/koishijs/koishi/issues"
},
"homepage": "https://koishi.chat/plugins/database/mongo.html",
"keywords": [
"bot",
"chatbot",
"koishi",
"database",
"mongo"
],
"koishi": {
"category": "storage",
"description": {
"en": "MongoDB support",
"zh": "MongoDB 支持"
},
"service": {
"implements": [
"database"
]
}
},
"peerDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"devDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"dependencies": {
"@minatojs/driver-mongo": "^3.0.0-alpha.0"
}
}
3 changes: 3 additions & 0 deletions database/mongo/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { MongoDriver } from '@minatojs/driver-mongo'

export default MongoDriver
10 changes: 10 additions & 0 deletions database/mongo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
},
"include": [
"src",
],
}
2 changes: 2 additions & 0 deletions database/mysql/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
tsconfig.tsbuildinfo
11 changes: 11 additions & 0 deletions database/mysql/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# @koishijs/plugin-database-mysql

[![Status](https://img.shields.io/github/workflow/status/koishijs/koishi/CI/master?style=flat-square)](https://github.com/koishijs/koishi/actions?query=workflow:CI)
[![npm](https://img.shields.io/npm/v/@koishijs/plugin-database-mysql?style=flat-square)](https://www.npmjs.com/package/@koishijs/plugin-database-mysql)

MySQL implementation for Koishi.

## Usage

- [Using Database with Koishi](https://koishi.chat/guide/using-database.html)
- [Full API Reference](https://koishi.chat/api/database.html)
53 changes: 53 additions & 0 deletions database/mysql/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"name": "@koishijs/plugin-database-mysql",
"description": "MySQL support for Koishi",
"version": "6.0.0-alpha.0",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib",
"src"
],
"author": "Shigma <shigma10826@gmail.com>",
"license": "MIT",
"scripts": {
"lint": "eslint src --ext .ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/koishijs/koishi.git",
"directory": "plugins/database/mysql"
},
"bugs": {
"url": "https://github.com/koishijs/koishi/issues"
},
"homepage": "https://koishi.chat/plugins/database/mysql.html",
"keywords": [
"bot",
"chatbot",
"koishi",
"database",
"mysql"
],
"koishi": {
"category": "storage",
"description": {
"en": "MySQL (MariaDB) support",
"zh": "MySQL (MariaDB) 支持"
},
"service": {
"implements": [
"database"
]
}
},
"peerDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"devDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"dependencies": {
"@minatojs/driver-mysql": "^3.0.0-alpha.0"
}
}
3 changes: 3 additions & 0 deletions database/mysql/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { MySQLDriver } from '@minatojs/driver-mysql'

export default MySQLDriver
10 changes: 10 additions & 0 deletions database/mysql/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
},
"include": [
"src",
],
}
2 changes: 2 additions & 0 deletions database/postgres/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
tsconfig.tsbuildinfo
54 changes: 54 additions & 0 deletions database/postgres/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
"name": "@koishijs/plugin-database-postgres",
"description": "PostgreSQL support for Koishi",
"version": "2.0.0-alpha.0",
"main": "lib/index.js",
"typings": "lib/index.d.ts",
"files": [
"lib",
"src"
],
"author": "Seidko <seidko.coding@gmail.com>",
"contributors": [
"Hieuzest <girkirin@hotmail.com>",
"Seidko <seidko.coding@gmail.com>"
],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/koishijs/koishi.git",
"directory": "plugins/database/postgres"
},
"bugs": {
"url": "https://github.com/koishijs/koishi/issues"
},
"homepage": "https://koishi.chat/plugins/database/postgres.html",
"keywords": [
"bot",
"chatbot",
"koishi",
"database",
"postgres"
],
"koishi": {
"category": "storage",
"description": {
"en": "PostgreSQL support",
"zh": "PostgreSQL 支持"
},
"service": {
"implements": [
"database"
]
}
},
"peerDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"devDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"dependencies": {
"@minatojs/driver-postgres": "^2.0.0-alpha.0"
}
}
3 changes: 3 additions & 0 deletions database/postgres/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { PostgresDriver } from '@minatojs/driver-postgres'

export default PostgresDriver
10 changes: 10 additions & 0 deletions database/postgres/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
},
"include": [
"src",
],
}
2 changes: 2 additions & 0 deletions database/sqlite/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
.DS_Store
tsconfig.tsbuildinfo
3 changes: 3 additions & 0 deletions database/sqlite/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# @koishijs/plugin-database-sqlite

SQLite Database implementation for Koishi.
62 changes: 62 additions & 0 deletions database/sqlite/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "@koishijs/plugin-database-sqlite",
"description": "SQLite support for Koishi",
"version": "4.0.0-alpha.0",
"main": "lib/index.js",
"module": "lib/index.mjs",
"typings": "lib/index.d.ts",
"files": [
"lib",
"src"
],
"author": "thezzisu <2100012732@stu.pku.edu.cn>",
"contributors": [
"Shigma <shigma10826@gmail.com>",
"thezzisu <2100012732@stu.pku.edu.cn>"
],
"license": "MIT",
"scripts": {
"lint": "eslint src --ext .ts"
},
"repository": {
"type": "git",
"url": "git+https://github.com/koishijs/koishi.git",
"directory": "plugins/database/sqlite"
},
"bugs": {
"url": "https://github.com/koishijs/koishi/issues"
},
"homepage": "https://koishi.chat/plugins/database/sqlite.html",
"keywords": [
"bot",
"chatbot",
"koishi",
"plugin",
"database",
"sqlite"
],
"koishi": {
"browser": true,
"exports": {
"sql-wasm.wasm": "@minatojs/sql.js/dist/sql-wasm.wasm"
},
"description": {
"en": "SQLite support",
"zh": "SQLite 支持"
},
"service": {
"implements": [
"database"
]
}
},
"peerDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"devDependencies": {
"koishi": "^4.17.0-alpha.0"
},
"dependencies": {
"@minatojs/driver-sqlite": "^4.0.0-alpha.0"
}
}
3 changes: 3 additions & 0 deletions database/sqlite/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import { SQLiteDriver } from '@minatojs/driver-sqlite'

export default SQLiteDriver
10 changes: 10 additions & 0 deletions database/sqlite/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"extends": "../../tsconfig.base",
"compilerOptions": {
"rootDir": "src",
"outDir": "lib",
},
"include": [
"src",
],
}

0 comments on commit 9a69ef8

Please sign in to comment.