@milaboratories/pl-drivers 1.5.17 → 1.5.19

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.5.17",
3
+ "version": "1.5.19",
4
4
  "engines": {
5
5
  "node": ">=20"
6
6
  },
@@ -21,7 +21,7 @@
21
21
  ],
22
22
  "dependencies": {
23
23
  "decompress": "^4.2.1",
24
- "@grpc/grpc-js": "^1.12.5",
24
+ "@grpc/grpc-js": "^1.12.6",
25
25
  "@protobuf-ts/grpc-transport": "^2.9.4",
26
26
  "@protobuf-ts/runtime": "^2.9.4",
27
27
  "@protobuf-ts/runtime-rpc": "^2.9.4",
@@ -30,11 +30,11 @@
30
30
  "tar-fs": "^3.0.8",
31
31
  "undici": "^7.2.3",
32
32
  "zod": "~3.23.8",
33
- "@milaboratories/ts-helpers": "^1.1.4",
34
- "@milaboratories/pl-client": "^2.7.5",
35
33
  "@milaboratories/computable": "^2.3.5",
36
- "@milaboratories/pl-model-common": "^1.10.5",
37
- "@milaboratories/pl-tree": "^1.4.24"
34
+ "@milaboratories/ts-helpers": "^1.1.4",
35
+ "@milaboratories/pl-client": "^2.7.6",
36
+ "@milaboratories/pl-model-common": "^1.10.6",
37
+ "@milaboratories/pl-tree": "^1.4.25"
38
38
  },
39
39
  "devDependencies": {
40
40
  "eslint": "^9.16.0",
@@ -47,8 +47,8 @@
47
47
  "jest": "^29.7.0",
48
48
  "@jest/globals": "^29.7.0",
49
49
  "ts-jest": "^29.2.5",
50
- "@milaboratories/platforma-build-configs": "1.0.2",
51
- "@milaboratories/eslint-config": "^1.0.1"
50
+ "@milaboratories/eslint-config": "^1.0.1",
51
+ "@milaboratories/platforma-build-configs": "1.0.2"
52
52
  },
53
53
  "scripts": {
54
54
  "type-check": "tsc --noEmit --composite false",
@@ -245,6 +245,20 @@ export class DownloadDriver implements BlobDriver {
245
245
  throw new Error('Malformed remote handle');
246
246
  }
247
247
 
248
+ /**
249
+ * Creates computable that will return blob content once it is downloaded.
250
+ * Uses downloaded blob handle under the hood, so stores corresponding blob in file system.
251
+ */
252
+ public getComputableContent(
253
+ res: ResourceInfo | PlTreeEntry
254
+ ): ComputableStableDefined<Uint8Array>{
255
+ return Computable.make((ctx) =>
256
+ this.getDownloadedBlob(res, ctx), {
257
+ postprocessValue: (v) => v ? this.getContent(v.handle) : undefined
258
+ }
259
+ ).withStableType()
260
+ }
261
+
248
262
  /** Returns all logs and schedules a job that reads remain logs.
249
263
  * Notifies when a new portion of the log appeared. */
250
264
  public getLastLogs(