@abtnode/core 1.16.6-beta-593a7a98 → 1.16.6-beta-e2082fec

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.
Files changed (2) hide show
  1. package/lib/util/index.js +7 -3
  2. package/package.json +17 -18
package/lib/util/index.js CHANGED
@@ -2,7 +2,6 @@ const fs = require('fs');
2
2
  const os = require('os');
3
3
  const path = require('path');
4
4
  const dns = require('dns');
5
- const unzipper = require('unzipper');
6
5
  const crypto = require('crypto');
7
6
  const shell = require('shelljs');
8
7
  const get = require('lodash/get');
@@ -12,6 +11,7 @@ const joinUrl = require('url-join');
12
11
  const { Certificate } = require('@fidm/x509');
13
12
  const getPortLib = require('get-port');
14
13
  const v8 = require('v8');
14
+ const StreamZip = require('node-stream-zip');
15
15
  const normalizePathPrefix = require('@abtnode/util/lib/normalize-path-prefix');
16
16
  const axios = require('@abtnode/util/lib/axios');
17
17
  const { encode: encodeBase32 } = require('@abtnode/util/lib/base32');
@@ -251,8 +251,12 @@ const getBaseUrls = async (node, ips) => {
251
251
  }));
252
252
  };
253
253
 
254
- const expandBundle = (bundlePath, destDir) =>
255
- unzipper.Open.file(bundlePath).then((d) => d.extract({ path: destDir, concurrency: 20 }));
254
+ const expandBundle = async (bundlePath, destDir) => {
255
+ // eslint-disable-next-line new-cap
256
+ const zip = new StreamZip.async({ file: bundlePath });
257
+ await zip.extract(null, destDir);
258
+ await zip.close();
259
+ };
256
260
 
257
261
  // eslint-disable-next-line no-shadow
258
262
  const findInterfaceByName = (blocklet, name) => {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.16.6-beta-593a7a98",
6
+ "version": "1.16.6-beta-e2082fec",
7
7
  "description": "",
8
8
  "main": "lib/index.js",
9
9
  "files": [
@@ -19,18 +19,18 @@
19
19
  "author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
20
20
  "license": "MIT",
21
21
  "dependencies": {
22
- "@abtnode/auth": "1.16.6-beta-593a7a98",
23
- "@abtnode/certificate-manager": "1.16.6-beta-593a7a98",
24
- "@abtnode/constant": "1.16.6-beta-593a7a98",
25
- "@abtnode/cron": "1.16.6-beta-593a7a98",
26
- "@abtnode/db": "1.16.6-beta-593a7a98",
27
- "@abtnode/logger": "1.16.6-beta-593a7a98",
28
- "@abtnode/queue": "1.16.6-beta-593a7a98",
29
- "@abtnode/rbac": "1.16.6-beta-593a7a98",
30
- "@abtnode/router-provider": "1.16.6-beta-593a7a98",
31
- "@abtnode/static-server": "1.16.6-beta-593a7a98",
32
- "@abtnode/timemachine": "1.16.6-beta-593a7a98",
33
- "@abtnode/util": "1.16.6-beta-593a7a98",
22
+ "@abtnode/auth": "1.16.6-beta-e2082fec",
23
+ "@abtnode/certificate-manager": "1.16.6-beta-e2082fec",
24
+ "@abtnode/constant": "1.16.6-beta-e2082fec",
25
+ "@abtnode/cron": "1.16.6-beta-e2082fec",
26
+ "@abtnode/db": "1.16.6-beta-e2082fec",
27
+ "@abtnode/logger": "1.16.6-beta-e2082fec",
28
+ "@abtnode/queue": "1.16.6-beta-e2082fec",
29
+ "@abtnode/rbac": "1.16.6-beta-e2082fec",
30
+ "@abtnode/router-provider": "1.16.6-beta-e2082fec",
31
+ "@abtnode/static-server": "1.16.6-beta-e2082fec",
32
+ "@abtnode/timemachine": "1.16.6-beta-e2082fec",
33
+ "@abtnode/util": "1.16.6-beta-e2082fec",
34
34
  "@arcblock/did": "1.18.77",
35
35
  "@arcblock/did-auth": "1.18.77",
36
36
  "@arcblock/did-ext": "^1.18.77",
@@ -40,9 +40,9 @@
40
40
  "@arcblock/jwt": "^1.18.77",
41
41
  "@arcblock/pm2-events": "^0.0.5",
42
42
  "@arcblock/vc": "1.18.77",
43
- "@blocklet/constant": "1.16.6-beta-593a7a98",
44
- "@blocklet/meta": "1.16.6-beta-593a7a98",
45
- "@blocklet/sdk": "1.16.6-beta-593a7a98",
43
+ "@blocklet/constant": "1.16.6-beta-e2082fec",
44
+ "@blocklet/meta": "1.16.6-beta-e2082fec",
45
+ "@blocklet/sdk": "1.16.6-beta-e2082fec",
46
46
  "@did-space/client": "^0.2.88",
47
47
  "@fidm/x509": "^1.2.1",
48
48
  "@ocap/mcrypto": "1.18.77",
@@ -83,7 +83,6 @@
83
83
  "tar": "^6.1.11",
84
84
  "transliteration": "^2.3.5",
85
85
  "ua-parser-js": "^1.0.2",
86
- "unzipper": "^0.10.11",
87
86
  "url-join": "^4.0.1",
88
87
  "uuid": "7.0.3",
89
88
  "valid-url": "^1.0.9"
@@ -94,5 +93,5 @@
94
93
  "express": "^4.18.2",
95
94
  "jest": "^27.5.1"
96
95
  },
97
- "gitHead": "5ea65d1ddc91e997f029741f01ce453464d86666"
96
+ "gitHead": "851e0ab17f1c6e160aedc47fcdbf7dd54dfa7237"
98
97
  }