Files
insomnia/.gitignore
Jack Kavanagh f36e1a8403 Remove heavyweight third-party imports: mime-types, tough-cookie, @grpc/grpc-js, node-forge (#9992)
* 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

* Expose env vars to renderer via contextBridge window.env

In the renderer process with nodeIntegration disabled, process.env is not
available. The preload script now explicitly whitelists the env vars the
renderer needs and exposes them as window.env via contextBridge.
constants.ts reads from window.env in the renderer and falls back to
process.env for the inso CLI and main process.

* Wire vault-crypto into callers; fix window.crypto for workers and Node

- key-value-editor and templating/utils now import encryptSecretValue/
  decryptSecretValue from vault-crypto instead of vault, so the new
  implementation is actually exercised
- Replace window.crypto with globalThis.crypto so vault-crypto works in
  Web Workers (self.crypto) and Node.js/inso (globalThis.crypto)

* Move httpsnippet to main process via IPC

Removes the dynamic import of httpsnippet from the renderer so it is
no longer bundled there. Prepares for nodeIntegration: false, as
httpsnippet's core requires Node built-ins (querystring, url) that
won't be available in the renderer without nodeIntegration.

* 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 template tag prompt smoke race

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

* fix e2e flake

* Remove toHaveScreenshot from PDF smoke test; fix CI timeout

The screenshot assertion inherited the full 25s expect timeout and caused
the 'can send requests' test to exceed its 60s CI budget. The three
structural assertions above it (toBeVisible, blob src, chrome-extension
frame poll) already provide sufficient smoke-level PDF coverage.

* fix: disable env editor Close button while save is in-flight

Prevents a race condition where the dialog closes and the test navigates
before the updateEnvironmentFetcher NeDB write completes. Playwright's
click() waits for aria-disabled to clear, so the test blocks until idle.

* 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

* refactor: split script-security-rules out of script-security-policy

Extract pure data constants (blockedPropertyRules, blockedRootRules,
maskRules) and their interfaces (ASTRule, ThreatRule) into a new
script-security-rules.ts with no Node.js imports.

script-security-policy.ts now re-exports from that module and retains
only interceptorRules, which needs requireInterceptor. scripting-settings.tsx
imports directly from script-security-rules so the renderer does not
transitively pull in require-interceptor.

* feedback

* revert mime-type change, use alias

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-06-01 16:44:34 +08:00

45 lines
488 B
Plaintext

logs
*.log
**/*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pids
*.pid
*.seed
*.pid.lock
/scripts/npm-plugins
lib-cov
coverage
.lock-wscript
build/Release
node_modules/
**/node_modules/
.npm
.eslintcache
.node_repl_history
*.tgz
.yarn-integrity
.env
.idea
.reports
*.iml
.DS_Store
*test-plugins
graphql.config.json
.cache
.graphqlconfig
schema.graphql
packages/insomnia-smoke-test/traces
*.tsbuildinfo
dist
.history
*.node
rootCA2.*
*.exe
*.o
final.cpp
insomnia.ico
final.rc
.tmp*