@bilig/workbook 0.94.0 → 0.103.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.
- package/README.md +167 -438
- package/dist/command.d.ts +3 -0
- package/dist/command.js +4 -0
- package/dist/command.js.map +1 -0
- package/dist/features-public.d.ts +2 -0
- package/dist/features-public.js +3 -0
- package/dist/features-public.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/model-plan-result.d.ts +1 -0
- package/dist/model-plan-result.js +17 -0
- package/dist/model-plan-result.js.map +1 -1
- package/dist/model.d.ts +1 -0
- package/dist/model.js +21 -14
- package/dist/model.js.map +1 -1
- package/dist/prepare.d.ts +22 -0
- package/dist/prepare.js +41 -0
- package/dist/prepare.js.map +1 -0
- package/dist/readback.d.ts +16 -0
- package/dist/readback.js +57 -4
- package/dist/readback.js.map +1 -1
- package/dist/requirements.d.ts +4 -3
- package/dist/requirements.js +50 -7
- package/dist/requirements.js.map +1 -1
- package/dist/result.d.ts +2 -2
- package/dist/result.js +1 -0
- package/dist/result.js.map +1 -1
- package/dist/run-apply.d.ts +17 -0
- package/dist/run-apply.js +274 -0
- package/dist/run-apply.js.map +1 -0
- package/dist/run-check-verification.d.ts +8 -0
- package/dist/run-check-verification.js +174 -0
- package/dist/run-check-verification.js.map +1 -0
- package/dist/run-data.d.ts +6 -0
- package/dist/run-data.js +120 -0
- package/dist/run-data.js.map +1 -0
- package/dist/run-description.js +12 -9
- package/dist/run-description.js.map +1 -1
- package/dist/run-runtime-boundary.js +35 -12
- package/dist/run-runtime-boundary.js.map +1 -1
- package/dist/run.d.ts +2 -2
- package/dist/run.js +4 -560
- package/dist/run.js.map +1 -1
- package/dist/runtime.d.ts +7 -0
- package/dist/runtime.js +8 -0
- package/dist/runtime.js.map +1 -0
- package/dist/schema.d.ts +22 -0
- package/dist/schema.js +581 -0
- package/dist/schema.js.map +1 -0
- package/dist/testing.d.ts +34 -0
- package/dist/testing.js +85 -0
- package/dist/testing.js.map +1 -0
- package/fixtures/command-bundle.json +28 -0
- package/fixtures/command-result.json +58 -0
- package/fixtures/invalid-plan.json +9 -0
- package/fixtures/readback-proof.json +64 -0
- package/fixtures/runtime-requirements.json +72 -0
- package/fixtures/strict-run-failure.json +11 -0
- package/fixtures/strict-run-success.json +118 -0
- package/fixtures/valid-plan.json +145 -0
- package/package.json +60 -4
package/dist/testing.js
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { describeRunResult } from './describe.js';
|
|
2
|
+
import { checkRuntimeAdapter } from './requirements.js';
|
|
3
|
+
import { runWorkbookPlan } from './run.js';
|
|
4
|
+
import { checkWorkbookRunResultDescription } from './run-description.js';
|
|
5
|
+
function adapterCheckIssue(code, path, message) {
|
|
6
|
+
return Object.freeze({
|
|
7
|
+
code,
|
|
8
|
+
path,
|
|
9
|
+
message,
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
function failedAdapterCheck(args) {
|
|
13
|
+
return Object.freeze({
|
|
14
|
+
status: 'failed',
|
|
15
|
+
...(args.result !== undefined ? { result: args.result } : {}),
|
|
16
|
+
...(args.description !== undefined ? { description: args.description } : {}),
|
|
17
|
+
errors: Object.freeze([...(args.errors ?? [])]),
|
|
18
|
+
issues: Object.freeze([...args.issues]),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
function runErrorIssue(error) {
|
|
22
|
+
return adapterCheckIssue(error.code, error.path ?? 'result', error.message);
|
|
23
|
+
}
|
|
24
|
+
function runtimeAdapterIssue(issue) {
|
|
25
|
+
if (issue.code === 'invalid_requirements') {
|
|
26
|
+
return adapterCheckIssue('invalid_plan_data', issue.path ?? 'plan', issue.message);
|
|
27
|
+
}
|
|
28
|
+
return adapterCheckIssue('adapter_missing_capability', issue.method === undefined ? 'adapter' : `adapter.${issue.method}`, issue.message);
|
|
29
|
+
}
|
|
30
|
+
function strictOptions(options) {
|
|
31
|
+
return Object.freeze({
|
|
32
|
+
...options,
|
|
33
|
+
strict: true,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
export async function checkWorkbookRunAdapter(plan, adapter, options = {}) {
|
|
37
|
+
const adapterCheck = checkRuntimeAdapter(plan, adapter);
|
|
38
|
+
if (adapterCheck.status === 'invalid') {
|
|
39
|
+
return failedAdapterCheck({
|
|
40
|
+
issues: adapterCheck.issues.map(runtimeAdapterIssue),
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
const result = await runWorkbookPlan(plan, adapter, strictOptions(options));
|
|
44
|
+
const description = describeRunResult(result);
|
|
45
|
+
const descriptionCheck = checkWorkbookRunResultDescription(description);
|
|
46
|
+
if (descriptionCheck.status === 'invalid') {
|
|
47
|
+
return failedAdapterCheck({
|
|
48
|
+
result,
|
|
49
|
+
description,
|
|
50
|
+
issues: descriptionCheck.issues.map((issue) => adapterCheckIssue('invalid_run_result_description', issue.path, issue.message)),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
if (result.status === 'failed') {
|
|
54
|
+
return failedAdapterCheck({
|
|
55
|
+
result,
|
|
56
|
+
description,
|
|
57
|
+
errors: result.errors,
|
|
58
|
+
issues: result.errors.map(runErrorIssue),
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (description.status !== 'done') {
|
|
62
|
+
return failedAdapterCheck({
|
|
63
|
+
result,
|
|
64
|
+
description,
|
|
65
|
+
issues: [
|
|
66
|
+
adapterCheckIssue('invalid_run_result_description', 'status', 'Workbook run adapter returned a done result with a non-done description'),
|
|
67
|
+
],
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return Object.freeze({
|
|
71
|
+
status: 'passed',
|
|
72
|
+
result,
|
|
73
|
+
description,
|
|
74
|
+
issues: Object.freeze([]),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
export async function assertWorkbookRunAdapter(plan, adapter, options = {}) {
|
|
78
|
+
const check = await checkWorkbookRunAdapter(plan, adapter, options);
|
|
79
|
+
if (check.status === 'passed') {
|
|
80
|
+
return check.description;
|
|
81
|
+
}
|
|
82
|
+
const [firstIssue] = check.issues;
|
|
83
|
+
throw new Error(firstIssue?.message ?? 'Workbook run adapter check failed');
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.js","sourceRoot":"","sources":["../src/testing.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAIjD,OAAO,EAAE,mBAAmB,EAAoC,MAAM,mBAAmB,CAAA;AACzF,OAAO,EAAE,eAAe,EAAoD,MAAM,UAAU,CAAA;AAC5F,OAAO,EAAE,iCAAiC,EAAE,MAAM,sBAAsB,CAAA;AA6BxE,SAAS,iBAAiB,CAAC,IAAsC,EAAE,IAAY,EAAE,OAAe;IAC9F,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,IAAI;QACJ,IAAI;QACJ,OAAO;KACR,CAAC,CAAA;AACJ,CAAC;AAED,SAAS,kBAAkB,CAAC,IAK3B;IACC,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,MAAM,EAAE,QAAQ;QAChB,GAAG,CAAC,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7D,GAAG,CAAC,IAAI,CAAC,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC5E,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC;QAC/C,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC;KACxC,CAAC,C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;IAC1B,CAAC;IACD,MAAM,CAAC,UAAU,CAAC,GAAG,KAAK,CAAC,MAAM,CAAA;IACjC,MAAM,IAAI,KAAK,CAAC,UAAU,EAAE,OAAO,IAAI,mCAAmC,CAAC,CAAA;AAC7E,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "agent-bundle-1",
|
|
3
|
+
"targetRevision": 12,
|
|
4
|
+
"idempotencyKey": "agent-bundle-1-on-12",
|
|
5
|
+
"scope": {
|
|
6
|
+
"maxTouchedCells": 1
|
|
7
|
+
},
|
|
8
|
+
"commands": [
|
|
9
|
+
{
|
|
10
|
+
"id": "write-result",
|
|
11
|
+
"kind": "op",
|
|
12
|
+
"destructive": true,
|
|
13
|
+
"touchedRanges": [
|
|
14
|
+
{
|
|
15
|
+
"sheetName": "Resolved",
|
|
16
|
+
"startAddress": "C1",
|
|
17
|
+
"endAddress": "C1"
|
|
18
|
+
}
|
|
19
|
+
],
|
|
20
|
+
"op": {
|
|
21
|
+
"kind": "setCellFormula",
|
|
22
|
+
"sheetName": "Resolved",
|
|
23
|
+
"address": "C1",
|
|
24
|
+
"formula": "input*factor"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
]
|
|
28
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "applied",
|
|
3
|
+
"bundleId": "agent-bundle-1",
|
|
4
|
+
"targetRevision": 12,
|
|
5
|
+
"idempotencyKey": "agent-bundle-1-on-12",
|
|
6
|
+
"commandCount": 1,
|
|
7
|
+
"touchedRanges": [
|
|
8
|
+
{
|
|
9
|
+
"sheetName": "Resolved",
|
|
10
|
+
"startAddress": "C1",
|
|
11
|
+
"endAddress": "C1"
|
|
12
|
+
}
|
|
13
|
+
],
|
|
14
|
+
"touchedCellCount": 1,
|
|
15
|
+
"receipts": [
|
|
16
|
+
{
|
|
17
|
+
"status": "applied",
|
|
18
|
+
"featureId": "workbook-op",
|
|
19
|
+
"commandId": "write-result",
|
|
20
|
+
"category": "operation",
|
|
21
|
+
"previewOps": [
|
|
22
|
+
{
|
|
23
|
+
"kind": "setCellFormula",
|
|
24
|
+
"sheetName": "Resolved",
|
|
25
|
+
"address": "C1",
|
|
26
|
+
"formula": "input*factor"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"appliedOps": [
|
|
30
|
+
{
|
|
31
|
+
"kind": "setCellFormula",
|
|
32
|
+
"sheetName": "Resolved",
|
|
33
|
+
"address": "C1",
|
|
34
|
+
"formula": "input*factor"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"changedRanges": [
|
|
38
|
+
{
|
|
39
|
+
"sheetName": "Resolved",
|
|
40
|
+
"startAddress": "C1",
|
|
41
|
+
"endAddress": "C1"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"proof": {
|
|
45
|
+
"source": "fixture"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"matched": true,
|
|
50
|
+
"changedRanges": [
|
|
51
|
+
{
|
|
52
|
+
"sheetName": "Resolved",
|
|
53
|
+
"startAddress": "C1",
|
|
54
|
+
"endAddress": "C1"
|
|
55
|
+
}
|
|
56
|
+
],
|
|
57
|
+
"revision": 13
|
|
58
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"checks": [
|
|
3
|
+
{
|
|
4
|
+
"status": "planned",
|
|
5
|
+
"kind": "formulaEquals",
|
|
6
|
+
"target": {
|
|
7
|
+
"kind": "name",
|
|
8
|
+
"id": "name_result",
|
|
9
|
+
"label": "result",
|
|
10
|
+
"name": "result"
|
|
11
|
+
},
|
|
12
|
+
"message": "result formula equals input*factor",
|
|
13
|
+
"expectation": {
|
|
14
|
+
"kind": "formulaEquals",
|
|
15
|
+
"formula": "input*factor",
|
|
16
|
+
"inputs": [
|
|
17
|
+
{
|
|
18
|
+
"kind": "name",
|
|
19
|
+
"id": "name_input",
|
|
20
|
+
"label": "input",
|
|
21
|
+
"name": "input"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"kind": "name",
|
|
25
|
+
"id": "name_factor",
|
|
26
|
+
"label": "factor",
|
|
27
|
+
"name": "factor"
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"labels": [
|
|
31
|
+
{
|
|
32
|
+
"name": "input",
|
|
33
|
+
"ref": {
|
|
34
|
+
"kind": "name",
|
|
35
|
+
"id": "name_input",
|
|
36
|
+
"label": "input",
|
|
37
|
+
"name": "input"
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"name": "factor",
|
|
42
|
+
"ref": {
|
|
43
|
+
"kind": "name",
|
|
44
|
+
"id": "name_factor",
|
|
45
|
+
"label": "factor",
|
|
46
|
+
"name": "factor"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
]
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
],
|
|
53
|
+
"readbacks": [
|
|
54
|
+
{
|
|
55
|
+
"target": {
|
|
56
|
+
"kind": "name",
|
|
57
|
+
"id": "name_result",
|
|
58
|
+
"label": "result",
|
|
59
|
+
"name": "result"
|
|
60
|
+
},
|
|
61
|
+
"formula": "input*factor"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "named-range-formula",
|
|
3
|
+
"actionName": "calculate",
|
|
4
|
+
"requirements": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "apply",
|
|
7
|
+
"capability": "writeFormula",
|
|
8
|
+
"commandIndex": 0,
|
|
9
|
+
"target": {
|
|
10
|
+
"kind": "name",
|
|
11
|
+
"id": "name_result",
|
|
12
|
+
"label": "result",
|
|
13
|
+
"name": "result"
|
|
14
|
+
},
|
|
15
|
+
"refs": [
|
|
16
|
+
{
|
|
17
|
+
"kind": "name",
|
|
18
|
+
"id": "name_input",
|
|
19
|
+
"label": "input",
|
|
20
|
+
"name": "input"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"kind": "name",
|
|
24
|
+
"id": "name_factor",
|
|
25
|
+
"label": "factor",
|
|
26
|
+
"name": "factor"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"message": "Apply formula write to result"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"kind": "read",
|
|
33
|
+
"capability": "read",
|
|
34
|
+
"checkIndex": 1,
|
|
35
|
+
"checkKind": "formulaEquals",
|
|
36
|
+
"target": {
|
|
37
|
+
"kind": "name",
|
|
38
|
+
"id": "name_result",
|
|
39
|
+
"label": "result",
|
|
40
|
+
"name": "result"
|
|
41
|
+
},
|
|
42
|
+
"refs": [
|
|
43
|
+
{
|
|
44
|
+
"kind": "name",
|
|
45
|
+
"id": "name_input",
|
|
46
|
+
"label": "input",
|
|
47
|
+
"name": "input"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"kind": "name",
|
|
51
|
+
"id": "name_factor",
|
|
52
|
+
"label": "factor",
|
|
53
|
+
"name": "factor"
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"message": "Read result for formulaEquals"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"kind": "verify",
|
|
60
|
+
"capability": "verifyCheck",
|
|
61
|
+
"checkIndex": 0,
|
|
62
|
+
"checkKind": "exists",
|
|
63
|
+
"target": {
|
|
64
|
+
"kind": "name",
|
|
65
|
+
"id": "name_result",
|
|
66
|
+
"label": "result",
|
|
67
|
+
"name": "result"
|
|
68
|
+
},
|
|
69
|
+
"message": "Verify exists for result"
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
{
|
|
2
|
+
"status": "done",
|
|
3
|
+
"apply": {
|
|
4
|
+
"matched": true,
|
|
5
|
+
"planId": "bilig-plan-v1:1d10ebcfda99753e809362618290ef8d",
|
|
6
|
+
"baseRevision": 0,
|
|
7
|
+
"revision": 1,
|
|
8
|
+
"previewOps": [
|
|
9
|
+
{
|
|
10
|
+
"kind": "setCellFormula",
|
|
11
|
+
"sheetName": "Resolved",
|
|
12
|
+
"address": "C1",
|
|
13
|
+
"formula": "input*factor"
|
|
14
|
+
}
|
|
15
|
+
],
|
|
16
|
+
"appliedOps": [
|
|
17
|
+
{
|
|
18
|
+
"kind": "setCellFormula",
|
|
19
|
+
"sheetName": "Resolved",
|
|
20
|
+
"address": "C1",
|
|
21
|
+
"formula": "input*factor"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"commandReceipts": [
|
|
25
|
+
{
|
|
26
|
+
"commandIndex": 0,
|
|
27
|
+
"commandKind": "writeFormula",
|
|
28
|
+
"commandDigest": "bilig-command-v1:65870d1526258bc9da2e9e6489ddc3ba",
|
|
29
|
+
"previewOps": [
|
|
30
|
+
{
|
|
31
|
+
"kind": "setCellFormula",
|
|
32
|
+
"sheetName": "Resolved",
|
|
33
|
+
"address": "C1",
|
|
34
|
+
"formula": "input*factor"
|
|
35
|
+
}
|
|
36
|
+
],
|
|
37
|
+
"appliedOps": [
|
|
38
|
+
{
|
|
39
|
+
"kind": "setCellFormula",
|
|
40
|
+
"sheetName": "Resolved",
|
|
41
|
+
"address": "C1",
|
|
42
|
+
"formula": "input*factor"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"resolvedRefs": {
|
|
46
|
+
"target": {
|
|
47
|
+
"kind": "name",
|
|
48
|
+
"id": "name_result",
|
|
49
|
+
"label": "result",
|
|
50
|
+
"name": "result"
|
|
51
|
+
},
|
|
52
|
+
"inputs": [
|
|
53
|
+
{
|
|
54
|
+
"kind": "name",
|
|
55
|
+
"id": "name_input",
|
|
56
|
+
"label": "input",
|
|
57
|
+
"name": "input"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"kind": "name",
|
|
61
|
+
"id": "name_factor",
|
|
62
|
+
"label": "factor",
|
|
63
|
+
"name": "factor"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
"proof": {
|
|
70
|
+
"source": "fixture"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"changed": [
|
|
74
|
+
{
|
|
75
|
+
"kind": "writeFormula",
|
|
76
|
+
"target": {
|
|
77
|
+
"kind": "name",
|
|
78
|
+
"id": "name_result",
|
|
79
|
+
"label": "result",
|
|
80
|
+
"name": "result"
|
|
81
|
+
},
|
|
82
|
+
"message": "Write formula to result"
|
|
83
|
+
}
|
|
84
|
+
],
|
|
85
|
+
"checks": [
|
|
86
|
+
{
|
|
87
|
+
"status": "passed",
|
|
88
|
+
"kind": "exists",
|
|
89
|
+
"target": {
|
|
90
|
+
"kind": "name",
|
|
91
|
+
"id": "name_result",
|
|
92
|
+
"label": "result",
|
|
93
|
+
"name": "result"
|
|
94
|
+
},
|
|
95
|
+
"message": "result exists",
|
|
96
|
+
"proof": {
|
|
97
|
+
"source": "fixture"
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"status": "passed",
|
|
102
|
+
"kind": "formulaEquals",
|
|
103
|
+
"target": {
|
|
104
|
+
"kind": "name",
|
|
105
|
+
"id": "name_result",
|
|
106
|
+
"label": "result",
|
|
107
|
+
"name": "result"
|
|
108
|
+
},
|
|
109
|
+
"message": "result formula equals input*factor",
|
|
110
|
+
"proof": {
|
|
111
|
+
"source": "readback",
|
|
112
|
+
"formula": "input*factor",
|
|
113
|
+
"expectedFormula": "input*factor",
|
|
114
|
+
"materializedFormula": "input*factor"
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
]
|
|
118
|
+
}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
{
|
|
2
|
+
"modelName": "named-range-formula",
|
|
3
|
+
"actionName": "calculate",
|
|
4
|
+
"refsUsed": [
|
|
5
|
+
{
|
|
6
|
+
"kind": "name",
|
|
7
|
+
"id": "name_input",
|
|
8
|
+
"label": "input",
|
|
9
|
+
"name": "input"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"kind": "name",
|
|
13
|
+
"id": "name_factor",
|
|
14
|
+
"label": "factor",
|
|
15
|
+
"name": "factor"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"kind": "name",
|
|
19
|
+
"id": "name_result",
|
|
20
|
+
"label": "result",
|
|
21
|
+
"name": "result"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"commands": [
|
|
25
|
+
{
|
|
26
|
+
"kind": "writeFormula",
|
|
27
|
+
"target": {
|
|
28
|
+
"kind": "name",
|
|
29
|
+
"id": "name_result",
|
|
30
|
+
"label": "result",
|
|
31
|
+
"name": "result"
|
|
32
|
+
},
|
|
33
|
+
"formula": "(input)*(factor)",
|
|
34
|
+
"inputs": [
|
|
35
|
+
{
|
|
36
|
+
"kind": "name",
|
|
37
|
+
"id": "name_input",
|
|
38
|
+
"label": "input",
|
|
39
|
+
"name": "input"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"kind": "name",
|
|
43
|
+
"id": "name_factor",
|
|
44
|
+
"label": "factor",
|
|
45
|
+
"name": "factor"
|
|
46
|
+
}
|
|
47
|
+
],
|
|
48
|
+
"labels": [
|
|
49
|
+
{
|
|
50
|
+
"name": "input",
|
|
51
|
+
"ref": {
|
|
52
|
+
"kind": "name",
|
|
53
|
+
"id": "name_input",
|
|
54
|
+
"label": "input",
|
|
55
|
+
"name": "input"
|
|
56
|
+
}
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"name": "factor",
|
|
60
|
+
"ref": {
|
|
61
|
+
"kind": "name",
|
|
62
|
+
"id": "name_factor",
|
|
63
|
+
"label": "factor",
|
|
64
|
+
"name": "factor"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
"ops": [],
|
|
71
|
+
"changed": [
|
|
72
|
+
{
|
|
73
|
+
"kind": "writeFormula",
|
|
74
|
+
"target": {
|
|
75
|
+
"kind": "name",
|
|
76
|
+
"id": "name_result",
|
|
77
|
+
"label": "result",
|
|
78
|
+
"name": "result"
|
|
79
|
+
},
|
|
80
|
+
"message": "Write formula to result"
|
|
81
|
+
}
|
|
82
|
+
],
|
|
83
|
+
"checks": [
|
|
84
|
+
{
|
|
85
|
+
"status": "planned",
|
|
86
|
+
"kind": "exists",
|
|
87
|
+
"target": {
|
|
88
|
+
"kind": "name",
|
|
89
|
+
"id": "name_result",
|
|
90
|
+
"label": "result",
|
|
91
|
+
"name": "result"
|
|
92
|
+
},
|
|
93
|
+
"message": "result exists"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"status": "planned",
|
|
97
|
+
"kind": "formulaEquals",
|
|
98
|
+
"target": {
|
|
99
|
+
"kind": "name",
|
|
100
|
+
"id": "name_result",
|
|
101
|
+
"label": "result",
|
|
102
|
+
"name": "result"
|
|
103
|
+
},
|
|
104
|
+
"message": "result formula equals (input)*(factor)",
|
|
105
|
+
"expectation": {
|
|
106
|
+
"kind": "formulaEquals",
|
|
107
|
+
"formula": "(input)*(factor)",
|
|
108
|
+
"inputs": [
|
|
109
|
+
{
|
|
110
|
+
"kind": "name",
|
|
111
|
+
"id": "name_input",
|
|
112
|
+
"label": "input",
|
|
113
|
+
"name": "input"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"kind": "name",
|
|
117
|
+
"id": "name_factor",
|
|
118
|
+
"label": "factor",
|
|
119
|
+
"name": "factor"
|
|
120
|
+
}
|
|
121
|
+
],
|
|
122
|
+
"labels": [
|
|
123
|
+
{
|
|
124
|
+
"name": "input",
|
|
125
|
+
"ref": {
|
|
126
|
+
"kind": "name",
|
|
127
|
+
"id": "name_input",
|
|
128
|
+
"label": "input",
|
|
129
|
+
"name": "input"
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
"name": "factor",
|
|
134
|
+
"ref": {
|
|
135
|
+
"kind": "name",
|
|
136
|
+
"id": "name_factor",
|
|
137
|
+
"label": "factor",
|
|
138
|
+
"name": "factor"
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
}
|