diff --git a/.changeset/thick-eyes-glow.md b/.changeset/thick-eyes-glow.md new file mode 100644 index 00000000000..183d8972168 --- /dev/null +++ b/.changeset/thick-eyes-glow.md @@ -0,0 +1,5 @@ +--- + +--- + +chore(docs): Updating/migrating docs branch and automating docs deployment diff --git a/.github/workflows/pr-release.yml b/.github/workflows/pr-release.yml index ad5d00212ff..3d320c47280 100644 --- a/.github/workflows/pr-release.yml +++ b/.github/workflows/pr-release.yml @@ -48,3 +48,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Deploy Documentation + uses: netlify/actions/build@master + if: steps.changesets.outputs.published == 'true' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} + NETLIFY_CMD: bash netlify-docs.sh + NETLIFY_DIR: site diff --git a/.gitignore b/.gitignore index d0ba655483f..25a9d086652 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ out/ /packages/dmg-builder/vendor/ /packages/electron-builder/README.md -#/packages/app-builder-lib/scheme.json /scripts/jsdoc/out/ /scripts/renderer/out/ @@ -24,7 +23,6 @@ out/ electron-builder-*.d.ts /site/ -/docs/ tsconfig.tsbuildinfo diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5fc0e14048e..c550ff714f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -61,19 +61,13 @@ our git [commit messages can be formatted](https://gist.github.com/develar/273e2 ## Documentation -To avoid Google indexing, documentation files located in the branch `docs`. To clone: - -```shell script -git clone --single-branch -b docs git@github.com:electron-userland/electron-builder.git docs -``` - Documentation files located in the `/docs`. -`/docs` is deployed to Netlify when `next` release is marked as `latest` and available for all users. +`/docs` is deployed to Netlify on every release and available for all users. -`pip3 install mkdocs-material mkdocs markdown-include pymdown-extensions pygments --upgrade` +`bash netlify-docs.sh` to setup local env (Python 3) and build. -You'll want to copy the `mkdocs.yml` file from the master branch and then run `mkdocs build`. +Build command: `mkdocs build`. ## Debug Tests diff --git a/Pipfile b/Pipfile new file mode 100644 index 00000000000..b4e07d9c8bd --- /dev/null +++ b/Pipfile @@ -0,0 +1,16 @@ +[[source]] +url = "https://pypi.org/simple" +verify_ssl = true +name = "pypi" + +[packages] +mkdocs-material = "*" +mkdocs = "*" +markdown-include = "*" +pymdown-extensions = "*" +pygments = "*" + +[dev-packages] + +[requires] +python_version = "3" diff --git a/Pipfile.lock b/Pipfile.lock new file mode 100644 index 00000000000..ea8d7dd2ac6 --- /dev/null +++ b/Pipfile.lock @@ -0,0 +1,286 @@ +{ + "_meta": { + "hash": { + "sha256": "e40ebe3c410d07fe778b70292e570f01756da2da8a1fdaccb42a32396a37436b" + }, + "pipfile-spec": 6, + "requires": { + "python_version": "3" + }, + "sources": [ + { + "name": "pypi", + "url": "https://pypi.org/simple", + "verify_ssl": true + } + ] + }, + "default": { + "click": { + "hashes": [ + "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a", + "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6" + ], + "markers": "python_version >= '3.6'", + "version": "==8.0.1" + }, + "ghp-import": { + "hashes": [ + "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483" + ], + "version": "==2.0.1" + }, + "importlib-metadata": { + "hashes": [ + "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15", + "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1" + ], + "markers": "python_version >= '3.6'", + "version": "==4.8.1" + }, + "jinja2": { + "hashes": [ + "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4", + "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4" + ], + "markers": "python_version >= '3.6'", + "version": "==3.0.1" + }, + "markdown": { + "hashes": [ + "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49", + "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c" + ], + "markers": "python_version >= '3.6'", + "version": "==3.3.4" + }, + "markdown-include": { + "hashes": [ + "sha256:6f5d680e36f7780c7f0f61dca53ca581bd50d1b56137ddcd6353efafa0c3e4a2" + ], + "index": "pypi", + "version": "==0.6.0" + }, + "markupsafe": { + "hashes": [ + "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298", + "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64", + "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b", + "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567", + "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff", + "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724", + "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74", + "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646", + "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35", + "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6", + "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6", + "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad", + "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26", + "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38", + "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac", + "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7", + "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6", + "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75", + "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f", + "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135", + "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8", + "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a", + "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a", + "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9", + "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864", + "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914", + "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18", + "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8", + "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2", + "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d", + "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b", + "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b", + "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f", + "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb", + "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833", + "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28", + "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415", + "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902", + "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d", + "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9", + "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d", + "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145", + "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066", + "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c", + "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1", + "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f", + "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53", + "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134", + "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85", + "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5", + "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94", + "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509", + "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51", + "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872" + ], + "markers": "python_version >= '3.6'", + "version": "==2.0.1" + }, + "mergedeep": { + "hashes": [ + "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8", + "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307" + ], + "markers": "python_version >= '3.6'", + "version": "==1.3.4" + }, + "mkdocs": { + "hashes": [ + "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078", + "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff" + ], + "index": "pypi", + "version": "==1.2.2" + }, + "mkdocs-material": { + "hashes": [ + "sha256:332bafc1584d2d229aa05f7894b4b0f62055fc0d05c96e6ef1785c86ef6e8f91", + "sha256:e2a3aa5e20fbdb260d22ec56c01247896c6ae743702e1cd9023fd149a4ae9890" + ], + "index": "pypi", + "version": "==7.2.5" + }, + "mkdocs-material-extensions": { + "hashes": [ + "sha256:6947fb7f5e4291e3c61405bad3539d81e0b3cd62ae0d66ced018128af509c68f", + "sha256:d90c807a88348aa6d1805657ec5c0b2d8d609c110e62b9dce4daf7fa981fa338" + ], + "markers": "python_version >= '3.5'", + "version": "==1.0.1" + }, + "packaging": { + "hashes": [ + "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7", + "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14" + ], + "markers": "python_version >= '3.6'", + "version": "==21.0" + }, + "pygments": { + "hashes": [ + "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380", + "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6" + ], + "index": "pypi", + "version": "==2.10.0" + }, + "pymdown-extensions": { + "hashes": [ + "sha256:141452d8ed61165518f2c923454bf054866b85cf466feedb0eb68f04acdc2560", + "sha256:b6daa94aad9e1310f9c64c8b1f01e4ce82937ab7eb53bfc92876a97aca02a6f4" + ], + "index": "pypi", + "version": "==8.2" + }, + "pyparsing": { + "hashes": [ + "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1", + "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b" + ], + "markers": "python_version >= '2.6' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.4.7" + }, + "python-dateutil": { + "hashes": [ + "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86", + "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==2.8.2" + }, + "pyyaml": { + "hashes": [ + "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf", + "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696", + "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393", + "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77", + "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922", + "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5", + "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8", + "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10", + "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc", + "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018", + "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e", + "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253", + "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347", + "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183", + "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541", + "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb", + "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185", + "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc", + "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db", + "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa", + "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46", + "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122", + "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b", + "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63", + "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df", + "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc", + "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247", + "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6", + "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5'", + "version": "==5.4.1" + }, + "pyyaml-env-tag": { + "hashes": [ + "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb", + "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069" + ], + "markers": "python_version >= '3.6'", + "version": "==0.1" + }, + "six": { + "hashes": [ + "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926", + "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254" + ], + "markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3'", + "version": "==1.16.0" + }, + "watchdog": { + "hashes": [ + "sha256:28777dbed3bbd95f9c70f461443990a36c07dbf49ae7cd69932cdd1b8fb2850c", + "sha256:41d44ef21a77a32b55ce9bf59b75777063751f688de51098859b7c7f6466589a", + "sha256:43bf728eb7830559f329864ab5da2302c15b2efbac24ad84ccc09949ba753c40", + "sha256:50a7f81f99d238f72185f481b493f9de80096e046935b60ea78e1276f3d76960", + "sha256:51af09ae937ada0e9a10cc16988ec03c649754a91526170b6839b89fc56d6acb", + "sha256:5563b005907613430ef3d4aaac9c78600dd5704e84764cb6deda4b3d72807f09", + "sha256:58ae842300cbfe5e62fb068c83901abe76e4f413234b7bec5446e4275eb1f9cb", + "sha256:59767f476cd1f48531bf378f0300565d879688c82da8369ca8c52f633299523c", + "sha256:5cf78f794c9d7bc64a626ef4f71aff88f57a7ae288e0b359a9c6ea711a41395f", + "sha256:5f57ce4f7e498278fb2a091f39359930144a0f2f90ea8cbf4523c4e25de34028", + "sha256:6f3ad1d973fe8fc8fe64ba38f6a934b74346342fa98ef08ad5da361a05d46044", + "sha256:78b1514067ff4089f4dac930b043a142997a5b98553120919005e97fbaba6546", + "sha256:814d396859c95598f7576d15bc257c3bd3ba61fa4bc1db7dfc18f09070ded7da", + "sha256:8874d5ad6b7f43b18935d9b0183e29727a623a216693d6938d07dfd411ba462f", + "sha256:8b74d0d92a69a7ab5f101f9fe74e44ba017be269efa824337366ccbb4effde85", + "sha256:9391003635aa783957b9b11175d9802d3272ed67e69ef2e3394c0b6d9d24fa9a", + "sha256:a2888a788893c4ef7e562861ec5433875b7915f930a5a7ed3d32c048158f1be5", + "sha256:a7053d4d22dc95c5e0c90aeeae1e4ed5269d2f04001798eec43a654a03008d22", + "sha256:b0cc7d8b7d60da6c313779d85903ce39a63d89d866014b085f720a083d5f3e9a", + "sha256:e40e33a4889382824846b4baa05634e1365b47c6fa40071dc2d06b4d7c715fc1", + "sha256:e60d3bb7166b7cb830b86938d1eb0e6cfe23dfd634cce05c128f8f9967895193", + "sha256:eab14adfc417c2c983fbcb2c73ef3f28ba6990d1fff45d1180bf7e38bda0d98d", + "sha256:ed4ca4351cd2bb0d863ee737a2011ca44d8d8be19b43509bd4507f8a449b376b" + ], + "markers": "python_version >= '3.6'", + "version": "==2.1.5" + }, + "zipp": { + "hashes": [ + "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3", + "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4" + ], + "markers": "python_version >= '3.6'", + "version": "==3.5.0" + } + }, + "develop": {} +} diff --git a/docs/_redirects b/docs/_redirects new file mode 100644 index 00000000000..a38be3bceb7 --- /dev/null +++ b/docs/_redirects @@ -0,0 +1,5 @@ +/publishing-artifacts /configuration/publish +/configuration/linux-other /configuration/linux +/configuration/deb /configuration/linux +/docker /multi-platform-build +/configuration/target /cli \ No newline at end of file diff --git a/docs/api/electron-builder.md b/docs/api/electron-builder.md new file mode 100644 index 00000000000..0965c871778 --- /dev/null +++ b/docs/api/electron-builder.md @@ -0,0 +1,1988 @@ +Developer API only. See [Configuration](../configuration/configuration.md) for user documentation. + + +

Modules

+
+
electron-builder
+
+
app-builder-lib
+
+
electron-publish
+
+
electron-updater
+
+
+

+

electron-builder

+ +

+

electron-builder.Arch : enum

+

Kind: enum of electron-builder
+Properties

+ +

+

electron-builder.build(rawOptions)Promise<Array<String>>

+

Kind: method of electron-builder

+ + + + + + + + + + + + + +
ParamType
rawOptionsCliOptions
+

+

electron-builder.createTargets(platforms, type, arch)Map<Platform | Map<Arch | Array<String>>>

+

Kind: method of electron-builder

+ + + + + + + + + + + + + + + + + + + + + +
ParamType
platformsArray<Platform>
typeString | “undefined”
archString | “undefined”
+

+

app-builder-lib

+ +

+

ArtifactBuildStarted

+

Kind: interface of app-builder-lib
+Properties

+ +

+

ArtifactCreatedmodule:packages/electron-publish/out/publisher.UploadTask

+

Kind: interface of app-builder-lib
+Extends: module:packages/electron-publish/out/publisher.UploadTask
+Properties

+ +

+

BeforeBuildContext

+

Kind: interface of app-builder-lib
+Properties

+ +

+

BuildResult

+

Kind: interface of app-builder-lib
+Properties

+ +

+

CertificateFromStoreInfo

+

Kind: interface of app-builder-lib
+Properties

+ +

+

FileCodeSigningInfo

+

Kind: interface of app-builder-lib
+Properties

+ +

+

Framework

+

Kind: interface of app-builder-lib
+Properties

+ +

Methods

+ +

+

framework.afterPack(context)Promise<any>

+ + + + + + + + + + + + + +
ParamType
contextmodule:app-builder-lib/out/configuration.PackContext
+

+

framework.beforeCopyExtraFiles(options)Promise<any>

+ + + + + + + + + + + + + +
ParamType
optionsmodule:app-builder-lib/out/Framework.BeforeCopyExtraFilesOptions
+

+

framework.createTransformer()null | module:packages/builder-util/out/fs.__type

+

+

framework.getDefaultIcon(platform)null | String

+ + + + + + + + + + + + + +
ParamType
platformPlatform
+

+

framework.getExcludedDependencies(platform)null | Array

+ + + + + + + + + + + + + +
ParamType
platformPlatform
+

+

framework.getMainFile(platform)null | String

+ + + + + + + + + + + + + +
ParamType
platformPlatform
+

+

framework.prepareApplicationStageDirectory(options)Promise<any>

+ + + + + + + + + + + + + +
ParamType
optionsPrepareApplicationStageDirectoryOptions
+

+

SourceRepositoryInfo

+

Kind: interface of app-builder-lib
+Properties

+ +

+

AppInfo

+

Kind: class of app-builder-lib
+Properties

+ +

Methods

+ +

+

appInfo.computePackageUrl()Promise< | String>

+

+

appInfo.getVersionInWeirdWindowsForm(isSetBuildNumber)String

+ + + + + + + + + + + +
Param
isSetBuildNumber
+

+

Packager

+

Kind: class of app-builder-lib
+Properties

+ +

Methods

+ +

+

packager._build(configuration, metadata, devMetadata, repositoryInfo)Promise<BuildResult>

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParamType
configurationConfiguration
metadataMetadata
devMetadataMetadata | “undefined”
repositoryInfoSourceRepositoryInfo
+

+

packager.addAfterPackHandler(handler)

+ + + + + + + + + + + + + +
ParamType
handlercallback
+

+

packager.afterPack(context)Promise<any>

+ + + + + + + + + + + + + +
ParamType
contextmodule:app-builder-lib/out/configuration.PackContext
+

+

packager.artifactCreated(handler)Packager

+ + + + + + + + + + + + + +
ParamType
handlercallback
+

+

packager.build()Promise<BuildResult>

+

+

packager.callAppxManifestCreated(path)Promise<void>

+ + + + + + + + + + + + + +
ParamType
pathString
+

+

packager.callArtifactBuildCompleted(event)Promise<void>

+ + + + + + + + + + + + + +
ParamType
eventArtifactCreated
+

+

packager.callArtifactBuildStarted(event, logFields)Promise<void>

+ + + + + + + + + + + + + + + + + +
ParamType
eventArtifactBuildStarted
logFieldsany
+

+

packager.callMsiProjectCreated(path)Promise<void>

+ + + + + + + + + + + + + +
ParamType
pathString
+

+

packager.dispatchArtifactCreated(event)

+

Only for sub artifacts (update info), for main artifacts use callArtifactBuildCompleted.

+ + + + + + + + + + + + + +
ParamType
eventArtifactCreated
+

+

packager.disposeOnBuildFinish(disposer)

+ + + + + + + + + + + + + +
ParamType
disposercallback
+

+

packager.installAppDependencies(platform, arch)Promise<any>

+ + + + + + + + + + + + + + + + + +
ParamType
platformPlatform
archArch
+

+

packager.getNodeDependencyInfo(platform)Lazy<Array<module:app-builder-lib/out/util/packageDependencies.NodeModuleDirInfo>>

+ + + + + + + + + + + + + +
ParamType
platformPlatform | “undefined”
+

+

Platform

+

Kind: class of app-builder-lib
+Properties

+ +

Methods

+ +

+

platform.createTarget(type, archs)Map<Platform | Map<Arch | Array<String>>>

+ + + + + + + + + + + + + + + + + +
ParamType
typeString | Array<String> | “undefined”
archsArray<Arch>
+

+

platform.current()Platform

+

+

platform.fromString(name)Platform

+ + + + + + + + + + + + + +
ParamType
nameString
+

+

platform.toString()String

+

+

PlatformPackager

+

Kind: class of app-builder-lib
+Properties

+ +

Methods

+ +

+

platformPackager.artifactPatternConfig(targetSpecificOptions, defaultPattern)module:app-builder-lib/out/platformPackager.__object

+ + + + + + + + + + + + + + + + + +
ParamType
targetSpecificOptionsTargetSpecificOptions | “undefined” | undefined
defaultPatternString | undefined
+

+

platformPackager.computeSafeArtifactName(suggestedName, ext, arch, skipDefaultArch, defaultArch, safePattern)null | String

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamType
suggestedNameString | “undefined”
extString
archArch | “undefined”
skipDefaultArch
defaultArchString
safePattern
+

+

platformPackager.createTargets(targets, mapper)

+ + + + + + + + + + + + + + + + + +
ParamType
targetsArray<String>
mappercallback
+

+

platformPackager.getDefaultFrameworkIcon()null | String

+

+

platformPackager.dispatchArtifactCreated(file, target, arch, safeArtifactName)Promise<void>

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParamType
fileString
targetTarget | “undefined”
archArch | “undefined”
safeArtifactNameString | “undefined”
+

+

platformPackager.getElectronDestinationDir(appOutDir)String

+ + + + + + + + + + + + + +
ParamType
appOutDirString
+

+

platformPackager.getElectronSrcDir(dist)String

+ + + + + + + + + + + + + +
ParamType
distString
+

+

platformPackager.expandArtifactBeautyNamePattern(targetSpecificOptions, ext, arch)String

+ + + + + + + + + + + + + + + + + + + + + +
ParamType
targetSpecificOptionsTargetSpecificOptions | “undefined” | undefined
extString
archArch | “undefined”
+

+

platformPackager.expandArtifactNamePattern(targetSpecificOptions, ext, arch, defaultPattern, skipDefaultArch, defaultArch)String

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ParamType
targetSpecificOptionsTargetSpecificOptions | “undefined” | undefined
extString
archArch | “undefined”
defaultPatternString
skipDefaultArch
defaultArchString
+

+

platformPackager.expandMacro(pattern, arch, extra, isProductNameSanitized)String

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParamType
patternString
archString | “undefined”
extraany
isProductNameSanitized
+

+

platformPackager.generateName2(ext, classifier, deployment)String

+ + + + + + + + + + + + + + + + + + + + + +
ParamType
extString | “undefined”
classifierString | “undefined” | undefined
deploymentBoolean
+

+

platformPackager.getIconPath()Promise< | String>

+

+

platformPackager.getMacOsResourcesDir(appOutDir)String

+ + + + + + + + + + + + + +
ParamType
appOutDirString
+

+

platformPackager.pack(outDir, arch, targets, taskManager)Promise<any>

+ + + + + + + + + + + + + + + + + + + + + + + + + +
ParamType
outDirString
archArch
targetsArray<Target>
taskManagerAsyncTaskManager
+

+

platformPackager.resolveIcon(sources, fallbackSources, outputFormat)Promise<Array<module:app-builder-lib/out/platformPackager.IconInfo>>

+ + + + + + + + + + + + + + + + + + + + + +
ParamType
sourcesArray<String>
fallbackSourcesArray<String>
outputFormat“icns” | “ico” | “set”
+

+

platformPackager.getResource(custom, names)Promise< | String>

+ + + + + + + + + + + + + + + + + +
ParamType
customString | “undefined” | undefined
namesArray<String>
+

+

platformPackager.getResourcesDir(appOutDir)String

+ + + + + + + + + + + + + +
ParamType
appOutDirString
+

+

platformPackager.getTempFile(suffix)Promise<String>

+ + + + + + + + + + + + + +
ParamType
suffixString
+

+

PublishManager ⇐ module:packages/electron-publish/out/publisher.PublishContext

+

Kind: class of app-builder-lib
+Extends: module:packages/electron-publish/out/publisher.PublishContext
+Properties

+ +

Methods

+ +

+

publishManager.awaitTasks()Promise<void>

+

+

publishManager.cancelTasks()

+

+

publishManager.getGlobalPublishConfigurations()Promise< | Array>

+

+

Target

+

Kind: class of app-builder-lib
+Properties

+ +

Methods

+ +

+

target.build(appOutDir, arch)Promise<any>

+ + + + + + + + + + + + + + + + + +
ParamType
appOutDirString
archArch
+

+

target.finishBuild()Promise<any>

+

+

app-builder-lib.build(options, packager)Promise<Array<String>>

+

Kind: method of app-builder-lib

+ + + + + + + + + + + + + + + + + +
ParamType
optionsPackagerOptions | module:packages/electron-publish/out/publisher.PublishOptions
packagerPackager
+

+

app-builder-lib.buildForge(forgeOptions, options)Promise<Array<String>>

+

Kind: method of app-builder-lib

+ + + + + + + + + + + + + + + + + +
ParamType
forgeOptionsForgeOptions
optionsPackagerOptions
+

+

electron-publish

+ +

+

PublishContext

+

Kind: interface of electron-publish
+Properties

+ +

+

UploadTask

+

Kind: interface of electron-publish
+Properties

+ +

+

HttpPublisher ⇐ Publisher

+

Kind: class of electron-publish
+Extends: Publisher

+ +

+

httpPublisher.upload(task)Promise<any>

+

Overrides: upload

+ + + + + + + + + + + + + +
ParamType
taskUploadTask
+

+

httpPublisher.toString()String

+

+

ProgressCallback

+

Kind: class of electron-publish
+

+

progressCallback.update(transferred, total)

+ + + + + + + + + + + + + + + + + +
ParamType
transferredNumber
totalNumber
+

+

Publisher

+

Kind: class of electron-publish
+Properties

+ +

Methods

+ +

+

publisher.toString()String

+

+

publisher.upload(task)Promise<any>

+ + + + + + + + + + + + + +
ParamType
taskUploadTask
+

+

electron-publish.getCiTag()null | String

+

Kind: method of electron-publish
+

+

electron-updater

+ +

+

Logger

+

Kind: interface of electron-updater

+ +

+

logger.debug(message)

+ + + + + + + + + + + + + +
ParamType
messageString
+

+

logger.error(message)

+ + + + + + + + + + + + + +
ParamType
messageany
+

+

logger.info(message)

+ + + + + + + + + + + + + +
ParamType
messageany
+

+

logger.warn(message)

+ + + + + + + + + + + + + +
ParamType
messageany
+

+

ResolvedUpdateFileInfo

+

Kind: interface of electron-updater
+Properties

+ +

+

UpdateCheckResult

+

Kind: interface of electron-updater
+Properties

+ +

+

UpdateDownloadedEventmodule:builder-util-runtime.UpdateInfo

+

Kind: interface of electron-updater
+Extends: module:builder-util-runtime.UpdateInfo
+Properties

+ +

+

AppImageUpdater ⇐ module:electron-updater/out/BaseUpdater.BaseUpdater

+

Kind: class of electron-updater
+Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
+

+

appImageUpdater.isUpdaterActive()Boolean

+

+

AppUpdater ⇐ module:events.EventEmitter

+

Kind: class of electron-updater
+Extends: module:events.EventEmitter
+Properties

+ +

Methods

+ +

+

appUpdater.addAuthHeader(token)

+

Shortcut for explicitly adding auth tokens to request headers

+ + + + + + + + + + + + + +
ParamType
tokenString
+

+

appUpdater.checkForUpdates()Promise<UpdateCheckResult>

+

Asks the server whether there is an update.

+

+

appUpdater.checkForUpdatesAndNotify(downloadNotification)Promise< | UpdateCheckResult>

+ + + + + + + + + + + + + +
ParamType
downloadNotificationmodule:electron-updater/out/AppUpdater.DownloadNotification
+

+

appUpdater.downloadUpdate(cancellationToken)Promise<any>

+

Start downloading update manually. You can use this method if autoDownload option is set to false.

+

Returns: Promise<any> - Path to downloaded file.

+ + + + + + + + + + + + + +
ParamType
cancellationTokenCancellationToken
+

+

appUpdater.getFeedURL()undefined | null | String

+

+

appUpdater.setFeedURL(options)

+

Configure update provider. If value is string, GenericServerOptions will be set with value as url.

+ + + + + + + + + + + + + + + +
ParamTypeDescription
optionsPublishConfiguration | String | GithubOptions | S3Options | SpacesOptions | GenericServerOptions | BintrayOptions | module:builder-util-runtime/out/publishOptions.CustomPublishOptions | module:builder-util-runtime/out/publishOptions.KeygenOptions | SnapStoreOptions | StringIf you want to override configuration in the app-update.yml.
+

+

appUpdater.isUpdaterActive()Boolean

+

+

appUpdater.quitAndInstall(isSilent, isForceRunAfter)

+

Restarts the app and installs the update after it has been downloaded. +It should only be called after update-downloaded has been emitted.

+

Note: autoUpdater.quitAndInstall() will close all application windows first and only emit before-quit event on app after that. +This is different from the normal quit event sequence.

+ + + + + + + + + + + + + + + + + + + + +
ParamTypeDescription
isSilentBooleanwindows-only Runs the installer in silent mode. Defaults to false.
isForceRunAfterBooleanRun the app after finish even on silent install. Not applicable for macOS. Ignored if isSilent is set to false.
+

+

MacUpdater ⇐ AppUpdater

+

Kind: class of electron-updater
+Extends: AppUpdater

+ +

+

macUpdater.quitAndInstall()

+

Overrides: quitAndInstall
+

+

macUpdater.addAuthHeader(token)

+

Shortcut for explicitly adding auth tokens to request headers

+ + + + + + + + + + + + + +
ParamType
tokenString
+

+

macUpdater.checkForUpdates()Promise<UpdateCheckResult>

+

Asks the server whether there is an update.

+

+

macUpdater.checkForUpdatesAndNotify(downloadNotification)Promise< | UpdateCheckResult>

+ + + + + + + + + + + + + +
ParamType
downloadNotificationmodule:electron-updater/out/AppUpdater.DownloadNotification
+

+

macUpdater.downloadUpdate(cancellationToken)Promise<any>

+

Start downloading update manually. You can use this method if autoDownload option is set to false.

+

Returns: Promise<any> - Path to downloaded file.

+ + + + + + + + + + + + + +
ParamType
cancellationTokenCancellationToken
+

+

macUpdater.getFeedURL()undefined | null | String

+

+

macUpdater.setFeedURL(options)

+

Configure update provider. If value is string, GenericServerOptions will be set with value as url.

+ + + + + + + + + + + + + + + +
ParamTypeDescription
optionsPublishConfiguration | String | GithubOptions | S3Options | SpacesOptions | GenericServerOptions | BintrayOptions | module:builder-util-runtime/out/publishOptions.CustomPublishOptions | module:builder-util-runtime/out/publishOptions.KeygenOptions | SnapStoreOptions | StringIf you want to override configuration in the app-update.yml.
+

+

macUpdater.isUpdaterActive()Boolean

+

+

NsisUpdater ⇐ module:electron-updater/out/BaseUpdater.BaseUpdater

+

Kind: class of electron-updater
+Extends: module:electron-updater/out/BaseUpdater.BaseUpdater
+

+

Provider

+

Kind: class of electron-updater
+Properties

+ +

Methods

+ +

+

provider.getLatestVersion()Promise<module:electron-updater/out/providers/Provider.T>

+

+

provider.setRequestHeaders(value)

+ + + + + + + + + + + + + +
ParamType
value[key: string]: string | “undefined”
+

+

provider.resolveFiles(updateInfo)Array<ResolvedUpdateFileInfo>

+ + + + + + + + + + + + + +
ParamType
updateInfomodule:electron-updater/out/providers/Provider.T
+

+

UpdaterSignal

+

Kind: class of electron-updater

+ +

+

updaterSignal.login(handler)

+

Emitted when an authenticating proxy is asking for user credentials.

+ + + + + + + + + + + + + +
ParamType
handlermodule:electron-updater.__type
+

+

updaterSignal.progress(handler)

+ + + + + + + + + + + + + +
ParamType
handlercallback
+

+

updaterSignal.updateCancelled(handler)

+ + + + + + + + + + + + + +
ParamType
handlercallback
+

+

updaterSignal.updateDownloaded(handler)

+ + + + + + + + + + + + + +
ParamType
handlercallback
+

+

electron-updater.autoUpdater : AppUpdater

+

Kind: constant of electron-updater
+

+

electron-updater.DOWNLOAD_PROGRESS : “login” | “checking-for-update” | “update-available” | “update-not-available” | “update-cancelled” | “download-progress” | “update-downloaded” | “error”

+

Kind: constant of electron-updater
+

+

electron-updater.UPDATE_DOWNLOADED : “login” | “checking-for-update” | “update-available” | “update-not-available” | “update-cancelled” | “download-progress” | “update-downloaded” | “error”

+

Kind: constant of electron-updater

