sqlew 5.0.8 → 5.2.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 (499) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +19 -10
  3. package/dist/adapters/auth/auth-factory.d.ts +2 -81
  4. package/dist/adapters/auth/auth-factory.d.ts.map +1 -1
  5. package/dist/adapters/auth/auth-factory.js +2 -82
  6. package/dist/adapters/auth/auth-factory.js.map +1 -1
  7. package/dist/adapters/auth/base-auth-provider.d.ts +18 -303
  8. package/dist/adapters/auth/base-auth-provider.d.ts.map +1 -1
  9. package/dist/adapters/auth/base-auth-provider.js +2 -104
  10. package/dist/adapters/auth/base-auth-provider.js.map +1 -1
  11. package/dist/adapters/auth/direct-auth-provider.d.ts +4 -348
  12. package/dist/adapters/auth/direct-auth-provider.d.ts.map +1 -1
  13. package/dist/adapters/auth/direct-auth-provider.js +6 -356
  14. package/dist/adapters/auth/direct-auth-provider.js.map +1 -1
  15. package/dist/adapters/base-adapter.d.ts +31 -598
  16. package/dist/adapters/base-adapter.d.ts.map +1 -1
  17. package/dist/adapters/base-adapter.js +10 -458
  18. package/dist/adapters/base-adapter.js.map +1 -1
  19. package/dist/adapters/index.d.ts +1 -11
  20. package/dist/adapters/index.d.ts.map +1 -1
  21. package/dist/adapters/index.js +1 -11
  22. package/dist/adapters/index.js.map +1 -1
  23. package/dist/adapters/mysql-adapter.d.ts +15 -541
  24. package/dist/adapters/mysql-adapter.d.ts.map +1 -1
  25. package/dist/adapters/mysql-adapter.js +24 -561
  26. package/dist/adapters/mysql-adapter.js.map +1 -1
  27. package/dist/adapters/postgresql-adapter.d.ts +15 -203
  28. package/dist/adapters/postgresql-adapter.d.ts.map +1 -1
  29. package/dist/adapters/postgresql-adapter.js +24 -223
  30. package/dist/adapters/postgresql-adapter.js.map +1 -1
  31. package/dist/adapters/sqlite-adapter.d.ts +4 -28
  32. package/dist/adapters/sqlite-adapter.d.ts.map +1 -1
  33. package/dist/adapters/sqlite-adapter.js +4 -32
  34. package/dist/adapters/sqlite-adapter.js.map +1 -1
  35. package/dist/adapters/types.d.ts +1 -4
  36. package/dist/adapters/types.d.ts.map +1 -1
  37. package/dist/backend/backend-factory.d.ts +3 -3
  38. package/dist/backend/backend-factory.js +3 -3
  39. package/dist/backend/local-backend.d.ts.map +1 -1
  40. package/dist/backend/local-backend.js +0 -5
  41. package/dist/backend/local-backend.js.map +1 -1
  42. package/dist/cli/db-export.d.ts.map +1 -1
  43. package/dist/cli/db-export.js +54 -32
  44. package/dist/cli/db-export.js.map +1 -1
  45. package/dist/cli/db-import.d.ts.map +1 -1
  46. package/dist/cli/db-import.js +32 -31
  47. package/dist/cli/db-import.js.map +1 -1
  48. package/dist/cli/hooks/on-exit-plan.d.ts.map +1 -1
  49. package/dist/cli/hooks/on-exit-plan.js +42 -1
  50. package/dist/cli/hooks/on-exit-plan.js.map +1 -1
  51. package/dist/cli/hooks/on-prompt.d.ts.map +1 -1
  52. package/dist/cli/hooks/on-prompt.js +5 -0
  53. package/dist/cli/hooks/on-prompt.js.map +1 -1
  54. package/dist/cli/hooks/plan-processor.d.ts.map +1 -1
  55. package/dist/cli/hooks/plan-processor.js +16 -2
  56. package/dist/cli/hooks/plan-processor.js.map +1 -1
  57. package/dist/cli/hooks/stdin-parser.d.ts +41 -0
  58. package/dist/cli/hooks/stdin-parser.d.ts.map +1 -1
  59. package/dist/cli/hooks/stdin-parser.js +140 -4
  60. package/dist/cli/hooks/stdin-parser.js.map +1 -1
  61. package/dist/cli/hooks/track-plan.d.ts +13 -0
  62. package/dist/cli/hooks/track-plan.d.ts.map +1 -1
  63. package/dist/cli/hooks/track-plan.js +58 -3
  64. package/dist/cli/hooks/track-plan.js.map +1 -1
  65. package/dist/cli.d.ts.map +1 -1
  66. package/dist/cli.js +1 -12
  67. package/dist/cli.js.map +1 -1
  68. package/dist/config/cloud-config-loader.d.ts +8 -8
  69. package/dist/config/cloud-config-loader.d.ts.map +1 -1
  70. package/dist/config/cloud-config-loader.js +12 -12
  71. package/dist/config/cloud-config-loader.js.map +1 -1
  72. package/dist/config/global-config.d.ts +24 -46
  73. package/dist/config/global-config.d.ts.map +1 -1
  74. package/dist/config/global-config.js +174 -56
  75. package/dist/config/global-config.js.map +1 -1
  76. package/dist/config/loader.d.ts +1 -18
  77. package/dist/config/loader.d.ts.map +1 -1
  78. package/dist/config/loader.js +1 -89
  79. package/dist/config/loader.js.map +1 -1
  80. package/dist/config/types.d.ts +2 -64
  81. package/dist/config/types.d.ts.map +1 -1
  82. package/dist/config/types.js +0 -18
  83. package/dist/config/types.js.map +1 -1
  84. package/dist/database/index.d.ts +1 -2
  85. package/dist/database/index.d.ts.map +1 -1
  86. package/dist/database/index.js +1 -3
  87. package/dist/database/index.js.map +1 -1
  88. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.d.ts.map +1 -1
  89. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js +2 -1
  90. package/dist/database/migrations/v4/20251126000001_v4_migrate_data.js.map +1 -1
  91. package/dist/database/operations/queries.d.ts +0 -4
  92. package/dist/database/operations/queries.d.ts.map +1 -1
  93. package/dist/database/operations/queries.js +0 -8
  94. package/dist/database/operations/queries.js.map +1 -1
  95. package/dist/index.d.ts +1 -1
  96. package/dist/index.js +2 -2
  97. package/dist/index.js.map +1 -1
  98. package/dist/init-rules.d.ts.map +1 -1
  99. package/dist/init-rules.js +0 -1
  100. package/dist/init-rules.js.map +1 -1
  101. package/dist/knexfile.d.ts.map +1 -1
  102. package/dist/knexfile.js +2 -1
  103. package/dist/knexfile.js.map +1 -1
  104. package/dist/migration/local-to-global.d.ts +19 -0
  105. package/dist/migration/local-to-global.d.ts.map +1 -0
  106. package/dist/migration/local-to-global.js +133 -0
  107. package/dist/migration/local-to-global.js.map +1 -0
  108. package/dist/saas-connector/client/types.d.ts +1 -1
  109. package/dist/saas-connector/client/types.d.ts.map +1 -1
  110. package/dist/schema.js +1 -1
  111. package/dist/server/setup.d.ts.map +1 -1
  112. package/dist/server/setup.js +15 -7
  113. package/dist/server/setup.js.map +1 -1
  114. package/dist/tests/backend/backend-factory.test.js +2 -2
  115. package/dist/tests/backend/backend-factory.test.js.map +1 -1
  116. package/dist/tests/docker/native/constraint-operations.test.d.ts +2 -17
  117. package/dist/tests/docker/native/constraint-operations.test.d.ts.map +1 -1
  118. package/dist/tests/docker/native/constraint-operations.test.js +3 -82
  119. package/dist/tests/docker/native/constraint-operations.test.js.map +1 -1
  120. package/dist/tests/docker/native/db-init.d.ts +3 -34
  121. package/dist/tests/docker/native/db-init.d.ts.map +1 -1
  122. package/dist/tests/docker/native/db-init.js +15 -77
  123. package/dist/tests/docker/native/db-init.js.map +1 -1
  124. package/dist/tests/docker/native/decision-operations.test.d.ts +2 -10
  125. package/dist/tests/docker/native/decision-operations.test.d.ts.map +1 -1
  126. package/dist/tests/docker/native/decision-operations.test.js +2 -84
  127. package/dist/tests/docker/native/decision-operations.test.js.map +1 -1
  128. package/dist/tests/docker/native/help-system.test.d.ts +2 -5
  129. package/dist/tests/docker/native/help-system.test.d.ts.map +1 -1
  130. package/dist/tests/docker/native/help-system.test.js +2 -47
  131. package/dist/tests/docker/native/help-system.test.js.map +1 -1
  132. package/dist/tests/docker/native/suggest-tool.test.d.ts +3 -11
  133. package/dist/tests/docker/native/suggest-tool.test.d.ts.map +1 -1
  134. package/dist/tests/docker/native/suggest-tool.test.js +3 -60
  135. package/dist/tests/docker/native/suggest-tool.test.js.map +1 -1
  136. package/dist/tests/docker/native/test-harness.d.ts +2 -23
  137. package/dist/tests/docker/native/test-harness.d.ts.map +1 -1
  138. package/dist/tests/docker/native/test-harness.js +5 -59
  139. package/dist/tests/docker/native/test-harness.js.map +1 -1
  140. package/dist/tests/feature/decision/analytics.test.js +2 -1
  141. package/dist/tests/feature/decision/analytics.test.js.map +1 -1
  142. package/dist/tests/feature/decision/batch-validation-comprehensive.test.js +2 -7
  143. package/dist/tests/feature/decision/batch-validation-comprehensive.test.js.map +1 -1
  144. package/dist/tests/feature/decision/batch-validation.test.js +2 -1
  145. package/dist/tests/feature/decision/batch-validation.test.js.map +1 -1
  146. package/dist/tests/integration/auto-trigger-suggestions.test.js +4 -37
  147. package/dist/tests/integration/auto-trigger-suggestions.test.js.map +1 -1
  148. package/dist/tests/integration/hybrid-similarity-detection.test.js +2 -1
  149. package/dist/tests/integration/hybrid-similarity-detection.test.js.map +1 -1
  150. package/dist/tests/integration/json-export-import.test.d.ts.map +1 -0
  151. package/dist/tests/integration/json-export-import.test.js.map +1 -0
  152. package/dist/tests/unit/case-insensitive-validator.test.d.ts +0 -7
  153. package/dist/tests/unit/case-insensitive-validator.test.d.ts.map +1 -1
  154. package/dist/tests/unit/case-insensitive-validator.test.js +0 -22
  155. package/dist/tests/unit/case-insensitive-validator.test.js.map +1 -1
  156. package/dist/tests/unit/config/cloud-config-loader.test.js +4 -2
  157. package/dist/tests/unit/config/cloud-config-loader.test.js.map +1 -1
  158. package/dist/tests/unit/config/global-db-migration.test.d.ts +12 -0
  159. package/dist/tests/unit/config/global-db-migration.test.d.ts.map +1 -0
  160. package/dist/tests/unit/config/global-db-migration.test.js +117 -0
  161. package/dist/tests/unit/config/global-db-migration.test.js.map +1 -0
  162. package/dist/tests/unit/constraint-scorer.test.d.ts +2 -7
  163. package/dist/tests/unit/constraint-scorer.test.d.ts.map +1 -1
  164. package/dist/tests/unit/constraint-scorer.test.js +2 -28
  165. package/dist/tests/unit/constraint-scorer.test.js.map +1 -1
  166. package/dist/tests/unit/hooks/grok-hook-normalization.test.d.ts +9 -0
  167. package/dist/tests/unit/hooks/grok-hook-normalization.test.d.ts.map +1 -0
  168. package/dist/tests/unit/hooks/grok-hook-normalization.test.js +98 -0
  169. package/dist/tests/unit/hooks/grok-hook-normalization.test.js.map +1 -0
  170. package/dist/tests/unit/hooks/grok-plan-template-injection.test.d.ts +7 -0
  171. package/dist/tests/unit/hooks/grok-plan-template-injection.test.d.ts.map +1 -0
  172. package/dist/tests/unit/hooks/grok-plan-template-injection.test.js +55 -0
  173. package/dist/tests/unit/hooks/grok-plan-template-injection.test.js.map +1 -0
  174. package/dist/tests/unit/universal-knex.test.js +9 -0
  175. package/dist/tests/unit/universal-knex.test.js.map +1 -1
  176. package/dist/tests/unit/validation/parameter-validation.test.js +0 -24
  177. package/dist/tests/unit/validation/parameter-validation.test.js.map +1 -1
  178. package/dist/tests/utils/db-config.d.ts.map +1 -1
  179. package/dist/tests/utils/db-config.js +0 -9
  180. package/dist/tests/utils/db-config.js.map +1 -1
  181. package/dist/tests/utils/db-import.d.ts.map +1 -1
  182. package/dist/tests/utils/db-import.js +0 -3
  183. package/dist/tests/utils/db-import.js.map +1 -1
  184. package/dist/tests/utils/db-schema.d.ts.map +1 -1
  185. package/dist/tests/utils/db-schema.js +48 -51
  186. package/dist/tests/utils/db-schema.js.map +1 -1
  187. package/dist/tests/utils/db-seeding.d.ts.map +1 -1
  188. package/dist/tests/utils/db-seeding.js +0 -3
  189. package/dist/tests/utils/db-seeding.js.map +1 -1
  190. package/dist/tests/utils/index.d.ts +0 -1
  191. package/dist/tests/utils/index.d.ts.map +1 -1
  192. package/dist/tests/utils/index.js +0 -2
  193. package/dist/tests/utils/index.js.map +1 -1
  194. package/dist/tests/utils/test-helpers.d.ts +6 -76
  195. package/dist/tests/utils/test-helpers.d.ts.map +1 -1
  196. package/dist/tests/utils/test-helpers.js +56 -162
  197. package/dist/tests/utils/test-helpers.js.map +1 -1
  198. package/dist/tests/utils/test-lifecycle.d.ts +2 -28
  199. package/dist/tests/utils/test-lifecycle.d.ts.map +1 -1
  200. package/dist/tests/utils/test-lifecycle.js +2 -31
  201. package/dist/tests/utils/test-lifecycle.js.map +1 -1
  202. package/dist/tools/context/index.d.ts +0 -1
  203. package/dist/tools/context/index.d.ts.map +1 -1
  204. package/dist/tools/context/index.js +0 -2
  205. package/dist/tools/context/index.js.map +1 -1
  206. package/dist/tools/context/types.d.ts +1 -1
  207. package/dist/tools/context/types.d.ts.map +1 -1
  208. package/dist/types/actions.d.ts +6 -29
  209. package/dist/types/actions.d.ts.map +1 -1
  210. package/dist/types/actions.js +1 -2
  211. package/dist/types/actions.js.map +1 -1
  212. package/dist/types/constraint/params.d.ts +24 -1
  213. package/dist/types/constraint/params.d.ts.map +1 -1
  214. package/dist/types/constraint/params.js +3 -0
  215. package/dist/types/constraint/params.js.map +1 -1
  216. package/dist/types/constraint/responses.d.ts +18 -1
  217. package/dist/types/constraint/responses.d.ts.map +1 -1
  218. package/dist/types/constraint/responses.js +3 -0
  219. package/dist/types/constraint/responses.js.map +1 -1
  220. package/dist/types/decision/batch.d.ts +2 -5
  221. package/dist/types/decision/batch.d.ts.map +1 -1
  222. package/dist/types/decision/batch.js +3 -3
  223. package/dist/types/decision/batch.js.map +1 -1
  224. package/dist/types/decision/params.d.ts +7 -4
  225. package/dist/types/decision/params.d.ts.map +1 -1
  226. package/dist/types/decision/responses.d.ts +49 -35
  227. package/dist/types/decision/responses.d.ts.map +1 -1
  228. package/dist/types/decision/templates.d.ts +2 -18
  229. package/dist/types/decision/templates.d.ts.map +1 -1
  230. package/dist/types/decision/templates.js +3 -3
  231. package/dist/types/decision/templates.js.map +1 -1
  232. package/dist/types/enums.d.ts +11 -13
  233. package/dist/types/enums.d.ts.map +1 -1
  234. package/dist/types/enums.js +5 -13
  235. package/dist/types/enums.js.map +1 -1
  236. package/dist/types/import-export.d.ts +7 -30
  237. package/dist/types/import-export.d.ts.map +1 -1
  238. package/dist/types/import-export.js +1 -2
  239. package/dist/types/import-export.js.map +1 -1
  240. package/dist/types/index.d.ts +18 -22
  241. package/dist/types/index.d.ts.map +1 -1
  242. package/dist/types/index.js +4 -32
  243. package/dist/types/index.js.map +1 -1
  244. package/dist/types/master-entities.d.ts +1 -10
  245. package/dist/types/master-entities.d.ts.map +1 -1
  246. package/dist/types/master-entities.js +1 -2
  247. package/dist/types/master-entities.js.map +1 -1
  248. package/dist/types/transaction-entities.d.ts +2 -21
  249. package/dist/types/transaction-entities.d.ts.map +1 -1
  250. package/dist/types/transaction-entities.js +1 -1
  251. package/dist/types/validation.d.ts +1 -16
  252. package/dist/types/validation.d.ts.map +1 -1
  253. package/dist/types/validation.js +1 -2
  254. package/dist/types/validation.js.map +1 -1
  255. package/dist/types/view-entities.d.ts +3 -12
  256. package/dist/types/view-entities.d.ts.map +1 -1
  257. package/dist/types/view-entities.js +1 -1
  258. package/dist/types.d.ts +4 -718
  259. package/dist/types.d.ts.map +1 -1
  260. package/dist/types.js +5 -39
  261. package/dist/types.js.map +1 -1
  262. package/dist/utils/parameter-validator.d.ts +2 -2
  263. package/dist/utils/parameter-validator.d.ts.map +1 -1
  264. package/dist/utils/parameter-validator.js.map +1 -1
  265. package/dist/utils/path-normalize.d.ts +23 -0
  266. package/dist/utils/path-normalize.d.ts.map +1 -0
  267. package/dist/utils/path-normalize.js +38 -0
  268. package/dist/utils/path-normalize.js.map +1 -0
  269. package/dist/utils/project-root.d.ts +6 -3
  270. package/dist/utils/project-root.d.ts.map +1 -1
  271. package/dist/utils/project-root.js +11 -3
  272. package/dist/utils/project-root.js.map +1 -1
  273. package/dist/watcher/base-watcher.d.ts +0 -4
  274. package/dist/watcher/base-watcher.d.ts.map +1 -1
  275. package/dist/watcher/base-watcher.js +11 -22
  276. package/dist/watcher/base-watcher.js.map +1 -1
  277. package/docs/CLI_USAGE.md +27 -107
  278. package/docs/CONFIGURATION.md +10 -5
  279. package/docs/DATABASE_AUTH.md +3 -3
  280. package/docs/HOOKS_GUIDE.md +40 -6
  281. package/docs/MIGRATION_TO_SAAS.md +2 -2
  282. package/docs/SHARED_DATABASE.md +108 -0
  283. package/package.json +4 -3
  284. package/dist/adapters/auth/auth-types.d.ts +0 -30
  285. package/dist/adapters/auth/auth-types.d.ts.map +0 -1
  286. package/dist/adapters/auth/auth-types.js +0 -30
  287. package/dist/adapters/auth/auth-types.js.map +0 -1
  288. package/dist/cli/db-dump.d.ts +0 -36
  289. package/dist/cli/db-dump.d.ts.map +0 -1
  290. package/dist/cli/db-dump.js +0 -384
  291. package/dist/cli/db-dump.js.map +0 -1
  292. package/dist/database/config/config-ops.d.ts +0 -42
  293. package/dist/database/config/config-ops.d.ts.map +0 -1
  294. package/dist/database/config/config-ops.js +0 -102
  295. package/dist/database/config/config-ops.js.map +0 -1
  296. package/dist/formatters/adr-formatter.d.ts +0 -22
  297. package/dist/formatters/adr-formatter.d.ts.map +0 -1
  298. package/dist/formatters/adr-formatter.js +0 -127
  299. package/dist/formatters/adr-formatter.js.map +0 -1
  300. package/dist/formatters/confluence-formatter.d.ts +0 -26
  301. package/dist/formatters/confluence-formatter.d.ts.map +0 -1
  302. package/dist/formatters/confluence-formatter.js +0 -129
  303. package/dist/formatters/confluence-formatter.js.map +0 -1
  304. package/dist/formatters/index.d.ts +0 -34
  305. package/dist/formatters/index.d.ts.map +0 -1
  306. package/dist/formatters/index.js +0 -57
  307. package/dist/formatters/index.js.map +0 -1
  308. package/dist/formatters/markdown-formatter.d.ts +0 -16
  309. package/dist/formatters/markdown-formatter.d.ts.map +0 -1
  310. package/dist/formatters/markdown-formatter.js +0 -110
  311. package/dist/formatters/markdown-formatter.js.map +0 -1
  312. package/dist/formatters/notion-formatter.d.ts +0 -29
  313. package/dist/formatters/notion-formatter.d.ts.map +0 -1
  314. package/dist/formatters/notion-formatter.js +0 -177
  315. package/dist/formatters/notion-formatter.js.map +0 -1
  316. package/dist/formatters/types.d.ts +0 -31
  317. package/dist/formatters/types.d.ts.map +0 -1
  318. package/dist/formatters/types.js +0 -6
  319. package/dist/formatters/types.js.map +0 -1
  320. package/dist/tests/database/sql-dump/converters.test.d.ts +0 -7
  321. package/dist/tests/database/sql-dump/converters.test.d.ts.map +0 -1
  322. package/dist/tests/database/sql-dump/converters.test.js +0 -314
  323. package/dist/tests/database/sql-dump/converters.test.js.map +0 -1
  324. package/dist/tests/database/sql-dump/default-conversions.test.d.ts +0 -8
  325. package/dist/tests/database/sql-dump/default-conversions.test.d.ts.map +0 -1
  326. package/dist/tests/database/sql-dump/default-conversions.test.js +0 -141
  327. package/dist/tests/database/sql-dump/default-conversions.test.js.map +0 -1
  328. package/dist/tests/database/sql-dump/table-ordering.test.d.ts +0 -27
  329. package/dist/tests/database/sql-dump/table-ordering.test.d.ts.map +0 -1
  330. package/dist/tests/database/sql-dump/table-ordering.test.js +0 -284
  331. package/dist/tests/database/sql-dump/table-ordering.test.js.map +0 -1
  332. package/dist/tests/database/sql-dump/type-conversion.test.d.ts +0 -8
  333. package/dist/tests/database/sql-dump/type-conversion.test.d.ts.map +0 -1
  334. package/dist/tests/database/sql-dump/type-conversion.test.js +0 -361
  335. package/dist/tests/database/sql-dump/type-conversion.test.js.map +0 -1
  336. package/dist/tests/docker/cross-database.test.d.ts +0 -21
  337. package/dist/tests/docker/cross-database.test.d.ts.map +0 -1
  338. package/dist/tests/docker/cross-database.test.js +0 -308
  339. package/dist/tests/docker/cross-database.test.js.map +0 -1
  340. package/dist/tests/docker/dump-import.test.d.ts +0 -15
  341. package/dist/tests/docker/dump-import.test.d.ts.map +0 -1
  342. package/dist/tests/docker/dump-import.test.js +0 -424
  343. package/dist/tests/docker/dump-import.test.js.map +0 -1
  344. package/dist/tests/docker/fk-constraints.test.d.ts +0 -13
  345. package/dist/tests/docker/fk-constraints.test.d.ts.map +0 -1
  346. package/dist/tests/docker/fk-constraints.test.js +0 -381
  347. package/dist/tests/docker/fk-constraints.test.js.map +0 -1
  348. package/dist/tests/docker/indexes.test.d.ts +0 -12
  349. package/dist/tests/docker/indexes.test.d.ts.map +0 -1
  350. package/dist/tests/docker/indexes.test.js +0 -250
  351. package/dist/tests/docker/indexes.test.js.map +0 -1
  352. package/dist/tests/docker/integration.test.d.ts +0 -16
  353. package/dist/tests/docker/integration.test.d.ts.map +0 -1
  354. package/dist/tests/docker/integration.test.js +0 -323
  355. package/dist/tests/docker/integration.test.js.map +0 -1
  356. package/dist/tests/docker/multi-project-migration.test.d.ts +0 -17
  357. package/dist/tests/docker/multi-project-migration.test.d.ts.map +0 -1
  358. package/dist/tests/docker/multi-project-migration.test.js +0 -394
  359. package/dist/tests/docker/multi-project-migration.test.js.map +0 -1
  360. package/dist/tests/docker/schema-migration.test.d.ts +0 -8
  361. package/dist/tests/docker/schema-migration.test.d.ts.map +0 -1
  362. package/dist/tests/docker/schema-migration.test.js +0 -98
  363. package/dist/tests/docker/schema-migration.test.js.map +0 -1
  364. package/dist/tests/integration/e2e-workflow1-debug.test.d.ts +0 -5
  365. package/dist/tests/integration/e2e-workflow1-debug.test.d.ts.map +0 -1
  366. package/dist/tests/integration/e2e-workflow1-debug.test.js +0 -85
  367. package/dist/tests/integration/e2e-workflow1-debug.test.js.map +0 -1
  368. package/dist/tests/integration/suggest-simple.test.d.ts +0 -5
  369. package/dist/tests/integration/suggest-simple.test.d.ts.map +0 -1
  370. package/dist/tests/integration/suggest-simple.test.js +0 -90
  371. package/dist/tests/integration/suggest-simple.test.js.map +0 -1
  372. package/dist/tests/migrations/test-all-versions-real.d.ts +0 -8
  373. package/dist/tests/migrations/test-all-versions-real.d.ts.map +0 -1
  374. package/dist/tests/migrations/test-all-versions-real.js +0 -236
  375. package/dist/tests/migrations/test-all-versions-real.js.map +0 -1
  376. package/dist/tests/migrations/test-all-versions.d.ts +0 -14
  377. package/dist/tests/migrations/test-all-versions.d.ts.map +0 -1
  378. package/dist/tests/migrations/test-all-versions.js +0 -519
  379. package/dist/tests/migrations/test-all-versions.js.map +0 -1
  380. package/dist/tests/migrations/v4/v4-fresh-install.test.d.ts +0 -7
  381. package/dist/tests/migrations/v4/v4-fresh-install.test.d.ts.map +0 -1
  382. package/dist/tests/migrations/v4/v4-fresh-install.test.js +0 -168
  383. package/dist/tests/migrations/v4/v4-fresh-install.test.js.map +0 -1
  384. package/dist/tests/migrations/v4/v4-migrate-data.test.d.ts +0 -13
  385. package/dist/tests/migrations/v4/v4-migrate-data.test.d.ts.map +0 -1
  386. package/dist/tests/migrations/v4/v4-migrate-data.test.js +0 -264
  387. package/dist/tests/migrations/v4/v4-migrate-data.test.js.map +0 -1
  388. package/dist/tests/unit/utils/case-insensitive-validator.test.d.ts +0 -2
  389. package/dist/tests/unit/utils/case-insensitive-validator.test.d.ts.map +0 -1
  390. package/dist/tests/unit/utils/case-insensitive-validator.test.js +0 -97
  391. package/dist/tests/unit/utils/case-insensitive-validator.test.js.map +0 -1
  392. package/dist/tests/utils/json-export-import.test.d.ts.map +0 -1
  393. package/dist/tests/utils/json-export-import.test.js.map +0 -1
  394. package/dist/tests/utils/task-helpers.d.ts +0 -67
  395. package/dist/tests/utils/task-helpers.d.ts.map +0 -1
  396. package/dist/tests/utils/task-helpers.js +0 -134
  397. package/dist/tests/utils/task-helpers.js.map +0 -1
  398. package/dist/tools/context/actions/export.d.ts +0 -35
  399. package/dist/tools/context/actions/export.d.ts.map +0 -1
  400. package/dist/tools/context/actions/export.js +0 -93
  401. package/dist/tools/context/actions/export.js.map +0 -1
  402. package/dist/types/file/params.d.ts +0 -40
  403. package/dist/types/file/params.d.ts.map +0 -1
  404. package/dist/types/file/params.js +0 -6
  405. package/dist/types/file/params.js.map +0 -1
  406. package/dist/types/file/responses.d.ts +0 -2
  407. package/dist/types/file/responses.d.ts.map +0 -1
  408. package/dist/types/file/responses.js +0 -2
  409. package/dist/types/file/responses.js.map +0 -1
  410. package/dist/types/task/params.d.ts +0 -173
  411. package/dist/types/task/params.d.ts.map +0 -1
  412. package/dist/types/task/params.js +0 -8
  413. package/dist/types/task/params.js.map +0 -1
  414. package/dist/types/task/responses.d.ts +0 -334
  415. package/dist/types/task/responses.d.ts.map +0 -1
  416. package/dist/types/task/responses.js +0 -8
  417. package/dist/types/task/responses.js.map +0 -1
  418. package/dist/utils/sql-dump/core/dependency-sort.d.ts +0 -16
  419. package/dist/utils/sql-dump/core/dependency-sort.d.ts.map +0 -1
  420. package/dist/utils/sql-dump/core/dependency-sort.js +0 -105
  421. package/dist/utils/sql-dump/core/dependency-sort.js.map +0 -1
  422. package/dist/utils/sql-dump/core/generate-dump.d.ts +0 -13
  423. package/dist/utils/sql-dump/core/generate-dump.d.ts.map +0 -1
  424. package/dist/utils/sql-dump/core/generate-dump.js +0 -201
  425. package/dist/utils/sql-dump/core/generate-dump.js.map +0 -1
  426. package/dist/utils/sql-dump/core/index-export.d.ts +0 -10
  427. package/dist/utils/sql-dump/core/index-export.d.ts.map +0 -1
  428. package/dist/utils/sql-dump/core/index-export.js +0 -173
  429. package/dist/utils/sql-dump/core/index-export.js.map +0 -1
  430. package/dist/utils/sql-dump/core/sequence-reset.d.ts +0 -6
  431. package/dist/utils/sql-dump/core/sequence-reset.d.ts.map +0 -1
  432. package/dist/utils/sql-dump/core/sequence-reset.js +0 -28
  433. package/dist/utils/sql-dump/core/sequence-reset.js.map +0 -1
  434. package/dist/utils/sql-dump/core/table-export.d.ts +0 -2
  435. package/dist/utils/sql-dump/core/table-export.d.ts.map +0 -1
  436. package/dist/utils/sql-dump/core/table-export.js +0 -4
  437. package/dist/utils/sql-dump/core/table-export.js.map +0 -1
  438. package/dist/utils/sql-dump/core/view-export.d.ts +0 -2
  439. package/dist/utils/sql-dump/core/view-export.d.ts.map +0 -1
  440. package/dist/utils/sql-dump/core/view-export.js +0 -4
  441. package/dist/utils/sql-dump/core/view-export.js.map +0 -1
  442. package/dist/utils/sql-dump/formatters/bulk-insert.d.ts +0 -14
  443. package/dist/utils/sql-dump/formatters/bulk-insert.d.ts.map +0 -1
  444. package/dist/utils/sql-dump/formatters/bulk-insert.js +0 -177
  445. package/dist/utils/sql-dump/formatters/bulk-insert.js.map +0 -1
  446. package/dist/utils/sql-dump/formatters/identifiers.d.ts +0 -6
  447. package/dist/utils/sql-dump/formatters/identifiers.d.ts.map +0 -1
  448. package/dist/utils/sql-dump/formatters/identifiers.js +0 -16
  449. package/dist/utils/sql-dump/formatters/identifiers.js.map +0 -1
  450. package/dist/utils/sql-dump/formatters/value-formatter.d.ts +0 -14
  451. package/dist/utils/sql-dump/formatters/value-formatter.d.ts.map +0 -1
  452. package/dist/utils/sql-dump/formatters/value-formatter.js +0 -281
  453. package/dist/utils/sql-dump/formatters/value-formatter.js.map +0 -1
  454. package/dist/utils/sql-dump/generators/controls.d.ts +0 -10
  455. package/dist/utils/sql-dump/generators/controls.d.ts.map +0 -1
  456. package/dist/utils/sql-dump/generators/controls.js +0 -36
  457. package/dist/utils/sql-dump/generators/controls.js.map +0 -1
  458. package/dist/utils/sql-dump/generators/headers.d.ts +0 -6
  459. package/dist/utils/sql-dump/generators/headers.d.ts.map +0 -1
  460. package/dist/utils/sql-dump/generators/headers.js +0 -19
  461. package/dist/utils/sql-dump/generators/headers.js.map +0 -1
  462. package/dist/utils/sql-dump/index.d.ts +0 -14
  463. package/dist/utils/sql-dump/index.d.ts.map +0 -1
  464. package/dist/utils/sql-dump/index.js +0 -16
  465. package/dist/utils/sql-dump/index.js.map +0 -1
  466. package/dist/utils/sql-dump/schema/indexes.d.ts +0 -20
  467. package/dist/utils/sql-dump/schema/indexes.d.ts.map +0 -1
  468. package/dist/utils/sql-dump/schema/indexes.js +0 -108
  469. package/dist/utils/sql-dump/schema/indexes.js.map +0 -1
  470. package/dist/utils/sql-dump/schema/primary-keys.d.ts +0 -6
  471. package/dist/utils/sql-dump/schema/primary-keys.d.ts.map +0 -1
  472. package/dist/utils/sql-dump/schema/primary-keys.js +0 -41
  473. package/dist/utils/sql-dump/schema/primary-keys.js.map +0 -1
  474. package/dist/utils/sql-dump/schema/tables.d.ts +0 -15
  475. package/dist/utils/sql-dump/schema/tables.d.ts.map +0 -1
  476. package/dist/utils/sql-dump/schema/tables.js +0 -518
  477. package/dist/utils/sql-dump/schema/tables.js.map +0 -1
  478. package/dist/utils/sql-dump/schema/views.d.ts +0 -11
  479. package/dist/utils/sql-dump/schema/views.d.ts.map +0 -1
  480. package/dist/utils/sql-dump/schema/views.js +0 -116
  481. package/dist/utils/sql-dump/schema/views.js.map +0 -1
  482. package/dist/utils/sql-dump/types.d.ts +0 -10
  483. package/dist/utils/sql-dump/types.d.ts.map +0 -1
  484. package/dist/utils/sql-dump/types.js +0 -3
  485. package/dist/utils/sql-dump/types.js.map +0 -1
  486. package/dist/utils/sql-dump-converters.d.ts +0 -188
  487. package/dist/utils/sql-dump-converters.d.ts.map +0 -1
  488. package/dist/utils/sql-dump-converters.js +0 -315
  489. package/dist/utils/sql-dump-converters.js.map +0 -1
  490. package/dist/watcher/gitignore-parser.d.ts +0 -70
  491. package/dist/watcher/gitignore-parser.d.ts.map +0 -1
  492. package/dist/watcher/gitignore-parser.js +0 -195
  493. package/dist/watcher/gitignore-parser.js.map +0 -1
  494. package/dist/watcher/index.d.ts +0 -9
  495. package/dist/watcher/index.d.ts.map +0 -1
  496. package/dist/watcher/index.js +0 -8
  497. package/dist/watcher/index.js.map +0 -1
  498. /package/dist/tests/{utils → integration}/json-export-import.test.d.ts +0 -0
  499. /package/dist/tests/{utils → integration}/json-export-import.test.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"base-auth-provider.d.ts","sourceRoot":"","sources":["../../../src/adapters/auth/base-auth-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;OAKG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;OAGG;IACH,GAAG,CAAC,EAAE;QACJ;;;WAGG;QACH,EAAE,CAAC,EAAE,MAAM,CAAC;QAEZ;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,GAAG,CAAC,EAAE,MAAM,CAAC;QAEb;;;WAGG;QACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;IAEF;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,8BAAsB,gBAAgB;IACpC;;;;;;OAMG;IACH,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAE1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;gBACS,MAAM,EAAE,cAAc;IAIlC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA8BG;IACH,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAElD;;;;;;;;;;;;;OAaG;IACH,QAAQ,CAAC,aAAa,IAAI,MAAM;IAEhC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAoCG;IACH,QAAQ,CAAC,QAAQ,IAAI,IAAI;CAC1B"}
