@runa-ai/runa-cli 0.5.72 → 0.7.0

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.
Files changed (528) hide show
  1. package/dist/build-V66FAQXB.js +1719 -0
  2. package/dist/cache-N7WNPEYF.js +111 -0
  3. package/dist/check-LOMVIRHX.js +12 -0
  4. package/dist/chunk-2APB25TT.js +442 -0
  5. package/dist/chunk-3FDQW524.js +544 -0
  6. package/dist/chunk-3WDV32GA.js +33 -0
  7. package/dist/chunk-5FT3F36G.js +59 -0
  8. package/dist/chunk-5NKWR4FF.js +254 -0
  9. package/dist/chunk-644FVGIQ.js +194 -0
  10. package/dist/chunk-6AALH2ED.js +121 -0
  11. package/dist/chunk-6FAU4IGR.js +63 -0
  12. package/dist/chunk-6Y3LAUGL.js +35 -0
  13. package/dist/chunk-7B5C6U2K.js +274 -0
  14. package/dist/chunk-AAIE4F2U.js +140 -0
  15. package/dist/chunk-AIP6MR42.js +12 -0
  16. package/dist/chunk-CCKG5R4Y.js +59 -0
  17. package/dist/chunk-DRSUEMAK.js +123 -0
  18. package/dist/chunk-FHG3ILE4.js +2011 -0
  19. package/dist/chunk-H2AHNI75.js +31 -0
  20. package/dist/chunk-HD74F6W2.js +460 -0
  21. package/dist/chunk-HKUWEGUX.js +36 -0
  22. package/dist/chunk-IBVVGH6X.js +33 -0
  23. package/dist/chunk-II7VYQEM.js +179 -0
  24. package/dist/chunk-JMJP4A47.js +204 -0
  25. package/dist/chunk-JQXOVCOP.js +574 -0
  26. package/dist/chunk-KE6QJBZG.js +41 -0
  27. package/dist/chunk-KWX3JHCY.js +85 -0
  28. package/dist/chunk-MXRWBNIY.js +74 -0
  29. package/dist/chunk-NPSRD26F.js +149 -0
  30. package/dist/chunk-QDF7QXBL.js +67 -0
  31. package/dist/chunk-QM53IQHM.js +209 -0
  32. package/dist/chunk-RZLYEO4U.js +219 -0
  33. package/dist/chunk-SGJG3BKD.js +351 -0
  34. package/dist/chunk-TYIAD6SB.js +74 -0
  35. package/dist/chunk-UWWSAPDR.js +31 -0
  36. package/dist/chunk-VM3IWOT5.js +458 -0
  37. package/dist/chunk-VRXHCR5K.js +42 -0
  38. package/dist/chunk-WJXC4MVY.js +75 -0
  39. package/dist/chunk-XDCHRVE3.js +215 -0
  40. package/dist/chunk-Z4Z5DNW4.js +1196 -0
  41. package/dist/chunk-ZZOXM6Q4.js +8 -0
  42. package/dist/ci-ZWRVWNFX.js +9298 -0
  43. package/dist/cli/contract-output.d.ts +1 -0
  44. package/dist/cli/index.d.ts +7 -1
  45. package/dist/cli/requested-command.d.ts +8 -0
  46. package/dist/cli-2JNBJUBB.js +704 -0
  47. package/dist/commands/build/actors/db-sync.d.ts +2 -0
  48. package/dist/commands/build/actors/static-checks.d.ts +7 -6
  49. package/dist/commands/build/actors/validate.d.ts +2 -0
  50. package/dist/commands/build/contract.d.ts +30 -30
  51. package/dist/commands/build/machine-dry-run.d.ts +3 -0
  52. package/dist/commands/build/machine-e2e-meta.d.ts +120 -0
  53. package/dist/commands/build/machine.d.ts +22 -22
  54. package/dist/commands/build/types.d.ts +2 -4
  55. package/dist/commands/check/commands/check.d.ts +8 -3
  56. package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts +9 -6
  57. package/dist/commands/ci/machine/actors/db/schema-canonical-diff.d.ts +55 -0
  58. package/dist/commands/ci/machine/actors/db/schema-stats.d.ts +11 -0
  59. package/dist/commands/ci/machine/actors/db/sync-schema.d.ts +9 -1
  60. package/dist/commands/ci/machine/contract.d.ts +26 -26
  61. package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts +1 -5
  62. package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts +5 -0
  63. package/dist/commands/ci/machine/formatters/sections/index.d.ts +2 -2
  64. package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts +3 -3
  65. package/dist/commands/ci/machine/machine-execution-helpers.d.ts +40 -0
  66. package/dist/commands/ci/machine/machine-state-helpers.d.ts +14 -0
  67. package/dist/commands/ci/machine/machine.d.ts +12 -12
  68. package/dist/commands/ci/machine/types.d.ts +2 -5
  69. package/dist/commands/ci/utils/ci-summary.d.ts +15 -15
  70. package/dist/commands/ci/utils/execa-helpers.d.ts +2 -0
  71. package/dist/commands/db/apply/actors/idempotent-actors.d.ts +34 -0
  72. package/dist/commands/db/apply/actors/lock-actors.d.ts +16 -0
  73. package/dist/commands/db/apply/actors/pg-schema-diff-actors.d.ts +31 -0
  74. package/dist/commands/db/apply/actors/seed-actors.d.ts +11 -0
  75. package/dist/commands/db/apply/actors/shared.d.ts +9 -0
  76. package/dist/commands/db/apply/actors.d.ts +16 -65
  77. package/dist/commands/db/apply/contract.d.ts +8 -1
  78. package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts +3 -4
  79. package/dist/commands/db/apply/helpers/data-integrity-verifier.d.ts +37 -0
  80. package/dist/commands/db/apply/helpers/fresh-db-handler.d.ts +34 -0
  81. package/dist/commands/db/apply/helpers/hazard-handler.d.ts +60 -0
  82. package/dist/commands/db/apply/helpers/idempotent-object-registry.d.ts +96 -0
  83. package/dist/commands/db/apply/helpers/idempotent-transaction.d.ts +20 -0
  84. package/dist/commands/db/apply/helpers/index.d.ts +6 -0
  85. package/dist/commands/db/apply/helpers/partition-validator.d.ts +2 -15
  86. package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts +18 -162
  87. package/dist/commands/db/apply/helpers/pg-schema-diff-patterns.d.ts +55 -0
  88. package/dist/commands/db/apply/helpers/pg-schema-diff-version.d.ts +50 -0
  89. package/dist/commands/db/apply/helpers/plan-validator.d.ts +4 -10
  90. package/dist/commands/db/apply/helpers/rbac-password-manager.d.ts +34 -0
  91. package/dist/commands/db/apply/helpers/retry-logic.d.ts +16 -2
  92. package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts +1 -1
  93. package/dist/commands/db/apply/helpers/sql-utils.d.ts +26 -0
  94. package/dist/commands/db/apply/machine.d.ts +52 -1
  95. package/dist/commands/db/commands/db-apply.d.ts +18 -0
  96. package/dist/commands/db/commands/db-sync/boundary-classifier.d.ts +21 -0
  97. package/dist/commands/db/commands/db-sync/error-classifier.d.ts +9 -0
  98. package/dist/commands/db/commands/db-sync/plan-hazard-analyzer.d.ts +13 -0
  99. package/dist/commands/db/commands/db-sync/risk-reporter.d.ts +19 -0
  100. package/dist/commands/db/commands/db-sync/sql-parser.d.ts +25 -0
  101. package/dist/commands/db/commands/db-sync/types.d.ts +47 -0
  102. package/dist/commands/db/commands/db-sync.d.ts +14 -0
  103. package/dist/commands/db/sync/contract.d.ts +6 -2
  104. package/dist/commands/db/sync/machine.d.ts +2 -1
  105. package/dist/commands/db/types.d.ts +2 -0
  106. package/dist/commands/db/utils/boundary-policy/rule-compiler.d.ts +11 -0
  107. package/dist/commands/db/utils/boundary-policy/types.d.ts +105 -0
  108. package/dist/commands/db/utils/boundary-policy/validation.d.ts +20 -0
  109. package/dist/commands/db/utils/boundary-policy-runtime.d.ts +28 -0
  110. package/dist/commands/db/utils/boundary-policy.d.ts +5 -0
  111. package/dist/commands/db/utils/idempotent-risk-context.d.ts +29 -0
  112. package/dist/commands/db/utils/preflight-check.d.ts +14 -0
  113. package/dist/commands/db/utils/preflight-checks/domain-naming-checks.d.ts +106 -0
  114. package/dist/commands/db/utils/preflight-checks/orphan-checks.d.ts +36 -0
  115. package/dist/commands/db/utils/preflight-checks/schema-risk-checks.d.ts +22 -0
  116. package/dist/commands/db/utils/preflight-checks/supabase-checks.d.ts +55 -0
  117. package/dist/commands/db/utils/risk-detector-loader.d.ts +8 -0
  118. package/dist/commands/db/utils/schema-precheck-budget.d.ts +17 -0
  119. package/dist/commands/db/utils/sql-boundary-parser.d.ts +12 -0
  120. package/dist/commands/db/utils/sql-file-collector.d.ts +8 -0
  121. package/dist/commands/db/utils/sql-filename-parser.d.ts +20 -0
  122. package/dist/commands/db/utils/sql-table-extractor-ast.d.ts +19 -0
  123. package/dist/commands/db/utils/sql-table-extractor-regex.d.ts +50 -0
  124. package/dist/commands/db/utils/sql-table-extractor-rls.d.ts +13 -0
  125. package/dist/commands/db/utils/sql-table-extractor.d.ts +79 -1
  126. package/dist/commands/db/utils/table-registry-introspection.d.ts +68 -0
  127. package/dist/commands/db/utils/table-registry.d.ts +3 -38
  128. package/dist/commands/dev/actors/app-lifecycle.d.ts +18 -0
  129. package/dist/commands/dev/actors/index.d.ts +12 -2
  130. package/dist/commands/dev/actors/process-check.d.ts +12 -0
  131. package/dist/commands/dev/actors/shared.d.ts +15 -0
  132. package/dist/commands/dev/actors/tables-manifest.d.ts +16 -0
  133. package/dist/commands/dev/contract.d.ts +3 -3
  134. package/dist/commands/dev/guards.d.ts +24 -0
  135. package/dist/commands/dev/machine.d.ts +27 -32
  136. package/dist/commands/dev/types.d.ts +2 -0
  137. package/dist/commands/doctor.d.ts +9 -0
  138. package/dist/commands/env/commands/env-pull/auth.d.ts +13 -0
  139. package/dist/commands/env/commands/env-pull/dotenv-files.d.ts +14 -0
  140. package/dist/commands/env/commands/env-pull/security.d.ts +12 -0
  141. package/dist/commands/env/commands/env-pull/service.d.ts +8 -0
  142. package/dist/commands/env/commands/env-pull/shared.d.ts +79 -0
  143. package/dist/commands/env/commands/setup/types.d.ts +1 -1
  144. package/dist/commands/env/constants/local-supabase.d.ts +2 -0
  145. package/dist/commands/inject-test-attrs/defaults.d.ts +9 -0
  146. package/dist/commands/template-check/contract.d.ts +6 -6
  147. package/dist/commands/template-check/machine.d.ts +2 -2
  148. package/dist/commands/template-check/types.d.ts +0 -4
  149. package/dist/commands/template-check/utils/diff-analyzer.d.ts +0 -4
  150. package/dist/commands/utils/machine-state-logging.d.ts +20 -0
  151. package/dist/commands/utils/repo-root.d.ts +2 -0
  152. package/dist/config/env.d.ts +4 -4
  153. package/dist/config-loader-GT3HAQ7U.js +7 -0
  154. package/dist/db-XULCILOU.js +14137 -0
  155. package/dist/dev-5YXNPTCJ.js +992 -0
  156. package/dist/doctor-MZLOA53G.js +44 -0
  157. package/dist/env-HMMRSYCI.js +7 -0
  158. package/dist/env-SS66PZ4B.js +2623 -0
  159. package/dist/env-files-2UIUYLLR.js +8 -0
  160. package/dist/error-handler-HEXBRNVV.js +460 -0
  161. package/dist/hotfix-YA3DGLOM.js +1477 -0
  162. package/dist/index.d.ts +5 -1
  163. package/dist/index.js +48 -42995
  164. package/dist/init-ZIL6LRFO.js +631 -0
  165. package/dist/inject-test-attrs-P44BVTQS.js +23 -0
  166. package/dist/internal/machines/snapshot-helpers.d.ts +6 -0
  167. package/dist/lib/sql-comment-utils.d.ts +25 -0
  168. package/dist/license-OB7GVJQ2.js +468 -0
  169. package/dist/link-VSNDVZZD.js +59 -0
  170. package/dist/manifest-TMFLESHW.js +19 -0
  171. package/dist/prepare-32DOVHTE.js +250 -0
  172. package/dist/risk-detector-4U6ZJ2G5.js +6 -0
  173. package/dist/risk-detector-core-TK4OAI3N.js +166 -0
  174. package/dist/risk-detector-plpgsql-HWKS4OLR.js +1886 -0
  175. package/dist/sdk-XK6HQU7S.js +348 -0
  176. package/dist/services-7VK5KZTO.js +177 -0
  177. package/dist/session-SFW5QSXZ.js +142 -0
  178. package/dist/signal-handler-DO3OANW5.js +6 -0
  179. package/dist/status-UTKS63AB.js +94 -0
  180. package/dist/telemetry-P56UBLZ2.js +93 -0
  181. package/dist/template-check-3P4HZXVY.js +1944 -0
  182. package/dist/test-V4KQL574.js +650 -0
  183. package/dist/test-gen-FS4CEY3P.js +88 -0
  184. package/dist/ui-RJAMCWUI.js +331 -0
  185. package/dist/upgrade-NUK3ZBCL.js +637 -0
  186. package/dist/utils/config-loader.d.ts +0 -3
  187. package/dist/validate-CAAW4Y44.js +54 -0
  188. package/dist/validators/risk-detector-content-risks.d.ts +13 -0
  189. package/dist/validators/risk-detector-core.d.ts +25 -0
  190. package/dist/validators/risk-detector-patterns.d.ts +15 -0
  191. package/dist/validators/risk-detector-plpgsql-expression-resolver.d.ts +22 -0
  192. package/dist/validators/risk-detector-plpgsql-parser.d.ts +5 -0
  193. package/dist/validators/risk-detector-plpgsql-tokenizer.d.ts +18 -0
  194. package/dist/validators/risk-detector-plpgsql.d.ts +9 -0
  195. package/dist/validators/risk-detector-text-utils.d.ts +6 -0
  196. package/dist/validators/risk-detector-types.d.ts +16 -0
  197. package/dist/validators/risk-detector.d.ts +7 -26
  198. package/dist/vuln-check-2W7N5TA2.js +121 -0
  199. package/dist/vuln-checker-IQJ56RUV.js +3223 -0
  200. package/dist/watch-PNTKZYFB.js +911 -0
  201. package/dist/workflow-H75N4BXX.js +897 -0
  202. package/package.json +5 -2
  203. package/dist/cli/contract-mode.d.ts.map +0 -1
  204. package/dist/cli/contract-output.d.ts.map +0 -1
  205. package/dist/cli/early-flags.d.ts.map +0 -1
  206. package/dist/cli/error-handler.d.ts.map +0 -1
  207. package/dist/cli/exec.d.ts.map +0 -1
  208. package/dist/cli/index.d.ts.map +0 -1
  209. package/dist/cli/json-output.d.ts.map +0 -1
  210. package/dist/cli/non-interactive.d.ts.map +0 -1
  211. package/dist/cli/output-format.d.ts.map +0 -1
  212. package/dist/cli/signal-handler.d.ts.map +0 -1
  213. package/dist/commands/build/actors/build.d.ts.map +0 -1
  214. package/dist/commands/build/actors/clean.d.ts.map +0 -1
  215. package/dist/commands/build/actors/db-sync.d.ts.map +0 -1
  216. package/dist/commands/build/actors/index.d.ts.map +0 -1
  217. package/dist/commands/build/actors/manifest.d.ts.map +0 -1
  218. package/dist/commands/build/actors/setup.d.ts.map +0 -1
  219. package/dist/commands/build/actors/static-checks.d.ts.map +0 -1
  220. package/dist/commands/build/actors/validate.d.ts.map +0 -1
  221. package/dist/commands/build/commands/build.d.ts.map +0 -1
  222. package/dist/commands/build/contract.d.ts.map +0 -1
  223. package/dist/commands/build/guards.d.ts.map +0 -1
  224. package/dist/commands/build/index.d.ts.map +0 -1
  225. package/dist/commands/build/machine.d.ts.map +0 -1
  226. package/dist/commands/build/types.d.ts.map +0 -1
  227. package/dist/commands/cache.d.ts.map +0 -1
  228. package/dist/commands/check/commands/check.d.ts.map +0 -1
  229. package/dist/commands/check/index.d.ts.map +0 -1
  230. package/dist/commands/ci/commands/ci-checks.d.ts.map +0 -1
  231. package/dist/commands/ci/commands/ci-layer-content.d.ts.map +0 -1
  232. package/dist/commands/ci/commands/ci-pr-capabilities.d.ts.map +0 -1
  233. package/dist/commands/ci/commands/ci-prod-apply.d.ts.map +0 -1
  234. package/dist/commands/ci/commands/ci-prod-db-operations.d.ts.map +0 -1
  235. package/dist/commands/ci/commands/ci-prod-github.d.ts.map +0 -1
  236. package/dist/commands/ci/commands/ci-prod-types.d.ts.map +0 -1
  237. package/dist/commands/ci/commands/ci-prod-utils.d.ts.map +0 -1
  238. package/dist/commands/ci/commands/ci-prod-workflow.d.ts.map +0 -1
  239. package/dist/commands/ci/commands/ci-resolvers.d.ts.map +0 -1
  240. package/dist/commands/ci/commands/ci-static.d.ts.map +0 -1
  241. package/dist/commands/ci/commands/ci-supabase-local.d.ts.map +0 -1
  242. package/dist/commands/ci/index.d.ts.map +0 -1
  243. package/dist/commands/ci/machine/actors/build/app-build.d.ts.map +0 -1
  244. package/dist/commands/ci/machine/actors/build/app-start.d.ts.map +0 -1
  245. package/dist/commands/ci/machine/actors/build/build-and-playwright.d.ts.map +0 -1
  246. package/dist/commands/ci/machine/actors/build/index.d.ts.map +0 -1
  247. package/dist/commands/ci/machine/actors/build/playwright-install.d.ts.map +0 -1
  248. package/dist/commands/ci/machine/actors/build/static-checks.d.ts.map +0 -1
  249. package/dist/commands/ci/machine/actors/db/apply-seeds.d.ts.map +0 -1
  250. package/dist/commands/ci/machine/actors/db/collect-schema-stats.d.ts.map +0 -1
  251. package/dist/commands/ci/machine/actors/db/index.d.ts.map +0 -1
  252. package/dist/commands/ci/machine/actors/db/pgtap-install.d.ts.map +0 -1
  253. package/dist/commands/ci/machine/actors/db/production-preview.d.ts.map +0 -1
  254. package/dist/commands/ci/machine/actors/db/pull-production.d.ts.map +0 -1
  255. package/dist/commands/ci/machine/actors/db/reset.d.ts.map +0 -1
  256. package/dist/commands/ci/machine/actors/db/schema-stats.d.ts.map +0 -1
  257. package/dist/commands/ci/machine/actors/db/setup-roles.d.ts.map +0 -1
  258. package/dist/commands/ci/machine/actors/db/sync-schema.d.ts.map +0 -1
  259. package/dist/commands/ci/machine/actors/finalize/github.d.ts.map +0 -1
  260. package/dist/commands/ci/machine/actors/finalize/index.d.ts.map +0 -1
  261. package/dist/commands/ci/machine/actors/finalize/summary.d.ts.map +0 -1
  262. package/dist/commands/ci/machine/actors/index.d.ts.map +0 -1
  263. package/dist/commands/ci/machine/actors/setup/index.d.ts.map +0 -1
  264. package/dist/commands/ci/machine/actors/setup/local.d.ts.map +0 -1
  265. package/dist/commands/ci/machine/actors/setup/pr-common.d.ts.map +0 -1
  266. package/dist/commands/ci/machine/actors/setup/pr-local.d.ts.map +0 -1
  267. package/dist/commands/ci/machine/actors/test/capabilities.d.ts.map +0 -1
  268. package/dist/commands/ci/machine/actors/test/index.d.ts.map +0 -1
  269. package/dist/commands/ci/machine/actors/test/run-layers.d.ts.map +0 -1
  270. package/dist/commands/ci/machine/commands/ci-local.d.ts.map +0 -1
  271. package/dist/commands/ci/machine/commands/ci-pr.d.ts.map +0 -1
  272. package/dist/commands/ci/machine/commands/index.d.ts.map +0 -1
  273. package/dist/commands/ci/machine/commands/machine-runner.d.ts.map +0 -1
  274. package/dist/commands/ci/machine/commands/runtime-env.d.ts.map +0 -1
  275. package/dist/commands/ci/machine/contract.d.ts.map +0 -1
  276. package/dist/commands/ci/machine/formatters/github-comment-types.d.ts.map +0 -1
  277. package/dist/commands/ci/machine/formatters/github-comment.d.ts.map +0 -1
  278. package/dist/commands/ci/machine/formatters/index.d.ts.map +0 -1
  279. package/dist/commands/ci/machine/formatters/sections/final-comment.d.ts.map +0 -1
  280. package/dist/commands/ci/machine/formatters/sections/format-helpers.d.ts.map +0 -1
  281. package/dist/commands/ci/machine/formatters/sections/index.d.ts.map +0 -1
  282. package/dist/commands/ci/machine/formatters/sections/progress-comment.d.ts.map +0 -1
  283. package/dist/commands/ci/machine/formatters/sections/schema-matrix.d.ts.map +0 -1
  284. package/dist/commands/ci/machine/formatters/summary.d.ts.map +0 -1
  285. package/dist/commands/ci/machine/guards.d.ts.map +0 -1
  286. package/dist/commands/ci/machine/helpers.d.ts.map +0 -1
  287. package/dist/commands/ci/machine/index.d.ts.map +0 -1
  288. package/dist/commands/ci/machine/machine.d.ts.map +0 -1
  289. package/dist/commands/ci/machine/types.d.ts.map +0 -1
  290. package/dist/commands/ci/utils/ai-report.d.ts.map +0 -1
  291. package/dist/commands/ci/utils/app-process.d.ts.map +0 -1
  292. package/dist/commands/ci/utils/app-runtime.d.ts.map +0 -1
  293. package/dist/commands/ci/utils/ci-config.d.ts.map +0 -1
  294. package/dist/commands/ci/utils/ci-env-schema.d.ts.map +0 -1
  295. package/dist/commands/ci/utils/ci-logging.d.ts.map +0 -1
  296. package/dist/commands/ci/utils/ci-summary.d.ts.map +0 -1
  297. package/dist/commands/ci/utils/config-readers.d.ts.map +0 -1
  298. package/dist/commands/ci/utils/db-url-utils.d.ts.map +0 -1
  299. package/dist/commands/ci/utils/e2e-auth-setup.d.ts.map +0 -1
  300. package/dist/commands/ci/utils/env-security.d.ts.map +0 -1
  301. package/dist/commands/ci/utils/execa-helpers.d.ts.map +0 -1
  302. package/dist/commands/ci/utils/exit-code-computation.d.ts.map +0 -1
  303. package/dist/commands/ci/utils/github-api.d.ts.map +0 -1
  304. package/dist/commands/ci/utils/github.d.ts.map +0 -1
  305. package/dist/commands/ci/utils/index.d.ts.map +0 -1
  306. package/dist/commands/ci/utils/pgtap-installer.d.ts.map +0 -1
  307. package/dist/commands/ci/utils/rls-verification.d.ts.map +0 -1
  308. package/dist/commands/ci/utils/schema-operations.d.ts.map +0 -1
  309. package/dist/commands/ci/utils/seed-operations.d.ts.map +0 -1
  310. package/dist/commands/ci/utils/test-parallel.d.ts.map +0 -1
  311. package/dist/commands/ci/utils/timestamp-invariants.d.ts.map +0 -1
  312. package/dist/commands/ci/utils/workflow-idempotency.d.ts.map +0 -1
  313. package/dist/commands/db/apply/actors.d.ts.map +0 -1
  314. package/dist/commands/db/apply/contract.d.ts.map +0 -1
  315. package/dist/commands/db/apply/helpers/advisory-lock.d.ts.map +0 -1
  316. package/dist/commands/db/apply/helpers/data-compatibility-checker.d.ts.map +0 -1
  317. package/dist/commands/db/apply/helpers/index.d.ts.map +0 -1
  318. package/dist/commands/db/apply/helpers/partition-acl-cleaner.d.ts.map +0 -1
  319. package/dist/commands/db/apply/helpers/partition-prefilter.d.ts.map +0 -1
  320. package/dist/commands/db/apply/helpers/partition-validator.d.ts.map +0 -1
  321. package/dist/commands/db/apply/helpers/pg-schema-diff-helpers.d.ts.map +0 -1
  322. package/dist/commands/db/apply/helpers/plan-validator.d.ts.map +0 -1
  323. package/dist/commands/db/apply/helpers/retry-logic.d.ts.map +0 -1
  324. package/dist/commands/db/apply/helpers/shadow-db-manager.d.ts.map +0 -1
  325. package/dist/commands/db/apply/index.d.ts.map +0 -1
  326. package/dist/commands/db/apply/machine.d.ts.map +0 -1
  327. package/dist/commands/db/commands/db-apply.d.ts.map +0 -1
  328. package/dist/commands/db/commands/db-audit.d.ts.map +0 -1
  329. package/dist/commands/db/commands/db-backup.d.ts.map +0 -1
  330. package/dist/commands/db/commands/db-cleanup.d.ts.map +0 -1
  331. package/dist/commands/db/commands/db-derive-role-passwords.d.ts.map +0 -1
  332. package/dist/commands/db/commands/db-derive-urls.d.ts.map +0 -1
  333. package/dist/commands/db/commands/db-diagram.d.ts.map +0 -1
  334. package/dist/commands/db/commands/db-drizzle.d.ts.map +0 -1
  335. package/dist/commands/db/commands/db-extension.d.ts.map +0 -1
  336. package/dist/commands/db/commands/db-generate-password.d.ts.map +0 -1
  337. package/dist/commands/db/commands/db-lifecycle.d.ts.map +0 -1
  338. package/dist/commands/db/commands/db-rollback.d.ts.map +0 -1
  339. package/dist/commands/db/commands/db-schema.d.ts.map +0 -1
  340. package/dist/commands/db/commands/db-seed-metadata.d.ts.map +0 -1
  341. package/dist/commands/db/commands/db-seed-verify.d.ts.map +0 -1
  342. package/dist/commands/db/commands/db-seed.d.ts.map +0 -1
  343. package/dist/commands/db/commands/db-snapshot.d.ts.map +0 -1
  344. package/dist/commands/db/commands/db-stack.d.ts.map +0 -1
  345. package/dist/commands/db/commands/db-stats.d.ts.map +0 -1
  346. package/dist/commands/db/commands/db-sync.d.ts.map +0 -1
  347. package/dist/commands/db/commands/db-test.d.ts.map +0 -1
  348. package/dist/commands/db/constants.d.ts.map +0 -1
  349. package/dist/commands/db/extension-registry.d.ts.map +0 -1
  350. package/dist/commands/db/index.d.ts.map +0 -1
  351. package/dist/commands/db/preflight/actors.d.ts.map +0 -1
  352. package/dist/commands/db/preflight/contract.d.ts.map +0 -1
  353. package/dist/commands/db/preflight/index.d.ts.map +0 -1
  354. package/dist/commands/db/sync/actors.d.ts.map +0 -1
  355. package/dist/commands/db/sync/contract.d.ts.map +0 -1
  356. package/dist/commands/db/sync/index.d.ts.map +0 -1
  357. package/dist/commands/db/sync/machine.d.ts.map +0 -1
  358. package/dist/commands/db/types.d.ts.map +0 -1
  359. package/dist/commands/db/utils/db-target.d.ts.map +0 -1
  360. package/dist/commands/db/utils/db-url-builder.d.ts.map +0 -1
  361. package/dist/commands/db/utils/error-handlers.d.ts.map +0 -1
  362. package/dist/commands/db/utils/import-impact-analyzer.d.ts.map +0 -1
  363. package/dist/commands/db/utils/preflight-check.d.ts.map +0 -1
  364. package/dist/commands/db/utils/psql.d.ts.map +0 -1
  365. package/dist/commands/db/utils/schema-detector.d.ts.map +0 -1
  366. package/dist/commands/db/utils/schema-sync.d.ts.map +0 -1
  367. package/dist/commands/db/utils/script-runner.d.ts.map +0 -1
  368. package/dist/commands/db/utils/seed-manager.d.ts.map +0 -1
  369. package/dist/commands/db/utils/semantic-mapper.d.ts.map +0 -1
  370. package/dist/commands/db/utils/sql-table-extractor.d.ts.map +0 -1
  371. package/dist/commands/db/utils/stack-detector.d.ts.map +0 -1
  372. package/dist/commands/db/utils/table-registry.d.ts.map +0 -1
  373. package/dist/commands/db/utils/table-source-classifier.d.ts.map +0 -1
  374. package/dist/commands/dev/actors/index.d.ts.map +0 -1
  375. package/dist/commands/dev/commands/dev.d.ts.map +0 -1
  376. package/dist/commands/dev/contract.d.ts.map +0 -1
  377. package/dist/commands/dev/guards.d.ts.map +0 -1
  378. package/dist/commands/dev/helpers/stale-process-detector.d.ts.map +0 -1
  379. package/dist/commands/dev/machine.d.ts.map +0 -1
  380. package/dist/commands/dev/types.d.ts.map +0 -1
  381. package/dist/commands/env/commands/env-check.d.ts.map +0 -1
  382. package/dist/commands/env/commands/env-encrypt.d.ts.map +0 -1
  383. package/dist/commands/env/commands/env-pull.d.ts.map +0 -1
  384. package/dist/commands/env/commands/env-setup.d.ts.map +0 -1
  385. package/dist/commands/env/commands/env-sync.d.ts.map +0 -1
  386. package/dist/commands/env/commands/setup/action.d.ts.map +0 -1
  387. package/dist/commands/env/commands/setup/auth.d.ts.map +0 -1
  388. package/dist/commands/env/commands/setup/file-export.d.ts.map +0 -1
  389. package/dist/commands/env/commands/setup/github-api.d.ts.map +0 -1
  390. package/dist/commands/env/commands/setup/helpers.d.ts.map +0 -1
  391. package/dist/commands/env/commands/setup/index.d.ts.map +0 -1
  392. package/dist/commands/env/commands/setup/parsers.d.ts.map +0 -1
  393. package/dist/commands/env/commands/setup/prompts.d.ts.map +0 -1
  394. package/dist/commands/env/commands/setup/supabase-api.d.ts.map +0 -1
  395. package/dist/commands/env/commands/setup/types.d.ts.map +0 -1
  396. package/dist/commands/env/commands/setup/vercel-api.d.ts.map +0 -1
  397. package/dist/commands/env/constants/local-supabase.d.ts.map +0 -1
  398. package/dist/commands/env/index.d.ts.map +0 -1
  399. package/dist/commands/hotfix/actors.d.ts.map +0 -1
  400. package/dist/commands/hotfix/commands/hotfix-complete.d.ts.map +0 -1
  401. package/dist/commands/hotfix/commands/hotfix-create.d.ts.map +0 -1
  402. package/dist/commands/hotfix/commands/hotfix-deploy.d.ts.map +0 -1
  403. package/dist/commands/hotfix/commands/hotfix-status.d.ts.map +0 -1
  404. package/dist/commands/hotfix/contract.d.ts.map +0 -1
  405. package/dist/commands/hotfix/index.d.ts.map +0 -1
  406. package/dist/commands/hotfix/machine.d.ts.map +0 -1
  407. package/dist/commands/hotfix/metadata.d.ts.map +0 -1
  408. package/dist/commands/hotfix/utils/hotfix-machine-helper.d.ts.map +0 -1
  409. package/dist/commands/init.d.ts.map +0 -1
  410. package/dist/commands/inject-test-attrs/action.d.ts.map +0 -1
  411. package/dist/commands/inject-test-attrs/commands/inject-test-attrs.d.ts.map +0 -1
  412. package/dist/commands/inject-test-attrs/contract.d.ts.map +0 -1
  413. package/dist/commands/inject-test-attrs/detection-diagnostics.d.ts.map +0 -1
  414. package/dist/commands/inject-test-attrs/formatter.d.ts.map +0 -1
  415. package/dist/commands/inject-test-attrs/index.d.ts.map +0 -1
  416. package/dist/commands/inject-test-attrs/manifest-generator.d.ts.map +0 -1
  417. package/dist/commands/inject-test-attrs/processor-utils.d.ts.map +0 -1
  418. package/dist/commands/inject-test-attrs/processor.d.ts.map +0 -1
  419. package/dist/commands/inject-test-attrs/types.d.ts.map +0 -1
  420. package/dist/commands/link.d.ts.map +0 -1
  421. package/dist/commands/manifest/index.d.ts.map +0 -1
  422. package/dist/commands/prepare/commands/prepare.d.ts.map +0 -1
  423. package/dist/commands/prepare/index.d.ts.map +0 -1
  424. package/dist/commands/sdk/commands/publish.d.ts.map +0 -1
  425. package/dist/commands/sdk/index.d.ts.map +0 -1
  426. package/dist/commands/services/index.d.ts.map +0 -1
  427. package/dist/commands/session/index.d.ts.map +0 -1
  428. package/dist/commands/status.d.ts.map +0 -1
  429. package/dist/commands/telemetry.d.ts.map +0 -1
  430. package/dist/commands/template-check/actors/compare.d.ts.map +0 -1
  431. package/dist/commands/template-check/actors/discover.d.ts.map +0 -1
  432. package/dist/commands/template-check/actors/index.d.ts.map +0 -1
  433. package/dist/commands/template-check/actors/report.d.ts.map +0 -1
  434. package/dist/commands/template-check/commands/template-check.d.ts.map +0 -1
  435. package/dist/commands/template-check/config.d.ts.map +0 -1
  436. package/dist/commands/template-check/contract.d.ts.map +0 -1
  437. package/dist/commands/template-check/index.d.ts.map +0 -1
  438. package/dist/commands/template-check/machine.d.ts.map +0 -1
  439. package/dist/commands/template-check/types.d.ts.map +0 -1
  440. package/dist/commands/template-check/utils/diff-analyzer.d.ts.map +0 -1
  441. package/dist/commands/template-check/utils/normalizer.d.ts.map +0 -1
  442. package/dist/commands/template-check/utils/path-mapping.d.ts.map +0 -1
  443. package/dist/commands/test/commands/test-db.d.ts.map +0 -1
  444. package/dist/commands/test/commands/test-e2e.d.ts.map +0 -1
  445. package/dist/commands/test/commands/test-fast.d.ts.map +0 -1
  446. package/dist/commands/test/commands/test-integration.d.ts.map +0 -1
  447. package/dist/commands/test/commands/test-layer.d.ts.map +0 -1
  448. package/dist/commands/test/commands/test-owasp-generate.d.ts.map +0 -1
  449. package/dist/commands/test/commands/test-service.d.ts.map +0 -1
  450. package/dist/commands/test/commands/test-static.d.ts.map +0 -1
  451. package/dist/commands/test/commands/test.d.ts.map +0 -1
  452. package/dist/commands/test/index.d.ts.map +0 -1
  453. package/dist/commands/test-gen.d.ts.map +0 -1
  454. package/dist/commands/ui.d.ts.map +0 -1
  455. package/dist/commands/upgrade.d.ts.map +0 -1
  456. package/dist/commands/validate.d.ts.map +0 -1
  457. package/dist/commands/vuln-check.d.ts.map +0 -1
  458. package/dist/commands/watch.d.ts.map +0 -1
  459. package/dist/commands/workflow/commands/deploy-production.d.ts.map +0 -1
  460. package/dist/commands/workflow/commands/final-status.d.ts.map +0 -1
  461. package/dist/commands/workflow/commands/log.d.ts.map +0 -1
  462. package/dist/commands/workflow/commands/notify.d.ts.map +0 -1
  463. package/dist/commands/workflow/commands/paths.d.ts.map +0 -1
  464. package/dist/commands/workflow/commands/sync.d.ts.map +0 -1
  465. package/dist/commands/workflow/commands/validate.d.ts.map +0 -1
  466. package/dist/commands/workflow/commands/verify-credentials.d.ts.map +0 -1
  467. package/dist/commands/workflow/index.d.ts.map +0 -1
  468. package/dist/commands/workflow/types.d.ts.map +0 -1
  469. package/dist/config/env-files.d.ts.map +0 -1
  470. package/dist/config/env.d.ts.map +0 -1
  471. package/dist/constants/versions.d.ts.map +0 -1
  472. package/dist/contracts/envelope.d.ts.map +0 -1
  473. package/dist/errors/catalog.d.ts.map +0 -1
  474. package/dist/errors/exit-codes.d.ts.map +0 -1
  475. package/dist/errors/index.d.ts.map +0 -1
  476. package/dist/incremental/affected-tests.d.ts.map +0 -1
  477. package/dist/index.d.ts.map +0 -1
  478. package/dist/internal/machines/index.d.ts.map +0 -1
  479. package/dist/internal/machines/machine-runner.d.ts.map +0 -1
  480. package/dist/internal/machines/snapshot-helpers.d.ts.map +0 -1
  481. package/dist/internal/machines/types.d.ts.map +0 -1
  482. package/dist/internal/vuln-checker/analyzers/dependency-analyzer.d.ts.map +0 -1
  483. package/dist/internal/vuln-checker/analyzers/rls-analyzer.d.ts.map +0 -1
  484. package/dist/internal/vuln-checker/analyzers/secret-analyzer.d.ts.map +0 -1
  485. package/dist/internal/vuln-checker/analyzers/typescript-analyzer.d.ts.map +0 -1
  486. package/dist/internal/vuln-checker/config/loader.d.ts.map +0 -1
  487. package/dist/internal/vuln-checker/constants.d.ts.map +0 -1
  488. package/dist/internal/vuln-checker/ignore/matcher.d.ts.map +0 -1
  489. package/dist/internal/vuln-checker/index.d.ts.map +0 -1
  490. package/dist/internal/vuln-checker/reporters/console-reporter.d.ts.map +0 -1
  491. package/dist/internal/vuln-checker/reporters/json-reporter.d.ts.map +0 -1
  492. package/dist/internal/vuln-checker/reporters/markdown-reporter.d.ts.map +0 -1
  493. package/dist/internal/vuln-checker/reporters/sarif-reporter.d.ts.map +0 -1
  494. package/dist/internal/vuln-checker/security/path-validation.d.ts.map +0 -1
  495. package/dist/internal/vuln-checker/types.d.ts.map +0 -1
  496. package/dist/notifiers/desktop-notifier.d.ts.map +0 -1
  497. package/dist/ui/components/db-panel.d.ts.map +0 -1
  498. package/dist/ui/components/status-bar.d.ts.map +0 -1
  499. package/dist/ui/components/test-panel.d.ts.map +0 -1
  500. package/dist/ui/dashboard.d.ts.map +0 -1
  501. package/dist/ui/index.d.ts.map +0 -1
  502. package/dist/utils/config-loader.d.ts.map +0 -1
  503. package/dist/utils/config-updater.d.ts.map +0 -1
  504. package/dist/utils/diagnostics.d.ts.map +0 -1
  505. package/dist/utils/dotenvx.d.ts.map +0 -1
  506. package/dist/utils/env-local-bridge.d.ts.map +0 -1
  507. package/dist/utils/execution-plan.d.ts.map +0 -1
  508. package/dist/utils/github-output-security.d.ts.map +0 -1
  509. package/dist/utils/help-system.d.ts.map +0 -1
  510. package/dist/utils/license/admin-auth.d.ts.map +0 -1
  511. package/dist/utils/license/allowlist-checker.d.ts.map +0 -1
  512. package/dist/utils/license/ci-detector.d.ts.map +0 -1
  513. package/dist/utils/license/index.d.ts.map +0 -1
  514. package/dist/utils/license/owner-resolver.d.ts.map +0 -1
  515. package/dist/utils/license/types.d.ts.map +0 -1
  516. package/dist/utils/license/validate-owner.d.ts.map +0 -1
  517. package/dist/utils/path-security.d.ts.map +0 -1
  518. package/dist/utils/port-allocator.d.ts.map +0 -1
  519. package/dist/utils/secure-exec.d.ts.map +0 -1
  520. package/dist/utils/template-fetcher.d.ts.map +0 -1
  521. package/dist/utils/type-guards.d.ts.map +0 -1
  522. package/dist/utils/vercel-project.d.ts.map +0 -1
  523. package/dist/utils/workspace-detector.d.ts.map +0 -1
  524. package/dist/validators/risk-detector.d.ts.map +0 -1
  525. package/dist/validators/schema-validator.d.ts.map +0 -1
  526. package/dist/version.d.ts.map +0 -1
  527. package/dist/watchers/schema-watcher.d.ts.map +0 -1
  528. package/dist/watchers/test-watcher.d.ts.map +0 -1
