@the-smithy/hearth 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -141,7 +141,7 @@ function createCore(options) {
|
|
|
141
141
|
if (!options.validate || !value) return value;
|
|
142
142
|
const { blockSchema, blockTypes } = await import("@the-smithy/hearth-schema");
|
|
143
143
|
const blocks = value.blocks ?? [];
|
|
144
|
-
const problems = blocks.filter((b) => blockTypes.includes(b.type) && b.type !== "upcomingEvents" && b.type !== "eventSpotlight").map((b) => ({ b, r: blockSchema.safeParse(b) })).filter((x) => !x.r.success);
|
|
144
|
+
const problems = blocks.filter((b) => blockTypes.includes(b.type) && b.type !== "upcomingEvents" && b.type !== "pastEvents" && b.type !== "eventSpotlight").map((b) => ({ b, r: blockSchema.safeParse(b) })).filter((x) => !x.r.success);
|
|
145
145
|
if (problems.length) {
|
|
146
146
|
const message = `Hearth ${kind} has ${problems.length} block(s) that don't match the schema: ${problems.map((p) => p.b.type).join(", ")}`;
|
|
147
147
|
if (options.validate === "warn") console.warn(message);
|
package/dist/index.js
CHANGED
package/dist/next.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@the-smithy/hearth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"description": "Typed client for the Hearth Delivery API: content, SEO, forms and publish webhooks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"llms.md"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@the-smithy/hearth-schema": "^0.
|
|
48
|
+
"@the-smithy/hearth-schema": "^0.17.0"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
51
|
"next": ">=15",
|