@dnax/core 0.1.19 → 0.1.20

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/app/hono.ts CHANGED
@@ -372,7 +372,7 @@ function HonoInstance(): typeof app {
372
372
 
373
373
  return c.json(response);
374
374
  } catch (err: any) {
375
- if (Cfg?.debug) console.log(err?.message);
375
+ // if (Cfg?.debug) console.log(err?.message);
376
376
  if (err?.code && (err?.code < 200 || err?.code > 599)) {
377
377
  err.code = 409;
378
378
  }
@@ -225,18 +225,6 @@ function toBson<T>(
225
225
  function deepSetId(col: Collection, data: any) {
226
226
  if (col) {
227
227
  col?.fields?.map((f) => {
228
- if (f?.type == "array" && !data[f?.name]) {
229
- data[f.name] = [];
230
- }
231
-
232
- if (
233
- f?.type == "relationship" &&
234
- f?.relationType == "ref-to-many" &&
235
- !data[f?.name]
236
- ) {
237
- data[f.name] = [];
238
- }
239
-
240
228
  if (f?.type == "relationship" && data[f.name]) {
241
229
  if (typeof data[f.name] == "object" && !Array.isArray(data[f.name])) {
242
230
  data[f.name] = data[f.name]?._id || data[f.name]?.id || data[f.name];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "devDependencies": {