@scalar/snippetz 0.2.19 → 0.3.0
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.
- package/dist/clients.js +153 -155
- package/dist/clients.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/code-builder.js +44 -59
- package/dist/httpsnippet-lite/esm/helpers/code-builder.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/escape.js +41 -69
- package/dist/httpsnippet-lite/esm/helpers/escape.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/form-data.js +59 -0
- package/dist/httpsnippet-lite/esm/helpers/form-data.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/headers.js +23 -18
- package/dist/httpsnippet-lite/esm/helpers/headers.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/reducer.js +20 -0
- package/dist/httpsnippet-lite/esm/helpers/reducer.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/shell.js +13 -16
- package/dist/httpsnippet-lite/esm/helpers/shell.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/url.js +20 -0
- package/dist/httpsnippet-lite/esm/helpers/url.js.map +7 -0
- package/dist/httpsnippet-lite/esm/helpers/utils.js +16 -0
- package/dist/httpsnippet-lite/esm/helpers/utils.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts.map +1 -1
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.js +72 -40
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/c/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/c/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.js +149 -166
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/clojure/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/clojure/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/csharp/httpclient/client.js +165 -161
- package/dist/httpsnippet-lite/esm/targets/csharp/httpclient/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.js +47 -46
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/csharp/target.js +18 -0
- package/dist/httpsnippet-lite/esm/targets/csharp/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts.map +1 -1
- package/dist/httpsnippet-lite/esm/targets/go/native/client.js +167 -116
- package/dist/httpsnippet-lite/esm/targets/go/native/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/go/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/go/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.js +37 -44
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.js +41 -43
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts.map +1 -1
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.js +75 -67
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/java/target.js +22 -0
- package/dist/httpsnippet-lite/esm/targets/java/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.js +37 -44
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.js +79 -84
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.js +76 -83
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/javascript/target.js +22 -0
- package/dist/httpsnippet-lite/esm/targets/javascript/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.js +78 -79
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts.map +1 -1
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.js +75 -67
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.js +70 -77
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/node/request/client.js +100 -0
- package/dist/httpsnippet-lite/esm/targets/node/request/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/node/target.js +24 -0
- package/dist/httpsnippet-lite/esm/targets/node/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/objc/helpers.js +36 -52
- package/dist/httpsnippet-lite/esm/targets/objc/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.js +157 -128
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/objc/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/objc/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.js +50 -65
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/php/helpers.js +72 -0
- package/dist/httpsnippet-lite/esm/targets/php/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.js +85 -0
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.js +127 -0
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/php/target.js +22 -0
- package/dist/httpsnippet-lite/esm/targets/php/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/powershell/common.js +61 -49
- package/dist/httpsnippet-lite/esm/targets/powershell/common.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.js +12 -12
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/powershell/target.js +18 -0
- package/dist/httpsnippet-lite/esm/targets/powershell/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.js +12 -12
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/python/helpers.js +68 -0
- package/dist/httpsnippet-lite/esm/targets/python/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.js +71 -90
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/python/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/python/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.js +99 -124
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/r/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/r/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.js +69 -69
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/ruby/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/ruby/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts.map +1 -1
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.js +106 -113
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/shell/target.js +20 -0
- package/dist/httpsnippet-lite/esm/targets/shell/target.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.js +42 -51
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.js +51 -67
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.js +132 -133
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.js.map +7 -0
- package/dist/httpsnippet-lite/esm/targets/swift/target.js +16 -0
- package/dist/httpsnippet-lite/esm/targets/swift/target.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/code-builder.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/code-builder.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/escape.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/escape.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/form-data.d.js +28 -0
- package/dist/httpsnippet-lite/types/helpers/form-data.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/headers.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/headers.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/reducer.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/reducer.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/shell.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/shell.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/url.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/url.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/helpers/utils.d.js +1 -0
- package/dist/httpsnippet-lite/types/helpers/utils.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/httpsnippet.d.js +19 -0
- package/dist/httpsnippet-lite/types/httpsnippet.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/c/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/c/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/clojure/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/clojure/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/csharp/httpclient/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/csharp/httpclient/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/csharp/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/csharp/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/dart/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/dart/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/go/native/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/go/native/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/go/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/go/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/http/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/http/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/java/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/java/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/javascript/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/javascript/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/node/native/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/node/native/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/node/request/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/node/request/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/node/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/node/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/objc/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/objc/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/php/helpers.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/php/helpers.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/php/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/php/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/powershell/common.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/powershell/common.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/powershell/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/powershell/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/python/helpers.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/python/helpers.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/python/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/python/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/r/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/r/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/ruby/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/ruby/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/shell/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/shell/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/swift/target.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/swift/target.d.js.map +7 -0
- package/dist/httpsnippet-lite/types/targets/targets.d.js +1 -0
- package/dist/httpsnippet-lite/types/targets/targets.d.js.map +7 -0
- package/dist/index.js +3 -2
- package/dist/index.js.map +7 -0
- package/dist/plugins/c/libcurl/index.js +2 -1
- package/dist/plugins/c/libcurl/index.js.map +7 -0
- package/dist/plugins/c/libcurl/libcurl.js +12 -15
- package/dist/plugins/c/libcurl/libcurl.js.map +7 -0
- package/dist/plugins/c/libcurl/libcurl.test.js +208 -0
- package/dist/plugins/c/libcurl/libcurl.test.js.map +7 -0
- package/dist/plugins/clojure/clj_http/clj_http.js +12 -15
- package/dist/plugins/clojure/clj_http/clj_http.js.map +7 -0
- package/dist/plugins/clojure/clj_http/clj_http.test.js +151 -0
- package/dist/plugins/clojure/clj_http/clj_http.test.js.map +7 -0
- package/dist/plugins/clojure/clj_http/index.js +2 -1
- package/dist/plugins/clojure/clj_http/index.js.map +7 -0
- package/dist/plugins/csharp/httpclient/httpclient.js +12 -15
- package/dist/plugins/csharp/httpclient/httpclient.js.map +7 -0
- package/dist/plugins/csharp/httpclient/index.js +2 -1
- package/dist/plugins/csharp/httpclient/index.js.map +7 -0
- package/dist/plugins/csharp/restsharp/index.js +2 -1
- package/dist/plugins/csharp/restsharp/index.js.map +7 -0
- package/dist/plugins/csharp/restsharp/restsharp.js +12 -15
- package/dist/plugins/csharp/restsharp/restsharp.js.map +7 -0
- package/dist/plugins/dart/http/http.js +92 -96
- package/dist/plugins/dart/http/http.js.map +7 -0
- package/dist/plugins/dart/http/http.test.js +550 -0
- package/dist/plugins/dart/http/http.test.js.map +7 -0
- package/dist/plugins/dart/http/index.js +2 -1
- package/dist/plugins/dart/http/index.js.map +7 -0
- package/dist/plugins/go/native/index.js +2 -1
- package/dist/plugins/go/native/index.js.map +7 -0
- package/dist/plugins/go/native/native.js +12 -15
- package/dist/plugins/go/native/native.js.map +7 -0
- package/dist/plugins/go/native/native.test.js +366 -0
- package/dist/plugins/go/native/native.test.js.map +7 -0
- package/dist/plugins/http/http11/http11.js +84 -104
- package/dist/plugins/http/http11/http11.js.map +7 -0
- package/dist/plugins/http/http11/http11.test.js +175 -0
- package/dist/plugins/http/http11/http11.test.js.map +7 -0
- package/dist/plugins/http/http11/index.js +2 -1
- package/dist/plugins/http/http11/index.js.map +7 -0
- package/dist/plugins/java/asynchttp/asynchttp.js +12 -15
- package/dist/plugins/java/asynchttp/asynchttp.js.map +7 -0
- package/dist/plugins/java/asynchttp/index.js +2 -1
- package/dist/plugins/java/asynchttp/index.js.map +7 -0
- package/dist/plugins/java/nethttp/index.js +2 -1
- package/dist/plugins/java/nethttp/index.js.map +7 -0
- package/dist/plugins/java/nethttp/nethttp.js +12 -15
- package/dist/plugins/java/nethttp/nethttp.js.map +7 -0
- package/dist/plugins/java/okhttp/index.js +2 -1
- package/dist/plugins/java/okhttp/index.js.map +7 -0
- package/dist/plugins/java/okhttp/okhttp.js +12 -15
- package/dist/plugins/java/okhttp/okhttp.js.map +7 -0
- package/dist/plugins/java/okhttp/okhttp.test.js +164 -0
- package/dist/plugins/java/okhttp/okhttp.test.js.map +7 -0
- package/dist/plugins/java/unirest/index.js +2 -1
- package/dist/plugins/java/unirest/index.js.map +7 -0
- package/dist/plugins/java/unirest/unirest.js +12 -15
- package/dist/plugins/java/unirest/unirest.js.map +7 -0
- package/dist/plugins/js/axios/axios.js +12 -15
- package/dist/plugins/js/axios/axios.js.map +7 -0
- package/dist/plugins/js/axios/index.d.ts +1 -1
- package/dist/plugins/js/axios/index.d.ts.map +1 -1
- package/dist/plugins/js/axios/index.js +5 -1
- package/dist/plugins/js/axios/index.js.map +7 -0
- package/dist/plugins/js/fetch/fetch.d.ts.map +1 -1
- package/dist/plugins/js/fetch/fetch.js +67 -60
- package/dist/plugins/js/fetch/fetch.js.map +7 -0
- package/dist/plugins/js/fetch/fetch.test.js +214 -0
- package/dist/plugins/js/fetch/fetch.test.js.map +7 -0
- package/dist/plugins/js/fetch/index.d.ts +1 -1
- package/dist/plugins/js/fetch/index.d.ts.map +1 -1
- package/dist/plugins/js/fetch/index.js +5 -1
- package/dist/plugins/js/fetch/index.js.map +7 -0
- package/dist/plugins/js/jquery/index.js +2 -1
- package/dist/plugins/js/jquery/index.js.map +7 -0
- package/dist/plugins/js/jquery/jquery.js +12 -15
- package/dist/plugins/js/jquery/jquery.js.map +7 -0
- package/dist/plugins/js/ofetch/index.js +2 -1
- package/dist/plugins/js/ofetch/index.js.map +7 -0
- package/dist/plugins/js/ofetch/ofetch.d.ts.map +1 -1
- package/dist/plugins/js/ofetch/ofetch.js +44 -67
- package/dist/plugins/js/ofetch/ofetch.js.map +7 -0
- package/dist/plugins/js/ofetch/ofetch.test.js +126 -0
- package/dist/plugins/js/ofetch/ofetch.test.js.map +7 -0
- package/dist/plugins/js/xhr/index.js +2 -1
- package/dist/plugins/js/xhr/index.js.map +7 -0
- package/dist/plugins/js/xhr/xhr.js +12 -15
- package/dist/plugins/js/xhr/xhr.js.map +7 -0
- package/dist/plugins/kotlin/okhttp/index.js +2 -1
- package/dist/plugins/kotlin/okhttp/index.js.map +7 -0
- package/dist/plugins/kotlin/okhttp/okhttp.js +12 -15
- package/dist/plugins/kotlin/okhttp/okhttp.js.map +7 -0
- package/dist/plugins/kotlin/okhttp/okhttp.test.js +164 -0
- package/dist/plugins/kotlin/okhttp/okhttp.test.js.map +7 -0
- package/dist/plugins/node/axios/axios.js +12 -15
- package/dist/plugins/node/axios/axios.js.map +7 -0
- package/dist/plugins/node/axios/index.js +2 -1
- package/dist/plugins/node/axios/index.js.map +7 -0
- package/dist/plugins/node/fetch/fetch.d.ts.map +1 -1
- package/dist/plugins/node/fetch/fetch.js +73 -59
- package/dist/plugins/node/fetch/fetch.js.map +7 -0
- package/dist/plugins/node/fetch/fetch.test.js +200 -0
- package/dist/plugins/node/fetch/fetch.test.js.map +7 -0
- package/dist/plugins/node/fetch/index.js +2 -1
- package/dist/plugins/node/fetch/index.js.map +7 -0
- package/dist/plugins/node/ofetch/index.js +2 -1
- package/dist/plugins/node/ofetch/index.js.map +7 -0
- package/dist/plugins/node/ofetch/ofetch.d.ts.map +1 -1
- package/dist/plugins/node/ofetch/ofetch.js +44 -67
- package/dist/plugins/node/ofetch/ofetch.js.map +7 -0
- package/dist/plugins/node/ofetch/ofetch.test.js +126 -0
- package/dist/plugins/node/ofetch/ofetch.test.js.map +7 -0
- package/dist/plugins/node/undici/index.js +2 -1
- package/dist/plugins/node/undici/index.js.map +7 -0
- package/dist/plugins/node/undici/undici.d.ts.map +1 -1
- package/dist/plugins/node/undici/undici.js +46 -62
- package/dist/plugins/node/undici/undici.js.map +7 -0
- package/dist/plugins/node/undici/undici.test.js +133 -0
- package/dist/plugins/node/undici/undici.test.js.map +7 -0
- package/dist/plugins/objc/nsurlsession/index.js +2 -1
- package/dist/plugins/objc/nsurlsession/index.js.map +7 -0
- package/dist/plugins/objc/nsurlsession/nsurlsession.js +12 -15
- package/dist/plugins/objc/nsurlsession/nsurlsession.js.map +7 -0
- package/dist/plugins/ocaml/cohttp/cohttp.js +12 -15
- package/dist/plugins/ocaml/cohttp/cohttp.js.map +7 -0
- package/dist/plugins/ocaml/cohttp/index.js +2 -1
- package/dist/plugins/ocaml/cohttp/index.js.map +7 -0
- package/dist/plugins/php/curl/curl.js +119 -157
- package/dist/plugins/php/curl/curl.js.map +7 -0
- package/dist/plugins/php/curl/curl.test.js +564 -0
- package/dist/plugins/php/curl/curl.test.js.map +7 -0
- package/dist/plugins/php/curl/index.js +2 -1
- package/dist/plugins/php/curl/index.js.map +7 -0
- package/dist/plugins/php/guzzle/guzzle.js +115 -148
- package/dist/plugins/php/guzzle/guzzle.js.map +7 -0
- package/dist/plugins/php/guzzle/guzzle.test.js +546 -0
- package/dist/plugins/php/guzzle/guzzle.test.js.map +7 -0
- package/dist/plugins/php/guzzle/index.js +2 -1
- package/dist/plugins/php/guzzle/index.js.map +7 -0
- package/dist/plugins/powershell/restmethod/index.js +2 -1
- package/dist/plugins/powershell/restmethod/index.js.map +7 -0
- package/dist/plugins/powershell/restmethod/restmethod.js +12 -15
- package/dist/plugins/powershell/restmethod/restmethod.js.map +7 -0
- package/dist/plugins/powershell/webrequest/index.js +2 -1
- package/dist/plugins/powershell/webrequest/index.js.map +7 -0
- package/dist/plugins/powershell/webrequest/webrequest.js +12 -15
- package/dist/plugins/powershell/webrequest/webrequest.js.map +7 -0
- package/dist/plugins/python/python3/index.js +2 -1
- package/dist/plugins/python/python3/index.js.map +7 -0
- package/dist/plugins/python/python3/python3.js +12 -15
- package/dist/plugins/python/python3/python3.js.map +7 -0
- package/dist/plugins/python/requests/index.js +2 -1
- package/dist/plugins/python/requests/index.js.map +7 -0
- package/dist/plugins/python/requests/requests.d.ts.map +1 -1
- package/dist/plugins/python/requests/requests.js +98 -126
- package/dist/plugins/python/requests/requests.js.map +7 -0
- package/dist/plugins/python/requests/requests.test.js +419 -0
- package/dist/plugins/python/requests/requests.test.js.map +7 -0
- package/dist/plugins/r/httr/httr.js +12 -15
- package/dist/plugins/r/httr/httr.js.map +7 -0
- package/dist/plugins/r/httr/index.js +2 -1
- package/dist/plugins/r/httr/index.js.map +7 -0
- package/dist/plugins/ruby/native/index.js +2 -1
- package/dist/plugins/ruby/native/index.js.map +7 -0
- package/dist/plugins/ruby/native/native.js +12 -15
- package/dist/plugins/ruby/native/native.js.map +7 -0
- package/dist/plugins/ruby/native/native.test.js +240 -0
- package/dist/plugins/ruby/native/native.test.js.map +7 -0
- package/dist/plugins/shell/curl/curl.js +81 -114
- package/dist/plugins/shell/curl/curl.js.map +7 -0
- package/dist/plugins/shell/curl/curl.test.js +427 -0
- package/dist/plugins/shell/curl/curl.test.js.map +7 -0
- package/dist/plugins/shell/curl/index.js +2 -1
- package/dist/plugins/shell/curl/index.js.map +7 -0
- package/dist/plugins/shell/httpie/httpie.js +12 -15
- package/dist/plugins/shell/httpie/httpie.js.map +7 -0
- package/dist/plugins/shell/httpie/httpie.test.js +113 -0
- package/dist/plugins/shell/httpie/httpie.test.js.map +7 -0
- package/dist/plugins/shell/httpie/index.js +2 -1
- package/dist/plugins/shell/httpie/index.js.map +7 -0
- package/dist/plugins/shell/wget/index.js +2 -1
- package/dist/plugins/shell/wget/index.js.map +7 -0
- package/dist/plugins/shell/wget/wget.js +12 -15
- package/dist/plugins/shell/wget/wget.js.map +7 -0
- package/dist/plugins/shell/wget/wget.test.js +143 -0
- package/dist/plugins/shell/wget/wget.test.js.map +7 -0
- package/dist/plugins/swift/nsurlsession/index.js +2 -1
- package/dist/plugins/swift/nsurlsession/index.js.map +7 -0
- package/dist/plugins/swift/nsurlsession/nsurlsession.js +12 -15
- package/dist/plugins/swift/nsurlsession/nsurlsession.js.map +7 -0
- package/dist/plugins/swift/nsurlsession/nsurlsession.test.js +344 -0
- package/dist/plugins/swift/nsurlsession/nsurlsession.test.js.map +7 -0
- package/dist/snippetz.js +27 -27
- package/dist/snippetz.js.map +7 -0
- package/dist/snippetz.test.js +79 -0
- package/dist/snippetz.test.js.map +7 -0
- package/dist/utils/convertWithHttpSnippetLite.js +101 -104
- package/dist/utils/convertWithHttpSnippetLite.js.map +7 -0
- package/dist/utils/convertWithHttpSnippetLite.test.js +106 -0
- package/dist/utils/convertWithHttpSnippetLite.test.js.map +7 -0
- package/dist/utils/create-search-params.d.ts +4 -0
- package/dist/utils/create-search-params.d.ts.map +1 -0
- package/dist/utils/create-search-params.js +11 -0
- package/dist/utils/create-search-params.js.map +7 -0
- package/dist/utils/create-search-params.test.js +49 -0
- package/dist/utils/create-search-params.test.js.map +7 -0
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -4
- package/dist/utils/index.js.map +7 -0
- package/dist/utils/needsQuotes.js +5 -8
- package/dist/utils/needsQuotes.js.map +7 -0
- package/dist/utils/objectToString.d.ts +8 -0
- package/dist/utils/objectToString.d.ts.map +1 -1
- package/dist/utils/objectToString.js +48 -54
- package/dist/utils/objectToString.js.map +7 -0
- package/package.json +147 -151
- package/dist/utils/arrayToObject.d.ts +0 -8
- package/dist/utils/arrayToObject.d.ts.map +0 -1
- package/dist/utils/arrayToObject.js +0 -14
|
@@ -0,0 +1,59 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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,21 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
*/
|
|
5
|
-
const getHeaderName = (headers, name) => Object.keys(headers).find((header) => header.toLowerCase() === name.toLowerCase());
|
|
6
|
-
/**
|
|
7
|
-
* Given a headers object retrieve the contents of a header out of it via a case-insensitive key.
|
|
8
|
-
*/
|
|
1
|
+
const getHeaderName = (headers, name) => Object.keys(headers).find(
|
|
2
|
+
(header) => header.toLowerCase() === name.toLowerCase()
|
|
3
|
+
);
|
|
9
4
|
const getHeader = (headers, name) => {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
5
|
+
const headerName = getHeaderName(headers, name);
|
|
6
|
+
if (!headerName) {
|
|
7
|
+
return void 0;
|
|
8
|
+
}
|
|
9
|
+
return headers[headerName];
|
|
15
10
|
};
|
|
16
|
-
/**
|
|
17
|
-
* Determine if a given case-insensitive header exists within a header object.
|
|
18
|
-
*/
|
|
19
11
|
const hasHeader = (headers, name) => Boolean(getHeaderName(headers, name));
|
|
20
|
-
|
|
21
|
-
|
|
12
|
+
const mimeTypeJson = [
|
|
13
|
+
"application/json",
|
|
14
|
+
"application/x-json",
|
|
15
|
+
"text/json",
|
|
16
|
+
"text/x-json",
|
|
17
|
+
"+json"
|
|
18
|
+
];
|
|
19
|
+
const isMimeTypeJSON = (mimeType) => mimeTypeJson.some((type) => mimeType.includes(type));
|
|
20
|
+
export {
|
|
21
|
+
getHeader,
|
|
22
|
+
getHeaderName,
|
|
23
|
+
hasHeader,
|
|
24
|
+
isMimeTypeJSON
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=headers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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,17 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const isShellSafe = safe.test(value);
|
|
9
|
-
if (isShellSafe) {
|
|
10
|
-
return value;
|
|
11
|
-
}
|
|
12
|
-
// if the value is not shell safe, then quote it
|
|
13
|
-
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
1
|
+
const quote = (value = "") => {
|
|
2
|
+
const safe = /^[a-z0-9-_/.@%^=:]+$/i;
|
|
3
|
+
const isShellSafe = safe.test(value);
|
|
4
|
+
if (isShellSafe) {
|
|
5
|
+
return value;
|
|
6
|
+
}
|
|
7
|
+
return `'${value.replace(/'/g, "'\\''")}'`;
|
|
14
8
|
};
|
|
15
|
-
const escape = (value) => value.replace(/\r/g,
|
|
16
|
-
|
|
17
|
-
|
|
9
|
+
const escape = (value) => value.replace(/\r/g, "\\r").replace(/\n/g, "\\n");
|
|
10
|
+
export {
|
|
11
|
+
escape,
|
|
12
|
+
quote
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=shell.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
|
@@ -0,0 +1,7 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/c/libcurl/client.ts"],"names":[],"mappings":"
|
|
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,44 +1,76 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
// @ts-nocheck
|
|
1
|
+
import { createSearchParams } from "../../../../../utils/create-search-params.js";
|
|
2
|
+
import { CodeBuilder } from "../../../helpers/code-builder.js";
|
|
3
|
+
import { escapeForDoubleQuotes } from "../../../helpers/escape.js";
|
|
5
4
|
const libcurl = {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
blank();
|
|
32
|
-
push(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${allHeaders.cookie}");`);
|
|
33
|
-
}
|
|
34
|
-
if (postData === null || postData === void 0 ? void 0 : postData.text) {
|
|
35
|
-
blank();
|
|
36
|
-
push(`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(postData.text)});`);
|
|
5
|
+
info: {
|
|
6
|
+
key: "libcurl",
|
|
7
|
+
title: "Libcurl",
|
|
8
|
+
link: "http://curl.haxx.se/libcurl",
|
|
9
|
+
description: "Simple REST and HTTP API Client for C"
|
|
10
|
+
},
|
|
11
|
+
convert: ({ method, fullUrl, headersObj, allHeaders, postData }) => {
|
|
12
|
+
const { push, blank, join } = new CodeBuilder({ indent: " " });
|
|
13
|
+
push("CURL *hnd = curl_easy_init();");
|
|
14
|
+
blank();
|
|
15
|
+
push(
|
|
16
|
+
`curl_easy_setopt(hnd, CURLOPT_CUSTOMREQUEST, "${method.toUpperCase()}");`
|
|
17
|
+
);
|
|
18
|
+
push(`curl_easy_setopt(hnd, CURLOPT_URL, "${fullUrl}");`);
|
|
19
|
+
const headers = Object.keys(headersObj);
|
|
20
|
+
if (headers.length) {
|
|
21
|
+
blank();
|
|
22
|
+
push("struct curl_slist *headers = NULL;");
|
|
23
|
+
headers.forEach((header) => {
|
|
24
|
+
if (headersObj[header]) {
|
|
25
|
+
push(
|
|
26
|
+
`headers = curl_slist_append(headers, "${header}: ${escapeForDoubleQuotes(headersObj[header])}");`
|
|
27
|
+
);
|
|
28
|
+
} else {
|
|
29
|
+
push(`headers = curl_slist_append(headers, "${header};");`);
|
|
37
30
|
}
|
|
31
|
+
});
|
|
32
|
+
push("curl_easy_setopt(hnd, CURLOPT_HTTPHEADER, headers);");
|
|
33
|
+
}
|
|
34
|
+
if (allHeaders.cookie) {
|
|
35
|
+
blank();
|
|
36
|
+
push(`curl_easy_setopt(hnd, CURLOPT_COOKIE, "${allHeaders.cookie}");`);
|
|
37
|
+
}
|
|
38
|
+
if (postData !== null && postData !== void 0) {
|
|
39
|
+
blank();
|
|
40
|
+
if (postData.text) {
|
|
41
|
+
push(
|
|
42
|
+
`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, ${JSON.stringify(postData.text)});`
|
|
43
|
+
);
|
|
44
|
+
} else if (postData.mimeType === "application/x-www-form-urlencoded" && postData.params) {
|
|
45
|
+
push(
|
|
46
|
+
`curl_easy_setopt(hnd, CURLOPT_POSTFIELDS, "${createSearchParams(postData.params).toString()}");`
|
|
47
|
+
);
|
|
48
|
+
} else if (postData.mimeType === "multipart/form-data" && postData.params) {
|
|
49
|
+
push("curl_mime *mime = curl_mime_init(hnd);");
|
|
50
|
+
postData.params.forEach((param) => {
|
|
51
|
+
blank();
|
|
52
|
+
push("{");
|
|
53
|
+
push(`curl_mimepart *part = curl_mime_addpart(mime);`, 1);
|
|
54
|
+
if (param.name) {
|
|
55
|
+
push(`curl_mime_name(part, "${param.name}");`, 1);
|
|
56
|
+
}
|
|
57
|
+
if (param.fileName) {
|
|
58
|
+
push(`curl_mime_filedata(part, "${param.fileName}");`, 1);
|
|
59
|
+
} else if (param.value) {
|
|
60
|
+
push(`curl_mime_data(part, "${escapeForDoubleQuotes(param.value)}", CURL_ZERO_TERMINATED);`, 1);
|
|
61
|
+
}
|
|
62
|
+
push("}");
|
|
63
|
+
});
|
|
38
64
|
blank();
|
|
39
|
-
push(
|
|
40
|
-
|
|
41
|
-
}
|
|
65
|
+
push("curl_easy_setopt(hnd, CURLOPT_MIMEPOST, mime);");
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
blank();
|
|
69
|
+
push("CURLcode ret = curl_easy_perform(hnd);");
|
|
70
|
+
return join();
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
export {
|
|
74
|
+
libcurl
|
|
42
75
|
};
|
|
43
|
-
|
|
44
|
-
export { libcurl };
|
|
76
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/c/libcurl/client.ts"],
|
|
4
|
+
"sourcesContent": ["// @ts-nocheck\nimport { createSearchParams } from '../../../../../utils/create-search-params.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
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/c/target.ts"],
|
|
4
|
+
"sourcesContent": ["// @ts-nocheck\nimport { libcurl } from './libcurl/client.js'\n\nexport const c = {\n info: {\n key: 'c',\n title: 'C',\n extname: '.c',\n default: 'libcurl',\n },\n clientsById: {\n libcurl,\n },\n}\n"],
|
|
5
|
+
"mappings": "AACA,SAAS,eAAe;AAEjB,MAAM,IAAI;AAAA,EACf,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|