1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/main/app-paths
Sebastian Malton 5a5eda935b
Add better type safety around Channels (#6133)
* Add better type safety around Channels

- Reallow non-JSON serializable complex types

- Remove unnecessary JSON serialization step to IPC

- Remove unnecesary injectable-ization of MessageChannel and
  RequestChannel declarations

- Add channel listener injectable getter function to remove general need
  for type casting and improve type safety

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add check to verify data in IPC related tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix implementation in light of new safety check in tests

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix listener ID clash potential

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Switch to not forcing split of request channel handlers being seperate from the listener decl

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Move message channels to changed signature too

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix not registering listener

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix test imports

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Fix type errors

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Refactor listening of different channel kinds

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Add test covering new checking code for request channel handlers

Signed-off-by: Sebastian Malton <sebastian@malton.name>

Signed-off-by: Sebastian Malton <sebastian@malton.name>
2022-10-13 07:50:19 -04:00
..
directory-for-integration-testing Make starting of application modular and unit testable (#5324) 2022-05-18 16:18:02 +03:00
get-electron-app-path Making apiBase injectable (#6022) 2022-10-05 08:10:36 -04:00
set-electron-app-path Make starting of application modular and unit testable (#5324) 2022-05-18 16:18:02 +03:00
app-paths-request-channel-listener.injectable.ts Add better type safety around Channels (#6133) 2022-10-13 07:50:19 -04:00
get-app-paths.ts Enable consistent-type-imports eslint rule (#5205) 2022-04-06 10:34:16 -04:00
setup-app-paths.injectable.ts Fix kubeconfig-sync sometimes producing multiple identical entities (#5855) 2022-10-03 10:38:41 -04:00