@scalar/snippetz 0.5.5 → 0.6.2
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/index.js +5 -5
- package/dist/clients/index.js.map +1 -1
- package/dist/httpsnippet-lite/helpers/code-builder.d.ts +51 -0
- package/dist/httpsnippet-lite/helpers/code-builder.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/code-builder.js +29 -0
- package/dist/httpsnippet-lite/helpers/code-builder.js.map +7 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/escape.d.ts +22 -3
- package/dist/httpsnippet-lite/helpers/escape.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/escape.js.map +7 -0
- package/dist/httpsnippet-lite/helpers/headers.d.ts +15 -0
- package/dist/httpsnippet-lite/helpers/headers.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/headers.js +2 -13
- package/dist/httpsnippet-lite/helpers/headers.js.map +7 -0
- package/dist/httpsnippet-lite/helpers/reducer.d.ts +2 -0
- package/dist/httpsnippet-lite/helpers/reducer.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/reducer.js +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/shell.d.ts +2 -2
- package/dist/httpsnippet-lite/helpers/shell.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/helpers → helpers}/shell.js +4 -4
- package/dist/httpsnippet-lite/helpers/shell.js.map +7 -0
- package/dist/httpsnippet-lite/helpers/snippet-request.d.ts +33 -0
- package/dist/httpsnippet-lite/helpers/snippet-request.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/snippet-request.js +1 -0
- package/dist/httpsnippet-lite/helpers/url.d.ts +4 -0
- package/dist/httpsnippet-lite/helpers/url.d.ts.map +1 -0
- package/dist/httpsnippet-lite/helpers/url.js +9 -0
- package/dist/httpsnippet-lite/helpers/url.js.map +7 -0
- package/dist/httpsnippet-lite/targets/c/libcurl/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/c/libcurl/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/c/libcurl/client.js +7 -13
- package/dist/httpsnippet-lite/targets/c/libcurl/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/clojure/clj_http/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/clojure/clj_http/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/clojure/clj_http/client.js +7 -3
- package/dist/httpsnippet-lite/targets/clojure/clj_http/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/csharp/restsharp/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/csharp/restsharp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/csharp/restsharp/client.js +8 -18
- package/dist/httpsnippet-lite/targets/csharp/restsharp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/go/native/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/go/native/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/go/native/client.js +14 -35
- package/dist/httpsnippet-lite/targets/go/native/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/asynchttp/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/java/asynchttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/asynchttp/client.js +1 -4
- package/dist/httpsnippet-lite/targets/java/asynchttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/nethttp/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/java/nethttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/nethttp/client.js +3 -6
- package/dist/httpsnippet-lite/targets/java/nethttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/okhttp/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/java/okhttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/okhttp/client.js +5 -8
- package/dist/httpsnippet-lite/targets/java/okhttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/java/unirest/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/java/unirest/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/java/unirest/client.js +4 -8
- package/dist/httpsnippet-lite/targets/java/unirest/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/javascript/axios/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/javascript/axios/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/axios/client.js +6 -10
- package/dist/httpsnippet-lite/targets/javascript/axios/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/javascript/jquery/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/javascript/jquery/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/jquery/client.js +5 -11
- package/dist/httpsnippet-lite/targets/javascript/jquery/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/javascript/xhr/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/javascript/xhr/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/javascript/xhr/client.js +7 -15
- package/dist/httpsnippet-lite/targets/javascript/xhr/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/kotlin/okhttp/client.js +6 -9
- package/dist/httpsnippet-lite/targets/kotlin/okhttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/node/axios/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/node/axios/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/node/axios/client.js +3 -5
- package/dist/httpsnippet-lite/targets/node/axios/client.js.map +7 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/objc/helpers.d.ts +5 -11
- package/dist/httpsnippet-lite/targets/objc/helpers.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/objc/helpers.js +7 -10
- package/dist/httpsnippet-lite/targets/objc/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/objc/nsurlsession/client.js +14 -51
- package/dist/httpsnippet-lite/targets/objc/nsurlsession/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/ocaml/cohttp/client.js +3 -5
- package/dist/httpsnippet-lite/targets/ocaml/cohttp/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/powershell/common.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/powershell/common.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/common.js +6 -12
- package/dist/httpsnippet-lite/targets/powershell/common.js.map +7 -0
- package/dist/httpsnippet-lite/targets/powershell/restmethod/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/powershell/restmethod/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/targets/powershell/restmethod/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/powershell/webrequest/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/powershell/webrequest/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/targets/powershell/webrequest/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/python/python3/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/python/python3/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/python/python3/client.js +4 -8
- package/dist/httpsnippet-lite/targets/python/python3/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/r/httr/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/r/httr/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/r/httr/client.js +5 -12
- package/dist/httpsnippet-lite/targets/r/httr/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/ruby/native/client.d.ts +3 -0
- package/dist/httpsnippet-lite/targets/ruby/native/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/ruby/native/client.js +2 -2
- package/dist/httpsnippet-lite/targets/ruby/native/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/shell/httpie/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/shell/httpie/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/shell/httpie/client.js +11 -11
- package/dist/httpsnippet-lite/targets/shell/httpie/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/shell/wget/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/shell/wget/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/shell/wget/client.js +6 -6
- package/dist/httpsnippet-lite/targets/shell/wget/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/swift/helpers.d.ts +15 -0
- package/dist/httpsnippet-lite/targets/swift/helpers.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/swift/helpers.js +9 -16
- package/dist/httpsnippet-lite/targets/swift/helpers.js.map +7 -0
- package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.d.ts +12 -0
- package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.d.ts.map +1 -0
- package/dist/httpsnippet-lite/{esm/targets → targets}/swift/nsurlsession/client.js +11 -32
- package/dist/httpsnippet-lite/targets/swift/nsurlsession/client.js.map +7 -0
- package/dist/httpsnippet-lite/targets/target.d.ts +19 -0
- package/dist/httpsnippet-lite/targets/target.d.ts.map +1 -0
- package/dist/httpsnippet-lite/targets/target.js +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/dist/index.js.map +2 -2
- package/dist/plugins/c/libcurl/index.d.ts +1 -1
- package/dist/plugins/c/libcurl/index.d.ts.map +1 -1
- package/dist/plugins/c/libcurl/index.js +4 -1
- package/dist/plugins/c/libcurl/index.js.map +2 -2
- package/dist/plugins/c/libcurl/libcurl.js +1 -1
- package/dist/plugins/c/libcurl/libcurl.js.map +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.d.ts.map +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.js +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.js.map +2 -2
- package/dist/plugins/clojure/clj_http/index.d.ts +1 -1
- package/dist/plugins/clojure/clj_http/index.d.ts.map +1 -1
- package/dist/plugins/clojure/clj_http/index.js +4 -1
- package/dist/plugins/clojure/clj_http/index.js.map +2 -2
- package/dist/plugins/csharp/httpclient/index.d.ts +1 -1
- package/dist/plugins/csharp/httpclient/index.d.ts.map +1 -1
- package/dist/plugins/csharp/httpclient/index.js +4 -1
- package/dist/plugins/csharp/httpclient/index.js.map +2 -2
- package/dist/plugins/csharp/restsharp/index.d.ts +1 -1
- package/dist/plugins/csharp/restsharp/index.d.ts.map +1 -1
- package/dist/plugins/csharp/restsharp/index.js +4 -1
- package/dist/plugins/csharp/restsharp/index.js.map +2 -2
- package/dist/plugins/csharp/restsharp/restsharp.d.ts.map +1 -1
- package/dist/plugins/csharp/restsharp/restsharp.js +1 -1
- package/dist/plugins/csharp/restsharp/restsharp.js.map +2 -2
- package/dist/plugins/dart/http/index.d.ts +1 -1
- package/dist/plugins/dart/http/index.d.ts.map +1 -1
- package/dist/plugins/dart/http/index.js +4 -1
- package/dist/plugins/dart/http/index.js.map +2 -2
- package/dist/plugins/fsharp/httpclient/index.d.ts +1 -1
- package/dist/plugins/fsharp/httpclient/index.d.ts.map +1 -1
- package/dist/plugins/fsharp/httpclient/index.js +4 -1
- package/dist/plugins/fsharp/httpclient/index.js.map +2 -2
- package/dist/plugins/go/native/index.d.ts +1 -1
- package/dist/plugins/go/native/index.d.ts.map +1 -1
- package/dist/plugins/go/native/index.js +4 -1
- package/dist/plugins/go/native/index.js.map +2 -2
- package/dist/plugins/go/native/native.d.ts.map +1 -1
- package/dist/plugins/go/native/native.js +1 -1
- package/dist/plugins/go/native/native.js.map +2 -2
- package/dist/plugins/http/http11/index.d.ts +1 -1
- package/dist/plugins/http/http11/index.d.ts.map +1 -1
- package/dist/plugins/http/http11/index.js +4 -1
- package/dist/plugins/http/http11/index.js.map +2 -2
- package/dist/plugins/java/asynchttp/asynchttp.d.ts.map +1 -1
- package/dist/plugins/java/asynchttp/asynchttp.js +1 -1
- package/dist/plugins/java/asynchttp/asynchttp.js.map +2 -2
- package/dist/plugins/java/asynchttp/index.d.ts +1 -1
- package/dist/plugins/java/asynchttp/index.d.ts.map +1 -1
- package/dist/plugins/java/asynchttp/index.js +4 -1
- package/dist/plugins/java/asynchttp/index.js.map +2 -2
- package/dist/plugins/java/nethttp/index.d.ts +1 -1
- package/dist/plugins/java/nethttp/index.d.ts.map +1 -1
- package/dist/plugins/java/nethttp/index.js +4 -1
- package/dist/plugins/java/nethttp/index.js.map +2 -2
- package/dist/plugins/java/nethttp/nethttp.d.ts.map +1 -1
- package/dist/plugins/java/nethttp/nethttp.js +1 -1
- package/dist/plugins/java/nethttp/nethttp.js.map +2 -2
- package/dist/plugins/java/okhttp/index.d.ts +1 -1
- package/dist/plugins/java/okhttp/index.d.ts.map +1 -1
- package/dist/plugins/java/okhttp/index.js +4 -1
- package/dist/plugins/java/okhttp/index.js.map +2 -2
- package/dist/plugins/java/okhttp/okhttp.d.ts.map +1 -1
- package/dist/plugins/java/okhttp/okhttp.js +1 -1
- package/dist/plugins/java/okhttp/okhttp.js.map +2 -2
- package/dist/plugins/java/unirest/index.d.ts +1 -1
- package/dist/plugins/java/unirest/index.d.ts.map +1 -1
- package/dist/plugins/java/unirest/index.js +4 -1
- package/dist/plugins/java/unirest/index.js.map +2 -2
- package/dist/plugins/java/unirest/unirest.d.ts.map +1 -1
- package/dist/plugins/java/unirest/unirest.js +1 -1
- package/dist/plugins/java/unirest/unirest.js.map +2 -2
- package/dist/plugins/js/axios/axios.js +1 -1
- package/dist/plugins/js/axios/axios.js.map +1 -1
- package/dist/plugins/js/fetch/fetch.js +1 -1
- package/dist/plugins/js/fetch/fetch.js.map +2 -2
- package/dist/plugins/js/jquery/index.d.ts +1 -1
- package/dist/plugins/js/jquery/index.d.ts.map +1 -1
- package/dist/plugins/js/jquery/index.js +4 -1
- package/dist/plugins/js/jquery/index.js.map +2 -2
- package/dist/plugins/js/jquery/jquery.d.ts.map +1 -1
- package/dist/plugins/js/jquery/jquery.js +1 -1
- package/dist/plugins/js/jquery/jquery.js.map +2 -2
- package/dist/plugins/js/ofetch/index.d.ts +1 -1
- package/dist/plugins/js/ofetch/index.d.ts.map +1 -1
- package/dist/plugins/js/ofetch/index.js +4 -1
- package/dist/plugins/js/ofetch/index.js.map +2 -2
- package/dist/plugins/js/xhr/index.d.ts +1 -1
- package/dist/plugins/js/xhr/index.d.ts.map +1 -1
- package/dist/plugins/js/xhr/index.js +4 -1
- package/dist/plugins/js/xhr/index.js.map +2 -2
- package/dist/plugins/js/xhr/xhr.d.ts.map +1 -1
- package/dist/plugins/js/xhr/xhr.js +1 -1
- package/dist/plugins/js/xhr/xhr.js.map +2 -2
- package/dist/plugins/kotlin/okhttp/index.d.ts +1 -1
- package/dist/plugins/kotlin/okhttp/index.d.ts.map +1 -1
- package/dist/plugins/kotlin/okhttp/index.js +4 -1
- package/dist/plugins/kotlin/okhttp/index.js.map +2 -2
- package/dist/plugins/kotlin/okhttp/okhttp.d.ts.map +1 -1
- package/dist/plugins/kotlin/okhttp/okhttp.js +1 -1
- package/dist/plugins/kotlin/okhttp/okhttp.js.map +2 -2
- package/dist/plugins/node/axios/axios.js +1 -1
- package/dist/plugins/node/axios/axios.js.map +1 -1
- package/dist/plugins/node/axios/index.d.ts +1 -1
- package/dist/plugins/node/axios/index.d.ts.map +1 -1
- package/dist/plugins/node/axios/index.js +4 -1
- package/dist/plugins/node/axios/index.js.map +2 -2
- package/dist/plugins/node/fetch/fetch.js +1 -1
- package/dist/plugins/node/fetch/fetch.js.map +2 -2
- package/dist/plugins/node/fetch/index.d.ts +1 -1
- package/dist/plugins/node/fetch/index.d.ts.map +1 -1
- package/dist/plugins/node/fetch/index.js +4 -1
- package/dist/plugins/node/fetch/index.js.map +2 -2
- package/dist/plugins/node/ofetch/index.d.ts +1 -1
- package/dist/plugins/node/ofetch/index.d.ts.map +1 -1
- package/dist/plugins/node/ofetch/index.js +4 -1
- package/dist/plugins/node/ofetch/index.js.map +2 -2
- package/dist/plugins/node/undici/index.d.ts +1 -1
- package/dist/plugins/node/undici/index.d.ts.map +1 -1
- package/dist/plugins/node/undici/index.js +4 -1
- package/dist/plugins/node/undici/index.js.map +2 -2
- package/dist/plugins/node/undici/undici.js +1 -1
- package/dist/plugins/node/undici/undici.js.map +2 -2
- package/dist/plugins/objc/nsurlsession/index.d.ts +1 -1
- package/dist/plugins/objc/nsurlsession/index.d.ts.map +1 -1
- package/dist/plugins/objc/nsurlsession/index.js +4 -1
- package/dist/plugins/objc/nsurlsession/index.js.map +2 -2
- package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts.map +1 -1
- package/dist/plugins/objc/nsurlsession/nsurlsession.js +1 -1
- package/dist/plugins/objc/nsurlsession/nsurlsession.js.map +2 -2
- package/dist/plugins/ocaml/cohttp/cohttp.d.ts.map +1 -1
- package/dist/plugins/ocaml/cohttp/cohttp.js +1 -1
- package/dist/plugins/ocaml/cohttp/cohttp.js.map +2 -2
- package/dist/plugins/ocaml/cohttp/index.d.ts +1 -1
- package/dist/plugins/ocaml/cohttp/index.d.ts.map +1 -1
- package/dist/plugins/ocaml/cohttp/index.js +4 -1
- package/dist/plugins/ocaml/cohttp/index.js.map +2 -2
- package/dist/plugins/php/curl/index.d.ts +1 -1
- package/dist/plugins/php/curl/index.d.ts.map +1 -1
- package/dist/plugins/php/curl/index.js +4 -1
- package/dist/plugins/php/curl/index.js.map +2 -2
- package/dist/plugins/php/guzzle/index.d.ts +1 -1
- package/dist/plugins/php/guzzle/index.d.ts.map +1 -1
- package/dist/plugins/php/guzzle/index.js +4 -1
- package/dist/plugins/php/guzzle/index.js.map +2 -2
- package/dist/plugins/powershell/restmethod/index.d.ts +1 -1
- package/dist/plugins/powershell/restmethod/index.d.ts.map +1 -1
- package/dist/plugins/powershell/restmethod/index.js +4 -1
- package/dist/plugins/powershell/restmethod/index.js.map +2 -2
- package/dist/plugins/powershell/restmethod/restmethod.d.ts.map +1 -1
- package/dist/plugins/powershell/restmethod/restmethod.js +1 -1
- package/dist/plugins/powershell/restmethod/restmethod.js.map +2 -2
- package/dist/plugins/powershell/webrequest/index.d.ts +1 -1
- package/dist/plugins/powershell/webrequest/index.d.ts.map +1 -1
- package/dist/plugins/powershell/webrequest/index.js +4 -1
- package/dist/plugins/powershell/webrequest/index.js.map +2 -2
- package/dist/plugins/powershell/webrequest/webrequest.d.ts.map +1 -1
- package/dist/plugins/powershell/webrequest/webrequest.js +1 -1
- package/dist/plugins/powershell/webrequest/webrequest.js.map +2 -2
- package/dist/plugins/python/httpx/async.d.ts.map +1 -1
- package/dist/plugins/python/httpx/async.js.map +2 -2
- package/dist/plugins/python/httpx/index.d.ts +2 -2
- package/dist/plugins/python/httpx/index.d.ts.map +1 -1
- package/dist/plugins/python/httpx/index.js +6 -2
- package/dist/plugins/python/httpx/index.js.map +2 -2
- package/dist/plugins/python/httpx/sync.d.ts.map +1 -1
- package/dist/plugins/python/httpx/sync.js.map +2 -2
- package/dist/plugins/python/python3/index.d.ts +1 -1
- package/dist/plugins/python/python3/index.d.ts.map +1 -1
- package/dist/plugins/python/python3/index.js +4 -1
- package/dist/plugins/python/python3/index.js.map +2 -2
- package/dist/plugins/python/python3/python3.d.ts.map +1 -1
- package/dist/plugins/python/python3/python3.js +1 -1
- package/dist/plugins/python/python3/python3.js.map +2 -2
- package/dist/plugins/python/requests/index.d.ts +1 -1
- package/dist/plugins/python/requests/index.d.ts.map +1 -1
- package/dist/plugins/python/requests/index.js +4 -1
- package/dist/plugins/python/requests/index.js.map +2 -2
- package/dist/plugins/python/requests/requests.d.ts.map +1 -1
- package/dist/plugins/python/requests/requests.js.map +2 -2
- package/dist/plugins/r/httr/httr.d.ts.map +1 -1
- package/dist/plugins/r/httr/httr.js +1 -1
- package/dist/plugins/r/httr/httr.js.map +2 -2
- package/dist/plugins/r/httr/index.d.ts +1 -1
- package/dist/plugins/r/httr/index.d.ts.map +1 -1
- package/dist/plugins/r/httr/index.js +4 -1
- package/dist/plugins/r/httr/index.js.map +2 -2
- package/dist/plugins/ruby/native/index.d.ts +1 -1
- package/dist/plugins/ruby/native/index.d.ts.map +1 -1
- package/dist/plugins/ruby/native/index.js +4 -1
- package/dist/plugins/ruby/native/index.js.map +2 -2
- package/dist/plugins/ruby/native/native.d.ts.map +1 -1
- package/dist/plugins/ruby/native/native.js +1 -1
- package/dist/plugins/ruby/native/native.js.map +2 -2
- package/dist/plugins/rust/reqwest/index.d.ts +1 -1
- package/dist/plugins/rust/reqwest/index.d.ts.map +1 -1
- package/dist/plugins/rust/reqwest/index.js +4 -1
- package/dist/plugins/rust/reqwest/index.js.map +2 -2
- package/dist/plugins/shell/curl/index.d.ts +1 -1
- package/dist/plugins/shell/curl/index.d.ts.map +1 -1
- package/dist/plugins/shell/curl/index.js +4 -1
- package/dist/plugins/shell/curl/index.js.map +2 -2
- package/dist/plugins/shell/httpie/httpie.d.ts.map +1 -1
- package/dist/plugins/shell/httpie/httpie.js +1 -1
- package/dist/plugins/shell/httpie/httpie.js.map +2 -2
- package/dist/plugins/shell/httpie/index.d.ts +1 -1
- package/dist/plugins/shell/httpie/index.d.ts.map +1 -1
- package/dist/plugins/shell/httpie/index.js +4 -1
- package/dist/plugins/shell/httpie/index.js.map +2 -2
- package/dist/plugins/shell/wget/index.d.ts +1 -1
- package/dist/plugins/shell/wget/index.d.ts.map +1 -1
- package/dist/plugins/shell/wget/index.js +4 -1
- package/dist/plugins/shell/wget/index.js.map +2 -2
- package/dist/plugins/shell/wget/wget.d.ts.map +1 -1
- package/dist/plugins/shell/wget/wget.js +1 -1
- package/dist/plugins/shell/wget/wget.js.map +2 -2
- package/dist/plugins/swift/nsurlsession/index.d.ts +1 -1
- package/dist/plugins/swift/nsurlsession/index.d.ts.map +1 -1
- package/dist/plugins/swift/nsurlsession/index.js +4 -1
- package/dist/plugins/swift/nsurlsession/index.js.map +2 -2
- package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts.map +1 -1
- package/dist/plugins/swift/nsurlsession/nsurlsession.js +1 -1
- package/dist/plugins/swift/nsurlsession/nsurlsession.js.map +2 -2
- package/dist/snippetz.d.ts +2 -2
- package/dist/snippetz.d.ts.map +1 -1
- package/dist/snippetz.js.map +2 -2
- package/dist/utils/convertWithHttpSnippetLite.js +1 -1
- package/dist/utils/convertWithHttpSnippetLite.js.map +2 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +4 -1
- package/dist/utils/index.js.map +2 -2
- package/package.json +4 -3
- package/dist/httpsnippet-lite/esm/helpers/code-builder.d.ts +0 -8
- package/dist/httpsnippet-lite/esm/helpers/code-builder.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/code-builder.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/escape.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/escape.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/form-data.d.ts +0 -3
- package/dist/httpsnippet-lite/esm/helpers/form-data.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/form-data.js +0 -59
- package/dist/httpsnippet-lite/esm/helpers/form-data.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/headers.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/helpers/headers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/headers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/reducer.d.ts +0 -2
- package/dist/httpsnippet-lite/esm/helpers/reducer.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/reducer.js +0 -20
- package/dist/httpsnippet-lite/esm/helpers/reducer.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/shell.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/shell.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/url.d.ts +0 -5
- package/dist/httpsnippet-lite/esm/helpers/url.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/url.js +0 -20
- package/dist/httpsnippet-lite/esm/helpers/url.js.map +0 -7
- package/dist/httpsnippet-lite/esm/helpers/utils.d.ts +0 -3
- package/dist/httpsnippet-lite/esm/helpers/utils.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/helpers/utils.js +0 -16
- package/dist/httpsnippet-lite/esm/helpers/utils.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/c/libcurl/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/c/target.d.ts +0 -26
- package/dist/httpsnippet-lite/esm/targets/c/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/c/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/c/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/clojure/clj_http/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/clojure/target.d.ts +0 -26
- package/dist/httpsnippet-lite/esm/targets/clojure/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/clojure/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/clojure/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/csharp/restsharp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/csharp/target.d.ts +0 -27
- package/dist/httpsnippet-lite/esm/targets/csharp/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/csharp/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/csharp/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/go/native/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/go/native/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/go/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/go/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/go/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/go/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/asynchttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/nethttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/okhttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/target.d.ts +0 -67
- package/dist/httpsnippet-lite/esm/targets/java/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/target.js +0 -22
- package/dist/httpsnippet-lite/esm/targets/java/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/java/unirest/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/axios/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/jquery/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/target.d.ts +0 -55
- package/dist/httpsnippet-lite/esm/targets/javascript/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/target.js +0 -22
- package/dist/httpsnippet-lite/esm/targets/javascript/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/javascript/xhr/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/kotlin/okhttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/kotlin/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/node/axios/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/node/request/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/node/request/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/node/request/client.js +0 -100
- package/dist/httpsnippet-lite/esm/targets/node/request/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/node/target.d.ts +0 -45
- package/dist/httpsnippet-lite/esm/targets/node/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/node/target.js +0 -24
- package/dist/httpsnippet-lite/esm/targets/node/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/objc/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/objc/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/objc/nsurlsession/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/objc/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/objc/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/objc/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/objc/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ocaml/cohttp/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/ocaml/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/helpers.d.ts +0 -3
- package/dist/httpsnippet-lite/esm/targets/php/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/helpers.js +0 -72
- package/dist/httpsnippet-lite/esm/targets/php/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.js +0 -85
- package/dist/httpsnippet-lite/esm/targets/php/http1/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.js +0 -127
- package/dist/httpsnippet-lite/esm/targets/php/http2/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/php/target.d.ts +0 -45
- package/dist/httpsnippet-lite/esm/targets/php/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/php/target.js +0 -22
- package/dist/httpsnippet-lite/esm/targets/php/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/common.d.ts +0 -10
- package/dist/httpsnippet-lite/esm/targets/powershell/common.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/common.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.d.ts +0 -18
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/restmethod/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/target.d.ts +0 -45
- package/dist/httpsnippet-lite/esm/targets/powershell/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/target.js +0 -18
- package/dist/httpsnippet-lite/esm/targets/powershell/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.d.ts +0 -18
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/powershell/webrequest/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/python/helpers.d.ts +0 -9
- package/dist/httpsnippet-lite/esm/targets/python/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/python/helpers.js +0 -68
- package/dist/httpsnippet-lite/esm/targets/python/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.d.ts +0 -19
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/python/python3/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/python/target.d.ts +0 -29
- package/dist/httpsnippet-lite/esm/targets/python/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/python/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/python/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/r/httr/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/r/target.d.ts +0 -27
- package/dist/httpsnippet-lite/esm/targets/r/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/r/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/r/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.d.ts +0 -16
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ruby/native/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/ruby/target.d.ts +0 -26
- package/dist/httpsnippet-lite/esm/targets/ruby/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/ruby/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/ruby/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/shell/httpie/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/shell/target.d.ts +0 -42
- package/dist/httpsnippet-lite/esm/targets/shell/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/shell/target.js +0 -20
- package/dist/httpsnippet-lite/esm/targets/shell/target.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/shell/wget/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.d.ts +0 -17
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/swift/helpers.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.d.ts +0 -15
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/swift/nsurlsession/client.js.map +0 -7
- package/dist/httpsnippet-lite/esm/targets/swift/target.d.ts +0 -25
- package/dist/httpsnippet-lite/esm/targets/swift/target.d.ts.map +0 -1
- package/dist/httpsnippet-lite/esm/targets/swift/target.js +0 -16
- package/dist/httpsnippet-lite/esm/targets/swift/target.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/code-builder.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/escape.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/form-data.d.js +0 -28
- package/dist/httpsnippet-lite/types/helpers/form-data.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/headers.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/reducer.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/reducer.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/shell.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/shell.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/url.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/url.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/helpers/utils.d.js +0 -1
- package/dist/httpsnippet-lite/types/helpers/utils.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/httpsnippet.d.js +0 -19
- package/dist/httpsnippet-lite/types/httpsnippet.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/c/libcurl/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/c/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/c/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/clojure/clj_http/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/clojure/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/clojure/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/csharp/restsharp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/csharp/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/csharp/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/dart/http/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/dart/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/dart/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/go/native/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/go/native/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/go/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/go/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/http/http1.1/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/http/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/http/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/asynchttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/nethttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/okhttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/java/unirest/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/axios/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/fetch/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/jquery/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/javascript/xhr/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/kotlin/okhttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/kotlin/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/axios/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/fetch/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/native/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/native/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/request/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/request/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/node/unirest/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/objc/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/objc/nsurlsession/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/objc/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/objc/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ocaml/cohttp/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ocaml/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/curl/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/guzzle/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/http1/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/http2/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/php/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/php/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/common.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/common.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/restmethod/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/powershell/webrequest/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/python3/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/requests/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/python/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/python/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/r/httr/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/r/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/r/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ruby/native/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/ruby/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/ruby/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/curl/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/httpie/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/shell/wget/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/swift/helpers.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/swift/nsurlsession/client.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/swift/target.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/swift/target.d.js.map +0 -7
- package/dist/httpsnippet-lite/types/targets/targets.d.js +0 -1
- package/dist/httpsnippet-lite/types/targets/targets.d.js.map +0 -7
- /package/dist/httpsnippet-lite/{esm/helpers → helpers}/escape.js +0 -0
- /package/dist/httpsnippet-lite/{types/helpers/code-builder.d.js.map → helpers/reducer.js.map} +0 -0
- /package/dist/httpsnippet-lite/{types/helpers/escape.d.js.map → helpers/snippet-request.js.map} +0 -0
- /package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/restmethod/client.js +0 -0
- /package/dist/httpsnippet-lite/{esm/targets → targets}/powershell/webrequest/client.js +0 -0
- /package/dist/httpsnippet-lite/{types/helpers/headers.d.js.map → targets/target.js.map} +0 -0
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/php/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { curl } from './curl/client.js'\nimport { guzzle } from './guzzle/client.js'\nimport { http1 } from './http1/client.js'\nimport { http2 } from './http2/client.js'\n\nexport const php = {\n info: {\n key: 'php',\n title: 'PHP',\n extname: '.php',\n default: 'curl',\n },\n clientsById: {\n curl,\n guzzle,\n http1,\n http2,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,SAAS,aAAa;AACtB,SAAS,aAAa;AAEf,MAAM,MAAM;AAAA,EACjB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export declare const generatePowershellConvert: (command: any) => ({ method, headersObj, cookies, uriObj, fullUrl, postData, allHeaders, }: {
|
|
2
|
-
method: any;
|
|
3
|
-
headersObj: any;
|
|
4
|
-
cookies: any;
|
|
5
|
-
uriObj: any;
|
|
6
|
-
fullUrl: any;
|
|
7
|
-
postData: any;
|
|
8
|
-
allHeaders: any;
|
|
9
|
-
}) => any;
|
|
10
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/powershell/common.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,yBAAyB,GAAI,YAAO;;;;;;;;SA4DhD,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/powershell/common.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { CodeBuilder } from '../../helpers/code-builder.js'\nimport { escapeString } from '../../helpers/escape.js'\nimport { getHeader } from '../../helpers/headers.js'\n\nexport const generatePowershellConvert = (command) => {\n const convert = ({\n method,\n headersObj,\n cookies,\n uriObj,\n fullUrl,\n postData,\n allHeaders,\n }) => {\n const { push, join } = new CodeBuilder()\n const methods = ['GET', 'POST', 'PUT', 'DELETE', 'PATCH', 'HEAD', 'OPTIONS']\n if (!methods.includes(method.toUpperCase())) {\n return 'Method not supported'\n }\n const commandOptions = []\n // Add headers, including the cookies\n const headers = Object.keys(headersObj)\n // construct headers\n if (headers.length) {\n push('$headers=@{}')\n headers.forEach((key) => {\n if (key !== 'connection') {\n // Not allowed\n push(\n `$headers.Add(\"${key}\", \"${escapeString(headersObj[key], { escapeChar: '`' })}\")`,\n )\n }\n })\n commandOptions.push('-Headers $headers')\n }\n // construct cookies\n if (cookies.length) {\n push(\n '$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession',\n )\n cookies.forEach((cookie) => {\n push('$cookie = New-Object System.Net.Cookie')\n push(`$cookie.Name = '${cookie.name}'`)\n push(`$cookie.Value = '${cookie.value}'`)\n push(`$cookie.Domain = '${uriObj.host}'`)\n push('$session.Cookies.Add($cookie)')\n })\n commandOptions.push('-WebSession $session')\n }\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n commandOptions.push(\n `-ContentType '${escapeString(getHeader(allHeaders, 'content-type'), {\n delimiter: \"'\",\n escapeChar: '`',\n })}'`,\n )\n commandOptions.push(`-Body '${postData.text}'`)\n }\n push(\n `$response = ${command} -Uri '${fullUrl}' -Method ${method} ${commandOptions.join(' ')}`,\n )\n return join()\n }\n return convert\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,mBAAmB;AAC5B,SAAS,oBAAoB;AAC7B,SAAS,iBAAiB;AAEnB,MAAM,4BAA4B,CAAC,YAAY;AACpD,QAAM,UAAU,CAAC;AAAA,IACf;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,MAAM;AACJ,UAAM,EAAE,MAAM,KAAK,IAAI,IAAI,YAAY;AACvC,UAAM,UAAU,CAAC,OAAO,QAAQ,OAAO,UAAU,SAAS,QAAQ,SAAS;AAC3E,QAAI,CAAC,QAAQ,SAAS,OAAO,YAAY,CAAC,GAAG;AAC3C,aAAO;AAAA,IACT;AACA,UAAM,iBAAiB,CAAC;AAExB,UAAM,UAAU,OAAO,KAAK,UAAU;AAEtC,QAAI,QAAQ,QAAQ;AAClB,WAAK,cAAc;AACnB,cAAQ,QAAQ,CAAC,QAAQ;AACvB,YAAI,QAAQ,cAAc;AAExB;AAAA,YACE,iBAAiB,GAAG,OAAO,aAAa,WAAW,GAAG,GAAG,EAAE,YAAY,IAAI,CAAC,CAAC;AAAA,UAC/E;AAAA,QACF;AAAA,MACF,CAAC;AACD,qBAAe,KAAK,mBAAmB;AAAA,IACzC;AAEA,QAAI,QAAQ,QAAQ;AAClB;AAAA,QACE;AAAA,MACF;AACA,cAAQ,QAAQ,CAAC,WAAW;AAC1B,aAAK,wCAAwC;AAC7C,aAAK,mBAAmB,OAAO,IAAI,GAAG;AACtC,aAAK,oBAAoB,OAAO,KAAK,GAAG;AACxC,aAAK,qBAAqB,OAAO,IAAI,GAAG;AACxC,aAAK,+BAA+B;AAAA,MACtC,CAAC;AACD,qBAAe,KAAK,sBAAsB;AAAA,IAC5C;AACA,QAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE,qBAAe;AAAA,QACb,iBAAiB,aAAa,UAAU,YAAY,cAAc,GAAG;AAAA,UACnE,WAAW;AAAA,UACX,YAAY;AAAA,QACd,CAAC,CAAC;AAAA,MACJ;AACA,qBAAe,KAAK,UAAU,SAAS,IAAI,GAAG;AAAA,IAChD;AACA;AAAA,MACE,eAAe,OAAO,UAAU,OAAO,aAAa,MAAM,IAAI,eAAe,KAAK,GAAG,CAAC;AAAA,IACxF;AACA,WAAO,KAAK;AAAA,EACd;AACA,SAAO;AACT;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const restmethod: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ method, headersObj, cookies, uriObj, fullUrl, postData, allHeaders, }: {
|
|
9
|
-
method: any;
|
|
10
|
-
headersObj: any;
|
|
11
|
-
cookies: any;
|
|
12
|
-
uriObj: any;
|
|
13
|
-
fullUrl: any;
|
|
14
|
-
postData: any;
|
|
15
|
-
allHeaders: any;
|
|
16
|
-
}) => any;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/powershell/restmethod/client.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAQtB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/powershell/restmethod/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { generatePowershellConvert } from '../common.js'\n\nexport const restmethod = {\n info: {\n key: 'restmethod',\n title: 'Invoke-RestMethod',\n link: 'https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-RestMethod',\n description: 'Powershell Invoke-RestMethod client',\n },\n convert: generatePowershellConvert('Invoke-RestMethod'),\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,iCAAiC;AAEnC,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,0BAA0B,mBAAmB;AACxD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const powershell: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
webrequest: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ method, headersObj, cookies, uriObj, fullUrl, postData, allHeaders, }: {
|
|
17
|
-
method: any;
|
|
18
|
-
headersObj: any;
|
|
19
|
-
cookies: any;
|
|
20
|
-
uriObj: any;
|
|
21
|
-
fullUrl: any;
|
|
22
|
-
postData: any;
|
|
23
|
-
allHeaders: any;
|
|
24
|
-
}) => any;
|
|
25
|
-
};
|
|
26
|
-
restmethod: {
|
|
27
|
-
info: {
|
|
28
|
-
key: string;
|
|
29
|
-
title: string;
|
|
30
|
-
link: string;
|
|
31
|
-
description: string;
|
|
32
|
-
};
|
|
33
|
-
convert: ({ method, headersObj, cookies, uriObj, fullUrl, postData, allHeaders, }: {
|
|
34
|
-
method: any;
|
|
35
|
-
headersObj: any;
|
|
36
|
-
cookies: any;
|
|
37
|
-
uriObj: any;
|
|
38
|
-
fullUrl: any;
|
|
39
|
-
postData: any;
|
|
40
|
-
allHeaders: any;
|
|
41
|
-
}) => any;
|
|
42
|
-
};
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/powershell/target.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAWtB,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { restmethod } from "./restmethod/client.js";
|
|
2
|
-
import { webrequest } from "./webrequest/client.js";
|
|
3
|
-
const powershell = {
|
|
4
|
-
info: {
|
|
5
|
-
key: "powershell",
|
|
6
|
-
title: "Powershell",
|
|
7
|
-
extname: ".ps1",
|
|
8
|
-
default: "webrequest"
|
|
9
|
-
},
|
|
10
|
-
clientsById: {
|
|
11
|
-
webrequest,
|
|
12
|
-
restmethod
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
export {
|
|
16
|
-
powershell
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/powershell/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { restmethod } from './restmethod/client.js'\nimport { webrequest } from './webrequest/client.js'\n\nexport const powershell = {\n info: {\n key: 'powershell',\n title: 'Powershell',\n extname: '.ps1',\n default: 'webrequest',\n },\n clientsById: {\n webrequest,\n restmethod,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAEpB,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AAAA,EACA,aAAa;AAAA,IACX;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export declare const webrequest: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ method, headersObj, cookies, uriObj, fullUrl, postData, allHeaders, }: {
|
|
9
|
-
method: any;
|
|
10
|
-
headersObj: any;
|
|
11
|
-
cookies: any;
|
|
12
|
-
uriObj: any;
|
|
13
|
-
fullUrl: any;
|
|
14
|
-
postData: any;
|
|
15
|
-
allHeaders: any;
|
|
16
|
-
}) => any;
|
|
17
|
-
};
|
|
18
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/powershell/webrequest/client.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;CAQtB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/powershell/webrequest/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { generatePowershellConvert } from '../common.js'\n\nexport const webrequest = {\n info: {\n key: 'webrequest',\n title: 'Invoke-WebRequest',\n link: 'https://docs.microsoft.com/en-us/powershell/module/Microsoft.PowerShell.Utility/Invoke-WebRequest',\n description: 'Powershell Invoke-WebRequest client',\n },\n convert: generatePowershellConvert('Invoke-WebRequest'),\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,iCAAiC;AAEnC,MAAM,aAAa;AAAA,EACxB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,0BAA0B,mBAAmB;AACxD;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Create a valid Python string of a literal value according to its type.
|
|
3
|
-
*
|
|
4
|
-
* @param {*} value Any JavaScript literal
|
|
5
|
-
* @param {object} opts Target options
|
|
6
|
-
* @return {string}
|
|
7
|
-
*/
|
|
8
|
-
export declare const literalRepresentation: (value: any, opts: any, indentLevel: any) => any;
|
|
9
|
-
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/python/helpers.ts"],"names":[],"mappings":"AAmBA;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,UAAK,EAAE,SAAI,EAAE,gBAAW,QA+C7D,CAAA"}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
function concatValues(concatType, values, pretty, indentation, indentLevel) {
|
|
2
|
-
const currentIndent = indentation.repeat(indentLevel);
|
|
3
|
-
const closingBraceIndent = indentation.repeat(indentLevel - 1);
|
|
4
|
-
const join = pretty ? `,
|
|
5
|
-
${currentIndent}` : ", ";
|
|
6
|
-
const openingBrace = concatType === "object" ? "{" : "[";
|
|
7
|
-
const closingBrace = concatType === "object" ? "}" : "]";
|
|
8
|
-
if (pretty) {
|
|
9
|
-
return `${openingBrace}
|
|
10
|
-
${currentIndent}${values.join(join)}
|
|
11
|
-
${closingBraceIndent}${closingBrace}`;
|
|
12
|
-
}
|
|
13
|
-
if (concatType === "object" && values.length > 0) {
|
|
14
|
-
return `${openingBrace} ${values.join(join)} ${closingBrace}`;
|
|
15
|
-
}
|
|
16
|
-
return `${openingBrace}${values.join(join)}${closingBrace}`;
|
|
17
|
-
}
|
|
18
|
-
const literalRepresentation = (value, opts, indentLevel) => {
|
|
19
|
-
indentLevel = indentLevel === void 0 ? 1 : indentLevel + 1;
|
|
20
|
-
switch (Object.prototype.toString.call(value)) {
|
|
21
|
-
case "[object Number]":
|
|
22
|
-
return value;
|
|
23
|
-
case "[object Array]": {
|
|
24
|
-
let pretty = false;
|
|
25
|
-
const valuesRepresentation = value.map((v) => {
|
|
26
|
-
if (Object.prototype.toString.call(v) === "[object Object]") {
|
|
27
|
-
pretty = Object.keys(v).length > 1;
|
|
28
|
-
}
|
|
29
|
-
return literalRepresentation(v, opts, indentLevel);
|
|
30
|
-
});
|
|
31
|
-
return concatValues(
|
|
32
|
-
"array",
|
|
33
|
-
valuesRepresentation,
|
|
34
|
-
pretty,
|
|
35
|
-
opts.indent,
|
|
36
|
-
indentLevel
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
case "[object Object]": {
|
|
40
|
-
const keyValuePairs = [];
|
|
41
|
-
for (const key in value) {
|
|
42
|
-
keyValuePairs.push(
|
|
43
|
-
`"${key}": ${literalRepresentation(value[key], opts, indentLevel)}`
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
return concatValues(
|
|
47
|
-
"object",
|
|
48
|
-
keyValuePairs,
|
|
49
|
-
opts.pretty && keyValuePairs.length > 1,
|
|
50
|
-
opts.indent,
|
|
51
|
-
indentLevel
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
case "[object Null]":
|
|
55
|
-
return "None";
|
|
56
|
-
case "[object Boolean]":
|
|
57
|
-
return value ? "True" : "False";
|
|
58
|
-
default:
|
|
59
|
-
if (value === null || value === void 0) {
|
|
60
|
-
return "";
|
|
61
|
-
}
|
|
62
|
-
return `"${value.toString().replace(/"/g, '\\"')}"`;
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
export {
|
|
66
|
-
literalRepresentation
|
|
67
|
-
};
|
|
68
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/python/helpers.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * Create a string corresponding to a Dictionary or Array literal representation with pretty option\n * and indentation.\n */\nfunction concatValues(concatType, values, pretty, indentation, indentLevel) {\n const currentIndent = indentation.repeat(indentLevel)\n const closingBraceIndent = indentation.repeat(indentLevel - 1)\n const join = pretty ? `,\\n${currentIndent}` : ', '\n const openingBrace = concatType === 'object' ? '{' : '['\n const closingBrace = concatType === 'object' ? '}' : ']'\n if (pretty) {\n return `${openingBrace}\\n${currentIndent}${values.join(join)}\\n${closingBraceIndent}${closingBrace}`\n }\n if (concatType === 'object' && values.length > 0) {\n return `${openingBrace} ${values.join(join)} ${closingBrace}`\n }\n return `${openingBrace}${values.join(join)}${closingBrace}`\n}\n/**\n * Create a valid Python string of a literal value according to its type.\n *\n * @param {*} value Any JavaScript literal\n * @param {object} opts Target options\n * @return {string}\n */\nexport const literalRepresentation = (value, opts, indentLevel) => {\n indentLevel = indentLevel === undefined ? 1 : indentLevel + 1\n switch (Object.prototype.toString.call(value)) {\n case '[object Number]':\n return value\n case '[object Array]': {\n let pretty = false\n const valuesRepresentation = value.map((v) => {\n // Switch to prettify if the value is a dictionary with multiple keys\n if (Object.prototype.toString.call(v) === '[object Object]') {\n pretty = Object.keys(v).length > 1\n }\n return literalRepresentation(v, opts, indentLevel)\n })\n return concatValues(\n 'array',\n valuesRepresentation,\n pretty,\n opts.indent,\n indentLevel,\n )\n }\n case '[object Object]': {\n const keyValuePairs = []\n for (const key in value) {\n keyValuePairs.push(\n `\"${key}\": ${literalRepresentation(value[key], opts, indentLevel)}`,\n )\n }\n return concatValues(\n 'object',\n keyValuePairs,\n opts.pretty && keyValuePairs.length > 1,\n opts.indent,\n indentLevel,\n )\n }\n case '[object Null]':\n return 'None'\n case '[object Boolean]':\n return value ? 'True' : 'False'\n default:\n if (value === null || value === undefined) {\n return ''\n }\n return `\"${value.toString().replace(/\"/g, '\\\\\"')}\"`\n }\n}\n"],
|
|
5
|
-
"mappings": "AAKA,SAAS,aAAa,YAAY,QAAQ,QAAQ,aAAa,aAAa;AAC1E,QAAM,gBAAgB,YAAY,OAAO,WAAW;AACpD,QAAM,qBAAqB,YAAY,OAAO,cAAc,CAAC;AAC7D,QAAM,OAAO,SAAS;AAAA,EAAM,aAAa,KAAK;AAC9C,QAAM,eAAe,eAAe,WAAW,MAAM;AACrD,QAAM,eAAe,eAAe,WAAW,MAAM;AACrD,MAAI,QAAQ;AACV,WAAO,GAAG,YAAY;AAAA,EAAK,aAAa,GAAG,OAAO,KAAK,IAAI,CAAC;AAAA,EAAK,kBAAkB,GAAG,YAAY;AAAA,EACpG;AACA,MAAI,eAAe,YAAY,OAAO,SAAS,GAAG;AAChD,WAAO,GAAG,YAAY,IAAI,OAAO,KAAK,IAAI,CAAC,IAAI,YAAY;AAAA,EAC7D;AACA,SAAO,GAAG,YAAY,GAAG,OAAO,KAAK,IAAI,CAAC,GAAG,YAAY;AAC3D;AAQO,MAAM,wBAAwB,CAAC,OAAO,MAAM,gBAAgB;AACjE,gBAAc,gBAAgB,SAAY,IAAI,cAAc;AAC5D,UAAQ,OAAO,UAAU,SAAS,KAAK,KAAK,GAAG;AAAA,IAC7C,KAAK;AACH,aAAO;AAAA,IACT,KAAK,kBAAkB;AACrB,UAAI,SAAS;AACb,YAAM,uBAAuB,MAAM,IAAI,CAAC,MAAM;AAE5C,YAAI,OAAO,UAAU,SAAS,KAAK,CAAC,MAAM,mBAAmB;AAC3D,mBAAS,OAAO,KAAK,CAAC,EAAE,SAAS;AAAA,QACnC;AACA,eAAO,sBAAsB,GAAG,MAAM,WAAW;AAAA,MACnD,CAAC;AACD,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACL;AAAA,MACF;AAAA,IACF;AAAA,IACA,KAAK,mBAAmB;AACtB,YAAM,gBAAgB,CAAC;AACvB,iBAAW,OAAO,OAAO;AACvB,sBAAc;AAAA,UACZ,IAAI,GAAG,MAAM,sBAAsB,MAAM,GAAG,GAAG,MAAM,WAAW,CAAC;AAAA,QACnE;AAAA,MACF;AACA,aAAO;AAAA,QACL;AAAA,QACA;AAAA,QACA,KAAK,UAAU,cAAc,SAAS;AAAA,QACtC,KAAK;AAAA,QACL;AAAA,MACF;AAAA,IACF;AAAA,IACA,KAAK;AACH,aAAO;AAAA,IACT,KAAK;AACH,aAAO,QAAQ,SAAS;AAAA,IAC1B;AACE,UAAI,UAAU,QAAQ,UAAU,QAAW;AACzC,eAAO;AAAA,MACT;AACA,aAAO,IAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,KAAK,CAAC;AAAA,EACpD;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export declare const python3: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ uriObj: { path, protocol, host }, postData, allHeaders, method }: {
|
|
9
|
-
uriObj: {
|
|
10
|
-
path: any;
|
|
11
|
-
protocol: any;
|
|
12
|
-
host: any;
|
|
13
|
-
};
|
|
14
|
-
postData: any;
|
|
15
|
-
allHeaders: any;
|
|
16
|
-
method: any;
|
|
17
|
-
}, options?: {}) => any;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/python/python3/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;CA+EnB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/python/python3/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for native Python3.\n *\n * @author\n * @montanaflynn\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForDoubleQuotes } from '../../../helpers/escape.js'\n\nexport const python3 = {\n info: {\n key: 'python3',\n title: 'http.client',\n link: 'https://docs.python.org/3/library/http.client.html',\n description: 'Python3 HTTP Client',\n },\n convert: (\n { uriObj: { path, protocol, host }, postData, allHeaders, method },\n options = {},\n ) => {\n const { insecureSkipVerify = false } = options\n const { push, blank, join } = new CodeBuilder()\n // Start Request\n push('import http.client')\n if (insecureSkipVerify) {\n push('import ssl')\n }\n blank()\n // Check which protocol to be used for the client connection\n if (protocol === 'https:') {\n const sslContext = insecureSkipVerify\n ? ', context = ssl._create_unverified_context()'\n : ''\n push(`conn = http.client.HTTPSConnection(\"${host}\"${sslContext})`)\n blank()\n } else {\n push(`conn = http.client.HTTPConnection(\"${host}\")`)\n blank()\n }\n // Create payload string if it exists\n const payload = JSON.stringify(\n postData === null || postData === void 0 ? void 0 : postData.text,\n )\n if (payload) {\n push(`payload = ${payload}`)\n blank()\n }\n // Create Headers\n const headers = allHeaders\n const headerCount = Object.keys(headers).length\n if (headerCount === 1) {\n for (const header in headers) {\n push(\n `headers = { '${header}': \"${escapeForDoubleQuotes(headers[header])}\" }`,\n )\n blank()\n }\n } else if (headerCount > 1) {\n let count = 1\n push('headers = {')\n for (const header in headers) {\n if (count++ !== headerCount) {\n push(` '${header}': \"${escapeForDoubleQuotes(headers[header])}\",`)\n } else {\n push(` '${header}': \"${escapeForDoubleQuotes(headers[header])}\"`)\n }\n }\n push('}')\n blank()\n }\n // Make Request\n if (payload && headerCount) {\n push(`conn.request(\"${method}\", \"${path}\", payload, headers)`)\n } else if (payload && !headerCount) {\n push(`conn.request(\"${method}\", \"${path}\", payload)`)\n } else if (!payload && headerCount) {\n push(`conn.request(\"${method}\", \"${path}\", headers=headers)`)\n } else {\n push(`conn.request(\"${method}\", \"${path}\")`)\n }\n // Get Response\n blank()\n push('res = conn.getresponse()')\n push('data = res.read()')\n blank()\n push('print(data.decode(\"utf-8\"))')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,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,CACP,EAAE,QAAQ,EAAE,MAAM,UAAU,KAAK,GAAG,UAAU,YAAY,OAAO,GACjE,UAAU,CAAC,MACR;AACH,UAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,UAAM,EAAE,MAAM,OAAO,KAAK,IAAI,IAAI,YAAY;AAE9C,SAAK,oBAAoB;AACzB,QAAI,oBAAoB;AACtB,WAAK,YAAY;AAAA,IACnB;AACA,UAAM;AAEN,QAAI,aAAa,UAAU;AACzB,YAAM,aAAa,qBACf,iDACA;AACJ,WAAK,uCAAuC,IAAI,IAAI,UAAU,GAAG;AACjE,YAAM;AAAA,IACR,OAAO;AACL,WAAK,sCAAsC,IAAI,IAAI;AACnD,YAAM;AAAA,IACR;AAEA,UAAM,UAAU,KAAK;AAAA,MACnB,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS;AAAA,IAC/D;AACA,QAAI,SAAS;AACX,WAAK,aAAa,OAAO,EAAE;AAC3B,YAAM;AAAA,IACR;AAEA,UAAM,UAAU;AAChB,UAAM,cAAc,OAAO,KAAK,OAAO,EAAE;AACzC,QAAI,gBAAgB,GAAG;AACrB,iBAAW,UAAU,SAAS;AAC5B;AAAA,UACE,gBAAgB,MAAM,OAAO,sBAAsB,QAAQ,MAAM,CAAC,CAAC;AAAA,QACrE;AACA,cAAM;AAAA,MACR;AAAA,IACF,WAAW,cAAc,GAAG;AAC1B,UAAI,QAAQ;AACZ,WAAK,aAAa;AAClB,iBAAW,UAAU,SAAS;AAC5B,YAAI,YAAY,aAAa;AAC3B,eAAK,QAAQ,MAAM,OAAO,sBAAsB,QAAQ,MAAM,CAAC,CAAC,IAAI;AAAA,QACtE,OAAO;AACL,eAAK,QAAQ,MAAM,OAAO,sBAAsB,QAAQ,MAAM,CAAC,CAAC,GAAG;AAAA,QACrE;AAAA,MACF;AACA,WAAK,GAAG;AACR,YAAM;AAAA,IACR;AAEA,QAAI,WAAW,aAAa;AAC1B,WAAK,iBAAiB,MAAM,OAAO,IAAI,sBAAsB;AAAA,IAC/D,WAAW,WAAW,CAAC,aAAa;AAClC,WAAK,iBAAiB,MAAM,OAAO,IAAI,aAAa;AAAA,IACtD,WAAW,CAAC,WAAW,aAAa;AAClC,WAAK,iBAAiB,MAAM,OAAO,IAAI,qBAAqB;AAAA,IAC9D,OAAO;AACL,WAAK,iBAAiB,MAAM,OAAO,IAAI,IAAI;AAAA,IAC7C;AAEA,UAAM;AACN,SAAK,0BAA0B;AAC/B,SAAK,mBAAmB;AACxB,UAAM;AACN,SAAK,6BAA6B;AAClC,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
export declare const python: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
python3: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ uriObj: { path, protocol, host }, postData, allHeaders, method }: {
|
|
17
|
-
uriObj: {
|
|
18
|
-
path: any;
|
|
19
|
-
protocol: any;
|
|
20
|
-
host: any;
|
|
21
|
-
};
|
|
22
|
-
postData: any;
|
|
23
|
-
allHeaders: any;
|
|
24
|
-
method: any;
|
|
25
|
-
}, options?: {}) => any;
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/python/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUlB,CAAA"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { python3 } from "./python3/client.js";
|
|
2
|
-
const python = {
|
|
3
|
-
info: {
|
|
4
|
-
key: "python",
|
|
5
|
-
title: "Python",
|
|
6
|
-
extname: ".py",
|
|
7
|
-
default: "python3"
|
|
8
|
-
},
|
|
9
|
-
clientsById: {
|
|
10
|
-
python3
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
export {
|
|
14
|
-
python
|
|
15
|
-
};
|
|
16
|
-
//# sourceMappingURL=target.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/python/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { python3 } from './python3/client.js'\n\nexport const python = {\n info: {\n key: 'python',\n title: 'Python',\n extname: '.py',\n default: 'python3',\n },\n clientsById: {\n python3,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,eAAe;AAEjB,MAAM,SAAS;AAAA,EACpB,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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const httr: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ url, queryObj, queryString, postData, allHeaders, method }: {
|
|
9
|
-
url: any;
|
|
10
|
-
queryObj: any;
|
|
11
|
-
queryString: any;
|
|
12
|
-
postData: any;
|
|
13
|
-
allHeaders: any;
|
|
14
|
-
method: any;
|
|
15
|
-
}, options?: {}) => any;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/r/httr/client.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;CAoHhB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/r/httr/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\n/**\n * @description\n * HTTP code snippet generator for R using httr\n *\n * @author\n * @gabrielakoreeda\n *\n * for any questions or issues regarding the generated code snippet, please open an issue mentioning the author.\n */\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport {\n escapeForDoubleQuotes,\n escapeForSingleQuotes,\n} from '../../../helpers/escape.js'\nimport { getHeader } from '../../../helpers/headers.js'\n\nexport const httr = {\n info: {\n key: 'httr',\n title: 'httr',\n link: 'https://cran.r-project.org/web/packages/httr/vignettes/quickstart.html',\n description: 'httr: Tools for Working with URLs and HTTP',\n },\n convert: (\n { url, queryObj, queryString, postData, allHeaders, method },\n options = {},\n ) => {\n let _a, _b\n // Start snippet\n const { push, blank, join } = new CodeBuilder({\n indent: (_a = options.indent) !== null && _a !== void 0 ? _a : ' ',\n })\n // Import httr\n push('library(httr)')\n blank()\n // Set URL\n push(`url <- \"${url}\"`)\n blank()\n // Construct query string\n const qs = queryObj\n delete queryObj.key\n const entries = Object.entries(qs)\n const entriesCount = entries.length\n if (entriesCount === 1) {\n const entry = entries[0]\n push(`queryString <- list(${entry[0]} = \"${entry[1]}\")`)\n blank()\n } else if (entriesCount > 1) {\n push('queryString <- list(')\n entries.forEach(([key, value], i) => {\n const isLastItem = i !== entriesCount - 1\n const maybeComma = isLastItem ? ',' : ''\n push(`${key} = \"${value}\"${maybeComma}`, 1)\n })\n push(')')\n blank()\n }\n // Construct payload\n const payload = JSON.stringify(\n postData === null || postData === void 0 ? void 0 : postData.text,\n )\n if (payload) {\n push(`payload <- ${payload}`)\n blank()\n }\n // Define encode\n if (postData && (postData.text || postData.jsonObj || postData.params)) {\n switch (postData.mimeType) {\n case 'application/x-www-form-urlencoded':\n push('encode <- \"form\"')\n blank()\n break\n case 'application/json':\n push('encode <- \"json\"')\n blank()\n break\n case 'multipart/form-data':\n push('encode <- \"multipart\"')\n blank()\n break\n default:\n push('encode <- \"raw\"')\n blank()\n break\n }\n }\n // Construct headers\n const cookieHeader = getHeader(allHeaders, 'cookie')\n const acceptHeader = getHeader(allHeaders, 'accept')\n const setCookies = cookieHeader\n ? `set_cookies(\\`${String(cookieHeader)\n .replace(/;/g, '\", `')\n .replace(/` /g, '`')\n .replace(/[=]/g, '` = \"')}\")`\n : undefined\n const setAccept = acceptHeader\n ? `accept(\"${escapeForDoubleQuotes(acceptHeader)}\")`\n : undefined\n const setContentType = `content_type(\"${escapeForDoubleQuotes((_b = postData === null || postData === void 0 ? void 0 : postData.mimeType) !== null && _b !== void 0 ? _b : 'application/octet-stream')}\")`\n const otherHeaders = Object.entries(allHeaders)\n // These headers are all handled separately:\n .filter(\n ([key]) =>\n !['cookie', 'accept', 'content-type'].includes(key.toLowerCase()),\n )\n .map(([key, value]) => `'${key}' = '${escapeForSingleQuotes(value)}'`)\n .join(', ')\n const setHeaders = otherHeaders ? `add_headers(${otherHeaders})` : undefined\n // Construct request\n let request = `response <- VERB(\"${method}\", url`\n if (payload) {\n request += ', body = payload'\n }\n if (queryString.length) {\n request += ', query = queryString'\n }\n const headerAdditions = [setHeaders, setContentType, setAccept, setCookies]\n .filter((x) => !!x)\n .join(', ')\n if (headerAdditions) {\n request += `, ${headerAdditions}`\n }\n if (postData && (postData.text || postData.jsonObj || postData.params)) {\n request += ', encode = encode'\n }\n request += ')'\n push(request)\n blank()\n // Print response\n push('content(response, \"text\")')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AAUA,SAAS,mBAAmB;AAC5B;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAEnB,MAAM,OAAO;AAAA,EAClB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CACP,EAAE,KAAK,UAAU,aAAa,UAAU,YAAY,OAAO,GAC3D,UAAU,CAAC,MACR;AACH,QAAI,IAAI;AAER,UAAM,EAAE,MAAM,OAAO,KAAK,IAAI,IAAI,YAAY;AAAA,MAC5C,SAAS,KAAK,QAAQ,YAAY,QAAQ,OAAO,SAAS,KAAK;AAAA,IACjE,CAAC;AAED,SAAK,eAAe;AACpB,UAAM;AAEN,SAAK,WAAW,GAAG,GAAG;AACtB,UAAM;AAEN,UAAM,KAAK;AACX,WAAO,SAAS;AAChB,UAAM,UAAU,OAAO,QAAQ,EAAE;AACjC,UAAM,eAAe,QAAQ;AAC7B,QAAI,iBAAiB,GAAG;AACtB,YAAM,QAAQ,QAAQ,CAAC;AACvB,WAAK,uBAAuB,MAAM,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,IAAI;AACvD,YAAM;AAAA,IACR,WAAW,eAAe,GAAG;AAC3B,WAAK,sBAAsB;AAC3B,cAAQ,QAAQ,CAAC,CAAC,KAAK,KAAK,GAAG,MAAM;AACnC,cAAM,aAAa,MAAM,eAAe;AACxC,cAAM,aAAa,aAAa,MAAM;AACtC,aAAK,GAAG,GAAG,OAAO,KAAK,IAAI,UAAU,IAAI,CAAC;AAAA,MAC5C,CAAC;AACD,WAAK,GAAG;AACR,YAAM;AAAA,IACR;AAEA,UAAM,UAAU,KAAK;AAAA,MACnB,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS;AAAA,IAC/D;AACA,QAAI,SAAS;AACX,WAAK,cAAc,OAAO,EAAE;AAC5B,YAAM;AAAA,IACR;AAEA,QAAI,aAAa,SAAS,QAAQ,SAAS,WAAW,SAAS,SAAS;AACtE,cAAQ,SAAS,UAAU;AAAA,QACzB,KAAK;AACH,eAAK,kBAAkB;AACvB,gBAAM;AACN;AAAA,QACF,KAAK;AACH,eAAK,kBAAkB;AACvB,gBAAM;AACN;AAAA,QACF,KAAK;AACH,eAAK,uBAAuB;AAC5B,gBAAM;AACN;AAAA,QACF;AACE,eAAK,iBAAiB;AACtB,gBAAM;AACN;AAAA,MACJ;AAAA,IACF;AAEA,UAAM,eAAe,UAAU,YAAY,QAAQ;AACnD,UAAM,eAAe,UAAU,YAAY,QAAQ;AACnD,UAAM,aAAa,eACf,iBAAiB,OAAO,YAAY,EACjC,QAAQ,MAAM,MAAM,EACpB,QAAQ,OAAO,GAAG,EAClB,QAAQ,QAAQ,OAAO,CAAC,OAC3B;AACJ,UAAM,YAAY,eACd,WAAW,sBAAsB,YAAY,CAAC,OAC9C;AACJ,UAAM,iBAAiB,iBAAiB,uBAAuB,KAAK,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,cAAc,QAAQ,OAAO,SAAS,KAAK,0BAA0B,CAAC;AACvM,UAAM,eAAe,OAAO,QAAQ,UAAU,EAE3C;AAAA,MACC,CAAC,CAAC,GAAG,MACH,CAAC,CAAC,UAAU,UAAU,cAAc,EAAE,SAAS,IAAI,YAAY,CAAC;AAAA,IACpE,EACC,IAAI,CAAC,CAAC,KAAK,KAAK,MAAM,IAAI,GAAG,QAAQ,sBAAsB,KAAK,CAAC,GAAG,EACpE,KAAK,IAAI;AACZ,UAAM,aAAa,eAAe,eAAe,YAAY,MAAM;AAEnE,QAAI,UAAU,qBAAqB,MAAM;AACzC,QAAI,SAAS;AACX,iBAAW;AAAA,IACb;AACA,QAAI,YAAY,QAAQ;AACtB,iBAAW;AAAA,IACb;AACA,UAAM,kBAAkB,CAAC,YAAY,gBAAgB,WAAW,UAAU,EACvE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EACjB,KAAK,IAAI;AACZ,QAAI,iBAAiB;AACnB,iBAAW,KAAK,eAAe;AAAA,IACjC;AACA,QAAI,aAAa,SAAS,QAAQ,SAAS,WAAW,SAAS,SAAS;AACtE,iBAAW;AAAA,IACb;AACA,eAAW;AACX,SAAK,OAAO;AACZ,UAAM;AAEN,SAAK,2BAA2B;AAChC,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export declare const r: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
httr: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ url, queryObj, queryString, postData, allHeaders, method }: {
|
|
17
|
-
url: any;
|
|
18
|
-
queryObj: any;
|
|
19
|
-
queryString: any;
|
|
20
|
-
postData: any;
|
|
21
|
-
allHeaders: any;
|
|
22
|
-
method: any;
|
|
23
|
-
}, options?: {}) => any;
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/r/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAUb,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/r/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { httr } from './httr/client.js'\n\nexport const r = {\n info: {\n key: 'r',\n title: 'R',\n extname: '.r',\n default: 'httr',\n },\n clientsById: {\n httr,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,YAAY;AAEd,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
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export declare const native: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ uriObj, method: rawMethod, fullUrl, postData, allHeaders }: {
|
|
9
|
-
uriObj: any;
|
|
10
|
-
method: any;
|
|
11
|
-
fullUrl: any;
|
|
12
|
-
postData: any;
|
|
13
|
-
allHeaders: any;
|
|
14
|
-
}, options?: {}) => 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/ruby/native/client.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;CAqElB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../../src/httpsnippet-lite/esm/targets/ruby/native/client.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { CodeBuilder } from '../../../helpers/code-builder.js'\nimport { escapeForSingleQuotes } from '../../../helpers/escape.js'\n\nexport const native = {\n info: {\n key: 'native',\n title: 'net::http',\n link: 'http://ruby-doc.org/stdlib-2.2.1/libdoc/net/http/rdoc/Net/HTTP.html',\n description: 'Ruby HTTP client',\n },\n convert: (\n { uriObj, method: rawMethod, fullUrl, postData, allHeaders },\n options = {},\n ) => {\n const { insecureSkipVerify = false } = options\n const { push, blank, join } = new CodeBuilder()\n push(\"require 'uri'\")\n push(\"require 'net/http'\")\n blank()\n // To support custom methods we check for the supported methods\n // and if doesn't exist then we build a custom class for it\n const method = rawMethod.toUpperCase()\n const methods = [\n 'GET',\n 'POST',\n 'HEAD',\n 'DELETE',\n 'PATCH',\n 'PUT',\n 'OPTIONS',\n 'COPY',\n 'LOCK',\n 'UNLOCK',\n 'MOVE',\n 'TRACE',\n ]\n const capMethod = method.charAt(0) + method.substring(1).toLowerCase()\n if (!methods.includes(method)) {\n push(`class Net::HTTP::${capMethod} < Net::HTTPRequest`)\n push(` METHOD = '${method.toUpperCase()}'`)\n push(\n ` REQUEST_HAS_BODY = '${(postData === null || postData === void 0 ? void 0 : postData.text) ? 'true' : 'false'}'`,\n )\n push(' RESPONSE_HAS_BODY = true')\n push('end')\n blank()\n }\n push(`url = URI(\"${fullUrl}\")`)\n blank()\n push('http = Net::HTTP.new(url.host, url.port)')\n if (uriObj.protocol === 'https:') {\n push('http.use_ssl = true')\n if (insecureSkipVerify) {\n push('http.verify_mode = OpenSSL::SSL::VERIFY_NONE')\n }\n }\n blank()\n push(`request = Net::HTTP::${capMethod}.new(url)`)\n const headers = Object.keys(allHeaders)\n if (headers.length) {\n headers.forEach((key) => {\n push(`request[\"${key}\"] = '${escapeForSingleQuotes(allHeaders[key])}'`)\n })\n }\n if (postData === null || postData === void 0 ? void 0 : postData.text) {\n push(`request.body = ${JSON.stringify(postData.text)}`)\n }\n blank()\n push('response = http.request(request)')\n push('puts response.read_body')\n return join()\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,mBAAmB;AAC5B,SAAS,6BAA6B;AAE/B,MAAM,SAAS;AAAA,EACpB,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aAAa;AAAA,EACf;AAAA,EACA,SAAS,CACP,EAAE,QAAQ,QAAQ,WAAW,SAAS,UAAU,WAAW,GAC3D,UAAU,CAAC,MACR;AACH,UAAM,EAAE,qBAAqB,MAAM,IAAI;AACvC,UAAM,EAAE,MAAM,OAAO,KAAK,IAAI,IAAI,YAAY;AAC9C,SAAK,eAAe;AACpB,SAAK,oBAAoB;AACzB,UAAM;AAGN,UAAM,SAAS,UAAU,YAAY;AACrC,UAAM,UAAU;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AACA,UAAM,YAAY,OAAO,OAAO,CAAC,IAAI,OAAO,UAAU,CAAC,EAAE,YAAY;AACrE,QAAI,CAAC,QAAQ,SAAS,MAAM,GAAG;AAC7B,WAAK,oBAAoB,SAAS,qBAAqB;AACvD,WAAK,eAAe,OAAO,YAAY,CAAC,GAAG;AAC3C;AAAA,QACE,0BAA0B,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,QAAQ,SAAS,OAAO;AAAA,MACjH;AACA,WAAK,4BAA4B;AACjC,WAAK,KAAK;AACV,YAAM;AAAA,IACR;AACA,SAAK,cAAc,OAAO,IAAI;AAC9B,UAAM;AACN,SAAK,0CAA0C;AAC/C,QAAI,OAAO,aAAa,UAAU;AAChC,WAAK,qBAAqB;AAC1B,UAAI,oBAAoB;AACtB,aAAK,8CAA8C;AAAA,MACrD;AAAA,IACF;AACA,UAAM;AACN,SAAK,wBAAwB,SAAS,WAAW;AACjD,UAAM,UAAU,OAAO,KAAK,UAAU;AACtC,QAAI,QAAQ,QAAQ;AAClB,cAAQ,QAAQ,CAAC,QAAQ;AACvB,aAAK,YAAY,GAAG,SAAS,sBAAsB,WAAW,GAAG,CAAC,CAAC,GAAG;AAAA,MACxE,CAAC;AAAA,IACH;AACA,QAAI,aAAa,QAAQ,aAAa,SAAS,SAAS,SAAS,MAAM;AACrE,WAAK,kBAAkB,KAAK,UAAU,SAAS,IAAI,CAAC,EAAE;AAAA,IACxD;AACA,UAAM;AACN,SAAK,kCAAkC;AACvC,SAAK,yBAAyB;AAC9B,WAAO,KAAK;AAAA,EACd;AACF;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
export declare const ruby: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
extname: string;
|
|
6
|
-
default: string;
|
|
7
|
-
};
|
|
8
|
-
clientsById: {
|
|
9
|
-
native: {
|
|
10
|
-
info: {
|
|
11
|
-
key: string;
|
|
12
|
-
title: string;
|
|
13
|
-
link: string;
|
|
14
|
-
description: string;
|
|
15
|
-
};
|
|
16
|
-
convert: ({ uriObj, method: rawMethod, fullUrl, postData, allHeaders }: {
|
|
17
|
-
uriObj: any;
|
|
18
|
-
method: any;
|
|
19
|
-
fullUrl: any;
|
|
20
|
-
postData: any;
|
|
21
|
-
allHeaders: any;
|
|
22
|
-
}, options?: {}) => any;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
//# sourceMappingURL=target.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"target.d.ts","sourceRoot":"","sources":["../../../../../src/httpsnippet-lite/esm/targets/ruby/target.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,IAAI;;;;;;;;;;;;;;;;;;;;;;;;CAUhB,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../../src/httpsnippet-lite/esm/targets/ruby/target.ts"],
|
|
4
|
-
"sourcesContent": ["// @ts-nocheck\nimport { native } from './native/client.js'\n\nexport const ruby = {\n info: {\n key: 'ruby',\n title: 'Ruby',\n extname: '.rb',\n default: 'native',\n },\n clientsById: {\n native,\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,SAAS,cAAc;AAEhB,MAAM,OAAO;AAAA,EAClB,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
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export declare const httpie: {
|
|
2
|
-
info: {
|
|
3
|
-
key: string;
|
|
4
|
-
title: string;
|
|
5
|
-
link: string;
|
|
6
|
-
description: string;
|
|
7
|
-
};
|
|
8
|
-
convert: ({ allHeaders, postData, queryObj, fullUrl, method, url }: {
|
|
9
|
-
allHeaders: any;
|
|
10
|
-
postData: any;
|
|
11
|
-
queryObj: any;
|
|
12
|
-
fullUrl: any;
|
|
13
|
-
method: any;
|
|
14
|
-
url: any;
|
|
15
|
-
}, options: any) => any;
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../../../../../src/httpsnippet-lite/esm/targets/shell/httpie/client.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;CA0HlB,CAAA"}
|