fimo 0.10.0-experimental.1 → 0.10.0-staging.2
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/assets/skills/fimo-cli/references/content.md +37 -2
- package/assets/skills/fimo-cli/references/locales.md +2 -0
- package/assets/skills/fimo-code/references/content.md +17 -3
- package/assets/skills/fimo-studio/references/cms.md +2 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/scripts/validate-schemas.js +22 -3
- package/package.json +1 -1
- package/templates/react-router/package.json +1 -1
|
@@ -162,14 +162,33 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
|
|
|
162
162
|
file,
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
|
-
if ('
|
|
166
|
-
const key = 'i18n' in definition ? 'i18n' : 'localized';
|
|
165
|
+
if ('localized' in definition) {
|
|
167
166
|
errors.push({
|
|
168
167
|
rule: 'schemas/field-i18n',
|
|
169
|
-
message: `Field "${fieldName}":
|
|
168
|
+
message: `Field "${fieldName}": "localized" is not supported. Use "i18n": false to share one value across locales.`,
|
|
170
169
|
file,
|
|
171
170
|
});
|
|
172
171
|
}
|
|
172
|
+
// `i18n: false` shares one value across every locale of the document.
|
|
173
|
+
// Structured content follows the locale of the entry that carries it, so
|
|
174
|
+
// the flag has no row of its own to apply to there.
|
|
175
|
+
if ('i18n' in definition) {
|
|
176
|
+
const value = definition.i18n;
|
|
177
|
+
if (typeof value !== 'boolean') {
|
|
178
|
+
errors.push({
|
|
179
|
+
rule: 'schemas/field-i18n',
|
|
180
|
+
message: `Field "${fieldName}": "i18n" must be true or false.`,
|
|
181
|
+
file,
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
else if (type === 'blocks') {
|
|
185
|
+
errors.push({
|
|
186
|
+
rule: 'schemas/field-i18n',
|
|
187
|
+
message: `Field "${fieldName}": "i18n" is not supported on blocks fields.`,
|
|
188
|
+
file,
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
}
|
|
173
192
|
if (type === 'blocks') {
|
|
174
193
|
const parsed = ContentFieldDefinitionSchema.safeParse(definition);
|
|
175
194
|
if (!parsed.success) {
|
package/package.json
CHANGED