@arcblock/pm2-prom-module 2.6.8 → 2.6.9
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/core/pm2.js +3 -0
- package/package.json +1 -1
- package/utils/domain.js +1 -1
package/core/pm2.js
CHANGED
|
@@ -232,6 +232,9 @@ const detectActiveApps = () => {
|
|
|
232
232
|
}), { concurrency: 8 })
|
|
233
233
|
.then((apps) => {
|
|
234
234
|
for (const app of apps) {
|
|
235
|
+
if (!app.urls || !Array.isArray(app.urls)) {
|
|
236
|
+
continue;
|
|
237
|
+
}
|
|
235
238
|
for (const url of app.urls) {
|
|
236
239
|
metrics_1.metricAppDomainList === null || metrics_1.metricAppDomainList === void 0 ? void 0 : metrics_1.metricAppDomainList.set({ appName: app.appName, domain: url, appPid: app.appPid }, app.urls.length);
|
|
237
240
|
}
|
package/package.json
CHANGED
package/utils/domain.js
CHANGED
|
@@ -37,7 +37,7 @@ function getAppDomainList(url) {
|
|
|
37
37
|
if (!(0, is_url_1.default)(url)) {
|
|
38
38
|
return [url];
|
|
39
39
|
}
|
|
40
|
-
if (yield appDomainListCache.
|
|
40
|
+
if (yield appDomainListCache.get(url)) {
|
|
41
41
|
return (yield appDomainListCache.get(url));
|
|
42
42
|
}
|
|
43
43
|
const response = yield fetch((0, ufo_1.joinURL)(url, '__blocklet__.js?type=json'));
|