@milaboratories/pl-drivers 1.2.27 → 1.2.28
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/drivers/download_url.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +440 -447
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -6
- package/src/drivers/download_url.ts +2 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-drivers",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.28",
|
|
4
4
|
"description": "Drivers and a low-level clients for log streaming, downloading and uploading files from and to pl",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"tar-fs": "^3.0.6",
|
|
27
27
|
"undici": "^6.19.8",
|
|
28
28
|
"zod": "^3.23.8",
|
|
29
|
-
"@milaboratories/ts-helpers": "^1.0.
|
|
30
|
-
"@milaboratories/computable": "^2.1.
|
|
31
|
-
"@milaboratories/pl-client": "^2.4.
|
|
32
|
-
"@milaboratories/pl-tree": "^1.3.
|
|
29
|
+
"@milaboratories/ts-helpers": "^1.0.29",
|
|
30
|
+
"@milaboratories/computable": "^2.1.11",
|
|
31
|
+
"@milaboratories/pl-client": "^2.4.18",
|
|
32
|
+
"@milaboratories/pl-tree": "^1.3.17",
|
|
33
33
|
"@milaboratories/pl-model-common": "^1.3.13"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"scripts": {
|
|
47
47
|
"type-check": "tsc --noEmit --composite false",
|
|
48
48
|
"build": "vite build",
|
|
49
|
-
"test": "jest --runInBand"
|
|
49
|
+
"test": "jest --runInBand",
|
|
50
|
+
"do-pack": "rm -f *.tgz && pnpm pack && mv *.tgz package.tgz"
|
|
50
51
|
}
|
|
51
52
|
}
|
|
@@ -2,7 +2,8 @@ import {
|
|
|
2
2
|
CallersCounter,
|
|
3
3
|
MiLogger,
|
|
4
4
|
TaskProcessor,
|
|
5
|
-
notEmpty
|
|
5
|
+
notEmpty,
|
|
6
|
+
fileExists,
|
|
6
7
|
} from '@milaboratories/ts-helpers';
|
|
7
8
|
import * as fsp from 'node:fs/promises';
|
|
8
9
|
import * as path from 'node:path';
|
|
@@ -282,15 +283,6 @@ class Download {
|
|
|
282
283
|
|
|
283
284
|
class URLAborted extends Error {}
|
|
284
285
|
|
|
285
|
-
async function fileExists(path: string): Promise<boolean> {
|
|
286
|
-
try {
|
|
287
|
-
await fsp.access(path);
|
|
288
|
-
return true;
|
|
289
|
-
} catch {
|
|
290
|
-
return false;
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
286
|
/** Gets a directory size by calculating sizes recursively. */
|
|
295
287
|
async function dirSize(dir: string): Promise<number> {
|
|
296
288
|
const files = await fsp.readdir(dir, { withFileTypes: true });
|