@platforma-sdk/workflow-tengo 5.3.8 → 5.3.10

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.
Files changed (42) hide show
  1. package/dist/tengo/lib/pt.expression.lib.tengo +53 -33
  2. package/dist/tengo/lib/pt.lib.tengo +1 -1
  3. package/dist/tengo/tpl/anonymize.deanonymize.plj.gz +0 -0
  4. package/dist/tengo/tpl/anonymize.impl.plj.gz +0 -0
  5. package/dist/tengo/tpl/check_network.create_workdir_from_storage.plj.gz +0 -0
  6. package/dist/tengo/tpl/check_network.download_blob.plj.gz +0 -0
  7. package/dist/tengo/tpl/check_network.run_hello_world.plj.gz +0 -0
  8. package/dist/tengo/tpl/check_network.run_hello_world_py.plj.gz +0 -0
  9. package/dist/tengo/tpl/check_network.upload_blob.plj.gz +0 -0
  10. package/dist/tengo/tpl/check_network.upload_template.plj.gz +0 -0
  11. package/dist/tengo/tpl/check_network.workdir_type_name_extractor.plj.gz +0 -0
  12. package/dist/tengo/tpl/exec.R.create-renv.plj.gz +0 -0
  13. package/dist/tengo/tpl/exec.delayed-compute-allocation.impl.plj.gz +0 -0
  14. package/dist/tengo/tpl/exec.exec-impl.plj.gz +0 -0
  15. package/dist/tengo/tpl/exec.exec.plj.gz +0 -0
  16. package/dist/tengo/tpl/exec.load-software.impl.plj.gz +0 -0
  17. package/dist/tengo/tpl/exec.monetization_info.plj.gz +0 -0
  18. package/dist/tengo/tpl/exec.monetization_to_json.plj.gz +0 -0
  19. package/dist/tengo/tpl/exec.python.create-venv.plj.gz +0 -0
  20. package/dist/tengo/tpl/exec.python.install-deps.plj.gz +0 -0
  21. package/dist/tengo/tpl/exec.python.venv-bin-path.plj.gz +0 -0
  22. package/dist/tengo/tpl/ll.get-field.plj.gz +0 -0
  23. package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
  24. package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
  25. package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
  26. package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
  27. package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
  28. package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
  29. package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
  30. package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
  31. package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
  32. package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
  33. package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
  34. package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
  35. package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
  36. package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
  37. package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
  38. package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
  39. package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
  40. package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
  41. package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
  42. package/package.json +3 -3
