alchemy 0.37.1 → 0.38.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.
Files changed (264) hide show
  1. package/bin/alchemy.mjs +44306 -48055
  2. package/bin/alchemy.ts +80 -85
  3. package/bin/commands/create.ts +263 -0
  4. package/bin/constants.ts +13 -0
  5. package/bin/errors.ts +11 -0
  6. package/bin/services/dependencies.ts +47 -0
  7. package/bin/services/get-package-version.ts +11 -0
  8. package/bin/services/package-manager.ts +113 -0
  9. package/bin/services/template-manager.ts +137 -0
  10. package/bin/types.ts +83 -0
  11. package/lib/alchemy.d.ts.map +1 -1
  12. package/lib/alchemy.js +12 -3
  13. package/lib/alchemy.js.map +1 -1
  14. package/lib/apply.d.ts +2 -0
  15. package/lib/apply.d.ts.map +1 -1
  16. package/lib/apply.js +47 -12
  17. package/lib/apply.js.map +1 -1
  18. package/lib/build-date.d.ts +6 -0
  19. package/lib/build-date.d.ts.map +1 -0
  20. package/lib/build-date.js +8 -0
  21. package/lib/build-date.js.map +1 -0
  22. package/lib/cloudflare/api.d.ts.map +1 -1
  23. package/lib/cloudflare/api.js +2 -1
  24. package/lib/cloudflare/api.js.map +1 -1
  25. package/lib/cloudflare/do-state-store/internal.d.ts.map +1 -1
  26. package/lib/cloudflare/do-state-store/internal.js +9 -1
  27. package/lib/cloudflare/do-state-store/internal.js.map +1 -1
  28. package/lib/cloudflare/pipeline.d.ts +1 -1
  29. package/lib/cloudflare/pipeline.d.ts.map +1 -1
  30. package/lib/cloudflare/pipeline.js +6 -1
  31. package/lib/cloudflare/pipeline.js.map +1 -1
  32. package/lib/cloudflare/worker-stub.d.ts +23 -2
  33. package/lib/cloudflare/worker-stub.d.ts.map +1 -1
  34. package/lib/cloudflare/worker-stub.js +16 -2
  35. package/lib/cloudflare/worker-stub.js.map +1 -1
  36. package/lib/cloudflare/worker.d.ts +4 -3
  37. package/lib/cloudflare/worker.d.ts.map +1 -1
  38. package/lib/cloudflare/worker.js +2 -1
  39. package/lib/cloudflare/worker.js.map +1 -1
  40. package/lib/context.d.ts +2 -2
  41. package/lib/context.d.ts.map +1 -1
  42. package/lib/destroy.d.ts +8 -2
  43. package/lib/destroy.d.ts.map +1 -1
  44. package/lib/destroy.js +19 -5
  45. package/lib/destroy.js.map +1 -1
  46. package/lib/scope.d.ts +26 -4
  47. package/lib/scope.d.ts.map +1 -1
  48. package/lib/scope.js +104 -9
  49. package/lib/scope.js.map +1 -1
  50. package/lib/sentry/project.js +1 -1
  51. package/lib/sentry/project.js.map +1 -1
  52. package/lib/util/exists.d.ts +2 -0
  53. package/lib/util/exists.d.ts.map +1 -0
  54. package/lib/util/exists.js +11 -0
  55. package/lib/util/exists.js.map +1 -0
  56. package/lib/util/logger.js +1 -1
  57. package/lib/util/logger.js.map +1 -1
  58. package/lib/util/mutex.d.ts +9 -0
  59. package/lib/util/mutex.d.ts.map +1 -0
  60. package/lib/util/mutex.js +35 -0
  61. package/lib/util/mutex.js.map +1 -0
  62. package/package.json +16 -6
  63. package/src/alchemy.ts +17 -5
  64. package/src/apply.ts +67 -17
  65. package/src/build-date.ts +8 -0
  66. package/src/cloudflare/api.ts +2 -1
  67. package/src/cloudflare/do-state-store/internal.ts +10 -1
  68. package/src/cloudflare/pipeline.ts +6 -0
  69. package/src/cloudflare/worker-stub.ts +31 -2
  70. package/src/cloudflare/worker.ts +4 -3
  71. package/src/context.ts +2 -2
  72. package/src/destroy.ts +30 -7
  73. package/src/scope.ts +145 -10
  74. package/src/sentry/project.ts +1 -1
  75. package/src/util/exists.ts +10 -0
  76. package/src/util/logger.ts +1 -1
  77. package/src/util/mutex.ts +33 -0
  78. package/templates/astro/.vscode/extensions.json +4 -0
  79. package/templates/astro/.vscode/launch.json +11 -0
  80. package/templates/astro/README.md +48 -0
  81. package/templates/astro/_env.example +1 -0
  82. package/templates/astro/_gitignore +27 -0
  83. package/templates/astro/alchemy.run.ts +16 -0
  84. package/templates/astro/astro.config.mjs +8 -0
  85. package/templates/astro/package.json +23 -0
  86. package/templates/astro/public/favicon.svg +9 -0
  87. package/templates/astro/src/assets/astro.svg +1 -0
  88. package/templates/astro/src/assets/background.svg +1 -0
  89. package/templates/astro/src/components/Welcome.astro +210 -0
  90. package/templates/astro/src/layouts/Layout.astro +22 -0
  91. package/templates/astro/src/pages/api/hello.ts +19 -0
  92. package/templates/astro/src/pages/index.astro +11 -0
  93. package/templates/astro/tsconfig.json +18 -0
  94. package/templates/astro/types/env.d.ts +16 -0
  95. package/templates/astro/wrangler.jsonc +6 -0
  96. package/templates/nuxt/README.md +75 -0
  97. package/templates/nuxt/_env +1 -0
  98. package/templates/nuxt/_env.example +1 -0
  99. package/templates/nuxt/_gitignore +27 -0
  100. package/templates/nuxt/alchemy.run.ts +16 -0
  101. package/templates/nuxt/app.vue +6 -0
  102. package/templates/nuxt/nuxt.config.ts +13 -0
  103. package/templates/nuxt/package.json +26 -0
  104. package/templates/nuxt/public/favicon.ico +0 -0
  105. package/templates/nuxt/public/robots.txt +2 -0
  106. package/templates/nuxt/server/api/hello.ts +7 -0
  107. package/templates/nuxt/server/middleware/auth.ts +5 -0
  108. package/templates/nuxt/server/middleware/hello.ts +5 -0
  109. package/templates/nuxt/server/tsconfig.json +3 -0
  110. package/templates/nuxt/tsconfig.json +15 -0
  111. package/templates/nuxt/types/env.d.ts +16 -0
  112. package/templates/react-router/.vscode/settings.json +5 -0
  113. package/templates/react-router/README.md +79 -0
  114. package/templates/react-router/_env +1 -0
  115. package/templates/react-router/_env.example +1 -0
  116. package/templates/react-router/_gitignore +15 -0
  117. package/templates/react-router/alchemy.run.ts +17 -0
  118. package/templates/react-router/app/app.css +15 -0
  119. package/templates/react-router/app/entry.server.tsx +43 -0
  120. package/templates/react-router/app/root.tsx +75 -0
  121. package/templates/react-router/app/routes/home.tsx +17 -0
  122. package/templates/react-router/app/routes.ts +3 -0
  123. package/templates/react-router/app/welcome/logo-dark.svg +23 -0
  124. package/templates/react-router/app/welcome/logo-light.svg +23 -0
  125. package/templates/react-router/app/welcome/welcome.tsx +90 -0
  126. package/templates/react-router/package.json +34 -0
  127. package/templates/react-router/public/favicon.ico +0 -0
  128. package/templates/react-router/react-router.config.ts +8 -0
  129. package/templates/react-router/tsconfig.cloudflare.json +27 -0
  130. package/templates/react-router/tsconfig.json +17 -0
  131. package/templates/react-router/tsconfig.node.json +20 -0
  132. package/templates/react-router/types/env.d.ts +16 -0
  133. package/templates/react-router/vite.config.ts +14 -0
  134. package/templates/react-router/workers/app.ts +23 -0
  135. package/templates/react-router/wrangler.jsonc +6 -0
  136. package/templates/rwsdk/.cursor/rules/rwsdk_rwsdk-interruptors.mdc +247 -0
  137. package/templates/rwsdk/.cursor/rules/rwsdk_rwsdk-middleware.mdc +75 -0
  138. package/templates/rwsdk/.cursor/rules/rwsdk_rwsdk-react.mdc +110 -0
  139. package/templates/rwsdk/.cursor/rules/rwsdk_rwsdk-request-response.mdc +213 -0
  140. package/templates/rwsdk/.devcontainer/Dockerfile +8 -0
  141. package/templates/rwsdk/.devcontainer/devcontainer.json +21 -0
  142. package/templates/rwsdk/README.md +62 -0
  143. package/templates/rwsdk/_env +5 -0
  144. package/templates/rwsdk/_env.example +5 -0
  145. package/templates/rwsdk/_gitignore +71 -0
  146. package/templates/rwsdk/alchemy.run.ts +29 -0
  147. package/templates/rwsdk/package.json +61 -0
  148. package/templates/rwsdk/prisma/schema.prisma +43 -0
  149. package/templates/rwsdk/src/app/Document.tsx +16 -0
  150. package/templates/rwsdk/src/app/headers.ts +32 -0
  151. package/templates/rwsdk/src/app/pages/Home.tsx +13 -0
  152. package/templates/rwsdk/src/app/pages/user/Login.tsx +79 -0
  153. package/templates/rwsdk/src/app/pages/user/functions.ts +171 -0
  154. package/templates/rwsdk/src/app/pages/user/routes.ts +17 -0
  155. package/templates/rwsdk/src/app/shared/links.ts +3 -0
  156. package/templates/rwsdk/src/client.tsx +3 -0
  157. package/templates/rwsdk/src/db.ts +26 -0
  158. package/templates/rwsdk/src/scripts/seed.ts +21 -0
  159. package/templates/rwsdk/src/session/durableObject.ts +63 -0
  160. package/templates/rwsdk/src/session/store.ts +13 -0
  161. package/templates/rwsdk/src/worker.tsx +63 -0
  162. package/templates/rwsdk/tsconfig.json +47 -0
  163. package/templates/rwsdk/types/env.d.ts +16 -0
  164. package/templates/rwsdk/types/rw.d.ts +5 -0
  165. package/templates/rwsdk/types/vite.d.ts +4 -0
  166. package/templates/rwsdk/vite.config.mts +6 -0
  167. package/templates/rwsdk/wrangler.jsonc +28 -0
  168. package/templates/sveltekit/README.md +38 -0
  169. package/templates/sveltekit/_env +1 -0
  170. package/templates/sveltekit/_env.example +1 -0
  171. package/templates/sveltekit/_gitignore +26 -0
  172. package/templates/sveltekit/_npmrc +1 -0
  173. package/templates/sveltekit/_prettierrc +3 -0
  174. package/templates/sveltekit/alchemy.run.ts +16 -0
  175. package/templates/sveltekit/bun.lock +1099 -0
  176. package/templates/sveltekit/package.json +33 -0
  177. package/templates/sveltekit/src/app.css +1 -0
  178. package/templates/sveltekit/src/app.d.ts +13 -0
  179. package/templates/sveltekit/src/app.html +12 -0
  180. package/templates/sveltekit/src/routes/+layout.svelte +7 -0
  181. package/templates/sveltekit/src/routes/+page.svelte +2 -0
  182. package/templates/sveltekit/static/favicon.png +0 -0
  183. package/templates/sveltekit/svelte.config.js +12 -0
  184. package/templates/sveltekit/tsconfig.json +27 -0
  185. package/templates/sveltekit/types/env.d.ts +16 -0
  186. package/templates/sveltekit/vite.config.ts +6 -0
  187. package/templates/sveltekit/wrangler.jsonc +7 -0
  188. package/templates/tanstack-start/.vscode/settings.json +11 -0
  189. package/templates/tanstack-start/README.md +72 -0
  190. package/templates/tanstack-start/_env +1 -0
  191. package/templates/tanstack-start/_env.example +1 -0
  192. package/templates/tanstack-start/_gitignore +22 -0
  193. package/templates/tanstack-start/_prettierignore +4 -0
  194. package/templates/tanstack-start/alchemy.run.ts +16 -0
  195. package/templates/tanstack-start/package.json +37 -0
  196. package/templates/tanstack-start/public/android-chrome-192x192.png +0 -0
  197. package/templates/tanstack-start/public/android-chrome-512x512.png +0 -0
  198. package/templates/tanstack-start/public/apple-touch-icon.png +0 -0
  199. package/templates/tanstack-start/public/favicon-16x16.png +0 -0
  200. package/templates/tanstack-start/public/favicon-32x32.png +0 -0
  201. package/templates/tanstack-start/public/favicon.ico +0 -0
  202. package/templates/tanstack-start/public/favicon.png +0 -0
  203. package/templates/tanstack-start/public/site.webmanifest +19 -0
  204. package/templates/tanstack-start/src/components/DefaultCatchBoundary.tsx +53 -0
  205. package/templates/tanstack-start/src/components/NotFound.tsx +25 -0
  206. package/templates/tanstack-start/src/components/PostError.tsx +5 -0
  207. package/templates/tanstack-start/src/components/UserError.tsx +5 -0
  208. package/templates/tanstack-start/src/router.tsx +22 -0
  209. package/templates/tanstack-start/src/routes/__root.tsx +146 -0
  210. package/templates/tanstack-start/src/routes/_pathlessLayout/_nested-layout/route-a.tsx +10 -0
  211. package/templates/tanstack-start/src/routes/_pathlessLayout/_nested-layout/route-b.tsx +10 -0
  212. package/templates/tanstack-start/src/routes/_pathlessLayout/_nested-layout.tsx +34 -0
  213. package/templates/tanstack-start/src/routes/_pathlessLayout.tsx +16 -0
  214. package/templates/tanstack-start/src/routes/api/users.$userId.ts +28 -0
  215. package/templates/tanstack-start/src/routes/api/users.ts +59 -0
  216. package/templates/tanstack-start/src/routes/customScript[.]js.ts +10 -0
  217. package/templates/tanstack-start/src/routes/deferred.tsx +62 -0
  218. package/templates/tanstack-start/src/routes/index.tsx +12 -0
  219. package/templates/tanstack-start/src/routes/posts.$postId.tsx +34 -0
  220. package/templates/tanstack-start/src/routes/posts.index.tsx +8 -0
  221. package/templates/tanstack-start/src/routes/posts.tsx +38 -0
  222. package/templates/tanstack-start/src/routes/posts_.$postId.deep.tsx +29 -0
  223. package/templates/tanstack-start/src/routes/redirect.tsx +9 -0
  224. package/templates/tanstack-start/src/routes/users.$userId.tsx +44 -0
  225. package/templates/tanstack-start/src/routes/users.index.tsx +18 -0
  226. package/templates/tanstack-start/src/routes/users.tsx +49 -0
  227. package/templates/tanstack-start/src/styles/app.css +12 -0
  228. package/templates/tanstack-start/src/utils/loggingMiddleware.tsx +41 -0
  229. package/templates/tanstack-start/src/utils/posts.tsx +40 -0
  230. package/templates/tanstack-start/src/utils/seo.ts +33 -0
  231. package/templates/tanstack-start/src/utils/users.tsx +5 -0
  232. package/templates/tanstack-start/tsconfig.json +31 -0
  233. package/templates/tanstack-start/types/env.d.ts +16 -0
  234. package/templates/tanstack-start/vite.config.ts +33 -0
  235. package/templates/tanstack-start/wrangler.jsonc +7 -0
  236. package/templates/typescript/README.md +15 -0
  237. package/templates/typescript/_gitignore +37 -0
  238. package/templates/typescript/alchemy.run.ts +15 -0
  239. package/templates/typescript/index.ts +1 -0
  240. package/templates/typescript/package.json +18 -0
  241. package/templates/typescript/src/worker.js +5 -0
  242. package/templates/typescript/src/worker.ts +7 -0
  243. package/templates/typescript/tsconfig.json +21 -0
  244. package/templates/typescript/types/env.d.ts +16 -0
  245. package/templates/vite/README.md +54 -0
  246. package/templates/vite/_env.example +1 -0
  247. package/templates/vite/_gitignore +27 -0
  248. package/templates/vite/alchemy.run.ts +17 -0
  249. package/templates/vite/eslint.config.js +28 -0
  250. package/templates/vite/index.html +13 -0
  251. package/templates/vite/package.json +35 -0
  252. package/templates/vite/public/vite.svg +1 -0
  253. package/templates/vite/src/App.css +42 -0
  254. package/templates/vite/src/App.tsx +35 -0
  255. package/templates/vite/src/assets/react.svg +1 -0
  256. package/templates/vite/src/index.css +68 -0
  257. package/templates/vite/src/main.tsx +10 -0
  258. package/templates/vite/src/vite-env.d.ts +1 -0
  259. package/templates/vite/tsconfig.json +34 -0
  260. package/templates/vite/types/env.d.ts +16 -0
  261. package/templates/vite/vite.config.ts +9 -0
  262. package/templates/vite/worker/index.ts +12 -0
  263. package/templates/vite/wrangler.jsonc +6 -0
  264. package/bin/create-alchemy.ts +0 -1220
