Add externalModules config to settings.js

This commit is contained in:
Nick O'Leary 2021-03-31 23:14:08 +01:00
parent 70632706f9
commit fe5d4abec1
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 25 additions and 1 deletions

View File

@ -193,6 +193,7 @@ module.exports = {
// The following property can be used to add a custom middleware function
// in front of all http in nodes. This allows custom authentication to be
// applied to all http in nodes, or any other sort of common request processing.
// It can be a single function or an array of middleware functions.
//httpNodeMiddleware: function(req,res,next) {
// // Handle/reject the request, or pass it on to the http in node by calling next();
// // Optionally skip our rawBodyParser by setting this to true;
@ -203,7 +204,7 @@ module.exports = {
// The following property can be used to add a custom middleware function
// in front of all admin http routes. For example, to set custom http
// headers
// headers. It can be a single function or an array of middleware functions.
// httpAdminMiddleware: function(req,res,next) {
// // Set the X-Frame-Options header to limit where the editor
// // can be embedded
@ -300,6 +301,29 @@ module.exports = {
}
},
// Configure how the runtime will handle external npm modules.
// This covers:
// - whether the editor will allow new node modules to be installed
// - whether nodes, such as the Function node are allowed to have their
// own dynamically configured dependencies.
// The allow/denyList options can be used to limit what modules the runtime
// will install/load. It can use '*' as a wildcard that matches anything.
externalModules: {
// autoInstall: false, // Whether the runtime will attempt to automatically install missing modules
// autoInstallRetry: 30, // Interval, in seconds, between reinstall attempts
// palette: { // Configuration for the Palette Manager
// allowInstall: true, // Enable the Palette Manager in the editor
// allowUpload: true, // Allow module tgz files to be uploaded and installed
// allowList: [],
// denyList: []
// },
// modules: { // Configuration for node-specified modules
// allowInstall: true,
// allowList: [],
// denyList: []
// }
},
// Customising the editor
editorTheme: {
projects: {