Commit Graph

523 Commits

Author SHA1 Message Date
Insomnia
2fcbf833a6 Bump app version to 13.1.0 (#10296) 2026-07-24 09:50:49 +08:00
Bingbing
8a1dc1ef62 perf: rewrite command palette search to eliminate UI freezes and stale results (#10257)
* perf: rewrite command palette search to eliminate UI freezes and stale results

Problems fixed:
- clientLoader blocked navigation on every palette open, freezing the UI during
  full sequential DB scan
- no AbortController: stale searches could overwrite newer results mid-type
- no debounce: every keystroke triggered a full DB traversal immediately
- React Aria's default contains filter re-filtered server-side fuzzy results,
  silently dropping valid matches and making fuzzy work redundant
- no warm baseline: palette started blank until the entire load completed

Changes:
- move fuzzyMatch/fuzzyMatchAll → insomnia-data/common-src/search.ts (shared,
  testable in node)
- move search logic → insomnia-data/node-src/services/helpers/command-search.ts
  - per-request AbortController cancellation via abort(requestId)
  - recursion depth guard (max 20) on request group traversal
  - safeParent() replaces non-null assertions, safe against orphaned documents
- add CommandSearchResult type in insomnia-data/src/command-search-types.ts
- add useCommandSearch hook: 250ms debounce + abort on filter change + warm
  baseline on mount
- add defaultFilter={() => true} to ComboBox, delegating all filtering to the
  service
- delete routes/commands.tsx

* fix

* fix
2026-07-17 01:07:38 +00:00
Jack Kavanagh
3842690f60 feat(templating): vetted npm libraries in the sandbox — uuid + ajv (M3) (#10244) 2026-07-16 12:53:23 +03:00
Curry Yang
02ddedb538 Feat/basic components m0 (#10230)
* refactor: components infra

* fix

* fix: data-* class

* rename cn to cls
2026-07-15 09:30:21 +00:00
Pavlos Koutoglou
4f5a72dc16 feat(INS-2933): first-request experience A/B experiment (13.1) (#10215)
* Create new methods colors

* Implement first request logic

* feat: enhance first request treatment logic with backend support and caching

* feat: add experiment assignment analytics and related utility functions

* feat: add reportRequestsCreated function to track request creation for first-request experiments

* feat: enhance request creation reporting with session tracking

* feat: add tests for reportRequestsCreated function to validate API interactions

* feat: refactor localStorage methods for better error handling and state management

* feat: enhance accessibility of error message in FirstRequestCreation component

* feat: simplify user ownership check in project component

* feat: update user tests to include onboarding state and related functions

* feat: replace reportRequestCreated function with maybeLatchRequestThreshold for request tracking

* feat: integrate onboarding state into first request treatment logic and refactor related functions

* feat: integrate onboarding state into FirstRequestCreation component and enhance treatment logic

* feat: implement maybeLatchRequestThreshold function for tracking first-request graduation

* feat: refactor onboarding request handling and replace reportRequestsCreated with latchRequestThresholdReached

* feat: simplify first request treatment logic and remove unused functions

* feat: update latchRequestThresholdReached to use PATCH method for idempotent threshold latch

* feat: update onboarding state interface and test to use reached_request_threshold instead of has_reached_request_threshold

* feat: update latchRequestThresholdReached to use PUT method and correct endpoint for idempotent threshold latch

* feat: remove reached_request_threshold from onboarding state and related tests

* feat: integrate request tracking with maybeLatchRequestThreshold in clientAction

* feat: update onboarding state handling and treatment logic in user module

* feat: update @getinsomnia/insomnia-v3-fetch to version 1.0.20 in package-lock and package.json

* feat: add padding to request URL bar and adjust MethodSelector alignment

* feat: enhance request threshold handling by adding per-account request count baseline

* feat: update analytics event emission for treatment assignments in first request flow
2026-07-10 18:10:53 +00:00
Jack Kavanagh
cc9288c218 feat(templating): QuickJS template-tag sandbox behind a flag, with e2e canary (#10207)
* feat(templating): PoC run plugin template tags in a QuickJS-WASM sandbox

Behind a new `templateTagSandboxEnabled` setting (default off), route plugin
template-tag execution through a QuickJS-WASM sandbox instead of invoking the
plugin's `run()` directly in the main process.

Approach (per PR #10072): bulk-copy render state into the sandbox as JSON,
rebuild the plugin `context` API in pure JS inside the sandbox, and bridge only
async work back to the host via the existing `pluginToMainAPI` handlers.
`node:crypto` is exposed as synchronous host functions so `require('crypto')`
works without a sync/async mismatch.

- templating/sandbox/: quickjs-runtime, marshal, host-bridge, in-sandbox-bootstrap,
  plugin-tag-sandbox (+ parity tests vs in-process tags and node:crypto)
- main/templating-worker-database.ts: route execute handlers through the sandbox
  when the flag is on; legacy path unchanged otherwise
- esbuild: keep quickjs-emscripten external so its .wasm resolves at runtime
- settings + scripting-settings UI toggle
- examples/insomnia-plugin-sandbox-demo: manual E2E fixture

Scope: template tags only; sandbox runs in main. require shim covers path + crypto
(other modules throw a clear error — follow-up work).

* test(smoke): e2e canary for the template-tag sandbox flag

Installs an inline probe plugin, renders its tags via the tag editor Live
Preview, and asserts the execution path flips main-process -> sandbox when
templateTagSandboxEnabled is toggled in Preferences > Scripting, with a
require('crypto') sha256 workload staying byte-identical across both paths.

* test(sandbox): suppress hardcoded-hmac-key semgrep finding on parity fixture

The HMAC key is a test vector for sandbox-vs-node:crypto parity, not a
credential; rename it to make that self-evident and add the repo-standard
nosemgrep suppression.

* fix(templating): contain sandbox plugin entry resolution to the plugin directory

Reject a package.json "main" that resolves outside the plugin's own folder
and bundled-plugin names that look like paths, so the sandbox source loader
cannot be steered into reading arbitrary files.

* fix(review): inline nosemgrep placement, plugin-load error context, cross-arch-safe canary

- Move the hardcoded-hmac-key suppression onto the flagged line (line-above
  placement was not honored by the scanner).
- Wrap getPluginEntrySource failures with the plugin name for diagnosability.
- Derive the canary's expected arch from the Electron main process instead of
  the Playwright runner so cross-arch setups can't flake the assertion.

* sec(templating): QuickJS template-tag sandbox additions  (#10209)

* fix(sandbox): enforce timeout on synchronous plugin loops

QuickJS's executePendingJobs() blocks the host thread until a synchronous
call returns, so the wall-clock deadline in drivePromiseToString was never
checked during a tight sync loop in plugin code, hanging the Electron main
process indefinitely. Add a QuickJS interrupt handler, which is polled
during synchronous execution, to enforce the deadline.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(sandbox): clamp crypto.randomBytes size to prevent OOM

hostCrypto.randomBytes(size) passed the sandboxed number straight to
Node's crypto.randomBytes with no upper bound, letting a plugin request
a multi-GB allocation (e.g. crypto.randomBytes(2 ** 31)) and crash the
host process. Clamp to 64KB before the call.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(sandbox): cap QuickJS heap to prevent unbounded allocation

QuickJS.newContext() had no memory limit, so a plugin allocating without
bound could exhaust the WASM heap and crash the host process. Set a 32MB
ceiling via ctx.runtime.setMemoryLimit().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(sandbox): resolve symlinks before validating plugin entry path

getPluginEntrySource's containment check compared raw path strings, so a
plugin directory with a symlinked entry (e.g. index.js -> ../../../etc/secret)
passed the check while fs.readFileSync followed the symlink and read the
out-of-directory target. Re-run the check against fs.realpathSync'd paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(sandbox): close util.render sandbox escape

context.util.render() bridged to the shared render() pipeline, whose Liquid
engine dispatches any registered tag's real run() directly, in-process,
regardless of templateTagSandboxEnabled. A sandboxed plugin could hand it a
string containing "{% anyTag %}" (including its own tag) and have that tag
execute completely unsandboxed. Verified with a PoC that reached
child_process execution from inside a plugin tag with no require() or Node
access.

util.render is now restricted to plain {{ variable }} interpolation (the
only real existing use, confirmed against all built-in tag call sites) via
a second Liquid engine with no tags registered; {% tag %} syntax now fails
to parse instead of dispatching. Default render() behavior is unchanged for
every other caller.

Also drops the dead renderDepth field's misleading doc comment: within one
sandboxed execution the envelope's renderDepth is always 0, so depth could
never exceed 1 regardless of enforcement — it couldn't have caught this
recursion anyway.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix(sandbox): fixed linting issue

* fix(sandbox): fixed linting issue

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: kwburns-kong <kyle.burns@konghq.com>
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-06 19:01:48 +00:00
Alison Sabuwala
72ef5cf563 feat: align list and onboarding UX to unified space model (#10033) 2026-06-23 12:46:14 -04:00
kwburns-kong
0036c7eda5 chore(dep): security dependency bump (#10085)
* chore(dep): resolves simple-git CVE-2026-6951

* chore(dep): resolves shell-quote CVE-2026-9277

* chore(dep): resolves multiple react-router CVEs, updated to v7.15.0

* chore(dep): resolves multiparty CVE-2026-8161, CVE-2026-8162

* chore(dep): resolves ws CVE-2026-45736

* chore(dep): resolves multiple fast-uri CVEs, updated to v3.1.2

* chore(dep): bump fast-xml-builder v1.2.0

* chore(dep): re-attempt to resolve resolve ws CVE-2026-45736

* chore(dep): bump @grpc/grpc-js and protobufjs

* fix(dep): Fixed react-router 7.15.0 cast issue

* chore(dep): bump dompurify to v3.4.8 and tar v7.5.16

* chore(dep): bump js-cookie v3.0.8

* sec(dep): bump csv-parse v6.2.1. Directly passed into requireInterceptor(), prototype pollution security issue within 5.5.5
2026-06-18 15:55:29 +00:00
Ryan Willis
7f609226ac fix: packaged inso segfault patch via pkg-safe consola reporter (#10035) 2026-06-08 19:30:58 +00:00
Jack Kavanagh
79c544238b feat: disable nodeIntegration in renderer mainWindow, remove Node import check tooling (#9996)
* Add vault-crypto/mime utilities and remove heavyweight third-party imports

- Add AES-GCM vault-crypto utility with tests (replaces node-forge usage)
- Add common/mime.ts to replace mime-types package dependency
- Replace tough-cookie import in response-cookies-viewer with inline parser
- Replace @grpc/grpc-js status import in grpc-status-tag with inline constant
- Replace electron.ipcRenderer in auth.clear-vault-key with showToast()
- Remove unused analytics call from window-utils

* Fix impure Date.now() key on CodeEditor; use setValue via ref instead

Replace key={Date.now()} with a useEffect that calls editorRef.current.setValue(snippet)
whenever snippet changes, keeping the editor mounted. Also apply prettier fixes from quick-check.

* fix: address Copilot review comments on PR #9992

- vault-crypto: replace forge-in-renderer with IPC bridge (main process
  retains forge; renderer calls window.main.vault.{en,de}cryptSecretValue)
- mime.ts: expand lookup table to 48 entries (webp, wasm, mp4, docx, xlsx,
  fonts, audio/video, etc.) and fix remaining mime-types import in send route
- response-viewer: move charset alias map to module level; normalise iconv-lite
  alias names (utf8, latin1, win1252, …) to WHATWG labels for TextDecoder
- auth.clear-vault-key: fix typo "all you local" → "all your local"

* fix: sort imports in send route

* feat: disable nodeIntegration in renderer mainWindow, remove import check tooling

- Set nodeIntegration:false and contextIsolation:true on mainWindow webPreferences
  (hidden window keeps nodeIntegration:true for user script execution)
- Split script-security-rules.ts out of script-security-policy.ts so the renderer
  can import display-only constants without pulling in require-interceptor
- Add templating/renderer-safe.ts with Node-free render/reload/getTagDefinitions;
  update all renderer callers to import from it instead of templating/index
- Split insomnia-testing generate.ts: move generateToFile to generate-to-file.ts
  so generate() has no Node imports; expose generateToFile from new entry point
- Move runTests execution to main process via IPC (run-tests channel) so the
  renderer routes no longer import the Mocha-backed test runner directly
- Delete vite-plugin-electron-node-require.ts, check-renderer-node-imports.ts,
  renderer-node-import-baseline.json and all related scripts/plugins now that the
  renderer bundle is free of Node built-in imports

* fix: sort imports, use static TestResults type, remove unused analytics import

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* remove mime stuff

* remove ci step

* update plan

* insomnia testing adapter

* use export method

* trick react router ssr

* add renderer errors

* globalThis

* improve error

* move plugin types

* ipc validate proto

* fix import

* plugin types

* polyfill events for jshint

* restore node require plugin

* vault adapter

* add crypto bridges

* tough-cookie ipc

* util stub

* split cookie into network adapter

* assert

* fix plugin index import

* serialise cookie

* decouple renderer from scripting

* Fix rebase conflicts and import path issues

- Fix incorrect ~/insomnia-data imports (should be insomnia-data package)
- Remove non-existent mime utility imports and provide simple fallback
- Remove incorrect analytics call from main process
- Remove unused imports (Settings, Cookie)
- Fix Response type annotation for getResponseBodyBuffer

* lint

* fix tests

* fix: use dynamic import for crypt in session.ts for main process compatibility

The session.ts module is used in both renderer and main process contexts (via sync.invoke IPC handlers). When running in the main process, window.main is undefined, causing TypeError when trying to access window.main.crypt.decryptAES().

Changes:
- Use dynamic import of crypt module (only loaded in main process context)
- In renderer: window.main.crypt is always available so dynamic import never executes
- In main process: dynamic import loads crypt with node:crypto support
- Protect loginStateChange() calls with window existence checks

This avoids bundling node:crypto in the Vite renderer build while still supporting both execution contexts.

Fixes E2E test failures in sync operations (remoteBackendProjects, _assertSession, etc.) caused by disabled nodeIntegration.

* fix: add aria-label to template tag preview and browser-safe encoding fallback

- Add aria-label="Live Preview" to textarea in TagEditor for better Playwright accessibility
- Add atob() fallback for decodeEncoding in browser contexts where Buffer isn't available
- Fixes smoke test element discovery for template tag preview modal

* fix: add explicit waits for element stability in environment test

Add toBeEnabled() and toBeVisible() waits before clicking elements in the
'kv pair environment can be updated' test. This prevents timeout errors from
unstable/flickering elements during modal interactions, especially in
high-concurrency shard execution.

* remove unused

* add autocomplete generate test step

* fix lint

* put analytics back in

* combine vault and crypto adapter

* remove unused export split

* remove insomnia-testing cruft, addressing feedback

* fix: use direct imports in insomnia-inso after insomnia-testing index.ts removal

* fix circular reference

* fix: move createElectronNotifier to main process to fix SSR error

Move the electron-dependent createElectronNotifier function from repo-file-watcher.ts
to git-service.ts to prevent electron imports from being evaluated in the renderer/SSR context.

* export har ipc bridge

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-04 13:40:44 +08:00
Bingbing
b09cde814d refactor: extract insomnia-data into workspace package (#10010)
Move insomnia-data models, services, database code, and common utilities into a dedicated workspace package. Update consumers to import from the new package entrypoints and declare workspace dependencies for the extracted package.
2026-06-02 09:49:10 +00:00
kwburns-kong
e038e317f7 feat: migrate templating engine from Nunjucks to LiquidJS (#9980)
* feat(nunjucks): Swapped templating engine from Nunjucks to liquidJS
* fix: resolved circular references and linting issue
* fix: updated baseline with new naming schema, no new imports introduced.
* fix: patch for playwright test (6/6)
* fix(smoke): handle multi-collection import in importFixture without timing out
* fix(smoke): ensure correct env selected before table edit
2026-05-29 20:41:27 +02:00
Fares Osman
b23e25bcae feat: Custom lint rules [INS-2338] (#9920)
* feat: adds functionality to lint specs with a user uploaded spectral ruleset file [INS-2338]

Co-authored-by: Copilot <copilot@github.com>

* chore: update var name

Co-authored-by: Copilot <copilot@github.com>

* chore: remove log

* feat: adds logic to persist rulesetFilePath

* feat: adds logic to remove a uploaded ruleset file and use default OAS ruleset

* feat: adds logic to clean up old ruleset file watcher

* chore: adds comment for testing

* chore: adds comment for clarity

* feat: adds logic to enable cunstom lint rules for cloud/git sync projects

Co-authored-by: Copilot <copilot@github.com>

* chore: remove file watcher for now

* chore: remove file watcher for now

Co-authored-by: Copilot <copilot@github.com>

* feat: adds proper logic to handle syncing rulesets for git sync/cloud sync projects

* chore: remove unneeded event

* feat: auto open up the lint pane if there are lint warnings/errors

Co-authored-by: Copilot <copilot@github.com>

* chore: update ApiSpec mutations to include rulesetContent as optional field; change from FormData to JSON

* feat: uses clientAction mutation hook to update db

* chore: adds logic to handle file not found

* feat: removes .spectral.yaml file name restriction

Co-authored-by: Copilot <copilot@github.com>

* chore: remove comment

* feat: adds some utils to validate user provided spectral ruleset file

Co-authored-by: Copilot <copilot@github.com>

* feat: adds view ruleset modal; slight refactoring to clean up code

Co-authored-by: Copilot <copilot@github.com>

* feat: fixes some styling

* chore: adds some comments

* chore: change function names/clean up

* feat: adds logic to flatten extended rulesets into inline prior to writing to disk

* chore: update comment

* chore: clean up

* chore: update comment

* chore: more comments

* chore: remove comment

* refactor: clean up code to make it more readable

* feat: address double writes when uploading

* chore: update comments/error messages

* chore: update comment

* test: adds unit tests for spectral ruleset validator

* test: adds unit tests for spectral ruleset validator

* test: add unit tests

* chore: cleanup code

* chore: make comments much clearer

* feat: adds proper error messages when user attempts to upload a rule set with severity tuples in extends

* feat: adds UI tweaks

* test: adds unit tests

* feat: adds proper logic to handle scenarios when file does not exist when syncing

* feat: adds proper logic to handle scenarios when file does not exist when syncing

* chore: sight clean up

* chore: bring back old code

* feat: adds logic to migrate rulesets when changing project types

* chore: update some styles

* chore: adds more styling changes

* chore: more styling updates

* feat: adds the ruleset to project scope instead of work space so git <> cloud can be compatible

* feat: adds functionality to get syncing project scoped rulesets working on cloud projects

* feat: adds logic to sync git FS/DB for project ruleset

* chore: refactor to use nedb as source of truth for rulesetContent for all projects.

* feat: adds logic to mitigate against repo replacing cloud project ruleset when migrating from cloud -> git project types

* chore: fixes imports order

* test: fixes e2e test

* fix: resolve aikido security suggestions

* chore: attempt to fix SSRF dns resolve

* chore: update error messages

* test: update tests

* chore: move helpers to common so inso can use them

* feat: adds functionality to flatten remote urls in spectral extends

* test: update tests

* feat: adds logic to validate remote extends before passing ruleset to spectral

* fix: set canDuplicate to false on the ProjectLintRuleset model

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* test: adds more test cases for verifying remote extends validations

* test: adds more test cases for verifying remote extends validations

* chore: disallow redirects when fetching in spectral resolver

* chore: adds aria labels for a11y

* chore: small clean ups

* test: update test

* feat: adds tooltip verbage to let user know that local file paths are flattened

* chore: address PR comments

* chore: address PR comments

* test: update unit test

* chore: address more PR feedback

* feat: adds ruleset file size restriction

* fix: address issue with git repo .spectral.yaml content overwriting the rulesetContent from cloud sync project when going from cloud -> git

* chore: remove unneeded function

* feat: adds segment event

* fix: adds logic to handle scenario where changing project type from cloud -> git would silently overwrite the cloud ruleset with the git one

* chore: typo

---------

Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Alison Sabuwala <alison.sabuwala1024@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-28 12:25:31 -04:00
Jack Kavanagh
7cd8854f24 feat: lift network.ts fs/path behind window.main.timeline IPC bridge (#9945)
* updated plan

* feat: lift network.ts fs/path use behind window.main.timeline IPC bridge

Removes `node:fs` and `node:path` from the renderer-reachable
`src/network/network.ts`. Three timeline-path constructions and two
`appendFile` calls are replaced with narrow `window.main.timeline.getPath`
(sync IPC) and `window.main.timeline.appendToFile` (async IPC) helpers
that live in main, where Node builtins belong.

Path validation in `appendToTimeline` mirrors `writeResponseBodyToFile`:
only paths inside the `responses/` directory ending in `.timeline` are
accepted, preventing a compromised renderer from writing arbitrary files.

Updates `config/renderer-node-import-baseline.json` to remove the two
`src/network/network.ts` entries — the baseline shrinks as intended.

Part of the nodeIntegration: false migration (PR B).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: address Aikido path-traversal feedback and mock window.main in network tests

- `getTimelinePath`: use `path.resolve` + `path.relative` check instead of
  `path.join` to prevent path-traversal attacks (Aikido medium severity finding)
- `network.test.ts`: add `vi.stubGlobal('window', ...)` mock for
  `window.main.timeline` so tests don't throw "window is not defined" now
  that `defaultSendActionRuntime` calls `window.main.timeline.appendToFile`

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* chore: suppress echoServer stdout in playwright config

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: update insomnia-inso logger for consola v3 compatibility

FancyReporter and BasicReporter were removed in consola v3; LogLevel became
a type-only export and the runtime enum is now LogLevels. Replace with
createConsola + a local BasicReporter shim, and import LogLevels in cli.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: address timeline IPC review concerns

- Convert timeline.getPath from sendSync to invoke (async) to avoid
  blocking the renderer thread; path construction has no I/O
- Extract getResponsesDir() shared helper so both getTimelinePath and
  appendToTimeline read the same source of truth, eliminating env-drift
  between the two calls
- Guard mkdir with a Set so the responses directory is only created once
  per process rather than on every appendFile call

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: upgrade consola to v3 and fix type/import issues in insomnia-inso

- Bump consola from ^2.15.3 to ^3.4.2 to match logger.ts which already used v3 API (createConsola)
- Fix logType → LogType (renamed in v3)
- Remove fancy option (removed in v3 ConsolaOptions)
- Use ConsolaInstance instead of Consola in result-report.ts so .log() resolves correctly
- Fix import sort in cli.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: restore Node.js-safe fallbacks in network.ts for inso CLI

The timeline IPC bridge introduced window.main.timeline calls without
guarding against the inso CLI context where window is not defined.
The electron shim (aliased in the inso bundle) provides app.getPath
as a fallback, matching the pre-bridge behaviour.

- getTimelinePath: check typeof window before using IPC; fall back to
  the electron shim path (os.tmpdir()/insomnia-send-request/responses)
- defaultSendActionRuntime.appendTimeline: fall back to fs.promises.appendFile
- tryToExecutePreRequestScript catch block: skip IPC appendToFile in
  Node.js context

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: sort node: imports before third-party and replace if/else with ternary in network.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: replace static fs/path imports with inline require() to pass renderer baseline check

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: replace process.type branching in network.ts with build-time adapter modules

Eliminates all runtime process.type and typeof window checks by introducing
network-adapter.renderer.ts and network-adapter.node.ts. Vite and Vitest resolve
the import to the renderer adapter; inso esbuild resolves to the node adapter.
No branching code remains in network.ts itself.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: restore object alias format in vite.config.ts to fix rollup build

Array-form alias with find:'~' was not matching prefix imports like
~/common/insomnia-fetch in the react-router production build. Object
form behaves correctly in Vite 7.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: resolve merge conflicts in logger.ts and cli.ts, restore AGENTS.md indented tree

- logger.ts: keep LogType (consola v3 casing), drop duplicate conflict markers
- cli.ts: remove stashed duplicate LogLevels import from conflict block
- AGENTS.md: restore indented hierarchy in Repository Structure and Data Model sections

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* remove cx

* fix: add path traversal guard to getTimelinePath in node adapter

Mirrors the same defence-in-depth check already present in the IPC handler.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix tests which use network from main

* flake

* refactor: replace bundler aliases with process.type runtime detection in network-adapter

Instead of three separate bundler aliases (Vite, esbuild main, esbuild inso),
network-adapter.ts now selects the correct adapter at runtime using
process.type === 'renderer'.

- Vite prod: process.type is already inlined as 'renderer' via define, so
  Rollup tree-shakes the node branch
- esbuild main: define process.type='browser' so esbuild tree-shakes renderer branch
- esbuild inso: define process.type=undefined so esbuild tree-shakes renderer branch
- Vitest (insomnia): existing renderer alias kept for test environment
- Vitest (inso): add renderer alias to match pre-existing test behaviour and
  avoid loading native node-libcurl module in tests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: restore vite alias for network-adapter to fix server bundle build

The react-router build produces both client and server bundles. Without
the alias, the server bundle encountered a runtime require() for
'./network-adapter.renderer' that couldn't resolve (Vite inlines
process.type='renderer' via define for the server build too, so Rollup
tree-shakes to the renderer branch, but the module gets externalized in
the server bundle rather than inlined, leaving a broken runtime require).

Restoring the alias ensures both builds inline network-adapter.renderer
directly, which is safe because the module only defines functions —
window.main is never called at module init time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feedback

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-27 09:44:48 +00:00
Ryan Willis
461a57e428 chore(analytics): consolidate analytics into shared insomnia-analytics package (#9915) 2026-05-14 10:34:40 -07:00
kwburns-kong
c124a66224 chore: resolve dependency, dead code, and other coding improvements (#9902)
* chore: resolves INS-2472
* fix: resolves INS-2473
* chore: resolves INS-2474
* chore: removed dead code, resolves (INS-2473).
* chore: updated @xmldom/xmldom to 0.9.10.
2026-05-08 21:41:17 +00:00
kwburns-kong
c8bdd6b1b7 chore: Security update for dependencies and github workflows (#9884)
* chore: resolves INS-2457, INS-2458, INS-2459, and INS-2460.
2026-05-01 09:45:33 -07:00
yaoweiprc
7809d458aa Update E2E test for git sync [INS-2258] (#9878)
* Add more test cases for git sync

* tmp

* Update package.json
2026-04-30 15:16:18 +02:00
Jack Kavanagh
92a79e799b Chore: playwright dx v2 (#9876) 2026-04-30 06:42:46 +02:00
yaoweiprc
933f56854e Git server for smoke test [INS-2258] (#9816)
* Git server for smoke test

* Try to solve flaky test

* feat: remove unused Git hook samples and add Credentials tab functionality

- Deleted various sample Git hook scripts from the git-server fixture, including post-update, pre-applypatch, pre-commit, pre-merge-commit, pre-push, pre-rebase, pre-receive, prepare-commit-msg, push-to-checkout, sendemail-validate, and update hooks.
- Introduced a new PreferencesCredentialsTab class to manage Git credentials within the Insomnia Preferences.
- Updated the PreferencesPage to include the new Credentials tab for Git credentials management.
- Enhanced the ProjectPage with a method to create a Git Sync project, including branch creation and switching.
- Added comprehensive tests for Git Sync functionality, including creating branches, committing changes, and merging branches.
- Updated UI components to support new features, including data-testid attributes for better testability.

Co-authored-by: Copilot <copilot@github.com>

* feat: update path import and add Git sync tests

* revert package.json

* Update package.json

* feat: add new dependencies for Git HTTP mock server and related utilities

* refactor: remove commented-out code in addAccessTokenGitCredential function

* fix: update export tests to use toHaveLength for file count assertions

---------

Co-authored-by: Copilot <copilot@github.com>
2026-04-28 09:44:54 +00:00
kwburns-kong
f220db351f feat: revamping pre/post scripting sandbox (#9794)
* feat: revamping pre/post scripting sandbox
* feat: added UI setting to enable/disable specific checks
2026-04-27 13:43:18 +00:00
Ryan Willis
ae49df6a57 fix: bump node-libcurl and add ipv6 tests (#9869) 2026-04-24 19:04:02 -07:00
Fares Osman
e7e3148f1b chore: update insomnia-plugin-ai (#9862) 2026-04-24 12:02:05 -04:00
kwburns-kong
b6c222e671 fix: resolves INS-2366 (#9852)
* fix: resolves INS-2366 dependency issues
2026-04-23 10:10:29 +08:00
Alison Sabuwala
d19e58a9f6 feat: integrate v3 user endpoints (#9785)
* feat: integrate v3 user endpoints

* feat: use public sdk for insomnia-api
2026-04-22 10:25:37 -04:00
Jack Kavanagh
4818dd1def refactor: shared browser safe helper cleanup (#9810)
* refactor: shared browser-safe helper cleanup

* style: run eslint autofix

* fix: preserve empty url handling

* fix: address remaining copilot comments on pr3

* remove loader class
2026-04-15 10:41:38 +02:00
Insomnia
b18f9528fc Bump app version to 12.5.1-alpha.0 2026-04-11 00:15:09 +00:00
Vivek Thuravupala
8ac6707321 fix: Use json-bigint for parsing JSON in the response template tag to handle large numbers [#8988] (#9728)
* Use json-bigint for parsing JSON in the response template tag [#8988]

Large numbers can lose precision when parsed using JSON.parse.

* Add unit tests to verify behavior of response template tag when handling large numbers [#8988]

* Add additional tests to cover floating point numbers

* Add inline documentation explaining usage of json-bigint + storeAsString

* Remove bespoke type definition for json-bigint; install existing one
2026-04-06 23:12:10 -07:00
Ryan Willis
52d64a0116 chore(deps): bump dependencies (#9756) 2026-04-03 19:08:00 -04:00
Insomnia
33e0c2e2e2 Bump app version to 12.5.0 2026-04-01 21:51:11 +00:00
Insomnia
8f6bf2af2f Bump app version to 12.5.0-beta.0 2026-03-26 02:32:17 +00:00
Ryan Willis
e6c51d59c1 chore: upgrade to electron 41.0.3 and node 24.14.0 (#9734)
* chore: upgrade to electron 41.0.3 and node 24.14.0
2026-03-24 15:05:41 -07:00
Curry Yang
5cb1a7016a test: e2e test for export (#9652)
* test: export

* update

* test: add more case

* feat: add har format test

* Update packages/insomnia-smoke-test/pages/project.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix: comment

* refactor: adapt to the latest pom structure

* fix

* fix

* fix comment

* Wait for preference modal hidden

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Remove duplicate codes

* fix workspace page ui

* fix comment

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-03-17 14:18:25 +08:00
Insomnia
0e30098049 Bump app version to 12.4.0 2026-03-04 23:55:20 +00:00
Insomnia
a7dbd115f9 Bump app version to 12.4.0-beta.0 2026-02-26 04:11:02 +00:00
Alison Sabuwala
9e29c40d87 feat: add URL backend for custom LLM endpoints (#9640)
* Add support for configuring custom OpenAI-compatible LLM endpoints via URL.
* Includes new URL backend component, backend service updates, unit tests, and
* UI consistency improvements across all LLM configuration components.
2026-02-09 18:36:45 -05:00
Ryan Willis
9c3b6178a4 feat: inso analytics [INS-1834] (#9621)
* feat: inso analytics [INS-1834]

* formatting + circular import fix

* fix: don't lose overrides when memDB contains Settings

* refactor: alleviate circular import additions

* review changes

* reduce refs to db type
2026-02-05 08:12:05 -07:00
Insomnia
58cc102bf8 Bump app version to 12.3.1 2026-02-05 05:24:10 +00:00
Insomnia
5d669097a9 Bump app version to 12.3.1-beta.1 2026-02-04 08:00:05 +00:00
Insomnia
a195fdf6a2 Bump app version to 12.3.1-beta.0 2026-02-02 00:05:36 +00:00
Insomnia
efdc35fd43 Bump app version to 12.3.0 2026-01-15 00:38:36 +00:00
Insomnia
04a1360620 Bump app version to 12.3.0-beta.0 2026-01-08 04:55:57 +00:00
Bingbing
bf4e0fc321 feat: integrate customer-io in-app messages (#9510) 2025-12-26 16:10:38 +08:00
Bingbing
5aad514412 chore: clean unused crypt code and hkdf (#9519) 2025-12-26 14:08:05 +08:00
Kent Wang
01c512ae34 feat: Allow empty credential configs to work with cloud providers (#9499)
* support empty credential config
* update plugin package
* update yaml for fix test error
2025-12-26 10:18:37 +08:00
Bingbing
a4250a53e3 chore: add circular reference check (#9065) 2025-12-23 02:44:40 +00:00
Insomnia
da68781c30 Bump app version to 12.2.0 2025-12-19 00:24:44 +00:00
Insomnia
139791a4fb Bump app version to 12.2.0-beta.1 2025-12-16 19:56:31 +00:00
Kent Wang
64a769bb77 feat: Add sampling support for MCP (#9395)
* squash commits for elicitation support
* add basic mcp support
* update ai plugin version
2025-12-15 16:29:34 +08:00
Insomnia
d0f07bf1d7 Bump app version to 12.2.0-beta.0 2025-12-12 09:15:42 +00:00