@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,120 @@
|
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const log = console.log;
|
|
3
|
+
|
|
4
|
+
const STATUS_PASSED = 'passed';
|
|
5
|
+
const STATUS_FAILED = 'failed';
|
|
6
|
+
|
|
7
|
+
class TestReporter {
|
|
8
|
+
handleStart(testCaseID, testCaseDescription) { /* TO BE IMPLEMENTED */ }
|
|
9
|
+
handleResult(testCaseID, testCaseDescription, target, assertionResults, error, timeStart, timeEnd, targetOutput) { /* TO BE IMPLEMENTED */ }
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
class InMemoryReporter extends TestReporter {
|
|
13
|
+
handleStart(testCaseID, testCaseDescription) {
|
|
14
|
+
this.testCaseID = testCaseID;
|
|
15
|
+
this.testCaseDescription = testCaseDescription;
|
|
16
|
+
}
|
|
17
|
+
handleResult(testCaseID, testCaseDescription, target, assertionResults, error, timeStart, timeEnd, targetOutput) {
|
|
18
|
+
this.assertionResults = assertionResults.map(({ status, description, diffReported }) => ({
|
|
19
|
+
status,
|
|
20
|
+
description,
|
|
21
|
+
diffReported
|
|
22
|
+
}));
|
|
23
|
+
this.executionTimeInMs = timeEnd - timeStart;
|
|
24
|
+
this.flowResponse = targetOutput.response;
|
|
25
|
+
}
|
|
26
|
+
isFailedStatus() {
|
|
27
|
+
let failedAssertions = this.assertionResults.filter(ar => ar.status === STATUS_FAILED);
|
|
28
|
+
return failedAssertions.length >= 1;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
class TerminalReporter extends TestReporter {
|
|
33
|
+
handleStart(testCaseID, testCaseDescription) {
|
|
34
|
+
//console.log(`TestCase started: ${testCaseID} - ${testCaseDescription}`);
|
|
35
|
+
}
|
|
36
|
+
handleResult(testCaseID, testCaseDescription, target, assertionResults, error, timeStart, timeEnd, targetOutput) {
|
|
37
|
+
// Print header
|
|
38
|
+
this.printTestCaseHeader(testCaseDescription, target);
|
|
39
|
+
|
|
40
|
+
// Print assertions
|
|
41
|
+
this.printTestAssertionResult(assertionResults || []);
|
|
42
|
+
|
|
43
|
+
// Print status
|
|
44
|
+
if (!error) {
|
|
45
|
+
this.printTestCaseStatus(assertionResults);
|
|
46
|
+
} else {
|
|
47
|
+
this.printTestCaseWithError(testCaseDescription, target, error);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
printTestCaseHeader(description, target) {
|
|
52
|
+
let prettyName = `${description}`; // mvp: only full flow being targeted > ${target}
|
|
53
|
+
const sep = '=';
|
|
54
|
+
let underline = sep.repeat(prettyName.length);
|
|
55
|
+
let headerLine = `- ${prettyName}\n ${underline}`;
|
|
56
|
+
log(chalk.cyan(headerLine));
|
|
57
|
+
log(` Results:`);
|
|
58
|
+
}
|
|
59
|
+
printTestAssertionResult(assertionResults) {
|
|
60
|
+
// Print Assertions
|
|
61
|
+
if (assertionResults.length === 0) {
|
|
62
|
+
log(chalk.dim(` (No assertions found)`));
|
|
63
|
+
} else {
|
|
64
|
+
assertionResults.map((ar, index) => {
|
|
65
|
+
this.printTestAssertion(ar, index);
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
printTestAssertion(ar, index) {
|
|
70
|
+
// console.log('Assertion:', ar)
|
|
71
|
+
let { description, selector, property, comparison, valueExpected, diffReported } = ar;
|
|
72
|
+
let status = diffReported ? STATUS_FAILED : STATUS_PASSED;
|
|
73
|
+
let icon;
|
|
74
|
+
if (status === STATUS_FAILED) {
|
|
75
|
+
icon = chalk.red('\u2716'); // cross mark
|
|
76
|
+
} else {
|
|
77
|
+
icon = chalk.green(`\u2713`); // tick
|
|
78
|
+
}
|
|
79
|
+
// Description
|
|
80
|
+
let descriptionName;
|
|
81
|
+
if (description && description.length > 0) {
|
|
82
|
+
descriptionName = description;
|
|
83
|
+
} else {
|
|
84
|
+
descriptionName = `${selector} - ${property} - ${comparison} - ${valueExpected}`;
|
|
85
|
+
}
|
|
86
|
+
let prettyName = ` ${index}. ${icon} ${descriptionName}`;
|
|
87
|
+
if (diffReported) {
|
|
88
|
+
prettyName = `${prettyName}
|
|
89
|
+
Diff report:\n${chalk.red(JSON.stringify(diffReported, null, 2))}`;
|
|
90
|
+
}
|
|
91
|
+
log(prettyName);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
printTestCaseStatus(assertionResults) {
|
|
95
|
+
// See if any assertion has failed
|
|
96
|
+
let failedAssertions = assertionResults.filter(ar => ar.status === STATUS_FAILED);
|
|
97
|
+
let failedTestCase = failedAssertions.length >= 1 ? true : false;
|
|
98
|
+
// Print it nicely
|
|
99
|
+
let coloredStatus;
|
|
100
|
+
if (failedTestCase) {
|
|
101
|
+
coloredStatus = chalk.bgRed.white(` Failed `);
|
|
102
|
+
} else {
|
|
103
|
+
coloredStatus = chalk.bgGreen.white(` Passed `);
|
|
104
|
+
}
|
|
105
|
+
log(` Status: ${coloredStatus}\n`);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
printTestCaseWithError(testCaseDescription, target, error) {
|
|
109
|
+
// Print header
|
|
110
|
+
this.printTestCaseHeader(testCaseDescription, target);
|
|
111
|
+
log(` ERROR: ${error}`);
|
|
112
|
+
log(` Status: ${chalk.bgRed.white(` Failed `)}\n`);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
module.exports = {
|
|
118
|
+
TerminalReporter,
|
|
119
|
+
InMemoryReporter
|
|
120
|
+
}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
const {
|
|
2
|
+
AbstractServerfulServer,
|
|
3
|
+
ConfigBuilder,
|
|
4
|
+
PLATFORMS
|
|
5
|
+
} = require('@kumologica/runtime');
|
|
6
|
+
|
|
7
|
+
const { WebSocket } = require('ws');
|
|
8
|
+
const url = require('url');
|
|
9
|
+
const dotenv = require('dotenv');
|
|
10
|
+
const AdminServerApi = require('../api/core/rest');
|
|
11
|
+
const Tools = require('../api/tools');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* This class will encapsulate the adminApp and FlowApp into two servers.
|
|
15
|
+
* It will be the one running on the development box of the user (either local or remote),
|
|
16
|
+
* and it will serve all the functioanlity to the Kumologica Cloud Editor.
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
class DesignerServer {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @param {string} flow - path of the flowFile. It supports relative and absolute paths. If flow does not exist, the process will be exited.
|
|
23
|
+
* @param {boolean} safe - create an empty shell of a project in the event that the flow file is not created.
|
|
24
|
+
* @param {object} cliParams -
|
|
25
|
+
*/
|
|
26
|
+
constructor(flowPath, safe, cliParams) {
|
|
27
|
+
// WebSocket based admin server
|
|
28
|
+
this.wss = null;
|
|
29
|
+
this.subscribers = {}; // collection of all eventTypes, actions attached to the ws admin api
|
|
30
|
+
|
|
31
|
+
if (!flowPath) {
|
|
32
|
+
console.log(
|
|
33
|
+
'[ERROR] Flow is not defined. Make sure you pass the flow file to the constructor of FlowBuilder'
|
|
34
|
+
);
|
|
35
|
+
os.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
this.config = ConfigBuilder.getInstance().buildConfig(
|
|
39
|
+
flowPath,
|
|
40
|
+
PLATFORMS.LOCAL,
|
|
41
|
+
cliParams
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
this.flowServer = new AbstractServerfulServer(this.config);
|
|
45
|
+
|
|
46
|
+
if (this.config.adminEnabled) {
|
|
47
|
+
//this.adminServer = AdminServerApi.init(this.flowServer.runtime._);
|
|
48
|
+
this.installTools();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
installTools() {
|
|
55
|
+
new Tools.CoreTools(this).install();
|
|
56
|
+
new Tools.TestTool(this).install();
|
|
57
|
+
new Tools.DebuggerTool(this).install();
|
|
58
|
+
new Tools.GitTool(this).install();
|
|
59
|
+
new Tools.FileManagerTool(this).install();
|
|
60
|
+
// new AWSTool(this).install();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async listen() {
|
|
64
|
+
await this.flowServer.start();
|
|
65
|
+
this.flowServer.log.debug(`Runtime Configuration:${JSON.stringify(this.config, null, 2)}`);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async listenAdminServer() {
|
|
69
|
+
if (this.config.adminEnabled) {
|
|
70
|
+
// this.adminServer.listen(this.config.adminPort);
|
|
71
|
+
this.wss = new WebSocket.Server({ port: this.config.adminPort });
|
|
72
|
+
this.wss.on('connection', (ws, req) => {
|
|
73
|
+
// ws://localhost:1990?token=xxxxxxxx
|
|
74
|
+
let token = url.parse(req.url, true).query.token;
|
|
75
|
+
if (token !== 'supersecret') {
|
|
76
|
+
ws.terminate();
|
|
77
|
+
}
|
|
78
|
+
// TODO: Check the security to set up the connection
|
|
79
|
+
// otherwise ws.terminate()
|
|
80
|
+
this.flowServer.log.info(`Client connected to the Admin WebSocket API successfully`);
|
|
81
|
+
ws.on('message', (message) => {
|
|
82
|
+
this.handleMessage(ws, message);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
ws.on('close', () => {
|
|
86
|
+
console.log('WebSocket client disconnected');
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
handleMessage(ws, message) {
|
|
94
|
+
try {
|
|
95
|
+
const data = JSON.parse(message.toString('utf8'));
|
|
96
|
+
|
|
97
|
+
if (data.type && this.subscribers[data.type]) {
|
|
98
|
+
this.subscribers[data.type].forEach((subscriber) => {
|
|
99
|
+
subscriber.action(ws, data.payload);
|
|
100
|
+
});
|
|
101
|
+
} else {
|
|
102
|
+
throw new Error('Invalid event format received');
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
} catch (err) {
|
|
106
|
+
|
|
107
|
+
let response = {
|
|
108
|
+
type: 'error',
|
|
109
|
+
payload: {
|
|
110
|
+
reason: err.message
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
ws.send(JSON.stringify(response))
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
/**
|
|
118
|
+
* Used by the designer tools to register their ws api actions
|
|
119
|
+
* @param {*} eventType
|
|
120
|
+
* @param {*} action
|
|
121
|
+
*/
|
|
122
|
+
registerEvent(eventType, action) {
|
|
123
|
+
if (!this.subscribers[eventType]) {
|
|
124
|
+
this.subscribers[eventType] = [];
|
|
125
|
+
}
|
|
126
|
+
this.subscribers[eventType].push({ action });
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
getFlowServer() {
|
|
131
|
+
return this.flowServer;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
getAdminServer() {
|
|
135
|
+
return this.adminServer;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
module.exports = {
|
|
140
|
+
DesignerServer,
|
|
141
|
+
};
|
package/cli/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
const EventEmitter = require('events').EventEmitter;
|
|
2
|
-
const { performance } = require('perf_hooks');
|
|
3
|
-
const fs = require('fs');
|
|
4
|
-
const path = require('path');
|
|
5
|
-
const chalk = require('chalk');
|
|
6
|
-
const { error } = require('./util/output');
|
|
7
|
-
const got = require('got');
|
|
8
|
-
const log = console.log;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const runtimeEvents = {
|
|
12
|
-
TEST_TESTSUITE_START: 'test:testsuite-start',
|
|
13
|
-
TEST_TESTSUITE_END: 'test:testsuite-end',
|
|
14
|
-
TEST_TESTCASE_START: 'test:testcase-start',
|
|
15
|
-
TEST_TESTCASE_END: 'test:testcase-end',
|
|
16
|
-
TEST_TESTCASE_END_WITH_ERROR: 'test:testcase-end-with-error',
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
const internalEvents = {
|
|
20
|
-
TEST_RUNNER_STOP: '__testrunner-stop__',
|
|
21
|
-
};
|
|
22
|
-
|
|
23
|
-
// Keep the counter of testcases to wait before sending signal to stop the testsuite
|
|
24
|
-
let remainingTestCases = 0;
|
|
25
|
-
|
|
26
|
-
const STATUS_PASSED = 'passed';
|
|
27
|
-
const STATUS_FAILED = 'failed';
|
|
28
|
-
|
|
29
|
-
class TestCase {
|
|
30
|
-
constructor(testCaseId, testCaseDescription, testCaseTarget) {
|
|
31
|
-
this._testCaseId = testCaseId;
|
|
32
|
-
this._testCaseDescription = testCaseDescription;
|
|
33
|
-
this._testCaseTarget = testCaseTarget;
|
|
34
|
-
this._assertionResults = [];
|
|
35
|
-
this._status = STATUS_PASSED;
|
|
36
|
-
}
|
|
37
|
-
attachAssertions(assertions) {
|
|
38
|
-
this._assertionResults = assertions;
|
|
39
|
-
if (this._assertionResults){
|
|
40
|
-
let failedAssertions = this._assertionResults.filter(ar => ar.status === STATUS_FAILED);
|
|
41
|
-
if (failedAssertions.length >= 1){
|
|
42
|
-
this._status = STATUS_FAILED;
|
|
43
|
-
} else {
|
|
44
|
-
this._status = STATUS_PASSED;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
} else {
|
|
48
|
-
this._status = STATUS_PASSED;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
class TestReporter {
|
|
55
|
-
constructor(runtimeEventEmitter) {
|
|
56
|
-
this._testReporterEmitter = new EventEmitter();
|
|
57
|
-
this._runtimeEventEmitter = runtimeEventEmitter;
|
|
58
|
-
this._testCases = [];
|
|
59
|
-
this._runningTestCase = null;
|
|
60
|
-
// Measuring the execution time
|
|
61
|
-
this._timeStartTestSuite = null;
|
|
62
|
-
this._timeEndTestSuite = null;
|
|
63
|
-
this.subscribeRuntimeEvents();
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
get emitter() {
|
|
67
|
-
return this._testReporterEmitter;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
subscribeRuntimeEvents() {
|
|
71
|
-
this._runtimeEventEmitter.on('runtime-event', async (data) => {
|
|
72
|
-
//console.log('TestReporter has received a runtime-event', data);
|
|
73
|
-
let p = data.payload;
|
|
74
|
-
|
|
75
|
-
switch (data.id) {
|
|
76
|
-
case runtimeEvents.TEST_TESTSUITE_START:
|
|
77
|
-
this._timeStartTestSuite = performance.now();
|
|
78
|
-
break;
|
|
79
|
-
case runtimeEvents.TEST_TESTSUITE_END:
|
|
80
|
-
this._timeEndTestSuite = performance.now();
|
|
81
|
-
this.printSummary();
|
|
82
|
-
break;
|
|
83
|
-
|
|
84
|
-
case runtimeEvents.TEST_TESTCASE_START:
|
|
85
|
-
let tcr = p.testCaseResults;
|
|
86
|
-
let testCase = new TestCase(
|
|
87
|
-
tcr.testCaseID,
|
|
88
|
-
tcr.testCaseDescription,
|
|
89
|
-
tcr.target
|
|
90
|
-
);
|
|
91
|
-
this.addTestCase(testCase);
|
|
92
|
-
// this.printTestCaseHeader();
|
|
93
|
-
break;
|
|
94
|
-
case runtimeEvents.TEST_TESTCASE_END:
|
|
95
|
-
this.printTestCaseResult(p.testCaseResults);
|
|
96
|
-
let tc = this.findTestCase(p.testCaseResults.testCaseID);
|
|
97
|
-
if (tc){
|
|
98
|
-
tc.attachAssertions(p.testCaseResults.assertionResults);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
remainingTestCases = remainingTestCases - 1;
|
|
102
|
-
if (remainingTestCases === 0) {
|
|
103
|
-
// Inform the TestController to stop the command
|
|
104
|
-
this._testReporterEmitter.emit(internalEvents.TEST_RUNNER_STOP);
|
|
105
|
-
}
|
|
106
|
-
break;
|
|
107
|
-
case runtimeEvents.TEST_TESTCASE_END_WITH_ERROR:
|
|
108
|
-
this.printTestCaseWithError(p.testCaseResults, p.error);
|
|
109
|
-
remainingTestCases = remainingTestCases - 1;
|
|
110
|
-
if (remainingTestCases === 0) {
|
|
111
|
-
// Inform the TestController to stop the command
|
|
112
|
-
this._testReporterEmitter.emit(internalEvents.TEST_RUNNER_STOP);
|
|
113
|
-
}
|
|
114
|
-
break;
|
|
115
|
-
default:
|
|
116
|
-
// do not do anything
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
// For future ideas of how to implement debugger on terminal
|
|
120
|
-
// if (data.id === 'node-debug') {
|
|
121
|
-
// console.log(JSON.stringify(data.payload, null, 2));
|
|
122
|
-
// }
|
|
123
|
-
});
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
addTestCase(testCase) {
|
|
127
|
-
this._runningTestCase = testCase;
|
|
128
|
-
this._testCases.push(testCase);
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
findTestCase(testCaseId){
|
|
133
|
-
let tcfound = this._testCases.filter(tc => tc._testCaseId === testCaseId);
|
|
134
|
-
if (tcfound.length === 0) {
|
|
135
|
-
return undefined;
|
|
136
|
-
} else {
|
|
137
|
-
return tcfound[0];
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
printTestCaseHeader(description, target) {
|
|
143
|
-
let prettyName = `${description}`; // mvp: only full flow being targeted > ${target}
|
|
144
|
-
const sep = '=';
|
|
145
|
-
let underline = sep.repeat(prettyName.length);
|
|
146
|
-
let headerLine = `- ${prettyName}\n ${underline}`;
|
|
147
|
-
log(chalk.cyan(headerLine));
|
|
148
|
-
log(` Results:`);
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
printTestAssertion(ar, index){
|
|
152
|
-
// console.log('Assertion:', ar)
|
|
153
|
-
let { description, selector, property, comparison, valueExpected, diffReported } = ar;
|
|
154
|
-
let status = diffReported? STATUS_FAILED: STATUS_PASSED;
|
|
155
|
-
let icon;
|
|
156
|
-
if (status === STATUS_FAILED) {
|
|
157
|
-
icon = chalk.red('\u2716'); // cross mark
|
|
158
|
-
} else {
|
|
159
|
-
icon = chalk.green(`\u2713`); // tick
|
|
160
|
-
}
|
|
161
|
-
// Description
|
|
162
|
-
let descriptionName;
|
|
163
|
-
if (description && description.length > 0) {
|
|
164
|
-
descriptionName = description;
|
|
165
|
-
} else {
|
|
166
|
-
descriptionName = `${selector} - ${property} - ${comparison} - ${valueExpected}`;
|
|
167
|
-
}
|
|
168
|
-
let prettyName = ` ${index}. ${icon} ${descriptionName}`;
|
|
169
|
-
if (diffReported) {
|
|
170
|
-
prettyName = `${prettyName}
|
|
171
|
-
Diff report:\n${chalk.red(JSON.stringify(diffReported, null, 2))}`;
|
|
172
|
-
}
|
|
173
|
-
log (prettyName);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
printTestAssertionResult(assertionResults) {
|
|
177
|
-
// Print Assertions
|
|
178
|
-
if (assertionResults.length === 0){
|
|
179
|
-
log(chalk.dim(` (No assertions found)`));
|
|
180
|
-
} else {
|
|
181
|
-
assertionResults.map( (ar, index) => {
|
|
182
|
-
this.printTestAssertion(ar, index);
|
|
183
|
-
});
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
printTestCaseStatus(testCaseResult){
|
|
188
|
-
// See if any assertion has failed
|
|
189
|
-
let failedAssertions = testCaseResult.assertionResults.filter(ar => ar.status === STATUS_FAILED);
|
|
190
|
-
let failedTestCase = failedAssertions.length >= 1? true: false;
|
|
191
|
-
// Print it nicely
|
|
192
|
-
let coloredStatus;
|
|
193
|
-
if (failedTestCase) {
|
|
194
|
-
coloredStatus = chalk.bgRed.white(` Failed `);
|
|
195
|
-
} else {
|
|
196
|
-
coloredStatus = chalk.bgGreen.white(` Passed `);
|
|
197
|
-
}
|
|
198
|
-
log(` Status: ${coloredStatus}\n`);
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
printTestCaseWithError(testCaseResult, error){
|
|
202
|
-
let {
|
|
203
|
-
testCaseDescription,
|
|
204
|
-
target
|
|
205
|
-
} = testCaseResult;
|
|
206
|
-
|
|
207
|
-
// Print header
|
|
208
|
-
this.printTestCaseHeader(testCaseDescription, target);
|
|
209
|
-
log(` ERROR: ${error}`);
|
|
210
|
-
log(` Status: ${chalk.bgRed.white(` Failed `)}\n`);
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
printTestCaseResult(testCaseResult) {
|
|
214
|
-
let {
|
|
215
|
-
testCaseID,
|
|
216
|
-
testCaseDescription,
|
|
217
|
-
target,
|
|
218
|
-
assertionResults } = testCaseResult;
|
|
219
|
-
|
|
220
|
-
// Print header
|
|
221
|
-
this.printTestCaseHeader(testCaseDescription, target);
|
|
222
|
-
|
|
223
|
-
// Print assertions
|
|
224
|
-
this.printTestAssertionResult(assertionResults || []);
|
|
225
|
-
|
|
226
|
-
// Print status
|
|
227
|
-
this.printTestCaseStatus(testCaseResult);
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
printSummary() {
|
|
231
|
-
log(`TestCases - Completed
|
|
232
|
-
|
|
233
|
-
Final Execution Statistics
|
|
234
|
-
-------------------------------
|
|
235
|
-
Execution Time: ${this.getExecutionTime()} ms
|
|
236
|
-
Total Test Cases: ${this.getTestCases().length}
|
|
237
|
-
Failed: ${this.getFailedTestCases().length}
|
|
238
|
-
Passed: ${this.getPassedTestCases().length}
|
|
239
|
-
-------------------------------
|
|
240
|
-
`);
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
getTestCases() {
|
|
244
|
-
return this._testCases;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
getFailedTestCases() {
|
|
248
|
-
let failedTestCases = this.getTestCases().filter(
|
|
249
|
-
(tc) => tc._status === STATUS_FAILED
|
|
250
|
-
);
|
|
251
|
-
return failedTestCases || [];
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
getPassedTestCases() {
|
|
255
|
-
let passedTestCases = this.getTestCases().filter(
|
|
256
|
-
(tc) => tc._status === STATUS_PASSED
|
|
257
|
-
);
|
|
258
|
-
return passedTestCases || [];
|
|
259
|
-
}
|
|
260
|
-
getExecutionTime() {
|
|
261
|
-
if (this._timeStartTestSuite && this._timeEndTestSuite) {
|
|
262
|
-
return this.toFixed(this._timeEndTestSuite - this._timeStartTestSuite, 2);
|
|
263
|
-
} else {
|
|
264
|
-
return 0;
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
/**
|
|
269
|
-
*
|
|
270
|
-
* @param {*} num - number to get truncated its decimal digits
|
|
271
|
-
* @param {*} fixed - number of digits to be truncated
|
|
272
|
-
*/
|
|
273
|
-
toFixed(num, fixed) {
|
|
274
|
-
fixed = fixed || 0;
|
|
275
|
-
fixed = Math.pow(10, fixed);
|
|
276
|
-
return Math.floor(num * fixed) / fixed;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
class TestSuiteController {
|
|
281
|
-
constructor(appServer) {
|
|
282
|
-
this._appServer = appServer;
|
|
283
|
-
this._testReporter = new TestReporter(this._appServer.events);
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
async waitForResults() {
|
|
287
|
-
log(`TestCases - Executing\n`);
|
|
288
|
-
try {
|
|
289
|
-
const testReporterEmitter = this._testReporter.emitter;
|
|
290
|
-
return new Promise((resolve, reject) => {
|
|
291
|
-
testReporterEmitter.on(internalEvents.TEST_RUNNER_STOP, () => {
|
|
292
|
-
resolve();
|
|
293
|
-
});
|
|
294
|
-
});
|
|
295
|
-
} catch (err) {
|
|
296
|
-
log(
|
|
297
|
-
error(
|
|
298
|
-
`Unexpected error occurred while starting server due to <${err.message}>`
|
|
299
|
-
)
|
|
300
|
-
);
|
|
301
|
-
process.exit(1);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
|
|
305
|
-
findTestCasesFromFlow(flowFilePath) {
|
|
306
|
-
const flowFileData = fs.readFileSync(flowFilePath, 'utf-8');
|
|
307
|
-
const flowFileJson = JSON.parse(flowFileData);
|
|
308
|
-
return flowFileJson.filter((node) => node.type === 'TestCase' || node.type === 'HTTPTestCase');
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
/**
|
|
312
|
-
*
|
|
313
|
-
* @param {*} testcasesSelected - array of {id: nodeId, name: nodeName}
|
|
314
|
-
* @returns
|
|
315
|
-
*/
|
|
316
|
-
async runTestSuite(testcasesSelected) {
|
|
317
|
-
// === Starting the testSuite ===
|
|
318
|
-
this._appServer.events.emit('runtime-event', {
|
|
319
|
-
id: runtimeEvents.TEST_TESTSUITE_START,
|
|
320
|
-
payload: {},
|
|
321
|
-
});
|
|
322
|
-
|
|
323
|
-
// === Iterate over all the testCases ===
|
|
324
|
-
await this.runTestCases(testcasesSelected);
|
|
325
|
-
await this.waitForResults();
|
|
326
|
-
const errorsNum = this._testReporter.getFailedTestCases().length;
|
|
327
|
-
|
|
328
|
-
// === End the testSuite
|
|
329
|
-
this._appServer.events.emit('runtime-event', {
|
|
330
|
-
id: runtimeEvents.TEST_TESTSUITE_END,
|
|
331
|
-
payload: {},
|
|
332
|
-
});
|
|
333
|
-
|
|
334
|
-
return errorsNum;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
async runTestCases(testCases) {
|
|
338
|
-
remainingTestCases = testCases.length;
|
|
339
|
-
const port = this._appServer._server.address().port;
|
|
340
|
-
|
|
341
|
-
testCases.map(async(testCase) => {
|
|
342
|
-
try{
|
|
343
|
-
await got({
|
|
344
|
-
url: `http://127.0.0.1:${port}`,
|
|
345
|
-
method: 'POST',
|
|
346
|
-
headers: { 'x-kumologica-testcasenode': `${testCase.id}` },
|
|
347
|
-
});
|
|
348
|
-
} catch (err) {
|
|
349
|
-
log(`Error found while running TestCase Id=${testCase.id} due to... ${err}`);
|
|
350
|
-
process.exit(1);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
})
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
_debugResponse(resp) {
|
|
357
|
-
log(JSON.stringify(resp));
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
|
|
361
|
-
module.exports = {
|
|
362
|
-
TestSuiteController,
|
|
363
|
-
};
|