wrangler 4.25.0 → 4.25.1
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 -6
- package/wrangler-dist/cli.d.ts +6 -5
- package/wrangler-dist/cli.js +635 -1251
- package/wrangler-dist/metafile-cjs.json +1 -1
package/wrangler-dist/cli.js
CHANGED
@@ -23777,193 +23777,6 @@ var init_colors = __esm({
|
|
23777
23777
|
}
|
23778
23778
|
});
|
23779
23779
|
|
23780
|
-
// ../../node_modules/.pnpm/@webcontainer+env@1.1.0/node_modules/@webcontainer/env/dist/index.js
|
23781
|
-
var require_dist = __commonJS({
|
23782
|
-
"../../node_modules/.pnpm/@webcontainer+env@1.1.0/node_modules/@webcontainer/env/dist/index.js"(exports2, module3) {
|
23783
|
-
init_import_meta_url();
|
23784
|
-
var c6 = Object.defineProperty;
|
23785
|
-
var g6 = Object.getOwnPropertyDescriptor;
|
23786
|
-
var y4 = Object.getOwnPropertyNames;
|
23787
|
-
var d6 = Object.prototype.hasOwnProperty;
|
23788
|
-
var a5 = /* @__PURE__ */ __name((e7, t7) => c6(e7, "name", { value: t7, configurable: true }), "a");
|
23789
|
-
var b6 = /* @__PURE__ */ __name((e7, t7) => {
|
23790
|
-
for (var o5 in t7) c6(e7, o5, { get: t7[o5], enumerable: true });
|
23791
|
-
}, "b");
|
23792
|
-
var P3 = /* @__PURE__ */ __name((e7, t7, o5, u5) => {
|
23793
|
-
if (t7 && typeof t7 == "object" || typeof t7 == "function") for (let s5 of y4(t7)) !d6.call(e7, s5) && s5 !== o5 && c6(e7, s5, { get: /* @__PURE__ */ __name(() => t7[s5], "get"), enumerable: !(u5 = g6(t7, s5)) || u5.enumerable });
|
23794
|
-
return e7;
|
23795
|
-
}, "P");
|
23796
|
-
var U3 = /* @__PURE__ */ __name((e7) => P3(c6({}, "__esModule", { value: true }), e7), "U");
|
23797
|
-
var x6 = {};
|
23798
|
-
b6(x6, { HostURL: /* @__PURE__ */ __name(() => n6, "HostURL"), isWebContainer: /* @__PURE__ */ __name(() => h6, "isWebContainer") });
|
23799
|
-
module3.exports = U3(x6);
|
23800
|
-
var r7;
|
23801
|
-
try {
|
23802
|
-
r7 = require("@blitz/internal/env");
|
23803
|
-
} catch (e7) {
|
23804
|
-
}
|
23805
|
-
function h6() {
|
23806
|
-
return r7 != null && process.versions.webcontainer != null;
|
23807
|
-
}
|
23808
|
-
__name(h6, "h");
|
23809
|
-
a5(h6, "isWebContainer");
|
23810
|
-
function p6(e7) {
|
23811
|
-
let t7 = r7 == null ? void 0 : r7.createServiceHostname(e7);
|
23812
|
-
if (!t7) throw new Error("Failed to construct service hostname");
|
23813
|
-
return t7;
|
23814
|
-
}
|
23815
|
-
__name(p6, "p");
|
23816
|
-
a5(p6, "_createServiceHostname");
|
23817
|
-
function f6(e7) {
|
23818
|
-
return r7 == null ? void 0 : r7.isServiceUrl(e7);
|
23819
|
-
}
|
23820
|
-
__name(f6, "f");
|
23821
|
-
a5(f6, "_isServiceUrl");
|
23822
|
-
function l6(e7) {
|
23823
|
-
return r7 == null ? void 0 : r7.isLocalhost(e7);
|
23824
|
-
}
|
23825
|
-
__name(l6, "l");
|
23826
|
-
a5(l6, "_isLocalhost");
|
23827
|
-
var n6 = class {
|
23828
|
-
static {
|
23829
|
-
__name(this, "n");
|
23830
|
-
}
|
23831
|
-
constructor(t7) {
|
23832
|
-
this._url = t7;
|
23833
|
-
if (this._port = this._url.port, h6() && l6(this._url.hostname)) {
|
23834
|
-
let o5 = p6(this._port);
|
23835
|
-
this._url.host = o5, this._port === this._url.port && (this._url.port = "");
|
23836
|
-
}
|
23837
|
-
}
|
23838
|
-
static parse(t7) {
|
23839
|
-
return t7 = typeof t7 == "string" ? new URL(t7) : t7, new n6(t7);
|
23840
|
-
}
|
23841
|
-
get port() {
|
23842
|
-
return h6() ? this._port : this._url.port;
|
23843
|
-
}
|
23844
|
-
get hash() {
|
23845
|
-
return this._url.hash;
|
23846
|
-
}
|
23847
|
-
get host() {
|
23848
|
-
return this._url.host;
|
23849
|
-
}
|
23850
|
-
get hostname() {
|
23851
|
-
return this._url.hostname;
|
23852
|
-
}
|
23853
|
-
get href() {
|
23854
|
-
return this._url.href;
|
23855
|
-
}
|
23856
|
-
get origin() {
|
23857
|
-
return this._url.origin;
|
23858
|
-
}
|
23859
|
-
get username() {
|
23860
|
-
return this._url.username;
|
23861
|
-
}
|
23862
|
-
get password() {
|
23863
|
-
return this._url.password;
|
23864
|
-
}
|
23865
|
-
get pathname() {
|
23866
|
-
return this._url.pathname;
|
23867
|
-
}
|
23868
|
-
get protocol() {
|
23869
|
-
return this._url.protocol;
|
23870
|
-
}
|
23871
|
-
get search() {
|
23872
|
-
return this._url.search;
|
23873
|
-
}
|
23874
|
-
get searchParams() {
|
23875
|
-
return this._url.searchParams;
|
23876
|
-
}
|
23877
|
-
update(t7) {
|
23878
|
-
var u5;
|
23879
|
-
let o5 = h6();
|
23880
|
-
for (let s5 in t7) {
|
23881
|
-
let i5 = (u5 = t7[s5]) != null ? u5 : "";
|
23882
|
-
if (o5) switch (s5) {
|
23883
|
-
case "port": {
|
23884
|
-
if (this._port = i5, (l6(this._url.hostname) || f6(this._url.hostname)) && (this._url.host = p6(i5), this._port !== this._url.port)) continue;
|
23885
|
-
break;
|
23886
|
-
}
|
23887
|
-
case "host": {
|
23888
|
-
let [m6, _4 = this._port] = i5.split(":");
|
23889
|
-
this._port = _4, l6(m6) && (i5 = p6(_4));
|
23890
|
-
break;
|
23891
|
-
}
|
23892
|
-
case "hostname": {
|
23893
|
-
if (l6(i5)) {
|
23894
|
-
if (/\/|:/.test(i5)) continue;
|
23895
|
-
i5 = p6(this._port);
|
23896
|
-
} else this._url.port = this._port;
|
23897
|
-
break;
|
23898
|
-
}
|
23899
|
-
case "href": {
|
23900
|
-
this._url = n6.parse(i5);
|
23901
|
-
continue;
|
23902
|
-
}
|
23903
|
-
}
|
23904
|
-
this._url[s5] = i5;
|
23905
|
-
}
|
23906
|
-
return this;
|
23907
|
-
}
|
23908
|
-
toString() {
|
23909
|
-
return this._url.toString();
|
23910
|
-
}
|
23911
|
-
toJSON() {
|
23912
|
-
return this._url.toJSON();
|
23913
|
-
}
|
23914
|
-
};
|
23915
|
-
a5(n6, "HostURL");
|
23916
|
-
}
|
23917
|
-
});
|
23918
|
-
|
23919
|
-
// ../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/esm/index.js
|
23920
|
-
function dedent(templ) {
|
23921
|
-
var values = [];
|
23922
|
-
for (var _i2 = 1; _i2 < arguments.length; _i2++) {
|
23923
|
-
values[_i2 - 1] = arguments[_i2];
|
23924
|
-
}
|
23925
|
-
var strings = Array.from(typeof templ === "string" ? [templ] : templ);
|
23926
|
-
strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
23927
|
-
var indentLengths = strings.reduce(function(arr, str) {
|
23928
|
-
var matches = str.match(/\n([\t ]+|(?!\s).)/g);
|
23929
|
-
if (matches) {
|
23930
|
-
return arr.concat(matches.map(function(match2) {
|
23931
|
-
var _a4, _b2;
|
23932
|
-
return (_b2 = (_a4 = match2.match(/[\t ]/g)) === null || _a4 === void 0 ? void 0 : _a4.length) !== null && _b2 !== void 0 ? _b2 : 0;
|
23933
|
-
}));
|
23934
|
-
}
|
23935
|
-
return arr;
|
23936
|
-
}, []);
|
23937
|
-
if (indentLengths.length) {
|
23938
|
-
var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g");
|
23939
|
-
strings = strings.map(function(str) {
|
23940
|
-
return str.replace(pattern_1, "\n");
|
23941
|
-
});
|
23942
|
-
}
|
23943
|
-
strings[0] = strings[0].replace(/^\r?\n/, "");
|
23944
|
-
var string = strings[0];
|
23945
|
-
values.forEach(function(value, i5) {
|
23946
|
-
var endentations = string.match(/(?:^|\n)( *)$/);
|
23947
|
-
var endentation = endentations ? endentations[1] : "";
|
23948
|
-
var indentedValue = value;
|
23949
|
-
if (typeof value === "string" && value.includes("\n")) {
|
23950
|
-
indentedValue = String(value).split("\n").map(function(str, i6) {
|
23951
|
-
return i6 === 0 ? str : "" + endentation + str;
|
23952
|
-
}).join("\n");
|
23953
|
-
}
|
23954
|
-
string += indentedValue + strings[i5 + 1];
|
23955
|
-
});
|
23956
|
-
return string;
|
23957
|
-
}
|
23958
|
-
var esm_default2;
|
23959
|
-
var init_esm2 = __esm({
|
23960
|
-
"../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/esm/index.js"() {
|
23961
|
-
init_import_meta_url();
|
23962
|
-
__name(dedent, "dedent");
|
23963
|
-
esm_default2 = dedent;
|
23964
|
-
}
|
23965
|
-
});
|
23966
|
-
|
23967
23780
|
// ../containers-shared/src/client/core/ApiError.ts
|
23968
23781
|
var ApiError;
|
23969
23782
|
var init_ApiError = __esm({
|
@@ -24644,8 +24457,8 @@ var init_request = __esm({
|
|
24644
24457
|
getFormData = /* @__PURE__ */ __name((options) => {
|
24645
24458
|
if (options.formData) {
|
24646
24459
|
const formData = new FormData();
|
24647
|
-
const process11 = /* @__PURE__ */ __name((key, value) => {
|
24648
|
-
if (isString(value)
|
24460
|
+
const process11 = /* @__PURE__ */ __name(async (key, value) => {
|
24461
|
+
if (isString(value)) {
|
24649
24462
|
formData.append(key, value);
|
24650
24463
|
} else {
|
24651
24464
|
formData.append(key, JSON.stringify(value));
|
@@ -24730,7 +24543,7 @@ var init_request = __esm({
|
|
24730
24543
|
result = {};
|
24731
24544
|
}
|
24732
24545
|
} else {
|
24733
|
-
result = { error: fetchResult2.errors?.[0]
|
24546
|
+
result = { error: fetchResult2.errors?.[0]?.message };
|
24734
24547
|
}
|
24735
24548
|
return {
|
24736
24549
|
url: url4,
|
@@ -26162,8 +25975,9 @@ async function constructBuildCommand(options, configPath, logger4) {
|
|
26162
25975
|
const baseDir = configPath ? import_path5.default.dirname(configPath) : process.cwd();
|
26163
25976
|
const absDockerfilePath = import_path5.default.resolve(baseDir, options.pathToDockerfile);
|
26164
25977
|
const dockerfile = (0, import_fs5.readFileSync)(absDockerfilePath, "utf-8");
|
25978
|
+
const absBuildContext = options.buildContext ? import_path5.default.resolve(baseDir, options.buildContext) : import_path5.default.dirname(absDockerfilePath);
|
26165
25979
|
buildCmd.push("-f", "-");
|
26166
|
-
buildCmd.push(
|
25980
|
+
buildCmd.push(absBuildContext);
|
26167
25981
|
logger4?.debug(`Building image with command: ${buildCmd.join(" ")}`);
|
26168
25982
|
return { buildCmd, dockerfile };
|
26169
25983
|
}
|
@@ -26357,6 +26171,17 @@ function isDir(path72) {
|
|
26357
26171
|
const stats = (0, import_fs6.statSync)(path72);
|
26358
26172
|
return stats.isDirectory();
|
26359
26173
|
}
|
26174
|
+
async function getContainerIdsByImageTags(dockerPath, imageTags) {
|
26175
|
+
const ids = /* @__PURE__ */ new Set();
|
26176
|
+
for (const imageTag of imageTags) {
|
26177
|
+
const containerIdsFromImage = await getContainerIdsFromImage(
|
26178
|
+
dockerPath,
|
26179
|
+
imageTag
|
26180
|
+
);
|
26181
|
+
containerIdsFromImage.forEach((id) => ids.add(id));
|
26182
|
+
}
|
26183
|
+
return Array.from(ids);
|
26184
|
+
}
|
26360
26185
|
async function checkExposedPorts(dockerPath, options) {
|
26361
26186
|
const output = await dockerImageInspect(dockerPath, {
|
26362
26187
|
imageTag: options.imageTag,
|
@@ -26370,11 +26195,15 @@ For additional information please see: https://developers.cloudflare.com/contain
|
|
26370
26195
|
);
|
26371
26196
|
}
|
26372
26197
|
}
|
26373
|
-
|
26198
|
+
function generateContainerBuildId() {
|
26199
|
+
return (0, import_crypto.randomUUID)().slice(0, 8);
|
26200
|
+
}
|
26201
|
+
var import_child_process3, import_crypto, import_fs6, import_path6, runDockerCmd, runDockerCmdWithOutput, verifyDockerInstalled, isDockerfile, cleanupContainers, getContainerIdsFromImage;
|
26374
26202
|
var init_utils = __esm({
|
26375
26203
|
"../containers-shared/src/utils.ts"() {
|
26376
26204
|
init_import_meta_url();
|
26377
26205
|
import_child_process3 = require("child_process");
|
26206
|
+
import_crypto = require("crypto");
|
26378
26207
|
import_fs6 = require("fs");
|
26379
26208
|
import_path6 = __toESM(require("path"));
|
26380
26209
|
init_inspect();
|
@@ -26467,7 +26296,7 @@ Other container tooling that is compatible with the Docker CLI and engine may wo
|
|
26467
26296
|
throw e7;
|
26468
26297
|
}
|
26469
26298
|
const imageParts = image.split("/");
|
26470
|
-
if (!imageParts[imageParts.length - 1]
|
26299
|
+
if (!imageParts[imageParts.length - 1]?.includes(":")) {
|
26471
26300
|
throw new Error(
|
26472
26301
|
errorPrefix + `If this is an image registry path, it needs to include at least a tag ':' (e.g: docker.io/httpd:1)`
|
26473
26302
|
);
|
@@ -26481,12 +26310,10 @@ Other container tooling that is compatible with the Docker CLI and engine may wo
|
|
26481
26310
|
}, "isDockerfile");
|
26482
26311
|
cleanupContainers = /* @__PURE__ */ __name(async (dockerPath, imageTags) => {
|
26483
26312
|
try {
|
26484
|
-
const containerIds =
|
26485
|
-
|
26486
|
-
|
26487
|
-
|
26488
|
-
);
|
26489
|
-
}
|
26313
|
+
const containerIds = await getContainerIdsByImageTags(
|
26314
|
+
dockerPath,
|
26315
|
+
imageTags
|
26316
|
+
);
|
26490
26317
|
if (containerIds.length === 0) {
|
26491
26318
|
return true;
|
26492
26319
|
}
|
@@ -26500,6 +26327,7 @@ Other container tooling that is compatible with the Docker CLI and engine may wo
|
|
26500
26327
|
return false;
|
26501
26328
|
}
|
26502
26329
|
}, "cleanupContainers");
|
26330
|
+
__name(getContainerIdsByImageTags, "getContainerIdsByImageTags");
|
26503
26331
|
getContainerIdsFromImage = /* @__PURE__ */ __name(async (dockerPath, ancestorImage) => {
|
26504
26332
|
const output = await runDockerCmdWithOutput(dockerPath, [
|
26505
26333
|
"ps",
|
@@ -26512,6 +26340,7 @@ Other container tooling that is compatible with the Docker CLI and engine may wo
|
|
26512
26340
|
return output.split("\n").filter((line) => line.trim());
|
26513
26341
|
}, "getContainerIdsFromImage");
|
26514
26342
|
__name(checkExposedPorts, "checkExposedPorts");
|
26343
|
+
__name(generateContainerBuildId, "generateContainerBuildId");
|
26515
26344
|
}
|
26516
26345
|
});
|
26517
26346
|
|
@@ -26544,7 +26373,14 @@ async function pullImage(dockerPath, options) {
|
|
26544
26373
|
ready
|
26545
26374
|
};
|
26546
26375
|
}
|
26547
|
-
async function prepareContainerImagesForDev(
|
26376
|
+
async function prepareContainerImagesForDev(options) {
|
26377
|
+
const {
|
26378
|
+
dockerPath,
|
26379
|
+
configPath,
|
26380
|
+
containerOptions,
|
26381
|
+
onContainerImagePreparationStart,
|
26382
|
+
onContainerImagePreparationEnd
|
26383
|
+
} = options;
|
26548
26384
|
let aborted = false;
|
26549
26385
|
if (process.platform === "win32") {
|
26550
26386
|
throw new Error(
|
@@ -26552,11 +26388,11 @@ async function prepareContainerImagesForDev(dockerPath, containerOptions, config
|
|
26552
26388
|
);
|
26553
26389
|
}
|
26554
26390
|
await verifyDockerInstalled(dockerPath);
|
26555
|
-
for (const
|
26556
|
-
if (isDockerfile(
|
26557
|
-
const build5 = await buildImage(dockerPath,
|
26391
|
+
for (const options2 of containerOptions) {
|
26392
|
+
if (isDockerfile(options2.image, configPath)) {
|
26393
|
+
const build5 = await buildImage(dockerPath, options2, configPath);
|
26558
26394
|
onContainerImagePreparationStart({
|
26559
|
-
containerOptions:
|
26395
|
+
containerOptions: options2,
|
26560
26396
|
abort: /* @__PURE__ */ __name(() => {
|
26561
26397
|
aborted = true;
|
26562
26398
|
build5.abort();
|
@@ -26564,18 +26400,18 @@ async function prepareContainerImagesForDev(dockerPath, containerOptions, config
|
|
26564
26400
|
});
|
26565
26401
|
await build5.ready;
|
26566
26402
|
onContainerImagePreparationEnd({
|
26567
|
-
containerOptions:
|
26403
|
+
containerOptions: options2
|
26568
26404
|
});
|
26569
26405
|
} else {
|
26570
|
-
if (!isCloudflareRegistryLink(
|
26406
|
+
if (!isCloudflareRegistryLink(options2.image)) {
|
26571
26407
|
throw new Error(
|
26572
|
-
`Image "${
|
26408
|
+
`Image "${options2.image}" is a registry link but does not point to the Cloudflare container registry.
|
26573
26409
|
To use an existing image from another repository, see https://developers.cloudflare.com/containers/image-management/#using-existing-images`
|
26574
26410
|
);
|
26575
26411
|
}
|
26576
|
-
const pull = await pullImage(dockerPath,
|
26412
|
+
const pull = await pullImage(dockerPath, options2);
|
26577
26413
|
onContainerImagePreparationStart({
|
26578
|
-
containerOptions:
|
26414
|
+
containerOptions: options2,
|
26579
26415
|
abort: /* @__PURE__ */ __name(() => {
|
26580
26416
|
aborted = true;
|
26581
26417
|
pull.abort();
|
@@ -26583,11 +26419,11 @@ To use an existing image from another repository, see https://developers.cloudfl
|
|
26583
26419
|
});
|
26584
26420
|
await pull.ready;
|
26585
26421
|
onContainerImagePreparationEnd({
|
26586
|
-
containerOptions:
|
26422
|
+
containerOptions: options2
|
26587
26423
|
});
|
26588
26424
|
}
|
26589
26425
|
if (!aborted) {
|
26590
|
-
await checkExposedPorts(dockerPath,
|
26426
|
+
await checkExposedPorts(dockerPath, options2);
|
26591
26427
|
}
|
26592
26428
|
}
|
26593
26429
|
}
|
@@ -26635,6 +26471,193 @@ var init_containers_shared = __esm({
|
|
26635
26471
|
}
|
26636
26472
|
});
|
26637
26473
|
|
26474
|
+
// ../../node_modules/.pnpm/@webcontainer+env@1.1.0/node_modules/@webcontainer/env/dist/index.js
|
26475
|
+
var require_dist = __commonJS({
|
26476
|
+
"../../node_modules/.pnpm/@webcontainer+env@1.1.0/node_modules/@webcontainer/env/dist/index.js"(exports2, module3) {
|
26477
|
+
init_import_meta_url();
|
26478
|
+
var c6 = Object.defineProperty;
|
26479
|
+
var g6 = Object.getOwnPropertyDescriptor;
|
26480
|
+
var y4 = Object.getOwnPropertyNames;
|
26481
|
+
var d6 = Object.prototype.hasOwnProperty;
|
26482
|
+
var a5 = /* @__PURE__ */ __name((e7, t7) => c6(e7, "name", { value: t7, configurable: true }), "a");
|
26483
|
+
var b6 = /* @__PURE__ */ __name((e7, t7) => {
|
26484
|
+
for (var o5 in t7) c6(e7, o5, { get: t7[o5], enumerable: true });
|
26485
|
+
}, "b");
|
26486
|
+
var P3 = /* @__PURE__ */ __name((e7, t7, o5, u5) => {
|
26487
|
+
if (t7 && typeof t7 == "object" || typeof t7 == "function") for (let s5 of y4(t7)) !d6.call(e7, s5) && s5 !== o5 && c6(e7, s5, { get: /* @__PURE__ */ __name(() => t7[s5], "get"), enumerable: !(u5 = g6(t7, s5)) || u5.enumerable });
|
26488
|
+
return e7;
|
26489
|
+
}, "P");
|
26490
|
+
var U3 = /* @__PURE__ */ __name((e7) => P3(c6({}, "__esModule", { value: true }), e7), "U");
|
26491
|
+
var x6 = {};
|
26492
|
+
b6(x6, { HostURL: /* @__PURE__ */ __name(() => n6, "HostURL"), isWebContainer: /* @__PURE__ */ __name(() => h6, "isWebContainer") });
|
26493
|
+
module3.exports = U3(x6);
|
26494
|
+
var r7;
|
26495
|
+
try {
|
26496
|
+
r7 = require("@blitz/internal/env");
|
26497
|
+
} catch (e7) {
|
26498
|
+
}
|
26499
|
+
function h6() {
|
26500
|
+
return r7 != null && process.versions.webcontainer != null;
|
26501
|
+
}
|
26502
|
+
__name(h6, "h");
|
26503
|
+
a5(h6, "isWebContainer");
|
26504
|
+
function p6(e7) {
|
26505
|
+
let t7 = r7 == null ? void 0 : r7.createServiceHostname(e7);
|
26506
|
+
if (!t7) throw new Error("Failed to construct service hostname");
|
26507
|
+
return t7;
|
26508
|
+
}
|
26509
|
+
__name(p6, "p");
|
26510
|
+
a5(p6, "_createServiceHostname");
|
26511
|
+
function f6(e7) {
|
26512
|
+
return r7 == null ? void 0 : r7.isServiceUrl(e7);
|
26513
|
+
}
|
26514
|
+
__name(f6, "f");
|
26515
|
+
a5(f6, "_isServiceUrl");
|
26516
|
+
function l6(e7) {
|
26517
|
+
return r7 == null ? void 0 : r7.isLocalhost(e7);
|
26518
|
+
}
|
26519
|
+
__name(l6, "l");
|
26520
|
+
a5(l6, "_isLocalhost");
|
26521
|
+
var n6 = class {
|
26522
|
+
static {
|
26523
|
+
__name(this, "n");
|
26524
|
+
}
|
26525
|
+
constructor(t7) {
|
26526
|
+
this._url = t7;
|
26527
|
+
if (this._port = this._url.port, h6() && l6(this._url.hostname)) {
|
26528
|
+
let o5 = p6(this._port);
|
26529
|
+
this._url.host = o5, this._port === this._url.port && (this._url.port = "");
|
26530
|
+
}
|
26531
|
+
}
|
26532
|
+
static parse(t7) {
|
26533
|
+
return t7 = typeof t7 == "string" ? new URL(t7) : t7, new n6(t7);
|
26534
|
+
}
|
26535
|
+
get port() {
|
26536
|
+
return h6() ? this._port : this._url.port;
|
26537
|
+
}
|
26538
|
+
get hash() {
|
26539
|
+
return this._url.hash;
|
26540
|
+
}
|
26541
|
+
get host() {
|
26542
|
+
return this._url.host;
|
26543
|
+
}
|
26544
|
+
get hostname() {
|
26545
|
+
return this._url.hostname;
|
26546
|
+
}
|
26547
|
+
get href() {
|
26548
|
+
return this._url.href;
|
26549
|
+
}
|
26550
|
+
get origin() {
|
26551
|
+
return this._url.origin;
|
26552
|
+
}
|
26553
|
+
get username() {
|
26554
|
+
return this._url.username;
|
26555
|
+
}
|
26556
|
+
get password() {
|
26557
|
+
return this._url.password;
|
26558
|
+
}
|
26559
|
+
get pathname() {
|
26560
|
+
return this._url.pathname;
|
26561
|
+
}
|
26562
|
+
get protocol() {
|
26563
|
+
return this._url.protocol;
|
26564
|
+
}
|
26565
|
+
get search() {
|
26566
|
+
return this._url.search;
|
26567
|
+
}
|
26568
|
+
get searchParams() {
|
26569
|
+
return this._url.searchParams;
|
26570
|
+
}
|
26571
|
+
update(t7) {
|
26572
|
+
var u5;
|
26573
|
+
let o5 = h6();
|
26574
|
+
for (let s5 in t7) {
|
26575
|
+
let i5 = (u5 = t7[s5]) != null ? u5 : "";
|
26576
|
+
if (o5) switch (s5) {
|
26577
|
+
case "port": {
|
26578
|
+
if (this._port = i5, (l6(this._url.hostname) || f6(this._url.hostname)) && (this._url.host = p6(i5), this._port !== this._url.port)) continue;
|
26579
|
+
break;
|
26580
|
+
}
|
26581
|
+
case "host": {
|
26582
|
+
let [m6, _4 = this._port] = i5.split(":");
|
26583
|
+
this._port = _4, l6(m6) && (i5 = p6(_4));
|
26584
|
+
break;
|
26585
|
+
}
|
26586
|
+
case "hostname": {
|
26587
|
+
if (l6(i5)) {
|
26588
|
+
if (/\/|:/.test(i5)) continue;
|
26589
|
+
i5 = p6(this._port);
|
26590
|
+
} else this._url.port = this._port;
|
26591
|
+
break;
|
26592
|
+
}
|
26593
|
+
case "href": {
|
26594
|
+
this._url = n6.parse(i5);
|
26595
|
+
continue;
|
26596
|
+
}
|
26597
|
+
}
|
26598
|
+
this._url[s5] = i5;
|
26599
|
+
}
|
26600
|
+
return this;
|
26601
|
+
}
|
26602
|
+
toString() {
|
26603
|
+
return this._url.toString();
|
26604
|
+
}
|
26605
|
+
toJSON() {
|
26606
|
+
return this._url.toJSON();
|
26607
|
+
}
|
26608
|
+
};
|
26609
|
+
a5(n6, "HostURL");
|
26610
|
+
}
|
26611
|
+
});
|
26612
|
+
|
26613
|
+
// ../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/esm/index.js
|
26614
|
+
function dedent(templ) {
|
26615
|
+
var values = [];
|
26616
|
+
for (var _i2 = 1; _i2 < arguments.length; _i2++) {
|
26617
|
+
values[_i2 - 1] = arguments[_i2];
|
26618
|
+
}
|
26619
|
+
var strings = Array.from(typeof templ === "string" ? [templ] : templ);
|
26620
|
+
strings[strings.length - 1] = strings[strings.length - 1].replace(/\r?\n([\t ]*)$/, "");
|
26621
|
+
var indentLengths = strings.reduce(function(arr, str) {
|
26622
|
+
var matches = str.match(/\n([\t ]+|(?!\s).)/g);
|
26623
|
+
if (matches) {
|
26624
|
+
return arr.concat(matches.map(function(match2) {
|
26625
|
+
var _a4, _b2;
|
26626
|
+
return (_b2 = (_a4 = match2.match(/[\t ]/g)) === null || _a4 === void 0 ? void 0 : _a4.length) !== null && _b2 !== void 0 ? _b2 : 0;
|
26627
|
+
}));
|
26628
|
+
}
|
26629
|
+
return arr;
|
26630
|
+
}, []);
|
26631
|
+
if (indentLengths.length) {
|
26632
|
+
var pattern_1 = new RegExp("\n[ ]{" + Math.min.apply(Math, indentLengths) + "}", "g");
|
26633
|
+
strings = strings.map(function(str) {
|
26634
|
+
return str.replace(pattern_1, "\n");
|
26635
|
+
});
|
26636
|
+
}
|
26637
|
+
strings[0] = strings[0].replace(/^\r?\n/, "");
|
26638
|
+
var string = strings[0];
|
26639
|
+
values.forEach(function(value, i5) {
|
26640
|
+
var endentations = string.match(/(?:^|\n)( *)$/);
|
26641
|
+
var endentation = endentations ? endentations[1] : "";
|
26642
|
+
var indentedValue = value;
|
26643
|
+
if (typeof value === "string" && value.includes("\n")) {
|
26644
|
+
indentedValue = String(value).split("\n").map(function(str, i6) {
|
26645
|
+
return i6 === 0 ? str : "" + endentation + str;
|
26646
|
+
}).join("\n");
|
26647
|
+
}
|
26648
|
+
string += indentedValue + strings[i5 + 1];
|
26649
|
+
});
|
26650
|
+
return string;
|
26651
|
+
}
|
26652
|
+
var esm_default2;
|
26653
|
+
var init_esm2 = __esm({
|
26654
|
+
"../../node_modules/.pnpm/ts-dedent@2.2.0/node_modules/ts-dedent/esm/index.js"() {
|
26655
|
+
init_import_meta_url();
|
26656
|
+
__name(dedent, "dedent");
|
26657
|
+
esm_default2 = dedent;
|
26658
|
+
}
|
26659
|
+
});
|
26660
|
+
|
26638
26661
|
// ../../node_modules/.pnpm/@iarna+toml@3.0.0/node_modules/@iarna/toml/lib/parser.js
|
26639
26662
|
var require_parser = __commonJS({
|
26640
26663
|
"../../node_modules/.pnpm/@iarna+toml@3.0.0/node_modules/@iarna/toml/lib/parser.js"(exports2, module3) {
|
@@ -33667,7 +33690,7 @@ var name, version;
|
|
33667
33690
|
var init_package = __esm({
|
33668
33691
|
"package.json"() {
|
33669
33692
|
name = "wrangler";
|
33670
|
-
version = "4.25.
|
33693
|
+
version = "4.25.1";
|
33671
33694
|
}
|
33672
33695
|
});
|
33673
33696
|
|
@@ -41182,12 +41205,18 @@ function createGetMode({
|
|
41182
41205
|
function warnOrError(type, remote, supports2) {
|
41183
41206
|
if (remote === true && supports2 === "local") {
|
41184
41207
|
throw new UserError(
|
41185
|
-
`${friendlyBindingNames[type]} bindings do not support accessing remote resources
|
41208
|
+
`${friendlyBindingNames[type]} bindings do not support accessing remote resources.`,
|
41209
|
+
{
|
41210
|
+
telemetryMessage: true
|
41211
|
+
}
|
41186
41212
|
);
|
41187
41213
|
}
|
41188
41214
|
if (remote === false && supports2 === "remote") {
|
41189
41215
|
throw new UserError(
|
41190
|
-
`${friendlyBindingNames[type]} bindings do not support local development. You may be able to set \`experimental_remote: true\` for the binding definition in your configuration file to access a remote version of the resource
|
41216
|
+
`${friendlyBindingNames[type]} bindings do not support local development. You may be able to set \`experimental_remote: true\` for the binding definition in your configuration file to access a remote version of the resource.`,
|
41217
|
+
{
|
41218
|
+
telemetryMessage: true
|
41219
|
+
}
|
41191
41220
|
);
|
41192
41221
|
}
|
41193
41222
|
if (remote === void 0 && supports2 === "remote") {
|
@@ -49352,7 +49381,7 @@ var require_number = __commonJS({
|
|
49352
49381
|
var figures = _require2.figures;
|
49353
49382
|
var clear = _require2.clear;
|
49354
49383
|
var lines = _require2.lines;
|
49355
|
-
var
|
49384
|
+
var isNumber = /[0-9]/;
|
49356
49385
|
var isDef = /* @__PURE__ */ __name((any) => any !== void 0, "isDef");
|
49357
49386
|
var round = /* @__PURE__ */ __name((number, precision) => {
|
49358
49387
|
let factor = Math.pow(10, precision);
|
@@ -49399,7 +49428,7 @@ var require_number = __commonJS({
|
|
49399
49428
|
return this.float ? parseFloat(x6) : parseInt(x6);
|
49400
49429
|
}
|
49401
49430
|
valid(c6) {
|
49402
|
-
return c6 === `-` || c6 === `.` && this.float ||
|
49431
|
+
return c6 === `-` || c6 === `.` && this.float || isNumber.test(c6);
|
49403
49432
|
}
|
49404
49433
|
reset() {
|
49405
49434
|
this.typed = ``;
|
@@ -51795,7 +51824,7 @@ var require_number2 = __commonJS({
|
|
51795
51824
|
var Prompt = require_prompt2();
|
51796
51825
|
var { cursor, erase } = require_src();
|
51797
51826
|
var { style, figures, clear, lines } = require_util8();
|
51798
|
-
var
|
51827
|
+
var isNumber = /[0-9]/;
|
51799
51828
|
var isDef = /* @__PURE__ */ __name((any) => any !== void 0, "isDef");
|
51800
51829
|
var round = /* @__PURE__ */ __name((number, precision) => {
|
51801
51830
|
let factor = Math.pow(10, precision);
|
@@ -51842,7 +51871,7 @@ var require_number2 = __commonJS({
|
|
51842
51871
|
return this.float ? parseFloat(x6) : parseInt(x6);
|
51843
51872
|
}
|
51844
51873
|
valid(c6) {
|
51845
|
-
return c6 === `-` || c6 === `.` && this.float ||
|
51874
|
+
return c6 === `-` || c6 === `.` && this.float || isNumber.test(c6);
|
51846
51875
|
}
|
51847
51876
|
reset() {
|
51848
51877
|
this.typed = ``;
|
@@ -57638,7 +57667,7 @@ var require_minimist = __commonJS({
|
|
57638
57667
|
if (arg2 && flags2.unknownFn && !argDefined(key2, arg2)) {
|
57639
57668
|
if (flags2.unknownFn(arg2) === false) return;
|
57640
57669
|
}
|
57641
|
-
var value2 = !flags2.strings[key2] &&
|
57670
|
+
var value2 = !flags2.strings[key2] && isNumber(val2) ? Number(val2) : val2;
|
57642
57671
|
setKey(argv, key2.split("."), value2);
|
57643
57672
|
(aliases2[key2] || []).forEach(function(x6) {
|
57644
57673
|
setKey(argv, x6.split("."), value2);
|
@@ -57741,7 +57770,7 @@ var require_minimist = __commonJS({
|
|
57741
57770
|
} else {
|
57742
57771
|
if (!flags2.unknownFn || flags2.unknownFn(arg) !== false) {
|
57743
57772
|
argv._.push(
|
57744
|
-
flags2.strings["_"] || !
|
57773
|
+
flags2.strings["_"] || !isNumber(arg) ? arg : Number(arg)
|
57745
57774
|
);
|
57746
57775
|
}
|
57747
57776
|
if (opts.stopEarly) {
|
@@ -57779,12 +57808,12 @@ var require_minimist = __commonJS({
|
|
57779
57808
|
return key in o5;
|
57780
57809
|
}
|
57781
57810
|
__name(hasKey2, "hasKey");
|
57782
|
-
function
|
57811
|
+
function isNumber(x6) {
|
57783
57812
|
if (typeof x6 === "number") return true;
|
57784
57813
|
if (/^0x[0-9a-f]+$/i.test(x6)) return true;
|
57785
57814
|
return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x6);
|
57786
57815
|
}
|
57787
|
-
__name(
|
57816
|
+
__name(isNumber, "isNumber");
|
57788
57817
|
function isConstructorOrProto(obj, key) {
|
57789
57818
|
return key === "constructor" && typeof obj[key] === "function" || key === "__proto__";
|
57790
57819
|
}
|
@@ -58855,7 +58884,11 @@ function buildMiniflareBindingOptions(config, remoteProxyConnectionString, remot
|
|
58855
58884
|
{
|
58856
58885
|
className,
|
58857
58886
|
useSQLite: classNameToUseSQLite.get(className),
|
58858
|
-
container: getImageNameFromDOClassName(
|
58887
|
+
container: getImageNameFromDOClassName({
|
58888
|
+
doClassName: className,
|
58889
|
+
containers: config.containers,
|
58890
|
+
containerBuildId: config.containerBuildId
|
58891
|
+
})
|
58859
58892
|
}
|
58860
58893
|
];
|
58861
58894
|
}),
|
@@ -59096,22 +59129,24 @@ async function buildMiniflareOptions(log2, config, proxyToUserWorkerAuthenticati
|
|
59096
59129
|
};
|
59097
59130
|
return { options, internalObjects, entrypointNames };
|
59098
59131
|
}
|
59099
|
-
function getImageNameFromDOClassName(
|
59100
|
-
if (!
|
59132
|
+
function getImageNameFromDOClassName(options) {
|
59133
|
+
if (!options.containers || !options.containers.length) {
|
59101
59134
|
return void 0;
|
59102
59135
|
}
|
59103
59136
|
(0, import_node_assert5.default)(
|
59104
|
-
|
59137
|
+
options.containerBuildId,
|
59105
59138
|
"Build ID should be set if containers are defined and enabled"
|
59106
59139
|
);
|
59107
|
-
const container =
|
59140
|
+
const container = options.containers.find(
|
59141
|
+
(c6) => c6.class_name === options.doClassName
|
59142
|
+
);
|
59108
59143
|
if (!container) {
|
59109
59144
|
return void 0;
|
59110
59145
|
}
|
59111
59146
|
return {
|
59112
59147
|
imageName: getDevContainerImageName(
|
59113
59148
|
container.class_name,
|
59114
|
-
|
59149
|
+
options.containerBuildId
|
59115
59150
|
)
|
59116
59151
|
};
|
59117
59152
|
}
|
@@ -66913,7 +66948,9 @@ function buildYargs(yargs) {
|
|
66913
66948
|
type: "string",
|
66914
66949
|
default: "linux/amd64",
|
66915
66950
|
describe: "Platform to build for. Defaults to the architecture support by Workers (linux/amd64)",
|
66916
|
-
demandOption: false
|
66951
|
+
demandOption: false,
|
66952
|
+
hidden: true,
|
66953
|
+
deprecated: true
|
66917
66954
|
});
|
66918
66955
|
}
|
66919
66956
|
function pushYargs(yargs) {
|
@@ -67027,6 +67064,11 @@ async function buildCommand(args, config) {
|
|
67027
67064
|
`${args.PATH} is not a directory. Please specify a valid directory path.`
|
67028
67065
|
);
|
67029
67066
|
}
|
67067
|
+
if (args.platform !== "linux/amd64") {
|
67068
|
+
throw new UserError(
|
67069
|
+
`Unsupported platform: Platform "${args.platform}" is unsupported. Please use "linux/amd64" instead.`
|
67070
|
+
);
|
67071
|
+
}
|
67030
67072
|
const containers2 = config.containers ?? [void 0];
|
67031
67073
|
const pathToDockerfile = (0, import_path11.join)(args.PATH, "Dockerfile");
|
67032
67074
|
for (const container of containers2) {
|
@@ -67054,6 +67096,7 @@ async function pushCommand(args, config) {
|
|
67054
67096
|
args.TAG
|
67055
67097
|
);
|
67056
67098
|
const dockerPath = args.pathToDocker ?? getDockerPath();
|
67099
|
+
await checkImagePlatform(dockerPath, args.TAG);
|
67057
67100
|
await runDockerCmd(dockerPath, ["tag", args.TAG, newTag]);
|
67058
67101
|
await runDockerCmd(dockerPath, ["push", newTag]);
|
67059
67102
|
logger.log(`Pushed image: ${newTag}`);
|
@@ -67064,6 +67107,17 @@ async function pushCommand(args, config) {
|
|
67064
67107
|
throw new UserError("An unknown error occurred");
|
67065
67108
|
}
|
67066
67109
|
}
|
67110
|
+
async function checkImagePlatform(pathToDocker, imageTag, expectedPlatform = "linux/amd64") {
|
67111
|
+
const platform3 = await dockerImageInspect(pathToDocker, {
|
67112
|
+
imageTag,
|
67113
|
+
formatString: "{{ .Os }}/{{ .Architecture }}"
|
67114
|
+
});
|
67115
|
+
if (platform3 !== expectedPlatform) {
|
67116
|
+
throw new Error(
|
67117
|
+
`Unsupported platform: Image platform (${platform3}) does not match the expected platform (${expectedPlatform})`
|
67118
|
+
);
|
67119
|
+
}
|
67120
|
+
}
|
67067
67121
|
async function ensureDiskLimits(options) {
|
67068
67122
|
const MB = 1e3 * 1e3;
|
67069
67123
|
const MiB = 1024 * 1024;
|
@@ -67102,6 +67156,7 @@ var init_build2 = __esm({
|
|
67102
67156
|
__name(buildAndMaybePush, "buildAndMaybePush");
|
67103
67157
|
__name(buildCommand, "buildCommand");
|
67104
67158
|
__name(pushCommand, "pushCommand");
|
67159
|
+
__name(checkImagePlatform, "checkImagePlatform");
|
67105
67160
|
__name(ensureDiskLimits, "ensureDiskLimits");
|
67106
67161
|
}
|
67107
67162
|
});
|
@@ -67632,48 +67687,9 @@ var init_containers2 = __esm({
|
|
67632
67687
|
});
|
67633
67688
|
|
67634
67689
|
// src/cloudchamber/helpers/diff.ts
|
67635
|
-
function buildValues(diff, lastComponent, newString, oldString, useLongestToken) {
|
67636
|
-
const components = [];
|
67637
|
-
let nextComponent;
|
67638
|
-
while (lastComponent) {
|
67639
|
-
components.push(lastComponent);
|
67640
|
-
nextComponent = lastComponent.previousComponent;
|
67641
|
-
delete lastComponent.previousComponent;
|
67642
|
-
lastComponent = nextComponent;
|
67643
|
-
}
|
67644
|
-
components.reverse();
|
67645
|
-
const componentLen = components.length;
|
67646
|
-
let componentPos = 0, newPos = 0, oldPos = 0;
|
67647
|
-
for (; componentPos < componentLen; componentPos++) {
|
67648
|
-
const component = components[componentPos];
|
67649
|
-
if (!component.removed) {
|
67650
|
-
if (!component.added && useLongestToken) {
|
67651
|
-
let value = newString.slice(newPos, newPos + component.count);
|
67652
|
-
value = value.map((el, i5) => {
|
67653
|
-
const oldValue = oldString[oldPos + i5];
|
67654
|
-
return oldValue.length > el.length ? oldValue : el;
|
67655
|
-
});
|
67656
|
-
component.value = diff.join(value);
|
67657
|
-
} else {
|
67658
|
-
component.value = diff.join(
|
67659
|
-
newString.slice(newPos, newPos + component.count)
|
67660
|
-
);
|
67661
|
-
}
|
67662
|
-
newPos += component.count;
|
67663
|
-
if (!component.added) {
|
67664
|
-
oldPos += component.count;
|
67665
|
-
}
|
67666
|
-
} else {
|
67667
|
-
component.value = diff.join(
|
67668
|
-
oldString.slice(oldPos, oldPos + component.count)
|
67669
|
-
);
|
67670
|
-
oldPos += component.count;
|
67671
|
-
}
|
67672
|
-
}
|
67673
|
-
return components;
|
67674
|
-
}
|
67675
67690
|
function tokenize(value) {
|
67676
|
-
const retLines = []
|
67691
|
+
const retLines = [];
|
67692
|
+
const linesAndNewlines = value.split(/(\n|\r\n)/);
|
67677
67693
|
if (!linesAndNewlines[linesAndNewlines.length - 1]) {
|
67678
67694
|
linesAndNewlines.pop();
|
67679
67695
|
}
|
@@ -67683,139 +67699,7 @@ function tokenize(value) {
|
|
67683
67699
|
}
|
67684
67700
|
return retLines.filter((s5) => s5 !== "");
|
67685
67701
|
}
|
67686
|
-
|
67687
|
-
let res = [];
|
67688
|
-
lineDiff.diff(tokenize(oldStr), tokenize(newStr), (r7) => {
|
67689
|
-
res = r7;
|
67690
|
-
});
|
67691
|
-
return res;
|
67692
|
-
}
|
67693
|
-
function isNumber(c6) {
|
67694
|
-
if (typeof c6 === "number") {
|
67695
|
-
return true;
|
67696
|
-
}
|
67697
|
-
const code = c6.charCodeAt(0);
|
67698
|
-
const zero = "0".charCodeAt(0);
|
67699
|
-
const nine = "9".charCodeAt(0);
|
67700
|
-
return code >= zero && code <= nine;
|
67701
|
-
}
|
67702
|
-
function createLine(el, startWith = "") {
|
67703
|
-
let line = startWith;
|
67704
|
-
let lastAdded = 0;
|
67705
|
-
const addToLine = /* @__PURE__ */ __name((i5, color = (s5) => s5) => {
|
67706
|
-
line += color(el.slice(lastAdded, i5));
|
67707
|
-
lastAdded = i5;
|
67708
|
-
}, "addToLine");
|
67709
|
-
const state2 = {
|
67710
|
-
render: "left"
|
67711
|
-
};
|
67712
|
-
for (let i5 = 0; i5 < el.length; i5++) {
|
67713
|
-
const current = el[i5];
|
67714
|
-
const peek = i5 + 1 < el.length ? el[i5 + 1] : null;
|
67715
|
-
const prev = i5 === 0 ? null : el[i5 - 1];
|
67716
|
-
switch (state2.render) {
|
67717
|
-
case "left":
|
67718
|
-
if (current === "=") {
|
67719
|
-
state2.render = "right";
|
67720
|
-
}
|
67721
|
-
break;
|
67722
|
-
case "right":
|
67723
|
-
if (current === '"') {
|
67724
|
-
addToLine(i5);
|
67725
|
-
state2.render = "quotes";
|
67726
|
-
break;
|
67727
|
-
}
|
67728
|
-
if (isNumber(current)) {
|
67729
|
-
addToLine(i5);
|
67730
|
-
state2.render = "number";
|
67731
|
-
break;
|
67732
|
-
}
|
67733
|
-
if (current === "[" && peek === "[") {
|
67734
|
-
state2.render = "section";
|
67735
|
-
}
|
67736
|
-
break;
|
67737
|
-
case "quotes":
|
67738
|
-
if (current === '"') {
|
67739
|
-
addToLine(i5 + 1, brandColor);
|
67740
|
-
state2.render = "right";
|
67741
|
-
}
|
67742
|
-
break;
|
67743
|
-
case "number":
|
67744
|
-
if (!isNumber(el)) {
|
67745
|
-
addToLine(i5, red);
|
67746
|
-
state2.render = "right";
|
67747
|
-
}
|
67748
|
-
break;
|
67749
|
-
case "section":
|
67750
|
-
if (current === "]" && prev === "]") {
|
67751
|
-
addToLine(i5 + 1);
|
67752
|
-
state2.render = "right";
|
67753
|
-
}
|
67754
|
-
}
|
67755
|
-
}
|
67756
|
-
switch (state2.render) {
|
67757
|
-
case "left":
|
67758
|
-
addToLine(el.length);
|
67759
|
-
break;
|
67760
|
-
case "right":
|
67761
|
-
addToLine(el.length);
|
67762
|
-
break;
|
67763
|
-
case "quotes":
|
67764
|
-
addToLine(el.length, brandColor);
|
67765
|
-
break;
|
67766
|
-
case "number":
|
67767
|
-
addToLine(el.length, red);
|
67768
|
-
break;
|
67769
|
-
case "section":
|
67770
|
-
addToLine(el.length, bold);
|
67771
|
-
break;
|
67772
|
-
}
|
67773
|
-
return line;
|
67774
|
-
}
|
67775
|
-
function printLine(el, startWith = "", printFunc = log) {
|
67776
|
-
printFunc(createLine(el, startWith));
|
67777
|
-
}
|
67778
|
-
function stripUndefined(r7) {
|
67779
|
-
for (const k6 in r7) {
|
67780
|
-
if (r7[k6] === void 0) {
|
67781
|
-
delete r7[k6];
|
67782
|
-
}
|
67783
|
-
}
|
67784
|
-
return r7;
|
67785
|
-
}
|
67786
|
-
function sortObjectKeys(unordered) {
|
67787
|
-
if (Array.isArray(unordered)) {
|
67788
|
-
return unordered;
|
67789
|
-
}
|
67790
|
-
return Object.keys(unordered).sort().reduce(
|
67791
|
-
(obj, key) => {
|
67792
|
-
obj[key] = unordered[key];
|
67793
|
-
return obj;
|
67794
|
-
},
|
67795
|
-
{}
|
67796
|
-
);
|
67797
|
-
}
|
67798
|
-
function sortObjectRecursive(object) {
|
67799
|
-
if (typeof object !== "object") {
|
67800
|
-
return object;
|
67801
|
-
}
|
67802
|
-
if (Array.isArray(object)) {
|
67803
|
-
return object.map((obj) => sortObjectRecursive(obj));
|
67804
|
-
}
|
67805
|
-
const objectCopy = { ...object };
|
67806
|
-
for (const [key, value] of Object.entries(object)) {
|
67807
|
-
if (typeof value === "object") {
|
67808
|
-
if (value === null) {
|
67809
|
-
continue;
|
67810
|
-
}
|
67811
|
-
objectCopy[key] = sortObjectRecursive(
|
67812
|
-
value
|
67813
|
-
);
|
67814
|
-
}
|
67815
|
-
}
|
67816
|
-
return sortObjectKeys(objectCopy);
|
67817
|
-
}
|
67818
|
-
var Diff, lineDiff;
|
67702
|
+
var Diff;
|
67819
67703
|
var init_diff = __esm({
|
67820
67704
|
"src/cloudchamber/helpers/diff.ts"() {
|
67821
67705
|
init_import_meta_url();
|
@@ -67825,13 +67709,15 @@ var init_diff = __esm({
|
|
67825
67709
|
static {
|
67826
67710
|
__name(this, "Diff");
|
67827
67711
|
}
|
67828
|
-
|
67829
|
-
|
67830
|
-
|
67831
|
-
|
67832
|
-
|
67833
|
-
|
67834
|
-
const
|
67712
|
+
#results = [];
|
67713
|
+
get changes() {
|
67714
|
+
return this.#results.filter((r7) => r7.added || r7.removed).length;
|
67715
|
+
}
|
67716
|
+
constructor(a5, b6) {
|
67717
|
+
const oldString = tokenize(a5);
|
67718
|
+
const newString = tokenize(b6);
|
67719
|
+
const newLen = newString.length;
|
67720
|
+
const oldLen = oldString.length;
|
67835
67721
|
let editLength = 1;
|
67836
67722
|
const bestPath = [
|
67837
67723
|
{ oldPos: -1, lastComponent: void 0 }
|
@@ -67839,23 +67725,24 @@ var init_diff = __esm({
|
|
67839
67725
|
if (bestPath[0] === void 0) {
|
67840
67726
|
throw new Error("unreachable");
|
67841
67727
|
}
|
67842
|
-
let newPos = this
|
67728
|
+
let newPos = this.#extractCommon(bestPath[0], newString, oldString, 0);
|
67843
67729
|
if (bestPath[0].oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
|
67844
|
-
|
67845
|
-
|
67846
|
-
|
67847
|
-
|
67848
|
-
|
67849
|
-
oldString,
|
67850
|
-
false
|
67851
|
-
)
|
67730
|
+
this.#results = this.#buildValues(
|
67731
|
+
bestPath[0].lastComponent,
|
67732
|
+
newString,
|
67733
|
+
oldString,
|
67734
|
+
false
|
67852
67735
|
);
|
67736
|
+
return;
|
67853
67737
|
}
|
67854
|
-
let minDiagonalToConsider = -Infinity
|
67855
|
-
|
67738
|
+
let minDiagonalToConsider = -Infinity;
|
67739
|
+
let maxDiagonalToConsider = Infinity;
|
67740
|
+
let done = false;
|
67741
|
+
while (!done) {
|
67856
67742
|
for (let diagonalPath = Math.max(minDiagonalToConsider, -editLength); diagonalPath <= Math.min(maxDiagonalToConsider, editLength); diagonalPath += 2) {
|
67857
67743
|
let basePath;
|
67858
|
-
const removePath = bestPath[diagonalPath - 1]
|
67744
|
+
const removePath = bestPath[diagonalPath - 1];
|
67745
|
+
const addPath = bestPath[diagonalPath + 1];
|
67859
67746
|
if (removePath) {
|
67860
67747
|
bestPath[diagonalPath - 1] = void 0;
|
67861
67748
|
}
|
@@ -67870,50 +67757,88 @@ var init_diff = __esm({
|
|
67870
67757
|
continue;
|
67871
67758
|
}
|
67872
67759
|
if (addPath && (!canRemove || canAdd && (removePath?.oldPos ?? 0) < (addPath?.oldPos ?? 0))) {
|
67873
|
-
basePath = this
|
67760
|
+
basePath = this.#addToPath(addPath, true, false, 0);
|
67874
67761
|
} else if (removePath) {
|
67875
|
-
basePath = this
|
67762
|
+
basePath = this.#addToPath(removePath, false, true, 1);
|
67876
67763
|
} else {
|
67877
67764
|
throw new Error("unreachable");
|
67878
67765
|
}
|
67879
|
-
newPos = this
|
67766
|
+
newPos = this.#extractCommon(
|
67880
67767
|
basePath,
|
67881
67768
|
newString,
|
67882
67769
|
oldString,
|
67883
67770
|
diagonalPath
|
67884
67771
|
);
|
67885
67772
|
if (basePath.oldPos + 1 >= oldLen && newPos + 1 >= newLen) {
|
67886
|
-
|
67887
|
-
|
67888
|
-
|
67889
|
-
|
67890
|
-
|
67891
|
-
oldString,
|
67892
|
-
false
|
67893
|
-
)
|
67773
|
+
this.#results = this.#buildValues(
|
67774
|
+
basePath.lastComponent,
|
67775
|
+
newString,
|
67776
|
+
oldString,
|
67777
|
+
false
|
67894
67778
|
);
|
67895
|
-
|
67896
|
-
|
67897
|
-
|
67898
|
-
|
67899
|
-
|
67900
|
-
|
67901
|
-
|
67779
|
+
done = true;
|
67780
|
+
break;
|
67781
|
+
}
|
67782
|
+
bestPath[diagonalPath] = basePath;
|
67783
|
+
if (basePath.oldPos + 1 >= oldLen) {
|
67784
|
+
maxDiagonalToConsider = Math.min(
|
67785
|
+
maxDiagonalToConsider,
|
67786
|
+
diagonalPath - 1
|
67787
|
+
);
|
67788
|
+
}
|
67789
|
+
if (newPos + 1 >= newLen) {
|
67790
|
+
minDiagonalToConsider = Math.max(
|
67791
|
+
minDiagonalToConsider,
|
67792
|
+
diagonalPath + 1
|
67793
|
+
);
|
67794
|
+
}
|
67795
|
+
}
|
67796
|
+
editLength++;
|
67797
|
+
}
|
67798
|
+
}
|
67799
|
+
print(options = {
|
67800
|
+
contextLines: 3
|
67801
|
+
}) {
|
67802
|
+
let state2 = "init";
|
67803
|
+
const context2 = [];
|
67804
|
+
for (const result of this.#results) {
|
67805
|
+
if (result.value === void 0) {
|
67806
|
+
continue;
|
67807
|
+
}
|
67808
|
+
if (result.added || result.removed) {
|
67809
|
+
if (state2 === "diff") {
|
67810
|
+
context2.splice(0, options.contextLines).forEach((c6) => log(` ${c6}`));
|
67811
|
+
if (context2.length > options.contextLines) {
|
67812
|
+
log(" ...");
|
67813
|
+
newline();
|
67902
67814
|
}
|
67903
|
-
|
67904
|
-
|
67905
|
-
|
67906
|
-
|
67907
|
-
);
|
67815
|
+
}
|
67816
|
+
context2.splice(0, context2.length - options.contextLines);
|
67817
|
+
if (state2 === "init") {
|
67818
|
+
while (context2.length > 0 && context2[0].trim() === "") {
|
67819
|
+
context2.shift();
|
67908
67820
|
}
|
67909
67821
|
}
|
67822
|
+
context2.forEach((c6) => log(` ${c6}`));
|
67823
|
+
context2.length = 0;
|
67824
|
+
for (const l6 of result.value.split("\n")) {
|
67825
|
+
log(`${result.added ? green("+") : red("-")} ${l6}`);
|
67826
|
+
}
|
67827
|
+
state2 = "diff";
|
67828
|
+
} else {
|
67829
|
+
const lines = result.value.replace(/^\n|\n$/g, "").split("\n");
|
67830
|
+
context2.push(...lines);
|
67910
67831
|
}
|
67911
|
-
|
67912
|
-
|
67913
|
-
|
67832
|
+
}
|
67833
|
+
if (state2 === "diff") {
|
67834
|
+
context2.splice(options.contextLines);
|
67835
|
+
while (context2.length > 0 && context2[context2.length - 1].trim() === "") {
|
67836
|
+
context2.pop();
|
67837
|
+
}
|
67838
|
+
context2.forEach((c6) => log(` ${c6}`));
|
67914
67839
|
}
|
67915
67840
|
}
|
67916
|
-
addToPath(path72, added, removed, oldPosInc) {
|
67841
|
+
#addToPath(path72, added, removed, oldPosInc) {
|
67917
67842
|
const last = path72.lastComponent;
|
67918
67843
|
if (last && last.added === added && last.removed === removed) {
|
67919
67844
|
return {
|
@@ -67936,7 +67861,7 @@ var init_diff = __esm({
|
|
67936
67861
|
}
|
67937
67862
|
};
|
67938
67863
|
}
|
67939
|
-
extractCommon(basePath, newString, oldString, diagonalPath) {
|
67864
|
+
#extractCommon(basePath, newString, oldString, diagonalPath) {
|
67940
67865
|
const newLen = newString.length;
|
67941
67866
|
const oldLen = oldString.length;
|
67942
67867
|
let oldPos = basePath.oldPos, newPos = oldPos - diagonalPath, commonCount = 0;
|
@@ -67956,20 +67881,91 @@ var init_diff = __esm({
|
|
67956
67881
|
basePath.oldPos = oldPos;
|
67957
67882
|
return newPos;
|
67958
67883
|
}
|
67959
|
-
|
67960
|
-
|
67961
|
-
|
67962
|
-
|
67963
|
-
|
67884
|
+
#buildValues(lastComponent, newString, oldString, useLongestToken) {
|
67885
|
+
const components = [];
|
67886
|
+
let nextComponent;
|
67887
|
+
while (lastComponent) {
|
67888
|
+
components.push(lastComponent);
|
67889
|
+
nextComponent = lastComponent.previousComponent;
|
67890
|
+
delete lastComponent.previousComponent;
|
67891
|
+
lastComponent = nextComponent;
|
67892
|
+
}
|
67893
|
+
components.reverse();
|
67894
|
+
const componentLen = components.length;
|
67895
|
+
let componentPos = 0, newPos = 0, oldPos = 0;
|
67896
|
+
for (; componentPos < componentLen; componentPos++) {
|
67897
|
+
const component = components[componentPos];
|
67898
|
+
if (!component.removed) {
|
67899
|
+
if (!component.added && useLongestToken) {
|
67900
|
+
let value = newString.slice(newPos, newPos + component.count);
|
67901
|
+
value = value.map((el, i5) => {
|
67902
|
+
const oldValue = oldString[oldPos + i5];
|
67903
|
+
return oldValue.length > el.length ? oldValue : el;
|
67904
|
+
});
|
67905
|
+
component.value = value.join("");
|
67906
|
+
} else {
|
67907
|
+
component.value = newString.slice(newPos, newPos + component.count).join("");
|
67908
|
+
}
|
67909
|
+
newPos += component.count;
|
67910
|
+
if (!component.added) {
|
67911
|
+
oldPos += component.count;
|
67912
|
+
}
|
67913
|
+
} else {
|
67914
|
+
component.value = oldString.slice(oldPos, oldPos + component.count).join("");
|
67915
|
+
oldPos += component.count;
|
67916
|
+
}
|
67917
|
+
}
|
67918
|
+
return components;
|
67964
67919
|
}
|
67965
67920
|
};
|
67966
|
-
__name(buildValues, "buildValues");
|
67967
|
-
lineDiff = new Diff();
|
67968
67921
|
__name(tokenize, "tokenize");
|
67969
|
-
|
67970
|
-
|
67971
|
-
|
67972
|
-
|
67922
|
+
}
|
67923
|
+
});
|
67924
|
+
|
67925
|
+
// src/utils/sortObjectRecursive.ts
|
67926
|
+
function stripUndefined(r7) {
|
67927
|
+
for (const k6 in r7) {
|
67928
|
+
if (r7[k6] === void 0) {
|
67929
|
+
delete r7[k6];
|
67930
|
+
}
|
67931
|
+
}
|
67932
|
+
return r7;
|
67933
|
+
}
|
67934
|
+
function sortObjectKeys(unordered) {
|
67935
|
+
if (Array.isArray(unordered)) {
|
67936
|
+
return unordered;
|
67937
|
+
}
|
67938
|
+
return Object.keys(unordered).sort().reduce(
|
67939
|
+
(obj, key) => {
|
67940
|
+
obj[key] = unordered[key];
|
67941
|
+
return obj;
|
67942
|
+
},
|
67943
|
+
{}
|
67944
|
+
);
|
67945
|
+
}
|
67946
|
+
function sortObjectRecursive(object) {
|
67947
|
+
if (typeof object !== "object") {
|
67948
|
+
return object;
|
67949
|
+
}
|
67950
|
+
if (Array.isArray(object)) {
|
67951
|
+
return object.map((obj) => sortObjectRecursive(obj));
|
67952
|
+
}
|
67953
|
+
const objectCopy = { ...object };
|
67954
|
+
for (const [key, value] of Object.entries(object)) {
|
67955
|
+
if (typeof value === "object") {
|
67956
|
+
if (value === null) {
|
67957
|
+
continue;
|
67958
|
+
}
|
67959
|
+
objectCopy[key] = sortObjectRecursive(
|
67960
|
+
value
|
67961
|
+
);
|
67962
|
+
}
|
67963
|
+
}
|
67964
|
+
return sortObjectKeys(objectCopy);
|
67965
|
+
}
|
67966
|
+
var init_sortObjectRecursive = __esm({
|
67967
|
+
"src/utils/sortObjectRecursive.ts"() {
|
67968
|
+
init_import_meta_url();
|
67973
67969
|
__name(stripUndefined, "stripUndefined");
|
67974
67970
|
__name(sortObjectKeys, "sortObjectKeys");
|
67975
67971
|
__name(sortObjectRecursive, "sortObjectRecursive");
|
@@ -68166,9 +68162,8 @@ async function apply(args, config) {
|
|
68166
68162
|
{ containers: [nowContainer] },
|
68167
68163
|
config.configPath
|
68168
68164
|
);
|
68169
|
-
const
|
68170
|
-
|
68171
|
-
if (!changes) {
|
68165
|
+
const diff = new Diff(prev, now);
|
68166
|
+
if (diff.changes === 0) {
|
68172
68167
|
updateStatus(`no changes ${brandColor(application.name)}`);
|
68173
68168
|
continue;
|
68174
68169
|
}
|
@@ -68176,61 +68171,9 @@ async function apply(args, config) {
|
|
68176
68171
|
`${brandColor.underline("EDIT")} ${application.name}`,
|
68177
68172
|
false
|
68178
68173
|
);
|
68179
|
-
|
68180
|
-
|
68181
|
-
|
68182
|
-
let index = 0;
|
68183
|
-
for (let i5 = printedLines.length - 1; i5 >= 0; i5--) {
|
68184
|
-
if (printedLines[i5].trim().startsWith("[")) {
|
68185
|
-
log("");
|
68186
|
-
index = i5;
|
68187
|
-
break;
|
68188
|
-
}
|
68189
|
-
}
|
68190
|
-
for (let i5 = index; i5 < printedLines.length; i5++) {
|
68191
|
-
log(printedLines[i5]);
|
68192
|
-
if (printedLines.length - i5 > 2) {
|
68193
|
-
i5 = printedLines.length - 2;
|
68194
|
-
printLine(dim("..."), " ");
|
68195
|
-
}
|
68196
|
-
}
|
68197
|
-
printedLines = [];
|
68198
|
-
}, "printContext");
|
68199
|
-
for (const lines of results) {
|
68200
|
-
const trimmedLines = (lines.value ?? "").split("\n").map((e7) => e7.trim()).filter((e7) => e7 !== "");
|
68201
|
-
for (const l6 of trimmedLines) {
|
68202
|
-
if (lines.added) {
|
68203
|
-
printContext();
|
68204
|
-
if (l6.startsWith("[")) {
|
68205
|
-
printLine("");
|
68206
|
-
}
|
68207
|
-
printedDiff = true;
|
68208
|
-
printLine(l6, green("+ "));
|
68209
|
-
} else if (lines.removed) {
|
68210
|
-
printContext();
|
68211
|
-
if (l6.startsWith("[")) {
|
68212
|
-
printLine("");
|
68213
|
-
}
|
68214
|
-
printedDiff = true;
|
68215
|
-
printLine(l6, red("- "));
|
68216
|
-
} else {
|
68217
|
-
if (printedDiff) {
|
68218
|
-
let printDots = false;
|
68219
|
-
if (l6.startsWith("[")) {
|
68220
|
-
printLine("");
|
68221
|
-
printDots = true;
|
68222
|
-
}
|
68223
|
-
printedDiff = false;
|
68224
|
-
printLine(l6, " ");
|
68225
|
-
if (printDots) {
|
68226
|
-
printLine(dim("..."), " ");
|
68227
|
-
}
|
68228
|
-
continue;
|
68229
|
-
}
|
68230
|
-
printedLines.push(createLine(l6, " "));
|
68231
|
-
}
|
68232
|
-
}
|
68233
|
-
}
|
68174
|
+
newline();
|
68175
|
+
diff.print();
|
68176
|
+
newline();
|
68234
68177
|
if (appConfigNoDefaults.rollout_kind !== "none") {
|
68235
68178
|
actions.push({
|
68236
68179
|
action: "modify",
|
@@ -68242,8 +68185,8 @@ async function apply(args, config) {
|
|
68242
68185
|
});
|
68243
68186
|
} else {
|
68244
68187
|
log("Skipping application rollout");
|
68188
|
+
newline();
|
68245
68189
|
}
|
68246
|
-
printLine("");
|
68247
68190
|
continue;
|
68248
68191
|
}
|
68249
68192
|
updateStatus(bold.underline(green.underline("NEW")) + ` ${appConfig.name}`);
|
@@ -68261,9 +68204,8 @@ async function apply(args, config) {
|
|
68261
68204
|
},
|
68262
68205
|
config.configPath
|
68263
68206
|
);
|
68264
|
-
s5.split("\n").
|
68265
|
-
|
68266
|
-
});
|
68207
|
+
s5.trimEnd().split("\n").forEach((el) => log(` ${el}`));
|
68208
|
+
newline();
|
68267
68209
|
const configToPush = { ...appConfig };
|
68268
68210
|
actions.push({
|
68269
68211
|
action: "create",
|
@@ -68323,7 +68265,6 @@ ${formatError(err)}`
|
|
68323
68265
|
shape: shapes.bar
|
68324
68266
|
}
|
68325
68267
|
);
|
68326
|
-
printLine("");
|
68327
68268
|
continue;
|
68328
68269
|
}
|
68329
68270
|
if (action.action === "modify") {
|
@@ -68395,10 +68336,10 @@ ${err.message}`
|
|
68395
68336
|
success(`Modified application ${brandColor(action.name)}`, {
|
68396
68337
|
shape: shapes.bar
|
68397
68338
|
});
|
68398
|
-
printLine("");
|
68399
68339
|
continue;
|
68400
68340
|
}
|
68401
68341
|
}
|
68342
|
+
newline();
|
68402
68343
|
endSection("Applied changes");
|
68403
68344
|
}
|
68404
68345
|
var init_deploy = __esm({
|
@@ -68412,6 +68353,7 @@ var init_deploy = __esm({
|
|
68412
68353
|
init_config2();
|
68413
68354
|
init_errors();
|
68414
68355
|
init_user2();
|
68356
|
+
init_sortObjectRecursive();
|
68415
68357
|
__name(mergeDeep2, "mergeDeep");
|
68416
68358
|
__name(isObject, "isObject");
|
68417
68359
|
__name(createApplicationToModifyApplication, "createApplicationToModifyApplication");
|
@@ -69251,7 +69193,10 @@ async function getPackageManager() {
|
|
69251
69193
|
return { ...PnpmPackageManager };
|
69252
69194
|
} else {
|
69253
69195
|
throw new UserError(
|
69254
|
-
"Unable to find a package manager. Supported managers are: npm, yarn, and pnpm."
|
69196
|
+
"Unable to find a package manager. Supported managers are: npm, yarn, and pnpm.",
|
69197
|
+
{
|
69198
|
+
telemetryMessage: true
|
69199
|
+
}
|
69255
69200
|
);
|
69256
69201
|
}
|
69257
69202
|
}
|
@@ -79909,9 +79854,7 @@ async function apply2(args, config) {
|
|
79909
79854
|
const endConfig = args.env !== void 0 ? {
|
79910
79855
|
env: { [args.env]: { containers: [configuration] } }
|
79911
79856
|
} : { containers: [configuration] };
|
79912
|
-
formatConfigSnippet(endConfig, config.configPath).split("\n").forEach((el) => {
|
79913
|
-
printLine(el, " ", logRaw);
|
79914
|
-
});
|
79857
|
+
formatConfigSnippet(endConfig, config.configPath).split("\n").forEach((el) => logRaw(` ${el}`));
|
79915
79858
|
return;
|
79916
79859
|
}
|
79917
79860
|
const applications = await promiseSpinner(
|
@@ -79971,9 +79914,8 @@ async function apply2(args, config) {
|
|
79971
79914
|
{ containers: [nowContainer] },
|
79972
79915
|
config.configPath
|
79973
79916
|
);
|
79974
|
-
const
|
79975
|
-
|
79976
|
-
if (!changes) {
|
79917
|
+
const diff = new Diff(prev, now);
|
79918
|
+
if (diff.changes === 0) {
|
79977
79919
|
updateStatus(`no changes ${brandColor(application.name)}`);
|
79978
79920
|
continue;
|
79979
79921
|
}
|
@@ -79981,61 +79923,9 @@ async function apply2(args, config) {
|
|
79981
79923
|
`${brandColor.underline("EDIT")} ${application.name}`,
|
79982
79924
|
false
|
79983
79925
|
);
|
79984
|
-
|
79985
|
-
|
79986
|
-
|
79987
|
-
let index = 0;
|
79988
|
-
for (let i5 = printedLines.length - 1; i5 >= 0; i5--) {
|
79989
|
-
if (printedLines[i5].trim().startsWith("[")) {
|
79990
|
-
log("");
|
79991
|
-
index = i5;
|
79992
|
-
break;
|
79993
|
-
}
|
79994
|
-
}
|
79995
|
-
for (let i5 = index; i5 < printedLines.length; i5++) {
|
79996
|
-
log(printedLines[i5]);
|
79997
|
-
if (printedLines.length - i5 > 2) {
|
79998
|
-
i5 = printedLines.length - 2;
|
79999
|
-
printLine(dim("..."), " ");
|
80000
|
-
}
|
80001
|
-
}
|
80002
|
-
printedLines = [];
|
80003
|
-
}, "printContext");
|
80004
|
-
for (const lines of results) {
|
80005
|
-
const trimmedLines = (lines.value ?? "").split("\n").map((e7) => e7.trim()).filter((e7) => e7 !== "");
|
80006
|
-
for (const l6 of trimmedLines) {
|
80007
|
-
if (lines.added) {
|
80008
|
-
printContext();
|
80009
|
-
if (l6.startsWith("[")) {
|
80010
|
-
printLine("");
|
80011
|
-
}
|
80012
|
-
printedDiff = true;
|
80013
|
-
printLine(l6, green("+ "));
|
80014
|
-
} else if (lines.removed) {
|
80015
|
-
printContext();
|
80016
|
-
if (l6.startsWith("[")) {
|
80017
|
-
printLine("");
|
80018
|
-
}
|
80019
|
-
printedDiff = true;
|
80020
|
-
printLine(l6, red("- "));
|
80021
|
-
} else {
|
80022
|
-
if (printedDiff) {
|
80023
|
-
let printDots = false;
|
80024
|
-
if (l6.startsWith("[")) {
|
80025
|
-
printLine("");
|
80026
|
-
printDots = true;
|
80027
|
-
}
|
80028
|
-
printedDiff = false;
|
80029
|
-
printLine(l6, " ");
|
80030
|
-
if (printDots) {
|
80031
|
-
printLine(dim("..."), " ");
|
80032
|
-
}
|
80033
|
-
continue;
|
80034
|
-
}
|
80035
|
-
printedLines.push(createLine(l6, " "));
|
80036
|
-
}
|
80037
|
-
}
|
80038
|
-
}
|
79926
|
+
newline();
|
79927
|
+
diff.print();
|
79928
|
+
newline();
|
80039
79929
|
if (appConfigNoDefaults.rollout_kind !== "none") {
|
80040
79930
|
actions.push({
|
80041
79931
|
action: "modify",
|
@@ -80047,8 +79937,8 @@ async function apply2(args, config) {
|
|
80047
79937
|
});
|
80048
79938
|
} else {
|
80049
79939
|
log("Skipping application rollout");
|
79940
|
+
newline();
|
80050
79941
|
}
|
80051
|
-
printLine("");
|
80052
79942
|
continue;
|
80053
79943
|
}
|
80054
79944
|
updateStatus(bold.underline(green.underline("NEW")) + ` ${appConfig.name}`);
|
@@ -80066,9 +79956,8 @@ async function apply2(args, config) {
|
|
80066
79956
|
},
|
80067
79957
|
config.configPath
|
80068
79958
|
);
|
80069
|
-
s5.split("\n").
|
80070
|
-
|
80071
|
-
});
|
79959
|
+
s5.trimEnd().split("\n").forEach((el) => log(` ${el}`));
|
79960
|
+
newline();
|
80072
79961
|
const configToPush = { ...appConfig };
|
80073
79962
|
actions.push({
|
80074
79963
|
action: "create",
|
@@ -80128,7 +80017,6 @@ ${formatError(err)}`
|
|
80128
80017
|
shape: shapes.bar
|
80129
80018
|
}
|
80130
80019
|
);
|
80131
|
-
printLine("");
|
80132
80020
|
continue;
|
80133
80021
|
}
|
80134
80022
|
if (action.action === "modify") {
|
@@ -80200,10 +80088,10 @@ ${err.message}`
|
|
80200
80088
|
success(`Modified application ${brandColor(action.name)}`, {
|
80201
80089
|
shape: shapes.bar
|
80202
80090
|
});
|
80203
|
-
printLine("");
|
80204
80091
|
continue;
|
80205
80092
|
}
|
80206
80093
|
}
|
80094
|
+
newline();
|
80207
80095
|
endSection("Applied changes");
|
80208
80096
|
}
|
80209
80097
|
async function applyCommand(args, config) {
|
@@ -80227,6 +80115,7 @@ var init_apply = __esm({
|
|
80227
80115
|
init_config2();
|
80228
80116
|
init_errors();
|
80229
80117
|
init_user2();
|
80118
|
+
init_sortObjectRecursive();
|
80230
80119
|
init_common();
|
80231
80120
|
init_diff();
|
80232
80121
|
__name(mergeDeep3, "mergeDeep");
|
@@ -81417,7 +81306,7 @@ async function read(stream2) {
|
|
81417
81306
|
return Buffer.concat(chunks).toString("utf8");
|
81418
81307
|
}
|
81419
81308
|
async function requestFromCmd(args, _config) {
|
81420
|
-
const requestId = `wrangler-${(0,
|
81309
|
+
const requestId = `wrangler-${(0, import_crypto2.randomUUID)()}`;
|
81421
81310
|
if (args.verbose && !args.silent) {
|
81422
81311
|
logRaw(bold(brandColor("Request ID: " + requestId)));
|
81423
81312
|
}
|
@@ -81485,11 +81374,11 @@ async function requestFromCmd(args, _config) {
|
|
81485
81374
|
}
|
81486
81375
|
}
|
81487
81376
|
}
|
81488
|
-
var
|
81377
|
+
var import_crypto2;
|
81489
81378
|
var init_curl = __esm({
|
81490
81379
|
"src/cloudchamber/curl.ts"() {
|
81491
81380
|
init_import_meta_url();
|
81492
|
-
|
81381
|
+
import_crypto2 = require("crypto");
|
81493
81382
|
init_cli();
|
81494
81383
|
init_colors();
|
81495
81384
|
init_containers_shared();
|
@@ -85078,7 +84967,8 @@ async function getEntry(args, config, command2) {
|
|
85078
84967
|
} else {
|
85079
84968
|
if (config.pages_build_output_dir && command2 === "dev") {
|
85080
84969
|
throw new UserError(
|
85081
|
-
"It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages dev` instead."
|
84970
|
+
"It looks like you've run a Workers-specific command in a Pages project.\nFor Pages, please run `wrangler pages dev` instead.",
|
84971
|
+
{ telemetryMessage: true }
|
85082
84972
|
);
|
85083
84973
|
}
|
85084
84974
|
const compatibilityDateStr = [
|
@@ -85140,7 +85030,8 @@ async function getEntry(args, config, command2) {
|
|
85140
85030
|
${addScriptName}
|
85141
85031
|
${addScriptNameExamples}
|
85142
85032
|
${migrateText}
|
85143
|
-
${migrateUrl}
|
85033
|
+
${migrateUrl}`,
|
85034
|
+
{ telemetryMessage: "tried to use DO with service worker" }
|
85144
85035
|
);
|
85145
85036
|
}
|
85146
85037
|
return {
|
@@ -85576,7 +85467,8 @@ var init_deploy4 = __esm({
|
|
85576
85467
|
validateArgs(args) {
|
85577
85468
|
if (args.nodeCompat) {
|
85578
85469
|
throw new UserError(
|
85579
|
-
`The --node-compat flag is no longer supported as of Wrangler v4. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information
|
85470
|
+
`The --node-compat flag is no longer supported as of Wrangler v4. Instead, use the \`nodejs_compat\` compatibility flag. This includes the functionality from legacy \`node_compat\` polyfills and natively implemented Node.js APIs. See https://developers.cloudflare.com/workers/runtime-apis/nodejs for more information.`,
|
85471
|
+
{ telemetryMessage: true }
|
85580
85472
|
);
|
85581
85473
|
}
|
85582
85474
|
},
|
@@ -87825,7 +87717,10 @@ var init_init = __esm({
|
|
87825
87717
|
} catch (err) {
|
87826
87718
|
if (err.code === 10090) {
|
87827
87719
|
throw new UserError(
|
87828
|
-
"wrangler couldn't find a Worker with that name in your account.\nRun `wrangler whoami` to confirm you're logged into the correct account."
|
87720
|
+
"wrangler couldn't find a Worker with that name in your account.\nRun `wrangler whoami` to confirm you're logged into the correct account.",
|
87721
|
+
{
|
87722
|
+
telemetryMessage: true
|
87723
|
+
}
|
87829
87724
|
);
|
87830
87725
|
}
|
87831
87726
|
throw err;
|
@@ -93326,9 +93221,9 @@ var require_ms = __commonJS({
|
|
93326
93221
|
}
|
93327
93222
|
});
|
93328
93223
|
|
93329
|
-
// ../../node_modules/.pnpm/debug@4.
|
93224
|
+
// ../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/common.js
|
93330
93225
|
var require_common = __commonJS({
|
93331
|
-
"../../node_modules/.pnpm/debug@4.
|
93226
|
+
"../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/common.js"(exports2, module3) {
|
93332
93227
|
init_import_meta_url();
|
93333
93228
|
function setup(env6) {
|
93334
93229
|
createDebug.debug = createDebug;
|
@@ -93434,54 +93329,68 @@ var require_common = __commonJS({
|
|
93434
93329
|
createDebug.namespaces = namespaces;
|
93435
93330
|
createDebug.names = [];
|
93436
93331
|
createDebug.skips = [];
|
93437
|
-
|
93438
|
-
|
93439
|
-
|
93440
|
-
|
93441
|
-
if (!split[i5]) {
|
93442
|
-
continue;
|
93443
|
-
}
|
93444
|
-
namespaces = split[i5].replace(/\*/g, ".*?");
|
93445
|
-
if (namespaces[0] === "-") {
|
93446
|
-
createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
|
93332
|
+
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
93333
|
+
for (const ns of split) {
|
93334
|
+
if (ns[0] === "-") {
|
93335
|
+
createDebug.skips.push(ns.slice(1));
|
93447
93336
|
} else {
|
93448
|
-
createDebug.names.push(
|
93337
|
+
createDebug.names.push(ns);
|
93449
93338
|
}
|
93450
93339
|
}
|
93451
93340
|
}
|
93452
93341
|
__name(enable, "enable");
|
93342
|
+
function matchesTemplate(search, template) {
|
93343
|
+
let searchIndex = 0;
|
93344
|
+
let templateIndex = 0;
|
93345
|
+
let starIndex = -1;
|
93346
|
+
let matchIndex = 0;
|
93347
|
+
while (searchIndex < search.length) {
|
93348
|
+
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
93349
|
+
if (template[templateIndex] === "*") {
|
93350
|
+
starIndex = templateIndex;
|
93351
|
+
matchIndex = searchIndex;
|
93352
|
+
templateIndex++;
|
93353
|
+
} else {
|
93354
|
+
searchIndex++;
|
93355
|
+
templateIndex++;
|
93356
|
+
}
|
93357
|
+
} else if (starIndex !== -1) {
|
93358
|
+
templateIndex = starIndex + 1;
|
93359
|
+
matchIndex++;
|
93360
|
+
searchIndex = matchIndex;
|
93361
|
+
} else {
|
93362
|
+
return false;
|
93363
|
+
}
|
93364
|
+
}
|
93365
|
+
while (templateIndex < template.length && template[templateIndex] === "*") {
|
93366
|
+
templateIndex++;
|
93367
|
+
}
|
93368
|
+
return templateIndex === template.length;
|
93369
|
+
}
|
93370
|
+
__name(matchesTemplate, "matchesTemplate");
|
93453
93371
|
function disable() {
|
93454
93372
|
const namespaces = [
|
93455
|
-
...createDebug.names
|
93456
|
-
...createDebug.skips.map(
|
93373
|
+
...createDebug.names,
|
93374
|
+
...createDebug.skips.map((namespace) => "-" + namespace)
|
93457
93375
|
].join(",");
|
93458
93376
|
createDebug.enable("");
|
93459
93377
|
return namespaces;
|
93460
93378
|
}
|
93461
93379
|
__name(disable, "disable");
|
93462
93380
|
function enabled(name2) {
|
93463
|
-
|
93464
|
-
|
93465
|
-
}
|
93466
|
-
let i5;
|
93467
|
-
let len;
|
93468
|
-
for (i5 = 0, len = createDebug.skips.length; i5 < len; i5++) {
|
93469
|
-
if (createDebug.skips[i5].test(name2)) {
|
93381
|
+
for (const skip of createDebug.skips) {
|
93382
|
+
if (matchesTemplate(name2, skip)) {
|
93470
93383
|
return false;
|
93471
93384
|
}
|
93472
93385
|
}
|
93473
|
-
for (
|
93474
|
-
if (
|
93386
|
+
for (const ns of createDebug.names) {
|
93387
|
+
if (matchesTemplate(name2, ns)) {
|
93475
93388
|
return true;
|
93476
93389
|
}
|
93477
93390
|
}
|
93478
93391
|
return false;
|
93479
93392
|
}
|
93480
93393
|
__name(enabled, "enabled");
|
93481
|
-
function toNamespace(regexp) {
|
93482
|
-
return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
|
93483
|
-
}
|
93484
|
-
__name(toNamespace, "toNamespace");
|
93485
93394
|
function coerce2(val2) {
|
93486
93395
|
if (val2 instanceof Error) {
|
93487
93396
|
return val2.stack || val2.message;
|
@@ -93501,9 +93410,9 @@ var require_common = __commonJS({
|
|
93501
93410
|
}
|
93502
93411
|
});
|
93503
93412
|
|
93504
|
-
// ../../node_modules/.pnpm/debug@4.
|
93413
|
+
// ../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/browser.js
|
93505
93414
|
var require_browser = __commonJS({
|
93506
|
-
"../../node_modules/.pnpm/debug@4.
|
93415
|
+
"../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/browser.js"(exports2, module3) {
|
93507
93416
|
init_import_meta_url();
|
93508
93417
|
exports2.formatArgs = formatArgs;
|
93509
93418
|
exports2.save = save;
|
@@ -93649,7 +93558,7 @@ var require_browser = __commonJS({
|
|
93649
93558
|
function load() {
|
93650
93559
|
let r7;
|
93651
93560
|
try {
|
93652
|
-
r7 = exports2.storage.getItem("debug");
|
93561
|
+
r7 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
93653
93562
|
} catch (error2) {
|
93654
93563
|
}
|
93655
93564
|
if (!r7 && typeof process !== "undefined" && "env" in process) {
|
@@ -93677,9 +93586,9 @@ var require_browser = __commonJS({
|
|
93677
93586
|
}
|
93678
93587
|
});
|
93679
93588
|
|
93680
|
-
// ../../node_modules/.pnpm/debug@4.
|
93589
|
+
// ../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/node.js
|
93681
93590
|
var require_node4 = __commonJS({
|
93682
|
-
"../../node_modules/.pnpm/debug@4.
|
93591
|
+
"../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/node.js"(exports2, module3) {
|
93683
93592
|
init_import_meta_url();
|
93684
93593
|
var tty3 = require("tty");
|
93685
93594
|
var util5 = require("util");
|
@@ -93859,9 +93768,9 @@ var require_node4 = __commonJS({
|
|
93859
93768
|
}
|
93860
93769
|
});
|
93861
93770
|
|
93862
|
-
// ../../node_modules/.pnpm/debug@4.
|
93771
|
+
// ../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/index.js
|
93863
93772
|
var require_src3 = __commonJS({
|
93864
|
-
"../../node_modules/.pnpm/debug@4.
|
93773
|
+
"../../node_modules/.pnpm/debug@4.4.1_patch_hash=zevdllrsa2u6cp4b3ivya5dqsa_supports-color@9.2.2/node_modules/debug/src/index.js"(exports2, module3) {
|
93865
93774
|
init_import_meta_url();
|
93866
93775
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
93867
93776
|
module3.exports = require_browser();
|
@@ -108607,15 +108516,15 @@ var init_getProfileName = __esm({
|
|
108607
108516
|
});
|
108608
108517
|
|
108609
108518
|
// ../../node_modules/.pnpm/@smithy+shared-ini-file-loader@3.1.12/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js
|
108610
|
-
var
|
108519
|
+
var import_crypto3, import_path19, getSSOTokenFilepath;
|
108611
108520
|
var init_getSSOTokenFilepath = __esm({
|
108612
108521
|
"../../node_modules/.pnpm/@smithy+shared-ini-file-loader@3.1.12/node_modules/@smithy/shared-ini-file-loader/dist-es/getSSOTokenFilepath.js"() {
|
108613
108522
|
init_import_meta_url();
|
108614
|
-
|
108523
|
+
import_crypto3 = require("crypto");
|
108615
108524
|
import_path19 = require("path");
|
108616
108525
|
init_getHomeDir();
|
108617
108526
|
getSSOTokenFilepath = /* @__PURE__ */ __name((id) => {
|
108618
|
-
const hasher = (0,
|
108527
|
+
const hasher = (0, import_crypto3.createHash)("sha1");
|
108619
108528
|
const cacheName = hasher.update(id).digest("hex");
|
108620
108529
|
return (0, import_path19.join)(getHomeDir(), ".aws", "sso", "cache", `${cacheName}.json`);
|
108621
108530
|
}, "getSSOTokenFilepath");
|
@@ -109629,16 +109538,16 @@ var init_dist_es44 = __esm({
|
|
109629
109538
|
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/rng.js
|
109630
109539
|
function rng() {
|
109631
109540
|
if (poolPtr > rnds8Pool.length - 16) {
|
109632
|
-
|
109541
|
+
import_crypto4.default.randomFillSync(rnds8Pool);
|
109633
109542
|
poolPtr = 0;
|
109634
109543
|
}
|
109635
109544
|
return rnds8Pool.slice(poolPtr, poolPtr += 16);
|
109636
109545
|
}
|
109637
|
-
var
|
109546
|
+
var import_crypto4, rnds8Pool, poolPtr;
|
109638
109547
|
var init_rng = __esm({
|
109639
109548
|
"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/rng.js"() {
|
109640
109549
|
init_import_meta_url();
|
109641
|
-
|
109550
|
+
import_crypto4 = __toESM(require("crypto"));
|
109642
109551
|
rnds8Pool = new Uint8Array(256);
|
109643
109552
|
poolPtr = rnds8Pool.length;
|
109644
109553
|
__name(rng, "rng");
|
@@ -109662,13 +109571,13 @@ var init_stringify = __esm({
|
|
109662
109571
|
});
|
109663
109572
|
|
109664
109573
|
// ../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/native.js
|
109665
|
-
var
|
109574
|
+
var import_crypto5, native_default;
|
109666
109575
|
var init_native = __esm({
|
109667
109576
|
"../../node_modules/.pnpm/uuid@9.0.1/node_modules/uuid/dist/esm-node/native.js"() {
|
109668
109577
|
init_import_meta_url();
|
109669
|
-
|
109578
|
+
import_crypto5 = __toESM(require("crypto"));
|
109670
109579
|
native_default = {
|
109671
|
-
randomUUID:
|
109580
|
+
randomUUID: import_crypto5.default.randomUUID
|
109672
109581
|
};
|
109673
109582
|
}
|
109674
109583
|
});
|
@@ -119792,14 +119701,14 @@ function castSourceData(toCast, encoding) {
|
|
119792
119701
|
}
|
119793
119702
|
return fromArrayBuffer(toCast);
|
119794
119703
|
}
|
119795
|
-
var import_buffer4,
|
119704
|
+
var import_buffer4, import_crypto6, Hash;
|
119796
119705
|
var init_dist_es52 = __esm({
|
119797
119706
|
"../../node_modules/.pnpm/@smithy+hash-node@3.0.11/node_modules/@smithy/hash-node/dist-es/index.js"() {
|
119798
119707
|
init_import_meta_url();
|
119799
119708
|
init_dist_es7();
|
119800
119709
|
init_dist_es8();
|
119801
119710
|
import_buffer4 = require("buffer");
|
119802
|
-
|
119711
|
+
import_crypto6 = require("crypto");
|
119803
119712
|
Hash = class {
|
119804
119713
|
static {
|
119805
119714
|
__name(this, "Hash");
|
@@ -119816,7 +119725,7 @@ var init_dist_es52 = __esm({
|
|
119816
119725
|
return Promise.resolve(this.hash.digest());
|
119817
119726
|
}
|
119818
119727
|
reset() {
|
119819
|
-
this.hash = this.secret ? (0,
|
119728
|
+
this.hash = this.secret ? (0, import_crypto6.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto6.createHash)(this.algorithmIdentifier);
|
119820
119729
|
}
|
119821
119730
|
};
|
119822
119731
|
__name(castSourceData, "castSourceData");
|
@@ -143289,565 +143198,6 @@ var init_client9 = __esm({
|
|
143289
143198
|
}
|
143290
143199
|
});
|
143291
143200
|
|
143292
|
-
// ../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/common.js
|
143293
|
-
var require_common2 = __commonJS({
|
143294
|
-
"../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/common.js"(exports2, module3) {
|
143295
|
-
init_import_meta_url();
|
143296
|
-
function setup(env6) {
|
143297
|
-
createDebug.debug = createDebug;
|
143298
|
-
createDebug.default = createDebug;
|
143299
|
-
createDebug.coerce = coerce2;
|
143300
|
-
createDebug.disable = disable;
|
143301
|
-
createDebug.enable = enable;
|
143302
|
-
createDebug.enabled = enabled;
|
143303
|
-
createDebug.humanize = require_ms();
|
143304
|
-
createDebug.destroy = destroy;
|
143305
|
-
Object.keys(env6).forEach((key) => {
|
143306
|
-
createDebug[key] = env6[key];
|
143307
|
-
});
|
143308
|
-
createDebug.names = [];
|
143309
|
-
createDebug.skips = [];
|
143310
|
-
createDebug.formatters = {};
|
143311
|
-
function selectColor(namespace) {
|
143312
|
-
let hash = 0;
|
143313
|
-
for (let i5 = 0; i5 < namespace.length; i5++) {
|
143314
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i5);
|
143315
|
-
hash |= 0;
|
143316
|
-
}
|
143317
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
143318
|
-
}
|
143319
|
-
__name(selectColor, "selectColor");
|
143320
|
-
createDebug.selectColor = selectColor;
|
143321
|
-
function createDebug(namespace) {
|
143322
|
-
let prevTime;
|
143323
|
-
let enableOverride = null;
|
143324
|
-
let namespacesCache;
|
143325
|
-
let enabledCache;
|
143326
|
-
function debug(...args) {
|
143327
|
-
if (!debug.enabled) {
|
143328
|
-
return;
|
143329
|
-
}
|
143330
|
-
const self2 = debug;
|
143331
|
-
const curr = Number(/* @__PURE__ */ new Date());
|
143332
|
-
const ms = curr - (prevTime || curr);
|
143333
|
-
self2.diff = ms;
|
143334
|
-
self2.prev = prevTime;
|
143335
|
-
self2.curr = curr;
|
143336
|
-
prevTime = curr;
|
143337
|
-
args[0] = createDebug.coerce(args[0]);
|
143338
|
-
if (typeof args[0] !== "string") {
|
143339
|
-
args.unshift("%O");
|
143340
|
-
}
|
143341
|
-
let index = 0;
|
143342
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, (match2, format9) => {
|
143343
|
-
if (match2 === "%%") {
|
143344
|
-
return "%";
|
143345
|
-
}
|
143346
|
-
index++;
|
143347
|
-
const formatter = createDebug.formatters[format9];
|
143348
|
-
if (typeof formatter === "function") {
|
143349
|
-
const val2 = args[index];
|
143350
|
-
match2 = formatter.call(self2, val2);
|
143351
|
-
args.splice(index, 1);
|
143352
|
-
index--;
|
143353
|
-
}
|
143354
|
-
return match2;
|
143355
|
-
});
|
143356
|
-
createDebug.formatArgs.call(self2, args);
|
143357
|
-
const logFn = self2.log || createDebug.log;
|
143358
|
-
logFn.apply(self2, args);
|
143359
|
-
}
|
143360
|
-
__name(debug, "debug");
|
143361
|
-
debug.namespace = namespace;
|
143362
|
-
debug.useColors = createDebug.useColors();
|
143363
|
-
debug.color = createDebug.selectColor(namespace);
|
143364
|
-
debug.extend = extend;
|
143365
|
-
debug.destroy = createDebug.destroy;
|
143366
|
-
Object.defineProperty(debug, "enabled", {
|
143367
|
-
enumerable: true,
|
143368
|
-
configurable: false,
|
143369
|
-
get: /* @__PURE__ */ __name(() => {
|
143370
|
-
if (enableOverride !== null) {
|
143371
|
-
return enableOverride;
|
143372
|
-
}
|
143373
|
-
if (namespacesCache !== createDebug.namespaces) {
|
143374
|
-
namespacesCache = createDebug.namespaces;
|
143375
|
-
enabledCache = createDebug.enabled(namespace);
|
143376
|
-
}
|
143377
|
-
return enabledCache;
|
143378
|
-
}, "get"),
|
143379
|
-
set: /* @__PURE__ */ __name((v7) => {
|
143380
|
-
enableOverride = v7;
|
143381
|
-
}, "set")
|
143382
|
-
});
|
143383
|
-
if (typeof createDebug.init === "function") {
|
143384
|
-
createDebug.init(debug);
|
143385
|
-
}
|
143386
|
-
return debug;
|
143387
|
-
}
|
143388
|
-
__name(createDebug, "createDebug");
|
143389
|
-
function extend(namespace, delimiter) {
|
143390
|
-
const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
|
143391
|
-
newDebug.log = this.log;
|
143392
|
-
return newDebug;
|
143393
|
-
}
|
143394
|
-
__name(extend, "extend");
|
143395
|
-
function enable(namespaces) {
|
143396
|
-
createDebug.save(namespaces);
|
143397
|
-
createDebug.namespaces = namespaces;
|
143398
|
-
createDebug.names = [];
|
143399
|
-
createDebug.skips = [];
|
143400
|
-
const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
|
143401
|
-
for (const ns of split) {
|
143402
|
-
if (ns[0] === "-") {
|
143403
|
-
createDebug.skips.push(ns.slice(1));
|
143404
|
-
} else {
|
143405
|
-
createDebug.names.push(ns);
|
143406
|
-
}
|
143407
|
-
}
|
143408
|
-
}
|
143409
|
-
__name(enable, "enable");
|
143410
|
-
function matchesTemplate(search, template) {
|
143411
|
-
let searchIndex = 0;
|
143412
|
-
let templateIndex = 0;
|
143413
|
-
let starIndex = -1;
|
143414
|
-
let matchIndex = 0;
|
143415
|
-
while (searchIndex < search.length) {
|
143416
|
-
if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
|
143417
|
-
if (template[templateIndex] === "*") {
|
143418
|
-
starIndex = templateIndex;
|
143419
|
-
matchIndex = searchIndex;
|
143420
|
-
templateIndex++;
|
143421
|
-
} else {
|
143422
|
-
searchIndex++;
|
143423
|
-
templateIndex++;
|
143424
|
-
}
|
143425
|
-
} else if (starIndex !== -1) {
|
143426
|
-
templateIndex = starIndex + 1;
|
143427
|
-
matchIndex++;
|
143428
|
-
searchIndex = matchIndex;
|
143429
|
-
} else {
|
143430
|
-
return false;
|
143431
|
-
}
|
143432
|
-
}
|
143433
|
-
while (templateIndex < template.length && template[templateIndex] === "*") {
|
143434
|
-
templateIndex++;
|
143435
|
-
}
|
143436
|
-
return templateIndex === template.length;
|
143437
|
-
}
|
143438
|
-
__name(matchesTemplate, "matchesTemplate");
|
143439
|
-
function disable() {
|
143440
|
-
const namespaces = [
|
143441
|
-
...createDebug.names,
|
143442
|
-
...createDebug.skips.map((namespace) => "-" + namespace)
|
143443
|
-
].join(",");
|
143444
|
-
createDebug.enable("");
|
143445
|
-
return namespaces;
|
143446
|
-
}
|
143447
|
-
__name(disable, "disable");
|
143448
|
-
function enabled(name2) {
|
143449
|
-
for (const skip of createDebug.skips) {
|
143450
|
-
if (matchesTemplate(name2, skip)) {
|
143451
|
-
return false;
|
143452
|
-
}
|
143453
|
-
}
|
143454
|
-
for (const ns of createDebug.names) {
|
143455
|
-
if (matchesTemplate(name2, ns)) {
|
143456
|
-
return true;
|
143457
|
-
}
|
143458
|
-
}
|
143459
|
-
return false;
|
143460
|
-
}
|
143461
|
-
__name(enabled, "enabled");
|
143462
|
-
function coerce2(val2) {
|
143463
|
-
if (val2 instanceof Error) {
|
143464
|
-
return val2.stack || val2.message;
|
143465
|
-
}
|
143466
|
-
return val2;
|
143467
|
-
}
|
143468
|
-
__name(coerce2, "coerce");
|
143469
|
-
function destroy() {
|
143470
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
143471
|
-
}
|
143472
|
-
__name(destroy, "destroy");
|
143473
|
-
createDebug.enable(createDebug.load());
|
143474
|
-
return createDebug;
|
143475
|
-
}
|
143476
|
-
__name(setup, "setup");
|
143477
|
-
module3.exports = setup;
|
143478
|
-
}
|
143479
|
-
});
|
143480
|
-
|
143481
|
-
// ../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/browser.js
|
143482
|
-
var require_browser2 = __commonJS({
|
143483
|
-
"../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/browser.js"(exports2, module3) {
|
143484
|
-
init_import_meta_url();
|
143485
|
-
exports2.formatArgs = formatArgs;
|
143486
|
-
exports2.save = save;
|
143487
|
-
exports2.load = load;
|
143488
|
-
exports2.useColors = useColors;
|
143489
|
-
exports2.storage = localstorage();
|
143490
|
-
exports2.destroy = /* @__PURE__ */ (() => {
|
143491
|
-
let warned = false;
|
143492
|
-
return () => {
|
143493
|
-
if (!warned) {
|
143494
|
-
warned = true;
|
143495
|
-
console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
|
143496
|
-
}
|
143497
|
-
};
|
143498
|
-
})();
|
143499
|
-
exports2.colors = [
|
143500
|
-
"#0000CC",
|
143501
|
-
"#0000FF",
|
143502
|
-
"#0033CC",
|
143503
|
-
"#0033FF",
|
143504
|
-
"#0066CC",
|
143505
|
-
"#0066FF",
|
143506
|
-
"#0099CC",
|
143507
|
-
"#0099FF",
|
143508
|
-
"#00CC00",
|
143509
|
-
"#00CC33",
|
143510
|
-
"#00CC66",
|
143511
|
-
"#00CC99",
|
143512
|
-
"#00CCCC",
|
143513
|
-
"#00CCFF",
|
143514
|
-
"#3300CC",
|
143515
|
-
"#3300FF",
|
143516
|
-
"#3333CC",
|
143517
|
-
"#3333FF",
|
143518
|
-
"#3366CC",
|
143519
|
-
"#3366FF",
|
143520
|
-
"#3399CC",
|
143521
|
-
"#3399FF",
|
143522
|
-
"#33CC00",
|
143523
|
-
"#33CC33",
|
143524
|
-
"#33CC66",
|
143525
|
-
"#33CC99",
|
143526
|
-
"#33CCCC",
|
143527
|
-
"#33CCFF",
|
143528
|
-
"#6600CC",
|
143529
|
-
"#6600FF",
|
143530
|
-
"#6633CC",
|
143531
|
-
"#6633FF",
|
143532
|
-
"#66CC00",
|
143533
|
-
"#66CC33",
|
143534
|
-
"#9900CC",
|
143535
|
-
"#9900FF",
|
143536
|
-
"#9933CC",
|
143537
|
-
"#9933FF",
|
143538
|
-
"#99CC00",
|
143539
|
-
"#99CC33",
|
143540
|
-
"#CC0000",
|
143541
|
-
"#CC0033",
|
143542
|
-
"#CC0066",
|
143543
|
-
"#CC0099",
|
143544
|
-
"#CC00CC",
|
143545
|
-
"#CC00FF",
|
143546
|
-
"#CC3300",
|
143547
|
-
"#CC3333",
|
143548
|
-
"#CC3366",
|
143549
|
-
"#CC3399",
|
143550
|
-
"#CC33CC",
|
143551
|
-
"#CC33FF",
|
143552
|
-
"#CC6600",
|
143553
|
-
"#CC6633",
|
143554
|
-
"#CC9900",
|
143555
|
-
"#CC9933",
|
143556
|
-
"#CCCC00",
|
143557
|
-
"#CCCC33",
|
143558
|
-
"#FF0000",
|
143559
|
-
"#FF0033",
|
143560
|
-
"#FF0066",
|
143561
|
-
"#FF0099",
|
143562
|
-
"#FF00CC",
|
143563
|
-
"#FF00FF",
|
143564
|
-
"#FF3300",
|
143565
|
-
"#FF3333",
|
143566
|
-
"#FF3366",
|
143567
|
-
"#FF3399",
|
143568
|
-
"#FF33CC",
|
143569
|
-
"#FF33FF",
|
143570
|
-
"#FF6600",
|
143571
|
-
"#FF6633",
|
143572
|
-
"#FF9900",
|
143573
|
-
"#FF9933",
|
143574
|
-
"#FFCC00",
|
143575
|
-
"#FFCC33"
|
143576
|
-
];
|
143577
|
-
function useColors() {
|
143578
|
-
if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
|
143579
|
-
return true;
|
143580
|
-
}
|
143581
|
-
if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
143582
|
-
return false;
|
143583
|
-
}
|
143584
|
-
let m6;
|
143585
|
-
return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
143586
|
-
typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
143587
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
143588
|
-
typeof navigator !== "undefined" && navigator.userAgent && (m6 = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m6[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
|
143589
|
-
typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
143590
|
-
}
|
143591
|
-
__name(useColors, "useColors");
|
143592
|
-
function formatArgs(args) {
|
143593
|
-
args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module3.exports.humanize(this.diff);
|
143594
|
-
if (!this.useColors) {
|
143595
|
-
return;
|
143596
|
-
}
|
143597
|
-
const c6 = "color: " + this.color;
|
143598
|
-
args.splice(1, 0, c6, "color: inherit");
|
143599
|
-
let index = 0;
|
143600
|
-
let lastC = 0;
|
143601
|
-
args[0].replace(/%[a-zA-Z%]/g, (match2) => {
|
143602
|
-
if (match2 === "%%") {
|
143603
|
-
return;
|
143604
|
-
}
|
143605
|
-
index++;
|
143606
|
-
if (match2 === "%c") {
|
143607
|
-
lastC = index;
|
143608
|
-
}
|
143609
|
-
});
|
143610
|
-
args.splice(lastC, 0, c6);
|
143611
|
-
}
|
143612
|
-
__name(formatArgs, "formatArgs");
|
143613
|
-
exports2.log = console.debug || console.log || (() => {
|
143614
|
-
});
|
143615
|
-
function save(namespaces) {
|
143616
|
-
try {
|
143617
|
-
if (namespaces) {
|
143618
|
-
exports2.storage.setItem("debug", namespaces);
|
143619
|
-
} else {
|
143620
|
-
exports2.storage.removeItem("debug");
|
143621
|
-
}
|
143622
|
-
} catch (error2) {
|
143623
|
-
}
|
143624
|
-
}
|
143625
|
-
__name(save, "save");
|
143626
|
-
function load() {
|
143627
|
-
let r7;
|
143628
|
-
try {
|
143629
|
-
r7 = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
|
143630
|
-
} catch (error2) {
|
143631
|
-
}
|
143632
|
-
if (!r7 && typeof process !== "undefined" && "env" in process) {
|
143633
|
-
r7 = process.env.DEBUG;
|
143634
|
-
}
|
143635
|
-
return r7;
|
143636
|
-
}
|
143637
|
-
__name(load, "load");
|
143638
|
-
function localstorage() {
|
143639
|
-
try {
|
143640
|
-
return localStorage;
|
143641
|
-
} catch (error2) {
|
143642
|
-
}
|
143643
|
-
}
|
143644
|
-
__name(localstorage, "localstorage");
|
143645
|
-
module3.exports = require_common2()(exports2);
|
143646
|
-
var { formatters } = module3.exports;
|
143647
|
-
formatters.j = function(v7) {
|
143648
|
-
try {
|
143649
|
-
return JSON.stringify(v7);
|
143650
|
-
} catch (error2) {
|
143651
|
-
return "[UnexpectedJSONParseError]: " + error2.message;
|
143652
|
-
}
|
143653
|
-
};
|
143654
|
-
}
|
143655
|
-
});
|
143656
|
-
|
143657
|
-
// ../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/node.js
|
143658
|
-
var require_node5 = __commonJS({
|
143659
|
-
"../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/node.js"(exports2, module3) {
|
143660
|
-
init_import_meta_url();
|
143661
|
-
var tty3 = require("tty");
|
143662
|
-
var util5 = require("util");
|
143663
|
-
exports2.init = init3;
|
143664
|
-
exports2.log = log2;
|
143665
|
-
exports2.formatArgs = formatArgs;
|
143666
|
-
exports2.save = save;
|
143667
|
-
exports2.load = load;
|
143668
|
-
exports2.useColors = useColors;
|
143669
|
-
exports2.destroy = util5.deprecate(
|
143670
|
-
() => {
|
143671
|
-
},
|
143672
|
-
"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
|
143673
|
-
);
|
143674
|
-
exports2.colors = [6, 2, 3, 4, 5, 1];
|
143675
|
-
try {
|
143676
|
-
const supportsColor3 = (init_supports_color2(), __toCommonJS(supports_color_exports));
|
143677
|
-
if (supportsColor3 && (supportsColor3.stderr || supportsColor3).level >= 2) {
|
143678
|
-
exports2.colors = [
|
143679
|
-
20,
|
143680
|
-
21,
|
143681
|
-
26,
|
143682
|
-
27,
|
143683
|
-
32,
|
143684
|
-
33,
|
143685
|
-
38,
|
143686
|
-
39,
|
143687
|
-
40,
|
143688
|
-
41,
|
143689
|
-
42,
|
143690
|
-
43,
|
143691
|
-
44,
|
143692
|
-
45,
|
143693
|
-
56,
|
143694
|
-
57,
|
143695
|
-
62,
|
143696
|
-
63,
|
143697
|
-
68,
|
143698
|
-
69,
|
143699
|
-
74,
|
143700
|
-
75,
|
143701
|
-
76,
|
143702
|
-
77,
|
143703
|
-
78,
|
143704
|
-
79,
|
143705
|
-
80,
|
143706
|
-
81,
|
143707
|
-
92,
|
143708
|
-
93,
|
143709
|
-
98,
|
143710
|
-
99,
|
143711
|
-
112,
|
143712
|
-
113,
|
143713
|
-
128,
|
143714
|
-
129,
|
143715
|
-
134,
|
143716
|
-
135,
|
143717
|
-
148,
|
143718
|
-
149,
|
143719
|
-
160,
|
143720
|
-
161,
|
143721
|
-
162,
|
143722
|
-
163,
|
143723
|
-
164,
|
143724
|
-
165,
|
143725
|
-
166,
|
143726
|
-
167,
|
143727
|
-
168,
|
143728
|
-
169,
|
143729
|
-
170,
|
143730
|
-
171,
|
143731
|
-
172,
|
143732
|
-
173,
|
143733
|
-
178,
|
143734
|
-
179,
|
143735
|
-
184,
|
143736
|
-
185,
|
143737
|
-
196,
|
143738
|
-
197,
|
143739
|
-
198,
|
143740
|
-
199,
|
143741
|
-
200,
|
143742
|
-
201,
|
143743
|
-
202,
|
143744
|
-
203,
|
143745
|
-
204,
|
143746
|
-
205,
|
143747
|
-
206,
|
143748
|
-
207,
|
143749
|
-
208,
|
143750
|
-
209,
|
143751
|
-
214,
|
143752
|
-
215,
|
143753
|
-
220,
|
143754
|
-
221
|
143755
|
-
];
|
143756
|
-
}
|
143757
|
-
} catch (error2) {
|
143758
|
-
}
|
143759
|
-
exports2.inspectOpts = Object.keys(process.env).filter((key) => {
|
143760
|
-
return /^debug_/i.test(key);
|
143761
|
-
}).reduce((obj, key) => {
|
143762
|
-
const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_4, k6) => {
|
143763
|
-
return k6.toUpperCase();
|
143764
|
-
});
|
143765
|
-
let val2 = process.env[key];
|
143766
|
-
if (/^(yes|on|true|enabled)$/i.test(val2)) {
|
143767
|
-
val2 = true;
|
143768
|
-
} else if (/^(no|off|false|disabled)$/i.test(val2)) {
|
143769
|
-
val2 = false;
|
143770
|
-
} else if (val2 === "null") {
|
143771
|
-
val2 = null;
|
143772
|
-
} else {
|
143773
|
-
val2 = Number(val2);
|
143774
|
-
}
|
143775
|
-
obj[prop] = val2;
|
143776
|
-
return obj;
|
143777
|
-
}, {});
|
143778
|
-
function useColors() {
|
143779
|
-
return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty3.isatty(process.stderr.fd);
|
143780
|
-
}
|
143781
|
-
__name(useColors, "useColors");
|
143782
|
-
function formatArgs(args) {
|
143783
|
-
const { namespace: name2, useColors: useColors2 } = this;
|
143784
|
-
if (useColors2) {
|
143785
|
-
const c6 = this.color;
|
143786
|
-
const colorCode = "\x1B[3" + (c6 < 8 ? c6 : "8;5;" + c6);
|
143787
|
-
const prefix = ` ${colorCode};1m${name2} \x1B[0m`;
|
143788
|
-
args[0] = prefix + args[0].split("\n").join("\n" + prefix);
|
143789
|
-
args.push(colorCode + "m+" + module3.exports.humanize(this.diff) + "\x1B[0m");
|
143790
|
-
} else {
|
143791
|
-
args[0] = getDate() + name2 + " " + args[0];
|
143792
|
-
}
|
143793
|
-
}
|
143794
|
-
__name(formatArgs, "formatArgs");
|
143795
|
-
function getDate() {
|
143796
|
-
if (exports2.inspectOpts.hideDate) {
|
143797
|
-
return "";
|
143798
|
-
}
|
143799
|
-
return (/* @__PURE__ */ new Date()).toISOString() + " ";
|
143800
|
-
}
|
143801
|
-
__name(getDate, "getDate");
|
143802
|
-
function log2(...args) {
|
143803
|
-
return process.stderr.write(util5.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
|
143804
|
-
}
|
143805
|
-
__name(log2, "log");
|
143806
|
-
function save(namespaces) {
|
143807
|
-
if (namespaces) {
|
143808
|
-
process.env.DEBUG = namespaces;
|
143809
|
-
} else {
|
143810
|
-
delete process.env.DEBUG;
|
143811
|
-
}
|
143812
|
-
}
|
143813
|
-
__name(save, "save");
|
143814
|
-
function load() {
|
143815
|
-
return process.env.DEBUG;
|
143816
|
-
}
|
143817
|
-
__name(load, "load");
|
143818
|
-
function init3(debug) {
|
143819
|
-
debug.inspectOpts = {};
|
143820
|
-
const keys = Object.keys(exports2.inspectOpts);
|
143821
|
-
for (let i5 = 0; i5 < keys.length; i5++) {
|
143822
|
-
debug.inspectOpts[keys[i5]] = exports2.inspectOpts[keys[i5]];
|
143823
|
-
}
|
143824
|
-
}
|
143825
|
-
__name(init3, "init");
|
143826
|
-
module3.exports = require_common2()(exports2);
|
143827
|
-
var { formatters } = module3.exports;
|
143828
|
-
formatters.o = function(v7) {
|
143829
|
-
this.inspectOpts.colors = this.useColors;
|
143830
|
-
return util5.inspect(v7, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
|
143831
|
-
};
|
143832
|
-
formatters.O = function(v7) {
|
143833
|
-
this.inspectOpts.colors = this.useColors;
|
143834
|
-
return util5.inspect(v7, this.inspectOpts);
|
143835
|
-
};
|
143836
|
-
}
|
143837
|
-
});
|
143838
|
-
|
143839
|
-
// ../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/index.js
|
143840
|
-
var require_src4 = __commonJS({
|
143841
|
-
"../../node_modules/.pnpm/debug@4.4.1_supports-color@9.2.2/node_modules/debug/src/index.js"(exports2, module3) {
|
143842
|
-
init_import_meta_url();
|
143843
|
-
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
143844
|
-
module3.exports = require_browser2();
|
143845
|
-
} else {
|
143846
|
-
module3.exports = require_node5();
|
143847
|
-
}
|
143848
|
-
}
|
143849
|
-
});
|
143850
|
-
|
143851
143201
|
// ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@9.2.2/node_modules/agent-base/dist/src/promisify.js
|
143852
143202
|
var require_promisify = __commonJS({
|
143853
143203
|
"../../node_modules/.pnpm/agent-base@6.0.2_supports-color@9.2.2/node_modules/agent-base/dist/src/promisify.js"(exports2) {
|
@@ -143873,7 +143223,7 @@ var require_promisify = __commonJS({
|
|
143873
143223
|
});
|
143874
143224
|
|
143875
143225
|
// ../../node_modules/.pnpm/agent-base@6.0.2_supports-color@9.2.2/node_modules/agent-base/dist/src/index.js
|
143876
|
-
var
|
143226
|
+
var require_src4 = __commonJS({
|
143877
143227
|
"../../node_modules/.pnpm/agent-base@6.0.2_supports-color@9.2.2/node_modules/agent-base/dist/src/index.js"(exports2, module3) {
|
143878
143228
|
"use strict";
|
143879
143229
|
init_import_meta_url();
|
@@ -143881,7 +143231,7 @@ var require_src5 = __commonJS({
|
|
143881
143231
|
return mod && mod.__esModule ? mod : { "default": mod };
|
143882
143232
|
};
|
143883
143233
|
var events_1 = require("events");
|
143884
|
-
var debug_1 = __importDefault(
|
143234
|
+
var debug_1 = __importDefault(require_src3());
|
143885
143235
|
var promisify_1 = __importDefault(require_promisify());
|
143886
143236
|
var debug = debug_1.default("agent-base");
|
143887
143237
|
function isAgent(v7) {
|
@@ -144071,7 +143421,7 @@ var require_parse_proxy_response2 = __commonJS({
|
|
144071
143421
|
return mod && mod.__esModule ? mod : { "default": mod };
|
144072
143422
|
};
|
144073
143423
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
144074
|
-
var debug_1 = __importDefault(
|
143424
|
+
var debug_1 = __importDefault(require_src3());
|
144075
143425
|
var debug = debug_1.default("https-proxy-agent:parse-proxy-response");
|
144076
143426
|
function parseProxyResponse(socket) {
|
144077
143427
|
return new Promise((resolve24, reject) => {
|
@@ -144180,8 +143530,8 @@ var require_agent2 = __commonJS({
|
|
144180
143530
|
var tls_1 = __importDefault(require("tls"));
|
144181
143531
|
var url_1 = __importDefault(require("url"));
|
144182
143532
|
var assert_1 = __importDefault(require("assert"));
|
144183
|
-
var debug_1 = __importDefault(
|
144184
|
-
var agent_base_1 =
|
143533
|
+
var debug_1 = __importDefault(require_src3());
|
143534
|
+
var agent_base_1 = require_src4();
|
144185
143535
|
var parse_proxy_response_1 = __importDefault(require_parse_proxy_response2());
|
144186
143536
|
var debug = debug_1.default("https-proxy-agent:agent");
|
144187
143537
|
var HttpsProxyAgent3 = class extends agent_base_1.Agent {
|
@@ -157380,7 +156730,7 @@ async function analyseBundle(workerBundle) {
|
|
157380
156730
|
{
|
157381
156731
|
type: "ESModule",
|
157382
156732
|
// Make sure the entrypoint path doesn't conflict with a user worker module
|
157383
|
-
path: (0,
|
156733
|
+
path: (0, import_crypto7.randomUUID)(),
|
157384
156734
|
contents: (
|
157385
156735
|
/* javascript */
|
157386
156736
|
`
|
@@ -157418,11 +156768,11 @@ async function analyseBundle(workerBundle) {
|
|
157418
156768
|
ws.send(JSON.stringify({ id: 3, method: "Profiler.stop", params: {} }));
|
157419
156769
|
return cpuProfileResult;
|
157420
156770
|
}
|
157421
|
-
var
|
156771
|
+
var import_crypto7, import_promises32, import_node_events3, import_promises33, import_path26, import_miniflare21, mimeTypeModuleType, checkNamespace, checkStartupCommand;
|
157422
156772
|
var init_commands9 = __esm({
|
157423
156773
|
"src/check/commands.ts"() {
|
157424
156774
|
init_import_meta_url();
|
157425
|
-
|
156775
|
+
import_crypto7 = require("crypto");
|
157426
156776
|
import_promises32 = require("fs/promises");
|
157427
156777
|
import_node_events3 = __toESM(require("events"));
|
157428
156778
|
import_promises33 = require("fs/promises");
|
@@ -157698,12 +157048,15 @@ Edits that have been made via the script API will be overridden by your local co
|
|
157698
157048
|
}
|
157699
157049
|
if (!(props.compatibilityDate || config.compatibility_date)) {
|
157700
157050
|
const compatibilityDateStr = `${(/* @__PURE__ */ new Date()).getFullYear()}-${((/* @__PURE__ */ new Date()).getMonth() + 1 + "").padStart(2, "0")}-${((/* @__PURE__ */ new Date()).getDate() + "").padStart(2, "0")}`;
|
157701
|
-
throw new UserError(
|
157051
|
+
throw new UserError(
|
157052
|
+
`A compatibility_date is required when publishing. Add the following to your ${configFileName(config.configPath)} file:
|
157702
157053
|
\`\`\`
|
157703
157054
|
${formatConfigSnippet({ compatibility_date: compatibilityDateStr }, config.configPath, false)}
|
157704
157055
|
\`\`\`
|
157705
157056
|
Or you could pass it in your terminal as \`--compatibility-date ${compatibilityDateStr}\`
|
157706
|
-
See https://developers.cloudflare.com/workers/platform/compatibility-dates for more information
|
157057
|
+
See https://developers.cloudflare.com/workers/platform/compatibility-dates for more information.`,
|
157058
|
+
{ telemetryMessage: "missing compatibiltiy date when deploying" }
|
157059
|
+
);
|
157707
157060
|
}
|
157708
157061
|
const routes = props.routes ?? config.routes ?? (config.route ? [config.route] : []) ?? [];
|
157709
157062
|
validateRoutes3(routes, props.assetsOptions);
|
@@ -157759,22 +157112,26 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
157759
157112
|
}
|
157760
157113
|
if (!props.isWorkersSite && Boolean(props.legacyAssetPaths) && format9 === "service-worker") {
|
157761
157114
|
throw new UserError(
|
157762
|
-
"You cannot use the service-worker format with an `assets` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/"
|
157115
|
+
"You cannot use the service-worker format with an `assets` directory yet. For information on how to migrate to the module-worker format, see: https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/",
|
157116
|
+
{ telemetryMessage: true }
|
157763
157117
|
);
|
157764
157118
|
}
|
157765
157119
|
if (config.wasm_modules && format9 === "modules") {
|
157766
157120
|
throw new UserError(
|
157767
|
-
"You cannot configure [wasm_modules] with an ES module worker. Instead, import the .wasm module directly in your code"
|
157121
|
+
"You cannot configure [wasm_modules] with an ES module worker. Instead, import the .wasm module directly in your code",
|
157122
|
+
{ telemetryMessage: true }
|
157768
157123
|
);
|
157769
157124
|
}
|
157770
157125
|
if (config.text_blobs && format9 === "modules") {
|
157771
157126
|
throw new UserError(
|
157772
|
-
`You cannot configure [text_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file
|
157127
|
+
`You cannot configure [text_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`,
|
157128
|
+
{ telemetryMessage: "[text_blobs] with an ES module worker" }
|
157773
157129
|
);
|
157774
157130
|
}
|
157775
157131
|
if (config.data_blobs && format9 === "modules") {
|
157776
157132
|
throw new UserError(
|
157777
|
-
`You cannot configure [data_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file
|
157133
|
+
`You cannot configure [data_blobs] with an ES module worker. Instead, import the file directly in your code, and optionally configure \`[rules]\` in your ${configFileName(config.configPath)} file`,
|
157134
|
+
{ telemetryMessage: "[data_blobs] with an ES module worker" }
|
157778
157135
|
);
|
157779
157136
|
}
|
157780
157137
|
let sourceMapSize;
|
@@ -158112,7 +157469,8 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m
|
|
158112
157469
|
err.preventReport();
|
158113
157470
|
if (err.notes[0].text === "binding DB of type d1 must have a valid `id` specified [code: 10021]") {
|
158114
157471
|
throw new UserError(
|
158115
|
-
"You must use a real database in the database_id configuration. You can find your databases using 'wrangler d1 list', or read how to develop locally with D1 here: https://developers.cloudflare.com/d1/configuration/local-development"
|
157472
|
+
"You must use a real database in the database_id configuration. You can find your databases using 'wrangler d1 list', or read how to develop locally with D1 here: https://developers.cloudflare.com/d1/configuration/local-development",
|
157473
|
+
{ telemetryMessage: true }
|
158116
157474
|
);
|
158117
157475
|
}
|
158118
157476
|
const maybeNameToFilePath = /* @__PURE__ */ __name((moduleName) => {
|
@@ -158220,7 +157578,8 @@ async function publishRoutesFallback(complianceConfig, routes, {
|
|
158220
157578
|
}) {
|
158221
157579
|
if (notProd) {
|
158222
157580
|
throw new UserError(
|
158223
|
-
"Service environments combined with an API token that doesn't have 'All Zones' permissions is not supported.\nEither turn off service environments by setting `legacy_env = true`, creating an API token with 'All Zones' permissions, or logging in via OAuth"
|
157581
|
+
"Service environments combined with an API token that doesn't have 'All Zones' permissions is not supported.\nEither turn off service environments by setting `legacy_env = true`, creating an API token with 'All Zones' permissions, or logging in via OAuth",
|
157582
|
+
{ telemetryMessage: true }
|
158224
157583
|
);
|
158225
157584
|
}
|
158226
157585
|
logger.warn(
|
@@ -158283,7 +157642,8 @@ async function publishRoutesFallback(complianceConfig, routes, {
|
|
158283
157642
|
continue;
|
158284
157643
|
} else {
|
158285
157644
|
throw new UserError(
|
158286
|
-
`The route with pattern "${routePattern}" is already associated with another worker called "${knownScript}"
|
157645
|
+
`The route with pattern "${routePattern}" is already associated with another worker called "${knownScript}".`,
|
157646
|
+
{ telemetryMessage: "route already associated with another worker" }
|
158287
157647
|
);
|
158288
157648
|
}
|
158289
157649
|
}
|
@@ -158368,7 +157728,8 @@ async function updateQueueConsumers(scriptName, config) {
|
|
158368
157728
|
} else {
|
158369
157729
|
if (scriptName === void 0) {
|
158370
157730
|
throw new UserError(
|
158371
|
-
"Script name is required to update queue consumers"
|
157731
|
+
"Script name is required to update queue consumers",
|
157732
|
+
{ telemetryMessage: true }
|
158372
157733
|
);
|
158373
157734
|
}
|
158374
157735
|
const body = {
|
@@ -158591,7 +157952,8 @@ ${directory}`,
|
|
158591
157952
|
}
|
158592
157953
|
if (!routerConfig.has_user_worker && (routerConfig.invoke_user_worker_ahead_of_assets === true || routerConfig.static_routing)) {
|
158593
157954
|
throw new UserError(
|
158594
|
-
"Cannot set run_worker_first without a Worker script.\nPlease remove run_worker_first from your configuration file, or provide a Worker script in your configuration file (`main`)."
|
157955
|
+
"Cannot set run_worker_first without a Worker script.\nPlease remove run_worker_first from your configuration file, or provide a Worker script in your configuration file (`main`).",
|
157956
|
+
{ telemetryMessage: true }
|
158595
157957
|
);
|
158596
157958
|
}
|
158597
157959
|
const _redirects = maybeGetFile(path60.join(directory, REDIRECTS_FILENAME));
|
@@ -158617,7 +157979,8 @@ ${directory}`,
|
|
158617
157979
|
function validateAssetsArgsAndConfig(args, config) {
|
158618
157980
|
if ("legacy" in args ? args.assets && args.legacy.site : (args.assets || config?.assets) && (args.site || config?.site)) {
|
158619
157981
|
throw new UserError(
|
158620
|
-
"Cannot use assets and Workers Sites in the same Worker.\nPlease remove either the `site` or `assets` field from your configuration file."
|
157982
|
+
"Cannot use assets and Workers Sites in the same Worker.\nPlease remove either the `site` or `assets` field from your configuration file.",
|
157983
|
+
{ telemetryMessage: true }
|
158621
157984
|
);
|
158622
157985
|
}
|
158623
157986
|
const noOpEntrypoint = path60.resolve(
|
@@ -159285,11 +158648,18 @@ If you are trying to develop Pages and Workers together, please use \`wrangler p
|
|
159285
158648
|
if (resolved.dev.remote && (queues?.length || resolved.triggers?.some((t7) => t7.type === "queue-consumer"))) {
|
159286
158649
|
logger.warn("Queues are not yet supported in wrangler dev remote mode.");
|
159287
158650
|
}
|
159288
|
-
|
159289
|
-
resolved.
|
159290
|
-
|
159291
|
-
|
159292
|
-
|
158651
|
+
if (resolved.dev.remote) {
|
158652
|
+
if (resolved.dev.enableContainers && resolved.containers && resolved.containers.length > 0) {
|
158653
|
+
logger.warn(
|
158654
|
+
"Containers are only supported in local mode, to suppress this warning set `dev.enable_containers` to `false` or pass `--enable-containers=false` to the `wrangler dev` command"
|
158655
|
+
);
|
158656
|
+
}
|
158657
|
+
const classNamesWhichUseSQLite = getClassNamesWhichUseSQLite(
|
158658
|
+
resolved.migrations
|
158659
|
+
);
|
158660
|
+
if (resolved.dev.remote && Array.from(classNamesWhichUseSQLite.values()).some((v7) => v7)) {
|
158661
|
+
logger.warn("SQLite in Durable Objects is only supported in local mode.");
|
158662
|
+
}
|
159293
158663
|
}
|
159294
158664
|
const typesChanged = await checkTypesDiff(config, entry);
|
159295
158665
|
if (typesChanged) {
|
@@ -179740,20 +179110,20 @@ var init_LocalRuntimeController = __esm({
|
|
179740
179110
|
}
|
179741
179111
|
if (containerOptions && this.#currentContainerBuildId !== data.config.dev.containerBuildId) {
|
179742
179112
|
logger.log(source_default.dim("\u2394 Preparing container image(s)..."));
|
179743
|
-
await prepareContainerImagesForDev(
|
179744
|
-
this.#dockerPath,
|
179113
|
+
await prepareContainerImagesForDev({
|
179114
|
+
dockerPath: this.#dockerPath,
|
179115
|
+
configPath: data.config.config,
|
179745
179116
|
containerOptions,
|
179746
|
-
|
179747
|
-
(buildStartEvent) => {
|
179117
|
+
onContainerImagePreparationStart: /* @__PURE__ */ __name((buildStartEvent) => {
|
179748
179118
|
this.containerBeingBuilt = {
|
179749
179119
|
...buildStartEvent,
|
179750
179120
|
abortRequested: false
|
179751
179121
|
};
|
179752
|
-
},
|
179753
|
-
() => {
|
179122
|
+
}, "onContainerImagePreparationStart"),
|
179123
|
+
onContainerImagePreparationEnd: /* @__PURE__ */ __name(() => {
|
179754
179124
|
this.containerBeingBuilt = void 0;
|
179755
|
-
}
|
179756
|
-
);
|
179125
|
+
}, "onContainerImagePreparationEnd")
|
179126
|
+
});
|
179757
179127
|
if (this.containerBeingBuilt) {
|
179758
179128
|
this.containerBeingBuilt.abortRequested = false;
|
179759
179129
|
}
|
@@ -180477,7 +179847,7 @@ function registerDevHotKeys(devEnv, args) {
|
|
180477
179847
|
}
|
180478
179848
|
}
|
180479
179849
|
});
|
180480
|
-
const newContainerBuildId = (0,
|
179850
|
+
const newContainerBuildId = (0, import_crypto8.randomUUID)().slice(0, 8);
|
180481
179851
|
await Promise.all(
|
180482
179852
|
devEnv.runtimes.map(async (runtime) => {
|
180483
179853
|
if (runtime instanceof LocalRuntimeController) {
|
@@ -180535,11 +179905,11 @@ function registerDevHotKeys(devEnv, args) {
|
|
180535
179905
|
]);
|
180536
179906
|
return unregisterHotKeys;
|
180537
179907
|
}
|
180538
|
-
var
|
179908
|
+
var import_crypto8;
|
180539
179909
|
var init_hotkeys = __esm({
|
180540
179910
|
"src/dev/hotkeys.ts"() {
|
180541
179911
|
init_import_meta_url();
|
180542
|
-
|
179912
|
+
import_crypto8 = require("crypto");
|
180543
179913
|
init_LocalRuntimeController();
|
180544
179914
|
init_cli_hotkeys();
|
180545
179915
|
init_logger();
|
@@ -183014,7 +182384,7 @@ async function setupDevEnv(devEnv, configPath, auth, args) {
|
|
183014
182384
|
enableContainers: args.enableContainers,
|
183015
182385
|
dockerPath: args.dockerPath,
|
183016
182386
|
// initialise with a random id
|
183017
|
-
containerBuildId: (
|
182387
|
+
containerBuildId: generateContainerBuildId()
|
183018
182388
|
},
|
183019
182389
|
legacy: {
|
183020
182390
|
site: /* @__PURE__ */ __name((configParam) => {
|
@@ -183241,7 +182611,10 @@ function getBindings2(configParam, env6, local, args, remoteBindingsEnabled = ge
|
|
183241
182611
|
({ binding, preview_id, id, experimental_remote }) => {
|
183242
182612
|
if (!preview_id && !local) {
|
183243
182613
|
throw new UserError(
|
183244
|
-
`In development, you should use a separate kv namespace than the one you'd use in production. Please create a new kv namespace with "wrangler kv namespace create <name> --preview" and add its id as preview_id to the kv_namespace "${binding}" in your ${configFileName(configParam.configPath)} file
|
182614
|
+
`In development, you should use a separate kv namespace than the one you'd use in production. Please create a new kv namespace with "wrangler kv namespace create <name> --preview" and add its id as preview_id to the kv_namespace "${binding}" in your ${configFileName(configParam.configPath)} file`,
|
182615
|
+
{
|
182616
|
+
telemetryMessage: "no preview kv namespace configured in remote dev"
|
182617
|
+
}
|
183245
182618
|
);
|
183246
182619
|
}
|
183247
182620
|
return {
|
@@ -183288,7 +182661,10 @@ function getBindings2(configParam, env6, local, args, remoteBindingsEnabled = ge
|
|
183288
182661
|
}) => {
|
183289
182662
|
if (!preview_bucket_name && !local) {
|
183290
182663
|
throw new UserError(
|
183291
|
-
`In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create <name>" and add its name as preview_bucket_name to the r2_buckets "${binding}" in your ${configFileName(configParam.configPath)} file
|
182664
|
+
`In development, you should use a separate r2 bucket than the one you'd use in production. Please create a new r2 bucket with "wrangler r2 bucket create <name>" and add its name as preview_bucket_name to the r2_buckets "${binding}" in your ${configFileName(configParam.configPath)} file`,
|
182665
|
+
{
|
182666
|
+
telemetryMessage: "no preview r2 bucket configured in remote dev"
|
182667
|
+
}
|
183292
182668
|
);
|
183293
182669
|
}
|
183294
182670
|
return {
|
@@ -183317,7 +182693,8 @@ function getBindings2(configParam, env6, local, args, remoteBindingsEnabled = ge
|
|
183317
182693
|
const connectionStringFromEnv = process.env[`WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive.binding}`];
|
183318
182694
|
if (local && connectionStringFromEnv === void 0 && hyperdrive.localConnectionString === void 0) {
|
183319
182695
|
throw new UserError(
|
183320
|
-
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string
|
182696
|
+
`When developing locally, you should use a local Postgres connection string to emulate Hyperdrive functionality. Please setup Postgres locally and set the value of the 'WRANGLER_HYPERDRIVE_LOCAL_CONNECTION_STRING_${hyperdrive.binding}' variable or "${hyperdrive.binding}"'s "localConnectionString" to the Postgres connection string.`,
|
182697
|
+
{ telemetryMessage: "no local hyperdrive connection string" }
|
183321
182698
|
);
|
183322
182699
|
}
|
183323
182700
|
if (connectionStringFromEnv) {
|
@@ -183400,16 +182777,16 @@ function getAssetChangeMessage(eventName, assetPath) {
|
|
183400
182777
|
}
|
183401
182778
|
return message;
|
183402
182779
|
}
|
183403
|
-
var import_node_assert35,
|
182780
|
+
var import_node_assert35, import_node_events6, import_node_path67, import_node_util3, import_env2, dev;
|
183404
182781
|
var init_dev2 = __esm({
|
183405
182782
|
"src/dev.ts"() {
|
183406
182783
|
init_import_meta_url();
|
183407
182784
|
import_node_assert35 = __toESM(require("assert"));
|
183408
|
-
import_node_crypto16 = require("crypto");
|
183409
182785
|
import_node_events6 = __toESM(require("events"));
|
183410
182786
|
import_node_path67 = __toESM(require("path"));
|
183411
182787
|
import_node_util3 = __toESM(require("util"));
|
183412
182788
|
init_colors();
|
182789
|
+
init_containers_shared();
|
183413
182790
|
import_env2 = __toESM(require_dist());
|
183414
182791
|
init_esm2();
|
183415
182792
|
init_api3();
|
@@ -184205,8 +183582,8 @@ function unstable_getMiniflareWorkerOptions(configOrConfigPath, env6, options) {
|
|
184205
183582
|
migrations: config.migrations,
|
184206
183583
|
imagesLocalMode: !!options?.imagesLocalMode,
|
184207
183584
|
tails: config.tail_consumers,
|
184208
|
-
containers:
|
184209
|
-
containerBuildId:
|
183585
|
+
containers: config.containers,
|
183586
|
+
containerBuildId: options?.containerBuildId
|
184210
183587
|
},
|
184211
183588
|
options?.remoteProxyConnectionString,
|
184212
183589
|
options?.remoteBindingsEnabled ?? false
|
@@ -184239,7 +183616,12 @@ function unstable_getMiniflareWorkerOptions(configOrConfigPath, env6, options) {
|
|
184239
183616
|
{
|
184240
183617
|
className: binding.class_name,
|
184241
183618
|
scriptName: binding.script_name,
|
184242
|
-
useSQLite
|
183619
|
+
useSQLite,
|
183620
|
+
container: getImageNameFromDOClassName({
|
183621
|
+
doClassName: binding.class_name,
|
183622
|
+
containers: config.containers,
|
183623
|
+
containerBuildId: options?.containerBuildId
|
183624
|
+
})
|
184243
183625
|
}
|
184244
183626
|
];
|
184245
183627
|
})
|
@@ -184257,6 +183639,7 @@ function unstable_getMiniflareWorkerOptions(configOrConfigPath, env6, options) {
|
|
184257
183639
|
compatibilityDate: config.compatibility_date,
|
184258
183640
|
compatibilityFlags: config.compatibility_flags,
|
184259
183641
|
modulesRules,
|
183642
|
+
containerEngine: config.dev.container_engine ?? getDockerHost(),
|
184260
183643
|
...bindingOptions,
|
184261
183644
|
...sitesOptions,
|
184262
183645
|
...assetOptions
|
@@ -184281,6 +183664,7 @@ var init_platform = __esm({
|
|
184281
183664
|
init_dev_registry();
|
184282
183665
|
init_class_names_sqlite();
|
184283
183666
|
init_miniflare();
|
183667
|
+
init_misc_variables();
|
184284
183668
|
init_logger();
|
184285
183669
|
init_sites();
|
184286
183670
|
init_dedent();
|