node-red-contrib-typescript 1.0.12 → 1.0.14
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/package.json
CHANGED
|
@@ -267,8 +267,10 @@
|
|
|
267
267
|
<div class="form-row">
|
|
268
268
|
<label for="node-input-outputs"><i class="fa fa-random"></i> <span data-i18n="function.label.outputs"></span></label>
|
|
269
269
|
<input id="node-input-outputs" style="width: 60px;" value="1">
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
</div>
|
|
271
|
+
<div class="form-row">
|
|
272
|
+
<label for="node-input-filename"><i class="fa fa-tag"></i> Filename <br><sub>(prefix, if ends with '/')</sub></label>
|
|
273
|
+
<input id="node-input-filename" type="text" value="">
|
|
272
274
|
</div>
|
|
273
275
|
|
|
274
276
|
<div style="height: calc(100% - 68px); min-height:250px;" class="node-text-editor" id="node-input-example-editor"></div>
|
package/src/instance/instance.js
CHANGED
|
@@ -12,6 +12,14 @@ module.exports = function(RED) {
|
|
|
12
12
|
node.modules = config.modules;
|
|
13
13
|
node.code = config.code;
|
|
14
14
|
|
|
15
|
+
if (node.config.filename) {
|
|
16
|
+
if (node.config.filename.endsWith("/")) {
|
|
17
|
+
node.config.name = node.config.filename + node.config.name;
|
|
18
|
+
} else {
|
|
19
|
+
node.config.name = node.config.filename;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
15
23
|
var sandbox = helper.createSandbox(RED, node);
|
|
16
24
|
let moduleErrors = false;
|
|
17
25
|
|