Commit Graph

2141 Commits

Author SHA1 Message Date
Jack Kavanagh
e83badf767
fix: url bar auto-focus (#5199)
* connect unique key hack up to focus useEffect

* fix lint

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-09-20 12:44:47 +00:00
Jack Kavanagh
8c7d74a0c9
remove always rendered tabs (#5198) 2022-09-20 11:07:51 +00:00
James Gatz
b3c3c9b594
use fromSync true to indicate pasting from url should refresh the ui (#5195) 2022-09-19 11:52:44 +01:00
Mark Kim
d28d8cafb6
[INS-1976] Adding Placeholder Pane (#5189)
* adding Placeholder Pane

* Update packages/insomnia/src/ui/components/wrapper-debug.tsx

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2022-09-16 14:30:43 +00:00
Jack Kavanagh
bd58dc9241
fix db->database (#5188) 2022-09-16 14:00:08 +00:00
James Gatz
9857ee8712
Force refresh cleanup (#5184)
* remove forceRefreshCounter from app.tsx

* simplify refresh counter for ws request pane

* remove forceRefreshKey from remaining panes

* remove unused nunjucks key

* cleanup forceUpdate drills

* undrill handleSetActiveResponse

* put restore back in

* more uniqueness

Co-authored-by: jackkav <jackkav@gmail.com>
2022-09-16 14:56:41 +02:00
Jack Kavanagh
fbf2fde422
Refactor/remove-react-hack-mime-type (#5183)
* undrill update mime type

* use content type as a key
2022-09-15 11:40:02 +02:00
Jack Kavanagh
dc56947574
websocket team sync (#5180)
* enable team sync in ws request

* sync payload

* add default payload name

* make git sync work

* fix test

* hrmph

* fix failing nedb test

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-09-15 08:16:28 +00:00
Mark Kim
bbb47524a7
[INS-1804] Add Query Tab for WebSocket (#5177)
* add query tab

* clean

* add disabling functionality

* Update packages/insomnia/src/ui/components/websockets/action-bar.tsx

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

* Update packages/insomnia/src/ui/components/websockets/action-bar.tsx

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

* Update packages/insomnia/src/ui/components/websockets/action-bar.tsx

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

* add renaming to resolve conflicts

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
2022-09-14 14:58:48 +00:00
Mark Kim
f7ca6c1992
[INS-1954] Fix message being removed when switching environments (#5178)
* add fix for environment var changes

* add suggested changes
2022-09-14 14:14:55 +00:00
Jack Kavanagh
111a7c8033
fix copy (#5176) 2022-09-14 07:03:40 +00:00
Mark Kim
560bfbe37d
[NO-TICKET] Add style for enabled status (#5162)
* add style for enabled status

* Update packages/insomnia/src/ui/components/websockets/websocket-request-pane.tsx

Co-authored-by: Filipe Freire <livrofubia@gmail.com>

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-09-13 17:42:50 +00:00
Jack Kavanagh
2e151a43e8
show ws connection state in sidebar (#5174)
* show ws spinner

* use green circle

* fix flashing of indicator on sidebar

* use selector for setActiveRequest in sidebar

* use selector for duplicate request in sidebar

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-09-13 14:35:43 +00:00
James Gatz
862ab2acda
remove white space from event log view (#5175) 2022-09-13 15:52:36 +02:00
David Marby
09471be1a1
Hide the github stars for logged in users (#5172) 2022-09-13 10:31:42 +00:00
James Gatz
7c4640de62
add json prettify button (#5171)
Co-authored-by: Jack Kavanagh <jackkav@gmail.com>

Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
2022-09-13 08:30:15 +00:00
Jack Kavanagh
a7901bdaac
make focus consistent with http request (#5169)
* make focus consistent with http request

* refactoring pass

* fix disconnect

* fix keydown handling
2022-09-13 09:04:14 +01:00
Jack Kavanagh
f325b94e73
fix drag and drop and sort (#5168) 2022-09-12 14:13:05 +00:00
Filipe Freire
451e5fbbaa
[INS-901] Empty state for Dashboard (#5157)
* [INS-901] Empty state for Dashboard

* add typings

Co-authored-by: Mark Kim <mark.kim@konghq.com>
2022-09-09 22:13:35 +00:00
James Gatz
0373bb578b
Initial WebSocket support (#5043)
* [INS-1697] Create WebSocket Request (#5041)

* add fail safe

Co-authored-by: Mark Kim <mark.kim@konghq.com>

* Websockets IPC API (#5044)

* add url to ws-request model

* fix webSocketRequest typo and add url

* add websocket api and expose it through preload ipc

* add typings

Co-authored-by: Mark Kim <mark.kim@konghq.com>

* [INS-1701] Create/Close Websocket Connection (#5046)

* add websocket action bar and its components

* remove comments

* clean up

* reflect on the electron api

* remove unused files

* import name change

* add styling

* remove commet

* add suggested changes

* remove default value

* Add WebSocketRequest to sidebar and update types (#5048)

* [INS-1700] Delete Websocket Request (#5055)

* add websocket actions dropdown

* add actions to websocket request in sidebar

* [INS-1703] Display WebSocket messages - first pass (#5054)

* Update event types to improve inference

* Update websocket response pane to fetch/subscribe and display the events

* [INS-1693] Add WS echo server for smoke tests (#5050)

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>

* fix sidebar unit tests (#5064)

* [INS-1776] adds `ws` dependency explicitly (#5066)

* [INS-1702] WebSocket Send Message (#5052)

* add initial changes for websocket message

* add abstraction for db operation and websocket operation

* remove console

* add rename

* add basic testing

* add basic testing

* add unit tests

* add form event type

* add comments

* disallow exporting context directly

* add suggested changes

* refresh the query

* using useDeepCompareEffect

* rename variable

* add mock

* clean up

* clean up

* correct the file name

* add some changes

* removing nedb-context and its hooks

* remove database changes for event sending

* [INS-1778] Fix Global Module Typing Issue (#5065)

* fix typings

* add jest import

* [INS-1703] View WebSocket Messages (#5074)

* save changes

* add styles and move files around

* remove unused code

* clean up some components

* add clean up

* add timestamp component

* add unit tests

* add case

* add style changes

* [INS-1786] WebSocket headers tab (#5080)

* first ui pass

* extract and wire up bulk editor

* raise ready state, move send

* add upgrade header debug logs

* can pass header to websocket upgrade

* implement readOnly headers

* add upgrade event and sent headers

* clean up

* fill out http upgrade into the event

* change upgrade message

* read only headers while connected

* remove upgrade event

* revert bulk editor change

* fix header editable toggle

* add nunjucks todos

* improve readOnly implementation

* disable codemirror/nunjucks for websocket headers

* take calculated headers out of the data model

* move hardcoded default headers down the tree

* fix request url rendering issue

* removed spammy warning

* clarify prop name

* refine pair typing

* change placeholder

* remove readOnly header property

* fix readOnly header layout

* Update packages/insomnia/src/ui/components/dropdowns/websocket-request-actions-dropdown.tsx

* Show HTTP->WS upgrade (handshake) (#5091)

* first pass as event

* add handshake ui

* add timeline tab

* simplify ResponseTimelineViewer

* transform res debug modal to change timeline props

* decouple timeline fetching from timeline component

* timeline ui pass

* record headers in request and response models

* can view timeline history

* write timeline to file

* some timeline

* can persist event logs

* put interface beside usage

* add note

* add event log history

* remove table event row

* tidying up

* make ws colors match

* enable multiple open connections

* close open connections at app exit

* remove old test

* Update packages/insomnia/src/models/request-version.ts

* fix type

* default readystate

* fix preview css scroll

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

* INS-1788: Add control flow to improve responsiveness. (#5094)

* INS-1788: Add control flow for responsiveness.

This prevents events from flooding the UI thread entirely.

* Add additional code comments.

* fixup: webSocketEvent -> webSocketEvents

* display response headers (#5102)

* Show errors in timeline (#5100)

* remove unused context provider

* show errors in event tab

* updates timeline with message and close

* clean up

* show errors in timeline

* fix WebSocket capitalisation

* make timeline reader specific to ws

* write outbound messages to the timeline

* fix type

* Make the head row sticky in the events table (#5103)

* Add client certificate support to websocket connections (#5112)

* [INS-1810] close connection on response change (#5104)

* close ws connection when response is changed

* add delete logic for the queue mapg

* set error response to active response

* useRef for CodeEditor

* extract closeRequest

* use requestId to eliminate inconsistencies

* refactor extract clean up methods

* timeline feedback

* change type annotation

* fix type

* Revert "use requestId to eliminate inconsistencies"

This reverts commit 98335a927e.

* [INS-1803] show cookie tab in response pane (#5105)

* hard code sending and storing to true

* make tab naming consistent

* hard code cookie settings to false

* fix headers isDisabled bug

* [INS-1805] Add Auth Header Tab (#5115)

* add minimal change to the auth flow

* add disable state

* adding dropdown disable

* simplify reducer

* fix lint

* [INS-1839] Rename tab Header everywhere (#5119)

* can import/export websocket requests (#5122)

* use responseId for timeline name (#5124)

* add react-virtual to virtualize the event log view (#5126)

* [INS-1833] Include Auth Header in Headers mapping for WebSocket Connection (#5120)

* add auth to the header

* remove console log

* remove unneeded async

* add success redirect logic to websocket server

* add unexpected-response handler

* remove digest auth (#5129)

* remove auth header and outbound message timeline (#5130)

* [INS-1840] Add Connected Status Label and Extras (#5131)

* add status related changes

* text label change

* WebSocket ipc typing proposal (#5125)

* make consistent with main bridge

* rename webSocket

* remove deviated mock

* use consistent arrow function defintions

* Update packages/insomnia/src/main/network/websocket.ts

* Set the environment for websocket responses (#5132)

* first pass (#5123)

* [INS-1843] Add more checks to WS smoke test (#5138)

* Fix failing websocket smoke test

* Add remaining websocket smoke server endopints to fixtures

* Add checks for basic-auth, bearer and redirect

* Rm assertion

* can select payload type (#5133)

* Implement nunjucks rendering for websocket urls, authentication, headers and urls (#5134)

* fix  websocket->webSocket (#5142)

* bug fix (#5144)

* INS-1844: Implement basic event view functionality. (#5146)

* INS-1844: Implement basic event view functionality

* CSS fix to align Preview button with tab buttons.

* Reverse the order of WebSocket events (#5148)

* Reverse the event log order in the view and subscribe to messages after the latest

* WebSocket response model (#5147)

* init websocket-response model

* add websocket response model

* remove unused timeline getter

* remove unused functionality from the ws-response model

* can select and save payload message and preview mode (#5143)

* [INS-1838] Add Empty State (#5140)

* add empty state

* use the empty state pane

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

* Bug/stabilise-ws-fetch-method (#5152)

* just poll

* remove cts and eventlog channel

* Fix/nitpicks (#5156)

* remove unused names

* fix copypasta icon

* ensure all subcompnent drop state on request change

* move empty state to response pane

* add websockets to quick switch (#5159)

* [INS-1800] Remove value validity check in the WebSocket headers (#5154)

* remove valid value check in the headers

* add header name filtering

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Mark Kim <mark.kim@konghq.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
Co-authored-by: Jack Kavanagh <jackkav@gmail.com>
Co-authored-by: John Chadwick <86682572+johnwchadwick@users.noreply.github.com>
Co-authored-by: David Marby <david@dmarby.se>
2022-09-09 14:53:28 +00:00
Mark Kim
1338f211dc
add plugin hub link (#5155) 2022-09-09 10:40:22 +01:00
dependabot[bot]
771fb42c8b
Bump vite from 2.9.1 to 2.9.13 in /packages/insomnia-components (#5121)
* Bump vite from 2.9.1 to 2.9.13 in /packages/insomnia-components

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) from 2.9.1 to 2.9.13.
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/main/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v2.9.13/packages/vite)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>

* Run bootstrap

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-09-06 09:17:55 +00:00
kreosus
674874e3ac Bump app version to 2022.6.0-beta.4 and lerna package versions 2022-09-01 12:08:01 +00:00
nHuebner
0ade973590
fix: set default header on isomorphic-git to fix BitBucket and AWS CodeCommit git sync (#4865)
* fix: set default header f

Set deafult header for isomorphic-git httpClient.
Deafult behaviour for cli git command adds "Accept: */*" header,
to mimic this behaviour an defaultGitAcceptHeader will be set and merged with optional provided config headers.

#2220

* fix: change default header behaviour

faulty behaviour of merge with config headers, so currently no merge with config.headers

* Fix bug where we always only send the Accept header, and miss other headers

Co-authored-by: nHuebner <nico.huebner.1985@gmail.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-08-30 13:16:56 +01:00
kreosus
a662edefd1
fixes bug (#5107) 2022-08-25 16:48:01 +01:00
kreosus
02f507d745 Bump app version to 2022.6.0-beta.3 and lerna package versions 2022-08-25 12:30:08 +00:00
Filipe Freire
854c08a76e Bump app version to 2022.6.0-beta.2 and lerna package versions 2022-08-18 12:23:48 +00:00
kreosus
45ad527e88
Changed dropdown menu to have Request Collection on top of list. (#5090)
Co-authored-by: Filipe Freire <filipe.r.freire@gmail.com>

Co-authored-by: Filipe Freire <filipe.r.freire@gmail.com>
2022-08-18 06:42:04 +00:00
David Marby
e724dd78a5 Bump app version to 2022.5.1 and lerna package versions 2022-08-17 10:46:46 +00:00
Filipe Freire
2b23d68318
[INS-1789] Fix issue preventing selection of custom HTTP methods (#5086) 2022-08-17 10:40:58 +00:00
David Fluck
a3fa6ca87f
Revert "only build sr when used (#4772)" (#5075)
This reverts commit 70f8e7fbf9.
2022-08-15 14:15:30 -04:00
brian
6f227ffa11
Fix an issue with URL encoding on cURL imports (#5006)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-08-12 13:53:58 -04:00
David Marby
ebe5fffd67
Remove unused sync graphql calls (#5057) 2022-08-12 12:48:14 +00:00
kreosus
aec2bd1758 Bump app version to 2022.6.0-beta.1 and lerna package versions 2022-08-11 19:06:36 +00:00
Filipe Freire
93d6822b17
[INS-1779] Fix send and download not working without environment selected (#5071) 2022-08-11 11:49:20 -07:00
Filipe Freire
0435188220
[INS-1668] handle multiple security requirement objects (#5047)
* [INS-1668] handle multiple security requirement objects

* Add fixtures to test out multiple api keys
2022-08-05 11:01:38 +00:00
Filipe Freire
b72c923746 Bump app version to 2022.5.0 and lerna package versions 2022-08-02 16:25:13 +00:00
Dimitri Mitropoulos
4414005b9e
[INS-1724] creating a gRPC request should activate that request (#5037) 2022-08-02 09:19:14 -04:00
Filipe Freire
08ae04f241 Bump app version to 2022.5.0-beta.7 and lerna package versions 2022-08-02 10:05:29 +00:00
James Gatz
313d72c40d
Fix pinning a request with the keyboard shortcut (#5034) 2022-08-02 09:53:21 +00:00
kreosus
b9eaffe8fb
This commit removes the focus from sign out to sync workspaces when pressing enter (#5028) 2022-08-01 18:51:04 +02:00
James Gatz
9922366cae
only handle send on enter in request-url-bar (#5031) 2022-08-01 15:37:09 +00:00
James Gatz
e4e674df8f
move keyboard shortcuts to global listener in url-bar (#5030)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Mark Kim <103070941+marckong@users.noreply.github.com>

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: Mark Kim <103070941+marckong@users.noreply.github.com>
2022-08-01 15:02:46 +00:00
James Gatz
250ffa49e4
update the dropdown-list style when the uniqueness key changes (#5029)
Co-authored-by: Mark Kim <103070941+marckong@users.noreply.github.com>

Co-authored-by: Mark Kim <103070941+marckong@users.noreply.github.com>
2022-08-01 14:37:14 +00:00
James Gatz
f2bf39a2d9
Use null value to set "No environment" (#5027) 2022-08-01 11:27:45 +00:00
Dimitri Mitropoulos
0aca9717d9
[INS-1711] regression: fixes lazyWithPreload types (#5025) 2022-07-29 12:10:16 -04:00
Dimitri Mitropoulos
a94d990f3b
INS-1713 fixes content-type editor sync (#5024) 2022-07-29 15:06:15 +00:00
Dimitri Mitropoulos
2ecd950122
[INS-1709] hotfix: fixes missing sync dropdown (#5022) 2022-07-29 10:39:18 -04:00
Dimitri Mitropoulos
892344db84
hotfix INS-1712 fixes duplicate request from dropdown (#5023) 2022-07-29 09:55:15 -04:00
Dimitri Mitropoulos
fedf3ecca4
INS-1692 removes document preview toggle (#5020) 2022-07-28 23:46:02 -04:00
James Gatz
e76735c709 Bump app version to 2022.5.0-beta.6 and lerna package versions 2022-07-28 13:48:13 +00:00
Daniel Stone
fa7dd44d8c
Fix #4797 request switcher auto-focus from CodeMirror (#5002)
Fixes the input `.focus()` method call. The simplest fix was to revert the change in 3cf464d059.

There do not seem to be any new problems in the current application from reverting this commit's relevant changes, indicating that the original cause of the bug is no longer present.
2022-07-28 11:13:01 +00:00
Jack Kavanagh
1a464446b0
[INS-1695] Fix Show Keyboard Shortcuts modal not opening (#5016)
* fix register

* fix modal register

* remove type
2022-07-28 10:38:47 +00:00
Jack Kavanagh
6399a971b3
Eliminate wrapperProps (#4979)
* unwrapper props

* undrill collapse and dupe group

* undrill togglePin

* chop up wrapper props

* eliminate more drills

* undrill generate code modal

* undrill setactiverequest

* undrill copyAsCurl

* undrill updateDownloadPath

* undrill setpreviewmode

* undrill sidebarsort

* undrill sidebarfilter

* undrill SetActiveResponse

* undrill bulk settings toggles

* remove handleShowRequestSettings dead code

* undrill show cookie modal

* undrill remove workspace

* undrill send and sendanddownload

* undrill body-editor

* reconcile name drift

* undrill updateRequest

* fix lint

* fix(?) request send hotkey

* push sidebarChildren and dlPath down the tree

* undrill activeworkspacemeta and environments

* fix rebase mistake

* remove comment

* fix ts ignore and naming

* fix keydown binder

* restore render hack and fix delete

* move setActiveEnvironment to wrapper

* forwardRef: true

* fix send request without env in redux

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-07-28 09:40:22 +00:00
Filipe Freire
78536b142a
chore: Fix package-locks (#5015) 2022-07-28 08:29:31 +00:00
dependabot[bot]
fae0bb40a9
Bump glob-parent from 5.1.1 to 5.1.2 in /packages/insomnia-inso (#5014)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-28 07:27:42 +01:00
John Chadwick
585ad9e46d
Move login flow to accounts website. (#4964)
* INS-1562: Allow fetching data-uris for fast base64

* INS-1562: Add insomnia-api-client dependency.

* INS-1562: Implement delegated login flow

* import named react imports directly (like rest of app)

* Fixes.

* Error handling improvements.

* Revert to using @sentry/electron inside renderer.

* Add break in command switch.

* Better support for re-auth prompts.

* Minor styling improvement.

* Jest fixes.

* Simplifications, fix occasional weirdness

* Update package-lock.json

* *facedesk* Fix URL copy!

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
Co-authored-by: David Marby <david@dmarby.se>
2022-07-27 20:55:18 -04:00
Dimitri Mitropoulos
9df9b9a457
[INS-1517] adds GitHubStarsButton (#5009)
* adds GitHubStarsButton

* adds incognito mode functionality

* adds segment

* update: only show stars on dashboard

I missed a comment on the ticket

* cancel fetch if component is no longer mounted

* new design

* change footer link (per request) now that the same link's in the header

* inlines links components per review feedback

* adds caching for fetched value to overcome over-rendering
2022-07-27 13:25:33 -04:00
Mark Kim
f877b040c1
fix: return the input focus back after sending a request (#4978)
* fix focus back

* add fix for blur on dropdown trigger button in request url bar

* add useCallback

* add useCallback

* add useCallback

* fix handleSendAndDownload from prev itteration

* add requested changes

* fix focus back

* add fix for blur on dropdown trigger button in request url bar

* add useCallback

* add useCallback

* add useCallback

* fix handleSendAndDownload from prev itteration

* add requested changes

* fix string mistake

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-07-26 16:27:21 -04:00
James Gatz
199cc8abea
Chore/response viewer fc (#5005)
* update response viewer to fc

* use key to update the component instead of refreshing through refs
2022-07-26 15:50:12 +02:00
Pavlos Koutoglou
ae2e2058ed
Prompt button to fc component (#4983) 2022-07-26 14:24:06 +02:00
Marco
8202b2e59f
feat: add link to Azure DevOps access token docs (#4973)
* feat: add link to Azure DevOps access token docs

* fix lint

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-07-25 15:04:53 +00:00
Mark Kim
e648f15820
refactor: convert settings-modal to functional (#4991)
* add modal fc conversion

* clean up

* Update packages/insomnia/src/ui/components/modals/settings-modal.tsx

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

* Update packages/insomnia/src/ui/components/modals/settings-modal.tsx

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

* Update packages/insomnia/src/ui/components/modals/settings-modal.tsx

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

* add requested changes

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
2022-07-25 10:35:25 -04:00
Jack Kavanagh
7ab8882729
speceditor-sidebar class->fc (#4987)
* first pass

* fix type

* eliminate state
2022-07-25 12:58:10 +00:00
Jack Kavanagh
224e5d0842
request-group-row/tree class->fc (#4990)
* first pass

* and tree

* inline incremented string
2022-07-25 12:07:24 +00:00
Jack Kavanagh
96bd20ad86
fix e2e test/consistent buttons (#4999)
* fix e2e test/consistent buttons

* fix checks

* double test timeout
2022-07-25 11:34:34 +00:00
Jack Kavanagh
9ef02c48cc
WrapperProps: decouple page layout (#4994)
* undrill pane and sidebar postions

* simplify sidebarHidden
2022-07-25 10:53:25 +00:00
David Marby
c15c05bdbb
Remove reference to Insomnia Plus (#5000) 2022-07-22 15:49:13 +00:00
Jack Kavanagh
e3857221c0
Refactor/shortcuts fc (#4986)
* first pass

* useCallback
2022-07-22 11:13:01 +00:00
Jack Kavanagh
ac166158c8
response pane class->fc (#4982)
* first pass

* remove old

* remove delete drill prop

* remove two more drills

* two more drills

* remove one drill

* constify

* two more drills

* remove preview mode get/set drills

* undrill exportAsHAR

* undrill debug response download

* undrill prettify option

* save ipc for next pass

* fix delete response

* make delete function uniform

* address feedback comments
2022-07-22 09:52:00 +00:00
Jack Kavanagh
4d82d4ddb7
account class-fc (#4988)
* first pass

* simplify

* use FormData as state

* address review comments
2022-07-22 10:25:00 +01:00
dependabot[bot]
30f3eb0520
Bump glob-parent from 5.1.1 to 5.1.2 in /packages/insomnia-testing (#4996)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.1 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-07-22 09:53:52 +01:00
David Fluck
e930140bd0 Bump app version to 2022.5.0-beta.5 and lerna package versions 2022-07-21 17:33:22 +00:00
Dimitri Mitropoulos
4be33b6bbe
undoes hotKeyRegistry prop drilling (#4984) 2022-07-21 13:43:30 +02:00
Jack Kavanagh
581dd3d9eb
remove lazy (#4981) 2022-07-19 13:00:01 +00:00
Jack Kavanagh
e49cd9bf9c
sidebar children class->fc (#4966)
* transform

* nest components to remove drills

* sort props

* rename overloaded children prop

* check for the length of children in request-group-row

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-07-19 12:26:49 +00:00
James Gatz
526bfc35c8
Refactor the Dropdown into a function component (#4932)
* add unit test for dropdown component

* refactor dropdown to function component wip

* use useLayoutEffect for updating the position

* update types to use DropdownHandle

* remove unused forcedposition

* remove dropup

* add warning about dropdown container

* add useCallback/useMemo

* re-export the container id for tests

* split the state
2022-07-19 13:58:25 +02:00
Mark Kim
5f250334f6
refactor: convert markdown editor to functional (#4903)
* convert markdown editor to functional

* add requested changes
2022-07-19 00:16:03 -04:00
Pavlos Koutoglou
7447c30340
Refactor the Button into a function component (#4945)
* Refactored the button component to be function component

* Remove onDisabledClick prop

* Chang prop distraction and use PropsWithChildren type
2022-07-18 21:28:52 +00:00
Jack Kavanagh
d98d61d30c
gql explorer type class->fc (#4958)
* second pass

* fix lint
2022-07-18 10:38:37 +00:00
Jack Kavanagh
ddd09c64eb
Markdown preview class->fc (#4956)
* transform

* remove debounce prop and handle nulls
2022-07-18 12:12:11 +02:00
Jack Kavanagh
1bef8ac364
workspace dropdown class->fc (#4948)
* first pass

* simplify

* useCallback
2022-07-14 17:45:36 +00:00
kreosus
68541bdab9 Bump app version to 2022.5.0-beta.4 and lerna package versions 2022-07-14 14:02:53 +00:00
Dimitri Mitropoulos
537b0bcb95
Removes indirection for key hotkey codes (#4957)
* removes defineHotKey

* removes keyBinds and keyComb wrapper functions

* fix properties of keyCombination being undefined break equality check

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-07-13 15:03:17 -04:00
Mark Kim
c6e0591c58
fix: add change method param on callback (#4963) 2022-07-13 14:01:52 -04:00
Jack Kavanagh
deb1038c28
remove unused component (#4959) 2022-07-13 19:08:20 +02:00
Pavlos Koutoglou
0ab0d72462
Improved accessibility for activity toggle. (#4928)
* Fix issue with activity toggle accessibility

* add unit tests

* update styled components to the object format

Co-authored-by: Mark Kim <mark.kim@konghq.com>
Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-07-13 15:05:23 +02:00
Jack Kavanagh
57b5493e9e
Fix/split button quick fixes (#4953)
* move border

* remove disabled button props

* Update packages/insomnia/src/ui/css/components/request-url-bar.less
2022-07-12 20:03:28 +02:00
James Gatz
b00b582c3d
use the window event to get the oauth refresh page (#4955) 2022-07-12 19:14:07 +02:00
Jack Kavanagh
9d02a854d4
replace notice with p tag (#4954) 2022-07-12 15:20:24 +02:00
Jack Kavanagh
a63c873142
transform (#4936) 2022-07-08 11:40:40 +00:00
Pavlos Koutoglou
ae9ac5a0b7
Fix tabIndex typo (#4940)
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-07-08 08:24:25 +01:00
Mark Kim
2a315a5242
fix(openapi2kong): removing unused component reference (#4911)
* add removing logic

* add recursion

* add comments

* add circular ref yaml and its expected mock

* change the $refs.get to the check method

* add path buildilng

* add for loop

* simplifies circular test

* add feedback

* add comments

* add clean up and doc

* adds response to circular-requestBody.yaml so that it's valid & lints

* inlines helpers (and catches null cases it missed)

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-07-07 15:41:12 -04:00
Filipe Freire
2af3eff41b Bump app version to 2022.5.0-beta.3 and lerna package versions 2022-07-07 15:37:58 +00:00
Dimitri Mitropoulos
f72c5a6969
useCallback with async is ok, after all (#4934) 2022-07-07 15:04:41 +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
Jack Kavanagh
8a26fdbaa7
multipart viewer class->fc (#4930)
* multipart

* self review

* Apply suggestions from code review

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

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
2022-07-07 12:28:49 +00:00
Mark Kim
5f2f67d49a
test: adding unit tests to AccountDropdown (#4845)
* add text label change

* add unit tests

* tests created

* add testing

* clean up

* remove test.todo

* Update packages/insomnia/src/ui/components/dropdowns/account-dropdown/account-dropdown.test.tsx

Co-authored-by: David Marby <david@dmarby.se>

* fix redux for testing

* Update packages/insomnia/src/ui/index.tsx

* fix lint

* fix lint

Co-authored-by: kristofer <kristofer@khuff.co>
Co-authored-by: kreosus <59621250+kreosus@users.noreply.github.com>
Co-authored-by: David Marby <david@dmarby.se>
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-07-07 11:28:26 +00:00
tangweikun
0f5d858030
Fix edit cookie shows expires as an Invalid Date (#4897)
* fix: edit cookie shows expires as an Invalid Date

* refactor: using date-fns for validation

* use datetime-local input and transform

* use defaultValue

Co-authored-by: tangweikun <tangweikun@corp.netease.com>
Co-authored-by: jackkav <jackkav@gmail.com>
2022-07-04 20:08:06 +00:00
Jack Kavanagh
c46d5613c7
send button -> split button (#4924)
* first pass

* simplify timeouts+intervals

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

* use key to tidy up url bar

* fix lint error in hook

* fix type-check

* add border-right

* Update packages/insomnia/src/ui/css/components/request-url-bar.less

Co-authored-by: Filipe Freire <livrofubia@gmail.com>

* use --hl

Co-authored-by: James Gatz <jamesgatzos@gmail.com>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-07-04 16:05:43 +00:00
Jack Kavanagh
c85205cef5
prevent focus loss (#4925) 2022-07-04 11:35:16 +00:00
Filipe Freire
0e0591262b
Chore: bump playwright to version 1.23.0 (#4914) 2022-07-01 16:44:42 +00:00
Maksim Rotmann
044a3b0a7d
Remove wrong backticks from json path help window (#4892)
Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-07-01 16:14:13 +00:00
David Marby
946b5627bc Bump app version to 2022.5.0-beta.2 and lerna package versions 2022-06-30 08:10:31 +00:00
Dimitri Mitropoulos
9bea9e06f1
fixes ContentTypeDropdown and AuthDropdown (#4918) 2022-06-29 17:34:28 -04:00
Dimitri Mitropoulos
f00dc50da0
fixes tsconfigs for preload files (#4915) 2022-06-29 13:41:26 +00:00
Jack Kavanagh
ba04d2c47d
Chore/some-fc (#4904)
* editable

* wrapper debug

* method dropdown

* request actions dropdown

* response history dropdown

* wrapper home

* copy button

* auth dropdown

* env dropdown

* content type dropdown

* fix types

* second pass

* response csv viewer

* useCallback pass

* more useCallbacks

* wrapper unit test

* simplify pagelayout

* fix editable bug in unit test

* wrapper unit test useCallbacks

* some gentle tidying

* useCallback usage for async func

* switch to useInterval

* updates types for Editable, Highlight, et al.

* moves usage after declaration

* extracts FC for AuthDropdown items

* removes some prop drilling and extracts component

* adds mandaotry useCallback, rm unused props, types

* use named exports from react npm like rest of project

eventually, we will remove usages of `React` default export since it's a hack from half a decade ago that's no longer necessary now that jsx-transform is a thing.

* removes unnecessary useImperativeHandle (we learn somethin' every day)

* adds necessary useCallback, removes unnecessary useImparativeHandle, TS

* fixes types for useRef (turns out you don't need null in the generic)

* removes unused props

* fixes types from ref helpers

* fixes return from useCallback

* updates useCallback usages

* fixes bind

* fixes lint

for some reason, kept getting:

```
insomnia: /home/dimitri/src/github.com/Kong/insomnia/packages/insomnia/src/preload.js
insomnia:   0:0  error  Parsing error: "parserOptions.project" has been set for @typescript-eslint/parser.
insomnia: The file does not match your project config: packages/insomnia/src/preload.js.
insomnia: The file must be included in at least one of the projects provided
```

* revert incomplete type change

* remove unnecessary useEffect

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-06-29 12:17:13 +00:00
Vincenzo De Petris
3057da42a9
fix: disable font ligatures (#4813) (#4891)
apply font-ligatures-variant style to all elements

Co-authored-by: Vincenzo De Petris <vincenzodepetris@gmail.it>
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-06-29 12:41:49 +01:00
Mark Kim
cd3a079554
refactor: disable URI input for github & gitlab (#4913)
* add disabling logic

* add type

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-06-29 11:47:21 +01:00
Mark Kim
3a4ddfc935
add icon for git providers (#4912)
Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-06-29 11:47:04 +01:00
Dimitri Mitropoulos
1eb74c363e
undoes prop drilling for creating request groups (#4910) 2022-06-29 10:06:05 +00:00
David Marby
df9a48e010
Upload sourcemaps to Sentry on publish (#4909) 2022-06-28 11:29:28 +02:00
Dimitri Mitropoulos
ed3aad6046
tsconfig cleanup (#4908) 2022-06-27 12:57:50 -04:00
Jack Kavanagh
bbceb6097c
Typed preload (#4886)
* convert preload to typescript

* preload types second pass

* improve types

* fix import

* simplify types

* remove migration map

* preload alongside main

* naming improvements

* fix global typing by adding vite import types

* fix test

* isolate main only network code

* fix mapping mistake

* clarify timeline logic
2022-06-26 13:36:30 +00:00
Mark Kim
4f5ef73f7e
fix: adding a fix to the openapi2kong circular deps issue (#4872)
* commit progress

* save changes

* add components and $schema

* add components and $schema

* adding a doc

* add typings

* fix unit tests

* fix unit tests

* add fix and verified with kong cli

* fix unit tests

* Improve types and parameter/body resolution

Co-authored-by: Mark Kim <marckong@users.noreply.github.com>

* fix circular "components" issue

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
Co-authored-by: Mark Kim <marckong@users.noreply.github.com>
2022-06-24 19:48:45 +00:00
Filipe Freire
8300652981
Chore: All dependabot PRs 23 june 2022 (#4893)
* Bump shell-quote from 1.7.2 to 1.7.3 in /packages/insomnia-importers

Bumps [shell-quote](https://github.com/substack/node-shell-quote) from 1.7.2 to 1.7.3.
- [Release notes](https://github.com/substack/node-shell-quote/releases)
- [Changelog](https://github.com/substack/node-shell-quote/blob/master/CHANGELOG.md)
- [Commits](https://github.com/substack/node-shell-quote/compare/v1.7.2...1.7.3)

---
updated-dependencies:
- dependency-name: shell-quote
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Bump got from 11.8.3 to 11.8.5 in /packages/insomnia-smoke-test

Bumps [got](https://github.com/sindresorhus/got) from 11.8.3 to 11.8.5.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v11.8.3...v11.8.5)

---
updated-dependencies:
- dependency-name: got
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix indentation for package-lock

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-06-24 09:54:51 +01:00
Wils Dawson
b400eb1160 Bump app version to 2022.5.0-beta.1 and lerna package versions 2022-06-23 14:10:00 +00:00
tangweikun
1aca90a810
Fix timeout setting in milliseconds (#4881)
* feat: make NumberSetting support step

* fix: correct request timeout help message

* make default step 1 for NumberInput

* Provide similar experience for other inputs with ms

Co-authored-by: tangweikun <tangweikun@corp.netease.com>
Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-06-23 15:12:59 +02:00
Filipe Freire
00a383690e Merge branch 'release/2022.4.2' into develop 2022-06-22 18:23:44 +01:00
Filipe Freire
dd79b934bf
Add graphQL to smoke tests (INS-1592). (#4867)
* Add graphQL to smoke tests (INS-1592).

* Remove waitForNavigation

* Tidy up code, improve assertions and selectors

* Fix typo

* add gandalf

Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-06-22 15:29:27 +00:00
Filipe Freire
f44da26ff3 Bump app version to 2022.4.2 and lerna package versions 2022-06-22 14:24:12 +00:00
James Gatz
38a53e603b Redirect to the project view if no active workspace (#4882) 2022-06-22 15:10:57 +01:00
Jack Kavanagh
07706d093a remove last workspace check (#4880) 2022-06-22 15:10:43 +01:00
James Gatz
8d7b9d8b7a
Redirect to the project view if no active workspace (#4882) 2022-06-21 16:50:43 +00:00
Jack Kavanagh
a05db00c98
remove last workspace check (#4880) 2022-06-21 18:29:02 +02:00
Jack Kavanagh
97e3e0c2d8
bump hawk (#4863)
* bump hawk

* package locks
2022-06-18 09:50:06 +00:00
John Chadwick
5622393f24
Enable strict TypeScript in insomnia. (#4869)
* Enable strict TypeScript in insomnia.

* Remove implied tsconfig settings.
2022-06-16 22:13:54 +00:00
John Chadwick
f52bafc21b
Properly handle 204 from notifications endpoint (#4873)
In some cases, the notifications endpoint can return a 204 response with
no body. This commit fixes a regression where this causes a warning.

Note that there is no user facing impact.
2022-06-16 19:13:50 +00:00
Jack Kavanagh
6707e5889d Bump app version to 2022.5.0-beta.0 and lerna package versions 2022-06-16 09:58:24 +00:00
Mark Kim
3edef836c6
fix: adding a simple fix for entering to send a request (#4868)
* add hack

* adding the empty string check else where

* limiting the event scope

This merge will close the following draft PR for its spike work as well.
2022-06-15 18:41:57 +00:00
David Marby
b24d30a21d Merge branch 'release/2022.4.1' into develop 2022-06-15 19:26:05 +02:00
Filipe Freire
07c5b0cc66 Bump app version to 2022.4.1 and lerna package versions 2022-06-15 09:56:45 +00:00
Jack Kavanagh
720dcad6b2 use public class function (#4859) 2022-06-15 10:51:26 +01:00
John Chadwick
3234c05c6e
Enable noImplicitAny. (#4864)
* Enable noImplicitAny.

* extracts PreviewMode

* Update packages/insomnia/src/network/certificate-url-parse.ts

* Add missing type.

* un-any-ifies some of the modal onDone callbacks

easy enough.

* few more onDone, but the async ones this time

* Get rid of jsonlint any.

* adds noImplicitAny support for insomnia-smoke-test

* fixes playwright type error

* avoid full @ts-ignore in playwright

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-06-14 23:41:19 -04:00
Dimitri Mitropoulos
d1f4063e7d
Adds dropdown items for New Folder (and requisite work to accomplish this) (#4862)
Co-authored-by: Dimitri Mitropoulos <dimitropoulos@users.noreply.github.com>
Co-authored-by: gatzjames <jamesgatzos@gmail.com>
2022-06-14 10:00:12 -04:00
John Chadwick
4e85928998
Follow-up: rename shadowing variable r. (#4860) 2022-06-13 12:57:30 -04:00
John Chadwick
fc36be710f
Make ButtonProps.onClick more type-able. (#4853)
* Make Button onClick prop more typeable

Swaps the order of the arguments so that the optional arg is second.

* Review fixes.

* removes some implicit any's

* NoticeTable to FC

might as well, at this point.  we're trying to do these as we can as they present themselves

* fixes margin for collapse icon (broken before this PR)

and removes an unnecessary type parameter

Co-authored-by: Dimitri Mitropoulos <dimitrimitropoulos@gmail.com>
2022-06-13 15:20:05 +00:00
Jack Kavanagh
dcdc429b9b
use public class function (#4859) 2022-06-13 16:53:02 +02:00
John Chadwick
5158abb108
Improve typing in some API code and components. (#4852)
* Add @types/jshint.

* Add type defs for hkdf, objectpath and srp-js

* Improve type safety of API code.

* Misc type fixes/improvements.
2022-06-10 12:10:53 -04:00
Gabriel Amorim
7b7a8c83ae
fix: check if bubble is a child of Tooltip container before removing it (#4821)
Co-authored-by: Gabriel Rosa <gabriel.rosa@dadosfera.ai>
Co-authored-by: Mark Kim <103070941+marckong@users.noreply.github.com>
2022-06-09 17:09:28 -04:00
Filipe Freire
e98bf5d427 Merge branch 'release/2022.4.0' into develop 2022-06-09 14:15:03 +00:00
Jack Kavanagh
28acc69435
bump node and electron 19 (#4847)
* bump electron, node and node-libcurl

* package locks
2022-06-09 09:17:28 +01:00
Filipe Freire
2d6d9ec37f Bump app version to 2022.4.0 and lerna package versions 2022-06-09 08:05:54 +00:00
Dimitri Mitropoulos
c6a17d8a3e
chore: single letter variables (#4848) 2022-06-08 12:27:21 -04:00
John Chadwick
325abe1d00
Improve typing in various UI components. (#4842) 2022-06-08 15:17:02 +00:00
Filipe Freire
10faac4232 Bump app version to 2022.4.0-beta.4 and lerna package versions 2022-06-08 09:21:49 +00:00
Filipe Freire
fc857cb726
chore: Fix package-locks after spectral upgrade (#4840) 2022-06-08 09:11:49 +00:00
Mark Kim
1519fa79cd
add text label change (#4843) 2022-06-07 18:56:25 +00:00
Mark Kim
c2a0abca62
refactor: add segment tracking for git sync (#4841)
* add segment tracking for git sync

* add suggestion

* fix lint

* add other cases for tracking

* add type fix
2022-06-07 18:10:47 +00:00
Take Weiland
5b1ab1b69d
Correctly handle per-operation scopes when importing from OpenAPI 3 (#4756)
* Fix OpenAPI 3 importer ignoring per request scopes

* Fix OpenAPI 3 tests

* Add more tests for OpenAPI 3 endpoint scopes

Co-authored-by: Filipe Freire <livrofubia@gmail.com>
2022-06-06 14:13:14 +00:00