Major version update. Major bugfixes. Security vulnerabilites fixed

This commit is contained in:
2026-10-14 03:02:07 +01:00
parent 4e47bd8ce0
commit 7c095f6f16
112 changed files with 2479 additions and 1219 deletions
+19
View File
@@ -0,0 +1,19 @@
/**
* # Record a schema change before it runs
* @description Logs the change (unless this is a dry run) and refuses
* destructive changes that were not approved.
*/
export default function recordSchemaChange(params, change) {
params.changes?.push(change);
if (params.dry_run) {
return;
}
const allowed = params.allow_destructive;
if (change.destructive &&
allowed !== undefined &&
allowed !== true &&
!allowed.has(change.description)) {
throw new Error(`Refusing unapproved destructive change: ${change.description}. Re-run with --dry-run to review, or --yes to allow it.`);
}
console.log(change.description);
}