-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
6,261 additions
and
17,104 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,28 +1,27 @@ | ||
// This file was generated by scripts/generate-zod-combinedTypes.js at Sat, 27 Apr 2024 00:53:14 GMT | ||
// This file was generated by scripts/generate-zod-combinedTypes.js at Thu, 16 May 2024 00:49:20 GMT | ||
import { z } from "zod"; | ||
import { license } from "./license.js"; | ||
import { source } from "./source.js"; | ||
import { sourceGroup } from "./sourceGroup.js"; | ||
import { background } from "./content/background.js"; | ||
import { condition } from "./content/condition.js"; | ||
import { divineIntercession } from "./content/divineIntercession.js"; | ||
import { domain } from "./content/domain.js"; | ||
import { event } from "./content/event.js"; | ||
import { familiarAbility } from "./content/familiarAbility.js"; | ||
import { relicGift } from "./content/relicGift.js"; | ||
import { skill } from "./content/skill.js"; | ||
const refineContent = (content) => content.refine((content) => (content.reference ? !!content.data !== !!content.reference.modifications : content.data), "`data` and `reference.modifications` cannot be used simultaneously; choose one method to describe the content."); | ||
export const bundle = z.object({ | ||
license: z.array(license).min(1).optional(), | ||
source: z.array(source).min(1), | ||
sourceGroup: z.array(sourceGroup).min(1).optional(), | ||
background: z.array(background).min(1).optional(), | ||
condition: z.array(condition).min(1).optional(), | ||
divineIntercession: z.array(divineIntercession).min(1).optional(), | ||
domain: z.array(domain).min(1).optional(), | ||
event: z.array(event).min(1).optional(), | ||
familiarAbility: z.array(familiarAbility).min(1).optional(), | ||
relicGift: z.array(relicGift).min(1).optional(), | ||
skill: z.array(skill).min(1).optional(), | ||
background: z.array(refineContent(background)).min(1).optional(), | ||
condition: z.array(refineContent(condition)).min(1).optional(), | ||
domain: z.array(refineContent(domain)).min(1).optional(), | ||
event: z.array(refineContent(event)).min(1).optional(), | ||
familiarAbility: z.array(refineContent(familiarAbility)).min(1).optional(), | ||
relicGift: z.array(refineContent(relicGift)).min(1).optional(), | ||
skill: z.array(refineContent(skill)).min(1).optional(), | ||
}); | ||
import { nonEmpty } from "./utils/nonEmpty.js"; | ||
export const anyBundle = bundle.partial().refine(...nonEmpty); |
Large diffs are not rendered by default.
Oops, something went wrong.
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
Large diffs are not rendered by default.
Oops, something went wrong.
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,26 +1,8 @@ | ||
// This file was generated by scripts/generate-zod-combinedTypes.js at Sat, 27 Apr 2024 00:53:14 GMT | ||
// This file was generated by scripts/generate-zod-combinedTypes.js at Thu, 16 May 2024 00:49:20 GMT | ||
import { z } from "zod"; | ||
import { license } from "./license.js"; | ||
import { source } from "./source.js"; | ||
import { sourceGroup } from "./sourceGroup.js"; | ||
import { background } from "./content/background.js"; | ||
import { condition } from "./content/condition.js"; | ||
import { divineIntercession } from "./content/divineIntercession.js"; | ||
import { domain } from "./content/domain.js"; | ||
import { event } from "./content/event.js"; | ||
import { familiarAbility } from "./content/familiarAbility.js"; | ||
import { relicGift } from "./content/relicGift.js"; | ||
import { skill } from "./content/skill.js"; | ||
export const data = z.discriminatedUnion("type", [ | ||
license, | ||
source, | ||
sourceGroup, | ||
background, | ||
condition, | ||
divineIntercession, | ||
domain, | ||
event, | ||
familiarAbility, | ||
relicGift, | ||
skill, | ||
]); | ||
const metaType = z.discriminatedUnion("type", [license, source, sourceGroup]); | ||
import { content } from "./_content.js"; | ||
export const data = content.or(metaType); |
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
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
Oops, something went wrong.