@scalar/snippetz 0.2.6 → 0.2.7
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/core/types.d.ts +29 -1
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utils/convertWithHttpSnippetLite.d.ts +7 -0
- package/dist/core/utils/convertWithHttpSnippetLite.d.ts.map +1 -0
- package/dist/core/utils/convertWithHttpSnippetLite.js +83 -0
- package/dist/plugins/c/libcurl/index.d.ts +2 -0
- package/dist/plugins/c/libcurl/index.d.ts.map +1 -0
- package/dist/plugins/c/libcurl/index.js +1 -0
- package/dist/plugins/c/libcurl/libcurl.d.ts +6 -0
- package/dist/plugins/c/libcurl/libcurl.d.ts.map +1 -0
- package/dist/plugins/c/libcurl/libcurl.js +16 -0
- package/dist/plugins/clojure/clj_http/clj_http.d.ts +6 -0
- package/dist/plugins/clojure/clj_http/clj_http.d.ts.map +1 -0
- package/dist/plugins/clojure/clj_http/clj_http.js +16 -0
- package/dist/plugins/clojure/clj_http/index.d.ts +2 -0
- package/dist/plugins/clojure/clj_http/index.d.ts.map +1 -0
- package/dist/plugins/clojure/clj_http/index.js +1 -0
- package/dist/plugins/csharp/httpclient/httpclient.d.ts +6 -0
- package/dist/plugins/csharp/httpclient/httpclient.d.ts.map +1 -0
- package/dist/plugins/csharp/httpclient/httpclient.js +16 -0
- package/dist/plugins/csharp/httpclient/index.d.ts +2 -0
- package/dist/plugins/csharp/httpclient/index.d.ts.map +1 -0
- package/dist/plugins/csharp/httpclient/index.js +1 -0
- package/dist/plugins/csharp/restsharp/index.d.ts +2 -0
- package/dist/plugins/csharp/restsharp/index.d.ts.map +1 -0
- package/dist/plugins/csharp/restsharp/index.js +1 -0
- package/dist/plugins/csharp/restsharp/restsharp.d.ts +6 -0
- package/dist/plugins/csharp/restsharp/restsharp.d.ts.map +1 -0
- package/dist/plugins/csharp/restsharp/restsharp.js +16 -0
- package/dist/plugins/go/native/index.d.ts +2 -0
- package/dist/plugins/go/native/index.d.ts.map +1 -0
- package/dist/plugins/go/native/index.js +1 -0
- package/dist/plugins/go/native/native.d.ts +6 -0
- package/dist/plugins/go/native/native.d.ts.map +1 -0
- package/dist/plugins/go/native/native.js +16 -0
- package/dist/plugins/http/http11/http11.d.ts +6 -0
- package/dist/plugins/http/http11/http11.d.ts.map +1 -0
- package/dist/plugins/http/http11/http11.js +16 -0
- package/dist/plugins/http/http11/index.d.ts +2 -0
- package/dist/plugins/http/http11/index.d.ts.map +1 -0
- package/dist/plugins/http/http11/index.js +1 -0
- package/dist/plugins/java/asynchttp/asynchttp.d.ts +6 -0
- package/dist/plugins/java/asynchttp/asynchttp.d.ts.map +1 -0
- package/dist/plugins/java/asynchttp/asynchttp.js +16 -0
- package/dist/plugins/java/asynchttp/index.d.ts +2 -0
- package/dist/plugins/java/asynchttp/index.d.ts.map +1 -0
- package/dist/plugins/java/asynchttp/index.js +1 -0
- package/dist/plugins/java/nethttp/index.d.ts +2 -0
- package/dist/plugins/java/nethttp/index.d.ts.map +1 -0
- package/dist/plugins/java/nethttp/index.js +1 -0
- package/dist/plugins/java/nethttp/nethttp.d.ts +6 -0
- package/dist/plugins/java/nethttp/nethttp.d.ts.map +1 -0
- package/dist/plugins/java/nethttp/nethttp.js +16 -0
- package/dist/plugins/java/okhttp/index.d.ts +2 -0
- package/dist/plugins/java/okhttp/index.d.ts.map +1 -0
- package/dist/plugins/java/okhttp/index.js +1 -0
- package/dist/plugins/java/okhttp/okhttp.d.ts +6 -0
- package/dist/plugins/java/okhttp/okhttp.d.ts.map +1 -0
- package/dist/plugins/java/okhttp/okhttp.js +16 -0
- package/dist/plugins/java/unirest/index.d.ts +2 -0
- package/dist/plugins/java/unirest/index.d.ts.map +1 -0
- package/dist/plugins/java/unirest/index.js +1 -0
- package/dist/plugins/java/unirest/unirest.d.ts +6 -0
- package/dist/plugins/java/unirest/unirest.d.ts.map +1 -0
- package/dist/plugins/java/unirest/unirest.js +16 -0
- package/dist/plugins/js/axios/axios.d.ts +6 -0
- package/dist/plugins/js/axios/axios.d.ts.map +1 -0
- package/dist/plugins/js/axios/axios.js +16 -0
- package/dist/plugins/js/axios/index.d.ts +2 -0
- package/dist/plugins/js/axios/index.d.ts.map +1 -0
- package/dist/plugins/js/axios/index.js +1 -0
- package/dist/plugins/js/jquery/index.d.ts +2 -0
- package/dist/plugins/js/jquery/index.d.ts.map +1 -0
- package/dist/plugins/js/jquery/index.js +1 -0
- package/dist/plugins/js/jquery/jquery.d.ts +6 -0
- package/dist/plugins/js/jquery/jquery.d.ts.map +1 -0
- package/dist/plugins/js/jquery/jquery.js +16 -0
- package/dist/plugins/js/xhr/index.d.ts +2 -0
- package/dist/plugins/js/xhr/index.d.ts.map +1 -0
- package/dist/plugins/js/xhr/index.js +1 -0
- package/dist/plugins/js/xhr/xhr.d.ts +6 -0
- package/dist/plugins/js/xhr/xhr.d.ts.map +1 -0
- package/dist/plugins/js/xhr/xhr.js +16 -0
- package/dist/plugins/kotlin/okhttp/index.d.ts +2 -0
- package/dist/plugins/kotlin/okhttp/index.d.ts.map +1 -0
- package/dist/plugins/kotlin/okhttp/index.js +1 -0
- package/dist/plugins/kotlin/okhttp/okhttp.d.ts +6 -0
- package/dist/plugins/kotlin/okhttp/okhttp.d.ts.map +1 -0
- package/dist/plugins/kotlin/okhttp/okhttp.js +16 -0
- package/dist/plugins/node/axios/axios.d.ts +6 -0
- package/dist/plugins/node/axios/axios.d.ts.map +1 -0
- package/dist/plugins/node/axios/axios.js +16 -0
- package/dist/plugins/node/axios/index.d.ts +2 -0
- package/dist/plugins/node/axios/index.d.ts.map +1 -0
- package/dist/plugins/node/axios/index.js +1 -0
- package/dist/plugins/objc/nsurlsession/index.d.ts +2 -0
- package/dist/plugins/objc/nsurlsession/index.d.ts.map +1 -0
- package/dist/plugins/objc/nsurlsession/index.js +1 -0
- package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts +6 -0
- package/dist/plugins/objc/nsurlsession/nsurlsession.d.ts.map +1 -0
- package/dist/plugins/objc/nsurlsession/nsurlsession.js +16 -0
- package/dist/plugins/ocaml/cohttp/cohttp.d.ts +6 -0
- package/dist/plugins/ocaml/cohttp/cohttp.d.ts.map +1 -0
- package/dist/plugins/ocaml/cohttp/cohttp.js +16 -0
- package/dist/plugins/ocaml/cohttp/index.d.ts +2 -0
- package/dist/plugins/ocaml/cohttp/index.d.ts.map +1 -0
- package/dist/plugins/ocaml/cohttp/index.js +1 -0
- package/dist/plugins/php/curl/curl.d.ts +6 -0
- package/dist/plugins/php/curl/curl.d.ts.map +1 -0
- package/dist/plugins/php/curl/curl.js +16 -0
- package/dist/plugins/php/curl/index.d.ts +2 -0
- package/dist/plugins/php/curl/index.d.ts.map +1 -0
- package/dist/plugins/php/curl/index.js +1 -0
- package/dist/plugins/php/guzzle/guzzle.d.ts +6 -0
- package/dist/plugins/php/guzzle/guzzle.d.ts.map +1 -0
- package/dist/plugins/php/guzzle/guzzle.js +16 -0
- package/dist/plugins/php/guzzle/index.d.ts +2 -0
- package/dist/plugins/php/guzzle/index.d.ts.map +1 -0
- package/dist/plugins/php/guzzle/index.js +1 -0
- package/dist/plugins/powershell/restmethod/index.d.ts +2 -0
- package/dist/plugins/powershell/restmethod/index.d.ts.map +1 -0
- package/dist/plugins/powershell/restmethod/index.js +1 -0
- package/dist/plugins/powershell/restmethod/restmethod.d.ts +6 -0
- package/dist/plugins/powershell/restmethod/restmethod.d.ts.map +1 -0
- package/dist/plugins/powershell/restmethod/restmethod.js +16 -0
- package/dist/plugins/powershell/webrequest/index.d.ts +2 -0
- package/dist/plugins/powershell/webrequest/index.d.ts.map +1 -0
- package/dist/plugins/powershell/webrequest/index.js +1 -0
- package/dist/plugins/powershell/webrequest/webrequest.d.ts +6 -0
- package/dist/plugins/powershell/webrequest/webrequest.d.ts.map +1 -0
- package/dist/plugins/powershell/webrequest/webrequest.js +16 -0
- package/dist/plugins/python/python3/index.d.ts +2 -0
- package/dist/plugins/python/python3/index.d.ts.map +1 -0
- package/dist/plugins/python/python3/index.js +1 -0
- package/dist/plugins/python/python3/python3.d.ts +6 -0
- package/dist/plugins/python/python3/python3.d.ts.map +1 -0
- package/dist/plugins/python/python3/python3.js +16 -0
- package/dist/plugins/python/requests/index.d.ts +2 -0
- package/dist/plugins/python/requests/index.d.ts.map +1 -0
- package/dist/plugins/python/requests/index.js +1 -0
- package/dist/plugins/python/requests/requests.d.ts +6 -0
- package/dist/plugins/python/requests/requests.d.ts.map +1 -0
- package/dist/plugins/python/requests/requests.js +16 -0
- package/dist/plugins/r/httr/httr.d.ts +6 -0
- package/dist/plugins/r/httr/httr.d.ts.map +1 -0
- package/dist/plugins/r/httr/httr.js +16 -0
- package/dist/plugins/r/httr/index.d.ts +2 -0
- package/dist/plugins/r/httr/index.d.ts.map +1 -0
- package/dist/plugins/r/httr/index.js +1 -0
- package/dist/plugins/ruby/native/index.d.ts +2 -0
- package/dist/plugins/ruby/native/index.d.ts.map +1 -0
- package/dist/plugins/ruby/native/index.js +1 -0
- package/dist/plugins/ruby/native/native.d.ts +6 -0
- package/dist/plugins/ruby/native/native.d.ts.map +1 -0
- package/dist/plugins/ruby/native/native.js +16 -0
- package/dist/plugins/shell/httpie/httpie.d.ts +6 -0
- package/dist/plugins/shell/httpie/httpie.d.ts.map +1 -0
- package/dist/plugins/shell/httpie/httpie.js +16 -0
- package/dist/plugins/shell/httpie/index.d.ts +2 -0
- package/dist/plugins/shell/httpie/index.d.ts.map +1 -0
- package/dist/plugins/shell/httpie/index.js +1 -0
- package/dist/plugins/shell/wget/index.d.ts +2 -0
- package/dist/plugins/shell/wget/index.d.ts.map +1 -0
- package/dist/plugins/shell/wget/index.js +1 -0
- package/dist/plugins/shell/wget/wget.d.ts +6 -0
- package/dist/plugins/shell/wget/wget.d.ts.map +1 -0
- package/dist/plugins/shell/wget/wget.js +16 -0
- package/dist/plugins/swift/nsurlsession/index.d.ts +2 -0
- package/dist/plugins/swift/nsurlsession/index.d.ts.map +1 -0
- package/dist/plugins/swift/nsurlsession/index.js +1 -0
- package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts +6 -0
- package/dist/plugins/swift/nsurlsession/nsurlsession.d.ts.map +1 -0
- package/dist/plugins/swift/nsurlsession/nsurlsession.js +16 -0
- package/dist/snippetz.d.ts +4 -4
- package/dist/snippetz.d.ts.map +1 -1
- package/dist/snippetz.js +60 -4
- package/package.json +146 -1
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { convertWithHttpSnippetLite } from '../../../core/utils/convertWithHttpSnippetLite.js';
|
|
2
|
+
import { wget } from '../../../../node_modules/httpsnippet-lite/dist/esm/targets/shell/wget/client.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* shell/wget
|
|
6
|
+
*/
|
|
7
|
+
const shellWget = {
|
|
8
|
+
target: 'shell',
|
|
9
|
+
client: 'wget',
|
|
10
|
+
generate(request) {
|
|
11
|
+
// TODO: Write an own converter
|
|
12
|
+
return convertWithHttpSnippetLite(wget, request);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { shellWget };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { swiftNsurlsession } from './nsurlsession.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nsurlsession.d.ts","sourceRoot":"","sources":["../../../../src/plugins/swift/nsurlsession/nsurlsession.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAKpC;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,MAO/B,CAAA"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { convertWithHttpSnippetLite } from '../../../core/utils/convertWithHttpSnippetLite.js';
|
|
2
|
+
import { nsurlsession } from '../../../../node_modules/httpsnippet-lite/dist/esm/targets/swift/nsurlsession/client.mjs';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* swift/nsurlsession
|
|
6
|
+
*/
|
|
7
|
+
const swiftNsurlsession = {
|
|
8
|
+
target: 'swift',
|
|
9
|
+
client: 'nsurlsession',
|
|
10
|
+
generate(request) {
|
|
11
|
+
// TODO: Write an own converter
|
|
12
|
+
return convertWithHttpSnippetLite(nsurlsession, request);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export { swiftNsurlsession };
|
package/dist/snippetz.d.ts
CHANGED
|
@@ -5,11 +5,11 @@ import type { ClientId, Plugin, Request, TargetId } from './core/index.js';
|
|
|
5
5
|
export declare function snippetz(): {
|
|
6
6
|
get(target: TargetId, client: ClientId<TargetId>): Plugin | undefined;
|
|
7
7
|
print<T extends TargetId>(target: T, client: ClientId<T>, request: Partial<Request>): string | undefined;
|
|
8
|
-
targets(): ("js" | "node" | "shell")[];
|
|
9
|
-
clients(): ("fetch" | "ofetch" | "undici" | "curl")[];
|
|
8
|
+
targets(): ("c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift")[];
|
|
9
|
+
clients(): ("libcurl" | "clj_http" | "httpclient" | "restsharp" | "native" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "fetch" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "httr" | "httpie" | "wget")[];
|
|
10
10
|
plugins(): {
|
|
11
|
-
target: "js" | "node" | "shell";
|
|
12
|
-
client: "fetch" | "ofetch" | "undici" | "curl";
|
|
11
|
+
target: "c" | "clojure" | "csharp" | "go" | "http" | "java" | "js" | "kotlin" | "node" | "objc" | "ocaml" | "php" | "powershell" | "python" | "r" | "ruby" | "shell" | "swift";
|
|
12
|
+
client: "libcurl" | "clj_http" | "httpclient" | "restsharp" | "native" | "http1.1" | "asynchttp" | "nethttp" | "okhttp" | "unirest" | "axios" | "fetch" | "jquery" | "ofetch" | "xhr" | "undici" | "nsurlsession" | "cohttp" | "curl" | "guzzle" | "restmethod" | "webrequest" | "python3" | "requests" | "httr" | "httpie" | "wget";
|
|
13
13
|
}[];
|
|
14
14
|
findPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string): Plugin | undefined;
|
|
15
15
|
hasPlugin<T extends TargetId>(target: T | string, client: ClientId<T> | string): boolean;
|
package/dist/snippetz.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"snippetz.d.ts","sourceRoot":"","sources":["../src/snippetz.ts"],"names":[],"mappings":"AAmCA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAA;AAEjE;;GAEG;AACH,wBAAgB,QAAQ;gBAuCR,QAAQ,UAAU,QAAQ,CAAC,QAAQ,CAAC;UAG1C,CAAC,SAAS,QAAQ,UACd,CAAC,UACD,QAAQ,CAAC,CAAC,CAAC,WACV,OAAO,CAAC,OAAO,CAAC;;;;;;;eAwBhB,CAAC,SAAS,QAAQ,UACnB,CAAC,GAAG,MAAM,UACV,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;cAMpB,CAAC,SAAS,QAAQ,UAClB,CAAC,GAAG,MAAM,UACV,QAAQ,CAAC,CAAC,CAAC,GAAG,MAAM;EAKjC"}
|
package/dist/snippetz.js
CHANGED
|
@@ -1,21 +1,77 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { cLibcurl } from './plugins/c/libcurl/libcurl.js';
|
|
2
|
+
import { javaNethttp } from './plugins/java/nethttp/nethttp.js';
|
|
3
|
+
import { javaOkhttp } from './plugins/java/okhttp/okhttp.js';
|
|
4
|
+
import { javaUnirest } from './plugins/java/unirest/unirest.js';
|
|
5
|
+
import { clojureCljhttp } from './plugins/clojure/clj_http/clj_http.js';
|
|
6
|
+
import { csharpHttpclient } from './plugins/csharp/httpclient/httpclient.js';
|
|
7
|
+
import { csharpRestsharp } from './plugins/csharp/restsharp/restsharp.js';
|
|
8
|
+
import { goNative } from './plugins/go/native/native.js';
|
|
9
|
+
import { httpHttp11 } from './plugins/http/http11/http11.js';
|
|
10
|
+
import { javaAsynchttp } from './plugins/java/asynchttp/asynchttp.js';
|
|
11
|
+
import { jsAxios } from './plugins/js/axios/axios.js';
|
|
3
12
|
import { jsFetch } from './plugins/js/fetch/fetch.js';
|
|
13
|
+
import { jsJquery } from './plugins/js/jquery/jquery.js';
|
|
4
14
|
import { jsOfetch } from './plugins/js/ofetch/ofetch.js';
|
|
15
|
+
import { jsXhr } from './plugins/js/xhr/xhr.js';
|
|
16
|
+
import { kotlinOkhttp } from './plugins/kotlin/okhttp/okhttp.js';
|
|
17
|
+
import { nodeAxios } from './plugins/node/axios/axios.js';
|
|
18
|
+
import { nodeFetch } from './plugins/node/fetch/fetch.js';
|
|
5
19
|
import { nodeOfetch } from './plugins/node/ofetch/ofetch.js';
|
|
20
|
+
import { nodeUndici } from './plugins/node/undici/undici.js';
|
|
21
|
+
import { objcNsurlsession } from './plugins/objc/nsurlsession/nsurlsession.js';
|
|
22
|
+
import { ocamlCohttp } from './plugins/ocaml/cohttp/cohttp.js';
|
|
23
|
+
import { phpCurl } from './plugins/php/curl/curl.js';
|
|
24
|
+
import { phpGuzzle } from './plugins/php/guzzle/guzzle.js';
|
|
25
|
+
import { powershellRestmethod } from './plugins/powershell/restmethod/restmethod.js';
|
|
26
|
+
import { powershellWebrequest } from './plugins/powershell/webrequest/webrequest.js';
|
|
27
|
+
import { pythonPython3 } from './plugins/python/python3/python3.js';
|
|
28
|
+
import { pythonRequests } from './plugins/python/requests/requests.js';
|
|
29
|
+
import { rHttr } from './plugins/r/httr/httr.js';
|
|
30
|
+
import { rubyNative } from './plugins/ruby/native/native.js';
|
|
6
31
|
import { shellCurl } from './plugins/shell/curl/curl.js';
|
|
32
|
+
import { shellHttpie } from './plugins/shell/httpie/httpie.js';
|
|
33
|
+
import { shellWget } from './plugins/shell/wget/wget.js';
|
|
34
|
+
import { swiftNsurlsession } from './plugins/swift/nsurlsession/nsurlsession.js';
|
|
7
35
|
|
|
8
36
|
/**
|
|
9
37
|
* Generate code examples for HAR requests
|
|
10
38
|
*/
|
|
11
39
|
function snippetz() {
|
|
12
40
|
const plugins = [
|
|
13
|
-
|
|
14
|
-
|
|
41
|
+
cLibcurl,
|
|
42
|
+
clojureCljhttp,
|
|
43
|
+
csharpHttpclient,
|
|
44
|
+
csharpRestsharp,
|
|
45
|
+
goNative,
|
|
46
|
+
httpHttp11,
|
|
47
|
+
javaAsynchttp,
|
|
48
|
+
javaNethttp,
|
|
49
|
+
javaOkhttp,
|
|
50
|
+
javaUnirest,
|
|
51
|
+
jsAxios,
|
|
15
52
|
jsFetch,
|
|
53
|
+
jsJquery,
|
|
16
54
|
jsOfetch,
|
|
55
|
+
jsXhr,
|
|
56
|
+
kotlinOkhttp,
|
|
57
|
+
nodeAxios,
|
|
58
|
+
nodeFetch,
|
|
17
59
|
nodeOfetch,
|
|
60
|
+
nodeUndici,
|
|
61
|
+
objcNsurlsession,
|
|
62
|
+
ocamlCohttp,
|
|
63
|
+
phpCurl,
|
|
64
|
+
phpGuzzle,
|
|
65
|
+
powershellRestmethod,
|
|
66
|
+
powershellWebrequest,
|
|
67
|
+
pythonPython3,
|
|
68
|
+
pythonRequests,
|
|
69
|
+
rHttr,
|
|
70
|
+
rubyNative,
|
|
18
71
|
shellCurl,
|
|
72
|
+
shellHttpie,
|
|
73
|
+
shellWget,
|
|
74
|
+
swiftNsurlsession,
|
|
19
75
|
];
|
|
20
76
|
return {
|
|
21
77
|
get(target, client) {
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"url": "https://github.com/scalar/scalar.git",
|
|
10
10
|
"directory": "packages/snippetz"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.2.
|
|
12
|
+
"version": "0.2.7",
|
|
13
13
|
"engines": {
|
|
14
14
|
"node": ">=18"
|
|
15
15
|
},
|
|
@@ -21,11 +21,76 @@
|
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"default": "./dist/index.js"
|
|
23
23
|
},
|
|
24
|
+
"./plugins/swift/nsurlsession": {
|
|
25
|
+
"import": "./dist/plugins/swift/nsurlsession/index.js",
|
|
26
|
+
"types": "./dist/plugins/swift/nsurlsession/index.d.ts",
|
|
27
|
+
"default": "./dist/plugins/swift/nsurlsession/index.js"
|
|
28
|
+
},
|
|
29
|
+
"./plugins/shell/wget": {
|
|
30
|
+
"import": "./dist/plugins/shell/wget/index.js",
|
|
31
|
+
"types": "./dist/plugins/shell/wget/index.d.ts",
|
|
32
|
+
"default": "./dist/plugins/shell/wget/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./plugins/shell/httpie": {
|
|
35
|
+
"import": "./dist/plugins/shell/httpie/index.js",
|
|
36
|
+
"types": "./dist/plugins/shell/httpie/index.d.ts",
|
|
37
|
+
"default": "./dist/plugins/shell/httpie/index.js"
|
|
38
|
+
},
|
|
24
39
|
"./plugins/shell/curl": {
|
|
25
40
|
"import": "./dist/plugins/shell/curl/index.js",
|
|
26
41
|
"types": "./dist/plugins/shell/curl/index.d.ts",
|
|
27
42
|
"default": "./dist/plugins/shell/curl/index.js"
|
|
28
43
|
},
|
|
44
|
+
"./plugins/ruby/native": {
|
|
45
|
+
"import": "./dist/plugins/ruby/native/index.js",
|
|
46
|
+
"types": "./dist/plugins/ruby/native/index.d.ts",
|
|
47
|
+
"default": "./dist/plugins/ruby/native/index.js"
|
|
48
|
+
},
|
|
49
|
+
"./plugins/r/httr": {
|
|
50
|
+
"import": "./dist/plugins/r/httr/index.js",
|
|
51
|
+
"types": "./dist/plugins/r/httr/index.d.ts",
|
|
52
|
+
"default": "./dist/plugins/r/httr/index.js"
|
|
53
|
+
},
|
|
54
|
+
"./plugins/python/requests": {
|
|
55
|
+
"import": "./dist/plugins/python/requests/index.js",
|
|
56
|
+
"types": "./dist/plugins/python/requests/index.d.ts",
|
|
57
|
+
"default": "./dist/plugins/python/requests/index.js"
|
|
58
|
+
},
|
|
59
|
+
"./plugins/python/python3": {
|
|
60
|
+
"import": "./dist/plugins/python/python3/index.js",
|
|
61
|
+
"types": "./dist/plugins/python/python3/index.d.ts",
|
|
62
|
+
"default": "./dist/plugins/python/python3/index.js"
|
|
63
|
+
},
|
|
64
|
+
"./plugins/powershell/webrequest": {
|
|
65
|
+
"import": "./dist/plugins/powershell/webrequest/index.js",
|
|
66
|
+
"types": "./dist/plugins/powershell/webrequest/index.d.ts",
|
|
67
|
+
"default": "./dist/plugins/powershell/webrequest/index.js"
|
|
68
|
+
},
|
|
69
|
+
"./plugins/powershell/restmethod": {
|
|
70
|
+
"import": "./dist/plugins/powershell/restmethod/index.js",
|
|
71
|
+
"types": "./dist/plugins/powershell/restmethod/index.d.ts",
|
|
72
|
+
"default": "./dist/plugins/powershell/restmethod/index.js"
|
|
73
|
+
},
|
|
74
|
+
"./plugins/php/guzzle": {
|
|
75
|
+
"import": "./dist/plugins/php/guzzle/index.js",
|
|
76
|
+
"types": "./dist/plugins/php/guzzle/index.d.ts",
|
|
77
|
+
"default": "./dist/plugins/php/guzzle/index.js"
|
|
78
|
+
},
|
|
79
|
+
"./plugins/php/curl": {
|
|
80
|
+
"import": "./dist/plugins/php/curl/index.js",
|
|
81
|
+
"types": "./dist/plugins/php/curl/index.d.ts",
|
|
82
|
+
"default": "./dist/plugins/php/curl/index.js"
|
|
83
|
+
},
|
|
84
|
+
"./plugins/ocaml/cohttp": {
|
|
85
|
+
"import": "./dist/plugins/ocaml/cohttp/index.js",
|
|
86
|
+
"types": "./dist/plugins/ocaml/cohttp/index.d.ts",
|
|
87
|
+
"default": "./dist/plugins/ocaml/cohttp/index.js"
|
|
88
|
+
},
|
|
89
|
+
"./plugins/objc/nsurlsession": {
|
|
90
|
+
"import": "./dist/plugins/objc/nsurlsession/index.js",
|
|
91
|
+
"types": "./dist/plugins/objc/nsurlsession/index.d.ts",
|
|
92
|
+
"default": "./dist/plugins/objc/nsurlsession/index.js"
|
|
93
|
+
},
|
|
29
94
|
"./plugins/node/undici": {
|
|
30
95
|
"import": "./dist/plugins/node/undici/index.js",
|
|
31
96
|
"types": "./dist/plugins/node/undici/index.d.ts",
|
|
@@ -41,16 +106,91 @@
|
|
|
41
106
|
"types": "./dist/plugins/node/fetch/index.d.ts",
|
|
42
107
|
"default": "./dist/plugins/node/fetch/index.js"
|
|
43
108
|
},
|
|
109
|
+
"./plugins/node/axios": {
|
|
110
|
+
"import": "./dist/plugins/node/axios/index.js",
|
|
111
|
+
"types": "./dist/plugins/node/axios/index.d.ts",
|
|
112
|
+
"default": "./dist/plugins/node/axios/index.js"
|
|
113
|
+
},
|
|
114
|
+
"./plugins/kotlin/okhttp": {
|
|
115
|
+
"import": "./dist/plugins/kotlin/okhttp/index.js",
|
|
116
|
+
"types": "./dist/plugins/kotlin/okhttp/index.d.ts",
|
|
117
|
+
"default": "./dist/plugins/kotlin/okhttp/index.js"
|
|
118
|
+
},
|
|
119
|
+
"./plugins/js/xhr": {
|
|
120
|
+
"import": "./dist/plugins/js/xhr/index.js",
|
|
121
|
+
"types": "./dist/plugins/js/xhr/index.d.ts",
|
|
122
|
+
"default": "./dist/plugins/js/xhr/index.js"
|
|
123
|
+
},
|
|
44
124
|
"./plugins/js/ofetch": {
|
|
45
125
|
"import": "./dist/plugins/js/ofetch/index.js",
|
|
46
126
|
"types": "./dist/plugins/js/ofetch/index.d.ts",
|
|
47
127
|
"default": "./dist/plugins/js/ofetch/index.js"
|
|
48
128
|
},
|
|
129
|
+
"./plugins/js/jquery": {
|
|
130
|
+
"import": "./dist/plugins/js/jquery/index.js",
|
|
131
|
+
"types": "./dist/plugins/js/jquery/index.d.ts",
|
|
132
|
+
"default": "./dist/plugins/js/jquery/index.js"
|
|
133
|
+
},
|
|
49
134
|
"./plugins/js/fetch": {
|
|
50
135
|
"import": "./dist/plugins/js/fetch/index.js",
|
|
51
136
|
"types": "./dist/plugins/js/fetch/index.d.ts",
|
|
52
137
|
"default": "./dist/plugins/js/fetch/index.js"
|
|
53
138
|
},
|
|
139
|
+
"./plugins/js/axios": {
|
|
140
|
+
"import": "./dist/plugins/js/axios/index.js",
|
|
141
|
+
"types": "./dist/plugins/js/axios/index.d.ts",
|
|
142
|
+
"default": "./dist/plugins/js/axios/index.js"
|
|
143
|
+
},
|
|
144
|
+
"./plugins/java/unirest": {
|
|
145
|
+
"import": "./dist/plugins/java/unirest/index.js",
|
|
146
|
+
"types": "./dist/plugins/java/unirest/index.d.ts",
|
|
147
|
+
"default": "./dist/plugins/java/unirest/index.js"
|
|
148
|
+
},
|
|
149
|
+
"./plugins/java/okhttp": {
|
|
150
|
+
"import": "./dist/plugins/java/okhttp/index.js",
|
|
151
|
+
"types": "./dist/plugins/java/okhttp/index.d.ts",
|
|
152
|
+
"default": "./dist/plugins/java/okhttp/index.js"
|
|
153
|
+
},
|
|
154
|
+
"./plugins/java/nethttp": {
|
|
155
|
+
"import": "./dist/plugins/java/nethttp/index.js",
|
|
156
|
+
"types": "./dist/plugins/java/nethttp/index.d.ts",
|
|
157
|
+
"default": "./dist/plugins/java/nethttp/index.js"
|
|
158
|
+
},
|
|
159
|
+
"./plugins/java/asynchttp": {
|
|
160
|
+
"import": "./dist/plugins/java/asynchttp/index.js",
|
|
161
|
+
"types": "./dist/plugins/java/asynchttp/index.d.ts",
|
|
162
|
+
"default": "./dist/plugins/java/asynchttp/index.js"
|
|
163
|
+
},
|
|
164
|
+
"./plugins/http/http11": {
|
|
165
|
+
"import": "./dist/plugins/http/http11/index.js",
|
|
166
|
+
"types": "./dist/plugins/http/http11/index.d.ts",
|
|
167
|
+
"default": "./dist/plugins/http/http11/index.js"
|
|
168
|
+
},
|
|
169
|
+
"./plugins/go/native": {
|
|
170
|
+
"import": "./dist/plugins/go/native/index.js",
|
|
171
|
+
"types": "./dist/plugins/go/native/index.d.ts",
|
|
172
|
+
"default": "./dist/plugins/go/native/index.js"
|
|
173
|
+
},
|
|
174
|
+
"./plugins/csharp/restsharp": {
|
|
175
|
+
"import": "./dist/plugins/csharp/restsharp/index.js",
|
|
176
|
+
"types": "./dist/plugins/csharp/restsharp/index.d.ts",
|
|
177
|
+
"default": "./dist/plugins/csharp/restsharp/index.js"
|
|
178
|
+
},
|
|
179
|
+
"./plugins/csharp/httpclient": {
|
|
180
|
+
"import": "./dist/plugins/csharp/httpclient/index.js",
|
|
181
|
+
"types": "./dist/plugins/csharp/httpclient/index.d.ts",
|
|
182
|
+
"default": "./dist/plugins/csharp/httpclient/index.js"
|
|
183
|
+
},
|
|
184
|
+
"./plugins/clojure/clj_http": {
|
|
185
|
+
"import": "./dist/plugins/clojure/clj_http/index.js",
|
|
186
|
+
"types": "./dist/plugins/clojure/clj_http/index.d.ts",
|
|
187
|
+
"default": "./dist/plugins/clojure/clj_http/index.js"
|
|
188
|
+
},
|
|
189
|
+
"./plugins/c/libcurl": {
|
|
190
|
+
"import": "./dist/plugins/c/libcurl/index.js",
|
|
191
|
+
"types": "./dist/plugins/c/libcurl/index.d.ts",
|
|
192
|
+
"default": "./dist/plugins/c/libcurl/index.js"
|
|
193
|
+
},
|
|
54
194
|
"./core": {
|
|
55
195
|
"import": "./dist/core/index.js",
|
|
56
196
|
"types": "./dist/core/index.d.ts",
|
|
@@ -62,8 +202,13 @@
|
|
|
62
202
|
"CHANGELOG"
|
|
63
203
|
],
|
|
64
204
|
"module": "./dist/index.js",
|
|
205
|
+
"dependencies": {
|
|
206
|
+
"httpsnippet-lite": "^3.0.5",
|
|
207
|
+
"stringify-object": "^5.0.0"
|
|
208
|
+
},
|
|
65
209
|
"devDependencies": {
|
|
66
210
|
"@types/har-format": "^1.2.15",
|
|
211
|
+
"vite": "^5.4.10",
|
|
67
212
|
"@scalar/build-tooling": "0.1.12"
|
|
68
213
|
},
|
|
69
214
|
"scripts": {
|