@tsed/cli-core 6.1.11 → 6.1.13

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.
@@ -2,7 +2,6 @@ import { __decorate } from "tslib";
2
2
  import { URL } from "node:url";
3
3
  import { Configuration, Inject, inject, Injectable, refValue } from "@tsed/di";
4
4
  import { camelCase } from "change-case";
5
- import tunnel from "tunnel";
6
5
  import { coerce } from "../utils/coerce.js";
7
6
  import { CliExeca } from "./CliExeca.js";
8
7
  import { ProjectPackageJson } from "./ProjectPackageJson.js";
@@ -12,6 +11,9 @@ let CliProxyAgent = class CliProxyAgent {
12
11
  this.projectPackageJson = Inject(ProjectPackageJson);
13
12
  this.cliExeca = inject(CliExeca);
14
13
  }
14
+ async $onInit() {
15
+ this.tunnel = await import("tunnel");
16
+ }
15
17
  hasProxy() {
16
18
  return !!this.proxySettings.value.url;
17
19
  }
@@ -29,8 +31,8 @@ let CliProxyAgent = class CliProxyAgent {
29
31
  }
30
32
  };
31
33
  const method = camelCase([type, "over", protocol].join(" "));
32
- if (tunnel[method]) {
33
- return tunnel[method](options);
34
+ if (this.tunnel[method]) {
35
+ return this.tunnel[method](options);
34
36
  }
35
37
  }
36
38
  return null;
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
- // @ts-ignore
3
- import runScript from "@npmcli/run-script";
4
2
  import { inject, Injectable } from "@tsed/di";
5
3
  import { ProjectPackageJson } from "./ProjectPackageJson.js";
6
4
  let CliRunScript = class CliRunScript {
7
- run(cmd, args, options = {}) {
8
- return runScript({
5
+ async run(cmd, args, options = {}) {
6
+ // @ts-ignore
7
+ const mod = await import("@npmcli/run-script");
8
+ return (mod.default || mod)({
9
9
  event: "run",
10
10
  ...options,
11
11
  cmd: `${cmd} ${args.join(" ")}`,
@@ -9,6 +9,8 @@ export declare class CliProxyAgent {
9
9
  };
10
10
  protected projectPackageJson: any;
11
11
  protected cliExeca: CliExeca;
12
+ protected tunnel: typeof import("tunnel");
13
+ $onInit(): Promise<void>;
12
14
  hasProxy(): boolean;
13
15
  get(type: "http" | "https"): any;
14
16
  resolveProxySettings(): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  export declare class CliRunScript {
2
- run(cmd: string, args: string[], options?: any): any;
2
+ run(cmd: string, args: string[], options?: any): Promise<any>;
3
3
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tsed/cli-core",
3
3
  "description": "Build your CLI with TypeScript and Decorators",
4
- "version": "6.1.11",
4
+ "version": "6.1.13",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -34,7 +34,6 @@
34
34
  "@npmcli/run-script": "9.0.0",
35
35
  "@tsed/logger": ">=7.0.1",
36
36
  "@tsed/normalize-path": ">=7.14.2",
37
- "@types/fs-extra": "^11.0.4",
38
37
  "@types/inquirer": "^9.0.7",
39
38
  "ajv": "^8.17.1",
40
39
  "axios": "^1.7.7",
@@ -66,10 +65,11 @@
66
65
  "uuid": "^10.0.0"
67
66
  },
68
67
  "devDependencies": {
69
- "@tsed/typescript": "6.1.11",
68
+ "@tsed/typescript": "6.1.13",
70
69
  "@types/commander": "2.12.2",
71
70
  "@types/consolidate": "0.14.4",
72
71
  "@types/figures": "3.0.1",
72
+ "@types/fs-extra": "^11.0.4",
73
73
  "@types/globby": "9.1.0",
74
74
  "@types/js-yaml": "4.0.9",
75
75
  "@types/semver": "7.5.8",