@tsed/cli 5.3.0 → 6.0.0-alpha.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/Cli.js +10 -11
- package/lib/esm/Cli.js.map +1 -1
- package/lib/esm/bin/tsed.js.map +1 -1
- package/lib/esm/commands/add/AddCmd.js +1 -4
- package/lib/esm/commands/add/AddCmd.js.map +1 -1
- package/lib/esm/commands/generate/GenerateCmd.js +4 -10
- package/lib/esm/commands/generate/GenerateCmd.js.map +1 -1
- package/lib/esm/commands/index.js +3 -3
- package/lib/esm/commands/index.js.map +1 -1
- package/lib/esm/commands/init/InitCmd.js +14 -27
- package/lib/esm/commands/init/InitCmd.js.map +1 -1
- package/lib/esm/commands/init/config/FeaturesPrompt.js +7 -18
- package/lib/esm/commands/init/config/FeaturesPrompt.js.map +1 -1
- package/lib/esm/commands/init/config/InitFileSchema.js +1 -1
- package/lib/esm/commands/init/config/InitFileSchema.js.map +1 -1
- package/lib/esm/commands/init/mappers/mapToContext.js.map +1 -1
- package/lib/esm/commands/init/prompts/getFeaturesPrompt.js.map +1 -1
- package/lib/esm/commands/run/RunCmd.js +5 -24
- package/lib/esm/commands/run/RunCmd.js.map +1 -1
- package/lib/esm/commands/update/UpdateCmd.js +1 -6
- package/lib/esm/commands/update/UpdateCmd.js.map +1 -1
- package/lib/esm/constants/index.js +2 -4
- package/lib/esm/constants/index.js.map +1 -1
- package/lib/esm/index.js +8 -8
- package/lib/esm/index.js.map +1 -1
- package/lib/esm/interfaces/ArchitectureConvention.js +1 -1
- package/lib/esm/interfaces/ArchitectureConvention.js.map +1 -1
- package/lib/esm/interfaces/PlatformType.js +1 -1
- package/lib/esm/interfaces/PlatformType.js.map +1 -1
- package/lib/esm/interfaces/ProjectConvention.js +1 -1
- package/lib/esm/interfaces/ProjectConvention.js.map +1 -1
- package/lib/esm/interfaces/index.js +2 -2
- package/lib/esm/interfaces/index.js.map +1 -1
- package/lib/esm/pipes/ClassNamePipe.js +1 -3
- package/lib/esm/pipes/ClassNamePipe.js.map +1 -1
- package/lib/esm/pipes/OutputFilePathPipe.js +1 -4
- package/lib/esm/pipes/OutputFilePathPipe.js.map +1 -1
- package/lib/esm/pipes/index.js.map +1 -1
- package/lib/esm/platforms/InitPlatformsModule.js +1 -2
- package/lib/esm/platforms/InitPlatformsModule.js.map +1 -1
- package/lib/esm/platforms/supports/InitExpressPlatform.js +3 -1
- package/lib/esm/platforms/supports/InitExpressPlatform.js.map +1 -1
- package/lib/esm/platforms/supports/InitKoaPlatform.js +3 -1
- package/lib/esm/platforms/supports/InitKoaPlatform.js.map +1 -1
- package/lib/esm/runtimes/RuntimesModule.js +4 -8
- package/lib/esm/runtimes/RuntimesModule.js.map +1 -1
- package/lib/esm/runtimes/index.js +0 -1
- package/lib/esm/runtimes/index.js.map +1 -1
- package/lib/esm/runtimes/supports/BabelRuntime.js +11 -4
- package/lib/esm/runtimes/supports/BabelRuntime.js.map +1 -1
- package/lib/esm/runtimes/supports/BaseRuntime.js +4 -4
- package/lib/esm/runtimes/supports/BaseRuntime.js.map +1 -1
- package/lib/esm/runtimes/supports/BunRuntime.js +12 -4
- package/lib/esm/runtimes/supports/BunRuntime.js.map +1 -1
- package/lib/esm/runtimes/supports/NodeRuntime.js +28 -14
- package/lib/esm/runtimes/supports/NodeRuntime.js.map +1 -1
- package/lib/esm/runtimes/supports/WebpackRuntime.js +7 -3
- package/lib/esm/runtimes/supports/WebpackRuntime.js.map +1 -1
- package/lib/esm/services/ProvidersInfoService.js +3 -1
- package/lib/esm/services/ProvidersInfoService.js.map +1 -1
- package/lib/esm/utils/fillImports.js +12 -12
- package/lib/esm/utils/fillImports.js.map +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/Cli.d.ts +2 -2
- package/lib/types/commands/generate/GenerateCmd.d.ts +5 -5
- package/lib/types/commands/index.d.ts +6 -6
- package/lib/types/commands/init/InitCmd.d.ts +5 -5
- 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 +1 -1
- 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 +0 -1
- package/lib/types/index.d.ts +15 -15
- package/lib/types/interfaces/index.d.ts +3 -3
- 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 +3 -1
- 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 +2 -1
- package/package.json +25 -22
- package/templates/init/{.barrelsby.json.hbs → .barrels.json.hbs} +3 -3
- package/templates/init/README.md.hbs +6 -6
- package/templates/init/docker/npm/Dockerfile.hbs +1 -1
- package/templates/init/docker/pnpm/Dockerfile.hbs +1 -1
- package/templates/init/docker/yarn/Dockerfile.hbs +1 -1
- package/templates/init/docker/yarn_berry/Dockerfile.hbs +1 -1
- package/templates/init/nodemon.json.hbs +9 -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/package.json +0 -3
- package/lib/esm/runtimes/supports/SWCRuntime.js +0 -32
- package/lib/esm/runtimes/supports/SWCRuntime.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/templates/init/{processes.config.js.hbs → processes.config.cjs.hbs} +0 -0
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
6
|
pkg: import("read-pkg").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;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CliDefaultOptions, CommandProvider, ProjectPackageJson, SrcRendererService } from "@tsed/cli-core";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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;
|
|
@@ -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
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 {
|
|
2
|
+
import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe.js";
|
|
3
|
+
import { InitPlatformsModule } from "../../platforms/InitPlatformsModule.js";
|
|
4
|
+
import { RuntimesModule } from "../../runtimes/RuntimesModule.js";
|
|
5
|
+
import { InitCmdContext } from "./interfaces/InitCmdContext.js";
|
|
6
|
+
import { 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 { 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
1
|
import { CliDefaultOptions } from "@tsed/cli-core";
|
|
2
|
-
import { InitOptions } from "./InitOptions";
|
|
2
|
+
import { 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 { InitCmdContext } from "../interfaces/InitCmdContext.js";
|
|
2
2
|
export declare function mapToContext(options: any): InitCmdContext;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { InitOptions } from "../interfaces/InitOptions.js";
|
|
2
|
+
import { 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 { InitOptions } from "../interfaces/InitOptions.js";
|
|
2
2
|
export declare function getFeaturesPrompt(runtimes: string[], availablePackageManagers: string[], options: Partial<InitOptions>): any[];
|
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,10 @@
|
|
|
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
5
|
files(): string[];
|
|
6
6
|
startDev(main: string): string;
|
|
7
|
+
startProd(args: string): string;
|
|
7
8
|
compile(src: string, out: string): string;
|
|
8
9
|
devDependencies(): {
|
|
9
10
|
"@babel/cli": string;
|
|
@@ -16,5 +17,6 @@ export declare class BabelRuntime extends NodeRuntime {
|
|
|
16
17
|
"@babel/plugin-proposal-object-rest-spread": string;
|
|
17
18
|
"babel-plugin-transform-typescript-metadata": string;
|
|
18
19
|
"babel-watch": string;
|
|
20
|
+
typescript: string;
|
|
19
21
|
};
|
|
20
22
|
}
|
|
@@ -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,4 +1,4 @@
|
|
|
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;
|
|
@@ -6,6 +6,7 @@ export declare class WebpackRuntime extends BabelRuntime {
|
|
|
6
6
|
compile(src: string, out: string): string;
|
|
7
7
|
startProd(main: string): string;
|
|
8
8
|
devDependencies(): {
|
|
9
|
+
typescript: string;
|
|
9
10
|
"babel-loader": string;
|
|
10
11
|
webpack: string;
|
|
11
12
|
"webpack-cli": string;
|
package/package.json
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tsed/cli",
|
|
3
|
-
"
|
|
3
|
+
"description": "CLI to bootstrap your Ts.ED project",
|
|
4
|
+
"version": "6.0.0-alpha.1",
|
|
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
|
|
19
|
+
"build:ts": "tsc --build tsconfig.json",
|
|
17
20
|
"start:help": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts -h",
|
|
18
21
|
"start:help:g": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts generate -h",
|
|
19
22
|
"start:help:i": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts init -h",
|
|
@@ -33,22 +36,18 @@
|
|
|
33
36
|
"start:g:prisma": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts g service -r ./.tmp/init/awesome prisma",
|
|
34
37
|
"start:generate:run": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts generate -r ./.tmp/init/awesome",
|
|
35
38
|
"start:typeorm:run": "cross-env NODE_ENV=development ts-node -r tsconfig-paths/register src/bin/tsed.ts typeorm entity:create -r ./.tmp/init/awesome --name User",
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"test": "cross-env NODE_ENV=test yarn jest --max-workers=2 --passWithNoTests && jest-coverage-thresholds-bumper"
|
|
39
|
+
"test": "vitest run -u",
|
|
40
|
+
"test:ci": "vitest run --coverage.thresholds.autoUpdate=true"
|
|
39
41
|
},
|
|
40
42
|
"bin": {
|
|
41
|
-
"tsed": "lib/
|
|
43
|
+
"tsed": "lib/esm/bin/tsed.js"
|
|
42
44
|
},
|
|
43
45
|
"files": [
|
|
44
|
-
"lib/cjs/bin/tsed.js",
|
|
45
|
-
"lib/cjs/bin",
|
|
46
46
|
"lib/esm/bin/tsed.js",
|
|
47
47
|
"lib/esm/bin",
|
|
48
48
|
"lib",
|
|
49
49
|
"templates"
|
|
50
50
|
],
|
|
51
|
-
"description": "CLI to bootstrap your Ts.ED project",
|
|
52
51
|
"keywords": [
|
|
53
52
|
"Ts.ED",
|
|
54
53
|
"cli",
|
|
@@ -63,7 +62,10 @@
|
|
|
63
62
|
"node": ">=14"
|
|
64
63
|
},
|
|
65
64
|
"dependencies": {
|
|
66
|
-
"@
|
|
65
|
+
"@swc-node/register": ">=1.10.9",
|
|
66
|
+
"@swc/core": ">=1.7.26",
|
|
67
|
+
"@swc/helpers": ">=0.5.13",
|
|
68
|
+
"@tsed/cli-core": "6.0.0-alpha.1",
|
|
67
69
|
"@tsed/core": ">=7.14.2",
|
|
68
70
|
"@tsed/di": ">=7.14.2",
|
|
69
71
|
"@tsed/logger": ">=6.2.1",
|
|
@@ -79,16 +81,14 @@
|
|
|
79
81
|
"tslib": "2.3.1"
|
|
80
82
|
},
|
|
81
83
|
"devDependencies": {
|
|
82
|
-
"@tsed/
|
|
83
|
-
"@tsed/jest-config": "5.3.0",
|
|
84
|
-
"@tsed/typescript": "5.3.0",
|
|
84
|
+
"@tsed/typescript": "6.0.0-alpha.1",
|
|
85
85
|
"@types/change-case": "^2.3.1",
|
|
86
86
|
"cross-env": "7.0.3",
|
|
87
|
-
"
|
|
88
|
-
"
|
|
87
|
+
"typescript": "4.9.5",
|
|
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
|
}
|
|
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
|
|
|
5
5
|
FROM node:${NODE_VERSION}-alpine as build
|
|
6
6
|
WORKDIR /opt
|
|
7
7
|
|
|
8
|
-
COPY package.json package-lock.json tsconfig.json tsconfig.compile.json .
|
|
8
|
+
COPY package.json package-lock.json tsconfig.json tsconfig.compile.json .barrels.json ./
|
|
9
9
|
|
|
10
10
|
RUN npm ci
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
|
|
|
5
5
|
FROM node:${NODE_VERSION}-alpine as build
|
|
6
6
|
WORKDIR /opt
|
|
7
7
|
|
|
8
|
-
COPY package.json pnpm-lock.yaml tsconfig.json tsconfig.compile.json .
|
|
8
|
+
COPY package.json pnpm-lock.yaml tsconfig.json tsconfig.compile.json .barrels.json ./
|
|
9
9
|
|
|
10
10
|
RUN pnpm install --frozen-lockfile
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
|
|
|
5
5
|
FROM node:${NODE_VERSION}-alpine as build
|
|
6
6
|
WORKDIR /opt
|
|
7
7
|
|
|
8
|
-
COPY package.json yarn.lock tsconfig.json tsconfig.compile.json .
|
|
8
|
+
COPY package.json yarn.lock tsconfig.json tsconfig.compile.json .barrels.json ./
|
|
9
9
|
|
|
10
10
|
RUN yarn install --pure-lockfile
|
|
11
11
|
|
|
@@ -5,7 +5,7 @@ ARG NODE_VERSION=20.10.0
|
|
|
5
5
|
FROM node:${NODE_VERSION}-alpine as build
|
|
6
6
|
WORKDIR /opt
|
|
7
7
|
|
|
8
|
-
COPY package.json yarn.lock yarn.lock tsconfig.json tsconfig.compile.json .
|
|
8
|
+
COPY package.json yarn.lock yarn.lock tsconfig.json tsconfig.compile.json .barrels.json ./
|
|
9
9
|
|
|
10
10
|
RUN yarn set version berry
|
|
11
11
|
RUN yarn install --immutable
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {readFileSync} from "fs";
|
|
2
|
-
import {envs} from "./envs/index";
|
|
3
|
-
import loggerConfig from "./logger/index";{{#if mongoose}}
|
|
4
|
-
import mongooseConfig from "./mongoose/index";
|
|
2
|
+
import {envs} from "./envs/index.js";
|
|
3
|
+
import loggerConfig from "./logger/index.js";{{#if mongoose}}
|
|
4
|
+
import mongooseConfig from "./mongoose/index.js";
|
|
5
5
|
{{/if}}{{#if oidc}}
|
|
6
|
-
import oidcConfig from "./oidc/index";
|
|
6
|
+
import oidcConfig from "./oidc/index.js";
|
|
7
7
|
import {FileSyncAdapter} from "@tsed/adapters";
|
|
8
8
|
{{/if}}
|
|
9
9
|
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"module": "NodeNext",
|
|
4
|
+
"target": "ESNext",
|
|
5
|
+
"experimentalDecorators": true,
|
|
6
|
+
"emitDecoratorMetadata": true,
|
|
7
|
+
"moduleResolution": "NodeNext",
|
|
8
|
+
"downlevelIteration": false,
|
|
9
|
+
"isolatedModules": false,
|
|
10
|
+
"suppressImplicitAnyIndexErrors": false,
|
|
11
|
+
"noImplicitAny": true,
|
|
12
|
+
"strictNullChecks": true,
|
|
13
|
+
"noUnusedLocals": false,
|
|
14
|
+
"noUnusedParameters": false,
|
|
15
|
+
"esModuleInterop": true,
|
|
16
|
+
"allowSyntheticDefaultImports": true,
|
|
17
|
+
"useDefineForClassFields": false,
|
|
18
|
+
"importHelpers": true,
|
|
19
|
+
"resolveJsonModule": true,
|
|
20
|
+
"newLine": "LF",
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"lib": ["ESNext", "esnext.asynciterable"],
|
|
23
|
+
"declaration": false,
|
|
24
|
+
"noResolve": false,
|
|
25
|
+
"preserveConstEnums": true,
|
|
26
|
+
"sourceMap": true,
|
|
27
|
+
"noEmit": true
|
|
28
|
+
}
|
|
29
|
+
}
|