@devicecloud.dev/dcd 3.3.9 → 3.4.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 +23 -9
- package/dist/constants.d.ts +4 -0
- package/dist/constants.js +14 -2
- package/oclif.manifest.json +14 -2
- package/package.json +1 -1
package/dist/commands/cloud.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export default class Cloud extends Command {
|
|
|
56
56
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
57
57
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
58
58
|
retry: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
59
|
+
'runner-type': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
59
60
|
report: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
60
61
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
61
62
|
};
|
package/dist/commands/cloud.js
CHANGED
|
@@ -86,22 +86,28 @@ class Cloud extends core_1.Command {
|
|
|
86
86
|
}
|
|
87
87
|
await this.versionCheck();
|
|
88
88
|
const { args, flags, raw } = await this.parse(Cloud);
|
|
89
|
-
|
|
89
|
+
let { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey: apiKeyFlag, 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, 'ignore-sha-check': ignoreShaCheck, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, retry, report, 'runner-type': runnerType, 'x86-arch': x86Arch, json, ...rest } = flags;
|
|
90
90
|
const apiKey = apiKeyFlag || process.env.DEVICE_CLOUD_API_KEY;
|
|
91
91
|
if (!apiKey)
|
|
92
92
|
throw new Error('You must provide an API key via --api-key flag or DEVICE_CLOUD_API_KEY environment variable');
|
|
93
|
-
if (retry) {
|
|
94
|
-
if (retry < 0)
|
|
95
|
-
throw new Error('Retry must be a positive number');
|
|
96
|
-
if (retry > 3)
|
|
97
|
-
throw new Error('Retry must be 3 or less');
|
|
98
|
-
}
|
|
99
93
|
const [maestroMajorString, maestroMinorString] = maestroVersion.split('.');
|
|
100
94
|
if (report === 'html' &&
|
|
101
95
|
maestroMajorString === '1' &&
|
|
102
96
|
Number(maestroMinorString) < 39) {
|
|
103
97
|
throw new Error('HTML report is not supported for Maestro 1.38 and below. Please use --maestro-version flag to specify a newer runtime.');
|
|
104
98
|
}
|
|
99
|
+
if (retry && retry > 2) {
|
|
100
|
+
this.log("Retries are now free of charge but limited to 2. If you're test is still failing after 2 retries, please ask for help on Discord.");
|
|
101
|
+
flags.retry = 2;
|
|
102
|
+
retry = 2;
|
|
103
|
+
}
|
|
104
|
+
if (runnerType === 'm4') {
|
|
105
|
+
this.log('Note: runnerType m4 is experimental and currently supports iOS only.');
|
|
106
|
+
// todo - better platform checking
|
|
107
|
+
if (androidApiLevel || androidDevice) {
|
|
108
|
+
throw new Error('runnerType m4 only supports iOS');
|
|
109
|
+
}
|
|
110
|
+
}
|
|
105
111
|
const additionalAppBinaryIds = nonFlatAdditionalAppBinaryIds?.flat();
|
|
106
112
|
const additionalAppFiles = nonFlatAdditionalAppFiles?.flat();
|
|
107
113
|
const { firstFile, secondFile } = args;
|
|
@@ -128,10 +134,16 @@ class Cloud extends core_1.Command {
|
|
|
128
134
|
}
|
|
129
135
|
if (androidApiLevel || androidDevice) {
|
|
130
136
|
const androidDeviceID = androidDevice || 'pixel-7';
|
|
131
|
-
const
|
|
137
|
+
const lookup = googlePlay
|
|
138
|
+
? constants_1.AndroidCompatibilityLookupPlay
|
|
139
|
+
: constants_1.AndroidCompatibilityLookup;
|
|
140
|
+
const supportedAndroidVersions = lookup[androidDeviceID];
|
|
132
141
|
const version = androidApiLevel || '34';
|
|
142
|
+
if (supportedAndroidVersions.length === 0) {
|
|
143
|
+
throw new Error(`We don't support that device configuration - please check the docs for supported devices: https://docs.devicecloud.dev/getting-started/devices-configuration`);
|
|
144
|
+
}
|
|
133
145
|
if (!supportedAndroidVersions.includes(version)) {
|
|
134
|
-
throw new Error(`${androidDeviceID} only supports these Android API levels: ${supportedAndroidVersions.join(', ')}`);
|
|
146
|
+
throw new Error(`${androidDeviceID} ${googlePlay ? '(Play Store) ' : ''}only supports these Android API levels: ${supportedAndroidVersions.join(', ')}`);
|
|
135
147
|
}
|
|
136
148
|
}
|
|
137
149
|
flowFile = path.resolve(flowFile);
|
|
@@ -264,6 +276,8 @@ class Cloud extends core_1.Command {
|
|
|
264
276
|
testFormData.set('iOSDevice', iOSDevice.toString());
|
|
265
277
|
if (name)
|
|
266
278
|
testFormData.set('name', name.toString());
|
|
279
|
+
if (runnerType)
|
|
280
|
+
testFormData.set('runnerType', runnerType.toString());
|
|
267
281
|
if (workspaceConfig)
|
|
268
282
|
testFormData.set('workspaceConfig', JSON.stringify(workspaceConfig));
|
|
269
283
|
for (const [key, value] of Object.entries(rest)) {
|
package/dist/constants.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export declare const flags: {
|
|
|
26
26
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
27
27
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
28
28
|
retry: import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
29
|
+
'runner-type': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
29
30
|
report: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
30
31
|
json: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
31
32
|
};
|
|
@@ -35,3 +36,6 @@ export declare const iOSCompatibilityLookup: {
|
|
|
35
36
|
export declare const AndroidCompatibilityLookup: {
|
|
36
37
|
[k in EAndroidDevices]: string[];
|
|
37
38
|
};
|
|
39
|
+
export declare const AndroidCompatibilityLookupPlay: {
|
|
40
|
+
[k in EAndroidDevices]: string[];
|
|
41
|
+
};
|
package/dist/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AndroidCompatibilityLookup = exports.iOSCompatibilityLookup = exports.flags = void 0;
|
|
3
|
+
exports.AndroidCompatibilityLookupPlay = exports.AndroidCompatibilityLookup = exports.iOSCompatibilityLookup = exports.flags = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
exports.flags = {
|
|
6
6
|
'additional-app-binary-ids': core_1.Flags.string({
|
|
@@ -159,7 +159,12 @@ exports.flags = {
|
|
|
159
159
|
description: 'Quieter console output that wont provide progress updates',
|
|
160
160
|
}),
|
|
161
161
|
retry: core_1.Flags.integer({
|
|
162
|
-
description: '
|
|
162
|
+
description: 'Automatically retry the run up to the number of times specified (same as pressing retry in the UI) - this is free of charge',
|
|
163
|
+
}),
|
|
164
|
+
'runner-type': core_1.Flags.string({
|
|
165
|
+
description: '[iOS only] [experimental] The type of runner to use - note: anything other than default will incur advanced pricing tiers',
|
|
166
|
+
default: 'default',
|
|
167
|
+
options: ['default', 'm4'],
|
|
163
168
|
}),
|
|
164
169
|
report: core_1.Flags.string({
|
|
165
170
|
aliases: ['format'],
|
|
@@ -192,3 +197,10 @@ exports.AndroidCompatibilityLookup = {
|
|
|
192
197
|
'pixel-7': ['33', '34', '35'],
|
|
193
198
|
'pixel-7-pro': ['33', '34', '35'],
|
|
194
199
|
};
|
|
200
|
+
exports.AndroidCompatibilityLookupPlay = {
|
|
201
|
+
'generic-tablet': ['33', '34', '35'],
|
|
202
|
+
'pixel-6': ['34', '35'],
|
|
203
|
+
'pixel-6-pro': [],
|
|
204
|
+
'pixel-7': ['34', '35'],
|
|
205
|
+
'pixel-7-pro': [],
|
|
206
|
+
};
|
package/oclif.manifest.json
CHANGED
|
@@ -293,12 +293,24 @@
|
|
|
293
293
|
"type": "boolean"
|
|
294
294
|
},
|
|
295
295
|
"retry": {
|
|
296
|
-
"description": "
|
|
296
|
+
"description": "Automatically retry the run up to the number of times specified (same as pressing retry in the UI) - this is free of charge",
|
|
297
297
|
"name": "retry",
|
|
298
298
|
"hasDynamicHelp": false,
|
|
299
299
|
"multiple": false,
|
|
300
300
|
"type": "option"
|
|
301
301
|
},
|
|
302
|
+
"runner-type": {
|
|
303
|
+
"description": "[iOS only] [experimental] The type of runner to use - note: anything other than default will incur advanced pricing tiers",
|
|
304
|
+
"name": "runner-type",
|
|
305
|
+
"default": "default",
|
|
306
|
+
"hasDynamicHelp": false,
|
|
307
|
+
"multiple": false,
|
|
308
|
+
"options": [
|
|
309
|
+
"default",
|
|
310
|
+
"m4"
|
|
311
|
+
],
|
|
312
|
+
"type": "option"
|
|
313
|
+
},
|
|
302
314
|
"report": {
|
|
303
315
|
"aliases": [
|
|
304
316
|
"format"
|
|
@@ -404,5 +416,5 @@
|
|
|
404
416
|
]
|
|
405
417
|
}
|
|
406
418
|
},
|
|
407
|
-
"version": "3.
|
|
419
|
+
"version": "3.4.0"
|
|
408
420
|
}
|