Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
127 customize gateway from bosconfigjson #147
127 customize gateway from bosconfigjson #147
Changes from 9 commits
5b67048
288998b
aafc55a
efb3eb3
be53048
08ee176
ed1472f
b25a251
9cb1f48
a5418dc
b632fa7
99dbcad
f23b6f5
86e663d
394b545
2dcacb1
73ffd5e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Considering we have a default config, ability to override this config, or --no-gateway to disable it, I'm not entirely sure what this function does anymore. Take a step back and reassess it's purpose and if it's clearer to just check if gateway is disabled or not
Although we do need error checking -- we can't have bundleUrl without tagName and can't have tagName without bundleUrl
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.
(and let's have a test to confirm both must be populated)
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 error checking is in
config.ts
in the configuration schema, if I try to run the app without a gateway with bothtagName
andbundleUrl
it will return this error:Without the option
-g
the logic is simpler but still needs to be expressed somewhere, that's the purpose of that function, somehow we need to specify the logic of the gateway: if it's disabled, if it's enabled but without a configuration object inbos.config.json
or if it's enabled with a correctly formatted configuration object!Let me know if you want to introduce more error checking on top of the Joi schema or if I need to move the gateway logic somewhere else!