stackkit 0.1.3 → 0.1.4

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.
Files changed (33) hide show
  1. package/README.md +4 -2
  2. package/dist/cli/add.d.ts +2 -1
  3. package/dist/cli/add.js +317 -105
  4. package/dist/cli/create.js +2 -3
  5. package/dist/cli/doctor.js +0 -4
  6. package/dist/index.js +23 -4
  7. package/dist/lib/conversion/js-conversion.js +1 -1
  8. package/dist/lib/discovery/module-discovery.d.ts +0 -1
  9. package/dist/lib/discovery/module-discovery.js +3 -3
  10. package/dist/lib/generation/code-generator.d.ts +14 -0
  11. package/dist/lib/generation/code-generator.js +55 -24
  12. package/dist/lib/generation/generator-utils.d.ts +11 -0
  13. package/dist/lib/generation/generator-utils.js +116 -0
  14. package/dist/lib/git-utils.js +20 -0
  15. package/dist/lib/project/detect.js +2 -4
  16. package/dist/types/index.d.ts +0 -10
  17. package/modules/auth/authjs/generator.json +10 -0
  18. package/modules/auth/authjs/module.json +0 -9
  19. package/modules/auth/better-auth/files/lib/auth.ts +7 -7
  20. package/modules/auth/better-auth/generator.json +12 -12
  21. package/modules/auth/better-auth/module.json +0 -24
  22. package/modules/database/mongoose/files/models/health.ts +34 -0
  23. package/modules/database/mongoose/generator.json +4 -4
  24. package/modules/database/mongoose/module.json +1 -2
  25. package/modules/database/prisma/files/lib/prisma.ts +2 -1
  26. package/modules/database/prisma/generator.json +33 -8
  27. package/modules/database/prisma/module.json +1 -4
  28. package/package.json +1 -1
  29. package/templates/express/tsconfig.json +2 -23
  30. package/dist/lib/database/database-config.d.ts +0 -6
  31. package/dist/lib/database/database-config.js +0 -9
  32. package/modules/database/mongoose/files/models/User.ts +0 -34
  33. /package/modules/database/mongoose/files/lib/{db.ts → mongoose.ts} +0 -0
@@ -16,14 +16,39 @@
16
16
  {
17
17
  "type": "create-file",
18
18
  "source": "lib/prisma.ts",
19
- "destination": "lib/prisma.ts",
20
- "condition": {
21
- "framework": ["nextjs", "express"]
19
+ "destination": "lib/prisma.ts"
20
+ },
21
+ {
22
+ "type": "add-dependency",
23
+ "condition": { "prismaProvider": "postgresql" },
24
+ "dependencies": {
25
+ "@prisma/adapter-pg": "^5.0.0",
26
+ "pg": "^8.0.0"
27
+ }
28
+ },
29
+ {
30
+ "type": "add-dependency",
31
+ "condition": { "prismaProvider": "mysql" },
32
+ "dependencies": {
33
+ "@prisma/adapter-mariadb": "^5.0.0",
34
+ "mysql2": "^3.0.0"
22
35
  }
36
+ },
37
+ {
38
+ "type": "add-dependency",
39
+ "condition": { "prismaProvider": "sqlite" },
40
+ "dependencies": {
41
+ "@prisma/adapter-better-sqlite3": "^5.0.0",
42
+ "better-sqlite3": "^9.0.0"
43
+ }
44
+ },
45
+ {
46
+ "type": "add-dependency",
47
+ "condition": { "prismaProvider": "mongodb" },
48
+ "dependencies": {}
23
49
  }
24
50
  ],
25
51
  "dependencies": {
26
- "prisma": "^7.2.0",
27
52
  "@prisma/client": "^7.2.0",
28
53
  "dotenv": "^17.2.3"
29
54
  },
@@ -31,11 +56,11 @@
31
56
  "prisma": "^7.2.0"
32
57
  },
