orcaq 1.0.26 → 1.0.28

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 (1434) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/-lZvfnzr.js +1 -0
  3. package/.output/public/_nuxt/ACi_yrrw.js +1 -0
  4. package/.output/public/_nuxt/AgentWorkspace.67IpTcyl.css +1 -0
  5. package/.output/public/_nuxt/B-E3EDXq.js +21 -0
  6. package/.output/public/_nuxt/B-o1cyu1.js +1 -0
  7. package/.output/public/_nuxt/B-rj9QI0.js +1 -0
  8. package/.output/public/_nuxt/B0pvfm-W.js +1 -0
  9. package/.output/public/_nuxt/B3XOCDJg.js +1 -0
  10. package/.output/public/_nuxt/B7iORLht.js +8 -0
  11. package/.output/public/_nuxt/B9xm8XSJ.js +1 -0
  12. package/.output/public/_nuxt/BDPGejuO.js +2 -0
  13. package/.output/public/_nuxt/BHFnD9yO.js +1 -0
  14. package/.output/public/_nuxt/BHp-OX9z.js +1 -0
  15. package/.output/public/_nuxt/BIW9Rd2L.js +1 -0
  16. package/.output/public/_nuxt/BJdgR-zN.js +1 -0
  17. package/.output/public/_nuxt/BKltSiU0.js +1 -0
  18. package/.output/public/_nuxt/BQAF7cM_.js +53 -0
  19. package/.output/public/_nuxt/BRpeq4XL.js +1 -0
  20. package/.output/public/_nuxt/BSs5g8DH.js +1 -0
  21. package/.output/public/_nuxt/BUuSKT2f.js +152 -0
  22. package/.output/public/_nuxt/BV4_2PzU.js +1 -0
  23. package/.output/public/_nuxt/BVmBXPoG.js +1 -0
  24. package/.output/public/_nuxt/BZEKLHO-.js +1 -0
  25. package/.output/public/_nuxt/BaseCodeEditor.SAr2eD8R.css +1 -0
  26. package/.output/public/_nuxt/BiOIaWuc.js +1 -0
  27. package/.output/public/_nuxt/BlWNlw-C.js +15 -0
  28. package/.output/public/_nuxt/BranJUWp.js +1 -0
  29. package/.output/public/_nuxt/BsnN2mQb.js +3 -0
  30. package/.output/public/_nuxt/BwddCgOY.js +1 -0
  31. package/.output/public/_nuxt/C26aAkUg.js +39 -0
  32. package/.output/public/_nuxt/CAcIcjka.js +9 -0
  33. package/.output/public/_nuxt/CO-m0olR.js +2 -0
  34. package/.output/public/_nuxt/CQNFvXDN.js +1 -0
  35. package/.output/public/_nuxt/CQQKPHb8.js +225 -0
  36. package/.output/public/_nuxt/CQr87mff.js +1 -0
  37. package/.output/public/_nuxt/C__Jz_zH.js +40 -0
  38. package/.output/public/_nuxt/CbjqLbgu.js +1 -0
  39. package/.output/public/_nuxt/CfblXyCF.js +1 -0
  40. package/.output/public/_nuxt/Cqe10li5.js +1 -0
  41. package/.output/public/_nuxt/CwtNS48a.js +1 -0
  42. package/.output/public/_nuxt/D4jtSPyP.js +3 -0
  43. package/.output/public/_nuxt/D8s-WG7x.js +1 -0
  44. package/.output/public/_nuxt/D9SCXF1G.js +1 -0
  45. package/.output/public/_nuxt/DAsY4LnG.js +1 -0
  46. package/.output/public/_nuxt/DM73sEXg.js +1 -0
  47. package/.output/public/_nuxt/DNmOzKte.js +1 -0
  48. package/.output/public/_nuxt/DdMwxl0I.js +1 -0
  49. package/.output/public/_nuxt/DfL_wWxk.js +1 -0
  50. package/.output/public/_nuxt/DftZZFKd.js +732 -0
  51. package/.output/public/_nuxt/DgPgl0Vt.js +39 -0
  52. package/.output/public/_nuxt/DpyvTVPg.js +8 -0
  53. package/.output/public/_nuxt/Ds4ET3BG.js +72 -0
  54. package/.output/public/_nuxt/Dwm3kp4S.js +3867 -0
  55. package/.output/public/_nuxt/DynamicTable.BW0D7NXb.css +1 -0
  56. package/.output/public/_nuxt/GqcI3eLm.js +67 -0
  57. package/.output/public/_nuxt/QuickQuery.CJ7tNjo4.css +1 -0
  58. package/.output/public/_nuxt/S6q6IfIg.js +6 -0
  59. package/.output/public/_nuxt/SzZsnvJ-.js +2 -0
  60. package/.output/public/_nuxt/T2yrk5P8.js +1 -0
  61. package/.output/public/_nuxt/UrLgZoyE.js +9 -0
  62. package/.output/public/_nuxt/W0T58tNs.js +1 -0
  63. package/.output/public/_nuxt/WrapperErdDiagram.DsE2QNGr.css +1 -0
  64. package/.output/public/_nuxt/Yzrsuije.js +1 -0
  65. package/.output/public/_nuxt/_fileId_.B3PtfMYN.css +1 -0
  66. package/.output/public/_nuxt/aKVabwds.js +1 -0
  67. package/.output/public/_nuxt/builds/latest.json +1 -1
  68. package/.output/public/_nuxt/builds/meta/1e32d709-950d-49a3-8d61-1b3385318747.json +1 -0
  69. package/.output/public/_nuxt/default.DC7ec2JI.css +1 -0
  70. package/.output/public/_nuxt/entry.Kia9TCip.css +1 -0
  71. package/.output/public/_nuxt/fuZLfV_i.js +1 -0
  72. package/.output/public/_nuxt/iDT-eQ46.js +1 -0
  73. package/.output/public/_nuxt/index.P0q-dO_S.css +1 -0
  74. package/.output/public/_nuxt/lN7hePE6.js +1 -0
  75. package/.output/public/_nuxt/logo.BsJ2Dfin.png +0 -0
  76. package/.output/public/_nuxt/mW-nBTJP.js +1 -0
  77. package/.output/public/_nuxt/rdXrKZa8.js +68 -0
  78. package/.output/public/_nuxt/vU5dtBjy.js +1 -0
  79. package/.output/public/logo-8-bits.svg +4 -0
  80. package/.output/server/chunks/_/create-adapter.mjs +68 -0
  81. package/.output/server/chunks/_/create-adapter.mjs.map +1 -0
  82. package/.output/server/chunks/_/database-error.mjs +53 -0
  83. package/.output/server/chunks/_/database-error.mjs.map +1 -0
  84. package/.output/server/chunks/_/database-roles.factory.mjs +737 -0
  85. package/.output/server/chunks/_/database-roles.factory.mjs.map +1 -0
  86. package/.output/server/chunks/_/db-connection.mjs +352 -0
  87. package/.output/server/chunks/_/db-connection.mjs.map +1 -0
  88. package/.output/server/chunks/_/error.mjs +25 -0
  89. package/.output/server/chunks/_/error.mjs.map +1 -0
  90. package/.output/server/chunks/_/functions.factory.mjs +174 -0
  91. package/.output/server/chunks/_/functions.factory.mjs.map +1 -0
  92. package/.output/server/chunks/_/instance-insights.factory.mjs +643 -0
  93. package/.output/server/chunks/_/instance-insights.factory.mjs.map +1 -0
  94. package/.output/server/chunks/_/metadata.factory.mjs +583 -0
  95. package/.output/server/chunks/_/metadata.factory.mjs.map +1 -0
  96. package/.output/server/chunks/_/query.factory.mjs +163 -0
  97. package/.output/server/chunks/_/query.factory.mjs.map +1 -0
  98. package/.output/server/chunks/_/tables.factory.mjs +788 -0
  99. package/.output/server/chunks/_/tables.factory.mjs.map +1 -0
  100. package/.output/server/chunks/_/views.factory.mjs +227 -0
  101. package/.output/server/chunks/_/views.factory.mjs.map +1 -0
  102. package/.output/server/chunks/build/client.manifest.mjs +565 -319
  103. package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
  104. package/.output/server/chunks/nitro/nitro.mjs +717 -804
  105. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  106. package/.output/server/chunks/routes/api/ai/agent.mjs +1626 -0
  107. package/.output/server/chunks/routes/api/ai/agent.mjs.map +1 -0
  108. package/.output/server/chunks/routes/api/ai/chat.mjs +2 -2
  109. package/.output/server/chunks/routes/api/database-export/export-database.mjs +16 -5
  110. package/.output/server/chunks/routes/api/database-export/export-database.mjs.map +1 -1
  111. package/.output/server/chunks/routes/api/database-import/import-database.mjs +31 -5
  112. package/.output/server/chunks/routes/api/database-import/import-database.mjs.map +1 -1
  113. package/.output/server/chunks/routes/api/database-roles/create-role.mjs +13 -7
  114. package/.output/server/chunks/routes/api/database-roles/create-role.mjs.map +1 -1
  115. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs +13 -7
  116. package/.output/server/chunks/routes/api/database-roles/delete-role.mjs.map +1 -1
  117. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs +13 -7
  118. package/.output/server/chunks/routes/api/database-roles/get-databases-with-permissions.mjs.map +1 -1
  119. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs +20 -9
  120. package/.output/server/chunks/routes/api/database-roles/get-databases.mjs.map +1 -1
  121. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs +13 -7
  122. package/.output/server/chunks/routes/api/database-roles/get-permissions.mjs.map +1 -1
  123. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs +13 -7
  124. package/.output/server/chunks/routes/api/database-roles/get-role-inheritance.mjs.map +1 -1
  125. package/.output/server/chunks/routes/api/database-roles/get-role.mjs +13 -7
  126. package/.output/server/chunks/routes/api/database-roles/get-role.mjs.map +1 -1
  127. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs +13 -7
  128. package/.output/server/chunks/routes/api/database-roles/get-roles.mjs.map +1 -1
  129. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs +13 -7
  130. package/.output/server/chunks/routes/api/database-roles/get-schema-objects.mjs.map +1 -1
  131. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs +13 -7
  132. package/.output/server/chunks/routes/api/database-roles/get-schemas.mjs.map +1 -1
  133. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs +13 -7
  134. package/.output/server/chunks/routes/api/database-roles/grant-bulk-permissions.mjs.map +1 -1
  135. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs +13 -7
  136. package/.output/server/chunks/routes/api/database-roles/grant-permission.mjs.map +1 -1
  137. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs +13 -7
  138. package/.output/server/chunks/routes/api/database-roles/revoke-permission.mjs.map +1 -1
  139. package/.output/server/chunks/routes/api/functions/definition.post.mjs +35 -0
  140. package/.output/server/chunks/routes/api/functions/definition.post.mjs.map +1 -0
  141. package/.output/server/chunks/routes/api/functions/delete.post.mjs +41 -0
  142. package/.output/server/chunks/routes/api/functions/delete.post.mjs.map +1 -0
  143. package/.output/server/chunks/routes/api/functions/overview.post.mjs +42 -0
  144. package/.output/server/chunks/routes/api/functions/overview.post.mjs.map +1 -0
  145. package/.output/server/chunks/routes/api/functions/rename.post.mjs +48 -0
  146. package/.output/server/chunks/routes/api/functions/rename.post.mjs.map +1 -0
  147. package/.output/server/chunks/routes/api/functions/signature.post.mjs +35 -0
  148. package/.output/server/chunks/routes/api/functions/signature.post.mjs.map +1 -0
  149. package/.output/server/chunks/routes/api/functions/update.post.mjs +45 -0
  150. package/.output/server/chunks/routes/api/functions/update.post.mjs.map +1 -0
  151. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs +55 -0
  152. package/.output/server/chunks/routes/api/instance-insights/cancel-query.post.mjs.map +1 -0
  153. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs +58 -0
  154. package/.output/server/chunks/routes/api/instance-insights/configuration.post.mjs.map +1 -0
  155. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs +55 -0
  156. package/.output/server/chunks/routes/api/instance-insights/dashboard.post.mjs.map +1 -0
  157. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs +55 -0
  158. package/.output/server/chunks/routes/api/instance-insights/drop-slot.post.mjs.map +1 -0
  159. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs +55 -0
  160. package/.output/server/chunks/routes/api/instance-insights/replication.post.mjs.map +1 -0
  161. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs +55 -0
  162. package/.output/server/chunks/routes/api/instance-insights/state.post.mjs.map +1 -0
  163. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs +55 -0
  164. package/.output/server/chunks/routes/api/instance-insights/terminate-connection.post.mjs.map +1 -0
  165. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs +60 -0
  166. package/.output/server/chunks/routes/api/instance-insights/toggle-slot-status.post.mjs.map +1 -0
  167. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs +15 -4
  168. package/.output/server/chunks/routes/api/managment-connection/health-check.mjs.map +1 -1
  169. package/.output/server/chunks/routes/api/metadata/erd.post.mjs +34 -0
  170. package/.output/server/chunks/routes/api/metadata/erd.post.mjs.map +1 -0
  171. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs +36 -0
  172. package/.output/server/chunks/routes/api/metadata/meta-data.post.mjs.map +1 -0
  173. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs +35 -0
  174. package/.output/server/chunks/routes/api/metadata/reverse-schemas.post.mjs.map +1 -0
  175. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs +103 -0
  176. package/.output/server/chunks/routes/api/metrics/monitor.post.mjs.map +1 -0
  177. package/.output/server/chunks/routes/api/query/execute.post.mjs +46 -0
  178. package/.output/server/chunks/routes/api/query/execute.post.mjs.map +1 -0
  179. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs +44 -0
  180. package/.output/server/chunks/routes/api/query/raw-execute-stream.post.mjs.map +1 -0
  181. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs +48 -0
  182. package/.output/server/chunks/routes/api/query/raw-execute.post.mjs.map +1 -0
  183. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs +49 -0
  184. package/.output/server/chunks/routes/api/tables/bulk-delete.post.mjs.map +1 -0
  185. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs +50 -0
  186. package/.output/server/chunks/routes/api/tables/bulk-update.post.mjs.map +1 -0
  187. package/.output/server/chunks/routes/api/tables/ddl.post.mjs +32 -0
  188. package/.output/server/chunks/routes/api/tables/ddl.post.mjs.map +1 -0
  189. package/.output/server/chunks/routes/api/tables/export.post.mjs +47 -0
  190. package/.output/server/chunks/routes/api/tables/export.post.mjs.map +1 -0
  191. package/.output/server/chunks/routes/api/tables/indexes.post.mjs +32 -0
  192. package/.output/server/chunks/routes/api/tables/indexes.post.mjs.map +1 -0
  193. package/.output/server/chunks/routes/api/tables/meta.post.mjs +39 -0
  194. package/.output/server/chunks/routes/api/tables/meta.post.mjs.map +1 -0
  195. package/.output/server/chunks/routes/api/tables/overview.post.mjs +32 -0
  196. package/.output/server/chunks/routes/api/tables/overview.post.mjs.map +1 -0
  197. package/.output/server/chunks/routes/api/tables/rls.post.mjs +36 -0
  198. package/.output/server/chunks/routes/api/tables/rls.post.mjs.map +1 -0
  199. package/.output/server/chunks/routes/api/tables/rules.post.mjs +32 -0
  200. package/.output/server/chunks/routes/api/tables/rules.post.mjs.map +1 -0
  201. package/.output/server/chunks/routes/api/tables/size.post.mjs +32 -0
  202. package/.output/server/chunks/routes/api/tables/size.post.mjs.map +1 -0
  203. package/.output/server/chunks/routes/api/tables/structure.post.mjs +32 -0
  204. package/.output/server/chunks/routes/api/tables/structure.post.mjs.map +1 -0
  205. package/.output/server/chunks/routes/api/tables/triggers.post.mjs +32 -0
  206. package/.output/server/chunks/routes/api/tables/triggers.post.mjs.map +1 -0
  207. package/.output/server/chunks/routes/api/views/definition.post.mjs +27 -0
  208. package/.output/server/chunks/routes/api/views/definition.post.mjs.map +1 -0
  209. package/.output/server/chunks/routes/api/views/dependencies.post.mjs +27 -0
  210. package/.output/server/chunks/routes/api/views/dependencies.post.mjs.map +1 -0
  211. package/.output/server/chunks/routes/api/views/explain.post.mjs +29 -0
  212. package/.output/server/chunks/routes/api/views/explain.post.mjs.map +1 -0
  213. package/.output/server/chunks/routes/api/views/indexes.post.mjs +27 -0
  214. package/.output/server/chunks/routes/api/views/indexes.post.mjs.map +1 -0
  215. package/.output/server/chunks/routes/api/views/meta.post.mjs +27 -0
  216. package/.output/server/chunks/routes/api/views/meta.post.mjs.map +1 -0
  217. package/.output/server/chunks/routes/api/views/overview.post.mjs +27 -0
  218. package/.output/server/chunks/routes/api/views/overview.post.mjs.map +1 -0
  219. package/.output/server/chunks/routes/renderer.mjs +4 -4
  220. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +1 -1
  221. package/.output/server/index.mjs +3 -3
  222. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.19/dist/index.mjs +2756 -0
  223. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.19/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  224. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.19/node_modules/@ai-sdk/provider/package.json +63 -0
  225. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.19/package.json +81 -0
  226. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.4/dist/index.mjs +2549 -0
  227. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.4/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  228. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.4/node_modules/@ai-sdk/provider/package.json +57 -0
  229. package/.output/server/node_modules/.nitro/@ai-sdk/provider-utils@4.0.4/package.json +75 -0
  230. package/.output/server/node_modules/.nitro/@ai-sdk/provider@3.0.2/dist/index.mjs +377 -0
  231. package/.output/server/node_modules/.nitro/@ai-sdk/provider@3.0.2/package.json +57 -0
  232. package/.output/server/node_modules/.nitro/@ai-sdk/provider@3.0.8/dist/index.mjs +404 -0
  233. package/.output/server/node_modules/.nitro/@ai-sdk/provider@3.0.8/package.json +63 -0
  234. package/.output/server/node_modules/.nitro/debug@4.3.4/node_modules/ms/index.js +162 -0
  235. package/.output/server/node_modules/.nitro/debug@4.3.4/node_modules/ms/package.json +37 -0
  236. package/.output/server/node_modules/.nitro/debug@4.3.4/package.json +59 -0
  237. package/.output/server/node_modules/.nitro/debug@4.3.4/src/browser.js +269 -0
  238. package/.output/server/node_modules/.nitro/debug@4.3.4/src/common.js +274 -0
  239. package/.output/server/node_modules/.nitro/debug@4.3.4/src/index.js +10 -0
  240. package/.output/server/node_modules/.nitro/debug@4.3.4/src/node.js +263 -0
  241. package/.output/server/node_modules/.nitro/debug@4.4.0/node_modules/ms/index.js +162 -0
  242. package/.output/server/node_modules/.nitro/debug@4.4.0/node_modules/ms/package.json +38 -0
  243. package/.output/server/node_modules/.nitro/debug@4.4.0/package.json +65 -0
  244. package/.output/server/node_modules/.nitro/debug@4.4.0/src/browser.js +272 -0
  245. package/.output/server/node_modules/.nitro/debug@4.4.0/src/common.js +292 -0
  246. package/.output/server/node_modules/.nitro/debug@4.4.0/src/index.js +10 -0
  247. package/.output/server/node_modules/.nitro/debug@4.4.0/src/node.js +263 -0
  248. package/.output/server/node_modules/.nitro/ms@2.1.2/index.js +162 -0
  249. package/.output/server/node_modules/.nitro/ms@2.1.2/package.json +37 -0
  250. package/.output/server/node_modules/.nitro/ms@2.1.3/index.js +162 -0
  251. package/.output/server/node_modules/.nitro/ms@2.1.3/package.json +38 -0
  252. package/.output/server/node_modules/.nitro/pg-connection-string@2.6.2/index.js +112 -0
  253. package/.output/server/node_modules/.nitro/pg-connection-string@2.6.2/package.json +40 -0
  254. package/.output/server/node_modules/.nitro/pg-connection-string@2.7.0/index.js +112 -0
  255. package/.output/server/node_modules/.nitro/pg-connection-string@2.7.0/package.json +40 -0
  256. package/.output/server/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  257. package/.output/server/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider/package.json +57 -0
  258. package/.output/server/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
  259. package/.output/server/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  260. package/.output/server/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +57 -0
  261. package/.output/server/node_modules/@ai-sdk/anthropic/node_modules/@ai-sdk/provider-utils/package.json +75 -0
  262. package/.output/server/node_modules/@ai-sdk/gateway/dist/index.mjs +539 -82
  263. package/.output/server/node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  264. package/.output/server/node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider/package.json +63 -0
  265. package/.output/server/node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2756 -0
  266. package/.output/server/node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  267. package/.output/server/node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
  268. package/.output/server/node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider-utils/package.json +81 -0
  269. package/.output/server/node_modules/@ai-sdk/gateway/package.json +16 -5
  270. package/.output/server/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  271. package/.output/server/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider/package.json +57 -0
  272. package/.output/server/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
  273. package/.output/server/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  274. package/.output/server/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +57 -0
  275. package/.output/server/node_modules/@ai-sdk/google/node_modules/@ai-sdk/provider-utils/package.json +75 -0
  276. package/.output/server/node_modules/@ai-sdk/openai/dist/index.mjs +1498 -961
  277. package/.output/server/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  278. package/.output/server/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider/package.json +63 -0
  279. package/.output/server/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2756 -0
  280. package/.output/server/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  281. package/.output/server/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
  282. package/.output/server/node_modules/@ai-sdk/openai/node_modules/@ai-sdk/provider-utils/package.json +81 -0
  283. package/.output/server/node_modules/@ai-sdk/openai/package.json +14 -5
  284. package/.output/server/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  285. package/.output/server/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider/package.json +57 -0
  286. package/.output/server/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
  287. package/.output/server/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  288. package/.output/server/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +57 -0
  289. package/.output/server/node_modules/@ai-sdk/openai-compatible/node_modules/@ai-sdk/provider-utils/package.json +75 -0
  290. package/.output/server/node_modules/@ai-sdk/provider/dist/index.mjs +32 -5
  291. package/.output/server/node_modules/@ai-sdk/provider/package.json +7 -1
  292. package/.output/server/node_modules/@ai-sdk/provider-utils/dist/index.mjs +231 -24
  293. package/.output/server/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  294. package/.output/server/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
  295. package/.output/server/node_modules/@ai-sdk/provider-utils/package.json +8 -2
  296. package/.output/server/node_modules/@ai-sdk/xai/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  297. package/.output/server/node_modules/@ai-sdk/xai/node_modules/@ai-sdk/provider/package.json +57 -0
  298. package/.output/server/node_modules/@ai-sdk/xai/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2549 -0
  299. package/.output/server/node_modules/@ai-sdk/xai/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +377 -0
  300. package/.output/server/node_modules/@ai-sdk/xai/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +57 -0
  301. package/.output/server/node_modules/@ai-sdk/xai/node_modules/@ai-sdk/provider-utils/package.json +75 -0
  302. package/.output/server/node_modules/@iconify/utils/node_modules/debug/node_modules/ms/index.js +162 -0
  303. package/.output/server/node_modules/@iconify/utils/node_modules/debug/node_modules/ms/package.json +38 -0
  304. package/.output/server/node_modules/@iconify/utils/node_modules/debug/package.json +65 -0
  305. package/.output/server/node_modules/@iconify/utils/node_modules/debug/src/browser.js +272 -0
  306. package/.output/server/node_modules/@iconify/utils/node_modules/debug/src/common.js +292 -0
  307. package/.output/server/node_modules/@iconify/utils/node_modules/debug/src/index.js +10 -0
  308. package/.output/server/node_modules/@iconify/utils/node_modules/debug/src/node.js +263 -0
  309. package/.output/server/node_modules/@openrouter/ai-sdk-provider/dist/index.mjs +4656 -0
  310. package/.output/server/node_modules/@openrouter/ai-sdk-provider/package.json +82 -0
  311. package/.output/server/node_modules/ag-grid-community/dist/package/main.esm.mjs +50065 -0
  312. package/.output/server/node_modules/ag-grid-community/package.json +113 -0
  313. package/.output/server/node_modules/ai/dist/index.mjs +2069 -918
  314. package/.output/server/node_modules/ai/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  315. package/.output/server/node_modules/ai/node_modules/@ai-sdk/provider/package.json +63 -0
  316. package/.output/server/node_modules/ai/node_modules/@ai-sdk/provider-utils/dist/index.mjs +2756 -0
  317. package/.output/server/node_modules/ai/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/dist/index.mjs +404 -0
  318. package/.output/server/node_modules/ai/node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider/package.json +63 -0
  319. package/.output/server/node_modules/ai/node_modules/@ai-sdk/provider-utils/package.json +81 -0
  320. package/.output/server/node_modules/ai/package.json +15 -6
  321. package/.output/server/node_modules/asn1/lib/ber/errors.js +13 -0
  322. package/.output/server/node_modules/asn1/lib/ber/index.js +27 -0
  323. package/.output/server/node_modules/asn1/lib/ber/reader.js +262 -0
  324. package/.output/server/node_modules/asn1/lib/ber/types.js +36 -0
  325. package/.output/server/node_modules/asn1/lib/ber/writer.js +317 -0
  326. package/.output/server/node_modules/asn1/lib/index.js +20 -0
  327. package/.output/server/node_modules/asn1/package.json +31 -0
  328. package/.output/server/node_modules/bcrypt-pbkdf/index.js +556 -0
  329. package/.output/server/node_modules/bcrypt-pbkdf/package.json +15 -0
  330. package/.output/server/node_modules/colorette/index.cjs +218 -0
  331. package/.output/server/node_modules/colorette/package.json +39 -0
  332. package/.output/server/node_modules/debug/node_modules/ms/index.js +162 -0
  333. package/.output/server/node_modules/debug/node_modules/ms/package.json +38 -0
  334. package/.output/server/node_modules/file-saver/dist/FileSaver.min.js +3 -0
  335. package/.output/server/node_modules/file-saver/package.json +40 -0
  336. package/.output/server/node_modules/get-package-type/async.cjs +52 -0
  337. package/.output/server/node_modules/get-package-type/cache.cjs +3 -0
  338. package/.output/server/node_modules/get-package-type/index.cjs +7 -0
  339. package/.output/server/node_modules/get-package-type/is-node-modules.cjs +15 -0
  340. package/.output/server/node_modules/get-package-type/package.json +35 -0
  341. package/.output/server/node_modules/get-package-type/sync.cjs +42 -0
  342. package/.output/server/node_modules/knex/knex.js +23 -0
  343. package/.output/server/node_modules/knex/knex.mjs +11 -0
  344. package/.output/server/node_modules/knex/lib/builder-interface-augmenter.js +120 -0
  345. package/.output/server/node_modules/knex/lib/client.js +495 -0
  346. package/.output/server/node_modules/knex/lib/constants.js +61 -0
  347. package/.output/server/node_modules/knex/lib/dialects/better-sqlite3/index.js +77 -0
  348. package/.output/server/node_modules/knex/lib/dialects/cockroachdb/crdb-columncompiler.js +14 -0
  349. package/.output/server/node_modules/knex/lib/dialects/cockroachdb/crdb-querybuilder.js +11 -0
  350. package/.output/server/node_modules/knex/lib/dialects/cockroachdb/crdb-querycompiler.js +122 -0
  351. package/.output/server/node_modules/knex/lib/dialects/cockroachdb/crdb-tablecompiler.js +37 -0
  352. package/.output/server/node_modules/knex/lib/dialects/cockroachdb/crdb-viewcompiler.js +15 -0
  353. package/.output/server/node_modules/knex/lib/dialects/cockroachdb/index.js +86 -0
  354. package/.output/server/node_modules/knex/lib/dialects/index.js +34 -0
  355. package/.output/server/node_modules/knex/lib/dialects/mssql/index.js +500 -0
  356. package/.output/server/node_modules/knex/lib/dialects/mssql/mssql-formatter.js +34 -0
  357. package/.output/server/node_modules/knex/lib/dialects/mssql/query/mssql-querycompiler.js +601 -0
  358. package/.output/server/node_modules/knex/lib/dialects/mssql/schema/mssql-columncompiler.js +185 -0
  359. package/.output/server/node_modules/knex/lib/dialects/mssql/schema/mssql-compiler.js +91 -0
  360. package/.output/server/node_modules/knex/lib/dialects/mssql/schema/mssql-tablecompiler.js +378 -0
  361. package/.output/server/node_modules/knex/lib/dialects/mssql/schema/mssql-viewcompiler.js +55 -0
  362. package/.output/server/node_modules/knex/lib/dialects/mssql/transaction.js +176 -0
  363. package/.output/server/node_modules/knex/lib/dialects/mysql/index.js +206 -0
  364. package/.output/server/node_modules/knex/lib/dialects/mysql/query/mysql-querybuilder.js +14 -0
  365. package/.output/server/node_modules/knex/lib/dialects/mysql/query/mysql-querycompiler.js +292 -0
  366. package/.output/server/node_modules/knex/lib/dialects/mysql/schema/mysql-columncompiler.js +193 -0
  367. package/.output/server/node_modules/knex/lib/dialects/mysql/schema/mysql-compiler.js +60 -0
  368. package/.output/server/node_modules/knex/lib/dialects/mysql/schema/mysql-tablecompiler.js +405 -0
  369. package/.output/server/node_modules/knex/lib/dialects/mysql/schema/mysql-viewbuilder.js +21 -0
  370. package/.output/server/node_modules/knex/lib/dialects/mysql/schema/mysql-viewcompiler.js +15 -0
  371. package/.output/server/node_modules/knex/lib/dialects/mysql/transaction.js +46 -0
  372. package/.output/server/node_modules/knex/lib/dialects/mysql2/index.js +53 -0
  373. package/.output/server/node_modules/knex/lib/dialects/mysql2/transaction.js +44 -0
  374. package/.output/server/node_modules/knex/lib/dialects/oracle/index.js +92 -0
  375. package/.output/server/node_modules/knex/lib/dialects/oracle/query/oracle-querycompiler.js +343 -0
  376. package/.output/server/node_modules/knex/lib/dialects/oracle/schema/internal/incrementUtils.js +22 -0
  377. package/.output/server/node_modules/knex/lib/dialects/oracle/schema/internal/trigger.js +155 -0
  378. package/.output/server/node_modules/knex/lib/dialects/oracle/schema/oracle-columnbuilder.js +17 -0
  379. package/.output/server/node_modules/knex/lib/dialects/oracle/schema/oracle-columncompiler.js +126 -0
  380. package/.output/server/node_modules/knex/lib/dialects/oracle/schema/oracle-compiler.js +124 -0
  381. package/.output/server/node_modules/knex/lib/dialects/oracle/schema/oracle-tablecompiler.js +197 -0
  382. package/.output/server/node_modules/knex/lib/dialects/oracle/utils.js +106 -0
  383. package/.output/server/node_modules/knex/lib/dialects/oracledb/index.js +381 -0
  384. package/.output/server/node_modules/knex/lib/dialects/oracledb/query/oracledb-querycompiler.js +481 -0
  385. package/.output/server/node_modules/knex/lib/dialects/oracledb/schema/oracledb-columncompiler.js +61 -0
  386. package/.output/server/node_modules/knex/lib/dialects/oracledb/schema/oracledb-tablecompiler.js +19 -0
  387. package/.output/server/node_modules/knex/lib/dialects/oracledb/schema/oracledb-viewbuilder.js +13 -0
  388. package/.output/server/node_modules/knex/lib/dialects/oracledb/schema/oracledb-viewcompiler.js +19 -0
  389. package/.output/server/node_modules/knex/lib/dialects/oracledb/transaction.js +98 -0
  390. package/.output/server/node_modules/knex/lib/dialects/oracledb/utils.js +208 -0
  391. package/.output/server/node_modules/knex/lib/dialects/pgnative/index.js +60 -0
  392. package/.output/server/node_modules/knex/lib/dialects/postgres/execution/pg-transaction.js +19 -0
  393. package/.output/server/node_modules/knex/lib/dialects/postgres/index.js +361 -0
  394. package/.output/server/node_modules/knex/lib/dialects/postgres/query/pg-querybuilder.js +43 -0
  395. package/.output/server/node_modules/knex/lib/dialects/postgres/query/pg-querycompiler.js +400 -0
  396. package/.output/server/node_modules/knex/lib/dialects/postgres/schema/pg-columncompiler.js +156 -0
  397. package/.output/server/node_modules/knex/lib/dialects/postgres/schema/pg-compiler.js +138 -0
  398. package/.output/server/node_modules/knex/lib/dialects/postgres/schema/pg-tablecompiler.js +304 -0
  399. package/.output/server/node_modules/knex/lib/dialects/postgres/schema/pg-viewbuilder.js +21 -0
  400. package/.output/server/node_modules/knex/lib/dialects/postgres/schema/pg-viewcompiler.js +35 -0
  401. package/.output/server/node_modules/knex/lib/dialects/redshift/index.js +86 -0
  402. package/.output/server/node_modules/knex/lib/dialects/redshift/query/redshift-querycompiler.js +163 -0
  403. package/.output/server/node_modules/knex/lib/dialects/redshift/schema/redshift-columnbuilder.js +22 -0
  404. package/.output/server/node_modules/knex/lib/dialects/redshift/schema/redshift-columncompiler.js +67 -0
  405. package/.output/server/node_modules/knex/lib/dialects/redshift/schema/redshift-compiler.js +14 -0
  406. package/.output/server/node_modules/knex/lib/dialects/redshift/schema/redshift-tablecompiler.js +122 -0
  407. package/.output/server/node_modules/knex/lib/dialects/redshift/schema/redshift-viewcompiler.js +11 -0
  408. package/.output/server/node_modules/knex/lib/dialects/redshift/transaction.js +32 -0
  409. package/.output/server/node_modules/knex/lib/dialects/sqlite3/execution/sqlite-transaction.js +25 -0
  410. package/.output/server/node_modules/knex/lib/dialects/sqlite3/index.js +250 -0
  411. package/.output/server/node_modules/knex/lib/dialects/sqlite3/query/sqlite-querybuilder.js +33 -0
  412. package/.output/server/node_modules/knex/lib/dialects/sqlite3/query/sqlite-querycompiler.js +334 -0
  413. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/ddl.js +400 -0
  414. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/internal/compiler.js +327 -0
  415. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/internal/parser-combinator.js +161 -0
  416. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/internal/parser.js +638 -0
  417. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/internal/sqlite-ddl-operations.js +41 -0
  418. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/internal/tokenizer.js +38 -0
  419. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/internal/utils.js +12 -0
  420. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/sqlite-columncompiler.js +50 -0
  421. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/sqlite-compiler.js +80 -0
  422. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/sqlite-tablecompiler.js +347 -0
  423. package/.output/server/node_modules/knex/lib/dialects/sqlite3/schema/sqlite-viewcompiler.js +40 -0
  424. package/.output/server/node_modules/knex/lib/execution/batch-insert.js +51 -0
  425. package/.output/server/node_modules/knex/lib/execution/internal/delay.js +6 -0
  426. package/.output/server/node_modules/knex/lib/execution/internal/ensure-connection-callback.js +41 -0
  427. package/.output/server/node_modules/knex/lib/execution/internal/query-executioner.js +62 -0
  428. package/.output/server/node_modules/knex/lib/execution/runner.js +325 -0
  429. package/.output/server/node_modules/knex/lib/execution/transaction.js +413 -0
  430. package/.output/server/node_modules/knex/lib/formatter/formatterUtils.js +42 -0
  431. package/.output/server/node_modules/knex/lib/formatter/rawFormatter.js +84 -0
  432. package/.output/server/node_modules/knex/lib/formatter/wrappingFormatter.js +250 -0
  433. package/.output/server/node_modules/knex/lib/formatter.js +25 -0
  434. package/.output/server/node_modules/knex/lib/index.js +3 -0
  435. package/.output/server/node_modules/knex/lib/knex-builder/FunctionHelper.js +80 -0
  436. package/.output/server/node_modules/knex/lib/knex-builder/Knex.js +59 -0
  437. package/.output/server/node_modules/knex/lib/knex-builder/internal/config-resolver.js +57 -0
  438. package/.output/server/node_modules/knex/lib/knex-builder/internal/parse-connection.js +87 -0
  439. package/.output/server/node_modules/knex/lib/knex-builder/make-knex.js +345 -0
  440. package/.output/server/node_modules/knex/lib/logger.js +76 -0
  441. package/.output/server/node_modules/knex/lib/migrations/common/MigrationsLoader.js +36 -0
  442. package/.output/server/node_modules/knex/lib/migrations/migrate/MigrationGenerator.js +84 -0
  443. package/.output/server/node_modules/knex/lib/migrations/migrate/Migrator.js +599 -0
  444. package/.output/server/node_modules/knex/lib/migrations/migrate/migration-list-resolver.js +33 -0
  445. package/.output/server/node_modules/knex/lib/migrations/migrate/migrator-configuration-merger.js +58 -0
  446. package/.output/server/node_modules/knex/lib/migrations/migrate/sources/fs-migrations.js +74 -0
  447. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/cjs.stub +15 -0
  448. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/coffee.stub +13 -0
  449. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/eg.stub +14 -0
  450. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/js-schema.stub +22 -0
  451. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/js.stub +22 -0
  452. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/knexfile-coffee.stub +34 -0
  453. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/knexfile-eg.stub +43 -0
  454. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/knexfile-js.stub +47 -0
  455. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/knexfile-ls.stub +35 -0
  456. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/knexfile-ts.stub +47 -0
  457. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/ls.stub +14 -0
  458. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/mjs.stub +23 -0
  459. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/ts-schema.stub +21 -0
  460. package/.output/server/node_modules/knex/lib/migrations/migrate/stub/ts.stub +21 -0
  461. package/.output/server/node_modules/knex/lib/migrations/migrate/table-creator.js +77 -0
  462. package/.output/server/node_modules/knex/lib/migrations/migrate/table-resolver.js +27 -0
  463. package/.output/server/node_modules/knex/lib/migrations/seed/Seeder.js +137 -0
  464. package/.output/server/node_modules/knex/lib/migrations/seed/seeder-configuration-merger.js +60 -0
  465. package/.output/server/node_modules/knex/lib/migrations/seed/sources/fs-seeds.js +65 -0
  466. package/.output/server/node_modules/knex/lib/migrations/seed/stub/coffee.stub +9 -0
  467. package/.output/server/node_modules/knex/lib/migrations/seed/stub/eg.stub +11 -0
  468. package/.output/server/node_modules/knex/lib/migrations/seed/stub/js.stub +13 -0
  469. package/.output/server/node_modules/knex/lib/migrations/seed/stub/ls.stub +11 -0
  470. package/.output/server/node_modules/knex/lib/migrations/seed/stub/mjs.stub +12 -0
  471. package/.output/server/node_modules/knex/lib/migrations/seed/stub/ts.stub +13 -0
  472. package/.output/server/node_modules/knex/lib/migrations/util/fs.js +86 -0
  473. package/.output/server/node_modules/knex/lib/migrations/util/import-file.js +12 -0
  474. package/.output/server/node_modules/knex/lib/migrations/util/is-module-type.js +9 -0
  475. package/.output/server/node_modules/knex/lib/migrations/util/template.js +52 -0
  476. package/.output/server/node_modules/knex/lib/migrations/util/timestamp.js +14 -0
  477. package/.output/server/node_modules/knex/lib/query/analytic.js +52 -0
  478. package/.output/server/node_modules/knex/lib/query/constants.js +15 -0
  479. package/.output/server/node_modules/knex/lib/query/joinclause.js +270 -0
  480. package/.output/server/node_modules/knex/lib/query/method-constants.js +136 -0
  481. package/.output/server/node_modules/knex/lib/query/querybuilder.js +1793 -0
  482. package/.output/server/node_modules/knex/lib/query/querycompiler.js +1591 -0
  483. package/.output/server/node_modules/knex/lib/raw.js +139 -0
  484. package/.output/server/node_modules/knex/lib/ref.js +39 -0
  485. package/.output/server/node_modules/knex/lib/schema/builder.js +115 -0
  486. package/.output/server/node_modules/knex/lib/schema/columnbuilder.js +146 -0
  487. package/.output/server/node_modules/knex/lib/schema/columncompiler.js +307 -0
  488. package/.output/server/node_modules/knex/lib/schema/compiler.js +187 -0
  489. package/.output/server/node_modules/knex/lib/schema/internal/helpers.js +55 -0
  490. package/.output/server/node_modules/knex/lib/schema/tablebuilder.js +376 -0
  491. package/.output/server/node_modules/knex/lib/schema/tablecompiler.js +439 -0
  492. package/.output/server/node_modules/knex/lib/schema/viewbuilder.js +92 -0
  493. package/.output/server/node_modules/knex/lib/schema/viewcompiler.js +138 -0
  494. package/.output/server/node_modules/knex/lib/util/finally-mixin.js +13 -0
  495. package/.output/server/node_modules/knex/lib/util/helpers.js +95 -0
  496. package/.output/server/node_modules/knex/lib/util/is.js +32 -0
  497. package/.output/server/node_modules/knex/lib/util/nanoid.js +40 -0
  498. package/.output/server/node_modules/knex/lib/util/noop.js +1 -0
  499. package/.output/server/node_modules/knex/lib/util/save-async-stack.js +14 -0
  500. package/.output/server/node_modules/knex/lib/util/security.js +26 -0
  501. package/.output/server/node_modules/knex/lib/util/string.js +190 -0
  502. package/.output/server/node_modules/knex/lib/util/timeout.js +29 -0
  503. package/.output/server/node_modules/knex/node_modules/debug/node_modules/ms/index.js +162 -0
  504. package/.output/server/node_modules/knex/node_modules/debug/node_modules/ms/package.json +37 -0
  505. package/.output/server/node_modules/knex/node_modules/debug/package.json +59 -0
  506. package/.output/server/node_modules/knex/node_modules/debug/src/browser.js +269 -0
  507. package/.output/server/node_modules/knex/node_modules/debug/src/common.js +274 -0
  508. package/.output/server/node_modules/knex/node_modules/debug/src/index.js +10 -0
  509. package/.output/server/node_modules/knex/node_modules/debug/src/node.js +263 -0
  510. package/.output/server/node_modules/knex/node_modules/pg-connection-string/index.js +112 -0
  511. package/.output/server/node_modules/knex/node_modules/pg-connection-string/package.json +40 -0
  512. package/.output/server/node_modules/knex/package.json +267 -0
  513. package/.output/server/node_modules/lodash/_DataView.js +7 -0
  514. package/.output/server/node_modules/lodash/_Hash.js +32 -0
  515. package/.output/server/node_modules/lodash/_ListCache.js +32 -0
  516. package/.output/server/node_modules/lodash/_Map.js +7 -0
  517. package/.output/server/node_modules/lodash/_MapCache.js +32 -0
  518. package/.output/server/node_modules/lodash/_Promise.js +7 -0
  519. package/.output/server/node_modules/lodash/_Set.js +7 -0
  520. package/.output/server/node_modules/lodash/_SetCache.js +27 -0
  521. package/.output/server/node_modules/lodash/_Stack.js +27 -0
  522. package/.output/server/node_modules/lodash/_Symbol.js +6 -0
  523. package/.output/server/node_modules/lodash/_Uint8Array.js +6 -0
  524. package/.output/server/node_modules/lodash/_WeakMap.js +7 -0
  525. package/.output/server/node_modules/lodash/_apply.js +21 -0
  526. package/.output/server/node_modules/lodash/_arrayAggregator.js +22 -0
  527. package/.output/server/node_modules/lodash/_arrayEach.js +22 -0
  528. package/.output/server/node_modules/lodash/_arrayFilter.js +25 -0
  529. package/.output/server/node_modules/lodash/_arrayIncludes.js +17 -0
  530. package/.output/server/node_modules/lodash/_arrayIncludesWith.js +22 -0
  531. package/.output/server/node_modules/lodash/_arrayLikeKeys.js +49 -0
  532. package/.output/server/node_modules/lodash/_arrayMap.js +21 -0
  533. package/.output/server/node_modules/lodash/_arrayPush.js +20 -0
  534. package/.output/server/node_modules/lodash/_arrayReduce.js +26 -0
  535. package/.output/server/node_modules/lodash/_arraySome.js +23 -0
  536. package/.output/server/node_modules/lodash/_asciiToArray.js +12 -0
  537. package/.output/server/node_modules/lodash/_assignMergeValue.js +20 -0
  538. package/.output/server/node_modules/lodash/_assignValue.js +28 -0
  539. package/.output/server/node_modules/lodash/_assocIndexOf.js +21 -0
  540. package/.output/server/node_modules/lodash/_baseAggregator.js +21 -0
  541. package/.output/server/node_modules/lodash/_baseAssign.js +17 -0
  542. package/.output/server/node_modules/lodash/_baseAssignIn.js +17 -0
  543. package/.output/server/node_modules/lodash/_baseAssignValue.js +25 -0
  544. package/.output/server/node_modules/lodash/_baseClone.js +166 -0
  545. package/.output/server/node_modules/lodash/_baseCreate.js +30 -0
  546. package/.output/server/node_modules/lodash/_baseDelay.js +21 -0
  547. package/.output/server/node_modules/lodash/_baseDifference.js +67 -0
  548. package/.output/server/node_modules/lodash/_baseEach.js +14 -0
  549. package/.output/server/node_modules/lodash/_baseExtremum.js +32 -0
  550. package/.output/server/node_modules/lodash/_baseFilter.js +21 -0
  551. package/.output/server/node_modules/lodash/_baseFindIndex.js +24 -0
  552. package/.output/server/node_modules/lodash/_baseFlatten.js +38 -0
  553. package/.output/server/node_modules/lodash/_baseFor.js +16 -0
  554. package/.output/server/node_modules/lodash/_baseForOwn.js +16 -0
  555. package/.output/server/node_modules/lodash/_baseGet.js +24 -0
  556. package/.output/server/node_modules/lodash/_baseGetAllKeys.js +20 -0
  557. package/.output/server/node_modules/lodash/_baseGetTag.js +28 -0
  558. package/.output/server/node_modules/lodash/_baseGt.js +14 -0
  559. package/.output/server/node_modules/lodash/_baseHas.js +19 -0
  560. package/.output/server/node_modules/lodash/_baseHasIn.js +13 -0
  561. package/.output/server/node_modules/lodash/_baseIndexOf.js +20 -0
  562. package/.output/server/node_modules/lodash/_baseIsArguments.js +18 -0
  563. package/.output/server/node_modules/lodash/_baseIsEqual.js +28 -0
  564. package/.output/server/node_modules/lodash/_baseIsEqualDeep.js +83 -0
  565. package/.output/server/node_modules/lodash/_baseIsMap.js +18 -0
  566. package/.output/server/node_modules/lodash/_baseIsMatch.js +62 -0
  567. package/.output/server/node_modules/lodash/_baseIsNaN.js +12 -0
  568. package/.output/server/node_modules/lodash/_baseIsNative.js +47 -0
  569. package/.output/server/node_modules/lodash/_baseIsSet.js +18 -0
  570. package/.output/server/node_modules/lodash/_baseIsTypedArray.js +60 -0
  571. package/.output/server/node_modules/lodash/_baseIteratee.js +31 -0
  572. package/.output/server/node_modules/lodash/_baseKeys.js +30 -0
  573. package/.output/server/node_modules/lodash/_baseKeysIn.js +33 -0
  574. package/.output/server/node_modules/lodash/_baseMap.js +22 -0
  575. package/.output/server/node_modules/lodash/_baseMatches.js +22 -0
  576. package/.output/server/node_modules/lodash/_baseMatchesProperty.js +33 -0
  577. package/.output/server/node_modules/lodash/_baseMerge.js +42 -0
  578. package/.output/server/node_modules/lodash/_baseMergeDeep.js +94 -0
  579. package/.output/server/node_modules/lodash/_baseOrderBy.js +49 -0
  580. package/.output/server/node_modules/lodash/_basePickBy.js +30 -0
  581. package/.output/server/node_modules/lodash/_baseProperty.js +14 -0
  582. package/.output/server/node_modules/lodash/_basePropertyDeep.js +16 -0
  583. package/.output/server/node_modules/lodash/_basePropertyOf.js +14 -0
  584. package/.output/server/node_modules/lodash/_baseReduce.js +23 -0
  585. package/.output/server/node_modules/lodash/_baseRest.js +17 -0
  586. package/.output/server/node_modules/lodash/_baseSet.js +51 -0
  587. package/.output/server/node_modules/lodash/_baseSetToString.js +22 -0
  588. package/.output/server/node_modules/lodash/_baseSlice.js +31 -0
  589. package/.output/server/node_modules/lodash/_baseSome.js +22 -0
  590. package/.output/server/node_modules/lodash/_baseSortBy.js +21 -0
  591. package/.output/server/node_modules/lodash/_baseTimes.js +20 -0
  592. package/.output/server/node_modules/lodash/_baseToString.js +37 -0
  593. package/.output/server/node_modules/lodash/_baseTrim.js +19 -0
  594. package/.output/server/node_modules/lodash/_baseUnary.js +14 -0
  595. package/.output/server/node_modules/lodash/_baseUniq.js +72 -0
  596. package/.output/server/node_modules/lodash/_baseValues.js +19 -0
  597. package/.output/server/node_modules/lodash/_cacheHas.js +13 -0
  598. package/.output/server/node_modules/lodash/_castFunction.js +14 -0
  599. package/.output/server/node_modules/lodash/_castPath.js +21 -0
  600. package/.output/server/node_modules/lodash/_cloneArrayBuffer.js +16 -0
  601. package/.output/server/node_modules/lodash/_cloneBuffer.js +35 -0
  602. package/.output/server/node_modules/lodash/_cloneDataView.js +16 -0
  603. package/.output/server/node_modules/lodash/_cloneRegExp.js +17 -0
  604. package/.output/server/node_modules/lodash/_cloneSymbol.js +18 -0
  605. package/.output/server/node_modules/lodash/_cloneTypedArray.js +16 -0
  606. package/.output/server/node_modules/lodash/_compareAscending.js +41 -0
  607. package/.output/server/node_modules/lodash/_compareMultiple.js +44 -0
  608. package/.output/server/node_modules/lodash/_copyArray.js +20 -0
  609. package/.output/server/node_modules/lodash/_copyObject.js +40 -0
  610. package/.output/server/node_modules/lodash/_copySymbols.js +16 -0
  611. package/.output/server/node_modules/lodash/_copySymbolsIn.js +16 -0
  612. package/.output/server/node_modules/lodash/_coreJsData.js +6 -0
  613. package/.output/server/node_modules/lodash/_createAggregator.js +23 -0
  614. package/.output/server/node_modules/lodash/_createAssigner.js +37 -0
  615. package/.output/server/node_modules/lodash/_createBaseEach.js +32 -0
  616. package/.output/server/node_modules/lodash/_createBaseFor.js +25 -0
  617. package/.output/server/node_modules/lodash/_createSet.js +19 -0
  618. package/.output/server/node_modules/lodash/_customDefaultsAssignIn.js +29 -0
  619. package/.output/server/node_modules/lodash/_defineProperty.js +11 -0
  620. package/.output/server/node_modules/lodash/_equalArrays.js +84 -0
  621. package/.output/server/node_modules/lodash/_equalByTag.js +112 -0
  622. package/.output/server/node_modules/lodash/_equalObjects.js +90 -0
  623. package/.output/server/node_modules/lodash/_escapeHtmlChar.js +21 -0
  624. package/.output/server/node_modules/lodash/_escapeStringChar.js +22 -0
  625. package/.output/server/node_modules/lodash/_freeGlobal.js +4 -0
  626. package/.output/server/node_modules/lodash/_getAllKeys.js +16 -0
  627. package/.output/server/node_modules/lodash/_getAllKeysIn.js +17 -0
  628. package/.output/server/node_modules/lodash/_getMapData.js +18 -0
  629. package/.output/server/node_modules/lodash/_getMatchData.js +24 -0
  630. package/.output/server/node_modules/lodash/_getNative.js +17 -0
  631. package/.output/server/node_modules/lodash/_getPrototype.js +6 -0
  632. package/.output/server/node_modules/lodash/_getRawTag.js +46 -0
  633. package/.output/server/node_modules/lodash/_getSymbols.js +30 -0
  634. package/.output/server/node_modules/lodash/_getSymbolsIn.js +25 -0
  635. package/.output/server/node_modules/lodash/_getTag.js +58 -0
  636. package/.output/server/node_modules/lodash/_getValue.js +13 -0
  637. package/.output/server/node_modules/lodash/_hasPath.js +39 -0
  638. package/.output/server/node_modules/lodash/_hasUnicode.js +26 -0
  639. package/.output/server/node_modules/lodash/_hashClear.js +15 -0
  640. package/.output/server/node_modules/lodash/_hashDelete.js +17 -0
  641. package/.output/server/node_modules/lodash/_hashGet.js +30 -0
  642. package/.output/server/node_modules/lodash/_hashHas.js +23 -0
  643. package/.output/server/node_modules/lodash/_hashSet.js +23 -0
  644. package/.output/server/node_modules/lodash/_initCloneArray.js +26 -0
  645. package/.output/server/node_modules/lodash/_initCloneByTag.js +77 -0
  646. package/.output/server/node_modules/lodash/_initCloneObject.js +18 -0
  647. package/.output/server/node_modules/lodash/_isFlattenable.js +20 -0
  648. package/.output/server/node_modules/lodash/_isIndex.js +25 -0
  649. package/.output/server/node_modules/lodash/_isIterateeCall.js +30 -0
  650. package/.output/server/node_modules/lodash/_isKey.js +29 -0
  651. package/.output/server/node_modules/lodash/_isKeyable.js +15 -0
  652. package/.output/server/node_modules/lodash/_isMasked.js +20 -0
  653. package/.output/server/node_modules/lodash/_isPrototype.js +18 -0
  654. package/.output/server/node_modules/lodash/_isStrictComparable.js +15 -0
  655. package/.output/server/node_modules/lodash/_iteratorToArray.js +18 -0
  656. package/.output/server/node_modules/lodash/_listCacheClear.js +13 -0
  657. package/.output/server/node_modules/lodash/_listCacheDelete.js +35 -0
  658. package/.output/server/node_modules/lodash/_listCacheGet.js +19 -0
  659. package/.output/server/node_modules/lodash/_listCacheHas.js +16 -0
  660. package/.output/server/node_modules/lodash/_listCacheSet.js +26 -0
  661. package/.output/server/node_modules/lodash/_mapCacheClear.js +21 -0
  662. package/.output/server/node_modules/lodash/_mapCacheDelete.js +18 -0
  663. package/.output/server/node_modules/lodash/_mapCacheGet.js +16 -0
  664. package/.output/server/node_modules/lodash/_mapCacheHas.js +16 -0
  665. package/.output/server/node_modules/lodash/_mapCacheSet.js +22 -0
  666. package/.output/server/node_modules/lodash/_mapToArray.js +18 -0
  667. package/.output/server/node_modules/lodash/_matchesStrictComparable.js +20 -0
  668. package/.output/server/node_modules/lodash/_memoizeCapped.js +26 -0
  669. package/.output/server/node_modules/lodash/_nativeCreate.js +6 -0
  670. package/.output/server/node_modules/lodash/_nativeKeys.js +6 -0
  671. package/.output/server/node_modules/lodash/_nativeKeysIn.js +20 -0
  672. package/.output/server/node_modules/lodash/_nodeUtil.js +30 -0
  673. package/.output/server/node_modules/lodash/_objectToString.js +22 -0
  674. package/.output/server/node_modules/lodash/_overArg.js +15 -0
  675. package/.output/server/node_modules/lodash/_overRest.js +36 -0
  676. package/.output/server/node_modules/lodash/_reEscape.js +4 -0
  677. package/.output/server/node_modules/lodash/_reEvaluate.js +4 -0
  678. package/.output/server/node_modules/lodash/_reInterpolate.js +4 -0
  679. package/.output/server/node_modules/lodash/_root.js +9 -0
  680. package/.output/server/node_modules/lodash/_safeGet.js +21 -0
  681. package/.output/server/node_modules/lodash/_setCacheAdd.js +19 -0
  682. package/.output/server/node_modules/lodash/_setCacheHas.js +14 -0
  683. package/.output/server/node_modules/lodash/_setToArray.js +18 -0
  684. package/.output/server/node_modules/lodash/_setToString.js +14 -0
  685. package/.output/server/node_modules/lodash/_shortOut.js +37 -0
  686. package/.output/server/node_modules/lodash/_stackClear.js +15 -0
  687. package/.output/server/node_modules/lodash/_stackDelete.js +18 -0
  688. package/.output/server/node_modules/lodash/_stackGet.js +14 -0
  689. package/.output/server/node_modules/lodash/_stackHas.js +14 -0
  690. package/.output/server/node_modules/lodash/_stackSet.js +34 -0
  691. package/.output/server/node_modules/lodash/_strictIndexOf.js +23 -0
  692. package/.output/server/node_modules/lodash/_stringToArray.js +18 -0
  693. package/.output/server/node_modules/lodash/_stringToPath.js +27 -0
  694. package/.output/server/node_modules/lodash/_toKey.js +21 -0
  695. package/.output/server/node_modules/lodash/_toSource.js +26 -0
  696. package/.output/server/node_modules/lodash/_trimmedEndIndex.js +19 -0
  697. package/.output/server/node_modules/lodash/_unicodeToArray.js +40 -0
  698. package/.output/server/node_modules/lodash/assign.js +58 -0
  699. package/.output/server/node_modules/lodash/assignIn.js +40 -0
  700. package/.output/server/node_modules/lodash/assignInWith.js +38 -0
  701. package/.output/server/node_modules/lodash/attempt.js +35 -0
  702. package/.output/server/node_modules/lodash/chunk.js +50 -0
  703. package/.output/server/node_modules/lodash/clone.js +36 -0
  704. package/.output/server/node_modules/lodash/cloneDeep.js +29 -0
  705. package/.output/server/node_modules/lodash/compact.js +31 -0
  706. package/.output/server/node_modules/lodash/constant.js +26 -0
  707. package/.output/server/node_modules/lodash/defaults.js +64 -0
  708. package/.output/server/node_modules/lodash/defer.js +26 -0
  709. package/.output/server/node_modules/lodash/differenceWith.js +40 -0
  710. package/.output/server/node_modules/lodash/each.js +1 -0
  711. package/.output/server/node_modules/lodash/eq.js +37 -0
  712. package/.output/server/node_modules/lodash/escape.js +43 -0
  713. package/.output/server/node_modules/lodash/extend.js +1 -0
  714. package/.output/server/node_modules/lodash/filter.js +52 -0
  715. package/.output/server/node_modules/lodash/first.js +1 -0
  716. package/.output/server/node_modules/lodash/flatten.js +22 -0
  717. package/.output/server/node_modules/lodash/forEach.js +41 -0
  718. package/.output/server/node_modules/lodash/get.js +33 -0
  719. package/.output/server/node_modules/lodash/groupBy.js +41 -0
  720. package/.output/server/node_modules/lodash/has.js +35 -0
  721. package/.output/server/node_modules/lodash/hasIn.js +34 -0
  722. package/.output/server/node_modules/lodash/head.js +23 -0
  723. package/.output/server/node_modules/lodash/identity.js +21 -0
  724. package/.output/server/node_modules/lodash/includes.js +53 -0
  725. package/.output/server/node_modules/lodash/indexOf.js +42 -0
  726. package/.output/server/node_modules/lodash/isArguments.js +36 -0
  727. package/.output/server/node_modules/lodash/isArray.js +26 -0
  728. package/.output/server/node_modules/lodash/isArrayLike.js +33 -0
  729. package/.output/server/node_modules/lodash/isArrayLikeObject.js +33 -0
  730. package/.output/server/node_modules/lodash/isBuffer.js +38 -0
  731. package/.output/server/node_modules/lodash/isEmpty.js +77 -0
  732. package/.output/server/node_modules/lodash/isError.js +36 -0
  733. package/.output/server/node_modules/lodash/isFunction.js +37 -0
  734. package/.output/server/node_modules/lodash/isLength.js +35 -0
  735. package/.output/server/node_modules/lodash/isMap.js +27 -0
  736. package/.output/server/node_modules/lodash/isNil.js +25 -0
  737. package/.output/server/node_modules/lodash/isObject.js +31 -0
  738. package/.output/server/node_modules/lodash/isObjectLike.js +29 -0
  739. package/.output/server/node_modules/lodash/isPlainObject.js +62 -0
  740. package/.output/server/node_modules/lodash/isSet.js +27 -0
  741. package/.output/server/node_modules/lodash/isString.js +30 -0
  742. package/.output/server/node_modules/lodash/isSymbol.js +29 -0
  743. package/.output/server/node_modules/lodash/isTypedArray.js +27 -0
  744. package/.output/server/node_modules/lodash/keys.js +37 -0
  745. package/.output/server/node_modules/lodash/keysIn.js +32 -0
  746. package/.output/server/node_modules/lodash/last.js +20 -0
  747. package/.output/server/node_modules/lodash/map.js +53 -0
  748. package/.output/server/node_modules/lodash/max.js +29 -0
  749. package/.output/server/node_modules/lodash/memoize.js +73 -0
  750. package/.output/server/node_modules/lodash/merge.js +39 -0
  751. package/.output/server/node_modules/lodash/negate.js +40 -0
  752. package/.output/server/node_modules/lodash/noop.js +17 -0
  753. package/.output/server/node_modules/lodash/omitBy.js +29 -0
  754. package/.output/server/node_modules/lodash/package.json +19 -0
  755. package/.output/server/node_modules/lodash/pickBy.js +37 -0
  756. package/.output/server/node_modules/lodash/property.js +32 -0
  757. package/.output/server/node_modules/lodash/reduce.js +51 -0
  758. package/.output/server/node_modules/lodash/reject.js +46 -0
  759. package/.output/server/node_modules/lodash/some.js +51 -0
  760. package/.output/server/node_modules/lodash/sortBy.js +48 -0
  761. package/.output/server/node_modules/lodash/stubArray.js +23 -0
  762. package/.output/server/node_modules/lodash/stubFalse.js +18 -0
  763. package/.output/server/node_modules/lodash/tail.js +22 -0
  764. package/.output/server/node_modules/lodash/template.js +272 -0
  765. package/.output/server/node_modules/lodash/templateSettings.js +67 -0
  766. package/.output/server/node_modules/lodash/toArray.js +58 -0
  767. package/.output/server/node_modules/lodash/toFinite.js +42 -0
  768. package/.output/server/node_modules/lodash/toInteger.js +36 -0
  769. package/.output/server/node_modules/lodash/toNumber.js +64 -0
  770. package/.output/server/node_modules/lodash/toPlainObject.js +32 -0
  771. package/.output/server/node_modules/lodash/toString.js +28 -0
  772. package/.output/server/node_modules/lodash/transform.js +65 -0
  773. package/.output/server/node_modules/lodash/uniq.js +25 -0
  774. package/.output/server/node_modules/lodash/uniqueId.js +28 -0
  775. package/.output/server/node_modules/lodash/values.js +34 -0
  776. package/.output/server/node_modules/papaparse/package.json +58 -0
  777. package/.output/server/node_modules/papaparse/papaparse.js +1945 -0
  778. package/.output/server/node_modules/pg/node_modules/pg-connection-string/index.js +112 -0
  779. package/.output/server/node_modules/pg/node_modules/pg-connection-string/package.json +40 -0
  780. package/.output/server/node_modules/safer-buffer/package.json +34 -0
  781. package/.output/server/node_modules/safer-buffer/safer.js +77 -0
  782. package/.output/server/node_modules/ssh2/lib/Channel.js +295 -0
  783. package/.output/server/node_modules/ssh2/lib/agent.js +1123 -0
  784. package/.output/server/node_modules/ssh2/lib/client.js +2176 -0
  785. package/.output/server/node_modules/ssh2/lib/http-agents.js +84 -0
  786. package/.output/server/node_modules/ssh2/lib/index.js +44 -0
  787. package/.output/server/node_modules/ssh2/lib/keygen.js +582 -0
  788. package/.output/server/node_modules/ssh2/lib/protocol/Protocol.js +2136 -0
  789. package/.output/server/node_modules/ssh2/lib/protocol/SFTP.js +4052 -0
  790. package/.output/server/node_modules/ssh2/lib/protocol/constants.js +356 -0
  791. package/.output/server/node_modules/ssh2/lib/protocol/crypto/poly1305.js +43 -0
  792. package/.output/server/node_modules/ssh2/lib/protocol/crypto.js +1602 -0
  793. package/.output/server/node_modules/ssh2/lib/protocol/handlers.js +16 -0
  794. package/.output/server/node_modules/ssh2/lib/protocol/handlers.misc.js +1285 -0
  795. package/.output/server/node_modules/ssh2/lib/protocol/kex.js +1908 -0
  796. package/.output/server/node_modules/ssh2/lib/protocol/keyParser.js +1484 -0
  797. package/.output/server/node_modules/ssh2/lib/protocol/node-fs-compat.js +115 -0
  798. package/.output/server/node_modules/ssh2/lib/protocol/utils.js +356 -0
  799. package/.output/server/node_modules/ssh2/lib/protocol/zlib.js +255 -0
  800. package/.output/server/node_modules/ssh2/lib/server.js +1380 -0
  801. package/.output/server/node_modules/ssh2/lib/utils.js +336 -0
  802. package/.output/server/node_modules/ssh2/package.json +49 -0
  803. package/.output/server/node_modules/ssh2/util/pagent.exe +0 -0
  804. package/.output/server/node_modules/tarn/dist/PendingOperation.js +48 -0
  805. package/.output/server/node_modules/tarn/dist/Pool.js +516 -0
  806. package/.output/server/node_modules/tarn/dist/PromiseInspection.js +21 -0
  807. package/.output/server/node_modules/tarn/dist/Resource.js +19 -0
  808. package/.output/server/node_modules/tarn/dist/TimeoutError.js +5 -0
  809. package/.output/server/node_modules/tarn/dist/tarn.js +10 -0
  810. package/.output/server/node_modules/tarn/dist/utils.js +60 -0
  811. package/.output/server/node_modules/tarn/package.json +66 -0
  812. package/.output/server/node_modules/tweetnacl/nacl-fast.js +2388 -0
  813. package/.output/server/node_modules/tweetnacl/package.json +58 -0
  814. package/.output/server/package.json +20 -35
  815. package/package.json +1 -1
  816. package/.output/public/_nuxt/AKIL8y6B.js +0 -1
  817. package/.output/public/_nuxt/B5vWsFeq.js +0 -160
  818. package/.output/public/_nuxt/B7OaQ1wH.js +0 -8
  819. package/.output/public/_nuxt/BG-9_o0s.js +0 -3
  820. package/.output/public/_nuxt/BHnp06h8.js +0 -1
  821. package/.output/public/_nuxt/BKxFOGv6.js +0 -1
  822. package/.output/public/_nuxt/BNIRlgC1.js +0 -1
  823. package/.output/public/_nuxt/BNdHe5KI.js +0 -1
  824. package/.output/public/_nuxt/BQANhp-y.js +0 -1
  825. package/.output/public/_nuxt/BUYy1lWT.js +0 -215
  826. package/.output/public/_nuxt/Ber6tLDb.js +0 -1
  827. package/.output/public/_nuxt/BgEovngA.js +0 -1
  828. package/.output/public/_nuxt/BhgYrVrc.js +0 -6
  829. package/.output/public/_nuxt/BmnOz39b.js +0 -2
  830. package/.output/public/_nuxt/BuKJVBv4.js +0 -1
  831. package/.output/public/_nuxt/BxMjn94S.js +0 -4
  832. package/.output/public/_nuxt/C1dxTB9p.js +0 -39
  833. package/.output/public/_nuxt/C4mc67xO.js +0 -31
  834. package/.output/public/_nuxt/CAOPafml.js +0 -1
  835. package/.output/public/_nuxt/CPxn9ATh.js +0 -1
  836. package/.output/public/_nuxt/CQ_P7x7z.js +0 -3
  837. package/.output/public/_nuxt/CS9PCQVw.js +0 -6
  838. package/.output/public/_nuxt/CdEjcJco.js +0 -1
  839. package/.output/public/_nuxt/CeQk_zaG.js +0 -3867
  840. package/.output/public/_nuxt/CijEBUIh.js +0 -9
  841. package/.output/public/_nuxt/Cn-07UHL.js +0 -1
  842. package/.output/public/_nuxt/D4_A4fm4.js +0 -1
  843. package/.output/public/_nuxt/DAs4584G.js +0 -72
  844. package/.output/public/_nuxt/DBO1CAN4.js +0 -1
  845. package/.output/public/_nuxt/DF7Phtj8.js +0 -39
  846. package/.output/public/_nuxt/DMMO4O3Y.js +0 -1
  847. package/.output/public/_nuxt/DP-hoxaC.js +0 -1
  848. package/.output/public/_nuxt/DREcM-oC.js +0 -20
  849. package/.output/public/_nuxt/DX-rdvVh.js +0 -28
  850. package/.output/public/_nuxt/DXei3mDv.js +0 -1
  851. package/.output/public/_nuxt/DZcRPyDc.js +0 -26
  852. package/.output/public/_nuxt/D_QjJZ_n.js +0 -1
  853. package/.output/public/_nuxt/Dj2IVxO7.js +0 -1
  854. package/.output/public/_nuxt/DmMeuvwr.js +0 -1
  855. package/.output/public/_nuxt/DqlhGxxN.js +0 -32
  856. package/.output/public/_nuxt/DynamicTable.DJeANwbG.css +0 -1
  857. package/.output/public/_nuxt/GmXmO94-.js +0 -1
  858. package/.output/public/_nuxt/HPyUOgdi.js +0 -1
  859. package/.output/public/_nuxt/MdxV8r4v.js +0 -1
  860. package/.output/public/_nuxt/Mp6jDt1I.js +0 -1
  861. package/.output/public/_nuxt/QuickQuery.h4epNPla.css +0 -1
  862. package/.output/public/_nuxt/WrapperErdDiagram.DeMTjOwN.css +0 -1
  863. package/.output/public/_nuxt/Zvfofmwe.js +0 -1
  864. package/.output/public/_nuxt/_fileId_.BHiWIaF7.css +0 -1
  865. package/.output/public/_nuxt/builds/meta/db42d692-1628-4dd8-9442-d7621bdd9ac6.json +0 -1
  866. package/.output/public/_nuxt/cQYBDqKG.js +0 -1
  867. package/.output/public/_nuxt/default.BfdyU-m9.css +0 -1
  868. package/.output/public/_nuxt/entry.0UG0MnUy.css +0 -1
  869. package/.output/public/_nuxt/fIC3FurW.js +0 -1
  870. package/.output/public/_nuxt/index.BHg08rtV.css +0 -1
  871. package/.output/public/_nuxt/n9bD6NrC.js +0 -2
  872. package/.output/public/_nuxt/ykQL1ia3.js +0 -271
  873. package/.output/public/_nuxt/zD3bTrJp.js +0 -1
  874. package/.output/server/chunks/routes/api/database-roles/adapters/postgres.adapter.mjs +0 -700
  875. package/.output/server/chunks/routes/api/database-roles/adapters/postgres.adapter.mjs.map +0 -1
  876. package/.output/server/chunks/routes/api/database-roles/adapters/types.mjs +0 -2
  877. package/.output/server/chunks/routes/api/database-roles/adapters/types.mjs.map +0 -1
  878. package/.output/server/chunks/routes/api/database-roles/index.mjs +0 -39
  879. package/.output/server/chunks/routes/api/database-roles/index.mjs.map +0 -1
  880. package/.output/server/chunks/routes/api/delete-function.mjs +0 -65
  881. package/.output/server/chunks/routes/api/delete-function.mjs.map +0 -1
  882. package/.output/server/chunks/routes/api/execute-bulk-delete.mjs +0 -100
  883. package/.output/server/chunks/routes/api/execute-bulk-delete.mjs.map +0 -1
  884. package/.output/server/chunks/routes/api/execute-bulk-update.mjs +0 -105
  885. package/.output/server/chunks/routes/api/execute-bulk-update.mjs.map +0 -1
  886. package/.output/server/chunks/routes/api/execute.mjs +0 -47
  887. package/.output/server/chunks/routes/api/execute.mjs.map +0 -1
  888. package/.output/server/chunks/routes/api/export-table-data.mjs +0 -229
  889. package/.output/server/chunks/routes/api/export-table-data.mjs.map +0 -1
  890. package/.output/server/chunks/routes/api/get-function-signature.mjs +0 -96
  891. package/.output/server/chunks/routes/api/get-function-signature.mjs.map +0 -1
  892. package/.output/server/chunks/routes/api/get-one-function.mjs +0 -34
  893. package/.output/server/chunks/routes/api/get-one-function.mjs.map +0 -1
  894. package/.output/server/chunks/routes/api/get-one-table.mjs +0 -180
  895. package/.output/server/chunks/routes/api/get-one-table.mjs.map +0 -1
  896. package/.output/server/chunks/routes/api/get-over-view-function.mjs +0 -41
  897. package/.output/server/chunks/routes/api/get-over-view-function.mjs.map +0 -1
  898. package/.output/server/chunks/routes/api/get-over-view-tables.mjs +0 -53
  899. package/.output/server/chunks/routes/api/get-over-view-tables.mjs.map +0 -1
  900. package/.output/server/chunks/routes/api/get-over-view-views.mjs +0 -44
  901. package/.output/server/chunks/routes/api/get-over-view-views.mjs.map +0 -1
  902. package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs +0 -123
  903. package/.output/server/chunks/routes/api/get-reverse-table-schemas.mjs.map +0 -1
  904. package/.output/server/chunks/routes/api/get-schema-meta-data.mjs +0 -220
  905. package/.output/server/chunks/routes/api/get-schema-meta-data.mjs.map +0 -1
  906. package/.output/server/chunks/routes/api/get-table-ddl.mjs +0 -185
  907. package/.output/server/chunks/routes/api/get-table-ddl.mjs.map +0 -1
  908. package/.output/server/chunks/routes/api/get-table-size.mjs +0 -49
  909. package/.output/server/chunks/routes/api/get-table-size.mjs.map +0 -1
  910. package/.output/server/chunks/routes/api/get-table-structure.mjs +0 -111
  911. package/.output/server/chunks/routes/api/get-table-structure.mjs.map +0 -1
  912. package/.output/server/chunks/routes/api/get-tables.mjs +0 -287
  913. package/.output/server/chunks/routes/api/get-tables.mjs.map +0 -1
  914. package/.output/server/chunks/routes/api/get-view-definition.mjs +0 -57
  915. package/.output/server/chunks/routes/api/get-view-definition.mjs.map +0 -1
  916. package/.output/server/chunks/routes/api/getMetricMonitor.mjs +0 -46
  917. package/.output/server/chunks/routes/api/getMetricMonitor.mjs.map +0 -1
  918. package/.output/server/chunks/routes/api/raw-execute.mjs +0 -47
  919. package/.output/server/chunks/routes/api/raw-execute.mjs.map +0 -1
  920. package/.output/server/chunks/routes/api/rename-function.mjs +0 -77
  921. package/.output/server/chunks/routes/api/rename-function.mjs.map +0 -1
  922. package/.output/server/chunks/routes/api/update-function.mjs +0 -65
  923. package/.output/server/chunks/routes/api/update-function.mjs.map +0 -1
  924. package/.output/server/node_modules/@ioredis/commands/built/commands.json +0 -2447
  925. package/.output/server/node_modules/@ioredis/commands/built/index.js +0 -208
  926. package/.output/server/node_modules/@ioredis/commands/package.json +0 -52
  927. package/.output/server/node_modules/@sqltools/formatter/lib/core/Formatter.js +0 -234
  928. package/.output/server/node_modules/@sqltools/formatter/lib/core/Indentation.js +0 -42
  929. package/.output/server/node_modules/@sqltools/formatter/lib/core/InlineBlock.js +0 -60
  930. package/.output/server/node_modules/@sqltools/formatter/lib/core/Params.js +0 -21
  931. package/.output/server/node_modules/@sqltools/formatter/lib/core/Tokenizer.js +0 -272
  932. package/.output/server/node_modules/@sqltools/formatter/lib/core/escapeRegExp.js +0 -10
  933. package/.output/server/node_modules/@sqltools/formatter/lib/core/last.js +0 -7
  934. package/.output/server/node_modules/@sqltools/formatter/lib/core/types.js +0 -22
  935. package/.output/server/node_modules/@sqltools/formatter/lib/languages/Db2Formatter.js +0 -585
  936. package/.output/server/node_modules/@sqltools/formatter/lib/languages/N1qlFormatter.js +0 -257
  937. package/.output/server/node_modules/@sqltools/formatter/lib/languages/PlSqlFormatter.js +0 -459
  938. package/.output/server/node_modules/@sqltools/formatter/lib/languages/StandardSqlFormatter.js +0 -369
  939. package/.output/server/node_modules/@sqltools/formatter/lib/languages/utils/abstract.js +0 -23
  940. package/.output/server/node_modules/@sqltools/formatter/lib/sqlFormatter.js +0 -34
  941. package/.output/server/node_modules/@sqltools/formatter/package.json +0 -59
  942. package/.output/server/node_modules/ansis/index.js +0 -1
  943. package/.output/server/node_modules/ansis/package.json +0 -28
  944. package/.output/server/node_modules/app-root-path/index.js +0 -4
  945. package/.output/server/node_modules/app-root-path/lib/app-root-path.js +0 -30
  946. package/.output/server/node_modules/app-root-path/lib/resolve.js +0 -128
  947. package/.output/server/node_modules/app-root-path/package.json +0 -66
  948. package/.output/server/node_modules/balanced-match/index.js +0 -62
  949. package/.output/server/node_modules/balanced-match/package.json +0 -48
  950. package/.output/server/node_modules/brace-expansion/index.js +0 -203
  951. package/.output/server/node_modules/brace-expansion/package.json +0 -46
  952. package/.output/server/node_modules/cluster-key-slot/lib/index.js +0 -166
  953. package/.output/server/node_modules/cluster-key-slot/package.json +0 -56
  954. package/.output/server/node_modules/dedent/dist/dedent.js +0 -73
  955. package/.output/server/node_modules/dedent/package.json +0 -119
  956. package/.output/server/node_modules/denque/index.js +0 -481
  957. package/.output/server/node_modules/denque/package.json +0 -58
  958. package/.output/server/node_modules/dotenv/lib/main.js +0 -361
  959. package/.output/server/node_modules/dotenv/package.json +0 -61
  960. package/.output/server/node_modules/glob/dist/commonjs/glob.js +0 -247
  961. package/.output/server/node_modules/glob/dist/commonjs/has-magic.js +0 -27
  962. package/.output/server/node_modules/glob/dist/commonjs/ignore.js +0 -119
  963. package/.output/server/node_modules/glob/dist/commonjs/index.js +0 -68
  964. package/.output/server/node_modules/glob/dist/commonjs/package.json +0 -3
  965. package/.output/server/node_modules/glob/dist/commonjs/pattern.js +0 -219
  966. package/.output/server/node_modules/glob/dist/commonjs/processor.js +0 -301
  967. package/.output/server/node_modules/glob/dist/commonjs/walker.js +0 -387
  968. package/.output/server/node_modules/glob/package.json +0 -99
  969. package/.output/server/node_modules/inherits/inherits.js +0 -9
  970. package/.output/server/node_modules/inherits/inherits_browser.js +0 -27
  971. package/.output/server/node_modules/inherits/package.json +0 -29
  972. package/.output/server/node_modules/ioredis/built/Command.js +0 -349
  973. package/.output/server/node_modules/ioredis/built/DataHandler.js +0 -220
  974. package/.output/server/node_modules/ioredis/built/Pipeline.js +0 -334
  975. package/.output/server/node_modules/ioredis/built/Redis.js +0 -697
  976. package/.output/server/node_modules/ioredis/built/ScanStream.js +0 -51
  977. package/.output/server/node_modules/ioredis/built/Script.js +0 -62
  978. package/.output/server/node_modules/ioredis/built/SubscriptionSet.js +0 -41
  979. package/.output/server/node_modules/ioredis/built/autoPipelining.js +0 -159
  980. package/.output/server/node_modules/ioredis/built/cluster/ClusterOptions.js +0 -22
  981. package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriber.js +0 -202
  982. package/.output/server/node_modules/ioredis/built/cluster/ClusterSubscriberGroup.js +0 -224
  983. package/.output/server/node_modules/ioredis/built/cluster/ConnectionPool.js +0 -154
  984. package/.output/server/node_modules/ioredis/built/cluster/DelayQueue.js +0 -53
  985. package/.output/server/node_modules/ioredis/built/cluster/index.js +0 -862
  986. package/.output/server/node_modules/ioredis/built/cluster/util.js +0 -100
  987. package/.output/server/node_modules/ioredis/built/connectors/AbstractConnector.js +0 -26
  988. package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/FailoverDetector.js +0 -45
  989. package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/SentinelIterator.js +0 -37
  990. package/.output/server/node_modules/ioredis/built/connectors/SentinelConnector/index.js +0 -305
  991. package/.output/server/node_modules/ioredis/built/connectors/StandaloneConnector.js +0 -69
  992. package/.output/server/node_modules/ioredis/built/connectors/index.js +0 -7
  993. package/.output/server/node_modules/ioredis/built/constants/TLSProfiles.js +0 -149
  994. package/.output/server/node_modules/ioredis/built/errors/ClusterAllFailedError.js +0 -15
  995. package/.output/server/node_modules/ioredis/built/errors/MaxRetriesPerRequestError.js +0 -14
  996. package/.output/server/node_modules/ioredis/built/errors/index.js +0 -5
  997. package/.output/server/node_modules/ioredis/built/index.js +0 -62
  998. package/.output/server/node_modules/ioredis/built/redis/RedisOptions.js +0 -55
  999. package/.output/server/node_modules/ioredis/built/redis/event_handler.js +0 -292
  1000. package/.output/server/node_modules/ioredis/built/transaction.js +0 -93
  1001. package/.output/server/node_modules/ioredis/built/utils/Commander.js +0 -117
  1002. package/.output/server/node_modules/ioredis/built/utils/applyMixin.js +0 -8
  1003. package/.output/server/node_modules/ioredis/built/utils/debug.js +0 -95
  1004. package/.output/server/node_modules/ioredis/built/utils/index.js +0 -297
  1005. package/.output/server/node_modules/ioredis/built/utils/lodash.js +0 -9
  1006. package/.output/server/node_modules/ioredis/package.json +0 -100
  1007. package/.output/server/node_modules/lodash.defaults/index.js +0 -668
  1008. package/.output/server/node_modules/lodash.defaults/package.json +0 -19
  1009. package/.output/server/node_modules/lodash.isarguments/index.js +0 -229
  1010. package/.output/server/node_modules/lodash.isarguments/package.json +0 -19
  1011. package/.output/server/node_modules/lru-cache/dist/commonjs/index.js +0 -1546
  1012. package/.output/server/node_modules/lru-cache/dist/commonjs/package.json +0 -3
  1013. package/.output/server/node_modules/lru-cache/package.json +0 -116
  1014. package/.output/server/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +0 -14
  1015. package/.output/server/node_modules/minimatch/dist/commonjs/ast.js +0 -592
  1016. package/.output/server/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -152
  1017. package/.output/server/node_modules/minimatch/dist/commonjs/escape.js +0 -22
  1018. package/.output/server/node_modules/minimatch/dist/commonjs/index.js +0 -1017
  1019. package/.output/server/node_modules/minimatch/dist/commonjs/package.json +0 -3
  1020. package/.output/server/node_modules/minimatch/dist/commonjs/unescape.js +0 -24
  1021. package/.output/server/node_modules/minimatch/package.json +0 -82
  1022. package/.output/server/node_modules/minipass/dist/commonjs/index.js +0 -1028
  1023. package/.output/server/node_modules/minipass/dist/commonjs/package.json +0 -3
  1024. package/.output/server/node_modules/minipass/package.json +0 -82
  1025. package/.output/server/node_modules/path-scurry/dist/commonjs/index.js +0 -2014
  1026. package/.output/server/node_modules/path-scurry/dist/commonjs/package.json +0 -3
  1027. package/.output/server/node_modules/path-scurry/package.json +0 -89
  1028. package/.output/server/node_modules/redis-errors/index.js +0 -7
  1029. package/.output/server/node_modules/redis-errors/lib/modern.js +0 -59
  1030. package/.output/server/node_modules/redis-errors/lib/old.js +0 -119
  1031. package/.output/server/node_modules/redis-errors/package.json +0 -41
  1032. package/.output/server/node_modules/redis-parser/index.js +0 -3
  1033. package/.output/server/node_modules/redis-parser/lib/parser.js +0 -552
  1034. package/.output/server/node_modules/redis-parser/package.json +0 -53
  1035. package/.output/server/node_modules/reflect-metadata/Reflect.js +0 -1415
  1036. package/.output/server/node_modules/reflect-metadata/package.json +0 -68
  1037. package/.output/server/node_modules/safe-buffer/index.js +0 -65
  1038. package/.output/server/node_modules/safe-buffer/package.json +0 -51
  1039. package/.output/server/node_modules/sha.js/hash.js +0 -81
  1040. package/.output/server/node_modules/sha.js/index.js +0 -15
  1041. package/.output/server/node_modules/sha.js/package.json +0 -30
  1042. package/.output/server/node_modules/sha.js/sha.js +0 -94
  1043. package/.output/server/node_modules/sha.js/sha1.js +0 -99
  1044. package/.output/server/node_modules/sha.js/sha224.js +0 -53
  1045. package/.output/server/node_modules/sha.js/sha256.js +0 -135
  1046. package/.output/server/node_modules/sha.js/sha384.js +0 -57
  1047. package/.output/server/node_modules/sha.js/sha512.js +0 -260
  1048. package/.output/server/node_modules/sql-highlight/lib/escapeHtml.js +0 -59
  1049. package/.output/server/node_modules/sql-highlight/lib/index.js +0 -85
  1050. package/.output/server/node_modules/sql-highlight/lib/keywords.js +0 -145
  1051. package/.output/server/node_modules/sql-highlight/package.json +0 -49
  1052. package/.output/server/node_modules/standard-as-callback/built/index.js +0 -41
  1053. package/.output/server/node_modules/standard-as-callback/built/utils.js +0 -23
  1054. package/.output/server/node_modules/standard-as-callback/package.json +0 -40
  1055. package/.output/server/node_modules/tslib/package.json +0 -47
  1056. package/.output/server/node_modules/tslib/tslib.js +0 -484
  1057. package/.output/server/node_modules/typeorm/cache/DbQueryResultCache.js +0 -264
  1058. package/.output/server/node_modules/typeorm/cache/QueryResultCacheFactory.js +0 -42
  1059. package/.output/server/node_modules/typeorm/cache/RedisQueryResultCache.js +0 -197
  1060. package/.output/server/node_modules/typeorm/common/DeepPartial.js +0 -4
  1061. package/.output/server/node_modules/typeorm/common/EntityTarget.js +0 -4
  1062. package/.output/server/node_modules/typeorm/common/MixedList.js +0 -4
  1063. package/.output/server/node_modules/typeorm/common/ObjectLiteral.js +0 -4
  1064. package/.output/server/node_modules/typeorm/common/ObjectType.js +0 -4
  1065. package/.output/server/node_modules/typeorm/common/RelationType.js +0 -4
  1066. package/.output/server/node_modules/typeorm/connection/Connection.js +0 -16
  1067. package/.output/server/node_modules/typeorm/connection/ConnectionManager.js +0 -66
  1068. package/.output/server/node_modules/typeorm/connection/ConnectionMetadataBuilder.js +0 -74
  1069. package/.output/server/node_modules/typeorm/connection/ConnectionOptionsReader.js +0 -198
  1070. package/.output/server/node_modules/typeorm/connection/options-reader/ConnectionOptionsEnvReader.js +0 -111
  1071. package/.output/server/node_modules/typeorm/container.js +0 -60
  1072. package/.output/server/node_modules/typeorm/data-source/DataSource.js +0 -517
  1073. package/.output/server/node_modules/typeorm/decorator/Check.js +0 -27
  1074. package/.output/server/node_modules/typeorm/decorator/EntityRepository.js +0 -21
  1075. package/.output/server/node_modules/typeorm/decorator/Exclusion.js +0 -27
  1076. package/.output/server/node_modules/typeorm/decorator/ForeignKey.js +0 -44
  1077. package/.output/server/node_modules/typeorm/decorator/Generated.js +0 -24
  1078. package/.output/server/node_modules/typeorm/decorator/Index.js +0 -56
  1079. package/.output/server/node_modules/typeorm/decorator/Unique.js +0 -50
  1080. package/.output/server/node_modules/typeorm/decorator/columns/Column.js +0 -78
  1081. package/.output/server/node_modules/typeorm/decorator/columns/CreateDateColumn.js +0 -21
  1082. package/.output/server/node_modules/typeorm/decorator/columns/DeleteDateColumn.js +0 -20
  1083. package/.output/server/node_modules/typeorm/decorator/columns/ObjectIdColumn.js +0 -27
  1084. package/.output/server/node_modules/typeorm/decorator/columns/PrimaryColumn.js +0 -63
  1085. package/.output/server/node_modules/typeorm/decorator/columns/PrimaryGeneratedColumn.js +0 -59
  1086. package/.output/server/node_modules/typeorm/decorator/columns/UpdateDateColumn.js +0 -20
  1087. package/.output/server/node_modules/typeorm/decorator/columns/VersionColumn.js +0 -21
  1088. package/.output/server/node_modules/typeorm/decorator/columns/ViewColumn.js +0 -19
  1089. package/.output/server/node_modules/typeorm/decorator/columns/VirtualColumn.js +0 -49
  1090. package/.output/server/node_modules/typeorm/decorator/entity/ChildEntity.js +0 -25
  1091. package/.output/server/node_modules/typeorm/decorator/entity/Entity.js +0 -31
  1092. package/.output/server/node_modules/typeorm/decorator/entity/TableInheritance.js +0 -22
  1093. package/.output/server/node_modules/typeorm/decorator/entity-view/ViewEntity.js +0 -32
  1094. package/.output/server/node_modules/typeorm/decorator/listeners/AfterInsert.js +0 -19
  1095. package/.output/server/node_modules/typeorm/decorator/listeners/AfterLoad.js +0 -19
  1096. package/.output/server/node_modules/typeorm/decorator/listeners/AfterRecover.js +0 -19
  1097. package/.output/server/node_modules/typeorm/decorator/listeners/AfterRemove.js +0 -19
  1098. package/.output/server/node_modules/typeorm/decorator/listeners/AfterSoftRemove.js +0 -19
  1099. package/.output/server/node_modules/typeorm/decorator/listeners/AfterUpdate.js +0 -19
  1100. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeInsert.js +0 -19
  1101. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRecover.js +0 -19
  1102. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeRemove.js +0 -19
  1103. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeSoftRemove.js +0 -19
  1104. package/.output/server/node_modules/typeorm/decorator/listeners/BeforeUpdate.js +0 -19
  1105. package/.output/server/node_modules/typeorm/decorator/listeners/EventSubscriber.js +0 -17
  1106. package/.output/server/node_modules/typeorm/decorator/options/ColumnOptions.js +0 -4
  1107. package/.output/server/node_modules/typeorm/decorator/options/EntityOptions.js +0 -4
  1108. package/.output/server/node_modules/typeorm/decorator/options/IndexOptions.js +0 -4
  1109. package/.output/server/node_modules/typeorm/decorator/options/JoinColumnOptions.js +0 -4
  1110. package/.output/server/node_modules/typeorm/decorator/options/JoinTableOptions.js +0 -4
  1111. package/.output/server/node_modules/typeorm/decorator/options/RelationOptions.js +0 -4
  1112. package/.output/server/node_modules/typeorm/decorator/options/ValueTransformer.js +0 -4
  1113. package/.output/server/node_modules/typeorm/decorator/relations/JoinColumn.js +0 -27
  1114. package/.output/server/node_modules/typeorm/decorator/relations/JoinTable.js +0 -34
  1115. package/.output/server/node_modules/typeorm/decorator/relations/ManyToMany.js +0 -46
  1116. package/.output/server/node_modules/typeorm/decorator/relations/ManyToOne.js +0 -46
  1117. package/.output/server/node_modules/typeorm/decorator/relations/OneToMany.js +0 -37
  1118. package/.output/server/node_modules/typeorm/decorator/relations/OneToOne.js +0 -45
  1119. package/.output/server/node_modules/typeorm/decorator/relations/RelationCount.js +0 -23
  1120. package/.output/server/node_modules/typeorm/decorator/relations/RelationId.js +0 -22
  1121. package/.output/server/node_modules/typeorm/decorator/tree/Tree.js +0 -21
  1122. package/.output/server/node_modules/typeorm/decorator/tree/TreeChildren.js +0 -34
  1123. package/.output/server/node_modules/typeorm/decorator/tree/TreeLevelColumn.js +0 -19
  1124. package/.output/server/node_modules/typeorm/decorator/tree/TreeParent.js +0 -33
  1125. package/.output/server/node_modules/typeorm/driver/DriverFactory.js +0 -98
  1126. package/.output/server/node_modules/typeorm/driver/DriverUtils.js +0 -228
  1127. package/.output/server/node_modules/typeorm/driver/Query.js +0 -16
  1128. package/.output/server/node_modules/typeorm/driver/SqlInMemory.js +0 -15
  1129. package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlDriver.js +0 -847
  1130. package/.output/server/node_modules/typeorm/driver/aurora-mysql/AuroraMysqlQueryRunner.js +0 -1709
  1131. package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresDriver.js +0 -103
  1132. package/.output/server/node_modules/typeorm/driver/aurora-postgres/AuroraPostgresQueryRunner.js +0 -146
  1133. package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3Driver.js +0 -153
  1134. package/.output/server/node_modules/typeorm/driver/better-sqlite3/BetterSqlite3QueryRunner.js +0 -126
  1135. package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorDriver.js +0 -78
  1136. package/.output/server/node_modules/typeorm/driver/capacitor/CapacitorQueryRunner.js +0 -98
  1137. package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachDriver.js +0 -885
  1138. package/.output/server/node_modules/typeorm/driver/cockroachdb/CockroachQueryRunner.js +0 -2453
  1139. package/.output/server/node_modules/typeorm/driver/cordova/CordovaDriver.js +0 -76
  1140. package/.output/server/node_modules/typeorm/driver/cordova/CordovaQueryRunner.js +0 -170
  1141. package/.output/server/node_modules/typeorm/driver/expo/ExpoDriver.js +0 -29
  1142. package/.output/server/node_modules/typeorm/driver/expo/ExpoDriverFactory.js +0 -22
  1143. package/.output/server/node_modules/typeorm/driver/expo/ExpoQueryRunner.js +0 -65
  1144. package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyDriver.js +0 -75
  1145. package/.output/server/node_modules/typeorm/driver/expo/legacy/ExpoLegacyQueryRunner.js +0 -169
  1146. package/.output/server/node_modules/typeorm/driver/mongodb/MongoDriver.js +0 -404
  1147. package/.output/server/node_modules/typeorm/driver/mongodb/MongoQueryRunner.js +0 -701
  1148. package/.output/server/node_modules/typeorm/driver/mongodb/bson.typings.js +0 -5
  1149. package/.output/server/node_modules/typeorm/driver/mongodb/typings.js +0 -23
  1150. package/.output/server/node_modules/typeorm/driver/mysql/MysqlDriver.js +0 -1105
  1151. package/.output/server/node_modules/typeorm/driver/mysql/MysqlQueryRunner.js +0 -2139
  1152. package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptDriver.js +0 -94
  1153. package/.output/server/node_modules/typeorm/driver/nativescript/NativescriptQueryRunner.js +0 -92
  1154. package/.output/server/node_modules/typeorm/driver/oracle/OracleDriver.js +0 -869
  1155. package/.output/server/node_modules/typeorm/driver/oracle/OracleQueryRunner.js +0 -1884
  1156. package/.output/server/node_modules/typeorm/driver/postgres/PostgresDriver.js +0 -1259
  1157. package/.output/server/node_modules/typeorm/driver/postgres/PostgresQueryRunner.js +0 -2729
  1158. package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeDriver.js +0 -728
  1159. package/.output/server/node_modules/typeorm/driver/react-native/ReactNativeQueryRunner.js +0 -107
  1160. package/.output/server/node_modules/typeorm/driver/sap/SapDriver.js +0 -681
  1161. package/.output/server/node_modules/typeorm/driver/sap/SapQueryRunner.js +0 -2054
  1162. package/.output/server/node_modules/typeorm/driver/spanner/SpannerDriver.js +0 -613
  1163. package/.output/server/node_modules/typeorm/driver/spanner/SpannerQueryRunner.js +0 -1464
  1164. package/.output/server/node_modules/typeorm/driver/sqlite/SqliteDriver.js +0 -174
  1165. package/.output/server/node_modules/typeorm/driver/sqlite/SqliteQueryRunner.js +0 -124
  1166. package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteDriver.js +0 -695
  1167. package/.output/server/node_modules/typeorm/driver/sqlite-abstract/AbstractSqliteQueryRunner.js +0 -1511
  1168. package/.output/server/node_modules/typeorm/driver/sqljs/SqljsDriver.js +0 -250
  1169. package/.output/server/node_modules/typeorm/driver/sqljs/SqljsQueryRunner.js +0 -123
  1170. package/.output/server/node_modules/typeorm/driver/sqlserver/MssqlParameter.js +0 -23
  1171. package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerDriver.js +0 -922
  1172. package/.output/server/node_modules/typeorm/driver/sqlserver/SqlServerQueryRunner.js +0 -2484
  1173. package/.output/server/node_modules/typeorm/driver/types/DatabaseType.js +0 -4
  1174. package/.output/server/node_modules/typeorm/driver/types/GeoJsonTypes.js +0 -4
  1175. package/.output/server/node_modules/typeorm/driver/types/MetadataTableType.js +0 -11
  1176. package/.output/server/node_modules/typeorm/driver/types/ReplicationMode.js +0 -4
  1177. package/.output/server/node_modules/typeorm/entity-manager/EntityManager.js +0 -853
  1178. package/.output/server/node_modules/typeorm/entity-manager/EntityManagerFactory.js +0 -24
  1179. package/.output/server/node_modules/typeorm/entity-manager/MongoEntityManager.js +0 -668
  1180. package/.output/server/node_modules/typeorm/entity-manager/SqljsEntityManager.js +0 -44
  1181. package/.output/server/node_modules/typeorm/entity-schema/EntitySchema.js +0 -15
  1182. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedColumnOptions.js +0 -8
  1183. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaEmbeddedError.js +0 -18
  1184. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaOptions.js +0 -11
  1185. package/.output/server/node_modules/typeorm/entity-schema/EntitySchemaTransformer.js +0 -333
  1186. package/.output/server/node_modules/typeorm/error/AlreadyHasActiveConnectionError.js +0 -16
  1187. package/.output/server/node_modules/typeorm/error/CannotAttachTreeChildrenEntityError.js +0 -16
  1188. package/.output/server/node_modules/typeorm/error/CannotConnectAlreadyConnectedError.js +0 -15
  1189. package/.output/server/node_modules/typeorm/error/CannotCreateEntityIdMapError.js +0 -21
  1190. package/.output/server/node_modules/typeorm/error/CannotDetermineEntityError.js +0 -16
  1191. package/.output/server/node_modules/typeorm/error/CannotExecuteNotConnectedError.js +0 -15
  1192. package/.output/server/node_modules/typeorm/error/CannotGetEntityManagerNotConnectedError.js +0 -15
  1193. package/.output/server/node_modules/typeorm/error/CannotReflectMethodParameterTypeError.js +0 -18
  1194. package/.output/server/node_modules/typeorm/error/CircularRelationsError.js +0 -16
  1195. package/.output/server/node_modules/typeorm/error/ColumnTypeUndefinedError.js +0 -19
  1196. package/.output/server/node_modules/typeorm/error/ConnectionIsNotSetError.js +0 -15
  1197. package/.output/server/node_modules/typeorm/error/ConnectionNotFoundError.js +0 -15
  1198. package/.output/server/node_modules/typeorm/error/CustomRepositoryCannotInheritRepositoryError.js +0 -18
  1199. package/.output/server/node_modules/typeorm/error/CustomRepositoryDoesNotHaveEntityError.js +0 -18
  1200. package/.output/server/node_modules/typeorm/error/CustomRepositoryNotFoundError.js +0 -18
  1201. package/.output/server/node_modules/typeorm/error/DataTypeNotSupportedError.js +0 -14
  1202. package/.output/server/node_modules/typeorm/error/DriverOptionNotSetError.js +0 -16
  1203. package/.output/server/node_modules/typeorm/error/DriverPackageNotInstalledError.js +0 -16
  1204. package/.output/server/node_modules/typeorm/error/EntityMetadataNotFoundError.js +0 -29
  1205. package/.output/server/node_modules/typeorm/error/EntityNotFoundError.js +0 -42
  1206. package/.output/server/node_modules/typeorm/error/EntityPropertyNotFoundError.js +0 -17
  1207. package/.output/server/node_modules/typeorm/error/FindRelationsNotFoundError.js +0 -23
  1208. package/.output/server/node_modules/typeorm/error/ForbiddenTransactionModeOverrideError.js +0 -16
  1209. package/.output/server/node_modules/typeorm/error/InitializedRelationError.js +0 -20
  1210. package/.output/server/node_modules/typeorm/error/InsertValuesMissingError.js +0 -16
  1211. package/.output/server/node_modules/typeorm/error/LimitOnUpdateNotSupportedError.js +0 -15
  1212. package/.output/server/node_modules/typeorm/error/LockNotSupportedOnGivenDriverError.js +0 -15
  1213. package/.output/server/node_modules/typeorm/error/MetadataAlreadyExistsError.js +0 -18
  1214. package/.output/server/node_modules/typeorm/error/MetadataWithSuchNameAlreadyExistsError.js +0 -16
  1215. package/.output/server/node_modules/typeorm/error/MissingDeleteDateColumnError.js +0 -12
  1216. package/.output/server/node_modules/typeorm/error/MissingDriverError.js +0 -16
  1217. package/.output/server/node_modules/typeorm/error/MissingJoinColumnError.js +0 -23
  1218. package/.output/server/node_modules/typeorm/error/MissingJoinTableError.js +0 -23
  1219. package/.output/server/node_modules/typeorm/error/MissingPrimaryColumnError.js +0 -13
  1220. package/.output/server/node_modules/typeorm/error/MustBeEntityError.js +0 -15
  1221. package/.output/server/node_modules/typeorm/error/NestedSetMultipleRootError.js +0 -12
  1222. package/.output/server/node_modules/typeorm/error/NoConnectionForRepositoryError.js +0 -16
  1223. package/.output/server/node_modules/typeorm/error/NoConnectionOptionError.js +0 -16
  1224. package/.output/server/node_modules/typeorm/error/NoNeedToReleaseEntityManagerError.js +0 -17
  1225. package/.output/server/node_modules/typeorm/error/NoVersionOrUpdateDateColumnError.js +0 -15
  1226. package/.output/server/node_modules/typeorm/error/OffsetWithoutLimitNotSupportedError.js +0 -17
  1227. package/.output/server/node_modules/typeorm/error/OptimisticLockCanNotBeUsedError.js +0 -15
  1228. package/.output/server/node_modules/typeorm/error/OptimisticLockVersionMismatchError.js +0 -15
  1229. package/.output/server/node_modules/typeorm/error/PersistedEntityNotFoundError.js +0 -15
  1230. package/.output/server/node_modules/typeorm/error/PessimisticLockTransactionRequiredError.js +0 -15
  1231. package/.output/server/node_modules/typeorm/error/PrimaryColumnCannotBeNullableError.js +0 -13
  1232. package/.output/server/node_modules/typeorm/error/QueryFailedError.js +0 -30
  1233. package/.output/server/node_modules/typeorm/error/QueryRunnerAlreadyReleasedError.js +0 -12
  1234. package/.output/server/node_modules/typeorm/error/QueryRunnerProviderAlreadyReleasedError.js +0 -16
  1235. package/.output/server/node_modules/typeorm/error/RepositoryNotTreeError.js +0 -32
  1236. package/.output/server/node_modules/typeorm/error/ReturningStatementNotSupportedError.js +0 -16
  1237. package/.output/server/node_modules/typeorm/error/SubjectRemovedAndUpdatedError.js +0 -16
  1238. package/.output/server/node_modules/typeorm/error/SubjectWithoutIdentifierError.js +0 -17
  1239. package/.output/server/node_modules/typeorm/error/TransactionAlreadyStartedError.js +0 -15
  1240. package/.output/server/node_modules/typeorm/error/TransactionNotStartedError.js +0 -15
  1241. package/.output/server/node_modules/typeorm/error/TreeRepositoryNotSupportedError.js +0 -12
  1242. package/.output/server/node_modules/typeorm/error/TypeORMError.js +0 -23
  1243. package/.output/server/node_modules/typeorm/error/UpdateValuesMissingError.js +0 -12
  1244. package/.output/server/node_modules/typeorm/error/UsingJoinColumnIsNotAllowedError.js +0 -13
  1245. package/.output/server/node_modules/typeorm/error/UsingJoinColumnOnlyOnOneSideAllowedError.js +0 -14
  1246. package/.output/server/node_modules/typeorm/error/UsingJoinTableIsNotAllowedError.js +0 -14
  1247. package/.output/server/node_modules/typeorm/error/UsingJoinTableOnlyOnOneSideAllowedError.js +0 -14
  1248. package/.output/server/node_modules/typeorm/error/index.js +0 -66
  1249. package/.output/server/node_modules/typeorm/find-options/EqualOperator.js +0 -13
  1250. package/.output/server/node_modules/typeorm/find-options/FindManyOptions.js +0 -4
  1251. package/.output/server/node_modules/typeorm/find-options/FindOneOptions.js +0 -4
  1252. package/.output/server/node_modules/typeorm/find-options/FindOperator.js +0 -96
  1253. package/.output/server/node_modules/typeorm/find-options/FindOperatorType.js +0 -4
  1254. package/.output/server/node_modules/typeorm/find-options/FindOptionsOrder.js +0 -4
  1255. package/.output/server/node_modules/typeorm/find-options/FindOptionsRelations.js +0 -4
  1256. package/.output/server/node_modules/typeorm/find-options/FindOptionsSelect.js +0 -4
  1257. package/.output/server/node_modules/typeorm/find-options/FindOptionsUtils.js +0 -350
  1258. package/.output/server/node_modules/typeorm/find-options/FindOptionsWhere.js +0 -4
  1259. package/.output/server/node_modules/typeorm/find-options/FindTreeOptions.js +0 -4
  1260. package/.output/server/node_modules/typeorm/find-options/JoinOptions.js +0 -4
  1261. package/.output/server/node_modules/typeorm/find-options/OrderByCondition.js +0 -4
  1262. package/.output/server/node_modules/typeorm/find-options/operator/And.js +0 -9
  1263. package/.output/server/node_modules/typeorm/find-options/operator/Any.js +0 -13
  1264. package/.output/server/node_modules/typeorm/find-options/operator/ArrayContainedBy.js +0 -13
  1265. package/.output/server/node_modules/typeorm/find-options/operator/ArrayContains.js +0 -13
  1266. package/.output/server/node_modules/typeorm/find-options/operator/ArrayOverlap.js +0 -13
  1267. package/.output/server/node_modules/typeorm/find-options/operator/Between.js +0 -13
  1268. package/.output/server/node_modules/typeorm/find-options/operator/Equal.js +0 -17
  1269. package/.output/server/node_modules/typeorm/find-options/operator/ILike.js +0 -13
  1270. package/.output/server/node_modules/typeorm/find-options/operator/In.js +0 -13
  1271. package/.output/server/node_modules/typeorm/find-options/operator/IsNull.js +0 -13
  1272. package/.output/server/node_modules/typeorm/find-options/operator/JsonContains.js +0 -13
  1273. package/.output/server/node_modules/typeorm/find-options/operator/LessThan.js +0 -13
  1274. package/.output/server/node_modules/typeorm/find-options/operator/LessThanOrEqual.js +0 -13
  1275. package/.output/server/node_modules/typeorm/find-options/operator/Like.js +0 -13
  1276. package/.output/server/node_modules/typeorm/find-options/operator/MoreThan.js +0 -13
  1277. package/.output/server/node_modules/typeorm/find-options/operator/MoreThanOrEqual.js +0 -13
  1278. package/.output/server/node_modules/typeorm/find-options/operator/Not.js +0 -14
  1279. package/.output/server/node_modules/typeorm/find-options/operator/Or.js +0 -9
  1280. package/.output/server/node_modules/typeorm/find-options/operator/Raw.js +0 -12
  1281. package/.output/server/node_modules/typeorm/globals.js +0 -182
  1282. package/.output/server/node_modules/typeorm/index.js +0 -196
  1283. package/.output/server/node_modules/typeorm/index.mjs +0 -422
  1284. package/.output/server/node_modules/typeorm/logger/AbstractLogger.js +0 -238
  1285. package/.output/server/node_modules/typeorm/logger/AdvancedConsoleLogger.js +0 -56
  1286. package/.output/server/node_modules/typeorm/logger/DebugLogger.js +0 -78
  1287. package/.output/server/node_modules/typeorm/logger/FileLogger.js +0 -88
  1288. package/.output/server/node_modules/typeorm/logger/FormattedConsoleLogger.js +0 -59
  1289. package/.output/server/node_modules/typeorm/logger/Logger.js +0 -4
  1290. package/.output/server/node_modules/typeorm/logger/LoggerFactory.js +0 -39
  1291. package/.output/server/node_modules/typeorm/logger/LoggerOptions.js +0 -4
  1292. package/.output/server/node_modules/typeorm/logger/SimpleConsoleLogger.js +0 -57
  1293. package/.output/server/node_modules/typeorm/metadata/CheckMetadata.js +0 -35
  1294. package/.output/server/node_modules/typeorm/metadata/ColumnMetadata.js +0 -618
  1295. package/.output/server/node_modules/typeorm/metadata/EmbeddedMetadata.js +0 -224
  1296. package/.output/server/node_modules/typeorm/metadata/EntityListenerMetadata.js +0 -77
  1297. package/.output/server/node_modules/typeorm/metadata/EntityMetadata.js +0 -692
  1298. package/.output/server/node_modules/typeorm/metadata/ExclusionMetadata.js +0 -35
  1299. package/.output/server/node_modules/typeorm/metadata/ForeignKeyMetadata.js +0 -57
  1300. package/.output/server/node_modules/typeorm/metadata/IndexMetadata.js +0 -144
  1301. package/.output/server/node_modules/typeorm/metadata/RelationCountMetadata.js +0 -39
  1302. package/.output/server/node_modules/typeorm/metadata/RelationIdMetadata.js +0 -62
  1303. package/.output/server/node_modules/typeorm/metadata/RelationMetadata.js +0 -440
  1304. package/.output/server/node_modules/typeorm/metadata/UniqueMetadata.js +0 -101
  1305. package/.output/server/node_modules/typeorm/metadata/types/EventListenerTypes.js +0 -22
  1306. package/.output/server/node_modules/typeorm/metadata-args/MetadataArgsStorage.js +0 -236
  1307. package/.output/server/node_modules/typeorm/metadata-builder/ClosureJunctionEntityMetadataBuilder.js +0 -145
  1308. package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataBuilder.js +0 -838
  1309. package/.output/server/node_modules/typeorm/metadata-builder/EntityMetadataValidator.js +0 -258
  1310. package/.output/server/node_modules/typeorm/metadata-builder/JunctionEntityMetadataBuilder.js +0 -287
  1311. package/.output/server/node_modules/typeorm/metadata-builder/MetadataUtils.js +0 -44
  1312. package/.output/server/node_modules/typeorm/metadata-builder/RelationJoinColumnBuilder.js +0 -185
  1313. package/.output/server/node_modules/typeorm/migration/Migration.js +0 -21
  1314. package/.output/server/node_modules/typeorm/migration/MigrationExecutor.js +0 -534
  1315. package/.output/server/node_modules/typeorm/naming-strategy/DefaultNamingStrategy.js +0 -145
  1316. package/.output/server/node_modules/typeorm/naming-strategy/LegacyOracleNamingStrategy.js +0 -50
  1317. package/.output/server/node_modules/typeorm/package.json +0 -268
  1318. package/.output/server/node_modules/typeorm/persistence/EntityPersistExecutor.js +0 -170
  1319. package/.output/server/node_modules/typeorm/persistence/Subject.js +0 -239
  1320. package/.output/server/node_modules/typeorm/persistence/SubjectChangedColumnsComputer.js +0 -216
  1321. package/.output/server/node_modules/typeorm/persistence/SubjectDatabaseEntityLoader.js +0 -135
  1322. package/.output/server/node_modules/typeorm/persistence/SubjectExecutor.js +0 -760
  1323. package/.output/server/node_modules/typeorm/persistence/SubjectTopologicalSorter.js +0 -174
  1324. package/.output/server/node_modules/typeorm/persistence/subject-builder/CascadesSubjectBuilder.js +0 -107
  1325. package/.output/server/node_modules/typeorm/persistence/subject-builder/ManyToManySubjectBuilder.js +0 -218
  1326. package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToManySubjectBuilder.js +0 -181
  1327. package/.output/server/node_modules/typeorm/persistence/subject-builder/OneToOneInverseSideSubjectBuilder.js +0 -155
  1328. package/.output/server/node_modules/typeorm/persistence/tree/ClosureSubjectExecutor.js +0 -241
  1329. package/.output/server/node_modules/typeorm/persistence/tree/MaterializedPathSubjectExecutor.js +0 -125
  1330. package/.output/server/node_modules/typeorm/persistence/tree/NestedSetSubjectExecutor.js +0 -271
  1331. package/.output/server/node_modules/typeorm/platform/PlatformTools.js +0 -243
  1332. package/.output/server/node_modules/typeorm/query-builder/Alias.js +0 -29
  1333. package/.output/server/node_modules/typeorm/query-builder/Brackets.js +0 -19
  1334. package/.output/server/node_modules/typeorm/query-builder/DeleteQueryBuilder.js +0 -200
  1335. package/.output/server/node_modules/typeorm/query-builder/InsertQueryBuilder.js +0 -745
  1336. package/.output/server/node_modules/typeorm/query-builder/JoinAttribute.js +0 -175
  1337. package/.output/server/node_modules/typeorm/query-builder/NotBrackets.js +0 -17
  1338. package/.output/server/node_modules/typeorm/query-builder/QueryBuilder.js +0 -1139
  1339. package/.output/server/node_modules/typeorm/query-builder/QueryBuilderUtils.js +0 -32
  1340. package/.output/server/node_modules/typeorm/query-builder/QueryExpressionMap.js +0 -328
  1341. package/.output/server/node_modules/typeorm/query-builder/RelationIdLoader.js +0 -503
  1342. package/.output/server/node_modules/typeorm/query-builder/RelationLoader.js +0 -283
  1343. package/.output/server/node_modules/typeorm/query-builder/RelationQueryBuilder.js +0 -155
  1344. package/.output/server/node_modules/typeorm/query-builder/RelationRemover.js +0 -143
  1345. package/.output/server/node_modules/typeorm/query-builder/RelationUpdater.js +0 -152
  1346. package/.output/server/node_modules/typeorm/query-builder/ReturningResultsEntityUpdator.js +0 -176
  1347. package/.output/server/node_modules/typeorm/query-builder/SelectQueryBuilder.js +0 -2656
  1348. package/.output/server/node_modules/typeorm/query-builder/SoftDeleteQueryBuilder.js +0 -368
  1349. package/.output/server/node_modules/typeorm/query-builder/UpdateQueryBuilder.js +0 -498
  1350. package/.output/server/node_modules/typeorm/query-builder/index.js +0 -20
  1351. package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountAttribute.js +0 -80
  1352. package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountLoader.js +0 -168
  1353. package/.output/server/node_modules/typeorm/query-builder/relation-count/RelationCountMetadataToAttributeTransformer.js +0 -55
  1354. package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdAttribute.js +0 -88
  1355. package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdLoader.js +0 -275
  1356. package/.output/server/node_modules/typeorm/query-builder/relation-id/RelationIdMetadataToAttributeTransformer.js +0 -55
  1357. package/.output/server/node_modules/typeorm/query-builder/result/DeleteResult.js +0 -17
  1358. package/.output/server/node_modules/typeorm/query-builder/result/InsertResult.js +0 -28
  1359. package/.output/server/node_modules/typeorm/query-builder/result/UpdateResult.js +0 -29
  1360. package/.output/server/node_modules/typeorm/query-builder/transformer/DocumentToEntityTransformer.js +0 -196
  1361. package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToDatabaseEntityTransformer.js +0 -112
  1362. package/.output/server/node_modules/typeorm/query-builder/transformer/PlainObjectToNewEntityTransformer.js +0 -92
  1363. package/.output/server/node_modules/typeorm/query-builder/transformer/RawSqlResultsToEntityTransformer.js +0 -447
  1364. package/.output/server/node_modules/typeorm/query-runner/BaseQueryRunner.js +0 -454
  1365. package/.output/server/node_modules/typeorm/query-runner/QueryLock.js +0 -28
  1366. package/.output/server/node_modules/typeorm/query-runner/QueryResult.js +0 -17
  1367. package/.output/server/node_modules/typeorm/repository/AbstractRepository.js +0 -92
  1368. package/.output/server/node_modules/typeorm/repository/BaseEntity.js +0 -328
  1369. package/.output/server/node_modules/typeorm/repository/MongoRepository.js +0 -305
  1370. package/.output/server/node_modules/typeorm/repository/RemoveOptions.js +0 -4
  1371. package/.output/server/node_modules/typeorm/repository/Repository.js +0 -379
  1372. package/.output/server/node_modules/typeorm/repository/SaveOptions.js +0 -4
  1373. package/.output/server/node_modules/typeorm/repository/TreeRepository.js +0 -255
  1374. package/.output/server/node_modules/typeorm/schema-builder/MongoSchemaBuilder.js +0 -66
  1375. package/.output/server/node_modules/typeorm/schema-builder/RdbmsSchemaBuilder.js +0 -929
  1376. package/.output/server/node_modules/typeorm/schema-builder/options/TableCheckOptions.js +0 -4
  1377. package/.output/server/node_modules/typeorm/schema-builder/options/TableColumnOptions.js +0 -4
  1378. package/.output/server/node_modules/typeorm/schema-builder/options/TableExclusionOptions.js +0 -4
  1379. package/.output/server/node_modules/typeorm/schema-builder/options/TableForeignKeyOptions.js +0 -4
  1380. package/.output/server/node_modules/typeorm/schema-builder/options/TableIndexOptions.js +0 -4
  1381. package/.output/server/node_modules/typeorm/schema-builder/options/TableOptions.js +0 -4
  1382. package/.output/server/node_modules/typeorm/schema-builder/options/TableUniqueOptions.js +0 -4
  1383. package/.output/server/node_modules/typeorm/schema-builder/options/ViewOptions.js +0 -4
  1384. package/.output/server/node_modules/typeorm/schema-builder/table/Table.js +0 -296
  1385. package/.output/server/node_modules/typeorm/schema-builder/table/TableCheck.js +0 -49
  1386. package/.output/server/node_modules/typeorm/schema-builder/table/TableColumn.js +0 -117
  1387. package/.output/server/node_modules/typeorm/schema-builder/table/TableExclusion.js +0 -43
  1388. package/.output/server/node_modules/typeorm/schema-builder/table/TableForeignKey.js +0 -72
  1389. package/.output/server/node_modules/typeorm/schema-builder/table/TableIndex.js +0 -68
  1390. package/.output/server/node_modules/typeorm/schema-builder/table/TableUnique.js +0 -50
  1391. package/.output/server/node_modules/typeorm/schema-builder/util/TableUtils.js +0 -41
  1392. package/.output/server/node_modules/typeorm/schema-builder/util/ViewUtils.js +0 -27
  1393. package/.output/server/node_modules/typeorm/schema-builder/view/View.js +0 -71
  1394. package/.output/server/node_modules/typeorm/subscriber/Broadcaster.js +0 -660
  1395. package/.output/server/node_modules/typeorm/subscriber/BroadcasterResult.js +0 -30
  1396. package/.output/server/node_modules/typeorm/subscriber/event/QueryEvent.js +0 -4
  1397. package/.output/server/node_modules/typeorm/util/ApplyValueTransformers.js +0 -25
  1398. package/.output/server/node_modules/typeorm/util/DateUtils.js +0 -229
  1399. package/.output/server/node_modules/typeorm/util/DepGraph.js +0 -230
  1400. package/.output/server/node_modules/typeorm/util/DirectoryExportedClassesLoader.js +0 -65
  1401. package/.output/server/node_modules/typeorm/util/ImportUtils.js +0 -66
  1402. package/.output/server/node_modules/typeorm/util/InstanceChecker.js +0 -104
  1403. package/.output/server/node_modules/typeorm/util/ObjectUtils.js +0 -49
  1404. package/.output/server/node_modules/typeorm/util/OrmUtils.js +0 -443
  1405. package/.output/server/node_modules/typeorm/util/PathUtils.js +0 -33
  1406. package/.output/server/node_modules/typeorm/util/RandomGenerator.js +0 -154
  1407. package/.output/server/node_modules/typeorm/util/SqlTagUtils.js +0 -43
  1408. package/.output/server/node_modules/typeorm/util/StringUtils.js +0 -113
  1409. package/.output/server/node_modules/typeorm/util/TreeRepositoryUtils.js +0 -67
  1410. package/.output/server/node_modules/typeorm/util/VersionUtils.js +0 -27
  1411. package/.output/server/node_modules/typeorm/util/escapeRegExp.js +0 -10
  1412. package/.output/server/node_modules/uuid/dist/cjs/index.js +0 -31
  1413. package/.output/server/node_modules/uuid/dist/cjs/max.js +0 -3
  1414. package/.output/server/node_modules/uuid/dist/cjs/md5.js +0 -13
  1415. package/.output/server/node_modules/uuid/dist/cjs/native.js +0 -4
  1416. package/.output/server/node_modules/uuid/dist/cjs/nil.js +0 -3
  1417. package/.output/server/node_modules/uuid/dist/cjs/package.json +0 -1
  1418. package/.output/server/node_modules/uuid/dist/cjs/parse.js +0 -11
  1419. package/.output/server/node_modules/uuid/dist/cjs/regex.js +0 -3
  1420. package/.output/server/node_modules/uuid/dist/cjs/rng.js +0 -13
  1421. package/.output/server/node_modules/uuid/dist/cjs/sha1.js +0 -13
  1422. package/.output/server/node_modules/uuid/dist/cjs/stringify.js +0 -39
  1423. package/.output/server/node_modules/uuid/dist/cjs/v1.js +0 -87
  1424. package/.output/server/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
  1425. package/.output/server/node_modules/uuid/dist/cjs/v3.js +0 -14
  1426. package/.output/server/node_modules/uuid/dist/cjs/v35.js +0 -41
  1427. package/.output/server/node_modules/uuid/dist/cjs/v4.js +0 -29
  1428. package/.output/server/node_modules/uuid/dist/cjs/v5.js +0 -14
  1429. package/.output/server/node_modules/uuid/dist/cjs/v6.js +0 -19
  1430. package/.output/server/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
  1431. package/.output/server/node_modules/uuid/dist/cjs/v7.js +0 -69
  1432. package/.output/server/node_modules/uuid/dist/cjs/validate.js +0 -7
  1433. package/.output/server/node_modules/uuid/dist/cjs/version.js +0 -10
  1434. package/.output/server/node_modules/uuid/package.json +0 -132
