@fluojs/cli 2.0.1 → 3.0.0
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/README.ko.md +169 -21
- package/README.md +172 -21
- package/dist/cli.d.ts +5 -4
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +127 -35
- package/dist/commands/diagnostics.d.ts +35 -0
- package/dist/commands/diagnostics.d.ts.map +1 -1
- package/dist/commands/diagnostics.js +60 -0
- package/dist/commands/inspect.d.ts +5 -1
- package/dist/commands/inspect.d.ts.map +1 -1
- package/dist/commands/inspect.js +84 -17
- package/dist/commands/migrate.d.ts.map +1 -1
- package/dist/commands/migrate.js +27 -15
- package/dist/commands/migration-transform-tokens.d.ts +15 -0
- package/dist/commands/migration-transform-tokens.d.ts.map +1 -0
- package/dist/commands/migration-transform-tokens.js +41 -0
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +29 -9
- package/dist/commands/output-path-safety.d.ts +14 -0
- package/dist/commands/output-path-safety.d.ts.map +1 -0
- package/dist/commands/output-path-safety.js +34 -0
- package/dist/commands/scripts.js +2 -2
- package/dist/commands/typegen-artifact.d.ts +54 -0
- package/dist/commands/typegen-artifact.d.ts.map +1 -0
- package/dist/commands/typegen-artifact.js +117 -0
- package/dist/commands/typegen-generation-child.d.ts +2 -0
- package/dist/commands/typegen-generation-child.d.ts.map +1 -0
- package/dist/commands/typegen-generation-child.js +59 -0
- package/dist/commands/typegen-generation-process.d.ts +46 -0
- package/dist/commands/typegen-generation-process.d.ts.map +1 -0
- package/dist/commands/typegen-generation-process.js +131 -0
- package/dist/commands/typegen-generation-protocol.d.ts +16 -0
- package/dist/commands/typegen-generation-protocol.d.ts.map +1 -0
- package/dist/commands/typegen-generation-protocol.js +35 -0
- package/dist/commands/typegen-isolated-source.d.ts +10 -0
- package/dist/commands/typegen-isolated-source.d.ts.map +1 -0
- package/dist/commands/typegen-isolated-source.js +75 -0
- package/dist/commands/typegen-options.d.ts +20 -0
- package/dist/commands/typegen-options.d.ts.map +1 -0
- package/dist/commands/typegen-options.js +71 -0
- package/dist/commands/typegen-source.d.ts +59 -0
- package/dist/commands/typegen-source.d.ts.map +1 -0
- package/dist/commands/typegen-source.js +183 -0
- package/dist/commands/typegen-watch.d.ts +46 -0
- package/dist/commands/typegen-watch.d.ts.map +1 -0
- package/dist/commands/typegen-watch.js +212 -0
- package/dist/commands/typegen.d.ts +29 -0
- package/dist/commands/typegen.d.ts.map +1 -0
- package/dist/commands/typegen.js +119 -0
- package/dist/dev-runner/node-restart-runner.d.ts.map +1 -1
- package/dist/dev-runner/node-restart-runner.js +54 -7
- package/dist/fixtures/inspect-react-app.module.d.ts +4 -0
- package/dist/fixtures/inspect-react-app.module.d.ts.map +1 -0
- package/dist/fixtures/inspect-react-app.module.js +32 -0
- package/dist/fixtures/typegen-react-app.module.d.ts +4 -0
- package/dist/fixtures/typegen-react-app.module.d.ts.map +1 -0
- package/dist/fixtures/typegen-react-app.module.js +33 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/new/install.js +1 -1
- package/dist/new/package-spec-resolver.d.ts.map +1 -1
- package/dist/new/package-spec-resolver.js +50 -59
- package/dist/new/prompt.d.ts +1 -0
- package/dist/new/prompt.d.ts.map +1 -1
- package/dist/new/prompt.js +40 -12
- package/dist/new/published-internal-dependencies.d.ts +20 -0
- package/dist/new/published-internal-dependencies.d.ts.map +1 -0
- package/dist/new/published-internal-dependencies.js +20 -0
- package/dist/new/react-vite-ssr-scaffold.d.ts +19 -0
- package/dist/new/react-vite-ssr-scaffold.d.ts.map +1 -0
- package/dist/new/react-vite-ssr-scaffold.js +108 -0
- package/dist/new/resolver.d.ts +2 -2
- package/dist/new/resolver.d.ts.map +1 -1
- package/dist/new/resolver.js +5 -1
- package/dist/new/scaffold.d.ts.map +1 -1
- package/dist/new/scaffold.js +62 -31
- package/dist/new/starter-profiles.d.ts +8 -4
- package/dist/new/starter-profiles.d.ts.map +1 -1
- package/dist/new/starter-profiles.js +52 -18
- package/dist/new/templates/react-vite-ssr/README.md.ejs +74 -0
- package/dist/new/templates/react-vite-ssr/playwright.config.ts.ejs +26 -0
- package/dist/new/templates/react-vite-ssr/src/app.test.ts.ejs +82 -0
- package/dist/new/templates/react-vite-ssr/src/app.ts.ejs +91 -0
- package/dist/new/templates/react-vite-ssr/src/entry-client.tsx.ejs +29 -0
- package/dist/new/templates/react-vite-ssr/src/entry-server.tsx.ejs +52 -0
- package/dist/new/templates/react-vite-ssr/src/load-manifest.test.ts.ejs +55 -0
- package/dist/new/templates/react-vite-ssr/src/load-manifest.ts.ejs +53 -0
- package/dist/new/templates/react-vite-ssr/src/main.ts.ejs +18 -0
- package/dist/new/templates/react-vite-ssr/src/page.tsx.ejs +43 -0
- package/dist/new/templates/react-vite-ssr/src/react-app.test.tsx.ejs +67 -0
- package/dist/new/templates/react-vite-ssr/src/react-app.tsx.ejs +46 -0
- package/dist/new/templates/react-vite-ssr/src/styles.css.ejs +25 -0
- package/dist/new/templates/react-vite-ssr/src/styles.d.ts.ejs +1 -0
- package/dist/new/templates/react-vite-ssr/tests/production-hydration.spec.ts.ejs +54 -0
- package/dist/new/templates/react-vite-ssr/tsconfig.json.ejs +16 -0
- package/dist/new/templates/react-vite-ssr/vite.client.config.ts.ejs +24 -0
- package/dist/new/templates/react-vite-ssr/vite.server.config.ts.ejs +17 -0
- package/dist/new/templates/react-vite-ssr/vitest.config.ts.ejs +10 -0
- package/dist/new/types.d.ts +4 -0
- package/dist/new/types.d.ts.map +1 -1
- package/dist/public-typegen.d.ts +14 -0
- package/dist/public-typegen.d.ts.map +1 -0
- package/dist/public-typegen.js +17 -0
- package/dist/run-cli.d.ts +2 -1
- package/dist/run-cli.d.ts.map +1 -1
- package/dist/studio/sidecar.d.ts.map +1 -1
- package/dist/studio/sidecar.js +35 -9
- package/dist/transforms/nestjs-migrate.d.ts +4 -1
- package/dist/transforms/nestjs-migrate.d.ts.map +1 -1
- package/dist/transforms/nestjs-migrate.js +625 -65
- package/dist/typegen-contract.d.ts +10 -0
- package/dist/typegen-contract.d.ts.map +1 -0
- package/dist/typegen-contract.js +9 -0
- package/dist/usage.d.ts +6 -0
- package/dist/usage.d.ts.map +1 -1
- package/dist/usage.js +47 -0
- package/package.json +19 -10
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Stable process exit codes returned by `fluo typegen`. */
|
|
2
|
+
export declare const TYPEGEN_EXIT_CODES: {
|
|
3
|
+
readonly ERROR: 1;
|
|
4
|
+
readonly MALFORMED: 4;
|
|
5
|
+
readonly MISSING: 2;
|
|
6
|
+
readonly STALE: 3;
|
|
7
|
+
readonly SUCCESS: 0;
|
|
8
|
+
readonly UNSUPPORTED_VERSION: 5;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=typegen-contract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"typegen-contract.d.ts","sourceRoot":"","sources":["../src/typegen-contract.ts"],"names":[],"mappings":"AAAA,4DAA4D;AAC5D,eAAO,MAAM,kBAAkB;;;;;;;CAOrB,CAAC"}
|
package/dist/usage.d.ts
CHANGED
|
@@ -10,4 +10,10 @@ export declare function newUsage(): string;
|
|
|
10
10
|
* @returns Formatted help text including usage and options.
|
|
11
11
|
*/
|
|
12
12
|
export declare function inspectUsage(): string;
|
|
13
|
+
/**
|
|
14
|
+
* Returns the usage information string for React page type generation.
|
|
15
|
+
*
|
|
16
|
+
* @returns Formatted help text including required output and optional export arguments.
|
|
17
|
+
*/
|
|
18
|
+
export declare function typegenUsage(): string;
|
|
13
19
|
//# sourceMappingURL=usage.d.ts.map
|
package/dist/usage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/usage.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../src/usage.ts"],"names":[],"mappings":"AAuKA;;;;GAIG;AACH,wBAAgB,QAAQ,IAAI,MAAM,CA0BjC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAarC;AAED;;;;GAIG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAarC"}
|
package/dist/usage.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { renderAliasList, renderHelpTable } from './help.js';
|
|
2
2
|
const NEW_OPTION_HELP = [{
|
|
3
|
+
aliases: [],
|
|
4
|
+
description: 'Select a named starter (standard backend or the React SSR + Vite application).',
|
|
5
|
+
option: '--starter <standard|react-vite-ssr>'
|
|
6
|
+
}, {
|
|
3
7
|
aliases: [],
|
|
4
8
|
description: 'Provide the project name without using the positional argument.',
|
|
5
9
|
option: '--name <project-name>'
|
|
@@ -68,6 +72,10 @@ const INSPECT_OPTION_HELP = [{
|
|
|
68
72
|
aliases: [],
|
|
69
73
|
description: 'Emit the runtime platform snapshot/diagnostics payload as JSON (default when no output mode is selected).',
|
|
70
74
|
option: '--json'
|
|
75
|
+
}, {
|
|
76
|
+
aliases: [],
|
|
77
|
+
description: 'Select JSON output explicitly; equivalent to --json.',
|
|
78
|
+
option: '--format <json>'
|
|
71
79
|
}, {
|
|
72
80
|
aliases: [],
|
|
73
81
|
description: 'Emit a Mermaid graph through the optional @fluojs/studio rendering contract.',
|
|
@@ -93,6 +101,27 @@ const INSPECT_OPTION_HELP = [{
|
|
|
93
101
|
description: 'Show help for the inspect command.',
|
|
94
102
|
option: '--help'
|
|
95
103
|
}];
|
|
104
|
+
const TYPEGEN_OPTION_HELP = [{
|
|
105
|
+
aliases: [],
|
|
106
|
+
description: 'Check that the target exactly matches the compiled React page catalog without writing it.',
|
|
107
|
+
option: '--check'
|
|
108
|
+
}, {
|
|
109
|
+
aliases: [],
|
|
110
|
+
description: 'Write the generated React page route types to this file.',
|
|
111
|
+
option: '--output <path>'
|
|
112
|
+
}, {
|
|
113
|
+
aliases: [],
|
|
114
|
+
description: 'Select the exported module symbol name (default: AppModule).',
|
|
115
|
+
option: '--export <name>'
|
|
116
|
+
}, {
|
|
117
|
+
aliases: [],
|
|
118
|
+
description: 'Regenerate after coalesced changes under the application module directory.',
|
|
119
|
+
option: '--watch'
|
|
120
|
+
}, {
|
|
121
|
+
aliases: ['-h'],
|
|
122
|
+
description: 'Show help for the typegen command.',
|
|
123
|
+
option: '--help'
|
|
124
|
+
}];
|
|
96
125
|
|
|
97
126
|
/**
|
|
98
127
|
* Renders CLI help text for `fluo new` without importing the scaffold implementation.
|
|
@@ -128,4 +157,22 @@ export function inspectUsage() {
|
|
|
128
157
|
header: 'Description',
|
|
129
158
|
render: entry => entry.description
|
|
130
159
|
}]), '', 'Docs: https://github.com/fluojs/fluo/tree/main/docs/getting-started/quick-start.md'].join('\n');
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Returns the usage information string for React page type generation.
|
|
164
|
+
*
|
|
165
|
+
* @returns Formatted help text including required output and optional export arguments.
|
|
166
|
+
*/
|
|
167
|
+
export function typegenUsage() {
|
|
168
|
+
return ['Usage: fluo typegen <module-path> --output <path> [options]', '', 'Options', renderHelpTable(TYPEGEN_OPTION_HELP, [{
|
|
169
|
+
header: 'Option',
|
|
170
|
+
render: entry => entry.option
|
|
171
|
+
}, {
|
|
172
|
+
header: 'Aliases',
|
|
173
|
+
render: entry => renderAliasList(entry.aliases)
|
|
174
|
+
}, {
|
|
175
|
+
header: 'Description',
|
|
176
|
+
render: entry => entry.description
|
|
177
|
+
}]), '', 'Docs: https://github.com/fluojs/fluo/tree/main/packages/react#path-only-page-type-generation'].join('\n');
|
|
131
178
|
}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"migration",
|
|
10
10
|
"diagnostics"
|
|
11
11
|
],
|
|
12
|
-
"version": "
|
|
12
|
+
"version": "3.0.0",
|
|
13
13
|
"private": false,
|
|
14
14
|
"license": "MIT",
|
|
15
15
|
"repository": {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"directory": "packages/cli"
|
|
19
19
|
},
|
|
20
20
|
"engines": {
|
|
21
|
-
"node": ">=
|
|
21
|
+
"node": ">=24.0.0 <27"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
@@ -40,27 +40,36 @@
|
|
|
40
40
|
"bin"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@clack/prompts": "^1.2.0",
|
|
44
43
|
"ejs": "^3.1.10",
|
|
45
|
-
"tsx": "^4.
|
|
46
|
-
"typescript": "^6.0.2"
|
|
47
|
-
"@fluojs/runtime": "^2.0.1"
|
|
44
|
+
"tsx": "^4.23.1",
|
|
45
|
+
"typescript": "^6.0.2"
|
|
48
46
|
},
|
|
49
47
|
"peerDependencies": {
|
|
50
|
-
"@
|
|
48
|
+
"@clack/prompts": "^1.3.0",
|
|
49
|
+
"@fluojs/runtime": "^3.0.0",
|
|
50
|
+
"@fluojs/studio": "^2.0.0"
|
|
51
51
|
},
|
|
52
52
|
"peerDependenciesMeta": {
|
|
53
|
+
"@clack/prompts": {
|
|
54
|
+
"optional": true
|
|
55
|
+
},
|
|
56
|
+
"@fluojs/runtime": {
|
|
57
|
+
"optional": true
|
|
58
|
+
},
|
|
53
59
|
"@fluojs/studio": {
|
|
54
60
|
"optional": true
|
|
55
61
|
}
|
|
56
62
|
},
|
|
57
63
|
"devDependencies": {
|
|
64
|
+
"@clack/prompts": "^1.7.0",
|
|
58
65
|
"@types/ejs": "^3.1.5",
|
|
59
|
-
"vitest": "^
|
|
66
|
+
"vitest": "^4.1.11",
|
|
67
|
+
"@fluojs/react": "^0.2.0",
|
|
68
|
+
"@fluojs/runtime": "^3.0.0"
|
|
60
69
|
},
|
|
61
70
|
"scripts": {
|
|
62
|
-
"prebuild": "node ../../tooling/scripts/clean-dist.mjs",
|
|
63
|
-
"build": "pnpm exec babel src --extensions .ts --ignore 'src/**/*.test.ts' --out-dir dist --config-file ../../tooling/babel/babel.config.cjs && pnpm exec tsc -p tsconfig.build.json && node -e \"require('fs').cpSync('src/generators/templates', 'dist/generators/templates', {recursive: true})\"",
|
|
71
|
+
"prebuild": "node ./scripts/generate-published-internal-dependencies.mjs && node ../../tooling/scripts/clean-dist.mjs",
|
|
72
|
+
"build": "pnpm exec babel src --extensions .ts --ignore 'src/**/*.test.ts' --out-dir dist --config-file ../../tooling/babel/babel.config.cjs && pnpm exec tsc -p tsconfig.build.json && node -e \"const fs=require('fs'); fs.cpSync('src/generators/templates', 'dist/generators/templates', {recursive: true}); fs.cpSync('src/new/templates', 'dist/new/templates', {recursive: true})\"",
|
|
64
73
|
"typecheck": "pnpm exec tsc -p tsconfig.json --noEmit",
|
|
65
74
|
"test": "pnpm exec vitest run -c vitest.config.ts",
|
|
66
75
|
"test:watch": "pnpm exec vitest -c vitest.config.ts",
|