@flowfuse/nr-launcher 3.0.2 → 3.0.3-3b301ba-202609141307.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/launcher.js
CHANGED
|
@@ -167,22 +167,23 @@ class Launcher {
|
|
|
167
167
|
} else if (this.settings.nodesDir && typeof this.settings.nodesDir === 'string') {
|
|
168
168
|
nodesDir.push(this.settings.nodesDir)
|
|
169
169
|
}
|
|
170
|
-
|
|
171
|
-
nodesDir.push(path.join(
|
|
172
|
-
nodesDir.push(path.join(
|
|
173
|
-
nodesDir.push(path.join(
|
|
174
|
-
nodesDir.push(path.join(
|
|
175
|
-
nodesDir.push(path.join(
|
|
170
|
+
const mainPath = require.main ? require.main.path : '/tmp' // needed as mocha breaks require.main
|
|
171
|
+
nodesDir.push(path.join(mainPath, 'node_modules', '@flowfuse', 'nr-project-nodes').replace(/\\/g, '/'))
|
|
172
|
+
nodesDir.push(path.join(mainPath, '..', '..', '@flowfuse', 'nr-project-nodes').replace(/\\/g, '/'))
|
|
173
|
+
nodesDir.push(path.join(mainPath, 'node_modules', '@flowfuse', 'nr-tables-nodes').replace(/\\/g, '/'))
|
|
174
|
+
nodesDir.push(path.join(mainPath, '..', '..', '@flowfuse', 'nr-tables-nodes').replace(/\\/g, '/'))
|
|
175
|
+
nodesDir.push(path.join(mainPath, 'node_modules', '@flowfuse', 'nr-file-nodes').replace(/\\/g, '/'))
|
|
176
|
+
nodesDir.push(path.join(mainPath, '..', '..', '@flowfuse', 'nr-file-nodes').replace(/\\/g, '/'))
|
|
176
177
|
// Only include nr-assistant in nodesDir if the assistant is enabled by the platform
|
|
177
178
|
if (this.settings.assistant?.enabled !== false) {
|
|
178
|
-
nodesDir.push(path.join(
|
|
179
|
-
nodesDir.push(path.join(
|
|
180
|
-
}
|
|
181
|
-
nodesDir.push(path.join(
|
|
182
|
-
nodesDir.push(path.join(
|
|
183
|
-
nodesDir.push(path.join(
|
|
184
|
-
nodesDir.push(path.join(
|
|
185
|
-
nodesDir.push(
|
|
179
|
+
nodesDir.push(path.join(mainPath, 'node_modules', '@flowfuse', 'nr-assistant').replace(/\\/g, '/'))
|
|
180
|
+
nodesDir.push(path.join(mainPath, '..', '..', '@flowfuse', 'nr-assistant').replace(/\\/g, '/'))
|
|
181
|
+
}
|
|
182
|
+
nodesDir.push(path.join(mainPath, 'node_modules', '@flowfuse', 'nr-mqtt-nodes').replace(/\\/g, '/'))
|
|
183
|
+
nodesDir.push(path.join(mainPath, '..', '..', '@flowfuse', 'nr-mqtt-nodes').replace(/\\/g, '/'))
|
|
184
|
+
nodesDir.push(path.join(mainPath, 'node_modules', '@flowfuse', 'nr-subflow-export').replace(/\\/g, '/'))
|
|
185
|
+
nodesDir.push(path.join(mainPath, '..', '..', '@flowfuse', 'nr-subflow-export').replace(/\\/g, '/'))
|
|
186
|
+
nodesDir.push(mainPath)
|
|
186
187
|
|
|
187
188
|
this.settings.nodesDir = nodesDir
|
|
188
189
|
if (hasProperty(this.settings, 'disableAutoSafeMode') && typeof this.settings.disableAutoSafeMode === 'boolean') {
|