create-loadout 1.0.2 → 1.0.5
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 +1 -1
- package/dist/bin-paths.d.ts +2 -0
- package/dist/bin-paths.js +7 -0
- package/dist/claude-md.js +504 -333
- package/dist/cli.js +2 -2
- package/dist/create-next.js +2 -1
- package/dist/engine.js +26 -25
- package/dist/env.js +12 -25
- package/dist/generate-readme.js +123 -120
- package/dist/index.js +4 -1
- package/dist/integrations/index.js +3 -2
- package/dist/mcp-server.d.ts +1 -1
- package/dist/mcp-server.js +5 -1
- package/dist/setup-shadcn.js +3 -4
- package/dist/templates/neon-drizzle.js +329 -327
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -49,7 +49,7 @@ async function newProjectFlow() {
|
|
|
49
49
|
}
|
|
50
50
|
console.log(chalk.bold(' Next steps:'));
|
|
51
51
|
console.log(chalk.gray(` 1. cd ${config.name}`));
|
|
52
|
-
console.log(chalk.gray(' 2. Configure .env
|
|
52
|
+
console.log(chalk.gray(' 2. Configure .env with your API keys'));
|
|
53
53
|
console.log(chalk.gray(' 3. npm run dev'));
|
|
54
54
|
console.log();
|
|
55
55
|
if (config.integrations.includes('neon-drizzle')) {
|
|
@@ -101,7 +101,7 @@ async function addIntegrationFlow(projectPath) {
|
|
|
101
101
|
});
|
|
102
102
|
console.log();
|
|
103
103
|
console.log(chalk.bold(' Next steps:'));
|
|
104
|
-
console.log(chalk.gray(' 1. Update .env
|
|
104
|
+
console.log(chalk.gray(' 1. Update .env with new API keys'));
|
|
105
105
|
console.log(chalk.gray(' 2. npm run dev'));
|
|
106
106
|
console.log();
|
|
107
107
|
if (addConfig.integrations.includes('neon-drizzle')) {
|
package/dist/create-next.js
CHANGED
package/dist/engine.js
CHANGED
|
@@ -18,8 +18,9 @@ export async function createProject(config, onProgress) {
|
|
|
18
18
|
await extendUtils(projectPath);
|
|
19
19
|
onProgress?.('Installing base packages...');
|
|
20
20
|
const { execa } = await import('execa');
|
|
21
|
-
|
|
22
|
-
await execa(
|
|
21
|
+
const { NPM } = await import('./bin-paths.js');
|
|
22
|
+
await execa(NPM, ['install', 'zod', 'zustand', 'luxon'], { cwd: projectPath });
|
|
23
|
+
await execa(NPM, ['install', '-D', '@types/luxon'], { cwd: projectPath });
|
|
23
24
|
await fs.mkdir(path.join(projectPath, 'lib/stores'), { recursive: true });
|
|
24
25
|
await fs.writeFile(path.join(projectPath, 'lib/stores/counter.store.ts'), zustandTemplates.exampleStore);
|
|
25
26
|
if (config.integrations.length > 0) {
|
|
@@ -53,29 +54,29 @@ export async function addIntegrations(projectPath, config, onProgress) {
|
|
|
53
54
|
async function extendUtils(projectPath) {
|
|
54
55
|
const utilsPath = path.join(projectPath, 'lib/utils.ts');
|
|
55
56
|
const existingContent = await fs.readFile(utilsPath, 'utf-8');
|
|
56
|
-
const additionalUtils = `
|
|
57
|
-
import { DateTime } from 'luxon';
|
|
58
|
-
|
|
59
|
-
export function formatDate(date: Date | string, format = 'LLL d, yyyy'): string {
|
|
60
|
-
const dt = typeof date === 'string' ? DateTime.fromISO(date) : DateTime.fromJSDate(date);
|
|
61
|
-
return dt.toFormat(format);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export function formatRelative(date: Date | string): string {
|
|
65
|
-
const dt = typeof date === 'string' ? DateTime.fromISO(date) : DateTime.fromJSDate(date);
|
|
66
|
-
return dt.toRelative() ?? dt.toFormat('LLL d, yyyy');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function debounce<P extends unknown[], R>(
|
|
70
|
-
func: (...args: P) => R,
|
|
71
|
-
wait: number
|
|
72
|
-
): (...args: P) => void {
|
|
73
|
-
let timeout: ReturnType<typeof setTimeout>;
|
|
74
|
-
return (...args: P) => {
|
|
75
|
-
clearTimeout(timeout);
|
|
76
|
-
timeout = setTimeout(() => func(...args), wait);
|
|
77
|
-
};
|
|
78
|
-
}
|
|
57
|
+
const additionalUtils = `
|
|
58
|
+
import { DateTime } from 'luxon';
|
|
59
|
+
|
|
60
|
+
export function formatDate(date: Date | string, format = 'LLL d, yyyy'): string {
|
|
61
|
+
const dt = typeof date === 'string' ? DateTime.fromISO(date) : DateTime.fromJSDate(date);
|
|
62
|
+
return dt.toFormat(format);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function formatRelative(date: Date | string): string {
|
|
66
|
+
const dt = typeof date === 'string' ? DateTime.fromISO(date) : DateTime.fromJSDate(date);
|
|
67
|
+
return dt.toRelative() ?? dt.toFormat('LLL d, yyyy');
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function debounce<P extends unknown[], R>(
|
|
71
|
+
func: (...args: P) => R,
|
|
72
|
+
wait: number
|
|
73
|
+
): (...args: P) => void {
|
|
74
|
+
let timeout: ReturnType<typeof setTimeout>;
|
|
75
|
+
return (...args: P) => {
|
|
76
|
+
clearTimeout(timeout);
|
|
77
|
+
timeout = setTimeout(() => func(...args), wait);
|
|
78
|
+
};
|
|
79
|
+
}
|
|
79
80
|
`;
|
|
80
81
|
await fs.writeFile(utilsPath, existingContent + additionalUtils);
|
|
81
82
|
}
|
package/dist/env.js
CHANGED
|
@@ -138,37 +138,24 @@ export async function generateEnvFiles(projectPath, config) {
|
|
|
138
138
|
envExample += '\n';
|
|
139
139
|
}
|
|
140
140
|
await fs.writeFile(path.join(projectPath, '.env.example'), envExample.trim() + '\n');
|
|
141
|
-
// Generate .env
|
|
142
|
-
let
|
|
141
|
+
// Generate .env with empty values
|
|
142
|
+
let env = '';
|
|
143
143
|
for (const id of selectedIds) {
|
|
144
144
|
const section = getEnvSection(id, config.aiProvider);
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
await fs.writeFile(path.join(projectPath, '.env.local'), envLocal.trim() + '\n');
|
|
149
|
-
// Update .gitignore to include .env.local
|
|
150
|
-
const gitignorePath = path.join(projectPath, '.gitignore');
|
|
151
|
-
try {
|
|
152
|
-
let gitignore = await fs.readFile(gitignorePath, 'utf-8');
|
|
153
|
-
if (!gitignore.includes('.env.local')) {
|
|
154
|
-
gitignore += '\n# Environment variables\n.env.local\n.env*.local\n';
|
|
155
|
-
await fs.writeFile(gitignorePath, gitignore);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
catch {
|
|
159
|
-
// .gitignore doesn't exist, create it
|
|
160
|
-
await fs.writeFile(gitignorePath, '# Environment variables\n.env.local\n.env*.local\n');
|
|
145
|
+
env += generateEnvSection(section, false);
|
|
146
|
+
env += '\n';
|
|
161
147
|
}
|
|
148
|
+
await fs.writeFile(path.join(projectPath, '.env'), env.trim() + '\n');
|
|
162
149
|
}
|
|
163
150
|
export async function appendEnvFiles(projectPath, integrations, aiProvider) {
|
|
164
151
|
const envExamplePath = path.join(projectPath, '.env.example');
|
|
165
|
-
const
|
|
152
|
+
const envPath = path.join(projectPath, '.env');
|
|
166
153
|
let envExampleContent = '';
|
|
167
|
-
let
|
|
154
|
+
let envContent = '';
|
|
168
155
|
for (const id of integrations) {
|
|
169
156
|
const section = getEnvSection(id, aiProvider);
|
|
170
157
|
envExampleContent += '\n' + generateEnvSection(section, true);
|
|
171
|
-
|
|
158
|
+
envContent += '\n' + generateEnvSection(section, false);
|
|
172
159
|
}
|
|
173
160
|
if (envExampleContent) {
|
|
174
161
|
try {
|
|
@@ -179,13 +166,13 @@ export async function appendEnvFiles(projectPath, integrations, aiProvider) {
|
|
|
179
166
|
await fs.writeFile(envExamplePath, envExampleContent.trim() + '\n');
|
|
180
167
|
}
|
|
181
168
|
}
|
|
182
|
-
if (
|
|
169
|
+
if (envContent) {
|
|
183
170
|
try {
|
|
184
|
-
const existing = await fs.readFile(
|
|
185
|
-
await fs.writeFile(
|
|
171
|
+
const existing = await fs.readFile(envPath, 'utf-8');
|
|
172
|
+
await fs.writeFile(envPath, existing.trimEnd() + '\n' + envContent.trim() + '\n');
|
|
186
173
|
}
|
|
187
174
|
catch {
|
|
188
|
-
await fs.writeFile(
|
|
175
|
+
await fs.writeFile(envPath, envContent.trim() + '\n');
|
|
189
176
|
}
|
|
190
177
|
}
|
|
191
178
|
}
|
package/dist/generate-readme.js
CHANGED
|
@@ -14,36 +14,36 @@ const integrationNames = {
|
|
|
14
14
|
sentry: 'Sentry',
|
|
15
15
|
};
|
|
16
16
|
export async function generateReadme(projectPath, config) {
|
|
17
|
-
let content = `# ${config.name}
|
|
18
|
-
|
|
19
|
-
A Next.js application scaffolded with [create-loadout](https://github.com/your-org/create-loadout).
|
|
20
|
-
|
|
21
|
-
## Getting Started
|
|
22
|
-
|
|
23
|
-
1. Install dependencies:
|
|
24
|
-
\`\`\`bash
|
|
25
|
-
npm install
|
|
26
|
-
\`\`\`
|
|
27
|
-
|
|
28
|
-
2. Copy the environment file and configure your API keys:
|
|
29
|
-
\`\`\`bash
|
|
30
|
-
cp .env.example .env
|
|
31
|
-
\`\`\`
|
|
32
|
-
|
|
33
|
-
3. Start the development server:
|
|
34
|
-
\`\`\`bash
|
|
35
|
-
npm run dev
|
|
36
|
-
\`\`\`
|
|
37
|
-
|
|
38
|
-
4. Open [http://localhost:3000](http://localhost:3000) in your browser.
|
|
39
|
-
|
|
40
|
-
## Tech Stack
|
|
41
|
-
|
|
42
|
-
- [Next.js](https://nextjs.org/) - React framework
|
|
43
|
-
- [TypeScript](https://www.typescriptlang.org/) - Type safety
|
|
44
|
-
- [Tailwind CSS](https://tailwindcss.com/) - Styling
|
|
45
|
-
- [shadcn/ui](https://ui.shadcn.com/) - UI components
|
|
46
|
-
- [Zod](https://zod.dev/) - Schema validation
|
|
17
|
+
let content = `# ${config.name}
|
|
18
|
+
|
|
19
|
+
A Next.js application scaffolded with [create-loadout](https://github.com/your-org/create-loadout).
|
|
20
|
+
|
|
21
|
+
## Getting Started
|
|
22
|
+
|
|
23
|
+
1. Install dependencies:
|
|
24
|
+
\`\`\`bash
|
|
25
|
+
npm install
|
|
26
|
+
\`\`\`
|
|
27
|
+
|
|
28
|
+
2. Copy the environment file and configure your API keys:
|
|
29
|
+
\`\`\`bash
|
|
30
|
+
cp .env.example .env
|
|
31
|
+
\`\`\`
|
|
32
|
+
|
|
33
|
+
3. Start the development server:
|
|
34
|
+
\`\`\`bash
|
|
35
|
+
npm run dev
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
4. Open [http://localhost:3000](http://localhost:3000) in your browser.
|
|
39
|
+
|
|
40
|
+
## Tech Stack
|
|
41
|
+
|
|
42
|
+
- [Next.js](https://nextjs.org/) - React framework
|
|
43
|
+
- [TypeScript](https://www.typescriptlang.org/) - Type safety
|
|
44
|
+
- [Tailwind CSS](https://tailwindcss.com/) - Styling
|
|
45
|
+
- [shadcn/ui](https://ui.shadcn.com/) - UI components
|
|
46
|
+
- [Zod](https://zod.dev/) - Schema validation
|
|
47
47
|
`;
|
|
48
48
|
if (config.integrations.length > 0) {
|
|
49
49
|
content += `\n### Integrations\n\n`;
|
|
@@ -51,111 +51,114 @@ A Next.js application scaffolded with [create-loadout](https://github.com/your-o
|
|
|
51
51
|
content += `- ${integrationNames[id]}\n`;
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
|
-
content += `
|
|
55
|
-
## Scripts
|
|
56
|
-
|
|
57
|
-
\`\`\`bash
|
|
58
|
-
npm run dev # Start development server
|
|
59
|
-
npm run build # Build for production
|
|
60
|
-
npm run start # Start production server
|
|
61
|
-
npm run lint # Run ESLint
|
|
62
|
-
\`\`\`
|
|
54
|
+
content += `
|
|
55
|
+
## Scripts
|
|
56
|
+
|
|
57
|
+
\`\`\`bash
|
|
58
|
+
npm run dev # Start development server
|
|
59
|
+
npm run build # Build for production
|
|
60
|
+
npm run start # Start production server
|
|
61
|
+
npm run lint # Run ESLint
|
|
62
|
+
\`\`\`
|
|
63
63
|
`;
|
|
64
64
|
if (config.integrations.includes('neon-drizzle')) {
|
|
65
|
-
content += `
|
|
66
|
-
### Database
|
|
67
|
-
|
|
68
|
-
\`\`\`bash
|
|
69
|
-
npm run db:generate # Generate migrations
|
|
70
|
-
npm run db:migrate # Run migrations
|
|
71
|
-
npm run db:studio # Open Drizzle Studio
|
|
72
|
-
\`\`\`
|
|
65
|
+
content += `
|
|
66
|
+
### Database
|
|
67
|
+
|
|
68
|
+
\`\`\`bash
|
|
69
|
+
npm run db:generate # Generate migrations
|
|
70
|
+
npm run db:migrate # Run migrations
|
|
71
|
+
npm run db:studio # Open Drizzle Studio
|
|
72
|
+
\`\`\`
|
|
73
73
|
`;
|
|
74
74
|
}
|
|
75
75
|
if (config.integrations.includes('inngest')) {
|
|
76
|
-
content += `
|
|
77
|
-
### Background Jobs
|
|
78
|
-
|
|
79
|
-
\`\`\`bash
|
|
80
|
-
npm run inngest:dev # Start Inngest dev server
|
|
81
|
-
\`\`\`
|
|
76
|
+
content += `
|
|
77
|
+
### Background Jobs
|
|
78
|
+
|
|
79
|
+
\`\`\`bash
|
|
80
|
+
npm run inngest:dev # Start Inngest dev server
|
|
81
|
+
\`\`\`
|
|
82
82
|
`;
|
|
83
83
|
}
|
|
84
|
-
content += `
|
|
85
|
-
## Project Structure
|
|
86
|
-
|
|
87
|
-
\`\`\`
|
|
88
|
-
├── app/ # Next.js App Router
|
|
89
|
-
├── components/ # React components
|
|
90
|
-
├── lib/ # Utilities and clients
|
|
91
|
-
├── services/ # Business logic
|
|
84
|
+
content += `
|
|
85
|
+
## Project Structure
|
|
86
|
+
|
|
87
|
+
\`\`\`
|
|
88
|
+
├── app/ # Next.js App Router
|
|
89
|
+
├── components/ # React components
|
|
90
|
+
├── lib/ # Utilities and clients
|
|
91
|
+
├── services/ # Business logic
|
|
92
92
|
`;
|
|
93
93
|
if (config.integrations.includes('resend') || config.integrations.includes('postmark')) {
|
|
94
94
|
content += `├── emails/ # Email templates\n`;
|
|
95
95
|
}
|
|
96
|
-
content += `└── public/ # Static assets
|
|
97
|
-
\`\`\`
|
|
98
|
-
|
|
99
|
-
## Environment Variables
|
|
100
|
-
|
|
101
|
-
See \`.env.example\` for all required environment variables.
|
|
102
|
-
|
|
103
|
-
## Learn More
|
|
104
|
-
|
|
105
|
-
- [Next.js Documentation](https://nextjs.org/docs)
|
|
106
|
-
- [CLAUDE.md](./CLAUDE.md) - AI assistant context file
|
|
96
|
+
content += `└── public/ # Static assets
|
|
97
|
+
\`\`\`
|
|
98
|
+
|
|
99
|
+
## Environment Variables
|
|
100
|
+
|
|
101
|
+
See \`.env.example\` for all required environment variables.
|
|
102
|
+
|
|
103
|
+
## Learn More
|
|
104
|
+
|
|
105
|
+
- [Next.js Documentation](https://nextjs.org/docs)
|
|
106
|
+
- [CLAUDE.md](./CLAUDE.md) - AI assistant context file
|
|
107
107
|
`;
|
|
108
108
|
await fs.writeFile(path.join(projectPath, 'README.md'), content);
|
|
109
109
|
}
|
|
110
110
|
export async function generateGitignore(projectPath) {
|
|
111
|
-
const content = `# Dependencies
|
|
112
|
-
node_modules/
|
|
113
|
-
.pnp/
|
|
114
|
-
.pnp.js
|
|
115
|
-
|
|
116
|
-
# Build
|
|
117
|
-
.next/
|
|
118
|
-
out/
|
|
119
|
-
build/
|
|
120
|
-
dist/
|
|
121
|
-
|
|
122
|
-
# Environment
|
|
123
|
-
.env
|
|
124
|
-
.env.local
|
|
125
|
-
.env.development.local
|
|
126
|
-
.env.test.local
|
|
127
|
-
.env.production.local
|
|
128
|
-
|
|
129
|
-
# Testing
|
|
130
|
-
coverage/
|
|
131
|
-
|
|
132
|
-
# IDE
|
|
133
|
-
.vscode/
|
|
134
|
-
.idea/
|
|
135
|
-
*.swp
|
|
136
|
-
*.swo
|
|
137
|
-
|
|
138
|
-
#
|
|
139
|
-
.
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
.
|
|
149
|
-
|
|
150
|
-
#
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
#
|
|
158
|
-
|
|
111
|
+
const content = `# Dependencies
|
|
112
|
+
node_modules/
|
|
113
|
+
.pnp/
|
|
114
|
+
.pnp.js
|
|
115
|
+
|
|
116
|
+
# Build
|
|
117
|
+
.next/
|
|
118
|
+
out/
|
|
119
|
+
build/
|
|
120
|
+
dist/
|
|
121
|
+
|
|
122
|
+
# Environment
|
|
123
|
+
.env
|
|
124
|
+
.env.local
|
|
125
|
+
.env.development.local
|
|
126
|
+
.env.test.local
|
|
127
|
+
.env.production.local
|
|
128
|
+
|
|
129
|
+
# Testing
|
|
130
|
+
coverage/
|
|
131
|
+
|
|
132
|
+
# IDE
|
|
133
|
+
.vscode/
|
|
134
|
+
.idea/
|
|
135
|
+
*.swp
|
|
136
|
+
*.swo
|
|
137
|
+
|
|
138
|
+
# Claude Code
|
|
139
|
+
.claude/
|
|
140
|
+
|
|
141
|
+
# OS
|
|
142
|
+
.DS_Store
|
|
143
|
+
Thumbs.db
|
|
144
|
+
|
|
145
|
+
# Debug
|
|
146
|
+
npm-debug.log*
|
|
147
|
+
yarn-debug.log*
|
|
148
|
+
yarn-error.log*
|
|
149
|
+
|
|
150
|
+
# Vercel
|
|
151
|
+
.vercel
|
|
152
|
+
|
|
153
|
+
# TypeScript
|
|
154
|
+
*.tsbuildinfo
|
|
155
|
+
next-env.d.ts
|
|
156
|
+
|
|
157
|
+
# Drizzle
|
|
158
|
+
drizzle/
|
|
159
|
+
|
|
160
|
+
# Sentry
|
|
161
|
+
.sentryclirc
|
|
159
162
|
`;
|
|
160
163
|
await fs.writeFile(path.join(projectPath, '.gitignore'), content);
|
|
161
164
|
}
|
package/dist/index.js
CHANGED
|
@@ -7,11 +7,14 @@ import { listIntegrations } from './metadata.js';
|
|
|
7
7
|
import { isExistingProject, getInstalledIntegrations } from './detect.js';
|
|
8
8
|
import fs from 'fs/promises';
|
|
9
9
|
import path from 'path';
|
|
10
|
+
import { createRequire } from 'module';
|
|
11
|
+
const require = createRequire(import.meta.url);
|
|
12
|
+
const { version } = require('../package.json');
|
|
10
13
|
const program = new Command();
|
|
11
14
|
program
|
|
12
15
|
.name('create-loadout')
|
|
13
16
|
.description('Custom Next.js scaffolding with SaaS integrations')
|
|
14
|
-
.version(
|
|
17
|
+
.version(version)
|
|
15
18
|
.argument('[name]', 'Project name')
|
|
16
19
|
.option('--clerk', 'Add Clerk authentication')
|
|
17
20
|
.option('--neon-drizzle', 'Add Neon + Drizzle database')
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { execa } from 'execa';
|
|
2
|
+
import { NPM } from '../bin-paths.js';
|
|
2
3
|
import { clerkIntegration } from './clerk.js';
|
|
3
4
|
import { neonDrizzleIntegration } from './neon-drizzle.js';
|
|
4
5
|
import { createAiSdkIntegration } from './ai-sdk.js';
|
|
@@ -43,10 +44,10 @@ export async function installIntegrations(projectPath, config) {
|
|
|
43
44
|
}
|
|
44
45
|
// Install all packages at once
|
|
45
46
|
if (allPackages.length > 0) {
|
|
46
|
-
await execa(
|
|
47
|
+
await execa(NPM, ['install', ...allPackages], { cwd: projectPath });
|
|
47
48
|
}
|
|
48
49
|
if (allDevPackages.length > 0) {
|
|
49
|
-
await execa(
|
|
50
|
+
await execa(NPM, ['install', '-D', ...allDevPackages], { cwd: projectPath });
|
|
50
51
|
}
|
|
51
52
|
// Run setup for each integration
|
|
52
53
|
for (const id of config.integrations) {
|
package/dist/mcp-server.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
import './bin-paths.js';
|
package/dist/mcp-server.js
CHANGED
|
@@ -3,13 +3,17 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
3
3
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
4
|
import { z } from 'zod';
|
|
5
5
|
import path from 'path';
|
|
6
|
+
import { createRequire } from 'module';
|
|
7
|
+
import './bin-paths.js';
|
|
6
8
|
import { createProject, addIntegrations } from './engine.js';
|
|
7
9
|
import { validateProjectConfig, validateIntegrationSelection, } from './validate.js';
|
|
8
10
|
import { listIntegrations } from './metadata.js';
|
|
9
11
|
import { isExistingProject, getInstalledIntegrations, getAvailableIntegrations, } from './detect.js';
|
|
12
|
+
const require = createRequire(import.meta.url);
|
|
13
|
+
const { version } = require('../package.json');
|
|
10
14
|
const server = new McpServer({
|
|
11
15
|
name: 'create-loadout',
|
|
12
|
-
version
|
|
16
|
+
version,
|
|
13
17
|
});
|
|
14
18
|
// Tool: list_integrations
|
|
15
19
|
server.tool('list_integrations', 'List all available integrations with metadata, env vars, and constraints', {}, async () => {
|
package/dist/setup-shadcn.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { execa } from 'execa';
|
|
2
|
+
import { NPX } from './bin-paths.js';
|
|
2
3
|
export async function setupShadcn(projectPath) {
|
|
3
|
-
|
|
4
|
-
await execa('npx', [
|
|
4
|
+
await execa(NPX, [
|
|
5
5
|
'shadcn@latest',
|
|
6
6
|
'init',
|
|
7
7
|
'-y',
|
|
@@ -10,8 +10,7 @@ export async function setupShadcn(projectPath) {
|
|
|
10
10
|
cwd: projectPath,
|
|
11
11
|
stdio: 'pipe',
|
|
12
12
|
});
|
|
13
|
-
|
|
14
|
-
await execa('npx', [
|
|
13
|
+
await execa(NPX, [
|
|
15
14
|
'shadcn@latest',
|
|
16
15
|
'add',
|
|
17
16
|
'button',
|