ecopages 0.2.0-beta.23 → 0.2.0-beta.25

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.
Files changed (2) hide show
  1. package/README.md +38 -8
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -34,14 +34,14 @@ bun dev
34
34
 
35
35
  Server and build commands accept the following options. They automatically map to the equivalent environment variables for the underlying process:
36
36
 
37
- | Option | Env Var | Description |
38
- | :------------------------- | :---------------------- | :---------------------------------- |
39
- | `-p, --port <port>` | `ECOPAGES_PORT` | Server port (default 3000) |
40
- | `-n, --hostname <host>` | `ECOPAGES_HOSTNAME` | Server hostname |
41
- | `-b, --base-url <url>` | `ECOPAGES_BASE_URL` | Base URL string |
42
- | `-d, --debug` | `ECOPAGES_LOGGER_DEBUG` | Enables debug-level logging |
43
- | `-r, --react-fast-refresh` | | Enables React Fast Refresh |
44
- | `--runtime <runtime>` | | Force execution via `bun` or `node` |
37
+ | Option | Env Var | Description |
38
+ | :------------------------- | :---------------------- | :-------------------------------------------------------- |
39
+ | `-p, --port <port>` | `ECOPAGES_PORT` | Server port (default 3000) |
40
+ | `-n, --hostname <host>` | `ECOPAGES_HOSTNAME` | Server hostname |
41
+ | `-b, --base-url <url>` | `ECOPAGES_BASE_URL` | Base URL string |
42
+ | `-d, --debug` | `ECOPAGES_LOGGER_DEBUG` | Enables debug logging and startup phase trace (see below) |
43
+ | `-r, --react-fast-refresh` | | Enables React Fast Refresh |
44
+ | `--runtime <runtime>` | | Force execution via `bun` or `node` |
45
45
 
46
46
  ### Runtime Detection
47
47
 
@@ -63,6 +63,36 @@ ecopages dev --port 8080 --debug
63
63
  ecopages dev -r
64
64
  ```
65
65
 
66
+ ### Debug logging and startup trace
67
+
68
+ Set these in `.env` or on the command line when diagnosing slow dev startup or first page load.
69
+
70
+ | Env var | CLI | What you get |
71
+ | :---------------------------- | :--------------------- | :--------------------------------------------------------------------------------------------- |
72
+ | `ECOPAGES_LOGGER_DEBUG=true` | `ecopages dev --debug` | Verbose `[@ecopages/core]` logs across the stack, plus **startup phase trace** lines on stderr |
73
+ | `ECOPAGES_STARTUP_TRACE=true` | — | **Only** the phase trace (no extra debug noise). Useful when measuring first-open latency |
74
+
75
+ Trace lines are prefixed with `[ecopages:startup-trace]` and look like:
76
+
77
+ ```text
78
+ [ecopages:startup-trace] phase=config-ready wallMs=1271
79
+ [ecopages:startup-trace] phase=setupAppRuntimePlugins durationMs=714 wallMs=1999
80
+ [ecopages:startup-trace] phase=route-registry durationMs=1 wallMs=2000
81
+ [ecopages:startup-trace] phase=server-listen durationMs=45 wallMs=2046
82
+ [ecopages:startup-trace] phase=first-request-ssr durationMs=5296 wallMs=12495
83
+ [ecopages:startup-trace] summary path=/docs/getting-started/introduction bundleCount=13 clientBundleBytes=858396 wallMs=12496
84
+ ```
85
+
86
+ Phases: config ready → runtime plugins → route registry → server listening → first request SSR. The summary includes bundle count and total client JS bytes for that first request.
87
+
88
+ ```bash
89
+ # Focused perf trace only
90
+ ECOPAGES_STARTUP_TRACE=true pnpm dev
91
+
92
+ # Full debug + trace
93
+ ecopages dev --debug
94
+ ```
95
+
66
96
  ## Ecosystem & Plugins
67
97
 
68
98
  Ecopages relies on a modular architecture. Core logic and framework integrations are published as `@ecopages/*` packages on [npm](https://www.npmjs.com/org/ecopages).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ecopages",
3
- "version": "0.2.0-beta.23",
3
+ "version": "0.2.0-beta.25",
4
4
  "description": "CLI utilities for Ecopages",
5
5
  "type": "module",
6
6
  "engines": {
@@ -32,7 +32,7 @@
32
32
  "ecopages": "bin/cli.js"
33
33
  },
34
34
  "dependencies": {
35
- "@ecopages/core": "0.2.0-beta.23",
35
+ "@ecopages/core": "0.2.0-beta.25",
36
36
  "@ecopages/logger": "^0.2.3",
37
37
  "giget": "^2.0.0",
38
38
  "tsx": "^4.22.3"