Commit graph

15 commits

Author SHA1 Message Date
Milan Burda
34b985c556
refactor: use optional chaining / nullish coalescing operator (#35217) 2022-08-08 10:11:04 +02:00
Fedor Indutny
06a00b74e8
fix: initialize asar support in worker threads (#33216)
* fix: initialize asar support in worker threads

Use `ObjectWrap` instead of gin's Wrap in `electron_api_asar.cc` because
gin isn't fully initialized (and apparently not possible to initialize
without ruining the isolate configuration and array buffer allocator) in
worker threads. In the worker thread call `setupAsarSupport` just as we
do for the main process.

* Update lib/asar/fs-wrapper.ts

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Update patches/node/worker_thread_add_asar_support.patch

Co-authored-by: Darshan Sen <raisinten@gmail.com>

* Add a test

Co-authored-by: Darshan Sen <raisinten@gmail.com>
Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2022-03-22 20:37:55 -04:00
Samuel Attard
57d088517c
feat: add support for validating asar archives on macOS (#30667)
* feat: add support for validating asar archives on macOS

* chore: fix lint

* chore: update as per feedback

* feat: switch implementation to asar integrity hash checks

* feat: make ranged requests work with the asar file validator DataSourceFilter

* chore: fix lint

* chore: fix missing log include on non-darwin

* fix: do not pull block size out of missing optional

* fix: match ValidateOrDie symbol on non-darwin

* chore: fix up asar specs by repacking archives

* fix: maintain integrity chain, do not load file integrity if header integrity was not loaded

* debug test

* Update node-spec.ts

* fix: initialize header_validated_

* chore: update PR per feedback

* chore: update per feedback

* build: use final asar module

* Update fuses.json5
2021-09-09 14:49:01 -07:00
Shelley Vohr
a4decffe9a
fix: improper wrapping of fs.promises.readFile (#29528) 2021-06-07 21:19:39 +02:00
Milan Burda
8d0ed05c99
refactor: replace a few usages of V8 hidden properties (#29400) 2021-06-03 14:59:56 +09:00
Jeremy Rose
d27ad0d182
fix: revert "refactor: mmap asar files (#24470)" (#28137)
This reverts commit 01a2e23194.
2021-03-15 11:42:54 -07:00
Milan Burda
79b3393768
chore: remove bunch of usages of any (#27512) 2021-01-29 12:41:59 -08:00
Avi Vahl
9b02d94e97
fix(asar): readdir(withFileTypes) fails on deep directory (#26865)
when using readdirSync on a deep directory within the archive, the code fails to get the stats of child paths.
2020-12-15 11:21:49 +09:00
Vadim
efca7007b6
fix: internalModuleReadJSON for unpacked JSON (#26749) 2020-12-01 21:33:39 -08:00
Fabio Spampinato
d4191c4a26
fix: optimized asar paths checks (#26024)
* fix: optimized asar paths checks

* fix: ensuring the linter is happy
2020-10-26 12:19:35 +09:00
Milan Burda
321395d96e
refactor: use Map instead of Object for better semantics (#25982) 2020-10-19 03:24:51 +03:00
Milan Burda
fb11a12d5b
refactor: replace a few any-s with proper types (#25681) 2020-10-08 03:01:23 +02:00
Jeremy Rose
01a2e23194
refactor: mmap asar files (#24470) 2020-08-04 11:48:04 -07:00
Electron Bot
2f02a469f4
chore: bump node to v12.18.3 (master) (#24707)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2020-07-27 09:12:29 -07:00
Samuel Attard
f649e604be
build: tsify asar and move to webpack js2c pipeline (#24495)
* build: tsify asar and move to webpack js2c pipeline

* build: use the webpack provider for fs-wrapper
2020-07-16 11:38:31 -07:00