Commit Graph
462 Commits
Author SHA1 Message Date
Bob QiuandClaude Sonnet 5.5 54e46851ff test(e2e): add insomnia-test Playwright framework and CI workflow [1/6] (#10594)
* feat: enhance accessibility and testing capabilities across UI components

- Added data-testid attributes to various components for improved testing.
- Updated mock-url-bar to include test IDs for method and path.
- Enhanced generate-code-modal with test IDs for dropdowns.
- Included test IDs in git-branches-modal and git-project-branches-modal for error messages.
- Added test IDs to import-modal header and input-vault-key-modal for error display.
- Enhanced new-workspace-modal with test IDs for mock server type options.
- Included test IDs in select-modal for the select element.
- Added test IDs in sync-merge-modal for merge conflict items.
- Enhanced visual-diff components with test IDs for better test coverage.
- Included test IDs in workspace-certificates-modal for CA certificate section.
- Enhanced workspace-environments-edit-modal with test IDs for environment icons.
- Added test IDs in pane-header for breadcrumbs.
- Included test IDs in request-result-card for runner results.
- Enhanced request-test-result-pane with test IDs for test result rows.
- Added test IDs in project-create-form for unknown fields warning.
- Enhanced AI settings with test IDs for toggle switches.
- Included test IDs in boolean-setting for settings labels.
- Enhanced scripting-settings with test IDs for rule toggles.
- Added test IDs in sidebar components for search fields and nodes.
- Enhanced spec-view with test IDs for method buttons.
- Included test IDs in tab components for tab titles.
- Enhanced tags with test IDs for size, time, and URL tags.
- Added test IDs in tag-editor for tag arguments.
- Enhanced toast-notification with test IDs for toast body and content.
- Included test IDs in response-headers-viewer for header rows and values.
- Enhanced event-log-view with test IDs for event rows and cells.

* feat: add remaining test ids for folder pane, staging button, drop indicator and test results

- folder-pane on the request group Tabs
- stage-this-file / unstage-this-file on the git staging preview button
- drop-indicator-folder-name and data-valid on the sidebar drop indicator
- test-result-case / test-result-error inside the test result name

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

* feat: add data-selected attributes for improved testing and UI state indication

* fix: use unique test ids for graphql explorer root types

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

* fix: make sidebar data-parent-id return the parent row id

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

* feat: enhance accessibility and testing capabilities across UI components

- Added data-testid attributes to various components for improved testing.
- Updated mock-url-bar to include test IDs for method and path.
- Enhanced generate-code-modal with test IDs for dropdowns.
- Included test IDs in git-branches-modal and git-project-branches-modal for error messages.
- Added test IDs to import-modal header and input-vault-key-modal for error display.
- Enhanced new-workspace-modal with test IDs for mock server type options.
- Included test IDs in select-modal for the select element.
- Added test IDs in sync-merge-modal for merge conflict items.
- Enhanced visual-diff components with test IDs for better test coverage.
- Included test IDs in workspace-certificates-modal for CA certificate section.
- Enhanced workspace-environments-edit-modal with test IDs for environment icons.
- Added test IDs in pane-header for breadcrumbs.
- Included test IDs in request-result-card for runner results.
- Enhanced request-test-result-pane with test IDs for test result rows.
- Added test IDs in project-create-form for unknown fields warning.
- Enhanced AI settings with test IDs for toggle switches.
- Included test IDs in boolean-setting for settings labels.
- Enhanced scripting-settings with test IDs for rule toggles.
- Added test IDs in sidebar components for search fields and nodes.
- Enhanced spec-view with test IDs for method buttons.
- Included test IDs in tab components for tab titles.
- Enhanced tags with test IDs for size, time, and URL tags.
- Added test IDs in tag-editor for tag arguments.
- Enhanced toast-notification with test IDs for toast body and content.
- Included test IDs in response-headers-viewer for header rows and values.
- Enhanced event-log-view with test IDs for event rows and cells.

* feat: add remaining test ids for folder pane, staging button, drop indicator and test results

- folder-pane on the request group Tabs
- stage-this-file / unstage-this-file on the git staging preview button
- drop-indicator-folder-name and data-valid on the sidebar drop indicator
- test-result-case / test-result-error inside the test result name

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

* test(insomnia-test): add Playwright E2E framework, CI workflow and write-insomnia-test skill

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

* test(insomnia-test): add petstore fixture required by the echo server at startup

misc/echo-server.js reads misc/fixtures/petstore-swagger.json when it
starts, so the fixture must land together with the server; otherwise every
shard's webServer exits with ENOENT.

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

* fix(insomnia-test): address PR review comments

- bind mock-api and echo-server to 127.0.0.1
- remove per-test dataPath after use
- throw when setCodeMirrorValue does not hold after retries
- drop continue-on-error from the build job
- shorten cookie waitForPersisted docstring

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

* feat(insomnia-test): add mock servers referenced by constants and flows

Adds the event-stream, socket.io, ws-echo, mcp, grpc, git, oauth2 and
mock-bin servers (bound to 127.0.0.1), their proto/upload fixtures, npm
scripts and Playwright webServer entries, so flows that reference them
no longer fail with connection refused.

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

* chore(insomnia-test): fix lint errors

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

* fix(insomnia-test): send mock-bin-server responses as text/plain with nosniff

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

* fix(insomnia-test): don't echo exception text in mock-bin-server 500 response

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

* fix(insomnia-test): break flow-manager/workspace.flow import cycle

WorkspaceFlow now takes a structural RequestFlows dependency instead of
importing FlowManager, which removes the 3 new circular references.

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

* fix(insomnia-test): address Copilot review comments

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

* refactor(insomnia-test): rename Response model to ResponseView

The type represents the response pane (response data plus console, stream
events and script test results), not the network response, and clashed
with the insomnia-data Response name. Update flows, pages, specs, JSDoc
and the write-insomnia-test skill accordingly.

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

* refactor(insomnia-test): split overloaded Flow methods into explicit ones

WorkspaceFlow.create/duplicate/rename, ExportFlow.export and
EnvironmentFlow.create dispatched on argument types via typeof/instanceof
and casts, so a call site did not show which flow it triggered. Replace
them with explicitly named methods (createProject, openLocalGitFolder,
cloneGitProject, createCollection, duplicateRequest, renameCollection,
exportProject, createBaseEnvironment, ...) and update the
write-insomnia-test skill docs.

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

* refactor(insomnia-test): import expect directly from @playwright/test

Drop the pass-through re-exports of expect from misc/fixtures.ts and
misc/git-fixtures.ts, import it from @playwright/test in specs, and
update the write-insomnia-test skill accordingly.

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

* refactor(insomnia-test): rename certificate model and update imports

* fix: update watcherExclude settings in VSCode configuration

* chore: update .gitignore to remove test artifacts and add new file for insomnia-test

* feat: update electron-builder config for E2E testing and add eslint config for insomnia-test

* chore: remove unused file watcher exclusions from VSCode settings

* chore: reorder import statements for consistency in response.page.ts

* fix(insomnia-test): locate key/value rows by position to survive provisional key swap

setKeyValuePairs resolved the new row by its data-key, which changes from
the provisional pair-blank_* key to the persisted id once the name is
saved. The value editor locator then never resolved, timing out in
setCodeMirrorValue (template-tag header-name, http happy-path, query-params).

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

* fix(request-page): ensure stable attribute before setting value to prevent data loss

* fix(request-page): locate rows by fixed position to prevent stale locators during value entry

* fix(insomnia-test): update shard count calculation to derive from test cases and improve node_modules handling

* fix(reference): update request state terminology and clarify enum references in documentation

* refactor(insomnia-test): consolidate framework changes into base PR

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

* fix(reference): update terminology from Response to ResponseView for consistency in documentation

* feat(insomnia-test): add response export, folder environment, environment picker, variable-source and prompt-tag helpers

Page/Flow helpers used by the HTTP, environment and template-tag specs:
- ResponsePage/HttpRequestFlow: export response (raw/prettified/HTTP debug), Save To File, export option state
- FolderPage/FolderFlow: set folder environment variables
- EnvironmentPage/EnvironmentFlow: environment pickers, Add Project Environment, collection sub-environment privacy
- VariableSourcePage/VariableSourceFlow: variable tooltip, source modal and Open navigation
- TemplateTagPage/TemplateTagFlow: Prompt tag answer/clear cache
- echo-server: /large-json route; PageManager passes the Electron app to ResponsePage

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

* feat(insomnia-test): add page/flow methods, enums, models and mock-server endpoints used by later specs

Framework-level additions moved from test/refactor_e2e_tests: git diff-view and
unknown-fields helpers, MCP capability/list helpers, cloud-sync commit dialog
helpers, upgrade fixture, MCP scriptable list server and custom-CA port,
cloud-sync seed-project endpoint, certs typings and cookie Expires parsing.

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

* Refactor code structure for improved readability and maintainability

* fix(insomnia-test): address code-scanning findings in mock servers and git-sync page

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

* feat(insomnia-test): add setParamsBulk to set request params via the bulk editor

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

* test(insomnia-test): sync framework-layer page object and coverage fixes

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

* fix(insomnia-test): update SKILL.md and reference.md for linting and focus mode behavior

* test(insomnia-test): add requireItemNode with DEFAULT_TIMEOUT and descriptive error

Flows that dereference the tree lookup result with node! now use
requireItemNode, which waits up to DEFAULT_TIMEOUT and throws naming the
missing node. findItemNode keeps its short budget and undefined result for
absence checks.

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

* ci(insomnia-test): align workflow with test-e2e.yml

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

* fix(test): clarify comments on worker configuration and session handling

* feat(insomnia-test): add type-check script and workflow step

* fix(insomnia-test): update node setup to include GitHub package registry and scope

* chore(insomnia-test): address review cleanup items (#17-#27)

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

* refactor(insomnia-test): update SKILL.md for improved test case writing guidance and remove outdated reference.md

* feat: add mock servers for various protocols and OAuth2 support

- Introduced `mock-bin-server.ts` for handling mock API requests and responses.
- Added `oauth2-server.ts` to simulate OAuth2 authorization flows with in-memory token management.
- Implemented `socket-server.ts` for WebSocket communication with authentication.
- Created `ws-echo-server.ts` for echoing WebSocket messages.
- Updated `upgrade-fixture.ts` to use `import.meta.dirname` for path resolution.
- Modified `package.json` to switch script files from `.js` to `.ts` for TypeScript compatibility.
- Adjusted Playwright configuration to reference TypeScript files for mock servers.
- Enhanced cloud sync mock to reflect changes in file extensions.
- Updated TypeScript configuration to allow importing TypeScript extensions.

* refactor(insomnia-test): migrate electron-builder config to TypeScript and remove outdated CJS version

* fix(insomnia-test): update ESLint config to include electron-builder.config.ts and clarify root config error

* refactor: update button locators to use role and test ID selectors

- Replaced various button locators using text matching with role and test ID selectors across multiple pages for improved accessibility and maintainability.
- Updated methods in GitSyncPage, GrpcRequestPage, HttpRequestPage, ImportPage, InvitePage, McpClientPage, MockServerPage, PreferencesPage, ProjectSettingsPage, RequestPage, ResponsePage, RunnerPage, ScriptTabComponent, SocketIORequestPage, TemplateTagPage, VariableSourcePage, and WorkspacePage.
- Enhanced code readability and consistency by standardizing locator strategies.

* feat: add step instrumentation for flow methods

- Introduced a new `step` decorator to enhance method reporting in flows.
- Removed the old step instrumentation logic from `step-instrumentation.ts`.
- Updated various flow classes to utilize the new `@step()` decorator for method tracking.
- Simplified page manager by removing the instrumentWithSteps function.
- Adjusted tests to ensure compatibility with the new step reporting mechanism.

* refactor: remove module type from package.json and update environment type handling

* test: verify logging of after-response script in HTTP request flow

* fix: make Insomnia binary and helper executables executable to prevent EACCES errors

* feat: add shard matrix job to dynamically calculate test distribution for parallel execution

* fix: improve tree row expansion logic to handle re-rendering issues

* fix: enhance expandAllCollapsed method documentation for clarity on toggle behavior

* refactor: update RequestAuthentication imports and definitions for consistency across models

* feat: add new components for UI interactions and refactor existing pages

- Introduced `TabsComponent`, `StatusTagComponent`, `PillTagComponent`, `ToastComponent`, `ToggleButtonComponent`, `PressedToggleComponent`, `EnabledLabelToggleComponent`, `SwitchComponent`, `CheckboxComponent`, `RadioGroupComponent`, `TooltipComponent`, and `TreeComponent` to enhance UI testing capabilities with Playwright.
- Refactored `AuthTabComponent`, `BasePage`, `CertificatesPage`, `CloudSyncPage`, `EnvironmentPage`, `HttpRequestPage`, `MockServerPage`, `RequestPage`, `ResponsePage`, `TabPanelPage`, and `WorkspacePage` to utilize new components for improved readability and maintainability.
- Updated methods for toggling states, reading values, and interacting with UI elements to leverage the new component structure.
- Enhanced test reliability by ensuring interactions are properly awaited and validated.

* refactor: sync product test ids and e2e framework changes from test/refactor_e2e_tests

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

* feat: add data-selected attributes for improved testing and UI state indication

* feat: add Preferences dialog pages for AI settings, credentials, plugins, and vault management

- Implemented GitHistoryDialogPage for managing git history modal interactions.
- Created PreferencesAiPage for handling AI settings, including backend configuration and model selection.
- Developed PreferencesCredentialsPage for managing Git and cloud credentials.
- Added PreferencesPluginsPage for plugin management, including installation and sandbox settings.
- Introduced PreferencesVaultPage for vault key generation and management.
- Established PreferencesTabPage as a base class for shared functionality across preferences pages.

* refactor: simplify requireItemNode and related methods by removing unnecessary polling

* feat: implement flow and page registries for improved lazy loading of instances

* feat: refactor data handling and polling mechanisms for improved stability and performance

* feat: refactor flow management to use SessionContext for improved state handling

* refactor: read graphql root types via unique test ids

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

* fix: use unique test ids for graphql explorer root types

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

* refactor: drop pinned-request special case when rebuilding sidebar tree

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

* refactor: update selection logic to use data-selected attribute for diff view and primitive selection

* refactor: replace NeDB file access with database queries for improved reliability

* refactor: update import paths to use absolute imports from @package

- Changed import statements across multiple files to use absolute paths from the @package alias instead of relative paths.
- This improves code readability and maintainability by standardizing the import structure.

* docs: add README for insomnia-test with E2E testing details

* refactor: update import paths for constants and fixtures in happy-path.spec.ts

* refactor: streamline file dialog stubbing across components and flows

* refactor: enhance GitHub Actions permissions and add artifact cleanup step

* refactor: simplify Playwright test execution and enhance coverage report handling

* ci(insomnia-test): print playwright --list output when test count cannot be determined

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

* refactor: replace createSubEnvironment with addAndRenameSubEnvironment for improved clarity and functionality

* refactor(insomnia-test): organise ResponseView by response pane areas

Replace the AppResponse-derived fields with statusBar, preview, headers,
console, events and tests so assertions map to what the user sees.

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

* refactor(insomnia-test): use @package alias for cross-directory imports

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

* style(insomnia-test): sort imports after switching to @package alias

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

* refactor(insomnia-test): replace hardcoded IDs with constants in mock-api

* refactor(insomnia-test): update SKILL.md for improved clarity and consistency in framework facts

* refactor(insomnia-test): enhance listbox locator in SelectComponent and improve textarea selection in VariableSourcePage

* refactor(insomnia-test): update timeout handling in Tree class to use LONG_TIMEOUT for better reliability

* feat(insomnia-test): add resolving-proxy-server mock facility

Forward proxy on :4095 that maps insomnia.test to 127.0.0.1 (http directly,
https via CONNECT). Lets specs reach the local mock servers without using
`localhost`, which Insomnia treats as a secure context for Secure cookies.
Started automatically through playwright.config.ts webServer.

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

* refactor(insomnia-test): move cloud-sync-mock helper into misc

It wraps mock-api admin endpoints like the other shared helpers in misc/,
and tests/ should only hold specs.

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

* refactor(insomnia-test): update locators to use `Locator` type and improve dialog handling

* fix(insomnia-test): fix lint errors and warnings in page objects

Add a CommonJS override for plugin fixtures, drop force clicks and waitForTimeout from page objects, and avoid expect().catch().

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

* refactor(insomnia-test): enhance editable name handling with retry logic for stability

* refactor(insomnia-test): update shard calculation to cap at MAX_SHARDS for better resource management

* refactor(insomnia-test): update parallel-test job description for clarity on shard usage

* refactor(insomnia-test): update timeout handling and constants for improved stability and resource management

* feat(tests): add various E2E tests for cloud sync and workspace functionalities

* feat(tests): add E2E tests for spectral lint error handling in JSON and YAML specs

* feat(tests): enhance spectral lint error tests with project node verification

* test(insomnia-test): move unused page objects, components and models to e2e-2

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

* test(insomnia-test): keep only members referenced by e1 tests in components/enums/flows/models/pages

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

* test(insomnia-test): drop empty flow/page classes and tidy blank lines

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

* test(insomnia-test): move cloud-sync and document specs out of e2e-1 and prune unused code

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

* test(insomnia-test): drop page registry entries, pages and members not used by e2e-1 specs

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

* test(insomnia-test): drop non-HTTP request models and unions unused by e2e-1 specs

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

* refactor: reorganize FlowContext imports and introduce SessionContext for shared state management

* fix: limit response delay to maximum threshold in delayResponse function

* chore: move write-insomnia-test skill to test/refactor_e2e_tests

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

* chore: move insomnia-test README to test/refactor_e2e_tests

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

* fix: add permissions for package access and improve dependency installation in shard matrix job

* fix: streamline delayResponse function to ensure valid delay handling

* refactor: simplify ContextMenuItem enum by removing comments and consolidating labels

* fix: remove baseUrl from tsconfig.json to streamline module resolution

* refactor(insomnia-test): prune misc code not used by e2e-1 tests

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

* fix(insomnia-test): address review feedback on deps, coverage and video

- align dependency versions with the rest of the monorepo (express ^4,
  zod ^3, graphql ^16, @types/node ^24, @modelcontextprotocol/sdk ^1.17.5)
  and regenerate package-lock.json
- make CI coverage on-demand: always on for develop pushes, opt-in via the
  workflow_dispatch `coverage` input otherwise
- drop video recording (and the ffmpeg install); start Electron window
  tracing explicitly and attach trace.zip on failure instead

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

* refactor(insomnia-test): replace the standalone mock servers with the smoke-test mock server

Remove the misc/*-server.ts scripts and their per-server webServer entries.
Run a single mock server (misc/server), copied from insomnia-smoke-test and
adapted to native-ESM node (import.meta.dirname, .ts imports, generated
certs, no cross-package imports).

Additions on top of the smoke server: misc/server/mock-api.ts (account and
session state, _admin hooks, Cloud Sync GraphQL, vault, collaborators; runs
as middleware and falls through), an httpbin-style /post, a catch-all 200 {}
and socket.io moved to :3000. HTTP_SERVER now points at the single server.

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

* refactor: replace hardcoded authorization header with dynamic base64 encoding

* fix(insomnia-test): address code-scanning alerts in the mock server

- send text/plain and JSON responses instead of reflecting user input as HTML
- use a constant format string when logging GraphQL operations
- rate limit the git routes that touch the file system
- document why the mTLS test server skips client cert rejection

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

* fix(insomnia-test): bump express-rate-limit to drop vulnerable ip-address

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

* refactor(insomnia-test): move shared tab panes and preferences dialog to components

Address review feedback: auth-tab, script-tab and tab-panel are reused by
several pages, and the Preferences dialog is reachable from any page, so
they belong in the component layer rather than pages.

- TabPanelPage -> TabPanelComponent (RequestPage now composes it)
- AuthTabComponent / ScriptTabComponent move to components/
- Preferences{,Tab,Credentials,Plugins,Ai}Page -> *Component, registered
  in PageManager under preferences / preferencesCredentials / ...

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

* fix(insomnia-test): set response type to text/plain for delay endpoint

* chore(insomnia-test): remove unused fixture files

---------

Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-06 14:16:28 +08:00
kwburns-kong 5eb75d9a12 chore(deps): bump dependencies (#10586)
* chore: bumped qs@6.15.2 to qs@6.16.0

* chore: bumped protobufjs@7.6.4 to protobufjs@7.6.6

* chore: bumped morgan@1.11.0 to morgan@1.12.1

* chore: bumped nanoid@5.1.7 to nanoid@5.1.11

Also bumps the nanoid@3.3.11 copy (under postcss) to nanoid@3.3.18, including the insomnia-component-docs lockfile.

* chore: bumped ip-address@10.4.0 to ip-address@10.7.3

* chore: bumped @grpc/grpc-js@1.14.4 to @grpc/grpc-js@1.14.6

* chore: bumped @modelcontextprotocol/sdk@1.30.0 to @modelcontextprotocol/sdk@1.32.1

* chore: bumped hono@4.13.0 to hono@4.13.13

* chore: bumped zod@4.3.6 to zod@4.6.5

* chore: bumped moment@2.30.1 to moment@2.31.0
2026-10-15 16:30:47 +00:00
kwburns-kong c4b7b0bf56 chore: bump dependencies (#10444)
* fix: bump @xmldom/xmldom to ^0.9.12 (CVE-2026-41675)

0.9.10 has a known parser vulnerability; 0.9.12 is the latest patched release.

* fix: bump dompurify to ^3.4.14

3.4.13 has a known sanitizer bypass; 3.4.14 is the patched release.

* fix: bump ajv to ^8.20.0

8.18.0 has a known prototype-pollution issue in schema compilation; 8.20.0 is the patched release.

* fix: bump es-toolkit to ^1.51.0

1.45.1 has a known ReDoS in one of its string utilities; 1.51.0 is the patched release.

* fix: bump @apidevtools/swagger-parser to 12.1.0

Pulls in json-schema-ref-parser 14.0.1, resolving a known vulnerability in the
$ref-resolution path used when validating imported OpenAPI/Swagger documents.
Only SwaggerParser.validate() is used at the two call sites and its signature
is unchanged across this range.

* fix: bump @sentry/electron to ^7.17.0

Pulls in @sentry/node 10.70.0, resolving vulnerabilities in its bundled
@opentelemetry/core and cjs-module-lexer instrumentation dependencies.
Sentry.init options, captureException, browserTracingIntegration, and
getCurrentScope().setUser() are all used unchanged across this range.

* fix: bump zod to ^4.4.0

3.25.76 has a known validation-bypass fixed only in the v4 line. The app's
own schema code already imports from the zod/v4 subpath, so no source
changes are needed for the bump itself.

* fix: bump @rjsf/core, @rjsf/utils, @rjsf/validator-ajv8 to 6.8.0

Moves off the 6.0.0 beta onto the stable release line, which pulls in
markdown-to-jsx 9.x and resolves a known vulnerability in the pinned 7.x
line. The withTheme/FormProps/RJSFSchema/UiSchema/validateForm API surface
used by this app's JSON-schema forms is unchanged across this range.

* fix: refresh jose lockfile entry to 6.2.10

6.2.2 has a known vulnerability; 6.2.10 is already within the existing
allowed range (^6.1.3) declared by @modelcontextprotocol/sdk, so no
manifest change is needed, just an up-to-date resolution.

* fix: adapt rjsf theme templates to @rjsf/utils 6.8.0 prop changes

WrapIfAdditionalTemplate's onKeyChange/onDropPropertyClick became
onKeyRenameBlur/onRemoveProperty, ObjectFieldTemplate's idSchema/onAddClick
became fieldPathId/onAddProperty, and ArrayFieldTemplate no longer receives
raw item pieces - items are now pre-rendered elements, so the per-item
border/delete-button layout moved into a new ArrayFieldItemTemplate.

* Revert "fix: bump zod to ^4.4.0"

This reverts commit 54f1d5aa4c81ff64bf4cb9f9d478440b7311e2cd.

The v3 to v4 bump breaks real-world collection validation: import-v5-parser's
discriminated/recursive union schemas reject valid v5 collection files under
the released zod@4.4.0 (unlike the bundled zod/v4 preview subpath used
during development), failing import, export, and CLI collection-run
end-to-end tests. Deferring this upgrade separately rather than shipping a
functional regression.

* chore: regenerate lockfile after rebase onto develop

* fix: bump undici to ^7.29.1

* fix: bump @xmldom/xmldom 0.8.x to 0.8.15

* fix: bump proxy-addr to 2.0.8

* fix: bump compression to 1.8.2

* fix: bump source-map-js to 1.2.2

* fix: bump http-cache-semantics to 4.3.0

* fix: bump fast-uri to 3.1.8

* fix: bump proxy-addr, compression, source-map-js, http-cache-semantics, fast-uri in component-docs lockfile
2026-10-10 04:47:30 +00:00
Bingbing f08d65b45e chore: replace madge circular-reference check with dependency-cruiser (#10468)
## Summary

- Replaces the madge-based `check-cycle-references` with a `dependency-cruiser`-based check, cruised once per npm workspace package.
- Keeps the checker, dependency-cruiser config, and known-cycle baseline together under `scripts/circular-references/`.
- Uses a committed baseline to grandfather existing cycles while failing on new cycles and stale baseline entries.
- Cleans the existing `insomnia-inso` type cycle by using `insomnia-data`'s `AllTypes` instead of importing the database container type.
- CI explicitly uses Bash for correct `tee`/pipeline failure propagation, safely handles skipped checks, and posts a PR report.
- Dropped `madge`/`.madgerc`, added `dependency-cruiser`.
2026-09-10 16:11:43 +08:00
xdm 4b121c89f6 refactor(vcs): move vcs to insomnia-vcs (#10427)
refactor(vcs): move vcs to insomnia-vcs

fix: fix comments
2026-08-26 14:37:16 +08:00
Ryan Willis da0a6f7fe6 chore: bump node-libcurl for electron 43 and windows arm support [INS-3111] (#10305) 2026-07-28 12:12:56 -04:00
Jack KavanaghandClaude Sonnet 4.6 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
Ryan Willis 461a57e428 chore(analytics): consolidate analytics into shared insomnia-analytics package (#9915) 2026-05-14 10:34:40 -07: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
Jack Kavanagh 92a79e799b Chore: playwright dx v2 (#9876) 2026-04-30 06:42:46 +02:00
Ryan Willis ae49df6a57 fix: bump node-libcurl and add ipv6 tests (#9869) 2026-04-24 19:04:02 -07:00
Jack Kavanagh 3ec916e436 Chore: ratchet renderer nodejs calls (#9803)
* limit new nodejs calls

* plan

* ignore tests

* perf

* clean up
2026-04-13 13:33:57 +00:00
Ryan Willis 52d64a0116 chore(deps): bump dependencies (#9756) 2026-04-03 19:08:00 -04: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
Bingbing a4250a53e3 chore: add circular reference check (#9065) 2025-12-23 02:44:40 +00:00
Bingbing 1d625ba1c9 refactor: extract insomnia-api (#9093) 2025-12-08 03:57:47 +00:00
Jack Kavanagh 14e44f98a3 Chore/bump-linting-pkgs (#9409)
* bump linting pkgs

* add temporary ignores

* fix test

* autofix
2025-11-25 16:49:03 +00:00
Ryan Willis 94aa05e763 feat: clear all credentials upon logout [INS-1630] (#9328)
* feat: clear all credentials upon logout

* also drop secret_id and repo_id, explain git repo drop

* add log out confirmation modal

* fix log out for critical scratchpad test

* empty git repo instead

* update db querying + hide empty error box on failures
2025-10-31 09:02:04 -07:00
Jack Kavanagh bf113c79cf bump electron 38 (#9282)
* bump electron 38

* bump 38.4

* bump node 22.20
2025-10-23 16:44:03 +00:00
Jack Kavanagh b94115d77a bumps (#9199) 2025-10-02 08:36:28 +00:00
Jack Kavanagh 4f143c98d7 vite v7 bump (#8842) 2025-08-27 12:34:08 +02:00
Jack Kavanagh 3ac3965b45 *.min.js and entry.* naming conventions (#8968)
* use min.js convention

* rename to entry

* rename main.ts

* fix electorn builder config

* fix types

* fix hidden window entry

* rename esbuild.main.ts to entrypoints
2025-08-13 11:05:56 +00:00
Jack Kavanagh e50056e5cd bump electron 37 (#8978) 2025-08-12 15:35:08 +00:00
Jack Kavanagh f4247c3ece bump electron 36 (#8963)
* bump electron

* bump npmrc
2025-08-12 09:17:35 +00:00
James Gatzandjackkav aa838bf39c chore(Architecture): react router spa mode (#8902)
* first pass

fix tests

move all react things in dev

try-package

build stuff

use http protocol instead of file

handle refresh

fix tests and routeloaderdata apths

fix npm run dev

fix sorts

fix hidden browser window

cleanup files

Typesafe /auth/* routes

typesafe commands route

git-credentials typesafe routes

import typesafe routes

fix types

fix hidden browser window

invite and collaborators typesafe routes

fix types

remove workarounds

fix dashboard test

more types

git typesafe routes

fix runner test

typesafe scratchpad navigation

fix remove unused project route

fix test routes

add space

request typesafe routes

git credentials typescript conspiracy

git typesafe routes

typecheck

debug bundles for inso

fix test

fix request group tab

workspace typesafe routes

feedback

All routes use generated types

Add typed fetchers to actions and loader

Use typed fetchers in the app

move git actions to the root

* fix react-use usage

update import source field

Spawning npm fails the build

Add ~ module resolution to vitest

add initialEntry functionality

fix update environment name requirement

fix settings patch

use loader for fetching the vault key and fix process.env.PLAYWRIGHT issue

fix missing type

Centralize useRouteLoaderData to routes

Use environment for vitest tests that run browser code

Update remaining fetchers to typesafe versions

remove unused fetcher and add callback to sync

Wrap load/submit in useCallback to keep them stable between re-renders

Update deps lists with stable submit functions

fix lint issue

* fix ts issues

* Add toaster to root

* Use shell for running scripts with spawn on Windows

* Move renderer bundling out of the build script

* Fix request-pane test flakiness

* update the url we use for internal purposes

* Increase timeout for release workflow

* fix flaky bundling test

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2025-08-08 11:10:28 +02:00
Kent Wangandjackkav 2eca4de150 feat: External vault separation and bundle plugin support for Insomnia & Inso (#8864)
* Move vault related UI code
* Support bundle plugin for app & inso and backend integration (#8857)
* Update Github actions
* spike: bundle plugin installation alternatives (#8899)
* installation alternative by optional dependency
* Refine plugins api
* feat: Execute vault plugin tag in web worker (#8934)
* update bundle test
* fix issues from comment

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2025-08-07 14:06:41 +00:00
Kent Wang afda28264e chore: Support auto restart electron when main processor related code changes (#8707)
* Support auto restart electron when main processor related code changes
2025-07-11 03:09:06 +00:00
yaoweiprc 152a113a3d Move dependency decompress to packages/insomnia (#8764) 2025-06-03 10:03:32 +08:00
Jack Kavanagh 5543a6e08f tooling: unicorn eslint (#8743)
* set a few unicorn rules

* autofixes

* fix types

* more minor fixes

* more autofixes

* more normalisation

* prettier run
2025-05-27 09:47:46 +00:00
Jack Kavanagh 0fcd514f2e Bump-vite-v6 (#8608)
* v6

* fix
2025-04-17 12:38:21 -07:00
yaoweiprc 7ef0daf5c1 Improve WSDL import [INS-4291] (#8314)
Improve WSDL import
* Use the feature of apiconnect-wsdl library to import the wsdl files which reference other xsd files.
Patch the npm package apiconnect-wsdl to remove the limits for generating SOAP request samples.

* show detailed error for each convertor when importing, remove unused generic type

* fix review issues
2025-04-17 16:17:02 +08:00
Jack Kavanagh a6cfebec3e Add-playwright-linting-to-smoke-tests (#8614)
* add smoke lint

* add pw lint

* configure

* autofix

* fixed errors

* fix lint
2025-04-15 17:04:31 +02:00
Jack Kavanagh 3baeb86490 bump ts 5.8 (#8618) 2025-04-15 14:45:54 +02:00
Jack Kavanagh b30978e33b Full-prettier-run (#8605)
* prettier

* remove markdown linting
2025-04-11 13:37:19 +02:00
Jack Kavanagh ed001e0c98 Prettier pass 3 (#8586)
* first pass

* use mjs

* 120

* single quote

* consistent quotes

* fix on save

* ancestors

* add recommended

* make vscode integration work

* remove prettier runtime dep

* use esm
2025-04-11 13:11:34 +02:00
Jack Kavanagh c8c2fcc8a3 renamed sdk to scripting-environment (#8604)
* renamed sdk to scripting-environment

* lock file
2025-04-10 17:03:10 +02:00
Curry Yang 76b8cbe517 chore: simplify scripts in package.json (#8598)
* chore: remove unuse scripts in package.json

* chore: delete build:app and use build instead
2025-04-09 14:16:44 +02:00
Jack Kavanagh b429feb2f2 Eslint-v9 (#8578)
* autofix recommended

* first pass

* autofix

* fixed lint errors

* pin ts
2025-04-03 16:15:03 +00:00
Jack Kavanagh ed81844130 eslint: remove unused disabled rules (#8571)
* remove unused disabled rules

* bump plugins

* bump tslint and ignore new rules

* fix exception

* remove unused plugins

* remove config helpers

* remove unused dep
2025-04-02 16:18:21 +02:00
Filipe Freireandjackkav 3f86211139 chore: bump electron 35 [INS-5154] (#8490)
* chore: bump electron 35 [no-ticket]

* fix: build.ts poiting to node 22

* fix: update types

* fix: comment out inso build.ts node version check

* fix: bump npx pkg

* skip flakey tests

* bump timeout

* use glob instead of regex

* fix windows inconsistency

* revert experiemental changes

* fix: revert timeout

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2025-03-20 10:53:34 +01:00
yaoweiprcandJames Gatz cd1625a213 Solve the bug related to importing multiple workspaces in one file [INS-5077] (#8442)
* Solve the bug that it imports all resources to all workspaces when there are multiple workspaces in one imported file

* add smoke test

* Apply suggestions from code review

Co-authored-by: James Gatz <jamesgatzos@gmail.com>

* Use import-from-clipboard instead of import-from-file in smoke test

---------

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
2025-03-18 12:03:11 +00:00
Jack KavanaghandFilipe Freire 3ff0d34c62 Bump-electron-33 (#8285)
* update flake

* bump node and electron versions

* bump libcurl

* package-lock

* libcurl 2.33.3

* fix types

* bump libcurl 2.33.4

* fix electron breaking change webUtils

* oops

---------

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2025-01-10 16:44:20 +01:00
Jack Kavanagh b5cb3d376f chore: Package json bumps (#8030) 2024-10-01 01:38:40 +02:00
James Gatzandjackkav 873721c591 update typescript and lib to 2023 (#8022)
* update typescript and lib to 2023

* fix type check

* make key thing uniform

* fix types

* fix types some more

---------

Co-authored-by: jackkav <jackkav@gmail.com>
2024-09-27 15:52:34 +02:00
Jack KavanaghandFilipe Freire ccf577b9df Bump/electron-31 (#7884)
* bump required node version

* bump node-libcurl

* npm i

* update npmrc

* fix

* proper fix of package-lock

---------

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2024-08-30 22:57:18 +02:00
Jack Kavanagh 2ffbecf192 only minify in prod (#7879) 2024-08-28 13:27:11 +00:00
yaoweiprc 039a5bee76 import postman data dump at once (#7834) 2024-08-23 11:18:04 +08:00
Jack Kavanagh fc5699e5f3 inso cli dx improvements (#7776)
* clean up github artifacts flow

* add console output test

* add timeline

* prepare test harness

* fix lint

* move test

* set shell to false
2024-07-30 13:29:45 +02:00
Jack Kavanaghandgatzjames e2b466a0cd Vitest-2 app package (#7757)
* vitest insomnia-inso

* remove skipped logs

* vitest insomnia config

* remove jest

* mocks?

* remove globalBeforeEach smell

* 110 left

* 38 failing

* 34

* 30

* 26

* 3 to go

* fix tests

* fix type checks

* delete send-request

* fix lint

* test runner hack for now

* remove duplicate snapshots

---------

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2024-07-26 16:56:56 +02:00