* Refactor supervisionUrls to use SupervisionUrlSchema
Updated supervisionUrls to use SupervisionUrlSchema for validation.
* Add SupervisionUrlSchema to index export
* fix(ui-server): validate the supervision URL scheme at the UI request gate
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* Add test for rejecting invalid supervision URLs
* test(utils): assert the supervision URL schemes match the ws client
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* docs(readme): document the accepted supervisionUrls schemes
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* fix(simulator)!: bump the configuration schema version to 2
v2 narrows `supervisionUrls` to URLs whose scheme the ws client can
dial. The v1 to v2 migration is a pass-through: values outside that set
cannot be rewritten automatically and are reported by schema validation.
BREAKING CHANGE: a configuration file whose `supervisionUrls` uses a
scheme the ws client cannot dial now fails validation at startup instead
of failing on each connection attempt.
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* chore(config): stamp the configuration template with schema version 2
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* test(utils): cover the v1 to v2 configuration migration
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* test(utils): cover v1 configurations under schema version 2
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* docs(readme): document configuration schema version 2
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* fix(simulator): reject supervision URLs with a fragment or an empty ws+unix socket path
The ws client throws for a URL with a fragment identifier and for a
ws+unix URL without a pathname, so these values passed the gate and failed
per station at connection time. Reject them in SupervisionUrlSchema.
Signed-off-by: VitorCoelho <vitorc195@gmail.com>
* test(utils): cover fragments and ws+unix socket paths in the supervision URL schema
Add a fragment URL and ws+unix URLs without a socket path to the ws
parity test, together with a ws+unix URL with a request path and a
hostless network URL, which the ws client dials.