-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: devScripts update #1261
Conversation
@@ -100,7 +100,7 @@ export class Retrieve extends SourceCommand { | |||
|
|||
protected retrieveResult: RetrieveResult | undefined; | |||
private sourceDir: string | undefined; | |||
private retrieveTargetDir: string | undefined; | |||
private retrieveTargetDir!: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
moving the setting of this to the top of the run method will justify !
@@ -185,7 +186,7 @@ export class Retrieve extends SourceCommand { | |||
unzip: this.unzip, | |||
}); | |||
|
|||
this.log(`Retrieve ID: ${this.mdapiRetrieve.id}`); | |||
this.log(`Retrieve ID: ${this.mdapiRetrieve.id ?? ''}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preserves existing behavior (no value present)
@@ -114,7 +114,7 @@ const resultConverter = (input: StatusOutputRow): StatusResult => { | |||
type, | |||
// this string became the place to store information. | |||
// The JSON now breaks out that info but preserves this property for backward compatibility | |||
state: `${origin} ${actualState}${conflict ? ' (Conflict)' : ''}` as StatusStateString, | |||
state: `${origin} ${actualState as string}${conflict ? ' (Conflict)' : ''}` as StatusStateString, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the map is complete, but Map.get() doesn't guarantee presence
@@ -25,7 +25,7 @@ export class DeployCancelResultFormatter extends ResultFormatter { | |||
} | |||
|
|||
public display(): void { | |||
const deployId = getString(this.result, 'response.id'); | |||
const deployId = this.result.response.id; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now that we have types we don't need the goofy get
on objects
const deployErrors = componentErrors === 1 ? `${componentErrors} error.` : `${componentErrors} errors.`; | ||
const tests = `${testsCompleted}/${testsTotal} tests completed.`; | ||
const testErrs = testErrors === 1 ? `${testErrors} error.` : `${testErrors} errors.`; | ||
const deploys = `${componentsDeployed ?? 0}/${componentsTotal ?? 0} components deployed.`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
zeros seemed right?
@@ -138,7 +138,7 @@ const processConflicts = (conflicts: ChangeResult[], ux: Ux, message: string): v | |||
const conflictMap = new Map<string, ConflictResponse>(); | |||
conflicts.forEach((c) => { | |||
c.filenames?.forEach((f) => { | |||
conflictMap.set(`${c.name}#${c.type}#${f}`, { | |||
conflictMap.set(`${c.name ?? ''}#${c.type ?? ''}#${f}`, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also preserve existing behaior
created via github action [skip-validate-pr]