@myvillage/cli 1.8.2 → 1.8.3
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/package.json +1 -1
- package/src/commands/create-app.js +14 -40
package/package.json
CHANGED
|
@@ -6,7 +6,6 @@ import { villageSpinner, brand } from '../utils/brand.js';
|
|
|
6
6
|
import inquirer from 'inquirer';
|
|
7
7
|
import { isAuthenticated } from '../utils/auth.js';
|
|
8
8
|
import { createGameCommand } from './create-game.js';
|
|
9
|
-
import { createPortalProject, createDataLabelingProject } from '../utils/app-templates.js';
|
|
10
9
|
import { createAgenticAppProject } from '../utils/agentic-templates.js';
|
|
11
10
|
import { registerOAuthClient } from '../utils/api.js';
|
|
12
11
|
|
|
@@ -161,39 +160,19 @@ async function applicationFlow() {
|
|
|
161
160
|
}
|
|
162
161
|
}
|
|
163
162
|
|
|
164
|
-
//
|
|
165
|
-
const needsAgenticBackend = includeMcp || includeRestApi;
|
|
166
|
-
|
|
167
|
-
// Scaffold project
|
|
163
|
+
// Scaffold project (always Next.js)
|
|
168
164
|
const spinner = villageSpinner('Creating application...').start();
|
|
169
165
|
try {
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
oauthCredentials,
|
|
181
|
-
});
|
|
182
|
-
} else {
|
|
183
|
-
// Frontend-only: React + Vite portal (existing template)
|
|
184
|
-
// Map authStrategy to the features array the portal template expects
|
|
185
|
-
const portalFeatures = [...features];
|
|
186
|
-
if (hasOAuth && oauthCredentials) {
|
|
187
|
-
portalFeatures.push('auth');
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
createPortalProject(targetDir, {
|
|
191
|
-
name: basics.name,
|
|
192
|
-
description: basics.description,
|
|
193
|
-
features: portalFeatures,
|
|
194
|
-
oauthCredentials,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
166
|
+
createAgenticAppProject(targetDir, {
|
|
167
|
+
name: basics.name,
|
|
168
|
+
description: basics.description,
|
|
169
|
+
authStrategy: oauthCredentials ? authStrategy : (authStrategy === 'oauth' ? 'none' : authStrategy),
|
|
170
|
+
features,
|
|
171
|
+
includeMcp,
|
|
172
|
+
includeRestApi,
|
|
173
|
+
mcpToolGroups,
|
|
174
|
+
oauthCredentials,
|
|
175
|
+
});
|
|
197
176
|
|
|
198
177
|
spinner.text = 'Installing dependencies...';
|
|
199
178
|
execSync('npm install', { cwd: targetDir, stdio: 'pipe' });
|
|
@@ -205,14 +184,9 @@ async function applicationFlow() {
|
|
|
205
184
|
console.log(brand.teal(' Next steps:'));
|
|
206
185
|
console.log();
|
|
207
186
|
console.log(` ${brand.gold('cd')} ${slug}`);
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
console.log(` ${brand.gold('npm start')} ${brand.teal('- Start production server')}`);
|
|
212
|
-
} else {
|
|
213
|
-
console.log(` ${brand.gold('npm run dev')} ${brand.teal('- Start development server')}`);
|
|
214
|
-
console.log(` ${brand.gold('npm run build')} ${brand.teal('- Build for production')}`);
|
|
215
|
-
}
|
|
187
|
+
console.log(` ${brand.gold('npm run dev')} ${brand.teal('- Start development server')}`);
|
|
188
|
+
console.log(` ${brand.gold('npm run build')} ${brand.teal('- Build for production')}`);
|
|
189
|
+
console.log(` ${brand.gold('npm start')} ${brand.teal('- Start production server')}`);
|
|
216
190
|
console.log();
|
|
217
191
|
|
|
218
192
|
// Summary
|