wrangler 3.103.0 → 3.103.2
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 +6 -7
- package/wrangler-dist/cli.js +225 -228
- package/wrangler-dist/cli.js.map +0 -7
package/wrangler-dist/cli.js
CHANGED
@@ -17534,7 +17534,7 @@ var require_XDG = __commonJS({
|
|
17534
17534
|
exports2.__esModule = true;
|
17535
17535
|
exports2.Adapt = void 0;
|
17536
17536
|
function Adapt(adapter_) {
|
17537
|
-
var
|
17537
|
+
var env7 = adapter_.env, osPaths = adapter_.osPaths, path69 = adapter_.path;
|
17538
17538
|
var isMacOS = /^darwin$/i.test(adapter_.process.platform);
|
17539
17539
|
var isWinOS = /^win/i.test(adapter_.process.platform);
|
17540
17540
|
function baseDir() {
|
@@ -17547,63 +17547,63 @@ var require_XDG = __commonJS({
|
|
17547
17547
|
__name(valOrPath, "valOrPath");
|
17548
17548
|
var linux = /* @__PURE__ */ __name(function() {
|
17549
17549
|
var cache6 = /* @__PURE__ */ __name(function() {
|
17550
|
-
return valOrPath(
|
17550
|
+
return valOrPath(env7.get("XDG_CACHE_HOME"), [baseDir(), ".cache"]);
|
17551
17551
|
}, "cache");
|
17552
17552
|
var config = /* @__PURE__ */ __name(function() {
|
17553
|
-
return valOrPath(
|
17553
|
+
return valOrPath(env7.get("XDG_CONFIG_HOME"), [baseDir(), ".config"]);
|
17554
17554
|
}, "config");
|
17555
17555
|
var data = /* @__PURE__ */ __name(function() {
|
17556
|
-
return valOrPath(
|
17556
|
+
return valOrPath(env7.get("XDG_DATA_HOME"), [baseDir(), ".local", "share"]);
|
17557
17557
|
}, "data");
|
17558
17558
|
var runtime = /* @__PURE__ */ __name(function() {
|
17559
|
-
return
|
17559
|
+
return env7.get("XDG_RUNTIME_DIR") || void 0;
|
17560
17560
|
}, "runtime");
|
17561
17561
|
var state2 = /* @__PURE__ */ __name(function() {
|
17562
|
-
return valOrPath(
|
17562
|
+
return valOrPath(env7.get("XDG_STATE_HOME"), [baseDir(), ".local", "state"]);
|
17563
17563
|
}, "state");
|
17564
17564
|
return { cache: cache6, config, data, runtime, state: state2 };
|
17565
17565
|
}, "linux");
|
17566
17566
|
var macos = /* @__PURE__ */ __name(function() {
|
17567
17567
|
var cache6 = /* @__PURE__ */ __name(function() {
|
17568
|
-
return valOrPath(
|
17568
|
+
return valOrPath(env7.get("XDG_CACHE_HOME"), [baseDir(), "Library", "Caches"]);
|
17569
17569
|
}, "cache");
|
17570
17570
|
var config = /* @__PURE__ */ __name(function() {
|
17571
|
-
return valOrPath(
|
17571
|
+
return valOrPath(env7.get("XDG_CONFIG_HOME"), [baseDir(), "Library", "Preferences"]);
|
17572
17572
|
}, "config");
|
17573
17573
|
var data = /* @__PURE__ */ __name(function() {
|
17574
|
-
return valOrPath(
|
17574
|
+
return valOrPath(env7.get("XDG_DATA_HOME"), [baseDir(), "Library", "Application Support"]);
|
17575
17575
|
}, "data");
|
17576
17576
|
var runtime = /* @__PURE__ */ __name(function() {
|
17577
|
-
return
|
17577
|
+
return env7.get("XDG_RUNTIME_DIR") || void 0;
|
17578
17578
|
}, "runtime");
|
17579
17579
|
var state2 = /* @__PURE__ */ __name(function() {
|
17580
|
-
return valOrPath(
|
17580
|
+
return valOrPath(env7.get("XDG_STATE_HOME"), [baseDir(), "Library", "State"]);
|
17581
17581
|
}, "state");
|
17582
17582
|
return { cache: cache6, config, data, runtime, state: state2 };
|
17583
17583
|
}, "macos");
|
17584
17584
|
var windows = /* @__PURE__ */ __name(function() {
|
17585
17585
|
function appData() {
|
17586
|
-
return valOrPath(
|
17586
|
+
return valOrPath(env7.get("APPDATA"), [baseDir(), "AppData", "Roaming"]);
|
17587
17587
|
}
|
17588
17588
|
__name(appData, "appData");
|
17589
17589
|
function localAppData() {
|
17590
|
-
return valOrPath(
|
17590
|
+
return valOrPath(env7.get("LOCALAPPDATA"), [baseDir(), "AppData", "Local"]);
|
17591
17591
|
}
|
17592
17592
|
__name(localAppData, "localAppData");
|
17593
17593
|
var cache6 = /* @__PURE__ */ __name(function() {
|
17594
|
-
return valOrPath(
|
17594
|
+
return valOrPath(env7.get("XDG_CACHE_HOME"), [localAppData(), "xdg.cache"]);
|
17595
17595
|
}, "cache");
|
17596
17596
|
var config = /* @__PURE__ */ __name(function() {
|
17597
|
-
return valOrPath(
|
17597
|
+
return valOrPath(env7.get("XDG_CONFIG_HOME"), [appData(), "xdg.config"]);
|
17598
17598
|
}, "config");
|
17599
17599
|
var data = /* @__PURE__ */ __name(function() {
|
17600
|
-
return valOrPath(
|
17600
|
+
return valOrPath(env7.get("XDG_DATA_HOME"), [appData(), "xdg.data"]);
|
17601
17601
|
}, "data");
|
17602
17602
|
var runtime = /* @__PURE__ */ __name(function() {
|
17603
|
-
return
|
17603
|
+
return env7.get("XDG_RUNTIME_DIR") || void 0;
|
17604
17604
|
}, "runtime");
|
17605
17605
|
var state2 = /* @__PURE__ */ __name(function() {
|
17606
|
-
return valOrPath(
|
17606
|
+
return valOrPath(env7.get("XDG_STATE_HOME"), [localAppData(), "xdg.state"]);
|
17607
17607
|
}, "state");
|
17608
17608
|
return { cache: cache6, config, data, runtime, state: state2 };
|
17609
17609
|
}, "windows");
|
@@ -17620,11 +17620,11 @@ var require_XDG = __commonJS({
|
|
17620
17620
|
XDG.runtime = extension.runtime;
|
17621
17621
|
XDG.state = extension.state;
|
17622
17622
|
XDG.configDirs = /* @__PURE__ */ __name(function configDirs() {
|
17623
|
-
var pathList =
|
17623
|
+
var pathList = env7.get("XDG_CONFIG_DIRS");
|
17624
17624
|
return __spreadArray([extension.config()], pathList ? pathList.split(path69.delimiter) : []);
|
17625
17625
|
}, "configDirs");
|
17626
17626
|
XDG.dataDirs = /* @__PURE__ */ __name(function dataDirs() {
|
17627
|
-
var pathList =
|
17627
|
+
var pathList = env7.get("XDG_DATA_DIRS");
|
17628
17628
|
return __spreadArray([extension.data()], pathList ? pathList.split(path69.delimiter) : []);
|
17629
17629
|
}, "dataDirs");
|
17630
17630
|
return XDG;
|
@@ -17656,7 +17656,7 @@ var require_OSPaths = __commonJS({
|
|
17656
17656
|
}
|
17657
17657
|
__name(isEmpty, "isEmpty");
|
17658
17658
|
function Adapt(adapter_) {
|
17659
|
-
var
|
17659
|
+
var env7 = adapter_.env, os13 = adapter_.os, path69 = adapter_.path;
|
17660
17660
|
var isWinOS = /^win/i.test(adapter_.process.platform);
|
17661
17661
|
function normalizePath2(path_) {
|
17662
17662
|
return path_ ? adapter_.path.normalize(adapter_.path.join(path_, ".")) : void 0;
|
@@ -17664,14 +17664,14 @@ var require_OSPaths = __commonJS({
|
|
17664
17664
|
__name(normalizePath2, "normalizePath");
|
17665
17665
|
function home() {
|
17666
17666
|
var posix2 = /* @__PURE__ */ __name(function() {
|
17667
|
-
return normalizePath2((typeof os13.homedir === "function" ? os13.homedir() : void 0) ||
|
17667
|
+
return normalizePath2((typeof os13.homedir === "function" ? os13.homedir() : void 0) || env7.get("HOME"));
|
17668
17668
|
}, "posix");
|
17669
17669
|
var windows = /* @__PURE__ */ __name(function() {
|
17670
17670
|
var priorityList = [
|
17671
17671
|
typeof os13.homedir === "function" ? os13.homedir() : void 0,
|
17672
|
-
|
17673
|
-
|
17674
|
-
|
17672
|
+
env7.get("USERPROFILE"),
|
17673
|
+
env7.get("HOME"),
|
17674
|
+
env7.get("HOMEDRIVE") || env7.get("HOMEPATH") ? path69.join(env7.get("HOMEDRIVE") || "", env7.get("HOMEPATH") || "") : void 0
|
17675
17675
|
];
|
17676
17676
|
return normalizePath2(priorityList.find(function(v7) {
|
17677
17677
|
return !isEmpty(v7);
|
@@ -17689,9 +17689,9 @@ var require_OSPaths = __commonJS({
|
|
17689
17689
|
var fallback = "/tmp";
|
17690
17690
|
var priorityList = [
|
17691
17691
|
typeof os13.tmpdir === "function" ? os13.tmpdir() : void 0,
|
17692
|
-
|
17693
|
-
|
17694
|
-
|
17692
|
+
env7.get("TMPDIR"),
|
17693
|
+
env7.get("TEMP"),
|
17694
|
+
env7.get("TMP")
|
17695
17695
|
];
|
17696
17696
|
return normalizePath2(priorityList.find(function(v7) {
|
17697
17697
|
return !isEmpty(v7);
|
@@ -17705,28 +17705,28 @@ var require_OSPaths = __commonJS({
|
|
17705
17705
|
return void 0;
|
17706
17706
|
},
|
17707
17707
|
function() {
|
17708
|
-
return
|
17708
|
+
return env7.get("TEMP");
|
17709
17709
|
},
|
17710
17710
|
function() {
|
17711
|
-
return
|
17711
|
+
return env7.get("TMP");
|
17712
17712
|
},
|
17713
17713
|
function() {
|
17714
|
-
return joinPathToBase(
|
17714
|
+
return joinPathToBase(env7.get("LOCALAPPDATA"), ["Temp"]);
|
17715
17715
|
},
|
17716
17716
|
function() {
|
17717
17717
|
return joinPathToBase(home(), ["AppData", "Local", "Temp"]);
|
17718
17718
|
},
|
17719
17719
|
function() {
|
17720
|
-
return joinPathToBase(
|
17720
|
+
return joinPathToBase(env7.get("ALLUSERSPROFILE"), ["Temp"]);
|
17721
17721
|
},
|
17722
17722
|
function() {
|
17723
|
-
return joinPathToBase(
|
17723
|
+
return joinPathToBase(env7.get("SystemRoot"), ["Temp"]);
|
17724
17724
|
},
|
17725
17725
|
function() {
|
17726
|
-
return joinPathToBase(
|
17726
|
+
return joinPathToBase(env7.get("windir"), ["Temp"]);
|
17727
17727
|
},
|
17728
17728
|
function() {
|
17729
|
-
return joinPathToBase(
|
17729
|
+
return joinPathToBase(env7.get("SystemDrive"), ["\\", "Temp"]);
|
17730
17730
|
}
|
17731
17731
|
];
|
17732
17732
|
var v7 = priorityListLazy.find(function(v8) {
|
@@ -18502,15 +18502,15 @@ var require_supports_colors = __commonJS({
|
|
18502
18502
|
init_import_meta_url();
|
18503
18503
|
var os13 = require("os");
|
18504
18504
|
var hasFlag3 = require_has_flag();
|
18505
|
-
var
|
18505
|
+
var env7 = process.env;
|
18506
18506
|
var forceColor = void 0;
|
18507
18507
|
if (hasFlag3("no-color") || hasFlag3("no-colors") || hasFlag3("color=false")) {
|
18508
18508
|
forceColor = false;
|
18509
18509
|
} else if (hasFlag3("color") || hasFlag3("colors") || hasFlag3("color=true") || hasFlag3("color=always")) {
|
18510
18510
|
forceColor = true;
|
18511
18511
|
}
|
18512
|
-
if ("FORCE_COLOR" in
|
18513
|
-
forceColor =
|
18512
|
+
if ("FORCE_COLOR" in env7) {
|
18513
|
+
forceColor = env7.FORCE_COLOR.length === 0 || parseInt(env7.FORCE_COLOR, 10) !== 0;
|
18514
18514
|
}
|
18515
18515
|
function translateLevel3(level) {
|
18516
18516
|
if (level === 0) {
|
@@ -18545,20 +18545,20 @@ var require_supports_colors = __commonJS({
|
|
18545
18545
|
}
|
18546
18546
|
return 1;
|
18547
18547
|
}
|
18548
|
-
if ("CI" in
|
18548
|
+
if ("CI" in env7) {
|
18549
18549
|
if (["TRAVIS", "CIRCLECI", "APPVEYOR", "GITLAB_CI"].some(function(sign) {
|
18550
|
-
return sign in
|
18551
|
-
}) ||
|
18550
|
+
return sign in env7;
|
18551
|
+
}) || env7.CI_NAME === "codeship") {
|
18552
18552
|
return 1;
|
18553
18553
|
}
|
18554
18554
|
return min;
|
18555
18555
|
}
|
18556
|
-
if ("TEAMCITY_VERSION" in
|
18557
|
-
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(
|
18556
|
+
if ("TEAMCITY_VERSION" in env7) {
|
18557
|
+
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env7.TEAMCITY_VERSION) ? 1 : 0;
|
18558
18558
|
}
|
18559
|
-
if ("TERM_PROGRAM" in
|
18560
|
-
var version4 = parseInt((
|
18561
|
-
switch (
|
18559
|
+
if ("TERM_PROGRAM" in env7) {
|
18560
|
+
var version4 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
18561
|
+
switch (env7.TERM_PROGRAM) {
|
18562
18562
|
case "iTerm.app":
|
18563
18563
|
return version4 >= 3 ? 3 : 2;
|
18564
18564
|
case "Hyper":
|
@@ -18567,16 +18567,16 @@ var require_supports_colors = __commonJS({
|
|
18567
18567
|
return 2;
|
18568
18568
|
}
|
18569
18569
|
}
|
18570
|
-
if (/-256(color)?$/i.test(
|
18570
|
+
if (/-256(color)?$/i.test(env7.TERM)) {
|
18571
18571
|
return 2;
|
18572
18572
|
}
|
18573
|
-
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(
|
18573
|
+
if (/^screen|^xterm|^vt100|^rxvt|color|ansi|cygwin|linux/i.test(env7.TERM)) {
|
18574
18574
|
return 1;
|
18575
18575
|
}
|
18576
|
-
if ("COLORTERM" in
|
18576
|
+
if ("COLORTERM" in env7) {
|
18577
18577
|
return 1;
|
18578
18578
|
}
|
18579
|
-
if (
|
18579
|
+
if (env7.TERM === "dumb") {
|
18580
18580
|
return min;
|
18581
18581
|
}
|
18582
18582
|
return min;
|
@@ -22931,8 +22931,8 @@ var require_picocolors = __commonJS({
|
|
22931
22931
|
init_import_meta_url();
|
22932
22932
|
var p6 = process || {};
|
22933
22933
|
var argv = p6.argv || [];
|
22934
|
-
var
|
22935
|
-
var isColorSupported = !(!!
|
22934
|
+
var env7 = p6.env || {};
|
22935
|
+
var isColorSupported = !(!!env7.NO_COLOR || argv.includes("--no-color")) && (!!env7.FORCE_COLOR || argv.includes("--color") || p6.platform === "win32" || (p6.stdout || {}).isTTY && env7.TERM !== "dumb" || !!env7.CI);
|
22936
22936
|
var formatter = /* @__PURE__ */ __name((open4, close2, replace = open4) => (input) => {
|
22937
22937
|
let string = "" + input, index = string.indexOf(close2, open4.length);
|
22938
22938
|
return ~index ? open4 + replaceClose(string, close2, replace, index) + close2 : open4 + string + close2;
|
@@ -23484,7 +23484,7 @@ var require_ci_info = __commonJS({
|
|
23484
23484
|
"use strict";
|
23485
23485
|
init_import_meta_url();
|
23486
23486
|
var vendors = require_vendors();
|
23487
|
-
var
|
23487
|
+
var env7 = process.env;
|
23488
23488
|
Object.defineProperty(exports2, "_vendors", {
|
23489
23489
|
value: vendors.map(function(v7) {
|
23490
23490
|
return v7.constant;
|
@@ -23504,14 +23504,14 @@ var require_ci_info = __commonJS({
|
|
23504
23504
|
exports2.name = vendor.name;
|
23505
23505
|
switch (typeof vendor.pr) {
|
23506
23506
|
case "string":
|
23507
|
-
exports2.isPR = !!
|
23507
|
+
exports2.isPR = !!env7[vendor.pr];
|
23508
23508
|
break;
|
23509
23509
|
case "object":
|
23510
23510
|
if ("env" in vendor.pr) {
|
23511
|
-
exports2.isPR = vendor.pr.env in
|
23511
|
+
exports2.isPR = vendor.pr.env in env7 && env7[vendor.pr.env] !== vendor.pr.ne;
|
23512
23512
|
} else if ("any" in vendor.pr) {
|
23513
23513
|
exports2.isPR = vendor.pr.any.some(function(key) {
|
23514
|
-
return !!
|
23514
|
+
return !!env7[key];
|
23515
23515
|
});
|
23516
23516
|
} else {
|
23517
23517
|
exports2.isPR = checkEnv(vendor.pr);
|
@@ -23521,30 +23521,30 @@ var require_ci_info = __commonJS({
|
|
23521
23521
|
exports2.isPR = null;
|
23522
23522
|
}
|
23523
23523
|
});
|
23524
|
-
exports2.isCI = !!(
|
23525
|
-
(
|
23526
|
-
|
23527
|
-
|
23528
|
-
|
23529
|
-
|
23530
|
-
|
23531
|
-
|
23532
|
-
|
23533
|
-
|
23524
|
+
exports2.isCI = !!(env7.CI !== "false" && // Bypass all checks if CI env is explicitly set to 'false'
|
23525
|
+
(env7.BUILD_ID || // Jenkins, Cloudbees
|
23526
|
+
env7.BUILD_NUMBER || // Jenkins, TeamCity
|
23527
|
+
env7.CI || // Travis CI, CircleCI, Cirrus CI, Gitlab CI, Appveyor, CodeShip, dsari
|
23528
|
+
env7.CI_APP_ID || // Appflow
|
23529
|
+
env7.CI_BUILD_ID || // Appflow
|
23530
|
+
env7.CI_BUILD_NUMBER || // Appflow
|
23531
|
+
env7.CI_NAME || // Codeship and others
|
23532
|
+
env7.CONTINUOUS_INTEGRATION || // Travis CI, Cirrus CI
|
23533
|
+
env7.RUN_ID || // TaskCluster, dsari
|
23534
23534
|
exports2.name || false));
|
23535
23535
|
function checkEnv(obj) {
|
23536
23536
|
if (typeof obj === "string")
|
23537
|
-
return !!
|
23537
|
+
return !!env7[obj];
|
23538
23538
|
if ("env" in obj) {
|
23539
|
-
return
|
23539
|
+
return env7[obj.env] && env7[obj.env].includes(obj.includes);
|
23540
23540
|
}
|
23541
23541
|
if ("any" in obj) {
|
23542
23542
|
return obj.any.some(function(k6) {
|
23543
|
-
return !!
|
23543
|
+
return !!env7[k6];
|
23544
23544
|
});
|
23545
23545
|
}
|
23546
23546
|
return Object.keys(obj).every(function(k6) {
|
23547
|
-
return
|
23547
|
+
return env7[k6] === obj[k6];
|
23548
23548
|
});
|
23549
23549
|
}
|
23550
23550
|
__name(checkEnv, "checkEnv");
|
@@ -30656,11 +30656,11 @@ var require_utils3 = __commonJS({
|
|
30656
30656
|
var content = file.apply(null, arguments);
|
30657
30657
|
return content ? parse8(content) : null;
|
30658
30658
|
};
|
30659
|
-
var
|
30660
|
-
|
30659
|
+
var env7 = exports2.env = function(prefix, env8) {
|
30660
|
+
env8 = env8 || process.env;
|
30661
30661
|
var obj = {};
|
30662
30662
|
var l6 = prefix.length;
|
30663
|
-
for (var k6 in
|
30663
|
+
for (var k6 in env8) {
|
30664
30664
|
if (k6.toLowerCase().indexOf(prefix.toLowerCase()) === 0) {
|
30665
30665
|
var keypath = k6.substring(l6).split("__");
|
30666
30666
|
var _emptyStringIndex;
|
@@ -30672,7 +30672,7 @@ var require_utils3 = __commonJS({
|
|
30672
30672
|
if (!_subkey || typeof cursor !== "object")
|
30673
30673
|
return;
|
30674
30674
|
if (i5 === keypath.length - 1)
|
30675
|
-
cursor[_subkey] =
|
30675
|
+
cursor[_subkey] = env8[k6];
|
30676
30676
|
if (cursor[_subkey] === void 0)
|
30677
30677
|
cursor[_subkey] = {};
|
30678
30678
|
cursor = cursor[_subkey];
|
@@ -31018,7 +31018,7 @@ var require_rc = __commonJS({
|
|
31018
31018
|
argv = require_minimist()(process.argv.slice(2));
|
31019
31019
|
defaults = ("string" === typeof defaults ? cc2.json(defaults) : defaults) || {};
|
31020
31020
|
parse8 = parse8 || cc2.parse;
|
31021
|
-
var
|
31021
|
+
var env7 = cc2.env(name2 + "_");
|
31022
31022
|
var configs = [defaults];
|
31023
31023
|
var configFiles = [];
|
31024
31024
|
function addConfigFile(file) {
|
@@ -31044,12 +31044,12 @@ var require_rc = __commonJS({
|
|
31044
31044
|
join23(home, "." + name2 + "rc")
|
31045
31045
|
].forEach(addConfigFile);
|
31046
31046
|
addConfigFile(cc2.find("." + name2 + "rc"));
|
31047
|
-
if (
|
31048
|
-
addConfigFile(
|
31047
|
+
if (env7.config)
|
31048
|
+
addConfigFile(env7.config);
|
31049
31049
|
if (argv.config)
|
31050
31050
|
addConfigFile(argv.config);
|
31051
31051
|
return deepExtend.apply(null, configs.concat([
|
31052
|
-
|
31052
|
+
env7,
|
31053
31053
|
argv,
|
31054
31054
|
configFiles.length ? { configs: configFiles, config: configFiles[configFiles.length - 1] } : void 0
|
31055
31055
|
]));
|
@@ -54337,7 +54337,7 @@ var require_resolveCommand = __commonJS({
|
|
54337
54337
|
var which = require_which();
|
54338
54338
|
var getPathKey = require_path_key();
|
54339
54339
|
function resolveCommandAttempt(parsed, withoutPathExt) {
|
54340
|
-
const
|
54340
|
+
const env7 = parsed.options.env || process.env;
|
54341
54341
|
const cwd2 = process.cwd();
|
54342
54342
|
const hasCustomCwd = parsed.options.cwd != null;
|
54343
54343
|
const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
|
@@ -54350,7 +54350,7 @@ var require_resolveCommand = __commonJS({
|
|
54350
54350
|
let resolved;
|
54351
54351
|
try {
|
54352
54352
|
resolved = which.sync(parsed.command, {
|
54353
|
-
path:
|
54353
|
+
path: env7[getPathKey({ env: env7 })],
|
54354
54354
|
pathExt: withoutPathExt ? path69.delimiter : void 0
|
54355
54355
|
});
|
54356
54356
|
} catch (e7) {
|
@@ -54628,13 +54628,13 @@ var init_strip_final_newline = __esm({
|
|
54628
54628
|
// ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
54629
54629
|
function pathKey(options30 = {}) {
|
54630
54630
|
const {
|
54631
|
-
env:
|
54631
|
+
env: env7 = process.env,
|
54632
54632
|
platform: platform3 = process.platform
|
54633
54633
|
} = options30;
|
54634
54634
|
if (platform3 !== "win32") {
|
54635
54635
|
return "PATH";
|
54636
54636
|
}
|
54637
|
-
return Object.keys(
|
54637
|
+
return Object.keys(env7).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
|
54638
54638
|
}
|
54639
54639
|
var init_path_key = __esm({
|
54640
54640
|
"../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js"() {
|
@@ -54662,12 +54662,12 @@ function npmRunPath(options30 = {}) {
|
|
54662
54662
|
result.push(import_node_path25.default.resolve(cwdString, execPath, ".."));
|
54663
54663
|
return [...result, path_].join(import_node_path25.default.delimiter);
|
54664
54664
|
}
|
54665
|
-
function npmRunPathEnv({ env:
|
54666
|
-
|
54667
|
-
const path69 = pathKey({ env:
|
54668
|
-
options30.path =
|
54669
|
-
|
54670
|
-
return
|
54665
|
+
function npmRunPathEnv({ env: env7 = import_node_process8.default.env, ...options30 } = {}) {
|
54666
|
+
env7 = { ...env7 };
|
54667
|
+
const path69 = pathKey({ env: env7 });
|
54668
|
+
options30.path = env7[path69];
|
54669
|
+
env7[path69] = npmRunPath(options30);
|
54670
|
+
return env7;
|
54671
54671
|
}
|
54672
54672
|
var import_node_process8, import_node_path25, import_node_url10;
|
54673
54673
|
var init_npm_run_path = __esm({
|
@@ -55807,11 +55807,11 @@ var init_execa = __esm({
|
|
55807
55807
|
init_command();
|
55808
55808
|
DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
|
55809
55809
|
getEnv = /* @__PURE__ */ __name(({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
|
55810
|
-
const
|
55810
|
+
const env7 = extendEnv ? { ...import_node_process9.default.env, ...envOption } : envOption;
|
55811
55811
|
if (preferLocal) {
|
55812
|
-
return npmRunPathEnv({ env:
|
55812
|
+
return npmRunPathEnv({ env: env7, cwd: localDir, execPath });
|
55813
55813
|
}
|
55814
|
-
return
|
55814
|
+
return env7;
|
55815
55815
|
}, "getEnv");
|
55816
55816
|
handleArguments = /* @__PURE__ */ __name((file, args, options30 = {}) => {
|
55817
55817
|
const parsed = import_cross_spawn.default._parse(file, args, options30);
|
@@ -73530,19 +73530,19 @@ Make sure "${service}" is mounted so Miniflare knows where to find it.`);
|
|
73530
73530
|
}
|
73531
73531
|
config.build = { cwd: configDir, upload: { dir: "" } };
|
73532
73532
|
(0, import_assert32.default)(config.build.upload);
|
73533
|
-
const
|
73533
|
+
const env7 = configEnv ? ` --env ${configEnv}` : "";
|
73534
73534
|
if (config.type === "webpack") {
|
73535
73535
|
let packageDir = "";
|
73536
73536
|
if (config.site) {
|
73537
73537
|
packageDir = config.site["entry-point"] ?? "workers-site";
|
73538
73538
|
}
|
73539
|
-
config.build.command = `wrangler build${
|
73539
|
+
config.build.command = `wrangler build${env7}`;
|
73540
73540
|
config.build.upload.main = import_path32.default.join(packageDir, "worker", "script.js");
|
73541
73541
|
config.miniflare ??= {};
|
73542
73542
|
config.miniflare.build_watch_dirs = ["src", "index.js"];
|
73543
73543
|
} else if (config.type === "rust") {
|
73544
73544
|
const rustScript = import_path32.default.join(__dirname, "plugins", "rust.js");
|
73545
|
-
config.build.command = `wrangler build${
|
73545
|
+
config.build.command = `wrangler build${env7} && ${process.execPath} ${rustScript}`;
|
73546
73546
|
config.build.upload.main = import_path32.default.join("worker", "generated", "script.js");
|
73547
73547
|
config.wasm_modules ??= {};
|
73548
73548
|
config.wasm_modules.wasm = import_path32.default.join(configDir, "worker", "generated", "script.wasm");
|
@@ -76440,6 +76440,7 @@ async function generateHandler({
|
|
76440
76440
|
__name(isNullBodyStatus, "isNullBodyStatus");
|
76441
76441
|
async function attachHeaders(response) {
|
76442
76442
|
const existingHeaders = new Headers(response.headers);
|
76443
|
+
const eTag = existingHeaders.get("eTag")?.match(/^"(.*)"$/)?.[1];
|
76443
76444
|
const extraHeaders = new Headers({
|
76444
76445
|
"access-control-allow-origin": "*",
|
76445
76446
|
"referrer-policy": "strict-origin-when-cross-origin",
|
@@ -76450,9 +76451,9 @@ async function generateHandler({
|
|
76450
76451
|
...Object.fromEntries(existingHeaders.entries()),
|
76451
76452
|
...Object.fromEntries(extraHeaders.entries())
|
76452
76453
|
});
|
76453
|
-
if (earlyHintsCache && isHTMLContentType(response.headers.get("Content-Type"))) {
|
76454
|
+
if (earlyHintsCache && isHTMLContentType(response.headers.get("Content-Type")) && eTag) {
|
76454
76455
|
const preEarlyHintsHeaders = new Headers(headers);
|
76455
|
-
const earlyHintsCacheKey = `${protocol}//${host}
|
76456
|
+
const earlyHintsCacheKey = `${protocol}//${host}/${eTag}`;
|
76456
76457
|
const earlyHintsResponse = await earlyHintsCache.match(earlyHintsCacheKey);
|
76457
76458
|
if (earlyHintsResponse) {
|
76458
76459
|
const earlyHintsLinkHeader = earlyHintsResponse.headers.get("Link");
|
@@ -77141,8 +77142,8 @@ var require_parse7 = __commonJS({
|
|
77141
77142
|
return matches;
|
77142
77143
|
}
|
77143
77144
|
__name(matchAll, "matchAll");
|
77144
|
-
function getVar(
|
77145
|
-
var r7 = typeof
|
77145
|
+
function getVar(env7, pre, key) {
|
77146
|
+
var r7 = typeof env7 === "function" ? env7(key) : env7[key];
|
77146
77147
|
if (typeof r7 === "undefined" && key != "") {
|
77147
77148
|
r7 = "";
|
77148
77149
|
} else if (typeof r7 === "undefined") {
|
@@ -77154,7 +77155,7 @@ var require_parse7 = __commonJS({
|
|
77154
77155
|
return pre + r7;
|
77155
77156
|
}
|
77156
77157
|
__name(getVar, "getVar");
|
77157
|
-
function parseInternal(string,
|
77158
|
+
function parseInternal(string, env7, opts) {
|
77158
77159
|
if (!opts) {
|
77159
77160
|
opts = {};
|
77160
77161
|
}
|
@@ -77169,8 +77170,8 @@ var require_parse7 = __commonJS({
|
|
77169
77170
|
if (matches.length === 0) {
|
77170
77171
|
return [];
|
77171
77172
|
}
|
77172
|
-
if (!
|
77173
|
-
|
77173
|
+
if (!env7) {
|
77174
|
+
env7 = {};
|
77174
77175
|
}
|
77175
77176
|
var commented = false;
|
77176
77177
|
return matches.map(function(match2) {
|
@@ -77216,7 +77217,7 @@ var require_parse7 = __commonJS({
|
|
77216
77217
|
i6 += varend.index - 1;
|
77217
77218
|
}
|
77218
77219
|
}
|
77219
|
-
return getVar(
|
77220
|
+
return getVar(env7, "", varname);
|
77220
77221
|
}
|
77221
77222
|
__name(parseEnvVar, "parseEnvVar");
|
77222
77223
|
for (i6 = 0; i6 < s5.length; i6++) {
|
@@ -77273,9 +77274,9 @@ var require_parse7 = __commonJS({
|
|
77273
77274
|
}, []);
|
77274
77275
|
}
|
77275
77276
|
__name(parseInternal, "parseInternal");
|
77276
|
-
module3.exports = /* @__PURE__ */ __name(function parse8(s5,
|
77277
|
-
var mapped = parseInternal(s5,
|
77278
|
-
if (typeof
|
77277
|
+
module3.exports = /* @__PURE__ */ __name(function parse8(s5, env7, opts) {
|
77278
|
+
var mapped = parseInternal(s5, env7, opts);
|
77279
|
+
if (typeof env7 !== "function") {
|
77279
77280
|
return mapped;
|
77280
77281
|
}
|
77281
77282
|
return mapped.reduce(function(acc, s6) {
|
@@ -77432,7 +77433,7 @@ var require_ms = __commonJS({
|
|
77432
77433
|
var require_common = __commonJS({
|
77433
77434
|
"../../node_modules/.pnpm/debug@4.3.7_supports-color@9.2.2/node_modules/debug/src/common.js"(exports2, module3) {
|
77434
77435
|
init_import_meta_url();
|
77435
|
-
function setup(
|
77436
|
+
function setup(env7) {
|
77436
77437
|
createDebug.debug = createDebug;
|
77437
77438
|
createDebug.default = createDebug;
|
77438
77439
|
createDebug.coerce = coerce2;
|
@@ -77441,8 +77442,8 @@ var require_common = __commonJS({
|
|
77441
77442
|
createDebug.enabled = enabled;
|
77442
77443
|
createDebug.humanize = require_ms();
|
77443
77444
|
createDebug.destroy = destroy;
|
77444
|
-
Object.keys(
|
77445
|
-
createDebug[key] =
|
77445
|
+
Object.keys(env7).forEach((key) => {
|
77446
|
+
createDebug[key] = env7[key];
|
77446
77447
|
});
|
77447
77448
|
createDebug.names = [];
|
77448
77449
|
createDebug.skips = [];
|
@@ -81518,9 +81519,9 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
|
|
81518
81519
|
return config;
|
81519
81520
|
}, "resolveAwsSdkSigV4AConfig");
|
81520
81521
|
NODE_SIGV4A_CONFIG_OPTIONS = {
|
81521
|
-
environmentVariableSelector(
|
81522
|
-
if (
|
81523
|
-
return
|
81522
|
+
environmentVariableSelector(env7) {
|
81523
|
+
if (env7.AWS_SIGV4A_SIGNING_REGION_SET) {
|
81524
|
+
return env7.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((_4) => _4.trim());
|
81524
81525
|
}
|
81525
81526
|
throw new ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.", {
|
81526
81527
|
tryNextLink: true
|
@@ -87069,7 +87070,7 @@ var init_NodeUseDualstackEndpointConfigOptions = __esm({
|
|
87069
87070
|
ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
|
87070
87071
|
CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
|
87071
87072
|
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
|
87072
|
-
environmentVariableSelector: (
|
87073
|
+
environmentVariableSelector: (env7) => booleanSelector(env7, ENV_USE_DUALSTACK_ENDPOINT, SelectorType2.ENV),
|
87073
87074
|
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType2.CONFIG),
|
87074
87075
|
default: false
|
87075
87076
|
};
|
@@ -87085,7 +87086,7 @@ var init_NodeUseFipsEndpointConfigOptions = __esm({
|
|
87085
87086
|
ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
|
87086
87087
|
CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
|
87087
87088
|
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
|
87088
|
-
environmentVariableSelector: (
|
87089
|
+
environmentVariableSelector: (env7) => booleanSelector(env7, ENV_USE_FIPS_ENDPOINT, SelectorType2.ENV),
|
87089
87090
|
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType2.CONFIG),
|
87090
87091
|
default: false
|
87091
87092
|
};
|
@@ -87135,7 +87136,7 @@ var init_config2 = __esm({
|
|
87135
87136
|
REGION_ENV_NAME = "AWS_REGION";
|
87136
87137
|
REGION_INI_NAME = "region";
|
87137
87138
|
NODE_REGION_CONFIG_OPTIONS = {
|
87138
|
-
environmentVariableSelector: (
|
87139
|
+
environmentVariableSelector: (env7) => env7[REGION_ENV_NAME],
|
87139
87140
|
configFileSelector: (profile) => profile[REGION_INI_NAME],
|
87140
87141
|
default: () => {
|
87141
87142
|
throw new Error("Region is missing");
|
@@ -87847,12 +87848,12 @@ var init_getEndpointUrlConfig = __esm({
|
|
87847
87848
|
ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
|
87848
87849
|
CONFIG_ENDPOINT_URL = "endpoint_url";
|
87849
87850
|
getEndpointUrlConfig = /* @__PURE__ */ __name((serviceId) => ({
|
87850
|
-
environmentVariableSelector: (
|
87851
|
+
environmentVariableSelector: (env7) => {
|
87851
87852
|
const serviceSuffixParts = serviceId.split(" ").map((w6) => w6.toUpperCase());
|
87852
|
-
const serviceEndpointUrl =
|
87853
|
+
const serviceEndpointUrl = env7[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
|
87853
87854
|
if (serviceEndpointUrl)
|
87854
87855
|
return serviceEndpointUrl;
|
87855
|
-
const endpointUrl =
|
87856
|
+
const endpointUrl = env7[ENV_ENDPOINT_URL];
|
87856
87857
|
if (endpointUrl)
|
87857
87858
|
return endpointUrl;
|
87858
87859
|
return void 0;
|
@@ -88673,8 +88674,8 @@ var init_configurations2 = __esm({
|
|
88673
88674
|
ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
|
88674
88675
|
CONFIG_MAX_ATTEMPTS = "max_attempts";
|
88675
88676
|
NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
88676
|
-
environmentVariableSelector: (
|
88677
|
-
const value =
|
88677
|
+
environmentVariableSelector: (env7) => {
|
88678
|
+
const value = env7[ENV_MAX_ATTEMPTS];
|
88678
88679
|
if (!value)
|
88679
88680
|
return void 0;
|
88680
88681
|
const maxAttempt = parseInt(value);
|
@@ -88716,7 +88717,7 @@ var init_configurations2 = __esm({
|
|
88716
88717
|
ENV_RETRY_MODE = "AWS_RETRY_MODE";
|
88717
88718
|
CONFIG_RETRY_MODE = "retry_mode";
|
88718
88719
|
NODE_RETRY_MODE_CONFIG_OPTIONS = {
|
88719
|
-
environmentVariableSelector: (
|
88720
|
+
environmentVariableSelector: (env7) => env7[ENV_RETRY_MODE],
|
88720
88721
|
configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
|
88721
88722
|
default: DEFAULT_RETRY_MODE
|
88722
88723
|
};
|
@@ -89135,7 +89136,7 @@ var init_EndpointConfigOptions = __esm({
|
|
89135
89136
|
ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT";
|
89136
89137
|
CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint";
|
89137
89138
|
ENDPOINT_CONFIG_OPTIONS = {
|
89138
|
-
environmentVariableSelector: (
|
89139
|
+
environmentVariableSelector: (env7) => env7[ENV_ENDPOINT_NAME],
|
89139
89140
|
configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],
|
89140
89141
|
default: void 0
|
89141
89142
|
};
|
@@ -89163,7 +89164,7 @@ var init_EndpointModeConfigOptions = __esm({
|
|
89163
89164
|
ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE";
|
89164
89165
|
CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode";
|
89165
89166
|
ENDPOINT_MODE_CONFIG_OPTIONS = {
|
89166
|
-
environmentVariableSelector: (
|
89167
|
+
environmentVariableSelector: (env7) => env7[ENV_ENDPOINT_MODE_NAME],
|
89167
89168
|
configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],
|
89168
89169
|
default: EndpointMode.IPv4
|
89169
89170
|
};
|
@@ -89281,8 +89282,8 @@ var init_fromInstanceMetadata = __esm({
|
|
89281
89282
|
let fallbackBlockedFromProfile = false;
|
89282
89283
|
let fallbackBlockedFromProcessEnv = false;
|
89283
89284
|
const configValue = await loadConfig({
|
89284
|
-
environmentVariableSelector: (
|
89285
|
-
const envValue =
|
89285
|
+
environmentVariableSelector: (env7) => {
|
89286
|
+
const envValue = env7[AWS_EC2_METADATA_V1_DISABLED];
|
89286
89287
|
fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false";
|
89287
89288
|
if (envValue === void 0) {
|
89288
89289
|
throw new CredentialsProviderError(`${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`, { logger: init2.logger });
|
@@ -89929,7 +89930,7 @@ var init_nodeAppIdConfigOptions = __esm({
|
|
89929
89930
|
UA_APP_ID_INI_NAME = "sdk_ua_app_id";
|
89930
89931
|
UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
|
89931
89932
|
NODE_APP_ID_CONFIG_OPTIONS = {
|
89932
|
-
environmentVariableSelector: (
|
89933
|
+
environmentVariableSelector: (env7) => env7[UA_APP_ID_ENV_NAME],
|
89933
89934
|
configFileSelector: (profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
|
89934
89935
|
default: DEFAULT_UA_APP_ID
|
89935
89936
|
};
|
@@ -90145,8 +90146,8 @@ var init_defaultsModeConfig = __esm({
|
|
90145
90146
|
AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
|
90146
90147
|
AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
|
90147
90148
|
NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
|
90148
|
-
environmentVariableSelector: (
|
90149
|
-
return
|
90149
|
+
environmentVariableSelector: (env7) => {
|
90150
|
+
return env7[AWS_DEFAULTS_MODE_ENV];
|
90150
90151
|
},
|
90151
90152
|
configFileSelector: (profile) => {
|
90152
90153
|
return profile[AWS_DEFAULTS_MODE_CONFIG];
|
@@ -96588,8 +96589,8 @@ var YargsParser = class {
|
|
96588
96589
|
if (typeof envPrefix === "undefined")
|
96589
96590
|
return;
|
96590
96591
|
const prefix = typeof envPrefix === "string" ? envPrefix : "";
|
96591
|
-
const
|
96592
|
-
Object.keys(
|
96592
|
+
const env7 = mixin.env();
|
96593
|
+
Object.keys(env7).forEach(function(envVar) {
|
96593
96594
|
if (prefix === "" || envVar.lastIndexOf(prefix, 0) === 0) {
|
96594
96595
|
const keys = envVar.split("__").map(function(key, i5) {
|
96595
96596
|
if (i5 === 0) {
|
@@ -96598,7 +96599,7 @@ var YargsParser = class {
|
|
96598
96599
|
return camelCase(key);
|
96599
96600
|
});
|
96600
96601
|
if ((configOnly && flags2.configs[keys.join(".")] || !configOnly) && !hasKey2(argv2, keys)) {
|
96601
|
-
setArg(keys.join("."),
|
96602
|
+
setArg(keys.join("."), env7[envVar]);
|
96602
96603
|
}
|
96603
96604
|
}
|
96604
96605
|
});
|
@@ -98097,7 +98098,7 @@ var import_undici3 = __toESM(require_undici());
|
|
98097
98098
|
|
98098
98099
|
// package.json
|
98099
98100
|
var name = "wrangler";
|
98100
|
-
var version = "3.103.
|
98101
|
+
var version = "3.103.2";
|
98101
98102
|
|
98102
98103
|
// src/environment-variables/misc-variables.ts
|
98103
98104
|
init_import_meta_url();
|
@@ -104803,11 +104804,11 @@ function tryLoadDotEnv(basePath) {
|
|
104803
104804
|
}
|
104804
104805
|
}
|
104805
104806
|
__name(tryLoadDotEnv, "tryLoadDotEnv");
|
104806
|
-
function loadDotEnv(envPath,
|
104807
|
-
if (
|
104807
|
+
function loadDotEnv(envPath, env7) {
|
104808
|
+
if (env7 === void 0) {
|
104808
104809
|
return tryLoadDotEnv(envPath);
|
104809
104810
|
} else {
|
104810
|
-
return tryLoadDotEnv(`${envPath}.${
|
104811
|
+
return tryLoadDotEnv(`${envPath}.${env7}`) ?? tryLoadDotEnv(envPath);
|
104811
104812
|
}
|
104812
104813
|
}
|
104813
104814
|
__name(loadDotEnv, "loadDotEnv");
|
@@ -107054,11 +107055,11 @@ var getRevokeUrlFromEnv = getEnvironmentVariableFactory({
|
|
107054
107055
|
defaultValue: () => `https://${getAuthDomainFromEnv()}/oauth2/revoke`
|
107055
107056
|
});
|
107056
107057
|
var getCloudflareAccessToken = /* @__PURE__ */ __name(async () => {
|
107057
|
-
const
|
107058
|
+
const env7 = getEnvironmentVariableFactory({
|
107058
107059
|
variableName: "WRANGLER_CF_AUTHORIZATION_TOKEN"
|
107059
107060
|
})();
|
107060
|
-
if (
|
107061
|
-
return
|
107061
|
+
if (env7 !== void 0) {
|
107062
|
+
return env7;
|
107062
107063
|
}
|
107063
107064
|
return getAccessToken(getAuthDomainFromEnv());
|
107064
107065
|
}, "getCloudflareAccessToken");
|
@@ -118086,30 +118087,17 @@ var asyncLocalStoragePlugin = {
|
|
118086
118087
|
init_import_meta_url();
|
118087
118088
|
var import_node_module2 = require("node:module");
|
118088
118089
|
var import_node_path22 = __toESM(require("node:path"));
|
118089
|
-
var import_unenv_preset = require("@cloudflare/unenv-preset");
|
118090
118090
|
var import_unenv = require("unenv");
|
118091
118091
|
var REQUIRED_NODE_BUILT_IN_NAMESPACE = "node-built-in-modules";
|
118092
118092
|
var REQUIRED_UNENV_ALIAS_NAMESPACE = "required-unenv-alias";
|
118093
|
-
function nodejsHybridPlugin(
|
118094
|
-
const {
|
118095
|
-
nodeCompat: true,
|
118096
|
-
presets: [import_unenv_preset.cloudflare],
|
118097
|
-
resolve: {
|
118098
|
-
paths: unenvResolvePaths
|
118099
|
-
}
|
118100
|
-
});
|
118101
|
-
const { alias, inject, external } = env6;
|
118102
|
-
const unresolvedAlias = (0, import_unenv.defineEnv)({
|
118103
|
-
nodeCompat: true,
|
118104
|
-
presets: [import_unenv_preset.cloudflare],
|
118105
|
-
resolve: false
|
118106
|
-
}).env.alias;
|
118093
|
+
function nodejsHybridPlugin(_unenvResolvePaths) {
|
118094
|
+
const { alias, inject, external } = (0, import_unenv.env)(import_unenv.nodeless, import_unenv.cloudflare);
|
118107
118095
|
return {
|
118108
118096
|
name: "hybrid-nodejs_compat",
|
118109
118097
|
setup(build5) {
|
118110
118098
|
errorOnServiceWorkerFormat(build5);
|
118111
118099
|
handleRequireCallsToNodeJSBuiltins(build5);
|
118112
|
-
handleUnenvAliasedPackages(build5,
|
118100
|
+
handleUnenvAliasedPackages(build5, alias, external);
|
118113
118101
|
handleNodeJSGlobals(build5, inject);
|
118114
118102
|
}
|
118115
118103
|
};
|
@@ -118167,19 +118155,28 @@ function handleRequireCallsToNodeJSBuiltins(build5) {
|
|
118167
118155
|
);
|
118168
118156
|
}
|
118169
118157
|
__name(handleRequireCallsToNodeJSBuiltins, "handleRequireCallsToNodeJSBuiltins");
|
118170
|
-
function handleUnenvAliasedPackages(build5,
|
118171
|
-
const
|
118158
|
+
function handleUnenvAliasedPackages(build5, alias, external) {
|
118159
|
+
const aliasAbsolute = {};
|
118160
|
+
for (const [module3, unresolvedAlias] of Object.entries(alias)) {
|
118161
|
+
try {
|
118162
|
+
aliasAbsolute[module3] = require.resolve(unresolvedAlias).replace(/\.cjs$/, ".mjs");
|
118163
|
+
} catch (e7) {
|
118164
|
+
}
|
118165
|
+
}
|
118166
|
+
const UNENV_ALIAS_RE = new RegExp(
|
118167
|
+
`^(${Object.keys(aliasAbsolute).join("|")})$`
|
118168
|
+
);
|
118172
118169
|
build5.onResolve({ filter: UNENV_ALIAS_RE }, (args) => {
|
118173
|
-
const
|
118174
|
-
if (args.kind === "require-call" && (
|
118170
|
+
const unresolvedAlias = alias[args.path];
|
118171
|
+
if (args.kind === "require-call" && (unresolvedAlias.startsWith("unenv/runtime/npm/") || unresolvedAlias.startsWith("unenv/runtime/mock/"))) {
|
118175
118172
|
return {
|
118176
118173
|
path: args.path,
|
118177
118174
|
namespace: REQUIRED_UNENV_ALIAS_NAMESPACE
|
118178
118175
|
};
|
118179
118176
|
}
|
118180
118177
|
return {
|
118181
|
-
path:
|
118182
|
-
external: external.includes(
|
118178
|
+
path: aliasAbsolute[args.path],
|
118179
|
+
external: external.includes(unresolvedAlias)
|
118183
118180
|
};
|
118184
118181
|
});
|
118185
118182
|
build5.initialOptions.banner = { js: "", ...build5.initialOptions.banner };
|
@@ -123277,12 +123274,12 @@ __name(devRegistry2, "devRegistry");
|
|
123277
123274
|
// src/dev/dev-vars.ts
|
123278
123275
|
init_import_meta_url();
|
123279
123276
|
var path34 = __toESM(require("node:path"));
|
123280
|
-
function getVarsForDev(config,
|
123277
|
+
function getVarsForDev(config, env7, silent = false) {
|
123281
123278
|
const configDir = path34.resolve(
|
123282
123279
|
config.userConfigPath ? path34.dirname(config.userConfigPath) : "."
|
123283
123280
|
);
|
123284
123281
|
const devVarsPath = path34.resolve(configDir, ".dev.vars");
|
123285
|
-
const loaded = loadDotEnv(devVarsPath,
|
123282
|
+
const loaded = loadDotEnv(devVarsPath, env7);
|
123286
123283
|
if (loaded !== void 0) {
|
123287
123284
|
const devVarsRelativePath = path34.relative(process.cwd(), loaded.path);
|
123288
123285
|
if (!silent) {
|
@@ -124218,7 +124215,7 @@ function getResolvedLegacyAssetPaths(args, configParam) {
|
|
124218
124215
|
return legacyAssetPaths;
|
124219
124216
|
}
|
124220
124217
|
__name(getResolvedLegacyAssetPaths, "getResolvedLegacyAssetPaths");
|
124221
|
-
function getBindings2(configParam,
|
124218
|
+
function getBindings2(configParam, env7, local, args) {
|
124222
124219
|
const kvConfig = (configParam.kv_namespaces || []).map(
|
124223
124220
|
({ binding, preview_id, id }) => {
|
124224
124221
|
if (!preview_id && !local) {
|
@@ -124313,7 +124310,7 @@ function getBindings2(configParam, env6, local, args) {
|
|
124313
124310
|
// non-inheritable fields
|
124314
124311
|
vars: {
|
124315
124312
|
// Use a copy of combinedVars since we're modifying it later
|
124316
|
-
...getVarsForDev(configParam,
|
124313
|
+
...getVarsForDev(configParam, env7),
|
124317
124314
|
...args.vars
|
124318
124315
|
},
|
124319
124316
|
durable_objects: {
|
@@ -125689,12 +125686,12 @@ async function deploy2({
|
|
125689
125686
|
if (branch) {
|
125690
125687
|
isProduction = project.production_branch === branch;
|
125691
125688
|
}
|
125692
|
-
const
|
125693
|
-
const deploymentConfig = project.deployment_configs[
|
125689
|
+
const env7 = isProduction ? "production" : "preview";
|
125690
|
+
const deploymentConfig = project.deployment_configs[env7];
|
125694
125691
|
let config;
|
125695
125692
|
try {
|
125696
125693
|
config = readPagesConfig(
|
125697
|
-
{ ...args, env:
|
125694
|
+
{ ...args, env: env7 },
|
125698
125695
|
{ useRedirectIfAvailable: true }
|
125699
125696
|
);
|
125700
125697
|
} catch (err) {
|
@@ -128189,17 +128186,17 @@ __name(maybeGetRegisteredWorkers, "maybeGetRegisteredWorkers");
|
|
128189
128186
|
|
128190
128187
|
// src/api/integrations/platform/index.ts
|
128191
128188
|
async function getPlatformProxy(options30 = {}) {
|
128192
|
-
const
|
128189
|
+
const env7 = options30.environment;
|
128193
128190
|
const rawConfig = readConfig({
|
128194
128191
|
config: options30.configPath,
|
128195
|
-
env:
|
128192
|
+
env: env7
|
128196
128193
|
});
|
128197
128194
|
const miniflareOptions = await run(
|
128198
128195
|
{
|
128199
128196
|
MULTIWORKER: false,
|
128200
128197
|
RESOURCES_PROVISION: false
|
128201
128198
|
},
|
128202
|
-
() => getMiniflareOptionsFromConfig(rawConfig,
|
128199
|
+
() => getMiniflareOptionsFromConfig(rawConfig, env7, options30)
|
128203
128200
|
);
|
128204
128201
|
const mf = new import_miniflare20.Miniflare({
|
128205
128202
|
script: "",
|
@@ -128207,7 +128204,7 @@ async function getPlatformProxy(options30 = {}) {
|
|
128207
128204
|
...miniflareOptions
|
128208
128205
|
});
|
128209
128206
|
const bindings = await mf.getBindings();
|
128210
|
-
const vars = getVarsForDev(rawConfig,
|
128207
|
+
const vars = getVarsForDev(rawConfig, env7);
|
128211
128208
|
const cf2 = await mf.getCf();
|
128212
128209
|
deepFreeze(cf2);
|
128213
128210
|
return {
|
@@ -128222,8 +128219,8 @@ async function getPlatformProxy(options30 = {}) {
|
|
128222
128219
|
};
|
128223
128220
|
}
|
128224
128221
|
__name(getPlatformProxy, "getPlatformProxy");
|
128225
|
-
async function getMiniflareOptionsFromConfig(rawConfig,
|
128226
|
-
const bindings = getBindings2(rawConfig,
|
128222
|
+
async function getMiniflareOptionsFromConfig(rawConfig, env7, options30) {
|
128223
|
+
const bindings = getBindings2(rawConfig, env7, true, {});
|
128227
128224
|
const workerDefinitions = await getBoundRegisteredWorkers({
|
128228
128225
|
name: rawConfig.name,
|
128229
128226
|
services: bindings.services,
|
@@ -128288,14 +128285,14 @@ function deepFreeze(obj) {
|
|
128288
128285
|
});
|
128289
128286
|
}
|
128290
128287
|
__name(deepFreeze, "deepFreeze");
|
128291
|
-
function unstable_getMiniflareWorkerOptions(configOrConfigPath,
|
128292
|
-
const config = typeof configOrConfigPath === "string" ? readConfig({ config: configOrConfigPath, env:
|
128288
|
+
function unstable_getMiniflareWorkerOptions(configOrConfigPath, env7) {
|
128289
|
+
const config = typeof configOrConfigPath === "string" ? readConfig({ config: configOrConfigPath, env: env7 }) : configOrConfigPath;
|
128293
128290
|
const modulesRules = config.rules.concat(DEFAULT_MODULE_RULES).map((rule) => ({
|
128294
128291
|
type: rule.type,
|
128295
128292
|
include: rule.globs,
|
128296
128293
|
fallthrough: rule.fallthrough
|
128297
128294
|
}));
|
128298
|
-
const bindings = getBindings2(config,
|
128295
|
+
const bindings = getBindings2(config, env7, true, {});
|
128299
128296
|
const { bindingOptions } = buildMiniflareBindingOptions({
|
128300
128297
|
name: void 0,
|
128301
128298
|
bindings,
|
@@ -128351,9 +128348,9 @@ init_import_meta_url();
|
|
128351
128348
|
// src/api/integrations/deprecated/getBindingsProxy.ts
|
128352
128349
|
init_import_meta_url();
|
128353
128350
|
async function getBindingsProxy(options30 = {}) {
|
128354
|
-
const { env:
|
128351
|
+
const { env: env7, ...restOfPlatformProxy } = await getPlatformProxy(options30);
|
128355
128352
|
return {
|
128356
|
-
bindings:
|
128353
|
+
bindings: env7,
|
128357
128354
|
...restOfPlatformProxy
|
128358
128355
|
};
|
128359
128356
|
}
|
@@ -133493,7 +133490,7 @@ function renderDeploymentConfiguration(action, {
|
|
133493
133490
|
memory,
|
133494
133491
|
environmentVariables,
|
133495
133492
|
labels,
|
133496
|
-
env:
|
133493
|
+
env: env7,
|
133497
133494
|
network
|
133498
133495
|
}) {
|
133499
133496
|
let environmentVariablesText = "[]";
|
@@ -133503,7 +133500,7 @@ function renderDeploymentConfiguration(action, {
|
|
133503
133500
|
}
|
133504
133501
|
} else if (action === "create") {
|
133505
133502
|
environmentVariablesText = `
|
133506
|
-
No environment variables added! You can set some under [${
|
133503
|
+
No environment variables added! You can set some under [${env7 ? "env." + env7 + "." : ""}vars] and via command line`;
|
133507
133504
|
}
|
133508
133505
|
let labelsText = "[]";
|
133509
133506
|
if (labels !== void 0 && labels.length !== 0) {
|
@@ -133587,11 +133584,11 @@ function collectEnvironmentVariables(deploymentEnv, config, envArgs) {
|
|
133587
133584
|
if (envMap.size === 0) {
|
133588
133585
|
return void 0;
|
133589
133586
|
}
|
133590
|
-
const
|
133587
|
+
const env7 = Array.from(envMap).map(
|
133591
133588
|
([name2, value]) => ({ name: name2, value })
|
133592
133589
|
);
|
133593
|
-
sortEnvironmentVariables(
|
133594
|
-
return
|
133590
|
+
sortEnvironmentVariables(env7);
|
133591
|
+
return env7;
|
133595
133592
|
}
|
133596
133593
|
__name(collectEnvironmentVariables, "collectEnvironmentVariables");
|
133597
133594
|
async function promptForEnvironmentVariables(environmentVariables, initiallySelected, allowSkipping) {
|
@@ -142604,11 +142601,11 @@ var quote = /* @__PURE__ */ __name(function(args) {
|
|
142604
142601
|
const stringArgs = args.map((arg) => String(arg));
|
142605
142602
|
return import_shell_quote.default.quote(stringArgs);
|
142606
142603
|
}, "quote");
|
142607
|
-
function parse5(cmd,
|
142604
|
+
function parse5(cmd, env7) {
|
142608
142605
|
if (process.platform === "win32") {
|
142609
142606
|
cmd = cmd.replaceAll("\\", "\\\\");
|
142610
142607
|
}
|
142611
|
-
const entries = import_shell_quote.default.parse(cmd,
|
142608
|
+
const entries = import_shell_quote.default.parse(cmd, env7);
|
142612
142609
|
const argv = [];
|
142613
142610
|
for (const entry of entries) {
|
142614
142611
|
if (typeof entry === "string") {
|
@@ -146451,12 +146448,12 @@ __name(prettifyOutcome, "prettifyOutcome");
|
|
146451
146448
|
|
146452
146449
|
// src/tail/createTail.ts
|
146453
146450
|
var TRACE_VERSION = "trace-v1";
|
146454
|
-
function makeCreateTailUrl(accountId, workerName,
|
146455
|
-
return
|
146451
|
+
function makeCreateTailUrl(accountId, workerName, env7) {
|
146452
|
+
return env7 ? `/accounts/${accountId}/workers/services/${workerName}/environments/${env7}/tails` : `/accounts/${accountId}/workers/scripts/${workerName}/tails`;
|
146456
146453
|
}
|
146457
146454
|
__name(makeCreateTailUrl, "makeCreateTailUrl");
|
146458
|
-
function makeDeleteTailUrl(accountId, workerName, tailId,
|
146459
|
-
return
|
146455
|
+
function makeDeleteTailUrl(accountId, workerName, tailId, env7) {
|
146456
|
+
return env7 ? `/accounts/${accountId}/workers/services/${workerName}/environments/${env7}/tails/${tailId}` : `/accounts/${accountId}/workers/scripts/${workerName}/tails/${tailId}`;
|
146460
146457
|
}
|
146461
146458
|
__name(makeDeleteTailUrl, "makeDeleteTailUrl");
|
146462
146459
|
async function createPagesTail({
|
@@ -146500,8 +146497,8 @@ async function createPagesTail({
|
|
146500
146497
|
return { tail, deleteTail, expiration: tailRecord.expires_at };
|
146501
146498
|
}
|
146502
146499
|
__name(createPagesTail, "createPagesTail");
|
146503
|
-
async function createTail(accountId, workerName, filters, debug,
|
146504
|
-
const createTailUrl = makeCreateTailUrl(accountId, workerName,
|
146500
|
+
async function createTail(accountId, workerName, filters, debug, env7) {
|
146501
|
+
const createTailUrl = makeCreateTailUrl(accountId, workerName, env7);
|
146505
146502
|
const {
|
146506
146503
|
id: tailId,
|
146507
146504
|
url: websocketUrl,
|
@@ -146510,7 +146507,7 @@ async function createTail(accountId, workerName, filters, debug, env6) {
|
|
146510
146507
|
method: "POST",
|
146511
146508
|
body: JSON.stringify(filters)
|
146512
146509
|
});
|
146513
|
-
const deleteUrl = makeDeleteTailUrl(accountId, workerName, tailId,
|
146510
|
+
const deleteUrl = makeDeleteTailUrl(accountId, workerName, tailId, env7);
|
146514
146511
|
async function deleteTail() {
|
146515
146512
|
await fetchResult(deleteUrl, { method: "DELETE" });
|
146516
146513
|
}
|
@@ -148422,15 +148419,15 @@ async function parseBulkInputToObject(input) {
|
|
148422
148419
|
__name(parseBulkInputToObject, "parseBulkInputToObject");
|
148423
148420
|
|
148424
148421
|
// src/pages/secret/index.ts
|
148425
|
-
function isPagesEnv(
|
148426
|
-
return ["production", "preview"].includes(
|
148422
|
+
function isPagesEnv(env7) {
|
148423
|
+
return ["production", "preview"].includes(env7);
|
148427
148424
|
}
|
148428
148425
|
__name(isPagesEnv, "isPagesEnv");
|
148429
|
-
async function pagesProject(
|
148430
|
-
|
148431
|
-
if (!isPagesEnv(
|
148426
|
+
async function pagesProject(env7, cliProjectName) {
|
148427
|
+
env7 ??= "production";
|
148428
|
+
if (!isPagesEnv(env7)) {
|
148432
148429
|
throw new FatalError(
|
148433
|
-
`Pages does not support the "${
|
148430
|
+
`Pages does not support the "${env7}" named environment. Please specify "production" (default) or "preview"`,
|
148434
148431
|
1
|
148435
148432
|
);
|
148436
148433
|
}
|
@@ -148471,7 +148468,7 @@ Ignoring configuration file for now.`
|
|
148471
148468
|
} else {
|
148472
148469
|
throw new FatalError("Must specify a project name.", 1);
|
148473
148470
|
}
|
148474
|
-
return { env:
|
148471
|
+
return { env: env7, project, accountId, config };
|
148475
148472
|
}
|
148476
148473
|
__name(pagesProject, "pagesProject");
|
148477
148474
|
var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
@@ -148490,7 +148487,7 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148490
148487
|
},
|
148491
148488
|
async (args) => {
|
148492
148489
|
await printWranglerBanner();
|
148493
|
-
const { env:
|
148490
|
+
const { env: env7, project, accountId, config } = await pagesProject(
|
148494
148491
|
args.env,
|
148495
148492
|
args.projectName
|
148496
148493
|
);
|
@@ -148498,7 +148495,7 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148498
148495
|
isInteractive2() ? await prompt("Enter a secret value:", { isSecret: true }) : await readFromStdin()
|
148499
148496
|
);
|
148500
148497
|
logger.log(
|
148501
|
-
`\u{1F300} Creating the secret for the Pages project "${project.name}" (${
|
148498
|
+
`\u{1F300} Creating the secret for the Pages project "${project.name}" (${env7})`
|
148502
148499
|
);
|
148503
148500
|
await fetchResult(
|
148504
148501
|
`/accounts/${accountId}/pages/projects/${project.name}`,
|
@@ -148506,14 +148503,14 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148506
148503
|
method: "PATCH",
|
148507
148504
|
body: JSON.stringify({
|
148508
148505
|
deployment_configs: {
|
148509
|
-
[
|
148506
|
+
[env7]: {
|
148510
148507
|
env_vars: {
|
148511
148508
|
[args.key]: {
|
148512
148509
|
value: secretValue,
|
148513
148510
|
type: "secret_text"
|
148514
148511
|
}
|
148515
148512
|
},
|
148516
|
-
wrangler_config_hash: project.deployment_configs[
|
148513
|
+
wrangler_config_hash: project.deployment_configs[env7].wrangler_config_hash
|
148517
148514
|
}
|
148518
148515
|
}
|
148519
148516
|
})
|
@@ -148539,12 +148536,12 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148539
148536
|
},
|
148540
148537
|
async (args) => {
|
148541
148538
|
await printWranglerBanner();
|
148542
|
-
const { env:
|
148539
|
+
const { env: env7, project, accountId } = await pagesProject(
|
148543
148540
|
args.env,
|
148544
148541
|
args.projectName
|
148545
148542
|
);
|
148546
148543
|
logger.log(
|
148547
|
-
`\u{1F300} Creating the secrets for the Pages project "${project.name}" (${
|
148544
|
+
`\u{1F300} Creating the secrets for the Pages project "${project.name}" (${env7})`
|
148548
148545
|
);
|
148549
148546
|
const content = await parseBulkInputToObject(args.json);
|
148550
148547
|
if (!content) {
|
@@ -148568,11 +148565,11 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148568
148565
|
method: "PATCH",
|
148569
148566
|
body: JSON.stringify({
|
148570
148567
|
deployment_configs: {
|
148571
|
-
[
|
148568
|
+
[env7]: {
|
148572
148569
|
env_vars: {
|
148573
148570
|
...upsertBindings
|
148574
148571
|
},
|
148575
|
-
wrangler_config_hash: project.deployment_configs[
|
148572
|
+
wrangler_config_hash: project.deployment_configs[env7].wrangler_config_hash
|
148576
148573
|
}
|
148577
148574
|
}
|
148578
148575
|
})
|
@@ -148605,15 +148602,15 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148605
148602
|
},
|
148606
148603
|
async (args) => {
|
148607
148604
|
await printWranglerBanner();
|
148608
|
-
const { env:
|
148605
|
+
const { env: env7, project, accountId, config } = await pagesProject(
|
148609
148606
|
args.env,
|
148610
148607
|
args.projectName
|
148611
148608
|
);
|
148612
148609
|
if (await confirm(
|
148613
|
-
`Are you sure you want to permanently delete the secret ${args.key} on the Pages project ${project.name} (${
|
148610
|
+
`Are you sure you want to permanently delete the secret ${args.key} on the Pages project ${project.name} (${env7})?`
|
148614
148611
|
)) {
|
148615
148612
|
logger.log(
|
148616
|
-
`\u{1F300} Deleting the secret ${args.key} on the Pages project ${project.name} (${
|
148613
|
+
`\u{1F300} Deleting the secret ${args.key} on the Pages project ${project.name} (${env7})`
|
148617
148614
|
);
|
148618
148615
|
await fetchResult(
|
148619
148616
|
`/accounts/${accountId}/pages/projects/${project.name}`,
|
@@ -148621,11 +148618,11 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148621
148618
|
method: "PATCH",
|
148622
148619
|
body: JSON.stringify({
|
148623
148620
|
deployment_configs: {
|
148624
|
-
[
|
148621
|
+
[env7]: {
|
148625
148622
|
env_vars: {
|
148626
148623
|
[args.key]: null
|
148627
148624
|
},
|
148628
|
-
wrangler_config_hash: project.deployment_configs[
|
148625
|
+
wrangler_config_hash: project.deployment_configs[env7].wrangler_config_hash
|
148629
148626
|
}
|
148630
148627
|
}
|
148631
148628
|
})
|
@@ -148649,16 +148646,16 @@ var secret2 = /* @__PURE__ */ __name((secretYargs, subHelp) => {
|
|
148649
148646
|
},
|
148650
148647
|
async (args) => {
|
148651
148648
|
await printWranglerBanner();
|
148652
|
-
const { env:
|
148649
|
+
const { env: env7, project, config } = await pagesProject(
|
148653
148650
|
args.env,
|
148654
148651
|
args.projectName
|
148655
148652
|
);
|
148656
148653
|
const secrets = Object.entries(
|
148657
|
-
project.deployment_configs[
|
148654
|
+
project.deployment_configs[env7].env_vars ?? {}
|
148658
148655
|
).filter(([_4, val2]) => val2?.type === "secret_text");
|
148659
148656
|
const message = [
|
148660
148657
|
`The "${source_default.blue(
|
148661
|
-
|
148658
|
+
env7
|
148662
148659
|
)}" environment of your Pages project "${source_default.blue(
|
148663
148660
|
project.name
|
148664
148661
|
)}" has access to the following secrets:`,
|
@@ -148867,7 +148864,7 @@ var stringUnionSelector = /* @__PURE__ */ __name((obj, key, union, type) => {
|
|
148867
148864
|
var ENV_REQUEST_CHECKSUM_CALCULATION = "AWS_REQUEST_CHECKSUM_CALCULATION";
|
148868
148865
|
var CONFIG_REQUEST_CHECKSUM_CALCULATION = "request_checksum_calculation";
|
148869
148866
|
var NODE_REQUEST_CHECKSUM_CALCULATION_CONFIG_OPTIONS = {
|
148870
|
-
environmentVariableSelector: (
|
148867
|
+
environmentVariableSelector: (env7) => stringUnionSelector(env7, ENV_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.ENV),
|
148871
148868
|
configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_REQUEST_CHECKSUM_CALCULATION, RequestChecksumCalculation, SelectorType.CONFIG),
|
148872
148869
|
default: DEFAULT_REQUEST_CHECKSUM_CALCULATION
|
148873
148870
|
};
|
@@ -148877,7 +148874,7 @@ init_import_meta_url();
|
|
148877
148874
|
var ENV_RESPONSE_CHECKSUM_VALIDATION = "AWS_RESPONSE_CHECKSUM_VALIDATION";
|
148878
148875
|
var CONFIG_RESPONSE_CHECKSUM_VALIDATION = "response_checksum_validation";
|
148879
148876
|
var NODE_RESPONSE_CHECKSUM_VALIDATION_CONFIG_OPTIONS = {
|
148880
|
-
environmentVariableSelector: (
|
148877
|
+
environmentVariableSelector: (env7) => stringUnionSelector(env7, ENV_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.ENV),
|
148881
148878
|
configFileSelector: (profile) => stringUnionSelector(profile, CONFIG_RESPONSE_CHECKSUM_VALIDATION, ResponseChecksumValidation, SelectorType.CONFIG),
|
148882
148879
|
default: DEFAULT_RESPONSE_CHECKSUM_VALIDATION
|
148883
148880
|
};
|
@@ -150055,7 +150052,7 @@ var SESSION_TOKEN_HEADER = SESSION_TOKEN_QUERY_PARAM.toLowerCase();
|
|
150055
150052
|
var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME = "AWS_S3_DISABLE_EXPRESS_SESSION_AUTH";
|
150056
150053
|
var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME = "s3_disable_express_session_auth";
|
150057
150054
|
var NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_OPTIONS = {
|
150058
|
-
environmentVariableSelector: (
|
150055
|
+
environmentVariableSelector: (env7) => booleanSelector(env7, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_ENV_NAME, SelectorType2.ENV),
|
150059
150056
|
configFileSelector: (profile) => booleanSelector(profile, NODE_DISABLE_S3_EXPRESS_SESSION_AUTH_INI_NAME, SelectorType2.CONFIG),
|
150060
150057
|
default: false
|
150061
150058
|
};
|
@@ -151552,7 +151549,7 @@ init_dist_es24();
|
|
151552
151549
|
var NODE_USE_ARN_REGION_ENV_NAME = "AWS_S3_USE_ARN_REGION";
|
151553
151550
|
var NODE_USE_ARN_REGION_INI_NAME = "s3_use_arn_region";
|
151554
151551
|
var NODE_USE_ARN_REGION_CONFIG_OPTIONS = {
|
151555
|
-
environmentVariableSelector: (
|
151552
|
+
environmentVariableSelector: (env7) => booleanSelector(env7, NODE_USE_ARN_REGION_ENV_NAME, SelectorType2.ENV),
|
151556
151553
|
configFileSelector: (profile) => booleanSelector(profile, NODE_USE_ARN_REGION_INI_NAME, SelectorType2.CONFIG),
|
151557
151554
|
default: false
|
151558
151555
|
};
|
@@ -152499,8 +152496,8 @@ async function generateR2ServiceToken(accountId, bucketName, pipelineName) {
|
|
152499
152496
|
});
|
152500
152497
|
server.listen(8976, "localhost");
|
152501
152498
|
});
|
152502
|
-
const
|
152503
|
-
const oauthDomain =
|
152499
|
+
const env7 = getCloudflareApiEnvironmentFromEnv();
|
152500
|
+
const oauthDomain = env7 === "staging" ? "oauth.pipelines-staging.cloudflare.com" : "oauth.pipelines.cloudflare.com";
|
152504
152501
|
const urlToOpen = `https://${oauthDomain}/oauth/login?accountId=${accountId}&bucketName=${bucketName}&pipelineName=${pipelineName}`;
|
152505
152502
|
logger.log(`Opening a link in your default browser: ${urlToOpen}`);
|
152506
152503
|
await openInBrowser(urlToOpen);
|
@@ -160841,17 +160838,17 @@ var BaseClient = class {
|
|
160841
160838
|
*/
|
160842
160839
|
sendEvent(event, hint = {}) {
|
160843
160840
|
this.emit("beforeSendEvent", event, hint);
|
160844
|
-
let
|
160841
|
+
let env7 = createEventEnvelope(event, this._dsn, this._options._metadata, this._options.tunnel);
|
160845
160842
|
for (const attachment of hint.attachments || []) {
|
160846
|
-
|
160847
|
-
|
160843
|
+
env7 = addItemToEnvelope(
|
160844
|
+
env7,
|
160848
160845
|
createAttachmentEnvelopeItem(
|
160849
160846
|
attachment,
|
160850
160847
|
this._options.transportOptions && this._options.transportOptions.textEncoder
|
160851
160848
|
)
|
160852
160849
|
);
|
160853
160850
|
}
|
160854
|
-
const promise = this._sendEnvelope(
|
160851
|
+
const promise = this._sendEnvelope(env7);
|
160855
160852
|
if (promise) {
|
160856
160853
|
promise.then((sendResponse) => this.emit("afterSendEvent", event, sendResponse), null);
|
160857
160854
|
}
|
@@ -160860,8 +160857,8 @@ var BaseClient = class {
|
|
160860
160857
|
* @inheritDoc
|
160861
160858
|
*/
|
160862
160859
|
sendSession(session) {
|
160863
|
-
const
|
160864
|
-
void this._sendEnvelope(
|
160860
|
+
const env7 = createSessionEnvelope(session, this._dsn, this._options._metadata, this._options.tunnel);
|
160861
|
+
void this._sendEnvelope(env7);
|
160865
160862
|
}
|
160866
160863
|
/**
|
160867
160864
|
* @inheritDoc
|
@@ -166010,8 +166007,8 @@ function collectAllVars(args) {
|
|
166010
166007
|
__name(collectEnvironmentVars, "collectEnvironmentVars");
|
166011
166008
|
const { rawConfig } = experimental_readRawConfig(args);
|
166012
166009
|
collectEnvironmentVars(rawConfig.vars);
|
166013
|
-
Object.entries(rawConfig.env ?? {}).forEach(([_envName,
|
166014
|
-
collectEnvironmentVars(
|
166010
|
+
Object.entries(rawConfig.env ?? {}).forEach(([_envName, env7]) => {
|
166011
|
+
collectEnvironmentVars(env7.vars);
|
166015
166012
|
});
|
166016
166013
|
return Object.fromEntries(
|
166017
166014
|
Object.entries(varsInfo).map(([key, value]) => [key, [...value]])
|