-
Notifications
You must be signed in to change notification settings - Fork 251
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
[PLAT-4934] Add configure command to RN CLI #1144
Conversation
name: 'apiKey', | ||
message: 'What is your Bugsnag API key?', | ||
validate: value => { | ||
return value.length > 1 |
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.
Is there value in validating that the apiKey is a hexadecimal string of the correct length?
logger.warn(UNLOCATED_PROJ_MSG) | ||
return | ||
} | ||
const plistPath = path.join(iosDir, xcodeprojDir.replace(/\.xcodeproj$/, ''), 'Info.plist') |
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.
This works fine with react native's project template but may break if developers reorganise their project structure. Determining the path 100% correctly would involve parsing the Xcode project and finding the INFOPLIST_FILE
build setting for the app target... tricky to implement, so this current solution is probably good enough!
Adds
bugsnag-react-native-cli install
command.Unit tests included for relevant parts. Interactive CLI aspects will be test via maze runner at a later point.
To test this out, use the following steps:
git fetch && git checkout feature/rn-cli-configure-cmd
npm i
npm run bootstrap
npm run build
cd packages/react-native-cli
npm link
(this symlinks the local cli package to your global npm modules)On a React Native project:
bugsnag-react-native-cli --help
bugsnag-react-native-cli configure