@kumologica/sdk 3.2.0-beta9 → 4.0.0-alpha2
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/bin/kl.js +1 -1
- package/cli/cli.js +0 -2
- package/cli/commands/create-commands/create-project-iteratively.js +14 -7
- package/cli/commands/create.js +16 -15
- package/cli/commands/open.js +12 -5
- package/cli/commands/start.js +165 -0
- package/cli/commands/test/TestSuiteRunner.js +76 -0
- package/cli/commands/test.js +92 -120
- package/cli/utils/fs/parse.js +1 -1
- package/cli/utils/logger.js +9 -3
- package/package.json +12 -114
- package/src/api/core/comms.js +141 -0
- package/src/api/core/context.js +296 -0
- package/src/api/core/flows.js +286 -0
- package/src/api/core/index.js +29 -0
- package/src/api/core/library.js +106 -0
- package/src/api/core/nodes.js +476 -0
- package/src/api/core/projects.js +426 -0
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/context.js +1 -1
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/flow.js +2 -4
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/flows.js +1 -1
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/index.js +43 -27
- package/src/{app/ui/editor-api/lib/admin → api/core/rest}/nodes.js +1 -1
- package/src/{app/ui/editor-api/lib → api/core/rest}/util.js +6 -4
- package/src/api/core/settings.js +287 -0
- package/src/api/tools/base/DesignerTool.js +108 -0
- package/src/api/tools/core/flow.js +58 -0
- package/src/api/tools/core/index.js +18 -0
- package/src/api/tools/core/node.js +77 -0
- package/src/api/tools/debugger/index.js +193 -0
- package/src/api/tools/filemanager/index.js +127 -0
- package/src/api/tools/git/index.js +103 -0
- package/src/api/tools/index.js +13 -0
- package/src/api/tools/test/index.js +56 -0
- package/src/api/tools/test/lib/TestCaseRunner.js +105 -0
- package/src/api/tools/test/lib/reporters/index.js +120 -0
- package/src/server/DesignerServer.js +141 -0
- package/cli/.DS_Store +0 -0
- package/cli/commands/test-utils/TestSuiteController.js +0 -363
- package/cli/commands/test-utils/TestSuiteController.test.js +0 -171
- package/cli/commands/test-utils/util/output.js +0 -14
- package/cli/commands/test-utils/util/updates/index.js +0 -17
- package/cli/commands/test-utils/util/updates/pkg.js +0 -13
- package/cli/commands/test-utils/util/updates/templates/default-settings.js +0 -209
- package/src/app/lib/aws/aws-profile.js +0 -43
- package/src/app/lib/aws/ca-alexa-api.js +0 -29
- package/src/app/lib/aws/ca-apigw-api.js +0 -216
- package/src/app/lib/aws/ca-cloudwatch-api.js +0 -78
- package/src/app/lib/aws/ca-codecommit-api.js +0 -63
- package/src/app/lib/aws/ca-dynamodb-api.js +0 -27
- package/src/app/lib/aws/ca-elb-api.js +0 -44
- package/src/app/lib/aws/ca-events-api.js +0 -27
- package/src/app/lib/aws/ca-iot-api.js +0 -105
- package/src/app/lib/aws/ca-s3-api.js +0 -115
- package/src/app/lib/aws/ca-sns-api.js +0 -38
- package/src/app/lib/aws/ca-sqs-api.js +0 -51
- package/src/app/lib/aws/cf.js +0 -449
- package/src/app/lib/aws/index.js +0 -988
- package/src/app/lib/aws/kl-iam-api.js +0 -27
- package/src/app/lib/aws/kl-rekognition-api.js +0 -66
- package/src/app/lib/aws/kl-ssm-api.js +0 -24
- package/src/app/lib/azure/index.js +0 -80
- package/src/app/lib/dependencies.js +0 -50
- package/src/app/lib/kumohub/index.js +0 -201
- package/src/app/lib/runtime-loader/index.js +0 -42
- package/src/app/lib/serverless/index.js +0 -318
- package/src/app/lib/stores/aws-cloud-config-store.js +0 -35
- package/src/app/lib/stores/azure-config-store.js +0 -24
- package/src/app/lib/stores/kumohub-config-store.js +0 -24
- package/src/app/lib/stores/project-info-config-store.js +0 -26
- package/src/app/lib/stores/settings-cloud-store.js +0 -120
- package/src/app/lib/stores/settings-cloud-store.spec.js +0 -26
- package/src/app/lib/stores/settings-network-store.js +0 -118
- package/src/app/lib/stores/settings-network-store.spec.js +0 -27
- package/src/app/lib/stores/store.js +0 -97
- package/src/app/lib/stores/test-config-store.js +0 -159
- package/src/app/lib/stores/user-preference-store.js +0 -44
- package/src/app/lib/stores/util/iniParser.js +0 -46
- package/src/app/lib/stores/util/iniParser.spec.js +0 -72
- package/src/app/lib/utils/editor.js +0 -98
- package/src/app/lib/utils/fix-path.js +0 -15
- package/src/app/main-process/editor-manager.js +0 -177
- package/src/app/main-process/favicon.ico +0 -0
- package/src/app/main-process/main-window.js +0 -214
- package/src/app/main-process/menu.js +0 -420
- package/src/app/main-process/modal-home.js +0 -122
- package/src/app/main-process/modal-newproject.js +0 -123
- package/src/app/main-process/modal-newtab.js +0 -96
- package/src/app/main-process/modal-nodelibrary.js +0 -94
- package/src/app/main-process/modal-welcome.js +0 -119
- package/src/app/main.js +0 -620
- package/src/app/preload.js +0 -649
- package/src/app/ui/editor-api/lib/auth/clients.js +0 -17
- package/src/app/ui/editor-api/lib/auth/index.js +0 -269
- package/src/app/ui/editor-api/lib/auth/permissions.js +0 -51
- package/src/app/ui/editor-api/lib/auth/strategies.js +0 -144
- package/src/app/ui/editor-api/lib/auth/tokens.js +0 -138
- package/src/app/ui/editor-api/lib/auth/users.js +0 -122
- package/src/app/ui/editor-api/lib/editor/comms.js +0 -247
- package/src/app/ui/editor-api/lib/editor/credentials.js +0 -22
- package/src/app/ui/editor-api/lib/editor/index.js +0 -242
- package/src/app/ui/editor-api/lib/editor/library.js +0 -69
- package/src/app/ui/editor-api/lib/editor/locales.js +0 -37
- package/src/app/ui/editor-api/lib/editor/projects.js +0 -497
- package/src/app/ui/editor-api/lib/editor/settings.js +0 -118
- package/src/app/ui/editor-api/lib/editor/sshkeys.js +0 -87
- package/src/app/ui/editor-api/lib/editor/theme.js +0 -184
- package/src/app/ui/editor-api/lib/editor/ui.js +0 -170
- package/src/app/ui/editor-api/lib/index.js +0 -149
- package/src/app/ui/editor-api/lib/runner/index.js +0 -81
- package/src/app/ui/editor-client/README.md +0 -10
- package/src/app/ui/editor-client/constants.js +0 -5
- package/src/app/ui/editor-client/index.js +0 -3
- package/src/app/ui/editor-client/public/favicon.ico +0 -0
- package/src/app/ui/editor-client/public/red/images/bolt.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/continue-full.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/continue-outline.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/pause.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/restart.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/stepover.png +0 -0
- package/src/app/ui/editor-client/public/red/images/debugger/stop.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-flows-o.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-flows.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-full-o.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-full.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-nodes-o.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-nodes.png +0 -0
- package/src/app/ui/editor-client/public/red/images/deploy-reload.png +0 -0
- package/src/app/ui/editor-client/public/red/images/grip.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/arrow-in.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/bolt.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/node-changed.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/node-error.png +0 -0
- package/src/app/ui/editor-client/public/red/images/icons/node-play.png +0 -0
- package/src/app/ui/editor-client/public/red/images/kumologica-app.png +0 -0
- package/src/app/ui/editor-client/public/red/images/node-red-256.png +0 -0
- package/src/app/ui/editor-client/public/red/images/node-red-icon-black.svg +0 -9
- package/src/app/ui/editor-client/public/red/images/node-red-icon.svg +0 -33
- package/src/app/ui/editor-client/public/red/images/node-red.png +0 -0
- package/src/app/ui/editor-client/public/red/images/pw_maze_white.png +0 -0
- package/src/app/ui/editor-client/public/red/images/spin.svg +0 -41
- package/src/app/ui/editor-client/public/red/images/spinner.gif +0 -0
- package/src/app/ui/editor-client/public/red/images/subflow_tab.png +0 -0
- package/src/app/ui/editor-client/public/red/images/test-icon.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/09.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/az.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/bin.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/bool.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/env.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/expr.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/json.png +0 -0
- package/src/app/ui/editor-client/public/red/images/typedInput/re.png +0 -0
- package/src/app/ui/editor-client/public/red/keymap.json +0 -54
- package/src/app/ui/editor-client/public/red/main-modals.js +0 -14
- package/src/app/ui/editor-client/public/red/main-modals.min.js +0 -1
- package/src/app/ui/editor-client/public/red/main.js +0 -10
- package/src/app/ui/editor-client/public/red/main.min.js +0 -1
- package/src/app/ui/editor-client/public/red/red.js +0 -45913
- package/src/app/ui/editor-client/public/red/red.min.js +0 -19
- package/src/app/ui/editor-client/public/red/style.min.css +0 -9
- package/src/app/ui/editor-client/public/vendor/ace/LICENSE +0 -24
- package/src/app/ui/editor-client/public/vendor/ace/ace.js +0 -17
- package/src/app/ui/editor-client/public/vendor/ace/ext-language_tools.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/ext-searchbox.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-css.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-handlebars.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-html.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-javascript.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-json.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-jsonata.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/mode-markdown.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-properties.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-python.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-sql.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-swift.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-text.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-xml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/mode-yaml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/css.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/handlebars.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/html.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/javascript.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/json.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/jsonata.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/snippets/markdown.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/properties.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/python.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/sql.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/swift.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/text.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/xml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/snippets/yaml.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/theme-chrome.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/theme-tomorrow.js +0 -8
- package/src/app/ui/editor-client/public/vendor/ace/worker-css.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-html.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-javascript.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-json.js +0 -1
- package/src/app/ui/editor-client/public/vendor/ace/worker-jsonata.js +0 -2140
- package/src/app/ui/editor-client/public/vendor/ace/worker-xml.js +0 -1
- package/src/app/ui/editor-client/public/vendor/beautifyjs/beautify.min.js +0 -1
- package/src/app/ui/editor-client/public/vendor/bootstrap/css/bootstrap.min.css +0 -9
- package/src/app/ui/editor-client/public/vendor/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/src/app/ui/editor-client/public/vendor/bootstrap/img/glyphicons-halflings.png +0 -0
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/active-line.js +0 -72
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/coffeescript-lint.js +0 -47
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/javascript-hint.js +0 -157
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/javascript-lint.js +0 -63
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/jshint.js +0 -29591
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/lint.css +0 -73
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/lint.js +0 -252
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/show-hint.css +0 -36
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/show-hint.js +0 -460
- package/src/app/ui/editor-client/public/vendor/code-mirror/addon/sql-hint.js +0 -304
- package/src/app/ui/editor-client/public/vendor/code-mirror/lib/codemirror.css +0 -350
- package/src/app/ui/editor-client/public/vendor/code-mirror/lib/codemirror.js +0 -9800
- package/src/app/ui/editor-client/public/vendor/code-mirror/mode/javascript.js +0 -927
- package/src/app/ui/editor-client/public/vendor/code-mirror/mode/sql.js +0 -494
- package/src/app/ui/editor-client/public/vendor/code-mirror/theme/base16-dark.css +0 -38
- package/src/app/ui/editor-client/public/vendor/code-mirror/theme/monokai.css +0 -42
- package/src/app/ui/editor-client/public/vendor/code-mirror/theme/solarized.css +0 -168
- package/src/app/ui/editor-client/public/vendor/d3-context-menu/d3-context-menu.css +0 -43
- package/src/app/ui/editor-client/public/vendor/d3-context-menu/d3-context-menu.js +0 -86
- package/src/app/ui/editor-client/public/vendor/easy-json-schema/index.js +0 -88
- package/src/app/ui/editor-client/public/vendor/electron-tabs/electron-tabs.js +0 -2907
- package/src/app/ui/editor-client/public/vendor/font-awesome/css/font-awesome.min.css +0 -4
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/app/ui/editor-client/public/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.eot +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.svg +0 -2105
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.ttf +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.woff +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/fonts/icofont.woff2 +0 -0
- package/src/app/ui/editor-client/public/vendor/icofont/icofont.min.css +0 -7
- package/src/app/ui/editor-client/public/vendor/jqtree/tree.jquery.js +0 -119
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/animated-overlay.gif +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/src/app/ui/editor-client/public/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css +0 -5
- package/src/app/ui/editor-client/public/vendor/jsonata/jsonata.min.js +0 -190
- package/src/app/ui/editor-client/public/vendor/kumologica/http-test-case.js +0 -131
- package/src/app/ui/editor-client/public/vendor/misc/toggleswitch.css +0 -181
- package/src/app/ui/editor-client/public/vendor/misc/toggleswitch.js +0 -48
- package/src/app/ui/editor-client/public/vendor/simplemde/simplemde.min.css +0 -7
- package/src/app/ui/editor-client/public/vendor/simplemde/simplemde.min.js +0 -15
- package/src/app/ui/editor-client/public/vendor/vendor.css +0 -517
- package/src/app/ui/editor-client/public/vendor/vendor.js +0 -2769
- package/src/app/ui/editor-client/public/vendor/xterm/lib/xterm.js +0 -2
- package/src/app/ui/editor-client/src/ace/README.md +0 -50
- package/src/app/ui/editor-client/src/ace/mode/nrjavascript.js +0 -35
- package/src/app/ui/editor-client/src/ace/mode/nrjavascript_worker.js +0 -189
- package/src/app/ui/editor-client/src/favicon.ico +0 -0
- package/src/app/ui/editor-client/src/images/bolt.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/continue-full.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/continue-outline.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/pause.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/restart.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/stepover.png +0 -0
- package/src/app/ui/editor-client/src/images/debugger/stop.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-flows-o.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-flows.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-full-o.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-full.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-nodes-o.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-nodes.png +0 -0
- package/src/app/ui/editor-client/src/images/deploy-reload.png +0 -0
- package/src/app/ui/editor-client/src/images/grip.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/arrow-in.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/bolt.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/node-changed.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/node-error.png +0 -0
- package/src/app/ui/editor-client/src/images/icons/node-play.png +0 -0
- package/src/app/ui/editor-client/src/images/kumologica-app.png +0 -0
- package/src/app/ui/editor-client/src/images/node-red-256.png +0 -0
- package/src/app/ui/editor-client/src/images/node-red-icon-black.svg +0 -9
- package/src/app/ui/editor-client/src/images/node-red-icon.svg +0 -33
- package/src/app/ui/editor-client/src/images/node-red.png +0 -0
- package/src/app/ui/editor-client/src/images/pw_maze_white.png +0 -0
- package/src/app/ui/editor-client/src/images/spin.svg +0 -41
- package/src/app/ui/editor-client/src/images/spinner.gif +0 -0
- package/src/app/ui/editor-client/src/images/subflow_tab.png +0 -0
- package/src/app/ui/editor-client/src/images/test-icon.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/09.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/az.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/bin.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/bool.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/env.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/expr.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/json.png +0 -0
- package/src/app/ui/editor-client/src/images/typedInput/re.png +0 -0
- package/src/app/ui/editor-client/src/js/comms.js +0 -174
- package/src/app/ui/editor-client/src/js/events.js +0 -39
- package/src/app/ui/editor-client/src/js/font-awesome.js +0 -818
- package/src/app/ui/editor-client/src/js/history.js +0 -337
- package/src/app/ui/editor-client/src/js/i18n.js +0 -81
- package/src/app/ui/editor-client/src/js/jquery-addons.js +0 -21
- package/src/app/ui/editor-client/src/js/keymap.json +0 -54
- package/src/app/ui/editor-client/src/js/main-modals.js +0 -14
- package/src/app/ui/editor-client/src/js/main.js +0 -10
- package/src/app/ui/editor-client/src/js/modals/modal-home.js +0 -162
- package/src/app/ui/editor-client/src/js/modals/modal-new-project.js +0 -86
- package/src/app/ui/editor-client/src/js/modals/modal-new-tab.js +0 -58
- package/src/app/ui/editor-client/src/js/modals/modal-node-library.js +0 -255
- package/src/app/ui/editor-client/src/js/modals/modal-welcome.js +0 -102
- package/src/app/ui/editor-client/src/js/nodes.js +0 -1762
- package/src/app/ui/editor-client/src/js/red.js +0 -707
- package/src/app/ui/editor-client/src/js/settings.js +0 -275
- package/src/app/ui/editor-client/src/js/text/bidi.js +0 -116
- package/src/app/ui/editor-client/src/js/text/format.js +0 -1316
- package/src/app/ui/editor-client/src/js/ui/actions.js +0 -39
- package/src/app/ui/editor-client/src/js/ui/clipboard.js +0 -510
- package/src/app/ui/editor-client/src/js/ui/common/checkboxSet.js +0 -117
- package/src/app/ui/editor-client/src/js/ui/common/editableList.js +0 -322
- package/src/app/ui/editor-client/src/js/ui/common/menu.js +0 -277
- package/src/app/ui/editor-client/src/js/ui/common/panels.js +0 -104
- package/src/app/ui/editor-client/src/js/ui/common/popover.js +0 -268
- package/src/app/ui/editor-client/src/js/ui/common/searchBox.js +0 -98
- package/src/app/ui/editor-client/src/js/ui/common/stack.js +0 -184
- package/src/app/ui/editor-client/src/js/ui/common/tabs.js +0 -805
- package/src/app/ui/editor-client/src/js/ui/common/treeList.js +0 -170
- package/src/app/ui/editor-client/src/js/ui/common/typedInput.js +0 -819
- package/src/app/ui/editor-client/src/js/ui/common/typedInputLong.js +0 -829
- package/src/app/ui/editor-client/src/js/ui/deploy.js +0 -422
- package/src/app/ui/editor-client/src/js/ui/diff.js +0 -2225
- package/src/app/ui/editor-client/src/js/ui/editor.js +0 -3021
- package/src/app/ui/editor-client/src/js/ui/editors/buffer.js +0 -195
- package/src/app/ui/editor-client/src/js/ui/editors/expression.js +0 -655
- package/src/app/ui/editor-client/src/js/ui/editors/js.js +0 -90
- package/src/app/ui/editor-client/src/js/ui/editors/json.js +0 -107
- package/src/app/ui/editor-client/src/js/ui/editors/markdown.js +0 -267
- package/src/app/ui/editor-client/src/js/ui/editors/string.js +0 -75
- package/src/app/ui/editor-client/src/js/ui/event-log.js +0 -107
- package/src/app/ui/editor-client/src/js/ui/header.js +0 -373
- package/src/app/ui/editor-client/src/js/ui/keyboard.js +0 -565
- package/src/app/ui/editor-client/src/js/ui/library.js +0 -570
- package/src/app/ui/editor-client/src/js/ui/logviewer.js +0 -137
- package/src/app/ui/editor-client/src/js/ui/notifications.js +0 -282
- package/src/app/ui/editor-client/src/js/ui/palette-editor.js +0 -1061
- package/src/app/ui/editor-client/src/js/ui/palette-navigator.js +0 -144
- package/src/app/ui/editor-client/src/js/ui/palette-nodes.js +0 -789
- package/src/app/ui/editor-client/src/js/ui/palette.js +0 -62
- package/src/app/ui/editor-client/src/js/ui/project-info.js +0 -234
- package/src/app/ui/editor-client/src/js/ui/projects/projectSettings.js +0 -1651
- package/src/app/ui/editor-client/src/js/ui/projects/projectUserSettings.js +0 -404
- package/src/app/ui/editor-client/src/js/ui/projects/projects.js +0 -2395
- package/src/app/ui/editor-client/src/js/ui/projects/tab-versionControl.js +0 -1383
- package/src/app/ui/editor-client/src/js/ui/search.js +0 -374
- package/src/app/ui/editor-client/src/js/ui/sidebar.js +0 -341
- package/src/app/ui/editor-client/src/js/ui/state.js +0 -14
- package/src/app/ui/editor-client/src/js/ui/subflow.js +0 -748
- package/src/app/ui/editor-client/src/js/ui/tab-awsDeploy.js +0 -1427
- package/src/app/ui/editor-client/src/js/ui/tab-azure.js +0 -852
- package/src/app/ui/editor-client/src/js/ui/tab-config.js +0 -452
- package/src/app/ui/editor-client/src/js/ui/tab-context.js +0 -406
- package/src/app/ui/editor-client/src/js/ui/tab-git.js +0 -320
- package/src/app/ui/editor-client/src/js/ui/tab-info.js +0 -661
- package/src/app/ui/editor-client/src/js/ui/tab-kumohub.js +0 -827
- package/src/app/ui/editor-client/src/js/ui/tab-nodeInfo.js +0 -60
- package/src/app/ui/editor-client/src/js/ui/tab-test.js +0 -987
- package/src/app/ui/editor-client/src/js/ui/terminal.js +0 -240
- package/src/app/ui/editor-client/src/js/ui/touch/radialMenu.js +0 -170
- package/src/app/ui/editor-client/src/js/ui/tray.js +0 -411
- package/src/app/ui/editor-client/src/js/ui/typeSearch.js +0 -411
- package/src/app/ui/editor-client/src/js/ui/ui-settings.js +0 -499
- package/src/app/ui/editor-client/src/js/ui/update-panel.js +0 -84
- package/src/app/ui/editor-client/src/js/ui/userSettings.js +0 -673
- package/src/app/ui/editor-client/src/js/ui/utils.js +0 -1287
- package/src/app/ui/editor-client/src/js/ui/view-navigator.js +0 -169
- package/src/app/ui/editor-client/src/js/ui/view-tools.js +0 -123
- package/src/app/ui/editor-client/src/js/ui/view.js +0 -5428
- package/src/app/ui/editor-client/src/js/ui/workspaces.js +0 -555
- package/src/app/ui/editor-client/src/js/user.js +0 -282
- package/src/app/ui/editor-client/src/js/validators.js +0 -54
- package/src/app/ui/editor-client/src/kumologica-app.png +0 -0
- package/src/app/ui/editor-client/src/sass/ace.scss +0 -29
- package/src/app/ui/editor-client/src/sass/bootstrap.scss +0 -21
- package/src/app/ui/editor-client/src/sass/colors.scss +0 -78
- package/src/app/ui/editor-client/src/sass/debug.scss +0 -383
- package/src/app/ui/editor-client/src/sass/diff.scss +0 -695
- package/src/app/ui/editor-client/src/sass/dragdrop.scss +0 -37
- package/src/app/ui/editor-client/src/sass/dropdownMenu.scss +0 -93
- package/src/app/ui/editor-client/src/sass/editor.scss +0 -691
- package/src/app/ui/editor-client/src/sass/flow.scss +0 -330
- package/src/app/ui/editor-client/src/sass/forms.scss +0 -1093
- package/src/app/ui/editor-client/src/sass/header.scss +0 -524
- package/src/app/ui/editor-client/src/sass/jquery.scss +0 -152
- package/src/app/ui/editor-client/src/sass/keyboard.scss +0 -136
- package/src/app/ui/editor-client/src/sass/library.scss +0 -54
- package/src/app/ui/editor-client/src/sass/mixins.scss +0 -283
- package/src/app/ui/editor-client/src/sass/modals/modalHome.scss +0 -138
- package/src/app/ui/editor-client/src/sass/modals/modalNewProject.scss +0 -96
- package/src/app/ui/editor-client/src/sass/modals/modalNewTab.scss +0 -96
- package/src/app/ui/editor-client/src/sass/modals/modalNodeLibrary.scss +0 -131
- package/src/app/ui/editor-client/src/sass/modals/modalWelcome.scss +0 -102
- package/src/app/ui/editor-client/src/sass/notifications.scss +0 -118
- package/src/app/ui/editor-client/src/sass/palette-editor.scss +0 -275
- package/src/app/ui/editor-client/src/sass/palette.scss +0 -383
- package/src/app/ui/editor-client/src/sass/panels.scss +0 -61
- package/src/app/ui/editor-client/src/sass/popover.scss +0 -166
- package/src/app/ui/editor-client/src/sass/project-info.scss +0 -74
- package/src/app/ui/editor-client/src/sass/projects.scss +0 -875
- package/src/app/ui/editor-client/src/sass/search.scss +0 -201
- package/src/app/ui/editor-client/src/sass/sidebar.scss +0 -201
- package/src/app/ui/editor-client/src/sass/style.scss +0 -172
- package/src/app/ui/editor-client/src/sass/tab-azure.scss +0 -68
- package/src/app/ui/editor-client/src/sass/tab-cloud.scss +0 -67
- package/src/app/ui/editor-client/src/sass/tab-config.scss +0 -100
- package/src/app/ui/editor-client/src/sass/tab-context.scss +0 -54
- package/src/app/ui/editor-client/src/sass/tab-git.scss +0 -54
- package/src/app/ui/editor-client/src/sass/tab-info.scss +0 -307
- package/src/app/ui/editor-client/src/sass/tab-kumohub.scss +0 -68
- package/src/app/ui/editor-client/src/sass/tab-test.scss +0 -262
- package/src/app/ui/editor-client/src/sass/tabs.scss +0 -420
- package/src/app/ui/editor-client/src/sass/terminal.scss +0 -247
- package/src/app/ui/editor-client/src/sass/ui/common/checkboxSet.scss +0 -29
- package/src/app/ui/editor-client/src/sass/ui/common/editableList.scss +0 -81
- package/src/app/ui/editor-client/src/sass/ui/common/nodeList.scss +0 -65
- package/src/app/ui/editor-client/src/sass/ui/common/searchBox.scss +0 -78
- package/src/app/ui/editor-client/src/sass/ui/common/stack.scss +0 -26
- package/src/app/ui/editor-client/src/sass/ui/common/treeList.scss +0 -108
- package/src/app/ui/editor-client/src/sass/ui/common/typedInput.scss +0 -181
- package/src/app/ui/editor-client/src/sass/ui/common/typedInputLong.scss +0 -183
- package/src/app/ui/editor-client/src/sass/ui-settings.scss +0 -125
- package/src/app/ui/editor-client/src/sass/update-panel.scss +0 -18
- package/src/app/ui/editor-client/src/sass/userSettings.scss +0 -93
- package/src/app/ui/editor-client/src/sass/widgetStyle.scss +0 -23
- package/src/app/ui/editor-client/src/sass/workspace.scss +0 -123
- package/src/app/ui/editor-client/src/sass/workspaceToolbar.scss +0 -85
- package/src/app/ui/editor-client/src/vendor/ace/LICENSE +0 -24
- package/src/app/ui/editor-client/src/vendor/ace/ace.js +0 -17
- package/src/app/ui/editor-client/src/vendor/ace/ext-language_tools.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/ext-searchbox.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-css.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-handlebars.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-html.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-javascript.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-json.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-markdown.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-properties.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-python.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-sql.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-swift.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-text.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-xml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/mode-yaml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/css.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/handlebars.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/html.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/javascript.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/json.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/markdown.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/properties.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/python.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/sql.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/swift.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/text.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/xml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/snippets/yaml.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/theme-chrome.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/theme-tomorrow.js +0 -8
- package/src/app/ui/editor-client/src/vendor/ace/worker-css.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-html.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-javascript.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-json.js +0 -1
- package/src/app/ui/editor-client/src/vendor/ace/worker-xml.js +0 -1
- package/src/app/ui/editor-client/src/vendor/beautifyjs/beautify.min.js +0 -1
- package/src/app/ui/editor-client/src/vendor/bootstrap/css/bootstrap.css +0 -5406
- package/src/app/ui/editor-client/src/vendor/bootstrap/css/bootstrap.min.css +0 -9
- package/src/app/ui/editor-client/src/vendor/bootstrap/img/glyphicons-halflings-white.png +0 -0
- package/src/app/ui/editor-client/src/vendor/bootstrap/img/glyphicons-halflings.png +0 -0
- package/src/app/ui/editor-client/src/vendor/bootstrap/js/bootstrap.min.js +0 -6
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/active-line.js +0 -72
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/coffeescript-lint.js +0 -47
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/javascript-hint.js +0 -157
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/javascript-lint.js +0 -63
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/jshint.js +0 -29591
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/lint.css +0 -73
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/lint.js +0 -252
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/show-hint.css +0 -36
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/show-hint.js +0 -460
- package/src/app/ui/editor-client/src/vendor/code-mirror/addon/sql-hint.js +0 -304
- package/src/app/ui/editor-client/src/vendor/code-mirror/lib/codemirror.css +0 -350
- package/src/app/ui/editor-client/src/vendor/code-mirror/lib/codemirror.js +0 -9800
- package/src/app/ui/editor-client/src/vendor/code-mirror/mode/javascript.js +0 -927
- package/src/app/ui/editor-client/src/vendor/code-mirror/mode/sql.js +0 -494
- package/src/app/ui/editor-client/src/vendor/code-mirror/theme/base16-dark.css +0 -38
- package/src/app/ui/editor-client/src/vendor/code-mirror/theme/monokai.css +0 -42
- package/src/app/ui/editor-client/src/vendor/code-mirror/theme/solarized.css +0 -168
- package/src/app/ui/editor-client/src/vendor/d3/d3.v3.min.js +0 -4
- package/src/app/ui/editor-client/src/vendor/d3/d3.v4.min.js +0 -2
- package/src/app/ui/editor-client/src/vendor/d3-context-menu/d3-context-menu.css +0 -43
- package/src/app/ui/editor-client/src/vendor/d3-context-menu/d3-context-menu.js +0 -86
- package/src/app/ui/editor-client/src/vendor/easy-json-schema/index.js +0 -88
- package/src/app/ui/editor-client/src/vendor/electron-tabs/electron-tabs.js +0 -2907
- package/src/app/ui/editor-client/src/vendor/font-awesome/css/font-awesome.min.css +0 -4
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/FontAwesome.otf +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.eot +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.svg +0 -2671
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.ttf +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.woff +0 -0
- package/src/app/ui/editor-client/src/vendor/font-awesome/fonts/fontawesome-webfont.woff2 +0 -0
- package/src/app/ui/editor-client/src/vendor/i18next/i18next.min.js +0 -5
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.eot +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.svg +0 -2105
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.ttf +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.woff +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/fonts/icofont.woff2 +0 -0
- package/src/app/ui/editor-client/src/vendor/icofont/icofont.min.css +0 -7
- package/src/app/ui/editor-client/src/vendor/jqtree/jqTreeContextMenu.js +0 -98
- package/src/app/ui/editor-client/src/vendor/jqtree/jqtree.css +0 -209
- package/src/app/ui/editor-client/src/vendor/jqtree/tree.jquery.js +0 -21
- package/src/app/ui/editor-client/src/vendor/jqtree/tree.jquery.js.map +0 -1
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/animated-overlay.gif +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- package/src/app/ui/editor-client/src/vendor/jquery/css/smoothness/jquery-ui-1.10.3.custom.min.css +0 -5
- package/src/app/ui/editor-client/src/vendor/jquery/js/jquery-1.11.3.min.js +0 -5
- package/src/app/ui/editor-client/src/vendor/jquery/js/jquery-ui-1.10.3.custom.min.js +0 -7
- package/src/app/ui/editor-client/src/vendor/jquery/js/jquery.ui.touch-punch.min.js +0 -11
- package/src/app/ui/editor-client/src/vendor/jquery-contextMenu/jquery-contextMenu.css +0 -309
- package/src/app/ui/editor-client/src/vendor/jquery-contextMenu/jquery-contextMenu.js +0 -2134
- package/src/app/ui/editor-client/src/vendor/jquery-contextMenu/jquery-ui-position.js +0 -513
- package/src/app/ui/editor-client/src/vendor/jsonata/formatter.js +0 -190
- package/src/app/ui/editor-client/src/vendor/jsonata/mode-jsonata.js +0 -134
- package/src/app/ui/editor-client/src/vendor/jsonata/snippets-jsonata.js +0 -11
- package/src/app/ui/editor-client/src/vendor/jsonata/worker-jsonata.js +0 -2140
- package/src/app/ui/editor-client/src/vendor/kumologica/http-test-case.js +0 -131
- package/src/app/ui/editor-client/src/vendor/marked/marked.min.js +0 -6
- package/src/app/ui/editor-client/src/vendor/misc/toggleswitch.css +0 -181
- package/src/app/ui/editor-client/src/vendor/misc/toggleswitch.js +0 -48
- package/src/app/ui/editor-client/templates/index.mst +0 -284
- package/src/app/ui/editor-client/templates/modals/modalHome.mst +0 -107
- package/src/app/ui/editor-client/templates/modals/modalNewProject.mst +0 -104
- package/src/app/ui/editor-client/templates/modals/modalNewTab.mst +0 -78
- package/src/app/ui/editor-client/templates/modals/modalNodeLibrary.mst +0 -72
- package/src/app/ui/editor-client/templates/modals/modalWelcome.mst +0 -111
- package/src/app/util.js +0 -9
- package/src/assets/eula.txt +0 -170
- package/src/assets/icon.icns +0 -0
- package/src/assets/kumologica-app.png +0 -0
- package/src/assets/license_en.txt +0 -170
- /package/{cli/commands/test-utils → src/api/tools/test/lib}/fixtures/example3-flow.json +0 -0
- /package/{cli/commands/test-utils → src/api/tools/test/lib}/fixtures/package.json +0 -0
- /package/{cli/commands/test-utils → src/api/tools/test/lib}/fixtures/s3-event.js +0 -0
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
const { DesignerTool } = require('../base/DesignerTool');
|
|
2
|
+
const { TestCaseRunner, InMemoryReporter } = require('../test/lib/TestCaseRunner');
|
|
3
|
+
|
|
4
|
+
const DEBUGGER_PLUGIN = 'DebuggerPlugin';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
*
|
|
8
|
+
* Commands:
|
|
9
|
+
* { type: 'debugger:start', payload: { testcaseid: '2343.3434', breakpoints: {'123.1231', '1231.123'}}
|
|
10
|
+
* { type: 'debugger:continue' }
|
|
11
|
+
* { type: 'debugger:next' }
|
|
12
|
+
* { type: 'debugger:terminate' }
|
|
13
|
+
*
|
|
14
|
+
* Events:
|
|
15
|
+
* { type: 'debugger:on:trace', payload: { step: 1, type: 'input|output|error', message: {...}, vars: {} }}
|
|
16
|
+
* { type: 'debugger:on:change-state', payload: { step: 2, from: 'running', to: 'paused'}}
|
|
17
|
+
* { type: 'debugger:on:event', { status: "startFlow" });
|
|
18
|
+
*
|
|
19
|
+
* Responses:
|
|
20
|
+
* { type: 'debugger:start:response', "payload": { "testCaseExecutionTimeInMs": 1.7501250505447388, "testCaseID": "e8fb91dc.46c24", "testCaseDescription": "TestCase HelloWorld", "assertions": [... ] } }
|
|
21
|
+
*/
|
|
22
|
+
class DebuggerTool extends DesignerTool {
|
|
23
|
+
constructor(designerServer) {
|
|
24
|
+
super(designerServer);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
install() {
|
|
28
|
+
this.addEventHandler('debugger:start', this.start('debugger:start'));
|
|
29
|
+
this.addEventHandler('debugger:next', this.next('debugger:next'));
|
|
30
|
+
this.addEventHandler('debugger:continue', this.continue('debugger:continue'));
|
|
31
|
+
this.addEventHandler('debugger:terminate', this.terminate('debugger:terminate'));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
start(eventType) {
|
|
36
|
+
return async (ws, payload) => {
|
|
37
|
+
const { testcaseid, breakpoints } = payload;
|
|
38
|
+
// runtime -> tool -> sdk
|
|
39
|
+
let debuggerListener = this.debuggerEventListener(ws);
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
if (!this.isRuntimePluginInstalled(DEBUGGER_PLUGIN)) {
|
|
43
|
+
throw new Error("DebuggerPlugin not installed");
|
|
44
|
+
}
|
|
45
|
+
let pluginCommands = this.getRuntimePlugin(DEBUGGER_PLUGIN).listCommands();
|
|
46
|
+
|
|
47
|
+
// Subscribe to debugger plugin events
|
|
48
|
+
this.subscribeRuntimeListener(debuggerListener);
|
|
49
|
+
|
|
50
|
+
// Send command to get ready the debugger plugin
|
|
51
|
+
this.sendCommandToPlugin(DEBUGGER_PLUGIN, pluginCommands.ENABLE, breakpoints);
|
|
52
|
+
|
|
53
|
+
// Execute the flow as a test
|
|
54
|
+
const reporter = new InMemoryReporter();
|
|
55
|
+
const runner = new TestCaseRunner(this.flowServer, testcaseid, [reporter]);
|
|
56
|
+
await runner.runAsync();
|
|
57
|
+
let response = {
|
|
58
|
+
testCaseExecutionTimeInMs: reporter.executionTimeInMs,
|
|
59
|
+
testCaseID: reporter.testCaseID,
|
|
60
|
+
testCaseDescription: reporter.testCaseDescription,
|
|
61
|
+
assertions: reporter.assertionResults
|
|
62
|
+
}
|
|
63
|
+
this.sendResponse(ws, eventType, response);
|
|
64
|
+
|
|
65
|
+
} catch (err) {
|
|
66
|
+
console.log(err);
|
|
67
|
+
this.sendError(ws, eventType, err.message);
|
|
68
|
+
} finally {
|
|
69
|
+
this.clearRuntimeListener(debuggerListener);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
next(eventType) {
|
|
76
|
+
return async (ws, payload) => {
|
|
77
|
+
try {
|
|
78
|
+
if (!this.isRuntimePluginInstalled(DEBUGGER_PLUGIN)) {
|
|
79
|
+
throw new Error("DebuggerPlugin not installed");
|
|
80
|
+
}
|
|
81
|
+
let pluginCommands = this.getRuntimePlugin(DEBUGGER_PLUGIN).listCommands();
|
|
82
|
+
// Send command to get ready the debugger plugin
|
|
83
|
+
this.sendCommandToPlugin(DEBUGGER_PLUGIN, pluginCommands.NEXT);
|
|
84
|
+
} catch (err) {
|
|
85
|
+
console.log(err);
|
|
86
|
+
this.sendError(ws, eventType, err.message);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
continue(eventType) {
|
|
92
|
+
return async (ws, payload) => {
|
|
93
|
+
try {
|
|
94
|
+
if (!this.isRuntimePluginInstalled(DEBUGGER_PLUGIN)) {
|
|
95
|
+
throw new Error("DebuggerPlugin not installed");
|
|
96
|
+
}
|
|
97
|
+
let pluginCommands = this.getRuntimePlugin(DEBUGGER_PLUGIN).listCommands();
|
|
98
|
+
// Send command to get ready the debugger plugin
|
|
99
|
+
this.sendCommandToPlugin(DEBUGGER_PLUGIN, pluginCommands.CONTINUE);
|
|
100
|
+
} catch (err) {
|
|
101
|
+
console.log(err);
|
|
102
|
+
this.sendError(ws, eventType, err.message);
|
|
103
|
+
}
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
terminate(eventType) {
|
|
108
|
+
return async (ws, payload) => {
|
|
109
|
+
try {
|
|
110
|
+
if (!this.isRuntimePluginInstalled(DEBUGGER_PLUGIN)) {
|
|
111
|
+
throw new Error("DebuggerPlugin not installed");
|
|
112
|
+
}
|
|
113
|
+
let pluginCommands = this.getRuntimePlugin(DEBUGGER_PLUGIN).listCommands();
|
|
114
|
+
// Send command to get ready the debugger plugin
|
|
115
|
+
this.sendCommandToPlugin(DEBUGGER_PLUGIN, pluginCommands.TERMINATE);
|
|
116
|
+
} catch (err) {
|
|
117
|
+
console.log(err);
|
|
118
|
+
this.sendError(ws, eventType, err.message);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
debuggerEventListener(ws) {
|
|
124
|
+
return (event) => {
|
|
125
|
+
let payload = event.payload;
|
|
126
|
+
|
|
127
|
+
switch (event.id) {
|
|
128
|
+
case 'runtime-event://debuggerPlugin/startFlow':
|
|
129
|
+
this.sendEvent(ws, 'debugger:on:event', { status: "startFlow" });
|
|
130
|
+
break;
|
|
131
|
+
case 'runtime-event://debuggerPlugin/endFlow':
|
|
132
|
+
this.sendEvent(ws, 'debugger:on:event', { status: "endFlow" });
|
|
133
|
+
break;
|
|
134
|
+
case 'runtime-event://debuggerPlugin/errorFlow':
|
|
135
|
+
this.sendEvent(ws, 'debugger:on:event', { status: "errorFlow" });
|
|
136
|
+
break;
|
|
137
|
+
|
|
138
|
+
case 'runtime-event://debuggerPlugin/startNode':
|
|
139
|
+
case 'runtime-event://debuggerPlugin/endNode':
|
|
140
|
+
case 'runtime-event://debuggerPlugin/errorNode':
|
|
141
|
+
this.sendEvent(ws, 'debugger:on:trace', payload);
|
|
142
|
+
break;
|
|
143
|
+
|
|
144
|
+
case 'runtime-event://debuggerPlugin/changeState':
|
|
145
|
+
this.sendEvent(ws, 'debugger:on:change-state', payload);
|
|
146
|
+
break;
|
|
147
|
+
default:
|
|
148
|
+
// do nothing
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
// NOT NEEDED YET
|
|
155
|
+
// genNextUniqueId(node, testcaseid) {
|
|
156
|
+
// let uniqueExecutionNodeId;
|
|
157
|
+
// let id = node.id;
|
|
158
|
+
// // check if node.id has not yet injected with unique runtime id
|
|
159
|
+
// if (!id.includes('::')){
|
|
160
|
+
// uniqueExecutionNodeId = `${testcaseid}::${node.id}::0`;
|
|
161
|
+
// } else{
|
|
162
|
+
// // Replace the testcase id for current one, if still carries the old one
|
|
163
|
+
// let idTokenized = id.split('::');
|
|
164
|
+
// let prevTestCaseId = idTokenized[0];
|
|
165
|
+
// let prevNodeId = idTokenized[1];
|
|
166
|
+
// let prevExecutionId = idTokenized[2];
|
|
167
|
+
|
|
168
|
+
// if (prevTestCaseId !== testcaseid) {
|
|
169
|
+
// id = `${testcaseid}::${prevNodeId}::${prevExecutionId}`
|
|
170
|
+
// }
|
|
171
|
+
|
|
172
|
+
// // if it has iterate over the executionId (last part of the unique runtime id)
|
|
173
|
+
|
|
174
|
+
// let posExecId = id.lastIndexOf('::');
|
|
175
|
+
// let prefixId = id.substr(0, posExecId);
|
|
176
|
+
// let executionId = parseInt(id.substr(posExecId + 2));
|
|
177
|
+
|
|
178
|
+
// uniqueExecutionNodeId = `${prefixId}::${executionId}`;
|
|
179
|
+
// while (uniqueExecutionNodeId in this._cache) {
|
|
180
|
+
// executionId = executionId + 1;
|
|
181
|
+
// uniqueExecutionNodeId = `${prefixId}::${executionId}`;
|
|
182
|
+
// }
|
|
183
|
+
// }
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
// return uniqueExecutionNodeId;
|
|
187
|
+
// }
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
module.exports = {
|
|
192
|
+
DebuggerTool
|
|
193
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
const { DesignerTool } = require("../base/DesignerTool");
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* FileManagerTool
|
|
5
|
+
* A cloud designer tool responsible to facilitate the sync of files between the frontend and the local filesystem.
|
|
6
|
+
* This tool will support the following operations: rename, update, add and delete files.
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
class FileManagerTool extends DesignerTool {
|
|
10
|
+
constructor(designerServer) {
|
|
11
|
+
super(designerServer);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
install() {
|
|
15
|
+
/**
|
|
16
|
+
* { "type": "filemanager:pull" }
|
|
17
|
+
*/
|
|
18
|
+
this.addEventHandler('filemanager:pull', this.executePull('filemanager:pull'));
|
|
19
|
+
/**
|
|
20
|
+
* { "type": "filemanager:push",
|
|
21
|
+
* "payload": { ... }}
|
|
22
|
+
*/
|
|
23
|
+
this.addEventHandler('filemanager:push', this.executePush('filemanager:push'));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* Invoked by the client to get the project structure on the server (localfilesystem).
|
|
28
|
+
* @param {string} - eventType: "filemanager:pull"
|
|
29
|
+
*/
|
|
30
|
+
executePull(eventType) {
|
|
31
|
+
/**
|
|
32
|
+
* @param {ws} - client websocket
|
|
33
|
+
* @returns {Object} - response
|
|
34
|
+
* :: Example
|
|
35
|
+
* {
|
|
36
|
+
* 'flow': '/project-directory/simple-flow.json',
|
|
37
|
+
* 'files': {
|
|
38
|
+
* '/project-directory': {
|
|
39
|
+
* '.kumologica': {
|
|
40
|
+
* 'editor.json': <content>
|
|
41
|
+
* '.kumologica-ignore: "build \n",
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* 'simple-flow.json': <content>,
|
|
45
|
+
* 'config.json': <content>,
|
|
46
|
+
* 'package.json': <content>
|
|
47
|
+
* }
|
|
48
|
+
* }
|
|
49
|
+
*
|
|
50
|
+
* }
|
|
51
|
+
*/
|
|
52
|
+
return async (ws, payload) => {
|
|
53
|
+
try {
|
|
54
|
+
const response = this.flowServer.runtime.storage.getProjectStructure();
|
|
55
|
+
this.sendResponse(ws, eventType, response);
|
|
56
|
+
} catch (err) {
|
|
57
|
+
console.log(err);
|
|
58
|
+
this.sendError(ws, eventType, "An error ocurred while pulling project directory from the server");
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Invoked by the client to send the project structure updates into the server.
|
|
65
|
+
* @param {string} - eventType: "filemanager:push"
|
|
66
|
+
*/
|
|
67
|
+
executePush(eventType) {
|
|
68
|
+
/**
|
|
69
|
+
* @param {ws} - client websocket
|
|
70
|
+
* @param {Object} payload - request's payload
|
|
71
|
+
* @param {}
|
|
72
|
+
* :: Example
|
|
73
|
+
* {[
|
|
74
|
+
* {
|
|
75
|
+
* operation: "add_file",
|
|
76
|
+
* path: "/project-directory",
|
|
77
|
+
* filename: "secret.pem",
|
|
78
|
+
* content: <content>
|
|
79
|
+
* },
|
|
80
|
+
* {
|
|
81
|
+
* operation: "delete_file",
|
|
82
|
+
* path: "/project-directory",
|
|
83
|
+
* filename: "secret.pem"
|
|
84
|
+
* },
|
|
85
|
+
* {
|
|
86
|
+
* operation: "update_file",
|
|
87
|
+
* path: "/project-directory",
|
|
88
|
+
* filename: "secret.pem",
|
|
89
|
+
* content: <content>
|
|
90
|
+
* },
|
|
91
|
+
* {
|
|
92
|
+
* operation: "rename_file",
|
|
93
|
+
* path: "/project-directory",
|
|
94
|
+
* filename: "secret.pem",
|
|
95
|
+
* newFileName: "keys.pem"
|
|
96
|
+
* },
|
|
97
|
+
* {
|
|
98
|
+
* operation: "add_folder",
|
|
99
|
+
* path: "/project-directory/new-folder",
|
|
100
|
+
* },
|
|
101
|
+
* {
|
|
102
|
+
* operation: "remove_folder",
|
|
103
|
+
* path: "/project-directory/old-folder",
|
|
104
|
+
* },
|
|
105
|
+
* {
|
|
106
|
+
* operation: "rename_folder",
|
|
107
|
+
* path: "/project-directory/old-folder",
|
|
108
|
+
* newPath: "/project-directory/new-folder",
|
|
109
|
+
* },
|
|
110
|
+
|
|
111
|
+
* ]}
|
|
112
|
+
*/
|
|
113
|
+
return async (ws, payload) => {
|
|
114
|
+
try {
|
|
115
|
+
const response = await this.flowServer.runtime.storage.fileOperation(payload);
|
|
116
|
+
this.sendResponse(ws, eventType, response);
|
|
117
|
+
} catch (err) {
|
|
118
|
+
console.log(err);
|
|
119
|
+
this.sendError(ws, eventType, err.message);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
module.exports = {
|
|
126
|
+
FileManagerTool
|
|
127
|
+
}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
const { DesignerTool } = require("../base/DesignerTool");
|
|
2
|
+
const simpleGit = require('simple-git');
|
|
3
|
+
|
|
4
|
+
class GitTool extends DesignerTool {
|
|
5
|
+
constructor(designerServer) {
|
|
6
|
+
super(designerServer);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
install() {
|
|
10
|
+
/**
|
|
11
|
+
* { "type": "git:status"}
|
|
12
|
+
*/
|
|
13
|
+
this.addEventHandler('git:status', this.executeGitStatus('git:status'));
|
|
14
|
+
/**
|
|
15
|
+
* { "type": "git:add-and-commit",
|
|
16
|
+
* "payload": { "commit": "commit message..." }}
|
|
17
|
+
*/
|
|
18
|
+
this.addEventHandler('git:add-and-commit', this.executeAddAndCommit('git:add-and-commit'));
|
|
19
|
+
/**
|
|
20
|
+
* { "type": "git:push-origin"
|
|
21
|
+
* "payload": {
|
|
22
|
+
* proxy: "http://my-annoying-proxy" // optional
|
|
23
|
+
* }
|
|
24
|
+
* }
|
|
25
|
+
*/
|
|
26
|
+
this.addEventHandler('git:push-origin', this.executePushOrigin('git:push-origin'));
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
gitCommand(options) {
|
|
31
|
+
const { proxy } = options || {};
|
|
32
|
+
|
|
33
|
+
// base options
|
|
34
|
+
let gitOptions = {
|
|
35
|
+
baseDir: this.flowServer.serverSettings.projectDir,
|
|
36
|
+
binary: 'git',
|
|
37
|
+
maxConcurrentProcesses: 6,
|
|
38
|
+
trimmed: false
|
|
39
|
+
}
|
|
40
|
+
// proxy included?
|
|
41
|
+
if (proxy) {
|
|
42
|
+
gitOptions = { ...gitOptions, config: [`http.proxy=${proxy}`] }
|
|
43
|
+
}
|
|
44
|
+
return simpleGit(gitOptions);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
executeGitStatus(eventType) {
|
|
48
|
+
return async (ws, payload) => {
|
|
49
|
+
try {
|
|
50
|
+
const git = this.gitCommand();
|
|
51
|
+
let status = await git.status(); //['-', 'sb'] // newStatus = {ahead, behind, current, tracking};
|
|
52
|
+
this.sendResponse(ws, eventType, { status });
|
|
53
|
+
} catch (err) {
|
|
54
|
+
this.sendError(ws, eventType, "The current project directory is not a Git repository. Please initialize Git in this directory.");
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
executeAddAndCommit(eventType) {
|
|
60
|
+
return async (ws, payload) => {
|
|
61
|
+
try {
|
|
62
|
+
const { commit } = payload;
|
|
63
|
+
if (!commit) {
|
|
64
|
+
throw new Error('Commit message cannot be empty')
|
|
65
|
+
}
|
|
66
|
+
const git = this.gitCommand();
|
|
67
|
+
const resp = await git.add('./*').commit(commit);
|
|
68
|
+
this.sendResponse(ws, eventType, { resp });
|
|
69
|
+
} catch (err) {
|
|
70
|
+
this.sendError(ws, eventType, err.message);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
executePushOrigin(eventType) {
|
|
76
|
+
return async (ws, payload) => {
|
|
77
|
+
try {
|
|
78
|
+
const { proxy } = payload;
|
|
79
|
+
const git = this.gitCommand({ proxy });
|
|
80
|
+
let currentBranch = await this.readCurrentBranch();
|
|
81
|
+
const resp = await git.push('origin', currentBranch);
|
|
82
|
+
this.sendResponse(ws, eventType, { resp });
|
|
83
|
+
} catch (e) {
|
|
84
|
+
this.sendError(ws, eventType, err.message);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
async readCurrentBranch() {
|
|
90
|
+
try {
|
|
91
|
+
const git = this.gitCommand();
|
|
92
|
+
const localBranches = await git.branchLocal();
|
|
93
|
+
return localBranches.current;
|
|
94
|
+
} catch (err) {
|
|
95
|
+
throw err;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
module.exports = {
|
|
102
|
+
GitTool
|
|
103
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
const { TestTool } = require('./test');
|
|
2
|
+
const { CoreTools } = require('./core');
|
|
3
|
+
const { DebuggerTool } = require('./debugger');
|
|
4
|
+
const { GitTool } = require('./git');
|
|
5
|
+
const { FileManagerTool } = require('./filemanager');
|
|
6
|
+
|
|
7
|
+
module.exports = {
|
|
8
|
+
CoreTools,
|
|
9
|
+
TestTool,
|
|
10
|
+
DebuggerTool,
|
|
11
|
+
GitTool,
|
|
12
|
+
FileManagerTool
|
|
13
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
const { DesignerTool } = require('../base/DesignerTool');
|
|
2
|
+
const { TestCaseRunner, InMemoryReporter } = require('./lib/TestCaseRunner');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class TestTool extends DesignerTool {
|
|
6
|
+
constructor(designServer) {
|
|
7
|
+
super(designServer);
|
|
8
|
+
}
|
|
9
|
+
install() {
|
|
10
|
+
/**
|
|
11
|
+
* { type: 'test:run',
|
|
12
|
+
* payload: { testcaseid: '123432.34343'} }
|
|
13
|
+
*/
|
|
14
|
+
this.addEventHandler('test:run', this.executeTestRunAction('test:run'));
|
|
15
|
+
this.addEventHandler('test:findTestCases', this.executeTestFindTestCasesAction('test:findTestCases'));
|
|
16
|
+
}
|
|
17
|
+
executeTestRunAction(eventType) {
|
|
18
|
+
return async (ws, payload) => {
|
|
19
|
+
const { testcaseid } = payload || {};
|
|
20
|
+
const reporter = new InMemoryReporter();
|
|
21
|
+
const runner = new TestCaseRunner(this.flowServer, testcaseid, [reporter]);
|
|
22
|
+
try {
|
|
23
|
+
await runner.runAsync();
|
|
24
|
+
|
|
25
|
+
let response = {
|
|
26
|
+
testCaseExecutionTimeInMs: reporter.executionTimeInMs,
|
|
27
|
+
testCaseID: reporter.testCaseID,
|
|
28
|
+
testCaseDescription: reporter.testCaseDescription,
|
|
29
|
+
assertions: reporter.assertionResults,
|
|
30
|
+
flowResponse: reporter.flowResponse
|
|
31
|
+
}
|
|
32
|
+
this.sendResponse(ws, eventType, response);
|
|
33
|
+
|
|
34
|
+
} catch (err) {
|
|
35
|
+
this.sendError(ws, eventType, err.message);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
executeTestFindTestCasesAction(eventType) {
|
|
42
|
+
return async (ws, payload) => {
|
|
43
|
+
const flowApp = this.flowServer.nodes.getFlows();
|
|
44
|
+
let testNodes = []
|
|
45
|
+
if (flowApp && flowApp.flows && flowApp.flows.length > 0) {
|
|
46
|
+
testNodes = flowApp.flows.filter((node)=> node.type.toLowerCase() === 'httptestcase' || node.type.toLowerCase() ==='testcase')
|
|
47
|
+
}
|
|
48
|
+
this.sendResponse(ws, eventType, testNodes);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
module.exports = {
|
|
55
|
+
TestTool
|
|
56
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
const got = require('got');
|
|
2
|
+
const { performance } = require('perf_hooks');
|
|
3
|
+
const { EventEmitter } = require('events').EventEmitter;
|
|
4
|
+
|
|
5
|
+
const { TerminalReporter, InMemoryReporter } = require('./reporters');
|
|
6
|
+
|
|
7
|
+
const TESTCASE_SIGNALS = {
|
|
8
|
+
TESTCASE_STOP: '__testrunner-stop__',
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
class TestCaseRunner {
|
|
12
|
+
constructor(flowServer, testCaseId, testReporters) {
|
|
13
|
+
this.flowServer = flowServer;
|
|
14
|
+
this.testCaseId = testCaseId;
|
|
15
|
+
this.testReporters = testReporters;
|
|
16
|
+
|
|
17
|
+
// Measuring the execution time
|
|
18
|
+
this.timeTestCaseStart = null;
|
|
19
|
+
this.timeTestCaseEnd = null;
|
|
20
|
+
|
|
21
|
+
// Managing runtime events
|
|
22
|
+
this.runtimeEventEmitter = this.flowServer.events;
|
|
23
|
+
|
|
24
|
+
// Signal the start/end of testcase execution
|
|
25
|
+
this.testCaseRunnerEmitter = new EventEmitter();
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
subscribeRuntimeEvents() {
|
|
30
|
+
let runtimeEventTypes = this.flowServer.eventTypes;
|
|
31
|
+
|
|
32
|
+
this.runtimeEventEmitter.on('runtime-event', async (data) => {
|
|
33
|
+
let p = data.payload;
|
|
34
|
+
|
|
35
|
+
// Attributes from p.testCaseResults
|
|
36
|
+
let testCaseID;
|
|
37
|
+
let testCaseDescription;
|
|
38
|
+
let target; // flow:*
|
|
39
|
+
let targetOutput; // { response: {}, error: {}},
|
|
40
|
+
let assertionResults; // [...]
|
|
41
|
+
let error;
|
|
42
|
+
|
|
43
|
+
switch (data.id) {
|
|
44
|
+
case runtimeEventTypes.TEST_TESTCASE_START:
|
|
45
|
+
this.timeTestCaseStart = performance.now();
|
|
46
|
+
({ testCaseID, testCaseDescription } = p.testCaseResults);
|
|
47
|
+
this.testReporters.map(reporter => reporter.handleStart(testCaseID, testCaseDescription));
|
|
48
|
+
break;
|
|
49
|
+
case runtimeEventTypes.TEST_TESTCASE_END:
|
|
50
|
+
case runtimeEventTypes.TEST_TESTCASE_END_WITH_ERROR:
|
|
51
|
+
this.timeTestCaseEnd = performance.now();
|
|
52
|
+
({ testCaseID, testCaseDescription, target, assertionResults, error, targetOutput } = p.testCaseResults); // targetOutput.response: { statusCode, headers, body } }
|
|
53
|
+
this.testReporters.map(reporter => reporter.handleResult(testCaseID, testCaseDescription, target, assertionResults, error, this.timeTestCaseStart, this.timeTestCaseEnd, targetOutput));
|
|
54
|
+
this.testCaseRunnerEmitter.emit(TESTCASE_SIGNALS.TESTCASE_STOP);
|
|
55
|
+
break;
|
|
56
|
+
default:
|
|
57
|
+
// do nothing
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
async runAsync() {
|
|
65
|
+
return new Promise(async (resolve, reject) => {
|
|
66
|
+
// Subscribe to the runtime events
|
|
67
|
+
this.subscribeRuntimeEvents();
|
|
68
|
+
// Wait for the end of the testcase execution
|
|
69
|
+
this.testCaseRunnerEmitter.on(TESTCASE_SIGNALS.TESTCASE_STOP, () => {
|
|
70
|
+
resolve();
|
|
71
|
+
});
|
|
72
|
+
try {
|
|
73
|
+
// Trigger the execution of the testcase
|
|
74
|
+
await this.invokeTest(this.testCaseId);
|
|
75
|
+
} catch (err) {
|
|
76
|
+
if (err.response.statusCode === 404 &&
|
|
77
|
+
err.response.body === '{"errorMessage":"Targeted node not found"}') {
|
|
78
|
+
reject(new Error('TestCaseID not found'));
|
|
79
|
+
} else {
|
|
80
|
+
resolve();
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
})
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async invokeTest(testCaseId) {
|
|
89
|
+
let resp = await got({
|
|
90
|
+
url: `http://127.0.0.1:${this.flowServer.settings.port}`,
|
|
91
|
+
method: 'POST',
|
|
92
|
+
headers: { 'x-kumologica-testcasenode': `${testCaseId}` },
|
|
93
|
+
});
|
|
94
|
+
return resp;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
module.exports = {
|
|
101
|
+
TestCaseRunner,
|
|
102
|
+
// Reporters
|
|
103
|
+
TerminalReporter,
|
|
104
|
+
InMemoryReporter
|
|
105
|
+
}
|