@dbt-tools/web 0.6.0 → 0.6.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/README.md +17 -26
- package/dist/assets/{analysis.worker-Ck5WMv4C.js → analysis.worker-BzrXut-o.js} +1 -1
- package/dist/assets/{index-C51XEijC.js → index-WFlxSrs-.js} +2 -2
- package/dist/assets/{results-query.worker-SUBgXDqM.js → results-query.worker-CM0N9VyM.js} +1 -1
- package/dist/index.html +1 -1
- package/dist-serve/server/cli.js +8 -9
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ The server listens on **127.0.0.1** and prints the URL (e.g. `http://127.0.0.1:3
|
|
|
48
48
|
|
|
49
49
|
For **supply-chain and capability** tooling (e.g. [Socket.dev alerts](https://socket.dev)):
|
|
50
50
|
|
|
51
|
-
- **`networkAccess` — expected.** The published app is a **local HTTP server** (`node:http` on loopback), the UI uses **`fetch`** to same-origin `/api/...` routes, and **optional** remote artifact mode uses **AWS S3** and **Google Cloud Storage** client libraries
|
|
51
|
+
- **`networkAccess` — expected.** The published app is a **local HTTP server** (`node:http` on loopback), the UI uses **`fetch`** to same-origin `/api/...` routes, and **optional** remote artifact mode uses **AWS S3** and **Google Cloud Storage** client libraries via the **Load artifacts** UI (see [ADR-0004](../../docs/adr/0004-remote-object-storage-artifact-sources-and-auto-reload.md)). There is no separate telemetry channel.
|
|
52
52
|
- **`shellAccess` (first-party) — none.** The CLI does **not** spawn a shell or external `open`/`xdg-open` helpers; it only starts the server and prints the URL.
|
|
53
53
|
- **`usesEval` — not in our shipped `dist` / `dist-serve` bundles** from this repository’s build. If a scanner still flags `usesEval`, it is usually from **transitive dependencies** in the full npm graph rather than first-party TypeScript.
|
|
54
54
|
|
|
@@ -61,7 +61,7 @@ You can also set **`DBT_TOOLS_TARGET_DIR`** in the environment instead of `--tar
|
|
|
61
61
|
- **Dependency graph** — interactive lineage and blast-radius style exploration
|
|
62
62
|
- **Execution timeline** — Gantt-style `run_results` with critical path and bottleneck-oriented views
|
|
63
63
|
- **Local artifacts** — read `manifest.json` / `run_results.json` from a target directory via server-side routes (local-first default)
|
|
64
|
-
- **Remote sources (S3 / GCS)** —
|
|
64
|
+
- **Remote sources (S3 / GCS)** — **Load artifacts** in the UI; server-side credentials; UI prompts before switching runs ([ADR-0004](../../docs/adr/0004-remote-object-storage-artifact-sources-and-auto-reload.md))
|
|
65
65
|
- **Large manifests** — web workers and virtualization for very large projects
|
|
66
66
|
|
|
67
67
|
---
|
|
@@ -96,11 +96,10 @@ Heavy analysis runs in a **web worker** (browser-safe shared library). The same
|
|
|
96
96
|
|
|
97
97
|
Set these in the environment for the **Node process** that runs `dbt-tools-web` (not in the browser):
|
|
98
98
|
|
|
99
|
-
| Variable
|
|
100
|
-
|
|
|
101
|
-
| `DBT_TOOLS_TARGET_DIR`
|
|
102
|
-
| `
|
|
103
|
-
| `DBT_TOOLS_DEBUG` | Set to `1` for server-side debug logs |
|
|
99
|
+
| Variable | Description |
|
|
100
|
+
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
|
|
101
|
+
| `DBT_TOOLS_TARGET_DIR` | Directory containing `manifest.json` and `run_results.json` at startup (remote via [Load artifacts](#remote-artifact-sources)) |
|
|
102
|
+
| `DBT_TOOLS_DEBUG` | Set to `1` for server-side debug logs |
|
|
104
103
|
|
|
105
104
|
**Client:** add **`?debug=1`** to the URL for browser console debug logging.
|
|
106
105
|
|
|
@@ -108,26 +107,18 @@ Set these in the environment for the **Node process** that runs `dbt-tools-web`
|
|
|
108
107
|
|
|
109
108
|
### Remote artifact sources
|
|
110
109
|
|
|
111
|
-
**
|
|
112
|
-
|
|
113
|
-
Example (shape only — adjust bucket/prefix):
|
|
114
|
-
|
|
115
|
-
```bash
|
|
116
|
-
export DBT_TOOLS_REMOTE_SOURCE='{"provider":"s3","bucket":"my-bucket","prefix":"dbt/runs","pollIntervalMs":30000}'
|
|
117
|
-
pnpm dev
|
|
118
|
-
```
|
|
110
|
+
Use the in-app **Load artifacts** panel (local path, `s3://bucket/prefix`, or `gs://bucket/prefix`). The dev server and **`dbt-tools-web`** list keys under the prefix, **poll** for changes, and surface newer artifact versions **without switching your selected location automatically**. Credentials stay in the **Node process** (AWS default chain, GCS ADC / `GOOGLE_APPLICATION_CREDENTIALS`), not in the browser. Optional **`DBT_TOOLS_GCS_*`** / **`DBT_TOOLS_S3_*`** on the Node process apply when discovering remote sources.
|
|
119
111
|
|
|
120
112
|
### Vite dev environment reference (monorepo)
|
|
121
113
|
|
|
122
114
|
When **`DBT_TOOLS_TARGET_DIR`** is set, Vite serves `/api/...` like the published server. Extra variables:
|
|
123
115
|
|
|
124
|
-
| Variable | Default | Description
|
|
125
|
-
| ------------------------------ | ------- |
|
|
126
|
-
| `DBT_TOOLS_TARGET_DIR` | — | Enables serving artifacts via `/api/*` middleware
|
|
127
|
-
| `
|
|
128
|
-
| `
|
|
129
|
-
| `
|
|
130
|
-
| `DBT_TOOLS_RELOAD_DEBOUNCE_MS` | `300` | Reload debounce (Vite dev) |
|
|
116
|
+
| Variable | Default | Description |
|
|
117
|
+
| ------------------------------ | ------- | --------------------------------------------------------------------------------------- |
|
|
118
|
+
| `DBT_TOOLS_TARGET_DIR` | — | Enables serving local artifacts via `/api/*` middleware at startup |
|
|
119
|
+
| `DBT_TOOLS_DEBUG` | unset | `1` enables server-side debug logging |
|
|
120
|
+
| `DBT_TOOLS_WATCH` | on | `0` disables file watching (Vite dev); see [Vite dev server](#vite-dev-server-monorepo) |
|
|
121
|
+
| `DBT_TOOLS_RELOAD_DEBOUNCE_MS` | `300` | Reload debounce (Vite dev) |
|
|
131
122
|
|
|
132
123
|
---
|
|
133
124
|
|
|
@@ -135,7 +126,7 @@ When **`DBT_TOOLS_TARGET_DIR`** is set, Vite serves `/api/...` like the publishe
|
|
|
135
126
|
|
|
136
127
|
### Published server vs static Docker image
|
|
137
128
|
|
|
138
|
-
- **`dbt-tools-web`** (npm): Node HTTP server + static `dist/` + artifact middleware. Honors **`DBT_TOOLS_TARGET_DIR`**, **`
|
|
129
|
+
- **`dbt-tools-web`** (npm): Node HTTP server + static `dist/` + artifact middleware. Honors **`DBT_TOOLS_TARGET_DIR`**, **`DBT_TOOLS_DEBUG`**. Remote S3/GCS via **Load artifacts** in the UI. Does **not** use Vite file-watch env vars.
|
|
139
130
|
- **Dockerfile (nginx):** builds static **`dist/`** and serves it with **nginx**. There is **no** Node artifact middleware in that image unless you change the deployment shape, so the same **`DBT_TOOLS_*`** server env vars **do not apply** to that container as shipped.
|
|
140
131
|
|
|
141
132
|
### Build static image (monorepo)
|
|
@@ -174,8 +165,8 @@ Set package visibility under the repository **Packages** settings if needed.
|
|
|
174
165
|
|
|
175
166
|
| Symptom | What to check |
|
|
176
167
|
| ---------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
177
|
-
| Blank UI / no artifacts | Pass **`--target`** or set **`DBT_TOOLS_TARGET_DIR`**
|
|
178
|
-
| Blank page / “No artifacts found” | Same as above: confirm **`DBT_TOOLS_TARGET_DIR`** or
|
|
168
|
+
| Blank UI / no artifacts | Pass **`--target`** or set **`DBT_TOOLS_TARGET_DIR`** for local startup. For remote, use **Load artifacts** with a complete `manifest.json` + `run_results.json` pair. |
|
|
169
|
+
| Blank page / “No artifacts found” | Same as above: confirm local **`DBT_TOOLS_TARGET_DIR`** or remote discovery found a complete artifact pair. |
|
|
179
170
|
| `GET /api/...` or `GET /api/manifest.json` 404 | **`DBT_TOOLS_TARGET_DIR`** unset, wrong path, or (remote) no complete pair discovered. |
|
|
180
171
|
| Auto-reload not triggering (Vite) | Ensure **`DBT_TOOLS_WATCH`** is not `0`; confirm read access to the target directory. See [Vite dev server (monorepo)](#vite-dev-server-monorepo). |
|
|
181
172
|
| Expected “hot reload” after `dbt run` | The **npm** server re-reads files when the app fetches them; refresh the browser. **File watch + auto-reload** is a **Vite dev** feature — see [Vite dev server (monorepo)](#vite-dev-server-monorepo). |
|
|
@@ -225,7 +216,7 @@ DBT_TOOLS_TARGET_DIR=./target pnpm dev
|
|
|
225
216
|
|
|
226
217
|
When you run `pnpm dev` / `pnpm dev:web` from the repository, **Vite** serves the app with middleware that mirrors the same **`/api/...`** artifact routes as the published **`dbt-tools-web`** server. Additional **file watching** and auto-reload apply only here.
|
|
227
218
|
|
|
228
|
-
|
|
219
|
+
Use the in-app **Load artifacts** panel: choose **local**, **S3**, or **GCS**, enter a **location** (directory path or `s3://` / `gs://` bucket prefix), run **Discover**, then **select a run** when more than one complete `manifest.json` + `run_results.json` pair exists. Cloud credentials never enter the browser—they stay in the Node server ([ADR-0004](../../docs/adr/0004-remote-object-storage-artifact-sources-and-auto-reload.md)).
|
|
229
220
|
|
|
230
221
|
#### Debug logging
|
|
231
222
|
|