@@ -1,70 +1,21 @@
1
- import type { DbApplyInput } from './contract.js';
2
- export interface ApplyResult {
3
- filesApplied: number;
4
- filesSkipped: number;
5
- rolePasswordsSet: number;
6
- }
7
- export interface PgSchemaDiffResult {
8
- sql: string;
9
- hazards: string[];
10
- applied: boolean;
11
- /** Number of retry attempts made (for metrics) */
12
- retryAttempts?: number;
13
- /** Total time spent waiting between retries (ms) */
14
- retryWaitMs?: number;
15
- /** Number of pre-apply data compatibility violations detected */
16
- dataViolations?: number;
17
- /** Warning when SSOT enforcement had issues (schemas applied but cleanup incomplete) */
18
- ssotWarning?: string;
19
- }
20
1
  /**
21
- * Apply idempotent schemas (extensions, RBAC, cleanup) and set role passwords.
2
+ * AI HINT: db apply Actors (Barrel Re-export)
22
3
  *
23
- * Flow:
24
- * 1. Apply idempotent/*.sql files (includes 15_rbac_roles.sql for ROLE creation)
25
- * 2. Set passwords for drizzle_app/drizzle_service if env vars present
4
+ * Purpose: Re-export all actors from split modules for backward compatibility.
5
+ * Consumers use `import * as actors from './actors.js'` (namespace import).
26
6
  *
27
- * @param pass - 'pre' = 1st pass (graceful skip on error), 'post' = 2nd pass (strict)
7
+ * Split modules:
8
+ * - actors/shared.ts: Shared utilities (logger, ApplyResult, helpers)
9
+ * - actors/lock-actors.ts: Advisory lock actors (acquireLock, releaseLock)
10
+ * - actors/idempotent-actors.ts: Idempotent schema actors + isDeferrableError
11
+ * - actors/pg-schema-diff-actors.ts: pg-schema-diff actors + partition validation
12
+ * - actors/seed-actors.ts: Seed application actor
28
13
  */
