WranglerCommand コンポーネントは、指定したコマンドで利用できるオプションをドキュメント化します。
これは cloudflare-docs リポジトリ ↗ の Wrangler バージョンを使って生成されます。
import { WranglerCommand } from "~/components";import { WranglerCommand } from "~/components";
<WranglerCommand
command="deploy"
description={"Deploy a [Worker](/workers/)"}
/>
<WranglerCommand command="d1 execute" />ExtraFlagDetails コンポーネントを使うと、特定フラグのヘルプテキストを追加または置き換えられます。
import { WranglerCommand } from "~/components";
import ExtraFlagDetails from "~/components/cf/ExtraFlagDetails.astro";
<WranglerCommand command="deploy">
<ExtraFlagDetails key="dry-run">
Additional details about the dry-run flag that will be appended to the
original help text. Here is a [link](https://cloudflare.com) for more
information.
</ExtraFlagDetails>
<ExtraFlagDetails key="compatibility-date" mode="replace">
Custom help text that completely replaces the original description for this
flag.
</ExtraFlagDetails>
</WranglerCommand>commandstringrequired- コマンドの名前です。例:
d1 execute。
- コマンドの名前です。例:
headingLevelboolean(default: 2) optional- ページ上でコマンド名を付ける見出しレベルです。例:
h2なら2。
- ページ上でコマンド名を付ける見出しレベルです。例:
descriptionstringoptional- コマンド見出しの下に表示する説明です。未設定の場合、Wrangler help API で指定された値がデフォルトになります。