You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The validation library and Lectern client are both meant to be runnable in browser or on a server. This will enable the creation of UIs that can validate data vs a Dictionary as users enter it in forms or without submitting data to a server. This will enable a lot of UI tooling.
This is currently not possible due to the use of Node specific libraries which cannot be used in browser. There are two libraries that need removing:
winston - used in the client logger
vm - used in the validation library to run script validation's in an isolated context
Proposed Changes
Removing Winston - Logging
The logger implementation can be removed from the client. We can selectively include console logging.
If there are specific processes where we want logging to occur, we need ot make this configurable for the invoking software. First, we need to define a Logger interface that our server can implement. The client can then accept a Logger as an optional parameter. This configuration should also allow for specification of log level.
Removing VM - Scripts
We need to remove script conditionals anyways, so the solution here is to not publish anymore versions of the Lectern Client that run script validations.
The text was updated successfully, but these errors were encountered:
joneubank
changed the title
Make the client usable in browser and server (remove NodeJS specific libraries, depends on removing script restrictions)
Make the client usable in browser and server
Jun 18, 2024
The validation library and Lectern client are both meant to be runnable in browser or on a server. This will enable the creation of UIs that can validate data vs a Dictionary as users enter it in forms or without submitting data to a server. This will enable a lot of UI tooling.
This is currently not possible due to the use of Node specific libraries which cannot be used in browser. There are two libraries that need removing:
winston
- used in the client loggervm
- used in the validation library to run script validation's in an isolated contextProposed Changes
Removing Winston - Logging
The logger implementation can be removed from the client. We can selectively include console logging.
If there are specific processes where we want logging to occur, we need ot make this configurable for the invoking software. First, we need to define a Logger interface that our server can implement. The client can then accept a Logger as an optional parameter. This configuration should also allow for specification of log level.
Removing VM - Scripts
We need to remove script conditionals anyways, so the solution here is to not publish anymore versions of the Lectern Client that run script validations.
The text was updated successfully, but these errors were encountered: