@tsed/cli 5.4.3 → 6.0.0-alpha.10
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/Cli.js +5 -19
- package/lib/esm/bin/tsed.js +15 -2
- package/lib/esm/commands/add/AddCmd.js +1 -5
- package/lib/esm/commands/generate/GenerateCmd.js +8 -15
- package/lib/esm/commands/generate/ProviderTypes.js +0 -1
- package/lib/esm/commands/index.js +3 -4
- package/lib/esm/commands/init/InitCmd.js +25 -32
- package/lib/esm/commands/init/config/FeaturesPrompt.js +6 -18
- package/lib/esm/commands/init/config/InitFileSchema.js +1 -2
- package/lib/esm/commands/init/interfaces/InitCmdContext.js +0 -1
- package/lib/esm/commands/init/interfaces/InitOptions.js +5 -2
- package/lib/esm/commands/init/interfaces/InitPromptAnswers.js +2 -2
- package/lib/esm/commands/init/mappers/mapToContext.js +0 -1
- package/lib/esm/commands/init/mappers/mapUniqFeatures.js +1 -1
- package/lib/esm/commands/init/prompts/getFeaturesPrompt.js +0 -1
- package/lib/esm/commands/init/utils/hasFeature.js +0 -1
- package/lib/esm/commands/init/utils/isPlatform.js +0 -1
- package/lib/esm/commands/run/RunCmd.js +5 -25
- package/lib/esm/commands/update/UpdateCmd.js +1 -7
- package/lib/esm/constants/index.js +3 -6
- package/lib/esm/index.js +8 -9
- package/lib/esm/interfaces/ArchitectureConvention.js +0 -1
- package/lib/esm/interfaces/PlatformType.js +0 -1
- package/lib/esm/interfaces/ProjectConvention.js +0 -1
- package/lib/esm/interfaces/index.js +2 -3
- package/lib/esm/loaders/alias.hook.js +9 -0
- package/lib/esm/pipes/ClassNamePipe.js +3 -6
- package/lib/esm/pipes/OutputFilePathPipe.js +1 -5
- package/lib/esm/pipes/RoutePipe.js +3 -4
- package/lib/esm/pipes/index.js +0 -1
- package/lib/esm/platforms/InitPlatformsModule.js +1 -3
- package/lib/esm/platforms/supports/InitBasePlatform.js +0 -1
- package/lib/esm/platforms/supports/InitExpressPlatform.js +3 -2
- package/lib/esm/platforms/supports/InitKoaPlatform.js +3 -2
- package/lib/esm/runtimes/RuntimesModule.js +5 -9
- package/lib/esm/runtimes/index.js +0 -2
- package/lib/esm/runtimes/supports/BabelRuntime.js +14 -5
- package/lib/esm/runtimes/supports/BaseRuntime.js +7 -5
- package/lib/esm/runtimes/supports/BunRuntime.js +12 -5
- package/lib/esm/runtimes/supports/NodeRuntime.js +28 -15
- package/lib/esm/runtimes/supports/WebpackRuntime.js +10 -4
- package/lib/esm/services/ProvidersInfoService.js +4 -3
- package/lib/esm/utils/fillImports.js +7 -8
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/Cli.d.ts +3 -4
- package/lib/types/commands/add/AddCmd.d.ts +1 -1
- package/lib/types/commands/generate/GenerateCmd.d.ts +7 -6
- package/lib/types/commands/index.d.ts +6 -6
- package/lib/types/commands/init/InitCmd.d.ts +6 -6
- package/lib/types/commands/init/config/FeaturesPrompt.d.ts +1 -2
- package/lib/types/commands/init/config/InitFileSchema.d.ts +2 -2
- package/lib/types/commands/init/interfaces/InitCmdContext.d.ts +2 -2
- package/lib/types/commands/init/interfaces/InitOptions.d.ts +4 -4
- package/lib/types/commands/init/interfaces/InitPromptAnswers.d.ts +1 -1
- package/lib/types/commands/init/mappers/mapToContext.d.ts +1 -1
- package/lib/types/commands/init/mappers/mapUniqFeatures.d.ts +2 -2
- package/lib/types/commands/init/prompts/getFeaturesPrompt.d.ts +1 -1
- package/lib/types/commands/run/RunCmd.d.ts +1 -2
- package/lib/types/commands/update/UpdateCmd.d.ts +1 -1
- package/lib/types/constants/index.d.ts +1 -1
- package/lib/types/index.d.ts +15 -15
- package/lib/types/interfaces/index.d.ts +3 -3
- package/lib/types/loaders/alias.hook.d.ts +2 -0
- package/lib/types/pipes/ClassNamePipe.d.ts +2 -2
- package/lib/types/pipes/OutputFilePathPipe.d.ts +3 -3
- package/lib/types/pipes/index.d.ts +3 -3
- package/lib/types/platforms/InitPlatformsModule.d.ts +1 -1
- package/lib/types/platforms/supports/InitExpressPlatform.d.ts +1 -1
- package/lib/types/platforms/supports/InitKoaPlatform.d.ts +1 -1
- package/lib/types/runtimes/RuntimesModule.d.ts +1 -1
- package/lib/types/runtimes/index.d.ts +6 -7
- package/lib/types/runtimes/supports/BabelRuntime.d.ts +4 -1
- package/lib/types/runtimes/supports/BaseRuntime.d.ts +1 -0
- package/lib/types/runtimes/supports/BunRuntime.d.ts +2 -1
- package/lib/types/runtimes/supports/NodeRuntime.d.ts +6 -4
- package/lib/types/runtimes/supports/WebpackRuntime.d.ts +3 -1
- package/package.json +52 -49
- package/templates/init/{.barrelsby.json.hbs → .barrels.json.hbs} +3 -3
- package/templates/init/.dockerignore.hbs +1 -0
- package/templates/init/.swcrc.hbs +1 -1
- package/templates/init/README.md.hbs +6 -6
- package/templates/init/docker/bun/Dockerfile.hbs +2 -2
- package/templates/init/docker/npm/Dockerfile.hbs +5 -5
- package/templates/init/docker/pnpm/Dockerfile.hbs +5 -5
- package/templates/init/docker/yarn/Dockerfile.hbs +5 -5
- package/templates/init/docker/yarn_berry/Dockerfile.hbs +5 -5
- package/templates/init/nodemon.json.hbs +9 -0
- package/templates/init/pm2/bun/processes.config.cjs.hbs +23 -0
- package/templates/init/{processes.config.js.hbs → pm2/node-compiled/processes.config.cjs.hbs} +3 -4
- package/templates/init/pm2/node-loader/processes.config.cjs.hbs +24 -0
- package/templates/init/src/bin/index.ts.hbs +2 -2
- package/templates/init/src/config/index.ts.hbs +4 -4
- package/templates/init/src/index.ts.hbs +1 -1
- package/templates/init/tsconfig.base.json.hbs +29 -0
- package/templates/init/tsconfig.json.hbs +11 -35
- package/templates/init/tsconfig.node.json.hbs +20 -0
- package/templates/init/tsconfig.spec.json.hbs +24 -0
- package/lib/cjs/Cli.js +0 -75
- package/lib/cjs/Cli.js.map +0 -1
- package/lib/cjs/bin/tsed.js +0 -9
- package/lib/cjs/bin/tsed.js.map +0 -1
- package/lib/cjs/commands/add/AddCmd.js +0 -68
- package/lib/cjs/commands/add/AddCmd.js.map +0 -1
- package/lib/cjs/commands/generate/GenerateCmd.js +0 -263
- package/lib/cjs/commands/generate/GenerateCmd.js.map +0 -1
- package/lib/cjs/commands/generate/ProviderTypes.js +0 -107
- package/lib/cjs/commands/generate/ProviderTypes.js.map +0 -1
- package/lib/cjs/commands/index.js +0 -9
- package/lib/cjs/commands/index.js.map +0 -1
- package/lib/cjs/commands/init/InitCmd.js +0 -439
- package/lib/cjs/commands/init/InitCmd.js.map +0 -1
- package/lib/cjs/commands/init/config/FeaturesPrompt.js +0 -398
- package/lib/cjs/commands/init/config/FeaturesPrompt.js.map +0 -1
- package/lib/cjs/commands/init/config/InitFileSchema.js +0 -53
- package/lib/cjs/commands/init/config/InitFileSchema.js.map +0 -1
- package/lib/cjs/commands/init/interfaces/InitCmdContext.js +0 -3
- package/lib/cjs/commands/init/interfaces/InitCmdContext.js.map +0 -1
- package/lib/cjs/commands/init/interfaces/InitOptions.js +0 -3
- package/lib/cjs/commands/init/interfaces/InitOptions.js.map +0 -1
- package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js +0 -3
- package/lib/cjs/commands/init/interfaces/InitPromptAnswers.js.map +0 -1
- package/lib/cjs/commands/init/mappers/mapToContext.js +0 -16
- package/lib/cjs/commands/init/mappers/mapToContext.js.map +0 -1
- package/lib/cjs/commands/init/mappers/mapUniqFeatures.js +0 -18
- package/lib/cjs/commands/init/mappers/mapUniqFeatures.js.map +0 -1
- package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js +0 -25
- package/lib/cjs/commands/init/prompts/getFeaturesPrompt.js.map +0 -1
- package/lib/cjs/commands/init/utils/hasFeature.js +0 -13
- package/lib/cjs/commands/init/utils/hasFeature.js.map +0 -1
- package/lib/cjs/commands/init/utils/isPlatform.js +0 -8
- package/lib/cjs/commands/init/utils/isPlatform.js.map +0 -1
- package/lib/cjs/commands/run/RunCmd.js +0 -71
- package/lib/cjs/commands/run/RunCmd.js.map +0 -1
- package/lib/cjs/commands/update/UpdateCmd.js +0 -128
- package/lib/cjs/commands/update/UpdateCmd.js.map +0 -1
- package/lib/cjs/constants/index.js +0 -16
- package/lib/cjs/constants/index.js.map +0 -1
- package/lib/cjs/index.js +0 -19
- package/lib/cjs/index.js.map +0 -1
- package/lib/cjs/interfaces/ArchitectureConvention.js +0 -9
- package/lib/cjs/interfaces/ArchitectureConvention.js.map +0 -1
- package/lib/cjs/interfaces/PlatformType.js +0 -9
- package/lib/cjs/interfaces/PlatformType.js.map +0 -1
- package/lib/cjs/interfaces/ProjectConvention.js +0 -9
- package/lib/cjs/interfaces/ProjectConvention.js.map +0 -1
- package/lib/cjs/interfaces/index.js +0 -7
- package/lib/cjs/interfaces/index.js.map +0 -1
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/pipes/ClassNamePipe.js +0 -46
- package/lib/cjs/pipes/ClassNamePipe.js.map +0 -1
- package/lib/cjs/pipes/OutputFilePathPipe.js +0 -41
- package/lib/cjs/pipes/OutputFilePathPipe.js.map +0 -1
- package/lib/cjs/pipes/RoutePipe.js +0 -26
- package/lib/cjs/pipes/RoutePipe.js.map +0 -1
- package/lib/cjs/pipes/index.js +0 -7
- package/lib/cjs/pipes/index.js.map +0 -1
- package/lib/cjs/platforms/InitPlatformsModule.js +0 -26
- package/lib/cjs/platforms/InitPlatformsModule.js.map +0 -1
- package/lib/cjs/platforms/supports/InitBasePlatform.js +0 -3
- package/lib/cjs/platforms/supports/InitBasePlatform.js.map +0 -1
- package/lib/cjs/platforms/supports/InitExpressPlatform.js +0 -35
- package/lib/cjs/platforms/supports/InitExpressPlatform.js.map +0 -1
- package/lib/cjs/platforms/supports/InitKoaPlatform.js +0 -39
- package/lib/cjs/platforms/supports/InitKoaPlatform.js.map +0 -1
- package/lib/cjs/runtimes/RuntimesModule.js +0 -67
- package/lib/cjs/runtimes/RuntimesModule.js.map +0 -1
- package/lib/cjs/runtimes/index.js +0 -11
- package/lib/cjs/runtimes/index.js.map +0 -1
- package/lib/cjs/runtimes/supports/BabelRuntime.js +0 -41
- package/lib/cjs/runtimes/supports/BabelRuntime.js.map +0 -1
- package/lib/cjs/runtimes/supports/BaseRuntime.js +0 -45
- package/lib/cjs/runtimes/supports/BaseRuntime.js.map +0 -1
- package/lib/cjs/runtimes/supports/BunRuntime.js +0 -27
- package/lib/cjs/runtimes/supports/BunRuntime.js.map +0 -1
- package/lib/cjs/runtimes/supports/NodeRuntime.js +0 -33
- package/lib/cjs/runtimes/supports/NodeRuntime.js.map +0 -1
- package/lib/cjs/runtimes/supports/SWCRuntime.js +0 -35
- package/lib/cjs/runtimes/supports/SWCRuntime.js.map +0 -1
- package/lib/cjs/runtimes/supports/WebpackRuntime.js +0 -35
- package/lib/cjs/runtimes/supports/WebpackRuntime.js.map +0 -1
- package/lib/cjs/services/ProvidersInfoService.js +0 -48
- package/lib/cjs/services/ProvidersInfoService.js.map +0 -1
- package/lib/cjs/utils/fillImports.js +0 -40
- package/lib/cjs/utils/fillImports.js.map +0 -1
- package/lib/esm/Cli.js.map +0 -1
- package/lib/esm/bin/tsed.js.map +0 -1
- package/lib/esm/commands/add/AddCmd.js.map +0 -1
- package/lib/esm/commands/generate/GenerateCmd.js.map +0 -1
- package/lib/esm/commands/generate/ProviderTypes.js.map +0 -1
- package/lib/esm/commands/index.js.map +0 -1
- package/lib/esm/commands/init/InitCmd.js.map +0 -1
- package/lib/esm/commands/init/config/FeaturesPrompt.js.map +0 -1
- package/lib/esm/commands/init/config/InitFileSchema.js.map +0 -1
- package/lib/esm/commands/init/interfaces/InitCmdContext.js.map +0 -1
- package/lib/esm/commands/init/interfaces/InitOptions.js.map +0 -1
- package/lib/esm/commands/init/interfaces/InitPromptAnswers.js.map +0 -1
- package/lib/esm/commands/init/mappers/mapToContext.js.map +0 -1
- package/lib/esm/commands/init/mappers/mapUniqFeatures.js.map +0 -1
- package/lib/esm/commands/init/prompts/getFeaturesPrompt.js.map +0 -1
- package/lib/esm/commands/init/utils/hasFeature.js.map +0 -1
- package/lib/esm/commands/init/utils/isPlatform.js.map +0 -1
- package/lib/esm/commands/run/RunCmd.js.map +0 -1
- package/lib/esm/commands/update/UpdateCmd.js.map +0 -1
- package/lib/esm/constants/index.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
- package/lib/esm/interfaces/ArchitectureConvention.js.map +0 -1
- package/lib/esm/interfaces/PlatformType.js.map +0 -1
- package/lib/esm/interfaces/ProjectConvention.js.map +0 -1
- package/lib/esm/interfaces/index.js.map +0 -1
- package/lib/esm/package.json +0 -3
- package/lib/esm/pipes/ClassNamePipe.js.map +0 -1
- package/lib/esm/pipes/OutputFilePathPipe.js.map +0 -1
- package/lib/esm/pipes/RoutePipe.js.map +0 -1
- package/lib/esm/pipes/index.js.map +0 -1
- package/lib/esm/platforms/InitPlatformsModule.js.map +0 -1
- package/lib/esm/platforms/supports/InitBasePlatform.js.map +0 -1
- package/lib/esm/platforms/supports/InitExpressPlatform.js.map +0 -1
- package/lib/esm/platforms/supports/InitKoaPlatform.js.map +0 -1
- package/lib/esm/runtimes/RuntimesModule.js.map +0 -1
- package/lib/esm/runtimes/index.js.map +0 -1
- package/lib/esm/runtimes/supports/BabelRuntime.js.map +0 -1
- package/lib/esm/runtimes/supports/BaseRuntime.js.map +0 -1
- package/lib/esm/runtimes/supports/BunRuntime.js.map +0 -1
- package/lib/esm/runtimes/supports/NodeRuntime.js.map +0 -1
- package/lib/esm/runtimes/supports/SWCRuntime.js +0 -32
- package/lib/esm/runtimes/supports/SWCRuntime.js.map +0 -1
- package/lib/esm/runtimes/supports/WebpackRuntime.js.map +0 -1
- package/lib/esm/services/ProvidersInfoService.js.map +0 -1
- package/lib/esm/utils/fillImports.js.map +0 -1
- package/lib/tsconfig.tsbuildinfo +0 -1
- package/lib/types/runtimes/supports/SWCRuntime.d.ts +0 -9
- package/templates/init/.node-dev.json.hbs +0 -5
- package/templates/init/tsconfig.compile.json.hbs +0 -15
package/lib/types/Cli.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CliCore } from "@tsed/cli-core";
|
|
2
|
-
import { ArchitectureConvention, ProjectConvention } from "./interfaces";
|
|
2
|
+
import { ArchitectureConvention, ProjectConvention } from "./interfaces/index.js";
|
|
3
3
|
export declare class Cli extends CliCore {
|
|
4
4
|
static defaults: {
|
|
5
5
|
name: string;
|
|
6
|
-
pkg: import("read-pkg").NormalizedPackageJson;
|
|
6
|
+
pkg: import("read-pkg-up").NormalizedPackageJson;
|
|
7
7
|
templateDir: string;
|
|
8
8
|
plugins: boolean;
|
|
9
|
-
commands: (typeof import(".").
|
|
9
|
+
commands: (typeof import("./index.js").AddCmd | typeof import("./index.js").GenerateCmd | typeof import("./index.js").InitCmd | typeof import("./commands/run/RunCmd.js").RunCmd | typeof import("./index.js").UpdateCmd)[];
|
|
10
10
|
defaultProjectPreferences(): {
|
|
11
11
|
convention: ProjectConvention;
|
|
12
12
|
architecture: ArchitectureConvention;
|
|
@@ -22,5 +22,4 @@ export declare class Cli extends CliCore {
|
|
|
22
22
|
static checkName(name: string): void;
|
|
23
23
|
static checkPrecondition(settings: any): void;
|
|
24
24
|
static bootstrap(settings?: any): Promise<CliCore>;
|
|
25
|
-
static createAliases(): void;
|
|
26
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliDefaultOptions, CliPlugins, CommandProvider, PackageManagersModule, ProjectPackageJson, QuestionOptions, Task } from "@tsed/cli-core";
|
|
1
|
+
import { type CliDefaultOptions, CliPlugins, type CommandProvider, PackageManagersModule, ProjectPackageJson, type QuestionOptions, type Task } from "@tsed/cli-core";
|
|
2
2
|
export interface AddCmdOptions extends CliDefaultOptions {
|
|
3
3
|
name: string;
|
|
4
4
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CliDefaultOptions, CommandProvider, ProjectPackageJson, SrcRendererService } from "@tsed/cli-core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { type CliDefaultOptions, type CommandProvider, ProjectPackageJson, SrcRendererService } from "@tsed/cli-core";
|
|
2
|
+
import { ProjectConvention } from "../../interfaces/ProjectConvention.js";
|
|
3
|
+
import { ClassNamePipe } from "../../pipes/ClassNamePipe.js";
|
|
4
|
+
import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe.js";
|
|
5
|
+
import { RoutePipe } from "../../pipes/RoutePipe.js";
|
|
6
|
+
import { ProvidersInfoService } from "../../services/ProvidersInfoService.js";
|
|
7
7
|
export interface GenerateCmdContext extends CliDefaultOptions {
|
|
8
8
|
type: string;
|
|
9
9
|
name: string;
|
|
@@ -93,6 +93,7 @@ export declare class GenerateCmd implements CommandProvider {
|
|
|
93
93
|
$exec(ctx: GenerateCmdContext): ({
|
|
94
94
|
title: string;
|
|
95
95
|
task: () => Promise<void>;
|
|
96
|
+
skip?: undefined;
|
|
96
97
|
} | {
|
|
97
98
|
title: string;
|
|
98
99
|
skip(): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { GenerateCmd } from "./generate/GenerateCmd";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
declare const _default: (typeof
|
|
1
|
+
import { AddCmd } from "./add/AddCmd.js";
|
|
2
|
+
import { GenerateCmd } from "./generate/GenerateCmd.js";
|
|
3
|
+
import { InitCmd } from "./init/InitCmd.js";
|
|
4
|
+
import { RunCmd } from "./run/RunCmd.js";
|
|
5
|
+
import { UpdateCmd } from "./update/UpdateCmd.js";
|
|
6
|
+
declare const _default: (typeof AddCmd | typeof GenerateCmd | typeof InitCmd | typeof RunCmd | typeof UpdateCmd)[];
|
|
7
7
|
export default _default;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { CliExeca, CliFs, CliLoadFile, CliPackageJson, CliPlugins, CliService, CommandProvider, Configuration, PackageManagersModule, ProjectPackageJson, QuestionOptions, RootRendererService, Task } from "@tsed/cli-core";
|
|
2
|
-
import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
import { CliExeca, CliFs, CliLoadFile, CliPackageJson, CliPlugins, CliService, type CommandProvider, Configuration, PackageManagersModule, ProjectPackageJson, type QuestionOptions, RootRendererService, type Task } from "@tsed/cli-core";
|
|
2
|
+
import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe.js";
|
|
3
|
+
import { InitPlatformsModule } from "../../platforms/InitPlatformsModule.js";
|
|
4
|
+
import { RuntimesModule } from "../../runtimes/RuntimesModule.js";
|
|
5
|
+
import type { InitCmdContext } from "./interfaces/InitCmdContext.js";
|
|
6
|
+
import type { InitOptions } from "./interfaces/InitOptions.js";
|
|
7
7
|
export declare class InitCmd implements CommandProvider {
|
|
8
8
|
protected configuration: Configuration;
|
|
9
9
|
protected cliPlugins: CliPlugins;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InitOptions } from "../interfaces/InitOptions";
|
|
1
|
+
import type { InitOptions } from "../interfaces/InitOptions.js";
|
|
2
2
|
export interface Feature {
|
|
3
3
|
name: string;
|
|
4
4
|
value?: any;
|
|
@@ -35,7 +35,6 @@ export declare enum FeatureType {
|
|
|
35
35
|
TESTING = "testing",
|
|
36
36
|
JEST = "jest",
|
|
37
37
|
VITEST = "vitest",
|
|
38
|
-
MOCHA = "mocha",
|
|
39
38
|
LINTER = "linter",
|
|
40
39
|
ESLINT = "eslint",
|
|
41
40
|
LINT_STAGED = "lintstaged",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PackageManager } from "@tsed/cli-core";
|
|
2
|
-
import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces";
|
|
3
|
-
import { FeatureType } from "./FeaturesPrompt";
|
|
2
|
+
import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces/index.js";
|
|
3
|
+
import { FeatureType } from "./FeaturesPrompt.js";
|
|
4
4
|
export declare const InitFileSchema: {
|
|
5
5
|
type: string;
|
|
6
6
|
properties: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CliDefaultOptions } from "@tsed/cli-core";
|
|
2
|
-
import { InitOptions } from "./InitOptions";
|
|
1
|
+
import type { CliDefaultOptions } from "@tsed/cli-core";
|
|
2
|
+
import type { InitOptions } from "./InitOptions.js";
|
|
3
3
|
export interface InitCmdContext extends InitOptions, CliDefaultOptions, Record<string, any> {
|
|
4
4
|
root: string;
|
|
5
5
|
srcDir: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { PackageManager } from "@tsed/cli-core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { ProjectConvention } from "../../../interfaces/ProjectConvention";
|
|
5
|
-
import { FeatureType } from "../config/FeaturesPrompt";
|
|
2
|
+
import { ArchitectureConvention } from "../../../interfaces/ArchitectureConvention.js";
|
|
3
|
+
import { PlatformType } from "../../../interfaces/PlatformType.js";
|
|
4
|
+
import { ProjectConvention } from "../../../interfaces/ProjectConvention.js";
|
|
5
|
+
import { FeatureType } from "../config/FeaturesPrompt.js";
|
|
6
6
|
export interface InitOptions {
|
|
7
7
|
root: string;
|
|
8
8
|
projectName: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PackageManager } from "@tsed/cli-core";
|
|
2
|
-
import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces";
|
|
2
|
+
import { ArchitectureConvention, PlatformType, ProjectConvention } from "../../../interfaces/index.js";
|
|
3
3
|
export interface InitPromptAnswers {
|
|
4
4
|
projectName: string;
|
|
5
5
|
platform: PlatformType;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InitCmdContext } from "../interfaces/InitCmdContext";
|
|
1
|
+
import type { InitCmdContext } from "../interfaces/InitCmdContext.js";
|
|
2
2
|
export declare function mapToContext(options: any): InitCmdContext;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { InitOptions } from "../interfaces/InitOptions.js";
|
|
2
|
+
import type { InitPromptAnswers } from "../interfaces/InitPromptAnswers.js";
|
|
3
3
|
export declare function mapUniqFeatures(answers: InitPromptAnswers & any): InitOptions;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { InitOptions } from "../interfaces/InitOptions";
|
|
1
|
+
import type { InitOptions } from "../interfaces/InitOptions.js";
|
|
2
2
|
export declare function getFeaturesPrompt(runtimes: string[], availablePackageManagers: string[], options: Partial<InitOptions>): any[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliFs, CliRunScript, CommandProvider, ProjectPackageJson, Tasks } from "@tsed/cli-core";
|
|
1
|
+
import { CliFs, CliRunScript, type CommandProvider, ProjectPackageJson, type Tasks } from "@tsed/cli-core";
|
|
2
2
|
export interface RunCmdContext {
|
|
3
3
|
production: boolean;
|
|
4
4
|
command: string;
|
|
@@ -9,5 +9,4 @@ export declare class RunCmd implements CommandProvider {
|
|
|
9
9
|
projectPackageJson: ProjectPackageJson;
|
|
10
10
|
runScript: CliRunScript;
|
|
11
11
|
$exec(ctx: RunCmdContext): Promise<Tasks>;
|
|
12
|
-
protected getCompilePath(): Promise<any>;
|
|
13
12
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CliDefaultOptions, CliPackageJson, CommandProvider, NpmRegistryClient, PackageManagersModule, ProjectPackageJson, QuestionOptions, Task } from "@tsed/cli-core";
|
|
1
|
+
import { type CliDefaultOptions, CliPackageJson, type CommandProvider, NpmRegistryClient, PackageManagersModule, ProjectPackageJson, type QuestionOptions, type Task } from "@tsed/cli-core";
|
|
2
2
|
export interface UpdateCmdContext extends CliDefaultOptions {
|
|
3
3
|
version: string;
|
|
4
4
|
[key: string]: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const PKG: import("read-pkg").NormalizedPackageJson;
|
|
1
|
+
export declare const PKG: import("read-pkg-up").NormalizedPackageJson;
|
|
2
2
|
export declare const MINIMAL_TSED_VERSION = "7";
|
|
3
3
|
export declare const DEFAULT_TSED_TAGS = "latest";
|
|
4
4
|
export declare const IGNORE_VERSIONS: string[];
|
package/lib/types/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./commands/
|
|
3
|
-
export * from "./commands/
|
|
4
|
-
export * from "./commands/init/
|
|
5
|
-
export * from "./commands/init/config/FeaturesPrompt";
|
|
6
|
-
export * from "./commands/init/
|
|
7
|
-
export * from "./commands/
|
|
8
|
-
export * from "./commands/
|
|
9
|
-
export * from "./commands/init/prompts/getFeaturesPrompt";
|
|
10
|
-
export * from "./
|
|
11
|
-
export * from "./
|
|
12
|
-
export * from "./
|
|
13
|
-
export * from "./pipes";
|
|
14
|
-
export * from "./
|
|
15
|
-
export * from "./
|
|
1
|
+
export * from "./Cli.js";
|
|
2
|
+
export * from "./commands/add/AddCmd.js";
|
|
3
|
+
export * from "./commands/generate/GenerateCmd.js";
|
|
4
|
+
export * from "./commands/init/config/FeaturesPrompt.js";
|
|
5
|
+
export * from "./commands/init/config/FeaturesPrompt.js";
|
|
6
|
+
export * from "./commands/init/InitCmd.js";
|
|
7
|
+
export * from "./commands/init/interfaces/InitCmdContext.js";
|
|
8
|
+
export * from "./commands/init/interfaces/InitOptions.js";
|
|
9
|
+
export * from "./commands/init/prompts/getFeaturesPrompt.js";
|
|
10
|
+
export * from "./commands/update/UpdateCmd.js";
|
|
11
|
+
export * from "./constants/index.js";
|
|
12
|
+
export * from "./interfaces/index.js";
|
|
13
|
+
export * from "./pipes/index.js";
|
|
14
|
+
export * from "./runtimes/index.js";
|
|
15
|
+
export * from "./services/ProvidersInfoService.js";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./PlatformType";
|
|
3
|
-
export * from "./
|
|
1
|
+
export * from "./ArchitectureConvention.js";
|
|
2
|
+
export * from "./PlatformType.js";
|
|
3
|
+
export * from "./ProjectConvention.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ProjectPackageJson } from "@tsed/cli-core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ProjectConvention } from "../interfaces/ProjectConvention.js";
|
|
3
|
+
import { ProvidersInfoService } from "../services/ProvidersInfoService.js";
|
|
4
4
|
export declare class ClassNamePipe {
|
|
5
5
|
providers: ProvidersInfoService;
|
|
6
6
|
projectPackageJson: ProjectPackageJson;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ProjectPackageJson } from "@tsed/cli-core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { ProjectConvention } from "../interfaces/index.js";
|
|
3
|
+
import { ProvidersInfoService } from "../services/ProvidersInfoService.js";
|
|
4
|
+
import { ClassNamePipe } from "./ClassNamePipe.js";
|
|
5
5
|
export declare class OutputFilePathPipe {
|
|
6
6
|
private classNamePipe;
|
|
7
7
|
providers: ProvidersInfoService;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from "./ClassNamePipe";
|
|
2
|
-
export * from "./OutputFilePathPipe";
|
|
3
|
-
export * from "./RoutePipe";
|
|
1
|
+
export * from "./ClassNamePipe.js";
|
|
2
|
+
export * from "./OutputFilePathPipe.js";
|
|
3
|
+
export * from "./RoutePipe.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
|
|
2
|
-
import { BaseRuntime } from "./supports/BaseRuntime";
|
|
2
|
+
import { BaseRuntime } from "./supports/BaseRuntime.js";
|
|
3
3
|
export interface RuntimeInitOptions extends Record<string, unknown> {
|
|
4
4
|
runtime?: string;
|
|
5
5
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
export * from "./RuntimesModule";
|
|
2
|
-
export * from "./supports/BabelRuntime";
|
|
3
|
-
export * from "./supports/BaseRuntime";
|
|
4
|
-
export * from "./supports/BunRuntime";
|
|
5
|
-
export * from "./supports/NodeRuntime";
|
|
6
|
-
export * from "./supports/
|
|
7
|
-
export * from "./supports/WebpackRuntime";
|
|
1
|
+
export * from "./RuntimesModule.js";
|
|
2
|
+
export * from "./supports/BabelRuntime.js";
|
|
3
|
+
export * from "./supports/BaseRuntime.js";
|
|
4
|
+
export * from "./supports/BunRuntime.js";
|
|
5
|
+
export * from "./supports/NodeRuntime.js";
|
|
6
|
+
export * from "./supports/WebpackRuntime.js";
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import { NodeRuntime } from "./NodeRuntime";
|
|
1
|
+
import { NodeRuntime } from "./NodeRuntime.js";
|
|
2
2
|
export declare class BabelRuntime extends NodeRuntime {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly order: number;
|
|
5
|
+
isCompiled(): boolean;
|
|
5
6
|
files(): string[];
|
|
6
7
|
startDev(main: string): string;
|
|
8
|
+
startProd(args: string): string;
|
|
7
9
|
compile(src: string, out: string): string;
|
|
8
10
|
devDependencies(): {
|
|
9
11
|
"@babel/cli": string;
|
|
@@ -16,5 +18,6 @@ export declare class BabelRuntime extends NodeRuntime {
|
|
|
16
18
|
"@babel/plugin-proposal-object-rest-spread": string;
|
|
17
19
|
"babel-plugin-transform-typescript-metadata": string;
|
|
18
20
|
"babel-watch": string;
|
|
21
|
+
typescript: string;
|
|
19
22
|
};
|
|
20
23
|
}
|
|
@@ -6,6 +6,7 @@ export declare abstract class BaseRuntime {
|
|
|
6
6
|
protected packageManagers: PackageManagersModule;
|
|
7
7
|
protected cliExeca: CliExeca;
|
|
8
8
|
get packageManager(): import("@tsed/cli-core").BaseManager;
|
|
9
|
+
isCompiled(): boolean;
|
|
9
10
|
files(): string[];
|
|
10
11
|
has(): boolean;
|
|
11
12
|
run(args: string): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseRuntime } from "./BaseRuntime";
|
|
1
|
+
import { BaseRuntime } from "./BaseRuntime.js";
|
|
2
2
|
export declare class BunRuntime extends BaseRuntime {
|
|
3
3
|
readonly name = "bun";
|
|
4
4
|
readonly cmd = "bun";
|
|
@@ -6,4 +6,5 @@ export declare class BunRuntime extends BaseRuntime {
|
|
|
6
6
|
compile(src: string, out: string): string;
|
|
7
7
|
startDev(main: string): string;
|
|
8
8
|
startProd(args: string): string;
|
|
9
|
+
dependencies(): Record<string, any>;
|
|
9
10
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { BaseRuntime } from "./BaseRuntime";
|
|
1
|
+
import { BaseRuntime } from "./BaseRuntime.js";
|
|
2
2
|
export declare class NodeRuntime extends BaseRuntime {
|
|
3
3
|
readonly name: string;
|
|
4
4
|
readonly cmd: string;
|
|
5
5
|
readonly order: number;
|
|
6
|
-
|
|
7
|
-
compile(src: string, out: string): string;
|
|
6
|
+
files(): string[];
|
|
8
7
|
startDev(main: string): string;
|
|
9
|
-
startProd(
|
|
8
|
+
startProd(main: string): string;
|
|
9
|
+
compile(src: string, out: string): string;
|
|
10
|
+
dependencies(): Record<string, any>;
|
|
11
|
+
devDependencies(): Record<string, any>;
|
|
10
12
|
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
-
import { BabelRuntime } from "./BabelRuntime";
|
|
1
|
+
import { BabelRuntime } from "./BabelRuntime.js";
|
|
2
2
|
export declare class WebpackRuntime extends BabelRuntime {
|
|
3
3
|
readonly name = "webpack";
|
|
4
4
|
readonly order: number;
|
|
5
|
+
isCompiled(): boolean;
|
|
5
6
|
files(): string[];
|
|
6
7
|
compile(src: string, out: string): string;
|
|
7
8
|
startProd(main: string): string;
|
|
8
9
|
devDependencies(): {
|
|
10
|
+
typescript: string;
|
|
9
11
|
"babel-loader": string;
|
|
10
12
|
webpack: string;
|
|
11
13
|
"webpack-cli": string;
|
package/package.json
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli",
|
|
3
|
-
"
|
|
3
|
+
"description": "CLI to bootstrap your Ts.ED project",
|
|
4
|
+
"version": "6.0.0-alpha.10",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./lib/esm/index.js",
|
|
4
7
|
"source": "./src/index.ts",
|
|
5
|
-
"main": "./lib/cjs/index.js",
|
|
6
8
|
"module": "./lib/esm/index.js",
|
|
7
9
|
"typings": "./lib/types/index.d.ts",
|
|
8
10
|
"exports": {
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./lib/types/index.d.ts",
|
|
13
|
+
"import": "./lib/esm/index.js",
|
|
14
|
+
"default": "./lib/esm/index.js"
|
|
15
|
+
}
|
|
13
16
|
},
|
|
14
17
|
"scripts": {
|
|
15
18
|
"build": "yarn build:ts",
|
|
16
|
-
"build:ts": "tsc --build tsconfig.json
|
|
17
|
-
"
|
|
18
|
-
"start:help
|
|
19
|
-
"start:help:
|
|
20
|
-
"start:
|
|
21
|
-
"start:
|
|
22
|
-
"start:init:
|
|
23
|
-
"start:init:test
|
|
24
|
-
"start:init:
|
|
25
|
-
"start:init:
|
|
26
|
-
"start:init:
|
|
27
|
-
"start:init:
|
|
28
|
-
"start:
|
|
29
|
-
"start:
|
|
30
|
-
"start:generate
|
|
31
|
-
"start:generate:
|
|
32
|
-
"start:
|
|
33
|
-
"start:g:
|
|
34
|
-
"start:
|
|
35
|
-
"start:
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"test": "
|
|
19
|
+
"build:ts": "tsc --build tsconfig.json",
|
|
20
|
+
"run-cmd": "cross-env NODE_ENV=development CLI_MODE=ts CI=true node --import @swc-node/register/esm-register src/bin/tsed.ts",
|
|
21
|
+
"start:help": "yarn run-cmd -h",
|
|
22
|
+
"start:help:g": "yarn run-cmd generate -h",
|
|
23
|
+
"start:help:i": "yarn run-cmd init -h",
|
|
24
|
+
"start:version": "yarn run-cmd --version",
|
|
25
|
+
"start:init:help": "yarn run-cmd init -h",
|
|
26
|
+
"start:init:test": "yarn run-cmd init init -r ./.tmp/init/default --features=oidc --arch=default --convention=conv_default --platform=express --package-manager=npm --skip-prompt .",
|
|
27
|
+
"start:init:test:jest": "yarn run-cmd init -r ./.tmp/init/default --features=jest --arch=default --convention=conv_default --platform=express --package-manager=npm --skip-prompt .",
|
|
28
|
+
"start:init:run": "yarn run-cmd init -r ./.tmp/init/default",
|
|
29
|
+
"start:init:params": "yarn run-cmd init -r ./.tmp/init/default --skip-prompt --features swagger,jest,lintstaged",
|
|
30
|
+
"start:init:run:name": "yarn run-cmd init -r ./.tmp/init awesome --verbose",
|
|
31
|
+
"start:init:args": "yarn run-cmd init -r ./.tmp/cmd --package-manager=npm --project-name=untitled3 --features=graphql,typeorm,passportjs,socketio,linter,eslint,prettier --arch=default --convention=default --platform=express --skip-prompt .",
|
|
32
|
+
"start:add:run": "yarn run-cmd add -r ./.tmp",
|
|
33
|
+
"start:generate": "yarn run-cmd generate -r ./.tmp/init/default",
|
|
34
|
+
"start:generate:help": "yarn run-cmd generate -h",
|
|
35
|
+
"start:generate:model": "yarn run-cmd generate model -r ./.tmp/init/awesome",
|
|
36
|
+
"start:g:model": "yarn run-cmd g model -r ./.tmp/init/awesome",
|
|
37
|
+
"start:g:prisma": "yarn run-cmd g service -r ./.tmp/init/awesome prisma",
|
|
38
|
+
"start:generate:run": "yarn run-cmd generate -r ./.tmp/init/awesome",
|
|
39
|
+
"start:typeorm:run": "yarn run-cmd typeorm entity:create -r ./.tmp/init/awesome --name User",
|
|
40
|
+
"test": "vitest run",
|
|
41
|
+
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
39
42
|
},
|
|
40
43
|
"bin": {
|
|
41
|
-
"tsed": "lib/
|
|
44
|
+
"tsed": "lib/esm/bin/tsed.js"
|
|
42
45
|
},
|
|
43
46
|
"files": [
|
|
44
|
-
"lib/cjs/bin/tsed.js",
|
|
45
|
-
"lib/cjs/bin",
|
|
46
47
|
"lib/esm/bin/tsed.js",
|
|
47
48
|
"lib/esm/bin",
|
|
48
49
|
"lib",
|
|
49
50
|
"templates"
|
|
50
51
|
],
|
|
51
|
-
"description": "CLI to bootstrap your Ts.ED project",
|
|
52
52
|
"keywords": [
|
|
53
53
|
"Ts.ED",
|
|
54
54
|
"cli",
|
|
@@ -63,32 +63,32 @@
|
|
|
63
63
|
"node": ">=14"
|
|
64
64
|
},
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@
|
|
66
|
+
"@swc-node/register": "^1.10.9",
|
|
67
|
+
"@swc/core": "^1.7.28",
|
|
68
|
+
"@swc/helpers": "^0.5.13",
|
|
69
|
+
"@tsed/cli-core": "6.0.0-alpha.10",
|
|
67
70
|
"@tsed/core": ">=7.14.2",
|
|
68
71
|
"@tsed/di": ">=7.14.2",
|
|
69
72
|
"@tsed/logger": ">=6.2.1",
|
|
70
73
|
"@tsed/openspec": ">=7.14.2",
|
|
71
74
|
"@tsed/schema": ">=7.14.2",
|
|
72
|
-
"chalk": "
|
|
73
|
-
"change-case": "4.
|
|
74
|
-
"
|
|
75
|
-
"
|
|
76
|
-
"
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"tslib": "2.3.1"
|
|
75
|
+
"chalk": "^5.3.0",
|
|
76
|
+
"change-case": "^5.4.4",
|
|
77
|
+
"esm-module-alias": "^2.2.1",
|
|
78
|
+
"globby": "^14.0.2",
|
|
79
|
+
"read-pkg-up": "^11.0.0",
|
|
80
|
+
"semver": "^7.6.3",
|
|
81
|
+
"tslib": "^2.7.0"
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
|
-
"@tsed/
|
|
83
|
-
"@tsed/jest-config": "5.4.3",
|
|
84
|
-
"@tsed/typescript": "5.4.3",
|
|
84
|
+
"@tsed/typescript": "6.0.0-alpha.10",
|
|
85
85
|
"@types/change-case": "^2.3.1",
|
|
86
86
|
"cross-env": "7.0.3",
|
|
87
|
-
"
|
|
88
|
-
"
|
|
87
|
+
"typescript": "5.6.2",
|
|
88
|
+
"vitest": "2.1.1"
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
|
-
"@tsed/cli-core": "
|
|
91
|
+
"@tsed/cli-core": "workspace:*",
|
|
92
92
|
"@tsed/core": ">=7.14.2",
|
|
93
93
|
"@tsed/di": ">=7.14.2",
|
|
94
94
|
"@tsed/logger": ">=6.2.1",
|
|
@@ -101,5 +101,8 @@
|
|
|
101
101
|
},
|
|
102
102
|
"homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli",
|
|
103
103
|
"author": "Romain Lenzotti",
|
|
104
|
-
"license": "MIT"
|
|
104
|
+
"license": "MIT",
|
|
105
|
+
"publishConfig": {
|
|
106
|
+
"tag": "alpha"
|
|
107
|
+
}
|
|
105
108
|
}
|
|
@@ -45,11 +45,11 @@ docker compose build
|
|
|
45
45
|
docker compose up
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
-
##
|
|
48
|
+
## Barrels
|
|
49
49
|
|
|
50
|
-
This project uses [
|
|
50
|
+
This project uses [barrels](https://www.npmjs.com/package/@tsed/barrels) to generate index files to import the controllers.
|
|
51
51
|
|
|
52
|
-
Edit `.
|
|
52
|
+
Edit `.barrels.json` to customize it:
|
|
53
53
|
|
|
54
54
|
```json
|
|
55
55
|
{
|
|
@@ -58,9 +58,9 @@ Edit `.barreslby.json` to customize it:
|
|
|
58
58
|
"./src/controllers/pages"
|
|
59
59
|
],
|
|
60
60
|
"exclude": [
|
|
61
|
-
"__mock__",
|
|
62
|
-
"__mocks__",
|
|
63
|
-
"
|
|
61
|
+
"**/__mock__",
|
|
62
|
+
"**/__mocks__",
|
|
63
|
+
"**/*.spec.ts"
|
|
64
64
|
],
|
|
65
65
|
"delete": true
|
|
66
66
|
}
|