@milaboratories/pl-client 2.5.2 → 2.5.3

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-client",
3
- "version": "2.5.2",
3
+ "version": "2.5.3",
4
4
  "description": "New TS/JS client for Platform API",
5
5
  "types": "./dist/index.d.ts",
6
6
  "main": "./dist/index.js",
package/src/core/final.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  import { Optional } from 'utility-types';
2
- import { BasicResourceData, getField, isNotNullResourceId, isNullResourceId, ResourceData } from './types';
2
+ import {
3
+ BasicResourceData,
4
+ getField,
5
+ isNotNullResourceId,
6
+ isNullResourceId,
7
+ ResourceData
8
+ } from './types';
3
9
 
4
10
  /**
5
11
  * Function is used to guide multiple layers of caching in pl-client and derived pl-tree.
@@ -36,13 +42,12 @@ const unknownResourceTypeNames = new Set<string>();
36
42
  export const DefaultFinalResourceDataPredicate: FinalResourceDataPredicate = (r): boolean => {
37
43
  switch (r.type.name) {
38
44
  case 'StreamManager':
39
- if(!readyOrDuplicateOrError(r))
40
- return false;
45
+ if (!readyOrDuplicateOrError(r)) return false;
41
46
  if (r.fields === undefined) return true; // if fields are not provided basic resource state is not expected to change in the future
42
- if(isNotNullResourceId(r.error)) return true;
43
- const downloadable = getField(r as ResourceData, "downloadable");
44
- const stream = getField(r as ResourceData, "stream");
45
- return stream.value === downloadable.value
47
+ if (isNotNullResourceId(r.error)) return true;
48
+ const downloadable = getField(r as ResourceData, 'downloadable');
49
+ const stream = getField(r as ResourceData, 'stream');
50
+ return stream.value === downloadable.value;
46
51
  case 'StdMap':
47
52
  case 'std/map':
48
53
  case 'EphStdMap':
@@ -71,6 +76,7 @@ export const DefaultFinalResourceDataPredicate: FinalResourceDataPredicate = (r)
71
76
  case 'Frontend/FromFolder':
72
77
  case 'BObjectSpec':
73
78
  case 'Blob':
79
+ case 'LSProvider':
74
80
  return true;
75
81
  case 'UserProject':
76
82
  case 'Projects':
@@ -78,7 +84,7 @@ export const DefaultFinalResourceDataPredicate: FinalResourceDataPredicate = (r)
78
84
  return false;
79
85
  default:
80
86
  if (r.type.name.startsWith('Blob/')) return true;
81
- else if (r.type.name.startsWith('BlobUpload/')) {
87
+ else if (r.type.name.startsWith('BlobUpload/') || r.type.name.startsWith('BlobIndex/')) {
82
88
  return readyAndHasAllOutputsFilled(r);
83
89
  } else if (r.type.name.startsWith('PColumnData/')) {
84
90
  return readyOrDuplicateOrError(r);