@tsed/cli 7.0.0-beta.1 → 7.0.0-beta.2
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/init/InitCmd.js +2 -2
- package/lib/esm/services/CliProjectService.js +4 -2
- package/lib/esm/services/CliTemplatesService.js +3 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/types/services/CliProjectService.d.ts +1 -1
- package/lib/types/services/CliTemplatesService.d.ts +1 -1
- package/package.json +13 -10
|
@@ -115,7 +115,7 @@ export class InitCmd {
|
|
|
115
115
|
ctx.runtime && this.packageJson.setPreference("runtime", ctx.runtime);
|
|
116
116
|
ctx.architecture && this.packageJson.setPreference("architecture", ctx.architecture);
|
|
117
117
|
ctx.convention && this.packageJson.setPreference("convention", ctx.convention);
|
|
118
|
-
ctx.platform && this.packageJson.setPreference("platform", ctx.
|
|
118
|
+
ctx.platform && this.packageJson.setPreference("platform", ctx.platform);
|
|
119
119
|
ctx.GH_TOKEN && this.packageJson.setGhToken(ctx.GH_TOKEN);
|
|
120
120
|
await createTasksRunner([
|
|
121
121
|
{
|
|
@@ -230,7 +230,7 @@ export class InitCmd {
|
|
|
230
230
|
if (ctx.eslint || ctx.testing) {
|
|
231
231
|
const runtime = this.runtimes.get();
|
|
232
232
|
const scripts = {
|
|
233
|
-
test: [ctx.eslint && runtime.run("test:lint"), ctx.testing && runtime.run("test:coverage")].filter(Boolean).join("&&")
|
|
233
|
+
test: [ctx.eslint && runtime.run("test:lint"), ctx.testing && runtime.run("test:coverage")].filter(Boolean).join(" && ")
|
|
234
234
|
};
|
|
235
235
|
this.packageJson.addScripts(scripts);
|
|
236
236
|
}
|
|
@@ -15,7 +15,9 @@ import { CliTemplatesService } from "./CliTemplatesService.js";
|
|
|
15
15
|
export class CliProjectService {
|
|
16
16
|
constructor() {
|
|
17
17
|
this.templates = inject(CliTemplatesService);
|
|
18
|
-
|
|
18
|
+
}
|
|
19
|
+
get rootDir() {
|
|
20
|
+
return constant("project.rootDir", "");
|
|
19
21
|
}
|
|
20
22
|
get srcDir() {
|
|
21
23
|
return join(...[this.rootDir, constant("project.srcDir")].filter(Boolean));
|
|
@@ -32,7 +34,7 @@ export class CliProjectService {
|
|
|
32
34
|
this.project = new ProjectClient({
|
|
33
35
|
rootDir: this.rootDir
|
|
34
36
|
});
|
|
35
|
-
const files = fs.globSync(["!**/node_modules/**", join(
|
|
37
|
+
const files = fs.globSync(["!**/node_modules/**", join(this.rootDir, "**/*.ts")]);
|
|
36
38
|
files.forEach((file) => {
|
|
37
39
|
this.project.createSourceFile(file, fs.readFileSync(file, "utf8"), {
|
|
38
40
|
overwrite: true
|
|
@@ -6,11 +6,13 @@ import { TEMPLATE_DIR } from "../constants/index.js";
|
|
|
6
6
|
import { mapDefaultTemplateOptions } from "./mappers/mapDefaultTemplateOptions.js";
|
|
7
7
|
export class CliTemplatesService {
|
|
8
8
|
constructor() {
|
|
9
|
-
this.rootDir = constant("project.rootDir", process.cwd());
|
|
10
9
|
this.fs = inject(CliFs);
|
|
11
10
|
this.renderedFiles = [];
|
|
12
11
|
}
|
|
13
12
|
#customTemplates;
|
|
13
|
+
get rootDir() {
|
|
14
|
+
return constant("project.rootDir", "");
|
|
15
|
+
}
|
|
14
16
|
get srcDir() {
|
|
15
17
|
return join(...[this.rootDir, constant("project.srcDir")].filter(Boolean));
|
|
16
18
|
}
|