Compare commits
285 Commits
Author | SHA1 | Date |
---|---|---|
Mascali | 13714e889f | |
Mascali | 6aa836da30 | |
Mascali | 8f671a0f89 | |
Mascali | fa3a82a1dd | |
Thomas (DJ1TJOO) | 0713c850ec | |
Даниїл Григор'єв | ed6922f912 | |
tobspr | b07e04e7b1 | |
tobspr | 885d1e609e | |
tobspr | b42488f7b5 | |
tobspr | e0bc74a4fd | |
tobspr | ee2279d5f0 | |
tobspr | 82980ae849 | |
Carlos Morette | c93435f510 | |
tobspr | c77e428ffb | |
tobspr | b0c9894bf6 | |
tobspr | 400ee8e737 | |
Gumball73 | 81e3d2ba76 | |
tobspr | 52166fdd86 | |
tobspr | b67f925f4f | |
tobspr | a5022443f3 | |
tobspr | 8ff2f43d0c | |
tobspr | 934cba22a2 | |
tobspr | 3b79662721 | |
LSowyer | c51468157f | |
tobspr | e4f8d3b569 | |
tobspr | 8454a782b4 | |
tobspr | a39195c972 | |
tobspr | 56296ab88a | |
tobspr | 80754247a1 | |
tobspr | 39b4f44018 | |
tobspr | e2907a1ab8 | |
tobspr | 1e6199b213 | |
tobspr | 4e25bf4045 | |
tobspr | aa273d39a1 | |
tobspr | 9f3cf49fad | |
Lolappa | 3a43cdcb47 | |
tobspr | d976245cc1 | |
tobspr | befd8a7877 | |
tobspr | 5627d656cc | |
tobspr | dab688cefb | |
tobspr | 3bf9bfe066 | |
tobspr | 1e8c5f7074 | |
Ivan | 7694b7be2b | |
Gumball73 | b33d54ccab | |
timofey | 0bd43b28c3 | |
tobspr | 42cfeed771 | |
tobspr | 4796aec1ff | |
tobspr | bb363ce69e | |
tobspr | 1235e70c74 | |
tobspr | a187cd7f25 | |
tobspr | 99b5688039 | |
tobspr | 3988d71f5a | |
tobspr | e4da0e437b | |
tobspr | 566d80a928 | |
tobspr | ae485a0385 | |
tobspr | 715b04fd32 | |
tobspr | acbbf5a539 | |
Robert Ferree | 512174ee93 | |
Gumball73 | d94dab55d5 | |
tobspr | e0ccf06531 | |
tobspr | c35349a668 | |
tobspr | 8001727196 | |
tobspr | d3d364b0f2 | |
tobspr | 145f734907 | |
tobspr | b446a4a915 | |
tobspr | 52629c5bb2 | |
tobspr | 88f5c41716 | |
Stoneblackdog | f09ad8f9a0 | |
tobspr | 0052c30553 | |
tobspr | a065c64baa | |
tobspr | 7797546ed4 | |
tobspr | 690483fd89 | |
tobspr | b9a72fe965 | |
tobspr | 8c952435e7 | |
tobspr | 4056cdaad2 | |
tobspr | 773609a2e2 | |
tobspr | 8c5e593ceb | |
tobspr | 482a4990ba | |
tobspr | c3f029d887 | |
tobspr | 424a4b8a61 | |
tobspr | 4faea1aea9 | |
tobspr | 166b288898 | |
tobspr | 2ddbdda4b3 | |
tobspr | 75b49b3b1b | |
tobspr | 3fe2264c80 | |
tobspr | ffe9095d2e | |
tobspr | 1642354f40 | |
tobspr | 3ab5ca99fd | |
Jasper Meggitt | 2d45fa8cd1 | |
tobspr | 6a8e519c0a | |
tobspr | 34764eca16 | |
tobspr | 7c77944d43 | |
tobspr | e870317a4f | |
tobspr | c74e4b9819 | |
tobspr | 34ed689875 | |
tobspr | 7fe088a0c8 | |
tobspr | 4c515eb6e8 | |
tobspr | 574a9d9d25 | |
tobspr | 3717fe16c1 | |
tobspr | d790a9355f | |
tobspr | fde4ff9e5e | |
tobspr | 913149d5b8 | |
tobspr | 0eeb03baf7 | |
tobspr | dfa392907d | |
tobspr | 400cc5fe81 | |
tobspr | de56764103 | |
tobspr | e730a88ad1 | |
tobspr | 51fcc1e470 | |
tobspr | 11d2c701a2 | |
tobspr | 37ff7a132e | |
tobspr | 4ba70cf2ef | |
tobspr | e57a1f8212 | |
tobspr | 9b8789527e | |
tobspr | 42112f1660 | |
tobspr | 8f6ccc0d67 | |
tobspr | 5ef7749a09 | |
tobspr | d39ae528f0 | |
tobspr | abd26182f5 | |
tobspr | 04e5d340a7 | |
tobspr | 2e1451ab3c | |
tobspr | e2460edb32 | |
tobspr | 2a63d7474c | |
tobspr | 7eef96ec21 | |
tobspr | 24a4010935 | |
tobspr | 0d6bdd9bfb | |
tobspr | aae4395111 | |
tobspr | cc068d8245 | |
tobspr | d766df23e3 | |
tobspr | 15de686de1 | |
tobspr | 80a80c11e6 | |
tobspr | 781273e91d | |
tobspr | de2098f0cf | |
tobspr | 8a669f1a58 | |
tobspr | 197adf8120 | |
tobspr | 2e1271ecb7 | |
tobspr | bf5199d77a | |
tobspr | 07fb65f3b6 | |
tobspr | 3b4ae39caa | |
tobspr | 6abe731b32 | |
tobspr | dd0508e777 | |
tobspr | 96ce442b69 | |
tobspr | 9d28a1f2f6 | |
tobspr | 0a733907d5 | |
tobspr | 6b0fecb4af | |
tobspr | cc835312f4 | |
tobspr | 918dd5dc25 | |
tobspr | f9fa3cd6a7 | |
tobspr | e9e88241b4 | |
Arnaud Stephan | 94253c9370 | |
Povilas Vaitkus | d9dbc20f39 | |
tobspr | 6a79d47158 | |
tobspr | ac4109a900 | |
tobspr | 27906caa84 | |
tobspr | 9b545b7255 | |
tobspr | d2a2293a5f | |
tobspr | 44d0a8bcf7 | |
tobspr | 48ac343260 | |
Puchkov Evgenii | bdc34f1ddd | |
tobspr | 360937ce5f | |
tobspr | 42b6132866 | |
tobspr | 45331dc650 | |
tobspr | 959a365de6 | |
tobspr | e1cd08d2f9 | |
tobspr | 8c5118e41d | |
tobspr | 21e37792e0 | |
tobspr | 737ce41041 | |
tobspr | b821c7259c | |
tobspr | 691911104e | |
tobspr | 4003fdd103 | |
tobspr | de288afeb5 | |
tobspr | c32f987c4f | |
tobspr | 1272ba7614 | |
tobspr | 222ea8c261 | |
tobspr | 09551fa0e5 | |
tobspr | 0d52ded6c8 | |
tobspr | f7b4647352 | |
Scott Miller | d99b68784c | |
SungHyun | 87eccb2ec8 | |
Даниїл Григор'єв | 6ed4542f52 | |
ST3O | b5e836864b | |
IcedDog | a929be5399 | |
tobspr | e789a6c5ea | |
tobspr | 9c247f3756 | |
tobspr | a6b707c917 | |
tobspr | 0974dee6d4 | |
tobspr | 9e0193399f | |
tobspr | f0f259829f | |
IcedDog | e7fd169ecb | |
tobspr | 282f200b9a | |
MaxwellSalmon | 29b0d41d66 | |
tobspr | dea9008c11 | |
tobspr | bbb418a1d8 | |
tobspr | 43430dcbf2 | |
tobspr | 559c0fa854 | |
tobspr | c848f21725 | |
tobspr | 082932bb46 | |
Norbiros | 1715682808 | |
tobspr | 50e92bb42f | |
Norbiros | 7734cefc65 | |
tobspr | c746df3a06 | |
tobspr | 57678664d4 | |
tobspr | 75d3a13688 | |
tobspr | c2c3bd67f4 | |
tobspr | 18f7ff1fea | |
tobspr | ef6e1a223c | |
tobspr | 7e198f2a72 | |
tobspr | 6a0254b358 | |
tobspr | a3a72e95ad | |
Emerald Block | 6c88ccd7e2 | |
HexFive | 9d426f4fe1 | |
Pierre Beitz | 287e8e6ecd | |
Quentin Roy | c9110e81cf | |
Gautam Narayan | 340e252264 | |
Der Feldspatz | 01d1a86cc7 | |
tobspr | 8ef914adc0 | |
Emerald Block | 4e5e5c8ef7 | |
Chunkybanana | ced9e186f5 | |
Pet Pumpkin | 9565bb0c17 | |
Ademaro | 603bb775cd | |
snailman07 | f7c1ece5c6 | |
TcePrepK | 93f91ca8b3 | |
tobspr | 679e7f168c | |
tobspr | 7e436f2f2e | |
tobspr | a74533ed76 | |
tobspr | c743a4968f | |
tobspr | 3079e007a3 | |
tobspr | 6ed7ec6010 | |
tobspr | 556caed760 | |
sou7 | 895a9eb7ae | |
Thomas (DJ1TJOO) | d7c2ca874f | |
tobspr | ea2f32b3ff | |
Dimava | 561318b7db | |
WaffleDevsAlt | 81d65e5801 | |
Ved_s | 4f0af32a5e | |
Daan Breur | 3f3a2e0981 | |
dobidon | c4f26320a4 | |
Pimak | cb5c3f798a | |
Sense101 | dee4f23b7e | |
jbelbaz | b7bc2ac1b7 | |
Pimak | 93b9340ab7 | |
Bagel03 | f534a88f80 | |
Emerald Block | dab4aa9cda | |
Thomas (DJ1TJOO) | 4466821557 | |
Thomas (DJ1TJOO) | 65ae26cb53 | |
Thomas (DJ1TJOO) | e5742fd577 | |
Thomas (DJ1TJOO) | 41c6b1c595 | |
tobspr | 86b104080f | |
tobspr | 71ac87bfac | |
tobspr | bbeb5b1158 | |
tobspr | c0d034520a | |
tobspr | aa8d105e14 | |
Thomas (DJ1TJOO) | 8e38ef0708 | |
WaffleDevsAlt | edd57b3956 | |
Bagel03 | 10fb7ddb5c | |
RevosCZ | a1cc0cc49c | |
tobspr | f13a48e812 | |
Thomas (DJ1TJOO) | cb5df2473e | |
Manolo Edge | e9c26a71e2 | |
Stamen | b30916953f | |
Erik | 4a811be1c1 | |
wed | 25273b308e | |
Thomas (DJ1TJOO) | 97434a8e4f | |
Froggi22 | c346a25d6a | |
Wumpus-js | 896397cfad | |
Gumball73 | 376a4f5b23 | |
Artur Osipov | 8f6e2cd30e | |
tobspr | 2aa30fb32f | |
tobspr | 80b1bc70f4 | |
tobspr | 3ad502c5a7 | |
tobspr | c41aaa1fc5 | |
tobspr | a7a2aad2b6 | |
tobspr | 58fe6e2f51 | |
tobspr | 0d1552e38c | |
tobspr | 06011285d9 | |
Andrei7506238 | dae39dec9f | |
tobspr | f483523f25 | |
tobspr | 112e179bce | |
Erik | 48ad65969e | |
tobspr | f00b8790bc | |
Kruger-Doggie | c26496e7a7 | |
dobidon | 6c24730de7 | |
tobspr | 2a51dad814 | |
tobspr | 358754307a | |
Vincent Ching | a71d5f3db9 | |
battistalonardi | 53d31b32d5 |
|
@ -21,5 +21,6 @@ rules:
|
||||||
prettier/prettier: error
|
prettier/prettier: error
|
||||||
no-undef: off
|
no-undef: off
|
||||||
no-unused-vars: off
|
no-unused-vars: off
|
||||||
|
no-unreachable: off
|
||||||
no-prototype-builtins: off
|
no-prototype-builtins: off
|
||||||
linebreak-style: off
|
linebreak-style: off
|
||||||
|
|
|
@ -13,18 +13,18 @@ jobs:
|
||||||
setup:
|
setup:
|
||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: docker
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get update
|
||||||
sudo apt-get install ffmpeg
|
apt-get install -y ffmpeg
|
||||||
|
|
||||||
- name: Setup Node
|
- name: Setup Node
|
||||||
uses: actions/setup-node@v2-beta
|
uses: actions/setup-node@v2-beta
|
||||||
with:
|
with:
|
||||||
node-version: 10.x
|
node-version: 16.x
|
||||||
|
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -48,7 +48,7 @@ jobs:
|
||||||
|
|
||||||
yaml-lint:
|
yaml-lint:
|
||||||
name: yaml-lint
|
name: yaml-lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: docker
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repo
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -56,3 +56,4 @@ jobs:
|
||||||
uses: ibiqlik/action-yamllint@v1.0.0
|
uses: ibiqlik/action-yamllint@v1.0.0
|
||||||
with:
|
with:
|
||||||
file_or_dir: translations/*.yaml
|
file_or_dir: translations/*.yaml
|
||||||
|
|
||||||
|
|
|
@ -56,3 +56,9 @@ config.local.js
|
||||||
# Editor artifacts
|
# Editor artifacts
|
||||||
*.*.swp
|
*.*.swp
|
||||||
*.*.swo
|
*.*.swo
|
||||||
|
app.vdf
|
||||||
|
|
||||||
|
steamtmp
|
||||||
|
build_output
|
||||||
|
built_vdfs
|
||||||
|
tmp
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
Contributor license agreement (CLA)
|
||||||
|
|
||||||
|
1. Preamble
|
||||||
|
Thank you for your interest in shapez by tobspr IT Solutions (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
|
||||||
|
|
||||||
|
2. General
|
||||||
|
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
|
||||||
|
You represent that you have the full authority to enter into this agreement.
|
||||||
|
|
||||||
|
3. Definitions
|
||||||
|
"You" (or "Your") "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the Company. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
||||||
|
|
||||||
|
"Contribution" "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Company for inclusion in, or documentation of, any of the products owned or managed by the Company (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Company or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Company for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
|
||||||
|
|
||||||
|
4. Grant of Copyright License
|
||||||
|
Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
|
||||||
|
You agree that your changes/additions are incorporated into the source code under a GPL-3 license.
|
||||||
|
You agree that the Company is free to use its code without a GPL-3 license as closed source in any context, including for commercial purposes, without any license whatsoever
|
||||||
|
|
||||||
|
5. Grant of Patent License
|
||||||
|
Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
|
||||||
|
|
||||||
|
6. Liability / Obligations
|
||||||
|
You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Company, or that your employer has executed a separate Corporate CLA with the Company.
|
||||||
|
You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
|
||||||
|
If you make changes or additions to the code, you assume full liability for this and assure that the changes/additions do not infringe the rights of third parties (e.g. copyrights).
|
||||||
|
You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
Should You wish to submit work that is not Your original creation, You may submit it to the Company separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
|
||||||
|
You agree to notify the Company of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
|
||||||
|
|
||||||
|
7. Final provisions
|
||||||
|
The law of the Federal Republic of Germany applies to this agreement.
|
||||||
|
The contract remains binding in its remaining parts even if individual points are legally ineffective. In place of the ineffective points, the statutory provisions, if any, apply. Insofar as this would represent unreasonable hardship for one of the contracting parties, the contract as a whole will become ineffective.
|
|
@ -1,4 +1,4 @@
|
||||||
FROM node:12 as base
|
FROM node:16
|
||||||
|
|
||||||
EXPOSE 3001 3005
|
EXPOSE 3001 3005
|
||||||
|
|
||||||
|
|
121
README.md
|
@ -1,36 +1,52 @@
|
||||||
# shapez.io
|
## NEW: Shapez 2!
|
||||||
|
|
||||||
<img src="https://i.imgur.com/Y5Z2iqQ.png" alt="shapez.io Logo">
|
We are currently working on a successor to shapez, with 3D Graphics, Exploration, Layers, Mass transport, New Shape Mechanics, Research and a lot more! Be sure to check it out:
|
||||||
|
|
||||||
This is the source code for shapez.io, an open source base building game inspired by Factorio.
|
<a href="https://tobspr.io/shapez-2" title="shapez 2">
|
||||||
|
<img src="https://i.imgur.com/6T7UP3p.png" alt="shapez 2 Announcement">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
# shapez
|
||||||
|
|
||||||
|
<a href="https://get.shapez.io/ghi" title="shapez on Steam">
|
||||||
|
<img src="https://i.imgur.com/ihW2bUE.png" alt="shapez Logo">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<hr>
|
||||||
|
This is the source code for shapez, an open source base building game inspired by Factorio.
|
||||||
Your goal is to produce shapes by cutting, rotating, merging and painting parts of shapes.
|
Your goal is to produce shapes by cutting, rotating, merging and painting parts of shapes.
|
||||||
|
|
||||||
- [Steam Page](https://steam.shapez.io)
|
- [Play on Steam](https://get.shapez.io/ghr)
|
||||||
|
- [Online Demo](https://shapez.io)
|
||||||
- [Official Discord](https://discord.com/invite/HN7EVzV) <- _Highly recommended to join!_
|
- [Official Discord](https://discord.com/invite/HN7EVzV) <- _Highly recommended to join!_
|
||||||
- [Trello Board & Roadmap](https://trello.com/b/ISQncpJP/shapezio)
|
- [Trello Board & Roadmap](https://trello.com/b/ISQncpJP/shapezio)
|
||||||
- [itch.io Page](https://tobspr.itch.io/shapezio)
|
|
||||||
- [Free web version](https://shapez.io)
|
|
||||||
|
|
||||||
## Reporting issues, suggestions, feedback, bugs
|
## Reporting issues, suggestions, feedback, bugs
|
||||||
|
|
||||||
1. Ask in `#bugs` / `#feedback` / `#questions` on the [Official Discord](https://discord.com/invite/HN7EVzV) if you are not entirely sure if it's a bug etc.
|
1. Ask in `#bugs` / `#feedback` / `#questions` on the [Official Discord](https://discord.com/invite/HN7EVzV) if you are not entirely sure if it's a bug
|
||||||
2. Check out the trello board: https://trello.com/b/ISQncpJP/shapezio
|
2. Check out the trello board: https://trello.com/b/ISQncpJP/shapezio
|
||||||
3. See if it's already there - If so, vote for it, done. I will see it. (You have to be signed in on trello)
|
3. See if it's already there - If so, vote for it, done. I will see it. (You have to be signed in on trello)
|
||||||
4. If not, check if it's already reported here: https://github.com/tobspr/shapez.io/issues
|
4. If not, check if it's already reported here: https://github.com/tobspr-games/shapez.io/issues
|
||||||
5. If not, file a new issue here: https://github.com/tobspr/shapez.io/issues/new
|
5. If not, file a new issue here: https://github.com/tobspr-games/shapez.io/issues/new
|
||||||
6. I will then have a look (This can take days or weeks) and convert it to trello, and comment with the link. You can then vote there ;)
|
6. I will then have a look (This can take days or weeks) and convert it to trello, and comment with the link. You can then vote there ;)
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
- Make sure `ffmpeg` is on your path
|
- Make sure `ffmpeg` is on your path
|
||||||
- Install Node.js and Yarn
|
- Install Node.js 16 and Yarn
|
||||||
- Install Java (required for textures)
|
- Install Java (required for texture packer)
|
||||||
- Run `yarn` in the root folder
|
- Run `yarn` in the root folder
|
||||||
- Cd into `gulp` folder
|
- `cd` into `gulp` folder
|
||||||
- Run `yarn` and then `yarn gulp` - it should now open in your browser
|
- Run `yarn` and then `yarn gulp` - it should now open in your browser
|
||||||
|
|
||||||
**Notice**: This will produce a debug build with several debugging flags enabled. If you want to disable them, modify [`src/js/core/config.js`](src/js/core/config.js).
|
**Notice**: This will produce a debug build with several debugging flags enabled. If you want to disable them, modify [`src/js/core/config.js`](src/js/core/config.js).
|
||||||
|
|
||||||
|
## Creating Mods
|
||||||
|
|
||||||
|
Mods can be found [here](https://shapez.mod.io). The documentation for creating mods can be found [here](mod_examples/), including a bunch of sample mods.
|
||||||
|
|
||||||
## Build Online with one-click setup
|
## Build Online with one-click setup
|
||||||
|
|
||||||
You can use [Gitpod](https://www.gitpod.io/) (an Online Open Source VS Code-like IDE which is free for Open Source) for working on issues and making PRs to this project. With a single click it will start a workspace and automatically:
|
You can use [Gitpod](https://www.gitpod.io/) (an Online Open Source VS Code-like IDE which is free for Open Source) for working on issues and making PRs to this project. With a single click it will start a workspace and automatically:
|
||||||
|
@ -39,7 +55,7 @@ You can use [Gitpod](https://www.gitpod.io/) (an Online Open Source VS Code-like
|
||||||
- install all of the dependencies.
|
- install all of the dependencies.
|
||||||
- start `gulp` in `gulp/` directory.
|
- start `gulp` in `gulp/` directory.
|
||||||
|
|
||||||
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tobspr/shapez.io)
|
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tobspr-games/shapez.io)
|
||||||
|
|
||||||
## Helping translate
|
## Helping translate
|
||||||
|
|
||||||
|
@ -47,11 +63,9 @@ Please checkout the [Translations readme](translations/).
|
||||||
|
|
||||||
## Contributing
|
## Contributing
|
||||||
|
|
||||||
Since this game is in the more or less early development, I will only accept pull requests which add an immediate benefit. Please understand that low quality PR's might be closed by me with a short comment explaining why.
|
I will only accept pull requests which add a benefit to a large portion of the player base. If the feature is useful but only to a fraction of players, or is controversial, I recommend making a mod instead.
|
||||||
|
|
||||||
**If you want to add a new building, please understand that I can not simply add every building to the game!** I recommend to talk to me before implementing anything, to make sure its actually useful. Otherwise there is a high chance of your PR not getting merged.
|
If you want to add a new feature or in generally contribute I recommend to get in touch on Discord in advance, which largely increases the chance of the PR to get merged:
|
||||||
|
|
||||||
If you want to add a new feature or in generally contribute I recommend to get in touch with me on Discord:
|
|
||||||
|
|
||||||
<a href="https://discord.com/invite/HN7EVzV" target="_blank">
|
<a href="https://discord.com/invite/HN7EVzV" target="_blank">
|
||||||
<img src="https://i.imgur.com/SoawBhW.png" alt="discord logo" width="100">
|
<img src="https://i.imgur.com/SoawBhW.png" alt="discord logo" width="100">
|
||||||
|
@ -62,71 +76,20 @@ If you want to add a new feature or in generally contribute I recommend to get i
|
||||||
The game is based on a custom engine which itself is based on the YORG.io 3 game engine (Actually it shares almost the same core).
|
The game is based on a custom engine which itself is based on the YORG.io 3 game engine (Actually it shares almost the same core).
|
||||||
The code within the engine is relatively clean with some code for the actual game on top being hacky.
|
The code within the engine is relatively clean with some code for the actual game on top being hacky.
|
||||||
|
|
||||||
This project is based on ES5. Some ES2015 features are used but most of them are too slow, especially when polyfilled. For example, `Array.prototype.forEach` is only used within non-critical loops since its slower than a plain for loop.
|
This project is based on ES5 (If I would develop it again, I would definitely use TypeScript). Some ES2015 features are used but most of them are too slow, especially when polyfilled. For example, `Array.prototype.forEach` is only used within non-critical loops since its slower than a plain for loop.
|
||||||
|
|
||||||
#### Adding a new component
|
|
||||||
|
|
||||||
1. Create the component file in `src/js/game/components/<name_lowercase>.js`
|
|
||||||
2. Create a component class (e.g. `MyFancyComponent`) which `extends Component`
|
|
||||||
3. Create a `static getId()` method which should return the `PascalCaseName` without component (e.g. `MyFancy`)
|
|
||||||
4. If any data needs to be persisted, create a `static getSchema()` which should return the properties to be saved (See other components)
|
|
||||||
5. Add a constructor. **The constructor must be called with optional parameters only!** `new MyFancyComponent({})` should always work.
|
|
||||||
6. Add any props you need in the constructor.
|
|
||||||
7. Add the component in `src/js/game/component_registry.js`
|
|
||||||
8. Add the component in `src/js/game/entity_components.js`
|
|
||||||
9. Done! You can use your component now
|
|
||||||
|
|
||||||
#### Adding a new building
|
|
||||||
|
|
||||||
(The easiest way is to copy an existing building)
|
|
||||||
|
|
||||||
1. Create your building in `src/js/game/buildings/<my_building.js>`
|
|
||||||
2. Create the building meta class, e.g. `MetaMyFancyBuilding extends MetaBuilding`
|
|
||||||
3. Override the methods from MetaBuilding you want to override.
|
|
||||||
4. Most important is `setupEntityComponents`
|
|
||||||
5. Add the building to `src/js/game/meta_building_registry.js`: You need to register it on the registry, and also call `registerBuildingVariant`.
|
|
||||||
6. Add the building to the right toolbar, e.g. `src/js/game/hud/parts/buildings_toolbar.js`:`supportedBuildings`
|
|
||||||
7. Add a keybinding for the building in `src/js/game/key_action_mapper.js` in `KEYMAPPINGS.buildings`
|
|
||||||
8. In `translations/base-en.yaml` add it to two sections: `buildings.[my_building].XXX` (See other buildings) and also `keybindings.mappings.[my_building]`. Be sure to do it the same way as other buildings do!
|
|
||||||
9. Create a icon (128x128, [prefab](https://github.com/tobspr/shapez.io-artwork/blob/master/ui/toolbar-icons.psd)) for your building and save it in `res/ui/buildings_icons` with the id of your building
|
|
||||||
10. Create a tutorial image (600x600) for your building and save it in `res/ui/building_tutorials`
|
|
||||||
11. In `src/css/resources.scss` add your building to `$buildings` as well as `$buildingAndVariants`
|
|
||||||
12. Done! Optional: Add a new reward for unlocking your building at some point.
|
|
||||||
|
|
||||||
#### Adding a new game system
|
|
||||||
|
|
||||||
1. Create the class in `src/js/game/systems/<system_name>.js`
|
|
||||||
2. Derive it from `GameSystemWithFilter` if you want it to work on certain entities only which have the given components. Otherwise use `GameSystem` to do more generic stuff.
|
|
||||||
3. Implement the `update()` method.
|
|
||||||
4. Add the system in `src/js/game/game_system_manager.js` (To `this.systems` and also call `add` in the `internalInitSystems()` method)
|
|
||||||
5. If your system should draw stuff, this is a bit more complicated. Have a look at existing systems on how they do it.
|
|
||||||
|
|
||||||
#### Checklist for a new building / testing it
|
|
||||||
|
|
||||||
This is a quick checklist, if a new building is added this points should be fulfilled:
|
|
||||||
|
|
||||||
2. The translation for all variants is done and finalized
|
|
||||||
3. The artwork (regular sprite) is finalized
|
|
||||||
4. The blueprint sprite has been generated and is up to date
|
|
||||||
5. The building has been added to the appropriate toolbar
|
|
||||||
6. The building has a keybinding which makes sense
|
|
||||||
7. The building has a reward assigned and is unlocked at a meaningful point
|
|
||||||
8. The reward for the building has a proper translation
|
|
||||||
9. The reward for the building has a proper image
|
|
||||||
10. The building has a proper tutorial image assigned
|
|
||||||
11. The buliding has a proper toolbar icon
|
|
||||||
12. The reward requires a proper shape
|
|
||||||
13. The building has a proper silhouette color
|
|
||||||
14. The building has a proper matrix for being rendered on the minimap
|
|
||||||
15. The building has proper statistics in the dialog
|
|
||||||
16. The building properly contributes to the shapes produced analytics
|
|
||||||
17. The building is properly persisted in the savegame
|
|
||||||
18. The building is explained properly, ideally via an interactive tutorial
|
|
||||||
|
|
||||||
### Assets
|
### Assets
|
||||||
|
|
||||||
For most assets I use Adobe Photoshop, you can find them <a href="//github.com/tobspr/shapez.io-artwork" target="_blank">here</a>.
|
You can find most assets <a href="//github.com/tobspr-games/shapez.io-artwork" target="_blank">here</a>.
|
||||||
|
|
||||||
All assets will be automatically rebuilt into the atlas once changed (Thanks to dengr1065!)
|
All assets will be automatically rebuilt into the atlas once changed (Thanks to dengr1065!)
|
||||||
|
|
||||||
<img src="https://i.imgur.com/W25Fkl0.png" alt="shapez.io Screenshot">
|
<img src="https://i.imgur.com/W25Fkl0.png" alt="shapez Screenshot">
|
||||||
|
|
||||||
|
<br>
|
||||||
|
|
||||||
|
## Check out our other games!
|
||||||
|
|
||||||
|
<a href="https://tobspr.io" title="tobspr Games">
|
||||||
|
<img src="https://i.imgur.com/uA2wcUy.png" alt="tobspr Games">
|
||||||
|
</a>
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
mods/*.js
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 21 KiB |
|
@ -1,27 +1,40 @@
|
||||||
/* eslint-disable quotes,no-undef */
|
/* eslint-disable quotes,no-undef */
|
||||||
|
|
||||||
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell } = require("electron");
|
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell, dialog, session } = require("electron");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const url = require("url");
|
const url = require("url");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const steam = require("./steam");
|
const steam = require("./steam");
|
||||||
const asyncLock = require("async-lock");
|
const asyncLock = require("async-lock");
|
||||||
|
const windowStateKeeper = require("electron-window-state");
|
||||||
|
|
||||||
const isDev = process.argv.indexOf("--dev") >= 0;
|
// Disable hardware key handling, i.e. being able to pause/resume the game music
|
||||||
const isLocal = process.argv.indexOf("--local") >= 0;
|
// with hardware keys
|
||||||
|
app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling");
|
||||||
|
|
||||||
|
const isDev = app.commandLine.hasSwitch("dev");
|
||||||
|
const isLocal = app.commandLine.hasSwitch("local");
|
||||||
|
const safeMode = app.commandLine.hasSwitch("safe-mode");
|
||||||
|
const externalMod = app.commandLine.getSwitchValue("load-mod");
|
||||||
|
|
||||||
const roamingFolder =
|
const roamingFolder =
|
||||||
process.env.APPDATA ||
|
process.env.APPDATA ||
|
||||||
(process.platform == "darwin"
|
(process.platform == "darwin"
|
||||||
? process.env.HOME + "/Library/Preferences"
|
? process.env.HOME + "/Library/Preferences"
|
||||||
: process.env.HOME + "/.local/share");
|
: process.env.HOME + "/.local/share");
|
||||||
|
|
||||||
let storePath = path.join(roamingFolder, "shapez.io", "saves");
|
let storePath = path.join(roamingFolder, "shapez.io", "saves");
|
||||||
|
let modsPath = path.join(roamingFolder, "shapez.io", "mods");
|
||||||
|
|
||||||
if (!fs.existsSync(storePath)) {
|
if (!fs.existsSync(storePath)) {
|
||||||
// No try-catch by design
|
// No try-catch by design
|
||||||
fs.mkdirSync(storePath, { recursive: true });
|
fs.mkdirSync(storePath, { recursive: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!fs.existsSync(modsPath)) {
|
||||||
|
fs.mkdirSync(modsPath, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
/** @type {BrowserWindow} */
|
/** @type {BrowserWindow} */
|
||||||
let win = null;
|
let win = null;
|
||||||
let menu = null;
|
let menu = null;
|
||||||
|
@ -32,26 +45,44 @@ function createWindow() {
|
||||||
faviconExtension = ".ico";
|
faviconExtension = ".ico";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mainWindowState = windowStateKeeper({
|
||||||
|
defaultWidth: 1000,
|
||||||
|
defaultHeight: 800,
|
||||||
|
});
|
||||||
|
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
width: 1280,
|
x: mainWindowState.x,
|
||||||
height: 800,
|
y: mainWindowState.y,
|
||||||
|
width: mainWindowState.width,
|
||||||
|
height: mainWindowState.height,
|
||||||
show: false,
|
show: false,
|
||||||
backgroundColor: "#222428",
|
backgroundColor: "#222428",
|
||||||
useContentSize: true,
|
useContentSize: false,
|
||||||
minWidth: 800,
|
minWidth: 800,
|
||||||
minHeight: 600,
|
minHeight: 600,
|
||||||
title: "shapez.io Standalone",
|
title: "shapez",
|
||||||
transparent: false,
|
transparent: false,
|
||||||
icon: path.join(__dirname, "favicon" + faviconExtension),
|
icon: path.join(__dirname, "favicon" + faviconExtension),
|
||||||
// fullscreen: true,
|
// fullscreen: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: !isDev,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: false,
|
||||||
webSecurity: false,
|
nodeIntegrationInWorker: false,
|
||||||
|
nodeIntegrationInSubFrames: false,
|
||||||
|
contextIsolation: true,
|
||||||
|
enableRemoteModule: false,
|
||||||
|
disableBlinkFeatures: "Auxclick",
|
||||||
|
|
||||||
|
webSecurity: true,
|
||||||
|
sandbox: true,
|
||||||
|
preload: path.join(__dirname, "preload.js"),
|
||||||
|
experimentalFeatures: false,
|
||||||
},
|
},
|
||||||
allowRunningInsecureContent: false,
|
allowRunningInsecureContent: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
mainWindowState.manage(win);
|
||||||
|
|
||||||
if (isLocal) {
|
if (isLocal) {
|
||||||
win.loadURL("http://localhost:3005");
|
win.loadURL("http://localhost:3005");
|
||||||
} else {
|
} else {
|
||||||
|
@ -66,9 +97,67 @@ function createWindow() {
|
||||||
win.webContents.session.clearCache();
|
win.webContents.session.clearCache();
|
||||||
win.webContents.session.clearStorageData();
|
win.webContents.session.clearStorageData();
|
||||||
|
|
||||||
|
////// SECURITY
|
||||||
|
|
||||||
|
// Disable permission requests
|
||||||
|
win.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
|
||||||
|
callback(false);
|
||||||
|
});
|
||||||
|
session.fromPartition("default").setPermissionRequestHandler((webContents, permission, callback) => {
|
||||||
|
callback(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("web-contents-created", (event, contents) => {
|
||||||
|
// Disable vewbiew
|
||||||
|
contents.on("will-attach-webview", (event, webPreferences, params) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
// Disable navigation
|
||||||
|
contents.on("will-navigate", (event, navigationUrl) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
win.webContents.on("will-redirect", (contentsEvent, navigationUrl) => {
|
||||||
|
// Log and prevent the app from redirecting to a new page
|
||||||
|
console.error(
|
||||||
|
`The application tried to redirect to the following address: '${navigationUrl}'. This attempt was blocked.`
|
||||||
|
);
|
||||||
|
contentsEvent.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Filter loading any module via remote;
|
||||||
|
// you shouldn't be using remote at all, though
|
||||||
|
// https://electronjs.org/docs/tutorial/security#16-filter-the-remote-module
|
||||||
|
app.on("remote-require", (event, webContents, moduleName) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
// built-ins are modules such as "app"
|
||||||
|
app.on("remote-get-builtin", (event, webContents, moduleName) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("remote-get-global", (event, webContents, globalName) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("remote-get-current-window", (event, webContents) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("remote-get-current-web-contents", (event, webContents) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
//// END SECURITY
|
||||||
|
|
||||||
win.webContents.on("new-window", (event, pth) => {
|
win.webContents.on("new-window", (event, pth) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
if (pth.startsWith("https://") || pth.startsWith("steam://")) {
|
||||||
shell.openExternal(pth);
|
shell.openExternal(pth);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
win.on("closed", () => {
|
win.on("closed", () => {
|
||||||
|
@ -79,15 +168,17 @@ function createWindow() {
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
menu = new Menu();
|
menu = new Menu();
|
||||||
|
|
||||||
|
win.webContents.toggleDevTools();
|
||||||
|
|
||||||
const mainItem = new MenuItem({
|
const mainItem = new MenuItem({
|
||||||
label: "Toggle Dev Tools",
|
label: "Toggle Dev Tools",
|
||||||
click: () => win.toggleDevTools(),
|
click: () => win.webContents.toggleDevTools(),
|
||||||
accelerator: "F12",
|
accelerator: "F12",
|
||||||
});
|
});
|
||||||
menu.append(mainItem);
|
menu.append(mainItem);
|
||||||
|
|
||||||
const reloadItem = new MenuItem({
|
const reloadItem = new MenuItem({
|
||||||
label: "Restart",
|
label: "Reload",
|
||||||
click: () => win.reload(),
|
click: () => win.reload(),
|
||||||
accelerator: "F5",
|
accelerator: "F5",
|
||||||
});
|
});
|
||||||
|
@ -100,7 +191,15 @@ function createWindow() {
|
||||||
});
|
});
|
||||||
menu.append(fullscreenItem);
|
menu.append(fullscreenItem);
|
||||||
|
|
||||||
Menu.setApplicationMenu(menu);
|
const mainMenu = new Menu();
|
||||||
|
mainMenu.append(
|
||||||
|
new MenuItem({
|
||||||
|
label: "shapez.io",
|
||||||
|
submenu: menu,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
Menu.setApplicationMenu(mainMenu);
|
||||||
} else {
|
} else {
|
||||||
Menu.setApplicationMenu(null);
|
Menu.setApplicationMenu(null);
|
||||||
}
|
}
|
||||||
|
@ -114,7 +213,7 @@ function createWindow() {
|
||||||
if (!app.requestSingleInstanceLock()) {
|
if (!app.requestSingleInstanceLock()) {
|
||||||
app.exit(0);
|
app.exit(0);
|
||||||
} else {
|
} else {
|
||||||
app.on("second-instance", (event, commandLine, workingDirectory) => {
|
app.on("second-instance", () => {
|
||||||
// Someone tried to run a second instance, we should focus
|
// Someone tried to run a second instance, we should focus
|
||||||
if (win) {
|
if (win) {
|
||||||
if (win.isMinimized()) {
|
if (win.isMinimized()) {
|
||||||
|
@ -136,7 +235,7 @@ ipcMain.on("set-fullscreen", (event, flag) => {
|
||||||
win.setFullScreen(flag);
|
win.setFullScreen(flag);
|
||||||
});
|
});
|
||||||
|
|
||||||
ipcMain.on("exit-app", (event, flag) => {
|
ipcMain.on("exit-app", () => {
|
||||||
win.close();
|
win.close();
|
||||||
app.quit();
|
app.quit();
|
||||||
});
|
});
|
||||||
|
@ -167,14 +266,14 @@ async function writeFileSafe(filename, contents) {
|
||||||
if (!fs.existsSync(filename)) {
|
if (!fs.existsSync(filename)) {
|
||||||
// this one is easy
|
// this one is easy
|
||||||
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
||||||
await fs.promises.writeFile(filename, contents, { encoding: "utf8" });
|
await fs.promises.writeFile(filename, contents, "utf8");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// first, write a temporary file (.tmp-XXX)
|
// first, write a temporary file (.tmp-XXX)
|
||||||
const tempName = filename + ".tmp-" + transactionId;
|
const tempName = filename + ".tmp-" + transactionId;
|
||||||
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
||||||
await fs.promises.writeFile(tempName, contents, { encoding: "utf8" });
|
await fs.promises.writeFile(tempName, contents, "utf8");
|
||||||
|
|
||||||
// now, rename the original file to (.backup-XXX)
|
// now, rename the original file to (.backup-XXX)
|
||||||
const oldTemporaryName = filename + ".backup-" + transactionId;
|
const oldTemporaryName = filename + ".backup-" + transactionId;
|
||||||
|
@ -216,68 +315,75 @@ async function writeFileSafe(filename, contents) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function performFsJob(job) {
|
ipcMain.handle("fs-job", async (event, job) => {
|
||||||
const fname = path.join(storePath, job.filename);
|
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/gi, "_");
|
||||||
|
const fname = path.join(storePath, filenameSafe);
|
||||||
switch (job.type) {
|
switch (job.type) {
|
||||||
case "read": {
|
case "read": {
|
||||||
if (!fs.existsSync(fname)) {
|
if (!fs.existsSync(fname)) {
|
||||||
return {
|
|
||||||
// Special FILE_NOT_FOUND error code
|
// Special FILE_NOT_FOUND error code
|
||||||
error: "file_not_found",
|
return { error: "file_not_found" };
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const data = await fs.promises.readFile(fname, { encoding: "utf8" });
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
data,
|
|
||||||
};
|
|
||||||
} catch (ex) {
|
|
||||||
return {
|
|
||||||
error: ex,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
return await fs.promises.readFile(fname, "utf8");
|
||||||
}
|
}
|
||||||
case "write": {
|
case "write": {
|
||||||
try {
|
|
||||||
await writeFileSafe(fname, job.contents);
|
await writeFileSafe(fname, job.contents);
|
||||||
return {
|
return job.contents;
|
||||||
success: true,
|
|
||||||
data: job.contents,
|
|
||||||
};
|
|
||||||
} catch (ex) {
|
|
||||||
return {
|
|
||||||
error: ex,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "delete": {
|
case "delete": {
|
||||||
try {
|
|
||||||
await fs.promises.unlink(fname);
|
await fs.promises.unlink(fname);
|
||||||
} catch (ex) {
|
return;
|
||||||
return {
|
|
||||||
error: ex,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
data: null,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error("Unkown fs job: " + job.type);
|
throw new Error("Unknown fs job: " + job.type);
|
||||||
}
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.handle("open-mods-folder", async () => {
|
||||||
|
shell.openPath(modsPath);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("Loading mods ...");
|
||||||
|
|
||||||
|
function loadMods() {
|
||||||
|
if (safeMode) {
|
||||||
|
console.log("Safe Mode enabled for mods, skipping mod search");
|
||||||
|
}
|
||||||
|
console.log("Loading mods from", modsPath);
|
||||||
|
let modFiles = safeMode
|
||||||
|
? []
|
||||||
|
: fs
|
||||||
|
.readdirSync(modsPath)
|
||||||
|
.filter(filename => filename.endsWith(".js"))
|
||||||
|
.map(filename => path.join(modsPath, filename));
|
||||||
|
|
||||||
|
if (externalMod) {
|
||||||
|
console.log("Adding external mod source:", externalMod);
|
||||||
|
const externalModPaths = externalMod.split(",");
|
||||||
|
modFiles = modFiles.concat(externalModPaths);
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcMain.on("fs-job", async (event, arg) => {
|
return modFiles.map(filename => fs.readFileSync(filename, "utf8"));
|
||||||
const result = await performFsJob(arg);
|
}
|
||||||
event.reply("fs-response", { id: arg.id, result });
|
|
||||||
|
let mods = [];
|
||||||
|
try {
|
||||||
|
mods = loadMods();
|
||||||
|
console.log("Loaded", mods.length, "mods");
|
||||||
|
} catch (ex) {
|
||||||
|
console.error("Failed to load mods");
|
||||||
|
dialog.showErrorBox("Failed to load mods:", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
ipcMain.handle("get-mods", async () => {
|
||||||
|
return mods;
|
||||||
});
|
});
|
||||||
|
|
||||||
steam.init(isDev);
|
steam.init(isDev);
|
||||||
|
|
||||||
|
// Only allow achievements and puzzle DLC if no mods are loaded
|
||||||
|
if (mods.length === 0) {
|
||||||
steam.listen();
|
steam.listen();
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
Here you can place mods. Every mod should be a single file ending with ".js".
|
||||||
|
|
||||||
|
--- WARNING ---
|
||||||
|
Mods can potentially access to your filesystem.
|
||||||
|
Please only install mods from trusted sources and developers.
|
||||||
|
--- WARNING ---
|
|
@ -9,13 +9,13 @@
|
||||||
"startDevGpu": "electron --enable-gpu-rasterization --enable-accelerated-2d-canvas --num-raster-threads=8 --enable-zero-copy . --dev --local",
|
"startDevGpu": "electron --enable-gpu-rasterization --enable-accelerated-2d-canvas --num-raster-threads=8 --enable-zero-copy . --dev --local",
|
||||||
"start": "electron --disable-direct-composition --in-process-gpu ."
|
"start": "electron --disable-direct-composition --in-process-gpu ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {},
|
||||||
"electron": "10.4.3"
|
|
||||||
},
|
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v82"
|
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v99"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async-lock": "^1.2.8"
|
"async-lock": "^1.2.8",
|
||||||
|
"electron": "16.2.8",
|
||||||
|
"electron-window-state": "^5.0.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
const { contextBridge, ipcRenderer } = require("electron");
|
||||||
|
|
||||||
|
contextBridge.exposeInMainWorld("ipcRenderer", {
|
||||||
|
invoke: ipcRenderer.invoke.bind(ipcRenderer),
|
||||||
|
on: ipcRenderer.on.bind(ipcRenderer),
|
||||||
|
send: ipcRenderer.send.bind(ipcRenderer),
|
||||||
|
});
|
|
@ -14,6 +14,8 @@ try {
|
||||||
console.warn("Failed to load steam api:", err);
|
console.warn("Failed to load steam api:", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("App ID:", appId);
|
||||||
|
|
||||||
function init(isDev) {
|
function init(isDev) {
|
||||||
if (!greenworks) {
|
if (!greenworks) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -2,10 +2,10 @@
|
||||||
# yarn lockfile v1
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
"@electron/get@^1.0.1":
|
"@electron/get@^1.13.0":
|
||||||
version "1.12.4"
|
version "1.13.1"
|
||||||
resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.12.4.tgz#a5971113fc1bf8fa12a8789dc20152a7359f06ab"
|
resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.13.1.tgz#42a0aa62fd1189638bd966e23effaebb16108368"
|
||||||
integrity sha512-6nr9DbJPUR9Xujw6zD3y+rS95TyItEVM0NVjt1EehY2vUWfIgPiIPVHxCvaTS0xr2B+DRxovYVKbuOWqC35kjg==
|
integrity sha512-U5vkXDZ9DwXtkPqlB45tfYnnYBN8PePp1z/XDCupnSpdrxT8/ThCv9WCwPLf9oqiSGZTkH6dx2jDUPuoXpjkcA==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.1.1"
|
debug "^4.1.1"
|
||||||
env-paths "^2.2.0"
|
env-paths "^2.2.0"
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
semver "^6.2.0"
|
semver "^6.2.0"
|
||||||
sumchecker "^3.0.1"
|
sumchecker "^3.0.1"
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
global-agent "^2.0.2"
|
global-agent "^3.0.0"
|
||||||
global-tunnel-ng "^2.7.1"
|
global-tunnel-ng "^2.7.1"
|
||||||
|
|
||||||
"@sindresorhus/is@^0.14.0":
|
"@sindresorhus/is@^0.14.0":
|
||||||
|
@ -30,10 +30,10 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
defer-to-connect "^1.0.1"
|
defer-to-connect "^1.0.1"
|
||||||
|
|
||||||
"@types/node@^12.0.12":
|
"@types/node@^14.6.2":
|
||||||
version "12.20.5"
|
version "14.18.20"
|
||||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.5.tgz#4ca82a766f05c359fd6c77505007e5a272f4bb9b"
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.20.tgz#268f028b36eaf51181c3300252f605488c4f0650"
|
||||||
integrity sha512-5Oy7tYZnu3a4pnJ//d4yVvOImExl4Vtwf0D40iKUlU+XlUsyV9iyFWyCFlwy489b72FMAik/EFwRkNLjjOdSPg==
|
integrity sha512-Q8KKwm9YqEmUBRsqJ2GWJDtXltBDxTdC4m5vTdXBolu2PeQh8LX+f6BTwU+OuXPu37fLxoN6gidqBmnky36FXA==
|
||||||
|
|
||||||
async-lock@^1.2.8:
|
async-lock@^1.2.8:
|
||||||
version "1.2.8"
|
version "1.2.8"
|
||||||
|
@ -93,11 +93,6 @@ config-chain@^1.1.11:
|
||||||
ini "^1.3.4"
|
ini "^1.3.4"
|
||||||
proto-list "~1.2.1"
|
proto-list "~1.2.1"
|
||||||
|
|
||||||
core-js@^3.6.5:
|
|
||||||
version "3.9.1"
|
|
||||||
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.9.1.tgz#cec8de593db8eb2a85ffb0dbdeb312cb6e5460ae"
|
|
||||||
integrity sha512-gSjRvzkxQc1zjM/5paAmL4idJBFzuJoo+jDjF1tStYFMV2ERfD02HhahhCGXUyHxQRG4yFKVSdO6g62eoRMcDg==
|
|
||||||
|
|
||||||
core-util-is@~1.0.0:
|
core-util-is@~1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
@ -146,13 +141,21 @@ duplexer3@^0.1.4:
|
||||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||||
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
||||||
|
|
||||||
electron@10.4.3:
|
electron-window-state@^5.0.3:
|
||||||
version "10.4.3"
|
version "5.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-10.4.3.tgz#8d1c0f5e562d1b78dcec8074c0d59e58137fd508"
|
resolved "https://registry.yarnpkg.com/electron-window-state/-/electron-window-state-5.0.3.tgz#4f36d09e3f953d87aff103bf010f460056050aa8"
|
||||||
integrity sha512-qL8XZBII9KQHr1+YmVMj1AqyTR2I8/lxozvKEWoKKSkF8Hl6GzzxrLXRfISP7aDAvsJEyyhc6b2/42ME8hG5JA==
|
integrity sha512-1mNTwCfkolXl3kMf50yW3vE2lZj0y92P/HYWFBrb+v2S/pCka5mdwN3cagKm458A7NjndSwijynXgcLWRodsVg==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.0.1"
|
jsonfile "^4.0.0"
|
||||||
"@types/node" "^12.0.12"
|
mkdirp "^0.5.1"
|
||||||
|
|
||||||
|
electron@16.2.8:
|
||||||
|
version "16.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/electron/-/electron-16.2.8.tgz#b7f2bd1184701e54a1bc902839d5a3ec95bb8982"
|
||||||
|
integrity sha512-KSOytY6SPLsh3iCziztqa/WgJyfDOKzCvNqku9gGIqSdT8CqtV66dTU1SOrKZQjRFLxHaF8LbyxUL1vwe4taqw==
|
||||||
|
dependencies:
|
||||||
|
"@electron/get" "^1.13.0"
|
||||||
|
"@types/node" "^14.6.2"
|
||||||
extract-zip "^1.0.3"
|
extract-zip "^1.0.3"
|
||||||
|
|
||||||
encodeurl@^1.0.2:
|
encodeurl@^1.0.2:
|
||||||
|
@ -222,13 +225,12 @@ get-stream@^5.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
pump "^3.0.0"
|
pump "^3.0.0"
|
||||||
|
|
||||||
global-agent@^2.0.2:
|
global-agent@^3.0.0:
|
||||||
version "2.1.12"
|
version "3.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.1.12.tgz#e4ae3812b731a9e81cbf825f9377ef450a8e4195"
|
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6"
|
||||||
integrity sha512-caAljRMS/qcDo69X9BfkgrihGUgGx44Fb4QQToNQjsiWh+YlQ66uqYVAdA8Olqit+5Ng0nkz09je3ZzANMZcjg==
|
integrity sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==
|
||||||
dependencies:
|
dependencies:
|
||||||
boolean "^3.0.1"
|
boolean "^3.0.1"
|
||||||
core-js "^3.6.5"
|
|
||||||
es6-error "^4.1.1"
|
es6-error "^4.1.1"
|
||||||
matcher "^3.0.0"
|
matcher "^3.0.0"
|
||||||
roarr "^2.15.3"
|
roarr "^2.15.3"
|
||||||
|
@ -357,7 +359,7 @@ minimist@^1.2.5:
|
||||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||||
|
|
||||||
mkdirp@^0.5.4:
|
mkdirp@^0.5.1, mkdirp@^0.5.4:
|
||||||
version "0.5.5"
|
version "0.5.5"
|
||||||
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
||||||
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
||||||
|
@ -503,9 +505,9 @@ serialize-error@^7.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
type-fest "^0.13.1"
|
type-fest "^0.13.1"
|
||||||
|
|
||||||
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#abi-v82":
|
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#abi-v99":
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git#8aa3bfd3b569eb5695fc8a585a3f2ee3ed2db290"
|
resolved "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git#3293b20be26060fd36e9f00ded9ab5d0bdf57338"
|
||||||
|
|
||||||
sprintf-js@^1.1.2:
|
sprintf-js@^1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
|
|
After Width: | Height: | Size: 105 KiB |
After Width: | Height: | Size: 21 KiB |
|
@ -0,0 +1,381 @@
|
||||||
|
/* eslint-disable quotes,no-undef */
|
||||||
|
|
||||||
|
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell, dialog, session } = require("electron");
|
||||||
|
const path = require("path");
|
||||||
|
const url = require("url");
|
||||||
|
const fs = require("fs");
|
||||||
|
const asyncLock = require("async-lock");
|
||||||
|
const windowStateKeeper = require("electron-window-state");
|
||||||
|
|
||||||
|
// Disable hardware key handling, i.e. being able to pause/resume the game music
|
||||||
|
// with hardware keys
|
||||||
|
app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling");
|
||||||
|
|
||||||
|
const isDev = app.commandLine.hasSwitch("dev");
|
||||||
|
const isLocal = app.commandLine.hasSwitch("local");
|
||||||
|
const safeMode = app.commandLine.hasSwitch("safe-mode");
|
||||||
|
const externalMod = app.commandLine.getSwitchValue("load-mod");
|
||||||
|
|
||||||
|
const roamingFolder =
|
||||||
|
process.env.APPDATA ||
|
||||||
|
(process.platform == "darwin"
|
||||||
|
? process.env.HOME + "/Library/Preferences"
|
||||||
|
: process.env.HOME + "/.local/share");
|
||||||
|
|
||||||
|
let storePath = path.join(roamingFolder, "shapez.io", "saves");
|
||||||
|
let modsPath = path.join(roamingFolder, "shapez.io", "mods");
|
||||||
|
|
||||||
|
if (!fs.existsSync(storePath)) {
|
||||||
|
// No try-catch by design
|
||||||
|
fs.mkdirSync(storePath, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!fs.existsSync(modsPath)) {
|
||||||
|
fs.mkdirSync(modsPath, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @type {BrowserWindow} */
|
||||||
|
let win = null;
|
||||||
|
let menu = null;
|
||||||
|
|
||||||
|
function createWindow() {
|
||||||
|
let faviconExtension = ".png";
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
faviconExtension = ".ico";
|
||||||
|
}
|
||||||
|
|
||||||
|
const mainWindowState = windowStateKeeper({
|
||||||
|
defaultWidth: 1000,
|
||||||
|
defaultHeight: 800,
|
||||||
|
});
|
||||||
|
|
||||||
|
win = new BrowserWindow({
|
||||||
|
x: mainWindowState.x,
|
||||||
|
y: mainWindowState.y,
|
||||||
|
width: mainWindowState.width,
|
||||||
|
height: mainWindowState.height,
|
||||||
|
show: false,
|
||||||
|
backgroundColor: "#222428",
|
||||||
|
useContentSize: false,
|
||||||
|
minWidth: 800,
|
||||||
|
minHeight: 600,
|
||||||
|
title: "shapez",
|
||||||
|
transparent: false,
|
||||||
|
icon: path.join(__dirname, "favicon" + faviconExtension),
|
||||||
|
// fullscreen: true,
|
||||||
|
autoHideMenuBar: !isDev,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: false,
|
||||||
|
nodeIntegrationInWorker: false,
|
||||||
|
nodeIntegrationInSubFrames: false,
|
||||||
|
contextIsolation: true,
|
||||||
|
enableRemoteModule: false,
|
||||||
|
disableBlinkFeatures: "Auxclick",
|
||||||
|
|
||||||
|
webSecurity: true,
|
||||||
|
sandbox: true,
|
||||||
|
preload: path.join(__dirname, "preload.js"),
|
||||||
|
experimentalFeatures: false,
|
||||||
|
},
|
||||||
|
allowRunningInsecureContent: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
mainWindowState.manage(win);
|
||||||
|
|
||||||
|
if (isLocal) {
|
||||||
|
win.loadURL("http://localhost:3005");
|
||||||
|
} else {
|
||||||
|
win.loadURL(
|
||||||
|
url.format({
|
||||||
|
pathname: path.join(__dirname, "index.html"),
|
||||||
|
protocol: "file:",
|
||||||
|
slashes: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
win.webContents.session.clearCache();
|
||||||
|
win.webContents.session.clearStorageData();
|
||||||
|
|
||||||
|
////// SECURITY
|
||||||
|
|
||||||
|
// Disable permission requests
|
||||||
|
win.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
|
||||||
|
callback(false);
|
||||||
|
});
|
||||||
|
session.fromPartition("default").setPermissionRequestHandler((webContents, permission, callback) => {
|
||||||
|
callback(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("web-contents-created", (event, contents) => {
|
||||||
|
// Disable vewbiew
|
||||||
|
contents.on("will-attach-webview", (event, webPreferences, params) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
// Disable navigation
|
||||||
|
contents.on("will-navigate", (event, navigationUrl) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
win.webContents.on("will-redirect", (contentsEvent, navigationUrl) => {
|
||||||
|
// Log and prevent the app from redirecting to a new page
|
||||||
|
console.error(
|
||||||
|
`The application tried to redirect to the following address: '${navigationUrl}'. This attempt was blocked.`
|
||||||
|
);
|
||||||
|
contentsEvent.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Filter loading any module via remote;
|
||||||
|
// you shouldn't be using remote at all, though
|
||||||
|
// https://electronjs.org/docs/tutorial/security#16-filter-the-remote-module
|
||||||
|
app.on("remote-require", (event, webContents, moduleName) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
// built-ins are modules such as "app"
|
||||||
|
app.on("remote-get-builtin", (event, webContents, moduleName) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("remote-get-global", (event, webContents, globalName) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("remote-get-current-window", (event, webContents) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
app.on("remote-get-current-web-contents", (event, webContents) => {
|
||||||
|
event.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
|
//// END SECURITY
|
||||||
|
|
||||||
|
win.webContents.on("new-window", (event, pth) => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
if (pth.startsWith("https://")) {
|
||||||
|
shell.openExternal(pth);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
win.on("closed", () => {
|
||||||
|
console.log("Window closed");
|
||||||
|
win = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isDev) {
|
||||||
|
menu = new Menu();
|
||||||
|
|
||||||
|
win.webContents.toggleDevTools();
|
||||||
|
|
||||||
|
const mainItem = new MenuItem({
|
||||||
|
label: "Toggle Dev Tools",
|
||||||
|
click: () => win.webContents.toggleDevTools(),
|
||||||
|
accelerator: "F12",
|
||||||
|
});
|
||||||
|
menu.append(mainItem);
|
||||||
|
|
||||||
|
const reloadItem = new MenuItem({
|
||||||
|
label: "Reload",
|
||||||
|
click: () => win.reload(),
|
||||||
|
accelerator: "F5",
|
||||||
|
});
|
||||||
|
menu.append(reloadItem);
|
||||||
|
|
||||||
|
const fullscreenItem = new MenuItem({
|
||||||
|
label: "Fullscreen",
|
||||||
|
click: () => win.setFullScreen(!win.isFullScreen()),
|
||||||
|
accelerator: "F11",
|
||||||
|
});
|
||||||
|
menu.append(fullscreenItem);
|
||||||
|
|
||||||
|
const mainMenu = new Menu();
|
||||||
|
mainMenu.append(
|
||||||
|
new MenuItem({
|
||||||
|
label: "shapez.io",
|
||||||
|
submenu: menu,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
Menu.setApplicationMenu(mainMenu);
|
||||||
|
} else {
|
||||||
|
Menu.setApplicationMenu(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
win.once("ready-to-show", () => {
|
||||||
|
win.show();
|
||||||
|
win.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!app.requestSingleInstanceLock()) {
|
||||||
|
app.exit(0);
|
||||||
|
} else {
|
||||||
|
app.on("second-instance", () => {
|
||||||
|
// Someone tried to run a second instance, we should focus
|
||||||
|
if (win) {
|
||||||
|
if (win.isMinimized()) {
|
||||||
|
win.restore();
|
||||||
|
}
|
||||||
|
win.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
app.on("ready", createWindow);
|
||||||
|
|
||||||
|
app.on("window-all-closed", () => {
|
||||||
|
console.log("All windows closed");
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.on("set-fullscreen", (event, flag) => {
|
||||||
|
win.setFullScreen(flag);
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.on("exit-app", () => {
|
||||||
|
win.close();
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
|
||||||
|
let renameCounter = 1;
|
||||||
|
|
||||||
|
const fileLock = new asyncLock({
|
||||||
|
timeout: 30000,
|
||||||
|
maxPending: 1000,
|
||||||
|
});
|
||||||
|
|
||||||
|
function niceFileName(filename) {
|
||||||
|
return filename.replace(storePath, "@");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function writeFileSafe(filename, contents) {
|
||||||
|
++renameCounter;
|
||||||
|
const prefix = "[ " + renameCounter + ":" + niceFileName(filename) + " ] ";
|
||||||
|
const transactionId = String(new Date().getTime()) + "." + renameCounter;
|
||||||
|
|
||||||
|
if (fileLock.isBusy()) {
|
||||||
|
console.warn(prefix, "Concurrent write process on", filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
fileLock.acquire(filename, async () => {
|
||||||
|
console.log(prefix, "Starting write on", niceFileName(filename), "in transaction", transactionId);
|
||||||
|
|
||||||
|
if (!fs.existsSync(filename)) {
|
||||||
|
// this one is easy
|
||||||
|
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
||||||
|
await fs.promises.writeFile(filename, contents, "utf8");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// first, write a temporary file (.tmp-XXX)
|
||||||
|
const tempName = filename + ".tmp-" + transactionId;
|
||||||
|
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
||||||
|
await fs.promises.writeFile(tempName, contents, "utf8");
|
||||||
|
|
||||||
|
// now, rename the original file to (.backup-XXX)
|
||||||
|
const oldTemporaryName = filename + ".backup-" + transactionId;
|
||||||
|
console.log(
|
||||||
|
prefix,
|
||||||
|
"Renaming old file",
|
||||||
|
niceFileName(filename),
|
||||||
|
"to",
|
||||||
|
niceFileName(oldTemporaryName)
|
||||||
|
);
|
||||||
|
await fs.promises.rename(filename, oldTemporaryName);
|
||||||
|
|
||||||
|
// now, rename the temporary file (.tmp-XXX) to the target
|
||||||
|
console.log(
|
||||||
|
prefix,
|
||||||
|
"Renaming the temporary file",
|
||||||
|
niceFileName(tempName),
|
||||||
|
"to the original",
|
||||||
|
niceFileName(filename)
|
||||||
|
);
|
||||||
|
await fs.promises.rename(tempName, filename);
|
||||||
|
|
||||||
|
// we are done now, try to create a backup, but don't fail if the backup fails
|
||||||
|
try {
|
||||||
|
// check if there is an old backup file
|
||||||
|
const backupFileName = filename + ".backup";
|
||||||
|
if (fs.existsSync(backupFileName)) {
|
||||||
|
console.log(prefix, "Deleting old backup file", niceFileName(backupFileName));
|
||||||
|
// delete the old backup
|
||||||
|
await fs.promises.unlink(backupFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rename the old file to the new backup file
|
||||||
|
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
|
||||||
|
await fs.promises.rename(oldTemporaryName, backupFileName);
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(prefix, "Failed to switch backup files:", ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
ipcMain.handle("fs-job", async (event, job) => {
|
||||||
|
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/gi, "_");
|
||||||
|
const fname = path.join(storePath, filenameSafe);
|
||||||
|
switch (job.type) {
|
||||||
|
case "read": {
|
||||||
|
if (!fs.existsSync(fname)) {
|
||||||
|
// Special FILE_NOT_FOUND error code
|
||||||
|
return { error: "file_not_found" };
|
||||||
|
}
|
||||||
|
return await fs.promises.readFile(fname, "utf8");
|
||||||
|
}
|
||||||
|
case "write": {
|
||||||
|
await writeFileSafe(fname, job.contents);
|
||||||
|
return job.contents;
|
||||||
|
}
|
||||||
|
|
||||||
|
case "delete": {
|
||||||
|
await fs.promises.unlink(fname);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new Error("Unknown fs job: " + job.type);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.handle("open-mods-folder", async () => {
|
||||||
|
shell.openPath(modsPath);
|
||||||
|
});
|
||||||
|
|
||||||
|
console.log("Loading mods ...");
|
||||||
|
|
||||||
|
function loadMods() {
|
||||||
|
if (safeMode) {
|
||||||
|
console.log("Safe Mode enabled for mods, skipping mod search");
|
||||||
|
}
|
||||||
|
console.log("Loading mods from", modsPath);
|
||||||
|
let modFiles = safeMode
|
||||||
|
? []
|
||||||
|
: fs
|
||||||
|
.readdirSync(modsPath)
|
||||||
|
.filter(filename => filename.endsWith(".js"))
|
||||||
|
.map(filename => path.join(modsPath, filename));
|
||||||
|
|
||||||
|
if (externalMod) {
|
||||||
|
console.log("Adding external mod source:", externalMod);
|
||||||
|
const externalModPaths = externalMod.split(",");
|
||||||
|
modFiles = modFiles.concat(externalModPaths);
|
||||||
|
}
|
||||||
|
|
||||||
|
return modFiles.map(filename => fs.readFileSync(filename, "utf8"));
|
||||||
|
}
|
||||||
|
|
||||||
|
let mods = [];
|
||||||
|
try {
|
||||||
|
mods = loadMods();
|
||||||
|
console.log("Loaded", mods.length, "mods");
|
||||||
|
} catch (ex) {
|
||||||
|
console.error("Failed to load mods");
|
||||||
|
dialog.showErrorBox("Failed to load mods:", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
ipcMain.handle("get-mods", async () => {
|
||||||
|
return mods;
|
||||||
|
});
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"name": "electron",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"license": "MIT",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"startDev": "electron --disable-direct-composition --in-process-gpu . --dev --local",
|
||||||
|
"startDevGpu": "electron --enable-gpu-rasterization --enable-accelerated-2d-canvas --num-raster-threads=8 --enable-zero-copy . --dev --local",
|
||||||
|
"start": "electron --disable-direct-composition --in-process-gpu ."
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"async-lock": "^1.2.8",
|
||||||
|
"electron": "16.2.8",
|
||||||
|
"electron-window-state": "^5.0.3"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,7 @@
|
||||||
|
const { contextBridge, ipcRenderer } = require("electron");
|
||||||
|
|
||||||
|
contextBridge.exposeInMainWorld("ipcRenderer", {
|
||||||
|
invoke: ipcRenderer.invoke.bind(ipcRenderer),
|
||||||
|
on: ipcRenderer.on.bind(ipcRenderer),
|
||||||
|
send: ipcRenderer.send.bind(ipcRenderer),
|
||||||
|
});
|
|
@ -0,0 +1,580 @@
|
||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@electron/get@^1.13.0":
|
||||||
|
version "1.13.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.13.1.tgz#42a0aa62fd1189638bd966e23effaebb16108368"
|
||||||
|
integrity sha512-U5vkXDZ9DwXtkPqlB45tfYnnYBN8PePp1z/XDCupnSpdrxT8/ThCv9WCwPLf9oqiSGZTkH6dx2jDUPuoXpjkcA==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.1.1"
|
||||||
|
env-paths "^2.2.0"
|
||||||
|
fs-extra "^8.1.0"
|
||||||
|
got "^9.6.0"
|
||||||
|
progress "^2.0.3"
|
||||||
|
semver "^6.2.0"
|
||||||
|
sumchecker "^3.0.1"
|
||||||
|
optionalDependencies:
|
||||||
|
global-agent "^3.0.0"
|
||||||
|
global-tunnel-ng "^2.7.1"
|
||||||
|
|
||||||
|
"@sindresorhus/is@^0.14.0":
|
||||||
|
version "0.14.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
|
||||||
|
integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
|
||||||
|
|
||||||
|
"@szmarczak/http-timer@^1.1.2":
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
|
||||||
|
integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
|
||||||
|
dependencies:
|
||||||
|
defer-to-connect "^1.0.1"
|
||||||
|
|
||||||
|
"@types/node@^14.6.2":
|
||||||
|
version "14.18.20"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.20.tgz#268f028b36eaf51181c3300252f605488c4f0650"
|
||||||
|
integrity sha512-Q8KKwm9YqEmUBRsqJ2GWJDtXltBDxTdC4m5vTdXBolu2PeQh8LX+f6BTwU+OuXPu37fLxoN6gidqBmnky36FXA==
|
||||||
|
|
||||||
|
async-lock@^1.2.8:
|
||||||
|
version "1.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/async-lock/-/async-lock-1.2.8.tgz#7b02bdfa2de603c0713acecd11184cf97bbc7c4c"
|
||||||
|
integrity sha512-G+26B2jc0Gw0EG/WN2M6IczuGepBsfR1+DtqLnyFSH4p2C668qkOCtEkGNVEaaNAVlYwEMazy1+/jnLxltBkIQ==
|
||||||
|
|
||||||
|
boolean@^3.0.1:
|
||||||
|
version "3.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.0.2.tgz#df1baa18b6a2b0e70840475e1d93ec8fe75b2570"
|
||||||
|
integrity sha512-RwywHlpCRc3/Wh81MiCKun4ydaIFyW5Ea6JbL6sRCVx5q5irDw7pMXBUFYF/jArQ6YrG36q0kpovc9P/Kd3I4g==
|
||||||
|
|
||||||
|
buffer-crc32@~0.2.3:
|
||||||
|
version "0.2.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
||||||
|
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
|
||||||
|
|
||||||
|
buffer-from@^1.0.0:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||||
|
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||||
|
|
||||||
|
cacheable-request@^6.0.0:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912"
|
||||||
|
integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
|
||||||
|
dependencies:
|
||||||
|
clone-response "^1.0.2"
|
||||||
|
get-stream "^5.1.0"
|
||||||
|
http-cache-semantics "^4.0.0"
|
||||||
|
keyv "^3.0.0"
|
||||||
|
lowercase-keys "^2.0.0"
|
||||||
|
normalize-url "^4.1.0"
|
||||||
|
responselike "^1.0.2"
|
||||||
|
|
||||||
|
clone-response@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
|
||||||
|
integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
|
||||||
|
dependencies:
|
||||||
|
mimic-response "^1.0.0"
|
||||||
|
|
||||||
|
concat-stream@^1.6.2:
|
||||||
|
version "1.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
|
||||||
|
integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
|
||||||
|
dependencies:
|
||||||
|
buffer-from "^1.0.0"
|
||||||
|
inherits "^2.0.3"
|
||||||
|
readable-stream "^2.2.2"
|
||||||
|
typedarray "^0.0.6"
|
||||||
|
|
||||||
|
config-chain@^1.1.11:
|
||||||
|
version "1.1.12"
|
||||||
|
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa"
|
||||||
|
integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==
|
||||||
|
dependencies:
|
||||||
|
ini "^1.3.4"
|
||||||
|
proto-list "~1.2.1"
|
||||||
|
|
||||||
|
core-util-is@~1.0.0:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||||
|
|
||||||
|
debug@^2.6.9:
|
||||||
|
version "2.6.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||||
|
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
|
||||||
|
dependencies:
|
||||||
|
ms "2.0.0"
|
||||||
|
|
||||||
|
debug@^4.1.0, debug@^4.1.1:
|
||||||
|
version "4.3.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
|
||||||
|
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
|
||||||
|
dependencies:
|
||||||
|
ms "2.1.2"
|
||||||
|
|
||||||
|
decompress-response@^3.3.0:
|
||||||
|
version "3.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
|
||||||
|
integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
|
||||||
|
dependencies:
|
||||||
|
mimic-response "^1.0.0"
|
||||||
|
|
||||||
|
defer-to-connect@^1.0.1:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
|
||||||
|
integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
|
||||||
|
|
||||||
|
define-properties@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
|
||||||
|
integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
|
||||||
|
dependencies:
|
||||||
|
object-keys "^1.0.12"
|
||||||
|
|
||||||
|
detect-node@^2.0.4:
|
||||||
|
version "2.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
|
||||||
|
integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
|
||||||
|
|
||||||
|
duplexer3@^0.1.4:
|
||||||
|
version "0.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||||
|
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
||||||
|
|
||||||
|
electron-window-state@^5.0.3:
|
||||||
|
version "5.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/electron-window-state/-/electron-window-state-5.0.3.tgz#4f36d09e3f953d87aff103bf010f460056050aa8"
|
||||||
|
integrity sha512-1mNTwCfkolXl3kMf50yW3vE2lZj0y92P/HYWFBrb+v2S/pCka5mdwN3cagKm458A7NjndSwijynXgcLWRodsVg==
|
||||||
|
dependencies:
|
||||||
|
jsonfile "^4.0.0"
|
||||||
|
mkdirp "^0.5.1"
|
||||||
|
|
||||||
|
electron@16.2.8:
|
||||||
|
version "16.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/electron/-/electron-16.2.8.tgz#b7f2bd1184701e54a1bc902839d5a3ec95bb8982"
|
||||||
|
integrity sha512-KSOytY6SPLsh3iCziztqa/WgJyfDOKzCvNqku9gGIqSdT8CqtV66dTU1SOrKZQjRFLxHaF8LbyxUL1vwe4taqw==
|
||||||
|
dependencies:
|
||||||
|
"@electron/get" "^1.13.0"
|
||||||
|
"@types/node" "^14.6.2"
|
||||||
|
extract-zip "^1.0.3"
|
||||||
|
|
||||||
|
encodeurl@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
||||||
|
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
|
||||||
|
|
||||||
|
end-of-stream@^1.1.0:
|
||||||
|
version "1.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
|
||||||
|
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||||
|
dependencies:
|
||||||
|
once "^1.4.0"
|
||||||
|
|
||||||
|
env-paths@^2.2.0:
|
||||||
|
version "2.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
|
||||||
|
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
|
||||||
|
|
||||||
|
es6-error@^4.1.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||||
|
integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
|
||||||
|
|
||||||
|
escape-string-regexp@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||||
|
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||||
|
|
||||||
|
extract-zip@^1.0.3:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927"
|
||||||
|
integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==
|
||||||
|
dependencies:
|
||||||
|
concat-stream "^1.6.2"
|
||||||
|
debug "^2.6.9"
|
||||||
|
mkdirp "^0.5.4"
|
||||||
|
yauzl "^2.10.0"
|
||||||
|
|
||||||
|
fd-slicer@~1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
|
||||||
|
integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
|
||||||
|
dependencies:
|
||||||
|
pend "~1.2.0"
|
||||||
|
|
||||||
|
fs-extra@^8.1.0:
|
||||||
|
version "8.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
|
||||||
|
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.2.0"
|
||||||
|
jsonfile "^4.0.0"
|
||||||
|
universalify "^0.1.0"
|
||||||
|
|
||||||
|
get-stream@^4.1.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
|
||||||
|
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
|
||||||
|
dependencies:
|
||||||
|
pump "^3.0.0"
|
||||||
|
|
||||||
|
get-stream@^5.1.0:
|
||||||
|
version "5.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
|
||||||
|
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
|
||||||
|
dependencies:
|
||||||
|
pump "^3.0.0"
|
||||||
|
|
||||||
|
global-agent@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6"
|
||||||
|
integrity sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==
|
||||||
|
dependencies:
|
||||||
|
boolean "^3.0.1"
|
||||||
|
es6-error "^4.1.1"
|
||||||
|
matcher "^3.0.0"
|
||||||
|
roarr "^2.15.3"
|
||||||
|
semver "^7.3.2"
|
||||||
|
serialize-error "^7.0.1"
|
||||||
|
|
||||||
|
global-tunnel-ng@^2.7.1:
|
||||||
|
version "2.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz#d03b5102dfde3a69914f5ee7d86761ca35d57d8f"
|
||||||
|
integrity sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==
|
||||||
|
dependencies:
|
||||||
|
encodeurl "^1.0.2"
|
||||||
|
lodash "^4.17.10"
|
||||||
|
npm-conf "^1.1.3"
|
||||||
|
tunnel "^0.0.6"
|
||||||
|
|
||||||
|
globalthis@^1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz#2a235d34f4d8036219f7e34929b5de9e18166b8b"
|
||||||
|
integrity sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.3"
|
||||||
|
|
||||||
|
got@^9.6.0:
|
||||||
|
version "9.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
|
||||||
|
integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
|
||||||
|
dependencies:
|
||||||
|
"@sindresorhus/is" "^0.14.0"
|
||||||
|
"@szmarczak/http-timer" "^1.1.2"
|
||||||
|
cacheable-request "^6.0.0"
|
||||||
|
decompress-response "^3.3.0"
|
||||||
|
duplexer3 "^0.1.4"
|
||||||
|
get-stream "^4.1.0"
|
||||||
|
lowercase-keys "^1.0.1"
|
||||||
|
mimic-response "^1.0.1"
|
||||||
|
p-cancelable "^1.0.0"
|
||||||
|
to-readable-stream "^1.0.0"
|
||||||
|
url-parse-lax "^3.0.0"
|
||||||
|
|
||||||
|
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
||||||
|
version "4.2.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
|
||||||
|
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
|
||||||
|
|
||||||
|
http-cache-semantics@^4.0.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
||||||
|
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
|
||||||
|
|
||||||
|
inherits@^2.0.3, inherits@~2.0.3:
|
||||||
|
version "2.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
|
|
||||||
|
ini@^1.3.4:
|
||||||
|
version "1.3.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
||||||
|
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
||||||
|
|
||||||
|
isarray@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
||||||
|
|
||||||
|
json-buffer@3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
|
||||||
|
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
|
||||||
|
|
||||||
|
json-stringify-safe@^5.0.1:
|
||||||
|
version "5.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||||
|
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
||||||
|
|
||||||
|
jsonfile@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||||
|
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
|
||||||
|
optionalDependencies:
|
||||||
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
|
keyv@^3.0.0:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
|
||||||
|
integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
|
||||||
|
dependencies:
|
||||||
|
json-buffer "3.0.0"
|
||||||
|
|
||||||
|
lodash@^4.17.10:
|
||||||
|
version "4.17.21"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||||
|
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||||
|
|
||||||
|
lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
|
||||||
|
integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
|
||||||
|
|
||||||
|
lowercase-keys@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
|
||||||
|
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
|
||||||
|
|
||||||
|
lru-cache@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||||
|
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||||
|
dependencies:
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
matcher@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca"
|
||||||
|
integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==
|
||||||
|
dependencies:
|
||||||
|
escape-string-regexp "^4.0.0"
|
||||||
|
|
||||||
|
mimic-response@^1.0.0, mimic-response@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
|
||||||
|
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
|
||||||
|
|
||||||
|
minimist@^1.2.5:
|
||||||
|
version "1.2.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||||
|
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||||
|
|
||||||
|
mkdirp@^0.5.1, mkdirp@^0.5.4:
|
||||||
|
version "0.5.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
||||||
|
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
||||||
|
dependencies:
|
||||||
|
minimist "^1.2.5"
|
||||||
|
|
||||||
|
ms@2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||||
|
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||||
|
|
||||||
|
ms@2.1.2:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
|
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||||
|
|
||||||
|
normalize-url@^4.1.0:
|
||||||
|
version "4.5.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
|
||||||
|
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
|
||||||
|
|
||||||
|
npm-conf@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9"
|
||||||
|
integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==
|
||||||
|
dependencies:
|
||||||
|
config-chain "^1.1.11"
|
||||||
|
pify "^3.0.0"
|
||||||
|
|
||||||
|
object-keys@^1.0.12:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
|
||||||
|
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
|
||||||
|
|
||||||
|
once@^1.3.1, once@^1.4.0:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
|
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||||
|
dependencies:
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
p-cancelable@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
|
||||||
|
integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
|
||||||
|
|
||||||
|
pend@~1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||||
|
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=
|
||||||
|
|
||||||
|
pify@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
||||||
|
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
|
||||||
|
|
||||||
|
prepend-http@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||||
|
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||||
|
|
||||||
|
process-nextick-args@~2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||||
|
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||||
|
|
||||||
|
progress@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
||||||
|
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||||
|
|
||||||
|
proto-list@~1.2.1:
|
||||||
|
version "1.2.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
|
||||||
|
integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=
|
||||||
|
|
||||||
|
pump@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
|
||||||
|
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
|
||||||
|
dependencies:
|
||||||
|
end-of-stream "^1.1.0"
|
||||||
|
once "^1.3.1"
|
||||||
|
|
||||||
|
readable-stream@^2.2.2:
|
||||||
|
version "2.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||||
|
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
||||||
|
dependencies:
|
||||||
|
core-util-is "~1.0.0"
|
||||||
|
inherits "~2.0.3"
|
||||||
|
isarray "~1.0.0"
|
||||||
|
process-nextick-args "~2.0.0"
|
||||||
|
safe-buffer "~5.1.1"
|
||||||
|
string_decoder "~1.1.1"
|
||||||
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
|
responselike@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
|
||||||
|
integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
|
||||||
|
dependencies:
|
||||||
|
lowercase-keys "^1.0.0"
|
||||||
|
|
||||||
|
roarr@^2.15.3:
|
||||||
|
version "2.15.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd"
|
||||||
|
integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==
|
||||||
|
dependencies:
|
||||||
|
boolean "^3.0.1"
|
||||||
|
detect-node "^2.0.4"
|
||||||
|
globalthis "^1.0.1"
|
||||||
|
json-stringify-safe "^5.0.1"
|
||||||
|
semver-compare "^1.0.0"
|
||||||
|
sprintf-js "^1.1.2"
|
||||||
|
|
||||||
|
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
|
version "5.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
|
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||||
|
|
||||||
|
semver-compare@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||||
|
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
|
||||||
|
|
||||||
|
semver@^6.2.0:
|
||||||
|
version "6.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||||
|
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||||
|
|
||||||
|
semver@^7.3.2:
|
||||||
|
version "7.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
|
||||||
|
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
|
serialize-error@^7.0.1:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18"
|
||||||
|
integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==
|
||||||
|
dependencies:
|
||||||
|
type-fest "^0.13.1"
|
||||||
|
|
||||||
|
sprintf-js@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
|
||||||
|
integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
|
||||||
|
|
||||||
|
string_decoder@~1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||||
|
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
|
sumchecker@^3.0.1:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
|
||||||
|
integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.1.0"
|
||||||
|
|
||||||
|
to-readable-stream@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
|
||||||
|
integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
|
||||||
|
|
||||||
|
tunnel@^0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
|
||||||
|
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
||||||
|
|
||||||
|
type-fest@^0.13.1:
|
||||||
|
version "0.13.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||||
|
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
|
||||||
|
|
||||||
|
typedarray@^0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
|
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||||
|
|
||||||
|
universalify@^0.1.0:
|
||||||
|
version "0.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||||
|
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||||
|
|
||||||
|
url-parse-lax@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
|
||||||
|
integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
|
||||||
|
dependencies:
|
||||||
|
prepend-http "^2.0.0"
|
||||||
|
|
||||||
|
util-deprecate@~1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
|
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||||
|
|
||||||
|
wrappy@1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
|
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||||
|
|
||||||
|
yallist@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||||
|
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||||
|
|
||||||
|
yauzl@^2.10.0:
|
||||||
|
version "2.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
||||||
|
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
||||||
|
dependencies:
|
||||||
|
buffer-crc32 "~0.2.3"
|
||||||
|
fd-slicer "~1.1.0"
|
Before Width: | Height: | Size: 103 KiB After Width: | Height: | Size: 105 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 21 KiB |
|
@ -43,15 +43,18 @@ function createWindow() {
|
||||||
useContentSize: true,
|
useContentSize: true,
|
||||||
minWidth: 800,
|
minWidth: 800,
|
||||||
minHeight: 600,
|
minHeight: 600,
|
||||||
title: "shapez.io Standalone",
|
title: "图形工厂",
|
||||||
transparent: false,
|
transparent: false,
|
||||||
icon: path.join(__dirname, "favicon" + faviconExtension),
|
icon: path.join(__dirname, "favicon" + faviconExtension),
|
||||||
// fullscreen: true,
|
// fullscreen: true,
|
||||||
autoHideMenuBar: true,
|
autoHideMenuBar: true,
|
||||||
webPreferences: {
|
webPreferences: {
|
||||||
nodeIntegration: true,
|
nodeIntegration: false,
|
||||||
webSecurity: false,
|
webSecurity: true,
|
||||||
contextIsolation: false,
|
sandbox: true,
|
||||||
|
|
||||||
|
contextIsolation: true,
|
||||||
|
preload: path.join(__dirname, "preload.js"),
|
||||||
},
|
},
|
||||||
allowRunningInsecureContent: false,
|
allowRunningInsecureContent: false,
|
||||||
});
|
});
|
||||||
|
@ -165,20 +168,20 @@ async function writeFileSafe(filename, contents) {
|
||||||
console.warn(prefix, "Concurrent write process on", filename);
|
console.warn(prefix, "Concurrent write process on", filename);
|
||||||
}
|
}
|
||||||
|
|
||||||
await fileLock.acquire(filename, async () => {
|
fileLock.acquire(filename, async () => {
|
||||||
console.log(prefix, "Starting write on", niceFileName(filename), "in transaction", transactionId);
|
console.log(prefix, "Starting write on", niceFileName(filename), "in transaction", transactionId);
|
||||||
|
|
||||||
if (!fs.existsSync(filename)) {
|
if (!fs.existsSync(filename)) {
|
||||||
// this one is easy
|
// this one is easy
|
||||||
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
||||||
fs.writeFileSync(filename, contents, { encoding: "utf8" });
|
await fs.promises.writeFile(filename, contents, "utf8");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// first, write a temporary file (.tmp-XXX)
|
// first, write a temporary file (.tmp-XXX)
|
||||||
const tempName = filename + ".tmp-" + transactionId;
|
const tempName = filename + ".tmp-" + transactionId;
|
||||||
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
||||||
fs.writeFileSync(tempName, contents, { encoding: "utf8" });
|
await fs.promises.writeFile(tempName, contents, "utf8");
|
||||||
|
|
||||||
// now, rename the original file to (.backup-XXX)
|
// now, rename the original file to (.backup-XXX)
|
||||||
const oldTemporaryName = filename + ".backup-" + transactionId;
|
const oldTemporaryName = filename + ".backup-" + transactionId;
|
||||||
|
@ -189,7 +192,7 @@ async function writeFileSafe(filename, contents) {
|
||||||
"to",
|
"to",
|
||||||
niceFileName(oldTemporaryName)
|
niceFileName(oldTemporaryName)
|
||||||
);
|
);
|
||||||
fs.renameSync(filename, oldTemporaryName);
|
await fs.promises.rename(filename, oldTemporaryName);
|
||||||
|
|
||||||
// now, rename the temporary file (.tmp-XXX) to the target
|
// now, rename the temporary file (.tmp-XXX) to the target
|
||||||
console.log(
|
console.log(
|
||||||
|
@ -199,7 +202,7 @@ async function writeFileSafe(filename, contents) {
|
||||||
"to the original",
|
"to the original",
|
||||||
niceFileName(filename)
|
niceFileName(filename)
|
||||||
);
|
);
|
||||||
fs.renameSync(tempName, filename);
|
await fs.promises.rename(tempName, filename);
|
||||||
|
|
||||||
// we are done now, try to create a backup, but don't fail if the backup fails
|
// we are done now, try to create a backup, but don't fail if the backup fails
|
||||||
try {
|
try {
|
||||||
|
@ -208,82 +211,43 @@ async function writeFileSafe(filename, contents) {
|
||||||
if (fs.existsSync(backupFileName)) {
|
if (fs.existsSync(backupFileName)) {
|
||||||
console.log(prefix, "Deleting old backup file", niceFileName(backupFileName));
|
console.log(prefix, "Deleting old backup file", niceFileName(backupFileName));
|
||||||
// delete the old backup
|
// delete the old backup
|
||||||
fs.unlinkSync(backupFileName);
|
await fs.promises.unlink(backupFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// rename the old file to the new backup file
|
// rename the old file to the new backup file
|
||||||
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
|
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
|
||||||
fs.renameSync(oldTemporaryName, backupFileName);
|
await fs.promises.rename(oldTemporaryName, backupFileName);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
console.error(prefix, "Failed to switch backup files:", ex);
|
console.error(prefix, "Failed to switch backup files:", ex);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function performFsJob(job) {
|
ipcMain.handle("fs-job", async (event, job) => {
|
||||||
const fname = path.join(storePath, job.filename);
|
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/i, "");
|
||||||
|
const fname = path.join(storePath, filenameSafe);
|
||||||
switch (job.type) {
|
switch (job.type) {
|
||||||
case "read": {
|
case "read": {
|
||||||
if (!fs.existsSync(fname)) {
|
if (!fs.existsSync(fname)) {
|
||||||
return {
|
|
||||||
// Special FILE_NOT_FOUND error code
|
// Special FILE_NOT_FOUND error code
|
||||||
error: "file_not_found",
|
return { error: "file_not_found" };
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const data = fs.readFileSync(fname, { encoding: "utf8" });
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
data,
|
|
||||||
};
|
|
||||||
} catch (ex) {
|
|
||||||
console.error(ex);
|
|
||||||
return {
|
|
||||||
error: ex,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
return await fs.promises.readFile(fname, "utf8");
|
||||||
}
|
}
|
||||||
case "write": {
|
case "write": {
|
||||||
try {
|
await writeFileSafe(fname, job.contents);
|
||||||
writeFileSafe(fname, job.contents);
|
return job.contents;
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
data: job.contents,
|
|
||||||
};
|
|
||||||
} catch (ex) {
|
|
||||||
console.error(ex);
|
|
||||||
return {
|
|
||||||
error: ex,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "delete": {
|
case "delete": {
|
||||||
try {
|
await fs.promises.unlink(fname);
|
||||||
fs.unlinkSync(fname);
|
return;
|
||||||
} catch (ex) {
|
|
||||||
console.error(ex);
|
|
||||||
return {
|
|
||||||
error: ex,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
success: true,
|
|
||||||
data: null,
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw new Error("Unkown fs job: " + job.type);
|
throw new Error("Unknown fs job: " + job.type);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ipcMain.on("fs-job", async (event, arg) => {
|
|
||||||
const result = await performFsJob(arg);
|
|
||||||
event.sender.send("fs-response", { id: arg.id, result });
|
|
||||||
});
|
});
|
||||||
|
|
||||||
wegame.init(isDev);
|
wegame.init(isDev);
|
||||||
wegame.listen();
|
wegame.listen();
|
||||||
|
|
|
@ -1,9 +0,0 @@
|
||||||
[[actions]]
|
|
||||||
name = "play"
|
|
||||||
path = "shapezio.exe"
|
|
||||||
platform = "windows"
|
|
||||||
|
|
||||||
[[actions]]
|
|
||||||
name = "play"
|
|
||||||
path = "play.sh"
|
|
||||||
platform = "linux"
|
|
|
@ -4,7 +4,14 @@ module.exports = function (api) {
|
||||||
[
|
[
|
||||||
"@babel/preset-env",
|
"@babel/preset-env",
|
||||||
{
|
{
|
||||||
targets: "cover 99.5%",
|
// targets: ">0.01%",
|
||||||
|
targets: {
|
||||||
|
edge: 10,
|
||||||
|
firefox: 37,
|
||||||
|
chrome: 24,
|
||||||
|
safari: 10,
|
||||||
|
ie: 10,
|
||||||
|
},
|
||||||
useBuiltIns: "usage",
|
useBuiltIns: "usage",
|
||||||
corejs: 3,
|
corejs: 3,
|
||||||
loose: true,
|
loose: true,
|
||||||
|
@ -14,14 +21,15 @@ module.exports = function (api) {
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
const plugins = [
|
const plugins = [
|
||||||
|
"@babel/plugin-transform-arrow-functions",
|
||||||
"closure-elimination",
|
"closure-elimination",
|
||||||
// var is faster than let and const!
|
// var is faster than let and const!
|
||||||
[
|
// [
|
||||||
"@babel/plugin-transform-block-scoping",
|
// "@babel/plugin-transform-block-scoping",
|
||||||
{
|
// {
|
||||||
throwIfClosureRequired: false,
|
// throwIfClosureRequired: true,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
[
|
[
|
||||||
"@babel/plugin-transform-classes",
|
"@babel/plugin-transform-classes",
|
||||||
{
|
{
|
||||||
|
@ -33,10 +41,10 @@ module.exports = function (api) {
|
||||||
presets,
|
presets,
|
||||||
plugins,
|
plugins,
|
||||||
highlightCode: true,
|
highlightCode: true,
|
||||||
sourceType: "module",
|
sourceType: "unambiguous",
|
||||||
sourceMaps: false,
|
sourceMaps: false,
|
||||||
parserOpts: {},
|
parserOpts: {},
|
||||||
only: ["../src/js"],
|
exclude: /(core-js|babel-core|babel-runtime)/,
|
||||||
generatorOpts: {
|
generatorOpts: {
|
||||||
retainLines: false,
|
retainLines: false,
|
||||||
compact: true,
|
compact: true,
|
||||||
|
|
|
@ -0,0 +1,74 @@
|
||||||
|
/**
|
||||||
|
* @type {Record<string, {
|
||||||
|
* standalone: boolean,
|
||||||
|
* environment?: 'dev' | 'staging' | 'prod',
|
||||||
|
* electronBaseDir?: string,
|
||||||
|
* steamAppId?: number,
|
||||||
|
* executableName?: string,
|
||||||
|
* buildArgs: {
|
||||||
|
* chineseVersion?: boolean,
|
||||||
|
* wegameVersion?: boolean,
|
||||||
|
* steamDemo?: boolean,
|
||||||
|
* gogVersion?: boolean
|
||||||
|
* }}>}
|
||||||
|
*/
|
||||||
|
const BUILD_VARIANTS = {
|
||||||
|
"web-localhost": {
|
||||||
|
standalone: false,
|
||||||
|
environment: "dev",
|
||||||
|
buildArgs: {},
|
||||||
|
},
|
||||||
|
"web-shapezio-beta": {
|
||||||
|
standalone: false,
|
||||||
|
environment: "staging",
|
||||||
|
buildArgs: {},
|
||||||
|
},
|
||||||
|
"web-shapezio": {
|
||||||
|
standalone: false,
|
||||||
|
environment: "prod",
|
||||||
|
buildArgs: {},
|
||||||
|
},
|
||||||
|
"standalone-steam": {
|
||||||
|
standalone: true,
|
||||||
|
executableName: "shapez",
|
||||||
|
steamAppId: 1318690,
|
||||||
|
buildArgs: {},
|
||||||
|
},
|
||||||
|
"standalone-steam-china": {
|
||||||
|
standalone: true,
|
||||||
|
steamAppId: 1318690,
|
||||||
|
buildArgs: {
|
||||||
|
chineseVersion: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"standalone-steam-demo": {
|
||||||
|
standalone: true,
|
||||||
|
steamAppId: 1930750,
|
||||||
|
buildArgs: {
|
||||||
|
steamDemo: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"standalone-steam-china-demo": {
|
||||||
|
standalone: true,
|
||||||
|
steamAppId: 1930750,
|
||||||
|
buildArgs: {
|
||||||
|
steamDemo: true,
|
||||||
|
chineseVersion: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"standalone-wegame": {
|
||||||
|
standalone: true,
|
||||||
|
electronBaseDir: "electron_wegame",
|
||||||
|
buildArgs: {
|
||||||
|
wegameVersion: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"standalone-gog": {
|
||||||
|
standalone: true,
|
||||||
|
electronBaseDir: "electron_gog",
|
||||||
|
buildArgs: {
|
||||||
|
gogVersion: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
module.exports = { BUILD_VARIANTS };
|
|
@ -29,7 +29,7 @@ module.exports = {
|
||||||
try {
|
try {
|
||||||
return execSync("git describe --tag --exact-match").toString("ascii");
|
return execSync("git describe --tag --exact-match").toString("ascii");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('Current git HEAD is not a version tag');
|
throw new Error("Current git HEAD is not a version tag");
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,115 +0,0 @@
|
||||||
/**
|
|
||||||
* ES6 Bundle Loader
|
|
||||||
*
|
|
||||||
* Attempts to load the game code, and if that fails tries with the transpiled
|
|
||||||
* version. Also handles errors during load.
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
var loadTimeout = null;
|
|
||||||
var callbackDone = false;
|
|
||||||
|
|
||||||
// Catch load errors
|
|
||||||
|
|
||||||
function errorHandler(event, source, lineno, colno, error) {
|
|
||||||
console.error("👀 Init Error:", event, source, lineno, colno, error);
|
|
||||||
var element = document.createElement("div");
|
|
||||||
element.style.position = "fixed";
|
|
||||||
element.style.top = "0";
|
|
||||||
element.style.right = "0";
|
|
||||||
element.style.bottom = "0";
|
|
||||||
element.style.left = "0";
|
|
||||||
element.style.zIndex = "29999";
|
|
||||||
element.style.backgroundColor = "#222429";
|
|
||||||
element.style.display = "flex";
|
|
||||||
element.style.justifyContent = "center";
|
|
||||||
element.style.alignItems = "center";
|
|
||||||
|
|
||||||
var inner = document.createElement("div");
|
|
||||||
inner.style.color = "#fff";
|
|
||||||
inner.style.fontFamily = "GameFont, sans-serif";
|
|
||||||
inner.style.fontSize = "15px";
|
|
||||||
inner.style.padding = "30px";
|
|
||||||
inner.style.textAlign = "center";
|
|
||||||
element.appendChild(inner);
|
|
||||||
|
|
||||||
var heading = document.createElement("h3");
|
|
||||||
heading.style.color = "#ef5072";
|
|
||||||
heading.innerText = "Error";
|
|
||||||
heading.style.marginBottom = "40px";
|
|
||||||
heading.style.fontSize = "45px";
|
|
||||||
inner.appendChild(heading);
|
|
||||||
|
|
||||||
var content = document.createElement("p");
|
|
||||||
content.style.color = "#eee";
|
|
||||||
content.innerText = error || (event && event.message) || event || "Unknown Error";
|
|
||||||
inner.appendChild(content);
|
|
||||||
|
|
||||||
if (source) {
|
|
||||||
var sourceElement = document.createElement("p");
|
|
||||||
sourceElement.style.color = "#777";
|
|
||||||
sourceElement.innerText = sourceElement + ":" + lineno + ":" + colno;
|
|
||||||
inner.appendChild(sourceElement);
|
|
||||||
}
|
|
||||||
|
|
||||||
document.documentElement.appendChild(element);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (window.location.host.indexOf("localhost") < 0) {
|
|
||||||
window.addEventListener("error", errorHandler);
|
|
||||||
window.addEventListener("unhandledrejection", errorHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
function makeJsTag(src, integrity) {
|
|
||||||
var script = document.createElement("script");
|
|
||||||
script.src = src;
|
|
||||||
script.type = "text/javascript";
|
|
||||||
script.charset = "utf-8";
|
|
||||||
script.defer = true;
|
|
||||||
if (integrity) {
|
|
||||||
script.setAttribute("integrity", integrity);
|
|
||||||
}
|
|
||||||
return script;
|
|
||||||
}
|
|
||||||
|
|
||||||
function loadFallbackJs(error) {
|
|
||||||
console.warn("👀 ES6 Script not supported, loading transpiled code.");
|
|
||||||
console.warn("👀 Error was:", error);
|
|
||||||
var scriptTransp = makeJsTag(bundleSrcTranspiled, bundleIntegrityTranspiled);
|
|
||||||
scriptTransp.addEventListener("error", scriptFail);
|
|
||||||
scriptTransp.addEventListener("load", onJsLoaded);
|
|
||||||
document.head.appendChild(scriptTransp);
|
|
||||||
}
|
|
||||||
|
|
||||||
function scriptFail(error) {
|
|
||||||
console.error("👀 Failed to load bundle!");
|
|
||||||
console.error("👀 Error was:", error);
|
|
||||||
throw new Error("Core load failed.");
|
|
||||||
}
|
|
||||||
|
|
||||||
function expectJsParsed() {
|
|
||||||
if (!callbackDone) {
|
|
||||||
console.error("👀 Got no core callback");
|
|
||||||
throw new Error("Core thread failed to respond within time.");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function onJsLoaded() {
|
|
||||||
console.log("👀 Core loaded at", Math.floor(performance.now()), "ms");
|
|
||||||
loadTimeout = setTimeout(expectJsParsed, 15000);
|
|
||||||
window.removeEventListener("error", errorHandler);
|
|
||||||
window.removeEventListener("unhandledrejection", errorHandler);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.coreThreadLoadedCb = function () {
|
|
||||||
console.log("👀 Core responded at", Math.floor(performance.now()), "ms");
|
|
||||||
clearTimeout(loadTimeout);
|
|
||||||
loadTimeout = null;
|
|
||||||
callbackDone = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
var scriptEs6 = makeJsTag(bundleSrc, bundleIntegrity);
|
|
||||||
scriptEs6.addEventListener("error", loadFallbackJs);
|
|
||||||
scriptEs6.addEventListener("load", onJsLoaded);
|
|
||||||
document.head.appendChild(scriptEs6);
|
|
||||||
})();
|
|
|
@ -1,139 +0,0 @@
|
||||||
const path = require("path");
|
|
||||||
const fs = require("fs");
|
|
||||||
const buildUtils = require("./buildutils");
|
|
||||||
|
|
||||||
function gulptasksCordova($, gulp, buildFolder) {
|
|
||||||
const cdvRes = path.join("..", "..", "res");
|
|
||||||
|
|
||||||
// Cleans up the app assets
|
|
||||||
// Removes all temporary folders used while optimizing the assets
|
|
||||||
gulp.task("cleanupAppAssetsBuiltFolder", () => {
|
|
||||||
return gulp
|
|
||||||
.src(path.join(cdvRes, "built"), { read: false, allowEmpty: true })
|
|
||||||
.pipe($.clean({ force: true }));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Optimizes all built assets
|
|
||||||
gulp.task("optimizeBuiltAppAssets", () => {
|
|
||||||
return gulp
|
|
||||||
.src(path.join(cdvRes, "built", "**", "*.png"))
|
|
||||||
.pipe($.flatten())
|
|
||||||
.pipe($.imagemin([$.imagemin.optipng({ optimizationLevel: 1 })]))
|
|
||||||
.pipe(gulp.dest(path.join(cdvRes, "built")));
|
|
||||||
});
|
|
||||||
|
|
||||||
// Scales the icon resources
|
|
||||||
gulp.task("scaleIconIos", async () => {
|
|
||||||
const sizes = [
|
|
||||||
180,
|
|
||||||
60,
|
|
||||||
120,
|
|
||||||
76,
|
|
||||||
152,
|
|
||||||
40,
|
|
||||||
80,
|
|
||||||
57,
|
|
||||||
114,
|
|
||||||
72,
|
|
||||||
144,
|
|
||||||
167,
|
|
||||||
29,
|
|
||||||
58,
|
|
||||||
87,
|
|
||||||
50,
|
|
||||||
100,
|
|
||||||
167,
|
|
||||||
20,
|
|
||||||
1024,
|
|
||||||
24,
|
|
||||||
48,
|
|
||||||
55,
|
|
||||||
172,
|
|
||||||
196,
|
|
||||||
];
|
|
||||||
for (let i = 0; i < sizes.length; ++i) {
|
|
||||||
const size = sizes[i];
|
|
||||||
console.log("Scaling icon to", size, "x", size);
|
|
||||||
const img = await $.jimp.read(path.join(cdvRes, "ios", "icon-prefab.png"));
|
|
||||||
await img.resize(size, size).write(path.join(cdvRes, "built", "ios", "icon@" + size + ".png"));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("copyOtherIosResources", () => {
|
|
||||||
return gulp
|
|
||||||
.src(path.join(cdvRes, "ios", "splash-prefab.png"))
|
|
||||||
.pipe($.rename("Default@2x~universal~anyany.png"))
|
|
||||||
.pipe(gulp.dest(path.join(cdvRes, "built", "ios")));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("prepareIosRes", gulp.series("scaleIconIos", "copyOtherIosResources"));
|
|
||||||
|
|
||||||
gulp.task("copyAndroidResources", () => {
|
|
||||||
return gulp
|
|
||||||
.src(path.join(cdvRes, "android", "**", "*.*"))
|
|
||||||
.pipe(gulp.dest(path.join(cdvRes, "built", "android")));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("prepareAndroidRes", gulp.series("copyAndroidResources"));
|
|
||||||
|
|
||||||
gulp.task(
|
|
||||||
"prepareCordovaAssets",
|
|
||||||
gulp.series(
|
|
||||||
"cleanupAppAssetsBuiltFolder",
|
|
||||||
gulp.parallel("prepareIosRes", "prepareAndroidRes"),
|
|
||||||
"optimizeBuiltAppAssets"
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
// Patches the config.xml by replacing the app id to app_beta
|
|
||||||
|
|
||||||
gulp.task("patchConfigXML", cb => {
|
|
||||||
const configUrl = path.join("..", "..", "config.xml");
|
|
||||||
let configContent = fs.readFileSync(configUrl).toString();
|
|
||||||
const version = buildUtils.getVersion();
|
|
||||||
configContent = configContent.replace("%VERSION%", version);
|
|
||||||
configContent = configContent.replace(' id="io.shapez.app" ', ' id="io.shapez.app_beta" ');
|
|
||||||
configContent = configContent.replace("<name>Shapez.io</name>", "<name>Shapez.io BETA</name>");
|
|
||||||
fs.writeFileSync(configUrl, configContent);
|
|
||||||
cb();
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("patchConfigXMLChangeStagingToProd", cb => {
|
|
||||||
const configUrl = path.join("..", "..", "config.xml");
|
|
||||||
let configContent = fs.readFileSync(configUrl).toString();
|
|
||||||
configContent = configContent.replace(' id="io.shapez.app_beta" ', ' id="io.shapez.app" ');
|
|
||||||
configContent = configContent.replace("<name>Shapez.io BETA</name>", "<name>Shapez.io</name>");
|
|
||||||
fs.writeFileSync(configUrl, configContent);
|
|
||||||
cb();
|
|
||||||
});
|
|
||||||
|
|
||||||
// Triggers a new build on phonegap
|
|
||||||
gulp.task("triggerPhonegapBuild", () => {
|
|
||||||
return gulp
|
|
||||||
.src("src/html/", { dot: false })
|
|
||||||
.pipe(
|
|
||||||
$.phonegapBuild({
|
|
||||||
isRepository: true,
|
|
||||||
appId: "3339820",
|
|
||||||
platforms: ["android", "ios"],
|
|
||||||
user: {
|
|
||||||
token: process.env.SHAPEZ_CLI_PHONEGAP_KEY,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
)
|
|
||||||
.pipe(
|
|
||||||
$.phonegapBuild({
|
|
||||||
isRepository: true,
|
|
||||||
appId: "3537816",
|
|
||||||
platforms: ["android", "ios"],
|
|
||||||
user: {
|
|
||||||
token: process.env.SHAPEZ_CLI_PHONEGAP_KEY,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
gulptasksCordova,
|
|
||||||
};
|
|
|
@ -8,5 +8,11 @@
|
||||||
<true/>
|
<true/>
|
||||||
<key>com.apple.security.cs.debugger</key>
|
<key>com.apple.security.cs.debugger</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-library-validation</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
|
||||||
|
<true/>
|
||||||
|
<key>com.apple.security.cs.disable-executable-page-protection</key>
|
||||||
|
<true/>
|
||||||
</dict>
|
</dict>
|
||||||
</plist>
|
</plist>
|
222
gulp/gulpfile.js
|
@ -18,7 +18,6 @@ const $ = require("gulp-load-plugins")({
|
||||||
|
|
||||||
const envVars = [
|
const envVars = [
|
||||||
"SHAPEZ_CLI_SERVER_HOST",
|
"SHAPEZ_CLI_SERVER_HOST",
|
||||||
// "SHAPEZ_CLI_PHONEGAP_KEY",
|
|
||||||
"SHAPEZ_CLI_ALPHA_FTP_USER",
|
"SHAPEZ_CLI_ALPHA_FTP_USER",
|
||||||
"SHAPEZ_CLI_ALPHA_FTP_PW",
|
"SHAPEZ_CLI_ALPHA_FTP_PW",
|
||||||
"SHAPEZ_CLI_STAGING_FTP_USER",
|
"SHAPEZ_CLI_STAGING_FTP_USER",
|
||||||
|
@ -33,13 +32,13 @@ const envVars = [
|
||||||
|
|
||||||
for (let i = 0; i < envVars.length; ++i) {
|
for (let i = 0; i < envVars.length; ++i) {
|
||||||
if (!process.env[envVars[i]]) {
|
if (!process.env[envVars[i]]) {
|
||||||
console.warn("Please set", envVars[i]);
|
console.warn("Unset environment variable, might cause issues:", envVars[i]);
|
||||||
// process.exit(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseDir = path.join(__dirname, "..");
|
const baseDir = path.join(__dirname, "..");
|
||||||
const buildFolder = path.join(baseDir, "build");
|
const buildFolder = path.join(baseDir, "build");
|
||||||
|
const buildOuptutFolder = path.join(baseDir, "build_output");
|
||||||
|
|
||||||
const imgres = require("./image-resources");
|
const imgres = require("./image-resources");
|
||||||
imgres.gulptasksImageResources($, gulp, buildFolder);
|
imgres.gulptasksImageResources($, gulp, buildFolder);
|
||||||
|
@ -57,7 +56,7 @@ const js = require("./js");
|
||||||
js.gulptasksJS($, gulp, buildFolder, browserSync);
|
js.gulptasksJS($, gulp, buildFolder, browserSync);
|
||||||
|
|
||||||
const html = require("./html");
|
const html = require("./html");
|
||||||
html.gulptasksHTML($, gulp, buildFolder, browserSync);
|
html.gulptasksHTML($, gulp, buildFolder);
|
||||||
|
|
||||||
const ftp = require("./ftp");
|
const ftp = require("./ftp");
|
||||||
ftp.gulptasksFTP($, gulp, buildFolder);
|
ftp.gulptasksFTP($, gulp, buildFolder);
|
||||||
|
@ -66,13 +65,11 @@ const docs = require("./docs");
|
||||||
docs.gulptasksDocs($, gulp, buildFolder);
|
docs.gulptasksDocs($, gulp, buildFolder);
|
||||||
|
|
||||||
const standalone = require("./standalone");
|
const standalone = require("./standalone");
|
||||||
standalone.gulptasksStandalone($, gulp, buildFolder);
|
standalone.gulptasksStandalone($, gulp);
|
||||||
|
|
||||||
const releaseUploader = require("./release-uploader");
|
|
||||||
releaseUploader.gulptasksReleaseUploader($, gulp, buildFolder);
|
|
||||||
|
|
||||||
const translations = require("./translations");
|
const translations = require("./translations");
|
||||||
translations.gulptasksTranslations($, gulp, buildFolder);
|
const { BUILD_VARIANTS } = require("./build_variants");
|
||||||
|
translations.gulptasksTranslations($, gulp);
|
||||||
|
|
||||||
///////////////////// BUILD TASKS /////////////////////
|
///////////////////// BUILD TASKS /////////////////////
|
||||||
|
|
||||||
|
@ -80,6 +77,9 @@ translations.gulptasksTranslations($, gulp, buildFolder);
|
||||||
gulp.task("utils.cleanBuildFolder", () => {
|
gulp.task("utils.cleanBuildFolder", () => {
|
||||||
return gulp.src(buildFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
return gulp.src(buildFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
||||||
});
|
});
|
||||||
|
gulp.task("utils.cleanBuildOutputFolder", () => {
|
||||||
|
return gulp.src(buildOuptutFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
||||||
|
});
|
||||||
gulp.task("utils.cleanBuildTempFolder", () => {
|
gulp.task("utils.cleanBuildTempFolder", () => {
|
||||||
return gulp
|
return gulp
|
||||||
.src(path.join(__dirname, "..", "src", "js", "built-temp"), { read: false, allowEmpty: true })
|
.src(path.join(__dirname, "..", "src", "js", "built-temp"), { read: false, allowEmpty: true })
|
||||||
|
@ -142,11 +142,11 @@ gulp.task("main.webserver", () => {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {object} param0
|
* @param {object} param0
|
||||||
* @param {"web"|"standalone"|"china"|"wegame"} param0.version
|
* @param {keyof typeof BUILD_VARIANTS} param0.version
|
||||||
*/
|
*/
|
||||||
function serve({ version = "web" }) {
|
function serveHTML({ version = "web-dev" }) {
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
server: buildFolder,
|
server: [buildFolder, path.join(baseDir, "mod_examples")],
|
||||||
port: 3005,
|
port: 3005,
|
||||||
ghostMode: {
|
ghostMode: {
|
||||||
clicks: false,
|
clicks: false,
|
||||||
|
@ -168,10 +168,8 @@ function serve({ version = "web" }) {
|
||||||
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
|
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
|
||||||
|
|
||||||
// Watch .html files, those trigger a html rebuild
|
// Watch .html files, those trigger a html rebuild
|
||||||
gulp.watch("../src/**/*.html", gulp.series(version === "web" ? "html.dev" : "html.standalone-dev"));
|
gulp.watch("../src/**/*.html", gulp.series("html." + version + ".dev"));
|
||||||
|
gulp.watch("./preloader/*.*", gulp.series("html." + version + ".dev"));
|
||||||
// Watch sound files
|
|
||||||
// gulp.watch(["../res_raw/sounds/**/*.mp3", "../res_raw/sounds/**/*.wav"], gulp.series("sounds.dev"));
|
|
||||||
|
|
||||||
// Watch translations
|
// Watch translations
|
||||||
gulp.watch("../translations/**/*.yaml", gulp.series("translations.convertToJson"));
|
gulp.watch("../translations/**/*.yaml", gulp.series("translations.convertToJson"));
|
||||||
|
@ -204,30 +202,8 @@ function serve({ version = "web" }) {
|
||||||
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
||||||
});
|
});
|
||||||
|
|
||||||
switch (version) {
|
gulp.series("js." + version + ".dev.watch")(() => true);
|
||||||
case "web": {
|
|
||||||
gulp.series("js.dev.watch")(() => true);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
case "standalone": {
|
|
||||||
gulp.series("js.standalone-dev.watch")(() => true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "china": {
|
|
||||||
gulp.series("china.js.dev.watch")(() => true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case "wegame": {
|
|
||||||
gulp.series("wegame.js.dev.watch")(() => true);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
throw new Error("Unknown version " + version);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
///////////////////// RUNNABLE TASKS /////////////////////
|
|
||||||
|
|
||||||
// Pre and postbuild
|
// Pre and postbuild
|
||||||
gulp.task("step.baseResources", gulp.series("imgres.allOptimized"));
|
gulp.task("step.baseResources", gulp.series("imgres.allOptimized"));
|
||||||
|
@ -238,9 +214,11 @@ gulp.task("step.deleteEmpty", cb => {
|
||||||
|
|
||||||
gulp.task("step.postbuild", gulp.series("imgres.cleanupUnusedCssInlineImages", "step.deleteEmpty"));
|
gulp.task("step.postbuild", gulp.series("imgres.cleanupUnusedCssInlineImages", "step.deleteEmpty"));
|
||||||
|
|
||||||
|
///////////////////// RUNNABLE TASKS /////////////////////
|
||||||
|
|
||||||
// Builds everything (dev)
|
// Builds everything (dev)
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"build.dev",
|
"build.prepare.dev",
|
||||||
gulp.series(
|
gulp.series(
|
||||||
"utils.cleanup",
|
"utils.cleanup",
|
||||||
"utils.copyAdditionalBuildFiles",
|
"utils.copyAdditionalBuildFiles",
|
||||||
|
@ -252,136 +230,88 @@ gulp.task(
|
||||||
"imgres.copyImageResources",
|
"imgres.copyImageResources",
|
||||||
"imgres.copyNonImageResources",
|
"imgres.copyNonImageResources",
|
||||||
"translations.fullBuild",
|
"translations.fullBuild",
|
||||||
"css.dev",
|
"css.dev"
|
||||||
"html.dev"
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Builds everything (standalone -dev)
|
// Builds everything for every variant
|
||||||
|
for (const variant in BUILD_VARIANTS) {
|
||||||
|
const data = BUILD_VARIANTS[variant];
|
||||||
|
const buildName = "build." + variant;
|
||||||
|
|
||||||
|
// build
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"build.standalone.dev",
|
buildName + ".code",
|
||||||
gulp.series(
|
gulp.series(
|
||||||
"utils.cleanup",
|
data.standalone ? "sounds.fullbuildHQ" : "sounds.fullbuild",
|
||||||
"localConfig.findOrCreate",
|
|
||||||
"imgres.buildAtlas",
|
|
||||||
"imgres.atlasToJson",
|
|
||||||
"imgres.atlas",
|
|
||||||
"sounds.dev",
|
|
||||||
"imgres.copyImageResources",
|
|
||||||
"imgres.copyNonImageResources",
|
|
||||||
"translations.fullBuild",
|
"translations.fullBuild",
|
||||||
"css.dev",
|
"js." + variant + ".prod"
|
||||||
"html.standalone-dev"
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Builds everything (staging)
|
gulp.task(buildName + ".resourcesAndCode", gulp.parallel("step.baseResources", buildName + ".code"));
|
||||||
gulp.task("step.staging.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.staging"));
|
|
||||||
gulp.task(
|
|
||||||
"step.staging.mainbuild",
|
|
||||||
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code")
|
|
||||||
);
|
|
||||||
gulp.task("step.staging.all", gulp.series("step.staging.mainbuild", "css.prod", "html.staging"));
|
|
||||||
gulp.task("build.staging", gulp.series("utils.cleanup", "step.staging.all", "step.postbuild"));
|
|
||||||
|
|
||||||
// Builds everything (prod)
|
|
||||||
gulp.task("step.prod.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.prod"));
|
|
||||||
gulp.task(
|
|
||||||
"step.prod.mainbuild",
|
|
||||||
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code")
|
|
||||||
);
|
|
||||||
gulp.task("step.prod.all", gulp.series("step.prod.mainbuild", "css.prod", "html.prod"));
|
|
||||||
gulp.task("build.prod", gulp.series("utils.cleanup", "step.prod.all", "step.postbuild"));
|
|
||||||
|
|
||||||
// Builds everything (standalone-beta)
|
|
||||||
gulp.task(
|
|
||||||
"step.standalone-beta.code",
|
|
||||||
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-beta")
|
|
||||||
);
|
|
||||||
gulp.task("step.standalone-beta.mainbuild", gulp.parallel("step.baseResources", "step.standalone-beta.code"));
|
|
||||||
gulp.task(
|
|
||||||
"step.standalone-beta.all",
|
|
||||||
gulp.series("step.standalone-beta.mainbuild", "css.prod-standalone", "html.standalone-beta")
|
|
||||||
);
|
|
||||||
gulp.task(
|
|
||||||
"build.standalone-beta",
|
|
||||||
gulp.series("utils.cleanup", "step.standalone-beta.all", "step.postbuild")
|
|
||||||
);
|
|
||||||
|
|
||||||
// Builds everything (standalone-prod)
|
|
||||||
|
|
||||||
for (const prefix of ["", "china.", "wegame."]) {
|
|
||||||
gulp.task(
|
|
||||||
prefix + "step.standalone-prod.code",
|
|
||||||
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", prefix + "js.standalone-prod")
|
|
||||||
);
|
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(
|
||||||
prefix + "step.standalone-prod.mainbuild",
|
buildName + ".all",
|
||||||
gulp.parallel("step.baseResources", prefix + "step.standalone-prod.code")
|
gulp.series(buildName + ".resourcesAndCode", "css.prod-standalone", "html." + variant + ".prod")
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(buildName, gulp.series("utils.cleanup", buildName + ".all", "step.postbuild"));
|
||||||
prefix + "step.standalone-prod.all",
|
|
||||||
gulp.series(prefix + "step.standalone-prod.mainbuild", "css.prod-standalone", "html.standalone-prod")
|
|
||||||
);
|
|
||||||
|
|
||||||
|
// bundle
|
||||||
|
if (data.standalone) {
|
||||||
gulp.task(
|
gulp.task(
|
||||||
prefix + "build.standalone-prod",
|
"bundle." + variant + ".from-windows",
|
||||||
gulp.series("utils.cleanup", prefix + "step.standalone-prod.all", "step.postbuild")
|
gulp.series(buildName, "standalone." + variant + ".build-from-windows")
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
"bundle." + variant + ".from-darwin",
|
||||||
|
gulp.series(buildName, "standalone." + variant + ".build-from-darwin")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// serve
|
||||||
|
gulp.task(
|
||||||
|
"serve." + variant,
|
||||||
|
gulp.series("build.prepare.dev", "html." + variant + ".dev", () => serveHTML({ version: variant }))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Deploying!
|
// Deploying!
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.deploy.alpha",
|
"deploy.staging",
|
||||||
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.alpha")
|
gulp.series("utils.requireCleanWorkingTree", "build.web-shapezio-beta", "ftp.upload.staging")
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.deploy.staging",
|
"deploy.prod",
|
||||||
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.staging")
|
gulp.series("utils.requireCleanWorkingTree", "build.web-shapezio", "ftp.upload.prod")
|
||||||
);
|
|
||||||
gulp.task("main.deploy.prod", gulp.series("utils.requireCleanWorkingTree", "build.prod", "ftp.upload.prod"));
|
|
||||||
gulp.task("main.deploy.all", gulp.series("main.deploy.staging", "main.deploy.prod"));
|
|
||||||
|
|
||||||
// steam
|
|
||||||
gulp.task("regular.main.standalone", gulp.series("build.standalone-prod", "standalone.package.prod"));
|
|
||||||
|
|
||||||
// china
|
|
||||||
gulp.task(
|
|
||||||
"china.main.standalone",
|
|
||||||
gulp.series("china.build.standalone-prod", "china.standalone.package.prod")
|
|
||||||
);
|
);
|
||||||
|
|
||||||
// wegame
|
// Bundling (pre upload)
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"wegame.main.standalone",
|
"bundle.steam.from-darwin",
|
||||||
gulp.series("wegame.build.standalone-prod", "wegame.standalone.package.prod")
|
gulp.series("utils.cleanBuildOutputFolder", "bundle.standalone-steam.from-darwin")
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
"bundle.steam.from-windows",
|
||||||
|
gulp.series(
|
||||||
|
"utils.cleanBuildOutputFolder",
|
||||||
|
"bundle.standalone-steam.from-windows",
|
||||||
|
"bundle.standalone-steam-china.from-windows"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
"bundle.steam-demo.from-darwin",
|
||||||
|
gulp.series("utils.cleanBuildOutputFolder", "bundle.standalone-steam-demo.from-darwin")
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
"bundle.steam-demo.from-windows",
|
||||||
|
gulp.series(
|
||||||
|
"utils.cleanBuildOutputFolder",
|
||||||
|
"bundle.standalone-steam-demo.from-windows",
|
||||||
|
"bundle.standalone-steam-china-demo.from-windows"
|
||||||
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
// all (except wegame)
|
// Default task (dev, localhost)
|
||||||
gulp.task("standalone.steam", gulp.series("regular.main.standalone", "china.main.standalone"));
|
gulp.task("default", gulp.series("serve.web-localhost"));
|
||||||
gulp.task(
|
|
||||||
"standalone.all",
|
|
||||||
gulp.series("regular.main.standalone", "china.main.standalone", "wegame.main.standalone")
|
|
||||||
);
|
|
||||||
|
|
||||||
// Live-development
|
|
||||||
gulp.task(
|
|
||||||
"main.serveDev",
|
|
||||||
gulp.series("build.dev", () => serve({ version: "web" }))
|
|
||||||
);
|
|
||||||
gulp.task(
|
|
||||||
"main.serveStandalone",
|
|
||||||
gulp.series("build.standalone.dev", () => serve({ version: "standalone" }))
|
|
||||||
);
|
|
||||||
gulp.task(
|
|
||||||
"china.main.serveDev",
|
|
||||||
gulp.series("build.dev", () => serve({ version: "china" }))
|
|
||||||
);
|
|
||||||
gulp.task(
|
|
||||||
"wegame.main.serveDev",
|
|
||||||
gulp.series("build.dev", () => serve({ version: "wegame" }))
|
|
||||||
);
|
|
||||||
|
|
||||||
gulp.task("default", gulp.series("main.serveDev"));
|
|
||||||
|
|
198
gulp/html.js
|
@ -2,6 +2,7 @@ const buildUtils = require("./buildutils");
|
||||||
const fs = require("fs");
|
const fs = require("fs");
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const crypto = require("crypto");
|
const crypto = require("crypto");
|
||||||
|
const { BUILD_VARIANTS } = require("./build_variants");
|
||||||
|
|
||||||
function computeIntegrityHash(fullPath, algorithm = "sha256") {
|
function computeIntegrityHash(fullPath, algorithm = "sha256") {
|
||||||
const file = fs.readFileSync(fullPath);
|
const file = fs.readFileSync(fullPath);
|
||||||
|
@ -9,12 +10,20 @@ function computeIntegrityHash(fullPath, algorithm = "sha256") {
|
||||||
return algorithm + "-" + hash;
|
return algorithm + "-" + hash;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PROVIDES (per <variant>)
|
||||||
|
*
|
||||||
|
* html.<variant>.dev
|
||||||
|
* html.<variant>.prod
|
||||||
|
*/
|
||||||
function gulptasksHTML($, gulp, buildFolder) {
|
function gulptasksHTML($, gulp, buildFolder) {
|
||||||
const commitHash = buildUtils.getRevision();
|
const commitHash = buildUtils.getRevision();
|
||||||
async function buildHtml(
|
async function buildHtml({
|
||||||
apiUrl,
|
googleAnalytics = false,
|
||||||
{ analytics = false, standalone = false, app = false, integrity = true, enableCachebust = true }
|
standalone = false,
|
||||||
) {
|
integrity = true,
|
||||||
|
enableCachebust = true,
|
||||||
|
}) {
|
||||||
function cachebust(url) {
|
function cachebust(url) {
|
||||||
if (enableCachebust) {
|
if (enableCachebust) {
|
||||||
return buildUtils.cachebust(url, commitHash);
|
return buildUtils.cachebust(url, commitHash);
|
||||||
|
@ -22,7 +31,7 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
const hasLocalFiles = standalone || app;
|
const hasLocalFiles = standalone;
|
||||||
|
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/html/" + (standalone ? "index.standalone.html" : "index.html"))
|
.src("../src/html/" + (standalone ? "index.standalone.html" : "index.html"))
|
||||||
|
@ -31,13 +40,6 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
/** @this {Document} **/ function () {
|
/** @this {Document} **/ function () {
|
||||||
const document = this;
|
const document = this;
|
||||||
|
|
||||||
// Preconnect to api
|
|
||||||
const prefetchLink = document.createElement("link");
|
|
||||||
prefetchLink.rel = "preconnect";
|
|
||||||
prefetchLink.href = apiUrl;
|
|
||||||
prefetchLink.setAttribute("crossorigin", "anonymous");
|
|
||||||
document.head.appendChild(prefetchLink);
|
|
||||||
|
|
||||||
// Append css
|
// Append css
|
||||||
const css = document.createElement("link");
|
const css = document.createElement("link");
|
||||||
css.rel = "stylesheet";
|
css.rel = "stylesheet";
|
||||||
|
@ -53,31 +55,8 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
}
|
}
|
||||||
document.head.appendChild(css);
|
document.head.appendChild(css);
|
||||||
|
|
||||||
// Append async css
|
|
||||||
// const asyncCss = document.createElement("link");
|
|
||||||
// asyncCss.rel = "stylesheet";
|
|
||||||
// asyncCss.type = "text/css";
|
|
||||||
// asyncCss.media = "none";
|
|
||||||
// asyncCss.setAttribute("onload", "this.media='all'");
|
|
||||||
// asyncCss.href = cachebust("async-resources.css");
|
|
||||||
// if (integrity) {
|
|
||||||
// asyncCss.setAttribute(
|
|
||||||
// "integrity",
|
|
||||||
// computeIntegrityHash(path.join(buildFolder, "async-resources.css"))
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// document.head.appendChild(asyncCss);
|
|
||||||
|
|
||||||
if (app) {
|
|
||||||
// Append cordova link
|
|
||||||
const cdv = document.createElement("script");
|
|
||||||
cdv.src = "cordova.js";
|
|
||||||
cdv.type = "text/javascript";
|
|
||||||
document.head.appendChild(cdv);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Google analytics
|
// Google analytics
|
||||||
if (analytics) {
|
if (googleAnalytics && false) {
|
||||||
const tagManagerScript = document.createElement("script");
|
const tagManagerScript = document.createElement("script");
|
||||||
tagManagerScript.src =
|
tagManagerScript.src =
|
||||||
"https://www.googletagmanager.com/gtag/js?id=UA-165342524-1";
|
"https://www.googletagmanager.com/gtag/js?id=UA-165342524-1";
|
||||||
|
@ -92,28 +71,28 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
gtag('config', 'UA-165342524-1', { anonymize_ip: true });
|
gtag('config', 'UA-165342524-1', { anonymize_ip: true });
|
||||||
`;
|
`;
|
||||||
document.head.appendChild(initScript);
|
document.head.appendChild(initScript);
|
||||||
|
|
||||||
const abTestingScript = document.createElement("script");
|
|
||||||
abTestingScript.setAttribute(
|
|
||||||
"src",
|
|
||||||
"https://www.googleoptimize.com/optimize.js?id=OPT-M5NHCV7"
|
|
||||||
);
|
|
||||||
abTestingScript.setAttribute("async", "");
|
|
||||||
document.head.appendChild(abTestingScript);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not need to preload in app or standalone
|
// Do not need to preload in app or standalone
|
||||||
if (!hasLocalFiles) {
|
if (!hasLocalFiles) {
|
||||||
// Preload essentials
|
// Preload essentials
|
||||||
const preloads = ["fonts/GameFont.woff2"];
|
const preloads = [
|
||||||
|
"res/fonts/GameFont.woff2",
|
||||||
|
// "async-resources.css",
|
||||||
|
// "res/sounds/music/theme-short.mp3",
|
||||||
|
];
|
||||||
|
|
||||||
preloads.forEach(src => {
|
preloads.forEach(src => {
|
||||||
const preloadLink = document.createElement("link");
|
const preloadLink = document.createElement("link");
|
||||||
preloadLink.rel = "preload";
|
preloadLink.rel = "preload";
|
||||||
preloadLink.href = cachebust("res/" + src);
|
preloadLink.href = cachebust(src);
|
||||||
if (src.endsWith(".woff2")) {
|
if (src.endsWith(".woff2")) {
|
||||||
preloadLink.setAttribute("crossorigin", "anonymous");
|
preloadLink.setAttribute("crossorigin", "anonymous");
|
||||||
preloadLink.setAttribute("as", "font");
|
preloadLink.setAttribute("as", "font");
|
||||||
|
} else if (src.endsWith(".css")) {
|
||||||
|
preloadLink.setAttribute("as", "style");
|
||||||
|
} else if (src.endsWith(".mp3")) {
|
||||||
|
preloadLink.setAttribute("as", "audio");
|
||||||
} else {
|
} else {
|
||||||
preloadLink.setAttribute("as", "image");
|
preloadLink.setAttribute("as", "image");
|
||||||
}
|
}
|
||||||
|
@ -121,65 +100,28 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadingSvg = `background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46YXV0bztiYWNrZ3JvdW5kOjAgMCIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgZGlzcGxheT0iYmxvY2siPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzM5Mzc0NyIgc3Ryb2tlLXdpZHRoPSIzIiByPSI0MiIgc3Ryb2tlLWRhc2hhcnJheT0iMTk3LjkyMDMzNzE3NjE1Njk4IDY3Ljk3MzQ0NTcyNTM4NTY2IiB0cmFuc2Zvcm09InJvdGF0ZSg0OC4yNjUgNTAgNTApIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iNS41NTU1NTU1NTU1NTU1NTVzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIi8+PC9jaXJjbGU+PC9zdmc+")`;
|
let fontCss = `
|
||||||
|
|
||||||
const loadingCss = `
|
|
||||||
@font-face {
|
@font-face {
|
||||||
font-family: 'GameFont';
|
font-family: "GameFont";
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-display: swap;
|
font-display: swap;
|
||||||
src: url('${cachebust("res/fonts/GameFont.woff2")}') format('woff2');
|
src: url('${cachebust("res/fonts/GameFont.woff2")}') format("woff2");
|
||||||
}
|
|
||||||
|
|
||||||
#ll_fp {
|
|
||||||
font-family: GameFont;
|
|
||||||
font-size: 14px;
|
|
||||||
position: fixed;
|
|
||||||
z-index: -1;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
opacity: 0.05;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ll_p {
|
|
||||||
display: flex;
|
|
||||||
position: fixed;
|
|
||||||
z-index: 99999;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
justify-content:
|
|
||||||
center;
|
|
||||||
align-items: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ll_p > div {
|
|
||||||
position: absolute;
|
|
||||||
text-align: center;
|
|
||||||
bottom: 40px;
|
|
||||||
left: 20px;
|
|
||||||
right: 20px;
|
|
||||||
color: #393747;
|
|
||||||
font-family: 'GameFont', sans-serif;
|
|
||||||
font-size: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#ll_p > span {
|
|
||||||
width: 60px;
|
|
||||||
height: 60px;
|
|
||||||
display: inline-flex;
|
|
||||||
background: center center / contain no-repeat;
|
|
||||||
${loadingSvg};
|
|
||||||
}
|
}
|
||||||
`;
|
`;
|
||||||
|
let loadingCss =
|
||||||
|
fontCss +
|
||||||
|
fs.readFileSync(path.join(__dirname, "preloader", "preloader.css")).toString();
|
||||||
|
|
||||||
const style = document.createElement("style");
|
const style = document.createElement("style");
|
||||||
style.setAttribute("type", "text/css");
|
style.setAttribute("type", "text/css");
|
||||||
style.textContent = loadingCss;
|
style.textContent = loadingCss;
|
||||||
document.head.appendChild(style);
|
document.head.appendChild(style);
|
||||||
|
|
||||||
|
let bodyContent = fs
|
||||||
|
.readFileSync(path.join(__dirname, "preloader", "preloader.html"))
|
||||||
|
.toString();
|
||||||
|
|
||||||
// Append loader, but not in standalone (directly include bundle there)
|
// Append loader, but not in standalone (directly include bundle there)
|
||||||
if (standalone) {
|
if (standalone) {
|
||||||
const bundleScript = document.createElement("script");
|
const bundleScript = document.createElement("script");
|
||||||
|
@ -197,37 +139,24 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
loadJs.type = "text/javascript";
|
loadJs.type = "text/javascript";
|
||||||
let scriptContent = "";
|
let scriptContent = "";
|
||||||
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
|
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
|
||||||
scriptContent += `var bundleSrcTranspiled = '${cachebust(
|
|
||||||
"bundle-transpiled.js"
|
|
||||||
)}';\n`;
|
|
||||||
|
|
||||||
if (integrity) {
|
if (integrity) {
|
||||||
scriptContent +=
|
scriptContent +=
|
||||||
"var bundleIntegrity = '" +
|
"var bundleIntegrity = '" +
|
||||||
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
|
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
|
||||||
"';\n";
|
"';\n";
|
||||||
scriptContent +=
|
|
||||||
"var bundleIntegrityTranspiled = '" +
|
|
||||||
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +
|
|
||||||
"';\n";
|
|
||||||
} else {
|
} else {
|
||||||
scriptContent += "var bundleIntegrity = null;\n";
|
scriptContent += "var bundleIntegrity = null;\n";
|
||||||
scriptContent += "var bundleIntegrityTranspiled = null;\n";
|
scriptContent += "var bundleIntegrityTranspiled = null;\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
scriptContent += fs.readFileSync("./bundle-loader.js").toString();
|
scriptContent += fs
|
||||||
|
.readFileSync(path.join(__dirname, "preloader", "preloader.js"))
|
||||||
|
.toString();
|
||||||
loadJs.textContent = scriptContent;
|
loadJs.textContent = scriptContent;
|
||||||
document.head.appendChild(loadJs);
|
document.head.appendChild(loadJs);
|
||||||
}
|
}
|
||||||
|
|
||||||
const bodyContent = `
|
|
||||||
<div id="ll_fp">_</div>
|
|
||||||
<div id="ll_p">
|
|
||||||
<span></span>
|
|
||||||
<div>${hasLocalFiles ? "Loading" : "Downloading"} Game Files</div >
|
|
||||||
</div >
|
|
||||||
`;
|
|
||||||
|
|
||||||
document.body.innerHTML = bodyContent;
|
document.body.innerHTML = bodyContent;
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
@ -250,51 +179,26 @@ function gulptasksHTML($, gulp, buildFolder) {
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task("html.dev", () => {
|
for (const variant in BUILD_VARIANTS) {
|
||||||
return buildHtml("http://localhost:5005", {
|
const data = BUILD_VARIANTS[variant];
|
||||||
analytics: false,
|
gulp.task("html." + variant + ".dev", () => {
|
||||||
|
return buildHtml({
|
||||||
|
googleAnalytics: false,
|
||||||
|
standalone: data.standalone,
|
||||||
integrity: false,
|
integrity: false,
|
||||||
enableCachebust: false,
|
enableCachebust: false,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
gulp.task("html." + variant + ".prod", () => {
|
||||||
gulp.task("html.staging", () => {
|
return buildHtml({
|
||||||
return buildHtml("https://api-staging.shapez.io", {
|
googleAnalytics: !data.standalone,
|
||||||
analytics: true,
|
standalone: data.standalone,
|
||||||
});
|
integrity: true,
|
||||||
});
|
enableCachebust: !data.standalone,
|
||||||
|
|
||||||
gulp.task("html.prod", () => {
|
|
||||||
return buildHtml("https://analytics.shapez.io", {
|
|
||||||
analytics: true,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("html.standalone-dev", () => {
|
|
||||||
return buildHtml("https://localhost:5005", {
|
|
||||||
analytics: false,
|
|
||||||
standalone: true,
|
|
||||||
integrity: false,
|
|
||||||
enableCachebust: false,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("html.standalone-beta", () => {
|
|
||||||
return buildHtml("https://api-staging.shapez.io", {
|
|
||||||
analytics: false,
|
|
||||||
standalone: true,
|
|
||||||
enableCachebust: false,
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("html.standalone-prod", () => {
|
|
||||||
return buildHtml("https://analytics.shapez.io", {
|
|
||||||
analytics: false,
|
|
||||||
standalone: true,
|
|
||||||
enableCachebust: false,
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
gulptasksHTML,
|
gulptasksHTML,
|
||||||
|
|
|
@ -18,7 +18,7 @@ const nonImageResourcesGlobs = ["../res/**/*.woff2", "../res/*.ico", "../res/**/
|
||||||
const imageResourcesGlobs = ["../res/**/*.png", "../res/**/*.svg", "../res/**/*.jpg", "../res/**/*.gif"];
|
const imageResourcesGlobs = ["../res/**/*.png", "../res/**/*.svg", "../res/**/*.jpg", "../res/**/*.gif"];
|
||||||
|
|
||||||
// Link to download LibGDX runnable-texturepacker.jar
|
// Link to download LibGDX runnable-texturepacker.jar
|
||||||
const runnableTPSource = "https://libgdx.badlogicgames.com/ci/nightlies/runnables/runnable-texturepacker.jar";
|
const runnableTPSource = "https://libgdx-nightlies.s3.eu-central-1.amazonaws.com/libgdx-runnables/runnable-texturepacker.jar";
|
||||||
|
|
||||||
function gulptasksImageResources($, gulp, buildFolder) {
|
function gulptasksImageResources($, gulp, buildFolder) {
|
||||||
// Lossless options
|
// Lossless options
|
||||||
|
|
213
gulp/js.js
|
@ -1,19 +1,34 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
|
const { BUILD_VARIANTS } = require("./build_variants");
|
||||||
|
|
||||||
function requireUncached(module) {
|
function requireUncached(module) {
|
||||||
delete require.cache[require.resolve(module)];
|
delete require.cache[require.resolve(module)];
|
||||||
return require(module);
|
return require(module);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PROVIDES (per <variant>)
|
||||||
|
*
|
||||||
|
* js.<variant>.dev.watch
|
||||||
|
* js.<variant>.dev
|
||||||
|
* js.<variant>.prod
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
function gulptasksJS($, gulp, buildFolder, browserSync) {
|
function gulptasksJS($, gulp, buildFolder, browserSync) {
|
||||||
//// DEV
|
//// DEV
|
||||||
|
|
||||||
gulp.task("js.dev.watch", () => {
|
for (const variant in BUILD_VARIANTS) {
|
||||||
|
const data = BUILD_VARIANTS[variant];
|
||||||
|
|
||||||
|
gulp.task("js." + variant + ".dev.watch", () => {
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/js/main.js")
|
.src("../src/js/main.js")
|
||||||
.pipe(
|
.pipe(
|
||||||
$.webpackStream(
|
$.webpackStream(
|
||||||
requireUncached("./webpack.config.js")({
|
requireUncached("./webpack.config.js")({
|
||||||
|
...data.buildArgs,
|
||||||
|
standalone: data.standalone,
|
||||||
watch: true,
|
watch: true,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
@ -22,84 +37,31 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
||||||
.pipe(browserSync.stream());
|
.pipe(browserSync.stream());
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("js.dev", () => {
|
if (!data.standalone) {
|
||||||
return gulp
|
// WEB
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe($.webpackStream(requireUncached("./webpack.config.js")({})))
|
|
||||||
.pipe(gulp.dest(buildFolder));
|
|
||||||
});
|
|
||||||
|
|
||||||
//// DEV CHINA
|
gulp.task("js." + variant + ".dev", () => {
|
||||||
|
|
||||||
gulp.task("china.js.dev.watch", () => {
|
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/js/main.js")
|
.src("../src/js/main.js")
|
||||||
.pipe(
|
.pipe(
|
||||||
$.webpackStream(
|
$.webpackStream(
|
||||||
requireUncached("./webpack.config.js")({
|
requireUncached("./webpack.config.js")({
|
||||||
watch: true,
|
...data.buildArgs,
|
||||||
chineseVersion: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder))
|
|
||||||
.pipe(browserSync.stream());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("china.js.dev", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.config.js")({
|
|
||||||
chineseVersion: true,
|
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
|
||||||
//// DEV WEGAME
|
gulp.task("js." + variant + ".prod.transpiled", () => {
|
||||||
|
|
||||||
gulp.task("wegame.js.dev.watch", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.config.js")({
|
|
||||||
watch: true,
|
|
||||||
wegameVersion: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder))
|
|
||||||
.pipe(browserSync.stream());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("wegame.js.dev", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.config.js")({
|
|
||||||
wegameVersion: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder));
|
|
||||||
});
|
|
||||||
|
|
||||||
//// STAGING
|
|
||||||
|
|
||||||
gulp.task("js.staging.transpiled", () => {
|
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/js/main.js")
|
.src("../src/js/main.js")
|
||||||
.pipe(
|
.pipe(
|
||||||
$.webpackStream(
|
$.webpackStream(
|
||||||
requireUncached("./webpack.production.config.js")({
|
requireUncached("./webpack.production.config.js")({
|
||||||
enableAssert: true,
|
|
||||||
environment: "staging",
|
|
||||||
es6: false,
|
es6: false,
|
||||||
|
environment: data.environment,
|
||||||
|
...data.buildArgs,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
@ -107,112 +69,49 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task("js.staging.latest", () => {
|
gulp.task("js." + variant + ".prod.es6", () => {
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/js/main.js")
|
.src("../src/js/main.js")
|
||||||
.pipe(
|
.pipe(
|
||||||
$.webpackStream(
|
$.webpackStream(
|
||||||
requireUncached("./webpack.production.config.js")({
|
requireUncached("./webpack.production.config.js")({
|
||||||
enableAssert: true,
|
|
||||||
environment: "staging",
|
|
||||||
es6: true,
|
es6: true,
|
||||||
|
environment: data.environment,
|
||||||
|
...data.buildArgs,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
gulp.task("js.staging", gulp.parallel("js.staging.transpiled", "js.staging.latest"));
|
gulp.task(
|
||||||
|
"js." + variant + ".prod",
|
||||||
|
|
||||||
//// PROD
|
// transpiled currently not used
|
||||||
|
// gulp.parallel("js." + variant + ".prod.transpiled", "js." + variant + ".prod.es6")
|
||||||
gulp.task("js.prod.transpiled", () => {
|
gulp.parallel("js." + variant + ".prod.es6")
|
||||||
return gulp
|
);
|
||||||
.src("../src/js/main.js")
|
} else {
|
||||||
.pipe(
|
// STANDALONE
|
||||||
$.webpackStream(
|
gulp.task("js." + variant + ".dev", () => {
|
||||||
requireUncached("./webpack.production.config.js")({
|
|
||||||
enableAssert: false,
|
|
||||||
environment: "prod",
|
|
||||||
es6: false,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe($.rename("bundle-transpiled.js"))
|
|
||||||
.pipe(gulp.dest(buildFolder))
|
|
||||||
.pipe(browserSync.stream());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("js.prod.latest", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.production.config.js")({
|
|
||||||
enableAssert: false,
|
|
||||||
environment: "prod",
|
|
||||||
es6: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder))
|
|
||||||
.pipe(browserSync.stream());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("js.prod", gulp.parallel("js.prod.transpiled", "js.prod.latest"));
|
|
||||||
|
|
||||||
//// STANDALONE
|
|
||||||
|
|
||||||
gulp.task("js.standalone-dev.watch", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.config.js")({
|
|
||||||
watch: true,
|
|
||||||
standalone: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder))
|
|
||||||
.pipe(browserSync.stream());
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("js.standalone-dev", () => {
|
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/js/main.js")
|
.src("../src/js/main.js")
|
||||||
.pipe(
|
.pipe(
|
||||||
$.webpackStream(
|
$.webpackStream(
|
||||||
requireUncached("./webpack.config.js")({
|
requireUncached("./webpack.config.js")({
|
||||||
|
...data.buildArgs,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
gulp.task("js." + variant + ".prod", () => {
|
||||||
gulp.task("js.standalone-beta", () => {
|
|
||||||
return gulp
|
return gulp
|
||||||
.src("../src/js/main.js")
|
.src("../src/js/main.js")
|
||||||
.pipe(
|
.pipe(
|
||||||
$.webpackStream(
|
$.webpackStream(
|
||||||
requireUncached("./webpack.production.config.js")({
|
requireUncached("./webpack.production.config.js")({
|
||||||
enableAssert: true,
|
...data.buildArgs,
|
||||||
environment: "staging",
|
|
||||||
es6: true,
|
|
||||||
standalone: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("js.standalone-prod", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.production.config.js")({
|
|
||||||
enableAssert: false,
|
|
||||||
environment: "prod",
|
environment: "prod",
|
||||||
es6: true,
|
es6: true,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
|
@ -221,40 +120,8 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
||||||
)
|
)
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
}
|
||||||
gulp.task("china.js.standalone-prod", () => {
|
}
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.production.config.js")({
|
|
||||||
enableAssert: false,
|
|
||||||
environment: "prod",
|
|
||||||
es6: true,
|
|
||||||
standalone: true,
|
|
||||||
chineseVersion: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("wegame.js.standalone-prod", () => {
|
|
||||||
return gulp
|
|
||||||
.src("../src/js/main.js")
|
|
||||||
.pipe(
|
|
||||||
$.webpackStream(
|
|
||||||
requireUncached("./webpack.production.config.js")({
|
|
||||||
enableAssert: false,
|
|
||||||
environment: "prod",
|
|
||||||
es6: false,
|
|
||||||
standalone: true,
|
|
||||||
wegameVersion: true,
|
|
||||||
})
|
|
||||||
)
|
|
||||||
)
|
|
||||||
.pipe(gulp.dest(buildFolder));
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
const oneExport = exp => {
|
||||||
|
return `${exp}=v`; // No checks needed
|
||||||
|
};
|
||||||
|
|
||||||
|
const twoExports = (exp1, exp2) => {
|
||||||
|
return `n=="${exp1}"?${exp1}=v:${exp2}=v`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const multiExports = exps => {
|
||||||
|
exps = exps.map(exp => `case "${exp}":${exp}=v;break;`);
|
||||||
|
|
||||||
|
return `switch(n){${exps.toString().replaceAll(";,", ";")} }`;
|
||||||
|
};
|
||||||
|
|
||||||
|
const defineFnBody = source => {
|
||||||
|
const regex = /export (?:let|class) (?<name>\w+)/g;
|
||||||
|
let names = [...source.matchAll(regex)].map(n => n.groups.name);
|
||||||
|
switch (names.length) {
|
||||||
|
case 0:
|
||||||
|
return false;
|
||||||
|
case 1:
|
||||||
|
return oneExport(names[0]);
|
||||||
|
case 2:
|
||||||
|
return twoExports(names[0], names[1]);
|
||||||
|
default:
|
||||||
|
return multiExports(names);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param {string} source
|
||||||
|
* @param {*} map
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
module.exports = function (source, map) {
|
||||||
|
const body = defineFnBody(source);
|
||||||
|
if (!body) return source;
|
||||||
|
return source + `\nexport const __$S__=(n,v)=>{${body}}`;
|
||||||
|
};
|
|
@ -8,8 +8,10 @@
|
||||||
},
|
},
|
||||||
"author": "tobspr",
|
"author": "tobspr",
|
||||||
"license": "private",
|
"license": "private",
|
||||||
|
"browserslist": "> 0.01%",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.9.0",
|
"@babel/core": "^7.9.0",
|
||||||
|
"@babel/plugin-transform-arrow-functions": "^7.17.12",
|
||||||
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
||||||
"@babel/plugin-transform-classes": "^7.5.5",
|
"@babel/plugin-transform-classes": "^7.5.5",
|
||||||
"@babel/preset-env": "^7.5.4",
|
"@babel/preset-env": "^7.5.4",
|
||||||
|
@ -17,6 +19,7 @@
|
||||||
"@types/filesystem": "^0.0.29",
|
"@types/filesystem": "^0.0.29",
|
||||||
"@types/node": "^12.7.5",
|
"@types/node": "^12.7.5",
|
||||||
"ajv": "^6.10.2",
|
"ajv": "^6.10.2",
|
||||||
|
"are-you-es5": "^2.1.2",
|
||||||
"audiosprite": "^0.7.2",
|
"audiosprite": "^0.7.2",
|
||||||
"babel-core": "^6.26.3",
|
"babel-core": "^6.26.3",
|
||||||
"babel-loader": "^8.1.0",
|
"babel-loader": "^8.1.0",
|
||||||
|
@ -46,8 +49,8 @@
|
||||||
"postcss": ">=5.0.0",
|
"postcss": ">=5.0.0",
|
||||||
"promise-polyfill": "^8.1.0",
|
"promise-polyfill": "^8.1.0",
|
||||||
"query-string": "^6.8.1",
|
"query-string": "^6.8.1",
|
||||||
|
"raw-loader": "^4.0.2",
|
||||||
"rusha": "^0.8.13",
|
"rusha": "^0.8.13",
|
||||||
"serialize-error": "^3.0.0",
|
|
||||||
"stream-browserify": "^3.0.0",
|
"stream-browserify": "^3.0.0",
|
||||||
"strictdom": "^1.0.1",
|
"strictdom": "^1.0.1",
|
||||||
"string-replace-webpack-plugin": "^0.1.3",
|
"string-replace-webpack-plugin": "^0.1.3",
|
||||||
|
@ -72,7 +75,8 @@
|
||||||
"babel-plugin-danger-remove-unused-import": "^1.1.2",
|
"babel-plugin-danger-remove-unused-import": "^1.1.2",
|
||||||
"css-mqpacker": "^7.0.0",
|
"css-mqpacker": "^7.0.0",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"electron-packager": "^14.0.6",
|
"electron-notarize": "^1.2.1",
|
||||||
|
"electron-packager": "^15.4.0",
|
||||||
"faster.js": "^1.1.0",
|
"faster.js": "^1.1.0",
|
||||||
"glob": "^7.1.3",
|
"glob": "^7.1.3",
|
||||||
"gulp": "^4.0.2",
|
"gulp": "^4.0.2",
|
||||||
|
@ -113,5 +117,8 @@
|
||||||
"trim": "^0.0.1",
|
"trim": "^0.0.1",
|
||||||
"webpack-stream": "^5.2.1",
|
"webpack-stream": "^5.2.1",
|
||||||
"yaml-loader": "^0.6.0"
|
"yaml-loader": "^0.6.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"tobspr-osx-sign": "^1.0.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,262 @@
|
||||||
|
* {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
touch-action: pan-x pan-y !important;
|
||||||
|
pointer-events: none;
|
||||||
|
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
html {
|
||||||
|
position: fixed;
|
||||||
|
-ms-touch-action: pan-x, pan-y;
|
||||||
|
touch-action: pan-x, pan-y;
|
||||||
|
-ms-content-zooming: none;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background: #dee1ea;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
color: #555;
|
||||||
|
user-select: none;
|
||||||
|
-moz-user-select: none;
|
||||||
|
-ms-user-select: none;
|
||||||
|
background: inherit !important;
|
||||||
|
text-transform: none;
|
||||||
|
white-space: normal;
|
||||||
|
word-break: normal;
|
||||||
|
word-spacing: normal;
|
||||||
|
word-wrap: break-word;
|
||||||
|
font-style: normal;
|
||||||
|
line-break: auto;
|
||||||
|
font-stretch: 100%;
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
text-decoration: none;
|
||||||
|
text-size-adjust: 100%;
|
||||||
|
letter-spacing: normal;
|
||||||
|
scrollbar-width: 6px;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-webkit-touch-callout: none;
|
||||||
|
/* prevent callout to copy image, etc when tap to hold */
|
||||||
|
-webkit-text-size-adjust: none;
|
||||||
|
/* prevent webkit from resizing text to fit */
|
||||||
|
scrollbar-face-color: #888;
|
||||||
|
scrollbar-track-color: rgba(255, 255, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_fp {
|
||||||
|
font-family: "GameFont", Arial, sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
position: fixed;
|
||||||
|
z-index: -1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
opacity: 0.05;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_p {
|
||||||
|
display: grid;
|
||||||
|
position: fixed;
|
||||||
|
z-index: 999;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
justify-content: center;
|
||||||
|
justify-items: center;
|
||||||
|
align-items: center;
|
||||||
|
background: #d5d8de;
|
||||||
|
grid-template-rows: 1fr 200px;
|
||||||
|
grid-gap: 40px;
|
||||||
|
padding: 20px;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_p * {
|
||||||
|
line-height: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_loader {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-self: end;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_loader > .ll_text {
|
||||||
|
text-align: center;
|
||||||
|
color: #777a7f;
|
||||||
|
font-family: "GameFont", Arial, sans-serif;
|
||||||
|
font-size: 24px;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_progressbar {
|
||||||
|
width: 80vw;
|
||||||
|
max-width: 800px;
|
||||||
|
margin-top: 40px;
|
||||||
|
height: 7px;
|
||||||
|
border-radius: 20px;
|
||||||
|
background: rgba(0, 10, 20, 0.08);
|
||||||
|
|
||||||
|
/* border: 5px solid transparent; */
|
||||||
|
display: flex;
|
||||||
|
position: relative;
|
||||||
|
align-items: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes LL_LoadingAnimation {
|
||||||
|
50% {
|
||||||
|
background-color: #34ae67;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_progressbar > span {
|
||||||
|
border-radius: 20px;
|
||||||
|
position: absolute;
|
||||||
|
height: 190%;
|
||||||
|
width: 5%;
|
||||||
|
background: #fff;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
top: 50%;
|
||||||
|
display: inline-flex;
|
||||||
|
background-color: #269fba;
|
||||||
|
animation: LL_LoadingAnimation 4s ease-in-out infinite;
|
||||||
|
position: relative;
|
||||||
|
z-index: 10;
|
||||||
|
border: 4px solid #d5d8de;
|
||||||
|
/* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); */
|
||||||
|
transition: width 0.5s ease-in-out;
|
||||||
|
min-width: 4%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_progressbar > #ll_loadinglabel {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 20;
|
||||||
|
top: 50%;
|
||||||
|
text-transform: uppercase;
|
||||||
|
border-radius: 7px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-size: 16px;
|
||||||
|
color: #33373f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes ShowStandaloneBannerAfterDelay {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
95% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_standalone {
|
||||||
|
text-align: center;
|
||||||
|
color: #777a7f;
|
||||||
|
margin-top: 30px;
|
||||||
|
display: block;
|
||||||
|
font-size: 16px;
|
||||||
|
animation: ShowStandaloneBannerAfterDelay 60s linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_standalone a {
|
||||||
|
color: #39f;
|
||||||
|
margin-left: 5px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_logo {
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_logo > img {
|
||||||
|
width: 40vw;
|
||||||
|
max-width: 700px;
|
||||||
|
min-width: 150px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_loader > .ll_spinner {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
display: inline-flex;
|
||||||
|
background: center center / contain no-repeat;
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_status {
|
||||||
|
position: absolute;
|
||||||
|
top: 40px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
z-index: 100;
|
||||||
|
opacity: 1 !important;
|
||||||
|
font-size: 18px;
|
||||||
|
color: rgba(0, 10, 20, 0.5);
|
||||||
|
|
||||||
|
font-family: "GameFont", Arial, sans-serif;
|
||||||
|
text-transform: uppercase;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: 999999;
|
||||||
|
background: #d5d8de;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error > .inner {
|
||||||
|
color: #fff;
|
||||||
|
font-family: Arial, "sans-serif";
|
||||||
|
font-size: 15px;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error > .inner > .heading {
|
||||||
|
color: #ef5072;
|
||||||
|
margin-bottom: 40px;
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error > .inner > .content {
|
||||||
|
color: #55585f;
|
||||||
|
font-family: monospace;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #fff;
|
||||||
|
padding: 20px;
|
||||||
|
border-radius: 10px;
|
||||||
|
|
||||||
|
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error > .inner .discordLink {
|
||||||
|
color: #333;
|
||||||
|
margin-top: 20px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
font-family: Arial;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error > .inner .discordLink a {
|
||||||
|
color: #39f;
|
||||||
|
}
|
||||||
|
#ll_preload_error > .inner .discordLink strong {
|
||||||
|
font-weight: 900 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ll_preload_error > .inner .source {
|
||||||
|
color: #777;
|
||||||
|
}
|
|
@ -0,0 +1,165 @@
|
||||||
|
(function () {
|
||||||
|
var loadTimeout = null;
|
||||||
|
var callbackDone = false;
|
||||||
|
|
||||||
|
var searchString = window.location.search;
|
||||||
|
if (searchString.includes("steam_sso_auth_token=")) {
|
||||||
|
var pos = searchString.indexOf("steam_sso_auth_token");
|
||||||
|
const authToken = searchString.substring(pos + 21, pos + 57);
|
||||||
|
try {
|
||||||
|
window.localStorage.setItem("steam_sso_auth_token", authToken);
|
||||||
|
window.location.replace(window.location.protocol + "//" + window.location.host);
|
||||||
|
} catch (ex) {
|
||||||
|
alert("Failed to login via Steam SSO: " + ex);
|
||||||
|
window.location.replace("https://shapez.io");
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Catch load errors
|
||||||
|
|
||||||
|
function errorHandler(event, source, lineno, colno, error) {
|
||||||
|
if (("" + event).indexOf("Script error.") >= 0) {
|
||||||
|
console.warn("Thirdparty script error:", event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (("" + event).indexOf("NS_ERROR_FAILURE") >= 0) {
|
||||||
|
console.warn("Firefox NS_ERROR_FAILURE error:", event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (("" + event).indexOf("Cannot read property 'postMessage' of null") >= 0) {
|
||||||
|
console.warn("Safari can not read post message error:", event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (("" + event).indexOf("Possible side-effect in debug-evaluate") >= 0) {
|
||||||
|
console.warn("Chrome debug-evaluate error:", event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (("" + source).indexOf("shapez.io") < 0) {
|
||||||
|
console.warn("Thirdparty error:", event);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.error("👀 App Error:", event, source, lineno, colno, error);
|
||||||
|
var element = document.createElement("div");
|
||||||
|
element.id = "ll_preload_error";
|
||||||
|
|
||||||
|
var inner = document.createElement("div");
|
||||||
|
inner.classList.add("inner");
|
||||||
|
element.appendChild(inner);
|
||||||
|
|
||||||
|
var heading = document.createElement("h3");
|
||||||
|
heading.classList.add("heading");
|
||||||
|
heading.innerText = "Fatal Error";
|
||||||
|
inner.appendChild(heading);
|
||||||
|
|
||||||
|
var content = document.createElement("p");
|
||||||
|
content.classList.add("content");
|
||||||
|
content.innerText = error || (event && event.message) || event || "Unknown Error";
|
||||||
|
inner.appendChild(content);
|
||||||
|
|
||||||
|
var discordLink = document.createElement("p");
|
||||||
|
discordLink.classList.add("discordLink");
|
||||||
|
discordLink.innerHTML =
|
||||||
|
"Please report this error in the <strong>#bugs</strong> channel of the <a href='https://discord.gg/rtuRRJDc7u' target='_blank'>official discord</a>!";
|
||||||
|
|
||||||
|
inner.appendChild(discordLink);
|
||||||
|
|
||||||
|
if (source) {
|
||||||
|
var sourceElement = document.createElement("p");
|
||||||
|
sourceElement.classList.add("source");
|
||||||
|
sourceElement.innerText = source + ":" + lineno + ":" + colno;
|
||||||
|
inner.appendChild(sourceElement);
|
||||||
|
}
|
||||||
|
|
||||||
|
document.documentElement.appendChild(element);
|
||||||
|
|
||||||
|
window.APP_ERROR_OCCURED = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
window.onerror = errorHandler;
|
||||||
|
|
||||||
|
function expectJsParsed() {
|
||||||
|
if (!callbackDone) {
|
||||||
|
console.error("👀 Got no core callback");
|
||||||
|
throw new Error("Core thread failed to respond within time.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onJsLoaded() {
|
||||||
|
console.log("👀 Core loaded at", Math.floor(performance.now()), "ms");
|
||||||
|
loadTimeout = setTimeout(expectJsParsed, 120000);
|
||||||
|
window.removeEventListener("unhandledrejection", errorHandler);
|
||||||
|
}
|
||||||
|
|
||||||
|
window.coreThreadLoadedCb = function () {
|
||||||
|
console.log("👀 Core responded at", Math.floor(performance.now()), "ms");
|
||||||
|
clearTimeout(loadTimeout);
|
||||||
|
loadTimeout = null;
|
||||||
|
callbackDone = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
function progressHandler(progress) {
|
||||||
|
var progressElement = document.querySelector("#ll_preload_status");
|
||||||
|
if (progressElement) {
|
||||||
|
progressElement.innerText = "Downloading Bundle (" + Math.round(progress * 1200) + " / 1200 KB)";
|
||||||
|
}
|
||||||
|
var barElement = document.querySelector("#ll_progressbar span");
|
||||||
|
if (barElement) {
|
||||||
|
barElement.style.width = (5 + progress * 75.0).toFixed(2) + "%";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function startBundleDownload() {
|
||||||
|
var xhr = new XMLHttpRequest();
|
||||||
|
var notifiedNotComputable = false;
|
||||||
|
|
||||||
|
xhr.open("GET", bundleSrc, true);
|
||||||
|
xhr.responseType = "arraybuffer";
|
||||||
|
xhr.onprogress = function (ev) {
|
||||||
|
if (ev.lengthComputable) {
|
||||||
|
progressHandler(ev.loaded / ev.total);
|
||||||
|
} else {
|
||||||
|
// Hardcoded length
|
||||||
|
progressHandler(Math.min(1, ev.loaded / 2349009));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
xhr.onloadend = function () {
|
||||||
|
if (!xhr.status.toString().match(/^2/)) {
|
||||||
|
throw new Error("Failed to load bundle: " + xhr.status + " " + xhr.statusText);
|
||||||
|
} else {
|
||||||
|
if (!notifiedNotComputable) {
|
||||||
|
progressHandler(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
var options = {};
|
||||||
|
var headers = xhr.getAllResponseHeaders();
|
||||||
|
var m = headers.match(/^Content-Type\:\s*(.*?)$/im);
|
||||||
|
|
||||||
|
if (m && m[1]) {
|
||||||
|
options.type = m[1];
|
||||||
|
}
|
||||||
|
|
||||||
|
var blob = new Blob([this.response], options);
|
||||||
|
var script = document.createElement("script");
|
||||||
|
script.addEventListener("load", onJsLoaded);
|
||||||
|
script.src = window.URL.createObjectURL(blob);
|
||||||
|
script.type = "text/javascript";
|
||||||
|
script.charset = "utf-8";
|
||||||
|
if (bundleIntegrity) {
|
||||||
|
script.setAttribute("integrity", bundleIntegrity);
|
||||||
|
}
|
||||||
|
document.head.appendChild(script);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
xhr.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Start bundle download ...");
|
||||||
|
window.addEventListener("load", startBundleDownload);
|
||||||
|
})();
|
|
@ -1,66 +0,0 @@
|
||||||
const path = require("path");
|
|
||||||
const fs = require("fs");
|
|
||||||
const execSync = require("child_process").execSync;
|
|
||||||
const { Octokit } = require("@octokit/rest");
|
|
||||||
const buildutils = require("./buildutils");
|
|
||||||
|
|
||||||
function gulptasksReleaseUploader($, gulp, buildFolder) {
|
|
||||||
const standaloneDir = path.join(__dirname, "..", "tmp_standalone_files");
|
|
||||||
const darwinApp = path.join(standaloneDir, "shapez.io-standalone-darwin-x64", "shapez.io-standalone.app");
|
|
||||||
const dmgName = "shapez.io-standalone.dmg";
|
|
||||||
const dmgPath = path.join(standaloneDir, "shapez.io-standalone-darwin-x64", dmgName);
|
|
||||||
|
|
||||||
gulp.task("standalone.uploadRelease.darwin64.cleanup", () => {
|
|
||||||
return gulp.src(dmgPath, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("standalone.uploadRelease.darwin64.compress", cb => {
|
|
||||||
console.log("Packaging disk image", dmgPath);
|
|
||||||
execSync(`hdiutil create -format UDBZ -srcfolder ${darwinApp} ${dmgPath}`);
|
|
||||||
cb();
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("standalone.uploadRelease.darwin64.upload", async cb => {
|
|
||||||
const currentTag = buildutils.getTag();
|
|
||||||
|
|
||||||
const octokit = new Octokit({
|
|
||||||
auth: process.env.SHAPEZ_CLI_GITHUB_TOKEN
|
|
||||||
});
|
|
||||||
|
|
||||||
const createdRelease = await octokit.request("POST /repos/{owner}/{repo}/releases", {
|
|
||||||
owner: process.env.SHAPEZ_CLI_GITHUB_USER,
|
|
||||||
repo: "shapez.io",
|
|
||||||
tag_name: currentTag,
|
|
||||||
name: currentTag,
|
|
||||||
draft: true
|
|
||||||
});
|
|
||||||
|
|
||||||
const { data: { id, upload_url } } = createdRelease;
|
|
||||||
console.log(`Created release ${id} for tag ${currentTag}`);
|
|
||||||
|
|
||||||
const dmgContents = fs.readFileSync(dmgPath);
|
|
||||||
const dmgSize = fs.statSync(dmgPath).size;
|
|
||||||
console.log("Uploading", dmgContents.length / 1024 / 1024, "MB to", upload_url);
|
|
||||||
|
|
||||||
await octokit.request({
|
|
||||||
method: "POST",
|
|
||||||
url: upload_url,
|
|
||||||
headers: {
|
|
||||||
"content-type": "application/x-apple-diskimage"
|
|
||||||
},
|
|
||||||
name: dmgName,
|
|
||||||
data: dmgContents
|
|
||||||
});
|
|
||||||
|
|
||||||
cb();
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task("standalone.uploadRelease.darwin64",
|
|
||||||
gulp.series(
|
|
||||||
"standalone.uploadRelease.darwin64.cleanup",
|
|
||||||
"standalone.uploadRelease.darwin64.compress",
|
|
||||||
"standalone.uploadRelease.darwin64.upload"
|
|
||||||
));
|
|
||||||
}
|
|
||||||
|
|
||||||
module.exports = { gulptasksReleaseUploader };
|
|
|
@ -7,58 +7,53 @@ const fs = require("fs");
|
||||||
const fse = require("fs-extra");
|
const fse = require("fs-extra");
|
||||||
const buildutils = require("./buildutils");
|
const buildutils = require("./buildutils");
|
||||||
const execSync = require("child_process").execSync;
|
const execSync = require("child_process").execSync;
|
||||||
|
const electronNotarize = require("electron-notarize");
|
||||||
|
const { BUILD_VARIANTS } = require("./build_variants");
|
||||||
|
|
||||||
|
let signAsync;
|
||||||
|
try {
|
||||||
|
signAsync = require("tobspr-osx-sign").signAsync;
|
||||||
|
} catch (ex) {
|
||||||
|
console.warn("tobspr-osx-sign not installed, can not create osx builds");
|
||||||
|
}
|
||||||
|
|
||||||
function gulptasksStandalone($, gulp) {
|
function gulptasksStandalone($, gulp) {
|
||||||
const targets = [
|
for (const variant in BUILD_VARIANTS) {
|
||||||
{
|
const variantData = BUILD_VARIANTS[variant];
|
||||||
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files"),
|
if (!variantData.standalone) {
|
||||||
suffix: "",
|
continue;
|
||||||
taskPrefix: "",
|
}
|
||||||
electronBaseDir: path.join(__dirname, "..", "electron"),
|
const tempDestDir = path.join(__dirname, "..", "build_output", variant);
|
||||||
steam: true,
|
const taskPrefix = "standalone." + variant;
|
||||||
},
|
const electronBaseDir = path.join(__dirname, "..", variantData.electronBaseDir || "electron");
|
||||||
{
|
|
||||||
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files_china"),
|
|
||||||
suffix: "china",
|
|
||||||
taskPrefix: "china.",
|
|
||||||
electronBaseDir: path.join(__dirname, "..", "electron"),
|
|
||||||
steam: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files_wegame"),
|
|
||||||
suffix: "wegame",
|
|
||||||
taskPrefix: "wegame.",
|
|
||||||
electronBaseDir: path.join(__dirname, "..", "electron_wegame"),
|
|
||||||
steam: false,
|
|
||||||
},
|
|
||||||
];
|
|
||||||
|
|
||||||
for (const { tempDestDir, suffix, taskPrefix, electronBaseDir, steam } of targets) {
|
|
||||||
const tempDestBuildDir = path.join(tempDestDir, "built");
|
const tempDestBuildDir = path.join(tempDestDir, "built");
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepare.cleanup", () => {
|
gulp.task(taskPrefix + ".prepare.cleanup", () => {
|
||||||
return gulp.src(tempDestDir, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
return gulp.src(tempDestDir, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepare.copyPrefab", () => {
|
gulp.task(taskPrefix + ".prepare.copyPrefab", () => {
|
||||||
const requiredFiles = [
|
const requiredFiles = [
|
||||||
path.join(electronBaseDir, "node_modules", "**", "*.*"),
|
path.join(electronBaseDir, "node_modules", "**", "*.*"),
|
||||||
path.join(electronBaseDir, "node_modules", "**", ".*"),
|
path.join(electronBaseDir, "node_modules", "**", ".*"),
|
||||||
path.join(electronBaseDir, "wegame_sdk", "**", "*.*"),
|
path.join(electronBaseDir, "wegame_sdk", "**", "*.*"),
|
||||||
path.join(electronBaseDir, "wegame_sdk", "**", ".*"),
|
path.join(electronBaseDir, "wegame_sdk", "**", ".*"),
|
||||||
path.join(electronBaseDir, "favicon*"),
|
path.join(electronBaseDir, "favicon*"),
|
||||||
|
|
||||||
// fails on platforms which support symlinks
|
|
||||||
// https://github.com/gulpjs/gulp/issues/1427
|
|
||||||
// path.join(electronBaseDir, "node_modules", "**", "*"),
|
|
||||||
];
|
];
|
||||||
if (steam) {
|
|
||||||
requiredFiles.push(path.join(electronBaseDir, "steam_appid.txt"));
|
|
||||||
}
|
|
||||||
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
|
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepare.writePackageJson", cb => {
|
gulp.task(taskPrefix + ".prepare.writeAppId", cb => {
|
||||||
|
if (variantData.steamAppId) {
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(tempDestBuildDir, "steam_appid.txt"),
|
||||||
|
String(variantData.steamAppId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
cb();
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task(taskPrefix + ".prepare.writePackageJson", cb => {
|
||||||
const packageJsonString = JSON.stringify(
|
const packageJsonString = JSON.stringify(
|
||||||
{
|
{
|
||||||
scripts: {
|
scripts: {
|
||||||
|
@ -77,34 +72,15 @@ function gulptasksStandalone($, gulp) {
|
||||||
cb();
|
cb();
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepareVDF", cb => {
|
gulp.task(taskPrefix + ".prepare.minifyCode", () => {
|
||||||
if (!steam) {
|
|
||||||
cb();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const hash = buildutils.getRevision();
|
|
||||||
|
|
||||||
const steampipeDir = path.join(__dirname, "steampipe", "scripts");
|
|
||||||
const templateContents = fs
|
|
||||||
.readFileSync(path.join(steampipeDir, "app.vdf.template"), { encoding: "utf-8" })
|
|
||||||
.toString();
|
|
||||||
|
|
||||||
const convertedContents = templateContents.replace("$DESC$", "Commit " + hash);
|
|
||||||
fs.writeFileSync(path.join(steampipeDir, "app.vdf"), convertedContents);
|
|
||||||
|
|
||||||
cb();
|
|
||||||
});
|
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepare.minifyCode", () => {
|
|
||||||
return gulp.src(path.join(electronBaseDir, "*.js")).pipe(gulp.dest(tempDestBuildDir));
|
return gulp.src(path.join(electronBaseDir, "*.js")).pipe(gulp.dest(tempDestBuildDir));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepare.copyGamefiles", () => {
|
gulp.task(taskPrefix + ".prepare.copyGamefiles", () => {
|
||||||
return gulp.src("../build/**/*.*", { base: "../build" }).pipe(gulp.dest(tempDestBuildDir));
|
return gulp.src("../build/**/*.*", { base: "../build" }).pipe(gulp.dest(tempDestBuildDir));
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.killRunningInstances", cb => {
|
gulp.task(taskPrefix + ".killRunningInstances", cb => {
|
||||||
try {
|
try {
|
||||||
execSync("taskkill /F /IM shapezio.exe");
|
execSync("taskkill /F /IM shapezio.exe");
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
|
@ -114,36 +90,39 @@ function gulptasksStandalone($, gulp) {
|
||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(
|
gulp.task(
|
||||||
taskPrefix + "standalone.prepare",
|
taskPrefix + ".prepare",
|
||||||
gulp.series(
|
gulp.series(
|
||||||
taskPrefix + "standalone.killRunningInstances",
|
taskPrefix + ".killRunningInstances",
|
||||||
taskPrefix + "standalone.prepare.cleanup",
|
taskPrefix + ".prepare.cleanup",
|
||||||
taskPrefix + "standalone.prepare.copyPrefab",
|
taskPrefix + ".prepare.copyPrefab",
|
||||||
taskPrefix + "standalone.prepare.writePackageJson",
|
taskPrefix + ".prepare.writePackageJson",
|
||||||
taskPrefix + "standalone.prepare.minifyCode",
|
taskPrefix + ".prepare.minifyCode",
|
||||||
taskPrefix + "standalone.prepare.copyGamefiles"
|
taskPrefix + ".prepare.copyGamefiles",
|
||||||
|
taskPrefix + ".prepare.writeAppId"
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param {'win32'|'linux'} platform
|
* @param {'win32'|'linux'|'darwin'} platform
|
||||||
* @param {'x64'|'ia32'} arch
|
* @param {'x64'|'ia32'} arch
|
||||||
* @param {function():void} cb
|
* @param {function():void} cb
|
||||||
*/
|
*/
|
||||||
function packageStandalone(platform, arch, cb) {
|
function packageStandalone(platform, arch, cb, isRelease = true) {
|
||||||
const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml"));
|
|
||||||
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
|
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
|
||||||
|
|
||||||
let asar = steam;
|
// Only use asar on steam builds (not supported by wegame)
|
||||||
if (steam && fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
|
let asar = Boolean(variantData.steamAppId);
|
||||||
|
|
||||||
|
// Unpack private artifacts though
|
||||||
|
if (asar && fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
|
||||||
// @ts-expect-error
|
// @ts-expect-error
|
||||||
asar = { unpackDir: privateArtifactsPath };
|
asar = { unpackDir: privateArtifactsPath };
|
||||||
}
|
}
|
||||||
|
|
||||||
packager({
|
packager({
|
||||||
dir: tempDestBuildDir,
|
dir: tempDestBuildDir,
|
||||||
appCopyright: "Tobias Springer",
|
appCopyright: "tobspr Games",
|
||||||
appVersion: getVersion(),
|
appVersion: getVersion(),
|
||||||
buildVersion: "1.0.0",
|
buildVersion: "1.0.0",
|
||||||
arch,
|
arch,
|
||||||
|
@ -151,40 +130,71 @@ function gulptasksStandalone($, gulp) {
|
||||||
asar: asar,
|
asar: asar,
|
||||||
executableName: "shapezio",
|
executableName: "shapezio",
|
||||||
icon: path.join(electronBaseDir, "favicon"),
|
icon: path.join(electronBaseDir, "favicon"),
|
||||||
name: "shapez.io-standalone" + suffix,
|
name: "shapez",
|
||||||
out: tempDestDir,
|
out: tempDestDir,
|
||||||
overwrite: true,
|
overwrite: true,
|
||||||
appBundleId: "io.shapez.standalone",
|
appBundleId: "tobspr.shapezio." + variant,
|
||||||
appCategoryType: "public.app-category.games",
|
appCategoryType: "public.app-category.games",
|
||||||
|
...(isRelease &&
|
||||||
|
platform === "darwin" && {
|
||||||
|
osxSign: {
|
||||||
|
"identity": process.env.SHAPEZ_CLI_APPLE_CERT_NAME,
|
||||||
|
"hardenedRuntime": true,
|
||||||
|
"entitlements": "entitlements.plist",
|
||||||
|
"entitlements-inherit": "entitlements.plist",
|
||||||
|
// @ts-ignore
|
||||||
|
"signatureFlags": ["library"],
|
||||||
|
"version": "16.0.7",
|
||||||
|
},
|
||||||
|
osxNotarize: {
|
||||||
|
appleId: process.env.SHAPEZ_CLI_APPLE_ID,
|
||||||
|
appleIdPassword: process.env.SHAPEZ_CLI_APPLE_APP_PW,
|
||||||
|
},
|
||||||
|
}),
|
||||||
}).then(
|
}).then(
|
||||||
appPaths => {
|
appPaths => {
|
||||||
console.log("Packages created:", appPaths);
|
console.log("Packages created:", appPaths);
|
||||||
appPaths.forEach(appPath => {
|
appPaths.forEach(appPath => {
|
||||||
if (!fs.existsSync(appPath)) {
|
if (!fs.existsSync(appPath)) {
|
||||||
console.error("Bad app path gotten:", appPath);
|
console.error("Bad app path:", appPath);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (steam) {
|
if (variantData.steamAppId) {
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.join(appPath, "LICENSE"),
|
path.join(appPath, "LICENSE"),
|
||||||
fs.readFileSync(path.join(__dirname, "..", "LICENSE"))
|
fs.readFileSync(path.join(__dirname, "..", "LICENSE"))
|
||||||
);
|
);
|
||||||
|
|
||||||
fse.copySync(
|
fs.writeFileSync(
|
||||||
path.join(tempDestBuildDir, "steam_appid.txt"),
|
path.join(appPath, "steam_appid.txt"),
|
||||||
path.join(appPath, "steam_appid.txt")
|
String(variantData.steamAppId)
|
||||||
);
|
);
|
||||||
|
|
||||||
fs.writeFileSync(path.join(appPath, ".itch.toml"), tomlFile);
|
|
||||||
|
|
||||||
if (platform === "linux") {
|
if (platform === "linux") {
|
||||||
|
// Write launcher script
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.join(appPath, "play.sh"),
|
path.join(appPath, "play.sh"),
|
||||||
'#!/usr/bin/env bash\n./shapezio --no-sandbox "$@"\n'
|
'#!/usr/bin/env bash\n./shapezio --no-sandbox "$@"\n'
|
||||||
);
|
);
|
||||||
fs.chmodSync(path.join(appPath, "play.sh"), 0o775);
|
fs.chmodSync(path.join(appPath, "play.sh"), 0o775);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (platform === "darwin") {
|
||||||
|
if (!isRelease) {
|
||||||
|
// Needs special location
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(
|
||||||
|
appPath,
|
||||||
|
"shapez.app",
|
||||||
|
"Contents",
|
||||||
|
"MacOS",
|
||||||
|
"steam_appid.txt"
|
||||||
|
),
|
||||||
|
String(variantData.steamAppId)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -197,22 +207,133 @@ function gulptasksStandalone($, gulp) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.package.prod.win64", cb => packageStandalone("win32", "x64", cb));
|
// Manual signing with patched @electron/osx-sign (we need --no-strict)
|
||||||
gulp.task(taskPrefix + "standalone.package.prod.linux64", cb =>
|
gulp.task(taskPrefix + ".package.darwin64", cb =>
|
||||||
packageStandalone("linux", "x64", cb)
|
packageStandalone(
|
||||||
);
|
"darwin",
|
||||||
|
"x64",
|
||||||
|
() => {
|
||||||
|
const appFile = path.join(tempDestDir, "shapez-darwin-x64");
|
||||||
|
const appFileInner = path.join(appFile, "shapez.app");
|
||||||
|
console.warn("++ Signing ++");
|
||||||
|
|
||||||
gulp.task(
|
if (variantData.steamAppId) {
|
||||||
taskPrefix + "standalone.package.prod",
|
const appIdDest = path.join(
|
||||||
gulp.series(
|
path.join(appFileInner, "Contents", "MacOS"),
|
||||||
taskPrefix + "standalone.prepare",
|
"steam_appid.txt"
|
||||||
gulp.parallel(
|
);
|
||||||
taskPrefix + "standalone.package.prod.win64",
|
// console.warn("++ Preparing ++");
|
||||||
taskPrefix + "standalone.package.prod.linux64"
|
// fse.copySync(path.join(tempDestBuildDir, "steam_appid.txt"), appIdDest);
|
||||||
)
|
|
||||||
)
|
console.warn("Signing steam_appid.txt");
|
||||||
|
|
||||||
|
execSync(
|
||||||
|
`codesign --force --verbose --options runtime --timestamp --no-strict --sign "${
|
||||||
|
process.env.SHAPEZ_CLI_APPLE_CERT_NAME
|
||||||
|
}" --entitlements "${path.join(__dirname, "entitlements.plist")}" ${appIdDest}`,
|
||||||
|
{
|
||||||
|
cwd: appFile,
|
||||||
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.warn("Base dir:", appFile);
|
||||||
|
|
||||||
|
signAsync({
|
||||||
|
app: appFileInner,
|
||||||
|
hardenedRuntime: true,
|
||||||
|
identity: process.env.SHAPEZ_CLI_APPLE_CERT_NAME,
|
||||||
|
strictVerify: false,
|
||||||
|
|
||||||
|
version: "16.0.7",
|
||||||
|
type: "distribution",
|
||||||
|
optionsForFile: f => {
|
||||||
|
return {
|
||||||
|
entitlements: path.join(__dirname, "entitlements.plist"),
|
||||||
|
hardenedRuntime: true,
|
||||||
|
signatureFlags: ["runtime"],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
}).then(() => {
|
||||||
|
execSync(`codesign --verify --verbose ${path.join(appFile, "shapez.app")}`, {
|
||||||
|
cwd: appFile,
|
||||||
|
});
|
||||||
|
|
||||||
|
console.warn("++ Notarizing ++");
|
||||||
|
electronNotarize
|
||||||
|
.notarize({
|
||||||
|
appPath: path.join(appFile, "shapez.app"),
|
||||||
|
tool: "legacy",
|
||||||
|
appBundleId: "tobspr.shapezio.standalone",
|
||||||
|
|
||||||
|
appleId: process.env.SHAPEZ_CLI_APPLE_ID,
|
||||||
|
appleIdPassword: process.env.SHAPEZ_CLI_APPLE_APP_PW,
|
||||||
|
teamId: process.env.SHAPEZ_CLI_APPLE_TEAM_ID,
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
console.warn("-> Notarized!");
|
||||||
|
cb();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
},
|
||||||
|
false
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
gulp.task(taskPrefix + ".package.win64", cb => packageStandalone("win32", "x64", cb));
|
||||||
|
gulp.task(taskPrefix + ".package.linux64", cb => packageStandalone("linux", "x64", cb));
|
||||||
|
gulp.task(
|
||||||
|
taskPrefix + ".build-from-windows",
|
||||||
|
gulp.series(
|
||||||
|
taskPrefix + ".prepare",
|
||||||
|
gulp.parallel(taskPrefix + ".package.win64", taskPrefix + ".package.linux64")
|
||||||
|
)
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
taskPrefix + ".build-from-darwin",
|
||||||
|
gulp.series(taskPrefix + ".prepare", gulp.parallel(taskPrefix + ".package.darwin64"))
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Steam helpers
|
||||||
|
gulp.task("standalone.prepareVDF", cb => {
|
||||||
|
const hash = buildutils.getRevision();
|
||||||
|
const version = buildutils.getVersion();
|
||||||
|
|
||||||
|
// for (const platform of ["steampipe", "steampipe-darwin"]) {
|
||||||
|
const templatesSource = path.join(__dirname, "steampipe", "templates");
|
||||||
|
const templatesDest = path.join(__dirname, "steampipe", "built_vdfs");
|
||||||
|
|
||||||
|
const variables = {
|
||||||
|
PROJECT_DIR: path.resolve(path.join(__dirname, "..")).replace(/\\/g, "/"),
|
||||||
|
BUNDLE_DIR: path.resolve(path.join(__dirname, "..", "build_output")).replace(/\\/g, "/"),
|
||||||
|
|
||||||
|
TMP_DIR: path.resolve(path.join(__dirname, "steampipe", "tmp")).replace(/\\/g, "/"),
|
||||||
|
// BUILD_DESC: "v" + version + " @ " + hash,
|
||||||
|
VDF_DIR: path.resolve(path.join(__dirname, "steampipe", "built_vdfs")).replace(/\\/g, "/"),
|
||||||
|
};
|
||||||
|
|
||||||
|
const files = fs.readdirSync(templatesSource);
|
||||||
|
for (const file of files) {
|
||||||
|
if (!file.endsWith(".vdf")) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
variables.BUILD_DESC = file.replace(".vdf", "") + " - v" + version + " @ " + hash;
|
||||||
|
|
||||||
|
let content = fs.readFileSync(path.join(templatesSource, file)).toString("utf-8");
|
||||||
|
content = content.replace(/\$([^$]+)\$/gi, (_, variable) => {
|
||||||
|
if (!variables[variable]) {
|
||||||
|
throw new Error("Unknown variable " + variable + " in " + file);
|
||||||
|
}
|
||||||
|
|
||||||
|
return variables[variable];
|
||||||
|
});
|
||||||
|
|
||||||
|
fs.writeFileSync(path.join(templatesDest, file), content, { encoding: "utf8" });
|
||||||
|
}
|
||||||
|
cb();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = { gulptasksStandalone };
|
module.exports = { gulptasksStandalone };
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
steamtemp
|
steamtemp
|
||||||
app.vdf
|
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
"appbuild"
|
|
||||||
{
|
|
||||||
"appid" "1318690"
|
|
||||||
"desc" "$DESC$"
|
|
||||||
"buildoutput" "C:\work\shapez\shapez.io\gulp\steampipe\steamtemp"
|
|
||||||
"contentroot" ""
|
|
||||||
"setlive" ""
|
|
||||||
"preview" "0"
|
|
||||||
"local" ""
|
|
||||||
"depots"
|
|
||||||
{
|
|
||||||
"1318691" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\windows.vdf"
|
|
||||||
"1318694" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\china-windows.vdf"
|
|
||||||
"1318692" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\linux.vdf"
|
|
||||||
"1318695" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\china-linux.vdf"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
"appbuild"
|
||||||
|
{
|
||||||
|
"appid" "1930750"
|
||||||
|
"desc" "$BUILD_DESC$"
|
||||||
|
"buildoutput" "$TMP_DIR$"
|
||||||
|
"contentroot" ""
|
||||||
|
"setlive" ""
|
||||||
|
"preview" "0"
|
||||||
|
"local" ""
|
||||||
|
"depots"
|
||||||
|
{
|
||||||
|
"1930756" "$VDF_DIR$/demo-darwin.vdf"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,14 @@
|
||||||
|
"appbuild"
|
||||||
|
{
|
||||||
|
"appid" "1318690"
|
||||||
|
"desc" "$BUILD_DESC$"
|
||||||
|
"buildoutput" "$TMP_DIR$"
|
||||||
|
"contentroot" ""
|
||||||
|
"setlive" ""
|
||||||
|
"preview" "0"
|
||||||
|
"local" ""
|
||||||
|
"depots"
|
||||||
|
{
|
||||||
|
"1318693" "$VDF_DIR$/standalone-darwin.vdf"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
"appbuild"
|
||||||
|
{
|
||||||
|
"appid" "1930750"
|
||||||
|
"desc" "$BUILD_DESC$"
|
||||||
|
"buildoutput" "$TMP_DIR$"
|
||||||
|
"contentroot" ""
|
||||||
|
"setlive" ""
|
||||||
|
"preview" "0"
|
||||||
|
"local" ""
|
||||||
|
"depots"
|
||||||
|
{
|
||||||
|
"1930753" "$VDF_DIR$/demo-windows.vdf"
|
||||||
|
"1930754" "$VDF_DIR$/demo-china-windows.vdf"
|
||||||
|
"1930752" "$VDF_DIR$/demo-linux.vdf"
|
||||||
|
"1930755" "$VDF_DIR$/demo-china-linux.vdf"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,17 @@
|
||||||
|
"appbuild"
|
||||||
|
{
|
||||||
|
"appid" "1318690"
|
||||||
|
"desc" "$BUILD_DESC$"
|
||||||
|
"buildoutput" "$TMP_DIR$"
|
||||||
|
"contentroot" ""
|
||||||
|
"setlive" ""
|
||||||
|
"preview" "0"
|
||||||
|
"local" ""
|
||||||
|
"depots"
|
||||||
|
{
|
||||||
|
"1318691" "$VDF_DIR$\standalone-windows.vdf"
|
||||||
|
"1318694" "$VDF_DIR$\standalone-china-windows.vdf"
|
||||||
|
"1318692" "$VDF_DIR$\standalone-linux.vdf"
|
||||||
|
"1318695" "$VDF_DIR$\standalone-china-linux.vdf"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
"DepotBuildConfig"
|
||||||
|
{
|
||||||
|
"DepotID" "1930755"
|
||||||
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-china-demo\shapez-linux-x64"
|
||||||
|
"FileMapping"
|
||||||
|
{
|
||||||
|
"LocalPath" "*"
|
||||||
|
"DepotPath" "."
|
||||||
|
"recursive" "1"
|
||||||
|
}
|
||||||
|
"FileExclusion" "*.pdb"
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
"DepotBuildConfig"
|
||||||
|
{
|
||||||
|
"DepotID" "1930754"
|
||||||
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-china-demo\shapez-win32-x64"
|
||||||
|
"FileMapping"
|
||||||
|
{
|
||||||
|
"LocalPath" "*"
|
||||||
|
"DepotPath" "."
|
||||||
|
"recursive" "1"
|
||||||
|
}
|
||||||
|
"FileExclusion" "*.pdb"
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
"DepotBuildConfig"
|
||||||
|
{
|
||||||
|
"DepotID" "1930756"
|
||||||
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-darwin-x64"
|
||||||
|
"FileMapping"
|
||||||
|
{
|
||||||
|
"LocalPath" "*"
|
||||||
|
"DepotPath" "."
|
||||||
|
"recursive" "1"
|
||||||
|
}
|
||||||
|
"FileExclusion" "*.pdb"
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
"DepotBuildConfig"
|
||||||
|
{
|
||||||
|
"DepotID" "1930752"
|
||||||
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-linux-x64"
|
||||||
|
"FileMapping"
|
||||||
|
{
|
||||||
|
"LocalPath" "*"
|
||||||
|
"DepotPath" "."
|
||||||
|
"recursive" "1"
|
||||||
|
}
|
||||||
|
"FileExclusion" "*.pdb"
|
||||||
|
}
|
|
@ -0,0 +1,12 @@
|
||||||
|
"DepotBuildConfig"
|
||||||
|
{
|
||||||
|
"DepotID" "1930753"
|
||||||
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-win32-x64"
|
||||||
|
"FileMapping"
|
||||||
|
{
|
||||||
|
"LocalPath" "*"
|
||||||
|
"DepotPath" "."
|
||||||
|
"recursive" "1"
|
||||||
|
}
|
||||||
|
"FileExclusion" "*.pdb"
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318695"
|
"DepotID" "1318695"
|
||||||
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-linux-x64"
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-china\shapez-linux-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
|
@ -1,7 +1,7 @@
|
||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318694"
|
"DepotID" "1318694"
|
||||||
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-win32-x64"
|
"contentroot" "$BUNDLE_DIR$\standalone-steam-china\shapez-win32-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
|
@ -0,0 +1,12 @@
|
||||||
|
"DepotBuildConfig"
|
||||||
|
{
|
||||||
|
"DepotID" "1318693"
|
||||||
|
"contentroot" "$BUNDLE_DIR$\standalone-steam\shapez-darwin-x64"
|
||||||
|
"FileMapping"
|
||||||
|
{
|
||||||
|
"LocalPath" "*"
|
||||||
|
"DepotPath" "."
|
||||||
|
"recursive" "1"
|
||||||
|
}
|
||||||
|
"FileExclusion" "*.pdb"
|
||||||
|
}
|
|
@ -1,7 +1,7 @@
|
||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318692"
|
"DepotID" "1318692"
|
||||||
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-linux-x64"
|
"contentroot" "$BUNDLE_DIR$\standalone-steam\shapez-linux-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
|
@ -1,7 +1,7 @@
|
||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318691"
|
"DepotID" "1318691"
|
||||||
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-win32-x64"
|
"contentroot" "$BUNDLE_DIR$\standalone-steam\shapez-win32-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
yarn gulp standalone.prepareVDF
|
||||||
|
steamcmd.sh +login $STEAM_UPLOAD_SHAPEZ_ID $STEAM_UPLOAD_SHAPEZ_USER +run_app_build $PWD/built_vdfs/app-darwin-demo.vdf +quit
|
|
@ -0,0 +1,3 @@
|
||||||
|
#!/bin/sh
|
||||||
|
yarn gulp standalone.prepareVDF
|
||||||
|
steamcmd.sh +login $STEAM_UPLOAD_SHAPEZ_ID $STEAM_UPLOAD_SHAPEZ_USER +run_app_build $PWD/built_vdfs/app-darwin.vdf +quit
|
|
@ -1,4 +1,3 @@
|
||||||
@echo off
|
@echo off
|
||||||
cmd /c yarn gulp standalone.prepareVDF
|
cmd /c yarn gulp standalone.prepareVDF
|
||||||
steamcmd +login %STEAM_UPLOAD_SHAPEZ_ID% %STEAM_UPLOAD_SHAPEZ_USER% +run_app_build %cd%/scripts/app.vdf +quit
|
steamcmd +login %STEAM_UPLOAD_SHAPEZ_ID% %STEAM_UPLOAD_SHAPEZ_USER% +run_app_build %cd%/built_vdfs/app-winlinux-demo.vdf +quit
|
||||||
start https://partner.steamgames.com/apps/builds/1318690
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
@echo off
|
||||||
|
cmd /c yarn gulp standalone.prepareVDF
|
||||||
|
steamcmd +login %STEAM_UPLOAD_SHAPEZ_ID% %STEAM_UPLOAD_SHAPEZ_USER% +run_app_build %cd%/built_vdfs/app-winlinux.vdf +quit
|
|
@ -3,10 +3,16 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
const { getRevision, getVersion, getAllResourceImages } = require("./buildutils");
|
const { getRevision, getVersion, getAllResourceImages } = require("./buildutils");
|
||||||
const lzString = require("lz-string");
|
|
||||||
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
||||||
|
|
||||||
module.exports = ({ watch = false, standalone = false, chineseVersion = false, wegameVersion = false }) => {
|
module.exports = ({
|
||||||
|
watch = false,
|
||||||
|
standalone = false,
|
||||||
|
chineseVersion = false,
|
||||||
|
wegameVersion = false,
|
||||||
|
steamDemo = false,
|
||||||
|
gogVersion = false,
|
||||||
|
}) => {
|
||||||
return {
|
return {
|
||||||
mode: "development",
|
mode: "development",
|
||||||
devtool: "cheap-source-map",
|
devtool: "cheap-source-map",
|
||||||
|
@ -31,16 +37,14 @@ module.exports = ({ watch = false, standalone = false, chineseVersion = false, w
|
||||||
"window.assert(false, 'abstract method called of: ' + (this.name || (this.constructor && this.constructor.name)));",
|
"window.assert(false, 'abstract method called of: ' + (this.name || (this.constructor && this.constructor.name)));",
|
||||||
G_HAVE_ASSERT: "true",
|
G_HAVE_ASSERT: "true",
|
||||||
G_APP_ENVIRONMENT: JSON.stringify("dev"),
|
G_APP_ENVIRONMENT: JSON.stringify("dev"),
|
||||||
G_TRACKING_ENDPOINT: JSON.stringify(
|
|
||||||
lzString.compressToEncodedURIComponent("http://localhost:10005/v1")
|
|
||||||
),
|
|
||||||
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
||||||
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
|
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
|
||||||
|
G_GOG_VERSION: JSON.stringify(gogVersion),
|
||||||
G_IS_DEV: "true",
|
G_IS_DEV: "true",
|
||||||
G_IS_RELEASE: "false",
|
G_IS_RELEASE: "false",
|
||||||
G_IS_MOBILE_APP: "false",
|
|
||||||
G_IS_BROWSER: "true",
|
G_IS_BROWSER: "true",
|
||||||
G_IS_STANDALONE: standalone ? "true" : "false",
|
G_IS_STANDALONE: JSON.stringify(standalone),
|
||||||
|
G_IS_STEAM_DEMO: JSON.stringify(steamDemo),
|
||||||
G_BUILD_TIME: "" + new Date().getTime(),
|
G_BUILD_TIME: "" + new Date().getTime(),
|
||||||
G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()),
|
G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()),
|
||||||
G_BUILD_VERSION: JSON.stringify(getVersion()),
|
G_BUILD_VERSION: JSON.stringify(getVersion()),
|
||||||
|
@ -71,6 +75,7 @@ module.exports = ({ watch = false, standalone = false, chineseVersion = false, w
|
||||||
type: "javascript/auto",
|
type: "javascript/auto",
|
||||||
},
|
},
|
||||||
{ test: /\.(png|jpe?g|svg)$/, loader: "ignore-loader" },
|
{ test: /\.(png|jpe?g|svg)$/, loader: "ignore-loader" },
|
||||||
|
{ test: /\.nobuild/, loader: "ignore-loader" },
|
||||||
{
|
{
|
||||||
test: /\.md$/,
|
test: /\.md$/,
|
||||||
use: [
|
use: [
|
||||||
|
@ -92,6 +97,9 @@ module.exports = ({ watch = false, standalone = false, chineseVersion = false, w
|
||||||
end: "typehints:end",
|
end: "typehints:end",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
loader: path.resolve(__dirname, "mod.js"),
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,39 +3,38 @@
|
||||||
const path = require("path");
|
const path = require("path");
|
||||||
const webpack = require("webpack");
|
const webpack = require("webpack");
|
||||||
const { getRevision, getVersion, getAllResourceImages } = require("./buildutils");
|
const { getRevision, getVersion, getAllResourceImages } = require("./buildutils");
|
||||||
const lzString = require("lz-string");
|
|
||||||
|
|
||||||
const TerserPlugin = require("terser-webpack-plugin");
|
const TerserPlugin = require("terser-webpack-plugin");
|
||||||
const StringReplacePlugin = require("string-replace-webpack-plugin");
|
const StringReplacePlugin = require("string-replace-webpack-plugin");
|
||||||
const UnusedFilesPlugin = require("unused-files-webpack-plugin").UnusedFilesWebpackPlugin;
|
const UnusedFilesPlugin = require("unused-files-webpack-plugin").UnusedFilesWebpackPlugin;
|
||||||
|
|
||||||
module.exports = ({
|
module.exports = ({
|
||||||
enableAssert = false,
|
|
||||||
environment,
|
environment,
|
||||||
es6 = false,
|
es6 = false,
|
||||||
|
|
||||||
standalone = false,
|
standalone = false,
|
||||||
isBrowser = true,
|
isBrowser = true,
|
||||||
mobileApp = false,
|
|
||||||
chineseVersion = false,
|
chineseVersion = false,
|
||||||
wegameVersion = false,
|
wegameVersion = false,
|
||||||
|
steamDemo = false,
|
||||||
|
gogVersion = false,
|
||||||
}) => {
|
}) => {
|
||||||
const globalDefs = {
|
const globalDefs = {
|
||||||
assert: enableAssert ? "window.assert" : "false && window.assert",
|
assert: "false && window.assert",
|
||||||
assertAlways: "window.assert",
|
assertAlways: "window.assert",
|
||||||
abstract: "window.assert(false, 'abstract method called');",
|
abstract: "window.assert(false, 'abstract method called');",
|
||||||
G_IS_DEV: "false",
|
G_IS_DEV: "false",
|
||||||
|
|
||||||
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
||||||
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
|
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
|
||||||
|
G_GOG_VERSION: JSON.stringify(gogVersion),
|
||||||
G_IS_RELEASE: environment === "prod" ? "true" : "false",
|
G_IS_RELEASE: environment === "prod" ? "true" : "false",
|
||||||
G_IS_STANDALONE: standalone ? "true" : "false",
|
G_IS_STANDALONE: standalone ? "true" : "false",
|
||||||
|
G_IS_STEAM_DEMO: JSON.stringify(steamDemo),
|
||||||
G_IS_BROWSER: isBrowser ? "true" : "false",
|
G_IS_BROWSER: isBrowser ? "true" : "false",
|
||||||
G_IS_MOBILE_APP: mobileApp ? "true" : "false",
|
|
||||||
G_TRACKING_ENDPOINT: JSON.stringify(
|
|
||||||
lzString.compressToEncodedURIComponent("https://tracking.shapez.io/v1")
|
|
||||||
),
|
|
||||||
G_APP_ENVIRONMENT: JSON.stringify(environment),
|
G_APP_ENVIRONMENT: JSON.stringify(environment),
|
||||||
G_HAVE_ASSERT: enableAssert ? "true" : "false",
|
G_HAVE_ASSERT: "false",
|
||||||
G_BUILD_TIME: "" + new Date().getTime(),
|
G_BUILD_TIME: "" + new Date().getTime(),
|
||||||
G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()),
|
G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()),
|
||||||
G_BUILD_VERSION: JSON.stringify(getVersion()),
|
G_BUILD_VERSION: JSON.stringify(getVersion()),
|
||||||
|
@ -63,7 +62,6 @@ module.exports = ({
|
||||||
// Display bailout reasons
|
// Display bailout reasons
|
||||||
optimizationBailout: true,
|
optimizationBailout: true,
|
||||||
},
|
},
|
||||||
// devtool: "source-map",
|
|
||||||
devtool: false,
|
devtool: false,
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
|
@ -131,6 +129,7 @@ module.exports = ({
|
||||||
warnings: true,
|
warnings: true,
|
||||||
},
|
},
|
||||||
mangle: {
|
mangle: {
|
||||||
|
reserved: ["__$S__"],
|
||||||
eval: true,
|
eval: true,
|
||||||
keep_classnames: !minifyNames,
|
keep_classnames: !minifyNames,
|
||||||
keep_fnames: !minifyNames,
|
keep_fnames: !minifyNames,
|
||||||
|
@ -145,7 +144,7 @@ module.exports = ({
|
||||||
braces: false,
|
braces: false,
|
||||||
ecma: es6 ? 6 : 5,
|
ecma: es6 ? 6 : 5,
|
||||||
preamble:
|
preamble:
|
||||||
"/* shapez.io Codebase - Copyright 2020 Tobias Springer - " +
|
"/* shapez.io Codebase - Copyright 2022 tobspr Games - " +
|
||||||
getVersion() +
|
getVersion() +
|
||||||
" @ " +
|
" @ " +
|
||||||
getRevision() +
|
getRevision() +
|
||||||
|
@ -177,6 +176,7 @@ module.exports = ({
|
||||||
type: "javascript/auto",
|
type: "javascript/auto",
|
||||||
},
|
},
|
||||||
{ test: /\.(png|jpe?g|svg)$/, loader: "ignore-loader" },
|
{ test: /\.(png|jpe?g|svg)$/, loader: "ignore-loader" },
|
||||||
|
{ test: /\.nobuild/, loader: "ignore-loader" },
|
||||||
{
|
{
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
enforce: "pre",
|
enforce: "pre",
|
||||||
|
@ -209,6 +209,9 @@ module.exports = ({
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
use: [
|
use: [
|
||||||
// "thread-loader",
|
// "thread-loader",
|
||||||
|
{
|
||||||
|
loader: path.resolve(__dirname, "mod.js"),
|
||||||
|
},
|
||||||
{
|
{
|
||||||
loader: "babel-loader?cacheDirectory",
|
loader: "babel-loader?cacheDirectory",
|
||||||
options: {
|
options: {
|
||||||
|
|
533
gulp/yarn.lock
|
@ -144,6 +144,11 @@
|
||||||
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz"
|
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz"
|
||||||
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
|
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
|
||||||
|
|
||||||
|
"@babel/helper-plugin-utils@^7.17.12":
|
||||||
|
version "7.17.12"
|
||||||
|
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.17.12.tgz#86c2347da5acbf5583ba0a10aed4c9bf9da9cf96"
|
||||||
|
integrity sha512-JDkf04mqtN3y4iAbO1hv9U2ARpPyPL1zqyWs/2WG1pgSq9llHFjStX5jdxb84himgJm+8Ng+x0oiWF/nw/XQKA==
|
||||||
|
|
||||||
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
|
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
|
||||||
version "7.5.5"
|
version "7.5.5"
|
||||||
resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz"
|
resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz"
|
||||||
|
@ -310,6 +315,13 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
"@babel/helper-plugin-utils" "^7.0.0"
|
"@babel/helper-plugin-utils" "^7.0.0"
|
||||||
|
|
||||||
|
"@babel/plugin-transform-arrow-functions@^7.17.12":
|
||||||
|
version "7.17.12"
|
||||||
|
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.17.12.tgz#dddd783b473b1b1537ef46423e3944ff24898c45"
|
||||||
|
integrity sha512-PHln3CNi/49V+mza4xMwrg+WGYevSF1oaiXaC2EQfdp4HWlSjRsrDXWJiQBKpP7749u6vQ9mcry2uuFOv5CXvA==
|
||||||
|
dependencies:
|
||||||
|
"@babel/helper-plugin-utils" "^7.17.12"
|
||||||
|
|
||||||
"@babel/plugin-transform-arrow-functions@^7.2.0":
|
"@babel/plugin-transform-arrow-functions@^7.2.0":
|
||||||
version "7.2.0"
|
version "7.2.0"
|
||||||
resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz"
|
resolved "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.2.0.tgz"
|
||||||
|
@ -657,17 +669,21 @@
|
||||||
resolved "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz"
|
resolved "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz"
|
||||||
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
|
integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw==
|
||||||
|
|
||||||
"@electron/get@^1.3.0":
|
"@electron/get@^1.6.0":
|
||||||
version "1.5.0"
|
version "1.14.1"
|
||||||
resolved "https://registry.npmjs.org/@electron/get/-/get-1.5.0.tgz"
|
resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.14.1.tgz#16ba75f02dffb74c23965e72d617adc721d27f40"
|
||||||
integrity sha512-tafxBz6n08G6SX961F/h8XFtpB/DdwRvJJoDeOH9x78jDSCMQ2G/rRWqSwLFp9oeMFBJf0Pf5Kkw6TKt5w9TWg==
|
integrity sha512-BrZYyL/6m0ZXz/lDxy/nlVhQz+WF+iPS6qXolEU8atw7h6v1aYkjwJZ63m+bJMBTxDE66X+r2tPS4a/8C82sZw==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.1.1"
|
debug "^4.1.1"
|
||||||
env-paths "^2.2.0"
|
env-paths "^2.2.0"
|
||||||
fs-extra "^8.1.0"
|
fs-extra "^8.1.0"
|
||||||
got "^9.6.0"
|
got "^9.6.0"
|
||||||
sanitize-filename "^1.6.2"
|
progress "^2.0.3"
|
||||||
sumchecker "^3.0.0"
|
semver "^6.2.0"
|
||||||
|
sumchecker "^3.0.1"
|
||||||
|
optionalDependencies:
|
||||||
|
global-agent "^3.0.0"
|
||||||
|
global-tunnel-ng "^2.7.1"
|
||||||
|
|
||||||
"@jimp/bmp@^0.6.8":
|
"@jimp/bmp@^0.6.8":
|
||||||
version "0.6.8"
|
version "0.6.8"
|
||||||
|
@ -921,6 +937,13 @@
|
||||||
dependencies:
|
dependencies:
|
||||||
core-js "^2.5.7"
|
core-js "^2.5.7"
|
||||||
|
|
||||||
|
"@malept/cross-spawn-promise@^1.1.0":
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/@malept/cross-spawn-promise/-/cross-spawn-promise-1.1.1.tgz#504af200af6b98e198bce768bc1730c6936ae01d"
|
||||||
|
integrity sha512-RTBGWL5FWQcg9orDOCcp4LvItNzUPcyEU9bwaeJX0rJ1IQxzucC48Y0/sQLp/g6t99IQgAlGIaesJS+gTn7tVQ==
|
||||||
|
dependencies:
|
||||||
|
cross-spawn "^7.0.1"
|
||||||
|
|
||||||
"@nodelib/fs.scandir@2.1.3":
|
"@nodelib/fs.scandir@2.1.3":
|
||||||
version "2.1.3"
|
version "2.1.3"
|
||||||
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz"
|
resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz"
|
||||||
|
@ -989,6 +1012,11 @@
|
||||||
"@types/minimatch" "*"
|
"@types/minimatch" "*"
|
||||||
"@types/node" "*"
|
"@types/node" "*"
|
||||||
|
|
||||||
|
"@types/json-schema@^7.0.8":
|
||||||
|
version "7.0.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d"
|
||||||
|
integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==
|
||||||
|
|
||||||
"@types/minimatch@*":
|
"@types/minimatch@*":
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz"
|
resolved "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz"
|
||||||
|
@ -1004,6 +1032,13 @@
|
||||||
resolved "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz"
|
resolved "https://registry.npmjs.org/@types/q/-/q-1.5.2.tgz"
|
||||||
integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==
|
integrity sha512-ce5d3q03Ex0sy4R14722Rmt6MT07Ua+k4FwDfdcToYJcMKNtRVQvJ6JCAPdAmAnbRb6CsX6aYb9m96NGod9uTw==
|
||||||
|
|
||||||
|
"@types/yauzl@^2.9.1":
|
||||||
|
version "2.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599"
|
||||||
|
integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==
|
||||||
|
dependencies:
|
||||||
|
"@types/node" "*"
|
||||||
|
|
||||||
"@webassemblyjs/ast@1.9.0":
|
"@webassemblyjs/ast@1.9.0":
|
||||||
version "1.9.0"
|
version "1.9.0"
|
||||||
resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz"
|
resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz"
|
||||||
|
@ -1217,6 +1252,11 @@ acorn@^6.0.1, acorn@^6.0.2, acorn@^6.0.7, acorn@^6.4.1:
|
||||||
resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz"
|
resolved "https://registry.npmjs.org/acorn/-/acorn-6.4.1.tgz"
|
||||||
integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
|
integrity sha512-ZVA9k326Nwrj3Cj9jlh3wGFutC2ZornPNARZwsNYqQYgN0EsV2d53w5RN/co65Ohn4sUAUtb1rSUAOD6XN9idA==
|
||||||
|
|
||||||
|
acorn@^6.0.6:
|
||||||
|
version "6.4.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.4.2.tgz#35866fd710528e92de10cf06016498e47e39e1e6"
|
||||||
|
integrity sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==
|
||||||
|
|
||||||
after@0.8.2:
|
after@0.8.2:
|
||||||
version "0.8.2"
|
version "0.8.2"
|
||||||
resolved "https://registry.npmjs.org/after/-/after-0.8.2.tgz"
|
resolved "https://registry.npmjs.org/after/-/after-0.8.2.tgz"
|
||||||
|
@ -1237,6 +1277,11 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1:
|
||||||
resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz"
|
resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz"
|
||||||
integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==
|
integrity sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==
|
||||||
|
|
||||||
|
ajv-keywords@^3.5.2:
|
||||||
|
version "3.5.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d"
|
||||||
|
integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==
|
||||||
|
|
||||||
ajv@^4.7.0:
|
ajv@^4.7.0:
|
||||||
version "4.11.8"
|
version "4.11.8"
|
||||||
resolved "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz"
|
resolved "https://registry.npmjs.org/ajv/-/ajv-4.11.8.tgz"
|
||||||
|
@ -1255,6 +1300,16 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.12.0, ajv@^6.5.5, ajv@^6.9.1:
|
||||||
json-schema-traverse "^0.4.1"
|
json-schema-traverse "^0.4.1"
|
||||||
uri-js "^4.2.2"
|
uri-js "^4.2.2"
|
||||||
|
|
||||||
|
ajv@^6.12.5:
|
||||||
|
version "6.12.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4"
|
||||||
|
integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==
|
||||||
|
dependencies:
|
||||||
|
fast-deep-equal "^3.1.1"
|
||||||
|
fast-json-stable-stringify "^2.0.0"
|
||||||
|
json-schema-traverse "^0.4.1"
|
||||||
|
uri-js "^4.2.2"
|
||||||
|
|
||||||
alphanum-sort@^1.0.0:
|
alphanum-sort@^1.0.0:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz"
|
resolved "https://registry.npmjs.org/alphanum-sort/-/alphanum-sort-1.0.2.tgz"
|
||||||
|
@ -1427,6 +1482,16 @@ archy@^1.0.0:
|
||||||
resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz"
|
||||||
integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
|
integrity sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=
|
||||||
|
|
||||||
|
are-you-es5@^2.1.2:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/are-you-es5/-/are-you-es5-2.1.2.tgz#d75511a174a3f842d70cc784aec0bcaff5a57547"
|
||||||
|
integrity sha512-gkT2bLCfzyJJr3lYoxZKScdD/Yp5zzghi+3KawONTvH/7rrgU3RMXYvGQnOTlqEFVgZFpEGj/6bZ6sF/9YtddA==
|
||||||
|
dependencies:
|
||||||
|
acorn "^6.0.6"
|
||||||
|
array-flatten "^2.1.0"
|
||||||
|
commander "^2.19.0"
|
||||||
|
find-up "^4.1.0"
|
||||||
|
|
||||||
argparse@^1.0.7:
|
argparse@^1.0.7:
|
||||||
version "1.0.10"
|
version "1.0.10"
|
||||||
resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
|
resolved "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz"
|
||||||
|
@ -1496,6 +1561,11 @@ array-find-index@^1.0.1:
|
||||||
resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz"
|
resolved "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz"
|
||||||
integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=
|
integrity sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=
|
||||||
|
|
||||||
|
array-flatten@^2.1.0:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.2.tgz#24ef80a28c1a893617e2149b0c6d0d788293b099"
|
||||||
|
integrity sha512-hNfzcOV8W4NdualtqBFPyVO+54DSJuZGY9qT4pRroB6S9e3iiido2ISIC5h9R2sPJ8H3FHCIiEnsv1lPXO3KtQ==
|
||||||
|
|
||||||
array-initial@^1.0.0:
|
array-initial@^1.0.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz"
|
resolved "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz"
|
||||||
|
@ -1555,18 +1625,17 @@ arraybuffer.slice@~0.0.7:
|
||||||
resolved "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz"
|
resolved "https://registry.npmjs.org/arraybuffer.slice/-/arraybuffer.slice-0.0.7.tgz"
|
||||||
integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==
|
integrity sha512-wGUIVQXuehL5TCqQun8OW81jGzAWycqzFF8lFp+GOM5BXLYj3bKNsYC4daB7n6XjCqxQA/qgTJ+8ANR3acjrog==
|
||||||
|
|
||||||
asar@^2.0.1:
|
asar@^3.1.0:
|
||||||
version "2.0.1"
|
version "3.1.0"
|
||||||
resolved "https://registry.npmjs.org/asar/-/asar-2.0.1.tgz"
|
resolved "https://registry.yarnpkg.com/asar/-/asar-3.1.0.tgz#70b0509449fe3daccc63beb4d3c7d2e24d3c6473"
|
||||||
integrity sha512-Vo9yTuUtyFahkVMFaI6uMuX6N7k5DWa6a/8+7ov0/f8Lq9TVR0tUjzSzxQSxT1Y+RJIZgnP7BVb6Uhi+9cjxqA==
|
integrity sha512-vyxPxP5arcAqN4F/ebHd/HhwnAiZtwhglvdmc7BR2f0ywbVNTOpSeyhLDbGXtE/y58hv1oC75TaNIXutnsOZsQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
chromium-pickle-js "^0.2.0"
|
chromium-pickle-js "^0.2.0"
|
||||||
commander "^2.20.0"
|
commander "^5.0.0"
|
||||||
cuint "^0.2.2"
|
glob "^7.1.6"
|
||||||
glob "^7.1.3"
|
|
||||||
minimatch "^3.0.4"
|
minimatch "^3.0.4"
|
||||||
mkdirp "^0.5.1"
|
optionalDependencies:
|
||||||
tmp-promise "^1.0.5"
|
"@types/glob" "^7.1.1"
|
||||||
|
|
||||||
asn1.js@^4.0.0:
|
asn1.js@^4.0.0:
|
||||||
version "4.10.1"
|
version "4.10.1"
|
||||||
|
@ -1693,6 +1762,11 @@ asynckit@^0.4.0:
|
||||||
resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
|
resolved "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz"
|
||||||
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
|
integrity sha1-x57Zf380y48robyXkLzDZkdLS3k=
|
||||||
|
|
||||||
|
at-least-node@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2"
|
||||||
|
integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==
|
||||||
|
|
||||||
atob@^2.1.1:
|
atob@^2.1.1:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz"
|
resolved "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz"
|
||||||
|
@ -1947,6 +2021,11 @@ base64-js@^1.0.2, base64-js@^1.2.3:
|
||||||
resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz"
|
resolved "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz"
|
||||||
integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
|
integrity sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==
|
||||||
|
|
||||||
|
base64-js@^1.5.1:
|
||||||
|
version "1.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a"
|
||||||
|
integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==
|
||||||
|
|
||||||
base64id@1.0.0:
|
base64id@1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/base64id/-/base64id-1.0.0.tgz"
|
||||||
|
@ -2125,6 +2204,11 @@ boolbase@^1.0.0, boolbase@~1.0.0:
|
||||||
resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz"
|
||||||
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
|
||||||
|
|
||||||
|
boolean@^3.0.1:
|
||||||
|
version "3.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.2.0.tgz#9e5294af4e98314494cbb17979fa54ca159f116b"
|
||||||
|
integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==
|
||||||
|
|
||||||
brace-expansion@^1.0.0, brace-expansion@^1.1.7:
|
brace-expansion@^1.0.0, brace-expansion@^1.1.7:
|
||||||
version "1.1.11"
|
version "1.1.11"
|
||||||
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz"
|
resolved "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz"
|
||||||
|
@ -2945,6 +3029,11 @@ commander@^2.19.0, commander@^2.2.0, commander@^2.20.0, commander@^2.8.1:
|
||||||
resolved "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz"
|
resolved "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz"
|
||||||
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
|
integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==
|
||||||
|
|
||||||
|
commander@^5.0.0:
|
||||||
|
version "5.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/commander/-/commander-5.1.0.tgz#46abbd1652f8e059bddaef99bbdcb2ad9cf179ae"
|
||||||
|
integrity sha512-P0CysNDQ7rtVw4QIQtm+MRxV66vKFSvlsQvGYXZWR3qFU0jlMKHZZZgw8e+8DSah4UDKMqnknRDQz+xuQXQ/Zg==
|
||||||
|
|
||||||
commander@~2.19.0:
|
commander@~2.19.0:
|
||||||
version "2.19.0"
|
version "2.19.0"
|
||||||
resolved "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz"
|
resolved "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz"
|
||||||
|
@ -3182,6 +3271,15 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
sha.js "^2.4.8"
|
sha.js "^2.4.8"
|
||||||
|
|
||||||
|
cross-spawn-windows-exe@^1.1.0, cross-spawn-windows-exe@^1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cross-spawn-windows-exe/-/cross-spawn-windows-exe-1.2.0.tgz#46253b0f497676e766faf4a7061004618b5ac5ec"
|
||||||
|
integrity sha512-mkLtJJcYbDCxEG7Js6eUnUNndWjyUZwJ3H7bErmmtOYU/Zb99DyUkpamuIZE0b3bhmJyZ7D90uS6f+CGxRRjOw==
|
||||||
|
dependencies:
|
||||||
|
"@malept/cross-spawn-promise" "^1.1.0"
|
||||||
|
is-wsl "^2.2.0"
|
||||||
|
which "^2.0.2"
|
||||||
|
|
||||||
cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5:
|
cross-spawn@6.0.5, cross-spawn@^6.0.0, cross-spawn@^6.0.5:
|
||||||
version "6.0.5"
|
version "6.0.5"
|
||||||
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz"
|
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz"
|
||||||
|
@ -3202,7 +3300,7 @@ cross-spawn@^5.0.1:
|
||||||
shebang-command "^1.2.0"
|
shebang-command "^1.2.0"
|
||||||
which "^1.2.9"
|
which "^1.2.9"
|
||||||
|
|
||||||
cross-spawn@^7.0.0, cross-spawn@^7.0.3:
|
cross-spawn@^7.0.0, cross-spawn@^7.0.1, cross-spawn@^7.0.3:
|
||||||
version "7.0.3"
|
version "7.0.3"
|
||||||
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
|
resolved "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz"
|
||||||
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
|
integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==
|
||||||
|
@ -3211,13 +3309,6 @@ cross-spawn@^7.0.0, cross-spawn@^7.0.3:
|
||||||
shebang-command "^2.0.0"
|
shebang-command "^2.0.0"
|
||||||
which "^2.0.1"
|
which "^2.0.1"
|
||||||
|
|
||||||
cross-zip@^2.1.5:
|
|
||||||
version "2.1.6"
|
|
||||||
resolved "https://registry.npmjs.org/cross-zip/-/cross-zip-2.1.6.tgz"
|
|
||||||
integrity sha512-xLIETNkzRcU6jGRzenJyRFxahbtP4628xEKMTI/Ql0Vu8m4h8M7uRLVi7E5OYHuJ6VQPsG4icJumKAFUvfm0+A==
|
|
||||||
dependencies:
|
|
||||||
rimraf "^3.0.0"
|
|
||||||
|
|
||||||
crypto-browserify@^3.11.0:
|
crypto-browserify@^3.11.0:
|
||||||
version "3.12.0"
|
version "3.12.0"
|
||||||
resolved "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz"
|
resolved "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz"
|
||||||
|
@ -3447,11 +3538,6 @@ cssstyle@^1.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
cssom "0.3.x"
|
cssom "0.3.x"
|
||||||
|
|
||||||
cuint@^0.2.2:
|
|
||||||
version "0.2.2"
|
|
||||||
resolved "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz"
|
|
||||||
integrity sha1-QICG1AlVDCYxFVYZ6fp7ytw7mRs=
|
|
||||||
|
|
||||||
currently-unhandled@^0.4.1:
|
currently-unhandled@^0.4.1:
|
||||||
version "0.4.1"
|
version "0.4.1"
|
||||||
resolved "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz"
|
resolved "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz"
|
||||||
|
@ -3539,6 +3625,13 @@ debug@^3.1.0, debug@^3.2.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
ms "^2.1.1"
|
ms "^2.1.1"
|
||||||
|
|
||||||
|
debug@^4.3.4:
|
||||||
|
version "4.3.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||||
|
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||||
|
dependencies:
|
||||||
|
ms "2.1.2"
|
||||||
|
|
||||||
debug@~0.8.1:
|
debug@~0.8.1:
|
||||||
version "0.8.1"
|
version "0.8.1"
|
||||||
resolved "https://registry.npmjs.org/debug/-/debug-0.8.1.tgz"
|
resolved "https://registry.npmjs.org/debug/-/debug-0.8.1.tgz"
|
||||||
|
@ -3735,6 +3828,11 @@ detect-indent@^4.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
repeating "^2.0.0"
|
repeating "^2.0.0"
|
||||||
|
|
||||||
|
detect-node@^2.0.4:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
|
||||||
|
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
|
||||||
|
|
||||||
dev-ip@^1.0.1:
|
dev-ip@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz"
|
resolved "https://registry.npmjs.org/dev-ip/-/dev-ip-1.0.1.tgz"
|
||||||
|
@ -3938,18 +4036,18 @@ ee-first@1.1.1:
|
||||||
resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
|
resolved "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz"
|
||||||
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=
|
||||||
|
|
||||||
electron-notarize@^0.1.1:
|
electron-notarize@^1.1.1, electron-notarize@^1.2.1:
|
||||||
version "0.1.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.npmjs.org/electron-notarize/-/electron-notarize-0.1.1.tgz"
|
resolved "https://registry.yarnpkg.com/electron-notarize/-/electron-notarize-1.2.1.tgz#347c18eca8e29dddadadee511b870c13d4008baf"
|
||||||
integrity sha512-TpKfJcz4LXl5jiGvZTs5fbEx+wUFXV5u8voeG5WCHWfY/cdgdD8lDZIZRqLVOtR3VO+drgJ9aiSHIO9TYn/fKg==
|
integrity sha512-u/ECWhIrhkSQpZM4cJzVZ5TsmkaqrRo5LDC/KMbGF0sPkm53Ng59+M0zp8QVaql0obfJy9vlVT+4iOkAi2UDlA==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.1.1"
|
debug "^4.1.1"
|
||||||
fs-extra "^8.0.1"
|
fs-extra "^9.0.1"
|
||||||
|
|
||||||
electron-osx-sign@^0.4.11:
|
electron-osx-sign@^0.5.0:
|
||||||
version "0.4.13"
|
version "0.5.0"
|
||||||
resolved "https://registry.npmjs.org/electron-osx-sign/-/electron-osx-sign-0.4.13.tgz"
|
resolved "https://registry.yarnpkg.com/electron-osx-sign/-/electron-osx-sign-0.5.0.tgz#fc258c5e896859904bbe3d01da06902c04b51c3a"
|
||||||
integrity sha512-+44lasF26lSBLh9HDG6TGpPjuqqtWGD9Pcp+YglE8gyf1OGYdbW8UCIshKPh69O/AcdvDB0ohaTYQz3nbGPbtw==
|
integrity sha512-icoRLHzFz/qxzDh/N4Pi2z4yVHurlsCAYQvsCSG7fCedJ4UJXBS6PoQyGH71IfcqKupcKeK7HX/NkyfG+v6vlQ==
|
||||||
dependencies:
|
dependencies:
|
||||||
bluebird "^3.5.0"
|
bluebird "^3.5.0"
|
||||||
compare-version "^0.1.2"
|
compare-version "^0.1.2"
|
||||||
|
@ -3958,28 +4056,29 @@ electron-osx-sign@^0.4.11:
|
||||||
minimist "^1.2.0"
|
minimist "^1.2.0"
|
||||||
plist "^3.0.1"
|
plist "^3.0.1"
|
||||||
|
|
||||||
electron-packager@^14.0.6:
|
electron-packager@^15.4.0:
|
||||||
version "14.0.6"
|
version "15.4.0"
|
||||||
resolved "https://registry.npmjs.org/electron-packager/-/electron-packager-14.0.6.tgz"
|
resolved "https://registry.yarnpkg.com/electron-packager/-/electron-packager-15.4.0.tgz#07ea036b70cde2062d4c8dce4d907d793b303998"
|
||||||
integrity sha512-X+ikV+TnnNkIrK93vOjsjPeykCQBFxBS7LXKMTE1s62rXWirGMdjWL+edVkBOMRkH0ROJyFmWM28Dpj6sfEg+A==
|
integrity sha512-JrrLcBP15KGrPj0cZ/ALKGmaQ4gJkn3mocf0E3bRKdR3kxKWYcDRpCvdhksYDXw/r3I6tMEcZ7XzyApWFXdVpw==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.3.0"
|
"@electron/get" "^1.6.0"
|
||||||
asar "^2.0.1"
|
asar "^3.1.0"
|
||||||
cross-zip "^2.1.5"
|
cross-spawn-windows-exe "^1.2.0"
|
||||||
debug "^4.0.1"
|
debug "^4.0.1"
|
||||||
electron-notarize "^0.1.1"
|
electron-notarize "^1.1.1"
|
||||||
electron-osx-sign "^0.4.11"
|
electron-osx-sign "^0.5.0"
|
||||||
fs-extra "^8.1.0"
|
extract-zip "^2.0.0"
|
||||||
|
filenamify "^4.1.0"
|
||||||
|
fs-extra "^9.0.0"
|
||||||
galactus "^0.2.1"
|
galactus "^0.2.1"
|
||||||
get-package-info "^1.0.0"
|
get-package-info "^1.0.0"
|
||||||
junk "^3.1.0"
|
junk "^3.1.0"
|
||||||
parse-author "^2.0.0"
|
parse-author "^2.0.0"
|
||||||
plist "^3.0.0"
|
plist "^3.0.0"
|
||||||
rcedit "^2.0.0"
|
rcedit "^3.0.1"
|
||||||
resolve "^1.1.6"
|
resolve "^1.1.6"
|
||||||
sanitize-filename "^1.6.0"
|
semver "^7.1.3"
|
||||||
semver "^6.0.0"
|
yargs-parser "^20.0.0"
|
||||||
yargs-parser "^13.0.0"
|
|
||||||
|
|
||||||
electron-to-chromium@^1.3.247:
|
electron-to-chromium@^1.3.247:
|
||||||
version "1.3.264"
|
version "1.3.264"
|
||||||
|
@ -4024,7 +4123,7 @@ emojis-list@^3.0.0:
|
||||||
resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz"
|
resolved "https://registry.npmjs.org/emojis-list/-/emojis-list-3.0.0.tgz"
|
||||||
integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==
|
integrity sha512-/kyM18EfinwXZbno9FyUGeFh87KC8HRQBQGildHZbEuRyWFOmv1U10o9BBp8XVZDVNNuQKyIGIu5ZYAAXJ0V2Q==
|
||||||
|
|
||||||
encodeurl@~1.0.1, encodeurl@~1.0.2:
|
encodeurl@^1.0.2, encodeurl@~1.0.1, encodeurl@~1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz"
|
resolved "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz"
|
||||||
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
|
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
|
||||||
|
@ -4178,6 +4277,11 @@ es5-ext@^0.10.35, es5-ext@^0.10.46, es5-ext@^0.10.50, es5-ext@^0.10.51, es5-ext@
|
||||||
es6-symbol "~3.1.1"
|
es6-symbol "~3.1.1"
|
||||||
next-tick "^1.0.0"
|
next-tick "^1.0.0"
|
||||||
|
|
||||||
|
es6-error@^4.1.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||||
|
integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
|
||||||
|
|
||||||
es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.1, es6-iterator@~2.0.3:
|
es6-iterator@^2.0.1, es6-iterator@^2.0.3, es6-iterator@~2.0.1, es6-iterator@~2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz"
|
resolved "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz"
|
||||||
|
@ -4254,6 +4358,11 @@ escape-string-regexp@^1.0.0, escape-string-regexp@^1.0.2, escape-string-regexp@^
|
||||||
resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz"
|
resolved "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz"
|
||||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||||
|
|
||||||
|
escape-string-regexp@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||||
|
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||||
|
|
||||||
escodegen@^1.11.0:
|
escodegen@^1.11.0:
|
||||||
version "1.12.0"
|
version "1.12.0"
|
||||||
resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz"
|
resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.12.0.tgz"
|
||||||
|
@ -4641,6 +4750,17 @@ extglob@^2.0.4:
|
||||||
snapdragon "^0.8.1"
|
snapdragon "^0.8.1"
|
||||||
to-regex "^3.0.1"
|
to-regex "^3.0.1"
|
||||||
|
|
||||||
|
extract-zip@^2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
|
||||||
|
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.1.1"
|
||||||
|
get-stream "^5.1.0"
|
||||||
|
yauzl "^2.10.0"
|
||||||
|
optionalDependencies:
|
||||||
|
"@types/yauzl" "^2.9.1"
|
||||||
|
|
||||||
extsprintf@1.3.0, extsprintf@^1.2.0:
|
extsprintf@1.3.0, extsprintf@^1.2.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz"
|
resolved "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz"
|
||||||
|
@ -4827,6 +4947,15 @@ filenamify@^2.0.0:
|
||||||
strip-outer "^1.0.0"
|
strip-outer "^1.0.0"
|
||||||
trim-repeated "^1.0.0"
|
trim-repeated "^1.0.0"
|
||||||
|
|
||||||
|
filenamify@^4.1.0:
|
||||||
|
version "4.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/filenamify/-/filenamify-4.3.0.tgz#62391cb58f02b09971c9d4f9d63b3cf9aba03106"
|
||||||
|
integrity sha512-hcFKyUG57yWGAzu1CMt/dPzYZuv+jAJUT85bL8mrXvNe6hWj6yEHEc4EdcgiA6Z3oi1/9wXJdZPXF2dZNgwgOg==
|
||||||
|
dependencies:
|
||||||
|
filename-reserved-regex "^2.0.0"
|
||||||
|
strip-outer "^1.0.1"
|
||||||
|
trim-repeated "^1.0.0"
|
||||||
|
|
||||||
fill-range@^4.0.0:
|
fill-range@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz"
|
resolved "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz"
|
||||||
|
@ -5104,6 +5233,15 @@ fs-extra@3.0.1, fs-extra@^3.0.1:
|
||||||
jsonfile "^3.0.0"
|
jsonfile "^3.0.0"
|
||||||
universalify "^0.1.0"
|
universalify "^0.1.0"
|
||||||
|
|
||||||
|
fs-extra@^10.0.0:
|
||||||
|
version "10.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.1.tgz#27de43b4320e833f6867cc044bfce29fdf0ef3b8"
|
||||||
|
integrity sha512-NbdoVMZso2Lsrn/QwLXOy6rm0ufY2zEOKCDzJR/0kBsb0E6qed0P3iYK+Ath3BfvXEeu4JhEtXLgILx5psUfag==
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.2.0"
|
||||||
|
jsonfile "^6.0.1"
|
||||||
|
universalify "^2.0.0"
|
||||||
|
|
||||||
fs-extra@^4.0.0:
|
fs-extra@^4.0.0:
|
||||||
version "4.0.3"
|
version "4.0.3"
|
||||||
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz"
|
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz"
|
||||||
|
@ -5122,7 +5260,7 @@ fs-extra@^7.0.0:
|
||||||
jsonfile "^4.0.0"
|
jsonfile "^4.0.0"
|
||||||
universalify "^0.1.0"
|
universalify "^0.1.0"
|
||||||
|
|
||||||
fs-extra@^8.0.1, fs-extra@^8.1.0:
|
fs-extra@^8.1.0:
|
||||||
version "8.1.0"
|
version "8.1.0"
|
||||||
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz"
|
resolved "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz"
|
||||||
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
||||||
|
@ -5131,6 +5269,16 @@ fs-extra@^8.0.1, fs-extra@^8.1.0:
|
||||||
jsonfile "^4.0.0"
|
jsonfile "^4.0.0"
|
||||||
universalify "^0.1.0"
|
universalify "^0.1.0"
|
||||||
|
|
||||||
|
fs-extra@^9.0.0, fs-extra@^9.0.1:
|
||||||
|
version "9.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-9.1.0.tgz#5954460c764a8da2094ba3554bf839e6b9a7c86d"
|
||||||
|
integrity sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==
|
||||||
|
dependencies:
|
||||||
|
at-least-node "^1.0.0"
|
||||||
|
graceful-fs "^4.2.0"
|
||||||
|
jsonfile "^6.0.1"
|
||||||
|
universalify "^2.0.0"
|
||||||
|
|
||||||
fs-mkdirp-stream@^1.0.0:
|
fs-mkdirp-stream@^1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz"
|
||||||
|
@ -5408,6 +5556,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, gl
|
||||||
once "^1.3.0"
|
once "^1.3.0"
|
||||||
path-is-absolute "^1.0.0"
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
|
glob@^7.1.6:
|
||||||
|
version "7.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023"
|
||||||
|
integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==
|
||||||
|
dependencies:
|
||||||
|
fs.realpath "^1.0.0"
|
||||||
|
inflight "^1.0.4"
|
||||||
|
inherits "2"
|
||||||
|
minimatch "^3.0.4"
|
||||||
|
once "^1.3.0"
|
||||||
|
path-is-absolute "^1.0.0"
|
||||||
|
|
||||||
glob@~3.1.21:
|
glob@~3.1.21:
|
||||||
version "3.1.21"
|
version "3.1.21"
|
||||||
resolved "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz"
|
resolved "https://registry.npmjs.org/glob/-/glob-3.1.21.tgz"
|
||||||
|
@ -5425,6 +5585,18 @@ glob@~3.2.6:
|
||||||
inherits "2"
|
inherits "2"
|
||||||
minimatch "0.3"
|
minimatch "0.3"
|
||||||
|
|
||||||
|
global-agent@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6"
|
||||||
|
integrity sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==
|
||||||
|
dependencies:
|
||||||
|
boolean "^3.0.1"
|
||||||
|
es6-error "^4.1.1"
|
||||||
|
matcher "^3.0.0"
|
||||||
|
roarr "^2.15.3"
|
||||||
|
semver "^7.3.2"
|
||||||
|
serialize-error "^7.0.1"
|
||||||
|
|
||||||
global-modules@2.0.0:
|
global-modules@2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz"
|
resolved "https://registry.npmjs.org/global-modules/-/global-modules-2.0.0.tgz"
|
||||||
|
@ -5461,6 +5633,16 @@ global-prefix@^3.0.0:
|
||||||
kind-of "^6.0.2"
|
kind-of "^6.0.2"
|
||||||
which "^1.3.1"
|
which "^1.3.1"
|
||||||
|
|
||||||
|
global-tunnel-ng@^2.7.1:
|
||||||
|
version "2.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz#d03b5102dfde3a69914f5ee7d86761ca35d57d8f"
|
||||||
|
integrity sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==
|
||||||
|
dependencies:
|
||||||
|
encodeurl "^1.0.2"
|
||||||
|
lodash "^4.17.10"
|
||||||
|
npm-conf "^1.1.3"
|
||||||
|
tunnel "^0.0.6"
|
||||||
|
|
||||||
global@~4.3.0:
|
global@~4.3.0:
|
||||||
version "4.3.2"
|
version "4.3.2"
|
||||||
resolved "https://registry.npmjs.org/global/-/global-4.3.2.tgz"
|
resolved "https://registry.npmjs.org/global/-/global-4.3.2.tgz"
|
||||||
|
@ -5479,6 +5661,13 @@ globals@^9.18.0, globals@^9.2.0:
|
||||||
resolved "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz"
|
resolved "https://registry.npmjs.org/globals/-/globals-9.18.0.tgz"
|
||||||
integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==
|
integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ==
|
||||||
|
|
||||||
|
globalthis@^1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz#2a235d34f4d8036219f7e34929b5de9e18166b8b"
|
||||||
|
integrity sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.3"
|
||||||
|
|
||||||
globby@^10.0.0:
|
globby@^10.0.0:
|
||||||
version "10.0.2"
|
version "10.0.2"
|
||||||
resolved "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz"
|
resolved "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz"
|
||||||
|
@ -6683,6 +6872,11 @@ is-directory@^0.3.1:
|
||||||
resolved "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz"
|
resolved "https://registry.npmjs.org/is-directory/-/is-directory-0.3.1.tgz"
|
||||||
integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
|
integrity sha1-YTObbyR1/Hcv2cnYP1yFddwVSuE=
|
||||||
|
|
||||||
|
is-docker@^2.0.0:
|
||||||
|
version "2.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa"
|
||||||
|
integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ==
|
||||||
|
|
||||||
is-extendable@^0.1.0, is-extendable@^0.1.1:
|
is-extendable@^0.1.0, is-extendable@^0.1.1:
|
||||||
version "0.1.1"
|
version "0.1.1"
|
||||||
resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz"
|
resolved "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz"
|
||||||
|
@ -6922,6 +7116,13 @@ is-wsl@^1.1.0:
|
||||||
resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz"
|
resolved "https://registry.npmjs.org/is-wsl/-/is-wsl-1.1.0.tgz"
|
||||||
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
|
integrity sha1-HxbkqiKwTRM2tmGIpmrzxgDDpm0=
|
||||||
|
|
||||||
|
is-wsl@^2.2.0:
|
||||||
|
version "2.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271"
|
||||||
|
integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==
|
||||||
|
dependencies:
|
||||||
|
is-docker "^2.0.0"
|
||||||
|
|
||||||
is@^3.2.1:
|
is@^3.2.1:
|
||||||
version "3.3.0"
|
version "3.3.0"
|
||||||
resolved "https://registry.npmjs.org/is/-/is-3.3.0.tgz"
|
resolved "https://registry.npmjs.org/is/-/is-3.3.0.tgz"
|
||||||
|
@ -6944,11 +7145,16 @@ isarray@2.0.1:
|
||||||
|
|
||||||
isbinaryfile@^3.0.2:
|
isbinaryfile@^3.0.2:
|
||||||
version "3.0.3"
|
version "3.0.3"
|
||||||
resolved "https://registry.npmjs.org/isbinaryfile/-/isbinaryfile-3.0.3.tgz"
|
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-3.0.3.tgz#5d6def3edebf6e8ca8cae9c30183a804b5f8be80"
|
||||||
integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==
|
integrity sha512-8cJBL5tTd2OS0dM4jz07wQd5g0dCCqIhUxPIGtZfa5L6hWlvV5MHTITy/DBAsF+Oe2LS1X3krBUhNwaGUWpWxw==
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer-alloc "^1.2.0"
|
buffer-alloc "^1.2.0"
|
||||||
|
|
||||||
|
isbinaryfile@^4.0.8:
|
||||||
|
version "4.0.10"
|
||||||
|
resolved "https://registry.yarnpkg.com/isbinaryfile/-/isbinaryfile-4.0.10.tgz#0c5b5e30c2557a2f06febd37b7322946aaee42b3"
|
||||||
|
integrity sha512-iHrqe5shvBUcFbmZq9zOQHBoeOhZJu6RQGrDpBgenUm/Am+F3JM2MgQj+rK3Z601fzrL5gLZWtAPH2OBaSVcyw==
|
||||||
|
|
||||||
isexe@^2.0.0:
|
isexe@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz"
|
resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz"
|
||||||
|
@ -7126,7 +7332,7 @@ json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
jsonify "~0.0.0"
|
jsonify "~0.0.0"
|
||||||
|
|
||||||
json-stringify-safe@~5.0.1:
|
json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
|
||||||
version "5.0.1"
|
version "5.0.1"
|
||||||
resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
|
resolved "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz"
|
||||||
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
||||||
|
@ -7164,6 +7370,15 @@ jsonfile@^4.0.0:
|
||||||
optionalDependencies:
|
optionalDependencies:
|
||||||
graceful-fs "^4.1.6"
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
|
jsonfile@^6.0.1:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae"
|
||||||
|
integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==
|
||||||
|
dependencies:
|
||||||
|
universalify "^2.0.0"
|
||||||
|
optionalDependencies:
|
||||||
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
jsonify@~0.0.0:
|
jsonify@~0.0.0:
|
||||||
version "0.0.0"
|
version "0.0.0"
|
||||||
resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz"
|
resolved "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz"
|
||||||
|
@ -7407,6 +7622,15 @@ loader-utils@^1.0.0, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4
|
||||||
emojis-list "^3.0.0"
|
emojis-list "^3.0.0"
|
||||||
json5 "^1.0.1"
|
json5 "^1.0.1"
|
||||||
|
|
||||||
|
loader-utils@^2.0.0:
|
||||||
|
version "2.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.2.tgz#d6e3b4fb81870721ae4e0868ab11dd638368c129"
|
||||||
|
integrity sha512-TM57VeHptv569d/GKh6TAYdzKblwDNiumOdkFnejjD0XwTH87K90w3O7AiJRqdQoXygvi1VQTJTLGhJl7WqA7A==
|
||||||
|
dependencies:
|
||||||
|
big.js "^5.2.2"
|
||||||
|
emojis-list "^3.0.0"
|
||||||
|
json5 "^2.1.2"
|
||||||
|
|
||||||
localtunnel@^2.0.0:
|
localtunnel@^2.0.0:
|
||||||
version "2.0.0"
|
version "2.0.0"
|
||||||
resolved "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.0.tgz"
|
resolved "https://registry.npmjs.org/localtunnel/-/localtunnel-2.0.0.tgz"
|
||||||
|
@ -7815,6 +8039,13 @@ lru-cache@^5.1.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
yallist "^3.0.2"
|
yallist "^3.0.2"
|
||||||
|
|
||||||
|
lru-cache@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||||
|
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||||
|
dependencies:
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
lz-string@^1.4.4:
|
lz-string@^1.4.4:
|
||||||
version "1.4.4"
|
version "1.4.4"
|
||||||
resolved "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz"
|
resolved "https://registry.npmjs.org/lz-string/-/lz-string-1.4.4.tgz"
|
||||||
|
@ -7896,6 +8127,13 @@ matchdep@^2.0.0:
|
||||||
resolve "^1.4.0"
|
resolve "^1.4.0"
|
||||||
stack-trace "0.0.10"
|
stack-trace "0.0.10"
|
||||||
|
|
||||||
|
matcher@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca"
|
||||||
|
integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==
|
||||||
|
dependencies:
|
||||||
|
escape-string-regexp "^4.0.0"
|
||||||
|
|
||||||
md5.js@^1.3.4:
|
md5.js@^1.3.4:
|
||||||
version "1.3.5"
|
version "1.3.5"
|
||||||
resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz"
|
resolved "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz"
|
||||||
|
@ -8144,6 +8382,11 @@ minimist@^1.2.5:
|
||||||
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
|
resolved "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz"
|
||||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||||
|
|
||||||
|
minimist@^1.2.6:
|
||||||
|
version "1.2.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
||||||
|
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
||||||
|
|
||||||
minimist@~0.0.1:
|
minimist@~0.0.1:
|
||||||
version "0.0.10"
|
version "0.0.10"
|
||||||
resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz"
|
resolved "https://registry.npmjs.org/minimist/-/minimist-0.0.10.tgz"
|
||||||
|
@ -8218,9 +8461,9 @@ ms@2.0.0:
|
||||||
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
resolved "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz"
|
||||||
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||||
|
|
||||||
ms@^2.1.1:
|
ms@2.1.2, ms@^2.1.1:
|
||||||
version "2.1.2"
|
version "2.1.2"
|
||||||
resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz"
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||||
|
|
||||||
multipipe@^0.1.0, multipipe@^0.1.2:
|
multipipe@^0.1.0, multipipe@^0.1.2:
|
||||||
|
@ -8428,7 +8671,7 @@ now-and-later@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
once "^1.3.2"
|
once "^1.3.2"
|
||||||
|
|
||||||
npm-conf@^1.1.0:
|
npm-conf@^1.1.0, npm-conf@^1.1.3:
|
||||||
version "1.1.3"
|
version "1.1.3"
|
||||||
resolved "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz"
|
resolved "https://registry.npmjs.org/npm-conf/-/npm-conf-1.1.3.tgz"
|
||||||
integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==
|
integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==
|
||||||
|
@ -9211,7 +9454,7 @@ pkginfo@0.3.x:
|
||||||
resolved "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz"
|
resolved "https://registry.npmjs.org/pkginfo/-/pkginfo-0.3.1.tgz"
|
||||||
integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=
|
integrity sha1-Wyn2qB9wcXFC4J52W76rl7T4HiE=
|
||||||
|
|
||||||
plist@^3.0.0, plist@^3.0.1:
|
plist@^3.0.0:
|
||||||
version "3.0.1"
|
version "3.0.1"
|
||||||
resolved "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz"
|
resolved "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz"
|
||||||
integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==
|
integrity sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==
|
||||||
|
@ -9220,6 +9463,14 @@ plist@^3.0.0, plist@^3.0.1:
|
||||||
xmlbuilder "^9.0.7"
|
xmlbuilder "^9.0.7"
|
||||||
xmldom "0.1.x"
|
xmldom "0.1.x"
|
||||||
|
|
||||||
|
plist@^3.0.1, plist@^3.0.5:
|
||||||
|
version "3.0.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/plist/-/plist-3.0.5.tgz#2cbeb52d10e3cdccccf0c11a63a85d830970a987"
|
||||||
|
integrity sha512-83vX4eYdQp3vP9SxuYgEM/G/pJQqLUz/V/xzPrzruLs7fz7jxGQ1msZ/mg1nwZxUSuOp4sb+/bEIbRrbzZRxDA==
|
||||||
|
dependencies:
|
||||||
|
base64-js "^1.5.1"
|
||||||
|
xmlbuilder "^9.0.7"
|
||||||
|
|
||||||
plugin-error@1.0.1, plugin-error@^1.0.1:
|
plugin-error@1.0.1, plugin-error@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz"
|
resolved "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz"
|
||||||
|
@ -10034,7 +10285,7 @@ progress@^1.1.8:
|
||||||
resolved "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz"
|
resolved "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz"
|
||||||
integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=
|
integrity sha1-4mDHj2Fhzdmw5WzD4Khd4Xx6V74=
|
||||||
|
|
||||||
progress@^2.0.0:
|
progress@^2.0.0, progress@^2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz"
|
resolved "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz"
|
||||||
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||||
|
@ -10227,10 +10478,20 @@ raw-body@^2.3.2:
|
||||||
iconv-lite "0.4.24"
|
iconv-lite "0.4.24"
|
||||||
unpipe "1.0.0"
|
unpipe "1.0.0"
|
||||||
|
|
||||||
rcedit@^2.0.0:
|
raw-loader@^4.0.2:
|
||||||
version "2.0.0"
|
version "4.0.2"
|
||||||
resolved "https://registry.npmjs.org/rcedit/-/rcedit-2.0.0.tgz"
|
resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6"
|
||||||
integrity sha512-XcFGyEBjhWSsud+R8elwQtGBbVkCf7tAiad+nXo5jc6l2rMf46NfGNwjnmBNneBIZDfq+Npf8lwP371JTONfrw==
|
integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA==
|
||||||
|
dependencies:
|
||||||
|
loader-utils "^2.0.0"
|
||||||
|
schema-utils "^3.0.0"
|
||||||
|
|
||||||
|
rcedit@^3.0.1:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/rcedit/-/rcedit-3.0.1.tgz#ae21b43e49c075f4d84df1929832a12c302f3c90"
|
||||||
|
integrity sha512-XM0Jv40/y4hVAqj/MO70o/IWs4uOsaSoo2mLyk3klFDW+SStLnCtzuQu+1OBTIMGlM8CvaK9ftlYCp6DJ+cMsw==
|
||||||
|
dependencies:
|
||||||
|
cross-spawn-windows-exe "^1.1.0"
|
||||||
|
|
||||||
rcfinder@^0.1.6:
|
rcfinder@^0.1.6:
|
||||||
version "0.1.9"
|
version "0.1.9"
|
||||||
|
@ -10703,13 +10964,6 @@ rimraf@^2.4.0, rimraf@^2.5.4, rimraf@^2.6.2, rimraf@^2.6.3:
|
||||||
dependencies:
|
dependencies:
|
||||||
glob "^7.1.3"
|
glob "^7.1.3"
|
||||||
|
|
||||||
rimraf@^3.0.0:
|
|
||||||
version "3.0.0"
|
|
||||||
resolved "https://registry.npmjs.org/rimraf/-/rimraf-3.0.0.tgz"
|
|
||||||
integrity sha512-NDGVxTsjqfunkds7CqsOiEnxln4Bo7Nddl3XhS4pXg5OzwkLqJ971ZVAAnB+DDLnF76N+VnDEiBHaVV8I06SUg==
|
|
||||||
dependencies:
|
|
||||||
glob "^7.1.3"
|
|
||||||
|
|
||||||
ripemd160@^2.0.0, ripemd160@^2.0.1:
|
ripemd160@^2.0.0, ripemd160@^2.0.1:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz"
|
resolved "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz"
|
||||||
|
@ -10718,6 +10972,18 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
|
||||||
hash-base "^3.0.0"
|
hash-base "^3.0.0"
|
||||||
inherits "^2.0.1"
|
inherits "^2.0.1"
|
||||||
|
|
||||||
|
roarr@^2.15.3:
|
||||||
|
version "2.15.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd"
|
||||||
|
integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==
|
||||||
|
dependencies:
|
||||||
|
boolean "^3.0.1"
|
||||||
|
detect-node "^2.0.4"
|
||||||
|
globalthis "^1.0.1"
|
||||||
|
json-stringify-safe "^5.0.1"
|
||||||
|
semver-compare "^1.0.0"
|
||||||
|
sprintf-js "^1.1.2"
|
||||||
|
|
||||||
run-async@^0.1.0:
|
run-async@^0.1.0:
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz"
|
resolved "https://registry.npmjs.org/run-async/-/run-async-0.1.0.tgz"
|
||||||
|
@ -10790,13 +11056,6 @@ safe-regex@^1.1.0:
|
||||||
resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
|
resolved "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz"
|
||||||
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==
|
||||||
|
|
||||||
sanitize-filename@^1.6.0, sanitize-filename@^1.6.2:
|
|
||||||
version "1.6.3"
|
|
||||||
resolved "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.3.tgz"
|
|
||||||
integrity sha512-y/52Mcy7aw3gRm7IrcGDFx/bCk4AhRh2eI9luHOQM86nZsqwiRkkq2GekHXBBD+SmPidc8i2PqtYZl+pWJ8Oeg==
|
|
||||||
dependencies:
|
|
||||||
truncate-utf8-bytes "^1.0.0"
|
|
||||||
|
|
||||||
sass-lint@^1.12.0:
|
sass-lint@^1.12.0:
|
||||||
version "1.13.1"
|
version "1.13.1"
|
||||||
resolved "https://registry.npmjs.org/sass-lint/-/sass-lint-1.13.1.tgz"
|
resolved "https://registry.npmjs.org/sass-lint/-/sass-lint-1.13.1.tgz"
|
||||||
|
@ -10869,6 +11128,15 @@ schema-utils@^2.6.5:
|
||||||
ajv "^6.12.0"
|
ajv "^6.12.0"
|
||||||
ajv-keywords "^3.4.1"
|
ajv-keywords "^3.4.1"
|
||||||
|
|
||||||
|
schema-utils@^3.0.0:
|
||||||
|
version "3.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281"
|
||||||
|
integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==
|
||||||
|
dependencies:
|
||||||
|
"@types/json-schema" "^7.0.8"
|
||||||
|
ajv "^6.12.5"
|
||||||
|
ajv-keywords "^3.5.2"
|
||||||
|
|
||||||
seek-bzip@^1.0.5:
|
seek-bzip@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz"
|
resolved "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz"
|
||||||
|
@ -10876,6 +11144,11 @@ seek-bzip@^1.0.5:
|
||||||
dependencies:
|
dependencies:
|
||||||
commander "~2.8.1"
|
commander "~2.8.1"
|
||||||
|
|
||||||
|
semver-compare@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||||
|
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
|
||||||
|
|
||||||
semver-greatest-satisfied-range@^1.1.0:
|
semver-greatest-satisfied-range@^1.1.0:
|
||||||
version "1.1.0"
|
version "1.1.0"
|
||||||
resolved "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz"
|
resolved "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz"
|
||||||
|
@ -10905,11 +11178,18 @@ semver@^4.1.0:
|
||||||
resolved "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
|
resolved "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz"
|
||||||
integrity sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=
|
integrity sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=
|
||||||
|
|
||||||
semver@^6.0.0, semver@^6.3.0:
|
semver@^6.0.0, semver@^6.2.0, semver@^6.3.0:
|
||||||
version "6.3.0"
|
version "6.3.0"
|
||||||
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
|
resolved "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz"
|
||||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||||
|
|
||||||
|
semver@^7.1.3, semver@^7.3.2:
|
||||||
|
version "7.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
|
||||||
|
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
send@0.16.2:
|
send@0.16.2:
|
||||||
version "0.16.2"
|
version "0.16.2"
|
||||||
resolved "https://registry.npmjs.org/send/-/send-0.16.2.tgz"
|
resolved "https://registry.npmjs.org/send/-/send-0.16.2.tgz"
|
||||||
|
@ -10934,10 +11214,12 @@ sequencify@~0.0.7:
|
||||||
resolved "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz"
|
resolved "https://registry.npmjs.org/sequencify/-/sequencify-0.0.7.tgz"
|
||||||
integrity sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=
|
integrity sha1-kM/xnQLgcCf9dn9erT57ldHnOAw=
|
||||||
|
|
||||||
serialize-error@^3.0.0:
|
serialize-error@^7.0.1:
|
||||||
version "3.0.0"
|
version "7.0.1"
|
||||||
resolved "https://registry.npmjs.org/serialize-error/-/serialize-error-3.0.0.tgz"
|
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18"
|
||||||
integrity sha512-+y3nkkG/go1Vdw+2f/+XUXM1DXX1XcxTl99FfiD/OEPUNw4uo0i6FKABfTAN5ZcgGtjTRZcEbxcE/jtXbEY19A==
|
integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==
|
||||||
|
dependencies:
|
||||||
|
type-fest "^0.13.1"
|
||||||
|
|
||||||
serialize-javascript@^3.1.0:
|
serialize-javascript@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
|
@ -11304,6 +11586,11 @@ split-string@^3.0.1, split-string@^3.0.2:
|
||||||
dependencies:
|
dependencies:
|
||||||
extend-shallow "^3.0.0"
|
extend-shallow "^3.0.0"
|
||||||
|
|
||||||
|
sprintf-js@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
|
||||||
|
integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
|
||||||
|
|
||||||
sprintf-js@~1.0.2:
|
sprintf-js@~1.0.2:
|
||||||
version "1.0.3"
|
version "1.0.3"
|
||||||
resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
|
resolved "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz"
|
||||||
|
@ -11657,7 +11944,7 @@ strip-json-comments@~1.0.1:
|
||||||
resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz"
|
resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz"
|
||||||
integrity sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=
|
integrity sha1-HhX7ysl9Pumb8tc7TGVrCCu6+5E=
|
||||||
|
|
||||||
strip-outer@^1.0.0:
|
strip-outer@^1.0.0, strip-outer@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
resolved "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz"
|
resolved "https://registry.npmjs.org/strip-outer/-/strip-outer-1.0.1.tgz"
|
||||||
integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
|
integrity sha512-k55yxKHwaXnpYGsOzg4Vl8+tDrWylxDEpknGjhTiZB8dFRU5rTo9CAzeycivxV3s+zlTKwrs6WxMxR95n26kwg==
|
||||||
|
@ -11680,10 +11967,10 @@ stylehacks@^4.0.0:
|
||||||
postcss "^7.0.0"
|
postcss "^7.0.0"
|
||||||
postcss-selector-parser "^3.0.0"
|
postcss-selector-parser "^3.0.0"
|
||||||
|
|
||||||
sumchecker@^3.0.0:
|
sumchecker@^3.0.1:
|
||||||
version "3.0.0"
|
version "3.0.1"
|
||||||
resolved "https://registry.npmjs.org/sumchecker/-/sumchecker-3.0.0.tgz"
|
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
|
||||||
integrity sha512-yreseuC/z4iaodVoq07XULEOO9p4jnQazO7mbrnDSvWAU/y2cbyIKs+gWJptfcGu9R+1l27K8Rkj0bfvqnBpgQ==
|
integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==
|
||||||
dependencies:
|
dependencies:
|
||||||
debug "^4.1.0"
|
debug "^4.1.0"
|
||||||
|
|
||||||
|
@ -11997,21 +12284,6 @@ tinycolor2@^1.4.1:
|
||||||
resolved "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz"
|
resolved "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz"
|
||||||
integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=
|
integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=
|
||||||
|
|
||||||
tmp-promise@^1.0.5:
|
|
||||||
version "1.1.0"
|
|
||||||
resolved "https://registry.npmjs.org/tmp-promise/-/tmp-promise-1.1.0.tgz"
|
|
||||||
integrity sha512-8+Ah9aB1IRXCnIOxXZ0uFozV1nMU5xiu7hhFVUSxZ3bYu+psD4TzagCzVbexUCgNNGJnsmNDQlS4nG3mTyoNkw==
|
|
||||||
dependencies:
|
|
||||||
bluebird "^3.5.0"
|
|
||||||
tmp "0.1.0"
|
|
||||||
|
|
||||||
tmp@0.1.0:
|
|
||||||
version "0.1.0"
|
|
||||||
resolved "https://registry.npmjs.org/tmp/-/tmp-0.1.0.tgz"
|
|
||||||
integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw==
|
|
||||||
dependencies:
|
|
||||||
rimraf "^2.6.3"
|
|
||||||
|
|
||||||
tmp@^0.0.33:
|
tmp@^0.0.33:
|
||||||
version "0.0.33"
|
version "0.0.33"
|
||||||
resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz"
|
resolved "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz"
|
||||||
|
@ -12096,6 +12368,18 @@ to-through@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
through2 "^2.0.3"
|
through2 "^2.0.3"
|
||||||
|
|
||||||
|
tobspr-osx-sign@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/tobspr-osx-sign/-/tobspr-osx-sign-1.0.1.tgz#5cca32185d813357b556a6a839305558656c45d5"
|
||||||
|
integrity sha512-jXSw9n/ivAnHwwpImvHnTkhbeI06ZDvLKLP3rryZLBoAt1nfljoIEgdPz7vNlOUBGwVEYOl2VauViNOmZPNZ7A==
|
||||||
|
dependencies:
|
||||||
|
compare-version "^0.1.2"
|
||||||
|
debug "^4.3.4"
|
||||||
|
fs-extra "^10.0.0"
|
||||||
|
isbinaryfile "^4.0.8"
|
||||||
|
minimist "^1.2.6"
|
||||||
|
plist "^3.0.5"
|
||||||
|
|
||||||
toidentifier@1.0.0:
|
toidentifier@1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz"
|
||||||
|
@ -12146,13 +12430,6 @@ trim@^0.0.1:
|
||||||
resolved "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz"
|
resolved "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz"
|
||||||
integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0=
|
integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0=
|
||||||
|
|
||||||
truncate-utf8-bytes@^1.0.0:
|
|
||||||
version "1.0.2"
|
|
||||||
resolved "https://registry.npmjs.org/truncate-utf8-bytes/-/truncate-utf8-bytes-1.0.2.tgz"
|
|
||||||
integrity sha1-QFkjkJWS1W94pYGENLC3hInKXys=
|
|
||||||
dependencies:
|
|
||||||
utf8-byte-length "^1.0.1"
|
|
||||||
|
|
||||||
tslib@^1.9.0:
|
tslib@^1.9.0:
|
||||||
version "1.10.0"
|
version "1.10.0"
|
||||||
resolved "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz"
|
resolved "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz"
|
||||||
|
@ -12170,6 +12447,11 @@ tunnel-agent@^0.6.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
safe-buffer "^5.0.1"
|
safe-buffer "^5.0.1"
|
||||||
|
|
||||||
|
tunnel@^0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
|
||||||
|
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
||||||
|
|
||||||
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
tweetnacl@^0.14.3, tweetnacl@~0.14.0:
|
||||||
version "0.14.5"
|
version "0.14.5"
|
||||||
resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz"
|
resolved "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz"
|
||||||
|
@ -12187,6 +12469,11 @@ type-fest@^0.11.0:
|
||||||
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz"
|
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz"
|
||||||
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
||||||
|
|
||||||
|
type-fest@^0.13.1:
|
||||||
|
version "0.13.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||||
|
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
|
||||||
|
|
||||||
type-is@~1.5.1:
|
type-is@~1.5.1:
|
||||||
version "1.5.7"
|
version "1.5.7"
|
||||||
resolved "https://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz"
|
resolved "https://registry.npmjs.org/type-is/-/type-is-1.5.7.tgz"
|
||||||
|
@ -12341,6 +12628,11 @@ universalify@^0.1.0:
|
||||||
resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz"
|
resolved "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz"
|
||||||
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||||
|
|
||||||
|
universalify@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
|
||||||
|
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
|
||||||
|
|
||||||
unpipe@1.0.0, unpipe@~1.0.0:
|
unpipe@1.0.0, unpipe@~1.0.0:
|
||||||
version "1.0.0"
|
version "1.0.0"
|
||||||
resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
|
resolved "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz"
|
||||||
|
@ -12436,11 +12728,6 @@ user-home@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
os-homedir "^1.0.0"
|
os-homedir "^1.0.0"
|
||||||
|
|
||||||
utf8-byte-length@^1.0.1:
|
|
||||||
version "1.0.4"
|
|
||||||
resolved "https://registry.npmjs.org/utf8-byte-length/-/utf8-byte-length-1.0.4.tgz"
|
|
||||||
integrity sha1-9F8VDExm7uloGGUFq5P8u4rWv2E=
|
|
||||||
|
|
||||||
utif@^2.0.1:
|
utif@^2.0.1:
|
||||||
version "2.0.1"
|
version "2.0.1"
|
||||||
resolved "https://registry.npmjs.org/utif/-/utif-2.0.1.tgz"
|
resolved "https://registry.npmjs.org/utif/-/utif-2.0.1.tgz"
|
||||||
|
@ -12839,7 +13126,7 @@ which@^1.1.1, which@^1.2.14, which@^1.2.9, which@^1.3.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
isexe "^2.0.0"
|
isexe "^2.0.0"
|
||||||
|
|
||||||
which@^2.0.1:
|
which@^2.0.1, which@^2.0.2:
|
||||||
version "2.0.2"
|
version "2.0.2"
|
||||||
resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz"
|
resolved "https://registry.npmjs.org/which/-/which-2.0.2.tgz"
|
||||||
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
|
integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==
|
||||||
|
@ -13043,6 +13330,11 @@ yallist@^3.0.2:
|
||||||
resolved "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz"
|
resolved "https://registry.npmjs.org/yallist/-/yallist-3.0.3.tgz"
|
||||||
integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
|
integrity sha512-S+Zk8DEWE6oKpV+vI3qWkaK+jSbIK86pCwe2IF/xwIpQ8jEuxpw9NyaGjmp9+BoJv5FV2piqCDcoCtStppiq2A==
|
||||||
|
|
||||||
|
yallist@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||||
|
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||||
|
|
||||||
yaml-loader@^0.6.0:
|
yaml-loader@^0.6.0:
|
||||||
version "0.6.0"
|
version "0.6.0"
|
||||||
resolved "https://registry.npmjs.org/yaml-loader/-/yaml-loader-0.6.0.tgz"
|
resolved "https://registry.npmjs.org/yaml-loader/-/yaml-loader-0.6.0.tgz"
|
||||||
|
@ -13064,7 +13356,7 @@ yargs-parser@5.0.0-security.0:
|
||||||
camelcase "^3.0.0"
|
camelcase "^3.0.0"
|
||||||
object.assign "^4.1.0"
|
object.assign "^4.1.0"
|
||||||
|
|
||||||
yargs-parser@^13.0.0, yargs-parser@^13.1.0, yargs-parser@^13.1.1:
|
yargs-parser@^13.1.0, yargs-parser@^13.1.1:
|
||||||
version "13.1.1"
|
version "13.1.1"
|
||||||
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz"
|
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz"
|
||||||
integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==
|
integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==
|
||||||
|
@ -13080,6 +13372,11 @@ yargs-parser@^18.1.2:
|
||||||
camelcase "^5.0.0"
|
camelcase "^5.0.0"
|
||||||
decamelize "^1.2.0"
|
decamelize "^1.2.0"
|
||||||
|
|
||||||
|
yargs-parser@^20.0.0:
|
||||||
|
version "20.2.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee"
|
||||||
|
integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==
|
||||||
|
|
||||||
yargs@13.2.4:
|
yargs@13.2.4:
|
||||||
version "13.2.4"
|
version "13.2.4"
|
||||||
resolved "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz"
|
resolved "https://registry.npmjs.org/yargs/-/yargs-13.2.4.tgz"
|
||||||
|
@ -13156,7 +13453,7 @@ yargs@~1.2.6:
|
||||||
dependencies:
|
dependencies:
|
||||||
minimist "^0.1.0"
|
minimist "^0.1.0"
|
||||||
|
|
||||||
yauzl@^2.4.2:
|
yauzl@^2.10.0, yauzl@^2.4.2:
|
||||||
version "2.10.0"
|
version "2.10.0"
|
||||||
resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz"
|
resolved "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz"
|
||||||
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
# shapez.io Modding
|
||||||
|
|
||||||
|
## General Instructions
|
||||||
|
|
||||||
|
Currently there are two options to develop mods for shapez.io:
|
||||||
|
|
||||||
|
1. Writing single file mods, which doesn't require any additional tools and can be loaded directly in the game
|
||||||
|
2. Using the [create-shapezio-mod](https://www.npmjs.com/package/create-shapezio-mod) package. This package is still in development but allows you to pack multiple files and images into a single mod file, so you don't have to base64 encode your images etc.
|
||||||
|
|
||||||
|
## Mod Developer Discord
|
||||||
|
|
||||||
|
A great place to get help with mod development is the official [shapez.io modloader discord](https://discord.gg/xq5v8uyMue).
|
||||||
|
|
||||||
|
## Setting up your development environment
|
||||||
|
|
||||||
|
The simplest way of developing mods is by just creating a `mymod.js` file and putting it in the `mods/` folder of the standalone (You can find the `mods/` folder by clicking "Open Mods Folder" in the shapez Standalone, be sure to select the 1.5.0-modloader branch on Steam).
|
||||||
|
|
||||||
|
You can then add `--dev` to the launch options on Steam. This adds an application menu where you can click "Restart" to reload your mod, and will also show the developer console where you can see any potential errors.
|
||||||
|
|
||||||
|
## Getting started
|
||||||
|
|
||||||
|
To get into shapez.io modding, I highly recommend checking out all of the examples in this folder. Here's a list of examples and what features of the modloader they show:
|
||||||
|
|
||||||
|
| Example | Description | Demonstrates |
|
||||||
|
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
|
||||||
|
| [base.js](base.js) | The most basic mod | Base structure of a mod |
|
||||||
|
| [class_extensions.js](class_extensions.js) | Shows how to extend multiple methods of one class at once, useful for overriding a lot of methods | Overriding and extending builtin methods |
|
||||||
|
| [custom_css.js](custom_css.js) | Modifies the Main Menu State look | Modifying the UI styles with CSS |
|
||||||
|
| [replace_builtin_sprites.js](replace_builtin_sprites.js) | Replaces all color sprites with icons | Replacing builtin sprites |
|
||||||
|
| [translations.js](translations.js) | Shows how to replace and add new translations in multiple languages | Adding and replacing translations |
|
||||||
|
| [add_building_basic.js](add_building_basic.js) | Shows how to add a new building | Registering a new building |
|
||||||
|
| [add_building_flipper.js](add_building_flipper.js) | Adds a "flipper" building which mirrors shapes from top to bottom | Registering a new building, Adding a custom shape and item processing operation (flip) |
|
||||||
|
| [custom_drawing.js](custom_drawing.js) | Displays a a small indicator on every item processing building whether it is currently working | Adding a new GameSystem and drawing overlays |
|
||||||
|
| [custom_keybinding.js](custom_keybinding.js) | Adds a new customizable ingame keybinding (Shift+F) | Adding a new keybinding |
|
||||||
|
| [custom_sub_shapes.js](custom_sub_shapes.js) | Adds a new type of sub-shape (Line) | Adding a new sub shape and drawing it, making it spawn on the map, modifying the builtin levels |
|
||||||
|
| [modify_theme.js](modify_theme.js) | Modifies the default game themes | Modifying the builtin themes |
|
||||||
|
| [custom_theme.js](custom_theme.js) | Adds a new UI and map theme | Adding a new game theme |
|
||||||
|
| [mod_settings.js](mod_settings.js) | Shows a dialog counting how often the mod has been launched | Reading and storing mod settings |
|
||||||
|
| [storing_data_in_savegame.js](storing_data_in_savegame.js) | Shows how to store custom (structured) data in the savegame | Storing custom data in savegame |
|
||||||
|
| [modify_existing_building.js](modify_existing_building.js) | Makes the rotator building always unlocked and adds a new statistic to the building panel | Modifying a builtin building, replacing builtin methods |
|
||||||
|
| [modify_ui.js](modify_ui.js) | Shows how to add custom UI elements to builtin game states (the Main Menu in this case) | Extending builtin UI states, Adding CSS |
|
||||||
|
| [pasting.js](pasting.js) | Shows a dialog when pasting text in the game | Listening to paste events |
|
||||||
|
| [smooth_zooming.js](smooth_zooming.js) | Allows to smoothly zoom in and out | Keybindings, overriding methods |
|
||||||
|
| [sandbox.js](sandbox.js) | Makes blueprints free and always unlocked | Overriding builtin methods |
|
||||||
|
|
||||||
|
### Advanced Examples
|
||||||
|
|
||||||
|
| Example | Description | Demonstrates |
|
||||||
|
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
|
| [notification_blocks.js](notification_blocks.js) | Adds a notification block building, which shows a user defined notification when receiving a truthy signal | Adding a new Component, Adding a new GameSystem, Working with wire networks, Adding a new building, Adding a new HUD part, Using Input Dialogs, Adding Translations |
|
||||||
|
| [usage_statistics.js](usage_statistics.js) | Displays a percentage on every building showing its utilization | Adding a new component, Adding a new GameSystem, Drawing within a GameSystem, Modifying builtin buildings, Adding custom game logic |
|
||||||
|
| [new_item_type.js](new_item_type.js) | Adds a new type of items to the map (fluids) | Adding a new item type, modifying map generation |
|
||||||
|
| [buildings_have_cost.js](buildings_have_cost.js) | Adds a new currency, and belts cost 1 of that currency | Extending and replacing builtin methods, Adding CSS and custom sprites |
|
||||||
|
| [mirrored_cutter.js](mirrored_cutter.js) | Adds a mirrored variant of the cutter | Adding a new variant to existing buildings |
|
||||||
|
|
||||||
|
### Creating new sprites
|
||||||
|
|
||||||
|
If you want to add new buildings and create sprites for them, you can download the original Photoshop PSD files here: https://static.shapez.io/building-psds.zip
|
|
@ -0,0 +1,20 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Base",
|
||||||
|
version: "1",
|
||||||
|
id: "base",
|
||||||
|
description: "The most basic mod",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Start the modding here
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Class Extensions",
|
||||||
|
version: "1",
|
||||||
|
id: "class-extensions",
|
||||||
|
description: "Shows how to extend builtin classes",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
const BeltExtension = ({ $super, $old }) => ({
|
||||||
|
getShowWiresLayerPreview() {
|
||||||
|
// Access the old method
|
||||||
|
return !$old.getShowWiresLayerPreview();
|
||||||
|
},
|
||||||
|
|
||||||
|
getIsReplaceable(variant, rotationVariant) {
|
||||||
|
// Instead of super, use $super
|
||||||
|
return $super.getIsReplaceable.call(this, variant, rotationVariant);
|
||||||
|
},
|
||||||
|
|
||||||
|
getIsRemoveable() {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
this.modInterface.extendClass(shapez.MetaBeltBuilding, BeltExtension);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: custom drawing",
|
||||||
|
version: "1",
|
||||||
|
id: "base",
|
||||||
|
description: "Displays an indicator on every item processing building when its working",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class ItemProcessorStatusGameSystem extends shapez.GameSystem {
|
||||||
|
drawChunk(parameters, chunk) {
|
||||||
|
const contents = chunk.containedEntitiesByLayer.regular;
|
||||||
|
for (let i = 0; i < contents.length; ++i) {
|
||||||
|
const entity = contents[i];
|
||||||
|
const processorComp = entity.components.ItemProcessor;
|
||||||
|
if (!processorComp) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const staticComp = entity.components.StaticMapEntity;
|
||||||
|
|
||||||
|
const context = parameters.context;
|
||||||
|
const center = staticComp.getTileSpaceBounds().getCenter().toWorldSpace();
|
||||||
|
|
||||||
|
// Culling for better performance
|
||||||
|
if (parameters.visibleRect.containsCircle(center.x, center.y, 40)) {
|
||||||
|
// Circle
|
||||||
|
context.fillStyle = processorComp.ongoingCharges.length === 0 ? "#aaa" : "#53cf47";
|
||||||
|
context.strokeStyle = "#000";
|
||||||
|
context.lineWidth = 1;
|
||||||
|
|
||||||
|
context.beginCircle(center.x + 5, center.y + 5, 4);
|
||||||
|
context.fill();
|
||||||
|
context.stroke();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Register our game system
|
||||||
|
this.modInterface.registerGameSystem({
|
||||||
|
id: "item_processor_status",
|
||||||
|
systemClass: ItemProcessorStatusGameSystem,
|
||||||
|
|
||||||
|
// Specify at which point the update method will be called,
|
||||||
|
// in this case directly before the belt system. You can use
|
||||||
|
// before: "end" to make it the last system
|
||||||
|
before: "belt",
|
||||||
|
|
||||||
|
// Specify where our drawChunk method should be called, check out
|
||||||
|
// map_chunk_view
|
||||||
|
drawHooks: ["staticAfter"],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,32 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Custom Keybindings",
|
||||||
|
version: "1",
|
||||||
|
id: "base",
|
||||||
|
description: "Shows how to add a new keybinding",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Register keybinding
|
||||||
|
this.modInterface.registerIngameKeybinding({
|
||||||
|
id: "demo_mod_binding",
|
||||||
|
keyCode: shapez.keyToKeyCode("F"),
|
||||||
|
translation: "Do something (always with SHIFT)",
|
||||||
|
modifiers: {
|
||||||
|
shift: true,
|
||||||
|
},
|
||||||
|
handler: root => {
|
||||||
|
this.dialogs.showInfo("Mod Message", "It worked!");
|
||||||
|
return shapez.STOP_PROPAGATION;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Custom Sub Shapes",
|
||||||
|
version: "1",
|
||||||
|
id: "custom-sub-shapes",
|
||||||
|
description: "Shows how to add custom sub shapes",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Add a new type of sub shape ("Line", short code "L")
|
||||||
|
this.modInterface.registerSubShapeType({
|
||||||
|
id: "line",
|
||||||
|
shortCode: "L",
|
||||||
|
|
||||||
|
// Make it spawn on the map
|
||||||
|
weightComputation: distanceToOriginInChunks =>
|
||||||
|
Math.round(20 + Math.max(Math.min(distanceToOriginInChunks, 30), 0)),
|
||||||
|
|
||||||
|
// This defines how to draw it
|
||||||
|
draw: ({ context, quadrantSize, layerScale }) => {
|
||||||
|
const quadrantHalfSize = quadrantSize / 2;
|
||||||
|
context.beginPath();
|
||||||
|
context.moveTo(-quadrantHalfSize, quadrantHalfSize);
|
||||||
|
context.arc(
|
||||||
|
-quadrantHalfSize,
|
||||||
|
quadrantHalfSize,
|
||||||
|
quadrantSize * layerScale,
|
||||||
|
-Math.PI * 0.25,
|
||||||
|
0
|
||||||
|
);
|
||||||
|
context.closePath();
|
||||||
|
context.fill();
|
||||||
|
context.stroke();
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Modify the goal of the first level to add our goal
|
||||||
|
this.signals.modifyLevelDefinitions.add(definitions => {
|
||||||
|
definitions[0].shape = "LuLuLuLu";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Custom Game Theme",
|
||||||
|
version: "1",
|
||||||
|
id: "custom-theme",
|
||||||
|
description: "Shows how to add a custom game theme",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
this.modInterface.registerGameTheme({
|
||||||
|
id: "my-theme",
|
||||||
|
name: "My fancy theme",
|
||||||
|
theme: RESOURCES["my-theme.json"],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const RESOURCES = {
|
||||||
|
"my-theme.json": {
|
||||||
|
map: {
|
||||||
|
background: "#abc",
|
||||||
|
grid: "#ccc",
|
||||||
|
gridLineWidth: 1,
|
||||||
|
|
||||||
|
selectionOverlay: "rgba(74, 163, 223, 0.7)",
|
||||||
|
selectionOutline: "rgba(74, 163, 223, 0.5)",
|
||||||
|
selectionBackground: "rgba(74, 163, 223, 0.2)",
|
||||||
|
|
||||||
|
chunkBorders: "rgba(0, 30, 50, 0.03)",
|
||||||
|
|
||||||
|
directionLock: {
|
||||||
|
regular: {
|
||||||
|
color: "rgb(74, 237, 134)",
|
||||||
|
background: "rgba(74, 237, 134, 0.2)",
|
||||||
|
},
|
||||||
|
wires: {
|
||||||
|
color: "rgb(74, 237, 134)",
|
||||||
|
background: "rgba(74, 237, 134, 0.2)",
|
||||||
|
},
|
||||||
|
error: {
|
||||||
|
color: "rgb(255, 137, 137)",
|
||||||
|
background: "rgba(255, 137, 137, 0.2)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
colorBlindPickerTile: "rgba(50, 50, 50, 0.4)",
|
||||||
|
|
||||||
|
resources: {
|
||||||
|
shape: "#eaebec",
|
||||||
|
red: "#ffbfc1",
|
||||||
|
green: "#cbffc4",
|
||||||
|
blue: "#bfdaff",
|
||||||
|
},
|
||||||
|
|
||||||
|
chunkOverview: {
|
||||||
|
empty: "#a6afbb",
|
||||||
|
filled: "#c5ccd6",
|
||||||
|
beltColor: "#777",
|
||||||
|
},
|
||||||
|
|
||||||
|
wires: {
|
||||||
|
overlayColor: "rgba(97, 161, 152, 0.75)",
|
||||||
|
previewColor: "rgb(97, 161, 152, 0.4)",
|
||||||
|
highlightColor: "rgba(72, 137, 255, 1)",
|
||||||
|
},
|
||||||
|
|
||||||
|
connectedMiners: {
|
||||||
|
overlay: "rgba(40, 50, 60, 0.5)",
|
||||||
|
textColor: "#fff",
|
||||||
|
textColorCapped: "#ef5072",
|
||||||
|
background: "rgba(40, 50, 60, 0.8)",
|
||||||
|
},
|
||||||
|
|
||||||
|
zone: {
|
||||||
|
borderSolid: "rgba(23, 192, 255, 1)",
|
||||||
|
outerColor: "rgba(240, 240, 255, 0.5)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
items: {
|
||||||
|
outline: "#55575a",
|
||||||
|
outlineWidth: 0.75,
|
||||||
|
circleBackground: "rgba(40, 50, 65, 0.1)",
|
||||||
|
},
|
||||||
|
|
||||||
|
shapeTooltip: {
|
||||||
|
background: "#dee1ea",
|
||||||
|
outline: "#54565e",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
|
@ -0,0 +1,32 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Mod Settings",
|
||||||
|
version: "1",
|
||||||
|
id: "mod-settings",
|
||||||
|
description: "Shows how to add settings to your mod",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
settings: {
|
||||||
|
timesLaunched: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Increment the setting every time we launch the mod
|
||||||
|
this.settings.timesLaunched++;
|
||||||
|
this.saveSettings();
|
||||||
|
|
||||||
|
// Show a dialog in the main menu with the settings
|
||||||
|
this.signals.stateEntered.add(state => {
|
||||||
|
if (state instanceof shapez.MainMenuState) {
|
||||||
|
this.dialogs.showInfo(
|
||||||
|
"Welcome back",
|
||||||
|
`You have launched this mod ${this.settings.timesLaunched} times`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Modify existing building",
|
||||||
|
version: "1",
|
||||||
|
id: "modify-existing-building",
|
||||||
|
description: "Shows how to modify an existing building",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Make Rotator always unlocked
|
||||||
|
this.modInterface.replaceMethod(shapez.MetaRotaterBuilding, "getIsUnlocked", function () {
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add some custom stats to the info panel when selecting the building
|
||||||
|
this.modInterface.replaceMethod(shapez.MetaRotaterBuilding, "getAdditionalStatistics", function (
|
||||||
|
root,
|
||||||
|
variant
|
||||||
|
) {
|
||||||
|
return [["Awesomeness", 5]];
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,24 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Modify Builtin Themes",
|
||||||
|
version: "1",
|
||||||
|
id: "modify-theme",
|
||||||
|
description: "Shows how to modify builtin themes",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
shapez.THEMES.light.map.background = "#eee";
|
||||||
|
shapez.THEMES.light.items.outline = "#000";
|
||||||
|
|
||||||
|
shapez.THEMES.dark.map.background = "#245";
|
||||||
|
shapez.THEMES.dark.items.outline = "#fff";
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Modify UI",
|
||||||
|
version: "1",
|
||||||
|
id: "modify-ui",
|
||||||
|
description: "Shows how to modify a builtin game state, in this case the main menu",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Add fancy sign to main menu
|
||||||
|
this.signals.stateEntered.add(state => {
|
||||||
|
if (state.key === "MainMenuState") {
|
||||||
|
const element = document.createElement("div");
|
||||||
|
element.id = "demo_mod_hello_world_element";
|
||||||
|
document.body.appendChild(element);
|
||||||
|
|
||||||
|
const button = document.createElement("button");
|
||||||
|
button.classList.add("styledButton");
|
||||||
|
button.innerText = "Hello!";
|
||||||
|
button.addEventListener("click", () => {
|
||||||
|
this.dialogs.showInfo("Mod Message", "Button clicked!");
|
||||||
|
});
|
||||||
|
element.appendChild(button);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
this.modInterface.registerCss(`
|
||||||
|
#demo_mod_hello_world_element {
|
||||||
|
position: absolute;
|
||||||
|
top: calc(10px * var(--ui-scale));
|
||||||
|
left: calc(10px * var(--ui-scale));
|
||||||
|
color: red;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,23 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Pasting",
|
||||||
|
version: "1",
|
||||||
|
id: "pasting",
|
||||||
|
description: "Shows how to properly receive paste events ingame",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
this.signals.gameInitialized.add(root => {
|
||||||
|
root.gameState.inputReciever.paste.add(event => {
|
||||||
|
event.preventDefault();
|
||||||
|
|
||||||
|
const data = event.clipboardData.getData("text");
|
||||||
|
this.dialogs.showInfo("Pasted", `You pasted: '${data}'`);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,21 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Sandbox",
|
||||||
|
version: "1",
|
||||||
|
id: "sandbox",
|
||||||
|
description: "Blueprints are always unlocked and cost no money, also all buildings are unlocked",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
this.modInterface.replaceMethod(shapez.Blueprint, "getCost", function () {
|
||||||
|
return 0;
|
||||||
|
});
|
||||||
|
this.modInterface.replaceMethod(shapez.HubGoals, "isRewardUnlocked", function () {
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,58 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Smooth Zoom",
|
||||||
|
version: "1",
|
||||||
|
id: "smooth_zoom",
|
||||||
|
description: "Allows to zoom in and out smoothly, also disables map overview",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
this.modInterface.registerIngameKeybinding({
|
||||||
|
id: "smooth_zoom_zoom_in",
|
||||||
|
keyCode: shapez.keyToKeyCode("1"),
|
||||||
|
translation: "Zoom In (use with SHIFT)",
|
||||||
|
modifiers: {
|
||||||
|
shift: true,
|
||||||
|
},
|
||||||
|
handler: root => {
|
||||||
|
root.camera.setDesiredZoom(5);
|
||||||
|
return shapez.STOP_PROPAGATION;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
this.modInterface.registerIngameKeybinding({
|
||||||
|
id: "smooth_zoom_zoom_out",
|
||||||
|
keyCode: shapez.keyToKeyCode("0"),
|
||||||
|
translation: "Zoom Out (use with SHIFT)",
|
||||||
|
modifiers: {
|
||||||
|
shift: true,
|
||||||
|
},
|
||||||
|
handler: root => {
|
||||||
|
root.camera.setDesiredZoom(0.1);
|
||||||
|
return shapez.STOP_PROPAGATION;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
this.modInterface.extendClass(shapez.Camera, ({ $old }) => ({
|
||||||
|
internalUpdateZooming(now, dt) {
|
||||||
|
if (!this.currentlyPinching && this.desiredZoom !== null) {
|
||||||
|
const diff = this.zoomLevel - this.desiredZoom;
|
||||||
|
if (Math.abs(diff) > 0.0001) {
|
||||||
|
const speed = 0.0005;
|
||||||
|
let step = Math.sign(diff) * Math.min(speed, Math.abs(diff));
|
||||||
|
const pow = 1 / 2;
|
||||||
|
this.zoomLevel = Math.pow(Math.pow(this.zoomLevel, pow) - step, 1 / pow);
|
||||||
|
} else {
|
||||||
|
this.zoomLevel = this.desiredZoom;
|
||||||
|
this.desiredZoom = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
}));
|
||||||
|
|
||||||
|
shapez.globalConfig.mapChunkOverviewMinZoom = -1;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Storing Data in Savegame",
|
||||||
|
version: "1",
|
||||||
|
id: "storing-savegame-data",
|
||||||
|
description: "Shows how to add custom data to a savegame",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Option 1: For simple data
|
||||||
|
this.signals.gameSerialized.add((root, data) => {
|
||||||
|
data.modExtraData["storing-savegame-data"] = Math.random();
|
||||||
|
});
|
||||||
|
|
||||||
|
this.signals.gameDeserialized.add((root, data) => {
|
||||||
|
alert("The value stored in the savegame was: " + data.modExtraData["storing-savegame-data"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
// Option 2: If you need a structured way of storing data
|
||||||
|
|
||||||
|
class SomeSerializableObject extends shapez.BasicSerializableObject {
|
||||||
|
static getId() {
|
||||||
|
return "SomeSerializableObject";
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSchema() {
|
||||||
|
return {
|
||||||
|
someInt: shapez.types.int,
|
||||||
|
someString: shapez.types.string,
|
||||||
|
someVector: shapez.types.vector,
|
||||||
|
|
||||||
|
// this value is allowed to be null
|
||||||
|
nullableInt: shapez.types.nullable(shapez.types.int),
|
||||||
|
|
||||||
|
// There is a lot more .. be sure to checkout src/js/savegame/serialization.js
|
||||||
|
// You can have maps, classes, arrays etc..
|
||||||
|
// And if you need something specific you can always ask in the modding discord.
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.someInt = 42;
|
||||||
|
this.someString = "Hello World";
|
||||||
|
this.someVector = new shapez.Vector(1, 2);
|
||||||
|
|
||||||
|
this.nullableInt = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store our object in the global game root
|
||||||
|
this.signals.gameInitialized.add(root => {
|
||||||
|
root.myObject = new SomeSerializableObject();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Save it within the savegame
|
||||||
|
this.signals.gameSerialized.add((root, data) => {
|
||||||
|
data.modExtraData["storing-savegame-data-2"] = root.myObject.serialize();
|
||||||
|
});
|
||||||
|
|
||||||
|
// Restore it when the savegame is loaded
|
||||||
|
this.signals.gameDeserialized.add((root, data) => {
|
||||||
|
const errorText = root.myObject.deserialize(data.modExtraData["storing-savegame-data-2"]);
|
||||||
|
if (errorText) {
|
||||||
|
alert("Mod failed to deserialize from savegame: " + errorText);
|
||||||
|
}
|
||||||
|
alert("The other value stored in the savegame (option 2) was " + root.myObject.someInt);
|
||||||
|
});
|
||||||
|
|
||||||
|
////////////////////////////////////////////////////////////////////
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,66 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Translations",
|
||||||
|
version: "1",
|
||||||
|
id: "translations",
|
||||||
|
description: "Shows how to add and modify translations",
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
|
||||||
|
// You can specify this parameter if savegames will still work
|
||||||
|
// after your mod has been uninstalled
|
||||||
|
doesNotAffectSavegame: true,
|
||||||
|
};
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Replace an existing translation in the english language
|
||||||
|
this.modInterface.registerTranslations("en", {
|
||||||
|
ingame: {
|
||||||
|
interactiveTutorial: {
|
||||||
|
title: "Hello",
|
||||||
|
hints: {
|
||||||
|
"1_1_extractor": "World!",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Replace an existing translation in german
|
||||||
|
this.modInterface.registerTranslations("de", {
|
||||||
|
ingame: {
|
||||||
|
interactiveTutorial: {
|
||||||
|
title: "Hallo",
|
||||||
|
hints: {
|
||||||
|
"1_1_extractor": "Welt!",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Add an entirely new translation which is localized in german and english
|
||||||
|
this.modInterface.registerTranslations("en", {
|
||||||
|
mods: {
|
||||||
|
mymod: {
|
||||||
|
test: "Test Translation",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
this.modInterface.registerTranslations("de", {
|
||||||
|
mods: {
|
||||||
|
mymod: {
|
||||||
|
test: "Test Übersetzung",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
// Show a dialog in the main menu
|
||||||
|
this.signals.stateEntered.add(state => {
|
||||||
|
if (state instanceof shapez.MainMenuState) {
|
||||||
|
// Will show differently based on the selected language
|
||||||
|
this.dialogs.showInfo("My translation", shapez.T.mods.mymod.test);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
// @ts-nocheck
|
||||||
|
const METADATA = {
|
||||||
|
website: "https://tobspr.io",
|
||||||
|
author: "tobspr",
|
||||||
|
name: "Mod Example: Usage Statistics",
|
||||||
|
version: "1",
|
||||||
|
id: "usage-statistics",
|
||||||
|
description:
|
||||||
|
"Shows how to add a new component to the game, how to save additional data and how to add custom logic and drawings",
|
||||||
|
|
||||||
|
minimumGameVersion: ">=1.5.0",
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Quick info on how this mod works:
|
||||||
|
*
|
||||||
|
* It tracks how many ticks a building was idle within X seconds to compute
|
||||||
|
* the usage percentage.
|
||||||
|
*
|
||||||
|
* Every tick the logic checks if the building is idle, if so, it increases aggregatedIdleTime.
|
||||||
|
* Once X seconds are over, the aggregatedIdleTime is copied to computedUsage which
|
||||||
|
* is displayed on screen via the UsageStatisticsSystem
|
||||||
|
*/
|
||||||
|
|
||||||
|
const MEASURE_INTERVAL_SECONDS = 5;
|
||||||
|
|
||||||
|
class UsageStatisticsComponent extends shapez.Component {
|
||||||
|
static getId() {
|
||||||
|
return "UsageStatistics";
|
||||||
|
}
|
||||||
|
|
||||||
|
static getSchema() {
|
||||||
|
// Here you define which properties should be saved to the savegame
|
||||||
|
// and get automatically restored
|
||||||
|
return {
|
||||||
|
lastTimestamp: shapez.types.float,
|
||||||
|
computedUsage: shapez.types.float,
|
||||||
|
aggregatedIdleTime: shapez.types.float,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.lastTimestamp = 0;
|
||||||
|
this.computedUsage = 0;
|
||||||
|
this.aggregatedIdleTime = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class UsageStatisticsSystem extends shapez.GameSystemWithFilter {
|
||||||
|
constructor(root) {
|
||||||
|
// By specifying the list of components, `this.allEntities` will only
|
||||||
|
// contain entities which have *all* of the specified components
|
||||||
|
super(root, [UsageStatisticsComponent, shapez.ItemProcessorComponent]);
|
||||||
|
}
|
||||||
|
|
||||||
|
update() {
|
||||||
|
const now = this.root.time.now();
|
||||||
|
for (let i = 0; i < this.allEntities.length; ++i) {
|
||||||
|
const entity = this.allEntities[i];
|
||||||
|
|
||||||
|
const processorComp = entity.components.ItemProcessor;
|
||||||
|
const usageComp = entity.components.UsageStatistics;
|
||||||
|
|
||||||
|
if (now - usageComp.lastTimestamp > MEASURE_INTERVAL_SECONDS) {
|
||||||
|
usageComp.computedUsage = shapez.clamp(
|
||||||
|
1 - usageComp.aggregatedIdleTime / MEASURE_INTERVAL_SECONDS
|
||||||
|
);
|
||||||
|
usageComp.aggregatedIdleTime = 0;
|
||||||
|
usageComp.lastTimestamp = now;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (processorComp.ongoingCharges.length === 0) {
|
||||||
|
usageComp.aggregatedIdleTime += this.root.dynamicTickrate.deltaSeconds;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
drawChunk(parameters, chunk) {
|
||||||
|
const contents = chunk.containedEntitiesByLayer.regular;
|
||||||
|
for (let i = 0; i < contents.length; ++i) {
|
||||||
|
const entity = contents[i];
|
||||||
|
const usageComp = entity.components.UsageStatistics;
|
||||||
|
if (!usageComp) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const staticComp = entity.components.StaticMapEntity;
|
||||||
|
const context = parameters.context;
|
||||||
|
const center = staticComp.getTileSpaceBounds().getCenter().toWorldSpace();
|
||||||
|
|
||||||
|
// Culling for better performance
|
||||||
|
if (parameters.visibleRect.containsCircle(center.x, center.y, 40)) {
|
||||||
|
// Background badge
|
||||||
|
context.fillStyle = "rgba(250, 250, 250, 0.8)";
|
||||||
|
context.beginRoundedRect(center.x - 10, center.y + 3, 20, 8, 2);
|
||||||
|
|
||||||
|
context.fill();
|
||||||
|
|
||||||
|
// Text
|
||||||
|
const usage = usageComp.computedUsage * 100.0;
|
||||||
|
if (usage > 99.99) {
|
||||||
|
context.fillStyle = "green";
|
||||||
|
} else if (usage > 70) {
|
||||||
|
context.fillStyle = "orange";
|
||||||
|
} else {
|
||||||
|
context.fillStyle = "red";
|
||||||
|
}
|
||||||
|
|
||||||
|
context.textAlign = "center";
|
||||||
|
context.font = "7px GameFont";
|
||||||
|
context.fillText(Math.round(usage) + "%", center.x, center.y + 10);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Mod extends shapez.Mod {
|
||||||
|
init() {
|
||||||
|
// Register the component
|
||||||
|
this.modInterface.registerComponent(UsageStatisticsComponent);
|
||||||
|
|
||||||
|
// Add our new component to all item processor buildings so we can see how many items it processed.
|
||||||
|
// You can also inspect the entity with F8
|
||||||
|
const buildings = [
|
||||||
|
shapez.MetaBalancerBuilding,
|
||||||
|
shapez.MetaCutterBuilding,
|
||||||
|
shapez.MetaRotaterBuilding,
|
||||||
|
shapez.MetaStackerBuilding,
|
||||||
|
shapez.MetaMixerBuilding,
|
||||||
|
shapez.MetaPainterBuilding,
|
||||||
|
];
|
||||||
|
|
||||||
|
buildings.forEach(metaClass => {
|
||||||
|
this.modInterface.runAfterMethod(metaClass, "setupEntityComponents", function (entity) {
|
||||||
|
entity.addComponent(new UsageStatisticsComponent());
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Register our game system so we can update and draw stuff
|
||||||
|
this.modInterface.registerGameSystem({
|
||||||
|
id: "demo_mod",
|
||||||
|
systemClass: UsageStatisticsSystem,
|
||||||
|
before: "belt",
|
||||||
|
drawHooks: ["staticAfter"],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
14
package.json
|
@ -2,13 +2,13 @@
|
||||||
"name": "shapez.io",
|
"name": "shapez.io",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"repository": "https://github.com/tobspr/shapez.io",
|
"repository": "https://github.com/tobspr-games/shapez.io",
|
||||||
"author": "Tobias Springer <tobias.springer1@gmail.com>",
|
"author": "tobspr Games <hello@tobspr.io>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "cd gulp && yarn gulp main.serveDev",
|
"dev": "cd gulp && yarn gulp",
|
||||||
"devStandalone": "cd gulp && yarn gulp main.serveStandalone",
|
"devStandalone": "cd gulp && yarn gulp serve.standalone-steam",
|
||||||
"tslint": "cd src/js && tsc",
|
"tslint": "cd src/js && tsc",
|
||||||
"lint": "eslint src/js",
|
"lint": "eslint src/js",
|
||||||
"prettier-all": "prettier --write src/**/*.* && prettier --write gulp/**/*.*",
|
"prettier-all": "prettier --write src/**/*.* && prettier --write gulp/**/*.*",
|
||||||
|
@ -19,13 +19,15 @@
|
||||||
"publishStandalone": "yarn publishOnItch && yarn publishOnSteam",
|
"publishStandalone": "yarn publishOnItch && yarn publishOnSteam",
|
||||||
"publishWeb": "cd gulp && yarn main.deploy.prod",
|
"publishWeb": "cd gulp && yarn main.deploy.prod",
|
||||||
"publish": "yarn publishStandalone && yarn publishWeb",
|
"publish": "yarn publishStandalone && yarn publishWeb",
|
||||||
"syncTranslations": "node sync-translations.js"
|
"syncTranslations": "node sync-translations.js",
|
||||||
|
"buildTypes": "tsc src/js/application.js --declaration --allowJs --emitDeclarationOnly --skipLibCheck --out types.js"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/core": "^7.5.4",
|
"@babel/core": "^7.5.4",
|
||||||
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
"@babel/plugin-transform-block-scoping": "^7.4.4",
|
||||||
"@babel/plugin-transform-classes": "^7.5.5",
|
"@babel/plugin-transform-classes": "^7.5.5",
|
||||||
"@babel/preset-env": "^7.5.4",
|
"@babel/preset-env": "^7.5.4",
|
||||||
|
"@nastyox/rando.js": "^2.0.5",
|
||||||
"@types/cordova": "^0.0.34",
|
"@types/cordova": "^0.0.34",
|
||||||
"@types/filesystem": "^0.0.29",
|
"@types/filesystem": "^0.0.29",
|
||||||
"ajv": "^6.10.2",
|
"ajv": "^6.10.2",
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
"promise-polyfill": "^8.1.0",
|
"promise-polyfill": "^8.1.0",
|
||||||
"query-string": "^6.8.1",
|
"query-string": "^6.8.1",
|
||||||
"rusha": "^0.8.13",
|
"rusha": "^0.8.13",
|
||||||
"serialize-error": "^3.0.0",
|
"semver": "^7.3.5",
|
||||||
"strictdom": "^1.0.1",
|
"strictdom": "^1.0.1",
|
||||||
"string-replace-webpack-plugin": "^0.1.3",
|
"string-replace-webpack-plugin": "^0.1.3",
|
||||||
"terser-webpack-plugin": "^1.1.0",
|
"terser-webpack-plugin": "^1.1.0",
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 755.01 213.12"><defs><style>.cls-1{fill:#fff;}</style></defs><path class="cls-1" d="M135.39,64.45v34.8h33.8v26.1h-34.1v53c0,11.7,6.5,17.4,15.9,17.4a35.5,35.5,0,0,0,14.7-3.7l8.5,25.9a66.34,66.34,0,0,1-25.1,5.2c-26.6,1-44-14.2-44-44.8v-53H82.19V99.25h22.9V67.65Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M301.89,160.45c0,35.3-24.1,63.9-63.9,63.9s-63.8-28.6-63.8-63.9c0-35.1,24.4-63.9,63.4-63.9S301.89,125.35,301.89,160.45Zm-97.3,0c0,18.7,11.2,36.1,33.3,36.1s33.3-17.4,33.3-36.1c0-18.4-12.9-36.3-33.3-36.3C216,124.15,204.59,142.05,204.59,160.45Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M343.59,64.45v51.2C350.79,103,371,96,383.89,96c35.8,0,62.4,21.9,62.4,64.2,0,40.3-27.1,64.2-63.2,64.2-14.9,0-30.1-5-39.6-19.7l-2,16.9h-28.4v-154Zm2,95.8c0,22.1,16.4,36.1,35.6,36.1,19.4,0,34.8-14.7,34.8-36.1,0-22.1-15.4-35.8-34.8-35.8C362,124.45,345.59,138.85,345.59,160.25Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M536.39,131.65c-8.7-8.2-18.7-10.9-30.4-10.9-14.4,0-22.4,4.5-22.4,12.2,0,8,7.2,12.4,22.9,13.4,23.1,1.5,52.5,6.7,52.5,39.3,0,21.6-17.7,40.3-52.7,40.3-19.4,0-38.8-3.2-56.7-21.9l14.9-21.6c8.7,9.7,28.6,16.9,42.3,17.2,11.4.2,22.1-5.7,22.1-14.7,0-8.5-7-11.9-24.4-12.9-23.1-1.7-50.7-10.2-50.7-38.1,0-28.4,29.4-38.3,51.7-38.3,19.2,0,33.6,3.7,47.8,16.2Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M569.39,256.25V99h28.4l2,16.9c9.5-13.7,25.9-19.7,39.8-19.7,37.8,0,62.9,28.1,62.9,64.2,0,35.8-22.6,64.2-61.9,64.2-12.9,0-32.1-4-40.8-17.4v49h-30.4Zm102.8-95.8c0-19.2-12.9-34.8-34.8-34.8s-34.8,15.7-34.8,34.8,14.2,34.8,34.8,34.8S672.19,179.65,672.19,160.45Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M740.59,99.05l2.2,14.2c9.5-15.2,22.1-17.4,34.6-17.4,12.7,0,24.9,5,31.6,11.7L795.29,134c-6.2-5.2-11.9-8-21.9-8-15.9,0-30.6,8.5-30.6,31.1v64.7h-30.3V99.15Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M646.41,277.57a20.43,20.43,0,0,1-7.52-1.35,18,18,0,0,1-6-3.8,17.28,17.28,0,0,1-3.92-5.76,19.32,19.32,0,0,1,0-14.49,17.06,17.06,0,0,1,4-5.76,18.16,18.16,0,0,1,6-3.8,20.43,20.43,0,0,1,7.52-1.35,21.39,21.39,0,0,1,7.48,1.27,14.84,14.84,0,0,1,5.78,3.88l-2.34,2.4a13.42,13.42,0,0,0-5-3.22,17.23,17.23,0,0,0-5.81-1,16.54,16.54,0,0,0-6.1,1.09,14.44,14.44,0,0,0-8.06,7.81,15.71,15.71,0,0,0,0,11.75,14.39,14.39,0,0,0,8.06,7.83,16.39,16.39,0,0,0,6.05,1.1,18.1,18.1,0,0,0,5.79-.92,13.51,13.51,0,0,0,5-3.11l2.14,2.85a17.07,17.07,0,0,1-6,3.39A22.07,22.07,0,0,1,646.41,277.57Zm9.49-5V259.42h3.62V273Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M670.59,277.27l16.32-35.7h3.72L707,277.27h-4l-15-33.51h1.53l-15,33.51Zm6.42-9.54,1.13-3.06h20.75l1.12,3.06Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M719,277.27v-35.7h3.11l16.32,27.84h-1.64L753,241.57h3.11v35.7h-3.62v-30h.87l-14.89,25.5h-1.79l-15-25.5h1v30Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M777.58,274h21.48v3.27H773.81v-35.7h24.48v3.26H777.58Zm-.4-16.47h18.87v3.21H777.18Z" transform="translate(-82.19 -64.45)"/><path class="cls-1" d="M823.89,277.57a22.43,22.43,0,0,1-7.62-1.3,14.68,14.68,0,0,1-5.64-3.34l1.48-2.91a14.93,14.93,0,0,0,5.08,3.09,18.24,18.24,0,0,0,6.7,1.25,15,15,0,0,0,5.48-.84,6.72,6.72,0,0,0,3.12-2.27,5.43,5.43,0,0,0,1-3.16,4.71,4.71,0,0,0-1.2-3.37,8.35,8.35,0,0,0-3.13-2,37.06,37.06,0,0,0-4.29-1.3c-1.56-.37-3.13-.77-4.69-1.19a20.18,20.18,0,0,1-4.31-1.71,9,9,0,0,1-3.16-2.83,8.06,8.06,0,0,1-1.2-4.62,9,9,0,0,1,1.4-4.87,9.8,9.8,0,0,1,4.31-3.57,17.76,17.76,0,0,1,7.45-1.35,21.72,21.72,0,0,1,6,.84,17.12,17.12,0,0,1,5.1,2.32l-1.27,3a16.77,16.77,0,0,0-4.87-2.24,18.49,18.49,0,0,0-5-.72,13.93,13.93,0,0,0-5.31.87,6.71,6.71,0,0,0-3.08,2.32,5.66,5.66,0,0,0-1,3.29,4.73,4.73,0,0,0,1.2,3.37,7.91,7.91,0,0,0,3.16,2,38.14,38.14,0,0,0,4.31,1.28c1.57.37,3.12.78,4.67,1.22a22.75,22.75,0,0,1,4.28,1.71,8.88,8.88,0,0,1,3.16,2.78,7.83,7.83,0,0,1,1.2,4.54,8.76,8.76,0,0,1-1.42,4.82,10,10,0,0,1-4.37,3.57A18,18,0,0,1,823.89,277.57Z" transform="translate(-82.19 -64.45)"/></svg>
|
After Width: | Height: | Size: 4.0 KiB |
BIN
res/logo.png
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 23 KiB |
BIN
res/logo_cn.png
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |