devflare 1.0.0-next.33 → 1.0.0-next.34
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/LLM.md
CHANGED
|
@@ -2579,7 +2579,7 @@ export default defineConfig({
|
|
|
2579
2579
|
|
|
2580
2580
|
#### Disable unused conventions explicitly and let Devflare compose the rest
|
|
2581
2581
|
|
|
2582
|
-
Generated composition is not only a build detail. The local dev server also uses the same surface model to decide what to watch, so the directories around configured or conventional fetch, queue, scheduled, email, route, and transport files all become reload roots.
|
|
2582
|
+
Generated composition is not only a build detail. The local dev server also uses the same surface model to decide what to watch, so the directories around configured or conventional fetch, queue, scheduled, email, tail, route, and transport files all become reload roots.
|
|
2583
2583
|
|
|
2584
2584
|
That split is intentional: config-file edits take the config reload path, while worker-source changes under those watched roots take the worker reload path. You do not need a second watch system just because the package grew another surface.
|
|
2585
2585
|
|
|
@@ -2594,11 +2594,11 @@ That split is intentional: config-file edits take the config reload path, while
|
|
|
2594
2594
|
|
|
2595
2595
|
> **Note — Dev reload follows the same surface roots**
|
|
2596
2596
|
>
|
|
2597
|
-
> Worker-source changes under the watched fetch, queue, scheduled, email, route, or transport roots trigger the worker reload path, while edits to the resolved `devflare.config.*` trigger the config reload path instead.
|
|
2597
|
+
> Worker-source changes under the watched fetch, queue, scheduled, email, tail, route, or transport roots trigger the worker reload path, while edits to the resolved `devflare.config.*` trigger the config reload path instead.
|
|
2598
2598
|
|
|
2599
|
-
> **Note — Tail
|
|
2599
|
+
> **Note — Tail follows the same `files.*` model**
|
|
2600
2600
|
>
|
|
2601
|
-
>
|
|
2601
|
+
> `files.tail` is a public config key that behaves like the other event surfaces: leave it unset to auto-discover `src/tail.ts`, point it at a custom path, or set `files.tail: false` to disable tail handler discovery. Open the `createTestContext()` page when the question is tail testing.
|
|
2602
2602
|
|
|
2603
2603
|
#### Some nearby `files.*` keys are discovery globs, not event handlers
|
|
2604
2604
|
|
|
@@ -4395,21 +4395,21 @@ These helpers are runtime-shaped and context-accurate for handler logic, but the
|
|
|
4395
4395
|
>
|
|
4396
4396
|
> If a test depends on `waitUntil()` side effects being complete, a plain `cf.worker.fetch()` assertion may be too early. Either assert the side effect directly or move that check into a higher-fidelity path.
|
|
4397
4397
|
|
|
4398
|
-
#### Tail handlers are
|
|
4398
|
+
#### Tail handlers are a public config surface with a real test helper
|
|
4399
4399
|
|
|
4400
|
-
Tail support is
|
|
4400
|
+
Tail support is a real helper surface in the harness and a public `files.tail` config key, alongside `files.fetch`, `files.queue`, `files.scheduled`, and `files.email`. When `files.tail` is unset, `createTestContext()` auto-discovers `src/tail.ts`, wires `cf.tail.trigger()` automatically, and runs the handler with the same runtime helper access as the other test surfaces.
|
|
4401
4401
|
|
|
4402
4402
|
The handler can export a default function or a named `tail` function. The helper accepts either full trace items or smaller option objects through `cf.tail.create(...)`, then waits for the handler and any queued `waitUntil()` work before it returns.
|
|
4403
4403
|
|
|
4404
4404
|
##### Key points
|
|
4405
4405
|
|
|
4406
|
-
-
|
|
4406
|
+
- `src/tail.ts` is auto-discovered when `files.tail` is unset; set `files.tail` to point at a custom path, or `files.tail: false` to disable discovery — the same model as `files.fetch`, `files.queue`, `files.scheduled`, and `files.email`.
|
|
4407
4407
|
- Use `cf.tail.create()` when the test only needs a few trace fields, and pass full trace items when the payload details are the point of the assertion.
|
|
4408
4408
|
- Reach for a higher-fidelity integration path when the question is Cloudflare ingress behavior rather than your own log or trace handling logic.
|
|
4409
4409
|
|
|
4410
|
-
> **
|
|
4410
|
+
> **Note — Documented like the other handler surfaces**
|
|
4411
4411
|
>
|
|
4412
|
-
> Tail
|
|
4412
|
+
> Tail has a public `files.tail` config key and is documented like fetch, queue, scheduled, and email: leave it unset to auto-discover `src/tail.ts`, point it at a custom path, or set it to `false` to disable discovery.
|
|
4413
4413
|
|
|
4414
4414
|
##### Example — A tiny tail handler plus one honest harness test
|
|
4415
4415
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolve-phased.d.ts","sourceRoot":"","sources":["../../src/config/resolve-phased.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolve-phased.d.ts","sourceRoot":"","sources":["../../src/config/resolve-phased.ts"],"names":[],"mappings":"AA8BA,OAAO,EACN,KAAK,kDAAkD,EAEvD,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,KAAK,wBAAwB,EAAkC,MAAM,WAAW,CAAA;AAEzF,OAAO,EACN,KAAK,yCAAyC,EAG9C,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE9C,OAAO,CAAC,MAAM,YAAY,EAAE,OAAO,MAAM,CAAA;AAEzC;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE/E;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,cAAc,GAAG;IAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;CAAE,CAAA;AAE/E;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG;IAAE,QAAQ,CAAC,CAAC,YAAY,CAAC,EAAE,QAAQ,CAAA;CAAE,CAAA;AAEjF,MAAM,MAAM,KAAK,GAAG,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;AAEhD;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG,YAAY,CAAA;AAEvD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW,CAEtE;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,CAExE;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,SAAS,OAAO,GACzD,WAAW,GACX,CAAC,SAAS,OAAO,GAChB,WAAW,GACX,CAAC,SAAS,QAAQ,GACjB,YAAY,GACZ,KAAK,CAAA;AAEV,MAAM,WAAW,6BAA6B;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,wBAAwB,CAAA;CAClC;AAED,MAAM,WAAW,4BAA6B,SAAQ,6BAA6B;IAClF,KAAK,EAAE,OAAO,CAAA;CACd;AAED,MAAM,WAAW,4BAA6B,SAAQ,6BAA6B;IAClF,KAAK,EAAE,OAAO,CAAA;CACd;AAED,MAAM,WAAW,6BAChB,SAAQ,6BAA6B,EACpC,yCAAyC;IAC1C,KAAK,EAAE,QAAQ,CAAA;IACf,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,WAAW,CAAC,EAAE,kDAAkD,CAAA;CAChE;AAED,MAAM,MAAM,uBAAuB,GAChC,4BAA4B,GAC5B,4BAA4B,GAC5B,6BAA6B,CAAA;AAEhC;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,uBAAuB,EACvE,MAAM,EAAE,cAAc,EACtB,OAAO,EAAE,CAAC,GACR,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAsClC"}
|
|
@@ -3,9 +3,8 @@ import type { DevflareConfig } from '../config';
|
|
|
3
3
|
/**
|
|
4
4
|
* Derive `BindingHints` from a resolved Devflare config.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* hint kinds.
|
|
6
|
+
* Shared by the test-context surface (`createTestContext` / simple-context) so
|
|
7
|
+
* the mapping between config sections and hint kinds lives in one place.
|
|
9
8
|
*/
|
|
10
9
|
export declare function extractBindingHints(config: DevflareConfig): BindingHints;
|
|
11
10
|
//# sourceMappingURL=binding-hints.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"binding-hints.d.ts","sourceRoot":"","sources":["../../src/test/binding-hints.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE/C
|
|
1
|
+
{"version":3,"file":"binding-hints.d.ts","sourceRoot":"","sources":["../../src/test/binding-hints.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAE/C;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,YAAY,CAqDxE"}
|
package/package.json
CHANGED