@devicecloud.dev/dcd 2.2.0 → 2.3.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.
@@ -16,6 +16,13 @@ export declare enum EiOSDevices {
16
16
  'iphone-16-pro' = "iphone-16-pro",
17
17
  'iphone-16-pro-max' = "iphone-16-pro-max"
18
18
  }
19
+ export declare enum EAndroidDevices {
20
+ 'generic-tablet' = "generic-tablet",
21
+ 'pixel-6' = "pixel-6",
22
+ 'pixel-6-pro' = "pixel-6-pro",
23
+ 'pixel-7' = "pixel-7",
24
+ 'pixel-7-pro' = "pixel-7-pro"
25
+ }
19
26
  export default class Cloud extends Command {
20
27
  static args: {
21
28
  firstFile: import("@oclif/core/lib/interfaces").Arg<string | undefined, Record<string, unknown>>;
@@ -26,7 +33,7 @@ export default class Cloud extends Command {
26
33
  static flags: {
27
34
  'additional-app-binary-ids': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
28
35
  'additional-app-files': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
29
- 'android-api-level': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
36
+ 'android-api-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
30
37
  'android-device': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
31
38
  apiKey: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
32
39
  apiUrl: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EiOSDevices = exports.mimeTypeLookupByExtension = void 0;
3
+ exports.EAndroidDevices = exports.EiOSDevices = exports.mimeTypeLookupByExtension = void 0;
4
4
  /* eslint-disable complexity */
5
5
  const core_1 = require("@oclif/core");
6
6
  const cli_ux_1 = require("@oclif/core/lib/cli-ux");
@@ -31,6 +31,14 @@ var EiOSDevices;
31
31
  EiOSDevices["iphone-16-pro"] = "iphone-16-pro";
32
32
  EiOSDevices["iphone-16-pro-max"] = "iphone-16-pro-max";
33
33
  })(EiOSDevices || (exports.EiOSDevices = EiOSDevices = {}));
34
+ var EAndroidDevices;
35
+ (function (EAndroidDevices) {
36
+ EAndroidDevices["generic-tablet"] = "generic-tablet";
37
+ EAndroidDevices["pixel-6"] = "pixel-6";
38
+ EAndroidDevices["pixel-6-pro"] = "pixel-6-pro";
39
+ EAndroidDevices["pixel-7"] = "pixel-7";
40
+ EAndroidDevices["pixel-7-pro"] = "pixel-7-pro";
41
+ })(EAndroidDevices || (exports.EAndroidDevices = EAndroidDevices = {}));
34
42
  class Cloud extends core_1.Command {
35
43
  static args = {
36
44
  firstFile: core_1.Args.string({
@@ -85,7 +93,15 @@ class Cloud extends core_1.Command {
85
93
  const supportediOSVersions = constants_1.iOSCompatibilityLookup[iOSDeviceID];
86
94
  const version = iOSVersion || '17';
87
95
  if (!supportediOSVersions.includes(version)) {
88
- throw new Error(`${iOSDeviceID} only supports these iOS versions: ${supportediOSVersions.join(',')}`);
96
+ throw new Error(`${iOSDeviceID} only supports these iOS versions: ${supportediOSVersions.join(', ')}`);
97
+ }
98
+ }
99
+ if (androidApiLevel || androidDevice) {
100
+ const androidDeviceID = androidDevice || 'pixel-7';
101
+ const supportedAndroidVersions = constants_1.AndroidCompatibilityLookup[androidDeviceID];
102
+ const version = androidApiLevel || '34';
103
+ if (!supportedAndroidVersions.includes(version)) {
104
+ throw new Error(`${androidDeviceID} only supports these Android API levels: ${supportedAndroidVersions.join(', ')}`);
89
105
  }
90
106
  }
91
107
  flowFile = path.resolve(flowFile);
@@ -234,6 +250,7 @@ class Cloud extends core_1.Command {
234
250
  (0, errors_1.error)('No tests created: ' + message);
235
251
  (0, cli_ux_1.info)(`\nCreated ${results.length} tests: ${results
236
252
  .map((r) => r.test_file_name)
253
+ .sort((a, b) => a.localeCompare(b))
237
254
  .join(', ')}\n`);
238
255
  (0, cli_ux_1.info)('Run triggered, you can access the results at:');
239
256
  const url = `https://console.devicecloud.dev/results?upload=${results[0].test_upload_id}&result=${results[0].id}`;
@@ -1,8 +1,8 @@
1
- import { EiOSDevices } from './commands/cloud';
1
+ import { EAndroidDevices, EiOSDevices } from './commands/cloud';
2
2
  export declare const flags: {
3
3
  'additional-app-binary-ids': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
4
4
  'additional-app-files': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
5
- 'android-api-level': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
5
+ 'android-api-level': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
6
6
  'android-device': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
7
7
  apiKey: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
8
8
  apiUrl: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -28,3 +28,6 @@ export declare const flags: {
28
28
  export declare const iOSCompatibilityLookup: {
29
29
  [k in EiOSDevices]: string[];
30
30
  };
31
+ export declare const AndroidCompatibilityLookup: {
32
+ [k in EAndroidDevices]: string[];
33
+ };
package/dist/constants.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.iOSCompatibilityLookup = exports.flags = void 0;
3
+ 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({
@@ -17,9 +17,9 @@ exports.flags = {
17
17
  multipleNonGreedy: true,
18
18
  parse: (input) => input.split(','),
19
19
  }),
20
- 'android-api-level': core_1.Flags.integer({
20
+ 'android-api-level': core_1.Flags.string({
21
21
  description: '[Android only] Android API level to run your flow against',
22
- options: ['33', '34', '35'],
22
+ options: ['29', '30', '31', '32', '33', '34', '35'],
23
23
  }),
24
24
  'android-device': core_1.Flags.string({
25
25
  description: '[Android only] Android device to run your flow against',
@@ -171,3 +171,10 @@ exports.iOSCompatibilityLookup = {
171
171
  'iphone-16-pro': ['18'],
172
172
  'iphone-16-pro-max': ['18'],
173
173
  };
174
+ exports.AndroidCompatibilityLookup = {
175
+ 'generic-tablet': ['33', '34', '35'],
176
+ 'pixel-6': ['29', '30', '31', '32', '33', '34', '35'],
177
+ 'pixel-6-pro': ['33', '34', '35'],
178
+ 'pixel-7': ['33', '34', '35'],
179
+ 'pixel-7-pro': ['33', '34', '35'],
180
+ };
package/dist/plan.js CHANGED
@@ -119,7 +119,9 @@ async function plan(input, includeTags, excludeTags, excludeFlows) {
119
119
  const flowsToRunInSequence = workspaceConfig.executionOrder?.flowsOrder
120
120
  ?.map((flowOrder) => (0, planMethods_1.getFlowsToRunInSequence)(pathsByName, [flowOrder]))
121
121
  .flat() || [];
122
- const normalFlows = allFlows.filter((flow) => !flowsToRunInSequence.includes(flow));
122
+ const normalFlows = allFlows
123
+ .filter((flow) => !flowsToRunInSequence.includes(flow))
124
+ .sort((a, b) => a.localeCompare(b));
123
125
  return {
124
126
  allExcludeTags,
125
127
  allIncludeTags,
@@ -41,6 +41,10 @@
41
41
  "hasDynamicHelp": false,
42
42
  "multiple": false,
43
43
  "options": [
44
+ "29",
45
+ "30",
46
+ "31",
47
+ "32",
44
48
  "33",
45
49
  "34",
46
50
  "35"
@@ -295,5 +299,5 @@
295
299
  ]
296
300
  }
297
301
  },
298
- "version": "2.2.0"
302
+ "version": "2.3.0"
299
303
  }
package/package.json CHANGED
@@ -80,7 +80,7 @@
80
80
  "test": "mocha --forbid-only \"test/**/*.test.ts\"",
81
81
  "version": "oclif readme && git add README.md"
82
82
  },
83
- "version": "2.2.0",
83
+ "version": "2.3.0",
84
84
  "bugs": {
85
85
  "url": "https://discord.gg/gm3mJwcNw8"
86
86
  },