@gregoriusrippenstein/node-red-contrib-nodedev 0.2.2 → 0.2.3
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/nodes/lib/tarhelpers.js
CHANGED
|
@@ -3,7 +3,6 @@ module.exports = (function () {
|
|
|
3
3
|
var tarStream = require('tar-stream');
|
|
4
4
|
var streamx = require('streamx');
|
|
5
5
|
var pakoGzip = require('pako');
|
|
6
|
-
var buffer = require('buffer');
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
* there is no indication in a tar file of whether a file is binary or textual.
|
|
@@ -66,7 +65,7 @@ module.exports = (function () {
|
|
|
66
65
|
type: "PkgFile",
|
|
67
66
|
name: header.name.split("/").at(-1),
|
|
68
67
|
filename: header.name.replace(/^package\//, ''),
|
|
69
|
-
template:
|
|
68
|
+
template: Buffer.concat(buffer).toString(frmt == "base64" ? 'base64' : 'utf8'),
|
|
70
69
|
syntax: "plain", // not mustache templates, these are files.
|
|
71
70
|
format: frmt,
|
|
72
71
|
output: "str",
|
|
@@ -93,7 +92,7 @@ module.exports = (function () {
|
|
|
93
92
|
})
|
|
94
93
|
|
|
95
94
|
extract.on('error', onError );
|
|
96
|
-
var stream = streamx.Readable.from(
|
|
95
|
+
var stream = streamx.Readable.from(Buffer.from(pakoGzip.inflate(new Uint8Array(tgzData))))
|
|
97
96
|
stream.pipe(extract);
|
|
98
97
|
}
|
|
99
98
|
|
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
pkgname: { value: "node-red-dashboard" },
|
|
8
8
|
pkgversion: { value: "latest" }
|
|
9
9
|
},
|
|
10
|
-
paletteLabel: '
|
|
10
|
+
paletteLabel: 'PackageImporter',
|
|
11
11
|
label: function () {
|
|
12
|
-
return "
|
|
12
|
+
return "PackageImporter"
|
|
13
13
|
}
|
|
14
14
|
});
|
|
15
15
|
})(jQuery);
|