rads-db 3.2.10 → 3.2.12

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/index.cjs CHANGED
@@ -61,7 +61,7 @@ function getZodSchema(zodSchemas, schema, key) {
61
61
  }
62
62
  objectSchema[fieldName] = getFieldZodSchema(zodSchemas, schema, f);
63
63
  if (f.isChange) {
64
- objectSchema[`${fieldName}_replace`] = getFieldZodSchema(zodSchemas, schema, f);
64
+ objectSchema[`${fieldName}_replace`] = getFieldZodSchema(zodSchemas, schema, f).optional();
65
65
  }
66
66
  }
67
67
  return zod.z.object(objectSchema);
@@ -1053,7 +1053,6 @@ function getRadsDbMethods(key, computedContext, driverInstance) {
1053
1053
  throw new Error("Id is required");
1054
1054
  ctx = { ...options.context, ...ctx };
1055
1055
  const oldDoc = await driverInstance.get({ where: { id: doc.id } }, ctx);
1056
- console.log(___default.cloneDeep(doc), oldDoc, merge(oldDoc || {}, doc));
1057
1056
  if (oldDoc)
1058
1057
  doc = merge(oldDoc, doc);
1059
1058
  if (!options.keepNulls)
package/dist/index.mjs CHANGED
@@ -54,7 +54,7 @@ function getZodSchema(zodSchemas, schema, key) {
54
54
  }
55
55
  objectSchema[fieldName] = getFieldZodSchema(zodSchemas, schema, f);
56
56
  if (f.isChange) {
57
- objectSchema[`${fieldName}_replace`] = getFieldZodSchema(zodSchemas, schema, f);
57
+ objectSchema[`${fieldName}_replace`] = getFieldZodSchema(zodSchemas, schema, f).optional();
58
58
  }
59
59
  }
60
60
  return z.object(objectSchema);
@@ -1046,7 +1046,6 @@ function getRadsDbMethods(key, computedContext, driverInstance) {
1046
1046
  throw new Error("Id is required");
1047
1047
  ctx = { ...options.context, ...ctx };
1048
1048
  const oldDoc = await driverInstance.get({ where: { id: doc.id } }, ctx);
1049
- console.log(_.cloneDeep(doc), oldDoc, merge(oldDoc || {}, doc));
1050
1049
  if (oldDoc)
1051
1050
  doc = merge(oldDoc, doc);
1052
1051
  if (!options.keepNulls)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rads-db",
3
- "version": "3.2.10",
3
+ "version": "3.2.12",
4
4
  "description": "Say goodbye to boilerplate code and hello to efficient and elegant syntax.",
5
5
  "author": "",
6
6
  "license": "ISC",