create-cloudflare 2.72.13 → 2.73.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-cloudflare",
3
- "version": "2.72.13",
3
+ "version": "2.73.1",
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.20260925.1",
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",
@@ -63,7 +63,7 @@
63
63
  "tinyglobby": "0.2.16",
64
64
  "tree-kill": "1.2.2",
65
65
  "typescript": "5.8.3",
66
- "undici": "7.29.0",
66
+ "undici": "7.29.1",
67
67
  "vite": "8.1.5",
68
68
  "vite-tsconfig-paths": "^4.0.8",
69
69
  "vitest": "4.1.0",
@@ -72,11 +72,11 @@
72
72
  "yargs": "^17.7.2",
73
73
  "@cloudflare/cli-shared-helpers": "0.2.0",
74
74
  "@cloudflare/shared-ast-primitives": "1.1.0",
75
- "@cloudflare/vite-plugin": "1.60.2",
75
+ "@cloudflare/mock-npm-registry": "0.0.0",
76
76
  "@cloudflare/workers-tsconfig": "0.0.0",
77
+ "@cloudflare/vite-plugin": "1.62.1",
77
78
  "@cloudflare/workers-utils": "0.44.0",
78
- "wrangler": "4.141.0",
79
- "@cloudflare/mock-npm-registry": "0.0.0"
79
+ "wrangler": "4.143.1"
80
80
  },
81
81
  "engines": {
82
82
  "node": ">=22.0.0"
@@ -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,14 @@
1
+ # Django on Cloudflare Workers
2
+
3
+ Install dependencies and start local development with uv:
4
+
5
+ ```sh
6
+ uv sync
7
+ uv run pywrangler dev
8
+ ```
9
+
10
+ Deploy the Worker with:
11
+
12
+ ```sh
13
+ uv run pywrangler deploy
14
+ ```
@@ -0,0 +1,7 @@
1
+ node_modules/
2
+ .wrangler/
3
+ .venv/
4
+ .venv-workers/
5
+ python_modules/
6
+ __pycache__/
7
+ *.py[cod]
@@ -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,9 @@
1
+ from django.http import HttpResponse
2
+ from django.urls import path
3
+
4
+
5
+ def root(request):
6
+ return HttpResponse("Hello from Django on Cloudflare Workers!")
7
+
8
+
9
+ urlpatterns = [path("", root)]
@@ -0,0 +1,7 @@
1
+ import os
2
+
3
+ from django.core.wsgi import get_wsgi_application
4
+
5
+ os.environ.setdefault("DJANGO_SETTINGS_MODULE", "django_app.settings")
6
+
7
+ application = get_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,9 @@
1
+ {
2
+ "name": "<WORKER_NAME>",
3
+ "main": "src/entry.py",
4
+ "compatibility_date": "<COMPATIBILITY_DATE>",
5
+ "compatibility_flags": ["python_workers"],
6
+ "observability": {
7
+ "enabled": true,
8
+ },
9
+ }
@@ -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,14 @@
1
+ # FastAPI on Cloudflare Workers
2
+
3
+ Install dependencies and start local development with uv:
4
+
5
+ ```sh
6
+ uv sync
7
+ uv run pywrangler dev
8
+ ```
9
+
10
+ Deploy the Worker with:
11
+
12
+ ```sh
13
+ uv run pywrangler deploy
14
+ ```
@@ -0,0 +1,7 @@
1
+ node_modules/
2
+ .wrangler/
3
+ .venv/
4
+ .venv-workers/
5
+ python_modules/
6
+ __pycache__/
7
+ *.py[cod]
@@ -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,9 @@
1
+ {
2
+ "name": "<WORKER_NAME>",
3
+ "main": "src/entry.py",
4
+ "compatibility_date": "<COMPATIBILITY_DATE>",
5
+ "compatibility_flags": ["python_workers"],
6
+ "observability": {
7
+ "enabled": true,
8
+ },
9
+ }
@@ -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,14 @@
1
+ # Flask on Cloudflare Workers
2
+
3
+ Install dependencies and start local development with uv:
4
+
5
+ ```sh
6
+ uv sync
7
+ uv run pywrangler dev
8
+ ```
9
+
10
+ Deploy the Worker with:
11
+
12
+ ```sh
13
+ uv run pywrangler deploy
14
+ ```
@@ -0,0 +1,7 @@
1
+ node_modules/
2
+ .wrangler/
3
+ .venv/
4
+ .venv-workers/
5
+ python_modules/
6
+ __pycache__/
7
+ *.py[cod]
@@ -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)
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "<WORKER_NAME>",
3
+ "main": "src/entry.py",
4
+ "compatibility_date": "<COMPATIBILITY_DATE>",
5
+ "compatibility_flags": ["python_workers"],
6
+ "observability": {
7
+ "enabled": true,
8
+ },
9
+ }