UNPKG

@storm-software/cloudflare-tools

Version:

A Nx plugin package that contains various executors, generators, and utilities that assist in managing Cloudflare services.

149 lines (148 loc) 4.56 kB
{ "$schema": "http://json-schema.org/schema", "version": 2, "$id": "serve", "title": "Cloudflare Worker - Serve executor", "description": "Serve a worker locally for development using the Wrangler CLI", "type": "object", "properties": { "name": { "type": "string", "description": "Name of the Worker." }, "noBundle": { "type": "boolean", "default": false, "description": "Skip Wrangler’s build steps and show a preview of the script without modification. Particularly useful when using custom builds." }, "env": { "type": "string", "description": "Perform on a specific environment." }, "compatibilityDate": { "type": "string", "description": "A date in the form yyyy-mm-dd, which will be used to determine which version of the Workers runtime is used." }, "compatibilityFlags": { "type": "array", "items": { "type": "string" }, "description": "Flags to use for compatibility checks." }, "latest": { "type": "boolean", "default": true, "description": "Use the latest version of the Workers runtime." }, "ip": { "type": "string", "description": "IP address to listen on, defaults to localhost." }, "port": { "type": "number", "description": "Port to listen on.", "default": 8787 }, "inspectorPort": { "type": "number", "description": "Port for devtools to connect to." }, "routes": { "type": "array", "items": { "type": "string" }, "description": "Routes to upload." }, "host": { "type": "string", "description": "Host to forward requests to, defaults to the zone of the project." }, "localProtocol": { "type": "string", "enum": ["http", "https"], "default": "http", "description": "Protocol to listen to requests on." }, "localUpstream": { "type": "string", "description": "Host to act as origin in local mode, defaults to dev.host or route." }, "assets": { "type": "string", "description": "Root folder of static assets to be served. Unlike --site, --assets does not require a Worker script to serve your assets." }, "site": { "type": "string", "description": "Root folder of static assets for Workers Sites." }, "siteInclude": { "type": "array", "items": { "type": "string" }, "description": "Array of .gitignore-style patterns that match file or directory names from the sites directory. Only matched items will be uploaded." }, "siteExclude": { "type": "array", "items": { "type": "string" }, "description": "Array of .gitignore-style patterns that match file or directory names from the sites directory. Matched items will not be uploaded." }, "upstreamProtocol": { "type": "string", "enum": ["http", "https"], "default": "https", "description": "Protocol to forward requests to host on." }, "var": { "type": "array", "items": { "type": "string" }, "description": "Array of key:value pairs to inject as variables into your code. The value will always be passed as a string to your Worker." }, "define": { "type": "array", "items": { "type": "string" }, "description": "Array of key:value pairs to replace global identifiers in your code." }, "tsconfig": { "type": "string", "description": "Path to a custom tsconfig.json file." }, "minify": { "type": "boolean", "description": "Minify the script." }, "nodeCompat": { "type": "boolean", "description": "Enable node.js compatibility." }, "persistTo": { "type": "string", "description": "Specify directory to use for local persistence." }, "remote": { "type": "boolean", "default": false, "description": "Develop against remote resources and data stored on Cloudflare’s network." }, "testScheduled": { "type": "boolean", "default": false, "description": "Exposes a /__scheduled fetch route which will trigger a scheduled event (cron trigger) for testing during development." }, "logLevel": { "type": "string", "enum": ["debug", "info", "log", "warn", "error", "none"], "default": "log", "description": "Specify Wrangler’s logging level." } }, "required": [] }