Describe the story
The application currently uses yup for schema-based validation of application configuration. Switch to use zod for the same purpose. Zod is the preferred schema-based validation library.
Acceptance criteria
GIVEN a component imports the configuration module
WHEN the module is first imported
THEN the configuration is parsed from import.meta.env using a Zod schema
AND the parsed and validated configuration object is exported
WHEN the module is imported a second or subsequent time
THEN the previously parsed configuration object is exported
WHEN a configuration validation error occurs
THEN an error is logged
AND an error of type Error is created with a meaningful message
AND the error is thrown
Additional context
n/a
Describe the story
The application currently uses
yupfor schema-based validation of application configuration. Switch to usezodfor the same purpose. Zod is the preferred schema-based validation library.Acceptance criteria
GIVEN a component imports the configuration module
WHEN the module is first imported
THEN the configuration is parsed from
import.meta.envusing a Zod schemaAND the parsed and validated configuration object is exported
WHEN the module is imported a second or subsequent time
THEN the previously parsed configuration object is exported
WHEN a configuration validation error occurs
THEN an error is logged
AND an error of type
Erroris created with a meaningful messageAND the error is thrown
Additional context
n/a