wrangler 4.45.2 → 4.45.3
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 +2 -2
- package/wrangler-dist/cli.d.ts +1 -1
- package/wrangler-dist/cli.js +108 -23
- package/wrangler-dist/metafile-cjs.json +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wrangler",
|
|
3
|
-
"version": "4.45.
|
|
3
|
+
"version": "4.45.3",
|
|
4
4
|
"description": "Command-line interface for all things Cloudflare Workers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"wrangler",
|
|
@@ -142,8 +142,8 @@
|
|
|
142
142
|
"xxhash-wasm": "^1.0.1",
|
|
143
143
|
"yaml": "^2.8.1",
|
|
144
144
|
"yargs": "^17.7.2",
|
|
145
|
-
"@cloudflare/cli": "1.1.3",
|
|
146
145
|
"@cloudflare/containers-shared": "0.2.13",
|
|
146
|
+
"@cloudflare/cli": "1.1.3",
|
|
147
147
|
"@cloudflare/eslint-config-shared": "1.1.0",
|
|
148
148
|
"@cloudflare/pages-shared": "^0.13.81",
|
|
149
149
|
"@cloudflare/workers-shared": "0.18.8",
|
package/wrangler-dist/cli.d.ts
CHANGED
|
@@ -1280,7 +1280,7 @@ type CommandDefinition<NamedArgDefs extends NamedArgDefinitions = NamedArgDefini
|
|
|
1280
1280
|
/**
|
|
1281
1281
|
* If true, print a message about whether the command is operating on a local or remote resource
|
|
1282
1282
|
*/
|
|
1283
|
-
printResourceLocation?: ((args
|
|
1283
|
+
printResourceLocation?: ((args: HandlerArgs<NamedArgDefs>) => boolean) | boolean;
|
|
1284
1284
|
/**
|
|
1285
1285
|
* If true, check for environments in the wrangler config, if there are some and the user hasn't specified an environment
|
|
1286
1286
|
* using the `-e|--env` cli flag, show a warning suggesting that one should instead be specified.
|
package/wrangler-dist/cli.js
CHANGED
|
@@ -36711,7 +36711,7 @@ var require_caller = __commonJS({
|
|
|
36711
36711
|
var require_path_parse = __commonJS({
|
|
36712
36712
|
"../../node_modules/.pnpm/path-parse@1.0.7/node_modules/path-parse/index.js"(exports2, module3) {
|
|
36713
36713
|
init_import_meta_url();
|
|
36714
|
-
var
|
|
36714
|
+
var isWindows5 = process.platform === "win32";
|
|
36715
36715
|
var splitWindowsRe = /^(((?:[a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?[\\\/]?)(?:[^\\\/]*[\\\/])*)((\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))[\\\/]*$/;
|
|
36716
36716
|
var win32 = {};
|
|
36717
36717
|
function win32SplitPath(filename) {
|
|
@@ -36760,7 +36760,7 @@ var require_path_parse = __commonJS({
|
|
|
36760
36760
|
name: allParts[3]
|
|
36761
36761
|
};
|
|
36762
36762
|
};
|
|
36763
|
-
if (
|
|
36763
|
+
if (isWindows5)
|
|
36764
36764
|
module3.exports = win32.parse;
|
|
36765
36765
|
else
|
|
36766
36766
|
module3.exports = posix2.parse;
|
|
@@ -49031,7 +49031,7 @@ var name, version;
|
|
|
49031
49031
|
var init_package = __esm({
|
|
49032
49032
|
"package.json"() {
|
|
49033
49033
|
name = "wrangler";
|
|
49034
|
-
version = "4.45.
|
|
49034
|
+
version = "4.45.3";
|
|
49035
49035
|
}
|
|
49036
49036
|
});
|
|
49037
49037
|
|
|
@@ -125658,22 +125658,22 @@ var require_isexe = __commonJS({
|
|
|
125658
125658
|
var require_which = __commonJS({
|
|
125659
125659
|
"../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports2, module3) {
|
|
125660
125660
|
init_import_meta_url();
|
|
125661
|
-
var
|
|
125661
|
+
var isWindows5 = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
125662
125662
|
var path73 = __require("path");
|
|
125663
|
-
var COLON =
|
|
125663
|
+
var COLON = isWindows5 ? ";" : ":";
|
|
125664
125664
|
var isexe = require_isexe();
|
|
125665
125665
|
var getNotFoundError = /* @__PURE__ */ __name((cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }), "getNotFoundError");
|
|
125666
125666
|
var getPathInfo = /* @__PURE__ */ __name((cmd, opt) => {
|
|
125667
125667
|
const colon = opt.colon || COLON;
|
|
125668
|
-
const pathEnv = cmd.match(/\//) ||
|
|
125668
|
+
const pathEnv = cmd.match(/\//) || isWindows5 && cmd.match(/\\/) ? [""] : [
|
|
125669
125669
|
// windows always checks the cwd first
|
|
125670
|
-
...
|
|
125670
|
+
...isWindows5 ? [process.cwd()] : [],
|
|
125671
125671
|
...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */
|
|
125672
125672
|
"").split(colon)
|
|
125673
125673
|
];
|
|
125674
|
-
const pathExtExe =
|
|
125675
|
-
const pathExt =
|
|
125676
|
-
if (
|
|
125674
|
+
const pathExtExe = isWindows5 ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : "";
|
|
125675
|
+
const pathExt = isWindows5 ? pathExtExe.split(colon) : [""];
|
|
125676
|
+
if (isWindows5) {
|
|
125677
125677
|
if (cmd.indexOf(".") !== -1 && pathExt[0] !== "")
|
|
125678
125678
|
pathExt.unshift("");
|
|
125679
125679
|
}
|
|
@@ -154757,6 +154757,45 @@ var require_main2 = __commonJS({
|
|
|
154757
154757
|
module3.exports.expand = expand;
|
|
154758
154758
|
}
|
|
154759
154759
|
});
|
|
154760
|
+
|
|
154761
|
+
// src/config/case-insensitive-env.ts
|
|
154762
|
+
function caseInsensitiveEnv() {
|
|
154763
|
+
const tracked = /* @__PURE__ */ new Map();
|
|
154764
|
+
const targetObj = {};
|
|
154765
|
+
const canonical = /* @__PURE__ */ __name((property) => typeof property === "string" ? property.toLowerCase() : property, "canonical");
|
|
154766
|
+
return new Proxy(targetObj, {
|
|
154767
|
+
get(target, property, receiver) {
|
|
154768
|
+
const actualProperty = tracked.get(canonical(property));
|
|
154769
|
+
return actualProperty !== void 0 ? Reflect.get(target, actualProperty, receiver) : void 0;
|
|
154770
|
+
},
|
|
154771
|
+
set(target, property, value, receiver) {
|
|
154772
|
+
tracked.set(canonical(property), property);
|
|
154773
|
+
return Reflect.set(target, property, value, receiver);
|
|
154774
|
+
},
|
|
154775
|
+
has(target, property) {
|
|
154776
|
+
const actualProperty = tracked.get(canonical(property));
|
|
154777
|
+
return actualProperty !== void 0 ? Reflect.has(target, actualProperty) : false;
|
|
154778
|
+
},
|
|
154779
|
+
getOwnPropertyDescriptor(target, property) {
|
|
154780
|
+
const actualProperty = tracked.get(canonical(property));
|
|
154781
|
+
return actualProperty !== void 0 ? Reflect.getOwnPropertyDescriptor(target, actualProperty) : void 0;
|
|
154782
|
+
},
|
|
154783
|
+
defineProperty(target, property, descriptor2) {
|
|
154784
|
+
tracked.set(canonical(property), property);
|
|
154785
|
+
return Reflect.defineProperty(target, property, descriptor2);
|
|
154786
|
+
},
|
|
154787
|
+
deleteProperty(target, property) {
|
|
154788
|
+
tracked.delete(canonical(property));
|
|
154789
|
+
return Reflect.deleteProperty(target, property);
|
|
154790
|
+
}
|
|
154791
|
+
});
|
|
154792
|
+
}
|
|
154793
|
+
var init_case_insensitive_env = __esm({
|
|
154794
|
+
"src/config/case-insensitive-env.ts"() {
|
|
154795
|
+
init_import_meta_url();
|
|
154796
|
+
__name(caseInsensitiveEnv, "caseInsensitiveEnv");
|
|
154797
|
+
}
|
|
154798
|
+
});
|
|
154760
154799
|
function getDefaultEnvFiles(env6) {
|
|
154761
154800
|
const envFiles = [".env", ".env.local"];
|
|
154762
154801
|
if (env6 !== void 0) {
|
|
@@ -154766,7 +154805,7 @@ function getDefaultEnvFiles(env6) {
|
|
|
154766
154805
|
return envFiles;
|
|
154767
154806
|
}
|
|
154768
154807
|
function loadDotEnv(envPaths, { includeProcessEnv, silent }) {
|
|
154769
|
-
const parsedEnv = {};
|
|
154808
|
+
const parsedEnv = isWindows3 ? caseInsensitiveEnv() : {};
|
|
154770
154809
|
for (const envPath of envPaths) {
|
|
154771
154810
|
const { error: error3, parsed } = import_dotenv.default.config({
|
|
154772
154811
|
path: envPath,
|
|
@@ -154786,7 +154825,7 @@ function loadDotEnv(envPaths, { includeProcessEnv, silent }) {
|
|
|
154786
154825
|
logger.log(`Using vars defined in ${relativePath}`);
|
|
154787
154826
|
}
|
|
154788
154827
|
}
|
|
154789
|
-
const expandedEnv = {};
|
|
154828
|
+
const expandedEnv = isWindows3 ? caseInsensitiveEnv() : {};
|
|
154790
154829
|
if (includeProcessEnv) {
|
|
154791
154830
|
Object.assign(expandedEnv, process.env);
|
|
154792
154831
|
if (!silent) {
|
|
@@ -154802,13 +154841,15 @@ function loadDotEnv(envPaths, { includeProcessEnv, silent }) {
|
|
|
154802
154841
|
}
|
|
154803
154842
|
return expandedEnv;
|
|
154804
154843
|
}
|
|
154805
|
-
var import_dotenv, import_dotenv_expand;
|
|
154844
|
+
var import_dotenv, import_dotenv_expand, isWindows3;
|
|
154806
154845
|
var init_dot_env = __esm({
|
|
154807
154846
|
"src/config/dot-env.ts"() {
|
|
154808
154847
|
init_import_meta_url();
|
|
154809
154848
|
import_dotenv = __toESM(require_main());
|
|
154810
154849
|
import_dotenv_expand = __toESM(require_main2());
|
|
154811
154850
|
init_logger();
|
|
154851
|
+
init_case_insensitive_env();
|
|
154852
|
+
isWindows3 = process.platform === "win32";
|
|
154812
154853
|
__name(getDefaultEnvFiles, "getDefaultEnvFiles");
|
|
154813
154854
|
__name(loadDotEnv, "loadDotEnv");
|
|
154814
154855
|
}
|
|
@@ -154869,7 +154910,7 @@ function isLocal(args, defaultValue = true) {
|
|
|
154869
154910
|
return args.local === true || args.remote === false;
|
|
154870
154911
|
}
|
|
154871
154912
|
function printResourceLocation(location) {
|
|
154872
|
-
logger.log(source_default.hex("#BD5B08").bold("Resource location:"), location);
|
|
154913
|
+
logger.log(source_default.hex("#BD5B08").bold("Resource location:"), location, "\n");
|
|
154873
154914
|
}
|
|
154874
154915
|
var init_is_local = __esm({
|
|
154875
154916
|
"src/utils/is-local.ts"() {
|
|
@@ -155054,11 +155095,13 @@ var d1DeleteCommand;
|
|
|
155054
155095
|
var init_delete2 = __esm({
|
|
155055
155096
|
"src/d1/delete.ts"() {
|
|
155056
155097
|
init_import_meta_url();
|
|
155098
|
+
init_source();
|
|
155057
155099
|
init_cfetch();
|
|
155058
155100
|
init_create_command();
|
|
155059
155101
|
init_dialogs();
|
|
155060
155102
|
init_logger();
|
|
155061
155103
|
init_user3();
|
|
155104
|
+
init_is_local();
|
|
155062
155105
|
init_utils4();
|
|
155063
155106
|
d1DeleteCommand = createCommand({
|
|
155064
155107
|
metadata: {
|
|
@@ -155090,7 +155133,12 @@ var init_delete2 = __esm({
|
|
|
155090
155133
|
accountId,
|
|
155091
155134
|
name2
|
|
155092
155135
|
);
|
|
155093
|
-
|
|
155136
|
+
printResourceLocation("remote");
|
|
155137
|
+
logger.log(
|
|
155138
|
+
`About to delete ${source_default.bold("remote")} database DB '${name2}' (${db.uuid}).
|
|
155139
|
+
This action is irreversible and will permanently delete all data in the database.
|
|
155140
|
+
`
|
|
155141
|
+
);
|
|
155094
155142
|
if (!skipConfirmation) {
|
|
155095
155143
|
const response = await confirm(`Ok to proceed?`);
|
|
155096
155144
|
if (!response) {
|
|
@@ -155671,7 +155719,8 @@ var init_execute = __esm({
|
|
|
155671
155719
|
owner: "Product: D1"
|
|
155672
155720
|
},
|
|
155673
155721
|
behaviour: {
|
|
155674
|
-
printBanner: /* @__PURE__ */ __name((args) => !args.json, "printBanner")
|
|
155722
|
+
printBanner: /* @__PURE__ */ __name((args) => !args.json, "printBanner"),
|
|
155723
|
+
printResourceLocation: /* @__PURE__ */ __name((args) => !args.json, "printResourceLocation")
|
|
155675
155724
|
},
|
|
155676
155725
|
args: {
|
|
155677
155726
|
database: {
|
|
@@ -155949,6 +155998,9 @@ var init_export2 = __esm({
|
|
|
155949
155998
|
status: "stable",
|
|
155950
155999
|
owner: "Product: D1"
|
|
155951
156000
|
},
|
|
156001
|
+
behaviour: {
|
|
156002
|
+
printResourceLocation: true
|
|
156003
|
+
},
|
|
155952
156004
|
args: {
|
|
155953
156005
|
name: {
|
|
155954
156006
|
type: "string",
|
|
@@ -156542,6 +156594,9 @@ var init_apply2 = __esm({
|
|
|
156542
156594
|
status: "stable",
|
|
156543
156595
|
owner: "Product: D1"
|
|
156544
156596
|
},
|
|
156597
|
+
behaviour: {
|
|
156598
|
+
printResourceLocation: true
|
|
156599
|
+
},
|
|
156545
156600
|
args: {
|
|
156546
156601
|
database: {
|
|
156547
156602
|
type: "string",
|
|
@@ -156790,6 +156845,9 @@ var init_list3 = __esm({
|
|
|
156790
156845
|
status: "stable",
|
|
156791
156846
|
owner: "Product: D1"
|
|
156792
156847
|
},
|
|
156848
|
+
behaviour: {
|
|
156849
|
+
printResourceLocation: true
|
|
156850
|
+
},
|
|
156793
156851
|
args: {
|
|
156794
156852
|
database: {
|
|
156795
156853
|
type: "string",
|
|
@@ -156974,6 +157032,7 @@ var init_info2 = __esm({
|
|
|
156974
157032
|
init_create_command();
|
|
156975
157033
|
init_logger();
|
|
156976
157034
|
init_user3();
|
|
157035
|
+
init_is_local();
|
|
156977
157036
|
init_utils4();
|
|
156978
157037
|
init_utils6();
|
|
156979
157038
|
d1TimeTravelInfoCommand = createCommand({
|
|
@@ -157004,6 +157063,9 @@ var init_info2 = __esm({
|
|
|
157004
157063
|
positionalArgs: ["database"],
|
|
157005
157064
|
async handler({ database, json, timestamp }, { config }) {
|
|
157006
157065
|
const accountId = await requireAuth(config);
|
|
157066
|
+
if (!json) {
|
|
157067
|
+
printResourceLocation("remote");
|
|
157068
|
+
}
|
|
157007
157069
|
const db = await getDatabaseByNameOrBinding(config, accountId, database);
|
|
157008
157070
|
await throwIfDatabaseIsAlpha(config, accountId, db.uuid);
|
|
157009
157071
|
const result = await getBookmarkIdFromTimestamp(
|
|
@@ -157039,6 +157101,7 @@ var init_restore = __esm({
|
|
|
157039
157101
|
init_dialogs();
|
|
157040
157102
|
init_logger();
|
|
157041
157103
|
init_user3();
|
|
157104
|
+
init_is_local();
|
|
157042
157105
|
init_utils4();
|
|
157043
157106
|
init_utils6();
|
|
157044
157107
|
d1TimeTravelRestoreCommand = createCommand({
|
|
@@ -157082,6 +157145,9 @@ var init_restore = __esm({
|
|
|
157082
157145
|
},
|
|
157083
157146
|
async handler({ database, json, timestamp, bookmark }, { config }) {
|
|
157084
157147
|
const accountId = await requireAuth(config);
|
|
157148
|
+
if (!json) {
|
|
157149
|
+
printResourceLocation("remote");
|
|
157150
|
+
}
|
|
157085
157151
|
const db = await getDatabaseByNameOrBinding(config, accountId, database);
|
|
157086
157152
|
await throwIfDatabaseIsAlpha(config, accountId, db.uuid);
|
|
157087
157153
|
const searchParams = new URLSearchParams();
|
|
@@ -159557,6 +159623,7 @@ var init_kv2 = __esm({
|
|
|
159557
159623
|
"src/kv/index.ts"() {
|
|
159558
159624
|
init_import_meta_url();
|
|
159559
159625
|
init_dist();
|
|
159626
|
+
init_source();
|
|
159560
159627
|
init_config();
|
|
159561
159628
|
init_core3();
|
|
159562
159629
|
init_create_command();
|
|
@@ -159689,6 +159756,12 @@ var init_kv2 = __esm({
|
|
|
159689
159756
|
preview: {
|
|
159690
159757
|
type: "boolean",
|
|
159691
159758
|
describe: "Interact with a preview namespace"
|
|
159759
|
+
},
|
|
159760
|
+
"skip-confirmation": {
|
|
159761
|
+
type: "boolean",
|
|
159762
|
+
description: "Skip confirmation",
|
|
159763
|
+
alias: "y",
|
|
159764
|
+
default: false
|
|
159692
159765
|
}
|
|
159693
159766
|
},
|
|
159694
159767
|
validateArgs(args) {
|
|
@@ -159706,6 +159779,18 @@ var init_kv2 = __esm({
|
|
|
159706
159779
|
);
|
|
159707
159780
|
}
|
|
159708
159781
|
const accountId = await requireAuth(config);
|
|
159782
|
+
logger.log(
|
|
159783
|
+
`About to delete ${source_default.bold("remote")} KV namespace '${args.binding ? args.binding + ` (${id})` : args.namespaceId}'.
|
|
159784
|
+
This action is irreversible and will permanently delete all data in the KV namespace.
|
|
159785
|
+
`
|
|
159786
|
+
);
|
|
159787
|
+
if (!args.skipConfirmation) {
|
|
159788
|
+
const response = await confirm(`Ok to proceed?`);
|
|
159789
|
+
if (!response) {
|
|
159790
|
+
logger.log(`Not deleting.`);
|
|
159791
|
+
return;
|
|
159792
|
+
}
|
|
159793
|
+
}
|
|
159709
159794
|
logger.log(`Deleting KV namespace ${id}.`);
|
|
159710
159795
|
await deleteKVNamespace(config, accountId, id);
|
|
159711
159796
|
logger.log(`Deleted KV namespace ${id}.`);
|
|
@@ -162544,8 +162629,8 @@ var require_mime = __commonJS({
|
|
|
162544
162629
|
var require_path = __commonJS({
|
|
162545
162630
|
"../../node_modules/.pnpm/minimatch@5.1.6/node_modules/minimatch/lib/path.js"(exports2, module3) {
|
|
162546
162631
|
init_import_meta_url();
|
|
162547
|
-
var
|
|
162548
|
-
module3.exports =
|
|
162632
|
+
var isWindows5 = typeof process === "object" && process && process.platform === "win32";
|
|
162633
|
+
module3.exports = isWindows5 ? { sep: "\\" } : { sep: "/" };
|
|
162549
162634
|
}
|
|
162550
162635
|
});
|
|
162551
162636
|
|
|
@@ -166671,7 +166756,7 @@ var init_debounce = __esm({
|
|
|
166671
166756
|
__name(debounce, "debounce");
|
|
166672
166757
|
}
|
|
166673
166758
|
});
|
|
166674
|
-
function
|
|
166759
|
+
function isWindows4() {
|
|
166675
166760
|
return process.platform === "win32";
|
|
166676
166761
|
}
|
|
166677
166762
|
async function sleep2(ms) {
|
|
@@ -166680,7 +166765,7 @@ async function sleep2(ms) {
|
|
|
166680
166765
|
function getPids(pid) {
|
|
166681
166766
|
const pids = [pid];
|
|
166682
166767
|
let command2, regExp;
|
|
166683
|
-
if (
|
|
166768
|
+
if (isWindows4()) {
|
|
166684
166769
|
command2 = `wmic process where (ParentProcessId=${pid}) get ProcessId`;
|
|
166685
166770
|
regExp = new RegExp(/(\d+)/);
|
|
166686
166771
|
} else {
|
|
@@ -166696,7 +166781,7 @@ function getPids(pid) {
|
|
|
166696
166781
|
}
|
|
166697
166782
|
function getPort(pid) {
|
|
166698
166783
|
let command2, regExp;
|
|
166699
|
-
if (
|
|
166784
|
+
if (isWindows4()) {
|
|
166700
166785
|
command2 = process.env.SYSTEMROOT + "\\system32\\netstat.exe -nao";
|
|
166701
166786
|
regExp = new RegExp(`TCP\\s+.*:(\\d+)\\s+.*:\\d+\\s+LISTENING\\s+${pid}`);
|
|
166702
166787
|
} else {
|
|
@@ -166746,7 +166831,7 @@ This results in a more faithful emulation of production behavior.`
|
|
|
166746
166831
|
command2[0].toString(),
|
|
166747
166832
|
command2.slice(1).map((value) => value.toString()),
|
|
166748
166833
|
{
|
|
166749
|
-
shell:
|
|
166834
|
+
shell: isWindows4(),
|
|
166750
166835
|
env: {
|
|
166751
166836
|
BROWSER: "none",
|
|
166752
166837
|
...process.env
|
|
@@ -167577,7 +167662,7 @@ ${JSON.stringify(defaultRoutesJSONSpec, null, 2)}`
|
|
|
167577
167662
|
process.exit(0);
|
|
167578
167663
|
}
|
|
167579
167664
|
});
|
|
167580
|
-
__name(
|
|
167665
|
+
__name(isWindows4, "isWindows");
|
|
167581
167666
|
__name(sleep2, "sleep");
|
|
167582
167667
|
__name(getPids, "getPids");
|
|
167583
167668
|
__name(getPort, "getPort");
|