@devicecloud.dev/dcd 2.0.0 → 2.1.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.
@@ -32,7 +32,6 @@ export default class Cloud extends Command {
32
32
  apiUrl: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
33
33
  'app-binary-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
34
34
  'app-file': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
35
- arm64: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
36
35
  async: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
37
36
  'device-locale': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
38
37
  'download-artifacts': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
@@ -55,11 +55,7 @@ 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, arm64, 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;
59
- if (arm64) {
60
- (0, cli_ux_1.info)('Contact hello@devicecloud.dev to enquire about arm64 devices');
61
- (0, cli_ux_1.exit)();
62
- }
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;
63
59
  if (!apiKey)
64
60
  throw new Error('You must provide an API key');
65
61
  const additionalAppBinaryIds = nonFlatAdditionalAppBinaryIds?.flat();
@@ -78,10 +74,11 @@ class Cloud extends core_1.Command {
78
74
  if (!flowFile) {
79
75
  throw new Error('You must provide a flow file');
80
76
  }
81
- if (iOSVersion) {
77
+ if (iOSVersion || iOSDevice) {
82
78
  const iOSDeviceID = iOSDevice || 'iphone-14';
83
79
  const supportediOSVersions = constants_1.iOSCompatibilityLookup[iOSDeviceID];
84
- if (!supportediOSVersions.includes(iOSVersion)) {
80
+ const version = iOSVersion || '17';
81
+ if (!supportediOSVersions.includes(version)) {
85
82
  throw new Error(`${iOSDeviceID} only supports these iOS versions: ${supportediOSVersions.join(',')}`);
86
83
  }
87
84
  }
@@ -100,7 +97,7 @@ class Cloud extends core_1.Command {
100
97
  // eslint-disable-next-line unicorn/no-process-exit
101
98
  process.exit(2);
102
99
  }
103
- const { allExcludeTags, allIncludeTags, flowsToRun: testFileNames, referencedFiles, sequence, } = executionPlan;
100
+ const { allExcludeTags, allIncludeTags, flowsToRun: testFileNames, referencedFiles, sequence, workspaceConfig, } = executionPlan;
104
101
  const pathsShortestToLongest = [
105
102
  ...testFileNames,
106
103
  ...referencedFiles,
@@ -214,6 +211,8 @@ class Cloud extends core_1.Command {
214
211
  testFormData.set('iOSDevice', iOSDevice.toString());
215
212
  if (name)
216
213
  testFormData.set('name', name.toString());
214
+ if (workspaceConfig)
215
+ testFormData.set('workspaceConfig', JSON.stringify(workspaceConfig));
217
216
  for (const [key, value] of Object.entries(rest)) {
218
217
  if (value) {
219
218
  testFormData.set(key, value);
@@ -8,7 +8,6 @@ export declare const flags: {
8
8
  apiUrl: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
9
9
  'app-binary-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
10
10
  'app-file': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
11
- arm64: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
12
11
  async: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
13
12
  'device-locale': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
14
13
  'download-artifacts': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
package/dist/constants.js CHANGED
@@ -49,10 +49,6 @@ exports.flags = {
49
49
  aliases: ['app-file'],
50
50
  description: 'App binary to run your flows against',
51
51
  }),
52
- arm64: core_1.Flags.boolean({
53
- default: false,
54
- description: '[Android only] Run your flow against arm64 devices',
55
- }),
56
52
  async: core_1.Flags.boolean({
57
53
  description: 'Wait for the results of the run',
58
54
  }),
package/dist/plan.d.ts CHANGED
@@ -1,3 +1,17 @@
1
+ interface IWorkspaceConfig {
2
+ excludeTags?: null | string[];
3
+ executionOrder?: IExecutionOrder | null;
4
+ flows?: null | string[];
5
+ includeTags?: null | string[];
6
+ local?: ILocal | null;
7
+ }
8
+ interface ILocal {
9
+ deterministicOrder: boolean | null;
10
+ }
11
+ interface IExecutionOrder {
12
+ continueOnFailure: boolean;
13
+ flowsOrder: string[];
14
+ }
1
15
  interface IExecutionPlan {
2
16
  allExcludeTags?: null | string[];
3
17
  allIncludeTags?: null | string[];
@@ -5,6 +19,7 @@ interface IExecutionPlan {
5
19
  referencedFiles: string[];
6
20
  sequence?: IFlowSequence | null;
7
21
  totalFlowFiles: number;
22
+ workspaceConfig?: IWorkspaceConfig;
8
23
  }
9
24
  interface IFlowSequence {
10
25
  continueOnFailure?: boolean;
package/dist/plan.js CHANGED
@@ -130,5 +130,6 @@ async function plan(input, includeTags, excludeTags, excludeFlows) {
130
130
  flows: flowsToRunInSequence,
131
131
  },
132
132
  totalFlowFiles: unfilteredFlowFiles.length,
133
+ workspaceConfig,
133
134
  };
134
135
  }
@@ -104,12 +104,6 @@
104
104
  "multiple": false,
105
105
  "type": "option"
106
106
  },
107
- "arm64": {
108
- "description": "[Android only] Run your flow against arm64 devices",
109
- "name": "arm64",
110
- "allowNo": false,
111
- "type": "boolean"
112
- },
113
107
  "async": {
114
108
  "description": "Wait for the results of the run",
115
109
  "name": "async",
@@ -293,5 +287,5 @@
293
287
  ]
294
288
  }
295
289
  },
296
- "version": "2.0.0"
290
+ "version": "2.1.0"
297
291
  }
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.0.0",
83
+ "version": "2.1.0",
84
84
  "bugs": {
85
85
  "url": "https://discord.gg/gm3mJwcNw8"
86
86
  },