@devicecloud.dev/dcd 3.7.1 → 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 +10 -3
- package/dist/constants.js +13 -1
- package/dist/gateways/ApiGateway.js +1 -0
- package/dist/plan.d.ts +1 -0
- package/dist/plan.js +10 -0
- package/oclif.manifest.json +7 -2
- package/package.json +2 -2
package/dist/commands/cloud.js
CHANGED
|
@@ -125,8 +125,11 @@ class Cloud extends core_1.Command {
|
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
const [major] = process.versions.node.split('.').map(Number);
|
|
128
|
-
if (major <
|
|
129
|
-
|
|
128
|
+
if (major < 20) {
|
|
129
|
+
this.warn(`WARNING: You are using node version ${major}. DeviceCloud requires node version 20 or later`);
|
|
130
|
+
if (major < 18) {
|
|
131
|
+
throw new Error('Invalid node version');
|
|
132
|
+
}
|
|
130
133
|
}
|
|
131
134
|
await this.versionCheck();
|
|
132
135
|
// Download and expand Moropo zip if API key is present
|
|
@@ -330,7 +333,7 @@ class Cloud extends core_1.Command {
|
|
|
330
333
|
}
|
|
331
334
|
throw error;
|
|
332
335
|
}
|
|
333
|
-
const { allExcludeTags, allIncludeTags, flowsToRun: testFileNames, referencedFiles, sequence, workspaceConfig, } = executionPlan;
|
|
336
|
+
const { allExcludeTags, allIncludeTags, flowsToRun: testFileNames, flowMetadata, referencedFiles, sequence, workspaceConfig, } = executionPlan;
|
|
334
337
|
if (debug) {
|
|
335
338
|
this.log(`DEBUG: All include tags: ${allIncludeTags?.join(', ') || 'none'}`);
|
|
336
339
|
this.log(`DEBUG: All exclude tags: ${allExcludeTags?.join(', ') || 'none'}`);
|
|
@@ -470,6 +473,10 @@ class Cloud extends core_1.Command {
|
|
|
470
473
|
testFormData.set('file', blob, 'flowFile.zip');
|
|
471
474
|
testFormData.set('appBinaryId', finalBinaryId);
|
|
472
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
|
+
]))));
|
|
473
480
|
testFormData.set('sequentialFlows', JSON.stringify(sequentialFlows.map((t) => t.replaceAll(commonRoot, '.').split(path.sep).join('/'))));
|
|
474
481
|
testFormData.set('env', JSON.stringify(envObject));
|
|
475
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
|
}
|
package/package.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"typescript": "^5"
|
|
44
44
|
},
|
|
45
45
|
"engines": {
|
|
46
|
-
"node": ">=
|
|
46
|
+
"node": ">=20.0.0"
|
|
47
47
|
},
|
|
48
48
|
"files": [
|
|
49
49
|
"/bin",
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"prepare": "yarn build",
|
|
80
80
|
"version": "oclif readme && git add README.md"
|
|
81
81
|
},
|
|
82
|
-
"version": "3.7.
|
|
82
|
+
"version": "3.7.4",
|
|
83
83
|
"bugs": {
|
|
84
84
|
"url": "https://discord.gg/gm3mJwcNw8"
|
|
85
85
|
},
|