@capgo/cli 4.13.2 → 4.13.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/index.js +103 -103
  2. package/package.json +1 -1
  3. package/.github/FUNDING.yml +0 -1
  4. package/.github/workflows/autofix.yml +0 -25
  5. package/.github/workflows/build.yml +0 -46
  6. package/.github/workflows/bump_version.yml +0 -56
  7. package/.github/workflows/check_posix_paths.yml +0 -229
  8. package/.github/workflows/test.yml +0 -30
  9. package/.prettierignore +0 -6
  10. package/.vscode/launch.json +0 -23
  11. package/.vscode/settings.json +0 -46
  12. package/.vscode/tasks.json +0 -42
  13. package/CHANGELOG.md +0 -3392
  14. package/build.mjs +0 -21
  15. package/bun.lockb +0 -0
  16. package/bunfig.toml +0 -2
  17. package/capacitor.config.ts +0 -33
  18. package/crypto_explained.png +0 -0
  19. package/eslint.config.js +0 -10
  20. package/renovate.json +0 -23
  21. package/src/api/app.ts +0 -55
  22. package/src/api/channels.ts +0 -163
  23. package/src/api/crypto.ts +0 -116
  24. package/src/api/devices_override.ts +0 -41
  25. package/src/api/update.ts +0 -13
  26. package/src/api/versions.ts +0 -101
  27. package/src/app/add.ts +0 -157
  28. package/src/app/debug.ts +0 -258
  29. package/src/app/delete.ts +0 -110
  30. package/src/app/info.ts +0 -99
  31. package/src/app/list.ts +0 -67
  32. package/src/app/set.ts +0 -96
  33. package/src/bundle/check.ts +0 -42
  34. package/src/bundle/cleanup.ts +0 -123
  35. package/src/bundle/compatibility.ts +0 -70
  36. package/src/bundle/decrypt.ts +0 -54
  37. package/src/bundle/delete.ts +0 -52
  38. package/src/bundle/encrypt.ts +0 -60
  39. package/src/bundle/list.ts +0 -42
  40. package/src/bundle/unlink.ts +0 -88
  41. package/src/bundle/upload.ts +0 -552
  42. package/src/bundle/zip.ts +0 -145
  43. package/src/channel/add.ts +0 -80
  44. package/src/channel/currentBundle.ts +0 -72
  45. package/src/channel/delete.ts +0 -57
  46. package/src/channel/list.ts +0 -49
  47. package/src/channel/set.ts +0 -179
  48. package/src/config/index.ts +0 -156
  49. package/src/index.ts +0 -310
  50. package/src/init.ts +0 -495
  51. package/src/key.ts +0 -135
  52. package/src/login.ts +0 -70
  53. package/src/types/capacitor__cli.d.ts +0 -6
  54. package/src/types/supabase.types.ts +0 -2123
  55. package/src/user/account.ts +0 -11
  56. package/src/utils.ts +0 -1076
  57. package/test/VerifyZip.java +0 -83
  58. package/test/check-posix-paths.js +0 -21
  59. package/test/chunk_convert.ts +0 -28
  60. package/test/data.ts +0 -18769
  61. package/test/test_headers_rls.ts +0 -24
  62. package/test/test_semver.ts +0 -13
  63. package/test/test_upload/app.js +0 -3
  64. package/test/test_upload/assets/check-posix-paths.js +0 -21
  65. package/test/test_upload/index.html +0 -0
  66. package/test/test_zip_swift/Package.resolved +0 -24
  67. package/test/test_zip_swift/Package.swift +0 -29
  68. package/test/test_zip_swift/Sources/main.swift +0 -80
  69. package/tsconfig.json +0 -39
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.13.2",
3
+ "version": "4.13.4",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "github.com/riderx",
6
6
  "license": "Apache 2.0",
