├── .dnr-editor └── package.json ├── .github ├── ISSUE_TEMPLATE.md └── PULL_REQUEST_TEMPLATE.md ├── .gitignore ├── .jshintrc ├── .nodemonignore ├── .npmignore ├── .travis.yml ├── .vscode └── launch.json ├── CHANGELOG.md ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Gruntfile.js ├── LICENSE ├── README.md ├── bin └── node-red-pi ├── dnr-node-install.sh ├── editor ├── favicon.ico ├── icons │ ├── alert.png │ ├── arduino.png │ ├── arrow-in.png │ ├── batch.png │ ├── bluetooth.png │ ├── bridge-dash.png │ ├── bridge.png │ ├── cog.png │ ├── comment.png │ ├── db.png │ ├── debug.png │ ├── envelope.png │ ├── feed.png │ ├── file-in.png │ ├── file-out.png │ ├── file.png │ ├── function.png │ ├── hash.png │ ├── inject.png │ ├── join.png │ ├── leveldb.png │ ├── light.png │ ├── link-out.png │ ├── mongodb.png │ ├── mouse.png │ ├── node-changed.png │ ├── node-error.png │ ├── parser-csv.png │ ├── parser-html.png │ ├── parser-json.png │ ├── parser-xml.png │ ├── parser-yaml.png │ ├── range.png │ ├── redis.png │ ├── rpi.png │ ├── serial.png │ ├── sort.png │ ├── split.png │ ├── subflow.png │ ├── swap.png │ ├── switch.png │ ├── template.png │ ├── timer.png │ ├── trigger.png │ ├── twitter.png │ ├── watch.png │ └── white-globe.png ├── images │ ├── deploy-flows-o.png │ ├── deploy-flows.png │ ├── deploy-full-o.png │ ├── deploy-full.png │ ├── deploy-nodes-o.png │ ├── deploy-nodes.png │ ├── grip.png │ ├── node-red-256.png │ ├── node-red-icon-black.svg │ ├── node-red-icon.svg │ ├── node-red.png │ ├── pw_maze_white.png │ ├── spin.svg │ ├── subflow_tab.png │ └── typedInput │ │ ├── 09.png │ │ ├── az.png │ │ ├── bin.png │ │ ├── bool.png │ │ ├── env.png │ │ ├── expr.png │ │ ├── json.png │ │ └── re.png ├── js │ ├── comms.js │ ├── dnr.js │ ├── events.js │ ├── history.js │ ├── i18n.js │ ├── keymap.json │ ├── main.js │ ├── nodes.js │ ├── red.js │ ├── settings.js │ ├── text │ │ ├── bidi.js │ │ └── format.js │ ├── ui │ │ ├── actions.js │ │ ├── clipboard.js │ │ ├── common │ │ │ ├── checkboxSet.js │ │ │ ├── editableList.js │ │ │ ├── menu.js │ │ │ ├── panels.js │ │ │ ├── popover.js │ │ │ ├── searchBox.js │ │ │ ├── stack.js │ │ │ ├── tabs.js │ │ │ └── typedInput.js │ │ ├── deploy.js │ │ ├── device-editor.js │ │ ├── diff.js │ │ ├── editor.js │ │ ├── editors │ │ │ ├── buffer.js │ │ │ ├── expression.js │ │ │ ├── js.js │ │ │ ├── json.js │ │ │ └── markdown.js │ │ ├── keyboard.js │ │ ├── library.js │ │ ├── notifications.js │ │ ├── palette-editor.js │ │ ├── palette.js │ │ ├── projects │ │ │ ├── projectSettings.js │ │ │ ├── projectUserSettings.js │ │ │ ├── projects.js │ │ │ └── tab-versionControl.js │ │ ├── search.js │ │ ├── sidebar.js │ │ ├── state.js │ │ ├── subflow.js │ │ ├── tab-config.js │ │ ├── tab-context.js │ │ ├── tab-info.js │ │ ├── touch │ │ │ └── radialMenu.js │ │ ├── tray.js │ │ ├── typeSearch.js │ │ ├── userSettings.js │ │ ├── utils.js │ │ ├── view-navigator.js │ │ ├── view.js │ │ └── workspaces.js │ ├── user.js │ └── validators.js ├── sass │ ├── ace.scss │ ├── bootstrap.scss │ ├── colors.scss │ ├── debug.scss │ ├── diff.scss │ ├── dragdrop.scss │ ├── dropdownMenu.scss │ ├── editor.scss │ ├── flow.scss │ ├── forms.scss │ ├── header.scss │ ├── jquery.scss │ ├── keyboard.scss │ ├── library.scss │ ├── mixins.scss │ ├── notifications.scss │ ├── palette-editor.scss │ ├── palette.scss │ ├── panels.scss │ ├── popover.scss │ ├── projects.scss │ ├── search.scss │ ├── sidebar.scss │ ├── style.scss │ ├── tab-config.scss │ ├── tab-context.scss │ ├── tab-info.scss │ ├── tabs.scss │ ├── ui │ │ └── common │ │ │ ├── checkboxSet.scss │ │ │ ├── editableList.scss │ │ │ ├── nodeList.scss │ │ │ ├── searchBox.scss │ │ │ ├── stack.scss │ │ │ └── typedInput.scss │ ├── userSettings.scss │ ├── widgetStyle.scss │ ├── workspace.scss │ └── workspaceToolbar.scss ├── templates │ └── index.mst └── vendor │ ├── ace │ ├── LICENSE │ ├── ace.js │ ├── ext-language_tools.js │ ├── ext-searchbox.js │ ├── mode-css.js │ ├── mode-handlebars.js │ ├── mode-html.js │ ├── mode-javascript.js │ ├── mode-json.js │ ├── mode-markdown.js │ ├── mode-properties.js │ ├── mode-python.js │ ├── mode-sql.js │ ├── mode-swift.js │ ├── mode-yaml.js │ ├── snippets │ │ ├── css.js │ │ ├── handlebars.js │ │ ├── html.js │ │ ├── javascript.js │ │ ├── json.js │ │ ├── markdown.js │ │ ├── properties.js │ │ ├── python.js │ │ ├── sql.js │ │ ├── swift.js │ │ ├── text.js │ │ └── yaml.js │ ├── theme-chrome.js │ ├── theme-tomorrow.js │ ├── worker-html.js │ ├── worker-javascript.js │ └── worker-json.js │ ├── bootstrap │ ├── css │ │ ├── bootstrap.css │ │ └── bootstrap.min.css │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ └── js │ │ └── bootstrap.min.js │ ├── d3 │ └── d3.v3.min.js │ ├── font-awesome │ ├── css │ │ └── font-awesome.min.css │ └── fonts │ │ ├── FontAwesome.otf │ │ ├── fontawesome-webfont.eot │ │ ├── fontawesome-webfont.svg │ │ ├── fontawesome-webfont.ttf │ │ ├── fontawesome-webfont.woff │ │ └── fontawesome-webfont.woff2 │ ├── i18next │ └── i18next.min.js │ ├── jquery │ ├── css │ │ └── smoothness │ │ │ ├── images │ │ │ ├── animated-overlay.gif │ │ │ ├── ui-bg_flat_0_aaaaaa_40x100.png │ │ │ ├── ui-bg_flat_75_ffffff_40x100.png │ │ │ ├── ui-bg_glass_55_fbf9ee_1x400.png │ │ │ ├── ui-bg_glass_65_ffffff_1x400.png │ │ │ ├── ui-bg_glass_75_dadada_1x400.png │ │ │ ├── ui-bg_glass_75_e6e6e6_1x400.png │ │ │ ├── ui-bg_glass_95_fef1ec_1x400.png │ │ │ ├── ui-bg_highlight-soft_75_cccccc_1x100.png │ │ │ ├── ui-icons_222222_256x240.png │ │ │ ├── ui-icons_2e83ff_256x240.png │ │ │ ├── ui-icons_454545_256x240.png │ │ │ ├── ui-icons_888888_256x240.png │ │ │ └── ui-icons_cd0a0a_256x240.png │ │ │ └── jquery-ui-1.10.3.custom.min.css │ └── js │ │ ├── jquery-1.11.3.min.js │ │ ├── jquery-ui-1.10.3.custom.min.js │ │ └── jquery.ui.touch-punch.min.js │ ├── jsonata │ ├── formatter.js │ ├── mode-jsonata.js │ ├── snippets-jsonata.js │ └── worker-jsonata.js │ └── marked │ └── marked.min.js ├── lib └── .gitignore ├── nodes ├── 99-sample.html.demo ├── 99-sample.js.demo └── core │ ├── analysis │ ├── 72-sentiment.html │ └── 72-sentiment.js │ ├── core │ ├── 20-inject.html │ ├── 20-inject.js │ ├── 25-catch.html │ ├── 25-catch.js │ ├── 25-status.html │ ├── 25-status.js │ ├── 58-debug.html │ ├── 58-debug.js │ ├── 60-link.html │ ├── 60-link.js │ ├── 75-exec.html │ ├── 75-exec.js │ ├── 80-function.html │ ├── 80-function.js │ ├── 80-template.html │ ├── 80-template.js │ ├── 89-delay.html │ ├── 89-delay.js │ ├── 89-trigger.html │ ├── 89-trigger.js │ ├── 90-comment.html │ ├── 90-comment.js │ ├── 98-unknown.html │ ├── 98-unknown.js │ └── lib │ │ └── debug │ │ ├── debug-utils.js │ │ ├── debug.js │ │ └── view.html │ ├── hardware │ ├── 36-rpi-gpio.html │ ├── 36-rpi-gpio.js │ ├── nrgpio │ └── nrgpio.py │ ├── io │ ├── 05-tls.html │ ├── 05-tls.js │ ├── 10-mqtt.html │ ├── 10-mqtt.js │ ├── 21-httpin.html │ ├── 21-httpin.js │ ├── 21-httprequest.html │ ├── 21-httprequest.js │ ├── 22-websocket.html │ ├── 22-websocket.js │ ├── 23-watch.html │ ├── 23-watch.js │ ├── 31-tcpin.html │ ├── 31-tcpin.js │ ├── 32-udp.html │ ├── 32-udp.js │ └── lib │ │ ├── mqtt.js │ │ └── mqttConnectionPool.js │ ├── locales │ ├── en-US │ │ └── messages.json │ ├── ja │ │ ├── analysis │ │ │ └── 72-sentiment.html │ │ ├── core │ │ │ ├── 20-inject.html │ │ │ ├── 25-catch.html │ │ │ ├── 25-status.html │ │ │ ├── 58-debug.html │ │ │ ├── 60-link.html │ │ │ ├── 75-exec.html │ │ │ ├── 80-function.html │ │ │ ├── 80-template.html │ │ │ ├── 89-delay.html │ │ │ ├── 89-trigger.html │ │ │ ├── 90-comment.html │ │ │ └── 98-unknown.html │ │ ├── hardware │ │ │ └── 36-rpi-gpio.html │ │ ├── io │ │ │ ├── 05-tls.html │ │ │ ├── 10-mqtt.html │ │ │ ├── 21-httpin.html │ │ │ ├── 21-httprequest.html │ │ │ ├── 22-websocket.html │ │ │ ├── 23-watch.html │ │ │ ├── 31-tcpin.html │ │ │ └── 32-udp.html │ │ ├── logic │ │ │ ├── 10-switch.html │ │ │ ├── 15-change.html │ │ │ ├── 16-range.html │ │ │ ├── 17-split.html │ │ │ ├── 18-sort.html │ │ │ └── 19-batch.html │ │ ├── messages.json │ │ ├── parsers │ │ │ ├── 70-CSV.html │ │ │ ├── 70-HTML.html │ │ │ ├── 70-JSON.html │ │ │ ├── 70-XML.html │ │ │ └── 70-YAML.html │ │ └── storage │ │ │ ├── 28-tail.html │ │ │ └── 50-file.html │ └── zh-CN │ │ └── messages.json │ ├── logic │ ├── 10-switch.html │ ├── 10-switch.js │ ├── 15-change.html │ ├── 15-change.js │ ├── 16-range.html │ ├── 16-range.js │ ├── 17-split.html │ ├── 17-split.js │ ├── 18-sort.html │ ├── 18-sort.js │ ├── 19-batch.html │ └── 19-batch.js │ ├── parsers │ ├── 70-CSV.html │ ├── 70-CSV.js │ ├── 70-HTML.html │ ├── 70-HTML.js │ ├── 70-JSON.html │ ├── 70-JSON.js │ ├── 70-XML.html │ ├── 70-XML.js │ ├── 70-YAML.html │ └── 70-YAML.js │ └── storage │ ├── 28-tail.html │ ├── 28-tail.js │ ├── 50-file.html │ └── 50-file.js ├── package.json ├── red.js ├── red ├── api │ ├── admin │ │ ├── context.js │ │ ├── flow.js │ │ ├── flows.js │ │ ├── index.js │ │ └── nodes.js │ ├── auth │ │ ├── clients.js │ │ ├── index.js │ │ ├── permissions.js │ │ ├── strategies.js │ │ ├── tokens.js │ │ └── users.js │ ├── editor │ │ ├── comms.js │ │ ├── credentials.js │ │ ├── index.js │ │ ├── library.js │ │ ├── locales.js │ │ ├── locales │ │ │ ├── en-US │ │ │ │ ├── editor.json │ │ │ │ ├── infotips.json │ │ │ │ └── jsonata.json │ │ │ ├── ja │ │ │ │ ├── editor.json │ │ │ │ ├── infotips.json │ │ │ │ └── jsonata.json │ │ │ └── zh-CN │ │ │ │ ├── editor.json │ │ │ │ ├── infotips.json │ │ │ │ └── jsonata.json │ │ ├── projects │ │ │ └── index.js │ │ ├── settings.js │ │ ├── sshkeys.js │ │ ├── theme.js │ │ └── ui.js │ ├── index.js │ └── util.js ├── red.js └── runtime │ ├── dnr.js │ ├── events.js │ ├── i18n.js │ ├── index.js │ ├── locales │ ├── en-US │ │ └── runtime.json │ └── ja │ │ └── runtime.json │ ├── log.js │ ├── mqttServer.js │ ├── nodes │ ├── Node.js │ ├── context │ │ ├── index.js │ │ ├── localfilesystem.js │ │ └── memory.js │ ├── credentials.js │ ├── flows │ │ ├── Flow.js │ │ ├── index.js │ │ └── util.js │ ├── index.js │ ├── library.js │ └── registry │ │ ├── deprecated.js │ │ ├── index.js │ │ ├── installer.js │ │ ├── loader.js │ │ ├── localfilesystem.js │ │ └── registry.js │ ├── settings.js │ ├── storage │ ├── index.js │ └── localfilesystem │ │ ├── index.js │ │ ├── library.js │ │ ├── projects │ │ ├── Project.js │ │ ├── defaultFileSet.js │ │ ├── git │ │ │ ├── authCache.js │ │ │ ├── authServer.js │ │ │ ├── authWriter.js │ │ │ ├── index.js │ │ │ ├── node-red-ask-pass.sh │ │ │ └── node-red-ssh.sh │ │ ├── index.js │ │ └── ssh │ │ │ ├── index.js │ │ │ └── keygen.js │ │ ├── sessions.js │ │ ├── settings.js │ │ └── util.js │ └── util.js ├── settings.js ├── test ├── _spec.js ├── dnr │ ├── dnr-editor-test │ │ └── package.json │ ├── dnr_mqtt_spec.js │ ├── emptifyNode_spec.js │ ├── nodeInstallation_spec.js │ └── sampleNode.js ├── editor │ ├── editor_helper.js │ ├── pageobjects │ │ ├── editor │ │ │ ├── debugTab_page.js │ │ │ ├── palette_page.js │ │ │ └── workspace_page.js │ │ ├── nodes │ │ │ ├── core │ │ │ │ ├── core │ │ │ │ │ ├── 20-inject_page.js │ │ │ │ │ ├── 58-debug_page.js │ │ │ │ │ ├── 80-function_page.js │ │ │ │ │ └── 80-template_page.js │ │ │ │ ├── io │ │ │ │ │ ├── 21-httpin_page.js │ │ │ │ │ ├── 21-httprequest_page.js │ │ │ │ │ └── 21-httpresponse_page.js │ │ │ │ ├── logic │ │ │ │ │ ├── 15-change_page.js │ │ │ │ │ └── 16-range_page.js │ │ │ │ ├── parsers │ │ │ │ │ └── 70-HTML_page.js │ │ │ │ └── storage │ │ │ │ │ └── 50-filein_page.js │ │ │ ├── node_page.js │ │ │ └── nodefactory_page.js │ │ └── util │ │ │ ├── spec_util_page.js │ │ │ └── util_page.js │ ├── specs │ │ ├── editor │ │ │ └── workspace_uispec.js │ │ └── scenario │ │ │ ├── cookbook_endpoint_uispec.js │ │ │ └── cookbook_uispec.js │ └── wdio.conf.js ├── nodes │ └── core │ │ ├── analysis │ │ └── 72-sentiment_spec.js │ │ ├── core │ │ ├── 20-inject_spec.js │ │ ├── 25-catch_spec.js │ │ ├── 25-status_spec.js │ │ ├── 58-debug_spec.js │ │ ├── 60-link_spec.js │ │ ├── 75-exec_spec.js │ │ ├── 80-function_spec.js │ │ ├── 80-template_spec.js │ │ ├── 89-delay_spec.js │ │ ├── 89-trigger_spec.js │ │ ├── 90-comment_spec.js │ │ └── 98-unknown_spec.js │ │ ├── hardware │ │ └── 36-rpi-gpio_spec.js │ │ ├── io │ │ ├── 21-httprequest_spec.js │ │ ├── 22-websocket_spec.js │ │ ├── 23-watch_spec.js │ │ ├── 31-tcpin_spec.js │ │ ├── 31-tcprequest_spec.js │ │ ├── 32-udpin_spec.js │ │ └── 32-udpout_spec.js │ │ ├── logic │ │ ├── 10-switch_spec.js │ │ ├── 15-change_spec.js │ │ ├── 16-range_spec.js │ │ ├── 17-split_spec.js │ │ ├── 18-sort_spec.js │ │ └── 19-batch_spec.js │ │ ├── parsers │ │ ├── 70-CSV_spec.js │ │ ├── 70-HTML_spec.js │ │ ├── 70-JSON_spec.js │ │ ├── 70-XML_spec.js │ │ └── 70-YAML_spec.js │ │ └── storage │ │ ├── 28-tail_spec.js │ │ └── 50-file_spec.js ├── red │ ├── api │ │ ├── admin │ │ │ ├── context_spec.js │ │ │ ├── flow_spec.js │ │ │ ├── flows_spec.js │ │ │ ├── index_spec.js │ │ │ └── nodes_spec.js │ │ ├── auth │ │ │ ├── clients_spec.js │ │ │ ├── index_spec.js │ │ │ ├── permissions_spec.js │ │ │ ├── strategies_spec.js │ │ │ ├── tokens_spec.js │ │ │ └── users_spec.js │ │ ├── editor │ │ │ ├── comms_spec.js │ │ │ ├── credentials_spec.js │ │ │ ├── index_spec.js │ │ │ ├── library_spec.js │ │ │ ├── locales_spec.js │ │ │ ├── projects │ │ │ │ └── index_spec.js │ │ │ ├── settings_spec.js │ │ │ ├── sshkeys_spec.js │ │ │ ├── theme_spec.js │ │ │ └── ui_spec.js │ │ ├── index_spec.js │ │ └── util_spec.js │ ├── red_spec.js │ └── runtime │ │ ├── events_spec.js │ │ ├── i18n_spec.js │ │ ├── index_spec.js │ │ ├── log_spec.js │ │ ├── nodes │ │ ├── Node_spec.js │ │ ├── context │ │ │ ├── index_spec.js │ │ │ ├── localfilesystem_spec.js │ │ │ └── memory_spec.js │ │ ├── credentials_spec.js │ │ ├── dnr_spec.js │ │ ├── flows │ │ │ ├── Flow_spec.js │ │ │ ├── index_spec.js │ │ │ └── util_spec.js │ │ ├── index_spec.js │ │ ├── library_spec.js │ │ ├── registry │ │ │ ├── deprecated_spec.js │ │ │ ├── index_spec.js │ │ │ ├── installer_spec.js │ │ │ ├── loader_spec.js │ │ │ ├── localfilesystem_spec.js │ │ │ └── registry_spec.js │ │ └── resources │ │ │ ├── local │ │ │ ├── DuffNode │ │ │ │ └── DuffNode.js │ │ │ ├── DuplicateTestNode │ │ │ │ ├── TestNode1.html │ │ │ │ └── TestNode1.js │ │ │ ├── MultipleNodes1 │ │ │ │ ├── MultipleNodes1.html │ │ │ │ └── MultipleNodes1.js │ │ │ ├── NestedDirectoryNode │ │ │ │ └── NestedNode │ │ │ │ │ ├── NestedNode.html │ │ │ │ │ ├── NestedNode.js │ │ │ │ │ ├── icons │ │ │ │ │ └── arrow-in.png │ │ │ │ │ ├── lib │ │ │ │ │ ├── ShouldNotLoad.html │ │ │ │ │ └── ShouldNotLoad.js │ │ │ │ │ └── test │ │ │ │ │ ├── ShouldNotLoad.html │ │ │ │ │ └── ShouldNotLoad.js │ │ │ ├── TestNode1 │ │ │ │ ├── TestNode1.html │ │ │ │ └── TestNode1.js │ │ │ ├── TestNode2 │ │ │ │ ├── TestNode2.html │ │ │ │ └── TestNode2.js │ │ │ ├── TestNode3 │ │ │ │ ├── TestNode3.html │ │ │ │ └── TestNode3.js │ │ │ ├── TestNode4 │ │ │ │ ├── TestNode4.html │ │ │ │ └── TestNode4.js │ │ │ └── TestNodeModule │ │ │ │ └── node_modules │ │ │ │ ├── EmptyModule │ │ │ │ └── file.txt │ │ │ │ ├── TestNodeModule │ │ │ │ ├── TestNodeModule.html │ │ │ │ ├── TestNodeModule.js │ │ │ │ ├── TestNodeModule2.html │ │ │ │ ├── TestNodeModule2.js │ │ │ │ ├── icons │ │ │ │ │ └── arrow-in.png │ │ │ │ └── package.json │ │ │ │ └── VersionMismatchModule │ │ │ │ ├── TestNodeModule.html │ │ │ │ ├── TestNodeModule.js │ │ │ │ ├── TestNodeModule2.html │ │ │ │ ├── TestNodeModule2.js │ │ │ │ ├── icons │ │ │ │ └── file.txt │ │ │ │ └── package.json │ │ │ └── userDir │ │ │ ├── lib │ │ │ └── icons │ │ │ │ ├── file.txt │ │ │ │ └── test_icon.png │ │ │ └── nodes │ │ │ └── TestNode5 │ │ │ ├── TestNode5.html │ │ │ └── TestNode5.js │ │ ├── settings_spec.js │ │ ├── storage │ │ ├── index_spec.js │ │ └── localfilesystem │ │ │ ├── index_spec.js │ │ │ ├── library_spec.js │ │ │ ├── projects │ │ │ ├── Project_spec.js │ │ │ ├── defaultFileSet_spec.js │ │ │ ├── git │ │ │ │ ├── authCache_spec.js │ │ │ │ ├── authServer_spec.js │ │ │ │ ├── authWriter_spec.js │ │ │ │ └── index_spec.js │ │ │ ├── index_spec.js │ │ │ └── ssh │ │ │ │ ├── index_spec.js │ │ │ │ └── keygen_spec.js │ │ │ ├── sessions_spec.js │ │ │ ├── settings_spec.js │ │ │ └── util_spec.js │ │ └── util_spec.js └── resources │ ├── 70-HTML-test-file.html │ ├── examples │ └── one.json │ ├── file-in-node │ └── test.txt │ ├── icons │ └── test_icon.png │ └── ssl │ ├── server.crt │ └── server.key └── yarn.lock /.dnr-editor/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "node-red-project", 3 | "description": "A Node-RED Project", 4 | "version": "0.0.1", 5 | "private": true 6 | } -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | ### What are the steps to reproduce? 23 | 24 | ### What happens? 25 | 26 | ### What do you expect to happen? 27 | 28 | ### Please tell us about your environment: 29 | 30 | - [ ] Node-RED version: 31 | - [ ] node.js version: 32 | - [ ] npm version: 33 | - [ ] Platform/OS: 34 | - [ ] Browser: 35 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | - [ ] Bugfix (non-breaking change which fixes an issue) 14 | - [ ] New feature (non-breaking change which adds functionality) 15 | 16 | 23 | 24 | ## Proposed changes 25 | 26 | 27 | 28 | ## Checklist 29 | 30 | 31 | - [ ] I have read the [contribution guidelines](https://github.com/node-red/node-red/blob/master/CONTRIBUTING.md) 32 | - [ ] For non-bugfix PRs, I have discussed this change on the mailing list/slack team. 33 | - [ ] I have run `grunt` to verify the unit tests pass 34 | - [ ] I have added suitable unit tests to cover the new/changed functionality 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_store 2 | .config.json 3 | .dist 4 | .jshintignore 5 | .npm 6 | .project 7 | .sessions.json 8 | .settings 9 | .tern-project 10 | *.backup 11 | *_cred* 12 | coverage 13 | credentials.json 14 | flows*.json 15 | nodes/node-red-nodes/ 16 | node_modules 17 | public 18 | locales/zz-ZZ 19 | nodes/core/locales/zz-ZZ 20 | 21 | dnr-editor-test 22 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi": true, // allow missing semicolons 3 | "curly": true, // require braces 4 | "eqnull": true, // ignore ==null 5 | //"eqeqeq": true, // enforce === 6 | "freeze": true, // don't allow override 7 | "indent": 4, // default indent of 4 8 | "forin": true, // require property filtering in "for in" loops 9 | "immed": true, // require immediate functions to be wrapped in ( ) 10 | "nonbsp": true, // warn on unexpected whitespace breaking chars 11 | //"strict": true, // commented out for now as it causes 100s of warnings, but want to get there eventually 12 | //"unused": true, // Check for unused functions and variables 13 | "loopfunc": true, // allow functions to be defined in loops 14 | //"expr": true, // allow ternery operator syntax... 15 | "shadow": true, // allow variable shadowing (re-use of names...) 16 | "sub": true, // don't warn that foo['bar'] should be written as foo.bar 17 | "proto": true, // allow setting of __proto__ in node < v0.12, 18 | "esversion": 6 // allow es6 19 | } 20 | -------------------------------------------------------------------------------- /.nodemonignore: -------------------------------------------------------------------------------- 1 | /Gruntfile.js 2 | /.git/* 3 | /lib/* 4 | *.backup 5 | /public/* 6 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | .settings 2 | .jshintignore 3 | .jshintrc 4 | .project 5 | .tern-project 6 | .travis.yml 7 | .git 8 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | matrix: 4 | include: 5 | - node_js: "10" 6 | script: 7 | - ./node_modules/.bin/grunt && istanbul report text && ( cat coverage/lcov.info | $(npm get prefix)/bin/coveralls || true ) && rm -rf coverage 8 | before_script: 9 | - npm install -g istanbul coveralls 10 | - node_js: "8" 11 | - node_js: "6" 12 | - node_js: "4" 13 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | 8 | { 9 | "type": "node", 10 | "request": "launch", 11 | "name": "Test DNR", 12 | "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", 13 | "args": [ 14 | "-u", 15 | "bdd", 16 | "--timeout", 17 | "10000", 18 | "--colors", 19 | "${workspaceFolder}/test/dnr" 20 | ], 21 | "internalConsoleOptions": "openOnSessionStart" 22 | }, 23 | { 24 | "type": "node", 25 | "request": "launch", 26 | "name": "Launch DNR", 27 | "program": "${workspaceFolder}/red.js", 28 | "args": ["-s", "~/.dnr-editor/settings.js", "--inspect-brk"] 29 | } 30 | ] 31 | } -------------------------------------------------------------------------------- /bin/node-red-pi: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright JS Foundation and other contributors, http://js.foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | # 17 | 18 | # Separate out node/v8 options from node-red ones 19 | OPTIONS="" 20 | ARGS="" 21 | 22 | for arg in "$@" 23 | do 24 | case $arg in 25 | --userDir|--settings|--help) ARGS="$ARGS $arg";; 26 | --*) OPTIONS="$OPTIONS $arg";; 27 | *) ARGS="$ARGS $arg";; 28 | esac 29 | done 30 | 31 | # Find the real location of this script 32 | CURRENT_PATH=`pwd` 33 | SCRIPT_PATH="${BASH_SOURCE[0]}"; 34 | while [ -h "${SCRIPT_PATH}" ]; do 35 | cd "`dirname "${SCRIPT_PATH}"`" 36 | SCRIPT_PATH="$(readlink "`basename "${SCRIPT_PATH}"`")"; 37 | done 38 | cd "`dirname "${SCRIPT_PATH}"`" > /dev/null 39 | SCRIPT_PATH="`pwd`"; 40 | cd $CURRENT_PATH 41 | 42 | # Run Node-RED 43 | exec /usr/bin/env node $OPTIONS $SCRIPT_PATH/../red.js $ARGS 44 | -------------------------------------------------------------------------------- /dnr-node-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | mkdir node_modules 4 | npm pack $1 | xargs tar xvzf 5 | mv package node_modules/$1 6 | rm *.tgz 7 | 8 | -------------------------------------------------------------------------------- /editor/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/favicon.ico -------------------------------------------------------------------------------- /editor/icons/alert.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/alert.png -------------------------------------------------------------------------------- /editor/icons/arduino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/arduino.png -------------------------------------------------------------------------------- /editor/icons/arrow-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/arrow-in.png -------------------------------------------------------------------------------- /editor/icons/batch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/batch.png -------------------------------------------------------------------------------- /editor/icons/bluetooth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/bluetooth.png -------------------------------------------------------------------------------- /editor/icons/bridge-dash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/bridge-dash.png -------------------------------------------------------------------------------- /editor/icons/bridge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/bridge.png -------------------------------------------------------------------------------- /editor/icons/cog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/cog.png -------------------------------------------------------------------------------- /editor/icons/comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/comment.png -------------------------------------------------------------------------------- /editor/icons/db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/db.png -------------------------------------------------------------------------------- /editor/icons/debug.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/debug.png -------------------------------------------------------------------------------- /editor/icons/envelope.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/envelope.png -------------------------------------------------------------------------------- /editor/icons/feed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/feed.png -------------------------------------------------------------------------------- /editor/icons/file-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/file-in.png -------------------------------------------------------------------------------- /editor/icons/file-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/file-out.png -------------------------------------------------------------------------------- /editor/icons/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/file.png -------------------------------------------------------------------------------- /editor/icons/function.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/function.png -------------------------------------------------------------------------------- /editor/icons/hash.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/hash.png -------------------------------------------------------------------------------- /editor/icons/inject.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/inject.png -------------------------------------------------------------------------------- /editor/icons/join.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/join.png -------------------------------------------------------------------------------- /editor/icons/leveldb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/leveldb.png -------------------------------------------------------------------------------- /editor/icons/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/light.png -------------------------------------------------------------------------------- /editor/icons/link-out.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/link-out.png -------------------------------------------------------------------------------- /editor/icons/mongodb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/mongodb.png -------------------------------------------------------------------------------- /editor/icons/mouse.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/mouse.png -------------------------------------------------------------------------------- /editor/icons/node-changed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/node-changed.png -------------------------------------------------------------------------------- /editor/icons/node-error.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/node-error.png -------------------------------------------------------------------------------- /editor/icons/parser-csv.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/parser-csv.png -------------------------------------------------------------------------------- /editor/icons/parser-html.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/parser-html.png -------------------------------------------------------------------------------- /editor/icons/parser-json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/parser-json.png -------------------------------------------------------------------------------- /editor/icons/parser-xml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/parser-xml.png -------------------------------------------------------------------------------- /editor/icons/parser-yaml.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/parser-yaml.png -------------------------------------------------------------------------------- /editor/icons/range.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/range.png -------------------------------------------------------------------------------- /editor/icons/redis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/redis.png -------------------------------------------------------------------------------- /editor/icons/rpi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/rpi.png -------------------------------------------------------------------------------- /editor/icons/serial.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/serial.png -------------------------------------------------------------------------------- /editor/icons/sort.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/sort.png -------------------------------------------------------------------------------- /editor/icons/split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/split.png -------------------------------------------------------------------------------- /editor/icons/subflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/subflow.png -------------------------------------------------------------------------------- /editor/icons/swap.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/swap.png -------------------------------------------------------------------------------- /editor/icons/switch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/switch.png -------------------------------------------------------------------------------- /editor/icons/template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/template.png -------------------------------------------------------------------------------- /editor/icons/timer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/timer.png -------------------------------------------------------------------------------- /editor/icons/trigger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/trigger.png -------------------------------------------------------------------------------- /editor/icons/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/twitter.png -------------------------------------------------------------------------------- /editor/icons/watch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/watch.png -------------------------------------------------------------------------------- /editor/icons/white-globe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/icons/white-globe.png -------------------------------------------------------------------------------- /editor/images/deploy-flows-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/deploy-flows-o.png -------------------------------------------------------------------------------- /editor/images/deploy-flows.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/deploy-flows.png -------------------------------------------------------------------------------- /editor/images/deploy-full-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/deploy-full-o.png -------------------------------------------------------------------------------- /editor/images/deploy-full.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/deploy-full.png -------------------------------------------------------------------------------- /editor/images/deploy-nodes-o.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/deploy-nodes-o.png -------------------------------------------------------------------------------- /editor/images/deploy-nodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/deploy-nodes.png -------------------------------------------------------------------------------- /editor/images/grip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/grip.png -------------------------------------------------------------------------------- /editor/images/node-red-256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/node-red-256.png -------------------------------------------------------------------------------- /editor/images/node-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/node-red.png -------------------------------------------------------------------------------- /editor/images/pw_maze_white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/pw_maze_white.png -------------------------------------------------------------------------------- /editor/images/subflow_tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/subflow_tab.png -------------------------------------------------------------------------------- /editor/images/typedInput/09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/09.png -------------------------------------------------------------------------------- /editor/images/typedInput/az.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/az.png -------------------------------------------------------------------------------- /editor/images/typedInput/bin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/bin.png -------------------------------------------------------------------------------- /editor/images/typedInput/bool.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/bool.png -------------------------------------------------------------------------------- /editor/images/typedInput/env.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/env.png -------------------------------------------------------------------------------- /editor/images/typedInput/expr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/expr.png -------------------------------------------------------------------------------- /editor/images/typedInput/json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/json.png -------------------------------------------------------------------------------- /editor/images/typedInput/re.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/images/typedInput/re.png -------------------------------------------------------------------------------- /editor/js/events.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | RED.events = (function() { 18 | var handlers = {}; 19 | 20 | function on(evt,func) { 21 | handlers[evt] = handlers[evt]||[]; 22 | handlers[evt].push(func); 23 | } 24 | function off(evt,func) { 25 | var handler = handlers[evt]; 26 | if (handler) { 27 | for (var i=0;ili>a { 24 | color: #444; 25 | } 26 | -------------------------------------------------------------------------------- /editor/sass/dragdrop.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | #dropTarget { 18 | position: absolute; 19 | top: 0; bottom: 0; 20 | left: 0; right: 0; 21 | background: rgba(0,0,0,0.1); 22 | display:table; 23 | width: 100%; 24 | height: 100%; 25 | display: none; 26 | z-index:100; 27 | } 28 | #dropTarget div { 29 | display: table-cell; 30 | vertical-align: middle; 31 | text-align: center; 32 | font-size: 40px; 33 | color: #fff; 34 | } 35 | #dropTarget div i { 36 | font-size: 80px; 37 | } 38 | -------------------------------------------------------------------------------- /editor/sass/library.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | #node-select-library { 18 | overflow: hidden; 19 | } 20 | #node-select-library ul { 21 | list-style: none; 22 | padding: 0px; 23 | margin: 2px; 24 | } 25 | #node-select-library li { 26 | cursor: pointer; 27 | } 28 | #node-select-library li.list-selected { 29 | background: #eee; 30 | } 31 | #node-select-library li.list-hover { 32 | background: #ffffd0; 33 | } 34 | -------------------------------------------------------------------------------- /editor/sass/notifications.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | #notifications { 18 | z-index: 100; 19 | width: 500px; 20 | margin-left: -250px; 21 | left: 50%; 22 | position: absolute; 23 | top: 1px; 24 | } 25 | .notification { 26 | box-sizing: border-box; 27 | position: relative; 28 | padding: 14px 18px; 29 | margin-bottom: 4px; 30 | box-shadow: 0 1px 1px 1px rgba(0,0,0, 0.15); 31 | background-color: #fff; 32 | color: #666; 33 | border: 1px solid #325C80; 34 | border-left-width: 16px; 35 | overflow: hidden; 36 | } 37 | .notification p:first-child { 38 | font-size: 1.1em; 39 | font-weight: 400; 40 | } 41 | .notification a { 42 | text-decoration: none; 43 | &:hover { 44 | text-decoration: underline; 45 | } 46 | } 47 | 48 | .notification-success { 49 | border-color: #4B8400; 50 | } 51 | .notification-warning { 52 | border-color: #D74108; 53 | } 54 | .notification-error { 55 | border-color: #AD1625; 56 | } 57 | -------------------------------------------------------------------------------- /editor/sass/panels.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | 18 | .red-ui-panels { 19 | position: relative; 20 | 21 | & > div { 22 | // border: 1px solid red; 23 | box-sizing: border-box; 24 | } 25 | } 26 | 27 | .red-ui-panels-separator { 28 | border-top: 1px solid $secondary-border-color; 29 | border-bottom: 1px solid $secondary-border-color; 30 | height: 7px; 31 | box-sizing: border-box; 32 | cursor: ns-resize; 33 | background: $background-color url(images/grip.png) no-repeat 50% 50%; 34 | } 35 | 36 | 37 | .red-ui-panel { 38 | overflow: auto; 39 | height: calc(50% - 4px); 40 | } 41 | -------------------------------------------------------------------------------- /editor/sass/tab-context.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | .sidebar-context-stack { 18 | position: absolute; 19 | top: 0; 20 | bottom: 0; 21 | left: 0; 22 | right: 0; 23 | overflow-y: scroll; 24 | 25 | .palette-category { 26 | &:not(.palette-category-expanded) button { 27 | display: none; 28 | } 29 | } 30 | } 31 | 32 | .sidebar-context-property { 33 | position: relative; 34 | .debug-message-tools { 35 | right: 0px; 36 | margin-right: 5px; 37 | display: none; 38 | } 39 | &:hover .debug-message-tools { 40 | display: inline-block; 41 | } 42 | } 43 | .sidebar-context-updated { 44 | text-align: right; 45 | font-size: 11px; 46 | color: #bbb; 47 | padding: 1px 3px; 48 | } 49 | .sidebar-context-property-storename { 50 | display: block; 51 | font-size: 0.8em; 52 | font-style: italic; 53 | color: #aaa; 54 | } 55 | -------------------------------------------------------------------------------- /editor/sass/ui/common/checkboxSet.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | .red-ui-checkboxSet { 17 | width: 15px; 18 | display: inline-block; 19 | color: #888; 20 | cursor: pointer; 21 | input { 22 | display:none; 23 | } 24 | 25 | &.disabled { 26 | pointer-events: none; 27 | color: #ddd; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /editor/sass/ui/common/nodeList.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | .red-ui-nodeList { 17 | .red-ui-editableList-container { 18 | padding: 0; 19 | li { 20 | padding: 2px 5px; 21 | margin: 0; 22 | white-space: nowrap; 23 | border: none; 24 | background: #fefefe; 25 | &:hover { 26 | background: #f0f0f0; 27 | } 28 | 29 | i.fa-angle-right { 30 | text-align: center; 31 | width: 15px; 32 | transition: transform 0.1s ease-in-out; 33 | } 34 | .expandable { 35 | cursor: pointer; 36 | } 37 | .expanded i.fa-angle-right { 38 | transform: rotate(90deg); 39 | } 40 | .meta { 41 | float: right; 42 | input[type="checkbox"] { 43 | margin: 0; 44 | } 45 | } 46 | .red-ui-editableList-item-content.disabled { 47 | color: #ccc; 48 | } 49 | &.red-ui-editableList-section-header { 50 | background: #f0f0f0; 51 | .red-ui-editableList-item-content.disabled { 52 | color: #bbb; 53 | } 54 | } 55 | 56 | } 57 | } 58 | .red-ui-editableList-header { 59 | text-align: left; 60 | &>span:last-child { 61 | float: right; 62 | font-size: 14px; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /editor/sass/ui/common/searchBox.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | 18 | .red-ui-searchBox-container { 19 | position: relative; 20 | i { 21 | font-size: 10px; 22 | color: #666; 23 | } 24 | i.fa-search { 25 | position: absolute; 26 | pointer-events: none; 27 | left: 8px; 28 | top: 9px; 29 | } 30 | i.fa-times { 31 | position: absolute; 32 | right: 5px; 33 | top: 9px; 34 | } 35 | input { 36 | border-radius: 0; 37 | border: none; 38 | width: 100%; 39 | box-shadow: none; 40 | -webkit-box-shadow: none; 41 | padding: 3px 17px 3px 22px; 42 | margin: 0px; 43 | height: 30px; 44 | box-sizing:border-box; 45 | 46 | &:focus { 47 | border: none; 48 | box-shadow: none; 49 | -webkit-box-shadow: none; 50 | } 51 | } 52 | a { 53 | position: absolute; 54 | right: 0; 55 | top: 0; 56 | bottom: 0; 57 | width: 20px; 58 | display: none; 59 | } 60 | .red-ui-searchBox-resultCount { 61 | position: absolute; 62 | right: 18px; 63 | top: 4px; 64 | background: #eee; 65 | color: #666; 66 | padding: 1px 8px; 67 | font-size: 9px; 68 | border-radius: 4px; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /editor/sass/ui/common/stack.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | .red-ui-stack { 18 | background: white; 19 | .palette-category { 20 | background: white; 21 | 22 | &:last-child { 23 | border-bottom: none; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /editor/sass/widgetStyle.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | @import "colors"; 18 | @import "mixins"; 19 | 20 | @import "forms"; 21 | @import "jquery"; 22 | @import "typedInput"; 23 | @import "editableList"; 24 | -------------------------------------------------------------------------------- /editor/vendor/ace/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010, Ajax.org B.V. 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | * Redistributions of source code must retain the above copyright 7 | notice, this list of conditions and the following disclaimer. 8 | * Redistributions in binary form must reproduce the above copyright 9 | notice, this list of conditions and the following disclaimer in the 10 | documentation and/or other materials provided with the distribution. 11 | * Neither the name of Ajax.org B.V. nor the 12 | names of its contributors may be used to endorse or promote products 13 | derived from this software without specific prior written permission. 14 | 15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 16 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 17 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 18 | DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY 19 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 20 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 21 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 22 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 24 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /editor/vendor/ace/mode-properties.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e=/\\u[0-9a-fA-F]{4}|\\/;this.$rules={start:[{token:"comment",regex:/[!#].*$/},{token:"keyword",regex:/[=:]$/},{token:"keyword",regex:/[=:]/,next:"value"},{token:"constant.language.escape",regex:e},{defaultToken:"variable"}],value:[{regex:/\\$/,token:"string",next:"value"},{regex:/$/,token:"string",next:"start"},{token:"constant.language.escape",regex:e},{defaultToken:"string"}]}};r.inherits(s,i),t.PropertiesHighlightRules=s}),ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./properties_highlight_rules").PropertiesHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.$id="ace/mode/properties"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /editor/vendor/ace/mode-sql.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/mode/sql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text_highlight_rules").TextHighlightRules,s=function(){var e="select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|when|else|end|type|left|right|join|on|outer|desc|asc|union|create|table|primary|key|if|foreign|not|references|default|null|inner|cross|natural|database|drop|grant",t="true|false",n="avg|count|first|last|max|min|sum|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl",r="int|numeric|decimal|date|varchar|char|bigint|float|double|bit|binary|text|set|timestamp|money|real|number|integer",i=this.createKeywordMapper({"support.function":n,keyword:e,"constant.language":t,"storage.type":r},"identifier",!0);this.$rules={start:[{token:"comment",regex:"--.*$"},{token:"comment",start:"/\\*",end:"\\*/"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"},{token:"string",regex:"`.*?`"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:i,regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"paren.lparen",regex:"[\\(]"},{token:"paren.rparen",regex:"[\\)]"},{token:"text",regex:"\\s+"}]},this.normalizeRules()};r.inherits(s,i),t.SqlHighlightRules=s}),ace.define("ace/mode/sql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sql_highlight_rules"],function(e,t,n){"use strict";var r=e("../lib/oop"),i=e("./text").Mode,s=e("./sql_highlight_rules").SqlHighlightRules,o=function(){this.HighlightRules=s,this.$behaviour=this.$defaultBehaviour};r.inherits(o,i),function(){this.lineCommentStart="--",this.$id="ace/mode/sql"}.call(o.prototype),t.Mode=o}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/handlebars.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/handlebars",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="handlebars"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/json.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/json",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="json"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/markdown.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/markdown",["require","exports","module"],function(e,t,n){"use strict";t.snippetText='# Markdown\n\n# Includes octopress (http://octopress.org/) snippets\n\nsnippet [\n [${1:text}](http://${2:address} "${3:title}")\nsnippet [*\n [${1:link}](${2:`@*`} "${3:title}")${4}\n\nsnippet [:\n [${1:id}]: http://${2:url} "${3:title}"\nsnippet [:*\n [${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ![\n ![${1:alttext}](${2:/images/image.jpg} "${3:title}")\nsnippet ![*\n ![${1:alt}](${2:`@*`} "${3:title}")${4}\n\nsnippet ![:\n ![${1:id}]: ${2:url} "${3:title}"\nsnippet ![:*\n ![${1:id}]: ${2:`@*`} "${3:title}"\n\nsnippet ===\nregex /^/=+/=*//\n ${PREV_LINE/./=/g}\n \n ${0}\nsnippet ---\nregex /^/-+/-*//\n ${PREV_LINE/./-/g}\n \n ${0}\nsnippet blockquote\n {% blockquote %}\n ${1:quote}\n {% endblockquote %}\n\nsnippet blockquote-author\n {% blockquote ${1:author}, ${2:title} %}\n ${3:quote}\n {% endblockquote %}\n\nsnippet blockquote-link\n {% blockquote ${1:author} ${2:URL} ${3:link_text} %}\n ${4:quote}\n {% endblockquote %}\n\nsnippet bt-codeblock-short\n ```\n ${1:code_snippet}\n ```\n\nsnippet bt-codeblock-full\n ``` ${1:language} ${2:title} ${3:URL} ${4:link_text}\n ${5:code_snippet}\n ```\n\nsnippet codeblock-short\n {% codeblock %}\n ${1:code_snippet}\n {% endcodeblock %}\n\nsnippet codeblock-full\n {% codeblock ${1:title} lang:${2:language} ${3:URL} ${4:link_text} %}\n ${5:code_snippet}\n {% endcodeblock %}\n\nsnippet gist-full\n {% gist ${1:gist_id} ${2:filename} %}\n\nsnippet gist-short\n {% gist ${1:gist_id} %}\n\nsnippet img\n {% img ${1:class} ${2:URL} ${3:width} ${4:height} ${5:title_text} ${6:alt_text} %}\n\nsnippet youtube\n {% youtube ${1:video_id} %}\n\n# The quote should appear only once in the text. It is inherently part of it.\n# See http://octopress.org/docs/plugins/pullquote/ for more info.\n\nsnippet pullquote\n {% pullquote %}\n ${1:text} {" ${2:quote} "} ${3:text}\n {% endpullquote %}\n',t.scope="markdown"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/properties.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/properties",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="properties"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/sql.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/sql",["require","exports","module"],function(e,t,n){"use strict";t.snippetText="snippet tbl\n create table ${1:table} (\n ${2:columns}\n );\nsnippet col\n ${1:name} ${2:type} ${3:default ''} ${4:not null}\nsnippet ccol\n ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\nsnippet ncol\n ${1:name} number ${3:default 0} ${4:not null}\nsnippet dcol\n ${1:name} date ${3:default sysdate} ${4:not null}\nsnippet ind\n create index ${3:$1_$2} on ${1:table}(${2:column});\nsnippet uind\n create unique index ${1:name} on ${2:table}(${3:column});\nsnippet tblcom\n comment on table ${1:table} is '${2:comment}';\nsnippet colcom\n comment on column ${1:table}.${2:column} is '${3:comment}';\nsnippet addcol\n alter table ${1:table} add (${2:column} ${3:type});\nsnippet seq\n create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\nsnippet s*\n select * from ${1:table}\n",t.scope="sql"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/swift.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/swift",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="swift"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/text.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/text",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="text"}) -------------------------------------------------------------------------------- /editor/vendor/ace/snippets/yaml.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/yaml",["require","exports","module"],function(e,t,n){"use strict";t.snippetText=undefined,t.scope="yaml"}) -------------------------------------------------------------------------------- /editor/vendor/bootstrap/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/bootstrap/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /editor/vendor/bootstrap/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/bootstrap/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /editor/vendor/font-awesome/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/font-awesome/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /editor/vendor/font-awesome/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/font-awesome/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /editor/vendor/font-awesome/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/font-awesome/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /editor/vendor/font-awesome/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/font-awesome/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /editor/vendor/font-awesome/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/font-awesome/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/animated-overlay.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/animated-overlay.gif -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-icons_222222_256x240.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-icons_2e83ff_256x240.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-icons_454545_256x240.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-icons_888888_256x240.png -------------------------------------------------------------------------------- /editor/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/editor/vendor/jquery/css/smoothness/images/ui-icons_cd0a0a_256x240.png -------------------------------------------------------------------------------- /editor/vendor/jquery/js/jquery.ui.touch-punch.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * jQuery UI Touch Punch 0.2.3 3 | * 4 | * Copyright 2011–2014, Dave Furfero 5 | * Dual licensed under the MIT or GPL Version 2 licenses. 6 | * 7 | * Depends: 8 | * jquery.ui.widget.js 9 | * jquery.ui.mouse.js 10 | */ 11 | !function(a){function f(a,b){if(!(a.originalEvent.touches.length>1)){a.preventDefault();var c=a.originalEvent.changedTouches[0],d=document.createEvent("MouseEvents");d.initMouseEvent(b,!0,!0,window,1,c.screenX,c.screenY,c.clientX,c.clientY,!1,!1,!1,!1,0,null),a.target.dispatchEvent(d)}}if(a.support.touch="ontouchend"in document,a.support.touch){var e,b=a.ui.mouse.prototype,c=b._mouseInit,d=b._mouseDestroy;b._touchStart=function(a){var b=this;!e&&b._mouseCapture(a.originalEvent.changedTouches[0])&&(e=!0,b._touchMoved=!1,f(a,"mouseover"),f(a,"mousemove"),f(a,"mousedown"))},b._touchMove=function(a){e&&(this._touchMoved=!0,f(a,"mousemove"))},b._touchEnd=function(a){e&&(f(a,"mouseup"),f(a,"mouseout"),this._touchMoved||f(a,"click"),e=!1)},b._mouseInit=function(){var b=this;b.element.bind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),c.call(b)},b._mouseDestroy=function(){var b=this;b.element.unbind({touchstart:a.proxy(b,"_touchStart"),touchmove:a.proxy(b,"_touchMove"),touchend:a.proxy(b,"_touchEnd")}),d.call(b)}}}(jQuery); -------------------------------------------------------------------------------- /editor/vendor/jsonata/snippets-jsonata.js: -------------------------------------------------------------------------------- 1 | ace.define("ace/snippets/jsonata",["require","exports","module"], function(require, exports, module) { 2 | "use strict"; 3 | var snippetText = ""; 4 | for (var fn in jsonata.functions) { 5 | if (jsonata.functions.hasOwnProperty(fn)) { 6 | snippetText += "# "+fn+"\nsnippet "+fn+"\n\t"+jsonata.getFunctionSnippet(fn)+"\n" 7 | } 8 | } 9 | exports.snippetText = snippetText; 10 | exports.scope = "jsonata"; 11 | }); 12 | -------------------------------------------------------------------------------- /lib/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | -------------------------------------------------------------------------------- /nodes/core/analysis/72-sentiment.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(RED) { 3 | "use strict"; 4 | var sentiment = require('sentiment'); 5 | 6 | function SentimentNode(n) { 7 | RED.nodes.createNode(this,n); 8 | this.property = n.property||"payload"; 9 | var node = this; 10 | 11 | this.on("input", function(msg) { 12 | var value = RED.util.getMessageProperty(msg,node.property); 13 | if (value !== undefined) { 14 | sentiment(value, msg.overrides || null, function (err, result) { 15 | msg.sentiment = result; 16 | node.send(msg); 17 | }); 18 | } 19 | else { node.send(msg); } // If no matching property - just pass it on. 20 | }); 21 | } 22 | RED.nodes.registerType("sentiment",SentimentNode); 23 | } 24 | -------------------------------------------------------------------------------- /nodes/core/core/25-catch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | module.exports = function(RED) { 18 | "use strict"; 19 | 20 | function CatchNode(n) { 21 | RED.nodes.createNode(this,n); 22 | var node = this; 23 | this.scope = n.scope; 24 | this.on("input",function(msg) { 25 | this.send(msg); 26 | }); 27 | } 28 | 29 | RED.nodes.registerType("catch",CatchNode); 30 | } 31 | -------------------------------------------------------------------------------- /nodes/core/core/25-status.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | module.exports = function(RED) { 18 | "use strict"; 19 | 20 | function StatusNode(n) { 21 | RED.nodes.createNode(this,n); 22 | var node = this; 23 | this.scope = n.scope; 24 | this.on("input", function(msg) { 25 | this.send(msg); 26 | }); 27 | } 28 | 29 | RED.nodes.registerType("status",StatusNode); 30 | } 31 | -------------------------------------------------------------------------------- /nodes/core/core/60-link.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | module.exports = function(RED) { 18 | "use strict"; 19 | 20 | function LinkInNode(n) { 21 | RED.nodes.createNode(this,n); 22 | var node = this; 23 | var event = "node:"+n.id; 24 | var handler = function(msg) { 25 | msg._event = n.event; 26 | node.receive(msg); 27 | } 28 | RED.events.on(event,handler); 29 | this.on("input", function(msg) { 30 | this.send(msg); 31 | }); 32 | this.on("close",function() { 33 | RED.events.removeListener(event,handler); 34 | }); 35 | } 36 | 37 | RED.nodes.registerType("link in",LinkInNode); 38 | 39 | function LinkOutNode(n) { 40 | RED.nodes.createNode(this,n); 41 | var node = this; 42 | var event = "node:"+n.id; 43 | this.on("input", function(msg) { 44 | msg._event = event; 45 | RED.events.emit(event,msg) 46 | this.send(msg); 47 | }); 48 | } 49 | RED.nodes.registerType("link out",LinkOutNode); 50 | } 51 | -------------------------------------------------------------------------------- /nodes/core/core/90-comment.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | module.exports = function(RED) { 18 | "use strict"; 19 | function CommentNode(n) { 20 | RED.nodes.createNode(this,n); 21 | } 22 | RED.nodes.registerType("comment",CommentNode); 23 | } 24 | -------------------------------------------------------------------------------- /nodes/core/core/98-unknown.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 18 | 19 | 37 | -------------------------------------------------------------------------------- /nodes/core/core/98-unknown.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | module.exports = function(RED) { 18 | "use strict"; 19 | function UnknownNode(n) { 20 | RED.nodes.createNode(this,n); 21 | } 22 | RED.nodes.registerType("unknown",UnknownNode); 23 | } 24 | -------------------------------------------------------------------------------- /nodes/core/core/lib/debug/debug.js: -------------------------------------------------------------------------------- 1 | $(function() { 2 | RED.i18n.init(function() { 3 | var options = { 4 | messageMouseEnter: function(sourceId) { 5 | window.opener.postMessage({event:"mouseEnter",id:sourceId},'*'); 6 | }, 7 | messageMouseLeave: function(sourceId) { 8 | window.opener.postMessage({event:"mouseLeave",id:sourceId},'*'); 9 | }, 10 | messageSourceClick: function(sourceId) { 11 | window.opener.postMessage({event:"mouseClick",id:sourceId},'*'); 12 | }, 13 | clear: function() { 14 | window.opener.postMessage({event:"clear"},'*'); 15 | } 16 | } 17 | 18 | var uiComponents = RED.debug.init(options); 19 | 20 | $(".debug-window").append(uiComponents.content); 21 | 22 | window.addEventListener('message',function(evt) { 23 | if (evt.data.event === "message") { 24 | RED.debug.handleDebugMessage(evt.data.msg); 25 | } else if (evt.data.event === "workspaceChange") { 26 | RED.debug.refreshMessageList(evt.data.activeWorkspace); 27 | } else if (evt.data.event === "projectChange") { 28 | RED.debug.clearMessageList(true); 29 | } 30 | },false); 31 | }) 32 | }); 33 | -------------------------------------------------------------------------------- /nodes/core/core/lib/debug/view.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Node-RED Debug Tools 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /nodes/core/hardware/nrgpio: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright JS Foundation and other contributors, http://js.foundation 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # http://www.apache.org/licenses/LICENSE-2.0 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | # 15 | 16 | BASEDIR=$(dirname $0) 17 | python -u $BASEDIR/nrgpio.py $@ 18 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/analysis/72-sentiment.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 36 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/20-inject.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 35 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/25-catch.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 37 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/25-status.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/58-debug.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | 27 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/60-link.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 24 | 25 | 32 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/80-template.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 48 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/89-delay.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 31 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/89-trigger.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/90-comment.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/core/98-unknown.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 25 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/io/05-tls.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/io/22-websocket.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 21 | 22 | 29 | 30 | 33 | 34 | 37 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/io/23-watch.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/io/31-tcpin.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 21 | 22 | 29 | 30 | 36 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/io/32-udp.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 22 | 23 | 29 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/logic/10-switch.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 40 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/logic/15-change.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/logic/16-range.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/logic/18-sort.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 41 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/logic/19-batch.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 35 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/parsers/70-CSV.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 45 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/parsers/70-HTML.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 34 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/parsers/70-XML.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 50 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/parsers/70-YAML.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 35 | -------------------------------------------------------------------------------- /nodes/core/locales/ja/storage/28-tail.html: -------------------------------------------------------------------------------- 1 | 16 | 17 | 26 | -------------------------------------------------------------------------------- /nodes/core/parsers/70-YAML.js: -------------------------------------------------------------------------------- 1 | 2 | module.exports = function(RED) { 3 | "use strict"; 4 | var yaml = require('js-yaml'); 5 | function YAMLNode(n) { 6 | RED.nodes.createNode(this,n); 7 | this.property = n.property||"payload"; 8 | var node = this; 9 | this.on("input", function(msg) { 10 | var value = RED.util.getMessageProperty(msg,node.property); 11 | if (value !== undefined) { 12 | if (typeof value === "string") { 13 | try { 14 | value = yaml.load(value); 15 | RED.util.setMessageProperty(msg,node.property,value); 16 | node.send(msg); 17 | } 18 | catch(e) { node.error(e.message,msg); } 19 | } 20 | else if (typeof value === "object") { 21 | if (!Buffer.isBuffer(value)) { 22 | try { 23 | value = yaml.dump(value); 24 | RED.util.setMessageProperty(msg,node.property,value); 25 | node.send(msg); 26 | } 27 | catch(e) { 28 | node.error(RED._("yaml.errors.dropped-error")); 29 | } 30 | } 31 | else { node.warn(RED._("yaml.errors.dropped-object")); } 32 | } 33 | else { node.warn(RED._("yaml.errors.dropped")); } 34 | } 35 | else { node.send(msg); } // If no payload - just pass it on. 36 | }); 37 | } 38 | RED.nodes.registerType("yaml",YAMLNode); 39 | }; 40 | -------------------------------------------------------------------------------- /red/api/auth/clients.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var clients = [ 18 | {id:"node-red-editor",secret:"not_available"}, 19 | {id:"node-red-admin",secret:"not_available"} 20 | ]; 21 | 22 | module.exports = { 23 | get: function(id) { 24 | for (var i=0;i= 1) { 41 | lang = acceptedLanguages[0]; 42 | } 43 | return lang; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /red/runtime/events.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var events = require("events"); 18 | 19 | module.exports = new events.EventEmitter(); 20 | -------------------------------------------------------------------------------- /red/runtime/mqttServer.js: -------------------------------------------------------------------------------- 1 | var mosca = require('mosca') 2 | 3 | function start(httpServer, path){ 4 | console.log(path) 5 | var mqttServ = mosca.Server({interfaces:[]}) 6 | mqttServ.attachHttpServer(httpServer, path) 7 | mqttServ.on('published', (d)=>{}) 8 | } 9 | 10 | module.exports = { 11 | start: start 12 | } 13 | 14 | 15 | -------------------------------------------------------------------------------- /red/runtime/nodes/registry/deprecated.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var nodes = { 18 | "irc in": {module:"node-red-node-irc"}, 19 | "irc out": {module:"node-red-node-irc"}, 20 | "irc-server": {module:"node-red-node-irc"}, 21 | 22 | "arduino in": {module:"node-red-node-arduino"}, 23 | "arduino out": {module:"node-red-node-arduino"}, 24 | "arduino-board": {module:"node-red-node-arduino"}, 25 | 26 | "redis out": {module:"node-red-node-redis"}, 27 | 28 | "mongodb": {module:"node-red-node-mongodb"}, 29 | "mongodb out": {module:"node-red-node-mongodb"}, 30 | 31 | "serial in": {module:"node-red-node-serialport"}, 32 | "serial out": {module:"node-red-node-serialport"}, 33 | "serial-port": {module:"node-red-node-serialport"}, 34 | 35 | "twitter-credentials": {module:"node-red-node-twitter"}, 36 | "twitter in": {module:"node-red-node-twitter"}, 37 | "twitter out": {module:"node-red-node-twitter"}, 38 | 39 | "e-mail": {module:"node-red-node-email"}, 40 | "e-mail in": {module:"node-red-node-email"}, 41 | 42 | "feedparse": {module:"node-red-node-feedparser"} 43 | } 44 | 45 | module.exports = { 46 | get: function(id) { 47 | return nodes[id]; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/projects/defaultFileSet.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | module.exports = { 18 | "package.json": function(project, runtime) { 19 | var i18n = runtime.i18n; 20 | var package = { 21 | "name": project.name, 22 | "description": project.summary||i18n._("storage.localfilesystem.projects.summary"), 23 | "version": "0.0.1", 24 | "dependencies": {}, 25 | "node-red": { 26 | "settings": { 27 | } 28 | } 29 | }; 30 | if (project.files) { 31 | if (project.files.flow) { 32 | package['node-red'].settings.flowFile = project.files.flow; 33 | package['node-red'].settings.credentialsFile = project.files.credentials; 34 | } 35 | } 36 | return JSON.stringify(package,"",4); 37 | }, 38 | "README.md": function(project, runtime) { 39 | var i18n = runtime.i18n; 40 | var content = project.name+"\n"+("=".repeat(project.name.length))+"\n\n"; 41 | if (project.summary) { 42 | content += project.summary+"\n\n"; 43 | } 44 | content += i18n._("storage.localfilesystem.projects.readme"); 45 | return content; 46 | }, 47 | ".gitignore": function() { return "*.backup" ;} 48 | } 49 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/projects/git/authCache.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var authCache = {} 18 | 19 | module.exports = { 20 | init: function() { 21 | authCache = {}; 22 | }, 23 | clear: function(project,remote, user) { 24 | if (user && remote && authCache[project] && authCache[project][remote]) { 25 | delete authCache[project][remote][user]; 26 | } else if (remote && authCache.hasOwnProperty(project)) { 27 | delete authCache[project][remote]; 28 | } else { 29 | delete authCache[project]; 30 | } 31 | }, 32 | set: function(project,remote,user,auth) { 33 | // console.log("AuthCache.set",remote,user,auth); 34 | authCache[project] = authCache[project]||{}; 35 | authCache[project][remote] = authCache[project][remote]||{}; 36 | authCache[project][remote][user] = auth; 37 | // console.log(JSON.stringify(authCache,'',4)); 38 | }, 39 | get: function(project,remote,user) { 40 | // console.log("AuthCache.get",remote,user,authCache[project]&&authCache[project][remote]&&authCache[project][remote][user]); 41 | if (authCache[project] && authCache[project][remote]) { 42 | return authCache[project][remote][user]; 43 | } 44 | return 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/projects/git/authWriter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var net = require("net"); 18 | var socket = net.connect(process.argv[2], function() { 19 | socket.on('data', function(data) { console.log(data);}); 20 | socket.on('end', function() { 21 | }); 22 | socket.write((process.argv[3]||"")+"\n", 'utf8'); 23 | }); 24 | socket.setEncoding('utf8'); 25 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/projects/git/node-red-ask-pass.sh: -------------------------------------------------------------------------------- 1 | "$NODE_RED_GIT_NODE_PATH" "$NODE_RED_GIT_ASKPASS_PATH" "$NODE_RED_GIT_SOCK_PATH" $@ 2 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/projects/git/node-red-ssh.sh: -------------------------------------------------------------------------------- 1 | ssh -i "$NODE_RED_KEY_FILE" -F /dev/null $@ 2 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/sessions.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var when = require('when'); 18 | var fs = require('fs-extra'); 19 | var fspath = require("path"); 20 | 21 | var log = require("../../log"); 22 | var util = require("./util"); 23 | 24 | var sessionsFile; 25 | var settings; 26 | 27 | module.exports = { 28 | init: function(_settings) { 29 | settings = _settings; 30 | sessionsFile = fspath.join(settings.userDir,".sessions.json"); 31 | }, 32 | getSessions: function() { 33 | return when.promise(function(resolve,reject) { 34 | fs.readFile(sessionsFile,'utf8',function(err,data){ 35 | if (!err) { 36 | try { 37 | return resolve(util.parseJSON(data)); 38 | } catch(err2) { 39 | log.trace("Corrupted sessions file - resetting"); 40 | } 41 | } 42 | resolve({}); 43 | }) 44 | }); 45 | }, 46 | saveSessions: function(sessions) { 47 | if (settings.readOnly) { 48 | return when.resolve(); 49 | } 50 | return util.writeFile(sessionsFile,JSON.stringify(sessions)); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /red/runtime/storage/localfilesystem/settings.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var when = require('when'); 18 | var fs = require('fs-extra'); 19 | var fspath = require("path"); 20 | 21 | var log = require("../../log"); 22 | var util = require("./util"); 23 | 24 | var globalSettingsFile; 25 | var globalSettingsBackup; 26 | var settings; 27 | 28 | module.exports = { 29 | init: function(_settings) { 30 | settings = _settings; 31 | globalSettingsFile = fspath.join(settings.userDir,".config.json"); 32 | globalSettingsBackup = fspath.join(settings.userDir,".config.json.backup"); 33 | }, 34 | getSettings: function() { 35 | return when.promise(function(resolve,reject) { 36 | fs.readFile(globalSettingsFile,'utf8',function(err,data) { 37 | if (!err) { 38 | try { 39 | return resolve(util.parseJSON(data)); 40 | } catch(err2) { 41 | log.trace("Corrupted config detected - resetting"); 42 | } 43 | } 44 | return resolve({}); 45 | }) 46 | }) 47 | }, 48 | saveSettings: function(newSettings) { 49 | if (settings.readOnly) { 50 | return when.resolve(); 51 | } 52 | return util.writeFile(globalSettingsFile,JSON.stringify(newSettings,null,1),globalSettingsBackup); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /test/dnr/dnr-editor-test/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dnr-editor-test", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "node-red-contrib-msg-speed": "0.0.5" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /test/dnr/dnr_mqtt_spec.js: -------------------------------------------------------------------------------- 1 | var should = require("should"); 2 | var fs = require("fs"); 3 | var dnr = require("../../red/runtime/dnr") 4 | var mqtt = require('mqtt') 5 | var topic = 'oaiwjefo;ajw;efj209jf' 6 | var msg = 'j29f0j2j3fqj40f' 7 | 8 | describe("dnr mqtt", function() { 9 | it('connects to external mqtt server', function(done) { 10 | var client = mqtt.connect('mqtt://test.mosquitto.org') 11 | 12 | client.on('connect', function () { 13 | client.subscribe(topic) 14 | client.publish(topic, msg) 15 | }) 16 | 17 | client.on('message', function (t, m) { 18 | if (t === topic && m.toString() === msg){ 19 | client.end() 20 | done() 21 | } 22 | }) 23 | }); 24 | 25 | it('connects to built in mosca mqtt server', function(done) { 26 | var http = require('http') 27 | , httpServ = http.createServer() 28 | , mosca = require('mosca') 29 | , mqttServer = require('../../red/runtime/mqttServer') 30 | , mqttWsPath = '/mqttws' 31 | , mqttHost = 'ws://localhost' 32 | , port = 37541 33 | 34 | mqttServer.start(httpServ, mqttWsPath) 35 | 36 | httpServ.listen(port, ()=>{ 37 | var client = mqtt.connect(mqttHost + ':' + port + mqttWsPath) 38 | 39 | client.on('connect', function () { 40 | client.subscribe(topic) 41 | client.publish(topic, msg) 42 | }) 43 | 44 | client.on('message', function (t, m) { 45 | if (t === topic && m.toString() === msg){ 46 | client.end() 47 | done() 48 | } 49 | }) 50 | }) 51 | }); 52 | }); 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /test/dnr/nodeInstallation_spec.js: -------------------------------------------------------------------------------- 1 | var should = require("should"); 2 | var shell = require('shelljs'); 3 | var path = require("path"); 4 | var dnr = require("../../red/runtime/dnr") 5 | 6 | describe("dnr node installation", function() { 7 | it('installs only the node definition without resolving dependencies and rebuild ', function(done) { 8 | var installingModule = "node-red-contrib-audio"; 9 | var userDir = path.join(__dirname, "dnr-editor-test"); 10 | 11 | shell.rm('-rf', userDir); 12 | shell.mkdir(userDir); 13 | shell.cd(userDir); 14 | shell.exec('npm init -y'); 15 | 16 | dnr.dnrModuleInstall(installingModule, userDir, (err, stdout, stderr) => { 17 | should.equal(err, null); 18 | should.equal(stdout, 'Installation succeed'); 19 | 20 | installationSucceed(installingModule, userDir); 21 | done(err); 22 | }); 23 | }); 24 | 25 | it('installs module package with weird tarball folder name', function(done) { 26 | var installingModule = "node-red-contrib-msg-speed"; 27 | var userDir = path.join(__dirname, "dnr-editor-test"); 28 | 29 | shell.rm('-rf', userDir); 30 | shell.mkdir(userDir); 31 | shell.cd(userDir); 32 | shell.exec('npm init -y'); 33 | 34 | dnr.dnrModuleInstall(installingModule, userDir, (err, stdout, stderr) => { 35 | should.equal(err, null); 36 | should.equal(stdout, 'Installation succeed'); 37 | 38 | installationSucceed(installingModule, userDir); 39 | done(err); 40 | }); 41 | }); 42 | }); 43 | 44 | function installationSucceed(installingModule, userDir){ 45 | shell.cd(userDir); 46 | shell.ls().some(file => file === "node_modules").should.be.true(); 47 | should.equal(shell.ls('node_modules').length, 1); 48 | should.equal(shell.ls('node_modules')[0], installingModule); 49 | should.notEqual(shell.cat('package.json').indexOf(installingModule), -1); 50 | } 51 | 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /test/editor/pageobjects/editor/debugTab_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | function open() { 18 | browser.clickWithWait('#red-ui-tab-debug-link-button'); 19 | } 20 | 21 | function getMessage(index) { 22 | index = index ? index : 1; 23 | var debugMessagePath = '//div[@class="debug-content debug-content-list"]/div[contains(@class,"debug-message")][' + index + ']//span[contains(@class, "debug-message-type")]'; 24 | return browser.getTextWithWait(debugMessagePath); 25 | } 26 | 27 | function clearMessage() { 28 | browser.clickWithWait('//a[@id="debug-tab-clear"]'); 29 | } 30 | 31 | module.exports = { 32 | open: open, 33 | getMessage: getMessage, 34 | clearMessage: clearMessage, 35 | }; 36 | -------------------------------------------------------------------------------- /test/editor/pageobjects/editor/palette_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var idMap = { 18 | // input 19 | "inject": "#palette_node_inject", 20 | "httpin": "#palette_node_http_in", 21 | // output 22 | "debug": "#palette_node_debug", 23 | "httpResponse": "#palette_node_http_response", 24 | // function 25 | "function": "#palette_node_function", 26 | "template": "#palette_node_template", 27 | "change": "#palette_node_change", 28 | "range": "#palette_node_range", 29 | "httpRequest": "#palette_node_http_request", 30 | "html": "#palette_node_html", 31 | // storage 32 | "filein": "#palette_node_file_in", 33 | }; 34 | 35 | function getId(type) { 36 | return idMap[type]; 37 | } 38 | 39 | module.exports = { 40 | getId: getId, 41 | }; 42 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/core/58-debug_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function debugNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(debugNode, nodePage); 26 | 27 | debugNode.prototype.setOutput = function(complete) { 28 | // Open a payload type list. 29 | browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-container")]/button'); 30 | if (complete !== 'true') { 31 | // Select the "msg" type. 32 | browser.clickWithWait('/html/body/div[11]/a[1]'); 33 | // Input the path in msg. 34 | browser.clickWithWait('//*[contains(@class, "red-ui-typedInput-input")]/input'); 35 | browser.keys(['Control', 'a', 'Control']); 36 | browser.keys(['Delete']); 37 | browser.setValue('//*[contains(@class, "red-ui-typedInput-input")]/input', complete); 38 | } else { 39 | // Select the "complete msg object" type. 40 | browser.clickWithWait('/html/body/div[11]/a[2]'); 41 | } 42 | } 43 | 44 | module.exports = debugNode; 45 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/core/80-function_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function functionNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(functionNode, nodePage); 26 | 27 | functionNode.prototype.setFunction = function(func) { 28 | browser.click('#node-input-func-editor'); 29 | browser.keys(['Control', 'Home', 'Control']); 30 | for (var i = 0; i < func.length; i++) { 31 | browser.keys([func.charAt(i)]); 32 | } 33 | // Delete the unnecessary code that ace editor does the autocompletion. 34 | browser.keys(['Control', 'Shift', 'End', 'Shift', 'Control']); 35 | browser.keys(['Delete']); 36 | // Need to wait until ace editor correctly checks the syntax. 37 | browser.pause(50); 38 | } 39 | 40 | module.exports = functionNode; 41 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/core/80-template_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function templateNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(templateNode, nodePage); 26 | 27 | templateNode.prototype.setSyntax = function(syntax) { 28 | browser.selectWithWait('#node-input-syntax', syntax); 29 | } 30 | 31 | templateNode.prototype.setFormat = function(format) { 32 | browser.selectWithWait('#node-input-format', format); 33 | } 34 | 35 | templateNode.prototype.setTemplate = function(template) { 36 | browser.click('#node-input-template-editor'); 37 | browser.keys(['Control', 'a', 'Control']); // call twice to release the keys. 38 | // Need to add a character one by one since some words such as 'Control' are treated as a special word. 39 | for (var i = 0; i < template.length; i++) { 40 | browser.keys([template.charAt(i)]); 41 | } 42 | browser.keys(['Control', 'Shift', 'End', 'Shift', 'Control']); 43 | browser.keys(['Delete']); 44 | } 45 | 46 | module.exports = templateNode; 47 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/io/21-httpin_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function httpinNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(httpinNode, nodePage); 26 | 27 | httpinNode.prototype.setMethod = function(method) { 28 | browser.selectWithWait('#node-input-method', method); 29 | } 30 | 31 | httpinNode.prototype.setUrl = function(url) { 32 | browser.setValue('#node-input-url', url); 33 | } 34 | 35 | module.exports = httpinNode; 36 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/io/21-httprequest_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function httpRequestNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(httpRequestNode, nodePage); 26 | 27 | httpRequestNode.prototype.setUrl = function(url) { 28 | browser.setValue('#node-input-url', url); 29 | } 30 | 31 | httpRequestNode.prototype.setMethod = function(method) { 32 | browser.selectWithWait('#node-input-method', method); 33 | } 34 | 35 | httpRequestNode.prototype.setReturn = function(ret) { 36 | browser.selectWithWait('#node-input-ret', ret); 37 | } 38 | 39 | module.exports = httpRequestNode; 40 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/io/21-httpresponse_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function httpResponseNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(httpResponseNode, nodePage); 26 | 27 | module.exports = httpResponseNode; 28 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/logic/16-range_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function rangeNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(rangeNode, nodePage); 26 | 27 | rangeNode.prototype.setAction = function(action) { 28 | browser.selectWithWait('#node-input-action', action); 29 | } 30 | 31 | rangeNode.prototype.setRange = function(minin, maxin, minout, maxout) { 32 | browser.setValue('#node-input-minin', minin); 33 | browser.setValue('#node-input-maxin', maxin); 34 | browser.setValue('#node-input-minout', minout); 35 | browser.setValue('#node-input-maxout', maxout); 36 | } 37 | 38 | module.exports = rangeNode; 39 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/parsers/70-HTML_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function htmlNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(htmlNode, nodePage); 26 | 27 | htmlNode.prototype.setSelector = function(tag) { 28 | browser.setValue('#node-input-tag', tag); 29 | } 30 | 31 | module.exports = htmlNode; 32 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/core/storage/50-filein_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var util = require("util"); 18 | 19 | var nodePage = require("../../node_page"); 20 | 21 | function fileinNode(id) { 22 | nodePage.call(this, id); 23 | } 24 | 25 | util.inherits(fileinNode, nodePage); 26 | 27 | var formatType = { 28 | "utf8": 1, 29 | "lines": 2, 30 | "": 3, // a single Buffer object 31 | "stream": 4 32 | }; 33 | 34 | fileinNode.prototype.setFilename = function(filename) { 35 | browser.setValue('#node-input-filename', filename); 36 | } 37 | 38 | fileinNode.prototype.setOutput = function(format) { 39 | browser.clickWithWait('#node-input-format'); 40 | var formatTypeXPath = '//*[@id="node-input-format"]/option[' + formatType[format] + ']'; 41 | browser.clickWithWait(formatTypeXPath); 42 | } 43 | 44 | module.exports = fileinNode; 45 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/node_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | function Node(id) { 18 | this.id = '//*[@id="' + id + '"]'; 19 | } 20 | 21 | Node.prototype.edit = function() { 22 | browser.clickWithWait(this.id); 23 | browser.clickWithWait(this.id); 24 | // Wait until an edit dialog opens. 25 | browser.waitForVisible('#node-dialog-ok', 2000); 26 | } 27 | 28 | Node.prototype.clickOk = function() { 29 | browser.clickWithWait('#node-dialog-ok'); 30 | // Wait untile an edit dialog closes. 31 | browser.waitForVisible('#node-dialog-ok', 2000, true); 32 | } 33 | 34 | Node.prototype.connect = function(targetNode) { 35 | var outputPort = this.id + '/*[@class="port_output"]'; 36 | var inputPort = targetNode.id + '/*[@class="port_input"]'; 37 | browser.dragAndDrop(outputPort, inputPort) 38 | } 39 | 40 | Node.prototype.clickLeftButton = function() { 41 | browser.clickWithWait(this.id + '/*[@class="node_button node_left_button"]'); 42 | } 43 | 44 | module.exports = Node; 45 | -------------------------------------------------------------------------------- /test/editor/pageobjects/nodes/nodefactory_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var injectNode = require('./core/core/20-inject_page'); 18 | var debugNode = require('./core/core/58-debug_page'); 19 | var templateNode = require('./core/core/80-template_page'); 20 | var functionNode = require('./core/core/80-function_page'); 21 | var httpinNode = require('./core/io/21-httpin_page'); 22 | var httpResponseNode = require('./core/io/21-httpresponse_page'); 23 | var changeNode = require('./core/logic/15-change_page'); 24 | var rangeNode = require('./core/logic/16-range_page'); 25 | var httpRequestNode = require('./core/io/21-httprequest_page'); 26 | var htmlNode = require('./core/parsers/70-HTML_page'); 27 | var fileinNode = require('./core/storage/50-filein_page'); 28 | 29 | 30 | var nodeCatalog = { 31 | // input 32 | "inject": injectNode, 33 | "httpin": httpinNode, 34 | // output 35 | "debug": debugNode, 36 | "httpResponse": httpResponseNode, 37 | // function 38 | "function": functionNode, 39 | "template": templateNode, 40 | "change": changeNode, 41 | "range": rangeNode, 42 | "httpRequest": httpRequestNode, 43 | "html": htmlNode, 44 | // storage 45 | "filein": fileinNode, 46 | } 47 | 48 | function create(type, id) { 49 | var node = nodeCatalog[type]; 50 | return new node(id); 51 | } 52 | 53 | module.exports = { 54 | create: create, 55 | }; 56 | -------------------------------------------------------------------------------- /test/editor/pageobjects/util/spec_util_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | function pause(msec) { 18 | browser.pause(msec); 19 | } 20 | 21 | module.exports = { 22 | pause: pause, 23 | }; 24 | -------------------------------------------------------------------------------- /test/editor/pageobjects/util/util_page.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | function init() { 18 | browser.addCommand("clickWithWait", function(selector) { 19 | browser.waitForVisible(selector); 20 | // Wait at most 10 seconds. 21 | for (var i = 0; i < 50; i++) { 22 | try { 23 | var ret = browser.click(selector); 24 | return ret; 25 | } catch (err) { 26 | if (err.message.indexOf('is not clickable') !== -1) { 27 | browser.pause(200); 28 | } else { 29 | throw err; 30 | } 31 | } 32 | } 33 | }, false); 34 | 35 | browser.addCommand("getTextWithWait", function(selector) { 36 | browser.waitForExist(selector); 37 | browser.waitForValue(selector); 38 | var ret = browser.getText(selector); 39 | return ret; 40 | }, false); 41 | 42 | browser.addCommand("selectWithWait", function(selector, value) { 43 | browser.waitForVisible(selector, 5000); 44 | var ret = browser.selectByValue(selector, value); 45 | return ret; 46 | }, false); 47 | } 48 | 49 | module.exports = { 50 | init: init, 51 | }; 52 | -------------------------------------------------------------------------------- /test/editor/specs/editor/workspace_uispec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var when = require('when'); 18 | var should = require("should"); 19 | var fs = require('fs-extra'); 20 | 21 | var helper = require("../../editor_helper"); 22 | var debugTab = require('../../pageobjects/editor/debugTab_page'); 23 | var workspace = require('../../pageobjects/editor/workspace_page'); 24 | 25 | var nodeWidth = 200; 26 | 27 | describe('Workspace', function() { 28 | beforeEach(function() { 29 | workspace.deleteAllNodes(); 30 | }); 31 | 32 | before(function() { 33 | helper.startServer(); 34 | }); 35 | 36 | after(function() { 37 | helper.stopServer(); 38 | }); 39 | 40 | it('should have a right title', function () { 41 | browser.getTitle().should.equal('Node-RED'); 42 | }); 43 | 44 | it('should output a timestamp', function() { 45 | var injectNode = workspace.addNode("inject"); 46 | var debugNode = workspace.addNode("debug", nodeWidth); 47 | injectNode.connect(debugNode); 48 | 49 | workspace.deploy(); 50 | 51 | debugTab.open(); 52 | debugTab.clearMessage(); 53 | injectNode.clickLeftButton(); 54 | debugTab.getMessage().should.within(1500000000000, 3000000000000); 55 | }); 56 | 57 | }); 58 | -------------------------------------------------------------------------------- /test/nodes/core/core/25-catch_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | var catchNode = require("../../../../nodes/core/core/25-catch.js"); 19 | var helper = require("node-red-node-test-helper"); 20 | 21 | describe('catch Node', function() { 22 | 23 | afterEach(function() { 24 | helper.unload(); 25 | }); 26 | 27 | it('should output a message when called', function(done) { 28 | var flow = [ { id:"n1", type:"catch", name:"catch", wires:[["n2"]] }, 29 | {id:"n2", type:"helper"} ]; 30 | helper.load(catchNode, flow, function() { 31 | var n1 = helper.getNode("n1"); 32 | var n2 = helper.getNode("n2"); 33 | n1.should.have.property('name', 'catch'); 34 | n2.on("input", function(msg) { 35 | msg.should.be.a.Error(); 36 | msg.toString().should.equal("Error: big error"); 37 | done(); 38 | }); 39 | var err = new Error("big error"); 40 | n1.emit("input", err); 41 | }); 42 | }); 43 | 44 | }); 45 | -------------------------------------------------------------------------------- /test/nodes/core/core/25-status_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | var catchNode = require("../../../../nodes/core/core/25-status.js"); 19 | var helper = require("node-red-node-test-helper"); 20 | 21 | describe('status Node', function() { 22 | 23 | afterEach(function() { 24 | helper.unload(); 25 | }); 26 | 27 | it('should output a message when called', function(done) { 28 | var flow = [ { id:"n1", type:"status", name:"status", wires:[["n2"]] }, 29 | {id:"n2", type:"helper"} ]; 30 | helper.load(catchNode, flow, function() { 31 | var n1 = helper.getNode("n1"); 32 | var n2 = helper.getNode("n2"); 33 | n1.should.have.property('name', 'status'); 34 | n2.on("input", function(msg) { 35 | msg.text.should.equal("Oh dear"); 36 | msg.should.have.property('source'); 37 | msg.source.should.have.property('id',"12345"); 38 | msg.source.should.have.property('type',"testnode"); 39 | msg.source.should.have.property('name',"fred"); 40 | done(); 41 | }); 42 | var mst = { 43 | text: "Oh dear", 44 | source: { 45 | id: "12345", 46 | type: "testnode", 47 | name: "fred" 48 | } 49 | } 50 | n1.emit("input", mst); 51 | }); 52 | }); 53 | 54 | }); 55 | -------------------------------------------------------------------------------- /test/nodes/core/core/90-comment_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | var commentNode = require("../../../../nodes/core/core/90-comment.js"); 19 | var helper = require("node-red-node-test-helper"); 20 | 21 | describe('comment Node', function() { 22 | 23 | afterEach(function() { 24 | helper.unload(); 25 | }); 26 | 27 | it('should be loaded', function(done) { 28 | var flow = [{id:"n1", type:"comment", name: "comment" }]; 29 | helper.load(commentNode, flow, function() { 30 | var n1 = helper.getNode("n1"); 31 | n1.should.have.property('name', 'comment'); 32 | done(); 33 | }); 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /test/nodes/core/core/98-unknown_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | var unknown = require("../../../../nodes/core/core/98-unknown.js"); 19 | var helper = require("node-red-node-test-helper"); 20 | 21 | describe('unknown Node', function() { 22 | 23 | afterEach(function() { 24 | helper.unload(); 25 | }); 26 | 27 | it('should be loaded', function(done) { 28 | var flow = [{id:"n1", type:"unknown", name: "unknown" }]; 29 | helper.load(unknown, flow, function() { 30 | var n1 = helper.getNode("n1"); 31 | n1.should.have.property('name', 'unknown'); 32 | done(); 33 | }); 34 | }); 35 | 36 | }); 37 | -------------------------------------------------------------------------------- /test/red/api/auth/clients_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | var Clients = require("../../../../red/api/auth/clients"); 19 | 20 | describe("api/auth/clients", function() { 21 | it('finds the known editor client',function(done) { 22 | Clients.get("node-red-editor").then(function(client) { 23 | client.should.have.property("id","node-red-editor"); 24 | client.should.have.property("secret","not_available"); 25 | done(); 26 | }); 27 | }); 28 | it('finds the known admin client',function(done) { 29 | Clients.get("node-red-admin").then(function(client) { 30 | client.should.have.property("id","node-red-admin"); 31 | client.should.have.property("secret","not_available"); 32 | done(); 33 | }).catch(function(err) { 34 | done(err); 35 | }); 36 | }); 37 | it('returns null for unknown client',function(done) { 38 | Clients.get("unknown-client").then(function(client) { 39 | should.not.exist(client); 40 | done(); 41 | }).catch(function(err) { 42 | done(err); 43 | }); 44 | 45 | }); 46 | }); 47 | -------------------------------------------------------------------------------- /test/red/api/editor/projects/index_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | describe("api/editor/projects", function() { 18 | it.skip("NEEDS TESTS WRITING",function() {}); 19 | }); 20 | -------------------------------------------------------------------------------- /test/red/runtime/events_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | var should = require("should"); 17 | 18 | describe("runtime/events", function() { 19 | it('can be required without errors', function() { 20 | require("../../../red/runtime/events"); 21 | }); 22 | it.skip('more tests needed', function(){}) 23 | }); 24 | -------------------------------------------------------------------------------- /test/red/runtime/i18n_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | describe("runtime/i18n", function() { 18 | it('can be required without errors', function() { 19 | require("../../../red/runtime/i18n"); 20 | }); 21 | it.skip('more tests needed', function(){}) 22 | }); 23 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/dnr_spec.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/test/red/runtime/nodes/dnr_spec.js -------------------------------------------------------------------------------- /test/red/runtime/nodes/registry/deprecated_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | 19 | var deprecated = require("../../../../../red/runtime/nodes/registry/deprecated.js"); 20 | 21 | describe('deprecated', function() { 22 | it('should return info on a node',function() { 23 | deprecated.get("irc in").should.eql({module:"node-red-node-irc"}); 24 | }); 25 | it('should return null for non-deprecated node',function() { 26 | should.not.exist(deprecated.get("foo")); 27 | }); 28 | }); 29 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/DuffNode/DuffNode.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function DuffNode(n) {} 4 | RED.nodes.registerType("duff-node",DuffNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/DuplicateTestNode/TestNode1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/DuplicateTestNode/TestNode1.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function DuplicateTestNode(n) {} 4 | RED.nodes.registerType("test-node-1",DuplicateTestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/MultipleNodes1/MultipleNodes1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/MultipleNodes1/MultipleNodes1.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode1(n) {} 4 | RED.nodes.registerType("test-node-multiple-1a",TestNode1); 5 | function TestNode2(n) {} 6 | RED.nodes.registerType("test-node-multiple-1b",TestNode2); 7 | } 8 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/NestedNode.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/NestedNode.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode(n) {} 4 | RED.nodes.registerType("nested-node-1",TestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/icons/arrow-in.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/icons/arrow-in.png -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/lib/ShouldNotLoad.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode(n) {} 4 | RED.nodes.registerType("should-not-load-1",TestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/NestedDirectoryNode/NestedNode/test/ShouldNotLoad.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode(n) {} 4 | RED.nodes.registerType("should-not-load-3",TestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode1/TestNode1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

