aboutsummaryrefslogtreecommitdiffstats
path: root/packages/main/src
Commit message (Collapse)AuthorAge
* build: Add eslint-plugin-securityLibravatar Kristóf Marussy2022-01-10
| | | | | | This would run as part of gitlab SAST (if it didn't time out). Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add eslint-plugin-promiseLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add eslint-plugin-unicornLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add eslint-plugin-jestLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Add prettierLibravatar Kristóf Marussy2022-01-09
| | | | | | | eslint will also enforce prettier rules, so there is no need to call prettier separately in CI. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Eslint fixes for multi-module projectLibravatar Kristóf Marussy2022-01-09
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* New configurations based on review comments (WIP)Libravatar Vijay A2022-01-09
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* Incorporate 'eslint' (fixes #3)Libravatar Vijay A2022-01-09
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* Enhance 'About' dialog with more infoLibravatar Vijay A2022-01-03
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* chore: Add @avijayr as a copyright holderLibravatar Kristóf Marussy2022-01-02
| | | | Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* Ensure that the 'userData' directory is present when starting up the appLibravatar Vijay A2022-01-02
| | | | Signed-off-by: Vijay A <vraravam@users.noreply.github.com>
* fix: Allow devtools extensions to be installedLibravatar Kristóf Marussy2022-01-02
| | | | | | | | | | | | | On the first startup in dev mode, Electron must be able to download the devtools extensions and wait for them to be installed. Loosens the UI process request filter a bit, but the behavior should match production mode in all cases except chrome webstore URLs. Nevertheless, only production mode should be considered secure. Fixes #6 Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* fix: Ensure dev user directory existsLibravatar Kristóf Marussy2022-01-02
| | | | | | Fixes #5 Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* feat: Load browserview contents asynchronouslyLibravatar Kristóf Marussy2022-01-01
| | | | | | Also changes the default browserview contents to the gitlab repo. Signed-off-by: Kristóf Marussy <kristof@marussy.com>
* build: Use nodenext module resolutionLibravatar Kristóf Marussy2021-12-31
| | | | | The renderer package still has to use node module resolution to be able to find MUI packages.
* chore: Add import extensions preparing for ts 4.6 nodenextLibravatar Kristóf Marussy2021-12-31
|
* build: Upgrade to chalk 5.0.0 anywaysLibravatar Kristóf Marussy2021-12-31
| | | | Requires some workarounds for ts-jest to find the vendored dependencies.
* test: Add tests for main packageLibravatar Kristóf Marussy2021-12-31
| | | | | | | | | | | | | - Changed jest to run from the root package and reference the packages as projects. This required moving the base jest config file away from the project root. - Module isolation seems to prevent ts-jest from loading the shared package, so we disabled it for now. - To better facilitate mocking, services should be split into interfaces and implementation - Had to downgrade to chald 4.1.2 as per https://github.com/chalk/chalk/releases/tag/v5.0.0 at least until https://github.com/microsoft/TypeScript/issues/46452 is resolved.
* refactor: Install devtools extensions earlierLibravatar Kristóf Marussy2021-12-30
| | | | | | This doesn't seem to cause any race conditions (except for the warnings that appear even if we install the extensions before initializing the main window and are ignored by yarn watch).
* build: Fully switch over to ESMLibravatar Kristóf Marussy2021-12-30
| | | | | | | | | | | | | | | | | | | | | | | | | | Now we can run with ESM at build and test time and transpile into commonjs for electron. This greatly simplifies testing, since we treat everything as ESM during build with esbuild anyways. Now the test environment and the build scripts match the apparent (but not the actual for the main, preload, and inject modules) runtime environment. Caveats: - We may use top-level async expressions in tests and script, but not in code that gets transpiled into commonjs or scripts that get imported by vite. The limitation w.r.t. commonjs seems fundamental. - Jest only experimentally supports ESM and there are some limitations with mocking. Most limitations (except the lack of automatic mocks) can be worked around by async importing code that uses mocks. - There are packages marked as modules (so that node reads any scripts in them as ESM) that nevertheless get transpiled into commonjs modules. However, these should be clearly marked by using a .cjs extension as their bundle. The worst offender is the root package, which has a .cjs as its main entry point that gets read by electron, but is in fact marked as a module. This doesn't seem to bother electron at all. The service-inject package is an IIFE with a .js extension, but it outputs a fully self-contained bundle, so the choice of module format should be irrelevant.
* refactor: Improve loggingLibravatar Kristóf Marussy2021-12-30
|
* build: Switch to esbuildLibravatar Kristóf Marussy2021-12-30
| | | | | | | | | | We will build all packages except the frontend (where vite remains in use) with esbuild. For some reason, the @yarnpkg/esbuild-plugin-pnp doesn't allow esbuild to load esm modules and we fall back to commonjs for dependencies. Hence we had to switch back to node_modules (but still rely on yarn hardlinking for a more efficient install).
* Revert "refactor: Switch back to consola for prettyness"Libravatar Kristóf Marussy2021-12-29
| | | | This reverts commit 5c38af061348ec604337280009775832edc66270.
* refactor: Switch back to consola for prettynessLibravatar Kristóf Marussy2021-12-28
|
* refactor: Simpler logging with loglevelLibravatar Kristóf Marussy2021-12-28
|
* feat: Add consola loggingLibravatar Kristóf Marussy2021-12-28
|
* refactor: Functional design for controllersLibravatar Kristóf Marussy2021-12-28
|
* refactor: Get rid of dependency injectorLibravatar Kristóf Marussy2021-12-28
|
* refactor: Inversion of control with typed-injectLibravatar Kristóf Marussy2021-12-27
|
* refactor: Less boilerplate around SophieRendererLibravatar Kristóf Marussy2021-12-26
|
* refactor: Make all stores optionalLibravatar Kristóf Marussy2021-12-26
| | | | | | This reduces boilerplate and helps with config file robustness: if a field is missing from the config file, it will be replaced with its default value.
* refactor: Clarify main process architectureLibravatar Kristóf Marussy2021-12-26
| | | | | | | | * stores: reactive data structures to hold application state * controllers: subscribe to store changes and call store actions in response to external events from services * services: integrate with the nodejs and electron environment (should be mocked for unit testing)
* refactor: Config persistence architectureLibravatar Kristóf Marussy2021-12-26
| | | | | | | | The architecture in the main process is split into 3 main parts: * services: interfaces for services are injected into the stores through the MainEnv interface (for testability) * services/impl: electron-specific implementations of services * stores: the actions of the stores can invoke (asynchronous) services
* feat: Switch to json5 config formatLibravatar Kristóf Marussy2021-12-26
|
* refactor: Improved config reloadingLibravatar Kristóf Marussy2021-12-26
| | | | | If we watch the containing directory, we can use inotify instead of stat polling.
* feat: Config persistenceLibravatar Kristóf Marussy2021-12-26
|
* feat: Set nativeTheme theme source on dark modeLibravatar Kristóf Marussy2021-12-26
|
* refactor: Simplify browserViewBounds handlingLibravatar Kristóf Marussy2021-12-26
|
* feat: Disable main window devtools in productionLibravatar Kristóf Marussy2021-12-25
|
* refactor: Fetch service inject asynchronouslyLibravatar Kristóf Marussy2021-12-25
| | | | | | Since we don't plan to shim any APIs that must be present immediately when the service loads, we might as well switch to asynchronous IPC for fetching the script to inject into the main world.
* fix: Restore accidentally deleted autoHideMenuBarLibravatar Kristóf Marussy2021-12-25
|
* feat: Harden window navigation and permissionsLibravatar Kristóf Marussy2021-12-25
|
* refactor: Simplify script injectionLibravatar Kristóf Marussy2021-12-25
| | | | | | | | | Inject CSS and main world scripts synchronously to avoid race conditions with page loading. Don't try to miming userAgentData for now, since it won't bypass google's checks. However, simply omitting chrome from the user agent does bypass them, at least for now.
* feat: Shim userAgentData in all frames and workersLibravatar Kristóf Marussy2021-12-24
| | | | Not good enough for google, we'll need a different approach.
* feat: User agent data simulatorLibravatar Kristóf Marussy2021-12-24
|
* feat: User-agent reductionLibravatar Kristóf Marussy2021-12-24
| | | | | Unfortunately, the reduced user-agent doesn't fool the google login form, but at least reduces the amount of leaked information.
* refactor: Load ui and service in parallelLibravatar Kristóf Marussy2021-12-24
|
* feat: Alternative background color workaroundLibravatar Kristóf Marussy2021-12-24
| | | | | | | Let's try injecting CSS to set the background color of html to white (instead of transparent) into the loaded pages. The CSS is injected before the website's own styles load, so they should always have the lowest priority.
* feat: Service to main process communicationLibravatar Kristóf Marussy2021-12-24
|
* feat: Set up partition persistenceLibravatar Kristóf Marussy2021-12-23
|