rads-db 3.0.63 → 3.0.66

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.
@@ -139,7 +139,7 @@ ${whereFields.join("\n")}
139
139
  }
140
140
  `.trim()).join("\n");
141
141
  return `
142
- import type { EntityMethods, FileUploadArgs, RadsRequestContext, WhereJsonContains } from 'rads-db'
142
+ import type { EntityMethods, FileUploadArgs, RadsRequestContext, WhereJsonContains, Relation, Change } from 'rads-db'
143
143
  ${imports.join("\n")}
144
144
  ${schemaTypesStr}
145
145
 
@@ -175,7 +175,7 @@ function getEntityTypesStrFromSchema(schema) {
175
175
  if (f.isChange) fieldTypeStr = `Change<${fieldTypeStr}>`;
176
176
  if (f.isRelation) fieldTypeStr = `Relation<${fieldTypeStr}>`;
177
177
  if (f.isArray) fieldTypeStr = `${fieldTypeStr}[]`;
178
- const fieldStr = ` ${f.name}${f.isRequired ? "!" : "?"}: ${fieldTypeStr}`;
178
+ const fieldStr = ` ${f.name}${f.isRequired ? "" : "?"}: ${fieldTypeStr}`;
179
179
  const commentStr2 = f.comment ? ` /** ${f.comment} */` : "";
180
180
  return [fieldStr, commentStr2].filter(x => x).join("\n");
181
181
  }).filter(x => x).join("\n");
@@ -139,7 +139,7 @@ ${whereFields.join("\n")}
139
139
  `.trim()
140
140
  ).join("\n");
141
141
  return `
142
- import type { EntityMethods, FileUploadArgs, RadsRequestContext, WhereJsonContains } from 'rads-db'
142
+ import type { EntityMethods, FileUploadArgs, RadsRequestContext, WhereJsonContains, Relation, Change } from 'rads-db'
143
143
  ${imports.join("\n")}
144
144
  ${schemaTypesStr}
145
145
 
@@ -181,7 +181,7 @@ export function getEntityTypesStrFromSchema(schema) {
181
181
  fieldTypeStr = `Relation<${fieldTypeStr}>`;
182
182
  if (f.isArray)
183
183
  fieldTypeStr = `${fieldTypeStr}[]`;
184
- const fieldStr = ` ${f.name}${f.isRequired ? "!" : "?"}: ${fieldTypeStr}`;
184
+ const fieldStr = ` ${f.name}${f.isRequired ? "" : "?"}: ${fieldTypeStr}`;
185
185
  const commentStr2 = f.comment ? ` /** ${f.comment} */` : "";
186
186
  return [fieldStr, commentStr2].filter((x) => x).join("\n");
187
187
  }).filter((x) => x).join("\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rads-db",
3
- "version": "3.0.63",
3
+ "version": "3.0.66",
4
4
  "packageManager": "pnpm@8.6.1",
5
5
  "description": "Say goodbye to boilerplate code and hello to efficient and elegant syntax.",
6
6
  "author": "",