@scalar/snippetz 0.5.4 → 0.6.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 (702) hide show
  1. package/dist/clients/index.js +5 -5
  2. package/dist/clients/index.js.map +1 -1
  3. package/dist/httpsnippet-lite/helpers/code-builder.d.ts +51 -0
  4. package/dist/httpsnippet-lite/helpers/code-builder.d.ts.map +1 -0
  5. package/dist/httpsnippet-lite/{esm/helpers → helpers}/code-builder.js +29 -0
  6. package/dist/httpsnippet-lite/helpers/code-builder.js.map +7 -0
  7. package/dist/httpsnippet-lite/{esm/helpers → helpers}/escape.d.ts +22 -3
  8. package/dist/httpsnippet-lite/helpers/escape.d.ts.map +1 -0
  9. package/dist/httpsnippet-lite/helpers/escape.js.map +7 -0
  10. package/dist/httpsnippet-lite/helpers/headers.d.ts +15 -0
  11. package/dist/httpsnippet-lite/helpers/headers.d.ts.map +1 -0
  12. package/dist/httpsnippet-lite/{esm/helpers → helpers}/headers.js +2 -13
  13. package/dist/httpsnippet-lite/helpers/headers.js.map +7 -0
  14. package/dist/httpsnippet-lite/helpers/reducer.d.ts +2 -0
  15. package/dist/httpsnippet-lite/helpers/reducer.d.ts.map +1 -0
  16. package/dist/httpsnippet-lite/helpers/reducer.js +1 -0
  17. package/dist/httpsnippet-lite/{esm/helpers → helpers}/shell.d.ts +2 -2
  18. package/dist/httpsnippet-lite/helpers/shell.d.ts.map +1 -0
  19. package/dist/httpsnippet-lite/{esm/helpers → helpers}/shell.js +4 -4
  20. package/dist/httpsnippet-lite/helpers/shell.js.map +7 -0
  21. package/dist/httpsnippet-lite/helpers/snippet-request.d.ts +33 -0
  22. package/dist/httpsnippet-lite/helpers/snippet-request.d.ts.map +1 -0
  23. package/dist/httpsnippet-lite/helpers/snippet-request.js +1 -0
  24. package/dist/httpsnippet-lite/helpers/url.d.ts +4 -0
  25. package/dist/httpsnippet-lite/helpers/url.d.ts.map +1 -0
  26. package/dist/httpsnippet-lite/helpers/url.js +9 -0
  27. package/dist/httpsnippet-lite/helpers/url.js.map +7 -0
  28. package/dist/httpsnippet-lite/targets/c/libcurl/client.d.ts +3 -0
  29. package/dist/httpsnippet-lite/targets/c/libcurl/client.d.ts.map +1 -0
  30. package/dist/httpsnippet-lite/{esm/targets → targets}/c/libcurl/client.js +7 -13
  31. package/dist/httpsnippet-lite/targets/c/libcurl/client.js.map +7 -0
  32. package/dist/httpsnippet-lite/targets/clojure/clj_http/client.d.ts +12 -0
  33. package/dist/httpsnippet-lite/targets/clojure/clj_http/client.d.ts.map +1 -0
  34. package/dist/httpsnippet-lite/{esm/targets → targets}/clojure/clj_http/client.js +7 -3
  35. package/dist/httpsnippet-lite/targets/clojure/clj_http/client.js.map +7 -0
  36. package/dist/httpsnippet-lite/targets/csharp/restsharp/client.d.ts +3 -0
  37. package/dist/httpsnippet-lite/targets/csharp/restsharp/client.d.ts.map +1 -0
  38. package/dist/httpsnippet-lite/{esm/targets → targets}/csharp/restsharp/client.js +8 -18
  39. package/dist/httpsnippet-lite/targets/csharp/restsharp/client.js.map +7 -0
  40. package/dist/httpsnippet-lite/targets/go/native/client.d.ts +12 -0
  41. package/dist/httpsnippet-lite/targets/go/native/client.d.ts.map +1 -0
  42. package/dist/httpsnippet-lite/{esm/targets → targets}/go/native/client.js +14 -35
  43. package/dist/httpsnippet-lite/targets/go/native/client.js.map +7 -0
  44. package/dist/httpsnippet-lite/targets/java/asynchttp/client.d.ts +12 -0
  45. package/dist/httpsnippet-lite/targets/java/asynchttp/client.d.ts.map +1 -0
  46. package/dist/httpsnippet-lite/{esm/targets → targets}/java/asynchttp/client.js +1 -4
  47. package/dist/httpsnippet-lite/targets/java/asynchttp/client.js.map +7 -0
  48. package/dist/httpsnippet-lite/targets/java/nethttp/client.d.ts +3 -0
  49. package/dist/httpsnippet-lite/targets/java/nethttp/client.d.ts.map +1 -0
  50. package/dist/httpsnippet-lite/{esm/targets → targets}/java/nethttp/client.js +3 -6
  51. package/dist/httpsnippet-lite/targets/java/nethttp/client.js.map +7 -0
  52. package/dist/httpsnippet-lite/targets/java/okhttp/client.d.ts +12 -0
  53. package/dist/httpsnippet-lite/targets/java/okhttp/client.d.ts.map +1 -0
  54. package/dist/httpsnippet-lite/{esm/targets → targets}/java/okhttp/client.js +5 -8
  55. package/dist/httpsnippet-lite/targets/java/okhttp/client.js.map +7 -0
  56. package/dist/httpsnippet-lite/targets/java/unirest/client.d.ts +12 -0
  57. package/dist/httpsnippet-lite/targets/java/unirest/client.d.ts.map +1 -0
  58. package/dist/httpsnippet-lite/{esm/targets → targets}/java/unirest/client.js +4 -8
  59. package/dist/httpsnippet-lite/targets/java/unirest/client.js.map +7 -0
  60. package/dist/httpsnippet-lite/targets/javascript/axios/client.d.ts +12 -0
  61. package/dist/httpsnippet-lite/targets/javascript/axios/client.d.ts.map +1 -0
  62. package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/axios/client.js +6 -10
  63. package/dist/httpsnippet-lite/targets/javascript/axios/client.js.map +7 -0
  64. package/dist/httpsnippet-lite/targets/javascript/jquery/client.d.ts +3 -0
  65. package/dist/httpsnippet-lite/targets/javascript/jquery/client.d.ts.map +1 -0
  66. package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/jquery/client.js +5 -11
  67. package/dist/httpsnippet-lite/targets/javascript/jquery/client.js.map +7 -0
  68. package/dist/httpsnippet-lite/targets/javascript/xhr/client.d.ts +3 -0
  69. package/dist/httpsnippet-lite/targets/javascript/xhr/client.d.ts.map +1 -0
  70. package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/xhr/client.js +7 -15
  71. package/dist/httpsnippet-lite/targets/javascript/xhr/client.js.map +7 -0
  72. package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.d.ts +12 -0
  73. package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.d.ts.map +1 -0
  74. package/dist/httpsnippet-lite/{esm/targets → targets}/kotlin/okhttp/client.js +6 -9
  75. package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.js.map +7 -0
  76. package/dist/httpsnippet-lite/targets/node/axios/client.d.ts +3 -0
  77. package/dist/httpsnippet-lite/targets/node/axios/client.d.ts.map +1 -0
  78. package/dist/httpsnippet-lite/{esm/targets → targets}/node/axios/client.js +3 -5
  79. package/dist/httpsnippet-lite/targets/node/axios/client.js.map +7 -0
  80. package/dist/httpsnippet-lite/{esm/targets → targets}/objc/helpers.d.ts +5 -11
  81. package/dist/httpsnippet-lite/targets/objc/helpers.d.ts.map +1 -0
  82. package/dist/httpsnippet-lite/{esm/targets → targets}/objc/helpers.js +7 -10
  83. package/dist/httpsnippet-lite/targets/objc/helpers.js.map +7 -0
  84. package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.d.ts +12 -0
  85. package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.d.ts.map +1 -0
  86. package/dist/httpsnippet-lite/{esm/targets → targets}/objc/nsurlsession/client.js +14 -51
  87. package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.js.map +7 -0
  88. package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.d.ts +3 -0
  89. package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.d.ts.map +1 -0
  90. package/dist/httpsnippet-lite/{esm/targets → targets}/ocaml/cohttp/client.js +3 -5
  91. package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.js.map +7 -0
  92. package/dist/httpsnippet-lite/targets/powershell/common.d.ts +3 -0
  93. package/dist/httpsnippet-lite/targets/powershell/common.d.ts.map +1 -0
  94. package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/common.js +6 -12
  95. package/dist/httpsnippet-lite/targets/powershell/common.js.map +7 -0
  96. package/dist/httpsnippet-lite/targets/powershell/restmethod/client.d.ts +3 -0
  97. package/dist/httpsnippet-lite/targets/powershell/restmethod/client.d.ts.map +1 -0
  98. package/dist/httpsnippet-lite/targets/powershell/restmethod/client.js.map +7 -0
  99. package/dist/httpsnippet-lite/targets/powershell/webrequest/client.d.ts +3 -0
  100. package/dist/httpsnippet-lite/targets/powershell/webrequest/client.d.ts.map +1 -0
  101. package/dist/httpsnippet-lite/targets/powershell/webrequest/client.js.map +7 -0
  102. package/dist/httpsnippet-lite/targets/python/python3/client.d.ts +12 -0
  103. package/dist/httpsnippet-lite/targets/python/python3/client.d.ts.map +1 -0
  104. package/dist/httpsnippet-lite/{esm/targets → targets}/python/python3/client.js +4 -8
  105. package/dist/httpsnippet-lite/targets/python/python3/client.js.map +7 -0
  106. package/dist/httpsnippet-lite/targets/r/httr/client.d.ts +12 -0
  107. package/dist/httpsnippet-lite/targets/r/httr/client.d.ts.map +1 -0
  108. package/dist/httpsnippet-lite/{esm/targets → targets}/r/httr/client.js +5 -12
  109. package/dist/httpsnippet-lite/targets/r/httr/client.js.map +7 -0
  110. package/dist/httpsnippet-lite/targets/ruby/native/client.d.ts +3 -0
  111. package/dist/httpsnippet-lite/targets/ruby/native/client.d.ts.map +1 -0
  112. package/dist/httpsnippet-lite/{esm/targets → targets}/ruby/native/client.js +2 -2
  113. package/dist/httpsnippet-lite/targets/ruby/native/client.js.map +7 -0
  114. package/dist/httpsnippet-lite/targets/shell/httpie/client.d.ts +12 -0
  115. package/dist/httpsnippet-lite/targets/shell/httpie/client.d.ts.map +1 -0
  116. package/dist/httpsnippet-lite/{esm/targets → targets}/shell/httpie/client.js +11 -11
  117. package/dist/httpsnippet-lite/targets/shell/httpie/client.js.map +7 -0
  118. package/dist/httpsnippet-lite/targets/shell/wget/client.d.ts +12 -0
  119. package/dist/httpsnippet-lite/targets/shell/wget/client.d.ts.map +1 -0
  120. package/dist/httpsnippet-lite/{esm/targets → targets}/shell/wget/client.js +6 -6
  121. package/dist/httpsnippet-lite/targets/shell/wget/client.js.map +7 -0
  122. package/dist/httpsnippet-lite/targets/swift/helpers.d.ts +15 -0
  123. package/dist/httpsnippet-lite/targets/swift/helpers.d.ts.map +1 -0
  124. package/dist/httpsnippet-lite/{esm/targets → targets}/swift/helpers.js +9 -16
  125. package/dist/httpsnippet-lite/targets/swift/helpers.js.map +7 -0
  126. package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.d.ts +12 -0
  127. package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.d.ts.map +1 -0
  128. package/dist/httpsnippet-lite/{esm/targets → targets}/swift/nsurlsession/client.js +11 -32
  129. package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.js.map +7 -0
  130. package/dist/httpsnippet-lite/targets/target.d.ts +19 -0
  131. package/dist/httpsnippet-lite/targets/target.d.ts.map +1 -0
  132. package/dist/httpsnippet-lite/targets/target.js +1 -0
  133. package/dist/index.d.ts +2 -2
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +8 -2
  136. package/dist/index.js.map +2 -2
  137. package/dist/plugins/c/libcurl/index.d.ts +1 -1
  138. package/dist/plugins/c/libcurl/index.d.ts.map +1 -1
  139. package/dist/plugins/c/libcurl/index.js +4 -1
  140. package/dist/plugins/c/libcurl/index.js.map +2 -2
  141. package/dist/plugins/c/libcurl/libcurl.js +1 -1
  142. package/dist/plugins/c/libcurl/libcurl.js.map +1 -1
  143. package/dist/plugins/clojure/clj_http/clj_http.d.ts.map +1 -1
  144. package/dist/plugins/clojure/clj_http/clj_http.js +1 -1
  145. package/dist/plugins/clojure/clj_http/clj_http.js.map +2 -2
  146. package/dist/plugins/clojure/clj_http/index.d.ts +1 -1
  147. package/dist/plugins/clojure/clj_http/index.d.ts.map +1 -1
  148. package/dist/plugins/clojure/clj_http/index.js +4 -1
  149. package/dist/plugins/clojure/clj_http/index.js.map +2 -2
  150. package/dist/plugins/csharp/httpclient/index.d.ts +1 -1
  151. package/dist/plugins/csharp/httpclient/index.d.ts.map +1 -1
  152. package/dist/plugins/csharp/httpclient/index.js +4 -1
  153. package/dist/plugins/csharp/httpclient/index.js.map +2 -2
  154. package/dist/plugins/csharp/restsharp/index.d.ts +1 -1
  155. package/dist/plugins/csharp/restsharp/index.d.ts.map +1 -1
  156. package/dist/plugins/csharp/restsharp/index.js +4 -1
  157. package/dist/plugins/csharp/restsharp/index.js.map +2 -2
  158. package/dist/plugins/csharp/restsharp/restsharp.d.ts.map +1 -1
  159. package/dist/plugins/csharp/restsharp/restsharp.js +1 -1
  160. package/dist/plugins/csharp/restsharp/restsharp.js.map +2 -2
  161. package/dist/plugins/dart/http/index.d.ts +1 -1
  162. package/dist/plugins/dart/http/index.d.ts.map +1 -1
  163. package/dist/plugins/dart/http/index.js +4 -1
  164. package/dist/plugins/dart/http/index.js.map +2 -2
  165. package/dist/plugins/fsharp/httpclient/index.d.ts +1 -1
  166. package/dist/plugins/fsharp/httpclient/index.d.ts.map +1 -1
  167. package/dist/plugins/fsharp/httpclient/index.js +4 -1
  168. package/dist/plugins/fsharp/httpclient/index.js.map +2 -2
  169. package/dist/plugins/go/native/index.d.ts +1 -1
  170. package/dist/plugins/go/native/index.d.ts.map +1 -1
  171. package/dist/plugins/go/native/index.js +4 -1
  172. package/dist/plugins/go/native/index.js.map +2 -2
  173. package/dist/plugins/go/native/native.d.ts.map +1 -1
  174. package/dist/plugins/go/native/native.js +1 -1
  175. package/dist/plugins/go/native/native.js.map +2 -2
  176. package/dist/plugins/http/http11/index.d.ts +1 -1
  177. package/dist/plugins/http/http11/index.d.ts.map +1 -1
  178. package/dist/plugins/http/http11/index.js +4 -1
  179. package/dist/plugins/http/http11/index.js.map +2 -2
  180. package/dist/plugins/java/asynchttp/asynchttp.d.ts.map +1 -1
  181. package/dist/plugins/java/asynchttp/asynchttp.js +1 -1
  182. package/dist/plugins/java/asynchttp/asynchttp.js.map +2 -2
  183. package/dist/plugins/java/asynchttp/index.d.ts +1 -1
  184. package/dist/plugins/java/asynchttp/index.d.ts.map +1 -1
  185. package/dist/plugins/java/asynchttp/index.js +4 -1
  186. package/dist/plugins/java/asynchttp/index.js.map +2 -2
  187. package/dist/plugins/java/nethttp/index.d.ts +1 -1
  188. package/dist/plugins/java/nethttp/index.d.ts.map +1 -1
  189. package/dist/plugins/java/nethttp/index.js +4 -1
  190. package/dist/plugins/java/nethttp/index.js.map +2 -2
  191. package/dist/plugins/java/nethttp/nethttp.d.ts.map +1 -1
  192. package/dist/plugins/java/nethttp/nethttp.js +1 -1
  193. package/dist/plugins/java/nethttp/nethttp.js.map +2 -2
  194. package/dist/plugins/java/okhttp/index.d.ts +1 -1
  195. package/dist/plugins/java/okhttp/index.d.ts.map +1 -1
  196. package/dist/plugins/java/okhttp/index.js +4 -1
  197. package/dist/plugins/java/okhttp/index.js.map +2 -2
  198. package/dist/plugins/java/okhttp/okhttp.d.ts.map +1 -1
  199. package/dist/plugins/java/okhttp/okhttp.js +1 -1
  200. package/dist/plugins/java/okhttp/okhttp.js.map +2 -2
  201. package/dist/plugins/java/unirest/index.d.ts +1 -1
  202. package/dist/plugins/java/unirest/index.d.ts.map +1 -1
  203. package/dist/plugins/java/unirest/index.js +4 -1
  204. package/dist/plugins/java/unirest/index.js.map +2 -2
  205. package/dist/plugins/java/unirest/unirest.d.ts.map +1 -1
  206. package/dist/plugins/java/unirest/unirest.js +1 -1
  207. package/dist/plugins/java/unirest/unirest.js.map +2 -2
  208. package/dist/plugins/js/axios/axios.js +1 -1
  209. package/dist/plugins/js/axios/axios.js.map +1 -1
  210. package/dist/plugins/js/fetch/fetch.js +1 -1
  211. package/dist/plugins/js/fetch/fetch.js.map +2 -2
  212. package/dist/plugins/js/jquery/index.d.ts +1 -1
  213. package/dist/plugins/js/jquery/index.d.ts.map +1 -1
  214. package/dist/plugins/js/jquery/index.js +4 -1
  215. package/dist/plugins/js/jquery/index.js.map +2 -2
  216. package/dist/plugins/js/jquery/jquery.d.ts.map +1 -1
  217. package/dist/plugins/js/jquery/jquery.js +1 -1
  218. package/dist/plugins/js/jquery/jquery.js.map +2 -2
  219. package/dist/plugins/js/ofetch/index.d.ts +1 -1
  220. package/dist/plugins/js/ofetch/index.d.ts.map +1 -1
  221. package/dist/plugins/js/ofetch/index.js +4 -1
  222. package/dist/plugins/js/ofetch/index.js.map +2 -2
  223. package/dist/plugins/js/xhr/index.d.ts +1 -1
  224. package/dist/plugins/js/xhr/index.d.ts.map +1 -1
  225. package/dist/plugins/js/xhr/index.js +4 -1
  226. package/dist/plugins/js/xhr/index.js.map +2 -2
  227. package/dist/plugins/js/xhr/xhr.d.ts.map +1 -1
  228. package/dist/plugins/js/xhr/xhr.js +1 -1
  229. package/dist/plugins/js/xhr/xhr.js.map +2 -2
  230. package/dist/plugins/kotlin/okhttp/index.d.ts +1 -1
  231. package/dist/plugins/kotlin/okhttp/index.d.ts.map +1 -1
  232. package/dist/plugins/kotlin/okhttp/index.js +4 -1
  233. package/dist/plugins/kotlin/okhttp/index.js.map +2 -2
  234. package/dist/plugins/kotlin/okhttp/okhttp.d.ts.map +1 -1
  235. package/dist/plugins/kotlin/okhttp/okhttp.js +1 -1
  236. package/dist/plugins/kotlin/okhttp/okhttp.js.map +2 -2
  237. package/dist/plugins/node/axios/axios.js +1 -1
  238. package/dist/plugins/node/axios/axios.js.map +1 -1
  239. package/dist/plugins/node/axios/index.d.ts +1 -1
  240. package/dist/plugins/node/axios/index.d.ts.map +1 -1
  241. package/dist/plugins/node/axios/index.js +4 -1
  242. package/dist/plugins/node/axios/index.js.map +2 -2
  243. package/dist/plugins/node/fetch/fetch.js +1 -1
  244. package/dist/plugins/node/fetch/fetch.js.map +2 -2
  245. package/dist/plugins/node/fetch/index.d.ts +1 -1
  246. package/dist/plugins/node/fetch/index.d.ts.map +1 -1
  247. package/dist/plugins/node/fetch/index.js +4 -1
  248. package/dist/plugins/node/fetch/index.js.map +2 -2
  249. package/dist/plugins/node/ofetch/index.d.ts +1 -1
  250. package/dist/plugins/node/ofetch/index.d.ts.map +1 -1
  251. package/dist/plugins/node/ofetch/index.js +4 -1
  252. package/dist/plugins/node/ofetch/index.js.map +2 -2
  253. package/dist/plugins/node/undici/index.d.ts +1 -1
  254. package/dist/plugins/node/undici/index.d.ts.map +1 -1
  255. package/dist/plugins/node/undici/index.js +4 -1
  256. package/dist/plugins/node/undici/index.js.map +2 -2
  257. package/dist/plugins/node/undici/undici.js +1 -1
  258. package/dist/plugins/node/undici/undici.js.map +2 -2
  259. package/dist/plugins/objc/nsurlsession/index.d.ts +1 -1
  260. package/dist/plugins/objc/nsurlsession/index.d.ts.map +1 -1
  261. package/dist/plugins/objc/nsurlsession/index.js +4 -1
  262. package/dist/plugins/objc/nsurlsession/index.js.map +2 -2
  263. package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts.map +1 -1
  264. package/dist/plugins/objc/nsurlsession/nsurlsession.js +1 -1
  265. package/dist/plugins/objc/nsurlsession/nsurlsession.js.map +2 -2
  266. package/dist/plugins/ocaml/cohttp/cohttp.d.ts.map +1 -1
  267. package/dist/plugins/ocaml/cohttp/cohttp.js +1 -1
  268. package/dist/plugins/ocaml/cohttp/cohttp.js.map +2 -2
  269. package/dist/plugins/ocaml/cohttp/index.d.ts +1 -1
  270. package/dist/plugins/ocaml/cohttp/index.d.ts.map +1 -1
  271. package/dist/plugins/ocaml/cohttp/index.js +4 -1
  272. package/dist/plugins/ocaml/cohttp/index.js.map +2 -2
  273. package/dist/plugins/php/curl/index.d.ts +1 -1
  274. package/dist/plugins/php/curl/index.d.ts.map +1 -1
  275. package/dist/plugins/php/curl/index.js +4 -1
  276. package/dist/plugins/php/curl/index.js.map +2 -2
  277. package/dist/plugins/php/guzzle/index.d.ts +1 -1
  278. package/dist/plugins/php/guzzle/index.d.ts.map +1 -1
  279. package/dist/plugins/php/guzzle/index.js +4 -1
  280. package/dist/plugins/php/guzzle/index.js.map +2 -2
  281. package/dist/plugins/powershell/restmethod/index.d.ts +1 -1
  282. package/dist/plugins/powershell/restmethod/index.d.ts.map +1 -1
  283. package/dist/plugins/powershell/restmethod/index.js +4 -1
  284. package/dist/plugins/powershell/restmethod/index.js.map +2 -2
  285. package/dist/plugins/powershell/restmethod/restmethod.d.ts.map +1 -1
  286. package/dist/plugins/powershell/restmethod/restmethod.js +1 -1
  287. package/dist/plugins/powershell/restmethod/restmethod.js.map +2 -2
  288. package/dist/plugins/powershell/webrequest/index.d.ts +1 -1
  289. package/dist/plugins/powershell/webrequest/index.d.ts.map +1 -1
  290. package/dist/plugins/powershell/webrequest/index.js +4 -1
  291. package/dist/plugins/powershell/webrequest/index.js.map +2 -2
  292. package/dist/plugins/powershell/webrequest/webrequest.d.ts.map +1 -1
  293. package/dist/plugins/powershell/webrequest/webrequest.js +1 -1
  294. package/dist/plugins/powershell/webrequest/webrequest.js.map +2 -2
  295. package/dist/plugins/python/httpx/async.d.ts.map +1 -1
  296. package/dist/plugins/python/httpx/async.js.map +2 -2
  297. package/dist/plugins/python/httpx/index.d.ts +2 -2
  298. package/dist/plugins/python/httpx/index.d.ts.map +1 -1
  299. package/dist/plugins/python/httpx/index.js +6 -2
  300. package/dist/plugins/python/httpx/index.js.map +2 -2
  301. package/dist/plugins/python/httpx/sync.d.ts.map +1 -1
  302. package/dist/plugins/python/httpx/sync.js.map +2 -2
  303. package/dist/plugins/python/python3/index.d.ts +1 -1
  304. package/dist/plugins/python/python3/index.d.ts.map +1 -1
  305. package/dist/plugins/python/python3/index.js +4 -1
  306. package/dist/plugins/python/python3/index.js.map +2 -2
  307. package/dist/plugins/python/python3/python3.d.ts.map +1 -1
  308. package/dist/plugins/python/python3/python3.js +1 -1
  309. package/dist/plugins/python/python3/python3.js.map +2 -2
  310. package/dist/plugins/python/requests/index.d.ts +1 -1
  311. package/dist/plugins/python/requests/index.d.ts.map +1 -1
  312. package/dist/plugins/python/requests/index.js +4 -1
  313. package/dist/plugins/python/requests/index.js.map +2 -2
  314. package/dist/plugins/python/requests/requests.d.ts.map +1 -1
  315. package/dist/plugins/python/requests/requests.js.map +2 -2
  316. package/dist/plugins/r/httr/httr.d.ts.map +1 -1
  317. package/dist/plugins/r/httr/httr.js +1 -1
  318. package/dist/plugins/r/httr/httr.js.map +2 -2
  319. package/dist/plugins/r/httr/index.d.ts +1 -1
  320. package/dist/plugins/r/httr/index.d.ts.map +1 -1
  321. package/dist/plugins/r/httr/index.js +4 -1
  322. package/dist/plugins/r/httr/index.js.map +2 -2
  323. package/dist/plugins/ruby/native/index.d.ts +1 -1
  324. package/dist/plugins/ruby/native/index.d.ts.map +1 -1
  325. package/dist/plugins/ruby/native/index.js +4 -1
  326. package/dist/plugins/ruby/native/index.js.map +2 -2
  327. package/dist/plugins/ruby/native/native.d.ts.map +1 -1
  328. package/dist/plugins/ruby/native/native.js +1 -1
  329. package/dist/plugins/ruby/native/native.js.map +2 -2
  330. package/dist/plugins/rust/reqwest/index.d.ts +1 -1
  331. package/dist/plugins/rust/reqwest/index.d.ts.map +1 -1
  332. package/dist/plugins/rust/reqwest/index.js +4 -1
  333. package/dist/plugins/rust/reqwest/index.js.map +2 -2
  334. package/dist/plugins/shell/curl/index.d.ts +1 -1
  335. package/dist/plugins/shell/curl/index.d.ts.map +1 -1
  336. package/dist/plugins/shell/curl/index.js +4 -1
  337. package/dist/plugins/shell/curl/index.js.map +2 -2
  338. package/dist/plugins/shell/httpie/httpie.d.ts.map +1 -1
  339. package/dist/plugins/shell/httpie/httpie.js +1 -1
  340. package/dist/plugins/shell/httpie/httpie.js.map +2 -2
  341. package/dist/plugins/shell/httpie/index.d.ts +1 -1
  342. package/dist/plugins/shell/httpie/index.d.ts.map +1 -1
  343. package/dist/plugins/shell/httpie/index.js +4 -1
  344. package/dist/plugins/shell/httpie/index.js.map +2 -2
  345. package/dist/plugins/shell/wget/index.d.ts +1 -1
  346. package/dist/plugins/shell/wget/index.d.ts.map +1 -1
  347. package/dist/plugins/shell/wget/index.js +4 -1
  348. package/dist/plugins/shell/wget/index.js.map +2 -2
  349. package/dist/plugins/shell/wget/wget.d.ts.map +1 -1
  350. package/dist/plugins/shell/wget/wget.js +1 -1
  351. package/dist/plugins/shell/wget/wget.js.map +2 -2
  352. package/dist/plugins/swift/nsurlsession/index.d.ts +1 -1
  353. package/dist/plugins/swift/nsurlsession/index.d.ts.map +1 -1
  354. package/dist/plugins/swift/nsurlsession/index.js +4 -1
  355. package/dist/plugins/swift/nsurlsession/index.js.map +2 -2
  356. package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts.map +1 -1
  357. package/dist/plugins/swift/nsurlsession/nsurlsession.js +1 -1
  358. package/dist/plugins/swift/nsurlsession/nsurlsession.js.map +2 -2
  359. package/dist/snippetz.d.ts +2 -2
  360. package/dist/snippetz.d.ts.map +1 -1
  361. package/dist/snippetz.js.map +2 -2
  362. package/dist/utils/convertWithHttpSnippetLite.js +1 -1
  363. package/dist/utils/convertWithHttpSnippetLite.js.map +2 -2
  364. package/dist/utils/index.d.ts +1 -1
  365. package/dist/utils/index.d.ts.map +1 -1
  366. package/dist/utils/index.js +4 -1
  367. package/dist/utils/index.js.map +2 -2
  368. package/package.json +4 -3
  369. package/dist/httpsnippet-lite/esm/helpers/code-builder.d.ts +0 -8
  370. package/dist/httpsnippet-lite/esm/helpers/code-builder.d.ts.map +0 -1
  371. package/dist/httpsnippet-lite/esm/helpers/code-builder.js.map +0 -7
  372. package/dist/httpsnippet-lite/esm/helpers/escape.d.ts.map +0 -1
  373. package/dist/httpsnippet-lite/esm/helpers/escape.js.map +0 -7
  374. package/dist/httpsnippet-lite/esm/helpers/form-data.d.ts +0 -3
  375. package/dist/httpsnippet-lite/esm/helpers/form-data.d.ts.map +0 -1
  376. package/dist/httpsnippet-lite/esm/helpers/form-data.js +0 -59
  377. package/dist/httpsnippet-lite/esm/helpers/form-data.js.map +0 -7
  378. package/dist/httpsnippet-lite/esm/helpers/headers.d.ts +0 -17
  379. package/dist/httpsnippet-lite/esm/helpers/headers.d.ts.map +0 -1
  380. package/dist/httpsnippet-lite/esm/helpers/headers.js.map +0 -7
  381. package/dist/httpsnippet-lite/esm/helpers/reducer.d.ts +0 -2
  382. package/dist/httpsnippet-lite/esm/helpers/reducer.d.ts.map +0 -1
  383. package/dist/httpsnippet-lite/esm/helpers/reducer.js +0 -20
  384. package/dist/httpsnippet-lite/esm/helpers/reducer.js.map +0 -7
  385. package/dist/httpsnippet-lite/esm/helpers/shell.d.ts.map +0 -1
  386. package/dist/httpsnippet-lite/esm/helpers/shell.js.map +0 -7
  387. package/dist/httpsnippet-lite/esm/helpers/url.d.ts +0 -5
  388. package/dist/httpsnippet-lite/esm/helpers/url.d.ts.map +0 -1
  389. package/dist/httpsnippet-lite/esm/helpers/url.js +0 -20
  390. package/dist/httpsnippet-lite/esm/helpers/url.js.map +0 -7
  391. package/dist/httpsnippet-lite/esm/helpers/utils.d.ts +0 -3
  392. package/dist/httpsnippet-lite/esm/helpers/utils.d.ts.map +0 -1
  393. package/dist/httpsnippet-lite/esm/helpers/utils.js +0 -16
  394. package/dist/httpsnippet-lite/esm/helpers/utils.js.map +0 -7
  395. package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts +0 -16
  396. package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts.map +0 -1
  397. package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.js.map +0 -7
  398. package/dist/httpsnippet-lite/esm/targets/c/target.d.ts +0 -26
  399. package/dist/httpsnippet-lite/esm/targets/c/target.d.ts.map +0 -1
  400. package/dist/httpsnippet-lite/esm/targets/c/target.js +0 -16
  401. package/dist/httpsnippet-lite/esm/targets/c/target.js.map +0 -7
  402. package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.d.ts +0 -16
  403. package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.d.ts.map +0 -1
  404. package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.js.map +0 -7
  405. package/dist/httpsnippet-lite/esm/targets/clojure/target.d.ts +0 -26
  406. package/dist/httpsnippet-lite/esm/targets/clojure/target.d.ts.map +0 -1
  407. package/dist/httpsnippet-lite/esm/targets/clojure/target.js +0 -16
  408. package/dist/httpsnippet-lite/esm/targets/clojure/target.js.map +0 -7
  409. package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.d.ts +0 -17
  410. package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.d.ts.map +0 -1
  411. package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.js.map +0 -7
  412. package/dist/httpsnippet-lite/esm/targets/csharp/target.d.ts +0 -27
  413. package/dist/httpsnippet-lite/esm/targets/csharp/target.d.ts.map +0 -1
  414. package/dist/httpsnippet-lite/esm/targets/csharp/target.js +0 -16
  415. package/dist/httpsnippet-lite/esm/targets/csharp/target.js.map +0 -7
  416. package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts +0 -15
  417. package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts.map +0 -1
  418. package/dist/httpsnippet-lite/esm/targets/go/native/client.js.map +0 -7
  419. package/dist/httpsnippet-lite/esm/targets/go/target.d.ts +0 -25
  420. package/dist/httpsnippet-lite/esm/targets/go/target.d.ts.map +0 -1
  421. package/dist/httpsnippet-lite/esm/targets/go/target.js +0 -16
  422. package/dist/httpsnippet-lite/esm/targets/go/target.js.map +0 -7
  423. package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.d.ts +0 -15
  424. package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.d.ts.map +0 -1
  425. package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.js.map +0 -7
  426. package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.d.ts +0 -15
  427. package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.d.ts.map +0 -1
  428. package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.js.map +0 -7
  429. package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts +0 -15
  430. package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts.map +0 -1
  431. package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.js.map +0 -7
  432. package/dist/httpsnippet-lite/esm/targets/java/target.d.ts +0 -67
  433. package/dist/httpsnippet-lite/esm/targets/java/target.d.ts.map +0 -1
  434. package/dist/httpsnippet-lite/esm/targets/java/target.js +0 -22
  435. package/dist/httpsnippet-lite/esm/targets/java/target.js.map +0 -7
  436. package/dist/httpsnippet-lite/esm/targets/java/unirest/client.d.ts +0 -15
  437. package/dist/httpsnippet-lite/esm/targets/java/unirest/client.d.ts.map +0 -1
  438. package/dist/httpsnippet-lite/esm/targets/java/unirest/client.js.map +0 -7
  439. package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.d.ts +0 -16
  440. package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.d.ts.map +0 -1
  441. package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.js.map +0 -7
  442. package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.d.ts +0 -15
  443. package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.d.ts.map +0 -1
  444. package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.js.map +0 -7
  445. package/dist/httpsnippet-lite/esm/targets/javascript/target.d.ts +0 -55
  446. package/dist/httpsnippet-lite/esm/targets/javascript/target.d.ts.map +0 -1
  447. package/dist/httpsnippet-lite/esm/targets/javascript/target.js +0 -22
  448. package/dist/httpsnippet-lite/esm/targets/javascript/target.js.map +0 -7
  449. package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.d.ts +0 -15
  450. package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.d.ts.map +0 -1
  451. package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.js.map +0 -7
  452. package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts +0 -15
  453. package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts.map +0 -1
  454. package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.js.map +0 -7
  455. package/dist/httpsnippet-lite/esm/targets/kotlin/target.d.ts +0 -25
  456. package/dist/httpsnippet-lite/esm/targets/kotlin/target.d.ts.map +0 -1
  457. package/dist/httpsnippet-lite/esm/targets/kotlin/target.js +0 -16
  458. package/dist/httpsnippet-lite/esm/targets/kotlin/target.js.map +0 -7
  459. package/dist/httpsnippet-lite/esm/targets/node/axios/client.d.ts +0 -16
  460. package/dist/httpsnippet-lite/esm/targets/node/axios/client.d.ts.map +0 -1
  461. package/dist/httpsnippet-lite/esm/targets/node/axios/client.js.map +0 -7
  462. package/dist/httpsnippet-lite/esm/targets/node/request/client.d.ts +0 -17
  463. package/dist/httpsnippet-lite/esm/targets/node/request/client.d.ts.map +0 -1
  464. package/dist/httpsnippet-lite/esm/targets/node/request/client.js +0 -100
  465. package/dist/httpsnippet-lite/esm/targets/node/request/client.js.map +0 -7
  466. package/dist/httpsnippet-lite/esm/targets/node/target.d.ts +0 -45
  467. package/dist/httpsnippet-lite/esm/targets/node/target.d.ts.map +0 -1
  468. package/dist/httpsnippet-lite/esm/targets/node/target.js +0 -24
  469. package/dist/httpsnippet-lite/esm/targets/node/target.js.map +0 -7
  470. package/dist/httpsnippet-lite/esm/targets/objc/helpers.d.ts.map +0 -1
  471. package/dist/httpsnippet-lite/esm/targets/objc/helpers.js.map +0 -7
  472. package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.d.ts +0 -15
  473. package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.d.ts.map +0 -1
  474. package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.js.map +0 -7
  475. package/dist/httpsnippet-lite/esm/targets/objc/target.d.ts +0 -25
  476. package/dist/httpsnippet-lite/esm/targets/objc/target.d.ts.map +0 -1
  477. package/dist/httpsnippet-lite/esm/targets/objc/target.js +0 -16
  478. package/dist/httpsnippet-lite/esm/targets/objc/target.js.map +0 -7
  479. package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.d.ts +0 -15
  480. package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.d.ts.map +0 -1
  481. package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.js.map +0 -7
  482. package/dist/httpsnippet-lite/esm/targets/ocaml/target.d.ts +0 -25
  483. package/dist/httpsnippet-lite/esm/targets/ocaml/target.d.ts.map +0 -1
  484. package/dist/httpsnippet-lite/esm/targets/ocaml/target.js +0 -16
  485. package/dist/httpsnippet-lite/esm/targets/ocaml/target.js.map +0 -7
  486. package/dist/httpsnippet-lite/esm/targets/php/helpers.d.ts +0 -3
  487. package/dist/httpsnippet-lite/esm/targets/php/helpers.d.ts.map +0 -1
  488. package/dist/httpsnippet-lite/esm/targets/php/helpers.js +0 -72
  489. package/dist/httpsnippet-lite/esm/targets/php/helpers.js.map +0 -7
  490. package/dist/httpsnippet-lite/esm/targets/php/http1/client.d.ts +0 -17
  491. package/dist/httpsnippet-lite/esm/targets/php/http1/client.d.ts.map +0 -1
  492. package/dist/httpsnippet-lite/esm/targets/php/http1/client.js +0 -85
  493. package/dist/httpsnippet-lite/esm/targets/php/http1/client.js.map +0 -7
  494. package/dist/httpsnippet-lite/esm/targets/php/http2/client.d.ts +0 -17
  495. package/dist/httpsnippet-lite/esm/targets/php/http2/client.d.ts.map +0 -1
  496. package/dist/httpsnippet-lite/esm/targets/php/http2/client.js +0 -127
  497. package/dist/httpsnippet-lite/esm/targets/php/http2/client.js.map +0 -7
  498. package/dist/httpsnippet-lite/esm/targets/php/target.d.ts +0 -45
  499. package/dist/httpsnippet-lite/esm/targets/php/target.d.ts.map +0 -1
  500. package/dist/httpsnippet-lite/esm/targets/php/target.js +0 -22
  501. package/dist/httpsnippet-lite/esm/targets/php/target.js.map +0 -7
  502. package/dist/httpsnippet-lite/esm/targets/powershell/common.d.ts +0 -10
  503. package/dist/httpsnippet-lite/esm/targets/powershell/common.d.ts.map +0 -1
  504. package/dist/httpsnippet-lite/esm/targets/powershell/common.js.map +0 -7
  505. package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.d.ts +0 -18
  506. package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.d.ts.map +0 -1
  507. package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.js.map +0 -7
  508. package/dist/httpsnippet-lite/esm/targets/powershell/target.d.ts +0 -45
  509. package/dist/httpsnippet-lite/esm/targets/powershell/target.d.ts.map +0 -1
  510. package/dist/httpsnippet-lite/esm/targets/powershell/target.js +0 -18
  511. package/dist/httpsnippet-lite/esm/targets/powershell/target.js.map +0 -7
  512. package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.d.ts +0 -18
  513. package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.d.ts.map +0 -1
  514. package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.js.map +0 -7
  515. package/dist/httpsnippet-lite/esm/targets/python/helpers.d.ts +0 -9
  516. package/dist/httpsnippet-lite/esm/targets/python/helpers.d.ts.map +0 -1
  517. package/dist/httpsnippet-lite/esm/targets/python/helpers.js +0 -68
  518. package/dist/httpsnippet-lite/esm/targets/python/helpers.js.map +0 -7
  519. package/dist/httpsnippet-lite/esm/targets/python/python3/client.d.ts +0 -19
  520. package/dist/httpsnippet-lite/esm/targets/python/python3/client.d.ts.map +0 -1
  521. package/dist/httpsnippet-lite/esm/targets/python/python3/client.js.map +0 -7
  522. package/dist/httpsnippet-lite/esm/targets/python/target.d.ts +0 -29
  523. package/dist/httpsnippet-lite/esm/targets/python/target.d.ts.map +0 -1
  524. package/dist/httpsnippet-lite/esm/targets/python/target.js +0 -16
  525. package/dist/httpsnippet-lite/esm/targets/python/target.js.map +0 -7
  526. package/dist/httpsnippet-lite/esm/targets/r/httr/client.d.ts +0 -17
  527. package/dist/httpsnippet-lite/esm/targets/r/httr/client.d.ts.map +0 -1
  528. package/dist/httpsnippet-lite/esm/targets/r/httr/client.js.map +0 -7
  529. package/dist/httpsnippet-lite/esm/targets/r/target.d.ts +0 -27
  530. package/dist/httpsnippet-lite/esm/targets/r/target.d.ts.map +0 -1
  531. package/dist/httpsnippet-lite/esm/targets/r/target.js +0 -16
  532. package/dist/httpsnippet-lite/esm/targets/r/target.js.map +0 -7
  533. package/dist/httpsnippet-lite/esm/targets/ruby/native/client.d.ts +0 -16
  534. package/dist/httpsnippet-lite/esm/targets/ruby/native/client.d.ts.map +0 -1
  535. package/dist/httpsnippet-lite/esm/targets/ruby/native/client.js.map +0 -7
  536. package/dist/httpsnippet-lite/esm/targets/ruby/target.d.ts +0 -26
  537. package/dist/httpsnippet-lite/esm/targets/ruby/target.d.ts.map +0 -1
  538. package/dist/httpsnippet-lite/esm/targets/ruby/target.js +0 -16
  539. package/dist/httpsnippet-lite/esm/targets/ruby/target.js.map +0 -7
  540. package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts +0 -17
  541. package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts.map +0 -1
  542. package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.js.map +0 -7
  543. package/dist/httpsnippet-lite/esm/targets/shell/target.d.ts +0 -42
  544. package/dist/httpsnippet-lite/esm/targets/shell/target.d.ts.map +0 -1
  545. package/dist/httpsnippet-lite/esm/targets/shell/target.js +0 -20
  546. package/dist/httpsnippet-lite/esm/targets/shell/target.js.map +0 -7
  547. package/dist/httpsnippet-lite/esm/targets/shell/wget/client.d.ts +0 -15
  548. package/dist/httpsnippet-lite/esm/targets/shell/wget/client.d.ts.map +0 -1
  549. package/dist/httpsnippet-lite/esm/targets/shell/wget/client.js.map +0 -7
  550. package/dist/httpsnippet-lite/esm/targets/swift/helpers.d.ts +0 -17
  551. package/dist/httpsnippet-lite/esm/targets/swift/helpers.d.ts.map +0 -1
  552. package/dist/httpsnippet-lite/esm/targets/swift/helpers.js.map +0 -7
  553. package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.d.ts +0 -15
  554. package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.d.ts.map +0 -1
  555. package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.js.map +0 -7
  556. package/dist/httpsnippet-lite/esm/targets/swift/target.d.ts +0 -25
  557. package/dist/httpsnippet-lite/esm/targets/swift/target.d.ts.map +0 -1
  558. package/dist/httpsnippet-lite/esm/targets/swift/target.js +0 -16
  559. package/dist/httpsnippet-lite/esm/targets/swift/target.js.map +0 -7
  560. package/dist/httpsnippet-lite/types/helpers/code-builder.d.js +0 -1
  561. package/dist/httpsnippet-lite/types/helpers/escape.d.js +0 -1
  562. package/dist/httpsnippet-lite/types/helpers/form-data.d.js +0 -28
  563. package/dist/httpsnippet-lite/types/helpers/form-data.d.js.map +0 -7
  564. package/dist/httpsnippet-lite/types/helpers/headers.d.js +0 -1
  565. package/dist/httpsnippet-lite/types/helpers/reducer.d.js +0 -1
  566. package/dist/httpsnippet-lite/types/helpers/reducer.d.js.map +0 -7
  567. package/dist/httpsnippet-lite/types/helpers/shell.d.js +0 -1
  568. package/dist/httpsnippet-lite/types/helpers/shell.d.js.map +0 -7
  569. package/dist/httpsnippet-lite/types/helpers/url.d.js +0 -1
  570. package/dist/httpsnippet-lite/types/helpers/url.d.js.map +0 -7
  571. package/dist/httpsnippet-lite/types/helpers/utils.d.js +0 -1
  572. package/dist/httpsnippet-lite/types/helpers/utils.d.js.map +0 -7
  573. package/dist/httpsnippet-lite/types/httpsnippet.d.js +0 -19
  574. package/dist/httpsnippet-lite/types/httpsnippet.d.js.map +0 -7
  575. package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js +0 -1
  576. package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js.map +0 -7
  577. package/dist/httpsnippet-lite/types/targets/c/target.d.js +0 -1
  578. package/dist/httpsnippet-lite/types/targets/c/target.d.js.map +0 -7
  579. package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js +0 -1
  580. package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js.map +0 -7
  581. package/dist/httpsnippet-lite/types/targets/clojure/target.d.js +0 -1
  582. package/dist/httpsnippet-lite/types/targets/clojure/target.d.js.map +0 -7
  583. package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js +0 -1
  584. package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js.map +0 -7
  585. package/dist/httpsnippet-lite/types/targets/csharp/target.d.js +0 -1
  586. package/dist/httpsnippet-lite/types/targets/csharp/target.d.js.map +0 -7
  587. package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js +0 -1
  588. package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js.map +0 -7
  589. package/dist/httpsnippet-lite/types/targets/dart/target.d.js +0 -1
  590. package/dist/httpsnippet-lite/types/targets/dart/target.d.js.map +0 -7
  591. package/dist/httpsnippet-lite/types/targets/go/native/client.d.js +0 -1
  592. package/dist/httpsnippet-lite/types/targets/go/native/client.d.js.map +0 -7
  593. package/dist/httpsnippet-lite/types/targets/go/target.d.js +0 -1
  594. package/dist/httpsnippet-lite/types/targets/go/target.d.js.map +0 -7
  595. package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js +0 -1
  596. package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js.map +0 -7
  597. package/dist/httpsnippet-lite/types/targets/http/target.d.js +0 -1
  598. package/dist/httpsnippet-lite/types/targets/http/target.d.js.map +0 -7
  599. package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js +0 -1
  600. package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js.map +0 -7
  601. package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js +0 -1
  602. package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js.map +0 -7
  603. package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js +0 -1
  604. package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js.map +0 -7
  605. package/dist/httpsnippet-lite/types/targets/java/target.d.js +0 -1
  606. package/dist/httpsnippet-lite/types/targets/java/target.d.js.map +0 -7
  607. package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js +0 -1
  608. package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js.map +0 -7
  609. package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js +0 -1
  610. package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js.map +0 -7
  611. package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js +0 -1
  612. package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js.map +0 -7
  613. package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js +0 -1
  614. package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js.map +0 -7
  615. package/dist/httpsnippet-lite/types/targets/javascript/target.d.js +0 -1
  616. package/dist/httpsnippet-lite/types/targets/javascript/target.d.js.map +0 -7
  617. package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js +0 -1
  618. package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js.map +0 -7
  619. package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js +0 -1
  620. package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js.map +0 -7
  621. package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js +0 -1
  622. package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js.map +0 -7
  623. package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js +0 -1
  624. package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js.map +0 -7
  625. package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js +0 -1
  626. package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js.map +0 -7
  627. package/dist/httpsnippet-lite/types/targets/node/native/client.d.js +0 -1
  628. package/dist/httpsnippet-lite/types/targets/node/native/client.d.js.map +0 -7
  629. package/dist/httpsnippet-lite/types/targets/node/request/client.d.js +0 -1
  630. package/dist/httpsnippet-lite/types/targets/node/request/client.d.js.map +0 -7
  631. package/dist/httpsnippet-lite/types/targets/node/target.d.js +0 -1
  632. package/dist/httpsnippet-lite/types/targets/node/target.d.js.map +0 -7
  633. package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js +0 -1
  634. package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js.map +0 -7
  635. package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js +0 -1
  636. package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js.map +0 -7
  637. package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js +0 -1
  638. package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js.map +0 -7
  639. package/dist/httpsnippet-lite/types/targets/objc/target.d.js +0 -1
  640. package/dist/httpsnippet-lite/types/targets/objc/target.d.js.map +0 -7
  641. package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js +0 -1
  642. package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js.map +0 -7
  643. package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js +0 -1
  644. package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js.map +0 -7
  645. package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js +0 -1
  646. package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js.map +0 -7
  647. package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js +0 -1
  648. package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js.map +0 -7
  649. package/dist/httpsnippet-lite/types/targets/php/helpers.d.js +0 -1
  650. package/dist/httpsnippet-lite/types/targets/php/helpers.d.js.map +0 -7
  651. package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js +0 -1
  652. package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js.map +0 -7
  653. package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js +0 -1
  654. package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js.map +0 -7
  655. package/dist/httpsnippet-lite/types/targets/php/target.d.js +0 -1
  656. package/dist/httpsnippet-lite/types/targets/php/target.d.js.map +0 -7
  657. package/dist/httpsnippet-lite/types/targets/powershell/common.d.js +0 -1
  658. package/dist/httpsnippet-lite/types/targets/powershell/common.d.js.map +0 -7
  659. package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js +0 -1
  660. package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js.map +0 -7
  661. package/dist/httpsnippet-lite/types/targets/powershell/target.d.js +0 -1
  662. package/dist/httpsnippet-lite/types/targets/powershell/target.d.js.map +0 -7
  663. package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js +0 -1
  664. package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js.map +0 -7
  665. package/dist/httpsnippet-lite/types/targets/python/helpers.d.js +0 -1
  666. package/dist/httpsnippet-lite/types/targets/python/helpers.d.js.map +0 -7
  667. package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js +0 -1
  668. package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js.map +0 -7
  669. package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js +0 -1
  670. package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js.map +0 -7
  671. package/dist/httpsnippet-lite/types/targets/python/target.d.js +0 -1
  672. package/dist/httpsnippet-lite/types/targets/python/target.d.js.map +0 -7
  673. package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js +0 -1
  674. package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js.map +0 -7
  675. package/dist/httpsnippet-lite/types/targets/r/target.d.js +0 -1
  676. package/dist/httpsnippet-lite/types/targets/r/target.d.js.map +0 -7
  677. package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js +0 -1
  678. package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js.map +0 -7
  679. package/dist/httpsnippet-lite/types/targets/ruby/target.d.js +0 -1
  680. package/dist/httpsnippet-lite/types/targets/ruby/target.d.js.map +0 -7
  681. package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js +0 -1
  682. package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js.map +0 -7
  683. package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js +0 -1
  684. package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js.map +0 -7
  685. package/dist/httpsnippet-lite/types/targets/shell/target.d.js +0 -1
  686. package/dist/httpsnippet-lite/types/targets/shell/target.d.js.map +0 -7
  687. package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js +0 -1
  688. package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js.map +0 -7
  689. package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js +0 -1
  690. package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js.map +0 -7
  691. package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js +0 -1
  692. package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js.map +0 -7
  693. package/dist/httpsnippet-lite/types/targets/swift/target.d.js +0 -1
  694. package/dist/httpsnippet-lite/types/targets/swift/target.d.js.map +0 -7
  695. package/dist/httpsnippet-lite/types/targets/targets.d.js +0 -1
  696. package/dist/httpsnippet-lite/types/targets/targets.d.js.map +0 -7
  697. /package/dist/httpsnippet-lite/{esm/helpers → helpers}/escape.js +0 -0
  698. /package/dist/httpsnippet-lite/{types/helpers/code-builder.d.js.map → helpers/reducer.js.map} +0 -0
  699. /package/dist/httpsnippet-lite/{types/helpers/escape.d.js.map → helpers/snippet-request.js.map} +0 -0
  700. /package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/restmethod/client.js +0 -0
  701. /package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/webrequest/client.js +0 -0
  702. /package/dist/httpsnippet-lite/{types/helpers/headers.d.js.map → targets/target.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/shell/wget/index.ts"],
4
- "sourcesContent": ["export * from './wget'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["export { shellWget } from './wget'\n"],
5
+ "mappings": "AAAA,SAAS,iBAAiB;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"wget.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/wget/wget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAQvB,CAAA"}
1
+ {"version":3,"file":"wget.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/wget/wget.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAKpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAQvB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { wget } from "../../../httpsnippet-lite/esm/targets/shell/wget/client.js";
1
+ import { wget } from "../../../httpsnippet-lite/targets/shell/wget/client.js";
2
2
  import { convertWithHttpSnippetLite } from "../../../utils/convertWithHttpSnippetLite.js";
3
3
  const shellWget = {
4
4
  target: "shell",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/shell/wget/wget.ts"],
4
- "sourcesContent": ["import { wget } from '@/httpsnippet-lite/esm/targets/shell/wget/client'\nimport { convertWithHttpSnippetLite } from '@/utils/convertWithHttpSnippetLite'\nimport type { Plugin } from '@scalar/types/snippetz'\n\n/**\n * shell/wget\n */\nexport const shellWget: Plugin = {\n target: 'shell',\n client: 'wget',\n title: 'Wget',\n generate(request) {\n // TODO: Write an own converter\n return convertWithHttpSnippetLite(wget, request)\n },\n}\n"],
5
- "mappings": "AAAA,SAAS,YAAY;AACrB,SAAS,kCAAkC;AAMpC,MAAM,YAAoB;AAAA,EAC/B,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS,SAAS;AAEhB,WAAO,2BAA2B,MAAM,OAAO;AAAA,EACjD;AACF;",
4
+ "sourcesContent": ["import type { Plugin } from '@scalar/types/snippetz'\n\nimport { wget } from '@/httpsnippet-lite/targets/shell/wget/client'\nimport { convertWithHttpSnippetLite } from '@/utils/convertWithHttpSnippetLite'\n\n/**\n * shell/wget\n */\nexport const shellWget: Plugin = {\n target: 'shell',\n client: 'wget',\n title: 'Wget',\n generate(request) {\n // TODO: Write an own converter\n return convertWithHttpSnippetLite(wget, request)\n },\n}\n"],
5
+ "mappings": "AAEA,SAAS,YAAY;AACrB,SAAS,kCAAkC;AAKpC,MAAM,YAAoB;AAAA,EAC/B,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS,SAAS;AAEhB,WAAO,2BAA2B,MAAM,OAAO;AAAA,EACjD;AACF;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from './nsurlsession.js';
1
+ export { swiftNsurlsession } from './nsurlsession.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAA"}
@@ -1,2 +1,5 @@
1
- export * from "./nsurlsession.js";
1
+ import { swiftNsurlsession } from "./nsurlsession.js";
2
+ export {
3
+ swiftNsurlsession
4
+ };
2
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/swift/nsurlsession/index.ts"],
4
- "sourcesContent": ["export * from './nsurlsession'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["export { swiftNsurlsession } from './nsurlsession'\n"],
5
+ "mappings": "AAAA,SAAS,yBAAyB;",
6
6
  "names": []
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAA"}
1
+ {"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAKpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAA"}
@@ -1,4 +1,4 @@
1
- import { nsurlsession } from "../../../httpsnippet-lite/esm/targets/swift/nsurlsession/client.js";
1
+ import { nsurlsession } from "../../../httpsnippet-lite/targets/swift/nsurlsession/client.js";
2
2
  import { convertWithHttpSnippetLite } from "../../../utils/convertWithHttpSnippetLite.js";
3
3
  const swiftNsurlsession = {
4
4
  target: "swift",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/plugins/swift/nsurlsession/nsurlsession.ts"],
4
- "sourcesContent": ["import { nsurlsession } from '@/httpsnippet-lite/esm/targets/swift/nsurlsession/client'\nimport { convertWithHttpSnippetLite } from '@/utils/convertWithHttpSnippetLite'\nimport type { Plugin } from '@scalar/types/snippetz'\n\n/**\n * swift/nsurlsession\n */\nexport const swiftNsurlsession: Plugin = {\n target: 'swift',\n client: 'nsurlsession',\n title: 'NSURLSession',\n generate(request) {\n // TODO: Write an own converter\n return convertWithHttpSnippetLite(nsurlsession, request)\n },\n}\n"],
5
- "mappings": "AAAA,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAMpC,MAAM,oBAA4B;AAAA,EACvC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS,SAAS;AAEhB,WAAO,2BAA2B,cAAc,OAAO;AAAA,EACzD;AACF;",
4
+ "sourcesContent": ["import type { Plugin } from '@scalar/types/snippetz'\n\nimport { nsurlsession } from '@/httpsnippet-lite/targets/swift/nsurlsession/client'\nimport { convertWithHttpSnippetLite } from '@/utils/convertWithHttpSnippetLite'\n\n/**\n * swift/nsurlsession\n */\nexport const swiftNsurlsession: Plugin = {\n target: 'swift',\n client: 'nsurlsession',\n title: 'NSURLSession',\n generate(request) {\n // TODO: Write an own converter\n return convertWithHttpSnippetLite(nsurlsession, request)\n },\n}\n"],
5
+ "mappings": "AAEA,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAKpC,MAAM,oBAA4B;AAAA,EACvC,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,SAAS,SAAS;AAEhB,WAAO,2BAA2B,cAAc,OAAO;AAAA,EACzD;AACF;",
6
6
  "names": []
7
7
  }
@@ -6,8 +6,8 @@ export declare function snippetz(): {
6
6
  print<T extends TargetId>(target: T, client: ClientId<T>, request: Partial<HarRequest>): string | undefined;
7
7
  clients(): import("@scalar/types/snippetz").Target[];
8
8
  plugins(): {
9
- target: "c" | "clojure" | "csharp" | "dart" | "http" | "fsharp" | "go" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "rust" | "shell" | "swift";
10
- client: "libcurl" | "clj_http" | "httpclient" | "restsharp" | "http" | "native" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "fetch" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "httpx_sync" | "httpx_async" | "httr" | "reqwest" | "httpie" | "wget";
9
+ target: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart" | "fsharp" | "js" | "rust";
10
+ client: "http" | "libcurl" | "clj_http" | "httpclient" | "restsharp" | "native" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "fetch" | "ofetch" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "httpx_sync" | "httpx_async" | "httr" | "httpie" | "wget" | "jquery" | "xhr" | "reqwest";
11
11
  }[];
12
12
  findPlugin: <T extends TargetId>(target: T | string, client: ClientId<T> | string) => import("@scalar/types/snippetz").Plugin | undefined;
13
13
  hasPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string): boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAE5E;;GAEG;AACH,wBAAgB,QAAQ;UAMd,CAAC,SAAS,QAAQ,UAAU,CAAC,UAAU,QAAQ,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,UAAU,CAAC;;;;;;iBALpE,CAAC,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;cAoB5E,CAAC,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;EAIjF"}
1
+ {"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAI5E;;GAEG;AACH,wBAAgB,QAAQ;UAMd,CAAC,SAAS,QAAQ,UAAU,CAAC,UAAU,QAAQ,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,UAAU,CAAC;;;;;;iBALpE,CAAC,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;cAoB5E,CAAC,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;EAIjF"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/snippetz.ts"],
4
- "sourcesContent": ["import { clients } from '@/clients'\nimport type { ClientId, HarRequest, TargetId } from '@scalar/types/snippetz'\n\n/**\n * Generate code examples for HAR requests\n */\nexport function snippetz() {\n function findPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string) {\n return clients.find(({ key }) => key === target)?.clients.find((plugin) => plugin.client === client)\n }\n\n return {\n print<T extends TargetId>(target: T, client: ClientId<T>, request: Partial<HarRequest>) {\n return findPlugin(target, client)?.generate(request)\n },\n clients() {\n return clients\n },\n plugins() {\n return clients.flatMap(({ key, clients }) =>\n clients.map((plugin) => ({\n target: key,\n client: plugin.client,\n })),\n )\n },\n findPlugin,\n hasPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string) {\n return Boolean(findPlugin(target, client))\n },\n }\n}\n"],
5
- "mappings": "AAAA,SAAS,eAAe;AAMjB,SAAS,WAAW;AACzB,WAAS,WAA+B,QAAoB,QAA8B;AACxF,WAAO,QAAQ,KAAK,CAAC,EAAE,IAAI,MAAM,QAAQ,MAAM,GAAG,QAAQ,KAAK,CAAC,WAAW,OAAO,WAAW,MAAM;AAAA,EACrG;AAEA,SAAO;AAAA,IACL,MAA0B,QAAW,QAAqB,SAA8B;AACtF,aAAO,WAAW,QAAQ,MAAM,GAAG,SAAS,OAAO;AAAA,IACrD;AAAA,IACA,UAAU;AACR,aAAO;AAAA,IACT;AAAA,IACA,UAAU;AACR,aAAO,QAAQ;AAAA,QAAQ,CAAC,EAAE,KAAK,SAAAA,SAAQ,MACrCA,SAAQ,IAAI,CAAC,YAAY;AAAA,UACvB,QAAQ;AAAA,UACR,QAAQ,OAAO;AAAA,QACjB,EAAE;AAAA,MACJ;AAAA,IACF;AAAA,IACA;AAAA,IACA,UAA8B,QAAoB,QAA8B;AAC9E,aAAO,QAAQ,WAAW,QAAQ,MAAM,CAAC;AAAA,IAC3C;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["import type { ClientId, HarRequest, TargetId } from '@scalar/types/snippetz'\n\nimport { clients } from '@/clients'\n\n/**\n * Generate code examples for HAR requests\n */\nexport function snippetz() {\n function findPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string) {\n return clients.find(({ key }) => key === target)?.clients.find((plugin) => plugin.client === client)\n }\n\n return {\n print<T extends TargetId>(target: T, client: ClientId<T>, request: Partial<HarRequest>) {\n return findPlugin(target, client)?.generate(request)\n },\n clients() {\n return clients\n },\n plugins() {\n return clients.flatMap(({ key, clients }) =>\n clients.map((plugin) => ({\n target: key,\n client: plugin.client,\n })),\n )\n },\n findPlugin,\n hasPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string) {\n return Boolean(findPlugin(target, client))\n },\n }\n}\n"],
5
+ "mappings": "AAEA,SAAS,eAAe;AAKjB,SAAS,WAAW;AACzB,WAAS,WAA+B,QAAoB,QAA8B;AACxF,WAAO,QAAQ,KAAK,CAAC,EAAE,IAAI,MAAM,QAAQ,MAAM,GAAG,QAAQ,KAAK,CAAC,WAAW,OAAO,WAAW,MAAM;AAAA,EACrG;AAEA,SAAO;AAAA,IACL,MAA0B,QAAW,QAAqB,SAA8B;AACtF,aAAO,WAAW,QAAQ,MAAM,GAAG,SAAS,OAAO;AAAA,IACrD;AAAA,IACA,UAAU;AACR,aAAO;AAAA,IACT;AAAA,IACA,UAAU;AACR,aAAO,QAAQ;AAAA,QAAQ,CAAC,EAAE,KAAK,SAAAA,SAAQ,MACrCA,SAAQ,IAAI,CAAC,YAAY;AAAA,UACvB,QAAQ;AAAA,UACR,QAAQ,OAAO;AAAA,QACjB,EAAE;AAAA,MACJ;AAAA,IACF;AAAA,IACA;AAAA,IACA,UAA8B,QAAoB,QAA8B;AAC9E,aAAO,QAAQ,WAAW,QAAQ,MAAM,CAAC;AAAA,IAC3C;AAAA,EACF;AACF;",
6
6
  "names": ["clients"]
7
7
  }
@@ -85,7 +85,7 @@ function convertWithHttpSnippetLite(client, request) {
85
85
  queryObj: queryObj ?? {},
86
86
  cookiesObj: cookiesObj ?? {}
87
87
  };
88
- if (convertRequest.postData?.mimeType === "application/json" && convertRequest.postData?.text) {
88
+ if (convertRequest.postData?.mimeType === "application/json" && convertRequest.postData.text) {
89
89
  try {
90
90
  convertRequest.postData.jsonObj = JSON.parse(convertRequest.postData.text);
91
91
  } catch (error) {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/convertWithHttpSnippetLite.ts"],
4
- "sourcesContent": ["import type { HarRequest } from '@scalar/types/snippetz'\n\nimport type { Request } from '@/httpsnippet-lite/types/httpsnippet'\n\n/**\n * Takes a httpsnippet-lite client and converts the given request to a code example with it.\n *\n * @deprecated This a temporary wrapper around httpsnippet-lite. Let's write all the generators ourselves instead.\n */\nexport function convertWithHttpSnippetLite(\n // Couldn't find the proper type, there was always a mismatch.\n client: Record<string, unknown>,\n request?: Partial<HarRequest>,\n): string {\n const urlObject = new URL(request?.url ?? '')\n\n // If it's just the domain, omit the trailing slash\n const url = urlObject.pathname === '/' ? urlObject.origin : urlObject.toString()\n\n const harRequest: HarRequest = {\n method: request?.method ?? 'GET',\n url,\n httpVersion: 'HTTP/1.1',\n cookies: [], // Cookies are handled through headers\n headers: request?.headers ?? [],\n headersSize: -1,\n bodySize: -1,\n queryString: Array.from(urlObject.searchParams.entries()).map(([name, value]) => ({\n name,\n value,\n })),\n postData: request?.postData,\n }\n\n const allHeaders = (harRequest?.headers ?? []).reduce(\n (acc, header) => ({\n ...acc,\n [header.name]: header.value,\n }),\n {} as Record<string, string>,\n )\n\n const queryObj = (harRequest.queryString ?? []).reduce(\n (acc, param) => ({\n ...acc,\n [param.name]: param.value,\n }),\n {} as Record<string, string>,\n )\n\n const cookiesObj = (harRequest.cookies ?? []).reduce(\n (acc, cookie) => ({\n ...acc,\n [cookie.name]: cookie.value,\n }),\n {} as Record<string, string>,\n )\n\n const parsedUrl = new URL(harRequest.url)\n const uriObj = {\n protocol: parsedUrl.protocol,\n hostname: parsedUrl.hostname,\n host: parsedUrl.hostname,\n port: parsedUrl.port,\n pathname:\n parsedUrl.pathname\n .split('/')\n .map((segment) => encodeURIComponent(decodeURIComponent(segment)))\n .join('/') + parsedUrl.search,\n path:\n parsedUrl.pathname\n .split('/')\n .map((segment) => encodeURIComponent(decodeURIComponent(segment)))\n .join('/') + parsedUrl.search,\n search: parsedUrl.search,\n hash: parsedUrl.hash,\n href: parsedUrl.href,\n origin: parsedUrl.origin,\n password: parsedUrl.password,\n searchParams: parsedUrl.searchParams,\n username: parsedUrl.username,\n toString: parsedUrl.toString,\n toJSON: () => parsedUrl.toJSON(),\n }\n\n const convertRequest = {\n url: harRequest.url,\n uriObj,\n method: harRequest.method?.toLocaleUpperCase() ?? 'GET',\n httpVersion: harRequest.httpVersion,\n cookies: harRequest.cookies ?? [],\n headers: harRequest.headers ?? [],\n headersSize: harRequest.headersSize ?? 0,\n headersObj: allHeaders ?? {},\n bodySize: harRequest.bodySize ?? 0,\n queryString: harRequest.queryString ?? [],\n postData: harRequest.postData\n ? {\n mimeType: harRequest.postData.mimeType ?? 'application/json',\n text: harRequest.postData.text ?? '',\n params: harRequest.postData.params ?? [],\n paramsObj:\n harRequest.postData.params?.reduce(\n (acc, param) => {\n if (param.name && param.value !== undefined) {\n acc[param.name] = param.value\n }\n return acc\n },\n {} as Record<string, string>,\n ) ?? {},\n }\n : undefined,\n allHeaders: allHeaders ?? {},\n fullUrl: harRequest.url,\n queryObj: queryObj ?? {},\n cookiesObj: cookiesObj ?? {},\n } as Request\n\n // If the request is a JSON request, parse the text as JSON\n if (convertRequest.postData?.mimeType === 'application/json' && convertRequest.postData?.text) {\n try {\n convertRequest.postData.jsonObj = JSON.parse(convertRequest.postData.text)\n } catch (error) {\n console.error('Error parsing JSON:', error)\n }\n }\n\n if (typeof client.convert === 'function') {\n return client.convert(convertRequest)\n }\n\n return ''\n}\n"],
5
- "mappings": "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",
4
+ "sourcesContent": ["import type { HarRequest } from '@scalar/types/snippetz'\n\nimport type { SnippetRequest } from '@/httpsnippet-lite/helpers/snippet-request'\n\n/**\n * Takes a httpsnippet-lite client and converts the given request to a code example with it.\n *\n * @deprecated This a temporary wrapper around httpsnippet-lite. Let's write all the generators ourselves instead.\n */\nexport function convertWithHttpSnippetLite(\n // Couldn't find the proper type, there was always a mismatch.\n client: Record<string, unknown>,\n request?: Partial<HarRequest>,\n): string {\n const urlObject = new URL(request?.url ?? '')\n\n // If it's just the domain, omit the trailing slash\n const url = urlObject.pathname === '/' ? urlObject.origin : urlObject.toString()\n\n const harRequest: HarRequest = {\n method: request?.method ?? 'GET',\n url,\n httpVersion: 'HTTP/1.1',\n cookies: [], // Cookies are handled through headers\n headers: request?.headers ?? [],\n headersSize: -1,\n bodySize: -1,\n queryString: Array.from(urlObject.searchParams.entries()).map(([name, value]) => ({\n name,\n value,\n })),\n postData: request?.postData,\n }\n\n const allHeaders = (harRequest?.headers ?? []).reduce(\n (acc, header) => ({\n ...acc,\n [header.name]: header.value,\n }),\n {} as Record<string, string>,\n )\n\n const queryObj = (harRequest.queryString ?? []).reduce(\n (acc, param) => ({\n ...acc,\n [param.name]: param.value,\n }),\n {} as Record<string, string>,\n )\n\n const cookiesObj = (harRequest.cookies ?? []).reduce(\n (acc, cookie) => ({\n ...acc,\n [cookie.name]: cookie.value,\n }),\n {} as Record<string, string>,\n )\n\n const parsedUrl = new URL(harRequest.url)\n const uriObj = {\n protocol: parsedUrl.protocol,\n hostname: parsedUrl.hostname,\n host: parsedUrl.hostname,\n port: parsedUrl.port,\n pathname:\n parsedUrl.pathname\n .split('/')\n .map((segment) => encodeURIComponent(decodeURIComponent(segment)))\n .join('/') + parsedUrl.search,\n path:\n parsedUrl.pathname\n .split('/')\n .map((segment) => encodeURIComponent(decodeURIComponent(segment)))\n .join('/') + parsedUrl.search,\n search: parsedUrl.search,\n hash: parsedUrl.hash,\n href: parsedUrl.href,\n origin: parsedUrl.origin,\n password: parsedUrl.password,\n searchParams: parsedUrl.searchParams,\n username: parsedUrl.username,\n toString: parsedUrl.toString,\n toJSON: () => parsedUrl.toJSON(),\n }\n\n const convertRequest = {\n url: harRequest.url,\n uriObj,\n method: harRequest.method?.toLocaleUpperCase() ?? 'GET',\n httpVersion: harRequest.httpVersion,\n cookies: harRequest.cookies ?? [],\n headers: harRequest.headers ?? [],\n headersSize: harRequest.headersSize ?? 0,\n headersObj: allHeaders ?? {},\n bodySize: harRequest.bodySize ?? 0,\n queryString: harRequest.queryString ?? [],\n postData: harRequest.postData\n ? {\n mimeType: harRequest.postData.mimeType ?? 'application/json',\n text: harRequest.postData.text ?? '',\n params: harRequest.postData.params ?? [],\n paramsObj:\n harRequest.postData.params?.reduce(\n (acc, param) => {\n if (param.name && param.value !== undefined) {\n acc[param.name] = param.value\n }\n return acc\n },\n {} as Record<string, string>,\n ) ?? {},\n }\n : undefined,\n allHeaders: allHeaders ?? {},\n fullUrl: harRequest.url,\n queryObj: queryObj ?? {},\n cookiesObj: cookiesObj ?? {},\n } as SnippetRequest\n\n // If the request is a JSON request, parse the text as JSON\n if (convertRequest.postData?.mimeType === 'application/json' && convertRequest.postData!.text) {\n try {\n convertRequest.postData.jsonObj = JSON.parse(convertRequest.postData.text)\n } catch (error) {\n console.error('Error parsing JSON:', error)\n }\n }\n\n if (typeof client.convert === 'function') {\n return client.convert(convertRequest)\n }\n\n return ''\n}\n"],
5
+ "mappings": "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",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from './convertWithHttpSnippetLite.js';
1
+ export { convertWithHttpSnippetLite } from './convertWithHttpSnippetLite.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,8BAA8B,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAA"}
@@ -1,2 +1,5 @@
1
- export * from "./convertWithHttpSnippetLite.js";
1
+ import { convertWithHttpSnippetLite } from "./convertWithHttpSnippetLite.js";
2
+ export {
3
+ convertWithHttpSnippetLite
4
+ };
2
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/utils/index.ts"],
4
- "sourcesContent": ["export * from './convertWithHttpSnippetLite'\n"],
5
- "mappings": "AAAA,cAAc;",
4
+ "sourcesContent": ["export { convertWithHttpSnippetLite } from './convertWithHttpSnippetLite'\n"],
5
+ "mappings": "AAAA,SAAS,kCAAkC;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "url": "git+https://github.com/scalar/scalar.git",
10
10
  "directory": "packages/snippetz"
11
11
  },
12
- "version": "0.5.4",
12
+ "version": "0.6.1",
13
13
  "engines": {
14
14
  "node": ">=20"
15
15
  },
@@ -230,11 +230,12 @@
230
230
  "dependencies": {
231
231
  "js-base64": "^3.7.8",
232
232
  "stringify-object": "^5.0.0",
233
- "@scalar/types": "0.5.1"
233
+ "@scalar/types": "0.5.4"
234
234
  },
235
235
  "devDependencies": {
236
+ "@types/stringify-object": "^4.0.5",
236
237
  "vite": "7.1.11",
237
- "@scalar/build-tooling": "0.3.1"
238
+ "@scalar/build-tooling": "0.4.0"
238
239
  },
239
240
  "scripts": {
240
241
  "build": "scalar-build-esbuild",
@@ -1,8 +0,0 @@
1
- export declare class CodeBuilder {
2
- /**
3
- * Helper object to format and aggragate lines of code.
4
- * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.
5
- */
6
- constructor({ indent, join }?: {});
7
- }
8
- //# sourceMappingURL=code-builder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"code-builder.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/code-builder.ts"],"names":[],"mappings":"AAGA,qBAAa,WAAW;IACtB;;;OAGG;gBACS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK;CAqDlC"}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/code-builder.ts"],
4
- "sourcesContent": ["// @ts-nocheck\nconst DEFAULT_INDENTATION_CHARACTER = ''\nconst DEFAULT_LINE_JOIN = '\\n'\nexport class CodeBuilder {\n /**\n * Helper object to format and aggragate lines of code.\n * Lines are aggregated in a `code` array, and need to be joined to obtain a proper code snippet.\n */\n constructor({ indent, join } = {}) {\n this.postProcessors = []\n this.code = []\n this.indentationCharacter = DEFAULT_INDENTATION_CHARACTER\n this.lineJoin = DEFAULT_LINE_JOIN\n /**\n * Add given indentation level to given line of code\n */\n this.indentLine = (line, indentationLevel = 0) => {\n const whitespace = this.indentationCharacter.repeat(indentationLevel)\n return `${whitespace}${line}`\n }\n /**\n * Add the line at the beginning of the current lines\n */\n this.unshift = (line, indentationLevel) => {\n const newLine = this.indentLine(line, indentationLevel)\n this.code.unshift(newLine)\n }\n /**\n * Add the line at the end of the current lines\n */\n this.push = (line, indentationLevel) => {\n const newLine = this.indentLine(line, indentationLevel)\n this.code.push(newLine)\n }\n /**\n * Add an empty line at the end of current lines\n */\n this.blank = () => {\n this.code.push('')\n }\n /**\n * Concatenate all current lines using the given lineJoin, then apply any replacers that may have been added\n */\n this.join = () => {\n const unreplacedCode = this.code.join(this.lineJoin)\n const replacedOutput = this.postProcessors.reduce(\n (accumulator, replacer) => replacer(accumulator),\n unreplacedCode,\n )\n return replacedOutput\n }\n /**\n * Often when writing modules you may wish to add a literal tag or bit of metadata that you wish to transform after other processing as a final step.\n * To do so, you can provide a PostProcessor function and it will be run automatically for you when you call `join()` later on.\n */\n this.addPostProcessor = (postProcessor) => {\n this.postProcessors = [...this.postProcessors, postProcessor]\n }\n this.indentationCharacter = indent || DEFAULT_INDENTATION_CHARACTER\n this.lineJoin = join !== null && join !== void 0 ? join : DEFAULT_LINE_JOIN\n }\n}\n"],
5
- "mappings": "AACA,MAAM,gCAAgC;AACtC,MAAM,oBAAoB;AACnB,MAAM,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,EAKvB,YAAY,EAAE,QAAQ,KAAK,IAAI,CAAC,GAAG;AACjC,SAAK,iBAAiB,CAAC;AACvB,SAAK,OAAO,CAAC;AACb,SAAK,uBAAuB;AAC5B,SAAK,WAAW;AAIhB,SAAK,aAAa,CAAC,MAAM,mBAAmB,MAAM;AAChD,YAAM,aAAa,KAAK,qBAAqB,OAAO,gBAAgB;AACpE,aAAO,GAAG,UAAU,GAAG,IAAI;AAAA,IAC7B;AAIA,SAAK,UAAU,CAAC,MAAM,qBAAqB;AACzC,YAAM,UAAU,KAAK,WAAW,MAAM,gBAAgB;AACtD,WAAK,KAAK,QAAQ,OAAO;AAAA,IAC3B;AAIA,SAAK,OAAO,CAAC,MAAM,qBAAqB;AACtC,YAAM,UAAU,KAAK,WAAW,MAAM,gBAAgB;AACtD,WAAK,KAAK,KAAK,OAAO;AAAA,IACxB;AAIA,SAAK,QAAQ,MAAM;AACjB,WAAK,KAAK,KAAK,EAAE;AAAA,IACnB;AAIA,SAAK,OAAO,MAAM;AAChB,YAAM,iBAAiB,KAAK,KAAK,KAAK,KAAK,QAAQ;AACnD,YAAM,iBAAiB,KAAK,eAAe;AAAA,QACzC,CAAC,aAAa,aAAa,SAAS,WAAW;AAAA,QAC/C;AAAA,MACF;AACA,aAAO;AAAA,IACT;AAKA,SAAK,mBAAmB,CAAC,kBAAkB;AACzC,WAAK,iBAAiB,CAAC,GAAG,KAAK,gBAAgB,aAAa;AAAA,IAC9D;AACA,SAAK,uBAAuB,UAAU;AACtC,SAAK,WAAW,SAAS,QAAQ,SAAS,SAAS,OAAO;AAAA,EAC5D;AACF;",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"escape.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/escape.ts"],"names":[],"mappings":"AACA;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,QAAQ,KAAA,EAAE,OAAO,KAAK,UAmClD;AACD;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAK,WACF,CAAA;AACzC;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAK,WACF,CAAA"}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/escape.ts"],
4
- "sourcesContent": ["// @ts-nocheck\n/**\n * Escape characters within a value to make it safe to insert directly into a\n * snippet. Takes options which define the escape requirements.\n *\n * This is closely based on the JSON-stringify string serialization algorithm,\n * but generalized for other string delimiters (e.g. \" or ') and different escape\n * characters (e.g. Powershell uses `)\n *\n * See https://tc39.es/ecma262/multipage/structured-data.html#sec-quotejsonstring\n * for the complete original algorithm.\n */\nexport function escapeString(rawValue, options = {}) {\n const { delimiter = '\"', escapeChar = '\\\\', escapeNewlines = true } = options\n const stringValue = rawValue.toString()\n return [...stringValue]\n .map((c) => {\n if (c === '\\b') {\n return `${escapeChar}b`\n }if (c === '\\t') {\n return `${escapeChar}t`\n }if (c === '\\n') {\n if (escapeNewlines) {\n return `${escapeChar}n`\n }\n return c // Don't just continue, or this is caught by < \\u0020\n }if (c === '\\f') {\n return `${escapeChar}f`\n }if (c === '\\r') {\n if (escapeNewlines) {\n return `${escapeChar}r`\n }\n return c // Don't just continue, or this is caught by < \\u0020\n }if (c === escapeChar) {\n return escapeChar + escapeChar\n }if (c === delimiter) {\n return escapeChar + delimiter\n }if (c < '\\u0020' || c > '\\u007E') {\n // Delegate the trickier non-ASCII cases to the normal algorithm. Some of these\n // are escaped as \\uXXXX, whilst others are represented literally. Since we're\n // using this primarily for header values that are generally (though not 100%\n // strictly?) ASCII-only, this should almost never happen.\n return JSON.stringify(c).slice(1, -1)\n }\n return c\n })\n .join('')\n}\n/**\n * Make a string value safe to insert literally into a snippet within single quotes,\n * by escaping problematic characters, including single quotes inside the string,\n * backslashes, newlines, and other special characters.\n *\n * If value is not a string, it will be stringified with .toString() first.\n */\nexport const escapeForSingleQuotes = (value) =>\n escapeString(value, { delimiter: \"'\" })\n/**\n * Make a string value safe to insert literally into a snippet within double quotes,\n * by escaping problematic characters, including double quotes inside the string,\n * backslashes, newlines, and other special characters.\n *\n * If value is not a string, it will be stringified with .toString() first.\n */\nexport const escapeForDoubleQuotes = (value) =>\n escapeString(value, { delimiter: '\"' })\n"],
5
- "mappings": "AAYO,SAAS,aAAa,UAAU,UAAU,CAAC,GAAG;AACnD,QAAM,EAAE,YAAY,KAAK,aAAa,MAAM,iBAAiB,KAAK,IAAI;AACtE,QAAM,cAAc,SAAS,SAAS;AACtC,SAAO,CAAC,GAAG,WAAW,EACnB,IAAI,CAAC,MAAM;AACV,QAAI,MAAM,MAAM;AACd,aAAO,GAAG,UAAU;AAAA,IACtB;AAAC,QAAI,MAAM,KAAM;AACf,aAAO,GAAG,UAAU;AAAA,IACtB;AAAC,QAAI,MAAM,MAAM;AACf,UAAI,gBAAgB;AAClB,eAAO,GAAG,UAAU;AAAA,MACtB;AACA,aAAO;AAAA,IACT;AAAC,QAAI,MAAM,MAAM;AACf,aAAO,GAAG,UAAU;AAAA,IACtB;AAAC,QAAI,MAAM,MAAM;AACf,UAAI,gBAAgB;AAClB,eAAO,GAAG,UAAU;AAAA,MACtB;AACA,aAAO;AAAA,IACT;AAAC,QAAI,MAAM,YAAY;AACrB,aAAO,aAAa;AAAA,IACtB;AAAC,QAAI,MAAM,WAAW;AACpB,aAAO,aAAa;AAAA,IACtB;AAAC,QAAI,IAAI,OAAY,IAAI,KAAU;AAKjC,aAAO,KAAK,UAAU,CAAC,EAAE,MAAM,GAAG,EAAE;AAAA,IACtC;AACA,WAAO;AAAA,EACT,CAAC,EACA,KAAK,EAAE;AACZ;AAQO,MAAM,wBAAwB,CAAC,UACpC,aAAa,OAAO,EAAE,WAAW,IAAI,CAAC;AAQjC,MAAM,wBAAwB,CAAC,UACpC,aAAa,OAAO,EAAE,WAAW,IAAI,CAAC;",
6
- "names": []
7
- }
@@ -1,3 +0,0 @@
1
- export declare const isBlob: (object: any) => boolean;
2
- export declare const formDataIterator: (form: any, boundary: any) => AsyncGenerator<any, void, unknown>;
3
- //# sourceMappingURL=form-data.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"form-data.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/form-data.ts"],"names":[],"mappings":"AA+BA,eAAO,MAAM,MAAM,GAAI,WAAM,YAMO,CAAA;AAapC,eAAO,MAAM,gBAAgB,GAAoB,SAAI,EAAE,aAAQ,uCAW9D,CAAA"}
@@ -1,59 +0,0 @@
1
- /**
2
- * @license https://raw.githubusercontent.com/node-fetch/node-fetch/master/LICENSE.md
3
- *
4
- * The MIT License (MIT)
5
- *
6
- * Copyright (c) 2016 - 2020 Node Fetch Team
7
- *
8
- * Permission is hereby granted, free of charge, to any person obtaining a copy
9
- * of this software and associated documentation files (the "Software"), to deal
10
- * in the Software without restriction, including without limitation the rights
11
- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
- * copies of the Software, and to permit persons to whom the Software is
13
- * furnished to do so, subject to the following conditions:
14
- *
15
- * The above copyright notice and this permission notice shall be included in all
16
- * copies or substantial portions of the Software.
17
- *
18
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
- * SOFTWARE.
25
- *
26
- * Extracted from https://github.com/node-fetch/node-fetch/blob/64c5c296a0250b852010746c76144cb9e14698d9/src/utils/form-data.js
27
- */
28
- const carriage = "\r\n";
29
- const dashes = "-".repeat(2);
30
- const NAME = Symbol.toStringTag;
31
- const isBlob = (object) => typeof object === "object" && typeof object.arrayBuffer === "function" && typeof object.type === "string" && typeof object.stream === "function" && typeof object.constructor === "function" && /^(Blob|File)$/.test(object[NAME]);
32
- const getFooter = (boundary) => `${dashes}${boundary}${dashes}${carriage.repeat(1)}`;
33
- const getHeader = (boundary, name, field) => {
34
- let header = "";
35
- header += `${dashes}${boundary}${carriage}`;
36
- header += `Content-Disposition: form-data; name="${name}"`;
37
- if (typeof field !== "string" && field.name !== "blob") {
38
- header += `; filename="${field.name}"${carriage}`;
39
- header += `Content-Type: ${field.type || "application/octet-stream"}`;
40
- }
41
- return `${header}${carriage.repeat(2)}`;
42
- };
43
- const formDataIterator = async function* (form, boundary) {
44
- for (const [name, value] of form) {
45
- yield getHeader(boundary, name, value);
46
- if (typeof value === "string") {
47
- yield value;
48
- } else {
49
- yield await value.text();
50
- }
51
- yield carriage;
52
- }
53
- yield getFooter(boundary);
54
- };
55
- export {
56
- formDataIterator,
57
- isBlob
58
- };
59
- //# sourceMappingURL=form-data.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/form-data.ts"],
4
- "sourcesContent": ["// @ts-nocheck\n/**\n * @license https://raw.githubusercontent.com/node-fetch/node-fetch/master/LICENSE.md\n *\n * The MIT License (MIT)\n *\n * Copyright (c) 2016 - 2020 Node Fetch Team\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * Extracted from https://github.com/node-fetch/node-fetch/blob/64c5c296a0250b852010746c76144cb9e14698d9/src/utils/form-data.js\n */\nconst carriage = '\\r\\n'\nconst dashes = '-'.repeat(2)\nconst NAME = Symbol.toStringTag\nexport const isBlob = (object) =>\n typeof object === 'object' &&\n typeof object.arrayBuffer === 'function' &&\n typeof object.type === 'string' &&\n typeof object.stream === 'function' &&\n typeof object.constructor === 'function' &&\n /^(Blob|File)$/.test(object[NAME])\nconst getFooter = (boundary) =>\n `${dashes}${boundary}${dashes}${carriage.repeat(1)}`\nconst getHeader = (boundary, name, field) => {\n let header = ''\n header += `${dashes}${boundary}${carriage}`\n header += `Content-Disposition: form-data; name=\"${name}\"`\n if (typeof field !== 'string' && field.name !== 'blob') {\n header += `; filename=\"${field.name}\"${carriage}`\n header += `Content-Type: ${field.type || 'application/octet-stream'}`\n }\n return `${header}${carriage.repeat(2)}`\n}\nexport const formDataIterator = async function* (form, boundary) {\n for (const [name, value] of form) {\n yield getHeader(boundary, name, value)\n if (typeof value === 'string') {\n yield value\n } else {\n yield await value.text()\n }\n yield carriage\n }\n yield getFooter(boundary)\n}\n"],
5
- "mappings": "AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA2BA,MAAM,WAAW;AACjB,MAAM,SAAS,IAAI,OAAO,CAAC;AAC3B,MAAM,OAAO,OAAO;AACb,MAAM,SAAS,CAAC,WACrB,OAAO,WAAW,YAClB,OAAO,OAAO,gBAAgB,cAC9B,OAAO,OAAO,SAAS,YACvB,OAAO,OAAO,WAAW,cACzB,OAAO,OAAO,gBAAgB,cAC9B,gBAAgB,KAAK,OAAO,IAAI,CAAC;AACnC,MAAM,YAAY,CAAC,aACjB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,OAAO,CAAC,CAAC;AACpD,MAAM,YAAY,CAAC,UAAU,MAAM,UAAU;AAC3C,MAAI,SAAS;AACb,YAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ;AACzC,YAAU,yCAAyC,IAAI;AACvD,MAAI,OAAO,UAAU,YAAY,MAAM,SAAS,QAAQ;AACtD,cAAU,eAAe,MAAM,IAAI,IAAI,QAAQ;AAC/C,cAAU,iBAAiB,MAAM,QAAQ,0BAA0B;AAAA,EACrE;AACA,SAAO,GAAG,MAAM,GAAG,SAAS,OAAO,CAAC,CAAC;AACvC;AACO,MAAM,mBAAmB,iBAAiB,MAAM,UAAU;AAC/D,aAAW,CAAC,MAAM,KAAK,KAAK,MAAM;AAChC,UAAM,UAAU,UAAU,MAAM,KAAK;AACrC,QAAI,OAAO,UAAU,UAAU;AAC7B,YAAM;AAAA,IACR,OAAO;AACL,YAAM,MAAM,MAAM,KAAK;AAAA,IACzB;AACA,UAAM;AAAA,EACR;AACA,QAAM,UAAU,QAAQ;AAC1B;",
6
- "names": []
7
- }
@@ -1,17 +0,0 @@
1
- /**
2
- * Given a headers object retrieve a specific header out of it via a case-insensitive key.
3
- */
4
- export declare const getHeaderName: (headers: any, name: any) => string | undefined;
5
- /**
6
- * Given a headers object retrieve the contents of a header out of it via a case-insensitive key.
7
- */
8
- export declare const getHeader: (headers: any, name: any) => any;
9
- /**
10
- * Determine if a given case-insensitive header exists within a header object.
11
- */
12
- export declare const hasHeader: (headers: any, name: any) => boolean;
13
- /**
14
- * Determines if a given mimetype is JSON, or a variant of such.
15
- */
16
- export declare const isMimeTypeJSON: (mimeType: any) => boolean;
17
- //# sourceMappingURL=headers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"headers.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/headers.ts"],"names":[],"mappings":"AACA;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,YAAO,EAAE,SAAI,uBAGxC,CAAA;AACH;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,YAAO,EAAE,SAAI,QAMtC,CAAA;AACD;;GAEG;AACH,eAAO,MAAM,SAAS,GAAI,YAAO,EAAE,SAAI,YACA,CAAA;AAQvC;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,aAAQ,YACe,CAAA"}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/headers.ts"],
4
- "sourcesContent": ["// @ts-nocheck\n/**\n * Given a headers object retrieve a specific header out of it via a case-insensitive key.\n */\nexport const getHeaderName = (headers, name) =>\n Object.keys(headers).find(\n (header) => header.toLowerCase() === name.toLowerCase(),\n )\n/**\n * Given a headers object retrieve the contents of a header out of it via a case-insensitive key.\n */\nexport const getHeader = (headers, name) => {\n const headerName = getHeaderName(headers, name)\n if (!headerName) {\n return undefined\n }\n return headers[headerName]\n}\n/**\n * Determine if a given case-insensitive header exists within a header object.\n */\nexport const hasHeader = (headers, name) =>\n Boolean(getHeaderName(headers, name))\nconst mimeTypeJson = [\n 'application/json',\n 'application/x-json',\n 'text/json',\n 'text/x-json',\n '+json',\n]\n/**\n * Determines if a given mimetype is JSON, or a variant of such.\n */\nexport const isMimeTypeJSON = (mimeType) =>\n mimeTypeJson.some((type) => mimeType.includes(type))\n"],
5
- "mappings": "AAIO,MAAM,gBAAgB,CAAC,SAAS,SACrC,OAAO,KAAK,OAAO,EAAE;AAAA,EACnB,CAAC,WAAW,OAAO,YAAY,MAAM,KAAK,YAAY;AACxD;AAIK,MAAM,YAAY,CAAC,SAAS,SAAS;AAC1C,QAAM,aAAa,cAAc,SAAS,IAAI;AAC9C,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AACA,SAAO,QAAQ,UAAU;AAC3B;AAIO,MAAM,YAAY,CAAC,SAAS,SACjC,QAAQ,cAAc,SAAS,IAAI,CAAC;AACtC,MAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAIO,MAAM,iBAAiB,CAAC,aAC7B,aAAa,KAAK,CAAC,SAAS,SAAS,SAAS,IAAI,CAAC;",
6
- "names": []
7
- }
@@ -1,2 +0,0 @@
1
- export declare const reducer: (accumulator: any, pair: any) => any;
2
- //# sourceMappingURL=reducer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"reducer.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/reducer.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,OAAO,GAAI,gBAAW,EAAE,SAAI,QAiBxC,CAAA"}
@@ -1,20 +0,0 @@
1
- const reducer = (accumulator, pair) => {
2
- if (pair.value === void 0) {
3
- return accumulator;
4
- }
5
- const currentValue = accumulator[pair.name];
6
- if (currentValue === void 0) {
7
- accumulator[pair.name] = pair.value;
8
- return accumulator;
9
- }
10
- if (Array.isArray(currentValue)) {
11
- currentValue.push(pair.value);
12
- return accumulator;
13
- }
14
- accumulator[pair.name] = [currentValue, pair.value];
15
- return accumulator;
16
- };
17
- export {
18
- reducer
19
- };
20
- //# sourceMappingURL=reducer.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/reducer.ts"],
4
- "sourcesContent": ["// @ts-nocheck\nexport const reducer = (accumulator, pair) => {\n if (pair.value === void 0) {\n return accumulator\n }\n const currentValue = accumulator[pair.name]\n if (currentValue === undefined) {\n accumulator[pair.name] = pair.value\n return accumulator\n }\n // If we already have it as array just push the value\n if (Array.isArray(currentValue)) {\n currentValue.push(pair.value)\n return accumulator\n }\n // convert to array since now we have more than one value for this key\n accumulator[pair.name] = [currentValue, pair.value]\n return accumulator\n}\n"],
5
- "mappings": "AACO,MAAM,UAAU,CAAC,aAAa,SAAS;AAC5C,MAAI,KAAK,UAAU,QAAQ;AACzB,WAAO;AAAA,EACT;AACA,QAAM,eAAe,YAAY,KAAK,IAAI;AAC1C,MAAI,iBAAiB,QAAW;AAC9B,gBAAY,KAAK,IAAI,IAAI,KAAK;AAC9B,WAAO;AAAA,EACT;AAEA,MAAI,MAAM,QAAQ,YAAY,GAAG;AAC/B,iBAAa,KAAK,KAAK,KAAK;AAC5B,WAAO;AAAA,EACT;AAEA,cAAY,KAAK,IAAI,IAAI,CAAC,cAAc,KAAK,KAAK;AAClD,SAAO;AACT;",
6
- "names": []
7
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"shell.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/shell.ts"],"names":[],"mappings":"AACA;;;GAGG;AACH,eAAO,MAAM,KAAK,GAAI,cAAU,WAQ/B,CAAA;AACD,eAAO,MAAM,MAAM,GAAI,UAAK,QACuB,CAAA"}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/shell.ts"],
4
- "sourcesContent": ["// @ts-nocheck\n/**\n * Use 'strong quoting' using single quotes so that we only need to deal with nested single quote characters.\n * see: http://wiki.bash-hackers.org/syntax/quoting#strong_quoting\n */\nexport const quote = (value = '') => {\n const safe = /^[a-z0-9-_/.@%^=:]+$/i\n const isShellSafe = safe.test(value)\n if (isShellSafe) {\n return value\n }\n // if the value is not shell safe, then quote it\n return `'${value.replace(/'/g, \"'\\\\''\")}'`\n}\nexport const escape = (value) =>\n value.replace(/\\r/g, '\\\\r').replace(/\\n/g, '\\\\n')\n"],
5
- "mappings": "AAKO,MAAM,QAAQ,CAAC,QAAQ,OAAO;AACnC,QAAM,OAAO;AACb,QAAM,cAAc,KAAK,KAAK,KAAK;AACnC,MAAI,aAAa;AACf,WAAO;AAAA,EACT;AAEA,SAAO,IAAI,MAAM,QAAQ,MAAM,OAAO,CAAC;AACzC;AACO,MAAM,SAAS,CAAC,UACrB,MAAM,QAAQ,OAAO,KAAK,EAAE,QAAQ,OAAO,KAAK;",
6
- "names": []
7
- }
@@ -1,5 +0,0 @@
1
- export declare function toSearchParams(obj: any): URLSearchParams;
2
- export declare class ExtendedURL extends URL {
3
- get path(): string;
4
- }
5
- //# sourceMappingURL=url.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"url.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/url.ts"],"names":[],"mappings":"AACA,wBAAgB,cAAc,CAAC,GAAG,KAAA,mBAUjC;AACD,qBAAa,WAAY,SAAQ,GAAG;IAClC,IAAI,IAAI,WAEP;CACF"}
@@ -1,20 +0,0 @@
1
- function toSearchParams(obj) {
2
- return new URLSearchParams(
3
- Object.entries(obj).flatMap(([key, value]) => {
4
- if (Array.isArray(value)) {
5
- return value.map((v) => [key, v]);
6
- }
7
- return [[key, value]];
8
- })
9
- );
10
- }
11
- class ExtendedURL extends URL {
12
- get path() {
13
- return this.pathname + this.search;
14
- }
15
- }
16
- export {
17
- ExtendedURL,
18
- toSearchParams
19
- };
20
- //# sourceMappingURL=url.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/url.ts"],
4
- "sourcesContent": ["// @ts-nocheck\nexport function toSearchParams(obj) {\n return new URLSearchParams(\n Object.entries(obj)\n .flatMap(([key, value]) => {\n if (Array.isArray(value)) {\n return value.map((v) => [key, v])\n }\n return [[key, value]]\n }),\n )\n}\nexport class ExtendedURL extends URL {\n get path() {\n return this.pathname + this.search\n }\n}\n"],
5
- "mappings": "AACO,SAAS,eAAe,KAAK;AAClC,SAAO,IAAI;AAAA,IACT,OAAO,QAAQ,GAAG,EACf,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AACzB,UAAI,MAAM,QAAQ,KAAK,GAAG;AACxB,eAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AAAA,MAClC;AACA,aAAO,CAAC,CAAC,KAAK,KAAK,CAAC;AAAA,IACtB,CAAC;AAAA,EACL;AACF;AACO,MAAM,oBAAoB,IAAI;AAAA,EACnC,IAAI,OAAO;AACT,WAAO,KAAK,WAAW,KAAK;AAAA,EAC9B;AACF;",
6
- "names": []
7
- }
@@ -1,3 +0,0 @@
1
- export declare const availableTargets: () => any[];
2
- export declare const extname: (targetId: any) => any;
3
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/httpsnippet-lite/esm/helpers/utils.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,gBAAgB,aAMxB,CAAA;AACL,eAAO,MAAM,OAAO,GAAI,aAAQ,QAO/B,CAAA"}
@@ -1,16 +0,0 @@
1
- import { targets } from "../targets/targets.js";
2
- const availableTargets = () => Object.keys(targets).map((targetId) => ({
3
- ...targets[targetId].info,
4
- clients: Object.keys(targets[targetId].clientsById).map(
5
- (clientId) => targets[targetId].clientsById[clientId].info
6
- )
7
- }));
8
- const extname = (targetId) => {
9
- let _a;
10
- return ((_a = targets[targetId]) === null || _a === void 0 ? void 0 : _a.info.extname) || "";
11
- };
12
- export {
13
- availableTargets,
14
- extname
15
- };
16
- //# sourceMappingURL=utils.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../src/httpsnippet-lite/esm/helpers/utils.ts"],
4
- "sourcesContent": ["// @ts-nocheck\nimport { targets } from '../targets/targets.js'\n\nexport const availableTargets = () =>\n Object.keys(targets).map((targetId) => ({\n ...targets[targetId].info,\n clients: Object.keys(targets[targetId].clientsById).map(\n (clientId) => targets[targetId].clientsById[clientId].info,\n ),\n }))\nexport const extname = (targetId) => {\n let _a\n return (\n ((_a = targets[targetId]) === null || _a === void 0\n ? void 0\n : _a.info.extname) || ''\n )\n}\n"],
5
- "mappings": "AACA,SAAS,eAAe;AAEjB,MAAM,mBAAmB,MAC9B,OAAO,KAAK,OAAO,EAAE,IAAI,CAAC,cAAc;AAAA,EACtC,GAAG,QAAQ,QAAQ,EAAE;AAAA,EACrB,SAAS,OAAO,KAAK,QAAQ,QAAQ,EAAE,WAAW,EAAE;AAAA,IAClD,CAAC,aAAa,QAAQ,QAAQ,EAAE,YAAY,QAAQ,EAAE;AAAA,EACxD;AACF,EAAE;AACG,MAAM,UAAU,CAAC,aAAa;AACnC,MAAI;AACJ,WACI,KAAK,QAAQ,QAAQ,OAAO,QAAQ,OAAO,SACzC,SACA,GAAG,KAAK,YAAY;AAE5B;",
6
- "names": []
7
- }
@@ -1,16 +0,0 @@
1
- export declare const libcurl: {
2
- info: {
3
- key: string;
4
- title: string;
5
- link: string;
6
- description: string;
7
- };
8
- convert: ({ method, fullUrl, headersObj, allHeaders, postData }: {
9
- method: any;
10
- fullUrl: any;
11
- headersObj: any;
12
- allHeaders: any;
13
- postData: any;
14
- }) => any;
15
- };
16
- //# sourceMappingURL=client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/c/libcurl/client.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;CAwEnB,CAAA"}
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../../../../src/httpsnippet-lite/esm/targets/c/libcurl/client.ts"],
4
- "sourcesContent": ["// @ts-nocheck\nimport { createSearchParams } from '../../../../../libs/http.js'\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const libcurl = {\n info: {\n key: 'libcurl',\n title: 'Libcurl',\n link: 'http://curl.haxx.se/libcurl',\n description: 'Simple REST and HTTP API Client for C',\n },\n convert: ({ method, fullUrl, headersObj, allHeaders, postData }) => {\n const { push, blank, join } = new CodeBuilder({ indent: ' ' })\n push('CURL *hnd = curl_easy_init();')\n blank()\n push(\n `curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, \"${method.toUpperCase()}\");`,\n )\n push(`curl_easy_setopt(hnd, CURLOPT_URL, \"${fullUrl}\");`)\n // Add headers, including the cookies\n const headers = Object.keys(headersObj)\n // construct headers\n if (headers.length) {\n blank()\n push('struct curl_slist *headers = NULL;')\n headers.forEach((header) => {\n // See https://curl.se/libcurl/c/httpcustomheader.html for syntax\n if (headersObj[header]) {\n push(\n `headers = curl_slist_append(headers, \"${header}: ${escapeForDoubleQuotes(headersObj[header])}\");`,\n )\n } else {\n push(`headers = curl_slist_append(headers, \"${header};\");`)\n }\n })\n push('curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);')\n }\n // construct cookies\n if (allHeaders.cookie) {\n blank()\n push(`curl_easy_setopt(hnd, CURLOPT_COOKIE, \"${allHeaders.cookie}\");`)\n }\n if (postData !== null && postData !== void 0) {\n blank()\n if (postData.text) {\n push(\n `curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(postData.text)});`,\n )\n } else if (postData.mimeType === 'application/x-www-form-urlencoded' && postData.params) {\n push(\n `curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, \"${createSearchParams(postData.params).toString()}\");`,\n )\n } else if (postData.mimeType === 'multipart/form-data' && postData.params) {\n push('curl_mime *mime = curl_mime_init(hnd);')\n postData.params.forEach((param) => {\n blank()\n push('{')\n push(`curl_mimepart *part = curl_mime_addpart(mime);`, 1)\n if (param.name) {\n push(`curl_mime_name(part, \"${param.name}\");`, 1)\n }\n if (param.fileName) {\n push(`curl_mime_filedata(part, \"${param.fileName}\");`, 1)\n } else if (param.value) {\n push(`curl_mime_data(part, \"${escapeForDoubleQuotes(param.value)}\", CURL_ZERO_TERMINATED);`, 1)\n }\n push('}')\n })\n blank()\n push('curl_easy_setopt(hnd, CURLOPT_MIMEPOST, mime);')\n }\n }\n blank()\n push('CURLcode ret = curl_easy_perform(hnd);')\n return join()\n },\n}\n"],
5
- "mappings": "AACA,SAAS,0BAA0B;AACnC,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AAE/B,MAAM,UAAU;AAAA,EACrB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CAAC,EAAE,QAAQ,SAAS,YAAY,YAAY,SAAS,MAAM;AAClE,UAAM,EAAE,MAAM,OAAO,KAAK,IAAI,IAAI,YAAY,EAAE,QAAQ,KAAK,CAAC;AAC9D,SAAK,+BAA+B;AACpC,UAAM;AACN;AAAA,MACE,iDAAiD,OAAO,YAAY,CAAC;AAAA,IACvE;AACA,SAAK,uCAAuC,OAAO,KAAK;AAExD,UAAM,UAAU,OAAO,KAAK,UAAU;AAEtC,QAAI,QAAQ,QAAQ;AAClB,YAAM;AACN,WAAK,oCAAoC;AACzC,cAAQ,QAAQ,CAAC,WAAW;AAE1B,YAAI,WAAW,MAAM,GAAG;AACtB;AAAA,YACE,yCAAyC,MAAM,KAAK,sBAAsB,WAAW,MAAM,CAAC,CAAC;AAAA,UAC/F;AAAA,QACF,OAAO;AACL,eAAK,yCAAyC,MAAM,MAAM;AAAA,QAC5D;AAAA,MACF,CAAC;AACD,WAAK,qDAAqD;AAAA,IAC5D;AAEA,QAAI,WAAW,QAAQ;AACrB,YAAM;AACN,WAAK,0CAA0C,WAAW,MAAM,KAAK;AAAA,IACvE;AACA,QAAI,aAAa,QAAQ,aAAa,QAAQ;AAC5C,YAAM;AACN,UAAI,SAAS,MAAM;AACjB;AAAA,UACE,6CAA6C,KAAK,UAAU,SAAS,IAAI,CAAC;AAAA,QAC5E;AAAA,MACF,WAAW,SAAS,aAAa,uCAAuC,SAAS,QAAQ;AACvF;AAAA,UACE,8CAA8C,mBAAmB,SAAS,MAAM,EAAE,SAAS,CAAC;AAAA,QAC9F;AAAA,MACF,WAAW,SAAS,aAAa,yBAAyB,SAAS,QAAQ;AACzE,aAAK,wCAAwC;AAC7C,iBAAS,OAAO,QAAQ,CAAC,UAAU;AACjC,gBAAM;AACN,eAAK,GAAG;AACR,eAAK,kDAAkD,CAAC;AACxD,cAAI,MAAM,MAAM;AACd,iBAAK,yBAAyB,MAAM,IAAI,OAAO,CAAC;AAAA,UAClD;AACA,cAAI,MAAM,UAAU;AAClB,iBAAK,6BAA6B,MAAM,QAAQ,OAAO,CAAC;AAAA,UAC1D,WAAW,MAAM,OAAO;AACtB,iBAAK,yBAAyB,sBAAsB,MAAM,KAAK,CAAC,6BAA6B,CAAC;AAAA,UAChG;AACA,eAAK,GAAG;AAAA,QACV,CAAC;AACD,cAAM;AACN,aAAK,gDAAgD;AAAA,MACvD;AAAA,IACF;AACA,UAAM;AACN,SAAK,wCAAwC;AAC7C,WAAO,KAAK;AAAA,EACd;AACF;",
6
- "names": []
7
- }