-
Notifications
You must be signed in to change notification settings - Fork 125
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
[dnm] Prototype store execute
command
#4493
base: main
Are you sure you want to change the base?
Conversation
Thanks for your contribution! Depending on what you are working on, you may want to request a review from a Shopify team:
|
Unused files (1)
|
Coverage report
Show new covered files 🐣
Show files with reduced coverage 🔻
Test suite run success1889 tests passing in 857 suites. Report generated by 🧪jest coverage report action from 6eb8cd2 |
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 it will be quite useful!
}), | ||
shop: Flags.string({ | ||
description: 'The shop domain to execute the script against', | ||
required: true, |
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.
What about making this flag optional and listing the available stores when it's not present?
required: true, | ||
env: 'SHOPIFY_FLAG_SCRIPT_FILE', | ||
}), | ||
shop: Flags.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.
We call it store
in other places
if (!store) { | ||
throw new Error('STORE_FQDN environment variable is not set') | ||
} | ||
|
||
if (!accessToken) { | ||
throw new Error('ACCESS_TOKEN environment variable is not set') | ||
} | ||
|
||
if (!apiVersion) { | ||
throw new Error('API_VERSION environment variable is not set') | ||
} |
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 don't think we need so many checks when we are running this script and setting the variables ourselves.
|
||
static flags = { | ||
...globalFlags, | ||
'script-file': Flags.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.
What about calling it script
to simplify?
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.
Not sure if this is the best place, but I'd definitely add a few examples somewhere with the most common operations.
No description provided.