Commit graph

422 commits

Author SHA1 Message Date
Manav Rathi 994ca4b6a3
That's why cache fails 2024-04-30 16:25:35 +05:30
Manav Rathi 755ee4a0c2
hopefully 2024-04-30 16:13:16 +05:30
Manav Rathi a9671481d8
Allow numbers to be used in template literals 2024-04-30 16:10:56 +05:30
Manav Rathi 9b996ff353
Lint+ 2024-04-30 16:03:52 +05:30
Manav Rathi 51ffaa4a90
Preempt 2024-04-30 16:00:32 +05:30
Manav Rathi 2f3a2421f7
Strict 2024-04-30 15:51:22 +05:30
Manav Rathi 824e73f150
strict 2024-04-30 15:30:57 +05:30
Manav Rathi 612d8682b5
strict 2024-04-30 14:21:43 +05:30
Manav Rathi 0c312c0ea1
strict 3 2024-04-30 14:10:59 +05:30
Manav Rathi bee2cd533c
strict 2 2024-04-30 14:01:28 +05:30
Manav Rathi 72b9113d30
ensure 2024-04-30 13:59:00 +05:30
Manav Rathi 333f9c58f2
strict 1 2024-04-30 13:56:11 +05:30
Manav Rathi 14348351a9
Fix call of undefined 2024-04-30 13:44:46 +05:30
Manav Rathi 8400620488
Gone from desktop 2024-04-30 13:42:41 +05:30
Manav Rathi 4feefb9b8d
Fix comment 2024-04-30 13:41:18 +05:30
Manav Rathi b52c9f558f
Remove cache size overrides
Need a bit more benchmarking or real world feedback to see if this is even something that is helping us.
2024-04-30 13:39:58 +05:30
Manav Rathi 6c4adb1127
Housekeeping 2024-04-30 13:37:17 +05:30
Manav Rathi d6aeef85d6
Rearrange 2024-04-30 13:33:18 +05:30
Manav Rathi f84937f8c1
Bye ElectronFile 2024-04-30 13:26:55 +05:30
Manav Rathi 09bc15ddd3
[web] Upload refactoring - Zip file support (#1559) 2024-04-30 12:11:46 +05:30
Manav Rathi afb0e1aff3
web 2024-04-30 10:20:37 +05:30
Manav Rathi 73baf5a375
Uncollide with ZipEntry from StreamZip 2024-04-30 10:08:31 +05:30
Manav Rathi e9bf26e421
Extract 2024-04-30 09:59:02 +05:30
Manav Rathi 77fe4f9f03
wip ze ipc 2024-04-30 09:39:38 +05:30
Manav Rathi fca398f296
impl 2024-04-29 21:07:20 +05:30
Manav Rathi cca33074fb
Pending uploads 2024-04-29 19:29:52 +05:30
Manav Rathi 2d40f530a7
more 2024-04-29 15:51:20 +05:30
Manav Rathi 2fa1fcac65
impl 2024-04-29 14:34:05 +05:30
Manav Rathi 3d298a9cd4
separate type 2024-04-29 14:23:33 +05:30
BifrostTenmei e258aa3524
Fixed typo 2024-04-29 10:53:20 +02:00
Manav Rathi 3b6204f47d
Take 2 2024-04-29 13:49:02 +05:30
Manav Rathi 2d8bcd2530
Propagate 2024-04-29 11:59:08 +05:30
Manav Rathi 63841abd30
Envision 2024-04-29 11:44:43 +05:30
Manav Rathi e8687caba2
wip pending 2024-04-29 11:07:57 +05:30
Manav Rathi aa111b2a24
Outline the plan 2024-04-29 10:12:53 +05:30
Manav Rathi 24b64f9522
Verify assumption 2024-04-28 20:38:50 +05:30
Manav Rathi 243d019e8b
Potential implementation 2024-04-28 17:24:11 +05:30
Manav Rathi e65307517d
Scaffold 2024-04-28 17:08:22 +05:30
Manav Rathi 7836562ff1
less noise 2024-04-27 20:21:54 +05:30
Manav Rathi 8ba952c3b8
Remove unused 2024-04-26 17:48:10 +05:30
Manav Rathi 2724760d6c
Remove NodeJS global 2024-04-26 17:47:08 +05:30
Manav Rathi 9f41539330
Enhance 2024-04-26 17:47:08 +05:30
Manav Rathi 1c59a36c73
Partially revert 699a12cc79 2024-04-26 16:11:19 +05:30
Manav Rathi 21ad409c61
Don't overwrite what net.fetch already added 2024-04-26 16:06:45 +05:30
Manav Rathi ca0afc2f3a
File sizes 2024-04-25 15:47:34 +05:30
Manav Rathi 4ae4e42260
log.warn 2024-04-25 15:19:46 +05:30
Manav Rathi f5ef478a90
Propogate last modified time
It should've also been possible to use the regular Last-Modified HTTP header,
however that'd have caused a potential loss of precsion if I correctly
understand the string format that we'll need to use.

Refs:
- https://developer.mozilla.org/en-US/docs/Web/API/File/lastModified
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toUTCString
- https://nodejs.org/api/fs.html#class-fsstats
2024-04-25 11:46:04 +05:30
Manav Rathi f32a396b36
Fix video thumbnailing (the .jpeg extension is required) 2024-04-24 14:37:14 +05:30
Manav Rathi e6e235490a
Content-Length 2024-04-23 12:37:42 +05:30
Manav Rathi cb0d25030d
API 1 2024-04-23 12:10:46 +05:30
Manav Rathi 1d4efd738c
Stream reader 2024-04-23 12:04:10 +05:30
Manav Rathi 1f0c80cabc
Refactor 1 2024-04-23 10:21:39 +05:30
Manav Rathi 3ab14d5949
Remove unnecessary flexibility 2024-04-22 17:20:21 +05:30
Manav Rathi dfa50e8ed1
thumb 2024-04-22 17:14:21 +05:30
Manav Rathi 05cd0bcd2c
input filename is not needed
tested with sips
2024-04-22 16:49:06 +05:30
Manav Rathi 4461775283
Desktop side 2024-04-22 16:32:04 +05:30
Manav Rathi 4750caf156
Blob 2024-04-22 16:12:03 +05:30
Manav Rathi 875b92ea91
New interface 2024-04-22 14:39:48 +05:30
Manav Rathi 31a19cb738
Desktop side 2024-04-21 11:29:58 +05:30
Manav Rathi e1faa965b8
Remove layer of abstraction 2024-04-20 17:33:54 +05:30
Manav Rathi 86929c5d2d
gen => make 2024-04-20 17:16:55 +05:30
Manav Rathi f1e530dfa1
Reorder to match 2024-04-20 17:15:41 +05:30
Manav Rathi eed95811c5
JPEG + temp wip 2024-04-20 17:12:25 +05:30
Manav Rathi 6337ffc203
Inline 2024-04-20 11:50:15 +05:30
Manav Rathi 13542c1511
Document
Cite: https://github.com/electron/electron/issues/25640
2024-04-20 10:39:18 +05:30
Manav Rathi 7c1207fb9a
Show dev tools option only in dev builds 2024-04-20 10:37:13 +05:30
Manav Rathi d0b1ff5520
In band signalling 2024-04-20 10:17:51 +05:30
Manav Rathi 093b3a67cb
Enum instead of error 2024-04-20 09:12:48 +05:30
Manav Rathi 926bc33c79
Use 2024-04-20 09:02:36 +05:30
Manav Rathi 46a53d5fdf
Possibly 2024-04-20 08:47:02 +05:30
Manav Rathi a8ae86cb43
genr 2024-04-20 08:11:14 +05:30
Manav Rathi 196090152c
Remove an error that is never thrown 2024-04-19 21:39:44 +05:30
Manav Rathi 80a6fe16e7
timeouts 2024-04-19 21:34:35 +05:30
Manav Rathi 967ef2e3ea
[desktop] Watch refactoring to get it work with new IPC (#1486) 2024-04-19 13:09:40 +05:30
Manav Rathi 760be52dc5
Fix schema 2024-04-19 12:59:10 +05:30
Manav Rathi a9ccec6398
The remaining 2 2024-04-18 21:26:05 +05:30
Manav Rathi 76053c4029
impl 2024-04-18 21:07:00 +05:30
Manav Rathi ca36b3c750
Migrate 2024-04-18 19:59:06 +05:30
Manav Rathi 14285b66ae
Seep deeper 2024-04-18 18:45:02 +05:30
Manav Rathi 4455bb9595
API on electron side 2024-04-18 18:31:38 +05:30
Manav Rathi 275b763648
Work towards it 2024-04-18 16:18:01 +05:30
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 518d573add
Improve docs 2024-04-18 13:23:20 +05:30
Manav Rathi 230a8a72ab
Use correct types
Not sure if this is expected or some misconfiguration in our case, but the types
generated by electron-store do not have the correct TypeScript types.
2024-04-18 13:19:21 +05:30
Manav Rathi 4852a87ae0
Load after attaching listeners 2024-04-18 13:11:45 +05:30
Manav Rathi f19b90d0ae
Imbibe 2024-04-18 13:04:19 +05:30
Manav Rathi 28c1c45325
Tinker 2024-04-18 12:58:11 +05:30
Manav Rathi eb587a313a
Tighten 2024-04-18 12:55:16 +05:30
Manav Rathi 532824b3d5
Spruce types 2024-04-18 12:53:47 +05:30
Manav Rathi 9e093493eb
Implement new 2024-04-18 12:44:07 +05:30
Manav Rathi 0668490f8a
Desktop side 2024-04-18 12:29:41 +05:30
Manav Rathi 73cadcd36b
Remove layer 2024-04-18 10:57:13 +05:30
Manav Rathi 278df2aae8
Rearrange and simplify
The auto launcher migration already rolled out months ago, except for rare cases
it is safe to remove (impact of non-migration is not critical too).
2024-04-18 10:54:37 +05:30
Manav Rathi 775dbaf10d
Remove unused keys store 2024-04-18 10:16:22 +05:30
Manav Rathi dedc2f8585
wip 2024-04-18 09:23:03 +05:30
Manav Rathi a22423d039
WIP 2 2024-04-17 17:00:51 +05:30
Manav Rathi 52c35108ca
WIP 1 2024-04-17 15:51:51 +05:30
Manav Rathi 2051ccee46
List files alternate 2024-04-17 14:48:03 +05:30
Manav Rathi ee89506923
Unlegacy isDir 2024-04-17 14:27:48 +05:30
Manav Rathi 4971099da9
Merge 2024-04-17 13:41:10 +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
Manav Rathi 2b6047a979
Split 2024-04-11 13:40:35 +05:30