@capgo/cli 4.6.2 → 4.6.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.
package/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
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.6.3](https://github.com/Cap-go/CLI/compare/v4.6.2...v4.6.3) (2024-05-10)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * add timeout option ([e8c8890](https://github.com/Cap-go/CLI/commit/e8c8890204bc327443a58b303c5fe8ae132dab2d))
11
+
5
12
  ### [4.6.2](https://github.com/Cap-go/CLI/compare/v4.6.1...v4.6.2) (2024-05-08)
6
13
 
7
14
 
package/dist/index.js CHANGED
@@ -92373,7 +92373,7 @@ var {
92373
92373
  // package.json
92374
92374
  var package_default = {
92375
92375
  name: "@capgo/cli",
92376
- version: "4.6.2",
92376
+ version: "4.6.3",
92377
92377
  description: "A CLI to upload to capgo servers",
92378
92378
  author: "github.com/riderx",
92379
92379
  license: "Apache 2.0",
@@ -95017,7 +95017,7 @@ The app size is ${mbSize} Mb, this may take a while to download for users
95017
95017
  }
95018
95018
  try {
95019
95019
  await distribution_default.put(url, {
95020
- timeout: 2e4,
95020
+ timeout: options.timeout || 12e4,
95021
95021
  retry: 5,
95022
95022
  body: zipped,
95023
95023
  headers: !localS3 ? {
@@ -95027,6 +95027,7 @@ The app size is ${mbSize} Mb, this may take a while to download for users
95027
95027
  } : void 0
95028
95028
  });
95029
95029
  } catch (errorUpload) {
95030
+ spinner.stop("Failed to upload bundle");
95030
95031
  f2.error(`Cannot upload bundle ${formatError(errorUpload)}`);
95031
95032
  await deletedFailedVersion(supabase, appid, bundle2);
95032
95033
  program.error("");
@@ -96566,7 +96567,7 @@ var bundle = program.command("bundle").description("Manage bundle");
96566
96567
  bundle.command("upload [appId]").alias("u").description("Upload a new bundle in Capgo Cloud").action(uploadCommand).option("-a, --apikey <apikey>", "apikey to link to your account").option("-p, --path <path>", "path of the folder to upload").option("-c, --channel <channel>", "channel to link to").option("-e, --external <url>", "link to external url intead of upload to Capgo Cloud").option("--iv-session-key <key>", "Set the iv and session key for bundle url external").option("--s3-region <region>", "Region for your AWS S3 bucket").option("--s3-apikey <apikey>", "apikey for your AWS S3 account").option("--s3-apisecret <apisecret>", "api secret for your AWS S3 account").option("--s3-bucket-name <bucketName>", "Name for your AWS S3 bucket").option("--key <key>", "custom path for public signing key").option("--key-data <keyData>", "base64 public signing key").option("--bundle-url", "prints bundle url into stdout").option("--no-key", "ignore signing key and send clear update").option("--no-code-check", "Ignore checking if notifyAppReady() is called in soure code and index present in root folder").option("--display-iv-session", "Show in the console the iv and session key used to encrypt the update").option("-b, --bundle <bundle>", "bundle version number of the bundle to upload").option(
96567
96568
  "--min-update-version <minUpdateVersion>",
96568
96569
  "Minimal version required to update to this version. Used only if the disable auto update is set to metadata in channel"
96569
- ).option("--auto-min-update-version", "Set the min update version based on native packages").option("--ignore-metadata-check", "Ignores the metadata (node_modules) check when uploading");
96570
+ ).option("--auto-min-update-version", "Set the min update version based on native packages").option("--ignore-metadata-check", "Ignores the metadata (node_modules) check when uploading").option("--timeout <timeout>", "Timeout for the upload process in seconds");
96570
96571
  bundle.command("compatibility [appId]").action(checkCompatibilityCommand).option("-a, --apikey <apikey>", "apikey to link to your account").option("-c, --channel <channel>", "channel to check the compatibility with").option("--text", "output text instead of emojis");
96571
96572
  bundle.command("delete [bundleId] [appId]").alias("d").description("Delete a bundle in Capgo Cloud").action(deleteBundle).option("-a, --apikey <apikey>", "apikey to link to your account");
96572
96573
  bundle.command("list [appId]").alias("l").description("List bundle in Capgo Cloud").action(listBundle).option("-a, --apikey <apikey>", "apikey to link to your account");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/cli",
3
- "version": "4.6.2",
3
+ "version": "4.6.3",
4
4
  "description": "A CLI to upload to capgo servers",
5
5
  "author": "github.com/riderx",
6
6
  "license": "Apache 2.0",
@@ -63,6 +63,7 @@ interface Options extends OptionsBase {
63
63
  minUpdateVersion?: string
64
64
  autoMinUpdateVersion?: boolean
65
65
  ignoreMetadataCheck?: boolean
66
+ timeout?: number
66
67
  }
67
68
 
68
69
  export async function uploadBundle(appid: string, options: Options, shouldExit = true) {
@@ -385,7 +386,7 @@ It will be also visible in your dashboard\n`)
385
386
  }
386
387
  try {
387
388
  await ky.put(url, {
388
- timeout: 20000,
389
+ timeout: options.timeout || 120000,
389
390
  retry: 5,
390
391
  body: zipped,
391
392
  headers: (!localS3
@@ -398,6 +399,7 @@ It will be also visible in your dashboard\n`)
398
399
  })
399
400
  }
400
401
  catch (errorUpload) {
402
+ spinner.stop('Failed to upload bundle')
401
403
  p.log.error(`Cannot upload bundle ${formatError(errorUpload)}`)
402
404
  // call delete version on path /delete_failed_version to delete the version
403
405
  await deletedFailedVersion(supabase, appid, bundle)
package/src/index.ts CHANGED
@@ -130,6 +130,7 @@ bundle
130
130
  )
131
131
  .option('--auto-min-update-version', 'Set the min update version based on native packages')
132
132
  .option('--ignore-metadata-check', 'Ignores the metadata (node_modules) check when uploading')
133
+ .option('--timeout <timeout>', 'Timeout for the upload process in seconds')
133
134
 
134
135
  bundle
135
136
  .command('compatibility [appId]')