@razvan11/paladin 1.0.6 → 1.0.7

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.
@@ -1 +1,9 @@
1
- export declare function database(): <T extends Function>(constructor: T) => T;
1
+ export interface DatabaseOptions {
2
+ migrations?: string;
3
+ migrationsTable?: string;
4
+ }
5
+ export declare function database(options?: DatabaseOptions): <T extends Function>(constructor: T) => T;
6
+ export declare function getDatabaseRegistry(): Map<Function, DatabaseOptions>;
7
+ export declare function getDataSourceForCLI<T extends {
8
+ getSource(): any;
9
+ }>(DatabaseClass: new (...args: any[]) => T, url: string): any;
package/dist/index.js CHANGED
@@ -19969,9 +19969,11 @@ function repository() {
19969
19969
  }
19970
19970
  // src/functions/database.ts
19971
19971
  var getContainer5 = () => globalThis.container;
19972
- function database() {
19972
+ var databaseRegistry = new Map;
19973
+ function database(options2 = {}) {
19973
19974
  return (constructor) => {
19974
19975
  W()(constructor);
19976
+ databaseRegistry.set(constructor, options2);
19975
19977
  const container2 = getContainer5();
19976
19978
  if (container2 && !container2.isBound(constructor)) {
19977
19979
  container2.bind(constructor).toSelf().inSingletonScope();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@razvan11/paladin",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "A Bun-based backend framework with decorators, dependency injection, and controller registration",
5
5
  "keywords": [
6
6
  "bun",
@@ -43,7 +43,8 @@
43
43
  "@biomejs/biome": "^2.3.10",
44
44
  "@types/bun": "latest",
45
45
  "@types/react": "^19.2.7",
46
- "@types/react-dom": "^19.2.3"
46
+ "@types/react-dom": "^19.2.3",
47
+ "typeorm": "^0.3.28"
47
48
  },
48
49
  "peerDependencies": {
49
50
  "typescript": "^5",