@oclif/config
Advanced tools
Comparing version 1.10.2 to 1.10.3
@@ -0,1 +1,10 @@ | ||
## [1.10.3](https://github.com/oclif/config/compare/v1.10.2...v1.10.3) (2018-12-21) | ||
### Bug Fixes | ||
* parent & child plugins ([#57](https://github.com/oclif/config/issues/57)) ([e0b5e95](https://github.com/oclif/config/commit/e0b5e95)) | ||
## [1.10.2](https://github.com/oclif/config/compare/v1.10.1...v1.10.2) (2018-12-18) | ||
@@ -2,0 +11,0 @@ |
@@ -192,3 +192,3 @@ import { Command } from './command'; | ||
tag?: string; | ||
})[]): Promise<void>; | ||
})[], parent?: Plugin.Plugin): Promise<void>; | ||
protected warn(err: any, scope?: string): void; | ||
@@ -195,0 +195,0 @@ } |
@@ -259,3 +259,3 @@ "use strict"; | ||
} | ||
async loadPlugins(root, type, plugins) { | ||
async loadPlugins(root, type, plugins, parent) { | ||
if (!plugins || !plugins.length) | ||
@@ -280,3 +280,7 @@ return; | ||
this.plugins.push(instance); | ||
await this.loadPlugins(instance.root, type, instance.pjson.oclif.plugins || []); | ||
if (parent) { | ||
instance.parent = parent; | ||
parent.children.push(instance); | ||
} | ||
await this.loadPlugins(instance.root, type, instance.pjson.oclif.plugins || [], instance); | ||
} | ||
@@ -283,0 +287,0 @@ catch (err) { |
@@ -12,2 +12,4 @@ import { Command } from './command'; | ||
errorOnManifestCreate?: boolean; | ||
parent?: Plugin; | ||
children?: Plugin[]; | ||
} | ||
@@ -83,2 +85,4 @@ export interface IPlugin { | ||
alreadyLoaded: boolean; | ||
parent: Plugin | undefined; | ||
children: Plugin[]; | ||
protected _debug: (..._: any[]) => void; | ||
@@ -85,0 +89,0 @@ protected warned: boolean; |
@@ -18,2 +18,3 @@ "use strict"; | ||
this.alreadyLoaded = false; | ||
this.children = []; | ||
this._debug = debug_1.default(); | ||
@@ -20,0 +21,0 @@ this.warned = false; |
{ | ||
"name": "@oclif/config", | ||
"description": "base config object and standard interfaces for oclif components", | ||
"version": "1.10.2", | ||
"version": "1.10.3", | ||
"author": "Jeff Dickey @jdxcode", | ||
@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/config/issues", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
96841
1390