@kanjijs/store 0.2.0-beta.12 → 0.2.0-beta.14
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/dist/index.d.ts +12 -0
- package/dist/index.js +2 -2
- package/package.json +3 -3
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type DynamicModule } from "@kanjijs/core";
|
|
2
|
+
import { drizzle } from "drizzle-orm/postgres-js";
|
|
3
|
+
export declare const DATABASE_CLIENT: unique symbol;
|
|
4
|
+
export interface StoreModuleOptions {
|
|
5
|
+
url: string;
|
|
6
|
+
schema?: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
export declare const InjectDb: () => ParameterDecorator;
|
|
9
|
+
export type DrizzleDb = ReturnType<typeof drizzle>;
|
|
10
|
+
export declare class StoreModule {
|
|
11
|
+
static forRoot(options: StoreModuleOptions): DynamicModule;
|
|
12
|
+
}
|
package/dist/index.js
CHANGED
|
@@ -1293,7 +1293,7 @@ class ModuleCompiler {
|
|
|
1293
1293
|
const paramTypes = Reflect.getMetadata("design:paramtypes", clazz) || [];
|
|
1294
1294
|
const injectionTokens = MetadataStorage.getInjections(clazz) || new Map;
|
|
1295
1295
|
dependencies = paramTypes.map((t, i) => injectionTokens.get(i) || t);
|
|
1296
|
-
} else if ("useFactory" in provider
|
|
1296
|
+
} else if ("useFactory" in provider) {
|
|
1297
1297
|
targetName = provider.provide?.name || String(provider.provide);
|
|
1298
1298
|
dependencies = provider.inject || [];
|
|
1299
1299
|
}
|
|
@@ -6208,7 +6208,7 @@ class StoreModule {
|
|
|
6208
6208
|
return {
|
|
6209
6209
|
module: StoreModule,
|
|
6210
6210
|
providers: [dbProvider],
|
|
6211
|
-
exports: [
|
|
6211
|
+
exports: [DATABASE_CLIENT],
|
|
6212
6212
|
global: true
|
|
6213
6213
|
};
|
|
6214
6214
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kanjijs/store",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.14",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -10,14 +10,14 @@
|
|
|
10
10
|
"LICENSE"
|
|
11
11
|
],
|
|
12
12
|
"scripts": {
|
|
13
|
-
"build": "bun build src/index.ts --outdir dist --target bun"
|
|
13
|
+
"build": "bun build src/index.ts --outdir dist --target bun && tsc --emitDeclarationOnly --declaration --outDir dist"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"drizzle-orm": "^0.30.0",
|
|
17
17
|
"postgres": "^3.4.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
|
-
"@kanjijs/core": "^0.2.0-beta.
|
|
20
|
+
"@kanjijs/core": "^0.2.0-beta.14"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"bun-types": "latest"
|