@tanstack/cta-cli 0.16.0 → 0.16.2
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 +3 -3
- package/package.json +3 -3
- package/src/cli.ts +3 -4
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,
|
|
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 || '
|
|
184
|
+
}, defaultFramework || 'react-cra');
|
|
185
185
|
}
|
|
186
186
|
program
|
|
187
187
|
.option('--starter [url]', 'initialize this project from a starter URL', false)
|
|
@@ -236,7 +236,7 @@ Remove your node_modules directory and package lock file and re-install.`);
|
|
|
236
236
|
projectName,
|
|
237
237
|
...options,
|
|
238
238
|
};
|
|
239
|
-
cliOptions.framework =
|
|
239
|
+
cliOptions.framework = getFrameworkById(options.framework || defaultFramework || 'react-cra').id;
|
|
240
240
|
if (defaultMode) {
|
|
241
241
|
cliOptions.template = defaultMode;
|
|
242
242
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/cta-cli",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.2",
|
|
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.
|
|
34
|
-
"@tanstack/cta-ui": "0.16.
|
|
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
|
@@ -14,7 +14,6 @@ import {
|
|
|
14
14
|
createSerializedOptions,
|
|
15
15
|
getAllAddOns,
|
|
16
16
|
getFrameworkById,
|
|
17
|
-
getFrameworkByName,
|
|
18
17
|
getFrameworks,
|
|
19
18
|
initAddOn,
|
|
20
19
|
initStarter,
|
|
@@ -266,7 +265,7 @@ Remove your node_modules directory and package lock file and re-install.`,
|
|
|
266
265
|
}
|
|
267
266
|
return value
|
|
268
267
|
},
|
|
269
|
-
defaultFramework || '
|
|
268
|
+
defaultFramework || 'react-cra',
|
|
270
269
|
)
|
|
271
270
|
}
|
|
272
271
|
|
|
@@ -355,8 +354,8 @@ Remove your node_modules directory and package lock file and re-install.`,
|
|
|
355
354
|
...options,
|
|
356
355
|
} as CliOptions
|
|
357
356
|
|
|
358
|
-
cliOptions.framework =
|
|
359
|
-
options.framework || defaultFramework || '
|
|
357
|
+
cliOptions.framework = getFrameworkById(
|
|
358
|
+
options.framework || defaultFramework || 'react-cra',
|
|
360
359
|
)!.id
|
|
361
360
|
|
|
362
361
|
if (defaultMode) {
|