Localhost module and validator for slim entry point - #55
Merged
EmilianoSanchez merged 11 commits intoOct 14, 2021
Merged
Conversation
…for_slim_entrypoint
…for_slim_entrypoint
NicoZelaya
approved these changes
Oct 12, 2021
| [c.ERROR_EMPTY_ARRAY, '%s: %s must be a non-empty array.'], | ||
| // initialization / settings validation | ||
| [c.ERROR_INVALID_IMPRESSIONS_MODE, c.LOG_PREFIX_SETTINGS + ': you passed an invalid "impressionsMode". It should be one of the following values: %s. Defaulting to "%s" mode.'], | ||
| [c.ERROR_LOCALHOST_MODULE_REQUIRED, c.LOG_PREFIX_SETTINGS + ': you didn\'t pass a valid "sync.localhostMode". It should be defined for using the SDK in localhost mode'] |
Contributor
There was a problem hiding this comment.
": an invalid value was received for "sync.localhostMode" config. A valid entity should be provided for localhost mode."
| @@ -0,0 +1,13 @@ | |||
| import { splitsParserFromFileFactory } from './offline/splitsParser/splitsParserFromFile'; | |||
Contributor
There was a problem hiding this comment.
Consider moving these to src/sync/offline
| @@ -0,0 +1,12 @@ | |||
| import { splitsParserFromSettingsFactory } from './offline/splitsParser/splitsParserFromSettings'; | |||
| export function validateLocalhost(settings: ISettings) { | ||
| const localhostMode = settings.sync.localhostMode; | ||
|
|
||
| if (settings.mode === LOCALHOST_MODE && (typeof localhostMode !== 'function' || localhostMode.type !== LOCALHOST_MODE)) { |
Contributor
There was a problem hiding this comment.
this validation by "Type", let's add a comment to revisit the values it can have at some point, or maybe changing the property name.
Base automatically changed from
localhost_with_ready_from_cache
to
pluggable_storage_baseline
October 14, 2021 13:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Javascript commons library
What did you accomplish?
How do we test the changes introduced in this PR?
Extra Notes