this should be filtered out

6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode1/TestNode1.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode(n) {} 4 | RED.nodes.registerType("test-node-1",TestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode2/TestNode2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode2/TestNode2.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function which returns a resolving promise 2 | 3 | var when = require("when"); 4 | module.exports = function(RED) { 5 | return when.promise(function(resolve,reject) { 6 | function TestNode(n) {} 7 | RED.nodes.registerType("test-node-2",TestNode); 8 | resolve(); 9 | }); 10 | } 11 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode3/TestNode3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode3/TestNode3.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function which returns a rejecting promise 2 | 3 | var when = require("when"); 4 | module.exports = function(RED) { 5 | return when.promise(function(resolve,reject) { 6 | reject("fail"); 7 | }); 8 | } 9 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode4/TestNode4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNode4/TestNode4.js: -------------------------------------------------------------------------------- 1 | throw new Error("fail to require"); 2 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/EmptyModule/file.txt: -------------------------------------------------------------------------------- 1 | This file exists just to ensure the parent directory is in the repository. 2 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

this should be filtered out

6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode(n) {} 4 | RED.nodes.registerType("test-node-mod-1",TestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

this should be filtered out

6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/TestNodeModule2.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | throw new Error("fail to load"); 4 | } 5 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/icons/arrow-in.png: -------------------------------------------------------------------------------- 1 | This file exists just to ensure the 'icons' directory is in the repository. 2 | TODO: a future test needs to ensure the right icon files are loaded - this 3 | directory can be used for that 4 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/TestNodeModule/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "TestNodeModule", 3 | "version" : "0.0.1", 4 | "description" : "A test node module", 5 | "node-red" : { 6 | "nodes": { 7 | "TestNodeMod1": "TestNodeModule.js", 8 | "TestNodeMod2": "TestNodeModule2.js" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

this should be filtered out

6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | function TestNode(n) {} 4 | RED.nodes.registerType("test-node-mod-1",TestNode); 5 | } 6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

this should be filtered out

6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/TestNodeModule2.js: -------------------------------------------------------------------------------- 1 | // A test node that exports a function 2 | module.exports = function(RED) { 3 | throw new Error("fail to load"); 4 | } 5 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/icons/file.txt: -------------------------------------------------------------------------------- 1 | This file exists just to ensure the 'icons' directory is in the repository. 2 | TODO: a future test needs to ensure the right icon files are loaded - this 3 | directory can be used for that 4 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/local/TestNodeModule/node_modules/VersionMismatchModule/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "VersionMismatchModule", 3 | "version" : "0.0.1", 4 | "description" : "A test node module", 5 | "node-red" : { 6 | "version": "100.0.0", 7 | "nodes": { 8 | "VersionMismatchMod1": "TestNodeModule.js", 9 | "VersionMismatchMod2": "TestNodeModule2.js" 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/userDir/lib/icons/file.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/test/red/runtime/nodes/resources/userDir/lib/icons/file.txt -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/userDir/lib/icons/test_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/test/red/runtime/nodes/resources/userDir/lib/icons/test_icon.png -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/userDir/nodes/TestNode5/TestNode5.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

this should be filtered out

6 | -------------------------------------------------------------------------------- /test/red/runtime/nodes/resources/userDir/nodes/TestNode5/TestNode5.js: -------------------------------------------------------------------------------- 1 | throw new Error("fail to require"); 2 | -------------------------------------------------------------------------------- /test/red/runtime/storage/localfilesystem/projects/Project_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | describe("storage/localfilesystem/projects/Project", function() { 18 | it.skip("NEEDS TESTS WRITING",function() {}); 19 | }) 20 | -------------------------------------------------------------------------------- /test/red/runtime/storage/localfilesystem/projects/git/index_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | describe("storage/localfilesystem/projects/git/index", function() { 18 | it.skip("NEEDS TESTS WRITING",function() {}); 19 | }) 20 | -------------------------------------------------------------------------------- /test/red/runtime/storage/localfilesystem/projects/index_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | describe("storage/localfilesystem/projects/index", function() { 18 | it.skip("NEEDS TESTS WRITING",function() {}); 19 | }) 20 | -------------------------------------------------------------------------------- /test/red/runtime/storage/localfilesystem/util_spec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright JS Foundation and other contributors, http://js.foundation 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | **/ 16 | 17 | var should = require("should"); 18 | var util = require("../../../../../red/runtime/storage/localfilesystem/util"); 19 | 20 | describe('storage/localfilesystem/util', function() { 21 | describe('parseJSON', function() { 22 | it('returns parsed JSON', function() { 23 | var result = util.parseJSON('{"a":123}'); 24 | result.should.eql({a:123}); 25 | }) 26 | it('ignores BOM character', function() { 27 | var result = util.parseJSON('\uFEFF{"a":123}'); 28 | result.should.eql({a:123}); 29 | }) 30 | }) 31 | }); 32 | -------------------------------------------------------------------------------- /test/resources/70-HTML-test-file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

This is a test page for node 70-HTML

6 | 7 |

There's nothing to read here.

8 | 9 |
    10 |
  1. Blue
  2. 11 |
  3. Red
  4. 12 |
13 | 14 | 18 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /test/resources/examples/one.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/test/resources/examples/one.json -------------------------------------------------------------------------------- /test/resources/file-in-node/test.txt: -------------------------------------------------------------------------------- 1 | Text file -------------------------------------------------------------------------------- /test/resources/icons/test_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/namgk/dnr-editor/d306bda366aba040a28a37d06490863a28214d1b/test/resources/icons/test_icon.png -------------------------------------------------------------------------------- /test/resources/ssl/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIDMDCCAhgCCQDPGPyu5M6ZaDANBgkqhkiG9w0BAQsFADBZMQswCQYDVQQGEwJB 3 | VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0 4 | cyBQdHkgTHRkMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTgwMzE2MDY0ODU1WhgP 5 | MjExODAyMjAwNjQ4NTVaMFkxCzAJBgNVBAYTAkFVMRMwEQYDVQQIDApTb21lLVN0 6 | YXRlMSEwHwYDVQQKDBhJbnRlcm5ldCBXaWRnaXRzIFB0eSBMdGQxEjAQBgNVBAMM 7 | CWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMifGelM 8 | k/b3HeIj98y9P5jS+Qblqpq7+gsCaL+qglMFmG0QXe6Ordkrh3xeY0uTkaFatwLM 9 | WMzoX60nNdaVjC9U9RlQLK/3nncCveexxRUGtI8VpxN04ivBE/ULhtJeStQFrfyt 10 | LWr1WWf8o8P/EWzZnh0Y1oHc0XqhOPHu9Nfd9kn5nfHNd/xbY8KXa4DkVSJ1lLFK 11 | 3t/nSWttchF8zKgNpoQznNGqUTjT28l0sS8fyH76DyRj3Ke6xdNxX2NRUU0PnGFI 12 | RMsBG4Qrzo5xY7lQP7uVVgZUlxryw+NuZuC1PBXaUKJOf6CGwrTq5WB9zF1iBZCs 13 | wD68NvtLd0kHEgECAwEAATANBgkqhkiG9w0BAQsFAAOCAQEAfqNOg2v90r5x4lFo 14 | SYmPUoX24gdwHd/mfCzDJksB8n98X1eULYZqqRF2Q7LMkYu/twxfR3EKQX1HZxQY 15 | LpGUYX4ubJdVTy13opJs8B4NkhvRuOAP0+b7RVt4RfuxLX9tYOB98tEbf7Mj0ccq 16 | F4sHi+PMCh64K7rNWECHar0F51yNtNXcxJPMuHZVmj0/U7h6ZxNf+GzdTi8YKmVy 17 | 5OHI7xol/II/v3QOi1L+BaEIUkqYODKuQouJVIzu4zX6JRfAaxwjJmliYoJm7OEY 18 | dFMEQUw1Ggsos+KbkGi9mCDbveYpWcZTR8nfPwmx+oJtt47DTHUC3KSdRxgtfjGs 19 | otmVSw== 20 | -----END CERTIFICATE----- 21 | -------------------------------------------------------------------------------- /test/resources/ssl/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | MIIEowIBAAKCAQEAyJ8Z6UyT9vcd4iP3zL0/mNL5BuWqmrv6CwJov6qCUwWYbRBd 3 | 7o6t2SuHfF5jS5ORoVq3AsxYzOhfrSc11pWML1T1GVAsr/eedwK957HFFQa0jxWn 4 | E3TiK8ET9QuG0l5K1AWt/K0tavVZZ/yjw/8RbNmeHRjWgdzReqE48e701932Sfmd 5 | 8c13/FtjwpdrgORVInWUsUre3+dJa21yEXzMqA2mhDOc0apRONPbyXSxLx/IfvoP 6 | JGPcp7rF03FfY1FRTQ+cYUhEywEbhCvOjnFjuVA/u5VWBlSXGvLD425m4LU8FdpQ 7 | ok5/oIbCtOrlYH3MXWIFkKzAPrw2+0t3SQcSAQIDAQABAoIBAGmbryUrpZxU24tG 8 | idRiLw9Ax8yEq7lGiMqw2vlCRdZ0VJfdDMVeoE945ZpniXeoV/oLadl0Pq6nCG56 9 | /JFYKfJkk51eoheDjwxxCgzkfK2j2PqVWF0ao1CLE/ljtvYYouVXlA42D3mFbCoc 10 | SQ0MwVx+dgg1If48gp0+L17T/ll/VOOQumts5UzoKC8YABLL00g5ZL9/jZlVipgl 11 | HfENMPWOfy3q5kSgQqvTWTMdSE6644ryV890mrwcC/RzqQBSNgRh1Lqx3jcXQSdN 12 | x5C19gEK60hZqcvzBkKYudMHUC6I0lcuao1xwBnHUQIVKmLFPZBUIQq3tVar/YUc 13 | d65cJpECgYEA5D9QilQpHxv875wBvBOEbyt9TqDBBN/5JpGQ9sBKpA0eNp3UzrOr 14 | +n0TlyoDZYjkxgNJScS4TpeKde1Hk5j2kkMngjS69dn4G6wmOI79gAOGrCiJd1/I 15 | AWb09KxUKlWBbfKuLHdl1wSMCYQornDdXxYCxhv9sMZKbEJ//tsI420CgYEA4QPf 16 | n/dRAm+6zwNQTWOYWlj5jsG1TilBBCtoRqUqVlrAgR6rS1lgOleHkVrWH0g0Lkmh 17 | 9DxWiWuNNXxdU/5zx9AQn/JuHuL8EjDLN5r7idcg2LtEElCkr12y0I9nzS2OOZnj 18 | MTioIh+hghzNuk09NlVJrHi48bJUVL/6Ws7ruGUCgYBT9UJAD+MscVQiI2Wz9A30 19 | ArBOOu2lSGnSmRsU2PjbzYN+naIJAqhRNK7/HNIxCCD3AYB05SrSpgWliUmZ7ltM 20 | w+0FhTX8d1g/fZx1k4uGCkYAj8y5H39nnKKgWb9/7wH0Gp+c9bJ9XEvSuE1qlVOo 21 | xWTx0JwJ6Xa4yeFhMtrbJQKBgF/FfErjwvEciRBPQsCNoWzi7eUbAYYw/OE/cHSR 22 | HAIBQmoymYnKkrCCTMtLNFPAMaV55ZrEi7iVtFaNhlOXu8PSBSFu1/wBdHRxnC0g 23 | o+s5S1uz6Pc6p72UTeWDBBVKTHyryQ1MJhPQDrgIdm/TLDiR+HeWMnF9C3O++lno 24 | NGAZAoGBAKhsmatxVD9B3jvUDd/CWhXVDSZQECrfJ+Uy1q6b5NO5yMibpIZv14Nj 25 | VT+b2qXoO1wL6htTRJXXNPmrB/JtrLiLg/vxVuA7CPSgot8SDA+/lbRhf1n/SKnD 26 | ECXrEUmq28SgBItbY4vcy5PVEHRvlzqO/LpD6Y7iGNpR7zw9Yk3b 27 | -----END RSA PRIVATE KEY----- 28 | --------------------------------------------------------------------------------