@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,426 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @mixin @kumologica-core/runtime_projects
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
var runtime;
|
|
8
|
+
|
|
9
|
+
var api = module.exports = {
|
|
10
|
+
init: function(_runtime) {
|
|
11
|
+
runtime = _runtime;
|
|
12
|
+
},
|
|
13
|
+
available: function(opts) {
|
|
14
|
+
return Promise.resolve(!!runtime.storage.projects);
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* List projects known to the runtime
|
|
19
|
+
* @param {Object} opts
|
|
20
|
+
* @param {User} opts.user - the user calling the api
|
|
21
|
+
* @return {Promise<Object>} - resolves when complete
|
|
22
|
+
* @memberof @kumologica-core/runtime_projects
|
|
23
|
+
*/
|
|
24
|
+
listProjects: function(opts) {
|
|
25
|
+
return runtime.storage.projects.listProjects(opts.user).then(function(list) {
|
|
26
|
+
var active = runtime.storage.projects.getActiveProject(opts.user);
|
|
27
|
+
var response = {
|
|
28
|
+
projects: list
|
|
29
|
+
};
|
|
30
|
+
if (active) {
|
|
31
|
+
response.active = active.name;
|
|
32
|
+
}
|
|
33
|
+
return response;
|
|
34
|
+
}).catch(function(err) {
|
|
35
|
+
err.status = 400;
|
|
36
|
+
throw err;
|
|
37
|
+
})
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Create a new project
|
|
42
|
+
* @param {Object} opts
|
|
43
|
+
* @param {User} opts.user - the user calling the api
|
|
44
|
+
* @param {Object} opts.project - the project information
|
|
45
|
+
* @return {Promise<Object>} - resolves when complete
|
|
46
|
+
* @memberof @kumologica-core/runtime_projects
|
|
47
|
+
*/
|
|
48
|
+
createProject: function(opts) {
|
|
49
|
+
return runtime.storage.projects.createProject(opts.user, opts.project)
|
|
50
|
+
},
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Initialises an empty project
|
|
54
|
+
* @param {Object} opts
|
|
55
|
+
* @param {User} opts.user - the user calling the api
|
|
56
|
+
* @param {String} opts.id - the id of the project to initialise
|
|
57
|
+
* @param {Object} opts.project - the project information
|
|
58
|
+
* @return {Promise<Object>} - resolves when complete
|
|
59
|
+
* @memberof @kumologica-core/runtime_projects
|
|
60
|
+
*/
|
|
61
|
+
initialiseProject: function(opts) {
|
|
62
|
+
// Initialised set when creating default files for an empty repo
|
|
63
|
+
return runtime.storage.projects.initialiseProject(opts.user, opts.id, opts.project)
|
|
64
|
+
},
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Gets the active project
|
|
68
|
+
* @param {Object} opts
|
|
69
|
+
* @param {User} opts.user - the user calling the api
|
|
70
|
+
* @return {Promise<Object>} - the active project
|
|
71
|
+
* @memberof @kumologica-core/runtime_projects
|
|
72
|
+
*/
|
|
73
|
+
getActiveProject: function(opts) {
|
|
74
|
+
return Promise.resolve(runtime.storage.projects.getActiveProject(opts.user));
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
*
|
|
79
|
+
* @param {Object} opts
|
|
80
|
+
* @param {User} opts.user - the user calling the api
|
|
81
|
+
* @param {String} opts.id - the id of the project to activate
|
|
82
|
+
* @return {Promise<Object>} - resolves when complete
|
|
83
|
+
* @memberof @kumologica-core/runtime_projects
|
|
84
|
+
*/
|
|
85
|
+
setActiveProject: function(opts) {
|
|
86
|
+
var currentProject = runtime.storage.projects.getActiveProject(opts.user);
|
|
87
|
+
if (!currentProject || opts.id !== currentProject.name) {
|
|
88
|
+
return runtime.storage.projects.setActiveProject(opts.user, opts.id);
|
|
89
|
+
} else {
|
|
90
|
+
return Promise.resolve();
|
|
91
|
+
}
|
|
92
|
+
},
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Gets a projects metadata
|
|
96
|
+
* @param {Object} opts
|
|
97
|
+
* @param {User} opts.user - the user calling the api
|
|
98
|
+
* @param {String} opts.id - the id of the project to get
|
|
99
|
+
* @return {Promise<Object>} - the project metadata
|
|
100
|
+
* @memberof @kumologica-core/runtime_projects
|
|
101
|
+
*/
|
|
102
|
+
getProject: function(opts) {
|
|
103
|
+
return runtime.storage.projects.getProject(opts.user, opts.id)
|
|
104
|
+
},
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Updates the metadata of an existing project
|
|
108
|
+
* @param {Object} opts
|
|
109
|
+
* @param {User} opts.user - the user calling the api
|
|
110
|
+
* @param {String} opts.id - the id of the project to update
|
|
111
|
+
* @param {Object} opts.project - the project information
|
|
112
|
+
* @return {Promise<Object>} - resolves when complete
|
|
113
|
+
* @memberof @kumologica-core/runtime_projects
|
|
114
|
+
*/
|
|
115
|
+
updateProject: function(opts) {
|
|
116
|
+
return runtime.storage.projects.updateProject(opts.user, opts.id, opts.project);
|
|
117
|
+
},
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Deletes a project
|
|
121
|
+
* @param {Object} opts
|
|
122
|
+
* @param {User} opts.user - the user calling the api
|
|
123
|
+
* @param {String} opts.id - the id of the project to update
|
|
124
|
+
* @return {Promise<Object>} - resolves when complete
|
|
125
|
+
* @memberof @kumologica-core/runtime_projects
|
|
126
|
+
*/
|
|
127
|
+
deleteProject: function(opts) {
|
|
128
|
+
return runtime.storage.projects.deleteProject(opts.user, opts.id);
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* Gets current git status of a project
|
|
133
|
+
* @param {Object} opts
|
|
134
|
+
* @param {User} opts.user - the user calling the api
|
|
135
|
+
* @param {String} opts.id - the id of the project
|
|
136
|
+
* @param {Boolean} opts.remote - whether to include status of remote repos
|
|
137
|
+
* @return {Promise<Object>} - the project status
|
|
138
|
+
* @memberof @kumologica-core/runtime_projects
|
|
139
|
+
*/
|
|
140
|
+
getStatus: function(opts) {
|
|
141
|
+
return runtime.storage.projects.getStatus(opts.user, opts.id, opts.remote)
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* Get a list of local branches
|
|
146
|
+
* @param {Object} opts
|
|
147
|
+
* @param {User} opts.user - the user calling the api
|
|
148
|
+
* @param {String} opts.id - the id of the project
|
|
149
|
+
* @param {Boolean} opts.remote - whether to return remote branches (true) or local (false)
|
|
150
|
+
* @return {Promise<Object>} - a list of the local branches
|
|
151
|
+
* @memberof @kumologica-core/runtime_projects
|
|
152
|
+
*/
|
|
153
|
+
getBranches: function(opts) {
|
|
154
|
+
return runtime.storage.projects.getBranches(opts.user, opts.id, opts.remote);
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Gets the status of a branch
|
|
159
|
+
* @param {Object} opts
|
|
160
|
+
* @param {User} opts.user - the user calling the api
|
|
161
|
+
* @param {String} opts.id - the id of the project
|
|
162
|
+
* @param {String} opts.branch - the name of the branch
|
|
163
|
+
* @return {Promise<Object>} - the status of the branch
|
|
164
|
+
* @memberof @kumologica-core/runtime_projects
|
|
165
|
+
*/
|
|
166
|
+
getBranchStatus: function(opts) {
|
|
167
|
+
return runtime.storage.projects.getBranchStatus(opts.user, opts.id, opts.branch);
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Sets the current local branch
|
|
172
|
+
* @param {Object} opts
|
|
173
|
+
* @param {User} opts.user - the user calling the api
|
|
174
|
+
* @param {String} opts.id - the id of the project
|
|
175
|
+
* @param {String} opts.branch - the name of the branch
|
|
176
|
+
* @param {Boolean} opts.create - whether to create the branch if it doesn't exist
|
|
177
|
+
* @return {Promise<Object>} - resolves when complete
|
|
178
|
+
* @memberof @kumologica-core/runtime_projects
|
|
179
|
+
*/
|
|
180
|
+
setBranch: function(opts) {
|
|
181
|
+
return runtime.storage.projects.setBranch(opts.user, opts.id, opts.branch, opts.create)
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
/**
|
|
185
|
+
* Deletes a branch
|
|
186
|
+
* @param {Object} opts
|
|
187
|
+
* @param {User} opts.user - the user calling the api
|
|
188
|
+
* @param {String} opts.id - the id of the project
|
|
189
|
+
* @param {String} opts.branch - the name of the branch
|
|
190
|
+
* @param {Boolean} opts.force - whether to force delete
|
|
191
|
+
* @return {Promise<Object>} - resolves when complete
|
|
192
|
+
* @memberof @kumologica-core/runtime_projects
|
|
193
|
+
*/
|
|
194
|
+
deleteBranch: function(opts) {
|
|
195
|
+
return runtime.storage.projects.deleteBranch(opts.user, opts.id, opts.branch, false, opts.force);
|
|
196
|
+
},
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* Commits the current staged files
|
|
200
|
+
* @param {Object} opts
|
|
201
|
+
* @param {User} opts.user - the user calling the api
|
|
202
|
+
* @param {String} opts.id - the id of the project
|
|
203
|
+
* @param {String} opts.message - the message to associate with the commit
|
|
204
|
+
* @return {Promise<Object>} - resolves when complete
|
|
205
|
+
* @memberof @kumologica-core/runtime_projects
|
|
206
|
+
*/
|
|
207
|
+
commit: function(opts) {
|
|
208
|
+
return runtime.storage.projects.commit(opts.user, opts.id,{message: opts.message});
|
|
209
|
+
},
|
|
210
|
+
|
|
211
|
+
/**
|
|
212
|
+
* Gets the details of a single commit
|
|
213
|
+
* @param {Object} opts
|
|
214
|
+
* @param {User} opts.user - the user calling the api
|
|
215
|
+
* @param {String} opts.id - the id of the project
|
|
216
|
+
* @param {String} opts.sha - the sha of the commit to return
|
|
217
|
+
* @return {Promise<Object>} - the commit details
|
|
218
|
+
* @memberof @kumologica-core/runtime_projects
|
|
219
|
+
*/
|
|
220
|
+
getCommit: function(opts) {
|
|
221
|
+
return runtime.storage.projects.getCommit(opts.user, opts.id, opts.sha);
|
|
222
|
+
},
|
|
223
|
+
|
|
224
|
+
/**
|
|
225
|
+
* Gets the commit history of the project
|
|
226
|
+
* @param {Object} opts
|
|
227
|
+
* @param {User} opts.user - the user calling the api
|
|
228
|
+
* @param {String} opts.id - the id of the project
|
|
229
|
+
* @param {String} opts.limit - limit how many to return
|
|
230
|
+
* @param {String} opts.before - id of the commit to work back from
|
|
231
|
+
* @return {Promise<Array>} - an array of commits
|
|
232
|
+
* @memberof @kumologica-core/runtime_projects
|
|
233
|
+
*/
|
|
234
|
+
getCommits: function(opts) {
|
|
235
|
+
return runtime.storage.projects.getCommits(opts.user, opts.id, {
|
|
236
|
+
limit: opts.limit || 20,
|
|
237
|
+
before: opts.before
|
|
238
|
+
});
|
|
239
|
+
},
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* Abort an in-progress merge
|
|
243
|
+
* @param {Object} opts
|
|
244
|
+
* @param {User} opts.user - the user calling the api
|
|
245
|
+
* @param {String} opts.id - the id of the project
|
|
246
|
+
* @return {Promise<Object>} - resolves when complete
|
|
247
|
+
* @memberof @kumologica-core/runtime_projects
|
|
248
|
+
*/
|
|
249
|
+
abortMerge: function(opts) {
|
|
250
|
+
return runtime.storage.projects.abortMerge(opts.user, opts.id);
|
|
251
|
+
},
|
|
252
|
+
|
|
253
|
+
/**
|
|
254
|
+
* Resolves a merge conflict
|
|
255
|
+
* @param {Object} opts
|
|
256
|
+
* @param {User} opts.user - the user calling the api
|
|
257
|
+
* @param {String} opts.id - the id of the project
|
|
258
|
+
* @param {String} opts.path - the path of the file being merged
|
|
259
|
+
* @param {String} opts.resolutions - how to resolve the merge conflict
|
|
260
|
+
* @return {Promise<Object>} - resolves when complete
|
|
261
|
+
* @memberof @kumologica-core/runtime_projects
|
|
262
|
+
*/
|
|
263
|
+
resolveMerge: function(opts) {
|
|
264
|
+
return runtime.storage.projects.resolveMerge(opts.user, opts.id, opts.path, opts.resolution);
|
|
265
|
+
},
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Gets a listing of the files in the project
|
|
269
|
+
* @param {Object} opts
|
|
270
|
+
* @param {User} opts.user - the user calling the api
|
|
271
|
+
* @param {String} opts.id - the id of the project
|
|
272
|
+
* @return {Promise<Object>} - the file listing
|
|
273
|
+
* @memberof @kumologica-core/runtime_projects
|
|
274
|
+
*/
|
|
275
|
+
getFiles: function(opts) {
|
|
276
|
+
return runtime.storage.projects.getFiles(opts.user, opts.id);
|
|
277
|
+
},
|
|
278
|
+
|
|
279
|
+
/**
|
|
280
|
+
* Gets the contents of a file
|
|
281
|
+
* @param {Object} opts
|
|
282
|
+
* @param {User} opts.user - the user calling the api
|
|
283
|
+
* @param {String} opts.id - the id of the project
|
|
284
|
+
* @param {String} opts.path - the path of the file
|
|
285
|
+
* @param {String} opts.tree - the version control tree to use
|
|
286
|
+
* @return {Promise<String>} - the content of the file
|
|
287
|
+
* @memberof @kumologica-core/runtime_projects
|
|
288
|
+
*/
|
|
289
|
+
getFile: function(opts) {
|
|
290
|
+
return runtime.storage.projects.getFile(opts.user, opts.id,opts.path,opts.tree);
|
|
291
|
+
},
|
|
292
|
+
|
|
293
|
+
/**
|
|
294
|
+
*
|
|
295
|
+
* @param {Object} opts
|
|
296
|
+
* @param {User} opts.user - the user calling the api
|
|
297
|
+
* @param {String} opts.id - the id of the project
|
|
298
|
+
* @param {String|Array} opts.path - the path of the file, or an array of paths
|
|
299
|
+
* @return {Promise<Object>} - resolves when complete
|
|
300
|
+
* @memberof @kumologica-core/runtime_projects
|
|
301
|
+
*/
|
|
302
|
+
stageFile: function(opts) {
|
|
303
|
+
return runtime.storage.projects.stageFile(opts.user, opts.id, opts.path);
|
|
304
|
+
},
|
|
305
|
+
|
|
306
|
+
/**
|
|
307
|
+
*
|
|
308
|
+
* @param {Object} opts
|
|
309
|
+
* @param {User} opts.user - the user calling the api
|
|
310
|
+
* @param {String} opts.id - the id of the project
|
|
311
|
+
* @param {String} opts.path - the path of the file. If not set, all staged files are unstaged
|
|
312
|
+
* @return {Promise<Object>} - resolves when complete
|
|
313
|
+
* @memberof @kumologica-core/runtime_projects
|
|
314
|
+
*/
|
|
315
|
+
unstageFile: function(opts) {
|
|
316
|
+
return runtime.storage.projects.unstageFile(opts.user, opts.id, opts.path);
|
|
317
|
+
},
|
|
318
|
+
|
|
319
|
+
/**
|
|
320
|
+
* Reverts changes to a file back to its commited version
|
|
321
|
+
* @param {Object} opts
|
|
322
|
+
* @param {User} opts.user - the user calling the api
|
|
323
|
+
* @param {String} opts.id - the id of the project
|
|
324
|
+
* @param {String} opts.path - the path of the file
|
|
325
|
+
* @return {Promise<Object>} - resolves when complete
|
|
326
|
+
* @memberof @kumologica-core/runtime_projects
|
|
327
|
+
*/
|
|
328
|
+
revertFile: function(opts) {
|
|
329
|
+
return runtime.storage.projects.revertFile(opts.user, opts.id,opts.path)
|
|
330
|
+
},
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Get the diff of a file
|
|
334
|
+
* @param {Object} opts
|
|
335
|
+
* @param {User} opts.user - the user calling the api
|
|
336
|
+
* @param {String} opts.id - the id of the project
|
|
337
|
+
* @param {String} opts.path - the path of the file
|
|
338
|
+
* @param {String} opts.type - the type of diff
|
|
339
|
+
* @return {Promise<Object>} - the requested diff
|
|
340
|
+
* @memberof @kumologica-core/runtime_projects
|
|
341
|
+
*/
|
|
342
|
+
getFileDiff: function(opts) {
|
|
343
|
+
return runtime.storage.projects.getFileDiff(opts.user, opts.id, opts.path, opts.type);
|
|
344
|
+
},
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Gets a list of the project remotes
|
|
348
|
+
* @param {Object} opts
|
|
349
|
+
* @param {User} opts.user - the user calling the api
|
|
350
|
+
* @param {String} opts.id - the id of the project
|
|
351
|
+
* @return {Promise<Object>} - a list of project remotes
|
|
352
|
+
* @memberof @kumologica-core/runtime_projects
|
|
353
|
+
*/
|
|
354
|
+
getRemotes: function(opts) {
|
|
355
|
+
return runtime.storage.projects.getRemotes(opts.user, opts.id);
|
|
356
|
+
|
|
357
|
+
},
|
|
358
|
+
|
|
359
|
+
/**
|
|
360
|
+
*
|
|
361
|
+
* @param {Object} opts
|
|
362
|
+
* @param {User} opts.user - the user calling the api
|
|
363
|
+
* @param {String} opts.id - the id of the project
|
|
364
|
+
* @param {Object} opts.remote - the remote metadata
|
|
365
|
+
* @param {String} opts.remote.name - the name of the remote
|
|
366
|
+
* @param {String} opts.remote.url - the url of the remote
|
|
367
|
+
* @return {Promise<Object>} - resolves when complete
|
|
368
|
+
* @memberof @kumologica-core/runtime_projects
|
|
369
|
+
*/
|
|
370
|
+
addRemote: function(opts) {
|
|
371
|
+
return runtime.storage.projects.addRemote(opts.user, opts.id, opts.remote)
|
|
372
|
+
},
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* Remove a project remote
|
|
376
|
+
* @param {Object} opts
|
|
377
|
+
* @param {User} opts.user - the user calling the api
|
|
378
|
+
* @param {String} opts.id - the id of the project
|
|
379
|
+
* @param {String} opts.remote - the name of the remote
|
|
380
|
+
* @return {Promise<Object>} - resolves when complete
|
|
381
|
+
* @memberof @kumologica-core/runtime_projects
|
|
382
|
+
*/
|
|
383
|
+
removeRemote: function(opts) {
|
|
384
|
+
return runtime.storage.projects.removeRemote(opts.user, opts.id, opts.remote);
|
|
385
|
+
},
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
* @param {Object} opts
|
|
390
|
+
* @param {User} opts.user - the user calling the api
|
|
391
|
+
* @param {String} opts.id - the id of the project
|
|
392
|
+
* @param {Object} opts.remote - the remote metadata
|
|
393
|
+
* @param {String} opts.remote.name - the name of the remote
|
|
394
|
+
* @return {Promise<Object>} - resolves when complete
|
|
395
|
+
* @memberof @kumologica-core/runtime_projects
|
|
396
|
+
*/
|
|
397
|
+
updateRemote: function(opts) {
|
|
398
|
+
return runtime.storage.projects.updateRemote(opts.user, opts.id, opts.remote.name, opts.remote)
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
/**
|
|
402
|
+
* Pull changes from the remote
|
|
403
|
+
* @param {Object} opts
|
|
404
|
+
* @param {User} opts.user - the user calling the api
|
|
405
|
+
* @return {Promise<Object>} - resolves when complete
|
|
406
|
+
* @memberof @kumologica-core/runtime_projects
|
|
407
|
+
*/
|
|
408
|
+
pull: function(opts) {
|
|
409
|
+
return runtime.storage.projects.pull(opts.user, opts.id, opts.remote, opts.track, opts.allowUnrelatedHistories);
|
|
410
|
+
},
|
|
411
|
+
|
|
412
|
+
/**
|
|
413
|
+
* Push changes to a remote
|
|
414
|
+
* @param {Object} opts
|
|
415
|
+
* @param {User} opts.user - the user calling the api
|
|
416
|
+
* @param {String} opts.id - the id of the project
|
|
417
|
+
* @param {String} opts.remote - the name of the remote
|
|
418
|
+
* @param {String} opts.track - whether to set the remote as the upstream
|
|
419
|
+
* @return {Promise<Object>} - resolves when complete
|
|
420
|
+
* @memberof @kumologica-core/runtime_projects
|
|
421
|
+
*/
|
|
422
|
+
push: function(opts) {
|
|
423
|
+
return runtime.storage.projects.push(opts.user, opts.id, opts.remote, opts.track);
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
}
|
|
@@ -4,18 +4,34 @@ var nodes = require('./nodes');
|
|
|
4
4
|
var flows = require('./flows');
|
|
5
5
|
var flow = require('./flow');
|
|
6
6
|
var context = require('./context');
|
|
7
|
-
var
|
|
7
|
+
var util = require('./util');
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
let errorHandler = (err, req, res, next) => {
|
|
10
|
+
console.error(err.stack);
|
|
11
|
+
res.status(500).send('Something broke!');
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
function needsPermission(permission) {
|
|
15
|
+
return function (req, res, next) {
|
|
16
|
+
// if (userHasPermission(req.user, permission)) {
|
|
17
|
+
next();
|
|
18
|
+
// } else {
|
|
19
|
+
// res.status(401).send('Unauthorized');
|
|
20
|
+
// }
|
|
21
|
+
};
|
|
22
|
+
}
|
|
10
23
|
|
|
11
24
|
module.exports = {
|
|
12
|
-
init: function(
|
|
25
|
+
init: function (runtime) {
|
|
26
|
+
// Load all internal runtime APIs
|
|
27
|
+
let runtimeAPI = require('../index');
|
|
28
|
+
runtimeAPI.init(runtime);
|
|
29
|
+
|
|
13
30
|
flows.init(runtimeAPI);
|
|
14
31
|
flow.init(runtimeAPI);
|
|
15
32
|
nodes.init(runtimeAPI);
|
|
16
33
|
context.init(runtimeAPI);
|
|
17
|
-
|
|
18
|
-
var needsPermission = auth.needsPermission;
|
|
34
|
+
util.init(runtimeAPI);
|
|
19
35
|
|
|
20
36
|
var adminApp = express();
|
|
21
37
|
|
|
@@ -24,13 +40,13 @@ module.exports = {
|
|
|
24
40
|
'/flows',
|
|
25
41
|
needsPermission('flows.read'),
|
|
26
42
|
flows.get,
|
|
27
|
-
|
|
43
|
+
errorHandler
|
|
28
44
|
);
|
|
29
45
|
adminApp.post(
|
|
30
46
|
'/flows',
|
|
31
47
|
needsPermission('flows.write'),
|
|
32
48
|
flows.post,
|
|
33
|
-
|
|
49
|
+
errorHandler
|
|
34
50
|
);
|
|
35
51
|
|
|
36
52
|
// Flow
|
|
@@ -38,25 +54,25 @@ module.exports = {
|
|
|
38
54
|
'/flow/:id',
|
|
39
55
|
needsPermission('flows.read'),
|
|
40
56
|
flow.get,
|
|
41
|
-
|
|
57
|
+
errorHandler
|
|
42
58
|
);
|
|
43
59
|
adminApp.post(
|
|
44
60
|
'/flow',
|
|
45
61
|
needsPermission('flows.write'),
|
|
46
62
|
flow.post,
|
|
47
|
-
|
|
63
|
+
errorHandler
|
|
48
64
|
);
|
|
49
65
|
adminApp.delete(
|
|
50
66
|
'/flow/:id',
|
|
51
67
|
needsPermission('flows.write'),
|
|
52
68
|
flow.delete,
|
|
53
|
-
|
|
69
|
+
errorHandler
|
|
54
70
|
);
|
|
55
71
|
adminApp.put(
|
|
56
72
|
'/flow/:id',
|
|
57
73
|
needsPermission('flows.write'),
|
|
58
74
|
flow.put,
|
|
59
|
-
|
|
75
|
+
errorHandler
|
|
60
76
|
);
|
|
61
77
|
|
|
62
78
|
// Nodes
|
|
@@ -64,49 +80,49 @@ module.exports = {
|
|
|
64
80
|
'/nodes-reload',
|
|
65
81
|
needsPermission('nodes.write'),
|
|
66
82
|
nodes.reloadModules,
|
|
67
|
-
|
|
83
|
+
errorHandler
|
|
68
84
|
);
|
|
69
85
|
adminApp.get(
|
|
70
86
|
'/nodes',
|
|
71
87
|
needsPermission('nodes.read'),
|
|
72
88
|
nodes.getAll,
|
|
73
|
-
|
|
89
|
+
errorHandler
|
|
74
90
|
);
|
|
75
91
|
adminApp.post(
|
|
76
92
|
'/nodes',
|
|
77
93
|
needsPermission('nodes.write'),
|
|
78
94
|
nodes.post,
|
|
79
|
-
|
|
95
|
+
errorHandler
|
|
80
96
|
);
|
|
81
97
|
adminApp.get(
|
|
82
98
|
/^\/nodes\/((@[^\/]+\/)?[^\/]+)$/,
|
|
83
99
|
needsPermission('nodes.read'),
|
|
84
100
|
nodes.getModule,
|
|
85
|
-
|
|
101
|
+
errorHandler
|
|
86
102
|
);
|
|
87
103
|
adminApp.put(
|
|
88
104
|
/^\/nodes\/((@[^\/]+\/)?[^\/]+)$/,
|
|
89
105
|
needsPermission('nodes.write'),
|
|
90
106
|
nodes.putModule,
|
|
91
|
-
|
|
107
|
+
errorHandler
|
|
92
108
|
);
|
|
93
109
|
adminApp.delete(
|
|
94
110
|
/^\/nodes\/((@[^\/]+\/)?[^\/]+)$/,
|
|
95
111
|
needsPermission('nodes.write'),
|
|
96
112
|
nodes.delete,
|
|
97
|
-
|
|
113
|
+
errorHandler
|
|
98
114
|
);
|
|
99
115
|
adminApp.get(
|
|
100
116
|
/^\/nodes\/((@[^\/]+\/)?[^\/]+)\/([^\/]+)$/,
|
|
101
117
|
needsPermission('nodes.read'),
|
|
102
118
|
nodes.getSet,
|
|
103
|
-
|
|
119
|
+
errorHandler
|
|
104
120
|
);
|
|
105
121
|
adminApp.put(
|
|
106
122
|
/^\/nodes\/((@[^\/]+\/)?[^\/]+)\/([^\/]+)$/,
|
|
107
123
|
needsPermission('nodes.write'),
|
|
108
124
|
nodes.putSet,
|
|
109
|
-
|
|
125
|
+
errorHandler
|
|
110
126
|
);
|
|
111
127
|
|
|
112
128
|
// Context
|
|
@@ -114,40 +130,40 @@ module.exports = {
|
|
|
114
130
|
'/context/:scope(global)',
|
|
115
131
|
needsPermission('context.read'),
|
|
116
132
|
context.get,
|
|
117
|
-
|
|
133
|
+
errorHandler
|
|
118
134
|
);
|
|
119
135
|
adminApp.get(
|
|
120
136
|
'/context/:scope(global)/*',
|
|
121
137
|
needsPermission('context.read'),
|
|
122
138
|
context.get,
|
|
123
|
-
|
|
139
|
+
errorHandler
|
|
124
140
|
);
|
|
125
141
|
adminApp.get(
|
|
126
142
|
'/context/:scope(node|flow)/:id',
|
|
127
143
|
needsPermission('context.read'),
|
|
128
144
|
context.get,
|
|
129
|
-
|
|
145
|
+
errorHandler
|
|
130
146
|
);
|
|
131
147
|
adminApp.get(
|
|
132
148
|
'/context/:scope(node|flow)/:id/*',
|
|
133
149
|
needsPermission('context.read'),
|
|
134
150
|
context.get,
|
|
135
|
-
|
|
151
|
+
errorHandler
|
|
136
152
|
);
|
|
137
153
|
|
|
138
|
-
// adminApp.delete("/context/:scope(global)",needsPermission("context.write"),context.delete,
|
|
154
|
+
// adminApp.delete("/context/:scope(global)",needsPermission("context.write"),context.delete,errorHandler);
|
|
139
155
|
adminApp.delete(
|
|
140
156
|
'/context/:scope(global)/*',
|
|
141
157
|
needsPermission('context.write'),
|
|
142
158
|
context.delete,
|
|
143
|
-
|
|
159
|
+
errorHandler
|
|
144
160
|
);
|
|
145
|
-
// adminApp.delete("/context/:scope(node|flow)/:id",needsPermission("context.write"),context.delete,
|
|
161
|
+
// adminApp.delete("/context/:scope(node|flow)/:id",needsPermission("context.write"),context.delete,errorHandler);
|
|
146
162
|
adminApp.delete(
|
|
147
163
|
'/context/:scope(node|flow)/:id/*',
|
|
148
164
|
needsPermission('context.write'),
|
|
149
165
|
context.delete,
|
|
150
|
-
|
|
166
|
+
errorHandler
|
|
151
167
|
);
|
|
152
168
|
|
|
153
169
|
return adminApp;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
const { util: runtimeUtil } = require('../../../lib/runtime-loader');
|
|
4
|
-
const log = runtimeUtil.log;
|
|
1
|
+
let runtimeAPI;
|
|
2
|
+
let log;
|
|
5
3
|
|
|
6
4
|
module.exports = {
|
|
5
|
+
init: function(_runtimeAPI) {
|
|
6
|
+
runtimeAPI = _runtimeAPI;
|
|
7
|
+
log = runtimeAPI.log;
|
|
8
|
+
},
|
|
7
9
|
errorHandler: function(err, req, res, next) {
|
|
8
10
|
//TODO: why this when rejectHandler also?!
|
|
9
11
|
|