innetjs 2.6.0-alpha.8 → 2.6.0-alpha.9
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/_virtual/_rollup-plugin-process-env.js +1 -1
- package/_virtual/_rollup-plugin-process-env.mjs +1 -1
- package/bin/innet +9 -3
- package/index.js +8 -2
- package/index.mjs +9 -3
- package/package.json +1 -1
package/bin/innet
CHANGED
|
@@ -237,8 +237,14 @@ class InnetJS {
|
|
|
237
237
|
yield pipeline(data, fs__default["default"].createWriteStream(zipPath));
|
|
238
238
|
yield new Promise((resolve, reject) => {
|
|
239
239
|
fs__default["default"].createReadStream(zipPath)
|
|
240
|
-
.pipe(unzipper.
|
|
241
|
-
.on('
|
|
240
|
+
.pipe(unzipper.Parse())
|
|
241
|
+
.on('entry', (entry) => {
|
|
242
|
+
const fileName = entry.path;
|
|
243
|
+
const filePath = path__default["default"].join(appPath, fileName);
|
|
244
|
+
entry.pipe(fs__default["default"].createWriteStream(filePath));
|
|
245
|
+
})
|
|
246
|
+
.on('close', resolve)
|
|
247
|
+
.on('error', reject);
|
|
242
248
|
});
|
|
243
249
|
yield fs__default["default"].remove(zipPath);
|
|
244
250
|
}));
|
|
@@ -772,7 +778,7 @@ class InnetJS {
|
|
|
772
778
|
}
|
|
773
779
|
|
|
774
780
|
(function () {
|
|
775
|
-
const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.
|
|
781
|
+
const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.9"};
|
|
776
782
|
if (typeof process === 'undefined') {
|
|
777
783
|
globalThis.process = { env: env };
|
|
778
784
|
} else if (process.env) {
|
package/index.js
CHANGED
|
@@ -165,8 +165,14 @@ class InnetJS {
|
|
|
165
165
|
yield pipeline(data, fs__default["default"].createWriteStream(zipPath));
|
|
166
166
|
yield new Promise((resolve, reject) => {
|
|
167
167
|
fs__default["default"].createReadStream(zipPath)
|
|
168
|
-
.pipe(unzipper.
|
|
169
|
-
.on('
|
|
168
|
+
.pipe(unzipper.Parse())
|
|
169
|
+
.on('entry', (entry) => {
|
|
170
|
+
const fileName = entry.path;
|
|
171
|
+
const filePath = path__default["default"].join(appPath, fileName);
|
|
172
|
+
entry.pipe(fs__default["default"].createWriteStream(filePath));
|
|
173
|
+
})
|
|
174
|
+
.on('close', resolve)
|
|
175
|
+
.on('error', reject);
|
|
170
176
|
});
|
|
171
177
|
yield fs__default["default"].remove(zipPath);
|
|
172
178
|
}));
|
package/index.mjs
CHANGED
|
@@ -33,7 +33,7 @@ import styles from 'rollup-plugin-styles';
|
|
|
33
33
|
import { terser } from 'rollup-plugin-terser';
|
|
34
34
|
import stream from 'node:stream';
|
|
35
35
|
import tmp from 'tmp';
|
|
36
|
-
import {
|
|
36
|
+
import { Parse } from 'unzipper';
|
|
37
37
|
import { promisify } from 'node:util';
|
|
38
38
|
import { stringExcludeNode, imageInclude, stringExcludeDom, lintInclude } from './constants.mjs';
|
|
39
39
|
import { reporter, convertIndexFile, getFile } from './helpers.mjs';
|
|
@@ -129,8 +129,14 @@ class InnetJS {
|
|
|
129
129
|
yield pipeline(data, fs.createWriteStream(zipPath));
|
|
130
130
|
yield new Promise((resolve, reject) => {
|
|
131
131
|
fs.createReadStream(zipPath)
|
|
132
|
-
.pipe(
|
|
133
|
-
.on('
|
|
132
|
+
.pipe(Parse())
|
|
133
|
+
.on('entry', (entry) => {
|
|
134
|
+
const fileName = entry.path;
|
|
135
|
+
const filePath = path.join(appPath, fileName);
|
|
136
|
+
entry.pipe(fs.createWriteStream(filePath));
|
|
137
|
+
})
|
|
138
|
+
.on('close', resolve)
|
|
139
|
+
.on('error', reject);
|
|
134
140
|
});
|
|
135
141
|
yield fs.remove(zipPath);
|
|
136
142
|
}));
|