create-cloudflare 2.72.12 → 2.73.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/dist/cli.js +895 -628
- package/package.json +7 -7
- package/templates/analog/c3.ts +1 -0
- package/templates/angular/pages/c3.ts +1 -0
- package/templates/angular/workers/c3.ts +1 -0
- package/templates/django/c3.ts +19 -0
- package/templates/django/py/.python-version +1 -0
- package/templates/django/py/README.md +14 -0
- package/templates/django/py/__dot__gitignore +7 -0
- package/templates/django/py/package.json +13 -0
- package/templates/django/py/pyproject.toml +10 -0
- package/templates/django/py/src/django_app/__init__.py +0 -0
- package/templates/django/py/src/django_app/settings.py +11 -0
- package/templates/django/py/src/django_app/urls.py +9 -0
- package/templates/django/py/src/django_app/wsgi.py +7 -0
- package/templates/django/py/src/entry.py +12 -0
- package/templates/django/py/wrangler.jsonc +9 -0
- package/templates/docusaurus/pages/c3.ts +1 -0
- package/templates/docusaurus/workers/c3.ts +1 -0
- package/templates/fastapi/c3.ts +19 -0
- package/templates/fastapi/py/.python-version +1 -0
- package/templates/fastapi/py/README.md +14 -0
- package/templates/fastapi/py/__dot__gitignore +7 -0
- package/templates/fastapi/py/package.json +13 -0
- package/templates/fastapi/py/pyproject.toml +10 -0
- package/templates/fastapi/py/src/entry.py +14 -0
- package/templates/fastapi/py/wrangler.jsonc +9 -0
- package/templates/flask/c3.ts +19 -0
- package/templates/flask/py/.python-version +1 -0
- package/templates/flask/py/README.md +14 -0
- package/templates/flask/py/__dot__gitignore +7 -0
- package/templates/flask/py/package.json +13 -0
- package/templates/flask/py/pyproject.toml +10 -0
- package/templates/flask/py/src/entry.py +14 -0
- package/templates/flask/py/wrangler.jsonc +9 -0
- package/templates/gatsby/pages/c3.ts +1 -0
- package/templates/gatsby/workers/c3.ts +1 -0
- package/templates/hello-world-assets-only/c3.ts +1 -0
- package/templates/hono/pages/c3.ts +1 -0
- package/templates/hono/workers/c3.ts +1 -0
- package/templates/next/c3.ts +1 -0
- package/templates/next/experimental_c3.ts +1 -0
- package/templates/nuxt/pages/c3.ts +1 -0
- package/templates/nuxt/workers/c3.ts +1 -0
- package/templates/openapi/c3.ts +1 -0
- package/templates/pre-existing/c3.ts +1 -0
- package/templates/qwik/pages/c3.ts +1 -0
- package/templates/qwik/workers/c3.ts +1 -0
- package/templates/react/pages/c3.ts +1 -0
- package/templates/react-router/c3.ts +1 -0
- package/templates/redwood/c3.ts +1 -0
- package/templates/solid/c3.ts +1 -0
- package/templates/svelte/pages/c3.ts +1 -0
- package/templates/svelte/workers/c3.ts +1 -0
- package/templates/tanstack-start/c3.ts +1 -0
- package/templates/vike/c3.ts +1 -0
- package/templates/vike/experimental-c3.ts +1 -0
- package/templates/vue/pages/c3.ts +1 -0
- package/templates/waku/c3.ts +1 -0
- package/templates/waku/experimental-c3.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.73.0",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@babel/parser": "^7.21.3",
|
|
32
32
|
"@babel/types": "^7.21.4",
|
|
33
33
|
"@clack/prompts": "^1.2.0",
|
|
34
|
-
"@cloudflare/workers-types": "^5.
|
|
34
|
+
"@cloudflare/workers-types": "^5.20260926.1",
|
|
35
35
|
"@types/command-exists": "^1.2.0",
|
|
36
36
|
"@types/cross-spawn": "^6.0.2",
|
|
37
37
|
"@types/deepmerge": "^2.2.0",
|
|
@@ -70,13 +70,13 @@
|
|
|
70
70
|
"which-pm-runs": "^1.1.0",
|
|
71
71
|
"wrap-ansi": "^9.0.0",
|
|
72
72
|
"yargs": "^17.7.2",
|
|
73
|
-
"@cloudflare/cli-shared-helpers": "0.
|
|
74
|
-
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
73
|
+
"@cloudflare/cli-shared-helpers": "0.2.0",
|
|
75
74
|
"@cloudflare/shared-ast-primitives": "1.1.0",
|
|
75
|
+
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
76
|
+
"@cloudflare/vite-plugin": "1.62.0",
|
|
76
77
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
77
|
-
"@cloudflare/
|
|
78
|
-
"wrangler": "4.
|
|
79
|
-
"@cloudflare/workers-utils": "0.42.0"
|
|
78
|
+
"@cloudflare/workers-utils": "0.44.0",
|
|
79
|
+
"wrangler": "4.143.0"
|
|
80
80
|
},
|
|
81
81
|
"engines": {
|
|
82
82
|
"node": ">=22.0.0"
|
package/templates/analog/c3.ts
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TemplateConfig } from "../../src/templates";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
configVersion: 1,
|
|
5
|
+
id: "django",
|
|
6
|
+
displayName: "Django",
|
|
7
|
+
description: "A Django application running on Cloudflare Workers",
|
|
8
|
+
platform: "workers",
|
|
9
|
+
copyFiles: {
|
|
10
|
+
variants: {
|
|
11
|
+
python: {
|
|
12
|
+
path: "./py",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
workersTypes: "none",
|
|
17
|
+
devScript: "dev",
|
|
18
|
+
deployScript: "deploy",
|
|
19
|
+
} satisfies TemplateConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<PACKAGE_NAME>",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"deploy": "uv run pywrangler deploy",
|
|
7
|
+
"dev": "uv run pywrangler dev",
|
|
8
|
+
"start": "uv run pywrangler dev"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"wrangler": "^4.131.1"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "<PROJECT_NAME>"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A Django application running on Cloudflare Workers"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
dependencies = ["django"]
|
|
8
|
+
|
|
9
|
+
[dependency-groups]
|
|
10
|
+
dev = ["workers-py", "workers-runtime-sdk"]
|
|
File without changes
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Replace this before enabling signing, sessions, authentication, or CSRF features.
|
|
2
|
+
SECRET_KEY = "unused"
|
|
3
|
+
DEBUG = False
|
|
4
|
+
# Cloudflare routing validates the hostname before invoking this Worker.
|
|
5
|
+
ALLOWED_HOSTS = ["*"]
|
|
6
|
+
|
|
7
|
+
INSTALLED_APPS = []
|
|
8
|
+
MIDDLEWARE = []
|
|
9
|
+
ROOT_URLCONF = "django_app.urls"
|
|
10
|
+
TEMPLATES = []
|
|
11
|
+
WSGI_APPLICATION = "django_app.wsgi.application"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import os
|
|
2
|
+
|
|
3
|
+
from workers import WorkerEntrypoint, wsgi
|
|
4
|
+
|
|
5
|
+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_app.settings")
|
|
6
|
+
|
|
7
|
+
from django_app.wsgi import application
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Default(WorkerEntrypoint):
|
|
11
|
+
async def fetch(self, request):
|
|
12
|
+
return await wsgi.fetch(application, request, self.env)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TemplateConfig } from "../../src/templates";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
configVersion: 1,
|
|
5
|
+
id: "fastapi",
|
|
6
|
+
displayName: "FastAPI",
|
|
7
|
+
description: "A FastAPI application running on Cloudflare Workers",
|
|
8
|
+
platform: "workers",
|
|
9
|
+
copyFiles: {
|
|
10
|
+
variants: {
|
|
11
|
+
python: {
|
|
12
|
+
path: "./py",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
workersTypes: "none",
|
|
17
|
+
devScript: "dev",
|
|
18
|
+
deployScript: "deploy",
|
|
19
|
+
} satisfies TemplateConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<PACKAGE_NAME>",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"deploy": "uv run pywrangler deploy",
|
|
7
|
+
"dev": "uv run pywrangler dev",
|
|
8
|
+
"start": "uv run pywrangler dev"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"wrangler": "^4.131.1"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "<PROJECT_NAME>"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A FastAPI application running on Cloudflare Workers"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
dependencies = ["fastapi"]
|
|
8
|
+
|
|
9
|
+
[dependency-groups]
|
|
10
|
+
dev = ["workers-py", "workers-runtime-sdk"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from fastapi import FastAPI
|
|
2
|
+
from workers import WorkerEntrypoint, asgi
|
|
3
|
+
|
|
4
|
+
app = FastAPI()
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@app.get("/")
|
|
8
|
+
async def root():
|
|
9
|
+
return {"message": "Hello from FastAPI on Cloudflare Workers!"}
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Default(WorkerEntrypoint):
|
|
13
|
+
async def fetch(self, request):
|
|
14
|
+
return await asgi.fetch(app, request, self.env)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { TemplateConfig } from "../../src/templates";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
configVersion: 1,
|
|
5
|
+
id: "flask",
|
|
6
|
+
displayName: "Flask",
|
|
7
|
+
description: "A Flask application running on Cloudflare Workers",
|
|
8
|
+
platform: "workers",
|
|
9
|
+
copyFiles: {
|
|
10
|
+
variants: {
|
|
11
|
+
python: {
|
|
12
|
+
path: "./py",
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
workersTypes: "none",
|
|
17
|
+
devScript: "dev",
|
|
18
|
+
deployScript: "deploy",
|
|
19
|
+
} satisfies TemplateConfig;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<PACKAGE_NAME>",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"private": true,
|
|
5
|
+
"scripts": {
|
|
6
|
+
"deploy": "uv run pywrangler deploy",
|
|
7
|
+
"dev": "uv run pywrangler dev",
|
|
8
|
+
"start": "uv run pywrangler dev"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"wrangler": "^4.131.1"
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "<PROJECT_NAME>"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "A Flask application running on Cloudflare Workers"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
dependencies = ["flask"]
|
|
8
|
+
|
|
9
|
+
[dependency-groups]
|
|
10
|
+
dev = ["workers-py", "workers-runtime-sdk"]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from flask import Flask
|
|
2
|
+
from workers import WorkerEntrypoint, wsgi
|
|
3
|
+
|
|
4
|
+
app = Flask(__name__)
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
@app.get("/")
|
|
8
|
+
def root():
|
|
9
|
+
return "Hello from Flask on Cloudflare Workers!"
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class Default(WorkerEntrypoint):
|
|
13
|
+
async def fetch(self, request):
|
|
14
|
+
return await wsgi.fetch(app, request, self.env)
|
package/templates/next/c3.ts
CHANGED
package/templates/openapi/c3.ts
CHANGED
package/templates/redwood/c3.ts
CHANGED
package/templates/solid/c3.ts
CHANGED
package/templates/vike/c3.ts
CHANGED
package/templates/waku/c3.ts
CHANGED