Skip to content

Commit d524e55

Browse files
authored
Astro C3 autoconfig (#11345)
* Support Astro * Fix CLI snapshot * Create orange-tables-join.md
1 parent e9d4db4 commit d524e55

File tree

4 files changed

+34
-1
lines changed

4 files changed

+34
-1
lines changed

.changeset/orange-tables-join.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"wrangler": patch
3+
"create-cloudflare": patch
4+
---
5+
6+
Enable experimental support for autoconfig-powered Astro projects

packages/create-cloudflare/e2e/tests/cli/cli.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ describe("Create Cloudflare CLI", () => {
555555
npm create cloudflare -- --framework next -- --ts
556556
pnpm create cloudflare --framework next -- --ts
557557
Allowed Values:
558-
gatsby, svelte, docusaurus
558+
gatsby, svelte, docusaurus, astro
559559
--platform=<value>
560560
Whether the application should be deployed to Pages or Workers. This is only applicable for Frameworks templates that support both Pages and Workers.
561561
Allowed Values:

packages/create-cloudflare/e2e/tests/frameworks/test-config.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -701,6 +701,32 @@ function getExperimentalFrameworkTestConfig(
701701
},
702702
],
703703
},
704+
{
705+
name: "astro:workers",
706+
argv: ["--platform", "workers"],
707+
testCommitMessage: true,
708+
unsupportedOSs: ["win32"],
709+
verifyDeploy: {
710+
route: "/",
711+
expectedText: "Hello, Astronaut!",
712+
},
713+
verifyPreview: {
714+
previewArgs: ["--inspector-port=0"],
715+
route: "/test",
716+
expectedText: "C3_TEST",
717+
},
718+
nodeCompat: true,
719+
flags: [
720+
"--skip-houston",
721+
"--no-install",
722+
"--no-git",
723+
"--template",
724+
"blog",
725+
"--typescript",
726+
"strict",
727+
],
728+
verifyTypes: false,
729+
},
704730
];
705731
}
706732

packages/create-cloudflare/src/templates.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ export function getFrameworkMap({ experimental = false }): TemplateMap {
239239
gatsby: gatsbyTemplate,
240240
svelte: svelteTemplate,
241241
docusaurus: docusaurusTemplate,
242+
astro: astroTemplate,
242243
};
243244
} else {
244245
return {

0 commit comments

Comments
 (0)