stackkit 0.1.2 → 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 (37) hide show
  1. package/README.md +4 -2
  2. package/dist/cli/add.d.ts +2 -1
  3. package/dist/cli/add.js +318 -110
  4. package/dist/cli/create.js +8 -45
  5. package/dist/cli/doctor.js +0 -10
  6. package/dist/cli/list.js +3 -5
  7. package/dist/index.js +23 -4
  8. package/dist/lib/conversion/js-conversion.js +3 -2
  9. package/dist/lib/discovery/module-discovery.d.ts +0 -1
  10. package/dist/lib/discovery/module-discovery.js +27 -5
  11. package/dist/lib/generation/code-generator.d.ts +14 -0
  12. package/dist/lib/generation/code-generator.js +69 -65
  13. package/dist/lib/generation/generator-utils.d.ts +11 -0
  14. package/dist/lib/generation/generator-utils.js +116 -0
  15. package/dist/lib/git-utils.js +20 -0
  16. package/dist/lib/project/detect.js +2 -4
  17. package/dist/lib/utils/package-root.d.ts +1 -0
  18. package/dist/lib/utils/package-root.js +45 -0
  19. package/dist/types/index.d.ts +0 -10
  20. package/modules/auth/authjs/generator.json +10 -0
  21. package/modules/auth/authjs/module.json +0 -9
  22. package/modules/auth/better-auth/files/lib/auth.ts +7 -7
  23. package/modules/auth/better-auth/generator.json +12 -12
  24. package/modules/auth/better-auth/module.json +0 -24
  25. package/modules/database/mongoose/files/models/health.ts +34 -0
  26. package/modules/database/mongoose/generator.json +4 -4
  27. package/modules/database/mongoose/module.json +1 -2
  28. package/modules/database/prisma/files/lib/prisma.ts +2 -1
  29. package/modules/database/prisma/generator.json +33 -8
  30. package/modules/database/prisma/module.json +1 -4
  31. package/package.json +1 -2
  32. package/templates/express/tsconfig.json +2 -23
  33. package/dist/lib/database/database-config.d.ts +0 -6
  34. package/dist/lib/database/database-config.js +0 -9
  35. package/modules/database/mongoose/files/models/User.ts +0 -34
  36. package/templates/react-vite/README.md +0 -56
  37. /package/modules/database/mongoose/files/lib/{db.ts → mongoose.ts} +0 -0