@@ -0,0 +1,2176 @@
1
+ // TODO:
2
+ // * add `.connected` or similar property to allow immediate connection
3
+ // status checking
4
+ // * add/improve debug output during user authentication phase
5
+ 'use strict';
6
+
7
+ const {
8
+ createHash,
9
+ getHashes,
10
+ randomFillSync,
11
+ } = require('crypto');
12
+ const { Socket } = require('net');
13
+ const { lookup: dnsLookup } = require('dns');
14
+ const EventEmitter = require('events');
15
+ const HASHES = getHashes();
16
+
17
+ const {
18
+ COMPAT,
19
+ CHANNEL_EXTENDED_DATATYPE: { STDERR },
20
+ CHANNEL_OPEN_FAILURE,
21
+ DEFAULT_CIPHER,
22
+ DEFAULT_COMPRESSION,
23
+ DEFAULT_KEX,
24
+ DEFAULT_MAC,
25
+ DEFAULT_SERVER_HOST_KEY,
26
+ DISCONNECT_REASON,
27
+ DISCONNECT_REASON_BY_VALUE,
28
+ SUPPORTED_CIPHER,
29
+ SUPPORTED_COMPRESSION,
30
+ SUPPORTED_KEX,
31
+ SUPPORTED_MAC,
32
+ SUPPORTED_SERVER_HOST_KEY,
33
+ } = require('./protocol/constants.js');
34
+ const { init: cryptoInit } = require('./protocol/crypto.js');
35
+ const Protocol = require('./protocol/Protocol.js');
36
+ const { parseKey } = require('./protocol/keyParser.js');
37
+ const { SFTP } = require('./protocol/SFTP.js');
38
+ const {
39
+ bufferCopy,
40
+ makeBufferParser,
41
+ makeError,
42
+ readUInt32BE,
43
+ sigSSHToASN1,
44
+ writeUInt32BE,
45
+ } = require('./protocol/utils.js');
46
+
47
+ const { AgentContext, createAgent, isAgent } = require('./agent.js');
48
+ const {
49
+ Channel,
50
+ MAX_WINDOW,
51
+ PACKET_SIZE,
52
+ windowAdjust,
53
+ WINDOW_THRESHOLD,
54
+ } = require('./Channel.js');
55
+ const {
56
+ ChannelManager,
57
+ generateAlgorithmList,
58
+ isWritable,
59
+ onChannelOpenFailure,
60
+ onCHANNEL_CLOSE,
61
+ } = require('./utils.js');
62
+
63
+ const bufferParser = makeBufferParser();
64
+ const sigParser = makeBufferParser();
65
+ const RE_OPENSSH = /^OpenSSH_(?:(?![0-4])\d)|(?:\d{2,})/;
66
+ const noop = (err) => {};
67
+
68
+ class Client extends EventEmitter {
69
+ constructor() {
70
+ super();
71
+
72
+ this.config = {
73
+ host: undefined,
74
+ port: undefined,
75
+ localAddress: undefined,
76
+ localPort: undefined,
77
+ forceIPv4: undefined,
78
+ forceIPv6: undefined,
79
+ keepaliveCountMax: undefined,
80
+ keepaliveInterval: undefined,
81
+ readyTimeout: undefined,
82
+ ident: undefined,
83
+
84
+ username: undefined,
85
+ password: undefined,
86
+ privateKey: undefined,
87
+ tryKeyboard: undefined,
88
+ agent: undefined,
89
+ allowAgentFwd: undefined,
90
+ authHandler: undefined,
91
+
92
+ hostHashAlgo: undefined,
93
+ hostHashCb: undefined,
94
+ strictVendor: undefined,
95
+ debug: undefined
96
+ };
97
+
98
+ this._agent = undefined;
99
+ this._readyTimeout = undefined;
100
+ this._chanMgr = undefined;
101
+ this._callbacks = undefined;
102
+ this._forwarding = undefined;
103
+ this._forwardingUnix = undefined;
104
+ this._acceptX11 = undefined;
105
+ this._agentFwdEnabled = undefined;
106
+ this._remoteVer = undefined;
107
+
108
+ this._protocol = undefined;
109
+ this._sock = undefined;
110
+ this._resetKA = undefined;
111
+ }
112
+
113
+ connect(cfg) {
114
+ if (this._sock && isWritable(this._sock)) {
115
+ this.once('close', () => {
116
+ this.connect(cfg);
117
+ });
118
+ this.end();
119
+ return this;
120
+ }
121
+
122
+ this.config.host = cfg.hostname || cfg.host || 'localhost';
123
+ this.config.port = cfg.port || 22;
124
+ this.config.localAddress = (typeof cfg.localAddress === 'string'
125
+ ? cfg.localAddress
126
+ : undefined);
127
+ this.config.localPort = (typeof cfg.localPort === 'string'
128
+ || typeof cfg.localPort === 'number'
129
+ ? cfg.localPort
130
+ : undefined);
131
+ this.config.forceIPv4 = cfg.forceIPv4 || false;
132
+ this.config.forceIPv6 = cfg.forceIPv6 || false;
133
+ this.config.keepaliveCountMax = (typeof cfg.keepaliveCountMax === 'number'
134
+ && cfg.keepaliveCountMax >= 0
135
+ ? cfg.keepaliveCountMax
136
+ : 3);
137
+ this.config.keepaliveInterval = (typeof cfg.keepaliveInterval === 'number'
138
+ && cfg.keepaliveInterval > 0
139
+ ? cfg.keepaliveInterval
140
+ : 0);
141
+ this.config.readyTimeout = (typeof cfg.readyTimeout === 'number'
142
+ && cfg.readyTimeout >= 0
143
+ ? cfg.readyTimeout
144
+ : 20000);
145
+ this.config.ident = (typeof cfg.ident === 'string'
146
+ || Buffer.isBuffer(cfg.ident)
147
+ ? cfg.ident
148
+ : undefined);
149
+
150
+ const algorithms = {
151
+ kex: undefined,
152
+ serverHostKey: undefined,
153
+ cs: {
154
+ cipher: undefined,
155
+ mac: undefined,
156
+ compress: undefined,
157
+ lang: [],
158
+ },
159
+ sc: undefined,
160
+ };
161
+ let allOfferDefaults = true;
162
+ if (typeof cfg.algorithms === 'object' && cfg.algorithms !== null) {
163
+ algorithms.kex = generateAlgorithmList(cfg.algorithms.kex,
164
+ DEFAULT_KEX,
165
+ SUPPORTED_KEX);
166
+ if (algorithms.kex !== DEFAULT_KEX)
167
+ allOfferDefaults = false;
168
+
169
+ algorithms.serverHostKey =
170
+ generateAlgorithmList(cfg.algorithms.serverHostKey,
171
+ DEFAULT_SERVER_HOST_KEY,
172
+ SUPPORTED_SERVER_HOST_KEY);
173
+ if (algorithms.serverHostKey !== DEFAULT_SERVER_HOST_KEY)
174
+ allOfferDefaults = false;
175
+
176
+ algorithms.cs.cipher = generateAlgorithmList(cfg.algorithms.cipher,
177
+ DEFAULT_CIPHER,
178
+ SUPPORTED_CIPHER);
179
+ if (algorithms.cs.cipher !== DEFAULT_CIPHER)
180
+ allOfferDefaults = false;
181
+
182
+ algorithms.cs.mac = generateAlgorithmList(cfg.algorithms.hmac,
183
+ DEFAULT_MAC,
184
+ SUPPORTED_MAC);
185
+ if (algorithms.cs.mac !== DEFAULT_MAC)
186
+ allOfferDefaults = false;
187
+
188
+ algorithms.cs.compress = generateAlgorithmList(cfg.algorithms.compress,
189
+ DEFAULT_COMPRESSION,
190
+ SUPPORTED_COMPRESSION);
191
+ if (algorithms.cs.compress !== DEFAULT_COMPRESSION)
192
+ allOfferDefaults = false;
193
+
194
+ if (!allOfferDefaults)
195
+ algorithms.sc = algorithms.cs;
196
+ }
197
+
198
+ if (typeof cfg.username === 'string')
199
+ this.config.username = cfg.username;
200
+ else if (typeof cfg.user === 'string')
201
+ this.config.username = cfg.user;
202
+ else
203
+ throw new Error('Invalid username');
204
+
205
+ this.config.password = (typeof cfg.password === 'string'
206
+ ? cfg.password
207
+ : undefined);
208
+ this.config.privateKey = (typeof cfg.privateKey === 'string'
209
+ || Buffer.isBuffer(cfg.privateKey)
210
+ ? cfg.privateKey
211
+ : undefined);
212
+ this.config.localHostname = (typeof cfg.localHostname === 'string'
213
+ ? cfg.localHostname
214
+ : undefined);
215
+ this.config.localUsername = (typeof cfg.localUsername === 'string'
216
+ ? cfg.localUsername
217
+ : undefined);
218
+ this.config.tryKeyboard = (cfg.tryKeyboard === true);
219
+ if (typeof cfg.agent === 'string' && cfg.agent.length)
220
+ this.config.agent = createAgent(cfg.agent);
221
+ else if (isAgent(cfg.agent))
222
+ this.config.agent = cfg.agent;
223
+ else
224
+ this.config.agent = undefined;
225
+ this.config.allowAgentFwd = (cfg.agentForward === true
226
+ && this.config.agent !== undefined);
227
+ let authHandler = this.config.authHandler = (
228
+ typeof cfg.authHandler === 'function'
229
+ || Array.isArray(cfg.authHandler)
230
+ ? cfg.authHandler
231
+ : undefined
232
+ );
233
+
234
+ this.config.strictVendor = (typeof cfg.strictVendor === 'boolean'
235
+ ? cfg.strictVendor
236
+ : true);
237
+
238
+ const debug = this.config.debug = (typeof cfg.debug === 'function'
239
+ ? cfg.debug
240
+ : undefined);
241
+
242
+ if (cfg.agentForward === true && !this.config.allowAgentFwd) {
243
+ throw new Error(
244
+ 'You must set a valid agent path to allow agent forwarding'
245
+ );
246
+ }
247
+
248
+ let callbacks = this._callbacks = [];
249
+ this._chanMgr = new ChannelManager(this);
250
+ this._forwarding = {};
251
+ this._forwardingUnix = {};
252
+ this._acceptX11 = 0;
253
+ this._agentFwdEnabled = false;
254
+ this._agent = (this.config.agent ? this.config.agent : undefined);
255
+ this._remoteVer = undefined;
256
+ let privateKey;
257
+
258
+ if (this.config.privateKey) {
259
+ privateKey = parseKey(this.config.privateKey, cfg.passphrase);
260
+ if (privateKey instanceof Error)
261
+ throw new Error(`Cannot parse privateKey: ${privateKey.message}`);
262
+ if (Array.isArray(privateKey)) {
263
+ // OpenSSH's newer format only stores 1 key for now
264
+ privateKey = privateKey[0];
265
+ }
266
+ if (privateKey.getPrivatePEM() === null) {
267
+ throw new Error(
268
+ 'privateKey value does not contain a (valid) private key'
269
+ );
270
+ }
271
+ }
272
+
273
+ let hostVerifier;
274
+ if (typeof cfg.hostVerifier === 'function') {
275
+ const hashCb = cfg.hostVerifier;
276
+ let hashAlgo;
277
+ if (HASHES.indexOf(cfg.hostHash) !== -1) {
278
+ // Default to old behavior of hashing on user's behalf
279
+ hashAlgo = cfg.hostHash;
280
+ }
281
+ hostVerifier = (key, verify) => {
282
+ if (hashAlgo)
283
+ key = createHash(hashAlgo).update(key).digest('hex');
284
+ const ret = hashCb(key, verify);
285
+ if (ret !== undefined)
286
+ verify(ret);
287
+ };
288
+ }
289
+
290
+ const sock = this._sock = (cfg.sock || new Socket());
291
+ let ready = false;
292
+ let sawHeader = false;
293
+ if (this._protocol)
294
+ this._protocol.cleanup();
295
+ const DEBUG_HANDLER = (!debug ? undefined : (p, display, msg) => {
296
+ debug(`Debug output from server: ${JSON.stringify(msg)}`);
297
+ });
298
+ let serverSigAlgs;
299
+ const proto = this._protocol = new Protocol({
300
+ ident: this.config.ident,
301
+ offer: (allOfferDefaults ? undefined : algorithms),
302
+ onWrite: (data) => {
303
+ if (isWritable(sock))
304
+ sock.write(data);
305
+ },
306
+ onError: (err) => {
307
+ if (err.level === 'handshake')
308
+ clearTimeout(this._readyTimeout);
309
+ if (!proto._destruct)
310
+ sock.removeAllListeners('data');
311
+ this.emit('error', err);
312
+ try {
313
+ sock.end();
314
+ } catch {}
315
+ },
316
+ onHeader: (header) => {
317
+ sawHeader = true;
318
+ this._remoteVer = header.versions.software;
319
+ if (header.greeting)
320
+ this.emit('greeting', header.greeting);
321
+ },
322
+ onHandshakeComplete: (negotiated) => {
323
+ this.emit('handshake', negotiated);
324
+ if (!ready) {
325
+ ready = true;
326
+ proto.service('ssh-userauth');
327
+ }
328
+ },
329
+ debug,
330
+ hostVerifier,
331
+ messageHandlers: {
332
+ DEBUG: DEBUG_HANDLER,
333
+ DISCONNECT: (p, reason, desc) => {
334
+ if (reason !== DISCONNECT_REASON.BY_APPLICATION) {
335
+ if (!desc) {
336
+ desc = DISCONNECT_REASON_BY_VALUE[reason];
337
+ if (desc === undefined)
338
+ desc = `Unexpected disconnection reason: ${reason}`;
339
+ }
340
+ const err = new Error(desc);
341
+ err.code = reason;
342
+ this.emit('error', err);
343
+ }
344
+ sock.end();
345
+ },
346
+ SERVICE_ACCEPT: (p, name) => {
347
+ if (name === 'ssh-userauth')
348
+ tryNextAuth();
349
+ },
350
+ EXT_INFO: (p, exts) => {
351
+ if (serverSigAlgs === undefined) {
352
+ for (const ext of exts) {
353
+ if (ext.name === 'server-sig-algs') {
354
+ serverSigAlgs = ext.algs;
355
+ return;
356
+ }
357
+ }
358
+ serverSigAlgs = null;
359
+ }
360
+ },
361
+ USERAUTH_BANNER: (p, msg) => {
362
+ this.emit('banner', msg);
363
+ },
364
+ USERAUTH_SUCCESS: (p) => {
365
+ // Start keepalive mechanism
366
+ resetKA();
367
+
368
+ clearTimeout(this._readyTimeout);
369
+
370
+ this.emit('ready');
371
+ },
372
+ USERAUTH_FAILURE: (p, authMethods, partialSuccess) => {
373
+ // For key-based authentication, check if we should retry the current
374
+ // key with a different algorithm first
375
+ if (curAuth.keyAlgos) {
376
+ const oldKeyAlgo = curAuth.keyAlgos[0][0];
377
+ if (debug)
378
+ debug(`Client: ${curAuth.type} (${oldKeyAlgo}) auth failed`);
379
+ curAuth.keyAlgos.shift();
380
+ if (curAuth.keyAlgos.length) {
381
+ const [keyAlgo, hashAlgo] = curAuth.keyAlgos[0];
382
+ switch (curAuth.type) {
383
+ case 'agent':
384
+ proto.authPK(
385
+ curAuth.username,
386
+ curAuth.agentCtx.currentKey(),
387
+ keyAlgo
388
+ );
389
+ return;
390
+ case 'publickey':
391
+ proto.authPK(curAuth.username, curAuth.key, keyAlgo);
392
+ return;
393
+ case 'hostbased':
394
+ proto.authHostbased(curAuth.username,
395
+ curAuth.key,
396
+ curAuth.localHostname,
397
+ curAuth.localUsername,
398
+ keyAlgo,
399
+ (buf, cb) => {
400
+ const signature = curAuth.key.sign(buf, hashAlgo);
401
+ if (signature instanceof Error) {
402
+ signature.message =
403
+ `Error while signing with key: ${signature.message}`;
404
+ signature.level = 'client-authentication';
405
+ this.emit('error', signature);
406
+ return tryNextAuth();
407
+ }
408
+
409
+ cb(signature);
410
+ });
411
+ return;
412
+ }
413
+ } else {
414
+ curAuth.keyAlgos = undefined;
415
+ }
416
+ }
417
+
418
+ if (curAuth.type === 'agent') {
419
+ const pos = curAuth.agentCtx.pos();
420
+ debug && debug(`Client: Agent key #${pos + 1} failed`);
421
+ return tryNextAgentKey();
422
+ }
423
+
424
+ debug && debug(`Client: ${curAuth.type} auth failed`);
425
+
426
+ curPartial = partialSuccess;
427
+ curAuthsLeft = authMethods;
428
+ tryNextAuth();
429
+ },
430
+ USERAUTH_PASSWD_CHANGEREQ: (p, prompt) => {
431
+ if (curAuth.type === 'password') {
432
+ // TODO: support a `changePrompt()` on `curAuth` that defaults to
433
+ // emitting 'change password' as before
434
+ this.emit('change password', prompt, (newPassword) => {
435
+ proto.authPassword(
436
+ this.config.username,
437
+ this.config.password,
438
+ newPassword
439
+ );
440
+ });
441
+ }
442
+ },
443
+ USERAUTH_PK_OK: (p) => {
444
+ let keyAlgo;
445
+ let hashAlgo;
446
+ if (curAuth.keyAlgos)
447
+ [keyAlgo, hashAlgo] = curAuth.keyAlgos[0];
448
+ if (curAuth.type === 'agent') {
449
+ const key = curAuth.agentCtx.currentKey();
450
+ proto.authPK(curAuth.username, key, keyAlgo, (buf, cb) => {
451
+ const opts = { hash: hashAlgo };
452
+ curAuth.agentCtx.sign(key, buf, opts, (err, signed) => {
453
+ if (err) {
454
+ err.level = 'agent';
455
+ this.emit('error', err);
456
+ } else {
457
+ return cb(signed);
458
+ }
459
+
460
+ tryNextAgentKey();
461
+ });
462
+ });
463
+ } else if (curAuth.type === 'publickey') {
464
+ proto.authPK(curAuth.username, curAuth.key, keyAlgo, (buf, cb) => {
465
+ const signature = curAuth.key.sign(buf, hashAlgo);
466
+ if (signature instanceof Error) {
467
+ signature.message =
468
+ `Error signing data with key: ${signature.message}`;
469
+ signature.level = 'client-authentication';
470
+ this.emit('error', signature);
471
+ return tryNextAuth();
472
+ }
473
+ cb(signature);
474
+ });
475
+ }
476
+ },
477
+ USERAUTH_INFO_REQUEST: (p, name, instructions, prompts) => {
478
+ if (curAuth.type === 'keyboard-interactive') {
479
+ const nprompts = (Array.isArray(prompts) ? prompts.length : 0);
480
+ if (nprompts === 0) {
481
+ debug && debug(
482
+ 'Client: Sending automatic USERAUTH_INFO_RESPONSE'
483
+ );
484
+ proto.authInfoRes();
485
+ return;
486
+ }
487
+ // We sent a keyboard-interactive user authentication request and
488
+ // now the server is sending us the prompts we need to present to
489
+ // the user
490
+ curAuth.prompt(
491
+ name,
492
+ instructions,
493
+ '',
494
+ prompts,
495
+ (answers) => {
496
+ proto.authInfoRes(answers);
497
+ }
498
+ );
499
+ }
500
+ },
501
+ REQUEST_SUCCESS: (p, data) => {
502
+ if (callbacks.length)
503
+ callbacks.shift()(false, data);
504
+ },
505
+ REQUEST_FAILURE: (p) => {
506
+ if (callbacks.length)
507
+ callbacks.shift()(true);
508
+ },
509
+ GLOBAL_REQUEST: (p, name, wantReply, data) => {
510
+ switch (name) {
511
+ case 'hostkeys-00@openssh.com':
512
+ // Automatically verify keys before passing to end user
513
+ hostKeysProve(this, data, (err, keys) => {
514
+ if (err)
515
+ return;
516
+ this.emit('hostkeys', keys);
517
+ });
518
+ if (wantReply)
519
+ proto.requestSuccess();
520
+ break;
521
+ default:
522
+ // Auto-reject all other global requests, this can be especially
523
+ // useful if the server is sending us dummy keepalive global
524
+ // requests
525
+ if (wantReply)
526
+ proto.requestFailure();
527
+ }
528
+ },
529
+ CHANNEL_OPEN: (p, info) => {
530
+ // Handle incoming requests from server, typically a forwarded TCP or
531
+ // X11 connection
532
+ onCHANNEL_OPEN(this, info);
533
+ },
534
+ CHANNEL_OPEN_CONFIRMATION: (p, info) => {
535
+ const channel = this._chanMgr.get(info.recipient);
536
+ if (typeof channel !== 'function')
537
+ return;
538
+
539
+ const isSFTP = (channel.type === 'sftp');
540
+ const type = (isSFTP ? 'session' : channel.type);
541
+ const chanInfo = {
542
+ type,
543
+ incoming: {
544
+ id: info.recipient,
545
+ window: MAX_WINDOW,
546
+ packetSize: PACKET_SIZE,
547
+ state: 'open'
548
+ },
549
+ outgoing: {
550
+ id: info.sender,
551
+ window: info.window,
552
+ packetSize: info.packetSize,
553
+ state: 'open'
554
+ }
555
+ };
556
+ const instance = (
557
+ isSFTP
558
+ ? new SFTP(this, chanInfo, { debug })
559
+ : new Channel(this, chanInfo)
560
+ );
561
+ this._chanMgr.update(info.recipient, instance);
562
+ channel(undefined, instance);
563
+ },
564
+ CHANNEL_OPEN_FAILURE: (p, recipient, reason, description) => {
565
+ const channel = this._chanMgr.get(recipient);
566
+ if (typeof channel !== 'function')
567
+ return;
568
+
569
+ const info = { reason, description };
570
+ onChannelOpenFailure(this, recipient, info, channel);
571
+ },
572
+ CHANNEL_DATA: (p, recipient, data) => {
573
+ const channel = this._chanMgr.get(recipient);
574
+ if (typeof channel !== 'object' || channel === null)
575
+ return;
576
+
577
+ // The remote party should not be sending us data if there is no
578
+ // window space available ...
579
+ // TODO: raise error on data with not enough window?
580
+ if (channel.incoming.window === 0)
581
+ return;
582
+
583
+ channel.incoming.window -= data.length;
584
+
585
+ if (channel.push(data) === false) {
586
+ channel._waitChanDrain = true;
587
+ return;
588
+ }
589
+
590
+ if (channel.incoming.window <= WINDOW_THRESHOLD)
591
+ windowAdjust(channel);
592
+ },
593
+ CHANNEL_EXTENDED_DATA: (p, recipient, data, type) => {
594
+ if (type !== STDERR)
595
+ return;
596
+
597
+ const channel = this._chanMgr.get(recipient);
598
+ if (typeof channel !== 'object' || channel === null)
599
+ return;
600
+
601
+ // The remote party should not be sending us data if there is no
602
+ // window space available ...
603
+ // TODO: raise error on data with not enough window?
604
+ if (channel.incoming.window === 0)
605
+ return;
606
+
607
+ channel.incoming.window -= data.length;
608
+
609
+ if (!channel.stderr.push(data)) {
610
+ channel._waitChanDrain = true;
611
+ return;
612
+ }
613
+
614
+ if (channel.incoming.window <= WINDOW_THRESHOLD)
615
+ windowAdjust(channel);
616
+ },
617
+ CHANNEL_WINDOW_ADJUST: (p, recipient, amount) => {
618
+ const channel = this._chanMgr.get(recipient);
619
+ if (typeof channel !== 'object' || channel === null)
620
+ return;
621
+
622
+ // The other side is allowing us to send `amount` more bytes of data
623
+ channel.outgoing.window += amount;
624
+
625
+ if (channel._waitWindow) {
626
+ channel._waitWindow = false;
627
+
628
+ if (channel._chunk) {
629
+ channel._write(channel._chunk, null, channel._chunkcb);
630
+ } else if (channel._chunkcb) {
631
+ channel._chunkcb();
632
+ } else if (channel._chunkErr) {
633
+ channel.stderr._write(channel._chunkErr,
634
+ null,
635
+ channel._chunkcbErr);
636
+ } else if (channel._chunkcbErr) {
637
+ channel._chunkcbErr();
638
+ }
639
+ }
640
+ },
641
+ CHANNEL_SUCCESS: (p, recipient) => {
642
+ const channel = this._chanMgr.get(recipient);
643
+ if (typeof channel !== 'object' || channel === null)
644
+ return;
645
+
646
+ this._resetKA();
647
+
648
+ if (channel._callbacks.length)
649
+ channel._callbacks.shift()(false);
650
+ },
651
+ CHANNEL_FAILURE: (p, recipient) => {
652
+ const channel = this._chanMgr.get(recipient);
653
+ if (typeof channel !== 'object' || channel === null)
654
+ return;
655
+
656
+ this._resetKA();
657
+
658
+ if (channel._callbacks.length)
659
+ channel._callbacks.shift()(true);
660
+ },
661
+ CHANNEL_REQUEST: (p, recipient, type, wantReply, data) => {
662
+ const channel = this._chanMgr.get(recipient);
663
+ if (typeof channel !== 'object' || channel === null)
664
+ return;
665
+
666
+ const exit = channel._exit;
667
+ if (exit.code !== undefined)
668
+ return;
669
+ switch (type) {
670
+ case 'exit-status':
671
+ channel.emit('exit', exit.code = data);
672
+ return;
673
+ case 'exit-signal':
674
+ channel.emit('exit',
675
+ exit.code = null,
676
+ exit.signal = `SIG${data.signal}`,
677
+ exit.dump = data.coreDumped,
678
+ exit.desc = data.errorMessage);
679
+ return;
680
+ }
681
+
682
+ // Keepalive request? OpenSSH will send one as a channel request if
683
+ // there is a channel open
684
+
685
+ if (wantReply)
686
+ p.channelFailure(channel.outgoing.id);
687
+ },
688
+ CHANNEL_EOF: (p, recipient) => {
689
+ const channel = this._chanMgr.get(recipient);
690
+ if (typeof channel !== 'object' || channel === null)
691
+ return;
692
+
693
+ if (channel.incoming.state !== 'open')
694
+ return;
695
+ channel.incoming.state = 'eof';
696
+
697
+ if (channel.readable)
698
+ channel.push(null);
699
+ if (channel.stderr.readable)
700
+ channel.stderr.push(null);
701
+ },
702
+ CHANNEL_CLOSE: (p, recipient) => {
703
+ onCHANNEL_CLOSE(this, recipient, this._chanMgr.get(recipient));
704
+ },
705
+ },
706
+ });
707
+
708
+ sock.pause();
709
+
710
+ // TODO: check keepalive implementation
711
+ // Keepalive-related
712
+ const kainterval = this.config.keepaliveInterval;
713
+ const kacountmax = this.config.keepaliveCountMax;
714
+ let kacount = 0;
715
+ let katimer;
716
+ const sendKA = () => {
717
+ if (++kacount > kacountmax) {
718
+ clearInterval(katimer);
719
+ if (sock.readable) {
720
+ const err = new Error('Keepalive timeout');
721
+ err.level = 'client-timeout';
722
+ this.emit('error', err);
723
+ sock.destroy();
724
+ }
725
+ return;
726
+ }
727
+ if (isWritable(sock)) {
728
+ // Append dummy callback to keep correct callback order
729
+ callbacks.push(resetKA);
730
+ proto.ping();
731
+ } else {
732
+ clearInterval(katimer);
733
+ }
734
+ };
735
+ function resetKA() {
736
+ if (kainterval > 0) {
737
+ kacount = 0;
738
+ clearInterval(katimer);
739
+ if (isWritable(sock))
740
+ katimer = setInterval(sendKA, kainterval);
741
+ }
742
+ }
743
+ this._resetKA = resetKA;
744
+
745
+ const onDone = (() => {
746
+ let called = false;
747
+ return () => {
748
+ if (called)
749
+ return;
750
+ called = true;
751
+ if (wasConnected && !sawHeader) {
752
+ const err =
753
+ makeError('Connection lost before handshake', 'protocol', true);
754
+ this.emit('error', err);
755
+ }
756
+ };
757
+ })();
758
+ const onConnect = (() => {
759
+ let called = false;
760
+ return () => {
761
+ if (called)
762
+ return;
763
+ called = true;
764
+
765
+ wasConnected = true;
766
+ debug && debug('Socket connected');
767
+ this.emit('connect');
768
+
769
+ cryptoInit.then(() => {
770
+ proto.start();
771
+ sock.on('data', (data) => {
772
+ try {
773
+ proto.parse(data, 0, data.length);
774
+ } catch (ex) {
775
+ this.emit('error', ex);
776
+ try {
777
+ if (isWritable(sock))
778
+ sock.end();
779
+ } catch {}
780
+ }
781
+ });
782
+
783
+ // Drain stderr if we are connection hopping using an exec stream
784
+ if (sock.stderr && typeof sock.stderr.resume === 'function')
785
+ sock.stderr.resume();
786
+
787
+ sock.resume();
788
+ }).catch((err) => {
789
+ this.emit('error', err);
790
+ try {
791
+ if (isWritable(sock))
792
+ sock.end();
793
+ } catch {}
794
+ });
795
+ };
796
+ })();
797
+ let wasConnected = false;
798
+ sock.on('connect', onConnect)
799
+ .on('timeout', () => {
800
+ this.emit('timeout');
801
+ }).on('error', (err) => {
802
+ debug && debug(`Socket error: ${err.message}`);
803
+ clearTimeout(this._readyTimeout);
804
+ err.level = 'client-socket';
805
+ this.emit('error', err);
806
+ }).on('end', () => {
807
+ debug && debug('Socket ended');
808
+ onDone();
809
+ proto.cleanup();
810
+ clearTimeout(this._readyTimeout);
811
+ clearInterval(katimer);
812
+ this.emit('end');
813
+ }).on('close', () => {
814
+ debug && debug('Socket closed');
815
+ onDone();
816
+ proto.cleanup();
817
+ clearTimeout(this._readyTimeout);
818
+ clearInterval(katimer);
819
+ this.emit('close');
820
+
821
+ // Notify outstanding channel requests of disconnection ...
822
+ const callbacks_ = callbacks;
823
+ callbacks = this._callbacks = [];
824
+ const err = new Error('No response from server');
825
+ for (let i = 0; i < callbacks_.length; ++i)
826
+ callbacks_[i](err);
827
+
828
+ // Simulate error for any channels waiting to be opened
829
+ this._chanMgr.cleanup(err);
830
+ });
831
+
832
+ // Begin authentication handling ===========================================
833
+ let curAuth;
834
+ let curPartial = null;
835
+ let curAuthsLeft = null;
836
+ const authsAllowed = ['none'];
837
+ if (this.config.password !== undefined)
838
+ authsAllowed.push('password');
839
+ if (privateKey !== undefined)
840
+ authsAllowed.push('publickey');
841
+ if (this._agent !== undefined)
842
+ authsAllowed.push('agent');
843
+ if (this.config.tryKeyboard)
844
+ authsAllowed.push('keyboard-interactive');
845
+ if (privateKey !== undefined
846
+ && this.config.localHostname !== undefined
847
+ && this.config.localUsername !== undefined) {
848
+ authsAllowed.push('hostbased');
849
+ }
850
+
851
+ if (Array.isArray(authHandler))
852
+ authHandler = makeSimpleAuthHandler(authHandler);
853
+ else if (typeof authHandler !== 'function')
854
+ authHandler = makeSimpleAuthHandler(authsAllowed);
855
+
856
+ let hasSentAuth = false;
857
+ const doNextAuth = (nextAuth) => {
858
+ if (hasSentAuth)
859
+ return;
860
+ hasSentAuth = true;
861
+
862
+ if (nextAuth === false) {
863
+ const err = new Error('All configured authentication methods failed');
864
+ err.level = 'client-authentication';
865
+ this.emit('error', err);
866
+ this.end();
867
+ return;
868
+ }
869
+
870
+ if (typeof nextAuth === 'string') {
871
+ // Remain backwards compatible with original `authHandler()` usage,
872
+ // which only supported passing names of next method to try using data
873
+ // from the `connect()` config object
874
+
875
+ const type = nextAuth;
876
+ if (authsAllowed.indexOf(type) === -1)
877
+ return skipAuth(`Authentication method not allowed: ${type}`);
878
+
879
+ const username = this.config.username;
880
+ switch (type) {
881
+ case 'password':
882
+ nextAuth = { type, username, password: this.config.password };
883
+ break;
884
+ case 'publickey':
885
+ nextAuth = { type, username, key: privateKey };
886
+ break;
887
+ case 'hostbased':
888
+ nextAuth = {
889
+ type,
890
+ username,
891
+ key: privateKey,
892
+ localHostname: this.config.localHostname,
893
+ localUsername: this.config.localUsername,
894
+ };
895
+ break;
896
+ case 'agent':
897
+ nextAuth = {
898
+ type,
899
+ username,
900
+ agentCtx: new AgentContext(this._agent),
901
+ };
902
+ break;
903
+ case 'keyboard-interactive':
904
+ nextAuth = {
905
+ type,
906
+ username,
907
+ prompt: (...args) => this.emit('keyboard-interactive', ...args),
908
+ };
909
+ break;
910
+ case 'none':
911
+ nextAuth = { type, username };
912
+ break;
913
+ default:
914
+ return skipAuth(
915
+ `Skipping unsupported authentication method: ${nextAuth}`
916
+ );
917
+ }
918
+ } else if (typeof nextAuth !== 'object' || nextAuth === null) {
919
+ return skipAuth(
920
+ `Skipping invalid authentication attempt: ${nextAuth}`
921
+ );
922
+ } else {
923
+ const username = nextAuth.username;
924
+ if (typeof username !== 'string') {
925
+ return skipAuth(
926
+ `Skipping invalid authentication attempt: ${nextAuth}`
927
+ );
928
+ }
929
+ const type = nextAuth.type;
930
+ switch (type) {
931
+ case 'password': {
932
+ const { password } = nextAuth;
933
+ if (typeof password !== 'string' && !Buffer.isBuffer(password))
934
+ return skipAuth('Skipping invalid password auth attempt');
935
+ nextAuth = { type, username, password };
936
+ break;
937
+ }
938
+ case 'publickey': {
939
+ const key = parseKey(nextAuth.key, nextAuth.passphrase);
940
+ if (key instanceof Error)
941
+ return skipAuth('Skipping invalid key auth attempt');
942
+ if (!key.isPrivateKey())
943
+ return skipAuth('Skipping non-private key');
944
+ nextAuth = { type, username, key };
945
+ break;
946
+ }
947
+ case 'hostbased': {
948
+ const { localHostname, localUsername } = nextAuth;
949
+ const key = parseKey(nextAuth.key, nextAuth.passphrase);
950
+ if (key instanceof Error
951
+ || typeof localHostname !== 'string'
952
+ || typeof localUsername !== 'string') {
953
+ return skipAuth('Skipping invalid hostbased auth attempt');
954
+ }
955
+ if (!key.isPrivateKey())
956
+ return skipAuth('Skipping non-private key');
957
+ nextAuth = { type, username, key, localHostname, localUsername };
958
+ break;
959
+ }
960
+ case 'agent': {
961
+ let agent = nextAuth.agent;
962
+ if (typeof agent === 'string' && agent.length) {
963
+ agent = createAgent(agent);
964
+ } else if (!isAgent(agent)) {
965
+ return skipAuth(
966
+ `Skipping invalid agent: ${nextAuth.agent}`
967
+ );
968
+ }
969
+ nextAuth = { type, username, agentCtx: new AgentContext(agent) };
970
+ break;
971
+ }
972
+ case 'keyboard-interactive': {
973
+ const { prompt } = nextAuth;
974
+ if (typeof prompt !== 'function') {
975
+ return skipAuth(
976
+ 'Skipping invalid keyboard-interactive auth attempt'
977
+ );
978
+ }
979
+ nextAuth = { type, username, prompt };
980
+ break;
981
+ }
982
+ case 'none':
983
+ nextAuth = { type, username };
984
+ break;
985
+ default:
986
+ return skipAuth(
987
+ `Skipping unsupported authentication method: ${nextAuth}`
988
+ );
989
+ }
990
+ }
991
+ curAuth = nextAuth;
992
+
993
+ // Begin authentication method's process
994
+ try {
995
+ const username = curAuth.username;
996
+ switch (curAuth.type) {
997
+ case 'password':
998
+ proto.authPassword(username, curAuth.password);
999
+ break;
1000
+ case 'publickey': {
1001
+ let keyAlgo;
1002
+ curAuth.keyAlgos = getKeyAlgos(this, curAuth.key, serverSigAlgs);
1003
+ if (curAuth.keyAlgos) {
1004
+ if (curAuth.keyAlgos.length) {
1005
+ keyAlgo = curAuth.keyAlgos[0][0];
1006
+ } else {
1007
+ return skipAuth(
1008
+ 'Skipping key authentication (no mutual hash algorithm)'
1009
+ );
1010
+ }
1011
+ }
1012
+ proto.authPK(username, curAuth.key, keyAlgo);
1013
+ break;
1014
+ }
1015
+ case 'hostbased': {
1016
+ let keyAlgo;
1017
+ let hashAlgo;
1018
+ curAuth.keyAlgos = getKeyAlgos(this, curAuth.key, serverSigAlgs);
1019
+ if (curAuth.keyAlgos) {
1020
+ if (curAuth.keyAlgos.length) {
1021
+ [keyAlgo, hashAlgo] = curAuth.keyAlgos[0];
1022
+ } else {
1023
+ return skipAuth(
1024
+ 'Skipping hostbased authentication (no mutual hash algorithm)'
1025
+ );
1026
+ }
1027
+ }
1028
+
1029
+ proto.authHostbased(username,
1030
+ curAuth.key,
1031
+ curAuth.localHostname,
1032
+ curAuth.localUsername,
1033
+ keyAlgo,
1034
+ (buf, cb) => {
1035
+ const signature = curAuth.key.sign(buf, hashAlgo);
1036
+ if (signature instanceof Error) {
1037
+ signature.message =
1038
+ `Error while signing with key: ${signature.message}`;
1039
+ signature.level = 'client-authentication';
1040
+ this.emit('error', signature);
1041
+ return tryNextAuth();
1042
+ }
1043
+
1044
+ cb(signature);
1045
+ });
1046
+ break;
1047
+ }
1048
+ case 'agent':
1049
+ curAuth.agentCtx.init((err) => {
1050
+ if (err) {
1051
+ err.level = 'agent';
1052
+ this.emit('error', err);
1053
+ return tryNextAuth();
1054
+ }
1055
+ tryNextAgentKey();
1056
+ });
1057
+ break;
1058
+ case 'keyboard-interactive':
1059
+ proto.authKeyboard(username);
1060
+ break;
1061
+ case 'none':
1062
+ proto.authNone(username);
1063
+ break;
1064
+ }
1065
+ } finally {
1066
+ hasSentAuth = false;
1067
+ }
1068
+ };
1069
+
1070
+ function skipAuth(msg) {
1071
+ debug && debug(msg);
1072
+ process.nextTick(tryNextAuth);
1073
+ }
1074
+
1075
+ function tryNextAuth() {
1076
+ hasSentAuth = false;
1077
+ const auth = authHandler(curAuthsLeft, curPartial, doNextAuth);
1078
+ if (hasSentAuth || auth === undefined)
1079
+ return;
1080
+ doNextAuth(auth);
1081
+ }
1082
+
1083
+ const tryNextAgentKey = () => {
1084
+ if (curAuth.type === 'agent') {
1085
+ const key = curAuth.agentCtx.nextKey();
1086
+ if (key === false) {
1087
+ debug && debug('Agent: No more keys left to try');
1088
+ debug && debug('Client: agent auth failed');
1089
+ tryNextAuth();
1090
+ } else {
1091
+ const pos = curAuth.agentCtx.pos();
1092
+ let keyAlgo;
1093
+ curAuth.keyAlgos = getKeyAlgos(this, key, serverSigAlgs);
1094
+ if (curAuth.keyAlgos) {
1095
+ if (curAuth.keyAlgos.length) {
1096
+ keyAlgo = curAuth.keyAlgos[0][0];
1097
+ } else {
1098
+ debug && debug(
1099
+ `Agent: Skipping key #${pos + 1} (no mutual hash algorithm)`
1100
+ );
1101
+ tryNextAgentKey();
1102
+ return;
1103
+ }
1104
+ }
1105
+ debug && debug(`Agent: Trying key #${pos + 1}`);
1106
+ proto.authPK(curAuth.username, key, keyAlgo);
1107
+ }
1108
+ }
1109
+ };
1110
+
1111
+ const startTimeout = () => {
1112
+ if (this.config.readyTimeout > 0) {
1113
+ this._readyTimeout = setTimeout(() => {
1114
+ const err = new Error('Timed out while waiting for handshake');
1115
+ err.level = 'client-timeout';
1116
+ this.emit('error', err);
1117
+ sock.destroy();
1118
+ }, this.config.readyTimeout);
1119
+ }
1120
+ };
1121
+
1122
+ if (!cfg.sock) {
1123
+ let host = this.config.host;
1124
+ const forceIPv4 = this.config.forceIPv4;
1125
+ const forceIPv6 = this.config.forceIPv6;
1126
+
1127
+ debug && debug(`Client: Trying ${host} on port ${this.config.port} ...`);
1128
+
1129
+ const doConnect = () => {
1130
+ startTimeout();
1131
+ sock.connect({
1132
+ host,
1133
+ port: this.config.port,
1134
+ localAddress: this.config.localAddress,
1135
+ localPort: this.config.localPort
1136
+ });
1137
+ sock.setMaxListeners(0);
1138
+ sock.setTimeout(typeof cfg.timeout === 'number' ? cfg.timeout : 0);
1139
+ };
1140
+
1141
+ if ((!forceIPv4 && !forceIPv6) || (forceIPv4 && forceIPv6)) {
1142
+ doConnect();
1143
+ } else {
1144
+ dnsLookup(host, (forceIPv4 ? 4 : 6), (err, address, family) => {
1145
+ if (err) {
1146
+ const type = (forceIPv4 ? 'IPv4' : 'IPv6');
1147
+ const error = new Error(
1148
+ `Error while looking up ${type} address for '${host}': ${err}`
1149
+ );
1150
+ clearTimeout(this._readyTimeout);
1151
+ error.level = 'client-dns';
1152
+ this.emit('error', error);
1153
+ this.emit('close');
1154
+ return;
1155
+ }
1156
+ host = address;
1157
+ doConnect();
1158
+ });
1159
+ }
1160
+ } else {
1161
+ // Custom socket passed in
1162
+ startTimeout();
1163
+ if (typeof sock.connecting === 'boolean') {
1164
+ // net.Socket
1165
+
1166
+ if (!sock.connecting) {
1167
+ // Already connected
1168
+ onConnect();
1169
+ }
1170
+ } else {
1171
+ // Assume socket/stream is already "connected"
1172
+ onConnect();
1173
+ }
1174
+ }
1175
+
1176
+ return this;
1177
+ }
1178
+
1179
+ end() {
1180
+ if (this._sock && isWritable(this._sock)) {
1181
+ this._protocol.disconnect(DISCONNECT_REASON.BY_APPLICATION);
1182
+ this._sock.end();
1183
+ }
1184
+ return this;
1185
+ }
1186
+
1187
+ destroy() {
1188
+ this._sock && isWritable(this._sock) && this._sock.destroy();
1189
+ return this;
1190
+ }
1191
+
1192
+ exec(cmd, opts, cb) {
1193
+ if (!this._sock || !isWritable(this._sock))
1194
+ throw new Error('Not connected');
1195
+
1196
+ if (typeof opts === 'function') {
1197
+ cb = opts;
1198
+ opts = {};
1199
+ }
1200
+
1201
+ const extraOpts = { allowHalfOpen: (opts.allowHalfOpen !== false) };
1202
+
1203
+ openChannel(this, 'session', extraOpts, (err, chan) => {
1204
+ if (err) {
1205
+ cb(err);
1206
+ return;
1207
+ }
1208
+
1209
+ const todo = [];
1210
+
1211
+ function reqCb(err) {
1212
+ if (err) {
1213
+ chan.close();
1214
+ cb(err);
1215
+ return;
1216
+ }
1217
+ if (todo.length)
1218
+ todo.shift()();
1219
+ }
1220
+
1221
+ if (this.config.allowAgentFwd === true
1222
+ || (opts
1223
+ && opts.agentForward === true
1224
+ && this._agent !== undefined)) {
1225
+ todo.push(() => reqAgentFwd(chan, reqCb));
1226
+ }
1227
+
1228
+ if (typeof opts === 'object' && opts !== null) {
1229
+ if (typeof opts.env === 'object' && opts.env !== null)
1230
+ reqEnv(chan, opts.env);
1231
+ if ((typeof opts.pty === 'object' && opts.pty !== null)
1232
+ || opts.pty === true) {
1233
+ todo.push(() => reqPty(chan, opts.pty, reqCb));
1234
+ }
1235
+ if ((typeof opts.x11 === 'object' && opts.x11 !== null)
1236
+ || opts.x11 === 'number'
1237
+ || opts.x11 === true) {
1238
+ todo.push(() => reqX11(chan, opts.x11, reqCb));
1239
+ }
1240
+ }
1241
+
1242
+ todo.push(() => reqExec(chan, cmd, opts, cb));
1243
+ todo.shift()();
1244
+ });
1245
+
1246
+ return this;
1247
+ }
1248
+
1249
+ shell(wndopts, opts, cb) {
1250
+ if (!this._sock || !isWritable(this._sock))
1251
+ throw new Error('Not connected');
1252
+
1253
+ if (typeof wndopts === 'function') {
1254
+ cb = wndopts;
1255
+ wndopts = opts = undefined;
1256
+ } else if (typeof opts === 'function') {
1257
+ cb = opts;
1258
+ opts = undefined;
1259
+ }
1260
+ if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) {
1261
+ opts = wndopts;
1262
+ wndopts = undefined;
1263
+ }
1264
+
1265
+ openChannel(this, 'session', (err, chan) => {
1266
+ if (err) {
1267
+ cb(err);
1268
+ return;
1269
+ }
1270
+
1271
+ const todo = [];
1272
+
1273
+ function reqCb(err) {
1274
+ if (err) {
1275
+ chan.close();
1276
+ cb(err);
1277
+ return;
1278
+ }
1279
+ if (todo.length)
1280
+ todo.shift()();
1281
+ }
1282
+
1283
+ if (this.config.allowAgentFwd === true
1284
+ || (opts
1285
+ && opts.agentForward === true
1286
+ && this._agent !== undefined)) {
1287
+ todo.push(() => reqAgentFwd(chan, reqCb));
1288
+ }
1289
+
1290
+ if (wndopts !== false)
1291
+ todo.push(() => reqPty(chan, wndopts, reqCb));
1292
+
1293
+ if (typeof opts === 'object' && opts !== null) {
1294
+ if (typeof opts.env === 'object' && opts.env !== null)
1295
+ reqEnv(chan, opts.env);
1296
+ if ((typeof opts.x11 === 'object' && opts.x11 !== null)
1297
+ || opts.x11 === 'number'
1298
+ || opts.x11 === true) {
1299
+ todo.push(() => reqX11(chan, opts.x11, reqCb));
1300
+ }
1301
+ }
1302
+
1303
+ todo.push(() => reqShell(chan, cb));
1304
+ todo.shift()();
1305
+ });
1306
+
1307
+ return this;
1308
+ }
1309
+
1310
+ subsys(name, cb) {
1311
+ if (!this._sock || !isWritable(this._sock))
1312
+ throw new Error('Not connected');
1313
+
1314
+ openChannel(this, 'session', (err, chan) => {
1315
+ if (err) {
1316
+ cb(err);
1317
+ return;
1318
+ }
1319
+
1320
+ reqSubsystem(chan, name, (err, stream) => {
1321
+ if (err) {
1322
+ cb(err);
1323
+ return;
1324
+ }
1325
+
1326
+ cb(undefined, stream);
1327
+ });
1328
+ });
1329
+
1330
+ return this;
1331
+ }
1332
+
1333
+ forwardIn(bindAddr, bindPort, cb) {
1334
+ if (!this._sock || !isWritable(this._sock))
1335
+ throw new Error('Not connected');
1336
+
1337
+ // Send a request for the server to start forwarding TCP connections to us
1338
+ // on a particular address and port
1339
+
1340
+ const wantReply = (typeof cb === 'function');
1341
+
1342
+ if (wantReply) {
1343
+ this._callbacks.push((had_err, data) => {
1344
+ if (had_err) {
1345
+ cb(had_err !== true
1346
+ ? had_err
1347
+ : new Error(`Unable to bind to ${bindAddr}:${bindPort}`));
1348
+ return;
1349
+ }
1350
+
1351
+ let realPort = bindPort;
1352
+ if (bindPort === 0 && data && data.length >= 4) {
1353
+ realPort = readUInt32BE(data, 0);
1354
+ if (!(this._protocol._compatFlags & COMPAT.DYN_RPORT_BUG))
1355
+ bindPort = realPort;
1356
+ }
1357
+
1358
+ this._forwarding[`${bindAddr}:${bindPort}`] = realPort;
1359
+
1360
+ cb(undefined, realPort);
1361
+ });
1362
+ }
1363
+
1364
+ this._protocol.tcpipForward(bindAddr, bindPort, wantReply);
1365
+
1366
+ return this;
1367
+ }
1368
+
1369
+ unforwardIn(bindAddr, bindPort, cb) {
1370
+ if (!this._sock || !isWritable(this._sock))
1371
+ throw new Error('Not connected');
1372
+
1373
+ // Send a request to stop forwarding us new connections for a particular
1374
+ // address and port
1375
+
1376
+ const wantReply = (typeof cb === 'function');
1377
+
1378
+ if (wantReply) {
1379
+ this._callbacks.push((had_err) => {
1380
+ if (had_err) {
1381
+ cb(had_err !== true
1382
+ ? had_err
1383
+ : new Error(`Unable to unbind from ${bindAddr}:${bindPort}`));
1384
+ return;
1385
+ }
1386
+
1387
+ delete this._forwarding[`${bindAddr}:${bindPort}`];
1388
+
1389
+ cb();
1390
+ });
1391
+ }
1392
+
1393
+ this._protocol.cancelTcpipForward(bindAddr, bindPort, wantReply);
1394
+
1395
+ return this;
1396
+ }
1397
+
1398
+ forwardOut(srcIP, srcPort, dstIP, dstPort, cb) {
1399
+ if (!this._sock || !isWritable(this._sock))
1400
+ throw new Error('Not connected');
1401
+
1402
+ // Send a request to forward a TCP connection to the server
1403
+
1404
+ const cfg = {
1405
+ srcIP: srcIP,
1406
+ srcPort: srcPort,
1407
+ dstIP: dstIP,
1408
+ dstPort: dstPort
1409
+ };
1410
+
1411
+ if (typeof cb !== 'function')
1412
+ cb = noop;
1413
+
1414
+ openChannel(this, 'direct-tcpip', cfg, cb);
1415
+
1416
+ return this;
1417
+ }
1418
+
1419
+ openssh_noMoreSessions(cb) {
1420
+ if (!this._sock || !isWritable(this._sock))
1421
+ throw new Error('Not connected');
1422
+
1423
+ const wantReply = (typeof cb === 'function');
1424
+
1425
+ if (!this.config.strictVendor
1426
+ || (this.config.strictVendor && RE_OPENSSH.test(this._remoteVer))) {
1427
+ if (wantReply) {
1428
+ this._callbacks.push((had_err) => {
1429
+ if (had_err) {
1430
+ cb(had_err !== true
1431
+ ? had_err
1432
+ : new Error('Unable to disable future sessions'));
1433
+ return;
1434
+ }
1435
+
1436
+ cb();
1437
+ });
1438
+ }
1439
+
1440
+ this._protocol.openssh_noMoreSessions(wantReply);
1441
+ return this;
1442
+ }
1443
+
1444
+ if (!wantReply)
1445
+ return this;
1446
+
1447
+ process.nextTick(
1448
+ cb,
1449
+ new Error(
1450
+ 'strictVendor enabled and server is not OpenSSH or compatible version'
1451
+ )
1452
+ );
1453
+
1454
+ return this;
1455
+ }
1456
+
1457
+ openssh_forwardInStreamLocal(socketPath, cb) {
1458
+ if (!this._sock || !isWritable(this._sock))
1459
+ throw new Error('Not connected');
1460
+
1461
+ const wantReply = (typeof cb === 'function');
1462
+
1463
+ if (!this.config.strictVendor
1464
+ || (this.config.strictVendor && RE_OPENSSH.test(this._remoteVer))) {
1465
+ if (wantReply) {
1466
+ this._callbacks.push((had_err) => {
1467
+ if (had_err) {
1468
+ cb(had_err !== true
1469
+ ? had_err
1470
+ : new Error(`Unable to bind to ${socketPath}`));
1471
+ return;
1472
+ }
1473
+ this._forwardingUnix[socketPath] = true;
1474
+ cb();
1475
+ });
1476
+ }
1477
+
1478
+ this._protocol.openssh_streamLocalForward(socketPath, wantReply);
1479
+ return this;
1480
+ }
1481
+
1482
+ if (!wantReply)
1483
+ return this;
1484
+
1485
+ process.nextTick(
1486
+ cb,
1487
+ new Error(
1488
+ 'strictVendor enabled and server is not OpenSSH or compatible version'
1489
+ )
1490
+ );
1491
+
1492
+ return this;
1493
+ }
1494
+
1495
+ openssh_unforwardInStreamLocal(socketPath, cb) {
1496
+ if (!this._sock || !isWritable(this._sock))
1497
+ throw new Error('Not connected');
1498
+
1499
+ const wantReply = (typeof cb === 'function');
1500
+
1501
+ if (!this.config.strictVendor
1502
+ || (this.config.strictVendor && RE_OPENSSH.test(this._remoteVer))) {
1503
+ if (wantReply) {
1504
+ this._callbacks.push((had_err) => {
1505
+ if (had_err) {
1506
+ cb(had_err !== true
1507
+ ? had_err
1508
+ : new Error(`Unable to unbind from ${socketPath}`));
1509
+ return;
1510
+ }
1511
+ delete this._forwardingUnix[socketPath];
1512
+ cb();
1513
+ });
1514
+ }
1515
+
1516
+ this._protocol.openssh_cancelStreamLocalForward(socketPath, wantReply);
1517
+ return this;
1518
+ }
1519
+
1520
+ if (!wantReply)
1521
+ return this;
1522
+
1523
+ process.nextTick(
1524
+ cb,
1525
+ new Error(
1526
+ 'strictVendor enabled and server is not OpenSSH or compatible version'
1527
+ )
1528
+ );
1529
+
1530
+ return this;
1531
+ }
1532
+
1533
+ openssh_forwardOutStreamLocal(socketPath, cb) {
1534
+ if (!this._sock || !isWritable(this._sock))
1535
+ throw new Error('Not connected');
1536
+
1537
+ if (typeof cb !== 'function')
1538
+ cb = noop;
1539
+
1540
+ if (!this.config.strictVendor
1541
+ || (this.config.strictVendor && RE_OPENSSH.test(this._remoteVer))) {
1542
+ openChannel(this, 'direct-streamlocal@openssh.com', { socketPath }, cb);
1543
+ return this;
1544
+ }
1545
+ process.nextTick(
1546
+ cb,
1547
+ new Error(
1548
+ 'strictVendor enabled and server is not OpenSSH or compatible version'
1549
+ )
1550
+ );
1551
+
1552
+ return this;
1553
+ }
1554
+
1555
+ sftp(env, cb) {
1556
+ if (!this._sock || !isWritable(this._sock))
1557
+ throw new Error('Not connected');
1558
+
1559
+ if (typeof env === 'function') {
1560
+ cb = env;
1561
+ env = undefined;
1562
+ }
1563
+
1564
+ openChannel(this, 'sftp', (err, sftp) => {
1565
+ if (err) {
1566
+ cb(err);
1567
+ return;
1568
+ }
1569
+
1570
+ const reqSubsystemCb = (err, sftp_) => {
1571
+ if (err) {
1572
+ cb(err);
1573
+ return;
1574
+ }
1575
+
1576
+ function removeListeners() {
1577
+ sftp.removeListener('ready', onReady);
1578
+ sftp.removeListener('error', onError);
1579
+ sftp.removeListener('exit', onExit);
1580
+ sftp.removeListener('close', onExit);
1581
+ }
1582
+
1583
+ function onReady() {
1584
+ // TODO: do not remove exit/close in case remote end closes the
1585
+ // channel abruptly and we need to notify outstanding callbacks
1586
+ removeListeners();
1587
+ cb(undefined, sftp);
1588
+ }
1589
+
1590
+ function onError(err) {
1591
+ removeListeners();
1592
+ cb(err);
1593
+ }
1594
+
1595
+ function onExit(code, signal) {
1596
+ removeListeners();
1597
+ let msg;
1598
+ if (typeof code === 'number')
1599
+ msg = `Received exit code ${code} while establishing SFTP session`;
1600
+ else if (signal !== undefined)
1601
+ msg = `Received signal ${signal} while establishing SFTP session`;
1602
+ else
1603
+ msg = 'Received unexpected SFTP session termination';
1604
+ const err = new Error(msg);
1605
+ err.code = code;
1606
+ err.signal = signal;
1607
+ cb(err);
1608
+ }
1609
+
1610
+ sftp.on('ready', onReady)
1611
+ .on('error', onError)
1612
+ .on('exit', onExit)
1613
+ .on('close', onExit);
1614
+
1615
+ sftp._init();
1616
+ };
1617
+
1618
+ if (typeof env === 'object' && env !== null) {
1619
+ reqEnv(sftp, env, (err) => {
1620
+ if (err) {
1621
+ cb(err);
1622
+ return;
1623
+ }
1624
+
1625
+ reqSubsystem(sftp, 'sftp', reqSubsystemCb);
1626
+ });
1627
+ } else {
1628
+ reqSubsystem(sftp, 'sftp', reqSubsystemCb);
1629
+ }
1630
+ });
1631
+
1632
+ return this;
1633
+ }
1634
+
1635
+ setNoDelay(noDelay) {
1636
+ if (this._sock && typeof this._sock.setNoDelay === 'function')
1637
+ this._sock.setNoDelay(noDelay);
1638
+
1639
+ return this;
1640
+ }
1641
+ }
1642
+
1643
+ function openChannel(self, type, opts, cb) {
1644
+ // Ask the server to open a channel for some purpose
1645
+ // (e.g. session (sftp, exec, shell), or forwarding a TCP connection
1646
+ const initWindow = MAX_WINDOW;
1647
+ const maxPacket = PACKET_SIZE;
1648
+
1649
+ if (typeof opts === 'function') {
1650
+ cb = opts;
1651
+ opts = {};
1652
+ }
1653
+
1654
+ const wrapper = (err, stream) => {
1655
+ cb(err, stream);
1656
+ };
1657
+ wrapper.type = type;
1658
+
1659
+ const localChan = self._chanMgr.add(wrapper);
1660
+
1661
+ if (localChan === -1) {
1662
+ cb(new Error('No free channels available'));
1663
+ return;
1664
+ }
1665
+
1666
+ switch (type) {
1667
+ case 'session':
1668
+ case 'sftp':
1669
+ self._protocol.session(localChan, initWindow, maxPacket);
1670
+ break;
1671
+ case 'direct-tcpip':
1672
+ self._protocol.directTcpip(localChan, initWindow, maxPacket, opts);
1673
+ break;
1674
+ case 'direct-streamlocal@openssh.com':
1675
+ self._protocol.openssh_directStreamLocal(
1676
+ localChan, initWindow, maxPacket, opts
1677
+ );
1678
+ break;
1679
+ default:
1680
+ throw new Error(`Unsupported channel type: ${type}`);
1681
+ }
1682
+ }
1683
+
1684
+ function reqX11(chan, screen, cb) {
1685
+ // Asks server to start sending us X11 connections
1686
+ const cfg = {
1687
+ single: false,
1688
+ protocol: 'MIT-MAGIC-COOKIE-1',
1689
+ cookie: undefined,
1690
+ screen: 0
1691
+ };
1692
+
1693
+ if (typeof screen === 'function') {
1694
+ cb = screen;
1695
+ } else if (typeof screen === 'object' && screen !== null) {
1696
+ if (typeof screen.single === 'boolean')
1697
+ cfg.single = screen.single;
1698
+ if (typeof screen.screen === 'number')
1699
+ cfg.screen = screen.screen;
1700
+ if (typeof screen.protocol === 'string')
1701
+ cfg.protocol = screen.protocol;
1702
+ if (typeof screen.cookie === 'string')
1703
+ cfg.cookie = screen.cookie;
1704
+ else if (Buffer.isBuffer(screen.cookie))
1705
+ cfg.cookie = screen.cookie.hexSlice(0, screen.cookie.length);
1706
+ }
1707
+ if (cfg.cookie === undefined)
1708
+ cfg.cookie = randomCookie();
1709
+
1710
+ const wantReply = (typeof cb === 'function');
1711
+
1712
+ if (chan.outgoing.state !== 'open') {
1713
+ if (wantReply)
1714
+ cb(new Error('Channel is not open'));
1715
+ return;
1716
+ }
1717
+
1718
+ if (wantReply) {
1719
+ chan._callbacks.push((had_err) => {
1720
+ if (had_err) {
1721
+ cb(had_err !== true ? had_err : new Error('Unable to request X11'));
1722
+ return;
1723
+ }
1724
+
1725
+ chan._hasX11 = true;
1726
+ ++chan._client._acceptX11;
1727
+ chan.once('close', () => {
1728
+ if (chan._client._acceptX11)
1729
+ --chan._client._acceptX11;
1730
+ });
1731
+
1732
+ cb();
1733
+ });
1734
+ }
1735
+
1736
+ chan._client._protocol.x11Forward(chan.outgoing.id, cfg, wantReply);
1737
+ }
1738
+
1739
+ function reqPty(chan, opts, cb) {
1740
+ let rows = 24;
1741
+ let cols = 80;
1742
+ let width = 640;
1743
+ let height = 480;
1744
+ let term = 'vt100';
1745
+ let modes = null;
1746
+
1747
+ if (typeof opts === 'function') {
1748
+ cb = opts;
1749
+ } else if (typeof opts === 'object' && opts !== null) {
1750
+ if (typeof opts.rows === 'number')
1751
+ rows = opts.rows;
1752
+ if (typeof opts.cols === 'number')
1753
+ cols = opts.cols;
1754
+ if (typeof opts.width === 'number')
1755
+ width = opts.width;
1756
+ if (typeof opts.height === 'number')
1757
+ height = opts.height;
1758
+ if (typeof opts.term === 'string')
1759
+ term = opts.term;
1760
+ if (typeof opts.modes === 'object')
1761
+ modes = opts.modes;
1762
+ }
1763
+
1764
+ const wantReply = (typeof cb === 'function');
1765
+
1766
+ if (chan.outgoing.state !== 'open') {
1767
+ if (wantReply)
1768
+ cb(new Error('Channel is not open'));
1769
+ return;
1770
+ }
1771
+
1772
+ if (wantReply) {
1773
+ chan._callbacks.push((had_err) => {
1774
+ if (had_err) {
1775
+ cb(had_err !== true
1776
+ ? had_err
1777
+ : new Error('Unable to request a pseudo-terminal'));
1778
+ return;
1779
+ }
1780
+ cb();
1781
+ });
1782
+ }
1783
+
1784
+ chan._client._protocol.pty(chan.outgoing.id,
1785
+ rows,
1786
+ cols,
1787
+ height,
1788
+ width,
1789
+ term,
1790
+ modes,
1791
+ wantReply);
1792
+ }
1793
+
1794
+ function reqAgentFwd(chan, cb) {
1795
+ const wantReply = (typeof cb === 'function');
1796
+
1797
+ if (chan.outgoing.state !== 'open') {
1798
+ wantReply && cb(new Error('Channel is not open'));
1799
+ return;
1800
+ }
1801
+ if (chan._client._agentFwdEnabled) {
1802
+ wantReply && cb(false);
1803
+ return;
1804
+ }
1805
+
1806
+ chan._client._agentFwdEnabled = true;
1807
+
1808
+ chan._callbacks.push((had_err) => {
1809
+ if (had_err) {
1810
+ chan._client._agentFwdEnabled = false;
1811
+ if (wantReply) {
1812
+ cb(had_err !== true
1813
+ ? had_err
1814
+ : new Error('Unable to request agent forwarding'));
1815
+ }
1816
+ return;
1817
+ }
1818
+
1819
+ if (wantReply)
1820
+ cb();
1821
+ });
1822
+
1823
+ chan._client._protocol.openssh_agentForward(chan.outgoing.id, true);
1824
+ }
1825
+
1826
+ function reqShell(chan, cb) {
1827
+ if (chan.outgoing.state !== 'open') {
1828
+ cb(new Error('Channel is not open'));
1829
+ return;
1830
+ }
1831
+
1832
+ chan._callbacks.push((had_err) => {
1833
+ if (had_err) {
1834
+ cb(had_err !== true ? had_err : new Error('Unable to open shell'));
1835
+ return;
1836
+ }
1837
+ chan.subtype = 'shell';
1838
+ cb(undefined, chan);
1839
+ });
1840
+
1841
+ chan._client._protocol.shell(chan.outgoing.id, true);
1842
+ }
1843
+
1844
+ function reqExec(chan, cmd, opts, cb) {
1845
+ if (chan.outgoing.state !== 'open') {
1846
+ cb(new Error('Channel is not open'));
1847
+ return;
1848
+ }
1849
+
1850
+ chan._callbacks.push((had_err) => {
1851
+ if (had_err) {
1852
+ cb(had_err !== true ? had_err : new Error('Unable to exec'));
1853
+ return;
1854
+ }
1855
+ chan.subtype = 'exec';
1856
+ chan.allowHalfOpen = (opts.allowHalfOpen !== false);
1857
+ cb(undefined, chan);
1858
+ });
1859
+
1860
+ chan._client._protocol.exec(chan.outgoing.id, cmd, true);
1861
+ }
1862
+
1863
+ function reqEnv(chan, env, cb) {
1864
+ const wantReply = (typeof cb === 'function');
1865
+
1866
+ if (chan.outgoing.state !== 'open') {
1867
+ if (wantReply)
1868
+ cb(new Error('Channel is not open'));
1869
+ return;
1870
+ }
1871
+
1872
+ if (wantReply) {
1873
+ chan._callbacks.push((had_err) => {
1874
+ if (had_err) {
1875
+ cb(had_err !== true
1876
+ ? had_err
1877
+ : new Error('Unable to set environment'));
1878
+ return;
1879
+ }
1880
+ cb();
1881
+ });
1882
+ }
1883
+
1884
+ const keys = Object.keys(env || {});
1885
+
1886
+ for (let i = 0; i < keys.length; ++i) {
1887
+ const key = keys[i];
1888
+ const val = env[key];
1889
+ chan._client._protocol.env(chan.outgoing.id, key, val, wantReply);
1890
+ }
1891
+ }
1892
+
1893
+ function reqSubsystem(chan, name, cb) {
1894
+ if (chan.outgoing.state !== 'open') {
1895
+ cb(new Error('Channel is not open'));
1896
+ return;
1897
+ }
1898
+
1899
+ chan._callbacks.push((had_err) => {
1900
+ if (had_err) {
1901
+ cb(had_err !== true
1902
+ ? had_err
1903
+ : new Error(`Unable to start subsystem: ${name}`));
1904
+ return;
1905
+ }
1906
+ chan.subtype = 'subsystem';
1907
+ cb(undefined, chan);
1908
+ });
1909
+
1910
+ chan._client._protocol.subsystem(chan.outgoing.id, name, true);
1911
+ }
1912
+
1913
+ // TODO: inline implementation into single call site
1914
+ function onCHANNEL_OPEN(self, info) {
1915
+ // The server is trying to open a channel with us, this is usually when
1916
+ // we asked the server to forward us connections on some port and now they
1917
+ // are asking us to accept/deny an incoming connection on their side
1918
+
1919
+ let localChan = -1;
1920
+ let reason;
1921
+
1922
+ const accept = () => {
1923
+ const chanInfo = {
1924
+ type: info.type,
1925
+ incoming: {
1926
+ id: localChan,
1927
+ window: MAX_WINDOW,
1928
+ packetSize: PACKET_SIZE,
1929
+ state: 'open'
1930
+ },
1931
+ outgoing: {
1932
+ id: info.sender,
1933
+ window: info.window,
1934
+ packetSize: info.packetSize,
1935
+ state: 'open'
1936
+ }
1937
+ };
1938
+ const stream = new Channel(self, chanInfo);
1939
+ self._chanMgr.update(localChan, stream);
1940
+
1941
+ self._protocol.channelOpenConfirm(info.sender,
1942
+ localChan,
1943
+ MAX_WINDOW,
1944
+ PACKET_SIZE);
1945
+ return stream;
1946
+ };
1947
+ const reject = () => {
1948
+ if (reason === undefined) {
1949
+ if (localChan === -1)
1950
+ reason = CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
1951
+ else
1952
+ reason = CHANNEL_OPEN_FAILURE.CONNECT_FAILED;
1953
+ }
1954
+
1955
+ if (localChan !== -1)
1956
+ self._chanMgr.remove(localChan);
1957
+
1958
+ self._protocol.channelOpenFail(info.sender, reason, '');
1959
+ };
1960
+ const reserveChannel = () => {
1961
+ localChan = self._chanMgr.add();
1962
+
1963
+ if (localChan === -1) {
1964
+ reason = CHANNEL_OPEN_FAILURE.RESOURCE_SHORTAGE;
1965
+ if (self.config.debug) {
1966
+ self.config.debug(
1967
+ 'Client: Automatic rejection of incoming channel open: '
1968
+ + 'no channels available'
1969
+ );
1970
+ }
1971
+ }
1972
+
1973
+ return (localChan !== -1);
1974
+ };
1975
+
1976
+ const data = info.data;
1977
+ switch (info.type) {
1978
+ case 'forwarded-tcpip': {
1979
+ const val = self._forwarding[`${data.destIP}:${data.destPort}`];
1980
+ if (val !== undefined && reserveChannel()) {
1981
+ if (data.destPort === 0)
1982
+ data.destPort = val;
1983
+ self.emit('tcp connection', data, accept, reject);
1984
+ return;
1985
+ }
1986
+ break;
1987
+ }
1988
+ case 'forwarded-streamlocal@openssh.com':
1989
+ if (self._forwardingUnix[data.socketPath] !== undefined
1990
+ && reserveChannel()) {
1991
+ self.emit('unix connection', data, accept, reject);
1992
+ return;
1993
+ }
1994
+ break;
1995
+ case 'auth-agent@openssh.com':
1996
+ if (self._agentFwdEnabled
1997
+ && typeof self._agent.getStream === 'function'
1998
+ && reserveChannel()) {
1999
+ self._agent.getStream((err, stream) => {
2000
+ if (err)
2001
+ return reject();
2002
+
2003
+ const upstream = accept();
2004
+ upstream.pipe(stream).pipe(upstream);
2005
+ });
2006
+ return;
2007
+ }
2008
+ break;
2009
+ case 'x11':
2010
+ if (self._acceptX11 !== 0 && reserveChannel()) {
2011
+ self.emit('x11', data, accept, reject);
2012
+ return;
2013
+ }
2014
+ break;
2015
+ default:
2016
+ // Automatically reject any unsupported channel open requests
2017
+ reason = CHANNEL_OPEN_FAILURE.UNKNOWN_CHANNEL_TYPE;
2018
+ if (self.config.debug) {
2019
+ self.config.debug(
2020
+ 'Client: Automatic rejection of unsupported incoming channel open '
2021
+ + `type: ${info.type}`
2022
+ );
2023
+ }
2024
+ }
2025
+
2026
+ if (reason === undefined) {
2027
+ reason = CHANNEL_OPEN_FAILURE.ADMINISTRATIVELY_PROHIBITED;
2028
+ if (self.config.debug) {
2029
+ self.config.debug(
2030
+ 'Client: Automatic rejection of unexpected incoming channel open for: '
2031
+ + info.type
2032
+ );
2033
+ }
2034
+ }
2035
+
2036
+ reject();
2037
+ }
2038
+
2039
+ const randomCookie = (() => {
2040
+ const buffer = Buffer.allocUnsafe(16);
2041
+ return () => {
2042
+ randomFillSync(buffer, 0, 16);
2043
+ return buffer.hexSlice(0, 16);
2044
+ };
2045
+ })();
2046
+
2047
+ function makeSimpleAuthHandler(authList) {
2048
+ if (!Array.isArray(authList))
2049
+ throw new Error('authList must be an array');
2050
+
2051
+ let a = 0;
2052
+ return (authsLeft, partialSuccess, cb) => {
2053
+ if (a === authList.length)
2054
+ return false;
2055
+ return authList[a++];
2056
+ };
2057
+ }
2058
+
2059
+ function hostKeysProve(client, keys_, cb) {
2060
+ if (!client._sock || !isWritable(client._sock))
2061
+ return;
2062
+
2063
+ if (typeof cb !== 'function')
2064
+ cb = noop;
2065
+
2066
+ if (!Array.isArray(keys_))
2067
+ throw new TypeError('Invalid keys argument type');
2068
+
2069
+ const keys = [];
2070
+ for (const key of keys_) {
2071
+ const parsed = parseKey(key);
2072
+ if (parsed instanceof Error)
2073
+ throw parsed;
2074
+ keys.push(parsed);
2075
+ }
2076
+
2077
+ if (!client.config.strictVendor
2078
+ || (client.config.strictVendor && RE_OPENSSH.test(client._remoteVer))) {
2079
+ client._callbacks.push((had_err, data) => {
2080
+ if (had_err) {
2081
+ cb(had_err !== true
2082
+ ? had_err
2083
+ : new Error('Server failed to prove supplied keys'));
2084
+ return;
2085
+ }
2086
+
2087
+ // TODO: move all of this parsing/verifying logic out of the client?
2088
+ const ret = [];
2089
+ let keyIdx = 0;
2090
+ bufferParser.init(data, 0);
2091
+ while (bufferParser.avail()) {
2092
+ if (keyIdx === keys.length)
2093
+ break;
2094
+ const key = keys[keyIdx++];
2095
+ const keyPublic = key.getPublicSSH();
2096
+
2097
+ const sigEntry = bufferParser.readString();
2098
+ sigParser.init(sigEntry, 0);
2099
+ const type = sigParser.readString(true);
2100
+ let value = sigParser.readString();
2101
+
2102
+ let algo;
2103
+ if (type !== key.type) {
2104
+ if (key.type === 'ssh-rsa') {
2105
+ switch (type) {
2106
+ case 'rsa-sha2-256':
2107
+ algo = 'sha256';
2108
+ break;
2109
+ case 'rsa-sha2-512':
2110
+ algo = 'sha512';
2111
+ break;
2112
+ default:
2113
+ continue;
2114
+ }
2115
+ } else {
2116
+ continue;
2117
+ }
2118
+ }
2119
+
2120
+ const sessionID = client._protocol._kex.sessionID;
2121
+ const verifyData = Buffer.allocUnsafe(
2122
+ 4 + 29 + 4 + sessionID.length + 4 + keyPublic.length
2123
+ );
2124
+ let p = 0;
2125
+ writeUInt32BE(verifyData, 29, p);
2126
+ verifyData.utf8Write('hostkeys-prove-00@openssh.com', p += 4, 29);
2127
+ writeUInt32BE(verifyData, sessionID.length, p += 29);
2128
+ bufferCopy(sessionID, verifyData, 0, sessionID.length, p += 4);
2129
+ writeUInt32BE(verifyData, keyPublic.length, p += sessionID.length);
2130
+ bufferCopy(keyPublic, verifyData, 0, keyPublic.length, p += 4);
2131
+
2132
+ if (!(value = sigSSHToASN1(value, type)))
2133
+ continue;
2134
+ if (key.verify(verifyData, value, algo) === true)
2135
+ ret.push(key);
2136
+ }
2137
+ sigParser.clear();
2138
+ bufferParser.clear();
2139
+
2140
+ cb(null, ret);
2141
+ });
2142
+
2143
+ client._protocol.openssh_hostKeysProve(keys);
2144
+ return;
2145
+ }
2146
+
2147
+ process.nextTick(
2148
+ cb,
2149
+ new Error(
2150
+ 'strictVendor enabled and server is not OpenSSH or compatible version'
2151
+ )
2152
+ );
2153
+ }
2154
+
2155
+ function getKeyAlgos(client, key, serverSigAlgs) {
2156
+ switch (key.type) {
2157
+ case 'ssh-rsa':
2158
+ if (client._protocol._compatFlags & COMPAT.IMPLY_RSA_SHA2_SIGALGS) {
2159
+ if (!Array.isArray(serverSigAlgs))
2160
+ serverSigAlgs = ['rsa-sha2-256', 'rsa-sha2-512'];
2161
+ else
2162
+ serverSigAlgs = ['rsa-sha2-256', 'rsa-sha2-512', ...serverSigAlgs];
2163
+ }
2164
+ if (Array.isArray(serverSigAlgs)) {
2165
+ if (serverSigAlgs.indexOf('rsa-sha2-256') !== -1)
2166
+ return [['rsa-sha2-256', 'sha256']];
2167
+ if (serverSigAlgs.indexOf('rsa-sha2-512') !== -1)
2168
+ return [['rsa-sha2-512', 'sha512']];
2169
+ if (serverSigAlgs.indexOf('ssh-rsa') === -1)
2170
+ return [];
2171
+ }
2172
+ return [['ssh-rsa', 'sha1']];
2173
+ }
2174
+ }
2175
+
2176
+ module.exports = Client;