@roottale/cms-core 0.72.1 → 0.74.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.
- package/CHANGELOG.md +8 -0
- package/dist/index.cjs +4 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -702,15 +702,19 @@ declare const MetadataPatchSchema: z.ZodObject<{
|
|
|
702
702
|
}>;
|
|
703
703
|
type MetadataPatch = z.infer<typeof MetadataPatchSchema>;
|
|
704
704
|
declare const MetadataRobotsPolicySchema: z.ZodObject<{
|
|
705
|
+
/** Site-owned indexing of public content. Mandatory noindex always takes precedence. */
|
|
706
|
+
forceIndex: z.ZodOptional<z.ZodBoolean>;
|
|
705
707
|
forceNoindex: z.ZodOptional<z.ZodBoolean>;
|
|
706
708
|
forceNofollow: z.ZodOptional<z.ZodBoolean>;
|
|
707
709
|
/** Stable policy reason codes. They explain an enforced exclusion, never relax it. */
|
|
708
710
|
noindexReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
709
711
|
}, "strict", z.ZodTypeAny, {
|
|
712
|
+
forceIndex?: boolean | undefined;
|
|
710
713
|
forceNoindex?: boolean | undefined;
|
|
711
714
|
forceNofollow?: boolean | undefined;
|
|
712
715
|
noindexReasons?: string[] | undefined;
|
|
713
716
|
}, {
|
|
717
|
+
forceIndex?: boolean | undefined;
|
|
714
718
|
forceNoindex?: boolean | undefined;
|
|
715
719
|
forceNofollow?: boolean | undefined;
|
|
716
720
|
noindexReasons?: string[] | undefined;
|
|
@@ -10684,14 +10688,17 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
10684
10688
|
nofollow?: boolean | undefined;
|
|
10685
10689
|
}>>;
|
|
10686
10690
|
robots: z.ZodOptional<z.ZodObject<{
|
|
10691
|
+
forceIndex: z.ZodOptional<z.ZodBoolean>;
|
|
10687
10692
|
forceNoindex: z.ZodOptional<z.ZodBoolean>;
|
|
10688
10693
|
forceNofollow: z.ZodOptional<z.ZodBoolean>;
|
|
10689
10694
|
noindexReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10690
10695
|
}, "strict", z.ZodTypeAny, {
|
|
10696
|
+
forceIndex?: boolean | undefined;
|
|
10691
10697
|
forceNoindex?: boolean | undefined;
|
|
10692
10698
|
forceNofollow?: boolean | undefined;
|
|
10693
10699
|
noindexReasons?: string[] | undefined;
|
|
10694
10700
|
}, {
|
|
10701
|
+
forceIndex?: boolean | undefined;
|
|
10695
10702
|
forceNoindex?: boolean | undefined;
|
|
10696
10703
|
forceNofollow?: boolean | undefined;
|
|
10697
10704
|
noindexReasons?: string[] | undefined;
|
|
@@ -10905,6 +10912,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
10905
10912
|
nofollow?: boolean | undefined;
|
|
10906
10913
|
} | undefined;
|
|
10907
10914
|
robots?: {
|
|
10915
|
+
forceIndex?: boolean | undefined;
|
|
10908
10916
|
forceNoindex?: boolean | undefined;
|
|
10909
10917
|
forceNofollow?: boolean | undefined;
|
|
10910
10918
|
noindexReasons?: string[] | undefined;
|
|
@@ -10993,6 +11001,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
10993
11001
|
nofollow?: boolean | undefined;
|
|
10994
11002
|
} | undefined;
|
|
10995
11003
|
robots?: {
|
|
11004
|
+
forceIndex?: boolean | undefined;
|
|
10996
11005
|
forceNoindex?: boolean | undefined;
|
|
10997
11006
|
forceNofollow?: boolean | undefined;
|
|
10998
11007
|
noindexReasons?: string[] | undefined;
|
|
@@ -11081,6 +11090,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11081
11090
|
nofollow?: boolean | undefined;
|
|
11082
11091
|
} | undefined;
|
|
11083
11092
|
robots?: {
|
|
11093
|
+
forceIndex?: boolean | undefined;
|
|
11084
11094
|
forceNoindex?: boolean | undefined;
|
|
11085
11095
|
forceNofollow?: boolean | undefined;
|
|
11086
11096
|
noindexReasons?: string[] | undefined;
|
|
@@ -11169,6 +11179,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11169
11179
|
nofollow?: boolean | undefined;
|
|
11170
11180
|
} | undefined;
|
|
11171
11181
|
robots?: {
|
|
11182
|
+
forceIndex?: boolean | undefined;
|
|
11172
11183
|
forceNoindex?: boolean | undefined;
|
|
11173
11184
|
forceNofollow?: boolean | undefined;
|
|
11174
11185
|
noindexReasons?: string[] | undefined;
|
|
@@ -11257,6 +11268,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11257
11268
|
nofollow?: boolean | undefined;
|
|
11258
11269
|
} | undefined;
|
|
11259
11270
|
robots?: {
|
|
11271
|
+
forceIndex?: boolean | undefined;
|
|
11260
11272
|
forceNoindex?: boolean | undefined;
|
|
11261
11273
|
forceNofollow?: boolean | undefined;
|
|
11262
11274
|
noindexReasons?: string[] | undefined;
|
|
@@ -11345,6 +11357,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11345
11357
|
nofollow?: boolean | undefined;
|
|
11346
11358
|
} | undefined;
|
|
11347
11359
|
robots?: {
|
|
11360
|
+
forceIndex?: boolean | undefined;
|
|
11348
11361
|
forceNoindex?: boolean | undefined;
|
|
11349
11362
|
forceNofollow?: boolean | undefined;
|
|
11350
11363
|
noindexReasons?: string[] | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -702,15 +702,19 @@ declare const MetadataPatchSchema: z.ZodObject<{
|
|
|
702
702
|
}>;
|
|
703
703
|
type MetadataPatch = z.infer<typeof MetadataPatchSchema>;
|
|
704
704
|
declare const MetadataRobotsPolicySchema: z.ZodObject<{
|
|
705
|
+
/** Site-owned indexing of public content. Mandatory noindex always takes precedence. */
|
|
706
|
+
forceIndex: z.ZodOptional<z.ZodBoolean>;
|
|
705
707
|
forceNoindex: z.ZodOptional<z.ZodBoolean>;
|
|
706
708
|
forceNofollow: z.ZodOptional<z.ZodBoolean>;
|
|
707
709
|
/** Stable policy reason codes. They explain an enforced exclusion, never relax it. */
|
|
708
710
|
noindexReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
709
711
|
}, "strict", z.ZodTypeAny, {
|
|
712
|
+
forceIndex?: boolean | undefined;
|
|
710
713
|
forceNoindex?: boolean | undefined;
|
|
711
714
|
forceNofollow?: boolean | undefined;
|
|
712
715
|
noindexReasons?: string[] | undefined;
|
|
713
716
|
}, {
|
|
717
|
+
forceIndex?: boolean | undefined;
|
|
714
718
|
forceNoindex?: boolean | undefined;
|
|
715
719
|
forceNofollow?: boolean | undefined;
|
|
716
720
|
noindexReasons?: string[] | undefined;
|
|
@@ -10684,14 +10688,17 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
10684
10688
|
nofollow?: boolean | undefined;
|
|
10685
10689
|
}>>;
|
|
10686
10690
|
robots: z.ZodOptional<z.ZodObject<{
|
|
10691
|
+
forceIndex: z.ZodOptional<z.ZodBoolean>;
|
|
10687
10692
|
forceNoindex: z.ZodOptional<z.ZodBoolean>;
|
|
10688
10693
|
forceNofollow: z.ZodOptional<z.ZodBoolean>;
|
|
10689
10694
|
noindexReasons: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10690
10695
|
}, "strict", z.ZodTypeAny, {
|
|
10696
|
+
forceIndex?: boolean | undefined;
|
|
10691
10697
|
forceNoindex?: boolean | undefined;
|
|
10692
10698
|
forceNofollow?: boolean | undefined;
|
|
10693
10699
|
noindexReasons?: string[] | undefined;
|
|
10694
10700
|
}, {
|
|
10701
|
+
forceIndex?: boolean | undefined;
|
|
10695
10702
|
forceNoindex?: boolean | undefined;
|
|
10696
10703
|
forceNofollow?: boolean | undefined;
|
|
10697
10704
|
noindexReasons?: string[] | undefined;
|
|
@@ -10905,6 +10912,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
10905
10912
|
nofollow?: boolean | undefined;
|
|
10906
10913
|
} | undefined;
|
|
10907
10914
|
robots?: {
|
|
10915
|
+
forceIndex?: boolean | undefined;
|
|
10908
10916
|
forceNoindex?: boolean | undefined;
|
|
10909
10917
|
forceNofollow?: boolean | undefined;
|
|
10910
10918
|
noindexReasons?: string[] | undefined;
|
|
@@ -10993,6 +11001,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
10993
11001
|
nofollow?: boolean | undefined;
|
|
10994
11002
|
} | undefined;
|
|
10995
11003
|
robots?: {
|
|
11004
|
+
forceIndex?: boolean | undefined;
|
|
10996
11005
|
forceNoindex?: boolean | undefined;
|
|
10997
11006
|
forceNofollow?: boolean | undefined;
|
|
10998
11007
|
noindexReasons?: string[] | undefined;
|
|
@@ -11081,6 +11090,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11081
11090
|
nofollow?: boolean | undefined;
|
|
11082
11091
|
} | undefined;
|
|
11083
11092
|
robots?: {
|
|
11093
|
+
forceIndex?: boolean | undefined;
|
|
11084
11094
|
forceNoindex?: boolean | undefined;
|
|
11085
11095
|
forceNofollow?: boolean | undefined;
|
|
11086
11096
|
noindexReasons?: string[] | undefined;
|
|
@@ -11169,6 +11179,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11169
11179
|
nofollow?: boolean | undefined;
|
|
11170
11180
|
} | undefined;
|
|
11171
11181
|
robots?: {
|
|
11182
|
+
forceIndex?: boolean | undefined;
|
|
11172
11183
|
forceNoindex?: boolean | undefined;
|
|
11173
11184
|
forceNofollow?: boolean | undefined;
|
|
11174
11185
|
noindexReasons?: string[] | undefined;
|
|
@@ -11257,6 +11268,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11257
11268
|
nofollow?: boolean | undefined;
|
|
11258
11269
|
} | undefined;
|
|
11259
11270
|
robots?: {
|
|
11271
|
+
forceIndex?: boolean | undefined;
|
|
11260
11272
|
forceNoindex?: boolean | undefined;
|
|
11261
11273
|
forceNofollow?: boolean | undefined;
|
|
11262
11274
|
noindexReasons?: string[] | undefined;
|
|
@@ -11345,6 +11357,7 @@ declare const MetadataDefaultRulesSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<
|
|
|
11345
11357
|
nofollow?: boolean | undefined;
|
|
11346
11358
|
} | undefined;
|
|
11347
11359
|
robots?: {
|
|
11360
|
+
forceIndex?: boolean | undefined;
|
|
11348
11361
|
forceNoindex?: boolean | undefined;
|
|
11349
11362
|
forceNofollow?: boolean | undefined;
|
|
11350
11363
|
noindexReasons?: string[] | undefined;
|
package/dist/index.js
CHANGED
|
@@ -1936,6 +1936,7 @@ function resolveMetadata(input) {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
}
|
|
1938
1938
|
}
|
|
1939
|
+
if (input.robots?.forceIndex) result.noindex = false;
|
|
1939
1940
|
if (input.robots?.forceNoindex) result.noindex = true;
|
|
1940
1941
|
if (input.robots?.forceNofollow) result.nofollow = true;
|
|
1941
1942
|
return result;
|
|
@@ -1977,6 +1978,8 @@ var MetadataPatchSchema = z2.object({
|
|
|
1977
1978
|
nofollow: metadataFields.nofollow.nullable().optional()
|
|
1978
1979
|
}).strict();
|
|
1979
1980
|
var MetadataRobotsPolicySchema = z2.object({
|
|
1981
|
+
/** Site-owned indexing of public content. Mandatory noindex always takes precedence. */
|
|
1982
|
+
forceIndex: z2.boolean().optional(),
|
|
1980
1983
|
forceNoindex: z2.boolean().optional(),
|
|
1981
1984
|
forceNofollow: z2.boolean().optional(),
|
|
1982
1985
|
/** Stable policy reason codes. They explain an enforced exclusion, never relax it. */
|
|
@@ -2335,7 +2338,7 @@ function evaluateContentPolicy(policy, post, options = {}) {
|
|
|
2335
2338
|
const forced = !visible || indexing.length > 0 || options.robots?.forceNoindex === true;
|
|
2336
2339
|
const inheritedReasons = options.robots?.forceNoindex ? options.robots.noindexReasons?.length ? options.robots.noindexReasons : ["content:forced-noindex"] : [];
|
|
2337
2340
|
const noindexReasons = [.../* @__PURE__ */ new Set([...visibility, ...indexing, ...inheritedReasons])].slice(0, 64);
|
|
2338
|
-
const manualNoindex = readMetadataValues(post.metaJson?.seo).noindex === true;
|
|
2341
|
+
const manualNoindex = !options.robots?.forceIndex && readMetadataValues(post.metaJson?.seo).noindex === true;
|
|
2339
2342
|
return {
|
|
2340
2343
|
visible,
|
|
2341
2344
|
indexable: visible && !forced && !manualNoindex,
|