@scalar/snippetz 0.2.15 → 0.2.17
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/README.md +0 -2
- package/dist/clients.d.ts +1 -1
- package/dist/clients.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/plugins/c/libcurl/libcurl.d.ts +1 -1
- package/dist/plugins/c/libcurl/libcurl.d.ts.map +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.d.ts +1 -1
- package/dist/plugins/clojure/clj_http/clj_http.d.ts.map +1 -1
- package/dist/plugins/csharp/httpclient/httpclient.d.ts +1 -1
- package/dist/plugins/csharp/httpclient/httpclient.d.ts.map +1 -1
- package/dist/plugins/csharp/restsharp/restsharp.d.ts +1 -1
- package/dist/plugins/csharp/restsharp/restsharp.d.ts.map +1 -1
- package/dist/plugins/dart/http/http.d.ts +1 -1
- package/dist/plugins/dart/http/http.d.ts.map +1 -1
- package/dist/plugins/go/native/native.d.ts +1 -1
- package/dist/plugins/go/native/native.d.ts.map +1 -1
- package/dist/plugins/http/http11/http11.d.ts +1 -1
- package/dist/plugins/http/http11/http11.d.ts.map +1 -1
- package/dist/plugins/java/asynchttp/asynchttp.d.ts +1 -1
- package/dist/plugins/java/asynchttp/asynchttp.d.ts.map +1 -1
- package/dist/plugins/java/nethttp/nethttp.d.ts +1 -1
- package/dist/plugins/java/nethttp/nethttp.d.ts.map +1 -1
- package/dist/plugins/java/okhttp/okhttp.d.ts +1 -1
- package/dist/plugins/java/okhttp/okhttp.d.ts.map +1 -1
- package/dist/plugins/java/unirest/unirest.d.ts +1 -1
- package/dist/plugins/java/unirest/unirest.d.ts.map +1 -1
- package/dist/plugins/js/axios/axios.d.ts +1 -1
- package/dist/plugins/js/axios/axios.d.ts.map +1 -1
- package/dist/plugins/js/fetch/fetch.d.ts +1 -1
- package/dist/plugins/js/fetch/fetch.d.ts.map +1 -1
- package/dist/plugins/js/jquery/jquery.d.ts +1 -1
- package/dist/plugins/js/jquery/jquery.d.ts.map +1 -1
- package/dist/plugins/js/ofetch/ofetch.d.ts +1 -1
- package/dist/plugins/js/ofetch/ofetch.d.ts.map +1 -1
- package/dist/plugins/js/xhr/xhr.d.ts +1 -1
- package/dist/plugins/js/xhr/xhr.d.ts.map +1 -1
- package/dist/plugins/kotlin/okhttp/okhttp.d.ts +1 -1
- package/dist/plugins/kotlin/okhttp/okhttp.d.ts.map +1 -1
- package/dist/plugins/node/axios/axios.d.ts +1 -1
- package/dist/plugins/node/axios/axios.d.ts.map +1 -1
- package/dist/plugins/node/fetch/fetch.d.ts +1 -1
- package/dist/plugins/node/fetch/fetch.d.ts.map +1 -1
- package/dist/plugins/node/ofetch/ofetch.d.ts +1 -1
- package/dist/plugins/node/ofetch/ofetch.d.ts.map +1 -1
- package/dist/plugins/node/undici/undici.d.ts +1 -1
- package/dist/plugins/node/undici/undici.d.ts.map +1 -1
- package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts +1 -1
- package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts.map +1 -1
- package/dist/plugins/ocaml/cohttp/cohttp.d.ts +1 -1
- package/dist/plugins/ocaml/cohttp/cohttp.d.ts.map +1 -1
- package/dist/plugins/php/curl/curl.d.ts +1 -1
- package/dist/plugins/php/curl/curl.d.ts.map +1 -1
- package/dist/plugins/php/guzzle/guzzle.d.ts +1 -1
- package/dist/plugins/php/guzzle/guzzle.d.ts.map +1 -1
- package/dist/plugins/powershell/restmethod/restmethod.d.ts +1 -1
- package/dist/plugins/powershell/restmethod/restmethod.d.ts.map +1 -1
- package/dist/plugins/powershell/webrequest/webrequest.d.ts +1 -1
- package/dist/plugins/powershell/webrequest/webrequest.d.ts.map +1 -1
- package/dist/plugins/python/python3/python3.d.ts +1 -1
- package/dist/plugins/python/python3/python3.d.ts.map +1 -1
- package/dist/plugins/python/requests/requests.d.ts +1 -1
- package/dist/plugins/python/requests/requests.d.ts.map +1 -1
- package/dist/plugins/r/httr/httr.d.ts +1 -1
- package/dist/plugins/r/httr/httr.d.ts.map +1 -1
- package/dist/plugins/ruby/native/native.d.ts +1 -1
- package/dist/plugins/ruby/native/native.d.ts.map +1 -1
- package/dist/plugins/shell/curl/curl.d.ts +1 -1
- package/dist/plugins/shell/curl/curl.d.ts.map +1 -1
- package/dist/plugins/shell/curl/curl.js +18 -4
- package/dist/plugins/shell/httpie/httpie.d.ts +1 -1
- package/dist/plugins/shell/httpie/httpie.d.ts.map +1 -1
- package/dist/plugins/shell/wget/wget.d.ts +1 -1
- package/dist/plugins/shell/wget/wget.d.ts.map +1 -1
- package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts +1 -1
- package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts.map +1 -1
- package/dist/snippetz.d.ts +3 -3
- package/dist/snippetz.d.ts.map +1 -1
- package/dist/utils/convertWithHttpSnippetLite.d.ts +1 -1
- package/dist/utils/convertWithHttpSnippetLite.d.ts.map +1 -1
- package/package.json +3 -8
- package/dist/types/index.d.ts +0 -42
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -42
- package/dist/types/index.test-d.d.ts +0 -2
- package/dist/types/index.test-d.d.ts.map +0 -1
package/README.md
CHANGED
package/dist/clients.d.ts
CHANGED
package/dist/clients.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"clients.d.ts","sourceRoot":"","sources":["../src/clients.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAAM,EAmH3B,CAAA"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAA;AAE1B,cAAc,wBAAwB,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { snippetz } from './snippetz.js';
|
|
2
|
-
export
|
|
2
|
+
export * from '@scalar/types/snippetz';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"libcurl.d.ts","sourceRoot":"","sources":["../../../../src/plugins/c/libcurl/libcurl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"libcurl.d.ts","sourceRoot":"","sources":["../../../../src/plugins/c/libcurl/libcurl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAQtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clj_http.d.ts","sourceRoot":"","sources":["../../../../src/plugins/clojure/clj_http/clj_http.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"clj_http.d.ts","sourceRoot":"","sources":["../../../../src/plugins/clojure/clj_http/clj_http.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAQ5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpclient.d.ts","sourceRoot":"","sources":["../../../../src/plugins/csharp/httpclient/httpclient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpclient.d.ts","sourceRoot":"","sources":["../../../../src/plugins/csharp/httpclient/httpclient.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAQ9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restsharp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/csharp/restsharp/restsharp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"restsharp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/csharp/restsharp/restsharp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,MAQ7B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dart/http/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/plugins/dart/http/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MA4GtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../../src/plugins/go/native/native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../../src/plugins/go/native/native.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAQtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http11.d.ts","sourceRoot":"","sources":["../../../../src/plugins/http/http11/http11.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"http11.d.ts","sourceRoot":"","sources":["../../../../src/plugins/http/http11/http11.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAoHxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asynchttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/asynchttp/asynchttp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"asynchttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/asynchttp/asynchttp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAQ3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nethttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/nethttp/nethttp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nethttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/nethttp/nethttp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAQzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"okhttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/okhttp/okhttp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"okhttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/okhttp/okhttp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAQxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unirest.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/unirest/unirest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unirest.d.ts","sourceRoot":"","sources":["../../../../src/plugins/java/unirest/unirest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAQzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/axios/axios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/axios/axios.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAQrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/fetch/fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/fetch/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAqErB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"jquery.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/jquery/jquery.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"jquery.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/jquery/jquery.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MAQtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/ofetch/ofetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ofetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/ofetch/ofetch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,QAAQ,EAAE,MA6EtB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/xhr/xhr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"xhr.d.ts","sourceRoot":"","sources":["../../../../src/plugins/js/xhr/xhr.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,MAQnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"okhttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/kotlin/okhttp/okhttp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"okhttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/kotlin/okhttp/okhttp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAQ1B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/axios/axios.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/axios/axios.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAQvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/fetch/fetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/fetch/fetch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAqEvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ofetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/ofetch/ofetch.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ofetch.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/ofetch/ofetch.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MA6ExB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"undici.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/undici/undici.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"undici.d.ts","sourceRoot":"","sources":["../../../../src/plugins/node/undici/undici.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAuExB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/objc/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/objc/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,MAQ9B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cohttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ocaml/cohttp/cohttp.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cohttp.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ocaml/cohttp/cohttp.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAQzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../../src/plugins/php/curl/curl.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../../src/plugins/php/curl/curl.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAE,MAQrB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"guzzle.d.ts","sourceRoot":"","sources":["../../../../src/plugins/php/guzzle/guzzle.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"guzzle.d.ts","sourceRoot":"","sources":["../../../../src/plugins/php/guzzle/guzzle.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAQvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"restmethod.d.ts","sourceRoot":"","sources":["../../../../src/plugins/powershell/restmethod/restmethod.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"restmethod.d.ts","sourceRoot":"","sources":["../../../../src/plugins/powershell/restmethod/restmethod.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAQlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webrequest.d.ts","sourceRoot":"","sources":["../../../../src/plugins/powershell/webrequest/webrequest.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webrequest.d.ts","sourceRoot":"","sources":["../../../../src/plugins/powershell/webrequest/webrequest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,MAQlC,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"python3.d.ts","sourceRoot":"","sources":["../../../../src/plugins/python/python3/python3.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"python3.d.ts","sourceRoot":"","sources":["../../../../src/plugins/python/python3/python3.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAQ3B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../src/plugins/python/requests/requests.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"requests.d.ts","sourceRoot":"","sources":["../../../../src/plugins/python/requests/requests.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,cAAc,EAAE,MAQ5B,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httr.d.ts","sourceRoot":"","sources":["../../../../src/plugins/r/httr/httr.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httr.d.ts","sourceRoot":"","sources":["../../../../src/plugins/r/httr/httr.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,KAAK,EAAE,MAQnB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ruby/native/native.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../../../src/plugins/ruby/native/native.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAQxB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/curl/curl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"curl.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/curl/curl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAqHvB,CAAA"}
|
|
@@ -67,9 +67,15 @@ const shellCurl = {
|
|
|
67
67
|
if (normalizedRequest.postData.mimeType === 'application/json') {
|
|
68
68
|
// Pretty print JSON data
|
|
69
69
|
if (normalizedRequest.postData.text) {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
try {
|
|
71
|
+
const jsonData = JSON.parse(normalizedRequest.postData.text);
|
|
72
|
+
const prettyJson = JSON.stringify(jsonData, null, 2);
|
|
73
|
+
parts.push(`--data '${prettyJson}'`);
|
|
74
|
+
}
|
|
75
|
+
catch {
|
|
76
|
+
// If JSON parsing fails, use the original text
|
|
77
|
+
parts.push(`--data '${normalizedRequest.postData.text}'`);
|
|
78
|
+
}
|
|
73
79
|
}
|
|
74
80
|
}
|
|
75
81
|
else if (normalizedRequest.postData.mimeType === 'application/octet-stream') {
|
|
@@ -94,7 +100,15 @@ const shellCurl = {
|
|
|
94
100
|
});
|
|
95
101
|
}
|
|
96
102
|
else {
|
|
97
|
-
|
|
103
|
+
// Try to parse and pretty print if it's JSON, otherwise use raw text
|
|
104
|
+
try {
|
|
105
|
+
const jsonData = JSON.parse(normalizedRequest.postData.text ?? '');
|
|
106
|
+
const prettyJson = JSON.stringify(jsonData, null, 2);
|
|
107
|
+
parts.push(`--data '${prettyJson}'`);
|
|
108
|
+
}
|
|
109
|
+
catch {
|
|
110
|
+
parts.push(`--data '${normalizedRequest.postData.text}'`);
|
|
111
|
+
}
|
|
98
112
|
}
|
|
99
113
|
}
|
|
100
114
|
return parts.join(' \\\n ');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"httpie.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/httpie/httpie.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"httpie.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/httpie/httpie.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAQzB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wget.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/wget/wget.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"wget.d.ts","sourceRoot":"","sources":["../../../../src/plugins/shell/wget/wget.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,SAAS,EAAE,MAQvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAA;AAEpD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAQ/B,CAAA"}
|
package/dist/snippetz.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import type { ClientId, HarRequest, TargetId } from '
|
|
1
|
+
import type { ClientId, HarRequest, TargetId } from '@scalar/types/snippetz';
|
|
2
2
|
/**
|
|
3
3
|
* Generate code examples for HAR requests
|
|
4
4
|
*/
|
|
5
5
|
export declare function snippetz(): {
|
|
6
6
|
print<T extends TargetId>(target: T, client: ClientId<T>, request: Partial<HarRequest>): string | undefined;
|
|
7
|
-
clients(): import("
|
|
7
|
+
clients(): import("@scalar/types/snippetz").Target[];
|
|
8
8
|
plugins(): {
|
|
9
9
|
target: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift" | "dart";
|
|
10
10
|
client: "libcurl" | "clj_http" | "httpclient" | "restsharp" | "native" | "http" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "fetch" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "httr" | "httpie" | "wget";
|
|
11
11
|
}[];
|
|
12
|
-
findPlugin: <T extends TargetId>(target: T | string, client: ClientId<T> | string) => import("
|
|
12
|
+
findPlugin: <T extends TargetId>(target: T | string, client: ClientId<T> | string) => import("@scalar/types/snippetz").Plugin | undefined;
|
|
13
13
|
hasPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string): boolean;
|
|
14
14
|
};
|
|
15
15
|
//# sourceMappingURL=snippetz.d.ts.map
|
package/dist/snippetz.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAA;AAE5E;;GAEG;AACH,wBAAgB,QAAQ;UAMd,CAAC,SAAS,QAAQ,UAAU,CAAC,UAAU,QAAQ,CAAC,CAAC,CAAC,WAAW,OAAO,CAAC,UAAU,CAAC;;;;;;iBALpE,CAAC,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;cAoB5E,CAAC,SAAS,QAAQ,UAAU,CAAC,GAAG,MAAM,UAAU,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;EAIjF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"convertWithHttpSnippetLite.d.ts","sourceRoot":"","sources":["../../src/utils/convertWithHttpSnippetLite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"convertWithHttpSnippetLite.d.ts","sourceRoot":"","sources":["../../src/utils/convertWithHttpSnippetLite.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAExD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAExC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC/B,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAC5B,MAAM,CAwHR"}
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "git+https://github.com/scalar/scalar.git",
|
|
10
10
|
"directory": "packages/snippetz"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.2.
|
|
12
|
+
"version": "0.2.17",
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=18"
|
|
15
15
|
},
|
|
@@ -26,11 +26,6 @@
|
|
|
26
26
|
"types": "./dist/utils/index.d.ts",
|
|
27
27
|
"default": "./dist/utils/index.js"
|
|
28
28
|
},
|
|
29
|
-
"./types": {
|
|
30
|
-
"import": "./dist/types/index.js",
|
|
31
|
-
"types": "./dist/types/index.d.ts",
|
|
32
|
-
"default": "./dist/types/index.js"
|
|
33
|
-
},
|
|
34
29
|
"./plugins/swift/nsurlsession": {
|
|
35
30
|
"import": "./dist/plugins/swift/nsurlsession/index.js",
|
|
36
31
|
"types": "./dist/plugins/swift/nsurlsession/index.d.ts",
|
|
@@ -216,9 +211,9 @@
|
|
|
216
211
|
"stringify-object": "^5.0.0"
|
|
217
212
|
},
|
|
218
213
|
"devDependencies": {
|
|
219
|
-
"@types/har-format": "^1.2.15",
|
|
220
214
|
"vite": "^5.4.10",
|
|
221
|
-
"@scalar/
|
|
215
|
+
"@scalar/types": "0.1.2",
|
|
216
|
+
"@scalar/build-tooling": "0.1.17"
|
|
222
217
|
},
|
|
223
218
|
"scripts": {
|
|
224
219
|
"build": "scalar-build-rollup",
|
package/dist/types/index.d.ts
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import type { Request as HarRequest } from 'har-format';
|
|
2
|
-
export type { Request as HarRequest } from 'har-format';
|
|
3
|
-
/**
|
|
4
|
-
* List of available clients
|
|
5
|
-
*/
|
|
6
|
-
export declare const AVAILABLE_CLIENTS: readonly ["c/libcurl", "clojure/clj_http", "csharp/httpclient", "csharp/restsharp", "go/native", "http/http1.1", "java/asynchttp", "java/nethttp", "java/okhttp", "java/unirest", "js/axios", "js/fetch", "js/jquery", "js/ofetch", "js/xhr", "kotlin/okhttp", "node/axios", "node/fetch", "node/ofetch", "node/undici", "objc/nsurlsession", "ocaml/cohttp", "php/curl", "php/guzzle", "powershell/restmethod", "powershell/webrequest", "python/python3", "python/requests", "r/httr", "ruby/native", "shell/curl", "shell/httpie", "shell/wget", "swift/nsurlsession", "dart/http"];
|
|
7
|
-
export type AvailableClients = typeof AVAILABLE_CLIENTS;
|
|
8
|
-
/** Programming language */
|
|
9
|
-
export type TargetId = AvailableClients[number] extends `${infer T}/${string}` ? T : never;
|
|
10
|
-
/** Configuration for a target */
|
|
11
|
-
export type Target = {
|
|
12
|
-
[K in TargetId]: {
|
|
13
|
-
key: K;
|
|
14
|
-
title: string;
|
|
15
|
-
default: ClientId<K>;
|
|
16
|
-
clients: Plugin[];
|
|
17
|
-
};
|
|
18
|
-
}[TargetId];
|
|
19
|
-
/** HTTP client */
|
|
20
|
-
export type ClientId<T extends string> = T extends TargetId ? Extract<AvailableClients[number], `${T}/${string}`> extends `${T}/${infer C}` ? C : never : never;
|
|
21
|
-
/** What any plugins needs to return */
|
|
22
|
-
export type Plugin = {
|
|
23
|
-
/** The language or environment. */
|
|
24
|
-
target: TargetId;
|
|
25
|
-
/** The identifier of the client. */
|
|
26
|
-
client: ClientId<TargetId>;
|
|
27
|
-
/** The title of the client. */
|
|
28
|
-
title: string;
|
|
29
|
-
/** The actual source code. */
|
|
30
|
-
generate: (request?: Partial<HarRequest>, configuration?: PluginConfiguration) => string;
|
|
31
|
-
};
|
|
32
|
-
/**
|
|
33
|
-
* Optional configuration for any plugin
|
|
34
|
-
*/
|
|
35
|
-
export type PluginConfiguration = {
|
|
36
|
-
/** Credentials to add HTTP Basic Authentication */
|
|
37
|
-
auth?: {
|
|
38
|
-
username: string;
|
|
39
|
-
password: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvD,YAAY,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,YAAY,CAAA;AAEvD;;GAEG;AACH,eAAO,MAAM,iBAAiB,wjBAoCpB,CAAA;AAEV,MAAM,MAAM,gBAAgB,GAAG,OAAO,iBAAiB,CAAA;AAEvD,2BAA2B;AAC3B,MAAM,MAAM,QAAQ,GAAG,gBAAgB,CAAC,MAAM,CAAC,SAAS,GAAG,MAAM,CAAC,IAAI,MAAM,EAAE,GAAG,CAAC,GAAG,KAAK,CAAA;AAE1F,iCAAiC;AACjC,MAAM,MAAM,MAAM,GAAG;KAClB,CAAC,IAAI,QAAQ,GAAG;QACf,GAAG,EAAE,CAAC,CAAA;QACN,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAA;QACpB,OAAO,EAAE,MAAM,EAAE,CAAA;KAClB;CACF,CAAC,QAAQ,CAAC,CAAA;AAEX,kBAAkB;AAClB,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,QAAQ,GACvD,OAAO,CAAC,gBAAgB,CAAC,MAAM,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,EAAE,CAAC,SAAS,GAAG,CAAC,IAAI,MAAM,CAAC,EAAE,GAC3E,CAAC,GACD,KAAK,GACP,KAAK,CAAA;AAET,uCAAuC;AACvC,MAAM,MAAM,MAAM,GAAG;IACnB,mCAAmC;IACnC,MAAM,EAAE,QAAQ,CAAA;IAChB,oCAAoC;IACpC,MAAM,EAAE,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC1B,+BAA+B;IAC/B,KAAK,EAAE,MAAM,CAAA;IACb,8BAA8B;IAC9B,QAAQ,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,EAAE,aAAa,CAAC,EAAE,mBAAmB,KAAK,MAAM,CAAA;CACzF,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,mDAAmD;IACnD,IAAI,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9C,CAAA"}
|
package/dist/types/index.js
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* List of available clients
|
|
3
|
-
*/
|
|
4
|
-
const AVAILABLE_CLIENTS = [
|
|
5
|
-
'c/libcurl',
|
|
6
|
-
'clojure/clj_http',
|
|
7
|
-
'csharp/httpclient',
|
|
8
|
-
'csharp/restsharp',
|
|
9
|
-
'go/native',
|
|
10
|
-
'http/http1.1',
|
|
11
|
-
'java/asynchttp',
|
|
12
|
-
'java/nethttp',
|
|
13
|
-
'java/okhttp',
|
|
14
|
-
'java/unirest',
|
|
15
|
-
'js/axios',
|
|
16
|
-
'js/fetch',
|
|
17
|
-
'js/jquery',
|
|
18
|
-
'js/ofetch',
|
|
19
|
-
'js/xhr',
|
|
20
|
-
'kotlin/okhttp',
|
|
21
|
-
'node/axios',
|
|
22
|
-
'node/fetch',
|
|
23
|
-
'node/ofetch',
|
|
24
|
-
'node/undici',
|
|
25
|
-
'objc/nsurlsession',
|
|
26
|
-
'ocaml/cohttp',
|
|
27
|
-
'php/curl',
|
|
28
|
-
'php/guzzle',
|
|
29
|
-
'powershell/restmethod',
|
|
30
|
-
'powershell/webrequest',
|
|
31
|
-
'python/python3',
|
|
32
|
-
'python/requests',
|
|
33
|
-
'r/httr',
|
|
34
|
-
'ruby/native',
|
|
35
|
-
'shell/curl',
|
|
36
|
-
'shell/httpie',
|
|
37
|
-
'shell/wget',
|
|
38
|
-
'swift/nsurlsession',
|
|
39
|
-
'dart/http',
|
|
40
|
-
];
|
|
41
|
-
|
|
42
|
-
export { AVAILABLE_CLIENTS };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.test-d.d.ts","sourceRoot":"","sources":["../../src/types/index.test-d.ts"],"names":[],"mappings":""}
|