@amplifyup/sdk 0.1.64 → 0.1.65
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/dist/AmplifyRenderer.js +15 -6
- package/dist/AmplifyRenderer.js.map +1 -1
- package/dist/AmplifyRenderer.mjs +15 -6
- package/dist/AmplifyRenderer.mjs.map +1 -1
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -1
- package/dist/react.js +60 -12
- package/dist/react.js.map +1 -1
- package/dist/react.mjs +60 -12
- package/dist/react.mjs.map +1 -1
- package/dist/server.js +10 -1
- package/dist/server.js.map +1 -1
- package/dist/server.mjs +10 -1
- package/dist/server.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -427,9 +427,14 @@ function isFieldEnvelope(value) {
|
|
|
427
427
|
const rec = value;
|
|
428
428
|
return typeof rec.name === "string" && "value" in rec && !("url" in rec);
|
|
429
429
|
}
|
|
430
|
+
function isPageResourceSentinel(value) {
|
|
431
|
+
return !!value && typeof value === "object" && !Array.isArray(value) && typeof value.__amplifyupPageResource === "string";
|
|
432
|
+
}
|
|
430
433
|
function isPortableImageShape(value) {
|
|
431
434
|
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
432
|
-
|
|
435
|
+
if ("url" in value) return true;
|
|
436
|
+
const rec = value;
|
|
437
|
+
return rec._type === "image" || rec.asset != null;
|
|
433
438
|
}
|
|
434
439
|
function isIdentifierKey(key) {
|
|
435
440
|
return IDENTIFIER_KEYS.has(key);
|
|
@@ -527,6 +532,10 @@ function toFieldEnvelopes(source, prefix = "", scope) {
|
|
|
527
532
|
continue;
|
|
528
533
|
}
|
|
529
534
|
const path = joinPath(prefix, key);
|
|
535
|
+
if (isPageResourceSentinel(raw)) {
|
|
536
|
+
out[key] = withLeaf({ value: raw, name: path }, ctx);
|
|
537
|
+
continue;
|
|
538
|
+
}
|
|
530
539
|
if (isFieldEnvelope(raw)) {
|
|
531
540
|
const inner = raw.value;
|
|
532
541
|
if (isRecordList(inner)) {
|