@shivasankaran18/stackd 1.8.0 ā 2.0.1
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/apps/cli/src/cli.ts +28 -2
- package/apps/cli/src/commands/create.ts +30 -0
- package/apps/cli/src/scripts/ui/shadcn.ts +4 -10
- package/apps/cli/src/scripts/ui/tailwind.ts +39 -0
- package/apps/web/app/scaffold/page.tsx +1 -1
- package/apps/web/package.json +1 -1
- package/apps/web/tsconfig.json +108 -20
- package/package.json +18 -20
- package/dist/apps/cli/src/cli.js +0 -217
- package/dist/apps/cli/src/commands/create.js +0 -148
- package/dist/apps/cli/src/scripts/Auth/jwt.js +0 -78
- package/dist/apps/cli/src/scripts/Auth/nextAuth.js +0 -131
- package/dist/apps/cli/src/scripts/Auth/passport.js +0 -218
- package/dist/apps/cli/src/scripts/backend/django.js +0 -20
- package/dist/apps/cli/src/scripts/backend/expressjs.js +0 -58
- package/dist/apps/cli/src/scripts/backend/expressts.js +0 -83
- package/dist/apps/cli/src/scripts/frontend/angularjs.js +0 -1
- package/dist/apps/cli/src/scripts/frontend/angularts.js +0 -22
- package/dist/apps/cli/src/scripts/frontend/nextjs.js +0 -62
- package/dist/apps/cli/src/scripts/frontend/reactjs.js +0 -31
- package/dist/apps/cli/src/scripts/frontend/reactts.js +0 -30
- package/dist/apps/cli/src/scripts/frontend/vuejs.js +0 -37
- package/dist/apps/cli/src/scripts/frontend/vuets.js +0 -43
- package/dist/apps/cli/src/scripts/orms/drizzleSetup.js +0 -85
- package/dist/apps/cli/src/scripts/orms/mongoSetup.js +0 -53
- package/dist/apps/cli/src/scripts/orms/prismaSetup.js +0 -12
- package/dist/apps/cli/src/scripts/ui/shadcn.js +0 -207
- package/dist/apps/cli/src/scripts/ui/tailwindcss.js +0 -102
- package/dist/apps/web/app/api/auth/[...nextauth]/route.js +0 -5
- package/dist/apps/web/app/api/scaffold/route.js +0 -251
- package/dist/apps/web/app/home/page.js +0 -19
- package/dist/apps/web/app/layout.js +0 -19
- package/dist/apps/web/app/page.js +0 -1
- package/dist/apps/web/app/providers.js +0 -7
- package/dist/apps/web/app/scaffold/page.js +0 -326
- package/dist/apps/web/components/Sidebar.js +0 -54
- package/dist/apps/web/components/theme-provider.js +0 -6
- package/dist/apps/web/components/ui/button.js +0 -32
- package/dist/apps/web/components/ui/card.js +0 -15
- package/dist/apps/web/components/ui/dropdown-menu.js +0 -54
- package/dist/apps/web/components/ui/input.js +0 -7
- package/dist/apps/web/components/ui/label.js +0 -9
- package/dist/apps/web/components/ui/scroll-area.js +0 -19
- package/dist/apps/web/components/ui/sonner.js +0 -15
- package/dist/apps/web/components/ui/steps.js +0 -14
- package/dist/apps/web/components/ui/switch.js +0 -9
- package/dist/apps/web/lib/auth.js +0 -32
- package/dist/apps/web/lib/redis.js +0 -9
- package/dist/apps/web/lib/utils.js +0 -5
- package/dist/packages/scripts/Auth/jwt.js +0 -78
- package/dist/packages/scripts/Auth/nextAuth.js +0 -131
- package/dist/packages/scripts/Auth/passport.js +0 -218
- package/dist/packages/scripts/backend/django.js +0 -20
- package/dist/packages/scripts/backend/expressjs.js +0 -58
- package/dist/packages/scripts/backend/expressts.js +0 -83
- package/dist/packages/scripts/frontend/angularjs.js +0 -1
- package/dist/packages/scripts/frontend/angularts.js +0 -22
- package/dist/packages/scripts/frontend/nextjs.js +0 -62
- package/dist/packages/scripts/frontend/reactjs.js +0 -31
- package/dist/packages/scripts/frontend/reactts.js +0 -30
- package/dist/packages/scripts/frontend/vuejs.js +0 -37
- package/dist/packages/scripts/frontend/vuets.js +0 -43
- package/dist/packages/scripts/orms/drizzleSetup.js +0 -85
- package/dist/packages/scripts/orms/mongoSetup.js +0 -53
- package/dist/packages/scripts/orms/prismaSetup.js +0 -12
- package/dist/packages/scripts/ui/shadcn.js +0 -207
- package/dist/packages/scripts/ui/tailwindcss.js +0 -102
- package/dist/stackd.js +0 -114
- package/dist/tsconfig.tsbuildinfo +0 -1
- package/packages/typescript-config/base.json +0 -19
- package/packages/typescript-config/nextjs.json +0 -12
- package/packages/typescript-config/package.json +0 -9
- package/packages/typescript-config/react-library.json +0 -7
package/dist/stackd.js
DELETED
@@ -1,114 +0,0 @@
|
|
1
|
-
#!/usr/bin/env tsx
|
2
|
-
import { program } from 'commander';
|
3
|
-
import inquirer from 'inquirer';
|
4
|
-
import chalk from 'chalk';
|
5
|
-
import { spawn } from 'child_process';
|
6
|
-
import { join, dirname } from 'path';
|
7
|
-
import { fileURLToPath } from 'url';
|
8
|
-
import fs from 'fs';
|
9
|
-
const __filename = fileURLToPath(import.meta.url);
|
10
|
-
const __dirname = dirname(__filename);
|
11
|
-
const getPackageRoot = () => {
|
12
|
-
let currentDir = __dirname;
|
13
|
-
while (!fs.existsSync(join(currentDir, 'package.json'))) {
|
14
|
-
const parentDir = dirname(currentDir);
|
15
|
-
if (parentDir === currentDir) {
|
16
|
-
return process.cwd();
|
17
|
-
}
|
18
|
-
currentDir = parentDir;
|
19
|
-
}
|
20
|
-
return currentDir;
|
21
|
-
};
|
22
|
-
const packageRoot = getPackageRoot();
|
23
|
-
const showBanner = () => {
|
24
|
-
console.log(chalk.cyan(`
|
25
|
-
āāāāāāāāāāāāāāāā āāāāāā āāāāāāāāāā āāā'āāāāāāā
|
26
|
-
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā āāāāāāāāāāāā
|
27
|
-
āāāāāāā āāā āāāāāāāāāāā āāāāāāā āāā āāā
|
28
|
-
āāāāāāā āāā āāāāāāāāāāā āāāāāāā āāā āāā
|
29
|
-
āāāāāāāā āāā āāā āāāāāāāāāāāāāā āāāāāāāāāāā
|
30
|
-
āāāāāāā āāā āāā āāā āāāāāāāāāā āāāāāāāāāā
|
31
|
-
`));
|
32
|
-
console.log(chalk.yellow.bold(' š Full Stack Project Generator\n'));
|
33
|
-
};
|
34
|
-
const createBorder = () => chalk.cyan('='.repeat(60));
|
35
|
-
const executeCommand = (command, cwd) => {
|
36
|
-
const [cmd, ...args] = command.split(' ');
|
37
|
-
const process = spawn(cmd, args, { cwd, stdio: 'inherit', shell: true });
|
38
|
-
process.on('error', (error) => {
|
39
|
-
console.error(chalk.red(`Error: ${error.message}`));
|
40
|
-
});
|
41
|
-
return process;
|
42
|
-
};
|
43
|
-
const getAppPath = (appName) => {
|
44
|
-
const devPath = join(packageRoot, 'apps', appName);
|
45
|
-
if (fs.existsSync(devPath)) {
|
46
|
-
return devPath;
|
47
|
-
}
|
48
|
-
const publishedPath = join(packageRoot, 'node_modules', '@shivasankaran', 'stackd', 'apps', appName);
|
49
|
-
if (fs.existsSync(publishedPath)) {
|
50
|
-
return publishedPath;
|
51
|
-
}
|
52
|
-
return join(packageRoot, appName);
|
53
|
-
};
|
54
|
-
const initializeProject = async () => {
|
55
|
-
showBanner();
|
56
|
-
console.log(createBorder());
|
57
|
-
const answer = await inquirer.prompt([
|
58
|
-
{
|
59
|
-
type: 'list',
|
60
|
-
name: 'interface',
|
61
|
-
message: chalk.magenta.bold('šÆ Choose your preferred interface:'),
|
62
|
-
choices: [
|
63
|
-
{ name: chalk.blue('CLI Interface'), value: 'cli' },
|
64
|
-
{ name: chalk.green('Web Interface'), value: 'web' }
|
65
|
-
]
|
66
|
-
}
|
67
|
-
]);
|
68
|
-
try {
|
69
|
-
if (answer.interface === 'cli') {
|
70
|
-
console.log(chalk.blue('\nš¦ Starting CLI interface...\n'));
|
71
|
-
const cliAppPath = getAppPath('cli');
|
72
|
-
const cliScriptPath = join(cliAppPath, 'src', 'cli.ts');
|
73
|
-
console.log(cliScriptPath);
|
74
|
-
if (!fs.existsSync(cliScriptPath)) {
|
75
|
-
console.log(chalk.yellow(`\nCLI script not found at ${cliScriptPath}. Trying alternative paths...\n`));
|
76
|
-
const command = 'npx tsx @stackd/cli/src/cli.ts run';
|
77
|
-
executeCommand(command, process.cwd());
|
78
|
-
}
|
79
|
-
else {
|
80
|
-
console.log("hello");
|
81
|
-
executeCommand(`npx tsx ${cliScriptPath} run`, process.cwd());
|
82
|
-
}
|
83
|
-
}
|
84
|
-
else {
|
85
|
-
const webAppPath = getAppPath('web');
|
86
|
-
console.log(chalk.green(`\nš Setting up Web Interface at ${webAppPath}...\n`));
|
87
|
-
if (!fs.existsSync(webAppPath)) {
|
88
|
-
console.error(chalk.red(`\nā Web app directory not found at: ${webAppPath}`));
|
89
|
-
process.exit(1);
|
90
|
-
}
|
91
|
-
await executeCommand('npm install', webAppPath);
|
92
|
-
console.log(chalk.green('\nš Starting Web Interface...'));
|
93
|
-
console.log(chalk.green('\nš Web interface available at http://localhost:3000\n'));
|
94
|
-
executeCommand('npm run dev', webAppPath);
|
95
|
-
}
|
96
|
-
}
|
97
|
-
catch (error) {
|
98
|
-
console.error(chalk.red(`\nā Failed to start the selected interface: ${error.message}`));
|
99
|
-
process.exit(1);
|
100
|
-
}
|
101
|
-
};
|
102
|
-
program
|
103
|
-
.name('stackd')
|
104
|
-
.description('CLI tool for creating full-stack applications')
|
105
|
-
.version('6.0.0');
|
106
|
-
program
|
107
|
-
.command('init')
|
108
|
-
.action(initializeProject);
|
109
|
-
program
|
110
|
-
.action(() => {
|
111
|
-
console.log(chalk.yellow('\nNo command specified. Using "init" by default.\n'));
|
112
|
-
initializeProject();
|
113
|
-
});
|
114
|
-
program.parse(process.argv);
|
@@ -1 +0,0 @@
|
|
1
|
-
{"root":["../stackd.ts","../apps/cli/src/cli.ts","../apps/cli/src/commands/create.ts","../apps/cli/src/scripts/auth/jwt.ts","../apps/cli/src/scripts/auth/nextauth.ts","../apps/cli/src/scripts/auth/passport.ts","../apps/cli/src/scripts/backend/django.ts","../apps/cli/src/scripts/backend/expressjs.ts","../apps/cli/src/scripts/backend/expressts.ts","../apps/cli/src/scripts/frontend/angularjs.ts","../apps/cli/src/scripts/frontend/angularts.ts","../apps/cli/src/scripts/frontend/nextjs.ts","../apps/cli/src/scripts/frontend/reactjs.ts","../apps/cli/src/scripts/frontend/reactts.ts","../apps/cli/src/scripts/frontend/vuejs.ts","../apps/cli/src/scripts/frontend/vuets.ts","../apps/cli/src/scripts/orms/drizzlesetup.ts","../apps/cli/src/scripts/orms/mongosetup.ts","../apps/cli/src/scripts/orms/prismasetup.ts","../apps/cli/src/scripts/ui/shadcn.ts","../apps/cli/src/scripts/ui/tailwindcss.ts","../apps/web/next-env.d.ts","../apps/web/app/layout.tsx","../apps/web/app/page.tsx","../apps/web/app/providers.tsx","../apps/web/app/api/auth/[...nextauth]/route.ts","../apps/web/app/api/scaffold/route.ts","../apps/web/app/home/page.tsx","../apps/web/app/scaffold/page.tsx","../apps/web/components/sidebar.tsx","../apps/web/components/theme-provider.tsx","../apps/web/components/ui/button.tsx","../apps/web/components/ui/card.tsx","../apps/web/components/ui/dropdown-menu.tsx","../apps/web/components/ui/input.tsx","../apps/web/components/ui/label.tsx","../apps/web/components/ui/scroll-area.tsx","../apps/web/components/ui/sonner.tsx","../apps/web/components/ui/steps.tsx","../apps/web/components/ui/switch.tsx","../apps/web/lib/auth.ts","../apps/web/lib/redis.ts","../apps/web/lib/utils.ts","../apps/web/types/global.d.ts","../packages/scripts/auth/jwt.ts","../packages/scripts/auth/nextauth.ts","../packages/scripts/auth/passport.ts","../packages/scripts/backend/django.ts","../packages/scripts/backend/expressjs.ts","../packages/scripts/backend/expressts.ts","../packages/scripts/frontend/angularjs.ts","../packages/scripts/frontend/angularts.ts","../packages/scripts/frontend/nextjs.ts","../packages/scripts/frontend/reactjs.ts","../packages/scripts/frontend/reactts.ts","../packages/scripts/frontend/vuejs.ts","../packages/scripts/frontend/vuets.ts","../packages/scripts/orms/drizzlesetup.ts","../packages/scripts/orms/mongosetup.ts","../packages/scripts/orms/prismasetup.ts","../packages/scripts/ui/shadcn.ts","../packages/scripts/ui/tailwindcss.ts"],"errors":true,"version":"5.7.3"}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
3
|
-
"compilerOptions": {
|
4
|
-
"declaration": true,
|
5
|
-
"declarationMap": true,
|
6
|
-
"esModuleInterop": true,
|
7
|
-
"incremental": false,
|
8
|
-
"isolatedModules": true,
|
9
|
-
"lib": ["es2022", "DOM", "DOM.Iterable"],
|
10
|
-
"module": "NodeNext",
|
11
|
-
"moduleDetection": "force",
|
12
|
-
"moduleResolution": "NodeNext",
|
13
|
-
"noUncheckedIndexedAccess": true,
|
14
|
-
"resolveJsonModule": true,
|
15
|
-
"skipLibCheck": true,
|
16
|
-
"strict": true,
|
17
|
-
"target": "ES2022"
|
18
|
-
}
|
19
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"$schema": "https://json.schemastore.org/tsconfig",
|
3
|
-
"extends": "./base.json",
|
4
|
-
"compilerOptions": {
|
5
|
-
"plugins": [{ "name": "next" }],
|
6
|
-
"module": "ESNext",
|
7
|
-
"moduleResolution": "Bundler",
|
8
|
-
"allowJs": true,
|
9
|
-
"jsx": "preserve",
|
10
|
-
"noEmit": true
|
11
|
-
}
|
12
|
-
}
|