envpkt 0.6.0 → 0.6.1
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/cli.js +12 -8
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -2864,19 +2864,23 @@ const writeSealedToml = (configPath, sealedMeta) => {
|
|
|
2864
2864
|
}
|
|
2865
2865
|
if (insideMetaBlock && encryptedValueRe.test(line)) {
|
|
2866
2866
|
hasEncryptedValue = true;
|
|
2867
|
-
|
|
2867
|
+
const replacing = !!(currentMetaKey && pendingSeals.has(currentMetaKey));
|
|
2868
|
+
if (replacing) {
|
|
2868
2869
|
output.push(`encrypted_value = """`);
|
|
2869
2870
|
output.push(pendingSeals.get(currentMetaKey));
|
|
2870
2871
|
output.push(`"""`);
|
|
2871
2872
|
pendingSeals.delete(currentMetaKey);
|
|
2872
|
-
if (line.includes("\"\"\"") && !line.endsWith("\"\"\"")) {
|
|
2873
|
-
const afterEquals = line.slice(line.indexOf("=") + 1).trim();
|
|
2874
|
-
if (afterEquals.startsWith("\"\"\"") && !afterEquals.slice(3).includes("\"\"\"")) {
|
|
2875
|
-
while (i + 1 < lines.length && !lines[i + 1].includes("\"\"\"")) i++;
|
|
2876
|
-
if (i + 1 < lines.length) i++;
|
|
2877
|
-
}
|
|
2878
|
-
}
|
|
2879
2873
|
} else output.push(line);
|
|
2874
|
+
if (line.slice(line.indexOf("=") + 1).trim().includes("\"\"\"")) {
|
|
2875
|
+
while (i + 1 < lines.length && !lines[i + 1].includes("\"\"\"")) {
|
|
2876
|
+
if (!replacing) output.push(lines[i + 1]);
|
|
2877
|
+
i++;
|
|
2878
|
+
}
|
|
2879
|
+
if (i + 1 < lines.length) {
|
|
2880
|
+
if (!replacing) output.push(lines[i + 1]);
|
|
2881
|
+
i++;
|
|
2882
|
+
}
|
|
2883
|
+
}
|
|
2880
2884
|
continue;
|
|
2881
2885
|
}
|
|
2882
2886
|
output.push(line);
|