@datadog/datadog-ci-base 4.4.0 → 5.0.0

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.
Files changed (37) hide show
  1. package/dist/cli.d.ts +1 -0
  2. package/dist/cli.js +21 -19
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/dsyms/cli.d.ts +2 -0
  5. package/dist/commands/dsyms/cli.js +10 -0
  6. package/dist/commands/dsyms/cli.js.map +1 -0
  7. package/dist/commands/dsyms/interfaces.d.ts +17 -0
  8. package/dist/commands/dsyms/interfaces.js +34 -0
  9. package/dist/commands/dsyms/interfaces.js.map +1 -0
  10. package/dist/commands/dsyms/renderer.d.ts +11 -0
  11. package/dist/commands/dsyms/renderer.js +93 -0
  12. package/dist/commands/dsyms/renderer.js.map +1 -0
  13. package/dist/commands/dsyms/upload.d.ts +51 -0
  14. package/dist/commands/dsyms/upload.js +338 -0
  15. package/dist/commands/dsyms/upload.js.map +1 -0
  16. package/dist/commands/dsyms/utils.d.ts +15 -0
  17. package/dist/commands/dsyms/utils.js +74 -0
  18. package/dist/commands/dsyms/utils.js.map +1 -0
  19. package/dist/commands/lambda/instrument.js +7 -2
  20. package/dist/commands/lambda/instrument.js.map +1 -1
  21. package/dist/commands/plugin/check.js +8 -0
  22. package/dist/commands/plugin/check.js.map +1 -1
  23. package/dist/commands/plugin/install.js +9 -1
  24. package/dist/commands/plugin/install.js.map +1 -1
  25. package/dist/commands/plugin/list.d.ts +1 -0
  26. package/dist/commands/plugin/list.js +20 -13
  27. package/dist/commands/plugin/list.js.map +1 -1
  28. package/dist/helpers/plugin.d.ts +24 -0
  29. package/dist/helpers/plugin.js +193 -58
  30. package/dist/helpers/plugin.js.map +1 -1
  31. package/dist/helpers/serverless/lambda-layer-versions.d.ts +8 -0
  32. package/dist/helpers/serverless/lambda-layer-versions.js +13 -0
  33. package/dist/helpers/serverless/lambda-layer-versions.js.map +1 -0
  34. package/package.json +14 -16
  35. package/dist/commands/git-metadata/index.d.ts +0 -1
  36. package/dist/commands/git-metadata/index.js +0 -18
  37. package/dist/commands/git-metadata/index.js.map +0 -1
