@cenk1cenk2/oclif-common 3.1.0-beta.10 → 3.1.0-beta.13
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/index.js +10 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -697,24 +697,26 @@ var ConfigService = class {
|
|
|
697
697
|
if (Date.now() - startedAt > timeout) {
|
|
698
698
|
throw new Error(`Timed-out in ${timeout}ms while looking for element environment variables.`);
|
|
699
699
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
700
|
+
let extension = {};
|
|
701
|
+
await Promise.all(
|
|
702
|
+
variable.extensions.map(async (e) => {
|
|
703
|
+
const clone = JSON.parse(JSON.stringify(e));
|
|
703
704
|
clone.env = clone.env.replace("${i}" /* ELEMENT_REPLACER */, i.toString());
|
|
704
|
-
clone.key
|
|
705
|
+
clone.key = clone.key.slice(clone.key.findIndex((value) => value === "__element" /* ELEMENT */) + 1);
|
|
705
706
|
data = process.env[clone.env];
|
|
706
707
|
if (!data) {
|
|
707
708
|
this.logger.trace("No extension for environment variable: %s -> %s", clone.key.join("."), clone.env);
|
|
708
709
|
return;
|
|
709
710
|
}
|
|
710
|
-
|
|
711
|
+
extension = cb(e, clone, data);
|
|
711
712
|
})
|
|
712
|
-
)
|
|
713
|
-
if (
|
|
713
|
+
);
|
|
714
|
+
if (Object.keys(extension).length === 0) {
|
|
714
715
|
this.logger.trace("No more extensions for environment variables: %s -> %d", variable.key.join("."), i);
|
|
716
|
+
config = import_object_path_immutable.default.set(config, [...variable.key, i], extension);
|
|
715
717
|
break;
|
|
716
718
|
}
|
|
717
|
-
config =
|
|
719
|
+
config = import_object_path_immutable.default.set(config, [...variable.key, i], extension);
|
|
718
720
|
}
|
|
719
721
|
}
|
|
720
722
|
})
|
package/package.json
CHANGED