@credibledata/cred-cli 0.0.103 → 0.0.105

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 (430) hide show
  1. package/README.md +106 -1
  2. package/dist/agent-contract.spec.js +548 -0
  3. package/dist/agent-contract.spec.js.map +1 -0
  4. package/dist/browser.js +72 -0
  5. package/dist/browser.js.map +1 -0
  6. package/dist/browser.spec.js +125 -0
  7. package/dist/browser.spec.js.map +1 -0
  8. package/dist/client/api.js +4137 -1159
  9. package/dist/client/api.js.map +1 -1
  10. package/dist/client-codeassist/api.js +476 -0
  11. package/dist/client-codeassist/api.js.map +1 -0
  12. package/dist/client-codeassist/base.js +69 -0
  13. package/dist/client-codeassist/base.js.map +1 -0
  14. package/dist/client-codeassist/common.js +162 -0
  15. package/dist/client-codeassist/common.js.map +1 -0
  16. package/dist/client-codeassist/configuration.js +44 -0
  17. package/dist/client-codeassist/configuration.js.map +1 -0
  18. package/dist/client-codeassist/index.js +32 -0
  19. package/dist/client-codeassist/index.js.map +1 -0
  20. package/dist/clientconfiguration.js +17 -289
  21. package/dist/clientconfiguration.js.map +1 -1
  22. package/dist/clientconfiguration.spec.js +35 -96
  23. package/dist/clientconfiguration.spec.js.map +1 -1
  24. package/dist/commands/add.js +103 -3
  25. package/dist/commands/add.js.map +1 -1
  26. package/dist/commands/add.spec.js +113 -0
  27. package/dist/commands/add.spec.js.map +1 -0
  28. package/dist/commands/connection/createconnections.js +104 -7
  29. package/dist/commands/connection/createconnections.js.map +1 -1
  30. package/dist/commands/connection/createconnections.spec.js +35 -1
  31. package/dist/commands/connection/createconnections.spec.js.map +1 -1
  32. package/dist/commands/connection/deleteconnection.js +4 -2
  33. package/dist/commands/connection/deleteconnection.js.map +1 -1
  34. package/dist/commands/connection/deleteconnection.spec.js +6 -1
  35. package/dist/commands/connection/deleteconnection.spec.js.map +1 -1
  36. package/dist/commands/connection/listconnections.js +2 -0
  37. package/dist/commands/connection/listconnections.js.map +1 -1
  38. package/dist/commands/connection/updateconnection.js +365 -0
  39. package/dist/commands/connection/updateconnection.js.map +1 -0
  40. package/dist/commands/connection/updateconnection.spec.js +625 -0
  41. package/dist/commands/connection/updateconnection.spec.js.map +1 -0
  42. package/dist/commands/database/createdatabase.js +52 -0
  43. package/dist/commands/database/createdatabase.js.map +1 -0
  44. package/dist/commands/database/database.spec.js +267 -0
  45. package/dist/commands/database/database.spec.js.map +1 -0
  46. package/dist/commands/database/deletedatabase.js +91 -0
  47. package/dist/commands/database/deletedatabase.js.map +1 -0
  48. package/dist/commands/database/getdatabase.js +97 -0
  49. package/dist/commands/database/getdatabase.js.map +1 -0
  50. package/dist/commands/database/listdatabases.js +36 -0
  51. package/dist/commands/database/listdatabases.js.map +1 -0
  52. package/dist/commands/database/shared.js +125 -0
  53. package/dist/commands/database/shared.js.map +1 -0
  54. package/dist/commands/database/shared.spec.js +109 -0
  55. package/dist/commands/database/shared.spec.js.map +1 -0
  56. package/dist/commands/database/updatedatabase.js +39 -0
  57. package/dist/commands/database/updatedatabase.js.map +1 -0
  58. package/dist/commands/environment/createenvironment.js +59 -28
  59. package/dist/commands/environment/createenvironment.js.map +1 -1
  60. package/dist/commands/environment/createenvironment.spec.js +29 -0
  61. package/dist/commands/environment/createenvironment.spec.js.map +1 -1
  62. package/dist/commands/environment/deleteenvironment.js +3 -2
  63. package/dist/commands/environment/deleteenvironment.js.map +1 -1
  64. package/dist/commands/environment/deleteenvironment.spec.js +5 -1
  65. package/dist/commands/environment/deleteenvironment.spec.js.map +1 -1
  66. package/dist/commands/environment/getenvironment.js +1 -0
  67. package/dist/commands/environment/getenvironment.js.map +1 -1
  68. package/dist/commands/environment/listenvironments.js +40 -8
  69. package/dist/commands/environment/listenvironments.js.map +1 -1
  70. package/dist/commands/environment/listenvironments.spec.js +41 -2
  71. package/dist/commands/environment/listenvironments.spec.js.map +1 -1
  72. package/dist/commands/environment/setenvironment.js +145 -6
  73. package/dist/commands/environment/setenvironment.js.map +1 -1
  74. package/dist/commands/environment/setenvironment.spec.js +256 -8
  75. package/dist/commands/environment/setenvironment.spec.js.map +1 -1
  76. package/dist/commands/environment/updateenvironment.js +12 -8
  77. package/dist/commands/environment/updateenvironment.js.map +1 -1
  78. package/dist/commands/environment/updateenvironment.spec.js +36 -2
  79. package/dist/commands/environment/updateenvironment.spec.js.map +1 -1
  80. package/dist/commands/get.js +64 -1
  81. package/dist/commands/get.js.map +1 -1
  82. package/dist/commands/group/addmember.js +3 -1
  83. package/dist/commands/group/addmember.js.map +1 -1
  84. package/dist/commands/group/addmember.spec.js +7 -2
  85. package/dist/commands/group/addmember.spec.js.map +1 -1
  86. package/dist/commands/group/creategroup.js +2 -0
  87. package/dist/commands/group/creategroup.js.map +1 -1
  88. package/dist/commands/group/deletegroup.js +3 -1
  89. package/dist/commands/group/deletegroup.js.map +1 -1
  90. package/dist/commands/group/deletegroup.spec.js +7 -1
  91. package/dist/commands/group/deletegroup.spec.js.map +1 -1
  92. package/dist/commands/group/getgroup.js +2 -0
  93. package/dist/commands/group/getgroup.js.map +1 -1
  94. package/dist/commands/group/listgroups.js +2 -0
  95. package/dist/commands/group/listgroups.js.map +1 -1
  96. package/dist/commands/group/removemember.js +3 -1
  97. package/dist/commands/group/removemember.js.map +1 -1
  98. package/dist/commands/group/removemember.spec.js +7 -2
  99. package/dist/commands/group/removemember.spec.js.map +1 -1
  100. package/dist/commands/groupaccesstoken/deleteToken.js +2 -1
  101. package/dist/commands/groupaccesstoken/deleteToken.js.map +1 -1
  102. package/dist/commands/groupaccesstoken/groupContainer.js +2 -0
  103. package/dist/commands/groupaccesstoken/groupContainer.js.map +1 -1
  104. package/dist/commands/list.js +24 -4
  105. package/dist/commands/list.js.map +1 -1
  106. package/dist/commands/materialization/cancelrun.js +3 -1
  107. package/dist/commands/materialization/cancelrun.js.map +1 -1
  108. package/dist/commands/materialization/getindex.js +2 -0
  109. package/dist/commands/materialization/getindex.js.map +1 -1
  110. package/dist/commands/materialization/getmaterialization.js +2 -0
  111. package/dist/commands/materialization/getmaterialization.js.map +1 -1
  112. package/dist/commands/materialization/getpreaggregate.js +2 -0
  113. package/dist/commands/materialization/getpreaggregate.js.map +1 -1
  114. package/dist/commands/materialization/getrun.js +2 -0
  115. package/dist/commands/materialization/getrun.js.map +1 -1
  116. package/dist/commands/materialization/listindexes.js +2 -0
  117. package/dist/commands/materialization/listindexes.js.map +1 -1
  118. package/dist/commands/materialization/listmaterializations.js +2 -0
  119. package/dist/commands/materialization/listmaterializations.js.map +1 -1
  120. package/dist/commands/materialization/listpreaggregates.js +2 -0
  121. package/dist/commands/materialization/listpreaggregates.js.map +1 -1
  122. package/dist/commands/materialization/listruns.js +3 -1
  123. package/dist/commands/materialization/listruns.js.map +1 -1
  124. package/dist/commands/materialization/rerun.js +3 -1
  125. package/dist/commands/materialization/rerun.js.map +1 -1
  126. package/dist/commands/misc/inquirerHost.js +87 -0
  127. package/dist/commands/misc/inquirerHost.js.map +1 -0
  128. package/dist/commands/misc/inquirerHost.spec.js +91 -0
  129. package/dist/commands/misc/inquirerHost.spec.js.map +1 -0
  130. package/dist/commands/misc/login.js +348 -58
  131. package/dist/commands/misc/login.js.map +1 -1
  132. package/dist/commands/misc/login.spec.js +525 -7
  133. package/dist/commands/misc/login.spec.js.map +1 -1
  134. package/dist/commands/misc/logout.js +26 -3
  135. package/dist/commands/misc/logout.js.map +1 -1
  136. package/dist/commands/misc/logout.spec.js +52 -12
  137. package/dist/commands/misc/logout.spec.js.map +1 -1
  138. package/dist/commands/misc/resolveLoginTarget.spec.js +90 -0
  139. package/dist/commands/misc/resolveLoginTarget.spec.js.map +1 -0
  140. package/dist/commands/misc/scope.spec.js +108 -0
  141. package/dist/commands/misc/scope.spec.js.map +1 -0
  142. package/dist/commands/misc/set-access-token.js +1 -1
  143. package/dist/commands/misc/set-access-token.js.map +1 -1
  144. package/dist/commands/misc/set-access-token.spec.js +13 -2
  145. package/dist/commands/misc/set-access-token.spec.js.map +1 -1
  146. package/dist/commands/misc/setup.js +819 -0
  147. package/dist/commands/misc/setup.js.map +1 -0
  148. package/dist/commands/misc/setup.spec.js +783 -0
  149. package/dist/commands/misc/setup.spec.js.map +1 -0
  150. package/dist/commands/misc/status.js +168 -0
  151. package/dist/commands/misc/status.js.map +1 -0
  152. package/dist/commands/misc/status.spec.js +301 -0
  153. package/dist/commands/misc/status.spec.js.map +1 -0
  154. package/dist/commands/misc/token.js +57 -0
  155. package/dist/commands/misc/token.js.map +1 -0
  156. package/dist/commands/misc/token.spec.js +92 -0
  157. package/dist/commands/misc/token.spec.js.map +1 -0
  158. package/dist/commands/package/deletepackage.js +4 -2
  159. package/dist/commands/package/deletepackage.js.map +1 -1
  160. package/dist/commands/package/deletepackage.spec.js +7 -1
  161. package/dist/commands/package/deletepackage.spec.js.map +1 -1
  162. package/dist/commands/package/getpackage.js +142 -0
  163. package/dist/commands/package/getpackage.js.map +1 -0
  164. package/dist/commands/package/getpackage.spec.js +246 -0
  165. package/dist/commands/package/getpackage.spec.js.map +1 -0
  166. package/dist/commands/package/listpackages.js +2 -0
  167. package/dist/commands/package/listpackages.js.map +1 -1
  168. package/dist/commands/package/publish.archive.spec.js +570 -0
  169. package/dist/commands/package/publish.archive.spec.js.map +1 -0
  170. package/dist/commands/package/publish.js +780 -49
  171. package/dist/commands/package/publish.js.map +1 -1
  172. package/dist/commands/package/publish.spec.js +451 -8
  173. package/dist/commands/package/publish.spec.js.map +1 -1
  174. package/dist/commands/package/updatepackage.js +22 -19
  175. package/dist/commands/package/updatepackage.js.map +1 -1
  176. package/dist/commands/package/updatepackage.spec.js +36 -1
  177. package/dist/commands/package/updatepackage.spec.js.map +1 -1
  178. package/dist/commands/permission/createpermission.js +3 -1
  179. package/dist/commands/permission/createpermission.js.map +1 -1
  180. package/dist/commands/permission/deletepermission.js +6 -3
  181. package/dist/commands/permission/deletepermission.js.map +1 -1
  182. package/dist/commands/permission/getpermission.js +2 -0
  183. package/dist/commands/permission/getpermission.js.map +1 -1
  184. package/dist/commands/permission/listpermissions.js +2 -0
  185. package/dist/commands/permission/listpermissions.js.map +1 -1
  186. package/dist/commands/rm.js +21 -0
  187. package/dist/commands/rm.js.map +1 -1
  188. package/dist/commands/set.js +40 -6
  189. package/dist/commands/set.js.map +1 -1
  190. package/dist/commands/set.spec.js +123 -0
  191. package/dist/commands/set.spec.js.map +1 -0
  192. package/dist/commands/table/addtable.js +155 -0
  193. package/dist/commands/table/addtable.js.map +1 -0
  194. package/dist/commands/table/deletetable.js +45 -0
  195. package/dist/commands/table/deletetable.js.map +1 -0
  196. package/dist/commands/table/gettable.js +32 -0
  197. package/dist/commands/table/gettable.js.map +1 -0
  198. package/dist/commands/table/listtables.js +36 -0
  199. package/dist/commands/table/listtables.js.map +1 -0
  200. package/dist/commands/table/table.spec.js +304 -0
  201. package/dist/commands/table/table.spec.js.map +1 -0
  202. package/dist/commands/table/tablefile.js +195 -0
  203. package/dist/commands/table/tablefile.js.map +1 -0
  204. package/dist/commands/table/tablefile.spec.js +158 -0
  205. package/dist/commands/table/tablefile.spec.js.map +1 -0
  206. package/dist/commands/update.js +21 -0
  207. package/dist/commands/update.js.map +1 -1
  208. package/dist/commands/version/archive-unarchive-version.js +4 -2
  209. package/dist/commands/version/archive-unarchive-version.js.map +1 -1
  210. package/dist/commands/version/archive-unarchive-version.spec.js +6 -1
  211. package/dist/commands/version/archive-unarchive-version.spec.js.map +1 -1
  212. package/dist/commands/version/listversions.js +2 -0
  213. package/dist/commands/version/listversions.js.map +1 -1
  214. package/dist/common/UserGroupId.js +9 -4
  215. package/dist/common/UserGroupId.js.map +1 -1
  216. package/dist/common/UserGroupId.spec.js +5 -0
  217. package/dist/common/UserGroupId.spec.js.map +1 -1
  218. package/dist/constants.js +37 -143
  219. package/dist/constants.js.map +1 -1
  220. package/dist/index.js +487 -90
  221. package/dist/index.js.map +1 -1
  222. package/dist/logger.js +42 -9
  223. package/dist/logger.js.map +1 -1
  224. package/dist/session.js +56 -0
  225. package/dist/session.js.map +1 -0
  226. package/dist/session.spec.js +103 -0
  227. package/dist/session.spec.js.map +1 -0
  228. package/dist/setup-core/briefing.js +176 -0
  229. package/dist/setup-core/briefing.js.map +1 -0
  230. package/dist/setup-core/credstore.js +415 -0
  231. package/dist/setup-core/credstore.js.map +1 -0
  232. package/dist/setup-core/credstore.spec.js +238 -0
  233. package/dist/setup-core/credstore.spec.js.map +1 -0
  234. package/dist/setup-core/environments.js +267 -0
  235. package/dist/setup-core/environments.js.map +1 -0
  236. package/dist/setup-core/flow.e2e.js +165 -0
  237. package/dist/setup-core/flow.e2e.js.map +1 -0
  238. package/dist/setup-core/flow.js +765 -0
  239. package/dist/setup-core/flow.js.map +1 -0
  240. package/dist/setup-core/flow.spec.js +1348 -0
  241. package/dist/setup-core/flow.spec.js.map +1 -0
  242. package/dist/setup-core/folderconfig.js +283 -0
  243. package/dist/setup-core/folderconfig.js.map +1 -0
  244. package/dist/setup-core/git.js +97 -0
  245. package/dist/setup-core/git.js.map +1 -0
  246. package/dist/setup-core/host.js +77 -0
  247. package/dist/setup-core/host.js.map +1 -0
  248. package/dist/setup-core/importconnections.js +470 -0
  249. package/dist/setup-core/importconnections.js.map +1 -0
  250. package/dist/setup-core/importconnections.spec.js +594 -0
  251. package/dist/setup-core/importconnections.spec.js.map +1 -0
  252. package/dist/setup-core/liveness.js +94 -0
  253. package/dist/setup-core/liveness.js.map +1 -0
  254. package/dist/setup-core/liveness.spec.js +59 -0
  255. package/dist/setup-core/liveness.spec.js.map +1 -0
  256. package/dist/setup-core/localpublisherconfig.js +26 -0
  257. package/dist/setup-core/localpublisherconfig.js.map +1 -0
  258. package/dist/setup-core/localpublisherconfig.spec.js +29 -0
  259. package/dist/setup-core/localpublisherconfig.spec.js.map +1 -0
  260. package/dist/setup-core/mcpconfig.js +198 -0
  261. package/dist/setup-core/mcpconfig.js.map +1 -0
  262. package/dist/setup-core/mcpconfig.spec.js +205 -0
  263. package/dist/setup-core/mcpconfig.spec.js.map +1 -0
  264. package/dist/setup-core/packagemanifest.js +55 -0
  265. package/dist/setup-core/packagemanifest.js.map +1 -0
  266. package/dist/setup-core/ports.js +182 -0
  267. package/dist/setup-core/ports.js.map +1 -0
  268. package/dist/setup-core/ports.spec.js +173 -0
  269. package/dist/setup-core/ports.spec.js.map +1 -0
  270. package/dist/setup-core/publisherconfig.js +268 -0
  271. package/dist/setup-core/publisherconfig.js.map +1 -0
  272. package/dist/setup-core/publisherconfig.oracle.js +166 -0
  273. package/dist/setup-core/publisherconfig.oracle.js.map +1 -0
  274. package/dist/setup-core/publisherconfig.spec.js +277 -0
  275. package/dist/setup-core/publisherconfig.spec.js.map +1 -0
  276. package/dist/setup-core/publisherversion.js +26 -0
  277. package/dist/setup-core/publisherversion.js.map +1 -0
  278. package/dist/setup-core/readiness.spec.js +161 -0
  279. package/dist/setup-core/readiness.spec.js.map +1 -0
  280. package/dist/setup-core/readylines.js +169 -0
  281. package/dist/setup-core/readylines.js.map +1 -0
  282. package/dist/setup-core/readylines.spec.js +70 -0
  283. package/dist/setup-core/readylines.spec.js.map +1 -0
  284. package/dist/setup-core/refresh.js +348 -0
  285. package/dist/setup-core/refresh.js.map +1 -0
  286. package/dist/setup-core/refresh.spec.js +501 -0
  287. package/dist/setup-core/refresh.spec.js.map +1 -0
  288. package/dist/setup-core/skills.js +279 -0
  289. package/dist/setup-core/skills.js.map +1 -0
  290. package/dist/setup-core/skills.spec.js +334 -0
  291. package/dist/setup-core/skills.spec.js.map +1 -0
  292. package/dist/setup-core/supervisor.js +879 -0
  293. package/dist/setup-core/supervisor.js.map +1 -0
  294. package/dist/setup-core/supervisor.spec.js +833 -0
  295. package/dist/setup-core/supervisor.spec.js.map +1 -0
  296. package/dist/setup-core/writefile.js +61 -0
  297. package/dist/setup-core/writefile.js.map +1 -0
  298. package/dist/setup-core/writefile.spec.js +68 -0
  299. package/dist/setup-core/writefile.spec.js.map +1 -0
  300. package/dist/utils.js +409 -3
  301. package/dist/utils.js.map +1 -1
  302. package/dist/utils.spec.js +373 -2
  303. package/dist/utils.spec.js.map +1 -1
  304. package/dist/versioncheck-refresh.js +18 -0
  305. package/dist/versioncheck-refresh.js.map +1 -0
  306. package/dist/versioncheck.js +324 -0
  307. package/dist/versioncheck.js.map +1 -0
  308. package/dist/versioncheck.spec.js +587 -0
  309. package/dist/versioncheck.spec.js.map +1 -0
  310. package/node_modules/@credibledata/cli-auth/dist/index.d.ts +86 -0
  311. package/node_modules/@credibledata/cli-auth/dist/index.js +102 -0
  312. package/node_modules/@credibledata/cli-auth/package.json +19 -0
  313. package/package.json +18 -6
  314. package/.github/workflows/build.yml +0 -23
  315. package/.mocharc.json +0 -10
  316. package/.prettierignore +0 -2
  317. package/.prettierrc +0 -4
  318. package/README-DEV.md +0 -40
  319. package/coverage/coverage-summary.json +0 -40
  320. package/coverage/tmp/coverage-2152-1789496974457-0.json +0 -1
  321. package/coverage/tmp/coverage-2153-1789496954404-0.json +0 -1
  322. package/docker/Dockerfile.ci +0 -18
  323. package/docker-compose.yml +0 -18
  324. package/eslint.config.mjs +0 -45
  325. package/generate-client.sh +0 -27
  326. package/mocha.setup.ts +0 -4
  327. package/openapitools.json +0 -10
  328. package/src/client/.openapi-generator/FILES +0 -9
  329. package/src/client/.openapi-generator/VERSION +0 -1
  330. package/src/client/.openapi-generator-ignore +0 -23
  331. package/src/client/api.ts +0 -15999
  332. package/src/client/base.ts +0 -86
  333. package/src/client/common.ts +0 -150
  334. package/src/client/configuration.ts +0 -110
  335. package/src/client/git_push.sh +0 -57
  336. package/src/client/index.ts +0 -18
  337. package/src/clientconfiguration.spec.ts +0 -615
  338. package/src/clientconfiguration.ts +0 -364
  339. package/src/commands/add.ts +0 -191
  340. package/src/commands/connection/createconnections.spec.ts +0 -413
  341. package/src/commands/connection/createconnections.ts +0 -109
  342. package/src/commands/connection/deleteconnection.spec.ts +0 -189
  343. package/src/commands/connection/deleteconnection.ts +0 -57
  344. package/src/commands/connection/listconnections.spec.ts +0 -132
  345. package/src/commands/connection/listconnections.ts +0 -58
  346. package/src/commands/environment/createenvironment.spec.ts +0 -249
  347. package/src/commands/environment/createenvironment.ts +0 -73
  348. package/src/commands/environment/deleteenvironment.spec.ts +0 -152
  349. package/src/commands/environment/deleteenvironment.ts +0 -48
  350. package/src/commands/environment/getenvironment.spec.ts +0 -110
  351. package/src/commands/environment/getenvironment.ts +0 -43
  352. package/src/commands/environment/listenvironments.spec.ts +0 -123
  353. package/src/commands/environment/listenvironments.ts +0 -67
  354. package/src/commands/environment/setenvironment.spec.ts +0 -63
  355. package/src/commands/environment/setenvironment.ts +0 -14
  356. package/src/commands/environment/updateenvironment.spec.ts +0 -386
  357. package/src/commands/environment/updateenvironment.ts +0 -168
  358. package/src/commands/get.ts +0 -153
  359. package/src/commands/group/addmember.spec.ts +0 -257
  360. package/src/commands/group/addmember.ts +0 -85
  361. package/src/commands/group/creategroup.spec.ts +0 -146
  362. package/src/commands/group/creategroup.ts +0 -54
  363. package/src/commands/group/deletegroup.spec.ts +0 -120
  364. package/src/commands/group/deletegroup.ts +0 -45
  365. package/src/commands/group/getgroup.spec.ts +0 -129
  366. package/src/commands/group/getgroup.ts +0 -47
  367. package/src/commands/group/listgroups.spec.ts +0 -137
  368. package/src/commands/group/listgroups.ts +0 -45
  369. package/src/commands/group/removemember.spec.ts +0 -224
  370. package/src/commands/group/removemember.ts +0 -75
  371. package/src/commands/groupaccesstoken/createToken.spec.ts +0 -211
  372. package/src/commands/groupaccesstoken/createToken.ts +0 -72
  373. package/src/commands/groupaccesstoken/deleteToken.spec.ts +0 -147
  374. package/src/commands/groupaccesstoken/deleteToken.ts +0 -29
  375. package/src/commands/groupaccesstoken/groupContainer.ts +0 -83
  376. package/src/commands/groupaccesstoken/listTokens.spec.ts +0 -147
  377. package/src/commands/groupaccesstoken/listTokens.ts +0 -29
  378. package/src/commands/legacy.ts +0 -5
  379. package/src/commands/list.ts +0 -326
  380. package/src/commands/materialization/cancelrun.ts +0 -70
  381. package/src/commands/materialization/getindex.ts +0 -55
  382. package/src/commands/materialization/getmaterialization.ts +0 -57
  383. package/src/commands/materialization/getpreaggregate.ts +0 -58
  384. package/src/commands/materialization/getrun.ts +0 -55
  385. package/src/commands/materialization/listindexes.ts +0 -69
  386. package/src/commands/materialization/listmaterializations.ts +0 -53
  387. package/src/commands/materialization/listpreaggregates.ts +0 -74
  388. package/src/commands/materialization/listruns.ts +0 -77
  389. package/src/commands/materialization/rerun.ts +0 -123
  390. package/src/commands/misc/login.spec.ts +0 -371
  391. package/src/commands/misc/login.ts +0 -343
  392. package/src/commands/misc/logout.spec.ts +0 -32
  393. package/src/commands/misc/logout.ts +0 -9
  394. package/src/commands/misc/loopbackOAuth.ts +0 -127
  395. package/src/commands/misc/set-access-token.spec.ts +0 -95
  396. package/src/commands/misc/set-access-token.ts +0 -32
  397. package/src/commands/package/deletepackage.spec.ts +0 -164
  398. package/src/commands/package/deletepackage.ts +0 -58
  399. package/src/commands/package/listpackages.spec.ts +0 -163
  400. package/src/commands/package/listpackages.ts +0 -74
  401. package/src/commands/package/publish.spec.ts +0 -642
  402. package/src/commands/package/publish.ts +0 -236
  403. package/src/commands/package/updatepackage.spec.ts +0 -319
  404. package/src/commands/package/updatepackage.ts +0 -95
  405. package/src/commands/permission/createpermission.spec.ts +0 -507
  406. package/src/commands/permission/createpermission.ts +0 -181
  407. package/src/commands/permission/deletepermission.ts +0 -117
  408. package/src/commands/permission/getpermission.ts +0 -115
  409. package/src/commands/permission/listpermissions.ts +0 -101
  410. package/src/commands/permission/scope.ts +0 -180
  411. package/src/commands/rm.ts +0 -146
  412. package/src/commands/set.ts +0 -25
  413. package/src/commands/update.ts +0 -107
  414. package/src/commands/version/archive-unarchive-version.spec.ts +0 -456
  415. package/src/commands/version/archive-unarchive-version.ts +0 -108
  416. package/src/commands/version/listversions.spec.ts +0 -138
  417. package/src/commands/version/listversions.ts +0 -45
  418. package/src/common/UserGroupId.spec.ts +0 -115
  419. package/src/common/UserGroupId.ts +0 -137
  420. package/src/constants.spec.ts +0 -111
  421. package/src/constants.ts +0 -228
  422. package/src/index.ts +0 -378
  423. package/src/logger.spec.ts +0 -158
  424. package/src/logger.ts +0 -90
  425. package/src/polyfills/file.polyfill.ts +0 -6
  426. package/src/utils.spec.ts +0 -135
  427. package/src/utils.ts +0 -115
  428. package/src/validator.spec.ts +0 -51
  429. package/src/validator.ts +0 -44
  430. package/tsconfig.json +0 -17
