@capgo/cli 4.13.2 → 4.13.3

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 +1 -1
  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/src/index.ts DELETED
@@ -1,310 +0,0 @@
1
- import { program } from 'commander'
2
- import pack from '../package.json'
3
- import { getUserId } from './user/account'
4
- import { zipBundle } from './bundle/zip'
5
- import { initApp } from './init'
6
- import { listBundle } from './bundle/list'
7
- import { decryptZip } from './bundle/decrypt'
8
- import { encryptZip } from './bundle/encrypt'
9
- import { addCommand } from './app/add'
10
- import { getInfo } from './app/info'
11
- import { createKeyCommand, saveKeyCommand } from './key'
12
- import { deleteBundle } from './bundle/delete'
13
- import { setChannel } from './channel/set'
14
- import { currentBundle } from './channel/currentBundle'
15
- import { uploadCommand, uploadDeprecatedCommand } from './bundle/upload'
16
- import { loginCommand } from './login'
17
- import { listApp } from './app/list'
18
- import { cleanupBundle } from './bundle/cleanup'
19
- import { addChannelCommand } from './channel/add'
20
- import { deleteChannel } from './channel/delete'
21
- import { listChannels } from './channel/list'
22
- import { setApp } from './app/set'
23
- import { deleteApp } from './app/delete'
24
-
25
- // import { watchApp } from './app/watch';
26
- import { debugApp } from './app/debug'
27
- import { checkCompatibilityCommand } from './bundle/compatibility'
28
-
29
- program
30
- .name(pack.name)
31
- .description('Manage packages and bundle versions in Capgo Cloud')
32
- .version(pack.version)
33
-
34
- program
35
- .command('login [apikey]')
36
- .alias('l')
37
- .description('Save apikey to your machine or folder')
38
- .action(loginCommand)
39
- .option('--local', 'Only save in local folder')
40
-
41
- program
42
- .command('doctor')
43
- .description('Get info about your Capgo app install')
44
- .action(getInfo)
45
-
46
- program
47
- .command('init [apikey] [appId]')
48
- .description('Init a new app')
49
- .action(initApp)
50
- .option('-n, --name <name>', 'app name')
51
- .option('-i, --icon <icon>', 'app icon path')
52
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
53
-
54
- const app = program
55
- .command('app')
56
- .description('Manage app')
57
-
58
- app
59
- .command('add [appId]')
60
- .alias('a')
61
- .description('Add a new app in Capgo Cloud')
62
- .action(addCommand)
63
- .option('-n, --name <name>', 'app name')
64
- .option('-i, --icon <icon>', 'app icon path')
65
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
66
-
67
- app
68
- .command('delete [appId]')
69
- .description('Delete an app in Capgo Cloud')
70
- .action(deleteApp)
71
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
72
-
73
- app
74
- .command('list')
75
- .alias('l')
76
- .description('list apps in Capgo Cloud')
77
- .action(listApp)
78
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
79
-
80
- app
81
- .command('debug [appId]')
82
- .description('Listen for live updates event in Capgo Cloud to debug your app')
83
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
84
- .option('-d, --device <device>', 'the specific device to debug')
85
- .action(debugApp)
86
-
87
- // app
88
- // .command('watch [port]')
89
- // .alias('w')
90
- // .description('watch for changes in your app and allow capgo app or your app to see changes in live')
91
- // .action(watchApp);
92
-
93
- app
94
- .command('set [appId]')
95
- .alias('s')
96
- .description('Set an app in Capgo Cloud')
97
- .action(setApp)
98
- .option('-n, --name <name>', 'app name')
99
- .option('-i, --icon <icon>', 'app icon path')
100
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
101
- .option('-r, --retention <retention>', 'retention period of app bundle in days')
102
-
103
- const bundle = program
104
- .command('bundle')
105
- .description('Manage bundle')
106
-
107
- bundle
108
- .command('upload [appId]')
109
- .alias('u')
110
- .description('Upload a new bundle in Capgo Cloud')
111
- .action(uploadCommand)
112
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
113
- .option('-p, --path <path>', 'path of the folder to upload')
114
- .option('-c, --channel <channel>', 'channel to link to')
115
- .option('-e, --external <url>', 'link to external url intead of upload to Capgo Cloud')
116
- .option('--iv-session-key <key>', 'Set the iv and session key for bundle url external')
117
- .option('--s3-region <region>', 'Region for your S3 bucket')
118
- .option('--s3-apikey <apikey>', 'Apikey for your S3 endpoint')
119
- .option('--s3-apisecret <apisecret>', 'Api secret for your S3 endpoint')
120
- .option('--s3-endoint <s3Endpoint>', 'Url of S3 endpoint')
121
- .option('--s3-bucket-name <bucketName>', 'Name for your AWS S3 bucket')
122
- .option('--s3-port <port>', 'Port for your S3 endpoint')
123
- .option('--no-s3-ssl', 'Disable SSL for S3 upload')
124
- .option('--key <key>', 'custom path for public signing key')
125
- .option('--key-data <keyData>', 'base64 public signing key')
126
- .option('--bundle-url', 'prints bundle url into stdout')
127
- .option('--no-key', 'ignore signing key and send clear update')
128
- .option('--no-code-check', 'Ignore checking if notifyAppReady() is called in soure code and index present in root folder')
129
- .option('--display-iv-session', 'Show in the console the iv and session key used to encrypt the update')
130
- .option('-b, --bundle <bundle>', 'bundle version number of the bundle to upload')
131
- .option(
132
- '--min-update-version <minUpdateVersion>',
133
- 'Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel',
134
- )
135
- .option('--auto-min-update-version', 'Set the min update version based on native packages')
136
- .option('--ignore-metadata-check', 'Ignores the metadata (node_modules) check when uploading')
137
- .option('--ignore-checksum-check', 'Ignores the checksum check when uploading')
138
- .option('--timeout <timeout>', 'Timeout for the upload process in seconds')
139
- .option('--multipart', 'Uses multipart protocol to upload data to S3')
140
-
141
- bundle
142
- .command('compatibility [appId]')
143
- .action(checkCompatibilityCommand)
144
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
145
- .option('-c, --channel <channel>', 'channel to check the compatibility with')
146
- .option('--text', 'output text instead of emojis')
147
-
148
- bundle
149
- .command('delete [bundleId] [appId]')
150
- .alias('d')
151
- .description('Delete a bundle in Capgo Cloud')
152
- .action(deleteBundle)
153
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
154
-
155
- bundle
156
- .command('list [appId]')
157
- .alias('l')
158
- .description('List bundle in Capgo Cloud')
159
- .action(listBundle)
160
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
161
-
162
- // TODO: Fix this command!
163
- // bundle
164
- // .command('unlink [appId]')
165
- // .description('Unlink a bundle in Capgo Cloud')
166
- // .action(listBundle)
167
- // .option('-a, --apikey <apikey>', 'apikey to link to your account')
168
- // .option('-b, --bundle <bundle>', 'bundle version number of the bundle to unlink')
169
-
170
- bundle
171
- .command('cleanup [appId]')
172
- .alias('c')
173
- .action(cleanupBundle)
174
- .description('Cleanup bundle in Capgo Cloud')
175
- .option('-b, --bundle <bundle>', 'bundle version number of the app to delete')
176
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
177
- .option('-k, --keep <keep>', 'number of version to keep')
178
- .option('-f, --force', 'force removal')
179
-
180
- bundle
181
- .command('decrypt [zipPath] [sessionKey]')
182
- .description('Decrypt a signed zip bundle')
183
- .action(decryptZip)
184
- .option('--key <key>', 'custom path for private signing key')
185
- .option('--key-data <keyData>', 'base64 private signing key')
186
-
187
- bundle
188
- .command('encrypt [zipPath]')
189
- .description('Encrypt a zip bundle')
190
- .action(encryptZip)
191
- .option('--key <key>', 'custom path for private signing key')
192
- .option('--key-data <keyData>', 'base64 private signing key')
193
-
194
- bundle
195
- .command('zip [appId]')
196
- .description('Zip a bundle')
197
- .action(zipBundle)
198
- .option('-p, --path <path>', 'path of the folder to upload')
199
- .option('-b, --bundle <bundle>', 'bundle version number to name the zip file')
200
- .option('-n, --name <name>', 'name of the zip file')
201
- .option('-j, --json', 'output in JSON')
202
- .option('--no-code-check', 'Ignore checking if notifyAppReady() is called in soure code and index present in root folder')
203
-
204
- const channel = program
205
- .command('channel')
206
- .description('Manage channel')
207
-
208
- channel
209
- .command('add [channelId] [appId]')
210
- .alias('a')
211
- .description('Create channel')
212
- .action(addChannelCommand)
213
- .option('-d, --default', 'set the channel as default')
214
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
215
-
216
- channel
217
- .command('delete [channelId] [appId]')
218
- .alias('d')
219
- .description('Delete channel')
220
- .action(deleteChannel)
221
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
222
-
223
- channel
224
- .command('list [appId]')
225
- .alias('l')
226
- .description('List channel')
227
- .action(listChannels)
228
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
229
-
230
- channel
231
- .command('currentBundle [channel] [appId]')
232
- .description('Get current bundle for specific channel in Capgo Cloud')
233
- .action(currentBundle)
234
- .option('-c, --channel <channel>', 'channel to get the current bundle from')
235
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
236
- .option('--quiet', 'only print the bundle version')
237
-
238
- channel
239
- .command('set [channelId] [appId]')
240
- .alias('s')
241
- .description('Set channel')
242
- .action(setChannel)
243
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
244
- .option('-b, --bundle <bundle>', 'bundle version number of the file to set')
245
- .option('-s, --state <state>', 'set the state of the channel, default or normal')
246
- .option('--latest', 'get the latest version key in the package.json to set it to the channel')
247
- .option('--downgrade', 'Allow to downgrade to version under native one')
248
- .option('--no-downgrade', 'Disable downgrade to version under native one')
249
- .option('--upgrade', 'Allow to upgrade to version above native one')
250
- .option('--no-upgrade', 'Disable upgrade to version above native one')
251
- .option('--ios', 'Allow sending update to ios devices')
252
- .option('--no-ios', 'Disable sending update to ios devices')
253
- .option('--android', 'Allow sending update to android devices')
254
- .option('--no-android', 'Disable sending update to android devices')
255
- .option('--self-assign', 'Allow to device to self assign to this channel')
256
- .option('--no-self-assign', 'Disable devices to self assign to this channel')
257
- .option('--disable-auto-update <disableAutoUpdate>', 'Disable auto update strategy for this channel.The possible options are: major, minor, metadata, patch, none')
258
- .option('--dev', 'Allow sending update to development devices')
259
- .option('--no-dev', 'Disable sending update to development devices')
260
- .option('--emulator', 'Allow sending update to emulator devices')
261
- .option('--no-emulator', 'Disable sending update to emulator devices')
262
-
263
- const key = program
264
- .command('key')
265
- .description('Manage key')
266
-
267
- key
268
- .command('save')
269
- .description('Save base64 signing key in capacitor config, usefull for CI')
270
- .action(saveKeyCommand)
271
- .option('-f, --force', 'force generate a new one')
272
- .option('--key', 'key path to save in capacitor config')
273
- .option('--key-data', 'key data to save in capacitor config')
274
-
275
- key
276
- .command('create')
277
- .description('Create a new signing key')
278
- .action(createKeyCommand)
279
- .option('-f, --force', 'force generate a new one')
280
-
281
- program
282
- .command('upload [appId]')
283
- .alias('u')
284
- .description('(Deprecated) Upload a new bundle to Capgo Cloud')
285
- .action(uploadDeprecatedCommand)
286
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
287
- .option('-p, --path <path>', 'path of the folder to upload')
288
- .option('-c, --channel <channel>', 'channel to link to')
289
- .option('-e, --external <url>', 'link to external url intead of upload to Capgo Cloud')
290
- .option('--key <key>', 'custom path for public signing key')
291
- .option('--key-data <keyData>', 'base64 public signing key')
292
- .option('--bundle-url', 'prints bundle url into stdout')
293
- .option('--no-key', 'ignore signing key and send clear update')
294
- .option('--display-iv-session', 'Show in the console the iv and session key used to encrypt the update')
295
- .option('-b, --bundle <bundle>', 'bundle version number of the file to upload')
296
- .option(
297
- '--min-update-version <minUpdateVersion>',
298
- 'Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel',
299
- )
300
-
301
- const account = program
302
- .command('account')
303
- .description('Manage account')
304
-
305
- account.command('id')
306
- .description('Get your account ID')
307
- .action(getUserId)
308
- .option('-a, --apikey <apikey>', 'apikey to link to your account')
309
-
310
- program.parseAsync()