@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 +5 -0
- package/driver/mongo/utils.ts +1 -1
- package/lib/media/sftp.ts +3 -2
- package/lib/schema.ts +2 -1
- package/package.json +1 -1
- package/types/index.ts +1 -0
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,
|
package/driver/mongo/utils.ts
CHANGED
|
@@ -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.
|
|
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?.
|
|
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