@tsed/cli-core 3.20.12 → 3.20.15

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/index.js CHANGED
@@ -176,14 +176,13 @@ exports.CliExeca = class CliExeca {
176
176
  constructor() {
177
177
  this.raw = execa__default['default'];
178
178
  }
179
+
179
180
  /**
180
181
  *
181
182
  * @param cmd
182
183
  * @param args
183
184
  * @param opts
184
185
  */
185
-
186
-
187
186
  run(cmd, args, opts) {
188
187
  const cp = this.raw(cmd, args, opts);
189
188
  const stdout = streamToObservable(cp.stdout.pipe(split()), {
@@ -370,9 +369,14 @@ function defaultPreferences(pkg) {
370
369
 
371
370
  exports.ProjectPackageJson = class ProjectPackageJson {
372
371
  constructor(configuration) {
373
- this.configuration = configuration;
372
+ this.configuration = void 0;
374
373
  this.rewrite = false;
375
374
  this.reinstall = false;
375
+ this.cliExeca = void 0;
376
+ this.fs = void 0;
377
+ this.GH_TOKEN = void 0;
378
+ this.raw = void 0;
379
+ this.configuration = configuration;
376
380
  this.setRaw({
377
381
  name: "",
378
382
  version: "1.0.0",
@@ -974,6 +978,10 @@ function parseOption(value, options) {
974
978
  }
975
979
 
976
980
  let CliHooks = class CliHooks {
981
+ constructor() {
982
+ this.injector = void 0;
983
+ }
984
+
977
985
  async emit(hookName, cmd, ...args) {
978
986
  const providers = this.injector.getProviders();
979
987
  let results = [];
@@ -1009,6 +1017,10 @@ exports.CliService = class CliService {
1009
1017
  constructor() {
1010
1018
  this.program = new commander.Command();
1011
1019
  this.reinstallAfterRun = false;
1020
+ this.pkg = void 0;
1021
+ this.injector = void 0;
1022
+ this.hooks = void 0;
1023
+ this.projectPkg = void 0;
1012
1024
  this.commands = new Map();
1013
1025
  }
1014
1026
 
@@ -1333,6 +1345,11 @@ function cast(value) {
1333
1345
  }
1334
1346
 
1335
1347
  let CliProxyAgent = class CliProxyAgent {
1348
+ constructor() {
1349
+ this.proxySettings = void 0;
1350
+ this.cliExeca = void 0;
1351
+ }
1352
+
1336
1353
  hasProxy() {
1337
1354
  return !!this.proxySettings.url;
1338
1355
  }
@@ -1418,6 +1435,8 @@ function logToCurl({
1418
1435
 
1419
1436
  let CliHttpLogClient = class CliHttpLogClient {
1420
1437
  constructor(options = {}) {
1438
+ this.callee = void 0;
1439
+ this.logger = void 0;
1421
1440
  this.callee = options.callee || "http";
1422
1441
  }
1423
1442
 
@@ -1499,6 +1518,12 @@ CliHttpLogClient = tslib.__decorate([tslib.__param(0, di.Opts), tslib.__metadata
1499
1518
 
1500
1519
  var CliHttpClient_1;
1501
1520
  exports.CliHttpClient = CliHttpClient_1 = class CliHttpClient extends CliHttpLogClient {
1521
+ constructor(...args) {
1522
+ super(...args);
1523
+ this.cliProxyAgent = void 0;
1524
+ this.host = void 0;
1525
+ }
1526
+
1502
1527
  static getParamsSerializer(params) {
1503
1528
  return querystring__default['default'].stringify(core.cleanObject(params));
1504
1529
  }
@@ -1671,6 +1696,10 @@ function addSuffix(pattern, suffix) {
1671
1696
  }
1672
1697
  const SCOPE_SEPARATOR = "%2f";
1673
1698
  exports.NpmRegistryClient = NpmRegistryClient_1 = class NpmRegistryClient {
1699
+ constructor() {
1700
+ this.httpClient = void 0;
1701
+ }
1702
+
1674
1703
  static escapeName(name) {
1675
1704
  // scoped packages contain slashes and the npm registry expects them to be escaped
1676
1705
  return name.replace("/", SCOPE_SEPARATOR);
@@ -1796,6 +1825,14 @@ function mapPlugins(_ref) {
1796
1825
  }
1797
1826
 
1798
1827
  exports.CliPlugins = class CliPlugins {
1828
+ constructor() {
1829
+ this.name = void 0;
1830
+ this.npmRegistryClient = void 0;
1831
+ this.injector = void 0;
1832
+ this.cliHooks = void 0;
1833
+ this.packageJson = void 0;
1834
+ }
1835
+
1799
1836
  async searchPlugins(keyword = "", options = {}) {
1800
1837
  const result = await this.npmRegistryClient.search(this.getKeyword(keyword), options);
1801
1838
  return result.filter(({
@@ -1814,7 +1851,7 @@ exports.CliPlugins = class CliPlugins {
1814
1851
  const tasks = plugins.map(plugin => {
1815
1852
  return {
1816
1853
  title: `Run plugin '${chalk__default['default'].cyan(plugin)}'`,
1817
- task: () => this.cliHooks.emit(CommandStoreKeys.ADD, plugin)
1854
+ task: () => this.cliHooks.emit(CommandStoreKeys.ADD, plugin, ctx)
1818
1855
  };
1819
1856
  });
1820
1857
  return [...tasks, {
@@ -1854,6 +1891,10 @@ exports.CliPlugins = tslib.__decorate([di.Injectable()], exports.CliPlugins);
1854
1891
  const runScript = require("@npmcli/run-script");
1855
1892
 
1856
1893
  exports.CliRunScript = class CliRunScript {
1894
+ constructor() {
1895
+ this.projectPackageJson = void 0;
1896
+ }
1897
+
1857
1898
  run(cmd, args, options = {}) {
1858
1899
  return runScript(_extends({
1859
1900
  event: "run"
@@ -3359,6 +3400,12 @@ const _excluded = ["path"];
3359
3400
  const normalizePath = require("normalize-path");
3360
3401
 
3361
3402
  class Renderer {
3403
+ constructor() {
3404
+ this.configuration = void 0;
3405
+ this.templateDir = void 0;
3406
+ this.fs = void 0;
3407
+ }
3408
+
3362
3409
  async render(path$1, data, options = {}) {
3363
3410
  const {
3364
3411
  output,
@@ -3497,6 +3544,8 @@ class Renderer {
3497
3544
 
3498
3545
  }
3499
3546
 
3547
+ tslib.__decorate([di.Configuration(), tslib.__metadata("design:type", Object)], Renderer.prototype, "configuration", void 0);
3548
+
3500
3549
  tslib.__decorate([di.Constant("templateDir"), tslib.__metadata("design:type", String)], Renderer.prototype, "templateDir", void 0);
3501
3550
 
3502
3551
  tslib.__decorate([di.Inject(), tslib.__metadata("design:type", exports.CliFs)], Renderer.prototype, "fs", void 0);
@@ -3509,11 +3558,6 @@ exports.RootRendererService = class RootRendererService extends Renderer {
3509
3558
  }
3510
3559
 
3511
3560
  };
3512
-
3513
- tslib.__decorate([di.Constant("templateDir"), tslib.__metadata("design:type", String)], exports.RootRendererService.prototype, "templateDir", void 0);
3514
-
3515
- tslib.__decorate([di.Configuration(), tslib.__metadata("design:type", Object)], exports.RootRendererService.prototype, "configuration", void 0);
3516
-
3517
3561
  exports.RootRendererService = tslib.__decorate([di.Injectable()], exports.RootRendererService);
3518
3562
  exports.SrcRendererService = class SrcRendererService extends Renderer {
3519
3563
  get rootDir() {
@@ -3523,11 +3567,6 @@ exports.SrcRendererService = class SrcRendererService extends Renderer {
3523
3567
  }
3524
3568
 
3525
3569
  };
3526
-
3527
- tslib.__decorate([di.Constant("templateDir"), tslib.__metadata("design:type", String)], exports.SrcRendererService.prototype, "templateDir", void 0);
3528
-
3529
- tslib.__decorate([di.Configuration(), tslib.__metadata("design:type", Object)], exports.SrcRendererService.prototype, "configuration", void 0);
3530
-
3531
3570
  exports.SrcRendererService = tslib.__decorate([di.Injectable()], exports.SrcRendererService);
3532
3571
  exports.ScriptsRendererService = class ScriptsRendererService extends Renderer {
3533
3572
  get rootDir() {
@@ -3537,14 +3576,14 @@ exports.ScriptsRendererService = class ScriptsRendererService extends Renderer {
3537
3576
  }
3538
3577
 
3539
3578
  };
3540
-
3541
- tslib.__decorate([di.Constant("templateDir"), tslib.__metadata("design:type", String)], exports.ScriptsRendererService.prototype, "templateDir", void 0);
3542
-
3543
- tslib.__decorate([di.Configuration(), tslib.__metadata("design:type", Object)], exports.ScriptsRendererService.prototype, "configuration", void 0);
3544
-
3545
3579
  exports.ScriptsRendererService = tslib.__decorate([di.Injectable()], exports.ScriptsRendererService);
3546
3580
 
3547
3581
  exports.CliYaml = class CliYaml {
3582
+ constructor() {
3583
+ this.projectPackageJson = void 0;
3584
+ this.fs = void 0;
3585
+ }
3586
+
3548
3587
  async read(path) {
3549
3588
  const file = !this.fs.exists(path) ? this.fs.findUpFile(this.projectPackageJson.dir, path) : path;
3550
3589
 
@@ -3575,6 +3614,10 @@ tslib.__decorate([di.Inject(), tslib.__metadata("design:type", exports.CliFs)],
3575
3614
  exports.CliYaml = tslib.__decorate([di.Injectable()], exports.CliYaml);
3576
3615
 
3577
3616
  exports.CliDockerComposeYaml = class CliDockerComposeYaml {
3617
+ constructor() {
3618
+ this.cliYaml = void 0;
3619
+ }
3620
+
3578
3621
  async read() {
3579
3622
  return this.cliYaml.read("docker-compose.yml");
3580
3623
  }
@@ -3662,6 +3705,8 @@ class CliError extends Error {
3662
3705
  }) {
3663
3706
  super(origin.message);
3664
3707
  this.name = "CLI_ERROR";
3708
+ this.cli = void 0;
3709
+ this.origin = void 0;
3665
3710
  this.cli = cli;
3666
3711
  this.origin = origin;
3667
3712
  this.stack = origin.stack;
@@ -3678,6 +3723,11 @@ function isHelpManual(argv) {
3678
3723
  }
3679
3724
 
3680
3725
  exports.CliCore = CliCore_1 = class CliCore {
3726
+ constructor() {
3727
+ this.injector = void 0;
3728
+ this.cliService = void 0;
3729
+ }
3730
+
3681
3731
  static checkNodeVersion(wanted, id) {
3682
3732
  if (!semver.satisfies(process.version, wanted)) {
3683
3733
  console.log(chalk__default['default'].red("You are using Node " + process.version + ", but this version of " + id + " requires Node " + wanted + ".\nPlease upgrade your Node version."));