@zerotal/devtools 1.4.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 +31 -1
- package/package.json +4 -4
- package/src/provider/DevtoolsProvider.ts +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -4,10 +4,40 @@ All notable changes to this package are documented here. The format is
|
|
|
4
4
|
based on [Keep a Changelog](https://keepachangelog.com/); this package
|
|
5
5
|
follows the Zerotal monorepo's unified versioning.
|
|
6
6
|
|
|
7
|
-
**Maturity: `
|
|
7
|
+
**Maturity: `stable`**
|
|
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
|
+
|
|
28
|
+
## [1.5.0] — 2026-08-15
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- **Maturity is now `stable`.** The public API is covered by the SemVer promise from
|
|
33
|
+
here: anything importable without an `@internal` marker keeps its shape for the rest
|
|
34
|
+
of the 1.x line, and `api-surface.md` is diffed by CI on every change. The package
|
|
35
|
+
earned it by being small and self-contained — 32 exported symbols, a single dependency
|
|
36
|
+
on `@zerotal/core`, no breaking change since its first release, and the one internal
|
|
37
|
+
seam (`_setTraceStore`) correctly marked. The in-page panel extension API
|
|
38
|
+
(`window.__zerotalDevtools`, used by Flow to contribute its Timeline tab) is part of
|
|
39
|
+
that promise.
|
|
40
|
+
|
|
11
41
|
## [1.0.3] — 2026-08-07
|
|
12
42
|
|
|
13
43
|
### Changed
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerotal/devtools",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"maturity": "
|
|
5
|
+
"maturity": "stable",
|
|
6
6
|
"private": false,
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "./src/index.ts",
|
|
@@ -30,11 +30,11 @@
|
|
|
30
30
|
"typecheck": "tsc --noEmit"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@zerotal/core": "1.
|
|
33
|
+
"@zerotal/core": "1.5.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"typescript": "^5.8.0",
|
|
37
|
-
"@zerotal/orm": "1.
|
|
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();
|