33
58
  "scripts": {
34
- "db:generate": "prisma generate",
35
- "db:push": "prisma db push",
59
+ "db:generate": "npx prisma generate",
60
+ "db:push": "npx prisma db push",
36
61
  "db:seed": "tsx prisma/seed.ts",
37
- "db:migrate": "prisma migrate dev",
38
- "db:studio": "prisma studio"
62
+ "db:migrate": "npx prisma migrate dev",
63
+ "db:studio": "npx prisma studio"
39
64
  },
40
65
  "envVars": {
41
66
  "DATABASE_URL": "postgresql://username:password@localhost:5432/database_name"
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "prisma",
3
3
  "displayName": "Prisma",
4
- "description": "Prisma ORM",
5
4
  "category": "database",
6
5
  "provider": "prisma",
7
6
  "supportedFrameworks": ["nextjs", "express"],
@@ -11,7 +10,5 @@
11
10
  "languages": ["typescript", "javascript"],
12
11
  "packageManagers": ["npm", "yarn", "pnpm", "bun"]
13
12
  },
14
- "postInstall": [
15
- "npx prisma generate"
16
- ]
13
+ "postInstall": ["npx prisma generate"]
17
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stackkit",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Production-ready CLI to create and extend JavaScript or TypeScript apps with modular stacks.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -1,30 +1,9 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "outDir": "./dist",
4
3
  "module": "ESNext",
5
4
  "moduleResolution": "node",
6
5
  "target": "ES2023",
7
- "lib": ["ES2023"],
8
6
  "strict": true,
9
7
  "esModuleInterop": true,
10
- "allowSyntheticDefaultImports": true,
11
- "resolveJsonModule": true,
12
- "skipLibCheck": true,
13
- "forceConsistentCasingInFileNames": true,
14
- "sourceMap": true,
15
- "declaration": false,
16
- "declarationMap": false,
17
- "removeComments": false,
18
- "noImplicitAny": true,
19
- "noImplicitReturns": true,
20
- "noImplicitThis": true,
21
- "noUnusedLocals": true,
22
- "noUnusedParameters": true,
23
- "exactOptionalPropertyTypes": true,
24
- "noEmitOnError": true,
25
- "incremental": false,
26
- "ignoreDeprecations": "5.0"
27
- },
28
- "include": ["src/**/*"],
29
- "exclude": ["node_modules", "dist"]
30
- }
8
+ }
9
+ }
@@ -1,6 +0,0 @@
1
- export declare const DATABASE_CONNECTION_STRINGS: {
2
- readonly postgresql: "postgresql://user:password@localhost:5432/mydb?schema=public";
3
- readonly mongodb: "mongodb://localhost:27017/mydb";
4
- readonly mysql: "mysql://user:password@localhost:3306/mydb";
5
- readonly sqlite: "file:./dev.db";
6
- };
@@ -1,9 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DATABASE_CONNECTION_STRINGS = void 0;
4
- exports.DATABASE_CONNECTION_STRINGS = {
5
- postgresql: "postgresql://user:password@localhost:5432/mydb?schema=public",
6
- mongodb: "mongodb://localhost:27017/mydb",
7
- mysql: "mysql://user:password@localhost:3306/mydb",
8
- sqlite: "file:./dev.db",
9
- };
@@ -1,34 +0,0 @@
1
- import mongoose, { Document, Schema } from "mongoose";
2
-
3
- export interface IUser extends Document {
4
- name: string;
5
- email: string;
6
- createdAt: Date;
7
- updatedAt: Date;
8
- }
9
-
10
- const UserSchema: Schema = new Schema(
11
- {
12
- name: {
13
- type: String,
14
- required: true,
15
- trim: true,
16
- },
17
- email: {
18
- type: String,
19
- required: true,
20
- unique: true,
21
- lowercase: true,
22
- trim: true,
23
- },
24
- },
25
- {
26
- timestamps: true,
27
- },
28
- );
29
-
30
- // Add indexes for better performance
31
- UserSchema.index({ email: 1 });
32
- UserSchema.index({ createdAt: -1 });
33
-
34
- export default mongoose.models.User || mongoose.model<IUser>("User", UserSchema);