fimo 2.2.0-staging.11 → 2.2.0-staging.13
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/content-templates/shared/types.eta +65 -6
- package/assets/skills/fimo-cli/references/content.md +1 -1
- package/assets/skills/fimo-code/references/assets.md +22 -11
- package/assets/skills/fimo-code/references/content/clients.md +15 -1
- package/assets/skills/fimo-code/references/content/schema.md +1 -0
- package/assets/skills/fimo-migration/SKILL.md +10 -3
- package/assets/skills/fimo-migration/references/media.md +11 -0
- package/assets/skills/fimo-migration/references/workflow.md +3 -0
- package/dist/cli/bundle.json +1 -1
- package/dist/cli/index.js +40 -26
- package/dist/runtime/content/serialization.d.ts +4 -3
- package/dist/runtime/content/serialization.js +4 -3
- package/dist/runtime/primitives/lib/primitives.d.ts +15 -7
- package/dist/runtime/primitives/lib/primitives.js +14 -1
- package/dist/scripts/validate-schemas.js +10 -15
- package/package.json +7 -7
- package/templates/astro/package.json +2 -2
- package/templates/nextjs/package.json +3 -3
- package/templates/react-router/package.json +4 -4
- package/templates/sveltekit/package.json +2 -2
- package/templates/vite/package.json +4 -4
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { FimoBoolean, FimoDate, FimoMedia, FimoRichText, FimoString, type FimoRichTextContent } from '../primitives/lib/primitives.js';
|
|
2
2
|
export interface SerializedMedia {
|
|
3
|
+
id?: string;
|
|
3
4
|
url: string;
|
|
4
|
-
alt
|
|
5
|
-
name
|
|
6
|
-
mime
|
|
5
|
+
alt?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
mime?: string;
|
|
7
8
|
width?: number;
|
|
8
9
|
height?: number;
|
|
9
10
|
}
|
|
@@ -18,10 +18,11 @@ export function serializeContent(value) {
|
|
|
18
18
|
}
|
|
19
19
|
if (value instanceof FimoMedia) {
|
|
20
20
|
const media = {
|
|
21
|
+
...(value.id === undefined ? {} : { id: value.id }),
|
|
21
22
|
url: value.url,
|
|
22
|
-
alt: value.alt,
|
|
23
|
-
name: value.name,
|
|
24
|
-
mime: value.mime,
|
|
23
|
+
...(value.alt === undefined ? {} : { alt: value.alt }),
|
|
24
|
+
...(value.name === undefined ? {} : { name: value.name }),
|
|
25
|
+
...(value.mime === undefined ? {} : { mime: value.mime }),
|
|
25
26
|
...(value.width === undefined ? {} : { width: value.width }),
|
|
26
27
|
...(value.height === undefined ? {} : { height: value.height }),
|
|
27
28
|
};
|
|
@@ -68,22 +68,30 @@ export declare class FimoDate extends Date {
|
|
|
68
68
|
get __fimo(): FimoSource;
|
|
69
69
|
}
|
|
70
70
|
/**
|
|
71
|
-
* FimoMedia -
|
|
71
|
+
* FimoMedia - a media value with source tracking.
|
|
72
|
+
*
|
|
73
|
+
* A stored media value is a reference: the media-library `id`, the `url` that
|
|
74
|
+
* still resolves if the asset is deleted, and the `alt` the entry owns. The
|
|
75
|
+
* facts the asset owns, such as `name`, `mime`, and intrinsic `width`/`height`,
|
|
76
|
+
* are optional because a read only carries them when it named the field in
|
|
77
|
+
* `populate`. Renderers must treat them as enrichment.
|
|
72
78
|
*/
|
|
73
79
|
export declare class FimoMedia {
|
|
80
|
+
readonly id?: string;
|
|
74
81
|
readonly url: string;
|
|
75
|
-
readonly alt
|
|
76
|
-
readonly name
|
|
77
|
-
readonly mime
|
|
82
|
+
readonly alt?: string;
|
|
83
|
+
readonly name?: string;
|
|
84
|
+
readonly mime?: string;
|
|
78
85
|
readonly width?: number;
|
|
79
86
|
readonly height?: number;
|
|
80
87
|
readonly [FIMO_SOURCE]: string;
|
|
81
88
|
readonly [FIMO_SOURCE_CONTEXT]?: FimoSourceContext;
|
|
82
89
|
constructor(data: {
|
|
90
|
+
id?: string;
|
|
83
91
|
url: string;
|
|
84
|
-
alt
|
|
85
|
-
name
|
|
86
|
-
mime
|
|
92
|
+
alt?: string;
|
|
93
|
+
name?: string;
|
|
94
|
+
mime?: string;
|
|
87
95
|
width?: number;
|
|
88
96
|
height?: number;
|
|
89
97
|
}, source: string, context?: FimoSourceContext);
|
|
@@ -100,10 +100,22 @@ export class FimoDate extends Date {
|
|
|
100
100
|
}
|
|
101
101
|
_d = FIMO_SOURCE, _e = FIMO_SOURCE_CONTEXT;
|
|
102
102
|
/**
|
|
103
|
-
* FimoMedia -
|
|
103
|
+
* FimoMedia - a media value with source tracking.
|
|
104
|
+
*
|
|
105
|
+
* A stored media value is a reference: the media-library `id`, the `url` that
|
|
106
|
+
* still resolves if the asset is deleted, and the `alt` the entry owns. The
|
|
107
|
+
* facts the asset owns, such as `name`, `mime`, and intrinsic `width`/`height`,
|
|
108
|
+
* are optional because a read only carries them when it named the field in
|
|
109
|
+
* `populate`. Renderers must treat them as enrichment.
|
|
104
110
|
*/
|
|
105
111
|
export class FimoMedia {
|
|
106
112
|
constructor(data, source, context) {
|
|
113
|
+
Object.defineProperty(this, "id", {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
writable: true,
|
|
117
|
+
value: void 0
|
|
118
|
+
});
|
|
107
119
|
Object.defineProperty(this, "url", {
|
|
108
120
|
enumerable: true,
|
|
109
121
|
configurable: true,
|
|
@@ -152,6 +164,7 @@ export class FimoMedia {
|
|
|
152
164
|
writable: true,
|
|
153
165
|
value: void 0
|
|
154
166
|
});
|
|
167
|
+
this.id = data.id;
|
|
155
168
|
this.url = data.url;
|
|
156
169
|
this.alt = data.alt;
|
|
157
170
|
this.name = data.name;
|
|
@@ -271,23 +271,18 @@ export function validateSchemaFile(absolutePath, file, schemaUids = new Set()) {
|
|
|
271
271
|
file,
|
|
272
272
|
});
|
|
273
273
|
}
|
|
274
|
-
if (!insideStructuredContent || field.type !== 'reference') {
|
|
274
|
+
if (!insideStructuredContent || field.type !== 'reference' || schemaUids.size === 0) {
|
|
275
275
|
return;
|
|
276
276
|
}
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
errors.push({
|
|
287
|
-
rule: 'schemas/reference-target',
|
|
288
|
-
message: `Reference field "${path.join('.')}" targets unknown schema "${field.target}".`,
|
|
289
|
-
file,
|
|
290
|
-
});
|
|
277
|
+
const referenceTargets = Array.isArray(field.targets) ? field.targets : field.target ? [field.target] : [];
|
|
278
|
+
for (const target of referenceTargets) {
|
|
279
|
+
if (!schemaUids.has(target)) {
|
|
280
|
+
errors.push({
|
|
281
|
+
rule: 'schemas/reference-target',
|
|
282
|
+
message: `Reference field "${path.join('.')}" targets unknown schema "${target}".`,
|
|
283
|
+
file,
|
|
284
|
+
});
|
|
285
|
+
}
|
|
291
286
|
}
|
|
292
287
|
});
|
|
293
288
|
continue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fimo",
|
|
3
|
-
"version": "2.2.0-staging.
|
|
3
|
+
"version": "2.2.0-staging.13",
|
|
4
4
|
"description": "Fimo CLI - create, deploy, and manage Fimo projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"astro-component"
|
|
@@ -189,12 +189,12 @@
|
|
|
189
189
|
"devDependencies": {
|
|
190
190
|
"@clack/core": "^1.2.0",
|
|
191
191
|
"@clack/prompts": "^1.2.0",
|
|
192
|
-
"@fimo/agents-bundle": "2.2.0-staging.
|
|
193
|
-
"@fimo/api-contracts": "2.2.0-staging.
|
|
194
|
-
"@fimo/cli-kit": "2.2.0-staging.
|
|
195
|
-
"@fimo/framework-detect": "2.2.0-staging.
|
|
196
|
-
"@fimo/routes": "2.2.0-staging.
|
|
197
|
-
"@fimo/tsconfig": "2.2.0-staging.
|
|
192
|
+
"@fimo/agents-bundle": "2.2.0-staging.13",
|
|
193
|
+
"@fimo/api-contracts": "2.2.0-staging.13",
|
|
194
|
+
"@fimo/cli-kit": "2.2.0-staging.13",
|
|
195
|
+
"@fimo/framework-detect": "2.2.0-staging.13",
|
|
196
|
+
"@fimo/routes": "2.2.0-staging.13",
|
|
197
|
+
"@fimo/tsconfig": "2.2.0-staging.13",
|
|
198
198
|
"@types/node": "22.18.6",
|
|
199
199
|
"agent-install": "^0.0.5",
|
|
200
200
|
"astro": "^7.1.6",
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"check": "astro sync && astro check"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"fimo": "2.2.0-staging.
|
|
13
|
-
"fimo-astro": "2.2.0-staging.
|
|
12
|
+
"fimo": "2.2.0-staging.13",
|
|
13
|
+
"fimo-astro": "2.2.0-staging.13"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"@astrojs/check": "^0.9.10",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@tanstack/react-query": "^5.80.6",
|
|
15
|
-
"fimo": "2.2.0-staging.
|
|
16
|
-
"fimo-next": "2.2.0-staging.
|
|
17
|
-
"fimo-react": "2.2.0-staging.
|
|
15
|
+
"fimo": "2.2.0-staging.13",
|
|
16
|
+
"fimo-next": "2.2.0-staging.13",
|
|
17
|
+
"fimo-react": "2.2.0-staging.13",
|
|
18
18
|
"next": "^16.3.3",
|
|
19
19
|
"react": "^19.2.7",
|
|
20
20
|
"react-dom": "^19.2.7"
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
"cmdk": "^1.1.1",
|
|
22
22
|
"date-fns": "^4.1.0",
|
|
23
23
|
"embla-carousel-react": "^8.6.0",
|
|
24
|
-
"fimo": "2.2.0-staging.
|
|
25
|
-
"fimo-react": "2.2.0-staging.
|
|
26
|
-
"fimo-react-router": "2.2.0-staging.
|
|
27
|
-
"fimo-vite": "2.2.0-staging.
|
|
24
|
+
"fimo": "2.2.0-staging.13",
|
|
25
|
+
"fimo-react": "2.2.0-staging.13",
|
|
26
|
+
"fimo-react-router": "2.2.0-staging.13",
|
|
27
|
+
"fimo-vite": "2.2.0-staging.13",
|
|
28
28
|
"input-otp": "^1.4.2",
|
|
29
29
|
"isbot": "^5",
|
|
30
30
|
"lucide-react": "^0.577.0",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"prepare": "svelte-kit sync"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"fimo": "2.2.0-staging.
|
|
15
|
-
"fimo-sveltekit": "2.2.0-staging.
|
|
14
|
+
"fimo": "2.2.0-staging.13",
|
|
15
|
+
"fimo-sveltekit": "2.2.0-staging.13"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@sveltejs/kit": "^2.70.2",
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@tanstack/react-query": "^5.80.6",
|
|
14
|
-
"fimo": "2.2.0-staging.
|
|
15
|
-
"fimo-react": "2.2.0-staging.
|
|
16
|
-
"fimo-react-router": "2.2.0-staging.
|
|
17
|
-
"fimo-vite": "2.2.0-staging.
|
|
14
|
+
"fimo": "2.2.0-staging.13",
|
|
15
|
+
"fimo-react": "2.2.0-staging.13",
|
|
16
|
+
"fimo-react-router": "2.2.0-staging.13",
|
|
17
|
+
"fimo-vite": "2.2.0-staging.13",
|
|
18
18
|
"react": "^19.2.7",
|
|
19
19
|
"react-dom": "^19.2.7",
|
|
20
20
|
"react-router": "^8.3.0"
|