Skip to content
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

feat: add type parameter to execCmd #34

Merged
merged 1 commit into from
Feb 26, 2021
Merged

feat: add type parameter to execCmd #34

merged 1 commit into from
Feb 26, 2021

Conversation

mdonnalley
Copy link
Contributor

@mdonnalley mdonnalley commented Feb 26, 2021

const command = `auth:jwt:grant -d -u ${username} -i ${clientId} -f ${jwtKey} -r ${instanceUrl} --json`;
const json = execCmd<AuthFields>(command, { ensureExitCode: 0 }).jsonOutput;

In that example the type of json would be:

{
    status: number;
    result: AuthFields;
}

@W-8856588@

Copy link
Contributor

@shetzel shetzel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all great! I'm requesting changes though to add unit tests.

@mdonnalley mdonnalley merged commit 7ce118a into main Feb 26, 2021
@mdonnalley mdonnalley deleted the mdonnalley/execCmd branch February 26, 2021 20:32
peternhale added a commit that referenced this pull request Feb 26, 2021
@mshanemc mshanemc mentioned this pull request Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants