Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 118 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/insomnia-inso/esbuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const config: BuildOptions = {
'__DEV__': JSON.stringify(!isProd),
},
// node-llama-cpp is not included here because inso does not need it
external: ['@getinsomnia/node-libcurl', 'fsevents', 'mocha'],
external: ['@getinsomnia/node-libcurl', 'fsevents', 'mocha', 'curlconverter'],
entryPoints: ['./src/index.ts'],
};

Expand Down
1 change: 1 addition & 0 deletions packages/insomnia/esbuild.entrypoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ export default async function build(options: Options) {
'@reflink/reflink-win32-arm64-msvc',
'@reflink/reflink-win32-x64-msvc',
'apiconnect-wsdl',
'curlconverter',
...Object.keys(builtinModules),
],
};
Expand Down
1 change: 1 addition & 0 deletions packages/insomnia/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
"color": "^4.2.3",
"content-disposition": "^0.5.4",
"cookie-parser": "^1.4.7",
"curlconverter": "^4.12.0",
"date-fns": "^3.6.0",
"decompress": "^4.2.1",
"deep-equal": "^1.1.2",
Expand Down
4 changes: 2 additions & 2 deletions packages/insomnia/src/common/__tests__/import.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('importRaw()', () => {

expect(curlRequests[0]).toMatchObject({
body: {
text: '{\"email_id\": \"tem_123\"}',
text: '{\"email_id\":\"tem_123\"}',
},
});
});
Expand Down Expand Up @@ -90,7 +90,7 @@ describe('importRaw()', () => {

expect(curlRequests[0]).toMatchObject({
body: {
text: '{\"email_id\": \"tem_123\"}',
text: '{\"email_id\":\"tem_123\"}',
},
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ exports[`Fixtures > Import curl > complex-input.sh 1`] = `
},
"body": {
"mimeType": "application/json",
"text": "{"email_id": "tem_123"}",
"text": "{"email_id":"tem_123"}",
},
"headers": [
{
"name": "x-custom-header",
"name": "x-custom-header ",
"value": "foo bar",
},
{
Expand All @@ -30,12 +30,16 @@ exports[`Fixtures > Import curl > complex-input.sh 1`] = `
},
{
"name": "Cookie",
"value": "foo=bar; NID=91=iOf1sU9Ovlns9Dzn2Ipz05syr2K4AlZ4Kgp84eRVLf3_6DgcNrkqpWg4lfUvCB5cNxD26t",
"value": "foo=bar",
},
{
"name": "another-header",
"value": "foo",
},
{
"name": "Accept",
"value": "application/json",
},
],
"method": "POST",
"name": "http://localhost:8000/api/v1/send",
Expand All @@ -59,7 +63,7 @@ exports[`Fixtures > Import curl > dollar-sign-input.sh 1`] = `
"_type": "request",
"authentication": {},
"body": {
"mimeType": "",
"mimeType": "application/json",
"text": "{"key":"TEST","websiteId":2,"storeId":4,"remove":true,"coupon":{"code":"erwrwer"}}",
},
"headers": [
Expand All @@ -77,7 +81,7 @@ exports[`Fixtures > Import curl > dollar-sign-input.sh 1`] = `
},
{
"name": "Cookie",
"value": "CookieTestConsent={stamp:\\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=='%2Cnecessary...",
"value": "CookieTestConsent={stamp:'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=='%2Cnecessary...",
},
{
"name": "Connection",
Expand All @@ -87,6 +91,14 @@ exports[`Fixtures > Import curl > dollar-sign-input.sh 1`] = `
"name": "Pragma",
"value": "no-cache",
},
{
"name": "Content-Type",
"value": "application/json",
},
{
"name": "Accept",
"value": "application/json",
},
],
"method": "POST",
"name": "https://test.dk",
Expand Down Expand Up @@ -229,6 +241,7 @@ exports[`Fixtures > Import curl > get-input.sh 1`] = `
"name": "http://somesite.com/getdata",
"parameters": [
{
"disabled": false,
"name": "id",
"value": "1234",
},
Expand Down Expand Up @@ -372,29 +385,6 @@ exports[`Fixtures > Import curl > multi-input.sh 1`] = `
}
`;

exports[`Fixtures > Import curl > no-url-input.sh 1`] = `
{
"__export_date": "",
"__export_format": 4,
"__export_source": "insomnia.importers:v0.1.0",
"_type": "export",
"resources": [
{
"_id": "__REQ_1__",
"_type": "request",
"authentication": {},
"body": {},
"headers": [],
"method": "POST",
"name": "cURL Import 1",
"parameters": [],
"parentId": "__WORKSPACE_ID__",
"url": "",
},
],
}
`;

exports[`Fixtures > Import curl > question-mark-input.sh 1`] = `
{
"__export_date": "",
Expand All @@ -407,10 +397,19 @@ exports[`Fixtures > Import curl > question-mark-input.sh 1`] = `
"_type": "request",
"authentication": {},
"body": {
"mimeType": "",
"mimeType": "application/json",
"text": "{"query":{"match_all":{}}}",
},
"headers": [],
"headers": [
{
"name": "Content-Type",
"value": "application/json",
},
{
"name": "Accept",
"value": "application/json",
},
],
"method": "POST",
"name": "http://192.168.1.1:9200/executions/_search",
"parameters": [
Expand Down
Loading
Loading