summaryrefslogtreecommitdiff
path: root/desktop/node_modules/electron-packager
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/node_modules/electron-packager')
-rw-r--r--desktop/node_modules/electron-packager/LICENSE23
-rw-r--r--desktop/node_modules/electron-packager/NEWS.md1000
-rw-r--r--desktop/node_modules/electron-packager/README.md217
-rwxr-xr-xdesktop/node_modules/electron-packager/bin/electron-packager.js16
-rw-r--r--desktop/node_modules/electron-packager/collaborators.md8
-rw-r--r--desktop/node_modules/electron-packager/docs/api.md1
-rw-r--r--desktop/node_modules/electron-packager/docs/faq.md50
l---------desktop/node_modules/electron-packager/node_modules/.bin/semver1
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/LICENSE15
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/README.md292
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js161
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js238
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js7
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js39
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js69
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js23
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js64
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js99
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js31
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js82
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/esm.mjs68
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js140
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/index.js16
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js16
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js11
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js12
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js12
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js14
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js27
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js21
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js7
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js55
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js76
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js40
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js12
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js17
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js154
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js26
-rw-r--r--desktop/node_modules/electron-packager/node_modules/fs-extra/package.json71
-rw-r--r--desktop/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md171
-rw-r--r--desktop/node_modules/electron-packager/node_modules/jsonfile/LICENSE15
-rw-r--r--desktop/node_modules/electron-packager/node_modules/jsonfile/README.md230
-rw-r--r--desktop/node_modules/electron-packager/node_modules/jsonfile/index.js88
-rw-r--r--desktop/node_modules/electron-packager/node_modules/jsonfile/package.json40
-rw-r--r--desktop/node_modules/electron-packager/node_modules/jsonfile/utils.js14
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/LICENSE15
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/README.md637
-rwxr-xr-xdesktop/node_modules/electron-packager/node_modules/semver/bin/semver.js197
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/classes/comparator.js141
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/classes/index.js5
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/classes/range.js539
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/classes/semver.js302
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/clean.js6
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/cmp.js52
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/coerce.js52
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/compare-build.js7
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/compare.js5
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/diff.js65
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/eq.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/gt.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/gte.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/inc.js19
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/lt.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/lte.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/major.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/minor.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/neq.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/parse.js16
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/patch.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/prerelease.js6
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/rcompare.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/rsort.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/satisfies.js10
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/sort.js3
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/functions/valid.js6
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/index.js89
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/internal/constants.js35
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/internal/debug.js9
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/internal/identifiers.js23
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/internal/parse-options.js15
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/internal/re.js212
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/package.json87
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/preload.js2
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/range.bnf16
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/gtr.js4
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/intersects.js7
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/ltr.js4
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js25
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js24
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/min-version.js61
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/outside.js80
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/simplify.js47
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/subset.js247
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js8
-rw-r--r--desktop/node_modules/electron-packager/node_modules/semver/ranges/valid.js11
-rw-r--r--desktop/node_modules/electron-packager/node_modules/universalify/LICENSE20
-rw-r--r--desktop/node_modules/electron-packager/node_modules/universalify/README.md76
-rw-r--r--desktop/node_modules/electron-packager/node_modules/universalify/index.js24
-rw-r--r--desktop/node_modules/electron-packager/node_modules/universalify/package.json34
-rw-r--r--desktop/node_modules/electron-packager/package.json140
-rw-r--r--desktop/node_modules/electron-packager/src/cli.js143
-rw-r--r--desktop/node_modules/electron-packager/src/common.js128
-rw-r--r--desktop/node_modules/electron-packager/src/copy-filter.js110
-rw-r--r--desktop/node_modules/electron-packager/src/download.js37
-rw-r--r--desktop/node_modules/electron-packager/src/hooks.js24
-rw-r--r--desktop/node_modules/electron-packager/src/index.d.ts607
-rw-r--r--desktop/node_modules/electron-packager/src/index.js207
-rw-r--r--desktop/node_modules/electron-packager/src/infer.js178
-rw-r--r--desktop/node_modules/electron-packager/src/linux.js25
-rw-r--r--desktop/node_modules/electron-packager/src/mac.js440
-rw-r--r--desktop/node_modules/electron-packager/src/platform.js277
-rw-r--r--desktop/node_modules/electron-packager/src/prune.js70
-rw-r--r--desktop/node_modules/electron-packager/src/targets.js149
-rw-r--r--desktop/node_modules/electron-packager/src/universal.js80
-rw-r--r--desktop/node_modules/electron-packager/src/unzip.js7
-rw-r--r--desktop/node_modules/electron-packager/src/win32.js113
-rw-r--r--desktop/node_modules/electron-packager/usage.txt129
118 files changed, 9932 insertions, 0 deletions
diff --git a/desktop/node_modules/electron-packager/LICENSE b/desktop/node_modules/electron-packager/LICENSE
new file mode 100644
index 0000000..3f64d56
--- /dev/null
+++ b/desktop/node_modules/electron-packager/LICENSE
@@ -0,0 +1,23 @@
+Copyright (c) 2015 Max Ogden and other contributors
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file
diff --git a/desktop/node_modules/electron-packager/NEWS.md b/desktop/node_modules/electron-packager/NEWS.md
new file mode 100644
index 0000000..36d0cb7
--- /dev/null
+++ b/desktop/node_modules/electron-packager/NEWS.md
@@ -0,0 +1,1000 @@
+# Electron Packager: Changes by Version
+
+## [Unreleased]
+
+[Unreleased]: https://github.com/electron/electron-packager/compare/v17.1.2...main
+
+## [17.1.2] - 2023-08-18
+
+[17.1.2]: https://github.com/electron/electron-packager/compare/v17.1.1...v17.1.2
+
+### Fixed
+
+* Added osx-universal flag to usage.txt (#1533)
+* Bumped osx-sign to 1.0.5 to fix an entitlement signing error (#1549)
+* Ensured logs are quiet when quiet flag is passed (#1440)
+* Pruned electron-nightly even if in dependencies (#1538)
+* Changed tsdoc to use @link syntax for index.d.ts (#1450)
+* Clarified CLI usage (#1534)
+* Fixed typos (#1438)
+
+### Changed
+
+* Updated Galactus (#1441)
+* Updated got to clean up yarn audit (#1456)
+* Set @wg-ecosystem as CODEOWNERS (#1471)
+* Bumped dependencies to clean yarn audit (#1473)
+* Updated GitHub actions workflows (#1475)
+
+### Removed
+
+* Removed Linux/ia32 official support (was removed in Electron 19) (#1449)
+
+## [17.1.1] - 2022-11-01
+
+[17.1.1]: https://github.com/electron/electron-packager/compare/v17.1.0...v17.1.1
+
+### Fixed
+
+* Fixed an error allowing packaging twice simultaneously (#1439)
+
+## [17.1.0] - 2022-10-31
+
+[17.1.0]: https://github.com/electron/electron-packager/compare/v17.0.0...v17.1.0
+
+### Changed
+
+* Replaced `electron-notarize` with `@electron/notarize`. The configuration options are unchanged. This migration is purely cosmetic.
+* Added new `afterFinalizePackageTargets` hook. This hook exposes the platform/arch combinations that are being packaged when the `arch:all` or `platform:all` options are set.
+
+## [17.0.0] - 2022-10-19
+
+[17.0.0]: https://github.com/electron/electron-packager/compare/v16.0.0...v17.0.0
+
+### Changed
+
+* **BREAKING:** Replaced `electron-osx-sign` with `@electron/osx-sign`. The accepted properties on the `osxSign` options object are now slightly different. Please see the [migration guide](https://github.com/electron/osx-sign/blob/main/MIGRATION.md) for more information on these changes. (#1428)
+* Replaced `asar` with `@electron/asar`. The configuration options are unchanged. This migration is purely cosmetic. (#1431)
+
+### Fixed
+
+* `ElectronAsarIntegrity` is now automatically removed from the `asar` option is disabled (#1281)
+
+## [16.0.0] - 2022-08-23
+
+[16.0.0]: https://github.com/electron/electron-packager/compare/v15.5.1...v16.0.0
+
+### Fixed
+
+* Properly import info logger (#1405)
+
+### Changed
+
+* Bump `got` to 2.0.0 (#1397)
+
+### Removed
+
+* Node 12 support (#1399)
+
+## [15.5.2] - 2022-08-22
+
+[15.5.2]: https://github.com/electron/electron-packager/compare/v15.5.1...v15.5.2
+
+### Fixed
+
+* Package should not log info on `--quiet` flag
+* Ignore `node_gyp_bins` directory if it exists
+
+## [15.5.1] - 2022-04-20
+
+[15.5.1]: https://github.com/electron/electron-packager/compare/v15.5.0...v15.5.1
+
+### Fixed
+
+* Univeral builds single-arch components are now built sequentially instead of in parallel to fix race conditions in hooks
+* The typescript definition for HookFunction now correctly allows an error to be passed
+
+## [15.5.0] - 2022-04-19
+
+[15.5.0]: https://github.com/electron/electron-packager/compare/v15.4.0...v15.5.0
+
+### Added
+
+* New `universal` architecture supported when packaging for macOS to generate a universal app
+* `osxUniveral` option to allow providing options to `@electron/universal` when packaging a universal app
+
+## [15.4.0] - 2021-09-10
+
+[15.4.0]: https://github.com/electron/electron-packager/compare/v15.3.0...v15.4.0
+
+### Added
+
+* `extendHelperInfo` option to allow extending helper app `Info.plist` files (#1233)
+* Automatically insert `ElectronAsarIntegrity` into `Info.plist` files (#1279)
+
+### Fixed
+
+* Compatibility with `electron-notarize@^1.1.0` (#1278)
+
+## [15.3.0] - 2021-07-17
+
+[15.3.0]: https://github.com/electron/electron-packager/compare/v15.2.0...v15.3.0
+
+### Added
+
+* Bundled app validation to ensure that both `package.json` and the main entry point exist (#1257)
+* Support for customizing Windows targets on darwin/arm64 (#1260)
+* Support for customizing Windows targets on WSL without Wine installed (#1260)
+
+## [15.2.0] - 2020-12-04
+
+[15.2.0]: https://github.com/electron/electron-packager/compare/v15.1.0...v15.2.0
+
+### Added
+
+* Upgrade `electron-osx-sign` to 0.5.0 which adds a new option, `entitlementsForFile` (#1189)
+
+### Fixed
+
+* Add package manager lockfiles to default ignore list (#1182)
+* Allow checking official builds against prerelease versions (#1191)
+
+## [15.1.0] - 2020-08-21
+
+[15.1.0]: https://github.com/electron/electron-packager/compare/v15.0.0...v15.1.0
+
+### Added
+
+* add darwin/arm64 and mas/arm64 as official platform/arch combinations (#1168)
+
+### Fixed
+
+* TypeScript: ensure `OsxNotarizeOptions` definition contains credentials (#1167)
+
+## [15.0.0] - 2020-06-27
+
+[15.0.0]: https://github.com/electron/electron-packager/compare/v14.2.1...v15.0.0
+
+### Added
+
+* mac: app API key notarization (#1127)
+* TypeScript definition (#1131)
+
+### Changed
+
+* Replace `cross-zip` with `extract-zip` (#1139)
+
+### Removed
+
+* Node < 10 support (#1122)
+
+## [14.2.1] - 2020-02-07
+
+[14.2.1]: https://github.com/electron/electron-packager/compare/v14.2.0...v14.2.1
+
+### Fixed
+
+* mac: don't fail if the icon path doesn't exist (#1101)
+* win32: correctly catch missing wine exceptions (#1117)
+
+## [14.2.0] - 2020-01-13
+
+[14.2.0]: https://github.com/electron/electron-packager/compare/v14.1.1...v14.2.0
+
+### Added
+
+* `electronZipDir` option (#1094)
+
+## [14.1.1] - 2019-11-19
+
+[14.1.1]: https://github.com/electron/electron-packager/compare/v14.1.0...v14.1.1
+
+### Fixed
+
+* Regression that caused the symlink test on Windows to not work as intended (#1071)
+* Always initialize proxy support when running the CLI (#1077)
+* Clarify the error message when infer cannot find a package.json file (#1079)
+* Handle a missing inferred app version better (#1079)
+
+### Chores
+
+* Upgrade `electron-notarize` to `^0.2.0` (#1069)
+
+## [14.1.0] - 2019-10-28
+
+[14.1.0]: https://github.com/electron/electron-packager/compare/v14.0.6...v14.1.0
+
+### Added
+
+* (darwin/mas only) `usageDescription` option (#1049)
+* Support for official win32/arm64 builds (#1053)
+
+## [14.0.6] - 2019-09-09
+
+[14.0.6]: https://github.com/electron/electron-packager/compare/v14.0.5...v14.0.6
+
+### Fixed
+
+* Send the properly formatted options from the CLI to electron-osx-sign (#1047)
+
+## [14.0.5] - 2019-08-28
+
+[14.0.5]: https://github.com/electron/electron-packager/compare/v14.0.4...v14.0.5
+
+### Fixed
+
+* Ensure that CFBundleExecutable and friends are correct for helper apps (#1046)
+
+## [14.0.4] - 2019-07-30
+
+[14.0.4]: https://github.com/electron/electron-packager/compare/v14.0.3...v14.0.4
+
+### Fixed
+
+* Packaging apps based on Electron >= 6.0.0 correctly renames and packages the new
+ Electron GPU Helper bundles (#1036)
+
+## [14.0.3] - 2019-07-18
+
+[14.0.3]: https://github.com/electron/electron-packager/compare/v14.0.2...v14.0.3
+
+### Fixed
+
+* Packaging Electron 6 based apps now correctly renames and packages the new
+ Electron Helper bundles (#1033)
+
+## [14.0.2] - 2019-07-18
+
+[14.0.2]: https://github.com/electron/electron-packager/compare/v14.0.1...v14.0.2
+
+### Fixed
+
+* Warn Windows 7 users of the unzip dependencies (#1030)
+
+## [14.0.1] - 2019-07-02
+
+[14.0.1]: https://github.com/electron/electron-packager/compare/v14.0.0...v14.0.1
+
+### Changed
+
+* Upgrade `fs-extra` to `^8.1.0` (#993)
+
+### Fixed
+
+* Host info shows OS release
+
+## [14.0.0] - 2019-06-20
+
+[14.0.0]: https://github.com/electron/electron-packager/compare/v13.1.1...v14.0.0
+
+### Added
+
+* Ignore system junk files by default (#1005)
+
+### Fixed
+
+* Handle inference when `electron-prebuilt-compile` points to a non-version (#978)
+
+### Changed
+
+* Replace `extract-zip` with `cross-zip` - on macOS/Linux, the `zip` binary is required; on Windows,
+ a relatively recent Powershell and .NET runtime is required, see `cross-zip` for details (#984)
+* Convert from `electron-download` to `@electron/get` (#1002). Drops support for versions of Electron
+ < 1.3.2, plus all of the `download` options have changed, notably:
+ * `cache` is now `cacheRoot`
+ * `strictSSL` is now `rejectUnauthorized`
+ * The `mirror` URL string is now a set of options defined by `mirrorOptions`
+ * `quiet` is removed as the default downloader no longer has a progress bar
+* Linux/ia32 support for Electron >= 4 is downgraded to a warning from `@electron/get` (#1016)
+
+### Removed
+
+* Node < 8 support (#973)
+
+## [13.1.1] - 2019-03-04
+
+[13.1.1]: https://github.com/electron/electron-packager/compare/v13.1.0...v13.1.1
+
+### Fixed
+
+* Linux/ia32 is no longer officially supported for Electron >= 4 (#957)
+
+## [13.1.0] - 2019-02-19
+
+[13.1.0]: https://github.com/electron/electron-packager/compare/v13.0.1...v13.1.0
+
+### Added
+
+* Support for inferring version from Electron nightlies (#931)
+
+### Fixed
+
+* Infer versions from `electron-prebuilt-compile` better (#932)
+* Upgrade `asar` to `^1.0.0`, which removes a vulnerable transitive dependency (#952)
+
+## [13.0.1] - 2018-12-12
+
+[13.0.1]: https://github.com/electron/electron-packager/compare/v13.0.0...v13.0.1
+
+### Fixed
+
+* Ensure relative out dirs are correctly ignored when copying (#919)
+
+## [13.0.0] - 2018-12-04
+
+[13.0.0]: https://github.com/electron/electron-packager/compare/v12.2.0...v13.0.0
+
+### Added
+
+* `prebuiltAsar` option to specify a prebuilt ASAR file (#823)
+* support for macOS Mojave app notarization (#899)
+
+### Changed
+
+* **Dropped support for running on Node < 6.0.** (#900)
+
+### Removed
+
+* Deprecated target arch APIs (#915)
+* The callback version of the API (use `nodeify` if you need that syntax style) (#916)
+
+## [12.2.0] - 2018-10-02
+
+[12.2.0]: https://github.com/electron/electron-packager/compare/v12.1.2...v12.2.0
+
+### Added
+
+* darwinDarkModeSupport option to support macOS Mojave dark mode for older Electron versions (#893)
+
+### Fixed
+
+* Don't handle EH/NP Helpers if they don't exist (#894)
+
+## [12.1.2] - 2018-09-12
+
+[12.1.2]: https://github.com/electron/electron-packager/compare/v12.1.1...v12.1.2
+
+### Fixed
+
+* Prune user-namespaced modules (#889)
+
+## [12.1.1] - 2018-08-18
+
+[12.1.1]: https://github.com/electron/electron-packager/compare/v12.1.0...v12.1.1
+
+### Changed
+
+* Host arch utilities moved to electron-download. This is not a breaking change, as the existing API
+ has been kept the same.
+
+### Deprecated
+
+* `hostArch` and `unameArch` in `electron-packager/targets`, replaced with `host` and `uname` in
+ `electron-download/lib/arch`, respectively
+
+## [12.1.0] - 2018-05-18
+
+[12.1.0]: https://github.com/electron/electron-packager/compare/v12.0.2...v12.1.0
+
+### Added
+
+* `--version` shows the Packager/Node versions & host platform/arch (#841)
+
+### Fixed
+
+* `mips64el` arch is only available with Electron 1.8.x (#843)
+* better detection of node modules (#847)
+
+## [12.0.2] - 2018-05-02
+
+[12.0.2]: https://github.com/electron/electron-packager/compare/v12.0.1...v12.0.2
+
+### Fixed
+
+* Support for Node 10 via the CLI (#835)
+
+### Deprecated
+
+* The callback version of the API (use `nodeify` if you need that syntax style) (#837)
+
+## [12.0.1] - 2018-04-10
+
+[12.0.1]: https://github.com/electron/electron-packager/compare/v12.0.0...v12.0.1
+
+### Fixed
+
+* Upgraded `galactus` to `^0.2.1` to fix a bug with relative paths
+
+## [12.0.0] - 2018-04-03
+
+[12.0.0]: https://github.com/electron/electron-packager/compare/v11.2.0...v12.0.0
+
+### Changed
+
+* `prune` exclusively utilizes the `galactus` module for pruning devDependencies, instead of
+ depending on package managers (#819)
+* `electron-packager` is no longer ignored by default (#819)
+* A warning is emitted when an Electron module is a production dependency (#819)
+
+### Removed
+
+* `packageManager` option (#819)
+
+## [11.2.1] - 2019-01-02
+
+[11.2.1]: https://github.com/electron/electron-packager/compare/v11.2.0...v11.2.1
+
+### Fixed
+
+* Don't handle EH/NP Helpers if they don't exist (Backport of #894)
+
+## [11.2.0] - 2018-03-24
+
+[11.2.0]: https://github.com/electron/electron-packager/compare/v11.1.0...v11.2.0
+
+### Added
+
+* Utility function to execute hooks serially (#814)
+
+## [11.1.0] - 2018-03-04
+
+[11.1.0]: https://github.com/electron/electron-packager/compare/v11.0.1...v11.1.0
+
+### Added
+
+* Support for MAS Login Helper (Electron 2.0.0-beta.1 and above) (#807)
+
+## [11.0.1] - 2018-02-12
+
+[11.0.1]: https://github.com/electron/electron-packager/compare/v11.0.0...v11.0.1
+
+### Fixed
+
+* `rcedit` module updated to 1.0.0, which fixes some bugs (#804)
+* `--help` prints usage to stdout (#805)
+
+## [11.0.0] - 2018-02-06
+
+[11.0.0]: https://github.com/electron/electron-packager/compare/v10.1.2...v11.0.0
+
+### Added
+
+* `linux` platform, `mips64el` arch builds (Electron 1.8.2-beta.5 and above) (#800)
+
+### Changed
+
+* `all` or `platform=linux, arch=all` now include `arch=mips64el` if the Electron version specified
+ is 1.8.2-beta.5 or above (#800)
+
+## [10.1.2] - 2018-01-26
+
+[10.1.2]: https://github.com/electron/electron-packager/compare/v10.1.1...v10.1.2
+
+### Fixed
+
+* `overwrite: true` when no platform/arch is specified (#794)
+
+## [10.1.1] - 2018-01-02
+
+[10.1.1]: https://github.com/electron/electron-packager/compare/v10.1.0...v10.1.1
+
+### Fixed
+
+* ARM detection with prebuilt armv7l Node.js (#783)
+* Don't create `yarn.lock` when pruning with Yarn (#784)
+
+## [10.1.0] - 2017-11-19
+
+[10.1.0]: https://github.com/electron/electron-packager/compare/v10.0.0...v10.1.0
+
+### Added
+
+* Option to set the executable name separate from the app name (#758)
+
+### Fixed
+
+* `mz` dependency (#759)
+
+## [10.0.0] - 2017-11-19
+
+[10.0.0]: https://github.com/electron/electron-packager/compare/v9.1.0...v10.0.0
+
+### Changed
+
+* Switch from `minimist` to `yargs-parser` (#732)
+* Electron Packager only officially supports Node versions that are supported by the
+ NodeJS team (#747)
+* Refactor to use `Promise`s internally. This has the side effect of somewhat parallelizing
+ building two or more targets at once and/or two or more functions for a given hook, via
+ `Promise.all` (#753)
+
+## [9.1.0] - 2017-09-15
+
+[9.1.0]: https://github.com/electron/electron-packager/compare/v9.0.1...v9.1.0
+
+### Added
+
+* `hostArch()` and `allOfficialArchsForPlatformAndVersion()` (#727)
+
+### Changed
+
+* CLI arguments with nonstandard argument values emit warnings (#722)
+
+### Deprecated
+
+* In the CLI, `--tmpdir=false` has been deprecated in favor of `--no-tmpdir` (#722)
+
+## [9.0.1] - 2017-09-02
+
+[9.0.1]: https://github.com/electron/electron-packager/compare/v9.0.0...v9.0.1
+
+### Fixed
+
+* Inferring `win32metadata.CompanyName` from `author` in `package.json` when it's an Object (#718)
+
+## [9.0.0] - 2017-08-23
+
+[9.0.0]: https://github.com/electron/electron-packager/compare/v8.7.2...v9.0.0
+
+### Added
+
+* API hook for afterPrune (#677)
+* Package manager-agnostic pruning support (set `packageManager` to `false`) (#690)
+* `linux` platform, `arm64` arch builds (Electron 1.8.0 and above) (#711)
+
+### Changed
+
+* Promise support for `packager` - function returns a Promise instead of the return value of the
+ callback (#658)
+* `win32metadata.CompanyName` defaults to `author` name from nearest `package.json` (#667)
+* `win32metadata.FileDescription` defaults to `productName` or `name` from
+ nearest `package.json` (#667)
+* `win32metadata.OriginalFilename` defaults to renamed `.exe` (#667)
+* `win32metadata.ProductName` defaults to `productName` or `name` from nearest `package.json` (#667)
+* `win32metadata.InternalName` defaults to `productName` or `name` from
+ nearest `package.json` (#667)
+* Warn when downloading from the official Electron releases and the arch/platform combination
+ specified is invalid (#562)
+* Do not error out immediately if a `download.mirror` is specified and an unofficial arch/platform
+ is specified (#670)
+* Allow spaces when specifying archs/platforms as a string, rather than an array (#487)
+* The `extraResource` option works on all target platforms (#637)
+* `all` or `platform=linux, arch=all` now include `arch=arm64` if the Electron version specified is
+ 1.8.0 or above (#711)
+
+### Fixed
+
+* `common.warning` for codesigning (#694)
+
+### Removed
+
+* `version` is removed in favor of `electronVersion` (CLI: `--electron-version`) (#665)
+* `version-string` is removed in favor of `win32metadata` (#668)
+* Options set via the JavaScript API formatted in kebab-case (i.e., with hyphens) are removed in
+ favor of their camelCase variants, per JavaScript naming standards (#669)
+
+## [8.7.2] - 2017-06-25
+
+[8.7.2]: https://github.com/electron/electron-packager/compare/v8.7.1...v8.7.2
+
+### Fixed
+
+* Stop yarn creating `.bin` folders when pruning (#678)
+
+## [8.7.1] - 2017-06-05
+
+[8.7.1]: https://github.com/electron/electron-packager/compare/v8.7.0...v8.7.1
+
+### Fixed
+
+* Usage docs for `win32metadata.application-manifest` and `win32metadata.requested-execution-level`
+
+## [8.7.0] - 2017-05-01
+
+[8.7.0]: https://github.com/electron/electron-packager/compare/v8.6.0...v8.7.0
+
+### Added
+
+* `packageManager` (`--package-manager` via CLI) option (#618)
+* `win32metadata.application-manifest` option (#610)
+* `win32metadata.requested-execution-level` option (#610)
+
+### Fixed
+
+* Support for `extract-zip` >= 1.6.1
+
+## [8.6.0] - 2017-03-14
+
+[8.6.0]: https://github.com/electron/electron-packager/compare/v8.5.2...v8.6.0
+
+### Added
+
+* Limited support for electron-prebuilt-compile (#608)
+
+### Changed
+
+* Options formatted in kebab-case (i.e., with hyphens) are available in camelCase, per JavaScript naming standards (#580)
+* rcedit upgraded to 0.8.0
+
+### Deprecated
+
+* Options formatted in kebab-case (i.e., with hyphens) are deprecated in favor of their camelCase variants, per JavaScript naming standards (#580)
+
+## [8.5.2] - 2017-02-19
+
+[8.5.2]: https://github.com/electron/electron-packager/compare/v8.5.1...v8.5.2
+
+### Fixed
+
+* Prepend all warning messages with "WARNING:" (#593)
+* Ignore the generated temporary directory on Linux (#596)
+* Prevent app names from ending in " Helper" (#600)
+
+## [8.5.1] - 2017-01-22
+
+[8.5.1]: https://github.com/electron/electron-packager/compare/v8.5.0...v8.5.1
+
+### Fixed
+
+* Show CLI option when showing option deprecation message (#560)
+
+## [8.5.0] - 2017-01-10
+
+[8.5.0]: https://github.com/electron/electron-packager/compare/v8.4.0...v8.5.0
+
+### Added
+
+* `electronVersion` (`--electron-version` via CLI) option (#547)
+
+### Deprecated
+
+* `version` is deprecated in favor of `electronVersion` (`--electron-version` via CLI) (#547)
+
+## [8.4.0] - 2016-12-08
+
+[8.4.0]: https://github.com/electron/electron-packager/compare/v8.3.0...v8.4.0
+
+### Added
+
+* `quiet` option (#541)
+
+### Fixed
+
+* Better type checking when validating arch/platform (#534)
+
+## [8.3.0] - 2016-11-16
+
+[8.3.0]: https://github.com/electron/electron-packager/compare/v8.2.0...v8.3.0
+
+### Changed
+
+* Upgrade to electron-osx-sign 0.4.x (#384)
+
+### Fixed
+
+* Clarify symlink error message for Windows
+
+## [8.2.0] - 2016-10-29
+
+[8.2.0]: https://github.com/electron/electron-packager/compare/v8.1.0...v8.2.0
+
+### Added
+
+* Allow `extend-info` to specify an object instead of a filename (#510)
+
+### Fixed
+
+* Retrieving metadata from `package.json` by upgrading `get-package-info` (#505)
+* Typo when using `extend-info` (#510)
+
+## [8.1.0] - 2016-09-30
+
+[8.1.0]: https://github.com/electron/electron-packager/compare/v8.0.0...v8.1.0
+
+### Added
+
+* `.o` and `.obj` files are ignored by default (#491)
+* Electron downloads are now checked against their published checksums (#493)
+* Documentation for `download.quiet` option to enable/disable progress bar (#494)
+* The `build-version` property, when unspecified, now defaults to the
+ `app-version` property value on Windows (#501)
+
+## [8.0.0] - 2016-09-03
+
+[8.0.0]: https://github.com/electron/electron-packager/compare/v7.7.0...v8.0.0
+
+### Added
+
+* `win32metadata` option (#331, #463)
+* `linux` platform, `armv7l` arch support (#106, #474)
+
+### Changed
+
+* `all` now includes the `linux` platform, `armv7l` arch combination
+* Default the `platform` option to the host platform (#464)
+* Default the `arch` option to the host arch (#36, #464)
+* Default the `prune` option to `true` (#235, #472)
+
+### Fixed
+
+* Allow scoped package names as Electron app names - invalid characters are replaced with
+ hyphens (#308, #455)
+
+### Deprecated
+
+* `version-string` is deprecated in favor of `win32metadata` (#331, #463)
+
+### Removed
+
+* `asar-unpack` is removed in favor of `asar.unpack`
+* `asar-unpack-dir` is removed in favor of `asar.unpackDir`
+* `cache` is removed in favor of `download.cache`
+* `strict-ssl` is removed in favor of `download.strictSSL`
+
+## [7.7.0] - 2016-08-20
+
+[7.7.0]: https://github.com/electron/electron-packager/compare/v7.6.0...v7.7.0
+
+### Added
+
+* The `package.json` `version` property is the default app version if `--app-version` is
+ unspecified (#449)
+
+### Changed
+
+* [darwin/mas] Explicitly disallow `osx-sign.binaries` (#459)
+
+## [7.6.0] - 2016-08-14
+
+[7.6.0]: https://github.com/electron/electron-packager/compare/v7.5.1...v7.6.0
+
+### Added
+
+* [API] hook for afterCopy (#448)
+* [darwin/mas] Documentation for `protocol` and `protocol-name` options (#121, #450)
+
+### Changed
+
+* [CLI] Minimum Node version is enforced (#454)
+
+### Fixed
+
+* [CLI] ensure --out has either a string or null value (#442)
+* Use `get-package-info` (again) to support finding prebuilt in parent directories (#445)
+
+## [7.5.1] - 2016-08-06
+
+[7.5.1]: https://github.com/electron/electron-packager/compare/v7.5.0...v7.5.1
+
+### Fixed
+
+* Resolve to absolute path when inferring app name/Electron version (#440)
+
+## [7.5.0] - 2016-08-04
+
+[7.5.0]: https://github.com/electron/electron-packager/compare/v7.4.0...v7.5.0
+
+### Added
+
+* Support the new `electron` package name (#435)
+
+## [7.4.0] - 2016-07-31
+
+[7.4.0]: https://github.com/electron/electron-packager/compare/v7.3.0...v7.4.0
+
+### Added
+
+* Basic debugging messages via the `debug` module - see CONTRIBUTING.md for usage (#433)
+
+### Changed
+
+* Clearer error message when inferring the app name and/or Electron version fails
+
+### Fixed
+
+* (Test) apps named "Electron" can be packaged successfully (#415)
+
+## [7.3.0] - 2016-07-10
+
+[7.3.0]: https://github.com/electron/electron-packager/compare/v7.2.0...v7.3.0
+
+### Added
+
+* `asar` options can be specified as an `Object` (via the API) or with dot notation (via the CLI) -
+ see the respective docs for details (#353, #417)
+
+### Deprecated
+
+* `asar-unpack` is deprecated in favor of `asar.unpack` (#417)
+* `asar-unpack-dir` is deprecated in favor of `asar.unpackDir` (#417)
+
+## [7.2.0] - 2016-07-03
+
+[7.2.0]: https://github.com/electron/electron-packager/compare/v7.1.0...v7.2.0
+
+### Added
+
+* `derefSymlinks` option (#410)
+
+### Fixed
+
+* Clarified message when `wine` is not found (#357)
+
+## [7.1.0] - 2016-06-22
+
+[7.1.0]: https://github.com/electron/electron-packager/compare/v7.0.4...v7.1.0
+
+### Added
+
+* Add `afterExtract` hook (#354, #403)
+
+## [7.0.4] - 2016-06-14
+
+[7.0.4]: https://github.com/electron/electron-packager/compare/v7.0.3...v7.0.4
+
+### Fixed
+
+* Clarified app name/Electron version error message (#390)
+
+## [7.0.3] - 2016-05-31
+
+[7.0.3]: https://github.com/electron/electron-packager/compare/v7.0.2...v7.0.3
+
+### Changed
+
+* [contributors] Code contributions need to be validated in "strict" mode (#342, #351)
+
+### Fixed
+
+* CLI output truncated when using Node 6 (and possibly earlier) (#381)
+
+## [7.0.2] - 2016-05-18
+
+[7.0.2]: https://github.com/electron/electron-packager/compare/v7.0.1...v7.0.2
+
+### Fixed
+
+* The default `.git` ignore only ignores that directory (#344)
+* Specifying the `download.strictSSL` CLI parameter no longer triggers a deprecation warning for
+ `strict-ssl` (#349)
+
+## [7.0.1] - 2016-04-21
+
+[7.0.1]: https://github.com/electron/electron-packager/compare/v7.0.0...v7.0.1
+
+### Fixed
+
+* Not specifying `strict-ssl` CLI parameter no longer triggers a deprecation warning (#335)
+
+## [7.0.0] - 2016-04-17
+
+[7.0.0]: https://github.com/electron/electron-packager/compare/v6.0.2...v7.0.0
+
+### Added
+
+* Add `download` parameter (#320)
+
+### Changed
+
+* **Dropped support for running on Node < 4.0.** (#319)
+
+### Fixed
+
+* `strict-ssl` (and by extension, `download.strictSSL`) defaults to `true`, as documented (#320)
+
+### Deprecated
+
+* `cache` is deprecated in favor of `download.cache` (#320)
+* `strict-ssl` is deprecated in favor of `download.strictSSL` (#320)
+
+### Removed
+
+* [win32] `version-string.FileVersion` and `version-string.ProductVersion` are replaced by
+ favor of `app-version` and `build-version`, respectively (#327)
+* [win32] `version-string.LegalCopyright` is replaced by `app-copyright` (#327)
+
+## [6.0.2] - 2016-04-09
+
+[6.0.2]: https://github.com/electron/electron-packager/compare/v6.0.1...v6.0.2
+
+### Changed
+
+* [win32] `rcedit` dependency updated to 0.5.x. **The DLL mentioned in the 6.0.1 release notes
+ is no longer required.**
+
+## [6.0.1] - 2016-04-08
+
+[6.0.1]: https://github.com/electron/electron-packager/compare/v6.0.0...v6.0.1
+
+### Changed
+
+* [win32] `rcedit` dependency updated to 0.4.x. **A new DLL is required to run the new version
+ of rcedit, please see [the documentation](https://github.com/electron/electron-packager/blob/main/README.md#building-windows-apps-from-non-windows-platforms)
+ for details**
+* API documentation moved from readme.md to docs/api.md (#296)
+
+### Fixed
+
+* [darwin/mas] The OSX icon is properly replaced when Electron ≥ 0.37.4 is used (#301)
+* `default_app.asar` is deleted during packaging (necessary when Electron ≥ 0.37.4 is used).
+ The `default_app` folder is still deleted for older Electron versions (#298, #311)
+
+## [6.0.0] - 2016-03-28
+
+[6.0.0]: https://github.com/electron/electron-packager/compare/v5.2.1...v6.0.0
+
+### Added
+
+* Add support for a new target platform, Mac App Store (`mas`), including signing OS X apps
+ (#223, #278)
+* Add `app-copyright` parameter (#223)
+* Add `tmpdir` parameter to specify a custom temp directory (#230); set to `false` to disable
+ using a temporary directory at all (#251, #276)
+* Add `NEWS.md`, a human-readable list of changes in each version (since 5.2.0) (#263)
+
+### Changed
+
+* **The GitHub repository has been moved into an organization,
+ [electron-userland](https://github.com/electron-userland)**
+* Allow the `ignore` parameter to take a function (#247)
+* [contributors] Update Standard (JavaScript coding standard) package to 5.4.x
+* [contributors] Add code coverage support via Coveralls (#257)
+* Better docs around contributing to the project (#258)
+* Ignore the directory specified by the `out` parameter by default (#255)
+* [darwin/mas] Add support for merging arbitrary plist files and adding arbitrary resource
+ files (#253)
+* Split out the code to sign OS X apps into a separate Node module,
+ [electron-osx-sign](https://github.com/electron-userland/electron-osx-sign) (#223)
+* [darwin/mas] **BREAKING**: The `sign` parameter is now `osx-sign` (for better cross-platform
+ compatibility) and optionally takes several of the same sub-parameters as
+ electron-osx-sign (#286)
+
+### Deprecated
+
+* [win32] `version-string.LegalCopyright` is deprecated in favor of `app-copyright` (#268)
+
+### Fixed
+
+* [darwin/mas] Ensure `CFBundleVersion` and `CFBundleShortVersionString` are strings (#250)
+* [darwin/mas] Correctly set the helper bundle ID in all relevant plist files (#223)
+* [darwin/mas] OSX-specific binaries are correctly renamed to the application name (#244, #293)
+
+ **If you are upgrading from ≤ 5.2.1 and building for a `darwin` target, you may experience problems. See #323 for details.**
+
+## [5.2.1] - 2016-01-17
+
+[5.2.1]: https://github.com/electron/electron-packager/compare/v5.2.0...v5.2.1
+
+### Changed
+
+* [win32] Add support for Windows for the `app-version` and `build-version` parameters (#229)
+* If `appname` and/or `version` are omitted from the parameters, infer from `package.json` (#94)
+
+### Deprecated
+
+* [win32] `version-string.FileVersion` and `version-string.ProductVersion` are deprecated in
+ favor of `app-version` and `build-version`, respectively (#229)
+
+### Fixed
+
+* Remove `default_app` from built packages (#206)
+* Add documentation for optional arguments (#226)
+* [darwin] Don't declare helper app as a protocol handler (#220)
+
+## [5.2.0] - 2015-12-16
+
+[5.2.0]: https://github.com/electron/electron-packager/compare/v5.1.1...v5.2.0
+
+### Added
+
+* Add `asar-unpack-dir` parameter (#174)
+* [darwin] Add `app-category-type` parameter (#202)
+* Add `strict-ssl` parameter (#209)
+
+### Changed
+
+* Ignore `node_modules/.bin` by default (#189)
+
+----
+
+For versions prior to 5.2.0, please see `git log`.
diff --git a/desktop/node_modules/electron-packager/README.md b/desktop/node_modules/electron-packager/README.md
new file mode 100644
index 0000000..d6ffe56
--- /dev/null
+++ b/desktop/node_modules/electron-packager/README.md
@@ -0,0 +1,217 @@
+# Electron Packager
+
+Package your [Electron](https://electronjs.org) app into OS-specific bundles (`.app`, `.exe`, etc.) via JavaScript or the command line.
+
+[![CircleCI Build Status](https://circleci.com/gh/electron/electron-packager/tree/main.svg?style=svg)](https://circleci.com/gh/electron/electron-packager/tree/main)
+[![electron-nightly Canary](https://github.com/electron/electron-packager/actions/workflows/canary.yml/badge.svg)](https://github.com/electron/electron-packager/actions/workflows/canary.yml)
+[![Coverage Status](https://codecov.io/gh/electron/electron-packager/branch/main/graph/badge.svg)](https://codecov.io/gh/electron/electron-packager)
+[![npm](https://badgen.net/npm/v/electron-packager)](https://npm.im/electron-packager)
+[![Discord](https://img.shields.io/discord/745037351163527189?color=blueviolet&logo=discord)](https://discord.com/invite/APGC3k5yaH)
+
+[Supported Platforms](#supported-platforms) |
+[Installation](#installation) |
+[Usage](#usage) |
+[API](https://electron.github.io/electron-packager/main/) |
+[Contributing](https://github.com/electron/electron-packager/blob/main/CONTRIBUTING.md) |
+[Support](https://github.com/electron/electron-packager/blob/main/SUPPORT.md) |
+[Related Apps/Libraries](#related) |
+[FAQ](https://github.com/electron/electron-packager/blob/main/docs/faq.md) |
+[Release Notes](https://github.com/electron/electron-packager/blob/main/NEWS.md)
+
+----
+
+## About
+
+Electron Packager is a command line tool and Node.js library that bundles Electron-based application
+source code with a renamed Electron executable and supporting files into folders ready for distribution.
+
+For creating distributables like installers and Linux packages, consider using either [Electron
+Forge](https://github.com/electron/forge) (which uses Electron Packager
+internally), or one of the [related Electron tools](#distributable-creators), which utilizes
+Electron Packager-created folders as a basis.
+
+Note that packaged Electron applications can be relatively large. A zipped, minimal Electron
+application is approximately the same size as the zipped prebuilt binary for a given target
+platform, target arch, and [Electron version](https://github.com/electron/electron/releases)
+_(files named `electron-v${version}-${platform}-${arch}.zip`)_.
+
+## Supported Platforms
+
+Electron Packager is known to run on the following **host** platforms:
+
+* Windows (32/64 bit)
+* macOS (formerly known as OS X)
+* Linux (x86/x86_64)
+
+It generates executables/bundles for the following **target** platforms:
+
+* Windows (also known as `win32`, for x86, x86_64, and arm64 architectures)
+* macOS (also known as `darwin`) / [Mac App Store](https://electronjs.org/docs/tutorial/mac-app-store-submission-guide/) (also known as `mas`)<sup>*</sup> (for x86_64, arm64, and universal architectures)
+* Linux (for x86, x86_64, armv7l, arm64, and mips64el architectures)
+
+<sup>*</sup> *Note for macOS / Mac App Store target bundles: the `.app` bundle can only be signed when building on a host macOS platform.*
+
+## Installation
+
+This module requires Node.js 14.17.5 or higher to run.
+
+```sh
+npm install --save-dev electron-packager
+```
+
+It is **not** recommended to install `electron-packager` globally.
+
+### Building Windows apps from non-Windows platforms
+
+Building an Electron app for the Windows target platform requires editing the `Electron.exe` file.
+Currently, Electron Packager uses [`node-rcedit`](https://github.com/electron/node-rcedit) to accomplish
+this. A Windows executable is bundled in that Node package and needs to be run in order for this
+functionality to work, so on non-Windows host platforms (not including WSL),
+[Wine](https://www.winehq.org/) 1.6 or later needs to be installed. On macOS, it is installable
+via [Homebrew](https://brew.sh/).
+
+## Usage
+
+### Via JavaScript
+
+JavaScript API usage can be found in the [API documentation](https://electron.github.io/electron-packager/main/modules/electronpackager.html).
+
+### From the command line
+
+Running Electron Packager from the command line has this basic form:
+
+```
+npx electron-packager <sourcedir> <appname> --platform=<platform> --arch=<arch> [optional flags...]
+```
+
+> **Note**:
+> `npx` can be substituted for `yarn` or `npm exec` depending on what package manager and
+> the version you have installed.
+
+This will:
+
+* Find or download the correct release of Electron
+* Use that version of Electron to create an app in `<out>/<appname>-<platform>-<arch>` *(this can be customized via an optional flag)*
+
+`--platform` and `--arch` can be omitted, in two cases:
+
+* If you specify `--all` instead, bundles for all valid combinations of target
+ platforms/architectures will be created.
+* Otherwise, a single bundle for the host platform/architecture will be created.
+
+For an overview of the other optional flags, run `electron-packager --help` or see
+[usage.txt](https://github.com/electron/electron-packager/blob/main/usage.txt). For
+detailed descriptions, see the [API documentation](https://electron.github.io/electron-packager/main/modules/electronpackager.html).
+
+For flags that are structured as objects, you can pass each option as via dot notation as such:
+
+```sh
+npx electron-packager --flag.foo="bar"
+# will pass in { flag: { foo: "bar"} } as an option to the Electron Packager API
+```
+
+If `appname` is omitted, this will use the name specified by "productName" or "name" in the nearest package.json.
+
+**Characters in the Electron app name which are not allowed in all target platforms' filenames
+(e.g., `/`), will be replaced by hyphens (`-`).**
+
+You should be able to launch the app on the platform you built for. If not, check your settings and try again.
+
+**Be careful** not to include `node_modules` you don't want into your final app. If you put them in
+the `devDependencies` section of `package.json`, by default none of the modules related to those
+dependencies will be copied in the app bundles. (This behavior can be turned off with the
+`prune: false` API option or `--no-prune` CLI flag.) In addition, folders like `.git` and
+`node_modules/.bin` will be ignored by default. You can use `--ignore` to ignore files and folders
+via a regular expression (*not* a [glob pattern](https://en.wikipedia.org/wiki/Glob_%28programming%29)).
+Examples include `--ignore=\.gitignore` or `--ignore="\.git(ignore|modules)"`.
+
+#### Example
+
+Let's assume that you have made an app based on the [electron-quick-start](https://github.com/electron/electron-quick-start) repository on a macOS host platform with the following file structure:
+
+```
+foobar
+├── package.json
+├── index.html
+├── […other files, like the app's LICENSE…]
+└── script.js
+```
+
+…and that the following is true:
+
+* `electron-packager` is installed locally
+* `productName` in `package.json` has been set to `Foo Bar`
+* The `electron` module is in the `devDependencies` section of `package.json`, and set to the exact version of `1.4.15`.
+* `npm install` for the `Foo Bar` app has been run at least once
+
+When one runs the following command for the first time in the `foobar` directory:
+
+```
+npx electron-packager .
+```
+
+`electron-packager` will do the following:
+
+* Use the current directory for the `sourcedir`
+* Infer the `appname` from the `productName` in `package.json`
+* Infer the `appVersion` from the `version` in `package.json`
+* Infer the `platform` and `arch` from the host, in this example, `darwin` platform and `x64` arch.
+* Download the darwin x64 build of Electron 1.4.15 (and cache the downloads in `~/.electron`)
+* Build the macOS `Foo Bar.app`
+* Place `Foo Bar.app` in `foobar/Foo Bar-darwin-x64/` (since an `out` directory was not specified, it used the current working directory)
+
+The file structure now looks like:
+
+```
+foobar
+├── Foo Bar-darwin-x64
+│   ├── Foo Bar.app
+│   │   └── […Mac app contents…]
+│ ├── LICENSE [the Electron license]
+│ └── version
+├── […other application bundles, like "Foo Bar-win32-x64" (sans quotes)…]
+├── package.json
+├── index.html
+├── […other files, like the app's LICENSE…]
+└── script.js
+```
+
+The `Foo Bar.app` folder generated can be executed by a system running macOS, which will start the packaged Electron app. This is also true of the Windows x64 build on a system running a new enough version of Windows for a 64-bit system (via `Foo Bar-win32-x64/Foo Bar.exe`), and so on.
+
+## Related
+
+- [Electron Forge](https://github.com/electron/forge) - creates, builds, and distributes modern Electron applications
+- [electron-packager-interactive](https://github.com/Urucas/electron-packager-interactive) - an interactive CLI for electron-packager
+- [grunt-electron](https://github.com/sindresorhus/grunt-electron) - grunt plugin for electron-packager
+
+### Distributable Creators
+
+* [electron-installer-zip](https://github.com/electron-userland/electron-installer-zip) - creates symlink-compatible ZIP files
+
+Windows:
+
+* [electron-winstaller](https://github.com/electron/windows-installer) - Squirrel.Windows-based installer from the Electron maintainers group
+* [electron-windows-store](https://github.com/felixrieseberg/electron-windows-store) - creates an AppX package for the Windows Store
+* [electron-wix-msi](https://github.com/felixrieseberg/electron-wix-msi) - creates traditional MSI installers
+* [electron-installer-windows](https://github.com/electron-userland/electron-installer-windows) - alternative Squirrel.Windows-based installer
+
+macOS:
+
+* [electron-installer-dmg](https://github.com/electron-userland/electron-installer-dmg) - creates a DMG
+
+Linux:
+
+* [electron-installer-debian](https://github.com/electron-userland/electron-installer-debian) - creates a DEB file
+* [electron-installer-redhat](https://github.com/electron-userland/electron-installer-redhat) - creates an RPM
+* [electron-installer-flatpak](https://github.com/endlessm/electron-installer-flatpak) - creates a Flatpak file
+* [electron-installer-snap](https://github.com/electron-userland/electron-installer-snap) - creates a Snap file
+
+### Plugins
+
+These Node modules utilize Electron Packager API hooks:
+
+- [electron-packager-languages](https://npm.im/electron-packager-languages) - sets the locales
+ available to Electron when packaged, which is used by the Mac App Store, among other places
+- [electron-packager-plugin-non-proprietary-codecs-ffmpeg](https://www.npmjs.com/package/electron-packager-plugin-non-proprietary-codecs-ffmpeg) - replaces the normal version of FFmpeg in Electron with a version without proprietary codecs
+- [@electron/rebuild](https://github.com/electron/rebuild) - rebuilds native Node.js modules
+ against the packaged Electron version
diff --git a/desktop/node_modules/electron-packager/bin/electron-packager.js b/desktop/node_modules/electron-packager/bin/electron-packager.js
new file mode 100755
index 0000000..5383e93
--- /dev/null
+++ b/desktop/node_modules/electron-packager/bin/electron-packager.js
@@ -0,0 +1,16 @@
+#!/usr/bin/env node
+
+'use strict'
+
+/* eslint-disable no-var */
+// WHY: not consts so that this file can load in Node < 4.0
+var packageJSON = require('../package.json')
+var semver = require('semver')
+if (!semver.satisfies(process.versions.node, packageJSON.engines.node)) {
+ console.error('CANNOT RUN WITH NODE ' + process.versions.node)
+ console.error('Electron Packager requires Node ' + packageJSON.engines.node + '.')
+ process.exit(1)
+}
+
+var cli = require('../src/cli')
+cli.run(process.argv.slice(2))
diff --git a/desktop/node_modules/electron-packager/collaborators.md b/desktop/node_modules/electron-packager/collaborators.md
new file mode 100644
index 0000000..9ec9d1f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/collaborators.md
@@ -0,0 +1,8 @@
+## Collaborators
+
+Electron Packager is only possible due to the excellent work of the following collaborators:
+
+* [malept](https://github.com/malept) (current primary maintainer)
+* [maxogden](https://github.com/maxogden) (Creator & maintainer emeritus)
+
+and many others as shown in the [GitHub contributors graph](https://github.com/electron/electron-packager/graphs/contributors).
diff --git a/desktop/node_modules/electron-packager/docs/api.md b/desktop/node_modules/electron-packager/docs/api.md
new file mode 100644
index 0000000..0136885
--- /dev/null
+++ b/desktop/node_modules/electron-packager/docs/api.md
@@ -0,0 +1 @@
+[API Documentation](https://electron.github.io/electron-packager/) has moved.
diff --git a/desktop/node_modules/electron-packager/docs/faq.md b/desktop/node_modules/electron-packager/docs/faq.md
new file mode 100644
index 0000000..198cf94
--- /dev/null
+++ b/desktop/node_modules/electron-packager/docs/faq.md
@@ -0,0 +1,50 @@
+# Frequently Asked Questions
+
+## Why does the menubar appear when running in development mode, but disappear when packaged?
+
+**Note**: as of Electron 5, the menubar always appears, so this question is not relevant to
+officially supported versions of Electron.
+
+Based on [a comment from **@MarshallOfSound**](https://github.com/electron/electron-packager/issues/553#issuecomment-270805213):
+
+When you're running in "development mode" (for example, `electron /path/to/app`), Electron uses the
+`default_app` codepath to run your app, which also provides a default menubar. When the app is
+packaged, Electron runs your app directly. To have a menubar that's consistent between development
+and packaged modes, you'll need to [define it yourself](https://electronjs.org/docs/api/menu/).
+
+## Why isn't my `ignore` option working?
+
+As stated in the documentation for [`ignore`](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#ignore), it uses "[one] or more additional
+[regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
+patterns. […] Please note that [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29)
+will not work."
+
+## Why isn't the relative path in my app code working?
+
+To make a path work in both development and packaged mode, you'll need to generate a path based on
+the location of the JavaScript file that is referencing the file. For example, if you had an app
+structure like the following:
+
+```
+AppName
+├── package.json
+├── data
+│   └── somedata.json
+└── src
+    └── main.js
+```
+
+In `src/main.js`, you would access `data/somedata.json` similar to this:
+
+```javascript
+const path = require('path');
+const jsonFilename = path.resolve(__dirname, '..', 'data', 'somedata.json');
+console.log(require(jsonFilename));
+```
+
+## How do I set an icon on Linux?
+
+The docs for [`icon`](https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#icon)
+already show how to set an icon on your `BrowserWindow`, but your dock/taskbar may not use that and
+instead use the `Icon` value in your `.desktop` file. The [Linux distributable creators](https://github.com/electron/electron-packager#distributable-creators)
+can help you set/distribute the appropriate icon in that case.
diff --git a/desktop/node_modules/electron-packager/node_modules/.bin/semver b/desktop/node_modules/electron-packager/node_modules/.bin/semver
new file mode 120000
index 0000000..5aaadf4
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/.bin/semver
@@ -0,0 +1 @@
+../semver/bin/semver.js \ No newline at end of file
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/LICENSE b/desktop/node_modules/electron-packager/node_modules/fs-extra/LICENSE
new file mode 100644
index 0000000..93546df
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2011-2017 JP Richardson
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/README.md b/desktop/node_modules/electron-packager/node_modules/fs-extra/README.md
new file mode 100644
index 0000000..245de66
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/README.md
@@ -0,0 +1,292 @@
+Node.js: fs-extra
+=================
+
+`fs-extra` adds file system methods that aren't included in the native `fs` module and adds promise support to the `fs` methods. It also uses [`graceful-fs`](https://github.com/isaacs/node-graceful-fs) to prevent `EMFILE` errors. It should be a drop in replacement for `fs`.
+
+[![npm Package](https://img.shields.io/npm/v/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![License](https://img.shields.io/npm/l/fs-extra.svg)](https://github.com/jprichardson/node-fs-extra/blob/master/LICENSE)
+[![build status](https://img.shields.io/github/actions/workflow/status/jprichardson/node-fs-extra/ci.yml?branch=master)](https://github.com/jprichardson/node-fs-extra/actions/workflows/ci.yml?query=branch%3Amaster)
+[![downloads per month](http://img.shields.io/npm/dm/fs-extra.svg)](https://www.npmjs.org/package/fs-extra)
+[![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)
+
+Why?
+----
+
+I got tired of including `mkdirp`, `rimraf`, and `ncp` in most of my projects.
+
+
+
+
+Installation
+------------
+
+ npm install fs-extra
+
+
+
+Usage
+-----
+
+### CommonJS
+
+`fs-extra` is a drop in replacement for native `fs`. All methods in `fs` are attached to `fs-extra`. All `fs` methods return promises if the callback isn't passed.
+
+You don't ever need to include the original `fs` module again:
+
+```js
+const fs = require('fs') // this is no longer necessary
+```
+
+you can now do this:
+
+```js
+const fs = require('fs-extra')
+```
+
+or if you prefer to make it clear that you're using `fs-extra` and not `fs`, you may want
+to name your `fs` variable `fse` like so:
+
+```js
+const fse = require('fs-extra')
+```
+
+you can also keep both, but it's redundant:
+
+```js
+const fs = require('fs')
+const fse = require('fs-extra')
+```
+
+### ESM
+
+There is also an `fs-extra/esm` import, that supports both default and named exports. However, note that `fs` methods are not included in `fs-extra/esm`; you still need to import `fs` and/or `fs/promises` seperately:
+
+```js
+import { readFileSync } from 'fs'
+import { readFile } from 'fs/promises'
+import { outputFile, outputFileSync } from 'fs-extra/esm'
+```
+
+Default exports are supported:
+
+```js
+import fs from 'fs'
+import fse from 'fs-extra/esm'
+// fse.readFileSync is not a function; must use fs.readFileSync
+```
+
+but you probably want to just use regular `fs-extra` instead of `fs-extra/esm` for default exports:
+
+```js
+import fs from 'fs-extra'
+// both fs and fs-extra methods are defined
+```
+
+Sync vs Async vs Async/Await
+-------------
+Most methods are async by default. All async methods will return a promise if the callback isn't passed.
+
+Sync methods on the other hand will throw if an error occurs.
+
+Also Async/Await will throw an error if one occurs.
+
+Example:
+
+```js
+const fs = require('fs-extra')
+
+// Async with promises:
+fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ .then(() => console.log('success!'))
+ .catch(err => console.error(err))
+
+// Async with callbacks:
+fs.copy('/tmp/myfile', '/tmp/mynewfile', err => {
+ if (err) return console.error(err)
+ console.log('success!')
+})
+
+// Sync:
+try {
+ fs.copySync('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+} catch (err) {
+ console.error(err)
+}
+
+// Async/Await:
+async function copyFiles () {
+ try {
+ await fs.copy('/tmp/myfile', '/tmp/mynewfile')
+ console.log('success!')
+ } catch (err) {
+ console.error(err)
+ }
+}
+
+copyFiles()
+```
+
+
+Methods
+-------
+
+### Async
+
+- [copy](docs/copy.md)
+- [emptyDir](docs/emptyDir.md)
+- [ensureFile](docs/ensureFile.md)
+- [ensureDir](docs/ensureDir.md)
+- [ensureLink](docs/ensureLink.md)
+- [ensureSymlink](docs/ensureSymlink.md)
+- [mkdirp](docs/ensureDir.md)
+- [mkdirs](docs/ensureDir.md)
+- [move](docs/move.md)
+- [outputFile](docs/outputFile.md)
+- [outputJson](docs/outputJson.md)
+- [pathExists](docs/pathExists.md)
+- [readJson](docs/readJson.md)
+- [remove](docs/remove.md)
+- [writeJson](docs/writeJson.md)
+
+### Sync
+
+- [copySync](docs/copy-sync.md)
+- [emptyDirSync](docs/emptyDir-sync.md)
+- [ensureFileSync](docs/ensureFile-sync.md)
+- [ensureDirSync](docs/ensureDir-sync.md)
+- [ensureLinkSync](docs/ensureLink-sync.md)
+- [ensureSymlinkSync](docs/ensureSymlink-sync.md)
+- [mkdirpSync](docs/ensureDir-sync.md)
+- [mkdirsSync](docs/ensureDir-sync.md)
+- [moveSync](docs/move-sync.md)
+- [outputFileSync](docs/outputFile-sync.md)
+- [outputJsonSync](docs/outputJson-sync.md)
+- [pathExistsSync](docs/pathExists-sync.md)
+- [readJsonSync](docs/readJson-sync.md)
+- [removeSync](docs/remove-sync.md)
+- [writeJsonSync](docs/writeJson-sync.md)
+
+
+**NOTE:** You can still use the native Node.js methods. They are promisified and copied over to `fs-extra`. See [notes on `fs.read()`, `fs.write()`, & `fs.writev()`](docs/fs-read-write-writev.md)
+
+### What happened to `walk()` and `walkSync()`?
+
+They were removed from `fs-extra` in v2.0.0. If you need the functionality, `walk` and `walkSync` are available as separate packages, [`klaw`](https://github.com/jprichardson/node-klaw) and [`klaw-sync`](https://github.com/manidlou/node-klaw-sync).
+
+
+Third Party
+-----------
+
+### CLI
+
+[fse-cli](https://www.npmjs.com/package/@atao60/fse-cli) allows you to run `fs-extra` from a console or from [npm](https://www.npmjs.com) scripts.
+
+### TypeScript
+
+If you like TypeScript, you can use `fs-extra` with it: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/fs-extra
+
+
+### File / Directory Watching
+
+If you want to watch for changes to files or directories, then you should use [chokidar](https://github.com/paulmillr/chokidar).
+
+### Obtain Filesystem (Devices, Partitions) Information
+
+[fs-filesystem](https://github.com/arthurintelligence/node-fs-filesystem) allows you to read the state of the filesystem of the host on which it is run. It returns information about both the devices and the partitions (volumes) of the system.
+
+### Misc.
+
+- [fs-extra-debug](https://github.com/jdxcode/fs-extra-debug) - Send your fs-extra calls to [debug](https://npmjs.org/package/debug).
+- [mfs](https://github.com/cadorn/mfs) - Monitor your fs-extra calls.
+
+
+
+Hacking on fs-extra
+-------------------
+
+Wanna hack on `fs-extra`? Great! Your help is needed! [fs-extra is one of the most depended upon Node.js packages](http://nodei.co/npm/fs-extra.png?downloads=true&downloadRank=true&stars=true). This project
+uses [JavaScript Standard Style](https://github.com/feross/standard) - if the name or style choices bother you,
+you're gonna have to get over it :) If `standard` is good enough for `npm`, it's good enough for `fs-extra`.
+
+[![js-standard-style](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)
+
+What's needed?
+- First, take a look at existing issues. Those are probably going to be where the priority lies.
+- More tests for edge cases. Specifically on different platforms. There can never be enough tests.
+- Improve test coverage.
+
+Note: If you make any big changes, **you should definitely file an issue for discussion first.**
+
+### Running the Test Suite
+
+fs-extra contains hundreds of tests.
+
+- `npm run lint`: runs the linter ([standard](http://standardjs.com/))
+- `npm run unit`: runs the unit tests
+- `npm run unit-esm`: runs tests for `fs-extra/esm` exports
+- `npm test`: runs the linter and all tests
+
+When running unit tests, set the environment variable `CROSS_DEVICE_PATH` to the absolute path of an empty directory on another device (like a thumb drive) to enable cross-device move tests.
+
+
+### Windows
+
+If you run the tests on the Windows and receive a lot of symbolic link `EPERM` permission errors, it's
+because on Windows you need elevated privilege to create symbolic links. You can add this to your Windows's
+account by following the instructions here: http://superuser.com/questions/104845/permission-to-make-symbolic-links-in-windows-7
+However, I didn't have much luck doing this.
+
+Since I develop on Mac OS X, I use VMWare Fusion for Windows testing. I create a shared folder that I map to a drive on Windows.
+I open the `Node.js command prompt` and run as `Administrator`. I then map the network drive running the following command:
+
+ net use z: "\\vmware-host\Shared Folders"
+
+I can then navigate to my `fs-extra` directory and run the tests.
+
+
+Naming
+------
+
+I put a lot of thought into the naming of these functions. Inspired by @coolaj86's request. So he deserves much of the credit for raising the issue. See discussion(s) here:
+
+* https://github.com/jprichardson/node-fs-extra/issues/2
+* https://github.com/flatiron/utile/issues/11
+* https://github.com/ryanmcgrath/wrench-js/issues/29
+* https://github.com/substack/node-mkdirp/issues/17
+
+First, I believe that in as many cases as possible, the [Node.js naming schemes](http://nodejs.org/api/fs.html) should be chosen. However, there are problems with the Node.js own naming schemes.
+
+For example, `fs.readFile()` and `fs.readdir()`: the **F** is capitalized in *File* and the **d** is not capitalized in *dir*. Perhaps a bit pedantic, but they should still be consistent. Also, Node.js has chosen a lot of POSIX naming schemes, which I believe is great. See: `fs.mkdir()`, `fs.rmdir()`, `fs.chown()`, etc.
+
+We have a dilemma though. How do you consistently name methods that perform the following POSIX commands: `cp`, `cp -r`, `mkdir -p`, and `rm -rf`?
+
+My perspective: when in doubt, err on the side of simplicity. A directory is just a hierarchical grouping of directories and files. Consider that for a moment. So when you want to copy it or remove it, in most cases you'll want to copy or remove all of its contents. When you want to create a directory, if the directory that it's suppose to be contained in does not exist, then in most cases you'll want to create that too.
+
+So, if you want to remove a file or a directory regardless of whether it has contents, just call `fs.remove(path)`. If you want to copy a file or a directory whether it has contents, just call `fs.copy(source, destination)`. If you want to create a directory regardless of whether its parent directories exist, just call `fs.mkdirs(path)` or `fs.mkdirp(path)`.
+
+
+Credit
+------
+
+`fs-extra` wouldn't be possible without using the modules from the following authors:
+
+- [Isaac Shlueter](https://github.com/isaacs)
+- [Charlie McConnel](https://github.com/avianflu)
+- [James Halliday](https://github.com/substack)
+- [Andrew Kelley](https://github.com/andrewrk)
+
+
+
+
+License
+-------
+
+Licensed under MIT
+
+Copyright (c) 2011-2017 [JP Richardson](https://github.com/jprichardson)
+
+[1]: http://nodejs.org/docs/latest/api/fs.html
+
+
+[jsonfile]: https://github.com/jprichardson/node-jsonfile
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js
new file mode 100644
index 0000000..8bc6011
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy-sync.js
@@ -0,0 +1,161 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirsSync = require('../mkdirs').mkdirsSync
+const utimesMillisSync = require('../util/utimes').utimesMillisSync
+const stat = require('../util/stat')
+
+function copySync (src, dest, opts) {
+ if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ opts = opts || {}
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ process.emitWarning(
+ 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
+ '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
+ 'Warning', 'fs-extra-WARN0002'
+ )
+ }
+
+ const { srcStat, destStat } = stat.checkPathsSync(src, dest, 'copy', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'copy')
+ if (opts.filter && !opts.filter(src, dest)) return
+ const destParent = path.dirname(dest)
+ if (!fs.existsSync(destParent)) mkdirsSync(destParent)
+ return getStats(destStat, src, dest, opts)
+}
+
+function getStats (destStat, src, dest, opts) {
+ const statSync = opts.dereference ? fs.statSync : fs.lstatSync
+ const srcStat = statSync(src)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts)
+ else if (srcStat.isSocket()) throw new Error(`Cannot copy a socket file: ${src}`)
+ else if (srcStat.isFIFO()) throw new Error(`Cannot copy a FIFO pipe: ${src}`)
+ throw new Error(`Unknown file: ${src}`)
+}
+
+function onFile (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts)
+ return mayCopyFile(srcStat, src, dest, opts)
+}
+
+function mayCopyFile (srcStat, src, dest, opts) {
+ if (opts.overwrite) {
+ fs.unlinkSync(dest)
+ return copyFile(srcStat, src, dest, opts)
+ } else if (opts.errorOnExist) {
+ throw new Error(`'${dest}' already exists`)
+ }
+}
+
+function copyFile (srcStat, src, dest, opts) {
+ fs.copyFileSync(src, dest)
+ if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest)
+ return setDestMode(dest, srcStat.mode)
+}
+
+function handleTimestamps (srcMode, src, dest) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) makeFileWritable(dest, srcMode)
+ return setDestTimestamps(src, dest)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode) {
+ return setDestMode(dest, srcMode | 0o200)
+}
+
+function setDestMode (dest, srcMode) {
+ return fs.chmodSync(dest, srcMode)
+}
+
+function setDestTimestamps (src, dest) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ const updatedSrcStat = fs.statSync(src)
+ return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime)
+}
+
+function onDir (srcStat, destStat, src, dest, opts) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts)
+ return copyDir(src, dest, opts)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts) {
+ fs.mkdirSync(dest)
+ copyDir(src, dest, opts)
+ return setDestMode(dest, srcMode)
+}
+
+function copyDir (src, dest, opts) {
+ fs.readdirSync(src).forEach(item => copyDirItem(item, src, dest, opts))
+}
+
+function copyDirItem (item, src, dest, opts) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ if (opts.filter && !opts.filter(srcItem, destItem)) return
+ const { destStat } = stat.checkPathsSync(srcItem, destItem, 'copy', opts)
+ return getStats(destStat, srcItem, destItem, opts)
+}
+
+function onLink (destStat, src, dest, opts) {
+ let resolvedSrc = fs.readlinkSync(src)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlinkSync(resolvedSrc, dest)
+ } else {
+ let resolvedDest
+ try {
+ resolvedDest = fs.readlinkSync(dest)
+ } catch (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlinkSync(resolvedSrc, dest)
+ throw err
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ throw new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`)
+ }
+
+ // prevent copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`)
+ }
+ return copyLink(resolvedSrc, dest)
+ }
+}
+
+function copyLink (resolvedSrc, dest) {
+ fs.unlinkSync(dest)
+ return fs.symlinkSync(resolvedSrc, dest)
+}
+
+module.exports = copySync
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js
new file mode 100644
index 0000000..bc188fb
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/copy.js
@@ -0,0 +1,238 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdirs = require('../mkdirs').mkdirs
+const pathExists = require('../path-exists').pathExists
+const utimesMillis = require('../util/utimes').utimesMillis
+const stat = require('../util/stat')
+
+function copy (src, dest, opts, cb) {
+ if (typeof opts === 'function' && !cb) {
+ cb = opts
+ opts = {}
+ } else if (typeof opts === 'function') {
+ opts = { filter: opts }
+ }
+
+ cb = cb || function () {}
+ opts = opts || {}
+
+ opts.clobber = 'clobber' in opts ? !!opts.clobber : true // default to true for now
+ opts.overwrite = 'overwrite' in opts ? !!opts.overwrite : opts.clobber // overwrite falls back to clobber
+
+ // Warn about using preserveTimestamps on 32-bit node
+ if (opts.preserveTimestamps && process.arch === 'ia32') {
+ process.emitWarning(
+ 'Using the preserveTimestamps option in 32-bit node is not recommended;\n\n' +
+ '\tsee https://github.com/jprichardson/node-fs-extra/issues/269',
+ 'Warning', 'fs-extra-WARN0001'
+ )
+ }
+
+ stat.checkPaths(src, dest, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'copy', err => {
+ if (err) return cb(err)
+ runFilter(src, dest, opts, (err, include) => {
+ if (err) return cb(err)
+ if (!include) return cb()
+
+ checkParentDir(destStat, src, dest, opts, cb)
+ })
+ })
+ })
+}
+
+function checkParentDir (destStat, src, dest, opts, cb) {
+ const destParent = path.dirname(dest)
+ pathExists(destParent, (err, dirExists) => {
+ if (err) return cb(err)
+ if (dirExists) return getStats(destStat, src, dest, opts, cb)
+ mkdirs(destParent, err => {
+ if (err) return cb(err)
+ return getStats(destStat, src, dest, opts, cb)
+ })
+ })
+}
+
+function runFilter (src, dest, opts, cb) {
+ if (!opts.filter) return cb(null, true)
+ Promise.resolve(opts.filter(src, dest))
+ .then(include => cb(null, include), error => cb(error))
+}
+
+function getStats (destStat, src, dest, opts, cb) {
+ const stat = opts.dereference ? fs.stat : fs.lstat
+ stat(src, (err, srcStat) => {
+ if (err) return cb(err)
+
+ if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isFile() ||
+ srcStat.isCharacterDevice() ||
+ srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts, cb)
+ else if (srcStat.isSymbolicLink()) return onLink(destStat, src, dest, opts, cb)
+ else if (srcStat.isSocket()) return cb(new Error(`Cannot copy a socket file: ${src}`))
+ else if (srcStat.isFIFO()) return cb(new Error(`Cannot copy a FIFO pipe: ${src}`))
+ return cb(new Error(`Unknown file: ${src}`))
+ })
+}
+
+function onFile (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return copyFile(srcStat, src, dest, opts, cb)
+ return mayCopyFile(srcStat, src, dest, opts, cb)
+}
+
+function mayCopyFile (srcStat, src, dest, opts, cb) {
+ if (opts.overwrite) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return copyFile(srcStat, src, dest, opts, cb)
+ })
+ } else if (opts.errorOnExist) {
+ return cb(new Error(`'${dest}' already exists`))
+ } else return cb()
+}
+
+function copyFile (srcStat, src, dest, opts, cb) {
+ fs.copyFile(src, dest, err => {
+ if (err) return cb(err)
+ if (opts.preserveTimestamps) return handleTimestampsAndMode(srcStat.mode, src, dest, cb)
+ return setDestMode(dest, srcStat.mode, cb)
+ })
+}
+
+function handleTimestampsAndMode (srcMode, src, dest, cb) {
+ // Make sure the file is writable before setting the timestamp
+ // otherwise open fails with EPERM when invoked with 'r+'
+ // (through utimes call)
+ if (fileIsNotWritable(srcMode)) {
+ return makeFileWritable(dest, srcMode, err => {
+ if (err) return cb(err)
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+ })
+ }
+ return setDestTimestampsAndMode(srcMode, src, dest, cb)
+}
+
+function fileIsNotWritable (srcMode) {
+ return (srcMode & 0o200) === 0
+}
+
+function makeFileWritable (dest, srcMode, cb) {
+ return setDestMode(dest, srcMode | 0o200, cb)
+}
+
+function setDestTimestampsAndMode (srcMode, src, dest, cb) {
+ setDestTimestamps(src, dest, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+}
+
+function setDestMode (dest, srcMode, cb) {
+ return fs.chmod(dest, srcMode, cb)
+}
+
+function setDestTimestamps (src, dest, cb) {
+ // The initial srcStat.atime cannot be trusted
+ // because it is modified by the read(2) system call
+ // (See https://nodejs.org/api/fs.html#fs_stat_time_values)
+ fs.stat(src, (err, updatedSrcStat) => {
+ if (err) return cb(err)
+ return utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime, cb)
+ })
+}
+
+function onDir (srcStat, destStat, src, dest, opts, cb) {
+ if (!destStat) return mkDirAndCopy(srcStat.mode, src, dest, opts, cb)
+ return copyDir(src, dest, opts, cb)
+}
+
+function mkDirAndCopy (srcMode, src, dest, opts, cb) {
+ fs.mkdir(dest, err => {
+ if (err) return cb(err)
+ copyDir(src, dest, opts, err => {
+ if (err) return cb(err)
+ return setDestMode(dest, srcMode, cb)
+ })
+ })
+}
+
+function copyDir (src, dest, opts, cb) {
+ fs.readdir(src, (err, items) => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+}
+
+function copyDirItems (items, src, dest, opts, cb) {
+ const item = items.pop()
+ if (!item) return cb()
+ return copyDirItem(items, item, src, dest, opts, cb)
+}
+
+function copyDirItem (items, item, src, dest, opts, cb) {
+ const srcItem = path.join(src, item)
+ const destItem = path.join(dest, item)
+ runFilter(srcItem, destItem, opts, (err, include) => {
+ if (err) return cb(err)
+ if (!include) return copyDirItems(items, src, dest, opts, cb)
+
+ stat.checkPaths(srcItem, destItem, 'copy', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { destStat } = stats
+ getStats(destStat, srcItem, destItem, opts, err => {
+ if (err) return cb(err)
+ return copyDirItems(items, src, dest, opts, cb)
+ })
+ })
+ })
+}
+
+function onLink (destStat, src, dest, opts, cb) {
+ fs.readlink(src, (err, resolvedSrc) => {
+ if (err) return cb(err)
+ if (opts.dereference) {
+ resolvedSrc = path.resolve(process.cwd(), resolvedSrc)
+ }
+
+ if (!destStat) {
+ return fs.symlink(resolvedSrc, dest, cb)
+ } else {
+ fs.readlink(dest, (err, resolvedDest) => {
+ if (err) {
+ // dest exists and is a regular file or directory,
+ // Windows may throw UNKNOWN error. If dest already exists,
+ // fs throws error anyway, so no need to guard against it here.
+ if (err.code === 'EINVAL' || err.code === 'UNKNOWN') return fs.symlink(resolvedSrc, dest, cb)
+ return cb(err)
+ }
+ if (opts.dereference) {
+ resolvedDest = path.resolve(process.cwd(), resolvedDest)
+ }
+ if (stat.isSrcSubdir(resolvedSrc, resolvedDest)) {
+ return cb(new Error(`Cannot copy '${resolvedSrc}' to a subdirectory of itself, '${resolvedDest}'.`))
+ }
+
+ // do not copy if src is a subdir of dest since unlinking
+ // dest in this case would result in removing src contents
+ // and therefore a broken symlink would be created.
+ if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
+ return cb(new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`))
+ }
+ return copyLink(resolvedSrc, dest, cb)
+ })
+ }
+ })
+}
+
+function copyLink (resolvedSrc, dest, cb) {
+ fs.unlink(dest, err => {
+ if (err) return cb(err)
+ return fs.symlink(resolvedSrc, dest, cb)
+ })
+}
+
+module.exports = copy
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js
new file mode 100644
index 0000000..45c07a2
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/copy/index.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ copy: u(require('./copy')),
+ copySync: require('./copy-sync')
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js
new file mode 100644
index 0000000..b4a2e82
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/empty/index.js
@@ -0,0 +1,39 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const remove = require('../remove')
+
+const emptyDir = u(async function emptyDir (dir) {
+ let items
+ try {
+ items = await fs.readdir(dir)
+ } catch {
+ return mkdir.mkdirs(dir)
+ }
+
+ return Promise.all(items.map(item => remove.remove(path.join(dir, item))))
+})
+
+function emptyDirSync (dir) {
+ let items
+ try {
+ items = fs.readdirSync(dir)
+ } catch {
+ return mkdir.mkdirsSync(dir)
+ }
+
+ items.forEach(item => {
+ item = path.join(dir, item)
+ remove.removeSync(item)
+ })
+}
+
+module.exports = {
+ emptyDirSync,
+ emptydirSync: emptyDirSync,
+ emptyDir,
+ emptydir: emptyDir
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js
new file mode 100644
index 0000000..15cc473
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/file.js
@@ -0,0 +1,69 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+
+function createFile (file, callback) {
+ function makeFile () {
+ fs.writeFile(file, '', err => {
+ if (err) return callback(err)
+ callback()
+ })
+ }
+
+ fs.stat(file, (err, stats) => { // eslint-disable-line handle-callback-err
+ if (!err && stats.isFile()) return callback()
+ const dir = path.dirname(file)
+ fs.stat(dir, (err, stats) => {
+ if (err) {
+ // if the directory doesn't exist, make it
+ if (err.code === 'ENOENT') {
+ return mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeFile()
+ })
+ }
+ return callback(err)
+ }
+
+ if (stats.isDirectory()) makeFile()
+ else {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdir(dir, err => {
+ if (err) return callback(err)
+ })
+ }
+ })
+ })
+}
+
+function createFileSync (file) {
+ let stats
+ try {
+ stats = fs.statSync(file)
+ } catch {}
+ if (stats && stats.isFile()) return
+
+ const dir = path.dirname(file)
+ try {
+ if (!fs.statSync(dir).isDirectory()) {
+ // parent is not a directory
+ // This is just to cause an internal ENOTDIR error to be thrown
+ fs.readdirSync(dir)
+ }
+ } catch (err) {
+ // If the stat call above failed because the directory doesn't exist, create it
+ if (err && err.code === 'ENOENT') mkdir.mkdirsSync(dir)
+ else throw err
+ }
+
+ fs.writeFileSync(file, '')
+}
+
+module.exports = {
+ createFile: u(createFile),
+ createFileSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js
new file mode 100644
index 0000000..ecbcdd0
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/index.js
@@ -0,0 +1,23 @@
+'use strict'
+
+const { createFile, createFileSync } = require('./file')
+const { createLink, createLinkSync } = require('./link')
+const { createSymlink, createSymlinkSync } = require('./symlink')
+
+module.exports = {
+ // file
+ createFile,
+ createFileSync,
+ ensureFile: createFile,
+ ensureFileSync: createFileSync,
+ // link
+ createLink,
+ createLinkSync,
+ ensureLink: createLink,
+ ensureLinkSync: createLinkSync,
+ // symlink
+ createSymlink,
+ createSymlinkSync,
+ ensureSymlink: createSymlink,
+ ensureSymlinkSync: createSymlinkSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js
new file mode 100644
index 0000000..f6d6748
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/link.js
@@ -0,0 +1,64 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('graceful-fs')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+const { areIdentical } = require('../util/stat')
+
+function createLink (srcpath, dstpath, callback) {
+ function makeLink (srcpath, dstpath) {
+ fs.link(srcpath, dstpath, err => {
+ if (err) return callback(err)
+ callback(null)
+ })
+ }
+
+ fs.lstat(dstpath, (_, dstStat) => {
+ fs.lstat(srcpath, (err, srcStat) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ return callback(err)
+ }
+ if (dstStat && areIdentical(srcStat, dstStat)) return callback(null)
+
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return makeLink(srcpath, dstpath)
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+ makeLink(srcpath, dstpath)
+ })
+ })
+ })
+ })
+}
+
+function createLinkSync (srcpath, dstpath) {
+ let dstStat
+ try {
+ dstStat = fs.lstatSync(dstpath)
+ } catch {}
+
+ try {
+ const srcStat = fs.lstatSync(srcpath)
+ if (dstStat && areIdentical(srcStat, dstStat)) return
+ } catch (err) {
+ err.message = err.message.replace('lstat', 'ensureLink')
+ throw err
+ }
+
+ const dir = path.dirname(dstpath)
+ const dirExists = fs.existsSync(dir)
+ if (dirExists) return fs.linkSync(srcpath, dstpath)
+ mkdir.mkdirsSync(dir)
+
+ return fs.linkSync(srcpath, dstpath)
+}
+
+module.exports = {
+ createLink: u(createLink),
+ createLinkSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js
new file mode 100644
index 0000000..33cd760
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-paths.js
@@ -0,0 +1,99 @@
+'use strict'
+
+const path = require('path')
+const fs = require('graceful-fs')
+const pathExists = require('../path-exists').pathExists
+
+/**
+ * Function that returns two types of paths, one relative to symlink, and one
+ * relative to the current working directory. Checks if path is absolute or
+ * relative. If the path is relative, this function checks if the path is
+ * relative to symlink or relative to current working directory. This is an
+ * initiative to find a smarter `srcpath` to supply when building symlinks.
+ * This allows you to determine which path to use out of one of three possible
+ * types of source paths. The first is an absolute path. This is detected by
+ * `path.isAbsolute()`. When an absolute path is provided, it is checked to
+ * see if it exists. If it does it's used, if not an error is returned
+ * (callback)/ thrown (sync). The other two options for `srcpath` are a
+ * relative url. By default Node's `fs.symlink` works by creating a symlink
+ * using `dstpath` and expects the `srcpath` to be relative to the newly
+ * created symlink. If you provide a `srcpath` that does not exist on the file
+ * system it results in a broken symlink. To minimize this, the function
+ * checks to see if the 'relative to symlink' source file exists, and if it
+ * does it will use it. If it does not, it checks if there's a file that
+ * exists that is relative to the current working directory, if does its used.
+ * This preserves the expectations of the original fs.symlink spec and adds
+ * the ability to pass in `relative to current working direcotry` paths.
+ */
+
+function symlinkPaths (srcpath, dstpath, callback) {
+ if (path.isAbsolute(srcpath)) {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: srcpath
+ })
+ })
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ return pathExists(relativeToDst, (err, exists) => {
+ if (err) return callback(err)
+ if (exists) {
+ return callback(null, {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ })
+ } else {
+ return fs.lstat(srcpath, (err) => {
+ if (err) {
+ err.message = err.message.replace('lstat', 'ensureSymlink')
+ return callback(err)
+ }
+ return callback(null, {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ })
+ })
+ }
+ })
+ }
+}
+
+function symlinkPathsSync (srcpath, dstpath) {
+ let exists
+ if (path.isAbsolute(srcpath)) {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('absolute srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: srcpath
+ }
+ } else {
+ const dstdir = path.dirname(dstpath)
+ const relativeToDst = path.join(dstdir, srcpath)
+ exists = fs.existsSync(relativeToDst)
+ if (exists) {
+ return {
+ toCwd: relativeToDst,
+ toDst: srcpath
+ }
+ } else {
+ exists = fs.existsSync(srcpath)
+ if (!exists) throw new Error('relative srcpath does not exist')
+ return {
+ toCwd: srcpath,
+ toDst: path.relative(dstdir, srcpath)
+ }
+ }
+ }
+}
+
+module.exports = {
+ symlinkPaths,
+ symlinkPathsSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js
new file mode 100644
index 0000000..42dc0ce
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink-type.js
@@ -0,0 +1,31 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function symlinkType (srcpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+ if (type) return callback(null, type)
+ fs.lstat(srcpath, (err, stats) => {
+ if (err) return callback(null, 'file')
+ type = (stats && stats.isDirectory()) ? 'dir' : 'file'
+ callback(null, type)
+ })
+}
+
+function symlinkTypeSync (srcpath, type) {
+ let stats
+
+ if (type) return type
+ try {
+ stats = fs.lstatSync(srcpath)
+ } catch {
+ return 'file'
+ }
+ return (stats && stats.isDirectory()) ? 'dir' : 'file'
+}
+
+module.exports = {
+ symlinkType,
+ symlinkTypeSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js
new file mode 100644
index 0000000..2b93052
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/ensure/symlink.js
@@ -0,0 +1,82 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const path = require('path')
+const fs = require('../fs')
+const _mkdirs = require('../mkdirs')
+const mkdirs = _mkdirs.mkdirs
+const mkdirsSync = _mkdirs.mkdirsSync
+
+const _symlinkPaths = require('./symlink-paths')
+const symlinkPaths = _symlinkPaths.symlinkPaths
+const symlinkPathsSync = _symlinkPaths.symlinkPathsSync
+
+const _symlinkType = require('./symlink-type')
+const symlinkType = _symlinkType.symlinkType
+const symlinkTypeSync = _symlinkType.symlinkTypeSync
+
+const pathExists = require('../path-exists').pathExists
+
+const { areIdentical } = require('../util/stat')
+
+function createSymlink (srcpath, dstpath, type, callback) {
+ callback = (typeof type === 'function') ? type : callback
+ type = (typeof type === 'function') ? false : type
+
+ fs.lstat(dstpath, (err, stats) => {
+ if (!err && stats.isSymbolicLink()) {
+ Promise.all([
+ fs.stat(srcpath),
+ fs.stat(dstpath)
+ ]).then(([srcStat, dstStat]) => {
+ if (areIdentical(srcStat, dstStat)) return callback(null)
+ _createSymlink(srcpath, dstpath, type, callback)
+ })
+ } else _createSymlink(srcpath, dstpath, type, callback)
+ })
+}
+
+function _createSymlink (srcpath, dstpath, type, callback) {
+ symlinkPaths(srcpath, dstpath, (err, relative) => {
+ if (err) return callback(err)
+ srcpath = relative.toDst
+ symlinkType(relative.toCwd, type, (err, type) => {
+ if (err) return callback(err)
+ const dir = path.dirname(dstpath)
+ pathExists(dir, (err, dirExists) => {
+ if (err) return callback(err)
+ if (dirExists) return fs.symlink(srcpath, dstpath, type, callback)
+ mkdirs(dir, err => {
+ if (err) return callback(err)
+ fs.symlink(srcpath, dstpath, type, callback)
+ })
+ })
+ })
+ })
+}
+
+function createSymlinkSync (srcpath, dstpath, type) {
+ let stats
+ try {
+ stats = fs.lstatSync(dstpath)
+ } catch {}
+ if (stats && stats.isSymbolicLink()) {
+ const srcStat = fs.statSync(srcpath)
+ const dstStat = fs.statSync(dstpath)
+ if (areIdentical(srcStat, dstStat)) return
+ }
+
+ const relative = symlinkPathsSync(srcpath, dstpath)
+ srcpath = relative.toDst
+ type = symlinkTypeSync(relative.toCwd, type)
+ const dir = path.dirname(dstpath)
+ const exists = fs.existsSync(dir)
+ if (exists) return fs.symlinkSync(srcpath, dstpath, type)
+ mkdirsSync(dir)
+ return fs.symlinkSync(srcpath, dstpath, type)
+}
+
+module.exports = {
+ createSymlink: u(createSymlink),
+ createSymlinkSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/esm.mjs b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/esm.mjs
new file mode 100644
index 0000000..27b7a1f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/esm.mjs
@@ -0,0 +1,68 @@
+import _copy from './copy/index.js'
+import _empty from './empty/index.js'
+import _ensure from './ensure/index.js'
+import _json from './json/index.js'
+import _mkdirs from './mkdirs/index.js'
+import _move from './move/index.js'
+import _outputFile from './output-file/index.js'
+import _pathExists from './path-exists/index.js'
+import _remove from './remove/index.js'
+
+// NOTE: Only exports fs-extra's functions; fs functions must be imported from "node:fs" or "node:fs/promises"
+
+export const copy = _copy.copy
+export const copySync = _copy.copySync
+export const emptyDirSync = _empty.emptyDirSync
+export const emptydirSync = _empty.emptydirSync
+export const emptyDir = _empty.emptyDir
+export const emptydir = _empty.emptydir
+export const createFile = _ensure.createFile
+export const createFileSync = _ensure.createFileSync
+export const ensureFile = _ensure.ensureFile
+export const ensureFileSync = _ensure.ensureFileSync
+export const createLink = _ensure.createLink
+export const createLinkSync = _ensure.createLinkSync
+export const ensureLink = _ensure.ensureLink
+export const ensureLinkSync = _ensure.ensureLinkSync
+export const createSymlink = _ensure.createSymlink
+export const createSymlinkSync = _ensure.createSymlinkSync
+export const ensureSymlink = _ensure.ensureSymlink
+export const ensureSymlinkSync = _ensure.ensureSymlinkSync
+export const readJson = _json.readJson
+export const readJSON = _json.readJSON
+export const readJsonSync = _json.readJsonSync
+export const readJSONSync = _json.readJSONSync
+export const writeJson = _json.writeJson
+export const writeJSON = _json.writeJSON
+export const writeJsonSync = _json.writeJsonSync
+export const writeJSONSync = _json.writeJSONSync
+export const outputJson = _json.outputJson
+export const outputJSON = _json.outputJSON
+export const outputJsonSync = _json.outputJsonSync
+export const outputJSONSync = _json.outputJSONSync
+export const mkdirs = _mkdirs.mkdirs
+export const mkdirsSync = _mkdirs.mkdirsSync
+export const mkdirp = _mkdirs.mkdirp
+export const mkdirpSync = _mkdirs.mkdirpSync
+export const ensureDir = _mkdirs.ensureDir
+export const ensureDirSync = _mkdirs.ensureDirSync
+export const move = _move.move
+export const moveSync = _move.moveSync
+export const outputFile = _outputFile.outputFile
+export const outputFileSync = _outputFile.outputFileSync
+export const pathExists = _pathExists.pathExists
+export const pathExistsSync = _pathExists.pathExistsSync
+export const remove = _remove.remove
+export const removeSync = _remove.removeSync
+
+export default {
+ ..._copy,
+ ..._empty,
+ ..._ensure,
+ ..._json,
+ ..._mkdirs,
+ ..._move,
+ ..._outputFile,
+ ..._pathExists,
+ ..._remove
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js
new file mode 100644
index 0000000..3c3ec51
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/fs/index.js
@@ -0,0 +1,140 @@
+'use strict'
+// This is adapted from https://github.com/normalize/mz
+// Copyright (c) 2014-2016 Jonathan Ong me@jongleberry.com and Contributors
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+
+const api = [
+ 'access',
+ 'appendFile',
+ 'chmod',
+ 'chown',
+ 'close',
+ 'copyFile',
+ 'fchmod',
+ 'fchown',
+ 'fdatasync',
+ 'fstat',
+ 'fsync',
+ 'ftruncate',
+ 'futimes',
+ 'lchmod',
+ 'lchown',
+ 'link',
+ 'lstat',
+ 'mkdir',
+ 'mkdtemp',
+ 'open',
+ 'opendir',
+ 'readdir',
+ 'readFile',
+ 'readlink',
+ 'realpath',
+ 'rename',
+ 'rm',
+ 'rmdir',
+ 'stat',
+ 'symlink',
+ 'truncate',
+ 'unlink',
+ 'utimes',
+ 'writeFile'
+].filter(key => {
+ // Some commands are not available on some systems. Ex:
+ // fs.cp was added in Node.js v16.7.0
+ // fs.lchown is not available on at least some Linux
+ return typeof fs[key] === 'function'
+})
+
+// Export cloned fs:
+Object.assign(exports, fs)
+
+// Universalify async methods:
+api.forEach(method => {
+ exports[method] = u(fs[method])
+})
+
+// We differ from mz/fs in that we still ship the old, broken, fs.exists()
+// since we are a drop-in replacement for the native module
+exports.exists = function (filename, callback) {
+ if (typeof callback === 'function') {
+ return fs.exists(filename, callback)
+ }
+ return new Promise(resolve => {
+ return fs.exists(filename, resolve)
+ })
+}
+
+// fs.read(), fs.write(), fs.readv(), & fs.writev() need special treatment due to multiple callback args
+
+exports.read = function (fd, buffer, offset, length, position, callback) {
+ if (typeof callback === 'function') {
+ return fs.read(fd, buffer, offset, length, position, callback)
+ }
+ return new Promise((resolve, reject) => {
+ fs.read(fd, buffer, offset, length, position, (err, bytesRead, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffer })
+ })
+ })
+}
+
+// Function signature can be
+// fs.write(fd, buffer[, offset[, length[, position]]], callback)
+// OR
+// fs.write(fd, string[, position[, encoding]], callback)
+// We need to handle both cases, so we use ...args
+exports.write = function (fd, buffer, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.write(fd, buffer, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.write(fd, buffer, ...args, (err, bytesWritten, buffer) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffer })
+ })
+ })
+}
+
+// Function signature is
+// s.readv(fd, buffers[, position], callback)
+// We need to handle the optional arg, so we use ...args
+exports.readv = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.readv(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.readv(fd, buffers, ...args, (err, bytesRead, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesRead, buffers })
+ })
+ })
+}
+
+// Function signature is
+// s.writev(fd, buffers[, position], callback)
+// We need to handle the optional arg, so we use ...args
+exports.writev = function (fd, buffers, ...args) {
+ if (typeof args[args.length - 1] === 'function') {
+ return fs.writev(fd, buffers, ...args)
+ }
+
+ return new Promise((resolve, reject) => {
+ fs.writev(fd, buffers, ...args, (err, bytesWritten, buffers) => {
+ if (err) return reject(err)
+ resolve({ bytesWritten, buffers })
+ })
+ })
+}
+
+// fs.realpath.native sometimes not available if fs is monkey-patched
+if (typeof fs.realpath.native === 'function') {
+ exports.realpath.native = u(fs.realpath.native)
+} else {
+ process.emitWarning(
+ 'fs.realpath.native is not a function. Is fs being monkey-patched?',
+ 'Warning', 'fs-extra-WARN0003'
+ )
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/index.js
new file mode 100644
index 0000000..da6711a
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+module.exports = {
+ // Export promiseified graceful-fs:
+ ...require('./fs'),
+ // Export extra methods:
+ ...require('./copy'),
+ ...require('./empty'),
+ ...require('./ensure'),
+ ...require('./json'),
+ ...require('./mkdirs'),
+ ...require('./move'),
+ ...require('./output-file'),
+ ...require('./path-exists'),
+ ...require('./remove')
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js
new file mode 100644
index 0000000..900126a
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/index.js
@@ -0,0 +1,16 @@
+'use strict'
+
+const u = require('universalify').fromPromise
+const jsonFile = require('./jsonfile')
+
+jsonFile.outputJson = u(require('./output-json'))
+jsonFile.outputJsonSync = require('./output-json-sync')
+// aliases
+jsonFile.outputJSON = jsonFile.outputJson
+jsonFile.outputJSONSync = jsonFile.outputJsonSync
+jsonFile.writeJSON = jsonFile.writeJson
+jsonFile.writeJSONSync = jsonFile.writeJsonSync
+jsonFile.readJSON = jsonFile.readJson
+jsonFile.readJSONSync = jsonFile.readJsonSync
+
+module.exports = jsonFile
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js
new file mode 100644
index 0000000..f11d34d
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/jsonfile.js
@@ -0,0 +1,11 @@
+'use strict'
+
+const jsonFile = require('jsonfile')
+
+module.exports = {
+ // jsonfile exports
+ readJson: jsonFile.readFile,
+ readJsonSync: jsonFile.readFileSync,
+ writeJson: jsonFile.writeFile,
+ writeJsonSync: jsonFile.writeFileSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js
new file mode 100644
index 0000000..d4e564f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json-sync.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFileSync } = require('../output-file')
+
+function outputJsonSync (file, data, options) {
+ const str = stringify(data, options)
+
+ outputFileSync(file, str, options)
+}
+
+module.exports = outputJsonSync
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js
new file mode 100644
index 0000000..0afdeb6
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/json/output-json.js
@@ -0,0 +1,12 @@
+'use strict'
+
+const { stringify } = require('jsonfile/utils')
+const { outputFile } = require('../output-file')
+
+async function outputJson (file, data, options = {}) {
+ const str = stringify(data, options)
+
+ await outputFile(file, str, options)
+}
+
+module.exports = outputJson
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js
new file mode 100644
index 0000000..9edecee
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/index.js
@@ -0,0 +1,14 @@
+'use strict'
+const u = require('universalify').fromPromise
+const { makeDir: _makeDir, makeDirSync } = require('./make-dir')
+const makeDir = u(_makeDir)
+
+module.exports = {
+ mkdirs: makeDir,
+ mkdirsSync: makeDirSync,
+ // alias
+ mkdirp: makeDir,
+ mkdirpSync: makeDirSync,
+ ensureDir: makeDir,
+ ensureDirSync: makeDirSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js
new file mode 100644
index 0000000..45ece64
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/make-dir.js
@@ -0,0 +1,27 @@
+'use strict'
+const fs = require('../fs')
+const { checkPath } = require('./utils')
+
+const getMode = options => {
+ const defaults = { mode: 0o777 }
+ if (typeof options === 'number') return options
+ return ({ ...defaults, ...options }).mode
+}
+
+module.exports.makeDir = async (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdir(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
+
+module.exports.makeDirSync = (dir, options) => {
+ checkPath(dir)
+
+ return fs.mkdirSync(dir, {
+ mode: getMode(options),
+ recursive: true
+ })
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js
new file mode 100644
index 0000000..a4059ad
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/mkdirs/utils.js
@@ -0,0 +1,21 @@
+// Adapted from https://github.com/sindresorhus/make-dir
+// Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com)
+// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+'use strict'
+const path = require('path')
+
+// https://github.com/nodejs/node/issues/8987
+// https://github.com/libuv/libuv/pull/1088
+module.exports.checkPath = function checkPath (pth) {
+ if (process.platform === 'win32') {
+ const pathHasInvalidWinCharacters = /[<>:"|?*]/.test(pth.replace(path.parse(pth).root, ''))
+
+ if (pathHasInvalidWinCharacters) {
+ const error = new Error(`Path contains invalid characters: ${pth}`)
+ error.code = 'EINVAL'
+ throw error
+ }
+ }
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js
new file mode 100644
index 0000000..fcee73c
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/index.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+module.exports = {
+ move: u(require('./move')),
+ moveSync: require('./move-sync')
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js
new file mode 100644
index 0000000..c456ab3
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move-sync.js
@@ -0,0 +1,55 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copySync = require('../copy').copySync
+const removeSync = require('../remove').removeSync
+const mkdirpSync = require('../mkdirs').mkdirpSync
+const stat = require('../util/stat')
+
+function moveSync (src, dest, opts) {
+ opts = opts || {}
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ const { srcStat, isChangingCase = false } = stat.checkPathsSync(src, dest, 'move', opts)
+ stat.checkParentPathsSync(src, srcStat, dest, 'move')
+ if (!isParentRoot(dest)) mkdirpSync(path.dirname(dest))
+ return doRename(src, dest, overwrite, isChangingCase)
+}
+
+function isParentRoot (dest) {
+ const parent = path.dirname(dest)
+ const parsedPath = path.parse(parent)
+ return parsedPath.root === parent
+}
+
+function doRename (src, dest, overwrite, isChangingCase) {
+ if (isChangingCase) return rename(src, dest, overwrite)
+ if (overwrite) {
+ removeSync(dest)
+ return rename(src, dest, overwrite)
+ }
+ if (fs.existsSync(dest)) throw new Error('dest already exists.')
+ return rename(src, dest, overwrite)
+}
+
+function rename (src, dest, overwrite) {
+ try {
+ fs.renameSync(src, dest)
+ } catch (err) {
+ if (err.code !== 'EXDEV') throw err
+ return moveAcrossDevice(src, dest, overwrite)
+ }
+}
+
+function moveAcrossDevice (src, dest, overwrite) {
+ const opts = {
+ overwrite,
+ errorOnExist: true,
+ preserveTimestamps: true
+ }
+ copySync(src, dest, opts)
+ return removeSync(src)
+}
+
+module.exports = moveSync
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js
new file mode 100644
index 0000000..5c4d74f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/move/move.js
@@ -0,0 +1,76 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const path = require('path')
+const copy = require('../copy').copy
+const remove = require('../remove').remove
+const mkdirp = require('../mkdirs').mkdirp
+const pathExists = require('../path-exists').pathExists
+const stat = require('../util/stat')
+
+function move (src, dest, opts, cb) {
+ if (typeof opts === 'function') {
+ cb = opts
+ opts = {}
+ }
+
+ opts = opts || {}
+
+ const overwrite = opts.overwrite || opts.clobber || false
+
+ stat.checkPaths(src, dest, 'move', opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, isChangingCase = false } = stats
+ stat.checkParentPaths(src, srcStat, dest, 'move', err => {
+ if (err) return cb(err)
+ if (isParentRoot(dest)) return doRename(src, dest, overwrite, isChangingCase, cb)
+ mkdirp(path.dirname(dest), err => {
+ if (err) return cb(err)
+ return doRename(src, dest, overwrite, isChangingCase, cb)
+ })
+ })
+ })
+}
+
+function isParentRoot (dest) {
+ const parent = path.dirname(dest)
+ const parsedPath = path.parse(parent)
+ return parsedPath.root === parent
+}
+
+function doRename (src, dest, overwrite, isChangingCase, cb) {
+ if (isChangingCase) return rename(src, dest, overwrite, cb)
+ if (overwrite) {
+ return remove(dest, err => {
+ if (err) return cb(err)
+ return rename(src, dest, overwrite, cb)
+ })
+ }
+ pathExists(dest, (err, destExists) => {
+ if (err) return cb(err)
+ if (destExists) return cb(new Error('dest already exists.'))
+ return rename(src, dest, overwrite, cb)
+ })
+}
+
+function rename (src, dest, overwrite, cb) {
+ fs.rename(src, dest, err => {
+ if (!err) return cb()
+ if (err.code !== 'EXDEV') return cb(err)
+ return moveAcrossDevice(src, dest, overwrite, cb)
+ })
+}
+
+function moveAcrossDevice (src, dest, overwrite, cb) {
+ const opts = {
+ overwrite,
+ errorOnExist: true,
+ preserveTimestamps: true
+ }
+ copy(src, dest, opts, err => {
+ if (err) return cb(err)
+ return remove(src, cb)
+ })
+}
+
+module.exports = move
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js
new file mode 100644
index 0000000..92297ca
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/output-file/index.js
@@ -0,0 +1,40 @@
+'use strict'
+
+const u = require('universalify').fromCallback
+const fs = require('graceful-fs')
+const path = require('path')
+const mkdir = require('../mkdirs')
+const pathExists = require('../path-exists').pathExists
+
+function outputFile (file, data, encoding, callback) {
+ if (typeof encoding === 'function') {
+ callback = encoding
+ encoding = 'utf8'
+ }
+
+ const dir = path.dirname(file)
+ pathExists(dir, (err, itDoes) => {
+ if (err) return callback(err)
+ if (itDoes) return fs.writeFile(file, data, encoding, callback)
+
+ mkdir.mkdirs(dir, err => {
+ if (err) return callback(err)
+
+ fs.writeFile(file, data, encoding, callback)
+ })
+ })
+}
+
+function outputFileSync (file, ...args) {
+ const dir = path.dirname(file)
+ if (fs.existsSync(dir)) {
+ return fs.writeFileSync(file, ...args)
+ }
+ mkdir.mkdirsSync(dir)
+ fs.writeFileSync(file, ...args)
+}
+
+module.exports = {
+ outputFile: u(outputFile),
+ outputFileSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js
new file mode 100644
index 0000000..ddd9bc7
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/path-exists/index.js
@@ -0,0 +1,12 @@
+'use strict'
+const u = require('universalify').fromPromise
+const fs = require('../fs')
+
+function pathExists (path) {
+ return fs.access(path).then(() => true).catch(() => false)
+}
+
+module.exports = {
+ pathExists: u(pathExists),
+ pathExistsSync: fs.existsSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js
new file mode 100644
index 0000000..da746c7
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/remove/index.js
@@ -0,0 +1,17 @@
+'use strict'
+
+const fs = require('graceful-fs')
+const u = require('universalify').fromCallback
+
+function remove (path, callback) {
+ fs.rm(path, { recursive: true, force: true }, callback)
+}
+
+function removeSync (path) {
+ fs.rmSync(path, { recursive: true, force: true })
+}
+
+module.exports = {
+ remove: u(remove),
+ removeSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js
new file mode 100644
index 0000000..0ed5aec
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/stat.js
@@ -0,0 +1,154 @@
+'use strict'
+
+const fs = require('../fs')
+const path = require('path')
+const util = require('util')
+
+function getStats (src, dest, opts) {
+ const statFunc = opts.dereference
+ ? (file) => fs.stat(file, { bigint: true })
+ : (file) => fs.lstat(file, { bigint: true })
+ return Promise.all([
+ statFunc(src),
+ statFunc(dest).catch(err => {
+ if (err.code === 'ENOENT') return null
+ throw err
+ })
+ ]).then(([srcStat, destStat]) => ({ srcStat, destStat }))
+}
+
+function getStatsSync (src, dest, opts) {
+ let destStat
+ const statFunc = opts.dereference
+ ? (file) => fs.statSync(file, { bigint: true })
+ : (file) => fs.lstatSync(file, { bigint: true })
+ const srcStat = statFunc(src)
+ try {
+ destStat = statFunc(dest)
+ } catch (err) {
+ if (err.code === 'ENOENT') return { srcStat, destStat: null }
+ throw err
+ }
+ return { srcStat, destStat }
+}
+
+function checkPaths (src, dest, funcName, opts, cb) {
+ util.callbackify(getStats)(src, dest, opts, (err, stats) => {
+ if (err) return cb(err)
+ const { srcStat, destStat } = stats
+
+ if (destStat) {
+ if (areIdentical(srcStat, destStat)) {
+ const srcBaseName = path.basename(src)
+ const destBaseName = path.basename(dest)
+ if (funcName === 'move' &&
+ srcBaseName !== destBaseName &&
+ srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
+ return cb(null, { srcStat, destStat, isChangingCase: true })
+ }
+ return cb(new Error('Source and destination must not be the same.'))
+ }
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`))
+ }
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
+ return cb(new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`))
+ }
+ }
+
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return cb(null, { srcStat, destStat })
+ })
+}
+
+function checkPathsSync (src, dest, funcName, opts) {
+ const { srcStat, destStat } = getStatsSync(src, dest, opts)
+
+ if (destStat) {
+ if (areIdentical(srcStat, destStat)) {
+ const srcBaseName = path.basename(src)
+ const destBaseName = path.basename(dest)
+ if (funcName === 'move' &&
+ srcBaseName !== destBaseName &&
+ srcBaseName.toLowerCase() === destBaseName.toLowerCase()) {
+ return { srcStat, destStat, isChangingCase: true }
+ }
+ throw new Error('Source and destination must not be the same.')
+ }
+ if (srcStat.isDirectory() && !destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite non-directory '${dest}' with directory '${src}'.`)
+ }
+ if (!srcStat.isDirectory() && destStat.isDirectory()) {
+ throw new Error(`Cannot overwrite directory '${dest}' with non-directory '${src}'.`)
+ }
+ }
+
+ if (srcStat.isDirectory() && isSrcSubdir(src, dest)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return { srcStat, destStat }
+}
+
+// recursively check if dest parent is a subdirectory of src.
+// It works for all file types including symlinks since it
+// checks the src and dest inodes. It starts from the deepest
+// parent and stops once it reaches the src parent or the root path.
+function checkParentPaths (src, srcStat, dest, funcName, cb) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return cb()
+ fs.stat(destParent, { bigint: true }, (err, destStat) => {
+ if (err) {
+ if (err.code === 'ENOENT') return cb()
+ return cb(err)
+ }
+ if (areIdentical(srcStat, destStat)) {
+ return cb(new Error(errMsg(src, dest, funcName)))
+ }
+ return checkParentPaths(src, srcStat, destParent, funcName, cb)
+ })
+}
+
+function checkParentPathsSync (src, srcStat, dest, funcName) {
+ const srcParent = path.resolve(path.dirname(src))
+ const destParent = path.resolve(path.dirname(dest))
+ if (destParent === srcParent || destParent === path.parse(destParent).root) return
+ let destStat
+ try {
+ destStat = fs.statSync(destParent, { bigint: true })
+ } catch (err) {
+ if (err.code === 'ENOENT') return
+ throw err
+ }
+ if (areIdentical(srcStat, destStat)) {
+ throw new Error(errMsg(src, dest, funcName))
+ }
+ return checkParentPathsSync(src, srcStat, destParent, funcName)
+}
+
+function areIdentical (srcStat, destStat) {
+ return destStat.ino && destStat.dev && destStat.ino === srcStat.ino && destStat.dev === srcStat.dev
+}
+
+// return true if dest is a subdir of src, otherwise false.
+// It only checks the path strings.
+function isSrcSubdir (src, dest) {
+ const srcArr = path.resolve(src).split(path.sep).filter(i => i)
+ const destArr = path.resolve(dest).split(path.sep).filter(i => i)
+ return srcArr.reduce((acc, cur, i) => acc && destArr[i] === cur, true)
+}
+
+function errMsg (src, dest, funcName) {
+ return `Cannot ${funcName} '${src}' to a subdirectory of itself, '${dest}'.`
+}
+
+module.exports = {
+ checkPaths,
+ checkPathsSync,
+ checkParentPaths,
+ checkParentPathsSync,
+ isSrcSubdir,
+ areIdentical
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js
new file mode 100644
index 0000000..75395de
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/lib/util/utimes.js
@@ -0,0 +1,26 @@
+'use strict'
+
+const fs = require('graceful-fs')
+
+function utimesMillis (path, atime, mtime, callback) {
+ // if (!HAS_MILLIS_RES) return fs.utimes(path, atime, mtime, callback)
+ fs.open(path, 'r+', (err, fd) => {
+ if (err) return callback(err)
+ fs.futimes(fd, atime, mtime, futimesErr => {
+ fs.close(fd, closeErr => {
+ if (callback) callback(futimesErr || closeErr)
+ })
+ })
+ })
+}
+
+function utimesMillisSync (path, atime, mtime) {
+ const fd = fs.openSync(path, 'r+')
+ fs.futimesSync(fd, atime, mtime)
+ return fs.closeSync(fd)
+}
+
+module.exports = {
+ utimesMillis,
+ utimesMillisSync
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/fs-extra/package.json b/desktop/node_modules/electron-packager/node_modules/fs-extra/package.json
new file mode 100644
index 0000000..c8bfb8f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/fs-extra/package.json
@@ -0,0 +1,71 @@
+{
+ "name": "fs-extra",
+ "version": "11.1.1",
+ "description": "fs-extra contains methods that aren't included in the vanilla Node.js fs package. Such as recursive mkdir, copy, and remove.",
+ "engines": {
+ "node": ">=14.14"
+ },
+ "homepage": "https://github.com/jprichardson/node-fs-extra",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/jprichardson/node-fs-extra"
+ },
+ "keywords": [
+ "fs",
+ "file",
+ "file system",
+ "copy",
+ "directory",
+ "extra",
+ "mkdirp",
+ "mkdir",
+ "mkdirs",
+ "recursive",
+ "json",
+ "read",
+ "write",
+ "extra",
+ "delete",
+ "remove",
+ "touch",
+ "create",
+ "text",
+ "output",
+ "move",
+ "promise"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "graceful-fs": "^4.2.0",
+ "jsonfile": "^6.0.1",
+ "universalify": "^2.0.0"
+ },
+ "devDependencies": {
+ "klaw": "^2.1.1",
+ "klaw-sync": "^3.0.2",
+ "minimist": "^1.1.1",
+ "mocha": "^10.1.0",
+ "nyc": "^15.0.0",
+ "proxyquire": "^2.0.1",
+ "read-dir-files": "^0.1.1",
+ "standard": "^17.0.0"
+ },
+ "main": "./lib/index.js",
+ "exports": {
+ ".": "./lib/index.js",
+ "./esm": "./lib/esm.mjs"
+ },
+ "files": [
+ "lib/",
+ "!lib/**/__tests__/"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test-find": "find ./lib/**/__tests__ -name *.test.js | xargs mocha",
+ "test": "npm run lint && npm run unit && npm run unit-esm",
+ "unit": "nyc node test.js",
+ "unit-esm": "node test.mjs"
+ },
+ "sideEffects": false
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md b/desktop/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md
new file mode 100644
index 0000000..d772e43
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/jsonfile/CHANGELOG.md
@@ -0,0 +1,171 @@
+6.1.0 / 2020-10-31
+------------------
+
+- Add `finalEOL` option to disable writing final EOL ([#115](https://github.com/jprichardson/node-jsonfile/issues/115), [#137](https://github.com/jprichardson/node-jsonfile/pull/137))
+- Update dependency ([#138](https://github.com/jprichardson/node-jsonfile/pull/138))
+
+6.0.1 / 2020-03-07
+------------------
+
+- Update dependency ([#130](https://github.com/jprichardson/node-jsonfile/pull/130))
+- Fix code style ([#129](https://github.com/jprichardson/node-jsonfile/pull/129))
+
+6.0.0 / 2020-02-24
+------------------
+
+- **BREAKING:** Drop support for Node 6 & 8 ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- **BREAKING:** Do not allow passing `null` as options to `readFile()` or `writeFile()` ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+- Refactor internals ([#128](https://github.com/jprichardson/node-jsonfile/pull/128))
+
+5.0.0 / 2018-09-08
+------------------
+
+- **BREAKING:** Drop Node 4 support
+- **BREAKING:** If no callback is passed to an asynchronous method, a promise is now returned ([#109](https://github.com/jprichardson/node-jsonfile/pull/109))
+- Cleanup docs
+
+4.0.0 / 2017-07-12
+------------------
+
+- **BREAKING:** Remove global `spaces` option.
+- **BREAKING:** Drop support for Node 0.10, 0.12, and io.js.
+- Remove undocumented `passParsingErrors` option.
+- Added `EOL` override option to `writeFile` when using `spaces`. [#89]
+
+3.0.1 / 2017-07-05
+------------------
+
+- Fixed bug in `writeFile` when there was a serialization error & no callback was passed. In previous versions, an empty file would be written; now no file is written.
+
+3.0.0 / 2017-04-25
+------------------
+
+- Changed behavior of `throws` option for `readFileSync`; now does not throw filesystem errors when `throws` is `false`
+
+2.4.0 / 2016-09-15
+------------------
+### Changed
+- added optional support for `graceful-fs` [#62]
+
+2.3.1 / 2016-05-13
+------------------
+- fix to support BOM. [#45][#45]
+
+2.3.0 / 2016-04-16
+------------------
+- add `throws` to `readFile()`. See [#39][#39]
+- add support for any arbitrary `fs` module. Useful with [mock-fs](https://www.npmjs.com/package/mock-fs)
+
+2.2.3 / 2015-10-14
+------------------
+- include file name in parse error. See: https://github.com/jprichardson/node-jsonfile/pull/34
+
+2.2.2 / 2015-09-16
+------------------
+- split out tests into separate files
+- fixed `throws` when set to `true` in `readFileSync()`. See: https://github.com/jprichardson/node-jsonfile/pull/33
+
+2.2.1 / 2015-06-25
+------------------
+- fixed regression when passing in string as encoding for options in `writeFile()` and `writeFileSync()`. See: https://github.com/jprichardson/node-jsonfile/issues/28
+
+2.2.0 / 2015-06-25
+------------------
+- added `options.spaces` to `writeFile()` and `writeFileSync()`
+
+2.1.2 / 2015-06-22
+------------------
+- fixed if passed `readFileSync(file, 'utf8')`. See: https://github.com/jprichardson/node-jsonfile/issues/25
+
+2.1.1 / 2015-06-19
+------------------
+- fixed regressions if `null` is passed for options. See: https://github.com/jprichardson/node-jsonfile/issues/24
+
+2.1.0 / 2015-06-19
+------------------
+- cleanup: JavaScript Standard Style, rename files, dropped terst for assert
+- methods now support JSON revivers/replacers
+
+2.0.1 / 2015-05-24
+------------------
+- update license attribute https://github.com/jprichardson/node-jsonfile/pull/21
+
+2.0.0 / 2014-07-28
+------------------
+* added `\n` to end of file on write. [#14](https://github.com/jprichardson/node-jsonfile/pull/14)
+* added `options.throws` to `readFileSync()`
+* dropped support for Node v0.8
+
+1.2.0 / 2014-06-29
+------------------
+* removed semicolons
+* bugfix: passed `options` to `fs.readFile` and `fs.readFileSync`. This technically changes behavior, but
+changes it according to docs. [#12][#12]
+
+1.1.1 / 2013-11-11
+------------------
+* fixed catching of callback bug (ffissore / #5)
+
+1.1.0 / 2013-10-11
+------------------
+* added `options` param to methods, (seanodell / #4)
+
+1.0.1 / 2013-09-05
+------------------
+* removed `homepage` field from package.json to remove NPM warning
+
+1.0.0 / 2013-06-28
+------------------
+* added `.npmignore`, #1
+* changed spacing default from `4` to `2` to follow Node conventions
+
+0.0.1 / 2012-09-10
+------------------
+* Initial release.
+
+[#89]: https://github.com/jprichardson/node-jsonfile/pull/89
+[#45]: https://github.com/jprichardson/node-jsonfile/issues/45 "Reading of UTF8-encoded (w/ BOM) files fails"
+[#44]: https://github.com/jprichardson/node-jsonfile/issues/44 "Extra characters in written file"
+[#43]: https://github.com/jprichardson/node-jsonfile/issues/43 "Prettyfy json when written to file"
+[#42]: https://github.com/jprichardson/node-jsonfile/pull/42 "Moved fs.readFileSync within the try/catch"
+[#41]: https://github.com/jprichardson/node-jsonfile/issues/41 "Linux: Hidden file not working"
+[#40]: https://github.com/jprichardson/node-jsonfile/issues/40 "autocreate folder doesn't work from Path-value"
+[#39]: https://github.com/jprichardson/node-jsonfile/pull/39 "Add `throws` option for readFile (async)"
+[#38]: https://github.com/jprichardson/node-jsonfile/pull/38 "Update README.md writeFile[Sync] signature"
+[#37]: https://github.com/jprichardson/node-jsonfile/pull/37 "support append file"
+[#36]: https://github.com/jprichardson/node-jsonfile/pull/36 "Add typescript definition file."
+[#35]: https://github.com/jprichardson/node-jsonfile/pull/35 "Add typescript definition file."
+[#34]: https://github.com/jprichardson/node-jsonfile/pull/34 "readFile JSON parse error includes filename"
+[#33]: https://github.com/jprichardson/node-jsonfile/pull/33 "fix throw->throws typo in readFileSync()"
+[#32]: https://github.com/jprichardson/node-jsonfile/issues/32 "readFile & readFileSync can possible have strip-comments as an option?"
+[#31]: https://github.com/jprichardson/node-jsonfile/pull/31 "[Modify] Support string include is unicode escape string"
+[#30]: https://github.com/jprichardson/node-jsonfile/issues/30 "How to use Jsonfile package in Meteor.js App?"
+[#29]: https://github.com/jprichardson/node-jsonfile/issues/29 "writefile callback if no error?"
+[#28]: https://github.com/jprichardson/node-jsonfile/issues/28 "writeFile options argument broken "
+[#27]: https://github.com/jprichardson/node-jsonfile/pull/27 "Use svg instead of png to get better image quality"
+[#26]: https://github.com/jprichardson/node-jsonfile/issues/26 "Breaking change to fs-extra"
+[#25]: https://github.com/jprichardson/node-jsonfile/issues/25 "support string encoding param for read methods"
+[#24]: https://github.com/jprichardson/node-jsonfile/issues/24 "readFile: Passing in null options with a callback throws an error"
+[#23]: https://github.com/jprichardson/node-jsonfile/pull/23 "Add appendFile and appendFileSync"
+[#22]: https://github.com/jprichardson/node-jsonfile/issues/22 "Default value for spaces in readme.md is outdated"
+[#21]: https://github.com/jprichardson/node-jsonfile/pull/21 "Update license attribute"
+[#20]: https://github.com/jprichardson/node-jsonfile/issues/20 "Add simple caching functionallity"
+[#19]: https://github.com/jprichardson/node-jsonfile/pull/19 "Add appendFileSync method"
+[#18]: https://github.com/jprichardson/node-jsonfile/issues/18 "Add updateFile and updateFileSync methods"
+[#17]: https://github.com/jprichardson/node-jsonfile/issues/17 "seem read & write sync has sequentially problem"
+[#16]: https://github.com/jprichardson/node-jsonfile/pull/16 "export spaces defaulted to null"
+[#15]: https://github.com/jprichardson/node-jsonfile/issues/15 "`jsonfile.spaces` should default to `null`"
+[#14]: https://github.com/jprichardson/node-jsonfile/pull/14 "Add EOL at EOF"
+[#13]: https://github.com/jprichardson/node-jsonfile/issues/13 "Add a final newline"
+[#12]: https://github.com/jprichardson/node-jsonfile/issues/12 "readFile doesn't accept options"
+[#11]: https://github.com/jprichardson/node-jsonfile/pull/11 "Added try,catch to readFileSync"
+[#10]: https://github.com/jprichardson/node-jsonfile/issues/10 "No output or error from writeFile"
+[#9]: https://github.com/jprichardson/node-jsonfile/pull/9 "Change 'js' to 'jf' in example."
+[#8]: https://github.com/jprichardson/node-jsonfile/pull/8 "Updated forgotten module.exports to me."
+[#7]: https://github.com/jprichardson/node-jsonfile/pull/7 "Add file name in error message"
+[#6]: https://github.com/jprichardson/node-jsonfile/pull/6 "Use graceful-fs when possible"
+[#5]: https://github.com/jprichardson/node-jsonfile/pull/5 "Jsonfile doesn't behave nicely when used inside a test suite."
+[#4]: https://github.com/jprichardson/node-jsonfile/pull/4 "Added options parameter to writeFile and writeFileSync"
+[#3]: https://github.com/jprichardson/node-jsonfile/issues/3 "test2"
+[#2]: https://github.com/jprichardson/node-jsonfile/issues/2 "homepage field must be a string url. Deleted."
+[#1]: https://github.com/jprichardson/node-jsonfile/pull/1 "adding an `.npmignore` file"
diff --git a/desktop/node_modules/electron-packager/node_modules/jsonfile/LICENSE b/desktop/node_modules/electron-packager/node_modules/jsonfile/LICENSE
new file mode 100644
index 0000000..cb7e807
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/jsonfile/LICENSE
@@ -0,0 +1,15 @@
+(The MIT License)
+
+Copyright (c) 2012-2015, JP Richardson <jprichardson@gmail.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files
+(the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify,
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
+OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/desktop/node_modules/electron-packager/node_modules/jsonfile/README.md b/desktop/node_modules/electron-packager/node_modules/jsonfile/README.md
new file mode 100644
index 0000000..910cde0
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/jsonfile/README.md
@@ -0,0 +1,230 @@
+Node.js - jsonfile
+================
+
+Easily read/write JSON files in Node.js. _Note: this module cannot be used in the browser._
+
+[![npm Package](https://img.shields.io/npm/v/jsonfile.svg?style=flat-square)](https://www.npmjs.org/package/jsonfile)
+[![build status](https://secure.travis-ci.org/jprichardson/node-jsonfile.svg)](http://travis-ci.org/jprichardson/node-jsonfile)
+[![windows Build status](https://img.shields.io/appveyor/ci/jprichardson/node-jsonfile/master.svg?label=windows%20build)](https://ci.appveyor.com/project/jprichardson/node-jsonfile/branch/master)
+
+<a href="https://github.com/feross/standard"><img src="https://cdn.rawgit.com/feross/standard/master/sticker.svg" alt="Standard JavaScript" width="100"></a>
+
+Why?
+----
+
+Writing `JSON.stringify()` and then `fs.writeFile()` and `JSON.parse()` with `fs.readFile()` enclosed in `try/catch` blocks became annoying.
+
+
+
+Installation
+------------
+
+ npm install --save jsonfile
+
+
+
+API
+---
+
+* [`readFile(filename, [options], callback)`](#readfilefilename-options-callback)
+* [`readFileSync(filename, [options])`](#readfilesyncfilename-options)
+* [`writeFile(filename, obj, [options], callback)`](#writefilefilename-obj-options-callback)
+* [`writeFileSync(filename, obj, [options])`](#writefilesyncfilename-obj-options)
+
+----
+
+### readFile(filename, [options], callback)
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFile`](https://nodejs.org/api/fs.html#fs_fs_readfile_path_options_callback) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+ - `throws` (`boolean`, default: `true`). If `JSON.parse` throws an error, pass this error to the callback.
+ If `false`, returns `null` for the object.
+
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file, function (err, obj) {
+ if (err) console.error(err)
+ console.dir(obj)
+})
+```
+
+You can also use this method with promises. The `readFile` method will return a promise if you do not pass a callback function.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+jsonfile.readFile(file)
+ .then(obj => console.dir(obj))
+ .catch(error => console.error(error))
+```
+
+----
+
+### readFileSync(filename, [options])
+
+`options` (`object`, default `undefined`): Pass in any [`fs.readFileSync`](https://nodejs.org/api/fs.html#fs_fs_readfilesync_path_options) options or set `reviver` for a [JSON reviver](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse).
+- `throws` (`boolean`, default: `true`). If an error is encountered reading or parsing the file, throw the error. If `false`, returns `null` for the object.
+
+```js
+const jsonfile = require('jsonfile')
+const file = '/tmp/data.json'
+
+console.dir(jsonfile.readFileSync(file))
+```
+
+----
+
+### writeFile(filename, obj, [options], callback)
+
+`options`: Pass in any [`fs.writeFile`](https://nodejs.org/api/fs.html#fs_fs_writefile_file_data_options_callback) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, function (err) {
+ if (err) console.error(err)
+})
+```
+Or use with promises as follows:
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj)
+ .then(res => {
+ console.log('Write complete')
+ })
+ .catch(error => console.error(error))
+```
+
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2 }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, EOL: '\r\n' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { spaces: 2, finalEOL: false }, function (err) {
+ if (err) console.log(err)
+})
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFile` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFile(file, obj, { flag: 'a' }, function (err) {
+ if (err) console.error(err)
+})
+```
+
+----
+
+### writeFileSync(filename, obj, [options])
+
+`options`: Pass in any [`fs.writeFileSync`](https://nodejs.org/api/fs.html#fs_fs_writefilesync_file_data_options) options or set `replacer` for a [JSON replacer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify). Can also pass in `spaces`, or override `EOL` string or set `finalEOL` flag as `false` to not save the file with `EOL` at the end.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj)
+```
+
+**formatting with spaces:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2 })
+```
+
+**overriding EOL:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, EOL: '\r\n' })
+```
+
+**disabling the EOL at the end of file:**
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/data.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { spaces: 2, finalEOL: false })
+```
+
+**appending to an existing JSON file:**
+
+You can use `fs.writeFileSync` option `{ flag: 'a' }` to achieve this.
+
+```js
+const jsonfile = require('jsonfile')
+
+const file = '/tmp/mayAlreadyExistedData.json'
+const obj = { name: 'JP' }
+
+jsonfile.writeFileSync(file, obj, { flag: 'a' })
+```
+
+License
+-------
+
+(MIT License)
+
+Copyright 2012-2016, JP Richardson <jprichardson@gmail.com>
diff --git a/desktop/node_modules/electron-packager/node_modules/jsonfile/index.js b/desktop/node_modules/electron-packager/node_modules/jsonfile/index.js
new file mode 100644
index 0000000..0582868
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/jsonfile/index.js
@@ -0,0 +1,88 @@
+let _fs
+try {
+ _fs = require('graceful-fs')
+} catch (_) {
+ _fs = require('fs')
+}
+const universalify = require('universalify')
+const { stringify, stripBom } = require('./utils')
+
+async function _readFile (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ let data = await universalify.fromCallback(fs.readFile)(file, options)
+
+ data = stripBom(data)
+
+ let obj
+ try {
+ obj = JSON.parse(data, options ? options.reviver : null)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+
+ return obj
+}
+
+const readFile = universalify.fromPromise(_readFile)
+
+function readFileSync (file, options = {}) {
+ if (typeof options === 'string') {
+ options = { encoding: options }
+ }
+
+ const fs = options.fs || _fs
+
+ const shouldThrow = 'throws' in options ? options.throws : true
+
+ try {
+ let content = fs.readFileSync(file, options)
+ content = stripBom(content)
+ return JSON.parse(content, options.reviver)
+ } catch (err) {
+ if (shouldThrow) {
+ err.message = `${file}: ${err.message}`
+ throw err
+ } else {
+ return null
+ }
+ }
+}
+
+async function _writeFile (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+
+ await universalify.fromCallback(fs.writeFile)(file, str, options)
+}
+
+const writeFile = universalify.fromPromise(_writeFile)
+
+function writeFileSync (file, obj, options = {}) {
+ const fs = options.fs || _fs
+
+ const str = stringify(obj, options)
+ // not sure if fs.writeFileSync returns anything, but just in case
+ return fs.writeFileSync(file, str, options)
+}
+
+const jsonfile = {
+ readFile,
+ readFileSync,
+ writeFile,
+ writeFileSync
+}
+
+module.exports = jsonfile
diff --git a/desktop/node_modules/electron-packager/node_modules/jsonfile/package.json b/desktop/node_modules/electron-packager/node_modules/jsonfile/package.json
new file mode 100644
index 0000000..4d01eb1
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/jsonfile/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "jsonfile",
+ "version": "6.1.0",
+ "description": "Easily read/write JSON files.",
+ "repository": {
+ "type": "git",
+ "url": "git@github.com:jprichardson/node-jsonfile.git"
+ },
+ "keywords": [
+ "read",
+ "write",
+ "file",
+ "json",
+ "fs",
+ "fs-extra"
+ ],
+ "author": "JP Richardson <jprichardson@gmail.com>",
+ "license": "MIT",
+ "dependencies": {
+ "universalify": "^2.0.0"
+ },
+ "optionalDependencies": {
+ "graceful-fs": "^4.1.6"
+ },
+ "devDependencies": {
+ "mocha": "^8.2.0",
+ "rimraf": "^2.4.0",
+ "standard": "^16.0.1"
+ },
+ "main": "index.js",
+ "files": [
+ "index.js",
+ "utils.js"
+ ],
+ "scripts": {
+ "lint": "standard",
+ "test": "npm run lint && npm run unit",
+ "unit": "mocha"
+ }
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/jsonfile/utils.js b/desktop/node_modules/electron-packager/node_modules/jsonfile/utils.js
new file mode 100644
index 0000000..b5ff48e
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/jsonfile/utils.js
@@ -0,0 +1,14 @@
+function stringify (obj, { EOL = '\n', finalEOL = true, replacer = null, spaces } = {}) {
+ const EOF = finalEOL ? EOL : ''
+ const str = JSON.stringify(obj, replacer, spaces)
+
+ return str.replace(/\n/g, EOL) + EOF
+}
+
+function stripBom (content) {
+ // we do this because JSON.parse would convert it to a utf8 string if encoding wasn't specified
+ if (Buffer.isBuffer(content)) content = content.toString('utf8')
+ return content.replace(/^\uFEFF/, '')
+}
+
+module.exports = { stringify, stripBom }
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/LICENSE b/desktop/node_modules/electron-packager/node_modules/semver/LICENSE
new file mode 100644
index 0000000..19129e3
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/LICENSE
@@ -0,0 +1,15 @@
+The ISC License
+
+Copyright (c) Isaac Z. Schlueter and Contributors
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
+IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/README.md b/desktop/node_modules/electron-packager/node_modules/semver/README.md
new file mode 100644
index 0000000..53ea9b5
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/README.md
@@ -0,0 +1,637 @@
+semver(1) -- The semantic versioner for npm
+===========================================
+
+## Install
+
+```bash
+npm install semver
+````
+
+## Usage
+
+As a node module:
+
+```js
+const semver = require('semver')
+
+semver.valid('1.2.3') // '1.2.3'
+semver.valid('a.b.c') // null
+semver.clean(' =v1.2.3 ') // '1.2.3'
+semver.satisfies('1.2.3', '1.x || >=2.5.0 || 5.0.0 - 7.2.3') // true
+semver.gt('1.2.3', '9.8.7') // false
+semver.lt('1.2.3', '9.8.7') // true
+semver.minVersion('>=1.0.0') // '1.0.0'
+semver.valid(semver.coerce('v2')) // '2.0.0'
+semver.valid(semver.coerce('42.6.7.9.3-alpha')) // '42.6.7'
+```
+
+You can also just load the module for the function that you care about, if
+you'd like to minimize your footprint.
+
+```js
+// load the whole API at once in a single object
+const semver = require('semver')
+
+// or just load the bits you need
+// all of them listed here, just pick and choose what you want
+
+// classes
+const SemVer = require('semver/classes/semver')
+const Comparator = require('semver/classes/comparator')
+const Range = require('semver/classes/range')
+
+// functions for working with versions
+const semverParse = require('semver/functions/parse')
+const semverValid = require('semver/functions/valid')
+const semverClean = require('semver/functions/clean')
+const semverInc = require('semver/functions/inc')
+const semverDiff = require('semver/functions/diff')
+const semverMajor = require('semver/functions/major')
+const semverMinor = require('semver/functions/minor')
+const semverPatch = require('semver/functions/patch')
+const semverPrerelease = require('semver/functions/prerelease')
+const semverCompare = require('semver/functions/compare')
+const semverRcompare = require('semver/functions/rcompare')
+const semverCompareLoose = require('semver/functions/compare-loose')
+const semverCompareBuild = require('semver/functions/compare-build')
+const semverSort = require('semver/functions/sort')
+const semverRsort = require('semver/functions/rsort')
+
+// low-level comparators between versions
+const semverGt = require('semver/functions/gt')
+const semverLt = require('semver/functions/lt')
+const semverEq = require('semver/functions/eq')
+const semverNeq = require('semver/functions/neq')
+const semverGte = require('semver/functions/gte')
+const semverLte = require('semver/functions/lte')
+const semverCmp = require('semver/functions/cmp')
+const semverCoerce = require('semver/functions/coerce')
+
+// working with ranges
+const semverSatisfies = require('semver/functions/satisfies')
+const semverMaxSatisfying = require('semver/ranges/max-satisfying')
+const semverMinSatisfying = require('semver/ranges/min-satisfying')
+const semverToComparators = require('semver/ranges/to-comparators')
+const semverMinVersion = require('semver/ranges/min-version')
+const semverValidRange = require('semver/ranges/valid')
+const semverOutside = require('semver/ranges/outside')
+const semverGtr = require('semver/ranges/gtr')
+const semverLtr = require('semver/ranges/ltr')
+const semverIntersects = require('semver/ranges/intersects')
+const simplifyRange = require('semver/ranges/simplify')
+const rangeSubset = require('semver/ranges/subset')
+```
+
+As a command-line utility:
+
+```
+$ semver -h
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-n <0|1>
+ This is the base to be used for the prerelease identifier.
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.
+```
+
+## Versions
+
+A "version" is described by the `v2.0.0` specification found at
+<https://semver.org/>.
+
+A leading `"="` or `"v"` character is stripped off and ignored.
+
+## Ranges
+
+A `version range` is a set of `comparators` which specify versions
+that satisfy the range.
+
+A `comparator` is composed of an `operator` and a `version`. The set
+of primitive `operators` is:
+
+* `<` Less than
+* `<=` Less than or equal to
+* `>` Greater than
+* `>=` Greater than or equal to
+* `=` Equal. If no operator is specified, then equality is assumed,
+ so this operator is optional, but MAY be included.
+
+For example, the comparator `>=1.2.7` would match the versions
+`1.2.7`, `1.2.8`, `2.5.3`, and `1.3.9`, but not the versions `1.2.6`
+or `1.1.0`. The comparator `>1` is equivalent to `>=2.0.0` and
+would match the versions `2.0.0` and `3.1.0`, but not the versions
+`1.0.1` or `1.1.0`.
+
+Comparators can be joined by whitespace to form a `comparator set`,
+which is satisfied by the **intersection** of all of the comparators
+it includes.
+
+A range is composed of one or more comparator sets, joined by `||`. A
+version matches a range if and only if every comparator in at least
+one of the `||`-separated comparator sets is satisfied by the version.
+
+For example, the range `>=1.2.7 <1.3.0` would match the versions
+`1.2.7`, `1.2.8`, and `1.2.99`, but not the versions `1.2.6`, `1.3.0`,
+or `1.1.0`.
+
+The range `1.2.7 || >=1.2.9 <2.0.0` would match the versions `1.2.7`,
+`1.2.9`, and `1.4.6`, but not the versions `1.2.8` or `2.0.0`.
+
+### Prerelease Tags
+
+If a version has a prerelease tag (for example, `1.2.3-alpha.3`) then
+it will only be allowed to satisfy comparator sets if at least one
+comparator with the same `[major, minor, patch]` tuple also has a
+prerelease tag.
+
+For example, the range `>1.2.3-alpha.3` would be allowed to match the
+version `1.2.3-alpha.7`, but it would *not* be satisfied by
+`3.4.5-alpha.9`, even though `3.4.5-alpha.9` is technically "greater
+than" `1.2.3-alpha.3` according to the SemVer sort rules. The version
+range only accepts prerelease tags on the `1.2.3` version. The
+version `3.4.5` *would* satisfy the range, because it does not have a
+prerelease flag, and `3.4.5` is greater than `1.2.3-alpha.7`.
+
+The purpose for this behavior is twofold. First, prerelease versions
+frequently are updated very quickly, and contain many breaking changes
+that are (by the author's design) not yet fit for public consumption.
+Therefore, by default, they are excluded from range matching
+semantics.
+
+Second, a user who has opted into using a prerelease version has
+clearly indicated the intent to use *that specific* set of
+alpha/beta/rc versions. By including a prerelease tag in the range,
+the user is indicating that they are aware of the risk. However, it
+is still not appropriate to assume that they have opted into taking a
+similar risk on the *next* set of prerelease versions.
+
+Note that this behavior can be suppressed (treating all prerelease
+versions as if they were normal versions, for the purpose of range
+matching) by setting the `includePrerelease` flag on the options
+object to any
+[functions](https://github.com/npm/node-semver#functions) that do
+range matching.
+
+#### Prerelease Identifiers
+
+The method `.inc` takes an additional `identifier` string argument that
+will append the value of the string as a prerelease identifier:
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta')
+// '1.2.4-beta.0'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta
+1.2.4-beta.0
+```
+
+Which then can be used to increment further:
+
+```bash
+$ semver 1.2.4-beta.0 -i prerelease
+1.2.4-beta.1
+```
+
+#### Prerelease Identifier Base
+
+The method `.inc` takes an optional parameter 'identifierBase' string
+that will let you let your prerelease number as zero-based or one-based.
+Set to `false` to omit the prerelease number altogether.
+If you do not specify this parameter, it will default to zero-based.
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta', '1')
+// '1.2.4-beta.1'
+```
+
+```javascript
+semver.inc('1.2.3', 'prerelease', 'beta', false)
+// '1.2.4-beta'
+```
+
+command-line example:
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta -n 1
+1.2.4-beta.1
+```
+
+```bash
+$ semver 1.2.3 -i prerelease --preid beta -n false
+1.2.4-beta
+```
+
+### Advanced Range Syntax
+
+Advanced range syntax desugars to primitive comparators in
+deterministic ways.
+
+Advanced ranges may be combined in the same way as primitive
+comparators using white space or `||`.
+
+#### Hyphen Ranges `X.Y.Z - A.B.C`
+
+Specifies an inclusive set.
+
+* `1.2.3 - 2.3.4` := `>=1.2.3 <=2.3.4`
+
+If a partial version is provided as the first version in the inclusive
+range, then the missing pieces are replaced with zeroes.
+
+* `1.2 - 2.3.4` := `>=1.2.0 <=2.3.4`
+
+If a partial version is provided as the second version in the
+inclusive range, then all versions that start with the supplied parts
+of the tuple are accepted, but nothing that would be greater than the
+provided tuple parts.
+
+* `1.2.3 - 2.3` := `>=1.2.3 <2.4.0-0`
+* `1.2.3 - 2` := `>=1.2.3 <3.0.0-0`
+
+#### X-Ranges `1.2.x` `1.X` `1.2.*` `*`
+
+Any of `X`, `x`, or `*` may be used to "stand in" for one of the
+numeric values in the `[major, minor, patch]` tuple.
+
+* `*` := `>=0.0.0` (Any non-prerelease version satisfies, unless
+ `includePrerelease` is specified, in which case any version at all
+ satisfies)
+* `1.x` := `>=1.0.0 <2.0.0-0` (Matching major version)
+* `1.2.x` := `>=1.2.0 <1.3.0-0` (Matching major and minor versions)
+
+A partial version range is treated as an X-Range, so the special
+character is in fact optional.
+
+* `""` (empty string) := `*` := `>=0.0.0`
+* `1` := `1.x.x` := `>=1.0.0 <2.0.0-0`
+* `1.2` := `1.2.x` := `>=1.2.0 <1.3.0-0`
+
+#### Tilde Ranges `~1.2.3` `~1.2` `~1`
+
+Allows patch-level changes if a minor version is specified on the
+comparator. Allows minor-level changes if not.
+
+* `~1.2.3` := `>=1.2.3 <1.(2+1).0` := `>=1.2.3 <1.3.0-0`
+* `~1.2` := `>=1.2.0 <1.(2+1).0` := `>=1.2.0 <1.3.0-0` (Same as `1.2.x`)
+* `~1` := `>=1.0.0 <(1+1).0.0` := `>=1.0.0 <2.0.0-0` (Same as `1.x`)
+* `~0.2.3` := `>=0.2.3 <0.(2+1).0` := `>=0.2.3 <0.3.0-0`
+* `~0.2` := `>=0.2.0 <0.(2+1).0` := `>=0.2.0 <0.3.0-0` (Same as `0.2.x`)
+* `~0` := `>=0.0.0 <(0+1).0.0` := `>=0.0.0 <1.0.0-0` (Same as `0.x`)
+* `~1.2.3-beta.2` := `>=1.2.3-beta.2 <1.3.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+
+#### Caret Ranges `^1.2.3` `^0.2.5` `^0.0.4`
+
+Allows changes that do not modify the left-most non-zero element in the
+`[major, minor, patch]` tuple. In other words, this allows patch and
+minor updates for versions `1.0.0` and above, patch updates for
+versions `0.X >=0.1.0`, and *no* updates for versions `0.0.X`.
+
+Many authors treat a `0.x` version as if the `x` were the major
+"breaking-change" indicator.
+
+Caret ranges are ideal when an author may make breaking changes
+between `0.2.4` and `0.3.0` releases, which is a common practice.
+However, it presumes that there will *not* be breaking changes between
+`0.2.4` and `0.2.5`. It allows for changes that are presumed to be
+additive (but non-breaking), according to commonly observed practices.
+
+* `^1.2.3` := `>=1.2.3 <2.0.0-0`
+* `^0.2.3` := `>=0.2.3 <0.3.0-0`
+* `^0.0.3` := `>=0.0.3 <0.0.4-0`
+* `^1.2.3-beta.2` := `>=1.2.3-beta.2 <2.0.0-0` Note that prereleases in
+ the `1.2.3` version will be allowed, if they are greater than or
+ equal to `beta.2`. So, `1.2.3-beta.4` would be allowed, but
+ `1.2.4-beta.2` would not, because it is a prerelease of a
+ different `[major, minor, patch]` tuple.
+* `^0.0.3-beta` := `>=0.0.3-beta <0.0.4-0` Note that prereleases in the
+ `0.0.3` version *only* will be allowed, if they are greater than or
+ equal to `beta`. So, `0.0.3-pr.2` would be allowed.
+
+When parsing caret ranges, a missing `patch` value desugars to the
+number `0`, but will allow flexibility within that value, even if the
+major and minor versions are both `0`.
+
+* `^1.2.x` := `>=1.2.0 <2.0.0-0`
+* `^0.0.x` := `>=0.0.0 <0.1.0-0`
+* `^0.0` := `>=0.0.0 <0.1.0-0`
+
+A missing `minor` and `patch` values will desugar to zero, but also
+allow flexibility within those values, even if the major version is
+zero.
+
+* `^1.x` := `>=1.0.0 <2.0.0-0`
+* `^0.x` := `>=0.0.0 <1.0.0-0`
+
+### Range Grammar
+
+Putting all this together, here is a Backus-Naur grammar for ranges,
+for the benefit of parser authors:
+
+```bnf
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | ['1'-'9'] ( ['0'-'9'] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
+```
+
+## Functions
+
+All methods and classes take a final `options` object argument. All
+options in this object are `false` by default. The options supported
+are:
+
+- `loose` Be more forgiving about not-quite-valid semver strings.
+ (Any resulting output will always be 100% strict compliant, of
+ course.) For backwards compatibility reasons, if the `options`
+ argument is a boolean value instead of an object, it is interpreted
+ to be the `loose` param.
+- `includePrerelease` Set to suppress the [default
+ behavior](https://github.com/npm/node-semver#prerelease-tags) of
+ excluding prerelease tagged versions from ranges unless they are
+ explicitly opted into.
+
+Strict-mode Comparators and Ranges will be strict about the SemVer
+strings that they parse.
+
+* `valid(v)`: Return the parsed version, or null if it's not valid.
+* `inc(v, release)`: Return the version incremented by the release
+ type (`major`, `premajor`, `minor`, `preminor`, `patch`,
+ `prepatch`, or `prerelease`), or null if it's not valid
+ * `premajor` in one call will bump the version up to the next major
+ version and down to a prerelease of that major version.
+ `preminor`, and `prepatch` work the same way.
+ * If called from a non-prerelease version, the `prerelease` will work the
+ same as `prepatch`. It increments the patch version, then makes a
+ prerelease. If the input version is already a prerelease it simply
+ increments it.
+* `prerelease(v)`: Returns an array of prerelease components, or null
+ if none exist. Example: `prerelease('1.2.3-alpha.1') -> ['alpha', 1]`
+* `major(v)`: Return the major version number.
+* `minor(v)`: Return the minor version number.
+* `patch(v)`: Return the patch version number.
+* `intersects(r1, r2, loose)`: Return true if the two supplied ranges
+ or comparators intersect.
+* `parse(v)`: Attempt to parse a string as a semantic version, returning either
+ a `SemVer` object or `null`.
+
+### Comparison
+
+* `gt(v1, v2)`: `v1 > v2`
+* `gte(v1, v2)`: `v1 >= v2`
+* `lt(v1, v2)`: `v1 < v2`
+* `lte(v1, v2)`: `v1 <= v2`
+* `eq(v1, v2)`: `v1 == v2` This is true if they're logically equivalent,
+ even if they're not the exact same string. You already know how to
+ compare strings.
+* `neq(v1, v2)`: `v1 != v2` The opposite of `eq`.
+* `cmp(v1, comparator, v2)`: Pass in a comparison string, and it'll call
+ the corresponding function above. `"==="` and `"!=="` do simple
+ string comparison, but are included for completeness. Throws if an
+ invalid comparison string is provided.
+* `compare(v1, v2)`: Return `0` if `v1 == v2`, or `1` if `v1` is greater, or `-1` if
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `rcompare(v1, v2)`: The reverse of compare. Sorts an array of versions
+ in descending order when passed to `Array.sort()`.
+* `compareBuild(v1, v2)`: The same as `compare` but considers `build` when two versions
+ are equal. Sorts in ascending order if passed to `Array.sort()`.
+ `v2` is greater. Sorts in ascending order if passed to `Array.sort()`.
+* `diff(v1, v2)`: Returns difference between two versions by the release type
+ (`major`, `premajor`, `minor`, `preminor`, `patch`, `prepatch`, or `prerelease`),
+ or null if the versions are the same.
+
+### Comparators
+
+* `intersects(comparator)`: Return true if the comparators intersect
+
+### Ranges
+
+* `validRange(range)`: Return the valid range or null if it's not valid
+* `satisfies(version, range)`: Return true if the version satisfies the
+ range.
+* `maxSatisfying(versions, range)`: Return the highest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minSatisfying(versions, range)`: Return the lowest version in the list
+ that satisfies the range, or `null` if none of them do.
+* `minVersion(range)`: Return the lowest version that can possibly match
+ the given range.
+* `gtr(version, range)`: Return `true` if version is greater than all the
+ versions possible in the range.
+* `ltr(version, range)`: Return `true` if version is less than all the
+ versions possible in the range.
+* `outside(version, range, hilo)`: Return true if the version is outside
+ the bounds of the range in either the high or low direction. The
+ `hilo` argument must be either the string `'>'` or `'<'`. (This is
+ the function called by `gtr` and `ltr`.)
+* `intersects(range)`: Return true if any of the ranges comparators intersect
+* `simplifyRange(versions, range)`: Return a "simplified" range that
+ matches the same items in `versions` list as the range specified. Note
+ that it does *not* guarantee that it would match the same versions in all
+ cases, only for the set of versions provided. This is useful when
+ generating ranges by joining together multiple versions with `||`
+ programmatically, to provide the user with something a bit more
+ ergonomic. If the provided range is shorter in string-length than the
+ generated range, then that is returned.
+* `subset(subRange, superRange)`: Return `true` if the `subRange` range is
+ entirely contained by the `superRange` range.
+
+Note that, since ranges may be non-contiguous, a version might not be
+greater than a range, less than a range, *or* satisfy a range! For
+example, the range `1.2 <1.2.9 || >2.0.0` would have a hole from `1.2.9`
+until `2.0.0`, so the version `1.2.10` would not be greater than the
+range (because `2.0.1` satisfies, which is higher), nor less than the
+range (since `1.2.8` satisfies, which is lower), and it also does not
+satisfy the range.
+
+If you want to know if a version satisfies or does not satisfy a
+range, use the `satisfies(version, range)` function.
+
+### Coercion
+
+* `coerce(version, options)`: Coerces a string to semver if possible
+
+This aims to provide a very forgiving translation of a non-semver string to
+semver. It looks for the first digit in a string, and consumes all
+remaining characters which satisfy at least a partial semver (e.g., `1`,
+`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
+versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
+surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
+`3.4.0`). Only text which lacks digits will fail coercion (`version one`
+is not valid). The maximum length for any semver component considered for
+coercion is 16 characters; longer components will be ignored
+(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
+semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
+components are invalid (`9999999999999999.4.7.4` is likely invalid).
+
+If the `options.rtl` flag is set, then `coerce` will return the right-most
+coercible tuple that does not share an ending index with a longer coercible
+tuple. For example, `1.2.3.4` will return `2.3.4` in rtl mode, not
+`4.0.0`. `1.2.3/4` will return `4.0.0`, because the `4` is not a part of
+any other overlapping SemVer tuple.
+
+### Clean
+
+* `clean(version)`: Clean a string to be a valid semver if possible
+
+This will return a cleaned and trimmed semver version. If the provided
+version is not valid a null will be returned. This does not work for
+ranges.
+
+ex.
+* `s.clean(' = v 2.1.5foo')`: `null`
+* `s.clean(' = v 2.1.5foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean(' = v 2.1.5-foo')`: `null`
+* `s.clean(' = v 2.1.5-foo', { loose: true })`: `'2.1.5-foo'`
+* `s.clean('=v2.1.5')`: `'2.1.5'`
+* `s.clean(' =v2.1.5')`: `2.1.5`
+* `s.clean(' 2.1.5 ')`: `'2.1.5'`
+* `s.clean('~1.0.0')`: `null`
+
+## Constants
+
+As a convenience, helper constants are exported to provide information about what `node-semver` supports:
+
+### `RELEASE_TYPES`
+
+- major
+- premajor
+- minor
+- preminor
+- patch
+- prepatch
+- prerelease
+
+```
+const semver = require('semver');
+
+if (semver.RELEASE_TYPES.includes(arbitraryUserInput)) {
+ console.log('This is a valid release type!');
+} else {
+ console.warn('This is NOT a valid release type!');
+}
+```
+
+### `SEMVER_SPEC_VERSION`
+
+2.0.0
+
+```
+const semver = require('semver');
+
+console.log('We are currently using the semver specification version:', semver.SEMVER_SPEC_VERSION);
+```
+
+## Exported Modules
+
+<!--
+TODO: Make sure that all of these items are documented (classes aren't,
+eg), and then pull the module name into the documentation for that specific
+thing.
+-->
+
+You may pull in just the part of this semver utility that you need, if you
+are sensitive to packing and tree-shaking concerns. The main
+`require('semver')` export uses getter functions to lazily load the parts
+of the API that are used.
+
+The following modules are available:
+
+* `require('semver')`
+* `require('semver/classes')`
+* `require('semver/classes/comparator')`
+* `require('semver/classes/range')`
+* `require('semver/classes/semver')`
+* `require('semver/functions/clean')`
+* `require('semver/functions/cmp')`
+* `require('semver/functions/coerce')`
+* `require('semver/functions/compare')`
+* `require('semver/functions/compare-build')`
+* `require('semver/functions/compare-loose')`
+* `require('semver/functions/diff')`
+* `require('semver/functions/eq')`
+* `require('semver/functions/gt')`
+* `require('semver/functions/gte')`
+* `require('semver/functions/inc')`
+* `require('semver/functions/lt')`
+* `require('semver/functions/lte')`
+* `require('semver/functions/major')`
+* `require('semver/functions/minor')`
+* `require('semver/functions/neq')`
+* `require('semver/functions/parse')`
+* `require('semver/functions/patch')`
+* `require('semver/functions/prerelease')`
+* `require('semver/functions/rcompare')`
+* `require('semver/functions/rsort')`
+* `require('semver/functions/satisfies')`
+* `require('semver/functions/sort')`
+* `require('semver/functions/valid')`
+* `require('semver/ranges/gtr')`
+* `require('semver/ranges/intersects')`
+* `require('semver/ranges/ltr')`
+* `require('semver/ranges/max-satisfying')`
+* `require('semver/ranges/min-satisfying')`
+* `require('semver/ranges/min-version')`
+* `require('semver/ranges/outside')`
+* `require('semver/ranges/to-comparators')`
+* `require('semver/ranges/valid')`
+
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/bin/semver.js b/desktop/node_modules/electron-packager/node_modules/semver/bin/semver.js
new file mode 100755
index 0000000..242b7ad
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/bin/semver.js
@@ -0,0 +1,197 @@
+#!/usr/bin/env node
+// Standalone semver comparison program.
+// Exits successfully and prints matching version(s) if
+// any supplied version is valid and passes all tests.
+
+const argv = process.argv.slice(2)
+
+let versions = []
+
+const range = []
+
+let inc = null
+
+const version = require('../package.json').version
+
+let loose = false
+
+let includePrerelease = false
+
+let coerce = false
+
+let rtl = false
+
+let identifier
+
+let identifierBase
+
+const semver = require('../')
+const parseOptions = require('../internal/parse-options')
+
+let reverse = false
+
+let options = {}
+
+const main = () => {
+ if (!argv.length) {
+ return help()
+ }
+ while (argv.length) {
+ let a = argv.shift()
+ const indexOfEqualSign = a.indexOf('=')
+ if (indexOfEqualSign !== -1) {
+ const value = a.slice(indexOfEqualSign + 1)
+ a = a.slice(0, indexOfEqualSign)
+ argv.unshift(value)
+ }
+ switch (a) {
+ case '-rv': case '-rev': case '--rev': case '--reverse':
+ reverse = true
+ break
+ case '-l': case '--loose':
+ loose = true
+ break
+ case '-p': case '--include-prerelease':
+ includePrerelease = true
+ break
+ case '-v': case '--version':
+ versions.push(argv.shift())
+ break
+ case '-i': case '--inc': case '--increment':
+ switch (argv[0]) {
+ case 'major': case 'minor': case 'patch': case 'prerelease':
+ case 'premajor': case 'preminor': case 'prepatch':
+ inc = argv.shift()
+ break
+ default:
+ inc = 'patch'
+ break
+ }
+ break
+ case '--preid':
+ identifier = argv.shift()
+ break
+ case '-r': case '--range':
+ range.push(argv.shift())
+ break
+ case '-n':
+ identifierBase = argv.shift()
+ if (identifierBase === 'false') {
+ identifierBase = false
+ }
+ break
+ case '-c': case '--coerce':
+ coerce = true
+ break
+ case '--rtl':
+ rtl = true
+ break
+ case '--ltr':
+ rtl = false
+ break
+ case '-h': case '--help': case '-?':
+ return help()
+ default:
+ versions.push(a)
+ break
+ }
+ }
+
+ options = parseOptions({ loose, includePrerelease, rtl })
+
+ versions = versions.map((v) => {
+ return coerce ? (semver.coerce(v, options) || { version: v }).version : v
+ }).filter((v) => {
+ return semver.valid(v)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ if (inc && (versions.length !== 1 || range.length)) {
+ return failInc()
+ }
+
+ for (let i = 0, l = range.length; i < l; i++) {
+ versions = versions.filter((v) => {
+ return semver.satisfies(v, range[i], options)
+ })
+ if (!versions.length) {
+ return fail()
+ }
+ }
+ return success(versions)
+}
+
+const failInc = () => {
+ console.error('--inc can only be used on a single version with no range')
+ fail()
+}
+
+const fail = () => process.exit(1)
+
+const success = () => {
+ const compare = reverse ? 'rcompare' : 'compare'
+ versions.sort((a, b) => {
+ return semver[compare](a, b, options)
+ }).map((v) => {
+ return semver.clean(v, options)
+ }).map((v) => {
+ return inc ? semver.inc(v, inc, options, identifier, identifierBase) : v
+ }).forEach((v, i, _) => {
+ console.log(v)
+ })
+}
+
+const help = () => console.log(
+`SemVer ${version}
+
+A JavaScript implementation of the https://semver.org/ specification
+Copyright Isaac Z. Schlueter
+
+Usage: semver [options] <version> [<version> [...]]
+Prints valid versions sorted by SemVer precedence
+
+Options:
+-r --range <range>
+ Print versions that match the specified range.
+
+-i --increment [<level>]
+ Increment a version by the specified level. Level can
+ be one of: major, minor, patch, premajor, preminor,
+ prepatch, or prerelease. Default level is 'patch'.
+ Only one version may be specified.
+
+--preid <identifier>
+ Identifier to be used to prefix premajor, preminor,
+ prepatch or prerelease version increments.
+
+-l --loose
+ Interpret versions and ranges loosely
+
+-p --include-prerelease
+ Always include prerelease versions in range matching
+
+-c --coerce
+ Coerce a string into SemVer if possible
+ (does not imply --loose)
+
+--rtl
+ Coerce version strings right to left
+
+--ltr
+ Coerce version strings left to right (default)
+
+-n <base>
+ Base number to be used for the prerelease identifier.
+ Can be either 0 or 1, or false to omit the number altogether.
+ Defaults to 0.
+
+Program exits successfully if any valid version satisfies
+all supplied ranges, and prints all satisfying versions.
+
+If no satisfying versions are found, then exits failure.
+
+Versions are printed in ascending order, so supplying
+multiple versions to the utility will just sort them.`)
+
+main()
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/classes/comparator.js b/desktop/node_modules/electron-packager/node_modules/semver/classes/comparator.js
new file mode 100644
index 0000000..3d39c0e
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/classes/comparator.js
@@ -0,0 +1,141 @@
+const ANY = Symbol('SemVer ANY')
+// hoisted class for cyclic dependency
+class Comparator {
+ static get ANY () {
+ return ANY
+ }
+
+ constructor (comp, options) {
+ options = parseOptions(options)
+
+ if (comp instanceof Comparator) {
+ if (comp.loose === !!options.loose) {
+ return comp
+ } else {
+ comp = comp.value
+ }
+ }
+
+ comp = comp.trim().split(/\s+/).join(' ')
+ debug('comparator', comp, options)
+ this.options = options
+ this.loose = !!options.loose
+ this.parse(comp)
+
+ if (this.semver === ANY) {
+ this.value = ''
+ } else {
+ this.value = this.operator + this.semver.version
+ }
+
+ debug('comp', this)
+ }
+
+ parse (comp) {
+ const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR]
+ const m = comp.match(r)
+
+ if (!m) {
+ throw new TypeError(`Invalid comparator: ${comp}`)
+ }
+
+ this.operator = m[1] !== undefined ? m[1] : ''
+ if (this.operator === '=') {
+ this.operator = ''
+ }
+
+ // if it literally is just '>' or '' then allow anything.
+ if (!m[2]) {
+ this.semver = ANY
+ } else {
+ this.semver = new SemVer(m[2], this.options.loose)
+ }
+ }
+
+ toString () {
+ return this.value
+ }
+
+ test (version) {
+ debug('Comparator.test', version, this.options.loose)
+
+ if (this.semver === ANY || version === ANY) {
+ return true
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ return cmp(version, this.operator, this.semver, this.options)
+ }
+
+ intersects (comp, options) {
+ if (!(comp instanceof Comparator)) {
+ throw new TypeError('a Comparator is required')
+ }
+
+ if (this.operator === '') {
+ if (this.value === '') {
+ return true
+ }
+ return new Range(comp.value, options).test(this.value)
+ } else if (comp.operator === '') {
+ if (comp.value === '') {
+ return true
+ }
+ return new Range(this.value, options).test(comp.semver)
+ }
+
+ options = parseOptions(options)
+
+ // Special cases where nothing can possibly be lower
+ if (options.includePrerelease &&
+ (this.value === '<0.0.0-0' || comp.value === '<0.0.0-0')) {
+ return false
+ }
+ if (!options.includePrerelease &&
+ (this.value.startsWith('<0.0.0') || comp.value.startsWith('<0.0.0'))) {
+ return false
+ }
+
+ // Same direction increasing (> or >=)
+ if (this.operator.startsWith('>') && comp.operator.startsWith('>')) {
+ return true
+ }
+ // Same direction decreasing (< or <=)
+ if (this.operator.startsWith('<') && comp.operator.startsWith('<')) {
+ return true
+ }
+ // same SemVer and both sides are inclusive (<= or >=)
+ if (
+ (this.semver.version === comp.semver.version) &&
+ this.operator.includes('=') && comp.operator.includes('=')) {
+ return true
+ }
+ // opposite directions less than
+ if (cmp(this.semver, '<', comp.semver, options) &&
+ this.operator.startsWith('>') && comp.operator.startsWith('<')) {
+ return true
+ }
+ // opposite directions greater than
+ if (cmp(this.semver, '>', comp.semver, options) &&
+ this.operator.startsWith('<') && comp.operator.startsWith('>')) {
+ return true
+ }
+ return false
+ }
+}
+
+module.exports = Comparator
+
+const parseOptions = require('../internal/parse-options')
+const { safeRe: re, t } = require('../internal/re')
+const cmp = require('../functions/cmp')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const Range = require('./range')
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/classes/index.js b/desktop/node_modules/electron-packager/node_modules/semver/classes/index.js
new file mode 100644
index 0000000..5e3f5c9
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/classes/index.js
@@ -0,0 +1,5 @@
+module.exports = {
+ SemVer: require('./semver.js'),
+ Range: require('./range.js'),
+ Comparator: require('./comparator.js'),
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/classes/range.js b/desktop/node_modules/electron-packager/node_modules/semver/classes/range.js
new file mode 100644
index 0000000..7e7c414
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/classes/range.js
@@ -0,0 +1,539 @@
+// hoisted class for cyclic dependency
+class Range {
+ constructor (range, options) {
+ options = parseOptions(options)
+
+ if (range instanceof Range) {
+ if (
+ range.loose === !!options.loose &&
+ range.includePrerelease === !!options.includePrerelease
+ ) {
+ return range
+ } else {
+ return new Range(range.raw, options)
+ }
+ }
+
+ if (range instanceof Comparator) {
+ // just put it in the set and return
+ this.raw = range.value
+ this.set = [[range]]
+ this.format()
+ return this
+ }
+
+ this.options = options
+ this.loose = !!options.loose
+ this.includePrerelease = !!options.includePrerelease
+
+ // First reduce all whitespace as much as possible so we do not have to rely
+ // on potentially slow regexes like \s*. This is then stored and used for
+ // future error messages as well.
+ this.raw = range
+ .trim()
+ .split(/\s+/)
+ .join(' ')
+
+ // First, split on ||
+ this.set = this.raw
+ .split('||')
+ // map the range to a 2d array of comparators
+ .map(r => this.parseRange(r.trim()))
+ // throw out any comparator lists that are empty
+ // this generally means that it was not a valid range, which is allowed
+ // in loose mode, but will still throw if the WHOLE range is invalid.
+ .filter(c => c.length)
+
+ if (!this.set.length) {
+ throw new TypeError(`Invalid SemVer Range: ${this.raw}`)
+ }
+
+ // if we have any that are not the null set, throw out null sets.
+ if (this.set.length > 1) {
+ // keep the first one, in case they're all null sets
+ const first = this.set[0]
+ this.set = this.set.filter(c => !isNullSet(c[0]))
+ if (this.set.length === 0) {
+ this.set = [first]
+ } else if (this.set.length > 1) {
+ // if we have any that are *, then the range is just *
+ for (const c of this.set) {
+ if (c.length === 1 && isAny(c[0])) {
+ this.set = [c]
+ break
+ }
+ }
+ }
+ }
+
+ this.format()
+ }
+
+ format () {
+ this.range = this.set
+ .map((comps) => comps.join(' ').trim())
+ .join('||')
+ .trim()
+ return this.range
+ }
+
+ toString () {
+ return this.range
+ }
+
+ parseRange (range) {
+ // memoize range parsing for performance.
+ // this is a very hot path, and fully deterministic.
+ const memoOpts =
+ (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) |
+ (this.options.loose && FLAG_LOOSE)
+ const memoKey = memoOpts + ':' + range
+ const cached = cache.get(memoKey)
+ if (cached) {
+ return cached
+ }
+
+ const loose = this.options.loose
+ // `1.2.3 - 1.2.4` => `>=1.2.3 <=1.2.4`
+ const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE]
+ range = range.replace(hr, hyphenReplace(this.options.includePrerelease))
+ debug('hyphen replace', range)
+
+ // `> 1.2.3 < 1.2.5` => `>1.2.3 <1.2.5`
+ range = range.replace(re[t.COMPARATORTRIM], comparatorTrimReplace)
+ debug('comparator trim', range)
+
+ // `~ 1.2.3` => `~1.2.3`
+ range = range.replace(re[t.TILDETRIM], tildeTrimReplace)
+ debug('tilde trim', range)
+
+ // `^ 1.2.3` => `^1.2.3`
+ range = range.replace(re[t.CARETTRIM], caretTrimReplace)
+ debug('caret trim', range)
+
+ // At this point, the range is completely trimmed and
+ // ready to be split into comparators.
+
+ let rangeList = range
+ .split(' ')
+ .map(comp => parseComparator(comp, this.options))
+ .join(' ')
+ .split(/\s+/)
+ // >=0.0.0 is equivalent to *
+ .map(comp => replaceGTE0(comp, this.options))
+
+ if (loose) {
+ // in loose mode, throw out any that are not valid comparators
+ rangeList = rangeList.filter(comp => {
+ debug('loose invalid filter', comp, this.options)
+ return !!comp.match(re[t.COMPARATORLOOSE])
+ })
+ }
+ debug('range list', rangeList)
+
+ // if any comparators are the null set, then replace with JUST null set
+ // if more than one comparator, remove any * comparators
+ // also, don't include the same comparator more than once
+ const rangeMap = new Map()
+ const comparators = rangeList.map(comp => new Comparator(comp, this.options))
+ for (const comp of comparators) {
+ if (isNullSet(comp)) {
+ return [comp]
+ }
+ rangeMap.set(comp.value, comp)
+ }
+ if (rangeMap.size > 1 && rangeMap.has('')) {
+ rangeMap.delete('')
+ }
+
+ const result = [...rangeMap.values()]
+ cache.set(memoKey, result)
+ return result
+ }
+
+ intersects (range, options) {
+ if (!(range instanceof Range)) {
+ throw new TypeError('a Range is required')
+ }
+
+ return this.set.some((thisComparators) => {
+ return (
+ isSatisfiable(thisComparators, options) &&
+ range.set.some((rangeComparators) => {
+ return (
+ isSatisfiable(rangeComparators, options) &&
+ thisComparators.every((thisComparator) => {
+ return rangeComparators.every((rangeComparator) => {
+ return thisComparator.intersects(rangeComparator, options)
+ })
+ })
+ )
+ })
+ )
+ })
+ }
+
+ // if ANY of the sets match ALL of its comparators, then pass
+ test (version) {
+ if (!version) {
+ return false
+ }
+
+ if (typeof version === 'string') {
+ try {
+ version = new SemVer(version, this.options)
+ } catch (er) {
+ return false
+ }
+ }
+
+ for (let i = 0; i < this.set.length; i++) {
+ if (testSet(this.set[i], version, this.options)) {
+ return true
+ }
+ }
+ return false
+ }
+}
+
+module.exports = Range
+
+const LRU = require('lru-cache')
+const cache = new LRU({ max: 1000 })
+
+const parseOptions = require('../internal/parse-options')
+const Comparator = require('./comparator')
+const debug = require('../internal/debug')
+const SemVer = require('./semver')
+const {
+ safeRe: re,
+ t,
+ comparatorTrimReplace,
+ tildeTrimReplace,
+ caretTrimReplace,
+} = require('../internal/re')
+const { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require('../internal/constants')
+
+const isNullSet = c => c.value === '<0.0.0-0'
+const isAny = c => c.value === ''
+
+// take a set of comparators and determine whether there
+// exists a version which can satisfy it
+const isSatisfiable = (comparators, options) => {
+ let result = true
+ const remainingComparators = comparators.slice()
+ let testComparator = remainingComparators.pop()
+
+ while (result && remainingComparators.length) {
+ result = remainingComparators.every((otherComparator) => {
+ return testComparator.intersects(otherComparator, options)
+ })
+
+ testComparator = remainingComparators.pop()
+ }
+
+ return result
+}
+
+// comprised of xranges, tildes, stars, and gtlt's at this point.
+// already replaced the hyphen ranges
+// turn into a set of JUST comparators.
+const parseComparator = (comp, options) => {
+ debug('comp', comp, options)
+ comp = replaceCarets(comp, options)
+ debug('caret', comp)
+ comp = replaceTildes(comp, options)
+ debug('tildes', comp)
+ comp = replaceXRanges(comp, options)
+ debug('xrange', comp)
+ comp = replaceStars(comp, options)
+ debug('stars', comp)
+ return comp
+}
+
+const isX = id => !id || id.toLowerCase() === 'x' || id === '*'
+
+// ~, ~> --> * (any, kinda silly)
+// ~2, ~2.x, ~2.x.x, ~>2, ~>2.x ~>2.x.x --> >=2.0.0 <3.0.0-0
+// ~2.0, ~2.0.x, ~>2.0, ~>2.0.x --> >=2.0.0 <2.1.0-0
+// ~1.2, ~1.2.x, ~>1.2, ~>1.2.x --> >=1.2.0 <1.3.0-0
+// ~1.2.3, ~>1.2.3 --> >=1.2.3 <1.3.0-0
+// ~1.2.0, ~>1.2.0 --> >=1.2.0 <1.3.0-0
+// ~0.0.1 --> >=0.0.1 <0.1.0-0
+const replaceTildes = (comp, options) => {
+ return comp
+ .trim()
+ .split(/\s+/)
+ .map((c) => replaceTilde(c, options))
+ .join(' ')
+}
+
+const replaceTilde = (comp, options) => {
+ const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE]
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('tilde', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0 <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ // ~1.2 == >=1.2.0 <1.3.0-0
+ ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`
+ } else if (pr) {
+ debug('replaceTilde pr', pr)
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ } else {
+ // ~1.2.3 == >=1.2.3 <1.3.0-0
+ ret = `>=${M}.${m}.${p
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('tilde return', ret)
+ return ret
+ })
+}
+
+// ^ --> * (any, kinda silly)
+// ^2, ^2.x, ^2.x.x --> >=2.0.0 <3.0.0-0
+// ^2.0, ^2.0.x --> >=2.0.0 <3.0.0-0
+// ^1.2, ^1.2.x --> >=1.2.0 <2.0.0-0
+// ^1.2.3 --> >=1.2.3 <2.0.0-0
+// ^1.2.0 --> >=1.2.0 <2.0.0-0
+// ^0.0.1 --> >=0.0.1 <0.0.2-0
+// ^0.1.0 --> >=0.1.0 <0.2.0-0
+const replaceCarets = (comp, options) => {
+ return comp
+ .trim()
+ .split(/\s+/)
+ .map((c) => replaceCaret(c, options))
+ .join(' ')
+}
+
+const replaceCaret = (comp, options) => {
+ debug('caret', comp, options)
+ const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET]
+ const z = options.includePrerelease ? '-0' : ''
+ return comp.replace(r, (_, M, m, p, pr) => {
+ debug('caret', comp, _, M, m, p, pr)
+ let ret
+
+ if (isX(M)) {
+ ret = ''
+ } else if (isX(m)) {
+ ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`
+ } else if (isX(p)) {
+ if (M === '0') {
+ ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`
+ } else {
+ ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`
+ }
+ } else if (pr) {
+ debug('replaceCaret pr', pr)
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p}-${pr
+ } <${+M + 1}.0.0-0`
+ }
+ } else {
+ debug('no pr')
+ if (M === '0') {
+ if (m === '0') {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${m}.${+p + 1}-0`
+ } else {
+ ret = `>=${M}.${m}.${p
+ }${z} <${M}.${+m + 1}.0-0`
+ }
+ } else {
+ ret = `>=${M}.${m}.${p
+ } <${+M + 1}.0.0-0`
+ }
+ }
+
+ debug('caret return', ret)
+ return ret
+ })
+}
+
+const replaceXRanges = (comp, options) => {
+ debug('replaceXRanges', comp, options)
+ return comp
+ .split(/\s+/)
+ .map((c) => replaceXRange(c, options))
+ .join(' ')
+}
+
+const replaceXRange = (comp, options) => {
+ comp = comp.trim()
+ const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE]
+ return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
+ debug('xRange', comp, ret, gtlt, M, m, p, pr)
+ const xM = isX(M)
+ const xm = xM || isX(m)
+ const xp = xm || isX(p)
+ const anyX = xp
+
+ if (gtlt === '=' && anyX) {
+ gtlt = ''
+ }
+
+ // if we're including prereleases in the match, then we need
+ // to fix this to -0, the lowest possible prerelease value
+ pr = options.includePrerelease ? '-0' : ''
+
+ if (xM) {
+ if (gtlt === '>' || gtlt === '<') {
+ // nothing is allowed
+ ret = '<0.0.0-0'
+ } else {
+ // nothing is forbidden
+ ret = '*'
+ }
+ } else if (gtlt && anyX) {
+ // we know patch is an x, because we have any x at all.
+ // replace X with 0
+ if (xm) {
+ m = 0
+ }
+ p = 0
+
+ if (gtlt === '>') {
+ // >1 => >=2.0.0
+ // >1.2 => >=1.3.0
+ gtlt = '>='
+ if (xm) {
+ M = +M + 1
+ m = 0
+ p = 0
+ } else {
+ m = +m + 1
+ p = 0
+ }
+ } else if (gtlt === '<=') {
+ // <=0.7.x is actually <0.8.0, since any 0.7.x should
+ // pass. Similarly, <=7.x is actually <8.0.0, etc.
+ gtlt = '<'
+ if (xm) {
+ M = +M + 1
+ } else {
+ m = +m + 1
+ }
+ }
+
+ if (gtlt === '<') {
+ pr = '-0'
+ }
+
+ ret = `${gtlt + M}.${m}.${p}${pr}`
+ } else if (xm) {
+ ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`
+ } else if (xp) {
+ ret = `>=${M}.${m}.0${pr
+ } <${M}.${+m + 1}.0-0`
+ }
+
+ debug('xRange return', ret)
+
+ return ret
+ })
+}
+
+// Because * is AND-ed with everything else in the comparator,
+// and '' means "any version", just remove the *s entirely.
+const replaceStars = (comp, options) => {
+ debug('replaceStars', comp, options)
+ // Looseness is ignored here. star is always as loose as it gets!
+ return comp
+ .trim()
+ .replace(re[t.STAR], '')
+}
+
+const replaceGTE0 = (comp, options) => {
+ debug('replaceGTE0', comp, options)
+ return comp
+ .trim()
+ .replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], '')
+}
+
+// This function is passed to string.replace(re[t.HYPHENRANGE])
+// M, m, patch, prerelease, build
+// 1.2 - 3.4.5 => >=1.2.0 <=3.4.5
+// 1.2.3 - 3.4 => >=1.2.0 <3.5.0-0 Any 3.4.x will do
+// 1.2 - 3.4 => >=1.2.0 <3.5.0-0
+const hyphenReplace = incPr => ($0,
+ from, fM, fm, fp, fpr, fb,
+ to, tM, tm, tp, tpr, tb) => {
+ if (isX(fM)) {
+ from = ''
+ } else if (isX(fm)) {
+ from = `>=${fM}.0.0${incPr ? '-0' : ''}`
+ } else if (isX(fp)) {
+ from = `>=${fM}.${fm}.0${incPr ? '-0' : ''}`
+ } else if (fpr) {
+ from = `>=${from}`
+ } else {
+ from = `>=${from}${incPr ? '-0' : ''}`
+ }
+
+ if (isX(tM)) {
+ to = ''
+ } else if (isX(tm)) {
+ to = `<${+tM + 1}.0.0-0`
+ } else if (isX(tp)) {
+ to = `<${tM}.${+tm + 1}.0-0`
+ } else if (tpr) {
+ to = `<=${tM}.${tm}.${tp}-${tpr}`
+ } else if (incPr) {
+ to = `<${tM}.${tm}.${+tp + 1}-0`
+ } else {
+ to = `<=${to}`
+ }
+
+ return `${from} ${to}`.trim()
+}
+
+const testSet = (set, version, options) => {
+ for (let i = 0; i < set.length; i++) {
+ if (!set[i].test(version)) {
+ return false
+ }
+ }
+
+ if (version.prerelease.length && !options.includePrerelease) {
+ // Find the set of versions that are allowed to have prereleases
+ // For example, ^1.2.3-pr.1 desugars to >=1.2.3-pr.1 <2.0.0
+ // That should allow `1.2.3-pr.2` to pass.
+ // However, `1.2.4-alpha.notready` should NOT be allowed,
+ // even though it's within the range set by the comparators.
+ for (let i = 0; i < set.length; i++) {
+ debug(set[i].semver)
+ if (set[i].semver === Comparator.ANY) {
+ continue
+ }
+
+ if (set[i].semver.prerelease.length > 0) {
+ const allowed = set[i].semver
+ if (allowed.major === version.major &&
+ allowed.minor === version.minor &&
+ allowed.patch === version.patch) {
+ return true
+ }
+ }
+ }
+
+ // Version has a -pre, but it's not one of the ones we like.
+ return false
+ }
+
+ return true
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/classes/semver.js b/desktop/node_modules/electron-packager/node_modules/semver/classes/semver.js
new file mode 100644
index 0000000..84e8459
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/classes/semver.js
@@ -0,0 +1,302 @@
+const debug = require('../internal/debug')
+const { MAX_LENGTH, MAX_SAFE_INTEGER } = require('../internal/constants')
+const { safeRe: re, t } = require('../internal/re')
+
+const parseOptions = require('../internal/parse-options')
+const { compareIdentifiers } = require('../internal/identifiers')
+class SemVer {
+ constructor (version, options) {
+ options = parseOptions(options)
+
+ if (version instanceof SemVer) {
+ if (version.loose === !!options.loose &&
+ version.includePrerelease === !!options.includePrerelease) {
+ return version
+ } else {
+ version = version.version
+ }
+ } else if (typeof version !== 'string') {
+ throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version}".`)
+ }
+
+ if (version.length > MAX_LENGTH) {
+ throw new TypeError(
+ `version is longer than ${MAX_LENGTH} characters`
+ )
+ }
+
+ debug('SemVer', version, options)
+ this.options = options
+ this.loose = !!options.loose
+ // this isn't actually relevant for versions, but keep it so that we
+ // don't run into trouble passing this.options around.
+ this.includePrerelease = !!options.includePrerelease
+
+ const m = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL])
+
+ if (!m) {
+ throw new TypeError(`Invalid Version: ${version}`)
+ }
+
+ this.raw = version
+
+ // these are actually numbers
+ this.major = +m[1]
+ this.minor = +m[2]
+ this.patch = +m[3]
+
+ if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
+ throw new TypeError('Invalid major version')
+ }
+
+ if (this.minor > MAX_SAFE_INTEGER || this.minor < 0) {
+ throw new TypeError('Invalid minor version')
+ }
+
+ if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
+ throw new TypeError('Invalid patch version')
+ }
+
+ // numberify any prerelease numeric ids
+ if (!m[4]) {
+ this.prerelease = []
+ } else {
+ this.prerelease = m[4].split('.').map((id) => {
+ if (/^[0-9]+$/.test(id)) {
+ const num = +id
+ if (num >= 0 && num < MAX_SAFE_INTEGER) {
+ return num
+ }
+ }
+ return id
+ })
+ }
+
+ this.build = m[5] ? m[5].split('.') : []
+ this.format()
+ }
+
+ format () {
+ this.version = `${this.major}.${this.minor}.${this.patch}`
+ if (this.prerelease.length) {
+ this.version += `-${this.prerelease.join('.')}`
+ }
+ return this.version
+ }
+
+ toString () {
+ return this.version
+ }
+
+ compare (other) {
+ debug('SemVer.compare', this.version, this.options, other)
+ if (!(other instanceof SemVer)) {
+ if (typeof other === 'string' && other === this.version) {
+ return 0
+ }
+ other = new SemVer(other, this.options)
+ }
+
+ if (other.version === this.version) {
+ return 0
+ }
+
+ return this.compareMain(other) || this.comparePre(other)
+ }
+
+ compareMain (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ return (
+ compareIdentifiers(this.major, other.major) ||
+ compareIdentifiers(this.minor, other.minor) ||
+ compareIdentifiers(this.patch, other.patch)
+ )
+ }
+
+ comparePre (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ // NOT having a prerelease is > having one
+ if (this.prerelease.length && !other.prerelease.length) {
+ return -1
+ } else if (!this.prerelease.length && other.prerelease.length) {
+ return 1
+ } else if (!this.prerelease.length && !other.prerelease.length) {
+ return 0
+ }
+
+ let i = 0
+ do {
+ const a = this.prerelease[i]
+ const b = other.prerelease[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ compareBuild (other) {
+ if (!(other instanceof SemVer)) {
+ other = new SemVer(other, this.options)
+ }
+
+ let i = 0
+ do {
+ const a = this.build[i]
+ const b = other.build[i]
+ debug('prerelease compare', i, a, b)
+ if (a === undefined && b === undefined) {
+ return 0
+ } else if (b === undefined) {
+ return 1
+ } else if (a === undefined) {
+ return -1
+ } else if (a === b) {
+ continue
+ } else {
+ return compareIdentifiers(a, b)
+ }
+ } while (++i)
+ }
+
+ // preminor will bump the version up to the next minor release, and immediately
+ // down to pre-release. premajor and prepatch work the same way.
+ inc (release, identifier, identifierBase) {
+ switch (release) {
+ case 'premajor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor = 0
+ this.major++
+ this.inc('pre', identifier, identifierBase)
+ break
+ case 'preminor':
+ this.prerelease.length = 0
+ this.patch = 0
+ this.minor++
+ this.inc('pre', identifier, identifierBase)
+ break
+ case 'prepatch':
+ // If this is already a prerelease, it will bump to the next version
+ // drop any prereleases that might already exist, since they are not
+ // relevant at this point.
+ this.prerelease.length = 0
+ this.inc('patch', identifier, identifierBase)
+ this.inc('pre', identifier, identifierBase)
+ break
+ // If the input is a non-prerelease version, this acts the same as
+ // prepatch.
+ case 'prerelease':
+ if (this.prerelease.length === 0) {
+ this.inc('patch', identifier, identifierBase)
+ }
+ this.inc('pre', identifier, identifierBase)
+ break
+
+ case 'major':
+ // If this is a pre-major version, bump up to the same major version.
+ // Otherwise increment major.
+ // 1.0.0-5 bumps to 1.0.0
+ // 1.1.0 bumps to 2.0.0
+ if (
+ this.minor !== 0 ||
+ this.patch !== 0 ||
+ this.prerelease.length === 0
+ ) {
+ this.major++
+ }
+ this.minor = 0
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'minor':
+ // If this is a pre-minor version, bump up to the same minor version.
+ // Otherwise increment minor.
+ // 1.2.0-5 bumps to 1.2.0
+ // 1.2.1 bumps to 1.3.0
+ if (this.patch !== 0 || this.prerelease.length === 0) {
+ this.minor++
+ }
+ this.patch = 0
+ this.prerelease = []
+ break
+ case 'patch':
+ // If this is not a pre-release version, it will increment the patch.
+ // If it is a pre-release it will bump up to the same patch version.
+ // 1.2.0-5 patches to 1.2.0
+ // 1.2.0 patches to 1.2.1
+ if (this.prerelease.length === 0) {
+ this.patch++
+ }
+ this.prerelease = []
+ break
+ // This probably shouldn't be used publicly.
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
+ case 'pre': {
+ const base = Number(identifierBase) ? 1 : 0
+
+ if (!identifier && identifierBase === false) {
+ throw new Error('invalid increment argument: identifier is empty')
+ }
+
+ if (this.prerelease.length === 0) {
+ this.prerelease = [base]
+ } else {
+ let i = this.prerelease.length
+ while (--i >= 0) {
+ if (typeof this.prerelease[i] === 'number') {
+ this.prerelease[i]++
+ i = -2
+ }
+ }
+ if (i === -1) {
+ // didn't increment anything
+ if (identifier === this.prerelease.join('.') && identifierBase === false) {
+ throw new Error('invalid increment argument: identifier already exists')
+ }
+ this.prerelease.push(base)
+ }
+ }
+ if (identifier) {
+ // 1.2.0-beta.1 bumps to 1.2.0-beta.2,
+ // 1.2.0-beta.fooblz or 1.2.0-beta bumps to 1.2.0-beta.0
+ let prerelease = [identifier, base]
+ if (identifierBase === false) {
+ prerelease = [identifier]
+ }
+ if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
+ if (isNaN(this.prerelease[1])) {
+ this.prerelease = prerelease
+ }
+ } else {
+ this.prerelease = prerelease
+ }
+ }
+ break
+ }
+ default:
+ throw new Error(`invalid increment argument: ${release}`)
+ }
+ this.raw = this.format()
+ if (this.build.length) {
+ this.raw += `+${this.build.join('.')}`
+ }
+ return this
+ }
+}
+
+module.exports = SemVer
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/clean.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/clean.js
new file mode 100644
index 0000000..811fe6b
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/clean.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const clean = (version, options) => {
+ const s = parse(version.trim().replace(/^[=v]+/, ''), options)
+ return s ? s.version : null
+}
+module.exports = clean
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/cmp.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/cmp.js
new file mode 100644
index 0000000..4011909
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/cmp.js
@@ -0,0 +1,52 @@
+const eq = require('./eq')
+const neq = require('./neq')
+const gt = require('./gt')
+const gte = require('./gte')
+const lt = require('./lt')
+const lte = require('./lte')
+
+const cmp = (a, op, b, loose) => {
+ switch (op) {
+ case '===':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a === b
+
+ case '!==':
+ if (typeof a === 'object') {
+ a = a.version
+ }
+ if (typeof b === 'object') {
+ b = b.version
+ }
+ return a !== b
+
+ case '':
+ case '=':
+ case '==':
+ return eq(a, b, loose)
+
+ case '!=':
+ return neq(a, b, loose)
+
+ case '>':
+ return gt(a, b, loose)
+
+ case '>=':
+ return gte(a, b, loose)
+
+ case '<':
+ return lt(a, b, loose)
+
+ case '<=':
+ return lte(a, b, loose)
+
+ default:
+ throw new TypeError(`Invalid operator: ${op}`)
+ }
+}
+module.exports = cmp
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/coerce.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/coerce.js
new file mode 100644
index 0000000..febbff9
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/coerce.js
@@ -0,0 +1,52 @@
+const SemVer = require('../classes/semver')
+const parse = require('./parse')
+const { safeRe: re, t } = require('../internal/re')
+
+const coerce = (version, options) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+
+ if (typeof version === 'number') {
+ version = String(version)
+ }
+
+ if (typeof version !== 'string') {
+ return null
+ }
+
+ options = options || {}
+
+ let match = null
+ if (!options.rtl) {
+ match = version.match(re[t.COERCE])
+ } else {
+ // Find the right-most coercible string that does not share
+ // a terminus with a more left-ward coercible string.
+ // Eg, '1.2.3.4' wants to coerce '2.3.4', not '3.4' or '4'
+ //
+ // Walk through the string checking with a /g regexp
+ // Manually set the index so as to pick up overlapping matches.
+ // Stop when we get a match that ends at the string end, since no
+ // coercible string can be more right-ward without the same terminus.
+ let next
+ while ((next = re[t.COERCERTL].exec(version)) &&
+ (!match || match.index + match[0].length !== version.length)
+ ) {
+ if (!match ||
+ next.index + next[0].length !== match.index + match[0].length) {
+ match = next
+ }
+ re[t.COERCERTL].lastIndex = next.index + next[1].length + next[2].length
+ }
+ // leave it in a clean state
+ re[t.COERCERTL].lastIndex = -1
+ }
+
+ if (match === null) {
+ return null
+ }
+
+ return parse(`${match[2]}.${match[3] || '0'}.${match[4] || '0'}`, options)
+}
+module.exports = coerce
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/compare-build.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/compare-build.js
new file mode 100644
index 0000000..9eb881b
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/compare-build.js
@@ -0,0 +1,7 @@
+const SemVer = require('../classes/semver')
+const compareBuild = (a, b, loose) => {
+ const versionA = new SemVer(a, loose)
+ const versionB = new SemVer(b, loose)
+ return versionA.compare(versionB) || versionA.compareBuild(versionB)
+}
+module.exports = compareBuild
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js
new file mode 100644
index 0000000..4881fbe
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/compare-loose.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const compareLoose = (a, b) => compare(a, b, true)
+module.exports = compareLoose
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/compare.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/compare.js
new file mode 100644
index 0000000..748b7af
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/compare.js
@@ -0,0 +1,5 @@
+const SemVer = require('../classes/semver')
+const compare = (a, b, loose) =>
+ new SemVer(a, loose).compare(new SemVer(b, loose))
+
+module.exports = compare
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/diff.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/diff.js
new file mode 100644
index 0000000..fc224e3
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/diff.js
@@ -0,0 +1,65 @@
+const parse = require('./parse.js')
+
+const diff = (version1, version2) => {
+ const v1 = parse(version1, null, true)
+ const v2 = parse(version2, null, true)
+ const comparison = v1.compare(v2)
+
+ if (comparison === 0) {
+ return null
+ }
+
+ const v1Higher = comparison > 0
+ const highVersion = v1Higher ? v1 : v2
+ const lowVersion = v1Higher ? v2 : v1
+ const highHasPre = !!highVersion.prerelease.length
+ const lowHasPre = !!lowVersion.prerelease.length
+
+ if (lowHasPre && !highHasPre) {
+ // Going from prerelease -> no prerelease requires some special casing
+
+ // If the low version has only a major, then it will always be a major
+ // Some examples:
+ // 1.0.0-1 -> 1.0.0
+ // 1.0.0-1 -> 1.1.1
+ // 1.0.0-1 -> 2.0.0
+ if (!lowVersion.patch && !lowVersion.minor) {
+ return 'major'
+ }
+
+ // Otherwise it can be determined by checking the high version
+
+ if (highVersion.patch) {
+ // anything higher than a patch bump would result in the wrong version
+ return 'patch'
+ }
+
+ if (highVersion.minor) {
+ // anything higher than a minor bump would result in the wrong version
+ return 'minor'
+ }
+
+ // bumping major/minor/patch all have same result
+ return 'major'
+ }
+
+ // add the `pre` prefix if we are going to a prerelease version
+ const prefix = highHasPre ? 'pre' : ''
+
+ if (v1.major !== v2.major) {
+ return prefix + 'major'
+ }
+
+ if (v1.minor !== v2.minor) {
+ return prefix + 'minor'
+ }
+
+ if (v1.patch !== v2.patch) {
+ return prefix + 'patch'
+ }
+
+ // high and low are preleases
+ return 'prerelease'
+}
+
+module.exports = diff
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/eq.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/eq.js
new file mode 100644
index 0000000..271fed9
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/eq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const eq = (a, b, loose) => compare(a, b, loose) === 0
+module.exports = eq
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/gt.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/gt.js
new file mode 100644
index 0000000..d9b2156
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/gt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gt = (a, b, loose) => compare(a, b, loose) > 0
+module.exports = gt
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/gte.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/gte.js
new file mode 100644
index 0000000..5aeaa63
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/gte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const gte = (a, b, loose) => compare(a, b, loose) >= 0
+module.exports = gte
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/inc.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/inc.js
new file mode 100644
index 0000000..7670b1b
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/inc.js
@@ -0,0 +1,19 @@
+const SemVer = require('../classes/semver')
+
+const inc = (version, release, options, identifier, identifierBase) => {
+ if (typeof (options) === 'string') {
+ identifierBase = identifier
+ identifier = options
+ options = undefined
+ }
+
+ try {
+ return new SemVer(
+ version instanceof SemVer ? version.version : version,
+ options
+ ).inc(release, identifier, identifierBase).version
+ } catch (er) {
+ return null
+ }
+}
+module.exports = inc
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/lt.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/lt.js
new file mode 100644
index 0000000..b440ab7
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/lt.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lt = (a, b, loose) => compare(a, b, loose) < 0
+module.exports = lt
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/lte.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/lte.js
new file mode 100644
index 0000000..6dcc956
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/lte.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const lte = (a, b, loose) => compare(a, b, loose) <= 0
+module.exports = lte
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/major.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/major.js
new file mode 100644
index 0000000..4283165
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/major.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const major = (a, loose) => new SemVer(a, loose).major
+module.exports = major
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/minor.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/minor.js
new file mode 100644
index 0000000..57b3455
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/minor.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const minor = (a, loose) => new SemVer(a, loose).minor
+module.exports = minor
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/neq.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/neq.js
new file mode 100644
index 0000000..f944c01
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/neq.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const neq = (a, b, loose) => compare(a, b, loose) !== 0
+module.exports = neq
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/parse.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/parse.js
new file mode 100644
index 0000000..459b3b1
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/parse.js
@@ -0,0 +1,16 @@
+const SemVer = require('../classes/semver')
+const parse = (version, options, throwErrors = false) => {
+ if (version instanceof SemVer) {
+ return version
+ }
+ try {
+ return new SemVer(version, options)
+ } catch (er) {
+ if (!throwErrors) {
+ return null
+ }
+ throw er
+ }
+}
+
+module.exports = parse
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/patch.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/patch.js
new file mode 100644
index 0000000..63afca2
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/patch.js
@@ -0,0 +1,3 @@
+const SemVer = require('../classes/semver')
+const patch = (a, loose) => new SemVer(a, loose).patch
+module.exports = patch
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/prerelease.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/prerelease.js
new file mode 100644
index 0000000..06aa132
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/prerelease.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const prerelease = (version, options) => {
+ const parsed = parse(version, options)
+ return (parsed && parsed.prerelease.length) ? parsed.prerelease : null
+}
+module.exports = prerelease
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/rcompare.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/rcompare.js
new file mode 100644
index 0000000..0ac509e
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/rcompare.js
@@ -0,0 +1,3 @@
+const compare = require('./compare')
+const rcompare = (a, b, loose) => compare(b, a, loose)
+module.exports = rcompare
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/rsort.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/rsort.js
new file mode 100644
index 0000000..82404c5
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/rsort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const rsort = (list, loose) => list.sort((a, b) => compareBuild(b, a, loose))
+module.exports = rsort
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/satisfies.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/satisfies.js
new file mode 100644
index 0000000..50af1c1
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/satisfies.js
@@ -0,0 +1,10 @@
+const Range = require('../classes/range')
+const satisfies = (version, range, options) => {
+ try {
+ range = new Range(range, options)
+ } catch (er) {
+ return false
+ }
+ return range.test(version)
+}
+module.exports = satisfies
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/sort.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/sort.js
new file mode 100644
index 0000000..4d10917
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/sort.js
@@ -0,0 +1,3 @@
+const compareBuild = require('./compare-build')
+const sort = (list, loose) => list.sort((a, b) => compareBuild(a, b, loose))
+module.exports = sort
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/functions/valid.js b/desktop/node_modules/electron-packager/node_modules/semver/functions/valid.js
new file mode 100644
index 0000000..f27bae1
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/functions/valid.js
@@ -0,0 +1,6 @@
+const parse = require('./parse')
+const valid = (version, options) => {
+ const v = parse(version, options)
+ return v ? v.version : null
+}
+module.exports = valid
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/index.js b/desktop/node_modules/electron-packager/node_modules/semver/index.js
new file mode 100644
index 0000000..86d42ac
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/index.js
@@ -0,0 +1,89 @@
+// just pre-load all the stuff that index.js lazily exports
+const internalRe = require('./internal/re')
+const constants = require('./internal/constants')
+const SemVer = require('./classes/semver')
+const identifiers = require('./internal/identifiers')
+const parse = require('./functions/parse')
+const valid = require('./functions/valid')
+const clean = require('./functions/clean')
+const inc = require('./functions/inc')
+const diff = require('./functions/diff')
+const major = require('./functions/major')
+const minor = require('./functions/minor')
+const patch = require('./functions/patch')
+const prerelease = require('./functions/prerelease')
+const compare = require('./functions/compare')
+const rcompare = require('./functions/rcompare')
+const compareLoose = require('./functions/compare-loose')
+const compareBuild = require('./functions/compare-build')
+const sort = require('./functions/sort')
+const rsort = require('./functions/rsort')
+const gt = require('./functions/gt')
+const lt = require('./functions/lt')
+const eq = require('./functions/eq')
+const neq = require('./functions/neq')
+const gte = require('./functions/gte')
+const lte = require('./functions/lte')
+const cmp = require('./functions/cmp')
+const coerce = require('./functions/coerce')
+const Comparator = require('./classes/comparator')
+const Range = require('./classes/range')
+const satisfies = require('./functions/satisfies')
+const toComparators = require('./ranges/to-comparators')
+const maxSatisfying = require('./ranges/max-satisfying')
+const minSatisfying = require('./ranges/min-satisfying')
+const minVersion = require('./ranges/min-version')
+const validRange = require('./ranges/valid')
+const outside = require('./ranges/outside')
+const gtr = require('./ranges/gtr')
+const ltr = require('./ranges/ltr')
+const intersects = require('./ranges/intersects')
+const simplifyRange = require('./ranges/simplify')
+const subset = require('./ranges/subset')
+module.exports = {
+ parse,
+ valid,
+ clean,
+ inc,
+ diff,
+ major,
+ minor,
+ patch,
+ prerelease,
+ compare,
+ rcompare,
+ compareLoose,
+ compareBuild,
+ sort,
+ rsort,
+ gt,
+ lt,
+ eq,
+ neq,
+ gte,
+ lte,
+ cmp,
+ coerce,
+ Comparator,
+ Range,
+ satisfies,
+ toComparators,
+ maxSatisfying,
+ minSatisfying,
+ minVersion,
+ validRange,
+ outside,
+ gtr,
+ ltr,
+ intersects,
+ simplifyRange,
+ subset,
+ SemVer,
+ re: internalRe.re,
+ src: internalRe.src,
+ tokens: internalRe.t,
+ SEMVER_SPEC_VERSION: constants.SEMVER_SPEC_VERSION,
+ RELEASE_TYPES: constants.RELEASE_TYPES,
+ compareIdentifiers: identifiers.compareIdentifiers,
+ rcompareIdentifiers: identifiers.rcompareIdentifiers,
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/internal/constants.js b/desktop/node_modules/electron-packager/node_modules/semver/internal/constants.js
new file mode 100644
index 0000000..94be1c5
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/internal/constants.js
@@ -0,0 +1,35 @@
+// Note: this is the semver.org version of the spec that it implements
+// Not necessarily the package version of this code.
+const SEMVER_SPEC_VERSION = '2.0.0'
+
+const MAX_LENGTH = 256
+const MAX_SAFE_INTEGER = Number.MAX_SAFE_INTEGER ||
+/* istanbul ignore next */ 9007199254740991
+
+// Max safe segment length for coercion.
+const MAX_SAFE_COMPONENT_LENGTH = 16
+
+// Max safe length for a build identifier. The max length minus 6 characters for
+// the shortest version with a build 0.0.0+BUILD.
+const MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6
+
+const RELEASE_TYPES = [
+ 'major',
+ 'premajor',
+ 'minor',
+ 'preminor',
+ 'patch',
+ 'prepatch',
+ 'prerelease',
+]
+
+module.exports = {
+ MAX_LENGTH,
+ MAX_SAFE_COMPONENT_LENGTH,
+ MAX_SAFE_BUILD_LENGTH,
+ MAX_SAFE_INTEGER,
+ RELEASE_TYPES,
+ SEMVER_SPEC_VERSION,
+ FLAG_INCLUDE_PRERELEASE: 0b001,
+ FLAG_LOOSE: 0b010,
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/internal/debug.js b/desktop/node_modules/electron-packager/node_modules/semver/internal/debug.js
new file mode 100644
index 0000000..1c00e13
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/internal/debug.js
@@ -0,0 +1,9 @@
+const debug = (
+ typeof process === 'object' &&
+ process.env &&
+ process.env.NODE_DEBUG &&
+ /\bsemver\b/i.test(process.env.NODE_DEBUG)
+) ? (...args) => console.error('SEMVER', ...args)
+ : () => {}
+
+module.exports = debug
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/internal/identifiers.js b/desktop/node_modules/electron-packager/node_modules/semver/internal/identifiers.js
new file mode 100644
index 0000000..e612d0a
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/internal/identifiers.js
@@ -0,0 +1,23 @@
+const numeric = /^[0-9]+$/
+const compareIdentifiers = (a, b) => {
+ const anum = numeric.test(a)
+ const bnum = numeric.test(b)
+
+ if (anum && bnum) {
+ a = +a
+ b = +b
+ }
+
+ return a === b ? 0
+ : (anum && !bnum) ? -1
+ : (bnum && !anum) ? 1
+ : a < b ? -1
+ : 1
+}
+
+const rcompareIdentifiers = (a, b) => compareIdentifiers(b, a)
+
+module.exports = {
+ compareIdentifiers,
+ rcompareIdentifiers,
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/internal/parse-options.js b/desktop/node_modules/electron-packager/node_modules/semver/internal/parse-options.js
new file mode 100644
index 0000000..10d64ce
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/internal/parse-options.js
@@ -0,0 +1,15 @@
+// parse out just the options we care about
+const looseOption = Object.freeze({ loose: true })
+const emptyOpts = Object.freeze({ })
+const parseOptions = options => {
+ if (!options) {
+ return emptyOpts
+ }
+
+ if (typeof options !== 'object') {
+ return looseOption
+ }
+
+ return options
+}
+module.exports = parseOptions
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/internal/re.js b/desktop/node_modules/electron-packager/node_modules/semver/internal/re.js
new file mode 100644
index 0000000..21150b3
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/internal/re.js
@@ -0,0 +1,212 @@
+const {
+ MAX_SAFE_COMPONENT_LENGTH,
+ MAX_SAFE_BUILD_LENGTH,
+ MAX_LENGTH,
+} = require('./constants')
+const debug = require('./debug')
+exports = module.exports = {}
+
+// The actual regexps go on exports.re
+const re = exports.re = []
+const safeRe = exports.safeRe = []
+const src = exports.src = []
+const t = exports.t = {}
+let R = 0
+
+const LETTERDASHNUMBER = '[a-zA-Z0-9-]'
+
+// Replace some greedy regex tokens to prevent regex dos issues. These regex are
+// used internally via the safeRe object since all inputs in this library get
+// normalized first to trim and collapse all extra whitespace. The original
+// regexes are exported for userland consumption and lower level usage. A
+// future breaking change could export the safer regex only with a note that
+// all input should have extra whitespace removed.
+const safeRegexReplacements = [
+ ['\\s', 1],
+ ['\\d', MAX_LENGTH],
+ [LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH],
+]
+
+const makeSafeRegex = (value) => {
+ for (const [token, max] of safeRegexReplacements) {
+ value = value
+ .split(`${token}*`).join(`${token}{0,${max}}`)
+ .split(`${token}+`).join(`${token}{1,${max}}`)
+ }
+ return value
+}
+
+const createToken = (name, value, isGlobal) => {
+ const safe = makeSafeRegex(value)
+ const index = R++
+ debug(name, index, value)
+ t[name] = index
+ src[index] = value
+ re[index] = new RegExp(value, isGlobal ? 'g' : undefined)
+ safeRe[index] = new RegExp(safe, isGlobal ? 'g' : undefined)
+}
+
+// The following Regular Expressions can be used for tokenizing,
+// validating, and parsing SemVer version strings.
+
+// ## Numeric Identifier
+// A single `0`, or a non-zero digit followed by zero or more digits.
+
+createToken('NUMERICIDENTIFIER', '0|[1-9]\\d*')
+createToken('NUMERICIDENTIFIERLOOSE', '\\d+')
+
+// ## Non-numeric Identifier
+// Zero or more digits, followed by a letter or hyphen, and then zero or
+// more letters, digits, or hyphens.
+
+createToken('NONNUMERICIDENTIFIER', `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`)
+
+// ## Main Version
+// Three dot-separated numeric identifiers.
+
+createToken('MAINVERSION', `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})\\.` +
+ `(${src[t.NUMERICIDENTIFIER]})`)
+
+createToken('MAINVERSIONLOOSE', `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.` +
+ `(${src[t.NUMERICIDENTIFIERLOOSE]})`)
+
+// ## Pre-release Version Identifier
+// A numeric identifier, or a non-numeric identifier.
+
+createToken('PRERELEASEIDENTIFIER', `(?:${src[t.NUMERICIDENTIFIER]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+createToken('PRERELEASEIDENTIFIERLOOSE', `(?:${src[t.NUMERICIDENTIFIERLOOSE]
+}|${src[t.NONNUMERICIDENTIFIER]})`)
+
+// ## Pre-release Version
+// Hyphen, followed by one or more dot-separated pre-release version
+// identifiers.
+
+createToken('PRERELEASE', `(?:-(${src[t.PRERELEASEIDENTIFIER]
+}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`)
+
+createToken('PRERELEASELOOSE', `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]
+}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`)
+
+// ## Build Metadata Identifier
+// Any combination of digits, letters, or hyphens.
+
+createToken('BUILDIDENTIFIER', `${LETTERDASHNUMBER}+`)
+
+// ## Build Metadata
+// Plus sign, followed by one or more period-separated build metadata
+// identifiers.
+
+createToken('BUILD', `(?:\\+(${src[t.BUILDIDENTIFIER]
+}(?:\\.${src[t.BUILDIDENTIFIER]})*))`)
+
+// ## Full Version String
+// A main version, followed optionally by a pre-release version and
+// build metadata.
+
+// Note that the only major, minor, patch, and pre-release sections of
+// the version string are capturing groups. The build metadata is not a
+// capturing group, because it should not ever be used in version
+// comparison.
+
+createToken('FULLPLAIN', `v?${src[t.MAINVERSION]
+}${src[t.PRERELEASE]}?${
+ src[t.BUILD]}?`)
+
+createToken('FULL', `^${src[t.FULLPLAIN]}$`)
+
+// like full, but allows v1.2.3 and =1.2.3, which people do sometimes.
+// also, 1.0.0alpha1 (prerelease without the hyphen) which is pretty
+// common in the npm registry.
+createToken('LOOSEPLAIN', `[v=\\s]*${src[t.MAINVERSIONLOOSE]
+}${src[t.PRERELEASELOOSE]}?${
+ src[t.BUILD]}?`)
+
+createToken('LOOSE', `^${src[t.LOOSEPLAIN]}$`)
+
+createToken('GTLT', '((?:<|>)?=?)')
+
+// Something like "2.*" or "1.2.x".
+// Note that "x.x" is a valid xRange identifer, meaning "any version"
+// Only the first item is strictly required.
+createToken('XRANGEIDENTIFIERLOOSE', `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`)
+createToken('XRANGEIDENTIFIER', `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`)
+
+createToken('XRANGEPLAIN', `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIER]})` +
+ `(?:${src[t.PRERELEASE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGEPLAINLOOSE', `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})` +
+ `(?:${src[t.PRERELEASELOOSE]})?${
+ src[t.BUILD]}?` +
+ `)?)?`)
+
+createToken('XRANGE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`)
+createToken('XRANGELOOSE', `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Coercion.
+// Extract anything that could conceivably be a part of a valid semver
+createToken('COERCE', `${'(^|[^\\d])' +
+ '(\\d{1,'}${MAX_SAFE_COMPONENT_LENGTH}})` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?` +
+ `(?:$|[^\\d])`)
+createToken('COERCERTL', src[t.COERCE], true)
+
+// Tilde ranges.
+// Meaning is "reasonably at or greater than"
+createToken('LONETILDE', '(?:~>?)')
+
+createToken('TILDETRIM', `(\\s*)${src[t.LONETILDE]}\\s+`, true)
+exports.tildeTrimReplace = '$1~'
+
+createToken('TILDE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`)
+createToken('TILDELOOSE', `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// Caret ranges.
+// Meaning is "at least and backwards compatible with"
+createToken('LONECARET', '(?:\\^)')
+
+createToken('CARETTRIM', `(\\s*)${src[t.LONECARET]}\\s+`, true)
+exports.caretTrimReplace = '$1^'
+
+createToken('CARET', `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`)
+createToken('CARETLOOSE', `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`)
+
+// A simple gt/lt/eq thing, or just "" to indicate "any version"
+createToken('COMPARATORLOOSE', `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`)
+createToken('COMPARATOR', `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`)
+
+// An expression to strip any whitespace between the gtlt and the thing
+// it modifies, so that `> 1.2.3` ==> `>1.2.3`
+createToken('COMPARATORTRIM', `(\\s*)${src[t.GTLT]
+}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true)
+exports.comparatorTrimReplace = '$1$2$3'
+
+// Something like `1.2.3 - 1.2.4`
+// Note that these all use the loose form, because they'll be
+// checked against either the strict or loose comparator form
+// later.
+createToken('HYPHENRANGE', `^\\s*(${src[t.XRANGEPLAIN]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAIN]})` +
+ `\\s*$`)
+
+createToken('HYPHENRANGELOOSE', `^\\s*(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s+-\\s+` +
+ `(${src[t.XRANGEPLAINLOOSE]})` +
+ `\\s*$`)
+
+// Star ranges basically just allow anything at all.
+createToken('STAR', '(<|>)?=?\\s*\\*')
+// >=0.0.0 is like a star
+createToken('GTE0', '^\\s*>=\\s*0\\.0\\.0\\s*$')
+createToken('GTE0PRE', '^\\s*>=\\s*0\\.0\\.0-0\\s*$')
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/package.json b/desktop/node_modules/electron-packager/node_modules/semver/package.json
new file mode 100644
index 0000000..c145eca
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/package.json
@@ -0,0 +1,87 @@
+{
+ "name": "semver",
+ "version": "7.5.4",
+ "description": "The semantic version parser used by npm.",
+ "main": "index.js",
+ "scripts": {
+ "test": "tap",
+ "snap": "tap",
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
+ "lintfix": "npm run lint -- --fix",
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force"
+ },
+ "devDependencies": {
+ "@npmcli/eslint-config": "^4.0.0",
+ "@npmcli/template-oss": "4.17.0",
+ "tap": "^16.0.0"
+ },
+ "license": "ISC",
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/npm/node-semver.git"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "files": [
+ "bin/",
+ "lib/",
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "tap": {
+ "timeout": 30,
+ "coverage-map": "map.js",
+ "nyc-arg": [
+ "--exclude",
+ "tap-snapshots/**"
+ ]
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "author": "GitHub Inc.",
+ "templateOSS": {
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "4.17.0",
+ "engines": ">=10",
+ "ciVersions": [
+ "10.0.0",
+ "10.x",
+ "12.x",
+ "14.x",
+ "16.x",
+ "18.x"
+ ],
+ "npmSpec": "8",
+ "distPaths": [
+ "classes/",
+ "functions/",
+ "internal/",
+ "ranges/",
+ "index.js",
+ "preload.js",
+ "range.bnf"
+ ],
+ "allowPaths": [
+ "/classes/",
+ "/functions/",
+ "/internal/",
+ "/ranges/",
+ "/index.js",
+ "/preload.js",
+ "/range.bnf"
+ ],
+ "publish": "true"
+ }
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/preload.js b/desktop/node_modules/electron-packager/node_modules/semver/preload.js
new file mode 100644
index 0000000..947cd4f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/preload.js
@@ -0,0 +1,2 @@
+// XXX remove in v8 or beyond
+module.exports = require('./index.js')
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/range.bnf b/desktop/node_modules/electron-packager/node_modules/semver/range.bnf
new file mode 100644
index 0000000..d4c6ae0
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/range.bnf
@@ -0,0 +1,16 @@
+range-set ::= range ( logical-or range ) *
+logical-or ::= ( ' ' ) * '||' ( ' ' ) *
+range ::= hyphen | simple ( ' ' simple ) * | ''
+hyphen ::= partial ' - ' partial
+simple ::= primitive | partial | tilde | caret
+primitive ::= ( '<' | '>' | '>=' | '<=' | '=' ) partial
+partial ::= xr ( '.' xr ( '.' xr qualifier ? )? )?
+xr ::= 'x' | 'X' | '*' | nr
+nr ::= '0' | [1-9] ( [0-9] ) *
+tilde ::= '~' partial
+caret ::= '^' partial
+qualifier ::= ( '-' pre )? ( '+' build )?
+pre ::= parts
+build ::= parts
+parts ::= part ( '.' part ) *
+part ::= nr | [-0-9A-Za-z]+
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/gtr.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/gtr.js
new file mode 100644
index 0000000..db7e355
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/gtr.js
@@ -0,0 +1,4 @@
+// Determine if version is greater than all the versions possible in the range.
+const outside = require('./outside')
+const gtr = (version, range, options) => outside(version, range, '>', options)
+module.exports = gtr
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/intersects.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/intersects.js
new file mode 100644
index 0000000..e0e9b7c
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/intersects.js
@@ -0,0 +1,7 @@
+const Range = require('../classes/range')
+const intersects = (r1, r2, options) => {
+ r1 = new Range(r1, options)
+ r2 = new Range(r2, options)
+ return r1.intersects(r2, options)
+}
+module.exports = intersects
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/ltr.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/ltr.js
new file mode 100644
index 0000000..528a885
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/ltr.js
@@ -0,0 +1,4 @@
+const outside = require('./outside')
+// Determine if version is less than all the versions possible in the range
+const ltr = (version, range, options) => outside(version, range, '<', options)
+module.exports = ltr
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js
new file mode 100644
index 0000000..6e3d993
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/max-satisfying.js
@@ -0,0 +1,25 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+
+const maxSatisfying = (versions, range, options) => {
+ let max = null
+ let maxSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!max || maxSV.compare(v) === -1) {
+ // compare(max, v, true)
+ max = v
+ maxSV = new SemVer(max, options)
+ }
+ }
+ })
+ return max
+}
+module.exports = maxSatisfying
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js
new file mode 100644
index 0000000..9b60974
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/min-satisfying.js
@@ -0,0 +1,24 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const minSatisfying = (versions, range, options) => {
+ let min = null
+ let minSV = null
+ let rangeObj = null
+ try {
+ rangeObj = new Range(range, options)
+ } catch (er) {
+ return null
+ }
+ versions.forEach((v) => {
+ if (rangeObj.test(v)) {
+ // satisfies(v, range, options)
+ if (!min || minSV.compare(v) === 1) {
+ // compare(min, v, true)
+ min = v
+ minSV = new SemVer(min, options)
+ }
+ }
+ })
+ return min
+}
+module.exports = minSatisfying
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/min-version.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/min-version.js
new file mode 100644
index 0000000..350e1f7
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/min-version.js
@@ -0,0 +1,61 @@
+const SemVer = require('../classes/semver')
+const Range = require('../classes/range')
+const gt = require('../functions/gt')
+
+const minVersion = (range, loose) => {
+ range = new Range(range, loose)
+
+ let minver = new SemVer('0.0.0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = new SemVer('0.0.0-0')
+ if (range.test(minver)) {
+ return minver
+ }
+
+ minver = null
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let setMin = null
+ comparators.forEach((comparator) => {
+ // Clone to avoid manipulating the comparator's semver object.
+ const compver = new SemVer(comparator.semver.version)
+ switch (comparator.operator) {
+ case '>':
+ if (compver.prerelease.length === 0) {
+ compver.patch++
+ } else {
+ compver.prerelease.push(0)
+ }
+ compver.raw = compver.format()
+ /* fallthrough */
+ case '':
+ case '>=':
+ if (!setMin || gt(compver, setMin)) {
+ setMin = compver
+ }
+ break
+ case '<':
+ case '<=':
+ /* Ignore maximum versions */
+ break
+ /* istanbul ignore next */
+ default:
+ throw new Error(`Unexpected operation: ${comparator.operator}`)
+ }
+ })
+ if (setMin && (!minver || gt(minver, setMin))) {
+ minver = setMin
+ }
+ }
+
+ if (minver && range.test(minver)) {
+ return minver
+ }
+
+ return null
+}
+module.exports = minVersion
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/outside.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/outside.js
new file mode 100644
index 0000000..ae99b10
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/outside.js
@@ -0,0 +1,80 @@
+const SemVer = require('../classes/semver')
+const Comparator = require('../classes/comparator')
+const { ANY } = Comparator
+const Range = require('../classes/range')
+const satisfies = require('../functions/satisfies')
+const gt = require('../functions/gt')
+const lt = require('../functions/lt')
+const lte = require('../functions/lte')
+const gte = require('../functions/gte')
+
+const outside = (version, range, hilo, options) => {
+ version = new SemVer(version, options)
+ range = new Range(range, options)
+
+ let gtfn, ltefn, ltfn, comp, ecomp
+ switch (hilo) {
+ case '>':
+ gtfn = gt
+ ltefn = lte
+ ltfn = lt
+ comp = '>'
+ ecomp = '>='
+ break
+ case '<':
+ gtfn = lt
+ ltefn = gte
+ ltfn = gt
+ comp = '<'
+ ecomp = '<='
+ break
+ default:
+ throw new TypeError('Must provide a hilo val of "<" or ">"')
+ }
+
+ // If it satisfies the range it is not outside
+ if (satisfies(version, range, options)) {
+ return false
+ }
+
+ // From now on, variable terms are as if we're in "gtr" mode.
+ // but note that everything is flipped for the "ltr" function.
+
+ for (let i = 0; i < range.set.length; ++i) {
+ const comparators = range.set[i]
+
+ let high = null
+ let low = null
+
+ comparators.forEach((comparator) => {
+ if (comparator.semver === ANY) {
+ comparator = new Comparator('>=0.0.0')
+ }
+ high = high || comparator
+ low = low || comparator
+ if (gtfn(comparator.semver, high.semver, options)) {
+ high = comparator
+ } else if (ltfn(comparator.semver, low.semver, options)) {
+ low = comparator
+ }
+ })
+
+ // If the edge version comparator has a operator then our version
+ // isn't outside it
+ if (high.operator === comp || high.operator === ecomp) {
+ return false
+ }
+
+ // If the lowest version comparator has an operator and our version
+ // is less than it then it isn't higher than the range
+ if ((!low.operator || low.operator === comp) &&
+ ltefn(version, low.semver)) {
+ return false
+ } else if (low.operator === ecomp && ltfn(version, low.semver)) {
+ return false
+ }
+ }
+ return true
+}
+
+module.exports = outside
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/simplify.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/simplify.js
new file mode 100644
index 0000000..618d5b6
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/simplify.js
@@ -0,0 +1,47 @@
+// given a set of versions and a range, create a "simplified" range
+// that includes the same versions that the original range does
+// If the original range is shorter than the simplified one, return that.
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+module.exports = (versions, range, options) => {
+ const set = []
+ let first = null
+ let prev = null
+ const v = versions.sort((a, b) => compare(a, b, options))
+ for (const version of v) {
+ const included = satisfies(version, range, options)
+ if (included) {
+ prev = version
+ if (!first) {
+ first = version
+ }
+ } else {
+ if (prev) {
+ set.push([first, prev])
+ }
+ prev = null
+ first = null
+ }
+ }
+ if (first) {
+ set.push([first, null])
+ }
+
+ const ranges = []
+ for (const [min, max] of set) {
+ if (min === max) {
+ ranges.push(min)
+ } else if (!max && min === v[0]) {
+ ranges.push('*')
+ } else if (!max) {
+ ranges.push(`>=${min}`)
+ } else if (min === v[0]) {
+ ranges.push(`<=${max}`)
+ } else {
+ ranges.push(`${min} - ${max}`)
+ }
+ }
+ const simplified = ranges.join(' || ')
+ const original = typeof range.raw === 'string' ? range.raw : String(range)
+ return simplified.length < original.length ? simplified : range
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/subset.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/subset.js
new file mode 100644
index 0000000..1e5c268
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/subset.js
@@ -0,0 +1,247 @@
+const Range = require('../classes/range.js')
+const Comparator = require('../classes/comparator.js')
+const { ANY } = Comparator
+const satisfies = require('../functions/satisfies.js')
+const compare = require('../functions/compare.js')
+
+// Complex range `r1 || r2 || ...` is a subset of `R1 || R2 || ...` iff:
+// - Every simple range `r1, r2, ...` is a null set, OR
+// - Every simple range `r1, r2, ...` which is not a null set is a subset of
+// some `R1, R2, ...`
+//
+// Simple range `c1 c2 ...` is a subset of simple range `C1 C2 ...` iff:
+// - If c is only the ANY comparator
+// - If C is only the ANY comparator, return true
+// - Else if in prerelease mode, return false
+// - else replace c with `[>=0.0.0]`
+// - If C is only the ANY comparator
+// - if in prerelease mode, return true
+// - else replace C with `[>=0.0.0]`
+// - Let EQ be the set of = comparators in c
+// - If EQ is more than one, return true (null set)
+// - Let GT be the highest > or >= comparator in c
+// - Let LT be the lowest < or <= comparator in c
+// - If GT and LT, and GT.semver > LT.semver, return true (null set)
+// - If any C is a = range, and GT or LT are set, return false
+// - If EQ
+// - If GT, and EQ does not satisfy GT, return true (null set)
+// - If LT, and EQ does not satisfy LT, return true (null set)
+// - If EQ satisfies every C, return true
+// - Else return false
+// - If GT
+// - If GT.semver is lower than any > or >= comp in C, return false
+// - If GT is >=, and GT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the GT.semver tuple, return false
+// - If LT
+// - If LT.semver is greater than any < or <= comp in C, return false
+// - If LT is <=, and LT.semver does not satisfy every C, return false
+// - If GT.semver has a prerelease, and not in prerelease mode
+// - If no C has a prerelease and the LT.semver tuple, return false
+// - Else return true
+
+const subset = (sub, dom, options = {}) => {
+ if (sub === dom) {
+ return true
+ }
+
+ sub = new Range(sub, options)
+ dom = new Range(dom, options)
+ let sawNonNull = false
+
+ OUTER: for (const simpleSub of sub.set) {
+ for (const simpleDom of dom.set) {
+ const isSub = simpleSubset(simpleSub, simpleDom, options)
+ sawNonNull = sawNonNull || isSub !== null
+ if (isSub) {
+ continue OUTER
+ }
+ }
+ // the null set is a subset of everything, but null simple ranges in
+ // a complex range should be ignored. so if we saw a non-null range,
+ // then we know this isn't a subset, but if EVERY simple range was null,
+ // then it is a subset.
+ if (sawNonNull) {
+ return false
+ }
+ }
+ return true
+}
+
+const minimumVersionWithPreRelease = [new Comparator('>=0.0.0-0')]
+const minimumVersion = [new Comparator('>=0.0.0')]
+
+const simpleSubset = (sub, dom, options) => {
+ if (sub === dom) {
+ return true
+ }
+
+ if (sub.length === 1 && sub[0].semver === ANY) {
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ return true
+ } else if (options.includePrerelease) {
+ sub = minimumVersionWithPreRelease
+ } else {
+ sub = minimumVersion
+ }
+ }
+
+ if (dom.length === 1 && dom[0].semver === ANY) {
+ if (options.includePrerelease) {
+ return true
+ } else {
+ dom = minimumVersion
+ }
+ }
+
+ const eqSet = new Set()
+ let gt, lt
+ for (const c of sub) {
+ if (c.operator === '>' || c.operator === '>=') {
+ gt = higherGT(gt, c, options)
+ } else if (c.operator === '<' || c.operator === '<=') {
+ lt = lowerLT(lt, c, options)
+ } else {
+ eqSet.add(c.semver)
+ }
+ }
+
+ if (eqSet.size > 1) {
+ return null
+ }
+
+ let gtltComp
+ if (gt && lt) {
+ gtltComp = compare(gt.semver, lt.semver, options)
+ if (gtltComp > 0) {
+ return null
+ } else if (gtltComp === 0 && (gt.operator !== '>=' || lt.operator !== '<=')) {
+ return null
+ }
+ }
+
+ // will iterate one or zero times
+ for (const eq of eqSet) {
+ if (gt && !satisfies(eq, String(gt), options)) {
+ return null
+ }
+
+ if (lt && !satisfies(eq, String(lt), options)) {
+ return null
+ }
+
+ for (const c of dom) {
+ if (!satisfies(eq, String(c), options)) {
+ return false
+ }
+ }
+
+ return true
+ }
+
+ let higher, lower
+ let hasDomLT, hasDomGT
+ // if the subset has a prerelease, we need a comparator in the superset
+ // with the same tuple and a prerelease, or it's not a subset
+ let needDomLTPre = lt &&
+ !options.includePrerelease &&
+ lt.semver.prerelease.length ? lt.semver : false
+ let needDomGTPre = gt &&
+ !options.includePrerelease &&
+ gt.semver.prerelease.length ? gt.semver : false
+ // exception: <1.2.3-0 is the same as <1.2.3
+ if (needDomLTPre && needDomLTPre.prerelease.length === 1 &&
+ lt.operator === '<' && needDomLTPre.prerelease[0] === 0) {
+ needDomLTPre = false
+ }
+
+ for (const c of dom) {
+ hasDomGT = hasDomGT || c.operator === '>' || c.operator === '>='
+ hasDomLT = hasDomLT || c.operator === '<' || c.operator === '<='
+ if (gt) {
+ if (needDomGTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomGTPre.major &&
+ c.semver.minor === needDomGTPre.minor &&
+ c.semver.patch === needDomGTPre.patch) {
+ needDomGTPre = false
+ }
+ }
+ if (c.operator === '>' || c.operator === '>=') {
+ higher = higherGT(gt, c, options)
+ if (higher === c && higher !== gt) {
+ return false
+ }
+ } else if (gt.operator === '>=' && !satisfies(gt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (lt) {
+ if (needDomLTPre) {
+ if (c.semver.prerelease && c.semver.prerelease.length &&
+ c.semver.major === needDomLTPre.major &&
+ c.semver.minor === needDomLTPre.minor &&
+ c.semver.patch === needDomLTPre.patch) {
+ needDomLTPre = false
+ }
+ }
+ if (c.operator === '<' || c.operator === '<=') {
+ lower = lowerLT(lt, c, options)
+ if (lower === c && lower !== lt) {
+ return false
+ }
+ } else if (lt.operator === '<=' && !satisfies(lt.semver, String(c), options)) {
+ return false
+ }
+ }
+ if (!c.operator && (lt || gt) && gtltComp !== 0) {
+ return false
+ }
+ }
+
+ // if there was a < or >, and nothing in the dom, then must be false
+ // UNLESS it was limited by another range in the other direction.
+ // Eg, >1.0.0 <1.0.1 is still a subset of <2.0.0
+ if (gt && hasDomLT && !lt && gtltComp !== 0) {
+ return false
+ }
+
+ if (lt && hasDomGT && !gt && gtltComp !== 0) {
+ return false
+ }
+
+ // we needed a prerelease range in a specific tuple, but didn't get one
+ // then this isn't a subset. eg >=1.2.3-pre is not a subset of >=1.0.0,
+ // because it includes prereleases in the 1.2.3 tuple
+ if (needDomGTPre || needDomLTPre) {
+ return false
+ }
+
+ return true
+}
+
+// >=1.2.3 is lower than >1.2.3
+const higherGT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp > 0 ? a
+ : comp < 0 ? b
+ : b.operator === '>' && a.operator === '>=' ? b
+ : a
+}
+
+// <=1.2.3 is higher than <1.2.3
+const lowerLT = (a, b, options) => {
+ if (!a) {
+ return b
+ }
+ const comp = compare(a.semver, b.semver, options)
+ return comp < 0 ? a
+ : comp > 0 ? b
+ : b.operator === '<' && a.operator === '<=' ? b
+ : a
+}
+
+module.exports = subset
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js
new file mode 100644
index 0000000..6c8bc7e
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/to-comparators.js
@@ -0,0 +1,8 @@
+const Range = require('../classes/range')
+
+// Mostly just for testing and legacy API reasons
+const toComparators = (range, options) =>
+ new Range(range, options).set
+ .map(comp => comp.map(c => c.value).join(' ').trim().split(' '))
+
+module.exports = toComparators
diff --git a/desktop/node_modules/electron-packager/node_modules/semver/ranges/valid.js b/desktop/node_modules/electron-packager/node_modules/semver/ranges/valid.js
new file mode 100644
index 0000000..365f356
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/semver/ranges/valid.js
@@ -0,0 +1,11 @@
+const Range = require('../classes/range')
+const validRange = (range, options) => {
+ try {
+ // Return '*' instead of '' so that truthiness works.
+ // This will throw if it's invalid anyway
+ return new Range(range, options).range || '*'
+ } catch (er) {
+ return null
+ }
+}
+module.exports = validRange
diff --git a/desktop/node_modules/electron-packager/node_modules/universalify/LICENSE b/desktop/node_modules/electron-packager/node_modules/universalify/LICENSE
new file mode 100644
index 0000000..514e84e
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/universalify/LICENSE
@@ -0,0 +1,20 @@
+(The MIT License)
+
+Copyright (c) 2017, Ryan Zimmerman <opensrc@ryanzim.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the 'Software'), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/desktop/node_modules/electron-packager/node_modules/universalify/README.md b/desktop/node_modules/electron-packager/node_modules/universalify/README.md
new file mode 100644
index 0000000..aa12474
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/universalify/README.md
@@ -0,0 +1,76 @@
+# universalify
+
+[![Travis branch](https://img.shields.io/travis/RyanZim/universalify/master.svg)](https://travis-ci.org/RyanZim/universalify)
+![Coveralls github branch](https://img.shields.io/coveralls/github/RyanZim/universalify/master.svg)
+![npm](https://img.shields.io/npm/dm/universalify.svg)
+![npm](https://img.shields.io/npm/l/universalify.svg)
+
+Make a callback- or promise-based function support both promises and callbacks.
+
+Uses the native promise implementation.
+
+## Installation
+
+```bash
+npm install universalify
+```
+
+## API
+
+### `universalify.fromCallback(fn)`
+
+Takes a callback-based function to universalify, and returns the universalified function.
+
+Function must take a callback as the last parameter that will be called with the signature `(error, result)`. `universalify` does not support calling the callback with three or more arguments, and does not ensure that the callback is only called once.
+
+```js
+function callbackFn (n, cb) {
+ setTimeout(() => cb(null, n), 15)
+}
+
+const fn = universalify.fromCallback(callbackFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+### `universalify.fromPromise(fn)`
+
+Takes a promise-based function to universalify, and returns the universalified function.
+
+Function must return a valid JS promise. `universalify` does not ensure that a valid promise is returned.
+
+```js
+function promiseFn (n) {
+ return new Promise(resolve => {
+ setTimeout(() => resolve(n), 15)
+ })
+}
+
+const fn = universalify.fromPromise(promiseFn)
+
+// Works with Promises:
+fn('Hello World!')
+.then(result => console.log(result)) // -> Hello World!
+.catch(error => console.error(error))
+
+// Works with Callbacks:
+fn('Hi!', (error, result) => {
+ if (error) return console.error(error)
+ console.log(result)
+ // -> Hi!
+})
+```
+
+## License
+
+MIT
diff --git a/desktop/node_modules/electron-packager/node_modules/universalify/index.js b/desktop/node_modules/electron-packager/node_modules/universalify/index.js
new file mode 100644
index 0000000..ba6c662
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/universalify/index.js
@@ -0,0 +1,24 @@
+'use strict'
+
+exports.fromCallback = function (fn) {
+ return Object.defineProperty(function (...args) {
+ if (typeof args[args.length - 1] === 'function') fn.apply(this, args)
+ else {
+ return new Promise((resolve, reject) => {
+ fn.call(
+ this,
+ ...args,
+ (err, res) => (err != null) ? reject(err) : resolve(res)
+ )
+ })
+ }
+ }, 'name', { value: fn.name })
+}
+
+exports.fromPromise = function (fn) {
+ return Object.defineProperty(function (...args) {
+ const cb = args[args.length - 1]
+ if (typeof cb !== 'function') return fn.apply(this, args)
+ else fn.apply(this, args.slice(0, -1)).then(r => cb(null, r), cb)
+ }, 'name', { value: fn.name })
+}
diff --git a/desktop/node_modules/electron-packager/node_modules/universalify/package.json b/desktop/node_modules/electron-packager/node_modules/universalify/package.json
new file mode 100644
index 0000000..006d4cc
--- /dev/null
+++ b/desktop/node_modules/electron-packager/node_modules/universalify/package.json
@@ -0,0 +1,34 @@
+{
+ "name": "universalify",
+ "version": "2.0.0",
+ "description": "Make a callback- or promise-based function support both promises and callbacks.",
+ "keywords": [
+ "callback",
+ "native",
+ "promise"
+ ],
+ "homepage": "https://github.com/RyanZim/universalify#readme",
+ "bugs": "https://github.com/RyanZim/universalify/issues",
+ "license": "MIT",
+ "author": "Ryan Zimmerman <opensrc@ryanzim.com>",
+ "files": [
+ "index.js"
+ ],
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/RyanZim/universalify.git"
+ },
+ "scripts": {
+ "test": "standard && nyc tape test/*.js | colortape"
+ },
+ "devDependencies": {
+ "colortape": "^0.1.2",
+ "coveralls": "^3.0.1",
+ "nyc": "^15.0.0",
+ "standard": "^14.3.1",
+ "tape": "^5.0.1"
+ },
+ "engines": {
+ "node": ">= 10.0.0"
+ }
+}
diff --git a/desktop/node_modules/electron-packager/package.json b/desktop/node_modules/electron-packager/package.json
new file mode 100644
index 0000000..2529a9b
--- /dev/null
+++ b/desktop/node_modules/electron-packager/package.json
@@ -0,0 +1,140 @@
+{
+ "name": "electron-packager",
+ "version": "17.1.2",
+ "description": "Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI",
+ "main": "src/index.js",
+ "types": "src/index.d.ts",
+ "bin": {
+ "electron-packager": "bin/electron-packager.js"
+ },
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/electron/electron-packager.git"
+ },
+ "author": "Mark Lee",
+ "license": "BSD-2-Clause",
+ "bugs": {
+ "url": "https://github.com/electron/electron-packager/issues"
+ },
+ "homepage": "https://github.com/electron/electron-packager",
+ "files": [
+ "collaborators.md",
+ "bin",
+ "docs/*.md",
+ "NEWS.md",
+ "src",
+ "usage.txt"
+ ],
+ "dependencies": {
+ "@electron/asar": "^3.2.1",
+ "@electron/get": "^2.0.0",
+ "@electron/notarize": "^1.2.3",
+ "@electron/osx-sign": "^1.0.5",
+ "@electron/universal": "^1.3.2",
+ "cross-spawn-windows-exe": "^1.2.0",
+ "debug": "^4.0.1",
+ "extract-zip": "^2.0.0",
+ "filenamify": "^4.1.0",
+ "fs-extra": "^11.1.0",
+ "galactus": "^1.0.0",
+ "get-package-info": "^1.0.0",
+ "junk": "^3.1.0",
+ "parse-author": "^2.0.0",
+ "plist": "^3.0.0",
+ "rcedit": "^3.0.1",
+ "resolve": "^1.1.6",
+ "semver": "^7.1.3",
+ "yargs-parser": "^21.1.1"
+ },
+ "devDependencies": {
+ "@typescript-eslint/eslint-plugin": "^4.0.1",
+ "@typescript-eslint/parser": "^4.0.1",
+ "ava": "^3.10.1",
+ "buffer-equal": "^1.0.0",
+ "codecov": "^3.0.0",
+ "eslint": "^7.12.1",
+ "eslint-config-standard": "^16.0.0",
+ "eslint-plugin-ava": "^13.2.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-node": "^11.0.0",
+ "eslint-plugin-promise": "^5.1.0",
+ "nyc": "^15.0.0",
+ "pkg-up": "^3.0.1",
+ "sinon": "^15.0.1",
+ "tsd": "^0.14.0",
+ "typedoc": "^0.19.0",
+ "typescript": "^4.0.2"
+ },
+ "engines": {
+ "node": ">= 14.17.5"
+ },
+ "scripts": {
+ "ava": "ava test/index.js",
+ "codecov": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
+ "coverage": "nyc ava test/index.js",
+ "docs:build": "node test/ci/build_docs.js",
+ "lint": "npm run lint:js && npm run lint:ts",
+ "lint:js": "eslint .",
+ "lint:ts": "eslint --config .eslintrc.typescript.js --ext .ts .",
+ "test": "npm run lint && npm run tsd && npm run coverage",
+ "tsd": "tsd"
+ },
+ "directories": {
+ "test": "test"
+ },
+ "keywords": [
+ "electron",
+ "packager",
+ "bundler",
+ "app"
+ ],
+ "ava": {
+ "timeout": "60s"
+ },
+ "eslintConfig": {
+ "extends": [
+ "eslint:recommended",
+ "plugin:ava/recommended",
+ "plugin:import/errors",
+ "plugin:import/warnings",
+ "plugin:promise/recommended",
+ "standard"
+ ],
+ "parserOptions": {
+ "sourceType": "script"
+ },
+ "plugins": [
+ "ava"
+ ],
+ "rules": {
+ "ava/no-import-test-files": 0,
+ "ava/no-ignored-test-files": 0,
+ "indent": [
+ "error",
+ 2,
+ {
+ "CallExpression": {
+ "arguments": "first"
+ },
+ "SwitchCase": 1
+ }
+ ],
+ "no-console": 0,
+ "strict": "error"
+ }
+ },
+ "eslintIgnore": [
+ "typedoc/**/*",
+ "**/test/fixtures/**/node_modules/**",
+ "**/test/work/*"
+ ],
+ "tsd": {
+ "directory": "test"
+ },
+ "funding": {
+ "url": "https://github.com/electron/electron-packager?sponsor=1"
+ },
+ "resolutions": {
+ "got": "11.8.5"
+ }
+}
diff --git a/desktop/node_modules/electron-packager/src/cli.js b/desktop/node_modules/electron-packager/src/cli.js
new file mode 100644
index 0000000..29f911d
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/cli.js
@@ -0,0 +1,143 @@
+'use strict'
+
+const { info, hostInfo, warning } = require('./common')
+const fs = require('fs-extra')
+const { initializeProxy } = require('@electron/get')
+const packager = require('..')
+const path = require('path')
+const yargs = require('yargs-parser')
+
+/* istanbul ignore next */
+async function printUsageAndExit (isError) {
+ const usage = (await fs.readFile(path.resolve(__dirname, '..', 'usage.txt'))).toString()
+ const print = isError ? console.error : console.log
+ print(usage)
+ process.exit(isError ? 1 : 0)
+}
+
+module.exports = {
+ parseArgs: function parseArgs (argv) {
+ const args = yargs(argv, {
+ boolean: [
+ 'all',
+ 'deref-symlinks',
+ 'download.rejectUnauthorized',
+ 'junk',
+ 'overwrite',
+ 'prune',
+ 'quiet'
+ ],
+ default: {
+ 'deref-symlinks': true,
+ 'download.rejectUnauthorized': true,
+ junk: true,
+ prune: true
+ },
+ string: [
+ 'electron-version',
+ 'out'
+ ]
+ })
+
+ args.dir = args._[0]
+ args.name = args._[1]
+
+ const protocolSchemes = [].concat(args.protocol || [])
+ const protocolNames = [].concat(args.protocolName || [])
+
+ if (protocolSchemes && protocolNames && protocolNames.length === protocolSchemes.length) {
+ args.protocols = protocolSchemes.map(function (scheme, i) {
+ return { schemes: [scheme], name: protocolNames[i] }
+ })
+ }
+
+ if (args.out === '') {
+ warning('Specifying --out= without a value is the same as the default value', args.quiet)
+ args.out = null
+ }
+
+ // Overrides for multi-typed arguments, because minimist doesn't support it
+
+ // asar: `Object` or `true`
+ if (args.asar === 'true' || args.asar instanceof Array) {
+ warning('--asar does not take any arguments, it only has sub-properties (see --help)', args.quiet)
+ args.asar = true
+ }
+
+ // osx-sign: `Object` or `true`
+ if (args.osxSign === 'true') {
+ warning('--osx-sign does not take any arguments, it only has sub-properties (see --help)', args.quiet)
+ args.osxSign = true
+ } else if (typeof args['osx-sign'] === 'object') {
+ if (Array.isArray(args['osx-sign'])) {
+ warning('Remove --osx-sign (the bare flag) from the command line, only specify sub-properties (see --help)', args.quiet)
+ } else {
+ // Keep kebab case of sub properties
+ args.osxSign = args['osx-sign']
+ }
+ }
+
+ if (args.osxNotarize) {
+ let notarize = true
+ if (typeof args.osxNotarize !== 'object' || Array.isArray(args.osxNotarize)) {
+ warning('--osx-notarize does not take any arguments, it only has sub-properties (see --help)', args.quiet)
+ notarize = false
+ } else if (!args.osxSign) {
+ warning('Notarization was enabled but macOS code signing was not, code signing is a requirement for notarization, notarize will not run', args.quiet)
+ notarize = false
+ }
+
+ if (!notarize) {
+ args.osxNotarize = null
+ }
+ }
+
+ // tmpdir: `String` or `false`
+ if (args.tmpdir === 'false') {
+ warning('--tmpdir=false is deprecated, use --no-tmpdir instead', args.quiet)
+ args.tmpdir = false
+ }
+
+ return args
+ },
+ run: /* istanbul ignore next */ async function run (argv) {
+ const args = module.exports.parseArgs(argv)
+
+ // temporary fix for https://github.com/nodejs/node/issues/6456
+ for (const stdioWriter of [process.stdout, process.stderr]) {
+ if (stdioWriter._handle && stdioWriter._handle.setBlocking) {
+ stdioWriter._handle.setBlocking(true)
+ }
+ }
+
+ if (args.help) {
+ await printUsageAndExit(false)
+ } else if (args.version) {
+ if (typeof args.version !== 'boolean') {
+ console.error('--version does not take an argument. Perhaps you meant --app-version or --electron-version?\n')
+ }
+ console.log(hostInfo())
+ process.exit(0)
+ } else if (!args.dir) {
+ await printUsageAndExit(true)
+ }
+
+ initializeProxy()
+
+ try {
+ const appPaths = await packager(args)
+ if (appPaths.length > 1) {
+ info(`Wrote new apps to:\n${appPaths.join('\n')}`, args.quiet)
+ } else if (appPaths.length === 1) {
+ info(`Wrote new app to: ${appPaths[0]}`, args.quiet)
+ }
+ } catch (err) {
+ if (err.message) {
+ console.error(err.message)
+ } else {
+ console.error(err, err.stack)
+ }
+ process.exit(1)
+ }
+ }
+}
diff --git a/desktop/node_modules/electron-packager/src/common.js b/desktop/node_modules/electron-packager/src/common.js
new file mode 100644
index 0000000..1f6111f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/common.js
@@ -0,0 +1,128 @@
+'use strict'
+
+const debug = require('debug')('electron-packager')
+const filenamify = require('filenamify')
+const fs = require('fs-extra')
+const metadata = require('../package.json')
+const os = require('os')
+const path = require('path')
+
+function sanitizeAppName (name) {
+ return filenamify(name, { replacement: '-' })
+}
+
+function generateFinalBasename (opts) {
+ return `${sanitizeAppName(opts.name)}-${opts.platform}-${opts.arch}`
+}
+
+function generateFinalPath (opts) {
+ return path.join(opts.out || process.cwd(), generateFinalBasename(opts))
+}
+
+function info (message, quiet) {
+ if (!quiet) {
+ console.error(message)
+ }
+}
+
+function warning (message, quiet) {
+ if (!quiet) {
+ console.warn(`WARNING: ${message}`)
+ }
+}
+
+function subOptionWarning (properties, optionName, parameter, value, quiet) {
+ if (Object.prototype.hasOwnProperty.call(properties, parameter)) {
+ warning(`${optionName}.${parameter} will be inferred from the main options`, quiet)
+ }
+ properties[parameter] = value
+}
+
+function createAsarOpts (opts) {
+ let asarOptions
+ if (opts.asar === true) {
+ asarOptions = {}
+ } else if (typeof opts.asar === 'object') {
+ asarOptions = opts.asar
+ } else if (opts.asar === false || opts.asar === undefined) {
+ return false
+ } else {
+ warning(`asar parameter set to an invalid value (${opts.asar}), ignoring and disabling asar`, opts.quiet)
+ return false
+ }
+
+ return asarOptions
+}
+
+module.exports = {
+ ensureArray: function ensureArray (value) {
+ return Array.isArray(value) ? value : [value]
+ },
+ isPlatformMac: function isPlatformMac (platform) {
+ return platform === 'darwin' || platform === 'mas'
+ },
+
+ createAsarOpts: createAsarOpts,
+
+ deprecatedParameter: function deprecatedParameter (properties, oldName, newName, newCLIName, quiet) {
+ if (Object.prototype.hasOwnProperty.call(properties, oldName)) {
+ warning(`The ${oldName} parameter is deprecated, use ${newName} (or --${newCLIName} in the CLI) instead`, quiet)
+ if (!Object.prototype.hasOwnProperty.call(properties, newName)) {
+ properties[newName] = properties[oldName]
+ }
+ delete properties[oldName]
+ }
+ },
+ subOptionWarning: subOptionWarning,
+
+ baseTempDir: function baseTempDir (opts) {
+ return path.join(opts.tmpdir || os.tmpdir(), 'electron-packager')
+ },
+ generateFinalBasename: generateFinalBasename,
+ generateFinalPath: generateFinalPath,
+ sanitizeAppName,
+ /**
+ * Convert slashes to UNIX-format separators.
+ */
+ normalizePath: function normalizePath (pathToNormalize) {
+ return pathToNormalize.replace(/\\/g, '/')
+ },
+ /**
+ * Validates that the application directory contains a package.json file, and that there exists an
+ * appropriate main entry point file, per the rules of the "main" field in package.json.
+ *
+ * See: https://docs.npmjs.com/cli/v6/configuring-npm/package-json#main
+ *
+ * @param appDir - the directory specified by the user
+ * @param bundledAppDir - the directory where the appDir is copied to in the bundled Electron app
+ */
+ validateElectronApp: async function validateElectronApp (appDir, bundledAppDir) {
+ debug('Validating bundled Electron app')
+ debug('Checking for a package.json file')
+
+ const bundledPackageJSONPath = path.join(bundledAppDir, 'package.json')
+ if (!(await fs.pathExists(bundledPackageJSONPath))) {
+ const originalPackageJSONPath = path.join(appDir, 'package.json')
+ throw new Error(`Application manifest was not found. Make sure "${originalPackageJSONPath}" exists and does not get ignored by your ignore option`)
+ }
+
+ debug('Checking for the main entry point file')
+ const packageJSON = await fs.readJson(bundledPackageJSONPath)
+ const mainScriptBasename = packageJSON.main || 'index.js'
+ const mainScript = path.resolve(bundledAppDir, mainScriptBasename)
+ if (!(await fs.pathExists(mainScript))) {
+ const originalMainScript = path.join(appDir, mainScriptBasename)
+ throw new Error(`The main entry point to your app was not found. Make sure "${originalMainScript}" exists and does not get ignored by your ignore option`)
+ }
+
+ debug('Validation complete')
+ },
+
+ hostInfo: function hostInfo () {
+ return `Electron Packager ${metadata.version}\n` +
+ `Node ${process.version}\n` +
+ `Host Operating system: ${process.platform} ${os.release()} (${process.arch})`
+ },
+ info: info,
+ warning: warning
+}
diff --git a/desktop/node_modules/electron-packager/src/copy-filter.js b/desktop/node_modules/electron-packager/src/copy-filter.js
new file mode 100644
index 0000000..ddfc608
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/copy-filter.js
@@ -0,0 +1,110 @@
+'use strict'
+
+const common = require('./common')
+const debug = require('debug')('electron-packager')
+const junk = require('junk')
+const path = require('path')
+const prune = require('./prune')
+const targets = require('./targets')
+
+const DEFAULT_IGNORES = [
+ '/package-lock\\.json$',
+ '/yarn\\.lock$',
+ '/\\.git($|/)',
+ '/node_modules/\\.bin($|/)',
+ '\\.o(bj)?$',
+ '/node_gyp_bins($|/)'
+]
+
+function populateIgnoredPaths (opts) {
+ opts.originalIgnore = opts.ignore
+ if (typeof (opts.ignore) !== 'function') {
+ if (opts.ignore) {
+ opts.ignore = common.ensureArray(opts.ignore).concat(DEFAULT_IGNORES)
+ } else {
+ opts.ignore = [].concat(DEFAULT_IGNORES)
+ }
+ if (process.platform === 'linux') {
+ opts.ignore.push(common.baseTempDir(opts))
+ }
+
+ debug('Ignored path regular expressions:', opts.ignore)
+ }
+}
+
+function generateIgnoredOutDirs (opts) {
+ const normalizedOut = opts.out ? path.resolve(opts.out) : null
+ const ignoredOutDirs = []
+ if (normalizedOut === null || normalizedOut === process.cwd()) {
+ for (const [platform, archs] of Object.entries(targets.officialPlatformArchCombos)) {
+ for (const arch of archs) {
+ const basenameOpts = {
+ arch: arch,
+ name: opts.name,
+ platform: platform
+ }
+ ignoredOutDirs.push(path.join(process.cwd(), common.generateFinalBasename(basenameOpts)))
+ }
+ }
+ } else {
+ ignoredOutDirs.push(normalizedOut)
+ }
+
+ debug('Ignored paths based on the out param:', ignoredOutDirs)
+
+ return ignoredOutDirs
+}
+
+function generateFilterFunction (ignore) {
+ if (typeof (ignore) === 'function') {
+ return file => !ignore(file)
+ } else {
+ const ignoredRegexes = common.ensureArray(ignore)
+
+ return function filterByRegexes (file) {
+ return !ignoredRegexes.some(regex => file.match(regex))
+ }
+ }
+}
+
+function userPathFilter (opts) {
+ const filterFunc = generateFilterFunction(opts.ignore || [])
+ const ignoredOutDirs = generateIgnoredOutDirs(opts)
+ const pruner = opts.prune ? new prune.Pruner(opts.dir, opts.quiet) : null
+
+ return async function filter (file) {
+ const fullPath = path.resolve(file)
+
+ if (ignoredOutDirs.includes(fullPath)) {
+ return false
+ }
+
+ if (opts.junk !== false) { // defaults to true
+ if (junk.is(path.basename(fullPath))) {
+ return false
+ }
+ }
+
+ let name = fullPath.split(path.resolve(opts.dir))[1]
+
+ if (path.sep === '\\') {
+ name = common.normalizePath(name)
+ }
+
+ if (pruner && name.startsWith('/node_modules/')) {
+ if (await prune.isModule(file)) {
+ return pruner.pruneModule(name)
+ } else {
+ return filterFunc(name)
+ }
+ }
+
+ return filterFunc(name)
+ }
+}
+
+module.exports = {
+ populateIgnoredPaths,
+ generateIgnoredOutDirs,
+ userPathFilter
+}
diff --git a/desktop/node_modules/electron-packager/src/download.js b/desktop/node_modules/electron-packager/src/download.js
new file mode 100644
index 0000000..9c104a0
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/download.js
@@ -0,0 +1,37 @@
+'use strict'
+
+const common = require('./common')
+const debug = require('debug')('electron-packager')
+const { downloadArtifact } = require('@electron/get')
+const semver = require('semver')
+const targets = require('./targets')
+
+function createDownloadOpts (opts, platform, arch) {
+ const downloadOpts = { ...opts.download }
+
+ common.subOptionWarning(downloadOpts, 'download', 'platform', platform, opts.quiet)
+ common.subOptionWarning(downloadOpts, 'download', 'arch', arch, opts.quiet)
+ common.subOptionWarning(downloadOpts, 'download', 'version', opts.electronVersion, opts.quiet)
+ common.subOptionWarning(downloadOpts, 'download', 'artifactName', 'electron', opts.quiet)
+
+ return downloadOpts
+}
+
+module.exports = {
+ createDownloadCombos: function createDownloadCombos (opts, selectedPlatforms, selectedArchs, ignoreFunc) {
+ return targets.createPlatformArchPairs(opts, selectedPlatforms, selectedArchs, ignoreFunc).map(([platform, arch]) => {
+ return createDownloadOpts(opts, platform, arch)
+ })
+ },
+ createDownloadOpts: createDownloadOpts,
+ downloadElectronZip: async function downloadElectronZip (downloadOpts) {
+ // armv7l builds have only been backfilled for Electron >= 1.0.0.
+ // See: https://github.com/electron/electron/pull/6986
+ /* istanbul ignore if */
+ if (downloadOpts.arch === 'armv7l' && semver.lt(downloadOpts.version, '1.0.0')) {
+ downloadOpts.arch = 'arm'
+ }
+ debug(`Downloading Electron with options ${JSON.stringify(downloadOpts)}`)
+ return downloadArtifact(downloadOpts)
+ }
+}
diff --git a/desktop/node_modules/electron-packager/src/hooks.js b/desktop/node_modules/electron-packager/src/hooks.js
new file mode 100644
index 0000000..a16426a
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/hooks.js
@@ -0,0 +1,24 @@
+'use strict'
+
+const { promisify } = require('util')
+
+module.exports = {
+ promisifyHooks: async function promisifyHooks (hooks, args) {
+ if (!hooks || !Array.isArray(hooks)) {
+ return Promise.resolve()
+ }
+
+ await Promise.all(hooks.map(hookFn => promisify(hookFn).apply(this, args)))
+ },
+ serialHooks: function serialHooks (hooks) {
+ return async function () {
+ const args = Array.prototype.splice.call(arguments, 0, arguments.length - 1)
+ const done = arguments[arguments.length - 1]
+ for (const hook of hooks) {
+ await hook.apply(this, args)
+ }
+
+ return done() // eslint-disable-line promise/no-callback-in-promise
+ }
+ }
+}
diff --git a/desktop/node_modules/electron-packager/src/index.d.ts b/desktop/node_modules/electron-packager/src/index.d.ts
new file mode 100644
index 0000000..5a2b63e
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/index.d.ts
@@ -0,0 +1,607 @@
+// Originally based on the type definitions for electron-packager 14.0
+// Project: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/electron-packager
+// Original Authors:
+// * Maxime LUCE <https://github.com/SomaticIT>
+// * Juan Jimenez-Anca <https://github.com/cortopy>
+// * John Kleinschmidt <https://github.com/jkleinsc>
+// * Brendan Forster <https://github.com/shiftkey>
+// * Mark Lee <https://github.com/malept>
+// * Florian Keller <https://github.com/ffflorian>
+
+import { CreateOptions as AsarOptions } from '@electron/asar';
+import { ElectronDownloadRequestOptions as ElectronDownloadOptions } from '@electron/get';
+import {
+ LegacyNotarizeCredentials,
+ NotaryToolCredentials,
+ TransporterOptions
+} from '@electron/notarize/lib/types';
+import { SignOptions } from '@electron/osx-sign/dist/esm/types';
+import type { makeUniversalApp } from '@electron/universal';
+
+type MakeUniversalOpts = Parameters<typeof makeUniversalApp>[0]
+
+type NotarizeLegacyOptions = LegacyNotarizeCredentials & TransporterOptions;
+
+/**
+ * Bundles Electron-based application source code with a renamed/customized Electron executable and
+ * its supporting files into folders ready for distribution.
+ *
+ * Briefly, this function:
+ * - finds or downloads the correct release of Electron
+ * - uses that version of Electron to create a app in `<out>/<appname>-<platform>-<arch>`
+ *
+ * Short example:
+ *
+ * ```javascript
+ * const packager = require('electron-packager')
+ *
+ * async function bundleElectronApp(options) {
+ * const appPaths = await packager(options)
+ * console.log(`Electron app bundles created:\n${appPaths.join("\n")}`)
+ * }
+ * ```
+ *
+ * @param opts - Options to configure packaging.
+ *
+ * @returns A Promise containing the paths to the newly created application bundles.
+ */
+declare function electronPackager(opts: electronPackager.Options): Promise<string[]>;
+
+declare namespace electronPackager {
+ /**
+ * Architectures that have been supported by the official Electron prebuilt binaries, past
+ * and present.
+ */
+ type OfficialArch = 'ia32' | 'x64' | 'armv7l' | 'arm64' | 'mips64el' | 'universal';
+ /**
+ * Platforms that have been supported by the official Electron prebuilt binaries, past and present.
+ */
+ type OfficialPlatform = 'linux' | 'win32' | 'darwin' | 'mas';
+ type TargetArch = OfficialArch | string;
+ type TargetPlatform = OfficialPlatform | string;
+ type ArchOption = TargetArch | 'all';
+ type PlatformOption = TargetPlatform | 'all';
+
+ /**
+ * A predicate function that, given an absolute file `path`, returns `true` if the file should be
+ * ignored, or `false` if the file should be kept. *This does not use any of the default ignored
+ * files/directories listed for the {@link ignore} option.*
+ */
+ type IgnoreFunction = (path: string) => boolean;
+ /**
+ * A function that is called on the completion of a packaging stage.
+ *
+ * By default, the functions are called in parallel (via
+ * [`Promise.all`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all)).
+ * If you need the functions called serially, there is a utility function provided. Please note that
+ * **callback-style functions are not supported by `serialHooks`.** For example:
+ *
+ * ```javascript
+ * const packager = require('electron-packager')
+ * const { serialHooks } = require('electron-packager/src/hooks')
+ *
+ * packager({
+ * // ...
+ * afterCopy: [serialHooks([
+ * (buildPath, electronVersion, platform, arch) => {
+ * return new Promise((resolve, reject) => {
+ * setTimeout(() => {
+ * console.log('first function')
+ * resolve()
+ * }, 1000)
+ * })
+ * },
+ * (buildPath, electronVersion, platform, arch) => {
+ * console.log('second function')
+ * }
+ * ])],
+ * // ...
+ * })
+ * ```
+ *
+ * For real-world examples of `HookFunction`s, see the [list of related
+ * plugins](https://github.com/electron/electron-packager#plugins).
+ */
+ type HookFunction =
+ /**
+ * @param buildPath - For {@link afterExtract}, the path to the temporary folder where the prebuilt
+ * Electron binary has been extracted to. For {@link afterCopy} and {@link afterPrune}, the path to the
+ * folder where the Electron app has been copied to. For {@link afterComplete}, the final directory
+ * of the packaged application.
+ * @param electronVersion - the version of Electron that is being bundled with the application.
+ * @param platform - The target platform you are packaging for.
+ * @param arch - The target architecture you are packaging for.
+ * @param callback - Must be called once you have completed your actions.
+ */
+ (
+ buildPath: string,
+ electronVersion: string,
+ platform: TargetArch,
+ arch: TargetArch,
+ callback: (err?: Error | null) => void
+ ) => void;
+
+ type TargetDefinition = {
+ arch: TargetArch;
+ platform: TargetPlatform;
+ }
+ type FinalizePackageTargetsHookFunction = (targets: TargetDefinition[], callback: (err?: Error | null) => void) => void;
+
+ /** See the documentation for [`@electron/osx-sign`](https://npm.im/@electron/osx-sign#opts) for details. */
+ type OsxSignOptions = Omit<SignOptions, 'app' | 'binaries' | 'platform' | 'version'>;
+
+ /**
+ * See the documentation for [`@electron/notarize`](https://npm.im/@electron/notarize#method-notarizeopts-promisevoid)
+ * for details.
+ */
+ type OsxNotarizeOptions =
+ | ({ tool?: 'legacy' } & NotarizeLegacyOptions)
+ | ({ tool: 'notarytool' } & NotaryToolCredentials);
+
+ /**
+ * See the documentation for [`@electron/universal`](https://github.com/electron/universal)
+ * for details.
+ */
+ type OsxUniversalOptions = Omit<MakeUniversalOpts, 'x64AppPath' | 'arm64AppPath' | 'outAppPath' | 'force'>
+
+ /**
+ * Defines URL protocol schemes to be used on macOS.
+ */
+ interface MacOSProtocol {
+ /**
+ * The descriptive name. Maps to the `CFBundleURLName` metadata property.
+ */
+ name: string;
+ /**
+ * One or more protocol schemes associated with the app. For example, specifying `myapp`
+ * would cause URLs such as `myapp://path` to be opened with the app. Maps to the
+ * `CFBundleURLSchemes` metadata property.
+ */
+ schemes: string[];
+ }
+
+ /**
+ * A collection of application metadata to embed into the Windows executable.
+ *
+ * For more information, read the [`rcedit` Node module documentation](https://github.com/electron/node-rcedit#docs).
+ */
+ interface Win32MetadataOptions {
+ /** Defaults to the `author` name from the nearest `package.json`. */
+ CompanyName?: string;
+ /** Defaults to either `productName` or `name` from the nearest `package.json`. */
+ FileDescription?: string;
+ /** Defaults to the renamed Electron `.exe` file. */
+ OriginalFilename?: string;
+ /** Defaults to either `productName` or `name` from the nearest `package.json`. */
+ ProductName?: string;
+ /** Defaults to either `productName` or `name` from the nearest `package.json`. */
+ InternalName?: string;
+ /** See [MSDN](https://msdn.microsoft.com/en-us/library/6ad1fshk.aspx#Anchor_9) for details. */
+ 'requested-execution-level'?: 'asInvoker' | 'highestAvailable' | 'requireAdministrator';
+ /**
+ * Path to a local manifest file.
+ *
+ * See [MSDN](https://msdn.microsoft.com/en-us/library/windows/desktop/aa374191.aspx) for more details.
+ */
+ 'application-manifest'?: string;
+ }
+
+ /** Options passed to the `packager()` function. */
+ interface Options {
+ /** The source directory. */
+ dir: string;
+ /**
+ * Functions to be called after your app directory has been packaged into an .asar file.
+ *
+ * **Note**: `afterAsar` will only be called if the {@link asar} option is set.
+ */
+ afterAsar?: HookFunction[];
+ /** Functions to be called after the packaged application has been moved to the final directory. */
+ afterComplete?: HookFunction[];
+ /**
+ * Functions to be called after your app directory has been copied to a temporary directory.
+ *
+ * **Note**: `afterCopy` will not be called if the {@link prebuiltAsar} option is set.
+ */
+ afterCopy?: HookFunction[];
+ /**
+ * Functions to be called after the files specified in the {@link extraResource} option have been copied.
+ **/
+ afterCopyExtraResources?: HookFunction[];
+ /** Functions to be called after the prebuilt Electron binary has been extracted to a temporary directory. */
+ afterExtract?: HookFunction[];
+ /**
+ * Functions to be called after the final matrix of platform/arch combination is determined. Use this to
+ * learn what archs/platforms packager is targetting when you pass "all" as a value.
+ */
+ afterFinalizePackageTargets?: FinalizePackageTargetsHookFunction[];
+ /**
+ * Functions to be called after Node module pruning has been applied to the application.
+ *
+ * **Note**: None of these functions will be called if the {@link prune} option is `false` or
+ * the {@link prebuiltAsar} option is set.
+ */
+ afterPrune?: HookFunction[];
+
+ /** When `true`, sets both {@link arch} and {@link platform} to `all`. */
+ all?: boolean;
+ /*
+ * The bundle identifier to use in the application's `Info.plist`.
+ *
+ * @category macOS
+ */
+ appBundleId?: string;
+ /**
+ * The application category type, as shown in the Finder via *View → Arrange by Application
+ * Category* when viewing the Applications directory.
+ *
+ * For example, `app-category-type=public.app-category.developer-tools` will set the
+ * application category to *Developer Tools*.
+ *
+ * Valid values are listed in [Apple's documentation](https://developer.apple.com/library/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/LaunchServicesKeys.html#//apple_ref/doc/uid/TP40009250-SW8).
+ *
+ * @category macOS
+ */
+ appCategoryType?: string;
+ /**
+ * The human-readable copyright line for the app. Maps to the `LegalCopyright` metadata
+ * property on Windows, and `NSHumanReadableCopyright` on macOS.
+ */
+ appCopyright?: string;
+ /**
+ * The release version of the application.
+ *
+ * By default the `version` property in the `package.json` is used, but it can be overridden
+ * with this argument. If neither are provided, the version of Electron will be used. Maps
+ * to the `ProductVersion` metadata property on Windows, and `CFBundleShortVersionString`
+ * on macOS.
+ */
+ appVersion?: string;
+ /**
+ * The target system architecture(s) to build for.
+ *
+ * Not required if the {@link all} option is set. If `arch` is set to `all`, all supported
+ * architectures for the target platforms specified by {@link platform} will be built.
+ * Arbitrary combinations of individual architectures are also supported via a comma-delimited
+ * string or array of strings. The non-`all` values correspond to the architecture names used
+ * by [Electron releases](https://github.com/electron/electron/releases). This value
+ * is not restricted to the official set if [[download|`download.mirrorOptions`]] is set.
+ *
+ * Defaults to the arch of the host computer running Electron Packager.
+ *
+ * Arch values for the official prebuilt Electron binaries:
+ * - `ia32`
+ * - `x64`
+ * - `armv7l`
+ * - `arm64` _(Linux: Electron 1.8.0 and above; Windows: 6.0.8 and above; macOS: 11.0.0-beta.1 and above)_
+ * - `mips64el` _(Electron 1.8.2-beta.5 to 1.8.8)_
+ */
+ arch?: ArchOption | ArchOption[];
+ /**
+ * Whether to package the application's source code into an archive, using [Electron's
+ * archive format](https://github.com/electron/asar). Reasons why you may want to enable
+ * this feature include mitigating issues around long path names on Windows, slightly speeding
+ * up `require`, and concealing your source code from cursory inspection. When the value
+ * is `true`, it passes the default configuration to the `asar` module. The configuration
+ * values can be customized when the value is an `Object`. Supported sub-options include, but
+ * are not limited to:
+ * - `ordering` (*string*): A path to an ordering file for packing files. An explanation can be
+ * found on the [Atom issue tracker](https://github.com/atom/atom/issues/10163).
+ * - `unpack` (*string*): A [glob expression](https://github.com/isaacs/minimatch#features),
+ * when specified, unpacks the file with matching names to the `app.asar.unpacked` directory.
+ * - `unpackDir` (*string*): Unpacks the dir to the `app.asar.unpacked` directory whose names
+ * exactly or pattern match this string. The `asar.unpackDir` is relative to {@link dir}.
+ *
+ * Defaults to `false`.
+ *
+ * Some examples:
+ *
+ * - `asar.unpackDir = 'sub_dir'` will unpack the directory `/<dir>/sub_dir`
+ * - `asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '*')` will unpack the directories `/<dir>/sub_dir1/sub_sub_dir` and `/<dir>/sub_dir2`, but it will not include their subdirectories.
+ * - `asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '**')` will unpack the subdirectories of the directories `/<dir>/sub_dir1/sub_sub_dir` and `/<dir>/sub_dir2`.
+ * - `asar.unpackDir = path.join('**', '{sub_dir1/sub_sub_dir,sub_dir2}', '**', '*')` will unpack the directories `/<dir>/sub_dir1/sub_sub_dir` and `/<dir>/sub_dir2` and their subdirectories.
+ *
+ * **Note:** `asar` will have no effect if the {@link prebuiltAsar} option is set.
+ */
+ asar?: boolean | AsarOptions;
+ /**
+ * Functions to be called before your app directory is packaged into an .asar file.
+ *
+ * **Note**: `beforeAsar` will only be called if the {@link asar} option is set.
+ */
+ beforeAsar?: HookFunction[];
+ /**
+ * Functions to be called before your app directory is copied to a temporary directory.
+ *
+ * **Note**: `beforeCopy` will not be called if the {@link prebuiltAsar} option is set.
+ */
+ beforeCopy?: HookFunction[];
+ /**
+ * Functions to be called before the files specified in the {@link extraResource} option are copied.
+ **/
+ beforeCopyExtraResources?: HookFunction[];
+ /**
+ * The build version of the application. Defaults to the value of the {@link appVersion} option.
+ * Maps to the `FileVersion` metadata property on Windows, and `CFBundleVersion` on macOS.
+ */
+ buildVersion?: string;
+ /**
+ * Forces support for Mojave (macOS 10.14) dark mode in your packaged app. This sets the
+ * `NSRequiresAquaSystemAppearance` key to `false` in your app's `Info.plist`. For more information,
+ * see the [Electron documentation](https://www.electronjs.org/docs/tutorial/mojave-dark-mode-guide)
+ * and the [Apple developer documentation](https://developer.apple.com/documentation/appkit/nsappearancecustomization/choosing_a_specific_appearance_for_your_app).
+ *
+ * @category macOS
+ */
+ darwinDarkModeSupport?: boolean;
+ /**
+ * Whether symlinks should be dereferenced during the copying of the application source.
+ * Defaults to `true`.
+ *
+ * **Note:** `derefSymlinks` will have no effect if the {@link prebuiltAsar} option is set.
+ */
+ derefSymlinks?: boolean;
+ /**
+ * If present, passes custom options to [`@electron/get`](https://npm.im/@electron/get). See
+ * the module for option descriptions, proxy support, and defaults. Supported parameters
+ * include, but are not limited to:
+ * - `cacheRoot` (*string*): The directory where prebuilt, pre-packaged Electron downloads are cached.
+ * - `mirrorOptions` (*Object*): Options to override the default Electron download location.
+ * - `rejectUnauthorized` (*boolean* - default: `true`): Whether SSL certificates are required to be
+ * valid when downloading Electron.
+ *
+ * **Note:** `download` sub-options will have no effect if the {@link electronZipDir} option is set.
+ */
+ download?: ElectronDownloadOptions;
+ /**
+ * The Electron version with which the app is built (without the leading 'v') - for example,
+ * [`1.4.13`](https://github.com/electron/electron/releases/tag/v1.4.13). See [Electron
+ * releases](https://github.com/electron/electron/releases) for valid versions. If omitted, it
+ * will use the version of the nearest local installation of `electron`,
+ * `electron-prebuilt-compile`, or `electron-prebuilt`, defined in `package.json` in either
+ * `devDependencies` or `dependencies`.
+ */
+ electronVersion?: string;
+ /**
+ * The local path to a directory containing Electron ZIP files for Electron Packager to unzip, instead
+ * of downloading them. The ZIP filenames should be in the same format as the ones downloaded from the
+ * [Electron releases](https://github.com/electron/electron/releases) site.
+ *
+ * **Note:** Setting this option prevents the {@link download} sub-options from being used, as
+ * the functionality gets skipped over.
+ */
+ electronZipDir?: string;
+ /**
+ * The name of the executable file, sans file extension. Defaults to the value for the {@link name}
+ * option. For `darwin` or `mas` target platforms, this does not affect the name of the
+ * `.app` folder - this will use the {@link name} option instead.
+ */
+ executableName?: string;
+ /**
+ * When the value is a string, specifies the filename of a `plist` file. Its contents are merged
+ * into the app's `Info.plist`.
+ * When the value is an `Object`, it specifies an already-parsed `plist` data structure that is
+ * merged into the app's `Info.plist`.
+ *
+ * Entries from `extendInfo` override entries in the base `Info.plist` file supplied by
+ * `electron`, `electron-prebuilt-compile`, or `electron-prebuilt`, but are overridden by other
+ * options such as {@link appVersion} or {@link appBundleId}.
+ *
+ * @category macOS
+ */
+ extendInfo?: string | { [property: string]: any }; // eslint-disable-line @typescript-eslint/no-explicit-any
+ /**
+ * When the value is a string, specifies the filename of a `plist` file. Its contents are merged
+ * into all the Helper apps' `Info.plist` files.
+ * When the value is an `Object`, it specifies an already-parsed `plist` data structure that is
+ * merged into all the Helper apps' `Info.plist` files.
+ *
+ * Entries from `extendHelperInfo` override entries in the helper apps' `Info.plist` file supplied by
+ * `electron`, `electron-prebuilt-compile`, or `electron-prebuilt`, but are overridden by other
+ * options such as {@link appVersion} or {@link appBundleId}.
+ *
+ * @category macOS
+ */
+ extendHelperInfo?: string | { [property: string]: any }; // eslint-disable-line @typescript-eslint/no-explicit-any
+ /**
+ * One or more files to be copied directly into the app's `Contents/Resources` directory for
+ * macOS target platforms, and the `resources` directory for other target platforms. The
+ * resources directory can be referenced in the packaged app via the
+ * [`process.resourcesPath`](https://www.electronjs.org/docs/api/process#processresourcespath-readonly) value.
+ */
+ extraResource?: string | string[];
+ /**
+ * The bundle identifier to use in the application helper's `Info.plist`.
+ *
+ * @category macOS
+ */
+ helperBundleId?: string;
+ /**
+ * The local path to the icon file, if the target platform supports setting embedding an icon.
+ *
+ * Currently you must look for conversion tools in order to supply an icon in the format required by the platform:
+ *
+ * - macOS: `.icns`
+ * - Windows: `.ico` ([See the readme](https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms) for details on non-Windows platforms)
+ * - Linux: this option is not supported, as the dock/window list icon is set via
+ * [the `icon` option in the `BrowserWindow` constructor](https://electronjs.org/docs/api/browser-window/#new-browserwindowoptions).
+ * *Please note that you need to use a PNG, and not the macOS or Windows icon formats, in order for it
+ * to show up in the dock/window list.* Setting the icon in the file manager is not currently supported.
+ *
+ * If the file extension is omitted, it is auto-completed to the correct extension based on the
+ * platform, including when [[platform|`platform: 'all'`]] is in effect.
+ */
+ icon?: string;
+ /**
+ * One or more additional [regular expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions)
+ * patterns which specify which files to ignore when copying files to create the app bundle(s). The
+ * regular expressions are matched against the absolute path of a given file/directory to be copied.
+ *
+ * **Please note that [glob patterns](https://en.wikipedia.org/wiki/Glob_%28programming%29) will not work.**
+ *
+ * The following paths are always ignored (*when you aren't using an {@link IgnoreFunction}*):
+ *
+ * - the directory specified by the {@link out} option
+ * - the temporary directory used to build the Electron app
+ * - `node_modules/.bin`
+ * - `node_modules/electron`
+ * - `node_modules/electron-prebuilt`
+ * - `node_modules/electron-prebuilt-compile`
+ * - `.git`
+ * - files and folders ending in `.o` and `.obj`
+ *
+ * **Note**: Node modules specified in `devDependencies` are ignored by default, via the
+ * {@link prune} option.
+ *
+ * **Note:** `ignore` will have no effect if the {@link prebuiltAsar} option is set.
+ */
+ ignore?: RegExp | RegExp[] | IgnoreFunction;
+ /**
+ * Ignores [system junk files](https://github.com/sindresorhus/junk) when copying the Electron app,
+ * regardless of the {@link ignore} option.
+ *
+ * **Note:** `junk` will have no effect if the {@link prebuiltAsar} option is set.
+ */
+ junk?: boolean;
+ /**
+ * The application name. If omitted, it will use the `productName` or `name` value from the
+ * nearest `package.json`.
+ *
+ * **Regardless of source, characters in the Electron app name which are not allowed in all target
+ * platforms' filenames (e.g., `/`), will be replaced by hyphens (`-`).**
+ */
+ name?: string;
+ /**
+ * If present, notarizes macOS target apps when the host platform is macOS and Xcode is installed.
+ * See [`@electron/notarize`](https://github.com/electron/notarize#method-notarizeopts-promisevoid)
+ * for option descriptions, such as how to use `appleIdPassword` safely or obtain an API key.
+ *
+ * **Requires the {@link osxSign} option to be set.**
+ *
+ * @category macOS
+ */
+ osxNotarize?: OsxNotarizeOptions;
+ /**
+ * If present, signs macOS target apps when the host platform is macOS and Xcode is installed.
+ * When the value is `true`, pass default configuration to the signing module. See
+ * [@electron/osx-sign](https://npm.im/@electron/osx-sign#opts---options) for sub-option descriptions and
+ * their defaults. Options include, but are not limited to:
+ * - `identity` (*string*): The identity used when signing the package via `codesign`.
+ * - `binaries` (*array<string>*): Path to additional binaries that will be signed along with built-ins of Electron/
+ *
+ * @category macOS
+ */
+ osxSign?: true | OsxSignOptions;
+ /**
+ * Used to provide custom options to the internal call to `@electron/universal` when building a macOS
+ * app with the target architecture of "universal". Unused otherwise, providing a value does not imply
+ * a universal app is built.
+ */
+ osxUniversal?: OsxUniversalOptions;
+ /**
+ * The base directory where the finished package(s) are created.
+ *
+ * Defaults to the current working directory.
+ */
+ out?: string;
+ /**
+ * Whether to replace an already existing output directory for a given platform (`true`) or
+ * skip recreating it (`false`). Defaults to `false`.
+ */
+ overwrite?: boolean;
+ /**
+ * The target platform(s) to build for.
+ *
+ * Not required if the {@link all} option is set. If `platform` is set to `all`, all officially
+ * supported target platforms for the target architectures specified by the {@link arch} option
+ * will be built. Arbitrary combinations of individual platforms are also supported via a
+ * comma-delimited string or array of strings.
+ *
+ * The official non-`all` values correspond to the platform names used by [Electron
+ * releases](https://github.com/electron/electron/releases). This value is not restricted to
+ * the official set if [[download|`download.mirrorOptions]] is set.
+ *
+ * Defaults to the platform of the host computer running Electron Packager.
+ *
+ * Platform values for the official prebuilt Electron binaries:
+ * - `darwin` (macOS)
+ * - `linux`
+ * - `mas` (macOS, specifically for submitting to the Mac App Store)
+ * - `win32`
+ */
+ platform?: PlatformOption | PlatformOption[];
+ /**
+ * The path to a prebuilt ASAR file.
+ *
+ * **Note:** Setting this option prevents the following options from being used, as the functionality
+ * gets skipped over:
+ *
+ * - {@link asar}
+ * - {@link afterCopy}
+ * - {@link afterPrune}
+ * - {@link derefSymlinks}
+ * - {@link ignore}
+ * - {@link junk}
+ * - {@link prune}
+ */
+ prebuiltAsar?: string;
+ /**
+ * The URL protocol schemes associated with the Electron app.
+ *
+ * @category macOS
+ */
+ protocols?: MacOSProtocol[];
+ /**
+ * Walks the `node_modules` dependency tree to remove all of the packages specified in the
+ * `devDependencies` section of `package.json` from the outputted Electron app.
+ *
+ * Defaults to `true`.
+ *
+ * **Note:** `prune` will have no effect if the {@link prebuiltAsar} option is set.
+ */
+ prune?: boolean;
+ /**
+ * If `true`, disables printing informational and warning messages to the console when
+ * packaging the application. This does not disable errors.
+ *
+ * Defaults to `false`.
+ */
+ quiet?: boolean;
+ /**
+ * The base directory to use as a temporary directory. Set to `false` to disable use of a
+ * temporary directory. Defaults to the system's temporary directory.
+ */
+ tmpdir?: string | false;
+ /**
+ * Human-readable descriptions of how the Electron app uses certain macOS features. These are displayed
+ * in the App Store. A non-exhaustive list of available properties:
+ *
+ * * `Camera` - required for media access API usage in macOS Catalina
+ * * `Microphone` - required for media access API usage in macOS Catalina
+ *
+ * Valid properties are the [Cocoa keys for MacOS](https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html)
+ * of the pattern `NS(.*)UsageDescription`, where the captured group is the key to use.
+ *
+ * Example:
+ *
+ * ```javascript
+ * {
+ * usageDescription: {
+ * Camera: 'Needed for video calls',
+ * Microphone: 'Needed for voice calls'
+ * }
+ * }
+ * ```
+ *
+ * @category macOS
+ */
+ usageDescription?: { [property: string]: string };
+ /**
+ * Application metadata to embed into the Windows executable.
+ * @category Windows
+ */
+ win32metadata?: Win32MetadataOptions;
+ }
+}
+
+export = electronPackager;
diff --git a/desktop/node_modules/electron-packager/src/index.js b/desktop/node_modules/electron-packager/src/index.js
new file mode 100644
index 0000000..d64afd4
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/index.js
@@ -0,0 +1,207 @@
+'use strict'
+
+const common = require('./common')
+const copyFilter = require('./copy-filter')
+const debug = require('debug')('electron-packager')
+const download = require('./download')
+const fs = require('fs-extra')
+const getMetadataFromPackageJSON = require('./infer')
+const hooks = require('./hooks')
+const path = require('path')
+const targets = require('./targets')
+const unzip = require('./unzip')
+const { packageUniversalMac } = require('./universal')
+
+function debugHostInfo () {
+ debug(common.hostInfo())
+}
+
+class Packager {
+ constructor (opts) {
+ this.opts = opts
+ this.tempBase = common.baseTempDir(opts)
+ this.useTempDir = opts.tmpdir !== false
+ this.canCreateSymlinks = undefined
+ }
+
+ async ensureTempDir () {
+ if (this.useTempDir) {
+ await fs.remove(this.tempBase)
+ } else {
+ return Promise.resolve()
+ }
+ }
+
+ async testSymlink (comboOpts, zipPath) {
+ await fs.mkdirp(this.tempBase)
+ const testPath = await fs.mkdtemp(path.join(this.tempBase, `symlink-test-${comboOpts.platform}-${comboOpts.arch}-`))
+ const testFile = path.join(testPath, 'test')
+ const testLink = path.join(testPath, 'testlink')
+
+ try {
+ await fs.outputFile(testFile, '')
+ await fs.symlink(testFile, testLink)
+ this.canCreateSymlinks = true
+ } catch (e) {
+ /* istanbul ignore next */
+ this.canCreateSymlinks = false
+ } finally {
+ await fs.remove(testPath)
+ }
+
+ if (this.canCreateSymlinks) {
+ return this.checkOverwrite(comboOpts, zipPath)
+ }
+
+ /* istanbul ignore next */
+ return this.skipHostPlatformSansSymlinkSupport(comboOpts)
+ }
+
+ /* istanbul ignore next */
+ skipHostPlatformSansSymlinkSupport (comboOpts) {
+ common.info(`Cannot create symlinks (on Windows hosts, it requires admin privileges); skipping ${comboOpts.platform} platform`, this.opts.quiet)
+ return Promise.resolve()
+ }
+
+ async overwriteAndCreateApp (outDir, comboOpts, zipPath) {
+ debug(`Removing ${outDir} due to setting overwrite: true`)
+ await fs.remove(outDir)
+ return this.createApp(comboOpts, zipPath)
+ }
+
+ async extractElectronZip (comboOpts, zipPath, buildDir) {
+ debug(`Extracting ${zipPath} to ${buildDir}`)
+ await unzip(zipPath, buildDir)
+ await hooks.promisifyHooks(this.opts.afterExtract, [buildDir, comboOpts.electronVersion, comboOpts.platform, comboOpts.arch])
+ }
+
+ async buildDir (platform, arch) {
+ let buildParentDir
+ if (this.useTempDir) {
+ buildParentDir = this.tempBase
+ } else {
+ buildParentDir = this.opts.out || process.cwd()
+ }
+ await fs.mkdirp(buildParentDir)
+ return await fs.mkdtemp(path.resolve(buildParentDir, `${platform}-${arch}-template-`))
+ }
+
+ async createApp (comboOpts, zipPath) {
+ const buildDir = await this.buildDir(comboOpts.platform, comboOpts.arch)
+ common.info(`Packaging app for platform ${comboOpts.platform} ${comboOpts.arch} using electron v${comboOpts.electronVersion}`, this.opts.quiet)
+
+ debug(`Creating ${buildDir}`)
+ await fs.ensureDir(buildDir)
+ await this.extractElectronZip(comboOpts, zipPath, buildDir)
+ const os = require(targets.osModules[comboOpts.platform])
+ const app = new os.App(comboOpts, buildDir)
+ return app.create()
+ }
+
+ async checkOverwrite (comboOpts, zipPath) {
+ const finalPath = common.generateFinalPath(comboOpts)
+ if (await fs.pathExists(finalPath)) {
+ if (this.opts.overwrite) {
+ return this.overwriteAndCreateApp(finalPath, comboOpts, zipPath)
+ } else {
+ common.info(`Skipping ${comboOpts.platform} ${comboOpts.arch} (output dir already exists, use --overwrite to force)`, this.opts.quiet)
+ return true
+ }
+ } else {
+ return this.createApp(comboOpts, zipPath)
+ }
+ }
+
+ async getElectronZipPath (downloadOpts) {
+ if (this.opts.electronZipDir) {
+ if (await fs.pathExists(this.opts.electronZipDir)) {
+ const zipPath = path.resolve(
+ this.opts.electronZipDir,
+ `electron-v${downloadOpts.version}-${downloadOpts.platform}-${downloadOpts.arch}.zip`
+ )
+ if (!await fs.pathExists(zipPath)) {
+ throw new Error(`The specified Electron ZIP file does not exist: ${zipPath}`)
+ }
+
+ return zipPath
+ }
+
+ throw new Error(`The specified Electron ZIP directory does not exist: ${this.opts.electronZipDir}`)
+ } else {
+ return download.downloadElectronZip(downloadOpts)
+ }
+ }
+
+ async packageForPlatformAndArchWithOpts (comboOpts, downloadOpts) {
+ const zipPath = await this.getElectronZipPath(downloadOpts)
+
+ if (!this.useTempDir) {
+ return this.createApp(comboOpts, zipPath)
+ }
+
+ if (common.isPlatformMac(comboOpts.platform)) {
+ /* istanbul ignore else */
+ if (this.canCreateSymlinks === undefined) {
+ return this.testSymlink(comboOpts, zipPath)
+ } else if (!this.canCreateSymlinks) {
+ return this.skipHostPlatformSansSymlinkSupport(comboOpts)
+ }
+ }
+
+ return this.checkOverwrite(comboOpts, zipPath)
+ }
+
+ async packageForPlatformAndArch (downloadOpts) {
+ // Create delegated options object with specific platform and arch, for output directory naming
+ const comboOpts = {
+ ...this.opts,
+ arch: downloadOpts.arch,
+ platform: downloadOpts.platform,
+ electronVersion: downloadOpts.version
+ }
+
+ if (common.isPlatformMac(comboOpts.platform) && comboOpts.arch === 'universal') {
+ return packageUniversalMac(this.packageForPlatformAndArchWithOpts.bind(this), await this.buildDir(comboOpts.platform, comboOpts.arch), comboOpts, downloadOpts, this.tempBase)
+ }
+
+ return this.packageForPlatformAndArchWithOpts(comboOpts, downloadOpts)
+ }
+}
+
+async function packageAllSpecifiedCombos (opts, archs, platforms) {
+ const packager = new Packager(opts)
+ await packager.ensureTempDir()
+ return Promise.all(download.createDownloadCombos(opts, platforms, archs).map(
+ downloadOpts => packager.packageForPlatformAndArch(downloadOpts)
+ ))
+}
+
+module.exports = async function packager (opts) {
+ debugHostInfo()
+ if (debug.enabled) debug(`Packager Options: ${JSON.stringify(opts)}`)
+
+ const archs = targets.validateListFromOptions(opts, 'arch')
+ const platforms = targets.validateListFromOptions(opts, 'platform')
+ if (!Array.isArray(archs)) return Promise.reject(archs)
+ if (!Array.isArray(platforms)) return Promise.reject(platforms)
+
+ debug(`Target Platforms: ${platforms.join(', ')}`)
+ debug(`Target Architectures: ${archs.join(', ')}`)
+
+ const packageJSONDir = path.resolve(process.cwd(), opts.dir) || process.cwd()
+
+ await getMetadataFromPackageJSON(platforms, opts, packageJSONDir)
+ if (opts.name.endsWith(' Helper')) {
+ throw new Error('Application names cannot end in " Helper" due to limitations on macOS')
+ }
+
+ debug(`Application name: ${opts.name}`)
+ debug(`Target Electron version: ${opts.electronVersion}`)
+
+ copyFilter.populateIgnoredPaths(opts)
+
+ await hooks.promisifyHooks(opts.afterFinalizePackageTargets, [targets.createPlatformArchPairs(opts, platforms, archs).map(([platform, arch]) => ({ platform, arch }))])
+ const appPaths = await packageAllSpecifiedCombos(opts, archs, platforms)
+ // Remove falsy entries (e.g. skipped platforms)
+ return appPaths.filter(appPath => appPath)
+}
diff --git a/desktop/node_modules/electron-packager/src/infer.js b/desktop/node_modules/electron-packager/src/infer.js
new file mode 100644
index 0000000..9dde6d7
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/infer.js
@@ -0,0 +1,178 @@
+'use strict'
+
+const debug = require('debug')('electron-packager')
+const getPackageInfo = require('get-package-info')
+const parseAuthor = require('parse-author')
+const path = require('path')
+const resolve = require('resolve')
+const semver = require('semver')
+
+function isMissingRequiredProperty (props) {
+ return props.some(prop => prop === 'productName' || prop === 'dependencies.electron')
+}
+
+function errorMessageForProperty (prop) {
+ let hash, propDescription
+ switch (prop) {
+ case 'productName':
+ hash = 'name'
+ propDescription = 'application name'
+ break
+ case 'dependencies.electron':
+ hash = 'electronversion'
+ propDescription = 'Electron version'
+ break
+ case 'version':
+ hash = 'appversion'
+ propDescription = 'application version'
+ break
+ /* istanbul ignore next */
+ default:
+ hash = ''
+ propDescription = `[Unknown Property (${prop})]`
+ }
+
+ return `Unable to determine ${propDescription}. Please specify an ${propDescription}\n\n` +
+ 'For more information, please see\n' +
+ `https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#${hash}\n`
+}
+
+function resolvePromise (id, options) {
+ // eslint-disable-next-line promise/param-names
+ return new Promise((accept, reject) => {
+ resolve(id, options, (err, mainPath, pkg) => {
+ if (err) {
+ /* istanbul ignore next */
+ reject(err)
+ } else {
+ accept([mainPath, pkg])
+ }
+ })
+ })
+}
+
+function rangeFromElectronVersion (electronVersion) {
+ try {
+ return new semver.Range(electronVersion)
+ } catch (error) {
+ return null
+ }
+}
+
+async function getVersion (opts, electronProp) {
+ const [depType, packageName] = electronProp.prop.split('.')
+ const src = electronProp.src
+ if (packageName === 'electron-prebuilt-compile') {
+ const electronVersion = electronProp.pkg[depType][packageName]
+ const versionRange = rangeFromElectronVersion(electronVersion)
+ if (versionRange !== null && versionRange.intersects(new semver.Range('< 1.6.5'))) {
+ if (!/^\d+\.\d+\.\d+/.test(electronVersion)) {
+ // electron-prebuilt-compile cannot be resolved because `main` does not point
+ // to a valid JS file.
+ throw new Error('Using electron-prebuilt-compile with Electron Packager requires specifying an exact Electron version')
+ }
+
+ opts.electronVersion = electronVersion
+ return Promise.resolve()
+ }
+ }
+
+ const pkg = (await resolvePromise(packageName, { basedir: path.dirname(src) }))[1]
+ debug(`Inferring target Electron version from ${packageName} in ${src}`)
+ opts.electronVersion = pkg.version
+ return null
+}
+
+async function handleMetadata (opts, result) {
+ if (result.values.productName) {
+ debug(`Inferring application name from ${result.source.productName.prop} in ${result.source.productName.src}`)
+ opts.name = result.values.productName
+ }
+
+ if (result.values.version) {
+ debug(`Inferring appVersion from version in ${result.source.version.src}`)
+ opts.appVersion = result.values.version
+ }
+
+ if (result.values.author && !opts.win32metadata) {
+ opts.win32metadata = {}
+ }
+
+ if (result.values.author) {
+ debug(`Inferring win32metadata.CompanyName from author in ${result.source.author.src}`)
+ if (typeof result.values.author === 'string') {
+ opts.win32metadata.CompanyName = parseAuthor(result.values.author).name
+ } else if (result.values.author.name) {
+ opts.win32metadata.CompanyName = result.values.author.name
+ } else {
+ debug('Cannot infer win32metadata.CompanyName from author, no name found')
+ }
+ }
+
+ // eslint-disable-next-line no-prototype-builtins
+ if (result.values.hasOwnProperty('dependencies.electron')) {
+ return getVersion(opts, result.source['dependencies.electron'])
+ } else {
+ return Promise.resolve()
+ }
+}
+
+function handleMissingProperties (opts, err) {
+ const missingProps = err.missingProps.map(prop => {
+ return Array.isArray(prop) ? prop[0] : prop
+ })
+
+ if (isMissingRequiredProperty(missingProps)) {
+ const messages = missingProps.map(errorMessageForProperty)
+
+ debug(err.message)
+ err.message = messages.join('\n') + '\n'
+ throw err
+ } else {
+ // Missing props not required, can continue w/ partial result
+ return handleMetadata(opts, err.result)
+ }
+}
+
+module.exports = async function getMetadataFromPackageJSON (platforms, opts, dir) {
+ const props = []
+ if (!opts.name) props.push(['productName', 'name'])
+ if (!opts.appVersion) props.push('version')
+ if (!opts.electronVersion) {
+ props.push([
+ 'dependencies.electron',
+ 'devDependencies.electron',
+ 'dependencies.electron-nightly',
+ 'devDependencies.electron-nightly',
+ 'dependencies.electron-prebuilt-compile',
+ 'devDependencies.electron-prebuilt-compile',
+ 'dependencies.electron-prebuilt',
+ 'devDependencies.electron-prebuilt'
+ ])
+ }
+
+ if (platforms.includes('win32') && !(opts.win32metadata && opts.win32metadata.CompanyName)) {
+ debug('Requiring author in package.json, as CompanyName was not specified for win32metadata')
+ props.push('author')
+ }
+
+ // Name and version provided, no need to infer
+ if (props.length === 0) return Promise.resolve()
+
+ // Search package.json files to infer name and version from
+ try {
+ const result = await getPackageInfo(props, dir)
+ return handleMetadata(opts, result)
+ } catch (err) {
+ if (err.missingProps) {
+ if (err.missingProps.length === props.length) {
+ debug(err.message)
+ err.message = `Could not locate a package.json file in "${path.resolve(opts.dir)}" or its parent directories for an Electron app with the following fields: ${err.missingProps.join(', ')}`
+ } else {
+ return handleMissingProperties(opts, err)
+ }
+ }
+
+ throw err
+ }
+}
diff --git a/desktop/node_modules/electron-packager/src/linux.js b/desktop/node_modules/electron-packager/src/linux.js
new file mode 100644
index 0000000..1e98414
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/linux.js
@@ -0,0 +1,25 @@
+'use strict'
+
+const App = require('./platform')
+const common = require('./common')
+
+class LinuxApp extends App {
+ get originalElectronName () {
+ return 'electron'
+ }
+
+ get newElectronName () {
+ return common.sanitizeAppName(this.executableName)
+ }
+
+ async create () {
+ await this.initialize()
+ await this.renameElectron()
+ await this.copyExtraResources()
+ return this.move()
+ }
+}
+
+module.exports = {
+ App: LinuxApp
+}
diff --git a/desktop/node_modules/electron-packager/src/mac.js b/desktop/node_modules/electron-packager/src/mac.js
new file mode 100644
index 0000000..6eaf524
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/mac.js
@@ -0,0 +1,440 @@
+'use strict'
+
+const App = require('./platform')
+const common = require('./common')
+const debug = require('debug')('electron-packager')
+const fs = require('fs-extra')
+const path = require('path')
+const plist = require('plist')
+const { notarize } = require('@electron/notarize')
+const { signApp } = require('@electron/osx-sign')
+
+class MacApp extends App {
+ constructor (opts, templatePath) {
+ super(opts, templatePath)
+
+ this.appName = opts.name
+ }
+
+ get appCategoryType () {
+ return this.opts.appCategoryType
+ }
+
+ get appCopyright () {
+ return this.opts.appCopyright
+ }
+
+ get appVersion () {
+ return this.opts.appVersion
+ }
+
+ get buildVersion () {
+ return this.opts.buildVersion
+ }
+
+ get enableDarkMode () {
+ return this.opts.darwinDarkModeSupport
+ }
+
+ get usageDescription () {
+ return this.opts.usageDescription
+ }
+
+ get protocols () {
+ return this.opts.protocols.map((protocol) => {
+ return {
+ CFBundleURLName: protocol.name,
+ CFBundleURLSchemes: [].concat(protocol.schemes)
+ }
+ })
+ }
+
+ get dotAppName () {
+ return `${common.sanitizeAppName(this.appName)}.app`
+ }
+
+ get defaultBundleName () {
+ return `com.electron.${common.sanitizeAppName(this.appName).toLowerCase()}`
+ }
+
+ get bundleName () {
+ return filterCFBundleIdentifier(this.opts.appBundleId || this.defaultBundleName)
+ }
+
+ get originalResourcesDir () {
+ return path.join(this.contentsPath, 'Resources')
+ }
+
+ get resourcesDir () {
+ return path.join(this.dotAppName, 'Contents', 'Resources')
+ }
+
+ get electronBinaryDir () {
+ return path.join(this.contentsPath, 'MacOS')
+ }
+
+ get originalElectronName () {
+ return 'Electron'
+ }
+
+ get newElectronName () {
+ return this.appPlist.CFBundleExecutable
+ }
+
+ get renamedAppPath () {
+ return path.join(this.stagingPath, this.dotAppName)
+ }
+
+ get electronAppPath () {
+ return path.join(this.stagingPath, `${this.originalElectronName}.app`)
+ }
+
+ get contentsPath () {
+ return path.join(this.electronAppPath, 'Contents')
+ }
+
+ get frameworksPath () {
+ return path.join(this.contentsPath, 'Frameworks')
+ }
+
+ get loginItemsPath () {
+ return path.join(this.contentsPath, 'Library', 'LoginItems')
+ }
+
+ get loginHelperPath () {
+ return path.join(this.loginItemsPath, 'Electron Login Helper.app')
+ }
+
+ updatePlist (basePlist, displayName, identifier, name) {
+ return Object.assign(basePlist, {
+ CFBundleDisplayName: displayName,
+ CFBundleExecutable: common.sanitizeAppName(displayName),
+ CFBundleIdentifier: identifier,
+ CFBundleName: common.sanitizeAppName(name)
+ })
+ }
+
+ updateHelperPlist (basePlist, suffix, identifierIgnoresSuffix) {
+ let helperSuffix, identifier, name
+ if (suffix) {
+ helperSuffix = `Helper ${suffix}`
+ if (identifierIgnoresSuffix) {
+ identifier = this.helperBundleIdentifier
+ } else {
+ identifier = `${this.helperBundleIdentifier}.${suffix}`
+ }
+ name = `${this.appName} ${helperSuffix}`
+ } else {
+ helperSuffix = 'Helper'
+ identifier = this.helperBundleIdentifier
+ name = this.appName
+ }
+ return this.updatePlist(basePlist, `${this.appName} ${helperSuffix}`, identifier, name)
+ }
+
+ async extendPlist (basePlist, propsOrFilename) {
+ if (!propsOrFilename) {
+ return Promise.resolve()
+ }
+
+ if (typeof propsOrFilename === 'string') {
+ const plist = await this.loadPlist(propsOrFilename)
+ return Object.assign(basePlist, plist)
+ } else {
+ return Object.assign(basePlist, propsOrFilename)
+ }
+ }
+
+ async loadPlist (filename, propName) {
+ const loadedPlist = plist.parse((await fs.readFile(filename)).toString())
+ if (propName) {
+ this[propName] = loadedPlist
+ }
+ return loadedPlist
+ }
+
+ ehPlistFilename (helper) {
+ return this.helperPlistFilename(path.join(this.frameworksPath, helper))
+ }
+
+ helperPlistFilename (helperApp) {
+ return path.join(helperApp, 'Contents', 'Info.plist')
+ }
+
+ async determinePlistFilesToUpdate () {
+ const appPlistFilename = path.join(this.contentsPath, 'Info.plist')
+
+ const plists = [
+ [appPlistFilename, 'appPlist'],
+ [this.ehPlistFilename('Electron Helper.app'), 'helperPlist']
+ ]
+
+ const possiblePlists = [
+ [this.ehPlistFilename('Electron Helper (Renderer).app'), 'helperRendererPlist'],
+ [this.ehPlistFilename('Electron Helper (Plugin).app'), 'helperPluginPlist'],
+ [this.ehPlistFilename('Electron Helper (GPU).app'), 'helperGPUPlist'],
+ [this.ehPlistFilename('Electron Helper EH.app'), 'helperEHPlist'],
+ [this.ehPlistFilename('Electron Helper NP.app'), 'helperNPPlist'],
+ [this.helperPlistFilename(this.loginHelperPath), 'loginHelperPlist']
+ ]
+
+ const optional = await Promise.all(possiblePlists.map(async item =>
+ (await fs.pathExists(item[0])) ? item : null))
+ return plists.concat(optional.filter(item => item))
+ }
+
+ appRelativePath (p) {
+ return path.relative(this.contentsPath, p)
+ }
+
+ async updatePlistFiles () {
+ const appBundleIdentifier = this.bundleName
+ this.helperBundleIdentifier = filterCFBundleIdentifier(this.opts.helperBundleId || `${appBundleIdentifier}.helper`)
+
+ const plists = await this.determinePlistFilesToUpdate()
+ await Promise.all(plists.map(plistArgs => this.loadPlist(...plistArgs)))
+ await this.extendPlist(this.appPlist, this.opts.extendInfo)
+ if (this.asarIntegrity) {
+ await this.extendPlist(this.appPlist, {
+ ElectronAsarIntegrity: this.asarIntegrity
+ })
+ } else {
+ delete this.appPlist.ElectronAsarIntegrity
+ }
+ this.appPlist = this.updatePlist(this.appPlist, this.executableName, appBundleIdentifier, this.appName)
+
+ const updateIfExists = [
+ ['helperRendererPlist', '(Renderer)', true],
+ ['helperPluginPlist', '(Plugin)', true],
+ ['helperGPUPlist', '(GPU)', true],
+ ['helperEHPlist', 'EH'],
+ ['helperNPPlist', 'NP']
+ ]
+
+ for (const [plistKey] of [...updateIfExists, ['helperPlist']]) {
+ if (!this[plistKey]) continue
+ await this.extendPlist(this[plistKey], this.opts.extendHelperInfo)
+ }
+
+ this.helperPlist = this.updateHelperPlist(this.helperPlist)
+ for (const [plistKey, ...suffixArgs] of updateIfExists) {
+ if (!this[plistKey]) continue
+ this[plistKey] = this.updateHelperPlist(this[plistKey], ...suffixArgs)
+ }
+
+ // Some properties need to go on all helpers as well, version, usage info, etc.
+ const plistsToUpdate = updateIfExists
+ .filter(([key]) => !!this[key])
+ .map(([key]) => key)
+ .concat(['appPlist', 'helperPlist'])
+
+ if (this.loginHelperPlist) {
+ const loginHelperName = common.sanitizeAppName(`${this.appName} Login Helper`)
+ this.loginHelperPlist.CFBundleExecutable = loginHelperName
+ this.loginHelperPlist.CFBundleIdentifier = `${appBundleIdentifier}.loginhelper`
+ this.loginHelperPlist.CFBundleName = loginHelperName
+ }
+
+ if (this.appVersion) {
+ const appVersionString = '' + this.appVersion
+ for (const plistKey of plistsToUpdate) {
+ this[plistKey].CFBundleShortVersionString = this[plistKey].CFBundleVersion = appVersionString
+ }
+ }
+
+ if (this.buildVersion) {
+ const buildVersionString = '' + this.buildVersion
+ for (const plistKey of plistsToUpdate) {
+ this[plistKey].CFBundleVersion = buildVersionString
+ }
+ }
+
+ if (this.opts.protocols && this.opts.protocols.length) {
+ this.appPlist.CFBundleURLTypes = this.protocols
+ }
+
+ if (this.appCategoryType) {
+ this.appPlist.LSApplicationCategoryType = this.appCategoryType
+ }
+
+ if (this.appCopyright) {
+ this.appPlist.NSHumanReadableCopyright = this.appCopyright
+ }
+
+ if (this.enableDarkMode) {
+ this.appPlist.NSRequiresAquaSystemAppearance = false
+ }
+
+ if (this.usageDescription) {
+ for (const [type, description] of Object.entries(this.usageDescription)) {
+ const usageTypeKey = `NS${type}UsageDescription`
+ for (const plistKey of plistsToUpdate) {
+ this[plistKey][usageTypeKey] = description
+ }
+ this.appPlist[usageTypeKey] = description
+ }
+ }
+
+ await Promise.all(plists.map(([filename, varName]) =>
+ fs.writeFile(filename, plist.build(this[varName]))))
+ }
+
+ async moveHelpers () {
+ const helpers = [' Helper', ' Helper EH', ' Helper NP', ' Helper (Renderer)', ' Helper (Plugin)', ' Helper (GPU)']
+ await Promise.all(helpers.map(suffix => this.moveHelper(this.frameworksPath, suffix)))
+ if (await fs.pathExists(this.loginItemsPath)) {
+ await this.moveHelper(this.loginItemsPath, ' Login Helper')
+ }
+ }
+
+ async moveHelper (helperDirectory, suffix) {
+ const originalBasename = `Electron${suffix}`
+
+ if (await fs.pathExists(path.join(helperDirectory, `${originalBasename}.app`))) {
+ return this.renameHelperAndExecutable(
+ helperDirectory,
+ originalBasename,
+ `${common.sanitizeAppName(this.appName)}${suffix}`
+ )
+ } else {
+ return Promise.resolve()
+ }
+ }
+
+ async renameHelperAndExecutable (helperDirectory, originalBasename, newBasename) {
+ const originalAppname = `${originalBasename}.app`
+ const executableBasePath = path.join(helperDirectory, originalAppname, 'Contents', 'MacOS')
+ await this.relativeRename(executableBasePath, originalBasename, newBasename)
+ await this.relativeRename(helperDirectory, originalAppname, `${newBasename}.app`)
+ }
+
+ async copyIcon () {
+ if (!this.opts.icon) {
+ return Promise.resolve()
+ }
+
+ let icon
+
+ try {
+ icon = await this.normalizeIconExtension('.icns')
+ } catch {
+ // Ignore error if icon doesn't exist, in case it's only available for other OSes
+ /* istanbul ignore next */
+ return Promise.resolve()
+ }
+ if (icon) {
+ debug(`Copying icon "${icon}" to app's Resources as "${this.appPlist.CFBundleIconFile}"`)
+ await fs.copy(icon, path.join(this.originalResourcesDir, this.appPlist.CFBundleIconFile))
+ }
+ }
+
+ async renameAppAndHelpers () {
+ await this.moveHelpers()
+ await fs.rename(this.electronAppPath, this.renamedAppPath)
+ }
+
+ async signAppIfSpecified () {
+ const osxSignOpt = this.opts.osxSign
+ const platform = this.opts.platform
+ const version = this.opts.electronVersion
+
+ if ((platform === 'all' || platform === 'mas') &&
+ osxSignOpt === undefined) {
+ common.warning('signing is required for mas builds. Provide the osx-sign option, ' +
+ 'or manually sign the app later.', this.opts.quiet)
+ }
+
+ if (osxSignOpt) {
+ const signOpts = createSignOpts(osxSignOpt, platform, this.renamedAppPath, version, this.opts.quiet)
+ debug(`Running @electron/osx-sign with the options ${JSON.stringify(signOpts)}`)
+ try {
+ await signApp(signOpts)
+ } catch (err) {
+ // Although not signed successfully, the application is packed.
+ common.warning(`Code sign failed; please retry manually. ${err}`, this.opts.quiet)
+ }
+ }
+ }
+
+ async notarizeAppIfSpecified () {
+ const osxNotarizeOpt = this.opts.osxNotarize
+
+ /* istanbul ignore if */
+ if (osxNotarizeOpt) {
+ const notarizeOpts = createNotarizeOpts(
+ osxNotarizeOpt,
+ this.bundleName,
+ this.renamedAppPath,
+ this.opts.quiet
+ )
+ if (notarizeOpts) {
+ return notarize(notarizeOpts)
+ }
+ }
+ }
+
+ async create () {
+ await this.initialize()
+ await this.updatePlistFiles()
+ await this.copyIcon()
+ await this.renameElectron()
+ await this.renameAppAndHelpers()
+ await this.copyExtraResources()
+ await this.signAppIfSpecified()
+ await this.notarizeAppIfSpecified()
+ return this.move()
+ }
+}
+
+/**
+ * Remove special characters and allow only alphanumeric (A-Z,a-z,0-9), hyphen (-), and period (.)
+ * Apple documentation:
+ * https://developer.apple.com/library/mac/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/20001431-102070
+ */
+function filterCFBundleIdentifier (identifier) {
+ return identifier.replace(/ /g, '-').replace(/[^a-zA-Z0-9.-]/g, '')
+}
+
+function createSignOpts (properties, platform, app, version, quiet) {
+ // use default sign opts if osx-sign is true, otherwise clone osx-sign object
+ const signOpts = properties === true ? { identity: null } : { ...properties }
+
+ // osx-sign options are handed off to sign module, but
+ // with a few additions from the main options
+ // user may think they can pass platform, app, or version, but they will be ignored
+ common.subOptionWarning(signOpts, 'osx-sign', 'platform', platform, quiet)
+ common.subOptionWarning(signOpts, 'osx-sign', 'app', app, quiet)
+ common.subOptionWarning(signOpts, 'osx-sign', 'version', version, quiet)
+
+ if (signOpts.binaries) {
+ common.warning('osx-sign.binaries is not an allowed sub-option. Not passing to @electron/osx-sign.', quiet)
+ delete signOpts.binaries
+ }
+
+ // Take argument osx-sign as signing identity:
+ // if opts.osxSign is true (bool), fallback to identity=null for
+ // autodiscovery. Otherwise, provide signing certificate info.
+ if (signOpts.identity === true) {
+ signOpts.identity = null
+ }
+
+ return signOpts
+}
+
+function createNotarizeOpts (properties, appBundleId, appPath, quiet) {
+ // osxNotarize options are handed off to the @electron/notarize module, but with a few
+ // additions from the main options. The user may think they can pass bundle ID or appPath,
+ // but they will be ignored.
+ if (properties.tool !== 'notarytool') {
+ common.subOptionWarning(properties, 'osxNotarize', 'appBundleId', appBundleId, quiet)
+ }
+ common.subOptionWarning(properties, 'osxNotarize', 'appPath', appPath, quiet)
+ return properties
+}
+
+module.exports = {
+ App: MacApp,
+ createNotarizeOpts: createNotarizeOpts,
+ createSignOpts: createSignOpts,
+ filterCFBundleIdentifier: filterCFBundleIdentifier
+}
diff --git a/desktop/node_modules/electron-packager/src/platform.js b/desktop/node_modules/electron-packager/src/platform.js
new file mode 100644
index 0000000..18df14f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/platform.js
@@ -0,0 +1,277 @@
+'use strict'
+
+const asar = require('@electron/asar')
+const crypto = require('crypto')
+const debug = require('debug')('electron-packager')
+const fs = require('fs-extra')
+const path = require('path')
+
+const common = require('./common')
+const copyFilter = require('./copy-filter')
+const hooks = require('./hooks')
+
+class App {
+ constructor (opts, templatePath) {
+ this.opts = opts
+ this.templatePath = templatePath
+ this.asarOptions = common.createAsarOpts(opts)
+
+ if (this.opts.prune === undefined) {
+ this.opts.prune = true
+ }
+ }
+
+ /**
+ * Resource directory path before renaming.
+ */
+ get originalResourcesDir () {
+ return this.resourcesDir
+ }
+
+ /**
+ * Resource directory path after renaming.
+ */
+ get resourcesDir () {
+ return path.join(this.stagingPath, 'resources')
+ }
+
+ get originalResourcesAppDir () {
+ return path.join(this.originalResourcesDir, 'app')
+ }
+
+ get electronBinaryDir () {
+ return this.stagingPath
+ }
+
+ get originalElectronName () {
+ /* istanbul ignore next */
+ throw new Error('Child classes must implement this')
+ }
+
+ get newElectronName () {
+ /* istanbul ignore next */
+ throw new Error('Child classes must implement this')
+ }
+
+ get executableName () {
+ return this.opts.executableName || this.opts.name
+ }
+
+ get stagingPath () {
+ if (this.opts.tmpdir === false) {
+ return common.generateFinalPath(this.opts)
+ } else {
+ if (!this.cachedStagingPath) {
+ const parentDir = path.join(
+ common.baseTempDir(this.opts),
+ `${this.opts.platform}-${this.opts.arch}`
+ )
+ fs.mkdirpSync(parentDir)
+ this.cachedStagingPath = fs.mkdtempSync(path.join(parentDir, `${common.generateFinalBasename(this.opts)}-`))
+ }
+ return this.cachedStagingPath
+ }
+ }
+
+ get appAsarPath () {
+ return path.join(this.originalResourcesDir, 'app.asar')
+ }
+
+ get commonHookArgs () {
+ return [
+ this.opts.electronVersion,
+ this.opts.platform,
+ this.opts.arch
+ ]
+ }
+
+ get hookArgsWithOriginalResourcesAppDir () {
+ return [
+ this.originalResourcesAppDir,
+ ...this.commonHookArgs
+ ]
+ }
+
+ async relativeRename (basePath, oldName, newName) {
+ debug(`Renaming ${oldName} to ${newName} in ${basePath}`)
+ await fs.rename(path.join(basePath, oldName), path.join(basePath, newName))
+ }
+
+ async renameElectron () {
+ return this.relativeRename(this.electronBinaryDir, this.originalElectronName, this.newElectronName)
+ }
+
+ /**
+ * Performs the following initial operations for an app:
+ * * Creates temporary directory
+ * * Remove default_app (which is either a folder or an asar file)
+ * * If a prebuilt asar is specified:
+ * * Copies asar into temporary directory as app.asar
+ * * Otherwise:
+ * * Copies template into temporary directory
+ * * Copies user's app into temporary directory
+ * * Prunes non-production node_modules (if opts.prune is either truthy or undefined)
+ * * Creates an asar (if opts.asar is set)
+ *
+ * Prune and asar are performed before platform-specific logic, primarily so that
+ * this.originalResourcesAppDir is predictable (e.g. before .app is renamed for Mac)
+ */
+ async initialize () {
+ debug(`Initializing app in ${this.stagingPath} from ${this.templatePath} template`)
+
+ await fs.move(this.templatePath, this.stagingPath, { clobber: true })
+ await this.removeDefaultApp()
+ if (this.opts.prebuiltAsar) {
+ await this.copyPrebuiltAsar()
+ } else {
+ await this.buildApp()
+ }
+
+ await hooks.promisifyHooks(this.opts.afterInitialize, this.hookArgsWithOriginalResourcesAppDir)
+ }
+
+ async buildApp () {
+ await this.copyTemplate()
+ await common.validateElectronApp(this.opts.dir, this.originalResourcesAppDir)
+ await this.asarApp()
+ }
+
+ async copyTemplate () {
+ await hooks.promisifyHooks(this.opts.beforeCopy, this.hookArgsWithOriginalResourcesAppDir)
+
+ await fs.copy(this.opts.dir, this.originalResourcesAppDir, {
+ filter: copyFilter.userPathFilter(this.opts),
+ dereference: this.opts.derefSymlinks
+ })
+ await hooks.promisifyHooks(this.opts.afterCopy, this.hookArgsWithOriginalResourcesAppDir)
+ if (this.opts.prune) {
+ await hooks.promisifyHooks(this.opts.afterPrune, this.hookArgsWithOriginalResourcesAppDir)
+ }
+ }
+
+ async removeDefaultApp () {
+ await Promise.all(['default_app', 'default_app.asar'].map(async basename => fs.remove(path.join(this.originalResourcesDir, basename))))
+ }
+
+ /**
+ * Forces an icon filename to a given extension and returns the normalized filename,
+ * if it exists. Otherwise, returns null.
+ *
+ * This error path is used by win32 if no icon is specified.
+ */
+ async normalizeIconExtension (targetExt) {
+ if (!this.opts.icon) throw new Error('No filename specified to normalizeIconExtension')
+
+ let iconFilename = this.opts.icon
+ const ext = path.extname(iconFilename)
+ if (ext !== targetExt) {
+ iconFilename = path.join(path.dirname(iconFilename), path.basename(iconFilename, ext) + targetExt)
+ }
+
+ if (await fs.pathExists(iconFilename)) {
+ return iconFilename
+ } else {
+ /* istanbul ignore next */
+ common.warning(`Could not find icon "${iconFilename}", not updating app icon`, this.opts.quiet)
+ }
+ }
+
+ prebuiltAsarWarning (option, triggerWarning) {
+ if (triggerWarning) {
+ common.warning(`prebuiltAsar and ${option} are incompatible, ignoring the ${option} option`, this.opts.quiet)
+ }
+ }
+
+ async copyPrebuiltAsar () {
+ if (this.asarOptions) {
+ common.warning('prebuiltAsar has been specified, all asar options will be ignored', this.opts.quiet)
+ }
+
+ for (const hookName of ['beforeCopy', 'afterCopy', 'afterPrune']) {
+ if (this.opts[hookName]) {
+ throw new Error(`${hookName} is incompatible with prebuiltAsar`)
+ }
+ }
+
+ this.prebuiltAsarWarning('ignore', this.opts.originalIgnore)
+ this.prebuiltAsarWarning('prune', !this.opts.prune)
+ this.prebuiltAsarWarning('derefSymlinks', this.opts.derefSymlinks !== undefined)
+
+ const src = path.resolve(this.opts.prebuiltAsar)
+
+ const stat = await fs.stat(src)
+ if (!stat.isFile()) {
+ throw new Error(`${src} specified in prebuiltAsar must be an asar file.`)
+ }
+
+ debug(`Copying asar: ${src} to ${this.appAsarPath}`)
+ await fs.copy(src, this.appAsarPath, { overwrite: false, errorOnExist: true })
+ }
+
+ appRelativePath (p) {
+ return path.relative(this.stagingPath, p)
+ }
+
+ async asarApp () {
+ if (!this.asarOptions) {
+ return Promise.resolve()
+ }
+
+ debug(`Running asar with the options ${JSON.stringify(this.asarOptions)}`)
+
+ await hooks.promisifyHooks(this.opts.beforeAsar, this.hookArgsWithOriginalResourcesAppDir)
+
+ await asar.createPackageWithOptions(this.originalResourcesAppDir, this.appAsarPath, this.asarOptions)
+ const { headerString } = asar.getRawHeader(this.appAsarPath)
+ this.asarIntegrity = {
+ [this.appRelativePath(this.appAsarPath)]: {
+ algorithm: 'SHA256',
+ hash: crypto.createHash('SHA256').update(headerString).digest('hex')
+ }
+ }
+ await fs.remove(this.originalResourcesAppDir)
+
+ await hooks.promisifyHooks(this.opts.afterAsar, this.hookArgsWithOriginalResourcesAppDir)
+ }
+
+ async copyExtraResources () {
+ if (!this.opts.extraResource) return Promise.resolve()
+
+ const extraResources = common.ensureArray(this.opts.extraResource)
+
+ const hookArgs = [
+ this.stagingPath,
+ ...this.commonHookArgs
+ ]
+
+ await hooks.promisifyHooks(this.opts.beforeCopyExtraResources, hookArgs)
+
+ await Promise.all(extraResources.map(
+ resource => fs.copy(resource, path.resolve(this.stagingPath, this.resourcesDir, path.basename(resource)))
+ ))
+
+ await hooks.promisifyHooks(this.opts.afterCopyExtraResources, hookArgs)
+ }
+
+ async move () {
+ const finalPath = common.generateFinalPath(this.opts)
+
+ if (this.opts.tmpdir !== false) {
+ debug(`Moving ${this.stagingPath} to ${finalPath}`)
+ await fs.move(this.stagingPath, finalPath)
+ }
+
+ if (this.opts.afterComplete) {
+ const hookArgs = [
+ finalPath,
+ ...this.commonHookArgs
+ ]
+
+ await hooks.promisifyHooks(this.opts.afterComplete, hookArgs)
+ }
+
+ return finalPath
+ }
+}
+
+module.exports = App
diff --git a/desktop/node_modules/electron-packager/src/prune.js b/desktop/node_modules/electron-packager/src/prune.js
new file mode 100644
index 0000000..a94f49a
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/prune.js
@@ -0,0 +1,70 @@
+'use strict'
+
+const common = require('./common')
+const galactus = require('galactus')
+const fs = require('fs-extra')
+const path = require('path')
+
+const ELECTRON_MODULES = [
+ 'electron',
+ 'electron-nightly',
+ 'electron-prebuilt',
+ 'electron-prebuilt-compile'
+]
+
+class Pruner {
+ constructor (dir, quiet) {
+ this.baseDir = common.normalizePath(dir)
+ this.quiet = quiet
+ this.galactus = new galactus.DestroyerOfModules({
+ rootDirectory: dir,
+ shouldKeepModuleTest: (module, isDevDep) => this.shouldKeepModule(module, isDevDep)
+ })
+ this.walkedTree = false
+ }
+
+ setModules (moduleMap) {
+ const modulePaths = Array.from(moduleMap.keys()).map(modulePath => `/${common.normalizePath(modulePath)}`)
+ this.modules = new Set(modulePaths)
+ this.walkedTree = true
+ }
+
+ async pruneModule (name) {
+ if (this.walkedTree) {
+ return this.isProductionModule(name)
+ } else {
+ const moduleMap = await this.galactus.collectKeptModules({ relativePaths: true })
+ this.setModules(moduleMap)
+ return this.isProductionModule(name)
+ }
+ }
+
+ shouldKeepModule (module, isDevDep) {
+ if (isDevDep || module.depType === galactus.DepType.ROOT) {
+ return false
+ }
+
+ if (ELECTRON_MODULES.includes(module.name)) {
+ common.warning(`Found '${module.name}' but not as a devDependency, pruning anyway`, this.quiet)
+ return false
+ }
+
+ return true
+ }
+
+ isProductionModule (name) {
+ return this.modules.has(name)
+ }
+}
+
+function isNodeModuleFolder (pathToCheck) {
+ return path.basename(path.dirname(pathToCheck)) === 'node_modules' ||
+ (path.basename(path.dirname(pathToCheck)).startsWith('@') && path.basename(path.resolve(pathToCheck, `..${path.sep}..`)) === 'node_modules')
+}
+
+module.exports = {
+ isModule: async function isModule (pathToCheck) {
+ return (await fs.pathExists(path.join(pathToCheck, 'package.json'))) && isNodeModuleFolder(pathToCheck)
+ },
+ Pruner: Pruner
+}
diff --git a/desktop/node_modules/electron-packager/src/targets.js b/desktop/node_modules/electron-packager/src/targets.js
new file mode 100644
index 0000000..aba6cc0
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/targets.js
@@ -0,0 +1,149 @@
+'use strict'
+
+const common = require('./common')
+const { getHostArch } = require('@electron/get')
+const semver = require('semver')
+
+const officialArchs = ['ia32', 'x64', 'armv7l', 'arm64', 'mips64el', 'universal']
+const officialPlatforms = ['darwin', 'linux', 'mas', 'win32']
+const officialPlatformArchCombos = {
+ darwin: ['x64', 'arm64', 'universal'],
+ linux: ['ia32', 'x64', 'armv7l', 'arm64', 'mips64el'],
+ mas: ['x64', 'arm64', 'universal'],
+ win32: ['ia32', 'x64', 'arm64']
+}
+
+const buildVersions = {
+ darwin: {
+ arm64: '>= 11.0.0-beta.1',
+ universal: '>= 11.0.0-beta.1'
+ },
+ linux: {
+ arm64: '>= 1.8.0',
+ ia32: '<19.0.0-beta.1',
+ mips64el: '^1.8.2-beta.5'
+ },
+ mas: {
+ arm64: '>= 11.0.0-beta.1',
+ universal: '>= 11.0.0-beta.1'
+ },
+ win32: {
+ arm64: '>= 6.0.8'
+ }
+}
+
+// Maps to module filename for each platform (lazy-required if used)
+const osModules = {
+ darwin: './mac',
+ linux: './linux',
+ mas: './mac', // map to darwin
+ win32: './win32'
+}
+
+const supported = {
+ arch: new Set(officialArchs),
+ platform: new Set(officialPlatforms)
+}
+
+function createPlatformArchPairs (opts, selectedPlatforms, selectedArchs, ignoreFunc) {
+ const combinations = []
+ for (const arch of selectedArchs) {
+ for (const platform of selectedPlatforms) {
+ if (usingOfficialElectronPackages(opts)) {
+ if (!validOfficialPlatformArch(opts, platform, arch)) {
+ warnIfAllNotSpecified(opts, `The platform/arch combination ${platform}/${arch} is not currently supported by Electron Packager`)
+ continue
+ } else if (buildVersions[platform] && buildVersions[platform][arch]) {
+ const buildVersion = buildVersions[platform][arch]
+ if (buildVersion && !officialBuildExists(opts, buildVersion)) {
+ warnIfAllNotSpecified(opts, `Official ${platform}/${arch} support only exists in Electron ${buildVersion}`)
+ continue
+ }
+ }
+ if (typeof ignoreFunc === 'function' && ignoreFunc(platform, arch)) continue
+ }
+ combinations.push([platform, arch])
+ }
+ }
+
+ return combinations
+}
+
+function unsupportedListOption (name, value, supported) {
+ return new Error(`Unsupported ${name}=${value} (${typeof value}); must be a string matching: ${Array.from(supported.values()).join(', ')}`)
+}
+
+function usingOfficialElectronPackages (opts) {
+ return !opts.download || !Object.prototype.hasOwnProperty.call(opts.download, 'mirrorOptions')
+}
+
+function validOfficialPlatformArch (opts, platform, arch) {
+ return officialPlatformArchCombos[platform] && officialPlatformArchCombos[platform].includes(arch)
+}
+
+function officialBuildExists (opts, buildVersion) {
+ return semver.satisfies(opts.electronVersion, buildVersion, { includePrerelease: true })
+}
+
+function allPlatformsOrArchsSpecified (opts) {
+ return opts.all || opts.arch === 'all' || opts.platform === 'all'
+}
+
+function warnIfAllNotSpecified (opts, message) {
+ if (!allPlatformsOrArchsSpecified(opts)) {
+ common.warning(message, opts.quiet)
+ }
+}
+
+module.exports = {
+ allOfficialArchsForPlatformAndVersion: function allOfficialArchsForPlatformAndVersion (platform, electronVersion) {
+ const archs = officialPlatformArchCombos[platform]
+ if (buildVersions[platform]) {
+ const excludedArchs = Object.keys(buildVersions[platform])
+ .filter(arch => !officialBuildExists({ electronVersion: electronVersion }, buildVersions[platform][arch]))
+ return archs.filter(arch => !excludedArchs.includes(arch))
+ }
+
+ return archs
+ },
+ createPlatformArchPairs,
+ officialArchs,
+ officialPlatformArchCombos,
+ officialPlatforms,
+ osModules,
+ supported,
+ // Validates list of architectures or platforms.
+ // Returns a normalized array if successful, or throws an Error.
+ validateListFromOptions: function validateListFromOptions (opts, name) {
+ if (opts.all) return Array.from(supported[name].values())
+
+ let list = opts[name]
+ if (!list) {
+ if (name === 'arch') {
+ list = getHostArch()
+ } else {
+ list = process[name]
+ }
+ } else if (list === 'all') {
+ return Array.from(supported[name].values())
+ }
+
+ if (!Array.isArray(list)) {
+ if (typeof list === 'string') {
+ list = list.split(/,\s*/)
+ } else {
+ return unsupportedListOption(name, list, supported[name])
+ }
+ }
+
+ const officialElectronPackages = usingOfficialElectronPackages(opts)
+
+ for (const value of list) {
+ if (officialElectronPackages && !supported[name].has(value)) {
+ return unsupportedListOption(name, value, supported[name])
+ }
+ }
+
+ return list
+ }
+}
diff --git a/desktop/node_modules/electron-packager/src/universal.js b/desktop/node_modules/electron-packager/src/universal.js
new file mode 100644
index 0000000..8ae7cb1
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/universal.js
@@ -0,0 +1,80 @@
+'use strict'
+
+const universal = require('@electron/universal')
+const common = require('./common')
+const fs = require('fs-extra')
+const path = require('path')
+
+async function packageUniversalMac (packageForPlatformAndArchWithOpts, buildDir, comboOpts, downloadOpts, tempBase) {
+ // In order to generate a universal macOS build we actually need to build the x64 and the arm64 app
+ // and then glue them together
+ common.info(`Packaging app for platform ${comboOpts.platform} universal using electron v${comboOpts.electronVersion} - Building x64 and arm64 slices now`, comboOpts.quiet)
+ await fs.mkdirp(tempBase)
+ const tempDir = await fs.mkdtemp(path.resolve(tempBase, 'electron-packager-universal-'))
+
+ const { App } = require('./mac')
+ const app = new App(comboOpts, buildDir)
+ const universalStagingPath = app.stagingPath
+ const finalUniversalPath = common.generateFinalPath(app.opts)
+
+ if (await fs.pathExists(finalUniversalPath)) {
+ if (comboOpts.overwrite) {
+ await fs.remove(finalUniversalPath)
+ } else {
+ common.info(`Skipping ${comboOpts.platform} ${comboOpts.arch} (output dir already exists, use --overwrite to force)`, comboOpts.quiet)
+ return true
+ }
+ }
+
+ const tempPackages = {}
+
+ for (const tempArch of ['x64', 'arm64']) {
+ const tempOpts = {
+ ...comboOpts,
+ arch: tempArch,
+ out: tempDir
+ }
+ const tempDownloadOpts = {
+ ...downloadOpts,
+ arch: tempArch
+ }
+ // Do not sign or notarize the individual slices, we sign and notarize the merged app later
+ delete tempOpts.osxSign
+ delete tempOpts.osxNotarize
+
+ tempPackages[tempArch] = await packageForPlatformAndArchWithOpts(tempOpts, tempDownloadOpts)
+ }
+
+ const x64AppPath = tempPackages.x64
+ const arm64AppPath = tempPackages.arm64
+
+ common.info(`Stitching universal app for platform ${comboOpts.platform}`, comboOpts.quiet)
+
+ const generatedFiles = await fs.readdir(x64AppPath)
+ const appName = generatedFiles.filter(file => path.extname(file) === '.app')[0]
+
+ await universal.makeUniversalApp({
+ ...comboOpts.osxUniversal,
+ x64AppPath: path.resolve(x64AppPath, appName),
+ arm64AppPath: path.resolve(arm64AppPath, appName),
+ outAppPath: path.resolve(universalStagingPath, appName)
+ })
+
+ await app.signAppIfSpecified()
+ await app.notarizeAppIfSpecified()
+ await app.move()
+
+ for (const generatedFile of generatedFiles) {
+ if (path.extname(generatedFile) === '.app') continue
+
+ await fs.copy(path.resolve(x64AppPath, generatedFile), path.resolve(finalUniversalPath, generatedFile))
+ }
+
+ await fs.remove(tempDir)
+
+ return finalUniversalPath
+}
+
+module.exports = {
+ packageUniversalMac
+}
diff --git a/desktop/node_modules/electron-packager/src/unzip.js b/desktop/node_modules/electron-packager/src/unzip.js
new file mode 100644
index 0000000..705c552
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/unzip.js
@@ -0,0 +1,7 @@
+'use strict'
+
+const extractZip = require('extract-zip')
+
+module.exports = async function extractElectronZip (zipPath, targetDir) {
+ await extractZip(zipPath, { dir: targetDir })
+}
diff --git a/desktop/node_modules/electron-packager/src/win32.js b/desktop/node_modules/electron-packager/src/win32.js
new file mode 100644
index 0000000..9416617
--- /dev/null
+++ b/desktop/node_modules/electron-packager/src/win32.js
@@ -0,0 +1,113 @@
+'use strict'
+
+const debug = require('debug')('electron-packager')
+const path = require('path')
+const { WrapperError } = require('cross-spawn-windows-exe')
+
+const App = require('./platform')
+const common = require('./common')
+
+function updateWineMissingException (err) {
+ if (err instanceof WrapperError) {
+ err.message += '\n\n' +
+ 'Wine is required to use the appCopyright, appVersion, buildVersion, icon, and \n' +
+ 'win32metadata parameters for Windows targets.\n\n' +
+ 'See https://github.com/electron/electron-packager#building-windows-apps-from-non-windows-platforms for details.'
+ }
+
+ return err
+}
+
+class WindowsApp extends App {
+ get originalElectronName () {
+ return 'electron.exe'
+ }
+
+ get newElectronName () {
+ return `${common.sanitizeAppName(this.executableName)}.exe`
+ }
+
+ get electronBinaryPath () {
+ return path.join(this.stagingPath, this.newElectronName)
+ }
+
+ generateRceditOptionsSansIcon () {
+ const win32metadata = {
+ FileDescription: this.opts.name,
+ InternalName: this.opts.name,
+ OriginalFilename: this.newElectronName,
+ ProductName: this.opts.name,
+ ...this.opts.win32metadata
+ }
+
+ const rcOpts = { 'version-string': win32metadata }
+
+ if (this.opts.appVersion) {
+ rcOpts['product-version'] = rcOpts['file-version'] = this.opts.appVersion
+ }
+
+ if (this.opts.buildVersion) {
+ rcOpts['file-version'] = this.opts.buildVersion
+ }
+
+ if (this.opts.appCopyright) {
+ rcOpts['version-string'].LegalCopyright = this.opts.appCopyright
+ }
+
+ const manifestProperties = ['application-manifest', 'requested-execution-level']
+ for (const manifestProperty of manifestProperties) {
+ if (win32metadata[manifestProperty]) {
+ rcOpts[manifestProperty] = win32metadata[manifestProperty]
+ }
+ }
+
+ return rcOpts
+ }
+
+ async getIconPath () {
+ if (!this.opts.icon) {
+ return Promise.resolve()
+ }
+
+ return this.normalizeIconExtension('.ico')
+ }
+
+ needsRcedit () {
+ return this.opts.icon || this.opts.win32metadata || this.opts.appCopyright || this.opts.appVersion || this.opts.buildVersion
+ }
+
+ async runRcedit () {
+ /* istanbul ignore if */
+ if (!this.needsRcedit()) {
+ return Promise.resolve()
+ }
+
+ const rcOpts = this.generateRceditOptionsSansIcon()
+
+ // Icon might be omitted or only exist in one OS's format, so skip it if normalizeExt reports an error
+ const icon = await this.getIconPath()
+ if (icon) {
+ rcOpts.icon = icon
+ }
+
+ debug(`Running rcedit with the options ${JSON.stringify(rcOpts)}`)
+ try {
+ await require('rcedit')(this.electronBinaryPath, rcOpts)
+ } catch (err) {
+ throw updateWineMissingException(err)
+ }
+ }
+
+ async create () {
+ await this.initialize()
+ await this.renameElectron()
+ await this.copyExtraResources()
+ await this.runRcedit()
+ return this.move()
+ }
+}
+
+module.exports = {
+ App: WindowsApp,
+ updateWineMissingException: updateWineMissingException
+}
diff --git a/desktop/node_modules/electron-packager/usage.txt b/desktop/node_modules/electron-packager/usage.txt
new file mode 100644
index 0000000..a59b64f
--- /dev/null
+++ b/desktop/node_modules/electron-packager/usage.txt
@@ -0,0 +1,129 @@
+Usage: electron-packager <sourcedir> <appname> [options...]
+
+Required parameters
+
+sourcedir the base directory of the application source
+
+ Examples: electron-packager ./
+ electron-packager ./ --all
+
+Optional parameters
+
+appname the name of the app, if it needs to be different from the "productName" or "name"
+ in the nearest package.json
+
+Options
+
+version prints the version of Electron Packager and Node, plus the target platform and
+ arch, for bug reporting purposes, and exits immediately
+
+* All platforms *
+
+all equivalent to --platform=all --arch=all
+app-copyright human-readable copyright line for the app
+app-version release version to set for the app
+arch all, or one or more of: ia32, x64, armv7l, arm64, mips64el, universal (comma-delimited if
+ multiple). Defaults to the host arch.
+ For info on arch/platform support see https://github.com/electron/electron-packager/#supported-platforms
+asar whether to package the source code within your app into an archive. You can either
+ pass --asar by itself to use the default configuration, OR use dot notation to
+ configure a list of sub-properties, e.g. --asar.unpackDir=sub_dir - do not use
+ --asar and its sub-properties simultaneously.
+
+ Properties supported include:
+ - ordering: path to an ordering file for file packing
+ - unpack: unpacks the files to the app.asar.unpacked directory whose filenames
+ regex .match this string
+ - unpackDir: unpacks the dir to the app.asar.unpacked directory whose names glob
+ pattern or exactly match this string. It's relative to the <sourcedir>.
+build-version build version to set for the app
+download a list of sub-options to pass to @electron/get. They are specified via dot
+ notation, e.g., --download.cacheRoot=/tmp/cache
+ Properties supported:
+ - cacheRoot: directory of cached Electron downloads. For default value, see
+ @electron/get documentation
+ - mirrorOptions: alternate URL options for downloading Electron zips. See
+ @electron/get documentation for details
+ - rejectUnauthorized: whether SSL certs are required to be valid when downloading
+ Electron. Defaults to true, use --no-download.rejectUnauthorized to disable
+ checks.
+electron-version the version of Electron that is being packaged, see
+ https://github.com/electron/electron/releases
+electron-zip-dir the local path to a directory containing Electron ZIP files
+executable-name the name of the executable file, sans file extension. Defaults to appname
+extra-resource a file to copy into the app's resources directory
+icon the local path to an icon file to use as the icon for the app.
+ Note: Format depends on platform.
+ignore do not copy files into app whose filenames RegExp.match this string. See also:
+ https://electron.github.io/electron-packager/main/interfaces/electronpackager.options.html#ignore
+ and --no-prune. Can be specified multiple times
+no-deref-symlinks make sure symlinks are not dereferenced within the app source
+no-junk do not ignore system junk files from the packaged app
+no-prune do not prune devDependencies from the packaged app
+out the dir to put the app into at the end. Defaults to current working dir
+overwrite if output directory for a platform already exists, replaces it rather than
+ skipping it
+platform all, or one or more of: darwin, linux, mas, win32 (comma-delimited if multiple).
+ Defaults to the host platform
+prebuilt-asar path to a prebuilt asar file (asar, ignore, no-prune, and no-deref-symlinks
+ options are incompatible with this option and will be ignored)
+quiet Do not print informational or warning messages
+tmpdir temp directory. Defaults to system temp directory, use --no-tmpdir to disable
+ use of a temporary directory.
+
+* darwin/mas target platforms only *
+
+app-bundle-id bundle identifier to use in the app plist
+app-category-type the application category type
+ For example, `app-category-type=public.app-category.developer-tools` will set the
+ application category to 'Developer Tools'.
+darwin-dark-mode-support
+ forces support for Mojave/10.14 dark mode in the packaged app
+extend-info a plist file to merge into the app plist
+helper-bundle-id bundle identifier to use in the app helper plist
+osx-sign (macOS host platform only) Whether to sign the macOS app packages. You can either
+ pass --osx-sign by itself to use the default configuration, or use dot notation
+ to configure a list of sub-properties, e.g. --osx-sign.identity="My Name"
+ For info on supported values see https://npm.im/@electron/osx-sign#opts---options
+ Properties supported include:
+ - identity: should contain the identity to be used when running `codesign`
+ - entitlements: the path to entitlements used in signing
+ - entitlements-inherit: the path to the 'child' entitlements
+osx-notarize (macOS host platform only, requires --osx-sign) Whether to notarize the macOS app
+ packages. You must use dot notation to configure a list of sub-properties, e.g.
+ --osx-notarize.appleId="foo@example.com"
+ For info on supported values see https://npm.im/@electron/notarize#method-notarizeopts-promisevoid
+ Properties supported include:
+ - appleId: should contain your apple ID username / email
+ - appleIdPassword: should contain the password for the provided apple ID
+ - appleApiKey: should contain an App Store Connect API key
+ - appleApiIssuer: should contain the API key's issuer
+osx-universal (macOS host platform only, requires --arch=universal) Options to pass to `@electron/universal`
+ when packaging a Universal macOS binary. You must use dot notation to configure a list of sub-properties,
+ e.g. --osx-universal.mergeASARs="true"
+ For info on supported values see
+ https://electron.github.io/electron-packager/main/modules/electronpackager.html#osxuniversaloptions
+protocol URL protocol scheme to register the app as an opener of.
+ For example, `--protocol=myapp` would register the app to open
+ URLs such as `myapp://path`. This argument requires a `--protocol-name`
+ argument to also be specified.
+protocol-name Descriptive name of URL protocol scheme specified via `--protocol`
+usage-description Human-readable descriptions of how the app uses certain macOS features. Displayed
+ in the App Store. A non-exhaustive list of properties supported:
+ - Camera
+ - Microphone
+
+* win32 target platform only *
+
+win32metadata a list of sub-properties used to set the application metadata embedded into
+ the executable. They are specified via dot notation,
+ e.g. --win32metadata.CompanyName="Company Inc."
+ or --win32metadata.ProductName="Product"
+ Properties supported:
+ - CompanyName (default: author name from nearest package.json)
+ - FileDescription (default: appname)
+ - OriginalFilename (default: renamed exe)
+ - ProductName (default: appname)
+ - InternalName (default: appname)
+ - requested-execution-level (user, asInvoker, or requireAdministrator)
+ - application-manifest