@tsed/cli 3.11.3 → 3.11.7

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.
@@ -5,12 +5,11 @@ const tslib_1 = require("tslib");
5
5
  const cli_core_1 = require("@tsed/cli-core");
6
6
  const di_1 = require("@tsed/di");
7
7
  const path_1 = require("path");
8
- const core_1 = require("@tsed/core");
9
8
  let RunCmd = class RunCmd {
10
9
  async $exec(ctx) {
11
10
  const cmd = ctx.production ? "node" : "ts-node";
12
11
  const args = ctx.production ? [] : ["-r", "tsconfig-paths/register"];
13
- const path = core_1.normalizePath(ctx.production ? path_1.join(await this.getCompilePath(), "bin/index.js") : "src/bin/index.ts");
12
+ const path = cli_core_1.normalizePath(ctx.production ? path_1.join(await this.getCompilePath(), "bin/index.js") : "src/bin/index.ts");
14
13
  const env = {
15
14
  ...process.env
16
15
  };
@@ -1 +1 @@
1
- {"version":3,"file":"RunCmd.js","sourceRoot":"","sources":["../../../src/commands/run/RunCmd.ts"],"names":[],"mappings":";;;;AAAA,6CAAwG;AACxG,iCAAgC;AAChC,+BAA0B;AAC1B,qCAAyC;AA2BzC,IAAa,MAAM,GAAnB,MAAa,MAAM;IAUjB,KAAK,CAAC,KAAK,CAAC,GAAkB;QAC5B,MAAM,GAAG,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;QAChD,MAAM,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,yBAAyB,CAAC,CAAC;QACrE,MAAM,IAAI,GAAG,oBAAa,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,WAAI,CAAC,MAAM,IAAI,CAAC,cAAc,EAAE,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;QACpH,MAAM,GAAG,GAAQ;YACf,GAAG,OAAO,CAAC,GAAG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F;QACD,kBAAkB,EAAE,IAAI;KACzB,CAAC;GACW,MAAM,CAwClB;AAxCY,wBAAM","sourcesContent":["import {CliFs, CliRunScript, Command, CommandProvider, ProjectPackageJson, Tasks} from \"@tsed/cli-core\";\nimport {Inject} from \"@tsed/di\";\nimport {join} from \"path\";\nimport {normalizePath} from \"@tsed/core\";\n\nexport interface RunCmdContext {\n production: boolean;\n command: string;\n rawArgs: string[];\n}\n\n@Command({\n name: \"run\",\n description: \"Run a project level command\",\n args: {\n command: {\n description: \"The project command\",\n type: String,\n required: true\n }\n },\n options: {\n \"-p, --production\": {\n type: Boolean,\n defaultValue: false,\n description: \"Set production profile to NODE_ENV\"\n }\n },\n allowUnknownOption: true\n})\nexport class RunCmd implements CommandProvider {\n @Inject()\n fs: CliFs;\n\n @Inject()\n projectPackageJson: ProjectPackageJson;\n\n @Inject()\n runScript: CliRunScript;\n\n async $exec(ctx: RunCmdContext): Promise<Tasks> {\n const cmd = ctx.production ? \"node\" : \"ts-node\";\n const args = ctx.production ? [] : [\"-r\", \"tsconfig-paths/register\"];\n const path = normalizePath(ctx.production ? join(await this.getCompilePath(), \"bin/index.js\") : \"src/bin/index.ts\");\n const env: any = {\n ...process.env\n };\n\n if (ctx.production) {\n env.NODE_ENV = \"production\";\n }\n\n await this.runScript.run(cmd, [...args, path, ctx.command, ...ctx.rawArgs], {\n env\n });\n\n return [];\n }\n\n protected async getCompilePath() {\n const {dir} = this.projectPackageJson;\n const tsConfigPath = join(dir, \"tsconfig.compile.json\");\n\n if (this.fs.exists(tsConfigPath)) {\n const content = JSON.parse(await this.fs.readFile(tsConfigPath, \"utf8\"));\n return content.compilerOptions.outDir;\n }\n\n return \"./dist\";\n }\n}\n"]}
1
+ {"version":3,"file":"RunCmd.js","sourceRoot":"","sources":["../../../src/commands/run/RunCmd.ts"],"names":[],"mappings":";;;;AAAA,6CAAuH;AACvH,iCAAgC;AAChC,+BAA0B;AA2B1B,IAAa,MAAM,GAAnB,MAAa,MAAM;IAUj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,CAAC;CACF,CAAA;AAtCC;IADC,WAAM,EAAE;sCACL,gBAAK;kCAAC;AAGV;IADC,WAAM,EAAE;sCACW,6BAAkB;kDAAC;AAGvC;IADC,WAAM,EAAE;sCACE,uBAAY;yCAAC;AARb,MAAM;IAnBlB,kBAAO,CAAC;QACP,IAAI,EAAE,KAAK;QACX,WAAW,EAAE,6BAA6B;QAC1C,IAAI,EAAE;YACJ,OAAO,EAAE;gBACP,WAAW,EAAE,qBAAqB;gBAClC,IAAI,EAAE,MAAM;gBACZ,QAAQ,EAAE,IAAI;aACf;SACF;QACD,OAAO,EAAE;YACP,kBAAkB,EAAE;gBAClB,IAAI,EAAE,OAAO;gBACb,YAAY,EAAE,KAAK;gBACnB,WAAW,EAAE,oCAAoC;aAClD;SACF;QACD,kBAAkB,EAAE,IAAI;KACzB,CAAC;GACW,MAAM,CAwClB;AAxCY,wBAAM","sourcesContent":["import {CliFs, CliRunScript, Command, CommandProvider, ProjectPackageJson, Tasks, normalizePath} from \"@tsed/cli-core\";\nimport {Inject} from \"@tsed/di\";\nimport {join} from \"path\";\n\nexport interface RunCmdContext {\n production: boolean;\n command: string;\n rawArgs: string[];\n}\n\n@Command({\n name: \"run\",\n description: \"Run a project level command\",\n args: {\n command: {\n description: \"The project command\",\n type: String,\n required: true\n }\n },\n options: {\n \"-p, --production\": {\n type: Boolean,\n defaultValue: false,\n description: \"Set production profile to NODE_ENV\"\n }\n },\n allowUnknownOption: true\n})\nexport class RunCmd implements CommandProvider {\n @Inject()\n fs: CliFs;\n\n @Inject()\n projectPackageJson: ProjectPackageJson;\n\n @Inject()\n runScript: CliRunScript;\n\n async $exec(ctx: RunCmdContext): Promise<Tasks> {\n const cmd = ctx.production ? \"node\" : \"ts-node\";\n const args = ctx.production ? [] : [\"-r\", \"tsconfig-paths/register\"];\n const path = normalizePath(ctx.production ? join(await this.getCompilePath(), \"bin/index.js\") : \"src/bin/index.ts\");\n const env: any = {\n ...process.env\n };\n\n if (ctx.production) {\n env.NODE_ENV = \"production\";\n }\n\n await this.runScript.run(cmd, [...args, path, ctx.command, ...ctx.rawArgs], {\n env\n });\n\n return [];\n }\n\n protected async getCompilePath() {\n const {dir} = this.projectPackageJson;\n const tsConfigPath = join(dir, \"tsconfig.compile.json\");\n\n if (this.fs.exists(tsConfigPath)) {\n const content = JSON.parse(await this.fs.readFile(tsConfigPath, \"utf8\"));\n return content.compilerOptions.outDir;\n }\n\n return \"./dist\";\n }\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsed/cli",
3
- "version": "3.11.3",
3
+ "version": "3.11.7",
4
4
  "main": "./lib/index.js",
5
5
  "typings": "./lib/index.d.ts",
6
6
  "bin": {
@@ -24,15 +24,16 @@
24
24
  "decorators"
25
25
  ],
26
26
  "dependencies": {
27
- "@tsed/cli-core": "3.11.3",
27
+ "@tsed/cli-core": "3.11.7",
28
+ "@tsed/core": "^6.70.1",
29
+ "@tsed/di": "^6.70.1",
28
30
  "@tsed/logger": "5.17.0",
29
31
  "change-case": "4.1.2",
30
32
  "normalize-path": "3.0.0",
31
33
  "tslib": "2.3.1"
32
34
  },
33
35
  "devDependencies": {
34
- "@tsed/cli-testing": "3.11.3",
35
- "@tsed/core": "6.62.4",
36
+ "@tsed/cli-testing": "3.11.7",
36
37
  "@types/change-case": "^2.3.1"
37
38
  },
38
39
  "scripts": {