@tsed/cli-core 3.20.11 → 3.20.12

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
@@ -1614,12 +1614,8 @@ exports.CliHttpClient = CliHttpClient_1 = tslib.__decorate([di.Injectable()], ex
1614
1614
  const all = promises => Promise.all(promises);
1615
1615
 
1616
1616
  async function loadPlugins(injector) {
1617
- const {
1618
- name,
1619
- project: {
1620
- rootDir
1621
- }
1622
- } = injector.settings;
1617
+ const name = injector.settings.get("name");
1618
+ const rootDir = injector.settings.get("project.rootDir");
1623
1619
  const projectPackageJson = injector.invoke(exports.ProjectPackageJson);
1624
1620
  const fs = injector.invoke(exports.CliFs);
1625
1621
  const promises = Object.keys(projectPackageJson.allDependencies).filter(mod => mod.startsWith(`@${name}/cli-plugin`) || mod.includes(`${name}-cli-plugin`)).map(async mod => {
@@ -1639,7 +1635,7 @@ async function loadPlugins(injector) {
1639
1635
 
1640
1636
  injector.add(token, (_GlobalProviders$get2 = di.GlobalProviders.get(token)) == null ? void 0 : _GlobalProviders$get2.clone());
1641
1637
 
1642
- if (injector.settings.loaded) {
1638
+ if (injector.settings.get("loaded")) {
1643
1639
  await injector.invoke(token);
1644
1640
  }
1645
1641
  }));
@@ -1647,7 +1643,7 @@ async function loadPlugins(injector) {
1647
1643
 
1648
1644
  injector.add(plugin, provider);
1649
1645
 
1650
- if (injector.settings.loaded) {
1646
+ if (injector.settings.get("loaded")) {
1651
1647
  await injector.invoke(plugin);
1652
1648
  }
1653
1649
  }
@@ -3699,7 +3695,7 @@ exports.CliCore = CliCore_1 = class CliCore {
3699
3695
  const cli = injector.get(CliCore_1);
3700
3696
 
3701
3697
  try {
3702
- await cli.cliService.parseArgs(injector.settings.argv);
3698
+ await cli.cliService.parseArgs(injector.settings.get("argv"));
3703
3699
  } catch (er) {
3704
3700
  throw new CliError({
3705
3701
  origin: er,
@@ -3715,7 +3711,7 @@ exports.CliCore = CliCore_1 = class CliCore {
3715
3711
  const container = di.createContainer();
3716
3712
  await injector.load(container, module);
3717
3713
  await injector.emit("$afterInit");
3718
- injector.settings.loaded = true;
3714
+ injector.settings.set("loaded", true);
3719
3715
  }
3720
3716
 
3721
3717
  static updateNotifier(pkg) {