@michaelthielemann/kestrel 4.0.1 → 4.0.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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { toRaw } from 'vue'
|
|
1
2
|
import type { FieldDef, SerializedField } from '@michaelthielemann/kestrel-core'
|
|
2
3
|
import { resolveFieldEmpty } from '../../../ui/app/utils/field-empty'
|
|
3
4
|
|
|
@@ -42,8 +43,12 @@ export function readFetchError(e: unknown): FetchErrorInfo {
|
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
|
|
46
|
+
// `field.default` on a block-picker's field comes from `useBlocks()`'s `useState`-backed list — a Vue
|
|
47
|
+
// reactive Proxy for any object/array value. `structuredClone` cannot clone a Proxy (`DataCloneError`,
|
|
48
|
+
// deterministic, not a race) — `toRaw` unwraps it first, same fix `cloneBlockTree` reaches for via a JSON
|
|
49
|
+
// round-trip; `toRaw` + `structuredClone` keeps real Date/Map values a JSON round-trip would mangle.
|
|
45
50
|
function cloneDefault(value: unknown): unknown {
|
|
46
|
-
return value !== null && typeof value === 'object' ? structuredClone(value) : value
|
|
51
|
+
return value !== null && typeof value === 'object' ? structuredClone(toRaw(value)) : value
|
|
47
52
|
}
|
|
48
53
|
|
|
49
54
|
function emptyForField(field: SerializedField): unknown {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@michaelthielemann/kestrel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "A slim, collection-driven Nuxt 4 CMS meta-layer with a runtime schema engine. Add `extends: ['@michaelthielemann/kestrel']`, define collections, and the database migrates itself.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Michael Thielemann <283621694+MichaelThielemann@users.noreply.github.com>",
|
|
@@ -77,15 +77,15 @@
|
|
|
77
77
|
"typescript": "^6.0.3",
|
|
78
78
|
"zod": "^4.4.3",
|
|
79
79
|
"@michaelthielemann/kestrel-access": "0.1.0",
|
|
80
|
-
"@michaelthielemann/kestrel-auth": "0.1.0",
|
|
81
|
-
"@michaelthielemann/kestrel-contracts": "0.1.0",
|
|
82
80
|
"@michaelthielemann/kestrel-collections": "0.1.0",
|
|
81
|
+
"@michaelthielemann/kestrel-contracts": "0.1.0",
|
|
83
82
|
"@michaelthielemann/kestrel-core": "0.1.0",
|
|
83
|
+
"@michaelthielemann/kestrel-auth": "0.1.0",
|
|
84
84
|
"@michaelthielemann/kestrel-delivery-live": "0.1.0",
|
|
85
|
-
"@michaelthielemann/kestrel-
|
|
85
|
+
"@michaelthielemann/kestrel-fields": "0.1.0",
|
|
86
86
|
"@michaelthielemann/kestrel-media": "0.1.0",
|
|
87
87
|
"@michaelthielemann/kestrel-publishing": "0.1.0",
|
|
88
|
-
"@michaelthielemann/kestrel-
|
|
88
|
+
"@michaelthielemann/kestrel-delivery-static": "0.1.0"
|
|
89
89
|
},
|
|
90
90
|
"//peers": "Framework singletons the layer sources import by bare specifier. Peers, not dependencies: a second copy breaks identity (two Vue instances; an h3 v1 `createError` handed to an h3 v2 error handler, which surfaces our 400/404/409 as bare 500s). All optional, because kestrel's own `nuxt` dependency already supplies them transitively — the entry pins identity where a copy exists rather than demanding one, and a required peer would ERESOLVE-fail npm installs on any Nuxt whose bundled range we did not anticipate. Each is also a devDependency so this repo resolves it without auto-install-peers writing a phantom root dependency into the lockfile.",
|
|
91
91
|
"peerDependencies": {
|