wrangler 3.35.0 → 3.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/wrangler-dist/cli.d.ts +11 -0
- package/wrangler-dist/cli.js +33 -14
package/package.json
CHANGED
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -2608,6 +2608,17 @@ declare interface PagesConfigFields {
|
|
|
2608
2608
|
pages_build_output_dir?: string;
|
|
2609
2609
|
}
|
|
2610
2610
|
|
|
2611
|
+
declare interface PagesConfigFields {
|
|
2612
|
+
/**
|
|
2613
|
+
* The directory of static assets to serve.
|
|
2614
|
+
*
|
|
2615
|
+
* The presence of this field in `wrangler.toml` indicates a Pages project,
|
|
2616
|
+
* and will prompt the handling of the configuration file according to the
|
|
2617
|
+
* Pages-specific validation rules.
|
|
2618
|
+
*/
|
|
2619
|
+
pages_build_output_dir?: string;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2611
2622
|
declare interface PagesDeployOptions {
|
|
2612
2623
|
/**
|
|
2613
2624
|
* Path to static assets to deploy to Pages
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -119652,7 +119652,7 @@ var import_node_assert2 = __toESM(require("node:assert"));
|
|
|
119652
119652
|
var import_undici3 = __toESM(require_undici());
|
|
119653
119653
|
|
|
119654
119654
|
// package.json
|
|
119655
|
-
var version = "3.
|
|
119655
|
+
var version = "3.36.0";
|
|
119656
119656
|
var package_default = {
|
|
119657
119657
|
name: "wrangler",
|
|
119658
119658
|
version,
|
|
@@ -120750,6 +120750,8 @@ async function login(props = { browser: true }) {
|
|
|
120750
120750
|
__name(finish, "finish");
|
|
120751
120751
|
(0, import_node_assert.default)(req.url, "This request doesn't have a URL");
|
|
120752
120752
|
const { pathname, query } = import_node_url3.default.parse(req.url, true);
|
|
120753
|
+
if (req.method !== "GET")
|
|
120754
|
+
return res.end("OK");
|
|
120753
120755
|
switch (pathname) {
|
|
120754
120756
|
case "/oauth/callback": {
|
|
120755
120757
|
let hasAuthCode = false;
|
|
@@ -121723,6 +121725,10 @@ var isRecord = /* @__PURE__ */ __name((value) => typeof value === "object" && va
|
|
|
121723
121725
|
|
|
121724
121726
|
// src/config/validation.ts
|
|
121725
121727
|
var ENGLISH = new Intl.ListFormat("en");
|
|
121728
|
+
function isPagesConfig(rawConfig) {
|
|
121729
|
+
return rawConfig.pages_build_output_dir !== void 0;
|
|
121730
|
+
}
|
|
121731
|
+
__name(isPagesConfig, "isPagesConfig");
|
|
121726
121732
|
function normalizeAndValidateConfig(rawConfig, configPath, args) {
|
|
121727
121733
|
const diagnostics = new Diagnostics(
|
|
121728
121734
|
`Processing ${configPath ? import_node_path7.default.relative(process.cwd(), configPath) : "wrangler"} configuration:`
|
|
@@ -121812,7 +121818,7 @@ function normalizeAndValidateConfig(rawConfig, configPath, args) {
|
|
|
121812
121818
|
rawConfig
|
|
121813
121819
|
);
|
|
121814
121820
|
diagnostics.addChild(envDiagnostics);
|
|
121815
|
-
} else {
|
|
121821
|
+
} else if (!isPagesConfig(rawConfig)) {
|
|
121816
121822
|
activeEnv = normalizeAndValidateEnvironment(
|
|
121817
121823
|
envDiagnostics,
|
|
121818
121824
|
configPath,
|
|
@@ -124236,8 +124242,8 @@ function readConfig(configPath, args) {
|
|
|
124236
124242
|
} else if (configPath?.endsWith("json")) {
|
|
124237
124243
|
rawConfig = parseJSONC(readFileSync5(configPath), configPath);
|
|
124238
124244
|
}
|
|
124239
|
-
const
|
|
124240
|
-
if (
|
|
124245
|
+
const isPagesConfig2 = rawConfig.pages_build_output_dir !== void 0;
|
|
124246
|
+
if (isPagesConfig2 && (configPath?.endsWith("json") || args.experimentalJsonConfig)) {
|
|
124241
124247
|
throw new UserError(
|
|
124242
124248
|
`Pages doesn't currently support JSON formatted config \`${configPath ?? "wrangler.json"}\`. Please use wrangler.toml instead.`
|
|
124243
124249
|
);
|
|
@@ -124253,7 +124259,7 @@ function readConfig(configPath, args) {
|
|
|
124253
124259
|
if (diagnostics.hasErrors()) {
|
|
124254
124260
|
throw new UserError(diagnostics.renderErrors());
|
|
124255
124261
|
}
|
|
124256
|
-
if (
|
|
124262
|
+
if (isPagesConfig2) {
|
|
124257
124263
|
logger.debug(
|
|
124258
124264
|
`Configuration file belonging to \u26A1\uFE0F Pages \u26A1\uFE0F project detected.`
|
|
124259
124265
|
);
|
|
@@ -149740,6 +149746,10 @@ function Options13(yargs) {
|
|
|
149740
149746
|
"log-level": {
|
|
149741
149747
|
choices: ["debug", "info", "log", "warn", "error", "none"],
|
|
149742
149748
|
describe: "Specify logging level"
|
|
149749
|
+
},
|
|
149750
|
+
"show-interactive-dev-session": {
|
|
149751
|
+
describe: "Show interactive dev session (defaults to true if the terminal supports interactivity)",
|
|
149752
|
+
type: "boolean"
|
|
149743
149753
|
}
|
|
149744
149754
|
});
|
|
149745
149755
|
}
|
|
@@ -149771,7 +149781,8 @@ var Handler13 = /* @__PURE__ */ __name(async ({
|
|
|
149771
149781
|
experimentalLocal,
|
|
149772
149782
|
config,
|
|
149773
149783
|
_: [_pages, _dev, ...remaining],
|
|
149774
|
-
logLevel
|
|
149784
|
+
logLevel,
|
|
149785
|
+
showInteractiveDevSession
|
|
149775
149786
|
}) => {
|
|
149776
149787
|
if (logLevel) {
|
|
149777
149788
|
logger.loggerLevel = logLevel;
|
|
@@ -150163,7 +150174,7 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates/ for
|
|
|
150163
150174
|
},
|
|
150164
150175
|
liveReload,
|
|
150165
150176
|
forceLocal: true,
|
|
150166
|
-
showInteractiveDevSession
|
|
150177
|
+
showInteractiveDevSession,
|
|
150167
150178
|
testMode: false,
|
|
150168
150179
|
watch: true
|
|
150169
150180
|
}
|
|
@@ -162735,7 +162746,6 @@ async function createDeployment(accountId, workerName, versionTraffic, message)
|
|
|
162735
162746
|
([version_id, percentage]) => ({ version_id, percentage })
|
|
162736
162747
|
),
|
|
162737
162748
|
annotations: {
|
|
162738
|
-
"workers/triggered_by": "deployment",
|
|
162739
162749
|
"workers/message": message
|
|
162740
162750
|
}
|
|
162741
162751
|
})
|
|
@@ -164288,8 +164298,11 @@ var CommandLineArgsError = class extends UserError {
|
|
|
164288
164298
|
};
|
|
164289
164299
|
__name(CommandLineArgsError, "CommandLineArgsError");
|
|
164290
164300
|
function createCLIParser(argv) {
|
|
164291
|
-
const experimentalGradualRollouts =
|
|
164292
|
-
|
|
164301
|
+
const experimentalGradualRollouts = (
|
|
164302
|
+
// original flag -- using internal product name (Gradual Rollouts) -- kept for temp back-compat
|
|
164303
|
+
argv.includes("--experimental-gradual-rollouts") || // new flag -- using external product name (Versions)
|
|
164304
|
+
argv.includes("--experimental-versions") || // new flag -- shorthand
|
|
164305
|
+
argv.includes("--x-versions")
|
|
164293
164306
|
);
|
|
164294
164307
|
const wrangler = yargs_default(argv).strict().showHelpOnFail(false).fail((msg, error2) => {
|
|
164295
164308
|
if (!error2 || error2.name === "YError") {
|
|
@@ -164314,10 +164327,11 @@ function createCLIParser(argv) {
|
|
|
164314
164327
|
alias: "j",
|
|
164315
164328
|
describe: `Experimental: Support wrangler.json`,
|
|
164316
164329
|
type: "boolean"
|
|
164317
|
-
}).option("experimental-
|
|
164318
|
-
describe: `Experimental: Support
|
|
164330
|
+
}).option("experimental-versions", {
|
|
164331
|
+
describe: `Experimental: Support Worker Versions`,
|
|
164319
164332
|
type: "boolean",
|
|
164320
|
-
hidden: true
|
|
164333
|
+
hidden: true,
|
|
164334
|
+
alias: ["x-versions", "experimental-gradual-rollouts"]
|
|
164321
164335
|
}).check((args) => {
|
|
164322
164336
|
if (Object.keys(LOGGER_LEVELS).includes(args.logLevel)) {
|
|
164323
164337
|
logger.loggerLevel = args.logLevel;
|
|
@@ -164690,7 +164704,9 @@ function createCLIParser(argv) {
|
|
|
164690
164704
|
}
|
|
164691
164705
|
);
|
|
164692
164706
|
if (experimentalGradualRollouts) {
|
|
164693
|
-
wrangler.command("versions", false,
|
|
164707
|
+
wrangler.command("versions", false, (yargs) => {
|
|
164708
|
+
return registerVersionsSubcommands(yargs.command(subHelp));
|
|
164709
|
+
});
|
|
164694
164710
|
}
|
|
164695
164711
|
wrangler.exitProcess(false);
|
|
164696
164712
|
return wrangler;
|
|
@@ -169168,6 +169184,9 @@ function devOptions(yargs) {
|
|
|
169168
169184
|
describe: "Specify logging level",
|
|
169169
169185
|
// Yargs requires this to type log-level properly
|
|
169170
169186
|
default: "log"
|
|
169187
|
+
}).option("show-interactive-dev-session", {
|
|
169188
|
+
describe: "Show interactive dev session (defaults to true if the terminal supports interactivity)",
|
|
169189
|
+
type: "boolean"
|
|
169171
169190
|
});
|
|
169172
169191
|
}
|
|
169173
169192
|
__name(devOptions, "devOptions");
|