Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pages] Add wrangler pages config download #5327

Merged
merged 11 commits into from
Mar 25, 2024

Conversation

penalosa
Copy link
Contributor

@penalosa penalosa commented Mar 20, 2024

What this PR solves / how to test

Adds a Wrangler command to support downloading a Pages project's config into a wrangler.toml file

Fixes DEVX-1178

Author has addressed the following

@penalosa penalosa requested review from a team as code owners March 20, 2024 19:07
Copy link

changeset-bot bot commented Mar 20, 2024

🦋 Changeset detected

Latest commit: b5deb07

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@penalosa penalosa marked this pull request as draft March 20, 2024 19:07
Copy link
Contributor

github-actions bot commented Mar 20, 2024

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-wrangler-5327

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5327/npm-package-wrangler-5327

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-wrangler-5327 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-create-cloudflare-5327 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-cloudflare-kv-asset-handler-5327
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-miniflare-5327
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-cloudflare-pages-shared-5327
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8392679488/npm-package-cloudflare-vitest-pool-workers-5327

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.37.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240320.0
workerd 1.20240320.1 1.20240320.1
workerd --version 1.20240320.1 2024-03-20

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link

codecov bot commented Mar 20, 2024

Codecov Report

Attention: Patch coverage is 96.66667% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 72.39%. Comparing base (00820be) to head (b5deb07).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5327      +/-   ##
==========================================
+ Coverage   72.16%   72.39%   +0.22%     
==========================================
  Files         317      318       +1     
  Lines       16372    16458      +86     
  Branches     4169     4201      +32     
==========================================
+ Hits        11815    11914      +99     
+ Misses       4557     4544      -13     
Files Coverage Δ
packages/wrangler/src/metrics/send-event.ts 100.00% <ø> (ø)
packages/wrangler/src/pages/build.ts 67.41% <ø> (ø)
packages/wrangler/src/pages/errors.ts 42.10% <100.00%> (+3.21%) ⬆️
packages/wrangler/src/pages/index.ts 86.20% <100.00%> (+1.59%) ⬆️
packages/wrangler/src/pages/download-config.ts 98.61% <98.61%> (ø)
packages/wrangler/src/pages/build-env.ts 90.47% <84.61%> (-9.53%) ⬇️

... and 8 files with indirect coverage changes

@penalosa penalosa marked this pull request as ready for review March 22, 2024 03:08
@@ -45,6 +45,10 @@ export function Options(yargs: CommonYargsArgv) {
type: "string",
description: "The location for the output config file",
},
"build-metadata-path": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what is this for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for integration with CI—perhaps it shouldn't be in this PR

packages/wrangler/src/__tests__/pages/pages.test.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/build-env.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/build-env.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/build-env.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/download-config.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/download-config.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/download-config.ts Outdated Show resolved Hide resolved
@penalosa penalosa force-pushed the penalosa/pages-config-download branch from 3af8b05 to b5deb07 Compare March 22, 2024 15:28
@penalosa penalosa merged commit 7d160c7 into main Mar 25, 2024
18 checks passed
@penalosa penalosa deleted the penalosa/pages-config-download branch March 25, 2024 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants