create-cloudflare 0.0.0-ccf14dda → 0.0.0-ce23ed71

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.
Files changed (66) hide show
  1. package/dist/cli.js +75381 -61373
  2. package/package.json +12 -6
  3. package/templates/angular/c3.ts +99 -0
  4. package/{dist → templates}/angular/templates/tools/copy-files.mjs +1 -1
  5. package/templates/astro/c3.ts +50 -0
  6. package/templates/common/c3.ts +16 -0
  7. package/templates/docusaurus/c3.ts +27 -0
  8. package/templates/gatsby/c3.ts +46 -0
  9. package/templates/hello-world/c3.ts +16 -0
  10. package/templates/hello-world-durable-object/c3.ts +16 -0
  11. package/templates/hello-world-durable-object/js/.editorconfig +13 -0
  12. package/templates/hello-world-durable-object/js/.prettierrc +6 -0
  13. package/templates/{chatgptPlugin/ts → hello-world-durable-object/js}/__dot__gitignore +1 -0
  14. package/templates/{chatgptPlugin/ts → hello-world-durable-object/js}/package.json +2 -5
  15. package/templates/hello-world-durable-object/js/src/index.js +65 -0
  16. package/templates/hello-world-durable-object/js/wrangler.toml +51 -0
  17. package/templates/hello-world-durable-object/ts/.editorconfig +13 -0
  18. package/templates/hello-world-durable-object/ts/.prettierrc +6 -0
  19. package/templates/hello-world-durable-object/ts/__dot__gitignore +172 -0
  20. package/templates/hello-world-durable-object/ts/package.json +15 -0
  21. package/templates/hello-world-durable-object/ts/src/index.ts +78 -0
  22. package/templates/hello-world-durable-object/ts/tsconfig.json +101 -0
  23. package/templates/hello-world-durable-object/ts/wrangler.toml +51 -0
  24. package/templates/hono/c3.ts +25 -0
  25. package/templates/next/README.md +58 -0
  26. package/templates/next/app/js/app/api/hello/route.js +21 -0
  27. package/templates/next/app/js/app/not-found.js +58 -0
  28. package/templates/next/app/ts/app/api/hello/route.ts +22 -0
  29. package/templates/next/app/ts/app/not-found.tsx +58 -0
  30. package/templates/next/c3.ts +226 -0
  31. package/templates/next/env.d.ts +7 -0
  32. package/templates/next/pages/js/pages/api/hello.js +23 -0
  33. package/templates/next/pages/ts/pages/api/hello.ts +24 -0
  34. package/templates/next/wrangler.toml +57 -0
  35. package/templates/nuxt/c3.ts +99 -0
  36. package/templates/nuxt/templates/wrangler.toml +50 -0
  37. package/templates/openapi/c3.ts +9 -0
  38. package/templates/openapi/ts/src/endpoints/taskList.ts +1 -1
  39. package/templates/openapi/ts/src/index.ts +2 -2
  40. package/templates/pre-existing/c3.ts +83 -0
  41. package/templates/pre-existing/js/.editorconfig +13 -0
  42. package/templates/pre-existing/js/.prettierrc +6 -0
  43. package/templates/pre-existing/js/__dot__gitignore +172 -0
  44. package/templates/pre-existing/js/package.json +13 -0
  45. package/templates/pre-existing/js/wrangler.toml +3 -0
  46. package/templates/queues/c3.ts +26 -0
  47. package/templates/qwik/c3.ts +95 -0
  48. package/templates/qwik/templates/wrangler.toml +50 -0
  49. package/templates/react/c3.ts +29 -0
  50. package/templates/remix/c3.ts +33 -0
  51. package/templates/scheduled/c3.ts +16 -0
  52. package/templates/solid/c3.ts +39 -0
  53. package/templates/solid/js/vite.config.js +12 -0
  54. package/templates/solid/ts/vite.config.ts +12 -0
  55. package/templates/svelte/c3.ts +77 -0
  56. package/templates/svelte/templates.ts +13 -0
  57. package/templates/vue/c3.ts +27 -0
  58. package/templates/chatgptPlugin/ts/.assets/example.png +0 -0
  59. package/templates/chatgptPlugin/ts/README.md +0 -25
  60. package/templates/chatgptPlugin/ts/src/index.ts +0 -33
  61. package/templates/chatgptPlugin/ts/src/search.ts +0 -59
  62. package/templates/chatgptPlugin/ts/wrangler.toml +0 -3
  63. package/{dist → templates}/angular/templates/server.ts +0 -0
  64. package/{dist → templates}/angular/templates/src/_routes.json +0 -0
  65. package/{dist → templates}/angular/templates/tools/alter-polyfills.mjs +1 -1
  66. /package/{dist → templates}/angular/templates/tools/paths.mjs +0 -0
@@ -1,59 +0,0 @@
1
- import { OpenAPIRoute, Query } from "@cloudflare/itty-router-openapi";
2
-
3
- export class GetSearch extends OpenAPIRoute {
4
- static schema = {
5
- tags: ["Search"],
6
- summary: "Search repositories by a query parameter",
7
- parameters: {
8
- q: Query(String, {
9
- description: "The query to search for",
10
- default: "cloudflare workers",
11
- }),
12
- },
13
- responses: {
14
- "200": {
15
- description: "Successfully response",
16
- schema: {
17
- repos: [
18
- {
19
- name: "itty-router-openapi",
20
- description:
21
- "OpenAPI 3 schema generator and validator for Cloudflare Workers",
22
- stars: "80",
23
- url: "https://github.com/cloudflare/itty-router-openapi",
24
- },
25
- ],
26
- },
27
- },
28
- },
29
- };
30
-
31
- async handle(request: Request, env, ctx, data: Record<string, any>) {
32
- const url = `https://api.github.com/search/repositories?q=${data.query.q}`;
33
-
34
- const resp = await fetch(url, {
35
- headers: {
36
- Accept: "application/vnd.github.v3+json",
37
- "User-Agent": "RepoAI - Cloudflare Workers ChatGPT Plugin Example",
38
- },
39
- });
40
-
41
- if (!resp.ok) {
42
- return new Response(await resp.text(), { status: 400 });
43
- }
44
-
45
- const json = await resp.json();
46
-
47
- // @ts-ignore
48
- const repos = json.items.map((item: any) => ({
49
- name: item.name,
50
- description: item.description,
51
- stars: item.stargazers_count,
52
- url: item.html_url,
53
- }));
54
-
55
- return {
56
- repos: repos,
57
- };
58
- }
59
- }
@@ -1,3 +0,0 @@
1
- name = "<TBD>"
2
- main = "src/index.ts"
3
- compatibility_date = "<TBD>"
File without changes
@@ -1,5 +1,5 @@
1
- import { EOL } from "node:os";
2
1
  import fs from "node:fs";
2
+ import { EOL } from "node:os";
3
3
  import { join } from "node:path";
4
4
  import { worker } from "./paths.mjs";
5
5