├── .clang-format ├── .dockerignore ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE │ ├── bug_report.yml │ └── config.yml ├── PULL_REQUEST_TEMPLATE.md ├── config.yml ├── scripts │ └── generate-binary-digest.sh └── workflows │ ├── homebrew.yml │ ├── release-build.yml │ ├── release-publish.yml │ ├── release-recurring.yml │ ├── release-start.yml │ ├── sast.yml │ ├── test-cli.yml │ ├── test-e2e.yml │ ├── test.yml │ └── update-changelog.yml ├── .gitignore ├── .markdownlint.yaml ├── .npmrc ├── .nvmrc ├── .prettierignore ├── .prettierrc ├── .vscode ├── extensions.json ├── launch.json ├── settings.json └── tasks.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DEVELOPMENT.md ├── LICENSE ├── README.md ├── SECURITY.md ├── build-secure-wrapper.sh ├── eslint.config.mjs ├── flake.lock ├── flake.nix ├── package-lock.json ├── package.json ├── packages ├── insomnia-inso │ ├── .gitignore │ ├── Dockerfile │ ├── README.md │ ├── assets │ │ ├── ci-demo.gif │ │ ├── demo.gif │ │ └── logo.svg │ ├── bin │ │ ├── debug_inso │ │ └── inso │ ├── esbuild.ts │ ├── package.json │ ├── src │ │ ├── cli.test.ts │ │ ├── cli.ts │ │ ├── commands │ │ │ ├── __mocks__ │ │ │ │ ├── insomnia-send-request.ts │ │ │ │ └── insomnia-testing.ts │ │ │ ├── export-specification.test.ts │ │ │ ├── export-specification.ts │ │ │ ├── fixtures │ │ │ │ ├── openapi-spec.yaml │ │ │ │ └── with-ruleset │ │ │ │ │ ├── .spectral.yml │ │ │ │ │ └── path-plugin.yaml │ │ │ ├── lint-specification.test.ts │ │ │ └── lint-specification.ts │ │ ├── db │ │ │ ├── adapters │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── insomnia-adapter.test.ts.snap │ │ │ │ ├── git-adapter.test.ts │ │ │ │ ├── git-adapter.ts │ │ │ │ ├── insomnia-adapter.test.ts │ │ │ │ ├── insomnia-adapter.ts │ │ │ │ ├── ne-db-adapter.test.ts │ │ │ │ └── ne-db-adapter.ts │ │ │ ├── fixtures │ │ │ │ ├── certs │ │ │ │ │ ├── fake_ca.pem │ │ │ │ │ ├── fake_cert.pem │ │ │ │ │ └── fake_key.pem │ │ │ │ ├── git-repo-malformed-spec │ │ │ │ │ ├── .insomnia │ │ │ │ │ │ ├── ApiSpec │ │ │ │ │ │ │ └── spc_46c5a4a40e83445a9bd9d9758b86c16c.yml │ │ │ │ │ │ ├── Environment │ │ │ │ │ │ │ ├── env_ca046a738f001eb3090261a537b1b78f86c2094c.yml │ │ │ │ │ │ │ └── env_env_ca046a738f001eb3090261a537b1b78f86c2094c_sub.yml │ │ │ │ │ │ ├── Request │ │ │ │ │ │ │ ├── req_wrk_012d4860c7da418a85ffea7406e1292a21946b60.yml │ │ │ │ │ │ │ └── req_wrk_012d4860c7da418a85ffea7406e1292ab410454b.yml │ │ │ │ │ │ ├── RequestGroup │ │ │ │ │ │ │ └── fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249.yml │ │ │ │ │ │ └── Workspace │ │ │ │ │ │ │ └── wrk_012d4860c7da418a85ffea7406e1292a.yml │ │ │ │ │ └── .insorc │ │ │ │ ├── git-repo │ │ │ │ │ ├── .insomnia │ │ │ │ │ │ ├── ApiSpec │ │ │ │ │ │ │ └── spc_46c5a4a40e83445a9bd9d9758b86c16c.yml │ │ │ │ │ │ ├── Environment │ │ │ │ │ │ │ ├── env_ca046a738f001eb3090261a537b1b78f86c2094c.yml │ │ │ │ │ │ │ └── env_env_ca046a738f001eb3090261a537b1b78f86c2094c_sub.yml │ │ │ │ │ │ ├── Request │ │ │ │ │ │ │ ├── req_wrk_012d4860c7da418a85ffea7406e1292a21946b60.yml │ │ │ │ │ │ │ └── req_wrk_012d4860c7da418a85ffea7406e1292ab410454b.yml │ │ │ │ │ │ ├── RequestGroup │ │ │ │ │ │ │ └── fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249.yml │ │ │ │ │ │ ├── UnitTest │ │ │ │ │ │ │ ├── ut_6b214a8cd07046f2a8f43237ca913c73.yml │ │ │ │ │ │ │ ├── ut_8c0c020fb9e341c2a3162e723445faf1.yml │ │ │ │ │ │ │ ├── ut_8fc42ec7f82a45d09e691ddfe212fd85.yml │ │ │ │ │ │ │ └── ut_97a197104e83454ebf5f4e0dc0ba4bc6.yml │ │ │ │ │ │ ├── UnitTestSuite │ │ │ │ │ │ │ ├── uts_7f0f85548b0147f4ba6b5e442d137613.yml │ │ │ │ │ │ │ └── uts_fe901c6565044f00aa620d3fe47f443f.yml │ │ │ │ │ │ └── Workspace │ │ │ │ │ │ │ └── wrk_012d4860c7da418a85ffea7406e1292a.yml │ │ │ │ │ └── .insorc │ │ │ │ ├── insomnia-v4 │ │ │ │ │ ├── empty.yaml │ │ │ │ │ ├── insomnia_v4.json │ │ │ │ │ ├── insomnia_v4.yaml │ │ │ │ │ ├── malformed.yaml │ │ │ │ │ ├── no-export-format.yaml │ │ │ │ │ └── v3-export-format.yaml │ │ │ │ ├── insomnia-v5 │ │ │ │ │ ├── example-spec.yaml │ │ │ │ │ └── with-tests.yaml │ │ │ │ └── nedb │ │ │ │ │ ├── insomnia.ApiSpec.db │ │ │ │ │ ├── insomnia.CaCertificate.db │ │ │ │ │ ├── insomnia.ClientCertificate.db │ │ │ │ │ ├── insomnia.Environment.db │ │ │ │ │ ├── insomnia.Request.db │ │ │ │ │ ├── insomnia.RequestGroup.db │ │ │ │ │ ├── insomnia.Settings.db │ │ │ │ │ ├── insomnia.UnitTest.db │ │ │ │ │ ├── insomnia.UnitTestSuite.db │ │ │ │ │ └── insomnia.Workspace.db │ │ │ ├── index.ts │ │ │ └── models │ │ │ │ ├── api-spec.ts │ │ │ │ ├── environment.ts │ │ │ │ ├── types.ts │ │ │ │ ├── unit-test-suite.ts │ │ │ │ ├── util.ts │ │ │ │ └── workspace.ts │ │ ├── examples │ │ │ ├── after-response-failed-test.yml │ │ │ ├── after-response.yml │ │ │ ├── folder-inheritance-document.yml │ │ │ ├── global-environment.yml │ │ │ ├── minimal.yml │ │ │ ├── script-add-header.yml │ │ │ ├── script-folder-environments.yml │ │ │ ├── script-require.yml │ │ │ ├── script-send-request.yml │ │ │ ├── set-next-request.yml │ │ │ ├── three-requests.yml │ │ │ └── with-missing-env-vars.yml │ │ ├── fixtures │ │ │ ├── .insorc-blank.yaml │ │ │ ├── .insorc-from-file-example.yaml │ │ │ ├── .insorc-from-git-example.yaml │ │ │ ├── .insorc-missing-properties.yaml │ │ │ ├── .insorc-test.yaml │ │ │ ├── .insorc-with-scripts.yaml │ │ │ └── .insorc.yaml │ │ ├── get-options.test.ts │ │ ├── index.ts │ │ ├── reporter │ │ │ ├── __snapshots__ │ │ │ │ └── index.test.ts.snap │ │ │ ├── index.test.ts │ │ │ └── index.ts │ │ └── scripts │ │ │ ├── artifacts.ts │ │ │ ├── codesign-entitlements.md │ │ │ ├── codesign.entitlements │ │ │ ├── macos-pkg.sh │ │ │ └── verify-pkg.js │ ├── tsconfig.json │ └── vitest.config.ts ├── insomnia-scripting-environment │ ├── package.json │ ├── src │ │ └── objects │ │ │ ├── __tests__ │ │ │ ├── auth.test.ts │ │ │ ├── certificates.test.ts │ │ │ ├── cookies.test.ts │ │ │ ├── environments.test.ts │ │ │ ├── execution.test.ts │ │ │ ├── headers.test.ts │ │ │ ├── properties.test.ts │ │ │ ├── proxy-configs.test.ts │ │ │ ├── request-info.test.ts │ │ │ ├── request.test.ts │ │ │ ├── response.test.ts │ │ │ ├── urls.test.ts │ │ │ └── variables.test.ts │ │ │ ├── async_objects.ts │ │ │ ├── auth.ts │ │ │ ├── certificates.ts │ │ │ ├── collection.ts │ │ │ ├── console.ts │ │ │ ├── cookies.ts │ │ │ ├── environments.ts │ │ │ ├── execution.ts │ │ │ ├── folders.ts │ │ │ ├── headers.ts │ │ │ ├── index.ts │ │ │ ├── insomnia.ts │ │ │ ├── interfaces.ts │ │ │ ├── interpolator.ts │ │ │ ├── properties.ts │ │ │ ├── proxy-configs.ts │ │ │ ├── request-info.ts │ │ │ ├── request.ts │ │ │ ├── response.ts │ │ │ ├── send-request.ts │ │ │ ├── test.ts │ │ │ ├── urls.ts │ │ │ ├── utils.ts │ │ │ └── variables.ts │ ├── tsconfig.json │ └── vitest.config.ts ├── insomnia-smoke-test │ ├── .gitignore │ ├── README.md │ ├── docs │ │ └── imgs │ │ │ ├── artifacts.png │ │ │ ├── editor.png │ │ │ ├── playwright-inspector.jpg │ │ │ ├── playwright-trace.jpg │ │ │ └── refresh.png │ ├── fixtures │ │ ├── after-response-collection.yaml │ │ ├── certificates │ │ │ ├── client.crt │ │ │ ├── client.csr │ │ │ ├── client.key │ │ │ ├── fake.pfx │ │ │ ├── localhost-key.pem │ │ │ ├── localhost.pem │ │ │ ├── rootCA-key.pem │ │ │ ├── rootCA.pem │ │ │ └── rootCA.srl │ │ ├── chained-responses.yaml │ │ ├── client-certs.yaml │ │ ├── collection-for-global-environments.yaml │ │ ├── constants.ts │ │ ├── environments.yaml │ │ ├── files │ │ │ ├── dummy.csv │ │ │ ├── dummy.pdf │ │ │ ├── dummy.xml │ │ │ ├── rawfile.txt │ │ │ └── runner-data.json │ │ ├── global-environment.yaml │ │ ├── graphql.yaml │ │ ├── grpc-mtls.yaml │ │ ├── grpc.yaml │ │ ├── header-templates.yaml │ │ ├── import-from-url.yaml │ │ ├── import │ │ │ ├── import-content-type-from-postman.json │ │ │ └── multiple-workspaces.yaml │ │ ├── inso-nedb │ │ │ ├── insomnia.ApiSpec.db │ │ │ ├── insomnia.Environment.db │ │ │ ├── insomnia.GrpcRequest.db │ │ │ ├── insomnia.Project.db │ │ │ ├── insomnia.ProtoDirectory.db │ │ │ ├── insomnia.ProtoFile.db │ │ │ ├── insomnia.Request.db │ │ │ ├── insomnia.RequestGroup.db │ │ │ ├── insomnia.UnitTest.db │ │ │ ├── insomnia.UnitTestSuite.db │ │ │ └── insomnia.Workspace.db │ │ ├── insomnia-legacy-db │ │ │ ├── insomnia.ApiSpec.db │ │ │ ├── insomnia.CaCertificate.db │ │ │ ├── insomnia.ClientCertificate.db │ │ │ ├── insomnia.CookieJar.db │ │ │ ├── insomnia.Environment.db │ │ │ ├── insomnia.GitRepository.db │ │ │ ├── insomnia.GrpcRequest.db │ │ │ ├── insomnia.GrpcRequestMeta.db │ │ │ ├── insomnia.OAuth2Token.db │ │ │ ├── insomnia.PluginData.db │ │ │ ├── insomnia.Project.db │ │ │ ├── insomnia.ProtoDirectory.db │ │ │ ├── insomnia.ProtoFile.db │ │ │ ├── insomnia.Request.db │ │ │ ├── insomnia.RequestGroup.db │ │ │ ├── insomnia.RequestGroupMeta.db │ │ │ ├── insomnia.RequestMeta.db │ │ │ ├── insomnia.RequestVersion.db │ │ │ ├── insomnia.Response.db │ │ │ ├── insomnia.Settings.db │ │ │ ├── insomnia.Stats.db │ │ │ ├── insomnia.UnitTest.db │ │ │ ├── insomnia.UnitTestResult.db │ │ │ ├── insomnia.UnitTestSuite.db │ │ │ ├── insomnia.WebSocketPayload.db │ │ │ ├── insomnia.WebSocketRequest.db │ │ │ ├── insomnia.WebSocketResponse.db │ │ │ ├── insomnia.Workspace.db │ │ │ └── insomnia.WorkspaceMeta.db │ │ ├── insomnia4-update.yaml │ │ ├── insomnia4.yaml │ │ ├── mock-server.yaml │ │ ├── oauth.yaml │ │ ├── openapi3.yaml │ │ ├── pre-request-collection.yaml │ │ ├── route_guide.bin │ │ ├── runner-collection.yaml │ │ ├── script-global-environment.yaml │ │ ├── simple.yaml │ │ ├── smoke-test-collection.yaml │ │ ├── swagger2.yaml │ │ ├── unit-test.yaml │ │ ├── vault-collection.yaml │ │ ├── vault-environment.yaml │ │ └── websockets.yaml │ ├── package.json │ ├── playwright.config.ts │ ├── playwright │ │ ├── paths.ts │ │ └── test.ts │ ├── server │ │ ├── basic-auth.ts │ │ ├── github-api.ts │ │ ├── gitlab-api.ts │ │ ├── graphql.ts │ │ ├── grpc.ts │ │ ├── index.ts │ │ ├── insomnia-api.ts │ │ ├── mtls.ts │ │ ├── oauth.ts │ │ └── websocket.ts │ └── tests │ │ ├── critical │ │ ├── backup.test.ts │ │ ├── bundling.test.ts │ │ ├── certificates.test.ts │ │ └── scratchpad.test.ts │ │ ├── migration │ │ └── local-to-cloud-projects.test.ts │ │ └── smoke │ │ ├── after-response-script-features.test.ts │ │ ├── analytics.test.ts │ │ ├── app.test.ts │ │ ├── chained-responses.test.ts │ │ ├── command-palette.test.ts │ │ ├── cookie-editor-interactions.test.ts │ │ ├── dashboard-interactions.test.ts │ │ ├── debug-sidebar-interactions.test.ts │ │ ├── design-document-naming.test.ts │ │ ├── design-interactions.test.ts │ │ ├── environment-editor-interactions.test.ts │ │ ├── global-environments.test.ts │ │ ├── graphql.test.ts │ │ ├── grpc-interactions.test.ts │ │ ├── grpc-mtls.test.ts │ │ ├── grpc.test.ts │ │ ├── header-templates.test.ts │ │ ├── import-from-url.test.ts │ │ ├── import.test.ts │ │ ├── insomnia-tab.test.ts │ │ ├── insomnia-vault.test.ts │ │ ├── invite.test.ts │ │ ├── mock.test.ts │ │ ├── mtls.test.ts │ │ ├── oauth.test.ts │ │ ├── openapi.test.ts │ │ ├── plugins-interactions.test.ts │ │ ├── pre-request-script-features.test.ts │ │ ├── pre-request-script-window.test.ts │ │ ├── preferences-interactions.test.ts │ │ ├── request-pane-tab.test.ts │ │ ├── runner.test.ts │ │ ├── test-utils.ts │ │ └── websocket.test.ts ├── insomnia-testing │ ├── .gitignore │ ├── package.json │ ├── src │ │ ├── generate │ │ │ ├── fixtures │ │ │ │ ├── 01_empty.input.json │ │ │ │ ├── 01_empty.output.js │ │ │ │ ├── 02_empty-suite.input.json │ │ │ │ ├── 02_empty-suite.output.js │ │ │ │ ├── 03_basic-suite.input.json │ │ │ │ ├── 03_basic-suite.output.js │ │ │ │ ├── 04_nested-suite.input.json │ │ │ │ ├── 04_nested-suite.output.js │ │ │ │ ├── 05_complex-suite.input.json │ │ │ │ └── 05_complex-suite.output.js │ │ │ ├── generate.test.ts │ │ │ ├── generate.ts │ │ │ ├── index.ts │ │ │ ├── util.test.ts │ │ │ └── util.ts │ │ ├── index.ts │ │ ├── integration │ │ │ └── integration.test.ts │ │ └── run │ │ │ ├── entities.ts │ │ │ ├── index.ts │ │ │ ├── insomnia.ts │ │ │ ├── javascript-reporter.ts │ │ │ ├── run.test.ts │ │ │ └── run.ts │ └── tsconfig.json └── insomnia │ ├── .gitignore │ ├── README.md │ ├── bin │ └── yarn-standalone.js │ ├── config │ └── config.json │ ├── customSign.js │ ├── electron-builder.config.js │ ├── esbuild.main.ts │ ├── package.json │ ├── postcss.config.js │ ├── scripts │ └── build.ts │ ├── send-request │ └── electron │ │ ├── index.js │ │ └── package.json │ ├── setup-vitest.ts │ ├── src │ ├── __mocks__ │ │ ├── @getinsomnia │ │ │ └── node-libcurl.ts │ │ ├── @grpc │ │ │ └── grpc-js.ts │ │ ├── @sentry │ │ │ └── electron.ts │ │ ├── electron.ts │ │ └── node-forge.ts │ ├── __tests__ │ │ └── install-plugin.test.ts │ ├── account │ │ ├── __tests__ │ │ │ └── crypt.test.ts │ │ ├── crypt.ts │ │ └── session.ts │ ├── common │ │ ├── __fixtures__ │ │ │ ├── curl │ │ │ │ └── complex-input.sh │ │ │ ├── har │ │ │ │ └── test-response.json │ │ │ ├── nestedfolders.ts │ │ │ ├── openapi │ │ │ │ └── endpoint-security-input.yaml │ │ │ ├── postman │ │ │ │ └── aws-signature-auth-v2_0-input.json │ │ │ └── prettify │ │ │ │ ├── escaped-characters-input.json │ │ │ │ ├── escaped-characters-output.json │ │ │ │ ├── extra-whitespace-input.json │ │ │ │ ├── extra-whitespace-output.json │ │ │ │ ├── minimal-whitespace-input.json │ │ │ │ ├── minimal-whitespace-output.json │ │ │ │ ├── nunjucks-input.json │ │ │ │ ├── nunjucks-output.json │ │ │ │ ├── precision-input.json │ │ │ │ ├── precision-output.json │ │ │ │ ├── root-array-input.json │ │ │ │ ├── root-array-output.json │ │ │ │ ├── root-string-input.json │ │ │ │ ├── root-string-output.json │ │ │ │ ├── trailing-comma-input.json │ │ │ │ ├── trailing-comma-output.json │ │ │ │ ├── unquoted-strings-input.json │ │ │ │ └── unquoted-strings-output.json │ │ ├── __mocks__ │ │ │ └── render.ts │ │ ├── __tests__ │ │ │ ├── api-specs.test.ts │ │ │ ├── common-headers.test.ts │ │ │ ├── constants.test.ts │ │ │ ├── cookies.test.ts │ │ │ ├── database.test.ts │ │ │ ├── electron-storage.test.ts │ │ │ ├── export.test.ts │ │ │ ├── har.test.ts │ │ │ ├── import.test.ts │ │ │ ├── insomnia-v5.test.ts │ │ │ ├── misc.test.ts │ │ │ ├── render.test.ts │ │ │ ├── sorting.test.ts │ │ │ └── strings.test.ts │ │ ├── api-specs.ts │ │ ├── async-array-helpers.ts │ │ ├── common-headers.ts │ │ ├── constants.ts │ │ ├── cookies.ts │ │ ├── database.ts │ │ ├── documentation.ts │ │ ├── export.tsx │ │ ├── get-workspace-label.ts │ │ ├── har.ts │ │ ├── hotkeys.ts │ │ ├── import-v5-parser.ts │ │ ├── import.ts │ │ ├── insomnia-v5.ts │ │ ├── keyboard-keys.ts │ │ ├── log.ts │ │ ├── markdown-to-html.ts │ │ ├── misc.ts │ │ ├── render.ts │ │ ├── select-file-or-folder.ts │ │ ├── send-request.ts │ │ ├── sentry.ts │ │ ├── settings.ts │ │ ├── sorting.ts │ │ └── strings.ts │ ├── cpp │ │ ├── README.md │ │ ├── insomnia.cpp │ │ ├── manifest.txt │ │ ├── resource.h │ │ └── resources.rc │ ├── datasets │ │ ├── access-token-urls.ts │ │ ├── authorization-urls.ts │ │ ├── charsets.ts │ │ ├── content-types.ts │ │ ├── encodings.ts │ │ └── header-names.ts │ ├── hidden-window-preload.ts │ ├── hidden-window.html │ ├── hidden-window.ts │ ├── icons │ │ ├── background.png │ │ ├── icon.icns │ │ ├── icon.ico │ │ └── install-spinner.gif │ ├── index.html │ ├── main.development.ts │ ├── main │ │ ├── analytics.ts │ │ ├── api.protocol.ts │ │ ├── authorizeUserInWindow.ts │ │ ├── backup.ts │ │ ├── electron-storage.ts │ │ ├── git-service.ts │ │ ├── install-plugin.ts │ │ ├── ipc │ │ │ ├── __tests__ │ │ │ │ ├── __snapshots__ │ │ │ │ │ └── extractPostmanDataDump.test.ts.snap │ │ │ │ ├── automock.test.ts │ │ │ │ ├── extractPostmanDataDump.test.ts │ │ │ │ ├── grpc.test.ts │ │ │ │ └── multi_postman_data_dump.zip │ │ │ ├── automock.ts │ │ │ ├── electron.ts │ │ │ ├── extractPostmanDataDump.ts │ │ │ ├── grpc.ts │ │ │ ├── main.ts │ │ │ └── secret-storage.ts │ │ ├── network │ │ │ ├── curl.ts │ │ │ ├── libcurl-promise.ts │ │ │ ├── multipart.ts │ │ │ ├── parse-header-strings.ts │ │ │ ├── request-timing.ts │ │ │ └── websocket.ts │ │ ├── proxy.ts │ │ ├── sentry.ts │ │ ├── squirrel-startup.ts │ │ ├── templating-worker-database.ts │ │ ├── updates.ts │ │ └── window-utils.ts │ ├── models │ │ ├── __mocks__ │ │ │ └── uuid.ts │ │ ├── __schemas__ │ │ │ └── model-schemas.ts │ │ ├── __tests__ │ │ │ ├── grpc-request-meta.test.ts │ │ │ ├── grpc-request.test.ts │ │ │ ├── index.test.ts │ │ │ ├── proto-file.test.ts │ │ │ ├── request-meta.test.ts │ │ │ ├── request.test.ts │ │ │ ├── response.test.ts │ │ │ └── workspace.test.ts │ │ ├── api-spec.ts │ │ ├── ca-certificate.ts │ │ ├── client-certificate.ts │ │ ├── cookie-jar.ts │ │ ├── environment.ts │ │ ├── git-credentials.ts │ │ ├── git-repository.ts │ │ ├── grpc-request-meta.ts │ │ ├── grpc-request.ts │ │ ├── helpers │ │ │ ├── __mocks__ │ │ │ │ └── settings.ts │ │ │ ├── __tests__ │ │ │ │ ├── is-model.test.ts │ │ │ │ ├── project.test.ts │ │ │ │ └── query-all-workspace-urls.test.ts │ │ │ ├── project.ts │ │ │ ├── query-all-workspace-urls.ts │ │ │ └── request-operations.ts │ │ ├── index.ts │ │ ├── mock-route.ts │ │ ├── mock-server.ts │ │ ├── o-auth-2-token.ts │ │ ├── organization.ts │ │ ├── plugin-data.ts │ │ ├── project.ts │ │ ├── proto-directory.ts │ │ ├── proto-file.ts │ │ ├── request-group-meta.ts │ │ ├── request-group.ts │ │ ├── request-meta.ts │ │ ├── request-version.ts │ │ ├── request.ts │ │ ├── response.ts │ │ ├── runner-test-result.ts │ │ ├── settings.ts │ │ ├── stats.ts │ │ ├── unit-test-result.ts │ │ ├── unit-test-suite.ts │ │ ├── unit-test.ts │ │ ├── user-session.ts │ │ ├── websocket-payload.ts │ │ ├── websocket-request.ts │ │ ├── websocket-response.ts │ │ ├── workspace-meta.ts │ │ └── workspace.ts │ ├── network │ │ ├── __tests__ │ │ │ ├── authentication.test.ts │ │ │ ├── certificate.test.ts │ │ │ ├── is-url-matched-in-no-proxy-rule.test.ts │ │ │ ├── multipart.test.ts │ │ │ ├── network.test.ts │ │ │ ├── parse-header-strings.test.ts │ │ │ ├── testfile.txt │ │ │ └── url-matches-cert-host.test.ts │ │ ├── api-key │ │ │ └── constants.ts │ │ ├── authentication.ts │ │ ├── basic-auth │ │ │ ├── __tests__ │ │ │ │ └── get-header.test.ts │ │ │ └── get-header.ts │ │ ├── bearer-auth │ │ │ ├── __tests__ │ │ │ │ └── get-header.test.ts │ │ │ └── get-header.ts │ │ ├── cancellation.ts │ │ ├── certificate.ts │ │ ├── concurrency.ts │ │ ├── grpc │ │ │ ├── __fixtures__ │ │ │ │ ├── library │ │ │ │ │ ├── hello.proto │ │ │ │ │ ├── nested │ │ │ │ │ │ └── time │ │ │ │ │ │ │ └── time.proto │ │ │ │ │ ├── resources │ │ │ │ │ │ └── file.txt │ │ │ │ │ ├── root.proto │ │ │ │ │ ├── route_guide.proto │ │ │ │ │ └── route_guide_db.json │ │ │ │ └── simulate-error │ │ │ │ │ ├── 1.proto │ │ │ │ │ ├── 2.proto │ │ │ │ │ ├── folder │ │ │ │ │ └── 5.proto │ │ │ │ │ └── nested │ │ │ │ │ ├── 3.proto │ │ │ │ │ ├── 4.proto │ │ │ │ │ └── should-error.proto │ │ │ ├── __mocks__ │ │ │ │ └── index.ts │ │ │ ├── __tests__ │ │ │ │ ├── parse-grpc-url.test.ts │ │ │ │ └── write-proto-file.test.ts │ │ │ ├── parse-grpc-url.ts │ │ │ ├── proto-directory-loader.tsx │ │ │ └── write-proto-file.ts │ │ ├── is-url-matched-in-no-proxy-rule.ts │ │ ├── network.ts │ │ ├── o-auth-1 │ │ │ ├── constants.ts │ │ │ └── get-token.ts │ │ ├── o-auth-2 │ │ │ ├── constants.ts │ │ │ └── get-token.ts │ │ ├── set-cookie-util.ts │ │ ├── unit-test-feature.ts │ │ └── url-matches-cert-host.ts │ ├── plugins │ │ ├── context │ │ │ ├── __fixtures__ │ │ │ │ └── basic-import.json │ │ │ ├── __tests__ │ │ │ │ ├── app.test.ts │ │ │ │ ├── request.test.ts │ │ │ │ ├── response.test.ts │ │ │ │ └── store.test.ts │ │ │ ├── app.tsx │ │ │ ├── data.ts │ │ │ ├── index.ts │ │ │ ├── network.ts │ │ │ ├── request.ts │ │ │ ├── response.ts │ │ │ └── store.ts │ │ ├── create.ts │ │ ├── index.ts │ │ ├── misc.test.ts │ │ ├── misc.ts │ │ ├── themes.ts │ │ └── themes │ │ │ ├── colorblind-dark.ts │ │ │ ├── default.ts │ │ │ ├── gruvbox.ts │ │ │ ├── high-contrast-light.ts │ │ │ ├── hyper.ts │ │ │ ├── legacy.ts │ │ │ ├── material.ts │ │ │ ├── one-dark.ts │ │ │ ├── one-light.ts │ │ │ ├── purple.ts │ │ │ ├── railscasts.ts │ │ │ ├── simple-dark.ts │ │ │ ├── simple-light.ts │ │ │ ├── solarized-dark.ts │ │ │ ├── solarized-light.ts │ │ │ ├── solarized.ts │ │ │ ├── studio-dark.ts │ │ │ └── studio-light.ts │ ├── preload.ts │ ├── renderer.ts │ ├── requireInterceptor.ts │ ├── scriptExecutor.ts │ ├── static │ │ ├── entitlements.mac.inherit.plist │ │ └── insomnia-core-logo_16x.png │ ├── sync │ │ ├── __schemas__ │ │ │ └── type-schemas.ts │ │ ├── __tests__ │ │ │ └── ignore-keys.test.ts │ │ ├── delta │ │ │ ├── __tests__ │ │ │ │ ├── diff.test.ts │ │ │ │ └── patch.test.ts │ │ │ ├── diff.ts │ │ │ └── patch.ts │ │ ├── git │ │ │ ├── __tests__ │ │ │ │ ├── git-vcs.test.ts │ │ │ │ ├── mem-client.test.ts │ │ │ │ ├── ne-db-client.test.ts │ │ │ │ ├── parse-git-path.test.ts │ │ │ │ ├── routable-fs-client.test.ts │ │ │ │ ├── util.ts │ │ │ │ └── utils.test.ts │ │ │ ├── fs-client.ts │ │ │ ├── git-vcs.ts │ │ │ ├── http-client.ts │ │ │ ├── mem-client.ts │ │ │ ├── ne-db-client.ts │ │ │ ├── parse-git-path.ts │ │ │ ├── path-sep.ts │ │ │ ├── project-ne-db-client.ts │ │ │ ├── project-routable-fs-client.ts │ │ │ ├── routable-fs-client.ts │ │ │ ├── shallow-clone.ts │ │ │ ├── stat.ts │ │ │ ├── system-error.ts │ │ │ └── utils.ts │ │ ├── ignore-keys.ts │ │ ├── lib │ │ │ ├── __tests__ │ │ │ │ └── deterministicStringify.test.ts │ │ │ └── deterministicStringify.ts │ │ ├── store │ │ │ ├── __tests__ │ │ │ │ └── index.test.ts │ │ │ ├── drivers │ │ │ │ ├── base.ts │ │ │ │ ├── file-system-driver.ts │ │ │ │ ├── graceful-rename.ts │ │ │ │ └── memory-driver.ts │ │ │ ├── hooks │ │ │ │ ├── __tests__ │ │ │ │ │ └── compress.test.ts │ │ │ │ └── compress.ts │ │ │ └── index.ts │ │ ├── types.ts │ │ └── vcs │ │ │ ├── __tests__ │ │ │ ├── util.test.ts │ │ │ └── vcs.test.ts │ │ │ ├── initialize-backend-project.ts │ │ │ ├── insomnia-sync.ts │ │ │ ├── migrate-projects-into-organization.ts │ │ │ ├── normalize-backend-project-team.ts │ │ │ ├── pull-backend-project.ts │ │ │ ├── util.ts │ │ │ └── vcs.ts │ ├── templating │ │ ├── __tests__ │ │ │ └── utils.test.ts │ │ ├── base-extension-worker.ts │ │ ├── base-extension.ts │ │ ├── index.ts │ │ ├── render-error.ts │ │ ├── third_party │ │ │ └── objectPath.ts │ │ ├── types.ts │ │ ├── utils.ts │ │ └── worker.ts │ ├── ui │ │ ├── analytics.ts │ │ ├── auth-session-provider.ts │ │ ├── components │ │ │ ├── app-loading-indicator.tsx │ │ │ ├── assets │ │ │ │ ├── icn-arrow-right.svg │ │ │ │ ├── icn-bitbucket-logo.svg │ │ │ │ ├── icn-brackets.svg │ │ │ │ ├── icn-bug.svg │ │ │ │ ├── icn-burger-menu.svg │ │ │ │ ├── icn-checkmark-circle.svg │ │ │ │ ├── icn-checkmark.svg │ │ │ │ ├── icn-chevron-down.svg │ │ │ │ ├── icn-chevron-up.svg │ │ │ │ ├── icn-clock.svg │ │ │ │ ├── icn-cookie.svg │ │ │ │ ├── icn-disconnected.svg │ │ │ │ ├── icn-drafting-compass.svg │ │ │ │ ├── icn-drag-grip.svg │ │ │ │ ├── icn-elevator.svg │ │ │ │ ├── icn-ellipsis-circle.svg │ │ │ │ ├── icn-ellipsis.svg │ │ │ │ ├── icn-empty.svg │ │ │ │ ├── icn-errors.svg │ │ │ │ ├── icn-file.svg │ │ │ │ ├── icn-folder-open.svg │ │ │ │ ├── icn-folder.svg │ │ │ │ ├── icn-gear.svg │ │ │ │ ├── icn-git-branch.svg │ │ │ │ ├── icn-github-logo.svg │ │ │ │ ├── icn-gitlab-logo.svg │ │ │ │ ├── icn-globe.svg │ │ │ │ ├── icn-gui.svg │ │ │ │ ├── icn-heart.svg │ │ │ │ ├── icn-home.svg │ │ │ │ ├── icn-indentation.svg │ │ │ │ ├── icn-info.svg │ │ │ │ ├── icn-jump.svg │ │ │ │ ├── icn-key.svg │ │ │ │ ├── icn-laptop.svg │ │ │ │ ├── icn-minus-circle-fill.svg │ │ │ │ ├── icn-minus-circle.svg │ │ │ │ ├── icn-placeholder.svg │ │ │ │ ├── icn-play.svg │ │ │ │ ├── icn-plus.svg │ │ │ │ ├── icn-prohibited.svg │ │ │ │ ├── icn-question-fill.svg │ │ │ │ ├── icn-question.svg │ │ │ │ ├── icn-receive.svg │ │ │ │ ├── icn-search.svg │ │ │ │ ├── icn-sec-cert.svg │ │ │ │ ├── icn-sent.svg │ │ │ │ ├── icn-success.svg │ │ │ │ ├── icn-sync.svg │ │ │ │ ├── icn-system-event.svg │ │ │ │ ├── icn-trashcan.svg │ │ │ │ ├── icn-triangle.svg │ │ │ │ ├── icn-user.svg │ │ │ │ ├── icn-vial.svg │ │ │ │ ├── icn-warning-circle.svg │ │ │ │ ├── icn-warning.svg │ │ │ │ ├── icn-x.svg │ │ │ │ └── svgr │ │ │ │ │ ├── IcnArrowRight.tsx │ │ │ │ │ ├── IcnBitbucketLogo.tsx │ │ │ │ │ ├── IcnBrackets.tsx │ │ │ │ │ ├── IcnBug.tsx │ │ │ │ │ ├── IcnBurgerMenu.tsx │ │ │ │ │ ├── IcnCheckmark.tsx │ │ │ │ │ ├── IcnCheckmarkCircle.tsx │ │ │ │ │ ├── IcnChevronDown.tsx │ │ │ │ │ ├── IcnChevronUp.tsx │ │ │ │ │ ├── IcnClock.tsx │ │ │ │ │ ├── IcnCookie.tsx │ │ │ │ │ ├── IcnDisconnected.tsx │ │ │ │ │ ├── IcnDraftingCompass.tsx │ │ │ │ │ ├── IcnDragGrip.tsx │ │ │ │ │ ├── IcnElevator.tsx │ │ │ │ │ ├── IcnEllipsis.tsx │ │ │ │ │ ├── IcnEllipsisCircle.tsx │ │ │ │ │ ├── IcnEmpty.tsx │ │ │ │ │ ├── IcnErrors.tsx │ │ │ │ │ ├── IcnFile.tsx │ │ │ │ │ ├── IcnFolder.tsx │ │ │ │ │ ├── IcnFolderOpen.tsx │ │ │ │ │ ├── IcnGear.tsx │ │ │ │ │ ├── IcnGitBranch.tsx │ │ │ │ │ ├── IcnGithubLogo.tsx │ │ │ │ │ ├── IcnGitlabLogo.tsx │ │ │ │ │ ├── IcnGlobe.tsx │ │ │ │ │ ├── IcnGui.tsx │ │ │ │ │ ├── IcnHeart.tsx │ │ │ │ │ ├── IcnHome.tsx │ │ │ │ │ ├── IcnIndentation.tsx │ │ │ │ │ ├── IcnInfo.tsx │ │ │ │ │ ├── IcnJump.tsx │ │ │ │ │ ├── IcnKey.tsx │ │ │ │ │ ├── IcnLaptop.tsx │ │ │ │ │ ├── IcnMinusCircle.tsx │ │ │ │ │ ├── IcnMinusCircleFill.tsx │ │ │ │ │ ├── IcnPlaceholder.tsx │ │ │ │ │ ├── IcnPlay.tsx │ │ │ │ │ ├── IcnPlus.tsx │ │ │ │ │ ├── IcnProhibited.tsx │ │ │ │ │ ├── IcnQuestion.tsx │ │ │ │ │ ├── IcnQuestionFill.tsx │ │ │ │ │ ├── IcnReceive.tsx │ │ │ │ │ ├── IcnSearch.tsx │ │ │ │ │ ├── IcnSecCert.tsx │ │ │ │ │ ├── IcnSent.tsx │ │ │ │ │ ├── IcnSuccess.tsx │ │ │ │ │ ├── IcnSync.tsx │ │ │ │ │ ├── IcnSystemEvent.tsx │ │ │ │ │ ├── IcnTrashcan.tsx │ │ │ │ │ ├── IcnTriangle.tsx │ │ │ │ │ ├── IcnUser.tsx │ │ │ │ │ ├── IcnVial.tsx │ │ │ │ │ ├── IcnWarning.tsx │ │ │ │ │ ├── IcnWarningCircle.tsx │ │ │ │ │ └── IcnX.tsx │ │ │ ├── avatar.tsx │ │ │ ├── base │ │ │ │ ├── copy-button.tsx │ │ │ │ ├── dropdown │ │ │ │ │ ├── dropdown-hint.tsx │ │ │ │ │ ├── dropdown.tsx │ │ │ │ │ ├── index.ts │ │ │ │ │ ├── item-content.tsx │ │ │ │ │ ├── menu-item.tsx │ │ │ │ │ ├── menu-section.tsx │ │ │ │ │ ├── menu.tsx │ │ │ │ │ └── popover.tsx │ │ │ │ ├── file-input-button.tsx │ │ │ │ ├── highlight.tsx │ │ │ │ ├── indeterminate-checkbox.tsx │ │ │ │ ├── link.tsx │ │ │ │ ├── modal-body.tsx │ │ │ │ ├── modal-footer.tsx │ │ │ │ ├── modal-header.tsx │ │ │ │ ├── modal.tsx │ │ │ │ └── prompt-button.tsx │ │ │ ├── buttons │ │ │ │ └── grpc-send-button.tsx │ │ │ ├── check-for-updates-button.tsx │ │ │ ├── codemirror │ │ │ │ ├── base-imports.ts │ │ │ │ ├── code-editor.tsx │ │ │ │ ├── extensions │ │ │ │ │ ├── autocomplete.ts │ │ │ │ │ ├── clickable.ts │ │ │ │ │ └── nunjucks-tags.ts │ │ │ │ ├── lint │ │ │ │ │ ├── javascript-async-lint.ts │ │ │ │ │ └── json-lint.ts │ │ │ │ ├── modes │ │ │ │ │ ├── clojure.ts │ │ │ │ │ ├── curl.ts │ │ │ │ │ ├── nunjucks.ts │ │ │ │ │ └── openapi.ts │ │ │ │ ├── normalizeIrregularWhitespace.ts │ │ │ │ └── one-line-editor.tsx │ │ │ ├── command-palette.tsx │ │ │ ├── design-empty-state.tsx │ │ │ ├── diff-view-editor.tsx │ │ │ ├── document-tab.tsx │ │ │ ├── dropdowns │ │ │ │ ├── auth-dropdown.tsx │ │ │ │ ├── content-type-dropdown.tsx │ │ │ │ ├── dashboard-sort-dropdown.tsx │ │ │ │ ├── dropdown-placement-hacks.ts │ │ │ │ ├── git-project-sync-dropdown.tsx │ │ │ │ ├── git-sync-dropdown.tsx │ │ │ │ ├── grpc-method-dropdown │ │ │ │ │ └── grpc-method-dropdown.tsx │ │ │ │ ├── method-dropdown.tsx │ │ │ │ ├── preview-mode-dropdown.tsx │ │ │ │ ├── project-dropdown.tsx │ │ │ │ ├── request-actions-dropdown.tsx │ │ │ │ ├── request-group-actions-dropdown.tsx │ │ │ │ ├── response-history-dropdown.tsx │ │ │ │ ├── sync-dropdown.tsx │ │ │ │ ├── websocket-preview-mode.tsx │ │ │ │ ├── workspace-card-dropdown.tsx │ │ │ │ ├── workspace-dropdown.tsx │ │ │ │ └── workspace-sync-dropdown.tsx │ │ │ ├── editable-input.tsx │ │ │ ├── editors │ │ │ │ ├── __tests__ │ │ │ │ │ └── environment-editor.test.ts │ │ │ │ ├── auth │ │ │ │ │ ├── api-key-auth.tsx │ │ │ │ │ ├── asap-auth.tsx │ │ │ │ │ ├── auth-wrapper.tsx │ │ │ │ │ ├── aws-auth.tsx │ │ │ │ │ ├── basic-auth.tsx │ │ │ │ │ ├── bearer-auth.tsx │ │ │ │ │ ├── components │ │ │ │ │ │ ├── auth-accordion.tsx │ │ │ │ │ │ ├── auth-enabled-row.tsx │ │ │ │ │ │ ├── auth-input-row.tsx │ │ │ │ │ │ ├── auth-private-key-row.tsx │ │ │ │ │ │ ├── auth-row.tsx │ │ │ │ │ │ ├── auth-select-row.tsx │ │ │ │ │ │ ├── auth-table-body.tsx │ │ │ │ │ │ └── auth-toggle-row.tsx │ │ │ │ │ ├── digest-auth.tsx │ │ │ │ │ ├── hawk-auth.tsx │ │ │ │ │ ├── netrc-auth.tsx │ │ │ │ │ ├── ntlm-auth.tsx │ │ │ │ │ ├── o-auth-1-auth.tsx │ │ │ │ │ └── o-auth-2-auth.tsx │ │ │ │ ├── body │ │ │ │ │ ├── body-editor.tsx │ │ │ │ │ ├── file-editor.tsx │ │ │ │ │ ├── form-editor.tsx │ │ │ │ │ ├── graph-ql-editor.tsx │ │ │ │ │ ├── prettify-graphql.mjs │ │ │ │ │ ├── raw-editor.tsx │ │ │ │ │ └── url-encoded-editor.tsx │ │ │ │ ├── environment-editor.tsx │ │ │ │ ├── environment-key-value-editor │ │ │ │ │ ├── key-value-editor.tsx │ │ │ │ │ └── password-input.tsx │ │ │ │ ├── environment-utils.tsx │ │ │ │ ├── mock-response-extractor.tsx │ │ │ │ ├── mock-response-headers-editor.tsx │ │ │ │ ├── request-headers-editor.tsx │ │ │ │ ├── request-parameters-editor.tsx │ │ │ │ └── request-script-editor.tsx │ │ │ ├── encoding-picker.tsx │ │ │ ├── environment-picker.tsx │ │ │ ├── error-boundary.tsx │ │ │ ├── example-openapi-specs.ts │ │ │ ├── git-credentials │ │ │ │ ├── custom-repository-settings-form.tsx │ │ │ │ ├── github-repository-select.tsx │ │ │ │ ├── github-repository-settings-form.tsx │ │ │ │ └── gitlab-repository-settings-form.tsx │ │ │ ├── github-app-config-link.tsx │ │ │ ├── github-stars-button.tsx │ │ │ ├── graph-ql-explorer │ │ │ │ ├── graph-ql-default-value.tsx │ │ │ │ ├── graph-ql-explorer-arg-links.tsx │ │ │ │ ├── graph-ql-explorer-enum.tsx │ │ │ │ ├── graph-ql-explorer-field-link.tsx │ │ │ │ ├── graph-ql-explorer-field.tsx │ │ │ │ ├── graph-ql-explorer-fields-list.tsx │ │ │ │ ├── graph-ql-explorer-schema.tsx │ │ │ │ ├── graph-ql-explorer-search-results.tsx │ │ │ │ ├── graph-ql-explorer-type-link.tsx │ │ │ │ ├── graph-ql-explorer-type.tsx │ │ │ │ ├── graph-ql-explorer.tsx │ │ │ │ └── graph-ql-types.ts │ │ │ ├── header-invite-button.tsx │ │ │ ├── header-user-button.tsx │ │ │ ├── help-tooltip.tsx │ │ │ ├── hotkey.tsx │ │ │ ├── html-element-wrapper.tsx │ │ │ ├── icon.tsx │ │ │ ├── insomnia-ai-icon.tsx │ │ │ ├── insomnia-icon.tsx │ │ │ ├── key-value-editor │ │ │ │ ├── key-value-editor.tsx │ │ │ │ └── row.tsx │ │ │ ├── keydown-binder.ts │ │ │ ├── markdown-editor.tsx │ │ │ ├── markdown-preview.tsx │ │ │ ├── mocks │ │ │ │ ├── mock-response-pane.tsx │ │ │ │ └── mock-url-bar.tsx │ │ │ ├── modals │ │ │ │ ├── __tests__ │ │ │ │ │ ├── upload-runner-data-modal.test.ts │ │ │ │ │ └── utils.test.tsx │ │ │ │ ├── add-key-combination-modal.tsx │ │ │ │ ├── add-request-to-collection-modal.tsx │ │ │ │ ├── alert-modal.tsx │ │ │ │ ├── ask-modal.tsx │ │ │ │ ├── cli-preview-modal.tsx │ │ │ │ ├── code-prompt-modal.tsx │ │ │ │ ├── cookies-modal.tsx │ │ │ │ ├── error-modal.tsx │ │ │ │ ├── export-requests-modal.tsx │ │ │ │ ├── filter-help-modal.tsx │ │ │ │ ├── generate-code-modal.tsx │ │ │ │ ├── git-branches-modal.tsx │ │ │ │ ├── git-log-modal.tsx │ │ │ │ ├── git-project-branches-modal.tsx │ │ │ │ ├── git-project-log-modal.tsx │ │ │ │ ├── git-project-migration-modal.tsx │ │ │ │ ├── git-project-staging-modal.tsx │ │ │ │ ├── git-repository-settings-modal │ │ │ │ │ ├── git-project-repo-clone-modal.tsx │ │ │ │ │ ├── git-project-repository-settings-modal.tsx │ │ │ │ │ ├── git-repo-clone-modal.tsx │ │ │ │ │ ├── git-repository-settings-modal.tsx │ │ │ │ │ └── index.ts │ │ │ │ ├── git-staging-modal.tsx │ │ │ │ ├── import-modal.tsx │ │ │ │ ├── index.ts │ │ │ │ ├── input-vault-key-modal.tsx │ │ │ │ ├── invite-modal │ │ │ │ │ ├── encryption.ts │ │ │ │ │ ├── invite-form.tsx │ │ │ │ │ ├── invite-modal.tsx │ │ │ │ │ └── organization-member-roles-selector.tsx │ │ │ │ ├── new-workspace-modal.tsx │ │ │ │ ├── nunjucks-modal.tsx │ │ │ │ ├── paste-curl-modal.tsx │ │ │ │ ├── project-modal.tsx │ │ │ │ ├── prompt-modal.tsx │ │ │ │ ├── proto-files-modal.tsx │ │ │ │ ├── request-group-settings-modal.tsx │ │ │ │ ├── request-render-error-modal.tsx │ │ │ │ ├── request-settings-modal.tsx │ │ │ │ ├── response-debug-modal.tsx │ │ │ │ ├── select-modal.tsx │ │ │ │ ├── settings-modal.tsx │ │ │ │ ├── sync-branches-modal.tsx │ │ │ │ ├── sync-delete-modal.tsx │ │ │ │ ├── sync-history-modal.tsx │ │ │ │ ├── sync-merge-modal.tsx │ │ │ │ ├── sync-staging-modal.tsx │ │ │ │ ├── upgrade-modal.tsx │ │ │ │ ├── upload-runner-data-modal.tsx │ │ │ │ ├── utils.ts │ │ │ │ ├── variable-missing-error-modal.tsx │ │ │ │ ├── workspace-certificates-modal.tsx │ │ │ │ ├── workspace-duplicate-modal.tsx │ │ │ │ ├── workspace-environments-edit-modal.tsx │ │ │ │ ├── workspace-settings-modal.tsx │ │ │ │ └── wrapper-modal.tsx │ │ │ ├── organization-avatar.tsx │ │ │ ├── panes │ │ │ │ ├── blank-pane.tsx │ │ │ │ ├── empty-state-pane.tsx │ │ │ │ ├── grpc-request-pane.tsx │ │ │ │ ├── grpc-response-pane.tsx │ │ │ │ ├── no-project-view.tsx │ │ │ │ ├── pane.tsx │ │ │ │ ├── placeholder-request-pane.tsx │ │ │ │ ├── placeholder-response-pane.tsx │ │ │ │ ├── request-group-pane.tsx │ │ │ │ ├── request-pane.tsx │ │ │ │ ├── request-test-result-pane.tsx │ │ │ │ ├── response-pane.tsx │ │ │ │ ├── runner-result-history-pane.tsx │ │ │ │ └── runner-test-result-pane.tsx │ │ │ ├── password-input.tsx │ │ │ ├── present-users.tsx │ │ │ ├── project │ │ │ │ ├── project-empty-view.tsx │ │ │ │ └── project-settings-form.tsx │ │ │ ├── proto-file │ │ │ │ └── proto-file-list.tsx │ │ │ ├── rendered-query-string.tsx │ │ │ ├── rendered-text.tsx │ │ │ ├── request-url-bar.tsx │ │ │ ├── response-timer.tsx │ │ │ ├── settings │ │ │ │ ├── ai.tsx │ │ │ │ ├── boolean-setting.tsx │ │ │ │ ├── create-plugin-modal.tsx │ │ │ │ ├── enum-setting.tsx │ │ │ │ ├── general.tsx │ │ │ │ ├── import-export.tsx │ │ │ │ ├── masked-setting.tsx │ │ │ │ ├── number-setting.tsx │ │ │ │ ├── plugins.tsx │ │ │ │ ├── shortcuts.tsx │ │ │ │ ├── text-setting.tsx │ │ │ │ ├── theme-panel.tsx │ │ │ │ └── vault-key-panel.tsx │ │ │ ├── svg-icon.tsx │ │ │ ├── tabs │ │ │ │ ├── tab-list.tsx │ │ │ │ └── tab.tsx │ │ │ ├── tags │ │ │ │ ├── grpc-status-tag.tsx │ │ │ │ ├── grpc-tag.tsx │ │ │ │ ├── method-tag.tsx │ │ │ │ ├── size-tag.tsx │ │ │ │ ├── status-tag.tsx │ │ │ │ ├── time-tag.tsx │ │ │ │ ├── url-tag.tsx │ │ │ │ └── websocket-tag.tsx │ │ │ ├── templating │ │ │ │ ├── __tests__ │ │ │ │ │ └── local-template-tags.test.ts │ │ │ │ ├── faker-functions.ts │ │ │ │ ├── local-template-tags.ts │ │ │ │ ├── tag-editor.tsx │ │ │ │ └── variable-editor.tsx │ │ │ ├── themed-button │ │ │ │ ├── async-button.tsx │ │ │ │ ├── button.tsx │ │ │ │ └── index.ts │ │ │ ├── time-from-now.tsx │ │ │ ├── toast.tsx │ │ │ ├── tooltip.tsx │ │ │ ├── trail-lines-animation.ts │ │ │ ├── trail-lines-container.tsx │ │ │ ├── trail-lines.tsx │ │ │ ├── upgrade-notice.tsx │ │ │ ├── viewers │ │ │ │ ├── password-viewer.tsx │ │ │ │ ├── response-cookies-viewer.tsx │ │ │ │ ├── response-csv-viewer.tsx │ │ │ │ ├── response-error-viewer.tsx │ │ │ │ ├── response-headers-viewer.tsx │ │ │ │ ├── response-multipart-viewer.tsx │ │ │ │ ├── response-pdf-viewer.tsx │ │ │ │ ├── response-timeline-viewer.tsx │ │ │ │ ├── response-viewer.tsx │ │ │ │ ├── response-web-view.tsx │ │ │ │ └── viewers.test.ts │ │ │ └── websockets │ │ │ │ ├── action-bar.tsx │ │ │ │ ├── disconnect-button.tsx │ │ │ │ ├── event-log-view.tsx │ │ │ │ ├── event-view.tsx │ │ │ │ ├── realtime-response-pane.tsx │ │ │ │ ├── websocket-preview-dropdown.tsx │ │ │ │ └── websocket-request-pane.tsx │ │ ├── constant.ts │ │ ├── containers │ │ │ └── app-hooks.tsx │ │ ├── context │ │ │ ├── app │ │ │ │ ├── ai-context.tsx │ │ │ │ ├── insomnia-event-stream-context.tsx │ │ │ │ ├── insomnia-tab-context.tsx │ │ │ │ └── runner-context.tsx │ │ │ └── nunjucks │ │ │ │ ├── nunjucks-enabled-context.tsx │ │ │ │ ├── use-gated-nunjucks.ts │ │ │ │ └── use-nunjucks.ts │ │ ├── css │ │ │ ├── lib │ │ │ │ ├── codemirror │ │ │ │ │ ├── codemirror.css │ │ │ │ │ └── material.css │ │ │ │ └── fontawesome │ │ │ │ │ ├── css │ │ │ │ │ ├── brands.css │ │ │ │ │ ├── fontawesome.css │ │ │ │ │ ├── solid.css │ │ │ │ │ ├── v4-font-face.css │ │ │ │ │ └── v4-shims.css │ │ │ │ │ └── webfonts │ │ │ │ │ ├── fa-brands-400.ttf │ │ │ │ │ ├── fa-brands-400.woff2 │ │ │ │ │ ├── fa-solid-900.ttf │ │ │ │ │ ├── fa-solid-900.woff2 │ │ │ │ │ ├── fa-v4compatibility.ttf │ │ │ │ │ └── fa-v4compatibility.woff2 │ │ │ ├── main.css │ │ │ └── styles.css │ │ ├── eventBus.ts │ │ ├── hooks │ │ │ ├── image-cache.tsx │ │ │ ├── theme.ts │ │ │ ├── use-close-connection.ts │ │ │ ├── use-document-title.ts │ │ │ ├── use-editor-refresh.ts │ │ │ ├── use-execution-state.ts │ │ │ ├── use-global-keyboard-shortcuts.ts │ │ │ ├── use-insomnia-tab.ts │ │ │ ├── use-loader-defer-data.ts │ │ │ ├── use-loading-record.ts │ │ │ ├── use-local-storage.ts │ │ │ ├── use-organization-features.tsx │ │ │ ├── use-plan.tsx │ │ │ ├── use-ready-state.ts │ │ │ ├── use-realtime-connection-events.ts │ │ │ ├── use-request.ts │ │ │ ├── use-resize-observer.tsx │ │ │ ├── use-runner-request-list.tsx │ │ │ ├── use-safe-reducer-dispatch.ts │ │ │ ├── use-safe-state.ts │ │ │ ├── use-settings-side-effects.ts │ │ │ ├── use-state-ref.ts │ │ │ ├── use-theme-change.ts │ │ │ ├── use-vcs-version.ts │ │ │ └── useTimeoutWhen.ts │ │ ├── images │ │ │ ├── chart.svg │ │ │ ├── icn-eye.svg │ │ │ ├── icn-gear.svg │ │ │ ├── insomnia-logo.svg │ │ │ └── onboarding │ │ │ │ ├── collection_runner.png │ │ │ │ ├── coowner.png │ │ │ │ ├── git_projects.png │ │ │ │ ├── invite_control.png │ │ │ │ ├── multiple_tabs.png │ │ │ │ ├── offline_experience.png │ │ │ │ ├── secret_vaults.png │ │ │ │ ├── test_results.png │ │ │ │ └── uncommited_changes.png │ │ ├── index.tsx │ │ ├── insomniaFetch.ts │ │ ├── rendererListeners.ts │ │ ├── routes │ │ │ ├── actions.tsx │ │ │ ├── auth.authorize.tsx │ │ │ ├── auth.login.tsx │ │ │ ├── auth.logout.tsx │ │ │ ├── auth.tsx │ │ │ ├── auth.vaultKey.ts │ │ │ ├── commands.tsx │ │ │ ├── debug.tsx │ │ │ ├── design.tsx │ │ │ ├── environments.tsx │ │ │ ├── error.tsx │ │ │ ├── git-actions.tsx │ │ │ ├── git-project-actions.tsx │ │ │ ├── import.tsx │ │ │ ├── invite.tsx │ │ │ ├── mock-route.tsx │ │ │ ├── mock-server.tsx │ │ │ ├── modals.tsx │ │ │ ├── onboarding.migrate.tsx │ │ │ ├── onboarding.tsx │ │ │ ├── organization.tsx │ │ │ ├── project.tsx │ │ │ ├── remote-collections.tsx │ │ │ ├── request-group.tsx │ │ │ ├── request.tsx │ │ │ ├── root.tsx │ │ │ ├── runner.tsx │ │ │ ├── test-results.tsx │ │ │ ├── test-suite.tsx │ │ │ ├── unit-test.tsx │ │ │ ├── untracked-projects.tsx │ │ │ └── workspace.tsx │ │ ├── sentry.ts │ │ └── worker │ │ │ ├── spectral-handler.ts │ │ │ ├── spectral-worker.ts │ │ │ ├── templating-handler.ts │ │ │ └── templating-worker.ts │ └── utils │ │ ├── graph-ql.ts │ │ ├── grpc.ts │ │ ├── importers │ │ ├── __tests__ │ │ │ └── convert.test.ts │ │ ├── convert.ts │ │ ├── entities.ts │ │ ├── importers │ │ │ ├── __snapshots__ │ │ │ │ └── index.test.ts.snap │ │ │ ├── __tests__ │ │ │ │ └── postman.test.ts │ │ │ ├── curl.test.ts │ │ │ ├── curl.ts │ │ │ ├── fixtures │ │ │ │ ├── curl │ │ │ │ │ ├── complex-input.sh │ │ │ │ │ ├── dollar-sign-input.sh │ │ │ │ │ ├── form-input.sh │ │ │ │ │ ├── from-chrome-input.sh │ │ │ │ │ ├── get-input.sh │ │ │ │ │ ├── header-colon-input.sh │ │ │ │ │ ├── multi-data-input.sh │ │ │ │ │ ├── multi-input.sh │ │ │ │ │ ├── no-url-input.sh │ │ │ │ │ ├── question-mark-input.sh │ │ │ │ │ ├── simple-url-input.sh │ │ │ │ │ ├── skip-squished-input.sh │ │ │ │ │ ├── url-only-input.sh │ │ │ │ │ └── urlencoded-input.sh │ │ │ │ ├── har │ │ │ │ │ ├── deep-input.json │ │ │ │ │ ├── form-data-input.json │ │ │ │ │ ├── minimal-input.json │ │ │ │ │ ├── no-requests-input.json │ │ │ │ │ └── shallow-input.json │ │ │ │ ├── insomnia-1 │ │ │ │ │ ├── complex-input.json │ │ │ │ │ ├── form-input.json │ │ │ │ │ └── minimal-input.json │ │ │ │ ├── insomnia-2 │ │ │ │ │ └── complex-input.json │ │ │ │ ├── insomnia-3 │ │ │ │ │ └── basic-input.json │ │ │ │ ├── insomnia-4 │ │ │ │ │ └── basic-input.yaml │ │ │ │ ├── openapi3 │ │ │ │ │ ├── dereferenced-input.json │ │ │ │ │ ├── dereferenced-with-tags-input.json │ │ │ │ │ ├── endpoint-security-input.yaml │ │ │ │ │ ├── example-with-server-variables-input.yaml │ │ │ │ │ ├── example-without-servers-input.yaml │ │ │ │ │ ├── global-security-input.yaml │ │ │ │ │ ├── multiple-api-keys-input.yml │ │ │ │ │ ├── oauth2-input.yaml │ │ │ │ │ ├── path-plugin-input.yaml │ │ │ │ │ ├── petstore-input.json │ │ │ │ │ ├── petstore-readonly-input.yml │ │ │ │ │ ├── petstore-with-tags-input.json │ │ │ │ │ ├── petstore-yml-input.yml │ │ │ │ │ └── petstore-yml-with-tags-input.yml │ │ │ │ ├── postman-env │ │ │ │ │ ├── basic-input.json │ │ │ │ │ └── no-name-input.json │ │ │ │ ├── postman │ │ │ │ │ ├── api-key-default-v2_1-input.json │ │ │ │ │ ├── api-key-header-v2_1-input.json │ │ │ │ │ ├── api-key-queryParams-v2_1-input.json │ │ │ │ │ ├── aws-signature-auth-v2_0-input.json │ │ │ │ │ ├── aws-signature-auth-v2_1-input.json │ │ │ │ │ ├── basic-auth-v2_0-input.json │ │ │ │ │ ├── basic-auth-v2_1-input.json │ │ │ │ │ ├── bearer-token-v2_0-input.json │ │ │ │ │ ├── bearer-token-v2_1-input.json │ │ │ │ │ ├── complex-url-v2_0-input.json │ │ │ │ │ ├── complex-url-v2_1-input.json │ │ │ │ │ ├── complex-v2_0-input.json │ │ │ │ │ ├── complex-v2_0_fromHeaders-input.json │ │ │ │ │ ├── complex-v2_1-input.json │ │ │ │ │ ├── digest-auth-v2_0-input.json │ │ │ │ │ ├── digest-auth-v2_1-input.json │ │ │ │ │ ├── faker-vars-v2_1-input.json │ │ │ │ │ ├── minimal-v2_0-input.json │ │ │ │ │ ├── minimal-v2_1-input.json │ │ │ │ │ ├── oauth1_0-auth-v2_0-input.json │ │ │ │ │ ├── oauth1_0-auth-v2_1-input.json │ │ │ │ │ ├── oauth2_0-auth-v2_0-input.json │ │ │ │ │ ├── oauth2_0-auth-v2_1-input.json │ │ │ │ │ ├── postman-export-oauth2-v2_1-input.json │ │ │ │ │ └── scripts-import-v2_1-input.json │ │ │ │ ├── swagger2 │ │ │ │ │ ├── dereferenced-input.json │ │ │ │ │ ├── dereferenced-with-tags-input.json │ │ │ │ │ ├── petstore-input.json │ │ │ │ │ ├── petstore-with-tags-input.json │ │ │ │ │ ├── petstore-yml-input.yml │ │ │ │ │ ├── petstore-yml-with-tags-input.yml │ │ │ │ │ └── user-example-input.json │ │ │ │ └── wsdl │ │ │ │ │ ├── addition-input.wsdl │ │ │ │ │ └── calculator-input.wsdl │ │ │ ├── har.ts │ │ │ ├── index.test.ts │ │ │ ├── index.ts │ │ │ ├── insomnia-1.ts │ │ │ ├── insomnia-2.ts │ │ │ ├── insomnia-3.ts │ │ │ ├── insomnia-4.ts │ │ │ ├── openapi-3.ts │ │ │ ├── postman-2.0.types.ts │ │ │ ├── postman-2.1.types.ts │ │ │ ├── postman-env.ts │ │ │ ├── postman.test.ts │ │ │ ├── postman.ts │ │ │ ├── swagger-2.ts │ │ │ └── wsdl.ts │ │ ├── utils.test.ts │ │ └── utils.ts │ │ ├── index.ts │ │ ├── invariant.ts │ │ ├── ndjson.test.ts │ │ ├── ndjson.ts │ │ ├── plugin.ts │ │ ├── prettify │ │ ├── edn.test.ts │ │ ├── edn.ts │ │ ├── fixtures │ │ │ ├── edn │ │ │ │ ├── array-break-line-input.edn │ │ │ │ ├── array-break-line-output.edn │ │ │ │ ├── ignore-comma-input.edn │ │ │ │ ├── ignore-comma-output.edn │ │ │ │ ├── minimal-object-input.edn │ │ │ │ ├── minimal-object-output.edn │ │ │ │ ├── multilevel-object-input.edn │ │ │ │ ├── multilevel-object-output.edn │ │ │ │ ├── property-with-metadata-input.edn │ │ │ │ ├── property-with-metadata-output.edn │ │ │ │ ├── root-quoted-string-input.edn │ │ │ │ ├── root-quoted-string-output.edn │ │ │ │ ├── root-string-input.edn │ │ │ │ ├── root-string-output.edn │ │ │ │ ├── set-break-line-input.edn │ │ │ │ ├── set-break-line-output.edn │ │ │ │ ├── string-allow-comma-input.edn │ │ │ │ ├── string-allow-comma-output.edn │ │ │ │ ├── string-inside-breakline-input.edn │ │ │ │ └── string-inside-breakline-output.edn │ │ │ ├── escaped-characters-input.json │ │ │ ├── escaped-characters-output.json │ │ │ ├── escaped-unicode-input.json │ │ │ ├── escaped-unicode-output.json │ │ │ ├── extra-closing-brackets-input.json │ │ │ ├── extra-closing-brackets-output.json │ │ │ ├── extra-whitespace-input.json │ │ │ ├── extra-whitespace-output.json │ │ │ ├── minimal-whitespace-input.json │ │ │ ├── minimal-whitespace-output.json │ │ │ ├── nunjucks-input.json │ │ │ ├── nunjucks-output.json │ │ │ ├── precision-input.json │ │ │ ├── precision-output.json │ │ │ ├── root-array-input.json │ │ │ ├── root-array-output.json │ │ │ ├── root-quoted-string-input.json │ │ │ ├── root-quoted-string-output.json │ │ │ ├── root-string-input.json │ │ │ ├── root-string-output.json │ │ │ ├── trailing-comma-input.json │ │ │ ├── trailing-comma-output.json │ │ │ ├── unquoted-strings-input.json │ │ │ └── unquoted-strings-output.json │ │ ├── json.test.ts │ │ └── json.ts │ │ ├── router.ts │ │ ├── try-interpolate.ts │ │ ├── url │ │ ├── protocol.test.ts │ │ ├── protocol.ts │ │ ├── querystring.test.ts │ │ └── querystring.ts │ │ ├── vault.ts │ │ └── xpath │ │ ├── query.test.ts │ │ └── query.ts │ ├── svgr.config.js │ ├── tailwind.config.js │ ├── tsconfig.json │ ├── types │ ├── apiconnect-wsdl.d.ts │ ├── codemirror-graphql.d.ts │ ├── codemirror.d.ts │ ├── global.d.ts │ ├── hkdf.d.ts │ ├── httpsnippet.d.ts │ ├── jsonlint.d.ts │ ├── nunjucks.d.ts │ ├── objectpath.d.ts │ └── tough-cookie.d.ts │ ├── vite-plugin-electron-node-require.ts │ ├── vite.config.ts │ └── vitest.config.ts ├── patches ├── README.txt └── apiconnect-wsdl+2.0.36.patch └── screenshots └── main.png /.clang-format: -------------------------------------------------------------------------------- 1 | ColumnLimit: 120 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | **/node_modules 2 | **/build 3 | **/dist 4 | **/.git 5 | **/.github 6 | traces 7 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text eol=lf 2 | 3 | *.gif binary 4 | *.icns binary 5 | *.ico binary 6 | *.png binary 7 | *.woff2 binary 8 | *.otf binary 9 | *.zip binary -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: true 2 | contact_links: 3 | - name: Feature Request 4 | url: https://github.com/Kong/insomnia/discussions/categories/ideas 5 | about: Search and submit ideas for this project 6 | - name: Question 7 | url: https://chat.insomnia.rest/ 8 | about: Please ask and answer questions about Insomnia in our Slack Community 9 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /.github/workflows/sast.yml: -------------------------------------------------------------------------------- 1 | name: SAST 2 | 3 | on: 4 | pull_request: {} 5 | push: 6 | branches: 7 | - develop 8 | - release/* 9 | workflow_dispatch: {} 10 | 11 | jobs: 12 | semgrep: 13 | timeout-minutes: 5 14 | name: Semgrep SAST 15 | runs-on: ubuntu-22.04 16 | permissions: 17 | # required for all workflows 18 | security-events: write 19 | # only required for workflows in private repositories 20 | actions: read 21 | contents: read 22 | 23 | if: (github.actor != 'dependabot[bot]') 24 | 25 | steps: 26 | - uses: actions/checkout@v4 27 | - uses: Kong/public-shared-actions/security-actions/semgrep@a18abf762d6e2444bcbfd20de70451ea1e3bc1b1 # 4.0.1 28 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | logs 2 | *.log 3 | **/*.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pids 8 | *.pid 9 | *.seed 10 | *.pid.lock 11 | /scripts/npm-plugins 12 | lib-cov 13 | coverage 14 | .lock-wscript 15 | build/Release 16 | node_modules/ 17 | **/node_modules/ 18 | .npm 19 | .eslintcache 20 | .node_repl_history 21 | *.tgz 22 | .yarn-integrity 23 | .env 24 | .idea 25 | *.iml 26 | .DS_Store 27 | *test-plugins 28 | graphql.config.json 29 | .cache 30 | .graphqlconfig 31 | schema.graphql 32 | packages/insomnia-smoke-test/traces 33 | *.tsbuildinfo 34 | dist 35 | .history 36 | *.node 37 | rootCA2.* 38 | *.exe 39 | *.o 40 | final.cpp 41 | insomnia.ico 42 | final.rc 43 | -------------------------------------------------------------------------------- /.npmrc: -------------------------------------------------------------------------------- 1 | runtime = electron 2 | target = 35.0.2 3 | disturl = https://electronjs.org/headers 4 | playwright_skip_browser_download=true 5 | engine-strict=true 6 | # build_from_source = true 7 | # arch = x64 8 | # target_arch = x64 9 | -------------------------------------------------------------------------------- /.nvmrc: -------------------------------------------------------------------------------- 1 | 22.14.0 2 | -------------------------------------------------------------------------------- /.prettierignore: -------------------------------------------------------------------------------- 1 | build 2 | coverage 3 | node_modules 4 | bin 5 | # Ignore generated files in insomnia 6 | packages/insomnia/src/**.js 7 | packages/insomnia/src/**.js.map 8 | # Ignore fixture files for tests since we need to keep them in a specific format 9 | __fixtures__ 10 | fixtures 11 | -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "trailingComma": "all", 3 | "printWidth": 120, 4 | "arrowParens": "avoid", 5 | "singleQuote": true, 6 | "quoteProps": "consistent", 7 | "overrides": [ 8 | { 9 | "files": "packages/insomnia/**/*", 10 | "options": { 11 | "plugins": ["prettier-plugin-tailwindcss"] 12 | } 13 | } 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /.vscode/extensions.json: -------------------------------------------------------------------------------- 1 | { 2 | // See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. 3 | // Extension identifier format: ${publisher}.${name}. Example: vscode.csharp 4 | // List of extensions which should be recommended for users of this workspace. 5 | "recommendations": [ 6 | "yzhang.markdown-all-in-one", 7 | "DavidAnson.vscode-markdownlint", 8 | "dbaeumer.vscode-eslint", 9 | "adrieankhisbe.vscode-ndjson", 10 | "ms-playwright.playwright", 11 | "bradlc.vscode-tailwindcss", 12 | "esbenp.prettier-vscode", 13 | "llvm-vs-code-extensions.vscode-clangd" 14 | ], 15 | // List of extensions recommended by VS Code that should not be recommended for users of this workspace. 16 | "unwantedRecommendations": [] 17 | } 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Kong Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | To report a vulnerability in the Kong gateway, Insomnia or other Kong software, or know of a publicly disclosed security vulnerability, please immediately let us know by emailing . 6 | 7 | For more detailed information, please see [Kong's Security Update Process](https://docs.konghq.com/gateway-oss/latest/kong-security-update-process/#reporting-a-vulnerability). 8 | -------------------------------------------------------------------------------- /flake.lock: -------------------------------------------------------------------------------- 1 | { 2 | "nodes": { 3 | "nixpkgs": { 4 | "locked": { 5 | "lastModified": 1747533086, 6 | "narHash": "sha256-+8goyptSXa7qV0k5uPKyky58jpBjI/qkzsbwCZFvhRY=", 7 | "owner": "NixOS", 8 | "repo": "nixpkgs", 9 | "rev": "8406224e30c258025cb8b31704bdb977a8f1f009", 10 | "type": "github" 11 | }, 12 | "original": { 13 | "id": "nixpkgs", 14 | "type": "indirect" 15 | } 16 | }, 17 | "root": { 18 | "inputs": { 19 | "nixpkgs": "nixpkgs" 20 | } 21 | } 22 | }, 23 | "root": "root", 24 | "version": 7 25 | } 26 | -------------------------------------------------------------------------------- /flake.nix: -------------------------------------------------------------------------------- 1 | { 2 | outputs = { nixpkgs, ... }: 3 | let 4 | forAllSystems = with nixpkgs.lib; f: foldAttrs mergeAttrs { } 5 | (map (s: { ${s} = f s; }) systems.flakeExposed); 6 | in 7 | { 8 | devShell = forAllSystems 9 | (system: 10 | let 11 | pkgs = nixpkgs.legacyPackages.${system}; 12 | in 13 | pkgs.mkShell { 14 | buildInputs = [ 15 | pkgs.nodejs_22 16 | pkgs.yarn 17 | ]; 18 | 19 | ELECTRON_OVERRIDE_DIST_PATH = "${pkgs.electron_35}/bin/"; 20 | ELECTRON_SKIP_BINARY_DOWNLOAD = 1; 21 | LD_LIBRARY_PATH = nixpkgs.lib.makeLibraryPath [ pkgs.stdenv.cc.cc ]; 22 | }); 23 | }; 24 | } 25 | -------------------------------------------------------------------------------- /packages/insomnia-inso/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | binaries 3 | 4 | # compressed was the old artifacts directory. Leave it in .gitignore to ignore any artifacts created before the rename 5 | compressed 6 | artifacts 7 | -------------------------------------------------------------------------------- /packages/insomnia-inso/assets/ci-demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-inso/assets/ci-demo.gif -------------------------------------------------------------------------------- /packages/insomnia-inso/assets/demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-inso/assets/demo.gif -------------------------------------------------------------------------------- /packages/insomnia-inso/bin/debug_inso: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * This file is only used by the vscode launch config. 5 | * It allows us to provide a free text prompt to the user to pass any inso extra arguments. 6 | * https://github.com/microsoft/vscode/issues/83678 7 | */ 8 | const shellwords = require("shellwords"); 9 | let args = process.argv; 10 | 11 | if (args.length >= 2 && require('inspector').url()) { 12 | args = process.argv.reduce((allArgs, arg) => [...allArgs, ...shellwords.split(arg)], []); 13 | } 14 | 15 | // This should always be the same as bin/inso 16 | global.require = require; 17 | const insomniacli = require('../dist/index.js'); 18 | insomniacli.go(args); 19 | 20 | -------------------------------------------------------------------------------- /packages/insomnia-inso/bin/inso: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | global.require = require; 4 | const insomniacli = require('../dist/index.js'); 5 | insomniacli.go(); 6 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/commands/__mocks__/insomnia-send-request.ts: -------------------------------------------------------------------------------- 1 | import { vi } from 'vitest'; 2 | 3 | export const getSendRequestCallbackMemDb = vi.fn().mockResolvedValue(vi.fn()); 4 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/commands/__mocks__/insomnia-testing.ts: -------------------------------------------------------------------------------- 1 | import { vi } from 'vitest'; 2 | 3 | export const generate = vi.fn(); 4 | export const generateToFile = vi.fn(); 5 | export const runTests = vi.fn(); 6 | export const runTestsCli = vi.fn(); 7 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/commands/fixtures/openapi-spec.yaml: -------------------------------------------------------------------------------- 1 | openapi: '3.0.2' 2 | info: 3 | title: Sample Spec 4 | version: '1.2' 5 | description: A sample API specification 6 | contact: 7 | email: support@insomnia.rest 8 | servers: 9 | - url: https://200.insomnia.rest 10 | tags: 11 | - name: Folder 12 | paths: 13 | /global: 14 | get: 15 | description: Global 16 | operationId: get_global 17 | tags: 18 | - Folder 19 | responses: 20 | '200': 21 | description: OK 22 | /override: 23 | get: 24 | description: Override 25 | operationId: get_override 26 | tags: 27 | - Folder 28 | responses: 29 | '200': 30 | description: OK 31 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/commands/fixtures/with-ruleset/.spectral.yml: -------------------------------------------------------------------------------- 1 | extends: 2 | - spectral:oas 3 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/commands/fixtures/with-ruleset/path-plugin.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | description: Description 4 | version: 1.0.0 5 | title: API 6 | servers: 7 | - url: 'https://api.insomnia.rest' 8 | paths: 9 | /path: 10 | x-kong-plugin-oidc: 11 | name: oidc 12 | enabled: true 13 | config: 14 | key_names: [api_key, apikey] 15 | key_in_body: false 16 | hide_credentials: true 17 | get: 18 | description: 'test' 19 | responses: 20 | '200': 21 | description: OK 22 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/adapters/ne-db-adapter.test.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | 3 | import { describe, expect, it } from 'vitest'; 4 | 5 | import neDbAdapter from './ne-db-adapter'; 6 | 7 | describe('neDbAdapter()', () => { 8 | const fixturesPath = path.join(__dirname, '../fixtures'); 9 | 10 | it('should return null if data directory is invalid', async () => { 11 | const workingDir = path.join(fixturesPath, 'git-repo'); 12 | const db = await neDbAdapter(workingDir); 13 | expect(db).toBe(null); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/certs/fake_ca.pem: -------------------------------------------------------------------------------- 1 | fake ca content 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/certs/fake_cert.pem: -------------------------------------------------------------------------------- 1 | fake cert content 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/certs/fake_key.pem: -------------------------------------------------------------------------------- 1 | fake key content 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insomnia/Environment/env_ca046a738f001eb3090261a537b1b78f86c2094c.yml: -------------------------------------------------------------------------------- 1 | _id: env_ca046a738f001eb3090261a537b1b78f86c2094c 2 | color: null 3 | created: 1589851906358 4 | data: 5 | base_url: "{{ scheme }}://{{ host }}{{ base_path }}" 6 | dataPropertyOrder: 7 | "&": 8 | - base_url 9 | isPrivate: false 10 | metaSortKey: 1589851906358 11 | modified: 1592254074769 12 | name: Base environment 13 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 14 | type: Environment 15 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insomnia/Environment/env_env_ca046a738f001eb3090261a537b1b78f86c2094c_sub.yml: -------------------------------------------------------------------------------- 1 | _id: env_env_ca046a738f001eb3090261a537b1b78f86c2094c_sub 2 | color: null 3 | created: 1592252904087 4 | data: 5 | base_path: /v1 6 | host: api.server.test 7 | scheme: https 8 | dataPropertyOrder: null 9 | isPrivate: false 10 | metaSortKey: 1592252904087 11 | modified: 1592254074767 12 | name: OpenAPI env 13 | parentId: env_ca046a738f001eb3090261a537b1b78f86c2094c 14 | type: Environment 15 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insomnia/Request/req_wrk_012d4860c7da418a85ffea7406e1292a21946b60.yml: -------------------------------------------------------------------------------- 1 | _id: req_wrk_012d4860c7da418a85ffea7406e1292a21946b60 2 | authentication: {} 3 | body: {} 4 | created: 1592254074764 5 | description: "" 6 | headers: [] 7 | isPrivate: false 8 | metaSortKey: -1592254074764 9 | method: GET 10 | modified: 1592254074764 11 | name: /global 12 | parameters: [] 13 | parentId: fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249 14 | settingDisableRenderRequestBody: false 15 | settingEncodeUrl: true 16 | settingFollowRedirects: global 17 | settingRebuildPath: true 18 | settingSendCookies: true 19 | settingStoreCookies: true 20 | type: Request 21 | url: "{{ base_url }}/global" 22 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insomnia/Request/req_wrk_012d4860c7da418a85ffea7406e1292ab410454b.yml: -------------------------------------------------------------------------------- 1 | _id: req_wrk_012d4860c7da418a85ffea7406e1292ab410454b 2 | authentication: {} 3 | body: {} 4 | created: 1592254074762 5 | description: "" 6 | headers: [] 7 | isPrivate: false 8 | metaSortKey: -1592254074762 9 | method: GET 10 | modified: 1592254074762 11 | name: /override 12 | parameters: [] 13 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 14 | settingDisableRenderRequestBody: false 15 | settingEncodeUrl: true 16 | settingFollowRedirects: global 17 | settingRebuildPath: true 18 | settingSendCookies: true 19 | settingStoreCookies: true 20 | type: Request 21 | url: "{{ base_url }}/override" 22 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insomnia/RequestGroup/fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249.yml: -------------------------------------------------------------------------------- 1 | _id: fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249 2 | created: 1592254074765 3 | description: "" 4 | environment: {} 5 | environmentPropertyOrder: null 6 | metaSortKey: -1592254074765 7 | modified: 1592254074765 8 | name: Folder 9 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 10 | type: RequestGroup 11 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insomnia/Workspace/wrk_012d4860c7da418a85ffea7406e1292a.yml: -------------------------------------------------------------------------------- 1 | _id: wrk_012d4860c7da418a85ffea7406e1292a 2 | created: 1589851906270 3 | description: "" 4 | modified: 1592254074771 5 | name: Global Security 1.2 6 | parentId: null 7 | scope: spec 8 | type: Workspace 9 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec/.insorc: -------------------------------------------------------------------------------- 1 | options: 2 | # loading data from an git repo 3 | workingDir: packages/insomnia-inso/src/db/fixtures/git-repo-malformed-spec 4 | ci: false 5 | verbose: true 6 | scripts: 7 | lintSpecPrompt: inso lint spec 8 | lintSpecKey: inso lint spec spc_3b2850 9 | lintSpecName: inso lint spec "Imported Workspace" 10 | exportSpec: inso export spec 11 | runTest: inso run test 12 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/Environment/env_ca046a738f001eb3090261a537b1b78f86c2094c.yml: -------------------------------------------------------------------------------- 1 | _id: env_ca046a738f001eb3090261a537b1b78f86c2094c 2 | color: null 3 | created: 1589851906358 4 | data: 5 | base_url: "{{ scheme }}://{{ host }}{{ base_path }}" 6 | dataPropertyOrder: 7 | "&": 8 | - base_url 9 | isPrivate: false 10 | metaSortKey: 1589851906358 11 | modified: 1593669699118 12 | name: Base environment 13 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 14 | type: Environment 15 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/Environment/env_env_ca046a738f001eb3090261a537b1b78f86c2094c_sub.yml: -------------------------------------------------------------------------------- 1 | _id: env_env_ca046a738f001eb3090261a537b1b78f86c2094c_sub 2 | color: null 3 | created: 1592252904087 4 | data: 5 | base_path: "" 6 | host: 200.insomnia.rest 7 | scheme: https 8 | dataPropertyOrder: null 9 | isPrivate: false 10 | metaSortKey: 1592252904087 11 | modified: 1593669699117 12 | name: OpenAPI env 13 | parentId: env_ca046a738f001eb3090261a537b1b78f86c2094c 14 | type: Environment 15 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/Request/req_wrk_012d4860c7da418a85ffea7406e1292a21946b60.yml: -------------------------------------------------------------------------------- 1 | _id: req_wrk_012d4860c7da418a85ffea7406e1292a21946b60 2 | authentication: {} 3 | body: {} 4 | created: 1593669324881 5 | description: "" 6 | headers: [] 7 | isPrivate: false 8 | metaSortKey: -1593669324881 9 | method: GET 10 | modified: 1593669699112 11 | name: /global 12 | parameters: [] 13 | parentId: fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249 14 | settingDisableRenderRequestBody: false 15 | settingEncodeUrl: true 16 | settingFollowRedirects: global 17 | settingRebuildPath: true 18 | settingSendCookies: true 19 | settingStoreCookies: true 20 | type: Request 21 | url: "{{ base_url }}/global" 22 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/Request/req_wrk_012d4860c7da418a85ffea7406e1292ab410454b.yml: -------------------------------------------------------------------------------- 1 | _id: req_wrk_012d4860c7da418a85ffea7406e1292ab410454b 2 | authentication: {} 3 | body: {} 4 | created: 1593669324879 5 | description: "" 6 | headers: [] 7 | isPrivate: false 8 | metaSortKey: -1593669324879 9 | method: GET 10 | modified: 1593669699110 11 | name: /override 12 | parameters: [] 13 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 14 | settingDisableRenderRequestBody: false 15 | settingEncodeUrl: true 16 | settingFollowRedirects: global 17 | settingRebuildPath: true 18 | settingSendCookies: true 19 | settingStoreCookies: true 20 | type: Request 21 | url: "{{ base_url }}/override" 22 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/RequestGroup/fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249.yml: -------------------------------------------------------------------------------- 1 | _id: fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249 2 | created: 1593669324883 3 | description: "" 4 | environment: {} 5 | environmentPropertyOrder: null 6 | metaSortKey: -1593669324883 7 | modified: 1593669699114 8 | name: Folder 9 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 10 | type: RequestGroup 11 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/UnitTest/ut_6b214a8cd07046f2a8f43237ca913c73.yml: -------------------------------------------------------------------------------- 1 | _id: ut_6b214a8cd07046f2a8f43237ca913c73 2 | code: expect(insomnia.activeRequestId).to.equal('req_wrk_012d4860c7da418a85ffea7406e1292a21946b60') 3 | created: 1593668846292 4 | modified: 1593669592203 5 | name: Expect active request to be set 6 | parentId: uts_fe901c6565044f00aa620d3fe47f443f 7 | requestId: req_wrk_012d4860c7da418a85ffea7406e1292a21946b60 8 | type: UnitTest 9 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/UnitTest/ut_8c0c020fb9e341c2a3162e723445faf1.yml: -------------------------------------------------------------------------------- 1 | _id: ut_8c0c020fb9e341c2a3162e723445faf1 2 | code: expect(1+1).to.equal(2); 3 | created: 1593668670236 4 | modified: 1593668678950 5 | name: One plus one is two 6 | parentId: uts_fe901c6565044f00aa620d3fe47f443f 7 | requestId: null 8 | type: UnitTest 9 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/UnitTest/ut_8fc42ec7f82a45d09e691ddfe212fd85.yml: -------------------------------------------------------------------------------- 1 | _id: ut_8fc42ec7f82a45d09e691ddfe212fd85 2 | code: expect(true).not.to.equal(true); 3 | created: 1593668581197 4 | modified: 1593669248598 5 | name: Test should fail 6 | parentId: uts_7f0f85548b0147f4ba6b5e442d137613 7 | requestId: null 8 | type: UnitTest 9 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/UnitTest/ut_97a197104e83454ebf5f4e0dc0ba4bc6.yml: -------------------------------------------------------------------------------- 1 | _id: ut_97a197104e83454ebf5f4e0dc0ba4bc6 2 | code: expect(true).to.equal(true); 3 | created: 1593668468718 4 | modified: 1593669244289 5 | name: Test should succeed 6 | parentId: uts_7f0f85548b0147f4ba6b5e442d137613 7 | requestId: null 8 | type: UnitTest 9 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/UnitTestSuite/uts_7f0f85548b0147f4ba6b5e442d137613.yml: -------------------------------------------------------------------------------- 1 | _id: uts_7f0f85548b0147f4ba6b5e442d137613 2 | created: 1593668430232 3 | modified: 1593669651173 4 | name: A test suite 5 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 6 | type: UnitTestSuite 7 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/UnitTestSuite/uts_fe901c6565044f00aa620d3fe47f443f.yml: -------------------------------------------------------------------------------- 1 | _id: uts_fe901c6565044f00aa620d3fe47f443f 2 | created: 1593668662131 3 | modified: 1593668662131 4 | name: Another suite 5 | parentId: wrk_012d4860c7da418a85ffea7406e1292a 6 | type: UnitTestSuite 7 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insomnia/Workspace/wrk_012d4860c7da418a85ffea7406e1292a.yml: -------------------------------------------------------------------------------- 1 | _id: wrk_012d4860c7da418a85ffea7406e1292a 2 | created: 1589851906270 3 | description: "" 4 | modified: 1593669699121 5 | name: Sample Spec 1.2 6 | parentId: null 7 | scope: spec 8 | type: Workspace 9 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/git-repo/.insorc: -------------------------------------------------------------------------------- 1 | options: 2 | # loading data from an git repo 3 | workingDir: packages/insomnia-inso/src/db/fixtures/git-repo 4 | ci: false 5 | verbose: true 6 | scripts: 7 | lintSpecPrompt: inso lint spec 8 | lintSpecKey: inso lint spec spc_3b2850 9 | lintSpecName: inso lint spec "Imported Workspace" 10 | exportSpec: inso export spec 11 | runTest: inso run test 12 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/insomnia-v4/empty.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-inso/src/db/fixtures/insomnia-v4/empty.yaml -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/insomnia-v4/malformed.yaml: -------------------------------------------------------------------------------- 1 | duplicateKey: 123 2 | duplicateKey: 123 -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/insomnia-v4/no-export-format.yaml: -------------------------------------------------------------------------------- 1 | abc: 123 -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/insomnia-v4/v3-export-format.yaml: -------------------------------------------------------------------------------- 1 | __export_format: 3 -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/nedb/insomnia.ApiSpec.db: -------------------------------------------------------------------------------- 1 | {"_id":"spc_46c5a4a40e83445a9bd9d9758b86c16c","type":"ApiSpec","parentId":"wrk_012d4860c7da418a85ffea7406e1292a","modified":1593669699123,"created":1589851906273,"fileName":"Sample Specification","contents":"openapi: '3.0.2'\ninfo:\n title: Sample Spec\n version: '1.2'\nservers:\n - url: https://200.insomnia.rest\ntags:\n - name: Folder\npaths:\n /global:\n get:\n tags:\n - Folder\n responses:\n '200':\n description: OK\n /override:\n get:\n responses:\n '200':\n description: OK\n","contentType":"yaml"} 2 | {"_id":"spc_c21a60dc02eb4c44a0817046c2b06499","type":"ApiSpec","parentId":"wrk_0b96eff84c1c4eaa9c6e67ad74bbc85b","modified":1593670005359,"created":1593670005359,"fileName":"Insomnia Designer","contents":"","contentType":"yaml"} 3 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/nedb/insomnia.CaCertificate.db: -------------------------------------------------------------------------------- 1 | {"_id":"crt_c8325243678d49e19d7282f4c0f156d8","type":"CaCertificate","parentId":"wrk_0b96eff84c1c4eaa9c6e67ad74bbc85b","modified":1729664881251,"created":1729664881251,"disabled":false,"path":"packages/insomnia-inso/src/db/fixtures/certs/fake_ca.pem","isPrivate":false} 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/nedb/insomnia.ClientCertificate.db: -------------------------------------------------------------------------------- 1 | {"_id":"crt_998cf6641ec249389690c821fb16a07b","type":"ClientCertificate","parentId":"wrk_0b96eff84c1c4eaa9c6e67ad74bbc85b","modified":1727072507372,"created":1727072507372,"host":"insomnia.rest","passphrase":"","disabled":false,"cert":"packages/insomnia-inso/src/db/fixtures/certs/fake_cert.pem","key":"packages/insomnia-inso/src/db/fixtures/certs/fake_key.pem","pfx":null,"isPrivate":false} 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/nedb/insomnia.RequestGroup.db: -------------------------------------------------------------------------------- 1 | {"_id":"fld_wrk_012d4860c7da418a85ffea7406e1292a30baa249","type":"RequestGroup","parentId":"wrk_012d4860c7da418a85ffea7406e1292a","modified":1593669699114,"created":1593669324883,"name":"Folder","description":"","environment":{},"environmentPropertyOrder":null,"metaSortKey":-1593669324883} 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/nedb/insomnia.UnitTestSuite.db: -------------------------------------------------------------------------------- 1 | {"_id":"uts_7f0f85548b0147f4ba6b5e442d137613","type":"UnitTestSuite","parentId":"wrk_012d4860c7da418a85ffea7406e1292a","modified":1593669651173,"created":1593668430232,"name":"A test suite"} 2 | {"_id":"uts_fe901c6565044f00aa620d3fe47f443f","type":"UnitTestSuite","parentId":"wrk_012d4860c7da418a85ffea7406e1292a","modified":1593668662131,"created":1593668662131,"name":"Another suite"} 3 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/db/fixtures/nedb/insomnia.Workspace.db: -------------------------------------------------------------------------------- 1 | {"_id":"wrk_012d4860c7da418a85ffea7406e1292a","type":"Workspace","parentId":null,"modified":1593669699121,"created":1589851906270,"name":"Sample Spec 1.2","description":"","scope":"spec"} 2 | {"_id":"wrk_0b96eff84c1c4eaa9c6e67ad74bbc85b","type":"Workspace","parentId":null,"modified":1593670005357,"created":1593670005357,"name":"Insomnia Designer","description":"","scope":"spec"} 3 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc-blank.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-inso/src/fixtures/.insorc-blank.yaml -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc-from-file-example.yaml: -------------------------------------------------------------------------------- 1 | options: 2 | # loading data from an export file 3 | workingDir: packages/insomnia-inso/src/db/fixtures/insomnia-v4 4 | src: insomnia_v4.json 5 | ci: false 6 | verbose: true 7 | scripts: 8 | lintSpecPrompt: inso lint spec 9 | lintSpecKey: inso lint spec spc_3b2850 10 | lintSpecName: inso lint spec "Imported Workspace" 11 | exportSpec: inso export spec 12 | runTest: inso run test 13 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc-from-git-example.yaml: -------------------------------------------------------------------------------- 1 | options: 2 | # loading data from an git repo 3 | workingDir: packages/insomnia-inso/src/db/fixtures/git-repo 4 | ci: false 5 | verbose: true 6 | scripts: 7 | lintSpecPrompt: inso lint spec 8 | lintSpecKey: inso lint spec spc_3b2850 9 | lintSpecName: inso lint spec "Imported Workspace" 10 | exportSpec: inso export spec 11 | runTest: inso run test 12 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc-missing-properties.yaml: -------------------------------------------------------------------------------- 1 | should-be-ignored: 'test' 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc-test.yaml: -------------------------------------------------------------------------------- 1 | options: 2 | ci: false 3 | shouldBeIgnored: this should be ignored because it is not a global option 4 | scripts: 5 | lintSpec: inso lint spec 6 | exportSpec: inso export spec 7 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc-with-scripts.yaml: -------------------------------------------------------------------------------- 1 | options: 2 | ci: false 3 | scripts: 4 | lint: inso lint spec "Designer Demo" 5 | test: inso run test "Designer Demo" --env UnitTest --bail --reporter progress 6 | test:200s: inso test --testNamePattern 200 7 | test:404s: inso test --testNamePattern 404 8 | test:suite:math: inso run test uts_8783c30a24b24e9a851d96cce48bd1f2 --env UnitTest --bail --reporter progress 9 | test:suite:requests: inso run test uts_bce4af --env UnitTest --bail --reporter progress 10 | invalid-script: blah blah "blah" 11 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/fixtures/.insorc.yaml: -------------------------------------------------------------------------------- 1 | options: 2 | ci: false 3 | shouldBeIgnored: this should be ignored because it is not a global option 4 | verbose: true 5 | scripts: 6 | lintSpec: inso lint spec 7 | exportSpec: inso export spec 8 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/index.ts: -------------------------------------------------------------------------------- 1 | export { go } from './cli'; 2 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/scripts/codesign.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.disable-library-validation 6 | 7 | com.apple.security.cs.allow-unsigned-executable-memory 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /packages/insomnia-inso/src/scripts/verify-pkg.js: -------------------------------------------------------------------------------- 1 | const spawn = require('child_process').spawn; 2 | const resolve = require('path').resolve; 3 | const basePath = resolve('binaries/inso'); 4 | const childProcess = spawn(basePath, ['--help']); 5 | childProcess.stdout.on('data', data => { 6 | console.log(`stdout: ${data}`); 7 | }); 8 | childProcess.stderr.on('data', data => { 9 | console.log(`stderr: ${data}`); 10 | }); 11 | childProcess.on('error', err => { 12 | console.error(`Error: ${err.message}`); 13 | }); 14 | childProcess.on('exit', (code, signal) => { 15 | if (code !== 0) { 16 | console.error(`Child process exited with code ${code} and signal ${signal}`); 17 | } else { 18 | console.log('Child process finished successfully'); 19 | } 20 | }); 21 | -------------------------------------------------------------------------------- /packages/insomnia-inso/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | 3 | export default defineConfig({ 4 | test: { 5 | hideSkippedTests: true, 6 | env: { 7 | DEFAULT_APP_NAME: process.env.DEFAULT_APP_NAME || 'insomnia-app', 8 | }, 9 | server: { 10 | deps: { 11 | inline: ['tinykeys'], 12 | }, 13 | }, 14 | }, 15 | }); 16 | -------------------------------------------------------------------------------- /packages/insomnia-scripting-environment/src/objects/index.ts: -------------------------------------------------------------------------------- 1 | export * as Collection from './collection'; 2 | export * from './interfaces'; 3 | export * from './insomnia'; 4 | export * from './request'; 5 | export * from './environments'; 6 | export * from './urls'; 7 | export * from './cookies'; 8 | export * from './console'; 9 | export * from './request-info'; 10 | export * from './async_objects'; 11 | export * from './test'; 12 | export * from './execution'; 13 | export * from './proxy-configs'; 14 | export * from './folders'; 15 | export * from './request-info'; 16 | -------------------------------------------------------------------------------- /packages/insomnia-scripting-environment/src/objects/utils.ts: -------------------------------------------------------------------------------- 1 | /** ignore */ 2 | export function checkIfUrlIncludesTag(url: string): boolean { 3 | return /{%/.test(`${url}`) || /%}/.test(`${url}`) || /{{/.test(`${url}`) || /}}/.test(`${url}`); 4 | } 5 | -------------------------------------------------------------------------------- /packages/insomnia-scripting-environment/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config'; 2 | 3 | export default defineConfig({ 4 | test: { 5 | hideSkippedTests: true, 6 | }, 7 | }); 8 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/.gitignore: -------------------------------------------------------------------------------- 1 | # ignore the response/unit test result files from the nedb fixture used by inso 2 | fixtures/inso-nedb/insomnia.RequestVersion.db 3 | fixtures/inso-nedb/insomnia.Response.db 4 | fixtures/inso-nedb/insomnia.UnitTestResult.db 5 | 6 | # ignore the metadata files that are not used by inso 7 | fixtures/inso-nedb/insomnia.*Meta.db 8 | 9 | # ignore the stats db file 10 | fixtures/inso-nedb/insomnia.Stats.db 11 | 12 | # ignore the settings db file because inso shouldn't use it 13 | fixtures/inso-nedb/insomnia.Settings.db 14 | 15 | # ignore some db files for security reasons 16 | fixtures/inso-nedb/insomnia.ClientCertificate.db 17 | fixtures/inso-nedb/insomnia.CookieJar.db 18 | fixtures/inso-nedb/insomnia.GitRepository.db 19 | fixtures/inso-nedb/insomnia.OAuth2Token.db 20 | fixtures/inso-nedb/insomnia.PluginData.db 21 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/docs/imgs/artifacts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/docs/imgs/artifacts.png -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/docs/imgs/editor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/docs/imgs/editor.png -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/docs/imgs/playwright-inspector.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/docs/imgs/playwright-inspector.jpg -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/docs/imgs/playwright-trace.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/docs/imgs/playwright-trace.jpg -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/docs/imgs/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/docs/imgs/refresh.png -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/certificates/fake.pfx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/certificates/fake.pfx -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/certificates/rootCA.srl: -------------------------------------------------------------------------------- 1 | 61A0983D819D0CF539B87C44C8D8030451AF90F0 2 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/constants.ts: -------------------------------------------------------------------------------- 1 | const getCreds = (user: string, pass: string, encoding: BufferEncoding) => ({ 2 | raw: { user, pass }, 3 | encoded: { 4 | user: Buffer.from(user, encoding).toString(), 5 | pass: Buffer.from(pass, encoding).toString(), 6 | }, 7 | combined: Buffer.from(`${user}:${pass}`, encoding).toString('base64'), 8 | }); 9 | 10 | export const basicAuthCreds = { 11 | utf8: getCreds('user', 'pass', 'utf8'), 12 | latin1: getCreds('user-é', 'pass-é', 'latin1'), 13 | }; 14 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/files/dummy.csv: -------------------------------------------------------------------------------- 1 | a,b,c 2 | 1,2,3 3 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/files/dummy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/files/dummy.pdf -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/files/dummy.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 9 | xxx-777-xxx-123 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/files/rawfile.txt: -------------------------------------------------------------------------------- 1 | raw file content -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/files/runner-data.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "scope": "uploda data", 4 | "value": "file_value0" 5 | }, 6 | { 7 | "scope": "uploda data", 8 | "value": "file_value1" 9 | } 10 | ] 11 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/global-environment.yaml: -------------------------------------------------------------------------------- 1 | type: environment.insomnia.rest/5.0 2 | name: global-environment 3 | meta: 4 | id: wrk_7a6debc2484d48db88897609ab21f0eb 5 | created: 1736618596041 6 | modified: 1736618596041 7 | environments: 8 | name: Base Environment 9 | meta: 10 | id: env_aace0582bc8c4445be6689f340a08c20 11 | created: 1728549301585 12 | modified: 1728549418314 13 | isPrivate: false 14 | data: 15 | global-base: 4444 16 | exampleString: globalenv0 17 | subEnvironments: 18 | - name: New Environment 19 | meta: 20 | id: env_a9aa1b50ed15403aacc30d50be6a11a7 21 | created: 1728549316977 22 | modified: 1728549426890 23 | isPrivate: true 24 | data: 25 | global-sub: 55555 26 | exampleString: globalenv1 27 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.GrpcRequest.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.GrpcRequest.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.Project.db: -------------------------------------------------------------------------------- 1 | {"_id":"proj_default-project","type":"Project","parentId":null,"modified":1632962424971,"created":1632962424971,"name":"Insomnia","remoteId":null} 2 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.ProtoDirectory.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.ProtoDirectory.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.ProtoFile.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.ProtoFile.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.UnitTest.db: -------------------------------------------------------------------------------- 1 | {"_id":"ut_babcaf85ec1b481ebed1e1cd1aa61a75","type":"UnitTest","parentId":"uts_b12681ace8eb4e5999b5b51677c4c269","modified":1632964811893,"created":1632962936043,"requestId":"req_f2cd394aad83485c8f7bee1b612165d5","name":"Returns 200","code":"const response1 = await insomnia.send();\nexpect(response1.status).to.equal(200);\nconst schema = {\n \"$schema\": \"http://json-schema.org/draft-07/schema#\",\n \"title\": \"Response Schema\",\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\n \"id\"\n ]\n}\nexpect(JSON.parse(response1.data)).to.be.jsonSchema(schema)"} 2 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.UnitTestSuite.db: -------------------------------------------------------------------------------- 1 | {"_id":"uts_b12681ace8eb4e5999b5b51677c4c269","type":"UnitTestSuite","parentId":"wrk_6bd09cdcf3c543829315b479f359ae48","modified":1632962932579,"created":1632962924332,"name":"Echo Test Suite"} 2 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/inso-nedb/insomnia.Workspace.db: -------------------------------------------------------------------------------- 1 | {"_id":"wrk_6bd09cdcf3c543829315b479f359ae48","type":"Workspace","parentId":"proj_default-project","modified":1632962830812,"created":1632962830812,"name":"Smoke Test API server 1.0.0","description":"","scope":"design"} 2 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.CaCertificate.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.CaCertificate.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.ClientCertificate.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.ClientCertificate.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.GrpcRequest.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.GrpcRequest.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.GrpcRequestMeta.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.GrpcRequestMeta.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.OAuth2Token.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.OAuth2Token.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.PluginData.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.PluginData.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.ProtoDirectory.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.ProtoDirectory.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.ProtoFile.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.ProtoFile.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.RequestGroupMeta.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.RequestGroupMeta.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.Stats.db: -------------------------------------------------------------------------------- 1 | {"_id":"sta_75eb607a69ce4fdba7c4056c9e56201d","type":"Stats","parentId":null,"modified":1694513922516,"created":1694435923608,"currentLaunch":1694513410381,"lastLaunch":1694503948477,"currentVersion":"2023.5.8","lastVersion":"2023.5.8","launches":5,"createdRequests":21,"deletedRequests":68,"executedRequests":6} 2 | {"_id":"sta_75eb607a69ce4fdba7c4056c9e56201d","type":"Stats","parentId":null,"modified":1694513953000,"created":1694435923608,"currentLaunch":1694513952999,"lastLaunch":1694513410381,"currentVersion":"2023.5.8","lastVersion":"2023.5.8","launches":6,"createdRequests":21,"deletedRequests":68,"executedRequests":6} 3 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.UnitTestSuite.db: -------------------------------------------------------------------------------- 1 | {"_id":"uts_6d26df3191ab46a08fe2e5859754e1cf","type":"UnitTestSuite","parentId":"wrk_1b49626a0a9442b7b9474a1f3493bb5d","modified":1694513741703,"created":1694513741703,"name":"New Suite"} 2 | {"_id":"uts_aeb27e8dade847ab89f53cab2c0eafbc","type":"UnitTestSuite","parentId":"wrk_a528e60334a54420a7b384bae215ad1b","modified":1694436073148,"created":1694436073148,"name":"Test Open API"} 3 | {"_id":"uts_c547332ddcda43ca8e47b489519b170f","type":"UnitTestSuite","parentId":"wrk_55a8240d025044d3a40eb40956126bec","modified":1694513485323,"created":1694513485323,"name":"New Suite"} 4 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.WebSocketPayload.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.WebSocketPayload.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.WebSocketRequest.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.WebSocketRequest.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.WebSocketResponse.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/insomnia-legacy-db/insomnia.WebSocketResponse.db -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/route_guide.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia-smoke-test/fixtures/route_guide.bin -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/script-global-environment.yaml: -------------------------------------------------------------------------------- 1 | type: environment.insomnia.rest/5.0 2 | name: Script Environment 3 | meta: 4 | id: wrk_bf4544d564f64a38b9628ae682158e56 5 | created: 1730427817756 6 | modified: 1747723771584 7 | environments: 8 | name: Base Script Env 9 | meta: 10 | id: env_0d92f8b4fa49360a4ef56655e915c6c769071121 11 | created: 1730427817763 12 | modified: 1747723747587 13 | isPrivate: false 14 | data: 15 | __env_source: base 16 | subEnvironments: 17 | - name: Sub Script Env 18 | meta: 19 | id: env_8e44039256ed4ed68add7567c697d6b3 20 | created: 1747723719954 21 | modified: 1747723755787 22 | isPrivate: false 23 | sortKey: 1747723719954 24 | data: 25 | __env_source: sub 26 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/fixtures/swagger2.yaml: -------------------------------------------------------------------------------- 1 | swagger: "2.0" 2 | info: 3 | version: 1.0.0 4 | title: E2E testing specification - swagger 2 5 | description: This is a specification representing the oas3.yaml spec 6 | schemes: 7 | - http 8 | host: 127.0.0.1:4010 9 | tags: 10 | - name: custom-tag 11 | paths: 12 | /pets/1: 13 | get: 14 | responses: 15 | "200": 16 | "description": string 17 | summary: get pet by id 18 | operationId: findPetById 19 | tags: 20 | - custom-tag 21 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/server/basic-auth.ts: -------------------------------------------------------------------------------- 1 | import express from 'express'; 2 | import basicAuth from 'express-basic-auth'; 3 | 4 | import { basicAuthCreds } from '../fixtures/constants'; 5 | 6 | const { utf8, latin1 } = basicAuthCreds; 7 | 8 | const users = { 9 | [utf8.encoded.user]: utf8.encoded.pass, 10 | [latin1.encoded.user]: latin1.encoded.pass, 11 | }; 12 | 13 | export const basicAuthRouter = express.Router(); 14 | 15 | basicAuthRouter.use(basicAuth({ users })); 16 | 17 | basicAuthRouter.get('/', (_, res) => { 18 | res.status(200).header('content-type', 'text/plain').send('basic auth received'); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/server/mtls.ts: -------------------------------------------------------------------------------- 1 | import type { NextFunction, Response } from 'express'; 2 | import express from 'express'; 3 | 4 | export const mtlsRouter = express.Router(); 5 | 6 | mtlsRouter.use(clientCertificateAuth); 7 | 8 | async function clientCertificateAuth(req: any, res: Response, next: NextFunction) { 9 | if (!req.client.authorized) { 10 | return res.status(401).send({ error: 'Client certificate required' }); 11 | } 12 | 13 | next(); 14 | } 15 | 16 | mtlsRouter.get('/pets/:id', (req, res) => { 17 | res.status(200).send({ id: req.params.id }); 18 | }); 19 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/tests/critical/scratchpad.test.ts: -------------------------------------------------------------------------------- 1 | import { test } from '../../playwright/test'; 2 | 3 | test('can open scratchpad', async ({ page }) => { 4 | await page.getByTestId('user-dropdown').click(); 5 | await page.getByText('Log Out').click(); 6 | await page.getByLabel('Use the Scratch Pad').click(); 7 | await page.getByText('Welcome to the Scratch Pad').click(); 8 | }); 9 | -------------------------------------------------------------------------------- /packages/insomnia-smoke-test/tests/smoke/test-utils.ts: -------------------------------------------------------------------------------- 1 | import crypto from 'node:crypto'; 2 | 3 | /** 4 | * This function will return a random email. 5 | * @returns Random email 6 | */ 7 | export function getUserEmail() { 8 | return `insomnia.test.user+${getRandomId()}@gmail.com`; 9 | } 10 | 11 | /** 12 | * This function will return a random ID. 13 | * @returns Random ID 14 | */ 15 | export function getRandomId() { 16 | return crypto.randomUUID(); 17 | } 18 | 19 | /** 20 | * This function will return a random team name. 21 | * @returns Random team name 22 | */ 23 | export function getTeamName() { 24 | return `Insomnia ${crypto.randomInt(0, 100000)}`; 25 | } 26 | -------------------------------------------------------------------------------- /packages/insomnia-testing/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | -------------------------------------------------------------------------------- /packages/insomnia-testing/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "insomnia-testing", 4 | "license": "Apache-2.0", 5 | "version": "11.2.0-beta.0", 6 | "author": "Kong ", 7 | "repository": { 8 | "type": "git", 9 | "url": "git+https://github.com/Kong/insomnia.git", 10 | "directory": "packages/insomnia-testing" 11 | }, 12 | "bugs": { 13 | "url": "https://github.com/Kong/insomnia/issues" 14 | }, 15 | "main": "src/index.ts", 16 | "types": "src/index.ts", 17 | "scripts": { 18 | "lint": "eslint . --ext .js,.ts,.tsx --cache", 19 | "test": "vitest run", 20 | "type-check": "tsc --noEmit --project tsconfig.json" 21 | }, 22 | "homepage": "https://github.com/Kong/insomnia#readme", 23 | "description": "" 24 | } 25 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/01_empty.input.json: -------------------------------------------------------------------------------- 1 | [] 2 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/01_empty.output.js: -------------------------------------------------------------------------------- 1 | const { expect } = chai; 2 | 3 | // Clear active request before test starts (will be set inside test) 4 | beforeEach(() => insomnia.clearActiveRequest()); 5 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/02_empty-suite.input.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Example Suite", 4 | "tests": [] 5 | } 6 | ] 7 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/02_empty-suite.output.js: -------------------------------------------------------------------------------- 1 | const { expect } = chai; 2 | 3 | // Clear active request before test starts (will be set inside test) 4 | beforeEach(() => insomnia.clearActiveRequest()); 5 | 6 | describe('Example Suite', () => { 7 | }); 8 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/03_basic-suite.input.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Example Suite", 4 | "tests": [ 5 | { 6 | "name": "should return -1 when the value is not present", 7 | "code": "expect([1, 2, 3].indexOf(4)).to.equal(-1);\nexpect(true).to.equal(true);" 8 | }, 9 | { 10 | "name": "is an empty test", 11 | "code": "" 12 | } 13 | ] 14 | } 15 | ] 16 | 17 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/03_basic-suite.output.js: -------------------------------------------------------------------------------- 1 | const { expect } = chai; 2 | 3 | // Clear active request before test starts (will be set inside test) 4 | beforeEach(() => insomnia.clearActiveRequest()); 5 | 6 | describe('Example Suite', () => { 7 | it('should return -1 when the value is not present', async () => { 8 | expect([1, 2, 3].indexOf(4)).to.equal(-1); 9 | expect(true).to.equal(true); 10 | }); 11 | 12 | it('is an empty test', async () => { 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/04_nested-suite.input.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "name": "Parent Suite", 4 | "suites": [ 5 | { 6 | "name": "Nested Suite", 7 | "tests": [ 8 | { 9 | "name": "should return -1 when the value is not present", 10 | "code": "expect([1, 2, 3].indexOf(4)).to.equal(-1);\nexpect(true).to.equal(true);" 11 | }, 12 | { 13 | "name": "is an empty test", 14 | "code": "" 15 | } 16 | ] 17 | } 18 | ] 19 | } 20 | ] 21 | 22 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/fixtures/04_nested-suite.output.js: -------------------------------------------------------------------------------- 1 | const { expect } = chai; 2 | 3 | // Clear active request before test starts (will be set inside test) 4 | beforeEach(() => insomnia.clearActiveRequest()); 5 | 6 | describe('Parent Suite', () => { 7 | describe('Nested Suite', () => { 8 | it('should return -1 when the value is not present', async () => { 9 | expect([1, 2, 3].indexOf(4)).to.equal(-1); 10 | expect(true).to.equal(true); 11 | }); 12 | 13 | it('is an empty test', async () => { 14 | }); 15 | }); 16 | }); 17 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/index.ts: -------------------------------------------------------------------------------- 1 | import type { Test, TestSuite } from './generate'; 2 | 3 | export { generate, generateToFile } from './generate'; 4 | 5 | export type { Test, TestSuite }; 6 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/generate/util.ts: -------------------------------------------------------------------------------- 1 | export const escapeJsStr = (s: string) => { 2 | return s.replace(/'/g, "\\'"); 3 | }; 4 | 5 | export const indent = (level: number, code: string) => { 6 | if (!level || level < 0) { 7 | return code; 8 | } 9 | 10 | const prefix = new Array(level + 1).join(' '); 11 | return code 12 | .split('\n') 13 | .map(line => prefix + line) 14 | .join('\n'); 15 | }; 16 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/index.ts: -------------------------------------------------------------------------------- 1 | import type { Test, TestSuite } from './generate'; 2 | import type { TestResults } from './run'; 3 | export { generate, generateToFile } from './generate'; 4 | 5 | export { runTests, runTestsCli } from './run'; 6 | 7 | export type { Test, TestSuite, TestResults }; 8 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/run/entities.ts: -------------------------------------------------------------------------------- 1 | import type { Stats } from 'mocha'; 2 | 3 | interface TestErr { 4 | generatedMessage: boolean; 5 | name: string; 6 | code: string; 7 | actual: string; 8 | expected: string; 9 | operator: string; 10 | } 11 | 12 | interface NodeErr { 13 | message: string; 14 | stack: string; 15 | } 16 | 17 | export interface TestResult { 18 | id: string; 19 | title: string; 20 | fullTitle: string; 21 | file?: string; 22 | duration?: number; 23 | currentRetry: number; 24 | err: TestErr | NodeErr | {}; 25 | } 26 | 27 | export interface TestResults { 28 | failures: TestResult[]; 29 | passes: TestResult[]; 30 | pending: TestResult[]; 31 | stats: Stats; 32 | tests: TestResult[]; 33 | } 34 | -------------------------------------------------------------------------------- /packages/insomnia-testing/src/run/index.ts: -------------------------------------------------------------------------------- 1 | import type { TestResults } from './entities'; 2 | export { runTests, runTestsCli } from './run'; 3 | 4 | export type { TestResults }; 5 | -------------------------------------------------------------------------------- /packages/insomnia-testing/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Base Options: */ 4 | "esModuleInterop": true, 5 | "skipLibCheck": true, 6 | "target": "es2022", 7 | "allowJs": true, 8 | "resolveJsonModule": true, 9 | "moduleDetection": "force", 10 | "isolatedModules": true, 11 | "verbatimModuleSyntax": true, 12 | /* Strictness */ 13 | "strict": true, 14 | "noUncheckedIndexedAccess": true, 15 | "noImplicitOverride": true, 16 | /* If NOT transpiling with TypeScript: */ 17 | "module": "preserve", 18 | "noEmit": true, 19 | /* If your code runs in the DOM: */ 20 | "lib": ["es2022"] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /packages/insomnia/.gitignore: -------------------------------------------------------------------------------- 1 | dist 2 | build 3 | 4 | # Generated 5 | src/*.js 6 | src/*.js.map 7 | 8 | -------------------------------------------------------------------------------- /packages/insomnia/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "insomnia", 3 | "appId": "com.insomnia.app", 4 | "userDataFolder": "Insomnia", 5 | "productName": "Insomnia", 6 | "synopsis": "The Collaborative API Client and Design Tool", 7 | "icon": "https://github.com/kong/insomnia/blob/develop/packages/insomnia/src/icons/icon.ico?raw=true", 8 | "theme": "default", 9 | "lightTheme": "studio-light", 10 | "darkTheme": "default", 11 | "githubOrg": "Kong", 12 | "githubRepo": "insomnia", 13 | "segmentWriteKeys": { 14 | "development": "rTOCSvGV23cHGJyb3HI9EUQDNA6ar7ay", 15 | "production": "4l7QUfACrIcqvC913hiIwAA2BDYP2OJ1" 16 | }, 17 | "sentryDsn": "https://aaec2e800e644070a8daba5b7ad02c16@o1147619.ingest.sentry.io/6311804" 18 | } 19 | -------------------------------------------------------------------------------- /packages/insomnia/postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: { 3 | 'tailwindcss/nesting': {}, 4 | 'tailwindcss': {}, 5 | 'autoprefixer': {}, 6 | }, 7 | }; 8 | -------------------------------------------------------------------------------- /packages/insomnia/send-request/electron/index.js: -------------------------------------------------------------------------------- 1 | // This file implements just enough of the electron module to get sending requests to work 2 | module.exports = { 3 | app: { 4 | getPath: (/** @type {string} */ name) => 5 | name === 'temp' ? require('os').tmpdir() : require('path').join(require('os').tmpdir(), 'insomnia-send-request'), 6 | }, 7 | ipcMain: { 8 | on: () => { 9 | // Don't need this yet 10 | }, 11 | }, 12 | BrowserWindow: { 13 | getAllWindows: () => [], 14 | }, 15 | }; 16 | -------------------------------------------------------------------------------- /packages/insomnia/send-request/electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron", 3 | "main": "index.js" 4 | } 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/__mocks__/@sentry/electron.ts: -------------------------------------------------------------------------------- 1 | import { vi } from 'vitest'; 2 | 3 | export const captureException = vi.fn(); 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/curl/complex-input.sh: -------------------------------------------------------------------------------- 1 | curl \ 2 | --request POST \ 3 | -i \ 4 | --url http://localhost:8000/api/v1/send \ 5 | --header 'x-custom-header :foo bar' \ 6 | --header 'content-type: application/json' \ 7 | --header 'Cookie: foo=bar' \ 8 | --user 'My User:My:Secret:Password' \ 9 | --cookie NID=91=iOf1sU9Ovlns9Dzn2Ipz05syr2K4AlZ4Kgp84eRVLf3_6DgcNrkqpWg4lfUvCB5cNxD26t \ 10 | -H 'another-header: foo' \ 11 | --data '{"email_id": "tem_123"}'; 12 | 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/har/test-response.json: -------------------------------------------------------------------------------- 1 | {"key":"value"} -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/escaped-characters-input.json: -------------------------------------------------------------------------------- 1 | {"slash": "\\", "slashes": "\\\\", "quote": "\""} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/escaped-characters-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "slash": "\\", 3 | "slashes": "\\\\", 4 | "quote": "\"" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/extra-whitespace-input.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "foo": "bar", 4 | "arr": [ 5 | 1, 6 | 2, 7 | 8 | 3, 9 | 4 10 | 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/extra-whitespace-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "arr": [ 4 | 1, 5 | 2, 6 | 3, 7 | 4 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/minimal-whitespace-input.json: -------------------------------------------------------------------------------- 1 | {"foo":"bar","arr":[1,2,3,4],"object":{"foo":{},"empty":[]}} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/minimal-whitespace-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "arr": [ 4 | 1, 5 | 2, 6 | 3, 7 | 4 8 | ], 9 | "object": { 10 | "foo": {}, 11 | "empty": [] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/nunjucks-input.json: -------------------------------------------------------------------------------- 1 | {"quoted": "{{ bar }}", "variable": {{ hello }}, {# This is a comment #} "tag": {% foo 'bar', "baz" %}} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/nunjucks-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "quoted": "{{ bar }}", 3 | "variable": {{ hello }}, 4 | {# This is a comment #} 5 | "tag": {% foo 'bar', "baz" %} 6 | } 7 | 8 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/precision-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "float": 1.24815739284710478594274018450372432784024, 3 | "round": 1.000000, 4 | "invalid": foo, 5 | "exponent": 1E5 6 | } -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/precision-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "float": 1.24815739284710478594274018450372432784024, 3 | "round": 1.000000, 4 | "invalid": foo, 5 | "exponent": 1E5 6 | } 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/root-array-input.json: -------------------------------------------------------------------------------- 1 | [1,2,3] -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/root-array-output.json: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 3 | 2, 4 | 3 5 | ] 6 | 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/root-string-input.json: -------------------------------------------------------------------------------- 1 | "Hello World!" -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/root-string-output.json: -------------------------------------------------------------------------------- 1 | "Hello World!" 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/trailing-comma-input.json: -------------------------------------------------------------------------------- 1 | {"foo": "bar", "array": [1,2,3,4,],"last": "comma",} -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/trailing-comma-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "array": [ 4 | 1, 5 | 2, 6 | 3, 7 | 4, 8 | ], 9 | "last": "comma", 10 | } 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/unquoted-strings-input.json: -------------------------------------------------------------------------------- 1 | {foo: bar, bar: [1,2,3,number?]} -------------------------------------------------------------------------------- /packages/insomnia/src/common/__fixtures__/prettify/unquoted-strings-output.json: -------------------------------------------------------------------------------- 1 | { 2 | foo: bar, 3 | bar: [ 4 | 1, 5 | 2, 6 | 3, 7 | number? 8 | ] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__mocks__/render.ts: -------------------------------------------------------------------------------- 1 | import { vi } from 'vitest'; 2 | 3 | import * as renderOriginal from '../render'; 4 | 5 | const _render = vi.requireActual('../render') as typeof renderOriginal; 6 | _render.getRenderedGrpcRequest = vi.fn(); 7 | _render.getRenderedGrpcRequestMessage = vi.fn(); 8 | 9 | // WARNING: changing this to `export default` will break the mock and be incredibly hard to debug. Ask me how I know. 10 | module.exports = _render; 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/__tests__/strings.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest'; 2 | 3 | import * as models from '../../models'; 4 | import { WorkspaceScopeKeys } from '../../models/workspace'; 5 | import { getWorkspaceLabel } from '../get-workspace-label'; 6 | import { strings } from '../strings'; 7 | 8 | describe('getWorkspaceLabel', () => { 9 | it('should return document label', () => { 10 | const w = models.workspace.init(); 11 | w.scope = WorkspaceScopeKeys.design; 12 | expect(getWorkspaceLabel(w)).toBe(strings.document); 13 | }); 14 | 15 | it('should return collection label', () => { 16 | const w = models.workspace.init(); 17 | w.scope = WorkspaceScopeKeys.collection; 18 | expect(getWorkspaceLabel(w)).toBe(strings.collection); 19 | }); 20 | }); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/async-array-helpers.ts: -------------------------------------------------------------------------------- 1 | export const asyncFilter = async (arr: T[], predicate: (value: T, index: number, arr: T[]) => Promise) => { 2 | const results = await Promise.all(arr.map(predicate)); 3 | return arr.filter((_v, index) => results[index]); 4 | }; 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/get-workspace-label.ts: -------------------------------------------------------------------------------- 1 | import { isDesign, isEnvironment, isMockServer, type Workspace } from '../models/workspace'; 2 | import { strings } from './strings'; 3 | 4 | export const getWorkspaceLabel = (workspace: Workspace) => { 5 | if (isDesign(workspace)) { 6 | return strings.document; 7 | } 8 | 9 | if (isMockServer(workspace)) { 10 | return strings.mock; 11 | } 12 | 13 | if (isEnvironment(workspace)) { 14 | return strings.environment; 15 | } 16 | 17 | return strings.collection; 18 | }; 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/common/markdown-to-html.ts: -------------------------------------------------------------------------------- 1 | import dompurify from 'dompurify'; 2 | import { marked } from 'marked'; 3 | 4 | marked.setOptions({ 5 | renderer: new marked.Renderer(), 6 | gfm: true, 7 | breaks: false, 8 | pedantic: false, 9 | smartypants: false, 10 | headerIds: false, 11 | mangle: false, 12 | }); 13 | 14 | export const markdownToHTML = (input: string) => dompurify.sanitize(marked.parse(input)); 15 | -------------------------------------------------------------------------------- /packages/insomnia/src/cpp/resource.h: -------------------------------------------------------------------------------- 1 | #define IDR_INSOMNIA 103 2 | 3 | #include 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/datasets/access-token-urls.ts: -------------------------------------------------------------------------------- 1 | export default [ 2 | 'https://api.dropboxapi.com/oauth2/token', 3 | 'https://github.com/login/oauth/access_token', 4 | 'https://gitlab.example.com/oauth/token', 5 | 'https://slack.com/api/oauth.access', 6 | 'https://graph.facebook.com/v2.8/oauth/access_token', 7 | 'https://api.medium.com/v1/tokens', 8 | 'https://www.linkedin.com/oauth/v2/accessToken', 9 | 'https://www.googleapis.com/oauth2/v4/token', 10 | 'https://public-api.wordpress.com/oauth2/token', 11 | 'https://todoist.com/oauth/access_token', 12 | 'https://{{ shop }}.myshopify.com/admin/oauth/authorize', 13 | 'https://api.box.com/oauth2/token', 14 | 'https://api-ssl.bitly.com/oauth/access_token', 15 | 'https://api.imgur.com/oauth2/token', 16 | ]; 17 | -------------------------------------------------------------------------------- /packages/insomnia/src/datasets/authorization-urls.ts: -------------------------------------------------------------------------------- 1 | export default [ 2 | 'https://www.dropbox.com/oauth2/authorize', 3 | 'https://github.com/login/oauth/authorize', 4 | 'https://gitlab.example.com/oauth/authorize', 5 | 'https://slack.com/oauth/authorize', 6 | 'https://www.facebook.com/v2.8/dialog/oauth', 7 | 'https://medium.com/m/oauth/authorize', 8 | 'https://www.linkedin.com/oauth/v2/authorization', 9 | 'https://accounts.google.com/o/oauth2/v2/auth', 10 | 'https://public-api.wordpress.com/oauth2/authorize', 11 | 'https://{{ shop }}.myshopify.com/admin/oauth/access_token', 12 | 'https://todoist.com/oauth/authorize', 13 | 'https://account.box.com/api/oauth2/authorize', 14 | 'https://bitly.com/oauth/authorize', 15 | 'https://api.imgur.com/oauth2/authorize', 16 | ]; 17 | -------------------------------------------------------------------------------- /packages/insomnia/src/datasets/encodings.ts: -------------------------------------------------------------------------------- 1 | export default ['gzip', 'compress', 'deflate', 'br', 'identity', '*']; 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/datasets/header-names.ts: -------------------------------------------------------------------------------- 1 | export default [ 2 | 'Content-Type', 3 | 'Content-Length', 4 | 'Accept', 5 | 'Accept-Charset', 6 | 'Accept-Encoding', 7 | 'Accept-Language', 8 | 'Accept-Datetime', 9 | 'Authorization', 10 | 'Cache-Control', 11 | 'Cookie', 12 | 'Connection', 13 | 'Content-MD5', 14 | 'Date', 15 | 'Expect', 16 | 'Forwarded', 17 | 'From', 18 | 'Host', 19 | 'If-Match', 20 | 'If-Modified-Since', 21 | 'If-None-Match', 22 | 'If-Range', 23 | 'If-Unmodified-Since', 24 | 'Max-Forwards', 25 | 'Origin', 26 | 'Pragma', 27 | 'Proxy-Authorization', 28 | 'Range', 29 | 'Referer', 30 | 'TE', 31 | 'User-Agent', 32 | 'Upgrade', 33 | 'Via', 34 | 'Warning', 35 | ]; 36 | -------------------------------------------------------------------------------- /packages/insomnia/src/hidden-window.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | Hidden Browser Window 10 | 11 | 12 | 13 |

