Commit Graph

96 Commits

Author SHA1 Message Date
Nick O'Leary dd0d1e700e
Merge pull request #3669 from dschmidt/patch-1
Import default export if node is a transpiled es module
2022-06-27 14:31:43 +01:00
Steve-Mcl ba22b07dce align functionality of `nodesDir` with coreNodesDir and userDir 2022-06-16 10:57:29 +01:00
Dominik Schmidt 326f346936
Import default export if node is a transpiled es module 2022-06-14 22:54:00 +02:00
Nick O'Leary 71a272f0a6
Fix ESM module loading in Function node
Fixes #3627
2022-06-09 22:11:48 -05:00
Nick O'Leary f7bd600715
Fix importing external module from node-red module 2022-04-21 15:06:08 +01:00
Nick O'Leary 1388b03cf2
Remove console.log when ignoring disabled module 2022-02-14 10:46:08 +00:00
Nick O'Leary 8042fe4e2b
Merge branch 'master' into dev 2021-10-06 09:12:16 +01:00
Nick O'Leary 012e1cbcc5
Improve unit test coverage 2021-10-04 17:53:14 +01:00
Nick O'Leary 29e903e1c8
Improve error reporting when installing bad nodes 2021-09-30 15:28:09 +01:00
Nick O'Leary 85820c571d
Add unit tests for allowUpdate settings 2021-09-14 10:50:26 +01:00
Nick O'Leary d9bed03025
Add allowUpdate feature to externalModules.palette 2021-09-13 21:25:12 +01:00
Dave Conway-Jones bbf066f030
Fixes to fs promises so that electron version runs 2021-09-10 08:33:07 +01:00
Nick O'Leary a8d093bacd
Use file:// url with dynamic import 2021-07-21 11:00:24 +01:00
Nick O'Leary 66a704af55
Fallback to 'require' if on node < 12.17 2021-07-15 15:38:07 +01:00
Nick O'Leary ddb715d88d
Record runtime-installed modules in .config.modules.json 2021-07-14 23:13:52 +01:00
Nick O'Leary 7fd17b4ec0
Add RED.import to support importing ES6 modules 2021-07-14 19:18:39 +01:00
Nick O'Leary e6a845e606
Move externalModules back into the user dir 2021-07-13 11:24:10 +01:00
Nick O'Leary b01c5a05e7
Fix reporting of type_already_registered error 2021-07-12 16:09:25 +01:00
Nick O'Leary 36eddabc1c
Ensure node.types is defined if node html file missing 2021-07-12 16:09:02 +01:00
Nick O'Leary 79875ef50d
Merge branch 'master' into dev 2021-06-16 17:03:50 +01:00
Nick O'Leary aea5445495
Support loading external module sub path
Fixes #3023
2021-06-16 17:02:24 +01:00
Nick O'Leary 71ba73b38f
Merge branch 'master' into dev 2021-05-04 11:19:05 +01:00
nileio 676f790933 add engine-strict flag to npm install args 2021-04-28 22:40:17 +10:00
Nick O'Leary 9f2a2b9869
Pass npm args to preUninstall hook to be consistent with preInstall 2021-04-27 17:32:18 +01:00
Nick O'Leary 250005ad16
Allow npm install args to be customised by preInstall trigger 2021-04-20 22:55:06 +01:00
Nick O'Leary b4a03a56b4
Allow preInstall hook to return false to skip npm install 2021-04-19 20:29:30 +01:00
Nick O'Leary 8140057bea
Add pre/postInstall hooks to module install path 2021-04-15 15:12:40 +01:00
Nick O'Leary 51aaf1b150
Handle package.json without dependencies section 2021-04-12 10:34:43 +01:00
Nick O'Leary d555fcf7bd
Merge pull request #2903 from node-red/plugin-resources
Allow module to provide resources and automatically expose them
2021-03-30 22:50:36 +01:00
Nick O'Leary 8543613563
Allow module to provide resources and automatically expose them 2021-03-15 21:06:10 +00:00
Kazuhito Yokoi 734adc6445
Add Japanese translations for Node-RED v1.3.0 (#2900) 2021-03-15 08:23:30 +00:00
Hiroyasu Nishiyama 3671a70e3b fix error report on node load 2021-03-09 10:57:29 +09:00
Nick O'Leary 3d23d1de4f
Merge pull request #2873 from node-red/function-modules
Function node external modules
2021-03-01 21:35:31 +00:00
Nick O'Leary c744af161d
Add support for settings object in plugin definition 2021-02-19 11:59:49 +00:00
Nick O'Leary f96ce2fd83
Get node-red core nodes back to the top of the list 2021-02-17 15:20:16 +00:00
Nick O'Leary 05beb6ca79
Add unit tests for externalModules 2021-02-15 17:28:14 +00:00
Nick O'Leary d2c9ccbfdd
Detect externalModule dependencies inside subflow modules
Not sure this is 100% the right approach. If a subflow module has a dependency
it should be in the subflow's package.json and therefore installed next to the
subflow module in ~/.node-red/node_modules.

By treating it as a 'normal' external module, it will be dynamically installed
in ~/.node-red/externalModules. That then exposes the module to the user
who won't know why its there and may remove it.

It would be better to allow nodes inside a subflow module to require
from ~/.node-red/node_modules and not limit it to the externalModules
dir. The hard part is knowing when to do that.
2021-02-14 00:02:08 +00:00
Nick O'Leary 6336ab121e
Merge branch 'dev' into function-modules 2021-02-13 00:21:27 +00:00
Nick O'Leary a94c19a6cf
Fix up loading of freshly installed modules in Function node 2021-02-12 22:40:30 +00:00
Nick O'Leary 9c09ee3b71
Rework Function node module integration 2021-02-12 18:14:13 +00:00
Nick O'Leary 3a0074d96e
Merge branch 'master' into dev 2021-01-27 23:28:19 +00:00
Hiroyasu Nishiyama 4a1d66f210 update UI, Runtime API, metadata handling, and others 2021-01-27 22:27:54 +09:00
Nick O'Leary 1f6328bf4e
Add initial support for ThemePlugins 2021-01-26 13:49:47 +00:00
Nick O'Leary 6e718ca772
Fix merge of dev 2021-01-26 13:44:38 +00:00
Ben Hardill ca44af0625
Prevent crash when coreNodesDir is empty (#2831)
* Fix for HTTP-Request not sending body for GET

Background in SO question:
https://stackoverflow.com/q/60356824/504554

* Prevent crash when coreNodesDir points to empty dir

This should prevent a crash when you point to an empty core nodes
directory.

* Matching upstream master
2021-01-25 10:56:23 +00:00
Nick O'Leary 9f71dbb006
Fixup merge 2021-01-18 16:25:41 +00:00
Nick O'Leary a006b52052
Initial plugin runtime api implementation 2021-01-18 16:25:40 +00:00
Hiroyasu Nishiyama d51aefa156 initial support for npm module installation 2021-01-11 19:32:16 +09:00
Nick O'Leary d5cc5b2574
Use subflow.info for help text and meta.type for node type 2021-01-07 15:34:27 +00:00
Nick O'Leary da96c85d32
Handle subflow modules with their own npm dependencies 2021-01-07 11:26:20 +00:00