@cenk1cenk2/oclif-common 3.9.3 → 3.9.4
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/dist/hooks/index.js +5 -4
- package/dist/hooks/not-found.hook.js +5 -4
- package/dist/hooks/store.hook.js +5 -4
- package/dist/index.js +5 -4
- package/package.json +2 -2
package/dist/hooks/index.js
CHANGED
|
@@ -402,18 +402,19 @@ var ConfigService = class {
|
|
|
402
402
|
this.oclif = oclif;
|
|
403
403
|
this.command = command;
|
|
404
404
|
if (ConfigService.instance) {
|
|
405
|
-
Object.
|
|
405
|
+
if (Object.entries(config).some(([key, value]) => value !== ConfigService.instance[key])) {
|
|
406
|
+
Object.assign(ConfigService.instance, config);
|
|
407
|
+
ConfigService.instance.recalculate();
|
|
408
|
+
}
|
|
406
409
|
return ConfigService.instance;
|
|
407
|
-
} else {
|
|
408
|
-
ConfigService.instance = this;
|
|
409
410
|
}
|
|
410
411
|
this.root = this.oclif.root;
|
|
411
412
|
this.defaults = (0, import_path2.join)(this.oclif.root, "config" /* CONFIG_SERVICE_DEFAULTS_DIR */);
|
|
412
413
|
this.logger = new Logger(this.constructor.name, { level: config.logLevel });
|
|
413
414
|
this.parser = new ParserService();
|
|
414
415
|
Object.assign(this, config);
|
|
415
|
-
ConfigService.instance = this;
|
|
416
416
|
this.recalculate();
|
|
417
|
+
ConfigService.instance = this;
|
|
417
418
|
this.logger.trace("Created a new instance.");
|
|
418
419
|
}
|
|
419
420
|
async read(path) {
|
|
@@ -398,18 +398,19 @@ var ConfigService = class {
|
|
|
398
398
|
this.oclif = oclif;
|
|
399
399
|
this.command = command;
|
|
400
400
|
if (ConfigService.instance) {
|
|
401
|
-
Object.
|
|
401
|
+
if (Object.entries(config).some(([key, value]) => value !== ConfigService.instance[key])) {
|
|
402
|
+
Object.assign(ConfigService.instance, config);
|
|
403
|
+
ConfigService.instance.recalculate();
|
|
404
|
+
}
|
|
402
405
|
return ConfigService.instance;
|
|
403
|
-
} else {
|
|
404
|
-
ConfigService.instance = this;
|
|
405
406
|
}
|
|
406
407
|
this.root = this.oclif.root;
|
|
407
408
|
this.defaults = (0, import_path2.join)(this.oclif.root, "config" /* CONFIG_SERVICE_DEFAULTS_DIR */);
|
|
408
409
|
this.logger = new Logger(this.constructor.name, { level: config.logLevel });
|
|
409
410
|
this.parser = new ParserService();
|
|
410
411
|
Object.assign(this, config);
|
|
411
|
-
ConfigService.instance = this;
|
|
412
412
|
this.recalculate();
|
|
413
|
+
ConfigService.instance = this;
|
|
413
414
|
this.logger.trace("Created a new instance.");
|
|
414
415
|
}
|
|
415
416
|
async read(path) {
|
package/dist/hooks/store.hook.js
CHANGED
|
@@ -565,18 +565,19 @@ var ConfigService = class {
|
|
|
565
565
|
this.oclif = oclif;
|
|
566
566
|
this.command = command;
|
|
567
567
|
if (ConfigService.instance) {
|
|
568
|
-
Object.
|
|
568
|
+
if (Object.entries(config).some(([key, value]) => value !== ConfigService.instance[key])) {
|
|
569
|
+
Object.assign(ConfigService.instance, config);
|
|
570
|
+
ConfigService.instance.recalculate();
|
|
571
|
+
}
|
|
569
572
|
return ConfigService.instance;
|
|
570
|
-
} else {
|
|
571
|
-
ConfigService.instance = this;
|
|
572
573
|
}
|
|
573
574
|
this.root = this.oclif.root;
|
|
574
575
|
this.defaults = (0, import_path2.join)(this.oclif.root, "config" /* CONFIG_SERVICE_DEFAULTS_DIR */);
|
|
575
576
|
this.logger = new Logger(this.constructor.name, { level: config.logLevel });
|
|
576
577
|
this.parser = new ParserService();
|
|
577
578
|
Object.assign(this, config);
|
|
578
|
-
ConfigService.instance = this;
|
|
579
579
|
this.recalculate();
|
|
580
|
+
ConfigService.instance = this;
|
|
580
581
|
this.logger.trace("Created a new instance.");
|
|
581
582
|
}
|
|
582
583
|
async read(path) {
|
package/dist/index.js
CHANGED
|
@@ -461,18 +461,19 @@ var ConfigService = class {
|
|
|
461
461
|
this.oclif = oclif;
|
|
462
462
|
this.command = command;
|
|
463
463
|
if (ConfigService.instance) {
|
|
464
|
-
Object.
|
|
464
|
+
if (Object.entries(config).some(([key, value]) => value !== ConfigService.instance[key])) {
|
|
465
|
+
Object.assign(ConfigService.instance, config);
|
|
466
|
+
ConfigService.instance.recalculate();
|
|
467
|
+
}
|
|
465
468
|
return ConfigService.instance;
|
|
466
|
-
} else {
|
|
467
|
-
ConfigService.instance = this;
|
|
468
469
|
}
|
|
469
470
|
this.root = this.oclif.root;
|
|
470
471
|
this.defaults = (0, import_path2.join)(this.oclif.root, "config" /* CONFIG_SERVICE_DEFAULTS_DIR */);
|
|
471
472
|
this.logger = new Logger(this.constructor.name, { level: config.logLevel });
|
|
472
473
|
this.parser = new ParserService();
|
|
473
474
|
Object.assign(this, config);
|
|
474
|
-
ConfigService.instance = this;
|
|
475
475
|
this.recalculate();
|
|
476
|
+
ConfigService.instance = this;
|
|
476
477
|
this.logger.trace("Created a new instance.");
|
|
477
478
|
}
|
|
478
479
|
async read(path) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cenk1cenk2/oclif-common",
|
|
3
|
-
"version": "3.9.
|
|
3
|
+
"version": "3.9.4",
|
|
4
4
|
"description": "Oclif common package for oclif2 projects.",
|
|
5
5
|
"repository": "https://gitlab.kilic.dev/libraries/oclif-tools",
|
|
6
6
|
"author": {
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@oclif/core": "^1.20.4",
|
|
70
70
|
"@types/fs-extra": "^9.0.13",
|
|
71
71
|
"@types/through": "^0.0.30",
|
|
72
|
-
"@types/update-notifier": "^
|
|
72
|
+
"@types/update-notifier": "^5",
|
|
73
73
|
"class-transformer": "^0.5.1",
|
|
74
74
|
"class-validator": "^0.13.2",
|
|
75
75
|
"enquirer": "^2.3.6",
|