docs: document create plugin, and version 26.9.0-beta.1
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This commit is contained in:
4 files changed
+50
-2
No files matched your search
@@ -9,6 +9,29 @@ green-tea's convention. **The CLI ships on its own version line**: `matcha` 26.8
|
||||
mean `@green-tea/core` 26.8, and the two release independently. The core version a scaffold
|
||||
is pinned to is `CORE_VERSION` in `src/template.rs`, and each entry below says when it moved.
|
||||
|
||||
## [26.9.0-beta.1] - 2026-09-24
|
||||
|
||||
### Added
|
||||
|
||||
- **`matcha create plugin`.** By default it scaffolds an in-app plugin in a folder of its own,
|
||||
`plugins/<name>/`, and registers it in `createApp({ plugins })`. With `--package [DIR]` it writes
|
||||
a package instead. JSR is the default, and `--registry both` adds an ESM-only npm build. The
|
||||
package passes `deno test`, `node --test`, `bun test` and `deno publish --dry-run` as generated.
|
||||
At a terminal it asks for what the flags leave out. Without one it takes the defaults, and fails
|
||||
with the flag to pass instead of waiting for an answer.
|
||||
|
||||
### Changed
|
||||
|
||||
- **Scaffolds `@green-tea/core` 26.9.0-beta.2** (`CORE_VERSION` moved from beta.1). That is the
|
||||
release where a plugin became `{ name, mount }` and `app.boot()` became public, so a project
|
||||
made with the previous version could not use plugins in their current form.
|
||||
|
||||
### Fixed
|
||||
|
||||
- **The Deno and Bun starters bound the port before booting.** They passed `app.fetch` straight to
|
||||
`Deno.serve` and `Bun.serve`, so a provider that failed left the port open and answering 500 to
|
||||
every request. They now `await serveDeno(app)` and `await serveBun(app)`, which boot first.
|
||||
|
||||
## [26.9.0-beta.0] - 2026-09-05
|
||||
|
||||
### Added
|
||||
|
||||
Generated
+1
-1
@@ -254,7 +254,7 @@ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||
|
||||
[[package]]
|
||||
name = "matcha-cli"
|
||||
version = "26.9.0-beta.0"
|
||||
version = "26.9.0-beta.1"
|
||||
dependencies = [
|
||||
"assert_cmd",
|
||||
"clap",
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "matcha-cli"
|
||||
version = "26.9.0-beta.0"
|
||||
version = "26.9.0-beta.1"
|
||||
edition = "2021"
|
||||
description = "The green-tea CLI: scaffold a project, generate controllers, steps and providers already wired into their module, and run with your runtime detected. One native binary, no JS runtime needed to install it."
|
||||
license = "MIT"
|
||||
|
||||
@@ -38,6 +38,7 @@ matcha new my-api # scaffold from the official starter
|
||||
matcha new my-api --template-url gh:owner/repo # scaffold from any git template
|
||||
matcha run # detect node/deno/bun and run in watch
|
||||
matcha create controller Users # generate + auto-wire into @Module
|
||||
matcha create plugin "Plugin Algo" # an in-app plugin, or --package for its own package
|
||||
matcha add sse # add a capability to your controller
|
||||
matcha graph # draw the dependency graph
|
||||
matcha explain /users/:id # one route's chain, in execution order
|
||||
@@ -111,6 +112,30 @@ and wire pieces into the right `@Module` array or controller. Edits are
|
||||
idempotent and revert themselves if they would break the file's syntax. Pass
|
||||
`--check` to `create` to type-check with your project's runtime afterward.
|
||||
|
||||
### `matcha create plugin`
|
||||
|
||||
An in-app plugin by default, or a package of its own.
|
||||
|
||||
```sh
|
||||
matcha create plugin "Plugin Algo" # plugins/plugin-algo/, registered in createApp
|
||||
matcha create plugin algo --folder lib/plugins
|
||||
matcha create plugin algo --package ./algo --scope acme # a JSR package
|
||||
matcha create plugin algo --package ./algo --scope acme --registry both # JSR + npm, ESM only
|
||||
```
|
||||
|
||||
In-app, each plugin gets a folder of its own under `plugins/` (or `--folder`, relative to the
|
||||
project root) and is registered in `createApp({ plugins })`. It lives in a folder so it can become
|
||||
a package later without being pulled out of the app.
|
||||
|
||||
`--package [DIR]` writes a package into `DIR`, or into the current directory, and either one has to
|
||||
be empty. JSR is the default, because it records which runtimes a package supports.
|
||||
`--registry both` adds npm with a `tsc` build to ESM only, and suggests the
|
||||
`@scope/green-tea-<name>` name without requiring it. The package passes `deno test`, `node --test`,
|
||||
`bun test` and `deno publish --dry-run` as generated.
|
||||
|
||||
At a terminal it asks for whatever the flags leave out. Without a terminal (CI, a pipe) it takes the
|
||||
defaults, and for anything that has no default it stops and names the flag to pass.
|
||||
|
||||
### `matcha doctor`
|
||||
|
||||
The checks whose failures are confusing rather than loud: `experimentalDecorators`
|
||||
|
||||
Reference in new issue
Block a user