29
- export declare const applyIdempotentSchemas: import("xstate").PromiseActorLogic<ApplyResult, {
30
- input: DbApplyInput;
31
- targetDir: string;
32
- pass: "pre" | "post";
33
- }, import("xstate").EventObject>;
34
- /**
35
- * Apply schema changes using pg-schema-diff (or direct psql for fresh DB).
36
- *
37
- * Extension Support:
38
- * If pgSchemaDiff.shadowDbExtensions is configured in runa.config.ts,
39
- * creates a shadow database with those extensions installed for type resolution.
40
- * This enables pg-schema-diff to recognize extension-defined types like
41
- * PostGIS geometry or pgvector vector.
42
- *
43
- * @see https://github.com/stripe/pg-schema-diff/pull/194
44
- */
45
- export declare const applyPgSchemaDiff: import("xstate").PromiseActorLogic<PgSchemaDiffResult, {
46
- input: DbApplyInput;
47
- targetDir: string;
48
- }, import("xstate").EventObject>;
49
- /**
50
- * Validate that expected partitions (from idempotent/*.sql) exist in the database.
51
- *
52
- * Non-blocking: failures are logged as warnings, never cause the pipeline to fail.
53
- * This runs after the 2nd idempotent pass so all partitions should exist.
54
- */
55
- export declare const validatePartitions: import("xstate").PromiseActorLogic<{
56
- warnings: string[];
57
- }, {
58
- input: DbApplyInput;
59
- targetDir: string;
60
- }, import("xstate").EventObject>;
61
- /**
62
- * Apply seeds.
63
- */
64
- export declare const applySeeds: import("xstate").PromiseActorLogic<{
65
- applied: boolean;
66
- }, {
67
- input: DbApplyInput;
68
- targetDir: string;
69
- }, import("xstate").EventObject>;
14
+ export type { ApplyResult } from './actors/shared.js';
15
+ export { acquireLock, releaseLock } from './actors/lock-actors.js';
16
+ export { isDeferrableError, applyIdempotentSchemas, previewIdempotentSchemas, } from './actors/idempotent-actors.js';
17
+ export type { IdempotentPreviewResult } from './actors/idempotent-actors.js';
18
+ export { applyPgSchemaDiff, validatePartitions, } from './actors/pg-schema-diff-actors.js';
19
+ export type { PgSchemaDiffResult } from './actors/pg-schema-diff-actors.js';
20
+ export { applySeeds } from './actors/seed-actors.js';
70
21
  //# sourceMappingURL=actors.d.ts.map
