-
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
Wr/manifest generate #168
Wr/manifest generate #168
Conversation
description: messages.getMessage('flags.outputdir'), | ||
}), | ||
}; | ||
public requiredFlags = ['metadata', 'sourcepath']; |
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.
I think a better name for this would be xorFlags, meaning 1 and only 1 of them must be set when running the command. I think this should really move into oclif at some point too.
src/sourceCommand.ts
Outdated
@@ -21,6 +21,7 @@ export type ProgressBar = { | |||
|
|||
export abstract class SourceCommand extends SfdxCommand { | |||
public static readonly DEFAULT_SRC_WAIT_MINUTES = 33; | |||
public requiredFlags: 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.
I think this should be protected not public.
src/sourceCommand.ts
Outdated
@@ -30,6 +31,15 @@ export abstract class SourceCommand extends SfdxCommand { | |||
return getBoolean(this.flags, 'json', false); | |||
} | |||
|
|||
protected validateFlags(flags: string[]): void { |
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.
We don't need to pass in the flags. SourceCommand has them as this.flags
test/nuts/create.nut.ts
Outdated
}, | ||
setupCommands: [ | ||
'sfdx force:org:create -f config/project-scratch-def.json --setdefaultusername --wait 10 --durationdays 1', | ||
'sfdx force:source:deploy -p force-app', |
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.
Why does the test need to create an org and deploy as part of setup?
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.
I figured that way it would validate that the generated manifest was would work with a deploy. SDR should be verifying that getPackageXml()
returns a valid package... but I thought it would be pretty easy to do here too
test/nuts/create.nut.ts
Outdated
' <members>TestSampleDataController</members>\n' + | ||
' <name>ApexClass</name>\n' + | ||
' </types>\n' + | ||
' <version>52.0</version>\n' + |
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.
Unless you override the API version this will fail as soon as 52.0 is not current.
* fix: bump SDR to 4.0.2 * chore: disable sfdx NUTs * chore: disable sfdx executible in generateNut
command-snapshot.json
Outdated
"metadata", | ||
"outputdir", | ||
"sourcepath", | ||
"targetusername" |
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.
@shetzel to use SfdxCommand
's standardized --apiversion
flag I had to set supportsUsername=true
which also includes the --targetusername
... Do you think it would be better to duplicate the apiversion
flag?
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.
Unless the command will use that flag (-u) I would not set supportsUsername=true
. Just duplicate the apiversion flag. There might be a way to reference it without duplicating.
…-source into wr/manifestGenerate
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.
Nice!
What does this PR do?
adds the
sfdx force:source:manifest:create
command.I think that the NUT coverage should be enough, the command is so small that unit tests seemed extra when the
ComponentSetBuilder
is already coveredWhat issues does this PR fix or reference?
@W-9608078@