@salesforce/plugin-deploy-retrieve 1.8.5-beta.2 → 1.8.5-beta.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.
Files changed (84) hide show
  1. package/lib/commands/project/convert/mdapi.d.ts +1 -1
  2. package/lib/commands/project/convert/mdapi.js +13 -16
  3. package/lib/commands/project/convert/mdapi.js.map +1 -1
  4. package/lib/commands/project/convert/source.d.ts +1 -1
  5. package/lib/commands/project/convert/source.js +12 -12
  6. package/lib/commands/project/convert/source.js.map +1 -1
  7. package/lib/commands/project/delete/source.d.ts +3 -3
  8. package/lib/commands/project/delete/source.js +24 -23
  9. package/lib/commands/project/delete/source.js.map +1 -1
  10. package/lib/commands/project/delete/tracking.js +2 -2
  11. package/lib/commands/project/delete/tracking.js.map +1 -1
  12. package/lib/commands/project/deploy/cancel.js +4 -3
  13. package/lib/commands/project/deploy/cancel.js.map +1 -1
  14. package/lib/commands/project/deploy/quick.js +4 -2
  15. package/lib/commands/project/deploy/quick.js.map +1 -1
  16. package/lib/commands/project/deploy/report.js +2 -2
  17. package/lib/commands/project/deploy/report.js.map +1 -1
  18. package/lib/commands/project/deploy/resume.js +2 -1
  19. package/lib/commands/project/deploy/resume.js.map +1 -1
  20. package/lib/commands/project/deploy/start.js +4 -2
  21. package/lib/commands/project/deploy/start.js.map +1 -1
  22. package/lib/commands/project/deploy/validate.js +4 -2
  23. package/lib/commands/project/deploy/validate.js.map +1 -1
  24. package/lib/commands/project/manifest/create.d.ts +1 -1
  25. package/lib/commands/project/manifest/create.js +11 -11
  26. package/lib/commands/project/manifest/create.js.map +1 -1
  27. package/lib/commands/project/reset/tracking.js +3 -3
  28. package/lib/commands/project/reset/tracking.js.map +1 -1
  29. package/lib/commands/project/retrieve/start.js +4 -3
  30. package/lib/commands/project/retrieve/start.js.map +1 -1
  31. package/lib/formatters/asyncDeployCancelResultFormatter.d.ts +9 -0
  32. package/lib/formatters/asyncDeployCancelResultFormatter.js +28 -0
  33. package/lib/formatters/asyncDeployCancelResultFormatter.js.map +1 -0
  34. package/lib/formatters/asyncDeployResultFormatter.d.ts +9 -0
  35. package/lib/formatters/asyncDeployResultFormatter.js +30 -0
  36. package/lib/formatters/asyncDeployResultFormatter.js.map +1 -0
  37. package/lib/formatters/deleteResultFormatter.d.ts +13 -0
  38. package/lib/formatters/deleteResultFormatter.js +72 -0
  39. package/lib/formatters/deleteResultFormatter.js.map +1 -0
  40. package/lib/formatters/deployCancelResultFormatter.d.ts +8 -0
  41. package/lib/formatters/deployCancelResultFormatter.js +29 -0
  42. package/lib/formatters/deployCancelResultFormatter.js.map +1 -0
  43. package/lib/formatters/deployReportResultFormatter.d.ts +4 -0
  44. package/lib/formatters/deployReportResultFormatter.js +52 -0
  45. package/lib/formatters/deployReportResultFormatter.js.map +1 -0
  46. package/lib/formatters/deployResultFormatter.d.ts +46 -0
  47. package/lib/formatters/deployResultFormatter.js +296 -0
  48. package/lib/formatters/deployResultFormatter.js.map +1 -0
  49. package/lib/formatters/metadataConvertResultFormatter.d.ts +9 -0
  50. package/lib/formatters/metadataConvertResultFormatter.js +59 -0
  51. package/lib/formatters/metadataConvertResultFormatter.js.map +1 -0
  52. package/lib/formatters/metadataRetrieveResultFormatter.d.ts +17 -0
  53. package/lib/formatters/metadataRetrieveResultFormatter.js +38 -0
  54. package/lib/formatters/metadataRetrieveResultFormatter.js.map +1 -0
  55. package/lib/formatters/retrieveResultFormatter.d.ts +13 -0
  56. package/lib/formatters/retrieveResultFormatter.js +66 -0
  57. package/lib/formatters/retrieveResultFormatter.js.map +1 -0
  58. package/lib/formatters/sourceConvertResultFormatter.d.ts +10 -0
  59. package/lib/formatters/sourceConvertResultFormatter.js +37 -0
  60. package/lib/formatters/sourceConvertResultFormatter.js.map +1 -0
  61. package/lib/utils/conflicts.js +1 -1
  62. package/lib/utils/conflicts.js.map +1 -1
  63. package/lib/utils/coverage.d.ts +1 -1
  64. package/lib/utils/coverage.js +15 -17
  65. package/lib/utils/coverage.js.map +1 -1
  66. package/lib/utils/errorCodes.d.ts +3 -1
  67. package/lib/utils/errorCodes.js +4 -4
  68. package/lib/utils/errorCodes.js.map +1 -1
  69. package/lib/utils/flags.js +2 -3
  70. package/lib/utils/flags.js.map +1 -1
  71. package/lib/utils/metadataDeployer.js +2 -2
  72. package/lib/utils/metadataDeployer.js.map +1 -1
  73. package/lib/utils/output.d.ts +4 -121
  74. package/lib/utils/output.js +3 -567
  75. package/lib/utils/output.js.map +1 -1
  76. package/lib/utils/types.d.ts +4 -0
  77. package/lib/utils/types.js.map +1 -1
  78. package/messages/convert.mdapi.md +22 -34
  79. package/messages/convert.source.md +24 -25
  80. package/messages/delete.source.md +57 -45
  81. package/messages/delete.tracking.md +17 -12
  82. package/messages/manifest.create.md +35 -24
  83. package/oclif.manifest.json +74 -74
  84. package/package.json +10 -11
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeployReportResultFormatter = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const core_1 = require("@oclif/core");
11
+ const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
12
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
13
+ const output_1 = require("../utils/output");
14
+ const deployResultFormatter_1 = require("./deployResultFormatter");
15
+ class DeployReportResultFormatter extends deployResultFormatter_1.DeployResultFormatter {
16
+ display() {
17
+ core_1.ux.log(`${this.result.response.id}... ${this.result.response.status}`);
18
+ const response = Object.entries(this.result.response).reduce((result, [key, value]) => {
19
+ if (['number', 'boolean', 'string'].includes(typeof value)) {
20
+ if (key === 'status') {
21
+ return result.concat({ key, value: colorStatus(value) });
22
+ }
23
+ else {
24
+ return result.concat({ key, value: value });
25
+ }
26
+ }
27
+ return result;
28
+ }, []);
29
+ core_1.ux.log();
30
+ core_1.ux.table(response, { key: {}, value: {} }, { title: (0, output_1.tableHeader)('Deploy Info') });
31
+ const opts = Object.entries(this.flags).reduce((result, [key, value]) => {
32
+ if (key === 'timestamp')
33
+ return result;
34
+ if (key === 'target-org')
35
+ return result.concat({ key: 'target-org', value: this.flags['target-org']?.getUsername() });
36
+ return result.concat({ key, value });
37
+ }, []);
38
+ core_1.ux.log();
39
+ core_1.ux.table(opts, { key: {}, value: {} }, { title: (0, output_1.tableHeader)('Deploy Options') });
40
+ super.display();
41
+ }
42
+ }
43
+ exports.DeployReportResultFormatter = DeployReportResultFormatter;
44
+ function colorStatus(status) {
45
+ if (status === source_deploy_retrieve_1.RequestStatus.Succeeded)
46
+ return sf_plugins_core_1.StandardColors.success(status);
47
+ if (status === source_deploy_retrieve_1.RequestStatus.Failed)
48
+ return sf_plugins_core_1.StandardColors.error(status);
49
+ else
50
+ return sf_plugins_core_1.StandardColors.warning(status);
51
+ }
52
+ //# sourceMappingURL=deployReportResultFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployReportResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deployReportResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,sCAAiC;AACjC,+EAAmE;AACnE,iEAA6D;AAC7D,4CAA8C;AAC9C,mEAAgE;AAEhE,MAAa,2BAA4B,SAAQ,6CAAqB;IAC7D,OAAO;QACZ,SAAE,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,OAAO,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;QAEvE,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAC1D,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;YACvB,IAAI,CA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AK,EAAE,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,IAAA,oBAAW,EAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;QACjF,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AA/BD,kEA+BC;AAED,SAAS,WAAW,CAAC,MAAqB;IACxC,IAAI,MAAM,KAAK,sCAAa,CAAC,SAAS;QAAE,OAAO,gCAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC9E,IAAI,MAAM,KAAK,sCAAa,CAAC,MAAM;QAAE,OAAO,gCAAc,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;;QACpE,OAAO,gCAAc,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7C,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { DeployResult } from '@salesforce/source-deploy-retrieve';
2
+ import { Org } from '@salesforce/core';
3
+ import { DeployResultJson, TestLevel, Formatter } from '../utils/types';
4
+ export declare class DeployResultFormatter implements Formatter<DeployResultJson> {
5
+ protected result: DeployResult;
6
+ protected flags: Partial<{
7
+ 'test-level': TestLevel;
8
+ verbose: boolean;
9
+ concise: boolean;
10
+ 'coverage-formatters': string[];
11
+ junit: boolean;
12
+ 'results-dir': string;
13
+ 'target-org': Org;
14
+ }>;
15
+ private relativeFiles;
16
+ private absoluteFiles;
17
+ private testLevel;
18
+ private verbosity;
19
+ private coverageOptions;
20
+ private resultsDir;
21
+ private readonly junit;
22
+ constructor(result: DeployResult, flags: Partial<{
23
+ 'test-level': TestLevel;
24
+ verbose: boolean;
25
+ concise: boolean;
26
+ 'coverage-formatters': string[];
27
+ junit: boolean;
28
+ 'results-dir': string;
29
+ 'target-org': Org;
30
+ }>);
31
+ getJson(): DeployResultJson;
32
+ display(): void;
33
+ private maybeCreateRequestedReports;
34
+ private createJunitResults;
35
+ private transformDeployTestsResultsToTestResult;
36
+ private createCoverageReport;
37
+ private displayReplacements;
38
+ private displaySuccesses;
39
+ private displayFailures;
40
+ private displayDeletes;
41
+ private displayTestResults;
42
+ private displayVerboseTestSuccesses;
43
+ private displayVerboseTestFailures;
44
+ private displayVerboseTestCoverage;
45
+ private determineVerbosity;
46
+ }
@@ -0,0 +1,296 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DeployResultFormatter = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const os = require("os");
11
+ const path = require("path");
12
+ const fs = require("fs");
13
+ const core_1 = require("@oclif/core");
14
+ const chalk_1 = require("chalk");
15
+ const source_deploy_retrieve_1 = require("@salesforce/source-deploy-retrieve");
16
+ const core_2 = require("@salesforce/core");
17
+ const kit_1 = require("@salesforce/kit");
18
+ const apex_node_1 = require("@salesforce/apex-node");
19
+ const sf_plugins_core_1 = require("@salesforce/sf-plugins-core");
20
+ const types_1 = require("../utils/types");
21
+ const coverage_1 = require("../utils/coverage");
22
+ const output_1 = require("../utils/output");
23
+ class DeployResultFormatter {
24
+ constructor(result, flags) {
25
+ this.result = result;
26
+ this.flags = flags;
27
+ this.absoluteFiles = (0, output_1.sortFileResponses)(this.result.getFileResponses() ?? []);
28
+ this.relativeFiles = (0, output_1.asRelativePaths)(this.absoluteFiles);
29
+ this.testLevel = this.flags['test-level'] ?? types_1.TestLevel.NoTestRun;
30
+ this.verbosity = this.determineVerbosity();
31
+ this.resultsDir = this.flags['results-dir'] ?? 'coverage';
32
+ this.coverageOptions = (0, coverage_1.getCoverageFormattersOptions)(this.flags['coverage-formatters']);
33
+ this.junit = this.flags.junit;
34
+ }
35
+ getJson() {
36
+ if (this.verbosity === 'concise') {
37
+ return {
38
+ ...this.result.response,
39
+ details: {
40
+ componentFailures: this.result.response.details.componentFailures,
41
+ runTestResult: this.result.response.details.runTestResult,
42
+ },
43
+ files: this.absoluteFiles.filter((f) => f.state === 'Failed'),
44
+ };
45
+ }
46
+ else {
47
+ return {
48
+ ...this.result.response,
49
+ files: this.absoluteFiles,
50
+ ...(this.result.replacements.size
51
+ ? {
52
+ replacements: Object.fromEntries(this.result.replacements),
53
+ }
54
+ : {}),
55
+ };
56
+ }
57
+ }
58
+ display() {
59
+ if (this.verbosity !== 'concise') {
60
+ this.displaySuccesses();
61
+ }
62
+ this.displayFailures();
63
+ this.displayDeletes();
64
+ this.displayTestResults();
65
+ this.maybeCreateRequestedReports();
66
+ this.displayReplacements();
67
+ }
68
+ maybeCreateRequestedReports() {
69
+ // only generate reports if test results are presented
70
+ if (this.result.response?.numberTestsTotal) {
71
+ if (this.coverageOptions) {
72
+ core_1.ux.log(`Code Coverage formats, [${this.flags['coverage-formatters']?.join(', ')}], written to ${this.resultsDir}/`);
73
+ this.createCoverageReport('no-map');
74
+ }
75
+ if (this.junit) {
76
+ core_1.ux.log(`Junit results written to ${this.resultsDir}/junit/junit.xml`);
77
+ this.createJunitResults();
78
+ }
79
+ }
80
+ }
81
+ createJunitResults() {
82
+ const testResult = this.transformDeployTestsResultsToTestResult();
83
+ if (testResult.summary.testsRan > 0) {
84
+ const jUnitReporter = new apex_node_1.JUnitReporter();
85
+ const junitResults = jUnitReporter.format(testResult);
86
+ const junitReportPath = path.join(this.resultsDir ?? '', 'junit');
87
+ fs.mkdirSync(junitReportPath, { recursive: true });
88
+ fs.writeFileSync(path.join(junitReportPath, 'junit.xml'), junitResults, 'utf8');
89
+ }
90
+ }
91
+ transformDeployTestsResultsToTestResult() {
92
+ if (!this.result.response?.details?.runTestResult) {
93
+ throw new core_2.SfError('No test results found');
94
+ }
95
+ const runTestResult = this.result.response?.details?.runTestResult;
96
+ const numTestsRun = parseInt(runTestResult.numTestsRun, 10);
97
+ const numTestFailures = parseInt(runTestResult.numFailures, 10);
98
+ return {
99
+ summary: {
100
+ commandTimeInMs: 0,
101
+ failRate: ((numTestFailures / numTestsRun) * 100).toFixed(2) + '%',
102
+ failing: numTestFailures,
103
+ hostname: this.flags['target-org']?.getConnection().getConnectionOptions().instanceUrl,
104
+ orgId: this.flags['target-org']?.getConnection().getAuthInfoFields().orgId,
105
+ outcome: '',
106
+ passRate: numTestFailures === 0 ? '100%' : ((1 - numTestFailures / numTestsRun) * 100).toFixed(2) + '%',
107
+ passing: numTestsRun - numTestFailures,
108
+ skipRate: '',
109
+ skipped: 0,
110
+ testExecutionTimeInMs: parseFloat(runTestResult.totalTime),
111
+ testRunId: '',
112
+ testStartTime: new Date().toISOString(),
113
+ testTotalTimeInMs: parseFloat(runTestResult.totalTime),
114
+ testsRan: numTestsRun,
115
+ userId: this.flags['target-org']?.getConnection().getConnectionOptions().userId,
116
+ username: this.flags['target-org']?.getConnection().getUsername(),
117
+ },
118
+ tests: [
119
+ ...(0, coverage_1.mapTestResults)((0, kit_1.ensureArray)(runTestResult.successes)),
120
+ ...(0, coverage_1.mapTestResults)((0, kit_1.ensureArray)(runTestResult.failures)),
121
+ ],
122
+ codecoverage: (0, kit_1.ensureArray)(runTestResult?.codeCoverage).map((cov) => {
123
+ const numLinesUncovered = parseInt(cov.numLocationsNotCovered, 10);
124
+ const [uncoveredLines, coveredLines] = (0, coverage_1.generateCoveredLines)(cov);
125
+ const numLocationsNum = parseInt(cov.numLocations, 10);
126
+ const numLocationsNotCovered = parseInt(cov.numLocationsNotCovered, 10);
127
+ return {
128
+ // TODO: fix this type in SDR?
129
+ type: cov.type,
130
+ apexId: cov.id,
131
+ name: cov.name,
132
+ numLinesUncovered,
133
+ numLinesCovered: parseInt(cov.numLocations, 10) - numLinesUncovered,
134
+ coveredLines,
135
+ uncoveredLines,
136
+ percentage: numLocationsNum > 0
137
+ ? (((numLocationsNum - numLocationsNotCovered) / numLocationsNum) * 100).toFixed() + '%'
138
+ : '',
139
+ };
140
+ }),
141
+ };
142
+ }
143
+ createCoverageReport(sourceDir) {
144
+ if (this.resultsDir) {
145
+ const apexCoverage = (0, coverage_1.transformCoverageToApexCoverage)((0, kit_1.ensureArray)(this.result.response?.details?.runTestResult?.codeCoverage));
146
+ fs.mkdirSync(this.resultsDir, { recursive: true });
147
+ const coverageReport = new apex_node_1.CoverageReporter(apexCoverage, this.resultsDir, sourceDir, this.coverageOptions);
148
+ coverageReport.generateReports();
149
+ }
150
+ }
151
+ displayReplacements() {
152
+ if (this.verbosity === 'verbose' && this.result.replacements?.size) {
153
+ const replacements = Array.from(this.result.replacements.entries()).flatMap(([filepath, stringsReplaced]) => stringsReplaced.map((replaced) => ({
154
+ filePath: path.relative(process.cwd(), filepath),
155
+ replaced,
156
+ })));
157
+ core_1.ux.table(replacements, {
158
+ filePath: { header: 'PROJECT PATH' },
159
+ replaced: { header: 'TEXT REPLACED' },
160
+ }, {
161
+ title: (0, output_1.tableHeader)('Metadata Replacements'),
162
+ });
163
+ }
164
+ }
165
+ displaySuccesses() {
166
+ const successes = this.relativeFiles.filter((f) => f.state !== 'Failed');
167
+ if (!successes.length || this.result.response.status === source_deploy_retrieve_1.RequestStatus.Failed)
168
+ return;
169
+ const columns = {
170
+ state: { header: 'State' },
171
+ fullName: { header: 'Name' },
172
+ type: { header: 'Type' },
173
+ filePath: { header: 'Path' },
174
+ };
175
+ const title = 'Deployed Source';
176
+ const options = { title: (0, output_1.tableHeader)(title) };
177
+ core_1.ux.log();
178
+ core_1.ux.table(successes.map((s) => ({ filePath: s.filePath, fullName: s.fullName, type: s.type, state: s.state })), columns, options);
179
+ }
180
+ displayFailures() {
181
+ if (this.result.response.status === source_deploy_retrieve_1.RequestStatus.Succeeded)
182
+ return;
183
+ const failures = this.relativeFiles.filter(types_1.isSdrFailure);
184
+ if (!failures.length)
185
+ return;
186
+ const columns = {
187
+ problemType: { header: 'Type' },
188
+ fullName: { header: 'Name' },
189
+ error: { header: 'Problem' },
190
+ };
191
+ const options = { title: error(`Component Failures [${failures.length}]`) };
192
+ core_1.ux.log();
193
+ core_1.ux.table(failures.map((f) => ({ problemType: f.problemType, fullName: f.fullName, error: f.error })), columns, options);
194
+ }
195
+ displayDeletes() {
196
+ const deletions = this.relativeFiles.filter(types_1.isSdrSuccess).filter((f) => f.state === 'Deleted');
197
+ if (!deletions.length)
198
+ return;
199
+ const columns = {
200
+ fullName: { header: 'Name' },
201
+ type: { header: 'Type' },
202
+ filePath: { header: 'Path' },
203
+ };
204
+ const options = { title: (0, output_1.tableHeader)('Deleted Source') };
205
+ core_1.ux.log();
206
+ core_1.ux.table((0, output_1.getFileResponseSuccessProps)(deletions), columns, options);
207
+ }
208
+ displayTestResults() {
209
+ if (this.testLevel === types_1.TestLevel.NoTestRun) {
210
+ core_1.ux.log();
211
+ return;
212
+ }
213
+ this.displayVerboseTestFailures();
214
+ if (this.verbosity === 'verbose') {
215
+ this.displayVerboseTestSuccesses();
216
+ this.displayVerboseTestCoverage();
217
+ }
218
+ core_1.ux.log();
219
+ core_1.ux.log((0, output_1.tableHeader)('Test Results Summary'));
220
+ const passing = this.result.response.numberTestsCompleted ?? 0;
221
+ const failing = this.result.response.numberTestErrors ?? 0;
222
+ const total = this.result.response.numberTestsTotal ?? 0;
223
+ const time = this.result.response.details.runTestResult?.totalTime ?? 0;
224
+ core_1.ux.log(`Passing: ${passing}`);
225
+ core_1.ux.log(`Failing: ${failing}`);
226
+ core_1.ux.log(`Total: ${total}`);
227
+ if (time)
228
+ core_1.ux.log(`Time: ${time}`);
229
+ }
230
+ displayVerboseTestSuccesses() {
231
+ const successes = (0, kit_1.ensureArray)(this.result.response.details.runTestResult?.successes);
232
+ if (successes.length > 0) {
233
+ const testSuccesses = sortTestResults(successes);
234
+ core_1.ux.log();
235
+ core_1.ux.log(success(`Test Success [${successes.length}]`));
236
+ for (const test of testSuccesses) {
237
+ const testName = (0, chalk_1.underline)(`${test.name}.${test.methodName}`);
238
+ core_1.ux.log(`${check} ${testName}`);
239
+ }
240
+ }
241
+ }
242
+ displayVerboseTestFailures() {
243
+ if (!this.result.response.numberTestErrors)
244
+ return;
245
+ const failures = (0, kit_1.ensureArray)(this.result.response.details.runTestResult?.failures);
246
+ const failureCount = this.result.response.details.runTestResult?.numFailures;
247
+ const testFailures = sortTestResults(failures);
248
+ core_1.ux.log();
249
+ core_1.ux.log(error(`Test Failures [${failureCount}]`));
250
+ for (const test of testFailures) {
251
+ const testName = (0, chalk_1.underline)(`${test.name}.${test.methodName}`);
252
+ const stackTrace = test.stackTrace.replace(/\n/g, `${os.EOL} `);
253
+ core_1.ux.log(`• ${testName}`);
254
+ core_1.ux.log(` ${(0, chalk_1.dim)('message')}: ${test.message}`);
255
+ core_1.ux.log(` ${(0, chalk_1.dim)('stacktrace')}: ${os.EOL} ${stackTrace}`);
256
+ core_1.ux.log();
257
+ }
258
+ }
259
+ displayVerboseTestCoverage() {
260
+ const codeCoverage = (0, kit_1.ensureArray)(this.result.response.details.runTestResult?.codeCoverage);
261
+ if (codeCoverage.length) {
262
+ const coverage = codeCoverage.sort((a, b) => (a.name.toUpperCase() > b.name.toUpperCase() ? 1 : -1));
263
+ core_1.ux.log();
264
+ core_1.ux.log((0, output_1.tableHeader)('Apex Code Coverage'));
265
+ core_1.ux.table(coverage.map(coverage_1.coverageOutput), {
266
+ name: { header: 'Name' },
267
+ numLocations: { header: '% Covered' },
268
+ lineNotCovered: { header: 'Uncovered Lines' },
269
+ });
270
+ }
271
+ }
272
+ determineVerbosity() {
273
+ if (this.flags.verbose)
274
+ return 'verbose';
275
+ if (this.flags.concise)
276
+ return 'concise';
277
+ return 'normal';
278
+ }
279
+ }
280
+ exports.DeployResultFormatter = DeployResultFormatter;
281
+ function sortTestResults(results) {
282
+ return results.sort((a, b) => {
283
+ if (a.methodName === b.methodName) {
284
+ return a.name.localeCompare(b.name);
285
+ }
286
+ return a.methodName.localeCompare(b.methodName);
287
+ });
288
+ }
289
+ function error(message) {
290
+ return sf_plugins_core_1.StandardColors.error((0, chalk_1.bold)(message));
291
+ }
292
+ function success(message) {
293
+ return sf_plugins_core_1.StandardColors.success((0, chalk_1.bold)(message));
294
+ }
295
+ const check = sf_plugins_core_1.StandardColors.success('✓');
296
+ //# sourceMappingURL=deployResultFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deployResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/deployResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,yBAAyB;AACzB,6BAA6B;AAC7B,yBAAyB;AACzB,sCAAiC;AACjC,iCAA6C;AAC7C,+EAAoH;AACpH,2CAAgD;AAChD,yCAA8C;AAC9C,qDAM+B;AAC/B,iEAA6D;AAC7D,0CAA+G;AAC/G,gDAM2B;AAC3B,4CAA+G;AAE/G,MAAa,qBAAqB;IAShC,YACY,MAAoB,EACpB,KAQR;QATQ,WAAM,GAAN,MAAM,CAAc;QACpB,UAAK,GAAL,KAAK,CAQb;QAEF,IAAI,CAAC,aAAa,GAAG,IAAA,0BAAiB,EAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC;QAC7E,IAAI,CAAC,aAAa,GAAG,IAAA,wBAAe,EAAC,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,IAAI,iBAAS,CAAC,SAAS,CAAC;QACjE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;QAC3C,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,IAAI,UAAU,CAAC;QAC1D,IAAI,CAAC,eAAe,GAAG,IAAA,uCAA4B,EAAC,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC;QACvF,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAChC,CAAC;IAEM,OAAO;QACZ,IAAI,IAAI,CAAC,SAAS,KAAK,SAAS,EAAE;YAChC,OAAO;gBACL,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ;gBACvB,OAAO,EAAE;oB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CAAC,IAAI,CAAC,CAAC;SACrC;QACD,OAAO,CAAC,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC;IAClD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,KAAK,CAAC,OAAe;IAC5B,OAAO,gCAAc,CAAC,KAAK,CAAC,IAAA,YAAI,EAAC,OAAO,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAS,OAAO,CAAC,OAAe;IAC9B,OAAO,gCAAc,CAAC,OAAO,CAAC,IAAA,YAAI,EAAC,OAAO,CAAC,CAAC,CAAC;AAC/C,CAAC;AAED,MAAM,KAAK,GAAG,gCAAc,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { ConvertResult } from '@salesforce/source-deploy-retrieve';
2
+ import { Formatter, ConvertMdapiJson } from '../utils/types';
3
+ export declare class MetadataConvertResultFormatter implements Formatter<ConvertMdapiJson> {
4
+ private result;
5
+ private convertResults;
6
+ constructor(result: ConvertResult);
7
+ getJson(): ConvertMdapiJson;
8
+ display(): void;
9
+ }
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetadataConvertResultFormatter = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const path = require("path");
11
+ const core_1 = require("@oclif/core");
12
+ class MetadataConvertResultFormatter {
13
+ constructor(result) {
14
+ this.result = result;
15
+ }
16
+ getJson() {
17
+ this.convertResults = [];
18
+ this.result?.converted?.forEach((component) => {
19
+ if (component.xml) {
20
+ this.convertResults.push({
21
+ fullName: component.fullName,
22
+ type: component.type.name,
23
+ filePath: path.relative('.', component.xml),
24
+ state: 'Add',
25
+ });
26
+ }
27
+ if (component.content) {
28
+ this.convertResults.push({
29
+ fullName: component.fullName,
30
+ type: component.type.name,
31
+ filePath: path.relative('.', component.content),
32
+ state: 'Add',
33
+ });
34
+ }
35
+ });
36
+ return this.convertResults;
37
+ }
38
+ display() {
39
+ const convertData = this.getJson();
40
+ if (convertData?.length) {
41
+ core_1.ux.table(convertData.map((entry) => ({
42
+ state: entry.state,
43
+ fullName: entry.fullName,
44
+ type: entry.type,
45
+ filePath: entry.filePath,
46
+ })), {
47
+ state: { header: 'STATE' },
48
+ fullName: { header: 'FULL NAME' },
49
+ type: { header: 'TYPE' },
50
+ filePath: { header: 'PROJECT PATH' },
51
+ });
52
+ }
53
+ else {
54
+ core_1.ux.log('No metadata found to convert');
55
+ }
56
+ }
57
+ }
58
+ exports.MetadataConvertResultFormatter = MetadataConvertResultFormatter;
59
+ //# sourceMappingURL=metadataConvertResultFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadataConvertResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/metadataConvertResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,sCAAiC;AAIjC,MAAa,8BAA8B;IAEzC,YAA2B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAE7C,OAAO;QACZ,IAAI,CAAC,cAAc,GAAG,EAAE,CAAC;QACzB,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE;YAC5C,IAAI,SAAS,CAAC,GAAG,EAAE;gBACjB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;oBACvB,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI;oBACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,GAAG,CAAC;oBAC3C,KAAK,EAAE,KAAK;iBACb,CAAC,CAAC;aACJ;YACD,IAAI,SAAS,CAAC,OAAO,EAAE;gBACrB,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC;oBACvB,QAAQ,EAAE,SAAS,CAAC,QAAQ;oBAC5B,IAAI,EAAE,SAAS,CAAC,IAAI,CAAC,IAAI;oBACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,OAAO,CAAC;oBAC/C,KAAK,EAAE,KAAK;iBACb,CAAC,CAAC;aACJ;QACH,CAAC,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC,cAAc,CAAC;IAC7B,CAAC;IAEM,OAAO;QACZ,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,WAAW,EAAE,MAAM,EAAE;YACvB,SAAE,CAAC,KAAK,CACN,WAAW,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;gBAC1B,KAAK,EAAE,KAAK,CAAC,KAAK;gBAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;gBACxB,IAAI,EAAE,KAAK,CAAC,IAAI;gBAChB,QAAQ,EAAE,KAAK,CAAC,QAAQ;aACzB,CAAC,CAAC,EACH;gBACE,KAAK,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE;gBAC1B,QAAQ,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE;gBACjC,IAAI,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE;gBACxB,QAAQ,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE;aACrC,CACF,CAAC;SACH;aAAM;YACL,SAAE,CAAC,GAAG,CAAC,8BAA8B,CAAC,CAAC;SACxC;IACH,CAAC;CACF;AAjDD,wEAiDC"}
@@ -0,0 +1,17 @@
1
+ import { RetrieveResult } from '@salesforce/source-deploy-retrieve';
2
+ import { Messages } from '@salesforce/core';
3
+ import { Formatter, MetadataRetrieveResultJson } from '../utils/types';
4
+ export declare const retrieveMessages: Messages<string>;
5
+ export declare class MetadataRetrieveResultFormatter implements Formatter<MetadataRetrieveResultJson> {
6
+ private result;
7
+ private opts;
8
+ private zipFilePath;
9
+ private files;
10
+ constructor(result: RetrieveResult, opts: {
11
+ 'target-metadata-dir': string;
12
+ 'zip-file-name': string;
13
+ unzip: boolean;
14
+ });
15
+ getJson(): MetadataRetrieveResultJson;
16
+ display(): Promise<void>;
17
+ }
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MetadataRetrieveResultFormatter = exports.retrieveMessages = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const path = require("path");
11
+ const core_1 = require("@oclif/core");
12
+ const core_2 = require("@salesforce/core");
13
+ const output_1 = require("../utils/output");
14
+ core_2.Messages.importMessagesDirectory(__dirname);
15
+ exports.retrieveMessages = core_2.Messages.loadMessages('@salesforce/plugin-deploy-retrieve', 'retrieve.metadata');
16
+ class MetadataRetrieveResultFormatter {
17
+ constructor(result, opts) {
18
+ this.result = result;
19
+ this.opts = opts;
20
+ this.zipFilePath = path.join(opts['target-metadata-dir'], opts['zip-file-name']);
21
+ this.files = (0, output_1.sortFileResponses)((0, output_1.asRelativePaths)(this.result.getFileResponses() ?? []));
22
+ }
23
+ getJson() {
24
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
25
+ const { zipFile, ...responseWithoutZipFile } = this.result.response;
26
+ return { ...responseWithoutZipFile, zipFilePath: this.zipFilePath, files: this.files };
27
+ }
28
+ // eslint-disable-next-line @typescript-eslint/require-await
29
+ async display() {
30
+ core_1.ux.log(exports.retrieveMessages.getMessage('info.WroteZipFile', [this.zipFilePath]));
31
+ if (this.opts.unzip) {
32
+ const extractPath = path.join(this.opts['target-metadata-dir'], path.parse(this.opts['zip-file-name']).name);
33
+ core_1.ux.log(exports.retrieveMessages.getMessage('info.ExtractedZipFile', [this.zipFilePath, extractPath]));
34
+ }
35
+ }
36
+ }
37
+ exports.MetadataRetrieveResultFormatter = MetadataRetrieveResultFormatter;
38
+ //# sourceMappingURL=metadataRetrieveResultFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"metadataRetrieveResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/metadataRetrieveResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,sCAAiC;AAEjC,2CAA4C;AAE5C,4CAAqE;AAErE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC/B,QAAA,gBAAgB,GAAG,eAAQ,CAAC,YAAY,CAAC,oCAAoC,EAAE,mBAAmB,CAAC,CAAC;AAEjH,MAAa,+BAA+B;IAG1C,YACU,MAAsB,EACtB,IAAgF;QADhF,WAAM,GAAN,MAAM,CAAgB;QACtB,SAAI,GAAJ,IAAI,CAA4E;QAExF,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;QACjF,IAAI,CAAC,KAAK,GAAG,IAAA,0BAAiB,EAAC,IAAA,wBAAe,EAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxF,CAAC;IAEM,OAAO;QACZ,6DAA6D;QAC7D,MAAM,EAAE,OAAO,EAAE,GAAG,sBAAsB,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC;QACpE,OAAO,EAAE,GAAG,sBAAsB,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;IACzF,CAAC;IAED,4DAA4D;IACrD,KAAK,CAAC,OAAO;QAClB,SAAE,CAAC,GAAG,CAAC,wBAAgB,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;QAC7E,IAAI,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACnB,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,qBAAqB,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAC7G,SAAE,CAAC,GAAG,CAAC,wBAAgB,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,CAAC;SAC/F;IACH,CAAC;CACF;AAzBD,0EAyBC"}
@@ -0,0 +1,13 @@
1
+ import { FileResponse, RetrieveResult } from '@salesforce/source-deploy-retrieve';
2
+ import { Formatter, RetrieveResultJson } from '../utils/types';
3
+ export declare class RetrieveResultFormatter implements Formatter<RetrieveResultJson> {
4
+ private result;
5
+ private packageNames;
6
+ private files;
7
+ constructor(result: RetrieveResult, packageNames?: string[], deleteResponses?: FileResponse[]);
8
+ getJson(): RetrieveResultJson;
9
+ display(): Promise<void>;
10
+ private displaySuccesses;
11
+ private displayPackages;
12
+ private getPackages;
13
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RetrieveResultFormatter = void 0;
4
+ /*
5
+ * Copyright (c) 2020, salesforce.com, inc.
6
+ * All rights reserved.
7
+ * Licensed under the BSD 3-Clause license.
8
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
9
+ */
10
+ const path = require("path");
11
+ const core_1 = require("@oclif/core");
12
+ const core_2 = require("@salesforce/core");
13
+ const types_1 = require("../utils/types");
14
+ const output_1 = require("../utils/output");
15
+ class RetrieveResultFormatter {
16
+ constructor(result, packageNames = [], deleteResponses = []) {
17
+ this.result = result;
18
+ this.packageNames = packageNames;
19
+ this.files = (this.result.getFileResponses() ?? []).concat(deleteResponses);
20
+ }
21
+ getJson() {
22
+ const { zipFile, ...responseWithoutZip } = this.result.response;
23
+ return { ...responseWithoutZip, files: this.files };
24
+ }
25
+ async display() {
26
+ this.displaySuccesses();
27
+ await this.displayPackages();
28
+ }
29
+ displaySuccesses() {
30
+ const successes = (0, output_1.sortFileResponses)((0, output_1.asRelativePaths)(this.files.filter(types_1.isSdrSuccess)));
31
+ if (!successes.length)
32
+ return;
33
+ const columns = {
34
+ state: { header: 'State' },
35
+ fullName: { header: 'Name' },
36
+ type: { header: 'Type' },
37
+ filePath: { header: 'Path' },
38
+ };
39
+ const title = 'Retrieved Source';
40
+ const options = { title: (0, output_1.tableHeader)(title) };
41
+ core_1.ux.log();
42
+ core_1.ux.table((0, output_1.getFileResponseSuccessProps)(successes), columns, options);
43
+ }
44
+ async displayPackages() {
45
+ const packages = await this.getPackages();
46
+ if (packages?.length) {
47
+ const columns = {
48
+ name: { header: 'Package Name' },
49
+ fullPath: { header: 'Converted Location' },
50
+ };
51
+ const title = 'Retrieved Packages';
52
+ const options = { title: (0, output_1.tableHeader)(title) };
53
+ core_1.ux.log();
54
+ core_1.ux.table(packages, columns, options);
55
+ }
56
+ }
57
+ async getPackages() {
58
+ const projectPath = await core_2.SfProject.resolveProjectPath();
59
+ return this.packageNames.map((name) => {
60
+ const packagePath = path.join(projectPath, name);
61
+ return { name, path: packagePath, fullPath: path.resolve(packagePath) };
62
+ });
63
+ }
64
+ }
65
+ exports.RetrieveResultFormatter = RetrieveResultFormatter;
66
+ //# sourceMappingURL=retrieveResultFormatter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"retrieveResultFormatter.js","sourceRoot":"","sources":["../../src/formatters/retrieveResultFormatter.ts"],"names":[],"mappings":";;;AAAA;;;;;GAKG;AACH,6BAA6B;AAC7B,sCAAiC;AAEjC,2CAA8D;AAC9D,0CAA6E;AAC7E,4CAA+G;AAE/G,MAAa,uBAAuB;IAElC,YACU,MAAsB,EAC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