@cenk1cenk2/oclif-common 3.1.0-beta.12 → 3.1.0-beta.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/dist/index.js +8 -9
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -697,25 +697,24 @@ 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
|
-
|
|
703
|
-
const clone = JSON.parse(JSON.stringify(e));
|
|
700
|
+
const extensions = (await Promise.all(
|
|
701
|
+
variable.extensions.map(async (extension) => {
|
|
702
|
+
const clone = JSON.parse(JSON.stringify(extension));
|
|
704
703
|
clone.env = clone.env.replace("${i}" /* ELEMENT_REPLACER */, i.toString());
|
|
705
|
-
clone.key
|
|
704
|
+
clone.key[clone.key.findIndex((value) => value === "__element" /* ELEMENT */)] = i;
|
|
706
705
|
data = process.env[clone.env];
|
|
707
706
|
if (!data) {
|
|
708
707
|
this.logger.trace("No extension for environment variable: %s -> %s", clone.key.join("."), clone.env);
|
|
709
708
|
return;
|
|
710
709
|
}
|
|
711
|
-
|
|
710
|
+
return cb(config, clone, data);
|
|
712
711
|
})
|
|
713
|
-
);
|
|
714
|
-
if (
|
|
712
|
+
)).filter(Boolean);
|
|
713
|
+
if (extensions.length === 0) {
|
|
715
714
|
this.logger.trace("No more extensions for environment variables: %s -> %d", variable.key.join("."), i);
|
|
716
715
|
break;
|
|
717
716
|
}
|
|
718
|
-
|
|
717
|
+
console.log(extensions);
|
|
719
718
|
}
|
|
720
719
|
}
|
|
721
720
|
})
|
package/package.json
CHANGED