Skip to content

Commit

Permalink
Generate Remote URL (#2735)
Browse files Browse the repository at this point in the history
* Generate Remote URL
Previous URL was pointing to the old cloudflare/templates repo, updated the URL to point to templates
in the workers-sdk monorepo.
  • Loading branch information
JacobMGEvans committed Apr 5, 2023
1 parent 62ced62 commit 3f7a75c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
7 changes: 7 additions & 0 deletions .changeset/thin-masks-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"wrangler": patch
---

Fix: Generate Remote URL
Previous URL was pointing to the old cloudflare/templates repo,
updated the URL to point to templates in the workers-sdk monorepo.
7 changes: 3 additions & 4 deletions packages/wrangler/src/__tests__/generate.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ describe("generate", () => {
});

describe("cloning", () => {
it.skip("clones a cloudflare template with sparse checkouts", async () => {
it("clones a cloudflare template with sparse checkouts", async () => {
await expect(
runWrangler("generate my-worker worker-typescript")
).resolves.toBeUndefined();
Expand All @@ -116,10 +116,9 @@ describe("generate", () => {
".git": expect.any(Object),
".gitignore": expect.any(String),
"README.md": expect.stringContaining("Template: worker-typescript"),
"jest.config.json": expect.any(String),
"package.json": expect.stringContaining("@cloudflare/workers-types"),
src: expect.objectContaining({ "index.ts": expect.any(String) }),
test: expect.objectContaining({
src: expect.objectContaining({
"index.ts": expect.any(String),
"index.test.ts": expect.any(String),
}),
"tsconfig.json": expect.any(String),
Expand Down
4 changes: 2 additions & 2 deletions packages/wrangler/src/generate/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,8 +269,8 @@ function parseTemplatePath(templatePath: string): {
if (!templatePath.includes("/")) {
// template is a cloudflare canonical template, it doesn't include a slash in the name
return {
remote: "https://github.com/cloudflare/templates.git",
subdirectory: templatePath,
remote: "https://github.com/cloudflare/workers-sdk.git",
subdirectory: `templates/${templatePath}`,
};
}

Expand Down

0 comments on commit 3f7a75c

Please sign in to comment.