feat(add,create): matcha add cookie and matcha create transformer
CI / installer (macos-14) (pull_request) Successful in 3s
CI / check (pull_request) Successful in 27s
CI / starter (bun) (pull_request) Failing after 31s
CI / starter (deno) (pull_request) Failing after 32s
CI / starter (edge) (pull_request) Failing after 37s
CI / core-freshness (pull_request) Has been skipped
CI / installer (ubuntu-latest) (pull_request) Successful in 9s
CI / starter (node) (pull_request) Failing after 32s
CI / installer (macos-14) (pull_request) Successful in 3s
CI / check (pull_request) Successful in 27s
CI / starter (bun) (pull_request) Failing after 31s
CI / starter (deno) (pull_request) Failing after 32s
CI / starter (edge) (pull_request) Failing after 37s
CI / core-freshness (pull_request) Has been skipped
CI / installer (ubuntu-latest) (pull_request) Successful in 9s
CI / starter (node) (pull_request) Failing after 32s
add cookie reads a cookie with @cookie and sets one through a @Transformer and setCookie, since core sends Set-Cookie only as a header. create transformer writes a typed TransformerFn and prints how to attach it; there is nothing to wire into a module. starter-smoke now covers both. add cookie uses @cookie and setCookie, which are new in core RC.1, so this lands together with the CORE_VERSION bump. Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
6 files changed
+133
-2
No files matched your search
@@ -13,6 +13,12 @@ is pinned to is `CORE_VERSION` in `src/template.rs`, and each entry below says w
|
||||
|
||||
### Added
|
||||
|
||||
- **`matcha add cookie`** adds `GET /prefs`, which reads a cookie with `@cookie('theme')`, and
|
||||
`POST /prefs`, which sets it through a `@Transformer` and `setCookie()`. Core has no response-cookie
|
||||
API, so the transformer is where a `Set-Cookie` header is sent. Needs `@green-tea/core` RC.1.
|
||||
- **`matcha create transformer <Name>`** writes `src/transformers/<name>.transformer.ts`, a typed
|
||||
`TransformerFn`, and prints the `@Transformer(...)` line that attaches it. A transformer belongs to
|
||||
a route, not a module, so there is nothing to wire.
|
||||
- **Every starter ships an `AGENTS.md` and a `CLAUDE.md` that imports it.** green-tea is new, so a
|
||||
coding agent falls back on Express habits. The file states the rules that differ: it is a graph, not a
|
||||
chain, a handler declares its needs in its signature, and the graph is checked at boot. It also points
|
||||
|
||||
Reference in new issue
Block a user