Hidden Browser Window

14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /packages/insomnia/src/icons/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/icons/background.png -------------------------------------------------------------------------------- /packages/insomnia/src/icons/icon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/icons/icon.icns -------------------------------------------------------------------------------- /packages/insomnia/src/icons/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/icons/icon.ico -------------------------------------------------------------------------------- /packages/insomnia/src/icons/install-spinner.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/icons/install-spinner.gif -------------------------------------------------------------------------------- /packages/insomnia/src/main/ipc/__tests__/extractPostmanDataDump.test.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | 3 | import { describe, expect, it } from 'vitest'; 4 | 5 | import extractPostmanDataDumpHandler from '../extractPostmanDataDump'; 6 | 7 | describe('Postman data dump extract', async () => { 8 | it('should extract collections and envs from postman data dump', async () => { 9 | const dataDumpFilePath = path.resolve(__dirname, 'multi_postman_data_dump.zip'); 10 | const extractResult = await extractPostmanDataDumpHandler(null, dataDumpFilePath); 11 | expect(extractResult).toMatchSnapshot(); 12 | }); 13 | }); 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/main/ipc/__tests__/multi_postman_data_dump.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/main/ipc/__tests__/multi_postman_data_dump.zip -------------------------------------------------------------------------------- /packages/insomnia/src/models/__tests__/request-meta.test.ts: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest'; 2 | 3 | import * as models from '../index'; 4 | 5 | describe('create()', () => { 6 | it('fails when missing parentId', async () => { 7 | expect(() => 8 | models.requestMeta.create({ 9 | pinned: true, 10 | }), 11 | ).toThrow('New RequestMeta missing `parentId`'); 12 | }); // it('fails when parentId prefix is not that of a Request', async () => { 13 | // expect(() => models.requestMeta.create({ parentId: 'greq_123' })).toThrow( 14 | // 'Expected the parent of RequestMeta to be a Request', 15 | // ); 16 | // }); 17 | }); 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/models/helpers/__mocks__/settings.ts: -------------------------------------------------------------------------------- 1 | import { vi } from 'vitest'; 2 | 3 | import * as settingsOriginal from '../settings'; 4 | 5 | const actual = vi.requireActual('../settings') as typeof settingsOriginal; 6 | 7 | actual.getConfigSettings = vi.fn(); 8 | 9 | module.exports = actual; 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/__tests__/testfile.txt: -------------------------------------------------------------------------------- 1 | Hello World! 2 | 3 | How are you? -------------------------------------------------------------------------------- /packages/insomnia/src/network/api-key/constants.ts: -------------------------------------------------------------------------------- 1 | export type ApiKeyAuthType = 'header' | 'queryParams' | 'cookie'; 2 | export const HEADER: ApiKeyAuthType = 'header'; 3 | export const QUERY_PARAMS: ApiKeyAuthType = 'queryParams'; 4 | export const COOKIE: ApiKeyAuthType = 'cookie'; 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/basic-auth/get-header.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHeader } from '../../models/request'; 2 | 3 | export function getBasicAuthHeader(username?: string | null, password?: string | null, encoding = 'utf8') { 4 | const name = 'Authorization'; 5 | const header = `${username || ''}:${password || ''}`; 6 | // @ts-expect-error -- TSCONVERSION appears to be a genuine error 7 | const authString = Buffer.from(header, encoding).toString('base64'); 8 | const value = `Basic ${authString}`; 9 | const requestHeader: RequestHeader = { 10 | name, 11 | value, 12 | }; 13 | return requestHeader; 14 | } 15 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/bearer-auth/get-header.ts: -------------------------------------------------------------------------------- 1 | import type { RequestHeader } from '../../models/request'; 2 | 3 | export function getBearerAuthHeader(token: string, prefix?: string) { 4 | const name = 'Authorization'; 5 | const value = `${prefix?.trim() || 'Bearer'} ${token.trim()}`; 6 | const requestHeader: RequestHeader = { 7 | name, 8 | value, 9 | }; 10 | return requestHeader; 11 | } 12 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/library/hello.proto: -------------------------------------------------------------------------------- 1 | // based on https://grpc.io/docs/guides/concepts.html 2 | 3 | syntax = "proto2"; 4 | 5 | package hello; 6 | 7 | service HelloService { 8 | rpc SayHello(HelloRequest) returns (HelloResponse); 9 | rpc LotsOfReplies(HelloRequest) returns (stream HelloResponse); 10 | rpc LotsOfGreetings(stream HelloRequest) returns (HelloResponse); 11 | rpc BidiHello(stream HelloRequest) returns (stream HelloResponse); 12 | } 13 | 14 | message HelloRequest { 15 | optional string greeting = 1; 16 | } 17 | 18 | message HelloResponse { 19 | required string reply = 1; 20 | } 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/library/nested/time/time.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | import "google/protobuf/timestamp.proto"; 3 | import "google/protobuf/empty.proto"; 4 | 5 | package time; 6 | 7 | service TimeService { 8 | rpc GetTime(google.protobuf.Empty) returns (TimeResponse); 9 | } 10 | 11 | message TimeResponse { 12 | google.protobuf.Timestamp timestamp_value = 27; 13 | } 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/library/resources/file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/library/resources/file.txt -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/library/root.proto: -------------------------------------------------------------------------------- 1 | syntax = "proto3"; 2 | 3 | package lib; 4 | 5 | import public 'hello.proto'; 6 | import public 'nested/time/time.proto'; 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/simulate-error/1.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/simulate-error/1.proto -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/simulate-error/2.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/simulate-error/2.proto -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/simulate-error/folder/5.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/simulate-error/folder/5.proto -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/simulate-error/nested/3.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/simulate-error/nested/3.proto -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/simulate-error/nested/4.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/simulate-error/nested/4.proto -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__fixtures__/simulate-error/nested/should-error.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/network/grpc/__fixtures__/simulate-error/nested/should-error.proto -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/__mocks__/index.ts: -------------------------------------------------------------------------------- 1 | import { vi } from 'vitest'; 2 | 3 | module.exports = { 4 | start: vi.fn(), 5 | sendMessage: vi.fn(), 6 | commit: vi.fn(), 7 | cancel: vi.fn(), 8 | cancelMultiple: vi.fn(), 9 | }; 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/grpc/parse-grpc-url.ts: -------------------------------------------------------------------------------- 1 | export const parseGrpcUrl = (grpcUrl: string): { url: string; enableTls: boolean; path: string } => { 2 | if (!grpcUrl) { 3 | return { url: '', enableTls: false, path: '' }; 4 | } 5 | 6 | if (grpcUrl.startsWith('unix:')) { 7 | return { 8 | url: grpcUrl, 9 | enableTls: false, 10 | path: '', 11 | }; 12 | } 13 | const url = new URL((grpcUrl.includes('://') ? '' : 'grpc://') + grpcUrl.toLowerCase()); 14 | return { 15 | url: url.host, 16 | enableTls: url.protocol === 'grpcs:', 17 | // remove trailing slashes from pathname; the full request 18 | // path is a concatenation of this parsed path + method path 19 | path: url.pathname.endsWith('/') ? url.pathname.slice(0, -1) : url.pathname, 20 | }; 21 | }; 22 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/o-auth-1/constants.ts: -------------------------------------------------------------------------------- 1 | export type OAuth1SignatureMethod = 'HMAC-SHA1' | 'RSA-SHA1' | 'HMAC-SHA256' | 'PLAINTEXT'; 2 | export const SIGNATURE_METHOD_HMAC_SHA1: OAuth1SignatureMethod = 'HMAC-SHA1'; 3 | export const SIGNATURE_METHOD_HMAC_SHA256: OAuth1SignatureMethod = 'HMAC-SHA256'; 4 | export const SIGNATURE_METHOD_RSA_SHA1: OAuth1SignatureMethod = 'RSA-SHA1'; 5 | export const SIGNATURE_METHOD_PLAINTEXT: OAuth1SignatureMethod = 'PLAINTEXT'; 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/network/set-cookie-util.ts: -------------------------------------------------------------------------------- 1 | import { cookiesFromJar, jarFromCookies } from '../common/cookies'; 2 | import type { Cookie } from '../models/cookie-jar'; 3 | 4 | export const addSetCookiesToToughCookieJar = async ({ setCookieStrings, currentUrl, cookieJar }: any) => { 5 | const rejectedCookies: string[] = []; 6 | const jar = jarFromCookies(cookieJar.cookies); 7 | for (const setCookieStr of setCookieStrings) { 8 | try { 9 | jar.setCookieSync(setCookieStr, currentUrl); 10 | } catch (err) { 11 | if (err instanceof Error) { 12 | rejectedCookies.push(err.message); 13 | } 14 | } 15 | } 16 | const cookies = (await cookiesFromJar(jar)) as Cookie[]; 17 | return { cookies, rejectedCookies }; 18 | }; 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/plugins/context/index.ts: -------------------------------------------------------------------------------- 1 | import * as _app from './app'; 2 | import * as _data from './data'; 3 | import * as _network from './network'; 4 | import * as _request from './request'; 5 | import * as _response from './response'; 6 | import * as _store from './store'; 7 | 8 | export type { PluginStore } from './store'; 9 | 10 | export const app = _app; 11 | export const data = _data; 12 | export const network = _network; 13 | export const request = _request; 14 | export const response = _response; 15 | export const store = _store; 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/plugins/themes.ts: -------------------------------------------------------------------------------- 1 | import r from './themes/colorblind-dark'; 2 | import a from './themes/default'; 3 | import k from './themes/gruvbox'; 4 | import q from './themes/high-contrast-light'; 5 | import l from './themes/hyper'; 6 | import b from './themes/legacy'; 7 | import e from './themes/material'; 8 | import i from './themes/one-dark'; 9 | import h from './themes/one-light'; 10 | import j from './themes/purple'; 11 | import m from './themes/railscasts'; 12 | import g from './themes/simple-dark'; 13 | import f from './themes/simple-light'; 14 | import o from './themes/solarized'; 15 | import p from './themes/solarized-dark'; 16 | import n from './themes/solarized-light'; 17 | import d from './themes/studio-dark'; 18 | import c from './themes/studio-light'; 19 | 20 | export default [a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r]; 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/plugins/themes/simple-light.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'light', 3 | displayName: 'Simple Light', 4 | theme: { 5 | styles: { 6 | transparentOverlay: { 7 | background: { 8 | default: 'rgba(240, 240, 240, 0.8)', 9 | }, 10 | foreground: { 11 | default: '#555', 12 | }, 13 | }, 14 | }, 15 | }, 16 | }; 17 | -------------------------------------------------------------------------------- /packages/insomnia/src/plugins/themes/solarized-light.ts: -------------------------------------------------------------------------------- 1 | export default { 2 | name: 'solarized-light', 3 | displayName: 'Solarized Light', 4 | theme: { 5 | background: { 6 | default: '#fdf6e3', 7 | success: '#859900', 8 | notice: '#b58900', 9 | warning: '#cb4b16', 10 | danger: '#dc322f', 11 | surprise: '#6c71c4', 12 | info: '#2aa198', 13 | }, 14 | foreground: { 15 | default: '#657b83', 16 | }, 17 | highlight: { 18 | default: 'rgb(142, 149, 146)', 19 | xxs: 'rgba(159, 167, 164, 0.05)', 20 | xs: 'rgba(159, 167, 164, 0.1)', 21 | sm: 'rgba(159, 167, 164, 0.2)', 22 | md: 'rgba(142, 149, 146, 0.3)', 23 | lg: 'rgba(142, 149, 146, 0.6)', 24 | xl: 'rgba(142, 149, 146, 0.8)', 25 | }, 26 | }, 27 | }; 28 | -------------------------------------------------------------------------------- /packages/insomnia/src/renderer.ts: -------------------------------------------------------------------------------- 1 | import './ui'; 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/static/entitlements.mac.inherit.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.cs.allow-jit 6 | 7 | com.apple.security.cs.allow-unsigned-executable-memory 8 | 9 | com.apple.security.cs.allow-dyld-environment-variables 10 | 11 | com.apple.security.cs.disable-library-validation 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /packages/insomnia/src/static/insomnia-core-logo_16x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/static/insomnia-core-logo_16x.png -------------------------------------------------------------------------------- /packages/insomnia/src/sync/delta/patch.ts: -------------------------------------------------------------------------------- 1 | import type { Operation } from './diff'; 2 | 3 | export function patch(a: string, operations: Operation[]) { 4 | let result = ''; 5 | 6 | for (const op of operations) { 7 | if (op.type === 'COPY') { 8 | result += a.slice(op.start, op.start + op.len); 9 | } else if (op.type === 'INSERT') { 10 | result += op.content; 11 | } 12 | } 13 | 14 | return result; 15 | } 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/sync/git/path-sep.ts: -------------------------------------------------------------------------------- 1 | import path from 'node:path'; 2 | 3 | const win32SepRegex = /\\/g; 4 | const posixSepRegex = /\//g; 5 | 6 | export function convertToPosixSep(filePath: string) { 7 | return filePath.replace(win32SepRegex, path.posix.sep); 8 | } 9 | 10 | export function convertToOsSep(filePath: string) { 11 | // is windows, so convert posix sep to windows sep 12 | if (path.sep === path.win32.sep) { 13 | return filePath.replace(posixSepRegex, path.win32.sep); 14 | } 15 | 16 | // is posix, so convert win32 sep to posix sep 17 | return filePath.replace(win32SepRegex, path.posix.sep); 18 | } 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/sync/store/drivers/base.ts: -------------------------------------------------------------------------------- 1 | export interface BaseDriver { 2 | hasItem(key: string): Promise; 3 | setItem(key: string, value: Buffer): Promise; 4 | getItem(key: string): Promise; 5 | removeItem(key: string): Promise; 6 | keys(prefix: string, recursive: boolean): Promise; 7 | clear(): Promise; 8 | } 9 | -------------------------------------------------------------------------------- /packages/insomnia/src/sync/vcs/normalize-backend-project-team.ts: -------------------------------------------------------------------------------- 1 | import type { BackendProject, Team } from '../types'; 2 | 3 | export interface BackendProjectWithTeams extends BackendProject { 4 | teams: Team[]; 5 | } 6 | 7 | export interface BackendProjectWithTeam extends BackendProject { 8 | team: Team; 9 | } 10 | 11 | export const normalizeBackendProjectTeam = (backend: BackendProjectWithTeams): BackendProjectWithTeam => ({ 12 | id: backend.id, 13 | name: backend.name, 14 | rootDocumentId: backend.rootDocumentId, 15 | // A backend project is guaranteed to exist on exactly one team 16 | team: backend.teams[0], 17 | }); 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-arrow-right.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-bitbucket-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-burger-menu.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-checkmark-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-checkmark.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-chevron-down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-chevron-up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-disconnected.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-elevator.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-ellipsis.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-empty.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-errors.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-file.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-folder-open.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-folder.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-gitlab-logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-gui.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-indentation.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-jump.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-key.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-laptop.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-minus-circle-fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-minus-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-play.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-prohibited.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-question-fill.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-receive.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-sec-cert.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-sent.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-success.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-sync.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-system-event.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-trashcan.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-triangle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-vial.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-warning-circle.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/icn-x.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnArrowRight.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnArrowRight = memo>(props => ( 3 | 4 | 5 | 6 | 7 | )); 8 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnBitbucketLogo.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnBitbucketLogo = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnBurgerMenu.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnBurgerMenu = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnCheckmark.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnCheckmark = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnCheckmarkCircle.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnCheckmarkCircle = memo>(props => ( 3 | 12 | 18 | 19 | )); 20 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnChevronDown.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnChevronDown = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnChevronUp.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnChevronUp = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnClock.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnClock = memo>(props => ( 3 | 17 | 18 | 19 | )); 20 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnDisconnected.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnDisconnected = memo>(props => ( 3 | 12 | 18 | 19 | )); 20 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnDragGrip.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnDragGrip = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnElevator.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnElevator = memo>(props => ( 3 | 12 | 13 | 14 | 15 | )); 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnEllipsis.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnEllipsis = memo>(props => ( 3 | 4 | 10 | 11 | )); 12 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnEllipsisCircle.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnEllipsisCircle = memo>(props => ( 3 | 12 | 13 | 17 | 23 | 24 | )); 25 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnEmpty.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnEmpty = memo>(props => ( 3 | 4 | )); 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnErrors.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnErrors = memo>(props => ( 3 | 4 | 5 | 9 | 10 | )); 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnFile.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnFile = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnFolder.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnFolder = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnFolderOpen.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnFolderOpen = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnGear.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnGear = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnGitlabLogo.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnGitlabLogo = memo>(props => ( 3 | 12 | 13 | 17 | 18 | )); 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnGui.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnGui = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnHeart.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnHeart = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnHome.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnHome = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnIndentation.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnIndentation = memo>(props => ( 3 | 12 | 13 | 14 | 15 | )); 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnInfo.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnInfo = memo>(props => ( 3 | 4 | 9 | 10 | )); 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnJump.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnJump = memo>(props => ( 3 | 4 | 5 | 6 | 7 | )); 8 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnKey.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnKey = memo>(props => ( 3 | 4 | 9 | 10 | )); 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnLaptop.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnLaptop = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnMinusCircle.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnMinusCircle = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnMinusCircleFill.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnMinusCircleFill = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnPlay.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnPlay = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnPlus.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnPlus = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnProhibited.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnProhibited = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnQuestionFill.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnQuestionFill = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnReceive.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnReceive = memo>(props => ( 3 | 12 | 17 | 18 | )); 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnSearch.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnSearch = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnSent.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnSent = memo>(props => ( 3 | 12 | 17 | 18 | )); 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnSuccess.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnSuccess = memo>(props => ( 3 | 4 | 5 | 9 | 10 | )); 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnSync.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnSync = memo>(props => ( 3 | 12 | 13 | 17 | 18 | )); 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnSystemEvent.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnSystemEvent = memo>(props => ( 3 | 12 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnTrashcan.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnTrashcan = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnTriangle.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnTriangle = memo>(props => ( 3 | 12 | 13 | 14 | 15 | )); 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnVial.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnVial = memo>(props => ( 3 | 4 | 5 | 6 | )); 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnWarning.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnWarning = memo>(props => ( 3 | 4 | 5 | 11 | 12 | )); 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnWarningCircle.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnWarningCircle = memo>(props => ( 3 | 12 | 13 | 19 | 20 | )); 21 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/assets/svgr/IcnX.tsx: -------------------------------------------------------------------------------- 1 | import React, { memo, type SVGProps } from 'react'; 2 | export const SvgIcnX = memo>(props => ( 3 | 12 | 13 | 17 | 18 | )); 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/base/dropdown/dropdown-hint.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | import type { PlatformKeyCombinations } from '../../../../common/settings'; 4 | import { Hotkey } from '../../hotkey'; 5 | 6 | interface Props { 7 | keyBindings: PlatformKeyCombinations; 8 | } 9 | 10 | export const DropdownHint = (props: Props) => { 11 | return ; 12 | }; 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/base/dropdown/index.ts: -------------------------------------------------------------------------------- 1 | export { Item as DropdownItem, Section as DropdownSection } from '@react-stately/collections'; 2 | export { type DropdownHandle, type DropdownProps, Dropdown } from './dropdown'; 3 | export { ItemContent } from './item-content'; 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/base/indeterminate-checkbox.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC, type HTMLAttributes, useEffect, useRef } from 'react'; 2 | 3 | interface Props extends HTMLAttributes { 4 | indeterminate: boolean; 5 | checked: boolean; 6 | } 7 | 8 | export const IndeterminateCheckbox: FC = ({ checked, indeterminate, ...otherProps }) => { 9 | const checkRef = useRef(null); 10 | 11 | useEffect(() => { 12 | if (checkRef.current) { 13 | checkRef.current.checked = checked; 14 | checkRef.current.indeterminate = indeterminate; 15 | } 16 | }, [checked, indeterminate]); 17 | 18 | return ; 19 | }; 20 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/base/modal-body.tsx: -------------------------------------------------------------------------------- 1 | import classnames from 'classnames'; 2 | import React, { type FC, type HTMLAttributes, memo, type ReactNode } from 'react'; 3 | 4 | interface Props extends HTMLAttributes { 5 | noScroll?: boolean; 6 | className?: string; 7 | children?: ReactNode; 8 | } 9 | 10 | export const ModalBody: FC = memo(({ className, children, noScroll, ...props }) => { 11 | const classes = classnames(className, 'modal__body theme--dialog__body', { 12 | 'modal__body--no-scroll': noScroll, 13 | }); 14 | return ( 15 |
16 | {children} 17 |
18 | ); 19 | }); 20 | 21 | ModalBody.displayName = 'ModalBody'; 22 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/base/modal-footer.tsx: -------------------------------------------------------------------------------- 1 | import classnames from 'classnames'; 2 | import React, { type FC, memo, type ReactNode } from 'react'; 3 | 4 | interface Props { 5 | className?: string; 6 | children: ReactNode; 7 | } 8 | 9 | export const ModalFooter: FC = memo(({ children, className }) => ( 10 |
{children}
11 | )); 12 | 13 | ModalFooter.displayName = 'ModalFooter'; 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/codemirror/modes/clojure.ts: -------------------------------------------------------------------------------- 1 | import CodeMirror from 'codemirror'; 2 | 3 | CodeMirror.extendMode('clojure', { fold: 'brace' } as Partial>); 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/dropdowns/dropdown-placement-hacks.ts: -------------------------------------------------------------------------------- 1 | // @TODO Remove these once we update the dropdown component. 2 | 3 | export const svgPlacementHack = { 4 | // This is a bit of a hack/workaround to avoid some larger changes that we'd need to do with dropdown item icons and tooltips. 5 | // Without this, the icon is too high with respect to the text because of Tooltip introducing some changes to the placement of the icon. 6 | marginTop: 1, 7 | }; 8 | 9 | export const tooltipIconPlacementHack = { 10 | // see above comment for `svgPlacementHack`. 11 | marginTop: 3, 12 | }; 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/auth/bearer-auth.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC } from 'react'; 2 | 3 | import { AuthInputRow } from './components/auth-input-row'; 4 | import { AuthTableBody } from './components/auth-table-body'; 5 | import { AuthToggleRow } from './components/auth-toggle-row'; 6 | 7 | export const BearerAuth: FC<{ disabled?: boolean }> = ({ disabled = false }) => ( 8 | 9 | 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/auth/components/auth-enabled-row.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC } from 'react'; 2 | 3 | import { AuthToggleRow } from './auth-toggle-row'; 4 | 5 | export const AuthEnabledRow: FC = () => ; 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/auth/components/auth-table-body.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC, type ReactNode } from 'react'; 2 | 3 | export const AuthTableBody: FC<{ children: ReactNode }> = ({ children }) => ( 4 |
5 | 6 | {children} 7 |
8 |
9 | ); 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/auth/digest-auth.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC } from 'react'; 2 | 3 | import { AuthInputRow } from './components/auth-input-row'; 4 | import { AuthTableBody } from './components/auth-table-body'; 5 | import { AuthToggleRow } from './components/auth-toggle-row'; 6 | 7 | export const DigestAuth: FC<{ disabled?: boolean }> = ({ disabled = false }) => ( 8 | 9 | 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/auth/netrc-auth.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC } from 'react'; 2 | 3 | export const NetrcAuth: FC = () => ( 4 |
5 |

6 |
7 | Your netrc file will be used to authenticate this request 8 |

9 |
10 | ); 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/auth/ntlm-auth.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC } from 'react'; 2 | 3 | import { AuthInputRow } from './components/auth-input-row'; 4 | import { AuthTableBody } from './components/auth-table-body'; 5 | import { AuthToggleRow } from './components/auth-toggle-row'; 6 | 7 | export const NTLMAuth: FC = () => ( 8 | 9 | 10 | 11 | 12 | 13 | ); 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/editors/body/raw-editor.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC, Fragment } from 'react'; 2 | 3 | import { CodeEditor } from '../../codemirror/code-editor'; 4 | 5 | interface Props { 6 | onChange: (value: string) => void; 7 | content: string; 8 | contentType: string; 9 | uniquenessKey: string; 10 | className?: string; 11 | } 12 | 13 | export const RawEditor: FC = ({ className, content, contentType, onChange, uniquenessKey }) => ( 14 | 15 | 26 | 27 | ); 28 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/graph-ql-explorer/graph-ql-default-value.tsx: -------------------------------------------------------------------------------- 1 | import { astFromValue, print } from 'graphql'; 2 | import React, { type FC, memo } from 'react'; 3 | 4 | import type { GraphQLFieldWithParentName } from './graph-ql-types'; 5 | 6 | interface Props { 7 | field: GraphQLFieldWithParentName; 8 | } 9 | 10 | export const GraphQLDefaultValue: FC = memo(({ field }) => { 11 | const fieldO: Record = field; 12 | 13 | if ('defaultValue' in fieldO && fieldO.defaultValue !== undefined) { 14 | const ast = astFromValue(fieldO.defaultValue, fieldO.type); 15 | const strDefault = ast ? print(ast) : ''; 16 | return {` = ${strDefault}`}; 17 | } 18 | return null; 19 | }); 20 | 21 | GraphQLDefaultValue.displayName = 'GraphQLDefaultValue'; 22 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/graph-ql-explorer/graph-ql-types.ts: -------------------------------------------------------------------------------- 1 | import type { SchemaReference } from 'codemirror-graphql/utils/SchemaReference'; 2 | import type { GraphQLField } from 'graphql'; 3 | 4 | type GraphQLFieldAny = GraphQLField; 5 | 6 | // It is possible for args to be undefined, but the exported type has it as required, so we override it here 7 | export type GraphQLFieldWithOptionalArgs = Omit & Partial>; 8 | 9 | export interface GraphQLFieldWithParentName extends GraphQLFieldWithOptionalArgs { 10 | parentName?: string; 11 | } 12 | 13 | export type ActiveReference = SchemaReference; 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/help-tooltip.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC, type ReactNode } from 'react'; 2 | 3 | import { Tooltip } from './tooltip'; 4 | 5 | interface Props { 6 | children: ReactNode; 7 | position?: string; 8 | className?: string; 9 | info?: boolean; 10 | } 11 | 12 | export const HelpTooltip: FC = props => { 13 | const { children, className, info } = props; 14 | return ( 15 | 16 | 17 | 18 | ); 19 | }; 20 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/html-element-wrapper.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FC, useEffect, useRef } from 'react'; 2 | 3 | interface Props { 4 | el: HTMLElement; 5 | onUnmount?: () => void; 6 | } 7 | 8 | /** 9 | * This component provides an easy way to place a raw DOM node inside a React application. 10 | * This was created to facilitate the layer between UI plugins and the Insomnia application. 11 | */ 12 | export const HtmlElementWrapper: FC = ({ el, onUnmount }) => { 13 | const ref = useRef(null); 14 | useEffect(() => { 15 | if (ref.current) { 16 | ref.current.innerHTML = ''; 17 | ref.current.appendChild(el); 18 | } 19 | return () => { 20 | onUnmount && onUnmount(); 21 | }; 22 | }); 23 | return
; 24 | }; 25 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/icon.tsx: -------------------------------------------------------------------------------- 1 | import { library } from '@fortawesome/fontawesome-svg-core'; 2 | import { fab } from '@fortawesome/free-brands-svg-icons'; 3 | import { far } from '@fortawesome/free-regular-svg-icons'; 4 | import { fas } from '@fortawesome/free-solid-svg-icons'; 5 | import { FontAwesomeIcon, type FontAwesomeIconProps } from '@fortawesome/react-fontawesome'; 6 | import React from 'react'; 7 | 8 | library.add(fas, far, fab); 9 | 10 | export const Icon = (props: FontAwesomeIconProps) => ; 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/modals/__tests__/utils.test.tsx: -------------------------------------------------------------------------------- 1 | import { describe, expect, it } from 'vitest'; 2 | 3 | import { wrapToIndex } from '../utils'; 4 | 5 | describe('wrapToIndex', () => { 6 | it.each([ 7 | { index: 0, maxCount: 4, result: 0 }, 8 | { index: 1, maxCount: 4, result: 1 }, 9 | { index: 3, maxCount: 3, result: 0 }, 10 | { index: -1, maxCount: 3, result: 2 }, 11 | { index: -3, maxCount: 3, result: 0 }, 12 | ])('%p', ({ index, maxCount, result }) => { 13 | expect(wrapToIndex(index, maxCount)).toBe(result); 14 | }); 15 | 16 | it('throws when max is negative', () => { 17 | const index = 1; 18 | const maxCount = -1; 19 | const execute = () => wrapToIndex(index, maxCount); 20 | expect(execute).toThrow(); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/modals/git-repository-settings-modal/index.ts: -------------------------------------------------------------------------------- 1 | export { GitRepositorySettingsModal } from './git-repository-settings-modal'; 2 | export { GitProjectRepositorySettingsModal } from './git-project-repository-settings-modal'; 3 | export { GitProjectRepositoryCloneModal } from './git-project-repo-clone-modal'; 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/modals/utils.ts: -------------------------------------------------------------------------------- 1 | export const wrapToIndex = (index: number, maxCount: number) => { 2 | if (maxCount < 0) { 3 | throw new Error(`negative maximum is invalid: ${JSON.stringify({ index, maxCount })}`); 4 | } 5 | 6 | return (index + maxCount) % maxCount; 7 | }; 8 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/panes/blank-pane.tsx: -------------------------------------------------------------------------------- 1 | import React, { type FunctionComponent } from 'react'; 2 | 3 | import { Pane, PaneBody, PaneHeader } from './pane'; 4 | 5 | interface Props { 6 | type: 'request' | 'response'; 7 | } 8 | 9 | export const BlankPane: FunctionComponent = ({ type }) => ( 10 | 11 | 12 | 13 | 14 | ); 15 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/tags/grpc-tag.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const GrpcTag = () => ( 4 |
9 |
10 | gRPC 11 |
12 |
13 | ); 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/tags/websocket-tag.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const WebSocketTag = () => ( 4 |
5 | 6 | WS 7 | 8 |
9 | ); 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/themed-button/index.ts: -------------------------------------------------------------------------------- 1 | export { Button, type ButtonProps, type ButtonSizeEnum, type ButtonThemeEnum, type ButtonVariantEnum } from './button'; 2 | export { AsyncButton, type AsyncButtonProps } from './async-button'; 3 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/viewers/response-pdf-viewer.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | interface Props { 4 | body: Buffer; 5 | } 6 | 7 | export const ResponsePDFViewer = (props: Props) => { 8 | const url = `data:application/pdf;base64,${props.body.toString('base64')}`; 9 | 10 | return ; 11 | }; 12 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/components/viewers/viewers.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, it } from 'vitest'; 2 | 3 | import { unescapeForwardSlash } from '../../../common/misc'; 4 | 5 | it('unescape forward slash correctly', () => { 6 | const tests = [ 7 | { input: '{"path":"some\\/dir\\/file"}', expected: '{"path":"some/dir/file"}' }, 8 | { input: '{"pattern":"\\\\/abc"}', expected: '{"pattern":"\\\\/abc"}' }, 9 | { input: '{"weird":"\\\\\\/test"}', expected: '{"weird":"\\\\/test"}' }, 10 | ]; 11 | tests.forEach(({ input, expected }) => { 12 | const result = unescapeForwardSlash(input); 13 | expect(result).toBe(expected); 14 | }); 15 | }); 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/constant.ts: -------------------------------------------------------------------------------- 1 | // this a constant file just for renderer process 2 | 3 | export const INSOMNIA_TAB_HEIGHT = 40; 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/containers/app-hooks.tsx: -------------------------------------------------------------------------------- 1 | import { type FC, useEffect } from 'react'; 2 | 3 | import { useGlobalKeyboardShortcuts } from '../hooks/use-global-keyboard-shortcuts'; 4 | import { useSettingsSideEffects } from '../hooks/use-settings-side-effects'; 5 | import { useThemeChange } from '../hooks/use-theme-change'; 6 | 7 | export const AppHooks: FC = () => { 8 | useSettingsSideEffects(); 9 | useGlobalKeyboardShortcuts(); 10 | useThemeChange(); 11 | // Used for detecting if we just updated Insomnia and app --args or insomnia:// and 12 | useEffect(() => { 13 | setTimeout(() => window.main.halfSecondAfterAppStart(), 500); 14 | }, []); 15 | 16 | return null; 17 | }; 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/css/solid.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome Free 6.2.0 by @fontawesome - https://fontawesome.com 3 | * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) 4 | * Copyright 2022 Fonticons, Inc. 5 | */ 6 | :root, 7 | :host { 8 | --fa-style-family-classic: 'Font Awesome 6 Free'; 9 | --fa-font-solid: normal 900 1em/1 'Font Awesome 6 Free'; 10 | } 11 | 12 | @font-face { 13 | font-family: 'Font Awesome 6 Free'; 14 | font-style: normal; 15 | font-weight: 900; 16 | font-display: block; 17 | src: 18 | url('../webfonts/fa-solid-900.woff2') format('woff2'), 19 | url('../webfonts/fa-solid-900.ttf') format('truetype'); 20 | } 21 | 22 | .fas, 23 | .fa-solid { 24 | font-weight: 900; 25 | } 26 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-brands-400.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-brands-400.ttf -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-brands-400.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-brands-400.woff2 -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-solid-900.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-solid-900.ttf -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-solid-900.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-solid-900.woff2 -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-v4compatibility.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-v4compatibility.ttf -------------------------------------------------------------------------------- /packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-v4compatibility.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/css/lib/fontawesome/webfonts/fa-v4compatibility.woff2 -------------------------------------------------------------------------------- /packages/insomnia/src/ui/hooks/use-loading-record.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useState } from 'react'; 2 | 3 | export const useLoadingRecord = () => { 4 | const [loading, setLoading] = useState>({}); 5 | 6 | const startLoading = useCallback((id: string) => { 7 | setLoading(prevState => ({ ...prevState, [id]: true })); 8 | }, []); 9 | 10 | const stopLoading = useCallback((id: string) => { 11 | setLoading(prevState => ({ ...prevState, [id]: false })); 12 | }, []); 13 | 14 | const isLoading = useCallback((id: string) => Boolean(loading[id]), [loading]); 15 | 16 | return { startLoading, stopLoading, isLoading }; 17 | }; 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/hooks/use-resize-observer.tsx: -------------------------------------------------------------------------------- 1 | import { useEffect, useRef } from 'react'; 2 | 3 | export interface Size { 4 | width: number | undefined; 5 | height: number | undefined; 6 | } 7 | 8 | export const useResizeObserver = (ref: React.RefObject, onResize: (size: Size) => void) => { 9 | const onResizeRef = useRef<((size: Size) => void) | undefined>(undefined); 10 | onResizeRef.current = onResize; 11 | 12 | useEffect(() => { 13 | if (!ref.current) { 14 | return; 15 | } 16 | const observer = new ResizeObserver(([entry]) => { 17 | const { width, height } = entry.contentRect; 18 | onResizeRef.current?.({ width, height }); 19 | }); 20 | 21 | observer.observe(ref.current); 22 | 23 | return () => { 24 | observer.disconnect(); 25 | }; 26 | }, [ref]); 27 | }; 28 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/hooks/use-safe-reducer-dispatch.ts: -------------------------------------------------------------------------------- 1 | import { useCallback } from 'react'; 2 | import { useMountedState } from 'react-use'; 3 | 4 | export const useSafeReducerDispatch = (dispatch: (action: A) => void) => { 5 | const isMounted = useMountedState(); 6 | 7 | const safeDispatch = useCallback( 8 | (...args) => { 9 | if (isMounted()) { 10 | dispatch(...args); 11 | } 12 | }, 13 | [dispatch, isMounted], 14 | ); 15 | 16 | return safeDispatch; 17 | }; 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/hooks/use-safe-state.ts: -------------------------------------------------------------------------------- 1 | import { useCallback, useState } from 'react'; 2 | import { useMountedState } from 'react-use'; 3 | 4 | export const useSafeState = (initialValue: S | (() => S)) => { 5 | const isMounted = useMountedState(); 6 | 7 | const [state, _setState] = useState(initialValue); 8 | 9 | const setState = useCallback( 10 | (...args) => { 11 | if (isMounted()) { 12 | _setState(...args); 13 | } 14 | }, 15 | [isMounted], 16 | ); 17 | 18 | // This needs to happen to force a tuple return type 19 | const returnValue: [typeof state, typeof setState] = [state, setState]; 20 | 21 | return returnValue; 22 | }; 23 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/hooks/use-theme-change.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react'; 2 | 3 | import * as themes from '../../plugins/misc'; 4 | import { useRootLoaderData } from '../routes/root'; 5 | 6 | export const useThemeChange = () => { 7 | const { settings } = useRootLoaderData(); 8 | // Handle System Theme change 9 | useEffect(() => { 10 | const matches = window.matchMedia('(prefers-color-scheme: dark)'); 11 | const applyTheme = () => themes.applyColorScheme(settings); 12 | matches.addEventListener('change', applyTheme); 13 | return () => { 14 | matches.removeEventListener('change', applyTheme); 15 | }; 16 | }); 17 | }; 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/collection_runner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/collection_runner.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/coowner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/coowner.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/git_projects.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/git_projects.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/invite_control.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/invite_control.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/multiple_tabs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/multiple_tabs.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/offline_experience.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/offline_experience.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/secret_vaults.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/secret_vaults.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/test_results.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/test_results.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/images/onboarding/uncommited_changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/packages/insomnia/src/ui/images/onboarding/uncommited_changes.png -------------------------------------------------------------------------------- /packages/insomnia/src/ui/routes/auth.logout.tsx: -------------------------------------------------------------------------------- 1 | import { type ActionFunction, redirect } from 'react-router'; 2 | 3 | import { logout } from '../../account/session'; 4 | 5 | export const action: ActionFunction = async () => { 6 | await logout(); 7 | return redirect('/auth/login'); 8 | }; 9 | -------------------------------------------------------------------------------- /packages/insomnia/src/ui/sentry.ts: -------------------------------------------------------------------------------- 1 | import * as Sentry from '@sentry/electron/renderer'; 2 | 3 | import { SENTRY_OPTIONS } from '../common/sentry'; 4 | 5 | export function initializeSentry() { 6 | Sentry.init({ 7 | ...SENTRY_OPTIONS, 8 | // enable sentry tracing 9 | integrations: [Sentry.browserTracingIntegration()], 10 | // set 0.1 sample rate for traces, only send 10% of traces, and check whether the limit is exceeded 11 | // https://konghq.sentry.io/settings/billing/overview/?category=transactions 12 | tracesSampleRate: 0.1, 13 | // anrDetection: isDevelopment() ? false : { 14 | // captureStackTrace: true, 15 | // }, 16 | }); 17 | Sentry.getCurrentScope().setUser(null); 18 | } 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/complex-input.sh: -------------------------------------------------------------------------------- 1 | curl \ 2 | --request POST \ 3 | -i \ 4 | --url http://localhost:8000/api/v1/send \ 5 | --header 'x-custom-header :foo bar' \ 6 | --header 'content-type: application/json' \ 7 | --header 'Cookie: foo=bar' \ 8 | --user 'My User:My:Secret:Password' \ 9 | --cookie NID=91=iOf1sU9Ovlns9Dzn2Ipz05syr2K4AlZ4Kgp84eRVLf3_6DgcNrkqpWg4lfUvCB5cNxD26t \ 10 | -H 'another-header: foo' \ 11 | --data '{"email_id": "tem_123"}'; 12 | 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/dollar-sign-input.sh: -------------------------------------------------------------------------------- 1 | curl 'https://test.dk' \ 2 | -H 'Origin: https://test.dk' \ 3 | -H 'Accept-Encoding: gzip, deflate, br' \ 4 | -H 'Accept-Language: en-US,en;q=0.9,da-DK;q=0.8,da;q=0.7,mt;q=0.6' \ 5 | -H $'Cookie: CookieTestConsent={stamp:\'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx==\'%2Cnecessary...' \ 6 | -H 'Connection: keep-alive' \ 7 | -H 'Pragma: no-cache' \ 8 | --data-binary '{"key":"TEST","websiteId":2,"storeId":4,"remove":true,"coupon":{"code":"erwrwer"}}' \ 9 | --compressed 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/form-input.sh: -------------------------------------------------------------------------------- 1 | curl https://insomnia.rest/signup \ 2 | -F file=@/home/user/file.txt \ 3 | -F foo=bar \ 4 | -F baz=qux 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/from-chrome-input.sh: -------------------------------------------------------------------------------- 1 | curl 'http://requestb.in/api/v1/bins' -H 'Cookie: __cfduid=d9e3031f00abce97dfdf7119a2d4620cc1478677611; _gat=1; session=eyJyZWNlbnQiOlsiMTlwd3g5NzEiLCIxYTNsaHg2MSJdfQ.CxF25Q.WfyUPLe9lQjtibrpD55c2gOD-YA; _ga=GA1.2.525721040.1478677612' -H 'Origin: http://requestb.in' -H 'Accept-Encoding: gzip, deflate' -H 'Accept-Language: en-US,en;q=0.8' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.98 Safari/537.36' -H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' -H 'Accept: */*' -H 'Referer: http://requestb.in/' -H 'X-Requested-With: XMLHttpRequest' -H 'Connection: keep-alive' --data 'private=false' --compressed 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/get-input.sh: -------------------------------------------------------------------------------- 1 | curl -X GET 'http://somesite.com/getdata' -i -G -d 'id=1234' 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/header-colon-input.sh: -------------------------------------------------------------------------------- 1 | curl https://insomnia.rest -H 'X-Something: foo: bar:baz' 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/multi-data-input.sh: -------------------------------------------------------------------------------- 1 | curl -X POST https://insomnia.rest/ \ 2 | --data "foo=bar" \ 3 | --data "baz=qux" \ 4 | -H Content-Type:application/x-www-form-urlencoded 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/multi-input.sh: -------------------------------------------------------------------------------- 1 | curl https://insomnia.rest/1/2/3; 2 | curl https://insomnia.rest/foo/bar; 3 | 4 | 5 | 6 | curl https://insomnia.rest/ --cookie foo=bar; 7 | echo "hello"; 8 | curl https://insomnia.rest; 9 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/no-url-input.sh: -------------------------------------------------------------------------------- 1 | curl -X POST 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/question-mark-input.sh: -------------------------------------------------------------------------------- 1 | curl http://192.168.1.1:9200/executions/_search\?pretty --data '{"query":{"match_all":{}}}' 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/simple-url-input.sh: -------------------------------------------------------------------------------- 1 | curl --compressed 'https://www.google.com/' -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/skip-squished-input.sh: -------------------------------------------------------------------------------- 1 | curl -XPOST -did=1234 https://insomnia.rest 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/url-only-input.sh: -------------------------------------------------------------------------------- 1 | curl https://insomnia.rest/foo/bar 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/curl/urlencoded-input.sh: -------------------------------------------------------------------------------- 1 | curl -X POST https://insomnia.rest/ \ 2 | --data "foo=bar&baz=qux" \ 3 | -H Content-Type:application/x-www-form-urlencoded 4 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/har/form-data-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "method": "POST", 3 | "url": "https://insomnia.rest/foo/bar", 4 | "httpVersion": "HTTP/1.1", 5 | "headers": [], 6 | "postData": { 7 | "params": [ 8 | { 9 | "name": "file", 10 | "fileName": "/home/user/test.txt" 11 | }, 12 | { 13 | "name": "foo", 14 | "value": "bar", 15 | "fileName": null, 16 | "contentType": null, 17 | "comment": "hahah" 18 | } 19 | ] 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/har/minimal-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "method": "GET", 3 | "httpVersion": "HTTP/1.1", 4 | "url": "https://insomnia.rest/foo/bar", 5 | "comment": "My Request" 6 | } 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/har/no-requests-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "log": { 3 | "version": "1.2", 4 | "creator": { 5 | "name": "WebInspector", 6 | "version": "537.36" 7 | }, 8 | "pages": [], 9 | "entries": [] 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/insomnia-1/minimal-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "_type": "export", 3 | "__export_format": 1, 4 | "__export_date": "2016-04-24T01:54:07.153Z", 5 | "__export_source": "insomnia.chrome.app:v2.6.10", 6 | "items": [ 7 | { 8 | "_type": "request_group", 9 | "_id": "c_1415844880580", 10 | "requests": [ 11 | { 12 | "_type": "request", 13 | "_id": "sc_1415844884091" 14 | } 15 | ] 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/insomnia-3/basic-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "_type": "export", 3 | "__export_format": 4, 4 | "__export_date": "2016-12-03T04:07:20.499Z", 5 | "__export_source": "insomnia.desktop.app:v4.0.1", 6 | "resources": [ 7 | { 8 | "_id": "wrk_123abc", 9 | "parentId": null, 10 | "modified": 1477939910686, 11 | "created": 1474340560460, 12 | "name": "Insomnia", 13 | "description": "", 14 | "certificates": [], 15 | "_type": "workspace" 16 | } 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/insomnia-4/basic-input.yaml: -------------------------------------------------------------------------------- 1 | _type: export 2 | __export_format: 4 3 | __export_date: '2016-12-03T04:07:20.499Z' 4 | __export_source: 'insomnia.desktop.app:v4.0.1' 5 | resources: 6 | - _id: wrk_123abc-v4 7 | parentId: null 8 | modified: 1477939910686 9 | created: 1474340560460 10 | name: Insomnia 11 | description: '' 12 | certificates: [] 13 | _type: workspace 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/openapi3/example-with-server-variables-input.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.2 2 | info: 3 | description: This API is for administrating files and file storages. 4 | license: 5 | name: Some license 6 | title: File and Storage API 7 | version: 0.1.0 8 | servers: 9 | - description: Devserver 10 | url: '{protocol}://{host}:{port}/{basePath}' 11 | variables: 12 | protocol: 13 | default: https 14 | port: 15 | default: '8080' 16 | host: 17 | default: localhost 18 | basePath: 19 | default: filemanagement 20 | paths: 21 | /files: 22 | get: 23 | operationId: find_files 24 | responses: 25 | '200': 26 | description: OK 27 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/openapi3/path-plugin-input.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | description: Description 4 | version: 1.0.0 5 | title: API 6 | servers: 7 | - url: 'https://api.insomnia.rest' 8 | paths: 9 | /path: 10 | x-kong-plugin-oidc: 11 | name: oidc 12 | enabled: true 13 | config: 14 | key_names: [api_key, apikey] 15 | key_in_body: false 16 | hide_credentials: true 17 | get: 18 | description: 'test' 19 | responses: 20 | '200': 21 | description: OK 22 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/postman-env/basic-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "fd5ae82a-d4c3-fa38-b53f-cddafb084535", 3 | "name": "Production Env", 4 | "values": [ 5 | { 6 | "key": "foo", 7 | "value": "production", 8 | "type": "text", 9 | "enabled": true 10 | }, 11 | { 12 | "key": "bar", 13 | "value": "hahah", 14 | "type": "text", 15 | "enabled": false 16 | } 17 | ], 18 | "timestamp": 1480561592875, 19 | "_postman_variable_scope": "environment", 20 | "_postman_exported_at": "2016-12-01T03:06:36.191Z", 21 | "_postman_exported_using": "Postman/4.8.3" 22 | } 23 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/postman-env/no-name-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "fd5ae82a-d4c3-fa38-b53f-cddafb084535", 3 | "values": [ 4 | { 5 | "key": "foo-and-bar", 6 | "value": "production-env", 7 | "type": "text", 8 | "enabled": true 9 | }, 10 | { 11 | "key": "disabled-key", 12 | "value": "hahah-haha", 13 | "type": "text", 14 | "enabled": false 15 | } 16 | ], 17 | "timestamp": 1480561592875, 18 | "_postman_variable_scope": "environment", 19 | "_postman_exported_at": "2016-12-01T03:06:36.191Z", 20 | "_postman_exported_using": "Postman/4.8.3" 21 | } 22 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/postman/minimal-v2_0-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "variables": [], 3 | "info": { 4 | "name": "Minimal Test Collection", 5 | "_postman_id": "250d5bd3-4f7e-8fd0-7744-35e942e36a78", 6 | "description": "A collection for testing", 7 | "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json" 8 | }, 9 | "item": [ 10 | { 11 | "request": {} 12 | } 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/importers/importers/fixtures/postman/minimal-v2_1-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "info": { 3 | "_postman_id": "b91b65ea-3876-46c8-b982-0b06dee32f5d", 4 | "name": "Minimal Test Collection", 5 | "description": "A collection for testing", 6 | "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json" 7 | }, 8 | "item": [ 9 | { 10 | "request": {} 11 | } 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/invariant.ts: -------------------------------------------------------------------------------- 1 | // Throw an error if the condition fails 2 | // > Not providing an inline default argument for message as the result is smaller 3 | export function invariant( 4 | condition: any, 5 | // Can provide a string, or a function that returns a string for cases where 6 | // the message takes a fair amount of effort to compute 7 | message?: string | (() => string), 8 | ): asserts condition { 9 | if (condition) { 10 | return; 11 | } 12 | // Condition not passed 13 | 14 | throw new Error(typeof message === 'function' ? message() : message); 15 | } 16 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/ndjson.test.ts: -------------------------------------------------------------------------------- 1 | import { expect, test } from 'vitest'; 2 | 3 | import { deserializeNDJSON, serializeNDJSON } from './ndjson'; 4 | 5 | test('can deserialize', () => { 6 | const data = '{"name":"test"}\n{"name":"test2"}\n'; 7 | const result = deserializeNDJSON(data); 8 | expect(result).toEqual([{ name: 'test' }, { name: 'test2' }]); 9 | }); 10 | test('can deserialize with empty lines', () => { 11 | const data = '{"name":"test"}\n\n{"name":"test2"}\n'; 12 | const result = deserializeNDJSON(data); 13 | expect(result).toEqual([{ name: 'test' }, { name: 'test2' }]); 14 | }); 15 | test('can serialize', () => { 16 | const data = [{ name: 'test' }, { name: 'test2' }]; 17 | const result = serializeNDJSON(data); 18 | expect(result).toEqual('{"name":"test"}\n{"name":"test2"}\n'); 19 | }); 20 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/ndjson.ts: -------------------------------------------------------------------------------- 1 | export const serializeNDJSON = (data: any[]): string => { 2 | return data.map((item: any) => JSON.stringify(item)).join('\n') + '\n'; 3 | }; 4 | export const deserializeNDJSON = (data: string): any[] => { 5 | return data 6 | .split('\n') 7 | .filter(e => e?.trim()) 8 | .map((line: string) => { 9 | try { 10 | return JSON.parse(line); 11 | } catch (e) { 12 | console.log('Failed to deserialize line', line, e); 13 | return undefined; 14 | } 15 | }) 16 | .filter(e => e !== undefined); 17 | }; 18 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/array-break-line-input.edn: -------------------------------------------------------------------------------- 1 | [:foo :bar] 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/array-break-line-output.edn: -------------------------------------------------------------------------------- 1 | [:foo 2 | :bar] -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/ignore-comma-input.edn: -------------------------------------------------------------------------------- 1 | {:foo :bar, 2 | :bar :foo} 3 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/ignore-comma-output.edn: -------------------------------------------------------------------------------- 1 | {:foo :bar 2 | :bar :foo} -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/minimal-object-input.edn: -------------------------------------------------------------------------------- 1 | {:foo :bar :foo-set #{} :arr []} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/minimal-object-output.edn: -------------------------------------------------------------------------------- 1 | {:foo :bar 2 | :foo-set #{} 3 | :arr []} -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/multilevel-object-input.edn: -------------------------------------------------------------------------------- 1 | {:level1 {:level2 {:level3 {:foo :bar :foo2 :bar2} :bar :foo}}} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/multilevel-object-output.edn: -------------------------------------------------------------------------------- 1 | {:level1 {:level2 {:level3 {:foo :bar 2 | :foo2 :bar2} 3 | :bar :foo}}} -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/property-with-metadata-input.edn: -------------------------------------------------------------------------------- 1 | {:foo #metadata :bar :another :bar} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/property-with-metadata-output.edn: -------------------------------------------------------------------------------- 1 | {:foo #metadata :bar 2 | :another :bar} 3 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/root-quoted-string-input.edn: -------------------------------------------------------------------------------- 1 | "Hello World!" -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/root-quoted-string-output.edn: -------------------------------------------------------------------------------- 1 | "Hello World!" 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/root-string-input.edn: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/root-string-output.edn: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/set-break-line-input.edn: -------------------------------------------------------------------------------- 1 | #{:foo :bar :john :doe} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/set-break-line-output.edn: -------------------------------------------------------------------------------- 1 | #{:foo 2 | :bar 3 | :john 4 | :doe} 5 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/string-allow-comma-input.edn: -------------------------------------------------------------------------------- 1 | {:foo "some, text"} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/string-allow-comma-output.edn: -------------------------------------------------------------------------------- 1 | {:foo "some, text"} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/string-inside-breakline-input.edn: -------------------------------------------------------------------------------- 1 | {:foo "some,\ntext"} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/edn/string-inside-breakline-output.edn: -------------------------------------------------------------------------------- 1 | {:foo "some,\ntext"} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/escaped-characters-input.json: -------------------------------------------------------------------------------- 1 | {"slash": "\\", "slashes": "\\\\", "quote": "\""} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/escaped-characters-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "slash": "\\", 3 | "slashes": "\\\\", 4 | "quote": "\"" 5 | } 6 | 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/escaped-unicode-input.json: -------------------------------------------------------------------------------- 1 | { "1": "\u00e9", "2": "\u043b", "escaped": "\u0412 \\u0430", "message": "\u65e0\u6548\u7684 Token" } 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/escaped-unicode-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "1": "é", 3 | "2": "л", 4 | "escaped": "В \\u0430", 5 | "message": "无效的 Token" 6 | } 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/extra-closing-brackets-input.json: -------------------------------------------------------------------------------- 1 | {"foo": []]]} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/extra-closing-brackets-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": [] 3 | ] 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/extra-whitespace-input.json: -------------------------------------------------------------------------------- 1 | { 2 | 3 | "foo": "bar", 4 | "arr": [ 5 | 1, 6 | 2, 7 | 8 | 3, 9 | 4 10 | 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/extra-whitespace-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "arr": [ 4 | 1, 5 | 2, 6 | 3, 7 | 4 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/minimal-whitespace-input.json: -------------------------------------------------------------------------------- 1 | {"foo":"bar","arr":[1,2,3,4],"object":{"foo":{},"empty":[]}} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/minimal-whitespace-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "arr": [ 4 | 1, 5 | 2, 6 | 3, 7 | 4 8 | ], 9 | "object": { 10 | "foo": {}, 11 | "empty": [] 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/nunjucks-input.json: -------------------------------------------------------------------------------- 1 | {"quoted": "{{ bar }}", "variable": {{ hello }}, {# This is a comment #} "tag": {% foo 'bar', "baz" %}} 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/nunjucks-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "quoted": "{{ bar }}", 3 | "variable": {{ hello }}, 4 | {# This is a comment #} 5 | "tag": {% foo 'bar', "baz" %} 6 | } 7 | 8 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/precision-input.json: -------------------------------------------------------------------------------- 1 | { 2 | "float": 1.24815739284710478594274018450372432784024, 3 | "round": 1.000000, 4 | "invalid": foo, 5 | "exponent": 1E5 6 | } -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/precision-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "float": 1.24815739284710478594274018450372432784024, 3 | "round": 1.000000, 4 | "invalid": foo, 5 | "exponent": 1E5 6 | } 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/root-array-input.json: -------------------------------------------------------------------------------- 1 | [1,2,3] -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/root-array-output.json: -------------------------------------------------------------------------------- 1 | [ 2 | 1, 3 | 2, 4 | 3 5 | ] 6 | 7 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/root-quoted-string-input.json: -------------------------------------------------------------------------------- 1 | "Hello World!" -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/root-quoted-string-output.json: -------------------------------------------------------------------------------- 1 | "Hello World!" 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/root-string-input.json: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/root-string-output.json: -------------------------------------------------------------------------------- 1 | Hello World! 2 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/trailing-comma-input.json: -------------------------------------------------------------------------------- 1 | {"foo": "bar", "array": [1,2,3,4,],"last": "comma",} -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/trailing-comma-output.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": "bar", 3 | "array": [ 4 | 1, 5 | 2, 6 | 3, 7 | 4, 8 | ], 9 | "last": "comma", 10 | } 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/unquoted-strings-input.json: -------------------------------------------------------------------------------- 1 | {foo: bar, bar: [1,2,3,number?]} -------------------------------------------------------------------------------- /packages/insomnia/src/utils/prettify/fixtures/unquoted-strings-output.json: -------------------------------------------------------------------------------- 1 | { 2 | foo: bar, 3 | bar: [ 4 | 1, 5 | 2, 6 | 3, 7 | number? 8 | ] 9 | } 10 | 11 | -------------------------------------------------------------------------------- /packages/insomnia/src/utils/url/protocol.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Set a default protocol for a URL 3 | * @param url URL to set protocol on 4 | * @param [defaultProto='http:'] default protocol 5 | */ 6 | export const setDefaultProtocol = (url: string, defaultProto?: string) => { 7 | const trimmedUrl = url.trim(); 8 | defaultProto = defaultProto || 'http:'; 9 | 10 | // If no url, don't bother returning anything 11 | if (!trimmedUrl) { 12 | return ''; 13 | } 14 | 15 | // Default the proto if it doesn't exist 16 | if (!trimmedUrl.includes('://')) { 17 | return `${defaultProto}//${trimmedUrl}`; 18 | } 19 | 20 | return trimmedUrl; 21 | }; 22 | -------------------------------------------------------------------------------- /packages/insomnia/svgr.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | template: (variables, { tpl }) => tpl` 3 | import React, { memo, type SVGProps } from 'react'; 4 | 5 | export const ${variables.componentName} = memo>(props => ( 6 | ${variables.jsx} 7 | )); 8 | `, 9 | icon: true, 10 | replaceAttrValues: { 11 | '#000': '', 12 | '#FFF': 'currentColor', 13 | }, 14 | ext: 'tsx', 15 | prettier: true, 16 | prettierConfig: { 17 | arrowParens: 'avoid', 18 | singleQuote: true, 19 | parser: 'typescript', 20 | }, 21 | typescript: true, 22 | }; 23 | -------------------------------------------------------------------------------- /packages/insomnia/types/codemirror-graphql.d.ts: -------------------------------------------------------------------------------- 1 | import { GraphQLInfoOptions } from 'codemirror-graphql/info'; 2 | 3 | declare module 'codemirror-graphql/jump' { 4 | type ModifiedGraphQLJumpOptions = Omit & { 5 | onClick: GraphQLInfoOptions['onClick']; 6 | }; 7 | } 8 | -------------------------------------------------------------------------------- /packages/insomnia/types/hkdf.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'hkdf' { 2 | export default class HKDF { 3 | constructor(hashAlg: string, salt: string, ikm: string); 4 | 5 | derive(info: string, length: number, cb: (buffer: Buffer) => void): void; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /packages/insomnia/types/jsonlint.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'jsonlint-mod-fixed' { 2 | interface ParseErrorHash { 3 | expected?: string[]; 4 | line?: number; 5 | loc?: { 6 | first_column: number; 7 | first_line: number; 8 | last_column: number; 9 | last_line: number; 10 | }; 11 | message?: string; 12 | text?: string; 13 | token?: string | null; 14 | } 15 | 16 | export function parse(input: string): string; 17 | export namespace parser { 18 | export function parseError(str: string, hash: ParseErrorHash): void; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /packages/insomnia/types/nunjucks.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'nunjucks/browser/nunjucks' { 2 | export function configure(options: any); 3 | } 4 | -------------------------------------------------------------------------------- /packages/insomnia/types/objectpath.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'objectpath' { 2 | export function parse(str: string): string[]; 3 | 4 | export function stringify(arr: string | (string | number)[], quote?: '"' | "'", forceQuote?: boolean): string; 5 | 6 | export function normalize(data: string, quote?: '"' | "'", forceQuote?: boolean): string; 7 | } 8 | -------------------------------------------------------------------------------- /packages/insomnia/vitest.config.ts: -------------------------------------------------------------------------------- 1 | import { tmpdir } from 'node:os'; 2 | 3 | import { defineConfig } from 'vitest/config'; 4 | export default defineConfig({ 5 | test: { 6 | setupFiles: ['./setup-vitest.ts'], 7 | hideSkippedTests: true, 8 | env: { 9 | INSOMNIA_DATA_PATH: tmpdir(), 10 | }, 11 | server: { 12 | deps: { 13 | inline: ['tinykeys'], 14 | }, 15 | }, 16 | }, 17 | }); 18 | -------------------------------------------------------------------------------- /patches/README.txt: -------------------------------------------------------------------------------- 1 | This folder contains the patch files used to modify npm dependencies. 2 | See https://www.npmjs.com/package/patch-package 3 | -------------------------------------------------------------------------------- /screenshots/main.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Kong/insomnia/152a113a3d2fd50fbdfcf016cae1e274e903e778/screenshots/main.png --------------------------------------------------------------------------------