@axinom/mosaic-db-common 0.57.0 → 0.58.0-rc.11

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 (393) hide show
  1. package/README.md +9 -3
  2. package/dist/cjs/auth/authentication-subject.d.ts.map +1 -0
  3. package/dist/cjs/auth/authentication-subject.js.map +1 -0
  4. package/dist/{auth → cjs/auth}/helpers.d.ts +2 -2
  5. package/dist/cjs/auth/helpers.d.ts.map +1 -0
  6. package/dist/cjs/auth/helpers.js +58 -0
  7. package/dist/cjs/auth/helpers.js.map +1 -0
  8. package/dist/cjs/auth/index.d.ts +3 -0
  9. package/dist/cjs/auth/index.d.ts.map +1 -0
  10. package/dist/{auth → cjs/auth}/index.js +2 -2
  11. package/dist/cjs/auth/index.js.map +1 -0
  12. package/dist/{cli → cjs/cli}/commands/generate-define-func-migration.d.ts +1 -1
  13. package/dist/cjs/cli/commands/generate-define-func-migration.d.ts.map +1 -0
  14. package/dist/{cli → cjs/cli}/commands/generate-define-func-migration.js +6 -5
  15. package/dist/cjs/cli/commands/generate-define-func-migration.js.map +1 -0
  16. package/dist/{cli → cjs/cli}/commands/generate-vscode-sql-snippets.d.ts +1 -1
  17. package/dist/cjs/cli/commands/generate-vscode-sql-snippets.d.ts.map +1 -0
  18. package/dist/{cli → cjs/cli}/commands/generate-vscode-sql-snippets.js +35 -71
  19. package/dist/cjs/cli/commands/generate-vscode-sql-snippets.js.map +1 -0
  20. package/dist/cjs/cli/commands/index.d.ts +3 -0
  21. package/dist/cjs/cli/commands/index.d.ts.map +1 -0
  22. package/dist/{cli → cjs/cli}/commands/index.js +2 -2
  23. package/dist/cjs/cli/commands/index.js.map +1 -0
  24. package/dist/cjs/cli/commands/utils.d.ts.map +1 -0
  25. package/dist/cjs/cli/commands/utils.js.map +1 -0
  26. package/dist/{cli → cjs/cli}/index.d.ts +1 -1
  27. package/dist/cjs/cli/index.d.ts.map +1 -0
  28. package/dist/{cli → cjs/cli}/index.js +3 -3
  29. package/dist/cjs/cli/index.js.map +1 -0
  30. package/dist/cjs/common/find-up.d.ts +2 -0
  31. package/dist/cjs/common/find-up.d.ts.map +1 -0
  32. package/dist/cjs/common/find-up.js +18 -0
  33. package/dist/cjs/common/find-up.js.map +1 -0
  34. package/dist/cjs/common/index.d.ts +2 -0
  35. package/dist/cjs/common/index.d.ts.map +1 -0
  36. package/dist/{common → cjs/common}/index.js +1 -1
  37. package/dist/cjs/common/index.js.map +1 -0
  38. package/dist/cjs/common/package-root.d.ts +2 -0
  39. package/dist/cjs/common/package-root.d.ts.map +1 -0
  40. package/dist/cjs/common/package-root.js +46 -0
  41. package/dist/cjs/common/package-root.js.map +1 -0
  42. package/dist/{common → cjs/common}/types.d.ts +1 -1
  43. package/dist/cjs/common/types.d.ts.map +1 -0
  44. package/dist/{common → cjs/common}/types.js.map +1 -1
  45. package/dist/cjs/constants/index.d.ts +2 -0
  46. package/dist/cjs/constants/index.d.ts.map +1 -0
  47. package/dist/cjs/constants/index.js +18 -0
  48. package/dist/cjs/constants/index.js.map +1 -0
  49. package/dist/cjs/constants/pg-auth-settings-keys.d.ts.map +1 -0
  50. package/dist/cjs/constants/pg-auth-settings-keys.js.map +1 -0
  51. package/dist/cjs/index.d.ts +11 -0
  52. package/dist/cjs/index.d.ts.map +1 -0
  53. package/dist/cjs/index.js +27 -0
  54. package/dist/cjs/index.js.map +1 -0
  55. package/dist/cjs/messaging/index.d.ts +2 -0
  56. package/dist/cjs/messaging/index.d.ts.map +1 -0
  57. package/dist/{messaging → cjs/messaging}/index.js +1 -1
  58. package/dist/cjs/messaging/index.js.map +1 -0
  59. package/dist/{messaging → cjs/messaging}/messaging-counter.d.ts +1 -1
  60. package/dist/cjs/messaging/messaging-counter.d.ts.map +1 -0
  61. package/dist/cjs/messaging/messaging-counter.js.map +1 -0
  62. package/dist/cjs/middleware/index.d.ts +2 -0
  63. package/dist/cjs/middleware/index.d.ts.map +1 -0
  64. package/dist/{constants → cjs/middleware}/index.js +1 -1
  65. package/dist/cjs/middleware/index.js.map +1 -0
  66. package/dist/{middleware → cjs/middleware}/pg-pool.middleware.d.ts +3 -3
  67. package/dist/cjs/middleware/pg-pool.middleware.d.ts.map +1 -0
  68. package/dist/{middleware → cjs/middleware}/pg-pool.middleware.js +13 -3
  69. package/dist/cjs/middleware/pg-pool.middleware.js.map +1 -0
  70. package/dist/{migrations → cjs/migrations}/compare-migration-hashes-helpers.d.ts +2 -2
  71. package/dist/cjs/migrations/compare-migration-hashes-helpers.d.ts.map +1 -0
  72. package/dist/cjs/migrations/compare-migration-hashes-helpers.js +149 -0
  73. package/dist/cjs/migrations/compare-migration-hashes-helpers.js.map +1 -0
  74. package/dist/{migrations → cjs/migrations}/compare-migration-hashes.d.ts +2 -2
  75. package/dist/cjs/migrations/compare-migration-hashes.d.ts.map +1 -0
  76. package/dist/{migrations → cjs/migrations}/compare-migration-hashes.js +4 -4
  77. package/dist/cjs/migrations/compare-migration-hashes.js.map +1 -0
  78. package/dist/{migrations → cjs/migrations}/create-migrations-logger.d.ts +1 -1
  79. package/dist/cjs/migrations/create-migrations-logger.d.ts.map +1 -0
  80. package/dist/{migrations → cjs/migrations}/create-migrations-logger.js +8 -5
  81. package/dist/cjs/migrations/create-migrations-logger.js.map +1 -0
  82. package/dist/cjs/migrations/index.d.ts +5 -0
  83. package/dist/cjs/migrations/index.d.ts.map +1 -0
  84. package/dist/cjs/migrations/index.js +21 -0
  85. package/dist/cjs/migrations/index.js.map +1 -0
  86. package/dist/cjs/migrations/types.d.ts.map +1 -0
  87. package/dist/cjs/migrations/types.js.map +1 -0
  88. package/dist/cjs/migrations/utils.d.ts +70 -0
  89. package/dist/cjs/migrations/utils.d.ts.map +1 -0
  90. package/dist/cjs/migrations/utils.js +121 -0
  91. package/dist/cjs/migrations/utils.js.map +1 -0
  92. package/dist/cjs/monitoring/index.d.ts +2 -0
  93. package/dist/cjs/monitoring/index.d.ts.map +1 -0
  94. package/dist/{middleware → cjs/monitoring}/index.js +1 -1
  95. package/dist/cjs/monitoring/index.js.map +1 -0
  96. package/dist/{monitoring → cjs/monitoring}/postgres-metrics.d.ts +3 -3
  97. package/dist/cjs/monitoring/postgres-metrics.d.ts.map +1 -0
  98. package/dist/cjs/monitoring/postgres-metrics.js.map +1 -0
  99. package/dist/cjs/package.json +1 -0
  100. package/dist/{replication → cjs/replication}/create-logical-replication-service.d.ts +2 -2
  101. package/dist/cjs/replication/create-logical-replication-service.d.ts.map +1 -0
  102. package/dist/{replication → cjs/replication}/create-logical-replication-service.js +6 -4
  103. package/dist/cjs/replication/create-logical-replication-service.js.map +1 -0
  104. package/dist/{replication → cjs/replication}/ensure-replication-slot-and-publication-exist.d.ts +3 -3
  105. package/dist/cjs/replication/ensure-replication-slot-and-publication-exist.d.ts.map +1 -0
  106. package/dist/{replication → cjs/replication}/ensure-replication-slot-and-publication-exist.js +2 -2
  107. package/dist/cjs/replication/ensure-replication-slot-and-publication-exist.js.map +1 -0
  108. package/dist/cjs/replication/index.d.ts +3 -0
  109. package/dist/cjs/replication/index.d.ts.map +1 -0
  110. package/dist/{replication → cjs/replication}/index.js +2 -2
  111. package/dist/cjs/replication/index.js.map +1 -0
  112. package/dist/cjs/zapatos/index.d.ts +4 -0
  113. package/dist/cjs/zapatos/index.d.ts.map +1 -0
  114. package/dist/cjs/zapatos/index.js +20 -0
  115. package/dist/cjs/zapatos/index.js.map +1 -0
  116. package/dist/{zapatos → cjs/zapatos}/transaction-with-context.d.ts +2 -2
  117. package/dist/cjs/zapatos/transaction-with-context.d.ts.map +1 -0
  118. package/dist/cjs/zapatos/transaction-with-context.js.map +1 -0
  119. package/dist/cjs/zapatos/transform-custom-type.d.ts.map +1 -0
  120. package/dist/cjs/zapatos/transform-custom-type.js.map +1 -0
  121. package/dist/{zapatos → cjs/zapatos}/update-helpers.d.ts +1 -1
  122. package/dist/cjs/zapatos/update-helpers.d.ts.map +1 -0
  123. package/dist/cjs/zapatos/update-helpers.js.map +1 -0
  124. package/dist/esm/auth/authentication-subject.d.ts +44 -0
  125. package/dist/esm/auth/authentication-subject.d.ts.map +1 -0
  126. package/dist/esm/auth/authentication-subject.js +3 -0
  127. package/dist/esm/auth/authentication-subject.js.map +1 -0
  128. package/dist/esm/auth/helpers.d.ts +44 -0
  129. package/dist/esm/auth/helpers.d.ts.map +1 -0
  130. package/dist/esm/auth/helpers.js +53 -0
  131. package/dist/esm/auth/helpers.js.map +1 -0
  132. package/dist/esm/auth/index.d.ts +3 -0
  133. package/dist/esm/auth/index.d.ts.map +1 -0
  134. package/dist/esm/auth/index.js +3 -0
  135. package/dist/esm/auth/index.js.map +1 -0
  136. package/dist/esm/cli/commands/generate-define-func-migration.d.ts +14 -0
  137. package/dist/esm/cli/commands/generate-define-func-migration.d.ts.map +1 -0
  138. package/dist/esm/cli/commands/generate-define-func-migration.js +70 -0
  139. package/dist/esm/cli/commands/generate-define-func-migration.js.map +1 -0
  140. package/dist/esm/cli/commands/generate-vscode-sql-snippets.d.ts +14 -0
  141. package/dist/esm/cli/commands/generate-vscode-sql-snippets.d.ts.map +1 -0
  142. package/dist/esm/cli/commands/generate-vscode-sql-snippets.js +176 -0
  143. package/dist/esm/cli/commands/generate-vscode-sql-snippets.js.map +1 -0
  144. package/dist/esm/cli/commands/index.d.ts +3 -0
  145. package/dist/esm/cli/commands/index.d.ts.map +1 -0
  146. package/dist/esm/cli/commands/index.js +3 -0
  147. package/dist/esm/cli/commands/index.js.map +1 -0
  148. package/dist/esm/cli/commands/utils.d.ts +13 -0
  149. package/dist/esm/cli/commands/utils.d.ts.map +1 -0
  150. package/dist/esm/cli/commands/utils.js +20 -0
  151. package/dist/esm/cli/commands/utils.js.map +1 -0
  152. package/dist/esm/cli/index.d.ts +3 -0
  153. package/dist/esm/cli/index.d.ts.map +1 -0
  154. package/dist/esm/cli/index.js +7 -0
  155. package/dist/esm/cli/index.js.map +1 -0
  156. package/dist/esm/common/find-up.d.ts +2 -0
  157. package/dist/esm/common/find-up.d.ts.map +1 -0
  158. package/dist/esm/common/find-up.js +14 -0
  159. package/dist/esm/common/find-up.js.map +1 -0
  160. package/dist/esm/common/index.d.ts +2 -0
  161. package/dist/esm/common/index.d.ts.map +1 -0
  162. package/dist/esm/common/index.js +2 -0
  163. package/dist/esm/common/index.js.map +1 -0
  164. package/dist/esm/common/package-root.d.ts +2 -0
  165. package/dist/esm/common/package-root.d.ts.map +1 -0
  166. package/dist/esm/common/package-root.js +42 -0
  167. package/dist/esm/common/package-root.js.map +1 -0
  168. package/dist/esm/common/types.d.ts +52 -0
  169. package/dist/esm/common/types.d.ts.map +1 -0
  170. package/dist/esm/common/types.js +2 -0
  171. package/dist/{migrations → esm/common}/types.js.map +1 -1
  172. package/dist/esm/constants/index.d.ts +2 -0
  173. package/dist/esm/constants/index.d.ts.map +1 -0
  174. package/dist/esm/constants/index.js +2 -0
  175. package/dist/esm/constants/index.js.map +1 -0
  176. package/dist/esm/constants/pg-auth-settings-keys.d.ts +32 -0
  177. package/dist/esm/constants/pg-auth-settings-keys.d.ts.map +1 -0
  178. package/dist/esm/constants/pg-auth-settings-keys.js +32 -0
  179. package/dist/esm/constants/pg-auth-settings-keys.js.map +1 -0
  180. package/dist/esm/index.d.ts +11 -0
  181. package/dist/esm/index.d.ts.map +1 -0
  182. package/dist/esm/index.js +11 -0
  183. package/dist/esm/index.js.map +1 -0
  184. package/dist/esm/messaging/index.d.ts +2 -0
  185. package/dist/esm/messaging/index.d.ts.map +1 -0
  186. package/dist/esm/messaging/index.js +2 -0
  187. package/dist/esm/messaging/index.js.map +1 -0
  188. package/dist/esm/messaging/messaging-counter.d.ts +91 -0
  189. package/dist/esm/messaging/messaging-counter.d.ts.map +1 -0
  190. package/dist/esm/messaging/messaging-counter.js +129 -0
  191. package/dist/esm/messaging/messaging-counter.js.map +1 -0
  192. package/dist/esm/middleware/index.d.ts +2 -0
  193. package/dist/esm/middleware/index.d.ts.map +1 -0
  194. package/dist/esm/middleware/index.js +2 -0
  195. package/dist/esm/middleware/index.js.map +1 -0
  196. package/dist/esm/middleware/pg-pool.middleware.d.ts +99 -0
  197. package/dist/esm/middleware/pg-pool.middleware.d.ts.map +1 -0
  198. package/dist/esm/middleware/pg-pool.middleware.js +152 -0
  199. package/dist/esm/middleware/pg-pool.middleware.js.map +1 -0
  200. package/dist/esm/migrations/compare-migration-hashes-helpers.d.ts +14 -0
  201. package/dist/esm/migrations/compare-migration-hashes-helpers.d.ts.map +1 -0
  202. package/dist/{migrations → esm/migrations}/compare-migration-hashes-helpers.js +15 -18
  203. package/dist/esm/migrations/compare-migration-hashes-helpers.js.map +1 -0
  204. package/dist/esm/migrations/compare-migration-hashes.d.ts +17 -0
  205. package/dist/esm/migrations/compare-migration-hashes.d.ts.map +1 -0
  206. package/dist/esm/migrations/compare-migration-hashes.js +52 -0
  207. package/dist/esm/migrations/compare-migration-hashes.js.map +1 -0
  208. package/dist/esm/migrations/create-migrations-logger.d.ts +4 -0
  209. package/dist/esm/migrations/create-migrations-logger.d.ts.map +1 -0
  210. package/dist/esm/migrations/create-migrations-logger.js +35 -0
  211. package/dist/esm/migrations/create-migrations-logger.js.map +1 -0
  212. package/dist/esm/migrations/index.d.ts +5 -0
  213. package/dist/esm/migrations/index.d.ts.map +1 -0
  214. package/dist/esm/migrations/index.js +5 -0
  215. package/dist/esm/migrations/index.js.map +1 -0
  216. package/dist/esm/migrations/types.d.ts +17 -0
  217. package/dist/esm/migrations/types.d.ts.map +1 -0
  218. package/dist/esm/migrations/types.js +2 -0
  219. package/dist/esm/migrations/types.js.map +1 -0
  220. package/dist/esm/migrations/utils.d.ts +70 -0
  221. package/dist/esm/migrations/utils.d.ts.map +1 -0
  222. package/dist/esm/migrations/utils.js +113 -0
  223. package/dist/esm/migrations/utils.js.map +1 -0
  224. package/dist/esm/monitoring/index.d.ts +2 -0
  225. package/dist/esm/monitoring/index.d.ts.map +1 -0
  226. package/dist/esm/monitoring/index.js +2 -0
  227. package/dist/esm/monitoring/index.js.map +1 -0
  228. package/dist/esm/monitoring/postgres-metrics.d.ts +15 -0
  229. package/dist/esm/monitoring/postgres-metrics.d.ts.map +1 -0
  230. package/dist/esm/monitoring/postgres-metrics.js +39 -0
  231. package/dist/esm/monitoring/postgres-metrics.js.map +1 -0
  232. package/dist/esm/package.json +1 -0
  233. package/dist/esm/replication/create-logical-replication-service.d.ts +79 -0
  234. package/dist/esm/replication/create-logical-replication-service.d.ts.map +1 -0
  235. package/dist/esm/replication/create-logical-replication-service.js +145 -0
  236. package/dist/esm/replication/create-logical-replication-service.js.map +1 -0
  237. package/dist/esm/replication/ensure-replication-slot-and-publication-exist.d.ts +64 -0
  238. package/dist/esm/replication/ensure-replication-slot-and-publication-exist.d.ts.map +1 -0
  239. package/dist/esm/replication/ensure-replication-slot-and-publication-exist.js +50 -0
  240. package/dist/esm/replication/ensure-replication-slot-and-publication-exist.js.map +1 -0
  241. package/dist/esm/replication/index.d.ts +3 -0
  242. package/dist/esm/replication/index.d.ts.map +1 -0
  243. package/dist/esm/replication/index.js +3 -0
  244. package/dist/esm/replication/index.js.map +1 -0
  245. package/dist/esm/zapatos/index.d.ts +4 -0
  246. package/dist/esm/zapatos/index.d.ts.map +1 -0
  247. package/dist/esm/zapatos/index.js +4 -0
  248. package/dist/esm/zapatos/index.js.map +1 -0
  249. package/dist/esm/zapatos/transaction-with-context.d.ts +22 -0
  250. package/dist/esm/zapatos/transaction-with-context.d.ts.map +1 -0
  251. package/dist/esm/zapatos/transaction-with-context.js +36 -0
  252. package/dist/esm/zapatos/transaction-with-context.js.map +1 -0
  253. package/dist/esm/zapatos/transform-custom-type.d.ts +5 -0
  254. package/dist/esm/zapatos/transform-custom-type.d.ts.map +1 -0
  255. package/dist/esm/zapatos/transform-custom-type.js +8 -0
  256. package/dist/esm/zapatos/transform-custom-type.js.map +1 -0
  257. package/dist/esm/zapatos/update-helpers.d.ts +36 -0
  258. package/dist/esm/zapatos/update-helpers.d.ts.map +1 -0
  259. package/dist/esm/zapatos/update-helpers.js +39 -0
  260. package/dist/esm/zapatos/update-helpers.js.map +1 -0
  261. package/package.json +29 -9
  262. package/src/auth/helpers.spec.ts +3 -3
  263. package/src/auth/helpers.ts +4 -4
  264. package/src/auth/index.ts +2 -2
  265. package/src/cli/commands/commands.spec.ts +93 -0
  266. package/src/cli/commands/generate-define-func-migration.ts +9 -4
  267. package/src/cli/commands/generate-vscode-sql-snippets.ts +19 -21
  268. package/src/cli/commands/index.ts +2 -2
  269. package/src/cli/index.ts +2 -2
  270. package/src/common/find-up.ts +20 -0
  271. package/src/common/index.ts +1 -1
  272. package/src/common/package-root.ts +68 -0
  273. package/src/common/types.ts +1 -1
  274. package/src/constants/index.ts +1 -1
  275. package/src/index.ts +10 -10
  276. package/src/messaging/index.ts +1 -1
  277. package/src/messaging/messaging-counter.ts +8 -2
  278. package/src/middleware/index.ts +1 -1
  279. package/src/middleware/pg-pool.middleware.ts +10 -4
  280. package/src/migrations/compare-migration-hashes-helpers.ts +11 -3
  281. package/src/migrations/compare-migration-hashes.spec.ts +12 -3
  282. package/src/migrations/compare-migration-hashes.ts +6 -3
  283. package/src/migrations/create-migrations-logger.ts +10 -10
  284. package/src/migrations/index.ts +4 -4
  285. package/src/migrations/utils.spec.ts +31 -0
  286. package/src/migrations/utils.ts +91 -44
  287. package/src/monitoring/index.ts +1 -1
  288. package/src/monitoring/postgres-metrics.ts +3 -3
  289. package/src/replication/create-logical-replication-service.spec.ts +3 -3
  290. package/src/replication/create-logical-replication-service.ts +3 -3
  291. package/src/replication/ensure-replication-slot-and-publication-exist.spec.ts +3 -3
  292. package/src/replication/ensure-replication-slot-and-publication-exist.ts +4 -4
  293. package/src/replication/index.ts +2 -2
  294. package/src/zapatos/index.ts +3 -3
  295. package/src/zapatos/transaction-with-context.ts +4 -4
  296. package/src/zapatos/transform-custom-type.spec.ts +1 -1
  297. package/src/zapatos/update-helpers.spec.ts +1 -1
  298. package/src/zapatos/update-helpers.ts +1 -1
  299. package/dist/auth/authentication-subject.d.ts.map +0 -1
  300. package/dist/auth/authentication-subject.js.map +0 -1
  301. package/dist/auth/helpers.d.ts.map +0 -1
  302. package/dist/auth/helpers.js +0 -47
  303. package/dist/auth/helpers.js.map +0 -1
  304. package/dist/auth/index.d.ts +0 -3
  305. package/dist/auth/index.d.ts.map +0 -1
  306. package/dist/auth/index.js.map +0 -1
  307. package/dist/cli/commands/generate-define-func-migration.d.ts.map +0 -1
  308. package/dist/cli/commands/generate-define-func-migration.js.map +0 -1
  309. package/dist/cli/commands/generate-vscode-sql-snippets.d.ts.map +0 -1
  310. package/dist/cli/commands/generate-vscode-sql-snippets.js.map +0 -1
  311. package/dist/cli/commands/index.d.ts +0 -3
  312. package/dist/cli/commands/index.d.ts.map +0 -1
  313. package/dist/cli/commands/index.js.map +0 -1
  314. package/dist/cli/commands/utils.d.ts.map +0 -1
  315. package/dist/cli/commands/utils.js.map +0 -1
  316. package/dist/cli/index.d.ts.map +0 -1
  317. package/dist/cli/index.js.map +0 -1
  318. package/dist/common/index.d.ts +0 -2
  319. package/dist/common/index.d.ts.map +0 -1
  320. package/dist/common/index.js.map +0 -1
  321. package/dist/common/types.d.ts.map +0 -1
  322. package/dist/constants/index.d.ts +0 -2
  323. package/dist/constants/index.d.ts.map +0 -1
  324. package/dist/constants/index.js.map +0 -1
  325. package/dist/constants/pg-auth-settings-keys.d.ts.map +0 -1
  326. package/dist/constants/pg-auth-settings-keys.js.map +0 -1
  327. package/dist/index.d.ts +0 -11
  328. package/dist/index.d.ts.map +0 -1
  329. package/dist/index.js +0 -27
  330. package/dist/index.js.map +0 -1
  331. package/dist/messaging/index.d.ts +0 -2
  332. package/dist/messaging/index.d.ts.map +0 -1
  333. package/dist/messaging/index.js.map +0 -1
  334. package/dist/messaging/messaging-counter.d.ts.map +0 -1
  335. package/dist/messaging/messaging-counter.js.map +0 -1
  336. package/dist/middleware/index.d.ts +0 -2
  337. package/dist/middleware/index.d.ts.map +0 -1
  338. package/dist/middleware/index.js.map +0 -1
  339. package/dist/middleware/pg-pool.middleware.d.ts.map +0 -1
  340. package/dist/middleware/pg-pool.middleware.js.map +0 -1
  341. package/dist/migrations/compare-migration-hashes-helpers.d.ts.map +0 -1
  342. package/dist/migrations/compare-migration-hashes-helpers.js.map +0 -1
  343. package/dist/migrations/compare-migration-hashes.d.ts.map +0 -1
  344. package/dist/migrations/compare-migration-hashes.js.map +0 -1
  345. package/dist/migrations/create-migrations-logger.d.ts.map +0 -1
  346. package/dist/migrations/create-migrations-logger.js.map +0 -1
  347. package/dist/migrations/index.d.ts +0 -5
  348. package/dist/migrations/index.d.ts.map +0 -1
  349. package/dist/migrations/index.js +0 -21
  350. package/dist/migrations/index.js.map +0 -1
  351. package/dist/migrations/types.d.ts.map +0 -1
  352. package/dist/migrations/utils.d.ts +0 -38
  353. package/dist/migrations/utils.d.ts.map +0 -1
  354. package/dist/migrations/utils.js +0 -111
  355. package/dist/migrations/utils.js.map +0 -1
  356. package/dist/monitoring/index.d.ts +0 -2
  357. package/dist/monitoring/index.d.ts.map +0 -1
  358. package/dist/monitoring/index.js +0 -18
  359. package/dist/monitoring/index.js.map +0 -1
  360. package/dist/monitoring/postgres-metrics.d.ts.map +0 -1
  361. package/dist/monitoring/postgres-metrics.js.map +0 -1
  362. package/dist/replication/create-logical-replication-service.d.ts.map +0 -1
  363. package/dist/replication/create-logical-replication-service.js.map +0 -1
  364. package/dist/replication/ensure-replication-slot-and-publication-exist.d.ts.map +0 -1
  365. package/dist/replication/ensure-replication-slot-and-publication-exist.js.map +0 -1
  366. package/dist/replication/index.d.ts +0 -3
  367. package/dist/replication/index.d.ts.map +0 -1
  368. package/dist/replication/index.js.map +0 -1
  369. package/dist/zapatos/index.d.ts +0 -4
  370. package/dist/zapatos/index.d.ts.map +0 -1
  371. package/dist/zapatos/index.js +0 -20
  372. package/dist/zapatos/index.js.map +0 -1
  373. package/dist/zapatos/transaction-with-context.d.ts.map +0 -1
  374. package/dist/zapatos/transaction-with-context.js.map +0 -1
  375. package/dist/zapatos/transform-custom-type.d.ts.map +0 -1
  376. package/dist/zapatos/transform-custom-type.js.map +0 -1
  377. package/dist/zapatos/update-helpers.d.ts.map +0 -1
  378. package/dist/zapatos/update-helpers.js.map +0 -1
  379. /package/dist/{auth → cjs/auth}/authentication-subject.d.ts +0 -0
  380. /package/dist/{auth → cjs/auth}/authentication-subject.js +0 -0
  381. /package/dist/{cli → cjs/cli}/commands/utils.d.ts +0 -0
  382. /package/dist/{cli → cjs/cli}/commands/utils.js +0 -0
  383. /package/dist/{common → cjs/common}/types.js +0 -0
  384. /package/dist/{constants → cjs/constants}/pg-auth-settings-keys.d.ts +0 -0
  385. /package/dist/{constants → cjs/constants}/pg-auth-settings-keys.js +0 -0
  386. /package/dist/{messaging → cjs/messaging}/messaging-counter.js +0 -0
  387. /package/dist/{migrations → cjs/migrations}/types.d.ts +0 -0
  388. /package/dist/{migrations → cjs/migrations}/types.js +0 -0
  389. /package/dist/{monitoring → cjs/monitoring}/postgres-metrics.js +0 -0
  390. /package/dist/{zapatos → cjs/zapatos}/transaction-with-context.js +0 -0
  391. /package/dist/{zapatos → cjs/zapatos}/transform-custom-type.d.ts +0 -0
  392. /package/dist/{zapatos → cjs/zapatos}/transform-custom-type.js +0 -0
  393. /package/dist/{zapatos → cjs/zapatos}/update-helpers.js +0 -0
