@zerotal/devtools 1.5.0 → 1.5.1
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 +3 -3
- package/src/provider/DevtoolsProvider.ts +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -8,6 +8,23 @@ follows the Zerotal monorepo's unified versioning.
|
|
|
8
8
|
|
|
9
9
|
## [Unreleased]
|
|
10
10
|
|
|
11
|
+
## [1.5.1] — 2026-08-15
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- **DevTools never activated.** The panel was missing from every app, in every mode,
|
|
16
|
+
however the environment was configured.
|
|
17
|
+
|
|
18
|
+
`DevtoolsProvider` gated itself on `isDevSurfaceAllowed(Bun.env["APP_ENV"])`, which fails
|
|
19
|
+
twice over. `APP_ENV` holds the _runtime mode_ by the time a provider boots — `setAppEnv()`
|
|
20
|
+
replaced it — so the check was asking whether `"web"` is a development environment. And it
|
|
21
|
+
was the one dev gate that did not honour `ZT_DEV`, the flag the dev orchestrator sets on
|
|
22
|
+
the server it supervises, so `zt dev` did not rescue it either.
|
|
23
|
+
|
|
24
|
+
It asks `devSurfacesEnabled()` now, which reads the preserved deployment name and honours
|
|
25
|
+
`ZT_DEV`. Still fails closed: an unset, `staging` or `production` deployment does not get
|
|
26
|
+
the unauthenticated trace inspector.
|
|
27
|
+
|
|
11
28
|
## [1.5.0] — 2026-08-15
|
|
12
29
|
|
|
13
30
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/devtools",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"maturity": "stable",
|
|
6
6
|
"private": false,
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"typecheck": "tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@zerotal/core": "1.5.
|
|
33
|
+
"@zerotal/core": "1.5.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"typescript": "^5.8.0",
|
|
37
|
-
"@zerotal/orm": "1.5.
|
|
37
|
+
"@zerotal/orm": "1.5.1"
|
|
38
38
|
},
|
|
39
39
|
"description": "In-browser developer tools for Zerotal — request traces, an inspector panel, and an extensible tab registry.",
|
|
40
40
|
"keywords": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ServiceProvider,
|
|
3
|
-
|
|
3
|
+
devSurfacesEnabled,
|
|
4
4
|
type AppEnvironment,
|
|
5
5
|
type HttpContext,
|
|
6
6
|
} from "@zerotal/core";
|
|
@@ -71,10 +71,16 @@ export class DevtoolsProvider extends ServiceProvider {
|
|
|
71
71
|
private _stopStream: (() => void) | null = null;
|
|
72
72
|
|
|
73
73
|
override async onBooting(): Promise<void> {
|
|
74
|
-
|
|
75
|
-
//
|
|
76
|
-
//
|
|
77
|
-
|
|
74
|
+
// Fail closed: only activate for explicitly non-prod environments. An unset or
|
|
75
|
+
// `staging` deployment must NOT expose the unauthenticated trace inspector.
|
|
76
|
+
//
|
|
77
|
+
// `devSurfacesEnabled()` rather than reading `APP_ENV` here, for two reasons, and
|
|
78
|
+
// together they meant devtools never activated at all:
|
|
79
|
+
// - by the time a provider boots, `setAppEnv()` has replaced `APP_ENV` with the
|
|
80
|
+
// runtime mode, so this was asking whether `"web"` is a development environment;
|
|
81
|
+
// - it is the only dev gate that did not honour `ZT_DEV`, which is what the dev
|
|
82
|
+
// orchestrator sets on the server it supervises — so `zt dev` did not help either.
|
|
83
|
+
if (!devSurfacesEnabled()) return;
|
|
78
84
|
this._active = true;
|
|
79
85
|
|
|
80
86
|
const config = this._config();
|