@penvhq/cli 0.3.1 → 0.3.2
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.cjs +7 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/index.cjs
CHANGED
|
@@ -782,7 +782,9 @@ function loadSchema(project, environment) {
|
|
|
782
782
|
async function loadSchemaExclusively(file, schemaPath, environment) {
|
|
783
783
|
const jiti = (0, import_core6.jitiFor)(file);
|
|
784
784
|
const previous = process.env.PENV_ENV;
|
|
785
|
+
const previousHarvest = process.env[import_core6.SCHEMA_HARVEST_ENV];
|
|
785
786
|
process.env.PENV_ENV = environment;
|
|
787
|
+
process.env[import_core6.SCHEMA_HARVEST_ENV] = "1";
|
|
786
788
|
let loaded;
|
|
787
789
|
try {
|
|
788
790
|
loaded = await jiti.import(file);
|
|
@@ -808,6 +810,11 @@ async function loadSchemaExclusively(file, schemaPath, environment) {
|
|
|
808
810
|
} else {
|
|
809
811
|
process.env.PENV_ENV = previous;
|
|
810
812
|
}
|
|
813
|
+
if (previousHarvest === void 0) {
|
|
814
|
+
delete process.env[import_core6.SCHEMA_HARVEST_ENV];
|
|
815
|
+
} else {
|
|
816
|
+
process.env[import_core6.SCHEMA_HARVEST_ENV] = previousHarvest;
|
|
817
|
+
}
|
|
811
818
|
}
|
|
812
819
|
const exported = typeof loaded === "object" && loaded !== null ? loaded[SCHEMA_EXPORT] : void 0;
|
|
813
820
|
if (!isZodType(exported)) {
|