@sidgaikwad/orm-setup 1.0.0 → 2.0.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/README.md CHANGED
@@ -69,6 +69,40 @@ bun db:studio # Open Prisma Studio
69
69
  - Node.js 18+ or Bun
70
70
  - A database (PostgreSQL, MySQL, or SQLite)
71
71
 
72
+ ## 🎯 Templates (v2.0+)
73
+
74
+ Choose from 5 pre-built templates:
75
+
76
+ ### 📦 Starter
77
+
78
+ - User table with auth fields
79
+ - Perfect for getting started
80
+
81
+ ### 🚀 Blog
82
+
83
+ - User, Post, Comment, Category
84
+ - Full blogging platform schema
85
+ - Includes relations and indexes
86
+
87
+ ### 🛒 E-commerce
88
+
89
+ - User, Product, Order
90
+ - Ready for online store
91
+ - Inventory and pricing fields
92
+
93
+ ### 💼 SaaS
94
+
95
+ - User, Organization, Membership, Subscription
96
+ - Multi-tenant architecture
97
+ - Team management built-in
98
+
99
+ ### ❌ Empty
100
+
101
+ - No tables, start from scratch
102
+ - Full control over your schema
103
+
104
+ All templates work with Drizzle, Prisma, and Kysely!
105
+
72
106
  ## License
73
107
 
74
108
  MIT © Siddharth Gaikwad
@@ -3,7 +3,7 @@ interface GenerateOptions {
3
3
  paths: ResolvedPaths;
4
4
  database: "postgresql" | "mysql" | "sqlite";
5
5
  typescript: boolean;
6
- includeExamples: boolean;
6
+ template: "empty" | "starter" | "blog" | "ecommerce" | "saas";
7
7
  }
8
8
  export declare function generateDrizzleSetup(options: GenerateOptions): Promise<void>;
9
9
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"drizzle.d.ts","sourceRoot":"","sources":["../../src/generators/drizzle.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
1
+ {"version":3,"file":"drizzle.d.ts","sourceRoot":"","sources":["../../src/generators/drizzle.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;CAC/D;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
@@ -1,9 +1,8 @@
1
1
  import type { ResolvedPaths } from "../paths";
2
- import type { TableDefinition } from "../templates/table-definitions";
3
2
  interface GenerateOptions {
4
3
  paths: ResolvedPaths;
5
4
  database: "postgresql" | "mysql" | "sqlite";
6
- selectedTables: TableDefinition[];
5
+ template: "empty" | "starter" | "blog" | "ecommerce" | "saas";
7
6
  }
8
7
  export declare function generateKyselySetup(options: GenerateOptions): Promise<void>;
9
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"kysely.d.ts","sourceRoot":"","sources":["../../src/generators/kysely.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AAEtE,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,cAAc,EAAE,eAAe,EAAE,CAAC;CACnC;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CA0Bf"}
1
+ {"version":3,"file":"kysely.d.ts","sourceRoot":"","sources":["../../src/generators/kysely.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;CAC/D;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAmBf"}
@@ -2,7 +2,7 @@ import type { ResolvedPaths } from "../paths";
2
2
  interface GenerateOptions {
3
3
  paths: ResolvedPaths;
4
4
  database: "postgresql" | "mysql" | "sqlite";
5
- includeExamples: boolean;
5
+ template: "empty" | "starter" | "blog" | "ecommerce" | "saas";
6
6
  }
7
7
  export declare function generatePrismaSetup(options: GenerateOptions): Promise<void>;
8
8
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/generators/prisma.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAef"}
1
+ {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../src/generators/prisma.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,UAAU,eAAe;IACvB,KAAK,EAAE,aAAa,CAAC;IACrB,QAAQ,EAAE,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;IAC5C,QAAQ,EAAE,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;CAC/D;AAED,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,eAAe,GACvB,OAAO,CAAC,IAAI,CAAC,CAef"}
@@ -0,0 +1,7 @@
1
+ type Database = "postgresql" | "mysql" | "sqlite";
2
+ type Template = "empty" | "starter" | "blog" | "ecommerce" | "saas";
3
+ export declare function getDrizzleSchema(template: Template, database: Database): string;
4
+ export declare function getPrismaSchema(template: Template, database: Database): string;
5
+ export declare function getKyselySchema(template: Template): string;
6
+ export {};
7
+ //# sourceMappingURL=schemas.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/generators/templates/schemas.ts"],"names":[],"mappings":"AAGA,KAAK,QAAQ,GAAG,YAAY,GAAG,OAAO,GAAG,QAAQ,CAAC;AAClD,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,WAAW,GAAG,MAAM,CAAC;AAMpE,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAiKR;AAMD,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,GACjB,MAAM,CAqLR;AAMD,wBAAgB,eAAe,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAuF1D"}