mirror of
https://gitcode.com/github-mirrors/react-native-update-cli.git
synced 2025-09-16 09:41:38 +08:00
Compare commits
172 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
002e8662d6 | ||
![]() |
ebfb9dd4b9 | ||
![]() |
59c5be2719 | ||
![]() |
2e8e242e75 | ||
![]() |
0cfb1a9beb | ||
![]() |
b22c598ca4 | ||
![]() |
573ab60e44 | ||
![]() |
4613da1fbe | ||
![]() |
f2f33a190d | ||
![]() |
cc6c1aae79 | ||
![]() |
91b26ebc87 | ||
![]() |
9cb8d458ad | ||
![]() |
d853918d8d | ||
![]() |
c4a34490e3 | ||
![]() |
e2737a29eb | ||
![]() |
9b55610675 | ||
![]() |
5d1466ddec | ||
![]() |
081d54ba63 | ||
![]() |
4326c08d79 | ||
![]() |
20010a9ea6 | ||
![]() |
36220a48aa | ||
![]() |
d281d72737 | ||
![]() |
d351243ab7 | ||
![]() |
fbdacfffd2 | ||
![]() |
b725d2b08e | ||
![]() |
3f1b43e38e | ||
![]() |
328b1f5447 | ||
![]() |
ef7f6a2087 | ||
![]() |
d2798d3177 | ||
![]() |
b0a8fc928a | ||
![]() |
a559140b72 | ||
![]() |
8bd19bc0f7 | ||
![]() |
d974be6706 | ||
![]() |
d0495fb271 | ||
![]() |
613f39a59e | ||
![]() |
94c06e9908 | ||
![]() |
ac1a000a3b | ||
![]() |
4e51f291ca | ||
![]() |
04b5d12daa | ||
![]() |
67644b5c11 | ||
![]() |
546faef83f | ||
![]() |
e713f4bbd1 | ||
![]() |
5a6463de33 | ||
![]() |
1fb308af94 | ||
![]() |
f10d4d3004 | ||
![]() |
0f44de772f | ||
![]() |
814a9d10fb | ||
![]() |
c08c5c0b07 | ||
![]() |
dc8c134ff0 | ||
![]() |
1d1e6cde0f | ||
![]() |
f16aff5674 | ||
![]() |
d7da311c5e | ||
![]() |
abef760f43 | ||
![]() |
467ef0c60d | ||
![]() |
0b08c7760d | ||
![]() |
b24b27d100 | ||
![]() |
4f0784172f | ||
![]() |
26725200b7 | ||
![]() |
8bd31b8dc1 | ||
![]() |
59f2421067 | ||
![]() |
8f0ca60d24 | ||
![]() |
6fcdb988c8 | ||
![]() |
040f723305 | ||
![]() |
12bddc446d | ||
![]() |
ba3d88627a | ||
![]() |
3987a5191f | ||
![]() |
9903fb97e4 | ||
![]() |
834c0bb351 | ||
![]() |
fa8ba44bfa | ||
![]() |
6e4e89428c | ||
![]() |
e018761fc8 | ||
![]() |
6534379d81 | ||
![]() |
bb777bf973 | ||
![]() |
ea05d4ab66 | ||
![]() |
a259ff671d | ||
![]() |
3f68fa0f11 | ||
![]() |
fa750ba157 | ||
![]() |
91fc0caa07 | ||
![]() |
36e1be084d | ||
![]() |
e099002629 | ||
![]() |
5dd3b64720 | ||
![]() |
31ec3edc5a | ||
![]() |
4b772194d1 | ||
![]() |
792418c964 | ||
![]() |
d5f468aa44 | ||
![]() |
04f75cd51b | ||
![]() |
5a05679e2b | ||
![]() |
69f4372b63 | ||
![]() |
dbfdce6412 | ||
![]() |
1372a30ea3 | ||
![]() |
d51ef37a62 | ||
![]() |
90a59cfe7b | ||
![]() |
ffcc6c9c96 | ||
![]() |
b00b3144a3 | ||
![]() |
d3ee908227 | ||
![]() |
5302c8968f | ||
![]() |
5740a3315c | ||
![]() |
4a11a4118f | ||
![]() |
feb1128748 | ||
![]() |
8fd74d76b1 | ||
![]() |
209a989a48 | ||
![]() |
aab9ea6b98 | ||
![]() |
5f45a66aad | ||
![]() |
67f6aeef02 | ||
![]() |
5a28847e46 | ||
![]() |
54f7358357 | ||
![]() |
d2ec856756 | ||
![]() |
84e5e34820 | ||
![]() |
006951ae88 | ||
![]() |
b1fda5ab9c | ||
![]() |
385b974aff | ||
![]() |
2a02deb015 | ||
![]() |
8b7cb809f6 | ||
![]() |
070991d08b | ||
![]() |
0d03e18c58 | ||
![]() |
a0dfcb5c4b | ||
![]() |
587da8aaf9 | ||
![]() |
724088a810 | ||
![]() |
7c20b30c85 | ||
![]() |
6a053c6428 | ||
![]() |
f202fc590d | ||
![]() |
0f8cf3c399 | ||
![]() |
6a0d82c7a5 | ||
![]() |
eed19992d8 | ||
![]() |
1b5078831c | ||
![]() |
bc9aff343a | ||
![]() |
7aaa32a5a2 | ||
![]() |
ab7920fe38 | ||
![]() |
d912ace4a7 | ||
![]() |
8af4d314ce | ||
![]() |
f2d5269512 | ||
![]() |
fe24c4ca36 | ||
![]() |
cf61c297a6 | ||
![]() |
f9adc700ed | ||
![]() |
dcff16cbb5 | ||
![]() |
2bb8e83010 | ||
![]() |
0cfc6e4f0d | ||
![]() |
da7bdbfdd2 | ||
![]() |
07ee28ba3b | ||
![]() |
dae3e4024f | ||
![]() |
d673b5736a | ||
![]() |
732845faad | ||
![]() |
bcfdd67ea8 | ||
![]() |
27ea54c1ec | ||
![]() |
ba0fa836d1 | ||
![]() |
bde76094fc | ||
![]() |
f1d6c3744e | ||
![]() |
768484d7b5 | ||
![]() |
d6632ffcc6 | ||
![]() |
24f5b316a9 | ||
![]() |
03a4108a08 | ||
![]() |
32d7ed9b00 | ||
![]() |
6f3d45c3f2 | ||
![]() |
25cb724921 | ||
![]() |
a7b79a30e8 | ||
![]() |
11799dd0c1 | ||
![]() |
2ab0cad7e5 | ||
![]() |
ec8d6a767b | ||
![]() |
fa8290fcbf | ||
![]() |
46d308c7c2 | ||
![]() |
9e721e1858 | ||
![]() |
c30454976c | ||
![]() |
3d73b95140 | ||
![]() |
32cafd92bf | ||
![]() |
ea10cd7828 | ||
![]() |
574a52b126 | ||
![]() |
c00a7a72fe | ||
![]() |
0e8e3aa420 | ||
![]() |
7426e93647 | ||
![]() |
b6fb2e7d2a | ||
![]() |
7f1dcbb571 | ||
![]() |
59fad93832 |
47
.github/workflows/lint.yml
vendored
Normal file
47
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
name: lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
# Cancel a currently running workflow from the same PR/branch/tag
|
||||
# when a new workflow is triggered
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
- name: Get yarn cache directory path
|
||||
id: yarn-cache-dir-path
|
||||
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Install Dependency
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||
run: bun install --frozen-lockfile
|
||||
|
||||
- name: Run lint
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
NODE_OPTIONS: '--max_old_space_size=4096'
|
||||
run: bun lint
|
22
.github/workflows/publish.yml
vendored
Normal file
22
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
name: Publish Package to npmjs
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: oven-sh/setup-bun@v2
|
||||
# Setup .npmrc file to publish to npm
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20.x'
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
- run: bun install --frozen-lockfile
|
||||
- run: npm publish --access public
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -104,3 +104,4 @@ dist
|
||||
.tern-port
|
||||
|
||||
lib/
|
||||
.DS_Store
|
||||
|
15
.swcrc
Normal file
15
.swcrc
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"jsc": {
|
||||
"loose": true,
|
||||
"target": "es2018",
|
||||
"parser": {
|
||||
"syntax": "typescript",
|
||||
"tsx": false,
|
||||
"decorators": false,
|
||||
"dynamicImport": false
|
||||
}
|
||||
},
|
||||
"module": {
|
||||
"type": "commonjs"
|
||||
}
|
||||
}
|
29
LICENSE
29
LICENSE
@@ -1,29 +0,0 @@
|
||||
BSD 3-Clause License
|
||||
|
||||
Copyright (c) 2020, reactnativecn
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its
|
||||
contributors may be used to endorse or promote products derived from
|
||||
this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
40
biome.json
Normal file
40
biome.json
Normal file
@@ -0,0 +1,40 @@
|
||||
{
|
||||
"files": {
|
||||
"ignore": ["lib"]
|
||||
},
|
||||
"linter": {
|
||||
"enabled": true,
|
||||
"rules": {
|
||||
"recommended": true,
|
||||
"suspicious": {
|
||||
"noExplicitAny": "off",
|
||||
"noAssignInExpressions": "off",
|
||||
"noDoubleEquals": "off"
|
||||
},
|
||||
"style": {
|
||||
"noNonNullAssertion": "off",
|
||||
"useNodejsImportProtocol": "off"
|
||||
},
|
||||
"a11y": {
|
||||
"useValidAnchor": "off"
|
||||
},
|
||||
"performance": {
|
||||
"noDelete": "off"
|
||||
}
|
||||
}
|
||||
},
|
||||
"formatter": {
|
||||
"enabled": true,
|
||||
"formatWithErrors": false,
|
||||
"indentStyle": "space",
|
||||
"indentWidth": 2,
|
||||
"lineEnding": "lf",
|
||||
"lineWidth": 80,
|
||||
"attributePosition": "auto"
|
||||
},
|
||||
"javascript": {
|
||||
"formatter": {
|
||||
"quoteStyle": "single"
|
||||
}
|
||||
}
|
||||
}
|
930
bun.lock
Normal file
930
bun.lock
Normal file
@@ -0,0 +1,930 @@
|
||||
{
|
||||
"lockfileVersion": 1,
|
||||
"workspaces": {
|
||||
"": {
|
||||
"dependencies": {
|
||||
"@colors/colors": "^1.6.0",
|
||||
"bplist-parser": "^0.3.2",
|
||||
"bytebuffer": "^5.0.1",
|
||||
"cgbi-to-png": "^1.0.7",
|
||||
"chalk": "4",
|
||||
"cli-arguments": "^0.2.1",
|
||||
"commander": "^13",
|
||||
"compare-versions": "^6.1.1",
|
||||
"filesize-parser": "^1.5.1",
|
||||
"form-data": "^4.0.2",
|
||||
"fs-extra": "8",
|
||||
"global-dirs": "^4.0.0",
|
||||
"gradle-to-js": "^2.0.1",
|
||||
"i18next": "^24.2.3",
|
||||
"isomorphic-git": "^1.30.1",
|
||||
"isomorphic-unzip": "^1.1.5",
|
||||
"node-fetch": "^2.6.1",
|
||||
"plist": "^3.1.0",
|
||||
"progress": "^2.0.3",
|
||||
"properties": "^1.2.1",
|
||||
"read": "^4.1.0",
|
||||
"registry-auth-token": "^5.1.0",
|
||||
"semver": "^7.7.1",
|
||||
"tcp-ping": "^0.1.1",
|
||||
"tty-table": "4.2",
|
||||
"yauzl": "^3.2.0",
|
||||
"yazl": "3.3.1",
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^1.9.4",
|
||||
"@swc/cli": "0.7.3",
|
||||
"@swc/core": "^1.11.24",
|
||||
"@types/filesize-parser": "^1.5.3",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^22.14.1",
|
||||
"@types/node-fetch": "^2.6.12",
|
||||
"@types/progress": "^2.0.7",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@types/tcp-ping": "^0.1.6",
|
||||
"@types/yauzl": "^2.10.3",
|
||||
"@types/yazl": "^2.4.6",
|
||||
"typescript": "^5.8.3",
|
||||
},
|
||||
},
|
||||
},
|
||||
"trustedDependencies": [
|
||||
"@biomejs/biome",
|
||||
"@swc/core",
|
||||
],
|
||||
"packages": {
|
||||
"@babel/runtime": ["@babel/runtime@7.26.10", "", { "dependencies": { "regenerator-runtime": "^0.14.0" } }, "sha512-2WJMeRQPHKSPemqk/awGrAiuFfzBmOIPXKizAsVhWH9YJqLZ0H+HS4c8loHGgW6utJ3E/ejXQUsiGaQy2NZ9Fw=="],
|
||||
|
||||
"@biomejs/biome": ["@biomejs/biome@1.9.4", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "1.9.4", "@biomejs/cli-darwin-x64": "1.9.4", "@biomejs/cli-linux-arm64": "1.9.4", "@biomejs/cli-linux-arm64-musl": "1.9.4", "@biomejs/cli-linux-x64": "1.9.4", "@biomejs/cli-linux-x64-musl": "1.9.4", "@biomejs/cli-win32-arm64": "1.9.4", "@biomejs/cli-win32-x64": "1.9.4" }, "bin": { "biome": "bin/biome" } }, "sha512-1rkd7G70+o9KkTn5KLmDYXihGoTaIGO9PIIN2ZB7UJxFrWw04CZHPYiMRjYsaDvVV7hP1dYNRLxSANLaBFGpog=="],
|
||||
|
||||
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@1.9.4", "", { "os": "darwin", "cpu": "arm64" }, "sha512-bFBsPWrNvkdKrNCYeAp+xo2HecOGPAy9WyNyB/jKnnedgzl4W4Hb9ZMzYNbf8dMCGmUdSavlYHiR01QaYR58cw=="],
|
||||
|
||||
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@1.9.4", "", { "os": "darwin", "cpu": "x64" }, "sha512-ngYBh/+bEedqkSevPVhLP4QfVPCpb+4BBe2p7Xs32dBgs7rh9nY2AIYUL6BgLw1JVXV8GlpKmb/hNiuIxfPfZg=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-fJIW0+LYujdjUgJJuwesP4EjIBl/N/TcOX3IvIHJQNsAqvV2CHIogsmA94BPG6jZATS4Hi+xv4SkBBQSt1N4/g=="],
|
||||
|
||||
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@1.9.4", "", { "os": "linux", "cpu": "arm64" }, "sha512-v665Ct9WCRjGa8+kTr0CzApU0+XXtRgwmzIf1SeKSGAv+2scAlW6JR5PMFo6FzqqZ64Po79cKODKf3/AAmECqA=="],
|
||||
|
||||
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-lRCJv/Vi3Vlwmbd6K+oQ0KhLHMAysN8lXoCI7XeHlxaajk06u7G+UsFSO01NAs5iYuWKmVZjmiOzJ0OJmGsMwg=="],
|
||||
|
||||
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@1.9.4", "", { "os": "linux", "cpu": "x64" }, "sha512-gEhi/jSBhZ2m6wjV530Yy8+fNqG8PAinM3oV7CyO+6c3CEh16Eizm21uHVsyVBEB6RIM8JHIl6AGYCv6Q6Q9Tg=="],
|
||||
|
||||
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@1.9.4", "", { "os": "win32", "cpu": "arm64" }, "sha512-tlbhLk+WXZmgwoIKwHIHEBZUwxml7bRJgk0X2sPyNR3S93cdRq6XulAZRQJ17FYGGzWne0fgrXBKpl7l4M87Hg=="],
|
||||
|
||||
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@1.9.4", "", { "os": "win32", "cpu": "x64" }, "sha512-8Y5wMhVIPaWe6jw2H+KlEm4wP/f7EW3810ZLmDlrEEy5KvBsb9ECEfu/kMWD484ijfQ8+nIi0giMgu9g1UAuuA=="],
|
||||
|
||||
"@colors/colors": ["@colors/colors@1.6.0", "", {}, "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA=="],
|
||||
|
||||
"@napi-rs/nice": ["@napi-rs/nice@1.0.1", "", { "optionalDependencies": { "@napi-rs/nice-android-arm-eabi": "1.0.1", "@napi-rs/nice-android-arm64": "1.0.1", "@napi-rs/nice-darwin-arm64": "1.0.1", "@napi-rs/nice-darwin-x64": "1.0.1", "@napi-rs/nice-freebsd-x64": "1.0.1", "@napi-rs/nice-linux-arm-gnueabihf": "1.0.1", "@napi-rs/nice-linux-arm64-gnu": "1.0.1", "@napi-rs/nice-linux-arm64-musl": "1.0.1", "@napi-rs/nice-linux-ppc64-gnu": "1.0.1", "@napi-rs/nice-linux-riscv64-gnu": "1.0.1", "@napi-rs/nice-linux-s390x-gnu": "1.0.1", "@napi-rs/nice-linux-x64-gnu": "1.0.1", "@napi-rs/nice-linux-x64-musl": "1.0.1", "@napi-rs/nice-win32-arm64-msvc": "1.0.1", "@napi-rs/nice-win32-ia32-msvc": "1.0.1", "@napi-rs/nice-win32-x64-msvc": "1.0.1" } }, "sha512-zM0mVWSXE0a0h9aKACLwKmD6nHcRiKrPpCfvaKqG1CqDEyjEawId0ocXxVzPMCAm6kkWr2P025msfxXEnt8UGQ=="],
|
||||
|
||||
"@napi-rs/nice-android-arm-eabi": ["@napi-rs/nice-android-arm-eabi@1.0.1", "", { "os": "android", "cpu": "arm" }, "sha512-5qpvOu5IGwDo7MEKVqqyAxF90I6aLj4n07OzpARdgDRfz8UbBztTByBp0RC59r3J1Ij8uzYi6jI7r5Lws7nn6w=="],
|
||||
|
||||
"@napi-rs/nice-android-arm64": ["@napi-rs/nice-android-arm64@1.0.1", "", { "os": "android", "cpu": "arm64" }, "sha512-GqvXL0P8fZ+mQqG1g0o4AO9hJjQaeYG84FRfZaYjyJtZZZcMjXW5TwkL8Y8UApheJgyE13TQ4YNUssQaTgTyvA=="],
|
||||
|
||||
"@napi-rs/nice-darwin-arm64": ["@napi-rs/nice-darwin-arm64@1.0.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-91k3HEqUl2fsrz/sKkuEkscj6EAj3/eZNCLqzD2AA0TtVbkQi8nqxZCZDMkfklULmxLkMxuUdKe7RvG/T6s2AA=="],
|
||||
|
||||
"@napi-rs/nice-darwin-x64": ["@napi-rs/nice-darwin-x64@1.0.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-jXnMleYSIR/+TAN/p5u+NkCA7yidgswx5ftqzXdD5wgy/hNR92oerTXHc0jrlBisbd7DpzoaGY4cFD7Sm5GlgQ=="],
|
||||
|
||||
"@napi-rs/nice-freebsd-x64": ["@napi-rs/nice-freebsd-x64@1.0.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-j+iJ/ezONXRQsVIB/FJfwjeQXX7A2tf3gEXs4WUGFrJjpe/z2KB7sOv6zpkm08PofF36C9S7wTNuzHZ/Iiccfw=="],
|
||||
|
||||
"@napi-rs/nice-linux-arm-gnueabihf": ["@napi-rs/nice-linux-arm-gnueabihf@1.0.1", "", { "os": "linux", "cpu": "arm" }, "sha512-G8RgJ8FYXYkkSGQwywAUh84m946UTn6l03/vmEXBYNJxQJcD+I3B3k5jmjFG/OPiU8DfvxutOP8bi+F89MCV7Q=="],
|
||||
|
||||
"@napi-rs/nice-linux-arm64-gnu": ["@napi-rs/nice-linux-arm64-gnu@1.0.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-IMDak59/W5JSab1oZvmNbrms3mHqcreaCeClUjwlwDr0m3BoR09ZiN8cKFBzuSlXgRdZ4PNqCYNeGQv7YMTjuA=="],
|
||||
|
||||
"@napi-rs/nice-linux-arm64-musl": ["@napi-rs/nice-linux-arm64-musl@1.0.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-wG8fa2VKuWM4CfjOjjRX9YLIbysSVV1S3Kgm2Fnc67ap/soHBeYZa6AGMeR5BJAylYRjnoVOzV19Cmkco3QEPw=="],
|
||||
|
||||
"@napi-rs/nice-linux-ppc64-gnu": ["@napi-rs/nice-linux-ppc64-gnu@1.0.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-lxQ9WrBf0IlNTCA9oS2jg/iAjQyTI6JHzABV664LLrLA/SIdD+I1i3Mjf7TsnoUbgopBcCuDztVLfJ0q9ubf6Q=="],
|
||||
|
||||
"@napi-rs/nice-linux-riscv64-gnu": ["@napi-rs/nice-linux-riscv64-gnu@1.0.1", "", { "os": "linux", "cpu": "none" }, "sha512-3xs69dO8WSWBb13KBVex+yvxmUeEsdWexxibqskzoKaWx9AIqkMbWmE2npkazJoopPKX2ULKd8Fm9veEn0g4Ig=="],
|
||||
|
||||
"@napi-rs/nice-linux-s390x-gnu": ["@napi-rs/nice-linux-s390x-gnu@1.0.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-lMFI3i9rlW7hgToyAzTaEybQYGbQHDrpRkg+1gJWEpH0PLAQoZ8jiY0IzakLfNWnVda1eTYYlxxFYzW8Rqczkg=="],
|
||||
|
||||
"@napi-rs/nice-linux-x64-gnu": ["@napi-rs/nice-linux-x64-gnu@1.0.1", "", { "os": "linux", "cpu": "x64" }, "sha512-XQAJs7DRN2GpLN6Fb+ZdGFeYZDdGl2Fn3TmFlqEL5JorgWKrQGRUrpGKbgZ25UeZPILuTKJ+OowG2avN8mThBA=="],
|
||||
|
||||
"@napi-rs/nice-linux-x64-musl": ["@napi-rs/nice-linux-x64-musl@1.0.1", "", { "os": "linux", "cpu": "x64" }, "sha512-/rodHpRSgiI9o1faq9SZOp/o2QkKQg7T+DK0R5AkbnI/YxvAIEHf2cngjYzLMQSQgUhxym+LFr+UGZx4vK4QdQ=="],
|
||||
|
||||
"@napi-rs/nice-win32-arm64-msvc": ["@napi-rs/nice-win32-arm64-msvc@1.0.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-rEcz9vZymaCB3OqEXoHnp9YViLct8ugF+6uO5McifTedjq4QMQs3DHz35xBEGhH3gJWEsXMUbzazkz5KNM5YUg=="],
|
||||
|
||||
"@napi-rs/nice-win32-ia32-msvc": ["@napi-rs/nice-win32-ia32-msvc@1.0.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-t7eBAyPUrWL8su3gDxw9xxxqNwZzAqKo0Szv3IjVQd1GpXXVkb6vBBQUuxfIYaXMzZLwlxRQ7uzM2vdUE9ULGw=="],
|
||||
|
||||
"@napi-rs/nice-win32-x64-msvc": ["@napi-rs/nice-win32-x64-msvc@1.0.1", "", { "os": "win32", "cpu": "x64" }, "sha512-JlF+uDcatt3St2ntBG8H02F1mM45i5SF9W+bIKiReVE6wiy3o16oBP/yxt+RZ+N6LbCImJXJ6bXNO2kn9AXicg=="],
|
||||
|
||||
"@nodelib/fs.scandir": ["@nodelib/fs.scandir@2.1.5", "", { "dependencies": { "@nodelib/fs.stat": "2.0.5", "run-parallel": "^1.1.9" } }, "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g=="],
|
||||
|
||||
"@nodelib/fs.stat": ["@nodelib/fs.stat@2.0.5", "", {}, "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A=="],
|
||||
|
||||
"@nodelib/fs.walk": ["@nodelib/fs.walk@1.2.8", "", { "dependencies": { "@nodelib/fs.scandir": "2.1.5", "fastq": "^1.6.0" } }, "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg=="],
|
||||
|
||||
"@pnpm/config.env-replace": ["@pnpm/config.env-replace@1.1.0", "", {}, "sha512-htyl8TWnKL7K/ESFa1oW2UB5lVDxuF5DpM7tBi6Hu2LNL3mWkIzNLG6N4zoCUP1lCKNxWy/3iu8mS8MvToGd6w=="],
|
||||
|
||||
"@pnpm/network.ca-file": ["@pnpm/network.ca-file@1.0.2", "", { "dependencies": { "graceful-fs": "4.2.10" } }, "sha512-YcPQ8a0jwYU9bTdJDpXjMi7Brhkr1mXsXrUJvjqM2mQDgkRiz8jFaQGOdaLxgjtUfQgZhKy/O3cG/YwmgKaxLA=="],
|
||||
|
||||
"@pnpm/npm-conf": ["@pnpm/npm-conf@2.3.1", "", { "dependencies": { "@pnpm/config.env-replace": "^1.1.0", "@pnpm/network.ca-file": "^1.0.1", "config-chain": "^1.1.11" } }, "sha512-c83qWb22rNRuB0UaVCI0uRPNRr8Z0FWnEIvT47jiHAmOIUHbBOg5XvV7pM5x+rKn9HRpjxquDbXYSXr3fAKFcw=="],
|
||||
|
||||
"@sec-ant/readable-stream": ["@sec-ant/readable-stream@0.4.1", "", {}, "sha512-831qok9r2t8AlxLko40y2ebgSDhenenCatLVeW/uBtnHPyhHOvG0C7TvfgecV+wHzIm5KUICgzmVpWS+IMEAeg=="],
|
||||
|
||||
"@sindresorhus/is": ["@sindresorhus/is@5.6.0", "", {}, "sha512-TV7t8GKYaJWsn00tFDqBw8+Uqmr8A0fRU1tvTQhyZzGv0sJCGRQL3JGMI3ucuKo3XIZdUP+Lx7/gh2t3lewy7g=="],
|
||||
|
||||
"@swc/cli": ["@swc/cli@0.7.3", "", { "dependencies": { "@swc/counter": "^0.1.3", "@xhmikosr/bin-wrapper": "^13.0.5", "commander": "^8.3.0", "fast-glob": "^3.2.5", "minimatch": "^9.0.3", "piscina": "^4.3.1", "semver": "^7.3.8", "slash": "3.0.0", "source-map": "^0.7.3" }, "peerDependencies": { "@swc/core": "^1.2.66", "chokidar": "^4.0.1" }, "optionalPeers": ["chokidar"], "bin": { "swc": "bin/swc.js", "swcx": "bin/swcx.js", "spack": "bin/spack.js" } }, "sha512-rnVXNnlURjdOuPaBIwZ3TmBA44BF/eP0j154LanlgPEYfau74ige7cpKlKkZr1IBqMOG99lAnYNxQipDWA3hdg=="],
|
||||
|
||||
"@swc/core": ["@swc/core@1.11.24", "", { "dependencies": { "@swc/counter": "^0.1.3", "@swc/types": "^0.1.21" }, "optionalDependencies": { "@swc/core-darwin-arm64": "1.11.24", "@swc/core-darwin-x64": "1.11.24", "@swc/core-linux-arm-gnueabihf": "1.11.24", "@swc/core-linux-arm64-gnu": "1.11.24", "@swc/core-linux-arm64-musl": "1.11.24", "@swc/core-linux-x64-gnu": "1.11.24", "@swc/core-linux-x64-musl": "1.11.24", "@swc/core-win32-arm64-msvc": "1.11.24", "@swc/core-win32-ia32-msvc": "1.11.24", "@swc/core-win32-x64-msvc": "1.11.24" }, "peerDependencies": { "@swc/helpers": ">=0.5.17" }, "optionalPeers": ["@swc/helpers"] }, "sha512-MaQEIpfcEMzx3VWWopbofKJvaraqmL6HbLlw2bFZ7qYqYw3rkhM0cQVEgyzbHtTWwCwPMFZSC2DUbhlZgrMfLg=="],
|
||||
|
||||
"@swc/core-darwin-arm64": ["@swc/core-darwin-arm64@1.11.24", "", { "os": "darwin", "cpu": "arm64" }, "sha512-dhtVj0PC1APOF4fl5qT2neGjRLgHAAYfiVP8poJelhzhB/318bO+QCFWAiimcDoyMgpCXOhTp757gnoJJrheWA=="],
|
||||
|
||||
"@swc/core-darwin-x64": ["@swc/core-darwin-x64@1.11.24", "", { "os": "darwin", "cpu": "x64" }, "sha512-H/3cPs8uxcj2Fe3SoLlofN5JG6Ny5bl8DuZ6Yc2wr7gQFBmyBkbZEz+sPVgsID7IXuz7vTP95kMm1VL74SO5AQ=="],
|
||||
|
||||
"@swc/core-linux-arm-gnueabihf": ["@swc/core-linux-arm-gnueabihf@1.11.24", "", { "os": "linux", "cpu": "arm" }, "sha512-PHJgWEpCsLo/NGj+A2lXZ2mgGjsr96ULNW3+T3Bj2KTc8XtMUkE8tmY2Da20ItZOvPNC/69KroU7edyo1Flfbw=="],
|
||||
|
||||
"@swc/core-linux-arm64-gnu": ["@swc/core-linux-arm64-gnu@1.11.24", "", { "os": "linux", "cpu": "arm64" }, "sha512-C2FJb08+n5SD4CYWCTZx1uR88BN41ZieoHvI8A55hfVf2woT8+6ZiBzt74qW2g+ntZ535Jts5VwXAKdu41HpBg=="],
|
||||
|
||||
"@swc/core-linux-arm64-musl": ["@swc/core-linux-arm64-musl@1.11.24", "", { "os": "linux", "cpu": "arm64" }, "sha512-ypXLIdszRo0re7PNNaXN0+2lD454G8l9LPK/rbfRXnhLWDBPURxzKlLlU/YGd2zP98wPcVooMmegRSNOKfvErw=="],
|
||||
|
||||
"@swc/core-linux-x64-gnu": ["@swc/core-linux-x64-gnu@1.11.24", "", { "os": "linux", "cpu": "x64" }, "sha512-IM7d+STVZD48zxcgo69L0yYptfhaaE9cMZ+9OoMxirNafhKKXwoZuufol1+alEFKc+Wbwp+aUPe/DeWC/Lh3dg=="],
|
||||
|
||||
"@swc/core-linux-x64-musl": ["@swc/core-linux-x64-musl@1.11.24", "", { "os": "linux", "cpu": "x64" }, "sha512-DZByJaMVzSfjQKKQn3cqSeqwy6lpMaQDQQ4HPlch9FWtDx/dLcpdIhxssqZXcR2rhaQVIaRQsCqwV6orSDGAGw=="],
|
||||
|
||||
"@swc/core-win32-arm64-msvc": ["@swc/core-win32-arm64-msvc@1.11.24", "", { "os": "win32", "cpu": "arm64" }, "sha512-Q64Ytn23y9aVDKN5iryFi8mRgyHw3/kyjTjT4qFCa8AEb5sGUuSj//AUZ6c0J7hQKMHlg9do5Etvoe61V98/JQ=="],
|
||||
|
||||
"@swc/core-win32-ia32-msvc": ["@swc/core-win32-ia32-msvc@1.11.24", "", { "os": "win32", "cpu": "ia32" }, "sha512-9pKLIisE/Hh2vJhGIPvSoTK4uBSPxNVyXHmOrtdDot4E1FUUI74Vi8tFdlwNbaj8/vusVnb8xPXsxF1uB0VgiQ=="],
|
||||
|
||||
"@swc/core-win32-x64-msvc": ["@swc/core-win32-x64-msvc@1.11.24", "", { "os": "win32", "cpu": "x64" }, "sha512-sybnXtOsdB+XvzVFlBVGgRHLqp3yRpHK7CrmpuDKszhj/QhmsaZzY/GHSeALlMtLup13M0gqbcQvsTNlAHTg3w=="],
|
||||
|
||||
"@swc/counter": ["@swc/counter@0.1.3", "", {}, "sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ=="],
|
||||
|
||||
"@swc/types": ["@swc/types@0.1.21", "", { "dependencies": { "@swc/counter": "^0.1.3" } }, "sha512-2YEtj5HJVbKivud9N4bpPBAyZhj4S2Ipe5LkUG94alTpr7in/GU/EARgPAd3BwU+YOmFVJC2+kjqhGRi3r0ZpQ=="],
|
||||
|
||||
"@szmarczak/http-timer": ["@szmarczak/http-timer@5.0.1", "", { "dependencies": { "defer-to-connect": "^2.0.1" } }, "sha512-+PmQX0PiAYPMeVYe237LJAYvOMYW1j2rH5YROyS3b4CTVJum34HfRvKvAzozHAQG0TnHNdUfY9nCeUyRAs//cw=="],
|
||||
|
||||
"@tokenizer/token": ["@tokenizer/token@0.3.0", "", {}, "sha512-OvjF+z51L3ov0OyAU0duzsYuvO01PH7x4t6DJx+guahgTnBHkhJdG7soQeTSFLWN3efnHyibZ4Z8l2EuWwJN3A=="],
|
||||
|
||||
"@types/filesize-parser": ["@types/filesize-parser@1.5.3", "", {}, "sha512-D8veS92mQAfcKz5kbV9WINfKvvaxVfQHqnO3OWW6FxdYTZozDDb8mTLWCsvEqe8M/M7skeULTZzYeMf3Lsss+A=="],
|
||||
|
||||
"@types/fs-extra": ["@types/fs-extra@11.0.4", "", { "dependencies": { "@types/jsonfile": "*", "@types/node": "*" } }, "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ=="],
|
||||
|
||||
"@types/http-cache-semantics": ["@types/http-cache-semantics@4.0.4", "", {}, "sha512-1m0bIFVc7eJWyve9S0RnuRgcQqF/Xd5QsUZAZeQFr1Q3/p9JWoQQEqmVy+DPTNpGXwhgIetAoYF8JSc33q29QA=="],
|
||||
|
||||
"@types/jsonfile": ["@types/jsonfile@6.1.4", "", { "dependencies": { "@types/node": "*" } }, "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ=="],
|
||||
|
||||
"@types/node": ["@types/node@22.14.1", "", { "dependencies": { "undici-types": "~6.21.0" } }, "sha512-u0HuPQwe/dHrItgHHpmw3N2fYCR6x4ivMNbPHRkBVP4CvN+kiRrKHWk3i8tXiO/joPwXLMYvF9TTF0eqgHIuOw=="],
|
||||
|
||||
"@types/node-fetch": ["@types/node-fetch@2.6.12", "", { "dependencies": { "@types/node": "*", "form-data": "^4.0.0" } }, "sha512-8nneRWKCg3rMtF69nLQJnOYUcbafYeFSjqkw3jCRLsqkWFlHaoQrr5mXmofFGOx3DKn7UfmBMyov8ySvLRVldA=="],
|
||||
|
||||
"@types/progress": ["@types/progress@2.0.7", "", { "dependencies": { "@types/node": "*" } }, "sha512-iadjw02vte8qWx7U0YM++EybBha2CQLPGu9iJ97whVgJUT5Zq9MjAPYUnbfRI2Kpehimf1QjFJYxD0t8nqzu5w=="],
|
||||
|
||||
"@types/semver": ["@types/semver@7.7.0", "", {}, "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA=="],
|
||||
|
||||
"@types/tcp-ping": ["@types/tcp-ping@0.1.6", "", {}, "sha512-1TTOm3cK+0NrZ6uTlY51YERzo5tEW3RybX1594vy9oiZOc1vsVL4LmdiIklDJXYLlzmve5lBkM5GjvwBG1Bc4A=="],
|
||||
|
||||
"@types/yauzl": ["@types/yauzl@2.10.3", "", { "dependencies": { "@types/node": "*" } }, "sha512-oJoftv0LSuaDZE3Le4DbKX+KS9G36NzOeSap90UIK0yMA/NhKJhqlSGtNDORNRaIbQfzjXDrQa0ytJ6mNRGz/Q=="],
|
||||
|
||||
"@types/yazl": ["@types/yazl@2.4.6", "", { "dependencies": { "@types/node": "*" } }, "sha512-/ifFjQtcKaoZOjl5NNCQRR0fAKafB3Foxd7J/WvFPTMea46zekapcR30uzkwIkKAAuq5T6d0dkwz754RFH27hg=="],
|
||||
|
||||
"@xhmikosr/archive-type": ["@xhmikosr/archive-type@7.0.0", "", { "dependencies": { "file-type": "^19.0.0" } }, "sha512-sIm84ZneCOJuiy3PpWR5bxkx3HaNt1pqaN+vncUBZIlPZCq8ASZH+hBVdu5H8znR7qYC6sKwx+ie2Q7qztJTxA=="],
|
||||
|
||||
"@xhmikosr/bin-check": ["@xhmikosr/bin-check@7.0.3", "", { "dependencies": { "execa": "^5.1.1", "isexe": "^2.0.0" } }, "sha512-4UnCLCs8DB+itHJVkqFp9Zjg+w/205/J2j2wNBsCEAm/BuBmtua2hhUOdAMQE47b1c7P9Xmddj0p+X1XVsfHsA=="],
|
||||
|
||||
"@xhmikosr/bin-wrapper": ["@xhmikosr/bin-wrapper@13.0.5", "", { "dependencies": { "@xhmikosr/bin-check": "^7.0.3", "@xhmikosr/downloader": "^15.0.1", "@xhmikosr/os-filter-obj": "^3.0.0", "bin-version-check": "^5.1.0" } }, "sha512-DT2SAuHDeOw0G5bs7wZbQTbf4hd8pJ14tO0i4cWhRkIJfgRdKmMfkDilpaJ8uZyPA0NVRwasCNAmMJcWA67osw=="],
|
||||
|
||||
"@xhmikosr/decompress": ["@xhmikosr/decompress@10.0.1", "", { "dependencies": { "@xhmikosr/decompress-tar": "^8.0.1", "@xhmikosr/decompress-tarbz2": "^8.0.1", "@xhmikosr/decompress-targz": "^8.0.1", "@xhmikosr/decompress-unzip": "^7.0.0", "graceful-fs": "^4.2.11", "make-dir": "^4.0.0", "strip-dirs": "^3.0.0" } }, "sha512-6uHnEEt5jv9ro0CDzqWlFgPycdE+H+kbJnwyxgZregIMLQ7unQSCNVsYG255FoqU8cP46DyggI7F7LohzEl8Ag=="],
|
||||
|
||||
"@xhmikosr/decompress-tar": ["@xhmikosr/decompress-tar@8.0.1", "", { "dependencies": { "file-type": "^19.0.0", "is-stream": "^2.0.1", "tar-stream": "^3.1.7" } }, "sha512-dpEgs0cQKJ2xpIaGSO0hrzz3Kt8TQHYdizHsgDtLorWajuHJqxzot9Hbi0huRxJuAGG2qiHSQkwyvHHQtlE+fg=="],
|
||||
|
||||
"@xhmikosr/decompress-tarbz2": ["@xhmikosr/decompress-tarbz2@8.0.1", "", { "dependencies": { "@xhmikosr/decompress-tar": "^8.0.1", "file-type": "^19.0.0", "is-stream": "^2.0.1", "seek-bzip": "^2.0.0", "unbzip2-stream": "^1.4.3" } }, "sha512-OF+6DysDZP5YTDO8uHuGG6fMGZjc+HszFPBkVltjoje2Cf60hjBg/YP5OQndW1hfwVWOdP7f3CnJiPZHJUTtEg=="],
|
||||
|
||||
"@xhmikosr/decompress-targz": ["@xhmikosr/decompress-targz@8.0.1", "", { "dependencies": { "@xhmikosr/decompress-tar": "^8.0.1", "file-type": "^19.0.0", "is-stream": "^2.0.1" } }, "sha512-mvy5AIDIZjQ2IagMI/wvauEiSNHhu/g65qpdM4EVoYHUJBAmkQWqcPJa8Xzi1aKVTmOA5xLJeDk7dqSjlHq8Mg=="],
|
||||
|
||||
"@xhmikosr/decompress-unzip": ["@xhmikosr/decompress-unzip@7.0.0", "", { "dependencies": { "file-type": "^19.0.0", "get-stream": "^6.0.1", "yauzl": "^3.1.2" } }, "sha512-GQMpzIpWTsNr6UZbISawsGI0hJ4KA/mz5nFq+cEoPs12UybAqZWKbyIaZZyLbJebKl5FkLpsGBkrplJdjvUoSQ=="],
|
||||
|
||||
"@xhmikosr/downloader": ["@xhmikosr/downloader@15.0.1", "", { "dependencies": { "@xhmikosr/archive-type": "^7.0.0", "@xhmikosr/decompress": "^10.0.1", "content-disposition": "^0.5.4", "defaults": "^3.0.0", "ext-name": "^5.0.0", "file-type": "^19.0.0", "filenamify": "^6.0.0", "get-stream": "^6.0.1", "got": "^13.0.0" } }, "sha512-fiuFHf3Dt6pkX8HQrVBsK0uXtkgkVlhrZEh8b7VgoDqFf+zrgFBPyrwCqE/3nDwn3hLeNz+BsrS7q3mu13Lp1g=="],
|
||||
|
||||
"@xhmikosr/os-filter-obj": ["@xhmikosr/os-filter-obj@3.0.0", "", { "dependencies": { "arch": "^3.0.0" } }, "sha512-siPY6BD5dQ2SZPl3I0OZBHL27ZqZvLEosObsZRQ1NUB8qcxegwt0T9eKtV96JMFQpIz1elhkzqOg4c/Ri6Dp9A=="],
|
||||
|
||||
"@xmldom/xmldom": ["@xmldom/xmldom@0.8.10", "", {}, "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw=="],
|
||||
|
||||
"ansi-regex": ["ansi-regex@5.0.1", "", {}, "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ=="],
|
||||
|
||||
"ansi-styles": ["ansi-styles@4.3.0", "", { "dependencies": { "color-convert": "^2.0.1" } }, "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg=="],
|
||||
|
||||
"arch": ["arch@3.0.0", "", {}, "sha512-AmIAC+Wtm2AU8lGfTtHsw0Y9Qtftx2YXEEtiBP10xFUtMOA+sHHx6OAddyL52mUKh1vsXQ6/w1mVDptZCyUt4Q=="],
|
||||
|
||||
"array-buffer-byte-length": ["array-buffer-byte-length@1.0.1", "", { "dependencies": { "call-bind": "^1.0.5", "is-array-buffer": "^3.0.4" } }, "sha512-ahC5W1xgou+KTXix4sAO8Ki12Q+jf4i0+tmk3sC+zgcynshkHxzpXdImBehiUYKKKDwvfFiJl1tZt6ewscS1Mg=="],
|
||||
|
||||
"array.prototype.flat": ["array.prototype.flat@1.3.2", "", { "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", "es-shim-unscopables": "^1.0.0" } }, "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA=="],
|
||||
|
||||
"arraybuffer.prototype.slice": ["arraybuffer.prototype.slice@1.0.3", "", { "dependencies": { "array-buffer-byte-length": "^1.0.1", "call-bind": "^1.0.5", "define-properties": "^1.2.1", "es-abstract": "^1.22.3", "es-errors": "^1.2.1", "get-intrinsic": "^1.2.3", "is-array-buffer": "^3.0.4", "is-shared-array-buffer": "^1.0.2" } }, "sha512-bMxMKAjg13EBSVscxTaYA4mRc5t1UAXa2kXiGTNfZ079HIWXEkKmkgFrh/nJqamaLSrXO5H4WFFkPEaLJWbs3A=="],
|
||||
|
||||
"async-lock": ["async-lock@1.4.1", "", {}, "sha512-Az2ZTpuytrtqENulXwO3GGv1Bztugx6TT37NIo7imr/Qo0gsYiGtSdBa2B6fsXhTpVZDNfu1Qn3pk531e3q+nQ=="],
|
||||
|
||||
"asynckit": ["asynckit@0.4.0", "", {}, "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="],
|
||||
|
||||
"available-typed-arrays": ["available-typed-arrays@1.0.7", "", { "dependencies": { "possible-typed-array-names": "^1.0.0" } }, "sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ=="],
|
||||
|
||||
"b4a": ["b4a@1.6.7", "", {}, "sha512-OnAYlL5b7LEkALw87fUVafQw5rVR9RjwGd4KUwNQ6DrrNmaVaUCgLipfVlzrPQ4tWOR9P0IXGNOx50jYCCdSJg=="],
|
||||
|
||||
"balanced-match": ["balanced-match@1.0.2", "", {}, "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="],
|
||||
|
||||
"bare-events": ["bare-events@2.5.0", "", {}, "sha512-/E8dDe9dsbLyh2qrZ64PEPadOQ0F4gbl1sUJOrmph7xOiIxfY8vwab/4bFLh4Y88/Hk/ujKcrQKc+ps0mv873A=="],
|
||||
|
||||
"base64-js": ["base64-js@1.5.1", "", {}, "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA=="],
|
||||
|
||||
"big-integer": ["big-integer@1.6.52", "", {}, "sha512-QxD8cf2eVqJOOz63z6JIN9BzvVs/dlySa5HGSBH5xtR8dPteIRQnBxxKqkNTiT6jbDTF6jAfrd4oMcND9RGbQg=="],
|
||||
|
||||
"bin-version": ["bin-version@6.0.0", "", { "dependencies": { "execa": "^5.0.0", "find-versions": "^5.0.0" } }, "sha512-nk5wEsP4RiKjG+vF+uG8lFsEn4d7Y6FVDamzzftSunXOoOcOOkzcWdKVlGgFFwlUQCj63SgnUkLLGF8v7lufhw=="],
|
||||
|
||||
"bin-version-check": ["bin-version-check@5.1.0", "", { "dependencies": { "bin-version": "^6.0.0", "semver": "^7.5.3", "semver-truncate": "^3.0.0" } }, "sha512-bYsvMqJ8yNGILLz1KP9zKLzQ6YpljV3ln1gqhuLkUtyfGi3qXKGuK2p+U4NAvjVFzDFiBBtOpCOSFNuYYEGZ5g=="],
|
||||
|
||||
"bplist-parser": ["bplist-parser@0.3.2", "", { "dependencies": { "big-integer": "1.6.x" } }, "sha512-apC2+fspHGI3mMKj+dGevkGo/tCqVB8jMb6i+OX+E29p0Iposz07fABkRIfVUPNd5A5VbuOz1bZbnmkKLYF+wQ=="],
|
||||
|
||||
"brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
|
||||
|
||||
"braces": ["braces@3.0.3", "", { "dependencies": { "fill-range": "^7.1.1" } }, "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA=="],
|
||||
|
||||
"breakword": ["breakword@1.0.6", "", { "dependencies": { "wcwidth": "^1.0.1" } }, "sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw=="],
|
||||
|
||||
"buffer": ["buffer@5.7.1", "", { "dependencies": { "base64-js": "^1.3.1", "ieee754": "^1.1.13" } }, "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ=="],
|
||||
|
||||
"buffer-crc32": ["buffer-crc32@0.2.13", "", {}, "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ=="],
|
||||
|
||||
"bufferpack": ["bufferpack@0.0.6", "", {}, "sha512-MTWvLHElqczrIVhge9qHtqgNigJFyh0+tCDId5yCbFAfuekHWIG+uAgvoHVflwrDPuY/e47JE1ki5qcM7w4uLg=="],
|
||||
|
||||
"bytebuffer": ["bytebuffer@5.0.1", "", { "dependencies": { "long": "~3" } }, "sha512-IuzSdmADppkZ6DlpycMkm8l9zeEq16fWtLvunEwFiYciR/BHo4E8/xs5piFquG+Za8OWmMqHF8zuRviz2LHvRQ=="],
|
||||
|
||||
"cacheable-lookup": ["cacheable-lookup@7.0.0", "", {}, "sha512-+qJyx4xiKra8mZrcwhjMRMUhD5NR1R8esPkzIYxX96JiecFoxAXFuz/GpR3+ev4PE1WamHip78wV0vcmPQtp8w=="],
|
||||
|
||||
"cacheable-request": ["cacheable-request@10.2.14", "", { "dependencies": { "@types/http-cache-semantics": "^4.0.2", "get-stream": "^6.0.1", "http-cache-semantics": "^4.1.1", "keyv": "^4.5.3", "mimic-response": "^4.0.0", "normalize-url": "^8.0.0", "responselike": "^3.0.0" } }, "sha512-zkDT5WAF4hSSoUgyfg5tFIxz8XQK+25W/TLVojJTMKBaxevLBBtLxgqguAuVQB8PVW79FVjHcU+GJ9tVbDZ9mQ=="],
|
||||
|
||||
"call-bind": ["call-bind@1.0.7", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "set-function-length": "^1.2.1" } }, "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w=="],
|
||||
|
||||
"call-bind-apply-helpers": ["call-bind-apply-helpers@1.0.2", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2" } }, "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ=="],
|
||||
|
||||
"camelcase": ["camelcase@5.3.1", "", {}, "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg=="],
|
||||
|
||||
"cgbi-to-png": ["cgbi-to-png@1.0.7", "", { "dependencies": { "bufferpack": "0.0.6", "crc": "^3.3.0", "stream-to-buffer": "^0.1.0", "streamifier": "^0.1.1" } }, "sha512-YR80kxTPuq9oRpZUdQmNEQWrmTKLINk1cfLVfyrV7Rfr9KLtLJdcockPKbreIr4JYAq+DhHBR7w+WA/tF5VDaQ=="],
|
||||
|
||||
"chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
||||
|
||||
"clean-git-ref": ["clean-git-ref@2.0.1", "", {}, "sha512-bLSptAy2P0s6hU4PzuIMKmMJJSE6gLXGH1cntDu7bWJUksvuM+7ReOK61mozULErYvP6a15rnYl0zFDef+pyPw=="],
|
||||
|
||||
"cli-arguments": ["cli-arguments@0.2.1", "", {}, "sha512-vaoTjiREjxKlpTNMiaJUkQnYRhgui8r+huhB6mMHcGQyz5F7Hd1o1jsW9C/wRKjlNYQ6fTvODLtZe7DxfEIz8g=="],
|
||||
|
||||
"cliui": ["cliui@8.0.1", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.1", "wrap-ansi": "^7.0.0" } }, "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ=="],
|
||||
|
||||
"clone": ["clone@1.0.4", "", {}, "sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg=="],
|
||||
|
||||
"color-convert": ["color-convert@2.0.1", "", { "dependencies": { "color-name": "~1.1.4" } }, "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ=="],
|
||||
|
||||
"color-name": ["color-name@1.1.4", "", {}, "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="],
|
||||
|
||||
"combined-stream": ["combined-stream@1.0.8", "", { "dependencies": { "delayed-stream": "~1.0.0" } }, "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg=="],
|
||||
|
||||
"commander": ["commander@13.1.0", "", {}, "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw=="],
|
||||
|
||||
"compare-versions": ["compare-versions@6.1.1", "", {}, "sha512-4hm4VPpIecmlg59CHXnRDnqGplJFrbLG4aFEl5vl6cK1u76ws3LLvX7ikFnTDl5vo39sjWD6AaDPYodJp/NNHg=="],
|
||||
|
||||
"config-chain": ["config-chain@1.1.13", "", { "dependencies": { "ini": "^1.3.4", "proto-list": "~1.2.1" } }, "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ=="],
|
||||
|
||||
"content-disposition": ["content-disposition@0.5.4", "", { "dependencies": { "safe-buffer": "5.2.1" } }, "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ=="],
|
||||
|
||||
"crc": ["crc@3.8.0", "", { "dependencies": { "buffer": "^5.1.0" } }, "sha512-iX3mfgcTMIq3ZKLIsVFAbv7+Mc10kxabAGQb8HvjA1o3T1PIYprbakQ65d3I+2HGHt6nSKkM9PYjgoJO2KcFBQ=="],
|
||||
|
||||
"crc-32": ["crc-32@1.2.2", "", { "bin": { "crc32": "bin/crc32.njs" } }, "sha512-ROmzCKrTnOwybPcJApAA6WBWij23HVfGVNKqqrZpuyZOHqK2CwHSvpGuyt/UNNvaIjEd8X5IFGp4Mh+Ie1IHJQ=="],
|
||||
|
||||
"cross-spawn": ["cross-spawn@7.0.3", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w=="],
|
||||
|
||||
"csv": ["csv@5.5.3", "", { "dependencies": { "csv-generate": "^3.4.3", "csv-parse": "^4.16.3", "csv-stringify": "^5.6.5", "stream-transform": "^2.1.3" } }, "sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g=="],
|
||||
|
||||
"csv-generate": ["csv-generate@3.4.3", "", {}, "sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw=="],
|
||||
|
||||
"csv-parse": ["csv-parse@4.16.3", "", {}, "sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg=="],
|
||||
|
||||
"csv-stringify": ["csv-stringify@5.6.5", "", {}, "sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A=="],
|
||||
|
||||
"data-view-buffer": ["data-view-buffer@1.0.1", "", { "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA=="],
|
||||
|
||||
"data-view-byte-length": ["data-view-byte-length@1.0.1", "", { "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ=="],
|
||||
|
||||
"data-view-byte-offset": ["data-view-byte-offset@1.0.0", "", { "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", "is-data-view": "^1.0.1" } }, "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA=="],
|
||||
|
||||
"decamelize": ["decamelize@1.2.0", "", {}, "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA=="],
|
||||
|
||||
"decompress-response": ["decompress-response@6.0.0", "", { "dependencies": { "mimic-response": "^3.1.0" } }, "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ=="],
|
||||
|
||||
"defaults": ["defaults@1.0.4", "", { "dependencies": { "clone": "^1.0.2" } }, "sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A=="],
|
||||
|
||||
"defer-to-connect": ["defer-to-connect@2.0.1", "", {}, "sha512-4tvttepXG1VaYGrRibk5EwJd1t4udunSOVMdLSAL6mId1ix438oPwPZMALY41FCijukO1L0twNcGsdzS7dHgDg=="],
|
||||
|
||||
"define-data-property": ["define-data-property@1.1.4", "", { "dependencies": { "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "gopd": "^1.0.1" } }, "sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A=="],
|
||||
|
||||
"define-properties": ["define-properties@1.2.1", "", { "dependencies": { "define-data-property": "^1.0.1", "has-property-descriptors": "^1.0.0", "object-keys": "^1.1.1" } }, "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg=="],
|
||||
|
||||
"delayed-stream": ["delayed-stream@1.0.0", "", {}, "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ=="],
|
||||
|
||||
"diff3": ["diff3@0.0.3", "", {}, "sha512-iSq8ngPOt0K53A6eVr4d5Kn6GNrM2nQZtC740pzIriHtn4pOQ2lyzEXQMBeVcWERN0ye7fhBsk9PbLLQOnUx/g=="],
|
||||
|
||||
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
|
||||
|
||||
"emoji-regex": ["emoji-regex@8.0.0", "", {}, "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="],
|
||||
|
||||
"es-abstract": ["es-abstract@1.23.3", "", { "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "data-view-buffer": "^1.0.1", "data-view-byte-length": "^1.0.1", "data-view-byte-offset": "^1.0.0", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.4", "get-symbol-description": "^1.0.2", "globalthis": "^1.0.3", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2", "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "hasown": "^2.0.2", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", "is-data-view": "^1.0.1", "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", "object-inspect": "^1.13.1", "object-keys": "^1.1.1", "object.assign": "^4.1.5", "regexp.prototype.flags": "^1.5.2", "safe-array-concat": "^1.1.2", "safe-regex-test": "^1.0.3", "string.prototype.trim": "^1.2.9", "string.prototype.trimend": "^1.0.8", "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.2", "typed-array-byte-length": "^1.0.1", "typed-array-byte-offset": "^1.0.2", "typed-array-length": "^1.0.6", "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.15" } }, "sha512-e+HfNH61Bj1X9/jLc5v1owaLYuHdeHHSQlkhCBiTK8rBvKaULl/beGMxwrMXjpYrv4pz22BlY570vVePA2ho4A=="],
|
||||
|
||||
"es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="],
|
||||
|
||||
"es-errors": ["es-errors@1.3.0", "", {}, "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw=="],
|
||||
|
||||
"es-object-atoms": ["es-object-atoms@1.1.1", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA=="],
|
||||
|
||||
"es-set-tostringtag": ["es-set-tostringtag@2.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA=="],
|
||||
|
||||
"es-shim-unscopables": ["es-shim-unscopables@1.0.2", "", { "dependencies": { "hasown": "^2.0.0" } }, "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw=="],
|
||||
|
||||
"es-to-primitive": ["es-to-primitive@1.2.1", "", { "dependencies": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", "is-symbol": "^1.0.2" } }, "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA=="],
|
||||
|
||||
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
||||
|
||||
"execa": ["execa@5.1.1", "", { "dependencies": { "cross-spawn": "^7.0.3", "get-stream": "^6.0.0", "human-signals": "^2.1.0", "is-stream": "^2.0.0", "merge-stream": "^2.0.0", "npm-run-path": "^4.0.1", "onetime": "^5.1.2", "signal-exit": "^3.0.3", "strip-final-newline": "^2.0.0" } }, "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg=="],
|
||||
|
||||
"ext-list": ["ext-list@2.2.2", "", { "dependencies": { "mime-db": "^1.28.0" } }, "sha512-u+SQgsubraE6zItfVA0tBuCBhfU9ogSRnsvygI7wht9TS510oLkBRXBsqopeUG/GBOIQyKZO9wjTqIu/sf5zFA=="],
|
||||
|
||||
"ext-name": ["ext-name@5.0.0", "", { "dependencies": { "ext-list": "^2.0.0", "sort-keys-length": "^1.0.0" } }, "sha512-yblEwXAbGv1VQDmow7s38W77hzAgJAO50ztBLMcUyUBfxv1HC+LGwtiEN+Co6LtlqT/5uwVOxsD4TNIilWhwdQ=="],
|
||||
|
||||
"fast-fifo": ["fast-fifo@1.3.2", "", {}, "sha512-/d9sfos4yxzpwkDkuN7k2SqFKtYNmCTzgfEpz82x34IM9/zc8KGxQoXg1liNC/izpRM/MBdt44Nmx41ZWqk+FQ=="],
|
||||
|
||||
"fast-glob": ["fast-glob@3.3.2", "", { "dependencies": { "@nodelib/fs.stat": "^2.0.2", "@nodelib/fs.walk": "^1.2.3", "glob-parent": "^5.1.2", "merge2": "^1.3.0", "micromatch": "^4.0.4" } }, "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow=="],
|
||||
|
||||
"fastq": ["fastq@1.17.1", "", { "dependencies": { "reusify": "^1.0.4" } }, "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w=="],
|
||||
|
||||
"fd-slicer": ["fd-slicer@1.1.0", "", { "dependencies": { "pend": "~1.2.0" } }, "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g=="],
|
||||
|
||||
"file-type": ["file-type@19.6.0", "", { "dependencies": { "get-stream": "^9.0.1", "strtok3": "^9.0.1", "token-types": "^6.0.0", "uint8array-extras": "^1.3.0" } }, "sha512-VZR5I7k5wkD0HgFnMsq5hOsSc710MJMu5Nc5QYsbe38NN5iPV/XTObYLc/cpttRTf6lX538+5uO1ZQRhYibiZQ=="],
|
||||
|
||||
"filename-reserved-regex": ["filename-reserved-regex@3.0.0", "", {}, "sha512-hn4cQfU6GOT/7cFHXBqeBg2TbrMBgdD0kcjLhvSQYYwm3s4B6cjvBfb7nBALJLAXqmU5xajSa7X2NnUud/VCdw=="],
|
||||
|
||||
"filenamify": ["filenamify@6.0.0", "", { "dependencies": { "filename-reserved-regex": "^3.0.0" } }, "sha512-vqIlNogKeyD3yzrm0yhRMQg8hOVwYcYRfjEoODd49iCprMn4HL85gK3HcykQE53EPIpX3HcAbGA5ELQv216dAQ=="],
|
||||
|
||||
"filesize-parser": ["filesize-parser@1.5.1", "", {}, "sha512-wRjdlQ5JM3WHZp6xpakIHQbkcGig8ANglYQDPcQSgZUN5kcDGOgmAwB0396BxzHxcl+kr+GLuusxBnsjdO6x9A=="],
|
||||
|
||||
"fill-range": ["fill-range@7.1.1", "", { "dependencies": { "to-regex-range": "^5.0.1" } }, "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg=="],
|
||||
|
||||
"find-up": ["find-up@4.1.0", "", { "dependencies": { "locate-path": "^5.0.0", "path-exists": "^4.0.0" } }, "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw=="],
|
||||
|
||||
"find-versions": ["find-versions@5.1.0", "", { "dependencies": { "semver-regex": "^4.0.5" } }, "sha512-+iwzCJ7C5v5KgcBuueqVoNiHVoQpwiUK5XFLjf0affFTep+Wcw93tPvmb8tqujDNmzhBDPddnWV/qgWSXgq+Hg=="],
|
||||
|
||||
"for-each": ["for-each@0.3.3", "", { "dependencies": { "is-callable": "^1.1.3" } }, "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw=="],
|
||||
|
||||
"form-data": ["form-data@4.0.2", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "es-set-tostringtag": "^2.1.0", "mime-types": "^2.1.12" } }, "sha512-hGfm/slu0ZabnNt4oaRZ6uREyfCj6P4fT/n6A1rGV+Z0VdGXjfOhVUpkn6qVQONHGIFwmveGXyDs75+nr6FM8w=="],
|
||||
|
||||
"form-data-encoder": ["form-data-encoder@2.1.4", "", {}, "sha512-yDYSgNMraqvnxiEXO4hi88+YZxaHC6QKzb5N84iRCTDeRO7ZALpir/lVmf/uXUhnwUr2O4HU8s/n6x+yNjQkHw=="],
|
||||
|
||||
"fs-extra": ["fs-extra@8.1.0", "", { "dependencies": { "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } }, "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g=="],
|
||||
|
||||
"function-bind": ["function-bind@1.1.2", "", {}, "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA=="],
|
||||
|
||||
"function.prototype.name": ["function.prototype.name@1.1.6", "", { "dependencies": { "call-bind": "^1.0.2", "define-properties": "^1.2.0", "es-abstract": "^1.22.1", "functions-have-names": "^1.2.3" } }, "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg=="],
|
||||
|
||||
"functions-have-names": ["functions-have-names@1.2.3", "", {}, "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="],
|
||||
|
||||
"get-caller-file": ["get-caller-file@2.0.5", "", {}, "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg=="],
|
||||
|
||||
"get-intrinsic": ["get-intrinsic@1.3.0", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.2", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.1.1", "function-bind": "^1.1.2", "get-proto": "^1.0.1", "gopd": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "math-intrinsics": "^1.1.0" } }, "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ=="],
|
||||
|
||||
"get-proto": ["get-proto@1.0.1", "", { "dependencies": { "dunder-proto": "^1.0.1", "es-object-atoms": "^1.0.0" } }, "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g=="],
|
||||
|
||||
"get-stream": ["get-stream@6.0.1", "", {}, "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg=="],
|
||||
|
||||
"get-symbol-description": ["get-symbol-description@1.0.2", "", { "dependencies": { "call-bind": "^1.0.5", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4" } }, "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg=="],
|
||||
|
||||
"glob-parent": ["glob-parent@5.1.2", "", { "dependencies": { "is-glob": "^4.0.1" } }, "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow=="],
|
||||
|
||||
"global-dirs": ["global-dirs@4.0.0", "", { "dependencies": { "ini": "2.0.0" } }, "sha512-PJ0OjGf/kVuu9gh5IPgAyssfJne5PsU9+ICxfWiRYDUnYq8ob+Y2nSWAEUNEHRj+gowyzI+wg5/nWkvcjcyLwg=="],
|
||||
|
||||
"globalthis": ["globalthis@1.0.4", "", { "dependencies": { "define-properties": "^1.2.1", "gopd": "^1.0.1" } }, "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ=="],
|
||||
|
||||
"gopd": ["gopd@1.2.0", "", {}, "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg=="],
|
||||
|
||||
"got": ["got@13.0.0", "", { "dependencies": { "@sindresorhus/is": "^5.2.0", "@szmarczak/http-timer": "^5.0.1", "cacheable-lookup": "^7.0.0", "cacheable-request": "^10.2.8", "decompress-response": "^6.0.0", "form-data-encoder": "^2.1.2", "get-stream": "^6.0.1", "http2-wrapper": "^2.1.10", "lowercase-keys": "^3.0.0", "p-cancelable": "^3.0.0", "responselike": "^3.0.0" } }, "sha512-XfBk1CxOOScDcMr9O1yKkNaQyy865NbYs+F7dr4H0LZMVgCj2Le59k6PqbNHoL5ToeaEQUYh6c6yMfVcc6SJxA=="],
|
||||
|
||||
"graceful-fs": ["graceful-fs@4.2.11", "", {}, "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ=="],
|
||||
|
||||
"gradle-to-js": ["gradle-to-js@2.0.1", "", { "dependencies": { "lodash.merge": "^4.6.2" }, "bin": { "gradle-to-js": "cli.js" } }, "sha512-is3hDn9zb8XXnjbEeAEIqxTpLHUiGBqjegLmXPuyMBfKAggpadWFku4/AP8iYAGBX6qR9/5UIUIp47V0XI3aMw=="],
|
||||
|
||||
"grapheme-splitter": ["grapheme-splitter@1.0.4", "", {}, "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ=="],
|
||||
|
||||
"has-bigints": ["has-bigints@1.0.2", "", {}, "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ=="],
|
||||
|
||||
"has-flag": ["has-flag@4.0.0", "", {}, "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ=="],
|
||||
|
||||
"has-property-descriptors": ["has-property-descriptors@1.0.2", "", { "dependencies": { "es-define-property": "^1.0.0" } }, "sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg=="],
|
||||
|
||||
"has-proto": ["has-proto@1.0.3", "", {}, "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q=="],
|
||||
|
||||
"has-symbols": ["has-symbols@1.1.0", "", {}, "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ=="],
|
||||
|
||||
"has-tostringtag": ["has-tostringtag@1.0.2", "", { "dependencies": { "has-symbols": "^1.0.3" } }, "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw=="],
|
||||
|
||||
"hasown": ["hasown@2.0.2", "", { "dependencies": { "function-bind": "^1.1.2" } }, "sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ=="],
|
||||
|
||||
"http-cache-semantics": ["http-cache-semantics@4.1.1", "", {}, "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ=="],
|
||||
|
||||
"http2-wrapper": ["http2-wrapper@2.2.1", "", { "dependencies": { "quick-lru": "^5.1.1", "resolve-alpn": "^1.2.0" } }, "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ=="],
|
||||
|
||||
"human-signals": ["human-signals@2.1.0", "", {}, "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw=="],
|
||||
|
||||
"i18next": ["i18next@24.2.3", "", { "dependencies": { "@babel/runtime": "^7.26.10" }, "peerDependencies": { "typescript": "^5" }, "optionalPeers": ["typescript"] }, "sha512-lfbf80OzkocvX7nmZtu7nSTNbrTYR52sLWxPtlXX1zAhVw8WEnFk4puUkCR4B1dNQwbSpEHHHemcZu//7EcB7A=="],
|
||||
|
||||
"ieee754": ["ieee754@1.2.1", "", {}, "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA=="],
|
||||
|
||||
"ignore": ["ignore@5.3.2", "", {}, "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g=="],
|
||||
|
||||
"inherits": ["inherits@2.0.4", "", {}, "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="],
|
||||
|
||||
"ini": ["ini@2.0.0", "", {}, "sha512-7PnF4oN3CvZF23ADhA5wRaYEQpJ8qygSkbtTXWBeXWXmEVRXK+1ITciHWwHhsjv1TmW0MgacIv6hEi5pX5NQdA=="],
|
||||
|
||||
"inspect-with-kind": ["inspect-with-kind@1.0.5", "", { "dependencies": { "kind-of": "^6.0.2" } }, "sha512-MAQUJuIo7Xqk8EVNP+6d3CKq9c80hi4tjIbIAT6lmGW9W6WzlHiu9PS8uSuUYU+Do+j1baiFp3H25XEVxDIG2g=="],
|
||||
|
||||
"internal-slot": ["internal-slot@1.0.7", "", { "dependencies": { "es-errors": "^1.3.0", "hasown": "^2.0.0", "side-channel": "^1.0.4" } }, "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g=="],
|
||||
|
||||
"is-array-buffer": ["is-array-buffer@3.0.4", "", { "dependencies": { "call-bind": "^1.0.2", "get-intrinsic": "^1.2.1" } }, "sha512-wcjaerHw0ydZwfhiKbXJWLDY8A7yV7KhjQOpb83hGgGfId/aQa4TOvwyzn2PuswW2gPCYEL/nEAiSVpdOj1lXw=="],
|
||||
|
||||
"is-bigint": ["is-bigint@1.0.4", "", { "dependencies": { "has-bigints": "^1.0.1" } }, "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg=="],
|
||||
|
||||
"is-boolean-object": ["is-boolean-object@1.1.2", "", { "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" } }, "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA=="],
|
||||
|
||||
"is-callable": ["is-callable@1.2.7", "", {}, "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA=="],
|
||||
|
||||
"is-data-view": ["is-data-view@1.0.1", "", { "dependencies": { "is-typed-array": "^1.1.13" } }, "sha512-AHkaJrsUVW6wq6JS8y3JnM/GJF/9cf+k20+iDzlSaJrinEo5+7vRiteOSwBhHRiAyQATN1AmY4hwzxJKPmYf+w=="],
|
||||
|
||||
"is-date-object": ["is-date-object@1.0.5", "", { "dependencies": { "has-tostringtag": "^1.0.0" } }, "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ=="],
|
||||
|
||||
"is-extglob": ["is-extglob@2.1.1", "", {}, "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ=="],
|
||||
|
||||
"is-fullwidth-code-point": ["is-fullwidth-code-point@3.0.0", "", {}, "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg=="],
|
||||
|
||||
"is-glob": ["is-glob@4.0.3", "", { "dependencies": { "is-extglob": "^2.1.1" } }, "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg=="],
|
||||
|
||||
"is-negative-zero": ["is-negative-zero@2.0.3", "", {}, "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw=="],
|
||||
|
||||
"is-number": ["is-number@7.0.0", "", {}, "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng=="],
|
||||
|
||||
"is-number-object": ["is-number-object@1.0.7", "", { "dependencies": { "has-tostringtag": "^1.0.0" } }, "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ=="],
|
||||
|
||||
"is-plain-obj": ["is-plain-obj@1.1.0", "", {}, "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg=="],
|
||||
|
||||
"is-regex": ["is-regex@1.1.4", "", { "dependencies": { "call-bind": "^1.0.2", "has-tostringtag": "^1.0.0" } }, "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg=="],
|
||||
|
||||
"is-shared-array-buffer": ["is-shared-array-buffer@1.0.3", "", { "dependencies": { "call-bind": "^1.0.7" } }, "sha512-nA2hv5XIhLR3uVzDDfCIknerhx8XUKnstuOERPNNIinXG7v9u+ohXF67vxm4TPTEPU6lm61ZkwP3c9PCB97rhg=="],
|
||||
|
||||
"is-stream": ["is-stream@2.0.1", "", {}, "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg=="],
|
||||
|
||||
"is-string": ["is-string@1.0.7", "", { "dependencies": { "has-tostringtag": "^1.0.0" } }, "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg=="],
|
||||
|
||||
"is-symbol": ["is-symbol@1.0.4", "", { "dependencies": { "has-symbols": "^1.0.2" } }, "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg=="],
|
||||
|
||||
"is-typed-array": ["is-typed-array@1.1.13", "", { "dependencies": { "which-typed-array": "^1.1.14" } }, "sha512-uZ25/bUAlUY5fR4OKT4rZQEBrzQWYV9ZJYGGsUmEJ6thodVJ1HX64ePQ6Z0qPWP+m+Uq6e9UugrE38jeYsDSMw=="],
|
||||
|
||||
"is-weakref": ["is-weakref@1.0.2", "", { "dependencies": { "call-bind": "^1.0.2" } }, "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ=="],
|
||||
|
||||
"isarray": ["isarray@2.0.5", "", {}, "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw=="],
|
||||
|
||||
"isexe": ["isexe@2.0.0", "", {}, "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="],
|
||||
|
||||
"isomorphic-git": ["isomorphic-git@1.30.1", "", { "dependencies": { "async-lock": "^1.4.1", "clean-git-ref": "^2.0.1", "crc-32": "^1.2.0", "diff3": "0.0.3", "ignore": "^5.1.4", "minimisted": "^2.0.0", "pako": "^1.0.10", "path-browserify": "^1.0.1", "pify": "^4.0.1", "readable-stream": "^3.4.0", "sha.js": "^2.4.9", "simple-get": "^4.0.1" }, "bin": { "isogit": "cli.cjs" } }, "sha512-eWBlPIPDOctGY/bTUc/whs6EZ8YvnG1H2kOjTCJ/AkvBWUzODXcfulhpiA8Y4Px9e+bRYYkifE5fSE8FcRk8Ew=="],
|
||||
|
||||
"isomorphic-unzip": ["isomorphic-unzip@1.1.5", "", { "dependencies": { "buffer": "^5.0.7", "yauzl": "^2.8.0" } }, "sha512-2McA51lWhmO3Kk438jxVcYeh6L+AOqVnl9XdX1yI7GlLA9RwEyTBgGem1rNuRIU2abAmOiv+IagThdUxASY4IA=="],
|
||||
|
||||
"json-buffer": ["json-buffer@3.0.1", "", {}, "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ=="],
|
||||
|
||||
"jsonfile": ["jsonfile@4.0.0", "", { "optionalDependencies": { "graceful-fs": "^4.1.6" } }, "sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg=="],
|
||||
|
||||
"keyv": ["keyv@4.5.4", "", { "dependencies": { "json-buffer": "3.0.1" } }, "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw=="],
|
||||
|
||||
"kind-of": ["kind-of@6.0.3", "", {}, "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw=="],
|
||||
|
||||
"kleur": ["kleur@4.1.5", "", {}, "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ=="],
|
||||
|
||||
"locate-path": ["locate-path@5.0.0", "", { "dependencies": { "p-locate": "^4.1.0" } }, "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g=="],
|
||||
|
||||
"lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="],
|
||||
|
||||
"long": ["long@3.2.0", "", {}, "sha512-ZYvPPOMqUwPoDsbJaR10iQJYnMuZhRTvHYl62ErLIEX7RgFlziSBUUvrt3OVfc47QlHHpzPZYP17g3Fv7oeJkg=="],
|
||||
|
||||
"lowercase-keys": ["lowercase-keys@3.0.0", "", {}, "sha512-ozCC6gdQ+glXOQsveKD0YsDy8DSQFjDTz4zyzEHNV5+JP5D62LmfDZ6o1cycFx9ouG940M5dE8C8CTewdj2YWQ=="],
|
||||
|
||||
"make-dir": ["make-dir@4.0.0", "", { "dependencies": { "semver": "^7.5.3" } }, "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw=="],
|
||||
|
||||
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
|
||||
|
||||
"merge-stream": ["merge-stream@2.0.0", "", {}, "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w=="],
|
||||
|
||||
"merge2": ["merge2@1.4.1", "", {}, "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg=="],
|
||||
|
||||
"micromatch": ["micromatch@4.0.8", "", { "dependencies": { "braces": "^3.0.3", "picomatch": "^2.3.1" } }, "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA=="],
|
||||
|
||||
"mime-db": ["mime-db@1.52.0", "", {}, "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg=="],
|
||||
|
||||
"mime-types": ["mime-types@2.1.35", "", { "dependencies": { "mime-db": "1.52.0" } }, "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw=="],
|
||||
|
||||
"mimic-fn": ["mimic-fn@2.1.0", "", {}, "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="],
|
||||
|
||||
"mimic-response": ["mimic-response@3.1.0", "", {}, "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ=="],
|
||||
|
||||
"minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
|
||||
|
||||
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
|
||||
|
||||
"minimisted": ["minimisted@2.0.1", "", { "dependencies": { "minimist": "^1.2.5" } }, "sha512-1oPjfuLQa2caorJUM8HV8lGgWCc0qqAO1MNv/k05G4qslmsndV/5WdNZrqCiyqiz3wohia2Ij2B7w2Dr7/IyrA=="],
|
||||
|
||||
"mixme": ["mixme@0.5.10", "", {}, "sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q=="],
|
||||
|
||||
"mute-stream": ["mute-stream@2.0.0", "", {}, "sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA=="],
|
||||
|
||||
"node-fetch": ["node-fetch@2.7.0", "", { "dependencies": { "whatwg-url": "^5.0.0" }, "peerDependencies": { "encoding": "^0.1.0" }, "optionalPeers": ["encoding"] }, "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A=="],
|
||||
|
||||
"normalize-url": ["normalize-url@8.0.1", "", {}, "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w=="],
|
||||
|
||||
"npm-run-path": ["npm-run-path@4.0.1", "", { "dependencies": { "path-key": "^3.0.0" } }, "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw=="],
|
||||
|
||||
"object-inspect": ["object-inspect@1.13.2", "", {}, "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g=="],
|
||||
|
||||
"object-keys": ["object-keys@1.1.1", "", {}, "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA=="],
|
||||
|
||||
"object.assign": ["object.assign@4.1.5", "", { "dependencies": { "call-bind": "^1.0.5", "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" } }, "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ=="],
|
||||
|
||||
"once": ["once@1.4.0", "", { "dependencies": { "wrappy": "1" } }, "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w=="],
|
||||
|
||||
"onetime": ["onetime@5.1.2", "", { "dependencies": { "mimic-fn": "^2.1.0" } }, "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg=="],
|
||||
|
||||
"p-cancelable": ["p-cancelable@3.0.0", "", {}, "sha512-mlVgR3PGuzlo0MmTdk4cXqXWlwQDLnONTAg6sm62XkMJEiRxN3GL3SffkYvqwonbkJBcrI7Uvv5Zh9yjvn2iUw=="],
|
||||
|
||||
"p-limit": ["p-limit@2.3.0", "", { "dependencies": { "p-try": "^2.0.0" } }, "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w=="],
|
||||
|
||||
"p-locate": ["p-locate@4.1.0", "", { "dependencies": { "p-limit": "^2.2.0" } }, "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A=="],
|
||||
|
||||
"p-try": ["p-try@2.2.0", "", {}, "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ=="],
|
||||
|
||||
"pako": ["pako@1.0.11", "", {}, "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw=="],
|
||||
|
||||
"path-browserify": ["path-browserify@1.0.1", "", {}, "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g=="],
|
||||
|
||||
"path-exists": ["path-exists@4.0.0", "", {}, "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w=="],
|
||||
|
||||
"path-key": ["path-key@3.1.1", "", {}, "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q=="],
|
||||
|
||||
"peek-readable": ["peek-readable@5.3.1", "", {}, "sha512-GVlENSDW6KHaXcd9zkZltB7tCLosKB/4Hg0fqBJkAoBgYG2Tn1xtMgXtSUuMU9AK/gCm/tTdT8mgAeF4YNeeqw=="],
|
||||
|
||||
"pend": ["pend@1.2.0", "", {}, "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg=="],
|
||||
|
||||
"picomatch": ["picomatch@2.3.1", "", {}, "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA=="],
|
||||
|
||||
"pify": ["pify@4.0.1", "", {}, "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g=="],
|
||||
|
||||
"piscina": ["piscina@4.7.0", "", { "optionalDependencies": { "@napi-rs/nice": "^1.0.1" } }, "sha512-b8hvkpp9zS0zsfa939b/jXbe64Z2gZv0Ha7FYPNUiDIB1y2AtxcOZdfP8xN8HFjUaqQiT9gRlfjAsoL8vdJ1Iw=="],
|
||||
|
||||
"plist": ["plist@3.1.0", "", { "dependencies": { "@xmldom/xmldom": "^0.8.8", "base64-js": "^1.5.1", "xmlbuilder": "^15.1.1" } }, "sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ=="],
|
||||
|
||||
"possible-typed-array-names": ["possible-typed-array-names@1.0.0", "", {}, "sha512-d7Uw+eZoloe0EHDIYoe+bQ5WXnGMOpmiZFTuMWCwpjzzkL2nTjcKiAk4hh8TjnGye2TwWOk3UXucZ+3rbmBa8Q=="],
|
||||
|
||||
"progress": ["progress@2.0.3", "", {}, "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA=="],
|
||||
|
||||
"properties": ["properties@1.2.1", "", {}, "sha512-qYNxyMj1JeW54i/EWEFsM1cVwxJbtgPp8+0Wg9XjNaK6VE/c4oRi6PNu5p7w1mNXEIQIjV5Wwn8v8Gz82/QzdQ=="],
|
||||
|
||||
"proto-list": ["proto-list@1.2.4", "", {}, "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA=="],
|
||||
|
||||
"queue-microtask": ["queue-microtask@1.2.3", "", {}, "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A=="],
|
||||
|
||||
"queue-tick": ["queue-tick@1.0.1", "", {}, "sha512-kJt5qhMxoszgU/62PLP1CJytzd2NKetjSRnyuj31fDd3Rlcz3fzlFdFLD1SItunPwyqEOkca6GbV612BWfaBag=="],
|
||||
|
||||
"quick-lru": ["quick-lru@5.1.1", "", {}, "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA=="],
|
||||
|
||||
"read": ["read@4.1.0", "", { "dependencies": { "mute-stream": "^2.0.0" } }, "sha512-uRfX6K+f+R8OOrYScaM3ixPY4erg69f8DN6pgTvMcA9iRc8iDhwrA4m3Yu8YYKsXJgVvum+m8PkRboZwwuLzYA=="],
|
||||
|
||||
"readable-stream": ["readable-stream@3.6.2", "", { "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", "util-deprecate": "^1.0.1" } }, "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA=="],
|
||||
|
||||
"regenerator-runtime": ["regenerator-runtime@0.14.1", "", {}, "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw=="],
|
||||
|
||||
"regexp.prototype.flags": ["regexp.prototype.flags@1.5.3", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "set-function-name": "^2.0.2" } }, "sha512-vqlC04+RQoFalODCbCumG2xIOvapzVMHwsyIGM/SIE8fRhFFsXeH8/QQ+s0T0kDAhKc4k30s73/0ydkHQz6HlQ=="],
|
||||
|
||||
"registry-auth-token": ["registry-auth-token@5.1.0", "", { "dependencies": { "@pnpm/npm-conf": "^2.1.0" } }, "sha512-GdekYuwLXLxMuFTwAPg5UKGLW/UXzQrZvH/Zj791BQif5T05T0RsaLfHc9q3ZOKi7n+BoprPD9mJ0O0k4xzUlw=="],
|
||||
|
||||
"require-directory": ["require-directory@2.1.1", "", {}, "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q=="],
|
||||
|
||||
"require-main-filename": ["require-main-filename@2.0.0", "", {}, "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="],
|
||||
|
||||
"resolve-alpn": ["resolve-alpn@1.2.1", "", {}, "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g=="],
|
||||
|
||||
"responselike": ["responselike@3.0.0", "", { "dependencies": { "lowercase-keys": "^3.0.0" } }, "sha512-40yHxbNcl2+rzXvZuVkrYohathsSJlMTXKryG5y8uciHv1+xDLHQpgjG64JUO9nrEq2jGLH6IZ8BcZyw3wrweg=="],
|
||||
|
||||
"reusify": ["reusify@1.0.4", "", {}, "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw=="],
|
||||
|
||||
"run-parallel": ["run-parallel@1.2.0", "", { "dependencies": { "queue-microtask": "^1.2.2" } }, "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA=="],
|
||||
|
||||
"safe-array-concat": ["safe-array-concat@1.1.2", "", { "dependencies": { "call-bind": "^1.0.7", "get-intrinsic": "^1.2.4", "has-symbols": "^1.0.3", "isarray": "^2.0.5" } }, "sha512-vj6RsCsWBCf19jIeHEfkRMw8DPiBb+DMXklQ/1SGDHOMlHdPUkZXFQ2YdplS23zESTijAcurb1aSgJA3AgMu1Q=="],
|
||||
|
||||
"safe-buffer": ["safe-buffer@5.2.1", "", {}, "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ=="],
|
||||
|
||||
"safe-regex-test": ["safe-regex-test@1.0.3", "", { "dependencies": { "call-bind": "^1.0.6", "es-errors": "^1.3.0", "is-regex": "^1.1.4" } }, "sha512-CdASjNJPvRa7roO6Ra/gLYBTzYzzPyyBXxIMdGW3USQLyjWEls2RgW5UBTXaQVp+OrpeCK3bLem8smtmheoRuw=="],
|
||||
|
||||
"seek-bzip": ["seek-bzip@2.0.0", "", { "dependencies": { "commander": "^6.0.0" }, "bin": { "seek-bunzip": "bin/seek-bunzip", "seek-table": "bin/seek-bzip-table" } }, "sha512-SMguiTnYrhpLdk3PwfzHeotrcwi8bNV4iemL9tx9poR/yeaMYwB9VzR1w7b57DuWpuqR8n6oZboi0hj3AxZxQg=="],
|
||||
|
||||
"semver": ["semver@7.7.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA=="],
|
||||
|
||||
"semver-regex": ["semver-regex@4.0.5", "", {}, "sha512-hunMQrEy1T6Jr2uEVjrAIqjwWcQTgOAcIM52C8MY1EZSD3DDNft04XzvYKPqjED65bNVVko0YI38nYeEHCX3yw=="],
|
||||
|
||||
"semver-truncate": ["semver-truncate@3.0.0", "", { "dependencies": { "semver": "^7.3.5" } }, "sha512-LJWA9kSvMolR51oDE6PN3kALBNaUdkxzAGcexw8gjMA8xr5zUqK0JiR3CgARSqanYF3Z1YHvsErb1KDgh+v7Rg=="],
|
||||
|
||||
"set-blocking": ["set-blocking@2.0.0", "", {}, "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="],
|
||||
|
||||
"set-function-length": ["set-function-length@1.2.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2" } }, "sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg=="],
|
||||
|
||||
"set-function-name": ["set-function-name@2.0.2", "", { "dependencies": { "define-data-property": "^1.1.4", "es-errors": "^1.3.0", "functions-have-names": "^1.2.3", "has-property-descriptors": "^1.0.2" } }, "sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ=="],
|
||||
|
||||
"sha.js": ["sha.js@2.4.11", "", { "dependencies": { "inherits": "^2.0.1", "safe-buffer": "^5.0.1" }, "bin": { "sha.js": "./bin.js" } }, "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ=="],
|
||||
|
||||
"shebang-command": ["shebang-command@2.0.0", "", { "dependencies": { "shebang-regex": "^3.0.0" } }, "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA=="],
|
||||
|
||||
"shebang-regex": ["shebang-regex@3.0.0", "", {}, "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A=="],
|
||||
|
||||
"side-channel": ["side-channel@1.0.6", "", { "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", "object-inspect": "^1.13.1" } }, "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA=="],
|
||||
|
||||
"signal-exit": ["signal-exit@3.0.7", "", {}, "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="],
|
||||
|
||||
"simple-concat": ["simple-concat@1.0.1", "", {}, "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q=="],
|
||||
|
||||
"simple-get": ["simple-get@4.0.1", "", { "dependencies": { "decompress-response": "^6.0.0", "once": "^1.3.1", "simple-concat": "^1.0.0" } }, "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA=="],
|
||||
|
||||
"slash": ["slash@3.0.0", "", {}, "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q=="],
|
||||
|
||||
"smartwrap": ["smartwrap@2.0.2", "", { "dependencies": { "array.prototype.flat": "^1.2.3", "breakword": "^1.0.5", "grapheme-splitter": "^1.0.4", "strip-ansi": "^6.0.0", "wcwidth": "^1.0.1", "yargs": "^15.1.0" }, "bin": { "smartwrap": "src/terminal-adapter.js" } }, "sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA=="],
|
||||
|
||||
"sort-keys": ["sort-keys@1.1.2", "", { "dependencies": { "is-plain-obj": "^1.0.0" } }, "sha512-vzn8aSqKgytVik0iwdBEi+zevbTYZogewTUM6dtpmGwEcdzbub/TX4bCzRhebDCRC3QzXgJsLRKB2V/Oof7HXg=="],
|
||||
|
||||
"sort-keys-length": ["sort-keys-length@1.0.1", "", { "dependencies": { "sort-keys": "^1.0.0" } }, "sha512-GRbEOUqCxemTAk/b32F2xa8wDTs+Z1QHOkbhJDQTvv/6G3ZkbJ+frYWsTcc7cBB3Fu4wy4XlLCuNtJuMn7Gsvw=="],
|
||||
|
||||
"source-map": ["source-map@0.7.4", "", {}, "sha512-l3BikUxvPOcn5E74dZiq5BGsTb5yEwhaTSzccU6t4sDOH8NWJCstKO5QT2CvtFoK6F0saL7p9xHAqHOlCPJygA=="],
|
||||
|
||||
"stream-to": ["stream-to@0.2.2", "", {}, "sha512-Kg1BSDTwgGiVMtTCJNlo7kk/xzL33ZuZveEBRt6rXw+f1WLK/8kmz2NVCT/Qnv0JkV85JOHcLhD82mnXsR3kPw=="],
|
||||
|
||||
"stream-to-buffer": ["stream-to-buffer@0.1.0", "", { "dependencies": { "stream-to": "~0.2.0" } }, "sha512-Da4WoKaZyu3nf+bIdIifh7IPkFjARBnBK+pYqn0EUJqksjV9afojjaCCHUemH30Jmu7T2qcKvlZm2ykN38uzaw=="],
|
||||
|
||||
"stream-transform": ["stream-transform@2.1.3", "", { "dependencies": { "mixme": "^0.5.1" } }, "sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ=="],
|
||||
|
||||
"streamifier": ["streamifier@0.1.1", "", {}, "sha512-zDgl+muIlWzXNsXeyUfOk9dChMjlpkq0DRsxujtYPgyJ676yQ8jEm6zzaaWHFDg5BNcLuif0eD2MTyJdZqXpdg=="],
|
||||
|
||||
"streamx": ["streamx@2.20.2", "", { "dependencies": { "fast-fifo": "^1.3.2", "queue-tick": "^1.0.1", "text-decoder": "^1.1.0" }, "optionalDependencies": { "bare-events": "^2.2.0" } }, "sha512-aDGDLU+j9tJcUdPGOaHmVF1u/hhI+CsGkT02V3OKlHDV7IukOI+nTWAGkiZEKCO35rWN1wIr4tS7YFr1f4qSvA=="],
|
||||
|
||||
"string-width": ["string-width@4.2.3", "", { "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", "strip-ansi": "^6.0.1" } }, "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g=="],
|
||||
|
||||
"string.prototype.trim": ["string.prototype.trim@1.2.9", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-abstract": "^1.23.0", "es-object-atoms": "^1.0.0" } }, "sha512-klHuCNxiMZ8MlsOihJhJEBJAiMVqU3Z2nEXWfWnIqjN0gEFS9J9+IxKozWWtQGcgoa1WUZzLjKPTr4ZHNFTFxw=="],
|
||||
|
||||
"string.prototype.trimend": ["string.prototype.trimend@1.0.8", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-p73uL5VCHCO2BZZ6krwwQE3kCzM7NKmis8S//xEC6fQonchbum4eP6kR4DLEjQFO3Wnj3Fuo8NM0kOSjVdHjZQ=="],
|
||||
|
||||
"string.prototype.trimstart": ["string.prototype.trimstart@1.0.8", "", { "dependencies": { "call-bind": "^1.0.7", "define-properties": "^1.2.1", "es-object-atoms": "^1.0.0" } }, "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg=="],
|
||||
|
||||
"string_decoder": ["string_decoder@1.3.0", "", { "dependencies": { "safe-buffer": "~5.2.0" } }, "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA=="],
|
||||
|
||||
"strip-ansi": ["strip-ansi@6.0.1", "", { "dependencies": { "ansi-regex": "^5.0.1" } }, "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A=="],
|
||||
|
||||
"strip-dirs": ["strip-dirs@3.0.0", "", { "dependencies": { "inspect-with-kind": "^1.0.5", "is-plain-obj": "^1.1.0" } }, "sha512-I0sdgcFTfKQlUPZyAqPJmSG3HLO9rWDFnxonnIbskYNM3DwFOeTNB5KzVq3dA1GdRAc/25b5Y7UO2TQfKWw4aQ=="],
|
||||
|
||||
"strip-final-newline": ["strip-final-newline@2.0.0", "", {}, "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA=="],
|
||||
|
||||
"strtok3": ["strtok3@9.0.1", "", { "dependencies": { "@tokenizer/token": "^0.3.0", "peek-readable": "^5.3.1" } }, "sha512-ERPW+XkvX9W2A+ov07iy+ZFJpVdik04GhDA4eVogiG9hpC97Kem2iucyzhFxbFRvQ5o2UckFtKZdp1hkGvnrEw=="],
|
||||
|
||||
"supports-color": ["supports-color@7.2.0", "", { "dependencies": { "has-flag": "^4.0.0" } }, "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw=="],
|
||||
|
||||
"tar-stream": ["tar-stream@3.1.7", "", { "dependencies": { "b4a": "^1.6.4", "fast-fifo": "^1.2.0", "streamx": "^2.15.0" } }, "sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ=="],
|
||||
|
||||
"tcp-ping": ["tcp-ping@0.1.1", "", {}, "sha512-7Ed10Ds0hYnF+O1lfiZ2iSZ1bCAj+96Madctebmq7Y1ALPWlBY4YI8C6pCL+UTlshFY5YogixKLpgDP/4BlHrw=="],
|
||||
|
||||
"text-decoder": ["text-decoder@1.2.1", "", {}, "sha512-x9v3H/lTKIJKQQe7RPQkLfKAnc9lUTkWDypIQgTzPJAq+5/GCDHonmshfvlsNSj58yyshbIJJDLmU15qNERrXQ=="],
|
||||
|
||||
"through": ["through@2.3.8", "", {}, "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg=="],
|
||||
|
||||
"to-regex-range": ["to-regex-range@5.0.1", "", { "dependencies": { "is-number": "^7.0.0" } }, "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ=="],
|
||||
|
||||
"token-types": ["token-types@6.0.0", "", { "dependencies": { "@tokenizer/token": "^0.3.0", "ieee754": "^1.2.1" } }, "sha512-lbDrTLVsHhOMljPscd0yitpozq7Ga2M5Cvez5AjGg8GASBjtt6iERCAJ93yommPmz62fb45oFIXHEZ3u9bfJEA=="],
|
||||
|
||||
"tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="],
|
||||
|
||||
"tty-table": ["tty-table@4.2.3", "", { "dependencies": { "chalk": "^4.1.2", "csv": "^5.5.3", "kleur": "^4.1.5", "smartwrap": "^2.0.2", "strip-ansi": "^6.0.1", "wcwidth": "^1.0.1", "yargs": "^17.7.1" }, "bin": { "tty-table": "adapters/terminal-adapter.js" } }, "sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA=="],
|
||||
|
||||
"typed-array-buffer": ["typed-array-buffer@1.0.2", "", { "dependencies": { "call-bind": "^1.0.7", "es-errors": "^1.3.0", "is-typed-array": "^1.1.13" } }, "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ=="],
|
||||
|
||||
"typed-array-byte-length": ["typed-array-byte-length@1.0.1", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-proto": "^1.0.3", "is-typed-array": "^1.1.13" } }, "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw=="],
|
||||
|
||||
"typed-array-byte-offset": ["typed-array-byte-offset@1.0.2", "", { "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-proto": "^1.0.3", "is-typed-array": "^1.1.13" } }, "sha512-Ous0vodHa56FviZucS2E63zkgtgrACj7omjwd/8lTEMEPFFyjfixMZ1ZXenpgCFBBt4EC1J2XsyVS2gkG0eTFA=="],
|
||||
|
||||
"typed-array-length": ["typed-array-length@1.0.6", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-proto": "^1.0.3", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0" } }, "sha512-/OxDN6OtAk5KBpGb28T+HZc2M+ADtvRxXrKKbUwtsLgdoxgX13hyy7ek6bFRl5+aBs2yZzB0c4CnQfAtVypW/g=="],
|
||||
|
||||
"typescript": ["typescript@5.8.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ=="],
|
||||
|
||||
"uint8array-extras": ["uint8array-extras@1.4.0", "", {}, "sha512-ZPtzy0hu4cZjv3z5NW9gfKnNLjoz4y6uv4HlelAjDK7sY/xOkKZv9xK/WQpcsBB3jEybChz9DPC2U/+cusjJVQ=="],
|
||||
|
||||
"unbox-primitive": ["unbox-primitive@1.0.2", "", { "dependencies": { "call-bind": "^1.0.2", "has-bigints": "^1.0.2", "has-symbols": "^1.0.3", "which-boxed-primitive": "^1.0.2" } }, "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw=="],
|
||||
|
||||
"unbzip2-stream": ["unbzip2-stream@1.4.3", "", { "dependencies": { "buffer": "^5.2.1", "through": "^2.3.8" } }, "sha512-mlExGW4w71ebDJviH16lQLtZS32VKqsSfk80GCfUlwT/4/hNRFsoscrF/c++9xinkMzECL1uL9DDwXqFWkruPg=="],
|
||||
|
||||
"undici-types": ["undici-types@6.21.0", "", {}, "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ=="],
|
||||
|
||||
"universalify": ["universalify@0.1.2", "", {}, "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg=="],
|
||||
|
||||
"util-deprecate": ["util-deprecate@1.0.2", "", {}, "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw=="],
|
||||
|
||||
"wcwidth": ["wcwidth@1.0.1", "", { "dependencies": { "defaults": "^1.0.3" } }, "sha512-XHPEwS0q6TaxcvG85+8EYkbiCux2XtWG2mkc47Ng2A77BQu9+DqIOJldST4HgPkuea7dvKSj5VgX3P1d4rW8Tg=="],
|
||||
|
||||
"webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="],
|
||||
|
||||
"whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="],
|
||||
|
||||
"which": ["which@2.0.2", "", { "dependencies": { "isexe": "^2.0.0" }, "bin": { "node-which": "./bin/node-which" } }, "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA=="],
|
||||
|
||||
"which-boxed-primitive": ["which-boxed-primitive@1.0.2", "", { "dependencies": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", "is-number-object": "^1.0.4", "is-string": "^1.0.5", "is-symbol": "^1.0.3" } }, "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg=="],
|
||||
|
||||
"which-module": ["which-module@2.0.1", "", {}, "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="],
|
||||
|
||||
"which-typed-array": ["which-typed-array@1.1.15", "", { "dependencies": { "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "has-tostringtag": "^1.0.2" } }, "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA=="],
|
||||
|
||||
"wrap-ansi": ["wrap-ansi@7.0.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q=="],
|
||||
|
||||
"wrappy": ["wrappy@1.0.2", "", {}, "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="],
|
||||
|
||||
"xmlbuilder": ["xmlbuilder@15.1.1", "", {}, "sha512-yMqGBqtXyeN1e3TGYvgNgDVZ3j84W4cwkOXQswghol6APgZWaff9lnbvN7MHYJOiXsvGPXtjTYJEiC9J2wv9Eg=="],
|
||||
|
||||
"y18n": ["y18n@5.0.8", "", {}, "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA=="],
|
||||
|
||||
"yargs": ["yargs@17.7.2", "", { "dependencies": { "cliui": "^8.0.1", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", "string-width": "^4.2.3", "y18n": "^5.0.5", "yargs-parser": "^21.1.1" } }, "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w=="],
|
||||
|
||||
"yargs-parser": ["yargs-parser@21.1.1", "", {}, "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw=="],
|
||||
|
||||
"yauzl": ["yauzl@3.2.0", "", { "dependencies": { "buffer-crc32": "~0.2.3", "pend": "~1.2.0" } }, "sha512-Ow9nuGZE+qp1u4JIPvg+uCiUr7xGQWdff7JQSk5VGYTAZMDe2q8lxJ10ygv10qmSj031Ty/6FNJpLO4o1Sgc+w=="],
|
||||
|
||||
"yazl": ["yazl@3.3.1", "", { "dependencies": { "buffer-crc32": "^1.0.0" } }, "sha512-BbETDVWG+VcMUle37k5Fqp//7SDOK2/1+T7X8TD96M3D9G8jK5VLUdQVdVjGi8im7FGkazX7kk5hkU8X4L5Bng=="],
|
||||
|
||||
"@pnpm/network.ca-file/graceful-fs": ["graceful-fs@4.2.10", "", {}, "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA=="],
|
||||
|
||||
"@swc/cli/commander": ["commander@8.3.0", "", {}, "sha512-OkTL9umf+He2DZkUq8f8J9of7yL6RJKI24dVITBmNfZBmri9zYZQrKkuXiKhyfPSu8tUhnVBB1iKXevvnlR4Ww=="],
|
||||
|
||||
"@types/fs-extra/@types/node": ["@types/node@22.9.3", "", { "dependencies": { "undici-types": "~6.19.8" } }, "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw=="],
|
||||
|
||||
"@types/jsonfile/@types/node": ["@types/node@22.9.3", "", { "dependencies": { "undici-types": "~6.19.8" } }, "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw=="],
|
||||
|
||||
"@types/node-fetch/@types/node": ["@types/node@22.9.3", "", { "dependencies": { "undici-types": "~6.19.8" } }, "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw=="],
|
||||
|
||||
"@types/node-fetch/form-data": ["form-data@4.0.1", "", { "dependencies": { "asynckit": "^0.4.0", "combined-stream": "^1.0.8", "mime-types": "^2.1.12" } }, "sha512-tzN8e4TX8+kkxGPK8D5u0FNmjPUjw3lwC9lSLxxoB/+GtsJG91CO8bSWy73APlgAZzZbXEYZJuxjkHH2w+Ezhw=="],
|
||||
|
||||
"@types/progress/@types/node": ["@types/node@22.9.3", "", { "dependencies": { "undici-types": "~6.19.8" } }, "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw=="],
|
||||
|
||||
"@types/yauzl/@types/node": ["@types/node@22.9.3", "", { "dependencies": { "undici-types": "~6.19.8" } }, "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw=="],
|
||||
|
||||
"@types/yazl/@types/node": ["@types/node@22.9.3", "", { "dependencies": { "undici-types": "~6.19.8" } }, "sha512-F3u1fs/fce3FFk+DAxbxc78DF8x0cY09RRL8GnXLmkJ1jvx3TtPdWoTT5/NiYfI5ASqXBmfqJi9dZ3gxMx4lzw=="],
|
||||
|
||||
"@xhmikosr/downloader/defaults": ["defaults@3.0.0", "", {}, "sha512-RsqXDEAALjfRTro+IFNKpcPCt0/Cy2FqHSIlnomiJp9YGadpQnrtbRpSgN2+np21qHcIKiva4fiOQGjS9/qR/A=="],
|
||||
|
||||
"arraybuffer.prototype.slice/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"bin-version-check/semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="],
|
||||
|
||||
"cacheable-request/mimic-response": ["mimic-response@4.0.0", "", {}, "sha512-e5ISH9xMYU0DzrT+jl8q2ze9D6eWBto+I8CNpe+VI+K2J/F/k3PdkdTdz4wvGVH4NTpo+NRYTVIuMQEMMcsLqg=="],
|
||||
|
||||
"call-bind/es-define-property": ["es-define-property@1.0.0", "", { "dependencies": { "get-intrinsic": "^1.2.4" } }, "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ=="],
|
||||
|
||||
"call-bind/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"config-chain/ini": ["ini@1.3.8", "", {}, "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew=="],
|
||||
|
||||
"define-data-property/es-define-property": ["es-define-property@1.0.0", "", { "dependencies": { "get-intrinsic": "^1.2.4" } }, "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ=="],
|
||||
|
||||
"define-data-property/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"es-abstract/es-define-property": ["es-define-property@1.0.0", "", { "dependencies": { "get-intrinsic": "^1.2.4" } }, "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ=="],
|
||||
|
||||
"es-abstract/es-object-atoms": ["es-object-atoms@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw=="],
|
||||
|
||||
"es-abstract/es-set-tostringtag": ["es-set-tostringtag@2.0.3", "", { "dependencies": { "get-intrinsic": "^1.2.4", "has-tostringtag": "^1.0.2", "hasown": "^2.0.1" } }, "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ=="],
|
||||
|
||||
"es-abstract/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"es-abstract/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"es-abstract/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"file-type/get-stream": ["get-stream@9.0.1", "", { "dependencies": { "@sec-ant/readable-stream": "^0.4.1", "is-stream": "^4.0.1" } }, "sha512-kVCxPF3vQM/N0B1PmoqVUqgHP+EeVjmZSQn+1oCRPxd2P21P2F19lIgbR3HBosbB1PUhOAoctJnfEn2GbN2eZA=="],
|
||||
|
||||
"get-symbol-description/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"globalthis/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"has-property-descriptors/es-define-property": ["es-define-property@1.0.0", "", { "dependencies": { "get-intrinsic": "^1.2.4" } }, "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ=="],
|
||||
|
||||
"has-tostringtag/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"is-array-buffer/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"is-symbol/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"isomorphic-unzip/yauzl": ["yauzl@2.10.0", "", { "dependencies": { "buffer-crc32": "~0.2.3", "fd-slicer": "~1.1.0" } }, "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g=="],
|
||||
|
||||
"make-dir/semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="],
|
||||
|
||||
"object.assign/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"safe-array-concat/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"safe-array-concat/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"seek-bzip/commander": ["commander@6.2.1", "", {}, "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA=="],
|
||||
|
||||
"semver-truncate/semver": ["semver@7.6.3", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A=="],
|
||||
|
||||
"set-function-length/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"set-function-length/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"side-channel/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"smartwrap/yargs": ["yargs@15.4.1", "", { "dependencies": { "cliui": "^6.0.0", "decamelize": "^1.2.0", "find-up": "^4.1.0", "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", "yargs-parser": "^18.1.2" } }, "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A=="],
|
||||
|
||||
"string.prototype.trim/es-object-atoms": ["es-object-atoms@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw=="],
|
||||
|
||||
"string.prototype.trimend/es-object-atoms": ["es-object-atoms@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw=="],
|
||||
|
||||
"string.prototype.trimstart/es-object-atoms": ["es-object-atoms@1.0.0", "", { "dependencies": { "es-errors": "^1.3.0" } }, "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw=="],
|
||||
|
||||
"typed-array-byte-length/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"typed-array-byte-offset/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"typed-array-length/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"unbox-primitive/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"which-typed-array/gopd": ["gopd@1.0.1", "", { "dependencies": { "get-intrinsic": "^1.1.3" } }, "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA=="],
|
||||
|
||||
"yazl/buffer-crc32": ["buffer-crc32@1.0.0", "", {}, "sha512-Db1SbgBS/fg/392AblrMJk97KggmvYhr4pB5ZIMTWtaivCPMWLkmb7m21cJvpvgK+J3nsU2CmmixNBZx4vFj/w=="],
|
||||
|
||||
"@types/fs-extra/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
|
||||
|
||||
"@types/jsonfile/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
|
||||
|
||||
"@types/node-fetch/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
|
||||
|
||||
"@types/progress/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
|
||||
|
||||
"@types/yauzl/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
|
||||
|
||||
"@types/yazl/@types/node/undici-types": ["undici-types@6.19.8", "", {}, "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw=="],
|
||||
|
||||
"arraybuffer.prototype.slice/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"call-bind/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"define-data-property/es-define-property/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"define-data-property/gopd/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"file-type/get-stream/is-stream": ["is-stream@4.0.1", "", {}, "sha512-Dnz92NInDqYckGEUJv689RbRiTSEHCQ7wOVeALbkOz999YpqT46yMRIGtSNl2iCL1waAZSx40+h59NV/EwzV/A=="],
|
||||
|
||||
"get-symbol-description/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"globalthis/gopd/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"has-property-descriptors/es-define-property/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"is-array-buffer/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"set-function-length/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"side-channel/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"smartwrap/yargs/cliui": ["cliui@6.0.0", "", { "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", "wrap-ansi": "^6.2.0" } }, "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ=="],
|
||||
|
||||
"smartwrap/yargs/y18n": ["y18n@4.0.3", "", {}, "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="],
|
||||
|
||||
"smartwrap/yargs/yargs-parser": ["yargs-parser@18.1.3", "", { "dependencies": { "camelcase": "^5.0.0", "decamelize": "^1.2.0" } }, "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ=="],
|
||||
|
||||
"typed-array-byte-length/gopd/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"typed-array-byte-offset/gopd/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"typed-array-length/gopd/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"which-typed-array/gopd/get-intrinsic": ["get-intrinsic@1.2.4", "", { "dependencies": { "es-errors": "^1.3.0", "function-bind": "^1.1.2", "has-proto": "^1.0.1", "has-symbols": "^1.0.3", "hasown": "^2.0.0" } }, "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ=="],
|
||||
|
||||
"define-data-property/es-define-property/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"define-data-property/gopd/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"globalthis/gopd/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"has-property-descriptors/es-define-property/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"smartwrap/yargs/cliui/wrap-ansi": ["wrap-ansi@6.2.0", "", { "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", "strip-ansi": "^6.0.0" } }, "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA=="],
|
||||
|
||||
"typed-array-byte-length/gopd/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"typed-array-byte-offset/gopd/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"typed-array-length/gopd/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
|
||||
"which-typed-array/gopd/get-intrinsic/has-symbols": ["has-symbols@1.0.3", "", {}, "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A=="],
|
||||
}
|
||||
}
|
127
cli.json
127
cli.json
@@ -3,11 +3,9 @@
|
||||
"defaultCommand": "help",
|
||||
"commands": {
|
||||
"help": {},
|
||||
|
||||
"login": {},
|
||||
"logout": {},
|
||||
"me": {},
|
||||
|
||||
"createApp": {
|
||||
"options": {
|
||||
"name": {
|
||||
@@ -33,9 +31,10 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"uploadIpa": {},
|
||||
"uploadApk": {},
|
||||
"uploadApp": {},
|
||||
"parseApp": {},
|
||||
"parseIpa": {},
|
||||
"parseApk": {},
|
||||
"packages": {
|
||||
@@ -45,7 +44,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"publish": {
|
||||
"options": {
|
||||
"platform": {
|
||||
@@ -69,7 +67,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"update": {
|
||||
"options": {
|
||||
"platform": {
|
||||
@@ -80,15 +77,48 @@
|
||||
},
|
||||
"packageId": {
|
||||
"hasValue": true
|
||||
},
|
||||
"packageVersion": {
|
||||
"hasValue": true
|
||||
},
|
||||
"minPackageVersion": {
|
||||
"hasValue": true
|
||||
},
|
||||
"maxPackageVersion": {
|
||||
"hasValue": true
|
||||
},
|
||||
"rollout": {
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"updateVersionInfo": {
|
||||
"options": {
|
||||
"platform": {
|
||||
"hasValue": true
|
||||
},
|
||||
"versionId": {
|
||||
"hasValue": true
|
||||
},
|
||||
"name": {
|
||||
"default": false,
|
||||
"hasValue": true
|
||||
},
|
||||
"description": {
|
||||
"default": false,
|
||||
"hasValue": true
|
||||
},
|
||||
"metaInfo": {
|
||||
"default": false,
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"build": {
|
||||
"description": "Bundle javascript and copy assets."
|
||||
},
|
||||
"bundle": {
|
||||
"description": "Bundle javascript code only.",
|
||||
"description": "Bundle javascript code only and optionally publish.",
|
||||
"options": {
|
||||
"dev": {
|
||||
"default": "false",
|
||||
@@ -106,14 +136,40 @@
|
||||
"hasValue": true
|
||||
},
|
||||
"intermediaDir": {
|
||||
"default": "build/intermedia/${platform}",
|
||||
"default": "${tempDir}/intermedia/${platform}",
|
||||
"hasValue": true
|
||||
},
|
||||
"output": {
|
||||
"default": "build/output/${platform}.${time}.ppk",
|
||||
"default": "${tempDir}/output/${platform}.${time}.ppk",
|
||||
"hasValue": true
|
||||
},
|
||||
"verbose": {}
|
||||
"sourcemap": {
|
||||
"default": false
|
||||
},
|
||||
"taro": {
|
||||
"default": false
|
||||
},
|
||||
"expo": {
|
||||
"default": false
|
||||
},
|
||||
"rncli": {
|
||||
"default": false
|
||||
},
|
||||
"disableHermes": {
|
||||
"default": false
|
||||
},
|
||||
"name": {
|
||||
"hasValue": true,
|
||||
"description": "Version name for publishing"
|
||||
},
|
||||
"description": {
|
||||
"hasValue": true,
|
||||
"description": "Version description for publishing"
|
||||
},
|
||||
"metaInfo": {
|
||||
"hasValue": true,
|
||||
"description": "Meta information for publishing"
|
||||
}
|
||||
}
|
||||
},
|
||||
"release": {
|
||||
@@ -123,7 +179,7 @@
|
||||
"description": "Create diff patch",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "build/output/diff",
|
||||
"default": "${tempDir}/output/diff",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
@@ -132,7 +188,7 @@
|
||||
"description": "Create diff patch from a Android package(.apk)",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "build/output/diff-${time}.apk-patch",
|
||||
"default": "${tempDir}/output/diff-${time}.apk-patch",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
@@ -141,7 +197,52 @@
|
||||
"description": "Create diff patch from a iOS package(.ipa)",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "build/output/diff-${time}.ipa-patch",
|
||||
"default": "${tempDir}/output/diff-${time}.ipa-patch",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"hdiff": {
|
||||
"description": "Create hdiff patch",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "${tempDir}/output/hdiff",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"hdiffFromApk": {
|
||||
"description": "Create hdiff patch from a Android package(.apk)",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "${tempDir}/output/hdiff-${time}.apk-patch",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"hdiffFromPPK": {
|
||||
"description": "Create hdiff patch from a Prepare package(.ppk)",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "${tempDir}/output/hdiff-${time}.ppk-patch",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"hdiffFromApp": {
|
||||
"description": "Create hdiff patch from a Harmony package(.app)",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "${tempDir}/output/hdiff-${time}.app-patch",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"hdiffFromIpa": {
|
||||
"description": "Create hdiff patch from a iOS package(.ipa)",
|
||||
"options": {
|
||||
"output": {
|
||||
"default": "${tempDir}/output/hdiff-${time}.ipa-patch",
|
||||
"hasValue": true
|
||||
}
|
||||
}
|
||||
|
5
index.js
5
index.js
@@ -1,4 +1 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/22/16.
|
||||
*/
|
||||
module.exports = require('./lib');
|
||||
module.exports = require('./lib');
|
||||
|
74
package.json
74
package.json
@@ -1,10 +1,11 @@
|
||||
{
|
||||
"name": "react-native-update-cli",
|
||||
"version": "1.2.3",
|
||||
"description": "Command tools for javaScript updater with `pushy` service for react native apps.",
|
||||
"version": "1.44.7",
|
||||
"description": "command line tool for react-native-update (remote updates for react native)",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"pushy": "lib/index.js"
|
||||
"pushy": "lib/index.js",
|
||||
"cresc": "lib/index.js"
|
||||
},
|
||||
"files": [
|
||||
"lib",
|
||||
@@ -12,8 +13,9 @@
|
||||
"cli.json"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"prepublish": "babel src --out-dir lib"
|
||||
"build": "swc src -d lib --strip-leading-paths",
|
||||
"prepublishOnly": "npm run build && chmod +x lib/index.js",
|
||||
"lint": "tsc --noEmit & biome check --write ."
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -23,6 +25,7 @@
|
||||
"react-native",
|
||||
"ios",
|
||||
"android",
|
||||
"harmony",
|
||||
"update"
|
||||
],
|
||||
"author": "reactnativecn",
|
||||
@@ -32,29 +35,54 @@
|
||||
},
|
||||
"homepage": "https://github.com/reactnativecn/react-native-pushy/tree/master/react-native-pushy-cli",
|
||||
"dependencies": {
|
||||
"app-info-parser": "^1.0.0",
|
||||
"@colors/colors": "^1.6.0",
|
||||
"bplist-parser": "^0.3.2",
|
||||
"bytebuffer": "^5.0.1",
|
||||
"cgbi-to-png": "^1.0.7",
|
||||
"chalk": "4",
|
||||
"cli-arguments": "^0.2.1",
|
||||
"filesize-parser": "^1.5.0",
|
||||
"commander": "^13",
|
||||
"compare-versions": "^6.1.1",
|
||||
"filesize-parser": "^1.5.1",
|
||||
"form-data": "^4.0.2",
|
||||
"fs-extra": "8",
|
||||
"gradle-to-js": "^2.0.0",
|
||||
"global-dirs": "^4.0.0",
|
||||
"gradle-to-js": "^2.0.1",
|
||||
"i18next": "^24.2.3",
|
||||
"isomorphic-git": "^1.30.1",
|
||||
"isomorphic-unzip": "^1.1.5",
|
||||
"node-fetch": "^2.6.1",
|
||||
"plist": "^3.1.0",
|
||||
"progress": "^2.0.3",
|
||||
"read": "^1.0.7",
|
||||
"request": "^2.88.2",
|
||||
"properties": "^1.2.1",
|
||||
"read": "^4.1.0",
|
||||
"registry-auth-token": "^5.1.0",
|
||||
"semver": "^7.7.1",
|
||||
"tcp-ping": "^0.1.1",
|
||||
"tty-table": "4.1",
|
||||
"update-notifier": "^4.1.1",
|
||||
"yauzl": "^2.10.0",
|
||||
"yazl": "2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"babel-cli": "^6.26.0",
|
||||
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
|
||||
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
||||
"babel-plugin-transform-es2015-spread": "^6.22.0",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.26.0"
|
||||
"tty-table": "4.2",
|
||||
"yauzl": "^3.2.0",
|
||||
"yazl": "3.3.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
"node": ">= 14"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^1.9.4",
|
||||
"@swc/cli": "0.7.3",
|
||||
"@swc/core": "^1.11.24",
|
||||
"@types/filesize-parser": "^1.5.3",
|
||||
"@types/fs-extra": "^11.0.4",
|
||||
"@types/node": "^22.14.1",
|
||||
"@types/node-fetch": "^2.6.12",
|
||||
"@types/progress": "^2.0.7",
|
||||
"@types/semver": "^7.7.0",
|
||||
"@types/tcp-ping": "^0.1.6",
|
||||
"@types/yauzl": "^2.10.3",
|
||||
"@types/yazl": "^2.4.6",
|
||||
"typescript": "^5.8.3"
|
||||
},
|
||||
"trustedDependencies": [
|
||||
"@biomejs/biome",
|
||||
"@swc/core"
|
||||
]
|
||||
}
|
||||
|
178
src/api.js
178
src/api.js
@@ -1,178 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/13/16.
|
||||
*/
|
||||
|
||||
const fetch = require('node-fetch');
|
||||
const defaultEndpoint = 'http://u.reactnative.cn/api'
|
||||
let host = process.env.PUSHY_REGISTRY || defaultEndpoint;
|
||||
const fs = require('fs');
|
||||
import request from 'request';
|
||||
import ProgressBar from 'progress';
|
||||
const packageJson = require('../package.json');
|
||||
const tcpp = require('tcp-ping');
|
||||
const util = require('util');
|
||||
const path = require('path');
|
||||
import filesizeParser from 'filesize-parser';
|
||||
import { pricingPageUrl } from './utils';
|
||||
|
||||
const tcpPing = util.promisify(tcpp.ping);
|
||||
|
||||
let session = undefined;
|
||||
let savedSession = undefined;
|
||||
|
||||
const userAgent = `react-native-update-cli/${packageJson.version}`;
|
||||
|
||||
exports.loadSession = async function() {
|
||||
if (fs.existsSync('.update')) {
|
||||
try {
|
||||
exports.replaceSession(JSON.parse(fs.readFileSync('.update', 'utf8')));
|
||||
savedSession = session;
|
||||
} catch (e) {
|
||||
console.error(
|
||||
'Failed to parse file `.update`. Try to remove it manually.',
|
||||
);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
exports.getSession = function() {
|
||||
return session;
|
||||
};
|
||||
|
||||
exports.replaceSession = function(newSession) {
|
||||
session = newSession;
|
||||
};
|
||||
|
||||
exports.saveSession = function() {
|
||||
// Only save on change.
|
||||
if (session !== savedSession) {
|
||||
const current = session;
|
||||
const data = JSON.stringify(current, null, 4);
|
||||
fs.writeFileSync('.update', data, 'utf8');
|
||||
savedSession = current;
|
||||
}
|
||||
};
|
||||
|
||||
exports.closeSession = function() {
|
||||
if (fs.existsSync('.update')) {
|
||||
fs.unlinkSync('.update');
|
||||
savedSession = undefined;
|
||||
}
|
||||
session = undefined;
|
||||
host = process.env.PUSHY_REGISTRY || defaultEndpoint;
|
||||
};
|
||||
|
||||
async function query(url, options) {
|
||||
const resp = await fetch(url, options);
|
||||
const json = await resp.json();
|
||||
if (resp.status !== 200) {
|
||||
throw Object.assign(new Error(json.message || json.error), {
|
||||
status: resp.status,
|
||||
});
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
function queryWithoutBody(method) {
|
||||
return function(api) {
|
||||
return query(host + api, {
|
||||
method,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
'X-AccessToken': session ? session.token : '',
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function queryWithBody(method) {
|
||||
return function(api, body) {
|
||||
return query(host + api, {
|
||||
method,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
'Content-Type': 'application/json',
|
||||
'X-AccessToken': session ? session.token : '',
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
exports.get = queryWithoutBody('GET');
|
||||
exports.post = queryWithBody('POST');
|
||||
exports.put = queryWithBody('PUT');
|
||||
exports.doDelete = queryWithBody('DELETE');
|
||||
|
||||
async function uploadFile(fn, key) {
|
||||
const { url, backupUrl, formData, maxSize } = await exports.post('/upload', {
|
||||
ext: path.extname(fn)
|
||||
});
|
||||
let realUrl = url;
|
||||
|
||||
if (backupUrl) {
|
||||
const pingResult = await tcpPing({
|
||||
address: url.replace('https://', ''),
|
||||
attempts: 4,
|
||||
timeout: 1000,
|
||||
});
|
||||
// console.log({pingResult});
|
||||
if (isNaN(pingResult.avg) || pingResult.avg > 150) {
|
||||
realUrl = backupUrl;
|
||||
}
|
||||
// console.log({realUrl});
|
||||
}
|
||||
|
||||
const fileSize = fs.statSync(fn).size;
|
||||
if (maxSize && fileSize > filesizeParser(maxSize)) {
|
||||
throw new Error(`此文件大小超出上限${maxSize}。您可以考虑升级付费业务以提升此限制。详情请访问:${pricingPageUrl}`)
|
||||
}
|
||||
|
||||
const bar = new ProgressBar(' Uploading [:bar] :percent :etas', {
|
||||
complete: '=',
|
||||
incomplete: ' ',
|
||||
total: fileSize,
|
||||
});
|
||||
|
||||
const info = await new Promise((resolve, reject) => {
|
||||
if (key) {
|
||||
formData.key = key;
|
||||
}
|
||||
formData.file = fs.createReadStream(fn);
|
||||
|
||||
formData.file.on('data', function(data) {
|
||||
bar.tick(data.length);
|
||||
});
|
||||
request.post(
|
||||
realUrl,
|
||||
{
|
||||
formData,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
'X-AccessToken': session ? session.token : '',
|
||||
},
|
||||
},
|
||||
(err, resp, body) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
if (resp.statusCode > 299) {
|
||||
return reject(
|
||||
Object.assign(new Error(body), { status: resp.statusCode }),
|
||||
);
|
||||
}
|
||||
resolve(
|
||||
body
|
||||
? // qiniu
|
||||
JSON.parse(body)
|
||||
: // aliyun oss
|
||||
{ hash: formData.key },
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
return info;
|
||||
}
|
||||
|
||||
exports.uploadFile = uploadFile;
|
179
src/api.ts
Normal file
179
src/api.ts
Normal file
@@ -0,0 +1,179 @@
|
||||
import fetch from 'node-fetch';
|
||||
import fs from 'fs';
|
||||
import util from 'util';
|
||||
import path from 'path';
|
||||
import ProgressBar from 'progress';
|
||||
import packageJson from '../package.json';
|
||||
import tcpp from 'tcp-ping';
|
||||
import filesizeParser from 'filesize-parser';
|
||||
import {
|
||||
pricingPageUrl,
|
||||
credentialFile,
|
||||
defaultEndpoint,
|
||||
} from './utils/constants';
|
||||
import type { Session } from 'types';
|
||||
import FormData from 'form-data';
|
||||
import { t } from './utils/i18n';
|
||||
|
||||
const tcpPing = util.promisify(tcpp.ping);
|
||||
|
||||
let session: Session | undefined;
|
||||
let savedSession: Session | undefined;
|
||||
|
||||
const host =
|
||||
process.env.PUSHY_REGISTRY || process.env.RNU_API || defaultEndpoint;
|
||||
|
||||
const userAgent = `react-native-update-cli/${packageJson.version}`;
|
||||
|
||||
export const getSession = () => session;
|
||||
|
||||
export const replaceSession = (newSession: { token: string }) => {
|
||||
session = newSession;
|
||||
};
|
||||
|
||||
export const loadSession = async () => {
|
||||
if (fs.existsSync(credentialFile)) {
|
||||
try {
|
||||
replaceSession(JSON.parse(fs.readFileSync(credentialFile, 'utf8')));
|
||||
savedSession = session;
|
||||
} catch (e) {
|
||||
console.error(
|
||||
`Failed to parse file ${credentialFile}. Try to remove it manually.`,
|
||||
);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const saveSession = () => {
|
||||
// Only save on change.
|
||||
if (session !== savedSession) {
|
||||
const current = session;
|
||||
const data = JSON.stringify(current, null, 4);
|
||||
fs.writeFileSync(credentialFile, data, 'utf8');
|
||||
savedSession = current;
|
||||
}
|
||||
};
|
||||
|
||||
export const closeSession = () => {
|
||||
if (fs.existsSync(credentialFile)) {
|
||||
fs.unlinkSync(credentialFile);
|
||||
savedSession = undefined;
|
||||
}
|
||||
session = undefined;
|
||||
};
|
||||
|
||||
async function query(url: string, options: fetch.RequestInit) {
|
||||
const resp = await fetch(url, options);
|
||||
const text = await resp.text();
|
||||
let json: any;
|
||||
try {
|
||||
json = JSON.parse(text);
|
||||
} catch (e) {}
|
||||
|
||||
if (resp.status !== 200) {
|
||||
const message = json?.message || resp.statusText;
|
||||
if (resp.status === 401) {
|
||||
throw new Error(t('loginExpired'));
|
||||
}
|
||||
throw new Error(message);
|
||||
}
|
||||
return json;
|
||||
}
|
||||
|
||||
function queryWithoutBody(method: string) {
|
||||
return (api: string) =>
|
||||
query(host + api, {
|
||||
method,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
'X-AccessToken': session ? session.token : '',
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function queryWithBody(method: string) {
|
||||
return (api: string, body?: Record<string, any>) =>
|
||||
query(host + api, {
|
||||
method,
|
||||
headers: {
|
||||
'User-Agent': userAgent,
|
||||
'Content-Type': 'application/json',
|
||||
'X-AccessToken': session ? session.token : '',
|
||||
},
|
||||
body: JSON.stringify(body),
|
||||
});
|
||||
}
|
||||
|
||||
export const get = queryWithoutBody('GET');
|
||||
export const post = queryWithBody('POST');
|
||||
export const put = queryWithBody('PUT');
|
||||
export const doDelete = queryWithBody('DELETE');
|
||||
|
||||
export async function uploadFile(fn: string, key?: string) {
|
||||
const { url, backupUrl, formData, maxSize } = await post('/upload', {
|
||||
ext: path.extname(fn),
|
||||
});
|
||||
let realUrl = url;
|
||||
if (backupUrl) {
|
||||
if (global.USE_ACC_OSS) {
|
||||
realUrl = backupUrl;
|
||||
} else {
|
||||
const pingResult = await tcpPing({
|
||||
address: url.replace('https://', ''),
|
||||
attempts: 4,
|
||||
timeout: 1000,
|
||||
});
|
||||
// console.log({pingResult});
|
||||
if (Number.isNaN(pingResult.avg) || pingResult.avg > 150) {
|
||||
realUrl = backupUrl;
|
||||
}
|
||||
}
|
||||
// console.log({realUrl});
|
||||
}
|
||||
|
||||
const fileSize = fs.statSync(fn).size;
|
||||
if (maxSize && fileSize > filesizeParser(maxSize)) {
|
||||
const readableFileSize = `${(fileSize / 1048576).toFixed(1)}m`;
|
||||
throw new Error(
|
||||
t('fileSizeExceeded', {
|
||||
fileSize: readableFileSize,
|
||||
maxSize,
|
||||
pricingPageUrl,
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
const bar = new ProgressBar(' Uploading [:bar] :percent :etas', {
|
||||
complete: '=',
|
||||
incomplete: ' ',
|
||||
total: fileSize,
|
||||
});
|
||||
|
||||
const form = new FormData();
|
||||
|
||||
for (const [k, v] of Object.entries(formData)) {
|
||||
form.append(k, v);
|
||||
}
|
||||
const fileStream = fs.createReadStream(fn);
|
||||
fileStream.on('data', (data) => {
|
||||
bar.tick(data.length);
|
||||
});
|
||||
|
||||
if (key) {
|
||||
form.append('key', key);
|
||||
}
|
||||
form.append('file', fileStream);
|
||||
|
||||
const res = await fetch(realUrl, {
|
||||
method: 'POST',
|
||||
body: form,
|
||||
});
|
||||
|
||||
if (res.status > 299) {
|
||||
throw new Error(`${res.status}: ${res.statusText}`);
|
||||
}
|
||||
|
||||
// const body = await response.json();
|
||||
return { hash: key || formData.key };
|
||||
}
|
110
src/app.js
110
src/app.js
@@ -1,110 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/13/16.
|
||||
*/
|
||||
|
||||
import {question} from './utils';
|
||||
import fs from 'fs';
|
||||
|
||||
const {
|
||||
post,
|
||||
get,
|
||||
doDelete,
|
||||
} = require('./api');
|
||||
|
||||
const validPlatforms = {
|
||||
ios: 1,
|
||||
android: 1,
|
||||
};
|
||||
|
||||
export function checkPlatform(platform) {
|
||||
if (!validPlatforms[platform]) {
|
||||
throw new Error(`Invalid platform '${platform}'`);
|
||||
}
|
||||
return platform
|
||||
}
|
||||
|
||||
export function getSelectedApp(platform) {
|
||||
checkPlatform(platform);
|
||||
|
||||
if (!fs.existsSync('update.json')){
|
||||
throw new Error(`App not selected. run 'pushy selectApp --platform ${platform}' first!`);
|
||||
}
|
||||
const updateInfo = JSON.parse(fs.readFileSync('update.json', 'utf8'));
|
||||
if (!updateInfo[platform]) {
|
||||
throw new Error(`App not selected. run 'pushy selectApp --platform ${platform}' first!`);
|
||||
}
|
||||
return updateInfo[platform];
|
||||
}
|
||||
|
||||
export async function listApp(platform){
|
||||
const {data} = await get('/app/list');
|
||||
const list = platform?data.filter(v=>v.platform===platform):data;
|
||||
for (const app of list) {
|
||||
console.log(`${app.id}) ${app.name}(${app.platform})`);
|
||||
}
|
||||
if (platform) {
|
||||
console.log(`\nTotal ${list.length} ${platform} apps`);
|
||||
} else {
|
||||
console.log(`\nTotal ${list.length} apps`);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
export async function chooseApp(platform) {
|
||||
const list = await listApp(platform);
|
||||
|
||||
while (true) {
|
||||
const id = await question('Enter appId:');
|
||||
const app = list.find(v=>v.id === (id|0));
|
||||
if (app) {
|
||||
return app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
createApp: async function ({options}) {
|
||||
const name = options.name || await question('App Name:');
|
||||
const {downloadUrl} = options;
|
||||
const platform = checkPlatform(options.platform || await question('Platform(ios/android):'));
|
||||
const {id} = await post('/app/create', {name, platform});
|
||||
console.log(`Created app ${id}`);
|
||||
await this.selectApp({
|
||||
args: [id],
|
||||
options: {platform, downloadUrl},
|
||||
});
|
||||
},
|
||||
deleteApp: async function ({args, options}) {
|
||||
const {platform} = options;
|
||||
const id = args[0] || chooseApp(platform);
|
||||
if (!id) {
|
||||
console.log('Canceled');
|
||||
}
|
||||
await doDelete(`/app/${id}`);
|
||||
console.log('Ok.');
|
||||
},
|
||||
apps: async function ({options}){
|
||||
const {platform} = options;
|
||||
listApp(platform);
|
||||
},
|
||||
selectApp: async function({args, options}) {
|
||||
const platform = checkPlatform(options.platform || await question('Platform(ios/android):'));
|
||||
const id = args[0] || (await chooseApp(platform)).id;
|
||||
|
||||
let updateInfo = {};
|
||||
if (fs.existsSync('update.json')) {
|
||||
try {
|
||||
updateInfo = JSON.parse(fs.readFileSync('update.json', 'utf8'));
|
||||
} catch (e) {
|
||||
console.error('Failed to parse file `update.json`. Try to remove it manually.');
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
const {appKey} = await get(`/app/${id}`);
|
||||
updateInfo[platform] = {
|
||||
appId: id,
|
||||
appKey,
|
||||
};
|
||||
fs.writeFileSync('update.json', JSON.stringify(updateInfo, null, 4), 'utf8');
|
||||
},
|
||||
}
|
136
src/app.ts
Normal file
136
src/app.ts
Normal file
@@ -0,0 +1,136 @@
|
||||
import { question } from './utils';
|
||||
import fs from 'fs';
|
||||
import Table from 'tty-table';
|
||||
|
||||
import { post, get, doDelete } from './api';
|
||||
import type { Platform } from './types';
|
||||
import { t } from './utils/i18n';
|
||||
|
||||
const validPlatforms = ['ios', 'android', 'harmony'];
|
||||
|
||||
export function checkPlatform(platform: Platform) {
|
||||
if (!validPlatforms.includes(platform)) {
|
||||
throw new Error(t('unsupportedPlatform', { platform }));
|
||||
}
|
||||
return platform;
|
||||
}
|
||||
|
||||
export function getSelectedApp(platform: Platform) {
|
||||
checkPlatform(platform);
|
||||
|
||||
if (!fs.existsSync('update.json')) {
|
||||
throw new Error(t('appNotSelected', { platform }));
|
||||
}
|
||||
const updateInfo = JSON.parse(fs.readFileSync('update.json', 'utf8'));
|
||||
if (!updateInfo[platform]) {
|
||||
throw new Error(t('appNotSelected', { platform }));
|
||||
}
|
||||
return updateInfo[platform];
|
||||
}
|
||||
|
||||
export async function listApp(platform: Platform | '' = '') {
|
||||
const { data } = await get('/app/list');
|
||||
const list = platform ? data.filter((v) => v.platform === platform) : data;
|
||||
|
||||
const header = [
|
||||
{ value: t('appId') },
|
||||
{ value: t('appName') },
|
||||
{ value: t('platform') },
|
||||
];
|
||||
const rows = [];
|
||||
for (const app of list) {
|
||||
rows.push([app.id, app.name, app.platform]);
|
||||
}
|
||||
|
||||
console.log(Table(header, rows).render());
|
||||
|
||||
console.log(`\n${t('totalApps', { count: list.length, platform })}`);
|
||||
return list;
|
||||
}
|
||||
|
||||
export async function chooseApp(platform: Platform) {
|
||||
const list = await listApp(platform);
|
||||
|
||||
while (true) {
|
||||
const id = await question(t('enterAppIdQuestion'));
|
||||
const app = list.find((v) => v.id === Number(id));
|
||||
if (app) {
|
||||
return app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
createApp: async function ({
|
||||
options,
|
||||
}: {
|
||||
options: { name: string; downloadUrl: string; platform: Platform };
|
||||
}) {
|
||||
const name = options.name || (await question(t('appNameQuestion')));
|
||||
const { downloadUrl } = options;
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question(t('platformQuestion'))),
|
||||
);
|
||||
const { id } = await post('/app/create', { name, platform, downloadUrl });
|
||||
console.log(t('createAppSuccess', { id }));
|
||||
await this.selectApp({
|
||||
args: [id],
|
||||
options: { platform },
|
||||
});
|
||||
},
|
||||
deleteApp: async ({
|
||||
args,
|
||||
options,
|
||||
}: {
|
||||
args: string[];
|
||||
options: { platform: Platform };
|
||||
}) => {
|
||||
const { platform } = options;
|
||||
const id = args[0] || chooseApp(platform);
|
||||
if (!id) {
|
||||
console.log(t('cancelled'));
|
||||
}
|
||||
await doDelete(`/app/${id}`);
|
||||
console.log(t('operationSuccess'));
|
||||
},
|
||||
apps: async ({ options }: { options: { platform: Platform } }) => {
|
||||
const { platform } = options;
|
||||
listApp(platform);
|
||||
},
|
||||
selectApp: async ({
|
||||
args,
|
||||
options,
|
||||
}: {
|
||||
args: string[];
|
||||
options: { platform: Platform };
|
||||
}) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question(t('platformQuestion'))),
|
||||
);
|
||||
const id = args[0]
|
||||
? Number.parseInt(args[0])
|
||||
: (await chooseApp(platform)).id;
|
||||
|
||||
let updateInfo: Partial<
|
||||
Record<Platform, { appId: number; appKey: string }>
|
||||
> = {};
|
||||
if (fs.existsSync('update.json')) {
|
||||
try {
|
||||
updateInfo = JSON.parse(fs.readFileSync('update.json', 'utf8'));
|
||||
} catch (e) {
|
||||
console.error(t('failedToParseUpdateJson'));
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
const { appKey } = await get(`/app/${id}`);
|
||||
updateInfo[platform] = {
|
||||
appId: id,
|
||||
appKey,
|
||||
};
|
||||
fs.writeFileSync(
|
||||
'update.json',
|
||||
JSON.stringify(updateInfo, null, 4),
|
||||
'utf8',
|
||||
);
|
||||
},
|
||||
};
|
590
src/bundle.js
590
src/bundle.js
@@ -1,590 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/22/16.
|
||||
*/
|
||||
|
||||
const path = require('path');
|
||||
import { getRNVersion, translateOptions } from './utils';
|
||||
import * as fs from 'fs-extra';
|
||||
import { ZipFile } from 'yazl';
|
||||
import { open as openZipFile } from 'yauzl';
|
||||
import { question, printVersionCommand } from './utils';
|
||||
import { checkPlatform } from './app';
|
||||
const { spawn, spawnSync } = require('child_process');
|
||||
const g2js = require('gradle-to-js/lib/parser');
|
||||
const os = require('os');
|
||||
|
||||
var diff;
|
||||
try {
|
||||
var bsdiff = require('node-bsdiff');
|
||||
diff = typeof bsdiff != 'function' ? bsdiff.diff : bsdiff;
|
||||
} catch (e) {
|
||||
diff = function () {
|
||||
console.warn(
|
||||
'This function needs "node-bsdiff". Please run "npm i node-bsdiff" from your project directory first!',
|
||||
);
|
||||
throw new Error(
|
||||
'This function needs module "node-bsdiff". Please install it first.',
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
async function runReactNativeBundleCommand(
|
||||
bundleName,
|
||||
development,
|
||||
entryFile,
|
||||
outputFolder,
|
||||
platform,
|
||||
sourcemapOutput,
|
||||
config,
|
||||
) {
|
||||
let gradleConfig = {};
|
||||
if (platform === 'android') {
|
||||
gradleConfig = await checkGradleConfig();
|
||||
if (gradleConfig.crunchPngs !== false) {
|
||||
throw new Error('请先禁用android的crunchPngs优化,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8android%E7%9A%84crunch%E4%BC%98%E5%8C%96')
|
||||
}
|
||||
}
|
||||
|
||||
let reactNativeBundleArgs = [];
|
||||
|
||||
let envArgs = process.env.PUSHY_ENV_ARGS;
|
||||
|
||||
if (envArgs) {
|
||||
Array.prototype.push.apply(
|
||||
reactNativeBundleArgs,
|
||||
envArgs.trim().split(/\s+/),
|
||||
);
|
||||
}
|
||||
|
||||
fs.emptyDirSync(outputFolder);
|
||||
|
||||
Array.prototype.push.apply(reactNativeBundleArgs, [
|
||||
path.join('node_modules', 'react-native', 'local-cli', 'cli.js'),
|
||||
'bundle',
|
||||
'--assets-dest',
|
||||
outputFolder,
|
||||
'--bundle-output',
|
||||
path.join(outputFolder, bundleName),
|
||||
'--dev',
|
||||
development,
|
||||
'--entry-file',
|
||||
entryFile,
|
||||
'--platform',
|
||||
platform,
|
||||
'--reset-cache',
|
||||
]);
|
||||
|
||||
if (sourcemapOutput) {
|
||||
reactNativeBundleArgs.push('--sourcemap-output', sourcemapOutput);
|
||||
}
|
||||
|
||||
if (config) {
|
||||
reactNativeBundleArgs.push('--config', config);
|
||||
}
|
||||
|
||||
const reactNativeBundleProcess = spawn('node', reactNativeBundleArgs);
|
||||
console.log(
|
||||
`Running bundle command: node ${reactNativeBundleArgs.join(' ')}`,
|
||||
);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
reactNativeBundleProcess.stdout.on('data', (data) => {
|
||||
console.log(data.toString().trim());
|
||||
});
|
||||
|
||||
reactNativeBundleProcess.stderr.on('data', (data) => {
|
||||
console.error(data.toString().trim());
|
||||
});
|
||||
|
||||
reactNativeBundleProcess.on('close', async (exitCode) => {
|
||||
if (exitCode) {
|
||||
reject(
|
||||
new Error(
|
||||
`"react-native bundle" command exited with code ${exitCode}.`,
|
||||
),
|
||||
);
|
||||
} else {
|
||||
if (gradleConfig.enableHermes) {
|
||||
await compileHermesByteCode(bundleName, outputFolder);
|
||||
}
|
||||
resolve(null);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function getHermesOSBin() {
|
||||
if (os.platform() === 'win32') return 'win64-bin';
|
||||
if (os.platform() === 'darwin') return 'osx-bin';
|
||||
if (os.platform() === 'linux') return 'linux64-bin';
|
||||
}
|
||||
|
||||
async function checkGradleConfig() {
|
||||
let enableHermes = false;
|
||||
let crunchPngs;
|
||||
try {
|
||||
const gradleConfig = await g2js.parseFile('android/app/build.gradle');
|
||||
const projectConfig = gradleConfig['project.ext.react'];
|
||||
crunchPngs = gradleConfig.android.buildTypes.release.crunchPngs;
|
||||
for (const packagerConfig of projectConfig) {
|
||||
if (
|
||||
packagerConfig.includes('enableHermes') &&
|
||||
packagerConfig.includes('true')
|
||||
) {
|
||||
enableHermes = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (e) {}
|
||||
return {
|
||||
enableHermes,
|
||||
crunchPngs,
|
||||
}
|
||||
}
|
||||
|
||||
async function compileHermesByteCode(bundleName, outputFolder) {
|
||||
console.log(`Hermes enabled, now compiling to hermes bytecode:\n`);
|
||||
const hermesPackage = fs.existsSync('node_modules/hermes-engine')
|
||||
? 'node_modules/hermes-engine' // 0.2+
|
||||
: 'node_modules/hermesvm'; // < 0.2
|
||||
const hermesPath = `${hermesPackage}/${getHermesOSBin()}`;
|
||||
|
||||
const hermesCommand = fs.existsSync(`${hermesPath}/hermesc`)
|
||||
? `${hermesPath}/hermesc` // 0.5+
|
||||
: `${hermesPath}/hermes`; // < 0.5
|
||||
|
||||
spawnSync(
|
||||
path.join.apply(null, hermesCommand.split('/')),
|
||||
[
|
||||
'-emit-binary',
|
||||
'-out',
|
||||
path.join(outputFolder, bundleName),
|
||||
path.join(outputFolder, bundleName),
|
||||
'-O',
|
||||
],
|
||||
{ stdio: 'ignore' },
|
||||
);
|
||||
}
|
||||
|
||||
async function pack(dir, output) {
|
||||
console.log('Packing');
|
||||
fs.ensureDirSync(path.dirname(output));
|
||||
await new Promise((resolve, reject) => {
|
||||
var zipfile = new ZipFile();
|
||||
|
||||
function addDirectory(root, rel) {
|
||||
if (rel) {
|
||||
zipfile.addEmptyDirectory(rel);
|
||||
}
|
||||
const childs = fs.readdirSync(root);
|
||||
for (const name of childs) {
|
||||
if (name === '.' || name === '..') {
|
||||
continue;
|
||||
}
|
||||
const fullPath = path.join(root, name);
|
||||
const stat = fs.statSync(fullPath);
|
||||
if (stat.isFile()) {
|
||||
//console.log('adding: ' + rel+name);
|
||||
zipfile.addFile(fullPath, rel + name);
|
||||
} else if (stat.isDirectory()) {
|
||||
//console.log('adding: ' + rel+name+'/');
|
||||
addDirectory(fullPath, rel + name + '/');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
addDirectory(dir, '');
|
||||
|
||||
zipfile.outputStream.on('error', (err) => reject(err));
|
||||
zipfile.outputStream
|
||||
.pipe(fs.createWriteStream(output))
|
||||
.on('close', function () {
|
||||
resolve();
|
||||
});
|
||||
zipfile.end();
|
||||
});
|
||||
console.log('Bundled saved to: ' + output);
|
||||
}
|
||||
|
||||
function readEntire(entry, zipFile) {
|
||||
const buffers = [];
|
||||
return new Promise((resolve, reject) => {
|
||||
zipFile.openReadStream(entry, (err, stream) => {
|
||||
stream.pipe({
|
||||
write(chunk) {
|
||||
buffers.push(chunk);
|
||||
},
|
||||
end() {
|
||||
resolve(Buffer.concat(buffers));
|
||||
},
|
||||
prependListener() {},
|
||||
on() {},
|
||||
once() {},
|
||||
emit() {},
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function basename(fn) {
|
||||
const m = /^(.+\/)[^\/]+\/?$/.exec(fn);
|
||||
return m && m[1];
|
||||
}
|
||||
|
||||
async function diffFromPPK(origin, next, output) {
|
||||
fs.ensureDirSync(path.dirname(output));
|
||||
|
||||
const originEntries = {};
|
||||
const originMap = {};
|
||||
|
||||
let originSource;
|
||||
|
||||
await enumZipEntries(origin, (entry, zipFile) => {
|
||||
originEntries[entry.fileName] = entry;
|
||||
if (!/\/$/.test(entry.fileName)) {
|
||||
// isFile
|
||||
originMap[entry.crc32] = entry.fileName;
|
||||
|
||||
if (entry.fileName === 'index.bundlejs') {
|
||||
// This is source.
|
||||
return readEntire(entry, zipFile).then((v) => (originSource = v));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!originSource) {
|
||||
throw new Error(
|
||||
`Bundle file not found! Please use default bundle file name and path.`,
|
||||
);
|
||||
}
|
||||
|
||||
const copies = {};
|
||||
|
||||
var zipfile = new ZipFile();
|
||||
|
||||
const writePromise = new Promise((resolve, reject) => {
|
||||
zipfile.outputStream.on('error', (err) => {
|
||||
throw err;
|
||||
});
|
||||
zipfile.outputStream
|
||||
.pipe(fs.createWriteStream(output))
|
||||
.on('close', function () {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
||||
const addedEntry = {};
|
||||
|
||||
function addEntry(fn) {
|
||||
//console.log(fn);
|
||||
if (!fn || addedEntry[fn]) {
|
||||
return;
|
||||
}
|
||||
const base = basename(fn);
|
||||
if (base) {
|
||||
addEntry(base);
|
||||
}
|
||||
zipfile.addEmptyDirectory(fn);
|
||||
}
|
||||
|
||||
const newEntries = {};
|
||||
|
||||
await enumZipEntries(next, (entry, nextZipfile) => {
|
||||
newEntries[entry.fileName] = entry;
|
||||
|
||||
if (/\/$/.test(entry.fileName)) {
|
||||
// Directory
|
||||
if (!originEntries[entry.fileName]) {
|
||||
addEntry(entry.fileName);
|
||||
}
|
||||
} else if (entry.fileName === 'index.bundlejs') {
|
||||
//console.log('Found bundle');
|
||||
return readEntire(entry, nextZipfile).then((newSource) => {
|
||||
//console.log('Begin diff');
|
||||
zipfile.addBuffer(
|
||||
diff(originSource, newSource),
|
||||
'index.bundlejs.patch',
|
||||
);
|
||||
//console.log('End diff');
|
||||
});
|
||||
} else {
|
||||
// If same file.
|
||||
const originEntry = originEntries[entry.fileName];
|
||||
if (originEntry && originEntry.crc32 === entry.crc32) {
|
||||
// ignore
|
||||
return;
|
||||
}
|
||||
|
||||
// If moved from other place
|
||||
if (originMap[entry.crc32]) {
|
||||
const base = basename(entry.fileName);
|
||||
if (!originEntries[base]) {
|
||||
addEntry(base);
|
||||
}
|
||||
copies[entry.fileName] = originMap[entry.crc32];
|
||||
return;
|
||||
}
|
||||
|
||||
// New file.
|
||||
addEntry(basename(entry.fileName));
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
nextZipfile.openReadStream(entry, function (err, readStream) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
zipfile.addReadStream(readStream, entry.fileName);
|
||||
readStream.on('end', () => {
|
||||
//console.log('add finished');
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
const deletes = {};
|
||||
|
||||
for (var k in originEntries) {
|
||||
if (!newEntries[k]) {
|
||||
console.log('Delete ' + k);
|
||||
deletes[k] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
//console.log({copies, deletes});
|
||||
zipfile.addBuffer(
|
||||
Buffer.from(JSON.stringify({ copies, deletes })),
|
||||
'__diff.json',
|
||||
);
|
||||
zipfile.end();
|
||||
await writePromise;
|
||||
}
|
||||
|
||||
async function diffFromPackage(
|
||||
origin,
|
||||
next,
|
||||
output,
|
||||
originBundleName,
|
||||
transformPackagePath = (v) => v,
|
||||
) {
|
||||
fs.ensureDirSync(path.dirname(output));
|
||||
|
||||
const originEntries = {};
|
||||
const originMap = {};
|
||||
|
||||
let originSource;
|
||||
|
||||
await enumZipEntries(origin, (entry, zipFile) => {
|
||||
if (!/\/$/.test(entry.fileName)) {
|
||||
const fn = transformPackagePath(entry.fileName);
|
||||
if (!fn) {
|
||||
return;
|
||||
}
|
||||
|
||||
//console.log(fn);
|
||||
// isFile
|
||||
originEntries[fn] = entry.crc32;
|
||||
originMap[entry.crc32] = fn;
|
||||
|
||||
if (fn === originBundleName) {
|
||||
// This is source.
|
||||
return readEntire(entry, zipFile).then((v) => (originSource = v));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
if (!originSource) {
|
||||
throw new Error(
|
||||
`Bundle file not found! Please use default bundle file name and path.`,
|
||||
);
|
||||
}
|
||||
|
||||
const copies = {};
|
||||
|
||||
var zipfile = new ZipFile();
|
||||
|
||||
const writePromise = new Promise((resolve, reject) => {
|
||||
zipfile.outputStream.on('error', (err) => {
|
||||
throw err;
|
||||
});
|
||||
zipfile.outputStream
|
||||
.pipe(fs.createWriteStream(output))
|
||||
.on('close', function () {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
|
||||
await enumZipEntries(next, (entry, nextZipfile) => {
|
||||
if (/\/$/.test(entry.fileName)) {
|
||||
// Directory
|
||||
zipfile.addEmptyDirectory(entry.fileName);
|
||||
} else if (entry.fileName === 'index.bundlejs') {
|
||||
//console.log('Found bundle');
|
||||
return readEntire(entry, nextZipfile).then((newSource) => {
|
||||
//console.log('Begin diff');
|
||||
zipfile.addBuffer(
|
||||
diff(originSource, newSource),
|
||||
'index.bundlejs.patch',
|
||||
);
|
||||
//console.log('End diff');
|
||||
});
|
||||
} else {
|
||||
// If same file.
|
||||
if (originEntries[entry.fileName] === entry.crc32) {
|
||||
copies[entry.fileName] = '';
|
||||
return;
|
||||
}
|
||||
// If moved from other place
|
||||
if (originMap[entry.crc32]) {
|
||||
copies[entry.fileName] = originMap[entry.crc32];
|
||||
return;
|
||||
}
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
nextZipfile.openReadStream(entry, function (err, readStream) {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
zipfile.addReadStream(readStream, entry.fileName);
|
||||
readStream.on('end', () => {
|
||||
//console.log('add finished');
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
zipfile.addBuffer(Buffer.from(JSON.stringify({ copies })), '__diff.json');
|
||||
zipfile.end();
|
||||
await writePromise;
|
||||
}
|
||||
|
||||
function enumZipEntries(zipFn, callback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
openZipFile(zipFn, { lazyEntries: true }, (err, zipfile) => {
|
||||
if (err) {
|
||||
return reject(err);
|
||||
}
|
||||
zipfile.on('end', resolve);
|
||||
zipfile.on('error', reject);
|
||||
zipfile.on('entry', (entry) => {
|
||||
const result = callback(entry, zipfile);
|
||||
if (result && typeof result.then === 'function') {
|
||||
result.then(() => zipfile.readEntry());
|
||||
} else {
|
||||
zipfile.readEntry();
|
||||
}
|
||||
});
|
||||
zipfile.readEntry();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
bundle: async function ({ options }) {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question('Platform(ios/android):')),
|
||||
);
|
||||
|
||||
let {
|
||||
bundleName,
|
||||
entryFile,
|
||||
intermediaDir,
|
||||
output,
|
||||
dev,
|
||||
verbose,
|
||||
} = translateOptions({
|
||||
...options,
|
||||
platform,
|
||||
});
|
||||
|
||||
// const sourcemapOutput = path.join(intermediaDir, bundleName + ".map");
|
||||
|
||||
const realOutput = output.replace(/\$\{time\}/g, '' + Date.now());
|
||||
|
||||
if (!platform) {
|
||||
throw new Error('Platform must be specified.');
|
||||
}
|
||||
|
||||
const { version, major, minor } = getRNVersion();
|
||||
|
||||
console.log('Bundling with react-native: ', version);
|
||||
printVersionCommand();
|
||||
|
||||
await runReactNativeBundleCommand(
|
||||
bundleName,
|
||||
dev,
|
||||
entryFile,
|
||||
intermediaDir,
|
||||
platform,
|
||||
);
|
||||
|
||||
await pack(path.resolve(intermediaDir), realOutput);
|
||||
|
||||
const v = await question('Would you like to publish it?(Y/N)');
|
||||
if (v.toLowerCase() === 'y') {
|
||||
await this.publish({
|
||||
args: [realOutput],
|
||||
options: {
|
||||
platform,
|
||||
},
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async diff({ args, options }) {
|
||||
const [origin, next] = args;
|
||||
const { output } = options;
|
||||
|
||||
const realOutput = output.replace(/\$\{time\}/g, '' + Date.now());
|
||||
|
||||
if (!origin || !next) {
|
||||
console.error('pushy diff <origin> <next>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
await diffFromPPK(origin, next, realOutput, 'index.bundlejs');
|
||||
console.log(`${realOutput} generated.`);
|
||||
},
|
||||
|
||||
async diffFromApk({ args, options }) {
|
||||
const [origin, next] = args;
|
||||
const { output } = options;
|
||||
|
||||
const realOutput = output.replace(/\$\{time\}/g, '' + Date.now());
|
||||
|
||||
if (!origin || !next) {
|
||||
console.error('pushy diffFromApk <origin> <next>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
await diffFromPackage(
|
||||
origin,
|
||||
next,
|
||||
realOutput,
|
||||
'assets/index.android.bundle',
|
||||
);
|
||||
console.log(`${realOutput} generated.`);
|
||||
},
|
||||
|
||||
async diffFromIpa({ args, options }) {
|
||||
const [origin, next] = args;
|
||||
const { output } = options;
|
||||
|
||||
const realOutput = output.replace(/\$\{time\}/g, '' + Date.now());
|
||||
|
||||
if (!origin || !next) {
|
||||
console.error('pushy diffFromIpa <origin> <next>');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
await diffFromPackage(origin, next, realOutput, 'main.jsbundle', (v) => {
|
||||
const m = /^Payload\/[^/]+\/(.+)$/.exec(v);
|
||||
return m && m[1];
|
||||
});
|
||||
|
||||
console.log(`${realOutput} generated.`);
|
||||
},
|
||||
};
|
1099
src/bundle.ts
Normal file
1099
src/bundle.ts
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,21 +1,16 @@
|
||||
#!/usr/bin/env node
|
||||
/**
|
||||
* Created by tdzl2003 on 2/13/16.
|
||||
*/
|
||||
|
||||
const {loadSession} = require('./api');
|
||||
const updateNotifier = require('update-notifier');
|
||||
import { printVersionCommand } from './utils/index.js';
|
||||
const pkg = require('../package.json');
|
||||
import { loadSession } from './api';
|
||||
import { printVersionCommand } from './utils';
|
||||
import { t } from './utils/i18n';
|
||||
|
||||
updateNotifier({pkg}).notify({isGlobal: true});
|
||||
|
||||
function printUsage({args}) {
|
||||
function printUsage() {
|
||||
// const commandName = args[0];
|
||||
// TODO: print usage of commandName, or print global usage.
|
||||
|
||||
console.log('Usage is under development now.')
|
||||
console.log('Visit `https://github.com/reactnativecn/react-native-pushy` for early document.');
|
||||
console.log(
|
||||
'Visit `https://github.com/reactnativecn/react-native-update` for document.',
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -28,25 +23,26 @@ const commands = {
|
||||
help: printUsage,
|
||||
};
|
||||
|
||||
function run() {
|
||||
async function run() {
|
||||
await printVersionCommand();
|
||||
if (process.argv.indexOf('-v') >= 0 || process.argv[2] === 'version') {
|
||||
printVersionCommand();
|
||||
process.exit();
|
||||
}
|
||||
|
||||
|
||||
const argv = require('cli-arguments').parse(require('../cli.json'));
|
||||
global.NO_INTERACTIVE = argv.options['no-interactive'];
|
||||
global.USE_ACC_OSS = argv.options.acc;
|
||||
|
||||
loadSession()
|
||||
.then(()=>commands[argv.command](argv))
|
||||
.catch(err=>{
|
||||
.then(() => commands[argv.command](argv))
|
||||
.catch((err) => {
|
||||
if (err.status === 401) {
|
||||
console.log('Not loggined.\nRun `pushy login` at your project directory to login.');
|
||||
console.log(t('loginFirst'));
|
||||
return;
|
||||
}
|
||||
console.error(err.stack);
|
||||
process.exit(-1);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
run();
|
||||
run();
|
125
src/locales/en.ts
Normal file
125
src/locales/en.ts
Normal file
@@ -0,0 +1,125 @@
|
||||
export default {
|
||||
addedToGitignore: 'Added {{line}} to .gitignore',
|
||||
androidCrunchPngsWarning:
|
||||
'The crunchPngs option of android seems not disabled (Please ignore this warning if already disabled), which may cause abnormal consumption of mobile network traffic. Please refer to https://cresc.dev/docs/getting-started#disable-crunchpngs-on-android \n',
|
||||
appId: 'App ID',
|
||||
appIdMismatchApk:
|
||||
'App ID mismatch! Current APK: {{appIdInPkg}}, current update.json: {{appId}}',
|
||||
appIdMismatchApp:
|
||||
'App ID mismatch! Current APP: {{appIdInPkg}}, current update.json: {{appId}}',
|
||||
appIdMismatchIpa:
|
||||
'App ID mismatch! Current IPA: {{appIdInPkg}}, current update.json: {{appId}}',
|
||||
appKeyMismatchApk:
|
||||
'App Key mismatch! Current APK: {{appKeyInPkg}}, current update.json: {{appKey}}',
|
||||
appKeyMismatchApp:
|
||||
'App Key mismatch! Current APP: {{appKeyInPkg}}, current update.json: {{appKey}}',
|
||||
appKeyMismatchIpa:
|
||||
'App Key mismatch! Current IPA: {{appKeyInPkg}}, current update.json: {{appKey}}',
|
||||
appName: 'App Name',
|
||||
appNameQuestion: 'App Name:',
|
||||
appNotSelected:
|
||||
'App not selected. run `cresc selectApp --platform {{platform}}` first!',
|
||||
appUploadSuccess:
|
||||
'Successfully uploaded APP native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
||||
apkUploadSuccess:
|
||||
'Successfully uploaded APK native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
||||
boundTo: ', bound to: {{name}} ({{id}})',
|
||||
buildTimeNotFound:
|
||||
'Cannot get the build timestamp of this package. Please update `react-native-update` to the latest version and re-package and upload.',
|
||||
bundleCommandError:
|
||||
'"react-native bundle" command exited with code {{code}}.',
|
||||
bundleNotFound:
|
||||
'Bundle file not found. Please ensure that this {{packageType}} is a release version and the bundle file name is the default `{{entryFile}}`',
|
||||
bundlingWithRN: 'Bundling with react-native: {{version}}',
|
||||
cancelled: 'Cancelled',
|
||||
composingSourceMap: 'Composing source map',
|
||||
copyFileFailed: 'Failed to copy file: {{error}}',
|
||||
copyHarmonyBundleError: 'Error copying Harmony bundle: {{error}}',
|
||||
copyingDebugId: 'Copying debugid',
|
||||
createAppSuccess: 'App created successfully (id: {{id}})',
|
||||
deleteFile: 'Delete {{- file}}',
|
||||
deletingFile: 'Delete {{- file}}',
|
||||
enterAppIdQuestion: 'Enter AppId:',
|
||||
enterNativePackageId: 'Enter native package ID:',
|
||||
errorInHarmonyApp: 'Error in getEntryFromHarmonyApp: {{error}}',
|
||||
expiredStatus: '(Expired)',
|
||||
failedToParseIcon: '[Warning] failed to parse icon: {{error}}',
|
||||
failedToParseUpdateJson:
|
||||
'Failed to parse file `update.json`. Try to remove it manually.',
|
||||
fileGenerated: '{{- file}} generated.',
|
||||
fileSizeExceeded:
|
||||
'This file size is {{fileSize}} , exceeding the current quota {{maxSize}} . You may consider upgrading to a higher plan to increase this quota. Details can be found at: {{- pricingPageUrl}}',
|
||||
hermesDisabled: 'Hermes disabled',
|
||||
hermesEnabledCompiling: 'Hermes enabled, now compiling to hermes bytecode:\n',
|
||||
ipaUploadSuccess:
|
||||
'Successfully uploaded IPA native package (id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
||||
keyStrings: 'Key strings:',
|
||||
latestVersionTag: '(latest: {{version}})',
|
||||
lockBestPractice: `
|
||||
Best practices for lock files:
|
||||
1. All members of the development team should use the same package manager to maintain a single lock file.
|
||||
2. Add the lock file to version control (but do not commit multiple lock files of different formats).
|
||||
3. Pay attention to changes in the lock file during code review.
|
||||
This can reduce the risk of inconsistent dependencies and supply chain attacks.
|
||||
`,
|
||||
lockNotFound:
|
||||
'No lock file detected, which may cause inconsistent dependencies and hot-updating issues.',
|
||||
loggedOut: 'Logged out',
|
||||
loginExpired:
|
||||
'Login information has expired. Please use `cresc login` command to re-login',
|
||||
loginFirst:
|
||||
'Not logged in.\nPlease run `cresc login` in the project directory to login.',
|
||||
multipleLocksFound:
|
||||
'Multiple lock files detected ({{- lockFiles}}), which may cause inconsistent dependencies and hot-updating issues.',
|
||||
nativePackageId: 'Native Package ID',
|
||||
nativeVersion: 'Native Version',
|
||||
nativeVersionNotFound: 'No native version found >= {{version}}',
|
||||
nativeVersionNotFoundLess: 'No native version found <= {{version}}',
|
||||
nativeVersionNotFoundMatch: 'No matching native version found: {{version}}',
|
||||
offset: 'Offset {{offset}}',
|
||||
operationComplete: 'Operation complete, bound to {{count}} native versions',
|
||||
operationSuccess: 'Operation successful',
|
||||
packageIdRequired: 'Please provide packageId or packageVersion parameter',
|
||||
packageUploadSuccess:
|
||||
'Successfully uploaded new hot update package (id: {{id}})',
|
||||
packing: 'Packing',
|
||||
pausedStatus: '(Paused)',
|
||||
platform: 'Platform',
|
||||
platformPrompt: 'Platform (ios/android/harmony):',
|
||||
platformQuestion: 'Platform(ios/android/harmony):',
|
||||
platformRequired: 'Platform must be specified.',
|
||||
pluginDetectionError: 'error while detecting {{name}} plugin: {{error}}',
|
||||
pluginDetected: 'detected {{name}} plugin',
|
||||
ppkPackageGenerated: 'ppk package generated and saved to: {{- output}}',
|
||||
processingError: 'Error processing file: {{error}}',
|
||||
processingPackage: 'Processing the package {{count}} ...',
|
||||
processingStringPool: 'Processing the string pool ...',
|
||||
publishUsage:
|
||||
'Usage: pushy publish <ppk file> --platform ios|android|harmony',
|
||||
rnuVersionNotFound:
|
||||
'react-native-update: Cannot get the version number. Please run the command in the project directory',
|
||||
rolloutConfigSet:
|
||||
'Set {{rollout}}% rollout for version {{version}} on native version(s) {{versions}}',
|
||||
rolloutRangeError: 'rollout must be an integer between 1-100',
|
||||
runningHermesc: 'Running hermesc: {{- command}} {{- args}}',
|
||||
sentryCliNotFound:
|
||||
'Cannot find Sentry CLI tool, please make sure @sentry/cli is properly installed',
|
||||
sentryReleaseCreated: 'Sentry release created for version: {{version}}',
|
||||
totalApps: 'Total {{count}} {{platform}} apps',
|
||||
totalPackages: 'Total {{count}} packages',
|
||||
typeStrings: 'Type strings:',
|
||||
unsupportedPlatform: 'Unsupported platform `{{platform}}`',
|
||||
uploadBundlePrompt: 'Upload this bundle now?(Y/N)',
|
||||
uploadingSourcemap: 'Uploading sourcemap',
|
||||
usageDiff: 'Usage: cresc {{command}} <origin> <next>',
|
||||
usageParseApk: 'Usage: cresc parseApk <apk file>',
|
||||
usageParseApp: 'Usage: cresc parseApp <app file>',
|
||||
usageParseIpa: 'Usage: cresc parseIpa <ipa file>',
|
||||
usageUnderDevelopment: 'Usage is under development now.',
|
||||
usageUploadApk: 'Usage: cresc uploadApk <apk file>',
|
||||
usageUploadApp: 'Usage: cresc uploadApp <app file>',
|
||||
usageUploadIpa: 'Usage: cresc uploadIpa <ipa file>',
|
||||
versionBind:
|
||||
'Bound version {{version}} to native version {{nativeVersion}} (id: {{id}})',
|
||||
welcomeMessage: 'Welcome to Cresc hot update service, {{name}}.',
|
||||
};
|
118
src/locales/zh.ts
Normal file
118
src/locales/zh.ts
Normal file
@@ -0,0 +1,118 @@
|
||||
export default {
|
||||
addedToGitignore: '已将 {{line}} 添加到 .gitignore',
|
||||
androidCrunchPngsWarning:
|
||||
'android 的 crunchPngs 选项似乎尚未禁用(如已禁用则请忽略此提示),这可能导致热更包体积异常增大,具体请参考 https://pushy.reactnative.cn/docs/getting-started.html#%E7%A6%81%E7%94%A8-android-%E7%9A%84-crunch-%E4%BC%98%E5%8C%96 \n',
|
||||
appId: '应用 id',
|
||||
appIdMismatchApk:
|
||||
'appId不匹配!当前apk: {{appIdInPkg}}, 当前update.json: {{appId}}',
|
||||
appIdMismatchApp:
|
||||
'appId不匹配!当前app: {{appIdInPkg}}, 当前update.json: {{appId}}',
|
||||
appIdMismatchIpa:
|
||||
'appId不匹配!当前ipa: {{appIdInPkg}}, 当前update.json: {{appId}}',
|
||||
appKeyMismatchApk:
|
||||
'appKey不匹配!当前apk: {{appKeyInPkg}}, 当前update.json: {{appKey}}',
|
||||
appKeyMismatchApp:
|
||||
'appKey不匹配!当前app: {{appKeyInPkg}}, 当前update.json: {{appKey}}',
|
||||
appKeyMismatchIpa:
|
||||
'appKey不匹配!当前ipa: {{appKeyInPkg}}, 当前update.json: {{appKey}}',
|
||||
appName: '应用名称',
|
||||
appNameQuestion: '应用名称:',
|
||||
appNotSelected:
|
||||
'尚未选择应用。请先运行 `pushy selectApp --platform {{platform}}` 来选择应用',
|
||||
appUploadSuccess:
|
||||
'已成功上传app原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
||||
apkUploadSuccess:
|
||||
'已成功上传apk原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
||||
boundTo: ', 已绑定:{{name}} ({{id}})',
|
||||
buildTimeNotFound:
|
||||
'无法获取此包的编译时间戳。请更新 `react-native-update` 到最新版本后重新打包上传。',
|
||||
bundleCommandError: '"react-native bundle" 命令退出,代码为 {{code}}。',
|
||||
bundleNotFound:
|
||||
'找不到 bundle 文件。请确保此 {{packageType}} 为 release 版本,且 bundle 文件名为默认的 `{{entryFile}}`',
|
||||
bundlingWithRN: '正在使用 react-native {{version}} 打包',
|
||||
cancelled: '已取消',
|
||||
composingSourceMap: '正在生成 source map',
|
||||
copyFileFailed: '复制文件失败:{{error}}',
|
||||
copyHarmonyBundleError: '复制 Harmony bundle 错误:{{error}}',
|
||||
copyingDebugId: '正在复制 debugid',
|
||||
createAppSuccess: '已成功创建应用(id: {{id}})',
|
||||
deleteFile: '删除 {{- file}}',
|
||||
deletingFile: '删除 {{- file}}',
|
||||
enterAppIdQuestion: '输入应用 id:',
|
||||
enterNativePackageId: '输入原生包 id:',
|
||||
errorInHarmonyApp: '获取 Harmony 应用入口时出错:{{error}}',
|
||||
expiredStatus: '(已过期)',
|
||||
failedToParseIcon: '[警告] 解析图标失败:{{error}}',
|
||||
failedToParseUpdateJson: '无法解析文件 `update.json`。请手动删除它。',
|
||||
fileGenerated: '已生成 {{- file}}',
|
||||
fileSizeExceeded:
|
||||
'此文件大小 {{fileSize}} , 超出当前额度 {{maxSize}} 。您可以考虑升级付费业务以提升此额度。详情请访问: {{- pricingPageUrl}}',
|
||||
hermesDisabled: 'Hermes 已禁用',
|
||||
hermesEnabledCompiling: 'Hermes 已启用,正在编译为 hermes 字节码:\n',
|
||||
ipaUploadSuccess:
|
||||
'已成功上传ipa原生包(id: {{id}}, version: {{version}}, buildTime: {{buildTime}})',
|
||||
keyStrings: '键字符串:',
|
||||
latestVersionTag: '(最新:{{version}})',
|
||||
lockBestPractice: `
|
||||
关于 lock 文件的最佳实践:
|
||||
1. 开发团队中的所有成员应该使用相同的包管理器,维护同一份 lock 文件。
|
||||
2. 将 lock 文件添加到版本控制中(但不要同时提交多种不同格式的 lock 文件)。
|
||||
3. 代码审核时应关注 lock 文件的变化。
|
||||
这样可以最大限度避免因依赖关系不一致而导致的热更异常,也降低供应链攻击等安全隐患。
|
||||
`,
|
||||
lockNotFound:
|
||||
'没有检测到任何 lock 文件,这可能导致依赖关系不一致而使热更异常。',
|
||||
loggedOut: '已退出登录',
|
||||
loginExpired: '登录信息已过期,请使用 `pushy login` 命令重新登录',
|
||||
loginFirst: '尚未登录。\n请在项目目录中运行`pushy login`命令来登录',
|
||||
multipleLocksFound:
|
||||
'检测到多种不同格式的锁文件({{- lockFiles}}),这可能导致依赖关系不一致而使热更异常。',
|
||||
nativePackageId: '原生包 Id',
|
||||
nativeVersion: '原生版本',
|
||||
nativeVersionNotFound: '未查询到 >= {{version}} 的原生版本',
|
||||
nativeVersionNotFoundLess: '未查询到 <= {{version}} 的原生版本',
|
||||
nativeVersionNotFoundMatch: '未查询到匹配原生版本:{{version}}',
|
||||
offset: '偏移量 {{offset}}',
|
||||
operationComplete: '操作完成,共已绑定 {{count}} 个原生版本',
|
||||
operationSuccess: '操作成功',
|
||||
packageIdRequired: '请提供 packageId 或 packageVersion 参数',
|
||||
packageUploadSuccess: '已成功上传新热更包(id: {{id}})',
|
||||
packing: '正在打包',
|
||||
pausedStatus: '(已暂停)',
|
||||
platform: '平台',
|
||||
platformPrompt: '平台(ios/android/harmony):',
|
||||
platformQuestion: '平台(ios/android/harmony):',
|
||||
platformRequired: '必须指定平台。',
|
||||
pluginDetectionError: '检测 {{name}} 插件时出错:{{error}}',
|
||||
pluginDetected: '检测到 {{name}} 插件',
|
||||
ppkPackageGenerated: 'ppk 热更包已生成并保存到: {{- output}}',
|
||||
processingError: '处理文件时出错:{{error}}',
|
||||
processingPackage: '正在处理包 {{count}}...',
|
||||
processingStringPool: '正在处理字符串池...',
|
||||
publishUsage:
|
||||
'使用方法: pushy publish ppk后缀文件 --platform ios|android|harmony',
|
||||
rnuVersionNotFound:
|
||||
'react-native-update: 无法获取版本号。请在项目目录中运行命令',
|
||||
rolloutConfigSet:
|
||||
'已在原生版本 {{versions}} 上设置灰度发布 {{rollout}}% 热更版本 {{version}}',
|
||||
rolloutRangeError: 'rollout 必须是 1-100 的整数',
|
||||
runningHermesc: '运行 hermesc:{{- command}} {{- args}}',
|
||||
sentryCliNotFound: '无法找到 Sentry CLI 工具,请确保已正确安装 @sentry/cli',
|
||||
sentryReleaseCreated: '已为版本 {{version}} 创建 Sentry release',
|
||||
totalApps: '共 {{count}} 个 {{platform}} 应用',
|
||||
totalPackages: '共 {{count}} 个包',
|
||||
typeStrings: '类型字符串:',
|
||||
unsupportedPlatform: '无法识别的平台 `{{platform}}`',
|
||||
uploadBundlePrompt: '是否现在上传此热更包?(Y/N)',
|
||||
uploadingSourcemap: '正在上传 sourcemap',
|
||||
usageDiff: '用法:pushy {{command}} <origin> <next>',
|
||||
usageParseApk: '使用方法: pushy parseApk apk后缀文件',
|
||||
usageParseApp: '使用方法: pushy parseApp app后缀文件',
|
||||
usageParseIpa: '使用方法: pushy parseIpa ipa后缀文件',
|
||||
usageUploadApk: '使用方法: pushy uploadApk apk后缀文件',
|
||||
usageUploadApp: '使用方法: pushy uploadApp app后缀文件',
|
||||
usageUploadIpa: '使用方法: pushy uploadIpa ipa后缀文件',
|
||||
versionBind:
|
||||
'已将热更版本 {{version}} 绑定到原生版本 {{nativeVersion}} (id: {{id}})',
|
||||
welcomeMessage: '欢迎使用 pushy 热更新服务,{{name}}。',
|
||||
};
|
107
src/package.js
107
src/package.js
@@ -1,107 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 4/2/16.
|
||||
*/
|
||||
|
||||
const { get, post, uploadFile } = require('./api');
|
||||
import { question, saveToLocal } from './utils';
|
||||
|
||||
import { checkPlatform, getSelectedApp } from './app';
|
||||
|
||||
import { getApkInfo, getIpaInfo } from './utils';
|
||||
const Table = require('tty-table');
|
||||
|
||||
export async function listPackage(appId) {
|
||||
const { data } = await get(`/app/${appId}/package/list?limit=1000`);
|
||||
|
||||
const header = [{ value: 'Package Id' }, { value: 'Version' }];
|
||||
const rows = [];
|
||||
for (const pkg of data) {
|
||||
const { version } = pkg;
|
||||
let versionInfo = '';
|
||||
if (version) {
|
||||
versionInfo = ` - ${version.id} ${version.hash.slice(0, 8)} ${
|
||||
version.name
|
||||
}`;
|
||||
} else {
|
||||
versionInfo = ' (newest)';
|
||||
}
|
||||
|
||||
rows.push([pkg.id, `${pkg.name}(${pkg.status})${versionInfo}`]);
|
||||
}
|
||||
|
||||
console.log(Table(header, rows).render());
|
||||
console.log(`\nTotal ${data.length} package(s).`);
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function choosePackage(appId) {
|
||||
const list = await listPackage(appId);
|
||||
|
||||
while (true) {
|
||||
const id = await question('Enter Package Id:');
|
||||
const app = list.find((v) => v.id === (id | 0));
|
||||
if (app) {
|
||||
return app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
uploadIpa: async function ({ args }) {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.ipa')) {
|
||||
throw new Error('Usage: pushy uploadIpa <ipaFile>');
|
||||
}
|
||||
const { versionName, buildTime } = await getIpaInfo(fn);
|
||||
const { appId } = await getSelectedApp('ios');
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const { id } = await post(`/app/${appId}/package/create`, {
|
||||
name: versionName,
|
||||
hash,
|
||||
buildTime,
|
||||
});
|
||||
saveToLocal(fn, `${appId}/package/${id}.ipa`);
|
||||
console.log(`Ipa uploaded: ${id}`);
|
||||
},
|
||||
uploadApk: async function ({ args }) {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.apk')) {
|
||||
throw new Error('Usage: pushy uploadApk <apkFile>');
|
||||
}
|
||||
const { versionName, buildTime } = await getApkInfo(fn);
|
||||
const { appId } = await getSelectedApp('android');
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const { id } = await post(`/app/${appId}/package/create`, {
|
||||
name: versionName,
|
||||
hash,
|
||||
buildTime,
|
||||
});
|
||||
saveToLocal(fn, `${appId}/package/${id}.apk`);
|
||||
console.log(`Apk uploaded: ${id}`);
|
||||
},
|
||||
parseIpa: async function ({ args }) {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.ipa')) {
|
||||
throw new Error('Usage: pushy parseIpa <ipaFile>');
|
||||
}
|
||||
console.log(await getIpaInfo(fn));
|
||||
},
|
||||
parseApk: async function ({ args }) {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.apk')) {
|
||||
throw new Error('Usage: pushy parseApk <apkFile>');
|
||||
}
|
||||
console.log(await getApkInfo(fn));
|
||||
},
|
||||
packages: async function ({ options }) {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question('Platform(ios/android):')),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
await listPackage(appId);
|
||||
},
|
||||
};
|
183
src/package.ts
Normal file
183
src/package.ts
Normal file
@@ -0,0 +1,183 @@
|
||||
import { get, post, uploadFile } from './api';
|
||||
import { question, saveToLocal } from './utils';
|
||||
import { t } from './utils/i18n';
|
||||
|
||||
import { checkPlatform, getSelectedApp } from './app';
|
||||
|
||||
import { getApkInfo, getIpaInfo, getAppInfo } from './utils';
|
||||
import Table from 'tty-table';
|
||||
import { depVersions } from './utils/dep-versions';
|
||||
import { getCommitInfo } from './utils/git';
|
||||
import type { Platform } from 'types';
|
||||
|
||||
export async function listPackage(appId: string) {
|
||||
const { data } = await get(`/app/${appId}/package/list?limit=1000`);
|
||||
|
||||
const header = [
|
||||
{ value: t('nativePackageId') },
|
||||
{ value: t('nativeVersion') },
|
||||
];
|
||||
const rows = [];
|
||||
for (const pkg of data) {
|
||||
const { version } = pkg;
|
||||
let versionInfo = '';
|
||||
if (version) {
|
||||
versionInfo = t('boundTo', { name: version.name, id: version.id });
|
||||
}
|
||||
let output = pkg.name;
|
||||
if (pkg.status === 'paused') {
|
||||
output += t('pausedStatus');
|
||||
}
|
||||
if (pkg.status === 'expired') {
|
||||
output += t('expiredStatus');
|
||||
}
|
||||
output += versionInfo;
|
||||
rows.push([pkg.id, output]);
|
||||
}
|
||||
|
||||
console.log(Table(header, rows).render());
|
||||
console.log(t('totalPackages', { count: data.length }));
|
||||
return data;
|
||||
}
|
||||
|
||||
export async function choosePackage(appId: string) {
|
||||
const list = await listPackage(appId);
|
||||
|
||||
while (true) {
|
||||
const id = await question(t('enterNativePackageId'));
|
||||
const app = list.find((v) => v.id === Number(id));
|
||||
if (app) {
|
||||
return app;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
uploadIpa: async ({ args }: { args: string[] }) => {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.ipa')) {
|
||||
throw new Error(t('usageUploadIpa'));
|
||||
}
|
||||
const {
|
||||
versionName,
|
||||
buildTime,
|
||||
appId: appIdInPkg,
|
||||
appKey: appKeyInPkg,
|
||||
} = await getIpaInfo(fn);
|
||||
const { appId, appKey } = await getSelectedApp('ios');
|
||||
|
||||
if (appIdInPkg && appIdInPkg != appId) {
|
||||
throw new Error(t('appIdMismatchIpa', { appIdInPkg, appId }));
|
||||
}
|
||||
|
||||
if (appKeyInPkg && appKeyInPkg !== appKey) {
|
||||
throw new Error(t('appKeyMismatchIpa', { appKeyInPkg, appKey }));
|
||||
}
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const { id } = await post(`/app/${appId}/package/create`, {
|
||||
name: versionName,
|
||||
hash,
|
||||
buildTime,
|
||||
deps: depVersions,
|
||||
commit: await getCommitInfo(),
|
||||
});
|
||||
saveToLocal(fn, `${appId}/package/${id}.ipa`);
|
||||
console.log(t('ipaUploadSuccess', { id, version: versionName, buildTime }));
|
||||
},
|
||||
uploadApk: async ({ args }: { args: string[] }) => {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.apk')) {
|
||||
throw new Error(t('usageUploadApk'));
|
||||
}
|
||||
const {
|
||||
versionName,
|
||||
buildTime,
|
||||
appId: appIdInPkg,
|
||||
appKey: appKeyInPkg,
|
||||
} = await getApkInfo(fn);
|
||||
const { appId, appKey } = await getSelectedApp('android');
|
||||
|
||||
if (appIdInPkg && appIdInPkg != appId) {
|
||||
throw new Error(t('appIdMismatchApk', { appIdInPkg, appId }));
|
||||
}
|
||||
|
||||
if (appKeyInPkg && appKeyInPkg !== appKey) {
|
||||
throw new Error(t('appKeyMismatchApk', { appKeyInPkg, appKey }));
|
||||
}
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const { id } = await post(`/app/${appId}/package/create`, {
|
||||
name: versionName,
|
||||
hash,
|
||||
buildTime,
|
||||
deps: depVersions,
|
||||
commit: await getCommitInfo(),
|
||||
});
|
||||
saveToLocal(fn, `${appId}/package/${id}.apk`);
|
||||
console.log(t('apkUploadSuccess', { id, version: versionName, buildTime }));
|
||||
},
|
||||
uploadApp: async ({ args }: { args: string[] }) => {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.app')) {
|
||||
throw new Error(t('usageUploadApp'));
|
||||
}
|
||||
const {
|
||||
versionName,
|
||||
buildTime,
|
||||
appId: appIdInPkg,
|
||||
appKey: appKeyInPkg,
|
||||
} = await getAppInfo(fn);
|
||||
const { appId, appKey } = await getSelectedApp('harmony');
|
||||
|
||||
if (appIdInPkg && appIdInPkg != appId) {
|
||||
throw new Error(t('appIdMismatchApp', { appIdInPkg, appId }));
|
||||
}
|
||||
|
||||
if (appKeyInPkg && appKeyInPkg !== appKey) {
|
||||
throw new Error(t('appKeyMismatchApp', { appKeyInPkg, appKey }));
|
||||
}
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const { id } = await post(`/app/${appId}/package/create`, {
|
||||
name: versionName,
|
||||
hash,
|
||||
buildTime,
|
||||
deps: depVersions,
|
||||
commit: await getCommitInfo(),
|
||||
});
|
||||
saveToLocal(fn, `${appId}/package/${id}.app`);
|
||||
console.log(t('appUploadSuccess', { id, version: versionName, buildTime }));
|
||||
},
|
||||
parseApp: async ({ args }: { args: string[] }) => {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.app')) {
|
||||
throw new Error(t('usageParseApp'));
|
||||
}
|
||||
console.log(await getAppInfo(fn));
|
||||
},
|
||||
parseIpa: async ({ args }: { args: string[] }) => {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.ipa')) {
|
||||
throw new Error(t('usageParseIpa'));
|
||||
}
|
||||
console.log(await getIpaInfo(fn));
|
||||
},
|
||||
parseApk: async ({ args }: { args: string[] }) => {
|
||||
const fn = args[0];
|
||||
if (!fn || !fn.endsWith('.apk')) {
|
||||
throw new Error(t('usageParseApk'));
|
||||
}
|
||||
console.log(await getApkInfo(fn));
|
||||
},
|
||||
packages: async ({ options }: { options: { platform: Platform } }) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform || (await question(t('platformPrompt'))),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
await listPackage(appId);
|
||||
},
|
||||
};
|
10
src/types.ts
Normal file
10
src/types.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
declare global {
|
||||
var NO_INTERACTIVE: boolean;
|
||||
var USE_ACC_OSS: boolean;
|
||||
}
|
||||
|
||||
export interface Session {
|
||||
token: string;
|
||||
}
|
||||
|
||||
export type Platform = 'ios' | 'android' | 'harmony';
|
43
src/user.js
43
src/user.js
@@ -1,43 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/13/16.
|
||||
*/
|
||||
|
||||
import {question} from './utils';
|
||||
const {
|
||||
post,
|
||||
get,
|
||||
replaceSession,
|
||||
saveSession,
|
||||
closeSession,
|
||||
} = require('./api');
|
||||
const crypto = require('crypto');
|
||||
|
||||
function md5(str) {
|
||||
return crypto.createHash('md5').update(str).digest('hex');
|
||||
}
|
||||
|
||||
exports.commands = {
|
||||
login: async function ({args}){
|
||||
const email = args[0] || await question('email:');
|
||||
const pwd = args[1] || await question('password:', true);
|
||||
const {token, info} = await post('/user/login', {
|
||||
email,
|
||||
pwd: md5(pwd),
|
||||
});
|
||||
replaceSession({token});
|
||||
await saveSession();
|
||||
console.log(`Welcome, ${info.name}.`);
|
||||
},
|
||||
logout: async function (){
|
||||
await closeSession();
|
||||
console.log('Logged out.');
|
||||
},
|
||||
me: async function (){
|
||||
const me = await get('/user/me');
|
||||
for (const k in me) {
|
||||
if (k !== 'ok') {
|
||||
console.log(`${k}: ${me[k]}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
34
src/user.ts
Normal file
34
src/user.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { question } from './utils';
|
||||
import { post, get, replaceSession, saveSession, closeSession } from './api';
|
||||
import crypto from 'crypto';
|
||||
import { t } from './utils/i18n';
|
||||
|
||||
function md5(str: string) {
|
||||
return crypto.createHash('md5').update(str).digest('hex');
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
login: async ({ args }: { args: string[] }) => {
|
||||
const email = args[0] || (await question('email:'));
|
||||
const pwd = args[1] || (await question('password:', true));
|
||||
const { token, info } = await post('/user/login', {
|
||||
email,
|
||||
pwd: md5(pwd),
|
||||
});
|
||||
replaceSession({ token });
|
||||
await saveSession();
|
||||
console.log(t('welcomeMessage', { name: info.name }));
|
||||
},
|
||||
logout: async () => {
|
||||
await closeSession();
|
||||
console.log(t('loggedOut'));
|
||||
},
|
||||
me: async () => {
|
||||
const me = await get('/user/me');
|
||||
for (const k in me) {
|
||||
if (k !== 'ok') {
|
||||
console.log(`${k}: ${me[k]}`);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
35
src/utils/add-gitignore.ts
Normal file
35
src/utils/add-gitignore.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import fs from 'fs';
|
||||
// import path from 'path';
|
||||
import { credentialFile, tempDir } from './constants';
|
||||
import { t } from './i18n';
|
||||
|
||||
export function addGitIgnore() {
|
||||
const shouldIgnore = [credentialFile, tempDir];
|
||||
|
||||
const gitignorePath = '.gitignore';
|
||||
|
||||
if (!fs.existsSync(gitignorePath)) {
|
||||
return;
|
||||
}
|
||||
|
||||
const gitignoreContent = fs.readFileSync(gitignorePath, 'utf-8');
|
||||
|
||||
const gitignoreLines = gitignoreContent.split('\n');
|
||||
|
||||
for (const line of gitignoreLines) {
|
||||
const index = shouldIgnore.indexOf(line.trim());
|
||||
if (index !== -1) {
|
||||
shouldIgnore.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (shouldIgnore.length > 0) {
|
||||
gitignoreLines.push('# react-native-update');
|
||||
for (const line of shouldIgnore) {
|
||||
gitignoreLines.push(line);
|
||||
console.log(t('addedToGitignore', { line }));
|
||||
}
|
||||
|
||||
fs.writeFileSync(gitignorePath, gitignoreLines.join('\n'));
|
||||
}
|
||||
}
|
90
src/utils/app-info-parser/apk.js
Normal file
90
src/utils/app-info-parser/apk.js
Normal file
@@ -0,0 +1,90 @@
|
||||
const Zip = require('./zip')
|
||||
const { mapInfoResource, findApkIconPath, getBase64FromBuffer } = require('./utils')
|
||||
const ManifestName = /^androidmanifest\.xml$/
|
||||
const ResourceName = /^resources\.arsc$/
|
||||
|
||||
const ManifestXmlParser = require('./xml-parser/manifest')
|
||||
const ResourceFinder = require('./resource-finder')
|
||||
|
||||
class ApkParser extends Zip {
|
||||
/**
|
||||
* parser for parsing .apk file
|
||||
* @param {String | File | Blob} file // file's path in Node, instance of File or Blob in Browser
|
||||
*/
|
||||
constructor (file) {
|
||||
super(file)
|
||||
if (!(this instanceof ApkParser)) {
|
||||
return new ApkParser(file)
|
||||
}
|
||||
}
|
||||
parse () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.getEntries([ManifestName, ResourceName]).then(buffers => {
|
||||
if (!buffers[ManifestName]) {
|
||||
throw new Error('AndroidManifest.xml can\'t be found.')
|
||||
}
|
||||
let apkInfo = this._parseManifest(buffers[ManifestName])
|
||||
let resourceMap
|
||||
if (!buffers[ResourceName]) {
|
||||
resolve(apkInfo)
|
||||
} else {
|
||||
// parse resourceMap
|
||||
resourceMap = this._parseResourceMap(buffers[ResourceName])
|
||||
// update apkInfo with resourceMap
|
||||
apkInfo = mapInfoResource(apkInfo, resourceMap)
|
||||
|
||||
// find icon path and parse icon
|
||||
const iconPath = findApkIconPath(apkInfo)
|
||||
if (iconPath) {
|
||||
this.getEntry(iconPath).then(iconBuffer => {
|
||||
apkInfo.icon = iconBuffer ? getBase64FromBuffer(iconBuffer) : null
|
||||
resolve(apkInfo)
|
||||
}).catch(e => {
|
||||
apkInfo.icon = null
|
||||
resolve(apkInfo)
|
||||
console.warn('[Warning] failed to parse icon: ', e)
|
||||
})
|
||||
} else {
|
||||
apkInfo.icon = null
|
||||
resolve(apkInfo)
|
||||
}
|
||||
}
|
||||
}).catch(e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
/**
|
||||
* Parse manifest
|
||||
* @param {Buffer} buffer // manifest file's buffer
|
||||
*/
|
||||
_parseManifest (buffer) {
|
||||
try {
|
||||
const parser = new ManifestXmlParser(buffer, {
|
||||
ignore: [
|
||||
'application.activity',
|
||||
'application.service',
|
||||
'application.receiver',
|
||||
'application.provider',
|
||||
'permission-group'
|
||||
]
|
||||
})
|
||||
return parser.parse()
|
||||
} catch (e) {
|
||||
throw new Error('Parse AndroidManifest.xml error: ', e)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Parse resourceMap
|
||||
* @param {Buffer} buffer // resourceMap file's buffer
|
||||
*/
|
||||
_parseResourceMap (buffer) {
|
||||
try {
|
||||
return new ResourceFinder().processResourceTable(buffer)
|
||||
} catch (e) {
|
||||
throw new Error('Parser resources.arsc error: ' + e)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ApkParser
|
16
src/utils/app-info-parser/app.js
Normal file
16
src/utils/app-info-parser/app.js
Normal file
@@ -0,0 +1,16 @@
|
||||
const Zip = require('./zip')
|
||||
|
||||
class AppParser extends Zip {
|
||||
/**
|
||||
* parser for parsing .apk file
|
||||
* @param {String | File | Blob} file // file's path in Node, instance of File or Blob in Browser
|
||||
*/
|
||||
constructor (file) {
|
||||
super(file)
|
||||
if (!(this instanceof AppParser)) {
|
||||
return new AppParser(file)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = AppParser
|
45
src/utils/app-info-parser/index.ts
Normal file
45
src/utils/app-info-parser/index.ts
Normal file
@@ -0,0 +1,45 @@
|
||||
const ApkParser = require('./apk');
|
||||
const IpaParser = require('./ipa');
|
||||
const AppParser = require('./app');
|
||||
const supportFileTypes = ['ipa', 'apk', 'app'];
|
||||
|
||||
class AppInfoParser {
|
||||
file: string | File;
|
||||
parser: any;
|
||||
/**
|
||||
* parser for parsing .ipa or .apk file
|
||||
* @param {String | File} file // file's path in Node, instance of File in Browser
|
||||
*/
|
||||
constructor(file: string | File) {
|
||||
if (!file) {
|
||||
throw new Error(
|
||||
"Param miss: file(file's path in Node, instance of File in browser).",
|
||||
);
|
||||
}
|
||||
const splits = (typeof file === 'string' ? file : file.name).split('.');
|
||||
const fileType = splits[splits.length - 1].toLowerCase();
|
||||
if (!supportFileTypes.includes(fileType)) {
|
||||
throw new Error(
|
||||
'Unsupported file type, only support .ipa or .apk or .app file.',
|
||||
);
|
||||
}
|
||||
this.file = file;
|
||||
|
||||
switch (fileType) {
|
||||
case 'ipa':
|
||||
this.parser = new IpaParser(this.file);
|
||||
break;
|
||||
case 'apk':
|
||||
this.parser = new ApkParser(this.file);
|
||||
break;
|
||||
case 'app':
|
||||
this.parser = new AppParser(this.file);
|
||||
break;
|
||||
}
|
||||
}
|
||||
parse() {
|
||||
return this.parser.parse();
|
||||
}
|
||||
}
|
||||
|
||||
export default AppInfoParser;
|
92
src/utils/app-info-parser/ipa.js
Normal file
92
src/utils/app-info-parser/ipa.js
Normal file
@@ -0,0 +1,92 @@
|
||||
const parsePlist = require('plist').parse
|
||||
const parseBplist = require('bplist-parser').parseBuffer
|
||||
const cgbiToPng = require('cgbi-to-png')
|
||||
|
||||
const Zip = require('./zip')
|
||||
const { findIpaIconPath, getBase64FromBuffer, isBrowser } = require('./utils')
|
||||
|
||||
const PlistName = new RegExp('payload/[^/]+?.app/info.plist$', 'i')
|
||||
const ProvisionName = /payload\/.+?\.app\/embedded.mobileprovision/
|
||||
|
||||
class IpaParser extends Zip {
|
||||
/**
|
||||
* parser for parsing .ipa file
|
||||
* @param {String | File | Blob} file // file's path in Node, instance of File or Blob in Browser
|
||||
*/
|
||||
constructor (file) {
|
||||
super(file)
|
||||
if (!(this instanceof IpaParser)) {
|
||||
return new IpaParser(file)
|
||||
}
|
||||
}
|
||||
parse () {
|
||||
return new Promise((resolve, reject) => {
|
||||
this.getEntries([PlistName, ProvisionName]).then(buffers => {
|
||||
if (!buffers[PlistName]) {
|
||||
throw new Error('Info.plist can\'t be found.')
|
||||
}
|
||||
const plistInfo = this._parsePlist(buffers[PlistName])
|
||||
// parse mobile provision
|
||||
const provisionInfo = this._parseProvision(buffers[ProvisionName])
|
||||
plistInfo.mobileProvision = provisionInfo
|
||||
|
||||
// find icon path and parse icon
|
||||
const iconRegex = new RegExp(findIpaIconPath(plistInfo).toLowerCase())
|
||||
this.getEntry(iconRegex).then(iconBuffer => {
|
||||
try {
|
||||
// In general, the ipa file's icon has been specially processed, should be converted
|
||||
plistInfo.icon = iconBuffer ? getBase64FromBuffer(cgbiToPng.revert(iconBuffer)) : null
|
||||
} catch (err) {
|
||||
if (isBrowser()) {
|
||||
// Normal conversion in other cases
|
||||
plistInfo.icon = iconBuffer ? getBase64FromBuffer(window.btoa(String.fromCharCode(...iconBuffer))) : null
|
||||
} else {
|
||||
plistInfo.icon = null
|
||||
console.warn('[Warning] failed to parse icon: ', err)
|
||||
}
|
||||
}
|
||||
resolve(plistInfo)
|
||||
}).catch(e => {
|
||||
reject(e)
|
||||
})
|
||||
}).catch(e => {
|
||||
reject(e)
|
||||
})
|
||||
})
|
||||
}
|
||||
/**
|
||||
* Parse plist
|
||||
* @param {Buffer} buffer // plist file's buffer
|
||||
*/
|
||||
_parsePlist (buffer) {
|
||||
let result
|
||||
const bufferType = buffer[0]
|
||||
if (bufferType === 60 || bufferType === '<' || bufferType === 239) {
|
||||
result = parsePlist(buffer.toString())
|
||||
} else if (bufferType === 98) {
|
||||
result = parseBplist(buffer)[0]
|
||||
} else {
|
||||
throw new Error('Unknown plist buffer type.')
|
||||
}
|
||||
return result
|
||||
}
|
||||
/**
|
||||
* parse provision
|
||||
* @param {Buffer} buffer // provision file's buffer
|
||||
*/
|
||||
_parseProvision (buffer) {
|
||||
let info = {}
|
||||
if (buffer) {
|
||||
let content = buffer.toString('utf-8')
|
||||
const firstIndex = content.indexOf('<?xml')
|
||||
const endIndex = content.indexOf('</plist>')
|
||||
content = content.slice(firstIndex, endIndex + 8)
|
||||
if (content) {
|
||||
info = parsePlist(content)
|
||||
}
|
||||
}
|
||||
return info
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = IpaParser
|
499
src/utils/app-info-parser/resource-finder.js
Normal file
499
src/utils/app-info-parser/resource-finder.js
Normal file
@@ -0,0 +1,499 @@
|
||||
/**
|
||||
* Code translated from a C# project https://github.com/hylander0/Iteedee.ApkReader/blob/master/Iteedee.ApkReader/ApkResourceFinder.cs
|
||||
*
|
||||
* Decode binary file `resources.arsc` from a .apk file to a JavaScript Object.
|
||||
*/
|
||||
|
||||
var ByteBuffer = require("bytebuffer");
|
||||
|
||||
var DEBUG = false;
|
||||
|
||||
var RES_STRING_POOL_TYPE = 0x0001;
|
||||
var RES_TABLE_TYPE = 0x0002;
|
||||
var RES_TABLE_PACKAGE_TYPE = 0x0200;
|
||||
var RES_TABLE_TYPE_TYPE = 0x0201;
|
||||
var RES_TABLE_TYPE_SPEC_TYPE = 0x0202;
|
||||
|
||||
// The 'data' holds a ResTable_ref, a reference to another resource
|
||||
// table entry.
|
||||
var TYPE_REFERENCE = 0x01;
|
||||
// The 'data' holds an index into the containing resource table's
|
||||
// global value string pool.
|
||||
var TYPE_STRING = 0x03;
|
||||
|
||||
function ResourceFinder() {
|
||||
this.valueStringPool = null;
|
||||
this.typeStringPool = null;
|
||||
this.keyStringPool = null;
|
||||
|
||||
this.package_id = 0;
|
||||
|
||||
this.responseMap = {};
|
||||
this.entryMap = {};
|
||||
}
|
||||
|
||||
/**
|
||||
* Same to C# BinaryReader.readBytes
|
||||
*
|
||||
* @param bb ByteBuffer
|
||||
* @param len length
|
||||
* @returns {Buffer}
|
||||
*/
|
||||
ResourceFinder.readBytes = function(bb, len) {
|
||||
var uint8Array = new Uint8Array(len);
|
||||
for (var i = 0; i < len; i++) {
|
||||
uint8Array[i] = bb.readUint8();
|
||||
}
|
||||
|
||||
return ByteBuffer.wrap(uint8Array, "binary", true);
|
||||
};
|
||||
|
||||
//
|
||||
/**
|
||||
*
|
||||
* @param {ByteBuffer} bb
|
||||
* @return {Map<String, Set<String>>}
|
||||
*/
|
||||
ResourceFinder.prototype.processResourceTable = function(resourceBuffer) {
|
||||
const bb = ByteBuffer.wrap(resourceBuffer, "binary", true);
|
||||
|
||||
// Resource table structure
|
||||
var type = bb.readShort(),
|
||||
headerSize = bb.readShort(),
|
||||
size = bb.readInt(),
|
||||
packageCount = bb.readInt(),
|
||||
buffer,
|
||||
bb2;
|
||||
if (type != RES_TABLE_TYPE) {
|
||||
throw new Error("No RES_TABLE_TYPE found!");
|
||||
}
|
||||
if (size != bb.limit) {
|
||||
throw new Error("The buffer size not matches to the resource table size.");
|
||||
}
|
||||
bb.offset = headerSize;
|
||||
|
||||
var realStringPoolCount = 0,
|
||||
realPackageCount = 0;
|
||||
|
||||
while (true) {
|
||||
var pos, t, hs, s;
|
||||
try {
|
||||
pos = bb.offset;
|
||||
t = bb.readShort();
|
||||
hs = bb.readShort();
|
||||
s = bb.readInt();
|
||||
} catch (e) {
|
||||
break;
|
||||
}
|
||||
if (t == RES_STRING_POOL_TYPE) {
|
||||
// Process the string pool
|
||||
if (realStringPoolCount == 0) {
|
||||
// Only the first string pool is processed.
|
||||
if (DEBUG) {
|
||||
console.log("Processing the string pool ...");
|
||||
}
|
||||
|
||||
buffer = new ByteBuffer(s);
|
||||
bb.offset = pos;
|
||||
bb.prependTo(buffer);
|
||||
|
||||
bb2 = ByteBuffer.wrap(buffer, "binary", true);
|
||||
|
||||
bb2.LE();
|
||||
this.valueStringPool = this.processStringPool(bb2);
|
||||
}
|
||||
realStringPoolCount++;
|
||||
} else if (t == RES_TABLE_PACKAGE_TYPE) {
|
||||
// Process the package
|
||||
if (DEBUG) {
|
||||
console.log("Processing the package " + realPackageCount + " ...");
|
||||
}
|
||||
|
||||
buffer = new ByteBuffer(s);
|
||||
bb.offset = pos;
|
||||
bb.prependTo(buffer);
|
||||
|
||||
bb2 = ByteBuffer.wrap(buffer, "binary", true);
|
||||
bb2.LE();
|
||||
this.processPackage(bb2);
|
||||
|
||||
realPackageCount++;
|
||||
} else {
|
||||
throw new Error("Unsupported type");
|
||||
}
|
||||
bb.offset = pos + s;
|
||||
if (!bb.remaining()) break;
|
||||
}
|
||||
|
||||
if (realStringPoolCount != 1) {
|
||||
throw new Error("More than 1 string pool found!");
|
||||
}
|
||||
if (realPackageCount != packageCount) {
|
||||
throw new Error("Real package count not equals the declared count.");
|
||||
}
|
||||
|
||||
return this.responseMap;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {ByteBuffer} bb
|
||||
*/
|
||||
ResourceFinder.prototype.processPackage = function(bb) {
|
||||
// Package structure
|
||||
var type = bb.readShort(),
|
||||
headerSize = bb.readShort(),
|
||||
size = bb.readInt(),
|
||||
id = bb.readInt();
|
||||
|
||||
this.package_id = id;
|
||||
|
||||
for (var i = 0; i < 256; ++i) {
|
||||
bb.readUint8();
|
||||
}
|
||||
|
||||
var typeStrings = bb.readInt(),
|
||||
lastPublicType = bb.readInt(),
|
||||
keyStrings = bb.readInt(),
|
||||
lastPublicKey = bb.readInt();
|
||||
|
||||
if (typeStrings != headerSize) {
|
||||
throw new Error(
|
||||
"TypeStrings must immediately following the package structure header."
|
||||
);
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
console.log("Type strings:");
|
||||
}
|
||||
|
||||
var lastPosition = bb.offset;
|
||||
bb.offset = typeStrings;
|
||||
var bbTypeStrings = ResourceFinder.readBytes(bb, bb.limit - bb.offset);
|
||||
bb.offset = lastPosition;
|
||||
this.typeStringPool = this.processStringPool(bbTypeStrings);
|
||||
|
||||
// Key strings
|
||||
if (DEBUG) {
|
||||
console.log("Key strings:");
|
||||
}
|
||||
|
||||
bb.offset = keyStrings;
|
||||
var key_type = bb.readShort(),
|
||||
key_headerSize = bb.readShort(),
|
||||
key_size = bb.readInt();
|
||||
|
||||
lastPosition = bb.offset;
|
||||
bb.offset = keyStrings;
|
||||
var bbKeyStrings = ResourceFinder.readBytes(bb, bb.limit - bb.offset);
|
||||
bb.offset = lastPosition;
|
||||
this.keyStringPool = this.processStringPool(bbKeyStrings);
|
||||
|
||||
// Iterate through all chunks
|
||||
var typeSpecCount = 0;
|
||||
var typeCount = 0;
|
||||
|
||||
bb.offset = keyStrings + key_size;
|
||||
|
||||
var bb2;
|
||||
|
||||
while (true) {
|
||||
var pos = bb.offset;
|
||||
try {
|
||||
var t = bb.readShort();
|
||||
var hs = bb.readShort();
|
||||
var s = bb.readInt();
|
||||
} catch (e) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (t == RES_TABLE_TYPE_SPEC_TYPE) {
|
||||
bb.offset = pos;
|
||||
bb2 = ResourceFinder.readBytes(bb, s);
|
||||
this.processTypeSpec(bb2);
|
||||
|
||||
typeSpecCount++;
|
||||
} else if (t == RES_TABLE_TYPE_TYPE) {
|
||||
bb.offset = pos;
|
||||
bb2 = ResourceFinder.readBytes(bb, s);
|
||||
this.processType(bb2);
|
||||
|
||||
typeCount++;
|
||||
}
|
||||
|
||||
if (s == 0) {
|
||||
break;
|
||||
}
|
||||
|
||||
bb.offset = pos + s;
|
||||
|
||||
if (!bb.remaining()) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {ByteBuffer} bb
|
||||
*/
|
||||
ResourceFinder.prototype.processType = function(bb) {
|
||||
var type = bb.readShort(),
|
||||
headerSize = bb.readShort(),
|
||||
size = bb.readInt(),
|
||||
id = bb.readByte(),
|
||||
res0 = bb.readByte(),
|
||||
res1 = bb.readShort(),
|
||||
entryCount = bb.readInt(),
|
||||
entriesStart = bb.readInt();
|
||||
|
||||
var refKeys = {};
|
||||
|
||||
var config_size = bb.readInt();
|
||||
|
||||
// Skip the config data
|
||||
bb.offset = headerSize;
|
||||
|
||||
if (headerSize + entryCount * 4 != entriesStart) {
|
||||
throw new Error("HeaderSize, entryCount and entriesStart are not valid.");
|
||||
}
|
||||
|
||||
// Start to get entry indices
|
||||
var entryIndices = new Array(entryCount);
|
||||
for (var i = 0; i < entryCount; ++i) {
|
||||
entryIndices[i] = bb.readInt();
|
||||
}
|
||||
|
||||
// Get entries
|
||||
for (var i = 0; i < entryCount; ++i) {
|
||||
if (entryIndices[i] == -1) continue;
|
||||
|
||||
var resource_id = (this.package_id << 24) | (id << 16) | i;
|
||||
|
||||
var pos = bb.offset,
|
||||
entry_size,
|
||||
entry_flag,
|
||||
entry_key,
|
||||
value_size,
|
||||
value_res0,
|
||||
value_dataType,
|
||||
value_data;
|
||||
try {
|
||||
entry_size = bb.readShort()
|
||||
entry_flag = bb.readShort()
|
||||
entry_key = bb.readInt()
|
||||
} catch (e) {
|
||||
break
|
||||
}
|
||||
|
||||
// Get the value (simple) or map (complex)
|
||||
|
||||
var FLAG_COMPLEX = 0x0001;
|
||||
if ((entry_flag & FLAG_COMPLEX) == 0) {
|
||||
// Simple case
|
||||
value_size = bb.readShort();
|
||||
value_res0 = bb.readByte();
|
||||
value_dataType = bb.readByte();
|
||||
value_data = bb.readInt();
|
||||
|
||||
var idStr = Number(resource_id).toString(16);
|
||||
var keyStr = this.keyStringPool[entry_key];
|
||||
|
||||
var data = null;
|
||||
|
||||
if (DEBUG) {
|
||||
console.log(
|
||||
"Entry 0x" + idStr + ", key: " + keyStr + ", simple value type: "
|
||||
);
|
||||
}
|
||||
|
||||
var key = parseInt(idStr, 16);
|
||||
|
||||
var entryArr = this.entryMap[key];
|
||||
if (entryArr == null) {
|
||||
entryArr = [];
|
||||
}
|
||||
entryArr.push(keyStr);
|
||||
|
||||
this.entryMap[key] = entryArr;
|
||||
|
||||
if (value_dataType == TYPE_STRING) {
|
||||
data = this.valueStringPool[value_data];
|
||||
|
||||
if (DEBUG) {
|
||||
console.log(", data: " + this.valueStringPool[value_data] + "");
|
||||
}
|
||||
} else if (value_dataType == TYPE_REFERENCE) {
|
||||
var hexIndex = Number(value_data).toString(16);
|
||||
|
||||
refKeys[idStr] = value_data;
|
||||
} else {
|
||||
data = "" + value_data;
|
||||
if (DEBUG) {
|
||||
console.log(", data: " + value_data + "");
|
||||
}
|
||||
}
|
||||
|
||||
this.putIntoMap("@" + idStr, data);
|
||||
} else {
|
||||
// Complex case
|
||||
var entry_parent = bb.readInt();
|
||||
var entry_count = bb.readInt();
|
||||
|
||||
for (var j = 0; j < entry_count; ++j) {
|
||||
var ref_name = bb.readInt();
|
||||
value_size = bb.readShort();
|
||||
value_res0 = bb.readByte();
|
||||
value_dataType = bb.readByte();
|
||||
value_data = bb.readInt();
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
console.log(
|
||||
"Entry 0x" +
|
||||
Number(resource_id).toString(16) +
|
||||
", key: " +
|
||||
this.keyStringPool[entry_key] +
|
||||
", complex value, not printed."
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (var refK in refKeys) {
|
||||
var values = this.responseMap[
|
||||
"@" +
|
||||
Number(refKeys[refK])
|
||||
.toString(16)
|
||||
.toUpperCase()
|
||||
];
|
||||
if (values != null && Object.keys(values).length < 1000) {
|
||||
for (var value in values) {
|
||||
this.putIntoMap("@" + refK, values[value]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {ByteBuffer} bb
|
||||
* @return {Array}
|
||||
*/
|
||||
ResourceFinder.prototype.processStringPool = function(bb) {
|
||||
// String pool structure
|
||||
//
|
||||
var type = bb.readShort(),
|
||||
headerSize = bb.readShort(),
|
||||
size = bb.readInt(),
|
||||
stringCount = bb.readInt(),
|
||||
styleCount = bb.readInt(),
|
||||
flags = bb.readInt(),
|
||||
stringsStart = bb.readInt(),
|
||||
stylesStart = bb.readInt(),
|
||||
u16len,
|
||||
buffer;
|
||||
|
||||
var isUTF_8 = (flags & 256) != 0;
|
||||
|
||||
var offsets = new Array(stringCount);
|
||||
for (var i = 0; i < stringCount; ++i) {
|
||||
offsets[i] = bb.readInt();
|
||||
}
|
||||
|
||||
var strings = new Array(stringCount);
|
||||
|
||||
for (var i = 0; i < stringCount; ++i) {
|
||||
var pos = stringsStart + offsets[i];
|
||||
bb.offset = pos;
|
||||
|
||||
strings[i] = "";
|
||||
|
||||
if (isUTF_8) {
|
||||
u16len = bb.readUint8();
|
||||
|
||||
if ((u16len & 0x80) != 0) {
|
||||
u16len = ((u16len & 0x7f) << 8) + bb.readUint8();
|
||||
}
|
||||
|
||||
var u8len = bb.readUint8();
|
||||
if ((u8len & 0x80) != 0) {
|
||||
u8len = ((u8len & 0x7f) << 8) + bb.readUint8();
|
||||
}
|
||||
|
||||
if (u8len > 0) {
|
||||
buffer = ResourceFinder.readBytes(bb, u8len);
|
||||
try {
|
||||
strings[i] = ByteBuffer.wrap(buffer, "utf8", true).toString("utf8");
|
||||
} catch (e) {
|
||||
if (DEBUG) {
|
||||
console.error(e);
|
||||
console.log("Error when turning buffer to utf-8 string.");
|
||||
}
|
||||
}
|
||||
} else {
|
||||
strings[i] = "";
|
||||
}
|
||||
} else {
|
||||
u16len = bb.readUint16();
|
||||
if ((u16len & 0x8000) != 0) {
|
||||
// larger than 32768
|
||||
u16len = ((u16len & 0x7fff) << 16) + bb.readUint16();
|
||||
}
|
||||
|
||||
if (u16len > 0) {
|
||||
var len = u16len * 2;
|
||||
buffer = ResourceFinder.readBytes(bb, len);
|
||||
try {
|
||||
strings[i] = ByteBuffer.wrap(buffer, "utf8", true).toString("utf8");
|
||||
} catch (e) {
|
||||
if (DEBUG) {
|
||||
console.error(e);
|
||||
console.log("Error when turning buffer to utf-8 string.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (DEBUG) {
|
||||
console.log("Parsed value: {0}", strings[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return strings;
|
||||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {ByteBuffer} bb
|
||||
*/
|
||||
ResourceFinder.prototype.processTypeSpec = function(bb) {
|
||||
var type = bb.readShort(),
|
||||
headerSize = bb.readShort(),
|
||||
size = bb.readInt(),
|
||||
id = bb.readByte(),
|
||||
res0 = bb.readByte(),
|
||||
res1 = bb.readShort(),
|
||||
entryCount = bb.readInt();
|
||||
|
||||
if (DEBUG) {
|
||||
console.log("Processing type spec " + this.typeStringPool[id - 1] + "...");
|
||||
}
|
||||
|
||||
var flags = new Array(entryCount);
|
||||
|
||||
for (var i = 0; i < entryCount; ++i) {
|
||||
flags[i] = bb.readInt();
|
||||
}
|
||||
};
|
||||
|
||||
ResourceFinder.prototype.putIntoMap = function(resId, value) {
|
||||
if (this.responseMap[resId.toUpperCase()] == null) {
|
||||
this.responseMap[resId.toUpperCase()] = []
|
||||
}
|
||||
if(value){
|
||||
this.responseMap[resId.toUpperCase()].push(value)
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = ResourceFinder;
|
167
src/utils/app-info-parser/utils.js
Normal file
167
src/utils/app-info-parser/utils.js
Normal file
@@ -0,0 +1,167 @@
|
||||
function objectType (o) {
|
||||
return Object.prototype.toString.call(o).slice(8, -1).toLowerCase()
|
||||
}
|
||||
|
||||
function isArray (o) {
|
||||
return objectType(o) === 'array'
|
||||
}
|
||||
|
||||
function isObject (o) {
|
||||
return objectType(o) === 'object'
|
||||
}
|
||||
|
||||
function isPrimitive (o) {
|
||||
return o === null || ['boolean', 'number', 'string', 'undefined'].includes(objectType(o))
|
||||
}
|
||||
|
||||
function isBrowser () {
|
||||
return (
|
||||
typeof process === 'undefined' ||
|
||||
Object.prototype.toString.call(process) !== '[object process]'
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* map file place with resourceMap
|
||||
* @param {Object} apkInfo // json info parsed from .apk file
|
||||
* @param {Object} resourceMap // resourceMap
|
||||
*/
|
||||
function mapInfoResource (apkInfo, resourceMap) {
|
||||
iteratorObj(apkInfo)
|
||||
return apkInfo
|
||||
function iteratorObj (obj) {
|
||||
for (const i in obj) {
|
||||
if (isArray(obj[i])) {
|
||||
iteratorArray(obj[i])
|
||||
} else if (isObject(obj[i])) {
|
||||
iteratorObj(obj[i])
|
||||
} else if (isPrimitive(obj[i])) {
|
||||
if (isResources(obj[i])) {
|
||||
obj[i] = resourceMap[transKeyToMatchResourceMap(obj[i])]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function iteratorArray (array) {
|
||||
const l = array.length
|
||||
for (let i = 0; i < l; i++) {
|
||||
if (isArray(array[i])) {
|
||||
iteratorArray(array[i])
|
||||
} else if (isObject(array[i])) {
|
||||
iteratorObj(array[i])
|
||||
} else if (isPrimitive(array[i])) {
|
||||
if (isResources(array[i])) {
|
||||
array[i] = resourceMap[transKeyToMatchResourceMap(array[i])]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isResources (attrValue) {
|
||||
if (!attrValue) return false
|
||||
if (typeof attrValue !== 'string') {
|
||||
attrValue = attrValue.toString()
|
||||
}
|
||||
return attrValue.indexOf('resourceId:') === 0
|
||||
}
|
||||
|
||||
function transKeyToMatchResourceMap (resourceId) {
|
||||
return '@' + resourceId.replace('resourceId:0x', '').toUpperCase()
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* find .apk file's icon path from json info
|
||||
* @param info // json info parsed from .apk file
|
||||
*/
|
||||
function findApkIconPath (info) {
|
||||
if (!info.application.icon || !info.application.icon.splice) {
|
||||
return ''
|
||||
}
|
||||
const rulesMap = {
|
||||
mdpi: 48,
|
||||
hdpi: 72,
|
||||
xhdpi: 96,
|
||||
xxdpi: 144,
|
||||
xxxhdpi: 192
|
||||
}
|
||||
const resultMap = {}
|
||||
const maxDpiIcon = { dpi: 120, icon: '' }
|
||||
|
||||
for (const i in rulesMap) {
|
||||
info.application.icon.some((icon) => {
|
||||
if (icon && icon.indexOf(i) !== -1) {
|
||||
resultMap['application-icon-' + rulesMap[i]] = icon
|
||||
return true
|
||||
}
|
||||
})
|
||||
|
||||
// get the maximal size icon
|
||||
if (
|
||||
resultMap['application-icon-' + rulesMap[i]] &&
|
||||
rulesMap[i] >= maxDpiIcon.dpi
|
||||
) {
|
||||
maxDpiIcon.dpi = rulesMap[i]
|
||||
maxDpiIcon.icon = resultMap['application-icon-' + rulesMap[i]]
|
||||
}
|
||||
}
|
||||
|
||||
if (Object.keys(resultMap).length === 0 || !maxDpiIcon.icon) {
|
||||
maxDpiIcon.dpi = 120
|
||||
maxDpiIcon.icon = info.application.icon[0] || ''
|
||||
resultMap['applicataion-icon-120'] = maxDpiIcon.icon
|
||||
}
|
||||
return maxDpiIcon.icon
|
||||
}
|
||||
|
||||
/**
|
||||
* find .ipa file's icon path from json info
|
||||
* @param info // json info parsed from .ipa file
|
||||
*/
|
||||
function findIpaIconPath (info) {
|
||||
if (
|
||||
info.CFBundleIcons &&
|
||||
info.CFBundleIcons.CFBundlePrimaryIcon &&
|
||||
info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles &&
|
||||
info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length
|
||||
) {
|
||||
return info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles[info.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles.length - 1]
|
||||
} else if (info.CFBundleIconFiles && info.CFBundleIconFiles.length) {
|
||||
return info.CFBundleIconFiles[info.CFBundleIconFiles.length - 1]
|
||||
} else {
|
||||
return '.app/Icon.png'
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* transform buffer to base64
|
||||
* @param {Buffer} buffer
|
||||
*/
|
||||
function getBase64FromBuffer (buffer) {
|
||||
return 'data:image/png;base64,' + buffer.toString('base64')
|
||||
}
|
||||
|
||||
/**
|
||||
* 去除unicode空字符
|
||||
* @param {String} str
|
||||
*/
|
||||
function decodeNullUnicode (str) {
|
||||
if (typeof str === 'string') {
|
||||
// eslint-disable-next-line
|
||||
str = str.replace(/\u0000/g, '')
|
||||
}
|
||||
return str
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
isArray,
|
||||
isObject,
|
||||
isPrimitive,
|
||||
isBrowser,
|
||||
mapInfoResource,
|
||||
findApkIconPath,
|
||||
findIpaIconPath,
|
||||
getBase64FromBuffer,
|
||||
decodeNullUnicode
|
||||
}
|
674
src/utils/app-info-parser/xml-parser/binary.js
Normal file
674
src/utils/app-info-parser/xml-parser/binary.js
Normal file
@@ -0,0 +1,674 @@
|
||||
// From https://github.com/openstf/adbkit-apkreader
|
||||
const NodeType = {
|
||||
ELEMENT_NODE: 1,
|
||||
ATTRIBUTE_NODE: 2,
|
||||
CDATA_SECTION_NODE: 4
|
||||
}
|
||||
|
||||
const ChunkType = {
|
||||
NULL: 0x0000,
|
||||
STRING_POOL: 0x0001,
|
||||
TABLE: 0x0002,
|
||||
XML: 0x0003,
|
||||
XML_FIRST_CHUNK: 0x0100,
|
||||
XML_START_NAMESPACE: 0x0100,
|
||||
XML_END_NAMESPACE: 0x0101,
|
||||
XML_START_ELEMENT: 0x0102,
|
||||
XML_END_ELEMENT: 0x0103,
|
||||
XML_CDATA: 0x0104,
|
||||
XML_LAST_CHUNK: 0x017f,
|
||||
XML_RESOURCE_MAP: 0x0180,
|
||||
TABLE_PACKAGE: 0x0200,
|
||||
TABLE_TYPE: 0x0201,
|
||||
TABLE_TYPE_SPEC: 0x0202
|
||||
}
|
||||
|
||||
const StringFlags = {
|
||||
SORTED: 1 << 0,
|
||||
UTF8: 1 << 8
|
||||
}
|
||||
|
||||
// Taken from android.util.TypedValue
|
||||
const TypedValue = {
|
||||
COMPLEX_MANTISSA_MASK: 0x00ffffff,
|
||||
COMPLEX_MANTISSA_SHIFT: 0x00000008,
|
||||
COMPLEX_RADIX_0p23: 0x00000003,
|
||||
COMPLEX_RADIX_16p7: 0x00000001,
|
||||
COMPLEX_RADIX_23p0: 0x00000000,
|
||||
COMPLEX_RADIX_8p15: 0x00000002,
|
||||
COMPLEX_RADIX_MASK: 0x00000003,
|
||||
COMPLEX_RADIX_SHIFT: 0x00000004,
|
||||
COMPLEX_UNIT_DIP: 0x00000001,
|
||||
COMPLEX_UNIT_FRACTION: 0x00000000,
|
||||
COMPLEX_UNIT_FRACTION_PARENT: 0x00000001,
|
||||
COMPLEX_UNIT_IN: 0x00000004,
|
||||
COMPLEX_UNIT_MASK: 0x0000000f,
|
||||
COMPLEX_UNIT_MM: 0x00000005,
|
||||
COMPLEX_UNIT_PT: 0x00000003,
|
||||
COMPLEX_UNIT_PX: 0x00000000,
|
||||
COMPLEX_UNIT_SHIFT: 0x00000000,
|
||||
COMPLEX_UNIT_SP: 0x00000002,
|
||||
DENSITY_DEFAULT: 0x00000000,
|
||||
DENSITY_NONE: 0x0000ffff,
|
||||
TYPE_ATTRIBUTE: 0x00000002,
|
||||
TYPE_DIMENSION: 0x00000005,
|
||||
TYPE_FIRST_COLOR_INT: 0x0000001c,
|
||||
TYPE_FIRST_INT: 0x00000010,
|
||||
TYPE_FLOAT: 0x00000004,
|
||||
TYPE_FRACTION: 0x00000006,
|
||||
TYPE_INT_BOOLEAN: 0x00000012,
|
||||
TYPE_INT_COLOR_ARGB4: 0x0000001e,
|
||||
TYPE_INT_COLOR_ARGB8: 0x0000001c,
|
||||
TYPE_INT_COLOR_RGB4: 0x0000001f,
|
||||
TYPE_INT_COLOR_RGB8: 0x0000001d,
|
||||
TYPE_INT_DEC: 0x00000010,
|
||||
TYPE_INT_HEX: 0x00000011,
|
||||
TYPE_LAST_COLOR_INT: 0x0000001f,
|
||||
TYPE_LAST_INT: 0x0000001f,
|
||||
TYPE_NULL: 0x00000000,
|
||||
TYPE_REFERENCE: 0x00000001,
|
||||
TYPE_STRING: 0x00000003
|
||||
}
|
||||
|
||||
class BinaryXmlParser {
|
||||
constructor (buffer, options = {}) {
|
||||
this.buffer = buffer
|
||||
this.cursor = 0
|
||||
this.strings = []
|
||||
this.resources = []
|
||||
this.document = null
|
||||
this.parent = null
|
||||
this.stack = []
|
||||
this.debug = options.debug || false
|
||||
}
|
||||
|
||||
readU8 () {
|
||||
this.debug && console.group('readU8')
|
||||
this.debug && console.debug('cursor:', this.cursor)
|
||||
const val = this.buffer[this.cursor]
|
||||
this.debug && console.debug('value:', val)
|
||||
this.cursor += 1
|
||||
this.debug && console.groupEnd()
|
||||
return val
|
||||
}
|
||||
|
||||
readU16 () {
|
||||
this.debug && console.group('readU16')
|
||||
this.debug && console.debug('cursor:', this.cursor)
|
||||
const val = this.buffer.readUInt16LE(this.cursor)
|
||||
this.debug && console.debug('value:', val)
|
||||
this.cursor += 2
|
||||
this.debug && console.groupEnd()
|
||||
return val
|
||||
}
|
||||
|
||||
readS32 () {
|
||||
this.debug && console.group('readS32')
|
||||
this.debug && console.debug('cursor:', this.cursor)
|
||||
const val = this.buffer.readInt32LE(this.cursor)
|
||||
this.debug && console.debug('value:', val)
|
||||
this.cursor += 4
|
||||
this.debug && console.groupEnd()
|
||||
return val
|
||||
}
|
||||
|
||||
readU32 () {
|
||||
this.debug && console.group('readU32')
|
||||
this.debug && console.debug('cursor:', this.cursor)
|
||||
const val = this.buffer.readUInt32LE(this.cursor)
|
||||
this.debug && console.debug('value:', val)
|
||||
this.cursor += 4
|
||||
this.debug && console.groupEnd()
|
||||
return val
|
||||
}
|
||||
|
||||
readLength8 () {
|
||||
this.debug && console.group('readLength8')
|
||||
let len = this.readU8()
|
||||
if (len & 0x80) {
|
||||
len = (len & 0x7f) << 8
|
||||
len += this.readU8()
|
||||
}
|
||||
this.debug && console.debug('length:', len)
|
||||
this.debug && console.groupEnd()
|
||||
return len
|
||||
}
|
||||
|
||||
readLength16 () {
|
||||
this.debug && console.group('readLength16')
|
||||
let len = this.readU16()
|
||||
if (len & 0x8000) {
|
||||
len = (len & 0x7fff) << 16
|
||||
len += this.readU16()
|
||||
}
|
||||
this.debug && console.debug('length:', len)
|
||||
this.debug && console.groupEnd()
|
||||
return len
|
||||
}
|
||||
|
||||
readDimension () {
|
||||
this.debug && console.group('readDimension')
|
||||
|
||||
const dimension = {
|
||||
value: null,
|
||||
unit: null,
|
||||
rawUnit: null
|
||||
}
|
||||
|
||||
const value = this.readU32()
|
||||
const unit = dimension.value & 0xff
|
||||
|
||||
dimension.value = value >> 8
|
||||
dimension.rawUnit = unit
|
||||
|
||||
switch (unit) {
|
||||
case TypedValue.COMPLEX_UNIT_MM:
|
||||
dimension.unit = 'mm'
|
||||
break
|
||||
case TypedValue.COMPLEX_UNIT_PX:
|
||||
dimension.unit = 'px'
|
||||
break
|
||||
case TypedValue.COMPLEX_UNIT_DIP:
|
||||
dimension.unit = 'dp'
|
||||
break
|
||||
case TypedValue.COMPLEX_UNIT_SP:
|
||||
dimension.unit = 'sp'
|
||||
break
|
||||
case TypedValue.COMPLEX_UNIT_PT:
|
||||
dimension.unit = 'pt'
|
||||
break
|
||||
case TypedValue.COMPLEX_UNIT_IN:
|
||||
dimension.unit = 'in'
|
||||
break
|
||||
}
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return dimension
|
||||
}
|
||||
|
||||
readFraction () {
|
||||
this.debug && console.group('readFraction')
|
||||
|
||||
const fraction = {
|
||||
value: null,
|
||||
type: null,
|
||||
rawType: null
|
||||
}
|
||||
|
||||
const value = this.readU32()
|
||||
const type = value & 0xf
|
||||
|
||||
fraction.value = this.convertIntToFloat(value >> 4)
|
||||
fraction.rawType = type
|
||||
|
||||
switch (type) {
|
||||
case TypedValue.COMPLEX_UNIT_FRACTION:
|
||||
fraction.type = '%'
|
||||
break
|
||||
case TypedValue.COMPLEX_UNIT_FRACTION_PARENT:
|
||||
fraction.type = '%p'
|
||||
break
|
||||
}
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return fraction
|
||||
}
|
||||
|
||||
readHex24 () {
|
||||
this.debug && console.group('readHex24')
|
||||
var val = (this.readU32() & 0xffffff).toString(16)
|
||||
this.debug && console.groupEnd()
|
||||
return val
|
||||
}
|
||||
|
||||
readHex32 () {
|
||||
this.debug && console.group('readHex32')
|
||||
var val = this.readU32().toString(16)
|
||||
this.debug && console.groupEnd()
|
||||
return val
|
||||
}
|
||||
|
||||
readTypedValue () {
|
||||
this.debug && console.group('readTypedValue')
|
||||
|
||||
const typedValue = {
|
||||
value: null,
|
||||
type: null,
|
||||
rawType: null
|
||||
}
|
||||
|
||||
const start = this.cursor
|
||||
|
||||
let size = this.readU16()
|
||||
/* const zero = */ this.readU8()
|
||||
const dataType = this.readU8()
|
||||
|
||||
// Yes, there has been a real world APK where the size is malformed.
|
||||
if (size === 0) {
|
||||
size = 8
|
||||
}
|
||||
|
||||
typedValue.rawType = dataType
|
||||
|
||||
switch (dataType) {
|
||||
case TypedValue.TYPE_INT_DEC:
|
||||
typedValue.value = this.readS32()
|
||||
typedValue.type = 'int_dec'
|
||||
break
|
||||
case TypedValue.TYPE_INT_HEX:
|
||||
typedValue.value = this.readS32()
|
||||
typedValue.type = 'int_hex'
|
||||
break
|
||||
case TypedValue.TYPE_STRING:
|
||||
var ref = this.readS32()
|
||||
typedValue.value = ref > 0 ? this.strings[ref] : ''
|
||||
typedValue.type = 'string'
|
||||
break
|
||||
case TypedValue.TYPE_REFERENCE:
|
||||
var id = this.readU32()
|
||||
typedValue.value = `resourceId:0x${id.toString(16)}`
|
||||
typedValue.type = 'reference'
|
||||
break
|
||||
case TypedValue.TYPE_INT_BOOLEAN:
|
||||
typedValue.value = this.readS32() !== 0
|
||||
typedValue.type = 'boolean'
|
||||
break
|
||||
case TypedValue.TYPE_NULL:
|
||||
this.readU32()
|
||||
typedValue.value = null
|
||||
typedValue.type = 'null'
|
||||
break
|
||||
case TypedValue.TYPE_INT_COLOR_RGB8:
|
||||
typedValue.value = this.readHex24()
|
||||
typedValue.type = 'rgb8'
|
||||
break
|
||||
case TypedValue.TYPE_INT_COLOR_RGB4:
|
||||
typedValue.value = this.readHex24()
|
||||
typedValue.type = 'rgb4'
|
||||
break
|
||||
case TypedValue.TYPE_INT_COLOR_ARGB8:
|
||||
typedValue.value = this.readHex32()
|
||||
typedValue.type = 'argb8'
|
||||
break
|
||||
case TypedValue.TYPE_INT_COLOR_ARGB4:
|
||||
typedValue.value = this.readHex32()
|
||||
typedValue.type = 'argb4'
|
||||
break
|
||||
case TypedValue.TYPE_DIMENSION:
|
||||
typedValue.value = this.readDimension()
|
||||
typedValue.type = 'dimension'
|
||||
break
|
||||
case TypedValue.TYPE_FRACTION:
|
||||
typedValue.value = this.readFraction()
|
||||
typedValue.type = 'fraction'
|
||||
break
|
||||
default: {
|
||||
const type = dataType.toString(16)
|
||||
console.debug(`Not sure what to do with typed value of type 0x${type}, falling back to reading an uint32.`)
|
||||
typedValue.value = this.readU32()
|
||||
typedValue.type = 'unknown'
|
||||
}
|
||||
}
|
||||
|
||||
// Ensure we consume the whole value
|
||||
const end = start + size
|
||||
if (this.cursor !== end) {
|
||||
const type = dataType.toString(16)
|
||||
const diff = end - this.cursor
|
||||
console.debug(`Cursor is off by ${diff} bytes at ${this.cursor} at supposed end \
|
||||
of typed value of type 0x${type}. The typed value started at offset ${start} \
|
||||
and is supposed to end at offset ${end}. Ignoring the rest of the value.`)
|
||||
this.cursor = end
|
||||
}
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return typedValue
|
||||
}
|
||||
|
||||
// https://twitter.com/kawasima/status/427730289201139712
|
||||
convertIntToFloat (int) {
|
||||
const buf = new ArrayBuffer(4)
|
||||
;(new Int32Array(buf))[0] = int
|
||||
return (new Float32Array(buf))[0]
|
||||
}
|
||||
|
||||
readString (encoding) {
|
||||
this.debug && console.group('readString', encoding)
|
||||
switch (encoding) {
|
||||
case 'utf-8':
|
||||
var stringLength = this.readLength8(encoding)
|
||||
this.debug && console.debug('stringLength:', stringLength)
|
||||
var byteLength = this.readLength8(encoding)
|
||||
this.debug && console.debug('byteLength:', byteLength)
|
||||
var value = this.buffer.toString(encoding, this.cursor, (this.cursor += byteLength))
|
||||
this.debug && console.debug('value:', value)
|
||||
this.debug && console.groupEnd()
|
||||
return value
|
||||
case 'ucs2':
|
||||
stringLength = this.readLength16(encoding)
|
||||
this.debug && console.debug('stringLength:', stringLength)
|
||||
byteLength = stringLength * 2
|
||||
this.debug && console.debug('byteLength:', byteLength)
|
||||
value = this.buffer.toString(encoding, this.cursor, (this.cursor += byteLength))
|
||||
this.debug && console.debug('value:', value)
|
||||
this.debug && console.groupEnd()
|
||||
return value
|
||||
default:
|
||||
throw new Error(`Unsupported encoding '${encoding}'`)
|
||||
}
|
||||
}
|
||||
|
||||
readChunkHeader () {
|
||||
this.debug && console.group('readChunkHeader')
|
||||
var header = {
|
||||
startOffset: this.cursor,
|
||||
chunkType: this.readU16(),
|
||||
headerSize: this.readU16(),
|
||||
chunkSize: this.readU32()
|
||||
}
|
||||
this.debug && console.debug('startOffset:', header.startOffset)
|
||||
this.debug && console.debug('chunkType:', header.chunkType)
|
||||
this.debug && console.debug('headerSize:', header.headerSize)
|
||||
this.debug && console.debug('chunkSize:', header.chunkSize)
|
||||
this.debug && console.groupEnd()
|
||||
return header
|
||||
}
|
||||
|
||||
readStringPool (header) {
|
||||
this.debug && console.group('readStringPool')
|
||||
|
||||
header.stringCount = this.readU32()
|
||||
this.debug && console.debug('stringCount:', header.stringCount)
|
||||
header.styleCount = this.readU32()
|
||||
this.debug && console.debug('styleCount:', header.styleCount)
|
||||
header.flags = this.readU32()
|
||||
this.debug && console.debug('flags:', header.flags)
|
||||
header.stringsStart = this.readU32()
|
||||
this.debug && console.debug('stringsStart:', header.stringsStart)
|
||||
header.stylesStart = this.readU32()
|
||||
this.debug && console.debug('stylesStart:', header.stylesStart)
|
||||
|
||||
if (header.chunkType !== ChunkType.STRING_POOL) {
|
||||
throw new Error('Invalid string pool header')
|
||||
}
|
||||
|
||||
const offsets = []
|
||||
for (let i = 0, l = header.stringCount; i < l; ++i) {
|
||||
this.debug && console.debug('offset:', i)
|
||||
offsets.push(this.readU32())
|
||||
}
|
||||
|
||||
const sorted = (header.flags & StringFlags.SORTED) === StringFlags.SORTED
|
||||
this.debug && console.debug('sorted:', sorted)
|
||||
const encoding = (header.flags & StringFlags.UTF8) === StringFlags.UTF8
|
||||
? 'utf-8'
|
||||
: 'ucs2'
|
||||
this.debug && console.debug('encoding:', encoding)
|
||||
|
||||
const stringsStart = header.startOffset + header.stringsStart
|
||||
this.cursor = stringsStart
|
||||
for (let i = 0, l = header.stringCount; i < l; ++i) {
|
||||
this.debug && console.debug('string:', i)
|
||||
this.debug && console.debug('offset:', offsets[i])
|
||||
this.cursor = stringsStart + offsets[i]
|
||||
this.strings.push(this.readString(encoding))
|
||||
}
|
||||
|
||||
// Skip styles
|
||||
this.cursor = header.startOffset + header.chunkSize
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
readResourceMap (header) {
|
||||
this.debug && console.group('readResourceMap')
|
||||
const count = Math.floor((header.chunkSize - header.headerSize) / 4)
|
||||
for (let i = 0; i < count; ++i) {
|
||||
this.resources.push(this.readU32())
|
||||
}
|
||||
this.debug && console.groupEnd()
|
||||
return null
|
||||
}
|
||||
|
||||
readXmlNamespaceStart (/* header */) {
|
||||
this.debug && console.group('readXmlNamespaceStart')
|
||||
|
||||
/* const line = */ this.readU32()
|
||||
/* const commentRef = */ this.readU32()
|
||||
/* const prefixRef = */ this.readS32()
|
||||
/* const uriRef = */ this.readS32()
|
||||
|
||||
// We don't currently care about the values, but they could
|
||||
// be accessed like so:
|
||||
//
|
||||
// namespaceURI.prefix = this.strings[prefixRef] // if prefixRef > 0
|
||||
// namespaceURI.uri = this.strings[uriRef] // if uriRef > 0
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
readXmlNamespaceEnd (/* header */) {
|
||||
this.debug && console.group('readXmlNamespaceEnd')
|
||||
|
||||
/* const line = */ this.readU32()
|
||||
/* const commentRef = */ this.readU32()
|
||||
/* const prefixRef = */ this.readS32()
|
||||
/* const uriRef = */ this.readS32()
|
||||
|
||||
// We don't currently care about the values, but they could
|
||||
// be accessed like so:
|
||||
//
|
||||
// namespaceURI.prefix = this.strings[prefixRef] // if prefixRef > 0
|
||||
// namespaceURI.uri = this.strings[uriRef] // if uriRef > 0
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
readXmlElementStart (/* header */) {
|
||||
this.debug && console.group('readXmlElementStart')
|
||||
|
||||
const node = {
|
||||
namespaceURI: null,
|
||||
nodeType: NodeType.ELEMENT_NODE,
|
||||
nodeName: null,
|
||||
attributes: [],
|
||||
childNodes: []
|
||||
}
|
||||
|
||||
/* const line = */ this.readU32()
|
||||
/* const commentRef = */ this.readU32()
|
||||
const nsRef = this.readS32()
|
||||
const nameRef = this.readS32()
|
||||
|
||||
if (nsRef > 0) {
|
||||
node.namespaceURI = this.strings[nsRef]
|
||||
}
|
||||
|
||||
node.nodeName = this.strings[nameRef]
|
||||
|
||||
/* const attrStart = */ this.readU16()
|
||||
/* const attrSize = */ this.readU16()
|
||||
const attrCount = this.readU16()
|
||||
/* const idIndex = */ this.readU16()
|
||||
/* const classIndex = */ this.readU16()
|
||||
/* const styleIndex = */ this.readU16()
|
||||
|
||||
for (let i = 0; i < attrCount; ++i) {
|
||||
node.attributes.push(this.readXmlAttribute())
|
||||
}
|
||||
|
||||
if (this.document) {
|
||||
this.parent.childNodes.push(node)
|
||||
this.parent = node
|
||||
} else {
|
||||
this.document = (this.parent = node)
|
||||
}
|
||||
|
||||
this.stack.push(node)
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return node
|
||||
}
|
||||
|
||||
readXmlAttribute () {
|
||||
this.debug && console.group('readXmlAttribute')
|
||||
|
||||
const attr = {
|
||||
namespaceURI: null,
|
||||
nodeType: NodeType.ATTRIBUTE_NODE,
|
||||
nodeName: null,
|
||||
name: null,
|
||||
value: null,
|
||||
typedValue: null
|
||||
}
|
||||
|
||||
const nsRef = this.readS32()
|
||||
const nameRef = this.readS32()
|
||||
const valueRef = this.readS32()
|
||||
|
||||
if (nsRef > 0) {
|
||||
attr.namespaceURI = this.strings[nsRef]
|
||||
}
|
||||
|
||||
attr.nodeName = attr.name = this.strings[nameRef]
|
||||
|
||||
if (valueRef > 0) {
|
||||
// some apk have versionName with special characters
|
||||
if (attr.name === 'versionName') {
|
||||
// only keep printable characters
|
||||
// https://www.ascii-code.com/characters/printable-characters
|
||||
this.strings[valueRef] = this.strings[valueRef].replace(/[^\x21-\x7E]/g, '')
|
||||
}
|
||||
attr.value = this.strings[valueRef]
|
||||
}
|
||||
|
||||
attr.typedValue = this.readTypedValue()
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return attr
|
||||
}
|
||||
|
||||
readXmlElementEnd (/* header */) {
|
||||
this.debug && console.group('readXmlCData')
|
||||
|
||||
/* const line = */ this.readU32()
|
||||
/* const commentRef = */ this.readU32()
|
||||
/* const nsRef = */ this.readS32()
|
||||
/* const nameRef = */ this.readS32()
|
||||
|
||||
this.stack.pop()
|
||||
this.parent = this.stack[this.stack.length - 1]
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
readXmlCData (/* header */) {
|
||||
this.debug && console.group('readXmlCData')
|
||||
|
||||
const cdata = {
|
||||
namespaceURI: null,
|
||||
nodeType: NodeType.CDATA_SECTION_NODE,
|
||||
nodeName: '#cdata',
|
||||
data: null,
|
||||
typedValue: null
|
||||
}
|
||||
|
||||
/* const line = */ this.readU32()
|
||||
/* const commentRef = */ this.readU32()
|
||||
const dataRef = this.readS32()
|
||||
|
||||
if (dataRef > 0) {
|
||||
cdata.data = this.strings[dataRef]
|
||||
}
|
||||
|
||||
cdata.typedValue = this.readTypedValue()
|
||||
|
||||
this.parent.childNodes.push(cdata)
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return cdata
|
||||
}
|
||||
|
||||
readNull (header) {
|
||||
this.debug && console.group('readNull')
|
||||
this.cursor += header.chunkSize - header.headerSize
|
||||
this.debug && console.groupEnd()
|
||||
return null
|
||||
}
|
||||
|
||||
parse () {
|
||||
this.debug && console.group('BinaryXmlParser.parse')
|
||||
|
||||
const xmlHeader = this.readChunkHeader()
|
||||
if (xmlHeader.chunkType !== ChunkType.XML) {
|
||||
throw new Error('Invalid XML header')
|
||||
}
|
||||
|
||||
while (this.cursor < this.buffer.length) {
|
||||
this.debug && console.group('chunk')
|
||||
const start = this.cursor
|
||||
const header = this.readChunkHeader()
|
||||
switch (header.chunkType) {
|
||||
case ChunkType.STRING_POOL:
|
||||
this.readStringPool(header)
|
||||
break
|
||||
case ChunkType.XML_RESOURCE_MAP:
|
||||
this.readResourceMap(header)
|
||||
break
|
||||
case ChunkType.XML_START_NAMESPACE:
|
||||
this.readXmlNamespaceStart(header)
|
||||
break
|
||||
case ChunkType.XML_END_NAMESPACE:
|
||||
this.readXmlNamespaceEnd(header)
|
||||
break
|
||||
case ChunkType.XML_START_ELEMENT:
|
||||
this.readXmlElementStart(header)
|
||||
break
|
||||
case ChunkType.XML_END_ELEMENT:
|
||||
this.readXmlElementEnd(header)
|
||||
break
|
||||
case ChunkType.XML_CDATA:
|
||||
this.readXmlCData(header)
|
||||
break
|
||||
case ChunkType.NULL:
|
||||
this.readNull(header)
|
||||
break
|
||||
default:
|
||||
throw new Error(`Unsupported chunk type '${header.chunkType}'`)
|
||||
}
|
||||
|
||||
// Ensure we consume the whole chunk
|
||||
const end = start + header.chunkSize
|
||||
if (this.cursor !== end) {
|
||||
const diff = end - this.cursor
|
||||
const type = header.chunkType.toString(16)
|
||||
console.debug(`Cursor is off by ${diff} bytes at ${this.cursor} at supposed \
|
||||
end of chunk of type 0x${type}. The chunk started at offset ${start} and is \
|
||||
supposed to end at offset ${end}. Ignoring the rest of the chunk.`)
|
||||
this.cursor = end
|
||||
}
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
}
|
||||
|
||||
this.debug && console.groupEnd()
|
||||
|
||||
return this.document
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = BinaryXmlParser
|
216
src/utils/app-info-parser/xml-parser/manifest.js
Normal file
216
src/utils/app-info-parser/xml-parser/manifest.js
Normal file
@@ -0,0 +1,216 @@
|
||||
// From https://github.com/openstf/adbkit-apkreader
|
||||
const BinaryXmlParser = require('./binary')
|
||||
|
||||
const INTENT_MAIN = 'android.intent.action.MAIN'
|
||||
const CATEGORY_LAUNCHER = 'android.intent.category.LAUNCHER'
|
||||
|
||||
class ManifestParser {
|
||||
constructor (buffer, options = {}) {
|
||||
this.buffer = buffer
|
||||
this.xmlParser = new BinaryXmlParser(this.buffer, options)
|
||||
}
|
||||
|
||||
collapseAttributes (element) {
|
||||
const collapsed = Object.create(null)
|
||||
for (let attr of Array.from(element.attributes)) {
|
||||
collapsed[attr.name] = attr.typedValue.value
|
||||
}
|
||||
return collapsed
|
||||
}
|
||||
|
||||
parseIntents (element, target) {
|
||||
target.intentFilters = []
|
||||
target.metaData = []
|
||||
|
||||
return element.childNodes.forEach(element => {
|
||||
switch (element.nodeName) {
|
||||
case 'intent-filter': {
|
||||
const intentFilter = this.collapseAttributes(element)
|
||||
|
||||
intentFilter.actions = []
|
||||
intentFilter.categories = []
|
||||
intentFilter.data = []
|
||||
|
||||
element.childNodes.forEach(element => {
|
||||
switch (element.nodeName) {
|
||||
case 'action':
|
||||
intentFilter.actions.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'category':
|
||||
intentFilter.categories.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'data':
|
||||
intentFilter.data.push(this.collapseAttributes(element))
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
target.intentFilters.push(intentFilter)
|
||||
break
|
||||
}
|
||||
case 'meta-data':
|
||||
target.metaData.push(this.collapseAttributes(element))
|
||||
break
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
parseApplication (element) {
|
||||
const app = this.collapseAttributes(element)
|
||||
|
||||
app.activities = []
|
||||
app.activityAliases = []
|
||||
app.launcherActivities = []
|
||||
app.services = []
|
||||
app.receivers = []
|
||||
app.providers = []
|
||||
app.usesLibraries = []
|
||||
app.metaData = []
|
||||
|
||||
element.childNodes.forEach(element => {
|
||||
switch (element.nodeName) {
|
||||
case 'activity': {
|
||||
const activity = this.collapseAttributes(element)
|
||||
this.parseIntents(element, activity)
|
||||
app.activities.push(activity)
|
||||
if (this.isLauncherActivity(activity)) {
|
||||
app.launcherActivities.push(activity)
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'activity-alias': {
|
||||
const activityAlias = this.collapseAttributes(element)
|
||||
this.parseIntents(element, activityAlias)
|
||||
app.activityAliases.push(activityAlias)
|
||||
if (this.isLauncherActivity(activityAlias)) {
|
||||
app.launcherActivities.push(activityAlias)
|
||||
}
|
||||
break
|
||||
}
|
||||
case 'service': {
|
||||
const service = this.collapseAttributes(element)
|
||||
this.parseIntents(element, service)
|
||||
app.services.push(service)
|
||||
break
|
||||
}
|
||||
case 'receiver': {
|
||||
const receiver = this.collapseAttributes(element)
|
||||
this.parseIntents(element, receiver)
|
||||
app.receivers.push(receiver)
|
||||
break
|
||||
}
|
||||
case 'provider': {
|
||||
const provider = this.collapseAttributes(element)
|
||||
|
||||
provider.grantUriPermissions = []
|
||||
provider.metaData = []
|
||||
provider.pathPermissions = []
|
||||
|
||||
element.childNodes.forEach(element => {
|
||||
switch (element.nodeName) {
|
||||
case 'grant-uri-permission':
|
||||
provider.grantUriPermissions.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'meta-data':
|
||||
provider.metaData.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'path-permission':
|
||||
provider.pathPermissions.push(this.collapseAttributes(element))
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
app.providers.push(provider)
|
||||
break
|
||||
}
|
||||
case 'uses-library':
|
||||
app.usesLibraries.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'meta-data':
|
||||
app.metaData.push(this.collapseAttributes(element))
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
return app
|
||||
}
|
||||
|
||||
isLauncherActivity (activity) {
|
||||
return activity.intentFilters.some(function (filter) {
|
||||
const hasMain = filter.actions.some(action => action.name === INTENT_MAIN)
|
||||
if (!hasMain) {
|
||||
return false
|
||||
}
|
||||
return filter.categories.some(category => category.name === CATEGORY_LAUNCHER)
|
||||
})
|
||||
}
|
||||
|
||||
parse () {
|
||||
const document = this.xmlParser.parse()
|
||||
const manifest = this.collapseAttributes(document)
|
||||
|
||||
manifest.usesPermissions = []
|
||||
manifest.usesPermissionsSDK23 = []
|
||||
manifest.permissions = []
|
||||
manifest.permissionTrees = []
|
||||
manifest.permissionGroups = []
|
||||
manifest.instrumentation = null
|
||||
manifest.usesSdk = null
|
||||
manifest.usesConfiguration = null
|
||||
manifest.usesFeatures = []
|
||||
manifest.supportsScreens = null
|
||||
manifest.compatibleScreens = []
|
||||
manifest.supportsGlTextures = []
|
||||
manifest.application = Object.create(null)
|
||||
|
||||
document.childNodes.forEach(element => {
|
||||
switch (element.nodeName) {
|
||||
case 'uses-permission':
|
||||
manifest.usesPermissions.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'uses-permission-sdk-23':
|
||||
manifest.usesPermissionsSDK23.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'permission':
|
||||
manifest.permissions.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'permission-tree':
|
||||
manifest.permissionTrees.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'permission-group':
|
||||
manifest.permissionGroups.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'instrumentation':
|
||||
manifest.instrumentation = this.collapseAttributes(element)
|
||||
break
|
||||
case 'uses-sdk':
|
||||
manifest.usesSdk = this.collapseAttributes(element)
|
||||
break
|
||||
case 'uses-configuration':
|
||||
manifest.usesConfiguration = this.collapseAttributes(element)
|
||||
break
|
||||
case 'uses-feature':
|
||||
manifest.usesFeatures.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'supports-screens':
|
||||
manifest.supportsScreens = this.collapseAttributes(element)
|
||||
break
|
||||
case 'compatible-screens':
|
||||
element.childNodes.forEach(screen => {
|
||||
return manifest.compatibleScreens.push(this.collapseAttributes(screen))
|
||||
})
|
||||
break
|
||||
case 'supports-gl-texture':
|
||||
manifest.supportsGlTextures.push(this.collapseAttributes(element))
|
||||
break
|
||||
case 'application':
|
||||
manifest.application = this.parseApplication(element)
|
||||
break
|
||||
}
|
||||
})
|
||||
|
||||
return manifest
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ManifestParser
|
66
src/utils/app-info-parser/zip.js
Normal file
66
src/utils/app-info-parser/zip.js
Normal file
@@ -0,0 +1,66 @@
|
||||
const Unzip = require('isomorphic-unzip');
|
||||
const { isBrowser, decodeNullUnicode } = require('./utils');
|
||||
import { enumZipEntries, readEntry } from '../../bundle';
|
||||
|
||||
class Zip {
|
||||
constructor(file) {
|
||||
if (isBrowser()) {
|
||||
if (!(file instanceof window.Blob || typeof file.size !== 'undefined')) {
|
||||
throw new Error(
|
||||
'Param error: [file] must be an instance of Blob or File in browser.',
|
||||
);
|
||||
}
|
||||
this.file = file;
|
||||
} else {
|
||||
if (typeof file !== 'string') {
|
||||
throw new Error('Param error: [file] must be file path in Node.');
|
||||
}
|
||||
this.file = require('path').resolve(file);
|
||||
}
|
||||
this.unzip = new Unzip(this.file);
|
||||
}
|
||||
|
||||
/**
|
||||
* get entries by regexps, the return format is: { <filename>: <Buffer|Blob> }
|
||||
* @param {Array} regexps // regexps for matching files
|
||||
* @param {String} type // return type, can be buffer or blob, default buffer
|
||||
*/
|
||||
getEntries(regexps, type = 'buffer') {
|
||||
regexps = regexps.map((regex) => decodeNullUnicode(regex));
|
||||
return new Promise((resolve, reject) => {
|
||||
this.unzip.getBuffer(regexps, { type }, (err, buffers) => {
|
||||
err ? reject(err) : resolve(buffers);
|
||||
});
|
||||
});
|
||||
}
|
||||
/**
|
||||
* get entry by regex, return an instance of Buffer or Blob
|
||||
* @param {Regex} regex // regex for matching file
|
||||
* @param {String} type // return type, can be buffer or blob, default buffer
|
||||
*/
|
||||
getEntry(regex, type = 'buffer') {
|
||||
regex = decodeNullUnicode(regex);
|
||||
return new Promise((resolve, reject) => {
|
||||
this.unzip.getBuffer([regex], { type }, (err, buffers) => {
|
||||
// console.log(buffers);
|
||||
err ? reject(err) : resolve(buffers[regex]);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
async getEntryFromHarmonyApp(regex) {
|
||||
try {
|
||||
let originSource;
|
||||
await enumZipEntries(this.file, (entry, zipFile) => {
|
||||
if (regex.test(entry.fileName)) {
|
||||
return readEntry(entry, zipFile).then((v) => (originSource = v));
|
||||
}
|
||||
});
|
||||
return originSource;
|
||||
} catch (error) {
|
||||
console.error('Error in getEntryFromHarmonyApp:', error);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Zip;
|
89
src/utils/check-lockfile.ts
Normal file
89
src/utils/check-lockfile.ts
Normal file
@@ -0,0 +1,89 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { t } from './i18n';
|
||||
|
||||
const lockFiles = [
|
||||
'package-lock.json',
|
||||
'yarn.lock',
|
||||
'pnpm-lock.yaml',
|
||||
'bun.lockb',
|
||||
'bun.lock',
|
||||
];
|
||||
|
||||
// Function to check if a package.json has a workspaces field
|
||||
function hasWorkspaces(dir: string): boolean {
|
||||
const pkgPath = path.join(dir, 'package.json');
|
||||
if (fs.existsSync(pkgPath)) {
|
||||
try {
|
||||
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf-8'));
|
||||
return !!pkg.workspaces;
|
||||
} catch (e) {
|
||||
// Ignore parsing errors
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// Helper function to find lock files in a specific directory
|
||||
function findLockFilesInDir(directory: string): string[] {
|
||||
const found: string[] = [];
|
||||
for (const file of lockFiles) {
|
||||
const filePath = path.join(directory, file);
|
||||
if (fs.existsSync(filePath)) {
|
||||
found.push(filePath);
|
||||
}
|
||||
}
|
||||
return found;
|
||||
}
|
||||
|
||||
export function checkLockFiles() {
|
||||
const cwd = process.cwd();
|
||||
let searchDir = cwd;
|
||||
let foundLockFiles = findLockFilesInDir(searchDir);
|
||||
|
||||
// If no lock file in cwd, try to find monorepo root and check there
|
||||
if (foundLockFiles.length === 0) {
|
||||
// Search upwards for package.json with workspaces
|
||||
let currentDir = path.dirname(cwd); // Start searching from parent
|
||||
let projectRootDir: string | null = null;
|
||||
|
||||
while (true) {
|
||||
if (hasWorkspaces(currentDir)) {
|
||||
projectRootDir = currentDir;
|
||||
break;
|
||||
}
|
||||
const parentDir = path.dirname(currentDir);
|
||||
if (parentDir === currentDir) {
|
||||
// Reached the filesystem root
|
||||
break;
|
||||
}
|
||||
currentDir = parentDir;
|
||||
}
|
||||
|
||||
// If a potential root was found, switch search directory and re-check
|
||||
if (projectRootDir) {
|
||||
searchDir = projectRootDir;
|
||||
foundLockFiles = findLockFilesInDir(searchDir);
|
||||
}
|
||||
// If no projectRootDir found, foundLockFiles remains empty and searchDir remains cwd
|
||||
}
|
||||
|
||||
// Handle results based on findings in the final searchDir
|
||||
if (foundLockFiles.length === 1) {
|
||||
// Successfully found one lock file in the determined searchDir
|
||||
return;
|
||||
}
|
||||
|
||||
if (foundLockFiles.length > 1) {
|
||||
// Found multiple lock files in the determined searchDir
|
||||
console.warn(t('lockBestPractice'));
|
||||
throw new Error(
|
||||
t('multipleLocksFound', { lockFiles: foundLockFiles.join(', ') }),
|
||||
);
|
||||
}
|
||||
|
||||
// If we reach here, foundLockFiles.length === 0
|
||||
console.warn(t('lockBestPractice'));
|
||||
// Warn instead of throwing an error if no lock file is found
|
||||
console.warn(t('lockNotFound'));
|
||||
}
|
29
src/utils/check-plugin.ts
Normal file
29
src/utils/check-plugin.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { plugins } from './plugin-config';
|
||||
import { t } from './i18n';
|
||||
|
||||
interface BundleParams {
|
||||
sentry: boolean;
|
||||
sourcemap: boolean;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export async function checkPlugins(): Promise<BundleParams> {
|
||||
const params: BundleParams = {
|
||||
sentry: false,
|
||||
sourcemap: false,
|
||||
};
|
||||
|
||||
for (const plugin of plugins) {
|
||||
try {
|
||||
const isEnabled = await plugin.detect();
|
||||
if (isEnabled && plugin.bundleParams) {
|
||||
Object.assign(params, plugin.bundleParams);
|
||||
console.log(t('pluginDetected', { name: plugin.name }));
|
||||
}
|
||||
} catch (err) {
|
||||
console.warn(t('pluginDetectionError', { name: plugin.name, error: err }));
|
||||
}
|
||||
}
|
||||
|
||||
return params;
|
||||
}
|
15
src/utils/constants.ts
Normal file
15
src/utils/constants.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import path from 'path';
|
||||
|
||||
const scriptName = path.basename(process.argv[1]) as 'cresc' | 'pushy';
|
||||
export const IS_CRESC = scriptName === 'cresc';
|
||||
|
||||
export const credentialFile = IS_CRESC ? '.cresc.token' : '.update';
|
||||
export const updateJson = IS_CRESC ? 'cresc.config.json' : 'update.json';
|
||||
export const tempDir = IS_CRESC ? '.cresc.temp' : '.pushy';
|
||||
export const pricingPageUrl = IS_CRESC
|
||||
? 'https://cresc.dev/pricing'
|
||||
: 'https://pushy.reactnative.cn/pricing.html';
|
||||
|
||||
export const defaultEndpoint = IS_CRESC
|
||||
? 'https://api.cresc.dev'
|
||||
: 'https://update.reactnative.cn/api';
|
28
src/utils/dep-versions.ts
Normal file
28
src/utils/dep-versions.ts
Normal file
@@ -0,0 +1,28 @@
|
||||
const currentPackage = require(`${process.cwd()}/package.json`);
|
||||
|
||||
const _depVersions: Record<string, string> = {};
|
||||
|
||||
if (currentPackage) {
|
||||
const depKeys = currentPackage.dependencies ? Object.keys(currentPackage.dependencies) : [];
|
||||
const devDepKeys = currentPackage.devDependencies ? Object.keys(currentPackage.devDependencies) : [];
|
||||
const dedupedDeps = [...new Set([...depKeys, ...devDepKeys])];
|
||||
|
||||
for (const dep of dedupedDeps) {
|
||||
try {
|
||||
const packageJsonPath = require.resolve(`${dep}/package.json`, {
|
||||
paths: [process.cwd()],
|
||||
});
|
||||
const version = require(packageJsonPath).version;
|
||||
_depVersions[dep] = version;
|
||||
} catch (e) {}
|
||||
}
|
||||
}
|
||||
|
||||
export const depVersions = Object.keys(_depVersions)
|
||||
.sort() // Sort the keys alphabetically
|
||||
.reduce((obj, key) => {
|
||||
obj[key] = _depVersions[key]; // Rebuild the object with sorted keys
|
||||
return obj;
|
||||
}, {} as Record<string, string>);
|
||||
|
||||
// console.log({ depVersions });
|
50
src/utils/git.ts
Normal file
50
src/utils/git.ts
Normal file
@@ -0,0 +1,50 @@
|
||||
import git from 'isomorphic-git';
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
|
||||
export interface CommitInfo {
|
||||
hash: string;
|
||||
message: string;
|
||||
author: string;
|
||||
timestamp: string;
|
||||
origin: string;
|
||||
}
|
||||
|
||||
function findGitRoot(dir = process.cwd()) {
|
||||
const gitRoot = fs.readdirSync(dir).find((dir) => dir === '.git');
|
||||
if (gitRoot) {
|
||||
// console.log({ gitRoot });
|
||||
return path.join(dir, gitRoot);
|
||||
}
|
||||
const parentDir = path.dirname(dir);
|
||||
if (parentDir === dir) {
|
||||
return null;
|
||||
}
|
||||
return findGitRoot(parentDir);
|
||||
}
|
||||
|
||||
const gitRoot = findGitRoot();
|
||||
|
||||
export async function getCommitInfo(): Promise<CommitInfo | undefined> {
|
||||
if (!gitRoot) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const remotes = await git.listRemotes({ fs, gitdir: gitRoot });
|
||||
const origin =
|
||||
remotes.find((remote) => remote.remote === 'origin') || remotes[0];
|
||||
const { commit, oid } = (
|
||||
await git.log({ fs, gitdir: gitRoot, depth: 1 })
|
||||
)[0];
|
||||
return {
|
||||
hash: oid,
|
||||
message: commit.message,
|
||||
author: commit.author.name || commit.committer.name,
|
||||
timestamp: String(commit.committer.timestamp),
|
||||
origin: origin?.url,
|
||||
};
|
||||
} catch (error) {
|
||||
console.error(error);
|
||||
return;
|
||||
}
|
||||
}
|
37
src/utils/i18n.ts
Normal file
37
src/utils/i18n.ts
Normal file
@@ -0,0 +1,37 @@
|
||||
import i18next from 'i18next';
|
||||
import en from '../locales/en';
|
||||
import zh from '../locales/zh';
|
||||
import { IS_CRESC } from './constants';
|
||||
|
||||
i18next.init({
|
||||
lng: IS_CRESC ? 'en' : 'zh',
|
||||
// debug: process.env.NODE_ENV !== 'production',
|
||||
// debug: true,
|
||||
resources: {
|
||||
en: {
|
||||
translation: en,
|
||||
},
|
||||
zh: {
|
||||
translation: zh,
|
||||
},
|
||||
},
|
||||
interpolation: {
|
||||
escapeValue: false,
|
||||
},
|
||||
});
|
||||
|
||||
declare module 'i18next' {
|
||||
// Extend CustomTypeOptions
|
||||
interface CustomTypeOptions {
|
||||
// custom namespace type, if you changed it
|
||||
defaultNS: 'en';
|
||||
// custom resources type
|
||||
resources: {
|
||||
en: typeof en;
|
||||
zh: typeof zh;
|
||||
};
|
||||
// other
|
||||
}
|
||||
}
|
||||
|
||||
export const t = i18next.t;
|
@@ -1,154 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 2/13/16.
|
||||
*/
|
||||
|
||||
import fs from 'fs-extra';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
const pkg = require('../../package.json');
|
||||
const AppInfoParser = require('app-info-parser');
|
||||
|
||||
var read = require('read');
|
||||
|
||||
export function question(query, password) {
|
||||
if (NO_INTERACTIVE) {
|
||||
return Promise.resolve('');
|
||||
}
|
||||
return new Promise((resolve, reject) =>
|
||||
read(
|
||||
{
|
||||
prompt: query,
|
||||
silent: password,
|
||||
replace: password ? '*' : undefined,
|
||||
},
|
||||
(err, result) => (err ? reject(err) : resolve(result)),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
export function translateOptions(options) {
|
||||
const ret = {};
|
||||
for (let key in options) {
|
||||
const v = options[key];
|
||||
if (typeof v === 'string') {
|
||||
ret[key] = v.replace(/\$\{(\w+)\}/g, function (v, n) {
|
||||
return options[n] || process.env[n] || v;
|
||||
});
|
||||
} else {
|
||||
ret[key] = v;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
export function getRNVersion() {
|
||||
const version = JSON.parse(
|
||||
fs.readFileSync(path.resolve('node_modules/react-native/package.json')),
|
||||
).version;
|
||||
|
||||
// We only care about major and minor version.
|
||||
const match = /^(\d+)\.(\d+)\./.exec(version);
|
||||
return {
|
||||
version,
|
||||
major: match[1] | 0,
|
||||
minor: match[2] | 0,
|
||||
};
|
||||
}
|
||||
|
||||
export async function getApkInfo(fn) {
|
||||
const appInfoParser = new AppInfoParser(fn);
|
||||
const bundleFile = await appInfoParser.parser.getEntry(
|
||||
/assets\/index.android.bundle/,
|
||||
);
|
||||
if (!bundleFile) {
|
||||
throw new Error(
|
||||
'找不到bundle文件。请确保此apk为release版本,且bundle文件名为默认的index.android.bundle',
|
||||
);
|
||||
}
|
||||
const updateJsonFile = await appInfoParser.parser.getEntry(
|
||||
/res\/raw\/update.json/,
|
||||
);
|
||||
let appCredential = {};
|
||||
if (updateJsonFile) {
|
||||
appCredential = JSON.parse(updateJsonFile.toString()).android;
|
||||
}
|
||||
const { versionName, application } = await appInfoParser.parse();
|
||||
let buildTime = 0;
|
||||
if (Array.isArray(application.metaData)) {
|
||||
for (const meta of application.metaData) {
|
||||
if (meta.name === 'pushy_build_time') {
|
||||
buildTime = meta.value[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (buildTime == 0) {
|
||||
throw new Error(
|
||||
'无法获取此包的编译时间戳。请更新react-native-update到最新版本后重新打包上传。',
|
||||
);
|
||||
}
|
||||
return { versionName, buildTime, ...appCredential };
|
||||
}
|
||||
|
||||
export async function getIpaInfo(fn) {
|
||||
const appInfoParser = new AppInfoParser(fn);
|
||||
const bundleFile = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/main.jsbundle/,
|
||||
);
|
||||
if (!bundleFile) {
|
||||
throw new Error(
|
||||
'找不到bundle文件。请确保此ipa为release版本,且bundle文件名为默认的main.jsbundle',
|
||||
);
|
||||
}
|
||||
const updateJsonFile = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/assets\/update.json/,
|
||||
);
|
||||
let appCredential = {};
|
||||
if (updateJsonFile) {
|
||||
appCredential = JSON.parse(updateJsonFile.toString()).ios;
|
||||
}
|
||||
const {
|
||||
CFBundleShortVersionString: versionName,
|
||||
} = await appInfoParser.parse();
|
||||
let buildTimeTxtBuffer = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/pushy_build_time.txt/,
|
||||
);
|
||||
if (!buildTimeTxtBuffer) {
|
||||
// Not in root bundle when use `use_frameworks`
|
||||
buildTimeTxtBuffer = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/frameworks\/react_native_update.framework\/pushy_build_time.txt/,
|
||||
);
|
||||
}
|
||||
if (!buildTimeTxtBuffer) {
|
||||
throw new Error(
|
||||
'无法获取此包的编译时间戳。请更新react-native-update到最新版本后重新打包上传。',
|
||||
);
|
||||
}
|
||||
const buildTime = buildTimeTxtBuffer.toString().replace('\n', '');
|
||||
return { versionName, buildTime, ...appCredential };
|
||||
}
|
||||
|
||||
const localDir = path.resolve(os.homedir(), '.pushy');
|
||||
fs.ensureDirSync(localDir);
|
||||
export function saveToLocal(originPath, destName) {
|
||||
// TODO
|
||||
// const destPath = path.join(localDir, destName);
|
||||
// fs.ensureDirSync(path.dirname(destPath));
|
||||
// fs.copyFileSync(originPath, destPath);
|
||||
}
|
||||
|
||||
export function printVersionCommand() {
|
||||
console.log('react-native-update-cli: ' + pkg.version);
|
||||
try {
|
||||
const PACKAGE_JSON_PATH = path.resolve(
|
||||
process.cwd(),
|
||||
'node_modules',
|
||||
'react-native-update',
|
||||
'package.json',
|
||||
);
|
||||
console.log('react-native-update: ' + require(PACKAGE_JSON_PATH).version);
|
||||
} catch (e) {
|
||||
console.log('react-native-update: 无法获取版本号,请在项目目录中运行命令');
|
||||
}
|
||||
}
|
||||
|
||||
export const pricingPageUrl = 'https://pushy.reactnative.cn/pricing.html';
|
220
src/utils/index.ts
Normal file
220
src/utils/index.ts
Normal file
@@ -0,0 +1,220 @@
|
||||
import fs from 'fs-extra';
|
||||
import os from 'os';
|
||||
import path from 'path';
|
||||
import pkg from '../../package.json';
|
||||
import AppInfoParser from './app-info-parser';
|
||||
import semverSatisfies from 'semver/functions/satisfies';
|
||||
import chalk from 'chalk';
|
||||
import latestVersion from '../utils/latest-version';
|
||||
import { checkPlugins } from './check-plugin';
|
||||
|
||||
import { read } from 'read';
|
||||
import { IS_CRESC, tempDir } from './constants';
|
||||
import { depVersions } from './dep-versions';
|
||||
import { t } from './i18n';
|
||||
|
||||
export async function question(query: string, password?: boolean) {
|
||||
if (NO_INTERACTIVE) {
|
||||
return '';
|
||||
}
|
||||
return read({
|
||||
prompt: query,
|
||||
silent: password,
|
||||
replace: password ? '*' : undefined,
|
||||
});
|
||||
}
|
||||
|
||||
export function translateOptions(options: Record<string, string>) {
|
||||
const ret: Record<string, string> = {};
|
||||
for (const key in options) {
|
||||
const v = options[key];
|
||||
if (typeof v === 'string') {
|
||||
ret[key] = v.replace(
|
||||
/\$\{(\w+)\}/g,
|
||||
(v, n) => options[n] || process.env[n] || v,
|
||||
);
|
||||
} else {
|
||||
ret[key] = v;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
export async function getApkInfo(fn: string) {
|
||||
const appInfoParser = new AppInfoParser(fn);
|
||||
const bundleFile = await appInfoParser.parser.getEntry(
|
||||
/assets\/index.android.bundle/,
|
||||
);
|
||||
if (!bundleFile) {
|
||||
throw new Error(
|
||||
t('bundleNotFound', {
|
||||
packageType: 'apk',
|
||||
entryFile: 'index.android.bundle',
|
||||
}),
|
||||
);
|
||||
}
|
||||
const updateJsonFile = await appInfoParser.parser.getEntry(
|
||||
/res\/raw\/update.json/,
|
||||
);
|
||||
let appCredential = {};
|
||||
if (updateJsonFile) {
|
||||
appCredential = JSON.parse(updateJsonFile.toString()).android;
|
||||
}
|
||||
const { versionName, application } = await appInfoParser.parse();
|
||||
let buildTime = 0;
|
||||
if (Array.isArray(application.metaData)) {
|
||||
for (const meta of application.metaData) {
|
||||
if (meta.name === 'pushy_build_time') {
|
||||
buildTime = meta.value[0];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (buildTime == 0) {
|
||||
throw new Error(t('buildTimeNotFound'));
|
||||
}
|
||||
return { versionName, buildTime, ...appCredential };
|
||||
}
|
||||
|
||||
export async function getAppInfo(fn: string) {
|
||||
const appInfoParser = new AppInfoParser(fn);
|
||||
const bundleFile = await appInfoParser.parser.getEntryFromHarmonyApp(
|
||||
/rawfile\/bundle.harmony.js/,
|
||||
);
|
||||
if (!bundleFile) {
|
||||
throw new Error(
|
||||
t('bundleNotFound', {
|
||||
packageType: 'app',
|
||||
entryFile: 'bundle.harmony.js',
|
||||
}),
|
||||
);
|
||||
}
|
||||
const updateJsonFile = await appInfoParser.parser.getEntryFromHarmonyApp(
|
||||
/rawfile\/update.json/,
|
||||
);
|
||||
let appCredential = {};
|
||||
if (updateJsonFile) {
|
||||
appCredential = JSON.parse(updateJsonFile.toString()).harmony;
|
||||
}
|
||||
const metaJsonFile = await appInfoParser.parser.getEntryFromHarmonyApp(
|
||||
/rawfile\/meta.json/,
|
||||
);
|
||||
let metaData: Record<string, any> = {};
|
||||
if (metaJsonFile) {
|
||||
metaData = JSON.parse(metaJsonFile.toString());
|
||||
}
|
||||
const { versionName, pushy_build_time } = metaData;
|
||||
let buildTime = 0;
|
||||
if (pushy_build_time) {
|
||||
buildTime = pushy_build_time;
|
||||
}
|
||||
if (buildTime == 0) {
|
||||
throw new Error(t('buildTimeNotFound'));
|
||||
}
|
||||
return { versionName, buildTime, ...appCredential };
|
||||
}
|
||||
|
||||
export async function getIpaInfo(fn: string) {
|
||||
const appInfoParser = new AppInfoParser(fn);
|
||||
const bundleFile = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/main.jsbundle/,
|
||||
);
|
||||
if (!bundleFile) {
|
||||
throw new Error(
|
||||
t('bundleNotFound', {
|
||||
packageType: 'ipa',
|
||||
entryFile: 'main.jsbundle',
|
||||
}),
|
||||
);
|
||||
}
|
||||
const updateJsonFile = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/assets\/update.json/,
|
||||
);
|
||||
let appCredential = {};
|
||||
if (updateJsonFile) {
|
||||
appCredential = JSON.parse(updateJsonFile.toString()).ios;
|
||||
}
|
||||
const { CFBundleShortVersionString: versionName } =
|
||||
await appInfoParser.parse();
|
||||
let buildTimeTxtBuffer = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/pushy_build_time.txt/,
|
||||
);
|
||||
if (!buildTimeTxtBuffer) {
|
||||
// Not in root bundle when use `use_frameworks`
|
||||
buildTimeTxtBuffer = await appInfoParser.parser.getEntry(
|
||||
/payload\/.+?\.app\/frameworks\/react_native_update.framework\/pushy_build_time.txt/,
|
||||
);
|
||||
}
|
||||
if (!buildTimeTxtBuffer) {
|
||||
throw new Error(t('buildTimeNotFound'));
|
||||
}
|
||||
const buildTime = buildTimeTxtBuffer.toString().replace('\n', '');
|
||||
return { versionName, buildTime, ...appCredential };
|
||||
}
|
||||
|
||||
const localDir = path.resolve(os.homedir(), tempDir);
|
||||
fs.ensureDirSync(localDir);
|
||||
export function saveToLocal(originPath: string, destName: string) {
|
||||
// TODO
|
||||
// const destPath = path.join(localDir, destName);
|
||||
// fs.ensureDirSync(path.dirname(destPath));
|
||||
// fs.copyFileSync(originPath, destPath);
|
||||
}
|
||||
|
||||
async function getLatestVersion(pkgNames: string[]) {
|
||||
return latestVersion(pkgNames, {
|
||||
// useCache: true,
|
||||
requestOptions: {
|
||||
timeout: 2000,
|
||||
},
|
||||
})
|
||||
.then((pkgs) => pkgs.map((pkg) => pkg.latest))
|
||||
.catch(() => []);
|
||||
}
|
||||
|
||||
export async function printVersionCommand() {
|
||||
let [latestRnuCliVersion, latestRnuVersion] = await getLatestVersion([
|
||||
'react-native-update-cli',
|
||||
'react-native-update',
|
||||
]);
|
||||
latestRnuCliVersion = latestRnuCliVersion
|
||||
? ` ${t('latestVersionTag', {
|
||||
version: chalk.green(latestRnuCliVersion),
|
||||
})}`
|
||||
: '';
|
||||
console.log(`react-native-update-cli: ${pkg.version}${latestRnuCliVersion}`);
|
||||
const rnuVersion = depVersions['react-native-update'];
|
||||
if (rnuVersion) {
|
||||
latestRnuVersion = latestRnuVersion
|
||||
? ` ${t('latestVersionTag', { version: chalk.green(latestRnuVersion) })}`
|
||||
: '';
|
||||
console.log(`react-native-update: ${rnuVersion}${latestRnuVersion}`);
|
||||
if (IS_CRESC) {
|
||||
if (semverSatisfies(rnuVersion, '<10.27.0')) {
|
||||
console.error(
|
||||
'Unsupported version, please update to the latest version: npm i react-native-update@latest',
|
||||
);
|
||||
process.exit(1);
|
||||
}
|
||||
} else {
|
||||
if (semverSatisfies(rnuVersion, '<8.5.2')) {
|
||||
console.warn(
|
||||
`当前版本已不再支持,请至少升级到 v8 的最新小版本后重新打包(代码无需改动): npm i react-native-update@8 .
|
||||
如有使用安装 apk 的功能,请注意添加所需权限 https://pushy.reactnative.cn/docs/api#async-function-downloadandinstallapkurl`,
|
||||
);
|
||||
} else if (semverSatisfies(rnuVersion, '9.0.0 - 9.2.1')) {
|
||||
console.warn(
|
||||
`当前版本已不再支持,请至少升级到 v9 的最新小版本后重新打包(代码无需改动,可直接热更): npm i react-native-update@9 .
|
||||
如有使用安装 apk 的功能,请注意添加所需权限 https://pushy.reactnative.cn/docs/api#async-function-downloadandinstallapkurl`,
|
||||
);
|
||||
} else if (semverSatisfies(rnuVersion, '10.0.0 - 10.17.0')) {
|
||||
console.warn(
|
||||
'当前版本已不再支持,请升级到 v10 的最新小版本(代码无需改动,可直接热更): npm i react-native-update@10',
|
||||
);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(t('rnuVersionNotFound'));
|
||||
}
|
||||
}
|
||||
|
||||
export { checkPlugins };
|
443
src/utils/latest-version/cli.ts
Normal file
443
src/utils/latest-version/cli.ts
Normal file
@@ -0,0 +1,443 @@
|
||||
import {
|
||||
blue,
|
||||
bold,
|
||||
cyan,
|
||||
gray,
|
||||
green,
|
||||
italic,
|
||||
magenta,
|
||||
red,
|
||||
reset,
|
||||
strip,
|
||||
underline,
|
||||
yellow,
|
||||
} from '@colors/colors/safe';
|
||||
import { existsSync, readFileSync } from 'fs';
|
||||
import { dirname } from 'path';
|
||||
import latestVersion, {
|
||||
type Package,
|
||||
type PackageJson,
|
||||
type LatestVersionPackage,
|
||||
type LatestVersionOptions,
|
||||
} from '.';
|
||||
import semverMajor from 'semver/functions/major';
|
||||
import semverDiff from 'semver/functions/diff';
|
||||
|
||||
interface TableColumn {
|
||||
label: string;
|
||||
attrName: keyof TableRow;
|
||||
align: 'left' | 'center' | 'right';
|
||||
maxLength: number;
|
||||
items: string[];
|
||||
}
|
||||
|
||||
type TableRowGroup =
|
||||
| 'patch'
|
||||
| 'minor'
|
||||
| 'major'
|
||||
| 'majorVersionZero'
|
||||
| 'unknown';
|
||||
|
||||
interface TableRow {
|
||||
name: string;
|
||||
location: string;
|
||||
installed: string;
|
||||
tagOrRange: string;
|
||||
separator: string;
|
||||
wanted: string;
|
||||
latest: string;
|
||||
group: TableRowGroup;
|
||||
}
|
||||
|
||||
const colorizeDiff = (from: string, to: string): string => {
|
||||
const toParts = to.split('.');
|
||||
|
||||
const diffIndex = from.split('.').findIndex((part, i) => part !== toParts[i]);
|
||||
if (diffIndex !== -1) {
|
||||
let color = magenta;
|
||||
if (toParts[0] !== '0') {
|
||||
color = diffIndex === 0 ? red : diffIndex === 1 ? cyan : green;
|
||||
}
|
||||
const start = toParts.slice(0, diffIndex).join('.');
|
||||
const mid = diffIndex === 0 ? '' : '.';
|
||||
const end = color(toParts.slice(diffIndex).join('.'));
|
||||
return `${start}${mid}${end}`;
|
||||
}
|
||||
return to;
|
||||
};
|
||||
|
||||
const columnCellRenderer = (column: TableColumn, row: TableRow): string => {
|
||||
let text = row[column.attrName];
|
||||
const gap =
|
||||
text.length < column.maxLength
|
||||
? ' '.repeat(column.maxLength - text.length)
|
||||
: '';
|
||||
|
||||
switch (column.attrName) {
|
||||
case 'name':
|
||||
text = yellow(text);
|
||||
break;
|
||||
case 'installed':
|
||||
case 'separator':
|
||||
text = blue(text);
|
||||
break;
|
||||
case 'location':
|
||||
case 'tagOrRange':
|
||||
text = gray(text);
|
||||
break;
|
||||
case 'wanted':
|
||||
text = colorizeDiff(row.installed, text);
|
||||
break;
|
||||
case 'latest':
|
||||
if (text !== row.wanted) {
|
||||
text = colorizeDiff(row.installed, text);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return column.align === 'right' ? `${gap}${text}` : `${text}${gap}`;
|
||||
};
|
||||
|
||||
const columnHeaderRenderer = (column: TableColumn): string => {
|
||||
const text = column.label;
|
||||
const gap =
|
||||
text.length < column.maxLength
|
||||
? ' '.repeat(column.maxLength - text.length)
|
||||
: '';
|
||||
return column.align === 'right'
|
||||
? `${gap}${underline(text)}`
|
||||
: `${underline(text)}${gap}`;
|
||||
};
|
||||
|
||||
const drawBox = (
|
||||
lines: string[],
|
||||
color = yellow,
|
||||
horizontalPadding = 3,
|
||||
): void => {
|
||||
const maxLineWidth = lines.reduce(
|
||||
(max, row) => Math.max(max, strip(row).length),
|
||||
0,
|
||||
);
|
||||
|
||||
console.log(color(`┌${'─'.repeat(maxLineWidth + horizontalPadding * 2)}┐`));
|
||||
lines.forEach((row) => {
|
||||
const padding = ' '.repeat(horizontalPadding);
|
||||
const fullRow = `${row}${' '.repeat(maxLineWidth - strip(row).length)}`;
|
||||
console.log(
|
||||
`${color('│')}${padding}${reset(fullRow)}${padding}${color('│')}`,
|
||||
);
|
||||
});
|
||||
console.log(color(`└${'─'.repeat(maxLineWidth + horizontalPadding * 2)}┘`));
|
||||
};
|
||||
|
||||
const getTableColumns = (rows: TableRow[]): TableColumn[] => {
|
||||
const columns: TableColumn[] = [
|
||||
{
|
||||
label: 'Package',
|
||||
attrName: 'name',
|
||||
align: 'left',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: 'Location',
|
||||
attrName: 'location',
|
||||
align: 'left',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: 'Installed',
|
||||
attrName: 'installed',
|
||||
align: 'right',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
attrName: 'separator',
|
||||
align: 'center',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: 'Range',
|
||||
attrName: 'tagOrRange',
|
||||
align: 'right',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: '',
|
||||
attrName: 'separator',
|
||||
align: 'center',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: 'Wanted',
|
||||
attrName: 'wanted',
|
||||
align: 'right',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
{
|
||||
label: 'Latest',
|
||||
attrName: 'latest',
|
||||
align: 'right',
|
||||
maxLength: 0,
|
||||
items: [],
|
||||
},
|
||||
];
|
||||
rows.forEach((row) => {
|
||||
columns.forEach((column) => {
|
||||
column.maxLength = Math.max(
|
||||
column.label.length,
|
||||
column.maxLength,
|
||||
row[column.attrName].length || 0,
|
||||
);
|
||||
});
|
||||
});
|
||||
return columns;
|
||||
};
|
||||
|
||||
const getTableRows = (updates: LatestVersionPackage[]): TableRow[] => {
|
||||
return updates.reduce<TableRow[]>((all, pkg) => {
|
||||
const {
|
||||
name,
|
||||
latest,
|
||||
local,
|
||||
globalNpm,
|
||||
globalYarn,
|
||||
wantedTagOrRange,
|
||||
updatesAvailable,
|
||||
} = pkg;
|
||||
const getGroup = (a?: string, b?: string): TableRowGroup => {
|
||||
if (b && semverMajor(b) === 0) {
|
||||
return 'majorVersionZero';
|
||||
} else if (a && b) {
|
||||
const releaseType = semverDiff(a, b) ?? '';
|
||||
if (['major', 'premajor', 'prerelease'].includes(releaseType)) {
|
||||
return 'major';
|
||||
} else if (['minor', 'preminor'].includes(releaseType)) {
|
||||
return 'minor';
|
||||
} else if (['patch', 'prepatch'].includes(releaseType)) {
|
||||
return 'patch';
|
||||
}
|
||||
}
|
||||
return 'unknown';
|
||||
};
|
||||
const add = (
|
||||
group: TableRowGroup,
|
||||
location: string,
|
||||
installed?: string,
|
||||
wanted?: string,
|
||||
) =>
|
||||
all.push({
|
||||
name: ' ' + name,
|
||||
location,
|
||||
installed: installed ?? 'unknown',
|
||||
latest: latest ?? 'unknown',
|
||||
tagOrRange: wantedTagOrRange ?? 'unknown',
|
||||
separator: '→',
|
||||
wanted: wanted ?? 'unknown',
|
||||
group,
|
||||
});
|
||||
if (updatesAvailable) {
|
||||
if (updatesAvailable.local) {
|
||||
add(
|
||||
getGroup(local, updatesAvailable.local),
|
||||
'local',
|
||||
local,
|
||||
updatesAvailable.local,
|
||||
);
|
||||
}
|
||||
if (updatesAvailable.globalNpm) {
|
||||
add(
|
||||
getGroup(globalNpm, updatesAvailable.globalNpm),
|
||||
'NPM global',
|
||||
globalNpm,
|
||||
updatesAvailable.globalNpm,
|
||||
);
|
||||
}
|
||||
if (updatesAvailable.globalYarn) {
|
||||
add(
|
||||
getGroup(globalYarn, updatesAvailable.globalYarn),
|
||||
'YARN global',
|
||||
globalYarn,
|
||||
updatesAvailable.globalYarn,
|
||||
);
|
||||
}
|
||||
} else {
|
||||
if (local && local !== latest) {
|
||||
add(getGroup(local, latest), 'local', local, pkg.wanted);
|
||||
}
|
||||
if (globalNpm && globalNpm !== latest) {
|
||||
add(getGroup(globalNpm, latest), 'NPM global', globalNpm, pkg.wanted);
|
||||
}
|
||||
if (globalYarn && globalYarn !== latest) {
|
||||
add(
|
||||
getGroup(globalYarn, latest),
|
||||
'YARN global',
|
||||
globalYarn,
|
||||
pkg.wanted,
|
||||
);
|
||||
}
|
||||
if (!local && !globalNpm && !globalYarn) {
|
||||
add('unknown', 'unknown', 'unknown', pkg.wanted);
|
||||
}
|
||||
}
|
||||
return all;
|
||||
}, []);
|
||||
};
|
||||
|
||||
const displayTable = (latestVersionPackages: LatestVersionPackage[]): void => {
|
||||
const updates = latestVersionPackages.filter((pkg) => pkg.updatesAvailable);
|
||||
if (updates.length) {
|
||||
const rows = getTableRows(updates);
|
||||
const hasUpdates = rows.some((row) => row.installed !== 'unknown');
|
||||
const columns = getTableColumns(rows);
|
||||
const columnGap = 2;
|
||||
|
||||
const getGroupLines = (
|
||||
groupType: TableRowGroup,
|
||||
color: (str: string) => string,
|
||||
title: string,
|
||||
description?: string,
|
||||
): string[] => {
|
||||
const items = rows
|
||||
.filter((row) => row.group === groupType)
|
||||
.sort((a, b) => (a.name > b.name ? 1 : -1));
|
||||
return !items.length
|
||||
? []
|
||||
: [
|
||||
'',
|
||||
color(`${bold(title)} ${italic(`(${description})`)}`),
|
||||
...items.map((row) =>
|
||||
columns
|
||||
.map((column) => columnCellRenderer(column, row))
|
||||
.join(' '.repeat(columnGap)),
|
||||
),
|
||||
];
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
|
||||
drawBox(
|
||||
[
|
||||
'',
|
||||
hasUpdates ? yellow('Important updates are available.') : undefined,
|
||||
hasUpdates ? '' : undefined,
|
||||
columns.map(columnHeaderRenderer).join(' '.repeat(columnGap)),
|
||||
...getGroupLines(
|
||||
'patch',
|
||||
green,
|
||||
'Patch',
|
||||
'backwards-compatible bug fixes',
|
||||
),
|
||||
...getGroupLines(
|
||||
'minor',
|
||||
cyan,
|
||||
'Minor',
|
||||
'backwards-compatible features',
|
||||
),
|
||||
...getGroupLines(
|
||||
'major',
|
||||
red,
|
||||
'Major',
|
||||
'potentially breaking API changes',
|
||||
),
|
||||
...getGroupLines(
|
||||
'majorVersionZero',
|
||||
magenta,
|
||||
'Major version zero',
|
||||
'not stable, anything may change',
|
||||
),
|
||||
...getGroupLines('unknown', blue, 'Missing', 'not installed'),
|
||||
'',
|
||||
].filter((line) => line !== undefined) as string[],
|
||||
);
|
||||
} else {
|
||||
console.log(green('🎉 Packages are up-to-date'));
|
||||
}
|
||||
};
|
||||
|
||||
const checkVersions = async (
|
||||
packages: Package | Package[] | PackageJson,
|
||||
skipMissing: boolean,
|
||||
options: LatestVersionOptions = { useCache: true },
|
||||
): Promise<void> => {
|
||||
const ora = (await import('ora')).default;
|
||||
const spinner = ora({ text: cyan('Checking versions...') });
|
||||
spinner.start();
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
let latestVersionPackages: LatestVersionPackage[] = await latestVersion(
|
||||
packages,
|
||||
options,
|
||||
);
|
||||
if (skipMissing) {
|
||||
latestVersionPackages = latestVersionPackages.filter(
|
||||
(pkg) => pkg.local ?? pkg.globalNpm ?? pkg.globalYarn,
|
||||
);
|
||||
}
|
||||
spinner.stop();
|
||||
displayTable(latestVersionPackages);
|
||||
};
|
||||
|
||||
void (async () => {
|
||||
let args = process.argv.slice(2);
|
||||
|
||||
const skipMissing = args.includes('--skip-missing');
|
||||
|
||||
// Remove any options from the arguments
|
||||
args = args.filter((arg) => !arg.startsWith('-'));
|
||||
|
||||
// If argument is a package.json file
|
||||
if (args.length === 1 && args[0].endsWith('package.json')) {
|
||||
if (existsSync(args[0])) {
|
||||
process.chdir(dirname(args[0]));
|
||||
await checkVersions(
|
||||
JSON.parse(readFileSync(args[0]).toString()) as PackageJson,
|
||||
skipMissing,
|
||||
);
|
||||
} else {
|
||||
console.log(cyan('No package.json file were found'));
|
||||
}
|
||||
}
|
||||
// else..
|
||||
else {
|
||||
// Check if a local package.json file exists
|
||||
let localPkgJson: PackageJson | undefined;
|
||||
if (existsSync('package.json')) {
|
||||
localPkgJson = JSON.parse(readFileSync('package.json').toString());
|
||||
}
|
||||
|
||||
// Check given arguments
|
||||
if (args.length) {
|
||||
// Map arguments with any range that could be found in local package.json
|
||||
args = args.map((arg) => {
|
||||
if (localPkgJson?.dependencies?.[arg]) {
|
||||
return `${arg}@${localPkgJson.dependencies?.[arg]}`;
|
||||
}
|
||||
if (localPkgJson?.devDependencies?.[arg]) {
|
||||
return `${arg}@${localPkgJson.devDependencies?.[arg]}`;
|
||||
}
|
||||
if (localPkgJson?.peerDependencies?.[arg]) {
|
||||
return `${arg}@${localPkgJson.peerDependencies?.[arg]}`;
|
||||
}
|
||||
return arg;
|
||||
});
|
||||
await checkVersions(args, skipMissing);
|
||||
}
|
||||
// ...else check the local package.json if any
|
||||
else if (localPkgJson) {
|
||||
await checkVersions(localPkgJson, skipMissing);
|
||||
}
|
||||
// ...else do nothing
|
||||
else {
|
||||
console.log(cyan('No packages were found'));
|
||||
}
|
||||
}
|
||||
})();
|
497
src/utils/latest-version/index.ts
Normal file
497
src/utils/latest-version/index.ts
Normal file
@@ -0,0 +1,497 @@
|
||||
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
||||
import type {
|
||||
RequestOptions as HttpRequestOptions,
|
||||
Agent,
|
||||
IncomingMessage,
|
||||
} from 'http';
|
||||
import type { RequestOptions as HttpsRequestOptions } from 'https';
|
||||
import { join, dirname, resolve as pathResolve, parse } from 'path';
|
||||
import { npm, yarn } from 'global-dirs';
|
||||
import { homedir } from 'os';
|
||||
import { URL } from 'url';
|
||||
|
||||
import getRegistryUrl from 'registry-auth-token/registry-url';
|
||||
import registryAuthToken from 'registry-auth-token';
|
||||
import maxSatisfying from 'semver/ranges/max-satisfying';
|
||||
import gt from 'semver/functions/gt';
|
||||
|
||||
interface RegistryVersions {
|
||||
/**
|
||||
* The latest version of the package found on the registry (if found).
|
||||
*/
|
||||
latest?: string;
|
||||
/**
|
||||
* The next version of the package found on the registry (if found).
|
||||
*/
|
||||
next?: string;
|
||||
/**
|
||||
* The latest version of the package found on the registry and satisfied by the wanted tag or version range.
|
||||
*/
|
||||
wanted?: string;
|
||||
}
|
||||
|
||||
interface InstalledVersions {
|
||||
/**
|
||||
* The current local installed version of the package (if installed).
|
||||
*/
|
||||
local?: string;
|
||||
/**
|
||||
* The current npm global installed version of the package (if installed).
|
||||
*/
|
||||
globalNpm?: string;
|
||||
/**
|
||||
* The current yarn global installed version of the package (if installed).
|
||||
*/
|
||||
globalYarn?: string;
|
||||
}
|
||||
|
||||
interface LatestVersionPackage extends InstalledVersions, RegistryVersions {
|
||||
/**
|
||||
* The name of the package.
|
||||
*/
|
||||
name: string;
|
||||
/**
|
||||
* The tag or version range that was provided (if provided).
|
||||
* @default "latest"
|
||||
*/
|
||||
wantedTagOrRange?: string;
|
||||
/**
|
||||
* Whether the local or global installed versions (if any) could be upgraded or not, based on the wanted version.
|
||||
*/
|
||||
updatesAvailable:
|
||||
| {
|
||||
local: string | false;
|
||||
globalNpm: string | false;
|
||||
globalYarn: string | false;
|
||||
}
|
||||
| false;
|
||||
/**
|
||||
* Any error that might have occurred during the process.
|
||||
*/
|
||||
error?: Error;
|
||||
}
|
||||
|
||||
interface RequestOptions {
|
||||
readonly ca?: string | Buffer | Array<string | Buffer>;
|
||||
readonly rejectUnauthorized?: boolean;
|
||||
readonly agent?: Agent | boolean;
|
||||
readonly timeout?: number;
|
||||
}
|
||||
|
||||
interface LatestVersionOptions {
|
||||
/**
|
||||
* Awaiting the api to return might take time, depending on the network, and might impact your package loading performance.
|
||||
* You can use the cache mechanism to improve load performance and reduce unnecessary network requests.
|
||||
* If `useCache` is not supplied, the api will always check for updates and wait for every requests to return before returning itself.
|
||||
* If `useCache` is used, the api will always returned immediately, with either (for each provided packages):
|
||||
* 1) a latest/next version available if a cache was found
|
||||
* 2) no latest/next version available if no cache was found - in such case updates will be fetched in the background and a cache will
|
||||
* be created for each provided packages and made available for the next call to the api.
|
||||
* @default false
|
||||
*/
|
||||
readonly useCache?: boolean;
|
||||
|
||||
/**
|
||||
* How long the cache for the provided packages should be used before being refreshed (in milliseconds).
|
||||
* If `useCache` is not supplied, this option has no effect.
|
||||
* If `0` is used, this will force the cache to refresh immediately:
|
||||
* 1) The api will returned immediately (without any latest nor next version available for the provided packages)
|
||||
* 2) New updates will be fetched in the background
|
||||
* 3) The cache for each provided packages will be refreshed and made available for the next call to the api
|
||||
* @default ONE_DAY
|
||||
*/
|
||||
readonly cacheMaxAge?: number;
|
||||
|
||||
/**
|
||||
* A JavaScript package registry url that implements the CommonJS Package Registry specification.
|
||||
* @default "Looks at any registry urls in the .npmrc file or fallback to the default npm registry instead"
|
||||
* @example <caption>.npmrc</caption>
|
||||
* registry = 'https://custom-registry.com/'
|
||||
* @pkgscope:registry = 'https://custom-registry.com/'
|
||||
*/
|
||||
readonly registryUrl?: string;
|
||||
|
||||
/**
|
||||
* Set of options to be passed down to Node.js http/https request.
|
||||
* @example <caption>Behind a proxy with self-signed certificate</caption>
|
||||
* { ca: [ fs.readFileSync('proxy-cert.pem') ] }
|
||||
* @example <caption>Bypassing certificate validation</caption>
|
||||
* { rejectUnauthorized: false }
|
||||
*/
|
||||
readonly requestOptions?: RequestOptions;
|
||||
}
|
||||
|
||||
interface LatestVersion {
|
||||
/**
|
||||
* Get latest versions of packages from of a package json like object.
|
||||
* @param {PackageJson} item - A package json like object (with dependencies, devDependencies and peerDependencies attributes).
|
||||
* @example { dependencies: { 'npm': 'latest' }, devDependencies: { 'npm': '1.3.2' }, peerDependencies: { '@scope/name': '^5.0.2' } }
|
||||
* @param {LatestVersionOptions} [options] - An object optionally specifying the use of the cache, the max age of the cache, the registry url and the http or https options.
|
||||
* If `useCache` is not supplied, the default of `false` is used.
|
||||
* If `cacheMaxAge` is not supplied, the default of `one day` is used.
|
||||
* If `registryUrl` is not supplied, the default from `.npmrc` is used or a fallback to the `npm registry url` instead.
|
||||
* @returns {Promise<LatestVersionPackage[]>}
|
||||
*/
|
||||
(item: PackageJson, options?: LatestVersionOptions): Promise<
|
||||
LatestVersionPackage[]
|
||||
>;
|
||||
|
||||
/**
|
||||
* Get latest version of a single package.
|
||||
* @param {Package} item - A single package object (represented by a string that should match the following format: `${'@' | ''}${string}@${string}`)
|
||||
* @example 'npm', 'npm@1.3.2', '@scope/name@^5.0.2'
|
||||
* @param {LatestVersionOptions} [options] - An object optionally specifying the use of the cache, the max age of the cache, the registry url and the http or https options.
|
||||
* If `useCache` is not supplied, the default of `false` is used.
|
||||
* If `cacheMaxAge` is not supplied, the default of `one day` is used.
|
||||
* If `registryUrl` is not supplied, the default from `.npmrc` is used or a fallback to the npm registry url instead.
|
||||
* @returns {Promise<LatestVersionPackage>}
|
||||
*/
|
||||
(
|
||||
item: Package,
|
||||
options?: LatestVersionOptions,
|
||||
): Promise<LatestVersionPackage>;
|
||||
|
||||
/**
|
||||
* Get latest versions of a collection of packages.
|
||||
* @param {Package[]} items - A collection of package object (represented by a string that should match the following format: `${'@' | ''}${string}@${string}`)
|
||||
* @example ['npm', 'npm@1.3.2', '@scope/name@^5.0.2']
|
||||
* @param {LatestVersionOptions} [options] - An object optionally specifying the use of the cache, the max age of the cache, the registry url and the http or https options.
|
||||
* If `useCache` is not supplied, the default of `false` is used.
|
||||
* If `cacheMaxAge` is not supplied, the default of `one day` is used.
|
||||
* If `registryUrl` is not supplied, the default from `.npmrc` is used or a fallback to the npm registry url instead.
|
||||
* @returns {Promise<LatestVersionPackage[]>}
|
||||
*/
|
||||
(items: Package[], options?: LatestVersionOptions): Promise<
|
||||
LatestVersionPackage[]
|
||||
>; // eslint-disable-line @typescript-eslint/unified-signatures
|
||||
}
|
||||
type PackageRange = `${'@' | ''}${string}@${string}`;
|
||||
type Package = PackageRange | string; // eslint-disable-line @typescript-eslint/no-redundant-type-constituents
|
||||
type PackageJsonDependencies = Record<string, string>;
|
||||
type PackageJson = Record<string, any> &
|
||||
(
|
||||
| {
|
||||
dependencies: PackageJsonDependencies;
|
||||
}
|
||||
| {
|
||||
devDependencies: PackageJsonDependencies;
|
||||
}
|
||||
| {
|
||||
peerDependencies: PackageJsonDependencies;
|
||||
}
|
||||
);
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
interface PackageMetadata {
|
||||
name: string;
|
||||
lastUpdateDate: number;
|
||||
versions: string[];
|
||||
distTags: Record<string, string>;
|
||||
}
|
||||
|
||||
export const ONE_DAY = 1000 * 60 * 60 * 24; // eslint-disable-line @typescript-eslint/naming-convention
|
||||
|
||||
const isPackageJson = (obj: any): obj is PackageJson => {
|
||||
return (
|
||||
(obj as PackageJson).dependencies !== undefined ||
|
||||
(obj as PackageJson).devDependencies !== undefined ||
|
||||
(obj as PackageJson).peerDependencies !== undefined
|
||||
);
|
||||
};
|
||||
|
||||
const downloadMetadata = (
|
||||
pkgName: string,
|
||||
options?: LatestVersionOptions,
|
||||
): Promise<PackageMetadata> => {
|
||||
return new Promise((resolve, reject) => {
|
||||
const i = pkgName.indexOf('/');
|
||||
const pkgScope = i !== -1 ? pkgName.slice(0, i) : '';
|
||||
const registryUrl = options?.registryUrl ?? getRegistryUrl(pkgScope);
|
||||
const pkgUrl = new URL(
|
||||
encodeURIComponent(pkgName).replace(/^%40/, '@'),
|
||||
registryUrl,
|
||||
);
|
||||
|
||||
let requestOptions: HttpRequestOptions | HttpsRequestOptions = {
|
||||
headers: {
|
||||
accept:
|
||||
'application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*',
|
||||
},
|
||||
host: pkgUrl.hostname,
|
||||
path: pkgUrl.pathname,
|
||||
port: pkgUrl.port,
|
||||
};
|
||||
const authInfo = registryAuthToken(pkgUrl.toString(), { recursive: true });
|
||||
if (authInfo && requestOptions.headers) {
|
||||
requestOptions.headers.authorization = `${authInfo.type} ${authInfo.token}`;
|
||||
}
|
||||
if (options?.requestOptions) {
|
||||
requestOptions = { ...requestOptions, ...options.requestOptions };
|
||||
}
|
||||
|
||||
const { get } = require(pkgUrl.protocol === 'https:' ? 'https' : 'http');
|
||||
const request = get(requestOptions, (res: IncomingMessage) => {
|
||||
if (res.statusCode === 200) {
|
||||
let rawData = '';
|
||||
res.setEncoding('utf8');
|
||||
res.on('data', (chunk: string) => (rawData += chunk));
|
||||
res.once('error', (err) => {
|
||||
res.removeAllListeners();
|
||||
reject(`Request error (${err.message}): ${pkgUrl}`);
|
||||
});
|
||||
res.once('end', () => {
|
||||
res.removeAllListeners();
|
||||
try {
|
||||
const pkgMetadata = JSON.parse(rawData);
|
||||
resolve({
|
||||
name: pkgName,
|
||||
lastUpdateDate: Date.now(),
|
||||
versions: Object.keys(pkgMetadata.versions as string[]),
|
||||
distTags: pkgMetadata['dist-tags'],
|
||||
});
|
||||
return;
|
||||
} catch (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
res.removeAllListeners();
|
||||
res.resume(); // consume response data to free up memory
|
||||
reject(`Request error (${res.statusCode}): ${pkgUrl}`);
|
||||
return;
|
||||
}
|
||||
});
|
||||
const abort = (error: Error | string): void => {
|
||||
request.destroy();
|
||||
reject(error);
|
||||
};
|
||||
request.once('timeout', () => {
|
||||
abort(`Request timed out: ${pkgUrl}`);
|
||||
});
|
||||
request.once('error', (err: Error) => {
|
||||
abort(err);
|
||||
});
|
||||
request.on('close', () => {
|
||||
request.removeAllListeners();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const getCacheDir = (name = '@badisi/latest-version'): string => {
|
||||
const homeDir = homedir();
|
||||
switch (process.platform) {
|
||||
case 'darwin':
|
||||
return join(homeDir, 'Library', 'Caches', name);
|
||||
case 'win32':
|
||||
return join(
|
||||
process.env.LOCALAPPDATA ?? join(homeDir, 'AppData', 'Local'),
|
||||
name,
|
||||
'Cache',
|
||||
);
|
||||
default:
|
||||
return join(process.env.XDG_CACHE_HOME ?? join(homeDir, '.cache'), name);
|
||||
}
|
||||
};
|
||||
|
||||
const saveMetadataToCache = (pkg: PackageMetadata): void => {
|
||||
const filePath = join(getCacheDir(), `${pkg.name}.json`);
|
||||
if (!existsSync(dirname(filePath))) {
|
||||
mkdirSync(dirname(filePath), { recursive: true });
|
||||
}
|
||||
writeFileSync(filePath, JSON.stringify(pkg));
|
||||
};
|
||||
|
||||
const getMetadataFromCache = (
|
||||
pkgName: string,
|
||||
options?: LatestVersionOptions,
|
||||
): PackageMetadata | undefined => {
|
||||
const maxAge = options?.cacheMaxAge ?? ONE_DAY;
|
||||
if (maxAge !== 0) {
|
||||
const pkgCacheFilePath = join(getCacheDir(), `${pkgName}.json`);
|
||||
if (existsSync(pkgCacheFilePath)) {
|
||||
const pkg = JSON.parse(
|
||||
readFileSync(pkgCacheFilePath).toString(),
|
||||
) as PackageMetadata;
|
||||
if (Date.now() - pkg.lastUpdateDate < maxAge) {
|
||||
return pkg;
|
||||
}
|
||||
}
|
||||
}
|
||||
return undefined; // invalidates cache
|
||||
};
|
||||
|
||||
const getRegistryVersions = async (
|
||||
pkgName: string,
|
||||
tagOrRange?: string,
|
||||
options?: LatestVersionOptions,
|
||||
): Promise<RegistryVersions> => {
|
||||
let pkgMetadata: PackageMetadata | undefined;
|
||||
if (pkgName.length && options?.useCache) {
|
||||
pkgMetadata = getMetadataFromCache(pkgName, options);
|
||||
if (!pkgMetadata) {
|
||||
pkgMetadata = await downloadMetadata(pkgName, options);
|
||||
saveMetadataToCache(pkgMetadata);
|
||||
}
|
||||
} else if (pkgName.length) {
|
||||
pkgMetadata = await downloadMetadata(pkgName, options);
|
||||
}
|
||||
|
||||
const versions: RegistryVersions = {
|
||||
latest: pkgMetadata?.distTags.latest,
|
||||
next: pkgMetadata?.distTags.next,
|
||||
};
|
||||
if (tagOrRange && pkgMetadata?.distTags[tagOrRange]) {
|
||||
versions.wanted = pkgMetadata.distTags[tagOrRange];
|
||||
} else if (tagOrRange && pkgMetadata?.versions.length) {
|
||||
versions.wanted =
|
||||
maxSatisfying(pkgMetadata.versions, tagOrRange) ?? undefined;
|
||||
}
|
||||
return versions;
|
||||
};
|
||||
|
||||
const getInstalledVersion = (
|
||||
pkgName: string,
|
||||
location: keyof InstalledVersions = 'local',
|
||||
): string | undefined => {
|
||||
try {
|
||||
if (location === 'globalNpm') {
|
||||
return require(join(npm.packages, pkgName, 'package.json'))
|
||||
?.version as string;
|
||||
} else if (location === 'globalYarn') {
|
||||
// Make sure package is globally installed by Yarn
|
||||
const yarnGlobalPkg = require(pathResolve(
|
||||
yarn.packages,
|
||||
'..',
|
||||
'package.json',
|
||||
));
|
||||
if (!yarnGlobalPkg?.dependencies?.[pkgName]) {
|
||||
return undefined;
|
||||
}
|
||||
return require(join(yarn.packages, pkgName, 'package.json'))
|
||||
?.version as string;
|
||||
} else {
|
||||
/**
|
||||
* Compute the local paths manually as require.resolve() and require.resolve.paths()
|
||||
* cannot be trusted anymore.
|
||||
* @see https://github.com/nodejs/node/issues/33460
|
||||
* @see https://github.com/nodejs/loaders/issues/26
|
||||
*/
|
||||
const { root } = parse(process.cwd());
|
||||
let path = process.cwd();
|
||||
const localPaths = [join(path, 'node_modules')];
|
||||
while (path !== root) {
|
||||
path = dirname(path);
|
||||
localPaths.push(join(path, 'node_modules'));
|
||||
}
|
||||
for (const localPath of localPaths) {
|
||||
const pkgPath = join(localPath, pkgName, 'package.json');
|
||||
if (existsSync(pkgPath)) {
|
||||
return require(pkgPath)?.version as string;
|
||||
}
|
||||
}
|
||||
}
|
||||
return undefined;
|
||||
} catch {
|
||||
return undefined;
|
||||
}
|
||||
};
|
||||
|
||||
const getInfo = async (
|
||||
pkg: Package,
|
||||
options?: LatestVersionOptions,
|
||||
): Promise<LatestVersionPackage> => {
|
||||
const i = pkg.lastIndexOf('@');
|
||||
let pkgInfo: LatestVersionPackage = {
|
||||
name: i > 1 ? pkg.slice(0, i) : pkg,
|
||||
wantedTagOrRange: i > 1 ? pkg.slice(i + 1) : 'latest',
|
||||
updatesAvailable: false,
|
||||
};
|
||||
|
||||
try {
|
||||
pkgInfo = {
|
||||
...pkgInfo,
|
||||
local: getInstalledVersion(pkgInfo.name, 'local'),
|
||||
globalNpm: getInstalledVersion(pkgInfo.name, 'globalNpm'),
|
||||
globalYarn: getInstalledVersion(pkgInfo.name, 'globalYarn'),
|
||||
...(await getRegistryVersions(
|
||||
pkgInfo.name,
|
||||
pkgInfo.wantedTagOrRange,
|
||||
options,
|
||||
)),
|
||||
};
|
||||
const local =
|
||||
pkgInfo.local && pkgInfo.wanted
|
||||
? gt(pkgInfo.wanted, pkgInfo.local)
|
||||
? pkgInfo.wanted
|
||||
: false
|
||||
: false;
|
||||
const globalNpm =
|
||||
pkgInfo.globalNpm && pkgInfo.wanted
|
||||
? gt(pkgInfo.wanted, pkgInfo.globalNpm)
|
||||
? pkgInfo.wanted
|
||||
: false
|
||||
: false;
|
||||
const globalYarn =
|
||||
pkgInfo.globalYarn && pkgInfo.wanted
|
||||
? gt(pkgInfo.wanted, pkgInfo.globalYarn)
|
||||
? pkgInfo.wanted
|
||||
: false
|
||||
: false;
|
||||
pkgInfo.updatesAvailable =
|
||||
local || globalNpm || globalYarn
|
||||
? { local, globalNpm, globalYarn }
|
||||
: false;
|
||||
} catch (err: any) {
|
||||
pkgInfo.error = err?.message ?? err;
|
||||
}
|
||||
|
||||
return pkgInfo;
|
||||
};
|
||||
|
||||
const latestVersion: LatestVersion = async (
|
||||
arg: Package | Package[] | PackageJson,
|
||||
options?: LatestVersionOptions,
|
||||
): Promise<any> => {
|
||||
const pkgs: Package[] = [];
|
||||
if (typeof arg === 'string') {
|
||||
pkgs.push(arg);
|
||||
} else if (Array.isArray(arg)) {
|
||||
pkgs.push(...arg);
|
||||
} else if (isPackageJson(arg)) {
|
||||
const addDeps = (deps?: PackageJsonDependencies): void => {
|
||||
if (deps) {
|
||||
pkgs.push(
|
||||
...Object.keys(deps).map((key: string) => `${key}@${deps[key]}`),
|
||||
);
|
||||
}
|
||||
};
|
||||
addDeps(arg.dependencies as PackageJsonDependencies | undefined);
|
||||
addDeps(arg.devDependencies as PackageJsonDependencies | undefined);
|
||||
addDeps(arg.peerDependencies as PackageJsonDependencies | undefined);
|
||||
}
|
||||
|
||||
const jobs = await Promise.allSettled(
|
||||
pkgs.map((pkg) => getInfo(pkg, options)),
|
||||
);
|
||||
const results = jobs.map(
|
||||
(jobResult: PromiseSettledResult<LatestVersionPackage>) =>
|
||||
(jobResult as PromiseFulfilledResult<LatestVersionPackage>).value,
|
||||
);
|
||||
return typeof arg === 'string' ? results[0] : results;
|
||||
};
|
||||
|
||||
export type {
|
||||
LatestVersion,
|
||||
Package,
|
||||
PackageRange,
|
||||
PackageJson,
|
||||
PackageJsonDependencies,
|
||||
RegistryVersions,
|
||||
LatestVersionPackage,
|
||||
RequestOptions,
|
||||
LatestVersionOptions,
|
||||
};
|
||||
export default latestVersion;
|
32
src/utils/plugin-config.ts
Normal file
32
src/utils/plugin-config.ts
Normal file
@@ -0,0 +1,32 @@
|
||||
import fs from 'fs-extra';
|
||||
|
||||
interface PluginConfig {
|
||||
name: string;
|
||||
bundleParams?: {
|
||||
[key: string]: any;
|
||||
};
|
||||
detect: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
export const plugins: PluginConfig[] = [
|
||||
{
|
||||
name: 'sentry',
|
||||
bundleParams: {
|
||||
sentry: true,
|
||||
sourcemap: true,
|
||||
},
|
||||
detect: async () => {
|
||||
try {
|
||||
await fs.access('ios/sentry.properties');
|
||||
return true;
|
||||
} catch {
|
||||
try {
|
||||
await fs.access('android/sentry.properties');
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
];
|
113
src/versions.js
113
src/versions.js
@@ -1,113 +0,0 @@
|
||||
/**
|
||||
* Created by tdzl2003 on 4/2/16.
|
||||
*/
|
||||
|
||||
const {
|
||||
get,
|
||||
post,
|
||||
put,
|
||||
uploadFile,
|
||||
} = require('./api');
|
||||
import { question, saveToLocal } from './utils';
|
||||
|
||||
import { checkPlatform, getSelectedApp } from './app';
|
||||
import { choosePackage } from './package';
|
||||
|
||||
async function showVersion(appId, offset) {
|
||||
const { data, count } = await get(`/app/${appId}/version/list`);
|
||||
console.log(`Offset ${offset}`);
|
||||
for (const version of data) {
|
||||
let packageInfo = version.packages.slice(0, 3).map(v=>v.name).join(', ');
|
||||
const count = version.packages.length;
|
||||
if (count > 3) {
|
||||
packageInfo += `...and ${count-3} more`;
|
||||
}
|
||||
if (count === 0) {
|
||||
packageInfo = `(no package)`;
|
||||
} else {
|
||||
packageInfo = `[${packageInfo}]`;
|
||||
}
|
||||
console.log(`${version.id}) ${version.hash.slice(0, 8)} ${version.name} ${packageInfo}`);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
async function listVersions(appId) {
|
||||
let offset = 0;
|
||||
while (true) {
|
||||
await showVersion(appId, offset);
|
||||
const cmd = await question('page Up/page Down/Begin/Quit(U/D/B/Q)');
|
||||
switch (cmd.toLowerCase()) {
|
||||
case 'u': offset = Math.max(0, offset - 10); break;
|
||||
case 'd': offset += 10; break;
|
||||
case 'b': offset = 0; break;
|
||||
case 'q': return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function chooseVersion(appId) {
|
||||
let offset = 0;
|
||||
while (true) {
|
||||
const data = await showVersion(appId, offset);
|
||||
const cmd = await question('Enter versionId or page Up/page Down/Begin(U/D/B)');
|
||||
switch (cmd.toLowerCase()) {
|
||||
case 'U': offset = Math.max(0, offset - 10); break;
|
||||
case 'D': offset += 10; break;
|
||||
case 'B': offset = 0; break;
|
||||
default:
|
||||
{
|
||||
const v = data.find(v=>v.id === (cmd | 0));
|
||||
if (v) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
publish: async function({args, options}) {
|
||||
const fn = args[0];
|
||||
const {name, description, metaInfo } = options;
|
||||
|
||||
if (!fn || !fn.endsWith('.ppk')) {
|
||||
throw new Error('Usage: pushy publish <ppkFile> --platform ios|android');
|
||||
}
|
||||
|
||||
const platform = checkPlatform(options.platform || await question('Platform(ios/android):'));
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const { id } = await post(`/app/${appId}/version/create`, {
|
||||
name: name || await question('Enter version name:') || '(未命名)',
|
||||
hash,
|
||||
description: description || await question('Enter description:'),
|
||||
metaInfo: metaInfo || await question('Enter meta info:'),
|
||||
});
|
||||
// TODO local diff
|
||||
saveToLocal(fn, `${appId}/ppk/${id}.ppk`);
|
||||
console.log(`Version published: ${id}`);
|
||||
|
||||
const v = await question('Would you like to bind packages to this version?(Y/N)');
|
||||
if (v.toLowerCase() === 'y') {
|
||||
await this.update({args:[], options:{versionId: id, platform}});
|
||||
}
|
||||
},
|
||||
versions: async function({options}) {
|
||||
const platform = checkPlatform(options.platform || await question('Platform(ios/android):'));
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
await listVersions(appId);
|
||||
},
|
||||
update: async function({args, options}) {
|
||||
const platform = checkPlatform(options.platform || await question('Platform(ios/android):'));
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
const versionId = options.versionId || (await chooseVersion(appId)).id;
|
||||
const pkgId = options.packageId || (await choosePackage(appId)).id;
|
||||
await put(`/app/${appId}/package/${pkgId}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log('Ok.');
|
||||
}
|
||||
};
|
365
src/versions.ts
Normal file
365
src/versions.ts
Normal file
@@ -0,0 +1,365 @@
|
||||
import { get, post, put, uploadFile } from './api';
|
||||
import { question, saveToLocal } from './utils';
|
||||
import { t } from './utils/i18n';
|
||||
|
||||
import { checkPlatform, getSelectedApp } from './app';
|
||||
import { choosePackage } from './package';
|
||||
import { compare } from 'compare-versions';
|
||||
import { depVersions } from './utils/dep-versions';
|
||||
import { getCommitInfo } from './utils/git';
|
||||
import type { Platform } from 'types';
|
||||
|
||||
interface Package {
|
||||
id: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
interface Version {
|
||||
id: string;
|
||||
hash: string;
|
||||
name: string;
|
||||
packages?: Package[];
|
||||
}
|
||||
|
||||
interface CommandOptions {
|
||||
name?: string;
|
||||
description?: string;
|
||||
metaInfo?: string;
|
||||
platform?: Platform;
|
||||
versionId?: string;
|
||||
packageId?: string;
|
||||
packageVersion?: string;
|
||||
minPackageVersion?: string;
|
||||
maxPackageVersion?: string;
|
||||
rollout?: string;
|
||||
}
|
||||
|
||||
async function showVersion(appId: string, offset: number) {
|
||||
const { data, count } = await get(`/app/${appId}/version/list`);
|
||||
console.log(t('offset', { offset }));
|
||||
for (const version of data) {
|
||||
const pkgCount = version.packages?.length || 0;
|
||||
let packageInfo = '';
|
||||
if (pkgCount === 0) {
|
||||
packageInfo = 'no package';
|
||||
} else {
|
||||
packageInfo = version.packages
|
||||
?.slice(0, 3)
|
||||
.map((pkg: Package) => pkg.name)
|
||||
.join(', ');
|
||||
if (pkgCount > 3) {
|
||||
packageInfo += `...and ${pkgCount - 3} more`;
|
||||
} else {
|
||||
packageInfo = `[${packageInfo}]`;
|
||||
}
|
||||
}
|
||||
console.log(
|
||||
`${version.id}) ${version.hash.slice(0, 8)} ${
|
||||
version.name
|
||||
} ${packageInfo}`,
|
||||
);
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
async function listVersions(appId: string) {
|
||||
let offset = 0;
|
||||
while (true) {
|
||||
await showVersion(appId, offset);
|
||||
const cmd = await question('page Up/page Down/Begin/Quit(U/D/B/Q)');
|
||||
switch (cmd.toLowerCase()) {
|
||||
case 'u':
|
||||
offset = Math.max(0, offset - 10);
|
||||
break;
|
||||
case 'd':
|
||||
offset += 10;
|
||||
break;
|
||||
case 'b':
|
||||
offset = 0;
|
||||
break;
|
||||
case 'q':
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
async function chooseVersion(appId: string) {
|
||||
let offset = 0;
|
||||
while (true) {
|
||||
const data = await showVersion(appId, offset);
|
||||
const cmd = await question(
|
||||
'Enter versionId or page Up/page Down/Begin(U/D/B)',
|
||||
);
|
||||
switch (cmd.toUpperCase()) {
|
||||
case 'U':
|
||||
offset = Math.max(0, offset - 10);
|
||||
break;
|
||||
case 'D':
|
||||
offset += 10;
|
||||
break;
|
||||
case 'B':
|
||||
offset = 0;
|
||||
break;
|
||||
default: {
|
||||
const versionId = Number.parseInt(cmd, 10);
|
||||
const v = data.find(
|
||||
(version: Version) => version.id === String(versionId),
|
||||
);
|
||||
if (v) {
|
||||
return v;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const commands = {
|
||||
publish: async function ({
|
||||
args,
|
||||
options,
|
||||
}: {
|
||||
args: string[];
|
||||
options: CommandOptions;
|
||||
}) {
|
||||
const fn = args[0];
|
||||
const { name, description, metaInfo } = options;
|
||||
|
||||
if (!fn || !fn.endsWith('.ppk')) {
|
||||
throw new Error(t('publishUsage'));
|
||||
}
|
||||
|
||||
const platform = checkPlatform(
|
||||
options.platform ||
|
||||
((await question('平台(ios/android/harmony):')) as Platform),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
|
||||
const { hash } = await uploadFile(fn);
|
||||
|
||||
const versionName =
|
||||
name || (await question('输入版本名称: ')) || '(未命名)';
|
||||
const { id } = await post(`/app/${appId}/version/create`, {
|
||||
name: versionName,
|
||||
hash,
|
||||
description: description || (await question('输入版本描述:')),
|
||||
metaInfo: metaInfo || (await question('输入自定义的 meta info:')),
|
||||
deps: depVersions,
|
||||
commit: await getCommitInfo(),
|
||||
});
|
||||
// TODO local diff
|
||||
saveToLocal(fn, `${appId}/ppk/${id}.ppk`);
|
||||
console.log(t('packageUploadSuccess', { id }));
|
||||
|
||||
const v = await question('是否现在将此热更应用到原生包上?(Y/N)');
|
||||
if (v.toLowerCase() === 'y') {
|
||||
await this.update({ args: [], options: { versionId: id, platform } });
|
||||
}
|
||||
return versionName;
|
||||
},
|
||||
versions: async ({ options }: { options: CommandOptions }) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform ||
|
||||
((await question('平台(ios/android/harmony):')) as Platform),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
await listVersions(appId);
|
||||
},
|
||||
update: async ({
|
||||
args,
|
||||
options,
|
||||
}: {
|
||||
args: string[];
|
||||
options: CommandOptions;
|
||||
}) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform ||
|
||||
((await question('平台(ios/android/harmony):')) as Platform),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
let versionId = options.versionId || (await chooseVersion(appId)).id;
|
||||
if (versionId === 'null') {
|
||||
versionId = undefined;
|
||||
}
|
||||
|
||||
let pkgId: string | undefined;
|
||||
let pkgVersion = options.packageVersion;
|
||||
let minPkgVersion = options.minPackageVersion;
|
||||
let maxPkgVersion = options.maxPackageVersion;
|
||||
let rollout: number | undefined = undefined;
|
||||
|
||||
if (options.rollout !== undefined) {
|
||||
try {
|
||||
rollout = Number.parseInt(options.rollout);
|
||||
} catch (e) {
|
||||
throw new Error(t('rolloutRangeError'));
|
||||
}
|
||||
if (rollout < 1 || rollout > 100) {
|
||||
throw new Error(t('rolloutRangeError'));
|
||||
}
|
||||
}
|
||||
|
||||
if (minPkgVersion) {
|
||||
minPkgVersion = String(minPkgVersion).trim();
|
||||
const { data } = await get(`/app/${appId}/package/list?limit=1000`);
|
||||
const pkgs = data.filter((pkg: Package) =>
|
||||
compare(pkg.name, minPkgVersion!, '>='),
|
||||
);
|
||||
if (pkgs.length === 0) {
|
||||
throw new Error(t('nativeVersionNotFound', { version: minPkgVersion }));
|
||||
}
|
||||
if (rollout !== undefined) {
|
||||
const rolloutConfig: Record<string, number> = {};
|
||||
for (const pkg of pkgs) {
|
||||
rolloutConfig[pkg.name] = rollout;
|
||||
}
|
||||
await put(`/app/${appId}/version/${versionId}`, {
|
||||
config: {
|
||||
rollout: rolloutConfig,
|
||||
},
|
||||
});
|
||||
console.log(
|
||||
`${t('rolloutConfigSet', {
|
||||
versions: pkgs.map((pkg: Package) => pkg.name).join(', '),
|
||||
rollout: rollout,
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
for (const pkg of pkgs) {
|
||||
await put(`/app/${appId}/package/${pkg.id}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log(
|
||||
`${t('versionBind', {
|
||||
version: versionId,
|
||||
nativeVersion: pkg.name,
|
||||
id: pkg.id,
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
console.log(t('operationComplete', { count: pkgs.length }));
|
||||
return;
|
||||
}
|
||||
if (maxPkgVersion) {
|
||||
maxPkgVersion = String(maxPkgVersion).trim();
|
||||
const { data } = await get(`/app/${appId}/package/list?limit=1000`);
|
||||
const pkgs = data.filter((pkg: Package) =>
|
||||
compare(pkg.name, maxPkgVersion!, '<='),
|
||||
);
|
||||
if (pkgs.length === 0) {
|
||||
throw new Error(
|
||||
t('nativeVersionNotFoundLess', { version: maxPkgVersion }),
|
||||
);
|
||||
}
|
||||
if (rollout !== undefined) {
|
||||
const rolloutConfig: Record<string, number> = {};
|
||||
for (const pkg of pkgs) {
|
||||
rolloutConfig[pkg.name] = rollout;
|
||||
}
|
||||
await put(`/app/${appId}/version/${versionId}`, {
|
||||
config: {
|
||||
rollout: rolloutConfig,
|
||||
},
|
||||
});
|
||||
console.log(
|
||||
`${t('rolloutConfigSet', {
|
||||
versions: pkgs.map((pkg: Package) => pkg.name).join(', '),
|
||||
rollout: rollout,
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
for (const pkg of pkgs) {
|
||||
await put(`/app/${appId}/package/${pkg.id}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log(
|
||||
`${t('versionBind', {
|
||||
version: versionId,
|
||||
nativeVersion: pkg.name,
|
||||
id: pkg.id,
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
console.log(t('operationComplete', { count: pkgs.length }));
|
||||
return;
|
||||
}
|
||||
|
||||
const { data } = await get(`/app/${appId}/package/list?limit=1000`);
|
||||
if (pkgVersion) {
|
||||
pkgVersion = pkgVersion.trim();
|
||||
const pkg = data.find((pkg: Package) => pkg.name === pkgVersion);
|
||||
if (pkg) {
|
||||
pkgId = pkg.id;
|
||||
} else {
|
||||
throw new Error(
|
||||
t('nativeVersionNotFoundMatch', { version: pkgVersion }),
|
||||
);
|
||||
}
|
||||
}
|
||||
if (!pkgId) {
|
||||
pkgId = options.packageId || (await choosePackage(appId)).id;
|
||||
}
|
||||
|
||||
if (!pkgId) {
|
||||
throw new Error(t('packageIdRequired'));
|
||||
}
|
||||
|
||||
if (!pkgVersion) {
|
||||
const pkg = data.find((pkg: Package) => String(pkg.id) === String(pkgId));
|
||||
if (pkg) {
|
||||
pkgVersion = pkg.name;
|
||||
}
|
||||
}
|
||||
|
||||
if (rollout !== undefined && pkgVersion) {
|
||||
await put(`/app/${appId}/version/${versionId}`, {
|
||||
config: {
|
||||
rollout: {
|
||||
[pkgVersion]: rollout,
|
||||
},
|
||||
},
|
||||
});
|
||||
console.log(
|
||||
`${t('rolloutConfigSet', {
|
||||
versions: pkgVersion,
|
||||
rollout: rollout,
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
|
||||
if (versionId !== undefined) {
|
||||
await put(`/app/${appId}/package/${pkgId}`, {
|
||||
versionId,
|
||||
});
|
||||
console.log(
|
||||
`${t('versionBind', {
|
||||
version: versionId,
|
||||
nativeVersion: pkgVersion,
|
||||
id: pkgId,
|
||||
})}`,
|
||||
);
|
||||
}
|
||||
console.log(t('operationSuccess'));
|
||||
},
|
||||
updateVersionInfo: async ({
|
||||
args,
|
||||
options,
|
||||
}: {
|
||||
args: string[];
|
||||
options: CommandOptions;
|
||||
}) => {
|
||||
const platform = checkPlatform(
|
||||
options.platform ||
|
||||
((await question('平台(ios/android/harmony):')) as Platform),
|
||||
);
|
||||
const { appId } = await getSelectedApp(platform);
|
||||
const versionId = options.versionId || (await chooseVersion(appId)).id;
|
||||
|
||||
const updateParams: Record<string, string> = {};
|
||||
if (options.name) updateParams.name = options.name;
|
||||
if (options.description) updateParams.description = options.description;
|
||||
if (options.metaInfo) updateParams.metaInfo = options.metaInfo;
|
||||
|
||||
await put(`/app/${appId}/version/${versionId}`, updateParams);
|
||||
console.log(t('operationSuccess'));
|
||||
},
|
||||
};
|
75
tsconfig.json
Normal file
75
tsconfig.json
Normal file
@@ -0,0 +1,75 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
/* Basic Options */
|
||||
"target": "ESNext" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */,
|
||||
"module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
|
||||
"lib": [
|
||||
"ESNext"
|
||||
] /* Specify library files to be included in the compilation. */,
|
||||
"allowJs": true /* Allow javascript files to be compiled. */,
|
||||
// "checkJs": true /* Report errors in .js files. */,
|
||||
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
|
||||
// "declaration": true, /* Generates corresponding '.d.ts' file. */
|
||||
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
|
||||
// "sourceMap": true, /* Generates corresponding '.map' file. */
|
||||
// "outFile": "./", /* Concatenate and emit output to single file. */
|
||||
// "outDir": "lib" /* Redirect output structure to the directory. */,
|
||||
// "rootDir": "src" /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */,
|
||||
// "composite": true, /* Enable project compilation */
|
||||
// "removeComments": true, /* Do not emit comments to output. */
|
||||
"noEmit": true /* Do not emit outputs. */,
|
||||
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
|
||||
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
|
||||
"isolatedModules": true /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */,
|
||||
|
||||
/* Strict Type-Checking Options */
|
||||
"strict": true /* Enable all strict type-checking options. */,
|
||||
"noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
|
||||
"strictNullChecks": true /* Enable strict null checks. */,
|
||||
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
|
||||
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
|
||||
"noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
|
||||
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
|
||||
|
||||
/* Additional Checks */
|
||||
// "noUnusedLocals": true /* Report errors on unused locals. */,
|
||||
// "noUnusedParameters": true /* Report errors on unused parameters. */,
|
||||
"noImplicitReturns": false /* Report error when not all code paths in function return a value. */,
|
||||
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
|
||||
|
||||
/* Module Resolution Options */
|
||||
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
|
||||
"baseUrl": "./src" /* Base directory to resolve non-absolute module names. */,
|
||||
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
|
||||
// "rootDirs": [
|
||||
// "src",
|
||||
// "db",
|
||||
// "config",
|
||||
// "models"
|
||||
// ] /* List of root folders whose combined content represents the structure of the project at runtime. */,
|
||||
"typeRoots": [
|
||||
"src/types"
|
||||
] /* List of folders to include type definitions from. */,
|
||||
// "types": [], /* Type declaration files to be included in compilation. */
|
||||
"allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
|
||||
"paths": {
|
||||
"@/*": ["src/*"]
|
||||
},
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
|
||||
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
|
||||
|
||||
/* Source Map Options */
|
||||
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
|
||||
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
||||
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
|
||||
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
|
||||
|
||||
/* Experimental Options */
|
||||
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
|
||||
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
|
||||
"skipLibCheck": true,
|
||||
"incremental": true
|
||||
},
|
||||
"exclude": ["node_modules", "lib"]
|
||||
}
|
Reference in New Issue
Block a user