Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion lib/launcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ class Launcher {
const libraryEnabled = this.settings?.features ? this.settings.features['shared-library'] : false
if (libraryEnabled && this.config.licensed) {
settings.nodesDir = settings.nodesDir || []
settings.nodesDir.push(path.join(__dirname, 'plugins', 'node_modules', '@flowforge', 'flowforge-library-plugin'))
settings.nodesDir.push(path.join(__dirname, 'plugins', 'node_modules', '@flowfuse', 'flowfuse-library-plugin'))
const sharedLibraryConfig = {
id: 'flowfuse-team-library',
type: 'flowfuse-team-library',
Expand All @@ -274,6 +274,23 @@ class Launcher {
sources: [sharedLibraryConfig]
}
}
if (this.config.licensed) {
settings.nodesDir = settings.nodesDir || []
settings.nodesDir.push(path.join(__dirname, 'plugins', 'node_modules', '@flowfuse', 'flowfuse-blueprint-plugin'))
settings.editorTheme.library = settings.editorTheme.library || { sources: [] }
settings.editorTheme.library.sources.push({
id: 'flowfuse-blueprint-library',
type: 'flowfuse-blueprint-library',
label: 'Blueprints',
icon: 'font-awesome/fa-map-o',
types: ['flows'],
readOnly: true,
forgeURL: this.config.forgeURL,
teamID: settings.flowforge.teamID,
token: this.config.token
})
}
console.log(settings.nodesDir)
if (this.config.https) {
// The `https` config can contain any valid setting from the Node-RED
// https object. For convenience, the `key`, `ca` and `cert` settings
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion test/unit/lib/plugins/libraryPlugin_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const should = require('should') // eslint-disable-line
const sinon = require('sinon') // eslint-disable-line
const HttpProxyAgent = require('http-proxy-agent').HttpProxyAgent
const HttpsProxyAgent = require('https-proxy-agent').HttpsProxyAgent
const pluginModule = require('../../../../lib/plugins/node_modules/@flowforge/flowforge-library-plugin/libraryPlugin.js')
const pluginModule = require('../../../../lib/plugins/node_modules/@flowfuse/flowfuse-library-plugin/libraryPlugin.js')
let FFTeamLibraryPluginClass = null

// simulate RED object to capture the plugin class for performing unit tests on the internal plugin
Expand Down