@@ -580,267 +580,16 @@ If sampling persists after using options to filter messages, consider using [ins
580580
581581Configure Cloudflare Pages.
582582
583- ### ` dev `
584-
585- Develop your full-stack Pages application locally.
586-
587- ``` txt
588- wrangler pages dev [<DIRECTORY>] [OPTIONS]
589- ```
590-
591- - ` DIRECTORY ` <Type text = " string" /> <MetaInfo text = " optional" />
592- - The directory of static assets to serve.
593- - ` --local ` <Type text = " boolean" /> <MetaInfo text = " optional (default: true)" />
594- - Run on your local machine.
595- - ` --ip ` <Type text = " string" /> <MetaInfo text = " optional" />
596- - IP address to listen on, defaults to ` localhost ` .
597- - ` --port ` <Type text = " number" /> <MetaInfo text = " optional (default: 8788)" />
598- - The port to listen on (serve from).
599- - ` --config ` , ` -c ` <Type text = " string[]" /> <MetaInfo text = " optional" />
600- - Path(s) to [ Wrangler configuration file] ( /workers/wrangler/configuration/ ) . If not provided, Wrangler will use the nearest config file based on your current working directory.
601- - You can provide additional configuration files in order to run Workers alongside your Pages project, like this: ` wrangler pages dev -c ./wrangler.toml -c ../other-worker/wrangler.toml ` . The first argument must point to your Pages configuration file, and the subsequent configurations will be accessible via a Service binding from your Pages project.
602- - ` --binding ` <Type text = " string[]" /> <MetaInfo text = " optional" />
603- - Bind an environment variable or secret (for example, ` --binding <VARIABLE_NAME>=<VALUE> ` ).
604- - ` --kv ` <Type text = " string[]" /> optional
605- - Binding name of [ KV namespace] ( /kv/ ) to bind (for example, ` --kv <BINDING_NAME> ` ).
606- - ` --r2 ` <Type text = " string[]" /> <MetaInfo text = " optional" />
607- - Binding name of [ R2 bucket] ( /pages/functions/bindings/#interact-with-your-r2-buckets-locally ) to bind (for example, ` --r2 <BINDING_NAME> ` ).
608- - ` --d1 ` <Type text = " string[]" /> <MetaInfo text = " optional" />
609- - Binding name of [ D1 database] ( /pages/functions/bindings/#interact-with-your-d1-databases-locally ) to bind (for example, ` --d1 <BINDING_NAME> ` ).
610- - ` --do ` <Type text = " string[]" /> <MetaInfo text = " optional" />
611- - Binding name of Durable Object to bind (for example, ` --do <BINDING_NAME>=<CLASS> ` ).
612- - ` --live-reload ` <Type text = " boolean" /> <MetaInfo text = " optional (default: false)" />
613- - Auto reload HTML pages when change is detected.
614- - ` --compatibility-flag ` <Type text = " string[]" /> <MetaInfo text = " optional" />
615- - Runtime compatibility flags to apply.
616- - ` --compatibility-date ` <Type text = " string" /> <MetaInfo text = " optional" />
617- - Runtime compatibility date to apply.
618- - ` --show-interactive-dev-session ` <Type text = " boolean" /> <MetaInfo text = " optional (default: true if the terminal supports interactivity)" />
619- - Show the interactive dev session.
620- - ` --https-key-path ` <Type text = " string" /> <MetaInfo text = " optional" />
621- - Path to a custom certificate key.
622- - ` --https-cert-path ` <Type text = " string" /> <MetaInfo text = " optional" />
623- - Path to a custom certificate.
624-
625- <Render file = " wrangler-commands/global-flags" product = " workers" />
626-
627- ### ` download config `
628-
629- Download your Pages project config as a [ Wrangler configuration file] ( /workers/wrangler/configuration/ ) .
630-
631- ``` txt
632- wrangler pages download config <PROJECT_NAME>
633- ```
634-
635- <Render file = " wrangler-commands/global-flags" product = " workers" />
636-
637- ### ` project list `
638-
639- List your Pages projects.
640-
641- ``` txt
642- wrangler pages project list
643- ```
644-
645- <Render file = " wrangler-commands/global-flags" product = " workers" />
646-
647- ### ` project create `
648-
649- Create a new Cloudflare Pages project.
650-
651- ``` txt
652- wrangler pages project create <PROJECT_NAME> [OPTIONS]
653- ```
654-
655- - ` PROJECT_NAME ` <Type text = " string" /> <MetaInfo text = " required" />
656- - The name of your Pages project.
657- - ` --production-branch ` <Type text = " string" /> <MetaInfo text = " optional" />
658- - The name of the production branch of your project.
659-
660- <Render file = " wrangler-commands/global-flags" product = " workers" />
661-
662- ### ` project delete `
663-
664- Delete a Cloudflare Pages project.
665-
666- ``` txt
667- wrangler pages project delete <PROJECT_NAME> [OPTIONS]
668- ```
669-
670- - ` PROJECT_NAME ` <Type text = " string" /> <MetaInfo text = " required" />
671- - The name of the Pages project to delete.
672- - ` --yes ` <Type text = " boolean" /> <MetaInfo text = " optional" />
673- - Answer ` "yes" ` to confirmation prompt.
674-
675- <Render file = " wrangler-commands/global-flags" product = " workers" />
676-
677- ### ` deployment list `
678-
679- List deployments in your Cloudflare Pages project.
680-
681- ``` txt
682- wrangler pages deployment list [--project-name <PROJECT_NAME>]
683- ```
684-
685- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
686- - The name of the project you would like to list deployments for.
687- - ` --environment ` <Type text = " 'production'|'preview'" /> <MetaInfo text = " optional" />
688- - Environment type to list deployments for.
689- - ` --json ` <Type text = " boolean" /> <MetaInfo text = " optional" />
690- - Whether to output the list in JSON format.
691-
692- <Render file = " wrangler-commands/global-flags" product = " workers" />
693-
694- ### ` deployment tail `
695-
696- Start a session to livestream logs from your deployed Pages Functions.
697-
698- ``` txt
699- wrangler pages deployment tail [<DEPLOYMENT>] [OPTIONS]
700- ```
701-
702- - ` DEPLOYMENT ` <Type text = " string" /> <MetaInfo text = " optional" />
703- - ID or URL of the deployment to tail. Specify by environment if deployment ID is unknown.
704- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
705- - The name of the project you would like to tail.
706- - ` --environment ` <Type text = " 'production'|'preview'" /> <MetaInfo text = " optional" />
707- - When not providing a specific deployment ID, specifying environment will grab the latest production or preview deployment.
708- - ` --format ` <Type text = " 'json'|'pretty'" /> <MetaInfo text = " optional" />
709- - The format of the log entries.
710- - ` --status ` <Type text = " 'ok'|'error'|'canceled'" /> <MetaInfo text = " optional" />
711- - Filter by invocation status.
712- - ` --header ` <Type text = " string" /> <MetaInfo text = " optional" />
713- - Filter by HTTP header.
714- - ` --method ` <Type text = " string" /> <MetaInfo text = " optional" />
715- - Filter by HTTP method.
716- - ` --sampling-rate ` <Type text = " number" /> <MetaInfo text = " optional" />
717- - Add a percentage of requests to log sampling rate.
718- - ` --search ` <Type text = " string" /> <MetaInfo text = " optional" />
719- - Filter by a text match in ` console.log ` messages.
720- - ` --ip ` <Type text = " (string|'self')\[]" /> <MetaInfo text = " optional" />
721- - Filter by the IP address the request originates from. Use ` "self" ` to show only messages from your own IP.
722-
723- <Render file = " wrangler-commands/global-flags" product = " workers" />
724-
725- :::note
583+ <WranglerNamespace namespace = " pages" headingLevel = { 3 } />
726584
585+ { /* :::note[Deployment tail]
727586Filtering with `--ip self` will allow tailing your deployed Functions beyond the normal request per second limits.
728587:::
729588
730- After starting ` wrangler pages deployment tail ` , you will receive a live stream of console and exception logs for each request your Functions receive.
731-
732- ### ` deploy `
733-
734- Deploy a directory of static assets as a Pages deployment.
735-
736- ``` txt
737- wrangler pages deploy <BUILD_OUTPUT_DIRECTORY> [OPTIONS]
738- ```
739-
740- - ` BUILD_OUTPUT_DIRECTORY ` <Type text = " string" /> <MetaInfo text = " optional" />
741- - The [ directory] ( /pages/configuration/build-configuration/#framework-presets ) of static files to upload. As of Wrangler 3.45.0, this is only required when your Pages project does not have a Wrangler file. Refer to the [ Pages Functions configuration guide] ( /pages/functions/wrangler-configuration/ ) for more information.
742- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
743- - The name of the project you want to deploy to.
744- - ` --branch ` <Type text = " string" /> <MetaInfo text = " optional" />
745- - The name of the branch you want to deploy to.
746- - ` --commit-hash ` <Type text = " string" /> <MetaInfo text = " optional" />
747- - The SHA to attach to this deployment.
748- - ` --commit-message ` <Type text = " string" /> <MetaInfo text = " optional" />
749- - The commit message to attach to this deployment.
750- - ` --commit-dirty ` <Type text = " boolean" /> <MetaInfo text = " optional" />
751- - Whether or not the workspace should be considered dirty for this deployment.
752-
753- <Render file = " wrangler-commands/global-flags" product = " workers" />
754-
755- :::note
756-
589+ :::[Deploy]
757590Your site is deployed to `<PROJECT_NAME>.pages.dev`. If you do not provide the `--project-name` argument, you will be prompted to enter a project name in your terminal after you run the command.
591+ ::: */ }
758592
759- :::
760-
761- ### ` secret put `
762-
763- Create or update a secret for a Pages project.
764-
765- ``` txt
766- wrangler pages secret put <KEY> [OPTIONS]
767- ```
768-
769- - ` KEY ` <Type text = " string" /> <MetaInfo text = " required" />
770- - The variable name for this secret to be accessed in the Pages project.
771- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
772- - The name of your Pages project.
773-
774- <Render file = " wrangler-commands/global-flags" product = " workers" />
775-
776- ### ` secret delete `
777-
778- Delete a secret from a Pages project.
779-
780- ``` txt
781- wrangler pages secret delete <KEY> [OPTIONS]
782- ```
783-
784- - ` KEY ` <Type text = " string" /> <MetaInfo text = " required" />
785- - The variable name for this secret to be accessed in the Pages project.
786- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
787- - The name of your Pages project.
788-
789- <Render file = " wrangler-commands/global-flags" product = " workers" />
790-
791- ### ` secret list `
792-
793- List the names of all the secrets for a Pages project.
794-
795- ``` txt
796- wrangler pages secret list [OPTIONS]
797- ```
798-
799- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
800- - The name of your Pages project.
801-
802- <Render file = " wrangler-commands/global-flags" product = " workers" />
803-
804- ### ` secret bulk `
805-
806- Upload multiple secrets for a Pages project at once.
807-
808- ``` txt
809- wrangler pages secret bulk [<FILENAME>] [OPTIONS]
810- ```
811-
812- - ` FILENAME ` <Type text = " string" /> <MetaInfo text = " optional" />
813- - A file containing either [ JSON] ( https://www.json.org/json-en.html ) or the [ .env] ( https://www.dotenv.org/docs/security/env ) format
814- - The JSON file containing key-value pairs to upload as secrets, in the form ` {"SECRET_NAME": "secret value", ...} ` .
815- - The ` .env ` file containing [ key-value pairs to upload as secrets] ( /workers/configuration/secrets/#local-development-with-secrets ) , in the form ` SECRET_NAME=secret value ` .
816- - If omitted, Wrangler expects to receive input from ` stdin ` rather than a file.
817- - ` --project-name ` <Type text = " string" /> <MetaInfo text = " optional" />
818- - The name of your Pages project.
819-
820- <Render file = " wrangler-commands/global-flags" product = " workers" />
821-
822- ### ` functions build `
823-
824- Compile a folder of Pages Functions into a single Worker.
825-
826- ``` txt
827- wrangler pages functions build [<DIRECTORY>] [OPTIONS]
828- ```
829-
830- - ` DIRECTORY ` <Type text = " string" /> <MetaInfo text = " optional (default: `functions`)" />
831- - The directory of Pages Functions.
832- - ` --outdir ` <Type text = " string" /> <MetaInfo text = " optional" />
833- - Output directory for the bundled Worker.
834- - ` --fallback-service ` <Type text = " string" /> <MetaInfo text = " optional (default: `ASSETS`)" />
835- - The service to fallback to at the end of the ` next ` chain. Setting to ` '' ` will fallback to the global ` fetch ` .
836- - ` --compatibility-date ` <Type text = " string" /> <MetaInfo text = " optional" />
837- - Date to use for compatibility checks.
838- - ` --compatibility-flags ` <Type text = " string[]" /> <MetaInfo text = " optional" />
839- - Flags to use for compatibility checks.
840- - ` --metafile ` <Type text = " string" /> <MetaInfo text = " optional" />
841- - Specify a file to write the build metadata from esbuild to. If flag is used without a path string, this defaults to ` bundle-meta.json ` inside the directory specified by ` --outdir ` . This can be useful for understanding the bundle size.
842-
843- <Render file = " wrangler-commands/global-flags" product = " workers" />
844593
845594---
846595
0 commit comments