@zerotal/monitor 1.5.0 → 1.6.0
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/CHANGELOG.md +17 -0
- package/package.json +7 -7
- package/src/config.ts +2 -2
- package/src/sources/system.ts +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,23 @@ follows the Zerotal monorepo's unified versioning.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.6.0] — 2026-08-15
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **System info reported the runtime mode as the environment.** The panel showed `web`
|
|
16
|
+
rather than `production` or `staging`, because it read `APP_ENV` after `setAppEnv()`
|
|
17
|
+
had overwritten it. It reads `deployEnv()` now.
|
|
18
|
+
|
|
19
|
+
## [1.5.1] — 2026-08-15
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
|
|
23
|
+
- **Open-by-default access in development never applied.** The predicate read `APP_ENV`,
|
|
24
|
+
which holds the runtime mode once the app has booted, so the panel demanded an explicit
|
|
25
|
+
`auth` predicate even on a developer's machine. It asks `devSurfacesEnabled()` now — and
|
|
26
|
+
still requires one anywhere that is not explicitly a development environment.
|
|
27
|
+
|
|
11
28
|
## [1.5.0] — 2026-08-15
|
|
12
29
|
|
|
13
30
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/monitor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "stable",
|
|
6
6
|
"private": false,
|
|
@@ -29,14 +29,14 @@
|
|
|
29
29
|
"typecheck": "tsc --noEmit"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@zerotal/core": "1.
|
|
33
|
-
"@zerotal/flow-ui": "1.
|
|
34
|
-
"@zerotal/flow": "1.
|
|
32
|
+
"@zerotal/core": "1.6.0",
|
|
33
|
+
"@zerotal/flow-ui": "1.6.0",
|
|
34
|
+
"@zerotal/flow": "1.6.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@zerotal/queue": "1.
|
|
38
|
-
"@zerotal/scheduler": "1.
|
|
39
|
-
"@zerotal/telemetry": "1.
|
|
37
|
+
"@zerotal/queue": "1.6.0",
|
|
38
|
+
"@zerotal/scheduler": "1.6.0",
|
|
39
|
+
"@zerotal/telemetry": "1.6.0"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@zerotal/queue": "^1.0.0",
|
package/src/config.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* auth: (user) => user?.role === "admin",
|
|
8
8
|
* });
|
|
9
9
|
*/
|
|
10
|
-
import { deepMerge,
|
|
10
|
+
import { deepMerge, devSurfacesEnabled } from "@zerotal/core";
|
|
11
11
|
import type { RetentionMode } from "./store/MonitorDb.ts";
|
|
12
12
|
import type { AlertThresholds } from "./alerting.ts";
|
|
13
13
|
|
|
@@ -129,7 +129,7 @@ export interface ResolvedMonitorConfig extends MonitorConfigShape {
|
|
|
129
129
|
// documented `APP_ENV=production` deploy would otherwise expose the panel.
|
|
130
130
|
// Only explicitly non-prod envs get open-by-default access; everything else
|
|
131
131
|
// (unset, staging, production) must supply an explicit `auth` predicate.
|
|
132
|
-
const defaultAuthOpen = (): boolean =>
|
|
132
|
+
const defaultAuthOpen = (): boolean => devSurfacesEnabled();
|
|
133
133
|
|
|
134
134
|
const defaults: ResolvedMonitorConfig = {
|
|
135
135
|
path: "/monitor",
|
package/src/sources/system.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
import { cpus, loadavg, totalmem, freemem } from "node:os";
|
|
8
8
|
import { readFileSync } from "node:fs";
|
|
9
9
|
import { currentApp } from "@zerotal/core";
|
|
10
|
+
import { deployEnv } from "@zerotal/core";
|
|
10
11
|
import { httpMetrics } from "@zerotal/core/metrics";
|
|
11
12
|
import { ZEROTAL_VERSION_TAG } from "../version.ts";
|
|
12
13
|
import type { Gauge, SystemMeta } from "../store/types.ts";
|
|
@@ -142,7 +143,7 @@ export function systemMeta(opts: {
|
|
|
142
143
|
zerotal: opts.zerotal ?? ZEROTAL_VERSION_TAG,
|
|
143
144
|
region: opts.region ?? process.env.FLY_REGION ?? process.env.AWS_REGION ?? "local",
|
|
144
145
|
deploy: opts.deploy ?? process.env.DEPLOY_SHA?.slice(0, 7) ?? "dev",
|
|
145
|
-
environment:
|
|
146
|
+
environment: deployEnv() || process.env.NODE_ENV || "development",
|
|
146
147
|
};
|
|
147
148
|
}
|
|
148
149
|
|