Commit Graph

6233 Commits

Author SHA1 Message Date
jackkav
feb0efbd16 fix lint 2026-06-03 08:44:41 +02:00
jackkav
e2a85e94e5 fix: make generate:autocomplete runnable and add CI check
- Switch generate:autocomplete to use esr (esbuild-runner) instead of
  node --experimental-strip-types, matching the pattern used across the
  monorepo for TypeScript script execution
- Add esbuild-runner.config.js to mark @getinsomnia/node-libcurl and
  electron as external, preventing the bundler from choking on the
  native .node addon transitively pulled in by send-request.ts
- Import directly from source files in the script to document the
  intent clearly (avoiding index.ts which re-exports send-request)
- Regenerate autocomplete-snippets.json (227 snippets, content matches
  the old hand-crafted file but now pretty-printed and complete)
- Add CI step in test.yml that runs generate:autocomplete and fails the
  build if the output differs from the committed file
2026-06-03 08:44:24 +02:00
jackkav
d032882ab3 use a more consistent method of renderer detection 2026-06-03 08:31:43 +02:00
jackkav
971532d762 remove unused 2026-06-03 08:16:24 +02:00
jackkav
e481b5c0a5 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.
2026-06-03 08:14:08 +02:00
jackkav
2ab0baad0f 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
2026-06-03 06:25:15 +02:00
jackkav
5f866aeb51 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.
2026-06-03 06:25:15 +02:00
jackkav
cf6b31ac8b fix tests 2026-06-03 06:25:15 +02:00
jackkav
6d13c2a5b3 lint 2026-06-03 06:25:15 +02:00
jackkav
e3da46b43f 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
2026-06-03 06:25:15 +02:00
jackkav
af04b45c88 decouple renderer from scripting 2026-06-03 06:25:15 +02:00
jackkav
3163265c4d serialise cookie 2026-06-03 06:25:15 +02:00
jackkav
24eddd1a77 fix plugin index import 2026-06-03 06:25:15 +02:00
jackkav
1a438fecf2 assert 2026-06-03 06:25:15 +02:00
jackkav
63814eda4d split cookie into network adapter 2026-06-03 06:25:15 +02:00
jackkav
e61ebb67f2 util stub 2026-06-03 06:25:15 +02:00
jackkav
e7faf9d406 tough-cookie ipc 2026-06-03 06:25:15 +02:00
jackkav
4f9498be9f add crypto bridges 2026-06-03 06:25:15 +02:00
jackkav
42c44598e0 vault adapter 2026-06-03 06:25:15 +02:00
jackkav
cd980046b3 restore node require plugin 2026-06-03 06:25:15 +02:00
jackkav
c63bd3853a polyfill events for jshint 2026-06-03 06:25:15 +02:00
jackkav
92cffe0fc2 plugin types 2026-06-03 06:25:15 +02:00
jackkav
50915ef1d5 fix import 2026-06-03 06:25:15 +02:00
jackkav
367aa3b07b ipc validate proto 2026-06-03 06:25:15 +02:00
jackkav
0c9ffbf6dd move plugin types 2026-06-03 06:25:15 +02:00
jackkav
6d8034a4b2 improve error 2026-06-03 06:25:15 +02:00
jackkav
45fdfc8f84 globalThis 2026-06-03 06:25:15 +02:00
jackkav
572b7a9ba7 add renderer errors 2026-06-03 06:25:15 +02:00
jackkav
7961d9715b trick react router ssr 2026-06-03 06:25:15 +02:00
jackkav
6ca40ce38d use export method 2026-06-03 06:25:15 +02:00
jackkav
da2a6a8a89 insomnia testing adapter 2026-06-03 06:25:15 +02:00
jackkav
46a019e285 update plan 2026-06-03 06:25:15 +02:00
jackkav
5663587893 remove ci step 2026-06-03 06:25:15 +02:00
jackkav
a7e5ee8a9c remove mime stuff 2026-06-03 06:25:15 +02:00
jackkav
392c4645fe fix: sort imports, use static TestResults type, remove unused analytics import
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-03 06:25:15 +02:00
jackkav
572313f585 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
2026-06-03 06:25:15 +02:00
jackkav
be85978d1f fix: sort imports in send route 2026-06-03 06:25:15 +02:00
jackkav
4a522b91c3 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"
2026-06-03 06:25:15 +02:00
jackkav
2e61bc9e4a 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.
2026-06-03 06:25:15 +02:00
jackkav
acdaaca75d 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
2026-06-03 06:25:14 +02:00
Jay Wu
d61526496e fix(e2e): run e2e for release branches (#10004) 2026-06-03 00:40:24 +00:00
Shelby
13b60292d6 chore: add konnect smoke tests (#10014) 2026-06-02 16:48:21 -07:00
Ryan Willis
4c83a808b7 fix(e2e): remove unnecessary seeding (#10012) 2026-06-02 15:42:20 -07:00
Alison Sabuwala
efe930fe0a feat: add options for adjusting LLM URL option (#9964) 2026-06-02 11:13:57 -04:00
yaoweiprc
26020af109 Fix inherited folder auth not applied correctly for OAuth2 requests [INS-2671] (#9999)
* tmp

* Fix the bug that inherited auth is not applied as expected

* Potential fix for pull request finding

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

* Add regression coverage for folder auth inheritance precedence (#10000)

* Initial plan

* test: add auth inheritance regression coverage

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
2026-06-02 10:04:51 +00:00
Curry Yang
d5b5a154c7 fix: adapt to theme (#9985)
* fix: adapt to theme

* Update packages/insomnia/src/ui/components/first-request-creation.tsx

Co-authored-by: Missy Turco <60163079+mcturco@users.noreply.github.com>

---------

Co-authored-by: Missy Turco <60163079+mcturco@users.noreply.github.com>
2026-06-02 09:57:04 +00: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
Kent Wang
1b755cb83e Fix: dev build environment not inject (#10008)
* fix build issue

* fix esbuild inject issue
2026-06-02 16:21:03 +08:00
Bingbing
de70e63bcb refactor: add aliases for insomnia-data (#10002) 2026-06-02 13:01:18 +08:00
Pavlos Koutoglou
5233680694 feat(analytics): add source field to creation and execution events [INS-2427] (#9933)
* feat: add source parameter to workspace and request actions for better tracking

* feat: add source tracking to various request creation actions and components

* feat: update onCreateDesignDocument to handle empty state in ProjectEmptyView

* feat: reorder import statements for consistency in request group actions dropdown

* feat: remove unused source parameter from createRequestFetcher submission

* feat: add source tracking to new workspace modal actions in various components
2026-06-01 16:18:35 +03:00