1
+ {"version":3,"file":"base-auth-provider.d.ts","sourceRoot":"","sources":["../../../src/adapters/auth/base-auth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,6BAA6B;IAC7B,IAAI,EAAE,MAAM,CAAC;IAEb,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAC;IAEjB,8BAA8B;IAC9B,IAAI,EAAE,MAAM,CAAC;IAEb,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,uDAAuD;IACvD,GAAG,CAAC,EAAE;QACJ,8CAA8C;QAC9C,EAAE,CAAC,EAAE,MAAM,CAAC;QACZ,yCAAyC;QACzC,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,yCAAyC;QACzC,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,mDAAmD;QACnD,kBAAkB,CAAC,EAAE,OAAO,CAAC;KAC9B,CAAC;IAEF,0DAA0D;IAC1D,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CACxC;AAED,4DAA4D;AAC5D,8BAAsB,gBAAgB;IACpC,iBAAiB;IACjB,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;gBAE9B,MAAM,EAAE,cAAc;IAIlC,iEAAiE;IACjE,QAAQ,CAAC,YAAY,IAAI,OAAO,CAAC,gBAAgB,CAAC;IAElD,8EAA8E;IAC9E,QAAQ,CAAC,aAAa,IAAI,MAAM;IAEhC,oEAAoE;IACpE,QAAQ,CAAC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjC,4DAA4D;IAC5D,QAAQ,CAAC,QAAQ,IAAI,IAAI;CAC1B"}
@@ -1,109 +1,7 @@
1
- /**
2
- * @fileoverview Base authentication provider for sqlew's multi-RDBMS authentication system.
3
- *
4
- * This module provides the foundation for all authentication providers, enabling support for:
5
- * - SSH tunneling (v3.7.0)
6
- * - Direct connections (v3.7.0)
7
- * - AWS IAM authentication (v3.8.0+)
8
- * - GCP IAM authentication (v3.8.0+)
9
- *
10
- * @module adapters/auth/base-auth-provider
11
- * @since v3.7.0
12
- */
13
- /**
14
- * Abstract base class for all authentication providers.
15
- *
16
- * This class establishes the contract that all authentication providers must implement,
17
- * ensuring consistent behavior across different authentication methods.
18
- *
19
- * **Supported Authentication Methods:**
20
- * - `DirectAuthProvider`: Standard username/password authentication
21
- * - `SshAuthProvider`: SSH tunneling with key-based or password authentication
22
- * - `AwsIamAuthProvider`: AWS RDS IAM database authentication
23
- * - `GcpIamAuthProvider`: GCP Cloud SQL IAM authentication
24
- *
25
- * **Authentication Flow:**
26
- * 1. Provider instantiation with DatabaseConfig
27
- * 2. `validate()` - Verify configuration is valid
28
- * 3. `authenticate()` - Process credentials and return ConnectionParams
29
- * 4. Database connection using returned params
30
- * 5. `cleanup()` - Release resources when connection closes
31
- *
32
- * @abstract
33
- * @class BaseAuthProvider
34
- *
35
- * @example
36
- * // Implementing a custom authentication provider
37
- * class CustomAuthProvider extends BaseAuthProvider {
38
- * async authenticate(): Promise<ConnectionParams> {
39
- * // Implement custom authentication logic
40
- * return {
41
- * host: this.config.connection.host,
42
- * port: this.config.connection.port,
43
- * database: this.config.connection.database,
44
- * user: this.config.auth.user,
45
- * password: await this.getCustomPassword()
46
- * };
47
- * }
48
- *
49
- * getAuthMethod(): string {
50
- * return 'Custom Authentication';
51
- * }
52
- *
53
- * async cleanup(): Promise<void> {
54
- * // Clean up any resources
55
- * }
56
- *
57
- * validate(): void {
58
- * if (!this.config.auth.user) {
59
- * throw new Error('User is required for custom authentication');
60
- * }
61
- * }
62
- * }
63
- *
64
- * @example
65
- * // Using an authentication provider
66
- * const provider = new DirectAuthProvider(config);
67
- * provider.validate();
68
- * const connParams = await provider.authenticate();
69
- * const connection = await createConnection(connParams);
70
- * // ... use connection ...
71
- * await connection.close();
72
- * await provider.cleanup();
73
- */
1
+ /** Abstract base class for all authentication providers. */
74
2
  export class BaseAuthProvider {
75
- /**
76
- * Database configuration containing connection and authentication settings.
77
- * Accessible to child classes for implementing authentication logic.
78
- *
79
- * @protected
80
- * @readonly
81
- */
3
+ /** @protected */
82
4
  config;
83
- /**
84
- * Creates a new authentication provider instance.
85
- *
86
- * @param {DatabaseConfig} config - Database configuration object
87
- *
88
- * @example
89
- * const provider = new SshAuthProvider({
90
- * type: 'postgres',
91
- * connection: {
92
- * host: 'db.internal',
93
- * port: 5432,
94
- * database: 'production'
95
- * },
96
- * auth: {
97
- * type: 'ssh',
98
- * ssh: {
99
- * host: 'bastion.example.com',
100
- * port: 22,
101
- * user: 'deploy',
102
- * privateKey: '/path/to/key.pem'
103
- * }
104
- * }
105
- * });
106
- */
107
5
  constructor(config) {
108
6
  this.config = config;
109
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"base-auth-provider.js","sourceRoot":"","sources":["../../../src/adapters/auth/base-auth-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAyHH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4DG;AACH,MAAM,OAAgB,gBAAgB;IACpC;;;;;;OAMG;IACgB,MAAM,CAAiB;IAE1C;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CAmHF"}
1
+ {"version":3,"file":"base-auth-provider.js","sourceRoot":"","sources":["../../../src/adapters/auth/base-auth-provider.ts"],"names":[],"mappings":"AAmCA,4DAA4D;AAC5D,MAAM,OAAgB,gBAAgB;IACpC,iBAAiB;IACE,MAAM,CAAiB;IAE1C,YAAY,MAAsB;QAChC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CAaF"}
@@ -1,356 +1,12 @@
1
- /**
2
- * @fileoverview Direct authentication provider for sqlew's multi-RDBMS system.
3
- *
4
- * This module implements direct database connections without intermediate tunneling
5
- * or proxy mechanisms. It provides the simplest authentication method, suitable for:
6
- * - Local database instances
7
- * - Docker containers on the same network
8
- * - On-premise servers with direct network access
9
- * - Cloud databases with public endpoints
10
- *
11
- * **Use Cases:**
12
- * - Development environments with local PostgreSQL/MySQL instances
13
- * - Docker Compose services with service-to-service connections
14
- * - On-premise data centers with internal network access
15
- * - Cloud RDS/Cloud SQL instances with allowlisted IP addresses
16
- *
17
- * **Security Considerations:**
18
- * - Supports SSL/TLS encryption for secure connections
19
- * - Password is optional to support future IAM authentication
20
- * - No intermediate resources to manage (unlike SSH tunnels)
21
- * - Direct exposure to database port (ensure proper firewall rules)
22
- *
23
- * @module adapters/auth/direct-auth-provider
24
- * @since v3.7.0
25
- */
26
1
  import { BaseAuthProvider, type ConnectionParams } from './base-auth-provider.js';
27
- /**
28
- * Direct database authentication provider.
29
- *
30
- * Provides straightforward database connections without tunneling, proxy servers,
31
- * or token generation. The provider validates configuration and returns connection
32
- * parameters directly from the config object.
33
- *
34
- * **Authentication Flow:**
35
- * 1. `validate()` - Verify required configuration fields (host, port, database, user)
36
- * 2. `authenticate()` - Return connection parameters directly (no external calls)
37
- * 3. Database connection uses provided credentials
38
- * 4. `cleanup()` - No-op (no resources to release)
39
- *
40
- * **Configuration Requirements:**
41
- * - Database host address
42
- * - Database port number
43
- * - Database name
44
- * - Database username
45
- * - Database password (optional for future IAM support)
46
- * - Optional SSL configuration for encrypted connections
47
- *
48
- * @class DirectAuthProvider
49
- * @extends {BaseAuthProvider}
50
- *
51
- * @example
52
- * // Local PostgreSQL connection
53
- * const config: DatabaseConfig = {
54
- * type: 'postgres',
55
- * connection: {
56
- * host: 'localhost',
57
- * port: 5432,
58
- * database: 'dev_db'
59
- * },
60
- * auth: {
61
- * type: 'direct',
62
- * user: 'postgres',
63
- * password: 'postgres'
64
- * }
65
- * };
66
- *
67
- * const provider = new DirectAuthProvider(config);
68
- * provider.validate();
69
- * const connParams = await provider.authenticate();
70
- * // connParams.host = 'localhost'
71
- * // connParams.port = 5432
72
- *
73
- * @example
74
- * // Docker MySQL connection with SSL
75
- * const config: DatabaseConfig = {
76
- * type: 'mysql',
77
- * connection: {
78
- * host: 'mysql-container',
79
- * port: 3306,
80
- * database: 'app_db'
81
- * },
82
- * auth: {
83
- * type: 'direct',
84
- * user: 'root',
85
- * password: 'root_password',
86
- * ssl: {
87
- * ca: '/path/to/ca.pem',
88
- * rejectUnauthorized: true
89
- * }
90
- * }
91
- * };
92
- *
93
- * @example
94
- * // Cloud RDS connection with SSL (production)
95
- * const config: DatabaseConfig = {
96
- * type: 'postgres',
97
- * connection: {
98
- * host: 'mydb.abc123.us-east-1.rds.amazonaws.com',
99
- * port: 5432,
100
- * database: 'production'
101
- * },
102
- * auth: {
103
- * type: 'direct',
104
- * user: 'admin',
105
- * password: 'secure_password_123',
106
- * ssl: {
107
- * ca: '/etc/ssl/rds-ca-bundle.pem',
108
- * rejectUnauthorized: true
109
- * }
110
- * }
111
- * };
112
- *
113
- * @example
114
- * // Complete usage with cleanup (cleanup is no-op for direct connections)
115
- * const provider = new DirectAuthProvider(config);
116
- * try {
117
- * provider.validate();
118
- * const params = await provider.authenticate();
119
- * const db = await createDatabaseConnection(params);
120
- * await db.query('SELECT 1');
121
- * await db.close();
122
- * } finally {
123
- * await provider.cleanup(); // No-op, but good practice
124
- * }
125
- *
126
- * @example
127
- * // Future IAM authentication (password optional)
128
- * const config: DatabaseConfig = {
129
- * type: 'postgres',
130
- * connection: {
131
- * host: 'mydb.region.rds.amazonaws.com',
132
- * port: 5432,
133
- * database: 'production'
134
- * },
135
- * auth: {
136
- * type: 'direct',
137
- * user: 'iam_user'
138
- * // password will be generated by IAM provider
139
- * }
140
- * };
141
- */
2
+ /** Direct database authentication provider (no tunneling or proxy). */
142
3
  export declare class DirectAuthProvider extends BaseAuthProvider {
143
- /**
144
- * Returns the authentication method name for logging and diagnostics.
145
- *
146
- * @returns {string} 'Direct Connection'
147
- *
148
- * @example
149
- * const provider = new DirectAuthProvider(config);
150
- * console.log(provider.getAuthMethod()); // 'Direct Connection'
151
- */
152
4
  getAuthMethod(): string;
153
- /**
154
- * Validates direct connection configuration before authentication.
155
- *
156
- * **Validation Checks:**
157
- * - Connection config object exists
158
- * - Database host is specified
159
- * - Database port is specified
160
- * - Database name is specified
161
- * - Database user is specified
162
- * - Password is optional (for future IAM authentication support)
163
- *
164
- * This method should be called immediately after provider instantiation
165
- * to fail fast on configuration errors before attempting database connections.
166
- *
167
- * @throws {Error} 'Connection configuration is required for DirectAuthProvider'
168
- * @throws {Error} 'Database host, port, and database name are required'
169
- * @throws {Error} 'Database user is required for direct authentication'
170
- *
171
- * @example
172
- * const provider = new DirectAuthProvider(config);
173
- * try {
174
- * provider.validate();
175
- * // Configuration is valid, proceed with authentication
176
- * } catch (error) {
177
- * console.error('Invalid configuration:', error.message);
178
- * // Fix configuration before retrying
179
- * }
180
- *
181
- * @example
182
- * // Missing connection config
183
- * const invalidConfig = { type: 'postgres', auth: { type: 'direct' } };
184
- * const provider = new DirectAuthProvider(invalidConfig);
185
- * provider.validate(); // Throws: 'Connection configuration is required for DirectAuthProvider'
186
- *
187
- * @example
188
- * // Missing database user
189
- * const config = {
190
- * connection: {
191
- * host: 'localhost',
192
- * port: 5432,
193
- * database: 'mydb'
194
- * },
195
- * auth: {
196
- * type: 'direct'
197
- * // Missing user field
198
- * }
199
- * };
200
- * const provider = new DirectAuthProvider(config);
201
- * provider.validate(); // Throws: 'Database user is required for direct authentication'
202
- *
203
- * @example
204
- * // Valid config (password optional)
205
- * const config = {
206
- * connection: {
207
- * host: 'localhost',
208
- * port: 5432,
209
- * database: 'mydb'
210
- * },
211
- * auth: {
212
- * type: 'direct',
213
- * user: 'postgres'
214
- * // password is optional (for future IAM support)
215
- * }
216
- * };
217
- * const provider = new DirectAuthProvider(config);
218
- * provider.validate(); // Success - password is optional
219
- */
5
+ /** Validates direct connection configuration. */
220
6
  validate(): void;
221
- /**
222
- * Authenticates and returns connection parameters for direct database connection.
223
- *
224
- * This method:
225
- * 1. Validates configuration (defensive check)
226
- * 2. Extracts connection and authentication parameters
227
- * 3. Constructs ConnectionParams object
228
- * 4. Returns parameters immediately (no async operations)
229
- *
230
- * **Connection Parameters:**
231
- * - `host`: Database host address from config
232
- * - `port`: Database port number from config
233
- * - `database`: Database name from config
234
- * - `user`: Database username from config
235
- * - `password`: Database password from config (optional)
236
- * - `ssl`: SSL configuration from config (optional)
237
- *
238
- * **Important Notes:**
239
- * - No external resources are created (unlike SSH tunnels)
240
- * - Returns synchronously despite Promise signature (for consistency with base class)
241
- * - Password is optional to support future IAM authentication methods
242
- * - SSL configuration is passed through unchanged for database client to handle
243
- *
244
- * @returns {Promise<ConnectionParams>} Connection parameters for database client
245
- *
246
- * @throws {Error} If configuration is invalid (call `validate()` first)
247
- *
248
- * @example
249
- * // Basic authentication flow
250
- * const provider = new DirectAuthProvider(config);
251
- * provider.validate();
252
- * const params = await provider.authenticate();
253
- * console.log(params);
254
- * // {
255
- * // host: 'localhost',
256
- * // port: 5432,
257
- * // database: 'dev_db',
258
- * // user: 'postgres',
259
- * // password: 'postgres'
260
- * // }
261
- *
262
- * @example
263
- * // With SSL configuration preserved
264
- * const config = {
265
- * connection: { host: 'db.example.com', port: 5432, database: 'app' },
266
- * auth: {
267
- * type: 'direct',
268
- * user: 'admin',
269
- * password: 'secret',
270
- * ssl: {
271
- * ca: '/path/to/ca.pem',
272
- * rejectUnauthorized: true
273
- * }
274
- * }
275
- * };
276
- * const provider = new DirectAuthProvider(config);
277
- * const params = await provider.authenticate();
278
- * // SSL config passed through to database client
279
- * // params.ssl.ca = '/path/to/ca.pem'
280
- *
281
- * @example
282
- * // Without password (future IAM authentication)
283
- * const config = {
284
- * connection: { host: 'db.example.com', port: 5432, database: 'app' },
285
- * auth: {
286
- * type: 'direct',
287
- * user: 'iam_user'
288
- * // password will be generated by IAM provider
289
- * }
290
- * };
291
- * const provider = new DirectAuthProvider(config);
292
- * const params = await provider.authenticate();
293
- * // params.password will be undefined
294
- *
295
- * @example
296
- * // Error handling (validation errors)
297
- * const provider = new DirectAuthProvider(invalidConfig);
298
- * try {
299
- * const params = await provider.authenticate();
300
- * } catch (error) {
301
- * if (error.message.includes('host')) {
302
- * console.error('Missing database host');
303
- * } else if (error.message.includes('user')) {
304
- * console.error('Missing database user');
305
- * }
306
- * }
307
- */
7
+ /** Authenticates and returns connection parameters. */
308
8
  authenticate(): Promise<ConnectionParams>;
309
- /**
310
- * Cleanup method for direct connections (no-op).
311
- *
312
- * Since direct connections do not create any intermediate resources
313
- * (no SSH tunnels, proxy servers, or temporary tokens), this method
314
- * has nothing to clean up. It is implemented as a no-op for consistency
315
- * with the BaseAuthProvider interface.
316
- *
317
- * **Cleanup Behavior:**
318
- * - No-op (does nothing)
319
- * - Idempotent (safe to call multiple times)
320
- * - Returns immediately
321
- * - Never throws errors
322
- *
323
- * This method exists to maintain API consistency with other auth providers
324
- * that DO require cleanup (e.g., SSHAuthProvider closes tunnels).
325
- *
326
- * @returns {Promise<void>}
327
- *
328
- * @example
329
- * // Basic cleanup (no-op)
330
- * const provider = new DirectAuthProvider(config);
331
- * const params = await provider.authenticate();
332
- * // ... use database connection ...
333
- * await provider.cleanup(); // Does nothing, but good practice
334
- *
335
- * @example
336
- * // Cleanup in finally block (recommended pattern)
337
- * const provider = new DirectAuthProvider(config);
338
- * try {
339
- * const params = await provider.authenticate();
340
- * const db = await connect(params);
341
- * await db.query('SELECT 1');
342
- * } finally {
343
- * // Always cleanup, even though it's a no-op for direct connections
344
- * // This ensures consistency when switching between auth providers
345
- * await provider.cleanup();
346
- * }
347
- *
348
- * @example
349
- * // Multiple cleanup calls (idempotent, no-op)
350
- * await provider.cleanup(); // No-op
351
- * await provider.cleanup(); // Still no-op
352
- * await provider.cleanup(); // Always no-op
353
- */
9
+ /** No-op: direct connections have no resources to clean up. */
354
10
  cleanup(): Promise<void>;
355
11
  }
356
12
  //# sourceMappingURL=direct-auth-provider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"direct-auth-provider.d.ts","sourceRoot":"","sources":["../../../src/adapters/auth/direct-auth-provider.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGlF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkHG;AACH,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD;;;;;;;;OAQG;IACH,aAAa,IAAI,MAAM;IAIvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkEG;IACH,QAAQ,IAAI,IAAI;IAyBhB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAsFG;IACG,YAAY,IAAI,OAAO,CAAC,gBAAgB,CAAC;IA2B/C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4CG;IACG,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAQ/B"}
1
+ {"version":3,"file":"direct-auth-provider.d.ts","sourceRoot":"","sources":["../../../src/adapters/auth/direct-auth-provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAGlF,uEAAuE;AACvE,qBAAa,kBAAmB,SAAQ,gBAAgB;IACtD,aAAa,IAAI,MAAM;IAIvB,iDAAiD;IACjD,QAAQ,IAAI,IAAI;IAwBhB,uDAAuD;IACjD,YAAY,IAAI,OAAO,CAAC,gBAAgB,CAAC;IA2B/C,+DAA+D;IACzD,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;CAG/B"}