@capgo/cli 4.13.8 → 4.13.9

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 (57) hide show
  1. package/.github/FUNDING.yml +1 -0
  2. package/.github/workflows/build.yml +46 -0
  3. package/.github/workflows/bump_version.yml +56 -0
  4. package/.github/workflows/test.yml +30 -0
  5. package/.prettierignore +6 -0
  6. package/.vscode/launch.json +23 -0
  7. package/.vscode/settings.json +46 -0
  8. package/.vscode/tasks.json +42 -0
  9. package/CHANGELOG.md +2739 -0
  10. package/build.mjs +23 -0
  11. package/bun.lockb +0 -0
  12. package/capacitor.config.ts +33 -0
  13. package/crypto_explained.png +0 -0
  14. package/dist/index.js +114692 -205
  15. package/eslint.config.js +10 -0
  16. package/package.json +33 -32
  17. package/renovate.json +23 -0
  18. package/src/api/app.ts +55 -0
  19. package/src/api/channels.ts +140 -0
  20. package/src/api/crypto.ts +116 -0
  21. package/src/api/devices_override.ts +41 -0
  22. package/src/api/update.ts +13 -0
  23. package/src/api/versions.ts +101 -0
  24. package/src/app/add.ts +158 -0
  25. package/src/app/debug.ts +222 -0
  26. package/src/app/delete.ts +106 -0
  27. package/src/app/info.ts +90 -0
  28. package/src/app/list.ts +67 -0
  29. package/src/app/set.ts +94 -0
  30. package/src/bundle/check.ts +42 -0
  31. package/src/bundle/cleanup.ts +127 -0
  32. package/src/bundle/compatibility.ts +70 -0
  33. package/src/bundle/decrypt.ts +54 -0
  34. package/src/bundle/delete.ts +53 -0
  35. package/src/bundle/encrypt.ts +60 -0
  36. package/src/bundle/list.ts +43 -0
  37. package/src/bundle/unlink.ts +86 -0
  38. package/src/bundle/upload.ts +532 -0
  39. package/src/bundle/zip.ts +139 -0
  40. package/src/channel/add.ts +74 -0
  41. package/src/channel/currentBundle.ts +72 -0
  42. package/src/channel/delete.ts +52 -0
  43. package/src/channel/list.ts +49 -0
  44. package/src/channel/set.ts +178 -0
  45. package/src/index.ts +307 -0
  46. package/src/init.ts +342 -0
  47. package/src/key.ts +131 -0
  48. package/src/login.ts +70 -0
  49. package/src/types/capacitor__cli.d.ts +6 -0
  50. package/src/types/supabase.types.ts +2193 -0
  51. package/src/user/account.ts +11 -0
  52. package/src/utils.ts +956 -0
  53. package/test/chunk_convert.ts +28 -0
  54. package/test/data.ts +18769 -0
  55. package/test/test_headers_rls.ts +24 -0
  56. package/test/test_semver.ts +13 -0
  57. package/tsconfig.json +39 -0
@@ -0,0 +1,24 @@
1
+ import { createClient } from '@supabase/supabase-js'
2
+
3
+ const supaUrl = 'https://aucsybvnhavogdmzwtcw.supabase.co'
4
+ const apikey = '***'
5
+ const anonKey = '***'
6
+ const init = async () => {
7
+ const supabase = createClient(supaUrl, anonKey, {
8
+ global: {
9
+ headers: {
10
+ capgkey: '***',
11
+ }
12
+ }
13
+ })
14
+ const { data: userId } = await supabase
15
+ .rpc('get_user_id', { apikey })
16
+ console.log('userId', userId)
17
+ const apps = await supabase.from('apps')
18
+ .select()
19
+ .eq('app_id', 'ee.forgr.captime')
20
+ console.log('apps', apps.data)
21
+ // try to find one app
22
+ }
23
+
24
+ init()
@@ -0,0 +1,13 @@
1
+ // import semver from 'semver'
2
+
3
+ // eslint-disable-next-line max-len
4
+ const regex = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/
5
+ const bundles = ['20220929.0.0+7c146f40', 'v1.2.3']
6
+ // check if bundle is valid
7
+ for (const bundle of bundles) {
8
+ if (!regex.test(bundle)) {
9
+ console.log(`Your bundle name ${bundle}, is not valid it should follow semver convention : https://semver.org/`);
10
+ } else {
11
+ console.log('valid')
12
+ }
13
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,39 @@
1
+ {
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "forceConsistentCasingInFileNames": true,
5
+ "module": "commonjs",
6
+ "esModuleInterop": true,
7
+ "skipLibCheck": true,
8
+ "resolveJsonModule": true,
9
+ "target": "es6",
10
+ "moduleResolution": "node",
11
+ "sourceMap": true,
12
+ "outDir": "dist",
13
+ "baseUrl": "src",
14
+ "lib": [
15
+ "es2016",
16
+ "dom"
17
+ ],
18
+ "typeRoots": [
19
+ "src/types/*"
20
+ ],
21
+ "paths": {
22
+ "*": [
23
+ "src/types/*"
24
+ ],
25
+ "@capacitor/cli/dist/config": [
26
+ "src/types/capacitor-cli.d.ts"
27
+ ]
28
+ }
29
+ },
30
+ "include": [
31
+ "src/**/*"
32
+ ],
33
+ "exclude": [
34
+ "node_modules",
35
+ "dist",
36
+ "__tests__",
37
+ "**/*.spec.ts"
38
+ ],
39
+ }