@devicecloud.dev/dcd 0.0.1-alpha.7 → 0.0.1-alpha.8
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 +9 -9
- package/dist/commands/cloud.js +27 -24
- package/oclif.manifest.json +28 -28
- package/package.json +2 -1
package/dist/commands/cloud.d.ts
CHANGED
|
@@ -7,19 +7,19 @@ export default class Cloud extends Command {
|
|
|
7
7
|
static description: string;
|
|
8
8
|
static examples: string[];
|
|
9
9
|
static flags: {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
'android-api-level': import("@oclif/core/lib/interfaces").OptionFlag<number | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
11
|
+
'api-key': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
12
|
+
'api-url': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
13
|
+
'app-binary-id': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
14
|
+
'app-file': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
15
15
|
arm64: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
16
16
|
async: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
17
17
|
env: import("@oclif/core/lib/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
18
|
-
|
|
18
|
+
'exclude-tags': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
19
19
|
flows: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
'google-play': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
21
|
+
'include-tags': import("@oclif/core/lib/interfaces").OptionFlag<string[], import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
22
|
+
'ios-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
23
23
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
24
24
|
};
|
|
25
25
|
run(): Promise<void>;
|
package/dist/commands/cloud.js
CHANGED
|
@@ -96,23 +96,26 @@ class Cloud extends core_1.Command {
|
|
|
96
96
|
static description = `Test a Flow or set of Flows on devicecloud.dev (https://devicecloud.dev)\nProvide your application file and a folder with Maestro flows to run them in parallel on multiple devices in devicecloud.dev\nThe command will block until all analyses have completed`;
|
|
97
97
|
static examples = ['<%= config.bin %> <%= command.id %>'];
|
|
98
98
|
static flags = {
|
|
99
|
-
|
|
99
|
+
'android-api-level': core_1.Flags.integer({
|
|
100
100
|
aliases: ['android-api-level'],
|
|
101
101
|
description: '[Android only] Android API level to run your flow against',
|
|
102
102
|
options: ['32', '33', '34'],
|
|
103
103
|
}),
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
'api-key': core_1.Flags.string({
|
|
105
|
+
aliases: ['api-key'],
|
|
106
|
+
description: 'API key',
|
|
107
|
+
}),
|
|
108
|
+
'api-url': core_1.Flags.string({
|
|
106
109
|
aliases: ['api-url'],
|
|
107
110
|
default: 'https://api.devicecloud.dev',
|
|
108
111
|
description: 'API base URL',
|
|
109
112
|
hidden: true,
|
|
110
113
|
}),
|
|
111
|
-
|
|
114
|
+
'app-binary-id': core_1.Flags.string({
|
|
112
115
|
aliases: ['app-binary-id'],
|
|
113
116
|
description: 'The ID of the app binary previously uploaded to Maestro Cloud',
|
|
114
117
|
}),
|
|
115
|
-
|
|
118
|
+
'app-file': core_1.Flags.file({
|
|
116
119
|
aliases: ['app-file'],
|
|
117
120
|
description: 'App binary to run your flows against',
|
|
118
121
|
}),
|
|
@@ -130,7 +133,7 @@ class Cloud extends core_1.Command {
|
|
|
130
133
|
description: 'One or more environment variables to inject into your flows',
|
|
131
134
|
multiple: true,
|
|
132
135
|
}),
|
|
133
|
-
|
|
136
|
+
'exclude-tags': core_1.Flags.string({
|
|
134
137
|
aliases: ['exclude-tags'],
|
|
135
138
|
default: [],
|
|
136
139
|
description: 'Flows which have these tags will be excluded from the run',
|
|
@@ -140,23 +143,23 @@ class Cloud extends core_1.Command {
|
|
|
140
143
|
flows: core_1.Flags.string({
|
|
141
144
|
description: 'The path to the flow file or folder containing your flows',
|
|
142
145
|
}),
|
|
143
|
-
|
|
146
|
+
'google-play': core_1.Flags.boolean({
|
|
144
147
|
aliases: ['google-play'],
|
|
145
148
|
default: false,
|
|
146
149
|
description: '[Android only] Run your flow against Google Play devices',
|
|
147
150
|
}),
|
|
148
|
-
|
|
149
|
-
aliases: ['ios-version'],
|
|
150
|
-
description: '[iOS only] iOS version to run your flow against',
|
|
151
|
-
options: ['16.4', '17.2'],
|
|
152
|
-
}),
|
|
153
|
-
includeTags: core_1.Flags.string({
|
|
151
|
+
'include-tags': core_1.Flags.string({
|
|
154
152
|
aliases: ['include-tags'],
|
|
155
153
|
default: [],
|
|
156
154
|
description: 'Only flows which have these tags will be included in the run',
|
|
157
155
|
multiple: true,
|
|
158
156
|
parse: (input) => input.split(','),
|
|
159
157
|
}),
|
|
158
|
+
'ios-version': core_1.Flags.string({
|
|
159
|
+
aliases: ['ios-version'],
|
|
160
|
+
description: '[iOS only] iOS version to run your flow against',
|
|
161
|
+
options: ['16.4', '17.2'],
|
|
162
|
+
}),
|
|
160
163
|
orientation: core_1.Flags.string({
|
|
161
164
|
description: '[Android only] The orientation of the device to run your flow against in degrees',
|
|
162
165
|
options: ['0', '90', '180', '270'],
|
|
@@ -164,7 +167,7 @@ class Cloud extends core_1.Command {
|
|
|
164
167
|
};
|
|
165
168
|
async run() {
|
|
166
169
|
const { args, flags } = await this.parse(Cloud);
|
|
167
|
-
const { apiKey, apiUrl, appBinaryId, appFile, arm64, async, env, excludeTags, flows, googlePlay, includeTags, ...rest } = flags;
|
|
170
|
+
const { 'api-key': apiKey, 'api-url': apiUrl, 'app-binary-id': appBinaryId, 'app-file': appFile, arm64, async, env, 'exclude-tags': excludeTags, flows, 'google-play': googlePlay, 'include-tags': includeTags, orientation, ...rest } = flags;
|
|
168
171
|
if (arm64) {
|
|
169
172
|
(0, cli_ux_1.info)('Contact hello@devicecloud.dev to enquire about arm64 devices');
|
|
170
173
|
(0, cli_ux_1.exit)();
|
|
@@ -182,7 +185,9 @@ class Cloud extends core_1.Command {
|
|
|
182
185
|
if (!flowFile) {
|
|
183
186
|
throw new Error('You must provide a flow file');
|
|
184
187
|
}
|
|
185
|
-
|
|
188
|
+
let testFileNames = [];
|
|
189
|
+
let continueOnFailure = true;
|
|
190
|
+
let sequentialFlows = [];
|
|
186
191
|
if (!flowFile?.endsWith('.yaml') &&
|
|
187
192
|
!flowFile?.endsWith('.yml') &&
|
|
188
193
|
!flowFile?.endsWith('/')) {
|
|
@@ -190,13 +195,9 @@ class Cloud extends core_1.Command {
|
|
|
190
195
|
}
|
|
191
196
|
try {
|
|
192
197
|
const executionPlan = await (0, plan_1.plan)(flowFile, includeTags.flat(), excludeTags.flat());
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
for (const file of executionPlan.sequence?.flows ?? []) {
|
|
197
|
-
// todo: handle continueOnFailure and other sequence properties
|
|
198
|
-
testFileNames.push(file);
|
|
199
|
-
}
|
|
198
|
+
testFileNames = executionPlan.flowsToRun;
|
|
199
|
+
continueOnFailure = executionPlan.sequence?.continueOnFailure ?? true;
|
|
200
|
+
sequentialFlows = executionPlan.sequence?.flows ?? [];
|
|
200
201
|
}
|
|
201
202
|
catch (error) {
|
|
202
203
|
console.error(error);
|
|
@@ -244,8 +245,10 @@ class Cloud extends core_1.Command {
|
|
|
244
245
|
testFormData.set('file', blob, 'flowFile.zip');
|
|
245
246
|
testFormData.set('appBinaryId', finalBinaryId);
|
|
246
247
|
testFormData.set('testFileNames', JSON.stringify(testFileNames));
|
|
248
|
+
testFormData.set('sequentialFlows', JSON.stringify(sequentialFlows));
|
|
247
249
|
testFormData.set('env', JSON.stringify(envObject));
|
|
248
250
|
testFormData.set('googlePlay', googlePlay ? 'true' : 'false');
|
|
251
|
+
testFormData.set('config', JSON.stringify({ continueOnFailure, orientation }));
|
|
249
252
|
for (const [key, value] of Object.entries(rest)) {
|
|
250
253
|
if (value) {
|
|
251
254
|
testFormData.set(key, value);
|
|
@@ -278,8 +281,8 @@ class Cloud extends core_1.Command {
|
|
|
278
281
|
clearInterval(intervalId);
|
|
279
282
|
(0, errors_1.error)('No results found');
|
|
280
283
|
}
|
|
281
|
-
core_1.ux.action.status = `\nStatus | Test
|
|
282
|
-
────────── ─────────── `;
|
|
284
|
+
core_1.ux.action.status = `\nStatus | Test
|
|
285
|
+
────────── ─────────── `;
|
|
283
286
|
for (const { status, test_file_name: test } of updatedResults) {
|
|
284
287
|
core_1.ux.action.status += `\n${status.padEnd(10, ' ')} | ${test}`;
|
|
285
288
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"<%= config.bin %> <%= command.id %>"
|
|
20
20
|
],
|
|
21
21
|
"flags": {
|
|
22
|
-
"
|
|
22
|
+
"android-api-level": {
|
|
23
23
|
"aliases": [
|
|
24
24
|
"android-api-level"
|
|
25
25
|
],
|
|
26
26
|
"description": "[Android only] Android API level to run your flow against",
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "android-api-level",
|
|
28
28
|
"hasDynamicHelp": false,
|
|
29
29
|
"multiple": false,
|
|
30
30
|
"options": [
|
|
@@ -34,44 +34,44 @@
|
|
|
34
34
|
],
|
|
35
35
|
"type": "option"
|
|
36
36
|
},
|
|
37
|
-
"
|
|
37
|
+
"api-key": {
|
|
38
38
|
"aliases": [
|
|
39
39
|
"api-key"
|
|
40
40
|
],
|
|
41
41
|
"description": "API key",
|
|
42
|
-
"name": "
|
|
42
|
+
"name": "api-key",
|
|
43
43
|
"hasDynamicHelp": false,
|
|
44
44
|
"multiple": false,
|
|
45
45
|
"type": "option"
|
|
46
46
|
},
|
|
47
|
-
"
|
|
47
|
+
"api-url": {
|
|
48
48
|
"aliases": [
|
|
49
49
|
"api-url"
|
|
50
50
|
],
|
|
51
51
|
"description": "API base URL",
|
|
52
52
|
"hidden": true,
|
|
53
|
-
"name": "
|
|
53
|
+
"name": "api-url",
|
|
54
54
|
"default": "https://api.devicecloud.dev",
|
|
55
55
|
"hasDynamicHelp": false,
|
|
56
56
|
"multiple": false,
|
|
57
57
|
"type": "option"
|
|
58
58
|
},
|
|
59
|
-
"
|
|
59
|
+
"app-binary-id": {
|
|
60
60
|
"aliases": [
|
|
61
61
|
"app-binary-id"
|
|
62
62
|
],
|
|
63
63
|
"description": "The ID of the app binary previously uploaded to Maestro Cloud",
|
|
64
|
-
"name": "
|
|
64
|
+
"name": "app-binary-id",
|
|
65
65
|
"hasDynamicHelp": false,
|
|
66
66
|
"multiple": false,
|
|
67
67
|
"type": "option"
|
|
68
68
|
},
|
|
69
|
-
"
|
|
69
|
+
"app-file": {
|
|
70
70
|
"aliases": [
|
|
71
71
|
"app-file"
|
|
72
72
|
],
|
|
73
73
|
"description": "App binary to run your flows against",
|
|
74
|
-
"name": "
|
|
74
|
+
"name": "app-file",
|
|
75
75
|
"hasDynamicHelp": false,
|
|
76
76
|
"multiple": false,
|
|
77
77
|
"type": "option"
|
|
@@ -102,12 +102,12 @@
|
|
|
102
102
|
"multiple": true,
|
|
103
103
|
"type": "option"
|
|
104
104
|
},
|
|
105
|
-
"
|
|
105
|
+
"exclude-tags": {
|
|
106
106
|
"aliases": [
|
|
107
107
|
"exclude-tags"
|
|
108
108
|
],
|
|
109
109
|
"description": "Flows which have these tags will be excluded from the run",
|
|
110
|
-
"name": "
|
|
110
|
+
"name": "exclude-tags",
|
|
111
111
|
"default": [],
|
|
112
112
|
"hasDynamicHelp": false,
|
|
113
113
|
"multiple": true,
|
|
@@ -120,21 +120,32 @@
|
|
|
120
120
|
"multiple": false,
|
|
121
121
|
"type": "option"
|
|
122
122
|
},
|
|
123
|
-
"
|
|
123
|
+
"google-play": {
|
|
124
124
|
"aliases": [
|
|
125
125
|
"google-play"
|
|
126
126
|
],
|
|
127
127
|
"description": "[Android only] Run your flow against Google Play devices",
|
|
128
|
-
"name": "
|
|
128
|
+
"name": "google-play",
|
|
129
129
|
"allowNo": false,
|
|
130
130
|
"type": "boolean"
|
|
131
131
|
},
|
|
132
|
-
"
|
|
132
|
+
"include-tags": {
|
|
133
|
+
"aliases": [
|
|
134
|
+
"include-tags"
|
|
135
|
+
],
|
|
136
|
+
"description": "Only flows which have these tags will be included in the run",
|
|
137
|
+
"name": "include-tags",
|
|
138
|
+
"default": [],
|
|
139
|
+
"hasDynamicHelp": false,
|
|
140
|
+
"multiple": true,
|
|
141
|
+
"type": "option"
|
|
142
|
+
},
|
|
143
|
+
"ios-version": {
|
|
133
144
|
"aliases": [
|
|
134
145
|
"ios-version"
|
|
135
146
|
],
|
|
136
147
|
"description": "[iOS only] iOS version to run your flow against",
|
|
137
|
-
"name": "
|
|
148
|
+
"name": "ios-version",
|
|
138
149
|
"hasDynamicHelp": false,
|
|
139
150
|
"multiple": false,
|
|
140
151
|
"options": [
|
|
@@ -143,17 +154,6 @@
|
|
|
143
154
|
],
|
|
144
155
|
"type": "option"
|
|
145
156
|
},
|
|
146
|
-
"includeTags": {
|
|
147
|
-
"aliases": [
|
|
148
|
-
"include-tags"
|
|
149
|
-
],
|
|
150
|
-
"description": "Only flows which have these tags will be included in the run",
|
|
151
|
-
"name": "includeTags",
|
|
152
|
-
"default": [],
|
|
153
|
-
"hasDynamicHelp": false,
|
|
154
|
-
"multiple": true,
|
|
155
|
-
"type": "option"
|
|
156
|
-
},
|
|
157
157
|
"orientation": {
|
|
158
158
|
"description": "[Android only] The orientation of the device to run your flow against in degrees",
|
|
159
159
|
"name": "orientation",
|
|
@@ -184,5 +184,5 @@
|
|
|
184
184
|
]
|
|
185
185
|
}
|
|
186
186
|
},
|
|
187
|
-
"version": "0.0.1-alpha.
|
|
187
|
+
"version": "0.0.1-alpha.8"
|
|
188
188
|
}
|
package/package.json
CHANGED
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"url": "@devicecloud.dev/dcd"
|
|
66
66
|
},
|
|
67
67
|
"scripts": {
|
|
68
|
+
"dcd": "./bin/dev.js",
|
|
68
69
|
"build": "shx rm -rf dist && tsc -b",
|
|
69
70
|
"lint": "eslint . --ext .ts",
|
|
70
71
|
"postpack": "shx rm -f oclif.manifest.json",
|
|
@@ -74,7 +75,7 @@
|
|
|
74
75
|
"test": "mocha --forbid-only \"test/**/*.test.ts\"",
|
|
75
76
|
"version": "oclif readme && git add README.md"
|
|
76
77
|
},
|
|
77
|
-
"version": "0.0.1-alpha.
|
|
78
|
+
"version": "0.0.1-alpha.8",
|
|
78
79
|
"bugs": {
|
|
79
80
|
"url": "https://discord.gg/GzZBHcUJ"
|
|
80
81
|
},
|