@devicecloud.dev/dcd 2.1.1 → 2.2.0
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/dist/commands/cloud.d.ts +1 -0
- package/dist/commands/cloud.js +18 -5
- package/dist/constants.d.ts +1 -0
- package/dist/constants.js +5 -1
- package/oclif.manifest.json +11 -3
- package/package.json +1 -1
package/dist/commands/cloud.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export default class Cloud extends Command {
|
|
|
47
47
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
48
48
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
49
49
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
50
|
+
retry: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
50
51
|
};
|
|
51
52
|
run(): Promise<void>;
|
|
52
53
|
}
|
package/dist/commands/cloud.js
CHANGED
|
@@ -55,9 +55,15 @@ class Cloud extends core_1.Command {
|
|
|
55
55
|
}
|
|
56
56
|
await (0, methods_1.versionCheck)(this.config.version);
|
|
57
57
|
const { args, flags, raw } = await this.parse(Cloud);
|
|
58
|
-
const { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey, apiUrl, 'app-binary-id': appBinaryId, 'app-file': appFile, async, 'device-locale': deviceLocale, 'download-artifacts': downloadArtifacts, env, 'exclude-flows': excludeFlows, 'exclude-tags': excludeTags, flows, 'google-play': googlePlay, 'include-tags': includeTags, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, ...rest } = flags;
|
|
58
|
+
const { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey, apiUrl, 'app-binary-id': appBinaryId, 'app-file': appFile, async, 'device-locale': deviceLocale, 'download-artifacts': downloadArtifacts, env, 'exclude-flows': excludeFlows, 'exclude-tags': excludeTags, flows, 'google-play': googlePlay, 'include-tags': includeTags, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, retry, ...rest } = flags;
|
|
59
59
|
if (!apiKey)
|
|
60
60
|
throw new Error('You must provide an API key');
|
|
61
|
+
if (retry) {
|
|
62
|
+
if (retry < 0)
|
|
63
|
+
throw new Error('Retry must be a positive number');
|
|
64
|
+
if (retry > 3)
|
|
65
|
+
throw new Error('Retry must be 3 or less');
|
|
66
|
+
}
|
|
61
67
|
const additionalAppBinaryIds = nonFlatAdditionalAppBinaryIds?.flat();
|
|
62
68
|
const additionalAppFiles = nonFlatAdditionalAppFiles?.flat();
|
|
63
69
|
const { firstFile, secondFile } = args;
|
|
@@ -186,6 +192,7 @@ class Cloud extends core_1.Command {
|
|
|
186
192
|
const config = {
|
|
187
193
|
allExcludeTags,
|
|
188
194
|
allIncludeTags,
|
|
195
|
+
autoRetriesRemaining: retry,
|
|
189
196
|
continueOnFailure,
|
|
190
197
|
deviceLocale,
|
|
191
198
|
maestroVersion,
|
|
@@ -250,8 +257,8 @@ class Cloud extends core_1.Command {
|
|
|
250
257
|
if (!quiet) {
|
|
251
258
|
core_1.ux.action.status =
|
|
252
259
|
'\nStatus Test\n─────────── ───────────────';
|
|
253
|
-
for (const { status, test_file_name: test } of updatedResults) {
|
|
254
|
-
core_1.ux.action.status += `\n${status.padEnd(10, ' ')} ${test}`;
|
|
260
|
+
for (const { retry_of: isRetry, status, test_file_name: test, } of updatedResults) {
|
|
261
|
+
core_1.ux.action.status += `\n${status.padEnd(10, ' ')} ${test} ${isRetry ? '(retry)' : ''}`;
|
|
255
262
|
}
|
|
256
263
|
}
|
|
257
264
|
if (updatedResults.every((result) => !['PENDING', 'RUNNING'].includes(result.status))) {
|
|
@@ -259,7 +266,9 @@ class Cloud extends core_1.Command {
|
|
|
259
266
|
(0, cli_ux_1.info)('\n');
|
|
260
267
|
(0, cli_ux_1.table)(updatedResults, {
|
|
261
268
|
status: { get: (row) => row.status },
|
|
262
|
-
test: {
|
|
269
|
+
test: {
|
|
270
|
+
get: (row) => `${row.test_file_name} ${row.retry_of ? '(retry)' : ''}`,
|
|
271
|
+
},
|
|
263
272
|
}, { printLine: this.log.bind(this) });
|
|
264
273
|
(0, cli_ux_1.info)('\n');
|
|
265
274
|
(0, cli_ux_1.info)('Run completed, you can access the results at:');
|
|
@@ -282,7 +291,11 @@ class Cloud extends core_1.Command {
|
|
|
282
291
|
this.warn('Failed to download artifacts');
|
|
283
292
|
}
|
|
284
293
|
}
|
|
285
|
-
|
|
294
|
+
const resultsWithoutEarlierTries = updatedResults.filter((result) => {
|
|
295
|
+
const beenRetried = updatedResults.find((r) => r.retry_of === result.id);
|
|
296
|
+
return !beenRetried;
|
|
297
|
+
});
|
|
298
|
+
if (resultsWithoutEarlierTries.some((result) => result.status === 'FAILED')) {
|
|
286
299
|
// eslint-disable-next-line unicorn/no-process-exit
|
|
287
300
|
process.exit(2);
|
|
288
301
|
}
|
package/dist/constants.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export declare const flags: {
|
|
|
23
23
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
24
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
25
25
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
26
|
+
retry: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
26
27
|
};
|
|
27
28
|
export declare const iOSCompatibilityLookup: {
|
|
28
29
|
[k in EiOSDevices]: string[];
|
package/dist/constants.js
CHANGED
|
@@ -121,7 +121,7 @@ exports.flags = {
|
|
|
121
121
|
}),
|
|
122
122
|
'maestro-version': core_1.Flags.string({
|
|
123
123
|
aliases: ['maestroVersion'],
|
|
124
|
-
description: '
|
|
124
|
+
description: 'Maestro version to run your flow against',
|
|
125
125
|
options: [
|
|
126
126
|
'1.36.0',
|
|
127
127
|
'1.37.0',
|
|
@@ -136,6 +136,7 @@ exports.flags = {
|
|
|
136
136
|
'1.37.9',
|
|
137
137
|
'1.38.1',
|
|
138
138
|
'1.39.0',
|
|
139
|
+
'1.39.1',
|
|
139
140
|
],
|
|
140
141
|
}),
|
|
141
142
|
name: core_1.Flags.string({
|
|
@@ -150,6 +151,9 @@ exports.flags = {
|
|
|
150
151
|
default: false,
|
|
151
152
|
description: 'Quieter console output that wont provide progress updates',
|
|
152
153
|
}),
|
|
154
|
+
retry: core_1.Flags.integer({
|
|
155
|
+
description: 'Number of times to retry the run if it fails (same as pressing retry in the UI, this will deduct credits from your account)',
|
|
156
|
+
}),
|
|
153
157
|
};
|
|
154
158
|
exports.iOSCompatibilityLookup = {
|
|
155
159
|
'ipad-pro-6th-gen': ['16', '17', '18'],
|
package/oclif.manifest.json
CHANGED
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
"aliases": [
|
|
223
223
|
"maestroVersion"
|
|
224
224
|
],
|
|
225
|
-
"description": "
|
|
225
|
+
"description": "Maestro version to run your flow against",
|
|
226
226
|
"name": "maestro-version",
|
|
227
227
|
"hasDynamicHelp": false,
|
|
228
228
|
"multiple": false,
|
|
@@ -239,7 +239,8 @@
|
|
|
239
239
|
"1.37.8",
|
|
240
240
|
"1.37.9",
|
|
241
241
|
"1.38.1",
|
|
242
|
-
"1.39.0"
|
|
242
|
+
"1.39.0",
|
|
243
|
+
"1.39.1"
|
|
243
244
|
],
|
|
244
245
|
"type": "option"
|
|
245
246
|
},
|
|
@@ -269,6 +270,13 @@
|
|
|
269
270
|
"name": "quiet",
|
|
270
271
|
"allowNo": false,
|
|
271
272
|
"type": "boolean"
|
|
273
|
+
},
|
|
274
|
+
"retry": {
|
|
275
|
+
"description": "Number of times to retry the run if it fails (same as pressing retry in the UI, this will deduct credits from your account)",
|
|
276
|
+
"name": "retry",
|
|
277
|
+
"hasDynamicHelp": false,
|
|
278
|
+
"multiple": false,
|
|
279
|
+
"type": "option"
|
|
272
280
|
}
|
|
273
281
|
},
|
|
274
282
|
"hasDynamicHelp": false,
|
|
@@ -287,5 +295,5 @@
|
|
|
287
295
|
]
|
|
288
296
|
}
|
|
289
297
|
},
|
|
290
|
-
"version": "2.
|
|
298
|
+
"version": "2.2.0"
|
|
291
299
|
}
|