|
| 1 | +--- |
| 2 | +"@objectstack/cli": patch |
| 3 | +--- |
| 4 | + |
| 5 | +docs(cli): give the two `plugin` artifacts their own nouns, and rewrite "Which scaffolder?" as a two-question decision (#16484, #15531) |
| 6 | + |
| 7 | +`plugin` names two different artifacts in this CLI, and neither the help text |
| 8 | +nor the docs said which one a reader was about to get: |
| 9 | + |
| 10 | +- `os init <name> -t plugin` scaffolds a **metadata package** — declarative |
| 11 | + objects another stack loads, built by `objectstack compile`, emitted |
| 12 | + `private: true`. |
| 13 | +- `os create plugin <name>` scaffolds a **kernel code plugin** — TypeScript |
| 14 | + implementing the kernel `Plugin` contract, built by `tsc`, publishable as |
| 15 | + `@objectstack/plugin-<name>`. |
| 16 | + |
| 17 | +Someone who wanted a "plugin skeleton" and reached for the nearer of the two got |
| 18 | +the wrong artifact, with no failure anywhere to tell them so — the metadata |
| 19 | +package has no `Plugin` to implement, and the kernel code plugin has no |
| 20 | +declarative objects to compile. |
| 21 | + |
| 22 | +**No flag and no subcommand is renamed.** `-t plugin` and `os create plugin` are |
| 23 | +published surface and are spelled exactly as before; renaming them is a separate |
| 24 | +decision, not this change. What moved is the NOUN each surface uses for the |
| 25 | +artifact, so the two shapes stop sharing one word: |
| 26 | + |
| 27 | +- `os init --help` now reads `Template: app, plugin (a metadata package), empty`, |
| 28 | + and the `plugin` template describes itself as |
| 29 | + `Metadata package: declarative objects another stack loads` rather than |
| 30 | + `Reusable plugin with objects`. |
| 31 | +- `os create`'s `plugin` template describes itself as a **kernel code** plugin. |
| 32 | + |
| 33 | +The "Which scaffolder?" guidance in `content/docs/deployment/cli.mdx` is now a |
| 34 | +two-question decision — *metadata or kernel code?* then *a new project, or an |
| 35 | +addition to a directory you already have?* — landing on exactly one of the four |
| 36 | +entry points, each with the reason to pick it: `npm create objectstack@latest` |
| 37 | +(equivalently `npx create-objectstack`), `os init`, `os init <name> -t plugin`, |
| 38 | +and `os create plugin <name>`. `os create example` is deliberately absent: it was |
| 39 | +retired in #16483. |
0 commit comments