@momentumcms/server-analog 0.2.0 → 0.3.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 +11 -0
- package/index.cjs +7 -2
- package/index.js +7 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## 0.3.0 (2026-02-20)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- add named tabs support with nested data grouping and UI improvements ([#30](https://github.com/DonaldMurillo/momentum-cms/pull/30))
|
|
6
|
+
|
|
7
|
+
### ❤️ Thank You
|
|
8
|
+
|
|
9
|
+
- Claude Opus 4.6
|
|
10
|
+
- Donald Murillo @DonaldMurillo
|
|
11
|
+
|
|
1
12
|
## 0.2.0 (2026-02-17)
|
|
2
13
|
|
|
3
14
|
This was a version bump only for server-analog to align it with other projects, there were no code changes.
|
package/index.cjs
CHANGED
|
@@ -472,6 +472,9 @@ var MediaCollection = defineCollection({
|
|
|
472
472
|
singular: "Media",
|
|
473
473
|
plural: "Media"
|
|
474
474
|
},
|
|
475
|
+
upload: {
|
|
476
|
+
mimeTypes: ["image/*", "application/pdf", "video/*", "audio/*"]
|
|
477
|
+
},
|
|
475
478
|
admin: {
|
|
476
479
|
useAsTitle: "filename",
|
|
477
480
|
defaultColumns: ["filename", "mimeType", "filesize", "createdAt"]
|
|
@@ -492,7 +495,6 @@ var MediaCollection = defineCollection({
|
|
|
492
495
|
description: "File size in bytes"
|
|
493
496
|
}),
|
|
494
497
|
text("path", {
|
|
495
|
-
required: true,
|
|
496
498
|
label: "Storage Path",
|
|
497
499
|
description: "Path/key where the file is stored",
|
|
498
500
|
admin: {
|
|
@@ -707,6 +709,7 @@ async function runFieldHooks(hookType, fields, data, req, operation) {
|
|
|
707
709
|
}
|
|
708
710
|
const hooks = field.hooks?.[hookType];
|
|
709
711
|
if (hooks && hooks.length > 0) {
|
|
712
|
+
const fieldExistsInData = field.name in processedData;
|
|
710
713
|
let value = processedData[field.name];
|
|
711
714
|
for (const hook of hooks) {
|
|
712
715
|
const result = await Promise.resolve(
|
|
@@ -721,7 +724,9 @@ async function runFieldHooks(hookType, fields, data, req, operation) {
|
|
|
721
724
|
value = result;
|
|
722
725
|
}
|
|
723
726
|
}
|
|
724
|
-
|
|
727
|
+
if (fieldExistsInData || value !== void 0) {
|
|
728
|
+
processedData[field.name] = value;
|
|
729
|
+
}
|
|
725
730
|
}
|
|
726
731
|
if (field.type === "group" && processedData[field.name] && typeof processedData[field.name] === "object" && !Array.isArray(processedData[field.name])) {
|
|
727
732
|
processedData[field.name] = await runFieldHooks(
|
package/index.js
CHANGED
|
@@ -434,6 +434,9 @@ var MediaCollection = defineCollection({
|
|
|
434
434
|
singular: "Media",
|
|
435
435
|
plural: "Media"
|
|
436
436
|
},
|
|
437
|
+
upload: {
|
|
438
|
+
mimeTypes: ["image/*", "application/pdf", "video/*", "audio/*"]
|
|
439
|
+
},
|
|
437
440
|
admin: {
|
|
438
441
|
useAsTitle: "filename",
|
|
439
442
|
defaultColumns: ["filename", "mimeType", "filesize", "createdAt"]
|
|
@@ -454,7 +457,6 @@ var MediaCollection = defineCollection({
|
|
|
454
457
|
description: "File size in bytes"
|
|
455
458
|
}),
|
|
456
459
|
text("path", {
|
|
457
|
-
required: true,
|
|
458
460
|
label: "Storage Path",
|
|
459
461
|
description: "Path/key where the file is stored",
|
|
460
462
|
admin: {
|
|
@@ -669,6 +671,7 @@ async function runFieldHooks(hookType, fields, data, req, operation) {
|
|
|
669
671
|
}
|
|
670
672
|
const hooks = field.hooks?.[hookType];
|
|
671
673
|
if (hooks && hooks.length > 0) {
|
|
674
|
+
const fieldExistsInData = field.name in processedData;
|
|
672
675
|
let value = processedData[field.name];
|
|
673
676
|
for (const hook of hooks) {
|
|
674
677
|
const result = await Promise.resolve(
|
|
@@ -683,7 +686,9 @@ async function runFieldHooks(hookType, fields, data, req, operation) {
|
|
|
683
686
|
value = result;
|
|
684
687
|
}
|
|
685
688
|
}
|
|
686
|
-
|
|
689
|
+
if (fieldExistsInData || value !== void 0) {
|
|
690
|
+
processedData[field.name] = value;
|
|
691
|
+
}
|
|
687
692
|
}
|
|
688
693
|
if (field.type === "group" && processedData[field.name] && typeof processedData[field.name] === "object" && !Array.isArray(processedData[field.name])) {
|
|
689
694
|
processedData[field.name] = await runFieldHooks(
|