create-cloudflare 0.0.0-e5037b92a → 0.0.0-e55f489db
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 +16849 -16817
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -10
- package/templates/analog/templates/worker-configuration.d.ts +1 -1
- package/templates/analog/templates/wrangler.jsonc +5 -0
- package/templates/angular/c3.ts +5 -98
- package/templates/angular/pages/c3.ts +135 -0
- package/templates/angular/pages/templates/src/server.ts +15 -0
- package/templates/angular/pages/templates/tools/copy-files.mjs +15 -0
- package/{templates-experimental/angular → templates/angular/workers}/c3.ts +46 -14
- package/templates/angular/workers/templates/src/server.ts +15 -0
- package/templates/angular/workers/templates/wrangler.jsonc +12 -0
- package/templates/astro/c3.ts +5 -109
- package/templates/astro/pages/c3.ts +99 -0
- package/templates/astro/pages/templates/js/wrangler.jsonc +8 -0
- package/templates/astro/pages/templates/ts/worker-configuration.d.ts +4 -0
- package/templates/astro/pages/templates/ts/wrangler.jsonc +8 -0
- package/{templates-experimental/astro → templates/astro/workers}/c3.ts +19 -35
- package/templates/astro/workers/templates/js/public/.assetsignore +2 -0
- package/templates/astro/workers/templates/js/wrangler.jsonc +15 -0
- package/templates/astro/workers/templates/ts/public/.assetsignore +2 -0
- package/templates/astro/workers/templates/ts/worker-configuration.d.ts +4 -0
- package/templates/astro/workers/templates/ts/wrangler.jsonc +15 -0
- package/templates/common/c3.ts +5 -1
- package/templates/common/js/package.json +1 -1
- package/templates/common/js/wrangler.jsonc +8 -0
- package/templates/common/ts/package.json +1 -1
- package/templates/common/ts/src/index.ts +1 -1
- package/templates/common/ts/tsconfig.json +37 -95
- package/templates/common/ts/worker-configuration.d.ts +1 -1
- package/templates/common/ts/wrangler.jsonc +8 -0
- package/templates/docusaurus/c3.ts +5 -24
- package/templates/docusaurus/pages/c3.ts +31 -0
- package/{templates-experimental/docusaurus → templates/docusaurus/workers}/c3.ts +3 -2
- package/templates/docusaurus/workers/templates/wrangler.jsonc +10 -0
- package/templates/gatsby/c3.ts +5 -45
- package/templates/gatsby/pages/c3.ts +51 -0
- package/{templates-experimental/gatsby → templates/gatsby/workers}/c3.ts +2 -2
- package/templates/gatsby/workers/templates/wrangler.jsonc +10 -0
- package/templates/hello-world/c3.ts +20 -3
- package/templates/hello-world/js/package.json +3 -3
- package/templates/hello-world/js/test/index.spec.js +1 -1
- package/templates/hello-world/js/vitest.config.js +1 -1
- package/templates/hello-world/js/wrangler.jsonc +8 -0
- package/templates/hello-world/py/.python-version +1 -0
- package/templates/hello-world/py/README.md +23 -0
- package/templates/hello-world/py/package.json +1 -1
- package/templates/hello-world/py/pyproject.toml +9 -0
- package/templates/hello-world/py/src/entry.py +3 -2
- package/templates/hello-world/py/uv.lock +22 -0
- package/templates/hello-world/py/wrangler.jsonc +9 -0
- package/templates/hello-world/ts/package.json +3 -3
- package/templates/hello-world/ts/src/index.ts +1 -1
- package/templates/hello-world/ts/test/env.d.ts +3 -0
- package/templates/hello-world/ts/test/tsconfig.json +1 -1
- package/templates/hello-world/ts/tsconfig.json +36 -95
- package/templates/hello-world/ts/vitest.config.mts +1 -1
- package/templates/hello-world/ts/worker-configuration.d.ts +7 -3
- package/templates/hello-world/ts/wrangler.jsonc +8 -0
- package/{templates-experimental → templates}/hello-world-assets-only/c3.ts +4 -3
- package/templates/hello-world-assets-only/templates/wrangler.jsonc +10 -0
- package/templates/hello-world-durable-object/c3.ts +9 -3
- package/templates/hello-world-durable-object/js/package.json +1 -1
- package/templates/hello-world-durable-object/js/src/index.js +13 -12
- package/templates/hello-world-durable-object/js/wrangler.jsonc +24 -0
- package/templates/hello-world-durable-object/py/.python-version +1 -0
- package/templates/hello-world-durable-object/py/README.md +23 -0
- package/templates/hello-world-durable-object/py/__dot__gitignore +68 -0
- package/templates/hello-world-durable-object/py/package.json +13 -0
- package/templates/hello-world-durable-object/py/pyproject.toml +9 -0
- package/templates/hello-world-durable-object/py/src/entry.py +66 -0
- package/templates/hello-world-durable-object/py/uv.lock +22 -0
- package/templates/hello-world-durable-object/py/wrangler.jsonc +27 -0
- package/templates/hello-world-durable-object/ts/package.json +1 -1
- package/templates/hello-world-durable-object/ts/src/index.ts +14 -13
- package/templates/hello-world-durable-object/ts/tsconfig.json +36 -95
- package/templates/hello-world-durable-object/ts/worker-configuration.d.ts +6 -4
- package/templates/hello-world-durable-object/ts/wrangler.jsonc +24 -0
- package/{templates-experimental → templates}/hello-world-durable-object-with-assets/c3.ts +6 -3
- package/{templates-experimental/hello-world-with-assets/py → templates/hello-world-durable-object-with-assets/js}/package.json +1 -1
- package/{templates-experimental → templates}/hello-world-durable-object-with-assets/js/src/index.js +14 -13
- package/templates/hello-world-durable-object-with-assets/js/wrangler.jsonc +28 -0
- package/templates/hello-world-durable-object-with-assets/py/.python-version +1 -0
- package/templates/hello-world-durable-object-with-assets/py/README.md +23 -0
- package/{templates-experimental/hello-world-durable-object-with-assets/js → templates/hello-world-durable-object-with-assets/py}/package.json +1 -1
- package/templates/hello-world-durable-object-with-assets/py/pyproject.toml +9 -0
- package/templates/hello-world-durable-object-with-assets/py/src/entry.py +66 -0
- package/templates/hello-world-durable-object-with-assets/py/uv.lock +22 -0
- package/templates/hello-world-durable-object-with-assets/py/wrangler.jsonc +31 -0
- package/{templates-experimental → templates}/hello-world-durable-object-with-assets/ts/package.json +1 -1
- package/templates/hello-world-durable-object-with-assets/ts/public/index.html +19 -0
- package/{templates-experimental → templates}/hello-world-durable-object-with-assets/ts/src/index.ts +13 -12
- package/templates/hello-world-durable-object-with-assets/ts/tsconfig.json +42 -0
- package/templates/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts +8 -0
- package/templates/hello-world-durable-object-with-assets/ts/wrangler.jsonc +28 -0
- package/templates/hello-world-with-assets/c3.ts +25 -0
- package/{templates-experimental → templates}/hello-world-with-assets/js/package.json +3 -3
- package/{templates-experimental/hello-world-with-assets/ts → templates/hello-world-with-assets/js}/public/index.html +2 -2
- package/{templates-experimental → templates}/hello-world-with-assets/js/vitest.config.js +1 -1
- package/templates/hello-world-with-assets/js/wrangler.jsonc +15 -0
- package/templates/hello-world-with-assets/py/.python-version +1 -0
- package/templates/hello-world-with-assets/py/README.md +23 -0
- package/templates/hello-world-with-assets/py/__dot__gitignore +68 -0
- package/templates/hello-world-with-assets/py/package.json +13 -0
- package/{templates-experimental/hello-world-with-assets/js → templates/hello-world-with-assets/py}/public/index.html +2 -2
- package/templates/hello-world-with-assets/py/pyproject.toml +9 -0
- package/templates/hello-world-with-assets/py/src/entry.py +11 -0
- package/templates/hello-world-with-assets/py/uv.lock +22 -0
- package/templates/hello-world-with-assets/py/wrangler.jsonc +15 -0
- package/{templates-experimental → templates}/hello-world-with-assets/ts/package.json +3 -3
- package/{templates-experimental/hello-world-with-assets/py → templates/hello-world-with-assets/ts}/public/index.html +2 -2
- package/{templates-experimental → templates}/hello-world-with-assets/ts/src/index.ts +1 -1
- package/templates/hello-world-with-assets/ts/test/env.d.ts +3 -0
- package/{templates-experimental → templates}/hello-world-with-assets/ts/test/tsconfig.json +1 -1
- package/templates/hello-world-with-assets/ts/tsconfig.json +44 -0
- package/{templates-experimental → templates}/hello-world-with-assets/ts/vitest.config.mts +1 -1
- package/templates/hello-world-with-assets/ts/worker-configuration.d.ts +7 -0
- package/templates/hello-world-with-assets/ts/wrangler.jsonc +15 -0
- package/templates/hono/c3.ts +5 -65
- package/templates/hono/pages/c3.ts +44 -0
- package/templates/hono/pages/templates/src/index.tsx +12 -0
- package/templates/hono/pages/templates/worker-configuration.d.ts +4 -0
- package/templates/hono/pages/templates/wrangler.jsonc +8 -0
- package/{templates-experimental/hono → templates/hono/workers}/c3.ts +3 -4
- package/templates/hono/workers/templates/worker-configuration.d.ts +4 -0
- package/templates/hono/workers/templates/wrangler.jsonc +9 -0
- package/templates/next/c3.ts +7 -236
- package/templates/next/{README.md → pages/README.md} +3 -4
- package/templates/next/{app → pages/app}/js/app/api/hello/route.js +4 -4
- package/templates/next/{app → pages/app}/ts/app/api/hello/route.ts +4 -5
- package/templates/next/pages/c3.ts +225 -0
- package/templates/next/pages/wrangler.jsonc +8 -0
- package/templates/next/workers/c3.ts +69 -0
- package/templates/next/workers/templates/.dev.vars +2 -0
- package/{templates-experimental/next → templates/next/workers}/templates/__dot__gitignore +2 -5
- package/templates/next/workers/templates/cloudflare-env.d.ts +5 -0
- package/templates/next/workers/templates/open-next.config.ts +9 -0
- package/templates/next/workers/templates/wrangler.jsonc +13 -0
- package/templates/nuxt/c3.ts +5 -130
- package/templates/nuxt/pages/c3.ts +147 -0
- package/templates/nuxt/pages/templates/worker-configuration.d.ts +4 -0
- package/templates/nuxt/pages/templates/wrangler.jsonc +5 -0
- package/{templates-experimental/nuxt → templates/nuxt/workers}/c3.ts +15 -4
- package/templates/nuxt/workers/templates/worker-configuration.d.ts +4 -0
- package/templates/nuxt/workers/templates/wrangler.jsonc +12 -0
- package/templates/openapi/c3.ts +5 -1
- 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/templates/openapi/ts/worker-configuration.d.ts +1 -1
- package/templates/openapi/ts/wrangler.jsonc +8 -0
- package/templates/pre-existing/c3.ts +35 -12
- package/templates/pre-existing/js/package.json +1 -1
- package/templates/queues/c3.ts +5 -1
- package/templates/queues/js/package.json +1 -1
- package/templates/queues/js/wrangler.jsonc +21 -0
- package/templates/queues/ts/package.json +1 -1
- package/templates/queues/ts/src/index.ts +1 -1
- package/templates/queues/ts/tsconfig.json +36 -95
- package/templates/queues/ts/worker-configuration.d.ts +1 -1
- package/templates/queues/ts/wrangler.jsonc +21 -0
- package/templates/qwik/c3.ts +5 -143
- package/templates/qwik/pages/c3.ts +150 -0
- package/templates/qwik/pages/templates/worker-configuration.d.ts +4 -0
- package/templates/qwik/pages/templates/wrangler.jsonc +8 -0
- package/{templates-experimental/qwik → templates/qwik/workers}/c3.ts +7 -8
- package/templates/qwik/workers/templates/worker-configuration.d.ts +4 -0
- package/templates/qwik/workers/templates/wrangler.jsonc +15 -0
- package/templates/react/c3.ts +5 -57
- package/templates/react/pages/c3.ts +63 -0
- package/templates/react/workers/c3.ts +183 -0
- package/templates/react/workers/js/src/App.css +45 -0
- package/templates/react/workers/js/src/App.jsx +58 -0
- package/templates/react/workers/js/src/assets/Cloudflare_Logo.svg +53 -0
- package/templates/react/workers/js/worker/index.js +13 -0
- package/templates/react/workers/js/wrangler.jsonc +9 -0
- package/templates/react/workers/ts/src/App.css +45 -0
- package/templates/react/workers/ts/src/App.tsx +58 -0
- package/templates/react/workers/ts/src/assets/Cloudflare_Logo.svg +51 -0
- package/templates/react/workers/ts/tsconfig.worker.json +8 -0
- package/templates/react/workers/ts/worker/index.ts +12 -0
- package/templates/react/workers/ts/worker-configuration.d.ts +5 -0
- package/templates/react/workers/ts/wrangler.jsonc +9 -0
- package/templates/react-router/c3.ts +53 -0
- package/templates/react-router/templates/worker-configuration.d.ts +8 -0
- package/templates/remix/c3.ts +6 -63
- package/{templates-experimental/remix → templates/remix/pages}/c3.ts +6 -14
- package/templates/remix/pages/templates/worker-configuration.d.ts +4 -0
- package/templates/remix/pages/templates/wrangler.jsonc +5 -0
- package/templates/remix/workers/c3.ts +52 -0
- package/templates/remix/workers/templates/public/.assetsignore +0 -0
- package/{templates-experimental/remix → templates/remix/workers}/templates/wrangler.toml +2 -2
- package/templates/scheduled/c3.ts +5 -1
- package/templates/scheduled/js/package.json +1 -1
- package/templates/scheduled/js/src/index.js +1 -1
- package/templates/scheduled/js/wrangler.jsonc +13 -0
- package/templates/scheduled/ts/package.json +1 -1
- package/templates/scheduled/ts/src/index.ts +11 -4
- package/templates/scheduled/ts/tsconfig.json +36 -95
- package/templates/scheduled/ts/worker-configuration.d.ts +1 -1
- package/templates/scheduled/ts/wrangler.jsonc +13 -0
- package/templates/solid/c3.ts +1 -1
- package/templates/solid/templates/wrangler.jsonc +8 -0
- package/templates/svelte/c3.ts +6 -128
- package/templates/svelte/pages/c3.ts +160 -0
- package/templates/svelte/pages/templates/wrangler.jsonc +5 -0
- package/{templates-experimental/svelte → templates/svelte/workers}/c3.ts +7 -10
- package/templates/svelte/workers/templates/static/.assetsignore +2 -0
- package/templates/svelte/workers/templates/wrangler.jsonc +12 -0
- package/templates/vue/c3.ts +5 -25
- package/templates/vue/pages/c3.ts +31 -0
- package/templates/vue/workers/c3.ts +98 -0
- package/templates/vue/workers/js/server/index.js +13 -0
- package/templates/vue/workers/js/src/App.vue +107 -0
- package/templates/vue/workers/js/src/components/HelloWorld.vue +47 -0
- package/templates/vue/workers/js/vite.config.js +21 -0
- package/templates/vue/workers/js/wrangler.jsonc +11 -0
- package/templates/vue/workers/ts/server/index.ts +12 -0
- package/templates/vue/workers/ts/src/App.vue +107 -0
- package/templates/vue/workers/ts/src/components/HelloWorld.vue +44 -0
- package/templates/vue/workers/ts/tsconfig.worker.json +8 -0
- package/templates/vue/workers/ts/vite.config.ts +21 -0
- package/templates/vue/workers/ts/worker-configuration.d.ts +6 -0
- package/templates/vue/workers/ts/wrangler.jsonc +11 -0
- package/templates-experimental/solid/c3.ts +8 -51
- package/templates-experimental/solid/templates/wrangler.jsonc +15 -0
- package/templates/analog/templates/wrangler.toml +0 -85
- package/templates/angular/templates/server.ts +0 -34
- package/templates/angular/templates/tools/alter-polyfills.mjs +0 -27
- package/templates/angular/templates/tools/copy-files.mjs +0 -9
- package/templates/angular/templates/tools/paths.mjs +0 -9
- package/templates/astro/templates/wrangler.toml +0 -85
- package/templates/common/js/wrangler.toml +0 -113
- package/templates/common/ts/wrangler.toml +0 -113
- package/templates/hello-world/js/wrangler.toml +0 -114
- package/templates/hello-world/py/wrangler.toml +0 -114
- package/templates/hello-world/ts/wrangler.toml +0 -114
- package/templates/hello-world-durable-object/js/wrangler.toml +0 -113
- package/templates/hello-world-durable-object/ts/wrangler.toml +0 -113
- package/templates/hono/snippets/appDeclaration.ts +0 -1
- package/templates/hono/templates/worker-configuration.d.ts +0 -4
- package/templates/hono/templates/wrangler.toml +0 -113
- package/templates/next/env.d.ts +0 -5
- package/templates/next/wrangler.toml +0 -86
- package/templates/nuxt/templates/worker-configuration.d.ts +0 -4
- package/templates/nuxt/templates/wrangler.toml +0 -86
- package/templates/openapi/ts/wrangler.toml +0 -113
- package/templates/pre-existing/js/wrangler.toml +0 -4
- package/templates/queues/js/wrangler.toml +0 -118
- package/templates/queues/ts/wrangler.toml +0 -118
- package/templates/qwik/templates/worker-configuration.d.ts +0 -4
- package/templates/qwik/templates/wrangler.toml +0 -86
- package/templates/remix/templates/worker-configuration.d.ts +0 -4
- package/templates/remix/templates/wrangler.toml +0 -85
- package/templates/scheduled/js/wrangler.toml +0 -119
- package/templates/scheduled/ts/wrangler.toml +0 -119
- package/templates/solid/templates/wrangler.toml +0 -84
- package/templates/svelte/js/wrangler.toml +0 -85
- package/templates/svelte/ts/wrangler.toml +0 -85
- package/templates-experimental/angular/templates/server.ts +0 -34
- package/templates-experimental/angular/templates/tools/alter-polyfills.mjs +0 -32
- package/templates-experimental/angular/templates/wrangler.toml +0 -11
- package/templates-experimental/astro/templates/wrangler.toml +0 -12
- package/templates-experimental/docusaurus/templates/wrangler.toml +0 -10
- package/templates-experimental/gatsby/templates/wrangler.toml +0 -10
- package/templates-experimental/hello-world-assets-only/templates/wrangler.toml +0 -10
- package/templates-experimental/hello-world-durable-object-with-assets/js/wrangler.toml +0 -24
- package/templates-experimental/hello-world-durable-object-with-assets/ts/tsconfig.json +0 -101
- package/templates-experimental/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts +0 -5
- package/templates-experimental/hello-world-durable-object-with-assets/ts/wrangler.toml +0 -24
- package/templates-experimental/hello-world-with-assets/c3.ts +0 -22
- package/templates-experimental/hello-world-with-assets/js/wrangler.toml +0 -12
- package/templates-experimental/hello-world-with-assets/py/src/entry.py +0 -9
- package/templates-experimental/hello-world-with-assets/py/wrangler.toml +0 -12
- package/templates-experimental/hello-world-with-assets/ts/tsconfig.json +0 -103
- package/templates-experimental/hello-world-with-assets/ts/wrangler.toml +0 -12
- package/templates-experimental/hono/templates/worker-configuration.d.ts +0 -4
- package/templates-experimental/hono/templates/wrangler.toml +0 -5
- package/templates-experimental/next/c3.ts +0 -52
- package/templates-experimental/next/templates/wrangler.toml +0 -12
- package/templates-experimental/nuxt/templates/cloudflare-preset/nitro.config.ts +0 -27
- package/templates-experimental/nuxt/templates/worker-configuration.d.ts +0 -4
- package/templates-experimental/nuxt/templates/wrangler.toml +0 -11
- package/templates-experimental/qwik/templates/public/.assetsignore +0 -4
- package/templates-experimental/qwik/templates/worker-configuration.d.ts +0 -4
- package/templates-experimental/qwik/templates/wrangler.toml +0 -12
- package/templates-experimental/remix/templates/public/.assetsignore +0 -4
- package/templates-experimental/remix/templates/worker-configuration.d.ts +0 -4
- package/templates-experimental/solid/templates/wrangler.toml +0 -12
- package/templates-experimental/svelte/js/static/.assetsignore +0 -4
- package/templates-experimental/svelte/js/wrangler.toml +0 -11
- package/templates-experimental/svelte/ts/static/.assetsignore +0 -4
- package/templates-experimental/svelte/ts/wrangler.toml +0 -11
- /package/templates/angular/{templates → pages/templates}/src/_routes.json +0 -0
- /package/{templates-experimental/astro/snippets/runtimeDeclaration.ts → templates/astro/pages/templates/ts/src/env.d.ts} +0 -0
- /package/templates/astro/{snippets/runtimeDeclaration.ts → workers/templates/ts/src/env.d.ts} +0 -0
- /package/{templates-experimental → templates}/hello-world-assets-only/templates/package.json +0 -0
- /package/{templates-experimental → templates}/hello-world-assets-only/templates/public/index.html +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/js/.editorconfig +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/js/.prettierrc +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/js/__dot__gitignore +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/js/public/index.html +0 -0
- /package/{templates-experimental/hello-world-with-assets → templates/hello-world-durable-object-with-assets}/py/__dot__gitignore +0 -0
- /package/{templates-experimental/hello-world-durable-object-with-assets/ts → templates/hello-world-durable-object-with-assets/py}/public/index.html +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/ts/.editorconfig +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/ts/.prettierrc +0 -0
- /package/{templates-experimental → templates}/hello-world-durable-object-with-assets/ts/__dot__gitignore +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/js/.editorconfig +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/js/.prettierrc +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/js/__dot__gitignore +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/js/src/index.js +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/js/test/index.spec.js +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/ts/.editorconfig +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/ts/.prettierrc +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/ts/__dot__gitignore +0 -0
- /package/{templates-experimental → templates}/hello-world-with-assets/ts/test/index.spec.ts +0 -0
- /package/{templates-experimental/hono → templates/hono/workers}/templates/public/index.html +0 -0
- /package/{templates-experimental/hono → templates/hono/workers}/templates/src/index.ts +0 -0
- /package/templates/next/{app → pages/app}/js/app/not-found.js +0 -0
- /package/templates/next/{app → pages/app}/ts/app/not-found.tsx +0 -0
- /package/{templates-experimental/next/templates → templates/next/pages}/env.d.ts +0 -0
- /package/templates/next/pages/{js → pages/js}/pages/api/hello.js +0 -0
- /package/templates/next/pages/{ts → pages/ts}/pages/api/hello.ts +0 -0
- /package/{templates-experimental/nuxt → templates/nuxt/pages}/templates/env.d.ts +0 -0
- /package/templates/nuxt/{templates → workers/templates}/env.d.ts +0 -0
- /package/{templates-experimental/qwik → templates/qwik/pages}/snippets/getPlatformProxy.ts +0 -0
- /package/templates/qwik/{snippets → workers/snippets}/getPlatformProxy.ts +0 -0
- /package/{templates-experimental/astro → templates/qwik/workers}/templates/public/.assetsignore +0 -0
- /package/{templates-experimental/hello-world-with-assets/ts → templates/remix/workers/templates}/worker-configuration.d.ts +0 -0
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
pages_build_output_dir = ".svelte-kit/cloudflare"
|
|
5
|
-
|
|
6
|
-
# Automatically place your workloads in an optimal location to minimize latency.
|
|
7
|
-
# If you are running back-end logic in a Pages Function, running it closer to your back-end infrastructure
|
|
8
|
-
# rather than the end user may result in better performance.
|
|
9
|
-
# Docs: https://developers.cloudflare.com/pages/functions/smart-placement/#smart-placement
|
|
10
|
-
# [placement]
|
|
11
|
-
# mode = "smart"
|
|
12
|
-
|
|
13
|
-
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
|
14
|
-
# Docs:
|
|
15
|
-
# - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
|
|
16
|
-
# Note: Use secrets to store sensitive data.
|
|
17
|
-
# - https://developers.cloudflare.com/pages/functions/bindings/#secrets
|
|
18
|
-
# [vars]
|
|
19
|
-
# MY_VARIABLE = "production_value"
|
|
20
|
-
|
|
21
|
-
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
|
22
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#workers-ai
|
|
23
|
-
# [ai]
|
|
24
|
-
# binding = "AI"
|
|
25
|
-
|
|
26
|
-
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
|
27
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#d1-databases
|
|
28
|
-
# [[d1_databases]]
|
|
29
|
-
# binding = "MY_DB"
|
|
30
|
-
# database_name = "my-database"
|
|
31
|
-
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
32
|
-
|
|
33
|
-
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
34
|
-
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
35
|
-
# Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
|
|
36
|
-
# [[durable_objects.bindings]]
|
|
37
|
-
# name = "MY_DURABLE_OBJECT"
|
|
38
|
-
# class_name = "MyDurableObject"
|
|
39
|
-
# script_name = 'my-durable-object'
|
|
40
|
-
|
|
41
|
-
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
|
42
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#kv-namespaces
|
|
43
|
-
# [[kv_namespaces]]
|
|
44
|
-
# binding = "MY_KV_NAMESPACE"
|
|
45
|
-
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
46
|
-
|
|
47
|
-
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
|
48
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#queue-producers
|
|
49
|
-
# [[queues.producers]]
|
|
50
|
-
# binding = "MY_QUEUE"
|
|
51
|
-
# queue = "my-queue"
|
|
52
|
-
|
|
53
|
-
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
54
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#r2-buckets
|
|
55
|
-
# [[r2_buckets]]
|
|
56
|
-
# binding = "MY_BUCKET"
|
|
57
|
-
# bucket_name = "my-bucket"
|
|
58
|
-
|
|
59
|
-
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
|
60
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
|
|
61
|
-
# [[services]]
|
|
62
|
-
# binding = "MY_SERVICE"
|
|
63
|
-
# service = "my-service"
|
|
64
|
-
|
|
65
|
-
# To use different bindings for preview and production environments, follow the examples below.
|
|
66
|
-
# When using environment-specific overrides for bindings, ALL bindings must be specified on a per-environment basis.
|
|
67
|
-
# Docs: https://developers.cloudflare.com/pages/functions/wrangler-configuration#environment-specific-overrides
|
|
68
|
-
|
|
69
|
-
######## PREVIEW environment config ########
|
|
70
|
-
|
|
71
|
-
# [env.preview.vars]
|
|
72
|
-
# API_KEY = "xyz789"
|
|
73
|
-
|
|
74
|
-
# [[env.preview.kv_namespaces]]
|
|
75
|
-
# binding = "MY_KV_NAMESPACE"
|
|
76
|
-
# id = "<PREVIEW_NAMESPACE_ID>"
|
|
77
|
-
|
|
78
|
-
######## PRODUCTION environment config ########
|
|
79
|
-
|
|
80
|
-
# [env.production.vars]
|
|
81
|
-
# API_KEY = "abc123"
|
|
82
|
-
|
|
83
|
-
# [[env.production.kv_namespaces]]
|
|
84
|
-
# binding = "MY_KV_NAMESPACE"
|
|
85
|
-
# id = "<PRODUCTION_NAMESPACE_ID>"
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
pages_build_output_dir = ".svelte-kit/cloudflare"
|
|
5
|
-
|
|
6
|
-
# Automatically place your workloads in an optimal location to minimize latency.
|
|
7
|
-
# If you are running back-end logic in a Pages Function, running it closer to your back-end infrastructure
|
|
8
|
-
# rather than the end user may result in better performance.
|
|
9
|
-
# Docs: https://developers.cloudflare.com/pages/functions/smart-placement/#smart-placement
|
|
10
|
-
# [placement]
|
|
11
|
-
# mode = "smart"
|
|
12
|
-
|
|
13
|
-
# Variable bindings. These are arbitrary, plaintext strings (similar to environment variables)
|
|
14
|
-
# Docs:
|
|
15
|
-
# - https://developers.cloudflare.com/pages/functions/bindings/#environment-variables
|
|
16
|
-
# Note: Use secrets to store sensitive data.
|
|
17
|
-
# - https://developers.cloudflare.com/pages/functions/bindings/#secrets
|
|
18
|
-
# [vars]
|
|
19
|
-
# MY_VARIABLE = "production_value"
|
|
20
|
-
|
|
21
|
-
# Bind the Workers AI model catalog. Run machine learning models, powered by serverless GPUs, on Cloudflare’s global network
|
|
22
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#workers-ai
|
|
23
|
-
# [ai]
|
|
24
|
-
# binding = "AI"
|
|
25
|
-
|
|
26
|
-
# Bind a D1 database. D1 is Cloudflare’s native serverless SQL database.
|
|
27
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#d1-databases
|
|
28
|
-
# [[d1_databases]]
|
|
29
|
-
# binding = "MY_DB"
|
|
30
|
-
# database_name = "my-database"
|
|
31
|
-
# database_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
|
|
32
|
-
|
|
33
|
-
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
34
|
-
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
35
|
-
# Docs: https://developers.cloudflare.com/workers/runtime-apis/durable-objects
|
|
36
|
-
# [[durable_objects.bindings]]
|
|
37
|
-
# name = "MY_DURABLE_OBJECT"
|
|
38
|
-
# class_name = "MyDurableObject"
|
|
39
|
-
# script_name = 'my-durable-object'
|
|
40
|
-
|
|
41
|
-
# Bind a KV Namespace. Use KV as persistent storage for small key-value pairs.
|
|
42
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#kv-namespaces
|
|
43
|
-
# [[kv_namespaces]]
|
|
44
|
-
# binding = "MY_KV_NAMESPACE"
|
|
45
|
-
# id = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
|
|
46
|
-
|
|
47
|
-
# Bind a Queue producer. Use this binding to schedule an arbitrary task that may be processed later by a Queue consumer.
|
|
48
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#queue-producers
|
|
49
|
-
# [[queues.producers]]
|
|
50
|
-
# binding = "MY_QUEUE"
|
|
51
|
-
# queue = "my-queue"
|
|
52
|
-
|
|
53
|
-
# Bind an R2 Bucket. Use R2 to store arbitrarily large blobs of data, such as files.
|
|
54
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#r2-buckets
|
|
55
|
-
# [[r2_buckets]]
|
|
56
|
-
# binding = "MY_BUCKET"
|
|
57
|
-
# bucket_name = "my-bucket"
|
|
58
|
-
|
|
59
|
-
# Bind another Worker service. Use this binding to call another Worker without network overhead.
|
|
60
|
-
# Docs: https://developers.cloudflare.com/pages/functions/bindings/#service-bindings
|
|
61
|
-
# [[services]]
|
|
62
|
-
# binding = "MY_SERVICE"
|
|
63
|
-
# service = "my-service"
|
|
64
|
-
|
|
65
|
-
# To use different bindings for preview and production environments, follow the examples below.
|
|
66
|
-
# When using environment-specific overrides for bindings, ALL bindings must be specified on a per-environment basis.
|
|
67
|
-
# Docs: https://developers.cloudflare.com/pages/functions/wrangler-configuration#environment-specific-overrides
|
|
68
|
-
|
|
69
|
-
######## PREVIEW environment config ########
|
|
70
|
-
|
|
71
|
-
# [env.preview.vars]
|
|
72
|
-
# API_KEY = "xyz789"
|
|
73
|
-
|
|
74
|
-
# [[env.preview.kv_namespaces]]
|
|
75
|
-
# binding = "MY_KV_NAMESPACE"
|
|
76
|
-
# id = "<PREVIEW_NAMESPACE_ID>"
|
|
77
|
-
|
|
78
|
-
######## PRODUCTION environment config ########
|
|
79
|
-
|
|
80
|
-
# [env.production.vars]
|
|
81
|
-
# API_KEY = "abc123"
|
|
82
|
-
|
|
83
|
-
# [[env.production.kv_namespaces]]
|
|
84
|
-
# binding = "MY_KV_NAMESPACE"
|
|
85
|
-
# id = "<PRODUCTION_NAMESPACE_ID>"
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { renderApplication } from "@angular/platform-server";
|
|
2
|
-
import bootstrap from "./src/main.server";
|
|
3
|
-
|
|
4
|
-
interface Env {
|
|
5
|
-
ASSETS: { fetch: typeof fetch };
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
// We attach the Cloudflare `fetch()` handler to the global scope
|
|
9
|
-
// so that we can export it when we process the Angular output.
|
|
10
|
-
// See tools/bundle.mjs
|
|
11
|
-
async function workerFetchHandler(request: Request, env: Env) {
|
|
12
|
-
const url = new URL(request.url);
|
|
13
|
-
console.log("render SSR", url.href);
|
|
14
|
-
|
|
15
|
-
// Get the root `index.html` content.
|
|
16
|
-
const indexUrl = new URL("/index.html", url);
|
|
17
|
-
const indexResponse = await env.ASSETS.fetch(new Request(indexUrl));
|
|
18
|
-
const document = await indexResponse.text();
|
|
19
|
-
|
|
20
|
-
const content = await renderApplication(bootstrap, {
|
|
21
|
-
document,
|
|
22
|
-
url: url.pathname,
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
// console.log("rendered SSR", content);
|
|
26
|
-
return new Response(content, indexResponse);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export default {
|
|
30
|
-
fetch: (request: Request, env: Env) =>
|
|
31
|
-
(globalThis as any)["__zone_symbol__Promise"].resolve(
|
|
32
|
-
workerFetchHandler(request, env),
|
|
33
|
-
),
|
|
34
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import fs from "node:fs";
|
|
2
|
-
import { EOL } from "node:os";
|
|
3
|
-
import { join } from "node:path";
|
|
4
|
-
import path from "node:path";
|
|
5
|
-
import { fileURLToPath } from "node:url";
|
|
6
|
-
const dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Split by lines and comment the banner
|
|
10
|
-
* ```
|
|
11
|
-
* import { createRequire } from 'node:module';
|
|
12
|
-
* globalThis['require'] ??= createRequire(import.meta.url);
|
|
13
|
-
* ```
|
|
14
|
-
*/
|
|
15
|
-
const serverPolyfillsFile = join(
|
|
16
|
-
dirname,
|
|
17
|
-
"../dist/server/polyfills.server.mjs"
|
|
18
|
-
);
|
|
19
|
-
const serverPolyfillsData = fs
|
|
20
|
-
.readFileSync(serverPolyfillsFile, "utf8")
|
|
21
|
-
.split(/\r?\n/);
|
|
22
|
-
|
|
23
|
-
for (let index = 0; index < 2; index++) {
|
|
24
|
-
if (serverPolyfillsData[index].includes("createRequire")) {
|
|
25
|
-
serverPolyfillsData[index] = "// " + serverPolyfillsData[index];
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
// Add needed polyfills
|
|
30
|
-
serverPolyfillsData.unshift(`globalThis['process'] = {};`);
|
|
31
|
-
|
|
32
|
-
fs.writeFileSync(serverPolyfillsFile, serverPolyfillsData.join(EOL));
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
main = "./dist/server/server.mjs"
|
|
5
|
-
assets = { directory = "./dist/browser", binding = "ASSETS" }
|
|
6
|
-
|
|
7
|
-
# Workers Logs
|
|
8
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
9
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
10
|
-
[observability]
|
|
11
|
-
enabled = true
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
compatibility_flags = ["nodejs_compat_v2"]
|
|
5
|
-
main = "./dist/_worker.js"
|
|
6
|
-
assets = { directory = "./dist", binding = "ASSETS" }
|
|
7
|
-
|
|
8
|
-
# Workers Logs
|
|
9
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
10
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
11
|
-
[observability]
|
|
12
|
-
enabled = true
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
assets = { directory = "./build" }
|
|
5
|
-
|
|
6
|
-
# Workers Logs
|
|
7
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
8
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
9
|
-
[observability]
|
|
10
|
-
enabled = true
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
assets = { directory = "./public" }
|
|
5
|
-
|
|
6
|
-
# Workers Logs
|
|
7
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
8
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
9
|
-
[observability]
|
|
10
|
-
enabled = true
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
compatibility_date = "<TBD>"
|
|
4
|
-
assets = { directory = "./public" }
|
|
5
|
-
|
|
6
|
-
# Workers Logs
|
|
7
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
8
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
9
|
-
[observability]
|
|
10
|
-
enabled = true
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
main = "src/index.js"
|
|
4
|
-
compatibility_date = "<TBD>"
|
|
5
|
-
assets = { directory = "./public", binding = "ASSETS" }
|
|
6
|
-
|
|
7
|
-
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
8
|
-
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
9
|
-
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
10
|
-
[[durable_objects.bindings]]
|
|
11
|
-
name = "MY_DURABLE_OBJECT"
|
|
12
|
-
class_name = "MyDurableObject"
|
|
13
|
-
|
|
14
|
-
# Durable Object migrations.
|
|
15
|
-
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
|
16
|
-
[[migrations]]
|
|
17
|
-
tag = "v1"
|
|
18
|
-
new_classes = ["MyDurableObject"]
|
|
19
|
-
|
|
20
|
-
# Workers Logs
|
|
21
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
22
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
23
|
-
[observability]
|
|
24
|
-
enabled = true
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Projects */
|
|
6
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
|
9
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
|
10
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
-
|
|
13
|
-
/* Language and Environment */
|
|
14
|
-
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
-
"lib": ["es2021"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
|
16
|
-
"jsx": "react-jsx" /* Specify what JSX code is generated. */,
|
|
17
|
-
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
18
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
|
20
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
|
22
|
-
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
|
23
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
-
|
|
26
|
-
/* Modules */
|
|
27
|
-
"module": "es2022" /* Specify what module code is generated. */,
|
|
28
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
29
|
-
"moduleResolution": "node" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
30
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
31
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
32
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
33
|
-
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
|
34
|
-
"types": ["@cloudflare/workers-types"] /* Specify type package names to be included without being referenced in a source file. */,
|
|
35
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
36
|
-
"resolveJsonModule": true /* Enable importing .json files */,
|
|
37
|
-
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
|
38
|
-
|
|
39
|
-
/* JavaScript Support */
|
|
40
|
-
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
|
|
41
|
-
"checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
|
|
42
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
|
43
|
-
|
|
44
|
-
/* Emit */
|
|
45
|
-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
46
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
47
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
48
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
49
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
50
|
-
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
51
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
52
|
-
"noEmit": true /* Disable emitting files from a compilation. */,
|
|
53
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
54
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
|
55
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
56
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
57
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
58
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
59
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
60
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
61
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
62
|
-
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
|
63
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
|
64
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
65
|
-
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
|
66
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
67
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
68
|
-
|
|
69
|
-
/* Interop Constraints */
|
|
70
|
-
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
|
71
|
-
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
|
72
|
-
// "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
|
73
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
74
|
-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
75
|
-
|
|
76
|
-
/* Type Checking */
|
|
77
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
78
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
|
79
|
-
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
|
80
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
81
|
-
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
|
82
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
83
|
-
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
|
84
|
-
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
|
85
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
86
|
-
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
|
87
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
|
88
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
89
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
90
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
91
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
92
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
93
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
|
94
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
95
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
96
|
-
|
|
97
|
-
/* Completeness */
|
|
98
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
99
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
100
|
-
}
|
|
101
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
main = "src/index.ts"
|
|
4
|
-
compatibility_date = "<TBD>"
|
|
5
|
-
assets = { directory = "./public", binding = "ASSETS" }
|
|
6
|
-
|
|
7
|
-
# Bind a Durable Object. Durable objects are a scale-to-zero compute primitive based on the actor model.
|
|
8
|
-
# Durable Objects can live for as long as needed. Use these when you need a long-running "server", such as in realtime apps.
|
|
9
|
-
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#durable-objects
|
|
10
|
-
[[durable_objects.bindings]]
|
|
11
|
-
name = "MY_DURABLE_OBJECT"
|
|
12
|
-
class_name = "MyDurableObject"
|
|
13
|
-
|
|
14
|
-
# Durable Object migrations.
|
|
15
|
-
# Docs: https://developers.cloudflare.com/workers/wrangler/configuration/#migrations
|
|
16
|
-
[[migrations]]
|
|
17
|
-
tag = "v1"
|
|
18
|
-
new_classes = ["MyDurableObject"]
|
|
19
|
-
|
|
20
|
-
# Workers Logs
|
|
21
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
22
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
23
|
-
[observability]
|
|
24
|
-
enabled = true
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
configVersion: 1,
|
|
3
|
-
id: "hello-world-with-assets",
|
|
4
|
-
path: "templates-experimental/hello-world-with-assets",
|
|
5
|
-
displayName: "Hello World - Worker with Assets",
|
|
6
|
-
description:
|
|
7
|
-
"Get started with a basic Worker that also serves static assets, in the language of your choice",
|
|
8
|
-
platform: "workers",
|
|
9
|
-
copyFiles: {
|
|
10
|
-
variants: {
|
|
11
|
-
js: {
|
|
12
|
-
path: "./js",
|
|
13
|
-
},
|
|
14
|
-
ts: {
|
|
15
|
-
path: "./ts",
|
|
16
|
-
},
|
|
17
|
-
python: {
|
|
18
|
-
path: "./py",
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
main = "src/index.js"
|
|
4
|
-
compatibility_date = "<TBD>"
|
|
5
|
-
compatibility_flags = ["nodejs_compat"]
|
|
6
|
-
assets = { directory = "./public", binding = "ASSETS" }
|
|
7
|
-
|
|
8
|
-
# Workers Logs
|
|
9
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
10
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
11
|
-
[observability]
|
|
12
|
-
enabled = true
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
from js import Response, URL, crypto
|
|
2
|
-
|
|
3
|
-
async def on_fetch(request, env):
|
|
4
|
-
url = URL.new(request.url)
|
|
5
|
-
if url.pathname == '/message':
|
|
6
|
-
return Response.new('Hello, World!')
|
|
7
|
-
if url.pathname == '/random':
|
|
8
|
-
return Response.new(crypto.randomUUID())
|
|
9
|
-
return Response.new('Not Found', {'status': 404})
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
#:schema node_modules/wrangler/config-schema.json
|
|
2
|
-
name = "<TBD>"
|
|
3
|
-
main = "src/entry.py"
|
|
4
|
-
compatibility_flags = ["python_workers"]
|
|
5
|
-
compatibility_date = "<TBD>"
|
|
6
|
-
assets = { directory = "./public", binding = "ASSETS" }
|
|
7
|
-
|
|
8
|
-
# Workers Logs
|
|
9
|
-
# Docs: https://developers.cloudflare.com/workers/observability/logs/workers-logs/
|
|
10
|
-
# Configuration: https://developers.cloudflare.com/workers/observability/logs/workers-logs/#enable-workers-logs
|
|
11
|
-
[observability]
|
|
12
|
-
enabled = true
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
/* Visit https://aka.ms/tsconfig.json to read more about this file */
|
|
4
|
-
|
|
5
|
-
/* Projects */
|
|
6
|
-
// "incremental": true, /* Enable incremental compilation */
|
|
7
|
-
// "composite": true, /* Enable constraints that allow a TypeScript project to be used with project references. */
|
|
8
|
-
// "tsBuildInfoFile": "./", /* Specify the folder for .tsbuildinfo incremental compilation files. */
|
|
9
|
-
// "disableSourceOfProjectReferenceRedirect": true, /* Disable preferring source files instead of declaration files when referencing composite projects */
|
|
10
|
-
// "disableSolutionSearching": true, /* Opt a project out of multi-project reference checking when editing. */
|
|
11
|
-
// "disableReferencedProjectLoad": true, /* Reduce the number of projects loaded automatically by TypeScript. */
|
|
12
|
-
|
|
13
|
-
/* Language and Environment */
|
|
14
|
-
"target": "es2021" /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */,
|
|
15
|
-
"lib": ["es2021"] /* Specify a set of bundled library declaration files that describe the target runtime environment. */,
|
|
16
|
-
"jsx": "react-jsx" /* Specify what JSX code is generated. */,
|
|
17
|
-
// "experimentalDecorators": true, /* Enable experimental support for TC39 stage 2 draft decorators. */
|
|
18
|
-
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
|
|
19
|
-
// "jsxFactory": "", /* Specify the JSX factory function used when targeting React JSX emit, e.g. 'React.createElement' or 'h' */
|
|
20
|
-
// "jsxFragmentFactory": "", /* Specify the JSX Fragment reference used for fragments when targeting React JSX emit e.g. 'React.Fragment' or 'Fragment'. */
|
|
21
|
-
// "jsxImportSource": "", /* Specify module specifier used to import the JSX factory functions when using `jsx: react-jsx*`.` */
|
|
22
|
-
// "reactNamespace": "", /* Specify the object invoked for `createElement`. This only applies when targeting `react` JSX emit. */
|
|
23
|
-
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
24
|
-
// "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
25
|
-
|
|
26
|
-
/* Modules */
|
|
27
|
-
"module": "es2022" /* Specify what module code is generated. */,
|
|
28
|
-
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
29
|
-
"moduleResolution": "Bundler" /* Specify how TypeScript looks up a file from a given module specifier. */,
|
|
30
|
-
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
31
|
-
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
32
|
-
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
33
|
-
// "typeRoots": [], /* Specify multiple folders that act like `./node_modules/@types`. */
|
|
34
|
-
"types": ["@cloudflare/workers-types"] /* Specify type package names to be included without being referenced in a source file. */,
|
|
35
|
-
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
|
|
36
|
-
"resolveJsonModule": true /* Enable importing .json files */,
|
|
37
|
-
// "noResolve": true, /* Disallow `import`s, `require`s or `<reference>`s from expanding the number of files TypeScript should add to a project. */
|
|
38
|
-
|
|
39
|
-
/* JavaScript Support */
|
|
40
|
-
"allowJs": true /* Allow JavaScript files to be a part of your program. Use the `checkJS` option to get errors from these files. */,
|
|
41
|
-
"checkJs": false /* Enable error reporting in type-checked JavaScript files. */,
|
|
42
|
-
// "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from `node_modules`. Only applicable with `allowJs`. */
|
|
43
|
-
|
|
44
|
-
/* Emit */
|
|
45
|
-
// "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
46
|
-
// "declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
47
|
-
// "emitDeclarationOnly": true, /* Only output d.ts files and not JavaScript files. */
|
|
48
|
-
// "sourceMap": true, /* Create source map files for emitted JavaScript files. */
|
|
49
|
-
// "outFile": "./", /* Specify a file that bundles all outputs into one JavaScript file. If `declaration` is true, also designates a file that bundles all .d.ts output. */
|
|
50
|
-
// "outDir": "./", /* Specify an output folder for all emitted files. */
|
|
51
|
-
// "removeComments": true, /* Disable emitting comments. */
|
|
52
|
-
"noEmit": true /* Disable emitting files from a compilation. */,
|
|
53
|
-
// "importHelpers": true, /* Allow importing helper functions from tslib once per project, instead of including them per-file. */
|
|
54
|
-
// "importsNotUsedAsValues": "remove", /* Specify emit/checking behavior for imports that are only used for types */
|
|
55
|
-
// "downlevelIteration": true, /* Emit more compliant, but verbose and less performant JavaScript for iteration. */
|
|
56
|
-
// "sourceRoot": "", /* Specify the root path for debuggers to find the reference source code. */
|
|
57
|
-
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
|
|
58
|
-
// "inlineSourceMap": true, /* Include sourcemap files inside the emitted JavaScript. */
|
|
59
|
-
// "inlineSources": true, /* Include source code in the sourcemaps inside the emitted JavaScript. */
|
|
60
|
-
// "emitBOM": true, /* Emit a UTF-8 Byte Order Mark (BOM) in the beginning of output files. */
|
|
61
|
-
// "newLine": "crlf", /* Set the newline character for emitting files. */
|
|
62
|
-
// "stripInternal": true, /* Disable emitting declarations that have `@internal` in their JSDoc comments. */
|
|
63
|
-
// "noEmitHelpers": true, /* Disable generating custom helper functions like `__extends` in compiled output. */
|
|
64
|
-
// "noEmitOnError": true, /* Disable emitting files if any type checking errors are reported. */
|
|
65
|
-
// "preserveConstEnums": true, /* Disable erasing `const enum` declarations in generated code. */
|
|
66
|
-
// "declarationDir": "./", /* Specify the output directory for generated declaration files. */
|
|
67
|
-
// "preserveValueImports": true, /* Preserve unused imported values in the JavaScript output that would otherwise be removed. */
|
|
68
|
-
|
|
69
|
-
/* Interop Constraints */
|
|
70
|
-
"isolatedModules": true /* Ensure that each file can be safely transpiled without relying on other imports. */,
|
|
71
|
-
"allowSyntheticDefaultImports": true /* Allow 'import x from y' when a module doesn't have a default export. */,
|
|
72
|
-
// "esModuleInterop": true /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables `allowSyntheticDefaultImports` for type compatibility. */,
|
|
73
|
-
// "preserveSymlinks": true, /* Disable resolving symlinks to their realpath. This correlates to the same flag in node. */
|
|
74
|
-
"forceConsistentCasingInFileNames": true /* Ensure that casing is correct in imports. */,
|
|
75
|
-
|
|
76
|
-
/* Type Checking */
|
|
77
|
-
"strict": true /* Enable all strict type-checking options. */,
|
|
78
|
-
// "noImplicitAny": true, /* Enable error reporting for expressions and declarations with an implied `any` type.. */
|
|
79
|
-
// "strictNullChecks": true, /* When type checking, take into account `null` and `undefined`. */
|
|
80
|
-
// "strictFunctionTypes": true, /* When assigning functions, check to ensure parameters and the return values are subtype-compatible. */
|
|
81
|
-
// "strictBindCallApply": true, /* Check that the arguments for `bind`, `call`, and `apply` methods match the original function. */
|
|
82
|
-
// "strictPropertyInitialization": true, /* Check for class properties that are declared but not set in the constructor. */
|
|
83
|
-
// "noImplicitThis": true, /* Enable error reporting when `this` is given the type `any`. */
|
|
84
|
-
// "useUnknownInCatchVariables": true, /* Type catch clause variables as 'unknown' instead of 'any'. */
|
|
85
|
-
// "alwaysStrict": true, /* Ensure 'use strict' is always emitted. */
|
|
86
|
-
// "noUnusedLocals": true, /* Enable error reporting when a local variables aren't read. */
|
|
87
|
-
// "noUnusedParameters": true, /* Raise an error when a function parameter isn't read */
|
|
88
|
-
// "exactOptionalPropertyTypes": true, /* Interpret optional property types as written, rather than adding 'undefined'. */
|
|
89
|
-
// "noImplicitReturns": true, /* Enable error reporting for codepaths that do not explicitly return in a function. */
|
|
90
|
-
// "noFallthroughCasesInSwitch": true, /* Enable error reporting for fallthrough cases in switch statements. */
|
|
91
|
-
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
|
|
92
|
-
// "noImplicitOverride": true, /* Ensure overriding members in derived classes are marked with an override modifier. */
|
|
93
|
-
// "noPropertyAccessFromIndexSignature": true, /* Enforces using indexed accessors for keys declared using an indexed type */
|
|
94
|
-
// "allowUnusedLabels": true, /* Disable error reporting for unused labels. */
|
|
95
|
-
// "allowUnreachableCode": true, /* Disable error reporting for unreachable code. */
|
|
96
|
-
|
|
97
|
-
/* Completeness */
|
|
98
|
-
// "skipDefaultLibCheck": true, /* Skip type checking .d.ts files that are included with TypeScript. */
|
|
99
|
-
"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
100
|
-
},
|
|
101
|
-
"exclude": ["test"],
|
|
102
|
-
"include": ["worker-configuration.d.ts", "src/**/*.ts"]
|
|
103
|
-
}
|