@milaboratories/pl-drivers 1.11.56 → 1.11.57
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/package.json +11 -11
- package/src/drivers/download_url/driver.test.ts +29 -21
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-drivers",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.57",
|
|
4
4
|
"description": "Drivers and a low-level clients for log streaming, downloading and uploading files from and to pl",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**/*",
|
|
@@ -28,25 +28,25 @@
|
|
|
28
28
|
"tar-fs": "^3.0.9",
|
|
29
29
|
"undici": "~7.16.0",
|
|
30
30
|
"zod": "~3.23.8",
|
|
31
|
-
"@milaboratories/pl-client": "2.17.6",
|
|
32
31
|
"@milaboratories/helpers": "1.13.5",
|
|
33
|
-
"@milaboratories/pl-model-common": "1.25.0",
|
|
34
|
-
"@milaboratories/ts-helpers": "1.7.2",
|
|
35
32
|
"@milaboratories/computable": "2.8.5",
|
|
36
|
-
"@milaboratories/pl-
|
|
33
|
+
"@milaboratories/pl-model-common": "1.25.1",
|
|
34
|
+
"@milaboratories/pl-client": "2.17.7",
|
|
35
|
+
"@milaboratories/ts-helpers": "1.7.2",
|
|
36
|
+
"@milaboratories/pl-tree": "1.8.45"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
39
|
"@types/decompress": "^4.2.7",
|
|
40
40
|
"@types/node": "~24.5.2",
|
|
41
41
|
"@types/tar-fs": "^2.0.4",
|
|
42
|
-
"@vitest/coverage-istanbul": "^4.0.
|
|
42
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
43
43
|
"openapi-typescript": "^7.10.0",
|
|
44
44
|
"typescript": "~5.6.3",
|
|
45
|
-
"vitest": "^4.0.
|
|
46
|
-
"@milaboratories/
|
|
47
|
-
"@milaboratories/
|
|
48
|
-
"@milaboratories/
|
|
49
|
-
"@milaboratories/
|
|
45
|
+
"vitest": "^4.0.18",
|
|
46
|
+
"@milaboratories/build-configs": "1.5.0",
|
|
47
|
+
"@milaboratories/ts-configs": "1.2.1",
|
|
48
|
+
"@milaboratories/ts-builder": "1.2.11",
|
|
49
|
+
"@milaboratories/test-helpers": "1.1.8"
|
|
50
50
|
},
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=22"
|
|
@@ -8,6 +8,7 @@ import * as fsp from "node:fs/promises";
|
|
|
8
8
|
import * as path from "node:path";
|
|
9
9
|
import { DownloadUrlDriver } from "./driver";
|
|
10
10
|
import { test, expect } from "vitest";
|
|
11
|
+
import { TestTags } from "@milaboratories/build-configs";
|
|
11
12
|
|
|
12
13
|
test("should download a tar archive and extracts its content and then deleted", async () => {
|
|
13
14
|
await TestHelpers.withTempRoot(async (client) => {
|
|
@@ -43,27 +44,34 @@ test("should download a tar archive and extracts its content and then deleted",
|
|
|
43
44
|
});
|
|
44
45
|
}, 45000);
|
|
45
46
|
|
|
46
|
-
test(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
test(
|
|
48
|
+
"should show a error when 404 status code",
|
|
49
|
+
{ tag: [TestTags.Flaky] },
|
|
50
|
+
async () => {
|
|
51
|
+
await TestHelpers.withTempRoot(async (client) => {
|
|
52
|
+
const logger = new ConsoleLoggerAdapter();
|
|
53
|
+
const dir = await fsp.mkdtemp(path.join(os.tmpdir(), "test1-"));
|
|
54
|
+
const driver = new DownloadUrlDriver(logger, client.httpDispatcher, dir, genSigner());
|
|
55
|
+
|
|
56
|
+
const url = new URL(
|
|
57
|
+
"https://block.registry.platforma.bio/releases/v1/milaboratory/NOT_FOUND",
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
const c = driver.getUrl(url);
|
|
61
|
+
|
|
62
|
+
const url1 = await c.getValue();
|
|
63
|
+
expect(url1).toBeUndefined();
|
|
64
|
+
|
|
65
|
+
await c.awaitChange();
|
|
66
|
+
|
|
67
|
+
const url2 = await c.getValue();
|
|
68
|
+
expect(url2).not.toBeUndefined();
|
|
69
|
+
expect(url2?.error).not.toBeUndefined();
|
|
70
|
+
expect(url2?.url).toBeUndefined();
|
|
71
|
+
});
|
|
72
|
+
},
|
|
73
|
+
60000,
|
|
74
|
+
);
|
|
67
75
|
|
|
68
76
|
test("should abort a downloading process when we reset a state of a computable", async () => {
|
|
69
77
|
await TestHelpers.withTempRoot(async (client) => {
|