@tanstack/cta-cli 0.16.0 → 0.16.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/dist/cli.js CHANGED
@@ -4,7 +4,7 @@ import { Command, InvalidArgumentError } from 'commander';
4
4
  import { intro, log } from '@clack/prompts';
5
5
  import chalk from 'chalk';
6
6
  import semver from 'semver';
7
- import { SUPPORTED_PACKAGE_MANAGERS, addToApp, compileAddOn, compileStarter, createApp, createSerializedOptions, getAllAddOns, getFrameworkById, getFrameworkByName, getFrameworks, initAddOn, initStarter, } from '@tanstack/cta-engine';
7
+ import { SUPPORTED_PACKAGE_MANAGERS, addToApp, compileAddOn, compileStarter, createApp, createSerializedOptions, getAllAddOns, getFrameworkById, getFrameworks, initAddOn, initStarter, } from '@tanstack/cta-engine';
8
8
  import { launchUI } from '@tanstack/cta-ui';
9
9
  import { runMCPServer } from './mcp.js';
10
10
  import { promptForAddOns, promptForCreateOptions } from './options.js';
@@ -181,7 +181,7 @@ Remove your node_modules directory and package lock file and re-install.`);
181
181
  throw new InvalidArgumentError(`Invalid framework: ${value}. Only the following are allowed: ${availableFrameworks.join(', ')}`);
182
182
  }
183
183
  return value;
184
- }, defaultFramework || 'React');
184
+ }, defaultFramework || 'react-cra');
185
185
  }
186
186
  program
187
187
  .option('--starter [url]', 'initialize this project from a starter URL', false)
@@ -217,6 +217,7 @@ Remove your node_modules directory and package lock file and re-install.`);
217
217
  .option('--ui', 'Add with the UI');
218
218
  program.action(async (projectName, options) => {
219
219
  if (options.listAddOns) {
220
+ console.log(options.framework || defaultFramework || 'react-cra');
220
221
  const addOns = await getAllAddOns(getFrameworkById(options.framework || defaultFramework || 'react-cra'), defaultMode ||
221
222
  convertTemplateToMode(options.template || defaultTemplate));
222
223
  for (const addOn of addOns.filter((a) => !forcedAddOns.includes(a.id))) {
@@ -236,7 +237,7 @@ Remove your node_modules directory and package lock file and re-install.`);
236
237
  projectName,
237
238
  ...options,
238
239
  };
239
- cliOptions.framework = getFrameworkByName(options.framework || defaultFramework || 'React').id;
240
+ cliOptions.framework = getFrameworkById(options.framework || defaultFramework || 'react-cra').id;
240
241
  if (defaultMode) {
241
242
  cliOptions.template = defaultMode;
242
243
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tanstack/cta-cli",
3
- "version": "0.16.0",
3
+ "version": "0.16.1",
4
4
  "description": "Tanstack Application Builder CLI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -30,8 +30,8 @@
30
30
  "express": "^4.21.2",
31
31
  "semver": "^7.7.2",
32
32
  "zod": "^3.24.2",
33
- "@tanstack/cta-engine": "0.16.0",
34
- "@tanstack/cta-ui": "0.16.0"
33
+ "@tanstack/cta-engine": "0.16.1",
34
+ "@tanstack/cta-ui": "0.16.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@tanstack/config": "^0.16.2",
package/src/cli.ts CHANGED
@@ -266,7 +266,7 @@ Remove your node_modules directory and package lock file and re-install.`,
266
266
  }
267
267
  return value
268
268
  },
269
- defaultFramework || 'React',
269
+ defaultFramework || 'react-cra',
270
270
  )
271
271
  }
272
272
 
@@ -334,6 +334,7 @@ Remove your node_modules directory and package lock file and re-install.`,
334
334
 
335
335
  program.action(async (projectName: string, options: CliOptions) => {
336
336
  if (options.listAddOns) {
337
+ console.log(options.framework || defaultFramework || 'react-cra')
337
338
  const addOns = await getAllAddOns(
338
339
  getFrameworkById(options.framework || defaultFramework || 'react-cra')!,
339
340
  defaultMode ||
@@ -355,8 +356,8 @@ Remove your node_modules directory and package lock file and re-install.`,
355
356
  ...options,
356
357
  } as CliOptions
357
358
 
358
- cliOptions.framework = getFrameworkByName(
359
- options.framework || defaultFramework || 'React',
359
+ cliOptions.framework = getFrameworkById(
360
+ options.framework || defaultFramework || 'react-cra',
360
361
  )!.id
361
362
 
362
363
  if (defaultMode) {