-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #374 from Financial-Times/optional-vault
Make vault options optional
- Loading branch information
Showing
1 changed file
with
10 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
import { z } from 'zod' | ||
|
||
export const VaultSchema = z.object({ | ||
team: z.string(), | ||
app: z.string() | ||
}) | ||
// In theory, these fields should be required as Vault won't work without them, | ||
// but not every app that pulls in the Vault plugin actually needs to use | ||
// Vault, e.g., an app that uses the `nodemon` plugin with the `useVault` | ||
// option set to false. | ||
export const VaultSchema = z | ||
.object({ | ||
team: z.string(), | ||
app: z.string() | ||
}) | ||
.partial() | ||
export type VaultOptions = z.infer<typeof VaultSchema> | ||
|
||
export const Schema = VaultSchema |