Skip to content

Commit b6d1d26

Browse files
authored
Revert "V3 backport (Unhide 'wrangler pages functions build' #8795) (#8813)" (#8910)
This reverts commit 3a5e029.
1 parent db673d6 commit b6d1d26

File tree

6 files changed

+101
-137
lines changed

6 files changed

+101
-137
lines changed

.changeset/tiny-ideas-nail.md

Lines changed: 0 additions & 7 deletions
This file was deleted.

packages/wrangler/src/__tests__/pages/pages.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ describe("pages", () => {
2424
2525
COMMANDS
2626
wrangler pages dev [directory] [-- command..] Develop your full-stack Pages application locally
27-
wrangler pages functions Helpers related to Pages Functions
2827
wrangler pages project Interact with your Pages projects
2928
wrangler pages deployment Interact with the deployments of a project
3029
wrangler pages deploy [directory] Deploy a directory of static assets as a Pages deployment [aliases: publish]

packages/wrangler/src/pages/build.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ export function Options(yargs: CommonYargsArgv) {
5050
outfile: {
5151
type: "string",
5252
description: "The location of the output Worker script",
53-
deprecated: true,
5453
},
5554
outdir: {
5655
type: "string",

packages/wrangler/src/pages/index.ts

Lines changed: 100 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -25,108 +25,114 @@ process.on("SIGTERM", () => {
2525
});
2626

2727
export function pages(yargs: CommonYargsArgv, subHelp: SubHelp) {
28-
return yargs
29-
.command(subHelp)
30-
.command(
31-
"dev [directory] [-- command..]",
32-
"Develop your full-stack Pages application locally",
33-
Dev.Options,
34-
Dev.Handler
35-
)
36-
.command("functions", "Helpers related to Pages Functions", (args) =>
37-
args
38-
.command(subHelp)
39-
.command(
40-
"build [directory]",
41-
"Compile a folder of Pages Functions into a single Worker",
42-
Build.Options,
43-
Build.Handler
44-
)
45-
.command(
46-
"build-env [projectDir]",
47-
false, // Render a list of environment variables from the config file
48-
BuildEnv.Options,
49-
BuildEnv.Handler
50-
)
51-
.command(
52-
"optimize-routes [routesPath] [outputRoutesPath]",
53-
false, // Consolidate and optimize the route paths declared in _routes.json
54-
Functions.OptimizeRoutesOptions,
55-
Functions.OptimizeRoutesHandler
56-
)
57-
)
58-
.command("project", "Interact with your Pages projects", (args) =>
59-
args
60-
.command(subHelp)
61-
.command(
62-
"list",
63-
"List your Cloudflare Pages projects",
64-
Projects.ListOptions,
65-
Projects.ListHandler
66-
)
67-
.command(
68-
"create [project-name]",
69-
"Create a new Cloudflare Pages project",
70-
Projects.CreateOptions,
71-
Projects.CreateHandler
72-
)
73-
.command(
74-
"delete [project-name]",
75-
"Delete a Cloudflare Pages project",
76-
Projects.DeleteOptions,
77-
Projects.DeleteHandler
78-
)
79-
.command("upload [directory]", false, Upload.Options, Upload.Handler)
80-
.command(
81-
"validate [directory]",
82-
false,
83-
Validate.Options,
84-
Validate.Handler
85-
)
86-
)
87-
.command(
88-
"deployment",
89-
"Interact with the deployments of a project",
90-
(args) =>
28+
return (
29+
yargs
30+
.command(subHelp)
31+
.command(
32+
"dev [directory] [-- command..]",
33+
"Develop your full-stack Pages application locally",
34+
Dev.Options,
35+
Dev.Handler
36+
)
37+
/**
38+
* `wrangler pages functions` is meant for internal use only for now,
39+
* so let's hide this command from the help output
40+
*/
41+
.command("functions", false, (args) =>
42+
args
43+
.command(subHelp)
44+
.command(
45+
"build [directory]",
46+
"Compile a folder of Cloudflare Pages Functions into a single Worker",
47+
Build.Options,
48+
Build.Handler
49+
)
50+
.command(
51+
"build-env [projectDir]",
52+
"Render a list of environment variables from the config file",
53+
BuildEnv.Options,
54+
BuildEnv.Handler
55+
)
56+
.command(
57+
"optimize-routes [routesPath] [outputRoutesPath]",
58+
"Consolidate and optimize the route paths declared in _routes.json",
59+
Functions.OptimizeRoutesOptions,
60+
Functions.OptimizeRoutesHandler
61+
)
62+
)
63+
.command("project", "Interact with your Pages projects", (args) =>
9164
args
9265
.command(subHelp)
9366
.command(
9467
"list",
95-
"List deployments in your Cloudflare Pages project",
96-
Deployments.ListOptions,
97-
Deployments.ListHandler
68+
"List your Cloudflare Pages projects",
69+
Projects.ListOptions,
70+
Projects.ListHandler
71+
)
72+
.command(
73+
"create [project-name]",
74+
"Create a new Cloudflare Pages project",
75+
Projects.CreateOptions,
76+
Projects.CreateHandler
9877
)
9978
.command(
100-
"create [directory]",
101-
"Publish a directory of static assets as a Pages deployment",
102-
Deploy.Options,
103-
Deploy.Handler
79+
"delete [project-name]",
80+
"Delete a Cloudflare Pages project",
81+
Projects.DeleteOptions,
82+
Projects.DeleteHandler
10483
)
84+
.command("upload [directory]", false, Upload.Options, Upload.Handler)
10585
.command(
106-
"tail [deployment]",
107-
"Start a tailing session for a project's deployment and " +
108-
"livestream logs from your Functions",
109-
DeploymentTails.Options,
110-
DeploymentTails.Handler
86+
"validate [directory]",
87+
false,
88+
Validate.Options,
89+
Validate.Handler
11190
)
112-
)
113-
.command(
114-
["deploy [directory]", "publish [directory]"],
115-
"Deploy a directory of static assets as a Pages deployment",
116-
Deploy.Options,
117-
Deploy.Handler
118-
)
119-
.command(
120-
"secret",
121-
"Generate a secret that can be referenced in a Pages project",
122-
(secretYargs) => secret(secretYargs, subHelp)
123-
)
124-
.command("download", "Download settings from your project", (args) =>
125-
args.command(
126-
"config [projectName]",
127-
"Experimental: Download your Pages project config as a Wrangler configuration file",
128-
DownloadConfig.Options,
129-
DownloadConfig.Handler
13091
)
131-
);
92+
.command(
93+
"deployment",
94+
"Interact with the deployments of a project",
95+
(args) =>
96+
args
97+
.command(subHelp)
98+
.command(
99+
"list",
100+
"List deployments in your Cloudflare Pages project",
101+
Deployments.ListOptions,
102+
Deployments.ListHandler
103+
)
104+
.command(
105+
"create [directory]",
106+
"Publish a directory of static assets as a Pages deployment",
107+
Deploy.Options,
108+
Deploy.Handler
109+
)
110+
.command(
111+
"tail [deployment]",
112+
"Start a tailing session for a project's deployment and " +
113+
"livestream logs from your Functions",
114+
DeploymentTails.Options,
115+
DeploymentTails.Handler
116+
)
117+
)
118+
.command(
119+
["deploy [directory]", "publish [directory]"],
120+
"Deploy a directory of static assets as a Pages deployment",
121+
Deploy.Options,
122+
Deploy.Handler
123+
)
124+
.command(
125+
"secret",
126+
"Generate a secret that can be referenced in a Pages project",
127+
(secretYargs) => secret(secretYargs, subHelp)
128+
)
129+
.command("download", "Download settings from your project", (args) =>
130+
args.command(
131+
"config [projectName]",
132+
"Experimental: Download your Pages project config as a Wrangler configuration file",
133+
DownloadConfig.Options,
134+
DownloadConfig.Handler
135+
)
136+
)
137+
);
132138
}

tools/deployments/__tests__/validate-pr-description.test.ts

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -107,39 +107,6 @@ Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
107107
).toHaveLength(0);
108108
});
109109

110-
it("should accept a docs link", () => {
111-
expect(
112-
validateDescription(
113-
"",
114-
`## What this PR solves / how to test
115-
116-
Fixes [AA-000](https://jira.cfdata.org/browse/AA-000).
117-
118-
## Author has addressed the following
119-
120-
- Tests
121-
- [ ] TODO (before merge)
122-
- [x] Tests included
123-
- [ ] Tests not necessary because:
124-
- E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
125-
- [ ] I don't know
126-
- [ ] Required
127-
- [x] Not required because: test
128-
- Public documentation
129-
- [ ] TODO (before merge)
130-
- [x] Cloudflare docs PR(s): https://developers.cloudflare.com/workers/something-here/
131-
- [ ] Documentation not necessary because:
132-
- Wrangler V3 Backport
133-
- [ ] TODO (before merge)
134-
- [x] Wrangler PR: https://github.com/cloudflare/workers-sdk/pull/123
135-
- [ ] Not necessary because:
136-
`,
137-
"[]",
138-
'[".changeset/hello-world.md"]'
139-
)
140-
).toHaveLength(0);
141-
});
142-
143110
it("should not accept e2e unknown", () => {
144111
expect(
145112
validateDescription(

tools/deployments/validate-pr-description.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function validateDescription(
9494

9595
if (
9696
!(
97-
/- \[x\] Cloudflare docs PR\(s\): https:\/\/(github\.com\/cloudflare\/cloudflare-docs\/(pull|issues)\/\d+|developers\.cloudflare\.com\/.*)/i.test(
97+
/- \[x\] Cloudflare docs PR\(s\): https:\/\/github\.com\/cloudflare\/cloudflare-docs\/(pull|issues)\/\d+/i.test(
9898
body
9999
) || /- \[x\] Documentation not necessary because: .+/i.test(body)
100100
)

0 commit comments

Comments
 (0)