- Includes local fixes that are required by the new code
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Making apiBase injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Convert all of Helm functions to be DI
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Make PortForward's use of apiBase fully injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Convert all metric requests to be injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Replace resource applier with injectables
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Switch KubeJsonApi.forCluster to be injectable but do not use
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Convert the rest of shell sessions to be DI-ed
- This is a prerequesit for using the new
createKubeJsonApiForClusterInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Use new createKubeJsonApiForClusterInjectable for openNodeShellSession
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Make KubeconfigDialog injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove jest-fetch-mock and make fetch injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix tests with new global override
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Add new injectable for create KubeJsonApi and JsonApi instances
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix showing-details-for-helm-release behavioural tests
- Remove HelmChartStore in favour of all injectables
- Create a model for UpgradeChartDockTab
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix show details and updating helm releases tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix residual typing issues related to metrics
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix crash on load due to circular dependency
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix create resource tab not working
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove legacy apiBase global
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Introduce and use isDebuggingInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Introduce and use windowLocationInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove global legacy apiKube
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Improve injectable filenames compared to the injectables inside
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove modifying input in requestActivePortForwardInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Introduce and use get(Milli)SecondsFromUnixEpochInjectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Switch to non-reactive way of gettting possible helm release versions
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix typo
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix bug in KubeApi constructor
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Convert all KubeApi related tests to use asyncFn
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix unit tests after introducing new injectables that have side effects
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix bad rebase causing tests to fail
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Improve expects for multiple field values
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix crash will looking up api refs
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix breaking change on KubeApi.list
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Better fix for formatting urls
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove injectable for time since we should just use useMockTime
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Add happy path behavioural tests for upgrade chart tab
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove debug message
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update snapshots
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* fix showing-details-for-helm-release tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix installing-helm-chart-from-new-tab tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix tests relating to hosted cluster id
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update snapshots to recent changes in master
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Reupdated upgrade chart new tab test snapshots
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix flakiness in unit test when using <Animated>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix flakiness and improve tests for DeleteClusterDialog
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix kubeconfig-sync tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix <Extensions> tests by removing mockFs and making everything injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix build issues
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix getElectronAppPathInjectable override not returning absolute paths
- Also fixes the listing-active-helm-repos-in-prefs tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Replace all uses of getAbsolutePath with joinPaths as it is more correct and less confusing
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix opening application window tests by making override properly absolute
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update snapshots relating no longer using getAbsolutePath
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix and add behavioural tests for RenderDelay
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix extension discovery tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix test flakiness because of path side effects, propagate uses to as many places
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix extension-discovery tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Add global override to fix some tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Rewrite and fix implementation of KubeconfigManager and its tests
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix tests by global override pathExists
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix unit tests failing on windows by using injectable verions of path functions
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Attempt to fix test timeout by using runInAction
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update snapshots after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update snapshots after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix tests after rebase
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix setupIpcMainHandlers usage
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update snapshots
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
Co-authored-by: Iku-turso <mikko.aspiala@gmail.com>
* Make injecting CAs injectable, remove mac-ca as dependency
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix win-ca failing on electron renderer on windows
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix the matcher under features/ for main
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix lint
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Update injectable to make withInjectables have authentic React reconciliation
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make some dock tabs have primitive props to have them React reconcile properly
Currently tab objects that are stored in a storage change reference on every change of dock height, making them less usable as React prop for causing involuntary remounting.
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Override @astronautlabs/jsonpath's underscore version
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove use of buggy 'yarn check'
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Upgrade to use electron 19.0.4
- Update documentation
- Updated disturl in .yarnrc to fix build issue
- Remove use of abort-controller package
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove support for webview tags
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Make openBrowser->openLinkInBrowser injectable
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Remove use of deprecated link matcher API from XtermJS
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Fix type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
* Make root frame child components comply with open closed principle and include it in the behavioural unit tests
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make cluster frame child components comply with open closed principle and include it in behavioural unit tests
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove duplication
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Simplify test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make a component more determistic in unit tests
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Mock uninterested, non-deterministic third party library in unit tests
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Optimize registration of injectables in unit tests to make tests faster
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Update snapshots
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove import time side-effect causing memory leak
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Give an UpdateButton injectables
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* AppUpdateWarning class and injectable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Rename folder to app-update-warning
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add appPublishDateInjectable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Inject ipcRenderer into app-update-warning
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add setter for downloadedUpdateDate
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add tests for AppUpdateWarning
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* appPublishDate initial test
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Parsing app release date from the package version
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Introduce appUpdateWarningLevelInjectable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix withInjectables props
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Determine warning from days passed after update available
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Save update available date in session storage
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Move quitAndInstall() to separate function
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Register quit-and-install ipc channel
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Make update function injectable for button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Update tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Set proper timeframes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Setting global UTC timezone for tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Refresh tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Testing warning level changes over time
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove unused app-publish-date files
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Make linter happy
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Pass quitAndInstallUpdateInjectable to UpdateButton
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove updateAppInjectable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Initial tests for installing update using topbar button
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Refactor AppUpdateWarning class using injectables
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Permit side effects in injectable
periodicalCheckForUpdateWarningInjectable
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Temporarily set noop for UpdateButton update()
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove previous implementation files
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Unoverriding topbar injectables
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Render TopBar inside ApplicationBuilder
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Move updateWarningLevelInjectable
to /common subfolders from /main
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Make UpdateButton warning prop observable
by using computed() structure
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Updating snapshots
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add sync box files allowing to restart & install
update from renderer process
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add Update button dropdown tests
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Fix jest.advanceTimersByTime usage
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Check for severe warning level
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Linter fixes
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Remove usage of legacy global causing trouble in unit tests
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make update warning level completely reactive and responsibility of a renderer
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove dead code
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove tests that are covered by behaviour
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix restarting and installing update when pressing update button
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Update snapshots
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove dead code
Co-authored-by: Alex Andreev <alex.andreev.email@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Update more snapshots
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove duplication from behavioural unit test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Reducing too large MenuItems height
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Reduce too large UpdateButton paddings
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Add jest globalSetup into package.json
to fix timezone test
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
* Do not triggering computed value every time it is being used
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
* Reorganize stuff to prevent circular dependencies
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Install injectable extension to allow injecting reactively many implementations
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using computedInjectMany over filtering injectMany based on enabled extensions for simplicity
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove await for not being needed
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Sort dependencies alphabetically
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* enable csp on lens proxy
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* move csp default value to package.json
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* electron v15.5.7
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* change pipelines to use node 16
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* bump @types/node
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* update yarn.lock
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
* use fs.ObjectEncodingOptions
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
Fixes#5132#5133
- bundled 7 new monospaced fonts for terminal
- fix: refresh terminal font after changing in the preferences / keep cluster iframe accessible in DOM while not active/focused
- display terminal's custom font preview with font-name in the select-box + live-preload for current `fontSize`, fix lint
* Fixes for <Input/>:
- remove duplicated error messages for sync validators
- don't propagate invalid values on change (uncontrolled components only)
- more informative error message for numeric input with min/max info
* Extract product name as injectable
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make tray items comply with Open Closed Principle
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Replace duplicated overrides with global
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add behaviour for navigating to preferences using tray
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce a tray item for updating application
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak naming
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak more naming
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant indirection
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak more naming
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce injectable for package.json being side-effect
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Relocate file to directory containing feature
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using injectable for limiting side effect
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add missing injection token for implementation of tray item
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove resetting state for update is ready to be installed for being unclear
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Kill dead code
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make label of tray item reactive
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Extract updating is enabled to separate injectable
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce competition for tray
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Expand scope of behaviour for updating using tray also contain checking for updates
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove dead code
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Kill dead code
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Implement checking of updates from multiple update channels
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Start installing updates automatically when quitting application
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Show application window when checking of updates has happened
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Show notifications and dialog for downloading update
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Implement naive notifications for version updates
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Implement checking of Electron specific updates as responsibility
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Implement downloading of Electron specific updates as responsibility
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce competition for channel abstraction
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant global override
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix typing after enabling strict mode
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce abstraction for a state that is shared between environments
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Extract states of application update to be usable from all environments
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Handle failing download of update
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make code for window visibility actually work
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Consolidate code for sending messages between processes to a window
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Split bloated dependency in smaller pieces
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make state of download progress accessible from all environments
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Rename files for accuracy
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Move channel abstraction to more global directory
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Enhance typing of channels and sync-box
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Consolidate channel abstraction types
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Update asyncFn to support strict mode
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix snapshot after rebase
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add missing global override
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce injection token for channels to allow injecting all of them at once
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add notifications about change in update status
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Rename property for accuracy
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak code style
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make notifications unit testable in behaviours
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add implementation for asking boolean over processes
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Reorganize responsibilities for checking updates
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Reorganize tests for installing update under separate scenarios
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make stuff happening when root frame is rendered unit testable
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce periodical check for updates
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Allow downgrading app versions
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using competition for checking of updates in application menu
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Kill dead code
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make test less prone to fail for wrong reason
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant boilerplate
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make tests for specific migrations less prone to failing for wrong reason
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Move shared stuff under common
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using single source of truth for selected update channel
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Extract tests for installing update from different update channels to separate scenario
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add missing global override
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Switch to using release channel of installed application version as default value for selected update channel
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Consolidate usage of channel abstraction to same implementation
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make Channel abstraction support return values
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix direct calling of runnables
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Synchronize initial values of sync boxes when window starts
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add missing global override
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak message of question from user
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Consolidate names of directories
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Add TODO
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove unimplemented scenario from test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Simplify test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Improve name of test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant overrides
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix code style
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make Animate deterministic in unit tests
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Simplify naming
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Simplify more naming
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Simplify even more naming
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Simplify more and more naming
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Add todo for cleaning unacceptable code encountered
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Improve name of behaviour
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make unit test more strict
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Enhance name of behaviour
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Introduce dependency to get random IDs
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make asking of boolean value from user not require explicit ID for question
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Simplify code for asking of boolean value from user
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make setting of initial state for sync boxes not trigger irrelevant messaging to main
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make a channel have default type for sent and returned message
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Introduce higher order function to log errors in decorated functions
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Export type for error logging
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak test name
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce higher order function for suppressing errors
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Relocate some explicit error handlings to proper level of abstraction
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make higher order function for logging errors support asynchronous rejecting with non error instance
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make overridden version of application exactly the one required by unit test
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Mark injectable causing side effects
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Revert not required changes
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make code for asserting a promise more strict
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Make dependencies readonly
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove duplication for disposers
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Implement initial values for sync-boxes
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Separate concept of message and request channels
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Introduce tests for requesting from channel in renderer
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Implement requesting from renderer in main
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Revert "Implement requesting from renderer in main"
This reverts commit d3e7899d7900516f3dbfacdb317a453202318305.
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak typing of request channel listeners to get rid of unexpected undefined
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove unused variable
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Tweak timing of sentry setup
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Require messages for MessageChannels be JsonValues for serialization
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Require requests and responses for RequestChannels be JsonValues for serialization
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make different MessageChannels not require explicit "extends JsonObject"
Note: Non-escaped lint breaks type here for forcing interface over type. Reasonable effort brought no understanding for what is the relevant difference between the two.
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make a primitive argument an object for readability
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make typing of higher order function for error suppression not lie
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Serialize messages in channels to make IPC not blow up
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Introduce a way to make intentional orphan promises uniform, controllable and deliberate
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Make downloading of update and what follows more deliberate as orphan promise
Co-authored-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Iku-turso <mikko.aspiala@gmail.com>
* Move utility function under directory
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Move another utility function under directory
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix incorrect name of file
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Remove redundant code
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Kill dead code
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Round percentage of update download progress in tray
Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix rebase conflicts
Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
* Fix CheckForUpdate type errors
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Iku-turso <mikko.aspiala@gmail.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>