@momentumcms/db-drizzle 0.1.9 → 0.2.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 +15 -0
- package/index.cjs +15 -1
- package/index.js +15 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## 0.2.0 (2026-02-17)
|
|
2
|
+
|
|
3
|
+
This was a version bump only for db-drizzle to align it with other projects, there were no code changes.
|
|
4
|
+
|
|
5
|
+
## 0.1.10 (2026-02-17)
|
|
6
|
+
|
|
7
|
+
### 🩹 Fixes
|
|
8
|
+
|
|
9
|
+
- **create-momentum-app:** add shell option to execFileSync for Windows ([#28](https://github.com/DonaldMurillo/momentum-cms/pull/28))
|
|
10
|
+
|
|
11
|
+
### ❤️ Thank You
|
|
12
|
+
|
|
13
|
+
- Claude Opus 4.6
|
|
14
|
+
- Donald Murillo @DonaldMurillo
|
|
15
|
+
|
|
1
16
|
## 0.1.9 (2026-02-16)
|
|
2
17
|
|
|
3
18
|
This was a version bump only for db-drizzle to align it with other projects, there were no code changes.
|
package/index.cjs
CHANGED
|
@@ -79,12 +79,26 @@ var ReferentialIntegrityError = class extends Error {
|
|
|
79
79
|
this.constraint = constraint;
|
|
80
80
|
}
|
|
81
81
|
};
|
|
82
|
+
function isNamedTab(tab) {
|
|
83
|
+
return typeof tab.name === "string" && tab.name.length > 0;
|
|
84
|
+
}
|
|
82
85
|
function flattenDataFields(fields) {
|
|
83
86
|
const result = [];
|
|
84
87
|
for (const field of fields) {
|
|
85
88
|
if (field.type === "tabs") {
|
|
86
89
|
for (const tab of field.tabs) {
|
|
87
|
-
|
|
90
|
+
if (isNamedTab(tab)) {
|
|
91
|
+
const syntheticGroup = {
|
|
92
|
+
name: tab.name,
|
|
93
|
+
type: "group",
|
|
94
|
+
label: tab.label,
|
|
95
|
+
description: tab.description,
|
|
96
|
+
fields: tab.fields
|
|
97
|
+
};
|
|
98
|
+
result.push(syntheticGroup);
|
|
99
|
+
} else {
|
|
100
|
+
result.push(...flattenDataFields(tab.fields));
|
|
101
|
+
}
|
|
88
102
|
}
|
|
89
103
|
} else if (field.type === "collapsible" || field.type === "row") {
|
|
90
104
|
result.push(...flattenDataFields(field.fields));
|
package/index.js
CHANGED
|
@@ -42,12 +42,26 @@ var ReferentialIntegrityError = class extends Error {
|
|
|
42
42
|
this.constraint = constraint;
|
|
43
43
|
}
|
|
44
44
|
};
|
|
45
|
+
function isNamedTab(tab) {
|
|
46
|
+
return typeof tab.name === "string" && tab.name.length > 0;
|
|
47
|
+
}
|
|
45
48
|
function flattenDataFields(fields) {
|
|
46
49
|
const result = [];
|
|
47
50
|
for (const field of fields) {
|
|
48
51
|
if (field.type === "tabs") {
|
|
49
52
|
for (const tab of field.tabs) {
|
|
50
|
-
|
|
53
|
+
if (isNamedTab(tab)) {
|
|
54
|
+
const syntheticGroup = {
|
|
55
|
+
name: tab.name,
|
|
56
|
+
type: "group",
|
|
57
|
+
label: tab.label,
|
|
58
|
+
description: tab.description,
|
|
59
|
+
fields: tab.fields
|
|
60
|
+
};
|
|
61
|
+
result.push(syntheticGroup);
|
|
62
|
+
} else {
|
|
63
|
+
result.push(...flattenDataFields(tab.fields));
|
|
64
|
+
}
|
|
51
65
|
}
|
|
52
66
|
} else if (field.type === "collapsible" || field.type === "row") {
|
|
53
67
|
result.push(...flattenDataFields(field.fields));
|