@devicecloud.dev/dcd 4.2.6 → 4.3.1
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 +1 -0
- package/dist/commands/cloud.js +12 -2
- package/dist/config/flags/device.flags.d.ts +1 -0
- package/dist/config/flags/device.flags.js +4 -0
- package/dist/config/flags/execution.flags.js +1 -1
- package/dist/config/flags/output.flags.js +1 -1
- package/dist/constants.d.ts +1 -0
- package/dist/gateways/api-gateway.d.ts +2 -0
- package/dist/gateways/api-gateway.js +2 -1
- package/dist/methods.js +1 -0
- package/dist/services/report-download.service.d.ts +1 -1
- package/dist/services/report-download.service.js +2 -1
- package/dist/services/test-submission.service.d.ts +1 -0
- package/dist/services/test-submission.service.js +5 -2
- package/dist/types/generated/schema.types.d.ts +495 -171
- package/dist/types/schema.types.d.ts +117 -53
- package/oclif.manifest.json +10 -3
- package/package.json +1 -1
package/dist/commands/cloud.d.ts
CHANGED
|
@@ -57,6 +57,7 @@ export default class Cloud extends Command {
|
|
|
57
57
|
'show-crosshairs': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
58
58
|
'maestro-chrome-onboarding': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
59
59
|
'android-no-snapshot': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
60
|
+
'enable-animations': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
60
61
|
'app-binary-id': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
61
62
|
'app-file': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
62
63
|
'ignore-sha-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
package/dist/commands/cloud.js
CHANGED
|
@@ -164,6 +164,15 @@ class Cloud extends core_1.Command {
|
|
|
164
164
|
debug,
|
|
165
165
|
logger: this.log.bind(this),
|
|
166
166
|
});
|
|
167
|
+
const DEPRECATED_MAESTRO_VERSIONS = ['1.39.2', '1.39.7'];
|
|
168
|
+
if (DEPRECATED_MAESTRO_VERSIONS.includes(resolvedMaestroVersion)) {
|
|
169
|
+
this.log(`\n${styling_1.dividers.light}\n` +
|
|
170
|
+
`${styling_1.colors.warning('⚠')} ${styling_1.colors.bold('Deprecation Warning')}\n` +
|
|
171
|
+
styling_1.colors.dim(`Maestro version ${resolvedMaestroVersion} is deprecated and will be removed soon. `) +
|
|
172
|
+
styling_1.colors.dim(`Please upgrade to a newer version. See: `) +
|
|
173
|
+
styling_1.colors.info('https://docs.devicecloud.dev/reference/maestro-versions') + `\n` +
|
|
174
|
+
`${styling_1.dividers.light}\n`);
|
|
175
|
+
}
|
|
167
176
|
if (retry && retry > 2) {
|
|
168
177
|
this.log(styling_1.colors.warning('⚠') + ' ' + styling_1.colors.dim("Retries are now free of charge but limited to 2. If your test is still failing after 2 retries, please ask for help on Discord."));
|
|
169
178
|
flags.retry = 2;
|
|
@@ -404,6 +413,7 @@ class Cloud extends core_1.Command {
|
|
|
404
413
|
runnerType,
|
|
405
414
|
showCrosshairs: flags['show-crosshairs'],
|
|
406
415
|
maestroChromeOnboarding: flags['maestro-chrome-onboarding'],
|
|
416
|
+
enableAnimations: flags['enable-animations'],
|
|
407
417
|
});
|
|
408
418
|
if (debug) {
|
|
409
419
|
this.log(`[DEBUG] Submitting flow upload request to ${apiUrl}/uploads/flow`);
|
|
@@ -490,7 +500,7 @@ class Cloud extends core_1.Command {
|
|
|
490
500
|
warnLogger: this.warn.bind(this),
|
|
491
501
|
});
|
|
492
502
|
}
|
|
493
|
-
if (report && ['allure', 'html', 'junit'].includes(report)) {
|
|
503
|
+
if (report && ['allure', 'html', 'html-detailed', 'junit'].includes(report)) {
|
|
494
504
|
await this.reportDownloadService.downloadReports({
|
|
495
505
|
allurePath,
|
|
496
506
|
apiKey,
|
|
@@ -522,7 +532,7 @@ class Cloud extends core_1.Command {
|
|
|
522
532
|
});
|
|
523
533
|
}
|
|
524
534
|
// Handle report downloads based on --report flag
|
|
525
|
-
if (report && ['allure', 'html', 'junit'].includes(report)) {
|
|
535
|
+
if (report && ['allure', 'html', 'html-detailed', 'junit'].includes(report)) {
|
|
526
536
|
await this.reportDownloadService.downloadReports({
|
|
527
537
|
allurePath,
|
|
528
538
|
apiKey,
|
|
@@ -12,4 +12,5 @@ export declare const deviceFlags: {
|
|
|
12
12
|
'show-crosshairs': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
13
13
|
'maestro-chrome-onboarding': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
14
14
|
'android-no-snapshot': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
|
+
'enable-animations': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
15
16
|
};
|
|
@@ -47,4 +47,8 @@ exports.deviceFlags = {
|
|
|
47
47
|
default: false,
|
|
48
48
|
description: '[Android only] Force cold boot instead of using snapshot boot. This is automatically enabled for API 35+ but can be used to force cold boot on older API levels.',
|
|
49
49
|
}),
|
|
50
|
+
'enable-animations': core_1.Flags.boolean({
|
|
51
|
+
default: false,
|
|
52
|
+
description: '[Android only] Keep device animations enabled during test execution. By default, animations are disabled to reduce CPU load and improve test reliability.',
|
|
53
|
+
}),
|
|
50
54
|
};
|
|
@@ -37,7 +37,7 @@ exports.executionFlags = {
|
|
|
37
37
|
}),
|
|
38
38
|
'maestro-version': core_1.Flags.string({
|
|
39
39
|
aliases: ['maestroVersion'],
|
|
40
|
-
description: 'Maestro version to run your flow against. Use "latest" for the most recent version.
|
|
40
|
+
description: 'Maestro version to run your flow against. Use "latest" for the most recent version. See https://docs.devicecloud.dev/reference/maestro-versions for supported versions.',
|
|
41
41
|
}),
|
|
42
42
|
retry: core_1.Flags.integer({
|
|
43
43
|
description: 'Automatically retry the run up to the number of times specified (same as pressing retry in the UI) - this is free of charge',
|
|
@@ -56,6 +56,6 @@ exports.outputFlags = {
|
|
|
56
56
|
report: core_1.Flags.string({
|
|
57
57
|
aliases: ['format'],
|
|
58
58
|
description: 'Generate and download test reports in the specified format. Use "allure" for a complete HTML report.',
|
|
59
|
-
options: ['allure', 'junit', 'html'],
|
|
59
|
+
options: ['allure', 'junit', 'html', 'html-detailed'],
|
|
60
60
|
}),
|
|
61
61
|
};
|
package/dist/constants.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export declare const flags: {
|
|
|
44
44
|
'show-crosshairs': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
45
45
|
'maestro-chrome-onboarding': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
46
46
|
'android-no-snapshot': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
47
|
+
'enable-animations': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
47
48
|
'app-binary-id': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
48
49
|
'app-file': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
49
50
|
'ignore-sha-check': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
@@ -23,6 +23,7 @@ export declare const ApiGateway: {
|
|
|
23
23
|
apiKey: string;
|
|
24
24
|
backblazeSuccess: boolean;
|
|
25
25
|
baseUrl: string;
|
|
26
|
+
bytes: number;
|
|
26
27
|
id: string;
|
|
27
28
|
metadata: TAppMetadata;
|
|
28
29
|
path: string;
|
|
@@ -35,6 +36,7 @@ export declare const ApiGateway: {
|
|
|
35
36
|
finalPath: string;
|
|
36
37
|
id: string;
|
|
37
38
|
b2?: import("../types/generated/schema.types").components["schemas"]["B2UploadStrategy"];
|
|
39
|
+
token?: string;
|
|
38
40
|
}>;
|
|
39
41
|
finishLargeFile(baseUrl: string, apiKey: string, fileId: string, partSha1Array: string[]): Promise<any>;
|
|
40
42
|
getResultsForUpload(baseUrl: string, apiKey: string, uploadId: string): Promise<{
|
|
@@ -156,11 +156,12 @@ exports.ApiGateway = {
|
|
|
156
156
|
}
|
|
157
157
|
},
|
|
158
158
|
async finaliseUpload(config) {
|
|
159
|
-
const { baseUrl, apiKey, id, metadata, path, sha, supabaseSuccess, backblazeSuccess } = config;
|
|
159
|
+
const { baseUrl, apiKey, id, metadata, path, sha, supabaseSuccess, backblazeSuccess, bytes } = config;
|
|
160
160
|
try {
|
|
161
161
|
const res = await fetch(`${baseUrl}/uploads/finaliseUpload`, {
|
|
162
162
|
body: JSON.stringify({
|
|
163
163
|
backblazeSuccess,
|
|
164
|
+
bytes,
|
|
164
165
|
id,
|
|
165
166
|
metadata,
|
|
166
167
|
path, // This is tempPath for TUS uploads
|
package/dist/methods.js
CHANGED
|
@@ -14,7 +14,7 @@ export interface ReportDownloadOptions extends DownloadOptions {
|
|
|
14
14
|
allurePath?: string;
|
|
15
15
|
htmlPath?: string;
|
|
16
16
|
junitPath?: string;
|
|
17
|
-
reportType: 'allure' | 'html' | 'junit';
|
|
17
|
+
reportType: 'allure' | 'html' | 'html-detailed' | 'junit';
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Service for downloading test artifacts and reports
|
|
@@ -57,7 +57,8 @@ class ReportDownloadService {
|
|
|
57
57
|
});
|
|
58
58
|
break;
|
|
59
59
|
}
|
|
60
|
-
case 'html':
|
|
60
|
+
case 'html':
|
|
61
|
+
case 'html-detailed': {
|
|
61
62
|
const htmlReportPath = path.resolve(process.cwd(), htmlPath || 'report.html');
|
|
62
63
|
await this.downloadReport('html', htmlReportPath, {
|
|
63
64
|
...downloadOptions,
|
|
@@ -17,7 +17,7 @@ class TestSubmissionService {
|
|
|
17
17
|
* @returns FormData ready to be submitted to the API
|
|
18
18
|
*/
|
|
19
19
|
async buildTestFormData(config) {
|
|
20
|
-
const { appBinaryId, flowFile, executionPlan, commonRoot, cliVersion, env = [], metadata = [], googlePlay = false, androidApiLevel, androidDevice, androidNoSnapshot, iOSVersion, iOSDevice, name, runnerType, maestroVersion, deviceLocale, orientation, mitmHost, mitmPath, retry, continueOnFailure = true, report, showCrosshairs, maestroChromeOnboarding, raw, debug = false, logger, } = config;
|
|
20
|
+
const { appBinaryId, flowFile, executionPlan, commonRoot, cliVersion, env = [], metadata = [], googlePlay = false, androidApiLevel, androidDevice, androidNoSnapshot, iOSVersion, iOSDevice, name, runnerType, maestroVersion, deviceLocale, orientation, mitmHost, mitmPath, retry, continueOnFailure = true, report, showCrosshairs, maestroChromeOnboarding, raw, enableAnimations, debug = false, logger, } = config;
|
|
21
21
|
const { allExcludeTags, allIncludeTags, flowMetadata, flowOverrides, flowsToRun: testFileNames, referencedFiles, sequence, workspaceConfig, } = executionPlan;
|
|
22
22
|
const { flows: sequentialFlows = [] } = sequence ?? {};
|
|
23
23
|
const testFormData = new FormData();
|
|
@@ -65,7 +65,8 @@ class TestSubmissionService {
|
|
|
65
65
|
testFormData.set('testFileOverrides', JSON.stringify(this.normalizePathMap(flowOverrides, commonRoot)));
|
|
66
66
|
testFormData.set('sequentialFlows', JSON.stringify(this.normalizePaths(sequentialFlows, commonRoot)));
|
|
67
67
|
testFormData.set('env', JSON.stringify(envObject));
|
|
68
|
-
|
|
68
|
+
// Note: googlePlay is now included in configPayload below instead of as a separate field
|
|
69
|
+
// to work around a FormData parsing issue in the API
|
|
69
70
|
const configPayload = {
|
|
70
71
|
allExcludeTags,
|
|
71
72
|
allIncludeTags,
|
|
@@ -73,6 +74,7 @@ class TestSubmissionService {
|
|
|
73
74
|
autoRetriesRemaining: retry,
|
|
74
75
|
continueOnFailure,
|
|
75
76
|
deviceLocale,
|
|
77
|
+
googlePlay,
|
|
76
78
|
maestroVersion,
|
|
77
79
|
mitmHost,
|
|
78
80
|
mitmPath,
|
|
@@ -81,6 +83,7 @@ class TestSubmissionService {
|
|
|
81
83
|
report,
|
|
82
84
|
showCrosshairs,
|
|
83
85
|
maestroChromeOnboarding,
|
|
86
|
+
enableAnimations,
|
|
84
87
|
version: cliVersion,
|
|
85
88
|
};
|
|
86
89
|
testFormData.set('config', JSON.stringify(configPayload));
|