Skip to content

Commit c9e0b36

Browse files
committed
Update homebrewSources.ts
1 parent e5c2486 commit c9e0b36

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

zod/indexes/homebrewSources.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ import { datatypes } from "./datatypes.js";
66
import { nonEmpty } from "../utils/nonEmpty.js";
77

88
export const homebrewSourceSummary = sourceData
9-
.pick({ URL: true, released: true, added: true, modified: true })
9+
.pick({ URL: true, released: true, added: true, modified: true, _tags: true })
1010
.extend({
1111
path: z
1212
.string()
1313
.describe("A relative Unix path from the top-level `pf2ools-data` directory to the source's file.")
14-
.regex(/bundles\/bySource\/homebrew\/.+\.json/, "Must be a valid relative Unix path"),
14+
.regex(/^bundles\/bySource\/homebrew\/.+\.json$/, "Must be a valid relative Unix path"),
1515
fullTitle: z
1616
.string()
1717
.describe("The source's `title.full` property, which corresponds to the source's complete, proper name")
@@ -28,14 +28,16 @@ export const homebrewSourceSummary = sourceData
2828
.url()
2929
.optional()
3030
.describe(
31-
"The root URL of the homebrew source's website, which prepends the `path` property to form a full URL to the source's file. If absent, `pf2ools-app` will assume the URL to be the same as that of the index this is being read from.",
31+
"The root URL of the homebrew source's website, which prepends the `path` property to form a full URL to the source's file. If absent, the Pf2ools App will assume the URL to be the same as that of the index this is being read from.",
3232
),
33-
});
33+
})
34+
.describe("A flattened, curated source structure designed to be easy to parse as an index.")
35+
.strict();
3436

3537
export const homebrewSources = z
3638
.array(homebrewSourceSummary.extend({ ID: ID }))
3739
.describe(
38-
"An array of objects containing some summary data about the homebrew source assigned that ID. This is primarily used by `pf2ools-app`.",
40+
"An array of objects containing some summary data about the homebrew source assigned that ID. This is primarily used by the Pf2ools App.",
3941
)
4042
.min(1);
4143

0 commit comments

Comments
 (0)