@milaboratories/pl-drivers 1.12.10 → 1.12.11

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@milaboratories/pl-drivers",
3
- "version": "1.12.10",
3
+ "version": "1.12.11",
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,11 +28,11 @@
28
28
  "tar-fs": "^3.0.9",
29
29
  "undici": "~7.16.0",
30
30
  "zod": "~3.25.76",
31
- "@milaboratories/computable": "2.9.2",
32
31
  "@milaboratories/helpers": "1.14.1",
33
32
  "@milaboratories/pl-client": "3.1.1",
34
- "@milaboratories/pl-model-common": "1.31.2",
35
33
  "@milaboratories/ts-helpers": "1.8.1",
34
+ "@milaboratories/computable": "2.9.2",
35
+ "@milaboratories/pl-model-common": "1.31.2",
36
36
  "@milaboratories/pl-tree": "1.9.9"
37
37
  },
38
38
  "devDependencies": {
@@ -43,9 +43,9 @@
43
43
  "openapi-typescript": "^7.10.0",
44
44
  "typescript": "~5.9.3",
45
45
  "vitest": "^4.1.3",
46
- "@milaboratories/build-configs": "2.0.0",
47
46
  "@milaboratories/test-helpers": "1.2.1",
48
- "@milaboratories/ts-builder": "1.3.1",
47
+ "@milaboratories/build-configs": "2.0.0",
48
+ "@milaboratories/ts-builder": "1.3.2",
49
49
  "@milaboratories/ts-configs": "1.2.3"
50
50
  },
51
51
  "engines": {
@@ -41,6 +41,7 @@ test("should download a tar archive and extracts its content and then deleted",
41
41
  expect(indexJsCode).toContain("use strict");
42
42
 
43
43
  c.resetState();
44
+ await c.awaitChange();
44
45
  });
45
46
  }, 45000);
46
47
 
@@ -1,4 +1,4 @@
1
- import { expect, test } from "vitest";
1
+ import { expect, test, vi } from "vitest";
2
2
  import { Computable } from "@milaboratories/computable";
3
3
  import type {
4
4
  AnyFieldRef,
@@ -28,6 +28,12 @@ const downloadDriverOps = {
28
28
  rangesCacheMaxSizeBytes: 1024,
29
29
  };
30
30
 
31
+ const useDocker = process.env.PL_TEST_USE_DOCKER === "true";
32
+
33
+ vi.setConfig({
34
+ testTimeout: 90000,
35
+ });
36
+
31
37
  test("should get all logs", async () => {
32
38
  await TestHelpers.withTempRoot(async (client) => {
33
39
  const logger = new ConsoleLoggerAdapter();
@@ -50,7 +56,7 @@ test("should get all logs", async () => {
50
56
  );
51
57
  const logs = new LogsDriver(logger, logsStream, download);
52
58
 
53
- await createRunCommandWithStdoutStream(client, "bash", ["-c", "echo 1; sleep 1; echo 2"]);
59
+ await createRunCommandWithStdoutStream(client, "sh", ["-c", "echo 1; sleep 1; echo 2"]);
54
60
 
55
61
  const c = Computable.make((ctx) => {
56
62
  const streamManager = ctx.accessor(tree.entry()).node().traverse("result")?.persist();
@@ -109,7 +115,7 @@ test("should get last line with a prefix", async () => {
109
115
 
110
116
  expect(await c.getValue()).toBeUndefined();
111
117
 
112
- await createRunCommandWithStdoutStream(client, "bash", [
118
+ await createRunCommandWithStdoutStream(client, "sh", [
113
119
  "-c",
114
120
  "echo PREFIX1; echo PREFIX2; echo 3; sleep 0.1; echo PREFIX4",
115
121
  ]);
@@ -162,7 +168,7 @@ test("should get log smart object and get log lines from that", async () => {
162
168
  return logs.getLogHandle(streamManager, ctx);
163
169
  });
164
170
 
165
- await createRunCommandWithStdoutStream(client, "bash", ["-c", "echo 1; sleep 1; echo 2"]);
171
+ await createRunCommandWithStdoutStream(client, "sh", ["-c", "echo 1; sleep 1; echo 2"]);
166
172
 
167
173
  let handle = await c.getValue();
168
174
 
@@ -261,12 +267,15 @@ function createRunCommand(
261
267
  value: arg,
262
268
  };
263
269
  });
264
- const optsData = {
270
+ const optsData: Record<string, unknown> = {
265
271
  errorLines: 200,
266
272
  redirectStdout: "logs.txt",
267
273
  redirectStderr: "logs.txt",
268
274
  envs: [],
269
275
  };
276
+ if (useDocker) {
277
+ optsData.dockerImageTag = "busybox";
278
+ }
270
279
 
271
280
  const runCmdId = tx.createEphemeral({ name: "RunCommand/executor", version: "2" });
272
281