@tanstack/cli 0.0.7 → 0.48.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/bin.js +7 -0
- package/dist/cli.js +481 -0
- package/dist/command-line.js +174 -0
- package/dist/dev-watch.js +290 -0
- package/dist/file-syncer.js +148 -0
- package/dist/index.js +1 -0
- package/dist/mcp/api.js +31 -0
- package/dist/mcp/tools.js +250 -0
- package/dist/mcp/types.js +37 -0
- package/dist/mcp.js +121 -0
- package/dist/options.js +162 -0
- package/dist/types/bin.d.ts +2 -0
- package/dist/types/cli.d.ts +16 -0
- package/dist/types/command-line.d.ts +10 -0
- package/dist/types/dev-watch.d.ts +27 -0
- package/dist/types/file-syncer.d.ts +18 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/mcp/api.d.ts +4 -0
- package/dist/types/mcp/tools.d.ts +2 -0
- package/dist/types/mcp/types.d.ts +217 -0
- package/dist/types/mcp.d.ts +6 -0
- package/dist/types/options.d.ts +8 -0
- package/dist/types/types.d.ts +25 -0
- package/dist/types/ui-environment.d.ts +2 -0
- package/dist/types/ui-prompts.d.ts +12 -0
- package/dist/types/utils.d.ts +8 -0
- package/dist/types.js +1 -0
- package/dist/ui-environment.js +52 -0
- package/dist/ui-prompts.js +244 -0
- package/dist/utils.js +30 -0
- package/package.json +46 -46
- package/src/bin.ts +6 -93
- package/src/cli.ts +692 -0
- package/src/command-line.ts +236 -0
- package/src/dev-watch.ts +430 -0
- package/src/file-syncer.ts +205 -0
- package/src/index.ts +1 -85
- package/src/mcp.ts +190 -0
- package/src/options.ts +260 -0
- package/src/types.ts +27 -0
- package/src/ui-environment.ts +74 -0
- package/src/ui-prompts.ts +322 -0
- package/src/utils.ts +38 -0
- package/tests/command-line.test.ts +304 -0
- package/tests/index.test.ts +9 -0
- package/tests/mcp.test.ts +225 -0
- package/tests/options.test.ts +304 -0
- package/tests/setupVitest.ts +6 -0
- package/tests/ui-environment.test.ts +97 -0
- package/tests/ui-prompts.test.ts +238 -0
- package/tsconfig.json +17 -0
- package/vitest.config.js +7 -0
- package/dist/bin.cjs +0 -761
- package/dist/bin.d.cts +0 -1
- package/dist/bin.d.mts +0 -1
- package/dist/bin.mjs +0 -760
- package/dist/index.cjs +0 -36
- package/dist/index.d.cts +0 -1172
- package/dist/index.d.mts +0 -1172
- package/dist/index.mjs +0 -3
- package/dist/template-CkAkdP8n.mjs +0 -2545
- package/dist/template-Cup47s9h.cjs +0 -2783
- package/src/api/fetch.test.ts +0 -114
- package/src/api/fetch.ts +0 -249
- package/src/cache/index.ts +0 -89
- package/src/commands/create.ts +0 -463
- package/src/commands/mcp.test.ts +0 -152
- package/src/commands/mcp.ts +0 -203
- package/src/engine/compile-with-addons.test.ts +0 -302
- package/src/engine/compile.test.ts +0 -404
- package/src/engine/compile.ts +0 -551
- package/src/engine/config-file.test.ts +0 -118
- package/src/engine/config-file.ts +0 -61
- package/src/engine/custom-addons/integration.ts +0 -323
- package/src/engine/custom-addons/shared.test.ts +0 -98
- package/src/engine/custom-addons/shared.ts +0 -281
- package/src/engine/custom-addons/template.test.ts +0 -288
- package/src/engine/custom-addons/template.ts +0 -124
- package/src/engine/template.test.ts +0 -256
- package/src/engine/template.ts +0 -269
- package/src/engine/types.ts +0 -336
- package/src/parse-gitignore.d.ts +0 -5
- package/src/templates/base.ts +0 -891
package/package.json
CHANGED
|
@@ -1,66 +1,66 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "TanStack CLI
|
|
5
|
-
"
|
|
6
|
-
"
|
|
3
|
+
"version": "0.48.2",
|
|
4
|
+
"description": "TanStack CLI",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/types/index.d.ts",
|
|
8
|
+
"bin": {
|
|
9
|
+
"tanstack": "./dist/bin.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"dev": "tsc --watch",
|
|
14
|
+
"test:lint": "eslint ./src",
|
|
15
|
+
"test": "vitest run",
|
|
16
|
+
"test:watch": "vitest",
|
|
17
|
+
"test:coverage": "vitest run --coverage"
|
|
18
|
+
},
|
|
7
19
|
"repository": {
|
|
8
20
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/TanStack/
|
|
21
|
+
"url": "git+https://github.com/TanStack/create-tsrouter-app.git",
|
|
10
22
|
"directory": "packages/cli"
|
|
11
23
|
},
|
|
12
|
-
"homepage": "https://tanstack.com/
|
|
24
|
+
"homepage": "https://tanstack.com/router",
|
|
25
|
+
"funding": {
|
|
26
|
+
"type": "github",
|
|
27
|
+
"url": "https://github.com/sponsors/tannerlinsley"
|
|
28
|
+
},
|
|
13
29
|
"keywords": [
|
|
30
|
+
"react",
|
|
14
31
|
"tanstack",
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"mcp",
|
|
18
|
-
"create",
|
|
19
|
-
"start"
|
|
32
|
+
"router",
|
|
33
|
+
"create-react-app"
|
|
20
34
|
],
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
|
|
24
|
-
"import": {
|
|
25
|
-
"types": "./dist/index.d.mts",
|
|
26
|
-
"default": "./dist/index.mjs"
|
|
27
|
-
},
|
|
28
|
-
"require": {
|
|
29
|
-
"types": "./dist/index.d.cts",
|
|
30
|
-
"default": "./dist/index.cjs"
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"main": "./dist/index.cjs",
|
|
35
|
-
"module": "./dist/index.mjs",
|
|
36
|
-
"types": "./dist/index.d.mts",
|
|
37
|
-
"bin": {
|
|
38
|
-
"tanstack": "./dist/bin.mjs"
|
|
39
|
-
},
|
|
40
|
-
"files": [
|
|
41
|
-
"dist",
|
|
42
|
-
"src"
|
|
43
|
-
],
|
|
44
|
-
"scripts": {
|
|
45
|
-
"build": "tsdown --clean",
|
|
46
|
-
"test:types": "tsc --noEmit",
|
|
47
|
-
"test:eslint": "eslint ./src",
|
|
48
|
-
"test:lib": "vitest run --passWithNoTests"
|
|
49
|
-
},
|
|
35
|
+
"author": "Jack Herrington <jherr@pobox.com>",
|
|
36
|
+
"license": "MIT",
|
|
37
|
+
"packageManager": "pnpm@9.15.5",
|
|
50
38
|
"dependencies": {
|
|
51
39
|
"@clack/prompts": "^0.10.0",
|
|
52
40
|
"@modelcontextprotocol/sdk": "^1.6.0",
|
|
41
|
+
"@tanstack/create": "workspace:*",
|
|
42
|
+
"@tanstack/create-ui": "workspace:*",
|
|
53
43
|
"chalk": "^5.4.1",
|
|
44
|
+
"chokidar": "^3.6.0",
|
|
54
45
|
"commander": "^13.1.0",
|
|
55
|
-
"
|
|
46
|
+
"diff": "^7.0.0",
|
|
56
47
|
"express": "^4.21.2",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
48
|
+
"semver": "^7.7.2",
|
|
49
|
+
"tempy": "^3.1.0",
|
|
50
|
+
"validate-npm-package-name": "^7.0.0",
|
|
51
|
+
"zod": "^3.24.2"
|
|
60
52
|
},
|
|
61
53
|
"devDependencies": {
|
|
62
|
-
"@
|
|
54
|
+
"@tanstack/config": "^0.16.2",
|
|
55
|
+
"@types/diff": "^5.2.0",
|
|
63
56
|
"@types/express": "^5.0.1",
|
|
64
|
-
"@types/node": "^
|
|
57
|
+
"@types/node": "^22.13.4",
|
|
58
|
+
"@types/semver": "^7.7.0",
|
|
59
|
+
"@types/validate-npm-package-name": "^4.0.2",
|
|
60
|
+
"@vitest/coverage-v8": "3.1.1",
|
|
61
|
+
"eslint": "^9.20.0",
|
|
62
|
+
"typescript": "^5.6.3",
|
|
63
|
+
"vitest": "^3.1.1",
|
|
64
|
+
"vitest-fetch-mock": "^0.4.5"
|
|
65
65
|
}
|
|
66
66
|
}
|
package/src/bin.ts
CHANGED
|
@@ -1,95 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
import { cli } from './cli.js'
|
|
2
3
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { compileTemplate, initTemplate } from './engine/custom-addons/template.js'
|
|
9
|
-
|
|
10
|
-
const program = new Command()
|
|
11
|
-
|
|
12
|
-
program
|
|
13
|
-
.name('tanstack')
|
|
14
|
-
.description('TanStack CLI for scaffolding and tooling')
|
|
15
|
-
.version('0.0.1')
|
|
16
|
-
|
|
17
|
-
program
|
|
18
|
-
.command('create')
|
|
19
|
-
.argument('[project-name]', 'name of the project')
|
|
20
|
-
.option('--template <template>', 'URL to a custom template JSON file')
|
|
21
|
-
.option('--package-manager <pm>', 'package manager (npm, pnpm, yarn, bun)')
|
|
22
|
-
.option('--integrations <integrations>', 'comma-separated list of integration IDs')
|
|
23
|
-
.option('--no-install', 'skip installing dependencies')
|
|
24
|
-
.option('--no-git', 'skip initializing git repository')
|
|
25
|
-
.option('--no-tailwind', 'skip tailwind CSS')
|
|
26
|
-
.option('-y, --yes', 'skip prompts and use defaults')
|
|
27
|
-
.option('--target-dir <path>', 'target directory for the project')
|
|
28
|
-
.option('--integrations-path <path>', 'local path to integrations directory (for development)')
|
|
29
|
-
.description('Create a new TanStack Start project')
|
|
30
|
-
.action(runCreate)
|
|
31
|
-
|
|
32
|
-
program
|
|
33
|
-
.command('mcp')
|
|
34
|
-
.option('--sse', 'run in SSE mode (for HTTP transport)')
|
|
35
|
-
.option('--port <port>', 'port for SSE server', '8080')
|
|
36
|
-
.description('Start the MCP server for AI agents')
|
|
37
|
-
.action(runMcp)
|
|
38
|
-
|
|
39
|
-
// Integration commands
|
|
40
|
-
const integrationCommand = program.command('integration')
|
|
41
|
-
|
|
42
|
-
integrationCommand
|
|
43
|
-
.command('init')
|
|
44
|
-
.option('--integrations-path <path>', 'local path to integrations directory (for development)')
|
|
45
|
-
.description('Initialize an integration from the current project')
|
|
46
|
-
.action(async (options: { integrationsPath?: string }) => {
|
|
47
|
-
try {
|
|
48
|
-
await initIntegration(resolve(process.cwd()), options.integrationsPath)
|
|
49
|
-
} catch (error) {
|
|
50
|
-
console.error(error instanceof Error ? error.message : 'An error occurred')
|
|
51
|
-
process.exit(1)
|
|
52
|
-
}
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
integrationCommand
|
|
56
|
-
.command('compile')
|
|
57
|
-
.option('--integrations-path <path>', 'local path to integrations directory (for development)')
|
|
58
|
-
.description('Compile/update the integration from the current project')
|
|
59
|
-
.action(async (options: { integrationsPath?: string }) => {
|
|
60
|
-
try {
|
|
61
|
-
await compileIntegration(resolve(process.cwd()), options.integrationsPath)
|
|
62
|
-
} catch (error) {
|
|
63
|
-
console.error(error instanceof Error ? error.message : 'An error occurred')
|
|
64
|
-
process.exit(1)
|
|
65
|
-
}
|
|
66
|
-
})
|
|
67
|
-
|
|
68
|
-
// Custom template commands
|
|
69
|
-
const templateCommand = program.command('template')
|
|
70
|
-
|
|
71
|
-
templateCommand
|
|
72
|
-
.command('init')
|
|
73
|
-
.description('Initialize a custom template from the current project')
|
|
74
|
-
.action(async () => {
|
|
75
|
-
try {
|
|
76
|
-
await initTemplate(resolve(process.cwd()))
|
|
77
|
-
} catch (error) {
|
|
78
|
-
console.error(error instanceof Error ? error.message : 'An error occurred')
|
|
79
|
-
process.exit(1)
|
|
80
|
-
}
|
|
81
|
-
})
|
|
82
|
-
|
|
83
|
-
templateCommand
|
|
84
|
-
.command('compile')
|
|
85
|
-
.description('Compile/update the custom template from the current project')
|
|
86
|
-
.action(async () => {
|
|
87
|
-
try {
|
|
88
|
-
await compileTemplate(resolve(process.cwd()))
|
|
89
|
-
} catch (error) {
|
|
90
|
-
console.error(error instanceof Error ? error.message : 'An error occurred')
|
|
91
|
-
process.exit(1)
|
|
92
|
-
}
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
program.parse()
|
|
4
|
+
cli({
|
|
5
|
+
name: 'tanstack',
|
|
6
|
+
appName: 'TanStack',
|
|
7
|
+
craCompatible: true,
|
|
8
|
+
})
|