@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
@@ -1,28 +0,0 @@
1
- import { lorem } from './data'
2
-
3
- const byteConvert = {
4
- 'base64': (s: string) => (3 * (s.length / 4)) - ((s.match(/=/g) || []).length),
5
- 'hex': (s: string) => s.length / 2,
6
- 'binary': (s: string) => s.length / 10,
7
- 'utf8': (s: string) => s.length,
8
- }
9
- const mbConvert = {
10
- 'base64': (l: number) => (3 * (l / 4)),
11
- 'hex': (l: number) => l / 2,
12
- 'binary': (l: number) => l / 10,
13
- 'utf8': (l: number) => l,
14
- }
15
- const oneMb = 1048576;
16
-
17
- const buff = Buffer.from(lorem)
18
- const b64 = buff.toString('base64')
19
- const hex = buff.toString('hex')
20
- const s = buff.toString('utf8')
21
-
22
- const chuckNumber = (l: number, divider: number) => l < divider ? l : Math.round(l / divider)
23
- const chuckSize = (l: number, divider: number) => Math.round(l / chuckNumber(l, divider))
24
-
25
- console.log('buff', buff.length, buff.byteLength, chuckNumber(buff.length, oneMb), chuckSize(buff.length, oneMb))
26
- console.log('b64', b64.length, byteConvert.base64(b64) / oneMb)
27
- console.log('hex', hex.length, byteConvert.hex(hex) / oneMb)
28
- console.log('string', s.length, byteConvert.utf8(s) / oneMb)