@kubohiroya/turbowarp-cloudflare-worker 0.5.0 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +9 -0
- package/README.md +10 -0
- package/docs/index.html +3 -0
- package/package.json +13 -6
package/README.ja.md
CHANGED
|
@@ -8,6 +8,15 @@
|
|
|
8
8
|
|
|
9
9
|
このリポジトリは `turbowarp-http-server` 本体から分離した Cloudflare 連携パッケージです。本体はブロック側の HTTP サーバ表現とローカル実行を担い、このパッケージは Cloudflare Workers へ持ち出すための IR、コード生成、CLI、将来的なデプロイ補助ブロックを担います。
|
|
10
10
|
|
|
11
|
+
## 実行できるサンプル
|
|
12
|
+
|
|
13
|
+
[**TurboWarp Editorでデモを開く**](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-cloudflare-worker%2Fsamples%2Fgenerate-hello-worker.sb3) · [SB3をダウンロード](https://kubohiroya.github.io/turbowarp-cloudflare-worker/samples/generate-hello-worker.sb3)
|
|
14
|
+
|
|
15
|
+
**Allow**で読み込みを許可し、緑の旗を押します。
|
|
16
|
+
`createHandlerIr`・`createWorkerIr`・`generateFilesJson`でGET /hello用ファイルを生成。サンプルの元データと期待結果は[`samples/README.md`](samples/README.md)に記載しています。
|
|
17
|
+
|
|
18
|
+
`pnpm run samples:build`でSB3を再生成し、`pnpm run samples:check`で更新漏れと生成処理を確認します。
|
|
19
|
+
|
|
11
20
|
## MVP 範囲
|
|
12
21
|
|
|
13
22
|
- Cloudflare Workers + TypeScript + Hono を生成対象にする。
|
package/README.md
CHANGED
|
@@ -8,6 +8,16 @@ English | [日本語](README.ja.md)
|
|
|
8
8
|
|
|
9
9
|
The MVP target is Cloudflare Workers + TypeScript + Hono. Authentication is expected to use external OAuth/OIDC providers such as Google, Microsoft, or GitHub. Apple sign-in is intentionally out of scope for the MVP. Persistent storage is represented through Cloudflare D1, KV, R2, and Durable Objects bindings.
|
|
10
10
|
|
|
11
|
+
## Runnable sample
|
|
12
|
+
|
|
13
|
+
[**Open the demo in TurboWarp Editor**](https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-cloudflare-worker%2Fsamples%2Fgenerate-hello-worker.sb3) · [Download the SB3](https://kubohiroya.github.io/turbowarp-cloudflare-worker/samples/generate-hello-worker.sb3)
|
|
14
|
+
|
|
15
|
+
Choose **Allow** and click the green flag.
|
|
16
|
+
Both generated-route and response checks are true. The full Worker files JSON is stored in a hidden variable.
|
|
17
|
+
|
|
18
|
+
Editable sources and expected results: [`samples/README.md`](samples/README.md).
|
|
19
|
+
Run `pnpm run samples:build` after source/bundle changes and `pnpm run samples:check` before committing.
|
|
20
|
+
|
|
11
21
|
## MVP Scope
|
|
12
22
|
|
|
13
23
|
- Shared `CloudflareWorkerIr` types for blocks and CLI.
|
package/docs/index.html
CHANGED
|
@@ -38,6 +38,9 @@
|
|
|
38
38
|
|
|
39
39
|
<h2>Architecture</h2>
|
|
40
40
|
<p>See <a href="architecture.ja.md">architecture.ja.md</a>.</p>
|
|
41
|
+
<section id="runnable-sample"><h2>Runnable sample / 実行できるサンプル</h2>
|
|
42
|
+
<p><a href="https://turbowarp.org/editor?project_url=https%3A%2F%2Fkubohiroya.github.io%2Fturbowarp-cloudflare-worker%2Fsamples%2Fgenerate-hello-worker.sb3">Open in TurboWarp Editor</a> · <a href="https://kubohiroya.github.io/turbowarp-cloudflare-worker/samples/generate-hello-worker.sb3">Download generate-hello-worker.sb3</a></p>
|
|
43
|
+
<p>Both generated-route and response checks are true. The full Worker files JSON is stored in a hidden variable.</p><p>Allowで読み込みを許可し、緑の旗を押します。</p></section>
|
|
41
44
|
<!-- BEGIN COMPLETE BLOCK REFERENCE -->
|
|
42
45
|
<section lang="en" id="extension-block-reference" aria-labelledby="block-reference-title">
|
|
43
46
|
<h2 id="block-reference-title">TurboWarp HTTP Server Cloudflare: complete block reference</h2>
|
package/package.json
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubohiroya/turbowarp-cloudflare-worker",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Cloudflare Workers TypeScript generator and TurboWarp extension bridge for turbowarp-http-server.",
|
|
5
|
-
"author":
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Hiroya Kubo",
|
|
7
|
+
"email": "hiroya@cuc.ac.jp",
|
|
8
|
+
"url": "https://github.com/kubohiroya"
|
|
9
|
+
},
|
|
6
10
|
"license": "MPL-2.0",
|
|
7
11
|
"homepage": "https://github.com/kubohiroya/turbowarp-cloudflare-worker#readme",
|
|
8
12
|
"repository": {
|
|
@@ -58,20 +62,23 @@
|
|
|
58
62
|
"test": "vitest run",
|
|
59
63
|
"repo:check": "node scripts/check-repo.ts",
|
|
60
64
|
"pack:check": "npm pack --dry-run --ignore-scripts",
|
|
61
|
-
"check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run check:dist && pnpm run repo:check && pnpm run pack:check",
|
|
62
|
-
"check:dist": "pnpm run build"
|
|
65
|
+
"check": "pnpm run typecheck && pnpm run lint && pnpm run test && pnpm run check:dist && pnpm run repo:check && pnpm run pack:check && pnpm run samples:check",
|
|
66
|
+
"check:dist": "pnpm run build",
|
|
67
|
+
"samples:build": "node scripts/build-samples.mjs",
|
|
68
|
+
"samples:check": "node scripts/build-samples.mjs --check && node --test scripts/verify-samples.mjs",
|
|
69
|
+
"pages:build": "node scripts/prepare-pages.mjs"
|
|
63
70
|
},
|
|
64
71
|
"bin": {
|
|
65
72
|
"turbowarp-cloudflare-worker": "./dist/cli.js"
|
|
66
73
|
},
|
|
67
74
|
"dependencies": {
|
|
68
75
|
"hono": "^4.10.7",
|
|
69
|
-
"@kubohiroya/turbowarp-extension-data-editor": "^0.
|
|
76
|
+
"@kubohiroya/turbowarp-extension-data-editor": "^0.5.0"
|
|
70
77
|
},
|
|
71
78
|
"devDependencies": {
|
|
72
79
|
"@cloudflare/workers-types": "^5.20260826.1",
|
|
73
80
|
"@eslint/js": "^9.39.5",
|
|
74
|
-
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.
|
|
81
|
+
"@kubohiroya/vite-plugin-turbowarp-extension": "^0.10.0",
|
|
75
82
|
"@types/node": "^24.13.3",
|
|
76
83
|
"eslint": "^9.39.5",
|
|
77
84
|
"typescript": "^5.9.3",
|