create-cloudflare 2.45.0 → 2.45.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/dist/cli.js +2 -2
- package/package.json +5 -5
- package/templates/openapi/ts/__dot__gitignore +1 -0
- package/templates/openapi/ts/package.json +7 -6
- package/templates/openapi/ts/src/endpoints/taskCreate.ts +2 -2
- package/templates/openapi/ts/src/endpoints/taskDelete.ts +2 -2
- package/templates/openapi/ts/src/endpoints/taskFetch.ts +2 -2
- package/templates/openapi/ts/src/endpoints/taskList.ts +2 -2
- package/templates/openapi/ts/src/index.ts +4 -1
- package/templates/openapi/ts/src/types.ts +3 -0
- package/templates/openapi/ts/tsconfig.json +18 -20
package/dist/cli.js
CHANGED
|
@@ -74560,7 +74560,7 @@ var Yargs = YargsFactory(esm_default);
|
|
|
74560
74560
|
var yargs_default = Yargs;
|
|
74561
74561
|
|
|
74562
74562
|
// package.json
|
|
74563
|
-
var version = "2.45.
|
|
74563
|
+
var version = "2.45.1";
|
|
74564
74564
|
|
|
74565
74565
|
// src/metrics.ts
|
|
74566
74566
|
var import_node_async_hooks = require("node:async_hooks");
|
|
@@ -78063,7 +78063,7 @@ var c3_default50 = config47;
|
|
|
78063
78063
|
var import_node_assert = __toESM(require("node:assert"));
|
|
78064
78064
|
|
|
78065
78065
|
// ../wrangler/package.json
|
|
78066
|
-
var version2 = "4.
|
|
78066
|
+
var version2 = "4.13.0";
|
|
78067
78067
|
|
|
78068
78068
|
// src/git.ts
|
|
78069
78069
|
var offerGit = async (ctx) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-cloudflare",
|
|
3
|
-
"version": "2.45.
|
|
3
|
+
"version": "2.45.1",
|
|
4
4
|
"description": "A CLI for creating and deploying new applications to Cloudflare.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@babel/parser": "^7.21.3",
|
|
31
31
|
"@babel/types": "^7.21.4",
|
|
32
32
|
"@clack/prompts": "^0.6.3",
|
|
33
|
-
"@cloudflare/workers-types": "^4.
|
|
33
|
+
"@cloudflare/workers-types": "^4.20250422.0",
|
|
34
34
|
"@iarna/toml": "^3.0.0",
|
|
35
35
|
"@types/command-exists": "^1.2.0",
|
|
36
36
|
"@types/cross-spawn": "^6.0.2",
|
|
@@ -70,12 +70,12 @@
|
|
|
70
70
|
"wrap-ansi": "^9.0.0",
|
|
71
71
|
"xdg-app-paths": "^8.3.0",
|
|
72
72
|
"yargs": "^17.7.2",
|
|
73
|
-
"@cloudflare/cli": "1.1.1",
|
|
74
73
|
"@cloudflare/eslint-config-worker": "1.1.0",
|
|
75
74
|
"@cloudflare/mock-npm-registry": "0.0.0",
|
|
76
|
-
"@cloudflare/vite-plugin": "1.0.
|
|
75
|
+
"@cloudflare/vite-plugin": "1.0.10",
|
|
76
|
+
"@cloudflare/cli": "1.1.1",
|
|
77
77
|
"@cloudflare/workers-tsconfig": "0.0.0",
|
|
78
|
-
"wrangler": "4.
|
|
78
|
+
"wrangler": "4.13.0"
|
|
79
79
|
},
|
|
80
80
|
"engines": {
|
|
81
81
|
"node": ">=18.14.1"
|
|
@@ -9,13 +9,14 @@
|
|
|
9
9
|
"cf-typegen": "wrangler types"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"chanfana": "^2.
|
|
13
|
-
"
|
|
14
|
-
"
|
|
12
|
+
"chanfana": "^2.6.3",
|
|
13
|
+
"hono": "^4.6.20",
|
|
14
|
+
"zod": "^3.24.1"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
|
-
"@types
|
|
18
|
-
"@types/
|
|
19
|
-
"
|
|
17
|
+
"@cloudflare/workers-types": "^4.20250129.0",
|
|
18
|
+
"@types/node": "22.13.0",
|
|
19
|
+
"@types/service-worker-mock": "^2.0.4",
|
|
20
|
+
"wrangler": "^3.107.2"
|
|
20
21
|
}
|
|
21
22
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bool, OpenAPIRoute } from "chanfana";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { Task } from "../types";
|
|
3
|
+
import { type AppContext, Task } from "../types";
|
|
4
4
|
|
|
5
5
|
export class TaskCreate extends OpenAPIRoute {
|
|
6
6
|
schema = {
|
|
@@ -34,7 +34,7 @@ export class TaskCreate extends OpenAPIRoute {
|
|
|
34
34
|
},
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
-
async handle(c) {
|
|
37
|
+
async handle(c: AppContext) {
|
|
38
38
|
// Get validated data
|
|
39
39
|
const data = await this.getValidatedData<typeof this.schema>();
|
|
40
40
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bool, OpenAPIRoute, Str } from "chanfana";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { Task } from "../types";
|
|
3
|
+
import { type AppContext, Task } from "../types";
|
|
4
4
|
|
|
5
5
|
export class TaskDelete extends OpenAPIRoute {
|
|
6
6
|
schema = {
|
|
@@ -30,7 +30,7 @@ export class TaskDelete extends OpenAPIRoute {
|
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
-
async handle(c) {
|
|
33
|
+
async handle(c: AppContext) {
|
|
34
34
|
// Get validated data
|
|
35
35
|
const data = await this.getValidatedData<typeof this.schema>();
|
|
36
36
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bool, OpenAPIRoute, Str } from "chanfana";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { Task } from "../types";
|
|
3
|
+
import { type AppContext, Task } from "../types";
|
|
4
4
|
|
|
5
5
|
export class TaskFetch extends OpenAPIRoute {
|
|
6
6
|
schema = {
|
|
@@ -43,7 +43,7 @@ export class TaskFetch extends OpenAPIRoute {
|
|
|
43
43
|
},
|
|
44
44
|
};
|
|
45
45
|
|
|
46
|
-
async handle(c) {
|
|
46
|
+
async handle(c: AppContext) {
|
|
47
47
|
// Get validated data
|
|
48
48
|
const data = await this.getValidatedData<typeof this.schema>();
|
|
49
49
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Bool, Num, OpenAPIRoute } from "chanfana";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import { Task } from "../types";
|
|
3
|
+
import { type AppContext, Task } from "../types";
|
|
4
4
|
|
|
5
5
|
export class TaskList extends OpenAPIRoute {
|
|
6
6
|
schema = {
|
|
@@ -37,7 +37,7 @@ export class TaskList extends OpenAPIRoute {
|
|
|
37
37
|
},
|
|
38
38
|
};
|
|
39
39
|
|
|
40
|
-
async handle(c) {
|
|
40
|
+
async handle(c: AppContext) {
|
|
41
41
|
// Get validated data
|
|
42
42
|
const data = await this.getValidatedData<typeof this.schema>();
|
|
43
43
|
|
|
@@ -6,7 +6,7 @@ import { TaskFetch } from "./endpoints/taskFetch";
|
|
|
6
6
|
import { TaskList } from "./endpoints/taskList";
|
|
7
7
|
|
|
8
8
|
// Start a Hono app
|
|
9
|
-
const app = new Hono();
|
|
9
|
+
const app = new Hono<{ Bindings: Env }>();
|
|
10
10
|
|
|
11
11
|
// Setup OpenAPI registry
|
|
12
12
|
const openapi = fromHono(app, {
|
|
@@ -19,5 +19,8 @@ openapi.post("/api/tasks", TaskCreate);
|
|
|
19
19
|
openapi.get("/api/tasks/:taskSlug", TaskFetch);
|
|
20
20
|
openapi.delete("/api/tasks/:taskSlug", TaskDelete);
|
|
21
21
|
|
|
22
|
+
// You may also register routes for non OpenAPI directly on Hono
|
|
23
|
+
// app.get('/test', (c) => c.text('Hono!'))
|
|
24
|
+
|
|
22
25
|
// Export the Hono app
|
|
23
26
|
export default app;
|
|
@@ -1,26 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
|
|
4
|
-
"allowSyntheticDefaultImports": true,
|
|
5
|
-
"baseUrl": "src",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"sourceMap": true,
|
|
3
|
+
/* Base Options: */
|
|
8
4
|
"esModuleInterop": true,
|
|
9
|
-
"inlineSourceMap": false,
|
|
10
|
-
"lib": ["esnext"],
|
|
11
|
-
"listEmittedFiles": false,
|
|
12
|
-
"listFiles": false,
|
|
13
|
-
"moduleResolution": "node",
|
|
14
|
-
"noFallthroughCasesInSwitch": true,
|
|
15
|
-
"pretty": true,
|
|
16
|
-
"resolveJsonModule": true,
|
|
17
|
-
"rootDir": ".",
|
|
18
5
|
"skipLibCheck": true,
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
6
|
+
"target": "es2022",
|
|
7
|
+
"verbatimModuleSyntax": false,
|
|
8
|
+
"allowJs": true,
|
|
9
|
+
"resolveJsonModule": true,
|
|
10
|
+
"moduleDetection": "force",
|
|
11
|
+
/* Strictness */
|
|
12
|
+
"noImplicitAny": false,
|
|
13
|
+
"noImplicitThis": true,
|
|
14
|
+
"strictNullChecks": false,
|
|
15
|
+
"strict": true,
|
|
16
|
+
"noUncheckedIndexedAccess": true,
|
|
17
|
+
/* If NOT transpiling with TypeScript: */
|
|
18
|
+
"moduleResolution": "Bundler",
|
|
19
|
+
"module": "es2022",
|
|
20
|
+
"noEmit": true,
|
|
21
|
+
"lib": ["es2022"],
|
|
24
22
|
"types": [
|
|
25
23
|
"@types/node",
|
|
26
24
|
"@types/service-worker-mock",
|
|
@@ -28,5 +26,5 @@
|
|
|
28
26
|
]
|
|
29
27
|
},
|
|
30
28
|
"exclude": ["node_modules", "dist", "tests"],
|
|
31
|
-
"include": ["src", "
|
|
29
|
+
"include": ["src", "worker-configuration.d.ts"]
|
|
32
30
|
}
|