Skip to content

Conversation

@KianNH
Copy link
Member

@KianNH KianNH commented Oct 18, 2024

Summary

Add WranglerCommand components.

There is a scripts/wrangler-commands-json.ts file which parses the --help output of each Wrangler command, and creates a JSON file. This is hopefully a short term solution, as Wrangler moves towards providing it's own structured data: cloudflare/workers-sdk#6526

The WranglerCommand component reads from this JSON file.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 18, 2024

Deploying cloudflare-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: a7c4c90
Status: ✅  Deploy successful!
Preview URL: https://b0e1e67e.cloudflare-docs-7ou.pages.dev
Branch Preview URL: https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev

View logs

@github-actions
Copy link
Contributor

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/workers/wrangler/commands/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/wrangler/commands/
https://developers.cloudflare.com/style-guide/components/wrangler-command/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/style-guide/components/wrangler-command/
https://developers.cloudflare.com/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/tutorials/create-finetuned-chatgpt-ai-models-with-r2/
https://developers.cloudflare.com/workers/tutorials/github-sms-notifications-using-twilio/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/tutorials/github-sms-notifications-using-twilio/
https://developers.cloudflare.com/ai-gateway/tutorials/deploy-aig-worker/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/ai-gateway/tutorials/deploy-aig-worker/
https://developers.cloudflare.com/workers/tutorials/build-a-jamstack-app/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/tutorials/build-a-jamstack-app/
https://developers.cloudflare.com/workers/tutorials/openai-function-calls-workers/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/tutorials/openai-function-calls-workers/
https://developers.cloudflare.com/workers/wrangler/configuration/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/wrangler/configuration/
https://developers.cloudflare.com/workers/wrangler/deprecations/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/wrangler/deprecations/
https://developers.cloudflare.com/workers/wrangler/environments/ https://kian-pcx-14259.cloudflare-docs-7ou.pages.dev/workers/wrangler/environments/

@irvinebroque
Copy link
Contributor

This is very cool. Who is reviewing?

@haleycode haleycode added the DevRel Tasks that need support from developer relations. label Oct 24, 2024
@pedrosousa
Copy link
Contributor

@bllchmbrs FYI - Here's some work being done do improve Wrangler commands' docs you may want to be aware of.

```

### `delete`
{/* <WranglerCommand cmd="secret delete" /> */}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

?

@GregBrimble
Copy link
Contributor

Optional positionals are colored differently to required positionals. Is that intentional?

image

vs.

image

Copy link
Contributor

@GregBrimble GregBrimble left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You've dropped secret delete, at least (I didn't give content the most intense of reviews — Wrangler team are best placed as owners to spot anything awry there).

Regex parsing looks like it was a pain and a half, so kudos on that working and looking as good as it does. But hopefully we can get something more useful from Wrangler in the future. This script is only going to become more brittle as time goes on without it.

@KianNH KianNH requested a review from a team as a code owner November 6, 2024 12:13
Copy link
Contributor

@hyperlint-ai hyperlint-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

10 files reviewed, 1 total issue(s) found.

It may take up to 1 minute (60 seconds) for a tail to exit sampling mode after adding an option to filter tail messages.
:::

If sampling persists after using options to filter messages, consider using [instant logs](https://developers.cloudflare.com/logs/instant-logs/).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If sampling persists after using options to filter messages, consider using [instant logs](https://developers.cloudflare.com/logs/instant-logs/).
If sampling persists after using options to filter messages, consider using [instant logs](/logs/instant-logs/).

Issues:

  • Style Guide - (cloudflare.LinkChecks-warning) Warning: When referring to another page in our docs, use the full relative link (/1.1.1.1/check/) instead of the full URL (https://developers.cloudflare.com/1.1.1.1/check/) or a local development link (http://localhost:111/1.1.1.1/check/).

Fix Explanation:

The issue identified is related to the use of a full URL instead of a relative link. According to the style guide, we should use relative links when referring to other pages within the documentation. I've replaced the full URL with a relative path to adhere to this guideline.

@KianNH KianNH marked this pull request as draft November 6, 2024 15:35
@KianNH KianNH closed this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

DevRel Tasks that need support from developer relations. product:ai-gateway AI Gateway: https://developers.cloudflare.com/ai-gateway/ product:style-guide product:workers Related to Workers product size/xl

Projects

None yet

Development

Successfully merging this pull request may close these issues.