package/dist/cli.d.ts CHANGED
@@ -4,6 +4,7 @@ export declare const commands: {
4
4
  'container-app': (typeof import("./commands/container-app/instrument").ContainerAppInstrumentCommand | typeof import("./commands/container-app/uninstrument").ContainerAppUninstrumentCommand)[];
5
5
  deployment: (typeof import("./commands/deployment/correlate-image").DeploymentCorrelateImageCommand | typeof import("./commands/deployment/correlate").DeploymentCorrelateCommand | typeof import("./commands/deployment/gate").DeploymentGateCommand | typeof import("./commands/deployment/mark").DeploymentMarkCommand)[];
6
6
  dora: typeof import("./commands/dora/deployment").DoraDeploymentCommand[];
7
+ dsyms: typeof import("./commands/dsyms/upload").DsymsUploadCommand[];
7
8
  gate: typeof import("./commands/gate/evaluate").GateEvaluateCommand[];
8
9
  'git-metadata': typeof import("./commands/git-metadata/upload").GitMetadataUploadCommand[];
9
10
  lambda: (typeof import("./commands/lambda/flare").LambdaFlareCommand | typeof import("./commands/lambda/instrument").LambdaInstrumentCommand | typeof import("./commands/lambda/uninstrument").LambdaUninstrumentCommand)[];
package/dist/cli.js CHANGED
@@ -6,15 +6,16 @@ const cli_2 = require("./commands/cloud-run/cli");
6
6
  const cli_3 = require("./commands/container-app/cli");
7
7
  const cli_4 = require("./commands/deployment/cli");
8
8
  const cli_5 = require("./commands/dora/cli");
9
- const cli_6 = require("./commands/gate/cli");
10
- const cli_7 = require("./commands/git-metadata/cli");
11
- const cli_8 = require("./commands/lambda/cli");
12
- const cli_9 = require("./commands/plugin/cli");
13
- const cli_10 = require("./commands/sarif/cli");
14
- const cli_11 = require("./commands/sbom/cli");
15
- const cli_12 = require("./commands/stepfunctions/cli");
16
- const cli_13 = require("./commands/synthetics/cli");
17
- const cli_14 = require("./commands/tag/cli");
9
+ const cli_6 = require("./commands/dsyms/cli");
10
+ const cli_7 = require("./commands/gate/cli");
11
+ const cli_8 = require("./commands/git-metadata/cli");
12
+ const cli_9 = require("./commands/lambda/cli");
13
+ const cli_10 = require("./commands/plugin/cli");
14
+ const cli_11 = require("./commands/sarif/cli");
15
+ const cli_12 = require("./commands/sbom/cli");
16
+ const cli_13 = require("./commands/stepfunctions/cli");
17
+ const cli_14 = require("./commands/synthetics/cli");
18
+ const cli_15 = require("./commands/tag/cli");
18
19
  // prettier-ignore
19
20
  exports.commands = {
20
21
  'aas': cli_1.commands,
@@ -22,18 +23,19 @@ exports.commands = {
22
23
  'container-app': cli_3.commands,
23
24
  'deployment': cli_4.commands,
24
25
  'dora': cli_5.commands,
25
- 'gate': cli_6.commands,
26
- 'git-metadata': cli_7.commands,
27
- 'lambda': cli_8.commands,
28
- 'plugin': cli_9.commands,
29
- 'sarif': cli_10.commands,
30
- 'sbom': cli_11.commands,
31
- 'stepfunctions': cli_12.commands,
32
- 'synthetics': cli_13.commands,
33
- 'tag': cli_14.commands,
26
+ 'dsyms': cli_6.commands,
27
+ 'gate': cli_7.commands,
28
+ 'git-metadata': cli_8.commands,
29
+ 'lambda': cli_9.commands,
30
+ 'plugin': cli_10.commands,
31
+ 'sarif': cli_11.commands,
32
+ 'sbom': cli_12.commands,
33
+ 'stepfunctions': cli_13.commands,
34
+ 'synthetics': cli_14.commands,
35
+ 'tag': cli_15.commands,
34
36
  };
35
37
  /**
36
38
  * Some command scopes do not have a plugin package, and their logic is entirely included in `@datadog/datadog-ci-base`.
37
39
  */
38
- exports.noPluginExceptions = new Set(['git-metadata', 'plugin', 'tag']);
40
+ exports.noPluginExceptions = new Set(['dsyms', 'git-metadata', 'plugin', 'tag']);
39
41
  //# sourceMappingURL=cli.js.map
package/dist/cli.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAGA,4CAA0D;AAC1D,kDAAqE;AACrE,sDAA6E;AAC7E,mDAAwE;AACxE,6CAA4D;AAC5D,6CAA4D;AAC5D,qDAA2E;AAC3E,+CAAgE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eAAY;IACpB,eAAe,EAAE,eAAqB;IACtC,YAAY,EAAE,eAAkB;IAChC,KAAK,EAAE,eAAW;CACe,CAAA;AAEnC;;GAEG;AACU,QAAA,kBAAkB,GAAgB,IAAI,GAAG,CAAC,CAAC,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,CAAC,CAEhG,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { DsymsUploadCommand } from './upload';
2
+ export declare const commands: (typeof DsymsUploadCommand)[];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.commands = void 0;
4
+ /* eslint-disable import-x/order */
5
+ const upload_1 = require("./upload");
6
+ // prettier-ignore
7
+ exports.commands = [
8
+ upload_1.DsymsUploadCommand,
9
+ ];
10
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../../../src/commands/dsyms/cli.ts"],"names":[],"mappings":";;;AAAA,mCAAmC;AACnC,qCAA2C;AAE3C,kBAAkB;AACL,QAAA,QAAQ,GAAG;IACtB,2BAAkB;CACnB,CAAA"}
@@ -0,0 +1,17 @@
1
+ import { MultipartPayload } from '@datadog/datadog-ci-base/helpers/upload';
2
+ export interface Dsym {
3
+ bundle: string;
4
+ dwarf: DWARF[];
5
+ }
6
+ export interface DWARF {
7
+ object: string;
8
+ uuid: string;
9
+ arch: string;
10
+ }
11
+ export declare class CompressedDsym {
12
+ archivePath: string;
13
+ dsym: Dsym;
14
+ constructor(archivePath: string, dsym: Dsym);
15
+ asMultipartPayload(): MultipartPayload;
16
+ private getMetadataPayload;
17
+ }
@@ -0,0 +1,34 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompressedDsym = void 0;
4
+ class CompressedDsym {
5
+ constructor(archivePath, dsym) {
6
+ this.archivePath = archivePath;
7
+ this.dsym = dsym;
8
+ }
9
+ asMultipartPayload() {
10
+ const content = new Map([
11
+ ['symbols_archive', { type: 'file', path: this.archivePath, options: { filename: 'ios_symbols_archive' } }],
12
+ ['event', this.getMetadataPayload()],
13
+ ]);
14
+ return {
15
+ content,
16
+ };
17
+ }
18
+ getMetadataPayload() {
19
+ const concatUUIDs = this.dsym.dwarf.map((d) => d.uuid).join();
20
+ return {
21
+ type: 'string',
22
+ options: {
23
+ contentType: 'application/json',
24
+ filename: 'event',
25
+ },
26
+ value: JSON.stringify({
27
+ type: 'ios_symbols',
28
+ uuids: concatUUIDs,
29
+ }),
30
+ };
31
+ }
32
+ }
33
+ exports.CompressedDsym = CompressedDsym;
34
+ //# sourceMappingURL=interfaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"interfaces.js","sourceRoot":"","sources":["../../../src/commands/dsyms/interfaces.ts"],"names":[],"mappings":";;;AAYA,MAAa,cAAc;IAIzB,YAAY,WAAmB,EAAE,IAAU;QACzC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;IAClB,CAAC;IAEM,kBAAkB;QACvB,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC;YACtB,CAAC,iBAAiB,EAAE,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,OAAO,EAAE,EAAC,QAAQ,EAAE,qBAAqB,EAAC,EAAC,CAAC;YACvG,CAAC,OAAO,EAAE,IAAI,CAAC,kBAAkB,EAAE,CAAC;SACrC,CAAC,CAAA;QAEF,OAAO;YACL,OAAO;SACR,CAAA;IACH,CAAC;IAEO,kBAAkB;QACxB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;QAE7D,OAAO;YACL,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE;gBACP,WAAW,EAAE,kBAAkB;gBAC/B,QAAQ,EAAE,OAAO;aAClB;YACD,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC;gBACpB,IAAI,EAAE,aAAa;gBACnB,KAAK,EAAE,WAAW;aACnB,CAAC;SACH,CAAA;IACH,CAAC;CACF;AAnCD,wCAmCC"}
@@ -0,0 +1,11 @@
1
+ import { UploadStatus } from '@datadog/datadog-ci-base/helpers/upload';
2
+ import { CompressedDsym, Dsym, DWARF } from './interfaces';
3
+ export declare const renderConfigurationError: (error: Error) => string;
4
+ export declare const renderInvalidDsymWarning: (dSYMPath: string) => string;
5
+ export declare const renderDSYMSlimmingFailure: (dSYM: Dsym, dwarf: DWARF, error: Error) => string;
6
+ export declare const renderFailedUpload: (dSYM: CompressedDsym, errorMessage: string) => string;
7
+ export declare const renderRetriedUpload: (dSYM: CompressedDsym, errorMessage: string, attempt: number) => string;
8
+ export declare const renderSuccessfulCommand: (statuses: UploadStatus[], duration: number, dryRun: boolean) => string;
9
+ export declare const renderCommandInfo: (basePath: string, poolLimit: number, dryRun: boolean) => string;
10
+ export declare const renderCommandDetail: (intermediateDirectory: string, uploadDirectory: string) => string;
11
+ export declare const renderUpload: (dSYM: CompressedDsym) => string;
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.renderUpload = exports.renderCommandDetail = exports.renderCommandInfo = exports.renderSuccessfulCommand = exports.renderRetriedUpload = exports.renderFailedUpload = exports.renderDSYMSlimmingFailure = exports.renderInvalidDsymWarning = exports.renderConfigurationError = void 0;
7
+ const chalk_1 = __importDefault(require("chalk"));
8
+ const upath_1 = __importDefault(require("upath"));
9
+ const formatting_1 = require("@datadog/datadog-ci-base/helpers/formatting");
10
+ const upload_1 = require("@datadog/datadog-ci-base/helpers/upload");
11
+ const utils_1 = require("./utils");
12
+ const renderConfigurationError = (error) => chalk_1.default.red(`${formatting_1.ICONS.FAILED} Configuration error: ${error}.\n`);
13
+ exports.renderConfigurationError = renderConfigurationError;
14
+ const renderInvalidDsymWarning = (dSYMPath) => chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} Invalid dSYM file, will be skipped: ${dSYMPath}\n`);
15
+ exports.renderInvalidDsymWarning = renderInvalidDsymWarning;
16
+ const renderDSYMSlimmingFailure = (dSYM, dwarf, error) => chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} Failed to export '${dwarf.arch}' arch (${dwarf.uuid}) from ${dSYM.bundle}: ${error}\n`);
17
+ exports.renderDSYMSlimmingFailure = renderDSYMSlimmingFailure;
18
+ const renderFailedUpload = (dSYM, errorMessage) => {
19
+ const dSYMPathBold = `[${chalk_1.default.bold.dim(dSYM.dsym.bundle)}]`;
20
+ return chalk_1.default.red(`${formatting_1.ICONS.FAILED} Failed upload dSYM for ${dSYMPathBold}: ${errorMessage}\n`);
21
+ };
22
+ exports.renderFailedUpload = renderFailedUpload;
23
+ const renderRetriedUpload = (dSYM, errorMessage, attempt) => {
24
+ const dSYMPathBold = `[${chalk_1.default.bold.dim(dSYM.dsym.bundle)}]`;
25
+ return chalk_1.default.yellow(`[attempt ${attempt}] Retrying dSYM upload ${dSYMPathBold}: ${errorMessage}\n`);
26
+ };
27
+ exports.renderRetriedUpload = renderRetriedUpload;
28
+ const renderSuccessfulCommand = (statuses, duration, dryRun) => {
29
+ const results = new Map();
30
+ statuses.forEach((status) => {
31
+ if (!results.has(status)) {
32
+ results.set(status, 0);
33
+ }
34
+ results.set(status, results.get(status) + 1);
35
+ });
36
+ const output = ['', chalk_1.default.bold('Command summary:')];
37
+ if (results.get(upload_1.UploadStatus.Failure)) {
38
+ output.push(chalk_1.default.red(`${formatting_1.ICONS.FAILED} Some dSYMS have not been uploaded correctly.`));
39
+ }
40
+ else if (results.get(upload_1.UploadStatus.Skipped)) {
41
+ output.push(chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} Some dSYMs have been skipped.`));
42
+ }
43
+ else if (results.get(upload_1.UploadStatus.Success)) {
44
+ if (dryRun) {
45
+ output.push(chalk_1.default.green(`${formatting_1.ICONS.SUCCESS} [DRYRUN] Handled ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Success), 'dSYM', 'dSYMs')} with success in ${duration} seconds.`));
46
+ }
47
+ else {
48
+ output.push(chalk_1.default.green(`${formatting_1.ICONS.SUCCESS} Uploaded ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Success), 'dSYM', 'dSYMs')} in ${duration} seconds.`));
49
+ }
50
+ }
51
+ else {
52
+ output.push(chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} No dSYMs detected. Did you specify the correct directory?`));
53
+ }
54
+ if (results.get(upload_1.UploadStatus.Failure) || results.get(upload_1.UploadStatus.Skipped)) {
55
+ output.push(`Details about the found ${(0, utils_1.pluralize)(statuses.length, 'dSYM', 'dSYMs')}:`);
56
+ if (results.get(upload_1.UploadStatus.Success)) {
57
+ output.push(` * ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Success), 'dSYM', 'dSYMs')} successfully uploaded`);
58
+ }
59
+ if (results.get(upload_1.UploadStatus.Skipped)) {
60
+ output.push(chalk_1.default.yellow(` * ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Skipped), 'dSYM was', 'dSYMs were')} skipped`));
61
+ }
62
+ if (results.get(upload_1.UploadStatus.Failure)) {
63
+ output.push(chalk_1.default.red(` * ${(0, utils_1.pluralize)(results.get(upload_1.UploadStatus.Failure), 'dSYM', 'dSYMs')} failed to upload`));
64
+ }
65
+ }
66
+ return output.join('\n') + '\n';
67
+ };
68
+ exports.renderSuccessfulCommand = renderSuccessfulCommand;
69
+ const renderCommandInfo = (basePath, poolLimit, dryRun) => {
70
+ let fullStr = '';
71
+ if (dryRun) {
72
+ fullStr += chalk_1.default.yellow(`${formatting_1.ICONS.WARNING} DRY-RUN MODE ENABLED. WILL NOT UPLOAD DSYMS\n`);
73
+ }
74
+ const startStr = chalk_1.default.green(`Starting upload with concurrency ${poolLimit}. \n`);
75
+ fullStr += startStr;
76
+ const basePathStr = chalk_1.default.green(`Will look for dSYMs in ${basePath}\n`);
77
+ fullStr += basePathStr;
78
+ fullStr += chalk_1.default.green(`Once dSYMs upload is successful files will be processed and ready to use within the next 5 minutes.\n`);
79
+ return fullStr;
80
+ };
81
+ exports.renderCommandInfo = renderCommandInfo;
82
+ const renderCommandDetail = (intermediateDirectory, uploadDirectory) => `Will use temporary intermediate directory: ${intermediateDirectory}\n` +
83
+ `Will use temporary upload directory: ${uploadDirectory}\n`;
84
+ exports.renderCommandDetail = renderCommandDetail;
85
+ const renderUpload = (dSYM) => {
86
+ const archiveName = upath_1.default.basename(dSYM.archivePath);
87
+ const objectName = dSYM.dsym.dwarf.map((dwarf) => upath_1.default.basename(dwarf.object))[0];
88
+ const archs = dSYM.dsym.dwarf.map((dwarf) => dwarf.arch).join();
89
+ const uuids = dSYM.dsym.dwarf.map((dwarf) => dwarf.uuid).join();
90
+ return `Uploading ${archiveName} (${objectName}, arch: ${archs}, UUID: ${uuids})\n`;
91
+ };
92
+ exports.renderUpload = renderUpload;
93
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.js","sourceRoot":"","sources":["../../../src/commands/dsyms/renderer.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAyB;AACzB,kDAAyB;AAEzB,4EAAiE;AACjE,oEAAoE;AAGpE,mCAAiC;AAE1B,MAAM,wBAAwB,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,eAAK,CAAC,GAAG,CAAC,GAAG,kBAAK,CAAC,MAAM,yBAAyB,KAAK,KAAK,CAAC,CAAA;AAA1G,QAAA,wBAAwB,4BAAkF;AAEhH,MAAM,wBAAwB,GAAG,CAAC,QAAgB,EAAE,EAAE,CAC3D,eAAK,CAAC,MAAM,CAAC,GAAG,kBAAK,CAAC,OAAO,wCAAwC,QAAQ,IAAI,CAAC,C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AE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,CAAA;IAE/D,OAAO,aAAa,WAAW,KAAK,UAAU,WAAW,KAAK,WAAW,KAAK,KAAK,CAAA;AACrF,CAAC,CAAA;AAPY,QAAA,YAAY,gBAOxB"}
@@ -0,0 +1,51 @@
1
+ import { BaseCommand } from '@datadog/datadog-ci-base';
2
+ export declare class DsymsUploadCommand extends BaseCommand {
3
+ static paths: string[][];
4
+ static usage: import("clipanion").Usage;
5
+ private basePath;
6
+ private configPath;
7
+ private dryRun;
8
+ private maxConcurrency;
9
+ private cliVersion;
10
+ private fips;
11
+ private fipsIgnoreError;
12
+ private fipsConfig;
13
+ private config;
14
+ execute(): Promise<1 | 0>;
15
+ private loadConfig;
16
+ private createServices;
17
+ private processAndUploadDsyms;
18
+ private prepareSearchDirectory;
19
+ private findDsyms;
20
+ /**
21
+ * Parses the output of `dwarfdump --uuid` command (ref.: https://www.unix.com/man-page/osx/1/dwarfdump/).
22
+ * It returns one or many DWARF UUID and arch read from the output.
23
+ *
24
+ * Example `dwarfdump --uuid` output:
25
+ * ```
26
+ * $ dwarfdump --uuid DDTest.framework.dSYM
27
+ * UUID: C8469F85-B060-3085-B69D-E46C645560EA (armv7) DDTest.framework.dSYM/Contents/Resources/DWARF/DDTest
28
+ * UUID: 06EE3D68-D605-3E92-B92D-2F48C02A505E (arm64) DDTest.framework.dSYM/Contents/Resources/DWARF/DDTest
29
+ * ```
30
+ */
31
+ private parseDwarfdumpOutput;
32
+ /**
33
+ * It takes `N` dSYMs and returns `N` or more dSYMs. If a dSYM includes more than one arch slice,
34
+ * it will be thinned by extracting each arch to a new dSYM in `output`.
35
+ */
36
+ private processDsyms;
37
+ /**
38
+ * It takes fat dSYM as input and returns multiple dSYMs by extracting **each arch**
39
+ * to separate dSYM file. New files are saved to `output` and named by their object uuid (`<uuid>.dSYM`).
40
+ *
41
+ * For example, given `<source path>/Foo.dSYM/Contents/Resources/DWARF/Foo` dSYM with two arch slices: `arm64` (uuid1)
42
+ * and `x86_64` (uuid2), it will:
43
+ * - create `<intermediate path>/<uuid1>.dSYM/Contents/Resources/DWARF/Foo` for `arm64`,
44
+ * - create `<intermediate path>/<uuid2>.dSYM/Contents/Resources/DWARF/Foo` for `x86_64`.
45
+ */
46
+ private thinDsym;
47
+ private copyInfoPlist;
48
+ private compressDsyms;
49
+ private createRequestBuilder;
50
+ private createUploadFunction;
51
+ }