seedcord-plugin-db0 1.1.0 → 1.1.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.
@@ -0,0 +1,13 @@
1
+ import { Plugin } from "@seedcord/core/plugin";
2
+ import { Connector, Database } from "db0";
3
+ import { CoreBase } from "@seedcord/core";
4
+ //#region src/index.d.ts
5
+ export declare class DB0Plugin<const TConnector extends Connector> extends Plugin {
6
+ private readonly dbConnector;
7
+ db: Database<TConnector>;
8
+ constructor(host: CoreBase, dbConnector: TConnector);
9
+ init(): Promise<void>;
10
+ getDatabase(): Database<TConnector>;
11
+ dispose(): Promise<void>;
12
+ }
13
+ //#endregion
package/dist/index.mjs ADDED
@@ -0,0 +1,21 @@
1
+ import { Plugin } from "@seedcord/core/plugin";
2
+ import { createDatabase } from "db0";
3
+ //#region src/index.ts
4
+ var DB0Plugin = class extends Plugin {
5
+ constructor(host, dbConnector) {
6
+ super(host);
7
+ this.dbConnector = dbConnector;
8
+ this.logger.debug("setting up db0 instance");
9
+ this.db = createDatabase(this.dbConnector);
10
+ this.logger.debug("db0 instance set");
11
+ }
12
+ async init() {}
13
+ getDatabase() {
14
+ return this.db;
15
+ }
16
+ async dispose() {
17
+ await this.db.dispose();
18
+ }
19
+ };
20
+ //#endregion
21
+ export { DB0Plugin };
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "seedcord-plugin-db0",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/KTrain5169/seedcord-plugins",
8
8
  "directory": "plugins/db"
9
9
  },
10
+ "files": [
11
+ "dist"
12
+ ],
10
13
  "keywords": [],
11
14
  "author": "KTrain5369",
12
15
  "license": "MIT",
package/CHANGELOG.md DELETED
@@ -1,7 +0,0 @@
1
- # seedcord-plugin-db0
2
-
3
- ## 1.1.0
4
-
5
- ### Minor Changes
6
-
7
- - [`d2ca768`](https://github.com/KTrain5169/seedcord-plugins/commit/d2ca768af8614b26d3afbcb9262e325d16c894b0) Thanks [@KTrain5169](https://github.com/KTrain5169)! - initial release
package/src/index.ts DELETED
@@ -1,24 +0,0 @@
1
- import { Plugin } from '@seedcord/core/plugin'
2
- import { CoreBase } from '@seedcord/core'
3
- import { Connector, createDatabase, Database } from 'db0'
4
-
5
- export class DB0Plugin<const TConnector extends Connector> extends Plugin {
6
- db: Database<TConnector>
7
- constructor(host: CoreBase, private readonly dbConnector: TConnector) {
8
- super(host)
9
-
10
- this.logger.debug('setting up db0 instance')
11
- this.db = createDatabase(this.dbConnector)
12
- this.logger.debug('db0 instance set')
13
- }
14
-
15
- async init(): Promise<void> {}
16
-
17
- getDatabase() {
18
- return this.db
19
- }
20
-
21
- override async dispose(): Promise<void> {
22
- await this.db.dispose()
23
- }
24
- }
package/tsconfig.json DELETED
@@ -1,6 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "types": ["node"],
4
- "declaration": true
5
- }
6
- }
package/tsdown.config.ts DELETED
@@ -1,6 +0,0 @@
1
- import { defineConfig } from 'tsdown/config'
2
-
3
- export default defineConfig({
4
- exports: true,
5
- attw: true,
6
- })