wlmaker 1.9.0 → 1.9.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.mjs +9 -2
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -9423,6 +9423,7 @@ function captureApp(vault, identity, options) {
|
|
|
9423
9423
|
production: { ...existing.production }
|
|
9424
9424
|
};
|
|
9425
9425
|
const captured = [];
|
|
9426
|
+
const removed = [];
|
|
9426
9427
|
const skippedEnvs = [];
|
|
9427
9428
|
const refusedKeys = [];
|
|
9428
9429
|
for (const env of envs) {
|
|
@@ -9434,7 +9435,7 @@ function captureApp(vault, identity, options) {
|
|
|
9434
9435
|
});
|
|
9435
9436
|
continue;
|
|
9436
9437
|
}
|
|
9437
|
-
const sealedEnv = {
|
|
9438
|
+
const sealedEnv = {};
|
|
9438
9439
|
for (const [key, value] of Object.entries(local)) {
|
|
9439
9440
|
if (!allowlist.has(key) && !options.force) {
|
|
9440
9441
|
refusedKeys.push({ env, key });
|
|
@@ -9444,11 +9445,15 @@ function captureApp(vault, identity, options) {
|
|
|
9444
9445
|
sealedEnv[key] = sealValue(value, dataKey, aad);
|
|
9445
9446
|
captured.push({ env, key });
|
|
9446
9447
|
}
|
|
9448
|
+
for (const key of Object.keys(nextApp[env])) {
|
|
9449
|
+
if (!Object.prototype.hasOwnProperty.call(sealedEnv, key)) removed.push({ env, key });
|
|
9450
|
+
}
|
|
9447
9451
|
nextApp[env] = sealedEnv;
|
|
9448
9452
|
}
|
|
9449
9453
|
return {
|
|
9450
9454
|
vault: { ...vault, apps: { ...vault.apps, [options.app]: nextApp } },
|
|
9451
9455
|
captured,
|
|
9456
|
+
removed,
|
|
9452
9457
|
skippedEnvs,
|
|
9453
9458
|
refusedKeys
|
|
9454
9459
|
};
|
|
@@ -9875,7 +9880,9 @@ async function runVaultCapture(monorepoRoot, options = {}) {
|
|
|
9875
9880
|
clack12.log.info(`Skipped ${env}: ${reason}`);
|
|
9876
9881
|
}
|
|
9877
9882
|
writeVaultFile(filePath, result.vault);
|
|
9878
|
-
clack12.log.success(
|
|
9883
|
+
clack12.log.success(
|
|
9884
|
+
`Captured ${result.captured.length} value(s) and removed ${result.removed.length} stale value(s) for ${chalk25.cyan(app)}.`
|
|
9885
|
+
);
|
|
9879
9886
|
}
|
|
9880
9887
|
async function runVaultApply(monorepoRoot, options = {}) {
|
|
9881
9888
|
const identity = await ensureIdentity();
|