node-red-contrib-typescript 1.0.4 → 1.0.6

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.4",
3
+ "version": "1.0.6",
4
4
  "description": "",
5
5
  "author": "kezziny",
6
6
  "license": "ISC",
@@ -116,14 +116,14 @@
116
116
  nodes
117
117
  .filter(node => node.z === id)
118
118
  .forEach(node => {
119
- imports[`/${encodeURIComponent(node.name)}.ts`] = node.code;
119
+ imports[`/${node.name}.ts`] = node.code;
120
120
  });
121
121
  subflowNodes
122
122
  .filter(node => node.z === id)
123
123
  .forEach(node => {
124
124
  let subImports = resolveFlow(node.type.split(":")[1]);
125
125
  for (let key in subImports) {
126
- imports[`/${encodeURIComponent(node.name)}${key}`] = subImports[key];
126
+ imports[`/${node.name}${key}`] = subImports[key];
127
127
  }
128
128
  });
129
129
  return imports;
@@ -64,7 +64,7 @@ module.exports = function(RED) {
64
64
  target = target.substring(1);
65
65
  }
66
66
  if (target.startsWith("./")) {
67
- if ("".indexOf("/") !== -1) {
67
+ if (node.config.name.indexOf("/") !== -1) {
68
68
  let count = node.config.name.lastIndexOf("/") + 1;
69
69
  let pathSuffix = node.config.name.substring(0, count);
70
70
  target = path + pathSuffix + target.substring(2);
@@ -122,7 +122,7 @@ module.exports = function(RED) {
122
122
  target = target.substring(1);
123
123
  }
124
124
  if (target.startsWith("./")) {
125
- if ("".indexOf("/") !== -1) {
125
+ if (node.config.name.indexOf("/") !== -1) {
126
126
  let count = node.config.name.lastIndexOf("/") + 1;
127
127
  let pathSuffix = node.config.name.substring(0, count);
128
128
  target = path + pathSuffix + target.substring(2);
@@ -177,4 +177,4 @@ module.exports = function(RED) {
177
177
  });
178
178
  }
179
179
  RED.nodes.registerType("typescript", TypescriptInstance);
180
- }
180
+ }