rads-db 3.2.38 → 3.2.39

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.
@@ -174,7 +174,7 @@ function getEntityTypesStrFromSchema(schema) {
174
174
  if (type.isExtending && schema[type.isExtending]?.fields?.[f.name]) return "";
175
175
  let fieldTypeStr = f.type;
176
176
  if (f.isChange) fieldTypeStr = `Change<${fieldTypeStr}>`;
177
- if (f.isRelation) fieldTypeStr = `Relation<${fieldTypeStr}>`;
177
+ if (f.isRelation) fieldTypeStr = `Relation<${fieldTypeStr}${f.relationDenormFields?.length ? `, ${f.relationDenormFields.map(x => `'${x}'`).join(" | ")}` : ""}>`;
178
178
  if (f.isArray) fieldTypeStr = `${fieldTypeStr}[]`;
179
179
  const fieldStr = ` ${f.name}${f.isRequired ? "" : "?"}: ${fieldTypeStr}`;
180
180
  const commentStr2 = f.comment ? ` /** ${f.comment} */` : "";
@@ -185,7 +185,8 @@ export function getEntityTypesStrFromSchema(schema) {
185
185
  if (type.isExtending && schema[type.isExtending]?.fields?.[f.name]) return "";
186
186
  let fieldTypeStr = f.type;
187
187
  if (f.isChange) fieldTypeStr = `Change<${fieldTypeStr}>`;
188
- if (f.isRelation) fieldTypeStr = `Relation<${fieldTypeStr}>`;
188
+ if (f.isRelation)
189
+ fieldTypeStr = `Relation<${fieldTypeStr}${f.relationDenormFields?.length ? `, ${f.relationDenormFields.map((x) => `'${x}'`).join(" | ")}` : ""}>`;
189
190
  if (f.isArray) fieldTypeStr = `${fieldTypeStr}[]`;
190
191
  const fieldStr = ` ${f.name}${f.isRequired ? "" : "?"}: ${fieldTypeStr}`;
191
192
  const commentStr2 = f.comment ? ` /** ${f.comment} */` : "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rads-db",
3
- "version": "3.2.38",
3
+ "version": "3.2.39",
4
4
  "description": "Say goodbye to boilerplate code and hello to efficient and elegant syntax.",
5
5
  "author": "",
6
6
  "license": "ISC",