@@ -49,10 +49,17 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
49
49
  seedsApplied: z.ZodBoolean;
50
50
  error: z.ZodOptional<z.ZodString>;
51
51
  planSql: z.ZodOptional<z.ZodString>;
52
+ filteredPlanSql: z.ZodOptional<z.ZodString>;
52
53
  checkOnly: z.ZodOptional<z.ZodBoolean>;
53
54
  dataViolations: z.ZodOptional<z.ZodNumber>;
54
55
  ssotWarning: z.ZodOptional<z.ZodString>;
55
56
  partitionWarnings: z.ZodOptional<z.ZodArray<z.ZodString>>;
57
+ idempotentFiles: z.ZodOptional<z.ZodArray<z.ZodString>>;
58
+ idempotentRisks: z.ZodOptional<z.ZodObject<{
59
+ high: z.ZodNumber;
60
+ medium: z.ZodNumber;
61
+ low: z.ZodNumber;
62
+ }, z.core.$strip>>;
56
63
  metrics: z.ZodOptional<z.ZodObject<{
57
64
  totalMs: z.ZodNumber;
58
65
  idempotentMs: z.ZodOptional<z.ZodNumber>;
@@ -60,6 +67,6 @@ export declare const DbApplyOutputSchema: z.ZodObject<{
60
67
  seedMs: z.ZodOptional<z.ZodNumber>;
61
68
  retryAttempts: z.ZodOptional<z.ZodNumber>;
62
69
  }, z.core.$strip>>;
63
- }, z.core.$strip>;
70
+ }, z.core.$strict>;
64
71
  export type DbApplyOutput = z.infer<typeof DbApplyOutputSchema>;
