@devicecloud.dev/dcd 4.4.4 → 4.4.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/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # devicecloud.dev CLI
2
2
 
3
+
3
4
  ---
4
5
 
5
6
  One line swap out for Maestro Cloud
@@ -96,4 +96,5 @@ export default class Cloud extends Command {
96
96
  * @throws Error for infrastructure or configuration errors
97
97
  */
98
98
  run(): Promise<any>;
99
+ protected toErrorJson(err: unknown): unknown;
99
100
  }
@@ -172,6 +172,14 @@ class Cloud extends core_1.Command {
172
172
  this.error(`Maestro version ${resolvedMaestroVersion} is no longer supported. ` +
173
173
  `Please upgrade to a newer version. See: https://docs.devicecloud.dev/configuration/maestro-versions`);
174
174
  }
175
+ const DEPRECATED_MAESTRO_VERSIONS = ['1.39.1', '2.4.0'];
176
+ if (DEPRECATED_MAESTRO_VERSIONS.includes(resolvedMaestroVersion)) {
177
+ this.log(`\n${styling_1.dividers.light}\n` +
178
+ `${styling_1.colors.warning('⚠')} ${styling_1.colors.bold('Deprecation Warning')}\n` +
179
+ styling_1.colors.dim(` Maestro version ${resolvedMaestroVersion} is deprecated and will be removed in a future release.\n`) +
180
+ styling_1.colors.dim(` Please upgrade to a newer version. See: `) + styling_1.colors.info('https://docs.devicecloud.dev/configuration/maestro-versions') + `\n` +
181
+ `${styling_1.dividers.light}\n`);
182
+ }
175
183
  if (retry && retry > 2) {
176
184
  this.log(styling_1.colors.warning('⚠') + ' ' + styling_1.colors.dim("Retries are now free of charge but limited to 2. If your test is still failing after 2 retries, please ask for help on Discord."));
177
185
  flags.retry = 2;
@@ -612,5 +620,16 @@ class Cloud extends core_1.Command {
612
620
  }
613
621
  }
614
622
  }
623
+ toErrorJson(err) {
624
+ if (err instanceof Error) {
625
+ return {
626
+ error: {
627
+ message: err.message,
628
+ ...(err.code ? { code: err.code } : {}),
629
+ },
630
+ };
631
+ }
632
+ return { error: { message: String(err) } };
633
+ }
615
634
  }
616
635
  exports.default = Cloud;
@@ -16,4 +16,5 @@ export default class Upload extends Command {
16
16
  run(): Promise<{
17
17
  appBinaryId: string;
18
18
  }>;
19
+ protected toErrorJson(err: unknown): unknown;
19
20
  }
@@ -94,5 +94,16 @@ class Upload extends core_1.Command {
94
94
  }
95
95
  }
96
96
  }
97
+ toErrorJson(err) {
98
+ if (err instanceof Error) {
99
+ return {
100
+ error: {
101
+ message: err.message,
102
+ ...(err.code ? { code: err.code } : {}),
103
+ },
104
+ };
105
+ }
106
+ return { error: { message: String(err) } };
107
+ }
97
108
  }
98
109
  exports.default = Upload;