@t0.labs/daxta 1.1.1 → 1.1.3
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 +9 -9
- package/assets/empty.html +1 -1
- package/assets/example.html +75 -29
- package/assets/viewer.html +479 -134
- package/dist/build/build-spec.js +8 -6
- package/dist/cli/install.js +6 -6
- package/dist/cli/titles.js +34 -4
- package/dist/config.d.ts +6 -0
- package/dist/config.js +10 -1
- package/dist/fields/dto-fields.js +12 -2
- package/dist/jest/reporter.js +2 -2
- package/dist/serve/middleware.d.ts +7 -5
- package/dist/serve/middleware.js +11 -11
- package/dist/serve/paths.d.ts +2 -1
- package/dist/serve/paths.js +9 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,7 +30,7 @@ DAxTA captures that real traffic while your tests run and turns it into interact
|
|
|
30
30
|
```ts
|
|
31
31
|
import { apiDocs } from '@t0.labs/daxta';
|
|
32
32
|
|
|
33
|
-
apiDocs(app); // NestJS — mount /
|
|
33
|
+
apiDocs(app); // NestJS — mount /docs when DAXTA_DOCS=on
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Generation happens when Jest finishes (reporter) or when you run `daxta generate`. You do not call `generateApiDocs()` in `main.ts`.
|
|
@@ -139,7 +139,7 @@ These examples come from **actual test executions**, not manually maintained doc
|
|
|
139
139
|
|
|
140
140
|
3. **When Jest finishes**, DAxTA performs a single documentation build.
|
|
141
141
|
|
|
142
|
-
4. `apiDocs(app)` mounts the generated documentation on your NestJS application when `DAXTA_DOCS=
|
|
142
|
+
4. `apiDocs(app)` mounts the generated documentation on your NestJS application when `DAXTA_DOCS=on`.
|
|
143
143
|
|
|
144
144
|
---
|
|
145
145
|
|
|
@@ -200,7 +200,7 @@ When Jest finishes, your documentation is ready.
|
|
|
200
200
|
Start your application with DAxTA enabled:
|
|
201
201
|
|
|
202
202
|
```bash
|
|
203
|
-
DAXTA_DOCS=
|
|
203
|
+
DAXTA_DOCS=on pnpm start:dev
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
Open:
|
|
@@ -290,20 +290,20 @@ Your tests remain the source of truth.
|
|
|
290
290
|
|
|
291
291
|
## `DAXTA_DOCS`
|
|
292
292
|
|
|
293
|
-
DAxTA requires an explicit decision about whether `/
|
|
293
|
+
DAxTA requires an explicit decision about whether `/docs` should be mounted. Only `on` and `off` are accepted.
|
|
294
294
|
|
|
295
295
|
```bash
|
|
296
|
-
DAXTA_DOCS=
|
|
297
|
-
DAXTA_DOCS=
|
|
296
|
+
DAXTA_DOCS=on # mount /docs
|
|
297
|
+
DAXTA_DOCS=off # do not mount /docs
|
|
298
298
|
|
|
299
|
-
# unset / empty → throws
|
|
299
|
+
# unset / empty / any other value → throws
|
|
300
300
|
```
|
|
301
301
|
|
|
302
302
|
This makes exposing API documentation an explicit application decision.
|
|
303
303
|
|
|
304
|
-
`DAXTA_DOCS=
|
|
304
|
+
`DAXTA_DOCS=off` does not remove `@t0.labs/daxta` from your Node image. It only prevents `/docs` from being mounted.
|
|
305
305
|
|
|
306
|
-
The path
|
|
306
|
+
The path defaults to `/docs`. Override with `DAXTA_DOCS_PATH` or `docsPath` in `daxta.config.ts`.
|
|
307
307
|
|
|
308
308
|
---
|
|
309
309
|
|