diff --git a/src-tauri/plugins/insomnia-importer/Insomnia_bigger.json b/src-tauri/plugins/insomnia-importer/Insomnia_bigger.json deleted file mode 100644 index eba52bcb..00000000 --- a/src-tauri/plugins/insomnia-importer/Insomnia_bigger.json +++ /dev/null @@ -1,1069 +0,0 @@ -{ - "_type": "export", - "__export_format": 4, - "__export_date": "2023-11-05T22:45:17.994Z", - "__export_source": "insomnia.desktop.app:v8.3.0", - "resources": [ - { - "_id": "req_df86bf5272724c5696c45e4e36e0b87c", - "parentId": "fld_e1bea35e8d964ac59f996b358fbf502c", - "modified": 1699224307810, - "created": 1679927297821, - "url": "https://spacex-production.up.railway.app", - "name": "Capsules", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"query Q($limit: Int!) {\\n capsules(limit: $limit) {\\n id\\n }\\n}\\n\",\"operationName\":\"Q\",\"variables\":{\"limit\":2}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": { - "type": "bearer", - "token": "4c1736b6-d63f-4e07-860e-3da77c83dcde" - }, - "metaSortKey": -1699224297493, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_e1bea35e8d964ac59f996b358fbf502c", - "parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "modified": 1699224291103, - "created": 1699224291103, - "name": "SpaceX", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1699224291103, - "_type": "request_group" - }, - { - "_id": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "parentId": null, - "modified": 1638215181096, - "created": 1638215181096, - "name": "Insomnia", - "description": "", - "scope": "collection", - "_type": "workspace" - }, - { - "_id": "req_5741a3ea53e7403f956c44543cb98793", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222716936, - "created": 1653506166429, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "Delete Service Domain", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"mutation ($serviceDomainId: ID!) {\\n\\tserviceDomainDelete(\\n\\t\\tprojectId: \\\"b7a46032-fe7f-48f2-8a0c-5d7e30b1a6dc\\\"\\n\\t\\tenvironmentId: \\\"5b53202d-f0dd-4aef-ae67-b7dffc9f2664\\\"\\n\\t\\tid: $serviceDomainId\\n\\t)\\n}\\n\",\"variables\":{\"serviceDomainId\":\"{% response 'body', 'req_9765c255e6924e84b9945eb350b22525', 'b64::JC4uaWQ=::46b', 'never', 60 %}\"}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - } - ], - "authentication": {}, - "metaSortKey": -1699222709368, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_6030301042004f1d937834031923f864", - "parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "modified": 1699042236916, - "created": 1651610199647, - "name": "GraphQL", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1652937563623.9062, - "_type": "request_group" - }, - { - "_id": "req_a91c380534a6459ea27c4d30418ab16f", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222726156, - "created": 1652981694993, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "Resource Access", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"{\\n\\tresourceAccess {\\n\\t\\tproject {\\n\\t\\t\\tdisallowed\\n\\t\\t}\\n\\t\\tplugin {\\n\\t\\t\\tdisallowed\\n\\t\\t}\\n\\t}\\n}\\n\",\"variables\":{}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - } - ], - "authentication": {}, - "metaSortKey": -1699222709361.75, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_d1a181e68234451a99c8677c86c0fb2f", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222723983, - "created": 1653505877087, - "url": "", - "name": "Get Service Domains", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"query {\\n\\tallCustomDomainsForEnvironment(\\n\\t\\tprojectId: \\\"b7a46032-fe7f-48f2-8a0c-5d7e30b1a6dc\\\"\\n\\t\\tenvironmentId: \\\"5b53202d-f0dd-4aef-ae67-b7dffc9f2664\\\"\\n\\t\\tserviceId: \\\"d5fa85ac-ae49-4108-a7b6-0eca69ca623e\\\"\\n\\t) {\\n\\t\\tserviceDomains {\\n\\t\\t\\tid\\n\\t\\t\\tdomain\\n\\t\\t}\\n\\t}\\n}\\n\",\"variables\":{}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - } - ], - "authentication": {}, - "metaSortKey": -1699222709355.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_8ec4d463e2a1454e8e537a8a6f629979", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222725074, - "created": 1652826927278, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "Create Team", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"mutation {\\n\\tagreeFairUse() {\\n\\t\\tname\\n\\t}\\n}\\n\",\"variables\":{}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - } - ], - "authentication": {}, - "metaSortKey": -1699222709349.25, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_4321f12845724866ae665653dc9013a1", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222722182, - "created": 1651611238329, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "My Request", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"query DeploymentLogs {\\n\\tdeploymentLogs(\\n\\t\\tprojectId: \\\"d9b7ad7a-0033-4f82-9484-40caa7b77e02\\\"\\n\\t\\tdeploymentId: \\\"bc0de943-45b4-4693-9bae-f335d4b23d3e\\\"\\n\\t\\tfilter: \\\"\\\"\\n\\t\\tlimit: 1000\\n\\t) {\\n\\t\\ttimestamp\\n\\t}\\n}\\n\",\"variables\":{},\"operationName\":\"DeploymentLogs\"}" - }, - "parameters": [ - { - "id": "pair_3e301eeb95ae4ede87929f62f7c995d6", - "name": "", - "value": "", - "description": "" - } - ], - "headers": [ - { - "name": "Accept", - "value": "", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - }, - { - "name": "Content-Type", - "value": "application/json" - } - ], - "authentication": {}, - "metaSortKey": -1699222709318, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_63cd07c5ecb34c1b8c9d350be8c22c73", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222715513, - "created": 1652983047395, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "Project Resource Access", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"{\\n\\tprojectResourceAccess(projectId: \\\"d9b7ad7a-0033-4f82-9484-40caa7b77e02\\\") {\\n\\t\\tenvironment {\\n\\t\\t\\tdisallowed\\n\\t\\t}\\n\\t\\tdeployment {\\n\\t\\t\\tdisallowed\\n\\t\\t}\\n\\t\\tcustomDomain {\\n\\t\\t\\tdisallowed\\n\\t\\t}\\n\\t}\\n}\\n\",\"variables\":{}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - } - ], - "authentication": {}, - "metaSortKey": -1699222709268, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2ca47b965a3a456fa82d91799b1bb672", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222718108, - "created": 1653522891907, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "Get Deployments", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"query {\\n\\tdeployments(where: {projectId: \\\"b7a46032-fe7f-48f2-8a0c-5d7e30b1a6dc\\\"}) {\\n\\t\\tnodes {\\n\\t\\t\\tid\\n\\t\\t\\tstaticUrl\\n\\t\\t}\\n\\t}\\n}\\n\",\"variables\":{}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - }, - { - "id": "pair_619347adbf6c47c98965adc8a616bedf", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_0806f4c53d97487da52deac558b9a714", - "name": "", - "value": "", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1699222709218, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_342c6ea8a6e44ee79146f658bbccbc37", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222720479, - "created": 1664387180476, - "url": "https://backboard.railway-develop.app/graphql/v2", - "name": "Variables", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"query VariablesForDeploy {\\n\\tvariablesForServiceDeployment(\\n\\t\\tenvironmentId: \\\"e12b44cd-2f44-4213-918a-c6b2b2da1119\\\"\\n\\t\\tserviceId: \\\"1fb71daf-a16f-4908-bc9a-edf5eb17ff55\\\"\\n\\t\\tprojectId: \\\"0f65ff5f-66c8-4768-9efe-151c5fb0c67e\\\"\\n\\t)\\n}\\n\",\"operationName\":\"VariablesForDeploy\"}" - }, - "parameters": [ - { - "name": "q", - "value": "project", - "disabled": false, - "id": "pair_22881d63794c4a30bde5ebde1acfd6e7" - } - ], - "headers": [ - { - "name": "Cookie", - "value": "__stripe_mid=9edfc0bb-44b7-4578-9891-79fc8186bd8d21bd04; rw.session=rw_Fe26.2**59c48bdf92c61ccc01305240c75c68bec817014d417a8491d8b00452308052f8*xndzMd6R6DfmF7gVMgqB6A*f1kHhYV1qfls1RNnf25ZaTJIVziG448bozcrI014mb7heWWbtYxuj-HaUieCd2krFmhW6YEtlBq1_tn38BTzjQ*1666553259403*51eef82f4bb9607e184b4b577c5ca1c73bb2a23eb1c724f1435230ab2f4553a4*DHOs3UtBSPZFv3tmx-hIfP93MFHNH37z945vZHCuFFc; rw.session.sig=qDAXZPk6-xyOrqIyCxucXO208B0", - "id": "pair_a0828f267f4f490a8f3571b8fda99c77" - }, - { - "id": "pair_149b1a50185c4f3b8ae8f9c83477b0d9", - "name": "Content-Type", - "value": "application/json", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1699222709193, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_9765c255e6924e84b9945eb350b22525", - "parentId": "fld_6030301042004f1d937834031923f864", - "modified": 1699222709203, - "created": 1653501388183, - "url": "{{ _.GRAPHQL_ENDPOINT }}", - "name": "Create Service Domain", - "description": "", - "method": "POST", - "body": { - "mimeType": "application/graphql", - "text": "{\"query\":\"mutation {\\n\\tserviceDomainCreate(\\n\\t\\tprojectId: \\\"b7a46032-fe7f-48f2-8a0c-5d7e30b1a6dc\\\"\\n\\t\\tenvironmentId: \\\"5b53202d-f0dd-4aef-ae67-b7dffc9f2664\\\"\\n\\t\\tserviceId: \\\"d5fa85ac-ae49-4108-a7b6-0eca69ca623e\\\"\\n\\t) \\n}\\n\",\"variables\":{}}" - }, - "parameters": [], - "headers": [ - { - "name": "Content-Type", - "value": "application/json", - "id": "pair_a547d82bc2684b7595ab676d2668bbac" - }, - { - "id": "pair_3bcf5e459c2c438c86d5d3d5e52354fb", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_4f1cee0bbdf24b6390b9c464ec410250", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_9a9cf4c4a63b4fce922673fddb43d43d", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_908a2035a894438baebeb1b6ac1afee2", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_0ec5bbc7f6c145fa9cd9de906cc29379", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_8aba6dd1ca5a41cca0c24786b0cbb039", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_0e6fcf74ddb443819019a91e802d04af", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_f42e6cd545a04cd6800f70268008ba05", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_695d148107424526984ec543af507456", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_eda2b0d7b0a3455497e5cdee276c77c6", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_d15467f809b64c328fbb7201e1294ddd", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_69abe7b3af7141b7bea4cfb67b477a52", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_48c897a1a83d4de6ac102ea8434e2ad4", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_e6e8b5eec90e4f6d9766969afca33d84", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_bb25438825094a8e8ef6ec0f6e27cdd4", - "name": "", - "value": "", - "description": "" - }, - { - "id": "pair_358743874d8c48b19bbb8af259d4a45d", - "name": "", - "value": "", - "description": "" - } - ], - "authentication": {}, - "metaSortKey": -1699222709168, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_aceafe72950f4818bcb74eab4b79d3f5", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222669071, - "created": 1647458250539, - "url": "https://health.up.railway.app", - "name": "Production Health", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": {}, - "metaSortKey": -1699222664648, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "fld_ee67581f87c542aabb3fe375104264b9", - "parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "modified": 1699222650974, - "created": 1699222644488, - "name": "Service Proxy", - "description": "", - "environment": {}, - "environmentPropertyOrder": null, - "metaSortKey": -1651610122171.0625, - "_type": "request_group" - }, - { - "_id": "req_6c99ccd2c0b64897be2c148506315105", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222673201, - "created": 1647463574333, - "url": "https://35.227.136.140", - "name": "Production Go Server (SP 0)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "go-server.schier.dev", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664623, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_5ef4cd8d591d4f97b55360ec38f9bcf7", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222683904, - "created": 1647463586661, - "url": "https://34.82.254.200", - "name": "Production Go Server (SP 1)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "go-server.schier.dev", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664616.75, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_5d976ede609e4c76b8e8d33d7c3c90c5", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222685468, - "created": 1648507862472, - "url": "https://34.127.19.80", - "name": "Production Go Server (SP 2)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "go-server.schier.dev", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664613.625, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_4070af182e2c4414b5e9cecf04b39c21", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222686873, - "created": 1648509308934, - "url": "https://35.227.136.140", - "name": "Production Health (SP 0)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "health.up.railway.app", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664612.0625, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_d090114065924f849d5d70983c1a9445", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222688149, - "created": 1648509727183, - "url": "https://34.82.254.200", - "name": "Production Health (SP 1)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "health.up.railway.app", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664611.2812, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_3b4f8d4cf5c0403cbacc20cfa0d0909e", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222689198, - "created": 1648507992005, - "url": "https://34.127.19.80", - "name": "Production Health (SP 2)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "health.up.railway.app", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664610.8906, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_0abf3b152fef4e2b809b3eca7fa8c5ed", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222690412, - "created": 1661495542931, - "url": "https://35.230.52.169", - "name": "Production Health (SP 3)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "health.up.railway.app", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664610.6953, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_86bc2a68db064d3394d61d5012685d88", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222691411, - "created": 1661536011852, - "url": "https://34.83.190.231", - "name": "Production Health (SP 4)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "health.up.railway.app", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664610.5977, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_2a1a47392f71465abedf1605878bd8b7", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222692671, - "created": 1661536017974, - "url": "https://35.203.130.181", - "name": "Production Health (SP 5)", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [ - { - "id": "pair_eaf08227988d4d5cae6c56956383bcfd", - "name": "Host", - "value": "health.up.railway.app", - "description": "", - "disabled": false - } - ], - "authentication": {}, - "metaSortKey": -1699222664610.5488, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_ce1409130bbd470b82ee234986055732", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222682620, - "created": 1650998482383, - "url": "https://b44574691bf9.up.railway.app/", - "name": "Fallback 404", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": {}, - "metaSortKey": -1699222664610.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "req_b78b921a543442f6ad26cffd79134a71", - "parentId": "fld_ee67581f87c542aabb3fe375104264b9", - "modified": 1699222695088, - "created": 1650998377419, - "url": "https://fastapi-test-production-cfb9.up.railway.app/", - "name": "Fallback 503", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [], - "authentication": {}, - "metaSortKey": -1699222664510.5, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "env_396b20e683679d3405b86836c3479da41cef2434", - "parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "modified": 1683571883292, - "created": 1638215181110, - "name": "Base Environment", - "data": { - "RAILWAY_ACCESS_TOKEN": "rw_Fe26.2**557bd70c2da1b3b5e813fa42b699411c9f2d064d9d5603dfbb5e0841db9b4f7a*vXewN7CK4n5peW6rlzckeA*8VpqzYubeRNkUo8x8_cl4ntF9ZaghYNJ71hz9JjQO467QFh_QKTioNf8PiYEXbmgcWafDLzkCGrPkXVXLeVIdA*1685304002539*11d28aa3a3a8ae825c4369ba902984c4026d7344b7f915786b3d35c5feced643*rxI5aagcD-K9qfg52IkJMRNv6KAk4CUPSpN9ltQXPzs", - "STAGING_LB_IP": "34.127.110.157", - "PROD_LB_IP": "104.196.232.237", - "GRAPHQL_ENDPOINT": "https://backboard.{{ _.HOST }}/graphql" - }, - "dataPropertyOrder": { - "&": [ - "RAILWAY_ACCESS_TOKEN", - "STAGING_LB_IP", - "PROD_LB_IP", - "GRAPHQL_ENDPOINT" - ] - }, - "color": null, - "isPrivate": false, - "metaSortKey": 1638215181110, - "_type": "environment" - }, - { - "_id": "jar_396b20e683679d3405b86836c3479da41cef2434", - "parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "modified": 1693580294408, - "created": 1638215181112, - "name": "Default Jar", - "cookies": [ - { - "key": "rw.session", - "expires": "1970-01-01T00:00:00.000Z", - "domain": "backboard.railway-develop.app", - "path": "/", - "secure": true, - "httpOnly": true, - "hostOnly": true, - "creation": "2022-02-01T21:33:31.879Z", - "lastAccessed": "2022-02-16T23:22:54.152Z", - "id": "9050134658712923" - }, - { - "key": "rw.session.sig", - "value": "H0r-8iMOgmbraYpjf_Op_fw49mE", - "expires": "1970-01-01T00:00:00.000Z", - "domain": "backboard.railway-develop.app", - "path": "/", - "secure": true, - "httpOnly": true, - "hostOnly": true, - "creation": "2022-02-01T21:33:31.880Z", - "lastAccessed": "2022-02-16T23:22:54.153Z", - "id": "0663233020552414" - }, - { - "key": "_gorilla_csrf", - "value": "MTY0NzA0NzkwNHxJa3c1Y1hreU1teHhOMGN2Um10dFJEZEdaRGt5YlRkMmRrRldVRkZZYVVreGMzUjRheTlqZFRSRE5GazlJZ289fCzayrzfSoKAAcPZ8vfm0kn7eGRApjK71geRFcDahtld", - "expires": "2022-03-19T01:18:24.000Z", - "maxAge": 604800, - "domain": "35.230.25.114", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2022-03-12T01:18:24.341Z", - "lastAccessed": "2022-03-12T01:18:24.341Z", - "id": "6352363032251931" - }, - { - "key": "_gorilla_csrf", - "value": "MTY0NzUzMDA5N3xJa0Z4YjBkUFFrSkRXR1k0V1djMlpEZEhia1YxUWxreFp6RXJlbmhZVGtGU2MyZEdPVmRGVEhJdlIyODlJZ289fBpHkkGv6WwWXzizLjlHTV70EOdn5-KsR7a8MBRkXSQZ", - "expires": "2022-03-24T15:14:57.000Z", - "maxAge": 604800, - "domain": "104.196.232.237", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2022-03-17T15:14:57.151Z", - "lastAccessed": "2022-03-17T15:14:57.151Z", - "id": "8971506766096926" - }, - { - "key": "csrftoken", - "value": "MTY0NzUzMDEwMXxJbFZPZUhkTFNEbE1SSHB0VHpWelZYSllhV0ozWmtOQlZqZDVjWGxwUVhoVmNVNU5iblp1VkVKbFpUQTlJZ289fFzVHN-3QwsPlSTcehuNLfvEYJreiBBsGI_TAIrhAGG4", - "expires": "2022-03-18T03:15:01.000Z", - "maxAge": 43200, - "domain": "104.196.232.237", - "path": "/", - "secure": true, - "httpOnly": true, - "extensions": [ - "SameSite=Lax" - ], - "hostOnly": true, - "creation": "2022-03-17T15:15:01.387Z", - "lastAccessed": "2022-03-17T15:15:01.387Z", - "id": "97506639298924" - }, - { - "key": "_gorilla_csrf", - "value": "MTY1NTg0MjA0MnxJbUZZVUdwcmVFUnNkV3R4T1hSUE1HNUNVVWhpYkRjdlJsRTJUVVJwYkdGV2RTOUtSMXBtTjNsU1ZGVTlJZ289fN3w7ZeZzNgsUqRq8XTuLLX0yb8xWIb_U54NzN1MCoXj", - "expires": "2022-06-28T20:07:22.000Z", - "maxAge": 604800, - "domain": "34.127.19.80", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2022-03-28T23:04:41.781Z", - "lastAccessed": "2022-06-21T20:07:21.961Z", - "id": "9250420261993928" - }, - { - "key": "_gorilla_csrf", - "value": "MTY1NTg0MjA1MnxJbmhUVmt4bVF6VkZNM2RVU2tocU0wRjJiSGRxWTJGNWNVeHdPV3hGUkZwclExaGhTa0phVW5WbWQxVTlJZ289fGfMeQWOBmPJZ--qB8Q8XQOJdLc4O68zvFMFm3TUFTY8", - "expires": "2022-06-28T20:07:32.000Z", - "maxAge": 604800, - "domain": "34.82.254.200", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2022-06-21T20:07:32.204Z", - "lastAccessed": "2022-06-21T20:07:32.204Z", - "id": "44160105356955115" - }, - { - "key": "_gorilla_csrf", - "value": "MTY1NTg0MjA1OXxJa1ZsV21Kd01URkdkMDFDVVhWdU9WVXpPQzlxV0dOeWNrSjViR3MwVmxrelpEUjVVQ3R3TlRST1FtODlJZ289fMVPNCzPJeQFaif1Ea73Oc9P1J7yP8m02BCO9nqzYO8g", - "expires": "2022-06-28T20:07:39.000Z", - "maxAge": 604800, - "domain": "35.227.136.140", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2022-06-21T20:07:38.917Z", - "lastAccessed": "2022-06-21T20:07:38.917Z", - "id": "5712105390385236" - }, - { - "key": "_gorilla_csrf", - "value": "MTY3ODcyNjc0MHxJbnByWlVZdlowOTZObk13V0dVMWVFNHlZbXRSTldjMlRYZGFha2RYZG5obFNsVlFOV2hxUkZjdk1VazlJZ289fJyKGNqXFGQRVhPh_M8tQQAvuKcODVJALz1vP2s6Jyho", - "expires": "2023-03-20T16:59:00.000Z", - "maxAge": 604800, - "domain": "schier.co", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2023-03-13T16:59:00.443Z", - "lastAccessed": "2023-03-13T16:59:00.443Z", - "id": "577324323818015" - }, - { - "key": "experiments", - "value": "%7B%22ydugo4GHROOp8qOy9fuAXg%22%3A3%7D", - "domain": "35.230.57.124", - "path": "/", - "hostOnly": true, - "creation": "2023-09-01T14:58:14.408Z", - "lastAccessed": "2023-09-01T14:58:14.408Z", - "id": "17611565296231624" - } - ], - "_type": "cookie_jar" - }, - { - "_id": "spc_2f5ed07b6b544d3fb83b6f622ccf4fa6", - "parentId": "wrk_cd2351f82a134dec87cb74c0bc9e3e7c", - "modified": 1638215181101, - "created": 1638215181101, - "fileName": "Insomnia", - "contents": "", - "contentType": "yaml", - "_type": "api_spec" - }, - { - "_id": "env_40037f13ae3e4f15bc7ae4863b207b8d", - "parentId": "env_396b20e683679d3405b86836c3479da41cef2434", - "modified": 1698513742673, - "created": 1651610110792, - "name": "Development", - "data": { - "HOST": "railway-develop.app" - }, - "dataPropertyOrder": { - "&": [ - "HOST" - ] - }, - "color": "#20cf4c", - "isPrivate": false, - "metaSortKey": 1651610110792, - "_type": "environment" - }, - { - "_id": "env_6f68e0b0ace7422886f3d5de98bf3c2a", - "parentId": "env_396b20e683679d3405b86836c3479da41cef2434", - "modified": 1699222778492, - "created": 1699222764262, - "name": "Hello Env", - "data": { - "number": 1 - }, - "dataPropertyOrder": { - "&": [ - "number" - ] - }, - "color": null, - "isPrivate": false, - "metaSortKey": 1699222764262, - "_type": "environment" - } - ] -} diff --git a/src-tauri/plugins/insomnia-importer/Insomnia_hello-world.json b/src-tauri/plugins/insomnia-importer/Insomnia_hello-world.json deleted file mode 100644 index b73a0063..00000000 --- a/src-tauri/plugins/insomnia-importer/Insomnia_hello-world.json +++ /dev/null @@ -1,100 +0,0 @@ -{ - "_type": "export", - "__export_format": 4, - "__export_date": "2023-11-01T23:41:02.844Z", - "__export_source": "insomnia.desktop.app:v8.3.0", - "resources": [ - { - "_id": "req_c8ae891b0fe549a4a530a75da59b6e34", - "parentId": "wrk_ea69a78d6a0540f583d2ec80666a1724", - "modified": 1698767088880, - "created": 1698767077168, - "url": "https://schier.co", - "name": "My Request", - "description": "", - "method": "GET", - "body": {}, - "parameters": [], - "headers": [{ "name": "User-Agent", "value": "insomnia/8.3.0" }], - "authentication": {}, - "metaSortKey": -1698767077168, - "isPrivate": false, - "settingStoreCookies": true, - "settingSendCookies": true, - "settingDisableRenderRequestBody": false, - "settingEncodeUrl": true, - "settingRebuildPath": true, - "settingFollowRedirects": "global", - "_type": "request" - }, - { - "_id": "wrk_ea69a78d6a0540f583d2ec80666a1724", - "parentId": null, - "modified": 1698767073768, - "created": 1698767068649, - "name": "Hello World", - "description": "", - "scope": "collection", - "_type": "workspace" - }, - { - "_id": "env_90b3abd7ed857fd535396167018da33932100672", - "parentId": "wrk_ea69a78d6a0540f583d2ec80666a1724", - "modified": 1698881852559, - "created": 1698767068650, - "name": "Base Environment", - "data": { "base": true }, - "dataPropertyOrder": { "&": ["base"] }, - "color": null, - "isPrivate": false, - "metaSortKey": 1698767068650, - "_type": "environment" - }, - { - "_id": "jar_90b3abd7ed857fd535396167018da33932100672", - "parentId": "wrk_ea69a78d6a0540f583d2ec80666a1724", - "modified": 1698767090390, - "created": 1698767068651, - "name": "Default Jar", - "cookies": [ - { - "key": "_gorilla_csrf", - "value": "MTY5ODc2NzA5MHxJa1Z1U0RCVVMzcDJhbEJFWkd0Q09WVkllbXBMVlhSd1VtaGFkVlpsVVhobVNVNDVTV2hDWmpFd1JtTTlJZ289fPkab2rsnQwWmJi-pCbg5Wz4O_6csc29ZcYOdB0tOLtD", - "expires": "2023-11-07T15:44:50.000Z", - "maxAge": 604800, - "domain": "schier.co", - "path": "/", - "httpOnly": true, - "hostOnly": true, - "creation": "2023-10-31T15:44:50.390Z", - "lastAccessed": "2023-10-31T15:44:50.390Z", - "sameSite": "lax", - "id": "672286917061701" - } - ], - "_type": "cookie_jar" - }, - { - "_id": "env_d04deba50c2f44b0b9bd01c53efebff4", - "parentId": "env_90b3abd7ed857fd535396167018da33932100672", - "modified": 1698882026143, - "created": 1698881855600, - "name": "Sub Environment", - "data": { - "string": "string", - "bool": true, - "number": 123, - "object": { "foo": "bar" }, - "array": [1, 2, 3] - }, - "dataPropertyOrder": { - "&": ["string", "bool", "number", "object", "array"], - "&~|object": ["foo"] - }, - "color": null, - "isPrivate": false, - "metaSortKey": 1698881855600, - "_type": "environment" - } - ] -} diff --git a/src-tauri/plugins/insomnia-importer/helpers/variables.js b/src-tauri/plugins/insomnia-importer/helpers/variables.js deleted file mode 100644 index 660664ae..00000000 --- a/src-tauri/plugins/insomnia-importer/helpers/variables.js +++ /dev/null @@ -1,7 +0,0 @@ -export function parseVariables(data) { - return Object.entries(data).map(([name, value]) => ({ - enabled: true, - name, - value: `${value}`, - })); -} diff --git a/src-tauri/plugins/insomnia-importer/helpers/types.js b/src-tauri/plugins/insomnia-importer/src/helpers/types.js similarity index 82% rename from src-tauri/plugins/insomnia-importer/helpers/types.js rename to src-tauri/plugins/insomnia-importer/src/helpers/types.js index bb78f67c..62dc3ef4 100644 --- a/src-tauri/plugins/insomnia-importer/helpers/types.js +++ b/src-tauri/plugins/insomnia-importer/src/helpers/types.js @@ -17,3 +17,7 @@ export function isEnvironment(obj) { export function isJSObject(obj) { return Object.prototype.toString.call(obj) === '[object Object]'; } + +export function isJSString(obj) { + return Object.prototype.toString.call(obj) === '[object String]'; +} diff --git a/src-tauri/plugins/insomnia-importer/src/helpers/variables.js b/src-tauri/plugins/insomnia-importer/src/helpers/variables.js new file mode 100644 index 00000000..3104fa42 --- /dev/null +++ b/src-tauri/plugins/insomnia-importer/src/helpers/variables.js @@ -0,0 +1,18 @@ +import { isJSString } from './types.js'; + +export function parseVariables(data) { + return Object.entries(data).map(([name, value]) => ({ + enabled: true, + name, + value: `${value}`, + })); +} + +/** + * Convert Insomnia syntax to Yaak syntax + * @param {string} variable - Text to convert + */ +export function convertSyntax(variable) { + if (!isJSString(variable)) return variable; + return variable.replaceAll(/{{\s*(_\.)?([^}]+)\s*}}/g, '${[$2]}'); +} diff --git a/src-tauri/plugins/insomnia-importer/importers/environment.js b/src-tauri/plugins/insomnia-importer/src/importers/environment.js similarity index 100% rename from src-tauri/plugins/insomnia-importer/importers/environment.js rename to src-tauri/plugins/insomnia-importer/src/importers/environment.js diff --git a/src-tauri/plugins/insomnia-importer/importers/folder.js b/src-tauri/plugins/insomnia-importer/src/importers/folder.js similarity index 100% rename from src-tauri/plugins/insomnia-importer/importers/folder.js rename to src-tauri/plugins/insomnia-importer/src/importers/folder.js diff --git a/src-tauri/plugins/insomnia-importer/importers/request.js b/src-tauri/plugins/insomnia-importer/src/importers/request.js similarity index 69% rename from src-tauri/plugins/insomnia-importer/importers/request.js rename to src-tauri/plugins/insomnia-importer/src/importers/request.js index e9b1a001..edb06963 100644 --- a/src-tauri/plugins/insomnia-importer/importers/request.js +++ b/src-tauri/plugins/insomnia-importer/src/importers/request.js @@ -1,3 +1,5 @@ +import { convertSyntax } from '../helpers/variables.js'; + /** * Import an Insomnia request object. * @param {Object} r - The request object to import. @@ -6,20 +8,32 @@ */ export function importRequest(r, workspaceId, sortPriority = 0) { console.log('IMPORTING REQUEST', r._id, r.name, JSON.stringify(r, null, 2)); + let bodyType = null; let body = null; if (r.body?.mimeType === 'application/graphql') { bodyType = 'graphql'; - body = r.body.text; + body = convertSyntax(r.body.text); + } else if (r.body?.mimeType === 'application/json') { + bodyType = 'application/json'; + body = convertSyntax(r.body.text); } + let authenticationType = null; let authentication = {}; if (r.authentication.type === 'bearer') { authenticationType = 'bearer'; authentication = { - token: r.authentication.token, + token: convertSyntax(r.authentication.token), + }; + } else if (r.authentication.type === 'basic') { + authenticationType = 'basic'; + authentication = { + username: convertSyntax(r.authentication.username), + password: convertSyntax(r.authentication.password), }; } + return { id: r._id, createdAt: new Date(r.created ?? Date.now()).toISOString().replace('Z', ''), @@ -29,7 +43,7 @@ export function importRequest(r, workspaceId, sortPriority = 0) { model: 'http_request', sortPriority, name: r.name, - url: r.url, + url: convertSyntax(r.url), body, bodyType, authentication, diff --git a/src-tauri/plugins/insomnia-importer/importers/workspace.js b/src-tauri/plugins/insomnia-importer/src/importers/workspace.js similarity index 100% rename from src-tauri/plugins/insomnia-importer/importers/workspace.js rename to src-tauri/plugins/insomnia-importer/src/importers/workspace.js diff --git a/src-tauri/plugins/insomnia-importer/index.js b/src-tauri/plugins/insomnia-importer/src/index.js similarity index 100% rename from src-tauri/plugins/insomnia-importer/index.js rename to src-tauri/plugins/insomnia-importer/src/index.js diff --git a/src-tauri/plugins/insomnia-importer/vite.config.js b/src-tauri/plugins/insomnia-importer/vite.config.js new file mode 100644 index 00000000..5ea5a77c --- /dev/null +++ b/src-tauri/plugins/insomnia-importer/vite.config.js @@ -0,0 +1,12 @@ +import { resolve } from 'path'; +import { defineConfig } from 'vite'; + +export default defineConfig({ + build: { + lib: { + entry: resolve(__dirname, 'src/index.js'), + fileName: 'index', + formats: ['es'], + }, + }, +}); diff --git a/src-tauri/src/plugin.rs b/src-tauri/src/plugin.rs index da74d081..e71d1580 100644 --- a/src-tauri/src/plugin.rs +++ b/src-tauri/src/plugin.rs @@ -97,7 +97,7 @@ fn run_plugin( .resolve_resource("plugins") .expect("failed to resolve plugin directory resource") .join(plugin_name); - let plugin_index_file = plugin_dir.join("index.js"); + let plugin_index_file = plugin_dir.join("dist/index.js"); println!("Plugin dir={:?} file={:?}", plugin_dir, plugin_index_file);