@milaboratories/pl-drivers 1.5.17 → 1.5.18
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_blob.d.ts +5 -0
- package/dist/drivers/download_blob.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +48 -36
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -6
- package/src/drivers/download_blob.ts +14 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-drivers",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.18",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20"
|
|
6
6
|
},
|
|
@@ -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/computable": "^2.3.5",
|
|
34
|
+
"@milaboratories/pl-tree": "^1.4.24",
|
|
33
35
|
"@milaboratories/ts-helpers": "^1.1.4",
|
|
34
36
|
"@milaboratories/pl-client": "^2.7.5",
|
|
35
|
-
"@milaboratories/
|
|
36
|
-
"@milaboratories/pl-model-common": "^1.10.5",
|
|
37
|
-
"@milaboratories/pl-tree": "^1.4.24"
|
|
37
|
+
"@milaboratories/pl-model-common": "^1.10.6"
|
|
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/
|
|
51
|
-
"@milaboratories/
|
|
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(
|