turbowarp-cloudflare-worker

Cloudflare Workers TypeScript/Hono generation support for the turbowarp-http-server family.

Blocks

Cloudflare handler [METHOD] [PATH] returns [BODY]

Creates a minimal HTTP handler IR JSON entry.

Cloudflare Worker [NAME] with handlers JSON [HANDLERS]

Creates a Worker IR JSON document from handler entries.

generated Cloudflare files JSON from IR [IR]

Runs the generator and returns GeneratedFile[] as JSON.

Target

The MVP target is Cloudflare Workers with TypeScript and Hono. External OAuth/OIDC providers and Cloudflare storage bindings are represented in the IR, while direct browser-side deploy is out of scope.

Architecture

See architecture.ja.md.

TurboWarp HTTP Server Cloudflare: complete block reference

All 9 blocks are documented below, including compatibility blocks and blocks available through optional features. Select a block to read its behavior, arguments, default values, and menu choices. Each block has a permanent link.

Cloudflare handler [METHOD] [PATH] returns [BODY]

Creates a minimal HTTP handler IR JSON entry for the Cloudflare generator.

Block type: REPORTER. Opcode: createHandlerIr. Permanent link

ArgumentTypeDefault valueMenu choices
METHODSTRINGGET
PATHSTRING/hello
BODYSTRINGHello from TurboWarp

このブロックの固定入力編集と互換性

Cloudflare Worker [NAME] with handlers JSON [HANDLERS]

Creates a deployable Worker IR JSON document from handler entries.

Block type: REPORTER. Opcode: createWorkerIr. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGtw-http-app
HANDLERSSTRING[]

generated Cloudflare files JSON from IR [IR]

Runs the Cloudflare Workers/Hono generator and returns GeneratedFile[] as JSON.

Block type: REPORTER. Opcode: generateFilesJson. Permanent link

ArgumentTypeDefault valueMenu choices
IRSTRING{"name":"tw-http-app","handlers":[]}

protected route [METHOD] [PATH] when unauthenticated [ON_UNAUTHENTICATED]

Creates an auth guard IR entry for a route protected by external OAuth/OIDC.

Block type: REPORTER. Opcode: createProtectedRouteIr. Permanent link

ArgumentTypeDefault valueMenu choices
METHODSTRINGGET
PATHSTRING/private
ON_UNAUTHENTICATEDSTRINGredirect-login

このブロックの固定入力編集と互換性

external OAuth/OIDC auth providers [PROVIDERS] protected routes JSON [PROTECTED_ROUTES]

Creates auth IR for Google, Microsoft, and GitHub account sign-in.

Block type: REPORTER. Opcode: createAuthIr. Permanent link

ArgumentTypeDefault valueMenu choices
PROVIDERSSTRINGgoogle,github
PROTECTED_ROUTESSTRING[]

API route [METHOD] [PATH] requires bearer token

Creates a protected route IR entry that requires a valid self-issued ES256 bearer JWT.

Block type: REPORTER. Opcode: createBearerRouteIr. Permanent link

ArgumentTypeDefault valueMenu choices
METHODSTRINGGET
PATHSTRING/api/items

このブロックの固定入力編集と互換性

API route [METHOD] [PATH] requires bearer role [ROLE]

Creates a bearer JWT protected route IR entry that also requires a role claim.

Block type: REPORTER. Opcode: createBearerRoleRouteIr. Permanent link

ArgumentTypeDefault valueMenu choices
METHODSTRINGPOST
PATHSTRING/api/admin
ROLESTRINGadmin

このブロックの固定入力編集と互換性

API route [METHOD] [PATH] requires bearer scope [SCOPE]

Creates a bearer JWT protected route IR entry that also requires one or more scopes.

Block type: REPORTER. Opcode: createBearerScopeRouteIr. Permanent link

ArgumentTypeDefault valueMenu choices
METHODSTRINGPOST
PATHSTRING/api/posts
SCOPESTRINGposts:write

このブロックの固定入力編集と互換性

Cloudflare Worker [NAME] with handlers JSON [HANDLERS] and auth JSON [AUTH]

Creates Worker IR with an external OAuth/OIDC auth policy.

Block type: REPORTER. Opcode: createWorkerIrWithAuth. Permanent link

ArgumentTypeDefault valueMenu choices
NAMESTRINGtw-http-app
HANDLERSSTRING[]
AUTHSTRING{"mode":"external-oauth-oidc","providers":["google"],"protectedRoutes":[]}

Repository guide and examples

固定入力の編集

対応GUIの固定入力機能は既定OFFです。既存値は開いただけでは変更せず、reporter接続は評価・置換しません。新しい選択と有限JSON数値入力のみを検証して保存し、既存の補正・丸め処理を維持します。機能OFFで従来の編集へ戻せます。

対象入力・Schemaの正本・互換性・切戻し