@@ -0,0 +1,11 @@
1
+ import type { GeneratorConfig } from './code-generator';
2
+ import type { ModuleMetadata } from '../../types';
3
+ export declare function mergeModuleIntoGeneratorConfig(config: GeneratorConfig, modulePath: string): Promise<GeneratorConfig>;
4
+ export declare function mergeGeneratorIntoModuleMetadata(metadata: ModuleMetadata, modulePath: string): Promise<ModuleMetadata>;
5
+ export declare function locateOperationSource(generatorType: string, generatorName: string, sourceRel: string): string | null;
6
+ declare const _default: {
7
+ mergeModuleIntoGeneratorConfig: typeof mergeModuleIntoGeneratorConfig;
8
+ mergeGeneratorIntoModuleMetadata: typeof mergeGeneratorIntoModuleMetadata;
9
+ locateOperationSource: typeof locateOperationSource;
10
+ };
11
+ export default _default;
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.mergeModuleIntoGeneratorConfig = mergeModuleIntoGeneratorConfig;
37
+ exports.mergeGeneratorIntoModuleMetadata = mergeGeneratorIntoModuleMetadata;
38
+ exports.locateOperationSource = locateOperationSource;
39
+ const fs = __importStar(require("fs-extra"));
40
+ const path = __importStar(require("path"));
41
+ const package_root_1 = require("../utils/package-root");
42
+ async function mergeModuleIntoGeneratorConfig(config, modulePath) {
43
+ const modulePathJson = path.join(modulePath, 'module.json');
44
+ if (await fs.pathExists(modulePathJson)) {
45
+ try {
46
+ const moduleConfig = await fs.readJson(modulePathJson);
47
+ if (moduleConfig.postInstall && Array.isArray(moduleConfig.postInstall)) {
48
+ config.postInstall = moduleConfig.postInstall;
49
+ }
50
+ if (moduleConfig.dependencies && typeof moduleConfig.dependencies === 'object') {
51
+ config.dependencies = { ...(config.dependencies || {}), ...moduleConfig.dependencies };
52
+ }
53
+ if (moduleConfig.devDependencies && typeof moduleConfig.devDependencies === 'object') {
54
+ config.devDependencies = { ...(config.devDependencies || {}), ...moduleConfig.devDependencies };
55
+ }
56
+ if (moduleConfig.scripts && typeof moduleConfig.scripts === 'object') {
57
+ config.scripts = { ...(config.scripts || {}), ...moduleConfig.scripts };
58
+ }
59
+ if (moduleConfig.envVars && typeof moduleConfig.envVars === 'object') {
60
+ config.envVars = { ...(config.envVars || {}), ...moduleConfig.envVars };
61
+ }
62
+ }
63
+ catch {
64
+ // ignore invalid module.json
65
+ }
66
+ }
67
+ return config;
68
+ }
69
+ async function mergeGeneratorIntoModuleMetadata(metadata, modulePath) {
70
+ const generatorPath = path.join(modulePath, 'generator.json');
71
+ if (await fs.pathExists(generatorPath)) {
72
+ try {
73
+ const generator = await fs.readJson(generatorPath);
74
+ if (generator.envVars) {
75
+ metadata.envVars = metadata.envVars || [];
76
+ for (const [key, value] of Object.entries(generator.envVars)) {
77
+ metadata.envVars.push({ key, value: value, description: `Environment variable for ${key}`, required: true });
78
+ }
79
+ }
80
+ if (generator.dependencies) {
81
+ metadata.dependencies = { ...metadata.dependencies, ...generator.dependencies };
82
+ }
83
+ if (generator.devDependencies) {
84
+ metadata.devDependencies = { ...metadata.devDependencies, ...generator.devDependencies };
85
+ }
86
+ if (generator.postInstall && Array.isArray(generator.postInstall)) {
87
+ metadata.postInstall = metadata.postInstall || [];
88
+ metadata.postInstall.push(...generator.postInstall);
89
+ }
90
+ }
91
+ catch {
92
+ // ignore invalid generator.json
93
+ }
94
+ }
95
+ return metadata;
96
+ }
97
+ function locateOperationSource(generatorType, generatorName, sourceRel) {
98
+ const packageRoot = (0, package_root_1.getPackageRoot)();
99
+ const modulesPath = path.join(packageRoot, 'modules');
100
+ const templatesPath = path.join(packageRoot, 'templates');
101
+ const moduleBasePath = generatorType === 'framework'
102
+ ? path.join(templatesPath, generatorName)
103
+ : path.join(modulesPath, generatorType, generatorName);
104
+ const sourcePath = path.join(moduleBasePath, 'files', sourceRel);
105
+ try {
106
+ return sourcePath;
107
+ }
108
+ catch {
109
+ return null;
110
+ }
111
+ }
112
+ exports.default = {
113
+ mergeModuleIntoGeneratorConfig,
114
+ mergeGeneratorIntoModuleMetadata,
115
+ locateOperationSource,
116
+ };
@@ -3,7 +3,27 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.initGit = initGit;
4
4
  const child_process_1 = require("child_process");
5
5
  async function initGit(cwd) {
6
+ try {
7
+ (0, child_process_1.execSync)("git --version", { stdio: "pipe" });
8
+ }
9
+ catch {
10
+ throw new Error("Git is not installed or not available in PATH");
11
+ }
12
+ try {
13
+ (0, child_process_1.execSync)("git status", { cwd, stdio: "pipe" });
14
+ return;
15
+ }
16
+ catch {
17
+ // Not a git repo, proceed with initialization
18
+ }
6
19
  (0, child_process_1.execSync)("git init", { cwd, stdio: "pipe" });
7
20
  (0, child_process_1.execSync)("git add .", { cwd, stdio: "pipe" });
21
+ try {
22
+ (0, child_process_1.execSync)("git diff --cached --quiet", { cwd, stdio: "pipe" });
23
+ return;
24
+ }
25
+ catch {
26
+ // Files are staged, proceed with commit
27
+ }
8
28
  (0, child_process_1.execSync)('git commit -m "Initial commit"', { cwd, stdio: "pipe" });
9
29
  }
