@abtnode/core 1.16.11-beta-069c3537 → 1.16.11-beta-0ae58a71
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.
|
@@ -65,6 +65,8 @@ const {
|
|
|
65
65
|
BLOCKLET_CONFIGURABLE_KEY,
|
|
66
66
|
RESTORE_PROGRESS_STATUS,
|
|
67
67
|
CHAIN_PROP_MAP_REVERSE,
|
|
68
|
+
BLOCKLET_CONTROLLER_STATUS,
|
|
69
|
+
SUSPENDED_REASON,
|
|
68
70
|
} = require('@blocklet/constant');
|
|
69
71
|
const util = require('../../util');
|
|
70
72
|
const {
|
|
@@ -104,7 +106,7 @@ const {
|
|
|
104
106
|
updateBlockletFallbackLogo,
|
|
105
107
|
ensureAppLogo,
|
|
106
108
|
getBlockletDidDomainList,
|
|
107
|
-
|
|
109
|
+
exceedRedemptionPeriod,
|
|
108
110
|
} = require('../../util/blocklet');
|
|
109
111
|
const states = require('../../states');
|
|
110
112
|
const BaseBlockletManager = require('./base');
|
|
@@ -450,6 +452,8 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
450
452
|
// should check blocklet integrity
|
|
451
453
|
const blocklet = await this.ensureBlocklet(did, { e2eMode });
|
|
452
454
|
|
|
455
|
+
await this.checkControllerStatus(blocklet, 'start');
|
|
456
|
+
|
|
453
457
|
try {
|
|
454
458
|
// blocklet may be manually stopped durning starting
|
|
455
459
|
// so error message would not be sent if blocklet is stopped
|
|
@@ -663,6 +667,10 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
663
667
|
async restart({ did }, context) {
|
|
664
668
|
logger.info('restart blocklet', { did });
|
|
665
669
|
|
|
670
|
+
const blocklet = await this.getBlocklet(did);
|
|
671
|
+
|
|
672
|
+
await this.checkControllerStatus(blocklet, 'restart');
|
|
673
|
+
|
|
666
674
|
await states.blocklet.setBlockletStatus(did, BlockletStatus.stopping);
|
|
667
675
|
const result = await states.blocklet.getBlocklet(did);
|
|
668
676
|
this.emit(BlockletEvents.statusChange, result);
|
|
@@ -690,6 +698,8 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
690
698
|
async reload({ did }, context) {
|
|
691
699
|
const blocklet = await this.getBlocklet(did);
|
|
692
700
|
|
|
701
|
+
await this.checkControllerStatus(blocklet, 'reload');
|
|
702
|
+
|
|
693
703
|
await states.blocklet.setBlockletStatus(did, BlockletStatus.stopping);
|
|
694
704
|
await reloadBlockletProcess(blocklet);
|
|
695
705
|
const res = await states.blocklet.setBlockletStatus(did, BlockletStatus.running);
|
|
@@ -1495,22 +1505,29 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
1495
1505
|
{
|
|
1496
1506
|
name: 'refresh-accessible-ip',
|
|
1497
1507
|
time: '0 */10 * * * *', // 10min
|
|
1508
|
+
options: { runOnInit: true },
|
|
1498
1509
|
fn: async () => {
|
|
1499
1510
|
const nodeInfo = await states.node.read();
|
|
1500
1511
|
await refreshAccessibleExternalNodeIp(nodeInfo);
|
|
1501
1512
|
},
|
|
1502
1513
|
},
|
|
1503
1514
|
{
|
|
1504
|
-
name: '
|
|
1515
|
+
name: 'check-renewed-blocklet',
|
|
1516
|
+
time: '0 */10 * * * *', // 10min
|
|
1517
|
+
options: { runOnInit: false },
|
|
1518
|
+
fn: () => this.checkRenewedBlocklet(),
|
|
1519
|
+
},
|
|
1520
|
+
{
|
|
1521
|
+
name: 'stop-expired-external-blocklet',
|
|
1505
1522
|
time: '0 */30 * * * *', // 30min
|
|
1506
1523
|
options: { runOnInit: false },
|
|
1507
|
-
fn: () => this.
|
|
1524
|
+
fn: () => this.stopExpiredBlocklets(),
|
|
1508
1525
|
},
|
|
1509
1526
|
{
|
|
1510
1527
|
name: 'clean-expired-blocklet-data',
|
|
1511
1528
|
time: '0 */20 0 * * *', // 每天凌晨 0 点的每 20 分钟
|
|
1512
1529
|
options: { runOnInit: false },
|
|
1513
|
-
fn: () => this.
|
|
1530
|
+
fn: () => this.cleanExpiredBlocklets(),
|
|
1514
1531
|
},
|
|
1515
1532
|
{
|
|
1516
1533
|
name: 'record-blocklet-runtime-history',
|
|
@@ -2764,71 +2781,102 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
2764
2781
|
}
|
|
2765
2782
|
}
|
|
2766
2783
|
|
|
2767
|
-
async
|
|
2784
|
+
async checkRenewedBlocklet() {
|
|
2768
2785
|
try {
|
|
2769
|
-
logger.info('start check
|
|
2786
|
+
logger.info('start check renewed blocklet');
|
|
2787
|
+
|
|
2788
|
+
// 只检查因为过期而被 suspended 的 blocklet
|
|
2789
|
+
const blockletExtras = await states.blockletExtras.find(
|
|
2790
|
+
{
|
|
2791
|
+
'controller.status.value': BLOCKLET_CONTROLLER_STATUS.suspended,
|
|
2792
|
+
'controller.status.reason': SUSPENDED_REASON.expired,
|
|
2793
|
+
},
|
|
2794
|
+
{ did: 1, meta: 1, controller: 1 }
|
|
2795
|
+
);
|
|
2796
|
+
|
|
2797
|
+
for (const data of blockletExtras) {
|
|
2798
|
+
const blocklet = await states.blocklet.getBlocklet(data.did);
|
|
2799
|
+
if (!blocklet) {
|
|
2800
|
+
logger.error('blocklet not found', { did: data.did });
|
|
2801
|
+
// eslint-disable-next-line no-continue
|
|
2802
|
+
continue;
|
|
2803
|
+
}
|
|
2804
|
+
|
|
2805
|
+
const assetState = await util.getNFTState(data.controller.chainHost, data.controller.nftId);
|
|
2806
|
+
const isExpired = isNFTExpired(assetState);
|
|
2807
|
+
if (isExpired === false) {
|
|
2808
|
+
logger.info('blocklet is renewed', { did: data.did });
|
|
2809
|
+
await states.blockletExtras.updateByDid(data.did, {
|
|
2810
|
+
...data.controller,
|
|
2811
|
+
status: { value: BLOCKLET_CONTROLLER_STATUS.normal, reason: '' },
|
|
2812
|
+
});
|
|
2813
|
+
|
|
2814
|
+
logger.info('start to start blocklet', { did: data.did });
|
|
2815
|
+
|
|
2816
|
+
if (![BlockletStatus.starting, BlockletStatus.running].includes(blocklet.status)) {
|
|
2817
|
+
await this.start({ did: data.did });
|
|
2818
|
+
logger.info('start blocklet success', { did: data.did });
|
|
2819
|
+
}
|
|
2820
|
+
}
|
|
2821
|
+
}
|
|
2822
|
+
} catch (error) {
|
|
2823
|
+
logger.error('start check renewed blocklet failed', { error });
|
|
2824
|
+
}
|
|
2825
|
+
}
|
|
2826
|
+
|
|
2827
|
+
async stopExpiredBlocklets() {
|
|
2828
|
+
try {
|
|
2829
|
+
logger.info('start checking expired blocklet');
|
|
2770
2830
|
const blockletExtras = await states.blockletExtras.find(
|
|
2771
2831
|
{
|
|
2772
2832
|
controller: {
|
|
2773
2833
|
$exists: true,
|
|
2774
2834
|
},
|
|
2775
|
-
expiredAt: {
|
|
2776
|
-
$exists: false,
|
|
2777
|
-
},
|
|
2778
2835
|
},
|
|
2779
2836
|
{ did: 1, meta: 1, controller: 1 }
|
|
2780
2837
|
);
|
|
2781
2838
|
|
|
2782
|
-
|
|
2839
|
+
if (blockletExtras.length === 0) {
|
|
2840
|
+
logger.info('no expired blocklet');
|
|
2841
|
+
return;
|
|
2842
|
+
}
|
|
2843
|
+
|
|
2844
|
+
logger.info('expired blocklet count', { count: blockletExtras.length });
|
|
2783
2845
|
|
|
2784
2846
|
for (const data of blockletExtras) {
|
|
2785
2847
|
try {
|
|
2786
|
-
if (isEmpty(data.controller)) {
|
|
2787
|
-
logger.info('skip the blocklet without controller', { blockletDid: data.did, controller: data.controller });
|
|
2788
|
-
// eslint-disable-next-line no-continue
|
|
2789
|
-
continue;
|
|
2790
|
-
}
|
|
2791
|
-
|
|
2792
2848
|
const { did } = data;
|
|
2793
2849
|
const assetState = await util.getNFTState(data.controller.chainHost, data.controller.nftId);
|
|
2794
2850
|
const isExpired = isNFTExpired(assetState);
|
|
2851
|
+
const blocklet = await states.blocklet.getBlocklet(did);
|
|
2795
2852
|
|
|
2796
|
-
if (isExpired) {
|
|
2797
|
-
|
|
2853
|
+
if (isExpired && blocklet.status !== BlockletStatus.stopped) {
|
|
2854
|
+
const expiredAt = getNftExpirationDate(assetState);
|
|
2855
|
+
logger.info('the blocklet already expired and will be stopped', {
|
|
2798
2856
|
blockletDid: did,
|
|
2799
2857
|
nftId: data.controller.nftId,
|
|
2858
|
+
expiredAt,
|
|
2800
2859
|
});
|
|
2801
2860
|
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
await this.delete({ did, keepData: true, keepConfigs: true, keepLogsDir: true });
|
|
2812
|
-
logger.info('the expired blocklet already deleted', {
|
|
2813
|
-
blockletDid: did,
|
|
2814
|
-
nftId: data.controller.nftId,
|
|
2815
|
-
});
|
|
2816
|
-
}
|
|
2817
|
-
|
|
2818
|
-
const expiredAt = getNftExpirationDate(assetState);
|
|
2819
|
-
await states.blockletExtras.updateExpireInfo({ did, expiredAt });
|
|
2820
|
-
logger.info('updated expired blocklet extra info', {
|
|
2821
|
-
nftId: data.controller.nftId,
|
|
2822
|
-
blockletDid: did,
|
|
2861
|
+
await this.stop({ did });
|
|
2862
|
+
await states.blockletExtras.updateByDid(did, {
|
|
2863
|
+
controller: {
|
|
2864
|
+
...data.controller,
|
|
2865
|
+
status: {
|
|
2866
|
+
value: BLOCKLET_CONTROLLER_STATUS.suspended,
|
|
2867
|
+
reason: SUSPENDED_REASON.expired,
|
|
2868
|
+
},
|
|
2869
|
+
},
|
|
2823
2870
|
});
|
|
2871
|
+
logger.info('the expired blocklet is stopped', { did });
|
|
2824
2872
|
|
|
2825
|
-
//
|
|
2873
|
+
// 为了减小服务器压力,每次删除一个 blocklet 后,休息 10s
|
|
2826
2874
|
if (process.env.NODE_ENV !== 'test') {
|
|
2827
2875
|
await sleep(10 * 1000);
|
|
2828
2876
|
}
|
|
2829
2877
|
}
|
|
2830
2878
|
} catch (error) {
|
|
2831
|
-
logger.error('
|
|
2879
|
+
logger.error('stop expired blocklet failed', {
|
|
2832
2880
|
blockletDid: data.did,
|
|
2833
2881
|
nftId: data.controller?.nftId,
|
|
2834
2882
|
error,
|
|
@@ -2842,62 +2890,68 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
2842
2890
|
}
|
|
2843
2891
|
}
|
|
2844
2892
|
|
|
2845
|
-
async
|
|
2893
|
+
async cleanExpiredBlocklets() {
|
|
2846
2894
|
try {
|
|
2847
|
-
logger.info('start
|
|
2848
|
-
const blockletExtras = await states.blockletExtras.
|
|
2895
|
+
logger.info('start checking exceeding the redemption period blocklet');
|
|
2896
|
+
const blockletExtras = await states.blockletExtras.find(
|
|
2897
|
+
{
|
|
2898
|
+
'controller.status.value': BLOCKLET_CONTROLLER_STATUS.suspended,
|
|
2899
|
+
},
|
|
2900
|
+
{ did: 1, meta: 1, controller: 1 }
|
|
2901
|
+
);
|
|
2902
|
+
|
|
2849
2903
|
if (blockletExtras.length === 0) {
|
|
2850
|
-
logger.info('no
|
|
2904
|
+
logger.info('no exceeding the redemption blocklet need to be cleaned');
|
|
2851
2905
|
return;
|
|
2852
2906
|
}
|
|
2853
2907
|
|
|
2854
|
-
|
|
2855
|
-
const blocklet = await this.getBlocklet(did);
|
|
2856
|
-
if (blocklet) {
|
|
2857
|
-
logger.error('skip cleaning the blocklet which is not deleted', { blockletDid: did });
|
|
2858
|
-
return;
|
|
2859
|
-
}
|
|
2860
|
-
|
|
2861
|
-
const assetState = await util.getNFTState(controller.chainHost, controller.nftId);
|
|
2862
|
-
const expirationDate = getNftExpirationDate(assetState);
|
|
2908
|
+
logger.info('exceeding the redemption blocklet count', { count: blockletExtras.length });
|
|
2863
2909
|
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2910
|
+
for (const data of blockletExtras) {
|
|
2911
|
+
try {
|
|
2912
|
+
const { did } = data;
|
|
2913
|
+
const assetState = await util.getNFTState(data.controller.chainHost, data.controller.nftId);
|
|
2914
|
+
const expiredAt = getNftExpirationDate(assetState);
|
|
2869
2915
|
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2916
|
+
if (!exceedRedemptionPeriod(expiredAt)) {
|
|
2917
|
+
logger.error('skip cleaning the non-exceed redemption blocklet', {
|
|
2918
|
+
blockletDid: did,
|
|
2919
|
+
expiredAt,
|
|
2920
|
+
});
|
|
2921
|
+
// eslint-disable-next-line no-continue
|
|
2922
|
+
continue;
|
|
2923
|
+
}
|
|
2876
2924
|
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
|
|
2882
|
-
});
|
|
2883
|
-
logger.info(`clean blocklet ${blockletMeta.did} extra data`);
|
|
2925
|
+
logger.info('the blocklet already exceed redemption and will be deleted', {
|
|
2926
|
+
blockletDid: did,
|
|
2927
|
+
nftId: data.controller.nftId,
|
|
2928
|
+
expiredAt,
|
|
2929
|
+
});
|
|
2884
2930
|
|
|
2885
|
-
|
|
2886
|
-
logger.info(`removed blocklet ${blockletMeta.did} backup`);
|
|
2931
|
+
// TODO: 如果绑定了 DID Space 备份到 DID Space
|
|
2887
2932
|
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2892
|
-
|
|
2893
|
-
logger.info(`cleaned expired blocklet blocklet ${blockletMeta.did} data`);
|
|
2894
|
-
});
|
|
2933
|
+
await this.delete({ did, keepData: false, keepConfigs: false, keepLogsDir: false });
|
|
2934
|
+
logger.info('the exceed redemption blocklet already deleted', {
|
|
2935
|
+
blockletDid: did,
|
|
2936
|
+
nftId: data.controller.nftId,
|
|
2937
|
+
});
|
|
2895
2938
|
|
|
2896
|
-
|
|
2939
|
+
// 删除 blocklet 后会 reload nginx, 所以这里每次删除一个
|
|
2940
|
+
if (process.env.NODE_ENV !== 'test') {
|
|
2941
|
+
await sleep(10 * 1000);
|
|
2942
|
+
}
|
|
2943
|
+
} catch (error) {
|
|
2944
|
+
logger.error('delete exceed redemption blocklet failed', {
|
|
2945
|
+
blockletDid: data.did,
|
|
2946
|
+
nftId: data.controller?.nftId,
|
|
2947
|
+
error,
|
|
2948
|
+
});
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2897
2951
|
|
|
2898
|
-
logger.info('
|
|
2952
|
+
logger.info('check exceeding the redemption period blocklet end');
|
|
2899
2953
|
} catch (error) {
|
|
2900
|
-
logger.error('
|
|
2954
|
+
logger.error('checking exceeding the redemption period blocklet failed', { error });
|
|
2901
2955
|
}
|
|
2902
2956
|
}
|
|
2903
2957
|
|
|
@@ -3101,6 +3155,38 @@ class BlockletManager extends BaseBlockletManager {
|
|
|
3101
3155
|
}
|
|
3102
3156
|
await this._setConfigsFromMeta(did);
|
|
3103
3157
|
}
|
|
3158
|
+
|
|
3159
|
+
async checkControllerStatus(blocklet, action) {
|
|
3160
|
+
if (isEmpty(blocklet.controller)) {
|
|
3161
|
+
return;
|
|
3162
|
+
}
|
|
3163
|
+
|
|
3164
|
+
const assetState = await util.getNFTState(blocklet.controller?.chainHost, blocklet.controller?.nftId);
|
|
3165
|
+
|
|
3166
|
+
if (isNFTExpired(assetState)) {
|
|
3167
|
+
logger.error(`try to ${action} an expired blocklet`, {
|
|
3168
|
+
did: blocklet.meta.did,
|
|
3169
|
+
nftId: blocklet.controller?.nftId,
|
|
3170
|
+
});
|
|
3171
|
+
throw new Error(`can not ${action} an expired blocklet`);
|
|
3172
|
+
}
|
|
3173
|
+
|
|
3174
|
+
if (
|
|
3175
|
+
blocklet.controller.status?.value === BLOCKLET_CONTROLLER_STATUS.suspended &&
|
|
3176
|
+
blocklet.controller.status?.reason === SUSPENDED_REASON.expired
|
|
3177
|
+
) {
|
|
3178
|
+
// 如果是因为过期被暂停的,续期后, 并且不影响启动
|
|
3179
|
+
await states.blockletExtras.updateByDid(blocklet.meta.did, {
|
|
3180
|
+
controller: {
|
|
3181
|
+
...blocklet.controller,
|
|
3182
|
+
status: {
|
|
3183
|
+
value: BLOCKLET_CONTROLLER_STATUS.normal,
|
|
3184
|
+
reason: '',
|
|
3185
|
+
},
|
|
3186
|
+
},
|
|
3187
|
+
});
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3104
3190
|
}
|
|
3105
3191
|
|
|
3106
3192
|
module.exports = BlockletManager;
|
|
@@ -2,15 +2,13 @@
|
|
|
2
2
|
/* eslint-disable no-underscore-dangle */
|
|
3
3
|
/* eslint-disable consistent-return */
|
|
4
4
|
const logger = require('@abtnode/logger')('@abtnode/core:states:blocklet-extras');
|
|
5
|
-
const { EXPIRED_BLOCKLET_DATA_RETENTION_DAYS } = require('@abtnode/constant');
|
|
6
5
|
const camelCase = require('lodash/camelCase');
|
|
7
6
|
const get = require('lodash/get');
|
|
8
|
-
const dayjs = require('dayjs');
|
|
9
7
|
|
|
10
8
|
const BaseState = require('./base');
|
|
11
9
|
|
|
12
10
|
const { mergeConfigs, parseConfigs, encryptConfigs } = require('../blocklet/extras');
|
|
13
|
-
const { validateAddMeta
|
|
11
|
+
const { validateAddMeta } = require('../validators/blocklet-extra');
|
|
14
12
|
|
|
15
13
|
const noop = (k) => (v) => v[k];
|
|
16
14
|
|
|
@@ -213,19 +211,6 @@ class BlockletExtrasState extends BaseState {
|
|
|
213
211
|
return super.findOne({ did }, { did: 1, controller: 1, meta: 1 });
|
|
214
212
|
}
|
|
215
213
|
|
|
216
|
-
async updateExpireInfo({ did, expiredAt } = {}) {
|
|
217
|
-
const entity = { did, expiredAt };
|
|
218
|
-
await validateExpiredInfo(entity);
|
|
219
|
-
|
|
220
|
-
return this.updateByDid(did, { expiredAt });
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
async getExpiredList() {
|
|
224
|
-
const deadline = dayjs().subtract(EXPIRED_BLOCKLET_DATA_RETENTION_DAYS, 'days').toISOString();
|
|
225
|
-
const docs = await super.find({ expiredAt: { $exists: true } });
|
|
226
|
-
return docs.filter((x) => x.controller?.nftId).filter((x) => x.expiredAt <= deadline);
|
|
227
|
-
}
|
|
228
|
-
|
|
229
214
|
encryptSecurityData({ data, _rootDid } = {}) {
|
|
230
215
|
if (!data) {
|
|
231
216
|
return data;
|
package/lib/util/blocklet.js
CHANGED
|
@@ -1952,7 +1952,7 @@ const getBlockletDidDomainList = (blocklet, nodeInfo) => {
|
|
|
1952
1952
|
return domainAliases;
|
|
1953
1953
|
};
|
|
1954
1954
|
|
|
1955
|
-
const
|
|
1955
|
+
const exceedRedemptionPeriod = (expirationDate) => {
|
|
1956
1956
|
return dayjs().diff(dayjs(expirationDate), 'day') > EXPIRED_BLOCKLET_DATA_RETENTION_DAYS;
|
|
1957
1957
|
};
|
|
1958
1958
|
|
|
@@ -2014,6 +2014,6 @@ module.exports = {
|
|
|
2014
2014
|
getFixedBundleSource,
|
|
2015
2015
|
ensureAppLogo,
|
|
2016
2016
|
getBlockletDidDomainList,
|
|
2017
|
-
shouldCleanExpiredBlocklet,
|
|
2018
2017
|
getBlockletURLForLauncher,
|
|
2018
|
+
exceedRedemptionPeriod,
|
|
2019
2019
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const joinUrl = require('url-join');
|
|
2
2
|
const axios = require('@abtnode/util/lib/axios');
|
|
3
3
|
const { DEFAULT_IP_DOMAIN, DEFAULT_ADMIN_PATH } = require('@abtnode/constant');
|
|
4
|
+
const logger = require('@abtnode/logger')('@abtnode/core:util:get-accessible-external-node-ip');
|
|
4
5
|
const { get: getIp } = require('./ip');
|
|
5
6
|
|
|
6
7
|
const getNodeDomain = (ip) => (ip ? DEFAULT_IP_DOMAIN.replace(/^\*/, ip.replace(/\./g, '-')) : '');
|
|
@@ -23,6 +24,7 @@ const checkConnected = async ({ ip, nodeInfo }) => {
|
|
|
23
24
|
*/
|
|
24
25
|
const fetch = async (nodeInfo) => {
|
|
25
26
|
const { external } = await getIp();
|
|
27
|
+
logger.info('refresh external ip:', external);
|
|
26
28
|
|
|
27
29
|
if (!external) {
|
|
28
30
|
return null;
|
|
@@ -13,12 +13,6 @@ const addMeta = Joi.object({
|
|
|
13
13
|
controller: blockletController.optional(),
|
|
14
14
|
}).required();
|
|
15
15
|
|
|
16
|
-
const updateExpiredInfo = Joi.object({
|
|
17
|
-
did: Joi.DID().required(),
|
|
18
|
-
expiredAt: Joi.string().required(),
|
|
19
|
-
});
|
|
20
|
-
|
|
21
16
|
module.exports = {
|
|
22
17
|
validateAddMeta: createValidator(addMeta),
|
|
23
|
-
validateExpiredInfo: createValidator(updateExpiredInfo),
|
|
24
18
|
};
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.16.11-beta-
|
|
6
|
+
"version": "1.16.11-beta-0ae58a71",
|
|
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": "Apache-2.0",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@abtnode/auth": "1.16.11-beta-
|
|
23
|
-
"@abtnode/certificate-manager": "1.16.11-beta-
|
|
24
|
-
"@abtnode/constant": "1.16.11-beta-
|
|
25
|
-
"@abtnode/cron": "1.16.11-beta-
|
|
26
|
-
"@abtnode/logger": "1.16.11-beta-
|
|
27
|
-
"@abtnode/models": "1.16.11-beta-
|
|
28
|
-
"@abtnode/queue": "1.16.11-beta-
|
|
29
|
-
"@abtnode/rbac": "1.16.11-beta-
|
|
30
|
-
"@abtnode/router-provider": "1.16.11-beta-
|
|
31
|
-
"@abtnode/static-server": "1.16.11-beta-
|
|
32
|
-
"@abtnode/timemachine": "1.16.11-beta-
|
|
33
|
-
"@abtnode/util": "1.16.11-beta-
|
|
22
|
+
"@abtnode/auth": "1.16.11-beta-0ae58a71",
|
|
23
|
+
"@abtnode/certificate-manager": "1.16.11-beta-0ae58a71",
|
|
24
|
+
"@abtnode/constant": "1.16.11-beta-0ae58a71",
|
|
25
|
+
"@abtnode/cron": "1.16.11-beta-0ae58a71",
|
|
26
|
+
"@abtnode/logger": "1.16.11-beta-0ae58a71",
|
|
27
|
+
"@abtnode/models": "1.16.11-beta-0ae58a71",
|
|
28
|
+
"@abtnode/queue": "1.16.11-beta-0ae58a71",
|
|
29
|
+
"@abtnode/rbac": "1.16.11-beta-0ae58a71",
|
|
30
|
+
"@abtnode/router-provider": "1.16.11-beta-0ae58a71",
|
|
31
|
+
"@abtnode/static-server": "1.16.11-beta-0ae58a71",
|
|
32
|
+
"@abtnode/timemachine": "1.16.11-beta-0ae58a71",
|
|
33
|
+
"@abtnode/util": "1.16.11-beta-0ae58a71",
|
|
34
34
|
"@arcblock/did": "1.18.80",
|
|
35
35
|
"@arcblock/did-auth": "1.18.80",
|
|
36
36
|
"@arcblock/did-ext": "^1.18.80",
|
|
@@ -41,10 +41,10 @@
|
|
|
41
41
|
"@arcblock/pm2-events": "^0.0.5",
|
|
42
42
|
"@arcblock/validator": "^1.18.80",
|
|
43
43
|
"@arcblock/vc": "1.18.80",
|
|
44
|
-
"@blocklet/constant": "1.16.11-beta-
|
|
45
|
-
"@blocklet/meta": "1.16.11-beta-
|
|
46
|
-
"@blocklet/sdk": "1.16.11-beta-
|
|
47
|
-
"@did-space/client": "^0.2.
|
|
44
|
+
"@blocklet/constant": "1.16.11-beta-0ae58a71",
|
|
45
|
+
"@blocklet/meta": "1.16.11-beta-0ae58a71",
|
|
46
|
+
"@blocklet/sdk": "1.16.11-beta-0ae58a71",
|
|
47
|
+
"@did-space/client": "^0.2.113",
|
|
48
48
|
"@fidm/x509": "^1.2.1",
|
|
49
49
|
"@ocap/mcrypto": "1.18.80",
|
|
50
50
|
"@ocap/util": "1.18.80",
|
|
@@ -96,5 +96,5 @@
|
|
|
96
96
|
"express": "^4.18.2",
|
|
97
97
|
"jest": "^27.5.1"
|
|
98
98
|
},
|
|
99
|
-
"gitHead": "
|
|
99
|
+
"gitHead": "5d044a08b4399eb855563e670af7cbd0d3851e94"
|
|
100
100
|
}
|