1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00
Commit Graph

148 Commits

Author SHA1 Message Date
Nick O'Leary
f95b414d22
First pass of projects test coverage 2018-01-16 23:04:39 +00:00
Nick O'Leary
52475df783
Fix various tests due to projects rework 2018-01-16 16:18:18 +00:00
Nick O'Leary
25f4a018d9
Merge branch '0.18' into projects 2018-01-16 11:21:54 +00:00
Nick O'Leary
fd4fdb31b5
Better error reporting when module provides duplicate type 2018-01-15 23:20:20 +00:00
Nick O'Leary
6516e0dfd2
Allow a user to pick existing sshkeys from ~/.ssh 2018-01-10 17:37:41 +00:00
Hideki Nakamura
5a6cde1446 Refactoring ssh-keygen function (#1533) 2018-01-05 16:12:01 +00:00
Kazuki Nakanishi
63f7d826bc Enable it to store icon files in {settings.userDir}/lib/icons directory for dynamic nodes's icon feature (#1536) 2018-01-05 14:23:47 +00:00
Hideki Nakamura
c24b0c6bb4 Change "generateSSHKey" function signature 2017-12-19 22:57:40 +09:00
Hideki Nakamura
c09a407f4c Delete unnecessary comments & add trace mock function 2017-12-18 21:37:09 +09:00
Hideki Nakamura
923893e160 Add SSH key management API 2017-12-07 23:11:24 +09:00
Hideki Nakamura
55cd069043 Fix the error that "otherwise is not a function" (#1513) 2017-12-06 13:20:38 +00:00
Nick O'Leary
64191e8303
Merge master to 0.18 2017-12-03 22:32:28 +00:00
Kazuki Nakanishi
6d2389945b allow a node's icon to be set dynamically (#1490)
* create a proto type

* Fixed some problems after reviewing
2017-11-30 13:13:35 +00:00
Jim Turner
6baedf909d Fix #1478 - Project files are not being flushed to disk after being written (#1479)
* Call fsync() before closing file

* Fix race condition in tests due to incorrect stub.

The startFlows() function wasn't really being stubbed, so it was still being called. But there was no corresponding call to stopFlows().

In later tests, the check in Flows.init() was throwing the "Cannot init without a stop" error.

* Test coverage for fsync() calls

For issue #1478

* Revert "Fix race condition in tests due to incorrect stub."

This reverts commit 4f71d7851b.

* Fix race condition in tests due to incorrect stub.

The startFlows() function wasn't really being stubbed, so it was still being called. But there was no corresponding call to stopFlows().

In later tests, the check in Flows.init() was throwing the "Cannot init without a stop" error.

* Fix intermittent test failure in Exec node.

Occasionally, the error text on stderr will come in more than one piece. The test only worked correctly if a single message was received.
2017-11-17 17:29:33 +00:00
Nick O'Leary
b1cd13d629
Initial projects implementation 2017-09-20 10:30:07 +01:00
Nick O'Leary
9a8b404054
Split localfilesystem storage plugin into component parts 2017-08-23 17:31:33 +01:00
Kazuki Nakanishi
2f88dc64fc Fix userDir test case when .config.json exists (#1350) 2017-07-21 11:12:04 +01:00
Kazuhito Yokoi
b3ffd33507 Add file extension into flow name of library automatically (#1331) 2017-07-09 11:58:17 +01:00
Nick O'Leary
c93870316c
Fix accessing global context from jsonata expressions
Fixes #1335
2017-07-09 10:40:23 +01:00
Nick O'Leary
f9769a73fe
Retry auto-install of modules that fail
- introduces autoInstallModulesRetry - default 30000
 - backs off interval if repeated failures
 - fixes notification to the editor of an auto-reinstall
2017-07-08 17:30:17 +01:00
Kazuki Nakanishi
347e598715 Fix missing icons for some nodes (#1321) 2017-07-04 09:04:27 +01:00
Kazuki Nakanishi
c34c98386e Fix creating userDir other than system drive on Windows (#1317) 2017-07-03 15:22:49 +01:00
Nick O'Leary
344076c943
Fix settings tests to remove nodeSettings reference 2017-06-29 11:36:16 +01:00
Nick O'Leary
d4135e80a6
Timeout a node that fails to close - default 15s timeout 2017-05-15 13:05:33 +01:00
Nick O'Leary
c75dc3cc36
Add test coverage for deleting a flow 2017-05-11 15:39:55 +01:00
Nick O'Leary
29bd43413a
Add context.keys function to list top-level keys 2017-05-03 20:51:33 +01:00
Nick O'Leary
4ea33ea482
Pass a 'removed' parameter to node close handler 2017-04-21 23:36:21 +01:00
Kazuki-Nakanishi
05878d3176 Fix the test cases which sometimes fails due to timing. (#1228) 2017-04-12 20:54:31 +01:00
Nick O'Leary
bfb548636e
Merge branch 'master' into 0.17 2017-04-11 14:53:44 +01:00
Andrey Bezugliy
f987fa13ea Resolve dir argument of getLocalNodeFiles function (#1216)
* Resolve dir argument of getLocalNodeFiles function

The getLocalNodeFiles is called 3 times.  Each time it called, the callee needs to resolve the dir argument.
That was not done for several of calls, and local modules (specified in the "nodesDir" setting) were not returned to client because of that.

This fix will allow to make sure the dir is consistently resolved.

* Several changes in "localfilesystem_spec.js":
- Changed checkNodes to verify that every node's file property is resolved, i.e. containst absolute path, not relative.
- Added a unit-test "Finds nodes in settings.nodesDir (string,relative path)"
2017-04-10 15:41:20 +01:00
Kazuki-Nakanishi
3cc4173399 Extend timeout for the test case of installing non-existant path. (#1191)
to fix timeout on slower hosts
2017-03-10 13:59:44 +00:00
Nick O'Leary
5356373681
Finalise nodeSettings and update tlsConfigDisableLocalFiles
- increase test coverage around registerType
2017-03-09 21:06:49 +00:00
Nick O'Leary
e55933706d
Merge branch 'nodeSettings' into 0.17 2017-03-09 20:00:54 +00:00
Kazuki-Nakanishi
3b3d696e45 Add the node setting tlsConfigDisableLocalFiles for tls node. (#1190)
* Add the node setting tlsConfigDisableLocalFiles for tls node.

* Fix the bug that shows node setting when specified in settings.js and exportable is false.
2017-03-09 19:58:34 +00:00
Kazuki-Nakanishi
34089aec70 Allow a node to declare what settings should be made available to the editor. (#1185)
* Implement register/exportNodeSettings.

* Change normaliseRegisterTypeName to normaliseNodeTypeName. Force it to name in a camel case.
2017-03-08 14:38:33 +00:00
Kazuki-Nakanishi
3658d0e039 Add wait for writing a library entry into a file. (#1186) 2017-03-08 10:00:40 +00:00
kazuhitoyokoi
7a10636128 Add node whitelist function (#1184) 2017-03-08 10:00:00 +00:00
Dave Conway-Jones
06ffe722d4 better tests for windows nodes 2017-03-06 17:40:09 +00:00
Nick O'Leary
7698990e37
Allows flows to be enabled/disabled in the runtime 2017-03-06 15:29:05 +00:00
Dave Conway-Jones
2db65b9d1f fixes for grunt files tests on Windows 2017-03-06 15:28:23 +00:00
Nick O'Leary
73501f3ad3
Resync with master 2017-03-01 17:45:09 +00:00
Nick O'Leary
571b9fb8e0 Merge pull request #1122 from CANDY-LINE/feature/i18n-issue
Fix empty extra node help content issue
2017-03-01 16:38:08 +00:00
Nick O'Leary
869fdbcc6a
Remove event passing for icons/examples from the api layer 2017-02-15 23:07:50 +00:00
Nick O'Leary
3e021b3a75
Fix loader test to expect line numbers in load errors 2017-01-30 09:58:43 +00:00
Nick O'Leary
e27f5d0460
Add node module update api and expose in palette editor 2017-01-21 23:46:44 +00:00
Daisuke Baba
57c529758e Add an edge case test 2017-01-19 17:19:41 +09:00
Daisuke Baba
5ba9a0eb3f Fix empty extra node help content issue 2017-01-19 16:55:57 +09:00
Nick O'Leary
0a96259ddf
Update copyright header for JS Foundation 2017-01-11 15:24:33 +00:00
btsimonh
c8d6693fba fix bug where savesettings did not honor local settings variables (#1073)
* fix bug where savesettings did not honor local settings variables

* don't create lib/flows on read;  It's already created in localfilesystem.init and in saveLibraryEntry -
so removed call to promiseDir, and added a return of [] if accessing a folder which did not exist.
This is important because else when settings.readOnly is true, it still creates folders.

* Fix a CI failure where path passed to getLibraryEntry is empty;
treat this case as meaning it was wanting a folder, and return empty if the folder dioes not exist

* Add a test for getLibraryEntry( type, '/' ) as called by node-red

* change newsettings to camelCase newSettings
2017-01-08 23:00:27 +00:00
Nick O'Leary
73a41707e5
Property expressions must not be blank 2017-01-06 21:58:17 +00:00
Nick O'Leary
e73216d4c1 Merge branch 'master' into 0.16 2017-01-06 14:30:13 +00:00
Nick O'Leary
0c7705beff
Allow quoted property expressions
Fixes #1101
2017-01-06 11:23:53 +00:00
Nick O'Leary
564902b886 Allow $ and _ at start of property identifiers
Fixes #1063
2016-11-21 21:36:18 +00:00
Dave Conway-Jones
8d5286703f reimplement $(env var) replace to share common code.
and add test to utils
2016-11-17 13:56:17 +00:00
Dave Conway-Jones
74f2180fa4 Fix error message for missing node html file, and add test.
To close #1053
2016-11-16 22:46:01 +00:00
Dave Conway-Jones
d042169f2e Let credentials also use $(...) substitutions from ENV
to close #1051
(and add to test)
2016-11-16 21:47:13 +00:00
Nick O'Leary
5f0cab8cc2 Add log.removeHandler function 2016-10-20 23:31:40 +01:00
Nick O'Leary
49f72881f4 Disable palette editor if npm not found 2016-10-12 22:30:32 +01:00
Nick O'Leary
42f7dc1947 Fix type checking in unit tests 2016-10-10 13:27:43 +01:00
Nick O'Leary
f22c3b549e Merge branch '0.15.0' 2016-10-09 23:00:28 +01:00
Nick O'Leary
b4be1184fd Add v2 /flows api and deploy-overwrite protection 2016-10-09 22:02:40 +01:00
Nick O'Leary
d29abc2724 Encrypt credentials by default 2016-09-23 10:38:30 +01:00
Nick O'Leary
f9b972349d Move credential load/save storage functions under get/setFlows 2016-09-21 21:58:50 +01:00
Nick O'Leary
e06cadd761 Pass full runtime object to storage and flow sub-components 2016-09-21 10:22:04 +01:00
Dave Conway-Jones
0071afb205 update registry loader test to normalise path for windows
Thanks shrikes
2016-09-13 22:57:20 +01:00
Nick O'Leary
0ade8ff7a2 Add log warning if node module required version cannot be satisfied 2016-07-28 15:43:26 +01:00
Nick O'Leary
d57425a15e Fix node enable/disable over restart - load configs after settings init 2016-07-15 00:11:28 +01:00
Nick O'Leary
08ade44dc8 Handle more edge cases with RED.util.normalisePropertyExpression 2016-06-13 22:00:42 +01:00
Nick O'Leary
4dc9c7714c Clear node context on close
Fixes #870
2016-06-11 22:53:27 +01:00
Nick O'Leary
762eb07dd4 Add support for array-syntax in typedInput msg properties 2016-06-07 23:01:23 +01:00
Nick O'Leary
337f5f9b98 Handle missing tab nodes in a loaded flow config 2016-05-04 22:09:11 +01:00
Nick O'Leary
41445a1b48 Merge branch 'config' into 0.14.0
explain why this merge is necessary,
2016-05-04 15:44:48 +01:00
Nick O'Leary
45ff86eae5 Do not rely on the HTML file to identify where nodes are registered from 2016-04-28 11:23:42 +01:00
Nick O'Leary
b744491dd2 Ensure config nodes are instantiated in the right order 2016-04-27 12:33:02 +01:00
Nick O'Leary
2a089f7d90 Ensure parent nodes marked as changed due to child config node changes 2016-04-27 12:33:02 +01:00
Dave Conway-Jones
59b34c2b3f Add timestamp as a default typedInput
and update Inject and change nodes to match,
and add some tests.
2016-04-18 14:38:36 +01:00
Dave Conway-Jones
4bc482bc85 update load of grunt related versions
and mqtt and fs-extra and should. Fix tests to keep working.
2016-04-18 12:40:08 +01:00
Gabe Johnson
b909e32201 Prevent RED.node.registerNode from overriding a constructor's prototype (#865)
* prevent registry.registerNodeConstructor from overriding a constructors protoype

* fix for node < v5.0.0

* exercise another code path

* altering __proto__ for node < v0.12

* move inheritance code to helper function
2016-04-07 22:18:28 +01:00
Nick O'Leary
b1896e3737 Fix RED.util.compareObjects for Function created objects and Buffers 2016-04-01 10:13:11 +01:00
Nick O'Leary
db686388b9 Fix registry test for Node 5 2016-03-16 11:05:10 +00:00
Nick O'Leary
7281e4deb6 Add zero-length flow file tests 2016-03-11 22:58:11 +00:00
Nick O'Leary
fe4dae8518 Add propertySelect to switch node 2016-01-06 17:01:13 +00:00
Nick O'Leary
1f848b205b Add propertySelect support to Change node 2016-01-06 17:01:13 +00:00
Nick O'Leary
5ead3342cc Add node context/flow/global 2016-01-06 17:01:13 +00:00
Nick O'Leary
c4b1795396 Add add/update/delete flow apis 2016-01-06 17:01:13 +00:00
Nick O'Leary
fd2e47ed73 WIP: add flow api 2016-01-06 17:01:12 +00:00
Nick O'Leary
05b58e9263 Allow core nodes dir to be provided to runtime via settings 2016-01-06 17:01:12 +00:00
Nick O'Leary
f03aff7006 Tidy up API passed to node modules 2016-01-06 17:01:12 +00:00
Nick O'Leary
043b8a3105 Register node message catalog directly, not via event 2016-01-06 17:01:12 +00:00
Nick O'Leary
1dd9984521 Pickup default language from i18n module 2016-01-06 17:01:12 +00:00
Nick O'Leary
d673846e3d WIP: runtime api for node modules 2016-01-06 17:01:11 +00:00
Nick O'Leary
f62b7afede Remove all uses of fs.exists as it is deprecated
The tests still use it in places - particular localfilesystem tests,
but those tests need to be redone with sinon stubbing in place and
not rely on real fs operations.
2016-01-06 17:01:11 +00:00
Nick O'Leary
e65770a53a Add missing test resources
They were ignored as they have node_modules in the path...
2016-01-06 17:01:11 +00:00
Nick O'Leary
a92a741932 Fix incorrect async test completion 2016-01-06 17:01:11 +00:00
Nick O'Leary
45f67191ba Improve node registry test coverage 2016-01-06 17:01:11 +00:00
Nick O'Leary
93f5da325b Fix node test helper for runtime/api changes 2016-01-06 17:01:11 +00:00
Nick O'Leary
8fb955e182 Move comms from runtime to api component 2016-01-06 17:01:11 +00:00
Nick O'Leary
9f5e6a4b37 Update tests for runtime/api separation 2016-01-06 17:01:11 +00:00