@platforma-open/milaboratories.redefine-clonotypes.model 1.2.1 → 1.2.2

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.
@@ -1,16 +1,16 @@
1
1
   WARN  Issue while reading "/home/runner/work/redefine-clonotypes/redefine-clonotypes/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.redefine-clonotypes.model@1.2.1 build /home/runner/work/redefine-clonotypes/redefine-clonotypes/model
3
+ > @platforma-open/milaboratories.redefine-clonotypes.model@1.2.2 build /home/runner/work/redefine-clonotypes/redefine-clonotypes/model
4
4
  > ts-builder build --target block-model && block-tools build-model
5
5
 
6
6
  Building block-model project...
7
7
  ↳ rollup -c /home/runner/work/redefine-clonotypes/redefine-clonotypes/node_modules/.pnpm/@milaboratories+ts-builder@1.2.2_@microsoft+api-extractor@7.52.11_@types+node@24.5.2__@types+_6fvke5lqntdtrilkbwpueooznu/node_modules/@milaboratories/ts-builder/dist/configs/rollup.block-model.config.js
8
8
  
9
9
  ./src/index.ts → dist, dist...
10
- created dist, dist in 1s
10
+ created dist, dist in 918ms
11
11
  
12
12
  ./src/index.ts → dist...
13
13
  (!) Circular dependency
14
- ../node_modules/.pnpm/@platforma-sdk+model@1.51.5/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js -> ../node_modules/.pnpm/@platforma-sdk+model@1.51.5/node_modules/@platforma-sdk/model/dist/pframe_utils/columns.js -> ../node_modules/.pnpm/@platforma-sdk+model@1.51.5/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js
15
- created dist in 1.8s
14
+ ../node_modules/.pnpm/@platforma-sdk+model@1.51.6/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js -> ../node_modules/.pnpm/@platforma-sdk+model@1.51.6/node_modules/@platforma-sdk/model/dist/pframe_utils/columns.js -> ../node_modules/.pnpm/@platforma-sdk+model@1.51.6/node_modules/@platforma-sdk/model/dist/components/PFrameForGraphs.js
15
+ created dist in 1.7s
16
16
  Build completed successfully
@@ -1,5 +1,5 @@
1
1
   WARN  Issue while reading "/home/runner/work/redefine-clonotypes/redefine-clonotypes/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.redefine-clonotypes.model@1.2.1 lint /home/runner/work/redefine-clonotypes/redefine-clonotypes/model
3
+ > @platforma-open/milaboratories.redefine-clonotypes.model@1.2.2 lint /home/runner/work/redefine-clonotypes/redefine-clonotypes/model
4
4
  > eslint .
5
5
 
@@ -1,6 +1,6 @@
1
1
   WARN  Issue while reading "/home/runner/work/redefine-clonotypes/redefine-clonotypes/.npmrc". Failed to replace env in config: ${NPMJS_TOKEN}
2
2
 
3
- > @platforma-open/milaboratories.redefine-clonotypes.model@1.2.1 type-check /home/runner/work/redefine-clonotypes/redefine-clonotypes/model
3
+ > @platforma-open/milaboratories.redefine-clonotypes.model@1.2.2 type-check /home/runner/work/redefine-clonotypes/redefine-clonotypes/model
4
4
  > ts-builder types --target block-model
5
5
 
6
6
  ↳ tsc --noEmit --project ./tsconfig.json --customConditions ,
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @platforma-open/milaboratories.redefine-clonotypes.model
2
2
 
3
+ ## 1.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - f581ff4: Updated SDK
8
+
3
9
  ## 1.2.1
4
10
 
5
11
  ### Patch Changes
package/dist/bundle.js CHANGED
@@ -6088,6 +6088,25 @@
6088
6088
  }
6089
6089
  return result;
6090
6090
  };
6091
+ // Checks if a result has all unique labels
6092
+ const hasUniqueLabels = (result) => result !== undefined && new Set(result.map((c) => c.label)).size === values.length;
6093
+ // Post-processing: try removing types one by one (lowest importance first) to minimize the label set
6094
+ const minimizeTypeSet = (typeSet) => {
6095
+ // Get types sorted by importance ascending (lowest first), excluding forced elements
6096
+ const removableSorted = [...typeSet]
6097
+ .filter((t) => !forceTraceElements?.has(t.split('@')[0])
6098
+ && !(ops.includeNativeLabel && t === LabelTypeFull))
6099
+ .sort((a, b) => (importances.get(a) ?? 0) - (importances.get(b) ?? 0));
6100
+ for (const typeToRemove of removableSorted) {
6101
+ const reducedSet = new Set(typeSet);
6102
+ reducedSet.delete(typeToRemove);
6103
+ const candidateResult = calculate(reducedSet);
6104
+ if (hasUniqueLabels(candidateResult)) {
6105
+ typeSet.delete(typeToRemove);
6106
+ }
6107
+ }
6108
+ return typeSet;
6109
+ };
6091
6110
  if (mainTypes.length === 0) {
6092
6111
  if (secondaryTypes.length !== 0)
6093
6112
  throw new Error('Non-empty secondary types list while main types list is empty.');
@@ -6113,16 +6132,20 @@
6113
6132
  if (additionalType >= 0)
6114
6133
  currentSet.add(mainTypes[additionalType]);
6115
6134
  const candidateResult = calculate(currentSet);
6116
- // checking if labels uniquely separate our records
6117
- if (candidateResult !== undefined && new Set(candidateResult.map((c) => c.label)).size === values.length)
6118
- return candidateResult;
6135
+ if (hasUniqueLabels(candidateResult)) {
6136
+ minimizeTypeSet(currentSet);
6137
+ return calculate(currentSet);
6138
+ }
6119
6139
  additionalType++;
6120
6140
  if (additionalType >= mainTypes.length) {
6121
6141
  includedTypes++;
6122
6142
  additionalType = includedTypes;
6123
6143
  }
6124
6144
  }
6125
- return calculate(new Set([...mainTypes, ...secondaryTypes]), true);
6145
+ // Fallback: include all types, then try to minimize
6146
+ const fallbackSet = new Set([...mainTypes, ...secondaryTypes]);
6147
+ minimizeTypeSet(fallbackSet);
6148
+ return calculate(fallbackSet, true);
6126
6149
  }
6127
6150
 
6128
6151
  const PCD_PREFIX = 'PColumnData/';
@@ -7358,7 +7381,7 @@
7358
7381
  }
7359
7382
  }
7360
7383
 
7361
- var version = "1.51.5";
7384
+ var version = "1.51.6";
7362
7385
 
7363
7386
  const PlatformaSDKVersion = version;
7364
7387