65
72
  //# sourceMappingURL=contract.d.ts.map
@@ -13,7 +13,7 @@
13
13
  * Performance: All queries use LIMIT 100000 subquery cap + 10s timeout.
14
14
  */
15
15
  import type { ValidatedPlan } from './plan-validator.js';
16
- export type DataViolationType = 'not_null' | 'type_cast' | 'check_constraint' | 'unique_constraint';
16
+ export type DataViolationType = 'not_null' | 'type_cast' | 'check_constraint' | 'unique_constraint' | 'query_error' | 'timeout';
17
17
  export interface DataViolation {
18
18
  statementIndex: number;
19
19
  sql: string;
@@ -30,6 +30,8 @@ export interface DataCompatibilityResult {
30
30
  checkedStatements: number;
31
31
  skippedStatements: number;
32
32
  errors: string[];
33
+ /** Number of validation queries that failed (query errors + timeouts) */
34
+ queryErrorCount: number;
33
35
  }
34
36
  /**
35
37
  * Parse SET NOT NULL from ALTER TABLE statement.
@@ -101,8 +103,5 @@ export declare function checkDataCompatibility(dbUrl: string, plan: ValidatedPla
101
103
  verbose?: boolean;
102
104
  timeout?: number;
103
105
  }): DataCompatibilityResult;
104
- /**
105
- * Display data compatibility results to the user.
106
- */
107
106
  export declare function displayDataCompatibilityResults(result: DataCompatibilityResult, verbose: boolean): void;
108
107
  //# sourceMappingURL=data-compatibility-checker.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * AI HINT: Data Integrity Verifier
3
+ *
4
+ * Purpose: Pre/post-apply data integrity checks for schema migrations.
5
+ * Detects unexpected data loss by comparing row count estimates before and after apply.
6
+ *
7
+ * Layers:
8
+ * 1. Pre-apply backup (production only) — pg_dump idempotent-managed tables
9
+ * 2. Pre-apply row estimate capture (pg_class.reltuples)
10
+ * 3. Post-apply row estimate comparison
11
+ * - Full loss (N→0): CRITICAL error (unless --allow-data-loss)
12
+ * - >50% reduction: WARNING log
13
+ *
14
+ * Safety: Non-fatal backup failures log warnings but never block apply.
15
+ */
16
+ /**
17
+ * Backup idempotent-managed table data before applying schema changes.
18
+ * Non-fatal: backup failure logs a warning but does NOT block apply.
19
+ * Only runs for production deployments.
20
+ */
21
+ export declare function backupIdempotentTables(dbUrl: string, protectedTables: string[], verbose: boolean): {
22
+ backupPath: string | null;
23
+ };
24
+ /**
25
+ * Get estimated row counts for all app tables using pg_class.reltuples.
26
+ * Fast (no sequential scan) and sufficient for integrity checks.
27
+ */
28
+ export declare function getTableRowEstimates(dbUrl: string, schemasDir: string, verbose: boolean): Map<string, number>;
29
+ /**
30
+ * Verify data integrity after schema apply.
31
+ * Compares pre-apply and post-apply row estimates.
32
+ *
33
+ * - Full data loss (N→0 where N>0): CRITICAL error (throws)
34
+ * - >50% reduction: WARNING log (informational)
35
+ */
36
+ export declare function verifyDataIntegrity(dbUrl: string, schemasDir: string, preApplyCounts: Map<string, number>, verbose: boolean, allowDataLoss?: boolean): void;
37
+ //# sourceMappingURL=data-integrity-verifier.d.ts.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * AI HINT: Fresh DB Detection and Direct Schema Application
3
+ *
4
+ * Purpose: Detect if a database is fresh (no app tables) and apply schemas directly
5
+ * via psql instead of pg-schema-diff for faster initial setup.
6
+ *
7
+ * Flow:
8
+ * 1. checkFreshDb() — detect if DB has app tables (whitelist/fallback strategies)
9
+ * 2. handleFreshDbCase() — if fresh, apply declarative/*.sql directly + SSOT cleanup
10
+ *
11
+ * Safety: Fail-safe — if all detection fails, assumes existing DB (uses pg-schema-diff).
12
+ */
13
+ import type { DbApplyInput } from '../contract.js';
14
+ export interface PgSchemaDiffResult {
15
+ sql: string;
16
+ hazards: string[];
17
+ applied: boolean;
18
+ filteredPlanSql?: string;
19
+ retryAttempts?: number;
20
+ retryWaitMs?: number;
21
+ dataViolations?: number;
22
+ ssotWarning?: string;
23
+ }
24
+ /**
25
+ * Check if DB has app tables.
26
+ * Returns true if existing DB (has tables), false if fresh DB.
27
+ */
28
+ export declare function hasAppTables(dbUrl: string, schemasDir?: string, customSql?: string, verbose?: boolean): boolean;
29
+ /**
30
+ * Handle fresh DB case - apply schemas directly, then use pg-schema-diff for SSOT cleanup.
31
+ * Returns null if the DB is NOT fresh (existing DB — caller should use pg-schema-diff).
32
+ */
33
+ export declare function handleFreshDbCase(input: DbApplyInput, dbUrl: string, targetDir: string, pgSchemaDiffDir?: string): PgSchemaDiffResult | null;
34
+ //# sourceMappingURL=fresh-db-handler.d.ts.map
@@ -0,0 +1,60 @@
1
+ /**
2
+ * AI HINT: Hazard Handler for pg-schema-diff
3
+ *
4
+ * Purpose: Parse, display, and handle hazards from pg-schema-diff plan output.
5
+ * Separates hazard logic from binary verification and plan execution.
6
+ *
7
+ * Hazard Types:
8
+ * - DELETES_DATA: Data loss risk (blocks production without --allow-data-loss)
9
+ * - AUTHZ_UPDATE: RLS policy changes (blocks production without --confirm-authz-update)
10
+ * - ACQUIRES_ACCESS_EXCLUSIVE_LOCK: Table lock during migration
11
+ * - HAS_UNTRACKABLE_DEPENDENCIES: Cross-schema dependencies
12
+ * - INDEX_BUILD / INDEX_DROPPED: Index operations
13
+ */
14
+ import type { DbApplyInput } from '../contract.js';
15
+ import { type ParsedHazard } from './idempotent-object-registry.js';
16
+ /**
17
+ * Parse hazards from pg-schema-diff output with context.
18
+ * Enhanced to extract the SQL statement that caused each hazard.
19
+ */
20
+ export declare function parseHazardsWithContext(planOutput: string): ParsedHazard[];
21
+ /**
22
+ * Display hazards with context and return flags.
23
+ */
24
+ export declare function displayHazardsWithContext(hazards: ParsedHazard[], verbose: boolean): {
25
+ hasDeletesData: boolean;
26
+ hasAuthzUpdate: boolean;
27
+ };
28
+ /**
29
+ * Handle production data protection for DELETES_DATA hazard.
30
+ */
31
+ export declare function handleProductionDataProtection(allowDataLoss: boolean): void;
32
+ /**
33
+ * Handle production RLS policy protection for AUTHZ_UPDATE hazard.
34
+ */
35
+ export declare function handleProductionAuthzProtection(confirmAuthzUpdate: boolean): void;
36
+ /**
37
+ * Build list of allowed hazards based on environment and flags.
38
+ */
39
+ export declare function buildAllowedHazards(input: DbApplyInput): string[];
40
+ /**
41
+ * Handle hazards with enhanced context display.
42
+ *
43
+ * This function filters out false positive AUTHZ_UPDATE hazards for roles
44
+ * defined in idempotent/*.sql (e.g., drizzle_app, drizzle_service).
45
+ */
46
+ export declare function handleHazardsWithContext(planOutput: string, input: DbApplyInput, schemasDir?: string): {
47
+ hazards: string[];
48
+ hasDeletesData: boolean;
49
+ hasAuthzUpdate: boolean;
50
+ };
51
+ /**
52
+ * Display check mode results.
53
+ */
54
+ export declare function displayCheckModeResults(planOutput: string, filterInfo?: {
55
+ filteredPlanSql: string;
56
+ removedStatements: {
57
+ sql: string;
58
+ }[];
59
+ }): void;
60
+ //# sourceMappingURL=hazard-handler.d.ts.map
@@ -0,0 +1,96 @@
1
+ /**
2
+ * AI HINT: Idempotent Object Registry
3
+ *
4
+ * Purpose: Detect and register all objects defined in idempotent/*.sql files.
5
+ * These objects are invisible to pg-schema-diff's shadow DB, so pg-schema-diff
6
+ * generates DROP statements for them. This registry is used to filter those out.
7
+ *
8
+ * Objects tracked:
9
+ * - Roles (CREATE ROLE) — for AUTHZ_UPDATE false positive filtering
10
+ * - Tables (CREATE TABLE) — for DROP TABLE protection
11
+ * - Functions, Triggers, Views, Types, Sequences — for DROP protection
12
+ *
13
+ * Security: All identifier extraction uses regex on comment-stripped SQL.
14
+ */
15
+ /**
16
+ * Resolve the idempotent directory from a schemasDir path.
17
+ */
18
+ export declare function resolveIdempotentDir(schemasDir?: string): string;
19
+ /**
20
+ * Read and strip comments from all idempotent SQL files.
21
+ * Returns per-file results with filename and comment-stripped content.
22
+ */
23
+ export declare function readIdempotentSqlFiles(idempotentDir: string): Array<{
24
+ file: string;
25
+ content: string;
26
+ }> | null;
27
+ /**
28
+ * Extract role names from idempotent SQL files.
29
+ * These roles are managed outside pg-schema-diff and should not trigger AUTHZ_UPDATE.
30
+ */
31
+ export declare function getIdempotentRoles(schemasDir?: string): string[];
32
+ /**
33
+ * Reset the cached idempotent roles.
34
+ * Useful for testing or when schema files change.
35
+ */
36
+ export declare function resetIdempotentRolesCache(): void;
37
+ /**
38
+ * Extract table names from idempotent SQL files.
39
+ * These tables are managed outside pg-schema-diff and must not be dropped.
40
+ *
41
+ * Also merges tables from `excludeFromOrphanDetection` config.
42
+ */
43
+ export declare function getIdempotentProtectedTables(schemasDir?: string, configExclusions?: string[]): string[];
44
+ export interface IdempotentProtectedObjects {
45
+ tables: string[];
46
+ functions: string[];
47
+ triggers: string[];
48
+ views: string[];
49
+ types: string[];
50
+ sequences: string[];
51
+ }
52
+ /**
53
+ * Extract all protected object names from idempotent/*.sql files.
54
+ *
55
+ * Scans for:
56
+ * - CREATE [OR REPLACE] FUNCTION schema.name(...)
57
+ * - CREATE TRIGGER name ON schema.table
58
+ * - CREATE [OR REPLACE] [MATERIALIZED] VIEW schema.name
59
+ * - CREATE TYPE schema.name
60
+ * - CREATE SEQUENCE schema.name
61
+ */
62
+ export declare function getIdempotentProtectedObjects(schemasDir?: string, configExclusions?: string[]): IdempotentProtectedObjects;
63
+ /**
64
+ * Parsed hazard with context information.
65
+ * Defined here to avoid circular dependency (used by both registry and handler).
66
+ */
67
+ export interface ParsedHazard {
68
+ type: string;
69
+ message: string;
70
+ fullMatch: string;
71
+ /** SQL statement that caused this hazard (if extractable) */
72
+ causingSql?: string;
73
+ /** Line number in the plan output */
74
+ lineNumber?: number;
75
+ }
76
+ /**
77
+ * Check if an AUTHZ_UPDATE hazard is a false positive.
78
+ *
79
+ * False positives occur when the hazard's causingSql is a GRANT/REVOKE statement
80
+ * targeting a role defined in idempotent/*.sql. These are expected to be re-applied
81
+ * by the 2nd-pass idempotent execution.
82
+ *
83
+ * IMPORTANT: Only GRANT/REVOKE statements are considered FP. If causingSql is a
84
+ * schema change (ALTER TABLE, CREATE TABLE, etc.) that triggers an AUTHZ_UPDATE,
85
+ * it is a genuine hazard and should NOT be filtered.
86
+ */
87
+ export declare function isIdempotentRoleHazard(hazard: ParsedHazard, schemasDir?: string): boolean;
88
+ /**
89
+ * Filter out false positive hazards.
90
+ * Returns hazards that are NOT false positives (i.e., real issues).
91
+ */
92
+ export declare function filterFalsePositiveHazards(hazards: ParsedHazard[], schemasDir?: string): {
93
+ filtered: ParsedHazard[];
94
+ falsePositives: ParsedHazard[];
95
+ };
96
+ //# sourceMappingURL=idempotent-object-registry.d.ts.map
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Check if a SQL file contains statements that cannot run inside a transaction block.
3
+ */
4
+ export declare function hasTransactionIncompatibleStatements(filePath: string): boolean;
5
+ /**
6
+ * Check if SQL content contains transaction-incompatible statements.
7
+ * Exported separately for testing without file I/O.
8
+ */
9
+ export declare function hasTransactionIncompatibleContent(sql: string): boolean;
10
+ /**
11
+ * Determine the transaction strategy for a SQL file.
12
+ *
13
+ * @returns 'wrap' if file can be wrapped in BEGIN/COMMIT, 'skip' otherwise
14
+ */
15
+ export declare function getTransactionStrategy(filePath: string): 'wrap' | 'skip';
16
+ /**
17
+ * Wrap SQL content in a transaction block (BEGIN/COMMIT).
18
+ */
19
+ export declare function wrapInTransaction(sql: string): string;
20
+ //# sourceMappingURL=idempotent-transaction.d.ts.map
@@ -20,4 +20,10 @@ export type { DetectedPartitionStub, PrefilterResult } from './partition-prefilt
20
20
  export { prefilterPartitionStubs } from './partition-prefilter.js';
21
21
  export type { ExpectedPartition, PartitionDrift } from './partition-validator.js';
22
22
  export { blankDollarQuotedBodies, detectPartitionDrift, formatPartitionWarnings, parseExpectedPartitions, queryActualPartitions, } from './partition-validator.js';
23
+ export { isValidIdentifier, maskDbCredentials, qualifiedTable, quoteIdent } from './sql-utils.js';
24
+ export type { PgSchemaDiffResult } from './fresh-db-handler.js';
25
+ export { handleFreshDbCase, hasAppTables } from './fresh-db-handler.js';
26
+ export { checkPasswordSecurity, parseDbCredentials, setRolePasswords, } from './rbac-password-manager.js';
27
+ export { backupIdempotentTables, getTableRowEstimates, verifyDataIntegrity, } from './data-integrity-verifier.js';
28
+ export { getTransactionStrategy, hasTransactionIncompatibleContent, hasTransactionIncompatibleStatements, wrapInTransaction, } from './idempotent-transaction.js';
23
29
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,5 @@
1
+ import { blankDollarQuotedBodies, stripSqlComments } from '../../../../lib/sql-comment-utils.js';
2
+ export { blankDollarQuotedBodies, stripSqlComments };
1
3
  export interface ExpectedPartition {
2
4
  /** Qualified child table name (e.g., "events.location_events_2026_01") */
3
5
  child: string;
@@ -10,12 +12,6 @@ export interface PartitionDrift {
10
12
  /** Partitions expected in SQL but missing from the database */
11
13
  missing: ExpectedPartition[];
12
14
  }
13
- /**
14
- * Strip SQL comments while preserving quoted text.
15
- * Handles: -- line comments, nested block comments, single/double/dollar-quoted strings,
16
- * and PostgreSQL E-string literals (E'...' with backslash escapes).
17
- */
18
- export declare function stripSqlComments(content: string): string;
19
15
  /**
20
16
  * Qualified name pattern: optional schema prefix + table name.
21
17
  * Matches: schema.table, "schema"."table", or bare table (no schema).
@@ -43,15 +39,6 @@ export declare const PARTITION_OF_REGEX: RegExp;
43
39
  * Returns "schema.table" when schema is present, or just "table" when absent.
44
40
  */
45
41
  export declare function extractQualifiedName(quotedSchema: string | undefined, unquotedSchema: string | undefined, quotedTable: string | undefined, unquotedTable: string | undefined): string;
46
- /**
47
- * Replace content inside dollar-quoted strings with spaces.
48
- * This prevents false-positive PARTITION OF matches inside PL/pgSQL function bodies.
49
- *
50
- * Input is already comment-stripped (from stripSqlComments), so we only need to
51
- * handle dollar-quoted strings — single/double quotes are already handled by the
52
- * regex (they can't span the CREATE TABLE ... PARTITION OF ... ; pattern).
53
- */
54
- export declare function blankDollarQuotedBodies(content: string): string;
55
42
  /**
56
43
  * Parse all expected partitions from idempotent SQL directory.
57
44
  *
@@ -1,163 +1,37 @@
1
1
  /**
2
2
  * AI HINT: pg-schema-diff Helper Functions
3
3
  *
4
- * Purpose: Utility functions for pg-schema-diff operations
5
- * Pattern: Pure functions for verification, parsing, and display
4
+ * Purpose: Binary verification, plan execution, and error detection for pg-schema-diff.
5
+ * This file was refactored from a 1,015-line monolith into 3 focused modules:
6
6
  *
7
- * False Positive Filtering:
8
- * - AUTHZ_UPDATE hazards for roles defined in idempotent/*.sql are filtered
9
- * - Reason: idempotent files (e.g., 15_rbac_roles.sql) grant privileges that
10
- * pg-schema-diff doesn't know about (it only manages declarative/*.sql)
7
+ * - idempotent-object-registry.ts: Idempotent object detection & DROP protection
8
+ * - hazard-handler.ts: Hazard parsing, display, and production protection
9
+ * - pg-schema-diff-helpers.ts (this file): Binary verification, plan execution, error detection
10
+ *
11
+ * Re-exports are provided for backward compatibility.
11
12
  *
12
13
  * Security:
13
14
  * - All psql calls use parsePostgresUrl + buildPsqlArgs to prevent SQL injection
14
15
  * - Passwords are passed via PGPASSWORD env var, not command line
15
16
  */
16
- import type { DbApplyInput } from '../contract.js';
17
- /**
18
- * Extract role names from idempotent SQL files.
19
- * These roles are managed outside pg-schema-diff and should not trigger AUTHZ_UPDATE.
20
- */
21
- export declare function getIdempotentRoles(schemasDir?: string): string[];
22
- /**
23
- * Check if an AUTHZ_UPDATE hazard is a false positive.
24
- *
25
- * False positives occur when:
26
- * - The hazard type is AUTHZ_UPDATE
27
- * - The causing SQL references a role defined in idempotent/*.sql
28
- * - Example: "REVOKE ... FROM drizzle_app" when drizzle_app is in 15_rbac_roles.sql
29
- */
30
- export declare function isIdempotentRoleHazard(hazard: ParsedHazard, schemasDir?: string): boolean;
31
- /**
32
- * Filter out false positive hazards.
33
- * Returns hazards that are NOT false positives (i.e., real issues).
34
- */
35
- export declare function filterFalsePositiveHazards(hazards: ParsedHazard[], schemasDir?: string): {
36
- filtered: ParsedHazard[];
37
- falsePositives: ParsedHazard[];
38
- };
39
- /**
40
- * Reset the cached idempotent roles.
41
- * Useful for testing or when schema files change.
42
- */
43
- export declare function resetIdempotentRolesCache(): void;
44
- /**
45
- * AI HINT: Idempotent Table Extraction
46
- *
47
- * Purpose: Extract table names defined in idempotent/*.sql files
48
- * Use case: Filter out DROP TABLE statements for these tables from pg-schema-diff plan
49
- *
50
- * Pattern: Parse SQL for CREATE TABLE statements
51
- * Example: CREATE TABLE location_data.location_events → ['location_data.location_events']
52
- *
53
- * Incident context: pg-schema-diff drops tables not in declarative/*.sql because its
54
- * shadow DB doesn't contain idempotent-managed tables. This function identifies those
55
- * tables so their DROP statements can be filtered from the plan output.
56
- */
57
- /**
58
- * Extract table names from idempotent SQL files.
59
- * These tables are managed outside pg-schema-diff and must not be dropped.
60
- *
61
- * Also merges tables from `excludeFromOrphanDetection` config.
62
- */
63
- export declare function getIdempotentProtectedTables(schemasDir?: string, configExclusions?: string[]): string[];
17
+ export type { IdempotentProtectedObjects, ParsedHazard, } from './idempotent-object-registry.js';
18
+ export { filterFalsePositiveHazards, getIdempotentProtectedObjects, getIdempotentProtectedTables, getIdempotentRoles, isIdempotentRoleHazard, resetIdempotentRolesCache, } from './idempotent-object-registry.js';
19
+ export { buildAllowedHazards, displayCheckModeResults, displayHazardsWithContext, handleHazardsWithContext, handleProductionAuthzProtection, handleProductionDataProtection, parseHazardsWithContext, } from './hazard-handler.js';
64
20
  /**
65
21
  * Verify pg-schema-diff binary is available.
66
22
  */
67
- export declare function verifyPgSchemaDiffBinary(): void;
68
- /**
69
- * Verify database connection.
70
- */
71
- export declare function verifyDatabaseConnection(dbUrl: string): void;
72
- /**
73
- * Parsed hazard with context information.
74
- */
75
- export interface ParsedHazard {
76
- type: string;
77
- message: string;
78
- fullMatch: string;
79
- /** SQL statement that caused this hazard (if extractable) */
80
- causingSql?: string;
81
- /** Line number in the plan output */
82
- lineNumber?: number;
23
+ export interface VerifyPgSchemaDiffBinaryOptions {
24
+ strictVersion?: boolean;
83
25
  }
84
26
  /**
85
- * Parse hazards from pg-schema-diff output with context.
86
- * Enhanced to extract the SQL statement that caused each hazard.
87
- */
88
- export declare function parseHazardsWithContext(planOutput: string): ParsedHazard[];
89
- /**
90
- * Display hazards with context and return flags.
91
- */
92
- export declare function displayHazardsWithContext(hazards: ParsedHazard[], verbose: boolean): {
93
- hasDeletesData: boolean;
94
- hasAuthzUpdate: boolean;
95
- };
96
- /**
97
- * Handle production data protection for DELETES_DATA hazard.
98
- */
99
- export declare function handleProductionDataProtection(allowDataLoss: boolean): void;
100
- /**
101
- * Handle production RLS policy protection for AUTHZ_UPDATE hazard.
102
- * RLS policy changes can silently affect security if not explicitly approved.
103
- */
104
- export declare function handleProductionAuthzProtection(confirmAuthzUpdate: boolean): void;
105
- /**
106
- * AI HINT: Idempotent Object Extraction
107
- *
108
- * Purpose: Extract all object names defined in idempotent/*.sql files
109
- * Use case: Filter DROP FUNCTION/TRIGGER/VIEW/TYPE/SEQUENCE from pg-schema-diff plan
110
- *
111
- * Pattern: Parse SQL for CREATE statements (after stripping comments)
112
- * Objects created in idempotent/*.sql are invisible to pg-schema-diff's shadow DB,
113
- * so pg-schema-diff generates DROP statements for them. We must filter these out.
114
- */
115
- export interface IdempotentProtectedObjects {
116
- tables: string[];
117
- functions: string[];
118
- triggers: string[];
119
- views: string[];
120
- types: string[];
121
- sequences: string[];
122
- }
123
- /**
124
- * Extract all protected object names from idempotent/*.sql files.
125
- *
126
- * Scans for:
127
- * - CREATE [OR REPLACE] FUNCTION schema.name(...)
128
- * - CREATE TRIGGER name ON schema.table
129
- * - CREATE [OR REPLACE] [MATERIALIZED] VIEW schema.name
130
- * - CREATE TYPE schema.name
131
- * - CREATE SEQUENCE schema.name
132
- *
133
- * Uses stripSqlComments to avoid matching inside comments.
134
- */
135
- export declare function getIdempotentProtectedObjects(schemasDir?: string, configExclusions?: string[]): IdempotentProtectedObjects;
136
- /**
137
- * Display check mode results.
138
- */
139
- export declare function displayCheckModeResults(planOutput: string, filterInfo?: {
140
- filteredPlanSql: string;
141
- removedStatements: {
142
- sql: string;
143
- }[];
144
- }): void;
145
- /**
146
- * Build list of allowed hazards based on environment and flags.
27
+ * Verify pg-schema-diff binary is available.
28
+ * strictVersion=true blocks unsupported/undetectable versions.
147
29
  */
148
- export declare function buildAllowedHazards(input: DbApplyInput): string[];
30
+ export declare function verifyPgSchemaDiffBinary(options?: VerifyPgSchemaDiffBinaryOptions): void;
149
31
  /**
150
- * Handle hazards with enhanced context display.
151
- * Use this for detailed hazard reporting with SQL context.
152
- *
153
- * This function filters out false positive AUTHZ_UPDATE hazards for roles
154
- * defined in idempotent/*.sql (e.g., drizzle_app, drizzle_service).
32
+ * Verify database connection with retry for transient startup errors.
155
33
  */
156
- export declare function handleHazardsWithContext(planOutput: string, input: DbApplyInput, schemasDir?: string): {
157
- hazards: string[];
158
- hasDeletesData: boolean;
159
- hasAuthzUpdate: boolean;
160
- };
34
+ export declare function verifyDatabaseConnection(dbUrl: string): Promise<void>;
161
35
  export interface MissingExtensionDetection {
162
36
  detected: boolean;
163
37
  missingTypes: string[];
@@ -178,7 +52,6 @@ export interface PartitionPrivilegeDetection {
178
52
  }
179
53
  /**
180
54
  * Detect "privileges on partitions: not implemented" errors in pg-schema-diff output.
181
- * pg-schema-diff v1.0.5 hard-rejects partition privilege diffs in sql_generator.go.
182
55
  */
183
56
  export declare function detectPartitionPrivilegeError(errorOutput: string): PartitionPrivilegeDetection;
184
57
  /**
@@ -187,23 +60,12 @@ export declare function detectPartitionPrivilegeError(errorOutput: string): Part
187
60
  export declare function formatPartitionPrivilegeHint(detection: PartitionPrivilegeDetection): string;
188
61
  /**
189
62
  * Detect DROP TABLE statements in plan output.
190
- * Returns list of "schema.table" names that would be dropped.
191
- * Used for pre-apply warnings (separate from idempotent protection).
192
63
  */
193
64
  export declare function detectDropTableStatements(planOutput: string): string[];
194
- /**
195
- * Options for pg-schema-diff plan execution.
196
- */
197
65
  export interface PgSchemaDiffPlanOptions {
198
66
  /**
199
67
  * Shadow DB DSN for extension type resolution.
200
- *
201
- * When specified, pg-schema-diff uses this database for parsing
202
- * extension-defined types (PostGIS geometry, pgvector vector, etc.).
203
- *
204
- * This is passed as --temp-db-dsn to pg-schema-diff.
205
- *
206
- * @see https://github.com/stripe/pg-schema-diff/pull/194
68
+ * Passed as --temp-db-dsn to pg-schema-diff.
207
69
  */
208
70
  tempDbDsn?: string;
209
71
  }
@@ -211,12 +73,6 @@ export interface PgSchemaDiffPlanOptions {
211
73
  export declare const PG_SCHEMA_DIFF_APPLY_TIMEOUT_MS = 600000;
212
74
  /**
213
75
  * Execute pg-schema-diff plan and handle errors.
214
- *
215
- * @param dbUrl - Source database URL (--from-dsn)
216
- * @param schemasDir - Directory containing declarative SQL schemas (--to-dir)
217
- * @param includeSchemas - Schemas to include in diff
218
- * @param verbose - Enable verbose logging
219
- * @param options - Additional options (tempDbDsn for extension support)
220
76
  */
221
77
  export declare function executePgSchemaDiffPlan(dbUrl: string, schemasDir: string, includeSchemas: string[], verbose: boolean, options?: PgSchemaDiffPlanOptions): {
222
78
  planOutput: string;