Skip to content

Commit

Permalink
chore: merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
shetzel committed Nov 27, 2023
2 parents ad6e7b2 + 9673a8c commit 6adc94e
Show file tree
Hide file tree
Showing 6 changed files with 143 additions and 116 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [2.1.3](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/2.1.2...2.1.3) (2023-11-20)

### Bug Fixes

- also display errors from componentFailures ([#816](https://github.com/salesforcecli/plugin-deploy-retrieve/issues/816)) ([7b4abbd](https://github.com/salesforcecli/plugin-deploy-retrieve/commit/7b4abbd2a86a40aea3399dece26633d121e8f19a))

## [2.1.2](https://github.com/salesforcecli/plugin-deploy-retrieve/compare/2.1.1...2.1.2) (2023-11-17)

### Bug Fixes
Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ FLAG DESCRIPTIONS
If you specify this parameter, don’t specify --metadata or --source-dir.
```

_See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/convert/mdapi.ts)_
_See code: [src/commands/project/convert/mdapi.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/convert/mdapi.ts)_

## `sf project convert source`

Expand All @@ -153,7 +153,7 @@ USAGE
<value> | -m <value>]
FLAGS
-d, --output-dir=<value> [default: metadataPackage_1700254237624] Output directory to store the Metadata
-d, --output-dir=<value> [default: metadataPackage_1700498412279] Output directory to store the Metadata
API–formatted files in.
-m, --metadata=<value>... Metadata component names to convert.
-n, --package-name=<value> Name of the package to associate with the metadata-formatted files.
Expand Down Expand Up @@ -213,7 +213,7 @@ FLAG DESCRIPTIONS
Override the api version used for api requests made by this command
```

_See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/convert/source.ts)_
_See code: [src/commands/project/convert/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/convert/source.ts)_

## `sf project delete source`

Expand Down Expand Up @@ -351,7 +351,7 @@ FLAG DESCRIPTIONS
- Separate the test names with spaces: --tests Test1 Test2 "Test With Space"
```

_See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/delete/source.ts)_
_See code: [src/commands/project/delete/source.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/delete/source.ts)_

## `sf project delete tracking`

Expand Down Expand Up @@ -386,7 +386,7 @@ EXAMPLES
$ sf project delete tracking --target-org my-scratch
```

_See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/delete/tracking.ts)_
_See code: [src/commands/project/delete/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/delete/tracking.ts)_

## `sf project deploy cancel`

Expand Down Expand Up @@ -456,7 +456,7 @@ FLAG DESCRIPTIONS
project deploy report".
```

_See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/cancel.ts)_
_See code: [src/commands/project/deploy/cancel.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/cancel.ts)_

## `sf project deploy preview`

Expand Down Expand Up @@ -539,7 +539,7 @@ FLAG DESCRIPTIONS
All child components are included. If you specify this flag, don’t specify --metadata or --source-dir.
```

_See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/preview.ts)_
_See code: [src/commands/project/deploy/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/preview.ts)_

## `sf project deploy quick`

Expand Down Expand Up @@ -623,7 +623,7 @@ FLAG DESCRIPTIONS
deploy report".
```

_See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/quick.ts)_
_See code: [src/commands/project/deploy/quick.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/quick.ts)_

## `sf project deploy report`

Expand Down Expand Up @@ -718,7 +718,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/report.ts)_
_See code: [src/commands/project/deploy/report.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/report.ts)_

## `sf project deploy resume`

Expand Down Expand Up @@ -802,7 +802,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/resume.ts)_
_See code: [src/commands/project/deploy/resume.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/resume.ts)_

## `sf project deploy start`

Expand Down Expand Up @@ -1014,7 +1014,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/start.ts)_
_See code: [src/commands/project/deploy/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/start.ts)_

## `sf project deploy validate`

Expand Down Expand Up @@ -1176,7 +1176,7 @@ FLAG DESCRIPTIONS
--coverage-formatters lcov --coverage-formatters clover
```

_See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/deploy/validate.ts)_
_See code: [src/commands/project/deploy/validate.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/deploy/validate.ts)_

## `sf project generate manifest`

Expand Down Expand Up @@ -1251,7 +1251,7 @@ EXAMPLES
$ sf project generate manifest --from-org [email protected] --include-packages unlocked
```

_See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/generate/manifest.ts)_
_See code: [src/commands/project/generate/manifest.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/generate/manifest.ts)_

## `sf project list ignored`

Expand Down Expand Up @@ -1292,7 +1292,7 @@ EXAMPLES
$ sf project list ignored --source-dir package.xml
```

_See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/list/ignored.ts)_
_See code: [src/commands/project/list/ignored.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/list/ignored.ts)_

## `sf project reset tracking`

Expand Down Expand Up @@ -1339,7 +1339,7 @@ EXAMPLES
$ sf project reset tracking --revision 30
```

_See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/reset/tracking.ts)_
_See code: [src/commands/project/reset/tracking.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/reset/tracking.ts)_

## `sf project retrieve preview`

Expand Down Expand Up @@ -1394,7 +1394,7 @@ FLAG DESCRIPTIONS
Overrides your default org.
```

