@platforma-sdk/workflow-tengo 6.19.0 → 6.20.0

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 (49) hide show
  1. package/dist/tengo/lib/workflow.column-value.lib.tengo +118 -0
  2. package/dist/tengo/tpl/annotations.compute.plj.gz +0 -0
  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.conda.create-env.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.build-table.plj.gz +0 -0
  24. package/dist/tengo/tpl/pframes.export-multiple-pcolumns.plj.gz +0 -0
  25. package/dist/tengo/tpl/pframes.export-parquet-pcolumn-chunk.plj.gz +0 -0
  26. package/dist/tengo/tpl/pframes.export-pframe-for-ui.plj.gz +0 -0
  27. package/dist/tengo/tpl/pframes.export-pframe.plj.gz +0 -0
  28. package/dist/tengo/tpl/pframes.export-single-pcolumn.plj.gz +0 -0
  29. package/dist/tengo/tpl/pframes.import-dir.plj.gz +0 -0
  30. package/dist/tengo/tpl/pframes.merge-resource-maps.plj.gz +0 -0
  31. package/dist/tengo/tpl/pframes.parse-to-json.plj.gz +0 -0
  32. package/dist/tengo/tpl/pframes.process-pcolumn-batch-split.plj.gz +0 -0
  33. package/dist/tengo/tpl/pframes.process-pcolumn-batch.plj.gz +0 -0
  34. package/dist/tengo/tpl/pframes.process-pcolumn-data.plj.gz +0 -0
  35. package/dist/tengo/tpl/pframes.remove-nulls.plj.gz +0 -0
  36. package/dist/tengo/tpl/pframes.slice-data.plj.gz +0 -0
  37. package/dist/tengo/tpl/pframes.xsv-export-pframe.plj.gz +0 -0
  38. package/dist/tengo/tpl/pframes.xsv-import-if-not-null.plj.gz +0 -0
  39. package/dist/tengo/tpl/pframes.xsv-import-map.plj.gz +0 -0
  40. package/dist/tengo/tpl/pt.import-dir.plj.gz +0 -0
  41. package/dist/tengo/tpl/pt.workflow-run.plj.gz +0 -0
  42. package/dist/tengo/tpl/v2.export-collection-for-ui.plj.gz +0 -0
  43. package/dist/tengo/tpl/v2.export-for-ui.plj.gz +0 -0
  44. package/dist/tengo/tpl/waiter.waiter.plj.gz +0 -0
  45. package/dist/tengo/tpl/workdir.save.plj.gz +0 -0
  46. package/dist/tengo/tpl/workflow.build-ctx.plj.gz +0 -0
  47. package/dist/tengo/tpl/workflow.query-anchored.plj.gz +0 -0
  48. package/dist/tengo/tpl/workflow.query-context-filter.plj.gz +0 -0
  49. package/package.json +2 -2
@@ -0,0 +1,118 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+ ll := import("@platforma-sdk/workflow-tengo:ll")
18
+ json := import("json")
19
+ text := import("text")
20
+
21
+ _parseColumnValueId := undefined // Forward declaration
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+ isColumnValueId := func(s) {
31
+ return !is_undefined(_parseColumnValueId(s))
32
+ }
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+ valueOf := func(x) {
42
+ key := _parseColumnValueId(x)
43
+ if is_undefined(key) {
44
+ return x
45
+ }
46
+
47
+ value := key.value
48
+ ll.assert(is_string(value), "column-value: value of a column value id must be a string, got %v", value)
49
+ return value
50
+ }
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+ valuesOf := func(xs) {
59
+ ll.assert(is_array(xs) || is_immutable_array(xs), "column-value.valuesOf: expected an array, got %v", xs)
60
+
61
+ result := []
62
+ for x in xs {
63
+ result = append(result, valueOf(x))
64
+ }
65
+ return result
66
+ }
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+ _parseColumnValueId = func(s) {
84
+ if !is_string(s) {
85
+ return undefined
86
+ }
87
+
88
+ current := s
89
+ for {
90
+ if !text.has_prefix(current, "{") && !text.has_prefix(current, "\"") {
91
+ return undefined
92
+ }
93
+
94
+ decoded := json.decode(current)
95
+ if is_error(decoded) {
96
+ return undefined
97
+ }
98
+
99
+ if is_string(decoded) {
100
+ if len(decoded) >= len(current) {
101
+ return undefined
102
+ }
103
+ current = decoded
104
+ continue
105
+ }
106
+
107
+ if !is_map(decoded) || decoded.__isColumnValue != true {
108
+ return undefined
109
+ }
110
+ return decoded
111
+ }
112
+ }
113
+
114
+ export ll.toStrict({
115
+ isColumnValueId: isColumnValueId,
116
+ valueOf: valueOf,
117
+ valuesOf: valuesOf
118
+ })
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": "6.19.0",
3
+ "version": "6.20.0",
4
4
  "description": "Tengo SDK library",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",
@@ -23,7 +23,7 @@
23
23
  "@platforma-open/milaboratories.software-ptexter": "1.2.6"
24
24
  },
25
25
  "devDependencies": {
26
- "@platforma-sdk/tengo-builder": "4.1.15"
26
+ "@platforma-sdk/tengo-builder": "4.1.16"
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",