@milaboratories/pl-middle-layer 1.15.0 → 1.15.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.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +219 -216
- package/dist/index.mjs.map +1 -1
- package/dist/js_render/index.d.ts.map +1 -1
- package/dist/middle_layer/block.d.ts +1 -1
- package/dist/middle_layer/block.d.ts.map +1 -1
- package/package.json +8 -8
- package/src/js_render/index.ts +16 -7
- package/src/middle_layer/block.ts +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js_render/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,sBAAsB,EAC3B,GAAG,EAAE,eAAe,EACpB,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAE,IAAI,EACV,GAAG,GAAE,OAAO,CAAC,sBAAsB,CAAM,GACxC,UAAU,CAAC,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js_render/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGhF,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAG5D,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,sBAAsB,EAC3B,GAAG,EAAE,eAAe,EACpB,EAAE,EAAE,kBAAkB,EACtB,IAAI,EAAE,IAAI,EACV,GAAG,GAAE,OAAO,CAAC,sBAAsB,CAAM,GACxC,UAAU,CAAC,OAAO,CAAC,CA2CrB"}
|
|
@@ -5,5 +5,5 @@ import { BlockStateInternal } from '@milaboratories/pl-model-middle-layer';
|
|
|
5
5
|
export type BlockArgsAndUiState = Omit<BlockStateInternal, 'outputs' | 'navigationState'>;
|
|
6
6
|
export declare function blockArgsAndUiState(projectEntry: PlTreeEntry, id: string): Computable<BlockArgsAndUiState>;
|
|
7
7
|
export declare function blockArgsAndUiState(projectEntry: PlTreeEntry, id: string, cCtx: ComputableCtx): BlockArgsAndUiState;
|
|
8
|
-
export declare function blockOutputs(projectEntry: PlTreeEntry,
|
|
8
|
+
export declare function blockOutputs(projectEntry: PlTreeEntry, blockId: string, env: MiddleLayerEnvironment): ComputableStableDefined<Record<string, ComputableValueOrErrors<unknown>>>;
|
|
9
9
|
//# sourceMappingURL=block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/middle_layer/block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAgB,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAIzF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,iBAAiB,CAAC,CAAC;AAE1F,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,WAAW,EACzB,EAAE,EAAE,MAAM,GACT,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,WAAW,EACzB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,aAAa,GAClB,mBAAmB,CAAC;AAoBvB,wBAAgB,YAAY,CAC1B,YAAY,EAAE,WAAW,EACzB,
|
|
1
|
+
{"version":3,"file":"block.d.ts","sourceRoot":"","sources":["../../src/middle_layer/block.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EACL,UAAU,EACV,aAAa,EACb,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,4BAA4B,CAAC;AAIpC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AAExD,OAAO,EAAgB,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAIzF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,iBAAiB,CAAC,CAAC;AAE1F,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,WAAW,EACzB,EAAE,EAAE,MAAM,GACT,UAAU,CAAC,mBAAmB,CAAC,CAAC;AACnC,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,WAAW,EACzB,EAAE,EAAE,MAAM,EACV,IAAI,EAAE,aAAa,GAClB,mBAAmB,CAAC;AAoBvB,wBAAgB,YAAY,CAC1B,YAAY,EAAE,WAAW,EACzB,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,sBAAsB,GAC1B,uBAAuB,CAAC,MAAM,CAAC,MAAM,EAAE,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,CAmB3E"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-middle-layer",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.2",
|
|
4
4
|
"description": "Pl Middle Layer",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,19 +28,19 @@
|
|
|
28
28
|
"utility-types": "^3.11.0",
|
|
29
29
|
"yaml": "^2.6.0",
|
|
30
30
|
"zod": "^3.23.8",
|
|
31
|
-
"@milaboratories/computable": "^2.3.
|
|
32
|
-
"@milaboratories/resolve-helper": "^1.0.1",
|
|
31
|
+
"@milaboratories/computable": "^2.3.1",
|
|
33
32
|
"@platforma-sdk/block-tools": "^2.3.25",
|
|
34
|
-
"@milaboratories/pl-drivers": "^1.3.17",
|
|
35
|
-
"@milaboratories/pl-model-common": "^1.6.2",
|
|
36
33
|
"@milaboratories/pl-client": "^2.5.10",
|
|
34
|
+
"@milaboratories/pl-model-common": "^1.6.2",
|
|
37
35
|
"@milaboratories/pl-model-middle-layer": "^1.5.9",
|
|
36
|
+
"@milaboratories/pl-drivers": "^1.3.18",
|
|
37
|
+
"@milaboratories/resolve-helper": "^1.0.1",
|
|
38
|
+
"@milaboratories/pl-tree": "^1.4.13",
|
|
38
39
|
"@milaboratories/ts-helpers": "^1.1.1",
|
|
39
|
-
"@milaboratories/pl-tree": "^1.4.12",
|
|
40
40
|
"@platforma-sdk/model": "^1.9.0",
|
|
41
|
-
"@platforma-sdk/workflow-tengo": "2.2.0",
|
|
42
41
|
"@milaboratories/pl-config": "^1.3.1",
|
|
43
|
-
"@milaboratories/pl-local": "^1.6.
|
|
42
|
+
"@milaboratories/pl-local": "^1.6.1",
|
|
43
|
+
"@platforma-sdk/workflow-tengo": "2.2.0"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"typescript": "~5.5.4",
|
package/src/js_render/index.ts
CHANGED
|
@@ -13,7 +13,8 @@ export function computableFromRF(
|
|
|
13
13
|
code: Code,
|
|
14
14
|
ops: Partial<ComputableRenderingOps> = {}
|
|
15
15
|
): Computable<unknown> {
|
|
16
|
-
|
|
16
|
+
const key = `lambda#${fh.handle}`;
|
|
17
|
+
ops = { ...ops, key };
|
|
17
18
|
if (ops.mode === undefined && fh.retentive === true) ops.mode = 'StableOnlyRetentive';
|
|
18
19
|
return Computable.makeRaw((cCtx) => {
|
|
19
20
|
const scope = new Scope();
|
|
@@ -33,16 +34,24 @@ export function computableFromRF(
|
|
|
33
34
|
return {
|
|
34
35
|
ir: rCtx.computablesToResolve,
|
|
35
36
|
postprocessValue: async (resolved: Record<string, unknown>, { unstableMarker, stable }) => {
|
|
36
|
-
if (LogOutputStatus && (LogOutputStatus !== 'unstable-only' || !stable)) {
|
|
37
|
-
if (stable) console.log(`Stable output ${fh.handle} calculated.`);
|
|
38
|
-
else console.log(`Unstable output ${fh.handle}; marker = ${unstableMarker}`);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
37
|
// resolving futures
|
|
42
38
|
for (const [handle, value] of Object.entries(resolved)) rCtx.runCallback(handle, value);
|
|
43
39
|
|
|
44
40
|
// rendering result
|
|
45
|
-
|
|
41
|
+
const renderedResult = rCtx.importObjectUniversal(result);
|
|
42
|
+
|
|
43
|
+
if (LogOutputStatus && (LogOutputStatus !== 'unstable-only' || !stable)) {
|
|
44
|
+
if (stable)
|
|
45
|
+
console.log(
|
|
46
|
+
`Stable output ${fh.handle} calculated ${renderedResult !== undefined ? 'defined' : 'undefined'}`
|
|
47
|
+
);
|
|
48
|
+
else
|
|
49
|
+
console.log(
|
|
50
|
+
`Unstable output ${fh.handle}; marker = ${unstableMarker}; ${renderedResult !== undefined ? 'defined' : 'undefined'}`
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return renderedResult;
|
|
46
55
|
}
|
|
47
56
|
};
|
|
48
57
|
}, ops);
|
|
@@ -46,15 +46,15 @@ export function blockArgsAndUiState(
|
|
|
46
46
|
|
|
47
47
|
export function blockOutputs(
|
|
48
48
|
projectEntry: PlTreeEntry,
|
|
49
|
-
|
|
49
|
+
blockId: string,
|
|
50
50
|
env: MiddleLayerEnvironment
|
|
51
51
|
): ComputableStableDefined<Record<string, ComputableValueOrErrors<unknown>>> {
|
|
52
52
|
return Computable.make(
|
|
53
53
|
(c) => {
|
|
54
54
|
const prj = c.accessor(projectEntry).node();
|
|
55
|
-
const ctx = constructBlockContext(prj,
|
|
55
|
+
const ctx = constructBlockContext(prj, blockId);
|
|
56
56
|
|
|
57
|
-
const blockCfg = getBlockCfg(prj,
|
|
57
|
+
const blockCfg = getBlockCfg(prj, blockId);
|
|
58
58
|
|
|
59
59
|
return ifNotUndef(blockCfg, (cfg) => {
|
|
60
60
|
const outputs: Record<string, Computable<any>> = {};
|
|
@@ -65,6 +65,6 @@ export function blockOutputs(
|
|
|
65
65
|
return outputs;
|
|
66
66
|
});
|
|
67
67
|
},
|
|
68
|
-
{ key: 'outputs#' + resourceIdToString(projectEntry.rid) +
|
|
68
|
+
{ key: 'outputs#' + resourceIdToString(projectEntry.rid) + "#" + blockId }
|
|
69
69
|
).withStableType();
|
|
70
70
|
}
|