diff --git a/src/components/WranglerCommand.astro b/src/components/WranglerCommand.astro index 541590d53a5095..97a2cf96f15ffb 100644 --- a/src/components/WranglerCommand.astro +++ b/src/components/WranglerCommand.astro @@ -29,10 +29,11 @@ function getCommand(path: string) { const props = z.object({ command: z.string(), - headingLevel: z.number().default(2) + headingLevel: z.number().default(2), + description: z.string().optional(), }); -let { command, headingLevel } = props.parse(Astro.props); +let { command, headingLevel, description } = props.parse(Astro.props); const definition = getCommand(command); @@ -45,11 +46,12 @@ const { globalFlags } = experimental_getWranglerCommands(); const positionals = definition.positionalArgs ?.map((p) => `[${p.toUpperCase()}]`) .join(" "); - --- +

{description ? description : definition.metadata.description}

+ - The name of the command, i.e `d1 execute`. - `headingLevel` - - The heading level that the command name should be added at on the page, i.e `2` for a `h2`. \ No newline at end of file + - The heading level that the command name should be added at on the page, i.e `2` for a `h2`. +- `description` + - A description to render below the command heading. If not set, defaults to the value specified in the Wrangler help API. \ No newline at end of file diff --git a/src/content/docs/workers/wrangler/commands.mdx b/src/content/docs/workers/wrangler/commands.mdx index 49cdbb968333d9..1a08fcd5d65b75 100644 --- a/src/content/docs/workers/wrangler/commands.mdx +++ b/src/content/docs/workers/wrangler/commands.mdx @@ -14,6 +14,7 @@ import { Type, MetaInfo, WranglerConfig, + WranglerCommand, WranglerNamespace, PackageManagers, } from "~/components"; @@ -99,18 +100,9 @@ You can then run them using your package manager of choice: --- -## `docs` + -Open the Cloudflare developer documentation in your default browser. - -```txt -wrangler docs [] -``` - -- `COMMAND` - - The Wrangler command you want to learn more about. This opens your default browser to the section of the documentation that describes the command. - - +--- ## `init` @@ -898,34 +890,7 @@ wrangler workflows trigger [OPTIONS] wrangler workflows trigger my-workflow '{"hello":"world"}' ``` -## `tail` - -Start a session to livestream logs from a deployed Worker. - -```txt -wrangler tail [OPTIONS] -``` - -- `WORKER` - - The name of your Worker or the route the Worker is running on. -- `--format` - - The format of the log entries. -- `--status` - - Filter by invocation status. -- `--header` - - Filter by HTTP header. -- `--method` - - Filter by HTTP method. -- `--sampling-rate` - - Add a fraction of requests to log sampling rate (between `0` and `1`). -- `--search` - - Filter by a text match in `console.log` messages. -- `--ip` " - - Filter by the IP address the request originates from. Use `"self"` to show only messages from your own IP. -- `--version-id` - - Filter by Worker version. - - + After starting `wrangler tail`, you will receive a live feed of console and exception logs for each request your Worker receives. @@ -1299,15 +1264,7 @@ If you are using `CLOUDFLARE_API_TOKEN` instead of OAuth, and you can logout by --- -## `whoami` - -Retrieve your user information and test your authentication configuration. - -```txt -wrangler whoami -``` - - + --- diff --git a/src/content/partials/workers/wrangler-commands/kv.mdx b/src/content/partials/workers/wrangler-commands/kv.mdx index 1f711aa1cc5630..73a0780c46fb6b 100644 --- a/src/content/partials/workers/wrangler-commands/kv.mdx +++ b/src/content/partials/workers/wrangler-commands/kv.mdx @@ -62,8 +62,4 @@ Since version 3.60.0, Wrangler supports the `kv ...` syntax. If you are using ve - - -## Global flags - - \ No newline at end of file + \ No newline at end of file