@capgo/cli 4.3.4 → 4.3.6

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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,15 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [4.3.6](https://github.com/Cap-go/CLI/compare/v4.3.5...v4.3.6) (2024-04-21)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add more retry ([a3e4c8e](https://github.com/Cap-go/CLI/commit/a3e4c8e3de66a9dca05fd48a4c480c6b54328c1b))
11
+
12
+ ### [4.3.5](https://github.com/Cap-go/CLI/compare/v4.3.4...v4.3.5) (2024-04-18)
13
+
5
14
  ### [4.3.4](https://github.com/Cap-go/CLI/compare/v4.3.3...v4.3.4) (2024-04-17)
6
15
 
7
16
  ### [4.3.3](https://github.com/Cap-go/CLI/compare/v4.3.2...v4.3.3) (2024-04-16)
package/dist/index.js CHANGED
@@ -91634,7 +91634,7 @@ var {
91634
91634
  // package.json
91635
91635
  var package_default = {
91636
91636
  name: "@capgo/cli",
91637
- version: "4.3.4",
91637
+ version: "4.3.6",
91638
91638
  description: "A CLI to upload to capgo servers",
91639
91639
  main: "dist/index.js",
91640
91640
  bin: {
@@ -94212,15 +94212,21 @@ The app size is ${mbSize} Mb, this may take a while to download for users
94212
94212
  f2.error(`Cannot get upload url`);
94213
94213
  program.error("");
94214
94214
  }
94215
- await distribution_default.put(url, {
94216
- timeout: 6e4,
94217
- body: zipped,
94218
- headers: !localS3 ? {
94219
- "Content-Type": "application/octet-stream",
94220
- "Cache-Control": "public, max-age=456789, immutable",
94221
- "x-amz-meta-crc32": checksum
94222
- } : void 0
94223
- });
94215
+ try {
94216
+ await distribution_default.put(url, {
94217
+ timeout: 6e4,
94218
+ retry: 5,
94219
+ body: zipped,
94220
+ headers: !localS3 ? {
94221
+ "Content-Type": "application/octet-stream",
94222
+ "Cache-Control": "public, max-age=456789, immutable",
94223
+ "x-amz-meta-crc32": checksum
94224
+ } : void 0
94225
+ });
94226
+ } catch (errorUpload) {
94227
+ f2.error(`Cannot upload bundle ${formatError(errorUpload)}`);
94228
+ program.error("");
94229
+ }
94224
94230
  versionData.storage_provider = "r2";
94225
94231
  const { error: dbError2 } = await updateOrCreateVersion(supabase, versionData);
94226
94232
  if (dbError2) {
@@ -94493,6 +94499,10 @@ async function addApp(appId, options, throwErr = true) {
94493
94499
  f2.error("Missing argument, you need to provide a appId, or be in a capacitor project");
94494
94500
  program.error("");
94495
94501
  }
94502
+ if (appId.includes("--")) {
94503
+ f2.error('The app id includes illegal symbols. You cannot use "--" in the app id');
94504
+ program.error("");
94505
+ }
94496
94506
  const supabase = await createSupabaseClient(options.apikey);
94497
94507
  let userId = await verifyUser(supabase, options.apikey, ["write", "all"]);
94498
94508
  const appExist = await checkAppExists(supabase, appId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.3.4",
3
+ "version": "4.3.6",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
package/src/app/add.ts CHANGED
@@ -35,6 +35,12 @@ export async function addApp(appId: string, options: Options, throwErr = true) {
35
35
  p.log.error('Missing argument, you need to provide a appId, or be in a capacitor project')
36
36
  program.error('')
37
37
  }
38
+
39
+ if (appId.includes('--')) {
40
+ p.log.error('The app id includes illegal symbols. You cannot use "--" in the app id')
41
+ program.error('')
42
+ }
43
+
38
44
  const supabase = await createSupabaseClient(options.apikey)
39
45
 
40
46
  let userId = await verifyUser(supabase, options.apikey, ['write', 'all'])
@@ -386,17 +386,24 @@ It will be also visible in your dashboard\n`)
386
386
  p.log.error(`Cannot get upload url`)
387
387
  program.error('')
388
388
  }
389
- await ky.put(url, {
390
- timeout: 60000,
391
- body: zipped,
392
- headers: (!localS3
393
- ? {
394
- 'Content-Type': 'application/octet-stream',
395
- 'Cache-Control': 'public, max-age=456789, immutable',
396
- 'x-amz-meta-crc32': checksum,
397
- }
398
- : undefined),
399
- })
389
+ try {
390
+ await ky.put(url, {
391
+ timeout: 60000,
392
+ retry: 5,
393
+ body: zipped,
394
+ headers: (!localS3
395
+ ? {
396
+ 'Content-Type': 'application/octet-stream',
397
+ 'Cache-Control': 'public, max-age=456789, immutable',
398
+ 'x-amz-meta-crc32': checksum,
399
+ }
400
+ : undefined),
401
+ })
402
+ }
403
+ catch (errorUpload) {
404
+ p.log.error(`Cannot upload bundle ${formatError(errorUpload)}`)
405
+ program.error('')
406
+ }
400
407
  versionData.storage_provider = 'r2'
401
408
  const { error: dbError2 } = await updateOrCreateVersion(supabase, versionData)
402
409
  if (dbError2) {