@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
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Injectable } from "@tsed/cli-core";
|
|
3
|
-
import {
|
|
3
|
+
import { kebabCase } from "change-case";
|
|
4
4
|
let RoutePipe = class RoutePipe {
|
|
5
5
|
transform(route) {
|
|
6
6
|
const r = route
|
|
7
7
|
.split("/")
|
|
8
8
|
.reduce((paths, path) => {
|
|
9
|
-
const word =
|
|
9
|
+
const word = kebabCase(path);
|
|
10
10
|
if (paths.includes(`${word}s`) || paths.includes(word)) {
|
|
11
11
|
return paths;
|
|
12
12
|
}
|
|
13
|
-
return [...paths,
|
|
13
|
+
return [...paths, kebabCase(path)];
|
|
14
14
|
}, [])
|
|
15
15
|
.join("/");
|
|
16
16
|
return `/${r}`.replace(/\/\//gi, "/");
|
|
@@ -20,4 +20,3 @@ RoutePipe = __decorate([
|
|
|
20
20
|
Injectable()
|
|
21
21
|
], RoutePipe);
|
|
22
22
|
export { RoutePipe };
|
|
23
|
-
//# sourceMappingURL=RoutePipe.js.map
|
package/lib/esm/pipes/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
|
+
import { Inject } from "@tsed/cli-core";
|
|
2
3
|
import { Module } from "@tsed/di";
|
|
3
4
|
import { InitExpressPlatform } from "./supports/InitExpressPlatform.js";
|
|
4
5
|
import { InitKoaPlatform } from "./supports/InitKoaPlatform.js";
|
|
5
|
-
import { Inject } from "@tsed/cli-core";
|
|
6
6
|
let InitPlatformsModule = class InitPlatformsModule {
|
|
7
|
-
platforms;
|
|
8
7
|
constructor(platforms) {
|
|
9
8
|
this.platforms = platforms;
|
|
10
9
|
}
|
|
@@ -20,4 +19,3 @@ InitPlatformsModule = __decorate([
|
|
|
20
19
|
__metadata("design:paramtypes", [Array])
|
|
21
20
|
], InitPlatformsModule);
|
|
22
21
|
export { InitPlatformsModule };
|
|
23
|
-
//# sourceMappingURL=InitPlatformsModule.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Injectable } from "@tsed/cli-core";
|
|
3
3
|
let InitExpressPlatform = class InitExpressPlatform {
|
|
4
|
-
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = "express";
|
|
6
|
+
}
|
|
5
7
|
dependencies(ctx) {
|
|
6
8
|
return {
|
|
7
9
|
"@tsed/platform-express": ctx.tsedVersion,
|
|
@@ -29,4 +31,3 @@ InitExpressPlatform = __decorate([
|
|
|
29
31
|
})
|
|
30
32
|
], InitExpressPlatform);
|
|
31
33
|
export { InitExpressPlatform };
|
|
32
|
-
//# sourceMappingURL=InitExpressPlatform.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Injectable } from "@tsed/cli-core";
|
|
3
3
|
let InitKoaPlatform = class InitKoaPlatform {
|
|
4
|
-
|
|
4
|
+
constructor() {
|
|
5
|
+
this.name = "koa";
|
|
6
|
+
}
|
|
5
7
|
dependencies(ctx) {
|
|
6
8
|
return {
|
|
7
9
|
"@tsed/platform-koa": ctx.tsedVersion,
|
|
@@ -33,4 +35,3 @@ InitKoaPlatform = __decorate([
|
|
|
33
35
|
})
|
|
34
36
|
], InitKoaPlatform);
|
|
35
37
|
export { InitKoaPlatform };
|
|
36
|
-
//# sourceMappingURL=InitKoaPlatform.js.map
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { __decorate, __metadata, __param } from "tslib";
|
|
2
2
|
import { PackageManagersModule, ProjectPackageJson } from "@tsed/cli-core";
|
|
3
3
|
import { Inject, Module } from "@tsed/di";
|
|
4
|
-
import { NodeRuntime } from "./supports/NodeRuntime.js";
|
|
5
4
|
import { BabelRuntime } from "./supports/BabelRuntime.js";
|
|
6
|
-
import {
|
|
5
|
+
import { BaseRuntime } from "./supports/BaseRuntime.js";
|
|
7
6
|
import { BunRuntime } from "./supports/BunRuntime.js";
|
|
8
|
-
import {
|
|
7
|
+
import { NodeRuntime } from "./supports/NodeRuntime.js";
|
|
8
|
+
import { WebpackRuntime } from "./supports/WebpackRuntime.js";
|
|
9
9
|
let RuntimesModule = class RuntimesModule {
|
|
10
|
-
runtimes;
|
|
11
|
-
projectPackageJson;
|
|
12
|
-
packagesManager;
|
|
13
10
|
constructor(runtimes) {
|
|
14
11
|
this.runtimes = runtimes;
|
|
15
12
|
this.runtimes = runtimes.filter((manager) => manager.has());
|
|
@@ -39,7 +36,7 @@ let RuntimesModule = class RuntimesModule {
|
|
|
39
36
|
const runtime = this.get(ctx.runtime);
|
|
40
37
|
return {
|
|
41
38
|
build: `${runtime.run("barrels")} && ${runtime.compile("src/index.ts", "dist/index.js")}`,
|
|
42
|
-
barrels: "
|
|
39
|
+
barrels: "barrels",
|
|
43
40
|
start: `${runtime.run("barrels")} && ${runtime.startDev("src/index.ts")}`,
|
|
44
41
|
"start:prod": `cross-env NODE_ENV=production ${runtime.startProd("dist/index.js")}`
|
|
45
42
|
};
|
|
@@ -55,10 +52,9 @@ __decorate([
|
|
|
55
52
|
], RuntimesModule.prototype, "packagesManager", void 0);
|
|
56
53
|
RuntimesModule = __decorate([
|
|
57
54
|
Module({
|
|
58
|
-
imports: [NodeRuntime, BabelRuntime, WebpackRuntime,
|
|
55
|
+
imports: [NodeRuntime, BabelRuntime, WebpackRuntime, BunRuntime]
|
|
59
56
|
}),
|
|
60
57
|
__param(0, Inject("runtime")),
|
|
61
58
|
__metadata("design:paramtypes", [Array])
|
|
62
59
|
], RuntimesModule);
|
|
63
60
|
export { RuntimesModule };
|
|
64
|
-
//# sourceMappingURL=RuntimesModule.js.map
|
|
@@ -3,6 +3,4 @@ export * from "./supports/BabelRuntime.js";
|
|
|
3
3
|
export * from "./supports/BaseRuntime.js";
|
|
4
4
|
export * from "./supports/BunRuntime.js";
|
|
5
5
|
export * from "./supports/NodeRuntime.js";
|
|
6
|
-
export * from "./supports/SWCRuntime.js";
|
|
7
6
|
export * from "./supports/WebpackRuntime.js";
|
|
8
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,25 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { Injectable } from "@tsed/di";
|
|
3
|
-
import { NodeRuntime } from "./NodeRuntime.js";
|
|
4
3
|
import { dirname } from "path";
|
|
4
|
+
import { NodeRuntime } from "./NodeRuntime.js";
|
|
5
5
|
let BabelRuntime = class BabelRuntime extends NodeRuntime {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = "babel";
|
|
9
|
+
this.order = 1;
|
|
10
|
+
}
|
|
11
|
+
isCompiled() {
|
|
12
|
+
return false;
|
|
13
|
+
}
|
|
8
14
|
files() {
|
|
9
15
|
return ["/init/.babelrc.hbs"];
|
|
10
16
|
}
|
|
11
17
|
startDev(main) {
|
|
12
18
|
return `babel-watch --extensions .ts ${main}`;
|
|
13
19
|
}
|
|
20
|
+
startProd(args) {
|
|
21
|
+
return `${this.cmd} ${args}`;
|
|
22
|
+
}
|
|
14
23
|
compile(src, out) {
|
|
15
24
|
return `tsc && babel ${dirname(src)} --out-dir ${dirname(out)} --extensions ".ts,.tsx" --source-maps inline`;
|
|
16
25
|
}
|
|
@@ -25,7 +34,8 @@ let BabelRuntime = class BabelRuntime extends NodeRuntime {
|
|
|
25
34
|
"@babel/preset-typescript": "latest",
|
|
26
35
|
"@babel/plugin-proposal-object-rest-spread": "latest",
|
|
27
36
|
"babel-plugin-transform-typescript-metadata": "latest",
|
|
28
|
-
"babel-watch": "latest"
|
|
37
|
+
"babel-watch": "latest",
|
|
38
|
+
typescript: "latest"
|
|
29
39
|
};
|
|
30
40
|
}
|
|
31
41
|
};
|
|
@@ -35,4 +45,3 @@ BabelRuntime = __decorate([
|
|
|
35
45
|
})
|
|
36
46
|
], BabelRuntime);
|
|
37
47
|
export { BabelRuntime };
|
|
38
|
-
//# sourceMappingURL=BabelRuntime.js.map
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { __decorate, __metadata } from "tslib";
|
|
2
|
-
import { Inject } from "@tsed/di";
|
|
3
2
|
import { CliExeca, PackageManagersModule } from "@tsed/cli-core";
|
|
3
|
+
import { Inject } from "@tsed/di";
|
|
4
4
|
export class BaseRuntime {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
constructor() {
|
|
6
|
+
this.order = 10;
|
|
7
|
+
}
|
|
8
8
|
get packageManager() {
|
|
9
9
|
return this.packageManagers.get();
|
|
10
10
|
}
|
|
11
|
+
isCompiled() {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
11
14
|
files() {
|
|
12
15
|
return [];
|
|
13
16
|
}
|
|
@@ -38,4 +41,3 @@ __decorate([
|
|
|
38
41
|
Inject(CliExeca),
|
|
39
42
|
__metadata("design:type", CliExeca)
|
|
40
43
|
], BaseRuntime.prototype, "cliExeca", void 0);
|
|
41
|
-
//# sourceMappingURL=BaseRuntime.js.map
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BaseRuntime } from "./BaseRuntime.js";
|
|
3
2
|
import { Injectable } from "@tsed/di";
|
|
3
|
+
import { BaseRuntime } from "./BaseRuntime.js";
|
|
4
4
|
let BunRuntime = class BunRuntime extends BaseRuntime {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.name = "bun";
|
|
8
|
+
this.cmd = "bun";
|
|
9
|
+
this.order = 4;
|
|
10
|
+
}
|
|
8
11
|
compile(src, out) {
|
|
9
12
|
return `${this.cmd} build --target=bun ${src} --outfile=${out}`;
|
|
10
13
|
}
|
|
@@ -14,6 +17,11 @@ let BunRuntime = class BunRuntime extends BaseRuntime {
|
|
|
14
17
|
startProd(args) {
|
|
15
18
|
return `${this.cmd} ${args}`;
|
|
16
19
|
}
|
|
20
|
+
dependencies() {
|
|
21
|
+
return {
|
|
22
|
+
typescript: "latest"
|
|
23
|
+
};
|
|
24
|
+
}
|
|
17
25
|
};
|
|
18
26
|
BunRuntime = __decorate([
|
|
19
27
|
Injectable({
|
|
@@ -21,4 +29,3 @@ BunRuntime = __decorate([
|
|
|
21
29
|
})
|
|
22
30
|
], BunRuntime);
|
|
23
31
|
export { BunRuntime };
|
|
24
|
-
//# sourceMappingURL=BunRuntime.js.map
|
|
@@ -1,24 +1,38 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { BaseRuntime } from "./BaseRuntime.js";
|
|
3
2
|
import { Injectable } from "@tsed/di";
|
|
3
|
+
import { BaseRuntime } from "./BaseRuntime.js";
|
|
4
4
|
let NodeRuntime = class NodeRuntime extends BaseRuntime {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"ts-node": "latest",
|
|
11
|
-
"ts-node-dev": "latest"
|
|
12
|
-
};
|
|
5
|
+
constructor() {
|
|
6
|
+
super(...arguments);
|
|
7
|
+
this.name = "node";
|
|
8
|
+
this.cmd = "node";
|
|
9
|
+
this.order = 0;
|
|
13
10
|
}
|
|
14
|
-
|
|
15
|
-
return
|
|
11
|
+
files() {
|
|
12
|
+
return ["/init/.swcrc.hbs", "/init/nodemon.json.hbs"];
|
|
16
13
|
}
|
|
17
14
|
startDev(main) {
|
|
18
|
-
return `
|
|
15
|
+
return `nodemon ${main}`;
|
|
19
16
|
}
|
|
20
|
-
startProd(
|
|
21
|
-
return `${this.cmd} ${
|
|
17
|
+
startProd(main) {
|
|
18
|
+
return `${this.cmd} --import @swc-node/register/register-esm ${main.replace("dist", "src")}`;
|
|
19
|
+
}
|
|
20
|
+
compile(src, out) {
|
|
21
|
+
return `swc ${src.replace("/index.ts", "")} --out-dir ${out.replace("/index.js", "")} -s`;
|
|
22
|
+
}
|
|
23
|
+
dependencies() {
|
|
24
|
+
return {
|
|
25
|
+
"@swc/core": "latest",
|
|
26
|
+
"@swc/cli": "latest",
|
|
27
|
+
"@swc/helpers": "latest",
|
|
28
|
+
"@swc-node/register": "latest",
|
|
29
|
+
typescript: "latest"
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
devDependencies() {
|
|
33
|
+
return {
|
|
34
|
+
nodemon: "latest"
|
|
35
|
+
};
|
|
22
36
|
}
|
|
23
37
|
};
|
|
24
38
|
NodeRuntime = __decorate([
|
|
@@ -27,4 +41,3 @@ NodeRuntime = __decorate([
|
|
|
27
41
|
})
|
|
28
42
|
], NodeRuntime);
|
|
29
43
|
export { NodeRuntime };
|
|
30
|
-
//# sourceMappingURL=NodeRuntime.js.map
|
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { dirname } from "path";
|
|
3
2
|
import { Injectable } from "@tsed/di";
|
|
3
|
+
import { dirname } from "path";
|
|
4
4
|
import { BabelRuntime } from "./BabelRuntime.js";
|
|
5
5
|
let WebpackRuntime = class WebpackRuntime extends BabelRuntime {
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.name = "webpack";
|
|
9
|
+
this.order = 2;
|
|
10
|
+
}
|
|
11
|
+
isCompiled() {
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
8
14
|
files() {
|
|
9
15
|
return [...super.files(), "/init/webpack.config.js.hbs"];
|
|
10
16
|
}
|
|
@@ -17,6 +23,7 @@ let WebpackRuntime = class WebpackRuntime extends BabelRuntime {
|
|
|
17
23
|
devDependencies() {
|
|
18
24
|
return {
|
|
19
25
|
...super.devDependencies(),
|
|
26
|
+
typescript: "latest",
|
|
20
27
|
"babel-loader": "latest",
|
|
21
28
|
webpack: "latest",
|
|
22
29
|
"webpack-cli": "latest"
|
|
@@ -29,4 +36,3 @@ WebpackRuntime = __decorate([
|
|
|
29
36
|
})
|
|
30
37
|
], WebpackRuntime);
|
|
31
38
|
export { WebpackRuntime };
|
|
32
|
-
//# sourceMappingURL=WebpackRuntime.js.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { Injectable, nameOf } from "@tsed/cli-core";
|
|
2
|
+
import { Injectable, nameOf, Type } from "@tsed/cli-core";
|
|
3
3
|
let ProvidersInfoService = class ProvidersInfoService {
|
|
4
|
-
|
|
4
|
+
constructor() {
|
|
5
|
+
this.map = new Map();
|
|
6
|
+
}
|
|
5
7
|
/**
|
|
6
8
|
*
|
|
7
9
|
* @param providerInfo
|
|
@@ -42,4 +44,3 @@ ProvidersInfoService = __decorate([
|
|
|
42
44
|
Injectable()
|
|
43
45
|
], ProvidersInfoService);
|
|
44
46
|
export { ProvidersInfoService };
|
|
45
|
-
//# sourceMappingURL=ProvidersInfoService.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ArchitectureConvention, PlatformType } from "../interfaces.js";
|
|
1
|
+
import { ArchitectureConvention, PlatformType } from "../interfaces/index.js";
|
|
2
2
|
export function fillImports(ctx) {
|
|
3
3
|
ctx = { ...ctx };
|
|
4
4
|
Object.values(PlatformType).forEach((type) => {
|
|
@@ -21,16 +21,15 @@ export function fillImports(ctx) {
|
|
|
21
21
|
ctx.oidc && { from: "@tsed/oidc-provider" },
|
|
22
22
|
ctx.passportjs && { from: "@tsed/passport" },
|
|
23
23
|
ctx.graphql && { from: "@tsed/typegraphql" },
|
|
24
|
-
ctx.graphql && { from: "./datasources/index" },
|
|
25
|
-
ctx.graphql && { from: "./resolvers/index" },
|
|
26
|
-
{ symbols: "{config}", from: "./config/index" },
|
|
27
|
-
{ symbols: "* as rest", from: isFeature ? "./rest/index" : "./controllers/rest/index" },
|
|
24
|
+
ctx.graphql && { from: "./datasources/index.js" },
|
|
25
|
+
ctx.graphql && { from: "./resolvers/index.js" },
|
|
26
|
+
{ symbols: "{config}", from: "./config/index.js" },
|
|
27
|
+
{ symbols: "* as rest", from: isFeature ? "./rest/index.js" : "./controllers/rest/index.js" },
|
|
28
28
|
(ctx.swagger || ctx.oidc) && {
|
|
29
29
|
symbols: "* as pages",
|
|
30
|
-
from: isFeature ? "./pages/index" : "./controllers/pages/index"
|
|
30
|
+
from: isFeature ? "./pages/index.js" : "./controllers/pages/index.js"
|
|
31
31
|
},
|
|
32
|
-
ctx.oidc && { symbols: "{InteractionsController}", from: "./controllers/oidc/InteractionsController" }
|
|
32
|
+
ctx.oidc && { symbols: "{InteractionsController}", from: "./controllers/oidc/InteractionsController.js" }
|
|
33
33
|
].filter(Boolean);
|
|
34
34
|
return ctx;
|
|
35
35
|
}
|
|
36
|
-
//# sourceMappingURL=fillImports.js.map
|