wrangler 3.78.1 → 3.78.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 +8 -8
- package/wrangler-dist/cli.js +425 -252
- package/wrangler-dist/cli.js.map +7 -0
package/wrangler-dist/cli.js
CHANGED
@@ -36280,9 +36280,9 @@ var require_websocket_server = __commonJS({
|
|
36280
36280
|
handleUpgrade(req, socket, head, cb) {
|
36281
36281
|
socket.on("error", socketOnError);
|
36282
36282
|
const key = req.headers["sec-websocket-key"] !== void 0 ? req.headers["sec-websocket-key"].trim() : false;
|
36283
|
-
const
|
36283
|
+
const version4 = +req.headers["sec-websocket-version"];
|
36284
36284
|
const extensions = {};
|
36285
|
-
if (req.method !== "GET" || req.headers.upgrade.toLowerCase() !== "websocket" || !key || !keyRegex.test(key) ||
|
36285
|
+
if (req.method !== "GET" || req.headers.upgrade.toLowerCase() !== "websocket" || !key || !keyRegex.test(key) || version4 !== 8 && version4 !== 13 || !this.shouldHandle(req)) {
|
36286
36286
|
return abortHandshake(socket, 400);
|
36287
36287
|
}
|
36288
36288
|
if (this.options.perMessageDeflate) {
|
@@ -36303,7 +36303,7 @@ var require_websocket_server = __commonJS({
|
|
36303
36303
|
}
|
36304
36304
|
if (this.options.verifyClient) {
|
36305
36305
|
const info = {
|
36306
|
-
origin: req.headers[`${
|
36306
|
+
origin: req.headers[`${version4 === 8 ? "sec-websocket-origin" : "origin"}`],
|
36307
36307
|
secure: !!(req.socket.authorized || req.socket.encrypted),
|
36308
36308
|
req
|
36309
36309
|
};
|
@@ -38591,7 +38591,7 @@ var require_backend = __commonJS({
|
|
38591
38591
|
}
|
38592
38592
|
__name(dangerous_setTargetConsoleForTesting, "dangerous_setTargetConsoleForTesting");
|
38593
38593
|
function registerRenderer(renderer, onErrorOrWarning) {
|
38594
|
-
var currentDispatcherRef = renderer.currentDispatcherRef, getCurrentFiber = renderer.getCurrentFiber, findFiberByHostInstance = renderer.findFiberByHostInstance,
|
38594
|
+
var currentDispatcherRef = renderer.currentDispatcherRef, getCurrentFiber = renderer.getCurrentFiber, findFiberByHostInstance = renderer.findFiberByHostInstance, version4 = renderer.version;
|
38595
38595
|
if (typeof findFiberByHostInstance !== "function") {
|
38596
38596
|
return;
|
38597
38597
|
}
|
@@ -38599,7 +38599,7 @@ var require_backend = __commonJS({
|
|
38599
38599
|
var _getInternalReactCons = Object(_renderer__WEBPACK_IMPORTED_MODULE_1__[
|
38600
38600
|
/* getInternalReactConstants */
|
38601
38601
|
"b"
|
38602
|
-
])(
|
38602
|
+
])(version4), ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork;
|
38603
38603
|
injectedRenderers.set(renderer, {
|
38604
38604
|
currentDispatcherRef,
|
38605
38605
|
getCurrentFiber,
|
@@ -38919,76 +38919,76 @@ var require_backend = __commonJS({
|
|
38919
38919
|
}
|
38920
38920
|
}
|
38921
38921
|
exports3.parse = parse7;
|
38922
|
-
function parse7(
|
38922
|
+
function parse7(version4, options29) {
|
38923
38923
|
if (!options29 || _typeof7(options29) !== "object") {
|
38924
38924
|
options29 = {
|
38925
38925
|
loose: !!options29,
|
38926
38926
|
includePrerelease: false
|
38927
38927
|
};
|
38928
38928
|
}
|
38929
|
-
if (
|
38930
|
-
return
|
38929
|
+
if (version4 instanceof SemVer) {
|
38930
|
+
return version4;
|
38931
38931
|
}
|
38932
|
-
if (typeof
|
38932
|
+
if (typeof version4 !== "string") {
|
38933
38933
|
return null;
|
38934
38934
|
}
|
38935
|
-
if (
|
38935
|
+
if (version4.length > MAX_LENGTH) {
|
38936
38936
|
return null;
|
38937
38937
|
}
|
38938
38938
|
var r3 = options29.loose ? re[t3.LOOSE] : re[t3.FULL];
|
38939
|
-
if (!r3.test(
|
38939
|
+
if (!r3.test(version4)) {
|
38940
38940
|
return null;
|
38941
38941
|
}
|
38942
38942
|
try {
|
38943
|
-
return new SemVer(
|
38943
|
+
return new SemVer(version4, options29);
|
38944
38944
|
} catch (er) {
|
38945
38945
|
return null;
|
38946
38946
|
}
|
38947
38947
|
}
|
38948
38948
|
__name(parse7, "parse");
|
38949
38949
|
exports3.valid = valid;
|
38950
|
-
function valid(
|
38951
|
-
var v2 = parse7(
|
38950
|
+
function valid(version4, options29) {
|
38951
|
+
var v2 = parse7(version4, options29);
|
38952
38952
|
return v2 ? v2.version : null;
|
38953
38953
|
}
|
38954
38954
|
__name(valid, "valid");
|
38955
38955
|
exports3.clean = clean;
|
38956
|
-
function clean(
|
38957
|
-
var s = parse7(
|
38956
|
+
function clean(version4, options29) {
|
38957
|
+
var s = parse7(version4.trim().replace(/^[=v]+/, ""), options29);
|
38958
38958
|
return s ? s.version : null;
|
38959
38959
|
}
|
38960
38960
|
__name(clean, "clean");
|
38961
38961
|
exports3.SemVer = SemVer;
|
38962
|
-
function SemVer(
|
38962
|
+
function SemVer(version4, options29) {
|
38963
38963
|
if (!options29 || _typeof7(options29) !== "object") {
|
38964
38964
|
options29 = {
|
38965
38965
|
loose: !!options29,
|
38966
38966
|
includePrerelease: false
|
38967
38967
|
};
|
38968
38968
|
}
|
38969
|
-
if (
|
38970
|
-
if (
|
38971
|
-
return
|
38969
|
+
if (version4 instanceof SemVer) {
|
38970
|
+
if (version4.loose === options29.loose) {
|
38971
|
+
return version4;
|
38972
38972
|
} else {
|
38973
|
-
|
38973
|
+
version4 = version4.version;
|
38974
38974
|
}
|
38975
|
-
} else if (typeof
|
38976
|
-
throw new TypeError("Invalid Version: " +
|
38975
|
+
} else if (typeof version4 !== "string") {
|
38976
|
+
throw new TypeError("Invalid Version: " + version4);
|
38977
38977
|
}
|
38978
|
-
if (
|
38978
|
+
if (version4.length > MAX_LENGTH) {
|
38979
38979
|
throw new TypeError("version is longer than " + MAX_LENGTH + " characters");
|
38980
38980
|
}
|
38981
38981
|
if (!(this instanceof SemVer)) {
|
38982
|
-
return new SemVer(
|
38982
|
+
return new SemVer(version4, options29);
|
38983
38983
|
}
|
38984
|
-
debug("SemVer",
|
38984
|
+
debug("SemVer", version4, options29);
|
38985
38985
|
this.options = options29;
|
38986
38986
|
this.loose = !!options29.loose;
|
38987
|
-
var m2 =
|
38987
|
+
var m2 = version4.trim().match(options29.loose ? re[t3.LOOSE] : re[t3.FULL]);
|
38988
38988
|
if (!m2) {
|
38989
|
-
throw new TypeError("Invalid Version: " +
|
38989
|
+
throw new TypeError("Invalid Version: " + version4);
|
38990
38990
|
}
|
38991
|
-
this.raw =
|
38991
|
+
this.raw = version4;
|
38992
38992
|
this.major = +m2[1];
|
38993
38993
|
this.minor = +m2[2];
|
38994
38994
|
this.patch = +m2[3];
|
@@ -39172,13 +39172,13 @@ var require_backend = __commonJS({
|
|
39172
39172
|
return this;
|
39173
39173
|
};
|
39174
39174
|
exports3.inc = inc;
|
39175
|
-
function inc(
|
39175
|
+
function inc(version4, release2, loose, identifier) {
|
39176
39176
|
if (typeof loose === "string") {
|
39177
39177
|
identifier = loose;
|
39178
39178
|
loose = void 0;
|
39179
39179
|
}
|
39180
39180
|
try {
|
39181
|
-
return new SemVer(
|
39181
|
+
return new SemVer(version4, loose).inc(release2, identifier).version;
|
39182
39182
|
} catch (er) {
|
39183
39183
|
return null;
|
39184
39184
|
}
|
@@ -39389,19 +39389,19 @@ var require_backend = __commonJS({
|
|
39389
39389
|
Comparator.prototype.toString = function() {
|
39390
39390
|
return this.value;
|
39391
39391
|
};
|
39392
|
-
Comparator.prototype.test = function(
|
39393
|
-
debug("Comparator.test",
|
39394
|
-
if (this.semver === ANY ||
|
39392
|
+
Comparator.prototype.test = function(version4) {
|
39393
|
+
debug("Comparator.test", version4, this.options.loose);
|
39394
|
+
if (this.semver === ANY || version4 === ANY) {
|
39395
39395
|
return true;
|
39396
39396
|
}
|
39397
|
-
if (typeof
|
39397
|
+
if (typeof version4 === "string") {
|
39398
39398
|
try {
|
39399
|
-
|
39399
|
+
version4 = new SemVer(version4, this.options);
|
39400
39400
|
} catch (er) {
|
39401
39401
|
return false;
|
39402
39402
|
}
|
39403
39403
|
}
|
39404
|
-
return cmp(
|
39404
|
+
return cmp(version4, this.operator, this.semver, this.options);
|
39405
39405
|
};
|
39406
39406
|
Comparator.prototype.intersects = function(comp, options29) {
|
39407
39407
|
if (!(comp instanceof Comparator)) {
|
@@ -39725,31 +39725,31 @@ var require_backend = __commonJS({
|
|
39725
39725
|
return (from + " " + to).trim();
|
39726
39726
|
}
|
39727
39727
|
__name(hyphenReplace, "hyphenReplace");
|
39728
|
-
Range.prototype.test = function(
|
39729
|
-
if (!
|
39728
|
+
Range.prototype.test = function(version4) {
|
39729
|
+
if (!version4) {
|
39730
39730
|
return false;
|
39731
39731
|
}
|
39732
|
-
if (typeof
|
39732
|
+
if (typeof version4 === "string") {
|
39733
39733
|
try {
|
39734
|
-
|
39734
|
+
version4 = new SemVer(version4, this.options);
|
39735
39735
|
} catch (er) {
|
39736
39736
|
return false;
|
39737
39737
|
}
|
39738
39738
|
}
|
39739
39739
|
for (var i2 = 0; i2 < this.set.length; i2++) {
|
39740
|
-
if (testSet(this.set[i2],
|
39740
|
+
if (testSet(this.set[i2], version4, this.options)) {
|
39741
39741
|
return true;
|
39742
39742
|
}
|
39743
39743
|
}
|
39744
39744
|
return false;
|
39745
39745
|
};
|
39746
|
-
function testSet(set,
|
39746
|
+
function testSet(set, version4, options29) {
|
39747
39747
|
for (var i2 = 0; i2 < set.length; i2++) {
|
39748
|
-
if (!set[i2].test(
|
39748
|
+
if (!set[i2].test(version4)) {
|
39749
39749
|
return false;
|
39750
39750
|
}
|
39751
39751
|
}
|
39752
|
-
if (
|
39752
|
+
if (version4.prerelease.length && !options29.includePrerelease) {
|
39753
39753
|
for (i2 = 0; i2 < set.length; i2++) {
|
39754
39754
|
debug(set[i2].semver);
|
39755
39755
|
if (set[i2].semver === ANY) {
|
@@ -39757,7 +39757,7 @@ var require_backend = __commonJS({
|
|
39757
39757
|
}
|
39758
39758
|
if (set[i2].semver.prerelease.length > 0) {
|
39759
39759
|
var allowed = set[i2].semver;
|
39760
|
-
if (allowed.major ===
|
39760
|
+
if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) {
|
39761
39761
|
return true;
|
39762
39762
|
}
|
39763
39763
|
}
|
@@ -39768,13 +39768,13 @@ var require_backend = __commonJS({
|
|
39768
39768
|
}
|
39769
39769
|
__name(testSet, "testSet");
|
39770
39770
|
exports3.satisfies = satisfies;
|
39771
|
-
function satisfies(
|
39771
|
+
function satisfies(version4, range, options29) {
|
39772
39772
|
try {
|
39773
39773
|
range = new Range(range, options29);
|
39774
39774
|
} catch (er) {
|
39775
39775
|
return false;
|
39776
39776
|
}
|
39777
|
-
return range.test(
|
39777
|
+
return range.test(version4);
|
39778
39778
|
}
|
39779
39779
|
__name(satisfies, "satisfies");
|
39780
39780
|
exports3.maxSatisfying = maxSatisfying;
|
@@ -39871,18 +39871,18 @@ var require_backend = __commonJS({
|
|
39871
39871
|
}
|
39872
39872
|
__name(validRange, "validRange");
|
39873
39873
|
exports3.ltr = ltr;
|
39874
|
-
function ltr(
|
39875
|
-
return outside(
|
39874
|
+
function ltr(version4, range, options29) {
|
39875
|
+
return outside(version4, range, "<", options29);
|
39876
39876
|
}
|
39877
39877
|
__name(ltr, "ltr");
|
39878
39878
|
exports3.gtr = gtr;
|
39879
|
-
function gtr(
|
39880
|
-
return outside(
|
39879
|
+
function gtr(version4, range, options29) {
|
39880
|
+
return outside(version4, range, ">", options29);
|
39881
39881
|
}
|
39882
39882
|
__name(gtr, "gtr");
|
39883
39883
|
exports3.outside = outside;
|
39884
|
-
function outside(
|
39885
|
-
|
39884
|
+
function outside(version4, range, hilo, options29) {
|
39885
|
+
version4 = new SemVer(version4, options29);
|
39886
39886
|
range = new Range(range, options29);
|
39887
39887
|
var gtfn, ltefn, ltfn, comp, ecomp;
|
39888
39888
|
switch (hilo) {
|
@@ -39903,7 +39903,7 @@ var require_backend = __commonJS({
|
|
39903
39903
|
default:
|
39904
39904
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
39905
39905
|
}
|
39906
|
-
if (satisfies(
|
39906
|
+
if (satisfies(version4, range, options29)) {
|
39907
39907
|
return false;
|
39908
39908
|
}
|
39909
39909
|
for (var i2 = 0; i2 < range.set.length; ++i2) {
|
@@ -39925,9 +39925,9 @@ var require_backend = __commonJS({
|
|
39925
39925
|
if (high.operator === comp || high.operator === ecomp) {
|
39926
39926
|
return false;
|
39927
39927
|
}
|
39928
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
39928
|
+
if ((!low.operator || low.operator === comp) && ltefn(version4, low.semver)) {
|
39929
39929
|
return false;
|
39930
|
-
} else if (low.operator === ecomp && ltfn(
|
39930
|
+
} else if (low.operator === ecomp && ltfn(version4, low.semver)) {
|
39931
39931
|
return false;
|
39932
39932
|
}
|
39933
39933
|
}
|
@@ -39935,8 +39935,8 @@ var require_backend = __commonJS({
|
|
39935
39935
|
}
|
39936
39936
|
__name(outside, "outside");
|
39937
39937
|
exports3.prerelease = prerelease;
|
39938
|
-
function prerelease(
|
39939
|
-
var parsed = parse7(
|
39938
|
+
function prerelease(version4, options29) {
|
39939
|
+
var parsed = parse7(version4, options29);
|
39940
39940
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
39941
39941
|
}
|
39942
39942
|
__name(prerelease, "prerelease");
|
@@ -39948,23 +39948,23 @@ var require_backend = __commonJS({
|
|
39948
39948
|
}
|
39949
39949
|
__name(intersects, "intersects");
|
39950
39950
|
exports3.coerce = coerce2;
|
39951
|
-
function coerce2(
|
39952
|
-
if (
|
39953
|
-
return
|
39951
|
+
function coerce2(version4, options29) {
|
39952
|
+
if (version4 instanceof SemVer) {
|
39953
|
+
return version4;
|
39954
39954
|
}
|
39955
|
-
if (typeof
|
39956
|
-
|
39955
|
+
if (typeof version4 === "number") {
|
39956
|
+
version4 = String(version4);
|
39957
39957
|
}
|
39958
|
-
if (typeof
|
39958
|
+
if (typeof version4 !== "string") {
|
39959
39959
|
return null;
|
39960
39960
|
}
|
39961
39961
|
options29 = options29 || {};
|
39962
39962
|
var match = null;
|
39963
39963
|
if (!options29.rtl) {
|
39964
|
-
match =
|
39964
|
+
match = version4.match(re[t3.COERCE]);
|
39965
39965
|
} else {
|
39966
39966
|
var next;
|
39967
|
-
while ((next = re[t3.COERCERTL].exec(
|
39967
|
+
while ((next = re[t3.COERCERTL].exec(version4)) && (!match || match.index + match[0].length !== version4.length)) {
|
39968
39968
|
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
39969
39969
|
match = next;
|
39970
39970
|
}
|
@@ -41302,7 +41302,7 @@ var require_backend = __commonJS({
|
|
41302
41302
|
} : function() {
|
41303
41303
|
return Date.now();
|
41304
41304
|
};
|
41305
|
-
function getInternalReactConstants(
|
41305
|
+
function getInternalReactConstants(version4) {
|
41306
41306
|
var ReactTypeOfSideEffect = {
|
41307
41307
|
DidCapture: 128,
|
41308
41308
|
NoFlags: 0,
|
@@ -41319,7 +41319,7 @@ var require_backend = __commonJS({
|
|
41319
41319
|
IdlePriority: 95,
|
41320
41320
|
NoPriority: 90
|
41321
41321
|
};
|
41322
|
-
if (Object(semver2["gt"])(
|
41322
|
+
if (Object(semver2["gt"])(version4, "17.0.2")) {
|
41323
41323
|
ReactPriorityLevels = {
|
41324
41324
|
ImmediatePriority: 1,
|
41325
41325
|
UserBlockingPriority: 2,
|
@@ -41330,15 +41330,15 @@ var require_backend = __commonJS({
|
|
41330
41330
|
};
|
41331
41331
|
}
|
41332
41332
|
var StrictModeBits = 0;
|
41333
|
-
if (Object(semver2["gte"])(
|
41333
|
+
if (Object(semver2["gte"])(version4, "18.0.0-alpha")) {
|
41334
41334
|
StrictModeBits = 24;
|
41335
|
-
} else if (Object(semver2["gte"])(
|
41335
|
+
} else if (Object(semver2["gte"])(version4, "16.9.0")) {
|
41336
41336
|
StrictModeBits = 1;
|
41337
|
-
} else if (Object(semver2["gte"])(
|
41337
|
+
} else if (Object(semver2["gte"])(version4, "16.3.0")) {
|
41338
41338
|
StrictModeBits = 2;
|
41339
41339
|
}
|
41340
41340
|
var ReactTypeOfWork = null;
|
41341
|
-
if (Object(semver2["gt"])(
|
41341
|
+
if (Object(semver2["gt"])(version4, "17.0.1")) {
|
41342
41342
|
ReactTypeOfWork = {
|
41343
41343
|
CacheComponent: 24,
|
41344
41344
|
// Experimental
|
@@ -41376,7 +41376,7 @@ var require_backend = __commonJS({
|
|
41376
41376
|
YieldComponent: -1
|
41377
41377
|
// Removed
|
41378
41378
|
};
|
41379
|
-
} else if (Object(semver2["gte"])(
|
41379
|
+
} else if (Object(semver2["gte"])(version4, "17.0.0-alpha")) {
|
41380
41380
|
ReactTypeOfWork = {
|
41381
41381
|
CacheComponent: -1,
|
41382
41382
|
// Doesn't exist yet
|
@@ -41414,7 +41414,7 @@ var require_backend = __commonJS({
|
|
41414
41414
|
YieldComponent: -1
|
41415
41415
|
// Removed
|
41416
41416
|
};
|
41417
|
-
} else if (Object(semver2["gte"])(
|
41417
|
+
} else if (Object(semver2["gte"])(version4, "16.6.0-beta.0")) {
|
41418
41418
|
ReactTypeOfWork = {
|
41419
41419
|
CacheComponent: -1,
|
41420
41420
|
// Doesn't exist yet
|
@@ -41452,7 +41452,7 @@ var require_backend = __commonJS({
|
|
41452
41452
|
YieldComponent: -1
|
41453
41453
|
// Removed
|
41454
41454
|
};
|
41455
|
-
} else if (Object(semver2["gte"])(
|
41455
|
+
} else if (Object(semver2["gte"])(version4, "16.4.3-alpha")) {
|
41456
41456
|
ReactTypeOfWork = {
|
41457
41457
|
CacheComponent: -1,
|
41458
41458
|
// Doesn't exist yet
|
@@ -41705,8 +41705,8 @@ var require_backend = __commonJS({
|
|
41705
41705
|
}
|
41706
41706
|
__name(getInternalReactConstants, "getInternalReactConstants");
|
41707
41707
|
function attach(hook, rendererID, renderer, global2) {
|
41708
|
-
var
|
41709
|
-
var _getInternalReactCons = getInternalReactConstants(
|
41708
|
+
var version4 = renderer.reconcilerVersion || renderer.version;
|
41709
|
+
var _getInternalReactCons = getInternalReactConstants(version4), getDisplayNameForFiber = _getInternalReactCons.getDisplayNameForFiber, getTypeSymbol = _getInternalReactCons.getTypeSymbol, ReactPriorityLevels = _getInternalReactCons.ReactPriorityLevels, ReactTypeOfWork = _getInternalReactCons.ReactTypeOfWork, ReactTypeOfSideEffect = _getInternalReactCons.ReactTypeOfSideEffect, StrictModeBits = _getInternalReactCons.StrictModeBits;
|
41710
41710
|
var DidCapture = ReactTypeOfSideEffect.DidCapture, Hydrating = ReactTypeOfSideEffect.Hydrating, NoFlags = ReactTypeOfSideEffect.NoFlags, PerformedWork = ReactTypeOfSideEffect.PerformedWork, Placement = ReactTypeOfSideEffect.Placement;
|
41711
41711
|
var CacheComponent = ReactTypeOfWork.CacheComponent, ClassComponent = ReactTypeOfWork.ClassComponent, ContextConsumer = ReactTypeOfWork.ContextConsumer, DehydratedSuspenseComponent = ReactTypeOfWork.DehydratedSuspenseComponent, ForwardRef = ReactTypeOfWork.ForwardRef, Fragment7 = ReactTypeOfWork.Fragment, FunctionComponent = ReactTypeOfWork.FunctionComponent, HostRoot = ReactTypeOfWork.HostRoot, HostPortal = ReactTypeOfWork.HostPortal, HostComponent = ReactTypeOfWork.HostComponent, HostText = ReactTypeOfWork.HostText, IncompleteClassComponent = ReactTypeOfWork.IncompleteClassComponent, IndeterminateComponent = ReactTypeOfWork.IndeterminateComponent, LegacyHiddenComponent = ReactTypeOfWork.LegacyHiddenComponent, MemoComponent = ReactTypeOfWork.MemoComponent, OffscreenComponent = ReactTypeOfWork.OffscreenComponent, SimpleMemoComponent = ReactTypeOfWork.SimpleMemoComponent, SuspenseComponent = ReactTypeOfWork.SuspenseComponent, SuspenseListComponent = ReactTypeOfWork.SuspenseListComponent;
|
41712
41712
|
var ImmediatePriority = ReactPriorityLevels.ImmediatePriority, UserBlockingPriority = ReactPriorityLevels.UserBlockingPriority, NormalPriority = ReactPriorityLevels.NormalPriority, LowPriority = ReactPriorityLevels.LowPriority, IdlePriority = ReactPriorityLevels.IdlePriority, NoPriority = ReactPriorityLevels.NoPriority;
|
@@ -41726,7 +41726,7 @@ var require_backend = __commonJS({
|
|
41726
41726
|
injectProfilingHooks(createProfilingHooks({
|
41727
41727
|
getDisplayNameForFiber,
|
41728
41728
|
getLaneLabelMap,
|
41729
|
-
reactVersion:
|
41729
|
+
reactVersion: version4
|
41730
41730
|
}));
|
41731
41731
|
}
|
41732
41732
|
var fibersWithChangedErrorOrWarningCounts = /* @__PURE__ */ new Set();
|
@@ -52075,10 +52075,10 @@ var require_supports_color = __commonJS({
|
|
52075
52075
|
return 3;
|
52076
52076
|
}
|
52077
52077
|
if ("TERM_PROGRAM" in env7) {
|
52078
|
-
const
|
52078
|
+
const version4 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
52079
52079
|
switch (env7.TERM_PROGRAM) {
|
52080
52080
|
case "iTerm.app":
|
52081
|
-
return
|
52081
|
+
return version4 >= 3 ? 3 : 2;
|
52082
52082
|
case "Apple_Terminal":
|
52083
52083
|
return 2;
|
52084
52084
|
}
|
@@ -55033,10 +55033,10 @@ var require_supports_colors = __commonJS({
|
|
55033
55033
|
return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env7.TEAMCITY_VERSION) ? 1 : 0;
|
55034
55034
|
}
|
55035
55035
|
if ("TERM_PROGRAM" in env7) {
|
55036
|
-
var
|
55036
|
+
var version4 = parseInt((env7.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
55037
55037
|
switch (env7.TERM_PROGRAM) {
|
55038
55038
|
case "iTerm.app":
|
55039
|
-
return
|
55039
|
+
return version4 >= 3 ? 3 : 2;
|
55040
55040
|
case "Hyper":
|
55041
55041
|
return 3;
|
55042
55042
|
case "Apple_Terminal":
|
@@ -65787,8 +65787,8 @@ var require_async = __commonJS({
|
|
65787
65787
|
cb(null, x2);
|
65788
65788
|
}
|
65789
65789
|
}, "maybeRealpath");
|
65790
|
-
var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(
|
65791
|
-
|
65790
|
+
var defaultReadPackage = /* @__PURE__ */ __name(function defaultReadPackage2(readFile17, pkgfile, cb) {
|
65791
|
+
readFile17(pkgfile, function(readFileErr, body) {
|
65792
65792
|
if (readFileErr)
|
65793
65793
|
cb(readFileErr);
|
65794
65794
|
else {
|
@@ -65824,7 +65824,7 @@ var require_async = __commonJS({
|
|
65824
65824
|
opts = normalizeOptions(x2, opts);
|
65825
65825
|
var isFile = opts.isFile || defaultIsFile;
|
65826
65826
|
var isDirectory2 = opts.isDirectory || defaultIsDir;
|
65827
|
-
var
|
65827
|
+
var readFile17 = opts.readFile || fs26.readFile;
|
65828
65828
|
var realpath = opts.realpath || defaultRealpath;
|
65829
65829
|
var readPackage = opts.readPackage || defaultReadPackage;
|
65830
65830
|
if (opts.readFile && opts.readPackage) {
|
@@ -65971,7 +65971,7 @@ var require_async = __commonJS({
|
|
65971
65971
|
isFile(pkgfile, function(err2, ex) {
|
65972
65972
|
if (!ex)
|
65973
65973
|
return loadpkg(path74.dirname(dir), cb2);
|
65974
|
-
readPackage(
|
65974
|
+
readPackage(readFile17, pkgfile, function(err3, pkgParam) {
|
65975
65975
|
if (err3)
|
65976
65976
|
cb2(err3);
|
65977
65977
|
var pkg = pkgParam;
|
@@ -66000,7 +66000,7 @@ var require_async = __commonJS({
|
|
66000
66000
|
return cb2(err2);
|
66001
66001
|
if (!ex)
|
66002
66002
|
return loadAsFile(path74.join(x3, "index"), fpkg, cb2);
|
66003
|
-
readPackage(
|
66003
|
+
readPackage(readFile17, pkgfile, function(err3, pkgParam) {
|
66004
66004
|
if (err3)
|
66005
66005
|
return cb2(err3);
|
66006
66006
|
var pkg = pkgParam;
|
@@ -69320,10 +69320,10 @@ function _supportsColor2(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
69320
69320
|
return 3;
|
69321
69321
|
}
|
69322
69322
|
if ("TERM_PROGRAM" in env4) {
|
69323
|
-
const
|
69323
|
+
const version4 = Number.parseInt((env4.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
69324
69324
|
switch (env4.TERM_PROGRAM) {
|
69325
69325
|
case "iTerm.app":
|
69326
|
-
return
|
69326
|
+
return version4 >= 3 ? 3 : 2;
|
69327
69327
|
case "Apple_Terminal":
|
69328
69328
|
return 2;
|
69329
69329
|
}
|
@@ -70250,7 +70250,7 @@ var require_update_check = __commonJS({
|
|
70250
70250
|
var registryUrl = require_registry_url();
|
70251
70251
|
var writeFile8 = promisify2(fs26.writeFile);
|
70252
70252
|
var mkdir7 = promisify2(fs26.mkdir);
|
70253
|
-
var
|
70253
|
+
var readFile17 = promisify2(fs26.readFile);
|
70254
70254
|
var compareVersions = /* @__PURE__ */ __name((a, b2) => a.localeCompare(b2, "en-US", { numeric: true }), "compareVersions");
|
70255
70255
|
var encode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/^%40/, "@"), "encode");
|
70256
70256
|
var getFile = /* @__PURE__ */ __name(async (details, distTag) => {
|
@@ -70267,7 +70267,7 @@ var require_update_check = __commonJS({
|
|
70267
70267
|
}, "getFile");
|
70268
70268
|
var evaluateCache = /* @__PURE__ */ __name(async (file, time, interval) => {
|
70269
70269
|
if (fs26.existsSync(file)) {
|
70270
|
-
const content = await
|
70270
|
+
const content = await readFile17(file, "utf8");
|
70271
70271
|
const { lastUpdate, latest } = JSON.parse(content);
|
70272
70272
|
const nextCheck = lastUpdate + interval;
|
70273
70273
|
if (nextCheck > time) {
|
@@ -70342,11 +70342,11 @@ var require_update_check = __commonJS({
|
|
70342
70342
|
throw err;
|
70343
70343
|
}
|
70344
70344
|
}
|
70345
|
-
const
|
70346
|
-
if (!
|
70345
|
+
const version4 = spec["dist-tags"][distTag];
|
70346
|
+
if (!version4) {
|
70347
70347
|
throw new Error(`Distribution tag ${distTag} is not available`);
|
70348
70348
|
}
|
70349
|
-
return
|
70349
|
+
return version4;
|
70350
70350
|
}, "getMostRecent");
|
70351
70351
|
var defaultConfig = {
|
70352
70352
|
interval: 36e5,
|
@@ -109745,31 +109745,31 @@ var require_semver = __commonJS({
|
|
109745
109745
|
var parseOptions = require_parse_options();
|
109746
109746
|
var { compareIdentifiers } = require_identifiers();
|
109747
109747
|
var SemVer = class {
|
109748
|
-
constructor(
|
109748
|
+
constructor(version4, options29) {
|
109749
109749
|
options29 = parseOptions(options29);
|
109750
|
-
if (
|
109751
|
-
if (
|
109752
|
-
return
|
109750
|
+
if (version4 instanceof SemVer) {
|
109751
|
+
if (version4.loose === !!options29.loose && version4.includePrerelease === !!options29.includePrerelease) {
|
109752
|
+
return version4;
|
109753
109753
|
} else {
|
109754
|
-
|
109754
|
+
version4 = version4.version;
|
109755
109755
|
}
|
109756
|
-
} else if (typeof
|
109757
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof
|
109756
|
+
} else if (typeof version4 !== "string") {
|
109757
|
+
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version4}".`);
|
109758
109758
|
}
|
109759
|
-
if (
|
109759
|
+
if (version4.length > MAX_LENGTH) {
|
109760
109760
|
throw new TypeError(
|
109761
109761
|
`version is longer than ${MAX_LENGTH} characters`
|
109762
109762
|
);
|
109763
109763
|
}
|
109764
|
-
debug("SemVer",
|
109764
|
+
debug("SemVer", version4, options29);
|
109765
109765
|
this.options = options29;
|
109766
109766
|
this.loose = !!options29.loose;
|
109767
109767
|
this.includePrerelease = !!options29.includePrerelease;
|
109768
|
-
const m2 =
|
109768
|
+
const m2 = version4.trim().match(options29.loose ? re[t3.LOOSE] : re[t3.FULL]);
|
109769
109769
|
if (!m2) {
|
109770
|
-
throw new TypeError(`Invalid Version: ${
|
109770
|
+
throw new TypeError(`Invalid Version: ${version4}`);
|
109771
109771
|
}
|
109772
|
-
this.raw =
|
109772
|
+
this.raw = version4;
|
109773
109773
|
this.major = +m2[1];
|
109774
109774
|
this.minor = +m2[2];
|
109775
109775
|
this.patch = +m2[3];
|
@@ -109984,12 +109984,12 @@ var require_parse6 = __commonJS({
|
|
109984
109984
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/parse.js"(exports2, module3) {
|
109985
109985
|
init_import_meta_url();
|
109986
109986
|
var SemVer = require_semver();
|
109987
|
-
var parse7 = /* @__PURE__ */ __name((
|
109988
|
-
if (
|
109989
|
-
return
|
109987
|
+
var parse7 = /* @__PURE__ */ __name((version4, options29, throwErrors = false) => {
|
109988
|
+
if (version4 instanceof SemVer) {
|
109989
|
+
return version4;
|
109990
109990
|
}
|
109991
109991
|
try {
|
109992
|
-
return new SemVer(
|
109992
|
+
return new SemVer(version4, options29);
|
109993
109993
|
} catch (er) {
|
109994
109994
|
if (!throwErrors) {
|
109995
109995
|
return null;
|
@@ -110006,8 +110006,8 @@ var require_valid = __commonJS({
|
|
110006
110006
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/valid.js"(exports2, module3) {
|
110007
110007
|
init_import_meta_url();
|
110008
110008
|
var parse7 = require_parse6();
|
110009
|
-
var valid = /* @__PURE__ */ __name((
|
110010
|
-
const v2 = parse7(
|
110009
|
+
var valid = /* @__PURE__ */ __name((version4, options29) => {
|
110010
|
+
const v2 = parse7(version4, options29);
|
110011
110011
|
return v2 ? v2.version : null;
|
110012
110012
|
}, "valid");
|
110013
110013
|
module3.exports = valid;
|
@@ -110019,8 +110019,8 @@ var require_clean = __commonJS({
|
|
110019
110019
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/clean.js"(exports2, module3) {
|
110020
110020
|
init_import_meta_url();
|
110021
110021
|
var parse7 = require_parse6();
|
110022
|
-
var clean = /* @__PURE__ */ __name((
|
110023
|
-
const s = parse7(
|
110022
|
+
var clean = /* @__PURE__ */ __name((version4, options29) => {
|
110023
|
+
const s = parse7(version4.trim().replace(/^[=v]+/, ""), options29);
|
110024
110024
|
return s ? s.version : null;
|
110025
110025
|
}, "clean");
|
110026
110026
|
module3.exports = clean;
|
@@ -110032,7 +110032,7 @@ var require_inc = __commonJS({
|
|
110032
110032
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/inc.js"(exports2, module3) {
|
110033
110033
|
init_import_meta_url();
|
110034
110034
|
var SemVer = require_semver();
|
110035
|
-
var inc = /* @__PURE__ */ __name((
|
110035
|
+
var inc = /* @__PURE__ */ __name((version4, release2, options29, identifier, identifierBase) => {
|
110036
110036
|
if (typeof options29 === "string") {
|
110037
110037
|
identifierBase = identifier;
|
110038
110038
|
identifier = options29;
|
@@ -110040,7 +110040,7 @@ var require_inc = __commonJS({
|
|
110040
110040
|
}
|
110041
110041
|
try {
|
110042
110042
|
return new SemVer(
|
110043
|
-
|
110043
|
+
version4 instanceof SemVer ? version4.version : version4,
|
110044
110044
|
options29
|
110045
110045
|
).inc(release2, identifier, identifierBase).version;
|
110046
110046
|
} catch (er) {
|
@@ -110131,8 +110131,8 @@ var require_prerelease = __commonJS({
|
|
110131
110131
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/prerelease.js"(exports2, module3) {
|
110132
110132
|
init_import_meta_url();
|
110133
110133
|
var parse7 = require_parse6();
|
110134
|
-
var prerelease = /* @__PURE__ */ __name((
|
110135
|
-
const parsed = parse7(
|
110134
|
+
var prerelease = /* @__PURE__ */ __name((version4, options29) => {
|
110135
|
+
const parsed = parse7(version4, options29);
|
110136
110136
|
return parsed && parsed.prerelease.length ? parsed.prerelease : null;
|
110137
110137
|
}, "prerelease");
|
110138
110138
|
module3.exports = prerelease;
|
@@ -110320,23 +110320,23 @@ var require_coerce = __commonJS({
|
|
110320
110320
|
var SemVer = require_semver();
|
110321
110321
|
var parse7 = require_parse6();
|
110322
110322
|
var { safeRe: re, t: t3 } = require_re();
|
110323
|
-
var coerce2 = /* @__PURE__ */ __name((
|
110324
|
-
if (
|
110325
|
-
return
|
110323
|
+
var coerce2 = /* @__PURE__ */ __name((version4, options29) => {
|
110324
|
+
if (version4 instanceof SemVer) {
|
110325
|
+
return version4;
|
110326
110326
|
}
|
110327
|
-
if (typeof
|
110328
|
-
|
110327
|
+
if (typeof version4 === "number") {
|
110328
|
+
version4 = String(version4);
|
110329
110329
|
}
|
110330
|
-
if (typeof
|
110330
|
+
if (typeof version4 !== "string") {
|
110331
110331
|
return null;
|
110332
110332
|
}
|
110333
110333
|
options29 = options29 || {};
|
110334
110334
|
let match = null;
|
110335
110335
|
if (!options29.rtl) {
|
110336
|
-
match =
|
110336
|
+
match = version4.match(re[t3.COERCE]);
|
110337
110337
|
} else {
|
110338
110338
|
let next;
|
110339
|
-
while ((next = re[t3.COERCERTL].exec(
|
110339
|
+
while ((next = re[t3.COERCERTL].exec(version4)) && (!match || match.index + match[0].length !== version4.length)) {
|
110340
110340
|
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
110341
110341
|
match = next;
|
110342
110342
|
}
|
@@ -111122,19 +111122,19 @@ var require_range = __commonJS({
|
|
111122
111122
|
});
|
111123
111123
|
}
|
111124
111124
|
// if ANY of the sets match ALL of its comparators, then pass
|
111125
|
-
test(
|
111126
|
-
if (!
|
111125
|
+
test(version4) {
|
111126
|
+
if (!version4) {
|
111127
111127
|
return false;
|
111128
111128
|
}
|
111129
|
-
if (typeof
|
111129
|
+
if (typeof version4 === "string") {
|
111130
111130
|
try {
|
111131
|
-
|
111131
|
+
version4 = new SemVer(version4, this.options);
|
111132
111132
|
} catch (er) {
|
111133
111133
|
return false;
|
111134
111134
|
}
|
111135
111135
|
}
|
111136
111136
|
for (let i = 0; i < this.set.length; i++) {
|
111137
|
-
if (testSet(this.set[i],
|
111137
|
+
if (testSet(this.set[i], version4, this.options)) {
|
111138
111138
|
return true;
|
111139
111139
|
}
|
111140
111140
|
}
|
@@ -111349,13 +111349,13 @@ var require_range = __commonJS({
|
|
111349
111349
|
}
|
111350
111350
|
return `${from} ${to}`.trim();
|
111351
111351
|
}, "hyphenReplace");
|
111352
|
-
var testSet = /* @__PURE__ */ __name((set,
|
111352
|
+
var testSet = /* @__PURE__ */ __name((set, version4, options29) => {
|
111353
111353
|
for (let i = 0; i < set.length; i++) {
|
111354
|
-
if (!set[i].test(
|
111354
|
+
if (!set[i].test(version4)) {
|
111355
111355
|
return false;
|
111356
111356
|
}
|
111357
111357
|
}
|
111358
|
-
if (
|
111358
|
+
if (version4.prerelease.length && !options29.includePrerelease) {
|
111359
111359
|
for (let i = 0; i < set.length; i++) {
|
111360
111360
|
debug(set[i].semver);
|
111361
111361
|
if (set[i].semver === Comparator.ANY) {
|
@@ -111363,7 +111363,7 @@ var require_range = __commonJS({
|
|
111363
111363
|
}
|
111364
111364
|
if (set[i].semver.prerelease.length > 0) {
|
111365
111365
|
const allowed = set[i].semver;
|
111366
|
-
if (allowed.major ===
|
111366
|
+
if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) {
|
111367
111367
|
return true;
|
111368
111368
|
}
|
111369
111369
|
}
|
@@ -111424,19 +111424,19 @@ var require_comparator = __commonJS({
|
|
111424
111424
|
toString() {
|
111425
111425
|
return this.value;
|
111426
111426
|
}
|
111427
|
-
test(
|
111428
|
-
debug("Comparator.test",
|
111429
|
-
if (this.semver === ANY ||
|
111427
|
+
test(version4) {
|
111428
|
+
debug("Comparator.test", version4, this.options.loose);
|
111429
|
+
if (this.semver === ANY || version4 === ANY) {
|
111430
111430
|
return true;
|
111431
111431
|
}
|
111432
|
-
if (typeof
|
111432
|
+
if (typeof version4 === "string") {
|
111433
111433
|
try {
|
111434
|
-
|
111434
|
+
version4 = new SemVer(version4, this.options);
|
111435
111435
|
} catch (er) {
|
111436
111436
|
return false;
|
111437
111437
|
}
|
111438
111438
|
}
|
111439
|
-
return cmp(
|
111439
|
+
return cmp(version4, this.operator, this.semver, this.options);
|
111440
111440
|
}
|
111441
111441
|
intersects(comp, options29) {
|
111442
111442
|
if (!(comp instanceof Comparator)) {
|
@@ -111494,13 +111494,13 @@ var require_satisfies = __commonJS({
|
|
111494
111494
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/functions/satisfies.js"(exports2, module3) {
|
111495
111495
|
init_import_meta_url();
|
111496
111496
|
var Range = require_range();
|
111497
|
-
var satisfies = /* @__PURE__ */ __name((
|
111497
|
+
var satisfies = /* @__PURE__ */ __name((version4, range, options29) => {
|
111498
111498
|
try {
|
111499
111499
|
range = new Range(range, options29);
|
111500
111500
|
} catch (er) {
|
111501
111501
|
return false;
|
111502
111502
|
}
|
111503
|
-
return range.test(
|
111503
|
+
return range.test(version4);
|
111504
111504
|
}, "satisfies");
|
111505
111505
|
module3.exports = satisfies;
|
111506
111506
|
}
|
@@ -111660,8 +111660,8 @@ var require_outside = __commonJS({
|
|
111660
111660
|
var lt2 = require_lt();
|
111661
111661
|
var lte = require_lte();
|
111662
111662
|
var gte = require_gte();
|
111663
|
-
var outside = /* @__PURE__ */ __name((
|
111664
|
-
|
111663
|
+
var outside = /* @__PURE__ */ __name((version4, range, hilo, options29) => {
|
111664
|
+
version4 = new SemVer(version4, options29);
|
111665
111665
|
range = new Range(range, options29);
|
111666
111666
|
let gtfn, ltefn, ltfn, comp, ecomp;
|
111667
111667
|
switch (hilo) {
|
@@ -111682,7 +111682,7 @@ var require_outside = __commonJS({
|
|
111682
111682
|
default:
|
111683
111683
|
throw new TypeError('Must provide a hilo val of "<" or ">"');
|
111684
111684
|
}
|
111685
|
-
if (satisfies(
|
111685
|
+
if (satisfies(version4, range, options29)) {
|
111686
111686
|
return false;
|
111687
111687
|
}
|
111688
111688
|
for (let i = 0; i < range.set.length; ++i) {
|
@@ -111704,9 +111704,9 @@ var require_outside = __commonJS({
|
|
111704
111704
|
if (high.operator === comp || high.operator === ecomp) {
|
111705
111705
|
return false;
|
111706
111706
|
}
|
111707
|
-
if ((!low.operator || low.operator === comp) && ltefn(
|
111707
|
+
if ((!low.operator || low.operator === comp) && ltefn(version4, low.semver)) {
|
111708
111708
|
return false;
|
111709
|
-
} else if (low.operator === ecomp && ltfn(
|
111709
|
+
} else if (low.operator === ecomp && ltfn(version4, low.semver)) {
|
111710
111710
|
return false;
|
111711
111711
|
}
|
111712
111712
|
}
|
@@ -111721,7 +111721,7 @@ var require_gtr = __commonJS({
|
|
111721
111721
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/gtr.js"(exports2, module3) {
|
111722
111722
|
init_import_meta_url();
|
111723
111723
|
var outside = require_outside();
|
111724
|
-
var gtr = /* @__PURE__ */ __name((
|
111724
|
+
var gtr = /* @__PURE__ */ __name((version4, range, options29) => outside(version4, range, ">", options29), "gtr");
|
111725
111725
|
module3.exports = gtr;
|
111726
111726
|
}
|
111727
111727
|
});
|
@@ -111731,7 +111731,7 @@ var require_ltr = __commonJS({
|
|
111731
111731
|
"../../node_modules/.pnpm/semver@7.5.4/node_modules/semver/ranges/ltr.js"(exports2, module3) {
|
111732
111732
|
init_import_meta_url();
|
111733
111733
|
var outside = require_outside();
|
111734
|
-
var ltr = /* @__PURE__ */ __name((
|
111734
|
+
var ltr = /* @__PURE__ */ __name((version4, range, options29) => outside(version4, range, "<", options29), "ltr");
|
111735
111735
|
module3.exports = ltr;
|
111736
111736
|
}
|
111737
111737
|
});
|
@@ -111761,12 +111761,12 @@ var require_simplify = __commonJS({
|
|
111761
111761
|
let first = null;
|
111762
111762
|
let prev = null;
|
111763
111763
|
const v2 = versions.sort((a, b2) => compare(a, b2, options29));
|
111764
|
-
for (const
|
111765
|
-
const included = satisfies(
|
111764
|
+
for (const version4 of v2) {
|
111765
|
+
const included = satisfies(version4, range, options29);
|
111766
111766
|
if (included) {
|
111767
|
-
prev =
|
111767
|
+
prev = version4;
|
111768
111768
|
if (!first) {
|
111769
|
-
first =
|
111769
|
+
first = version4;
|
111770
111770
|
}
|
111771
111771
|
} else {
|
111772
111772
|
if (prev) {
|
@@ -112137,16 +112137,16 @@ var require_builtins = __commonJS({
|
|
112137
112137
|
wasi: ">=12.16.0",
|
112138
112138
|
diagnostics_channel: "^14.17.0 || >=15.1.0"
|
112139
112139
|
};
|
112140
|
-
module3.exports = ({ version:
|
112140
|
+
module3.exports = ({ version: version4 = process.version, experimental: experimental2 = false } = {}) => {
|
112141
112141
|
const builtins = [...permanentModules];
|
112142
112142
|
for (const [name, semverRange] of Object.entries(versionLockedModules)) {
|
112143
|
-
if (
|
112143
|
+
if (version4 === "*" || semver2.satisfies(version4, semverRange)) {
|
112144
112144
|
builtins.push(name);
|
112145
112145
|
}
|
112146
112146
|
}
|
112147
112147
|
if (experimental2) {
|
112148
112148
|
for (const [name, semverRange] of Object.entries(experimentalModules)) {
|
112149
|
-
if (!builtins.includes(name) && (
|
112149
|
+
if (!builtins.includes(name) && (version4 === "*" || semver2.satisfies(version4, semverRange))) {
|
112150
112150
|
builtins.push(name);
|
112151
112151
|
}
|
112152
112152
|
}
|
@@ -112325,7 +112325,7 @@ function npxResolve(pkg) {
|
|
112325
112325
|
async function checkPackagesAvailableLocally(pkg) {
|
112326
112326
|
const packages = {};
|
112327
112327
|
for (const p2 of Array.isArray(pkg) ? pkg : [pkg]) {
|
112328
|
-
const { name, version:
|
112328
|
+
const { name, version: version4, path: path74, exact } = parseAndValidate(p2);
|
112329
112329
|
if (packages[name])
|
112330
112330
|
throw new Error(`npx-import cannot import the same package twice! Got: '${p2}' but already saw '${name}' earlier!`);
|
112331
112331
|
const packageWithPath = [name, path74].join("");
|
@@ -112333,7 +112333,7 @@ async function checkPackagesAvailableLocally(pkg) {
|
|
112333
112333
|
packages[name] = {
|
112334
112334
|
name,
|
112335
112335
|
packageWithPath,
|
112336
|
-
version:
|
112336
|
+
version: version4,
|
112337
112337
|
exact,
|
112338
112338
|
path: path74,
|
112339
112339
|
imported,
|
@@ -112346,7 +112346,7 @@ function parseAndValidate(p2) {
|
|
112346
112346
|
if (p2.match(/^[.\/]/)) {
|
112347
112347
|
throw new Error(`npx-import can only import packages, not relative paths: got ${p2}`);
|
112348
112348
|
}
|
112349
|
-
const { name, version:
|
112349
|
+
const { name, version: version4, path: path74 } = parse5(p2);
|
112350
112350
|
const validation2 = (0, import_validate_npm_package_name.default)(name);
|
112351
112351
|
if (!validation2.validForNewPackages) {
|
112352
112352
|
if (validation2.warnings?.some((w2) => w2.match(/is a core module name/)))
|
@@ -112354,7 +112354,7 @@ function parseAndValidate(p2) {
|
|
112354
112354
|
else
|
112355
112355
|
throw new Error(`npx-import can't import invalid package name: parsed name '${name}' from '${p2}'`);
|
112356
112356
|
}
|
112357
|
-
return { name, version:
|
112357
|
+
return { name, version: version4, path: path74, exact: import_semver.default.parse(version4) !== null };
|
112358
112358
|
}
|
112359
112359
|
async function tryImport(packageWithPath) {
|
112360
112360
|
try {
|
@@ -148205,7 +148205,7 @@ var require_websocket_server2 = __commonJS({
|
|
148205
148205
|
socket.on("error", socketOnError);
|
148206
148206
|
const key = req.headers["sec-websocket-key"];
|
148207
148207
|
const upgrade = req.headers.upgrade;
|
148208
|
-
const
|
148208
|
+
const version4 = +req.headers["sec-websocket-version"];
|
148209
148209
|
if (req.method !== "GET") {
|
148210
148210
|
const message = "Invalid HTTP method";
|
148211
148211
|
abortHandshakeOrEmitwsClientError(this, req, socket, 405, message);
|
@@ -148221,7 +148221,7 @@ var require_websocket_server2 = __commonJS({
|
|
148221
148221
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
148222
148222
|
return;
|
148223
148223
|
}
|
148224
|
-
if (
|
148224
|
+
if (version4 !== 8 && version4 !== 13) {
|
148225
148225
|
const message = "Missing or invalid Sec-WebSocket-Version header";
|
148226
148226
|
abortHandshakeOrEmitwsClientError(this, req, socket, 400, message);
|
148227
148227
|
return;
|
@@ -148263,7 +148263,7 @@ var require_websocket_server2 = __commonJS({
|
|
148263
148263
|
}
|
148264
148264
|
if (this.options.verifyClient) {
|
148265
148265
|
const info = {
|
148266
|
-
origin: req.headers[`${
|
148266
|
+
origin: req.headers[`${version4 === 8 ? "sec-websocket-origin" : "origin"}`],
|
148267
148267
|
secure: !!(req.socket.authorized || req.socket.encrypted),
|
148268
148268
|
req
|
148269
148269
|
};
|
@@ -149426,6 +149426,166 @@ var require_dist7 = __commonJS({
|
|
149426
149426
|
}
|
149427
149427
|
});
|
149428
149428
|
|
149429
|
+
// ../../node_modules/.pnpm/workerd@1.20240909.0/node_modules/workerd/lib/main.js
|
149430
|
+
var require_main5 = __commonJS({
|
149431
|
+
"../../node_modules/.pnpm/workerd@1.20240909.0/node_modules/workerd/lib/main.js"(exports2, module3) {
|
149432
|
+
init_import_meta_url();
|
149433
|
+
var __create2 = Object.create;
|
149434
|
+
var __defProp2 = Object.defineProperty;
|
149435
|
+
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
149436
|
+
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
149437
|
+
var __getProtoOf2 = Object.getPrototypeOf;
|
149438
|
+
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
149439
|
+
var __export2 = /* @__PURE__ */ __name((target, all2) => {
|
149440
|
+
for (var name in all2)
|
149441
|
+
__defProp2(target, name, { get: all2[name], enumerable: true });
|
149442
|
+
}, "__export");
|
149443
|
+
var __copyProps2 = /* @__PURE__ */ __name((to, from, except, desc) => {
|
149444
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
149445
|
+
for (let key of __getOwnPropNames2(from))
|
149446
|
+
if (!__hasOwnProp2.call(to, key) && key !== except)
|
149447
|
+
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
149448
|
+
}
|
149449
|
+
return to;
|
149450
|
+
}, "__copyProps");
|
149451
|
+
var __toESM2 = /* @__PURE__ */ __name((mod, isNodeMode, target) => (target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
149452
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
149453
|
+
// file that has been converted to a CommonJS file using a Babel-
|
149454
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
149455
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
149456
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", { value: mod, enumerable: true }) : target,
|
149457
|
+
mod
|
149458
|
+
)), "__toESM");
|
149459
|
+
var __toCommonJS2 = /* @__PURE__ */ __name((mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod), "__toCommonJS");
|
149460
|
+
var node_path_exports = {};
|
149461
|
+
__export2(node_path_exports, {
|
149462
|
+
compatibilityDate: () => compatibilityDate,
|
149463
|
+
default: () => node_path_default,
|
149464
|
+
version: () => version4
|
149465
|
+
});
|
149466
|
+
module3.exports = __toCommonJS2(node_path_exports);
|
149467
|
+
var import_fs16 = __toESM2(require("fs"));
|
149468
|
+
var import_os4 = __toESM2(require("os"));
|
149469
|
+
var import_path20 = __toESM2(require("path"));
|
149470
|
+
var knownPackages = {
|
149471
|
+
"darwin arm64 LE": "@cloudflare/workerd-darwin-arm64",
|
149472
|
+
"darwin x64 LE": "@cloudflare/workerd-darwin-64",
|
149473
|
+
"linux arm64 LE": "@cloudflare/workerd-linux-arm64",
|
149474
|
+
"linux x64 LE": "@cloudflare/workerd-linux-64",
|
149475
|
+
"win32 x64 LE": "@cloudflare/workerd-windows-64"
|
149476
|
+
};
|
149477
|
+
var maybeExeExtension = process.platform === "win32" ? ".exe" : "";
|
149478
|
+
function pkgAndSubpathForCurrentPlatform() {
|
149479
|
+
let pkg;
|
149480
|
+
let subpath;
|
149481
|
+
let platformKey = `${process.platform} ${import_os4.default.arch()} ${import_os4.default.endianness()}`;
|
149482
|
+
if (platformKey in knownPackages) {
|
149483
|
+
pkg = knownPackages[platformKey];
|
149484
|
+
subpath = `bin/workerd${maybeExeExtension}`;
|
149485
|
+
} else {
|
149486
|
+
throw new Error(`Unsupported platform: ${platformKey}`);
|
149487
|
+
}
|
149488
|
+
return { pkg, subpath };
|
149489
|
+
}
|
149490
|
+
__name(pkgAndSubpathForCurrentPlatform, "pkgAndSubpathForCurrentPlatform");
|
149491
|
+
function pkgForSomeOtherPlatform() {
|
149492
|
+
const libMain = require.resolve("workerd");
|
149493
|
+
const nodeModulesDirectory = import_path20.default.dirname(
|
149494
|
+
import_path20.default.dirname(import_path20.default.dirname(libMain))
|
149495
|
+
);
|
149496
|
+
if (import_path20.default.basename(nodeModulesDirectory) === "node_modules") {
|
149497
|
+
for (const unixKey in knownPackages) {
|
149498
|
+
try {
|
149499
|
+
const pkg = knownPackages[unixKey];
|
149500
|
+
if (import_fs16.default.existsSync(import_path20.default.join(nodeModulesDirectory, pkg)))
|
149501
|
+
return pkg;
|
149502
|
+
} catch {
|
149503
|
+
}
|
149504
|
+
}
|
149505
|
+
}
|
149506
|
+
return null;
|
149507
|
+
}
|
149508
|
+
__name(pkgForSomeOtherPlatform, "pkgForSomeOtherPlatform");
|
149509
|
+
function downloadedBinPath(pkg, subpath) {
|
149510
|
+
const libDir = import_path20.default.dirname(require.resolve("workerd"));
|
149511
|
+
return import_path20.default.join(libDir, `downloaded-${pkg.replace("/", "-")}-${import_path20.default.basename(subpath)}${maybeExeExtension}`);
|
149512
|
+
}
|
149513
|
+
__name(downloadedBinPath, "downloadedBinPath");
|
149514
|
+
function generateBinPath() {
|
149515
|
+
const { pkg, subpath } = pkgAndSubpathForCurrentPlatform();
|
149516
|
+
let binPath2;
|
149517
|
+
try {
|
149518
|
+
binPath2 = require.resolve(`${pkg}/${subpath}`);
|
149519
|
+
} catch (e3) {
|
149520
|
+
binPath2 = downloadedBinPath(pkg, subpath);
|
149521
|
+
if (!import_fs16.default.existsSync(binPath2)) {
|
149522
|
+
try {
|
149523
|
+
require.resolve(pkg);
|
149524
|
+
} catch {
|
149525
|
+
const otherPkg = pkgForSomeOtherPlatform();
|
149526
|
+
if (otherPkg) {
|
149527
|
+
throw new Error(`
|
149528
|
+
You installed workerd on another platform than the one you're currently using.
|
149529
|
+
This won't work because workerd is written with native code and needs to
|
149530
|
+
install a platform-specific binary executable.
|
149531
|
+
|
149532
|
+
Specifically the "${otherPkg}" package is present but this platform
|
149533
|
+
needs the "${pkg}" package instead. People often get into this
|
149534
|
+
situation by installing workerd on macOS and copying "node_modules"
|
149535
|
+
into a Docker image that runs Linux.
|
149536
|
+
|
149537
|
+
If you are installing with npm, you can try not copying the "node_modules"
|
149538
|
+
directory when you copy the files over, and running "npm ci" or "npm install"
|
149539
|
+
on the destination platform after the copy. Or you could consider using yarn
|
149540
|
+
instead which has built-in support for installing a package on multiple
|
149541
|
+
platforms simultaneously.
|
149542
|
+
|
149543
|
+
If you are installing with yarn, you can try listing both this platform and the
|
149544
|
+
other platform in your ".yarnrc.yml" file using the "supportedArchitectures"
|
149545
|
+
feature: https://yarnpkg.com/configuration/yarnrc/#supportedArchitectures
|
149546
|
+
Keep in mind that this means multiple copies of workerd will be present.
|
149547
|
+
`);
|
149548
|
+
}
|
149549
|
+
throw new Error(`The package "${pkg}" could not be found, and is needed by workerd.
|
149550
|
+
|
149551
|
+
If you are installing workerd with npm, make sure that you don't specify the
|
149552
|
+
"--no-optional" flag. The "optionalDependencies" package.json feature is used
|
149553
|
+
by workerd to install the correct binary executable for your current platform.`);
|
149554
|
+
}
|
149555
|
+
throw e3;
|
149556
|
+
}
|
149557
|
+
}
|
149558
|
+
let pnpapi;
|
149559
|
+
try {
|
149560
|
+
pnpapi = require("pnpapi");
|
149561
|
+
} catch (e3) {
|
149562
|
+
}
|
149563
|
+
if (pnpapi) {
|
149564
|
+
const root = pnpapi.getPackageInformation(pnpapi.topLevel).packageLocation;
|
149565
|
+
const binTargetPath = import_path20.default.join(
|
149566
|
+
root,
|
149567
|
+
"node_modules",
|
149568
|
+
".cache",
|
149569
|
+
"workerd",
|
149570
|
+
`pnpapi-${pkg.replace("/", "-")}-${"1.20240909.0"}-${import_path20.default.basename(subpath)}`
|
149571
|
+
);
|
149572
|
+
if (!import_fs16.default.existsSync(binTargetPath)) {
|
149573
|
+
import_fs16.default.mkdirSync(import_path20.default.dirname(binTargetPath), { recursive: true });
|
149574
|
+
import_fs16.default.copyFileSync(binPath2, binTargetPath);
|
149575
|
+
import_fs16.default.chmodSync(binTargetPath, 493);
|
149576
|
+
}
|
149577
|
+
return { binPath: binTargetPath };
|
149578
|
+
}
|
149579
|
+
return { binPath: binPath2 };
|
149580
|
+
}
|
149581
|
+
__name(generateBinPath, "generateBinPath");
|
149582
|
+
var { binPath } = generateBinPath();
|
149583
|
+
var node_path_default = binPath;
|
149584
|
+
var compatibilityDate = "2024-09-09";
|
149585
|
+
var version4 = "1.20240909.0";
|
149586
|
+
}
|
149587
|
+
});
|
149588
|
+
|
149429
149589
|
// src/cli.ts
|
149430
149590
|
var cli_exports2 = {};
|
149431
149591
|
__export(cli_exports2, {
|
@@ -152153,10 +152313,10 @@ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
|
|
152153
152313
|
return 3;
|
152154
152314
|
}
|
152155
152315
|
if ("TERM_PROGRAM" in env2) {
|
152156
|
-
const
|
152316
|
+
const version4 = Number.parseInt((env2.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
|
152157
152317
|
switch (env2.TERM_PROGRAM) {
|
152158
152318
|
case "iTerm.app": {
|
152159
|
-
return
|
152319
|
+
return version4 >= 3 ? 3 : 2;
|
152160
152320
|
}
|
152161
152321
|
case "Apple_Terminal": {
|
152162
152322
|
return 2;
|
@@ -152716,7 +152876,7 @@ init_import_meta_url();
|
|
152716
152876
|
init_import_meta_url();
|
152717
152877
|
|
152718
152878
|
// package.json
|
152719
|
-
var version = "3.78.
|
152879
|
+
var version = "3.78.3";
|
152720
152880
|
var package_default = {
|
152721
152881
|
name: "wrangler",
|
152722
152882
|
version,
|
@@ -152798,7 +152958,7 @@ var package_default = {
|
|
152798
152958
|
esbuild: "0.17.19",
|
152799
152959
|
miniflare: "workspace:*",
|
152800
152960
|
nanoid: "^3.3.3",
|
152801
|
-
"path-to-regexp": "^6.
|
152961
|
+
"path-to-regexp": "^6.3.0",
|
152802
152962
|
resolve: "^1.22.8",
|
152803
152963
|
"resolve.exports": "^2.0.2",
|
152804
152964
|
selfsigned: "^2.0.1",
|
@@ -162587,11 +162747,11 @@ var datetimeRegex = /* @__PURE__ */ __name((args) => {
|
|
162587
162747
|
}
|
162588
162748
|
}
|
162589
162749
|
}, "datetimeRegex");
|
162590
|
-
function isValidIP(ip2,
|
162591
|
-
if ((
|
162750
|
+
function isValidIP(ip2, version4) {
|
162751
|
+
if ((version4 === "v4" || !version4) && ipv4Regex.test(ip2)) {
|
162592
162752
|
return true;
|
162593
162753
|
}
|
162594
|
-
if ((
|
162754
|
+
if ((version4 === "v6" || !version4) && ipv6Regex.test(ip2)) {
|
162595
162755
|
return true;
|
162596
162756
|
}
|
162597
162757
|
return false;
|
@@ -169567,11 +169727,11 @@ async function fetchVersion(accountId, workerName, versionId, versionCache) {
|
|
169567
169727
|
if (cachedVersion) {
|
169568
169728
|
return cachedVersion;
|
169569
169729
|
}
|
169570
|
-
const
|
169730
|
+
const version4 = await fetchResult(
|
169571
169731
|
`/accounts/${accountId}/workers/scripts/${workerName}/versions/${versionId}`
|
169572
169732
|
);
|
169573
|
-
versionCache?.set(
|
169574
|
-
return
|
169733
|
+
versionCache?.set(version4.id, version4);
|
169734
|
+
return version4;
|
169575
169735
|
}
|
169576
169736
|
__name(fetchVersion, "fetchVersion");
|
169577
169737
|
async function fetchVersions(accountId, workerName, versionCache, ...versionIds) {
|
@@ -169612,8 +169772,8 @@ async function fetchDeployableVersions(accountId, workerName, versionCache) {
|
|
169612
169772
|
const { items: versions } = await fetchResult(
|
169613
169773
|
`/accounts/${accountId}/workers/scripts/${workerName}/versions?deployable=true`
|
169614
169774
|
);
|
169615
|
-
for (const
|
169616
|
-
versionCache.set(
|
169775
|
+
for (const version4 of versions) {
|
169776
|
+
versionCache.set(version4.id, version4);
|
169617
169777
|
}
|
169618
169778
|
return versions;
|
169619
169779
|
}
|
@@ -171628,13 +171788,13 @@ function printVersions(versions, traffic) {
|
|
171628
171788
|
}
|
171629
171789
|
__name(printVersions, "printVersions");
|
171630
171790
|
function formatVersions(versions, traffic) {
|
171631
|
-
return versions.map((
|
171632
|
-
const trafficString = brandColor(`(${traffic.get(
|
171633
|
-
const versionIdString = white(
|
171791
|
+
return versions.map((version4) => {
|
171792
|
+
const trafficString = brandColor(`(${traffic.get(version4.id)}%)`);
|
171793
|
+
const versionIdString = white(version4.id);
|
171634
171794
|
return gray(`${trafficString} ${versionIdString}
|
171635
|
-
Created: ${
|
171636
|
-
Tag: ${
|
171637
|
-
Message: ${
|
171795
|
+
Created: ${version4.metadata.created_on}
|
171796
|
+
Tag: ${version4.annotations?.["workers/tag"] ?? BLANK_INPUT}
|
171797
|
+
Message: ${version4.annotations?.["workers/message"] ?? BLANK_INPUT}`);
|
171638
171798
|
}).join("\n\n");
|
171639
171799
|
}
|
171640
171800
|
__name(formatVersions, "formatVersions");
|
@@ -171659,13 +171819,13 @@ async function promptVersionsToDeploy(accountId, workerName, defaultSelectedVers
|
|
171659
171819
|
const result = await inputPrompt({
|
171660
171820
|
type: "multiselect",
|
171661
171821
|
question,
|
171662
|
-
options: selectableVersions.map((
|
171663
|
-
value:
|
171664
|
-
label:
|
171822
|
+
options: selectableVersions.map((version4) => ({
|
171823
|
+
value: version4.id,
|
171824
|
+
label: version4.id,
|
171665
171825
|
sublabel: gray(`
|
171666
|
-
${ZERO_WIDTH_SPACE} Created: ${
|
171667
|
-
${ZERO_WIDTH_SPACE} Tag: ${
|
171668
|
-
${ZERO_WIDTH_SPACE} Message: ${
|
171826
|
+
${ZERO_WIDTH_SPACE} Created: ${version4.metadata.created_on}
|
171827
|
+
${ZERO_WIDTH_SPACE} Tag: ${version4.annotations?.["workers/tag"] ?? BLANK_INPUT}
|
171828
|
+
${ZERO_WIDTH_SPACE} Message: ${version4.annotations?.["workers/message"] ?? BLANK_INPUT}
|
171669
171829
|
`)
|
171670
171830
|
})),
|
171671
171831
|
label: "",
|
@@ -171684,18 +171844,18 @@ ${ZERO_WIDTH_SPACE} Message: ${version3.annotations?.["workers/message"]
|
|
171684
171844
|
`${versionIds.length} Worker Version(s) selected`
|
171685
171845
|
);
|
171686
171846
|
const versions = versionIds?.map((versionId, i) => {
|
171687
|
-
const
|
171688
|
-
(0, import_assert2.default)(
|
171847
|
+
const version4 = versionCache.get(versionId);
|
171848
|
+
(0, import_assert2.default)(version4);
|
171689
171849
|
return `${grayBar}
|
171690
|
-
${leftT} ${white(` Worker Version ${i + 1}: `,
|
171691
|
-
${grayBar} ${gray(" Created: ",
|
171850
|
+
${leftT} ${white(` Worker Version ${i + 1}: `, version4.id)}
|
171851
|
+
${grayBar} ${gray(" Created: ", version4.metadata.created_on)}
|
171692
171852
|
${grayBar} ${gray(
|
171693
171853
|
" Tag: ",
|
171694
|
-
|
171854
|
+
version4.annotations?.["workers/tag"] ?? BLANK_INPUT
|
171695
171855
|
)}
|
171696
171856
|
${grayBar} ${gray(
|
171697
171857
|
" Message: ",
|
171698
|
-
|
171858
|
+
version4.annotations?.["workers/message"] ?? BLANK_INPUT
|
171699
171859
|
)}`;
|
171700
171860
|
});
|
171701
171861
|
return [
|
@@ -178255,16 +178415,16 @@ function usage(yargs, shim3) {
|
|
178255
178415
|
}
|
178256
178416
|
}
|
178257
178417
|
__name(windowWidth, "windowWidth");
|
178258
|
-
let
|
178418
|
+
let version4 = null;
|
178259
178419
|
self2.version = (ver) => {
|
178260
|
-
|
178420
|
+
version4 = ver;
|
178261
178421
|
};
|
178262
178422
|
self2.showVersion = (level) => {
|
178263
178423
|
const logger3 = yargs.getInternalMethods().getLoggerInstance();
|
178264
178424
|
if (!level)
|
178265
178425
|
level = "error";
|
178266
178426
|
const emit = typeof level === "function" ? level : logger3[level];
|
178267
|
-
emit(
|
178427
|
+
emit(version4);
|
178268
178428
|
};
|
178269
178429
|
self2.reset = /* @__PURE__ */ __name(function reset(localLookup) {
|
178270
178430
|
failMessage = null;
|
@@ -190707,20 +190867,20 @@ async function deployments(accountId, scriptName, { send_metrics: sendMetrics }
|
|
190707
190867
|
const triggerStr = versions.annotations?.["workers/triggered_by"] ? `${formatTrigger(
|
190708
190868
|
versions.annotations["workers/triggered_by"]
|
190709
190869
|
)} from ${formatSource(versions.metadata.source)}` : `${formatSource(versions.metadata.source)}`;
|
190710
|
-
let
|
190870
|
+
let version4 = `
|
190711
190871
|
Version ID: ${versions.id}
|
190712
190872
|
Created on: ${versions.metadata.created_on}
|
190713
190873
|
Author: ${versions.metadata.author_email}
|
190714
190874
|
Source: ${triggerStr}`;
|
190715
190875
|
if (versions.annotations?.["workers/rollback_from"]) {
|
190716
|
-
|
190876
|
+
version4 += `
|
190717
190877
|
Rollback from: ${versions.annotations["workers/rollback_from"]}`;
|
190718
190878
|
}
|
190719
190879
|
if (versions.annotations?.["workers/message"]) {
|
190720
|
-
|
190880
|
+
version4 += `
|
190721
190881
|
Message: ${versions.annotations["workers/message"]}`;
|
190722
190882
|
}
|
190723
|
-
return
|
190883
|
+
return version4 + `
|
190724
190884
|
`;
|
190725
190885
|
});
|
190726
190886
|
versionMessages[versionMessages.length - 1] += "\u{1F7E9} Active";
|
@@ -190868,7 +191028,7 @@ Compatibility Date: ${deploymentDetails.resources.script_runtime?.compatibility
|
|
190868
191028
|
const compatFlagsStr = deploymentDetails.resources.script_runtime?.compatibility_flags ? `
|
190869
191029
|
Compatibility Flags: ${deploymentDetails.resources.script_runtime?.compatibility_flags}` : ``;
|
190870
191030
|
const bindings = deploymentDetails.resources.bindings;
|
190871
|
-
const
|
191031
|
+
const version4 = `
|
190872
191032
|
Version ID: ${deploymentDetails.id}
|
190873
191033
|
Created on: ${deploymentDetails.metadata.created_on}
|
190874
191034
|
Author: ${deploymentDetails.metadata.author_email}
|
@@ -190880,7 +191040,7 @@ Handlers: ${deploymentDetails.resources.script.handlers}${compatDateS
|
|
190880
191040
|
--------------------------bindings--------------------------
|
190881
191041
|
${bindings.length > 0 ? import_toml5.default.stringify(await mapBindings(accountId, bindings)) : `None`}
|
190882
191042
|
`;
|
190883
|
-
logger.log(
|
191043
|
+
logger.log(version4);
|
190884
191044
|
}
|
190885
191045
|
__name(viewDeployment, "viewDeployment");
|
190886
191046
|
async function commonDeploymentCMDSetup(yargs) {
|
@@ -202463,8 +202623,8 @@ function getSdkMetadataForEnvelopeHeader(metadataOrEvent) {
|
|
202463
202623
|
if (!metadataOrEvent || !metadataOrEvent.sdk) {
|
202464
202624
|
return;
|
202465
202625
|
}
|
202466
|
-
const { name, version:
|
202467
|
-
return { name, version:
|
202626
|
+
const { name, version: version4 } = metadataOrEvent.sdk;
|
202627
|
+
return { name, version: version4 };
|
202468
202628
|
}
|
202469
202629
|
__name(getSdkMetadataForEnvelopeHeader, "getSdkMetadataForEnvelopeHeader");
|
202470
202630
|
function createEventEnvelopeHeaders(event, sdkInfo, tunnel, dsn) {
|
@@ -203360,8 +203520,8 @@ var Hub = class {
|
|
203360
203520
|
/**
|
203361
203521
|
* @inheritDoc
|
203362
203522
|
*/
|
203363
|
-
isOlderThan(
|
203364
|
-
return this._version <
|
203523
|
+
isOlderThan(version4) {
|
203524
|
+
return this._version < version4;
|
203365
203525
|
}
|
203366
203526
|
/**
|
203367
203527
|
* @inheritDoc
|
@@ -209811,6 +209971,7 @@ init_import_meta_url();
|
|
209811
209971
|
var import_fs14 = require("fs");
|
209812
209972
|
var import_promises26 = require("fs/promises");
|
209813
209973
|
var import_miniflare18 = require("miniflare");
|
209974
|
+
var import_workerd = __toESM(require_main5());
|
209814
209975
|
var DEFAULT_OUTFILE_RELATIVE_PATH = "./.wrangler/types/runtime.d.ts";
|
209815
209976
|
async function generateRuntimeTypes({
|
209816
209977
|
config: { compatibility_date, compatibility_flags = [] },
|
@@ -209820,6 +209981,18 @@ async function generateRuntimeTypes({
|
|
209820
209981
|
throw new Error("Config must have a compatibility date.");
|
209821
209982
|
}
|
209822
209983
|
await ensureDirectoryExists(outFile);
|
209984
|
+
const header = `// Runtime types generated with workerd@${import_workerd.version} ${compatibility_date} ${compatibility_flags.join(",")}`;
|
209985
|
+
try {
|
209986
|
+
const existingTypes = await (0, import_promises26.readFile)(outFile, "utf8");
|
209987
|
+
if (existingTypes.split("\n")[0] === header) {
|
209988
|
+
logger.debug("Using cached runtime types: ", header);
|
209989
|
+
return { outFile };
|
209990
|
+
}
|
209991
|
+
} catch (e3) {
|
209992
|
+
if (e3.code !== "ENOENT") {
|
209993
|
+
throw e3;
|
209994
|
+
}
|
209995
|
+
}
|
209823
209996
|
const types = await generate({
|
209824
209997
|
compatibilityDate: compatibility_date,
|
209825
209998
|
// Ignore nodejs compat flags as there is currently no mechanism to generate these dynamically.
|
@@ -209827,7 +210000,8 @@ async function generateRuntimeTypes({
|
|
209827
210000
|
(flag) => !flag.includes("nodejs_compat")
|
209828
210001
|
)
|
209829
210002
|
});
|
209830
|
-
await (0, import_promises26.writeFile)(outFile,
|
210003
|
+
await (0, import_promises26.writeFile)(outFile, `${header}
|
210004
|
+
${types}`, "utf8");
|
209831
210005
|
return {
|
209832
210006
|
outFile
|
209833
210007
|
};
|
@@ -210260,8 +210434,7 @@ ${modulesTypeStructure.join("\n")}`;
|
|
210260
210434
|
fs25.writeFileSync(
|
210261
210435
|
path74,
|
210262
210436
|
[
|
210263
|
-
`// Generated by Wrangler
|
210264
|
-
`// by running \`${wranglerCommandUsed}\``,
|
210437
|
+
`// Generated by Wrangler by running \`${wranglerCommandUsed}\``,
|
210265
210438
|
"",
|
210266
210439
|
combinedTypeStrings
|
210267
210440
|
].join("\n")
|
@@ -211361,14 +211534,14 @@ async function versionsListHandler(args) {
|
|
211361
211534
|
logRaw(JSON.stringify(versions, null, 2));
|
211362
211535
|
return;
|
211363
211536
|
}
|
211364
|
-
for (const
|
211537
|
+
for (const version4 of versions) {
|
211365
211538
|
const formattedVersion = formatLabelledValues({
|
211366
|
-
"Version ID":
|
211367
|
-
Created: new Date(
|
211368
|
-
Author:
|
211369
|
-
Source: getVersionSource(
|
211370
|
-
Tag:
|
211371
|
-
Message:
|
211539
|
+
"Version ID": version4.id,
|
211540
|
+
Created: new Date(version4.metadata["created_on"]).toISOString(),
|
211541
|
+
Author: version4.metadata.author_email,
|
211542
|
+
Source: getVersionSource(version4),
|
211543
|
+
Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT2,
|
211544
|
+
Message: version4.annotations?.["workers/message"] || BLANK_INPUT2
|
211372
211545
|
});
|
211373
211546
|
logRaw(formattedVersion);
|
211374
211547
|
logRaw(``);
|
@@ -211381,8 +211554,8 @@ function getConfig3(args) {
|
|
211381
211554
|
return config;
|
211382
211555
|
}
|
211383
211556
|
__name(getConfig3, "getConfig");
|
211384
|
-
function getVersionSource(
|
211385
|
-
return
|
211557
|
+
function getVersionSource(version4) {
|
211558
|
+
return version4.annotations?.["workers/triggered_by"] === void 0 ? formatSource2(version4.metadata.source) : formatTrigger2(version4.annotations["workers/triggered_by"]);
|
211386
211559
|
}
|
211387
211560
|
__name(getVersionSource, "getVersionSource");
|
211388
211561
|
function formatSource2(source) {
|
@@ -211649,11 +211822,11 @@ async function versionsSecretListHandler(args) {
|
|
211649
211822
|
versionCache
|
211650
211823
|
);
|
211651
211824
|
}
|
211652
|
-
for (const
|
211825
|
+
for (const version4 of versions) {
|
211653
211826
|
logger.log(
|
211654
|
-
`-- Version ${
|
211827
|
+
`-- Version ${version4.id} (${rollout.get(version4.id)}%) secrets --`
|
211655
211828
|
);
|
211656
|
-
const secrets =
|
211829
|
+
const secrets = version4.resources.bindings.filter(
|
211657
211830
|
(binding) => binding.type === "secret_text"
|
211658
211831
|
);
|
211659
211832
|
for (const secret3 of secrets) {
|
@@ -212360,33 +212533,33 @@ async function versionsViewHandler(args) {
|
|
212360
212533
|
'You need to provide a name of your worker. Either pass it as a cli arg with `--name <name>` or in your config file as `name = "<name>"`'
|
212361
212534
|
);
|
212362
212535
|
}
|
212363
|
-
const
|
212536
|
+
const version4 = await fetchVersion(accountId, workerName, args.versionId);
|
212364
212537
|
if (args.json) {
|
212365
|
-
logRaw(JSON.stringify(
|
212538
|
+
logRaw(JSON.stringify(version4, null, 2));
|
212366
212539
|
return;
|
212367
212540
|
}
|
212368
212541
|
logRaw(
|
212369
212542
|
formatLabelledValues({
|
212370
|
-
"Version ID":
|
212371
|
-
Created: new Date(
|
212372
|
-
Author:
|
212373
|
-
Source: getVersionSource(
|
212374
|
-
Tag:
|
212375
|
-
Message:
|
212543
|
+
"Version ID": version4.id,
|
212544
|
+
Created: new Date(version4.metadata["created_on"]).toISOString(),
|
212545
|
+
Author: version4.metadata.author_email,
|
212546
|
+
Source: getVersionSource(version4),
|
212547
|
+
Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT3,
|
212548
|
+
Message: version4.annotations?.["workers/message"] || BLANK_INPUT3
|
212376
212549
|
})
|
212377
212550
|
);
|
212378
212551
|
logRaw("------------------------------------------------------------");
|
212379
212552
|
const scriptInfo = {
|
212380
|
-
Handlers:
|
212553
|
+
Handlers: version4.resources.script.handlers.join(", ")
|
212381
212554
|
};
|
212382
|
-
if (
|
212383
|
-
scriptInfo["Compatibility Date"] =
|
212555
|
+
if (version4.resources.script_runtime.compatibility_date) {
|
212556
|
+
scriptInfo["Compatibility Date"] = version4.resources.script_runtime.compatibility_date;
|
212384
212557
|
}
|
212385
|
-
if (
|
212386
|
-
scriptInfo["Compatibility Flags"] =
|
212558
|
+
if (version4.resources.script_runtime.compatibility_flags) {
|
212559
|
+
scriptInfo["Compatibility Flags"] = version4.resources.script_runtime.compatibility_flags.join(", ");
|
212387
212560
|
}
|
212388
212561
|
logRaw(formatLabelledValues(scriptInfo));
|
212389
|
-
const secrets =
|
212562
|
+
const secrets = version4.resources.bindings.filter(
|
212390
212563
|
(binding) => binding.type === "secret_text"
|
212391
212564
|
);
|
212392
212565
|
if (secrets.length > 0) {
|
@@ -212399,7 +212572,7 @@ async function versionsViewHandler(args) {
|
|
212399
212572
|
);
|
212400
212573
|
}
|
212401
212574
|
}
|
212402
|
-
const bindings =
|
212575
|
+
const bindings = version4.resources.bindings.filter(
|
212403
212576
|
(binding) => binding.type !== "secret_text"
|
212404
212577
|
);
|
212405
212578
|
if (bindings.length > 0) {
|
@@ -212795,14 +212968,14 @@ async function versionsDeploymentsListHandler(args) {
|
|
212795
212968
|
await fetchVersions(accountId, workerName, versionCache, ...versionIds);
|
212796
212969
|
const formattedDeployments = deployments2.map((deployment) => {
|
212797
212970
|
const formattedVersions = deployment.versions.map((traffic) => {
|
212798
|
-
const
|
212799
|
-
(0, import_assert4.default)(
|
212971
|
+
const version4 = versionCache.get(traffic.version_id);
|
212972
|
+
(0, import_assert4.default)(version4);
|
212800
212973
|
const percentage = brandColor(`(${traffic.percentage}%)`);
|
212801
212974
|
const details = formatLabelledValues(
|
212802
212975
|
{
|
212803
|
-
Created: new Date(
|
212804
|
-
Tag:
|
212805
|
-
Message:
|
212976
|
+
Created: new Date(version4.metadata["created_on"]).toISOString(),
|
212977
|
+
Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT4,
|
212978
|
+
Message: version4.annotations?.["workers/message"] || BLANK_INPUT4
|
212806
212979
|
},
|
212807
212980
|
{
|
212808
212981
|
indentationCount: 4,
|
@@ -212811,7 +212984,7 @@ async function versionsDeploymentsListHandler(args) {
|
|
212811
212984
|
formatValue: (value) => gray(value)
|
212812
212985
|
}
|
212813
212986
|
);
|
212814
|
-
return `${percentage} ${
|
212987
|
+
return `${percentage} ${version4.id}
|
212815
212988
|
${details}`;
|
212816
212989
|
});
|
212817
212990
|
return formatLabelledValues({
|
@@ -212881,14 +213054,14 @@ async function versionsDeploymentsStatusHandler(args) {
|
|
212881
213054
|
const versionIds = latestDeployment.versions.map((v2) => v2.version_id);
|
212882
213055
|
await fetchVersions(accountId, workerName, versionCache, ...versionIds);
|
212883
213056
|
const formattedVersions = latestDeployment.versions.map((traffic) => {
|
212884
|
-
const
|
212885
|
-
(0, import_assert5.default)(
|
213057
|
+
const version4 = versionCache.get(traffic.version_id);
|
213058
|
+
(0, import_assert5.default)(version4);
|
212886
213059
|
const percentage = brandColor(`(${traffic.percentage}%)`);
|
212887
213060
|
const details = formatLabelledValues(
|
212888
213061
|
{
|
212889
|
-
Created: new Date(
|
212890
|
-
Tag:
|
212891
|
-
Message:
|
213062
|
+
Created: new Date(version4.metadata["created_on"]).toISOString(),
|
213063
|
+
Tag: version4.annotations?.["workers/tag"] || BLANK_INPUT5,
|
213064
|
+
Message: version4.annotations?.["workers/message"] || BLANK_INPUT5
|
212892
213065
|
},
|
212893
213066
|
{
|
212894
213067
|
indentationCount: 4,
|
@@ -212897,7 +213070,7 @@ async function versionsDeploymentsStatusHandler(args) {
|
|
212897
213070
|
formatValue: (value) => gray(value)
|
212898
213071
|
}
|
212899
213072
|
);
|
212900
|
-
return `${percentage} ${
|
213073
|
+
return `${percentage} ${version4.id}
|
212901
213074
|
${details}`;
|
212902
213075
|
});
|
212903
213076
|
const formattedDeployment = formatLabelledValues({
|
@@ -213015,7 +213188,7 @@ async function versionsRollbackHandler(args) {
|
|
213015
213188
|
defaultValue: args.message ?? "Rollback"
|
213016
213189
|
}
|
213017
213190
|
);
|
213018
|
-
const
|
213191
|
+
const version4 = await fetchVersion(accountId, workerName, versionId);
|
213019
213192
|
warn(
|
213020
213193
|
`You are about to rollback to Worker Version ${versionId}.
|
213021
213194
|
This will immediately replace the current deployment and become the active deployment across all your deployed triggers.
|
@@ -213024,7 +213197,7 @@ Rolling back to a previous deployment will not rollback any of the bound resourc
|
|
213024
213197
|
{ multiline: true, shape: shapes.leftT }
|
213025
213198
|
);
|
213026
213199
|
const rollbackTraffic = /* @__PURE__ */ new Map([[versionId, 100]]);
|
213027
|
-
printVersions([
|
213200
|
+
printVersions([version4], rollbackTraffic);
|
213028
213201
|
const confirmed = await confirm(
|
213029
213202
|
"Are you sure you want to deploy this Worker Version to 100% of traffic?",
|
213030
213203
|
{ defaultValue: true }
|