@@ -1122,6 +1122,41 @@ _newExpression = func(expression) {
1122
1122
 
1123
1123
 
1124
1124
 
1125
+ _matcherToAxisSpec := func(ctx, processedMatcher) {
1126
+ ll.assert(!is_undefined(ctx.specDistiller), "specDistiller must be defined")
1127
+ ll.assert(is_map(ctx.distilledAxesSpecs), "distilledAxesSpecs must be a map")
1128
+
1129
+ distilledMatcher := ctx.specDistiller.distill(processedMatcher)
1130
+ discriminativeDomains := ctx.specDistiller.getDiscriminativeDomainsSet(distilledMatcher.name)
1131
+ if ((!is_undefined(distilledMatcher.domain) && len(distilledMatcher.domain) > 0) != (!is_undefined(discriminativeDomains) && len(discriminativeDomains) > 0)) ||
1132
+ (!is_undefined(distilledMatcher.domain) && !is_undefined(discriminativeDomains) && len(distilledMatcher.domain) != len(discriminativeDomains)) {
1133
+ ll.panic("Axis matcher %v is not specific enough. Expected discriminative domains %v, got %v", distilledMatcher.name, discriminativeDomains, distilledMatcher.domain)
1134
+ }
1135
+
1136
+ axisSpec := undefined
1137
+ for spec in ctx.distilledAxesSpecs[distilledMatcher.name] {
1138
+ if !is_undefined(distilledMatcher.type) {
1139
+ if distilledMatcher.type != spec.type {
1140
+ continue
1141
+ }
1142
+ }
1143
+ if !is_undefined(distilledMatcher.domain) {
1144
+ if is_undefined(spec.domain) || len(spec.domain) < len(distilledMatcher.domain) {
1145
+ continue
1146
+ }
1147
+ for domainKey, domainValue in distilledMatcher.domain {
1148
+ if spec.domain[domainKey] != domainValue {
1149
+ continue
1150
+ }
1151
+ }
1152
+ }
1153
+ axisSpec = spec
1154
+ break
1155
+ }
1156
+ ll.assert(!is_undefined(axisSpec), "axis spec not found for matcher %v", processedMatcher)
1157
+ return axisSpec
1158
+ }
1159
+
1125
1160
 
1126
1161
 
1127
1162
 
@@ -1142,36 +1177,7 @@ axis = func(matcher) {
1142
1177
  ll.panic("Matcher for axis must be a string (axis name) or an AxisSpec-like map (with at least 'name' and 'type' fields).")
1143
1178
  }
1144
1179
  return _newExpression(func(ctx) {
1145
- ll.assert(!is_undefined(ctx.specDistiller), "specDistiller must be defined")
1146
- ll.assert(is_map(ctx.distilledAxesSpecs), "distilledAxesSpecs must be a map")
1147
-
1148
- distilledMatcher := ctx.specDistiller.distill(processedMatcher)
1149
- discriminativeDomains := ctx.specDistiller.getDiscriminativeDomainsSet(distilledMatcher.name)
1150
- if ((!is_undefined(distilledMatcher.domain) && len(distilledMatcher.domain) > 0) != (!is_undefined(discriminativeDomains) && len(discriminativeDomains) > 0)) ||
1151
- (!is_undefined(distilledMatcher.domain) && !is_undefined(discriminativeDomains) && len(distilledMatcher.domain) != len(discriminativeDomains)) {
1152
- ll.panic("Axis matcher %v is not specific enough. Expected discriminative domains %v, got %v", distilledMatcher.name, discriminativeDomains, distilledMatcher.domain)
1153
- }
1154
-
1155
- axisSpec := undefined
1156
- for spec in ctx.distilledAxesSpecs[distilledMatcher.name] {
1157
- if !is_undefined(distilledMatcher.type) {
1158
- if distilledMatcher.type != spec.type {
1159
- continue
1160
- }
1161
- }
1162
- if !is_undefined(distilledMatcher.domain) {
1163
- if is_undefined(spec.domain) || len(spec.domain) < len(distilledMatcher.domain) {
1164
- continue
1165
- }
1166
- for domainKey, domainValue in distilledMatcher.domain {
1167
- if spec.domain[domainKey] != domainValue {
1168
- continue
1169
- }
1170
- }
1171
- }
1172
- axisSpec = spec
1173
- break
1174
- }
1180
+ axisSpec := _matcherToAxisSpec(ctx, processedMatcher)
1175
1181
  return {
1176
1182
  type: "axis",
1177
1183
  spec: axisSpec
@@ -1784,10 +1790,24 @@ sc := ll.toStrict({
1784
1790
 
1785
1791
 
1786
1792
 
1787
- axis: func(spec) {
1788
- validation.assertType(spec, pframesSpec.P_AXIS_SPEC_SCHEMA)
1793
+
1794
+
1795
+
1796
+ axis: func(matcher) {
1797
+ processedMatcher := undefined
1798
+ if is_string(matcher) {
1799
+ processedMatcher = { name: matcher, domain: {} }
1800
+ } else if is_map(matcher) {
1801
+ processedMatcher = pframesSpec.axisSpecToMatcher(matcher)
1802
+ } else {
1803
+ ll.panic("Matcher for axis must be a string (axis name) or an AxisSpec-like map (with at least 'name' and 'type' fields).")
1804
+ }
1789
1805
  return _newSelectorExpression(func(ctx) {
1790
- return {type: "selector_axis", spec: spec}
1806
+ axisSpec := _matcherToAxisSpec(ctx, processedMatcher)
1807
+ return {
1808
+ type: "selector_axis",
1809
+ spec: axisSpec
1810
+ }
1791
1811
  })
1792
1812
  },
1793
1813
 
@@ -653,7 +653,7 @@ workflow := func() {
653
653
  entries := []
654
654
  aliases := []
655
655
  for axis in options.axes {
656
- aliases = append(aliases, exp.axis(axis.spec).alias(axis.column))
656
+ aliases = append(aliases, exp.sc.axis(axis.spec).alias(axis.column))
657
657
  }
658
658
  for column in options.columns {
659
659
  decoded := json.decode(column)
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@platforma-sdk/workflow-tengo",
3
- "version": "5.3.8",
3
+ "version": "5.3.10",
4
4
  "description": "Tengo SDK library",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -18,8 +18,8 @@
18
18
  "dependencies": {
19
19
  "@milaboratories/software-pframes-conv": "2.2.9",
20
20
  "@platforma-open/milaboratories.software-small-binaries": "^1.15.23",
21
- "@platforma-open/milaboratories.software-ptabler": "1.12.8",
22
- "@platforma-open/milaboratories.software-ptexter": "1.1.1"
21
+ "@platforma-open/milaboratories.software-ptexter": "1.1.1",
22
+ "@platforma-open/milaboratories.software-ptabler": "1.12.10"
23
23
  },
24
24
  "devDependencies": {
25
25
  "@platforma-sdk/tengo-builder": "2.3.2"