@devicecloud.dev/dcd 3.7.3 → 3.7.4
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.js +5 -1
- package/dist/constants.js +13 -1
- package/dist/plan.d.ts +1 -0
- package/dist/plan.js +10 -0
- package/oclif.manifest.json +7 -2
- package/package.json +1 -1
package/dist/commands/cloud.js
CHANGED
|
@@ -333,7 +333,7 @@ class Cloud extends core_1.Command {
|
|
|
333
333
|
}
|
|
334
334
|
throw error;
|
|
335
335
|
}
|
|
336
|
-
const { allExcludeTags, allIncludeTags, flowsToRun: testFileNames, referencedFiles, sequence, workspaceConfig, } = executionPlan;
|
|
336
|
+
const { allExcludeTags, allIncludeTags, flowsToRun: testFileNames, flowMetadata, referencedFiles, sequence, workspaceConfig, } = executionPlan;
|
|
337
337
|
if (debug) {
|
|
338
338
|
this.log(`DEBUG: All include tags: ${allIncludeTags?.join(', ') || 'none'}`);
|
|
339
339
|
this.log(`DEBUG: All exclude tags: ${allExcludeTags?.join(', ') || 'none'}`);
|
|
@@ -473,6 +473,10 @@ class Cloud extends core_1.Command {
|
|
|
473
473
|
testFormData.set('file', blob, 'flowFile.zip');
|
|
474
474
|
testFormData.set('appBinaryId', finalBinaryId);
|
|
475
475
|
testFormData.set('testFileNames', JSON.stringify(testFileNames.map((t) => t.replaceAll(commonRoot, '.').split(path.sep).join('/'))));
|
|
476
|
+
testFormData.set('flowMetadata', JSON.stringify(Object.fromEntries(Object.entries(flowMetadata).map(([key, value]) => [
|
|
477
|
+
key.replaceAll(commonRoot, '.').split(path.sep).join('/'),
|
|
478
|
+
value,
|
|
479
|
+
]))));
|
|
476
480
|
testFormData.set('sequentialFlows', JSON.stringify(sequentialFlows.map((t) => t.replaceAll(commonRoot, '.').split(path.sep).join('/'))));
|
|
477
481
|
testFormData.set('env', JSON.stringify(envObject));
|
|
478
482
|
testFormData.set('googlePlay', googlePlay ? 'true' : 'false');
|
package/dist/constants.js
CHANGED
|
@@ -145,7 +145,19 @@ exports.flags = {
|
|
|
145
145
|
aliases: ['maestroVersion'],
|
|
146
146
|
default: '1.39.5',
|
|
147
147
|
description: 'Maestro version to run your flow against',
|
|
148
|
-
options: [
|
|
148
|
+
options: [
|
|
149
|
+
'1.39.0',
|
|
150
|
+
'1.39.1',
|
|
151
|
+
'1.39.2',
|
|
152
|
+
'1.39.4',
|
|
153
|
+
'1.39.5',
|
|
154
|
+
'1.39.7',
|
|
155
|
+
'1.40.0',
|
|
156
|
+
'1.40.1',
|
|
157
|
+
'1.40.2',
|
|
158
|
+
'1.40.3',
|
|
159
|
+
'1.41.0',
|
|
160
|
+
],
|
|
149
161
|
}),
|
|
150
162
|
mitmHost: core_1.Flags.string({
|
|
151
163
|
description: 'used for mitmproxy support, enterprise only, contact support if interested',
|
package/dist/plan.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ interface IExecutionPlan {
|
|
|
17
17
|
allIncludeTags?: null | string[];
|
|
18
18
|
flowsToRun: string[];
|
|
19
19
|
referencedFiles: string[];
|
|
20
|
+
flowMetadata: Record<string, Record<string, unknown>>;
|
|
20
21
|
sequence?: IFlowSequence | null;
|
|
21
22
|
totalFlowFiles: number;
|
|
22
23
|
workspaceConfig?: IWorkspaceConfig;
|
package/dist/plan.js
CHANGED
|
@@ -54,6 +54,7 @@ function getWorkspaceConfig(input, unfilteredFlowFiles) {
|
|
|
54
54
|
}
|
|
55
55
|
async function plan(input, includeTags, excludeTags, excludeFlows, configFile) {
|
|
56
56
|
const normalizedInput = path.normalize(input);
|
|
57
|
+
const flowMetadata = {};
|
|
57
58
|
if (!fs.existsSync(normalizedInput)) {
|
|
58
59
|
throw new Error(`Flow path does not exist: ${path.resolve(normalizedInput)}`);
|
|
59
60
|
}
|
|
@@ -62,10 +63,15 @@ async function plan(input, includeTags, excludeTags, excludeFlows, configFile) {
|
|
|
62
63
|
normalizedInput.endsWith('config.yml')) {
|
|
63
64
|
throw new Error('If using config.yaml, pass the workspace folder path, not the config file or a custom path via --config');
|
|
64
65
|
}
|
|
66
|
+
const { config } = (0, planMethods_1.readTestYamlFileAsJson)(normalizedInput);
|
|
67
|
+
if (config) {
|
|
68
|
+
flowMetadata[normalizedInput] = config;
|
|
69
|
+
}
|
|
65
70
|
const checkedDependancies = await checkDependencies(normalizedInput);
|
|
66
71
|
return {
|
|
67
72
|
flowsToRun: [normalizedInput],
|
|
68
73
|
referencedFiles: [...new Set(checkedDependancies)],
|
|
74
|
+
flowMetadata,
|
|
69
75
|
totalFlowFiles: 1,
|
|
70
76
|
};
|
|
71
77
|
}
|
|
@@ -129,6 +135,9 @@ async function plan(input, includeTags, excludeTags, excludeFlows, configFile) {
|
|
|
129
135
|
const allFlows = unfilteredFlowFiles.filter((filePath) => {
|
|
130
136
|
const config = configPerFlowFile[filePath];
|
|
131
137
|
const tags = config?.tags || [];
|
|
138
|
+
if (config) {
|
|
139
|
+
flowMetadata[filePath] = config;
|
|
140
|
+
}
|
|
132
141
|
return ((allIncludeTags.length === 0 ||
|
|
133
142
|
tags.some((tag) => allIncludeTags.includes(tag))) &&
|
|
134
143
|
(allExcludeTags.length === 0 ||
|
|
@@ -158,6 +167,7 @@ async function plan(input, includeTags, excludeTags, excludeFlows, configFile) {
|
|
|
158
167
|
allIncludeTags,
|
|
159
168
|
flowsToRun: normalFlows,
|
|
160
169
|
referencedFiles: [...new Set(allFiles)],
|
|
170
|
+
flowMetadata,
|
|
161
171
|
sequence: {
|
|
162
172
|
continueOnFailure: workspaceConfig.executionOrder?.continueOnFailure,
|
|
163
173
|
flows: flowsToRunInSequence,
|
package/oclif.manifest.json
CHANGED
|
@@ -283,7 +283,12 @@
|
|
|
283
283
|
"1.39.2",
|
|
284
284
|
"1.39.4",
|
|
285
285
|
"1.39.5",
|
|
286
|
-
"1.39.7"
|
|
286
|
+
"1.39.7",
|
|
287
|
+
"1.40.0",
|
|
288
|
+
"1.40.1",
|
|
289
|
+
"1.40.2",
|
|
290
|
+
"1.40.3",
|
|
291
|
+
"1.41.0"
|
|
287
292
|
],
|
|
288
293
|
"type": "option"
|
|
289
294
|
},
|
|
@@ -544,5 +549,5 @@
|
|
|
544
549
|
]
|
|
545
550
|
}
|
|
546
551
|
},
|
|
547
|
-
"version": "3.7.
|
|
552
|
+
"version": "3.7.4"
|
|
548
553
|
}
|