package/README.md CHANGED
@@ -2,9 +2,15 @@
2
2
 
3
3
  ## About the Package
4
4
 
5
- This package is part of the Axinom Mosaic development platform. More information can be found at https://portal.axinom.com/mosaic.
5
+ This package is part of the Axinom Mosaic development platform. More information
6
+ can be found at https://portal.axinom.com/mosaic.
6
7
 
7
8
  ## License
8
9
 
9
- This package can be licensed under the [Axinom Products Licensing Agreement](https://portal.axinom.com/mosaic/contracts/products-licensing-agreement) or evaluated under the [Axinom Products Evaluation Agreement](https://portal.axinom.com/mosaic/contracts/products-evaluation-agreement).
10
- No part of Axinom's software may be copied, modified, propagated, or distributed except in accordance with the terms contained in the Axinom Products Licensing Agreement and Axinom Products Evaluation Agreement.
10
+ This package can be licensed under the
11
+ [Axinom Products Licensing Agreement](https://portal.axinom.com/mosaic/contracts/products-licensing-agreement)
12
+ or evaluated under the
13
+ [Axinom Products Evaluation Agreement](https://portal.axinom.com/mosaic/contracts/products-evaluation-agreement).
14
+ No part of Axinom's software may be copied, modified, propagated, or distributed
15
+ except in accordance with the terms contained in the Axinom Products Licensing
16
+ Agreement and Axinom Products Evaluation Agreement.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication-subject.d.ts","sourceRoot":"","sources":["../../../src/auth/authentication-subject.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AAEH,MAAM,WAAW,gCAAgC;IAC/C,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE;QACX,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;KACzB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,MAAM,WAAW,iCAAiC;IAChD,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IAEb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authentication-subject.js","sourceRoot":"","sources":["../../../src/auth/authentication-subject.ts"],"names":[],"mappings":";AAAA,0LAA0L"}
@@ -1,5 +1,5 @@
1
- import { Dict } from '../common';
2
- import { PgAuthenticatedEndUser, PgAuthenticatedEndUserApplication, PgAuthenticatedManagementSubject } from './authentication-subject';
1
+ import type { Dict } from '../common/index.js';
2
+ import type { PgAuthenticatedEndUser, PgAuthenticatedEndUserApplication, PgAuthenticatedManagementSubject } from './authentication-subject.js';
3
3
  /**
4
4
  * Builds a pg settings object for the currently authenticated management subject.
5
5
  * Used for RLS authentication in both PostGraphile and zapatos.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../src/auth/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAiB/C,OAAO,KAAK,EACV,sBAAsB,EACtB,iCAAiC,EACjC,gCAAgC,EACjC,MAAM,6BAA6B,CAAC;AAErC;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,GAChB,IAAI,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,MAAM,EAAE,MAAM,GACb,IAAI,CAAC,MAAM,CAAC,CAAC;AAahB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gCAAgC,GAAG,SAAS,EACrD,SAAS,CAAC,EAAE,MAAM,GACjB,IAAI,CAAC,MAAM,CAAC,CAAC;AAEhB;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,gCAAgC,GAAG,SAAS,GACpD,IAAI,CAAC,MAAM,CAAC,CAAC;AAuChB;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,OAAO,EACH,sBAAsB,GACtB,iCAAiC,GACjC,SAAS,EACb,MAAM,EAAE,MAAM,GACb,IAAI,CAAC,MAAM,CAAC,CASd"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildPgSettings = buildPgSettings;
4
+ exports.buildAuthPgSettings = buildAuthPgSettings;
5
+ exports.buildEndUserAuthPgSettings = buildEndUserAuthPgSettings;
6
+ const index_js_1 = require("../constants/index.js");
7
+ function buildPgSettings(subject, dbRole, serviceId) {
8
+ return {
9
+ role: dbRole, // Each GraphQL Request will run on the DB as dedicated gql role
10
+ ...buildAuthPgSettings(subject, serviceId),
11
+ };
12
+ }
13
+ function buildAuthPgSettings(subject, serviceId) {
14
+ const pgSettings = {
15
+ // Common settings
16
+ [index_js_1.MOSAIC_AUTH_SUBJECT_NAME]: subject?.name ?? index_js_1.DEFAULT_AUTH_SUBJECT_NAME,
17
+ [index_js_1.MOSAIC_TENANT_ID]: subject?.tenantId ?? '',
18
+ [index_js_1.MOSAIC_ENVIRONMENT_ID]: subject?.environmentId ?? '',
19
+ [index_js_1.PGMEMENTO_SESSION_INFO]: JSON.stringify({
20
+ environmentId: subject?.environmentId,
21
+ tenantId: subject?.tenantId,
22
+ sub: subject?.sub,
23
+ }),
24
+ ...(serviceId && { [index_js_1.MOSAIC_AUTH_TAGS]: subject?.tags?.join?.(',') ?? '' }),
25
+ ...(serviceId && {
26
+ [index_js_1.MOSAIC_AUTH_PERMISSIONS]: subject?.permissions?.[serviceId]?.join?.(',') ?? '',
27
+ }),
28
+ // ID Service specific settings
29
+ [index_js_1.MOSAIC_ID_SERVICE_AUTH_SUBJECT_NAME]: subject?.name ?? index_js_1.DEFAULT_AUTH_SUBJECT_NAME,
30
+ [index_js_1.MOSAIC_ID_SERVICE_TENANT_ID]: subject?.tenantId ?? '',
31
+ [index_js_1.MOSAIC_ID_SERVICE_ENVIRONMENT_ID]: subject?.environmentId ?? '',
32
+ ...(serviceId && {
33
+ [index_js_1.MOSAIC_ID_SERVICE_AUTH_TAGS]: subject?.tags?.join?.(',') ?? '',
34
+ }),
35
+ ...(serviceId && {
36
+ [index_js_1.MOSAIC_ID_SERVICE_AUTH_PERMISSIONS]: subject?.permissions?.[serviceId]?.join?.(',') ?? '',
37
+ }),
38
+ };
39
+ return pgSettings;
40
+ }
41
+ /**
42
+ * Builds a pg settings object for the currently authenticated end-user or end-user application with a dedicated DB Role.
43
+ * Used for End User RLS authentication in both PostGraphile and zapatos.
44
+ *
45
+ * @param subject - Currently Authenticated end-user or end-user application
46
+ * @param dbRole - The database role to switch to
47
+ */
48
+ function buildEndUserAuthPgSettings(subject, dbRole) {
49
+ return {
50
+ role: dbRole,
51
+ [index_js_1.MOSAIC_AUTH_SUBJECT_NAME]: subject?.name ?? index_js_1.DEFAULT_AUTH_SUBJECT_NAME,
52
+ [index_js_1.MOSAIC_TENANT_ID]: subject?.tenantId ?? '',
53
+ [index_js_1.MOSAIC_ENVIRONMENT_ID]: subject?.environmentId ?? '',
54
+ [index_js_1.MOSAIC_AUTH_END_USER_ID]: subject?.sub ?? '',
55
+ [index_js_1.MOSAIC_AUTH_PROFILE_ID]: subject?.profileId ?? '',
56
+ };
57
+ }
58
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/auth/helpers.ts"],"names":[],"mappings":";;AAiDA,0CASC;AAyBD,kDAmCC;AASD,gEAeC;AA7ID,oDAe+B;AAiC/B,SAAgB,eAAe,CAC7B,OAAqD,EACrD,MAAc,EACd,SAAkB;IAElB,OAAO;QACL,IAAI,EAAE,MAAM,EAAE,gEAAgE;QAC9E,GAAG,mBAAmB,CAAC,OAAO,EAAE,SAAS,CAAC;KAC3C,CAAC;AACJ,CAAC;AAyBD,SAAgB,mBAAmB,CACjC,OAAqD,EACrD,SAAkB;IAElB,MAAM,UAAU,GAAiB;QAC/B,kBAAkB;QAClB,CAAC,mCAAwB,CAAC,EAAE,OAAO,EAAE,IAAI,IAAI,oCAAyB;QACtE,CAAC,2BAAgB,CAAC,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE;QAC3C,CAAC,gCAAqB,CAAC,EAAE,OAAO,EAAE,aAAa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gB,CAAC,EAAE,OAAO,EAAE,QAAQ,IAAI,EAAE;QAC3C,CAAC,gCAAqB,CAAC,EAAE,OAAO,EAAE,aAAa,IAAI,EAAE;QACrD,CAAC,kCAAuB,CAAC,EAAE,OAAO,EAAE,GAAG,IAAI,EAAE;QAC7C,CAAC,iCAAsB,CAAC,EAAE,OAAO,EAAE,SAAS,IAAI,EAAE;KACnD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './authentication-subject.js';
2
+ export * from './helpers.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC"}
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./authentication-subject"), exports);
18
- __exportStar(require("./helpers"), exports);
17
+ __exportStar(require("./authentication-subject.js"), exports);
18
+ __exportStar(require("./helpers.js"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/auth/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8DAA4C;AAC5C,+CAA6B"}
@@ -1,4 +1,4 @@
1
- import { CommandModule } from 'yargs';
1
+ import type { CommandModule } from 'yargs';
2
2
  /**
3
3
  * CLI command options object.
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-define-func-migration.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/generate-define-func-migration.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAI3C;;GAEG;AACH,UAAU,wBAAwB;IAChC,4BAA4B,EAAE,OAAO,CAAC;IACtC,0BAA0B,EAAE,MAAM,CAAC;CACpC;AAsFD;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,aAAa,CACrD,OAAO,EACP,wBAAwB,CAuBzB,CAAC"}
@@ -4,7 +4,8 @@ exports.generateDefineFuncMigration = void 0;
4
4
  /* eslint-disable no-console */
5
5
  const fs_1 = require("fs");
6
6
  const path_1 = require("path");
7
- const utils_1 = require("./utils");
7
+ const package_root_js_1 = require("../../common/package-root.js");
8
+ const utils_js_1 = require("./utils.js");
8
9
  const ensureEmptyCurrentSql = async (currentMigrationFolderPath) => {
9
10
  const dirPath = (0, path_1.join)(process.cwd(), currentMigrationFolderPath);
10
11
  const filePath = (0, path_1.join)(dirPath, 'current.sql');
@@ -14,7 +15,7 @@ const ensureEmptyCurrentSql = async (currentMigrationFolderPath) => {
14
15
  const nonEmptyCurrentSqlLines = currentSqlWithoutComments.match(/^[^\S\r\n]*\S.*$/gm);
15
16
  if (nonEmptyCurrentSqlLines !== null &&
16
17
  nonEmptyCurrentSqlLines.length > 0) {
17
- console.error((0, utils_1.getTimestamp)(), (0, utils_1.red)('Please ensure that your current.sql file is empty/only contains comments.'));
18
+ console.error((0, utils_js_1.getTimestamp)(), (0, utils_js_1.red)('Please ensure that your current.sql file is empty/only contains comments.'));
18
19
  process.exit(-1);
19
20
  }
20
21
  }
@@ -25,7 +26,7 @@ const ensureEmptyCurrentSql = async (currentMigrationFolderPath) => {
25
26
  return filePath;
26
27
  };
27
28
  const generateContent = async (includeMultitenancyFunctions) => {
28
- const defineFunctionsPath = (0, path_1.resolve)(__dirname, '../../../migrations/define');
29
+ const defineFunctionsPath = (0, path_1.join)((0, package_root_js_1.getDbCommonPackageRoot)(), 'migrations', 'define');
29
30
  const defineFunctions = await fs_1.promises.readFile((0, path_1.join)(defineFunctionsPath, 'define-functions.sql'));
30
31
  let result = `--! Message: upgrade SQL define functions\n\n${defineFunctions}`;
31
32
  if (includeMultitenancyFunctions) {
@@ -41,11 +42,11 @@ const generateContent = async (includeMultitenancyFunctions) => {
41
42
  */
42
43
  const generate = async ({ includeMultitenancyFunctions, currentMigrationFolderPath, // migrations
43
44
  }) => {
44
- console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)('Starting define functions update migration generation!'));
45
+ console.log((0, utils_js_1.getTimestamp)(), (0, utils_js_1.green)('Starting define functions update migration generation!'));
45
46
  const absolutePath = await ensureEmptyCurrentSql(currentMigrationFolderPath);
46
47
  const migrationContent = await generateContent(includeMultitenancyFunctions);
47
48
  await fs_1.promises.writeFile(absolutePath, migrationContent);
48
- console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)(`Migration file ${currentMigrationFolderPath} updated!`));
49
+ console.log((0, utils_js_1.getTimestamp)(), (0, utils_js_1.green)(`Migration file ${currentMigrationFolderPath} updated!`));
49
50
  };
50
51
  /**
51
52
  * Yargs command module definition for `generate-define-func-migration` CLI script.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-define-func-migration.js","sourceRoot":"","sources":["../../../../src/cli/commands/generate-define-func-migration.ts"],"names":[],"mappings":";;;AAAA,+BAA+B;AAC/B,2BAAiD;AACjD,+BAA4B;AAE5B,kEAAsE;AACtE,yCAAsD;AAUtD,MAAM,qBAAqB,GAAG,KAAK,EACjC,0BAAkC,EACjB,EAAE;IACnB,MAAM,OAAO,GAAG,IAAA,WAAI,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,0BAA0B,CAAC,CAAC;IAChE,MAAM,QAAQ,GAAG,IAAA,WAAI,EAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IAC9C,IAAI,IAAA,eAAU,EAAC,QAAQ,CAAC,EAAE,CAAC;QACzB,MAAM,UAAU,GAAG,MAAM,aAAG,CAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACxD,MAAM,yBAAyB,GAAG,UAAU,CAAC,OAAO,CAClD,sCAAsC,EACtC,EAAE,CACH,CAAC;QACF,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EAAE;IAC5C,OAAO,CAAC,GAAG,CACT,IAAA,uBAAY,GAAE,EACd,IAAA,gBAAK,EAAC,wDAAwD,CAAC,CAChE,CAAC;IAEF,MAAM,YAAY,GAAG,MAAM,qBAAqB,CAAC,0BAA0B,CAAC,CAAC;IAE7E,MAAM,gBAAgB,GAAG,MAAM,eAAe,CAAC,4BAA4B,CAAC,CAAC;IAE7E,MAAM,aAAG,CAAC,SAAS,CAAC,YAAY,EAAE,gBAAgB,CAAC,CAAC;IAEpD,OAAO,CAAC,GAAG,CACT,IAAA,uBAAY,GAAE,EACd,IAAA,gBAAK,EAAC,kBAAkB,0BAA0B,WAAW,CAAC,CAC/D,CAAC;AACJ,CAAC,CAAC;AAEF;;GAEG;AACU,QAAA,2BAA2B,GAGpC;IACF,OAAO,EAAE,gCAAgC;IACzC,QAAQ,EACN,0FAA0F;IAC5F,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,8BAA8B,EAAE;QACtC,KAAK,EAAE,GAAG;QACV,QAAQ,EACN,mEAAmE;QACrE,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb,CAAC;SACD,MAAM,CAAC,4BAA4B,EAAE;QACpC,KAAK,EAAE,GAAG;QACV,OAAO,EAAE,YAAY;QACrB,QAAQ,EACN,iJAAiJ;QACnJ,MAAM,EAAE,IAAI;KACb,CAAC;IACN,OAAO,EAAE,QAAQ;CAClB,CAAC"}
@@ -1,4 +1,4 @@
1
- import { CommandModule } from 'yargs';
1
+ import type { CommandModule } from 'yargs';
2
2
  /**
3
3
  * CLI command options object.
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-vscode-sql-snippets.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/generate-vscode-sql-snippets.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAK3C;;GAEG;AACH,UAAU,uBAAuB;IAC/B,2BAA2B,EAAE,OAAO,CAAC;IACrC,gCAAgC,EAAE,MAAM,CAAC;CAC1C;AAuMD;;GAEG;AACH,eAAO,MAAM,yBAAyB,EAAE,aAAa,CACnD,OAAO,EACP,uBAAuB,CAuBxB,CAAC"}
@@ -1,18 +1,16 @@
1
1
  "use strict";
2
- var __asyncValues = (this && this.__asyncValues) || function (o) {
3
- if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
4
- var m = o[Symbol.asyncIterator], i;
5
- return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
6
- function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
7
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
8
4
  };
9
5
  Object.defineProperty(exports, "__esModule", { value: true });
10
6
  exports.generateVscodeSqlSnippets = void 0;
11
7
  /* eslint-disable no-console */
12
8
  const fs_1 = require("fs");
13
9
  const path_1 = require("path");
14
- const readdirp_1 = require("readdirp");
15
- const utils_1 = require("./utils");
10
+ const readdirp_1 = __importDefault(require("readdirp"));
11
+ const find_up_js_1 = require("../../common/find-up.js");
12
+ const package_root_js_1 = require("../../common/package-root.js");
13
+ const utils_js_1 = require("./utils.js");
16
14
  /**
17
15
  * Attempts to find a path to the `.vscode` folder.
18
16
  * It will look for either `.vscode` folder or `yarn.lock` file in current
@@ -21,22 +19,12 @@ const utils_1 = require("./utils");
21
19
  * Returns an absolute path to .vscode folder or throws an error.
22
20
  */
23
21
  const findDotVscodePath = () => {
24
- let startPath = process.cwd();
25
- let lastPath = '';
26
- while (lastPath !== startPath) {
27
- const potentialVscodePath = (0, path_1.join)(startPath, '.vscode');
28
- const potentialYarnLockPath = (0, path_1.join)(startPath, 'yarn.lock');
29
- if ((0, fs_1.existsSync)(potentialVscodePath) || (0, fs_1.existsSync)(potentialYarnLockPath)) {
30
- return potentialVscodePath;
31
- }
32
- else {
33
- // Preserve currently checked path for while condition comparison
34
- lastPath = startPath;
35
- // Remove last segment from path, move to directory closer to root
36
- startPath = (0, path_1.normalize)((0, path_1.join)(startPath, '..'));
37
- }
22
+ const monorepoRoot = (0, find_up_js_1.findClosestAncestorPath)(process.cwd(), (candidatePath) => (0, fs_1.existsSync)((0, path_1.join)(candidatePath, '.vscode')) ||
23
+ (0, fs_1.existsSync)((0, path_1.join)(candidatePath, 'yarn.lock')));
24
+ if (monorepoRoot === undefined) {
25
+ throw Error('Unable to determine the ".vscode" folder path. Please create a .vscode folder in the root of your repository and try again.');
38
26
  }
39
- throw Error(`Unable to determine the ".vscode" folder path. Please create a .vscode folder in the root of your repository and try again.`);
27
+ return (0, path_1.join)(monorepoRoot, '.vscode');
40
28
  };
41
29
  /**
42
30
  * Writes generated snippets object to .vscode folder. Creates a folder if it does not exist.
@@ -61,12 +49,11 @@ let unparsedSnippetIndex = 1;
61
49
  * @example `CREATE OR REPLACE FUNCTION ax_utils.raise_error(` -> `{"prefix": "ax-raise-error", "snippetName": "Raise Error (Ax Utils)"}
62
50
  */
63
51
  const parseFunctionName = (line, snippetJson) => {
64
- var _a;
65
- const match = (_a = new RegExp(/CREATE OR REPLACE FUNCTION (.*)\(/i).exec(line)) === null || _a === void 0 ? void 0 : _a[1];
52
+ const match = new RegExp(/CREATE OR REPLACE FUNCTION (.*)\(/i).exec(line)?.[1];
66
53
  let prefix = `unnamed-snippet-${unparsedSnippetIndex}`;
67
54
  let snippetName = `Unnamed Snippet ${unparsedSnippetIndex}`;
68
55
  if (!match) {
69
- console.log((0, utils_1.red)(`Unable to parse the name for the following snippet. Naming the snippet ${prefix} instead.`));
56
+ console.log((0, utils_js_1.red)(`Unable to parse the name for the following snippet. Naming the snippet ${prefix} instead.`));
70
57
  console.log(snippetJson);
71
58
  unparsedSnippetIndex++;
72
59
  }
@@ -123,28 +110,15 @@ const populateSnippets = async (filePath, snippetsObject) => {
123
110
  * Reads all `.sql` files in `migrations` folder (and sub-folders), extracts snippet json objects from them, and returns a combined object with all snippets.
124
111
  */
125
112
  const getParsedSnippets = async (dirPath, includeMultitenancySnippets) => {
126
- var _a, e_1, _b, _c;
127
113
  const parsedSnippets = {};
128
- try {
129
- for (var _d = true, _e = __asyncValues((0, readdirp_1.default)(dirPath, {
130
- fileFilter: (entry) => entry.basename.endsWith('.sql'),
131
- })), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) {
132
- _c = _f.value;
133
- _d = false;
134
- const { fullPath, path } = _c;
135
- if (!includeMultitenancySnippets && path.includes('multitenancy')) {
136
- continue;
137
- }
138
- console.log((0, utils_1.getTimestamp)(), `Parsing ${path}`);
139
- await populateSnippets(fullPath, parsedSnippets);
140
- }
141
- }
142
- catch (e_1_1) { e_1 = { error: e_1_1 }; }
143
- finally {
144
- try {
145
- if (!_d && !_a && (_b = _e.return)) await _b.call(_e);
114
+ for await (const { fullPath, path } of (0, readdirp_1.default)(dirPath, {
115
+ fileFilter: (entry) => entry.basename.endsWith('.sql'),
116
+ })) {
117
+ if (!includeMultitenancySnippets && path.includes('multitenancy')) {
118
+ continue;
146
119
  }
147
- finally { if (e_1) throw e_1.error; }
120
+ console.log((0, utils_js_1.getTimestamp)(), `Parsing ${path}`);
121
+ await populateSnippets(fullPath, parsedSnippets);
148
122
  }
149
123
  return parsedSnippets;
150
124
  };
@@ -153,29 +127,16 @@ const getParsedSnippets = async (dirPath, includeMultitenancySnippets) => {
153
127
  * These files contain custom snippets that are not tied to any one utils or define sql function.
154
128
  */
155
129
  const getCustomSnippets = async (dirPath, includeMultitenancySnippets) => {
156
- var _a, e_2, _b, _c;
157
130
  let customSnippets = {};
158
- try {
159
- for (var _d = true, _e = __asyncValues((0, readdirp_1.default)(dirPath, {
160
- fileFilter: (entry) => entry.basename.endsWith('.code-snippets'),
161
- })), _f; _f = await _e.next(), _a = _f.done, !_a; _d = true) {
162
- _c = _f.value;
163
- _d = false;
164
- const { fullPath, path } = _c;
165
- if (!includeMultitenancySnippets && path.includes('multitenancy')) {
166
- continue;
167
- }
168
- console.log((0, utils_1.getTimestamp)(), `Reading ${path}`);
169
- const fileContents = JSON.parse((0, fs_1.readFileSync)(fullPath, 'utf-8'));
170
- customSnippets = Object.assign(Object.assign({}, customSnippets), fileContents);
171
- }
172
- }
173
- catch (e_2_1) { e_2 = { error: e_2_1 }; }
174
- finally {
175
- try {
176
- if (!_d && !_a && (_b = _e.return)) await _b.call(_e);
131
+ for await (const { fullPath, path } of (0, readdirp_1.default)(dirPath, {
132
+ fileFilter: (entry) => entry.basename.endsWith('.code-snippets'),
133
+ })) {
134
+ if (!includeMultitenancySnippets && path.includes('multitenancy')) {
135
+ continue;
177
136
  }
178
- finally { if (e_2) throw e_2.error; }
137
+ console.log((0, utils_js_1.getTimestamp)(), `Reading ${path}`);
138
+ const fileContents = JSON.parse((0, fs_1.readFileSync)(fullPath, 'utf-8'));
139
+ customSnippets = { ...customSnippets, ...fileContents };
179
140
  }
180
141
  return customSnippets;
181
142
  };
@@ -186,12 +147,15 @@ const getCustomSnippets = async (dirPath, includeMultitenancySnippets) => {
186
147
  * Generates or updates a VScode snippets file.
187
148
  */
188
149
  const generate = async ({ includeMultitenancySnippets, snippetsFileNameWithoutExtension, }) => {
189
- console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)(`Starting snippets generation!`));
190
- const dirPath = (0, path_1.resolve)(__dirname, '../../../migrations');
150
+ console.log((0, utils_js_1.getTimestamp)(), (0, utils_js_1.green)(`Starting snippets generation!`));
151
+ const dirPath = (0, path_1.join)((0, package_root_js_1.getDbCommonPackageRoot)(), 'migrations');
191
152
  const parsedSnippets = await getParsedSnippets(dirPath, includeMultitenancySnippets);
192
153
  const customSnippets = await getCustomSnippets(dirPath, includeMultitenancySnippets);
193
- const writeResult = writeSourceFile(snippetsFileNameWithoutExtension, Object.assign(Object.assign({}, parsedSnippets), customSnippets));
194
- console.log((0, utils_1.getTimestamp)(), (0, utils_1.green)(writeResult));
154
+ const writeResult = writeSourceFile(snippetsFileNameWithoutExtension, {
155
+ ...parsedSnippets,
156
+ ...customSnippets,
157
+ });
158
+ console.log((0, utils_js_1.getTimestamp)(), (0, utils_js_1.green)(writeResult));
195
159
  };
196
160
  /**
197
161
  * Yargs command module definition for `generate-vscode-sql-snippets` CLI script.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generate-vscode-sql-snippets.js","sourceRoot":"","sources":["../../../../src/cli/commands/generate-vscode-sql-snippets.ts"],"names":[],"mappings":";;;;;;AAAA,+BAA+B;AAC/B,2BAAwE;AACxE,+BAA4B;AAC5B,wDAA+B;AAE/B,wDAAkE;AAClE,kEAAsE;AACtE,yCAAsD;AAUtD;;;;;;GAMG;AACH,MAAM,iBAAiB,GAAG,GAAW,EAAE;IACrC,MAAM,YAAY,GAAG,IAAA,oCAAuB,EAC1C,OAAO,CAAC,GAAG,EAAE,EACb,CAAC,aAAa,EAAE,EAAE,CAChB,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,SAAS,CAAC,CAAC;QAC1C,IAAA,eAAU,EAAC,IAAA,WAAI,EAAC,aAAa,EAAE,WAAW,CAAC,CAAC,CAC/C,CAAC;IAEF,IAAI,YAAY,KAAK,SAAS,EAAE,CAAC;QAC/B,MAAM,KAAK,CACT,6HAA6H,CAC9H,CAAC;IACJ,CAAC;IAED,OAAO,IAAA,WAAI,EAAC,YAAY,EAAE,SAAS,CAAC,CAAC;AACvC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,eAAe,GAAG,CACtB,gBAAwB,EACxB,QAAiC,EACzB,EAAE;IACV,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;IACnC,IAAI,CAAC,IAAA,eAAU,EAAC,MAAM,CAAC,EAAE,CAAC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CAAC;AAClD,CAAC,CAAC;AAEF;;GAEG;AACU,QAAA,yBAAyB,GAGlC;IACF,OAAO,EAAE,8BAA8B;IACvC,QAAQ,EACN,yGAAyG;IAC3G,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,MAAM,CAAC,6BAA6B,EAAE;QACrC,KAAK,EAAE,GAAG;QACV,QAAQ,EACN,gFAAgF;QAClF,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;KACb,CAAC;SACD,MAAM,CAAC,kCAAkC,EAAE;QAC1C,KAAK,EAAE,GAAG;QACV,QAAQ,EACN,qHAAqH;QACvH,OAAO,EAAE,uBAAuB;QAChC,MAAM,EAAE,IAAI;KACb,CAAC;IACN,OAAO,EAAE,QAAQ;CAClB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './generate-define-func-migration.js';
2
+ export * from './generate-vscode-sql-snippets.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC"}
@@ -14,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./generate-define-func-migration"), exports);
18
- __exportStar(require("./generate-vscode-sql-snippets"), exports);
17
+ __exportStar(require("./generate-define-func-migration.js"), exports);
18
+ __exportStar(require("./generate-vscode-sql-snippets.js"), exports);
19
19
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sEAAoD;AACpD,oEAAkD"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/utils.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,KAAG,MAAuC,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,GAAG,GAAI,MAAM,MAAM,KAAG,MAAuC,CAAC;AAE3E;;GAEG;AACH,eAAO,MAAM,YAAY,QAAO,MAO/B,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../../src/cli/commands/utils.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACI,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,aAAa,IAAI,YAAY,CAAC;AAAhE,QAAA,KAAK,SAA2D;AAE7E;;GAEG;AACI,MAAM,GAAG,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,aAAa,IAAI,YAAY,CAAC;AAA9D,QAAA,GAAG,OAA2D;AAE3E;;GAEG;AACI,MAAM,YAAY,GAAG,GAAW,EAAE;IACvC,MAAM,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC,iBAAiB,EAAE,GAAG,KAAK,CAAC,CAAC,wBAAwB;IAC/E,MAAM,YAAY,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC;SAC/C,WAAW,EAAE;SACb,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;SACZ,OAAO,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IACrB,OAAO,IAAI,YAAY,GAAG,CAAC;AAC7B,CAAC,CAAC;AAPW,QAAA,YAAY,gBAOvB"}
@@ -1,3 +1,3 @@
1
- import * as yargs from 'yargs';
1
+ import type * as yargs from 'yargs';
2
2
  export declare const cliExtension: () => yargs.CommandModule<any, any>[];
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAOpC,eAAO,MAAM,YAAY,QAAO,KAAK,CAAC,aAAa,CAAC,GAAG,EAAE,GAAG,CAAC,EAG5D,CAAC"}
@@ -1,11 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.cliExtension = void 0;
4
- const commands_1 = require("./commands");
4
+ const index_js_1 = require("./commands/index.js");
5
5
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
6
6
  const cliExtension = () => [
7
- commands_1.generateVscodeSqlSnippets,
8
- commands_1.generateDefineFuncMigration,
7
+ index_js_1.generateVscodeSqlSnippets,
8
+ index_js_1.generateDefineFuncMigration,
9
9
  ];
10
10
  exports.cliExtension = cliExtension;
11
11
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/index.ts"],"names":[],"mappings":";;;AACA,kDAG6B;AAE7B,8DAA8D;AACvD,MAAM,YAAY,GAAG,GAAoC,EAAE,CAAC;IACjE,oCAAyB;IACzB,sCAA2B;CAC5B,CAAC;AAHW,QAAA,YAAY,gBAGvB"}
@@ -0,0 +1,2 @@
1
+ export declare const findClosestAncestorPath: (startPath: string, matches: (candidatePath: string) => boolean) => string | undefined;
2
+ //# sourceMappingURL=find-up.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-up.d.ts","sourceRoot":"","sources":["../../../src/common/find-up.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,uBAAuB,GAClC,WAAW,MAAM,EACjB,SAAS,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,KAC1C,MAAM,GAAG,SAcX,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.findClosestAncestorPath = void 0;
4
+ const path_1 = require("path");
5
+ const findClosestAncestorPath = (startPath, matches) => {
6
+ let currentPath = (0, path_1.resolve)(startPath);
7
+ let parentPath = (0, path_1.dirname)(currentPath);
8
+ while (parentPath !== currentPath) {
9
+ if (matches(currentPath)) {
10
+ return currentPath;
11
+ }
12
+ currentPath = parentPath;
13
+ parentPath = (0, path_1.dirname)(currentPath);
14
+ }
15
+ return matches(currentPath) ? currentPath : undefined;
16
+ };
17
+ exports.findClosestAncestorPath = findClosestAncestorPath;
18
+ //# sourceMappingURL=find-up.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"find-up.js","sourceRoot":"","sources":["../../../src/common/find-up.ts"],"names":[],"mappings":";;;AAAA,+BAAwC;AAEjC,MAAM,uBAAuB,GAAG,CACrC,SAAiB,EACjB,OAA2C,EACvB,EAAE;IACtB,IAAI,WAAW,GAAG,IAAA,cAAO,EAAC,SAAS,CAAC,CAAC;IACrC,IAAI,UAAU,GAAG,IAAA,cAAO,EAAC,WAAW,CAAC,CAAC;IAEtC,OAAO,UAAU,KAAK,WAAW,EAAE,CAAC;QAClC,IAAI,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;YACzB,OAAO,WAAW,CAAC;QACrB,CAAC;QAED,WAAW,GAAG,UAAU,CAAC;QACzB,UAAU,GAAG,IAAA,cAAO,EAAC,WAAW,CAAC,CAAC;IACpC,CAAC;IAED,OAAO,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CAAC;AACxD,CAAC,CAAC;AAjBW,QAAA,uBAAuB,2BAiBlC"}
@@ -0,0 +1,2 @@
1
+ export * from './types.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./types"), exports);
17
+ __exportStar(require("./types.js"), exports);
18
18
  //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B"}
@@ -0,0 +1,2 @@
1
+ export declare const getDbCommonPackageRoot: () => string;
2
+ //# sourceMappingURL=package-root.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-root.d.ts","sourceRoot":"","sources":["../../../src/common/package-root.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,sBAAsB,QAAO,MA8BzC,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getDbCommonPackageRoot = void 0;
4
+ const fs_1 = require("fs");
5
+ const module_1 = require("module");
6
+ const path_1 = require("path");
7
+ const find_up_js_1 = require("./find-up.js");
8
+ const PACKAGE_NAME = '@axinom/mosaic-db-common';
9
+ const RESOLUTION_ANCHOR_FILENAME = '__axinom_mosaic_db_common__.cjs';
10
+ let cachedPackageRoot;
11
+ const readPackageName = (dirPath) => {
12
+ const packageJsonPath = (0, path_1.join)(dirPath, 'package.json');
13
+ if (!(0, fs_1.existsSync)(packageJsonPath)) {
14
+ return undefined;
15
+ }
16
+ return JSON.parse((0, fs_1.readFileSync)(packageJsonPath, 'utf8'))
17
+ .name;
18
+ };
19
+ const findPackageRoot = (startPath) => (0, find_up_js_1.findClosestAncestorPath)(startPath, (candidatePath) => readPackageName(candidatePath) === PACKAGE_NAME);
20
+ const resolveInstalledPackageEntry = () => {
21
+ const requireFromWorkingDirectory = (0, module_1.createRequire)((0, path_1.resolve)(process.cwd(), RESOLUTION_ANCHOR_FILENAME));
22
+ return requireFromWorkingDirectory.resolve(PACKAGE_NAME);
23
+ };
24
+ const getDbCommonPackageRoot = () => {
25
+ if (cachedPackageRoot !== undefined) {
26
+ return cachedPackageRoot;
27
+ }
28
+ const modulePackageRoot = typeof __dirname === 'string' ? findPackageRoot(__dirname) : undefined;
29
+ if (modulePackageRoot !== undefined) {
30
+ cachedPackageRoot = modulePackageRoot;
31
+ return modulePackageRoot;
32
+ }
33
+ try {
34
+ const installedPackageRoot = findPackageRoot((0, path_1.dirname)(resolveInstalledPackageEntry()));
35
+ if (installedPackageRoot === undefined) {
36
+ throw new Error(`Unable to find '${PACKAGE_NAME}' package root after resolving its installed entrypoint.`);
37
+ }
38
+ cachedPackageRoot = installedPackageRoot;
39
+ return installedPackageRoot;
40
+ }
41
+ catch (error) {
42
+ throw new Error(`Unable to resolve '${PACKAGE_NAME}' package root from the current working directory.`, { cause: error });
43
+ }
44
+ };
45
+ exports.getDbCommonPackageRoot = getDbCommonPackageRoot;
46
+ //# sourceMappingURL=package-root.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"package-root.js","sourceRoot":"","sources":["../../../src/common/package-root.ts"],"names":[],"mappings":";;;AAAA,2BAA8C;AAC9C,mCAAuC;AACvC,+BAA8C;AAC9C,6CAAuD;AAEvD,MAAM,YAAY,GAAG,0BAA0B,CAAC;AAChD,MAAM,0BAA0B,GAAG,iCAAiC,CAAC;AAMrE,IAAI,iBAAqC,CAAC;AAE1C,MAAM,eAAe,GAAG,CAAC,OAAe,EAAsB,EAAE;IAC9D,MAAM,eAAe,GAAG,IAAA,WAAI,EAAC,OAAO,EAAE,cAAc,CAAC,CAAC;IACtD,IAAI,CAAC,IAAA,eAAU,EAAC,eAAe,CAAC,EAAE,CAAC;QACjC,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,OAAQ,IAAI,CAAC,KAAK,CAAC,IAAA,iBAAY,EAAC,eAAe,EAAE,MAAM,CAAC,CAAiB;SACtE,IAAI,CAAC;AACV,CAAC,CAAC;AAEF,MAAM,eAAe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8BjC"}
@@ -1,4 +1,4 @@
1
- import { Pool } from 'pg';
1
+ import type { Pool } from 'pg';
2
2
  /**
3
3
  * A dictionary of string keys and generic values. Consider using it instead of `any`.
4
4
  */
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,IAAI,CAAC,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,CAAC,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,QAAQ;IACvB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,KAAK,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IAC1B,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3C,GAAG,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;CAChD;AAED;;;;GAIG;AACH,MAAM,MAAM,cAAc,CAAC,CAAC,SAAS,MAAM,IAAI,IAAI,GAAG;IAAE,KAAK,EAAE,CAAC,CAAA;CAAE,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;AAClD,MAAM,MAAM,cAAc,GAAG,cAAc,CAAC,UAAU,CAAC,CAAC;AACxD,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export * from './pg-auth-settings-keys.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAC"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./pg-auth-settings-keys.js"), exports);
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6DAA2C"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pg-auth-settings-keys.d.ts","sourceRoot":"","sources":["../../../src/constants/pg-auth-settings-keys.ts"],"names":[],"mappings":"AAAA,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,6BAA6B,CAAC;AACnE,mGAAmG;AACnG,eAAO,MAAM,uBAAuB,4BAA4B,CAAC;AACjE,4FAA4F;AAC5F,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,iGAAiG;AACjG,eAAO,MAAM,gBAAgB,qBAAqB,CAAC;AACnD,sGAAsG;AACtG,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D;;;GAGG;AACH,eAAO,MAAM,2BAA2B,yBAAyB,CAAC;AAClE,eAAO,MAAM,gCAAgC,8BAA8B,CAAC;AAC5E,eAAO,MAAM,mCAAmC,qBAAqB,CAAC;AACtE,eAAO,MAAM,kCAAkC,4BAA4B,CAAC;AAC5E,eAAO,MAAM,2BAA2B,qBAAqB,CAAC;AAE9D,uEAAuE;AACvE,eAAO,MAAM,yBAAyB,cAAc,CAAC;AAErD,oDAAoD;AACpD,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,kFAAkF;AAClF,eAAO,MAAM,uBAAuB,WAAW,CAAC;AAEhD,kGAAkG;AAClG,eAAO,MAAM,uBAAuB,wBAAwB,CAAC;AAE7D,qGAAqG;AACrG,eAAO,MAAM,sBAAsB,2BAA2B,CAAC;AAE/D,0GAA0G;AAC1G,eAAO,MAAM,sBAAsB,2BAA2B,CAAC"}