@abtnode/core 1.16.29-beta-112566d5 → 1.16.29-beta-cbfd116d
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/lib/blocklet/manager/disk.js +23 -7
- package/lib/states/user.js +1 -0
- package/package.json +22 -22
|
@@ -1349,17 +1349,31 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
|
|
1352
|
-
|
|
1353
|
-
|
|
1352
|
+
/**
|
|
1353
|
+
*
|
|
1354
|
+
* @param {object} param - params
|
|
1355
|
+
* @param {string} param.did - blocklet did
|
|
1356
|
+
* @param {string[]} param.componentDids - component dids
|
|
1357
|
+
* @param {boolean} param.shouldUpdateBlockletStatus - should update blocklet status
|
|
1358
|
+
* @param {*} context
|
|
1359
|
+
* @returns
|
|
1360
|
+
*/
|
|
1361
|
+
async deleteProcess({ did, componentDids, shouldUpdateBlockletStatus = true }, context) {
|
|
1354
1362
|
const blocklet = await this.getBlocklet(did);
|
|
1355
1363
|
|
|
1356
1364
|
logger.info('delete blocklet process', { did, componentDids });
|
|
1357
1365
|
|
|
1358
1366
|
await deleteBlockletProcess(blocklet, { ...context, componentDids });
|
|
1359
|
-
|
|
1360
|
-
const result = await states.blocklet.setBlockletStatus(did, BlockletStatus.stopped, { componentDids });
|
|
1361
1367
|
logger.info('blocklet process deleted successfully', { did, componentDids });
|
|
1362
|
-
|
|
1368
|
+
|
|
1369
|
+
// 有些情况不需要更新 blocklet 状态, 比如下载完成,安装之前清理 process 时, 不需要更新 blocklet 状态
|
|
1370
|
+
if (shouldUpdateBlockletStatus) {
|
|
1371
|
+
const result = await states.blocklet.setBlockletStatus(did, BlockletStatus.stopped, { componentDids });
|
|
1372
|
+
logger.info('blocklet status updated to stopped after deleted processes', { did, componentDids });
|
|
1373
|
+
return result;
|
|
1374
|
+
}
|
|
1375
|
+
|
|
1376
|
+
return blocklet;
|
|
1363
1377
|
}
|
|
1364
1378
|
|
|
1365
1379
|
// Get blocklet by blockletDid or appDid
|
|
@@ -3259,7 +3273,9 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
3259
3273
|
return null;
|
|
3260
3274
|
}
|
|
3261
3275
|
|
|
3262
|
-
blocklet.site
|
|
3276
|
+
if (blocklet.site) {
|
|
3277
|
+
blocklet.site.domainAliases = await this.getDomainAliases(blocklet, context);
|
|
3278
|
+
}
|
|
3263
3279
|
|
|
3264
3280
|
// app runtime info, app status
|
|
3265
3281
|
blocklet.appRuntimeInfo = this.runtimeMonitor.getRuntimeInfo(blocklet.meta.did);
|
|
@@ -3449,7 +3465,7 @@ class DiskBlockletManager extends BaseBlockletManager {
|
|
|
3449
3465
|
|
|
3450
3466
|
// ensure delete process
|
|
3451
3467
|
try {
|
|
3452
|
-
await this.deleteProcess({ did }, context);
|
|
3468
|
+
await this.deleteProcess({ did, shouldUpdateBlockletStatus: false }, context);
|
|
3453
3469
|
logger.info('ensure delete blocklet process for installing', { did, name: meta.name });
|
|
3454
3470
|
} catch (err) {
|
|
3455
3471
|
logger.error('ensure delete blocklet process failed for installing', { did, name: meta.name, error: err });
|
package/lib/states/user.js
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.29-beta-
|
|
6
|
+
"version": "1.16.29-beta-cbfd116d",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -19,19 +19,19 @@
|
|
|
19
19
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
20
20
|
"license": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/analytics": "1.16.29-beta-
|
|
23
|
-
"@abtnode/auth": "1.16.29-beta-
|
|
24
|
-
"@abtnode/certificate-manager": "1.16.29-beta-
|
|
25
|
-
"@abtnode/constant": "1.16.29-beta-
|
|
26
|
-
"@abtnode/cron": "1.16.29-beta-
|
|
27
|
-
"@abtnode/logger": "1.16.29-beta-
|
|
28
|
-
"@abtnode/models": "1.16.29-beta-
|
|
29
|
-
"@abtnode/queue": "1.16.29-beta-
|
|
30
|
-
"@abtnode/rbac": "1.16.29-beta-
|
|
31
|
-
"@abtnode/router-provider": "1.16.29-beta-
|
|
32
|
-
"@abtnode/static-server": "1.16.29-beta-
|
|
33
|
-
"@abtnode/timemachine": "1.16.29-beta-
|
|
34
|
-
"@abtnode/util": "1.16.29-beta-
|
|
22
|
+
"@abtnode/analytics": "1.16.29-beta-cbfd116d",
|
|
23
|
+
"@abtnode/auth": "1.16.29-beta-cbfd116d",
|
|
24
|
+
"@abtnode/certificate-manager": "1.16.29-beta-cbfd116d",
|
|
25
|
+
"@abtnode/constant": "1.16.29-beta-cbfd116d",
|
|
26
|
+
"@abtnode/cron": "1.16.29-beta-cbfd116d",
|
|
27
|
+
"@abtnode/logger": "1.16.29-beta-cbfd116d",
|
|
28
|
+
"@abtnode/models": "1.16.29-beta-cbfd116d",
|
|
29
|
+
"@abtnode/queue": "1.16.29-beta-cbfd116d",
|
|
30
|
+
"@abtnode/rbac": "1.16.29-beta-cbfd116d",
|
|
31
|
+
"@abtnode/router-provider": "1.16.29-beta-cbfd116d",
|
|
32
|
+
"@abtnode/static-server": "1.16.29-beta-cbfd116d",
|
|
33
|
+
"@abtnode/timemachine": "1.16.29-beta-cbfd116d",
|
|
34
|
+
"@abtnode/util": "1.16.29-beta-cbfd116d",
|
|
35
35
|
"@arcblock/did": "1.18.126",
|
|
36
36
|
"@arcblock/did-auth": "1.18.126",
|
|
37
37
|
"@arcblock/did-ext": "^1.18.126",
|
|
@@ -42,13 +42,13 @@
|
|
|
42
42
|
"@arcblock/pm2-events": "^0.0.5",
|
|
43
43
|
"@arcblock/validator": "^1.18.126",
|
|
44
44
|
"@arcblock/vc": "1.18.126",
|
|
45
|
-
"@blocklet/constant": "1.16.29-beta-
|
|
46
|
-
"@blocklet/env": "1.16.29-beta-
|
|
47
|
-
"@blocklet/meta": "1.16.29-beta-
|
|
48
|
-
"@blocklet/resolver": "1.16.29-beta-
|
|
49
|
-
"@blocklet/sdk": "1.16.29-beta-
|
|
50
|
-
"@blocklet/store": "1.16.29-beta-
|
|
51
|
-
"@did-space/client": "^0.5.
|
|
45
|
+
"@blocklet/constant": "1.16.29-beta-cbfd116d",
|
|
46
|
+
"@blocklet/env": "1.16.29-beta-cbfd116d",
|
|
47
|
+
"@blocklet/meta": "1.16.29-beta-cbfd116d",
|
|
48
|
+
"@blocklet/resolver": "1.16.29-beta-cbfd116d",
|
|
49
|
+
"@blocklet/sdk": "1.16.29-beta-cbfd116d",
|
|
50
|
+
"@blocklet/store": "1.16.29-beta-cbfd116d",
|
|
51
|
+
"@did-space/client": "^0.5.7",
|
|
52
52
|
"@fidm/x509": "^1.2.1",
|
|
53
53
|
"@ocap/mcrypto": "1.18.126",
|
|
54
54
|
"@ocap/util": "1.18.126",
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"jest": "^29.7.0",
|
|
104
104
|
"unzipper": "^0.10.11"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "e9bdb7af77f2d126e40195c67972b07fe683adf9"
|
|
107
107
|
}
|