cf-envsync 0.3.5 → 0.3.6
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 +9 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14942,6 +14942,15 @@ var init_encrypt = __esm(() => {
|
|
|
14942
14942
|
}
|
|
14943
14943
|
const content = await readFile(envFilePath);
|
|
14944
14944
|
const lines = parseLines(content);
|
|
14945
|
+
const firstEncrypted = lines.find((l2) => l2.key && l2.value && isEnvsyncEncrypted(l2.value.trim()));
|
|
14946
|
+
if (firstEncrypted) {
|
|
14947
|
+
try {
|
|
14948
|
+
decryptValue(firstEncrypted.value.trim(), password);
|
|
14949
|
+
} catch {
|
|
14950
|
+
consola.error(`Password mismatch: cannot decrypt existing value for ${firstEncrypted.key}. ` + `The current password differs from the one used to encrypt existing values.`);
|
|
14951
|
+
process.exit(1);
|
|
14952
|
+
}
|
|
14953
|
+
}
|
|
14945
14954
|
let encryptedCount = 0;
|
|
14946
14955
|
let skippedCount = 0;
|
|
14947
14956
|
const outputLines = [];
|