@@ -0,0 +1,27 @@
1
+ # build output
2
+ dist/
3
+
4
+ # generated types
5
+ .astro/
6
+
7
+ # dependencies
8
+ node_modules/
9
+
10
+ # logs
11
+ npm-debug.log*
12
+ yarn-debug.log*
13
+ yarn-error.log*
14
+ pnpm-debug.log*
15
+
16
+ # environment variables
17
+ .env
18
+ .env.production
19
+
20
+ # macOS-specific files
21
+ .DS_Store
22
+
23
+ # jetbrains setting folder
24
+ .idea/
25
+
26
+ .alchemy/
27
+ .env
@@ -0,0 +1,16 @@
1
+ /// <reference types="@types/node" />
2
+
3
+ import alchemy from "alchemy";
4
+ import { Astro } from "alchemy/cloudflare";
5
+
6
+ const app = await alchemy("my-alchemy-app");
7
+
8
+ export const worker = await Astro("website", {
9
+ command: "bun run build",
10
+ });
11
+
12
+ console.log({
13
+ url: worker.url,
14
+ });
15
+
16
+ await app.finalize();
@@ -0,0 +1,8 @@
1
+ import { defineConfig } from 'astro/config';
2
+ import cloudflare from '@astrojs/cloudflare';
3
+
4
+ // https://astro.build/config
5
+ export default defineConfig({
6
+ output: 'server',
7
+ adapter: cloudflare(),
8
+ });
@@ -0,0 +1,23 @@
1
+ {
2
+ "type": "module",
3
+ "name": "astro",
4
+ "version": "0.0.1",
5
+ "scripts": {
6
+ "astro": "astro",
7
+ "build": "astro check && astro build",
8
+ "deploy": "bun --env-file=./.env ./alchemy.run.ts",
9
+ "destroy": "bun --env-file=./.env ./alchemy.run.ts --destroy",
10
+ "dev": "astro dev",
11
+ "preview": "astro preview"
12
+ },
13
+ "dependencies": {
14
+ "astro": "^5.10.0"
15
+ },
16
+ "devDependencies": {
17
+ "alchemy": "workspace:*",
18
+ "@astrojs/cloudflare": "^12.6.0",
19
+ "miniflare": "^4.20250617.3",
20
+ "@cloudflare/workers-types": "^4.20250620.0",
21
+ "typescript": "^5.8.3"
22
+ }
23
+ }
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 128 128">
2
+ <path d="M50.4 78.5a75.1 75.1 0 0 0-28.5 6.9l24.2-65.7c.7-2 1.9-3.2 3.4-3.2h29c1.5 0 2.7 1.2 3.4 3.2l24.2 65.7s-11.6-7-28.5-7L67 45.5c-.4-1.7-1.6-2.8-2.9-2.8-1.3 0-2.5 1.1-2.9 2.7L50.4 78.5Zm-1.1 28.2Zm-4.2-20.2c-2 6.6-.6 15.8 4.2 20.2a17.5 17.5 0 0 1 .2-.7 5.5 5.5 0 0 1 5.7-4.5c2.8.1 4.3 1.5 4.7 4.7.2 1.1.2 2.3.2 3.5v.4c0 2.7.7 5.2 2.2 7.4a13 13 0 0 0 5.7 4.9v-.3l-.2-.3c-1.8-5.6-.5-9.5 4.4-12.8l1.5-1a73 73 0 0 0 3.2-2.2 16 16 0 0 0 6.8-11.4c.3-2 .1-4-.6-6l-.8.6-1.6 1a37 37 0 0 1-22.4 2.7c-5-.7-9.7-2-13.2-6.2Z" />
3
+ <style>
4
+ path { fill: #000; }
5
+ @media (prefers-color-scheme: dark) {
6
+ path { fill: #FFF; }
7
+ }
8
+ </style>
9
+ </svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" fill="none" width="115" height="48"><path fill="#17191E" d="M7.77 36.35C6.4 35.11 6 32.51 6.57 30.62c.99 1.2 2.35 1.57 3.75 1.78 2.18.33 4.31.2 6.33-.78.23-.12.44-.27.7-.42.18.55.23 1.1.17 1.67a4.56 4.56 0 0 1-1.94 3.23c-.43.32-.9.61-1.34.91-1.38.94-1.76 2.03-1.24 3.62l.05.17a3.63 3.63 0 0 1-1.6-1.38 3.87 3.87 0 0 1-.63-2.1c0-.37 0-.74-.05-1.1-.13-.9-.55-1.3-1.33-1.32a1.56 1.56 0 0 0-1.63 1.26c0 .06-.03.12-.05.2Z"/><path fill="url(#a)" d="M7.77 36.35C6.4 35.11 6 32.51 6.57 30.62c.99 1.2 2.35 1.57 3.75 1.78 2.18.33 4.31.2 6.33-.78.23-.12.44-.27.7-.42.18.55.23 1.1.17 1.67a4.56 4.56 0 0 1-1.94 3.23c-.43.32-.9.61-1.34.91-1.38.94-1.76 2.03-1.24 3.62l.05.17a3.63 3.63 0 0 1-1.6-1.38 3.87 3.87 0 0 1-.63-2.1c0-.37 0-.74-.05-1.1-.13-.9-.55-1.3-1.33-1.32a1.56 1.56 0 0 0-1.63 1.26c0 .06-.03.12-.05.2Z"/><path fill="#17191E" d="M.02 30.31s4.02-1.95 8.05-1.95l3.04-9.4c.11-.45.44-.76.82-.76.37 0 .7.31.82.76l3.04 9.4c4.77 0 8.05 1.95 8.05 1.95L17 11.71c-.2-.56-.53-.91-.98-.91H7.83c-.44 0-.76.35-.97.9L.02 30.31Zm42.37-5.97c0 1.64-2.05 2.62-4.88 2.62-1.85 0-2.5-.45-2.5-1.41 0-1 .8-1.49 2.65-1.49 1.67 0 3.09.03 4.73.23v.05Zm.03-2.04a21.37 21.37 0 0 0-4.37-.36c-5.32 0-7.82 1.25-7.82 4.18 0 3.04 1.71 4.2 5.68 4.2 3.35 0 5.63-.84 6.46-2.92h.14c-.03.5-.05 1-.05 1.4 0 1.07.18 1.16 1.06 1.16h4.15a16.9 16.9 0 0 1-.36-4c0-1.67.06-2.93.06-4.62 0-3.45-2.07-5.64-8.56-5.64-2.8 0-5.9.48-8.26 1.19.22.93.54 2.83.7 4.06 2.04-.96 4.95-1.37 7.2-1.37 3.11 0 3.97.71 3.97 2.15v.57Zm11.37 3c-.56.07-1.33.07-2.12.07-.83 0-1.6-.03-2.12-.1l-.02.58c0 2.85 1.87 4.52 8.45 4.52 6.2 0 8.2-1.64 8.2-4.55 0-2.74-1.33-4.09-7.2-4.39-4.58-.2-4.99-.7-4.99-1.28 0-.66.59-1 3.65-1 3.18 0 4.03.43 4.03 1.35v.2a46.13 46.13 0 0 1 4.24.03l.02-.55c0-3.36-2.8-4.46-8.2-4.46-6.08 0-8.13 1.49-8.13 4.39 0 2.6 1.64 4.23 7.48 4.48 4.3.14 4.77.62 4.77 1.28 0 .7-.7 1.03-3.71 1.03-3.47 0-4.35-.48-4.35-1.47v-.13Zm19.82-12.05a17.5 17.5 0 0 1-6.24 3.48c.03.84.03 2.4.03 3.24l1.5.02c-.02 1.63-.04 3.6-.04 4.9 0 3.04 1.6 5.32 6.58 5.32 2.1 0 3.5-.23 5.23-.6a43.77 43.77 0 0 1-.46-4.13c-1.03.34-2.34.53-3.78.53-2 0-2.82-.55-2.82-2.13 0-1.37 0-2.65.03-3.84 2.57.02 5.13.07 6.64.11-.02-1.18.03-2.9.1-4.04-2.2.04-4.65.07-6.68.07l.07-2.93h-.16Zm13.46 6.04a767.33 767.33 0 0 1 .07-3.18H82.6c.07 1.96.07 3.98.07 6.92 0 2.95-.03 4.99-.07 6.93h5.18c-.09-1.37-.11-3.68-.11-5.65 0-3.1 1.26-4 4.12-4 1.33 0 2.28.16 3.1.46.03-1.16.26-3.43.4-4.43-.86-.25-1.81-.41-2.96-.41-2.46-.03-4.26.98-5.1 3.38l-.17-.02Zm22.55 3.65c0 2.5-1.8 3.66-4.64 3.66-2.81 0-4.61-1.1-4.61-3.66s1.82-3.52 4.61-3.52c2.82 0 4.64 1.03 4.64 3.52Zm4.71-.11c0-4.96-3.87-7.18-9.35-7.18-5.5 0-9.23 2.22-9.23 7.18 0 4.94 3.49 7.59 9.21 7.59 5.77 0 9.37-2.65 9.37-7.6Z"/><defs><linearGradient id="a" x1="6.33" x2="19.43" y1="40.8" y2="34.6" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient></defs></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1440" height="1024" fill="none"><path fill="url(#a)" fill-rule="evenodd" d="M-217.58 475.75c91.82-72.02 225.52-29.38 341.2-44.74C240 415.56 372.33 315.14 466.77 384.9c102.9 76.02 44.74 246.76 90.31 366.31 29.83 78.24 90.48 136.14 129.48 210.23 57.92 109.99 169.67 208.23 155.9 331.77-13.52 121.26-103.42 264.33-224.23 281.37-141.96 20.03-232.72-220.96-374.06-196.99-151.7 25.73-172.68 330.24-325.85 315.72-128.6-12.2-110.9-230.73-128.15-358.76-12.16-90.14 65.87-176.25 44.1-264.57-26.42-107.2-167.12-163.46-176.72-273.45-10.15-116.29 33.01-248.75 124.87-320.79Z" clip-rule="evenodd" style="opacity:.154"/><path fill="url(#b)" fill-rule="evenodd" d="M1103.43 115.43c146.42-19.45 275.33-155.84 413.5-103.59 188.09 71.13 409 212.64 407.06 413.88-1.94 201.25-259.28 278.6-414.96 405.96-130 106.35-240.24 294.39-405.6 265.3-163.7-28.8-161.93-274.12-284.34-386.66-134.95-124.06-436-101.46-445.82-284.6-9.68-180.38 247.41-246.3 413.54-316.9 101.01-42.93 207.83 21.06 316.62 6.61Z" clip-rule="evenodd" style="opacity:.154"/><defs><linearGradient id="b" x1="373" x2="1995.44" y1="1100" y2="118.03" gradientUnits="userSpaceOnUse"><stop stop-color="#D83333"/><stop offset="1" stop-color="#F041FF"/></linearGradient><linearGradient id="a" x1="107.37" x2="1130.66" y1="1993.35" y2="1026.31" gradientUnits="userSpaceOnUse"><stop stop-color="#3245FF"/><stop offset="1" stop-color="#BC52EE"/></linearGradient></defs></svg>
@@ -0,0 +1,210 @@
1
+ ---
2
+ import astroLogo from '../assets/astro.svg';
3
+ import background from '../assets/background.svg';
4
+ ---
5
+
6
+ <div id="container">
7
+ <img id="background" src={background.src} alt="" fetchpriority="high" />
8
+ <main>
9
+ <section id="hero">
10
+ <a href="https://astro.build"
11
+ ><img src={astroLogo.src} width="115" height="48" alt="Astro Homepage" /></a
12
+ >
13
+ <h1>
14
+ To get started, open the <code><pre>src/pages</pre></code> directory in your project.
15
+ </h1>
16
+ <section id="links">
17
+ <a class="button" href="https://docs.astro.build">Read our docs</a>
18
+ <a href="https://astro.build/chat"
19
+ >Join our Discord <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 127.14 96.36"
20
+ ><path
21
+ fill="currentColor"
22
+ d="M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2a68.68 68.68 0 0 1-10.87 5.19 77 77 0 0 0 6.89 11.1 105.25 105.25 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53s5-12.74 11.43-12.74S54 46 53.89 53s-5.05 12.69-11.44 12.69Zm42.24 0C78.41 65.69 73.25 60 73.25 53s5-12.74 11.44-12.74S96.23 46 96.12 53s-5.04 12.69-11.43 12.69Z"
23
+ ></path></svg
24
+ >
25
+ </a>
26
+ </section>
27
+ </section>
28
+ </main>
29
+
30
+ <a href="https://astro.build/blog/astro-5/" id="news" class="box">
31
+ <svg width="32" height="32" fill="none" xmlns="http://www.w3.org/2000/svg"
32
+ ><path
33
+ d="M24.667 12c1.333 1.414 2 3.192 2 5.334 0 4.62-4.934 5.7-7.334 12C18.444 28.567 18 27.456 18 26c0-4.642 6.667-7.053 6.667-14Zm-5.334-5.333c1.6 1.65 2.4 3.43 2.4 5.333 0 6.602-8.06 7.59-6.4 17.334C13.111 27.787 12 25.564 12 22.666c0-4.434 7.333-8 7.333-16Zm-6-5.333C15.111 3.555 16 5.556 16 7.333c0 8.333-11.333 10.962-5.333 22-3.488-.774-6-4-6-8 0-8.667 8.666-10 8.666-20Z"
34
+ fill="#111827"></path></svg
35
+ >
36
+ <h2>What's New in Astro 5.0?</h2>
37
+ <p>
38
+ From content layers to server islands, click to learn more about the new features and
39
+ improvements in Astro 5.0
40
+ </p>
41
+ </a>
42
+ </div>
43
+
44
+ <style>
45
+ #background {
46
+ position: fixed;
47
+ top: 0;
48
+ left: 0;
49
+ width: 100%;
50
+ height: 100%;
51
+ z-index: -1;
52
+ filter: blur(100px);
53
+ }
54
+
55
+ #container {
56
+ font-family: Inter, Roboto, 'Helvetica Neue', 'Arial Nova', 'Nimbus Sans', Arial, sans-serif;
57
+ height: 100%;
58
+ }
59
+
60
+ main {
61
+ height: 100%;
62
+ display: flex;
63
+ justify-content: center;
64
+ }
65
+
66
+ #hero {
67
+ display: flex;
68
+ align-items: start;
69
+ flex-direction: column;
70
+ justify-content: center;
71
+ padding: 16px;
72
+ }
73
+
74
+ h1 {
75
+ font-size: 22px;
76
+ margin-top: 0.25em;
77
+ }
78
+
79
+ #links {
80
+ display: flex;
81
+ gap: 16px;
82
+ }
83
+
84
+ #links a {
85
+ display: flex;
86
+ align-items: center;
87
+ padding: 10px 12px;
88
+ color: #111827;
89
+ text-decoration: none;
90
+ transition: color 0.2s;
91
+ }
92
+
93
+ #links a:hover {
94
+ color: rgb(78, 80, 86);
95
+ }
96
+
97
+ #links a svg {
98
+ height: 1em;
99
+ margin-left: 8px;
100
+ }
101
+
102
+ #links a.button {
103
+ color: white;
104
+ background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
105
+ box-shadow:
106
+ inset 0 0 0 1px rgba(255, 255, 255, 0.12),
107
+ inset 0 -2px 0 rgba(0, 0, 0, 0.24);
108
+ border-radius: 10px;
109
+ }
110
+
111
+ #links a.button:hover {
112
+ color: rgb(230, 230, 230);
113
+ box-shadow: none;
114
+ }
115
+
116
+ pre {
117
+ font-family:
118
+ ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono',
119
+ monospace;
120
+ font-weight: normal;
121
+ background: linear-gradient(14deg, #d83333 0%, #f041ff 100%);
122
+ -webkit-background-clip: text;
123
+ -webkit-text-fill-color: transparent;
124
+ background-clip: text;
125
+ margin: 0;
126
+ }
127
+
128
+ h2 {
129
+ margin: 0 0 1em;
130
+ font-weight: normal;
131
+ color: #111827;
132
+ font-size: 20px;
133
+ }
134
+
135
+ p {
136
+ color: #4b5563;
137
+ font-size: 16px;
138
+ line-height: 24px;
139
+ letter-spacing: -0.006em;
140
+ margin: 0;
141
+ }
142
+
143
+ code {
144
+ display: inline-block;
145
+ background:
146
+ linear-gradient(66.77deg, #f3cddd 0%, #f5cee7 100%) padding-box,
147
+ linear-gradient(155deg, #d83333 0%, #f041ff 18%, #f5cee7 45%) border-box;
148
+ border-radius: 8px;
149
+ border: 1px solid transparent;
150
+ padding: 6px 8px;
151
+ }
152
+
153
+ .box {
154
+ padding: 16px;
155
+ background: rgba(255, 255, 255, 1);
156
+ border-radius: 16px;
157
+ border: 1px solid white;
158
+ }
159
+
160
+ #news {
161
+ position: absolute;
162
+ bottom: 16px;
163
+ right: 16px;
164
+ max-width: 300px;
165
+ text-decoration: none;
166
+ transition: background 0.2s;
167
+ backdrop-filter: blur(50px);
168
+ }
169
+
170
+ #news:hover {
171
+ background: rgba(255, 255, 255, 0.55);
172
+ }
173
+
174
+ @media screen and (max-height: 368px) {
175
+ #news {
176
+ display: none;
177
+ }
178
+ }
179
+
180
+ @media screen and (max-width: 768px) {
181
+ #container {
182
+ display: flex;
183
+ flex-direction: column;
184
+ }
185
+
186
+ #hero {
187
+ display: block;
188
+ padding-top: 10%;
189
+ }
190
+
191
+ #links {
192
+ flex-wrap: wrap;
193
+ }
194
+
195
+ #links a.button {
196
+ padding: 14px 18px;
197
+ }
198
+
199
+ #news {
200
+ right: 16px;
201
+ left: 16px;
202
+ bottom: 2.5rem;
203
+ max-width: 100%;
204
+ }
205
+
206
+ h1 {
207
+ line-height: 1.5;
208
+ }
209
+ }
210
+ </style>
@@ -0,0 +1,22 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width" />
6
+ <link rel="icon" type="image/svg+xml" href="/favicon.svg" />
7
+ <meta name="generator" content={Astro.generator} />
8
+ <title>Astro Basics</title>
9
+ </head>
10
+ <body>
11
+ <slot />
12
+ </body>
13
+ </html>
14
+
15
+ <style>
16
+ html,
17
+ body {
18
+ margin: 0;
19
+ width: 100%;
20
+ height: 100%;
21
+ }
22
+ </style>
@@ -0,0 +1,19 @@
1
+ import type { APIRoute } from 'astro';
2
+
3
+ export const GET: APIRoute = async ({ request }) => {
4
+ // Access Cloudflare runtime context
5
+ const runtime = request.cf;
6
+
7
+ return new Response(JSON.stringify({
8
+ message: "Hello from Astro API on Cloudflare!",
9
+ timestamp: new Date().toISOString(),
10
+ colo: runtime?.colo || "unknown",
11
+ country: runtime?.country || "unknown",
12
+ city: runtime?.city || "unknown",
13
+ }), {
14
+ status: 200,
15
+ headers: {
16
+ 'Content-Type': 'application/json',
17
+ },
18
+ });
19
+ };
@@ -0,0 +1,11 @@
1
+ ---
2
+ import Welcome from '../components/Welcome.astro';
3
+ import Layout from '../layouts/Layout.astro';
4
+
5
+ // Welcome to Astro! Wondering what to do next? Check out the Astro documentation at https://docs.astro.build
6
+ // Don't want to use any of this? Delete everything in this file, the `assets`, `components`, and `layouts` directories, and start fresh.
7
+ ---
8
+
9
+ <Layout>
10
+ <Welcome />
11
+ </Layout>
@@ -0,0 +1,18 @@
1
+ {
2
+ "extends": "astro/tsconfigs/strict",
3
+ "include": [
4
+ "alchemy.run.ts",
5
+ "types/**/*.ts",
6
+ ".astro/types.d.ts",
7
+ "**/*"
8
+ ],
9
+ "exclude": [
10
+ "dist"
11
+ ],
12
+ "compilerOptions": {
13
+ "types": [
14
+ "@cloudflare/workers-types",
15
+ "./types/env.d.ts"
16
+ ]
17
+ }
18
+ }
@@ -0,0 +1,16 @@
1
+ // This file infers types for the cloudflare:workers environment from your Alchemy Worker.
2
+ // @see https://alchemy.run/docs/concepts/bindings.html#type-safe-bindings
3
+
4
+ import type { worker } from "../alchemy.run.ts";
5
+
6
+ export type CloudflareEnv = typeof worker.Env;
7
+
8
+ declare global {
9
+ type Env = CloudflareEnv;
10
+ }
11
+
12
+ declare module "cloudflare:workers" {
13
+ namespace Cloudflare {
14
+ export interface Env extends CloudflareEnv {}
15
+ }
16
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "name": "website",
3
+ "main": "dist/_worker.js/index.js",
4
+ "compatibility_date": "2025-04-20",
5
+ "assets": { "binding": "ASSETS", "directory": "dist" }
6
+ }
@@ -0,0 +1,75 @@
1
+ # Nuxt Minimal Starter
2
+
3
+ Look at the [Nuxt documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
4
+
5
+ ## Setup
6
+
7
+ Make sure to install dependencies:
8
+
9
+ ```bash
10
+ # npm
11
+ npm install
12
+
13
+ # pnpm
14
+ pnpm install
15
+
16
+ # yarn
17
+ yarn install
18
+
19
+ # bun
20
+ bun install
21
+ ```
22
+
23
+ ## Development Server
24
+
25
+ Start the development server on `http://localhost:3000`:
26
+
27
+ ```bash
28
+ # npm
29
+ npm run dev
30
+
31
+ # pnpm
32
+ pnpm dev
33
+
34
+ # yarn
35
+ yarn dev
36
+
37
+ # bun
38
+ bun run dev
39
+ ```
40
+
41
+ ## Production
42
+
43
+ Build the application for production:
44
+
45
+ ```bash
46
+ # npm
47
+ npm run build
48
+
49
+ # pnpm
50
+ pnpm build
51
+
52
+ # yarn
53
+ yarn build
54
+
55
+ # bun
56
+ bun run build
57
+ ```
58
+
59
+ Locally preview production build:
60
+
61
+ ```bash
62
+ # npm
63
+ npm run preview
64
+
65
+ # pnpm
66
+ pnpm preview
67
+
68
+ # yarn
69
+ yarn preview
70
+
71
+ # bun
72
+ bun run preview
73
+ ```
74
+
75
+ Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.
@@ -0,0 +1 @@
1
+ ALCHEMY_PASSWORD=change-me
@@ -0,0 +1 @@
1
+ ALCHEMY_PASSWORD=change-me
@@ -0,0 +1,27 @@
1
+ # Nuxt dev/build outputs
2
+ .output
3
+ .data
4
+ .nuxt
5
+ .nitro
6
+ .cache
7
+ dist
8
+
9
+ # Node dependencies
10
+ node_modules
11
+
12
+ # Logs
13
+ logs
14
+ *.log
15
+
16
+ # Misc
17
+ .DS_Store
18
+ .fleet
19
+ .idea
20
+
21
+ # Local env files
22
+ .env
23
+ .env.*
24
+ !.env.example
25
+
26
+ .alchemy/
27
+ .env
@@ -0,0 +1,16 @@
1
+ /// <reference types="@types/node" />
2
+
3
+ import alchemy from "alchemy";
4
+ import { Nuxt } from "alchemy/cloudflare";
5
+
6
+ const app = await alchemy("my-alchemy-app");
7
+
8
+ export const worker = await Nuxt("website", {
9
+ command: "bun run build",
10
+ });
11
+
12
+ console.log({
13
+ url: worker.url,
14
+ });
15
+
16
+ await app.finalize();
@@ -0,0 +1,6 @@
1
+ <template>
2
+ <div>
3
+ <NuxtRouteAnnouncer />
4
+ <NuxtWelcome />
5
+ </div>
6
+ </template>
@@ -0,0 +1,13 @@
1
+ // https://nuxt.com/docs/api/configuration/nuxt-config
2
+ export default defineNuxtConfig({
3
+ compatibilityDate: '2025-05-15',
4
+ devtools: { enabled: true },
5
+ nitro: {
6
+ preset: "cloudflare_module",
7
+ cloudflare: {
8
+ deployConfig: true,
9
+ nodeCompat: true
10
+ }
11
+ },
12
+ modules: ["nitro-cloudflare-dev"],
13
+ });
@@ -0,0 +1,26 @@
1
+ {
2
+ "type": "module",
3
+ "name": "nuxt",
4
+ "private": true,
5
+ "scripts": {
6
+ "build": "nuxt build",
7
+ "deploy": "bun --env-file=./.env ./alchemy.run.ts",
8
+ "destroy": "bun --env-file=./.env ./alchemy.run.ts --destroy",
9
+ "dev": "nuxt dev",
10
+ "generate": "nuxt generate",
11
+ "postinstall": "nuxt prepare",
12
+ "preview": "nuxt preview"
13
+ },
14
+ "dependencies": {
15
+ "nuxt": "^3.17.5",
16
+ "vue": "^3.5.16",
17
+ "vue-router": "^4.5.1"
18
+ },
19
+ "devDependencies": {
20
+ "alchemy": "workspace:*",
21
+ "@cloudflare/workers-types": "^4.20250620.0",
22
+ "miniflare": "^4.20250617.3",
23
+ "nitro-cloudflare-dev": "^0.2.2",
24
+ "typescript": "^5.8.3"
25
+ }
26
+ }
@@ -0,0 +1,2 @@
1
+ User-Agent: *
2
+ Disallow:
@@ -0,0 +1,7 @@
1
+ // see: https://nuxt.com/docs/guide/directory-structure/server
2
+
3
+ export default defineEventHandler((event) => {
4
+ return {
5
+ hello: "world",
6
+ };
7
+ });
@@ -0,0 +1,5 @@
1
+ // see: https://nuxt.com/docs/guide/directory-structure/server#server-middleware
2
+
3
+ export default defineEventHandler((event) => {
4
+ event.context.auth = { user: 123 }
5
+ });
@@ -0,0 +1,5 @@
1
+ // see: https://nuxt.com/docs/guide/directory-structure/server#server-middleware
2
+
3
+ export default defineEventHandler((event) => {
4
+ console.log('New request: ' + getRequestURL(event))
5
+ })
@@ -0,0 +1,3 @@
1
+ {
2
+ "extends": "../.nuxt/tsconfig.server.json"
3
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ // https://nuxt.com/docs/guide/concepts/typescript
3
+ "extends": "./.nuxt/tsconfig.json",
4
+ "compilerOptions": {
5
+ "types": [
6
+ "@cloudflare/workers-types",
7
+ "./types/env.d.ts"
8
+ ]
9
+ },
10
+ "include": [
11
+ "alchemy.run.ts",
12
+ "types/**/*.ts",
13
+ "server/**/*.ts"
14
+ ]
15
+ }
@@ -0,0 +1,16 @@
1
+ // This file infers types for the cloudflare:workers environment from your Alchemy Worker.
2
+ // @see https://alchemy.run/docs/concepts/bindings.html#type-safe-bindings
3
+
4
+ import type { worker } from "../alchemy.run.ts";
5
+
6
+ export type CloudflareEnv = typeof worker.Env;
7
+
8
+ declare global {
9
+ type Env = CloudflareEnv;
10
+ }
11
+
12
+ declare module "cloudflare:workers" {
13
+ namespace Cloudflare {
14
+ export interface Env extends CloudflareEnv {}
15
+ }
16
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "files.associations": {
3
+ "wrangler.json": "jsonc"
4
+ }
5
+ }