@capgo/cli 5.0.0-alpha.3 → 5.0.0

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 (59) hide show
  1. package/README.md +197 -37
  2. package/dist/index.js +327 -65172
  3. package/dist/package.json +83 -0
  4. package/package.json +48 -61
  5. package/.eslintignore +0 -4
  6. package/.github/FUNDING.yml +0 -1
  7. package/.github/workflows/build.yml +0 -46
  8. package/.github/workflows/bump_version.yml +0 -56
  9. package/.github/workflows/test.yml +0 -30
  10. package/.prettierignore +0 -6
  11. package/.vscode/launch.json +0 -23
  12. package/.vscode/settings.json +0 -5
  13. package/.vscode/tasks.json +0 -42
  14. package/CHANGELOG.md +0 -2727
  15. package/build.mjs +0 -23
  16. package/bun.lockb +0 -0
  17. package/capacitor.config.ts +0 -33
  18. package/crypto_explained.png +0 -0
  19. package/eslint.config.js +0 -3
  20. package/renovate.json +0 -23
  21. package/src/api/app.ts +0 -75
  22. package/src/api/channels.ts +0 -142
  23. package/src/api/crypto.ts +0 -121
  24. package/src/api/devices_override.ts +0 -41
  25. package/src/api/update.ts +0 -12
  26. package/src/api/versions.ts +0 -98
  27. package/src/app/add.ts +0 -154
  28. package/src/app/debug.ts +0 -214
  29. package/src/app/delete.ts +0 -68
  30. package/src/app/info.ts +0 -87
  31. package/src/app/list.ts +0 -63
  32. package/src/app/set.ts +0 -94
  33. package/src/bundle/check.ts +0 -42
  34. package/src/bundle/cleanup.ts +0 -128
  35. package/src/bundle/compatibility.ts +0 -70
  36. package/src/bundle/decrypt.ts +0 -65
  37. package/src/bundle/delete.ts +0 -53
  38. package/src/bundle/encrypt.ts +0 -69
  39. package/src/bundle/list.ts +0 -43
  40. package/src/bundle/unlink.ts +0 -80
  41. package/src/bundle/upload.ts +0 -434
  42. package/src/bundle/zip.ts +0 -137
  43. package/src/channel/add.ts +0 -73
  44. package/src/channel/currentBundle.ts +0 -73
  45. package/src/channel/delete.ts +0 -51
  46. package/src/channel/list.ts +0 -49
  47. package/src/channel/set.ts +0 -171
  48. package/src/index.ts +0 -285
  49. package/src/init.ts +0 -301
  50. package/src/key.ts +0 -158
  51. package/src/login.ts +0 -66
  52. package/src/types/capacitor__cli.d.ts +0 -6
  53. package/src/types/supabase.types.ts +0 -2065
  54. package/src/utils.ts +0 -719
  55. package/test/chunk_convert.ts +0 -28
  56. package/test/data.ts +0 -18769
  57. package/test/test_headers_rls.ts +0 -24
  58. package/test/test_semver.ts +0 -13
  59. package/tsconfig.json +0 -39
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@capgo/cli",
3
+ "version": "5.0.0",
4
+ "description": "A CLI to upload to capgo servers",
5
+ "author": "github.com/riderx",
6
+ "license": "Apache 2.0",
7
+ "homepage": "https://github.com/Cap-go/CLIl#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/Cap-go/CLI.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/Cap-go/CLI/issues"
14
+ },
15
+ "keywords": [
16
+ "appflow alternative",
17
+ "ionic",
18
+ "capacitor",
19
+ "auto update",
20
+ "live update",
21
+ "capgo",
22
+ "cli",
23
+ "upload",
24
+ "capgo-cli"
25
+ ],
26
+ "main": "dist/index.js",
27
+ "bin": {
28
+ "capgo": "dist/index.js"
29
+ },
30
+ "engines": {
31
+ "npm": ">=8.0.0",
32
+ "node": ">=20.0.0"
33
+ },
34
+ "scripts": {
35
+ "build": "tsc && node build.mjs",
36
+ "dev": "NODE_ENV=development ncc build",
37
+ "no-debug": "node dist/index.js",
38
+ "test": "npx --yes ts-node -T src/index.ts",
39
+ "dev-build": "SUPA_DB=development ncc build",
40
+ "pack": "pkg",
41
+ "types": "npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",
42
+ "test_rls": "ts-node ./test/test_headers_rls.ts",
43
+ "lint": "eslint \"src/**/*.ts\" --fix",
44
+ "check-posix-paths": "node test/check-posix-paths.js"
45
+ },
46
+ "devDependencies": {
47
+ "@antfu/eslint-config": "^4.1.1",
48
+ "@bradenmacdonald/s3-lite-client": "npm:@jsr/bradenmacdonald__s3-lite-client",
49
+ "@capacitor/cli": "^7.0.1",
50
+ "@capgo/find-package-manager": "^0.0.17",
51
+ "@clack/prompts": "^0.9.1",
52
+ "@sauber/table": "npm:@jsr/sauber__table",
53
+ "@std/semver": "npm:@jsr/std__semver",
54
+ "@supabase/supabase-js": "^2.48.1",
55
+ "@tomasklaen/checksum": "^1.1.0",
56
+ "@types/adm-zip": "^0.5.7",
57
+ "@types/node": "^22.13.0",
58
+ "@types/prettyjson": "^0.0.33",
59
+ "@types/semver": "7.5.8",
60
+ "@types/tmp": "^0.2.6",
61
+ "@vercel/ncc": "^0.38.3",
62
+ "adm-zip": "^0.5.16",
63
+ "ci-info": "^4.1.0",
64
+ "commander": "13.0.0",
65
+ "esbuild": "^0.24.2",
66
+ "eslint": "9.18.0",
67
+ "git-format-staged": "3.1.1",
68
+ "husky": "^9.1.7",
69
+ "is-wsl": "^3.1.0",
70
+ "ky": "^1.7.4",
71
+ "latest-version": "^9.0.0",
72
+ "open": "^10.1.0",
73
+ "pkg": "5.8.1",
74
+ "prettyjson": "^1.2.5",
75
+ "semver": "^7.6.3",
76
+ "tmp": "^0.2.3",
77
+ "ts-loader": "^9.5.2",
78
+ "ts-node": "^10.9.2",
79
+ "tsconfig-paths": "4.2.0",
80
+ "tus-js-client": "^4.3.1",
81
+ "typescript": "5.7.3"
82
+ }
83
+ }
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0",
4
4
  "description": "A CLI to upload to capgo servers",
