@abtnode/core 1.16.11-next-a232f5fb → 1.16.11-next-3d2b39f7
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/downloader/blocklet-downloader.js +3 -3
- package/lib/blocklet/manager/disk.js +197 -128
- package/lib/blocklet/manager/helper/install-component-from-dev.js +0 -1
- package/lib/blocklet/manager/helper/install-component-from-upload.js +8 -4
- package/lib/blocklet/manager/helper/install-component-from-url.js +4 -2
- package/lib/blocklet/manager/helper/upgrade-components.js +7 -7
- package/lib/blocklet/manager/pm2-events.js +3 -3
- package/lib/event.js +11 -1
- package/lib/index.js +0 -2
- package/lib/migrations/1.16.11-component-status.js +22 -0
- package/lib/monitor/blocklet-runtime-monitor.js +3 -1
- package/lib/states/blocklet.js +45 -38
- package/lib/states/node.js +1 -0
- package/lib/util/blocklet.js +114 -61
- package/package.json +17 -17
|
@@ -7,7 +7,7 @@ const { toBase58 } = require('@ocap/util');
|
|
|
7
7
|
|
|
8
8
|
const defaultLogger = require('@abtnode/logger')('@abtnode/core:blocklet-downloader');
|
|
9
9
|
|
|
10
|
-
const {
|
|
10
|
+
const { forEachComponentV2Sync, getComponentBundleId } = require('@blocklet/meta/lib/util');
|
|
11
11
|
const validateBlockletEntry = require('@blocklet/meta/lib/entry');
|
|
12
12
|
|
|
13
13
|
const { BlockletSource, BLOCKLET_META_FILE, BLOCKLET_META_FILE_ALT, BLOCKLET_MODES } = require('@blocklet/constant');
|
|
@@ -196,7 +196,7 @@ class BlockletDownloader extends EventEmitter {
|
|
|
196
196
|
|
|
197
197
|
const cachedBundles = (await this.cache.get(CACHE_KEY)) || [];
|
|
198
198
|
|
|
199
|
-
|
|
199
|
+
forEachComponentV2Sync(blocklet, (component) => {
|
|
200
200
|
const bundleId = getComponentBundleId(component);
|
|
201
201
|
|
|
202
202
|
if (metas[bundleId]) {
|
|
@@ -223,7 +223,7 @@ class BlockletDownloader extends EventEmitter {
|
|
|
223
223
|
}
|
|
224
224
|
|
|
225
225
|
metas[bundleId] = component.meta;
|
|
226
|
-
downloadComponentIds.push(
|
|
226
|
+
downloadComponentIds.push(component.meta.did);
|
|
227
227
|
});
|
|
228
228
|
|
|
229
229
|
const downloadList = Object.values(metas);
|