Commit Graph

28 Commits

Author SHA1 Message Date
Jack Kavanagh
db4718fabf refactor(eslint): enforce renderer/node execution-context boundaries (#10087)
* first lint pass

* renamed .worker

* move select file

* simplify eslint

* refactor(eslint): relocate node-only common files and bridge renderer import helpers

- private-host, bundle-spectral-ruleset -> main/; send-request -> network/
- import.ts: __IS_RENDERER__ forks via ui/utils/import-bridge (no window token)
- drop all renderer node-builtin exemptions from eslint config

* docs: fix stale comments after file relocations

* remove dead code

* refactor(eslint): add basic-components to renderer execution-context

* update lint config

* refactor(import): replace import-bridge with runtime import adapter

Move the renderer/node fork for import helpers (insecureReadFile,
extractJsonFileFromPostmanDataDumpArchive, convert) from ad-hoc
__IS_RENDERER__ dynamic imports in common/import.ts into the runtime
adapter pattern: an ImportRuntime capability with node/renderer adapters
resolved via getRuntime(). Removes ui/utils/import-bridge.ts.
2026-06-16 08:33:35 +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
Bingbing
de70e63bcb refactor: add aliases for insomnia-data (#10002) 2026-06-02 13:01:18 +08:00
Bingbing
38ee844f39 refactor: move the common code that insomnia-data depends on (#9931) 2026-05-29 05:18:28 +00: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
Bingbing
5fce71abb8 chore: enable ts checks for test files (#9935) 2026-05-25 15:54:08 +08:00
Jack Kavanagh
ce19a78567 refactor: route fs backed cleanup (#9806) 2026-04-15 04:14:41 +00: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
Bingbing
710046ff46 refactor: create insomnia-data and move database files in (#9589) 2026-02-12 09:12:03 +00:00
Bingbing
74825bcdb6 fix: ignore js build files in eslint (#9525) 2026-02-12 16:13:41 +08:00
Kent Wang
eff9d9e7e2 Chore: Adding eslint rule to avoid using window and document in main process related code (#9579)
* add eslint rule for main
* update extension
2026-01-21 03:41:07 +00:00
Jack Kavanagh
dfcb8ebace add lint warning about node modules (#9439)
* add lint warning about node modules

* eliminate hash function from test case

* use bridge for read file

* use main bridges for fs

* add header

* fix types

* remove node:url

* path bridge

* multipart bridge

* clean up eslint file

* add naive warning count in order to see impact
2025-12-08 14:27:48 +00:00
Bingbing
1d625ba1c9 refactor: extract insomnia-api (#9093) 2025-12-08 03:57:47 +00:00
Jack Kavanagh
c62a114d28 Chore: eslint-autofixes (#9421)
* sort and remove a few

* autofix 1

* remove useless undefined

* fix types

* number seperators

* native coercion

* utf8

* explicit number

* dom node dataset

* explicit unused catch

* array find

* fix types

* prefer negative index

* from code point

* fix error layout

* prefer ternary

* explicit length

* useless case

* named functions

* utf8

* import style

* default parameters

* no instance of

* clone

* use regex test

* single call

* prettier

* fix types

* Revert "use regex test"

This reverts commit 8fb9e991fffa9e3a51ff75cdc29dad331ed2fb66.
2025-11-27 09:36:52 +00:00
Bingbing
2cff33f88c chore: enable react-hooks/purity rule (#9430) 2025-11-27 02:54:52 +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
Jack Kavanagh
2d64f5b0a1 chore: normalise filenames (#9399)
* add rule

* kebab case

* kebab case

* kebab case

* fix import path

* fix snapshot
2025-11-19 11:00:54 +00:00
Ryan Willis
d798be87dc feat(inso): support request timeouts (#9363)
* feat: support request timeouts in inso

---------

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2025-11-18 10:50:19 -07:00
Jack Kavanagh
593a05bea7 chore: fix all playwright warnings and cut CI time by 10% (#9071)
* speed up pre req tests

* remove timeout and move loop

* fix warning

* fixed all warnings

* fix warnings

* fix all lint warnings

* fix more warnings
2025-09-03 11:28:59 +00: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
James Gatz
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
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
a5004a4df5 fix playwright lint warnings (#8620)
* pw autofix

* fix oauth test

* merge tests

* merge test

* merge test

* merge tabs

* merge after response
2025-04-15 22:53:32 +02: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
b30978e33b Full-prettier-run (#8605)
* prettier

* remove markdown linting
2025-04-11 13:37:19 +02:00
Jack Kavanagh
4084bcded9 More-eslint-fixes (#8593)
* forced type import

* add linting to sdk

* insomnia testing
2025-04-08 17:28:59 +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