Commit Graph
78 Commits
Author SHA1 Message Date
Bingbing 9ffb5b2fe4 refactor: decouple scripting environment imports 2026-09-29 17:10:55 +08:00
yaoweiprcandClaude Opus 5 d48243aeef refactor(sidebar): own the project shell in one layout route [INS-3903] (#10541)
* refactor(sidebar): own the project shell in one layout route

`/organization/:organizationId/project` and
`/organization/:organizationId/project/:projectId` each rendered their own copy
of the project shell — panel group, navigation sidebar, project modal — through
two sidebar components, `ProjectNavigationSidebar` and
`EmptyProjectNavigationSidebar`. Because the two are sibling route modules,
gaining or losing the last project in an organization swapped one for the other
and remounted the entire sidebar.

Anything the sidebar owned was dropped at that moment. Most visibly, a Konnect
sync started from an empty organization lost its AbortController as soon as it
created the first project: the Cancel button vanished, the sync kept running
invisibly, and disconnecting afterwards deleted projects the still-running sync
then recreated.

Introduce `organization.$organizationId.project.tsx` as a parent layout owning
the shell. flatRoutes nests both existing children under it automatically, so no
route files are renamed. The children keep only what needs the active project:
the git file issues provider and the outlet context. The two sidebars collapse
into one that already handled an empty project list.

Also move `KonnectSyncResultPanel` out of the `showKonnectSyncIntro` ternary's
else branch. It hosts the Konnect settings modal, and the intro branch's
"Configure" button is what opens it, so nesting it there made that button set
state nothing rendered — leaving an organization with Konnect projects but no
PAT unable to reconnect, across restarts.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* chore: refresh circular reference baseline

The layout refactor removed two cycles rooted at
`organization.$organizationId.project.$projectId.tsx`, which no longer imports
the navigation sidebar or the sync bar:

  ...project.$projectId.tsx -> project-navigation-sidebar.tsx -> project-node.tsx -> insomnia-event-stream-context.tsx
  ...project.$projectId.tsx -> sync-bar.tsx

`check-cycle-references` fails on baseline drift as well as on new cycles, so
the recorded baseline has to drop them. No cycles were added — the regenerated
file differs from the previous one by exactly these two deletions.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* refactor(routes): drop unused project index loader data

`ProjectIndexLoaderData` was exported but referenced nowhere, and nothing read
this route's loader data. The returned `{ projects, projectsCount }` was also
unreachable as anything but `{ [], 0 }` — the loader redirects whenever the
organization has projects, so the only way to reach the return is with none.

Return null instead and drop the interface.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 03:13:39 +00:00
yaoweiprcandClaude Opus 5 f697cd847c chore(ci): make the cycle check runnable on Windows and report drift honestly (#10548)
Two independent papercuts in the circular reference check, both hit while
investigating a failure on another PR.

`npm run check-cycle-references` could not run on Windows at all. It spawned
the extensionless `node_modules/.bin/depcruise` shim through `execFileSync`,
which Windows cannot launch; the `.cmd` sibling does not help either, since
Node >=18 refuses to spawn `.cmd` without a shell (CVE-2024-27980). Resolve
dependency-cruiser's own entry point and run it with `process.execPath`
instead — no shell, works everywhere.

The check also fails on baseline drift (cycles recorded in the baseline that
no longer exist), which is correct: the baseline is a ratchet, and leaving a
fixed cycle in it would silently keep permitting its reintroduction. But CI
labelled every non-success outcome "New circular references detected", so a PR
that *removed* two cycles was reported as having added some. That cost real
debugging time.

Give the script distinct exit codes — 1 for a new cycle, 2 for drift alone —
and have the workflow capture and map them to separate messages. The failure
behaviour is unchanged; only the wording is now accurate. Renamed the final
step to match what it actually gates on.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-24 02:58:59 +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
Jack Kavanagh b5ecd5c261 Remove/changelog-stuff (#7036)
* cleanup

* lock
2024-01-31 13:22:06 +01:00
Filipe Freire 45caa9f768 fix: changelog image generator support for new version model 8.0.0 (#6562) 2023-09-26 13:19:57 +01:00
Jack Kavanagh ac0dd5e4b3 use engines config in order to support nix-shell (#5521)
* add shell.nix

* use engines

* fix engine range

* fix
2023-01-05 13:17:34 +00:00
Jack KavanaghandFilipe Freire 4f9027ad94 bump electron 21 (#5173)
* bump electron 20

* bump to 21

* use node 16.16

* remove and bump deps

* package.lock

* fix package lock

* try 21.0.0

* oops

* remove ts-node

* package locks

* fix redirect and eror handling

* remove console.log

* remove react 18 override

* fix import

* update react-virtual api

* bump node-libcurl and electron

* bump node-libcurl to 2.3.5-6

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-10-21 14:41:00 +00:00
Dimitri Mitropoulos 26fe408344 remove nunjucks templating in experimental plugin themes (#4933)
* remove nunjucks usage from core themes

* adds package downloader script

* adds runtime validation for plugins still using nunjucks

* generateThemeCSS no longer needs to be async

* removes Nunjucks as valid type
2022-07-07 13:19:17 +00:00
Dimitri Mitropoulos ed3aad6046 tsconfig cleanup (#4908) 2022-06-27 12:57:50 -04:00
Dimitri Mitropoulos fa02c76afa removes delinquent flowtype leftovers (#4792) 2022-05-18 14:07:17 -04:00
David Marby 53466fc182 Switch to esbuild-runner for running changelog-image to avoid needing tsimportlib (#4742) 2022-05-02 10:25:55 +00:00
David Marby a037a3b844 Fix incrementing npm package versions for pre-release revisions (#4741) 2022-05-02 12:06:52 +02:00
Jack Kavanagh 40af38c3b9 decouple curl options from renderer (#4687)
* move some operations to main

* move more options to main

* move cookies and multipart

* remove cert legacy migration

* move auth and aws helper

* move certs options to main

* remove libcurl usage from renderer and tidy

* extract oauth2 flow back to renderer

* add parse headers tests

* minimally type req

* organise libcurl-promise by req properties

* minimally type used settings

* tidy up debug timeline

* fix cookie bug

* tasty little parsing function refactor

* doh! trim

* tidy up set cookie method/self review

* extracted functions from set-cookie logic

* refactoring with tests

* formatting after rebase

* clarification of duplicate header support

* tighten up parse headers

* simplify aws signing

* fix app version imports
2022-04-20 22:02:32 +01:00
Dimitri Mitropoulos 213e1dd1c8 rename insomnia-app/app to insomnia/src (#4491) 2022-04-20 17:42:19 +00:00
David Marby 0c1afbe48d Add changelog-image generator (#4649) 2022-03-30 12:45:16 +00:00
Dimitri MitropoulosandOpender Singh 5f4c19da35 [TypeScript] Phase 1 & 2 (#3370)
Co-authored-by: Opender Singh <opender.singh@konghq.com>
2021-05-12 18:35:00 +12:00
Yash Shah 27184c4f2d fixes #2552:addded a (slightly) more verbose output in check-version.js (#2559)
* fixes #2552:
* updated version script to show more verbose errors in case of a mismatch node version

* added suggested changes
* No output is printed if the node version is aaccurate
* changed colours for the messages to make them more prominent
2020-08-27 03:01:29 +12:00
Opender Singh 2b74221549 Add preinstall step to check node version (#2507) 2020-08-13 09:12:31 +12:00
Gregory Schier 549ce23ce8 Merge All Repositories into Monorepo for easier maintenance (#629)
* All projects into monorepo

* Update CI

* More CI updates

* Extracted a bunch of things into packages

* Publish

 - insomnia-plugin-base64@1.0.1
 - insomnia-plugin-default-headers@1.0.2
 - insomnia-plugin-file@1.0.1
 - insomnia-plugin-hash@1.0.1
 - insomnia-plugin-now@1.0.1
 - insomnia-plugin-request@1.0.1
 - insomnia-plugin-response@1.0.1
 - insomnia-plugin-uuid@1.0.1
 - insomnia-cookies@0.0.2
 - insomnia-importers@1.5.2
 - insomnia-prettify@0.0.3
 - insomnia-url@0.0.2
 - insomnia-xpath@0.0.2

* A bunch of small fixes

* Improved build script

* Fixed

* Merge dangling files

* Usability refactor

* Handle duplicate plugin names
2017-11-26 20:45:40 +00:00
Gregory Schier e9b87686e1 Upgrade Electron Builder (#498)
* Upgrade electron-builder

* Fix optional dep

* Add another dep

* Fix travis

* Fix 7zip install

* Fix icons

* Minor fix

* Delete changelog

* Moved build scripts to JS

* Some adjustments

* Remove lines

* Add 7zip back

* Update scripts

* Small tweaks

* Fix electronbuilder config

* snap dependency

* Fix pkg

* Remove snapd dep

* Updated deps and lots of fixes

* Travis update

* Return package name

* Remove snap for now

* Remove portable

* Try fixing code signing

* Bump cache

* Disable automatic tests

* Fix windows artifacts

* package-lock for app/

* Try fix npm install

* Try again

* Some minor tweaks

* Preleases by default
2017-11-20 16:07:36 +00:00
Gregory Schier 60ee2d8867 Remove Sentry error handling (#172) 2017-05-09 21:20:40 -07:00
Gregory Schier 7b8d26c292 Added import from URI ability (#160)
* Added import from URI ability

* Add protocol handlers

* Fix for keymap setting on read-only mode

* Refactored some main components out

* Protocols shoudl work now
2017-05-03 10:48:23 -07:00
Gregory Schier 85940179e1 CC style fixes and relax URL encoding 2016-11-17 13:22:19 -08:00
Gregory Schier 1cf1037c93 Better Redux (#43)
* Started refactoring redux stores

* Oh God huge refactor here

* Sync contenst updates and nested folders

* Fixed render tests

* A bunch of tweaks
2016-11-16 09:18:39 -08:00
Gregory Schier 7124078f55 Explicitly pass environmentID to send and remove build script 2016-11-09 16:01:10 -08:00
Gregory Schier d3c5510f67 Moved sync directory and sync DB buffering 2016-11-08 19:18:25 -08:00
Gregory Schier 889c9dbbd4 Reworked analytics 2016-10-26 20:41:30 -07:00
Gregory Schier f04d21daa0 Moved update logic to index.html 2016-10-11 14:06:25 -07:00
Gregory Schier 493b4fcfab Cap window bounds and update notification' 2016-10-11 12:47:38 -07:00
Gregory Schier 397fbb3abc Fix external deps 2016-10-05 10:13:43 -07:00
Gregory Schier 318c35c2cb Move a bunch of stuff to async/await (#39)
* Some minor implementations

* Some more

* Lots more

* Removed 'backend' alias

* removed all promises

* Removed a bunch of module exports stuff

* Some morE'

* Fix

* custom DNS

* Tests for DNS

* bug fix

* Some small adjustments

* Small stuff
2016-10-02 13:57:00 -07:00
Gregory Schier 6d9da20bfc Split UI from Lib 2016-09-16 22:46:44 -07:00
Gregory Schier 35cf8ca9a8 Almost working except for the sidebar 2016-09-15 15:45:08 -07:00
Gregory Schier 2ed92a7968 Actual Test Suite (#35)
* Pull out some render utils into functions

* Added some tests for lib functions

* strict refs
2016-09-02 21:32:45 -07:00
Gregory Schier d6b496a243 Fix stupid bug 2016-09-02 12:11:05 -07:00
Gregory Schier e7e85eac50 Fix 2016-08-23 12:53:19 -07:00
Gregory Schier ed150c3e25 remove quotes 2016-08-23 12:47:38 -07:00
Gregory Schier 6a7a0b07bc try 2016-08-23 12:43:01 -07:00
Gregory Schier f10532980a try 2016-08-23 12:37:01 -07:00
Gregory Schier 51b7c04d74 Extra check 2016-08-23 12:31:26 -07:00
Gregory Schier 23558ba682 Fix 2016-08-23 12:30:06 -07:00
Gregory Schier f2174868cc Stuff 2016-08-23 12:27:46 -07:00
Gregory Schier 888fd07ce1 WIndows compat 2016-08-23 11:54:22 -07:00
Gregory Schier 5f258a2dee Merge branch 'fix/small-fixes' 2016-08-17 12:12:18 -07:00
Gregory Schier 2bdeb76bd0 Some sentry updates 2016-08-17 12:12:13 -07:00
Gregory Schier 63315d1942 Some small fixes 2016-08-17 11:05:52 -07:00
Gregory Schier de040fb3ad Revert codemirror to working version 2016-07-29 13:37:23 -07:00
Gregory Schier ada732015e v3.0.12 (#30)
* Added some more tracking

* Fixed all stupid input usage

* Specify JSON in environment modal
2016-07-28 13:10:26 -07:00
Gregory Schier ecbf3ef64a Revert response headers tweak 2016-07-27 13:17:57 -07:00