@abtnode/core 1.17.5-beta-20251214-231110-497f8d27 → 1.17.6-beta-20251216-081847-bf91c4db
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.
|
@@ -39044,7 +39044,7 @@ module.exports = require("zlib");
|
|
|
39044
39044
|
/***/ ((module) => {
|
|
39045
39045
|
|
|
39046
39046
|
"use strict";
|
|
39047
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.17.
|
|
39047
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@abtnode/core","publishConfig":{"access":"public"},"version":"1.17.5","description":"","main":"lib/index.js","files":["lib"],"scripts":{"lint":"eslint tests lib --ignore-pattern \'tests/assets/*\'","lint:fix":"eslint --fix tests lib"},"keywords":[],"author":"wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)","license":"Apache-2.0","dependencies":{"@abtnode/analytics":"1.17.5","@abtnode/auth":"1.17.5","@abtnode/certificate-manager":"1.17.5","@abtnode/constant":"1.17.5","@abtnode/cron":"1.17.5","@abtnode/db-cache":"1.17.5","@abtnode/docker-utils":"1.17.5","@abtnode/logger":"1.17.5","@abtnode/models":"1.17.5","@abtnode/queue":"1.17.5","@abtnode/rbac":"1.17.5","@abtnode/router-provider":"1.17.5","@abtnode/static-server":"1.17.5","@abtnode/timemachine":"1.17.5","@abtnode/util":"1.17.5","@aigne/aigne-hub":"^0.10.15","@arcblock/did":"^1.27.15","@arcblock/did-connect-js":"^1.27.15","@arcblock/did-ext":"^1.27.15","@arcblock/did-motif":"^1.1.14","@arcblock/did-util":"^1.27.15","@arcblock/event-hub":"^1.27.15","@arcblock/jwt":"^1.27.15","@arcblock/pm2-events":"^0.0.5","@arcblock/validator":"^1.27.15","@arcblock/vc":"^1.27.15","@blocklet/constant":"1.17.5","@blocklet/did-space-js":"^1.2.10","@blocklet/env":"1.17.5","@blocklet/error":"^0.3.5","@blocklet/meta":"1.17.5","@blocklet/resolver":"1.17.5","@blocklet/sdk":"1.17.5","@blocklet/server-js":"1.17.5","@blocklet/store":"1.17.5","@blocklet/theme":"^3.2.14","@fidm/x509":"^1.2.1","@ocap/mcrypto":"^1.27.15","@ocap/util":"^1.27.15","@ocap/wallet":"^1.27.15","@slack/webhook":"^7.0.6","archiver":"^7.0.1","axios":"^1.7.9","axon":"^2.0.3","chalk":"^4.1.2","cross-spawn":"^7.0.3","dayjs":"^1.11.13","deep-diff":"^1.0.2","detect-port":"^1.5.1","envfile":"^7.1.0","escape-string-regexp":"^4.0.0","fast-glob":"^3.3.2","filesize":"^10.1.1","flat":"^5.0.2","fs-extra":"^11.2.0","get-port":"^5.1.1","hasha":"^5.2.2","is-base64":"^1.1.0","is-cidr":"4","is-ip":"3","is-url":"^1.2.4","joi":"17.12.2","joi-extension-semver":"^5.0.0","js-yaml":"^4.1.0","kill-port":"^2.0.1","lodash":"^4.17.21","node-stream-zip":"^1.15.0","p-all":"^3.0.0","p-limit":"^3.1.0","p-map":"^4.0.0","p-retry":"^4.6.2","p-wait-for":"^3.2.0","private-ip":"^2.3.4","rate-limiter-flexible":"^5.0.5","read-last-lines":"^1.8.0","semver":"^7.6.3","sequelize":"^6.35.0","shelljs":"^0.8.5","slugify":"^1.6.6","ssri":"^8.0.1","stream-throttle":"^0.1.3","stream-to-promise":"^3.0.0","systeminformation":"^5.23.3","tail":"^2.2.4","tar":"^6.1.11","transliteration":"^2.3.5","ua-parser-js":"^1.0.2","ufo":"^1.5.3","uuid":"^11.1.0","valid-url":"^1.0.9","which":"^2.0.2","xbytes":"^1.8.0"},"devDependencies":{"axios-mock-adapter":"^2.1.0","expand-tilde":"^2.0.2","express":"^4.18.2","unzipper":"^0.10.11"},"gitHead":"e5764f753181ed6a7c615cd4fc6682aacf0cb7cd"}');
|
|
39048
39048
|
|
|
39049
39049
|
/***/ }),
|
|
39050
39050
|
|
|
@@ -2,6 +2,38 @@
|
|
|
2
2
|
const { BlockletStatus } = require('@blocklet/constant');
|
|
3
3
|
const BaseState = require('./base');
|
|
4
4
|
|
|
5
|
+
/**
|
|
6
|
+
* 没有 deployedFrom 时,才会从 bundleSource 中推断
|
|
7
|
+
* @param {Object} child - The child object
|
|
8
|
+
* @returns {Object} - The child with inferred deployedFrom
|
|
9
|
+
*/
|
|
10
|
+
const ensureDeployedFrom = (child) => {
|
|
11
|
+
if (child.deployedFrom || !child.bundleSource) {
|
|
12
|
+
return child;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const { bundleSource } = child;
|
|
16
|
+
let deployedFrom = '';
|
|
17
|
+
|
|
18
|
+
if (bundleSource.store) {
|
|
19
|
+
// From registry/store - store is already the domain
|
|
20
|
+
deployedFrom = Array.isArray(bundleSource.store) ? bundleSource.store[0] : bundleSource.store;
|
|
21
|
+
} else if (bundleSource.url) {
|
|
22
|
+
// From URL - extract origin (domain) only
|
|
23
|
+
const urlStr = Array.isArray(bundleSource.url) ? bundleSource.url[0] : bundleSource.url;
|
|
24
|
+
try {
|
|
25
|
+
deployedFrom = new URL(urlStr).origin;
|
|
26
|
+
} catch {
|
|
27
|
+
deployedFrom = urlStr;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
if (deployedFrom) {
|
|
32
|
+
return { ...child, deployedFrom };
|
|
33
|
+
}
|
|
34
|
+
return child;
|
|
35
|
+
};
|
|
36
|
+
|
|
5
37
|
/**
|
|
6
38
|
* @extends BaseState<import('@abtnode/models').BlockletChildState>
|
|
7
39
|
*/
|
|
@@ -20,7 +52,8 @@ class BlockletChildState extends BaseState {
|
|
|
20
52
|
return [];
|
|
21
53
|
}
|
|
22
54
|
const children = await this.find({ parentBlockletId }, {}, { createdAt: 1 });
|
|
23
|
-
|
|
55
|
+
// Ensure deployedFrom is inferred from bundleSource if not present
|
|
56
|
+
return (children || []).map(ensureDeployedFrom);
|
|
24
57
|
}
|
|
25
58
|
|
|
26
59
|
/**
|
package/lib/states/blocklet.js
CHANGED
|
@@ -382,7 +382,6 @@ class BlockletState extends BaseState {
|
|
|
382
382
|
if (child.meta !== undefined) updates.meta = child.meta;
|
|
383
383
|
if (child.bundleSource !== undefined) updates.bundleSource = child.bundleSource;
|
|
384
384
|
if (child.source !== undefined) updates.source = child.source;
|
|
385
|
-
if (child.deployedFrom !== undefined) updates.deployedFrom = child.deployedFrom;
|
|
386
385
|
if (child.mode !== undefined) updates.mode = child.mode;
|
|
387
386
|
if (child.ports !== undefined) updates.ports = child.ports;
|
|
388
387
|
if (child.environments !== undefined) updates.environments = child.environments;
|
|
@@ -398,6 +397,25 @@ class BlockletState extends BaseState {
|
|
|
398
397
|
if (child.greenStatus !== undefined) updates.greenStatus = child.greenStatus;
|
|
399
398
|
if (child.greenPorts !== undefined) updates.greenPorts = child.greenPorts;
|
|
400
399
|
|
|
400
|
+
if (!updates.deployedFrom && child.bundleSource) {
|
|
401
|
+
let deployedFrom = '';
|
|
402
|
+
const { bundleSource } = child;
|
|
403
|
+
const isFromStore = !!bundleSource?.store;
|
|
404
|
+
if (isFromStore) {
|
|
405
|
+
deployedFrom = Array.isArray(bundleSource.store) ? bundleSource.store[0] : bundleSource.store;
|
|
406
|
+
} else if (bundleSource?.url) {
|
|
407
|
+
const urlStr = Array.isArray(bundleSource.url) ? bundleSource.url[0] : bundleSource.url;
|
|
408
|
+
try {
|
|
409
|
+
deployedFrom = new URL(urlStr).origin;
|
|
410
|
+
} catch {
|
|
411
|
+
deployedFrom = urlStr;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
if (deployedFrom) {
|
|
415
|
+
updates.deployedFrom = deployedFrom;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
|
|
401
419
|
try {
|
|
402
420
|
if (existingChild) {
|
|
403
421
|
// Update existing child only if there are changes
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "1.17.
|
|
6
|
+
"version": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
7
7
|
"description": "",
|
|
8
8
|
"main": "lib/index.js",
|
|
9
9
|
"files": [
|
|
@@ -17,46 +17,46 @@
|
|
|
17
17
|
"author": "wangshijun <wangshijun2010@gmail.com> (http://github.com/wangshijun)",
|
|
18
18
|
"license": "Apache-2.0",
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@abtnode/analytics": "1.17.
|
|
21
|
-
"@abtnode/auth": "1.17.
|
|
22
|
-
"@abtnode/certificate-manager": "1.17.
|
|
23
|
-
"@abtnode/constant": "1.17.
|
|
24
|
-
"@abtnode/cron": "1.17.
|
|
25
|
-
"@abtnode/db-cache": "1.17.
|
|
26
|
-
"@abtnode/docker-utils": "1.17.
|
|
27
|
-
"@abtnode/logger": "1.17.
|
|
28
|
-
"@abtnode/models": "1.17.
|
|
29
|
-
"@abtnode/queue": "1.17.
|
|
30
|
-
"@abtnode/rbac": "1.17.
|
|
31
|
-
"@abtnode/router-provider": "1.17.
|
|
32
|
-
"@abtnode/static-server": "1.17.
|
|
33
|
-
"@abtnode/timemachine": "1.17.
|
|
34
|
-
"@abtnode/util": "1.17.
|
|
35
|
-
"@aigne/aigne-hub": "^0.10.
|
|
36
|
-
"@arcblock/did": "^1.27.
|
|
37
|
-
"@arcblock/did-connect-js": "^1.27.
|
|
38
|
-
"@arcblock/did-ext": "^1.27.
|
|
20
|
+
"@abtnode/analytics": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
21
|
+
"@abtnode/auth": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
22
|
+
"@abtnode/certificate-manager": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
23
|
+
"@abtnode/constant": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
24
|
+
"@abtnode/cron": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
25
|
+
"@abtnode/db-cache": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
26
|
+
"@abtnode/docker-utils": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
27
|
+
"@abtnode/logger": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
28
|
+
"@abtnode/models": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
29
|
+
"@abtnode/queue": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
30
|
+
"@abtnode/rbac": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
31
|
+
"@abtnode/router-provider": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
32
|
+
"@abtnode/static-server": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
33
|
+
"@abtnode/timemachine": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
34
|
+
"@abtnode/util": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
35
|
+
"@aigne/aigne-hub": "^0.10.15",
|
|
36
|
+
"@arcblock/did": "^1.27.15",
|
|
37
|
+
"@arcblock/did-connect-js": "^1.27.15",
|
|
38
|
+
"@arcblock/did-ext": "^1.27.15",
|
|
39
39
|
"@arcblock/did-motif": "^1.1.14",
|
|
40
|
-
"@arcblock/did-util": "^1.27.
|
|
41
|
-
"@arcblock/event-hub": "^1.27.
|
|
42
|
-
"@arcblock/jwt": "^1.27.
|
|
40
|
+
"@arcblock/did-util": "^1.27.15",
|
|
41
|
+
"@arcblock/event-hub": "^1.27.15",
|
|
42
|
+
"@arcblock/jwt": "^1.27.15",
|
|
43
43
|
"@arcblock/pm2-events": "^0.0.5",
|
|
44
|
-
"@arcblock/validator": "^1.27.
|
|
45
|
-
"@arcblock/vc": "^1.27.
|
|
46
|
-
"@blocklet/constant": "1.17.
|
|
47
|
-
"@blocklet/did-space-js": "^1.2.
|
|
48
|
-
"@blocklet/env": "1.17.
|
|
49
|
-
"@blocklet/error": "^0.3.
|
|
50
|
-
"@blocklet/meta": "1.17.
|
|
51
|
-
"@blocklet/resolver": "1.17.
|
|
52
|
-
"@blocklet/sdk": "1.17.
|
|
53
|
-
"@blocklet/server-js": "1.17.
|
|
54
|
-
"@blocklet/store": "1.17.
|
|
55
|
-
"@blocklet/theme": "^3.2.
|
|
44
|
+
"@arcblock/validator": "^1.27.15",
|
|
45
|
+
"@arcblock/vc": "^1.27.15",
|
|
46
|
+
"@blocklet/constant": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
47
|
+
"@blocklet/did-space-js": "^1.2.10",
|
|
48
|
+
"@blocklet/env": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
49
|
+
"@blocklet/error": "^0.3.5",
|
|
50
|
+
"@blocklet/meta": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
51
|
+
"@blocklet/resolver": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
52
|
+
"@blocklet/sdk": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
53
|
+
"@blocklet/server-js": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
54
|
+
"@blocklet/store": "1.17.6-beta-20251216-081847-bf91c4db",
|
|
55
|
+
"@blocklet/theme": "^3.2.14",
|
|
56
56
|
"@fidm/x509": "^1.2.1",
|
|
57
|
-
"@ocap/mcrypto": "^1.27.
|
|
58
|
-
"@ocap/util": "^1.27.
|
|
59
|
-
"@ocap/wallet": "^1.27.
|
|
57
|
+
"@ocap/mcrypto": "^1.27.15",
|
|
58
|
+
"@ocap/util": "^1.27.15",
|
|
59
|
+
"@ocap/wallet": "^1.27.15",
|
|
60
60
|
"@slack/webhook": "^7.0.6",
|
|
61
61
|
"archiver": "^7.0.1",
|
|
62
62
|
"axios": "^1.7.9",
|
|
@@ -116,5 +116,5 @@
|
|
|
116
116
|
"express": "^4.18.2",
|
|
117
117
|
"unzipper": "^0.10.11"
|
|
118
118
|
},
|
|
119
|
-
"gitHead": "
|
|
119
|
+
"gitHead": "4328c90c0afb782e02e25484ecfd453a00d72f7c"
|
|
120
120
|
}
|