Skip to content

Commit

Permalink
[pages] Add wrangler pages config download (#5327)
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Mar 25, 2024
1 parent 528c011 commit 7d160c7
Show file tree
Hide file tree
Showing 11 changed files with 735 additions and 11 deletions.
5 changes: 5 additions & 0 deletions .changeset/fresh-comics-carry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": patch
---

fix: Use specific error code to signal a wrangler.toml file not being found in build-env
5 changes: 5 additions & 0 deletions .changeset/little-baboons-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wrangler": minor
---

feat: Add `wrangler pages download config`
10 changes: 5 additions & 5 deletions packages/wrangler/src/__tests__/pages/pages-build-env.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ describe("pages-build-env", () => {
pages_build_output_dir: "./dist",
vars: {},
});
await runWrangler("pages functions build-env");
await runWrangler("pages functions build-env .");
expect(std).toMatchInlineSnapshot(`
Object {
"debug": "",
Expand All @@ -32,7 +32,7 @@ describe("pages-build-env", () => {

it("should fail with no config file", async () => {
await expect(
runWrangler("pages functions build-env")
runWrangler("pages functions build-env .")
).rejects.toThrowErrorMatchingInlineSnapshot(
`"No Pages config file found"`
);
Expand Down Expand Up @@ -65,7 +65,7 @@ describe("pages-build-env", () => {
},
},
});
await runWrangler("pages functions build-env");
await runWrangler("pages functions build-env .");
expect(std).toMatchInlineSnapshot(`
Object {
"debug": "",
Expand Down Expand Up @@ -104,7 +104,7 @@ describe("pages-build-env", () => {
},
},
});
await runWrangler("pages functions build-env");
await runWrangler("pages functions build-env .");
expect(std).toMatchInlineSnapshot(`
Object {
"debug": "",
Expand Down Expand Up @@ -144,7 +144,7 @@ describe("pages-build-env", () => {
},
},
});
await runWrangler("pages functions build-env");
await runWrangler("pages functions build-env .");
expect(std).toMatchInlineSnapshot(`
Object {
"debug": "",
Expand Down

0 comments on commit 7d160c7

Please sign in to comment.