@@ -63,14 +63,13 @@ async function detectProjectInfo(targetDir) {
63
63
  language = "js";
64
64
  }
65
65
  else {
66
- // Default to TypeScript if neither exists
67
66
  language = "ts";
68
67
  }
69
68
  // Detect package manager
70
69
  const yarnLockExists = await fs_extra_1.default.pathExists(path_1.default.join(targetDir, "yarn.lock"));
71
70
  const pnpmLockExists = await fs_extra_1.default.pathExists(path_1.default.join(targetDir, "pnpm-lock.yaml"));
72
71
  const bunLockExists = await fs_extra_1.default.pathExists(path_1.default.join(targetDir, "bun.lockb"));
73
- let packageManager = "npm";
72
+ let packageManager = "pnpm";
74
73
  if (pnpmLockExists) {
75
74
  packageManager = "pnpm";
76
75
  }
@@ -84,8 +83,7 @@ async function detectProjectInfo(targetDir) {
84
83
  const hasAuth = !!(packageJson.dependencies?.["next-auth"] ||
85
84
  packageJson.dependencies?.["better-auth"] ||
86
85
  packageJson.dependencies?.["@auth/core"] ||
87
- packageJson.dependencies?.["@kinde-oss/kinde-auth-nextjs"] ||
88
- packageJson.dependencies?.["passport"]);
86
+ packageJson.dependencies?.["@kinde-oss/kinde-auth-nextjs"]);
89
87
  const hasPrisma = !!(packageJson.dependencies?.["@prisma/client"] || packageJson.devDependencies?.["prisma"]);
90
88
  const hasDatabase = hasPrisma ||
91
89
  !!(packageJson.dependencies?.["mongoose"] ||
@@ -0,0 +1 @@
1
+ export declare function getPackageRoot(): string;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ Object.defineProperty(exports, "__esModule", { value: true });
36
+ exports.getPackageRoot = getPackageRoot;
37
+ const path = __importStar(require("path"));
38
+ function getPackageRoot() {
39
+ try {
40
+ return path.dirname(require.resolve('stackkit/package.json'));
41
+ }
42
+ catch {
43
+ return path.resolve(__dirname, '..', '..', '..');
44
+ }
45
+ }
@@ -28,16 +28,6 @@ export interface ModuleMetadata {
28
28
  };
29
29
  }>;
30
30
  postInstall?: string[];
31
- databaseAdapters?: {
32
- common?: {
33
- dependencies?: Record<string, string>;
34
- devDependencies?: Record<string, string>;
35
- };
36
- providers?: Record<string, Record<string, {
37
- dependencies?: Record<string, string>;
38
- devDependencies?: Record<string, string>;
39
- }>>;
40
- };
41
31
  frameworkConfigs?: Record<string, {
42
32
  dependencies?: Record<string, string>;
43
33
  devDependencies?: Record<string, string>;
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "authjs",
3
+ "type": "auth",
4
+ "priority": 10,
5
+ "operations": [],
6
+ "dependencies": {},
7
+ "devDependencies": {},
8
+ "scripts": {},
9
+ "envVars": {}
10
+ }
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "authjs",
3
3
  "displayName": "Auth.js",
4
- "description": "Authentication with Auth.js (NextAuth.js v5)",
5
4
  "category": "auth",
6
5
  "provider": "authjs",
7
6
  "supportedFrameworks": ["nextjs"],
@@ -10,13 +9,5 @@
10
9
  "databases": ["prisma"],
11
10
  "languages": ["typescript", "javascript"],
12
11
  "packageManagers": ["npm", "yarn", "pnpm", "bun"]
13
- },
14
- "databaseAdapters": {
15
- "common": {
16
- "dependencies": {
17
- "@auth/prisma-adapter": "^2.7.1"
18
- },
19
- "devDependencies": {}
20
- }
21
12
  }
22
13
  }
@@ -1,22 +1,22 @@
1
1
  import { betterAuth } from "better-auth";
2
2
  import { sendEmail } from "./email/email-service";
3
3
  import { getVerificationEmailTemplate, getPasswordResetEmailTemplate } from "./email/email-templates";
