@seybel/breakhound 1.0.4 → 1.0.5
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 +2 -2
- package/dist/cli.js +3 -3
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/schema.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -78,10 +78,10 @@ npx @seybel/breakhound --url https://staging.example.com # every route, on ano
|
|
|
78
78
|
| Angular | your route definitions, from `src/main.ts` on, with lazily loaded `loadChildren` routes under their path |
|
|
79
79
|
| Anything else | links followed from the home page (up to 50 pages, a few per section) |
|
|
80
80
|
|
|
81
|
-
**Dynamic routes** like `/blog/[slug]` are scanned once, using a real link found on your pages (routes that share a template share a layout). Routes below one reuse its values: once `/
|
|
81
|
+
**Dynamic routes** like `/blog/[slug]` are scanned once, using a real link found on your pages (routes that share a template share a layout). Routes below one reuse its values: once `/users/jane` is found, `/users/[username]/settings` is scanned as `/users/jane/settings`. If something is still missing, it's listed with a hint naming the parameters. Give them a real value once, by name, and every route that uses them is filled in:
|
|
82
82
|
|
|
83
83
|
```ts
|
|
84
|
-
params: {
|
|
84
|
+
params: { username: 'jane', orderId: '1001' }
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
Or give one route its own URL, which wins over `params`:
|
package/dist/cli.js
CHANGED
|
@@ -3107,8 +3107,8 @@ var RouteQueue = class {
|
|
|
3107
3107
|
/** For routes left waiting at the end: the parameters nothing gave a value. */
|
|
3108
3108
|
missing = /* @__PURE__ */ new Map();
|
|
3109
3109
|
/**
|
|
3110
|
-
* Values parameters took in real URLs, under the route they belong to: `/
|
|
3111
|
-
* `
|
|
3110
|
+
* Values parameters took in real URLs, under the route they belong to: `/users/[username]` →
|
|
3111
|
+
* `jane`. Routes below it reuse them, since a child of a real page is real too.
|
|
3112
3112
|
*/
|
|
3113
3113
|
seen = /* @__PURE__ */ new Map();
|
|
3114
3114
|
patterns = /* @__PURE__ */ new Map();
|
|
@@ -4347,7 +4347,7 @@ function validateConfig(config) {
|
|
|
4347
4347
|
const ok = config.params && typeof config.params === "object" && !Array.isArray(config.params) && Object.values(config.params).every((v) => typeof v === "string" && v !== "");
|
|
4348
4348
|
if (!ok) {
|
|
4349
4349
|
throw new Error(
|
|
4350
|
-
`params must give dynamic route parameters a real value by name, like { "
|
|
4350
|
+
`params must give dynamic route parameters a real value by name, like { "username": "jane" }`
|
|
4351
4351
|
);
|
|
4352
4352
|
}
|
|
4353
4353
|
}
|
package/dist/index.d.cts
CHANGED
|
@@ -175,7 +175,7 @@ export interface BreakhoundConfig {
|
|
|
175
175
|
samples?: Record<string, string>;
|
|
176
176
|
/**
|
|
177
177
|
* Values for dynamic route parameters by name, for routes no link on your pages fits,
|
|
178
|
-
* e.g. {
|
|
178
|
+
* e.g. { username: 'jane', orderId: '1001' }. Every route using those names is filled in;
|
|
179
179
|
* a parent route's real URL fills its own parameters for the routes below it already.
|
|
180
180
|
*/
|
|
181
181
|
params?: Record<string, string>;
|
package/dist/index.d.ts
CHANGED
|
@@ -175,7 +175,7 @@ export interface BreakhoundConfig {
|
|
|
175
175
|
samples?: Record<string, string>;
|
|
176
176
|
/**
|
|
177
177
|
* Values for dynamic route parameters by name, for routes no link on your pages fits,
|
|
178
|
-
* e.g. {
|
|
178
|
+
* e.g. { username: 'jane', orderId: '1001' }. Every route using those names is filled in;
|
|
179
179
|
* a parent route's real URL fills its own parameters for the routes below it already.
|
|
180
180
|
*/
|
|
181
181
|
params?: Record<string, string>;
|
package/dist/schema.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"additionalProperties": {
|
|
44
44
|
"type": "string"
|
|
45
45
|
},
|
|
46
|
-
"description": "Values for dynamic route parameters by name, for routes no link on your pages fits, e.g. {
|
|
46
|
+
"description": "Values for dynamic route parameters by name, for routes no link on your pages fits, e.g. { username: 'jane', orderId: '1001' }. Every route using those names is filled in; a parent route's real URL fills its own parameters for the routes below it already."
|
|
47
47
|
},
|
|
48
48
|
"maxRoutes": {
|
|
49
49
|
"type": "number",
|