node-red-contrib-typescript 1.0.7 → 1.0.10

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.7",
3
+ "version": "1.0.10",
4
4
  "description": "",
5
5
  "author": "kezziny",
6
6
  "license": "ISC",
@@ -62,10 +62,12 @@
62
62
  constructor(node, path) {
63
63
  this.node = node;
64
64
 
65
+ console.log('file://' + path);
66
+
65
67
  const mainModel = monaco.editor.createModel(
66
68
  node.code || "",
67
69
  'typescript',
68
- window.monaco.Uri.parse('file://' + path + "/" + node.name )
70
+ window.monaco.Uri.parse('file://' + path )
69
71
  );
70
72
 
71
73
  this.editor = RED.editor.createEditor({
@@ -207,7 +209,8 @@
207
209
  return this.name || "typescript";
208
210
  },
209
211
  oneditprepare: function() {
210
- let path = "/__editor__.tsx";
212
+ let name = this.name || "__editor__";
213
+ let path = `/${name}.tsx`;
211
214
 
212
215
  let workspaces = [];
213
216
  let subflows = [];
@@ -265,7 +268,7 @@
265
268
  <input id="node-input-outputs" style="width: 60px;" value="1">
266
269
  </div>
267
270
 
268
- <div style="height: calc(100% - 68px); min-height:250px; width: 800px" class="node-text-editor" id="node-input-example-editor"></div>
271
+ <div style="height: calc(100% - 68px); min-height:250px;" class="node-text-editor" id="node-input-example-editor"></div>
269
272
  </script>
270
273
 
271
274
  <script type="text/html" data-help-name="typescript">