+ + diff --git a/docs/api/programmaticUsage.md b/docs/api/programmaticUsage.md new file mode 100644 index 00000000000..58a4d5e2322 --- /dev/null +++ b/docs/api/programmaticUsage.md @@ -0,0 +1,130 @@ +``` +"use strict" + +const builder = require("electron-builder") +const Platform = builder.Platform + +// Let's get that intellisense working +/** +* @type {import('electron-builder').Configuration} +* @see https://www.electron.build/configuration/configuration +*/ +const options = { + protocols: { + name: "Deeplink Example", + // Don't forget to set `MimeType: "x-scheme-handler/deeplink"` for `linux.desktop` entry! + schemes: [ + "deeplink" + ] + }, + + // "store” | “normal” | "maximum". - For testing builds, use 'store' to reduce build time significantly. + compression: "normal", + removePackageScripts: true, + + afterSign: async (context) => { + // Mac releases require hardening+notarization: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution + if (!isDebug && context.electronPlatformName === "darwin") { + await notarizeMac(context) + } + }, + artifactBuildStarted: (context) => { + identifyLinuxPackage(context) + }, + afterAllArtifactBuild: (buildResult) => { + return stampArtifacts(buildResult) + }, + // force arch build if using electron-rebuild + beforeBuild: async (context) => { + const { appDir, electronVersion, arch } = context + await electronRebuild.rebuild({ buildPath: appDir, electronVersion, arch }) + return false + }, + nodeGypRebuild: false, + buildDependenciesFromSource: false, + + directories: { + output: "dist/artifacts/local", + buildResources: "installer/resources" + }, + files: [ + "out" + ], + extraFiles: [ + { + from: "build/Release", + to: nodeAddonDir, + filter: "*.node" + } + ], + + win: { + target: 'nsis' + }, + nsis: { + deleteAppDataOnUninstall: true, + include: "installer/win/nsis-installer.nsh" + }, + + mac: { + target: 'dmg', + hardenedRuntime: true, + gatekeeperAssess: true, + extendInfo: { + NSAppleEventsUsageDescription: 'Let me use Apple Events.', + NSCameraUsageDescription: 'Let me use the camera.', + NSScreenCaptureDescription: 'Let me take screenshots.', + } + }, + dmg: { + background: "installer/mac/dmg-background.png", + iconSize: 100, + contents: [ + { + x: 255, + y: 85, + type: "file" + }, + { + x: 253, + y: 325, + type: "link", + path: "/Applications" + } + ], + window: { + width: 500, + height: 500 + } + }, + + linux: { + desktop: { + StartupNotify: "false", + Encoding: "UTF-8", + MimeType: "x-scheme-handler/deeplink" + }, + target: ["AppImage", "rpm", "deb"] + }, + deb: { + priority: "optional", + afterInstall:"installer/linux/after-install.tpl", + }, + rpm: { + fpm: ["--before-install", "installer/linux/before-install.tpl"], + afterInstall:"installer/linux/after-install.tpl", + } +}; + +// Promise is returned +builder.build({ + targets: Platform.MAC.createTarget(), + config: options +}) +.then((result) => { + console.log(JSON.stringify(result)) +}) +.catch((error) => { + console.error(error) +}) +``` \ No newline at end of file diff --git a/docs/auto-update.md b/docs/auto-update.md new file mode 100644 index 00000000000..119440a5276 --- /dev/null +++ b/docs/auto-update.md @@ -0,0 +1,1133 @@ +See [publish configuration](configuration/publish.md) for information on how to configure your local or CI environment for automated deployments. + +!!! info "Code signing is required on macOS" + macOS application must be [signed](code-signing.md) in order for auto updating to work. + +## Auto-updatable Targets + +* macOS: DMG. +* Linux: AppImage. +* Windows: NSIS. + +All these targets are default, custom configuration is not required. (Though it is possible to [pass in additional configuration, e.g. request headers](#custom-options-instantiating-updater-directly).) + +!!! info "Squirrel.Windows is not supported" + Simplified auto-update is supported on Windows if you use the default NSIS target, but is not supported for Squirrel.Windows. + You can [easily migrate to NSIS](https://github.com/electron-userland/electron-builder/issues/837#issuecomment-355698368). + +## Differences between electron-updater and built-in autoUpdater + +* Dedicated release server is not required. +* Code signature validation not only on macOS, but also on Windows. +* All required metadata files and artifacts are produced and published automatically. +* Download progress and [staged rollouts](#staged-rollouts) supported on all platforms. +* Different providers supported out of the box ([GitHub Releases](https://help.github.com/articles/about-releases/), [Amazon S3](https://aws.amazon.com/s3/), [DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces), [Keygen](https://keygen.sh/docs/api/#auto-updates-electron) and generic HTTP(s) server). +* You need only 2 lines of code to make it work. + +## Quick Setup Guide + +1. Install [electron-updater](https://yarn.pm/electron-updater) as an app dependency. + +2. [Configure publish](configuration/publish.md). + +3. Use `autoUpdater` from `electron-updater` instead of `electron`: + + ```js tab="JavaScript" + const { autoUpdater } = require("electron-updater") + ``` + + ```js tab="ES2015" + import { autoUpdater } from "electron-updater" + ``` + +4. Call `autoUpdater.checkForUpdatesAndNotify()`. Or, if you need custom behaviour, implement `electron-updater` events, check examples below. + +!!! note + 1. Do not call [setFeedURL](#appupdatersetfeedurloptions). electron-builder automatically creates `app-update.yml` file for you on build in the `resources` (this file is internal, you don't need to be aware of it). + 2. `zip` target for macOS is **required** for Squirrel.Mac, otherwise `latest-mac.yml` cannot be created, which causes `autoUpdater` error. Default [target](configuration/mac.md#MacOptions-target) for macOS is `dmg`+`zip`, so there is no need to explicitly specify target. + +## Examples + +!!! example "Example in TypeScript using system notifications" + ```typescript + import { autoUpdater } from "electron-updater" + + export default class AppUpdater { + constructor() { + const log = require("electron-log") + log.transports.file.level = "debug" + autoUpdater.logger = log + autoUpdater.checkForUpdatesAndNotify() + } + } + ``` + +* A [complete example](https://github.com/iffy/electron-updater-example) showing how to use. +* An [encapsulated manual update via menu](https://github.com/electron-userland/electron-builder/blob/docs/encapsulated%20manual%20update%20via%20menu.js). + +### Custom Options instantiating updater Directly + +If you want to more control over the updater configuration (e.g. request header for authorization purposes), you can instantiate the updater directly. + +```typescript +import { NsisUpdater } from "electron-updater" +// Or MacUpdater, AppImageUpdater + +export default class AppUpdater { + constructor() { + const options = { + requestHeaders: { + // Any request headers to include here + }, + provider: 'generic', + url: 'https://example.com/auto-updates' + } + + const autoUpdater = new NsisUpdater(options) + autoUpdater.addAuthHeader(`Bearer ${token}`) + autoUpdater.checkForUpdatesAndNotify() + } +} +``` + +## Debugging + +You don't need to listen all events to understand what's wrong. Just set `logger`. +[electron-log](https://github.com/megahertz/electron-log) is recommended (it is an additional dependency that you can install if needed). + +```js +autoUpdater.logger = require("electron-log") +autoUpdater.logger.transports.file.level = "info" +``` + +Note that in order to develop/test UI/UX of updating without packaging the application you need to have a file named `dev-app-update.yml` in the root of your project, which matches your `publish` setting from electron-builder config (but in [yaml](https://www.json2yaml.com) format). But it is not recommended, better to test auto-update for installed application (especially on Windows). [Minio](https://github.com/electron-userland/electron-builder/issues/3053#issuecomment-401001573) is recommended as a local server for testing updates. + +## Compatibility + +Generated metadata files format changes from time to time, but compatibility preserved up to version 1. If you start a new project, recommended to set `electronUpdaterCompatibility` to current latest format version (`>= 2.16`). + +Option `electronUpdaterCompatibility` set the electron-updater compatibility semver range. Can be specified per platform. + +e.g. `>= 2.16`, `>=1.0.0`. Defaults to `>=2.15` + +* `1.0.0` latest-mac.json +* `2.15.0` path +* `2.16.0` files + +## Staged Rollouts + +Staged rollouts allow you to distribute the latest version of your app to a subset of users that you can increase over time, similar to rollouts on platforms like Google Play. + +Staged rollouts are controlled by manually editing your `latest.yml` / `latest-mac.yml` (channel update info file). + +```yml +version: 1.1.0 +path: TestApp Setup 1.1.0.exe +sha512: Dj51I0q8aPQ3ioaz9LMqGYujAYRbDNblAQbodDRXAMxmY6hsHqEl3F6SvhfJj5oPhcqdX1ldsgEvfMNXGUXBIw== +stagingPercentage: 10 +``` + +Update will be shipped to 10% of userbase. + +If you want to pull a staged release because it hasn't gone well, you **must** increment the version number higher than your broken release. +Because some of your users will be on the broken 1.0.1, releasing a new 1.0.1 would result in them staying on a broken version. + +## File Generated and Uploaded in Addition + +`latest.yml` (or `latest-mac.yml` for macOS, or `latest-linux.yml` for Linux) will be generated and uploaded for all providers except `bintray` (because not required, `bintray` doesn't use `latest.yml`). + +## Private GitHub Update Repo + +You can use a private repository for updates with electron-updater by setting the `GH_TOKEN` environment variable (on user machine) and `private` option. +If `GH_TOKEN` is set, electron-updater will use the GitHub API for updates allowing private repositories to work. + + +!!! warning + Private GitHub provider only for [very special](https://github.com/electron-userland/electron-builder/issues/1393#issuecomment-288191885) cases — not intended and not suitable for all users. + +!!! note + The GitHub API currently has a rate limit of 5000 requests per user per hour. An update check uses up to 3 requests per check. + +## Events + +The `autoUpdater` object emits the following events: + +#### Event: `error` + +* `error` Error + +Emitted when there is an error while updating. + +#### Event: `checking-for-update` + +Emitted when checking if an update has started. + +#### Event: `update-available` + +* `info` [UpdateInfo](#UpdateInfo) (for generic and github providers) | [VersionInfo](#VersionInfo) (for Bintray provider) + +Emitted when there is an available update. The update is downloaded automatically if `autoDownload` is `true`. + +#### Event: `update-not-available` + +Emitted when there is no available update. + +* `info` [UpdateInfo](#UpdateInfo) (for generic and github providers) | [VersionInfo](#VersionInfo) (for Bintray provider) + +#### Event: `download-progress` +* `progress` ProgressInfo + * `bytesPerSecond` + * `percent` + * `total` + * `transferred` + +Emitted on progress. + +#### Event: `update-downloaded` + +* `info` [UpdateInfo](#UpdateInfo) — for generic and github providers. [VersionInfo](#VersionInfo) for Bintray provider. + + +## API + +
+
builder-util-runtime
+
+
electron-updater
+
+
+ + +## builder-util-runtime + +* [builder-util-runtime](#module_builder-util-runtime) + * [`.BaseS3Options`](#BaseS3Options) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.BintrayOptions`](#BintrayOptions) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.BlockMap`](#BlockMap) + * [`.BlockMapDataHolder`](#BlockMapDataHolder) + * [`.CustomPublishOptions`](#CustomPublishOptions) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.DownloadOptions`](#DownloadOptions) + * [`.GenericServerOptions`](#GenericServerOptions) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.GithubOptions`](#GithubOptions) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.KeygenOptions`](#KeygenOptions) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.PackageFileInfo`](#PackageFileInfo) ⇐ [BlockMapDataHolder](#BlockMapDataHolder) + * [`.ProgressInfo`](#ProgressInfo) + * [`.PublishConfiguration`](#PublishConfiguration) + * [`.ReleaseNoteInfo`](#ReleaseNoteInfo) + * [`.RequestHeaders`](#RequestHeaders) ⇐ [key: string]: string + * [`.S3Options`](#S3Options) ⇐ [BaseS3Options](electron-builder#BaseS3Options) + * [`.SnapStoreOptions`](#SnapStoreOptions) ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) + * [`.SpacesOptions`](#SpacesOptions) ⇐ [BaseS3Options](electron-builder#BaseS3Options) + * [`.UpdateFileInfo`](#UpdateFileInfo) ⇐ [BlockMapDataHolder](#BlockMapDataHolder) + * [`.UpdateInfo`](#UpdateInfo) + * [`.WindowsUpdateInfo`](#WindowsUpdateInfo) ⇐ [UpdateInfo](#UpdateInfo) + * [.CancellationError](#CancellationError) ⇐ Error + * [.CancellationToken](#CancellationToken) ⇐ module:events.EventEmitter + * [`.cancel()`](#module_builder-util-runtime.CancellationToken+cancel) + * [`.createPromise(callback)`](#module_builder-util-runtime.CancellationToken+createPromise) ⇒ Promise<module:builder-util-runtime/out/CancellationToken.R> + * [`.dispose()`](#module_builder-util-runtime.CancellationToken+dispose) + * [.DigestTransform](#DigestTransform) ⇐ internal:Transform + * [`._flush(callback)`](#module_builder-util-runtime.DigestTransform+_flush) + * [`._transform(chunk, encoding, callback)`](#module_builder-util-runtime.DigestTransform+_transform) + * [`.validate()`](#module_builder-util-runtime.DigestTransform+validate) ⇒ null + * [.HttpError](#HttpError) ⇐ Error + * [`.isServerError()`](#module_builder-util-runtime.HttpError+isServerError) ⇒ Boolean + * [.HttpExecutor](#HttpExecutor) + * [`.addErrorAndTimeoutHandlers(request, reject)`](#module_builder-util-runtime.HttpExecutor+addErrorAndTimeoutHandlers) + * [`.createRequest(options, callback)`](#module_builder-util-runtime.HttpExecutor+createRequest) ⇒ module:builder-util-runtime/out/httpExecutor.T + * [`.doApiRequest(options, cancellationToken, requestProcessor, redirectCount)`](#module_builder-util-runtime.HttpExecutor+doApiRequest) ⇒ Promise<String> + * [`.downloadToBuffer(url, options)`](#module_builder-util-runtime.HttpExecutor+downloadToBuffer) ⇒ Promise<module:global.Buffer> + * [`.prepareRedirectUrlOptions(redirectUrl, options)`](#module_builder-util-runtime.HttpExecutor+prepareRedirectUrlOptions) ⇒ module:http.RequestOptions + * [`.request(options, cancellationToken, data)`](#module_builder-util-runtime.HttpExecutor+request) ⇒ Promise< \| String> + * [`.retryOnServerError(task, maxRetries)`](#module_builder-util-runtime.HttpExecutor+retryOnServerError) ⇒ Promise<any> + * [.ProgressCallbackTransform](#ProgressCallbackTransform) ⇐ internal:Transform + * [`._flush(callback)`](#module_builder-util-runtime.ProgressCallbackTransform+_flush) + * [`._transform(chunk, encoding, callback)`](#module_builder-util-runtime.ProgressCallbackTransform+_transform) + * [.UUID](#UUID) + * [`.check(uuid, offset)`](#module_builder-util-runtime.UUID+check) ⇒ "undefined" \| module:builder-util-runtime/out/uuid.__object \| module:builder-util-runtime/out/uuid.__object + * [`.inspect()`](#module_builder-util-runtime.UUID+inspect) ⇒ String + * [`.parse(input)`](#module_builder-util-runtime.UUID+parse) ⇒ module:global.Buffer + * [`.toString()`](#module_builder-util-runtime.UUID+toString) ⇒ String + * [`.v5(name, namespace)`](#module_builder-util-runtime.UUID+v5) ⇒ any + * [.XElement](#XElement) + * [`.attribute(name)`](#module_builder-util-runtime.XElement+attribute) ⇒ String + * [`.element(name, ignoreCase, errorIfMissed)`](#module_builder-util-runtime.XElement+element) ⇒ [XElement](#XElement) + * [`.elementOrNull(name, ignoreCase)`](#module_builder-util-runtime.XElement+elementOrNull) ⇒ null \| [XElement](#XElement) + * [`.getElements(name, ignoreCase)`](#module_builder-util-runtime.XElement+getElements) ⇒ Array<[XElement](#XElement)> + * [`.elementValueOrEmpty(name, ignoreCase)`](#module_builder-util-runtime.XElement+elementValueOrEmpty) ⇒ String + * [`.removeAttribute(name)`](#module_builder-util-runtime.XElement+removeAttribute) + * [`.asArray(v)`](#module_builder-util-runtime.asArray) ⇒ Array<module:builder-util-runtime.T> + * [`.configureRequestOptions(options, token, method)`](#module_builder-util-runtime.configureRequestOptions) ⇒ module:http.RequestOptions + * [`.configureRequestOptionsFromUrl(url, options)`](#module_builder-util-runtime.configureRequestOptionsFromUrl) ⇒ module:http.RequestOptions + * [`.configureRequestUrl(url, options)`](#module_builder-util-runtime.configureRequestUrl) + * [`.createHttpError(response, description)`](#module_builder-util-runtime.createHttpError) ⇒ [HttpError](#HttpError) + * [`.getS3LikeProviderBaseUrl(configuration)`](#module_builder-util-runtime.getS3LikeProviderBaseUrl) ⇒ String + * [`.newError(message, code)`](#module_builder-util-runtime.newError) ⇒ Error + * [`.parseDn(seq)`](#module_builder-util-runtime.parseDn) ⇒ Map<String \| String> + * [`.parseJson(result)`](#module_builder-util-runtime.parseJson) ⇒ Promise<any> + * [`.parseXml(data)`](#module_builder-util-runtime.parseXml) ⇒ [XElement](#XElement) + * [`.safeGetHeader(response, headerKey)`](#module_builder-util-runtime.safeGetHeader) ⇒ any + * [`.safeStringifyJson(data, skippedNames)`](#module_builder-util-runtime.safeStringifyJson) ⇒ String + + +### `BaseS3Options` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* channel = `latest` String | "undefined" - The update channel. +* path = `/` String | "undefined" - The directory path. +* acl = `public-read` "private" | "public-read" | "undefined" - The ACL. Set to `null` to not [add](https://github.com/electron-userland/electron-builder/issues/1822). +* **provider** "github" | "bintray" | "s3" | "spaces" | "generic" | "custom" | "snapStore" | "keygen" - The provider. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `BintrayOptions` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +[Bintray](https://bintray.com/) options. Requires an API key. An API key can be obtained from the user [profile](https://bintray.com/profile/edit) page ("Edit Your Profile" -> API Key). +Define `BT_TOKEN` environment variable. + +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* **provider** "bintray" - The provider. Must be `bintray`. +* package String | "undefined" - The Bintray package name. +* repo = `generic` String | "undefined" - The Bintray repository name. +* owner String | "undefined" - The owner. +* component String | "undefined" - The Bintray component (Debian only). +* distribution = `stable` String | "undefined" - The Bintray distribution (Debian only). +* user String | "undefined" - The Bintray user account. Used in cases where the owner is an organization. +* token String | "undefined" +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `BlockMap` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* **version** "1" | "2" +* **files** Array<module:builder-util-runtime/out/blockMapApi.BlockMapFile> + + +### `BlockMapDataHolder` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* size Number - The file size. Used to verify downloaded size (save one HTTP request to get length). Also used when block map data is embedded into the file (appimage, windows web installer package). +* blockMapSize Number - The block map file size. Used when block map data is embedded into the file (appimage, windows web installer package). This information can be obtained from the file itself, but it requires additional HTTP request, so, to reduce request count, block map size is specified in the update metadata too. +* **sha512** String - The file checksum. +* isAdminRightsRequired Boolean + + +### `CustomPublishOptions` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* **provider** "custom" - The provider. Must be `custom`. +* updateProvider module:builder-util-runtime/out/publishOptions.__type - The Provider to provide UpdateInfo regarding available updates. Required to use custom providers with electron-updater. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `DownloadOptions` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* headers [key: string]: string | "undefined" +* sha2 String | "undefined" +* sha512 String | "undefined" +* **cancellationToken** [CancellationToken](#CancellationToken) +* onProgress callback + + +### `GenericServerOptions` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +Generic (any HTTP(S) server) options. +In all publish options [File Macros](/file-patterns#file-macros) are supported. + +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* **provider** "generic" - The provider. Must be `generic`. +* **url** String - The base url. e.g. `https://bucket_name.s3.amazonaws.com`. +* channel = `latest` String | "undefined" - The channel. +* useMultipleRangeRequest Boolean - Whether to use multiple range requests for differential update. Defaults to `true` if `url` doesn't contain `s3.amazonaws.com`. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `GithubOptions` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +[GitHub](https://help.github.com/articles/about-releases/) options. + +GitHub [personal access token](https://help.github.com/articles/creating-an-access-token-for-command-line-use/) is required. You can generate by going to [https://github.com/settings/tokens/new](https://github.com/settings/tokens/new). The access token should have the repo scope/permission. +Define `GH_TOKEN` environment variable. + +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* **provider** "github" - The provider. Must be `github`. +* repo String | "undefined" - The repository name. [Detected automatically](#github-repository-and-bintray-package). +* owner String | "undefined" - The owner. +* vPrefixedTagName = `true` Boolean - Whether to use `v`-prefixed tag name. +* host = `github.com` String | "undefined" - The host (including the port if need). +* protocol = `https` "https" | "http" | "undefined" - The protocol. GitHub Publisher supports only `https`. +* token String | "undefined" - The access token to support auto-update from private github repositories. Never specify it in the configuration files. Only for [setFeedURL](/auto-update#appupdatersetfeedurloptions). +* private Boolean | "undefined" - Whether to use private github auto-update provider if `GH_TOKEN` environment variable is defined. See [Private GitHub Update Repo](/auto-update#private-github-update-repo). +* releaseType = `draft` "draft" | "prerelease" | "release" | "undefined" - The type of release. By default `draft` release will be created. + + Also you can set release type using environment variable. If `EP_DRAFT`is set to `true` — `draft`, if `EP_PRE_RELEASE`is set to `true` — `prerelease`. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `KeygenOptions` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +Keygen options. +https://keygen.sh/ +Define `KEYGEN_TOKEN` environment variable. + +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* **provider** "keygen" - The provider. Must be `keygen`. +* **account** String - Keygen account's UUID +* **product** String - Keygen product's UUID +* channel = `stable` "stable" | "rc" | "beta" | "alpha" | "dev" | "undefined" - The channel. +* platform String | "undefined" - The target Platform. Is set programmatically explicitly during publishing. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `PackageFileInfo` ⇐ [BlockMapDataHolder](#BlockMapDataHolder) +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [BlockMapDataHolder](#BlockMapDataHolder) +**Properties** +* **path** String + + +### `ProgressInfo` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* **total** Number +* **delta** Number +* **transferred** Number +* **percent** Number +* **bytesPerSecond** Number + + +### `PublishConfiguration` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* **provider** "github" | "bintray" | "s3" | "spaces" | "generic" | "custom" | "snapStore" | "keygen" - The provider. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `ReleaseNoteInfo` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* **version** String - The version. +* **note** String | "undefined" - The note. + + +### `RequestHeaders` ⇐ [key: string]: string +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [key: string]: string + +### `S3Options` ⇐ [BaseS3Options](electron-builder#BaseS3Options) +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [BaseS3Options](electron-builder#BaseS3Options) +**Properties** +* **provider** "s3" - The provider. Must be `s3`. +* **bucket** String - The bucket name. +* region String | "undefined" - The region. Is determined and set automatically when publishing. +* acl = `public-read` "private" | "public-read" | "undefined" - The ACL. Set to `null` to not [add](https://github.com/electron-userland/electron-builder/issues/1822). + + Please see [required permissions for the S3 provider](https://github.com/electron-userland/electron-builder/issues/1618#issuecomment-314679128). +* storageClass = `STANDARD` "STANDARD" | "REDUCED_REDUNDANCY" | "STANDARD_IA" | "undefined" - The type of storage to use for the object. +* encryption "AES256" | "aws:kms" | "undefined" - Server-side encryption algorithm to use for the object. +* endpoint String | "undefined" - The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like `https://{service}.{region}.amazonaws.com`. + + +### `SnapStoreOptions` ⇐ [PublishConfiguration](electron-builder#PublishConfiguration) +[Snap Store](https://snapcraft.io/) options. + +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [PublishConfiguration](electron-builder#PublishConfiguration) +**Properties** +* **provider** "snapStore" - The provider. Must be `snapStore`. +* **repo** String - snapcraft repo name +* channels = `["edge"]` String | Array<String> | "undefined" - The list of channels the snap would be released. +* publishAutoUpdate = `true` Boolean - Whether to publish auto update info files. + + Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded. +* requestHeaders [key: string]: string - Any custom request headers + + +### `SpacesOptions` ⇐ [BaseS3Options](electron-builder#BaseS3Options) +[DigitalOcean Spaces](https://www.digitalocean.com/community/tutorials/an-introduction-to-digitalocean-spaces) options. +Access key is required, define `DO_KEY_ID` and `DO_SECRET_KEY` environment variables. + +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [BaseS3Options](electron-builder#BaseS3Options) +**Properties** +* **provider** "spaces" - The provider. Must be `spaces`. +* **name** String - The space name. +* **region** String - The region (e.g. `nyc3`). + + +### `UpdateFileInfo` ⇐ [BlockMapDataHolder](#BlockMapDataHolder) +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [BlockMapDataHolder](#BlockMapDataHolder) +**Properties** +* **url** String + + +### `UpdateInfo` +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* **version** String - The version. +* **files** Array<[UpdateFileInfo](#UpdateFileInfo)> +* **path** String - Deprecated: {tag.description} +* **sha512** String - Deprecated: {tag.description} +* releaseName String | "undefined" - The release name. +* releaseNotes String | Array<[ReleaseNoteInfo](#ReleaseNoteInfo)> | "undefined" - The release notes. List if `updater.fullChangelog` is set to `true`, `string` otherwise. +* **releaseDate** String - The release date. +* stagingPercentage Number - The [staged rollout](/auto-update#staged-rollouts) percentage, 0-100. + + +### `WindowsUpdateInfo` ⇐ [UpdateInfo](#UpdateInfo) +**Kind**: interface of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: [UpdateInfo](#UpdateInfo) +**Properties** +* packages Object<String, any> | "undefined" + + +### CancellationError ⇐ Error +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: Error + +### CancellationToken ⇐ module:events.EventEmitter +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: module:events.EventEmitter +**Properties** +* **cancelled** Boolean + +**Methods** +* [.CancellationToken](#CancellationToken) ⇐ module:events.EventEmitter + * [`.cancel()`](#module_builder-util-runtime.CancellationToken+cancel) + * [`.createPromise(callback)`](#module_builder-util-runtime.CancellationToken+createPromise) ⇒ Promise<module:builder-util-runtime/out/CancellationToken.R> + * [`.dispose()`](#module_builder-util-runtime.CancellationToken+dispose) + + +#### `cancellationToken.cancel()` + +#### `cancellationToken.createPromise(callback)` ⇒ Promise<module:builder-util-runtime/out/CancellationToken.R> + +- callback callback + + +#### `cancellationToken.dispose()` + +### DigestTransform ⇐ internal:Transform +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: internal:Transform +**Properties** +* actual String +* isValidateOnEnd = `true` Boolean + +**Methods** +* [.DigestTransform](#DigestTransform) ⇐ internal:Transform + * [`._flush(callback)`](#module_builder-util-runtime.DigestTransform+_flush) + * [`._transform(chunk, encoding, callback)`](#module_builder-util-runtime.DigestTransform+_transform) + * [`.validate()`](#module_builder-util-runtime.DigestTransform+validate) ⇒ null + + +#### `digestTransform._flush(callback)` + +- callback any + + +#### `digestTransform._transform(chunk, encoding, callback)` + +- chunk module:global.Buffer +- encoding String +- callback any + + +#### `digestTransform.validate()` ⇒ null + +### HttpError ⇐ Error +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: Error + +#### `httpError.isServerError()` ⇒ Boolean + +### HttpExecutor +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+ +* [.HttpExecutor](#HttpExecutor) + * [`.addErrorAndTimeoutHandlers(request, reject)`](#module_builder-util-runtime.HttpExecutor+addErrorAndTimeoutHandlers) + * [`.createRequest(options, callback)`](#module_builder-util-runtime.HttpExecutor+createRequest) ⇒ module:builder-util-runtime/out/httpExecutor.T + * [`.doApiRequest(options, cancellationToken, requestProcessor, redirectCount)`](#module_builder-util-runtime.HttpExecutor+doApiRequest) ⇒ Promise<String> + * [`.downloadToBuffer(url, options)`](#module_builder-util-runtime.HttpExecutor+downloadToBuffer) ⇒ Promise<module:global.Buffer> + * [`.prepareRedirectUrlOptions(redirectUrl, options)`](#module_builder-util-runtime.HttpExecutor+prepareRedirectUrlOptions) ⇒ module:http.RequestOptions + * [`.request(options, cancellationToken, data)`](#module_builder-util-runtime.HttpExecutor+request) ⇒ Promise< \| String> + * [`.retryOnServerError(task, maxRetries)`](#module_builder-util-runtime.HttpExecutor+retryOnServerError) ⇒ Promise<any> + + +#### `httpExecutor.addErrorAndTimeoutHandlers(request, reject)` + +- request any +- reject callback + + +#### `httpExecutor.createRequest(options, callback)` ⇒ module:builder-util-runtime/out/httpExecutor.T + +- options any +- callback callback + + +#### `httpExecutor.doApiRequest(options, cancellationToken, requestProcessor, redirectCount)` ⇒ Promise<String> + +- options module:http.RequestOptions +- cancellationToken [CancellationToken](#CancellationToken) +- requestProcessor callback +- redirectCount + + +#### `httpExecutor.downloadToBuffer(url, options)` ⇒ Promise<module:global.Buffer> + +- url module:url.URL +- options [DownloadOptions](electron-builder#DownloadOptions) + + +#### `httpExecutor.prepareRedirectUrlOptions(redirectUrl, options)` ⇒ module:http.RequestOptions + +- redirectUrl String +- options module:http.RequestOptions + + +#### `httpExecutor.request(options, cancellationToken, data)` ⇒ Promise< \| String> + +- options module:http.RequestOptions +- cancellationToken [CancellationToken](#CancellationToken) +- data Object<String, any> | "undefined" + + +#### `httpExecutor.retryOnServerError(task, maxRetries)` ⇒ Promise<any> + +- task callback +- maxRetries + + +### ProgressCallbackTransform ⇐ internal:Transform +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Extends**: internal:Transform + +* [.ProgressCallbackTransform](#ProgressCallbackTransform) ⇐ internal:Transform + * [`._flush(callback)`](#module_builder-util-runtime.ProgressCallbackTransform+_flush) + * [`._transform(chunk, encoding, callback)`](#module_builder-util-runtime.ProgressCallbackTransform+_transform) + + +#### `progressCallbackTransform._flush(callback)` + +- callback any + + +#### `progressCallbackTransform._transform(chunk, encoding, callback)` + +- chunk any +- encoding String +- callback any + + +### UUID +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* OID = `UUID.parse("6ba7b812-9dad-11d1-80b4-00c04fd430c8")` module:global.Buffer + +**Methods** +* [.UUID](#UUID) + * [`.check(uuid, offset)`](#module_builder-util-runtime.UUID+check) ⇒ "undefined" \| module:builder-util-runtime/out/uuid.__object \| module:builder-util-runtime/out/uuid.__object + * [`.inspect()`](#module_builder-util-runtime.UUID+inspect) ⇒ String + * [`.parse(input)`](#module_builder-util-runtime.UUID+parse) ⇒ module:global.Buffer + * [`.toString()`](#module_builder-util-runtime.UUID+toString) ⇒ String + * [`.v5(name, namespace)`](#module_builder-util-runtime.UUID+v5) ⇒ any + + +#### `uuiD.check(uuid, offset)` ⇒ "undefined" \| module:builder-util-runtime/out/uuid.__object \| module:builder-util-runtime/out/uuid.__object + +- uuid module:global.Buffer | String +- offset + + +#### `uuiD.inspect()` ⇒ String + +#### `uuiD.parse(input)` ⇒ module:global.Buffer + +- input String + + +#### `uuiD.toString()` ⇒ String + +#### `uuiD.v5(name, namespace)` ⇒ any + +- name String | module:global.Buffer +- namespace module:global.Buffer + + +### XElement +**Kind**: class of [builder-util-runtime](#module_builder-util-runtime)
+**Properties** +* value= String +* **attributes** Object<String, any> | "undefined" +* isCData = `false` Boolean +* **elements** Array<[XElement](#XElement)> | "undefined" + +**Methods** +* [.XElement](#XElement) + * [`.attribute(name)`](#module_builder-util-runtime.XElement+attribute) ⇒ String + * [`.element(name, ignoreCase, errorIfMissed)`](#module_builder-util-runtime.XElement+element) ⇒ [XElement](#XElement) + * [`.elementOrNull(name, ignoreCase)`](#module_builder-util-runtime.XElement+elementOrNull) ⇒ null \| [XElement](#XElement) + * [`.getElements(name, ignoreCase)`](#module_builder-util-runtime.XElement+getElements) ⇒ Array<[XElement](#XElement)> + * [`.elementValueOrEmpty(name, ignoreCase)`](#module_builder-util-runtime.XElement+elementValueOrEmpty) ⇒ String + * [`.removeAttribute(name)`](#module_builder-util-runtime.XElement+removeAttribute) + + +#### `xElement.attribute(name)` ⇒ String + +- name String + + +#### `xElement.element(name, ignoreCase, errorIfMissed)` ⇒ [XElement](#XElement) + +- name String +- ignoreCase +- errorIfMissed String | "undefined" + + +#### `xElement.elementOrNull(name, ignoreCase)` ⇒ null \| [XElement](#XElement) + +- name String +- ignoreCase + + +#### `xElement.getElements(name, ignoreCase)` ⇒ Array<[XElement](#XElement)> + +- name String +- ignoreCase + + +#### `xElement.elementValueOrEmpty(name, ignoreCase)` ⇒ String + +- name String +- ignoreCase + + +#### `xElement.removeAttribute(name)` + +- name String + + +### `builder-util-runtime.asArray(v)` ⇒ Array<module:builder-util-runtime.T> +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- v "undefined" | undefined | module:builder-util-runtime.T | Array<module:builder-util-runtime.T> + + +### `builder-util-runtime.configureRequestOptions(options, token, method)` ⇒ module:http.RequestOptions +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- options module:http.RequestOptions +- token String | "undefined" +- method "GET" | "DELETE" | "PUT" + + +### `builder-util-runtime.configureRequestOptionsFromUrl(url, options)` ⇒ module:http.RequestOptions +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- url String +- options module:http.RequestOptions + + +### `builder-util-runtime.configureRequestUrl(url, options)` +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- url module:url.URL +- options module:http.RequestOptions + + +### `builder-util-runtime.createHttpError(response, description)` ⇒ [HttpError](#HttpError) +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- response module:http.IncomingMessage +- description any | "undefined" + + +### `builder-util-runtime.getS3LikeProviderBaseUrl(configuration)` ⇒ String +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- configuration [PublishConfiguration](electron-builder#PublishConfiguration) + + +### `builder-util-runtime.newError(message, code)` ⇒ Error +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- message String +- code String + + +### `builder-util-runtime.parseDn(seq)` ⇒ Map<String \| String> +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- seq String + + +### `builder-util-runtime.parseJson(result)` ⇒ Promise<any> +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- result Promise< | String> + + +### `builder-util-runtime.parseXml(data)` ⇒ [XElement](#XElement) +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- data String + + +### `builder-util-runtime.safeGetHeader(response, headerKey)` ⇒ any +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- response any +- headerKey String + + +### `builder-util-runtime.safeStringifyJson(data, skippedNames)` ⇒ String +**Kind**: method of [builder-util-runtime](#module_builder-util-runtime)
+ +- data any +- skippedNames Set<String> + + +## electron-updater + +* [electron-updater](#module_electron-updater) + * [`.Logger`](#Logger) + * [`.debug(message)`](#module_electron-updater.Logger+debug) + * [`.error(message)`](#module_electron-updater.Logger+error) + * [`.info(message)`](#module_electron-updater.Logger+info) + * [`.warn(message)`](#module_electron-updater.Logger+warn) + * [`.ResolvedUpdateFileInfo`](#ResolvedUpdateFileInfo) + * [`.UpdateCheckResult`](#UpdateCheckResult) + * [`.UpdateDownloadedEvent`](#UpdateDownloadedEvent) ⇐ module:builder-util-runtime.UpdateInfo + * [.AppImageUpdater](#AppImageUpdater) ⇐ module:electron-updater/out/BaseUpdater.BaseUpdater + * [`.isUpdaterActive()`](#module_electron-updater.AppImageUpdater+isUpdaterActive) ⇒ Boolean + * [.AppUpdater](#AppUpdater) ⇐ module:events.EventEmitter + * [`.addAuthHeader(token)`](#module_electron-updater.AppUpdater+addAuthHeader) + * [`.checkForUpdates()`](#module_electron-updater.AppUpdater+checkForUpdates) ⇒ Promise<[UpdateCheckResult](#UpdateCheckResult)> + * [`.checkForUpdatesAndNotify(downloadNotification)`](#module_electron-updater.AppUpdater+checkForUpdatesAndNotify) ⇒ Promise< \| [UpdateCheckResult](#UpdateCheckResult)> + * [`.downloadUpdate(cancellationToken)`](#module_electron-updater.AppUpdater+downloadUpdate) ⇒ Promise<any> + * [`.getFeedURL()`](#module_electron-updater.AppUpdater+getFeedURL) ⇒ undefined \| null \| String + * [`.setFeedURL(options)`](#module_electron-updater.AppUpdater+setFeedURL) + * [`.isUpdaterActive()`](#module_electron-updater.AppUpdater+isUpdaterActive) ⇒ Boolean + * [`.quitAndInstall(isSilent, isForceRunAfter)`](#module_electron-updater.AppUpdater+quitAndInstall) + * [.MacUpdater](#MacUpdater) ⇐ [AppUpdater](#AppUpdater) + * [`.quitAndInstall()`](#module_electron-updater.MacUpdater+quitAndInstall) + * [`.addAuthHeader(token)`](#module_electron-updater.AppUpdater+addAuthHeader) + * [`.checkForUpdates()`](#module_electron-updater.AppUpdater+checkForUpdates) ⇒ Promise<[UpdateCheckResult](#UpdateCheckResult)> + * [`.checkForUpdatesAndNotify(downloadNotification)`](#module_electron-updater.AppUpdater+checkForUpdatesAndNotify) ⇒ Promise< \| [UpdateCheckResult](#UpdateCheckResult)> + * [`.downloadUpdate(cancellationToken)`](#module_electron-updater.AppUpdater+downloadUpdate) ⇒ Promise<any> + * [`.getFeedURL()`](#module_electron-updater.AppUpdater+getFeedURL) ⇒ undefined \| null \| String + * [`.setFeedURL(options)`](#module_electron-updater.AppUpdater+setFeedURL) + * [`.isUpdaterActive()`](#module_electron-updater.AppUpdater+isUpdaterActive) ⇒ Boolean + * [.NsisUpdater](#NsisUpdater) ⇐ module:electron-updater/out/BaseUpdater.BaseUpdater + * [.Provider](#Provider) + * [`.getLatestVersion()`](#module_electron-updater.Provider+getLatestVersion) ⇒ Promise<module:electron-updater/out/providers/Provider.T> + * [`.setRequestHeaders(value)`](#module_electron-updater.Provider+setRequestHeaders) + * [`.resolveFiles(updateInfo)`](#module_electron-updater.Provider+resolveFiles) ⇒ Array<[ResolvedUpdateFileInfo](#ResolvedUpdateFileInfo)> + * [.UpdaterSignal](#UpdaterSignal) + * [`.login(handler)`](#module_electron-updater.UpdaterSignal+login) + * [`.progress(handler)`](#module_electron-updater.UpdaterSignal+progress) + * [`.updateCancelled(handler)`](#module_electron-updater.UpdaterSignal+updateCancelled) + * [`.updateDownloaded(handler)`](#module_electron-updater.UpdaterSignal+updateDownloaded) + * [`.autoUpdater`](#module_electron-updater.autoUpdater) : [AppUpdater](#AppUpdater) + * [`.DOWNLOAD_PROGRESS`](#module_electron-updater.DOWNLOAD_PROGRESS) : "login" \| "checking-for-update" \| "update-available" \| "update-not-available" \| "update-cancelled" \| "download-progress" \| "update-downloaded" \| "error" + * [`.UPDATE_DOWNLOADED`](#module_electron-updater.UPDATE_DOWNLOADED) : "login" \| "checking-for-update" \| "update-available" \| "update-not-available" \| "update-cancelled" \| "download-progress" \| "update-downloaded" \| "error" + + +### `Logger` +**Kind**: interface of [electron-updater](#module_electron-updater)
+ +* [`.Logger`](#Logger) + * [`.debug(message)`](#module_electron-updater.Logger+debug) + * [`.error(message)`](#module_electron-updater.Logger+error) + * [`.info(message)`](#module_electron-updater.Logger+info) + * [`.warn(message)`](#module_electron-updater.Logger+warn) + + +#### `logger.debug(message)` + +- message String + + +#### `logger.error(message)` + +- message any + + +#### `logger.info(message)` + +- message any + + +#### `logger.warn(message)` + +- message any + + +### `ResolvedUpdateFileInfo` +**Kind**: interface of [electron-updater](#module_electron-updater)
+**Properties** +* **url** module:url.URL +* **info** module:builder-util-runtime.UpdateFileInfo +* packageInfo module:builder-util-runtime.PackageFileInfo + + +### `UpdateCheckResult` +**Kind**: interface of [electron-updater](#module_electron-updater)
+**Properties** +* **updateInfo** module:builder-util-runtime.UpdateInfo +* downloadPromise Promise<Array<String>> | "undefined" +* cancellationToken CancellationToken +* **versionInfo** module:builder-util-runtime.UpdateInfo - Deprecated: {tag.description} + + +### `UpdateDownloadedEvent` ⇐ module:builder-util-runtime.UpdateInfo +**Kind**: interface of [electron-updater](#module_electron-updater)
+**Extends**: module:builder-util-runtime.UpdateInfo +**Properties** +* **downloadedFile** String + + +### AppImageUpdater ⇐ module:electron-updater/out/BaseUpdater.BaseUpdater +**Kind**: class of [electron-updater](#module_electron-updater)
+**Extends**: module:electron-updater/out/BaseUpdater.BaseUpdater + +#### `appImageUpdater.isUpdaterActive()` ⇒ Boolean + +### AppUpdater ⇐ module:events.EventEmitter +**Kind**: class of [electron-updater](#module_electron-updater)
+**Extends**: module:events.EventEmitter +**Properties** +* autoDownload = `true` Boolean - Whether to automatically download an update when it is found. +* autoInstallOnAppQuit = `true` Boolean - Whether to automatically install a downloaded update on app quit (if `quitAndInstall` was not called before). +* allowPrerelease = `false` Boolean - *GitHub provider only.* Whether to allow update to pre-release versions. Defaults to `true` if application version contains prerelease components (e.g. `0.12.1-alpha.1`, here `alpha` is a prerelease component), otherwise `false`. + + If `true`, downgrade will be allowed (`allowDowngrade` will be set to `true`). +* fullChangelog = `false` Boolean - *GitHub provider only.* Get all release notes (from current version to latest), not just the latest. +* allowDowngrade = `false` Boolean - Whether to allow version downgrade (when a user from the beta channel wants to go back to the stable channel). + + Taken in account only if channel differs (pre-release version component in terms of semantic versioning). +* currentVersion SemVer - The current application version. +* **channel** String | "undefined" - Get the update channel. Not applicable for GitHub. Doesn't return `channel` from the update configuration, only if was previously set. +* **requestHeaders** [key: string]: string | "undefined" - The request headers. +* **netSession** Electron:Session +* **logger** [Logger](#Logger) | "undefined" - The logger. You can pass [electron-log](https://github.com/megahertz/electron-log), [winston](https://github.com/winstonjs/winston) or another logger with the following interface: `{ info(), warn(), error() }`. Set it to `null` if you would like to disable a logging feature. +* signals = `new UpdaterSignal(this)` [UpdaterSignal](#UpdaterSignal) +* configOnDisk = `new Lazy(() => this.loadUpdateConfig())` Lazy<any> +* httpExecutor module:electron-updater/out/electronHttpExecutor.ElectronHttpExecutor +* **isAddNoCacheQuery** Boolean + +**Methods** +* [.AppUpdater](#AppUpdater) ⇐ module:events.EventEmitter + * [`.addAuthHeader(token)`](#module_electron-updater.AppUpdater+addAuthHeader) + * [`.checkForUpdates()`](#module_electron-updater.AppUpdater+checkForUpdates) ⇒ Promise<[UpdateCheckResult](#UpdateCheckResult)> + * [`.checkForUpdatesAndNotify(downloadNotification)`](#module_electron-updater.AppUpdater+checkForUpdatesAndNotify) ⇒ Promise< \| [UpdateCheckResult](#UpdateCheckResult)> + * [`.downloadUpdate(cancellationToken)`](#module_electron-updater.AppUpdater+downloadUpdate) ⇒ Promise<any> + * [`.getFeedURL()`](#module_electron-updater.AppUpdater+getFeedURL) ⇒ undefined \| null \| String + * [`.setFeedURL(options)`](#module_electron-updater.AppUpdater+setFeedURL) + * [`.isUpdaterActive()`](#module_electron-updater.AppUpdater+isUpdaterActive) ⇒ Boolean + * [`.quitAndInstall(isSilent, isForceRunAfter)`](#module_electron-updater.AppUpdater+quitAndInstall) + + +#### `appUpdater.addAuthHeader(token)` +Shortcut for explicitly adding auth tokens to request headers + + +- token String + + +#### `appUpdater.checkForUpdates()` ⇒ Promise<[UpdateCheckResult](#UpdateCheckResult)> +Asks the server whether there is an update. + + +#### `appUpdater.checkForUpdatesAndNotify(downloadNotification)` ⇒ Promise< \| [UpdateCheckResult](#UpdateCheckResult)> + +- downloadNotification module:electron-updater/out/AppUpdater.DownloadNotification + + +#### `appUpdater.downloadUpdate(cancellationToken)` ⇒ Promise<any> +Start downloading update manually. You can use this method if `autoDownload` option is set to `false`. + +**Returns**: Promise<any> - Path to downloaded file. + +- cancellationToken CancellationToken + + +#### `appUpdater.getFeedURL()` ⇒ undefined \| null \| String + +#### `appUpdater.setFeedURL(options)` +Configure update provider. If value is `string`, [GenericServerOptions](/configuration/publish#genericserveroptions) will be set with value as `url`. + + +- options [PublishConfiguration](/configuration/publish#publishconfiguration) | String | [GithubOptions](/configuration/publish#githuboptions) | [S3Options](/configuration/publish#s3options) | [SpacesOptions](/configuration/publish#spacesoptions) | [GenericServerOptions](/configuration/publish#genericserveroptions) | [BintrayOptions](/configuration/publish#bintrayoptions) | module:builder-util-runtime/out/publishOptions.CustomPublishOptions | module:builder-util-runtime/out/publishOptions.KeygenOptions | [SnapStoreOptions](/configuration/publish#snapstoreoptions) | String - If you want to override configuration in the `app-update.yml`. + + +#### `appUpdater.isUpdaterActive()` ⇒ Boolean + +#### `appUpdater.quitAndInstall(isSilent, isForceRunAfter)` +Restarts the app and installs the update after it has been downloaded. +It should only be called after `update-downloaded` has been emitted. + +**Note:** `autoUpdater.quitAndInstall()` will close all application windows first and only emit `before-quit` event on `app` after that. +This is different from the normal quit event sequence. + + +- isSilent Boolean - *windows-only* Runs the installer in silent mode. Defaults to `false`. +- isForceRunAfter Boolean - Run the app after finish even on silent install. Not applicable for macOS. Ignored if `isSilent` is set to `false`. + + +### MacUpdater ⇐ [AppUpdater](#AppUpdater) +**Kind**: class of [electron-updater](#module_electron-updater)
+**Extends**: [AppUpdater](#AppUpdater) + +* [.MacUpdater](#MacUpdater) ⇐ [AppUpdater](#AppUpdater) + * [`.quitAndInstall()`](#module_electron-updater.MacUpdater+quitAndInstall) + * [`.addAuthHeader(token)`](#module_electron-updater.AppUpdater+addAuthHeader) + * [`.checkForUpdates()`](#module_electron-updater.AppUpdater+checkForUpdates) ⇒ Promise<[UpdateCheckResult](#UpdateCheckResult)> + * [`.checkForUpdatesAndNotify(downloadNotification)`](#module_electron-updater.AppUpdater+checkForUpdatesAndNotify) ⇒ Promise< \| [UpdateCheckResult](#UpdateCheckResult)> + * [`.downloadUpdate(cancellationToken)`](#module_electron-updater.AppUpdater+downloadUpdate) ⇒ Promise<any> + * [`.getFeedURL()`](#module_electron-updater.AppUpdater+getFeedURL) ⇒ undefined \| null \| String + * [`.setFeedURL(options)`](#module_electron-updater.AppUpdater+setFeedURL) + * [`.isUpdaterActive()`](#module_electron-updater.AppUpdater+isUpdaterActive) ⇒ Boolean + + +#### `macUpdater.quitAndInstall()` +**Overrides**: [quitAndInstall](#module_electron-updater.AppUpdater+quitAndInstall) + +#### `macUpdater.addAuthHeader(token)` +Shortcut for explicitly adding auth tokens to request headers + + +- token String + + +#### `macUpdater.checkForUpdates()` ⇒ Promise<[UpdateCheckResult](#UpdateCheckResult)> +Asks the server whether there is an update. + + +#### `macUpdater.checkForUpdatesAndNotify(downloadNotification)` ⇒ Promise< \| [UpdateCheckResult](#UpdateCheckResult)> + +- downloadNotification module:electron-updater/out/AppUpdater.DownloadNotification + + +#### `macUpdater.downloadUpdate(cancellationToken)` ⇒ Promise<any> +Start downloading update manually. You can use this method if `autoDownload` option is set to `false`. + +**Returns**: Promise<any> - Path to downloaded file. + +- cancellationToken CancellationToken + + +#### `macUpdater.getFeedURL()` ⇒ undefined \| null \| String + +#### `macUpdater.setFeedURL(options)` +Configure update provider. If value is `string`, [GenericServerOptions](/configuration/publish#genericserveroptions) will be set with value as `url`. + + +- options [PublishConfiguration](/configuration/publish#publishconfiguration) | String | [GithubOptions](/configuration/publish#githuboptions) | [S3Options](/configuration/publish#s3options) | [SpacesOptions](/configuration/publish#spacesoptions) | [GenericServerOptions](/configuration/publish#genericserveroptions) | [BintrayOptions](/configuration/publish#bintrayoptions) | module:builder-util-runtime/out/publishOptions.CustomPublishOptions | module:builder-util-runtime/out/publishOptions.KeygenOptions | [SnapStoreOptions](/configuration/publish#snapstoreoptions) | String - If you want to override configuration in the `app-update.yml`. + + +#### `macUpdater.isUpdaterActive()` ⇒ Boolean + +### NsisUpdater ⇐ module:electron-updater/out/BaseUpdater.BaseUpdater +**Kind**: class of [electron-updater](#module_electron-updater)
+**Extends**: module:electron-updater/out/BaseUpdater.BaseUpdater + +### Provider +**Kind**: class of [electron-updater](#module_electron-updater)
+**Properties** +* **isUseMultipleRangeRequest** Boolean +* **fileExtraDownloadHeaders** [key: string]: string | "undefined" + +**Methods** +* [.Provider](#Provider) + * [`.getLatestVersion()`](#module_electron-updater.Provider+getLatestVersion) ⇒ Promise<module:electron-updater/out/providers/Provider.T> + * [`.setRequestHeaders(value)`](#module_electron-updater.Provider+setRequestHeaders) + * [`.resolveFiles(updateInfo)`](#module_electron-updater.Provider+resolveFiles) ⇒ Array<[ResolvedUpdateFileInfo](#ResolvedUpdateFileInfo)> + + +#### `provider.getLatestVersion()` ⇒ Promise<module:electron-updater/out/providers/Provider.T> + +#### `provider.setRequestHeaders(value)` + +- value [key: string]: string | "undefined" + + +#### `provider.resolveFiles(updateInfo)` ⇒ Array<[ResolvedUpdateFileInfo](#ResolvedUpdateFileInfo)> + +- updateInfo module:electron-updater/out/providers/Provider.T + + +### UpdaterSignal +**Kind**: class of [electron-updater](#module_electron-updater)
+ +* [.UpdaterSignal](#UpdaterSignal) + * [`.login(handler)`](#module_electron-updater.UpdaterSignal+login) + * [`.progress(handler)`](#module_electron-updater.UpdaterSignal+progress) + * [`.updateCancelled(handler)`](#module_electron-updater.UpdaterSignal+updateCancelled) + * [`.updateDownloaded(handler)`](#module_electron-updater.UpdaterSignal+updateDownloaded) + + +#### `updaterSignal.login(handler)` +Emitted when an authenticating proxy is [asking for user credentials](https://github.com/electron/electron/blob/master/docs/api/client-request.md#event-login). + + +- handler module:electron-updater.__type + + +#### `updaterSignal.progress(handler)` + +- handler callback + + +#### `updaterSignal.updateCancelled(handler)` + +- handler callback + + +#### `updaterSignal.updateDownloaded(handler)` + +- handler callback + + +### `electron-updater.autoUpdater` : [AppUpdater](#AppUpdater) +**Kind**: constant of [electron-updater](#module_electron-updater)
+ +### `electron-updater.DOWNLOAD_PROGRESS` : "login" \| "checking-for-update" \| "update-available" \| "update-not-available" \| "update-cancelled" \| "download-progress" \| "update-downloaded" \| "error" +**Kind**: constant of [electron-updater](#module_electron-updater)
+ +### `electron-updater.UPDATE_DOWNLOADED` : "login" \| "checking-for-update" \| "update-available" \| "update-not-available" \| "update-cancelled" \| "download-progress" \| "update-downloaded" \| "error" +**Kind**: constant of [electron-updater](#module_electron-updater)
+ + diff --git a/docs/cli.md b/docs/cli.md new file mode 100644 index 00000000000..1a35d3f5d38 --- /dev/null +++ b/docs/cli.md @@ -0,0 +1,111 @@ +``` +Commands: + electron-builder build Build [default] + electron-builder install-app-deps Install app deps + electron-builder node-gyp-rebuild Rebuild own native code + electron-builder create-self-signed-cert Create self-signed code signing cert + for Windows apps + electron-builder start Run application in a development + mode using electron-webpack + +Building: + --mac, -m, -o, --macos Build for macOS, accepts target list (see + https://goo.gl/5uHuzj). [array] + --linux, -l Build for Linux, accepts target list (see + https://goo.gl/4vwQad) [array] + --win, -w, --windows Build for Windows, accepts target list (see + https://goo.gl/jYsTEJ) [array] + --x64 Build for x64 [boolean] + --ia32 Build for ia32 [boolean] + --armv7l Build for armv7l [boolean] + --arm64 Build for arm64 [boolean] + --dir Build unpacked dir. Useful to test. [boolean] + --prepackaged, --pd The path to prepackaged app (to pack in a + distributable format) + --projectDir, --project The path to project directory. Defaults to current + working directory. + --config, -c The path to an electron-builder config. Defaults to + `electron-builder.yml` (or `json`, or `json5`), see + https://goo.gl/YFRJOM + +Publishing: + --publish, -p Publish artifacts (to GitHub Releases), see + https://goo.gl/tSFycD + [choices: "onTag", "onTagOrDraft", "always", "never", undefined] + +Other: + --help Show help [boolean] + --version Show version number [boolean] +``` + +For other commands please see help using `--help` arg, e.g. `./node_modules/.bin/electron-builder install-app-deps --help` + +!!! tip + Since Node.js 8 [npx](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b) is bundled, so, you can simply use `npx electron-builder`. + + +Prepend `npx` to sample commands below if you run it from Terminal and not from `package.json` scripts. + +!!! example "build for macOS, Windows and Linux" + `electron-builder -mwl` + +!!! example "build deb and tar.xz for Linux" + `electron-builder --linux deb tar.xz` + +!!! example "build NSIS 32-bit installer for Windows" + `electron-builder --windows nsis:ia32` + +!!! example "set package.json property `foo` to `bar`" + `electron-builder -c.extraMetadata.foo=bar` + +!!! example "configure unicode options for NSIS" + `electron-builder -c.nsis.unicode=false` + +## Target + +Without target configuration, electron-builder builds Electron app for current platform and current architecture using default target. + +* macOS - DMG and ZIP for Squirrel.Mac. +* Windows - [NSIS](configuration/nsis.md). +* Linux: + - if you build on Windows or macOS: [Snap](configuration/snap.md) and [AppImage](configuration/appimage.md) for x64. + - if you build on Linux: [Snap](configuration/snap.md) and [AppImage](configuration/appimage.md) for current architecture. + +Platforms and archs can be configured or using [CLI args](https://github.com/electron-userland/electron-builder#cli-usage), or in the configuration. + +For example, if you don't want to pass `--ia32` and `--x64` flags each time, but instead build by default NSIS target for all archs for Windows: + +!!! example "Configuration" + ```json tab="package.json" + "build": { + "win": { + "target": [ + { + "target": "nsis", + "arch": [ + "x64", + "ia32" + ] + } + ] + } + } + ``` + + ``` yaml tab="electron-builder.yml" + win: + target: + - target: nsis + arch: + - x64 + - ia32 + ``` + +and use +``` +build -wl +``` + +### TargetConfiguration +* **target** String - The target name. e.g. `snap`. +* arch "x64" | "ia32" | "armv7l" | "arm64"> | "x64" | "ia32" | "armv7l" | "arm64" - The arch or list of archs. \ No newline at end of file diff --git a/docs/code-signing.md b/docs/code-signing.md new file mode 100644 index 00000000000..526354a0e34 --- /dev/null +++ b/docs/code-signing.md @@ -0,0 +1,75 @@ +macOS and Windows code signing is supported. Windows is dual code-signed (SHA1 & SHA256 hashing algorithms). + +On a macOS development machine, a valid and appropriate identity from your keychain will be automatically used. + +!!! tip + See article [Notarizing your Electron application](https://kilianvalkhof.com/2019/electron/notarizing-your-electron-application/). + + +| Env Name | Description +| -------------- | ----------- +| `CSC_LINK` | The HTTPS link (or base64-encoded data, or `file://` link, or local path) to certificate (`*.p12` or `*.pfx` file). Shorthand `~/` is supported (home directory). +| `CSC_KEY_PASSWORD` | The password to decrypt the certificate given in `CSC_LINK`. +| `CSC_NAME` | *macOS-only* Name of certificate (to retrieve from login.keychain). Useful on a development machine (not on CI) if you have several identities (otherwise don't specify it). +| `CSC_IDENTITY_AUTO_DISCOVERY`| `true` or `false`. Defaults to `true` — on a macOS development machine valid and appropriate identity from your keychain will be automatically used. +| `CSC_KEYCHAIN`| The keychain name. Used if `CSC_LINK` is not specified. Defaults to system default keychain. + +!!! tip + If you are building Windows on macOS and need to set a different certificate and password (than the ones set in `CSC_*` env vars) you can use `WIN_CSC_LINK` and `WIN_CSC_KEY_PASSWORD`. + +## Windows + +To sign an app on Windows, there are two types of certificates: + +* EV Code Signing Certificate +* Code Signing Certificate + +Both certificates work with auto-update. The regular (and often cheaper) Code Signing Certificate shows a warning during installation that goes away once enough users installed your application and you've built up trust. The EV Certificate has more trust and thus works immediately without any warnings. However, it is not possible to export the EV Certificate as it is bound to a physical USB dongle. Thus, you can't export the certificate for signing code on a CI, such as AppVeyor. + +If you are using an EV Certificate, you need to provide [win.certificateSubjectName](configuration/win.md#WindowsConfiguration-certificateSubjectName) in your electron-builder configuration. + +If you use Windows 7, please ensure that [PowerShell](https://blogs.technet.microsoft.com/heyscriptingguy/2013/06/02/weekend-scripter-install-powershell-3-0-on-windows-7/) is updated to version 3.0. + +If you are on Linux or Mac and you want sign a Windows app using EV Code Signing Certificate, please use [the guide for Unix systems](tutorials/code-signing-windows-apps-on-unix.md). + +## Travis, AppVeyor and other CI Servers +To sign app on build server you need to set `CSC_LINK`, `CSC_KEY_PASSWORD`: + +1. [Export](https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html#//apple_ref/doc/uid/TP40012582-CH31-SW7) certificate. + Consider to not use special characters (for bash[1]) in the password because “*values are not escaped when your builds are executed*”. +2. Encode file to base64 (macOS: `base64 -i yourFile.p12 -o envValue.txt`, Linux: `base64 yourFile.p12 > envValue.txt`). + + Or upload `*.p12` file (e.g. on Google Drive, use [direct link generator](http://www.syncwithtech.org/p/direct-download-link-generator.html) to get correct download link). + +3. Set `CSC_LINK` and `CSC_KEY_PASSWORD` environment variables. See [Travis](https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings) or [AppVeyor](https://www.appveyor.com/docs/build-configuration#environment-variables) documentation. + Recommended to set it in the CI Project Settings, not in the `.travis.yml`/`appveyor.yml`. If you use link to file (not base64 encoded data), make sure to escape special characters (for bash[1]) accordingly. + + In case of AppVeyor, don't forget to click on lock icon to “Toggle variable encryption”. + + Keep in mind that Windows is not able to handle enviroment variable values longer than 8192 characters, thus if the base64 representation of your certificate exceeds that limit, try re-exporting the certificate without including all the certificates in the certification path (they are not necessary, but the Certificate Manager export wizard ticks the option by default), otherwise the encoded value will be truncated. + +[1] `printf "%q\n" ""` + +## Where to Buy Code Signing Certificate +See [Get a code signing certificate](https://msdn.microsoft.com/windows/hardware/drivers/dashboard/get-a-code-signing-certificate) for Windows (platform: "Microsoft Authenticode"). +Please note — Gatekeeper only recognises [Apple digital certificates](http://stackoverflow.com/questions/11833481/non-apple-issued-code-signing-certificate-can-it-work-with-mac-os-10-8-gatekeep). + +## How to Export Certificate on macOS + +1. Open Keychain. +2. Select `login` keychain, and `My Certificates` category. +3. Select all required certificates (hint: use cmd-click to select several): + * `Developer ID Application:` to sign app for macOS. + * `3rd Party Mac Developer Installer:` and either `Apple Distribution` or `3rd Party Mac Developer Application:` to sign app for MAS (Mac App Store). + * `Developer ID Application:` and `Developer ID Installer` to sign app and installer for distribution outside of the Mac App Store. + * `Apple Development:` or `Mac Developer:` to sign development builds for testing Mac App Store submissions (`mas-dev` target). You also need a provisioning profile in the working directory that matches this certificate and the device being used for testing. + + Please note – you can select as many certificates as needed. No restrictions on electron-builder side. + All selected certificates will be imported into temporary keychain on CI server. +4. Open context menu and `Export`. + +## How to Disable Code Signing During the Build Process on macOS + +To disable Code Signing when building for macOS leave all the above vars unset except for `CSC_IDENTITY_AUTO_DISCOVERY` which needs to be set to `false`. This can be done by running `export CSC_IDENTITY_AUTO_DISCOVERY=false`. + +Another way — set `mac.identity` to `null`. You can pass aditional configuration using CLI as well: `-c.mac.identity=null`. diff --git a/docs/configuration/appimage.md b/docs/configuration/appimage.md new file mode 100644 index 00000000000..5a4386a6bcb --- /dev/null +++ b/docs/configuration/appimage.md @@ -0,0 +1,7 @@ +The top-level [appImage](configuration.md#Configuration-appImage) key contains set of options instructing electron-builder on how it should build [AppImage](https://appimage.org/). + +!!! info "Desktop Integration" + Since electron-builder 21 desktop integration is not a part of produced AppImage file. [AppImageLauncher](https://github.com/TheAssassin/AppImageLauncher) is the recommended way to integrate AppImages. + + +{!generated/appimage-options.md!} \ No newline at end of file diff --git a/docs/configuration/appx.md b/docs/configuration/appx.md new file mode 100644 index 00000000000..64f96f54b85 --- /dev/null +++ b/docs/configuration/appx.md @@ -0,0 +1,73 @@ +The top-level [appx](configuration.md#Configuration-appx) key contains set of options instructing electron-builder on how it should build AppX (Windows Store). + +All options are optional. All required for AppX configuration is inferred and computed automatically. + + + +

Inherited from TargetSpecificOptions:

+ + + + +## AppX Package Code Signing + +* If the AppX package is meant for enterprise or self-made distribution (manually install the app without using the Store for testing or for enterprise distribution), it must be [signed](../code-signing.md). +* If the AppX package is meant for Windows Store distribution, no need to sign the package with any certificate. The Windows Store will take care of signing it with a Microsoft certificate during the submission process. + +## AppX Assets + +AppX assets need to be placed in the `appx` folder in the [build](configuration.md#MetadataDirectories-buildResources) directory. + +The assets should follow these naming conventions: + +- Logo: `StoreLogo.png` +- Square150x150Logo: `Square150x150Logo.png` +- Square44x44Logo: `Square44x44Logo.png` +- Wide310x150Logo: `Wide310x150Logo.png` +- *Optional* BadgeLogo: `BadgeLogo.png` +- *Optional* Square310x310Logo: `LargeTile.png` +- *Optional* Square71x71Logo: `SmallTile.png` +- *Optional* SplashScreen: `SplashScreen.png` + +All official AppX asset types are supported by the build process. These assets can include scaled assets by using `target size` and `scale` in the name. +See [Guidelines for tile and icon assets](https://docs.microsoft.com/en-us/windows/uwp/controls-and-patterns/tiles-and-notifications-app-assets) for more information. + +Default assets will be used for `Logo`, `Square150x150Logo`, `Square44x44Logo` and `Wide310x150Logo` if not provided. For assets marked `Optional`, these assets will not be listed in the manifest file if not provided. + +## How to publish your Electron App to the Windows App Store + +1. You'll need a microsoft developer account (pay some small fee). Use your favourite search engine to find the registration form. +2. Register you app for the desktop bridge [here](https://developer.microsoft.com/en-us/windows/projects/campaigns/desktop-bridge). +3. Wait for MS to answer and further guide you. +4. In the meantime, build and test your appx. It's dead simple. + + ```json + "win": { + "target": "appx", + }, + ``` +5. The rest should be pretty straight forward — upload the appx to the store and wait for approval. + +## Building AppX on macOS + +The only solution for now — using [Parallels Desktop for Mac](http://www.parallels.com/products/desktop/) ([Pro Edition](https://forum.parallels.com/threads/prlctl-is-now-a-pro-or-business-version-tool-only.330290/) is required). Create Windows 10 virtual machine and start it. It will be detected and used automatically to build AppX on your macOS machine. Nothing is required to setup on Windows. It allows you to not copy project to Windows and to not setup build environment on Windows. + +## Common Questions +#### How do install AppX without trusted certificate? + +If you use self-signed certificate, you need to add it to "Trusted People". See [Install the certificate](https://stackoverflow.com/a/24372483/1910191). diff --git a/docs/configuration/configuration.md b/docs/configuration/configuration.md new file mode 100644 index 00000000000..9555497faf7 --- /dev/null +++ b/docs/configuration/configuration.md @@ -0,0 +1,201 @@ +electron-builder [configuration](#configuration) can be defined + +* in the `package.json` file of your project using the `build` key on the top level: + ```json + "build": { + "appId": "com.example.app" + } + ``` +* or through the `--config ` option. Defaults to `electron-builder.yml`. + ```yaml + appId: "com.example.app" + ``` + + `json`, [json5](http://json5.org), [toml](https://github.com/toml-lang/toml) or `js` (exported configuration or function that produces configuration) formats also supported. + + !!! tip + If you want to use [toml](https://en.wikipedia.org/wiki/TOML), please install `yarn add toml --dev`. + +Most of the options accept `null` — for example, to explicitly set that DMG icon must be default volume icon from the OS and default rules must be not applied (i.e. use application icon as DMG icon), set `dmg.icon` to `null`. + +## Artifact File Name Template + +`${ext}` macro is supported in addition to [file macros](../file-patterns.md#file-macros). + +## Environment Variables from File + +Env file `electron-builder.env` in the current dir ([example](https://github.com/motdotla/dotenv-expand/blob/master/test/.env)). Supported only for CLI usage. + +## How to Read Docs + +* Name of optional property is normal, **required** is bold. +* Type is specified after property name: `Array | String`. Union like this means that you can specify or string (`**/*`), or array of strings (`["**/*", "!foo.js"]`). + +## Configuration + + +
    +
  • appId = com.electron.${name} String | “undefined” - The application id. Used as CFBundleIdentifier for MacOS and as Application User Model ID for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.
  • +
  • productName String | “undefined” - As name, but allows you to specify a product name for your executable which contains spaces and other special characters not allowed in the name property.
  • +
  • copyright = Copyright © year ${author} String | “undefined” - The human-readable copyright line for the app.
  • +
+
+ +
+ +
+ +
+ +
+
    +
  • +

    buildDependenciesFromSource = false Boolean - Whether to build the application native dependencies from source.

    +
  • +
  • +

    nodeGypRebuild = false Boolean - Whether to execute node-gyp rebuild before starting to package the app.

    +

    Don’t use npm (neither .npmrc) for configuring electron headers. Use electron-builder node-gyp-rebuild instead.

    +
  • +
  • +

    npmArgs Array<String> | String | “undefined” - Additional command line arguments to use when installing app native deps.

    +
  • +
  • +

    npmRebuild = true Boolean - Whether to rebuild native dependencies before starting to package the app.

    +
  • +
+
+
    +
  • +

    buildVersion String | “undefined” - The build version. Maps to the CFBundleVersion on macOS, and FileVersion metadata property on Windows. Defaults to the version. If TRAVIS_BUILD_NUMBER or APPVEYOR_BUILD_NUMBER or CIRCLE_BUILD_NUM or BUILD_NUMBER or bamboo.buildNumber or CI_PIPELINE_IID env defined, it will be used as a build version (version.build_number).

    +
  • +
  • +

    electronCompile Boolean - Whether to use electron-compile to compile app. Defaults to true if electron-compile in the dependencies. And false if in the devDependencies or doesn’t specified.

    +
  • +
  • +

    electronDist String | module:app-builder-lib/out/configuration.__type - Returns the path to custom Electron build (e.g. ~/electron/out/R). Zip files must follow the pattern electron-v${version}-${platformName}-${arch}.zip, otherwise it will be assumed to be an unpacked Electron app directory

    +
  • +
  • +

    electronDownload - The electron-download options.

    +
      +
    • version String
    • +
    • cache String | “undefined” - The cache location.
    • +
    • mirror String | “undefined” - The mirror.
    • +
    • strictSSL Boolean
    • +
    • isVerifyChecksum Boolean
    • +
    • platform “darwin” | “linux” | “win32” | “mas”
    • +
    • arch String
    • +
    +
  • +
  • +

    electronBranding ElectronBrandingOptions - The branding used by Electron’s distributables. This is needed if a fork has modified Electron’s BRANDING.json file.

    +
  • +
  • +

    electronVersion String | “undefined” - The version of electron you are packaging for. Defaults to version of electron, electron-prebuilt or electron-prebuilt-compile dependency.

    +
  • +
  • +

    extends Array<String> | String | “undefined” - The name of a built-in configuration preset (currently, only react-cra is supported) or any number of paths to config files (relative to project dir).

    +

    The latter allows to mixin a config from multiple other configs, as if you Object.assign them, but properly combine files glob patterns.

    +

    If react-scripts in the app dependencies, react-cra will be set automatically. Set to null to disable automatic detection.

    +
  • +
  • +

    extraMetadata any - Inject properties to package.json.

    +
  • +
+
+
    +
  • forceCodeSigning = false Boolean - Whether to fail if the application is not signed (to prevent unsigned app if code signing configuration is not correct).
  • +
  • nodeVersion String | “undefined” - libui-based frameworks only The version of NodeJS you are packaging for. You can set it to current to set the Node.js version that you use to run.
  • +
  • launchUiVersion Boolean | String | “undefined” - libui-based frameworks only The version of LaunchUI you are packaging for. Applicable for Windows only. Defaults to version suitable for used framework version.
  • +
  • framework String | “undefined” - The framework name. One of electron, proton, libui. Defaults to electron.
  • +
  • beforePack module:app-builder-lib/out/configuration.__type | String | “undefined” - The function (or path to file or module id) to be run before pack
  • +
+
+
    +
  • +

    afterPack - The function (or path to file or module id) to be run after pack (but before pack into distributable format and sign).

    +
  • +
  • +

    afterSign - The function (or path to file or module id) to be run after pack and sign (but before pack into distributable format).

    +
  • +
  • +

    artifactBuildStarted module:app-builder-lib/out/configuration.__type | String | “undefined” - The function (or path to file or module id) to be run on artifact build start.

    +
  • +
  • +

    artifactBuildCompleted module:app-builder-lib/out/configuration.__type | String | “undefined” - The function (or path to file or module id) to be run on artifact build completed.

    +
  • +
  • +

    afterAllArtifactBuild - The function (or path to file or module id) to be run after all artifacts are build.

    +
  • +
  • +

    msiProjectCreated module:app-builder-lib/out/configuration.__type | String | “undefined” - MSI project created on disk - not packed into .msi package yet.

    +
  • +
  • +

    appxManifestCreated module:app-builder-lib/out/configuration.__type | String | “undefined” - Appx manifest created on disk - not packed into .appx package yet.

    +
  • +
  • +

    onNodeModuleFile - The function (or path to file or module id) to be run on each node module file.

    +
  • +
  • +

    beforeBuild (context: BeforeBuildContext) => Promise | null - The function (or path to file or module id) to be run before dependencies are installed or rebuilt. Works when npmRebuild is set to true. Resolving to false will skip dependencies install or rebuild.

    +

    If provided and node_modules are missing, it will not invoke production dependencies check.

    +
  • +
+
+
    +
  • remoteBuild = true Boolean - Whether to build using Electron Build Service if target not supported on current OS.
  • +
  • includePdb = false Boolean - Whether to include PDB files.
  • +
  • removePackageScripts = true Boolean - Whether to remove scripts field from package.json files.
  • +
  • removePackageKeywords = true Boolean - Whether to remove keywords field from package.json files.
  • +
+ + + +--- + +### Overridable per Platform Options + +Following options can be set also per platform (top-level keys [mac](mac.md), [linux](linux.md) and [win](win.md)) if need. + +{!generated/PlatformSpecificBuildOptions.md!} + +## Metadata +Some standard fields should be defined in the `package.json`. + +{!generated/Metadata.md!} + +## Proton Native + +To package [Proton Native](https://proton-native.js.org/) app, set `protonNodeVersion` option to `current` or specific NodeJS version that you are packaging for. +Currently, only macOS and Linux supported. + +## Build Version Management +`CFBundleVersion` (macOS) and `FileVersion` (Windows) will be set automatically to `version.build_number` on CI server (Travis, AppVeyor, CircleCI and Bamboo supported). + +{!includes/hooks.md!} diff --git a/docs/configuration/contents.md b/docs/configuration/contents.md new file mode 100644 index 00000000000..1afa65972ba --- /dev/null +++ b/docs/configuration/contents.md @@ -0,0 +1,84 @@ +## files + +`Array | String | FileSet` + +A [glob patterns](../file-patterns.md) relative to the [app directory](configuration.md#MetadataDirectories-app), which specifies which files to include when copying files to create the package. + +Defaults to: +```json +[ + "**/*", + "!**/node_modules/*/{CHANGELOG.md,README.md,README,readme.md,readme}", + "!**/node_modules/*/{test,__tests__,tests,powered-test,example,examples}", + "!**/node_modules/*.d.ts", + "!**/node_modules/.bin", + "!**/*.{iml,o,hprof,orig,pyc,pyo,rbc,swp,csproj,sln,xproj}", + "!.editorconfig", + "!**/._*", + "!**/{.DS_Store,.git,.hg,.svn,CVS,RCS,SCCS,.gitignore,.gitattributes}", + "!**/{__pycache__,thumbs.db,.flowconfig,.idea,.vs,.nyc_output}", + "!**/{appveyor.yml,.travis.yml,circle.yml}", + "!**/{npm-debug.log,yarn.lock,.yarn-integrity,.yarn-metadata.json}" +] +``` + +Development dependencies are never copied in any case. You don't need to ignore it explicitly. Hidden files are not ignored by default, but all files that should be ignored, are ignored by default. + + +Default pattern `**/*` **is not added to your custom** if some of your patterns is not ignore (i.e. not starts with `!`). `package.json` and `**/node_modules/**/*` (only production dependencies will be copied) is added to your custom in any case. All default ignores are added in any case — you don't need to repeat it if you configure own patterns. + +May be specified in the platform options (e.g. in the [mac](mac.md)). + +You may also specify custom source and destination directories by using `FileSet` objects instead of simple glob patterns. + +```json +[ + { + "from": "path/to/source", + "to": "path/to/destination", + "filter": ["**/*", "!foo/*.js"] + } +] +``` + +You can use [file macros](../file-patterns.md#file-macros) in the `from` and `to` fields as well. `from` and `to` can be files and you can use this to [rename](https://github.com/electron-userland/electron-builder/issues/1119) a file while packaging. + +### `FileSet.from` + +`String` + +The source path relative to and defaults to: + +* the [app directory](configuration.md#MetadataDirectories-app) for `files`, +* the project directory for `extraResources` and `extraFiles`. + +If you don't use two-package.json structure and don't set custom app directory, app directory equals to project directory. + +### `FileSet.to` + +`String` + +The destination path relative to and defaults to: +* the asar archive root for `files`, +* the app's content directory for `extraFiles`, +* the app's resource directory for `extraResources`. + +### `FileSet.filter` + +`Array | String` + +The [glob patterns](../file-patterns.md). Defaults to `*/**`. + +## extraResources + +`Array | String | FileSet` + +A [glob patterns](../file-patterns.md) relative to the project directory, when specified, copy the file or directory with matching names directly into the app's resources directory (`Contents/Resources` for MacOS, `resources` for Linux and Windows). + +File patterns (and support for `from` and `to` fields) the same as for [files](#files). + +## extraFiles + +`Array | String | FileSet` + +The same as [extraResources](#extraresources) but copy into the app's content directory (`Contents` for MacOS, root directory for Linux and Windows). \ No newline at end of file diff --git a/docs/configuration/dmg.md b/docs/configuration/dmg.md new file mode 100644 index 00000000000..acad319e28a --- /dev/null +++ b/docs/configuration/dmg.md @@ -0,0 +1,78 @@ +The top-level [dmg](configuration.md#Configuration-dmg) key contains set of options instructing electron-builder on how it should build [DMG](https://en.wikipedia.org/wiki/Apple_Disk_Image). + + +
    +
  • +

    background String | “undefined” - The path to background image (default: build/background.tiff or build/background.png if exists). The resolution of this file determines the resolution of the installer window. If background is not specified, use window.size. Default locations expected background size to be 540x380. See: DMG with Retina background support.

    +
  • +
  • +

    backgroundColor String | “undefined” - The background color (accepts css colors). Defaults to #ffffff (white) if no background image.

    +
  • +
  • +

    icon String | “undefined” - The path to DMG icon (volume icon), which will be shown when mounted, relative to the build resources or to the project directory. Defaults to the application icon (build/icon.icns).

    +
  • +
  • +

    iconSize = 80 Number | “undefined” - The size of all the icons inside the DMG.

    +
  • +
  • +

    iconTextSize = 12 Number | “undefined” - The size of all the icon texts inside the DMG.

    +
  • +
  • +

    title = ${productName} ${version} String | “undefined” - The title of the produced DMG, which will be shown when mounted (volume name).

    +

    Macro ${productName}, ${version} and ${name} are supported.

    +
  • +
  • +

    contents Array<DmgContent> - The content — to customize icon locations. The x and y coordinates refer to the position of the center of the icon (at 1x scale), and do not take the label into account.

    +
      +
    • x Number - The device-independent pixel offset from the left of the window to the center of the icon.
    • +
    • y Number - The device-independent pixel offset from the top of the window to the center of the icon.
    • +
    • type “link” | “file” | “dir”
    • +
    • name String - The name of the file within the DMG. Defaults to basename of path.
    • +
    • path String - The path of the file within the DMG.
    • +
    +
  • +
  • +

    format = UDZO “UDRW” | “UDRO” | “UDCO” | “UDZO” | “UDBZ” | “ULFO” - The disk image format. ULFO (lzfse-compressed image (OS X 10.11+ only)).

    +
  • +
  • +

    window - The DMG window position and size. With y co-ordinates running from bottom to top.

    +

    The Finder makes sure that the window will be on the user’s display, so if you want your window at the top left of the display you could use "x": 0, "y": 100000 as the x, y co-ordinates. It is not to be possible to position the window relative to the top left or relative to the center of the user’s screen.

    +
      +
    • x = 400 Number - The X position relative to left of the screen.
    • +
    • y = 100 Number - The Y position relative to bottom of the screen.
    • +
    • width Number - The width. Defaults to background image width or 540.
    • +
    • height Number - The height. Defaults to background image height or 380.
    • +
    +
  • +
  • +

    internetEnabled = false Boolean - Whether to create internet-enabled disk image (when it is downloaded using a browser it will automatically decompress the image, put the application on the desktop, unmount and remove the disk image file).

    +
  • +
  • +

    sign = false Boolean - Whether to sign the DMG or not. Signing is not required and will lead to unwanted errors in combination with notarization requirements.

    +
  • +
+

Inherited from TargetSpecificOptions:

+ + + + +## DMG License + +To add license to DMG, create file `license_LANG_CODE.txt` in the build resources. Multiple license files in different languages are supported — use lang postfix (e.g. `_de`, `_ru`)). For example, create files `license_de.txt` and `license_en.txt` in the build resources. +If OS language is german, `license_de.txt` will be displayed. See map of [language code to name](https://github.com/meikidd/iso-639-1/blob/master/src/data.js). + +You can also change the default button labels of the DMG by passing a json file named `licenseButtons_LANG_CODE.json`. The german file would be named: `licenseButtons_de.json`. +The contain file should have the following format: +```json +{ + "lang": "English", + "agree": "Agree", + "disagree": "Disagree", + "print": "Print", + "save": "Save", + "description": "Here is my own description" +} +``` diff --git a/docs/configuration/linux.md b/docs/configuration/linux.md new file mode 100644 index 00000000000..ef81cfe8086 --- /dev/null +++ b/docs/configuration/linux.md @@ -0,0 +1,58 @@ +The top-level [linux](configuration.md#Configuration-linux) key contains set of options instructing electron-builder on how it should build Linux targets. These options applicable for any Linux target. + + +
    +
  • +

    target = AppImage String | TargetConfiguration - Target package type: list of AppImage, snap, deb, rpm, freebsd, pacman, p5p, apk, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir.

    +

    electron-builder docker image can be used to build Linux targets on any platform.

    +

    Please do not put an AppImage into another archive like a .zip or .tar.gz.

    +
  • +
  • +

    maintainer String | “undefined” - The maintainer. Defaults to author.

    +
  • +
  • +

    vendor String | “undefined” - The vendor. Defaults to author.

    +
  • +
  • +

    icon String - The path to icon set directory or one png file, relative to the build resources or to the project directory. The icon filename must contain the size (e.g. 32x32.png) of the icon. By default will be generated automatically based on the macOS icns file.

    +
  • +
  • +

    synopsis String | “undefined” - The short description.

    +
  • +
  • +

    description String | “undefined” - As description from application package.json, but allows you to specify different for Linux.

    +
  • +
  • +

    category String | “undefined” - The application category.

    +
  • +
  • +

    mimeTypes Array<String> | “undefined” - The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.

    +
  • +
  • +

    desktop any | “undefined” - The Desktop file entries (name to value).

    +
  • +
  • +

    executableArgs Array<String> | “undefined” - The executable parameters. Pass to executableName

    +
  • +
+ + + +--- + +{!includes/platform-specific-configuration-note.md!} + +## Debian Package Options + +The top-level [deb](configuration.md#Configuration-deb) key contains set of options instructing electron-builder on how it should build Debian package. + +{!generated/DebOptions.md!} + +All [LinuxTargetSpecificOptions](linux.md#linuxtargetspecificoptions-apk-freebsd-pacman-p5p-and-rpm-options) can be also specified in the `deb` to customize Debian package. + +## `LinuxTargetSpecificOptions` APK, FreeBSD, Pacman, P5P and RPM Options + + +The top-level `apk`, `freebsd`, `pacman`, `p5p` and `rpm` keys contains set of options instructing electron-builder on how it should build corresponding Linux target. + +{!generated/LinuxTargetSpecificOptions.md!} diff --git a/docs/configuration/mac.md b/docs/configuration/mac.md new file mode 100644 index 00000000000..204817ecd47 --- /dev/null +++ b/docs/configuration/mac.md @@ -0,0 +1,101 @@ +The top-level [mac](configuration.md#Configuration-mac) key contains set of options instructing electron-builder on how it should build macOS targets. These options applicable for any macOS target. + + +
    +
  • +

    category String | “undefined” - The application category type, as shown in the Finder via View -> Arrange by Application Category when viewing the Applications directory.

    +

    For example, "category": "public.app-category.developer-tools" will set the application category to Developer Tools.

    +

    Valid values are listed in Apple’s documentation.

    +
  • +
  • +

    target String | TargetConfiguration - The target package type: list of default, dmg, mas, mas-dev, pkg, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir. Defaults to default (dmg and zip for Squirrel.Mac).

    +
  • +
  • +

    identity String | “undefined” - The name of certificate to use when signing. Consider using environment variables CSC_LINK or CSC_NAME instead of specifying this option. MAS installer identity is specified in the mas.

    +
  • +
  • +

    icon = build/icon.icns String | “undefined” - The path to application icon.

    +
  • +
  • +

    entitlements String | “undefined” - The path to entitlements file for signing the app. build/entitlements.mac.plist will be used if exists (it is a recommended way to set). MAS entitlements is specified in the mas.

    +
  • +
  • +

    entitlementsInherit String | “undefined” - The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. build/entitlements.mac.inherit.plist will be used if exists (it is a recommended way to set). Otherwise default.

    +

    This option only applies when signing with entitlements provided.

    +
  • +
  • +

    entitlementsLoginHelper String | “undefined” - Path to login helper entitlement file. When using App Sandbox, the the com.apple.security.inherit key that is normally in the inherited entitlements cannot be inherited since the login helper is a standalone executable. Defaults to the value provided for entitlements. This option only applies when signing with entitlements provided.

    +
  • +
  • +

    provisioningProfile String | “undefined” - The path to the provisioning profile to use when signing, absolute or relative to the app root.

    +
  • +
  • +

    bundleVersion String | “undefined” - The CFBundleVersion. Do not use it unless you need to.

    +
  • +
  • +

    bundleShortVersion String | “undefined” - The CFBundleShortVersionString. Do not use it unless you need to.

    +
  • +
  • +

    darkModeSupport = false Boolean - Whether a dark mode is supported. If your app does have a dark mode, you can make your app follow the system-wide dark mode setting.

    +
  • +
  • +

    helperBundleId = ${appBundleIdentifier}.helper String | “undefined” - The bundle identifier to use in the application helper’s plist.

    +
  • +
  • +

    helperRendererBundleId = ${appBundleIdentifier}.helper.Renderer String | “undefined” - The bundle identifier to use in the Renderer helper’s plist.

    +
  • +
  • +

    helperPluginBundleId = ${appBundleIdentifier}.helper.Plugin String | “undefined” - The bundle identifier to use in the Plugin helper’s plist.

    +
  • +
  • +

    helperGPUBundleId = ${appBundleIdentifier}.helper.GPU String | “undefined” - The bundle identifier to use in the GPU helper’s plist.

    +
  • +
  • +

    helperEHBundleId = ${appBundleIdentifier}.helper.EH String | “undefined” - The bundle identifier to use in the EH helper’s plist.

    +
  • +
  • +

    helperNPBundleId = ${appBundleIdentifier}.helper.NP String | “undefined” - The bundle identifier to use in the NP helper’s plist.

    +
  • +
  • +

    type = distribution “distribution” | “development” | “undefined” - Whether to sign app for development or for distribution.

    +
  • +
  • +

    extendInfo any - The extra entries for Info.plist.

    +
  • +
  • +

    binaries Array<String> | “undefined” - Paths of any extra binaries that need to be signed.

    +
  • +
  • +

    minimumSystemVersion String | “undefined” - The minimum version of macOS required for the app to run. Corresponds to LSMinimumSystemVersion.

    +
  • +
  • +

    requirements String | “undefined” - Path of requirements file used in signing. Not applicable for MAS.

    +
  • +
  • +

    electronLanguages Array<String> | String - The electron locales. By default Electron locales used as is.

    +
  • +
  • +

    extraDistFiles Array<String> | String | “undefined” - Extra files to put in archive. Not applicable for tar.*.

    +
  • +
  • +

    hardenedRuntime = true Boolean - Whether your app has to be signed with hardened runtime.

    +
  • +
  • +

    gatekeeperAssess = false Boolean - Whether to let electron-osx-sign validate the signing or not.

    +
  • +
  • +

    strictVerify = true Array<String> | String | Boolean - Whether to let electron-osx-sign verify the contents or not.

    +
  • +
  • +

    signIgnore Array<String> | String | “undefined” - Regex or an array of regex’s that signal skipping signing a file.

    +
  • +
  • +

    timestamp String | “undefined” - Specify the URL of the timestamp authority server

    +
  • +
+ + + +--- + +{!includes/platform-specific-configuration-note.md!} diff --git a/docs/configuration/mas.md b/docs/configuration/mas.md new file mode 100644 index 00000000000..4b83b1c64fa --- /dev/null +++ b/docs/configuration/mas.md @@ -0,0 +1,11 @@ +The top-level [mas](configuration.md#Configuration-mas) key contains set of options instructing electron-builder on how it should build MAS (Mac Application Store) target. +Inherits [macOS options](mac.md). + + +
    +
  • entitlements String | “undefined” - The path to entitlements file for signing the app. build/entitlements.mas.plist will be used if exists (it is a recommended way to set). Otherwise default.
  • +
  • entitlementsInherit String | “undefined” - The path to child entitlements which inherit the security settings for signing frameworks and bundles of a distribution. build/entitlements.mas.inherit.plist will be used if exists (it is a recommended way to set). Otherwise default.
  • +
  • binaries Array<String> | “undefined” - Paths of any extra binaries that need to be signed.
  • +
+ + diff --git a/docs/configuration/nsis.md b/docs/configuration/nsis.md new file mode 100644 index 00000000000..8cbdeb5c7aa --- /dev/null +++ b/docs/configuration/nsis.md @@ -0,0 +1,145 @@ +The top-level [nsis](configuration.md#Configuration-nsis) key contains set of options instructing electron-builder on how it should build NSIS target (default target for Windows). + +These options also applicable for [Web installer](#web-installer), use top-level `nsisWeb` key. + +{!generated/NsisOptions.md!} + +--- + +Inherited from `TargetSpecificOptions`: + +{!generated/TargetSpecificOptions.md!} + +--- + +Unicode enabled by default. Large strings are supported (maximum string length of 8192 bytes instead of the default of 1024 bytes). + +## 32 bit + 64 bit + +If you build both ia32 and x64 arch (`--x64 --ia32`), you in any case get one installer. Appropriate arch will be installed automatically. +The same applied to web installer (`nsis-web` [target](win.md#WindowsConfiguration-target)). + +## Web Installer + +To build web installer, set [target](win.md#WindowsConfiguration-target) to `nsis-web`. Web Installer automatically detects OS architecture and downloads corresponding package file. So, user don't need to guess what installer to download and in the same time you don't bundle package files for all architectures in the one installer (as in case of default `nsis` target). It doesn't matter for common Electron application (due to superb LZMA compression, size difference is acceptable), but if your application is huge, Web Installer is a solution. + +To customize web installer, use the top-level `nsisWeb` key (not `nsis`). + +If for some reasons web installer cannot download (antivirus, offline): + +* Download package file into the same directory where installer located. It will be detected automatically and used instead of downloading from the Internet. Please note — only original package file is allowed (checksum is checked). +* Specify any local package file using `--package-file=path_to_file`. + +## Custom NSIS script + +Two options are available — [include](#NsisOptions-include) and [script](#NsisOptions-script). `script` allows you to provide completely different NSIS script. For most cases it is not required as you need only to customise some aspects, but still use well-tested and maintained default NSIS script. So, `include` is recommended. + +Keep in mind — if you customize NSIS script, you should always state about it in the issue reports. And don't expect that your issue will be resolved. + +1. Add file `build/installer.nsh`. +2. Define wanted macro to customise: `customHeader`, `preInit`, `customInit`, `customUnInit`, `customInstall`, `customUnInstall`, `customRemoveFiles`, `customInstallMode`. + + !!! example + ```nsis + !macro customHeader + !system "echo '' > ${BUILD_RESOURCES_DIR}/customHeader" + !macroend + + !macro preInit + ; This macro is inserted at the beginning of the NSIS .OnInit callback + !system "echo '' > ${BUILD_RESOURCES_DIR}/preInit" + !macroend + + !macro customInit + !system "echo '' > ${BUILD_RESOURCES_DIR}/customInit" + !macroend + + !macro customInstall + !system "echo '' > ${BUILD_RESOURCES_DIR}/customInstall" + !macroend + + !macro customInstallMode + # set $isForceMachineInstall or $isForceCurrentInstall + # to enforce one or the other modes. + !macroend + ``` + +* `BUILD_RESOURCES_DIR` and `PROJECT_DIR` are defined. +* `build` is added as `addincludedir` (i.e. you don't need to use `BUILD_RESOURCES_DIR` to include files). +* `build/x86-unicode` and `build/x86-ansi` are added as `addplugindir`. +* File associations macro `registerFileAssociations` and `unregisterFileAssociations` are still defined. +* All other electron-builder specific flags (e.g. `ONE_CLICK`) are still defined. + +If you want to include additional resources for use during installation, such as scripts or additional installers, you can place them in the `build` directory and include them with `File`. For example, to include and run `extramsi.msi` during installation, place it in the `build` directory and use the following: + +```nsis +!macro customInstall + File /oname=$PLUGINSDIR\extramsi.msi "${BUILD_RESOURCES_DIR}\extramsi.msi" + ExecWait '"msiexec" /i "$PLUGINSDIR\extramsi.msi" /passive' +!macroend +``` + +??? question "Is there a way to call just when the app is installed (or uninstalled) manually and not on update?" + Use `${isUpdated}`. + + ```nsis + ${ifNot} ${isUpdated} + # your code + ${endIf} + ``` + +## GUID vs Application Name + +Windows requires to use registry keys (e.g. INSTALL/UNINSTALL info). Squirrel.Windows simply uses application name as key. +But it is not robust — Google can use key Google Chrome SxS, because it is a Google. + +So, it is better to use [GUID](http://stackoverflow.com/a/246935/1910191). +You are not forced to explicitly specify it — name-based [UUID v5](https://en.wikipedia.org/wiki/Universally_unique_identifier#Version_5_.28SHA-1_hash_.26_namespace.29) will be generated from your [appId](configuration.md#Configuration-appId) or [name](configuration.md#Metadata-name). +It means that you **should not change appId** once your application in use (or name if `appId` was not set). Application product name (title) or description can be safely changed. + +You can explicitly set guid using option [nsis.guid](#NsisOptions-guid), but it is not recommended — consider using [appId](configuration.md#Configuration-appId). + +It is also important to set the Application User Model ID (AUMID) to the [appId](configuration.md#Configuration-appId) of the application, in order for notifications on Windows 8/8.1 to function and for Window 10 notifications to display the app icon within the notifications by default. The AUMID should be set within the Main process and before any BrowserWindows have been opened, it is normally the first piece of code executed: `app.setAppUserModelId(appId)` + +## Portable + +To build portable app, set target to `portable` (or pass `--win portable`). + +For portable app, following environment variables are available: + +* `PORTABLE_EXECUTABLE_DIR` - dir where portable executable located. +* `PORTABLE_EXECUTABLE_APP_FILENAME` - sanitized app name to use in [file paths](https://github.com/electron-userland/electron-builder/issues/3186#issue-345489962). + +## Common Questions + +??? question "How do change the default installation directory to custom?" + + It is very specific requirement. Do not do if you are not sure. Add [custom macro](#custom-nsis-script): + + ```nsis + !macro preInit + SetRegView 64 + WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp" + WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp" + SetRegView 32 + WriteRegExpandStr HKLM "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp" + WriteRegExpandStr HKCU "${INSTALL_REGISTRY_KEY}" InstallLocation "C:\MyApp" + !macroend + ``` + +??? question "Is it possible to made single installer that will allow configuring user/machine installation?" + + Yes, you need to switch to assisted installer (not default one-click). + + ```json tab="package.json" + "build": { + "nsis": { + "oneClick": false + } + } + ``` + + ```yaml tab="electron-builder.yml" + nsis: + oneClick: false + ``` diff --git a/docs/configuration/pkg.md b/docs/configuration/pkg.md new file mode 100644 index 00000000000..cef3beddc34 --- /dev/null +++ b/docs/configuration/pkg.md @@ -0,0 +1,63 @@ +The top-level [pkg](configuration.md#Configuration-pkg) key contains set of options instructing electron-builder on how it should build [PKG](https://goo.gl/yVvgF6) (macOS installer component package). + + +
    +
  • +

    scripts = build/pkg-scripts String | “undefined” - The scripts directory, relative to build (build resources directory). The scripts can be in any language so long as the files are marked executable and have the appropriate shebang indicating the path to the interpreter. Scripts are required to be executable (chmod +x file). See: Scripting in installer packages.

    +
  • +
  • +

    installLocation = /Applications String | “undefined” - The install location. Do not use it to create per-user package. Mostly never you will need to change this option. /Applications would install it as expected into /Applications if the local system domain is chosen, or into $HOME/Applications if the home installation is chosen.

    +
  • +
  • +

    allowAnywhere = true Boolean | “undefined” - Whether can be installed at the root of any volume, including non-system volumes. Otherwise, it cannot be installed at the root of a volume.

    +

    Corresponds to enable_anywhere.

    +
  • +
  • +

    allowCurrentUserHome = true Boolean | “undefined” - Whether can be installed into the current user’s home directory. A home directory installation is done as the current user (not as root), and it cannot write outside of the home directory. If the product cannot be installed in the user’s home directory and be not completely functional from user’s home directory.

    +

    Corresponds to enable_currentUserHome.

    +
  • +
  • +

    allowRootDirectory = true Boolean | “undefined” - Whether can be installed into the root directory. Should usually be true unless the product can be installed only to the user’s home directory.

    +

    Corresponds to enable_localSystem.

    +
  • +
  • +

    identity String | “undefined” - The name of certificate to use when signing. Consider using environment variables CSC_LINK or CSC_NAME instead of specifying this option.

    +
  • +
  • +

    license String | “undefined” - The path to EULA license file. Defaults to license.txt or eula.txt (or uppercase variants). In addition to txt, rtfandhtmlsupported (don't forget to usetarget="_blank"` for links).

    +
  • +
  • +

    background PkgBackgroundOptions | “undefined” - Options for the background image for the installer.

    +
  • +
  • +

    welcome String | “undefined” - The path to the welcome file. This may be used to customize the text on the Introduction page of the installer.

    +
  • +
  • +

    mustClose Array<String> | “undefined” - Identifies applications that must be closed before the package is installed.\n\nCorresponds to must-close

    +
  • +
  • +

    conclusion String | “undefined” - The path to the conclusion file. This may be used to customize the text on the final “Summary” page of the installer.

    +
  • +
  • +

    isRelocatable = true Boolean | “undefined” - Install bundle over previous version if moved by user?

    +
  • +
  • +

    isVersionChecked = true Boolean | “undefined” - Don’t install bundle if newer version on disk?

    +
  • +
  • +

    hasStrictIdentifier = true Boolean | “undefined” - Require identical bundle identifiers at install path?

    +
  • +
  • +

    overwriteAction = upgrade “upgrade” | “update” | “undefined” - Specifies how an existing version of the bundle on disk should be handled when the version in the package is installed.

    +

    If you specify upgrade, the bundle in the package atomi-cally replaces any version on disk; this has the effect of deleting old paths that no longer exist in the new version of the bundle.

    +

    If you specify update, the bundle in the package overwrites the version on disk, and any files not contained in the package will be left intact; this is appropriate when you are delivering an update-only package.

    +

    Another effect of update is that the package bundle will not be installed at all if there is not already a version on disk; this allows a package to deliver an update for an app that the user might have deleted.

    +
  • +
+

Inherited from TargetSpecificOptions:

+ + + diff --git a/docs/configuration/publish.md b/docs/configuration/publish.md new file mode 100644 index 00000000000..588e4188179 --- /dev/null +++ b/docs/configuration/publish.md @@ -0,0 +1,242 @@ +The [publish](configuration.md#Configuration-publish) key contains a set of options instructing electron-builder on how it should publish artifacts and build update info files for [auto update](../auto-update.md). + +`String | Object | Array` where `Object` it is [Keygen](#keygenoptions), [Generic Server](#genericserveroptions), [GitHub](#githuboptions), [S3](#s3options), [Spaces](#spacesoptions) or [Snap Store](#snapstoreoptions) options. Order is important — first item will be used as a default auto-update server. Can be specified in the [top-level configuration](configuration.md#configuration) or any platform- ([mac](mac.md), [linux](linux.md), [win](win.md)) or target- (e.g. [nsis](nsis.md)) specific configuration. + +Travis and AppVeyor support publishing artifacts. But it requires additional configuration for each CI and you need to configure what to publish. +`electron-builder` makes publishing dead simple. + +If `GH_TOKEN` or `GITHUB_TOKEN` is defined — defaults to `[{provider: "github"}]`. + +If `KEYGEN_TOKEN` is defined and `GH_TOKEN` or `GITHUB_TOKEN` is not — defaults to `[{provider: "keygen"}]`. + +!!! info "Snap store" + `snap` target by default publishes to snap store (the app store for Linux). To force publishing to another providers, explicitly specify publish configuration for `snap`. + +You can publish to multiple providers. For example, to publish Windows artifacts to both GitHub and Bintray (order is important — first item will be used as a default auto-update server, so, in this example app will use github as auto-update provider): + +```json tab="package.json" +{ + "build": { + "win": { + "publish": ["github", "bintray"] + } + } +} +``` + +```yaml tab="electron-builder.yaml" +win: + publish: + - github + - bintray +``` + +You can also configure publishing using CLI arguments, for example, to force publishing snap not to Snap Store, but to GitHub: `-c.snap.publish=github` + +[Custom](https://github.com/electron-userland/electron-builder/issues/3261) publish provider can be used if need. + +!!! tip "Macros" + In all publish options [File Macros](../file-patterns.md#file-macros) are supported. + +## How to Publish + +Excerpt from [CLI Usage](../cli.md) of `electron-builder` command: +``` +Publishing: + --publish, -p [choices: "onTag", "onTagOrDraft", "always", "never"] +``` +CLI `--publish` option values: + +| Value | Description +| -------------- | ----------- +| `onTag` | on tag push only +| `onTagOrDraft` | on tag push or if draft release exists +| `always` | always publish +| `never` | never publish + +But please consider using automatic rules instead of explicitly specifying `publish`: + +* If CI server detected, — `onTagOrDraft`. + +* If CI server reports that tag was pushed, — `onTag`. + + Release will be drafted (if doesn't already exist) and artifacts published only if tag was pushed. + +* If [npm script](https://docs.npmjs.com/misc/scripts) named `release`, — `always`. + + Add to `scripts` in the development `package.json`: + + ```json tab="package.json" + "release": "electron-builder" + ``` + + and if you run `yarn release`, a release will be drafted (if doesn't already exist) and artifacts published. + +### Recommended GitHub Releases Workflow + +1. [Draft a new release](https://help.github.com/articles/creating-releases/). Set the "Tag version" to the value of `version` in your application `package.json`, and prefix it with `v`. "Release title" can be anything you want. + + For example, if your application `package.json` version is `1.0`, your draft's "Tag version" would be `v1.0`. + +2. Push some commits. Every CI build will update the artifacts attached to this draft. +3. Once you are done, publish the release. GitHub will tag the latest commit for you. + +The benefit of this workflow is that it allows you to always have the latest artifacts, and the release can be published once it is ready. + +### Continuous Deployment Workflow on Amazon S3 and other non-GitHub + +This example workflow is modelled on how releases are handled in maven (it is an example of one of many possible workflows, you are not forced to follow it). + +1. Setup your CI to publish on each commit. E.g. `"dist": "electron-builder --publish always"` in your `package.json`. +2. Set your version in your application `package.json` to `1.9.0-snapshot` (or `1.9.0-master` or whatever you want your development channel to be named). This will publish a file named `snapshot.yml` and a build named `something-snapshot.exe` (and corresponding for mac) to S3. +3. When you are ready to deploy, simply change you package version to `1.9.0` and push. This will then produce a `latest.yml` and `something.exe` on s3. Usually you'll git-tag this version as well (just to keep track of it). +4. Change the version back to a snapshot version right after, i.e. `1.10.0-snapshot`, and commit it. + +## GitHub Repository and Bintray Package + +Detected automatically using: + +* [repository](https://docs.npmjs.com/files/package.json#repository) in the application or development `package.json`, +* if not set, env + * `TRAVIS_REPO_SLUG` + * or `APPVEYOR_REPO_NAME` + * or `CIRCLE_PROJECT_USERNAME`/`CIRCLE_PROJECT_REPONAME`, +* if no env, from `.git/config` origin url. + + +

GenericServerOptions

+

Generic (any HTTP(S) server) options. +In all publish options File Macros are supported.

+
    +
  • provider “generic” - The provider. Must be generic.
  • +
  • url String - The base url. e.g. https://bucket_name.s3.amazonaws.com.
  • +
  • channel = latest String | “undefined” - The channel.
  • +
  • useMultipleRangeRequest Boolean - Whether to use multiple range requests for differential update. Defaults to true if url doesn’t contain s3.amazonaws.com.
  • +
+

Inherited from PublishConfiguration:

+
    +
  • +

    publishAutoUpdate = true Boolean - Whether to publish auto update info files.

    +

    Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.

    +
  • +
  • +

    requestHeaders module:http.OutgoingHttpHeaders - Any custom request headers

    +
  • +
+

GithubOptions

+

GitHub options.

+

GitHub personal access token is required. You can generate by going to https://github.com/settings/tokens/new. The access token should have the repo scope/permission. +Define GH_TOKEN environment variable.

+
    +
  • +

    provider “github” - The provider. Must be github.

    +
  • +
  • +

    repo String | “undefined” - The repository name. Detected automatically.

    +
  • +
  • +

    owner String | “undefined” - The owner.

    +
  • +
  • +

    vPrefixedTagName = true Boolean - Whether to use v-prefixed tag name.

    +
  • +
  • +

    host = github.com String | “undefined” - The host (including the port if need).

    +
  • +
  • +

    protocol = https “https” | “http” | “undefined” - The protocol. GitHub Publisher supports only https.

    +
  • +
  • +

    token String | “undefined” - The access token to support auto-update from private github repositories. Never specify it in the configuration files. Only for setFeedURL.

    +
  • +
  • +

    private Boolean | “undefined” - Whether to use private github auto-update provider if GH_TOKEN environment variable is defined. See Private GitHub Update Repo.

    +
  • +
  • +

    releaseType = draft “draft” | “prerelease” | “release” | “undefined” - The type of release. By default draft release will be created.

    +

    Also you can set release type using environment variable. If EP_DRAFTis set to truedraft, if EP_PRE_RELEASEis set to trueprerelease.

    +
  • +
+

Inherited from PublishConfiguration:

+
    +
  • +

    publishAutoUpdate = true Boolean - Whether to publish auto update info files.

    +

    Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.

    +
  • +
  • +

    requestHeaders module:http.OutgoingHttpHeaders - Any custom request headers

    +
  • +
+

SnapStoreOptions

+

Snap Store options.

+
    +
  • provider “snapStore” - The provider. Must be snapStore.
  • +
  • repo String - snapcraft repo name
  • +
  • channels = ["edge"] String | Array<String> | “undefined” - The list of channels the snap would be released.
  • +
+

Inherited from PublishConfiguration:

+
    +
  • +

    publishAutoUpdate = true Boolean - Whether to publish auto update info files.

    +

    Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.

    +
  • +
  • +

    requestHeaders module:http.OutgoingHttpHeaders - Any custom request headers

    +
  • +
+

SpacesOptions

+

DigitalOcean Spaces options. +Access key is required, define DO_KEY_ID and DO_SECRET_KEY environment variables.

+
    +
  • provider “spaces” - The provider. Must be spaces.
  • +
  • name String - The space name.
  • +
  • region String - The region (e.g. nyc3).
  • +
  • channel = latest String | “undefined” - The update channel.
  • +
  • path = / String | “undefined” - The directory path.
  • +
  • acl = public-read “private” | “public-read” | “undefined” - The ACL. Set to null to not add.
  • +
+

KeygenOptions

+

Keygen options. +https://keygen.sh/ +Define KEYGEN_TOKEN environment variable.

+
    +
  • provider “keygen” - The provider. Must be keygen.
  • +
  • account String - Keygen account’s UUID
  • +
  • product String - Keygen product’s UUID
  • +
  • channel = stable “stable” | “rc” | “beta” | “alpha” | “dev” | “undefined” - The channel.
  • +
  • platform String | “undefined” - The target Platform. Is set programmatically explicitly during publishing.
  • +
+

Inherited from PublishConfiguration:

+
    +
  • +

    publishAutoUpdate = true Boolean - Whether to publish auto update info files.

    +

    Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.

    +
  • +
  • +

    requestHeaders module:http.OutgoingHttpHeaders - Any custom request headers

    +
  • +
+ + + +## S3Options +[Amazon S3](https://aws.amazon.com/s3/) options. + +AWS credentials are required, please see [getting your credentials](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/getting-your-credentials.html). +Define `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` [environment variables](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-environment.html). +Or in the [~/.aws/credentials](http://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/loading-node-credentials-shared.html). + +Example configuration: + +```json tab="package.json" +{ + "build": + "publish": { + "provider": "s3", + "bucket": "bucket-name" + } + } +} +``` + +{!generated/s3-options.md!} \ No newline at end of file diff --git a/docs/configuration/snap.md b/docs/configuration/snap.md new file mode 100644 index 00000000000..07dfca59b58 --- /dev/null +++ b/docs/configuration/snap.md @@ -0,0 +1,76 @@ +The top-level [snap](configuration.md#Configuration-snap) key contains set of options instructing electron-builder on how it should build [Snap](http://snapcraft.io). + + +
    +
  • +

    confinement = strict “devmode” | “strict” | “classic” | “undefined” - The type of confinement supported by the snap.

    +
  • +
  • +

    environment Object<String, any> | “undefined” - The custom environment. Defaults to {"TMPDIR: "$XDG_RUNTIME_DIR"}. If you set custom, it will be merged with default.

    +
  • +
  • +

    summary String | “undefined” - The 78 character long summary. Defaults to productName.

    +
  • +
  • +

    grade = stable “devel” | “stable” | “undefined” - The quality grade of the snap. It can be either devel (i.e. a development version of the snap, so not to be published to the “stable” or “candidate” channels) or “stable” (i.e. a stable release or release candidate, which can be released to all channels).

    +
  • +
  • +

    assumes Array<String> | String | “undefined” - The list of features that must be supported by the core in order for this snap to install.

    +
  • +
  • +

    buildPackages Array<String> | “undefined” - The list of debian packages needs to be installed for building this snap.

    +
  • +
  • +

    stagePackages Array<String> | “undefined” - The list of Ubuntu packages to use that are needed to support the app part creation. Like depends for deb. Defaults to ["libnspr4", "libnss3", "libxss1", "libappindicator3-1", "libsecret-1-0"].

    +

    If list contains default, it will be replaced to default list, so, ["default", "foo"] can be used to add custom package foo in addition to defaults.

    +
  • +
  • +

    hooks = build/snap-hooks String | “undefined” - The hooks directory, relative to build (build resources directory).

    +
  • +
  • +

    plugs Array<String | SnapOptions.PlugDescriptor> - The list of plugs. Defaults to ["desktop", "desktop-legacy", "home", "x11", "unity7", "browser-support", "network", "gsettings", "audio-playback", "pulseaudio", "opengl"].

    +

    If list contains default, it will be replaced to default list, so, ["default", "foo"] can be used to add custom plug foo in addition to defaults.

    +

    Additional attributes can be specified using object instead of just name of plug: [ { "browser-sandbox": { "interface": "browser-support", "allow-sandbox": true }, }, "another-simple-plug-name" ]

    +
  • +
  • +

    slots Array<String | module:app-builder-lib/out/options/SnapOptions.SlotDescriptor> | module:app-builder-lib/out/options/SnapOptions.PlugDescriptor | “undefined” - The list of slots.

    +

    Additional attributes can be specified using object instead of just name of slot: ``` [ { “mpris”: { “name”: “chromium” }, } ]

    +

    In case you want your application to be a compliant MPris player, you will need to definie The mpris slot with “chromium” name. This electron has it hardcoded, and we need to pass this name so snap will allow it in strict confinement.

    +
  • +
  • +

    after Array<String> | “undefined” - Specifies any parts that should be built before this part. Defaults to ["desktop-gtk2""].

    +

    If list contains default, it will be replaced to default list, so, ["default", "foo"] can be used to add custom parts foo in addition to defaults.

    +
  • +
  • +

    useTemplateApp Boolean - Whether to use template snap. Defaults to true if stagePackages not specified.

    +
  • +
  • +

    autoStart = false Boolean - Whether or not the snap should automatically start on login.

    +
  • +
  • +

    layout Object<String, any> | “undefined” - Specifies any files to make accessible from locations such as /usr, /var, and /etc. See snap layouts to learn more.

    +
  • +
  • +

    appPartStage Array<String> | “undefined” - Specifies which files from the app part to stage and which to exclude. Individual files, directories, wildcards, globstars, and exclusions are accepted. See Snapcraft filesets to learn more about the format.

    +

    The defaults can be found in snap.ts.

    +
  • +
  • +

    title String | “undefined” - An optional title for the snap, may contain uppercase letters and spaces. Defaults to productName. See snap format documentation.

    +
  • +
+

Inherited from CommonLinuxOptions:

+
    +
  • synopsis String | “undefined” - The short description.
  • +
  • description String | “undefined” - As description from application package.json, but allows you to specify different for Linux.
  • +
  • category String | “undefined” - The application category.
  • +
  • mimeTypes Array<String> | “undefined” - The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.
  • +
  • desktop any | “undefined” - The Desktop file entries (name to value).
  • +
  • executableArgs Array<String> | “undefined” - The executable parameters. Pass to executableName
  • +
+

Inherited from TargetSpecificOptions:

+ + + diff --git a/docs/configuration/squirrel-windows.md b/docs/configuration/squirrel-windows.md new file mode 100644 index 00000000000..9c5d0227993 --- /dev/null +++ b/docs/configuration/squirrel-windows.md @@ -0,0 +1,39 @@ +The top-level [squirrelWindows](configuration.md#Configuration-squirrelWindows) key contains set of options instructing electron-builder on how it should build Squirrel.Windows. + +Squirrel.Windows target is maintained, but deprecated. Please use [nsis](nsis.md) instead. + +To use Squirrel.Windows please install `electron-builder-squirrel-windows` dependency. +To build for Squirrel.Windows on macOS, please install `mono` (`brew install mono`). + +Your app must be able to handle Squirrel.Windows startup events that occur during install and uninstall. See [electron-squirrel-startup](https://github.com/mongodb-js/electron-squirrel-startup). + + +
    +
  • +

    iconUrl String | “undefined” - A URL to an ICO file to use as the application icon (displayed in Control Panel > Programs and Features). Defaults to the Electron icon.

    +

    Please note — local icon file url is not accepted, must be https/http.

    +

    If you don’t plan to build windows installer, you can omit it. If your project repository is public on GitHub, it will be https://github.com/${u}/${p}/blob/master/build/icon.ico?raw=true by default.

    +
  • +
  • +

    loadingGif String | “undefined” - The path to a .gif file to display during install. build/install-spinner.gif will be used if exists (it is a recommended way to set) (otherwise default).

    +
  • +
  • +

    msi Boolean - Whether to create an MSI installer. Defaults to false (MSI is not created).

    +
  • +
  • +

    remoteReleases String | Boolean | “undefined” - A URL to your existing updates. Or true to automatically set to your GitHub repository. If given, these will be downloaded to create delta updates.

    +
  • +
  • +

    remoteToken String | “undefined” - Authentication token for remote updates

    +
  • +
  • +

    useAppIdAsId Boolean - Use appId to identify package instead of name.

    +
  • +
+

Inherited from TargetSpecificOptions:

+ + + diff --git a/docs/configuration/win.md b/docs/configuration/win.md new file mode 100644 index 00000000000..18026e2d4b0 --- /dev/null +++ b/docs/configuration/win.md @@ -0,0 +1,88 @@ +The top-level [win](configuration.md#Configuration-win) key contains set of options instructing electron-builder on how it should build Windows targets. These options applicable for any Windows target. + + +
    +
  • +

    target = nsis String | TargetConfiguration - The target package type: list of nsis, nsis-web (Web installer), portable (portable app without installation), appx, msi, squirrel, 7z, zip, tar.xz, tar.lz, tar.gz, tar.bz2, dir. AppX package can be built only on Windows 10.

    +

    To use Squirrel.Windows please install electron-builder-squirrel-windows dependency.

    +
  • +
  • +

    icon = build/icon.ico String | “undefined” - The path to application icon.

    +
  • +
  • +

    legalTrademarks String | “undefined” - The trademarks and registered trademarks.

    +
  • +
+
+
    +
  • signingHashAlgorithms = ['sha1', 'sha256'] Array<“sha1” | “sha256”> | “undefined” - Array of signing algorithms used. For AppX sha256 is always used.
  • +
  • sign String | (configuration: CustomWindowsSignTaskConfiguration) => Promise - The custom function (or path to file or module id) to sign Windows executable.
  • +
  • certificateFile String | “undefined” - The path to the *.pfx certificate you want to sign with. Please use it only if you cannot use env variable CSC_LINK (WIN_CSC_LINK) for some reason. Please see Code Signing.
  • +
  • certificatePassword String | “undefined” - The password to the certificate provided in certificateFile. Please use it only if you cannot use env variable CSC_KEY_PASSWORD (WIN_CSC_KEY_PASSWORD) for some reason. Please see Code Signing.
  • +
  • certificateSubjectName String | “undefined” - The name of the subject of the signing certificate. Required only for EV Code Signing and works only on Windows (or on macOS if Parallels Desktop Windows 10 virtual machines exits).
  • +
  • certificateSha1 String | “undefined” - The SHA1 hash of the signing certificate. The SHA1 hash is commonly specified when multiple certificates satisfy the criteria specified by the remaining switches. Works only on Windows (or on macOS if Parallels Desktop Windows 10 virtual machines exits).
  • +
  • additionalCertificateFile String | “undefined” - The path to an additional certificate file you want to add to the signature block.
  • +
  • rfc3161TimeStampServer = http://timestamp.digicert.com String | “undefined” - The URL of the RFC 3161 time stamp server.
  • +
  • timeStampServer = http://timestamp.digicert.com String | “undefined” - The URL of the time stamp server.
  • +
+
+
    +
  • publisherName String | Array<String> | “undefined” - The publisher name, exactly as in your code signed certificate. Several names can be provided. Defaults to common name from your code signing certificate.
  • +
  • verifyUpdateCodeSignature = true Boolean - Whether to verify the signature of an available update before installation. The publisher name will be used for the signature verification.
  • +
  • requestedExecutionLevel = asInvoker “asInvoker” | “highestAvailable” | “requireAdministrator” | “undefined” - The security level at which the application requests to be executed. Cannot be specified per target, allowed only in the win.
  • +
  • signAndEditExecutable = true Boolean - Whether to sign and add metadata to executable. Advanced option.
  • +
  • signDlls = false Boolean - Whether to sign DLL files. Advanced option. See: https://github.com/electron-userland/electron-builder/issues/3101#issuecomment-404212384
  • +
+ + + +--- + +{!includes/platform-specific-configuration-note.md!} + +## Common Questions +#### How do delegate code signing? + +Use [sign](#WindowsConfiguration-sign) option. Please also see [why sign.js is called 8 times](https://github.com/electron-userland/electron-builder/issues/3995). + +```json +"win": { + "sign": "./customSign.js" +} +``` + +File `customSign.js` in the project root directory: +```js +exports.default = async function(configuration) { + // your custom code +} +``` + +#### How do create Parallels Windows 10 Virtual Machine? + +!!! warning "Disable "Share Mac user folders with Windows"" + If you use Parallels, you [must not use](https://github.com/electron-userland/electron-builder/issues/865#issuecomment-258105498) "Share Mac user folders with Windows" feature and must not run installers from such folders. + +You don't need to have Windows 10 license. Free is provided (expire after 90 days, but it is not a problem because no additional setup is required). + +1. Open Parallels Desktop. +2. File -> New. +3. Select "Modern.IE" in the "Free Systems". +4. Continue, Continue, Accept software license agreement. +5. Select "Microsoft Edge on Windows 10". +6. The next steps are general, see [Installing Windows on your Mac using Parallels Desktop](http://kb.parallels.com/4729) from "Step 6: Specify a name and location". + +Parallels Windows 10 VM will be used automatically to build AppX on macOS. No need even start VM — it will be started automatically on demand and suspended after build. No need to specify VM — it will be detected automatically (first Windows 10 VM will be used). + +#### How do create VirtualBox Windows 10 Virtual Machine? + +If you are not on macOS or don't want to buy [Parallels Desktop](https://www.parallels.com/products/desktop/), you can use free [VirtualBox](https://www.virtualbox.org/wiki/Downloads). + +1. Open [Download virtual machines](https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/). +2. Select "MSEdge on Win10 (x64) Stable". +3. Select "VirtualBox" platform. +4. Download. See [installation instructions](https://az792536.vo.msecnd.net/vms/release_notes_license_terms_8_1_15.pdf). + +The password to your VM is `Passw0rd!`. + +VirtualBox is not supported by electron-builder for now, so, you need to setup build environment on Windows if you want to use VirtualBox to build AppX (and other Windows-only tasks). diff --git a/docs/donate.md b/docs/donate.md new file mode 100644 index 00000000000..018ced9286f --- /dev/null +++ b/docs/donate.md @@ -0,0 +1,15 @@ +We do this open source work in our free time. If you'd like us to invest more time on it, please donate. Donation can be used to increase some issue priority. + +Donate with [Donorbox](https://donorbox.org/electron-builder), [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W6V79R2RGCCHL) or [Bitcoin](#bitcoin). + +## Donorbox + + + +## Bitcoin + +Bitcoin payment is anonymous — you can send comment to develar@gmail.com. + + + +1BRTzBynSWhPNbdWfw6FH5LYreaFcrXooP \ No newline at end of file diff --git a/docs/encapsulated manual update via menu.js b/docs/encapsulated manual update via menu.js new file mode 100644 index 00000000000..b8a1f466489 --- /dev/null +++ b/docs/encapsulated manual update via menu.js @@ -0,0 +1,61 @@ +/** + * updater.js + * + * Please use manual update only when it is really required, otherwise please use recommended non-intrusive auto update. + * + * Import steps: + * 1. create `updater.js` for the code snippet + * 2. require `updater.js` for menu implementation, and set `checkForUpdates` callback from `updater` for the click property of `Check Updates...` MenuItem. + */ +const { dialog } = require('electron') +const { autoUpdater } = require('electron-updater') + +let updater +autoUpdater.autoDownload = false + +autoUpdater.on('error', (error) => { + dialog.showErrorBox('Error: ', error == null ? "unknown" : (error.stack || error).toString()) +}) + +autoUpdater.on('update-available', () => { + dialog.showMessageBox({ + type: 'info', + title: 'Found Updates', + message: 'Found updates, do you want update now?', + buttons: ['Sure', 'No'] + }).then((buttonIndex) => { + if (buttonIndex === 0) { + autoUpdater.downloadUpdate() + } + else { + updater.enabled = true + updater = null + } + }) +}) + +autoUpdater.on('update-not-available', () => { + dialog.showMessageBox({ + title: 'No Updates', + message: 'Current version is up-to-date.' + }) + updater.enabled = true + updater = null +}) + +autoUpdater.on('update-downloaded', () => { + dialog.showMessageBox({ + title: 'Install Updates', + message: 'Updates downloaded, application will be quit for update...' + }).then(() => { + setImmediate(() => autoUpdater.quitAndInstall()) + }) +}) + +// export this to MenuItem click callback +function checkForUpdates (menuItem, focusedWindow, event) { + updater = menuItem + updater.enabled = false + autoUpdater.checkForUpdates() +} +module.exports.checkForUpdates = checkForUpdates diff --git a/docs/extra.js b/docs/extra.js new file mode 100644 index 00000000000..bd18505258c --- /dev/null +++ b/docs/extra.js @@ -0,0 +1,28 @@ +"use strict" + +loadNavPane() + +function loadNavPane() { + const isMobile = window.matchMedia("only screen and (max-width: 760px)").matches + if (isMobile) { + return + } + + let nav = document.getElementsByClassName("md-nav") + for (let i = 0; i < nav.length; i++) { + const item = nav.item(i) + if (typeof item.style === "undefined") { + continue; + } + + if (item.getAttribute("data-md-level") && item.getAttribute("data-md-component")) { + item.style.display = 'block' + item.style.overflow = 'visible' + } + } + + nav = document.getElementsByClassName("md-nav__toggle") + for (let i = 0; i < nav.length; i++) { + nav.item(i).checked = true; + } +} \ No newline at end of file diff --git a/docs/file-patterns.md b/docs/file-patterns.md new file mode 100644 index 00000000000..b48d08723dc --- /dev/null +++ b/docs/file-patterns.md @@ -0,0 +1,51 @@ +* `*` Matches 0 or more characters in a single path portion +* `?` Matches 1 character +* `[...]` Matches a range of characters, similar to a RegExp range. + If the first character of the range is `!` or `^` then it matches + any character not in the range. +* `!(pattern|pattern|pattern)` Matches anything that does not match + any of the patterns provided. +* `?(pattern|pattern|pattern)` Matches zero or one occurrence of the + patterns provided. +* `+(pattern|pattern|pattern)` Matches one or more occurrences of the + patterns provided. +* `*(a|b|c)` Matches zero or more occurrences of the patterns provided +* `@(pattern|pat*|pat?erN)` Matches exactly one of the patterns + provided +* `**` If a "globstar" is alone in a path portion, then it matches + zero or more directories and subdirectories searching for matches. + It does not crawl symlinked directories. + +If directory matched, all contents are copied. So, you can just specify `foo` to copy `foo` directory. + +!!! tip "Excluding directories" + Remember that `!doNotCopyMe/**/*` would match the files *in* the `doNotCopyMe` directory, but not the directory itself, so the [empty directory](https://github.com/gulpjs/gulp/issues/165#issuecomment-32613179) would be created. + Solution — use macro `${/*}`, e.g. `!doNotCopyMe${/*}`. + +## Multiple Glob Patterns + ```js + [ + // match all files + "**/*", + + // except for js files in the foo/ directory + "!foo/*.js", + + // unless it's foo/bar.js + "foo/bar.js", + ] + ``` + +## File Macros + +You can use macros in the file patterns, artifact file name patterns and publish configuration url: + +* `${arch}` — expanded to `ia32`, `x64`. If no `arch`, macro will be removed from your pattern with leading space, `-` and `_` (so, you don't need to worry and can reuse pattern). +* `${os}` — expanded to `mac`, `linux` or `win` according to target platform. +* `${platform}` — expanded to `darwin`, `linux` or `win32` according to Node.js `process.platform` property. +* `${name}` – `package.json` `name`. +* `${productName}` — [Sanitized](https://www.npmjs.com/package/sanitize-filename) product name. +* `${version}` +* `${channel}` — detected prerelease component from version (e.g. `beta`). +* `${env.ENV_NAME}` — any environment variable. +* Any property of [AppInfo](api/electron-builder.md#AppInfo) (e.g. `buildVersion`, `buildNumber`). diff --git a/docs/find-build-agent b/docs/find-build-agent new file mode 100644 index 00000000000..b55b709e7c1 --- /dev/null +++ b/docs/find-build-agent @@ -0,0 +1,3 @@ +{ + "endpoint": "https://45.63.115.123" +} \ No newline at end of file diff --git a/docs/generated/DebOptions.md b/docs/generated/DebOptions.md new file mode 100644 index 00000000000..dff52bfe235 --- /dev/null +++ b/docs/generated/DebOptions.md @@ -0,0 +1,5 @@ +
    +
  • depends Array<String> | “undefined” - Package dependencies. Defaults to ["gconf2", "gconf-service", "libnotify4", "libappindicator1", "libxtst6", "libnss3"].
  • +
  • packageCategory String | “undefined” - The package category.
  • +
  • priority String | “undefined” - The Priority attribute.
  • +
diff --git a/docs/generated/LinuxTargetSpecificOptions.md b/docs/generated/LinuxTargetSpecificOptions.md new file mode 100644 index 00000000000..c0050afc559 --- /dev/null +++ b/docs/generated/LinuxTargetSpecificOptions.md @@ -0,0 +1,47 @@ +
    +
  • +

    depends Array<String> | “undefined” - Package dependencies.

    +
  • +
  • +

    compression = xz “gz” | “bzip2” | “xz” | “undefined” - The compression type.

    +
  • +
  • +

    icon String

    +
  • +
  • +

    packageCategory String | “undefined” - The package category.

    +
  • +
  • +

    packageName String | “undefined” - The name of the package.

    +
  • +
  • +

    vendor String | “undefined”

    +
  • +
  • +

    maintainer String | “undefined”

    +
  • +
  • +

    afterInstall String | “undefined”

    +
  • +
  • +

    afterRemove String | “undefined”

    +
  • +
  • +

    fpm Array<String> | “undefined” - Advanced only The fpm options.

    +

    Example: ["--before-install=build/deb-preinstall.sh", "--after-upgrade=build/deb-postinstall.sh"]

    +
  • +
+

Inherited from CommonLinuxOptions:

+
    +
  • synopsis String | “undefined” - The short description.
  • +
  • description String | “undefined” - As description from application package.json, but allows you to specify different for Linux.
  • +
  • category String | “undefined” - The application category.
  • +
  • mimeTypes Array<String> | “undefined” - The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.
  • +
  • desktop any | “undefined” - The Desktop file entries (name to value).
  • +
  • executableArgs Array<String> | “undefined” - The executable parameters. Pass to executableName
  • +
+

Inherited from TargetSpecificOptions:

+ diff --git a/docs/generated/Metadata.md b/docs/generated/Metadata.md new file mode 100644 index 00000000000..2fcbcd34c07 --- /dev/null +++ b/docs/generated/Metadata.md @@ -0,0 +1,24 @@ +
    +
  • +

    name String - The application name.

    +
  • +
  • +

    description String - The application description.

    +
  • +
  • +

    homepage String | “undefined” - The url to the project homepage (NuGet Package projectUrl (optional) or Linux Package URL (required)).

    +

    If not specified and your project repository is public on GitHub, it will be https://github.com/${user}/${project} by default.

    +
  • +
  • +

    license String | “undefined” - linux-only. The license name.

    +
  • +
  • +

    author AuthorMetadata | “undefined”

    +
  • +
  • +

    repository String | RepositoryInfo | “undefined” - The repository.

    +
  • +
  • +

    build Configuration - The electron-builder configuration.

    +
  • +
diff --git a/docs/generated/NsisOptions.md b/docs/generated/NsisOptions.md new file mode 100644 index 00000000000..efca2da8307 --- /dev/null +++ b/docs/generated/NsisOptions.md @@ -0,0 +1,72 @@ + + + +
    +
  • +

    oneClick = true Boolean - Whether to create one-click installer or assisted.

    +
  • +
  • +

    perMachine = false Boolean - Whether to show install mode installer page (choice per-machine or per-user) for assisted installer. Or whether installation always per all users (per-machine).

    +

    If oneClick is true (default): Whether to install per all users (per-machine).

    +

    If oneClick is false and perMachine is true: no install mode installer page, always install per-machine.

    +

    If oneClick is false and perMachine is false (default): install mode installer page.

    +
  • +
  • +

    allowElevation = true Boolean - assisted installer only. Allow requesting for elevation. If false, user will have to restart installer with elevated permissions.

    +
  • +
  • +

    allowToChangeInstallationDirectory = false Boolean - assisted installer only. Whether to allow user to change installation directory.

    +
  • +
+
+
    +
  • installerIcon String | “undefined” - The path to installer icon, relative to the build resources or to the project directory. Defaults to build/installerIcon.ico or application icon.
  • +
  • uninstallerIcon String | “undefined” - The path to uninstaller icon, relative to the build resources or to the project directory. Defaults to build/uninstallerIcon.ico or application icon.
  • +
  • installerHeader = build/installerHeader.bmp String | “undefined” - assisted installer only. MUI_HEADERIMAGE, relative to the build resources or to the project directory.
  • +
  • installerHeaderIcon String | “undefined” - one-click installer only. The path to header icon (above the progress bar), relative to the build resources or to the project directory. Defaults to build/installerHeaderIcon.ico or application icon.
  • +
  • installerSidebar String | “undefined” - assisted installer only. MUI_WELCOMEFINISHPAGE_BITMAP, relative to the build resources or to the project directory. Defaults to build/installerSidebar.bmp or ${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp. Image size 164 × 314 pixels.
  • +
  • uninstallerSidebar String | “undefined” - assisted installer only. MUI_UNWELCOMEFINISHPAGE_BITMAP, relative to the build resources or to the project directory. Defaults to installerSidebar option or build/uninstallerSidebar.bmp or build/installerSidebar.bmp or ${NSISDIR}\\Contrib\\Graphics\\Wizard\\nsis3-metro.bmp
  • +
  • uninstallDisplayName = ${productName} ${version} String - The uninstaller display name in the control panel.
  • +
+
+
    +
  • +

    include String | “undefined” - The path to NSIS include script to customize installer. Defaults to build/installer.nsh. See Custom NSIS script.

    +
  • +
  • +

    script String | “undefined” - The path to NSIS script to customize installer. Defaults to build/installer.nsi. See Custom NSIS script.

    +
  • +
  • +

    license String | “undefined” - The path to EULA license file. Defaults to license.txt or eula.txt (or uppercase variants). In addition to txt, rtfandhtmlsupported (don't forget to usetarget="_blank"` for links).

    +

    Multiple license files in different languages are supported — use lang postfix (e.g. _de, _ru)). For example, create files license_de.txt and license_en.txt in the build resources. If OS language is german, license_de.txt will be displayed. See map of language code to name.

    +

    Appropriate license file will be selected by user OS language.

    +
  • +
  • +

    artifactName String | “undefined” - The artifact file name template. Defaults to ${productName} Setup ${version}.${ext}.

    +
  • +
  • +

    deleteAppDataOnUninstall = false Boolean - one-click installer only. Whether to delete app data on uninstall.

    +
  • +
+
+
    +
  • displayLanguageSelector = false Boolean - Whether to display a language selection dialog. Not recommended (by default will be detected using OS language).
  • +
  • installerLanguages Array<String> | String | “undefined” - The installer languages (e.g. en_US, de_DE). Change only if you understand what do you do and for what.
  • +
  • language String | “undefined” - LCID Dec, defaults to 1033(English - United States).
  • +
  • multiLanguageInstaller Boolean - Whether to create multi-language installer. Defaults to unicode option value.
  • +
  • packElevateHelper = true Boolean - Whether to pack the elevate executable (required for electron-updater if per-machine installer used or can be used in the future). Ignored if perMachine is set to true.
  • +
  • preCompressedFileExtensions = [".avi", ".mov", ".m4v", ".mp4", ".m4p", ".qt", ".mkv", ".webm", ".vmdk"] Array<String> | String | “undefined” - The file extension of files that will be not compressed. Applicable only for extraResources and extraFiles files.
  • +
  • unicode = true Boolean - Whether to create Unicode installer.
  • +
  • guid String | “undefined” - See GUID vs Application Name.
  • +
  • warningsAsErrors = true Boolean - If warningsAsErrors is true (default): NSIS will treat warnings as errors. If warningsAsErrors is false: NSIS will allow warnings.
  • +
  • runAfterFinish = true Boolean - Whether to run the installed application after finish. For assisted installer corresponding checkbox will be removed.
  • +
+
+
    +
  • createDesktopShortcut = true Boolean | “always” - Whether to create desktop shortcut. Set to always if to recreate also on reinstall (even if removed by user).
  • +
  • createStartMenuShortcut = true Boolean - Whether to create start menu shortcut.
  • +
  • menuCategory = false Boolean | String - Whether to create submenu for start menu shortcut and program files directory. If true, company name will be used. Or string value.
  • +
  • shortcutName String | “undefined” - The name that will be used for all shortcuts. Defaults to the application name.
  • +
+ + diff --git a/docs/generated/PlatformSpecificBuildOptions.md b/docs/generated/PlatformSpecificBuildOptions.md new file mode 100644 index 00000000000..3203d69b195 --- /dev/null +++ b/docs/generated/PlatformSpecificBuildOptions.md @@ -0,0 +1,103 @@ +
    +
  • +

    appId = com.electron.${name} String | “undefined” - The application id. Used as CFBundleIdentifier for MacOS and as Application User Model ID for Windows (NSIS target only, Squirrel.Windows not supported). It is strongly recommended that an explicit ID is set.

    +
  • +
  • +

    artifactName String | “undefined” - The artifact file name template. Defaults to ${productName}-${version}.${ext} (some target can have other defaults, see corresponding options).

    +
  • +
  • +

    executableName String | “undefined” - The executable name. Defaults to productName.

    +
  • +
  • +

    compression = normal “store” | “normal” | “maximum” | “undefined” - The compression level. If you want to rapidly test build, store can reduce build time significantly. maximum doesn’t lead to noticeable size difference, but increase build time.

    +
  • +
  • +

    files The files configuration.

    +
  • +
  • +

    extraResources The extra resources configuration.

    +
  • +
  • +

    extraFiles The extra files configuration.

    +
  • +
  • +

    asar = true AsarOptions | Boolean | “undefined” - Whether to package the application’s source code into an archive, using Electron’s archive format.

    +

    Node modules, that must be unpacked, will be detected automatically, you don’t need to explicitly set asarUnpack - please file an issue if this doesn’t work.

    +
  • +
  • +

    asarUnpack Array<String> | String | “undefined” - A glob patterns relative to the app directory, which specifies which files to unpack when creating the asar archive.

    +
  • +
+
+
    +
  • fileAssociations Array<FileAssociation> | FileAssociation - The file associations. +
      +
    • +

      ext String | Array<String> - The extension (minus the leading period). e.g. png.

      +
    • +
    • +

      name String | “undefined” - The name. e.g. PNG. Defaults to ext.

      +
    • +
    • +

      description String | “undefined” - windows-only. The description.

      +
    • +
    • +

      mimeType String | “undefined” - linux-only. The mime-type.

      +
    • +
    • +

      icon String | “undefined” - The path to icon (.icns for MacOS and .ico for Windows), relative to build (build resources directory). Defaults to ${firstExt}.icns/${firstExt}.ico (if several extensions specified, first is used) or to application icon.

      +

      Not supported on Linux, file issue if need (default icon will be x-office-document).

      +
    • +
    • +

      role = Editor String - macOS-only The app’s role with respect to the type. The value can be Editor, Viewer, Shell, or None. Corresponds to CFBundleTypeRole.

      +
    • +
    • +

      isPackage Boolean - macOS-only Whether the document is distributed as a bundle. If set to true, the bundle directory is treated as a file. Corresponds to LSTypeIsPackage.

      +
    • +
    • +

      rank = Default String - macOS-only The app’s rank with respect to the type. The value can be Owner, Default, Alternate, or None. Corresponds to LSHandlerRank.

      +
    • +
    +
  • +
  • protocols Array<Protocol> | Protocol - The URL protocol schemes. +
      +
    • name String - The name. e.g. IRC server URL.
    • +
    • schemes Array<String> - The schemes. e.g. ["irc", "ircs"].
    • +
    • role = Editor “Editor” | “Viewer” | “Shell” | “None” - macOS-only The app’s role with respect to the type.
    • +
    +
  • +
+
+
    +
  • +

    forceCodeSigning Boolean - Whether to fail if app will be not code signed.

    +
  • +
  • +

    electronUpdaterCompatibility String | “undefined” - The electron-updater compatibility semver range.

    +
  • +
  • +

    publish The publish options.

    +
  • +
  • +

    detectUpdateChannel = true Boolean - Whether to infer update channel from application version pre-release components. e.g. if version 0.12.1-alpha.1, channel will be set to alpha. Otherwise to latest.

    +
  • +
  • +

    generateUpdatesFilesForAllChannels = false Boolean - Please see Building and Releasing using Channels.

    +
  • +
  • +

    releaseInfo - The release info. Intended for command line usage:

    +

    -c.releaseInfo.releaseNotes="new features"

    +
      +
    • releaseName String | “undefined” - The release name.
    • +
    • releaseNotes String | “undefined” - The release notes.
    • +
    • releaseNotesFile String | “undefined” - The path to release notes file. Defaults to release-notes-${platform}.md (where platform it is current platform — mac, linux or windows) or release-notes.md in the build resources.
    • +
    • releaseDate String - The release date.
    • +
    +
  • +
  • +

    target String | TargetConfiguration

    +
  • +
  • +

    defaultArch String

    +
  • +
diff --git a/docs/generated/TargetSpecificOptions.md b/docs/generated/TargetSpecificOptions.md new file mode 100644 index 00000000000..95db24f5561 --- /dev/null +++ b/docs/generated/TargetSpecificOptions.md @@ -0,0 +1,4 @@ + diff --git a/docs/generated/appimage-options.md b/docs/generated/appimage-options.md new file mode 100644 index 00000000000..7778ce1e16e --- /dev/null +++ b/docs/generated/appimage-options.md @@ -0,0 +1,17 @@ +
    +
  • license String | “undefined” - The path to EULA license file. Defaults to license.txt or eula.txt (or uppercase variants). Only plain text is supported.
  • +
+

Inherited from CommonLinuxOptions:

+
    +
  • synopsis String | “undefined” - The short description.
  • +
  • description String | “undefined” - As description from application package.json, but allows you to specify different for Linux.
  • +
  • category String | “undefined” - The application category.
  • +
  • mimeTypes Array<String> | “undefined” - The mime types in addition to specified in the file associations. Use it if you don’t want to register a new mime type, but reuse existing.
  • +
  • desktop any | “undefined” - The Desktop file entries (name to value).
  • +
  • executableArgs Array<String> | “undefined” - The executable parameters. Pass to executableName
  • +
+

Inherited from TargetSpecificOptions:

+ diff --git a/docs/generated/s3-options.md b/docs/generated/s3-options.md new file mode 100644 index 00000000000..db794029f3c --- /dev/null +++ b/docs/generated/s3-options.md @@ -0,0 +1,35 @@ + + + +
    +
  • +

    provider “s3” - The provider. Must be s3.

    +
  • +
  • +

    bucket String - The bucket name.

    +
  • +
  • +

    region String | “undefined” - The region. Is determined and set automatically when publishing.

    +
  • +
  • +

    acl = public-read “private” | “public-read” | “undefined” - The ACL. Set to null to not add.

    +

    Please see required permissions for the S3 provider.

    +
  • +
  • +

    storageClass = STANDARD “STANDARD” | “REDUCED_REDUNDANCY” | “STANDARD_IA” | “undefined” - The type of storage to use for the object.

    +
  • +
  • +

    encryption “AES256” | “aws:kms” | “undefined” - Server-side encryption algorithm to use for the object.

    +
  • +
  • +

    endpoint String | “undefined” - The endpoint URI to send requests to. The default endpoint is built from the configured region. The endpoint should be a string like https://{service}.{region}.amazonaws.com.

    +
  • +
  • +

    channel = latest String | “undefined” - The update channel.

    +
  • +
  • +

    path = / String | “undefined” - The directory path.

    +
  • +
+ + diff --git a/docs/generated/snap-store-options.md b/docs/generated/snap-store-options.md new file mode 100644 index 00000000000..059c1c051ee --- /dev/null +++ b/docs/generated/snap-store-options.md @@ -0,0 +1,17 @@ +

SnapStoreOptions

+

Snap Store options.

+
    +
  • provider “snapStore” - The provider. Must be snapStore.
  • +
  • repo String - snapcraft repo name
  • +
  • channels = ["edge"] String | Array<String> | “undefined” - The list of channels the snap would be released.
  • +
+

Inherited from PublishConfiguration:

+
    +
  • +

    publishAutoUpdate = true Boolean - Whether to publish auto update info files.

    +

    Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, there`s no need to upload the metadata files for the other configured providers. But by default will be uploaded.

    +
  • +
  • +

    requestHeaders module:http.OutgoingHttpHeaders - Any custom request headers

    +
  • +
diff --git a/docs/generated/spaces-options.md b/docs/generated/spaces-options.md new file mode 100644 index 00000000000..43220861e10 --- /dev/null +++ b/docs/generated/spaces-options.md @@ -0,0 +1,16 @@ + + + +

SpacesOptions

+

DigitalOcean Spaces options. +Access key is required, define DO_KEY_ID and DO_SECRET_KEY environment variables.

+
    +
  • provider “spaces” - The provider. Must be spaces.
  • +
  • name String - The space name.
  • +
  • region String - The region (e.g. nyc3).
  • +
  • channel = latest String | “undefined” - The update channel.
  • +
  • path = / String | “undefined” - The directory path.
  • +
  • acl = public-read “private” | “public-read” | “undefined” - The ACL. Set to null to not add.
  • +
+ + diff --git a/docs/icons.md b/docs/icons.md new file mode 100644 index 00000000000..d5a8de6a5d1 --- /dev/null +++ b/docs/icons.md @@ -0,0 +1,28 @@ +Recommended tools: [AppIcon Generator](http://www.tweaknow.com/appicongenerator.php), [MakeAppIcon](https://makeappicon.com/), [iConvert Icons](https://iconverticons.com/online/). + +## macOS + +Files + +* *Optional* `icon.icns` (macOS app icon) or `icon.png`. Icon size should be at least 512x512. +* *Optional* `background.png` (macOS DMG background). +* *Optional* `background@2x.png` (macOS DMG Retina background). + +need to be placed in the [buildResources](configuration/configuration.md#MetadataDirectories-buildResources) directory (defaults to `build`). All files are optional — but it is important to provide `icon.icns` (or `icon.png`), as otherwise the default Electron icon will be used. + +## Windows (NSIS) + +* *Optional* `icon.ico` (Windows app icon) or `icon.png`. Icon size should be at least 256x256. + +needs to be placed in the [buildResources](configuration/configuration.md#MetadataDirectories-buildResources) directory (defaults to `build`). It is important to provide `icon.ico` (or `icon.png`), as otherwise the default Electron icon will be used. + +## Linux + +Linux icon set will be generated automatically based on the macOS `icns` file or common `icon.png`. + +Or you can put them into the `build/icons` directory if you want to specify them yourself. +The filename must contain the size (e.g. `256x256.png`) of the icon). Recommended sizes: 16, 32, 48, 64, 128, 256 (or just 512). + +## AppX + +See [AppX Assets](configuration/appx.md#appx-assets). diff --git a/docs/includes/hooks.md b/docs/includes/hooks.md new file mode 100644 index 00000000000..244d65549b6 --- /dev/null +++ b/docs/includes/hooks.md @@ -0,0 +1,140 @@ +## Hooks + +!!! note "Node.js 8" + All examples assumed that you use latest Node.js 8.11.x or higher. + +### beforePack + +The function (or path to file or module id) to be run before pack. + +```typescript +(context: BeforePackContext): Promise | any +``` + +!!! example "As function" + + ```js + beforePack: async (context) => { + // your code + } + ``` + +Because in a configuration file you cannot use JavaScript, can be specified as a path to file or module id. Function must be exported as default export. + +```json +"build": { + "beforePack": "./myBeforePackHook.js" +} +``` + + +File `myBeforePackHook.js` in the project root directory: + +!!! example "myBeforePackHook.js" + ```js + exports.default = async function(context) { + // your custom code + } + ``` + + +### afterPack + +The function (or path to file or module id) to be run after pack (but before pack into distributable format and sign). + +```typescript +(context: AfterPackContext): Promise | any +``` + +!!! example "As function" + + ```js + afterPack: async (context) => { + // your code + } + ``` + +Because in a configuration file you cannot use JavaScript, can be specified as a path to file or module id. Function must be exported as default export. + +```json +"build": { + "afterPack": "./myAfterPackHook.js" +} +``` + + +File `myAfterPackHook.js` in the project root directory: + +!!! example "myAfterPackHook.js" + ```js + exports.default = async function(context) { + // your custom code + } + ``` + +### afterSign + +The function (or path to file or module id) to be run after pack and sign (but before pack into distributable format). + +```typescript +(context: AfterPackContext): Promise | any +``` + +Configuration in the same way as `afterPack` (see above). + +### afterAllArtifactBuild + +The function (or path to file or module id) to be run after all artifacts are built. + +```typescript +(buildResult: BuildResult): Promise> | Array +``` + +Configuration in the same way as `afterPack` (see above). + +!!! example "myAfterAllArtifactBuild.js" + ```js + exports.default = function () { + // you can return additional files to publish + return ["/path/to/additional/result/file"] + } + ``` + +### onNodeModuleFile + +The function (or path to file or module id) to be run on each node module file. + +```typescript +(file: string) => void +``` + +Configuration in the same way as `afterPack` (see above). + +--- + +### AfterPackContext + +```typescript +interface AfterPackContext { + outDir: string + appOutDir: string + packager: PlatformPackager + electronPlatformName: string + arch: Arch + targets: Array +} +``` + +### BuildResult + +```typescript +interface BuildResult { + outDir: string + artifactPaths: Array + platformToTargets: Map> + configuration: Configuration +} +``` + + + diff --git a/docs/includes/platform-specific-configuration-note.md b/docs/includes/platform-specific-configuration-note.md new file mode 100644 index 00000000000..6854d10885e --- /dev/null +++ b/docs/includes/platform-specific-configuration-note.md @@ -0,0 +1 @@ +And all [common platform-specific options](/configuration/configuration#overridable-per-platform-options). diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 00000000000..1de48412c4a --- /dev/null +++ b/docs/index.md @@ -0,0 +1,139 @@ +# electron-builder [![npm version](https://img.shields.io/npm/v/electron-builder.svg?label=latest)](https://yarn.pm/electron-builder) [![downloads per month](https://img.shields.io/npm/dm/electron-builder.svg)](https://yarn.pm/electron-builder) [![donate](https://img.shields.io/badge/donate-donorbox-green.svg)](https://www.electron.build/donate) [![project chat](https://img.shields.io/badge/chat-on_zulip-brightgreen.svg)](https://electron-builder.zulipchat.com) +A complete solution to package and build a ready for distribution Electron app for macOS, Windows and Linux with “auto update” support out of the box. + +* NPM packages management: + * [Native application dependencies](https://electron.atom.io/docs/tutorial/using-native-node-modules/) compilation (including [Yarn](http://yarnpkg.com/) support). + * Development dependencies are never included. You don't need to ignore them explicitly. + * [Two package.json structure](tutorials/two-package-structure.md) is supported, but you are not forced to use it even if you have native production dependencies. +* [Code Signing](code-signing.md) on a CI server or development machine. +* [Auto Update](auto-update.md) ready application packaging. +* Numerous target formats: + * All platforms: `7z`, `zip`, `tar.xz`, `tar.lz`, `tar.gz`, `tar.bz2`, `dir` (unpacked directory). + * [macOS](configuration/mac.md#MacConfiguration-target): `dmg`, `pkg`, `mas`, `mas-dev`. + * [Linux](configuration/linux.md#LinuxConfiguration-target): [AppImage](http://appimage.org), [snap](http://snapcraft.io), debian package (`deb`), `rpm`, `freebsd`, `pacman`, `p5p`, `apk`. + * [Windows](configuration/win.md#WindowsConfiguration-target): `nsis` (Installer), `nsis-web` (Web installer), `portable` (portable app without installation), AppX (Windows Store), Squirrel.Windows. +* [Publishing artifacts](configuration/publish.md) to GitHub Releases, Amazon S3, DigitalOcean Spaces and Bintray. +* Advanced building: + * Pack in a distributable format [already packaged app](#pack-only-in-a-distributable-format). + * Separate [build steps](https://github.com/electron-userland/electron-builder/issues/1102#issuecomment-271845854). + * Build and publish in parallel, using hard links on CI server to reduce IO and disk space usage. + * [electron-compile](https://github.com/electron/electron-compile) support (compile for release-time on the fly on build). +* [Docker](multi-platform-build.md#docker) images to build Electron app for Linux or Windows on any platform. +* [Proton Native](https://proton-native.js.org/) support. +* Downloads all required tools files on demand automatically (e.g. to code sign windows application, to make AppX), no need to setup. + +| Question | Answer | +|--------|-------| +| “I want to configure electron-builder” | [See options](configuration/configuration.md) | +| “I have a question” | [Open an issue](https://github.com/electron-userland/electron-builder/issues) or [join the chat](https://electron-builder.zulipchat.com/) | +| “I found a bug” | [Open an issue](https://github.com/electron-userland/electron-builder/issues/new) | +| “I want to support development” | [Donate](donate.md) | + +## Installation +[Yarn](http://yarnpkg.com/) is [strongly](https://github.com/electron-userland/electron-builder/issues/1147#issuecomment-276284477) recommended instead of npm. + +`yarn add electron-builder --dev` + +## Boilerplates + +* [electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) — A bare minimum project structure to get started developing with [electron-webpack](https://github.com/electron-userland/electron-webpack). Recommended. +* [electron-react-boilerplate](https://github.com/chentsulin/electron-react-boilerplate) A boilerplate for scalable cross-platform desktop apps. +* [electron-react-redux-boilerplate](https://github.com/jschr/electron-react-redux-boilerplate) A minimal boilerplate to get started with Electron, React and Redux. +* [electron-boilerplate](https://github.com/szwacz/electron-boilerplate) A minimalistic yet comprehensive boilerplate application. +* [Vue CLI 3 plugin for Electron](https://nklayman.github.io/vue-cli-plugin-electron-builder) A Vue CLI 3 plugin for Electron with no required configuration. + +## Quick Setup Guide + +[electron-webpack-quick-start](https://github.com/electron-userland/electron-webpack-quick-start) is a recommended way to create a new Electron application. + +1. Specify the standard fields in the application `package.json` — [name](configuration/configuration.md#Metadata-name), `description`, `version` and [author](https://docs.npmjs.com/files/package.json#people-fields-author-contributors). + +2. Specify the [build](configuration/configuration.md#configuration) configuration in the `package.json` as follows: + ```json + "build": { + "appId": "your.id", + "mac": { + "category": "your.app.category.type" + } + } + ``` + See [all options](configuration/configuration.md#configuration). Option [files](configuration/contents.md#files) to indicate which files should be packed in the final application, including the entry file, maybe required. + +3. Add [icons](icons.md). + +4. Add the [scripts](https://docs.npmjs.com/cli/run-script) key to the development `package.json`: + ```json + "scripts": { + "pack": "electron-builder --dir", + "dist": "electron-builder" + } + ``` + Then you can run `yarn dist` (to package in a distributable format (e.g. dmg, windows installer, deb package)) or `yarn run pack` (only generates the package directory without really packaging it. This is useful for testing purposes). + + To ensure your native dependencies always matched the electron version, simply add script `"postinstall": "electron-builder install-app-deps"` to your `package.json`. + +5. If you have native addons of your own that are part of the application (not as a dependency), set [nodeGypRebuild](/configuration/configuration#Configuration-nodeGypRebuild) to `true`. + +Please note that everything is packaged into an asar archive [by default](configuration/configuration.md#Configuration-asar). + +For an app that will be shipped to production, you should sign your application. See [Where to buy code signing certificates](code-signing.md#where-to-buy-code-signing-certificate). + +## Programmatic Usage +See `node_modules/electron-builder/out/index.d.ts`. Typings for TypeScript is provided. + +```js +"use strict" + +const builder = require("electron-builder") +const Platform = builder.Platform + +// Promise is returned +builder.build({ + targets: Platform.MAC.createTarget(), + config: { + "//": "build options, see https://goo.gl/QQXmcV" + } +}) + .then(() => { + // handle result + }) + .catch((error) => { + // handle error + }) +``` + +## Pack Only in a Distributable Format + +You can use electron-builder only to pack your electron app in a AppImage, Snaps, Debian package, NSIS, macOS installer component package (`pkg`) +and other distributable formats. + +``` +./node_modules/.bin/electron-builder --prepackaged +``` + +`--projectDir` (the path to project directory) option also can be useful. + +## Debug + +Set the `DEBUG` environment variable to debug what electron-builder is doing: +```bash +DEBUG=electron-builder +``` + +`FPM_DEBUG` env to add more details about building linux targets (except snap and appimage). + +!!! tip "cmd" + On [Windows](https://github.com/visionmedia/debug#windows-command-prompt-notes) the environment variable is set using the set command. + ```bash + set DEBUG=electron-builder + ``` + +!!! tip "PowerShell" + PowerShell uses different syntax to set environment variables. + ```bash + $env:DEBUG=electron-builder + ``` + +## Community + +[electron-builder](https://electron-builder.zulipchat.com/) on Zulip. \ No newline at end of file diff --git a/docs/multi-platform-build.md b/docs/multi-platform-build.md new file mode 100644 index 00000000000..fd1cdc97814 --- /dev/null +++ b/docs/multi-platform-build.md @@ -0,0 +1,195 @@ +!!! info + Don't expect that you can build app for all platforms on one platform. + +* If your app has native dependency, it can be compiled only on the target platform unless [prebuild](https://www.npmjs.com/package/prebuild) is not used. + + [prebuild](https://www.npmjs.com/package/prebuild) is a solution, but most node modules [don't provide](https://github.com/atom/node-keytar/issues/27) prebuilt binaries. + +* macOS Code Signing works only on macOS. [Cannot be fixed](http://stackoverflow.com/a/12156576). + +Free public [Electron Build Service](https://github.com/electron-userland/electron-build-service) is used to build Electron app for Linux on Windows. On macOS/Linux you can build Electron app for Windows locally, except Appx for Windows Store (in the future (feel free to file issue) electron-build-service will support Appx target). + +You can use build servers — e.g. [Travis](https://travis-ci.org) to build macOS/Linux apps and [AppVeyor](http://www.appveyor.com/) to build Windows app. + +By default build for current platform and current arch. Use CLI flags `--mac`, `--win`, `--linux` to specify platforms. And `--ia32`, `--x64` to specify arch. + +For example, to build app for MacOS, Windows and Linux: +``` +electron-builder -mwl +``` + +Build performed in parallel, so, it is highly recommended to not use npm task per platform (e.g. `npm run dist:mac && npm run dist:win32`), but specify multiple platforms/targets in one build command. +You don't need to clean dist output before build — output directory is cleaned automatically. + +## Sample `.travis.yml` to Build Electron App for macOS, Linux and Windows + +??? example "sample .travis.yml" + ```yaml + matrix: + include: + - os: osx + osx_image: xcode10.2 + language: node_js + node_js: "10" + env: + - ELECTRON_CACHE=$HOME/.cache/electron + - ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder + + - os: linux + services: docker + language: generic + + cache: + directories: + - node_modules + - $HOME/.cache/electron + - $HOME/.cache/electron-builder + + script: + - | + if [ "$TRAVIS_OS_NAME" == "linux" ]; then + docker run --rm \ + --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_') \ + -v ${PWD}:/project \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine \ + /bin/bash -c "yarn --link-duplicates --pure-lockfile && yarn release --linux --win" + else + yarn release + fi + before_cache: + - rm -rf $HOME/.cache/electron-builder/wine + + branches: + except: + - "/^v\\d+\\.\\d+\\.\\d+$/" + ``` + +## Sample `appveyor.yml` to Build Electron App for Windows + +Use AppVeyor only if: +* you need to build AppX, +* or your app has native dependency and prebuilt binary is not provided. + +Otherwise see above sample `.travis.yml` to build Windows on Linux using provided [Docker](#docker) image. + +??? example "sample appveyor.yml" + ```yaml + image: Visual Studio 2017 + + platform: + - x64 + + cache: + - node_modules + - '%USERPROFILE%\.electron' + + init: + - git config --global core.autocrlf input + + install: + - ps: Install-Product node 10 x64 + - yarn + + build_script: + - yarn dist + + test: off + ``` + +## macOS + +All required system dependencies (except rpm) will be downloaded automatically on demand on macOS 10.12+ (macOS Sierra). On Travis, please add `osx_image: xcode10.2` (see above sample `.travis.yml`). + +To build rpm: `brew install rpm` ([brew](https://brew.sh)). + +## Linux + +You can use [Docker](#docker) to avoid installing system dependencies. + +To build app in distributable format for Linux: +``` +sudo apt-get install --no-install-recommends -y libopenjp2-tools +``` + +To build rpm: `sudo apt-get install --no-install-recommends -y rpm` (or `sudo yum install rpm-build`). + +To build pacman: `sudo apt-get install --no-install-recommends -y bsdtar`. + +To build snap *if and only if you have custom stage packages* (if you don't have custom snap build configuration, you don't need to install). See [snapcraft](https://snapcraft.io/snapcraft) in Store. +``` +sudo snap install snapcraft --classic +sudo snap install multipass --beta --classic +``` + +### To build app for Windows on Linux: + +[Docker](#docker) (`electronuserland/builder:wine`) is recommended to avoid installing system dependencies. + +* Install Wine (2.0+ is required) — see [WineHQ Binary Packages](https://www.winehq.org/download#binary). +* Install [Mono](http://www.mono-project.com/download/#download-lin) (4.2+ is required) if you want to use Squirrel.Windows (NSIS, default target, doesn't require mono). + +### To build app in 32 bit from a machine with 64 bit: + +``` +sudo apt-get install --no-install-recommends -y gcc-multilib g++-multilib +``` + +## Travis Linux +[Xenial](https://docs.travis-ci.com/user/trusty-ci-environment/) is required. +```yaml +sudo: required +dist: xenial +``` + +### Travis macOS +[macOS 10.14+](https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version) is required. +```yaml +osx_image: xcode10.2 +``` + +## Docker + +To build Linux or Windows on any platform. + +!!! warning + You cannot build for Windows using Docker if you have native dependencies and native dependency doesn't use [prebuild](https://www.npmjs.com/package/prebuild). + +See example Docker usage on a CI server in the [sample .travis.yml](https://github.com/develar/onshape-desktop-shell/blob/master/.travis.yml). + +!!! note + Do not use Docker Toolbox on macOS. Only [Docker for Mac](https://docs.docker.com/docker-for-mac/install/) works. + +### Build Electron App using Docker on a Local Machine + +1. Run docker container: + + ```sh + docker run --rm -ti \ + --env-file <(env | grep -iE 'DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS_TAG|TRAVIS|TRAVIS_REPO_|TRAVIS_BUILD_|TRAVIS_BRANCH|TRAVIS_PULL_REQUEST_|APPVEYOR_|CSC_|GH_|GITHUB_|BT_|AWS_|STRIP|BUILD_') \ + --env ELECTRON_CACHE="/root/.cache/electron" \ + --env ELECTRON_BUILDER_CACHE="/root/.cache/electron-builder" \ + -v ${PWD}:/project \ + -v ${PWD##*/}-node-modules:/project/node_modules \ + -v ~/.cache/electron:/root/.cache/electron \ + -v ~/.cache/electron-builder:/root/.cache/electron-builder \ + electronuserland/builder:wine + ``` + +2. Type in `yarn && yarn dist` + + If you don't have `dist` npm script in your `package.json`, call `./node_modules/.bin/electron-builder` directly. + +Or to avoid second step, append to first command `/bin/bash -c "yarn && yarn dist"` You can use `/test.sh` to install dependencies and run tests. + +!!! tip + If you don't need to build Windows, use image `electronuserland/builder` (wine is not installed in this image). + +### Provided Docker Images + +* `electronuserland/builder` or `electronuserland/builder:12` — NodeJS 10 and required system dependencies. Based on `builder:base`. Use this image if you need to build only Linux targets. +* `electronuserland/builder:wine` — Wine, NodeJS 10 and required system dependencies. Based on `builder:10`. Use this image if you need to build Windows targets. +* `electronuserland/builder:wine-mono` — Mono for Squirrel.Windows. Based on `builder:wine`. Use this image if you need to build Squirrel.Windows target. +* `electronuserland/builder:wine-chrome` — `google-chrome-stable` and `xvfb` are available — you can use this image for headless testing of Electron application. Based on `builder:wine`. +* `electronuserland/builder:base` — Required system dependencies. Not supposed to be used directly. diff --git a/docs/sponsor-logos/Tidepool_Logo_Light.svg b/docs/sponsor-logos/Tidepool_Logo_Light.svg new file mode 100644 index 00000000000..c09080c2e90 --- /dev/null +++ b/docs/sponsor-logos/Tidepool_Logo_Light.svg @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + diff --git a/docs/tutorials/code-signing-windows-apps-on-unix.md b/docs/tutorials/code-signing-windows-apps-on-unix.md new file mode 100644 index 00000000000..274b25f0476 --- /dev/null +++ b/docs/tutorials/code-signing-windows-apps-on-unix.md @@ -0,0 +1,132 @@ +!!! info Only for EV code signing certificates + + Described setup and configuration is required only if you have EV code signing certificate. The regular certificates supported [out of the box](../code-signing.md#windows). + +Signing Windows apps on Unix is supported. There are multiple methods to achieve this. Basically you need an application +that is able to sign code using [PKCS 11](https://en.wikipedia.org/wiki/PKCS_11). There is one method that works on Linux +and Mac, using Java. You can also use `osslsigncode` on both systems, for Linux and Mac a how-to is included. This +documents finishes with some remarks and how to integrate the signing process with Electron Builder. + +## Signing Windows app on Mac/Linux using JSign + +This method requires Java. Make sure you got Java installed before trying this solution. + +1. Make sure Java is installed by running `java -v` +2. Download JSign +3. Create a file called `hardwareToken.cfg`. Fill it with the contents below. +4. Check the library link to make sure you have +the correct PKCS module. This link might be different per token. On Linux you will find it in `/lib`, while on Mac you +can find it in `/Library/Frameworks` or `/usr/local/lib`. +5. Install token driver for Mac, export the certificate (convert it to pem when it is .cer) +6. Run `java -jar jsign-2.1.jar` with the correct parameters. + +hardwareToken.cfg +``` +name = HardwareToken +library = /Library/Frameworks/eToken.framework/Versions/A/libeToken.dylib +slotListIndex = 0 +``` + +URLs: +- [JSign from Github](https://github.com/ebourg/jsign/releases) + +Full command for signing: +``` +java -jar jsign-2.1.jar --keystore hardwareToken.cfg --storepass "your password here" --storetype PKCS11 --tsaurl http://timestamp.digicert.com --alias /link/to/cert.pem +``` + +## Signing Windows app on Mac using osslsigncode + +The main problem is the lack of a engine PKCS 11 in brew that supports OpenSSL 1.1. The current version only supports +OpenSSL 1.0. Therefore you need to compile the majority of the applications yourself. + +1. Install some applications with brew like `autoconf`, `automake`, `libtool`, `pkg-config` and `gnu-tar`. +2. Create folder like `/usr/local/mac-dev`, give it rights of your current user, use the folder as a prefix during compilations. +4. Download OpenSSL 1.1.1 tar.gz, see link below, extract and compile: `./config --prefix=/usr/local/mac-dev && make && make install` +5. Export OpenSSL 1.1 variables for compiling the applications below + - `export LDFLAGS="-L/usr/local/mac-dev/lib"` + - `export CPPFLAGS="-I/usr/local/mac-dev/include"` + - `export PATH="/usr/local/mac-dev/bin:$PATH"` + - `export PKG_CONFIG_PATH="/usr/local/mac-dev/lib/pkgconfig"` +6. Install opensc (.dmg file) +7. Download libp11 .tar.gz, extract and compile: `./configure --prefix=/usr/local/mac-dev && make && make install` +8. Install token driver for Mac, export the certificate (convert it to pem when it is .cer) +9. Download osslsigncode .tar.gz, extract and compile: `./autogen.sh && ./configure --prefix=/usr/local/mac-dev && make && make install` (afterwards symlink the binary to `/usr/local/bin`) +10. Figure out the key ID by running `pkcs11-tool --module /usr/local/lib/libeTPkcs11.dylib -l -O` +11. Run `osslsigncode` with the correct module, engine and key id + +URLs: +- [OpenSSL 1.1 from their website](https://www.openssl.org/source/) +- [OpenSC from Github](https://github.com/OpenSC/OpenSC/releases) +- [Libp11 from Github](https://github.com/OpenSC/libp11/releases) +- [osslsigncode from Github](https://github.com/mtrojnar/osslsigncode) + +Full command for signing, pkcs11module parameter might be different per token. + +```sh +osslsigncode sign -verbose -pkcs11engine /usr/local/mac-dev/lib/engines-1.1/libpkcs11.dylib -pkcs11module /usr/local/lib/libeTPkcs11.dylib -h sha256 -n app-name -t https://timestamp.verisign.com/scripts/timestamp.dll -certs /link/to/cert.pem -key 'key-id-here' -pass 'password' -in /link/to/app.exe -out /link/to/app.signed.exe +``` + +## Signing Windows app on Ubuntu 18.04 using osslsigncode + +These steps apply to other Linux operating systems too, but the names of the packages might be different. + +1. Update packages using APT. `sudo apt-get update`. +2. Install packages using APT `sudo apt-get install -y openssl libcurl4-openssl-dev libssl-dev libengine-pkcs11-openssl curl libcurl4 git automake libtool pkg-config wget libccid libpcsclite1 pcscd usbutils opensc`. +3. Download osslsigncode .tar.gz, extract and compile: `./autogen.sh && ./configure && make && make install` +4. Install token driver for Linux, export the certificate (convert it to pem when it is .cer) +5. Figure out the key ID by running `pkcs11-tool --module /lib/libeToken.so -l -O`. Check the path to make sure you have +the correct PKCS module. This path might be different per token. +5. Run `osslsigncode` with the correct module, engine and key id + +Full command for signing: +```sh +osslsigncode sign -verbose -pkcs11engine /usr/lib/x86_64-linux-gnu/engines-1.1/pkcs11.so -pkcs11module /lib/libeToken.so -h sha256 -n app-name -t https://timestamp.verisign.com/scripts/timestamp.dll -certs /link/to/cert.pem -key 'key-id-here' -pass 'password' -in /link/to/app.exe -out /link/to/app.signed.exe +``` + +URLs: +- [osslsigncode from Github](https://github.com/mtrojnar/osslsigncode) + +## Remarks + +Please consider the following when things are not working. + +- Make sure you use the correct PKCS 11 engine and module. If you get `no slot with a token was found` or some errors + like `sc connect card error` and `Card is invalid or cannot be handled` you are not using the correct module, make + sure you use correct one. +- If you compiled OpenSSL yourself, make sure you use an engine that is also compiled for OpenSSL. Otherwise you + will run into *compatibility* issues. +- Use the `osslsigncode` which is mentioned in the list of URLs. There are many more forks/version to be found. The one + included here is the actually maintained library, requires OpenSSL 1.1. + +## Integrate signing with Electron Builder + +Depending on the method you have chosen, you can automate the signing process by creating a `sign.js` file. Then point +to this file in your `package.json`. + +package.json +``` +... + "win": { + "target": "nsis", + "sign": "./sign.js" + }, +... +``` + +sign.js +```js +exports.default = async function(configuration) { + // do not include passwords or other sensitive data in the file + // rather create environment variables with sensitive data + const CERTIFICATE_NAME = process.env.WINDOWS_SIGN_CERTIFICATE_NAME; + const TOKEN_PASSWORD = process.env.WINDOWS_SIGN_TOKEN_PASSWORD; + + require("child_process").execSync( + `your command here ${CERTIFICATE_NAME} ${TOKEN_PASSWORD}`, + { + stdio: "inherit" + } + ); +}; +``` \ No newline at end of file diff --git a/docs/tutorials/loading-app-dependencies-manually.md b/docs/tutorials/loading-app-dependencies-manually.md new file mode 100644 index 00000000000..5073936933f --- /dev/null +++ b/docs/tutorials/loading-app-dependencies-manually.md @@ -0,0 +1,20 @@ +!!! warning + Important: This approach must be used only in development environment. + Since the release version of your application the `app` directory should self contain all used files. + +In case on development environment your app runs the main process (executed by electron) not inside the `/app` folder. You may need to load the `/app` dependencies manually. Because the app dependencies are be placed at `/app/node_modules` and your main process that is running in a different directory will not have access by default to that directory. + +Instead of duplicating the app dependencies in the development `package.json` it is possible to make the electron main process load the app dependencies manually with an approach like this: + +```js +// given this file is: /src/browser/main.js + +const path = require('path') +const devMode = (process.argv || []).indexOf('--dev') !== -1 + +if (devMode) { + // load the app dependencies + const PATH_APP_NODE_MODULES = path.join(__dirname, '..', '..', 'app', 'node_modules') + require('module').globalPaths.push(PATH_APP_NODE_MODULES) +} +``` diff --git a/docs/tutorials/macos-kernel-extensions.md b/docs/tutorials/macos-kernel-extensions.md new file mode 100644 index 00000000000..c83728dca99 --- /dev/null +++ b/docs/tutorials/macos-kernel-extensions.md @@ -0,0 +1,28 @@ +Installing macOS kernel extensions with `electron-builder` can be done using scripts. + +First, in `package.json`, make sure you're building a package (`.pkg`) and not the default `.dmg`: + +```json +"mac": { + "target": "pkg" +} +``` + +Place your script and the kernel extensions in `build/pkg-scripts`, or [define a custom directory](../configuration/pkg.md#PkgOptions-scripts). Note that the script **must** be called either `preinstall` or `postinstall`. Remember to use ` #!/bin/sh` as the first line in your script. Also, your script must be executable (`chmod +x `). + +An example script: +```sh +#!/bin/sh + +echo "Unloading and uninstalling old extensions..." +# unload old extensions +sudo kextunload /Library/Extensions/myExt.kext + +# delete old extensions +sudo rm -rf /Library/Extensions/myExtension.kext + +# install new extensions +echo "Installing and loading new extensions..." +sudo cp -R myExt.kext /Library/Extensions/myExt.kext +sudo kextload /Library/Extensions/myExt.kext/ +``` diff --git a/docs/tutorials/release-using-channels.md b/docs/tutorials/release-using-channels.md new file mode 100644 index 00000000000..987195ee603 --- /dev/null +++ b/docs/tutorials/release-using-channels.md @@ -0,0 +1,54 @@ +# Release Using Channels / Auto-Updates With Channels + +## Description +Channels are useful to distribute "beta" or "alpha" releases of your application to a chosen set of users. This allows to test an application before release it as "latest" (stable). + +Users which receive "beta" version will get "latest" versions too. Otherwise, users who don't want "beta" will only get "latest" releases. + +There are three channels, ordered by stability: + +1. "latest", your application is stable and this is the default one (example: `1.3.2`), +2. "beta" which means your application works, but should have some bugs (example: `1.3.2-beta`) +3. "alpha" which means your application is not stable and in active development (example: `1.3.2-alpha`) + +## Configuration +To release using channels, you should config electron-builder and define the channels to use in client side. + +### Electron-Builder +By default (without using channels), all application releases use the "latest" channel. + +If you want to use channels, you should add this to your package.json: + +```json +"version": "x.x.x-beta", +... +"build": { + "generateUpdatesFilesForAllChannels": true, + ... +} +``` + +!!! note + `allowDowngrade` is automatically set to `true` when `generateUpdatesFilesForAllChannels = true`, so you don't need to set it. + +All you have to do to release using channels is to define the channel in the version tag of the `package.json`. Add "-beta" or "-alpha" (nothing for "latest") to automatically build for the related channel. + + +### Your Application +All you need to do here is to define which channel the user will receive with: + +`autoUpdater.channel = "beta"` (see [the documentation here](../auto-update.md#module_electron-updater.AppUpdater+channel)) + +The following versions will be distributed to users depending on the channel defined: + +- `latest` or nothing: users will only get "latest" versions +- `beta`: users will get "beta" and "latest" version +- `alpha`: users will get "alpha", "beta" and "latest" version + + +## How To Use It +Imagine that your application is stable and in version 1.0.1. + +If you want to release a beta for the new 1.1.0 version, you only need to update the `package.json` `version` with `1.1.0-beta`. + +When your application is stable enough, you want to release it to all users. For that, you only need to remove the `-beta` label from the package.json `version` tag. diff --git a/docs/tutorials/test-update-on-s3-locally.md b/docs/tutorials/test-update-on-s3-locally.md new file mode 100644 index 00000000000..0dc3ad5c978 --- /dev/null +++ b/docs/tutorials/test-update-on-s3-locally.md @@ -0,0 +1,64 @@ +# Description +Auto updates is one of the most critical pieces of any application and testing that process is important. + +This page is intended to explain how to test the auto update process locally. + +Much of the update steps were copied from [here](https://github.com/electron-userland/electron-builder/issues/3053) + + +# Steps +## 1. Download and Install Minio +Minio is a locally runnable server that implements the S3 protocol. https://min.io/download + +Download the server and the client and put them in a directory you want. For this document we'll refer to this directory as `minio-home` + +Your directory should look like this +``` +minio-home +├── minio.exe +└── mc.exe +``` + +## 2. Create and Configure a Bucket + +Run the following in `minio-home` +```sh +mkdir ./minio-data +mkdir ./minio-data/test-bucket +``` +Then you can run `./minio.exe server ./minio-data` to start the server. + +This will start the server with the default credentials _(i.e. **minioadmin**)_ + +Access the web client at http://127.0.0.1:9000 - you should be able to access with the default credentials. + +At this point you should add a read policy on the bucket. You can do this by accessing the web client, going to the bucket settings, and adding a `*` `Read Only` policy. +> This is necessary for the updater to have access to the updates. +{.is-info} + +## 3. Publish the Updates +First build the application once so we don't have to wait for a build every time. To do this run your compilation step first. + +Then ensure your `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` environment variables are set. You can set them in your terminal session or your IDE such as Webstorm or you can include them with [dotenv](https://www.npmjs.com/package/dotenv) and then have `require("dotenv").config()` at the top of your configuration file (if it's a javascript file). + +Once you've set the env variables you can run your publish command with a modification. +For example you have a command named `publish:prod` which is `electron-builder --x64 --config configs/electron-builder.js`, + +You would make `publish:dev` which is `yarn publish:prod --publish always --config.publish.provider=s3 --config.publish.endpoint=http://localhost:9000 --config.publish.bucket=test-update` + +This will automatically override the publish configurations and run the publish process. + +Then go into your `package.json` file and update the version number to something **higher** than the current version. This is important for a new update to be detected. + +If you go to the web client now you should see the executable, corresponding blockmap, and a `latest.yml` file. + + +## 4. Install and Test + +Now you want to install the built application. It should exist whatever directory you specified in your config as the out directory _(or the default which is `dist`)_ + +Start the application and check the log output. In windows it should be in this directory: `%AppData%\Roaming\yourapp\log.log` This will contain the updater logs and indicate how far or at what step the update fails if it does. + +If your update flow is correct then you should see an update notification as normal. + + diff --git a/docs/tutorials/two-package-structure.md b/docs/tutorials/two-package-structure.md new file mode 100644 index 00000000000..fcc715c2d9e --- /dev/null +++ b/docs/tutorials/two-package-structure.md @@ -0,0 +1,22 @@ +!!! info + Since version 8 electron-builder rebuilds only production dependencies, so, you are not forced to use two package.json structure. + +1. For development (`./package.json`) + + The `package.json` resides in the root of your project. Here you declare the dependencies for your development environment and build scripts (`devDependencies`). + +2. For your application (`./app/package.json`) + + The `package.json` resides in the `app` directory. Declare your application dependencies (`dependencies`) here. *Only this directory is distributed with the final, packaged application.* + +Why? + +1. Native npm modules (those written in C, not JavaScript) need to be compiled and here we have two different compilation targets for them. Those used within the application need to be compiled against the electron runtime and all `devDependencies` need to be compiled against your local node.js environment. Thanks to the two `package.json` structure, this is trivial (see [#39](https://github.com/electron-userland/electron-builder/issues/39)). +2. No need to specify which [files](../configuration/configuration.md#Configuration-files) to include in the app (because development files reside outside the `app` directory). + +Please see [Loading App Dependencies Manually](loading-app-dependencies-manually.md) and [#379](https://github.com/electron-userland/electron-builder/issues/379#issuecomment-218503881). + +If you use the two-package.json project structure, you'll only have your `devDependencies` in your development `package.json` and your `dependencies` in your app `package.json`. To ensure your dependencies are always updated based on both files, simply add `"postinstall": "electron-builder install-app-deps"` to your development `package.json`. This will basically automatically trigger an `npm install` within your app directory so you don't have to do this work every time you install/update your dependencies. + +!!! info "Metadata" + All the meta fields should be in the `app/package.json` (`version`, `name` and so on). diff --git a/mkdocs.yml b/mkdocs.yml index 62637f4de33..0961cfad53f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -39,7 +39,9 @@ markdown_extensions: nav: - Introduction: index.md - Command Line Interface (CLI): cli.md - - Programmatic API: api/electron-builder.md + - Programmatic API: + API: api/electron-builder.md + Example: api/programmaticUsage.md - Donate: donate.md - Configuration: @@ -77,5 +79,6 @@ nav: - Loading App Dependencies Manually: tutorials/loading-app-dependencies-manually.md - Two package.json Structure: tutorials/two-package-structure.md - macOS Kernel Extensions: tutorials/macos-kernel-extensions.md + - Sign a Windows app on macOS/Linux: tutorials/code-signing-windows-apps-on-unix.md - Release Using Channels: tutorials/release-using-channels.md - - Sign a Windows app on macOS/Linux: tutorials/code-signing-windows-apps-on-unix.md \ No newline at end of file + - Test Update on s3 Locally: tutorials/test-update-on-s3-locally.md \ No newline at end of file diff --git a/netlify-docs.sh b/netlify-docs.sh new file mode 100644 index 00000000000..01b1ce0d562 --- /dev/null +++ b/netlify-docs.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +pip3 install pipenv +pipenv install +mkdocs build diff --git a/package.json b/package.json index d4c6d790f94..0c2417e2be5 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,8 @@ "lint-staged": { "packages/**/*.ts": "eslint", "**/package.json": "pnpm lint-deps", - "test/src/helpers/checkDeps.ts": "pnpm lint-deps" + "test/src/helpers/checkDeps.ts": "pnpm lint-deps", + "docs/**/*": "pnpm generate-docs" }, "scripts": { "//": "do not wrap into single quotes - windows doesn't unwrap arg in this case", @@ -23,15 +24,12 @@ "docker-images": "docker/build.sh", "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md", "generate-changeset": "pnpm changeset", - "ci:version": "pnpm changelog && changeset version && node scripts/update-package-version-export.js && git add .", + "generate-docs": "pnpm compile && pnpm jsdoc && pnpm jsdoc2md2html", + "ci:version": "pnpm changelog && changeset version && node scripts/update-package-version-export.js && pnpm schema && pnpm run docs && git add .", "ci:publish": "pnpm compile && pnpm publish -r", "schema": "typescript-json-schema packages/app-builder-lib/tsconfig-scheme.json Configuration --out packages/app-builder-lib/scheme.json --noExtraProps --useTypeOfKeyword --strictNullChecks --required && node ./scripts/fix-schema.js", - "jsdoc": "ts2jsdoc packages/builder-util-runtime packages/builder-util packages/app-builder-lib packages/electron-builder packages/electron-publish", - "jsdoc2md": "node scripts/jsdoc2md.js", - "/////": "git clone --single-branch -b docs git@github.com:electron-userland/electron-builder.git docs", - "docs": "tsc -p ./scripts/renderer/tsconfig.json && pnpm jsdoc && pnpm jsdoc2md", - "deploy-docs": "mkdocs build --clean && netlifyctl deploy --publish-directory site", - "////": "pip3 install mkdocs-material mkdocs pymdown-extensions markdown-include Pygments --upgrade", + "jsdoc": "ts2jsdoc packages/builder-util-runtime packages/builder-util packages/app-builder-lib packages/electron-builder packages/electron-publish packages/electron-updater packages/dmg-builder", + "jsdoc2md2html": "node scripts/jsdoc2md2html.js", "prepare": "husky install", "update-deps": "pnpm update -i -r --latest" }, @@ -39,16 +37,16 @@ "repository": "https://github.com/electron-userland/electron-builder", "///": "All dependencies for all packages (hoisted)", "////": "All typings are added into root `package.json` to avoid duplication errors in the IDE compiler (several `node.d.ts` files).", - "dependencies": { - "dmg-license": "1.0.9" - }, "devDependencies": { "@babel/plugin-transform-modules-commonjs": "7.15.0", "@changesets/changelog-github": "^0.4.0", "@changesets/cli": "2.16.0", + "@types/node": "^16.7.8", "@typescript-eslint/eslint-plugin": "4.28.5", "@typescript-eslint/parser": "4.28.5", + "catharsis": "^0.9.0", "conventional-changelog-cli": "2.1.1", + "dmd": "^6.0.0", "eslint": "7.30.0", "eslint-config-prettier": "8.3.0", "eslint-plugin-prettier": "3.4.0", @@ -58,8 +56,10 @@ "jest-cli": "27.0.6", "jsdoc-to-markdown": "7.0.1", "lint-staged": "11.1.2", + "markdown2html-pro": "^1.0.6", "path-sort": "0.1.0", "prettier": "2.3.2", + "replace-in-file": "^6.2.0", "source-map-support": "0.5.19", "ts-jsdoc": "3.2.2", "typescript": "4.3.5", diff --git a/packages/app-builder-lib/scheme.json b/packages/app-builder-lib/scheme.json index 685d59f0194..ca9d4f3f612 100644 --- a/packages/app-builder-lib/scheme.json +++ b/packages/app-builder-lib/scheme.json @@ -6204,7 +6204,8 @@ "string" ] } - ] + ], + "description": "The function (or path to file or module id) to be [run before pack](#beforepack)" }, "buildDependenciesFromSource": { "default": false, diff --git a/packages/app-builder-lib/tsconfig-scheme.json b/packages/app-builder-lib/tsconfig-scheme.json index 08d890db6c6..253333f2b2f 100644 --- a/packages/app-builder-lib/tsconfig-scheme.json +++ b/packages/app-builder-lib/tsconfig-scheme.json @@ -4,11 +4,6 @@ "outDir": "out", "rootDir": "src", }, - "jsdoc": { - "out": "../../scripts/jsdoc/out/builder-lib", - "examples": "../../scripts/jsdoc/examples", - "access": "public" - }, "include": [ "src/**/*.ts", "../../typings/*.d.ts" diff --git a/packages/app-builder-lib/tsconfig.json b/packages/app-builder-lib/tsconfig.json index f92361fe9e1..2c425ffc90b 100644 --- a/packages/app-builder-lib/tsconfig.json +++ b/packages/app-builder-lib/tsconfig.json @@ -1,5 +1,21 @@ { "extends": "./tsconfig-scheme.json", + "jsdoc": { + "out": "../../scripts/jsdoc/out/builder-lib", + "examples": "../../scripts/jsdoc/examples", + "access": "public" + }, + "compilerOptions": { + "outDir": "out", + "rootDir": "src", + }, + "include": [ + "src/**/*.ts", + "../../typings/*.d.ts" + ], + "exclude": [ + "../../typings/electron.d.ts" + ], "references": [ { "path": "../builder-util" diff --git a/packages/dmg-builder/package.json b/packages/dmg-builder/package.json index 7602c196ebf..19ad97347e7 100644 --- a/packages/dmg-builder/package.json +++ b/packages/dmg-builder/package.json @@ -20,13 +20,11 @@ "app-builder-lib": "workspace:*", "builder-util": "workspace:*", "builder-util-runtime": "workspace:*", + "dmg-license": "^1.0.9", "fs-extra": "^10.0.0", "iconv-lite": "^0.6.2", "js-yaml": "^4.1.0" }, - "optionalDependencies": { - "dmg-license": "^1.0.9" - }, "devDependencies": { "@types/fs-extra": "9.0.12", "@types/js-yaml": "4.0.3", diff --git a/packages/dmg-builder/tsconfig.json b/packages/dmg-builder/tsconfig.json index 467818ca969..b78528697b3 100644 --- a/packages/dmg-builder/tsconfig.json +++ b/packages/dmg-builder/tsconfig.json @@ -4,6 +4,11 @@ "outDir": "out", "rootDir": "src" }, + "jsdoc": { + "out": "../../scripts/jsdoc/out/dmg-builder", + "examples": "../../scripts/jsdoc/examples", + "access": "public" + }, "references": [ { "path": "../app-builder-lib" diff --git a/packages/electron-builder-squirrel-windows/tsconfig.json b/packages/electron-builder-squirrel-windows/tsconfig.json index e569ae0df14..c09a92f11c5 100644 --- a/packages/electron-builder-squirrel-windows/tsconfig.json +++ b/packages/electron-builder-squirrel-windows/tsconfig.json @@ -1,5 +1,10 @@ { "extends": "../tsconfig-base.json", + "jsdoc": { + "out": "../../scripts/jsdoc/out/builder-lib", + "examples": "../../scripts/jsdoc/examples", + "access": "public" + }, "compilerOptions": { "outDir": "out", "rootDir": "src" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index de7a9aacea6..86ed5b690ae 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,10 +7,12 @@ importers: '@babel/plugin-transform-modules-commonjs': 7.15.0 '@changesets/changelog-github': ^0.4.0 '@changesets/cli': 2.16.0 + '@types/node': ^16.7.8 '@typescript-eslint/eslint-plugin': 4.28.5 '@typescript-eslint/parser': 4.28.5 + catharsis: ^0.9.0 conventional-changelog-cli: 2.1.1 - dmg-license: 1.0.9 + dmd: ^6.0.0 eslint: 7.30.0 eslint-config-prettier: 8.3.0 eslint-plugin-prettier: 3.4.0 @@ -20,22 +22,25 @@ importers: jest-cli: 27.0.6 jsdoc-to-markdown: 7.0.1 lint-staged: 11.1.2 + markdown2html-pro: ^1.0.6 path-sort: 0.1.0 prettier: 2.3.2 + replace-in-file: ^6.2.0 source-map-support: 0.5.19 ts-jsdoc: 3.2.2 typescript: 4.3.5 typescript-json-schema: ^0.50.1 v8-compile-cache: 2.3.0 - dependencies: - dmg-license: 1.0.9 devDependencies: '@babel/plugin-transform-modules-commonjs': 7.15.0 '@changesets/changelog-github': 0.4.0 '@changesets/cli': 2.16.0 + '@types/node': 16.7.8 '@typescript-eslint/eslint-plugin': 4.28.5_fb136327aebe99aff77fb6e94f9d56f0 '@typescript-eslint/parser': 4.28.5_eslint@7.30.0+typescript@4.3.5 + catharsis: 0.9.0 conventional-changelog-cli: 2.1.1 + dmd: 6.0.0 eslint: 7.30.0 eslint-config-prettier: 8.3.0_eslint@7.30.0 eslint-plugin-prettier: 3.4.0_0470f3bcd018a045da11d0bbb868d6c6 @@ -45,8 +50,10 @@ importers: jest-cli: 27.0.6 jsdoc-to-markdown: 7.0.1 lint-staged: 11.1.2 + markdown2html-pro: 1.0.6 path-sort: 0.1.0 prettier: 2.3.2 + replace-in-file: 6.2.0 source-map-support: 0.5.19 ts-jsdoc: 3.2.2_typescript@4.3.5 typescript: 4.3.5 @@ -234,11 +241,10 @@ importers: app-builder-lib: link:../app-builder-lib builder-util: link:../builder-util builder-util-runtime: link:../builder-util-runtime + dmg-license: 1.0.9 fs-extra: 10.0.0 iconv-lite: 0.6.3 js-yaml: 4.1.0 - optionalDependencies: - dmg-license: 1.0.9 devDependencies: '@types/fs-extra': 9.0.12 '@types/js-yaml': 4.0.3 @@ -2010,6 +2016,10 @@ packages: /@bcoe/v8-coverage/0.2.3: resolution: {integrity: sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==} + /@braintree/sanitize-url/3.1.0: + resolution: {integrity: sha512-GcIY79elgB+azP74j8vqkiXz8xLFfIzbQJdlwOPisgbKT00tviJQuEghOXSMVxJ00HoYJbGswr4kcllUc4xCcg==} + dev: true + /@changesets/apply-release-plan/5.0.0: resolution: {integrity: sha512-SE+5nPNSKUyUociPnAvnjYSVF+diciEhX9ZHSqKWMlydswCDjiaq9gz67qwWCmwgEgEOz0TS7VrQBoOlzbitvA==} dependencies: @@ -2707,6 +2717,10 @@ packages: resolution: {integrity: sha512-7eQ2xYLLI/LsicL2nejW9Wyko3lcpN6O/z0ZLHrEQsg280zIdCv1t/0m6UtBjUHokCGBQ3gYTbHzDkZ1xOBwwg==} dev: true + /@types/mime-types/2.1.1: + resolution: {integrity: sha512-vXOTGVSLR2jMw440moWTC7H19iUyLtP3Z1YTj7cSsubOICinjMxFeb/V57v9QdyyPGbbWolUFSSmSiRSn94tFw==} + dev: true + /@types/mime/2.0.3: resolution: {integrity: sha512-Jus9s4CDbqwocc5pOAnh8ShfrnMcPHuJYzVcSUU7lrh8Ni5HuIqX3oilL86p3dlTrk0LzHRCgA/GQ7uNCw6l2Q==} dev: true @@ -2732,6 +2746,10 @@ packages: /@types/node/16.4.10: resolution: {integrity: sha512-TmVHsm43br64js9BqHWqiDZA+xMtbUpI1MBIA0EyiBmoV9pcEYFOSdj5fr6enZNfh4fChh+AGOLIzGwJnkshyQ==} + /@types/node/16.7.8: + resolution: {integrity: sha512-8upnoQU0OPzbIkm+ZMM0zCeFCkw2s3mS0IWdx0+AAaWqm4fkBb0UJp8Edl7FVKRamYbpJC/aVsHpKWBIbiC7Zg==} + dev: true + /@types/normalize-package-data/2.4.1: resolution: {integrity: sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==} dev: true @@ -3006,6 +3024,11 @@ packages: resolution: {integrity: sha1-anmQQ3ynNtXhKI25K9MmbV9csqo=} dev: true + /agent-base/5.1.1: + resolution: {integrity: sha512-TMeqbNl2fMW0nMjTEPOwe3J/PRFP4vqeoNuQMG0HlMrtm5QxKqdvAkZ1pRBQ/ulIyDD5Yq0nJ7YbdD8ey0TO3g==} + engines: {node: '>= 6.0.0'} + dev: true + /agent-base/6.0.2: resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} engines: {node: '>= 6.0.0'} @@ -3273,6 +3296,10 @@ packages: resolution: {integrity: sha512-NW2cX8m1Q7KPA7a5M2ULQeZ2wR5qI5PAbw5L0UOMxdioVk9PMZ0h1TmyZEkPYrCvYjDlFICusOu1dlEKAAeXBw==} engines: {node: '>=0.12.0'} + /async-limiter/1.0.1: + resolution: {integrity: sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ==} + dev: true + /async/0.9.2: resolution: {integrity: sha1-rqdNXmHB+JlhO/ZL2mbUx48v0X0=} dev: false @@ -3611,7 +3638,6 @@ packages: /buffer-crc32/0.2.13: resolution: {integrity: sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=} - dev: false /buffer-equal/1.0.0: resolution: {integrity: sha1-WWFrSYME1Var1GaWayLu2j7KX74=} @@ -3947,6 +3973,10 @@ packages: typical: 2.6.1 dev: true + /commander/2.20.3: + resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} + dev: true + /commander/2.9.0: resolution: {integrity: sha1-nJkJQXbhIkDLItbFFGCYQA/g99Q=} engines: {node: '>= 0.6.x'} @@ -3998,6 +4028,16 @@ packages: /concat-map/0.0.1: resolution: {integrity: sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=} + /concat-stream/1.6.2: + resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} + engines: {'0': node >= 0.8} + dependencies: + buffer-from: 1.1.2 + inherits: 2.0.4 + readable-stream: 2.3.7 + typedarray: 0.0.6 + dev: true + /config-master/3.1.0: resolution: {integrity: sha1-ZnZjWQUFooO/JqSE1oSJ10xUhdo=} dependencies: @@ -4201,6 +4241,10 @@ packages: /core-util-is/1.0.2: resolution: {integrity: sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=} + dev: false + + /core-util-is/1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} /cosmiconfig/7.0.0: resolution: {integrity: sha512-pondGvTuVYDk++upghXJabWzL6Kxu6f26ljFw64Swq9v6sQPUL3EUlVDV56diOjpCayKihL6hVe8exIACU4XcA==} @@ -4311,6 +4355,487 @@ packages: stream-transform: 2.1.0 dev: true + /d3-array/1.2.4: + resolution: {integrity: sha512-KHW6M86R+FUPYGb3R5XiYjXPq7VzwxZ22buHhAEVG5ztoEcZZMLov530mmccaqA1GghZArjQV46fuc8kUqhhHw==} + dev: true + + /d3-array/3.0.2: + resolution: {integrity: sha512-nTN4OC6ufZueotlexbxBd2z8xmG1eIfhvP2m1auH2ONps0L+AZn1r0JWuzMXZ6XgOj1VBOp7GGZmEs9NUFEBbA==} + engines: {node: '>=12'} + dependencies: + internmap: 2.0.1 + dev: true + + /d3-axis/1.0.12: + resolution: {integrity: sha512-ejINPfPSNdGFKEOAtnBtdkpr24c4d4jsei6Lg98mxf424ivoDP2956/5HDpIAtmHo85lqT4pruy+zEgvRUBqaQ==} + dev: true + + /d3-axis/3.0.0: + resolution: {integrity: sha512-IH5tgjV4jE/GhHkRV0HiVYPDtvfjHQlQfJHs0usq7M30XcSBvOotpmH1IgkcXsO/5gEQZD43B//fc7SRT5S+xw==} + engines: {node: '>=12'} + dev: true + + /d3-brush/1.1.6: + resolution: {integrity: sha512-7RW+w7HfMCPyZLifTz/UnJmI5kdkXtpCbombUSs8xniAyo0vIbrDzDwUJB6eJOgl9u5DQOt2TQlYumxzD1SvYA==} + dependencies: + d3-dispatch: 1.0.6 + d3-drag: 1.2.5 + d3-interpolate: 1.4.0 + d3-selection: 1.4.2 + d3-transition: 1.3.2 + dev: true + + /d3-brush/3.0.0: + resolution: {integrity: sha512-ALnjWlVYkXsVIGlOsuWH1+3udkYFI48Ljihfnh8FZPF2QS9o+PzGLBslO0PjzVoHLZ2KCVgAM8NVkXPJB2aNnQ==} + engines: {node: '>=12'} + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1_d3-selection@3.0.0 + dev: true + + /d3-chord/1.0.6: + resolution: {integrity: sha512-JXA2Dro1Fxw9rJe33Uv+Ckr5IrAa74TlfDEhE/jfLOaXegMQFQTAgAw9WnZL8+HxVBRXaRGCkrNU7pJeylRIuA==} + dependencies: + d3-array: 1.2.4 + d3-path: 1.0.9 + dev: true + + /d3-chord/3.0.1: + resolution: {integrity: sha512-VE5S6TNa+j8msksl7HwjxMHDM2yNK3XCkusIlpX5kwauBfXuyLAtNg9jCp/iHH61tgI4sb6R/EIMWCqEIdjT/g==} + engines: {node: '>=12'} + dependencies: + d3-path: 3.0.1 + dev: true + + /d3-collection/1.0.7: + resolution: {integrity: sha512-ii0/r5f4sjKNTfh84Di+DpztYwqKhEyUlKoPrzUFfeSkWxjW49xU2QzO9qrPrNkpdI0XJkfzvmTu8V2Zylln6A==} + dev: true + + /d3-color/1.4.1: + resolution: {integrity: sha512-p2sTHSLCJI2QKunbGb7ocOh7DgTAn8IrLx21QRc/BSnodXM4sv6aLQlnfpvehFMLZEfBc6g9pH9SWQccFYfJ9Q==} + dev: true + + /d3-color/3.0.1: + resolution: {integrity: sha512-6/SlHkDOBLyQSJ1j1Ghs82OIUXpKWlR0hCsw0XrLSQhuUPuCSmLQ1QPH98vpnQxMUQM2/gfAkUEWsupVpd9JGw==} + engines: {node: '>=12'} + dev: true + + /d3-contour/1.3.2: + resolution: {integrity: sha512-hoPp4K/rJCu0ladiH6zmJUEz6+u3lgR+GSm/QdM2BBvDraU39Vr7YdDCicJcxP1z8i9B/2dJLgDC1NcvlF8WCg==} + dependencies: + d3-array: 1.2.4 + dev: true + + /d3-contour/3.0.1: + resolution: {integrity: sha512-0Oc4D0KyhwhM7ZL0RMnfGycLN7hxHB8CMmwZ3+H26PWAG0ozNuYG5hXSDNgmP1SgJkQMrlG6cP20HoaSbvcJTQ==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.0.2 + dev: true + + /d3-delaunay/6.0.2: + resolution: {integrity: sha512-IMLNldruDQScrcfT+MWnazhHbDJhcRJyOEBAJfwQnHle1RPh6WDuLvxNArUju2VSMSUuKlY5BGHRJ2cYyoFLQQ==} + engines: {node: '>=12'} + dependencies: + delaunator: 5.0.0 + dev: true + + /d3-dispatch/1.0.6: + resolution: {integrity: sha512-fVjoElzjhCEy+Hbn8KygnmMS7Or0a9sI2UzGwoB7cCtvI1XpVN9GpoYlnb3xt2YV66oXYb1fLJ8GMvP4hdU1RA==} + dev: true + + /d3-dispatch/3.0.1: + resolution: {integrity: sha512-rzUyPU/S7rwUflMyLc1ETDeBj0NRuHKKAcvukozwhshr6g6c5d8zh4c2gQjY2bZ0dXeGLWc1PF174P2tVvKhfg==} + engines: {node: '>=12'} + dev: true + + /d3-drag/1.2.5: + resolution: {integrity: sha512-rD1ohlkKQwMZYkQlYVCrSFxsWPzI97+W+PaEIBNTMxRuxz9RF0Hi5nJWHGVJ3Om9d2fRTe1yOBINJyy/ahV95w==} + dependencies: + d3-dispatch: 1.0.6 + d3-selection: 1.4.2 + dev: true + + /d3-drag/3.0.0: + resolution: {integrity: sha512-pWbUJLdETVA8lQNJecMxoXfH6x+mO2UQo8rSmZ+QqxcbyA3hfeprFgIT//HW2nlHChWeIIMwS2Fq+gEARkhTkg==} + engines: {node: '>=12'} + dependencies: + d3-dispatch: 3.0.1 + d3-selection: 3.0.0 + dev: true + + /d3-dsv/1.2.0: + resolution: {integrity: sha512-9yVlqvZcSOMhCYzniHE7EVUws7Fa1zgw+/EAV2BxJoG3ME19V6BQFBwI855XQDsxyOuG7NibqRMTtiF/Qup46g==} + hasBin: true + dependencies: + commander: 2.20.3 + iconv-lite: 0.4.24 + rw: 1.3.3 + dev: true + + /d3-dsv/3.0.1: + resolution: {integrity: sha512-UG6OvdI5afDIFP9w4G0mNq50dSOsXHJaRE8arAS5o9ApWnIElp8GZw1Dun8vP8OyHOZ/QJUKUJwxiiCCnUwm+Q==} + engines: {node: '>=12'} + hasBin: true + dependencies: + commander: 7.2.0 + iconv-lite: 0.6.3 + rw: 1.3.3 + dev: true + + /d3-ease/1.0.7: + resolution: {integrity: sha512-lx14ZPYkhNx0s/2HX5sLFUI3mbasHjSSpwO/KaaNACweVwxUruKyWVcb293wMv1RqTPZyZ8kSZ2NogUZNcLOFQ==} + dev: true + + /d3-ease/3.0.1: + resolution: {integrity: sha512-wR/XK3D3XcLIZwpbvQwQ5fK+8Ykds1ip7A2Txe0yxncXSdq1L9skcG7blcedkOX+ZcgxGAmLX1FrRGbADwzi0w==} + engines: {node: '>=12'} + dev: true + + /d3-fetch/1.2.0: + resolution: {integrity: sha512-yC78NBVcd2zFAyR/HnUiBS7Lf6inSCoWcSxFfw8FYL7ydiqe80SazNwoffcqOfs95XaLo7yebsmQqDKSsXUtvA==} + dependencies: + d3-dsv: 1.2.0 + dev: true + + /d3-fetch/3.0.1: + resolution: {integrity: sha512-kpkQIM20n3oLVBKGg6oHrUchHM3xODkTzjMoj7aWQFq5QEM+R6E4WkzT5+tojDY7yjez8KgCBRoj4aEr99Fdqw==} + engines: {node: '>=12'} + dependencies: + d3-dsv: 3.0.1 + dev: true + + /d3-force/1.2.1: + resolution: {integrity: sha512-HHvehyaiUlVo5CxBJ0yF/xny4xoaxFxDnBXNvNcfW9adORGZfyNF1dj6DGLKyk4Yh3brP/1h3rnDzdIAwL08zg==} + dependencies: + d3-collection: 1.0.7 + d3-dispatch: 1.0.6 + d3-quadtree: 1.0.7 + d3-timer: 1.0.10 + dev: true + + /d3-force/3.0.0: + resolution: {integrity: sha512-zxV/SsA+U4yte8051P4ECydjD/S+qeYtnaIyAs9tgHCqfguma/aAQDjo85A9Z6EKhBirHRJHXIgJUlffT4wdLg==} + engines: {node: '>=12'} + dependencies: + d3-dispatch: 3.0.1 + d3-quadtree: 3.0.1 + d3-timer: 3.0.1 + dev: true + + /d3-format/1.4.5: + resolution: {integrity: sha512-J0piedu6Z8iB6TbIGfZgDzfXxUFN3qQRMofy2oPdXzQibYGqPB/9iMcxr/TGalU+2RsyDO+U4f33id8tbnSRMQ==} + dev: true + + /d3-format/3.0.1: + resolution: {integrity: sha512-hdL7+HBIohpgfolhBxr1KX47VMD6+vVD/oEFrxk5yhmzV2prk99EkFKYpXuhVkFpTgHdJ6/4bYcjdLPPXV4tIA==} + engines: {node: '>=12'} + dev: true + + /d3-geo/1.12.1: + resolution: {integrity: sha512-XG4d1c/UJSEX9NfU02KwBL6BYPj8YKHxgBEw5om2ZnTRSbIcego6dhHwcxuSR3clxh0EpE38os1DVPOmnYtTPg==} + dependencies: + d3-array: 1.2.4 + dev: true + + /d3-geo/3.0.1: + resolution: {integrity: sha512-Wt23xBych5tSy9IYAM1FR2rWIBFWa52B/oF/GYe5zbdHrg08FU8+BuI6X4PvTwPDdqdAdq04fuWJpELtsaEjeA==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.0.2 + dev: true + + /d3-hierarchy/1.1.9: + resolution: {integrity: sha512-j8tPxlqh1srJHAtxfvOUwKNYJkQuBFdM1+JAUfq6xqH5eAqf93L7oG1NVqDa4CpFZNvnNKtCYEUC8KY9yEn9lQ==} + dev: true + + /d3-hierarchy/3.0.1: + resolution: {integrity: sha512-RlLTaofEoOrMK1JoXYIGhKTkJFI/6rFrYPgxy6QlZo2BcVc4HGTqEU0rPpzuMq5T/5XcMtAzv1XiLA3zRTfygw==} + engines: {node: '>=12'} + dev: true + + /d3-interpolate/1.4.0: + resolution: {integrity: sha512-V9znK0zc3jOPV4VD2zZn0sDhZU3WAE2bmlxdIwwQPPzPjvyLkd8B3JUVdS1IDUFDkWZ72c9qnv1GK2ZagTZ8EA==} + dependencies: + d3-color: 1.4.1 + dev: true + + /d3-interpolate/3.0.1: + resolution: {integrity: sha512-3bYs1rOD33uo8aqJfKP3JWPAibgw8Zm2+L9vBKEHJ2Rg+viTR7o5Mmv5mZcieN+FRYaAOWX5SJATX6k1PWz72g==} + engines: {node: '>=12'} + dependencies: + d3-color: 3.0.1 + dev: true + + /d3-path/1.0.9: + resolution: {integrity: sha512-VLaYcn81dtHVTjEHd8B+pbe9yHWpXKZUC87PzoFmsFrJqgFwDe/qxfp5MlfsfM1V5E/iVt0MmEbWQ7FVIXh/bg==} + dev: true + + /d3-path/3.0.1: + resolution: {integrity: sha512-gq6gZom9AFZby0YLduxT1qmrp4xpBA1YZr19OI717WIdKE2OM5ETq5qrHLb301IgxhLwcuxvGZVLeeWc/k1I6w==} + engines: {node: '>=12'} + dev: true + + /d3-polygon/1.0.6: + resolution: {integrity: sha512-k+RF7WvI08PC8reEoXa/w2nSg5AUMTi+peBD9cmFc+0ixHfbs4QmxxkarVal1IkVkgxVuk9JSHhJURHiyHKAuQ==} + dev: true + + /d3-polygon/3.0.1: + resolution: {integrity: sha512-3vbA7vXYwfe1SYhED++fPUQlWSYTTGmFmQiany/gdbiWgU/iEyQzyymwL9SkJjFFuCS4902BSzewVGsHHmHtXg==} + engines: {node: '>=12'} + dev: true + + /d3-quadtree/1.0.7: + resolution: {integrity: sha512-RKPAeXnkC59IDGD0Wu5mANy0Q2V28L+fNe65pOCXVdVuTJS3WPKaJlFHer32Rbh9gIo9qMuJXio8ra4+YmIymA==} + dev: true + + /d3-quadtree/3.0.1: + resolution: {integrity: sha512-04xDrxQTDTCFwP5H6hRhsRcb9xxv2RzkcsygFzmkSIOJy3PeRJP7sNk3VRIbKXcog561P9oU0/rVH6vDROAgUw==} + engines: {node: '>=12'} + dev: true + + /d3-random/1.1.2: + resolution: {integrity: sha512-6AK5BNpIFqP+cx/sreKzNjWbwZQCSUatxq+pPRmFIQaWuoD+NrbVWw7YWpHiXpCQ/NanKdtGDuB+VQcZDaEmYQ==} + dev: true + + /d3-random/3.0.1: + resolution: {integrity: sha512-FXMe9GfxTxqd5D6jFsQ+DJ8BJS4E/fT5mqqdjovykEB2oFbTMDVdg1MGFxfQW+FBOGoB++k8swBrgwSHT1cUXQ==} + engines: {node: '>=12'} + dev: true + + /d3-scale-chromatic/1.5.0: + resolution: {integrity: sha512-ACcL46DYImpRFMBcpk9HhtIyC7bTBR4fNOPxwVSl0LfulDAwyiHyPOTqcDG1+t5d4P9W7t/2NAuWu59aKko/cg==} + dependencies: + d3-color: 1.4.1 + d3-interpolate: 1.4.0 + dev: true + + /d3-scale-chromatic/3.0.0: + resolution: {integrity: sha512-Lx9thtxAKrO2Pq6OO2Ua474opeziKr279P/TKZsMAhYyNDD3EnCffdbgeSYN5O7m2ByQsxtuP2CSDczNUIZ22g==} + engines: {node: '>=12'} + dependencies: + d3-color: 3.0.1 + d3-interpolate: 3.0.1 + dev: true + + /d3-scale/2.2.2: + resolution: {integrity: sha512-LbeEvGgIb8UMcAa0EATLNX0lelKWGYDQiPdHj+gLblGVhGLyNbaCn3EvrJf0A3Y/uOOU5aD6MTh5ZFCdEwGiCw==} + dependencies: + d3-array: 1.2.4 + d3-collection: 1.0.7 + d3-format: 1.4.5 + d3-interpolate: 1.4.0 + d3-time: 1.1.0 + d3-time-format: 2.3.0 + dev: true + + /d3-scale/4.0.0: + resolution: {integrity: sha512-foHQYKpWQcyndH1CGoHdUC4PECxTxonzwwBXGT8qu+Drb1FIc6ON6dG2P5f4hRRMkLiIKeWK7iFtdznDUrnuPQ==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.0.2 + d3-format: 3.0.1 + d3-interpolate: 3.0.1 + d3-time: 3.0.0 + d3-time-format: 4.0.0 + dev: true + + /d3-selection/1.4.2: + resolution: {integrity: sha512-SJ0BqYihzOjDnnlfyeHT0e30k0K1+5sR3d5fNueCNeuhZTnGw4M4o8mqJchSwgKMXCNFo+e2VTChiSJ0vYtXkg==} + dev: true + + /d3-selection/3.0.0: + resolution: {integrity: sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==} + engines: {node: '>=12'} + dev: true + + /d3-shape/1.3.7: + resolution: {integrity: sha512-EUkvKjqPFUAZyOlhY5gzCxCeI0Aep04LwIRpsZ/mLFelJiUfnK56jo5JMDSE7yyP2kLSb6LtF+S5chMk7uqPqw==} + dependencies: + d3-path: 1.0.9 + dev: true + + /d3-shape/3.0.1: + resolution: {integrity: sha512-HNZNEQoDhuCrDWEc/BMbF/hKtzMZVoe64TvisFLDp2Iyj0UShB/E6/lBsLlJTfBMbYgftHj90cXJ0SEitlE6Xw==} + engines: {node: '>=12'} + dependencies: + d3-path: 3.0.1 + dev: true + + /d3-time-format/2.3.0: + resolution: {integrity: sha512-guv6b2H37s2Uq/GefleCDtbe0XZAuy7Wa49VGkPVPMfLL9qObgBST3lEHJBMUp8S7NdLQAGIvr2KXk8Hc98iKQ==} + dependencies: + d3-time: 1.1.0 + dev: true + + /d3-time-format/4.0.0: + resolution: {integrity: sha512-nzaCwlj+ZVBIlFuVOT1RmU+6xb/7D5IcnhHzHQcBgS/aTa5K9fWZNN5LCXA27LgF5WxoSNJqKBbLcGMtM6Ca6A==} + engines: {node: '>=12'} + dependencies: + d3-time: 3.0.0 + dev: true + + /d3-time/1.1.0: + resolution: {integrity: sha512-Xh0isrZ5rPYYdqhAVk8VLnMEidhz5aP7htAADH6MfzgmmicPkTo8LhkLxci61/lCB7n7UmE3bN0leRt+qvkLxA==} + dev: true + + /d3-time/3.0.0: + resolution: {integrity: sha512-zmV3lRnlaLI08y9IMRXSDshQb5Nj77smnfpnd2LrBa/2K281Jijactokeak14QacHs/kKq0AQ121nidNYlarbQ==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.0.2 + dev: true + + /d3-timer/1.0.10: + resolution: {integrity: sha512-B1JDm0XDaQC+uvo4DT79H0XmBskgS3l6Ve+1SBCfxgmtIb1AVrPIoqd+nPSv+loMX8szQ0sVUhGngL7D5QPiXw==} + dev: true + + /d3-timer/3.0.1: + resolution: {integrity: sha512-ndfJ/JxxMd3nw31uyKoY2naivF+r29V+Lc0svZxe1JvvIRmi8hUsrMvdOwgS1o6uBHmiz91geQ0ylPP0aj1VUA==} + engines: {node: '>=12'} + dev: true + + /d3-transition/1.3.2: + resolution: {integrity: sha512-sc0gRU4PFqZ47lPVHloMn9tlPcv8jxgOQg+0zjhfZXMQuvppjG6YuwdMBE0TuqCZjeJkLecku/l9R0JPcRhaDA==} + dependencies: + d3-color: 1.4.1 + d3-dispatch: 1.0.6 + d3-ease: 1.0.7 + d3-interpolate: 1.4.0 + d3-selection: 1.4.2 + d3-timer: 1.0.10 + dev: true + + /d3-transition/3.0.1_d3-selection@3.0.0: + resolution: {integrity: sha512-ApKvfjsSR6tg06xrL434C0WydLr7JewBB3V+/39RMHsaXTOG0zmt/OAXeng5M5LBm0ojmxJrpomQVZ1aPvBL4w==} + engines: {node: '>=12'} + peerDependencies: + d3-selection: 2 - 3 + dependencies: + d3-color: 3.0.1 + d3-dispatch: 3.0.1 + d3-ease: 3.0.1 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-timer: 3.0.1 + dev: true + + /d3-voronoi/1.1.4: + resolution: {integrity: sha512-dArJ32hchFsrQ8uMiTBLq256MpnZjeuBtdHpaDlYuQyjU0CVzCJl/BVW+SkszaAeH95D/8gxqAhgx0ouAWAfRg==} + dev: true + + /d3-zoom/1.8.3: + resolution: {integrity: sha512-VoLXTK4wvy1a0JpH2Il+F2CiOhVu7VRXWF5M/LroMIh3/zBAC3WAt7QoIvPibOavVo20hN6/37vwAsdBejLyKQ==} + dependencies: + d3-dispatch: 1.0.6 + d3-drag: 1.2.5 + d3-interpolate: 1.4.0 + d3-selection: 1.4.2 + d3-transition: 1.3.2 + dev: true + + /d3-zoom/3.0.0: + resolution: {integrity: sha512-b8AmV3kfQaqWAuacbPuNbL6vahnOJflOhexLzMMNLga62+/nh0JzvJ0aO/5a5MVgUFGS7Hu1P9P03o3fJkDCyw==} + engines: {node: '>=12'} + dependencies: + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-interpolate: 3.0.1 + d3-selection: 3.0.0 + d3-transition: 3.0.1_d3-selection@3.0.0 + dev: true + + /d3/5.16.0: + resolution: {integrity: sha512-4PL5hHaHwX4m7Zr1UapXW23apo6pexCgdetdJ5kTmADpG/7T9Gkxw0M0tf/pjoB63ezCCm0u5UaFYy2aMt0Mcw==} + dependencies: + d3-array: 1.2.4 + d3-axis: 1.0.12 + d3-brush: 1.1.6 + d3-chord: 1.0.6 + d3-collection: 1.0.7 + d3-color: 1.4.1 + d3-contour: 1.3.2 + d3-dispatch: 1.0.6 + d3-drag: 1.2.5 + d3-dsv: 1.2.0 + d3-ease: 1.0.7 + d3-fetch: 1.2.0 + d3-force: 1.2.1 + d3-format: 1.4.5 + d3-geo: 1.12.1 + d3-hierarchy: 1.1.9 + d3-interpolate: 1.4.0 + d3-path: 1.0.9 + d3-polygon: 1.0.6 + d3-quadtree: 1.0.7 + d3-random: 1.1.2 + d3-scale: 2.2.2 + d3-scale-chromatic: 1.5.0 + d3-selection: 1.4.2 + d3-shape: 1.3.7 + d3-time: 1.1.0 + d3-time-format: 2.3.0 + d3-timer: 1.0.10 + d3-transition: 1.3.2 + d3-voronoi: 1.1.4 + d3-zoom: 1.8.3 + dev: true + + /d3/7.0.1: + resolution: {integrity: sha512-74zonD4nAtxF9dtwFwJ3RuoHPh2D/UTFX26midBuMVH+7pRbOezuyLUIb8mbQMuYFlcUXT+xy++orCmnvMM/CA==} + engines: {node: '>=12'} + dependencies: + d3-array: 3.0.2 + d3-axis: 3.0.0 + d3-brush: 3.0.0 + d3-chord: 3.0.1 + d3-color: 3.0.1 + d3-contour: 3.0.1 + d3-delaunay: 6.0.2 + d3-dispatch: 3.0.1 + d3-drag: 3.0.0 + d3-dsv: 3.0.1 + d3-ease: 3.0.1 + d3-fetch: 3.0.1 + d3-force: 3.0.0 + d3-format: 3.0.1 + d3-geo: 3.0.1 + d3-hierarchy: 3.0.1 + d3-interpolate: 3.0.1 + d3-path: 3.0.1 + d3-polygon: 3.0.1 + d3-quadtree: 3.0.1 + d3-random: 3.0.1 + d3-scale: 4.0.0 + d3-scale-chromatic: 3.0.0 + d3-selection: 3.0.0 + d3-shape: 3.0.1 + d3-time: 3.0.0 + d3-time-format: 4.0.0 + d3-timer: 3.0.1 + d3-transition: 3.0.1_d3-selection@3.0.0 + d3-zoom: 3.0.0 + dev: true + + /dagre-d3/0.6.4: + resolution: {integrity: sha512-e/6jXeCP7/ptlAM48clmX4xTZc5Ek6T6kagS7Oz2HrYSdqcLZFLqpAfh7ldbZRFfxCZVyh61NEPR08UQRVxJzQ==} + dependencies: + d3: 5.16.0 + dagre: 0.8.5 + graphlib: 2.1.8 + lodash: 4.17.21 + dev: true + + /dagre/0.8.5: + resolution: {integrity: sha512-/aTqmnRta7x7MCCpExk7HQL2O4owCT2h8NT//9I1OQ9vt29Pa0BzSAkR5lwFUcQ7491yVi/3CXU9jQ5o0Mn2Sw==} + dependencies: + graphlib: 2.1.8 + lodash: 4.17.21 + dev: true + /dargs/7.0.0: resolution: {integrity: sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==} engines: {node: '>=8'} @@ -4443,6 +4968,12 @@ packages: isobject: 3.0.1 dev: true + /delaunator/5.0.0: + resolution: {integrity: sha512-AyLvtyJdbv/U1GkiS6gUUzclRoAY4Gs75qkMygJJhU75LW4DNuSF2RMzpxs9jw9Oz1BobHjTdkG3zdP55VxAqw==} + dependencies: + robust-predicates: 3.0.1 + dev: true + /delayed-stream/1.0.0: resolution: {integrity: sha1-3zrhmayt+31ECqrgsp4icrJOxhk=} engines: {node: '>=0.4.0'} @@ -4539,7 +5070,7 @@ packages: reduce-unique: 2.0.1 reduce-without: 1.0.1 test-value: 3.0.0 - walk-back: 5.0.0 + walk-back: 5.1.0 dev: true /dmg-license/1.0.9: @@ -4572,6 +5103,10 @@ packages: dependencies: webidl-conversions: 5.0.0 + /dompurify/2.3.1: + resolution: {integrity: sha512-xGWt+NHAQS+4tpgbOAI08yxW0Pr256Gu/FNE2frZVTbgrBUn8M7tz7/ktS/LZ2MHeGqz6topj0/xY+y8R5FBFw==} + dev: true + /dot-prop/5.3.0: resolution: {integrity: sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==} engines: {node: '>=8'} @@ -4983,6 +5518,16 @@ packages: to-regex: 3.0.2 dev: true + /extract-zip/1.7.0: + resolution: {integrity: sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==} + hasBin: true + dependencies: + concat-stream: 1.6.2 + debug: 2.6.9 + mkdirp: 0.5.5 + yauzl: 2.10.0 + dev: true + /extsprintf/1.4.0: resolution: {integrity: sha1-4mifjzVvrWLMplo6kcXfX5VRaS8=} engines: {'0': node >=0.6.0} @@ -5023,6 +5568,12 @@ packages: dependencies: bser: 2.1.1 + /fd-slicer/1.1.0: + resolution: {integrity: sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=} + dependencies: + pend: 1.2.0 + dev: true + /file-entry-cache/6.0.1: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} @@ -5038,6 +5589,11 @@ packages: glob: 7.1.7 dev: true + /file-url/3.0.0: + resolution: {integrity: sha512-g872QGsHexznxkIAdK8UiZRe7SkE6kvylShU4Nsj8NvfvZag7S0QuQ4IgvPDkk75HxgjIVDwycFTDAgIiO4nDA==} + engines: {node: '>=8'} + dev: true + /filelist/1.0.2: resolution: {integrity: sha512-z7O0IS8Plc39rTCq6i6iHxk43duYOn8uFJiWSewIq0Bww1RNybVHSCjahmcC87ZqAm4OTvFzlzeGu3XAzG1ctQ==} dependencies: @@ -5366,6 +5922,12 @@ packages: resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} dev: true + /graphlib/2.1.8: + resolution: {integrity: sha512-jcLLfkpoVGmH7/InMC/1hIvOPSUh38oJtGhvrOFGzioE1DZ+0YW16RgmOJhHiuWTvGiJQ9Z1Ik43JvkRPRvE+A==} + dependencies: + lodash: 4.17.21 + dev: true + /handlebars/4.7.7: resolution: {integrity: sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==} engines: {node: '>=0.4.7'} @@ -5443,6 +6005,10 @@ packages: resolution: {integrity: sha512-WdZTbAByD+pHfl/g9QSsBIIwy8IT+EsPiKDs0KNX+zSHhdDLFKdZu0BQHljvO+0QI/BasbMSUa8wYNCZTvhslg==} dev: false + /highlight.js/10.7.3: + resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + dev: true + /hosted-git-info/2.8.9: resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} dev: true @@ -5476,6 +6042,16 @@ packages: transitivePeerDependencies: - supports-color + /https-proxy-agent/4.0.0: + resolution: {integrity: sha512-zoDhWrkR3of1l9QAL8/scJZyLu8j/gBkcwcaQOZh7Gyh/+uJQzGVETdgT30akuwkpL8HTRfssqI3BZuV18teDg==} + engines: {node: '>= 6.0.0'} + dependencies: + agent-base: 5.1.1 + debug: 4.3.2 + transitivePeerDependencies: + - supports-color + dev: true + /https-proxy-agent/5.0.0: resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==} engines: {node: '>= 6'} @@ -5519,7 +6095,6 @@ packages: engines: {node: '>=0.10.0'} dependencies: safer-buffer: 2.1.2 - dev: false /icss-replace-symbols/1.1.0: resolution: {integrity: sha1-Bupvg2ead0njhs/h/oEq5dsiPe0=} @@ -5582,6 +6157,10 @@ packages: once: 1.4.0 wrappy: 1.0.2 + /inherits/2.0.3: + resolution: {integrity: sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=} + dev: true + /inherits/2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -5593,6 +6172,11 @@ packages: engines: {node: '>=10'} dev: false + /internmap/2.0.1: + resolution: {integrity: sha512-Ujwccrj9FkGqjbY3iVoxD1VV+KdZZeENx0rphrtzmRXbFvkFO88L80BL/zeSIguX/7T+y8k04xqtgWgS5vxwxw==} + engines: {node: '>=12'} + dev: true + /invariant/2.2.4: resolution: {integrity: sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA==} dependencies: @@ -6624,6 +7208,10 @@ packages: json-buffer: 3.0.0 dev: false + /khroma/1.4.1: + resolution: {integrity: sha512-+GmxKvmiRuCcUYDgR7g5Ngo0JEDeOsGdNONdU2zsiBQaK4z19Y2NvXqfEDE0ZiIrg45GTZyAnPLVsLZZACYm3Q==} + dev: true + /kind-of/3.2.2: resolution: {integrity: sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=} engines: {node: '>=0.10.0'} @@ -6819,6 +7407,10 @@ packages: resolution: {integrity: sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=} dev: false + /lodash.flow/3.5.0: + resolution: {integrity: sha1-h79AKSuM+D5OjOGjrkIJ4gBxZ1o=} + dev: true + /lodash.isequal/4.5.0: resolution: {integrity: sha1-QVxEePK8wwEgwizhDtMib30+GOA=} dev: false @@ -6847,6 +7439,10 @@ packages: resolution: {integrity: sha1-UvBWEP/53tQiYRRB7R/BI6AwAbM=} dev: true + /lodash.repeat/4.1.0: + resolution: {integrity: sha1-/H3oEx2MisB+S0n3T/6CnR8r7EQ=} + dev: true + /lodash.startcase/4.4.0: resolution: {integrity: sha1-lDbjTtJgk+1/+uGTYUQ1CRXZrdg=} dev: true @@ -6959,6 +7555,10 @@ packages: object-visit: 1.0.1 dev: true + /markdown-it-abbr/1.0.4: + resolution: {integrity: sha1-1mtTZFIcuz3Yqlna37ovtoZcj9g=} + dev: true + /markdown-it-anchor/5.3.0_markdown-it@10.0.0: resolution: {integrity: sha512-/V1MnLL/rgJ3jkMWo84UR+K+jF1cxNG1a+KwqeXqTIJ+jtA8aWSHuigx8lTzauiIjBDbwF3NcWQMotd0Dm39jA==} peerDependencies: @@ -6967,6 +7567,83 @@ packages: markdown-it: 10.0.0 dev: true + /markdown-it-attrs/3.0.3_markdown-it@10.0.0: + resolution: {integrity: sha512-cLnICU2t61skNCr4Wih/sdza+UbQcqJGZwvqAypnbWA284nzDm+Gpc90iaRk/JjsIy4emag5v3s0rXFhFBWhCA==} + engines: {node: '>=6'} + peerDependencies: + markdown-it: '>= 9.0.0 < 12.0.0' + dependencies: + markdown-it: 10.0.0 + dev: true + + /markdown-it-container/2.0.0: + resolution: {integrity: sha1-ABm0P9Au7+zi8ZYKKJX7qBpARpU=} + dev: true + + /markdown-it-deflist/2.1.0: + resolution: {integrity: sha512-3OuqoRUlSxJiuQYu0cWTLHNhhq2xtoSFqsZK8plANg91+RJQU1ziQ6lA2LzmFAEes18uPBsHZpcX6We5l76Nzg==} + dev: true + + /markdown-it-emoji/1.4.0: + resolution: {integrity: sha1-m+4OmpkKljupbfaYDE/dsF37Tcw=} + dev: true + + /markdown-it-expand-tabs/1.0.13: + resolution: {integrity: sha512-ODpk98FWkGIq2vkwm2NOLt4G6TRgy3M9eTa9SFm06pUyOd0zjjYAwkhsjiCDU42pzKuz0ChiwBO0utuOj3LNOA==} + dependencies: + lodash.repeat: 4.1.0 + dev: true + + /markdown-it-footnote/3.0.3: + resolution: {integrity: sha512-YZMSuCGVZAjzKMn+xqIco9d1cLGxbELHZ9do/TSYVzraooV8ypsppKNmUJ0fVH5ljkCInQAtFpm8Rb3eXSrt5w==} + dev: true + + /markdown-it-highlightjs/3.5.0: + resolution: {integrity: sha512-ENlFiNFSKwnXD0umIzyhpFe5JtetdQnSYhwTdC72VU3C69uVpk1Mn3sPv1Ov8opVE2nv7SaS97QbY/aEH7PUzw==} + dependencies: + highlight.js: 10.7.3 + lodash.flow: 3.5.0 + dev: true + + /markdown-it-ins/3.0.1: + resolution: {integrity: sha512-32SSfZqSzqyAmmQ4SHvhxbFqSzPDqsZgMHDwxqPzp+v+t8RsmqsBZRG+RfRQskJko9PfKC2/oxyOs4Yg/CfiRw==} + dev: true + + /markdown-it-lazy-headers/0.1.3: + resolution: {integrity: sha1-5w3U2nnIepzoLKRwG4t8Di1yKXs=} + dev: true + + /markdown-it-mark/3.0.1: + resolution: {integrity: sha512-HyxjAu6BRsdt6Xcv6TKVQnkz/E70TdGXEFHRYBGLncRE9lBFwDNLVtFojKxjJWgJ+5XxUwLaHXy+2sGBbDn+4A==} + dev: true + + /markdown-it-mermaid-pro/2.2.5: + resolution: {integrity: sha512-OYtIfHqPjdeErCt/3AGOQV4ObzH6BT3T1TpnPu/PWFjtQhaCvl1l2Tv1sP/Qg78jd3knuymy2dcWCdj6UQ/b+Q==} + engines: {node: '>=6.0.0'} + dependencies: + file-url: 3.0.0 + lodash: 4.17.21 + markdown-it: 10.0.0 + markdown-it-container: 2.0.0 + mermaid: 8.12.0 + path: 0.12.7 + puppeteer: 2.1.1 + transitivePeerDependencies: + - supports-color + dev: true + + /markdown-it-sub/1.0.0: + resolution: {integrity: sha1-N1/WAm6ufdywEkl/ZBEZXqHjr+g=} + dev: true + + /markdown-it-sup/1.0.0: + resolution: {integrity: sha1-y5yf+RpSVawI8/09YyhuFd8KH8M=} + dev: true + + /markdown-it-task-lists/2.1.1: + resolution: {integrity: sha512-TxFAc76Jnhb2OUu+n3yz9RMu4CwGfaT788br6HhEDlvWfdeJcLUsxk1Hgw2yJio0OXsxv7pyIPmvECY7bMbluA==} + dev: true + /markdown-it/10.0.0: resolution: {integrity: sha512-YWOP1j7UbDNz+TumYP1kpwnP0aEa711cJjrAQrzd0UXlbJfc5aAq0F/PZHjiioqDC1NKgvIMX+o+9Bk7yuM2dg==} hasBin: true @@ -6978,6 +7655,31 @@ packages: uc.micro: 1.0.6 dev: true + /markdown2html-pro/1.0.6: + resolution: {integrity: sha512-VRMRelqWCDnrF7vKTPT5sQnuqzxQlhCZY/qbzyUsydRcdlBsihyZtx6W5lromeluCmwpi01lEE1Jg4Jy1mmz5w==} + engines: {node: '>=6.0.0'} + dependencies: + lodash: 4.17.21 + markdown-it: 10.0.0 + markdown-it-abbr: 1.0.4 + markdown-it-anchor: 5.3.0_markdown-it@10.0.0 + markdown-it-attrs: 3.0.3_markdown-it@10.0.0 + markdown-it-deflist: 2.1.0 + markdown-it-emoji: 1.4.0 + markdown-it-expand-tabs: 1.0.13 + markdown-it-footnote: 3.0.3 + markdown-it-highlightjs: 3.5.0 + markdown-it-ins: 3.0.1 + markdown-it-lazy-headers: 0.1.3 + markdown-it-mark: 3.0.1 + markdown-it-mermaid-pro: 2.2.5 + markdown-it-sub: 1.0.0 + markdown-it-sup: 1.0.0 + markdown-it-task-lists: 2.1.1 + transitivePeerDependencies: + - supports-color + dev: true + /marked/2.1.3: resolution: {integrity: sha512-/Q+7MGzaETqifOMWYEA7HVMaZb4XbcRfaOzcSsHZEith83KGlvaSG33u0SKu89Mj5h+T8V2hM+8O45Qc5XTgwA==} engines: {node: '>= 10'} @@ -7053,6 +7755,20 @@ packages: engines: {node: '>= 8'} dev: true + /mermaid/8.12.0: + resolution: {integrity: sha512-YegtLgtdpnd+y7J9gfSfFkD7T3G7cXQ6orOL7x4jAx6SWyJSMAQIb34JBKuhagXNsi34nK6gpfHbv63Br7246g==} + dependencies: + '@braintree/sanitize-url': 3.1.0 + d3: 7.0.1 + dagre: 0.8.5 + dagre-d3: 0.6.4 + dompurify: 2.3.1 + graphlib: 2.1.8 + khroma: 1.4.1 + moment-mini: 2.24.0 + stylis: 4.0.10 + dev: true + /micromatch/3.1.10: resolution: {integrity: sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==} engines: {node: '>=0.10.0'} @@ -7093,7 +7809,6 @@ packages: resolution: {integrity: sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==} engines: {node: '>=4.0.0'} hasBin: true - dev: false /mimic-fn/2.1.0: resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} @@ -7139,6 +7854,13 @@ packages: engines: {node: '>= 8.0.0'} dev: true + /mkdirp/0.5.5: + resolution: {integrity: sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==} + hasBin: true + dependencies: + minimist: 1.2.5 + dev: true + /mkdirp/1.0.4: resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} engines: {node: '>=10'} @@ -7157,6 +7879,10 @@ packages: engines: {node: '>=0.10.0'} dev: true + /moment-mini/2.24.0: + resolution: {integrity: sha512-9ARkWHBs+6YJIvrIp0Ik5tyTTtP9PoV0Ssu2Ocq5y9v8+NOOpWiRshAp8c4rZVWTOe+157on/5G+zj5pwIQFEQ==} + dev: true + /ms/2.0.0: resolution: {integrity: sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=} @@ -7544,6 +8270,17 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + /path/0.12.7: + resolution: {integrity: sha1-1NwqUGxM4hl+tIHr/NWzbAFAsQ8=} + dependencies: + process: 0.11.10 + util: 0.10.4 + dev: true + + /pend/1.2.0: + resolution: {integrity: sha1-elfrVQpng/kRUzH89GY9XI4AelA=} + dev: true + /picomatch/2.3.0: resolution: {integrity: sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==} engines: {node: '>=8.6'} @@ -7743,6 +8480,11 @@ packages: /process-nextick-args/2.0.1: resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + /process/0.11.10: + resolution: {integrity: sha1-czIwDoQBYb2j5podHZGn1LwW8YI=} + engines: {node: '>= 0.6.0'} + dev: true + /progress/2.0.3: resolution: {integrity: sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==} engines: {node: '>=0.4.0'} @@ -7755,6 +8497,10 @@ packages: kleur: 3.0.3 sisteransi: 1.0.5 + /proxy-from-env/1.1.0: + resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + dev: true + /pseudomap/1.0.2: resolution: {integrity: sha1-8FKijacOYYkX7wqKw0wa5aaChrM=} dev: true @@ -7779,6 +8525,25 @@ packages: escape-goat: 2.1.1 dev: false + /puppeteer/2.1.1: + resolution: {integrity: sha512-LWzaDVQkk1EPiuYeTOj+CZRIjda4k2s5w4MK4xoH2+kgWV/SDlkYHmxatDdtYrciHUKSXTsGgPgPP8ILVdBsxg==} + engines: {node: '>=8.16.0'} + requiresBuild: true + dependencies: + '@types/mime-types': 2.1.1 + debug: 4.3.2 + extract-zip: 1.7.0 + https-proxy-agent: 4.0.0 + mime: 2.5.2 + mime-types: 2.1.32 + progress: 2.0.3 + proxy-from-env: 1.1.0 + rimraf: 2.7.1 + ws: 6.2.2 + transitivePeerDependencies: + - supports-color + dev: true + /q/1.5.1: resolution: {integrity: sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=} engines: {node: '>=0.6.0', teleport: '>=0.2.0'} @@ -7880,7 +8645,7 @@ packages: /readable-stream/2.3.7: resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} dependencies: - core-util-is: 1.0.2 + core-util-is: 1.0.3 inherits: 2.0.4 isarray: 1.0.0 process-nextick-args: 2.0.1 @@ -8031,6 +8796,16 @@ packages: engines: {node: '>=0.10'} dev: true + /replace-in-file/6.2.0: + resolution: {integrity: sha512-Im2AF9G/qgkYneOc9QwWwUS/efyyonTUBvzXS2VXuxPawE5yQIjT/e6x4CTijO0Quq48lfAujuo+S89RR2TP2Q==} + engines: {node: '>=10'} + hasBin: true + dependencies: + chalk: 4.1.2 + glob: 7.1.7 + yargs: 16.2.0 + dev: true + /require-directory/2.1.1: resolution: {integrity: sha1-jGStX9MNqxyXbiNE/+f3kqam30I=} engines: {node: '>=0.10.0'} @@ -8103,12 +8878,23 @@ packages: engines: {iojs: '>=1.0.0', node: '>=0.10.0'} dev: true + /rimraf/2.7.1: + resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} + hasBin: true + dependencies: + glob: 7.1.7 + dev: true + /rimraf/3.0.2: resolution: {integrity: sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==} hasBin: true dependencies: glob: 7.1.7 + /robust-predicates/3.0.1: + resolution: {integrity: sha512-ndEIpszUHiG4HtDsQLeIuMvRsDnn8c8rYStabochtUeCvfuvNptb5TUbVD68LRAILPX7p9nqQGh4xJgn3EHS/g==} + dev: true + /rsvp/4.8.5: resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==} engines: {node: 6.* || >= 7.*} @@ -8120,6 +8906,10 @@ packages: queue-microtask: 1.2.3 dev: true + /rw/1.3.3: + resolution: {integrity: sha1-P4Yt+pGrdmsUiF700BEkv9oHT7Q=} + dev: true + /rxjs/6.6.7: resolution: {integrity: sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ==} engines: {npm: '>=2.0.0'} @@ -8591,6 +9381,10 @@ packages: engines: {node: '>=8'} dev: true + /stylis/4.0.10: + resolution: {integrity: sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==} + dev: true + /supports-color/5.5.0: resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} engines: {node: '>=4'} @@ -8972,6 +9766,10 @@ packages: dependencies: is-typedarray: 1.0.0 + /typedarray/0.0.6: + resolution: {integrity: sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=} + dev: true + /typescript-json-schema/0.50.1: resolution: {integrity: sha512-GCof/SDoiTDl0qzPonNEV4CHyCsZEIIf+mZtlrjoD8vURCcEzEfa2deRuxYid8Znp/e27eDR7Cjg8jgGrimBCA==} hasBin: true @@ -9131,6 +9929,12 @@ packages: /util-deprecate/1.0.2: resolution: {integrity: sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=} + /util/0.10.4: + resolution: {integrity: sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==} + dependencies: + inherits: 2.0.3 + dev: true + /uuid/3.4.0: resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. @@ -9191,6 +9995,11 @@ packages: engines: {node: '>=14.0.0'} dev: true + /walk-back/5.1.0: + resolution: {integrity: sha512-Uhxps5yZcVNbLEAnb+xaEEMdgTXl9qAQDzKYejG2AZ7qPwRQ81lozY9ECDbjLPNWm7YsO1IK5rsP1KoQzXAcGA==} + engines: {node: '>=12.17'} + dev: true + /walker/1.0.7: resolution: {integrity: sha1-L3+bj9ENZ3JisYqITijRlhjgKPs=} dependencies: @@ -9309,6 +10118,12 @@ packages: signal-exit: 3.0.3 typedarray-to-buffer: 3.1.5 + /ws/6.2.2: + resolution: {integrity: sha512-zmhltoSR8u1cnDsD43TX59mzoMZsLKqUweyYBAIvTngR3shc0W6aOZylZmq/7hqyVxPdi+5Ud2QInblgyE72fw==} + dependencies: + async-limiter: 1.0.1 + dev: true + /ws/7.5.3: resolution: {integrity: sha512-kQ/dHIzuLrS6Je9+uv81ueZomEwH0qVYstcAQ4/Z93K8zeko9gtAbttJWzoC5ukqXY1PpoouV3+VSOqEAFt5wg==} engines: {node: '>=8.3.0'} @@ -9437,6 +10252,13 @@ packages: yargs-parser: 20.2.9 dev: false + /yauzl/2.10.0: + resolution: {integrity: sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=} + dependencies: + buffer-crc32: 0.2.13 + fd-slicer: 1.1.0 + dev: true + /yn/3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} diff --git a/scripts/jsdoc2md.js b/scripts/jsdoc2md2html.js similarity index 93% rename from scripts/jsdoc2md.js rename to scripts/jsdoc2md2html.js index c7b988e720a..d49679545bd 100644 --- a/scripts/jsdoc2md.js +++ b/scripts/jsdoc2md2html.js @@ -1,34 +1,40 @@ "use strict" require("source-map-support").install() - +const Markdown2HtmlPro = require('markdown2html-pro').Markdown2HtmlPro; const globby = require("globby") const path = require("path") const fs = require("fs-extra") const jsdoc2md = require("jsdoc-to-markdown") const pathSorter = require("path-sort") const source = path.join(__dirname, "jsdoc", "out") +const replace = require('replace-in-file'); async function main() { + // JSDoc generates weird types with `<>` suffix (such as URL<> or Platform<>), so the hack is to just remove those entries before we process the doc to `.md` + const options = { + files: path.join(source, "**/*.js"), + from: /<>/g, + to: '', + }; + await replace.replaceInFile(options) + const partialDir = path.join(__dirname, "jsdoc") const partials = (await globby(["*.hbs"], {cwd: partialDir})).map(it => path.resolve(partialDir, it)) + const files = [ + path.join(source, "builder/electron-builder.js"), + path.join(source, "publisher/electron-publish.js"), + path.join(source, "updater/electron-updater.js"), + path.join(source, "builder-lib/app-builder-lib.js"), + path.join(source, "builder-util-runtime/builder-util-runtime.js"), + path.join(source, "util/builder-util.js"), + ] const pages = [ { page: "api/electron-builder.md", pageUrl: "electron-builder", - files: [ - path.join(source, "util/builder-util.js"), - path.join(source, "builder/electron-builder.js"), - ] + files }, - - // { - // page: "auto-update.md", pageUrl: "auto-update", mainHeader: "API", - // files: [ - // path.join(source, "updater/electron-updater.js"), - // path.join(source, "builder-util-runtime/builder-util-runtime.js"), - // ] - // }, ] const jsdoc2MdOptions = { @@ -38,12 +44,7 @@ async function main() { path.join(partialDir, "helpers.js") ], } - await render2([ - path.join(source, "builder", "electron-builder.js"), - path.join(source, "builder-lib", "app-builder-lib.js"), - path.join(source, "builder-util-runtime", "builder-util-runtime.js") - ], jsdoc2MdOptions) - + await render2(files, jsdoc2MdOptions) await render(pages, jsdoc2MdOptions) } @@ -209,14 +210,13 @@ async function render2(files, jsdoc2MdOptions) { new Page("configuration/snap.md", "SnapOptions"), new Page("configuration/publish.md", null, { - "BintrayOptions": "", "GenericServerOptions": "", "GithubOptions": "", + "SnapStoreOptions": "", + "SpacesOptions": "", + "KeygenOptions": "", }), - new Page("generated/s3-options.md", "S3Options"), - new Page("generated/snap-store-options.md", null, {"SnapStoreOptions": ""}), - new Page("generated/spaces-options.md", null, {"SpacesOptions": ""}), new Page("generated/appimage-options.md", "AppImageOptions"), new Page("generated/DebOptions.md", "DebOptions"), @@ -407,7 +407,9 @@ async function render(pages, jsdoc2MdOptions) { } } +const markdown2htmlPro = new Markdown2HtmlPro(); async function writeDocFile(docOutFile, content) { + content = await markdown2htmlPro.markdown2html(content); let existingContent try { existingContent = await fs.readFile(docOutFile, "utf8") diff --git a/scripts/renderer/tsconfig.json b/scripts/renderer/tsconfig.json index 6aa392fb66b..4e3e377b93f 100644 --- a/scripts/renderer/tsconfig.json +++ b/scripts/renderer/tsconfig.json @@ -1,9 +1,7 @@ { "extends": "../../tsconfig-base.json", "compilerOptions": { - "outDir": "out", - "module": "commonjs", - "skipLibCheck": true + "outDir": "out" }, "declaration": false, "include": [ diff --git a/test/snapshots/BuildTest.js.snap b/test/snapshots/BuildTest.js.snap index ba4e5a65e55..50e7199fc66 100644 --- a/test/snapshots/BuildTest.js.snap +++ b/test/snapshots/BuildTest.js.snap @@ -503,18 +503,15 @@ Object { "LICENSE": Object { "size": 1077, }, - "float.patch": Object { - "size": 16278, - }, "lib": Object { "files": Object { "util.js": Object { - "size": 3021, + "size": 3039, }, }, }, "package.json": Object { - "size": 373, + "size": 402, }, }, }, diff --git a/tsconfig.json b/tsconfig.json index 41fcd51cd3b..b57cd5d334d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "./test" + }, + { + "path": "./scripts/renderer" } ] } \ No newline at end of file