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

check if both route and routes are specified in wrangler.toml #628

Merged
merged 2 commits into from
Mar 17, 2022

Conversation

caass
Copy link
Contributor

@caass caass commented Mar 17, 2022

Closes #629

@caass caass requested a review from threepointone as a code owner March 17, 2022 17:30
@changeset-bot
Copy link

changeset-bot bot commented Mar 17, 2022

🦋 Changeset detected

Latest commit: 1eb8fe2

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

This PR includes changesets to release 1 package
Name Type
wrangler 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

@caass caass changed the title check if both "route" and "routes" are specified check if both route and routes are specified in wrangler.toml Mar 17, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2022

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/runs/2000172245/npm-package-wrangler-628

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/628/npm-package-wrangler-628

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2000172245/npm-package-wrangler-628 dev path/to/script.js

Comment on lines +2231 to +2241
name: "ENV_NAME",
account_id: "ENV_ACCOUNT_ID",
compatibility_date: "2022-02-02",
compatibility_flags: ["ENV_FLAG1", "ENV_FLAG2"],
workers_dev: true,
route: "ENV_ROUTE_1",
routes: ["ENV_ROUTE_2", "ENV_ROUTE_3"],
jsx_factory: "ENV_JSX_FACTORY",
jsx_fragment: "ENV_JSX_FRAGMENT",
triggers: { crons: ["ENV_CRON_1", "ENV_CRON_2"] },
usage_model: "unbound",
Copy link
Contributor

Choose a reason for hiding this comment

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

Since in this test we only care about route and routes we could specify only those. I think the rest of the fields are options.

Suggested change
name: "ENV_NAME",
account_id: "ENV_ACCOUNT_ID",
compatibility_date: "2022-02-02",
compatibility_flags: ["ENV_FLAG1", "ENV_FLAG2"],
workers_dev: true,
route: "ENV_ROUTE_1",
routes: ["ENV_ROUTE_2", "ENV_ROUTE_3"],
jsx_factory: "ENV_JSX_FACTORY",
jsx_fragment: "ENV_JSX_FRAGMENT",
triggers: { crons: ["ENV_CRON_1", "ENV_CRON_2"] },
usage_model: "unbound",
route: "ENV_ROUTE_1",
routes: ["ENV_ROUTE_2", "ENV_ROUTE_3"],

@petebacondarwin petebacondarwin merged commit 147f5e9 into main Mar 17, 2022
@petebacondarwin petebacondarwin deleted the route-routes branch March 17, 2022 22:16
@github-actions github-actions bot mentioned this pull request Mar 17, 2022
mrbbot pushed a commit that referenced this pull request Oct 31, 2023
mrbbot pushed a commit that referenced this pull request Nov 1, 2023
mrbbot pushed a commit that referenced this pull request Nov 1, 2023
mrbbot pushed a commit that referenced this pull request Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Having both route and routes in config should throw an error
2 participants