@devicecloud.dev/dcd 3.4.2 → 3.4.3
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 +14 -5
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/dist/commands/cloud.js
CHANGED
|
@@ -42,11 +42,9 @@ var EAndroidDevices;
|
|
|
42
42
|
process.removeAllListeners('warning');
|
|
43
43
|
process.on('warning', (warning) => {
|
|
44
44
|
if (warning.name === 'DeprecationWarning' &&
|
|
45
|
-
|
|
46
|
-
warning.message.includes('Not sure what to do with typed value of type 0x4'))) {
|
|
45
|
+
warning.message.includes('punycode')) {
|
|
47
46
|
return;
|
|
48
47
|
}
|
|
49
|
-
console.warn(warning);
|
|
50
48
|
});
|
|
51
49
|
class Cloud extends core_1.Command {
|
|
52
50
|
static args = {
|
|
@@ -81,13 +79,24 @@ class Cloud extends core_1.Command {
|
|
|
81
79
|
async run() {
|
|
82
80
|
let output = null;
|
|
83
81
|
try {
|
|
82
|
+
const { args, flags, raw } = await this.parse(Cloud);
|
|
83
|
+
let { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey: apiKeyFlag, 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, 'ignore-sha-check': ignoreShaCheck, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, retry, report, 'runner-type': runnerType, 'x86-arch': x86Arch, json, ...rest } = flags;
|
|
84
|
+
// If in JSON mode, temporarily intercept stdout to suppress the warning
|
|
85
|
+
if (json) {
|
|
86
|
+
const originalStdoutWrite = process.stdout.write;
|
|
87
|
+
process.stdout.write = function (chunk, encodingOrCallback, cb) {
|
|
88
|
+
if (typeof chunk === 'string' &&
|
|
89
|
+
chunk.includes('Not sure what to do with typed value of type 0x4')) {
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
return originalStdoutWrite.call(process.stdout, chunk, encodingOrCallback, cb);
|
|
93
|
+
};
|
|
94
|
+
}
|
|
84
95
|
const [major] = process.versions.node.split('.').map(Number);
|
|
85
96
|
if (major < 18) {
|
|
86
97
|
throw new Error(`You are using node version ${major}. DCD requires node version 18 or later`);
|
|
87
98
|
}
|
|
88
99
|
await this.versionCheck();
|
|
89
|
-
const { args, flags, raw } = await this.parse(Cloud);
|
|
90
|
-
let { 'additional-app-binary-ids': nonFlatAdditionalAppBinaryIds, 'additional-app-files': nonFlatAdditionalAppFiles, 'android-api-level': androidApiLevel, 'android-device': androidDevice, apiKey: apiKeyFlag, 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, 'ignore-sha-check': ignoreShaCheck, 'ios-device': iOSDevice, 'ios-version': iOSVersion, 'maestro-version': maestroVersion, name, orientation, quiet, retry, report, 'runner-type': runnerType, 'x86-arch': x86Arch, json, ...rest } = flags;
|
|
91
100
|
const apiKey = apiKeyFlag || process.env.DEVICE_CLOUD_API_KEY;
|
|
92
101
|
if (!apiKey)
|
|
93
102
|
throw new Error('You must provide an API key via --api-key flag or DEVICE_CLOUD_API_KEY environment variable');
|
package/oclif.manifest.json
CHANGED