_See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/retrieve/preview.ts)_
_See code: [src/commands/project/retrieve/preview.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/retrieve/preview.ts)_

## `sf project retrieve start`

Expand Down Expand Up @@ -1540,6 +1540,6 @@ FLAG DESCRIPTIONS
If you specify this parameter, don’t specify --metadata or --source-dir.
```

_See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.2/src/commands/project/retrieve/start.ts)_
_See code: [src/commands/project/retrieve/start.ts](https://github.com/salesforcecli/plugin-deploy-retrieve/blob/2.1.3/src/commands/project/retrieve/start.ts)_

<!-- commandsstop -->
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"name": "@salesforce/plugin-deploy-retrieve",
"description": "deploy and retrieve commands for sf",
"version": "2.1.2",
"version": "2.1.3",
"author": "Salesforce",
"bugs": "https://github.com/forcedotcom/cli/issues",
"dependencies": {
"@oclif/core": "^3.11.0",
"@oclif/core": "^3.12.0",
"@salesforce/apex-node": "^2.1.2",
"@salesforce/core": "^6.1.3",
"@salesforce/core": "^6.2.0",
"@salesforce/kit": "^3.0.15",
"@salesforce/sf-plugins-core": "^5.0.1",
"@salesforce/source-deploy-retrieve": "^10.0.0",
"@salesforce/source-tracking": "^5.0.0",
"@salesforce/sf-plugins-core": "^5.0.3",
"@salesforce/source-deploy-retrieve": "^10.0.2",
"@salesforce/source-tracking": "^5.0.1",
"chalk": "^5.3.0"
},
"devDependencies": {
"@oclif/plugin-command-snapshot": "^5.0.2",
"@salesforce/cli-plugins-testkit": "^5.0.4",
"@salesforce/dev-scripts": "^7.1.0",
"@salesforce/plugin-command-reference": "^3.0.46",
"@salesforce/plugin-source": "^2.11.3",
"@salesforce/dev-scripts": "^7.1.1",
"@salesforce/plugin-command-reference": "^3.0.47",
"@salesforce/plugin-source": "^2.11.4",
"@salesforce/source-testkit": "^2.1.65",
"@salesforce/ts-sinon": "^1.4.19",
"@salesforce/ts-types": "^2.0.9",
"cross-env": "^7.0.3",
"eslint-plugin-sf-plugin": "^1.16.15",
"oclif": "^4.0.3",
"oclif": "^4.0.4",
"shx": "0.3.4",
"ts-node": "^10.9.1",
"typescript": "^5.2.2"
Expand Down
11 changes: 7 additions & 4 deletions src/formatters/deployResultFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,18 +272,19 @@ export class DeployResultFormatter extends TestResultsFormatter implements Forma
const failures = this.relativeFiles.filter(isSdrFailure);
const deployMessages = ensureArray(this.result.response.details?.componentFailures);
if (deployMessages.length > failures.length) {
const failureKeySet = new Set(failures.map((f) => makeKey(f.type, f.fullName)));
// if there's additional failures in the API response, find the failure and add it to the output
deployMessages.map((deployMessage) => {
if (!failures.some((f) => f.type === deployMessage.componentType && f.fullName === deployMessage.fullName)) {
deployMessages
.filter((m) => !m.componentType || !failureKeySet.has(makeKey(m.componentType, m.fullName)))
.map((deployMessage) => {
failures.push({
fullName: deployMessage.fullName,
type: deployMessage.componentType ?? 'UNKNOWN',
state: ComponentStatus.Failed,
error: deployMessage.problem ?? 'UNKNOWN',
problemType: deployMessage.problemType ?? 'Error',
});
}
});
});
}
if (!failures.length) return;

Expand Down Expand Up @@ -324,3 +325,5 @@ export class DeployResultFormatter extends TestResultsFormatter implements Forma
ux.table(getFileResponseSuccessProps(deletions), columns, options);
}
}

const makeKey = (type: string, name: string): string => `${type}#${name}`;
5 changes: 4 additions & 1 deletion src/utils/conflicts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@
import { ux } from '@oclif/core';
import { ConflictResponse } from '@salesforce/source-tracking';

export const writeConflictTable = (conflicts: ConflictResponse[]): void => {
export const writeConflictTable = (conflicts?: ConflictResponse[]): void => {
// Interfaces cannot be casted to Record<string, unknown> so we have to cast to unknown first
// See https://github.com/microsoft/TypeScript/issues/15300
if (!conflicts || conflicts.length === 0) {
return;
}
ux.table(
conflicts.map((c) => ({ state: c.state, fullName: c.fullName, type: c.type, filePath: c.filePath })),
{
Expand Down
Loading

0 comments on commit 6adc94e

Please sign in to comment.