@tsed/cli-core 6.1.13 → 6.2.0-beta.1

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,6 +2,7 @@ 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";
5
6
  import { coerce } from "../utils/coerce.js";
6
7
  import { CliExeca } from "./CliExeca.js";
7
8
  import { ProjectPackageJson } from "./ProjectPackageJson.js";
@@ -11,9 +12,6 @@ let CliProxyAgent = class CliProxyAgent {
11
12
  this.projectPackageJson = Inject(ProjectPackageJson);
12
13
  this.cliExeca = inject(CliExeca);
13
14
  }
14
- async $onInit() {
15
- this.tunnel = await import("tunnel");
16
- }
17
15
  hasProxy() {
18
16
  return !!this.proxySettings.value.url;
19
17
  }
@@ -31,8 +29,8 @@ let CliProxyAgent = class CliProxyAgent {
31
29
  }
32
30
  };
33
31
  const method = camelCase([type, "over", protocol].join(" "));
34
- if (this.tunnel[method]) {
35
- return this.tunnel[method](options);
32
+ if (tunnel[method]) {
33
+ return tunnel[method](options);
36
34
  }
37
35
  }
38
36
  return null;
@@ -1,11 +1,11 @@
1
1
  import { __decorate } from "tslib";
2
+ // @ts-ignore
3
+ import runScript from "@npmcli/run-script";
2
4
  import { inject, Injectable } from "@tsed/di";
3
5
  import { ProjectPackageJson } from "./ProjectPackageJson.js";
4
6
  let CliRunScript = class CliRunScript {
5
- async run(cmd, args, options = {}) {
6
- // @ts-ignore
7
- const mod = await import("@npmcli/run-script");
8
- return (mod.default || mod)({
7
+ run(cmd, args, options = {}) {
8
+ return runScript({
9
9
  event: "run",
10
10
  ...options,
11
11
  cmd: `${cmd} ${args.join(" ")}`,
@@ -9,8 +9,6 @@ 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>;
14
12
  hasProxy(): boolean;
15
13
  get(type: "http" | "https"): any;
16
14
  resolveProxySettings(): Promise<void>;
@@ -1,3 +1,3 @@
1
1
  export declare class CliRunScript {
2
- run(cmd: string, args: string[], options?: any): Promise<any>;
2
+ run(cmd: string, args: string[], options?: any): 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.13",
4
+ "version": "6.2.0-beta.1",
5
5
  "type": "module",
6
6
  "main": "./lib/esm/index.js",
7
7
  "source": "./src/index.ts",
@@ -34,6 +34,7 @@
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",
37
38
  "@types/inquirer": "^9.0.7",
38
39
  "ajv": "^8.17.1",
39
40
  "axios": "^1.7.7",
@@ -65,11 +66,10 @@
65
66
  "uuid": "^10.0.0"
66
67
  },
67
68
  "devDependencies": {
68
- "@tsed/typescript": "6.1.13",
69
+ "@tsed/typescript": "6.2.0-beta.1",
69
70
  "@types/commander": "2.12.2",
70
71
  "@types/consolidate": "0.14.4",
71
72
  "@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",
@@ -104,5 +104,8 @@
104
104
  },
105
105
  "homepage": "https://github.com/tsedio/tsed-cli/tree/master/packages/cli-core",
106
106
  "author": "Romain Lenzotti",
107
- "license": "MIT"
107
+ "license": "MIT",
108
+ "publishConfig": {
109
+ "tag": "beta"
110
+ }
108
111
  }