Last active
November 27, 2023 13:28
-
-
Save o-az/d298a1776165407ba63ee763d32f7a89 to your computer and use it in GitHub Desktop.
Cloudflare Workers wrangler JSON schema (might not be complete)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "http://json-schema.org/draft-07/schema#", | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string", | |
"description": "The name of the project" | |
}, | |
"main": { | |
"type": "string", | |
"description": "The main script of the project (e.g., src/index.ts)" | |
}, | |
"compatibility_date": { | |
"type": "string", | |
"format": "date" | |
}, | |
"workers_dev": { | |
"type": "boolean" | |
}, | |
"placement": { | |
"type": "object", | |
"properties": { | |
"mode": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"mode" | |
] | |
}, | |
"compatibility_flags": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
}, | |
"description": "nodejs_compat is legacy. Use `--node-compat`" | |
}, | |
"node_compat": { | |
"type": "boolean" | |
}, | |
"vars": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9_]+$": { | |
"type": "string" | |
} | |
}, | |
"description": "Environment variables that are available to your code at runtime" | |
}, | |
"env": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9_]+$": { | |
"type": "object", | |
"properties": { | |
"vars": { | |
"type": "object", | |
"patternProperties": { | |
"^[a-zA-Z0-9_]+$": { | |
"type": "string" | |
} | |
}, | |
"description": "Environment variables that are available to your code at runtime" | |
}, | |
"d1_databases": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"database_id": { | |
"type": "string" | |
}, | |
"database_name": { | |
"type": "string" | |
}, | |
"preview_database_id": { | |
"type": "string" | |
}, | |
"migrations_table": { | |
"type": "string" | |
}, | |
"migrations_dir": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"database_id", | |
"database_name" | |
] | |
} | |
}, | |
"services": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"service": { | |
"type": "string" | |
}, | |
"environment": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"service" | |
] | |
} | |
}, | |
"kv_namespaces": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"id" | |
] | |
} | |
}, | |
"durable_objects": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"bindings": { | |
"type": "string" | |
}, | |
"class_name": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"bindings", | |
"class_name" | |
] | |
} | |
}, | |
"r2_buckets": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"bucket_name": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"bucket_name" | |
] | |
} | |
}, | |
"routes": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"bindings": { | |
"type": "string" | |
}, | |
"pattern": { | |
"type": "string" | |
}, | |
"script": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"bindings", | |
"pattern", | |
"script" | |
] | |
} | |
}, | |
"queues": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"zone_id": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"name", | |
"zone_id" | |
] | |
} | |
} | |
}, | |
"required": [] | |
} | |
} | |
}, | |
"services": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"service": { | |
"type": "string" | |
}, | |
"environment": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"service" | |
] | |
} | |
}, | |
"kv_namespaces": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"id": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"id" | |
] | |
} | |
}, | |
"durable_objects": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"bindings": { | |
"type": "string" | |
}, | |
"class_name": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"bindings", | |
"class_name" | |
] | |
} | |
}, | |
"r2_buckets": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"bucket_name": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"bucket_name" | |
] | |
} | |
}, | |
"hyperdrive": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"id": { | |
"type": "string" | |
}, | |
"binding": { | |
"type": "string" | |
}, | |
"localConnectionString": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding" | |
] | |
} | |
}, | |
"route": { | |
"type": [ | |
"object", | |
"string" | |
], | |
"properties": { | |
"pattern": { | |
"type": "string" | |
}, | |
"zone_name": { | |
"type": "string" | |
}, | |
"custom_domain": { | |
"type": "boolean" | |
} | |
}, | |
"required": [ | |
"pattern", | |
"custom_domain" | |
] | |
}, | |
"routes": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"bindings": { | |
"type": "string" | |
}, | |
"pattern": { | |
"type": "string" | |
}, | |
"script": { | |
"type": "string" | |
}, | |
"custom_domain": { | |
"type": "boolean" | |
}, | |
"zone_id": { | |
"type": "number" | |
}, | |
"zone_name": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"pattern" | |
] | |
} | |
}, | |
"queues": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"name": { | |
"type": "string" | |
}, | |
"zone_id": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"name", | |
"zone_id" | |
] | |
} | |
}, | |
"d1_databases": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"database_id": { | |
"type": "string" | |
}, | |
"database_name": { | |
"type": "string" | |
}, | |
"preview_database_id": { | |
"type": "string" | |
}, | |
"migrations_table": { | |
"type": "string" | |
}, | |
"migrations_dir": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"database_id", | |
"database_name" | |
] | |
} | |
}, | |
"migrations": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"deleted_classes": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"new_classes": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"tag": { | |
"type": "string" | |
}, | |
"renamed_classes": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"from": { | |
"type": "string" | |
}, | |
"to": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"from", | |
"to" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"deleted_classes", | |
"new_classes", | |
"tag", | |
"renamed_classes" | |
] | |
} | |
}, | |
"build": { | |
"type": "object", | |
"properties": { | |
"command": { | |
"type": "string" | |
}, | |
"cwd": { | |
"type": "string" | |
}, | |
"watch_dir": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"command" | |
] | |
}, | |
"dev": { | |
"type": "object", | |
"properties": { | |
"ip": { | |
"type": "string" | |
}, | |
"local_protocol": { | |
"type": "string" | |
}, | |
"port": { | |
"type": "integer" | |
} | |
}, | |
"required": [ | |
"ip", | |
"local_protocol", | |
"port" | |
] | |
}, | |
"site": { | |
"type": "object", | |
"properties": { | |
"bucket": { | |
"type": "string" | |
}, | |
"exclude": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"include": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"analytics_engine_datasets": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"dataset": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"dataset" | |
] | |
} | |
}, | |
"send_email": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"name": { | |
"type": "string" | |
}, | |
"type": { | |
"type": "string" | |
}, | |
"destination_address": { | |
"type": "string" | |
}, | |
"allowed_destination_addresses": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
} | |
}, | |
"required": [ | |
"name", | |
"type" | |
] | |
} | |
}, | |
"services": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"service": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"binding", | |
"service" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"bucket", | |
"exclude", | |
"include", | |
"analytics_engine_datasets", | |
"send_email", | |
"services" | |
] | |
}, | |
"triggers": { | |
"type": "object", | |
"properties": { | |
"crons": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"rules": { | |
"type": "array", | |
"items": { | |
"type": "object", | |
"properties": { | |
"fallthrough": { | |
"type": "boolean" | |
}, | |
"globs": { | |
"type": "array", | |
"items": { | |
"type": "string" | |
} | |
}, | |
"type": { | |
"type": "string" | |
} | |
}, | |
"required": [ | |
"fallthrough", | |
"globs", | |
"type" | |
] | |
} | |
} | |
}, | |
"required": [ | |
"crons", | |
"rules" | |
] | |
}, | |
"limits": { | |
"type": "object", | |
"properties": { | |
"cpu_ms": { | |
"type": "integer" | |
} | |
} | |
}, | |
"vectorize": { | |
"type": "object", | |
"properties": { | |
"binding": { | |
"type": "string" | |
}, | |
"index_name": { | |
"type": "string" | |
} | |
} | |
} | |
}, | |
"required": [ | |
"main" | |
] | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment