@devicecloud.dev/dcd 3.6.7 → 3.6.9
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 +2 -0
- package/dist/commands/cloud.js +3 -1
- package/dist/constants.d.ts +2 -0
- package/dist/constants.js +7 -0
- package/dist/methods.d.ts +0 -1
- package/dist/methods.js +2 -33
- package/oclif.manifest.json +18 -1
- package/package.json +1 -1
package/dist/commands/cloud.d.ts
CHANGED
|
@@ -56,6 +56,8 @@ export default class Cloud extends Command {
|
|
|
56
56
|
'ios-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
57
57
|
'x86-arch': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
58
58
|
'maestro-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
59
|
+
mitmHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
60
|
+
mitmPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
59
61
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
60
62
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
61
63
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
package/dist/commands/cloud.js
CHANGED
|
@@ -96,7 +96,7 @@ class Cloud extends core_1.Command {
|
|
|
96
96
|
let jsonFile = false;
|
|
97
97
|
try {
|
|
98
98
|
const { args, flags, raw } = await this.parse(Cloud);
|
|
99
|
-
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, 'artifacts-path': artifactsPath, async, config: configFile, debug, '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;
|
|
99
|
+
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, 'artifacts-path': artifactsPath, async, config: configFile, debug, '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, mitmHost, mitmPath, ...rest } = flags;
|
|
100
100
|
// Store debug flag for use in catch block
|
|
101
101
|
debugFlag = debug === true;
|
|
102
102
|
jsonFile = flags['json-file'] === true;
|
|
@@ -376,6 +376,8 @@ class Cloud extends core_1.Command {
|
|
|
376
376
|
uploadedBinaryIds,
|
|
377
377
|
version: this.config.version,
|
|
378
378
|
skipChromeOnboarding: flags['skip-chrome-onboarding'],
|
|
379
|
+
mitmHost,
|
|
380
|
+
mitmPath,
|
|
379
381
|
};
|
|
380
382
|
if (finalAdditionalBinaryIds?.length > 0) {
|
|
381
383
|
config.additionalAppBinaryIds = finalAdditionalBinaryIds;
|
package/dist/constants.d.ts
CHANGED
|
@@ -26,6 +26,8 @@ export declare const flags: {
|
|
|
26
26
|
'ios-version': import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
27
27
|
'x86-arch': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
28
28
|
'maestro-version': import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
29
|
+
mitmHost: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
30
|
+
mitmPath: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
29
31
|
name: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
30
32
|
orientation: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
31
33
|
quiet: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
package/dist/constants.js
CHANGED
|
@@ -161,6 +161,13 @@ exports.flags = {
|
|
|
161
161
|
'1.39.7',
|
|
162
162
|
],
|
|
163
163
|
}),
|
|
164
|
+
mitmHost: core_1.Flags.string({
|
|
165
|
+
description: 'used for mitmproxy support, enterprise only, contact support if interested',
|
|
166
|
+
}),
|
|
167
|
+
mitmPath: core_1.Flags.string({
|
|
168
|
+
description: 'used for mitmproxy support, enterprise only, contact support if interested',
|
|
169
|
+
dependsOn: ['mitmHost'],
|
|
170
|
+
}),
|
|
164
171
|
name: core_1.Flags.string({
|
|
165
172
|
description: 'A custom name for your upload (useful for tagging commits etc)',
|
|
166
173
|
}),
|
package/dist/methods.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare const typeSafeGet: <T extends keyof paths>(baseUrl: string, path:
|
|
|
14
14
|
headers?: HeadersInit;
|
|
15
15
|
}) => Promise<paths[T]["get"]["responses"]["200"]["content"]["application/json"]>;
|
|
16
16
|
export declare const toBuffer: (archive: archiver.Archiver) => Promise<Buffer<ArrayBuffer>>;
|
|
17
|
-
export declare const compressDir: (sourceDir: string) => Promise<Buffer<ArrayBuffer>>;
|
|
18
17
|
export declare const compressFolderToBlob: (sourceDir: string) => Promise<Blob>;
|
|
19
18
|
export declare const compressFilesFromRelativePath: (path: string, files: string[], commonRoot: string) => Promise<Buffer<ArrayBuffer>>;
|
|
20
19
|
export declare const verifyAppZip: (zipPath: string) => Promise<void>;
|
package/dist/methods.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.writeJSONFile = exports.getUploadStatus = exports.verifyAdditionalAppFiles = exports.uploadBinaries = exports.uploadBinary = exports.extractAppMetadataIos = exports.extractAppMetadataIosZip = exports.extractAppMetadataAndroid = exports.verifyAppZip = exports.compressFilesFromRelativePath = exports.compressFolderToBlob = exports.
|
|
3
|
+
exports.writeJSONFile = exports.getUploadStatus = exports.verifyAdditionalAppFiles = exports.uploadBinaries = exports.uploadBinary = exports.extractAppMetadataIos = exports.extractAppMetadataIosZip = exports.extractAppMetadataAndroid = exports.verifyAppZip = exports.compressFilesFromRelativePath = exports.compressFolderToBlob = exports.toBuffer = exports.typeSafeGet = exports.typeSafePostDownload = exports.typeSafePost = void 0;
|
|
4
4
|
const core_1 = require("@oclif/core");
|
|
5
5
|
const supabase_js_1 = require("@supabase/supabase-js");
|
|
6
6
|
// required polyfill for node 18
|
|
@@ -21,16 +21,6 @@ const path = require("path");
|
|
|
21
21
|
const node_path_1 = require("node:path");
|
|
22
22
|
const os = require("node:os");
|
|
23
23
|
const cloud_1 = require("./commands/cloud");
|
|
24
|
-
const PERMITTED_EXTENSIONS = new Set([
|
|
25
|
-
'yml',
|
|
26
|
-
'yaml',
|
|
27
|
-
'png',
|
|
28
|
-
'jpg',
|
|
29
|
-
'jpeg',
|
|
30
|
-
'gif',
|
|
31
|
-
'mp4',
|
|
32
|
-
'js',
|
|
33
|
-
]);
|
|
34
24
|
const typeSafePost = async (baseUrl, path, init) => {
|
|
35
25
|
const res = await fetch(baseUrl + path, {
|
|
36
26
|
...init,
|
|
@@ -96,27 +86,6 @@ const toBuffer = async (archive) => {
|
|
|
96
86
|
return Buffer.concat(chunks);
|
|
97
87
|
};
|
|
98
88
|
exports.toBuffer = toBuffer;
|
|
99
|
-
const compressDir = async (sourceDir) => {
|
|
100
|
-
// const output = createWriteStream(zipTargetPath);
|
|
101
|
-
const archive = archiver('zip', {
|
|
102
|
-
zlib: { level: 9 },
|
|
103
|
-
});
|
|
104
|
-
archive.on('error', (err) => {
|
|
105
|
-
throw err;
|
|
106
|
-
});
|
|
107
|
-
archive.directory(sourceDir, '.', (data) => {
|
|
108
|
-
if (data.name.split('/')[0] === 'node_modules')
|
|
109
|
-
return false;
|
|
110
|
-
if (PERMITTED_EXTENSIONS.has(data.name.split('.').pop())) {
|
|
111
|
-
return data;
|
|
112
|
-
}
|
|
113
|
-
return false;
|
|
114
|
-
});
|
|
115
|
-
const buffer = await (0, exports.toBuffer)(archive);
|
|
116
|
-
// await writeFile('./my-zip.zip', buffer);
|
|
117
|
-
return buffer;
|
|
118
|
-
};
|
|
119
|
-
exports.compressDir = compressDir;
|
|
120
89
|
const compressFolderToBlob = async (sourceDir) => {
|
|
121
90
|
const archive = archiver('zip', {
|
|
122
91
|
zlib: { level: 9 },
|
|
@@ -186,7 +155,7 @@ const parseInfoPlist = async (buffer) => {
|
|
|
186
155
|
const extractAppMetadataIosZip = async (appFilePath) => new Promise((resolve, reject) => {
|
|
187
156
|
const zip = new StreamZip({ file: appFilePath });
|
|
188
157
|
zip.on('ready', () => {
|
|
189
|
-
const infoPlist = Object.values(zip.entries()).find((e) => e.name.
|
|
158
|
+
const infoPlist = Object.values(zip.entries()).find((e) => e.name.endsWith('.app/Info.plist'));
|
|
190
159
|
if (!infoPlist) {
|
|
191
160
|
reject(new Error('Failed to find info plist'));
|
|
192
161
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -294,6 +294,23 @@
|
|
|
294
294
|
],
|
|
295
295
|
"type": "option"
|
|
296
296
|
},
|
|
297
|
+
"mitmHost": {
|
|
298
|
+
"description": "used for mitmproxy support, enterprise only, contact support if interested",
|
|
299
|
+
"name": "mitmHost",
|
|
300
|
+
"hasDynamicHelp": false,
|
|
301
|
+
"multiple": false,
|
|
302
|
+
"type": "option"
|
|
303
|
+
},
|
|
304
|
+
"mitmPath": {
|
|
305
|
+
"dependsOn": [
|
|
306
|
+
"mitmHost"
|
|
307
|
+
],
|
|
308
|
+
"description": "used for mitmproxy support, enterprise only, contact support if interested",
|
|
309
|
+
"name": "mitmPath",
|
|
310
|
+
"hasDynamicHelp": false,
|
|
311
|
+
"multiple": false,
|
|
312
|
+
"type": "option"
|
|
313
|
+
},
|
|
297
314
|
"name": {
|
|
298
315
|
"description": "A custom name for your upload (useful for tagging commits etc)",
|
|
299
316
|
"name": "name",
|
|
@@ -520,5 +537,5 @@
|
|
|
520
537
|
]
|
|
521
538
|
}
|
|
522
539
|
},
|
|
523
|
-
"version": "3.6.
|
|
540
|
+
"version": "3.6.9"
|
|
524
541
|
}
|