@tsed/cli 7.3.4 → 7.5.0-rc.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/lib/esm/commands/build/BuildCmd.js +21 -0
- package/lib/esm/commands/dev/DevCmd.js +118 -0
- package/lib/esm/commands/index.js +3 -1
- package/lib/esm/commands/init/InitCmd.js +30 -8
- package/lib/esm/commands/init/config/FeaturesPrompt.js +11 -7
- package/lib/esm/commands/init/config/InitSchema.js +4 -0
- package/lib/esm/commands/init/prompts/getFeaturesPrompt.js +6 -2
- package/lib/esm/commands/init/utils/hasFeature.js +5 -2
- package/lib/esm/commands/mcp/schema/ProjectPreferencesSchema.js +2 -2
- package/lib/esm/commands/run/RunCmd.js +0 -1
- package/lib/esm/runtimes/RuntimesModule.js +2 -1
- package/lib/esm/runtimes/index.js +1 -0
- package/lib/esm/runtimes/supports/ViteRuntime.js +30 -0
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/commands/build/BuildCmd.d.ts +9 -0
- package/lib/types/commands/dev/DevCmd.d.ts +12 -0
- package/lib/types/commands/index.d.ts +3 -1
- package/lib/types/commands/init/InitCmd.d.ts +3 -0
- package/lib/types/commands/mcp/schema/ProjectPreferencesSchema.d.ts +1 -1
- package/lib/types/interfaces/RenderDataContext.d.ts +1 -0
- package/lib/types/interfaces/RuntimeTypes.d.ts +1 -1
- package/lib/types/runtimes/index.d.ts +1 -0
- package/lib/types/runtimes/supports/ViteRuntime.d.ts +11 -0
- package/package.json +10 -7
- package/templates/vite.config.ts +21 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type CommandProvider } from "@tsed/cli-core";
|
|
2
|
+
import { CliRunScript } from "../../services/CliRunScript.js";
|
|
3
|
+
export interface BuildCmdContext {
|
|
4
|
+
rawArgs: string[];
|
|
5
|
+
}
|
|
6
|
+
export declare class BuildCmd implements CommandProvider {
|
|
7
|
+
protected runScript: CliRunScript;
|
|
8
|
+
$exec(ctx: BuildCmdContext): Promise<void>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type CommandProvider } from "@tsed/cli-core";
|
|
2
|
+
export interface DevCmdContext {
|
|
3
|
+
rawArgs: string[];
|
|
4
|
+
}
|
|
5
|
+
export declare class DevCmd implements CommandProvider {
|
|
6
|
+
$exec(ctx: DevCmdContext): Promise<void>;
|
|
7
|
+
protected parseWatchValue(args: string[]): boolean;
|
|
8
|
+
protected createViteDevServer(): Promise<import("vite").ViteDevServer>;
|
|
9
|
+
protected runViteApp(): Promise<void>;
|
|
10
|
+
protected runViteController(rawArgs: string[]): Promise<void>;
|
|
11
|
+
protected runViteDev(rawArgs: string[]): Promise<void>;
|
|
12
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { AddCmd } from "./add/AddCmd.js";
|
|
2
|
+
import { BuildCmd } from "./build/BuildCmd.js";
|
|
3
|
+
import { DevCmd } from "./dev/DevCmd.js";
|
|
2
4
|
import { GenerateCmd } from "./generate/GenerateCmd.js";
|
|
3
5
|
import { InitCmd } from "./init/InitCmd.js";
|
|
4
6
|
import { RunCmd } from "./run/RunCmd.js";
|
|
5
7
|
import { CreateTemplateCommand } from "./template/CreateTemplateCommand.js";
|
|
6
8
|
import { UpdateCmd } from "./update/UpdateCmd.js";
|
|
7
|
-
declare const _default: (typeof CreateTemplateCommand | typeof AddCmd | typeof GenerateCmd | typeof InitCmd | import("@tsed/di").FactoryTokenProvider<{
|
|
9
|
+
declare const _default: (typeof CreateTemplateCommand | typeof AddCmd | typeof GenerateCmd | typeof BuildCmd | typeof DevCmd | typeof InitCmd | import("@tsed/di").FactoryTokenProvider<{
|
|
8
10
|
$prompt: any;
|
|
9
11
|
$exec: any;
|
|
10
12
|
token: import("@tsed/di").TokenProvider<import("@tsed/cli-core").CommandProvider>;
|
|
@@ -19,6 +19,9 @@ export declare class InitCmd implements CommandProvider {
|
|
|
19
19
|
protected fs: CliFs;
|
|
20
20
|
$prompt(initialOptions: Partial<InitOptions>): Promise<PromptQuestion[]>;
|
|
21
21
|
$mapContext(ctx: any): InitOptions;
|
|
22
|
+
protected isLaunchedWithBunx(): boolean;
|
|
23
|
+
protected filterOnlyBun(values: string[]): string[];
|
|
24
|
+
protected writeRcFiles(ctx: InitOptions): Promise<void>;
|
|
22
25
|
preExec(ctx: InitOptions): Promise<void>;
|
|
23
26
|
$exec(ctx: InitOptions): Promise<Task[]>;
|
|
24
27
|
$afterPostInstall(): Task<any>[];
|
|
@@ -4,6 +4,6 @@ import { ProjectConvention } from "../../../interfaces/ProjectConvention.js";
|
|
|
4
4
|
export declare const ProjectPreferenceSchema: import("@tsed/schema").JsonSchema<import("@tsed/schema").PropsToShape<{
|
|
5
5
|
convention: import("@tsed/schema").JsonSchema<ProjectConvention>;
|
|
6
6
|
packageManager: import("@tsed/schema").JsonSchema<PackageManager>;
|
|
7
|
-
runtime: import("@tsed/schema").JsonSchema<"node" | "babel" | "webpack" | "bun" | "swc">;
|
|
7
|
+
runtime: import("@tsed/schema").JsonSchema<"vite" | "node" | "babel" | "webpack" | "bun" | "swc">;
|
|
8
8
|
platform: import("@tsed/schema").JsonSchema<PlatformType>;
|
|
9
9
|
}> | undefined>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseRuntime } from "./BaseRuntime.js";
|
|
2
|
+
export declare class ViteRuntime extends BaseRuntime {
|
|
3
|
+
readonly name = "vite";
|
|
4
|
+
readonly cmd = "node";
|
|
5
|
+
readonly order: number;
|
|
6
|
+
files(): string[];
|
|
7
|
+
compile(): string;
|
|
8
|
+
startDev(): string;
|
|
9
|
+
startProd(args: string): string;
|
|
10
|
+
devDependencies(): Record<string, any>;
|
|
11
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli",
|
|
3
3
|
"description": "CLI to bootstrap your Ts.ED project",
|
|
4
|
-
"version": "7.
|
|
4
|
+
"version": "7.5.0-rc.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/esm/index.js",
|
|
7
7
|
"source": "./src/index.ts",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"@swc-node/register": "^1.11.1",
|
|
51
51
|
"@swc/core": "^1.15.7",
|
|
52
52
|
"@swc/helpers": "^0.5.17",
|
|
53
|
-
"@tsed/cli-core": "7.
|
|
54
|
-
"@tsed/cli-mcp": "7.
|
|
55
|
-
"@tsed/cli-prompts": "7.
|
|
56
|
-
"@tsed/cli-tasks": "7.
|
|
53
|
+
"@tsed/cli-core": "7.5.0-rc.1",
|
|
54
|
+
"@tsed/cli-mcp": "7.5.0-rc.1",
|
|
55
|
+
"@tsed/cli-prompts": "7.5.0-rc.1",
|
|
56
|
+
"@tsed/cli-tasks": "7.5.0-rc.1",
|
|
57
57
|
"@tsed/core": ">=8.21.0",
|
|
58
58
|
"@tsed/di": ">=8.21.0",
|
|
59
59
|
"@tsed/hooks": ">=8.21.0",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"zod": "3.25.76"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
|
-
"@tsed/typescript": "7.
|
|
80
|
+
"@tsed/typescript": "7.5.0-rc.1",
|
|
81
81
|
"@types/change-case": "^2.3.1",
|
|
82
82
|
"@types/consolidate": "0.14.4",
|
|
83
83
|
"cross-env": "7.0.3",
|
|
@@ -122,5 +122,8 @@
|
|
|
122
122
|
},
|
|
123
123
|
"homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli",
|
|
124
124
|
"author": "Romain Lenzotti",
|
|
125
|
-
"license": "MIT"
|
|
125
|
+
"license": "MIT",
|
|
126
|
+
"publishConfig": {
|
|
127
|
+
"tag": "rc"
|
|
128
|
+
}
|
|
126
129
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {builtinModules} from "node:module";
|
|
2
|
+
|
|
3
|
+
import {defineConfig} from "vite";
|
|
4
|
+
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
appType: "custom",
|
|
7
|
+
build: {
|
|
8
|
+
outDir: "dist",
|
|
9
|
+
target: "node24",
|
|
10
|
+
ssr: "src/index.ts",
|
|
11
|
+
sourcemap: true,
|
|
12
|
+
minify: false,
|
|
13
|
+
rollupOptions: {
|
|
14
|
+
external: [...builtinModules, ...builtinModules.map((module) => `node:${module}`)],
|
|
15
|
+
output: {
|
|
16
|
+
entryFileNames: "index.js",
|
|
17
|
+
format: "es"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
});
|