@@ -0,0 +1,594 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const chai_1 = require("chai");
16
+ const fs_1 = __importDefault(require("fs"));
17
+ const os_1 = __importDefault(require("os"));
18
+ const path_1 = __importDefault(require("path"));
19
+ const host_1 = require("./host");
20
+ const importconnections_1 = require("./importconnections");
21
+ /**
22
+ * A Host that ticks the named candidates in the picker (all, by default),
23
+ * answers each confirm in order, and records what it was asked.
24
+ */
25
+ function fakeHost(confirms = [], pick) {
26
+ const asked = [];
27
+ const logs = [];
28
+ const offered = [];
29
+ const queue = [...confirms];
30
+ return {
31
+ asked,
32
+ logs,
33
+ offered,
34
+ select(_message, choices) {
35
+ return __awaiter(this, void 0, void 0, function* () {
36
+ return choices[0].value;
37
+ });
38
+ },
39
+ selectMany(message, choices) {
40
+ return __awaiter(this, void 0, void 0, function* () {
41
+ asked.push(message);
42
+ offered.push(...choices);
43
+ return choices
44
+ .filter((choice) => !choice.disabled)
45
+ .filter((choice) => pick === undefined ||
46
+ pick.includes(choice.value.name))
47
+ .map((choice) => choice.value);
48
+ });
49
+ },
50
+ confirm(message) {
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ var _a;
53
+ asked.push(message);
54
+ return (_a = queue.shift()) !== null && _a !== void 0 ? _a : true;
55
+ });
56
+ },
57
+ log(level, message) {
58
+ logs.push(`${level}: ${message}`);
59
+ },
60
+ write() { },
61
+ openUrl() {
62
+ return __awaiter(this, void 0, void 0, function* () { });
63
+ },
64
+ };
65
+ }
66
+ describe("importing a local publisher config", () => {
67
+ let workDir;
68
+ beforeEach(() => {
69
+ workDir = fs_1.default.mkdtempSync(path_1.default.join(os_1.default.tmpdir(), "import-"));
70
+ });
71
+ afterEach(() => {
72
+ fs_1.default.rmSync(workDir, { recursive: true, force: true });
73
+ });
74
+ function writeConfig(config) {
75
+ fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.config.json"), JSON.stringify(config));
76
+ }
77
+ const postgres = {
78
+ name: "warehouse",
79
+ type: "postgres",
80
+ postgresConnection: {
81
+ host: "db.internal",
82
+ databaseName: "analytics",
83
+ userName: "reader",
84
+ password: "hunter2",
85
+ },
86
+ };
87
+ describe("finding candidates", () => {
88
+ it("reads connections nested under environments", () => {
89
+ writeConfig({
90
+ environments: [{ name: "x", connections: [postgres] }],
91
+ });
92
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
93
+ (0, chai_1.expect)(found.candidates.map((c) => c.name)).to.eql(["warehouse"]);
94
+ });
95
+ it("reads a flat top-level connections array too", () => {
96
+ writeConfig({ connections: [postgres] });
97
+ (0, chai_1.expect)((0, importconnections_1.findLocalPublisherConfig)(workDir).candidates.map((c) => c.name)).to.eql(["warehouse"]);
98
+ });
99
+ it("never offers a duckdb connection with no attachment, and says why", () => {
100
+ // A local file path means nothing to Credible's cloud; the data has to
101
+ // travel in the package instead.
102
+ writeConfig({
103
+ connections: [
104
+ { name: "local", type: "duckdb", duckdbConnection: {} },
105
+ ],
106
+ });
107
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
108
+ (0, chai_1.expect)(found.candidates).to.eql([]);
109
+ (0, chai_1.expect)(found.skipped[0].reason).to.contain("publish it with the package");
110
+ });
111
+ it("never offers a duckdb connection with a local attachment", () => {
112
+ writeConfig({
113
+ connections: [
114
+ {
115
+ name: "mixed",
116
+ type: "duckdb",
117
+ duckdbConnection: {
118
+ attachedDatabases: [
119
+ { name: "lake", type: "s3" },
120
+ { name: "file", type: "duckdb", path: "./x.db" },
121
+ ],
122
+ },
123
+ },
124
+ ],
125
+ });
126
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
127
+ (0, chai_1.expect)(found.candidates).to.eql([]);
128
+ (0, chai_1.expect)(found.skipped.map((s) => s.name)).to.eql(["mixed"]);
129
+ (0, chai_1.expect)(found.skipped[0].reason).to.contain("publish it with the package");
130
+ });
131
+ it("never offers a duckdb connection with setupSQL, even with a remote attachment", () => {
132
+ writeConfig({
133
+ connections: [
134
+ {
135
+ name: "scripted",
136
+ type: "duckdb",
137
+ duckdbConnection: {
138
+ attachedDatabases: [{ name: "lake", type: "s3" }],
139
+ setupSQL: "INSTALL httpfs;",
140
+ },
141
+ },
142
+ ],
143
+ });
144
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
145
+ (0, chai_1.expect)(found.candidates).to.eql([]);
146
+ (0, chai_1.expect)(found.skipped[0].reason).to.contain("setupSQL");
147
+ });
148
+ it("never offers a connection named duckdb, of any type, and says to rename it", () => {
149
+ writeConfig({
150
+ connections: [
151
+ {
152
+ name: "duckdb",
153
+ type: "duckdb",
154
+ duckdbConnection: {
155
+ attachedDatabases: [{ name: "b", type: "s3" }],
156
+ },
157
+ },
158
+ Object.assign(Object.assign({}, postgres), { name: "duckdb" }),
159
+ ],
160
+ });
161
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
162
+ (0, chai_1.expect)(found.candidates).to.eql([]);
163
+ (0, chai_1.expect)(found.skipped.map((s) => s.reason)).to.eql([
164
+ "its name is reserved for the per-package sandbox, so rename it first",
165
+ "its name is reserved for the per-package sandbox, so rename it first",
166
+ ]);
167
+ });
168
+ it("never offers an S3 attachment on the host credential chain, which the server refuses", () => {
169
+ writeConfig({
170
+ connections: [
171
+ {
172
+ name: "chain",
173
+ type: "duckdb",
174
+ duckdbConnection: {
175
+ attachedDatabases: [
176
+ {
177
+ name: "b",
178
+ type: "s3",
179
+ s3Connection: { provider: "credential_chain" },
180
+ },
181
+ ],
182
+ },
183
+ },
184
+ ],
185
+ });
186
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
187
+ (0, chai_1.expect)(found.candidates).to.eql([]);
188
+ (0, chai_1.expect)(found.skipped[0].reason).to.contain("access key and secret");
189
+ });
190
+ it("gives an unknown attachment type and extra settings their own reasons", () => {
191
+ writeConfig({
192
+ connections: [
193
+ {
194
+ name: "odd",
195
+ type: "duckdb",
196
+ duckdbConnection: {
197
+ attachedDatabases: [{ name: "x", type: "mystery" }],
198
+ },
199
+ },
200
+ {
201
+ name: "extra",
202
+ type: "duckdb",
203
+ duckdbConnection: {
204
+ attachedDatabases: [{ name: "b", type: "s3" }],
205
+ path: "./x.db",
206
+ },
207
+ },
208
+ ],
209
+ });
210
+ const reasons = (0, importconnections_1.findLocalPublisherConfig)(workDir).skipped.map((s) => s.reason);
211
+ (0, chai_1.expect)(reasons[0]).to.contain("not a remote service");
212
+ (0, chai_1.expect)(reasons[1]).to.contain("beyond attachedDatabases");
213
+ });
214
+ it("offers a duckdb connection whose attachments are all remote", () => {
215
+ writeConfig({
216
+ connections: [
217
+ {
218
+ name: "files",
219
+ type: "duckdb",
220
+ duckdbConnection: {
221
+ attachedDatabases: [
222
+ { name: "bucket", type: "s3" },
223
+ { name: "gcs_files", type: "gcs" },
224
+ ],
225
+ },
226
+ },
227
+ ],
228
+ });
229
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
230
+ (0, chai_1.expect)(found.candidates.map((c) => c.name)).to.eql(["files"]);
231
+ (0, chai_1.expect)(found.skipped).to.eql([]);
232
+ });
233
+ it("never offers a publisher proxy, which is what setup itself writes", () => {
234
+ writeConfig({
235
+ connections: [{ name: "wh", type: "publisher" }],
236
+ });
237
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
238
+ (0, chai_1.expect)(found.candidates).to.eql([]);
239
+ });
240
+ it("is absent rather than failing when there is no config", () => {
241
+ (0, chai_1.expect)((0, importconnections_1.findLocalPublisherConfig)(workDir)).to.equal(undefined);
242
+ });
243
+ it("is absent rather than failing when the config is not JSON", () => {
244
+ fs_1.default.writeFileSync(path_1.default.join(workDir, "publisher.config.json"), "{ not json");
245
+ (0, chai_1.expect)((0, importconnections_1.findLocalPublisherConfig)(workDir)).to.equal(undefined);
246
+ });
247
+ });
248
+ describe("what the user is shown", () => {
249
+ it("describes where a connection points without printing the password", () => {
250
+ writeConfig({ connections: [postgres] });
251
+ const found = (0, importconnections_1.findLocalPublisherConfig)(workDir);
252
+ const host = fakeHost([false]);
253
+ return (0, importconnections_1.importLocalConnections)(found, host, "prod", () => __awaiter(void 0, void 0, void 0, function* () {
254
+ return ({
255
+ ok: true,
256
+ });
257
+ })).then(() => {
258
+ const printed = host.logs.join("\n");
259
+ (0, chai_1.expect)(printed).to.contain("db.internal");
260
+ (0, chai_1.expect)(printed, "a credential must never reach the terminal").to.not.contain("hunter2");
261
+ });
262
+ });
263
+ });
264
+ describe("consent", () => {
265
+ it("sends nothing when the user ticks nothing", () => __awaiter(void 0, void 0, void 0, function* () {
266
+ writeConfig({ connections: [postgres] });
267
+ const sent = [];
268
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost([], []), "prod", (connection) => __awaiter(void 0, void 0, void 0, function* () {
269
+ sent.push(String(connection.name));
270
+ return { ok: true };
271
+ }));
272
+ (0, chai_1.expect)(sent, "not even a dry run before the user agrees").to.eql([]);
273
+ (0, chai_1.expect)(outcome.declined).to.equal(true);
274
+ }));
275
+ it("offers each connection as a row, and the skipped ones disabled with their reason", () => __awaiter(void 0, void 0, void 0, function* () {
276
+ writeConfig({
277
+ connections: [
278
+ postgres,
279
+ { name: "local", type: "duckdb", duckdbConnection: {} },
280
+ ],
281
+ });
282
+ const host = fakeHost([], []);
283
+ yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }));
284
+ (0, chai_1.expect)(host.offered.map((c) => c.name)).to.eql([
285
+ "warehouse (postgres) — host=db.internal databaseName=analytics",
286
+ "local",
287
+ ]);
288
+ (0, chai_1.expect)(host.offered[1].disabled).to.contain("local DuckDB file");
289
+ }));
290
+ it("only tests what was ticked", () => __awaiter(void 0, void 0, void 0, function* () {
291
+ writeConfig({
292
+ connections: [
293
+ postgres,
294
+ { name: "other", type: "postgres", postgresConnection: {} },
295
+ ],
296
+ });
297
+ const tested = [];
298
+ yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost([true], ["other"]), "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
299
+ if (dryRun)
300
+ tested.push(String(connection.name));
301
+ return { ok: true };
302
+ }));
303
+ (0, chai_1.expect)(tested).to.eql(["other"]);
304
+ }));
305
+ // The two questions are deliberately separate: ticking a connection in
306
+ // the picker authorises a reachability check, not an upload. Merging them
307
+ // would make the safe-sounding question the one that ships the credential.
308
+ it("asks a second time before actually sending credentials", () => __awaiter(void 0, void 0, void 0, function* () {
309
+ writeConfig({ connections: [postgres] });
310
+ const calls = [];
311
+ const host = fakeHost([false]);
312
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", (_c_1, _a) => __awaiter(void 0, [_c_1, _a], void 0, function* (_c, { dryRun }) {
313
+ calls.push(dryRun);
314
+ return { ok: true };
315
+ }));
316
+ (0, chai_1.expect)(calls, "only the dry run should have happened").to.eql([true]);
317
+ (0, chai_1.expect)(outcome.created).to.eql([]);
318
+ (0, chai_1.expect)(outcome.declined).to.equal(true);
319
+ // Each question says what it gates: the tick sends the connection for
320
+ // a test, the confirm decides whether Credible stores it.
321
+ (0, chai_1.expect)(host.asked[0]).to.contain("Ticking one sends it to Credible for a reachability test; nothing is saved yet.");
322
+ (0, chai_1.expect)(host.asked[1]).to.equal("Store warehouse in environment 'prod'? Credible keeps their credentials to run queries against them.");
323
+ }));
324
+ it("names the environment in the question that sends them", () => __awaiter(void 0, void 0, void 0, function* () {
325
+ writeConfig({ connections: [postgres] });
326
+ const host = fakeHost([false]);
327
+ yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod-bars", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }));
328
+ (0, chai_1.expect)(host.asked[1]).to.contain("prod-bars");
329
+ }));
330
+ });
331
+ describe("--connections, the flag form of consent", () => {
332
+ const two = {
333
+ connections: [
334
+ postgres,
335
+ { name: "other", type: "postgres", postgresConnection: {} },
336
+ ],
337
+ };
338
+ it("a name list asks nothing and creates exactly those", () => __awaiter(void 0, void 0, void 0, function* () {
339
+ writeConfig(two);
340
+ const host = fakeHost();
341
+ const created = [];
342
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
343
+ if (!dryRun)
344
+ created.push(String(connection.name));
345
+ return { ok: true };
346
+ }), { selection: ["other"] });
347
+ (0, chai_1.expect)(host.asked, "naming them is the consent").to.eql([]);
348
+ (0, chai_1.expect)(created).to.eql(["other"]);
349
+ (0, chai_1.expect)(outcome.declined).to.equal(false);
350
+ }));
351
+ it("all creates every candidate without asking", () => __awaiter(void 0, void 0, void 0, function* () {
352
+ writeConfig(two);
353
+ const host = fakeHost();
354
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }), { selection: "all" });
355
+ (0, chai_1.expect)(host.asked).to.eql([]);
356
+ (0, chai_1.expect)(outcome.created).to.eql(["warehouse", "other"]);
357
+ }));
358
+ it("none skips the step entirely, without even the skipped-connection notes", () => __awaiter(void 0, void 0, void 0, function* () {
359
+ writeConfig(two);
360
+ const host = fakeHost();
361
+ let calls = 0;
362
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", () => __awaiter(void 0, void 0, void 0, function* () {
363
+ calls += 1;
364
+ return { ok: true };
365
+ }), { selection: "none" });
366
+ (0, chai_1.expect)(calls).to.equal(0);
367
+ (0, chai_1.expect)(host.asked).to.eql([]);
368
+ (0, chai_1.expect)(host.logs).to.eql([]);
369
+ (0, chai_1.expect)(outcome).to.eql({ created: [], rejected: [], declined: false });
370
+ }));
371
+ it("a name the file does not have is an error that lists what it does have", () => __awaiter(void 0, void 0, void 0, function* () {
372
+ // A typo must not import nothing and report success.
373
+ writeConfig(two);
374
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }), { selection: ["warehous"] }).catch((e) => e);
375
+ (0, chai_1.expect)(error).to.be.instanceOf(host_1.SetupError);
376
+ (0, chai_1.expect)(error.message).to.contain("'warehous'");
377
+ (0, chai_1.expect)(error.message).to.contain("pick from: warehouse, other");
378
+ }));
379
+ it("fails, rather than continuing, when none of the named connections is reachable", () => __awaiter(void 0, void 0, void 0, function* () {
380
+ writeConfig(two);
381
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: false, reason: "no route to host" }); }), { selection: ["warehouse"] }).catch((e) => e);
382
+ (0, chai_1.expect)(error).to.be.instanceOf(host_1.SetupError);
383
+ (0, chai_1.expect)(error.message).to.contain("'warehouse' failed Credible's connection test, so nothing was added. Credible said: no route to host");
384
+ (0, chai_1.expect)(error.message).to.contain("or drop it from --connections.");
385
+ }));
386
+ // Named and unusable is a failed instruction even when another named
387
+ // one works, and it is refused before anything is created.
388
+ it("fails before creating anything when one named connection is unreachable", () => __awaiter(void 0, void 0, void 0, function* () {
389
+ writeConfig(two);
390
+ const created = [];
391
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
392
+ if (connection.name === "other") {
393
+ return { ok: false, reason: "no route to host" };
394
+ }
395
+ if (!dryRun)
396
+ created.push(String(connection.name));
397
+ return { ok: true };
398
+ }), { selection: ["warehouse", "other"] }).catch((e) => e);
399
+ (0, chai_1.expect)(error).to.be.instanceOf(host_1.SetupError);
400
+ // The reason once, and a fix that is something to do.
401
+ (0, chai_1.expect)(error.message).to.equal(`'other' failed Credible's connection test, so nothing was added. Credible said: no route to host Fix: correct its credentials in ${path_1.default.join(workDir, "publisher.config.json")}, or drop it from --connections.`);
402
+ (0, chai_1.expect)(created).to.eql([]);
403
+ }));
404
+ // The publisher fills `${NAME}` from the environment when it reads this
405
+ // file; sent as written, the placeholder failed its test with a reason
406
+ // that named neither the variable nor the fix.
407
+ // The server does not refuse a create under an existing name, and its
408
+ // test borrows that connection's secrets, so a clash could pass and
409
+ // replace the one the environment already serves.
410
+ describe("a name the environment already has", () => {
411
+ // Skipped rather than refused, so re-running the same
412
+ // `cred init --connections warehouse` after it worked is a no-op.
413
+ it("skips a named one without testing it, so a re-run is a no-op", () => __awaiter(void 0, void 0, void 0, function* () {
414
+ writeConfig(two);
415
+ const tested = [];
416
+ const host = fakeHost();
417
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", (connection) => __awaiter(void 0, void 0, void 0, function* () {
418
+ tested.push(String(connection.name));
419
+ return { ok: true };
420
+ }), {
421
+ selection: ["warehouse"],
422
+ existingNames: () => __awaiter(void 0, void 0, void 0, function* () { return ["warehouse"]; }),
423
+ });
424
+ (0, chai_1.expect)(tested).to.eql([]);
425
+ (0, chai_1.expect)(outcome.created).to.eql([]);
426
+ (0, chai_1.expect)(host.logs.join("\n")).to.contain("Not importing 'warehouse': prod already has a connection with that name");
427
+ }));
428
+ it("leaves it out of an `all` import, and imports the rest", () => __awaiter(void 0, void 0, void 0, function* () {
429
+ writeConfig(two);
430
+ const created = [];
431
+ yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
432
+ if (!dryRun)
433
+ created.push(String(connection.name));
434
+ return { ok: true };
435
+ }), { selection: "all", existingNames: () => __awaiter(void 0, void 0, void 0, function* () { return ["warehouse"]; }) });
436
+ (0, chai_1.expect)(created).to.eql(["other"]);
437
+ }));
438
+ });
439
+ describe("${NAME} references, as the publisher reads them", () => {
440
+ const withKey = {
441
+ connections: [
442
+ {
443
+ name: "bq",
444
+ type: "bigquery",
445
+ bigqueryConnection: {
446
+ serviceAccountKeyJson: "${CRED_TEST_KEY}",
447
+ },
448
+ },
449
+ ],
450
+ };
451
+ afterEach(() => delete process.env.CRED_TEST_KEY);
452
+ // The permanent reason wins: exporting the variable would only get
453
+ // it refused again as a local DuckDB file.
454
+ it("says a duckdb file is local even when its path uses an unset variable", () => {
455
+ writeConfig({
456
+ connections: [
457
+ {
458
+ name: "local",
459
+ type: "duckdb",
460
+ duckdbConnection: { path: "${CRED_TEST_DIR}/x.db" },
461
+ },
462
+ ],
463
+ });
464
+ (0, chai_1.expect)((0, importconnections_1.findLocalPublisherConfig)(workDir).skipped[0].reason).to.contain("a local DuckDB file");
465
+ });
466
+ it("matches on the filled-in name", () => {
467
+ process.env.CRED_TEST_KEY = "warehouse_prod";
468
+ writeConfig({
469
+ connections: [
470
+ {
471
+ name: "${CRED_TEST_KEY}",
472
+ type: "postgres",
473
+ postgresConnection: {},
474
+ },
475
+ ],
476
+ });
477
+ (0, chai_1.expect)((0, importconnections_1.findLocalPublisherConfig)(workDir).candidates[0].name).to.equal("warehouse_prod");
478
+ });
479
+ it("imports the value the environment sets", () => __awaiter(void 0, void 0, void 0, function* () {
480
+ process.env.CRED_TEST_KEY = '{"type":"service_account"}';
481
+ writeConfig(withKey);
482
+ const sent = [];
483
+ yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", (connection) => __awaiter(void 0, void 0, void 0, function* () {
484
+ sent.push(connection);
485
+ return { ok: true };
486
+ }), { selection: ["bq"] });
487
+ (0, chai_1.expect)(sent[0]).to.deep.include({
488
+ bigqueryConnection: {
489
+ serviceAccountKeyJson: '{"type":"service_account"}',
490
+ },
491
+ });
492
+ }));
493
+ it("refuses a named connection whose variable is unset, naming it", () => __awaiter(void 0, void 0, void 0, function* () {
494
+ writeConfig(withKey);
495
+ const tested = [];
496
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", (connection) => __awaiter(void 0, void 0, void 0, function* () {
497
+ tested.push(String(connection.name));
498
+ return { ok: true };
499
+ }), { selection: ["bq"] }).catch((e) => e);
500
+ (0, chai_1.expect)(tested, "nothing is sent").to.eql([]);
501
+ (0, chai_1.expect)(error).to.be.instanceOf(host_1.SetupError);
502
+ (0, chai_1.expect)(error.message).to.contain("it uses ${CRED_TEST_KEY}, which is not set in this shell. Fix: export CRED_TEST_KEY and run this again, or leave it out; nothing in that file can be imported.");
503
+ }));
504
+ });
505
+ // Passed the test, then failed the create: no caller reads `rejected`,
506
+ // so this used to exit 0 with nothing created.
507
+ it("fails when a selected connection passes the test but the create is refused", () => __awaiter(void 0, void 0, void 0, function* () {
508
+ writeConfig(two);
509
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
510
+ return !dryRun && connection.name === "other"
511
+ ? { ok: false, reason: "name already in use" }
512
+ : { ok: true };
513
+ }), { selection: "all" }).catch((e) => e);
514
+ (0, chai_1.expect)(error).to.be.instanceOf(host_1.SetupError);
515
+ (0, chai_1.expect)(error.message).to.contain("Could not add 'other' to environment 'prod'; added warehouse.");
516
+ (0, chai_1.expect)(error.message).to.contain("other: name already in use");
517
+ }));
518
+ it("refuses a name that is in the file but cannot be imported, saying why", () => __awaiter(void 0, void 0, void 0, function* () {
519
+ writeConfig({
520
+ connections: [postgres, { name: "local", type: "duckdb" }],
521
+ });
522
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }), { selection: ["local"] }).catch((e) => e);
523
+ (0, chai_1.expect)(error).to.be.instanceOf(host_1.SetupError);
524
+ (0, chai_1.expect)(error.message).to.contain("'local' is in " +
525
+ path_1.default.join(workDir, "publisher.config.json") +
526
+ " but cannot be imported: a local DuckDB file");
527
+ (0, chai_1.expect)(error.message).to.not.contain("No connection named");
528
+ }));
529
+ // The empty-file return used to run first, so this exited 0 having
530
+ // imported nothing.
531
+ it("refuses a named connection when nothing in the file can be imported", () => __awaiter(void 0, void 0, void 0, function* () {
532
+ writeConfig({ connections: [{ name: "local", type: "duckdb" }] });
533
+ for (const name of ["local", "typo"]) {
534
+ const error = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }), { selection: [name] }).catch((e) => e);
535
+ (0, chai_1.expect)(error, name).to.be.instanceOf(host_1.SetupError);
536
+ (0, chai_1.expect)(error.message, name).to.contain("nothing in that file can be imported");
537
+ }
538
+ const typo = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: true }); }), { selection: ["typo"] }).catch((e) => e);
539
+ // The fix is something to do, not a restatement of the problem.
540
+ (0, chai_1.expect)(typo.message).to.equal(`No connection named 'typo' in ${(0, importconnections_1.findLocalPublisherConfig)(workDir).path}, and nothing in that file can be imported. Fix: add the connection to that file, or leave the name out.`);
541
+ }));
542
+ it("tests and creates a name given twice once", () => __awaiter(void 0, void 0, void 0, function* () {
543
+ writeConfig(two);
544
+ const calls = [];
545
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost(), "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
546
+ calls.push(`${connection.name}:${dryRun}`);
547
+ return { ok: true };
548
+ }), { selection: ["other", "other"] });
549
+ (0, chai_1.expect)(calls).to.eql(["other:true", "other:false"]);
550
+ (0, chai_1.expect)(outcome.created).to.eql(["other"]);
551
+ }));
552
+ });
553
+ describe("preflight", () => {
554
+ it("creates only the connections Credible could reach", () => __awaiter(void 0, void 0, void 0, function* () {
555
+ writeConfig({
556
+ connections: [
557
+ postgres,
558
+ { name: "laptop", type: "postgres", postgresConnection: {} },
559
+ ],
560
+ });
561
+ const created = [];
562
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), fakeHost([true]), "prod", (connection_1, _a) => __awaiter(void 0, [connection_1, _a], void 0, function* (connection, { dryRun }) {
563
+ if (connection.name === "laptop") {
564
+ return { ok: false, reason: "connection refused" };
565
+ }
566
+ if (!dryRun)
567
+ created.push(String(connection.name));
568
+ return { ok: true };
569
+ }));
570
+ (0, chai_1.expect)(created).to.eql(["warehouse"]);
571
+ (0, chai_1.expect)(outcome.rejected.map((r) => r.name)).to.eql(["laptop"]);
572
+ }));
573
+ it("stops before the second question when nothing is reachable", () => __awaiter(void 0, void 0, void 0, function* () {
574
+ // Otherwise the user is asked to confirm sending an empty list.
575
+ writeConfig({ connections: [postgres] });
576
+ const host = fakeHost([true]);
577
+ const outcome = yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", () => __awaiter(void 0, void 0, void 0, function* () { return ({ ok: false, reason: "no route to host" }); }));
578
+ (0, chai_1.expect)(outcome.created).to.eql([]);
579
+ (0, chai_1.expect)(host.asked).to.have.length(1);
580
+ }));
581
+ it("surfaces the server's own reason, which is the actionable part", () => __awaiter(void 0, void 0, void 0, function* () {
582
+ writeConfig({ connections: [postgres] });
583
+ const host = fakeHost([true]);
584
+ yield (0, importconnections_1.importLocalConnections)((0, importconnections_1.findLocalPublisherConfig)(workDir), host, "prod", () => __awaiter(void 0, void 0, void 0, function* () {
585
+ return ({
586
+ ok: false,
587
+ reason: "password authentication failed for user 'reader'",
588
+ });
589
+ }));
590
+ (0, chai_1.expect)(host.logs.join("\n")).to.contain("password authentication failed");
591
+ }));
592
+ });
593
+ });
594
+ //# sourceMappingURL=importconnections.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"importconnections.spec.js","sourceRoot":"","sources":["../../src/setup-core/importconnections.spec.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+BAA8B;AAC9B,4CAAoB;AACpB,4CAAoB;AACpB,gDAAwB;AACxB,iCAAsD;AACtD,2DAK6B;AAE7B;;;GAGG;AACH,SAAS,QAAQ,CACd,WAAsB,EAAE,EACxB,IAAe;IAMf,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,MAAM,IAAI,GAAa,EAAE,CAAC;IAC1B,MAAM,OAAO,GAA0B,EAAE,CAAC;IAC1C,MAAM,KAAK,GAAG,CAA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