@harborclient/core 0.1.1

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 (736) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/LICENSE +21 -0
  3. package/README.md +36 -0
  4. package/dist/ai/chatComposer.d.ts +12 -0
  5. package/dist/ai/chatComposer.d.ts.map +1 -0
  6. package/dist/ai/chatComposer.js +20 -0
  7. package/dist/ai/chatComposer.js.map +1 -0
  8. package/dist/ai/chatContext.d.ts +181 -0
  9. package/dist/ai/chatContext.d.ts.map +1 -0
  10. package/dist/ai/chatContext.js +168 -0
  11. package/dist/ai/chatContext.js.map +1 -0
  12. package/dist/ai/chatStepMode.d.ts +43 -0
  13. package/dist/ai/chatStepMode.d.ts.map +1 -0
  14. package/dist/ai/chatStepMode.js +64 -0
  15. package/dist/ai/chatStepMode.js.map +1 -0
  16. package/dist/ai/chatTitle.d.ts +35 -0
  17. package/dist/ai/chatTitle.d.ts.map +1 -0
  18. package/dist/ai/chatTitle.js +109 -0
  19. package/dist/ai/chatTitle.js.map +1 -0
  20. package/dist/ai/gitCommitMessage.d.ts +47 -0
  21. package/dist/ai/gitCommitMessage.d.ts.map +1 -0
  22. package/dist/ai/gitCommitMessage.js +139 -0
  23. package/dist/ai/gitCommitMessage.js.map +1 -0
  24. package/dist/ai/models.d.ts +115 -0
  25. package/dist/ai/models.d.ts.map +1 -0
  26. package/dist/ai/models.js +209 -0
  27. package/dist/ai/models.js.map +1 -0
  28. package/dist/ai/requestUpdate.d.ts +273 -0
  29. package/dist/ai/requestUpdate.d.ts.map +1 -0
  30. package/dist/ai/requestUpdate.js +274 -0
  31. package/dist/ai/requestUpdate.js.map +1 -0
  32. package/dist/ai/scriptAsk.d.ts +115 -0
  33. package/dist/ai/scriptAsk.d.ts.map +1 -0
  34. package/dist/ai/scriptAsk.js +243 -0
  35. package/dist/ai/scriptAsk.js.map +1 -0
  36. package/dist/ai/scriptReferences.d.ts +377 -0
  37. package/dist/ai/scriptReferences.d.ts.map +1 -0
  38. package/dist/ai/scriptReferences.js +787 -0
  39. package/dist/ai/scriptReferences.js.map +1 -0
  40. package/dist/ai/settings.d.ts +8 -0
  41. package/dist/ai/settings.d.ts.map +1 -0
  42. package/dist/ai/settings.js +11 -0
  43. package/dist/ai/settings.js.map +1 -0
  44. package/dist/ai/tools/ITool.d.ts +26 -0
  45. package/dist/ai/tools/ITool.d.ts.map +1 -0
  46. package/dist/ai/tools/ITool.js +2 -0
  47. package/dist/ai/tools/ITool.js.map +1 -0
  48. package/dist/ai/tools/createCollection.d.ts +164 -0
  49. package/dist/ai/tools/createCollection.d.ts.map +1 -0
  50. package/dist/ai/tools/createCollection.js +36 -0
  51. package/dist/ai/tools/createCollection.js.map +1 -0
  52. package/dist/ai/tools/createFolder.d.ts +50 -0
  53. package/dist/ai/tools/createFolder.d.ts.map +1 -0
  54. package/dist/ai/tools/createFolder.js +34 -0
  55. package/dist/ai/tools/createFolder.js.map +1 -0
  56. package/dist/ai/tools/createRequest.d.ts +210 -0
  57. package/dist/ai/tools/createRequest.d.ts.map +1 -0
  58. package/dist/ai/tools/createRequest.js +88 -0
  59. package/dist/ai/tools/createRequest.js.map +1 -0
  60. package/dist/ai/tools/getActiveRequest.d.ts +20 -0
  61. package/dist/ai/tools/getActiveRequest.d.ts.map +1 -0
  62. package/dist/ai/tools/getActiveRequest.js +16 -0
  63. package/dist/ai/tools/getActiveRequest.js.map +1 -0
  64. package/dist/ai/tools/getActiveRequestDetails.d.ts +20 -0
  65. package/dist/ai/tools/getActiveRequestDetails.d.ts.map +1 -0
  66. package/dist/ai/tools/getActiveRequestDetails.js +16 -0
  67. package/dist/ai/tools/getActiveRequestDetails.js.map +1 -0
  68. package/dist/ai/tools/getActiveResponse.d.ts +39 -0
  69. package/dist/ai/tools/getActiveResponse.d.ts.map +1 -0
  70. package/dist/ai/tools/getActiveResponse.js +30 -0
  71. package/dist/ai/tools/getActiveResponse.js.map +1 -0
  72. package/dist/ai/tools/getActiveResponseSummary.d.ts +20 -0
  73. package/dist/ai/tools/getActiveResponseSummary.d.ts.map +1 -0
  74. package/dist/ai/tools/getActiveResponseSummary.js +16 -0
  75. package/dist/ai/tools/getActiveResponseSummary.js.map +1 -0
  76. package/dist/ai/tools/getActiveTerminal.d.ts +20 -0
  77. package/dist/ai/tools/getActiveTerminal.d.ts.map +1 -0
  78. package/dist/ai/tools/getActiveTerminal.js +16 -0
  79. package/dist/ai/tools/getActiveTerminal.js.map +1 -0
  80. package/dist/ai/tools/getActiveTerminalLines.d.ts +50 -0
  81. package/dist/ai/tools/getActiveTerminalLines.d.ts.map +1 -0
  82. package/dist/ai/tools/getActiveTerminalLines.js +37 -0
  83. package/dist/ai/tools/getActiveTerminalLines.js.map +1 -0
  84. package/dist/ai/tools/getCollection.d.ts +31 -0
  85. package/dist/ai/tools/getCollection.d.ts.map +1 -0
  86. package/dist/ai/tools/getCollection.js +28 -0
  87. package/dist/ai/tools/getCollection.js.map +1 -0
  88. package/dist/ai/tools/getFolder.d.ts +31 -0
  89. package/dist/ai/tools/getFolder.d.ts.map +1 -0
  90. package/dist/ai/tools/getFolder.js +28 -0
  91. package/dist/ai/tools/getFolder.js.map +1 -0
  92. package/dist/ai/tools/getMarkdownDocument.d.ts +40 -0
  93. package/dist/ai/tools/getMarkdownDocument.d.ts.map +1 -0
  94. package/dist/ai/tools/getMarkdownDocument.js +31 -0
  95. package/dist/ai/tools/getMarkdownDocument.js.map +1 -0
  96. package/dist/ai/tools/getRequest.d.ts +31 -0
  97. package/dist/ai/tools/getRequest.d.ts.map +1 -0
  98. package/dist/ai/tools/getRequest.js +28 -0
  99. package/dist/ai/tools/getRequest.js.map +1 -0
  100. package/dist/ai/tools/getSelectedCollection.d.ts +20 -0
  101. package/dist/ai/tools/getSelectedCollection.d.ts.map +1 -0
  102. package/dist/ai/tools/getSelectedCollection.js +16 -0
  103. package/dist/ai/tools/getSelectedCollection.js.map +1 -0
  104. package/dist/ai/tools/getSidebarRequest.d.ts +20 -0
  105. package/dist/ai/tools/getSidebarRequest.d.ts.map +1 -0
  106. package/dist/ai/tools/getSidebarRequest.js +16 -0
  107. package/dist/ai/tools/getSidebarRequest.js.map +1 -0
  108. package/dist/ai/tools/gitCommits.d.ts +50 -0
  109. package/dist/ai/tools/gitCommits.d.ts.map +1 -0
  110. package/dist/ai/tools/gitCommits.js +37 -0
  111. package/dist/ai/tools/gitCommits.js.map +1 -0
  112. package/dist/ai/tools/gitDiff.d.ts +70 -0
  113. package/dist/ai/tools/gitDiff.d.ts.map +1 -0
  114. package/dist/ai/tools/gitDiff.js +49 -0
  115. package/dist/ai/tools/gitDiff.js.map +1 -0
  116. package/dist/ai/tools/gitFileDiff.d.ts +80 -0
  117. package/dist/ai/tools/gitFileDiff.d.ts.map +1 -0
  118. package/dist/ai/tools/gitFileDiff.js +55 -0
  119. package/dist/ai/tools/gitFileDiff.js.map +1 -0
  120. package/dist/ai/tools/gitFileInfo.d.ts +60 -0
  121. package/dist/ai/tools/gitFileInfo.d.ts.map +1 -0
  122. package/dist/ai/tools/gitFileInfo.js +43 -0
  123. package/dist/ai/tools/gitFileInfo.js.map +1 -0
  124. package/dist/ai/tools/gitRepoInfo.d.ts +40 -0
  125. package/dist/ai/tools/gitRepoInfo.d.ts.map +1 -0
  126. package/dist/ai/tools/gitRepoInfo.js +31 -0
  127. package/dist/ai/tools/gitRepoInfo.js.map +1 -0
  128. package/dist/ai/tools/index.d.ts +1260 -0
  129. package/dist/ai/tools/index.d.ts.map +1 -0
  130. package/dist/ai/tools/index.js +100 -0
  131. package/dist/ai/tools/index.js.map +1 -0
  132. package/dist/ai/tools/listCollections.d.ts +20 -0
  133. package/dist/ai/tools/listCollections.d.ts.map +1 -0
  134. package/dist/ai/tools/listCollections.js +16 -0
  135. package/dist/ai/tools/listCollections.js.map +1 -0
  136. package/dist/ai/tools/listEnvironments.d.ts +20 -0
  137. package/dist/ai/tools/listEnvironments.d.ts.map +1 -0
  138. package/dist/ai/tools/listEnvironments.js +16 -0
  139. package/dist/ai/tools/listEnvironments.js.map +1 -0
  140. package/dist/ai/tools/listRequests.d.ts +40 -0
  141. package/dist/ai/tools/listRequests.d.ts.map +1 -0
  142. package/dist/ai/tools/listRequests.js +28 -0
  143. package/dist/ai/tools/listRequests.js.map +1 -0
  144. package/dist/ai/tools/queryResponseBody.d.ts +50 -0
  145. package/dist/ai/tools/queryResponseBody.d.ts.map +1 -0
  146. package/dist/ai/tools/queryResponseBody.js +37 -0
  147. package/dist/ai/tools/queryResponseBody.js.map +1 -0
  148. package/dist/ai/tools/schemas.d.ts +152 -0
  149. package/dist/ai/tools/schemas.d.ts.map +1 -0
  150. package/dist/ai/tools/schemas.js +81 -0
  151. package/dist/ai/tools/schemas.js.map +1 -0
  152. package/dist/ai/tools/searchDocs.d.ts +64 -0
  153. package/dist/ai/tools/searchDocs.d.ts.map +1 -0
  154. package/dist/ai/tools/searchDocs.js +44 -0
  155. package/dist/ai/tools/searchDocs.js.map +1 -0
  156. package/dist/ai/tools/sendActiveRequest.d.ts +39 -0
  157. package/dist/ai/tools/sendActiveRequest.d.ts.map +1 -0
  158. package/dist/ai/tools/sendActiveRequest.js +30 -0
  159. package/dist/ai/tools/sendActiveRequest.js.map +1 -0
  160. package/dist/ai/tools/setActiveEnvironment.d.ts +49 -0
  161. package/dist/ai/tools/setActiveEnvironment.d.ts.map +1 -0
  162. package/dist/ai/tools/setActiveEnvironment.js +36 -0
  163. package/dist/ai/tools/setActiveEnvironment.js.map +1 -0
  164. package/dist/ai/tools/systemPrompt.d.ts +5 -0
  165. package/dist/ai/tools/systemPrompt.d.ts.map +1 -0
  166. package/dist/ai/tools/systemPrompt.js +34 -0
  167. package/dist/ai/tools/systemPrompt.js.map +1 -0
  168. package/dist/ai/tools/terminalExec.d.ts +40 -0
  169. package/dist/ai/tools/terminalExec.d.ts.map +1 -0
  170. package/dist/ai/tools/terminalExec.js +31 -0
  171. package/dist/ai/tools/terminalExec.js.map +1 -0
  172. package/dist/ai/tools/types.d.ts +68 -0
  173. package/dist/ai/tools/types.d.ts.map +1 -0
  174. package/dist/ai/tools/types.js +2 -0
  175. package/dist/ai/tools/types.js.map +1 -0
  176. package/dist/ai/tools/updateActiveRequest.d.ts +279 -0
  177. package/dist/ai/tools/updateActiveRequest.d.ts.map +1 -0
  178. package/dist/ai/tools/updateActiveRequest.js +175 -0
  179. package/dist/ai/tools/updateActiveRequest.js.map +1 -0
  180. package/dist/ai/tools/updateRequestScript.d.ts +93 -0
  181. package/dist/ai/tools/updateRequestScript.d.ts.map +1 -0
  182. package/dist/ai/tools/updateRequestScript.js +57 -0
  183. package/dist/ai/tools/updateRequestScript.js.map +1 -0
  184. package/dist/auth.d.ts +192 -0
  185. package/dist/auth.d.ts.map +1 -0
  186. package/dist/auth.js +294 -0
  187. package/dist/auth.js.map +1 -0
  188. package/dist/bodyRawSend.d.ts +25 -0
  189. package/dist/bodyRawSend.d.ts.map +1 -0
  190. package/dist/bodyRawSend.js +61 -0
  191. package/dist/bodyRawSend.js.map +1 -0
  192. package/dist/builtinThemes.d.ts +33 -0
  193. package/dist/builtinThemes.d.ts.map +1 -0
  194. package/dist/builtinThemes.js +40 -0
  195. package/dist/builtinThemes.js.map +1 -0
  196. package/dist/codeEditorSettings.d.ts +2 -0
  197. package/dist/codeEditorSettings.d.ts.map +1 -0
  198. package/dist/codeEditorSettings.js +2 -0
  199. package/dist/codeEditorSettings.js.map +1 -0
  200. package/dist/collectionContainerOrder.d.ts +42 -0
  201. package/dist/collectionContainerOrder.d.ts.map +1 -0
  202. package/dist/collectionContainerOrder.js +62 -0
  203. package/dist/collectionContainerOrder.js.map +1 -0
  204. package/dist/collectionRunner.d.ts +510 -0
  205. package/dist/collectionRunner.d.ts.map +1 -0
  206. package/dist/collectionRunner.js +296 -0
  207. package/dist/collectionRunner.js.map +1 -0
  208. package/dist/contrast.d.ts +16 -0
  209. package/dist/contrast.d.ts.map +1 -0
  210. package/dist/contrast.js +51 -0
  211. package/dist/contrast.js.map +1 -0
  212. package/dist/cookies/CookieJar.d.ts +151 -0
  213. package/dist/cookies/CookieJar.d.ts.map +1 -0
  214. package/dist/cookies/CookieJar.js +318 -0
  215. package/dist/cookies/CookieJar.js.map +1 -0
  216. package/dist/deepLink.d.ts +98 -0
  217. package/dist/deepLink.d.ts.map +1 -0
  218. package/dist/deepLink.js +211 -0
  219. package/dist/deepLink.js.map +1 -0
  220. package/dist/environmentVariables.d.ts +34 -0
  221. package/dist/environmentVariables.d.ts.map +1 -0
  222. package/dist/environmentVariables.js +56 -0
  223. package/dist/environmentVariables.js.map +1 -0
  224. package/dist/filestore/index.d.ts +16 -0
  225. package/dist/filestore/index.d.ts.map +1 -0
  226. package/dist/filestore/index.js +16 -0
  227. package/dist/filestore/index.js.map +1 -0
  228. package/dist/filestore/parse.d.ts +44 -0
  229. package/dist/filestore/parse.d.ts.map +1 -0
  230. package/dist/filestore/parse.js +80 -0
  231. package/dist/filestore/parse.js.map +1 -0
  232. package/dist/filestore/schemas.d.ts +1612 -0
  233. package/dist/filestore/schemas.d.ts.map +1 -0
  234. package/dist/filestore/schemas.js +586 -0
  235. package/dist/filestore/schemas.js.map +1 -0
  236. package/dist/filestore/snippet.d.ts +10 -0
  237. package/dist/filestore/snippet.d.ts.map +1 -0
  238. package/dist/filestore/snippet.js +43 -0
  239. package/dist/filestore/snippet.js.map +1 -0
  240. package/dist/filestore/storageSchemas.d.ts +123 -0
  241. package/dist/filestore/storageSchemas.d.ts.map +1 -0
  242. package/dist/filestore/storageSchemas.js +94 -0
  243. package/dist/filestore/storageSchemas.js.map +1 -0
  244. package/dist/filestore/stringify.d.ts +59 -0
  245. package/dist/filestore/stringify.d.ts.map +1 -0
  246. package/dist/filestore/stringify.js +103 -0
  247. package/dist/filestore/stringify.js.map +1 -0
  248. package/dist/filestore/validate.d.ts +60 -0
  249. package/dist/filestore/validate.d.ts.map +1 -0
  250. package/dist/filestore/validate.js +118 -0
  251. package/dist/filestore/validate.js.map +1 -0
  252. package/dist/filestore/variables.d.ts +9 -0
  253. package/dist/filestore/variables.d.ts.map +1 -0
  254. package/dist/filestore/variables.js +15 -0
  255. package/dist/filestore/variables.js.map +1 -0
  256. package/dist/formData.d.ts +2 -0
  257. package/dist/formData.d.ts.map +1 -0
  258. package/dist/formData.js +2 -0
  259. package/dist/formData.js.map +1 -0
  260. package/dist/generalSettings.d.ts +22 -0
  261. package/dist/generalSettings.d.ts.map +1 -0
  262. package/dist/generalSettings.js +188 -0
  263. package/dist/generalSettings.js.map +1 -0
  264. package/dist/gitHttpErrors.d.ts +125 -0
  265. package/dist/gitHttpErrors.d.ts.map +1 -0
  266. package/dist/gitHttpErrors.js +271 -0
  267. package/dist/gitHttpErrors.js.map +1 -0
  268. package/dist/gitSidebarExpansion.d.ts +22 -0
  269. package/dist/gitSidebarExpansion.d.ts.map +1 -0
  270. package/dist/gitSidebarExpansion.js +16 -0
  271. package/dist/gitSidebarExpansion.js.map +1 -0
  272. package/dist/gitUrl.d.ts +39 -0
  273. package/dist/gitUrl.d.ts.map +1 -0
  274. package/dist/gitUrl.js +105 -0
  275. package/dist/gitUrl.js.map +1 -0
  276. package/dist/harborclientExport.d.ts +23 -0
  277. package/dist/harborclientExport.d.ts.map +1 -0
  278. package/dist/harborclientExport.js +39 -0
  279. package/dist/harborclientExport.js.map +1 -0
  280. package/dist/highContrastPalette.d.ts +91 -0
  281. package/dist/highContrastPalette.d.ts.map +1 -0
  282. package/dist/highContrastPalette.js +118 -0
  283. package/dist/highContrastPalette.js.map +1 -0
  284. package/dist/httpHeaders.d.ts +2 -0
  285. package/dist/httpHeaders.d.ts.map +1 -0
  286. package/dist/httpHeaders.js +2 -0
  287. package/dist/httpHeaders.js.map +1 -0
  288. package/dist/httpMethod.d.ts +9 -0
  289. package/dist/httpMethod.d.ts.map +1 -0
  290. package/dist/httpMethod.js +23 -0
  291. package/dist/httpMethod.js.map +1 -0
  292. package/dist/index.d.ts +18 -0
  293. package/dist/index.d.ts.map +1 -0
  294. package/dist/index.js +16 -0
  295. package/dist/index.js.map +1 -0
  296. package/dist/interfaces/ICookieJar.d.ts +41 -0
  297. package/dist/interfaces/ICookieJar.d.ts.map +1 -0
  298. package/dist/interfaces/ICookieJar.js +2 -0
  299. package/dist/interfaces/ICookieJar.js.map +1 -0
  300. package/dist/interfaces/IScriptRunner.d.ts +20 -0
  301. package/dist/interfaces/IScriptRunner.d.ts.map +1 -0
  302. package/dist/interfaces/IScriptRunner.js +2 -0
  303. package/dist/interfaces/IScriptRunner.js.map +1 -0
  304. package/dist/interfaces/PluginHooks.d.ts +24 -0
  305. package/dist/interfaces/PluginHooks.d.ts.map +1 -0
  306. package/dist/interfaces/PluginHooks.js +2 -0
  307. package/dist/interfaces/PluginHooks.js.map +1 -0
  308. package/dist/interfaces/SettingsProvider.d.ts +20 -0
  309. package/dist/interfaces/SettingsProvider.d.ts.map +1 -0
  310. package/dist/interfaces/SettingsProvider.js +2 -0
  311. package/dist/interfaces/SettingsProvider.js.map +1 -0
  312. package/dist/interfaces/index.d.ts +5 -0
  313. package/dist/interfaces/index.d.ts.map +1 -0
  314. package/dist/interfaces/index.js +2 -0
  315. package/dist/interfaces/index.js.map +1 -0
  316. package/dist/mcpToolNames.d.ts +27 -0
  317. package/dist/mcpToolNames.d.ts.map +1 -0
  318. package/dist/mcpToolNames.js +41 -0
  319. package/dist/mcpToolNames.js.map +1 -0
  320. package/dist/multipartRaw.d.ts +85 -0
  321. package/dist/multipartRaw.d.ts.map +1 -0
  322. package/dist/multipartRaw.js +244 -0
  323. package/dist/multipartRaw.js.map +1 -0
  324. package/dist/network/executeHttpSend.d.ts +39 -0
  325. package/dist/network/executeHttpSend.d.ts.map +1 -0
  326. package/dist/network/executeHttpSend.js +60 -0
  327. package/dist/network/executeHttpSend.js.map +1 -0
  328. package/dist/pageSidebarSection.d.ts +35 -0
  329. package/dist/pageSidebarSection.d.ts.map +1 -0
  330. package/dist/pageSidebarSection.js +76 -0
  331. package/dist/pageSidebarSection.js.map +1 -0
  332. package/dist/parseJson.d.ts +8 -0
  333. package/dist/parseJson.d.ts.map +1 -0
  334. package/dist/parseJson.js +17 -0
  335. package/dist/parseJson.js.map +1 -0
  336. package/dist/plugin/catalog.d.ts +229 -0
  337. package/dist/plugin/catalog.d.ts.map +1 -0
  338. package/dist/plugin/catalog.js +248 -0
  339. package/dist/plugin/catalog.js.map +1 -0
  340. package/dist/plugin/catalogCategories.d.ts +30 -0
  341. package/dist/plugin/catalogCategories.d.ts.map +1 -0
  342. package/dist/plugin/catalogCategories.js +88 -0
  343. package/dist/plugin/catalogCategories.js.map +1 -0
  344. package/dist/plugin/customThemeExport.d.ts +95 -0
  345. package/dist/plugin/customThemeExport.d.ts.map +1 -0
  346. package/dist/plugin/customThemeExport.js +264 -0
  347. package/dist/plugin/customThemeExport.js.map +1 -0
  348. package/dist/plugin/databaseTypes.d.ts +90 -0
  349. package/dist/plugin/databaseTypes.d.ts.map +1 -0
  350. package/dist/plugin/databaseTypes.js +2 -0
  351. package/dist/plugin/databaseTypes.js.map +1 -0
  352. package/dist/plugin/githubRaw.d.ts +54 -0
  353. package/dist/plugin/githubRaw.d.ts.map +1 -0
  354. package/dist/plugin/githubRaw.js +138 -0
  355. package/dist/plugin/githubRaw.js.map +1 -0
  356. package/dist/plugin/httpRequest.d.ts +17 -0
  357. package/dist/plugin/httpRequest.d.ts.map +1 -0
  358. package/dist/plugin/httpRequest.js +45 -0
  359. package/dist/plugin/httpRequest.js.map +1 -0
  360. package/dist/plugin/importHandlers.d.ts +65 -0
  361. package/dist/plugin/importHandlers.d.ts.map +1 -0
  362. package/dist/plugin/importHandlers.js +2 -0
  363. package/dist/plugin/importHandlers.js.map +1 -0
  364. package/dist/plugin/pluginDatabaseApi.d.ts +39 -0
  365. package/dist/plugin/pluginDatabaseApi.d.ts.map +1 -0
  366. package/dist/plugin/pluginDatabaseApi.js +45 -0
  367. package/dist/plugin/pluginDatabaseApi.js.map +1 -0
  368. package/dist/plugin/pluginSurface.d.ts +20 -0
  369. package/dist/plugin/pluginSurface.d.ts.map +1 -0
  370. package/dist/plugin/pluginSurface.js +31 -0
  371. package/dist/plugin/pluginSurface.js.map +1 -0
  372. package/dist/plugin/stripPluginScreenshotImagesFromMarkdown.d.ts +9 -0
  373. package/dist/plugin/stripPluginScreenshotImagesFromMarkdown.d.ts.map +1 -0
  374. package/dist/plugin/stripPluginScreenshotImagesFromMarkdown.js +132 -0
  375. package/dist/plugin/stripPluginScreenshotImagesFromMarkdown.js.map +1 -0
  376. package/dist/plugin/themeCategory.d.ts +62 -0
  377. package/dist/plugin/themeCategory.d.ts.map +1 -0
  378. package/dist/plugin/themeCategory.js +84 -0
  379. package/dist/plugin/themeCategory.js.map +1 -0
  380. package/dist/plugin/types.d.ts +415 -0
  381. package/dist/plugin/types.d.ts.map +1 -0
  382. package/dist/plugin/types.js +81 -0
  383. package/dist/plugin/types.js.map +1 -0
  384. package/dist/queryParams.d.ts +63 -0
  385. package/dist/queryParams.d.ts.map +1 -0
  386. package/dist/queryParams.js +170 -0
  387. package/dist/queryParams.js.map +1 -0
  388. package/dist/requestEditorTab.d.ts +24 -0
  389. package/dist/requestEditorTab.d.ts.map +1 -0
  390. package/dist/requestEditorTab.js +44 -0
  391. package/dist/requestEditorTab.js.map +1 -0
  392. package/dist/requestRunner/RequestRunner.d.ts +39 -0
  393. package/dist/requestRunner/RequestRunner.d.ts.map +1 -0
  394. package/dist/requestRunner/RequestRunner.js +298 -0
  395. package/dist/requestRunner/RequestRunner.js.map +1 -0
  396. package/dist/requestRunner/helpers.d.ts +52 -0
  397. package/dist/requestRunner/helpers.d.ts.map +1 -0
  398. package/dist/requestRunner/helpers.js +195 -0
  399. package/dist/requestRunner/helpers.js.map +1 -0
  400. package/dist/requestRunner/index.d.ts +7 -0
  401. package/dist/requestRunner/index.d.ts.map +1 -0
  402. package/dist/requestRunner/index.js +6 -0
  403. package/dist/requestRunner/index.js.map +1 -0
  404. package/dist/requestRunner/types.d.ts +148 -0
  405. package/dist/requestRunner/types.d.ts.map +1 -0
  406. package/dist/requestRunner/types.js +2 -0
  407. package/dist/requestRunner/types.js.map +1 -0
  408. package/dist/requestTags.d.ts +22 -0
  409. package/dist/requestTags.d.ts.map +1 -0
  410. package/dist/requestTags.js +34 -0
  411. package/dist/requestTags.js.map +1 -0
  412. package/dist/scriptRefs.d.ts +190 -0
  413. package/dist/scriptRefs.d.ts.map +1 -0
  414. package/dist/scriptRefs.js +387 -0
  415. package/dist/scriptRefs.js.map +1 -0
  416. package/dist/scriptStage.d.ts +118 -0
  417. package/dist/scriptStage.d.ts.map +1 -0
  418. package/dist/scriptStage.js +204 -0
  419. package/dist/scriptStage.js.map +1 -0
  420. package/dist/scripting/scriptApi.d.ts +59 -0
  421. package/dist/scripting/scriptApi.d.ts.map +1 -0
  422. package/dist/scripting/scriptApi.js +692 -0
  423. package/dist/scripting/scriptApi.js.map +1 -0
  424. package/dist/scripting/scriptAssertionCompat.d.ts +21 -0
  425. package/dist/scripting/scriptAssertionCompat.d.ts.map +1 -0
  426. package/dist/scripting/scriptAssertionCompat.js +58 -0
  427. package/dist/scripting/scriptAssertionCompat.js.map +1 -0
  428. package/dist/scripting/scriptEvaluator.d.ts +42 -0
  429. package/dist/scripting/scriptEvaluator.d.ts.map +1 -0
  430. package/dist/scripting/scriptEvaluator.js +179 -0
  431. package/dist/scripting/scriptEvaluator.js.map +1 -0
  432. package/dist/scripting/scriptExpect.d.ts +3 -0
  433. package/dist/scripting/scriptExpect.d.ts.map +1 -0
  434. package/dist/scripting/scriptExpect.js +14 -0
  435. package/dist/scripting/scriptExpect.js.map +1 -0
  436. package/dist/scripting/scriptFileOperations.d.ts +172 -0
  437. package/dist/scripting/scriptFileOperations.d.ts.map +1 -0
  438. package/dist/scripting/scriptFileOperations.js +271 -0
  439. package/dist/scripting/scriptFileOperations.js.map +1 -0
  440. package/dist/scripting/scriptResponseAssertions.d.ts +40 -0
  441. package/dist/scripting/scriptResponseAssertions.d.ts.map +1 -0
  442. package/dist/scripting/scriptResponseAssertions.js +249 -0
  443. package/dist/scripting/scriptResponseAssertions.js.map +1 -0
  444. package/dist/scripting/scriptResponseDocument.d.ts +47 -0
  445. package/dist/scripting/scriptResponseDocument.d.ts.map +1 -0
  446. package/dist/scripting/scriptResponseDocument.js +49 -0
  447. package/dist/scripting/scriptResponseDocument.js.map +1 -0
  448. package/dist/scripting/scriptRunner.d.ts +2 -0
  449. package/dist/scripting/scriptRunner.d.ts.map +1 -0
  450. package/dist/scripting/scriptRunner.js +132 -0
  451. package/dist/scripting/scriptRunner.js.map +1 -0
  452. package/dist/scripting/scriptSnippetBundler.d.ts +46 -0
  453. package/dist/scripting/scriptSnippetBundler.d.ts.map +1 -0
  454. package/dist/scripting/scriptSnippetBundler.js +136 -0
  455. package/dist/scripting/scriptSnippetBundler.js.map +1 -0
  456. package/dist/search/actions.d.ts +44 -0
  457. package/dist/search/actions.d.ts.map +1 -0
  458. package/dist/search/actions.js +120 -0
  459. package/dist/search/actions.js.map +1 -0
  460. package/dist/search/index.d.ts +13 -0
  461. package/dist/search/index.d.ts.map +1 -0
  462. package/dist/search/index.js +13 -0
  463. package/dist/search/index.js.map +1 -0
  464. package/dist/search/installedPlugins.d.ts +31 -0
  465. package/dist/search/installedPlugins.d.ts.map +1 -0
  466. package/dist/search/installedPlugins.js +73 -0
  467. package/dist/search/installedPlugins.js.map +1 -0
  468. package/dist/search/oramaIndex.d.ts +47 -0
  469. package/dist/search/oramaIndex.d.ts.map +1 -0
  470. package/dist/search/oramaIndex.js +56 -0
  471. package/dist/search/oramaIndex.js.map +1 -0
  472. package/dist/search/pagesCatalog.d.ts +34 -0
  473. package/dist/search/pagesCatalog.d.ts.map +1 -0
  474. package/dist/search/pagesCatalog.js +37 -0
  475. package/dist/search/pagesCatalog.js.map +1 -0
  476. package/dist/search/plugins.d.ts +40 -0
  477. package/dist/search/plugins.d.ts.map +1 -0
  478. package/dist/search/plugins.js +79 -0
  479. package/dist/search/plugins.js.map +1 -0
  480. package/dist/search/settings.d.ts +29 -0
  481. package/dist/search/settings.d.ts.map +1 -0
  482. package/dist/search/settings.js +63 -0
  483. package/dist/search/settings.js.map +1 -0
  484. package/dist/search/settingsCatalog.d.ts +112 -0
  485. package/dist/search/settingsCatalog.d.ts.map +1 -0
  486. package/dist/search/settingsCatalog.js +426 -0
  487. package/dist/search/settingsCatalog.js.map +1 -0
  488. package/dist/search/sidebar.d.ts +139 -0
  489. package/dist/search/sidebar.d.ts.map +1 -0
  490. package/dist/search/sidebar.js +342 -0
  491. package/dist/search/sidebar.js.map +1 -0
  492. package/dist/search/slashCommands.d.ts +45 -0
  493. package/dist/search/slashCommands.d.ts.map +1 -0
  494. package/dist/search/slashCommands.js +71 -0
  495. package/dist/search/slashCommands.js.map +1 -0
  496. package/dist/search/snippets.d.ts +48 -0
  497. package/dist/search/snippets.d.ts.map +1 -0
  498. package/dist/search/snippets.js +114 -0
  499. package/dist/search/snippets.js.map +1 -0
  500. package/dist/search/types.d.ts +60 -0
  501. package/dist/search/types.d.ts.map +1 -0
  502. package/dist/search/types.js +49 -0
  503. package/dist/search/types.js.map +1 -0
  504. package/dist/search/unified.d.ts +57 -0
  505. package/dist/search/unified.d.ts.map +1 -0
  506. package/dist/search/unified.js +153 -0
  507. package/dist/search/unified.js.map +1 -0
  508. package/dist/shortcuts.d.ts +174 -0
  509. package/dist/shortcuts.d.ts.map +1 -0
  510. package/dist/shortcuts.js +1040 -0
  511. package/dist/shortcuts.js.map +1 -0
  512. package/dist/sidebarColor.d.ts +16 -0
  513. package/dist/sidebarColor.d.ts.map +1 -0
  514. package/dist/sidebarColor.js +21 -0
  515. package/dist/sidebarColor.js.map +1 -0
  516. package/dist/sidebarExpansion.d.ts +12 -0
  517. package/dist/sidebarExpansion.d.ts.map +1 -0
  518. package/dist/sidebarExpansion.js +116 -0
  519. package/dist/sidebarExpansion.js.map +1 -0
  520. package/dist/snippet/catalog.d.ts +120 -0
  521. package/dist/snippet/catalog.d.ts.map +1 -0
  522. package/dist/snippet/catalog.js +105 -0
  523. package/dist/snippet/catalog.js.map +1 -0
  524. package/dist/snippet/types.d.ts +90 -0
  525. package/dist/snippet/types.d.ts.map +1 -0
  526. package/dist/snippet/types.js +2 -0
  527. package/dist/snippet/types.js.map +1 -0
  528. package/dist/snippetBundle.d.ts +21 -0
  529. package/dist/snippetBundle.d.ts.map +1 -0
  530. package/dist/snippetBundle.js +107 -0
  531. package/dist/snippetBundle.js.map +1 -0
  532. package/dist/snippetImport.d.ts +19 -0
  533. package/dist/snippetImport.d.ts.map +1 -0
  534. package/dist/snippetImport.js +34 -0
  535. package/dist/snippetImport.js.map +1 -0
  536. package/dist/snippetScope.d.ts +42 -0
  537. package/dist/snippetScope.d.ts.map +1 -0
  538. package/dist/snippetScope.js +50 -0
  539. package/dist/snippetScope.js.map +1 -0
  540. package/dist/storage/IStorage.d.ts +375 -0
  541. package/dist/storage/IStorage.d.ts.map +1 -0
  542. package/dist/storage/IStorage.js +2 -0
  543. package/dist/storage/IStorage.js.map +1 -0
  544. package/dist/themes.d.ts +24 -0
  545. package/dist/themes.d.ts.map +1 -0
  546. package/dist/themes.js +10 -0
  547. package/dist/themes.js.map +1 -0
  548. package/dist/types/ai.d.ts +304 -0
  549. package/dist/types/ai.d.ts.map +1 -0
  550. package/dist/types/ai.js +2 -0
  551. package/dist/types/ai.js.map +1 -0
  552. package/dist/types/api/backup.d.ts +27 -0
  553. package/dist/types/api/backup.d.ts.map +1 -0
  554. package/dist/types/api/backup.js +2 -0
  555. package/dist/types/api/backup.js.map +1 -0
  556. package/dist/types/api/chats.d.ts +88 -0
  557. package/dist/types/api/chats.d.ts.map +1 -0
  558. package/dist/types/api/chats.js +2 -0
  559. package/dist/types/api/chats.js.map +1 -0
  560. package/dist/types/api/collections.d.ts +251 -0
  561. package/dist/types/api/collections.d.ts.map +1 -0
  562. package/dist/types/api/collections.js +2 -0
  563. package/dist/types/api/collections.js.map +1 -0
  564. package/dist/types/api/customThemes.d.ts +68 -0
  565. package/dist/types/api/customThemes.d.ts.map +1 -0
  566. package/dist/types/api/customThemes.js +2 -0
  567. package/dist/types/api/customThemes.js.map +1 -0
  568. package/dist/types/api/docs.d.ts +14 -0
  569. package/dist/types/api/docs.d.ts.map +1 -0
  570. package/dist/types/api/docs.js +2 -0
  571. package/dist/types/api/docs.js.map +1 -0
  572. package/dist/types/api/documents.d.ts +51 -0
  573. package/dist/types/api/documents.d.ts.map +1 -0
  574. package/dist/types/api/documents.js +2 -0
  575. package/dist/types/api/documents.js.map +1 -0
  576. package/dist/types/api/environments.d.ts +57 -0
  577. package/dist/types/api/environments.d.ts.map +1 -0
  578. package/dist/types/api/environments.js +2 -0
  579. package/dist/types/api/environments.js.map +1 -0
  580. package/dist/types/api/git.d.ts +392 -0
  581. package/dist/types/api/git.d.ts.map +1 -0
  582. package/dist/types/api/git.js +2 -0
  583. package/dist/types/api/git.js.map +1 -0
  584. package/dist/types/api/http.d.ts +47 -0
  585. package/dist/types/api/http.d.ts.map +1 -0
  586. package/dist/types/api/http.js +2 -0
  587. package/dist/types/api/http.js.map +1 -0
  588. package/dist/types/api/index.d.ts +28 -0
  589. package/dist/types/api/index.d.ts.map +1 -0
  590. package/dist/types/api/index.js +2 -0
  591. package/dist/types/api/index.js.map +1 -0
  592. package/dist/types/api/mcp.d.ts +77 -0
  593. package/dist/types/api/mcp.d.ts.map +1 -0
  594. package/dist/types/api/mcp.js +2 -0
  595. package/dist/types/api/mcp.js.map +1 -0
  596. package/dist/types/api/plugins.d.ts +338 -0
  597. package/dist/types/api/plugins.d.ts.map +1 -0
  598. package/dist/types/api/plugins.js +2 -0
  599. package/dist/types/api/plugins.js.map +1 -0
  600. package/dist/types/api/requestHistory.d.ts +27 -0
  601. package/dist/types/api/requestHistory.d.ts.map +1 -0
  602. package/dist/types/api/requestHistory.js +2 -0
  603. package/dist/types/api/requestHistory.js.map +1 -0
  604. package/dist/types/api/requests.d.ts +35 -0
  605. package/dist/types/api/requests.d.ts.map +1 -0
  606. package/dist/types/api/requests.js +2 -0
  607. package/dist/types/api/requests.js.map +1 -0
  608. package/dist/types/api/settings.d.ts +163 -0
  609. package/dist/types/api/settings.d.ts.map +1 -0
  610. package/dist/types/api/settings.js +2 -0
  611. package/dist/types/api/settings.js.map +1 -0
  612. package/dist/types/api/sharing.d.ts +68 -0
  613. package/dist/types/api/sharing.d.ts.map +1 -0
  614. package/dist/types/api/sharing.js +2 -0
  615. package/dist/types/api/sharing.js.map +1 -0
  616. package/dist/types/api/snippets.d.ts +159 -0
  617. package/dist/types/api/snippets.d.ts.map +1 -0
  618. package/dist/types/api/snippets.js +2 -0
  619. package/dist/types/api/snippets.js.map +1 -0
  620. package/dist/types/api/storage.d.ts +57 -0
  621. package/dist/types/api/storage.d.ts.map +1 -0
  622. package/dist/types/api/storage.js +2 -0
  623. package/dist/types/api/storage.js.map +1 -0
  624. package/dist/types/api/tabGroup.d.ts +43 -0
  625. package/dist/types/api/tabGroup.d.ts.map +1 -0
  626. package/dist/types/api/tabGroup.js +2 -0
  627. package/dist/types/api/tabGroup.js.map +1 -0
  628. package/dist/types/api/teamHub.d.ts +225 -0
  629. package/dist/types/api/teamHub.d.ts.map +1 -0
  630. package/dist/types/api/teamHub.js +2 -0
  631. package/dist/types/api/teamHub.js.map +1 -0
  632. package/dist/types/api/terminal.d.ts +101 -0
  633. package/dist/types/api/terminal.d.ts.map +1 -0
  634. package/dist/types/api/terminal.js +2 -0
  635. package/dist/types/api/terminal.js.map +1 -0
  636. package/dist/types/api/trash.d.ts +27 -0
  637. package/dist/types/api/trash.d.ts.map +1 -0
  638. package/dist/types/api/trash.js +2 -0
  639. package/dist/types/api/trash.js.map +1 -0
  640. package/dist/types/api/window.d.ts +251 -0
  641. package/dist/types/api/window.d.ts.map +1 -0
  642. package/dist/types/api/window.js +2 -0
  643. package/dist/types/api/window.js.map +1 -0
  644. package/dist/types/app.d.ts +83 -0
  645. package/dist/types/app.d.ts.map +1 -0
  646. package/dist/types/app.js +2 -0
  647. package/dist/types/app.js.map +1 -0
  648. package/dist/types/collection.d.ts +559 -0
  649. package/dist/types/collection.d.ts.map +1 -0
  650. package/dist/types/collection.js +2 -0
  651. package/dist/types/collection.js.map +1 -0
  652. package/dist/types/common.d.ts +23 -0
  653. package/dist/types/common.d.ts.map +1 -0
  654. package/dist/types/common.js +2 -0
  655. package/dist/types/common.js.map +1 -0
  656. package/dist/types/customTheme.d.ts +163 -0
  657. package/dist/types/customTheme.d.ts.map +1 -0
  658. package/dist/types/customTheme.js +311 -0
  659. package/dist/types/customTheme.js.map +1 -0
  660. package/dist/types/environment.d.ts +64 -0
  661. package/dist/types/environment.d.ts.map +1 -0
  662. package/dist/types/environment.js +2 -0
  663. package/dist/types/environment.js.map +1 -0
  664. package/dist/types/index.d.ts +21 -0
  665. package/dist/types/index.d.ts.map +1 -0
  666. package/dist/types/index.js +20 -0
  667. package/dist/types/index.js.map +1 -0
  668. package/dist/types/mcp.d.ts +153 -0
  669. package/dist/types/mcp.d.ts.map +1 -0
  670. package/dist/types/mcp.js +2 -0
  671. package/dist/types/mcp.js.map +1 -0
  672. package/dist/types/request.d.ts +294 -0
  673. package/dist/types/request.d.ts.map +1 -0
  674. package/dist/types/request.js +2 -0
  675. package/dist/types/request.js.map +1 -0
  676. package/dist/types/requestHistory.d.ts +88 -0
  677. package/dist/types/requestHistory.d.ts.map +1 -0
  678. package/dist/types/requestHistory.js +5 -0
  679. package/dist/types/requestHistory.js.map +1 -0
  680. package/dist/types/script.d.ts +366 -0
  681. package/dist/types/script.d.ts.map +1 -0
  682. package/dist/types/script.js +34 -0
  683. package/dist/types/script.js.map +1 -0
  684. package/dist/types/settings.d.ts +340 -0
  685. package/dist/types/settings.d.ts.map +1 -0
  686. package/dist/types/settings.js +3 -0
  687. package/dist/types/settings.js.map +1 -0
  688. package/dist/types/sharing.d.ts +87 -0
  689. package/dist/types/sharing.d.ts.map +1 -0
  690. package/dist/types/sharing.js +2 -0
  691. package/dist/types/sharing.js.map +1 -0
  692. package/dist/types/snippet.d.ts +150 -0
  693. package/dist/types/snippet.d.ts.map +1 -0
  694. package/dist/types/snippet.js +2 -0
  695. package/dist/types/snippet.js.map +1 -0
  696. package/dist/types/storage.d.ts +846 -0
  697. package/dist/types/storage.d.ts.map +1 -0
  698. package/dist/types/storage.js +2 -0
  699. package/dist/types/storage.js.map +1 -0
  700. package/dist/types/tabGroup.d.ts +108 -0
  701. package/dist/types/tabGroup.d.ts.map +1 -0
  702. package/dist/types/tabGroup.js +26 -0
  703. package/dist/types/tabGroup.js.map +1 -0
  704. package/dist/types/teamHub.d.ts +690 -0
  705. package/dist/types/teamHub.d.ts.map +1 -0
  706. package/dist/types/teamHub.js +2 -0
  707. package/dist/types/teamHub.js.map +1 -0
  708. package/dist/types/trash.d.ts +63 -0
  709. package/dist/types/trash.d.ts.map +1 -0
  710. package/dist/types/trash.js +2 -0
  711. package/dist/types/trash.js.map +1 -0
  712. package/dist/types/window.d.ts +14 -0
  713. package/dist/types/window.d.ts.map +1 -0
  714. package/dist/types/window.js +2 -0
  715. package/dist/types/window.js.map +1 -0
  716. package/dist/types.d.ts +7 -0
  717. package/dist/types.d.ts.map +1 -0
  718. package/dist/types.js +2 -0
  719. package/dist/types.js.map +1 -0
  720. package/dist/urlencoded.d.ts +2 -0
  721. package/dist/urlencoded.d.ts.map +1 -0
  722. package/dist/urlencoded.js +2 -0
  723. package/dist/urlencoded.js.map +1 -0
  724. package/dist/urlencodedRaw.d.ts +23 -0
  725. package/dist/urlencodedRaw.d.ts.map +1 -0
  726. package/dist/urlencodedRaw.js +60 -0
  727. package/dist/urlencodedRaw.js.map +1 -0
  728. package/dist/userAgent.d.ts +132 -0
  729. package/dist/userAgent.d.ts.map +1 -0
  730. package/dist/userAgent.js +178 -0
  731. package/dist/userAgent.js.map +1 -0
  732. package/dist/zoomPresets.d.ts +38 -0
  733. package/dist/zoomPresets.d.ts.map +1 -0
  734. package/dist/zoomPresets.js +67 -0
  735. package/dist/zoomPresets.js.map +1 -0
  736. package/package.json +92 -0
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Coerces a partial or legacy variable record to the full Variable shape.
3
+ *
4
+ * @param v - Raw variable fields from storage or import.
5
+ * @returns Normalized variable with defaults for missing fields.
6
+ */
7
+ export function normalizeVariable(v) {
8
+ return {
9
+ key: typeof v.key === 'string' ? v.key : '',
10
+ value: typeof v.value === 'string' ? v.value : '',
11
+ defaultValue: typeof v.defaultValue === 'string' ? v.defaultValue : '',
12
+ share: v.share === true
13
+ };
14
+ }
15
+ //# sourceMappingURL=variables.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variables.js","sourceRoot":"","sources":["../../src/filestore/variables.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,CAAoB;IACpD,OAAO;QACL,GAAG,EAAE,OAAO,CAAC,CAAC,GAAG,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;QAC3C,KAAK,EAAE,OAAO,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;QACjD,YAAY,EAAE,OAAO,CAAC,CAAC,YAAY,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE;QACtE,KAAK,EAAE,CAAC,CAAC,KAAK,KAAK,IAAI;KACxB,CAAC;AACJ,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { emptyFormPart, normalizeFormPart, parseFormParts, serializeFormParts } from '@harborclient/http/formData';
2
+ //# sourceMappingURL=formData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formData.d.ts","sourceRoot":"","sources":["../src/formData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EACnB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { emptyFormPart, normalizeFormPart, parseFormParts, serializeFormParts } from '@harborclient/http/formData';
2
+ //# sourceMappingURL=formData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formData.js","sourceRoot":"","sources":["../src/formData.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,iBAAiB,EACjB,cAAc,EACd,kBAAkB,EACnB,MAAM,6BAA6B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { DEFAULT_PROXY_SETTINGS, HARD_MAX_RESPONSE_SIZE_MB } from '@harborclient/http';
2
+ import type { GeneralSettings, Variable } from './types';
3
+ export { HARD_MAX_RESPONSE_SIZE_MB, DEFAULT_PROXY_SETTINGS };
4
+ /**
5
+ * Default general settings applied when storage is empty or fields are invalid.
6
+ */
7
+ export declare const DEFAULT_GENERAL_SETTINGS: GeneralSettings;
8
+ /**
9
+ * Normalizes a collection/environment variable row.
10
+ *
11
+ * @param v - Partial variable from storage or user input.
12
+ * @returns Normalized variable.
13
+ */
14
+ export declare function normalizeVariable(v: Partial<Variable>): Variable;
15
+ /**
16
+ * Normalizes a general settings object with defaults for invalid fields.
17
+ *
18
+ * @param input - Raw settings from storage or user input.
19
+ * @returns Normalized settings.
20
+ */
21
+ export declare function normalizeGeneralSettings(input: Partial<GeneralSettings>): GeneralSettings;
22
+ //# sourceMappingURL=generalSettings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generalSettings.d.ts","sourceRoot":"","sources":["../src/generalSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAQvF,OAAO,KAAK,EAAE,eAAe,EAAgC,QAAQ,EAAE,MAAM,SAAS,CAAC;AAGvF,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,CAAC;AAE7D;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,eAqCtC,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,QAAQ,CAOhE;AA2FD;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,eAAe,CAsDzF"}
@@ -0,0 +1,188 @@
1
+ import { DEFAULT_PROXY_SETTINGS, HARD_MAX_RESPONSE_SIZE_MB } from '@harborclient/http';
2
+ import { DEFAULT_CODE_EDITOR_FONT_SIZE, DEFAULT_CODE_EDITOR_SETUP, normalizeCodeEditorFontSize, normalizeCodeEditorSetup, normalizeCodeEditorTheme } from './codeEditorSettings';
3
+ import { DEFAULT_USER_AGENT, normalizeCustomUserAgents, normalizeUserAgent } from './userAgent';
4
+ export { HARD_MAX_RESPONSE_SIZE_MB, DEFAULT_PROXY_SETTINGS };
5
+ /**
6
+ * Default general settings applied when storage is empty or fields are invalid.
7
+ */
8
+ export const DEFAULT_GENERAL_SETTINGS = {
9
+ requestTimeoutMs: 30000,
10
+ scriptTimeoutMs: 5000,
11
+ allowScriptNetworkRequests: false,
12
+ allowedNetworkPlugins: [],
13
+ allowScriptFileRead: false,
14
+ allowScriptFileWrite: false,
15
+ scriptFileRoot: '',
16
+ maxResponseSizeMb: 50,
17
+ verifySsl: true,
18
+ followRedirects: true,
19
+ userAgent: DEFAULT_USER_AGENT,
20
+ customUserAgents: [],
21
+ scrollbarAutoHide: false,
22
+ wrapTabs: true,
23
+ closeToTray: false,
24
+ spellCheckEnabled: true,
25
+ warnWhenSwitchingThemes: true,
26
+ warnWhenExitingWithUnsavedChanges: true,
27
+ warnWhenClosingUnsavedRequests: true,
28
+ warnWhenEditingSnippet: true,
29
+ warnWhenCloningSnippet: true,
30
+ warnWhenClickingReadonlySnippet: true,
31
+ warnWhenCreatingTabGroup: true,
32
+ warnWhenOpeningTabGroup: true,
33
+ warnWhenAgentUsesTerminal: true,
34
+ gitAutoAdd: true,
35
+ externalMergeEditorPath: '',
36
+ gitCommitAuthorName: '',
37
+ gitCommitAuthorEmail: '',
38
+ gitCommitAuthorPrompted: false,
39
+ codeEditorTheme: 'default',
40
+ codeEditorSetup: { ...DEFAULT_CODE_EDITOR_SETUP },
41
+ codeEditorFontSize: DEFAULT_CODE_EDITOR_FONT_SIZE,
42
+ proxy: { ...DEFAULT_PROXY_SETTINGS },
43
+ globalVariables: [],
44
+ logFilePath: ''
45
+ };
46
+ /**
47
+ * Normalizes a collection/environment variable row.
48
+ *
49
+ * @param v - Partial variable from storage or user input.
50
+ * @returns Normalized variable.
51
+ */
52
+ export function normalizeVariable(v) {
53
+ return {
54
+ key: typeof v.key === 'string' ? v.key : '',
55
+ value: typeof v.value === 'string' ? v.value : '',
56
+ defaultValue: typeof v.defaultValue === 'string' ? v.defaultValue : '',
57
+ share: v.share === true
58
+ };
59
+ }
60
+ /**
61
+ * Normalizes a non-negative number, falling back to the default when invalid.
62
+ *
63
+ * @param value - Raw numeric value from storage or input.
64
+ * @param fallback - Default when value is not a finite number >= 0.
65
+ * @returns Normalized number.
66
+ */
67
+ function normalizeNonNegativeNumber(value, fallback) {
68
+ const parsed = Number(value);
69
+ if (!Number.isFinite(parsed) || parsed < 0) {
70
+ return fallback;
71
+ }
72
+ return parsed;
73
+ }
74
+ /**
75
+ * Normalizes a positive integer port, falling back to the default when invalid.
76
+ *
77
+ * @param value - Raw port from storage or input.
78
+ * @param fallback - Default when value is not a finite integer in 1–65535.
79
+ * @returns Normalized port.
80
+ */
81
+ function normalizePort(value, fallback) {
82
+ const parsed = Number(value);
83
+ if (!Number.isInteger(parsed) || parsed < 1 || parsed > 65535) {
84
+ return fallback;
85
+ }
86
+ return parsed;
87
+ }
88
+ /**
89
+ * Normalizes proxy protocol to http or https.
90
+ *
91
+ * @param value - Raw protocol from storage or input.
92
+ * @returns Normalized protocol.
93
+ */
94
+ function normalizeProxyProtocol(value) {
95
+ return value === 'https' ? 'https' : 'http';
96
+ }
97
+ /**
98
+ * Normalizes proxy settings with defaults for invalid fields.
99
+ *
100
+ * @param input - Raw proxy settings from storage or user input.
101
+ * @returns Normalized proxy settings.
102
+ */
103
+ function normalizeProxySettings(input) {
104
+ return {
105
+ enabled: input?.enabled === true,
106
+ protocol: normalizeProxyProtocol(input?.protocol),
107
+ host: typeof input?.host === 'string' ? input.host.trim() : DEFAULT_PROXY_SETTINGS.host,
108
+ port: normalizePort(input?.port, DEFAULT_PROXY_SETTINGS.port),
109
+ authEnabled: input?.authEnabled === true,
110
+ username: typeof input?.username === 'string' ? input.username : DEFAULT_PROXY_SETTINGS.username,
111
+ password: typeof input?.password === 'string' ? input.password : DEFAULT_PROXY_SETTINGS.password
112
+ };
113
+ }
114
+ /**
115
+ * Normalizes stored global variable rows with defaults for invalid entries.
116
+ *
117
+ * @param input - Raw global variable list from storage or user input.
118
+ * @returns Normalized variable rows.
119
+ */
120
+ function normalizeGlobalVariables(input) {
121
+ if (!Array.isArray(input)) {
122
+ return [];
123
+ }
124
+ return input.map((entry) => normalizeVariable(entry));
125
+ }
126
+ /**
127
+ * Normalizes the plugin allowlist used when script network requests are disabled globally.
128
+ *
129
+ * @param input - Raw plugin id list from storage or user input.
130
+ * @returns Unique trimmed plugin manifest ids.
131
+ */
132
+ function normalizeAllowedNetworkPlugins(input) {
133
+ if (!Array.isArray(input)) {
134
+ return [];
135
+ }
136
+ const ids = input
137
+ .filter((entry) => typeof entry === 'string')
138
+ .map((entry) => entry.trim())
139
+ .filter(Boolean);
140
+ return [...new Set(ids)];
141
+ }
142
+ /**
143
+ * Normalizes a general settings object with defaults for invalid fields.
144
+ *
145
+ * @param input - Raw settings from storage or user input.
146
+ * @returns Normalized settings.
147
+ */
148
+ export function normalizeGeneralSettings(input) {
149
+ return {
150
+ requestTimeoutMs: normalizeNonNegativeNumber(input.requestTimeoutMs, DEFAULT_GENERAL_SETTINGS.requestTimeoutMs),
151
+ scriptTimeoutMs: normalizeNonNegativeNumber(input.scriptTimeoutMs, DEFAULT_GENERAL_SETTINGS.scriptTimeoutMs),
152
+ allowScriptNetworkRequests: input.allowScriptNetworkRequests === true,
153
+ allowedNetworkPlugins: normalizeAllowedNetworkPlugins(input.allowedNetworkPlugins),
154
+ allowScriptFileRead: input.allowScriptFileRead === true,
155
+ allowScriptFileWrite: input.allowScriptFileWrite === true,
156
+ scriptFileRoot: typeof input.scriptFileRoot === 'string' ? input.scriptFileRoot.trim() : '',
157
+ maxResponseSizeMb: Math.min(normalizeNonNegativeNumber(input.maxResponseSizeMb, DEFAULT_GENERAL_SETTINGS.maxResponseSizeMb), HARD_MAX_RESPONSE_SIZE_MB),
158
+ verifySsl: input.verifySsl !== false,
159
+ followRedirects: input.followRedirects !== false,
160
+ userAgent: normalizeUserAgent(input.userAgent) || DEFAULT_USER_AGENT,
161
+ customUserAgents: normalizeCustomUserAgents(input.customUserAgents),
162
+ scrollbarAutoHide: input.scrollbarAutoHide === true,
163
+ wrapTabs: input.wrapTabs !== false,
164
+ closeToTray: input.closeToTray === true,
165
+ spellCheckEnabled: input.spellCheckEnabled !== false,
166
+ warnWhenSwitchingThemes: input.warnWhenSwitchingThemes !== false,
167
+ warnWhenExitingWithUnsavedChanges: input.warnWhenExitingWithUnsavedChanges !== false,
168
+ warnWhenClosingUnsavedRequests: input.warnWhenClosingUnsavedRequests !== false,
169
+ warnWhenEditingSnippet: input.warnWhenEditingSnippet !== false,
170
+ warnWhenCloningSnippet: input.warnWhenCloningSnippet !== false,
171
+ warnWhenClickingReadonlySnippet: input.warnWhenClickingReadonlySnippet !== false,
172
+ warnWhenCreatingTabGroup: input.warnWhenCreatingTabGroup !== false,
173
+ warnWhenOpeningTabGroup: input.warnWhenOpeningTabGroup !== false,
174
+ warnWhenAgentUsesTerminal: input.warnWhenAgentUsesTerminal !== false,
175
+ gitAutoAdd: input.gitAutoAdd !== false,
176
+ externalMergeEditorPath: typeof input.externalMergeEditorPath === 'string' ? input.externalMergeEditorPath.trim() : '',
177
+ gitCommitAuthorName: typeof input.gitCommitAuthorName === 'string' ? input.gitCommitAuthorName.trim() : '',
178
+ gitCommitAuthorEmail: typeof input.gitCommitAuthorEmail === 'string' ? input.gitCommitAuthorEmail.trim() : '',
179
+ gitCommitAuthorPrompted: input.gitCommitAuthorPrompted === true,
180
+ codeEditorTheme: normalizeCodeEditorTheme(input.codeEditorTheme),
181
+ codeEditorSetup: normalizeCodeEditorSetup(input.codeEditorSetup),
182
+ codeEditorFontSize: normalizeCodeEditorFontSize(input.codeEditorFontSize),
183
+ proxy: normalizeProxySettings(input.proxy),
184
+ globalVariables: normalizeGlobalVariables(input.globalVariables),
185
+ logFilePath: typeof input.logFilePath === 'string' ? input.logFilePath.trim() : ''
186
+ };
187
+ }
188
+ //# sourceMappingURL=generalSettings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generalSettings.js","sourceRoot":"","sources":["../src/generalSettings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AACvF,OAAO,EACL,6BAA6B,EAC7B,yBAAyB,EACzB,2BAA2B,EAC3B,wBAAwB,EACxB,wBAAwB,EACzB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEhG,OAAO,EAAE,yBAAyB,EAAE,sBAAsB,EAAE,CAAC;AAE7D;;GAEG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAoB;IACvD,gBAAgB,EAAE,KAAK;IACvB,eAAe,EAAE,IAAI;IACrB,0BAA0B,EAAE,KAAK;IACjC,qBAAqB,EAAE,EAAE;IACzB,mBAAmB,EAAE,KAAK;IAC1B,oBAAoB,EAAE,KAAK;IAC3B,cAAc,EAAE,EAAE;IAClB,iBAAiB,EAAE,EAAE;IACrB,SAAS,EAAE,IAAI;IACf,eAAe,EAAE,IAAI;IACrB,SAAS,EAAE,kBAAkB;IAC7B,gBAAgB,EAAE,EAAE;IACpB,iBAAiB,EAAE,KAAK;IACxB,QAAQ,EAAE,IAAI;IACd,WAAW,EAAE,KAAK;IA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UAAU,EAAE,KAAK,CAAC,UAAU,KAAK,KAAK;QACtC,uBAAuB,EACrB,OAAO,KAAK,CAAC,uBAAuB,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,uBAAuB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;QAC/F,mBAAmB,EACjB,OAAO,KAAK,CAAC,mBAAmB,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,mBAAmB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;QACvF,oBAAoB,EAClB,OAAO,KAAK,CAAC,oBAAoB,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;QACzF,uBAAuB,EAAE,KAAK,CAAC,uBAAuB,KAAK,IAAI;QAC/D,eAAe,EAAE,wBAAwB,CAAC,KAAK,CAAC,eAAe,CAAC;QAChE,eAAe,EAAE,wBAAwB,CAAC,KAAK,CAAC,eAAe,CAAC;QAChE,kBAAkB,EAAE,2BAA2B,CAAC,KAAK,CAAC,kBAAkB,CAAC;QACzE,KAAK,EAAE,sBAAsB,CAAC,KAAK,CAAC,KAAK,CAAC;QAC1C,eAAe,EAAE,wBAAwB,CAAC,KAAK,CAAC,eAAe,CAAC;QAChE,WAAW,EAAE,OAAO,KAAK,CAAC,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;KACnF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,125 @@
1
+ /**
2
+ * Git remote HTTP operations that can surface isomorphic-git HttpError failures.
3
+ */
4
+ export type GitHttpOperation = 'fetch' | 'push' | 'pull' | 'validate';
5
+ /**
6
+ * Optional context for richer GitHub access-denied messages.
7
+ */
8
+ export interface GitHttpErrorContext {
9
+ /**
10
+ * GitHub username HarborClient is authenticated as, when known.
11
+ */
12
+ githubLogin?: string | null;
13
+ /**
14
+ * Repository owner from the remote URL (user or org login), for SSO hints.
15
+ */
16
+ owner?: string | null;
17
+ }
18
+ /**
19
+ * Strips Electron IPC invoke wrapper text from an error message.
20
+ *
21
+ * @param message - Raw error message from a renderer IPC call.
22
+ * @returns User-facing message without the internal invoke prefix.
23
+ */
24
+ export declare function stripIpcInvokeErrorPrefix(message: string): string;
25
+ /**
26
+ * Returns whether an error indicates GitHub (or another host) reported the
27
+ * repository as missing.
28
+ *
29
+ * GitHub often returns 404 for private repos when credentials cannot access
30
+ * them, even when the repository exists for a different account.
31
+ *
32
+ * @param err - Thrown value from isomorphic-git or a string message.
33
+ */
34
+ export declare function isGitRepoNotFoundError(err: unknown): boolean;
35
+ /**
36
+ * Formats a git remote HTTP error into an actionable user-facing message.
37
+ *
38
+ * For 404 / "not found" responses, explains that GitHub may be hiding access
39
+ * denied behind a missing-repo status and includes the signed-in account and
40
+ * org SSO link when context is available. Other errors keep their original message.
41
+ *
42
+ * @param err - Thrown value from isomorphic-git or related validation.
43
+ * @param operation - Remote operation that failed (shown in the message).
44
+ * @param context - Optional signed-in login and repository owner for diagnostics.
45
+ * @returns User-facing error string suitable for toasts and form alerts.
46
+ */
47
+ export declare function formatGitHttpError(err: unknown, operation: GitHttpOperation, context?: GitHttpErrorContext): string;
48
+ /**
49
+ * Builds a diagnostic "repository not found" message with account and SSO hints.
50
+ *
51
+ * @param operation - Remote operation label, or null to omit the operation clause.
52
+ * @param context - Signed-in login and repository owner when known.
53
+ */
54
+ export declare function githubRepoNotFoundMessage(operation: GitHttpOperation | null, context?: GitHttpErrorContext): string;
55
+ /**
56
+ * Builds a diagnostic message when GitHub requires SAML SSO authorization (403).
57
+ *
58
+ * @param operation - Remote operation label, or null to omit the operation clause.
59
+ * @param context - Signed-in login and repository owner when known.
60
+ * @param ssoUrl - SSO authorization URL from the `x-github-sso` header, when present.
61
+ */
62
+ export declare function githubSsoRequiredMessage(operation: GitHttpOperation | null, context?: GitHttpErrorContext, ssoUrl?: string | null): string;
63
+ /**
64
+ * Builds a diagnostic message when GitHub rate-limits the request (403/429).
65
+ *
66
+ * @param operation - Remote operation label, or null to omit the operation clause.
67
+ * @param retryAfterSeconds - Seconds to wait from a `retry-after` header, when present.
68
+ */
69
+ export declare function githubRateLimitMessage(operation: GitHttpOperation | null, retryAfterSeconds?: number | null): string;
70
+ /**
71
+ * Returns whether a GitHub API error message indicates org OAuth App access restrictions.
72
+ *
73
+ * @param message - Raw `message` field from a GitHub REST error body.
74
+ */
75
+ export declare function isGitHubOAuthAppRestrictionMessage(message: string): boolean;
76
+ /**
77
+ * Extracts an organization login from GitHub's OAuth-restriction error text when present.
78
+ *
79
+ * GitHub's message typically includes backtick-quoted org names, e.g.
80
+ * `the \`harborclient\` organization has enabled OAuth App access restrictions`.
81
+ *
82
+ * @param message - Raw GitHub REST error `message` field.
83
+ * @returns Organization login when found, otherwise null.
84
+ */
85
+ export declare function ownerFromOAuthAppRestrictionMessage(message: string): string | null;
86
+ /**
87
+ * Builds a diagnostic message when an org blocks the OAuth App (403).
88
+ *
89
+ * @param operation - Remote operation label, or null to omit the operation clause.
90
+ * @param context - Signed-in login and repository owner when known.
91
+ */
92
+ export declare function githubOAuthAppRestrictionMessage(operation: GitHttpOperation | null, context?: GitHttpErrorContext): string;
93
+ /**
94
+ * Builds a diagnostic message for a generic GitHub 403 (insufficient permissions/scope).
95
+ *
96
+ * @param operation - Remote operation label, or null to omit the operation clause.
97
+ * @param context - Signed-in login and repository owner when known.
98
+ */
99
+ export declare function githubForbiddenMessage(operation: GitHttpOperation | null, context?: GitHttpErrorContext): string;
100
+ /**
101
+ * Builds a user-facing message when credentials were saved but repo validation failed.
102
+ *
103
+ * Prefer the main-process diagnostic message when it already includes account or SSO
104
+ * guidance; otherwise fall back to a generic 404 explanation.
105
+ *
106
+ * @param validationError - Raw or already-formatted validation error from the main process.
107
+ */
108
+ export declare function credentialsSavedValidationMessage(validationError: string): string;
109
+ /**
110
+ * Builds a warning when credentials can read a repository but cannot push.
111
+ */
112
+ export declare function readOnlyRepoAccessMessage(): string;
113
+ /**
114
+ * Builds a non-error status message when credentials reach an empty remote repository.
115
+ */
116
+ export declare function emptyRemoteCredentialsMessage(): string;
117
+ /**
118
+ * Builds a success message for the Test connection button when the remote is empty.
119
+ */
120
+ export declare function emptyRemoteConnectionTestMessage(): string;
121
+ /**
122
+ * Builds a success message for the Test connection button when the remote has the branch.
123
+ */
124
+ export declare function successfulConnectionTestMessage(): string;
125
+ //# sourceMappingURL=gitHttpErrors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gitHttpErrors.d.ts","sourceRoot":"","sources":["../src/gitHttpErrors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAEtE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAID;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAoB5D;AA0BD;;;;;;;;;;;GAWG;AACH,wBAAgB,kBAAkB,CAChC,GAAG,EAAE,OAAO,EACZ,SAAS,EAAE,gBAAgB,EAC3B,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAiBR;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAClC,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAkCR;AAED;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAClC,OAAO,GAAE,mBAAwB,EACjC,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GACrB,MAAM,CAwBR;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAClC,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,GAChC,MAAM,CAOR;AAED;;;;GAIG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED;;;;;;;;GAQG;AACH,wBAAgB,mCAAmC,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAGlF;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAClC,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAsBR;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,SAAS,EAAE,gBAAgB,GAAG,IAAI,EAClC,OAAO,GAAE,mBAAwB,GAChC,MAAM,CAiBR;AAED;;;;;;;GAOG;AACH,wBAAgB,iCAAiC,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAwBjF;AAED;;GAEG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAMlD;AAED;;GAEG;AACH,wBAAgB,6BAA6B,IAAI,MAAM,CAKtD;AAED;;GAEG;AACH,wBAAgB,gCAAgC,IAAI,MAAM,CAKzD;AAED;;GAEG;AACH,wBAAgB,+BAA+B,IAAI,MAAM,CAExD"}
@@ -0,0 +1,271 @@
1
+ const IPC_ERROR_PREFIX = /^Error invoking remote method '[^']+':\s*(?:Error:\s*)?/i;
2
+ /**
3
+ * Strips Electron IPC invoke wrapper text from an error message.
4
+ *
5
+ * @param message - Raw error message from a renderer IPC call.
6
+ * @returns User-facing message without the internal invoke prefix.
7
+ */
8
+ export function stripIpcInvokeErrorPrefix(message) {
9
+ return message.replace(IPC_ERROR_PREFIX, '').trim();
10
+ }
11
+ /**
12
+ * Returns whether an error indicates GitHub (or another host) reported the
13
+ * repository as missing.
14
+ *
15
+ * GitHub often returns 404 for private repos when credentials cannot access
16
+ * them, even when the repository exists for a different account.
17
+ *
18
+ * @param err - Thrown value from isomorphic-git or a string message.
19
+ */
20
+ export function isGitRepoNotFoundError(err) {
21
+ if (err == null) {
22
+ return false;
23
+ }
24
+ if (typeof err === 'object') {
25
+ const record = err;
26
+ if (record.data?.statusCode === 404) {
27
+ return true;
28
+ }
29
+ if (typeof record.message === 'string' && matchesRepoNotFoundMessage(record.message)) {
30
+ return true;
31
+ }
32
+ }
33
+ if (typeof err === 'string') {
34
+ return matchesRepoNotFoundMessage(err);
35
+ }
36
+ return false;
37
+ }
38
+ /**
39
+ * Returns whether a message string looks like a 404 / repository-not-found response.
40
+ *
41
+ * @param message - Error message text.
42
+ */
43
+ function matchesRepoNotFoundMessage(message) {
44
+ return (/\b404\b/i.test(message) || /repository not found/i.test(message) || /not found/i.test(message));
45
+ }
46
+ /**
47
+ * Extracts an optional owner login stuck on a thrown error object.
48
+ *
49
+ * @param err - Error that may carry an `owner` field from the REST probe.
50
+ */
51
+ function ownerFromError(err) {
52
+ if (err != null && typeof err === 'object' && 'owner' in err) {
53
+ const owner = err.owner;
54
+ return typeof owner === 'string' && owner.trim() ? owner.trim() : undefined;
55
+ }
56
+ return undefined;
57
+ }
58
+ /**
59
+ * Formats a git remote HTTP error into an actionable user-facing message.
60
+ *
61
+ * For 404 / "not found" responses, explains that GitHub may be hiding access
62
+ * denied behind a missing-repo status and includes the signed-in account and
63
+ * org SSO link when context is available. Other errors keep their original message.
64
+ *
65
+ * @param err - Thrown value from isomorphic-git or related validation.
66
+ * @param operation - Remote operation that failed (shown in the message).
67
+ * @param context - Optional signed-in login and repository owner for diagnostics.
68
+ * @returns User-facing error string suitable for toasts and form alerts.
69
+ */
70
+ export function formatGitHttpError(err, operation, context = {}) {
71
+ if (isGitRepoNotFoundError(err)) {
72
+ return githubRepoNotFoundMessage(operation, {
73
+ githubLogin: context.githubLogin,
74
+ owner: context.owner ?? ownerFromError(err)
75
+ });
76
+ }
77
+ if (err instanceof Error) {
78
+ return stripIpcInvokeErrorPrefix(err.message);
79
+ }
80
+ if (typeof err === 'string') {
81
+ return stripIpcInvokeErrorPrefix(err);
82
+ }
83
+ return String(err);
84
+ }
85
+ /**
86
+ * Builds a diagnostic "repository not found" message with account and SSO hints.
87
+ *
88
+ * @param operation - Remote operation label, or null to omit the operation clause.
89
+ * @param context - Signed-in login and repository owner when known.
90
+ */
91
+ export function githubRepoNotFoundMessage(operation, context = {}) {
92
+ const operationClause = operation != null ? ` during ${operation}` : '';
93
+ const login = context.githubLogin?.trim();
94
+ const owner = context.owner?.trim();
95
+ const parts = [`GitHub returned "repository not found"${operationClause}.`];
96
+ if (login) {
97
+ parts.push(`HarborClient is signed in as ${login}.`);
98
+ }
99
+ else {
100
+ parts.push('The URL may be wrong, or your saved HarborClient credentials (Settings → Git) ' +
101
+ 'may not have access to this repo.');
102
+ }
103
+ parts.push('The repo may not exist, or this account may lack access — wrong GitHub account, ' +
104
+ 'missing org SSO approval, or insufficient token scope.');
105
+ if (owner) {
106
+ parts.push(`If ${owner} is an organization that requires SSO, approve access at ` +
107
+ `https://github.com/orgs/${owner}/sso then re-authorize in HarborClient.`);
108
+ }
109
+ else {
110
+ parts.push('Re-authorize for github.com and confirm you can open the repo in the browser ' +
111
+ 'while logged in as the account HarborClient is using.');
112
+ }
113
+ return parts.join(' ');
114
+ }
115
+ /**
116
+ * Builds a diagnostic message when GitHub requires SAML SSO authorization (403).
117
+ *
118
+ * @param operation - Remote operation label, or null to omit the operation clause.
119
+ * @param context - Signed-in login and repository owner when known.
120
+ * @param ssoUrl - SSO authorization URL from the `x-github-sso` header, when present.
121
+ */
122
+ export function githubSsoRequiredMessage(operation, context = {}, ssoUrl) {
123
+ const operationClause = operation != null ? ` during ${operation}` : '';
124
+ const login = context.githubLogin?.trim();
125
+ const owner = context.owner?.trim();
126
+ const url = ssoUrl?.trim() || (owner ? `https://github.com/orgs/${owner}/sso` : null);
127
+ const parts = [
128
+ `GitHub denied access${operationClause} because SAML SSO authorization is required.`
129
+ ];
130
+ if (login) {
131
+ parts.push(`HarborClient is signed in as ${login}.`);
132
+ }
133
+ if (url) {
134
+ parts.push(`Authorize this credential for the organization at ${url}, then try again.`);
135
+ }
136
+ else {
137
+ parts.push('Authorize this credential for the organization in GitHub (Settings → Applications ' +
138
+ 'or the org SSO page), then try again.');
139
+ }
140
+ return parts.join(' ');
141
+ }
142
+ /**
143
+ * Builds a diagnostic message when GitHub rate-limits the request (403/429).
144
+ *
145
+ * @param operation - Remote operation label, or null to omit the operation clause.
146
+ * @param retryAfterSeconds - Seconds to wait from a `retry-after` header, when present.
147
+ */
148
+ export function githubRateLimitMessage(operation, retryAfterSeconds) {
149
+ const operationClause = operation != null ? ` during ${operation}` : '';
150
+ const wait = retryAfterSeconds != null && retryAfterSeconds > 0
151
+ ? ` Wait about ${retryAfterSeconds} seconds and try again.`
152
+ : ' Wait a few minutes and try again.';
153
+ return `GitHub rate limit reached${operationClause}.${wait}`;
154
+ }
155
+ /**
156
+ * Returns whether a GitHub API error message indicates org OAuth App access restrictions.
157
+ *
158
+ * @param message - Raw `message` field from a GitHub REST error body.
159
+ */
160
+ export function isGitHubOAuthAppRestrictionMessage(message) {
161
+ return /OAuth App access restrictions/i.test(message);
162
+ }
163
+ /**
164
+ * Extracts an organization login from GitHub's OAuth-restriction error text when present.
165
+ *
166
+ * GitHub's message typically includes backtick-quoted org names, e.g.
167
+ * `the \`harborclient\` organization has enabled OAuth App access restrictions`.
168
+ *
169
+ * @param message - Raw GitHub REST error `message` field.
170
+ * @returns Organization login when found, otherwise null.
171
+ */
172
+ export function ownerFromOAuthAppRestrictionMessage(message) {
173
+ const match = message.match(/`([A-Za-z0-9-]+)`\s+organization/i);
174
+ return match?.[1]?.trim() || null;
175
+ }
176
+ /**
177
+ * Builds a diagnostic message when an org blocks the OAuth App (403).
178
+ *
179
+ * @param operation - Remote operation label, or null to omit the operation clause.
180
+ * @param context - Signed-in login and repository owner when known.
181
+ */
182
+ export function githubOAuthAppRestrictionMessage(operation, context = {}) {
183
+ const operationClause = operation != null ? ` during ${operation}` : '';
184
+ const login = context.githubLogin?.trim();
185
+ const owner = context.owner?.trim();
186
+ const parts = [
187
+ `GitHub denied access${operationClause} because the ${owner ? `${owner} organization` : 'organization'} restricts third-party OAuth apps.`
188
+ ];
189
+ if (login) {
190
+ parts.push(`HarborClient is signed in as ${login}.`);
191
+ }
192
+ parts.push('Re-authorize in HarborClient, click Finish authentication, and grant access to that ' +
193
+ "organization on GitHub's approval screen. If you already granted it, ask an org admin " +
194
+ 'to approve HarborClient under Organization → Settings → Third-party access.');
195
+ return parts.join(' ');
196
+ }
197
+ /**
198
+ * Builds a diagnostic message for a generic GitHub 403 (insufficient permissions/scope).
199
+ *
200
+ * @param operation - Remote operation label, or null to omit the operation clause.
201
+ * @param context - Signed-in login and repository owner when known.
202
+ */
203
+ export function githubForbiddenMessage(operation, context = {}) {
204
+ const operationClause = operation != null ? ` during ${operation}` : '';
205
+ const login = context.githubLogin?.trim();
206
+ const parts = [`GitHub denied access${operationClause} (403 Forbidden).`];
207
+ if (login) {
208
+ parts.push(`HarborClient is signed in as ${login}.`);
209
+ }
210
+ parts.push('The account may lack access to this repository, or the token scope is insufficient — ' +
211
+ 'wrong GitHub account, missing org approval during OAuth, missing org SSO approval, ' +
212
+ 'or a token without repo access. Re-authorize for github.com with sufficient scope and try again.');
213
+ return parts.join(' ');
214
+ }
215
+ /**
216
+ * Builds a user-facing message when credentials were saved but repo validation failed.
217
+ *
218
+ * Prefer the main-process diagnostic message when it already includes account or SSO
219
+ * guidance; otherwise fall back to a generic 404 explanation.
220
+ *
221
+ * @param validationError - Raw or already-formatted validation error from the main process.
222
+ */
223
+ export function credentialsSavedValidationMessage(validationError) {
224
+ if (validationError.includes('HarborClient is signed in') ||
225
+ validationError.includes('github.com/orgs/') ||
226
+ validationError.includes('did not grant push access') ||
227
+ validationError.includes('SAML SSO authorization is required') ||
228
+ validationError.includes('rate limit reached') ||
229
+ validationError.includes('restricts third-party OAuth apps')) {
230
+ return validationError.startsWith('Credentials saved')
231
+ ? validationError
232
+ : `Credentials saved, but ${validationError.charAt(0).toLowerCase()}${validationError.slice(1)}`;
233
+ }
234
+ if (isGitRepoNotFoundError(validationError)) {
235
+ return ('Credentials saved, but GitHub returned "repository not found". ' +
236
+ 'The URL may be wrong, or these credentials may not have access to this repo — ' +
237
+ 'wrong GitHub account, missing org SSO approval, or insufficient token scope. ' +
238
+ 'Confirm the URL and that you can open the repo in the browser while logged in as ' +
239
+ 'the account HarborClient is using.');
240
+ }
241
+ return `Credentials saved, but the repository could not be verified. ${validationError}`;
242
+ }
243
+ /**
244
+ * Builds a warning when credentials can read a repository but cannot push.
245
+ */
246
+ export function readOnlyRepoAccessMessage() {
247
+ return ('Credentials can read this repository, but GitHub did not grant push access. ' +
248
+ 'Push and initial commits will fail until you re-authorize with sufficient scope ' +
249
+ 'or get write access to the repo.');
250
+ }
251
+ /**
252
+ * Builds a non-error status message when credentials reach an empty remote repository.
253
+ */
254
+ export function emptyRemoteCredentialsMessage() {
255
+ return ('Credentials verified. The remote repository is empty — initialize locally and push ' +
256
+ 'your first commit to create the branch.');
257
+ }
258
+ /**
259
+ * Builds a success message for the Test connection button when the remote is empty.
260
+ */
261
+ export function emptyRemoteConnectionTestMessage() {
262
+ return ('Connection successful. Remote repository is empty; initialize locally and push your ' +
263
+ 'first commit.');
264
+ }
265
+ /**
266
+ * Builds a success message for the Test connection button when the remote has the branch.
267
+ */
268
+ export function successfulConnectionTestMessage() {
269
+ return 'Connection successful. Credentials can reach this repository.';
270
+ }
271
+ //# sourceMappingURL=gitHttpErrors.js.map