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.
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  ;(function () {
4
- const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.8"};
4
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.9"};
5
5
  if (typeof process === 'undefined') {
6
6
  globalThis.process = { env: env };
7
7
  } else if (process.env) {
@@ -1,5 +1,5 @@
1
1
  ;(function () {
2
- const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.8"};
2
+ const env = {"__INNETJS__PACKAGE_VERSION":"2.6.0-alpha.9"};
3
3
  if (typeof process === 'undefined') {
4
4
  globalThis.process = { env: env };
5
5
  } else if (process.env) {
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.Extract({ path: appPath }))
241
- .on('finish', resolve).on('error', reject);
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.8"};
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.Extract({ path: appPath }))
169
- .on('finish', resolve).on('error', reject);
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 { Extract } from 'unzipper';
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(Extract({ path: appPath }))
133
- .on('finish', resolve).on('error', reject);
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
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "innetjs",
3
- "version": "2.6.0-alpha.8",
3
+ "version": "2.6.0-alpha.9",
4
4
  "description": "CLI for innet boilerplate",
5
5
  "homepage": "https://github.com/d8corp/innetjs",
6
6
  "author": "Mikhail Lysikov <d8corp@mail.ru>",