node-red-contrib-typescript 1.0.8 → 1.0.11

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-typescript",
3
- "version": "1.0.8",
3
+ "version": "1.0.11",
4
4
  "description": "",
5
5
  "author": "kezziny",
6
6
  "license": "ISC",
@@ -197,6 +197,7 @@
197
197
  color: '#3178c6',
198
198
  defaults: {
199
199
  name: {value:""},
200
+ filename: {value:""},
200
201
  outputs:{value:1},
201
202
  code: {value:""},
202
203
  },
@@ -266,9 +267,11 @@
266
267
  <div class="form-row">
267
268
  <label for="node-input-outputs"><i class="fa fa-random"></i> <span data-i18n="function.label.outputs"></span></label>
268
269
  <input id="node-input-outputs" style="width: 60px;" value="1">
270
+ <label for="node-input-filename"><i class="fa fa-random"></i> Override filename</label>
271
+ <input id="node-input-filename" style="width: 60px;" value="">
269
272
  </div>
270
273
 
271
- <div style="height: calc(100% - 68px); min-height:250px; width: 800px" class="node-text-editor" id="node-input-example-editor"></div>
274
+ <div style="height: calc(100% - 68px); min-height:250px;" class="node-text-editor" id="node-input-example-editor"></div>
272
275
  </script>
273
276
 
274
277
  <script type="text/html" data-help-name="typescript">
@@ -85,9 +85,10 @@ module.exports = function(RED) {
85
85
  dependency = registry[target];
86
86
  await new Promise(r => setTimeout(r, 50));
87
87
  }
88
- if (dependency === null || dependency === undefined) reject(new Error("Dependency not found: " + target));
89
- else {
88
+ try {
90
89
  dependency.loading.then(() => resolve(dependency)).catch(error => reject(error));
90
+ } catch (e) {
91
+ reject(new Error("Dependency not found: " + target));
91
92
  }
92
93
  })
93
94
  );