@@ -1 +0,0 @@
1
- github: riderx
@@ -1,25 +0,0 @@
1
- name: autofix.ci # needed to securely identify the workflow
2
-
3
- on:
4
- pull_request:
5
- push:
6
- branches: [ "main" ]
7
- permissions:
8
- contents: read
9
-
10
- jobs:
11
- autofix:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - name: Checkout
15
- uses: actions/checkout@v4
16
- - name: Setup bun
17
- uses: oven-sh/setup-bun@v1.1.1
18
- with:
19
- bun-version: latest
20
- - name: Install dependencies
21
- run: bun install
22
- - name: Lint
23
- id: lint_code
24
- run: npm run lint
25
- - uses: autofix-ci/action@dd55f44df8f7cdb7a6bf74c78677eb8acd40cd0a
@@ -1,46 +0,0 @@
1
- name: Build source code and send to Capgo
2
-
3
- on:
4
- push:
5
- tags:
6
- - "*"
7
-
8
- jobs:
9
- deploy:
10
- runs-on: ubuntu-latest
11
- name: "Build code and release"
12
- permissions:
13
- contents: read
14
- id-token: write
15
- steps:
16
- - name: Checkout
17
- uses: actions/checkout@v4
18
- with:
19
- fetch-depth: 0
20
- - name: Setup bun
21
- uses: oven-sh/setup-bun@v1.2.2
22
- with:
23
- bun-version: latest
24
- - name: Install dependencies
25
- id: install_code
26
- run: bun install --frozen-lockfile
27
- - name: Lint
28
- id: lint_code
29
- run: bun lint
30
- - name: Build
31
- id: build_code
32
- run: bun run build
33
- - name: Run
34
- id: run_cli
35
- run: node dist/index.js --help
36
- - uses: JS-DevTools/npm-publish@v3
37
- if: ${{ !contains(github.ref, '-alpha.') }}
38
- with:
39
- token: ${{ secrets.NPM_TOKEN }}
40
- provenance: true
41
- - uses: JS-DevTools/npm-publish@v3
42
- if: ${{ contains(github.ref, '-alpha.') }}
43
- with:
44
- token: ${{ secrets.NPM_TOKEN }}
45
- tag: next
46
- provenance: true
@@ -1,56 +0,0 @@
1
- name: Bump version
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - development
8
-
9
- jobs:
10
- bump-version:
11
- if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
12
- runs-on: ubuntu-latest
13
- name: "Bump version and create changelog with standard version"
14
- steps:
15
- - name: Checkout
16
- uses: actions/checkout@v4
17
- with:
18
- fetch-depth: 0
19
- token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
20
- - name: Setup bun
21
- uses: oven-sh/setup-bun@v1.2.2
22
- with:
23
- bun-version: latest
24
- - name: Install dependencies
25
- id: install_code
26
- run: bun install --frozen-lockfile
27
- - name: Git config
28
- run: |
29
- git config --local user.name "github-actions[bot]"
30
- git config --local user.email "github-actions[bot]@users.noreply.github.com"
31
- - name: Create bump and changelog main
32
- if: github.ref == 'refs/heads/main'
33
- run: npx standard-version
34
- - name: Create bump and changelog development
35
- if: github.ref != 'refs/heads/main'
36
- run: npx standard-version --prerelease alpha
37
- - name: Push to origin
38
- run: |
39
- CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
40
- remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
41
- git pull $remote_repo $CURRENT_BRANCH
42
- git push $remote_repo HEAD:$CURRENT_BRANCH --follow-tags --tags
43
- create-cache:
44
- if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
45
- runs-on: ubuntu-latest
46
- name: "Create global cache on main branch"
47
- steps:
48
- - name: Checkout
49
- uses: actions/checkout@v4
50
- - name: Setup bun
51
- uses: oven-sh/setup-bun@v1.2.2
52
- with:
53
- bun-version: latest
54
- - name: Install dependencies
55
- id: install_code
56
- run: bun install --frozen-lockfile
@@ -1,229 +0,0 @@
1
- name: Check POSIX Paths in Zip File
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- pull_request:
8
- branches:
9
- - main
10
-
11
- jobs:
12
- create-valid-zip-linux:
13
- if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
14
- runs-on: ubuntu-latest
15
-
16
- steps:
17
- - name: Checkout repository
18
- uses: actions/checkout@v4
19
-
20
- - name: Setup bun
21
- uses: oven-sh/setup-bun@v1.2.2
22
- with:
23
- bun-version: latest
24
-
25
- - name: Install dependencies
26
- id: install_code
27
- run: bun install --frozen-lockfile
28
-
29
- - name: Build code
30
- id: build_code
31
- run: bun run build
32
-
33
- - name: Create a valid zip test
34
- id: create_zip
35
- run: node ./dist/index.js bundle zip --path test/test_upload -n build-linux.zip
36
-
37
- - name: Check build directory contents
38
- run: |
39
- echo "Listing contents of the build directory..."
40
- ls -R ./dist
41
-
42
- - name: Check ZIP file contents
43
- run: |
44
- echo "Listing contents of the ZIP file..."
45
- unzip -l build-linux.zip
46
-
47
- - name: Upload build-linux.zip artifact
48
- uses: actions/upload-artifact@v4
49
- with:
50
- name: build-zip-linux
51
- path: build-linux.zip
52
-
53
- check-posix-paths-windows:
54
- runs-on: ${{ matrix.os }}
55
- if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
56
-
57
- strategy:
58
- matrix:
59
- os: [windows-2019, windows-2022]
60
-
61
- steps:
62
- - name: Checkout repository
63
- uses: actions/checkout@v4
64
-
65
- - name: Setup bun
66
- uses: oven-sh/setup-bun@v1.2.2
67
- with:
68
- bun-version: latest
69
-
70
- - name: Install dependencies
71
- id: install_code
72
- run: bun install --frozen-lockfile
73
-
74
- - name: Build code
75
- id: build_code
76
- run: bun run build
77
-
78
- - name: Create a zip test
79
- id: create_zip
80
- run: node ./dist/index.js bundle zip --path test/test_upload -n build-${{ matrix.os }}.zip
81
-
82
- - name: Upload build.zip artifact
83
- uses: actions/upload-artifact@v4
84
- with:
85
- name: build-zip-${{ matrix.os }}
86
- path: build-${{ matrix.os }}.zip
87
-
88
- check-posix-paths-unix:
89
- runs-on: ubuntu-latest
90
- needs: [create-valid-zip-linux, check-posix-paths-windows]
91
-
92
- steps:
93
- - name: Checkout repository
94
- uses: actions/checkout@v4
95
-
96
- - name: Download build-linux.zip artifact
97
- uses: actions/download-artifact@v4
98
- with:
99
- name: build-zip-linux
100
-
101
- - name: List the files
102
- run: ls -lh
103
-
104
- - name: Check file size of Linux build
105
- run: ls -lh build-linux.zip
106
-
107
- - name: Verify ZIP file integrity for Linux build with zipinfo
108
- run: |
109
- echo "Verifying ZIP file integrity for Linux build with zipinfo..."
110
- zipinfo ./build-linux.zip || (echo "ZIP file is corrupted: build-linux.zip" && exit 1)
111
-
112
- - name: Verify POSIX paths for Linux build
113
- run: |
114
- unzip build-linux.zip -d extracted-linux
115
- if find extracted-linux -type f | grep -qE '\\\\'; then
116
- echo "Non-POSIX paths detected in build-linux.zip."
117
- exit 1
118
- else
119
- echo "All paths are POSIX compliant in build-linux.zip."
120
- fi
121
-
122
- - name: Setup Java
123
- uses: actions/setup-java@v4
124
- with:
125
- distribution: 'zulu'
126
- java-version: '17'
127
-
128
- - name: Compile VerifyZip.java
129
- run: javac ./test/VerifyZip.java
130
-
131
- - name: Verify ZIP file integrity for Linux build with Java
132
- run: java -cp ./test VerifyZip build-linux.zip
133
-
134
- - name: Download build-windows-2019.zip artifact
135
- uses: actions/download-artifact@v4
136
- with:
137
- name: build-zip-windows-2019
138
-
139
- - name: Download build-windows-2022.zip artifact
140
- uses: actions/download-artifact@v4
141
- with:
142
- name: build-zip-windows-2022
143
-
144
- - name: List the files
145
- run: ls -lh
146
-
147
- - name: Check file sizes of Windows builds
148
- run: |
149
- echo "Checking file sizes..."
150
- ls -lh build-windows-2019.zip
151
- ls -lh build-windows-2022.zip
152
-
153
- - name: Verify ZIP file integrity for Windows 2019 build with zipinfo
154
- run: |
155
- echo "Verifying ZIP file integrity for Windows 2019 build with zipinfo..."
156
- zipinfo ./build-windows-2019.zip || (echo "ZIP file is corrupted: build-windows-2019.zip" && exit 1)
157
-
158
- - name: Verify ZIP file integrity for Windows 2022 build with zipinfo
159
- run: |
160
- echo "Verifying ZIP file integrity for Windows 2022 build with zipinfo..."
161
- zipinfo ./build-windows-2022.zip || (echo "ZIP file is corrupted: build-windows-2022.zip" && exit 1)
162
-
163
- - name: Verify POSIX paths for Windows 2019 build
164
- run: |
165
- unzip build-windows-2019.zip -d extracted-2019
166
- if find extracted-2019 -type f | grep -qE '\\\\'; then
167
- echo "Non-POSIX paths detected in build-windows-2019.zip."
168
- exit 1
169
- else
170
- echo "All paths are POSIX compliant in build-windows-2019.zip."
171
- fi
172
-
173
- - name: Verify POSIX paths for Windows 2022 build
174
- run: |
175
- unzip build-windows-2022.zip -d extracted-2022
176
- if find extracted-2022 -type f | grep -qE '\\\\'; then
177
- echo "Non-POSIX paths detected in build-windows-2022.zip."
178
- exit 1
179
- else
180
- echo "All paths are POSIX compliant in build-windows-2022.zip."
181
- fi
182
-
183
- - name: Verify ZIP file integrity for Windows 2019 build with Java
184
- run: java -cp ./test VerifyZip build-windows-2019.zip
185
-
186
- - name: Verify ZIP file integrity for Windows 2022 build with Java
187
- run: java -cp ./test VerifyZip build-windows-2022.zip
188
-
189
- check-posix-paths-macos:
190
- runs-on: macos-latest
191
- needs: [create-valid-zip-linux, check-posix-paths-windows]
192
-
193
- steps:
194
- - name: Checkout repository
195
- uses: actions/checkout@v4
196
-
197
- - name: Download build-linux.zip artifact
198
- uses: actions/download-artifact@v4
199
- with:
200
- name: build-zip-linux
201
-
202
- - name: Download build-windows-2019.zip artifact
203
- uses: actions/download-artifact@v4
204
- with:
205
- name: build-zip-windows-2019
206
-
207
- - name: Download build-windows-2022.zip artifact
208
- uses: actions/download-artifact@v4
209
- with:
210
- name: build-zip-windows-2022
211
-
212
- - name: List the files
213
- run: ls -lh
214
-
215
- - name: Check file size of Linux build
216
- run: ls -lh build-linux.zip
217
-
218
- - name: Setup Swift
219
- uses: swift-actions/setup-swift@v2
220
-
221
- - name: Get swift version
222
- run: swift --version # Swift 5.10
223
-
224
- - name: Compile test executable
225
- run: swift build -c release
226
- working-directory: ./test/test_zip_swift/
227
-
228
- - name: Run the swift test
229
- run: ./test/test_zip_swift/.build/release/MyCLI --zip-files build-linux.zip build-windows-2019.zip build-windows-2022.zip
@@ -1,30 +0,0 @@
1
- name: Build source code and test it
2
-
3
- on:
4
- push:
5
- branches:
6
- - renovate/**
7
-
8
- jobs:
9
- web:
10
- runs-on: ubuntu-latest
11
- name: "Build code and test"
12
- steps:
13
- - name: Check out
14
- uses: actions/checkout@v4
15
- - name: Setup bun
16
- uses: oven-sh/setup-bun@v1.2.2
17
- with:
18
- bun-version: latest
19
- - name: Install dependencies
20
- id: install_code
21
- run: bun install --frozen-lockfile
22
- - name: Lint
23
- id: lint_code
24
- run: bun run lint
25
- - name: Build
26
- id: build_code
27
- run: bun run build
28
- - name: Run
29
- id: run_cli
30
- run: node dist/index.js --help
package/.prettierignore DELETED
@@ -1,6 +0,0 @@
1
- dist
2
- __tests__/data
3
- __tests__/fixtures
4
- coverage
5
- output
6
- sample
@@ -1,23 +0,0 @@
1
- {
2
- // Use IntelliSense to learn about possible attributes.
3
- // Hover to view descriptions of existing attributes.
4
- // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
- "version": "0.2.0",
6
-
7
- "configurations": [
8
- {
9
- "type": "node",
10
- "request": "launch",
11
- "name": "Launch",
12
- "program": "${workspaceFolder}/dist/index.js",
13
- "args": ["-u", "Edwin Hubble", "-w", "y"]
14
- },
15
- {
16
- "type": "node",
17
- "request": "launch",
18
- "name": "Launch with other params",
19
- "program": "${workspaceFolder}/dist/index.js",
20
- "args": ["-u", "Enrico Fermi", "-w", "y"]
21
- }
22
- ]
23
- }
@@ -1,46 +0,0 @@
1
- {
2
- // Enable the ESlint flat config support
3
- "eslint.experimental.useFlatConfig": true,
4
-
5
- // Disable the default formatter, use eslint instead
6
- "prettier.enable": false,
7
- "editor.formatOnSave": false,
8
- "javascript.format.enable": false,
9
-
10
- // Auto fix
11
- "editor.codeActionsOnSave": {
12
- "source.fixAll.eslint": "explicit",
13
- "source.organizeImports": "never"
14
- },
15
-
16
- // Silent the stylistic rules in you IDE, but still auto fix them
17
- "eslint.rules.customizations": [
18
- { "rule": "style/*", "severity": "off" },
19
- { "rule": "format/*", "severity": "off" },
20
- { "rule": "*-indent", "severity": "off" },
21
- { "rule": "*-spacing", "severity": "off" },
22
- { "rule": "*-spaces", "severity": "off" },
23
- { "rule": "*-order", "severity": "off" },
24
- { "rule": "*-dangle", "severity": "off" },
25
- { "rule": "*-newline", "severity": "off" },
26
- { "rule": "*quotes", "severity": "off" },
27
- { "rule": "*semi", "severity": "off" }
28
- ],
29
-
30
- // Enable eslint for all supported languages
31
- "eslint.validate": [
32
- "javascript",
33
- "javascriptreact",
34
- "typescript",
35
- "typescriptreact",
36
- "vue",
37
- "html",
38
- "markdown",
39
- "json",
40
- "jsonc",
41
- "yaml",
42
- "toml",
43
- "gql",
44
- "graphql"
45
- ]
46
- }
@@ -1,42 +0,0 @@
1
- {
2
- // See https://go.microsoft.com/fwlink/?LinkId=733558
3
- // for the documentation about the tasks.json format
4
- "version": "2.0.0",
5
- "tasks": [
6
- {
7
- "type": "typescript",
8
- "tsconfig": "tsconfig.json",
9
- "problemMatcher": ["$tsc"],
10
- "group": "build"
11
- },
12
- {
13
- "type": "shell",
14
- "label": "webpack dev",
15
- "command": "npx",
16
- "options": {
17
- "env": {
18
- "NODE_ENV": "development"
19
- }
20
- },
21
- "isBackground": true,
22
- "args": ["webpack", "--config webpack.config.js"],
23
- "problemMatcher": [
24
- {
25
- "pattern": [
26
- {
27
- "regexp": ".",
28
- "file": 1,
29
- "location": 2,
30
- "message": 3
31
- }
32
- ],
33
- "background": {
34
- "activeOnStart": true,
35
- "beginsPattern": ".",
36
- "endsPattern": ".",
37
- }
38
- }
39
- ]
40
- }
41
- ]
42
- }