@rs-x/cli 2.0.0-next.12 → 2.0.0-next.14

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/bin/rsx.cjs CHANGED
@@ -211,7 +211,29 @@ function applyTagToPackages(packages, tag) {
211
211
  }
212
212
 
213
213
  function resolveInstallTag(flags) {
214
- return parseBooleanFlag(flags.next, false) ? 'next' : undefined;
214
+ if (parseBooleanFlag(flags.next, false)) {
215
+ return 'next';
216
+ }
217
+
218
+ if (CLI_VERSION.includes('-')) {
219
+ return 'next';
220
+ }
221
+
222
+ const checkoutRoot = findRepoRoot(__dirname);
223
+ if (!checkoutRoot) {
224
+ return undefined;
225
+ }
226
+
227
+ const branchResult = spawnSync('git', ['branch', '--show-current'], {
228
+ cwd: checkoutRoot,
229
+ encoding: 'utf8',
230
+ });
231
+ const branch = branchResult.status === 0 ? branchResult.stdout.trim() : '';
232
+ if (branch && branch !== 'main') {
233
+ return 'next';
234
+ }
235
+
236
+ return undefined;
215
237
  }
216
238
 
217
239
  function installPackages(pm, packages, options = {}) {
@@ -1288,16 +1310,36 @@ function scaffoldProjectTemplate(template, projectName, pm, flags) {
1288
1310
  }
1289
1311
 
1290
1312
  if (template === 'react') {
1291
- run('npx', ['create-vite@latest', projectName, '--template', 'react-ts'], {
1292
- dryRun,
1293
- });
1313
+ run(
1314
+ 'npx',
1315
+ [
1316
+ 'create-vite@latest',
1317
+ projectName,
1318
+ '--no-interactive',
1319
+ '--template',
1320
+ 'react-ts',
1321
+ ],
1322
+ {
1323
+ dryRun,
1324
+ },
1325
+ );
1294
1326
  return;
1295
1327
  }
1296
1328
 
1297
1329
  if (template === 'vuejs') {
1298
- run('npx', ['create-vite@latest', projectName, '--template', 'vue-ts'], {
1299
- dryRun,
1300
- });
1330
+ run(
1331
+ 'npx',
1332
+ [
1333
+ 'create-vite@latest',
1334
+ projectName,
1335
+ '--no-interactive',
1336
+ '--template',
1337
+ 'vue-ts',
1338
+ ],
1339
+ {
1340
+ dryRun,
1341
+ },
1342
+ );
1301
1343
  return;
1302
1344
  }
1303
1345
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rs-x/cli",
3
- "version": "2.0.0-next.12",
3
+ "version": "2.0.0-next.14",
4
4
  "description": "CLI for installing RS-X compiler tooling and VS Code integration",
5
5
  "bin": {
6
6
  "rsx": "./bin/rsx.cjs"