@abtnode/util 1.16.54-beta-20251017-133309-7d40faa6 → 1.16.54-beta-20251021-070951-25e3083c
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.
|
@@ -6,7 +6,7 @@ const tar = require('tar');
|
|
|
6
6
|
const chalk = require('chalk');
|
|
7
7
|
const slugify = require('slugify');
|
|
8
8
|
const packList = require('npm-packlist');
|
|
9
|
-
const getBlockletMeta = require('@blocklet/meta/lib/parse');
|
|
9
|
+
const { parse: getBlockletMeta } = require('@blocklet/meta/lib/parse');
|
|
10
10
|
const {
|
|
11
11
|
BLOCKLET_RELEASE_FOLDER_NAME,
|
|
12
12
|
BLOCKLET_RELEASE_FILE,
|
package/lib/did-document.js
CHANGED
|
@@ -20,7 +20,7 @@ const getDID = (address) => {
|
|
|
20
20
|
return `did:abt:${address}`;
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const update = ({ id, services, didRegistryUrl, wallet, alsoKnownAs = [], blockletServerVersion }) => {
|
|
23
|
+
const update = async ({ id, services, didRegistryUrl, wallet, alsoKnownAs = [], blockletServerVersion }) => {
|
|
24
24
|
debug('update did document', { didRegistryUrl });
|
|
25
25
|
|
|
26
26
|
const did = getDID(wallet.address);
|
|
@@ -49,7 +49,7 @@ const update = ({ id, services, didRegistryUrl, wallet, alsoKnownAs = [], blockl
|
|
|
49
49
|
type: 'Ed25519Signature',
|
|
50
50
|
created: time,
|
|
51
51
|
verificationMethod: `${did}#key-1`,
|
|
52
|
-
jws: toBase64(wallet.sign(stringify(document))),
|
|
52
|
+
jws: toBase64(await wallet.sign(stringify(document))),
|
|
53
53
|
};
|
|
54
54
|
|
|
55
55
|
document.proof = proof;
|
|
@@ -134,7 +134,7 @@ module.exports = async ({
|
|
|
134
134
|
throw new Error('"timeout" should not less than "minConsecutiveTime"');
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
const fn = async () => {
|
|
138
138
|
await ensureStarted({ host, port, protocol, timeout: timeout - minConsecutiveTime, minConsecutiveTime, waitTCP });
|
|
139
139
|
if (doConsecutiveCheck) {
|
|
140
140
|
try {
|
|
@@ -160,7 +160,8 @@ module.exports = async ({
|
|
|
160
160
|
);
|
|
161
161
|
}
|
|
162
162
|
}
|
|
163
|
-
}
|
|
163
|
+
};
|
|
164
|
+
return tryWithTimeout(fn, timeout);
|
|
164
165
|
};
|
|
165
166
|
|
|
166
167
|
module.exports.dial = dial;
|
package/lib/try-with-timeout.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable no-async-promise-executor */
|
|
2
2
|
module.exports = (asyncFn, timeout = 5000) => {
|
|
3
3
|
if (typeof asyncFn !== 'function') {
|
|
4
|
-
throw new Error(
|
|
4
|
+
throw new Error(`Must provide a valid asyncFn function, type: ${typeof asyncFn}`);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
return new Promise(async (resolve, reject) => {
|
package/lib/url-path-friendly.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.54-beta-
|
|
6
|
+
"version": "1.16.54-beta-20251021-070951-25e3083c",
|
|
7
7
|
"description": "ArcBlock's JavaScript utility",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -12,25 +12,25 @@
|
|
|
12
12
|
"scripts": {
|
|
13
13
|
"lint": "eslint tests lib",
|
|
14
14
|
"lint:fix": "eslint --fix tests lib",
|
|
15
|
-
"test": "NODE_ENV=test
|
|
16
|
-
"coverage": "ABT_NODE_HOST=''
|
|
15
|
+
"test": "NODE_ENV=test ABT_NODE_HOST='' bun test",
|
|
16
|
+
"coverage": "ABT_NODE_HOST='' bun test --coverage"
|
|
17
17
|
},
|
|
18
18
|
"author": "polunzh <polunzh@gmail.com> (http://github.com/polunzh)",
|
|
19
19
|
"license": "Apache-2.0",
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@abtnode/constant": "1.16.54-beta-
|
|
22
|
-
"@abtnode/db-cache": "1.16.54-beta-
|
|
23
|
-
"@arcblock/did": "1.
|
|
24
|
-
"@arcblock/event-hub": "1.
|
|
21
|
+
"@abtnode/constant": "1.16.54-beta-20251021-070951-25e3083c",
|
|
22
|
+
"@abtnode/db-cache": "1.16.54-beta-20251021-070951-25e3083c",
|
|
23
|
+
"@arcblock/did": "^1.26.2",
|
|
24
|
+
"@arcblock/event-hub": "^1.26.2",
|
|
25
25
|
"@arcblock/pm2": "^6.0.12",
|
|
26
|
-
"@blocklet/constant": "1.16.54-beta-
|
|
26
|
+
"@blocklet/constant": "1.16.54-beta-20251021-070951-25e3083c",
|
|
27
27
|
"@blocklet/error": "^0.2.5",
|
|
28
|
-
"@blocklet/meta": "1.16.54-beta-
|
|
28
|
+
"@blocklet/meta": "1.16.54-beta-20251021-070951-25e3083c",
|
|
29
29
|
"@blocklet/xss": "^0.2.12",
|
|
30
|
-
"@ocap/client": "1.
|
|
31
|
-
"@ocap/mcrypto": "1.
|
|
32
|
-
"@ocap/util": "1.
|
|
33
|
-
"@ocap/wallet": "1.
|
|
30
|
+
"@ocap/client": "^1.26.2",
|
|
31
|
+
"@ocap/mcrypto": "^1.26.2",
|
|
32
|
+
"@ocap/util": "^1.26.2",
|
|
33
|
+
"@ocap/wallet": "^1.26.2",
|
|
34
34
|
"archiver": "^7.0.1",
|
|
35
35
|
"axios": "^1.7.9",
|
|
36
36
|
"axios-mock-adapter": "^2.1.0",
|
|
@@ -91,5 +91,5 @@
|
|
|
91
91
|
"fs-extra": "^11.2.0",
|
|
92
92
|
"jest": "^29.7.0"
|
|
93
93
|
},
|
|
94
|
-
"gitHead": "
|
|
94
|
+
"gitHead": "db517e9013dbad744e38883f56e4eba1fa1615c1"
|
|
95
95
|
}
|