@scalar/snippetz 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/clients.d.ts.map +1 -1
- package/dist/clients.js +2 -1
- package/dist/clients.js.map +2 -2
- package/dist/plugins/python/httpx/async.d.ts +6 -0
- package/dist/plugins/python/httpx/async.d.ts.map +1 -0
- package/dist/plugins/python/httpx/async.js +16 -0
- package/dist/plugins/python/httpx/async.js.map +7 -0
- package/dist/plugins/python/httpx/index.d.ts +3 -0
- package/dist/plugins/python/httpx/index.d.ts.map +1 -0
- package/dist/plugins/python/httpx/index.js +3 -0
- package/dist/plugins/python/httpx/index.js.map +7 -0
- package/dist/plugins/python/httpx/sync.d.ts +6 -0
- package/dist/plugins/python/httpx/sync.d.ts.map +1 -0
- package/dist/plugins/python/httpx/sync.js +13 -0
- package/dist/plugins/python/httpx/sync.js.map +7 -0
- package/dist/plugins/python/requests/requests.d.ts.map +1 -1
- package/dist/plugins/python/requests/requests.js +2 -93
- package/dist/plugins/python/requests/requests.js.map +3 -3
- package/dist/plugins/python/requestsLike.d.ts +3 -0
- package/dist/plugins/python/requestsLike.d.ts.map +1 -0
- package/dist/plugins/python/requestsLike.js +120 -0
- package/dist/plugins/python/requestsLike.js.map +7 -0
- package/dist/snippetz.d.ts +1 -1
- package/package.json +8 -3
- package/dist/plugins/c/libcurl/libcurl.test.js +0 -208
- package/dist/plugins/c/libcurl/libcurl.test.js.map +0 -7
- package/dist/plugins/clojure/clj_http/clj_http.test.js +0 -151
- package/dist/plugins/clojure/clj_http/clj_http.test.js.map +0 -7
- package/dist/plugins/dart/http/http.test.js +0 -550
- package/dist/plugins/dart/http/http.test.js.map +0 -7
- package/dist/plugins/go/native/native.test.js +0 -366
- package/dist/plugins/go/native/native.test.js.map +0 -7
- package/dist/plugins/http/http11/http11.test.js +0 -175
- package/dist/plugins/http/http11/http11.test.js.map +0 -7
- package/dist/plugins/java/okhttp/okhttp.test.js +0 -164
- package/dist/plugins/java/okhttp/okhttp.test.js.map +0 -7
- package/dist/plugins/js/fetch/fetch.test.js +0 -214
- package/dist/plugins/js/fetch/fetch.test.js.map +0 -7
- package/dist/plugins/js/ofetch/ofetch.test.js +0 -126
- package/dist/plugins/js/ofetch/ofetch.test.js.map +0 -7
- package/dist/plugins/kotlin/okhttp/okhttp.test.js +0 -164
- package/dist/plugins/kotlin/okhttp/okhttp.test.js.map +0 -7
- package/dist/plugins/node/fetch/fetch.test.js +0 -200
- package/dist/plugins/node/fetch/fetch.test.js.map +0 -7
- package/dist/plugins/node/ofetch/ofetch.test.js +0 -126
- package/dist/plugins/node/ofetch/ofetch.test.js.map +0 -7
- package/dist/plugins/node/undici/undici.test.js +0 -133
- package/dist/plugins/node/undici/undici.test.js.map +0 -7
- package/dist/plugins/php/curl/curl.test.js +0 -564
- package/dist/plugins/php/curl/curl.test.js.map +0 -7
- package/dist/plugins/php/guzzle/guzzle.test.js +0 -546
- package/dist/plugins/php/guzzle/guzzle.test.js.map +0 -7
- package/dist/plugins/python/requests/requests.test.js +0 -419
- package/dist/plugins/python/requests/requests.test.js.map +0 -7
- package/dist/plugins/ruby/native/native.test.js +0 -240
- package/dist/plugins/ruby/native/native.test.js.map +0 -7
- package/dist/plugins/shell/curl/curl.test.js +0 -427
- package/dist/plugins/shell/curl/curl.test.js.map +0 -7
- package/dist/plugins/shell/httpie/httpie.test.js +0 -113
- package/dist/plugins/shell/httpie/httpie.test.js.map +0 -7
- package/dist/plugins/shell/wget/wget.test.js +0 -143
- package/dist/plugins/shell/wget/wget.test.js.map +0 -7
- package/dist/plugins/swift/nsurlsession/nsurlsession.test.js +0 -344
- package/dist/plugins/swift/nsurlsession/nsurlsession.test.js.map +0 -7
- package/dist/snippetz.test.js +0 -79
- package/dist/snippetz.test.js.map +0 -7
- package/dist/utils/convertWithHttpSnippetLite.test.js +0 -106
- package/dist/utils/convertWithHttpSnippetLite.test.js.map +0 -7
- package/dist/utils/create-search-params.test.js +0 -49
- package/dist/utils/create-search-params.test.js.map +0 -7
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/ruby/native/native.test.ts"],
|
|
4
|
-
"sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { rubyNative } from './native'\n\ndescribe('rubyNative', () => {\n it('returns a basic request', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('returns a POST request', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n method: 'post',\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('has headers', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n headers: [\n {\n name: 'Content-Type',\n value: 'application/json',\n },\n ],\n })\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"Content-Type\"] = 'application/json'\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('handles multipart form data with files', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'multipart/form-data',\n params: [\n {\n name: 'file',\n fileName: 'test.txt',\n },\n {\n name: 'field',\n value: 'value',\n },\n ],\n },\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it.skip('handles url-encoded form data with special characters', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'application/x-www-form-urlencoded',\n params: [\n {\n name: 'special chars!@#',\n value: 'value',\n },\n ],\n },\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"Content-Type\"] = \"application/x-www-form-urlencoded\"\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it.skip('handles binary data', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'application/octet-stream',\n text: 'binary content',\n },\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('handles special characters in URL', () => {\n const result = rubyNative.generate({\n url: 'https://example.com/path with spaces/[brackets]',\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com/path%20with%20spaces/[brackets]\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('handles multiple headers with same name', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n headers: [\n { name: 'X-Custom', value: 'value1' },\n { name: 'X-Custom', value: 'value2' },\n ],\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-Custom\"] = 'value2'\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('handles headers with empty values', () => {\n const result = rubyNative.generate({\n url: 'https://example.com',\n headers: [{ name: 'X-Empty', value: '' }],\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"X-Empty\"] = ''\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n\n it('handles query string parameters', () => {\n const result = rubyNative.generate({\n url: 'https://example.com/api?param1=value1¶m2=special value¶m3=123',\n })\n\n expect(result).toBe(\n `require 'uri'\nrequire 'net/http'\n\nurl = URI(\"https://example.com/api?param1=value1¶m2=special%20value¶m3=123\")\n\nhttp = Net::HTTP.new(url.host, url.port)\nhttp.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\n\nresponse = http.request(request)\nputs response.read_body`,\n )\n })\n})\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,kBAAkB;AAE3B,SAAS,cAAc,MAAM;AAC3B,KAAG,2BAA2B,MAAM;AAClC,UAAM,SAAS,WAAW,SAAS;AAAA,MACjC,KAAK;AAAA,IACP,CAAC;AAED,WAAO,MAAM,EAAE;AAAA,MACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAYF;AAAA,EACF,CAAC;AAED,KAAG,0BAA0B,MAAM;AACjC,UAAM,SAAS,WAAW,SAAS;AAAA,MACjC,KAAK;AAAA,MACL,QAAQ;AAAA,IACV,CAAC;AAED,WAAO,MAAM,EAAE;AAAA,MACb;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAY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;AAAA,IAYF;AAAA,EACF,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,427 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { shellCurl } from "./curl.js";
|
|
3
|
-
describe("shellCurl", () => {
|
|
4
|
-
it("returns a basic request", () => {
|
|
5
|
-
const result = shellCurl.generate({
|
|
6
|
-
url: "https://example.com"
|
|
7
|
-
});
|
|
8
|
-
expect(result).toBe("curl https://example.com");
|
|
9
|
-
});
|
|
10
|
-
it("returns a POST request", () => {
|
|
11
|
-
const result = shellCurl.generate({
|
|
12
|
-
url: "https://example.com",
|
|
13
|
-
method: "post"
|
|
14
|
-
});
|
|
15
|
-
expect(result).toBe(`curl https://example.com \\
|
|
16
|
-
--request POST`);
|
|
17
|
-
});
|
|
18
|
-
it("has headers", () => {
|
|
19
|
-
const result = shellCurl.generate({
|
|
20
|
-
url: "https://example.com",
|
|
21
|
-
headers: [
|
|
22
|
-
{
|
|
23
|
-
name: "Content-Type",
|
|
24
|
-
value: "application/json"
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
});
|
|
28
|
-
expect(result).toBe(`curl https://example.com \\
|
|
29
|
-
--header 'Content-Type: application/json'`);
|
|
30
|
-
});
|
|
31
|
-
it("doesn\u2019t add empty headers", () => {
|
|
32
|
-
const result = shellCurl.generate({
|
|
33
|
-
url: "https://example.com",
|
|
34
|
-
headers: []
|
|
35
|
-
});
|
|
36
|
-
expect(result).toBe("curl https://example.com");
|
|
37
|
-
});
|
|
38
|
-
it("has JSON body", () => {
|
|
39
|
-
const result = shellCurl.generate({
|
|
40
|
-
url: "https://example.com",
|
|
41
|
-
method: "POST",
|
|
42
|
-
headers: [
|
|
43
|
-
{
|
|
44
|
-
name: "Content-Type",
|
|
45
|
-
value: "application/json"
|
|
46
|
-
}
|
|
47
|
-
],
|
|
48
|
-
postData: {
|
|
49
|
-
mimeType: "application/json",
|
|
50
|
-
text: JSON.stringify({
|
|
51
|
-
hello: "world"
|
|
52
|
-
})
|
|
53
|
-
}
|
|
54
|
-
});
|
|
55
|
-
expect(result).toBe(`curl https://example.com \\
|
|
56
|
-
--request POST \\
|
|
57
|
-
--header 'Content-Type: application/json' \\
|
|
58
|
-
--data '{
|
|
59
|
-
"hello": "world"
|
|
60
|
-
}'`);
|
|
61
|
-
});
|
|
62
|
-
it("has query string", () => {
|
|
63
|
-
const result = shellCurl.generate({
|
|
64
|
-
url: "https://example.com",
|
|
65
|
-
queryString: [
|
|
66
|
-
{
|
|
67
|
-
name: "foo",
|
|
68
|
-
value: "bar"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
name: "bar",
|
|
72
|
-
value: "foo"
|
|
73
|
-
}
|
|
74
|
-
]
|
|
75
|
-
});
|
|
76
|
-
expect(result).toBe(`curl 'https://example.com?foo=bar&bar=foo'`);
|
|
77
|
-
});
|
|
78
|
-
it("has cookies", () => {
|
|
79
|
-
const result = shellCurl.generate({
|
|
80
|
-
url: "https://example.com",
|
|
81
|
-
cookies: [
|
|
82
|
-
{
|
|
83
|
-
name: "foo",
|
|
84
|
-
value: "bar"
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: "bar",
|
|
88
|
-
value: "foo"
|
|
89
|
-
}
|
|
90
|
-
]
|
|
91
|
-
});
|
|
92
|
-
expect(result).toBe(`curl https://example.com \\
|
|
93
|
-
--cookie 'foo=bar; bar=foo'`);
|
|
94
|
-
});
|
|
95
|
-
it("doesn\u2019t add empty cookies", () => {
|
|
96
|
-
const result = shellCurl.generate({
|
|
97
|
-
url: "https://example.com",
|
|
98
|
-
cookies: []
|
|
99
|
-
});
|
|
100
|
-
expect(result).toBe("curl https://example.com");
|
|
101
|
-
});
|
|
102
|
-
it("adds basic auth credentials", () => {
|
|
103
|
-
const result = shellCurl.generate(
|
|
104
|
-
{
|
|
105
|
-
url: "https://example.com"
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
auth: {
|
|
109
|
-
username: "user",
|
|
110
|
-
password: "pass"
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
);
|
|
114
|
-
expect(result).toBe(`curl https://example.com \\
|
|
115
|
-
--user 'user:pass'`);
|
|
116
|
-
});
|
|
117
|
-
it("omits auth when not provided", () => {
|
|
118
|
-
const result = shellCurl.generate({
|
|
119
|
-
url: "https://example.com"
|
|
120
|
-
});
|
|
121
|
-
expect(result).toBe("curl https://example.com");
|
|
122
|
-
});
|
|
123
|
-
it("omits auth when username is missing", () => {
|
|
124
|
-
const result = shellCurl.generate(
|
|
125
|
-
{
|
|
126
|
-
url: "https://example.com"
|
|
127
|
-
},
|
|
128
|
-
{
|
|
129
|
-
auth: {
|
|
130
|
-
username: "",
|
|
131
|
-
password: "pass"
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
);
|
|
135
|
-
expect(result).toBe("curl https://example.com");
|
|
136
|
-
});
|
|
137
|
-
it("omits auth when password is missing", () => {
|
|
138
|
-
const result = shellCurl.generate(
|
|
139
|
-
{
|
|
140
|
-
url: "https://example.com"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
auth: {
|
|
144
|
-
username: "user",
|
|
145
|
-
password: ""
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
);
|
|
149
|
-
expect(result).toBe("curl https://example.com");
|
|
150
|
-
});
|
|
151
|
-
it("handles special characters in auth credentials", () => {
|
|
152
|
-
const result = shellCurl.generate(
|
|
153
|
-
{
|
|
154
|
-
url: "https://example.com"
|
|
155
|
-
},
|
|
156
|
-
{
|
|
157
|
-
auth: {
|
|
158
|
-
username: "user@example.com",
|
|
159
|
-
password: "pass:word!"
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
);
|
|
163
|
-
expect(result).toBe(`curl https://example.com \\
|
|
164
|
-
--user 'user@example.com:pass:word!'`);
|
|
165
|
-
});
|
|
166
|
-
it("handles undefined auth object", () => {
|
|
167
|
-
const result = shellCurl.generate(
|
|
168
|
-
{
|
|
169
|
-
url: "https://example.com"
|
|
170
|
-
},
|
|
171
|
-
{
|
|
172
|
-
auth: void 0
|
|
173
|
-
}
|
|
174
|
-
);
|
|
175
|
-
expect(result).toBe("curl https://example.com");
|
|
176
|
-
});
|
|
177
|
-
it("handles multipart form data with files", () => {
|
|
178
|
-
const result = shellCurl.generate({
|
|
179
|
-
url: "https://example.com",
|
|
180
|
-
method: "POST",
|
|
181
|
-
postData: {
|
|
182
|
-
mimeType: "multipart/form-data",
|
|
183
|
-
params: [
|
|
184
|
-
{
|
|
185
|
-
name: "file",
|
|
186
|
-
fileName: "test.txt"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
name: "field",
|
|
190
|
-
value: "value"
|
|
191
|
-
}
|
|
192
|
-
]
|
|
193
|
-
}
|
|
194
|
-
});
|
|
195
|
-
expect(result).toBe(`curl https://example.com \\
|
|
196
|
-
--request POST \\
|
|
197
|
-
--form 'file=@test.txt' \\
|
|
198
|
-
--form 'field=value'`);
|
|
199
|
-
});
|
|
200
|
-
it("handles multipart form data with JSON payload", () => {
|
|
201
|
-
const result = shellCurl.generate({
|
|
202
|
-
url: "https://example.com",
|
|
203
|
-
method: "POST",
|
|
204
|
-
headers: [
|
|
205
|
-
{
|
|
206
|
-
name: "Content-Type",
|
|
207
|
-
value: "multipart/form-data"
|
|
208
|
-
}
|
|
209
|
-
],
|
|
210
|
-
postData: {
|
|
211
|
-
mimeType: "multipart/form-data",
|
|
212
|
-
text: JSON.stringify({
|
|
213
|
-
foo: "bar"
|
|
214
|
-
})
|
|
215
|
-
}
|
|
216
|
-
});
|
|
217
|
-
expect(result).toBe(`curl https://example.com \\
|
|
218
|
-
--request POST \\
|
|
219
|
-
--header 'Content-Type: multipart/form-data' \\
|
|
220
|
-
--data '{
|
|
221
|
-
"foo": "bar"
|
|
222
|
-
}'`);
|
|
223
|
-
});
|
|
224
|
-
it("handles url-encoded form data with special characters", () => {
|
|
225
|
-
const result = shellCurl.generate({
|
|
226
|
-
url: "https://example.com",
|
|
227
|
-
method: "POST",
|
|
228
|
-
postData: {
|
|
229
|
-
mimeType: "application/x-www-form-urlencoded",
|
|
230
|
-
params: [
|
|
231
|
-
{
|
|
232
|
-
name: "special chars!@#",
|
|
233
|
-
value: "value"
|
|
234
|
-
}
|
|
235
|
-
]
|
|
236
|
-
}
|
|
237
|
-
});
|
|
238
|
-
expect(result).toBe(`curl https://example.com \\
|
|
239
|
-
--request POST \\
|
|
240
|
-
--data-urlencode 'special%20chars!%40%23=value'`);
|
|
241
|
-
});
|
|
242
|
-
it("handles binary data flag", () => {
|
|
243
|
-
const result = shellCurl.generate({
|
|
244
|
-
url: "https://example.com",
|
|
245
|
-
method: "POST",
|
|
246
|
-
postData: {
|
|
247
|
-
mimeType: "application/octet-stream",
|
|
248
|
-
text: "binary content"
|
|
249
|
-
}
|
|
250
|
-
});
|
|
251
|
-
expect(result).toBe(`curl https://example.com \\
|
|
252
|
-
--request POST \\
|
|
253
|
-
--data-binary 'binary content'`);
|
|
254
|
-
});
|
|
255
|
-
it("handles compressed response", () => {
|
|
256
|
-
const result = shellCurl.generate({
|
|
257
|
-
url: "https://example.com",
|
|
258
|
-
headers: [
|
|
259
|
-
{
|
|
260
|
-
name: "Accept-Encoding",
|
|
261
|
-
value: "gzip, deflate"
|
|
262
|
-
}
|
|
263
|
-
]
|
|
264
|
-
});
|
|
265
|
-
expect(result).toBe(`curl https://example.com \\
|
|
266
|
-
--header 'Accept-Encoding: gzip, deflate' \\
|
|
267
|
-
--compressed`);
|
|
268
|
-
});
|
|
269
|
-
it("handles special characters in URL", () => {
|
|
270
|
-
const result = shellCurl.generate({
|
|
271
|
-
url: "https://example.com/path with spaces/[brackets]"
|
|
272
|
-
});
|
|
273
|
-
expect(result).toBe(`curl 'https://example.com/path with spaces/[brackets]'`);
|
|
274
|
-
});
|
|
275
|
-
it("handles special characters in query parameters", () => {
|
|
276
|
-
const result = shellCurl.generate({
|
|
277
|
-
url: "https://example.com",
|
|
278
|
-
queryString: [
|
|
279
|
-
{
|
|
280
|
-
name: "q",
|
|
281
|
-
value: "hello world & more"
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
name: "special",
|
|
285
|
-
value: "!@#$%^&*()"
|
|
286
|
-
}
|
|
287
|
-
]
|
|
288
|
-
});
|
|
289
|
-
expect(result).toBe(`curl 'https://example.com?q=hello%20world%20%26%20more&special=!%40%23%24%25%5E%26*()'`);
|
|
290
|
-
});
|
|
291
|
-
it("handles empty URL", () => {
|
|
292
|
-
const result = shellCurl.generate({
|
|
293
|
-
url: ""
|
|
294
|
-
});
|
|
295
|
-
expect(result).toBe("curl ");
|
|
296
|
-
});
|
|
297
|
-
it("handles extremely long URLs", () => {
|
|
298
|
-
const result = shellCurl.generate({
|
|
299
|
-
url: "https://example.com/" + "a".repeat(2e3)
|
|
300
|
-
});
|
|
301
|
-
expect(result).toBe(`curl https://example.com/${"a".repeat(2e3)}`);
|
|
302
|
-
});
|
|
303
|
-
it("handles multiple headers with same name", () => {
|
|
304
|
-
const result = shellCurl.generate({
|
|
305
|
-
url: "https://example.com",
|
|
306
|
-
headers: [
|
|
307
|
-
{ name: "X-Custom", value: "value1" },
|
|
308
|
-
{ name: "X-Custom", value: "value2" }
|
|
309
|
-
]
|
|
310
|
-
});
|
|
311
|
-
expect(result).toBe(`curl https://example.com \\
|
|
312
|
-
--header 'X-Custom: value1' \\
|
|
313
|
-
--header 'X-Custom: value2'`);
|
|
314
|
-
});
|
|
315
|
-
it("handles headers with empty values", () => {
|
|
316
|
-
const result = shellCurl.generate({
|
|
317
|
-
url: "https://example.com",
|
|
318
|
-
headers: [{ name: "X-Empty", value: "" }]
|
|
319
|
-
});
|
|
320
|
-
expect(result).toBe(`curl https://example.com \\
|
|
321
|
-
--header 'X-Empty: '`);
|
|
322
|
-
});
|
|
323
|
-
it("handles multipart form data with empty file names", () => {
|
|
324
|
-
const result = shellCurl.generate({
|
|
325
|
-
url: "https://example.com",
|
|
326
|
-
method: "POST",
|
|
327
|
-
postData: {
|
|
328
|
-
mimeType: "multipart/form-data",
|
|
329
|
-
params: [
|
|
330
|
-
{
|
|
331
|
-
name: "file",
|
|
332
|
-
fileName: ""
|
|
333
|
-
}
|
|
334
|
-
]
|
|
335
|
-
}
|
|
336
|
-
});
|
|
337
|
-
expect(result).toBe(`curl https://example.com \\
|
|
338
|
-
--request POST \\
|
|
339
|
-
--form 'file=@'`);
|
|
340
|
-
});
|
|
341
|
-
it("handles JSON body with special characters", () => {
|
|
342
|
-
const result = shellCurl.generate({
|
|
343
|
-
url: "https://example.com",
|
|
344
|
-
method: "POST",
|
|
345
|
-
headers: [
|
|
346
|
-
{
|
|
347
|
-
name: "Content-Type",
|
|
348
|
-
value: "application/json"
|
|
349
|
-
}
|
|
350
|
-
],
|
|
351
|
-
postData: {
|
|
352
|
-
mimeType: "application/json",
|
|
353
|
-
text: JSON.stringify({
|
|
354
|
-
key: '"quotes" and \\backslashes\\',
|
|
355
|
-
nested: {
|
|
356
|
-
array: ["item1", null, void 0]
|
|
357
|
-
}
|
|
358
|
-
})
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
expect(result).toBe(`curl https://example.com \\
|
|
362
|
-
--request POST \\
|
|
363
|
-
--header 'Content-Type: application/json' \\
|
|
364
|
-
--data '{
|
|
365
|
-
"key": "\\"quotes\\" and \\\\backslashes\\\\",
|
|
366
|
-
"nested": {
|
|
367
|
-
"array": [
|
|
368
|
-
"item1",
|
|
369
|
-
null,
|
|
370
|
-
null
|
|
371
|
-
]
|
|
372
|
-
}
|
|
373
|
-
}'`);
|
|
374
|
-
});
|
|
375
|
-
it("handles cookies with special characters", () => {
|
|
376
|
-
const result = shellCurl.generate({
|
|
377
|
-
url: "https://example.com",
|
|
378
|
-
cookies: [
|
|
379
|
-
{
|
|
380
|
-
name: "special;cookie",
|
|
381
|
-
value: "value with spaces"
|
|
382
|
-
}
|
|
383
|
-
]
|
|
384
|
-
});
|
|
385
|
-
expect(result).toBe(`curl https://example.com \\
|
|
386
|
-
--cookie 'special%3Bcookie=value%20with%20spaces'`);
|
|
387
|
-
});
|
|
388
|
-
it("prettifies JSON body", () => {
|
|
389
|
-
const result = shellCurl.generate({
|
|
390
|
-
url: "https://example.com",
|
|
391
|
-
method: "POST",
|
|
392
|
-
headers: [
|
|
393
|
-
{
|
|
394
|
-
name: "Content-Type",
|
|
395
|
-
value: "application/json"
|
|
396
|
-
}
|
|
397
|
-
],
|
|
398
|
-
postData: {
|
|
399
|
-
mimeType: "application/json",
|
|
400
|
-
text: JSON.stringify({
|
|
401
|
-
nested: {
|
|
402
|
-
array: [1, 2, 3],
|
|
403
|
-
object: { foo: "bar" }
|
|
404
|
-
},
|
|
405
|
-
simple: "value"
|
|
406
|
-
})
|
|
407
|
-
}
|
|
408
|
-
});
|
|
409
|
-
expect(result).toBe(`curl https://example.com \\
|
|
410
|
-
--request POST \\
|
|
411
|
-
--header 'Content-Type: application/json' \\
|
|
412
|
-
--data '{
|
|
413
|
-
"nested": {
|
|
414
|
-
"array": [
|
|
415
|
-
1,
|
|
416
|
-
2,
|
|
417
|
-
3
|
|
418
|
-
],
|
|
419
|
-
"object": {
|
|
420
|
-
"foo": "bar"
|
|
421
|
-
}
|
|
422
|
-
},
|
|
423
|
-
"simple": "value"
|
|
424
|
-
}'`);
|
|
425
|
-
});
|
|
426
|
-
});
|
|
427
|
-
//# sourceMappingURL=curl.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/shell/curl/curl.test.ts"],
|
|
4
|
-
"sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { shellCurl } from './curl'\n\ndescribe('shellCurl', () => {\n it('returns a basic request', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n })\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('returns a POST request', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'post',\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST`)\n })\n\n it('has headers', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n headers: [\n {\n name: 'Content-Type',\n value: 'application/json',\n },\n ],\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --header 'Content-Type: application/json'`)\n })\n\n it('doesn\u2019t add empty headers', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n headers: [],\n })\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('has JSON body', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n headers: [\n {\n name: 'Content-Type',\n value: 'application/json',\n },\n ],\n postData: {\n mimeType: 'application/json',\n text: JSON.stringify({\n hello: 'world',\n }),\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --header 'Content-Type: application/json' \\\\\n --data '{\n \"hello\": \"world\"\n}'`)\n })\n\n it('has query string', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n queryString: [\n {\n name: 'foo',\n value: 'bar',\n },\n {\n name: 'bar',\n value: 'foo',\n },\n ],\n })\n\n expect(result).toBe(`curl 'https://example.com?foo=bar&bar=foo'`)\n })\n\n it('has cookies', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n cookies: [\n {\n name: 'foo',\n value: 'bar',\n },\n {\n name: 'bar',\n value: 'foo',\n },\n ],\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --cookie 'foo=bar; bar=foo'`)\n })\n\n it('doesn\u2019t add empty cookies', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n cookies: [],\n })\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('adds basic auth credentials', () => {\n const result = shellCurl.generate(\n {\n url: 'https://example.com',\n },\n {\n auth: {\n username: 'user',\n password: 'pass',\n },\n },\n )\n\n expect(result).toBe(`curl https://example.com \\\\\n --user 'user:pass'`)\n })\n\n it('omits auth when not provided', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n })\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('omits auth when username is missing', () => {\n const result = shellCurl.generate(\n {\n url: 'https://example.com',\n },\n {\n auth: {\n username: '',\n password: 'pass',\n },\n },\n )\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('omits auth when password is missing', () => {\n const result = shellCurl.generate(\n {\n url: 'https://example.com',\n },\n {\n auth: {\n username: 'user',\n password: '',\n },\n },\n )\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('handles special characters in auth credentials', () => {\n const result = shellCurl.generate(\n {\n url: 'https://example.com',\n },\n {\n auth: {\n username: 'user@example.com',\n password: 'pass:word!',\n },\n },\n )\n\n expect(result).toBe(`curl https://example.com \\\\\n --user 'user@example.com:pass:word!'`)\n })\n\n it('handles undefined auth object', () => {\n const result = shellCurl.generate(\n {\n url: 'https://example.com',\n },\n {\n auth: undefined,\n },\n )\n\n expect(result).toBe('curl https://example.com')\n })\n\n it('handles multipart form data with files', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'multipart/form-data',\n params: [\n {\n name: 'file',\n fileName: 'test.txt',\n },\n {\n name: 'field',\n value: 'value',\n },\n ],\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --form 'file=@test.txt' \\\\\n --form 'field=value'`)\n })\n\n it('handles multipart form data with JSON payload', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n headers: [\n {\n name: 'Content-Type',\n value: 'multipart/form-data',\n },\n ],\n postData: {\n mimeType: 'multipart/form-data',\n text: JSON.stringify({\n foo: 'bar',\n }),\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --header 'Content-Type: multipart/form-data' \\\\\n --data '{\n \"foo\": \"bar\"\n}'`)\n })\n\n it('handles url-encoded form data with special characters', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'application/x-www-form-urlencoded',\n params: [\n {\n name: 'special chars!@#',\n value: 'value',\n },\n ],\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --data-urlencode 'special%20chars!%40%23=value'`)\n })\n\n it('handles binary data flag', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'application/octet-stream',\n text: 'binary content',\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --data-binary 'binary content'`)\n })\n\n it('handles compressed response', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n headers: [\n {\n name: 'Accept-Encoding',\n value: 'gzip, deflate',\n },\n ],\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --header 'Accept-Encoding: gzip, deflate' \\\\\n --compressed`)\n })\n\n it('handles special characters in URL', () => {\n const result = shellCurl.generate({\n url: 'https://example.com/path with spaces/[brackets]',\n })\n\n expect(result).toBe(`curl 'https://example.com/path with spaces/[brackets]'`)\n })\n\n it('handles special characters in query parameters', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n queryString: [\n {\n name: 'q',\n value: 'hello world & more',\n },\n {\n name: 'special',\n value: '!@#$%^&*()',\n },\n ],\n })\n\n expect(result).toBe(`curl 'https://example.com?q=hello%20world%20%26%20more&special=!%40%23%24%25%5E%26*()'`)\n })\n\n it('handles empty URL', () => {\n const result = shellCurl.generate({\n url: '',\n })\n\n expect(result).toBe('curl ')\n })\n\n it('handles extremely long URLs', () => {\n const result = shellCurl.generate({\n url: 'https://example.com/' + 'a'.repeat(2000),\n })\n\n expect(result).toBe(`curl https://example.com/${'a'.repeat(2000)}`)\n })\n\n it('handles multiple headers with same name', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n headers: [\n { name: 'X-Custom', value: 'value1' },\n { name: 'X-Custom', value: 'value2' },\n ],\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --header 'X-Custom: value1' \\\\\n --header 'X-Custom: value2'`)\n })\n\n it('handles headers with empty values', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n headers: [{ name: 'X-Empty', value: '' }],\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --header 'X-Empty: '`)\n })\n\n it('handles multipart form data with empty file names', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'multipart/form-data',\n params: [\n {\n name: 'file',\n fileName: '',\n },\n ],\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --form 'file=@'`)\n })\n\n it('handles JSON body with special characters', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n headers: [\n {\n name: 'Content-Type',\n value: 'application/json',\n },\n ],\n postData: {\n mimeType: 'application/json',\n text: JSON.stringify({\n key: '\"quotes\" and \\\\backslashes\\\\',\n nested: {\n array: ['item1', null, undefined],\n },\n }),\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --header 'Content-Type: application/json' \\\\\n --data '{\n \"key\": \"\\\\\"quotes\\\\\" and \\\\\\\\backslashes\\\\\\\\\",\n \"nested\": {\n \"array\": [\n \"item1\",\n null,\n null\n ]\n }\n}'`)\n })\n\n it('handles cookies with special characters', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n cookies: [\n {\n name: 'special;cookie',\n value: 'value with spaces',\n },\n ],\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --cookie 'special%3Bcookie=value%20with%20spaces'`)\n })\n\n it('prettifies JSON body', () => {\n const result = shellCurl.generate({\n url: 'https://example.com',\n method: 'POST',\n headers: [\n {\n name: 'Content-Type',\n value: 'application/json',\n },\n ],\n postData: {\n mimeType: 'application/json',\n text: JSON.stringify({\n nested: {\n array: [1, 2, 3],\n object: { foo: 'bar' },\n },\n simple: 'value',\n }),\n },\n })\n\n expect(result).toBe(`curl https://example.com \\\\\n --request POST \\\\\n --header 'Content-Type: application/json' \\\\\n --data '{\n \"nested\": {\n \"array\": [\n 1,\n 2,\n 3\n ],\n \"object\": {\n \"foo\": \"bar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OAAO,CAAC,GAAG,GAAG,CAAC;AAAA,YACf,QAAQ,EAAE,KAAK,MAAM;AAAA,UACvB;AAAA,UACA,QAAQ;AAAA,QACV,CAAC;AAAA,MACH;AAAA,IACF,CAAC;AAED,WAAO,MAAM,EAAE,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAerB;AAAA,EACD,CAAC;AACH,CAAC;",
|
|
6
|
-
"names": []
|
|
7
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import { describe, expect, it } from "vitest";
|
|
2
|
-
import { shellHttpie } from "./httpie.js";
|
|
3
|
-
describe("shellHttpie", () => {
|
|
4
|
-
it("returns a basic request", () => {
|
|
5
|
-
const result = shellHttpie.generate({
|
|
6
|
-
url: "https://example.com"
|
|
7
|
-
});
|
|
8
|
-
expect(result).toBe("http GET https://example.com");
|
|
9
|
-
});
|
|
10
|
-
it("returns a POST request", () => {
|
|
11
|
-
const result = shellHttpie.generate({
|
|
12
|
-
url: "https://example.com",
|
|
13
|
-
method: "post"
|
|
14
|
-
});
|
|
15
|
-
expect(result).toBe("http POST https://example.com");
|
|
16
|
-
});
|
|
17
|
-
it("has headers", () => {
|
|
18
|
-
const result = shellHttpie.generate({
|
|
19
|
-
url: "https://example.com",
|
|
20
|
-
headers: [
|
|
21
|
-
{
|
|
22
|
-
name: "Content-Type",
|
|
23
|
-
value: "application/json"
|
|
24
|
-
}
|
|
25
|
-
]
|
|
26
|
-
});
|
|
27
|
-
expect(result).toBe(`http GET https://example.com \\
|
|
28
|
-
Content-Type:application/json`);
|
|
29
|
-
});
|
|
30
|
-
it("handles multipart form data with files", () => {
|
|
31
|
-
const result = shellHttpie.generate({
|
|
32
|
-
url: "https://example.com",
|
|
33
|
-
method: "POST",
|
|
34
|
-
postData: {
|
|
35
|
-
mimeType: "multipart/form-data",
|
|
36
|
-
params: [
|
|
37
|
-
{
|
|
38
|
-
name: "file",
|
|
39
|
-
fileName: "test.txt"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "field",
|
|
43
|
-
value: "value"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
expect(result).toBe(`http --multipart POST https://example.com \\
|
|
49
|
-
file@test.txt \\
|
|
50
|
-
field='value'`);
|
|
51
|
-
});
|
|
52
|
-
it.skip("handles url-encoded form data with special characters", () => {
|
|
53
|
-
const result = shellHttpie.generate({
|
|
54
|
-
url: "https://example.com",
|
|
55
|
-
method: "POST",
|
|
56
|
-
postData: {
|
|
57
|
-
mimeType: "application/x-www-form-urlencoded",
|
|
58
|
-
params: [
|
|
59
|
-
{
|
|
60
|
-
name: "special chars!@#",
|
|
61
|
-
value: "value"
|
|
62
|
-
}
|
|
63
|
-
]
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
expect(result).toBe(`http --form POST https://example.com/ \\
|
|
67
|
-
'special chars!@#=value'`);
|
|
68
|
-
});
|
|
69
|
-
it("handles binary data", () => {
|
|
70
|
-
const result = shellHttpie.generate({
|
|
71
|
-
url: "https://example.com",
|
|
72
|
-
method: "POST",
|
|
73
|
-
postData: {
|
|
74
|
-
mimeType: "application/octet-stream",
|
|
75
|
-
text: "binary content"
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
expect(result).toBe(`echo 'binary content' | \\
|
|
79
|
-
http POST https://example.com`);
|
|
80
|
-
});
|
|
81
|
-
it("handles special characters in URL", () => {
|
|
82
|
-
const result = shellHttpie.generate({
|
|
83
|
-
url: "https://example.com/path with spaces/[brackets]"
|
|
84
|
-
});
|
|
85
|
-
expect(result).toBe(`http GET 'https://example.com/path%20with%20spaces/[brackets]'`);
|
|
86
|
-
});
|
|
87
|
-
it("handles multiple headers with same name", () => {
|
|
88
|
-
const result = shellHttpie.generate({
|
|
89
|
-
url: "https://example.com",
|
|
90
|
-
headers: [
|
|
91
|
-
{ name: "X-Custom", value: "value1" },
|
|
92
|
-
{ name: "X-Custom", value: "value2" }
|
|
93
|
-
]
|
|
94
|
-
});
|
|
95
|
-
expect(result).toBe(`http GET https://example.com \\
|
|
96
|
-
X-Custom:value2`);
|
|
97
|
-
});
|
|
98
|
-
it("handles headers with empty values", () => {
|
|
99
|
-
const result = shellHttpie.generate({
|
|
100
|
-
url: "https://example.com",
|
|
101
|
-
headers: [{ name: "X-Empty", value: "" }]
|
|
102
|
-
});
|
|
103
|
-
expect(result).toBe(`http GET https://example.com \\
|
|
104
|
-
X-Empty:''`);
|
|
105
|
-
});
|
|
106
|
-
it("handles query string parameters", () => {
|
|
107
|
-
const result = shellHttpie.generate({
|
|
108
|
-
url: "https://example.com/api?param1=value1¶m2=special value¶m3=123"
|
|
109
|
-
});
|
|
110
|
-
expect(result).toBe(`http GET 'https://example.com/api?param1=value1¶m2=special%20value¶m3=123'`);
|
|
111
|
-
});
|
|
112
|
-
});
|
|
113
|
-
//# sourceMappingURL=httpie.test.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../../src/plugins/shell/httpie/httpie.test.ts"],
|
|
4
|
-
"sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { shellHttpie } from './httpie'\n\ndescribe('shellHttpie', () => {\n it('returns a basic request', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n })\n\n expect(result).toBe('http GET https://example.com')\n })\n\n it('returns a POST request', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n method: 'post',\n })\n\n expect(result).toBe('http POST https://example.com')\n })\n\n it('has headers', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n headers: [\n {\n name: 'Content-Type',\n value: 'application/json',\n },\n ],\n })\n expect(result).toBe(`http GET https://example.com \\\\\n Content-Type:application/json`)\n })\n\n it('handles multipart form data with files', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'multipart/form-data',\n params: [\n {\n name: 'file',\n fileName: 'test.txt',\n },\n {\n name: 'field',\n value: 'value',\n },\n ],\n },\n })\n\n expect(result).toBe(`http --multipart POST https://example.com \\\\\n file@test.txt \\\\\n field='value'`)\n })\n\n it.skip('handles url-encoded form data with special characters', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'application/x-www-form-urlencoded',\n params: [\n {\n name: 'special chars!@#',\n value: 'value',\n },\n ],\n },\n })\n\n expect(result).toBe(`http --form POST https://example.com/ \\\\\n 'special chars!@#=value'`)\n })\n\n it('handles binary data', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n method: 'POST',\n postData: {\n mimeType: 'application/octet-stream',\n text: 'binary content',\n },\n })\n\n expect(result).toBe(`echo 'binary content' | \\\\\n http POST https://example.com`)\n })\n\n it('handles special characters in URL', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com/path with spaces/[brackets]',\n })\n\n expect(result).toBe(`http GET 'https://example.com/path%20with%20spaces/[brackets]'`)\n })\n\n it('handles multiple headers with same name', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n headers: [\n { name: 'X-Custom', value: 'value1' },\n { name: 'X-Custom', value: 'value2' },\n ],\n })\n\n expect(result).toBe(`http GET https://example.com \\\\\n X-Custom:value2`)\n })\n\n it('handles headers with empty values', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com',\n headers: [{ name: 'X-Empty', value: '' }],\n })\n\n expect(result).toBe(`http GET https://example.com \\\\\n X-Empty:''`)\n })\n\n it('handles query string parameters', () => {\n const result = shellHttpie.generate({\n url: 'https://example.com/api?param1=value1¶m2=special value¶m3=123',\n })\n\n expect(result).toBe(`http GET 'https://example.com/api?param1=value1¶m2=special%20value¶m3=123'`)\n })\n})\n"],
|
|
5
|
-
"mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,mBAAmB;AAE5B,SAAS,eAAe,MAAM;AAC5B,KAAG,2B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