Commit graph

223 commits

Author SHA1 Message Date
Manav Rathi 6cc705d682
[desktop] Fix the imagemagick path when running in dev build
"resources" needs to be "build"
2024-04-18 14:22:53 +05:30
Manav Rathi 1fea509793
Rename the type on the electron side 2024-04-16 16:29:22 +05:30
Manav Rathi 2403c19f70
Add a temporary fallback 2024-04-16 14:50:25 +05:30
Manav Rathi 450e494a5e
Throwing darts 2024-04-16 11:34:34 +05:30
Manav Rathi 81d1563c3d
Also reproducible on latest beta 2024-04-16 10:17:51 +05:30
Manav Rathi d53a4a14b8
Try another reader 2024-04-16 09:46:55 +05:30
Manav Rathi a5be903abe
Try writing the stream manually (same result) 2024-04-15 21:37:38 +05:30
Manav Rathi 8d76966d99
Upgrade Electron and other dependencies
This was primarily for getting the latest Electron, but I ran `yarn
upgrade-interactive` and upgraded the other non-breaking deps (mostly dev) too.

Reason for wanting electron is to try and see if this backport fixes the issue
with our streams not getting faithfully written:
https://github.com/electron/electron/pull/41052

In some ad-hoc and quick testing, I noticed that the new `writeStream` we've
implemented works fine for files up to 128 K, presumably some chunk size, but
then begins to diverge. Sounds similar (but not exactly the same) as this issue:
https://github.com/electron/electron/issues/39658

Unfortunately, this didn't fix the issue we're facing, so our case is perhaps
different.
2024-04-15 21:21:09 +05:30
Manav Rathi f2e352c344
Handle spaces 2024-04-15 19:50:56 +05:30
Manav Rathi 83d2644bf4
Fix double slashing 2024-04-15 19:43:30 +05:30
Manav Rathi 67aacf8391
Replace everywhere 2024-04-15 19:40:50 +05:30
Manav Rathi 4c88f5eec9
Add write handler 2024-04-15 15:53:40 +05:30
Manav Rathi 0881212e4f
Rearrange 2024-04-15 15:44:11 +05:30
Manav Rathi 720e84ba1f
Prune
Refs:
- https://www.electronjs.org/docs/latest/api/protocol
- https://github.com/electron/electron/issues/39031
- https://github.com/electron/electron/issues/38749
2024-04-15 15:25:33 +05:30
Manav Rathi 057fe9bbb1
Allow fetches for "stream"
Ref:
- https://github.com/electron/electron/issues/40362
2024-04-15 15:08:10 +05:30
Manav Rathi 89b832d21f
Baby's first steps 2024-04-15 12:47:55 +05:30
Manav Rathi 0161739bc0
Outline the plan 2024-04-15 12:41:17 +05:30
Manav Rathi 3ea4879cf0
Remove text qualifier
The type already enforces that. And it reads better and the call sites this way.
2024-04-15 12:20:41 +05:30
Manav Rathi 73ef03a5d9
Move read/write whole files into fs 2024-04-15 12:17:33 +05:30
Manav Rathi 8d24a489f6
[desktop] Fix payment redirect
Fixes: https://github.com/ente-io/ente/issues/1440

There were two issues:

- It was a backward incompatible change to change the scheme from ente:// to
  next://. Revert.

- We also need to setup a top level redirect when the user presses back without
  making any changes to their subscription.

**Tested by**

Running payments app and desktop app locally, and verifying that after
interactions with the payments endpoint we go back to the desktop app's actual
contents correctly.
2024-04-15 10:47:14 +05:30
Manav Rathi 18ac361688
Remove unused IPC method 2024-04-14 20:11:25 +05:30
Manav Rathi f5a4830a5a
Remove unnecessary check
e.g. macOS node shell

    > await fs.rename("/tmp/foo/bar/quxx.txt", "/tmp/foo/a.txt")
    [Error: ENOENT: no such file or directory, rename '/tmp/foo/bar/quxx.txt' -> '/tmp/foo/a.txt']
2024-04-14 18:28:10 +05:30
Manav Rathi eb64a00ed2
Remove unnecessary checks
It is simpler for us to parallel the rm command than our bespoke variant.
2024-04-14 18:22:46 +05:30
Manav Rathi 59b9e3e586
Move into fs 2024-04-14 18:12:19 +05:30
Manav Rathi 0f1c2fa1cd
Remove unnecessary check
Mentioned in rmdir docs

Tested on macOS with a node shell

    > await fs.rmdir("/tmp/foo/bar/baz")
    Uncaught [Error: ENOTEMPTY: directory not empty, rmdir '/tmp/foo/bar/baz']
2024-04-14 18:06:49 +05:30
Manav Rathi fb5ae3a2ac
Remove unnecessary check
rmdir docs already mention it'll only work on folders

Also tested on macOS with a node shell

    > await fs.rmdir("/tmp/foo/bar/baz/quxx.txt")
    Uncaught [Error: ENOTDIR: not a directory, rmdir '/tmp/foo/bar/baz/quxx.txt'] {
2024-04-14 17:55:40 +05:30
Manav Rathi 7438c3301e
Move mkdirIfNeeded into fs 2024-04-14 10:25:28 +05:30
Manav Rathi 72dd47fa7b
Audit rename 2024-04-14 09:27:52 +05:30
Manav Rathi 41472eb87d
Document and structure more 2024-04-12 20:24:48 +05:30
Manav Rathi 02763e3be4
Kill the renderer when we quit the app 2024-04-12 14:05:10 +05:30
Manav Rathi 8045bd1e5a
Rename and prune 2024-04-12 14:01:53 +05:30
Manav Rathi d1d9cd9518
Document 2024-04-12 13:48:16 +05:30
Manav Rathi 39912d9b35
Remove unused code 2024-04-12 13:25:48 +05:30
Manav Rathi cfec6ca52e
Enable the Chromium sandbox 2024-04-12 10:39:00 +05:30
Manav Rathi 98c3e43b70
Inline 2024-04-12 10:28:23 +05:30
Manav Rathi 87905a39f8
Dedup 2024-04-12 10:22:04 +05:30
Manav Rathi a71ca93696
Inline 2024-04-12 10:15:08 +05:30
Manav Rathi e651e9d9c7
Inline 2024-04-12 10:11:38 +05:30
Manav Rathi 664cf2157b
Reword 2024-04-12 10:07:03 +05:30
Manav Rathi aace18aba0
Inline and rename 2024-04-12 09:51:08 +05:30
Manav Rathi 4d867898f7
Remove the sharedarraybuffer flag
From my understanding, this was needed for the wasm FFMPEG, which we are no
longer using when running as the desktop app.
2024-04-12 09:43:52 +05:30
Manav Rathi 9c786da73b
Tweak 2024-04-12 09:38:38 +05:30
Manav Rathi 61143c9c62
Cleanup 2024-04-11 16:36:56 +05:30
Manav Rathi f5bf776848
lint 2024-04-11 15:06:03 +05:30
Manav Rathi 52727f2255
Also move the embedding 2024-04-11 15:04:18 +05:30
Manav Rathi 9ff4989d81
Cleanup 2024-04-11 14:44:00 +05:30
Manav Rathi a1d6ef43b4
Roundtrip 2024-04-11 14:37:44 +05:30
Manav Rathi 41f7b30ca0
Wire together 2024-04-11 14:22:52 +05:30
Manav Rathi a88f551b6a
WIP IPC API 2024-04-11 13:58:52 +05:30
Manav Rathi 7bf8912dbc
Duplicate for now 2024-04-11 13:45:02 +05:30