@tsed/cli 6.1.8 → 6.1.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/commands/generate/GenerateCmd.js +2 -2
- package/lib/esm/commands/init/InitCmd.js +8 -1
- package/lib/esm/constants/index.js +1 -1
- package/lib/esm/pipes/ClassNamePipe.js +1 -1
- package/lib/esm/pipes/OutputFilePathPipe.js +1 -1
- package/lib/esm/runtimes/supports/BabelRuntime.js +1 -1
- package/lib/esm/runtimes/supports/WebpackRuntime.js +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/templates/generate/server.hbs +1 -1
- package/templates/init/src/config/index.ts.hbs +1 -1
- package/templates/init/tsconfig.spec.json.hbs +1 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
var GenerateCmd_1;
|
|
2
2
|
import { __decorate, __metadata } from "tslib";
|
|
3
|
-
import {
|
|
3
|
+
import { basename, dirname, join } from "node:path";
|
|
4
|
+
import { Command, Inject, ProjectPackageJson, SrcRendererService } from "@tsed/cli-core";
|
|
4
5
|
import { normalizePath } from "@tsed/normalize-path";
|
|
5
6
|
import { kebabCase, pascalCase } from "change-case";
|
|
6
7
|
import { globbySync } from "globby";
|
|
7
|
-
import { basename, dirname, join } from "path";
|
|
8
8
|
import { ProjectConvention } from "../../interfaces/ProjectConvention.js";
|
|
9
9
|
import { ClassNamePipe } from "../../pipes/ClassNamePipe.js";
|
|
10
10
|
import { OutputFilePathPipe } from "../../pipes/OutputFilePathPipe.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import { basename, join } from "node:path";
|
|
2
3
|
import { CliExeca, CliFs, CliLoadFile, cliPackageJson, CliPlugins, CliService, Command, Configuration, createSubTasks, createTasksRunner, inject, PackageManager, PackageManagersModule, ProjectPackageJson, RootRendererService } from "@tsed/cli-core";
|
|
3
4
|
import { kebabCase, pascalCase } from "change-case";
|
|
4
|
-
import { basename, join } from "path";
|
|
5
5
|
import { DEFAULT_TSED_TAGS } from "../../constants/index.js";
|
|
6
6
|
import { ArchitectureConvention } from "../../interfaces/ArchitectureConvention.js";
|
|
7
7
|
import { PlatformType } from "../../interfaces/index.js";
|
|
@@ -213,6 +213,13 @@ let InitCmd = class InitCmd {
|
|
|
213
213
|
}
|
|
214
214
|
addScripts(ctx) {
|
|
215
215
|
this.packageJson.addScripts(this.runtimes.scripts(ctx));
|
|
216
|
+
if (ctx.eslint || ctx.testing) {
|
|
217
|
+
const runtime = this.runtimes.get();
|
|
218
|
+
const scripts = {
|
|
219
|
+
test: [ctx.eslint && runtime.run("test:lint"), ctx.testing && runtime.run("test:coverage")].filter(Boolean).join("&&")
|
|
220
|
+
};
|
|
221
|
+
this.packageJson.addScripts(scripts);
|
|
222
|
+
}
|
|
216
223
|
}
|
|
217
224
|
addDependencies(ctx) {
|
|
218
225
|
this.packageJson.addDependencies({
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import { basename } from "node:path";
|
|
2
3
|
import { ProjectPackageJson } from "@tsed/cli-core";
|
|
3
4
|
import { inject, Injectable } from "@tsed/di";
|
|
4
5
|
import { kebabCase, pascalCase } from "change-case";
|
|
5
|
-
import { basename } from "path";
|
|
6
6
|
import { ProjectConvention } from "../interfaces/ProjectConvention.js";
|
|
7
7
|
import { ProvidersInfoService } from "../services/ProvidersInfoService.js";
|
|
8
8
|
let ClassNamePipe = class ClassNamePipe {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import { dirname, join } from "node:path";
|
|
2
3
|
import { inject, Injectable, ProjectPackageJson } from "@tsed/cli-core";
|
|
3
4
|
import { Inject } from "@tsed/di";
|
|
4
|
-
import { dirname, join } from "path";
|
|
5
5
|
import { ArchitectureConvention, ProjectConvention } from "../interfaces/index.js";
|
|
6
6
|
import { ProvidersInfoService } from "../services/ProvidersInfoService.js";
|
|
7
7
|
import { ClassNamePipe } from "./ClassNamePipe.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import { dirname } from "node:path";
|
|
2
3
|
import { Injectable } from "@tsed/di";
|
|
3
|
-
import { dirname } from "path";
|
|
4
4
|
import { NodeRuntime } from "./NodeRuntime.js";
|
|
5
5
|
let BabelRuntime = class BabelRuntime extends NodeRuntime {
|
|
6
6
|
constructor() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
+
import { dirname } from "node:path";
|
|
2
3
|
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
6
|
constructor() {
|