diff --git a/.changeset/angry-parents-post.md b/.changeset/angry-parents-post.md new file mode 100644 index 000000000000..f23660a436b3 --- /dev/null +++ b/.changeset/angry-parents-post.md @@ -0,0 +1,5 @@ +--- +"create-cloudflare": patch +--- + +Graduate Workers + Assets hello world templates from experimental status diff --git a/packages/create-cloudflare/e2e-tests/cli.test.ts b/packages/create-cloudflare/e2e-tests/cli.test.ts index 8606384a1b88..3853e7bed723 100644 --- a/packages/create-cloudflare/e2e-tests/cli.test.ts +++ b/packages/create-cloudflare/e2e-tests/cli.test.ts @@ -82,10 +82,9 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( ); expect(project.path).toExist(); - expect(output).toContain(`category Hello World example`); - expect(output).toContain(`type Hello World Worker`); + expect(output).toContain(`category Hello World Starter`); + expect(output).toContain(`type Worker + Assets`); expect(output).toContain(`lang TypeScript`); - expect(output).toContain(`no git`); expect(output).toContain(`no deploy`); }, ); @@ -128,7 +127,6 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( expect(project.path).toExist(); expect(output).toContain(`type Scheduled Worker (Cron Trigger)`); expect(output).toContain(`lang JavaScript`); - expect(output).toContain(`no git`); expect(output).toContain(`no deploy`); }, ); @@ -179,9 +177,8 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( ); expect(project.path).toExist(); - expect(output).toContain(`type Hello World Worker`); + expect(output).toContain(`type Worker + Assets`); expect(output).toContain(`lang TypeScript`); - expect(output).toContain(`no git`); expect(output).toContain(`no deploy`); } finally { fs.rmSync(existingFilePath, { @@ -272,8 +269,8 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( ); expect(project.path).toExist(); - expect(output).toContain(`category Hello World example`); - expect(output).toContain(`type Hello World Worker`); + expect(output).toContain(`category Hello World Starter`); + expect(output).toContain(`type Worker only`); expect(output).toContain(`lang Python`); }, ); @@ -379,7 +376,7 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( matcher: /What would you like to start with\?/, input: { type: "select", - target: "Hello World example", + target: "Hello World Starter", assertDefaultSelection: "Framework Starter", }, }, @@ -387,7 +384,7 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( matcher: /Which template would you like to use\?/, input: { type: "select", - target: "Hello World Worker Using Durable Objects", + target: "Worker + Durable Objects", }, }, { @@ -401,9 +398,8 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( matcher: /Which template would you like to use\?/, input: { type: "select", - target: "Hello World Worker", - assertDefaultSelection: - "Hello World Worker Using Durable Objects", + target: "Worker only", + assertDefaultSelection: "Worker + Durable Objects", }, }, { @@ -418,7 +414,7 @@ describe.skipIf(experimental || frameworkToTest || isQuarantineMode())( ); expect(project.path).toExist(); - expect(output).toContain(`type Hello World Worker`); + expect(output).toContain(`type Worker only`); expect(output).toContain(`lang JavaScript`); }, ); diff --git a/packages/create-cloudflare/e2e-tests/workers.test.ts b/packages/create-cloudflare/e2e-tests/workers.test.ts index e6d34ae4946a..40f002dfe70e 100644 --- a/packages/create-cloudflare/e2e-tests/workers.test.ts +++ b/packages/create-cloudflare/e2e-tests/workers.test.ts @@ -32,7 +32,35 @@ type WorkerTestConfig = RunnerConfig & { function getWorkerTests(opts: { experimental: boolean }): WorkerTestConfig[] { if (opts.experimental) { + // none currently + return []; + } else { return [ + { + template: "hello-world", + variants: ["ts", "js"], + verifyDeploy: { + route: "/", + expectedText: "Hello World!", + }, + verifyPreview: { + route: "/", + expectedText: "Hello World!", + }, + verifyTest: true, + }, + { + template: "hello-world", + variants: ["python"], + verifyDeploy: { + route: "/", + expectedText: "Hello World!", + }, + verifyPreview: { + route: "/", + expectedText: "Hello World!", + }, + }, { template: "hello-world-with-assets", variants: ["ts", "js"], @@ -78,34 +106,6 @@ function getWorkerTests(opts: { experimental: boolean }): WorkerTestConfig[] { verifyPreview: null, argv: ["--category", "hello-world"], }, - ]; - } else { - return [ - { - template: "hello-world", - variants: ["ts", "js"], - verifyDeploy: { - route: "/", - expectedText: "Hello World!", - }, - verifyPreview: { - route: "/", - expectedText: "Hello World!", - }, - verifyTest: true, - }, - { - template: "hello-world", - variants: ["python"], - verifyDeploy: { - route: "/", - expectedText: "Hello World!", - }, - verifyPreview: { - route: "/", - expectedText: "Hello World!", - }, - }, { template: "common", variants: ["ts", "js"], @@ -155,6 +155,7 @@ describe .skipIf( getFrameworkToTest({ experimental }) || isQuarantineMode() || + workerTests.length === 0 || process.platform === "win32", ) .concurrent(`E2E: Workers templates`, () => { diff --git a/packages/create-cloudflare/src/helpers/args.ts b/packages/create-cloudflare/src/helpers/args.ts index f4ae30d5786a..8efb70508b88 100644 --- a/packages/create-cloudflare/src/helpers/args.ts +++ b/packages/create-cloudflare/src/helpers/args.ts @@ -70,12 +70,12 @@ export const cliDefinition: ArgumentsDefinition = { const experimental = Boolean(args?.["experimental"]); if (experimental) { return [ - { name: "hello-world", description: "Hello World example" }, + { name: "hello-world", description: "Hello World Starter" }, { name: "web-framework", description: "Framework Starter" }, ]; } else { return [ - { name: "hello-world", description: "Hello World example" }, + { name: "hello-world", description: "Hello World Starter" }, { name: "web-framework", description: "Framework Starter" }, { name: "demo", description: "Application Starter" }, { diff --git a/packages/create-cloudflare/src/helpers/cli.ts b/packages/create-cloudflare/src/helpers/cli.ts index bdef3f33f29a..acb9b34970f1 100644 --- a/packages/create-cloudflare/src/helpers/cli.ts +++ b/packages/create-cloudflare/src/helpers/cli.ts @@ -48,7 +48,7 @@ export const isUpdateAvailable = async () => { export const C3_DEFAULTS: C3Args = { projectName: new Haikunator().haikunate({ tokenHex: true }), category: "hello-world", - type: "hello-world", + type: "hello-world-with-assets", framework: "analog", experimental: false, autoUpdate: true, @@ -57,11 +57,11 @@ export const C3_DEFAULTS: C3Args = { open: true, lang: "ts", template: - "cloudflare/workers-sdk/packages/create-cloudflare/templates/hello-world", + "cloudflare/workers-sdk/packages/create-cloudflare/templates/hello-world-with-assets", }; export const WRANGLER_DEFAULTS = { ...C3_DEFAULTS, - type: "hello-world", + type: "hello-world-with-assets", deploy: false, }; diff --git a/packages/create-cloudflare/src/templates.ts b/packages/create-cloudflare/src/templates.ts index 6e0717d767e8..bb74a6554706 100644 --- a/packages/create-cloudflare/src/templates.ts +++ b/packages/create-cloudflare/src/templates.ts @@ -19,9 +19,6 @@ import { writeJSON, } from "helpers/files"; import astroTemplateExperimental from "templates-experimental/astro/c3"; -import assetsOnlyTemplateExperimental from "templates-experimental/hello-world-assets-only/c3"; -import helloWorldWithDurableObjectAssetsTemplateExperimental from "templates-experimental/hello-world-durable-object-with-assets/c3"; -import helloWorldWithAssetsTemplateExperimental from "templates-experimental/hello-world-with-assets/c3"; import honoTemplateExperimental from "templates-experimental/hono/c3"; import nextTemplateExperimental from "templates-experimental/next/c3"; import qwikTemplateExperimental from "templates-experimental/qwik/c3"; @@ -34,8 +31,11 @@ import astroTemplate from "templates/astro/c3"; import commonTemplate from "templates/common/c3"; import docusaurusTemplate from "templates/docusaurus/c3"; import gatsbyTemplate from "templates/gatsby/c3"; +import assetsOnlyTemplate from "templates/hello-world-assets-only/c3"; +import helloWorldWithDurableObjectAssetsTemplate from "templates/hello-world-durable-object-with-assets/c3"; import helloWorldDurableObjectTemplate from "templates/hello-world-durable-object/c3"; -import helloWorldTemplate from "templates/hello-world/c3"; +import helloWorldWithAssetsTemplate from "templates/hello-world-with-assets/c3"; +import helloWorldWorkerTemplate from "templates/hello-world/c3"; import honoTemplate from "templates/hono/c3"; import nextTemplate from "templates/next/c3"; import nuxtTemplate from "templates/nuxt/c3"; @@ -206,19 +206,18 @@ export function getFrameworkMap({ experimental = false }): TemplateMap { export function getTemplateMap({ experimental = false }) { if (experimental) { - return { - "hello-world-assets-only": assetsOnlyTemplateExperimental, - "hello-world-with-assets": helloWorldWithAssetsTemplateExperimental, - "hello-world-durable-object-with-assets": - helloWorldWithDurableObjectAssetsTemplateExperimental, - } as Record; + return {} as Record; } else { return { - "hello-world": helloWorldTemplate, + "hello-world": helloWorldWorkerTemplate, + "hello-world-assets-only": assetsOnlyTemplate, + "hello-world-with-assets": helloWorldWithAssetsTemplate, + "hello-world-durable-object": helloWorldDurableObjectTemplate, + "hello-world-durable-object-with-assets": + helloWorldWithDurableObjectAssetsTemplate, common: commonTemplate, scheduled: scheduledTemplate, queues: queuesTemplate, - "hello-world-durable-object": helloWorldDurableObjectTemplate, openapi: openapiTemplate, "pre-existing": preExistingTemplate, } as Record; @@ -366,9 +365,10 @@ export const createContext = async ( const categoryOptions = [ { - label: "Hello World example", + label: "Hello World Starter", value: "hello-world", - description: "Select from barebones examples to get started with Workers", + description: + "Select from basic scaffolds to get started with Workers, Assets and Durable Objects", }, { label: "Framework Starter", diff --git a/packages/create-cloudflare/templates-experimental/hello-world-assets-only/c3.ts b/packages/create-cloudflare/templates/hello-world-assets-only/c3.ts similarity index 56% rename from packages/create-cloudflare/templates-experimental/hello-world-assets-only/c3.ts rename to packages/create-cloudflare/templates/hello-world-assets-only/c3.ts index ede8b6372209..bf44944bfabb 100644 --- a/packages/create-cloudflare/templates-experimental/hello-world-assets-only/c3.ts +++ b/packages/create-cloudflare/templates/hello-world-assets-only/c3.ts @@ -3,9 +3,10 @@ import type { TemplateConfig } from "../../src/templates"; const config: TemplateConfig = { configVersion: 1, id: "hello-world-assets-only", - path: "templates-experimental/hello-world-assets-only", - displayName: "Hello World - Assets-only", - description: "Get started with a basic Worker that only serves static assets", + path: "templates/hello-world-assets-only", + displayName: "Assets only", + description: + "For static sites (including SPAs) or when using your own backend", platform: "workers", copyFiles: { path: "./templates", diff --git a/packages/create-cloudflare/templates-experimental/hello-world-assets-only/templates/package.json b/packages/create-cloudflare/templates/hello-world-assets-only/templates/package.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-assets-only/templates/package.json rename to packages/create-cloudflare/templates/hello-world-assets-only/templates/package.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-assets-only/templates/public/index.html b/packages/create-cloudflare/templates/hello-world-assets-only/templates/public/index.html similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-assets-only/templates/public/index.html rename to packages/create-cloudflare/templates/hello-world-assets-only/templates/public/index.html diff --git a/packages/create-cloudflare/templates-experimental/hello-world-assets-only/templates/wrangler.jsonc b/packages/create-cloudflare/templates/hello-world-assets-only/templates/wrangler.jsonc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-assets-only/templates/wrangler.jsonc rename to packages/create-cloudflare/templates/hello-world-assets-only/templates/wrangler.jsonc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/c3.ts b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/c3.ts similarity index 52% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/c3.ts rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/c3.ts index 44d9a784cc23..705389637d1c 100644 --- a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/c3.ts +++ b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/c3.ts @@ -3,10 +3,10 @@ import type { TemplateConfig } from "../../src/templates"; const config: TemplateConfig = { configVersion: 1, id: "hello-world-durable-object-with-assets", - path: "templates-experimental/hello-world-durable-object-with-assets", - displayName: "Hello World - Worker Using Durable Objects with Assets", + path: "templates/hello-world-durable-object-with-assets", + displayName: "Worker + Durable Objects + Assets", description: - "Get started with a basic stateful app to build projects like real-time chats, collaborative apps, and multiplayer games, which hosts assets", + "For full-stack applications requiring static assets, an API, and real-time coordination", platform: "workers", copyFiles: { variants: { diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/.editorconfig b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/.editorconfig similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/.editorconfig rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/.editorconfig diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/.gitignore b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/.gitignore similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/.gitignore rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/.gitignore diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/.prettierrc b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/.prettierrc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/.prettierrc rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/.prettierrc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/package.json b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/package.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/package.json rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/package.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/public/index.html b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/public/index.html similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/public/index.html rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/public/index.html diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/src/index.js b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/src/index.js similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/src/index.js rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/src/index.js diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/wrangler.jsonc b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/wrangler.jsonc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/js/wrangler.jsonc rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/js/wrangler.jsonc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/.editorconfig b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/.editorconfig similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/.editorconfig rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/.editorconfig diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/.gitignore b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/.gitignore similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/.gitignore rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/.gitignore diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/.prettierrc b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/.prettierrc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/.prettierrc rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/.prettierrc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/package.json b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/package.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/package.json rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/package.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/public/index.html b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/public/index.html similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/public/index.html rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/public/index.html diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/src/index.ts b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/src/index.ts similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/src/index.ts rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/src/index.ts diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/tsconfig.json b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/tsconfig.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/tsconfig.json rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/tsconfig.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/worker-configuration.d.ts diff --git a/packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/wrangler.jsonc b/packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/wrangler.jsonc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-durable-object-with-assets/ts/wrangler.jsonc rename to packages/create-cloudflare/templates/hello-world-durable-object-with-assets/ts/wrangler.jsonc diff --git a/packages/create-cloudflare/templates/hello-world-durable-object/c3.ts b/packages/create-cloudflare/templates/hello-world-durable-object/c3.ts index 9d2712209afd..f33fd13f23e9 100644 --- a/packages/create-cloudflare/templates/hello-world-durable-object/c3.ts +++ b/packages/create-cloudflare/templates/hello-world-durable-object/c3.ts @@ -1,9 +1,9 @@ export default { configVersion: 1, id: "hello-world-durable-object", - displayName: "Hello World Worker Using Durable Objects", + displayName: "Worker + Durable Objects", description: - "Get started with a basic stateful app to build projects like real-time chats, collaborative apps, and multiplayer games", + "For multiplayer apps using WebSockets, or when you need synchronization", platform: "workers", copyFiles: { variants: { diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/c3.ts b/packages/create-cloudflare/templates/hello-world-with-assets/c3.ts similarity index 51% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/c3.ts rename to packages/create-cloudflare/templates/hello-world-with-assets/c3.ts index 132af40becd1..ee75697ff763 100644 --- a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/c3.ts +++ b/packages/create-cloudflare/templates/hello-world-with-assets/c3.ts @@ -1,10 +1,9 @@ export default { configVersion: 1, id: "hello-world-with-assets", - path: "templates-experimental/hello-world-with-assets", - displayName: "Hello World - Worker with Assets", - description: - "Get started with a basic Worker that also serves static assets, in the language of your choice", + path: "templates/hello-world-with-assets", + displayName: "Worker + Assets", + description: "For static sites with an API or server-side rendering (SSR)", platform: "workers", copyFiles: { variants: { diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/.editorconfig b/packages/create-cloudflare/templates/hello-world-with-assets/js/.editorconfig similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/.editorconfig rename to packages/create-cloudflare/templates/hello-world-with-assets/js/.editorconfig diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/.gitignore b/packages/create-cloudflare/templates/hello-world-with-assets/js/.gitignore similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/.gitignore rename to packages/create-cloudflare/templates/hello-world-with-assets/js/.gitignore diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/.prettierrc b/packages/create-cloudflare/templates/hello-world-with-assets/js/.prettierrc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/.prettierrc rename to packages/create-cloudflare/templates/hello-world-with-assets/js/.prettierrc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/package.json b/packages/create-cloudflare/templates/hello-world-with-assets/js/package.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/package.json rename to packages/create-cloudflare/templates/hello-world-with-assets/js/package.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/public/index.html b/packages/create-cloudflare/templates/hello-world-with-assets/js/public/index.html similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/public/index.html rename to packages/create-cloudflare/templates/hello-world-with-assets/js/public/index.html diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/src/index.js b/packages/create-cloudflare/templates/hello-world-with-assets/js/src/index.js similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/src/index.js rename to packages/create-cloudflare/templates/hello-world-with-assets/js/src/index.js diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/test/index.spec.js b/packages/create-cloudflare/templates/hello-world-with-assets/js/test/index.spec.js similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/test/index.spec.js rename to packages/create-cloudflare/templates/hello-world-with-assets/js/test/index.spec.js diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/vitest.config.js b/packages/create-cloudflare/templates/hello-world-with-assets/js/vitest.config.js similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/vitest.config.js rename to packages/create-cloudflare/templates/hello-world-with-assets/js/vitest.config.js diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/wrangler.jsonc b/packages/create-cloudflare/templates/hello-world-with-assets/js/wrangler.jsonc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/js/wrangler.jsonc rename to packages/create-cloudflare/templates/hello-world-with-assets/js/wrangler.jsonc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/.gitignore b/packages/create-cloudflare/templates/hello-world-with-assets/py/.gitignore similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/.gitignore rename to packages/create-cloudflare/templates/hello-world-with-assets/py/.gitignore diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/package.json b/packages/create-cloudflare/templates/hello-world-with-assets/py/package.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/package.json rename to packages/create-cloudflare/templates/hello-world-with-assets/py/package.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/public/index.html b/packages/create-cloudflare/templates/hello-world-with-assets/py/public/index.html similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/public/index.html rename to packages/create-cloudflare/templates/hello-world-with-assets/py/public/index.html diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/src/entry.py b/packages/create-cloudflare/templates/hello-world-with-assets/py/src/entry.py similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/src/entry.py rename to packages/create-cloudflare/templates/hello-world-with-assets/py/src/entry.py diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/wrangler.jsonc b/packages/create-cloudflare/templates/hello-world-with-assets/py/wrangler.jsonc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/py/wrangler.jsonc rename to packages/create-cloudflare/templates/hello-world-with-assets/py/wrangler.jsonc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/.editorconfig b/packages/create-cloudflare/templates/hello-world-with-assets/ts/.editorconfig similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/.editorconfig rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/.editorconfig diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/.gitignore b/packages/create-cloudflare/templates/hello-world-with-assets/ts/.gitignore similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/.gitignore rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/.gitignore diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/.prettierrc b/packages/create-cloudflare/templates/hello-world-with-assets/ts/.prettierrc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/.prettierrc rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/.prettierrc diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/package.json b/packages/create-cloudflare/templates/hello-world-with-assets/ts/package.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/package.json rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/package.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/public/index.html b/packages/create-cloudflare/templates/hello-world-with-assets/ts/public/index.html similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/public/index.html rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/public/index.html diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/src/index.ts b/packages/create-cloudflare/templates/hello-world-with-assets/ts/src/index.ts similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/src/index.ts rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/src/index.ts diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/test/index.spec.ts b/packages/create-cloudflare/templates/hello-world-with-assets/ts/test/index.spec.ts similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/test/index.spec.ts rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/test/index.spec.ts diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/test/tsconfig.json b/packages/create-cloudflare/templates/hello-world-with-assets/ts/test/tsconfig.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/test/tsconfig.json rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/test/tsconfig.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/tsconfig.json b/packages/create-cloudflare/templates/hello-world-with-assets/ts/tsconfig.json similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/tsconfig.json rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/tsconfig.json diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/vitest.config.mts b/packages/create-cloudflare/templates/hello-world-with-assets/ts/vitest.config.mts similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/vitest.config.mts rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/vitest.config.mts diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/worker-configuration.d.ts b/packages/create-cloudflare/templates/hello-world-with-assets/ts/worker-configuration.d.ts similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/worker-configuration.d.ts rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/worker-configuration.d.ts diff --git a/packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/wrangler.jsonc b/packages/create-cloudflare/templates/hello-world-with-assets/ts/wrangler.jsonc similarity index 100% rename from packages/create-cloudflare/templates-experimental/hello-world-with-assets/ts/wrangler.jsonc rename to packages/create-cloudflare/templates/hello-world-with-assets/ts/wrangler.jsonc diff --git a/packages/create-cloudflare/templates/hello-world/c3.ts b/packages/create-cloudflare/templates/hello-world/c3.ts index ea63bf618662..bf3dd930e564 100644 --- a/packages/create-cloudflare/templates/hello-world/c3.ts +++ b/packages/create-cloudflare/templates/hello-world/c3.ts @@ -5,8 +5,9 @@ import type { TemplateConfig } from "../../src/templates"; export default { configVersion: 1, id: "hello-world", - displayName: "Hello World Worker", - description: "Get started with a basic Worker in the language of your choice", + displayName: "Worker only", + description: + "For processing requests, transforming responses, or API endpoints", platform: "workers", async configure(ctx) { if (ctx.args.lang === "python") { diff --git a/packages/wrangler/e2e/c3-integration.test.ts b/packages/wrangler/e2e/c3-integration.test.ts index 701016dadd07..dcddc7435f82 100644 --- a/packages/wrangler/e2e/c3-integration.test.ts +++ b/packages/wrangler/e2e/c3-integration.test.ts @@ -53,6 +53,6 @@ describe.runIf(process.platform !== "win32")("c3 integration", () => { }); const { url } = await worker.waitForReady(); const res = await fetch(url); - expect(await res.text()).toBe("Hello World!"); + expect(await res.text()).toContain("Hello, World!"); }); });