4
- {{#if database=='prisma'}}
5
- import { prisma } from "{{framework=='nextjs' ? '@/lib' : '.'}}/prisma";
4
+ {{#if database == 'prisma'}}
5
+ import { prisma } from "{{framework == 'nextjs' ? '@/lib' : '.'}}/prisma";
6
6
  import { prismaAdapter } from "better-auth/adapters/prisma";
7
7
  {{/if}}
8
- {{#if database=='mongoose'}}
9
- import { mongoClient, db } from "{{framework=='nextjs' ? '@/lib' : '.'}}/db";
8
+ {{#if database == 'mongoose'}}
9
+ import { mongoClient, db } from "{{framework == 'nextjs' ? '@/lib' : '.'}}/db";
10
10
  import { mongodbAdapter } from "better-auth/adapters/mongodb";
11
11
  {{/if}}
12
12
 
13
13
  export const auth = betterAuth({
14
- {{#if database=='prisma'}}
14
+ {{#if database == 'prisma'}}
15
15
  database: prismaAdapter(prisma, {
16
- provider: {{prismaProvider}},
16
+ provider: "{{prismaProvider}}",
17
17
  }),
18
18
  {{/if}}
19
- {{#if database=='mongoose'}}
19
+ {{#if database == 'mongoose'}}
20
20
  database: mongodbAdapter(db),
21
21
  {{/if}}
22
22
  user: {
@@ -5,49 +5,42 @@
5
5
  "operations": [
6
6
  {
7
7
  "type": "create-file",
8
- "description": "Create Better Auth configuration file",
9
8
  "source": "lib/auth.ts",
10
9
  "destination": "lib/auth.ts",
11
10
  "condition": { "framework": ["nextjs", "express"] }
12
11
  },
13
12
  {
14
13
  "type": "create-file",
15
- "description": "Create email service for sending emails",
16
14
  "source": "lib/email-service.ts",
17
15
  "destination": "lib/email/email-service.ts",
18
16
  "condition": { "framework": ["nextjs", "express"] }
19
17
  },
20
18
  {
21
19
  "type": "create-file",
22
- "description": "Create email templates",
23
20
  "source": "lib/email-templates.ts",
24
21
  "destination": "lib/email/email-templates.ts",
25
22
  "condition": { "framework": ["nextjs", "express"] }
26
23
  },
27
24
  {
28
25
  "type": "create-file",
29
- "description": "Create Better Auth API routes for Next.js",
30
26
  "source": "api/auth/[...all]/route.ts",
31
27
  "destination": "app/api/auth/[...all]/route.ts",
32
28
  "condition": { "framework": "nextjs" }
33
29
  },
34
30
  {
35
31
  "type": "create-file",
36
- "description": "Create Better Auth client for React",
37
32
  "source": "lib/auth-client.ts",
38
33
  "destination": "lib/auth-client.ts",
39
34
  "condition": { "framework": ["nextjs", "react"] }
40
35
  },
41
36
  {
42
37
  "type": "create-file",
43
- "description": "Create Better Auth middleware for Next.js",
44
38
  "destination": "proxy.ts",
45
39
  "condition": { "framework": "nextjs" },
46
40
  "content": "import { auth } from \"@/lib/auth\";\n\nexport default auth((req) => {\n console.log('middleware', req.auth)\n})\n\nexport const config = {\n matcher: ['/((?!api|_next/static|_next/image|favicon.ico).*)'],\n}"
47
41
  },
48
42
  {
49
43
  "type": "patch-file",
50
- "description": "Add Better Auth schema to Prisma schema",
51
44
  "destination": "prisma/schema.prisma",
52
45
  "condition": { "database": "prisma" },
53
46
  "operations": [
@@ -56,15 +49,22 @@
56
49
  "source": "prisma/schema.prisma"
57
50
  }
58
51
  ]
52
+ },
53
+ {
54
+ "type": "add-dependency",
55
+ "condition": { "framework": ["nextjs", "express"] },
56
+ "dependencies": {
57
+ "nodemailer": "^7.0.12"
58
+ },
59
+ "devDependencies": {
60
+ "@types/nodemailer": "^7.0.5"
61
+ }
59
62
  }
60
63
  ],
61
64
  "dependencies": {
62
- "better-auth": "^1.4.12",
63
- "nodemailer": "^7.0.12"
64
- },
65
- "devDependencies": {
66
- "@types/nodemailer": "^7.0.5"
65
+ "better-auth": "^1.4.12"
67
66
  },
67
+ "devDependencies": {},
68
68
  "scripts": {},
69
69
  "envVars": {
70
70
  "BETTER_AUTH_SECRET": "",
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "better-auth",
3
3
  "displayName": "Better Auth",
4
- "description": "Modern authentication with Better Auth",
5
4
  "category": "auth",
6
5
  "provider": "better-auth",
7
6
  "supportedFrameworks": ["nextjs", "express", "react"],
@@ -10,28 +9,5 @@
10
9
  "databases": ["prisma", "mongoose"],
11
10
  "languages": ["typescript", "javascript"],
12
11
  "packageManagers": ["npm", "yarn", "pnpm", "bun"]
13
- },
14
- "databaseAdapters": {
15
- "prisma-postgresql": {
16
- "dependencies": {
17
- "@prisma/adapter-pg": "^5.0.0",
18
- "pg": "^8.0.0"
19
- }
20
- },
21
- "prisma-mongodb": {
22
- "dependencies": {}
23
- },
24
- "prisma-mysql": {
25
- "dependencies": {
26
- "@prisma/adapter-mariadb": "^5.0.0",
27
- "mysql2": "^3.0.0"
28
- }
29
- },
30
- "prisma-sqlite": {
31
- "dependencies": {
32
- "@prisma/adapter-better-sqlite3": "^5.0.0",
33
- "better-sqlite3": "^9.0.0"
34
- }
35
- }
36
12
  }
37
13
  }
@@ -0,0 +1,34 @@
1
+ import mongoose, { Document, Schema } from "mongoose";
2
+
3
+ export interface IHealth extends Document {
4
+ success: boolean;
5
+ message: string;
6
+ version: string;
7
+ createdAt: Date;
8
+ updatedAt: Date;
9
+ }
10
+
11
+ const healthSchema: Schema = new Schema(
12
+ {
13
+ success: {
14
+ type: Boolean,
15
+ default: true,
16
+ },
17
+ message: {
18
+ type: String,
19
+ required: true,
20
+ },
21
+ version: {
22
+ type: String,
23
+ required: true,
24
+ },
25
+ },
26
+ {
27
+ timestamps: true,
28
+ },
29
+ );
30
+
31
+ // Add indexes for better performance
32
+ healthSchema.index({ createdAt: -1 });
33
+
34
+ export default mongoose.models.Health || mongoose.model<IHealth>("Health", healthSchema);
@@ -5,13 +5,13 @@
5
5
  "operations": [
6
6
  {
7
7
  "type": "create-file",
8
- "source": "lib/db.ts",
9
- "destination": "src/lib/db.ts"
8
+ "source": "lib/mongoose.ts",
9
+ "destination": "src/lib/mongoose.ts"
10
10
  },
11
11
  {
12
12
  "type": "create-file",
13
- "source": "models/User.ts",
14
- "destination": "src/lib/models.ts"
13
+ "source": "models/health.ts",
14
+ "destination": "models/health.ts"
15
15
  }
16
16
  ],
17
17
  "dependencies": {
@@ -1,7 +1,6 @@
1
1
  {
2
2
  "name": "mongoose",
3
- "displayName": "Mongoose (MongoDB)",
4
- "description": "Mongoose ODM for MongoDB database",
3
+ "displayName": "Mongoose",
5
4
  "category": "database",
6
5
  "provider": "mongoose",
7
6
  "database": "mongodb",
@@ -1,4 +1,5 @@
1
- import { PrismaClient } from '@prisma/client'
1
+ import 'dotenv/config'
2
+ import { PrismaClient } from './generated/prisma/client'
2
3
 
3
4
  const globalForPrisma = globalThis as unknown as {
4
5
  prisma: PrismaClient | undefined
@@ -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.2",
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": {
@@ -71,7 +71,6 @@
71
71
  "@types/validate-npm-package-name": "^4.0.2",
72
72
  "typescript": "^5.3.3",
73
73
  "recast": "^0.20.5",
74
- "@babel/core": "^7.28.5",
75
74
  "@babel/plugin-transform-typescript": "^7.28.5",
76
75
  "@babel/parser": "^7.28.5",
77
76
  "@babel/plugin-transform-react-jsx": "^7.27.1"
@@ -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
- };