@testsmith/testblocks 0.9.4 → 0.9.7
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/cli/index.js +4 -1
- package/dist/client/assets/index-B8OSvcUg.css +1 -0
- package/dist/client/assets/index-CMMJHs_d.js +2197 -0
- package/dist/client/assets/index-CMMJHs_d.js.map +1 -0
- package/dist/client/index.html +2 -2
- package/dist/core/blocks/api/ApiAssertBodyContainsBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiAssertBodyContainsBlock.js +40 -0
- package/dist/core/blocks/api/ApiAssertStatusBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiAssertStatusBlock.js +35 -0
- package/dist/core/blocks/api/ApiClearHeadersBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiClearHeadersBlock.js +25 -0
- package/dist/core/blocks/api/ApiDeleteBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiDeleteBlock.js +37 -0
- package/dist/core/blocks/api/ApiExtractBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiExtractBlock.js +40 -0
- package/dist/core/blocks/api/ApiExtractJsonPathBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiExtractJsonPathBlock.js +47 -0
- package/dist/core/blocks/api/ApiExtractXPathBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiExtractXPathBlock.js +70 -0
- package/dist/core/blocks/api/ApiGetBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiGetBlock.js +36 -0
- package/dist/core/blocks/api/ApiHeadersBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiHeadersBlock.js +44 -0
- package/dist/core/blocks/api/ApiJsonBodyBlock.d.ts +14 -0
- package/dist/core/blocks/api/ApiJsonBodyBlock.js +28 -0
- package/dist/core/blocks/api/ApiPatchBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPatchBlock.js +47 -0
- package/dist/core/blocks/api/ApiPostBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPostBlock.js +47 -0
- package/dist/core/blocks/api/ApiPutBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiPutBlock.js +47 -0
- package/dist/core/blocks/api/ApiSetHeaderBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiSetHeaderBlock.js +37 -0
- package/dist/core/blocks/api/ApiSetHeadersBlock.d.ts +13 -0
- package/dist/core/blocks/api/ApiSetHeadersBlock.js +41 -0
- package/dist/core/blocks/api/index.d.ts +25 -0
- package/dist/core/blocks/api/index.js +83 -0
- package/dist/core/blocks/base/Block.d.ts +59 -0
- package/dist/core/blocks/base/Block.js +151 -0
- package/dist/core/blocks/base/ContainerBlock.d.ts +14 -0
- package/dist/core/blocks/base/ContainerBlock.js +16 -0
- package/dist/core/blocks/base/ControlFlowBlock.d.ts +13 -0
- package/dist/core/blocks/base/ControlFlowBlock.js +17 -0
- package/dist/core/blocks/base/StatementBlock.d.ts +9 -0
- package/dist/core/blocks/base/StatementBlock.js +16 -0
- package/dist/core/blocks/base/ValueBlock.d.ts +12 -0
- package/dist/core/blocks/base/ValueBlock.js +16 -0
- package/dist/core/blocks/base/index.d.ts +5 -0
- package/dist/core/blocks/base/index.js +13 -0
- package/dist/core/blocks/data/DataCsvBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataCsvBlock.js +51 -0
- package/dist/core/blocks/data/DataDefineBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataDefineBlock.js +28 -0
- package/dist/core/blocks/data/DataForeachBlock.d.ts +13 -0
- package/dist/core/blocks/data/DataForeachBlock.js +37 -0
- package/dist/core/blocks/data/DataFromVariableBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataFromVariableBlock.js +27 -0
- package/dist/core/blocks/data/DataGetCurrentBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetCurrentBlock.js +34 -0
- package/dist/core/blocks/data/DataGetIndexBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetIndexBlock.js +24 -0
- package/dist/core/blocks/data/DataGetNameBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataGetNameBlock.js +24 -0
- package/dist/core/blocks/data/DataRangeBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataRangeBlock.js +40 -0
- package/dist/core/blocks/data/DataRowBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataRowBlock.js +33 -0
- package/dist/core/blocks/data/DataTableBlock.d.ts +14 -0
- package/dist/core/blocks/data/DataTableBlock.js +51 -0
- package/dist/core/blocks/data/index.d.ts +20 -0
- package/dist/core/blocks/data/index.js +57 -0
- package/dist/core/blocks/index.d.ts +66 -5
- package/dist/core/blocks/index.js +134 -35
- package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterAllBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleAfterEachBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeAllBlock.js +28 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.d.ts +15 -0
- package/dist/core/blocks/lifecycle/LifecycleBeforeEachBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleOnFailureBlock.js +25 -0
- package/dist/core/blocks/lifecycle/LifecycleRetryBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleRetryBlock.js +29 -0
- package/dist/core/blocks/lifecycle/LifecycleSetupBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleSetupBlock.js +27 -0
- package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleSkipIfBlock.js +31 -0
- package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.d.ts +13 -0
- package/dist/core/blocks/lifecycle/LifecycleTeardownBlock.js +27 -0
- package/dist/core/blocks/lifecycle/TestCaseBlock.d.ts +21 -0
- package/dist/core/blocks/lifecycle/TestCaseBlock.js +72 -0
- package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.d.ts +21 -0
- package/dist/core/blocks/lifecycle/TestCaseDataDrivenBlock.js +102 -0
- package/dist/core/blocks/lifecycle/index.d.ts +21 -0
- package/dist/core/blocks/lifecycle/index.js +63 -0
- package/dist/core/blocks/logic/LogicArrayBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicArrayBlock.js +28 -0
- package/dist/core/blocks/logic/LogicAssertBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicAssertBlock.js +32 -0
- package/dist/core/blocks/logic/LogicBooleanBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicBooleanBlock.js +26 -0
- package/dist/core/blocks/logic/LogicBooleanOpBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicBooleanOpBlock.js +31 -0
- package/dist/core/blocks/logic/LogicCommentBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicCommentBlock.js +26 -0
- package/dist/core/blocks/logic/LogicCompareBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicCompareBlock.js +52 -0
- package/dist/core/blocks/logic/LogicFailBlock.d.ts +16 -0
- package/dist/core/blocks/logic/LogicFailBlock.js +30 -0
- package/dist/core/blocks/logic/LogicForeachBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicForeachBlock.js +29 -0
- package/dist/core/blocks/logic/LogicGetVariableBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicGetVariableBlock.js +27 -0
- package/dist/core/blocks/logic/LogicIfBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicIfBlock.js +36 -0
- package/dist/core/blocks/logic/LogicLogBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicLogBlock.js +30 -0
- package/dist/core/blocks/logic/LogicNotBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicNotBlock.js +26 -0
- package/dist/core/blocks/logic/LogicNumberBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicNumberBlock.js +26 -0
- package/dist/core/blocks/logic/LogicObjectBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicObjectBlock.js +28 -0
- package/dist/core/blocks/logic/LogicRepeatBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicRepeatBlock.js +27 -0
- package/dist/core/blocks/logic/LogicSetVariableBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicSetVariableBlock.js +34 -0
- package/dist/core/blocks/logic/LogicTextBlock.d.ts +14 -0
- package/dist/core/blocks/logic/LogicTextBlock.js +27 -0
- package/dist/core/blocks/logic/LogicTryCatchBlock.d.ts +13 -0
- package/dist/core/blocks/logic/LogicTryCatchBlock.js +26 -0
- package/dist/core/blocks/logic/index.d.ts +28 -0
- package/dist/core/blocks/logic/index.js +95 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleDescriptionBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAccessibleNameBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttachedBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertAttributeBlock.js +44 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCheckedBlock.js +48 -0
- package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertClassBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCountBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertCssBlock.js +44 -0
- package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertDisabledBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEditableBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEmptyBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertEnabledBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertFocusedBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertIdBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertInViewportBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertNotVisibleBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertRoleBlock.js +69 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextContainsBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTextEqualsBlock.js +41 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleContainsBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertTitleEqualsBlock.js +36 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlContainsBlock.js +40 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertUrlEqualsBlock.js +37 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertValueContainsBlock.js +43 -0
- package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/assertions/WebAssertVisibleBlock.js +39 -0
- package/dist/core/blocks/playwright/assertions/index.d.ts +36 -0
- package/dist/core/blocks/playwright/assertions/index.js +127 -0
- package/dist/core/blocks/playwright/index.d.ts +16 -0
- package/dist/core/blocks/playwright/index.js +28 -3
- package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebCheckboxBlock.js +43 -0
- package/dist/core/blocks/playwright/interactions/WebClickBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebClickBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebDragAndDropBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebFillBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebFillBlock.js +38 -0
- package/dist/core/blocks/playwright/interactions/WebFocusBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebFocusBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebHoverBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebHoverBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebPressKeyBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebScrollIntoViewBlock.js +34 -0
- package/dist/core/blocks/playwright/interactions/WebSelectBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebSelectBlock.js +37 -0
- package/dist/core/blocks/playwright/interactions/WebTypeBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebTypeBlock.js +41 -0
- package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/interactions/WebUploadFileBlock.js +39 -0
- package/dist/core/blocks/playwright/interactions/index.d.ts +21 -0
- package/dist/core/blocks/playwright/interactions/index.js +56 -0
- package/dist/core/blocks/playwright/navigation/WebNavigateBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebNavigateBlock.js +36 -0
- package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebScreenshotBlock.js +36 -0
- package/dist/core/blocks/playwright/navigation/WebWaitBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitBlock.js +32 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForElementBlock.js +37 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.d.ts +13 -0
- package/dist/core/blocks/playwright/navigation/WebWaitForUrlBlock.js +34 -0
- package/dist/core/blocks/playwright/navigation/index.d.ts +15 -0
- package/dist/core/blocks/playwright/navigation/index.js +32 -0
- package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebCountElementsBlock.js +36 -0
- package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetAttributeBlock.js +42 -0
- package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetInputValueBlock.js +40 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTextBlock.js +40 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetTitleBlock.js +31 -0
- package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/WebGetUrlBlock.js +31 -0
- package/dist/core/blocks/playwright/retrieval/index.d.ts +16 -0
- package/dist/core/blocks/playwright/retrieval/index.js +36 -0
- package/dist/core/blocks/playwright/types.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureCallBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureCallBlock.js +66 -0
- package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureCallWithReturnBlock.js +51 -0
- package/dist/core/blocks/procedures/ProcedureDefineBlock.d.ts +15 -0
- package/dist/core/blocks/procedures/ProcedureDefineBlock.js +59 -0
- package/dist/core/blocks/procedures/ProcedureFillFormBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureFillFormBlock.js +30 -0
- package/dist/core/blocks/procedures/ProcedureGetParamBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureGetParamBlock.js +33 -0
- package/dist/core/blocks/procedures/ProcedureInlineBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureInlineBlock.js +31 -0
- package/dist/core/blocks/procedures/ProcedureLoginBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureLoginBlock.js +37 -0
- package/dist/core/blocks/procedures/ProcedureMapBlock.d.ts +14 -0
- package/dist/core/blocks/procedures/ProcedureMapBlock.js +36 -0
- package/dist/core/blocks/procedures/ProcedureReturnBlock.d.ts +15 -0
- package/dist/core/blocks/procedures/ProcedureReturnBlock.js +28 -0
- package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.d.ts +13 -0
- package/dist/core/blocks/procedures/ProcedureWaitAndClickBlock.js +32 -0
- package/dist/core/blocks/procedures/index.d.ts +21 -0
- package/dist/core/blocks/procedures/index.js +62 -0
- package/dist/core/blocks/{procedures.d.ts → procedures/procedureRegistry.d.ts} +10 -2
- package/dist/core/blocks/procedures/procedureRegistry.js +27 -0
- package/dist/core/blocks/utils/apiUtils.d.ts +81 -0
- package/dist/core/blocks/utils/apiUtils.js +176 -0
- package/dist/core/blocks/utils/index.d.ts +2 -0
- package/dist/core/blocks/utils/index.js +16 -0
- package/dist/core/blocks/utils/variableUtils.d.ts +19 -0
- package/dist/core/blocks/utils/variableUtils.js +69 -0
- package/dist/server/index.js +117 -11
- package/dist/server/openApiParser.d.ts +82 -0
- package/dist/server/openApiParser.js +495 -0
- package/dist/server/startServer.d.ts +1 -0
- package/dist/server/startServer.js +164 -0
- package/package.json +4 -2
- package/dist/client/assets/index-BLBBQ6Rn.js +0 -2195
- package/dist/client/assets/index-BLBBQ6Rn.js.map +0 -1
- package/dist/client/assets/index-qjoPPl9y.css +0 -1
- package/dist/core/blocks/api.d.ts +0 -2
- package/dist/core/blocks/api.js +0 -607
- package/dist/core/blocks/data-driven.d.ts +0 -2
- package/dist/core/blocks/data-driven.js +0 -245
- package/dist/core/blocks/lifecycle.d.ts +0 -2
- package/dist/core/blocks/lifecycle.js +0 -201
- package/dist/core/blocks/logic.d.ts +0 -2
- package/dist/core/blocks/logic.js +0 -360
- package/dist/core/blocks/playwright/assertions.d.ts +0 -5
- package/dist/core/blocks/playwright/assertions.js +0 -311
- package/dist/core/blocks/playwright/interactions.d.ts +0 -5
- package/dist/core/blocks/playwright/interactions.js +0 -208
- package/dist/core/blocks/playwright/navigation.d.ts +0 -5
- package/dist/core/blocks/playwright/navigation.js +0 -131
- package/dist/core/blocks/playwright/retrieval.d.ts +0 -5
- package/dist/core/blocks/playwright/retrieval.js +0 -153
- package/dist/core/blocks/playwright.d.ts +0 -13
- package/dist/core/blocks/playwright.js +0 -17
- package/dist/core/blocks/procedures.js +0 -321
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicFailBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Fail the test with a message.
|
|
8
|
+
* Note: This block has previousStatement but no nextStatement.
|
|
9
|
+
*/
|
|
10
|
+
class LogicFailBlock extends base_1.Block {
|
|
11
|
+
constructor() {
|
|
12
|
+
super(...arguments);
|
|
13
|
+
this.type = 'logic_fail';
|
|
14
|
+
this.category = 'Logic';
|
|
15
|
+
this.color = '#f44336';
|
|
16
|
+
this.tooltip = 'Fail the test with a message';
|
|
17
|
+
this.previousStatement = true;
|
|
18
|
+
this.nextStatement = false;
|
|
19
|
+
}
|
|
20
|
+
getInputs() {
|
|
21
|
+
return [
|
|
22
|
+
{ name: 'MESSAGE', type: 'field', fieldType: 'text', default: 'Test failed' },
|
|
23
|
+
];
|
|
24
|
+
}
|
|
25
|
+
async execute(params, context) {
|
|
26
|
+
const message = (0, utils_1.resolveVariables)(params.MESSAGE, context);
|
|
27
|
+
throw new Error(message);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.LogicFailBlock = LogicFailBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlFlowBlock } from '../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Iterate over an array.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicForeachBlock extends ControlFlowBlock {
|
|
7
|
+
readonly type = "logic_foreach";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#5C6BC0";
|
|
10
|
+
readonly tooltip = "Iterate over an array";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicForeachBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Iterate over an array.
|
|
7
|
+
*/
|
|
8
|
+
class LogicForeachBlock extends base_1.ControlFlowBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_foreach';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#5C6BC0';
|
|
14
|
+
this.tooltip = 'Iterate over an array';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'ARRAY', type: 'value', check: 'Array', required: true },
|
|
19
|
+
{ name: 'VAR', type: 'field', fieldType: 'text', default: 'item', required: true },
|
|
20
|
+
{ name: 'DO', type: 'statement' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, _context) {
|
|
24
|
+
const array = params.ARRAY;
|
|
25
|
+
const varName = params.VAR;
|
|
26
|
+
return { loop: true, array, varName, statement: 'DO' };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.LogicForeachBlock = LogicForeachBlock;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValueBlock } from '../base';
|
|
2
|
+
import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Get a variable value.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicGetVariableBlock extends ValueBlock {
|
|
7
|
+
readonly type = "logic_get_variable";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#795548";
|
|
10
|
+
readonly tooltip = "Get a variable value";
|
|
11
|
+
readonly output: BlockOutput;
|
|
12
|
+
getInputs(): BlockInput[];
|
|
13
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicGetVariableBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Get a variable value.
|
|
7
|
+
*/
|
|
8
|
+
class LogicGetVariableBlock extends base_1.ValueBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_get_variable';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#795548';
|
|
14
|
+
this.tooltip = 'Get a variable value';
|
|
15
|
+
this.output = { type: ['String', 'Number', 'Boolean', 'Object', 'Array'] };
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'NAME', type: 'field', fieldType: 'text', required: true },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, context) {
|
|
23
|
+
const name = params.NAME;
|
|
24
|
+
return context.variables.get(name);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.LogicGetVariableBlock = LogicGetVariableBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlFlowBlock } from '../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Execute blocks if condition is true.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicIfBlock extends ControlFlowBlock {
|
|
7
|
+
readonly type = "logic_if";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#5C6BC0";
|
|
10
|
+
readonly tooltip = "Execute blocks if condition is true";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicIfBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Execute blocks if condition is true.
|
|
7
|
+
*/
|
|
8
|
+
class LogicIfBlock extends base_1.ControlFlowBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_if';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#5C6BC0';
|
|
14
|
+
this.tooltip = 'Execute blocks if condition is true';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'CONDITION', type: 'value', check: 'Boolean', required: true },
|
|
19
|
+
{ name: 'DO', type: 'statement' },
|
|
20
|
+
{ name: 'ELSE', type: 'statement' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, _context) {
|
|
24
|
+
const condition = params.CONDITION;
|
|
25
|
+
if (condition && params.DO) {
|
|
26
|
+
// Execute DO block - handled by executor
|
|
27
|
+
return { branch: 'DO' };
|
|
28
|
+
}
|
|
29
|
+
else if (!condition && params.ELSE) {
|
|
30
|
+
// Execute ELSE block - handled by executor
|
|
31
|
+
return { branch: 'ELSE' };
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.LogicIfBlock = LogicIfBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Log a message.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicLogBlock extends StatementBlock {
|
|
7
|
+
readonly type = "logic_log";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#607D8B";
|
|
10
|
+
readonly tooltip = "Log a message";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicLogBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Log a message.
|
|
8
|
+
*/
|
|
9
|
+
class LogicLogBlock extends base_1.StatementBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'logic_log';
|
|
13
|
+
this.category = 'Logic';
|
|
14
|
+
this.color = '#607D8B';
|
|
15
|
+
this.tooltip = 'Log a message';
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'LEVEL', type: 'field', fieldType: 'dropdown', options: [['Info', 'info'], ['Warning', 'warn'], ['Error', 'error'], ['Debug', 'debug']] },
|
|
20
|
+
{ name: 'MESSAGE', type: 'field', fieldType: 'text', required: true },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const level = params.LEVEL || 'info';
|
|
25
|
+
const message = (0, utils_1.resolveVariables)(params.MESSAGE, context);
|
|
26
|
+
context.logger[level](message);
|
|
27
|
+
return { _message: message, _summary: message };
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.LogicLogBlock = LogicLogBlock;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValueBlock } from '../base';
|
|
2
|
+
import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Negate a boolean value.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicNotBlock extends ValueBlock {
|
|
7
|
+
readonly type = "logic_not";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#5C6BC0";
|
|
10
|
+
readonly tooltip = "Negate a boolean value";
|
|
11
|
+
readonly output: BlockOutput;
|
|
12
|
+
getInputs(): BlockInput[];
|
|
13
|
+
execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicNotBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Negate a boolean value.
|
|
7
|
+
*/
|
|
8
|
+
class LogicNotBlock extends base_1.ValueBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_not';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#5C6BC0';
|
|
14
|
+
this.tooltip = 'Negate a boolean value';
|
|
15
|
+
this.output = { type: 'Boolean' };
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'VALUE', type: 'value', check: 'Boolean', required: true },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, _context) {
|
|
23
|
+
return !params.VALUE;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.LogicNotBlock = LogicNotBlock;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValueBlock } from '../base';
|
|
2
|
+
import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* A number value.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicNumberBlock extends ValueBlock {
|
|
7
|
+
readonly type = "logic_number";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#795548";
|
|
10
|
+
readonly tooltip = "A number value";
|
|
11
|
+
readonly output: BlockOutput;
|
|
12
|
+
getInputs(): BlockInput[];
|
|
13
|
+
execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicNumberBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* A number value.
|
|
7
|
+
*/
|
|
8
|
+
class LogicNumberBlock extends base_1.ValueBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_number';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#795548';
|
|
14
|
+
this.tooltip = 'A number value';
|
|
15
|
+
this.output = { type: 'Number' };
|
|
16
|
+
}
|
|
17
|
+
getInputs() {
|
|
18
|
+
return [
|
|
19
|
+
{ name: 'NUM', type: 'field', fieldType: 'number', default: 0 },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, _context) {
|
|
23
|
+
return params.NUM;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.LogicNumberBlock = LogicNumberBlock;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValueBlock } from '../base';
|
|
2
|
+
import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Create a JSON object.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicObjectBlock extends ValueBlock {
|
|
7
|
+
readonly type = "logic_object";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#795548";
|
|
10
|
+
readonly tooltip = "Create a JSON object";
|
|
11
|
+
readonly output: BlockOutput;
|
|
12
|
+
getInputs(): BlockInput[];
|
|
13
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicObjectBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* Create a JSON object.
|
|
8
|
+
*/
|
|
9
|
+
class LogicObjectBlock extends base_1.ValueBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'logic_object';
|
|
13
|
+
this.category = 'Logic';
|
|
14
|
+
this.color = '#795548';
|
|
15
|
+
this.tooltip = 'Create a JSON object';
|
|
16
|
+
this.output = { type: 'Object' };
|
|
17
|
+
}
|
|
18
|
+
getInputs() {
|
|
19
|
+
return [
|
|
20
|
+
{ name: 'JSON', type: 'field', fieldType: 'text', default: '{}' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
const json = (0, utils_1.resolveVariables)(params.JSON, context);
|
|
25
|
+
return JSON.parse(json);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.LogicObjectBlock = LogicObjectBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlFlowBlock } from '../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Repeat blocks a specified number of times.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicRepeatBlock extends ControlFlowBlock {
|
|
7
|
+
readonly type = "logic_repeat";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#5C6BC0";
|
|
10
|
+
readonly tooltip = "Repeat blocks a specified number of times";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicRepeatBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Repeat blocks a specified number of times.
|
|
7
|
+
*/
|
|
8
|
+
class LogicRepeatBlock extends base_1.ControlFlowBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_repeat';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#5C6BC0';
|
|
14
|
+
this.tooltip = 'Repeat blocks a specified number of times';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'TIMES', type: 'field', fieldType: 'number', default: 10, required: true },
|
|
19
|
+
{ name: 'DO', type: 'statement' },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, _context) {
|
|
23
|
+
const times = params.TIMES;
|
|
24
|
+
return { loop: true, times, statement: 'DO' };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.LogicRepeatBlock = LogicRepeatBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { StatementBlock } from '../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Set a variable value.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicSetVariableBlock extends StatementBlock {
|
|
7
|
+
readonly type = "logic_set_variable";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#795548";
|
|
10
|
+
readonly tooltip = "Set a variable value";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicSetVariableBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Set a variable value.
|
|
7
|
+
*/
|
|
8
|
+
class LogicSetVariableBlock extends base_1.StatementBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_set_variable';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#795548';
|
|
14
|
+
this.tooltip = 'Set a variable value';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'NAME', type: 'field', fieldType: 'text', required: true },
|
|
19
|
+
{ name: 'VALUE', type: 'value', required: true },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(params, context) {
|
|
23
|
+
const name = params.NAME;
|
|
24
|
+
let value = params.VALUE;
|
|
25
|
+
// If the value is a block result with _value, extract just the value
|
|
26
|
+
if (value && typeof value === 'object' && '_value' in value) {
|
|
27
|
+
value = value._value;
|
|
28
|
+
}
|
|
29
|
+
context.variables.set(name, value);
|
|
30
|
+
context.logger.debug(`Set variable ${name} = ${JSON.stringify(value)}`);
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.LogicSetVariableBlock = LogicSetVariableBlock;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ValueBlock } from '../base';
|
|
2
|
+
import { BlockInput, BlockOutput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* A text value.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicTextBlock extends ValueBlock {
|
|
7
|
+
readonly type = "logic_text";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#795548";
|
|
10
|
+
readonly tooltip = "A text value";
|
|
11
|
+
readonly output: BlockOutput;
|
|
12
|
+
getInputs(): BlockInput[];
|
|
13
|
+
execute(params: Record<string, unknown>, context: ExecutionContext): Promise<unknown>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicTextBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
const utils_1 = require("../utils");
|
|
6
|
+
/**
|
|
7
|
+
* A text value.
|
|
8
|
+
*/
|
|
9
|
+
class LogicTextBlock extends base_1.ValueBlock {
|
|
10
|
+
constructor() {
|
|
11
|
+
super(...arguments);
|
|
12
|
+
this.type = 'logic_text';
|
|
13
|
+
this.category = 'Logic';
|
|
14
|
+
this.color = '#795548';
|
|
15
|
+
this.tooltip = 'A text value';
|
|
16
|
+
this.output = { type: 'String' };
|
|
17
|
+
}
|
|
18
|
+
getInputs() {
|
|
19
|
+
return [
|
|
20
|
+
{ name: 'TEXT', type: 'field', fieldType: 'text', default: '' },
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
async execute(params, context) {
|
|
24
|
+
return (0, utils_1.resolveVariables)(params.TEXT, context);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
exports.LogicTextBlock = LogicTextBlock;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ControlFlowBlock } from '../base';
|
|
2
|
+
import { BlockInput, ExecutionContext } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Handle errors gracefully.
|
|
5
|
+
*/
|
|
6
|
+
export declare class LogicTryCatchBlock extends ControlFlowBlock {
|
|
7
|
+
readonly type = "logic_try_catch";
|
|
8
|
+
readonly category = "Logic";
|
|
9
|
+
readonly color = "#5C6BC0";
|
|
10
|
+
readonly tooltip = "Handle errors gracefully";
|
|
11
|
+
getInputs(): BlockInput[];
|
|
12
|
+
execute(_params: Record<string, unknown>, _context: ExecutionContext): Promise<unknown>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LogicTryCatchBlock = void 0;
|
|
4
|
+
const base_1 = require("../base");
|
|
5
|
+
/**
|
|
6
|
+
* Handle errors gracefully.
|
|
7
|
+
*/
|
|
8
|
+
class LogicTryCatchBlock extends base_1.ControlFlowBlock {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this.type = 'logic_try_catch';
|
|
12
|
+
this.category = 'Logic';
|
|
13
|
+
this.color = '#5C6BC0';
|
|
14
|
+
this.tooltip = 'Handle errors gracefully';
|
|
15
|
+
}
|
|
16
|
+
getInputs() {
|
|
17
|
+
return [
|
|
18
|
+
{ name: 'TRY', type: 'statement' },
|
|
19
|
+
{ name: 'CATCH', type: 'statement' },
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
async execute(_params, _context) {
|
|
23
|
+
return { tryCatch: true };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.LogicTryCatchBlock = LogicTryCatchBlock;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { Block } from '../base';
|
|
2
|
+
import { BlockDefinition } from '../../types';
|
|
3
|
+
export { LogicSetVariableBlock } from './LogicSetVariableBlock';
|
|
4
|
+
export { LogicGetVariableBlock } from './LogicGetVariableBlock';
|
|
5
|
+
export { LogicIfBlock } from './LogicIfBlock';
|
|
6
|
+
export { LogicRepeatBlock } from './LogicRepeatBlock';
|
|
7
|
+
export { LogicForeachBlock } from './LogicForeachBlock';
|
|
8
|
+
export { LogicTryCatchBlock } from './LogicTryCatchBlock';
|
|
9
|
+
export { LogicCompareBlock } from './LogicCompareBlock';
|
|
10
|
+
export { LogicBooleanOpBlock } from './LogicBooleanOpBlock';
|
|
11
|
+
export { LogicNotBlock } from './LogicNotBlock';
|
|
12
|
+
export { LogicTextBlock } from './LogicTextBlock';
|
|
13
|
+
export { LogicNumberBlock } from './LogicNumberBlock';
|
|
14
|
+
export { LogicBooleanBlock } from './LogicBooleanBlock';
|
|
15
|
+
export { LogicObjectBlock } from './LogicObjectBlock';
|
|
16
|
+
export { LogicArrayBlock } from './LogicArrayBlock';
|
|
17
|
+
export { LogicLogBlock } from './LogicLogBlock';
|
|
18
|
+
export { LogicCommentBlock } from './LogicCommentBlock';
|
|
19
|
+
export { LogicFailBlock } from './LogicFailBlock';
|
|
20
|
+
export { LogicAssertBlock } from './LogicAssertBlock';
|
|
21
|
+
/**
|
|
22
|
+
* All Logic block class instances.
|
|
23
|
+
*/
|
|
24
|
+
export declare const logicBlockClasses: Block[];
|
|
25
|
+
/**
|
|
26
|
+
* Logic blocks as BlockDefinition array for backward compatibility.
|
|
27
|
+
*/
|
|
28
|
+
export declare const logicBlocks: BlockDefinition[];
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.logicBlocks = exports.logicBlockClasses = exports.LogicAssertBlock = exports.LogicFailBlock = exports.LogicCommentBlock = exports.LogicLogBlock = exports.LogicArrayBlock = exports.LogicObjectBlock = exports.LogicBooleanBlock = exports.LogicNumberBlock = exports.LogicTextBlock = exports.LogicNotBlock = exports.LogicBooleanOpBlock = exports.LogicCompareBlock = exports.LogicTryCatchBlock = exports.LogicForeachBlock = exports.LogicRepeatBlock = exports.LogicIfBlock = exports.LogicGetVariableBlock = exports.LogicSetVariableBlock = void 0;
|
|
4
|
+
// Variable blocks
|
|
5
|
+
var LogicSetVariableBlock_1 = require("./LogicSetVariableBlock");
|
|
6
|
+
Object.defineProperty(exports, "LogicSetVariableBlock", { enumerable: true, get: function () { return LogicSetVariableBlock_1.LogicSetVariableBlock; } });
|
|
7
|
+
var LogicGetVariableBlock_1 = require("./LogicGetVariableBlock");
|
|
8
|
+
Object.defineProperty(exports, "LogicGetVariableBlock", { enumerable: true, get: function () { return LogicGetVariableBlock_1.LogicGetVariableBlock; } });
|
|
9
|
+
// Control flow blocks
|
|
10
|
+
var LogicIfBlock_1 = require("./LogicIfBlock");
|
|
11
|
+
Object.defineProperty(exports, "LogicIfBlock", { enumerable: true, get: function () { return LogicIfBlock_1.LogicIfBlock; } });
|
|
12
|
+
var LogicRepeatBlock_1 = require("./LogicRepeatBlock");
|
|
13
|
+
Object.defineProperty(exports, "LogicRepeatBlock", { enumerable: true, get: function () { return LogicRepeatBlock_1.LogicRepeatBlock; } });
|
|
14
|
+
var LogicForeachBlock_1 = require("./LogicForeachBlock");
|
|
15
|
+
Object.defineProperty(exports, "LogicForeachBlock", { enumerable: true, get: function () { return LogicForeachBlock_1.LogicForeachBlock; } });
|
|
16
|
+
var LogicTryCatchBlock_1 = require("./LogicTryCatchBlock");
|
|
17
|
+
Object.defineProperty(exports, "LogicTryCatchBlock", { enumerable: true, get: function () { return LogicTryCatchBlock_1.LogicTryCatchBlock; } });
|
|
18
|
+
// Comparison and boolean blocks
|
|
19
|
+
var LogicCompareBlock_1 = require("./LogicCompareBlock");
|
|
20
|
+
Object.defineProperty(exports, "LogicCompareBlock", { enumerable: true, get: function () { return LogicCompareBlock_1.LogicCompareBlock; } });
|
|
21
|
+
var LogicBooleanOpBlock_1 = require("./LogicBooleanOpBlock");
|
|
22
|
+
Object.defineProperty(exports, "LogicBooleanOpBlock", { enumerable: true, get: function () { return LogicBooleanOpBlock_1.LogicBooleanOpBlock; } });
|
|
23
|
+
var LogicNotBlock_1 = require("./LogicNotBlock");
|
|
24
|
+
Object.defineProperty(exports, "LogicNotBlock", { enumerable: true, get: function () { return LogicNotBlock_1.LogicNotBlock; } });
|
|
25
|
+
// Value blocks
|
|
26
|
+
var LogicTextBlock_1 = require("./LogicTextBlock");
|
|
27
|
+
Object.defineProperty(exports, "LogicTextBlock", { enumerable: true, get: function () { return LogicTextBlock_1.LogicTextBlock; } });
|
|
28
|
+
var LogicNumberBlock_1 = require("./LogicNumberBlock");
|
|
29
|
+
Object.defineProperty(exports, "LogicNumberBlock", { enumerable: true, get: function () { return LogicNumberBlock_1.LogicNumberBlock; } });
|
|
30
|
+
var LogicBooleanBlock_1 = require("./LogicBooleanBlock");
|
|
31
|
+
Object.defineProperty(exports, "LogicBooleanBlock", { enumerable: true, get: function () { return LogicBooleanBlock_1.LogicBooleanBlock; } });
|
|
32
|
+
var LogicObjectBlock_1 = require("./LogicObjectBlock");
|
|
33
|
+
Object.defineProperty(exports, "LogicObjectBlock", { enumerable: true, get: function () { return LogicObjectBlock_1.LogicObjectBlock; } });
|
|
34
|
+
var LogicArrayBlock_1 = require("./LogicArrayBlock");
|
|
35
|
+
Object.defineProperty(exports, "LogicArrayBlock", { enumerable: true, get: function () { return LogicArrayBlock_1.LogicArrayBlock; } });
|
|
36
|
+
// Utility blocks
|
|
37
|
+
var LogicLogBlock_1 = require("./LogicLogBlock");
|
|
38
|
+
Object.defineProperty(exports, "LogicLogBlock", { enumerable: true, get: function () { return LogicLogBlock_1.LogicLogBlock; } });
|
|
39
|
+
var LogicCommentBlock_1 = require("./LogicCommentBlock");
|
|
40
|
+
Object.defineProperty(exports, "LogicCommentBlock", { enumerable: true, get: function () { return LogicCommentBlock_1.LogicCommentBlock; } });
|
|
41
|
+
var LogicFailBlock_1 = require("./LogicFailBlock");
|
|
42
|
+
Object.defineProperty(exports, "LogicFailBlock", { enumerable: true, get: function () { return LogicFailBlock_1.LogicFailBlock; } });
|
|
43
|
+
var LogicAssertBlock_1 = require("./LogicAssertBlock");
|
|
44
|
+
Object.defineProperty(exports, "LogicAssertBlock", { enumerable: true, get: function () { return LogicAssertBlock_1.LogicAssertBlock; } });
|
|
45
|
+
// Import all block classes
|
|
46
|
+
const LogicSetVariableBlock_2 = require("./LogicSetVariableBlock");
|
|
47
|
+
const LogicGetVariableBlock_2 = require("./LogicGetVariableBlock");
|
|
48
|
+
const LogicIfBlock_2 = require("./LogicIfBlock");
|
|
49
|
+
const LogicRepeatBlock_2 = require("./LogicRepeatBlock");
|
|
50
|
+
const LogicForeachBlock_2 = require("./LogicForeachBlock");
|
|
51
|
+
const LogicTryCatchBlock_2 = require("./LogicTryCatchBlock");
|
|
52
|
+
const LogicCompareBlock_2 = require("./LogicCompareBlock");
|
|
53
|
+
const LogicBooleanOpBlock_2 = require("./LogicBooleanOpBlock");
|
|
54
|
+
const LogicNotBlock_2 = require("./LogicNotBlock");
|
|
55
|
+
const LogicTextBlock_2 = require("./LogicTextBlock");
|
|
56
|
+
const LogicNumberBlock_2 = require("./LogicNumberBlock");
|
|
57
|
+
const LogicBooleanBlock_2 = require("./LogicBooleanBlock");
|
|
58
|
+
const LogicObjectBlock_2 = require("./LogicObjectBlock");
|
|
59
|
+
const LogicArrayBlock_2 = require("./LogicArrayBlock");
|
|
60
|
+
const LogicLogBlock_2 = require("./LogicLogBlock");
|
|
61
|
+
const LogicCommentBlock_2 = require("./LogicCommentBlock");
|
|
62
|
+
const LogicFailBlock_2 = require("./LogicFailBlock");
|
|
63
|
+
const LogicAssertBlock_2 = require("./LogicAssertBlock");
|
|
64
|
+
/**
|
|
65
|
+
* All Logic block class instances.
|
|
66
|
+
*/
|
|
67
|
+
exports.logicBlockClasses = [
|
|
68
|
+
// Variable blocks
|
|
69
|
+
new LogicSetVariableBlock_2.LogicSetVariableBlock(),
|
|
70
|
+
new LogicGetVariableBlock_2.LogicGetVariableBlock(),
|
|
71
|
+
// Control flow
|
|
72
|
+
new LogicIfBlock_2.LogicIfBlock(),
|
|
73
|
+
new LogicCompareBlock_2.LogicCompareBlock(),
|
|
74
|
+
new LogicBooleanOpBlock_2.LogicBooleanOpBlock(),
|
|
75
|
+
new LogicNotBlock_2.LogicNotBlock(),
|
|
76
|
+
new LogicRepeatBlock_2.LogicRepeatBlock(),
|
|
77
|
+
new LogicForeachBlock_2.LogicForeachBlock(),
|
|
78
|
+
new LogicTryCatchBlock_2.LogicTryCatchBlock(),
|
|
79
|
+
// Utility
|
|
80
|
+
new LogicLogBlock_2.LogicLogBlock(),
|
|
81
|
+
new LogicCommentBlock_2.LogicCommentBlock(),
|
|
82
|
+
// Value blocks
|
|
83
|
+
new LogicTextBlock_2.LogicTextBlock(),
|
|
84
|
+
new LogicNumberBlock_2.LogicNumberBlock(),
|
|
85
|
+
new LogicBooleanBlock_2.LogicBooleanBlock(),
|
|
86
|
+
new LogicObjectBlock_2.LogicObjectBlock(),
|
|
87
|
+
new LogicArrayBlock_2.LogicArrayBlock(),
|
|
88
|
+
// Assertion/fail
|
|
89
|
+
new LogicFailBlock_2.LogicFailBlock(),
|
|
90
|
+
new LogicAssertBlock_2.LogicAssertBlock(),
|
|
91
|
+
];
|
|
92
|
+
/**
|
|
93
|
+
* Logic blocks as BlockDefinition array for backward compatibility.
|
|
94
|
+
*/
|
|
95
|
+
exports.logicBlocks = exports.logicBlockClasses.map(block => block.toDefinition());
|