node-red-contrib-typescript 1.0.7 → 1.0.8

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.8",
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 = [];