Port bun-mariadb schema guard, targetId fix, lazy init and tests

- schema: add --dry-run (sync in a rolled-back transaction) and require
  confirmation (or --yes) before dropping tables or columns; unapproved
  destructive changes are refused
- only rebuild tables whose CREATE TABLE statement changed
- always AND targetId with the query, regardless of searchOperator
- empty IN / NOT IN lists become 1 = 0 / 1 = 1
- initialize lazily on first call so importing never throws
- read CLI version from package.json, chmod CLI on compile, pin @types/bun
- add SQL generator, value and schema guard tests

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-10-14 03:00:29 +01:00
co-authored by Claude Opus 5.5
parent 87da436f81
commit 4e47bd8ce0
23 changed files with 649 additions and 172 deletions
+3 -3
View File
@@ -26,13 +26,13 @@
},
"scripts": {
"dev": "tsc --watch",
"compile": "rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json",
"compile": "rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json && chmod +x dist/commands/index.js",
"typecheck": "tsc -p tsconfig.json --noEmit",
"test": "bun test src",
"test": "bun test src tests",
"prepublishOnly": "bun run compile"
},
"devDependencies": {
"@types/bun": "latest",
"@types/bun": "1.3.14",
"@types/inquirer": "^9.0.9",
"@types/lodash": "^4.17.24",
"@types/node": "^25.3.3"