@dnax/core 0.76.15 → 0.77.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/app/hono.ts CHANGED
@@ -416,6 +416,11 @@ function HonoInstance(): typeof app {
416
416
  c.req.raw.headers?.get("remoteaddr") ||
417
417
  "::1",
418
418
  });
419
+
420
+ if (col?.privateFields?.length) {
421
+ responseAuth = omit(responseAuth, col?.privateFields);
422
+ }
423
+
419
424
  return c.json({
420
425
  auth: true,
421
426
  data: responseAuth,
@@ -390,7 +390,7 @@ async function setUUID(
390
390
  ): Promise<any> {
391
391
  var code = null;
392
392
  for await (let f of col?.fields || []) {
393
- if (f?.type == "uuid") {
393
+ if (f?.type == "uuid" && !data?.hasOwnProperty(f?.name)) {
394
394
  code = v4();
395
395
  data[f.name] = code;
396
396
  // if unique
package/lib/media/sftp.ts CHANGED
@@ -93,13 +93,14 @@ class FilesystemSftpAdapter {
93
93
  localPath,
94
94
  remotePath,
95
95
  {
96
+
96
97
  mode: 0o777,
97
98
  // concurrency
98
99
  },
99
- (err) => {
100
+ (err: any) => {
100
101
  conn.end();
101
102
  if (err) {
102
- console.log("Error exist");
103
+ console.error(err?.message || err);
103
104
  }
104
105
  if (err) {
105
106
  reject(err?.message);
package/lib/schema.ts CHANGED
@@ -103,7 +103,8 @@ function buildSchema(col: Collection): AnySchema {
103
103
 
104
104
  if (f?.type == "enum") {
105
105
  let items: Array<any> = [];
106
- f?.enum?.items?.map((item) => {
106
+ let localItems = f?.enum?.items || f?.enum?.values || [];
107
+ localItems?.map((item) => {
107
108
  if (typeof item == "string") {
108
109
  items.push(item);
109
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dnax/core",
3
- "version": "0.76.15",
3
+ "version": "0.77.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "bin": {},
package/types/index.ts CHANGED
@@ -125,6 +125,7 @@ export type Field = {
125
125
  enum?: {
126
126
  multiple?: boolean;
127
127
  items: Array<any>;
128
+ values?:Array<any>
128
129
  };
129
130
  required?: boolean;
130
131
  nullable?: boolean;