@dnax/core 0.45.7 → 0.45.9
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/bin/index.ts +21 -2
- package/package.json +14 -14
- package/utils/index.ts +31 -0
package/bin/index.ts
CHANGED
|
@@ -38,7 +38,25 @@ ch.watch(".", {
|
|
|
38
38
|
/node_modules/,
|
|
39
39
|
/(^|[\/\\])\../,
|
|
40
40
|
"*/node_modules",
|
|
41
|
+
".env.*",
|
|
42
|
+
".env",
|
|
43
|
+
".nitro",
|
|
44
|
+
".git",
|
|
45
|
+
".output",
|
|
46
|
+
".vscode",
|
|
47
|
+
".idea",
|
|
48
|
+
".DS_Store",
|
|
49
|
+
".env.local",
|
|
50
|
+
".env.development",
|
|
51
|
+
".env.test",
|
|
52
|
+
".env.production",
|
|
41
53
|
"node_modules",
|
|
54
|
+
"package.json",
|
|
55
|
+
"package-lock.json",
|
|
56
|
+
"yarn.lock",
|
|
57
|
+
"yarn-error.log",
|
|
58
|
+
"bun.lockb",
|
|
59
|
+
"bun.lock",
|
|
42
60
|
"*.docs",
|
|
43
61
|
".docx",
|
|
44
62
|
".pdf",
|
|
@@ -66,6 +84,8 @@ ch.watch(".", {
|
|
|
66
84
|
"dist",
|
|
67
85
|
"*/dist",
|
|
68
86
|
"*.zip",
|
|
87
|
+
"*.log",
|
|
88
|
+
".DS_Store",
|
|
69
89
|
"*.tar",
|
|
70
90
|
"*.tar.gz",
|
|
71
91
|
"build",
|
|
@@ -87,13 +107,12 @@ ch.watch(".", {
|
|
|
87
107
|
}
|
|
88
108
|
setTimeout(() => {
|
|
89
109
|
runPkg({ stopSpinner: true });
|
|
90
|
-
},
|
|
110
|
+
}, 1500);
|
|
91
111
|
}
|
|
92
112
|
})
|
|
93
113
|
.on("ready", () => {
|
|
94
114
|
let dev = process.argv.includes("--dev");
|
|
95
115
|
let start = process.argv.includes("--start");
|
|
96
|
-
|
|
97
116
|
if (dev || start) {
|
|
98
117
|
runPkg();
|
|
99
118
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dnax/core",
|
|
3
|
-
"version": "0.45.
|
|
3
|
+
"version": "0.45.9",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"@types/bun": "latest",
|
|
11
11
|
"@types/dot-object": "^2.1.6",
|
|
12
12
|
"@types/fs-extra": "^11.0.4",
|
|
13
|
-
"@types/jsonwebtoken": "9.0.
|
|
13
|
+
"@types/jsonwebtoken": "9.0.9",
|
|
14
14
|
"@types/mime-types": "^2.1.4",
|
|
15
15
|
"@types/nodemailer": "^6.4.15",
|
|
16
16
|
"@types/pidusage": "^2.0.5",
|
|
@@ -18,18 +18,18 @@
|
|
|
18
18
|
"@types/uuid": "^10.0.0"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"typescript": "^5.
|
|
21
|
+
"typescript": "^5.8.2"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@clack/prompts": "^0.
|
|
24
|
+
"@clack/prompts": "^0.10.0",
|
|
25
25
|
"@colors/colors": "^1.6.0",
|
|
26
26
|
"@lukeed/ms": "^2.0.2",
|
|
27
|
-
"bentocache": "^1.
|
|
27
|
+
"bentocache": "^1.2.1",
|
|
28
28
|
"boxen": "^7.1.1",
|
|
29
29
|
"chokidar": "3.6.0",
|
|
30
30
|
"clean-deep": "^3.4.0",
|
|
31
31
|
"collect.js": "^4.36.1",
|
|
32
|
-
"consola": "^3.2
|
|
32
|
+
"consola": "^3.4.2",
|
|
33
33
|
"cookie": "^0.6.0",
|
|
34
34
|
"croner": "8.1.1",
|
|
35
35
|
"deepcopy": "^2.1.0",
|
|
@@ -40,23 +40,23 @@
|
|
|
40
40
|
"generate-unique-id": "^2.0.3",
|
|
41
41
|
"hono": "4.6.14",
|
|
42
42
|
"joi": "17.13.3",
|
|
43
|
-
"json-joy": "
|
|
43
|
+
"json-joy": "17.32.1",
|
|
44
44
|
"jsonwebtoken": "^9.0.2",
|
|
45
45
|
"libreoffice-convert": "^1.6.0",
|
|
46
46
|
"mime-types": "^2.1.35",
|
|
47
47
|
"mingo": "^6.5.0",
|
|
48
48
|
"moment": "^2.30.1",
|
|
49
|
-
"mongodb": "^6.
|
|
49
|
+
"mongodb": "^6.15.0",
|
|
50
50
|
"nodemailer": "^6.9.14",
|
|
51
|
-
"pidusage": "^
|
|
52
|
-
"pizzip": "^3.1.
|
|
51
|
+
"pidusage": "^4.0.0",
|
|
52
|
+
"pizzip": "^3.1.8",
|
|
53
53
|
"radash": "^12.1.0",
|
|
54
54
|
"rfc6902": "^5.1.2",
|
|
55
55
|
"sharp": "^0.33.5",
|
|
56
|
-
"signaldb": "^0.24.
|
|
57
|
-
"ssh2-sftp-client": "^
|
|
58
|
-
"ufo": "^1.5.
|
|
56
|
+
"signaldb": "^0.24.5",
|
|
57
|
+
"ssh2-sftp-client": "^12.0.0",
|
|
58
|
+
"ufo": "^1.5.4",
|
|
59
59
|
"urlencode": "^2.0.0",
|
|
60
|
-
"uuid": "^
|
|
60
|
+
"uuid": "^11.1.0"
|
|
61
61
|
}
|
|
62
62
|
}
|
package/utils/index.ts
CHANGED
|
@@ -479,6 +479,37 @@ const file = {
|
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
481
|
},
|
|
482
|
+
downloadToDisk: async (
|
|
483
|
+
path: string,
|
|
484
|
+
url: string
|
|
485
|
+
): Promise<{
|
|
486
|
+
size: number;
|
|
487
|
+
type: string;
|
|
488
|
+
lastModified: Date;
|
|
489
|
+
original_name: string | undefined;
|
|
490
|
+
name: string | undefined;
|
|
491
|
+
}> => {
|
|
492
|
+
// save to disk
|
|
493
|
+
return new Promise(async (resolve, reject) => {
|
|
494
|
+
try {
|
|
495
|
+
let r = await fetch(url);
|
|
496
|
+
// let data = await r.arrayBuffer();
|
|
497
|
+
await Bun.write(path, r, {
|
|
498
|
+
createPath: true,
|
|
499
|
+
});
|
|
500
|
+
let file = await Bun.file(path);
|
|
501
|
+
resolve({
|
|
502
|
+
original_name: file.name,
|
|
503
|
+
name: file.name,
|
|
504
|
+
lastModified: moment.unix(file.lastModified).toDate(),
|
|
505
|
+
size: file.size,
|
|
506
|
+
type: file.type,
|
|
507
|
+
});
|
|
508
|
+
} catch (err: any) {
|
|
509
|
+
reject(err?.message);
|
|
510
|
+
}
|
|
511
|
+
});
|
|
512
|
+
},
|
|
482
513
|
|
|
483
514
|
deleteFromDisk: async (path: string) => {
|
|
484
515
|
return new Promise(async (resolve, reject) => {
|