@@ -190,13 +190,15 @@ Below is an outline of steps to do when modifying the schema:
...
@@ -190,13 +190,15 @@ Below is an outline of steps to do when modifying the schema:
2. Add/modify/remove the keys as appropriate, following the same pattern as the other key schemas whenever possible. Consider marking new keys as optional by appending `.default(DEFAULT_VALUE)`. This helps reducing the amount of mandatory keys
2. Add/modify/remove the keys as appropriate, following the same pattern as the other key schemas whenever possible. Consider marking new keys as optional by appending `.default(DEFAULT_VALUE)`. This helps reducing the amount of mandatory keys
3. When committing the changes, don't forget to mark the changes as a breaking change as per the commit message guidelines.
3. When committing the changes, don't forget to mark the changes as a breaking change as per the commit message guidelines.
### Generate a runtime-config file
### Handling runtime-config and user-config files in apps
The Zod configuration is the single point of truth for the environment variable structure. There is a script which
The Zod configuration is the single point of truth for the environment variable structure. This script:
can generate runtime-config.js files from the Zod schema and integrate it into the config folder of a Vue app:
```
```
npm run create-runtime-config <workspace-name>
npm run check-config <workspace-name>
```
```
If `<workspace-name>` is omitted, runtime-config.js files will be created in all app workspaces.
first validates the file config/user-config.sample.js against the Zod schema
and prints out all issues. Second, it checks any issues of config/runtime-config.js
and if there are any, offers to generate a correct version of that file that