5
- "main": "dist/index.js",
6
- "bin": {
7
- "capgo": "dist/index.js"
8
- },
5
+ "author": "github.com/riderx",
6
+ "license": "Apache 2.0",
7
+ "homepage": "https://github.com/Cap-go/CLIl#readme",
9
8
  "repository": {
10
9
  "type": "git",
11
10
  "url": "git+https://github.com/Cap-go/CLI.git"
@@ -13,11 +12,6 @@
13
12
  "bugs": {
14
13
  "url": "https://github.com/Cap-go/CLI/issues"
15
14
  },
16
- "homepage": "https://github.com/Cap-go/CLIl#readme",
17
- "engines": {
18
- "npm": ">=8.0.0",
19
- "node": ">=20.0.0"
20
- },
21
15
  "keywords": [
22
16
  "appflow alternative",
23
17
  "ionic",
@@ -29,68 +23,61 @@
29
23
  "upload",
30
24
  "capgo-cli"
31
25
  ],
26
+ "main": "dist/index.js",
27
+ "bin": {
28
+ "capgo": "dist/index.js"
29
+ },
30
+ "engines": {
31
+ "npm": ">=8.0.0",
32
+ "node": ">=20.0.0"
33
+ },
32
34
  "scripts": {
33
- "build": "node build.mjs",
34
- "dev": "NODE_ENV=development node build.mjs",
35
+ "build": "tsc && node build.mjs",
36
+ "dev": "NODE_ENV=development ncc build",
35
37
  "no-debug": "node dist/index.js",
36
38
  "test": "npx --yes ts-node -T src/index.ts",
37
- "dev-build": "SUPA_DB=development node build.mjs",
39
+ "dev-build": "SUPA_DB=development ncc build",
38
40
  "pack": "pkg",
39
41
  "types": "npx --yes supabase gen types typescript --project-id=xvwzpoazmxkqosrdewyv > src/types/supabase.types.ts",
40
42
  "test_rls": "ts-node ./test/test_headers_rls.ts",
41
- "lint": "eslint \"src/**/*.ts\" --fix"
42
- },
43
- "author": "github.com/riderx",
44
- "license": "Apache 2.0",
45
- "dependencies": {
46
- "@capacitor/cli": "5.7.0",
47
- "@capgo/find-package-manager": "0.0.10",
48
- "@clack/prompts": "^0.7.0",
49
- "@supabase/supabase-js": "^2.39.3",
50
- "@tomasklaen/checksum": "^1.1.0",
51
- "@trufflesuite/spinnies": "^0.1.1",
52
- "adm-zip": "^0.5.10",
53
- "ci-info": "^4.0.0",
54
- "commander": "12.0.0",
55
- "console-table-printer": "^2.12.0",
56
- "get-latest-version": "^5.1.0",
57
- "ky": "^1.2.0",
58
- "logsnag": "1.0.0",
59
- "mime": "^4.0.1",
60
- "node-dir": "^0.1.17",
61
- "open": "^10.0.3",
62
- "prettyjson": "^1.2.5",
63
- "prompt-sync": "^4.2.0",
64
- "qrcode": "^1.5.3",
65
- "semver": "^7.6.0"
43
+ "lint": "eslint \"src/**/*.ts\" --fix",
44
+ "check-posix-paths": "node test/check-posix-paths.js"
66
45
  },
67
46
  "devDependencies": {
68
- "@antfu/eslint-config": "^2.6.4",
69
- "@types/adm-zip": "0.5.5",
70
- "@types/mime": "^3.0.4",
71
- "@types/node": "^20.11.17",
72
- "@types/node-dir": "^0.0.37",
73
- "@types/npmcli__ci-detect": "^2.0.3",
47
+ "@antfu/eslint-config": "^4.1.1",
48
+ "@bradenmacdonald/s3-lite-client": "npm:@jsr/bradenmacdonald__s3-lite-client",
49
+ "@capacitor/cli": "^7.0.1",
50
+ "@capgo/find-package-manager": "^0.0.17",
51
+ "@clack/prompts": "^0.9.1",
52
+ "@sauber/table": "npm:@jsr/sauber__table",
53
+ "@std/semver": "npm:@jsr/std__semver",
54
+ "@supabase/supabase-js": "^2.48.1",
55
+ "@tomasklaen/checksum": "^1.1.0",
56
+ "@types/adm-zip": "^0.5.7",
57
+ "@types/node": "^22.13.0",
74
58
  "@types/prettyjson": "^0.0.33",
75
- "@types/prompt-sync": "^4.2.3",
76
- "@types/qrcode": "^1.5.5",
77
- "@types/semver": "^7.5.6",
78
- "@typescript-eslint/eslint-plugin": "6.21.0",
79
- "@typescript-eslint/parser": "6.21.0",
80
- "esbuild": "^0.20.0",
81
- "eslint": "8.56.0",
82
- "eslint-config-airbnb-base": "^15.0.0",
83
- "eslint-config-prettier": "^9.1.0",
84
- "eslint-import-resolver-typescript": "3.6.1",
85
- "eslint-plugin-import": "2.29.1",
86
- "eslint-plugin-prettier": "^5.1.3",
87
- "git-format-staged": "3.0.0",
88
- "husky": "^9.0.10",
59
+ "@types/semver": "7.5.8",
60
+ "@types/tmp": "^0.2.6",
61
+ "@vercel/ncc": "^0.38.3",
62
+ "adm-zip": "^0.5.16",
63
+ "ci-info": "^4.1.0",
64
+ "commander": "13.0.0",
65
+ "esbuild": "^0.24.2",
66
+ "eslint": "9.18.0",
67
+ "git-format-staged": "3.1.1",
68
+ "husky": "^9.1.7",
69
+ "is-wsl": "^3.1.0",
70
+ "ky": "^1.7.4",
71
+ "latest-version": "^9.0.0",
72
+ "open": "^10.1.0",
89
73
  "pkg": "5.8.1",
90
- "prettier": "3.2.5",
91
- "ts-loader": "^9.5.1",
74
+ "prettyjson": "^1.2.5",
75
+ "semver": "^7.6.3",
76
+ "tmp": "^0.2.3",
77
+ "ts-loader": "^9.5.2",
92
78
  "ts-node": "^10.9.2",
93
79
  "tsconfig-paths": "4.2.0",
94
- "typescript": "5.3.3"
80
+ "tus-js-client": "^4.3.1",
81
+ "typescript": "5.7.3"
95
82
  }
96
83
  }
package/.eslintignore DELETED
@@ -1,4 +0,0 @@
1
- dist
2
- test
3
- webpack.config.js
4
- src/types/types_supabase.ts
@@ -1 +0,0 @@
1
- github: riderx
@@ -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.1.1
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.1.1
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.1.1
52
- with:
53
- bun-version: latest
54
- - name: Install dependencies
55
- id: install_code
56
- run: bun install --frozen-lockfile
@@ -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.1.1
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,5 +0,0 @@
1
- {
2
- "editor.formatOnSave": true,
3
- "javascript.format.enable": false,
4
- "nuxt.isNuxtApp": false
5
- }
@@ -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
- }