WC-6122 Prepare Preview group for generated API commands - #142
GregBrimble wants to merge 2 commits into
Conversation
| import type { SdkQuery, SdkRequest } from "#sdk"; | ||
| /** | ||
| * delete command | ||
| * @generated from apis/overlays/previews.ts |
There was a problem hiding this comment.
The generated Preview tree cannot survive the repository's canonical generation yet. generate.ts still pins Forge OpenAPI b7b98182e1e2a02a7e350ec6010a61a7af68cbef, while this PR supplies neither its Forge/OpenAPI update nor a generator source change; generation calls finalize(..., { clean: true }), so it replaces this hand-staged previews/ output. Update the published Forge/OpenAPI pin (and matching SDK when required), then run the normal generation before merging so the command, metadata, and tests remain present after CI regenerates the tree.
|
Review: 1 findings. 🤖 I've done a thorough review of your PR.
|
| "cf": minor | ||
| --- | ||
|
|
||
| Add `cf previews delete <name> --worker <worker>` to delete a Worker Preview through the generated API command tree. Use `--force` to skip confirmation and `--force-delete` to delete a Preview that is still referenced. |
There was a problem hiding this comment.
The release note still advertises --force-delete, but the generated command exposes --delete-with-references (and the follow-up test/metadata were renamed accordingly). Publishing this would direct users to an unknown option.
| Add `cf previews delete <name> --worker <worker>` to delete a Worker Preview through the generated API command tree. Use `--force` to skip confirmation and `--force-delete` to delete a Preview that is still referenced. | |
| Add `cf previews delete <name> --worker <worker>` to delete a Worker Preview through the generated API command tree. Use `--force` to skip confirmation and `--delete-with-references` to delete a Preview that is still referenced. |
|
🤖 I've done a thorough review of your PR. Adds generated Preview deletion and moves deployment beneath the generated root.
|
26f0933 to
3555080
Compare
commit: |
|
| mean | stddev | min | max | |
|---|---|---|---|---|
| PR | 330.4 ms | 6.0 ms | 323.8 ms | 350.0 ms |
| base | 332.3 ms | 7.9 ms | 321.3 ms | 348.9 ms |
Δ (PR vs base): ↓ -1.8 ms (-0.5%)
Measured with hyperfine on ubuntu-latest (3 warmup runs, 20 timed runs). CI numbers carry ±a few ms of runner jitter; treat small deltas as noise.
|
|
||
| builder: (yargs) => { | ||
| return yargs | ||
| .command($deploy) |
There was a problem hiding this comment.
This root only imports and registers the hand-written deploy leaf, so the advertised cf previews delete <name> --worker <worker> command is not present in this PR. Restore the published Forge CLI annotations in the pinned OpenAPI revision and regenerate the SDK/CLI so this index, metadata, and tests contain the generated deletion leaf; otherwise the change ships only a regrouped deployment workflow.
|
🤖 I've done a thorough review of your PR. Adds a synthetic generated
|
|
LGTM |
Move
cf previews deployinto a generated command group that the local registry creates when OpenAPI does not provide it. Future schema updates can add Preview API leaves to that same group without a root collision.This is prerequisite work only: the schema pin is unchanged and the generated group currently contains only
deploy. Merge this before publishing the schema change, so an independent pin bump is safe for group registration; DELETE output and invocation tests belong to that later bump.Validation: normal generation/build with the existing pin, typecheck, lint, formatting, and 60 focused tests passed. A separate proposed-schema generation check produced exactly
delete+deploywithout changing checked-in output.Precedence tests cover schema-root preservation, fallback creation, added-leaf collisions and coexistence, explicit hand-written leaf overrides, and parent description/visibility overrides.