wrangler 3.107.1 → 3.107.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4603,7 +4603,7 @@ var require_file = __commonJS({
4603
4603
  var { parseMIMEType, serializeAMimeType } = require_dataURL();
4604
4604
  var { kEnumerableProperty } = require_util();
4605
4605
  var encoder = new TextEncoder();
4606
- var File8 = class extends Blob6 {
4606
+ var File7 = class extends Blob6 {
4607
4607
  constructor(fileBits, fileName, options30 = {}) {
4608
4608
  webidl.argumentLengthCheck(arguments, 2, { header: "File constructor" });
4609
4609
  fileBits = webidl.converters["sequence<BlobPart>"](fileBits);
@@ -4631,19 +4631,19 @@ var require_file = __commonJS({
4631
4631
  };
4632
4632
  }
4633
4633
  get name() {
4634
- webidl.brandCheck(this, File8);
4634
+ webidl.brandCheck(this, File7);
4635
4635
  return this[kState].name;
4636
4636
  }
4637
4637
  get lastModified() {
4638
- webidl.brandCheck(this, File8);
4638
+ webidl.brandCheck(this, File7);
4639
4639
  return this[kState].lastModified;
4640
4640
  }
4641
4641
  get type() {
4642
- webidl.brandCheck(this, File8);
4642
+ webidl.brandCheck(this, File7);
4643
4643
  return this[kState].type;
4644
4644
  }
4645
4645
  };
4646
- __name(File8, "File");
4646
+ __name(File7, "File");
4647
4647
  var FileLike = class {
4648
4648
  constructor(blobLike, fileName, options30 = {}) {
4649
4649
  const n6 = fileName;
@@ -4693,7 +4693,7 @@ var require_file = __commonJS({
4693
4693
  }
4694
4694
  };
4695
4695
  __name(FileLike, "FileLike");
4696
- Object.defineProperties(File8.prototype, {
4696
+ Object.defineProperties(File7.prototype, {
4697
4697
  [Symbol.toStringTag]: {
4698
4698
  value: "File",
4699
4699
  configurable: true
@@ -4775,10 +4775,10 @@ var require_file = __commonJS({
4775
4775
  }
4776
4776
  __name(convertLineEndingsNative, "convertLineEndingsNative");
4777
4777
  function isFileLike(object) {
4778
- return NativeFile && object instanceof NativeFile || object instanceof File8 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File";
4778
+ return NativeFile && object instanceof NativeFile || object instanceof File7 || object && (typeof object.stream === "function" || typeof object.arrayBuffer === "function") && object[Symbol.toStringTag] === "File";
4779
4779
  }
4780
4780
  __name(isFileLike, "isFileLike");
4781
- module3.exports = { File: File8, FileLike, isFileLike };
4781
+ module3.exports = { File: File7, FileLike, isFileLike };
4782
4782
  }
4783
4783
  });
4784
4784
 
@@ -4792,7 +4792,7 @@ var require_formdata = __commonJS({
4792
4792
  var { File: UndiciFile, FileLike, isFileLike } = require_file();
4793
4793
  var { webidl } = require_webidl();
4794
4794
  var { Blob: Blob6, File: NativeFile } = require("buffer");
4795
- var File8 = NativeFile ?? UndiciFile;
4795
+ var File7 = NativeFile ?? UndiciFile;
4796
4796
  var FormData11 = class {
4797
4797
  constructor(form) {
4798
4798
  if (form !== void 0) {
@@ -4924,14 +4924,14 @@ var require_formdata = __commonJS({
4924
4924
  value = Buffer.from(value).toString("utf8");
4925
4925
  } else {
4926
4926
  if (!isFileLike(value)) {
4927
- value = value instanceof Blob6 ? new File8([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type });
4927
+ value = value instanceof Blob6 ? new File7([value], "blob", { type: value.type }) : new FileLike(value, "blob", { type: value.type });
4928
4928
  }
4929
4929
  if (filename !== void 0) {
4930
4930
  const options30 = {
4931
4931
  type: value.type,
4932
4932
  lastModified: value.lastModified
4933
4933
  };
4934
- value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File8([value], filename, options30) : new FileLike(value, filename, options30);
4934
+ value = NativeFile && value instanceof NativeFile || value instanceof UndiciFile ? new File7([value], filename, options30) : new FileLike(value, filename, options30);
4935
4935
  }
4936
4936
  }
4937
4937
  return { name: name2, value };
@@ -4968,7 +4968,7 @@ var require_body = __commonJS({
4968
4968
  var { File: UndiciFile } = require_file();
4969
4969
  var { parseMIMEType, serializeAMimeType } = require_dataURL();
4970
4970
  var ReadableStream3 = globalThis.ReadableStream;
4971
- var File8 = NativeFile ?? UndiciFile;
4971
+ var File7 = NativeFile ?? UndiciFile;
4972
4972
  var textEncoder = new TextEncoder();
4973
4973
  var textDecoder = new TextDecoder();
4974
4974
  function extractBody(object, keepalive = false) {
@@ -5209,14 +5209,14 @@ Content-Type: ${value.type || "application/octet-stream"}\r
5209
5209
  });
5210
5210
  value.on("end", () => {
5211
5211
  chunks.push(Buffer.from(base64chunk, "base64"));
5212
- responseFormData.append(name2, new File8(chunks, filename, { type: mimeType }));
5212
+ responseFormData.append(name2, new File7(chunks, filename, { type: mimeType }));
5213
5213
  });
5214
5214
  } else {
5215
5215
  value.on("data", (chunk) => {
5216
5216
  chunks.push(chunk);
5217
5217
  });
5218
5218
  value.on("end", () => {
5219
- responseFormData.append(name2, new File8(chunks, filename, { type: mimeType }));
5219
+ responseFormData.append(name2, new File7(chunks, filename, { type: mimeType }));
5220
5220
  });
5221
5221
  }
5222
5222
  });
@@ -11837,11 +11837,11 @@ var require_response = __commonJS({
11837
11837
  var { types } = require("util");
11838
11838
  var ReadableStream3 = globalThis.ReadableStream || require("stream/web").ReadableStream;
11839
11839
  var textEncoder = new TextEncoder("utf-8");
11840
- var Response11 = class {
11840
+ var Response10 = class {
11841
11841
  // Creates network error Response.
11842
11842
  static error() {
11843
11843
  const relevantRealm = { settingsObject: {} };
11844
- const responseObject = new Response11();
11844
+ const responseObject = new Response10();
11845
11845
  responseObject[kState] = makeNetworkError();
11846
11846
  responseObject[kRealm] = relevantRealm;
11847
11847
  responseObject[kHeaders][kHeadersList] = responseObject[kState].headersList;
@@ -11860,7 +11860,7 @@ var require_response = __commonJS({
11860
11860
  );
11861
11861
  const body = extractBody(bytes);
11862
11862
  const relevantRealm = { settingsObject: {} };
11863
- const responseObject = new Response11();
11863
+ const responseObject = new Response10();
11864
11864
  responseObject[kRealm] = relevantRealm;
11865
11865
  responseObject[kHeaders][kGuard] = "response";
11866
11866
  responseObject[kHeaders][kRealm] = relevantRealm;
@@ -11884,7 +11884,7 @@ var require_response = __commonJS({
11884
11884
  if (!redirectStatusSet.has(status2)) {
11885
11885
  throw new RangeError("Invalid status code " + status2);
11886
11886
  }
11887
- const responseObject = new Response11();
11887
+ const responseObject = new Response10();
11888
11888
  responseObject[kRealm] = relevantRealm;
11889
11889
  responseObject[kHeaders][kGuard] = "immutable";
11890
11890
  responseObject[kHeaders][kRealm] = relevantRealm;
@@ -11914,12 +11914,12 @@ var require_response = __commonJS({
11914
11914
  }
11915
11915
  // Returns response’s type, e.g., "cors".
11916
11916
  get type() {
11917
- webidl.brandCheck(this, Response11);
11917
+ webidl.brandCheck(this, Response10);
11918
11918
  return this[kState].type;
11919
11919
  }
11920
11920
  // Returns response’s URL, if it has one; otherwise the empty string.
11921
11921
  get url() {
11922
- webidl.brandCheck(this, Response11);
11922
+ webidl.brandCheck(this, Response10);
11923
11923
  const urlList = this[kState].urlList;
11924
11924
  const url4 = urlList[urlList.length - 1] ?? null;
11925
11925
  if (url4 === null) {
@@ -11929,40 +11929,40 @@ var require_response = __commonJS({
11929
11929
  }
11930
11930
  // Returns whether response was obtained through a redirect.
11931
11931
  get redirected() {
11932
- webidl.brandCheck(this, Response11);
11932
+ webidl.brandCheck(this, Response10);
11933
11933
  return this[kState].urlList.length > 1;
11934
11934
  }
11935
11935
  // Returns response’s status.
11936
11936
  get status() {
11937
- webidl.brandCheck(this, Response11);
11937
+ webidl.brandCheck(this, Response10);
11938
11938
  return this[kState].status;
11939
11939
  }
11940
11940
  // Returns whether response’s status is an ok status.
11941
11941
  get ok() {
11942
- webidl.brandCheck(this, Response11);
11942
+ webidl.brandCheck(this, Response10);
11943
11943
  return this[kState].status >= 200 && this[kState].status <= 299;
11944
11944
  }
11945
11945
  // Returns response’s status message.
11946
11946
  get statusText() {
11947
- webidl.brandCheck(this, Response11);
11947
+ webidl.brandCheck(this, Response10);
11948
11948
  return this[kState].statusText;
11949
11949
  }
11950
11950
  // Returns response’s headers as Headers.
11951
11951
  get headers() {
11952
- webidl.brandCheck(this, Response11);
11952
+ webidl.brandCheck(this, Response10);
11953
11953
  return this[kHeaders];
11954
11954
  }
11955
11955
  get body() {
11956
- webidl.brandCheck(this, Response11);
11956
+ webidl.brandCheck(this, Response10);
11957
11957
  return this[kState].body ? this[kState].body.stream : null;
11958
11958
  }
11959
11959
  get bodyUsed() {
11960
- webidl.brandCheck(this, Response11);
11960
+ webidl.brandCheck(this, Response10);
11961
11961
  return !!this[kState].body && util5.isDisturbed(this[kState].body.stream);
11962
11962
  }
11963
11963
  // Returns a clone of response.
11964
11964
  clone() {
11965
- webidl.brandCheck(this, Response11);
11965
+ webidl.brandCheck(this, Response10);
11966
11966
  if (this.bodyUsed || this.body && this.body.locked) {
11967
11967
  throw webidl.errors.exception({
11968
11968
  header: "Response.clone",
@@ -11970,7 +11970,7 @@ var require_response = __commonJS({
11970
11970
  });
11971
11971
  }
11972
11972
  const clonedResponse = cloneResponse(this[kState]);
11973
- const clonedResponseObject = new Response11();
11973
+ const clonedResponseObject = new Response10();
11974
11974
  clonedResponseObject[kState] = clonedResponse;
11975
11975
  clonedResponseObject[kRealm] = this[kRealm];
11976
11976
  clonedResponseObject[kHeaders][kHeadersList] = clonedResponse.headersList;
@@ -11979,9 +11979,9 @@ var require_response = __commonJS({
11979
11979
  return clonedResponseObject;
11980
11980
  }
11981
11981
  };
11982
- __name(Response11, "Response");
11983
- mixinBody(Response11);
11984
- Object.defineProperties(Response11.prototype, {
11982
+ __name(Response10, "Response");
11983
+ mixinBody(Response10);
11984
+ Object.defineProperties(Response10.prototype, {
11985
11985
  type: kEnumerableProperty,
11986
11986
  url: kEnumerableProperty,
11987
11987
  status: kEnumerableProperty,
@@ -11997,7 +11997,7 @@ var require_response = __commonJS({
11997
11997
  configurable: true
11998
11998
  }
11999
11999
  });
12000
- Object.defineProperties(Response11, {
12000
+ Object.defineProperties(Response10, {
12001
12001
  json: kEnumerableProperty,
12002
12002
  redirect: kEnumerableProperty,
12003
12003
  error: kEnumerableProperty
@@ -12186,7 +12186,7 @@ var require_response = __commonJS({
12186
12186
  makeResponse,
12187
12187
  makeAppropriateNetworkError,
12188
12188
  filterResponse,
12189
- Response: Response11,
12189
+ Response: Response10,
12190
12190
  cloneResponse
12191
12191
  };
12192
12192
  }
@@ -12841,7 +12841,7 @@ var require_fetch = __commonJS({
12841
12841
  "use strict";
12842
12842
  init_import_meta_url();
12843
12843
  var {
12844
- Response: Response11,
12844
+ Response: Response10,
12845
12845
  makeNetworkError,
12846
12846
  makeAppropriateNetworkError,
12847
12847
  filterResponse,
@@ -12982,7 +12982,7 @@ var require_fetch = __commonJS({
12982
12982
  );
12983
12983
  return Promise.resolve();
12984
12984
  }
12985
- responseObject = new Response11();
12985
+ responseObject = new Response10();
12986
12986
  responseObject[kState] = response;
12987
12987
  responseObject[kRealm] = relevantRealm;
12988
12988
  responseObject[kHeaders][kHeadersList] = response.headersList;
@@ -14773,7 +14773,7 @@ var require_cache = __commonJS({
14773
14773
  var { kEnumerableProperty, isDisturbed } = require_util();
14774
14774
  var { kHeadersList } = require_symbols();
14775
14775
  var { webidl } = require_webidl();
14776
- var { Response: Response11, cloneResponse } = require_response();
14776
+ var { Response: Response10, cloneResponse } = require_response();
14777
14777
  var { Request: Request4 } = require_request2();
14778
14778
  var { kState, kHeaders, kGuard, kRealm } = require_symbols2();
14779
14779
  var { fetching } = require_fetch();
@@ -14832,7 +14832,7 @@ var require_cache = __commonJS({
14832
14832
  }
14833
14833
  const responseList = [];
14834
14834
  for (const response of responses) {
14835
- const responseObject = new Response11(response.body?.source ?? null);
14835
+ const responseObject = new Response10(response.body?.source ?? null);
14836
14836
  const body = responseObject[kState].body;
14837
14837
  responseObject[kState] = response;
14838
14838
  responseObject[kState].body = body;
@@ -15289,7 +15289,7 @@ var require_cache = __commonJS({
15289
15289
  converter: webidl.converters.DOMString
15290
15290
  }
15291
15291
  ]);
15292
- webidl.converters.Response = webidl.interfaceConverter(Response11);
15292
+ webidl.converters.Response = webidl.interfaceConverter(Response10);
15293
15293
  webidl.converters["sequence<RequestInfo>"] = webidl.sequenceConverter(
15294
15294
  webidl.converters.RequestInfo
15295
15295
  );
@@ -71460,7 +71460,7 @@ var require_src5 = __commonJS({
71460
71460
  QueueEvent: () => QueueEvent,
71461
71461
  ReloadEvent: () => ReloadEvent,
71462
71462
  Request: () => Request4,
71463
- Response: () => Response11,
71463
+ Response: () => Response10,
71464
71464
  Router: () => Router,
71465
71465
  RouterError: () => RouterError,
71466
71466
  ScheduledController: () => ScheduledController,
@@ -72419,14 +72419,14 @@ var require_src5 = __commonJS({
72419
72419
  "statusText",
72420
72420
  "status"
72421
72421
  ];
72422
- var Response11 = /* @__PURE__ */ __name(class extends Body {
72422
+ var Response10 = /* @__PURE__ */ __name(class extends Body {
72423
72423
  static redirect(url4, status2 = 302) {
72424
72424
  const res = import_undici26.Response.redirect(url4, status2);
72425
- return new Response11(res.body, res);
72425
+ return new Response10(res.body, res);
72426
72426
  }
72427
72427
  static json(data, init2) {
72428
72428
  const res = import_undici26.Response.json(data, init2);
72429
- return new Response11(res.body, res);
72429
+ return new Response10(res.body, res);
72430
72430
  }
72431
72431
  #encodeBody;
72432
72432
  #status;
@@ -72446,7 +72446,7 @@ var require_src5 = __commonJS({
72446
72446
  if (body instanceof import_web3.ReadableStream && _isByteStream(body)) {
72447
72447
  body = convertToRegularStream(body);
72448
72448
  }
72449
- if (init2 instanceof Response11) {
72449
+ if (init2 instanceof Response10) {
72450
72450
  encodeBody = init2.#encodeBody;
72451
72451
  status2 = init2.#status;
72452
72452
  webSocket = init2.#webSocket;
@@ -72476,7 +72476,7 @@ var require_src5 = __commonJS({
72476
72476
  if (contentLength !== void 0) {
72477
72477
  this.headers.set("content-length", contentLength.toString());
72478
72478
  }
72479
- makeEnumerable(Response11.prototype, this, enumerableResponseKeys);
72479
+ makeEnumerable(Response10.prototype, this, enumerableResponseKeys);
72480
72480
  Object.defineProperty(this, kWaitUntil, nonEnumerable);
72481
72481
  }
72482
72482
  clone() {
@@ -72485,7 +72485,7 @@ var require_src5 = __commonJS({
72485
72485
  }
72486
72486
  const innerClone = this[_kInner].clone();
72487
72487
  this[kBodyStream] = void 0;
72488
- const clone = new Response11(innerClone.body, innerClone);
72488
+ const clone = new Response10(innerClone.body, innerClone);
72489
72489
  clone[kInputGated] = this[kInputGated];
72490
72490
  clone[kFormDataFiles] = this[kFormDataFiles];
72491
72491
  clone.#encodeBody = this.#encodeBody;
@@ -72527,7 +72527,7 @@ var require_src5 = __commonJS({
72527
72527
  }
72528
72528
  }, "Response");
72529
72529
  function withWaitUntil(res, waitUntil) {
72530
- const resWaitUntil = res instanceof Response11 ? res : new Response11(res.body, res);
72530
+ const resWaitUntil = res instanceof Response10 ? res : new Response10(res.body, res);
72531
72531
  resWaitUntil[kWaitUntil] = waitUntil;
72532
72532
  return resWaitUntil;
72533
72533
  }
@@ -72537,7 +72537,7 @@ var require_src5 = __commonJS({
72537
72537
  }
72538
72538
  __name(_getURLList, "_getURLList");
72539
72539
  function _getBodyLength(res) {
72540
- if (res instanceof Response11)
72540
+ if (res instanceof Response10)
72541
72541
  res = res[_kInner];
72542
72542
  return res[fetchSymbols.kState]?.body?.length ?? void 0;
72543
72543
  }
@@ -72609,7 +72609,7 @@ var require_src5 = __commonJS({
72609
72609
  if (urlList)
72610
72610
  ctx.incrementExternalSubrequests(urlList.length - 1);
72611
72611
  }
72612
- const res = new Response11(nullBodyStatus.includes(baseRes.status) ? null : baseRes.body, baseRes);
72612
+ const res = new Response10(nullBodyStatus.includes(baseRes.status) ? null : baseRes.body, baseRes);
72613
72613
  res.headers[fetchSymbols.kGuard] = "immutable";
72614
72614
  await (0, import_shared5.waitForOpenInputGate)();
72615
72615
  ctx?.advanceCurrentTime();
@@ -72974,7 +72974,7 @@ ${SUGGEST_GLOBAL_BINDING_MODULES}`);
72974
72974
  event[kSent] = true;
72975
72975
  }
72976
72976
  if (res !== void 0) {
72977
- const validRes = res instanceof Response11 || res instanceof import_undici32.Response;
72977
+ const validRes = res instanceof Response10 || res instanceof import_undici32.Response;
72978
72978
  if (!validRes) {
72979
72979
  const suggestion = this.#modules ? SUGGEST_RES_MODULES : SUGGEST_RES;
72980
72980
  throw new FetchError("ERR_RESPONSE_TYPE", `Fetch handler didn't respond with a Response object.
@@ -73112,12 +73112,12 @@ Make sure you're ${suggestion}.`);
73112
73112
  function getRangeResponse(requestRangeHeader, responseStatus, responseHeaders, responseBody) {
73113
73113
  const ranges = parseRanges(requestRangeHeader, responseBody.byteLength);
73114
73114
  if (ranges === void 0) {
73115
- return new Response11(null, {
73115
+ return new Response10(null, {
73116
73116
  status: 416,
73117
73117
  headers: { "Content-Range": `bytes */${responseBody.byteLength}` }
73118
73118
  });
73119
73119
  } else if (ranges.length === 0) {
73120
- return new Response11(responseBody, {
73120
+ return new Response10(responseBody, {
73121
73121
  status: responseStatus,
73122
73122
  headers: responseHeaders
73123
73123
  });
@@ -73125,7 +73125,7 @@ Make sure you're ${suggestion}.`);
73125
73125
  const [start, end] = ranges[0];
73126
73126
  responseHeaders.set("Content-Range", `bytes ${start}-${end}/${responseBody.byteLength}`);
73127
73127
  responseHeaders.set("Content-Length", `${end - start + 1}`);
73128
- return new Response11(responseBody.slice(start, end + 1), {
73128
+ return new Response10(responseBody.slice(start, end + 1), {
73129
73129
  status: 206,
73130
73130
  headers: responseHeaders
73131
73131
  });
@@ -73152,7 +73152,7 @@ Content-Range: bytes ${start}-${end}/${responseBody.byteLength}\r
73152
73152
  }
73153
73153
  });
73154
73154
  responseHeaders.set("Content-Type", `multipart/byteranges; boundary=${boundary}`);
73155
- return new Response11(stream2, {
73155
+ return new Response10(stream2, {
73156
73156
  status: 206,
73157
73157
  headers: responseHeaders
73158
73158
  });
@@ -73559,7 +73559,7 @@ Make sure "${service}" is mounted so Miniflare knows where to find it.`);
73559
73559
  }
73560
73560
  }
73561
73561
  __name(_populateBuildConfig, "_populateBuildConfig");
73562
- var import_buffer6 = __toModule(require("buffer"));
73562
+ var import_buffer5 = __toModule(require("buffer"));
73563
73563
  var import_promises210 = __toModule(require("fs/promises"));
73564
73564
  var import_path42 = __toModule(require("path"));
73565
73565
  var import_web5 = __toModule(require("stream/web"));
@@ -73784,10 +73784,10 @@ Make sure "${service}" is mounted so Miniflare knows where to find it.`);
73784
73784
  }
73785
73785
  const extraGlobals = {};
73786
73786
  let CompatRequest = Request4;
73787
- let CompatResponse = Response11;
73787
+ let CompatResponse = Response10;
73788
73788
  if (!ctx.compat.isEnabled("formdata_parser_supports_files")) {
73789
73789
  CompatRequest = proxyStringFormDataFiles(Request4);
73790
- CompatResponse = proxyStringFormDataFiles(Response11);
73790
+ CompatResponse = proxyStringFormDataFiles(Response10);
73791
73791
  }
73792
73792
  if (ctx.compat.isEnabled("global_navigator")) {
73793
73793
  extraGlobals.navigator = new Navigator();
@@ -73856,7 +73856,7 @@ Make sure "${service}" is mounted so Miniflare knows where to find it.`);
73856
73856
  Request: CompatRequest,
73857
73857
  Response: CompatResponse,
73858
73858
  FormData: import_undici42.FormData,
73859
- Blob: import_buffer6.Blob,
73859
+ Blob: import_buffer5.Blob,
73860
73860
  File: import_undici42.File,
73861
73861
  URL: import_url22.URL,
73862
73862
  URLSearchParams: import_url22.URLSearchParams,
@@ -76846,17 +76846,17 @@ async function generateASSETSBinding(options30) {
76846
76846
  try {
76847
76847
  const url4 = new URL(miniflareRequest.url);
76848
76848
  url4.host = `localhost:${options30.proxyPort}`;
76849
- const proxyRequest = new import_miniflare18.Request(url4, miniflareRequest);
76849
+ const proxyRequest = new import_miniflare17.Request(url4, miniflareRequest);
76850
76850
  if (proxyRequest.headers.get("Upgrade") === "websocket") {
76851
76851
  proxyRequest.headers.delete("Sec-WebSocket-Accept");
76852
76852
  proxyRequest.headers.delete("Sec-WebSocket-Key");
76853
76853
  }
76854
- return await (0, import_miniflare18.fetch)(proxyRequest, {
76854
+ return await (0, import_miniflare17.fetch)(proxyRequest, {
76855
76855
  dispatcher: new ProxyDispatcher(miniflareRequest.headers.get("Host"))
76856
76856
  });
76857
76857
  } catch (thrown) {
76858
76858
  options30.log.error(new Error(`Could not proxy request: ${thrown}`));
76859
- return new import_miniflare18.Response(`[wrangler] Could not proxy request: ${thrown}`, {
76859
+ return new import_miniflare17.Response(`[wrangler] Could not proxy request: ${thrown}`, {
76860
76860
  status: 502
76861
76861
  });
76862
76862
  }
@@ -76865,7 +76865,7 @@ async function generateASSETSBinding(options30) {
76865
76865
  return await assetsFetch(miniflareRequest);
76866
76866
  } catch (thrown) {
76867
76867
  options30.log.error(new Error(`Could not serve static asset: ${thrown}`));
76868
- return new import_miniflare18.Response(
76868
+ return new import_miniflare17.Response(
76869
76869
  `[wrangler] Could not serve static asset: ${thrown}`,
76870
76870
  { status: 502 }
76871
76871
  );
@@ -76977,11 +76977,11 @@ async function generateAssetsFetch(directory, log2) {
76977
76977
  });
76978
76978
  }, "generateResponse");
76979
76979
  return async (input, init2) => {
76980
- const request4 = new import_miniflare18.Request(input, init2);
76980
+ const request4 = new import_miniflare17.Request(input, init2);
76981
76981
  return await generateResponse(request4);
76982
76982
  };
76983
76983
  }
76984
- var import_node_assert18, import_node_fs20, import_node_path37, import_mime3, import_miniflare18, import_undici8, ProxyDispatcher, invalidAssetsFetch;
76984
+ var import_node_assert18, import_node_fs20, import_node_path37, import_mime3, import_miniflare17, import_undici8, ProxyDispatcher, invalidAssetsFetch;
76985
76985
  var init_assets = __esm({
76986
76986
  "src/miniflare-cli/assets.ts"() {
76987
76987
  init_import_meta_url();
@@ -76993,7 +76993,7 @@ var init_assets = __esm({
76993
76993
  init_parseRedirects();
76994
76994
  init_esm2();
76995
76995
  import_mime3 = __toESM(require_mime());
76996
- import_miniflare18 = require("miniflare");
76996
+ import_miniflare17 = require("miniflare");
76997
76997
  import_undici8 = __toESM(require_undici());
76998
76998
  init_hash();
76999
76999
  __name(generateASSETSBinding, "generateASSETSBinding");
@@ -79765,23 +79765,23 @@ var init_dist_es5 = __esm({
79765
79765
  });
79766
79766
 
79767
79767
  // ../../node_modules/.pnpm/@smithy+util-buffer-from@3.0.0/node_modules/@smithy/util-buffer-from/dist-es/index.js
79768
- var import_buffer2, fromArrayBuffer, fromString;
79768
+ var import_buffer, fromArrayBuffer, fromString;
79769
79769
  var init_dist_es6 = __esm({
79770
79770
  "../../node_modules/.pnpm/@smithy+util-buffer-from@3.0.0/node_modules/@smithy/util-buffer-from/dist-es/index.js"() {
79771
79771
  init_import_meta_url();
79772
79772
  init_dist_es5();
79773
- import_buffer2 = require("buffer");
79773
+ import_buffer = require("buffer");
79774
79774
  fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {
79775
79775
  if (!isArrayBuffer(input)) {
79776
79776
  throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);
79777
79777
  }
79778
- return import_buffer2.Buffer.from(input, offset, length);
79778
+ return import_buffer.Buffer.from(input, offset, length);
79779
79779
  }, "fromArrayBuffer");
79780
79780
  fromString = /* @__PURE__ */ __name((input, encoding) => {
79781
79781
  if (typeof input !== "string") {
79782
79782
  throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
79783
79783
  }
79784
- return encoding ? import_buffer2.Buffer.from(input, encoding) : import_buffer2.Buffer.from(input);
79784
+ return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);
79785
79785
  }, "fromString");
79786
79786
  }
79787
79787
  });
@@ -88965,19 +88965,19 @@ function httpRequest(options30) {
88965
88965
  chunks.push(chunk);
88966
88966
  });
88967
88967
  res.on("end", () => {
88968
- resolve24(import_buffer4.Buffer.concat(chunks));
88968
+ resolve24(import_buffer3.Buffer.concat(chunks));
88969
88969
  req.destroy();
88970
88970
  });
88971
88971
  });
88972
88972
  req.end();
88973
88973
  });
88974
88974
  }
88975
- var import_buffer4, import_http2;
88975
+ var import_buffer3, import_http2;
88976
88976
  var init_httpRequest2 = __esm({
88977
88977
  "../../node_modules/.pnpm/@smithy+credential-provider-imds@3.2.8/node_modules/@smithy/credential-provider-imds/dist-es/remoteProvider/httpRequest.js"() {
88978
88978
  init_import_meta_url();
88979
88979
  init_dist_es16();
88980
- import_buffer4 = require("buffer");
88980
+ import_buffer3 = require("buffer");
88981
88981
  import_http2 = require("http");
88982
88982
  __name(httpRequest, "httpRequest");
88983
88983
  }
@@ -89958,7 +89958,7 @@ var init_dist_es41 = __esm({
89958
89958
 
89959
89959
  // ../../node_modules/.pnpm/@smithy+hash-node@3.0.11/node_modules/@smithy/hash-node/dist-es/index.js
89960
89960
  function castSourceData(toCast, encoding) {
89961
- if (import_buffer5.Buffer.isBuffer(toCast)) {
89961
+ if (import_buffer4.Buffer.isBuffer(toCast)) {
89962
89962
  return toCast;
89963
89963
  }
89964
89964
  if (typeof toCast === "string") {
@@ -89969,13 +89969,13 @@ function castSourceData(toCast, encoding) {
89969
89969
  }
89970
89970
  return fromArrayBuffer(toCast);
89971
89971
  }
89972
- var import_buffer5, import_crypto5, Hash;
89972
+ var import_buffer4, import_crypto5, Hash;
89973
89973
  var init_dist_es42 = __esm({
89974
89974
  "../../node_modules/.pnpm/@smithy+hash-node@3.0.11/node_modules/@smithy/hash-node/dist-es/index.js"() {
89975
89975
  init_import_meta_url();
89976
89976
  init_dist_es6();
89977
89977
  init_dist_es7();
89978
- import_buffer5 = require("buffer");
89978
+ import_buffer4 = require("buffer");
89979
89979
  import_crypto5 = require("crypto");
89980
89980
  Hash = class {
89981
89981
  constructor(algorithmIdentifier, secret3) {
@@ -98088,14 +98088,14 @@ var chalkStderr = createChalk({ level: stderrColor ? stderrColor.level : 0 });
98088
98088
  var source_default = chalk;
98089
98089
 
98090
98090
  // src/api/startDevWorker/MultiworkerRuntimeController.ts
98091
- var import_miniflare8 = require("miniflare");
98091
+ var import_miniflare7 = require("miniflare");
98092
98092
 
98093
98093
  // src/dev/miniflare.ts
98094
98094
  init_import_meta_url();
98095
98095
  var import_node_assert5 = __toESM(require("node:assert"));
98096
98096
  var import_node_crypto4 = require("node:crypto");
98097
98097
  var import_node_path14 = __toESM(require("node:path"));
98098
- var import_miniflare6 = require("miniflare");
98098
+ var import_miniflare5 = require("miniflare");
98099
98099
 
98100
98100
  // src/ai/fetcher.ts
98101
98101
  init_import_meta_url();
@@ -98108,7 +98108,7 @@ var import_undici3 = __toESM(require_undici());
98108
98108
 
98109
98109
  // package.json
98110
98110
  var name = "wrangler";
98111
- var version = "3.107.1";
98111
+ var version = "3.107.2";
98112
98112
 
98113
98113
  // src/environment-variables/misc-variables.ts
98114
98114
  init_import_meta_url();
@@ -100873,7 +100873,6 @@ var friendlyBindingNames = {
100873
100873
  text_blobs: "Text Blobs",
100874
100874
  browser: "Browser",
100875
100875
  ai: "AI",
100876
- images: "Images",
100877
100876
  version_metadata: "Worker Version Metadata",
100878
100877
  unsafe: "Unsafe Metadata",
100879
100878
  vars: "Vars",
@@ -100912,7 +100911,6 @@ function printBindings(bindings, context2 = {}) {
100912
100911
  text_blobs,
100913
100912
  browser,
100914
100913
  ai: ai3,
100915
- images,
100916
100914
  version_metadata,
100917
100915
  unsafe,
100918
100916
  vars,
@@ -101125,17 +101123,6 @@ function printBindings(bindings, context2 = {}) {
101125
101123
  entries: [{ key: "Name", value: browser.binding }]
101126
101124
  });
101127
101125
  }
101128
- if (images !== void 0) {
101129
- output.push({
101130
- name: friendlyBindingNames.images,
101131
- entries: [
101132
- {
101133
- key: "Name",
101134
- value: addLocalSuffix(images.binding, !!context2.imagesLocalMode)
101135
- }
101136
- ]
101137
- });
101138
- }
101139
101126
  if (ai3 !== void 0) {
101140
101127
  const entries = [
101141
101128
  { key: "Name", value: ai3.binding }
@@ -102823,7 +102810,7 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
102823
102810
  rawEnv,
102824
102811
  envName,
102825
102812
  "browser",
102826
- validateNamedSimpleBinding(envName),
102813
+ validateBrowserBinding(envName),
102827
102814
  void 0
102828
102815
  ),
102829
102816
  ai: notInheritable(
@@ -102836,16 +102823,6 @@ function normalizeAndValidateEnvironment(diagnostics, configPath, rawEnv, isDisp
102836
102823
  validateAIBinding(envName),
102837
102824
  void 0
102838
102825
  ),
102839
- images: notInheritable(
102840
- diagnostics,
102841
- topLevelEnv,
102842
- rawConfig,
102843
- rawEnv,
102844
- envName,
102845
- "images",
102846
- validateNamedSimpleBinding(envName),
102847
- void 0
102848
- ),
102849
102826
  pipelines: notInheritable(
102850
102827
  diagnostics,
102851
102828
  topLevelEnv,
@@ -103401,7 +103378,7 @@ var validateAssetsConfig = /* @__PURE__ */ __name((diagnostics, field, value) =>
103401
103378
  ]) && isValid2;
103402
103379
  return isValid2;
103403
103380
  }, "validateAssetsConfig");
103404
- var validateNamedSimpleBinding = /* @__PURE__ */ __name((envName) => (diagnostics, field, value, config) => {
103381
+ var validateBrowserBinding = /* @__PURE__ */ __name((envName) => (diagnostics, field, value, config) => {
103405
103382
  const fieldPath = config === void 0 ? `${field}` : `env.${envName}.${field}`;
103406
103383
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
103407
103384
  diagnostics.errors.push(
@@ -103420,7 +103397,7 @@ var validateNamedSimpleBinding = /* @__PURE__ */ __name((envName) => (diagnostic
103420
103397
  "binding"
103421
103398
  ]);
103422
103399
  return isValid2;
103423
- }, "validateNamedSimpleBinding");
103400
+ }, "validateBrowserBinding");
103424
103401
  var validateAIBinding = /* @__PURE__ */ __name((envName) => (diagnostics, field, value, config) => {
103425
103402
  const fieldPath = config === void 0 ? `${field}` : `env.${envName}.${field}`;
103426
103403
  if (typeof value !== "object" || value === null || Array.isArray(value)) {
@@ -104566,7 +104543,6 @@ var defaultWranglerConfig = {
104566
104543
  services: [],
104567
104544
  analytics_engine_datasets: [],
104568
104545
  ai: void 0,
104569
- images: void 0,
104570
104546
  version_metadata: void 0,
104571
104547
  /*====================================================*/
104572
104548
  /* Fields supported by Workers only */
@@ -108968,218 +108944,12 @@ function withSourceURLs(entrypointPath, entrypointSource, modules) {
108968
108944
  }
108969
108945
  __name(withSourceURLs, "withSourceURLs");
108970
108946
 
108971
- // src/images/fetcher.ts
108972
- init_import_meta_url();
108973
- var import_miniflare3 = require("miniflare");
108974
-
108975
- // src/images/local.ts
108976
- init_import_meta_url();
108977
- var import_buffer = require("buffer");
108978
- var import_sharp = __toESM(require("sharp"));
108979
- function validateTransforms(inputTransforms) {
108980
- if (!Array.isArray(inputTransforms)) {
108981
- return null;
108982
- }
108983
- for (const transform of inputTransforms) {
108984
- for (const key of ["imageIndex", "rotate", "width", "height"]) {
108985
- if (transform[key] !== void 0 && typeof transform[key] != "number") {
108986
- return null;
108987
- }
108988
- }
108989
- }
108990
- return inputTransforms;
108991
- }
108992
- __name(validateTransforms, "validateTransforms");
108993
- async function imagesLocalFetcher(request4) {
108994
- const data = await request4.formData();
108995
- const body = data.get("image");
108996
- if (!body || !(body instanceof import_buffer.File)) {
108997
- return errorResponse(
108998
- 400,
108999
- 9523,
109000
- `ERROR: Internal Images binding error: expected image in request, got ${body}`
109001
- );
109002
- }
109003
- const transformer = (0, import_sharp.default)(await body.arrayBuffer(), {});
109004
- const url4 = new URL(request4.url);
109005
- if (url4.pathname == "/info") {
109006
- return runInfo(transformer);
109007
- } else {
109008
- const badTransformsResponse = errorResponse(
109009
- 400,
109010
- 9523,
109011
- "ERROR: Internal Images binding error: Expected JSON array of valid transforms in transforms field"
109012
- );
109013
- try {
109014
- const transformsJson = data.get("transforms");
109015
- if (typeof transformsJson !== "string") {
109016
- return badTransformsResponse;
109017
- }
109018
- const transforms = validateTransforms(JSON.parse(transformsJson));
109019
- if (transforms === null) {
109020
- return badTransformsResponse;
109021
- }
109022
- const outputFormat = data.get("output_format");
109023
- if (outputFormat != null && typeof outputFormat !== "string") {
109024
- return errorResponse(
109025
- 400,
109026
- 9523,
109027
- "ERROR: Internal Images binding error: Expected output format to be a string if provided"
109028
- );
109029
- }
109030
- return runTransform(transformer, transforms, outputFormat);
109031
- } catch (e7) {
109032
- return badTransformsResponse;
109033
- }
109034
- }
109035
- }
109036
- __name(imagesLocalFetcher, "imagesLocalFetcher");
109037
- async function runInfo(transformer) {
109038
- const metadata = await transformer.metadata();
109039
- let mime = null;
109040
- switch (metadata.format) {
109041
- case "jpeg":
109042
- mime = "image/jpeg";
109043
- break;
109044
- case "svg":
109045
- mime = "image/svg+xml";
109046
- break;
109047
- case "png":
109048
- mime = "image/png";
109049
- break;
109050
- case "webp":
109051
- mime = "image/webp";
109052
- break;
109053
- case "gif":
109054
- mime = "image/gif";
109055
- break;
109056
- case "avif":
109057
- mime = "image/avif";
109058
- break;
109059
- default:
109060
- return errorResponse(
109061
- 415,
109062
- 9520,
109063
- `ERROR: Unsupported image type ${metadata.format}, expected one of: JPEG, SVG, PNG, WebP, GIF or AVIF`
109064
- );
109065
- }
109066
- let resp;
109067
- if (mime == "image/svg+xml") {
109068
- resp = {
109069
- format: mime
109070
- };
109071
- } else {
109072
- if (!metadata.size || !metadata.width || !metadata.height) {
109073
- return errorResponse(
109074
- 500,
109075
- 9523,
109076
- "ERROR: Internal Images binding error: Expected size, width and height for bitmap input"
109077
- );
109078
- }
109079
- resp = {
109080
- format: mime,
109081
- fileSize: metadata.size,
109082
- width: metadata.width,
109083
- height: metadata.height
109084
- };
109085
- }
109086
- return Response.json(resp);
109087
- }
109088
- __name(runInfo, "runInfo");
109089
- async function runTransform(transformer, transforms, outputFormat) {
109090
- for (const transform of transforms) {
109091
- if (transform.imageIndex !== void 0 && transform.imageIndex !== 0) {
109092
- continue;
109093
- }
109094
- if (transform.rotate !== void 0) {
109095
- transformer.rotate(transform.rotate);
109096
- }
109097
- if (transform.width !== void 0 || transform.height !== void 0) {
109098
- transformer.resize(transform.width || null, transform.height || null, {
109099
- fit: "contain"
109100
- });
109101
- }
109102
- }
109103
- switch (outputFormat) {
109104
- case "image/avif":
109105
- transformer.avif();
109106
- break;
109107
- case "image/gif":
109108
- return errorResponse(
109109
- 415,
109110
- 9520,
109111
- "ERROR: GIF output is not supported in local mode"
109112
- );
109113
- case "image/jpeg":
109114
- transformer.jpeg();
109115
- break;
109116
- case "image/png":
109117
- transformer.png();
109118
- break;
109119
- case "image/webp":
109120
- transformer.webp();
109121
- break;
109122
- case "rgb":
109123
- case "rgba":
109124
- return errorResponse(
109125
- 415,
109126
- 9520,
109127
- "ERROR: RGB/RGBA output is not supported in local mode"
109128
- );
109129
- default:
109130
- outputFormat = "image/jpeg";
109131
- break;
109132
- }
109133
- return new Response(transformer, {
109134
- headers: {
109135
- "content-type": outputFormat
109136
- }
109137
- });
109138
- }
109139
- __name(runTransform, "runTransform");
109140
- function errorResponse(status2, code, message) {
109141
- return new Response(`ERROR ${code}: ${message}`, {
109142
- status: status2,
109143
- headers: {
109144
- "content-type": "text/plain",
109145
- "cf-images-binding": `err=${code}`
109146
- }
109147
- });
109148
- }
109149
- __name(errorResponse, "errorResponse");
109150
-
109151
- // src/images/fetcher.ts
109152
- var EXTERNAL_IMAGES_WORKER_NAME = "__WRANGLER_EXTERNAL_IMAGES_WORKER";
109153
- var EXTERNAL_IMAGES_WORKER_SCRIPT = `
109154
- import makeBinding from 'cloudflare-internal:images-api'
109155
-
109156
- export default function (env) {
109157
- return makeBinding({
109158
- fetcher: env.FETCHER,
109159
- });
109160
- }
109161
- `;
109162
- async function imagesRemoteFetcher(request4) {
109163
- const accountId = await getAccountId();
109164
- const url4 = `/accounts/${accountId}/images_edge/v2/binding/preview${new URL(request4.url).pathname}`;
109165
- const res = await performApiFetch(url4, {
109166
- method: request4.method,
109167
- body: request4.body,
109168
- duplex: "half",
109169
- headers: {
109170
- "content-type": request4.headers.get("content-type") || ""
109171
- }
109172
- });
109173
- return new import_miniflare3.Response(res.body, { headers: res.headers });
109174
- }
109175
- __name(imagesRemoteFetcher, "imagesRemoteFetcher");
109176
-
109177
108947
  // src/sourcemap.ts
109178
108948
  init_import_meta_url();
109179
108949
  var import_node_assert4 = __toESM(require("node:assert"));
109180
108950
  var import_node_fs8 = __toESM(require("node:fs"));
109181
108951
  var import_node_url5 = __toESM(require("node:url"));
109182
- var import_miniflare4 = require("miniflare");
108952
+ var import_miniflare3 = require("miniflare");
109183
108953
  function maybeGetFile(filePath) {
109184
108954
  try {
109185
108955
  return import_node_fs8.default.readFileSync(filePath, "utf8");
@@ -109227,7 +108997,7 @@ function getSourceMappingPrepareStackTrace(retrieveSourceMap) {
109227
108997
  if (sourceMappingPrepareStackTrace !== void 0) {
109228
108998
  return sourceMappingPrepareStackTrace;
109229
108999
  }
109230
- const support = (0, import_miniflare4.getFreshSourceMapSupport)();
109000
+ const support = (0, import_miniflare3.getFreshSourceMapSupport)();
109231
109001
  const originalPrepareStackTrace = Error.prepareStackTrace;
109232
109002
  support.install({
109233
109003
  environment: "node",
@@ -109434,7 +109204,7 @@ __name(updateCheck, "updateCheck");
109434
109204
 
109435
109205
  // src/vectorize/fetcher.ts
109436
109206
  init_import_meta_url();
109437
- var import_miniflare5 = require("miniflare");
109207
+ var import_miniflare4 = require("miniflare");
109438
109208
  var EXTERNAL_VECTORIZE_WORKER_NAME = "__WRANGLER_EXTERNAL_VECTORIZE_WORKER";
109439
109209
  var EXTERNAL_VECTORIZE_WORKER_SCRIPT = `
109440
109210
  import makeBinding from 'cloudflare-internal:vectorize-api'
@@ -109467,7 +109237,7 @@ function MakeVectorizeFetcher(indexId) {
109467
109237
  body: request4.body,
109468
109238
  duplex: "half"
109469
109239
  });
109470
- const respHeaders = new import_miniflare5.Headers(res.headers);
109240
+ const respHeaders = new import_miniflare4.Headers(res.headers);
109471
109241
  respHeaders.delete("Host");
109472
109242
  respHeaders.delete("Content-Length");
109473
109243
  const apiResponse = await res.json();
@@ -109475,7 +109245,7 @@ function MakeVectorizeFetcher(indexId) {
109475
109245
  error: apiResponse.errors[0].message,
109476
109246
  code: apiResponse.errors[0].code
109477
109247
  };
109478
- return new import_miniflare5.Response(JSON.stringify(newResponse), {
109248
+ return new import_miniflare4.Response(JSON.stringify(newResponse), {
109479
109249
  status: res.status,
109480
109250
  headers: respHeaders
109481
109251
  });
@@ -109633,7 +109403,7 @@ export default {
109633
109403
  }
109634
109404
  }
109635
109405
  `;
109636
- var WranglerLog = class extends import_miniflare6.Log {
109406
+ var WranglerLog = class extends import_miniflare5.Log {
109637
109407
  #warnedCompatibilityDateFallback = false;
109638
109408
  log(message) {
109639
109409
  if (message.includes(EXTERNAL_SERVICE_WORKER_NAME)) {
@@ -109678,13 +109448,13 @@ function castLogLevel(level) {
109678
109448
  if (key === "LOG") {
109679
109449
  key = "INFO";
109680
109450
  }
109681
- return import_miniflare6.LogLevel[key];
109451
+ return import_miniflare5.LogLevel[key];
109682
109452
  }
109683
109453
  __name(castLogLevel, "castLogLevel");
109684
109454
  function buildLog() {
109685
109455
  let level = castLogLevel(logger.loggerLevel);
109686
- if (level <= import_miniflare6.LogLevel.DEBUG) {
109687
- level = Math.min(level, import_miniflare6.LogLevel.WARN);
109456
+ if (level <= import_miniflare5.LogLevel.DEBUG) {
109457
+ level = Math.min(level, import_miniflare5.LogLevel.WARN);
109688
109458
  }
109689
109459
  return new WranglerLog(level, { prefix: "wrangler-UserWorker" });
109690
109460
  }
@@ -109824,7 +109594,7 @@ function buildMiniflareBindingOptions(config) {
109824
109594
  };
109825
109595
  } else {
109826
109596
  let address;
109827
- let style = import_miniflare6.HttpOptions_Style.PROXY;
109597
+ let style = import_miniflare5.HttpOptions_Style.PROXY;
109828
109598
  if (service.entrypoint !== void 0) {
109829
109599
  if (target.entrypointAddresses === void 0) {
109830
109600
  throw new UserError(
@@ -109847,7 +109617,7 @@ function buildMiniflareBindingOptions(config) {
109847
109617
  );
109848
109618
  }
109849
109619
  address = `${target.host}:${target.port}`;
109850
- style = import_miniflare6.HttpOptions_Style.HOST;
109620
+ style = import_miniflare5.HttpOptions_Style.HOST;
109851
109621
  } else {
109852
109622
  address = `${defaultEntrypointAddress.host}:${defaultEntrypointAddress.port}`;
109853
109623
  }
@@ -109857,7 +109627,7 @@ function buildMiniflareBindingOptions(config) {
109857
109627
  address,
109858
109628
  http: {
109859
109629
  style,
109860
- cfBlobHeader: import_miniflare6.CoreHeaders.CF_BLOB
109630
+ cfBlobHeader: import_miniflare5.CoreHeaders.CF_BLOB
109861
109631
  }
109862
109632
  }
109863
109633
  };
@@ -109940,24 +109710,6 @@ function buildMiniflareBindingOptions(config) {
109940
109710
  scriptName: EXTERNAL_AI_WORKER_NAME
109941
109711
  };
109942
109712
  }
109943
- if (bindings.images?.binding) {
109944
- externalWorkers.push({
109945
- name: EXTERNAL_IMAGES_WORKER_NAME,
109946
- modules: [
109947
- {
109948
- type: "ESModule",
109949
- path: "index.mjs",
109950
- contents: EXTERNAL_IMAGES_WORKER_SCRIPT
109951
- }
109952
- ],
109953
- serviceBindings: {
109954
- FETCHER: config.imagesLocalMode ? imagesLocalFetcher : imagesRemoteFetcher
109955
- }
109956
- });
109957
- wrappedBindings[bindings.images?.binding] = {
109958
- scriptName: EXTERNAL_IMAGES_WORKER_NAME
109959
- };
109960
- }
109961
109713
  if (bindings.vectorize) {
109962
109714
  for (const vectorizeBinding of bindings.vectorize) {
109963
109715
  const bindingName = vectorizeBinding.binding;
@@ -110172,7 +109924,6 @@ __name(handleRuntimeStdio, "handleRuntimeStdio");
110172
109924
  var didWarnMiniflareCronSupport = false;
110173
109925
  var didWarnMiniflareVectorizeSupport = false;
110174
109926
  var didWarnAiAccountUsage = false;
110175
- var didWarnImagesLocalModeUsage = false;
110176
109927
  async function buildMiniflareOptions(log2, config, proxyToUserWorkerAuthenticationSecret) {
110177
109928
  if (config.crons.length > 0 && !config.testScheduled) {
110178
109929
  if (!didWarnMiniflareCronSupport) {
@@ -110204,14 +109955,6 @@ async function buildMiniflareOptions(log2, config, proxyToUserWorkerAuthenticati
110204
109955
  );
110205
109956
  }
110206
109957
  }
110207
- if (config.bindings.images && config.imagesLocalMode) {
110208
- if (!didWarnImagesLocalModeUsage) {
110209
- didWarnImagesLocalModeUsage = true;
110210
- logger.info(
110211
- "You are using Images local mode. This only supports resizing, rotating and transcoding."
110212
- );
110213
- }
110214
- }
110215
109958
  const upstream = typeof config.localUpstream === "string" ? `${config.upstreamProtocol}://${config.localUpstream}` : void 0;
110216
109959
  const { sourceOptions, entrypointNames } = await buildSourceOptions(config);
110217
109960
  const { bindingOptions, internalObjects, externalWorkers } = buildMiniflareBindingOptions(config);
@@ -110274,7 +110017,7 @@ __name(castErrorCause, "castErrorCause");
110274
110017
  init_import_meta_url();
110275
110018
  var import_node_crypto5 = require("node:crypto");
110276
110019
  var import_promises6 = require("node:fs/promises");
110277
- var import_miniflare7 = require("miniflare");
110020
+ var import_miniflare6 = require("miniflare");
110278
110021
 
110279
110022
  // src/api/startDevWorker/BaseController.ts
110280
110023
  init_import_meta_url();
@@ -110453,11 +110196,6 @@ function convertCfWorkerInitBindingstoBindings(inputBindings) {
110453
110196
  output[binding] = { type: "ai", ...x6 };
110454
110197
  break;
110455
110198
  }
110456
- case "images": {
110457
- const { binding, ...x6 } = info;
110458
- output[binding] = { type: "images", ...x6 };
110459
- break;
110460
- }
110461
110199
  case "version_metadata": {
110462
110200
  const { binding, ...x6 } = info;
110463
110201
  output[binding] = { type: "version_metadata", ...x6 };
@@ -110508,7 +110246,6 @@ async function convertBindingsToCfWorkerInitBindings(inputBindings) {
110508
110246
  text_blobs: void 0,
110509
110247
  browser: void 0,
110510
110248
  ai: void 0,
110511
- images: void 0,
110512
110249
  version_metadata: void 0,
110513
110250
  data_blobs: void 0,
110514
110251
  durable_objects: void 0,
@@ -110560,8 +110297,6 @@ async function convertBindingsToCfWorkerInitBindings(inputBindings) {
110560
110297
  bindings.browser = { binding: name2 };
110561
110298
  } else if (binding.type === "ai") {
110562
110299
  bindings.ai = { binding: name2 };
110563
- } else if (binding.type === "images") {
110564
- bindings.images = { binding: name2 };
110565
110300
  } else if (binding.type === "version_metadata") {
110566
110301
  bindings.version_metadata = { binding: name2 };
110567
110302
  } else if (binding.type === "durable_object_namespace") {
@@ -110733,7 +110468,6 @@ async function convertToConfigBundle(event) {
110733
110468
  services: bindings.services,
110734
110469
  serviceBindings: fetchers,
110735
110470
  bindVectorizeToProd: event.config.dev?.bindVectorizeToProd ?? false,
110736
- imagesLocalMode: event.config.dev?.imagesLocalMode ?? false,
110737
110471
  testScheduled: !!event.config.dev.testScheduled
110738
110472
  };
110739
110473
  }
@@ -110751,7 +110485,7 @@ var LocalRuntimeController = class extends RuntimeController {
110751
110485
  // `buildMiniflareOptions()` is asynchronous, meaning if multiple bundle
110752
110486
  // updates were submitted, the second may apply before the first. Therefore,
110753
110487
  // wrap updates in a mutex, so they're always applied in invocation order.
110754
- #mutex = new import_miniflare7.Mutex();
110488
+ #mutex = new import_miniflare6.Mutex();
110755
110489
  #mf;
110756
110490
  onBundleStart(_4) {
110757
110491
  }
@@ -110765,7 +110499,7 @@ var LocalRuntimeController = class extends RuntimeController {
110765
110499
  options30.liveReload = false;
110766
110500
  if (this.#mf === void 0) {
110767
110501
  logger.log(source_default.dim("\u2394 Starting local server..."));
110768
- this.#mf = new import_miniflare7.Miniflare(options30);
110502
+ this.#mf = new import_miniflare6.Miniflare(options30);
110769
110503
  } else {
110770
110504
  logger.log(source_default.dim("\u2394 Reloading local server..."));
110771
110505
  await this.#mf.setOptions(options30);
@@ -110902,7 +110636,7 @@ var MultiworkerRuntimeController = class extends LocalRuntimeController {
110902
110636
  // `buildMiniflareOptions()` is asynchronous, meaning if multiple bundle
110903
110637
  // updates were submitted, the second may apply before the first. Therefore,
110904
110638
  // wrap updates in a mutex, so they're always applied in invocation order.
110905
- #mutex = new import_miniflare8.Mutex();
110639
+ #mutex = new import_miniflare7.Mutex();
110906
110640
  #mf;
110907
110641
  #options = /* @__PURE__ */ new Map();
110908
110642
  #canStartMiniflare() {
@@ -110940,7 +110674,7 @@ var MultiworkerRuntimeController = class extends LocalRuntimeController {
110940
110674
  const mergedMfOptions = ensureMatchingSql(this.#mergedMfOptions());
110941
110675
  if (this.#mf === void 0) {
110942
110676
  logger.log(source_default.dim("\u2394 Starting local server..."));
110943
- this.#mf = new import_miniflare8.Miniflare(mergedMfOptions);
110677
+ this.#mf = new import_miniflare7.Miniflare(mergedMfOptions);
110944
110678
  } else {
110945
110679
  logger.log(source_default.dim("\u2394 Reloading local server..."));
110946
110680
  await this.#mf.setOptions(mergedMfOptions);
@@ -111038,7 +110772,7 @@ var import_node_assert9 = __toESM(require("node:assert"));
111038
110772
  var import_node_crypto7 = require("node:crypto");
111039
110773
  var import_node_events2 = __toESM(require("node:events"));
111040
110774
  var import_node_path18 = __toESM(require("node:path"));
111041
- var import_miniflare10 = require("miniflare");
110775
+ var import_miniflare9 = require("miniflare");
111042
110776
 
111043
110777
  // embed-worker:/home/runner/work/workers-sdk/workers-sdk/packages/wrangler/templates/startDevWorker/InspectorProxyWorker.ts
111044
110778
  init_import_meta_url();
@@ -111349,7 +111083,7 @@ var openInspector = /* @__PURE__ */ __name(async (inspectorPort, worker) => {
111349
111083
  init_import_meta_url();
111350
111084
  var fs9 = __toESM(require("node:fs"));
111351
111085
  var path20 = __toESM(require("node:path"));
111352
- var import_miniflare9 = require("miniflare");
111086
+ var import_miniflare8 = require("miniflare");
111353
111087
  var CERT_EXPIRY_DAYS = 30;
111354
111088
  var ONE_DAY_IN_MS = 864e5;
111355
111089
  var getHttpsKeyPathFromEnv = getEnvironmentVariableFactory({
@@ -111449,7 +111183,7 @@ function generateCertificate() {
111449
111183
  name: "subjectAltName",
111450
111184
  altNames: [
111451
111185
  { type: 2, value: "localhost" },
111452
- ...(0, import_miniflare9.getAccessibleHosts)(false).map((ip) => ({ type: 7, ip }))
111186
+ ...(0, import_miniflare8.getAccessibleHosts)(false).map((ip) => ({ type: 7, ip }))
111453
111187
  ]
111454
111188
  }
111455
111189
  ]
@@ -111500,7 +111234,7 @@ var ProxyController = class extends Controller {
111500
111234
  PROXY_CONTROLLER: async (req) => {
111501
111235
  const message = await req.json();
111502
111236
  this.onProxyWorkerMessage(message);
111503
- return new import_miniflare10.Response(null, { status: 204 });
111237
+ return new import_miniflare9.Response(null, { status: 204 });
111504
111238
  }
111505
111239
  },
111506
111240
  bindings: {
@@ -111561,7 +111295,7 @@ var ProxyController = class extends Controller {
111561
111295
  proxyWorkerOptions
111562
111296
  );
111563
111297
  const willInstantiateMiniflareInstance = !this.proxyWorker || proxyWorkerOptionsChanged;
111564
- this.proxyWorker ??= new import_miniflare10.Miniflare(proxyWorkerOptions);
111298
+ this.proxyWorker ??= new import_miniflare9.Miniflare(proxyWorkerOptions);
111565
111299
  this.proxyWorkerOptions = proxyWorkerOptions;
111566
111300
  if (proxyWorkerOptionsChanged) {
111567
111301
  logger.debug("ProxyWorker miniflare options changed, reinstantiating...");
@@ -111643,7 +111377,7 @@ var ProxyController = class extends Controller {
111643
111377
  this.inspectorProxyWorkerWebSocket?.resolve(webSocket);
111644
111378
  return webSocket;
111645
111379
  }
111646
- runtimeMessageMutex = new import_miniflare10.Mutex();
111380
+ runtimeMessageMutex = new import_miniflare9.Mutex();
111647
111381
  async sendMessageToProxyWorker(message, retries = 3) {
111648
111382
  if (this._torndown) {
111649
111383
  return;
@@ -111796,15 +111530,15 @@ var ProxyController = class extends Controller {
111796
111530
  );
111797
111531
  }
111798
111532
  if (maybeContents === void 0) {
111799
- return new import_miniflare10.Response(null, { status: 404 });
111533
+ return new import_miniflare9.Response(null, { status: 404 });
111800
111534
  }
111801
- return new import_miniflare10.Response(maybeContents);
111535
+ return new import_miniflare9.Response(maybeContents);
111802
111536
  }
111803
111537
  default:
111804
111538
  assertNever(message);
111805
- return new import_miniflare10.Response(null, { status: 404 });
111539
+ return new import_miniflare9.Response(null, { status: 404 });
111806
111540
  }
111807
- return new import_miniflare10.Response(null, { status: 204 });
111541
+ return new import_miniflare9.Response(null, { status: 204 });
111808
111542
  }
111809
111543
  _torndown = false;
111810
111544
  async teardown() {
@@ -111857,7 +111591,7 @@ var ProxyController = class extends Controller {
111857
111591
  __name(ProxyController, "ProxyController");
111858
111592
  var ProxyControllerLogger = class extends WranglerLog {
111859
111593
  log(message) {
111860
- if (message.includes("/cdn-cgi/") && this.level < import_miniflare10.LogLevel.DEBUG) {
111594
+ if (message.includes("/cdn-cgi/") && this.level < import_miniflare9.LogLevel.DEBUG) {
111861
111595
  return;
111862
111596
  }
111863
111597
  super.log(message);
@@ -116527,7 +116261,7 @@ var getDatabaseInfoFromIdOrName = /* @__PURE__ */ __name(async (accountId, datab
116527
116261
  init_import_meta_url();
116528
116262
  var import_node_buffer = require("node:buffer");
116529
116263
  var import_node_url8 = require("node:url");
116530
- var import_miniflare12 = require("miniflare");
116264
+ var import_miniflare11 = require("miniflare");
116531
116265
  var import_undici4 = __toESM(require_undici());
116532
116266
 
116533
116267
  // src/dev/get-local-persistence-path.ts
@@ -116798,7 +116532,7 @@ __name(getKVNamespaceId, "getKVNamespaceId");
116798
116532
  async function usingLocalNamespace(persistTo, config, namespaceId, closure) {
116799
116533
  const persist = getLocalPersistencePath(persistTo, config);
116800
116534
  const persistOptions = buildPersistOptions(persist);
116801
- const mf = new import_miniflare12.Miniflare({
116535
+ const mf = new import_miniflare11.Miniflare({
116802
116536
  script: 'addEventListener("fetch", (e) => e.respondWith(new Response(null, { status: 404 })))',
116803
116537
  ...persistOptions,
116804
116538
  kvNamespaces: { NAMESPACE: namespaceId }
@@ -116816,7 +116550,7 @@ __name(usingLocalNamespace, "usingLocalNamespace");
116816
116550
  init_import_meta_url();
116817
116551
  var fs10 = __toESM(require("node:fs"));
116818
116552
  var import_web = require("node:stream/web");
116819
- var import_miniflare14 = require("miniflare");
116553
+ var import_miniflare13 = require("miniflare");
116820
116554
 
116821
116555
  // src/queues/client.ts
116822
116556
  init_import_meta_url();
@@ -117256,7 +116990,7 @@ __name(deleteR2Object, "deleteR2Object");
117256
116990
  async function usingLocalBucket(persistTo, config, bucketName, closure) {
117257
116991
  const persist = getLocalPersistencePath(persistTo, config);
117258
116992
  const persistOptions = buildPersistOptions(persist);
117259
- const mf = new import_miniflare14.Miniflare({
116993
+ const mf = new import_miniflare13.Miniflare({
117260
116994
  modules: true,
117261
116995
  // TODO(soon): import `reduceError()` from `miniflare:shared`
117262
116996
  script: `
@@ -117795,7 +117529,6 @@ function getBindings(config, options30) {
117795
117529
  wasm_modules: options30?.pages ? void 0 : config?.wasm_modules,
117796
117530
  browser: config?.browser,
117797
117531
  ai: config?.ai,
117798
- images: config?.images,
117799
117532
  version_metadata: config?.version_metadata,
117800
117533
  text_blobs: options30?.pages ? void 0 : config?.text_blobs,
117801
117534
  data_blobs: options30?.pages ? void 0 : config?.data_blobs,
@@ -119529,12 +119262,6 @@ function createWorkerUploadForm(worker) {
119529
119262
  type: "ai"
119530
119263
  });
119531
119264
  }
119532
- if (bindings.images !== void 0) {
119533
- metadataBindings.push({
119534
- name: bindings.images.binding,
119535
- type: "images"
119536
- });
119537
- }
119538
119265
  if (bindings.version_metadata !== void 0) {
119539
119266
  metadataBindings.push({
119540
119267
  name: bindings.version_metadata.binding,
@@ -119746,7 +119473,7 @@ __name(logBuildOutput, "logBuildOutput");
119746
119473
 
119747
119474
  // src/deployment-bundle/node-compat.ts
119748
119475
  init_import_meta_url();
119749
- var import_miniflare16 = require("miniflare");
119476
+ var import_miniflare15 = require("miniflare");
119750
119477
  function validateNodeCompatMode(compatibilityDateStr = "2000-01-01", compatibilityFlags, {
119751
119478
  nodeCompat: legacy = false,
119752
119479
  noBundle = void 0
@@ -119757,7 +119484,7 @@ function validateNodeCompatMode(compatibilityDateStr = "2000-01-01", compatibili
119757
119484
  hasNodejsCompatFlag,
119758
119485
  hasNodejsCompatV2Flag,
119759
119486
  hasExperimentalNodejsCompatV2Flag
119760
- } = (0, import_miniflare16.getNodeCompat)(compatibilityDateStr, compatibilityFlags, {
119487
+ } = (0, import_miniflare15.getNodeCompat)(compatibilityDateStr, compatibilityFlags, {
119761
119488
  nodeCompat: legacy
119762
119489
  });
119763
119490
  if (hasExperimentalNodejsCompatV2Flag) {
@@ -123790,7 +123517,7 @@ init_import_meta_url();
123790
123517
  // src/cli-hotkeys.ts
123791
123518
  init_import_meta_url();
123792
123519
  var import_readline = __toESM(require("readline"));
123793
- var import_miniflare17 = require("miniflare");
123520
+ var import_miniflare16 = require("miniflare");
123794
123521
 
123795
123522
  // src/utils/onKeyPress.ts
123796
123523
  init_import_meta_url();
@@ -123884,16 +123611,16 @@ function cli_hotkeys_default(options30) {
123884
123611
  __name(printInstructions, "printInstructions");
123885
123612
  Logger.registerBeforeLogHook(clearPreviousInstructions);
123886
123613
  Logger.registerAfterLogHook(printInstructions);
123887
- import_miniflare17.Log.unstable_registerBeforeLogHook(clearPreviousInstructions);
123888
- import_miniflare17.Log.unstable_registerAfterLogHook(printInstructions);
123614
+ import_miniflare16.Log.unstable_registerBeforeLogHook(clearPreviousInstructions);
123615
+ import_miniflare16.Log.unstable_registerAfterLogHook(printInstructions);
123889
123616
  printInstructions();
123890
123617
  return () => {
123891
123618
  unregisterKeyPress();
123892
123619
  clearPreviousInstructions();
123893
123620
  Logger.registerBeforeLogHook(void 0);
123894
123621
  Logger.registerAfterLogHook(void 0);
123895
- import_miniflare17.Log.unstable_registerBeforeLogHook(void 0);
123896
- import_miniflare17.Log.unstable_registerAfterLogHook(void 0);
123622
+ import_miniflare16.Log.unstable_registerBeforeLogHook(void 0);
123623
+ import_miniflare16.Log.unstable_registerAfterLogHook(void 0);
123897
123624
  };
123898
123625
  }
123899
123626
  __name(cli_hotkeys_default, "default");
@@ -124274,11 +124001,6 @@ var dev = createCommand({
124274
124001
  type: "boolean",
124275
124002
  describe: "Bind to production Vectorize indexes in local development mode",
124276
124003
  default: false
124277
- },
124278
- "experimental-images-local-mode": {
124279
- type: "boolean",
124280
- describe: "Use a local lower-fidelity implementation of the Images binding",
124281
- default: false
124282
124004
  }
124283
124005
  },
124284
124006
  async validateArgs(args) {
@@ -124418,7 +124140,6 @@ async function setupDevEnv(devEnv, configPath, auth, args) {
124418
124140
  text_blobs: void 0,
124419
124141
  browser: void 0,
124420
124142
  ai: args.ai,
124421
- images: void 0,
124422
124143
  version_metadata: args.version_metadata,
124423
124144
  data_blobs: void 0,
124424
124145
  durable_objects: { bindings: args.durableObjects ?? [] },
@@ -124461,7 +124182,6 @@ async function setupDevEnv(devEnv, configPath, auth, args) {
124461
124182
  logLevel: args.logLevel,
124462
124183
  registry: args.disableDevRegistry ? null : devEnv.config.latestConfig?.dev.registry,
124463
124184
  bindVectorizeToProd: args.experimentalVectorizeBindToProd,
124464
- imagesLocalMode: args.experimentalImagesLocalMode,
124465
124185
  multiworkerPrimary: args.multiworkerPrimary
124466
124186
  },
124467
124187
  legacy: {
@@ -124823,7 +124543,6 @@ function getBindings2(configParam, env7, local, args) {
124823
124543
  analytics_engine_datasets: configParam.analytics_engine_datasets,
124824
124544
  browser: configParam.browser,
124825
124545
  ai: args.ai || configParam.ai,
124826
- images: configParam.images,
124827
124546
  version_metadata: args.version_metadata || configParam.version_metadata,
124828
124547
  unsafe: {
124829
124548
  bindings: configParam.unsafe.bindings,
@@ -124882,7 +124601,6 @@ async function unstable_dev(script, options30, apiOptions) {
124882
124601
  testMode,
124883
124602
  testScheduled,
124884
124603
  vectorizeBindToProd,
124885
- imagesLocalMode,
124886
124604
  // 2. options for alpha/beta products/libs
124887
124605
  d1Databases,
124888
124606
  enablePagesAssetsServiceBinding
@@ -124973,7 +124691,6 @@ unstable_dev()'s behaviour will likely change in future releases`
124973
124691
  port: options30?.port ?? 0,
124974
124692
  experimentalProvision: void 0,
124975
124693
  experimentalVectorizeBindToProd: vectorizeBindToProd ?? false,
124976
- experimentalImagesLocalMode: imagesLocalMode ?? false,
124977
124694
  enableIpc: options30?.experimental?.enableIpc
124978
124695
  };
124979
124696
  const devServer = await run(
@@ -127535,8 +127252,7 @@ async function resolveDevConfig(config, input) {
127535
127252
  persist: localPersistencePath,
127536
127253
  registry: input.dev?.registry,
127537
127254
  bindVectorizeToProd: input.dev?.bindVectorizeToProd ?? false,
127538
- multiworkerPrimary: input.dev?.multiworkerPrimary,
127539
- imagesLocalMode: input.dev?.imagesLocalMode ?? false
127255
+ multiworkerPrimary: input.dev?.multiworkerPrimary
127540
127256
  };
127541
127257
  }
127542
127258
  __name(resolveDevConfig, "resolveDevConfig");
@@ -127571,7 +127287,6 @@ async function resolveBindings(config, input) {
127571
127287
  {
127572
127288
  registry: input.dev?.registry,
127573
127289
  local: !input.dev?.remote,
127574
- imagesLocalMode: input.dev?.imagesLocalMode,
127575
127290
  name: config.name
127576
127291
  }
127577
127292
  );
@@ -127825,7 +127540,7 @@ __name(ConfigController, "ConfigController");
127825
127540
 
127826
127541
  // src/api/startDevWorker/RemoteRuntimeController.ts
127827
127542
  init_import_meta_url();
127828
- var import_miniflare19 = require("miniflare");
127543
+ var import_miniflare18 = require("miniflare");
127829
127544
 
127830
127545
  // src/dev/create-worker-preview.ts
127831
127546
  init_import_meta_url();
@@ -128179,7 +127894,7 @@ __name(notImplemented, "notImplemented");
128179
127894
  var RemoteRuntimeController = class extends RuntimeController {
128180
127895
  #abortController = new AbortController();
128181
127896
  #currentBundleId = 0;
128182
- #mutex = new import_miniflare19.Mutex();
127897
+ #mutex = new import_miniflare18.Mutex();
128183
127898
  #session;
128184
127899
  async #previewSession(props) {
128185
127900
  try {
@@ -128572,7 +128287,7 @@ init_import_meta_url();
128572
128287
 
128573
128288
  // src/api/integrations/platform/index.ts
128574
128289
  init_import_meta_url();
128575
- var import_miniflare21 = require("miniflare");
128290
+ var import_miniflare20 = require("miniflare");
128576
128291
 
128577
128292
  // src/api/integrations/platform/caches.ts
128578
128293
  init_import_meta_url();
@@ -128633,7 +128348,7 @@ __name(ExecutionContext, "ExecutionContext");
128633
128348
 
128634
128349
  // src/api/integrations/platform/services.ts
128635
128350
  init_import_meta_url();
128636
- var import_miniflare20 = require("miniflare");
128351
+ var import_miniflare19 = require("miniflare");
128637
128352
  var import_undici13 = __toESM(require_undici());
128638
128353
  async function getServiceBindings(services = []) {
128639
128354
  if (services.length === 0) {
@@ -128685,9 +128400,9 @@ function getServiceBindingProxyFetch({
128685
128400
  try {
128686
128401
  const resp = await (0, import_undici13.fetch)(newUrl, request4);
128687
128402
  const respBody = await resp.arrayBuffer();
128688
- return new import_miniflare20.Response(respBody, resp);
128403
+ return new import_miniflare19.Response(respBody, resp);
128689
128404
  } catch {
128690
- return new import_miniflare20.Response(
128405
+ return new import_miniflare19.Response(
128691
128406
  `Error: Unable to fetch from external service (${serviceName} bound with ${bindingName} binding), please make sure that the service is still running with \`wrangler dev\``,
128692
128407
  { status: 500 }
128693
128408
  );
@@ -128718,7 +128433,7 @@ async function getPlatformProxy(options30 = {}) {
128718
128433
  },
128719
128434
  () => getMiniflareOptionsFromConfig(rawConfig, env7, options30)
128720
128435
  );
128721
- const mf = new import_miniflare21.Miniflare({
128436
+ const mf = new import_miniflare20.Miniflare({
128722
128437
  script: "",
128723
128438
  modules: true,
128724
128439
  ...miniflareOptions
@@ -128749,8 +128464,7 @@ async function getMiniflareOptionsFromConfig(rawConfig, env7, options30) {
128749
128464
  queueConsumers: void 0,
128750
128465
  services: rawConfig.services,
128751
128466
  serviceBindings: {},
128752
- migrations: rawConfig.migrations,
128753
- imagesLocalMode: false
128467
+ migrations: rawConfig.migrations
128754
128468
  });
128755
128469
  const persistOptions = getMiniflarePersistOptions(options30.persist);
128756
128470
  const serviceBindings = await getServiceBindings(bindings.services);
@@ -128817,13 +128531,12 @@ function unstable_getMiniflareWorkerOptions(configOrConfigPath, env7) {
128817
128531
  queueConsumers: config.queues.consumers,
128818
128532
  services: [],
128819
128533
  serviceBindings: {},
128820
- migrations: config.migrations,
128821
- imagesLocalMode: false
128534
+ migrations: config.migrations
128822
128535
  });
128823
128536
  if (bindings.services !== void 0) {
128824
128537
  bindingOptions.serviceBindings = Object.fromEntries(
128825
128538
  bindings.services.map((binding) => {
128826
- const name2 = binding.service === config.name ? import_miniflare21.kCurrentWorker : binding.service;
128539
+ const name2 = binding.service === config.name ? import_miniflare20.kCurrentWorker : binding.service;
128827
128540
  return [binding.binding, { name: name2, entrypoint: binding.entrypoint }];
128828
128541
  })
128829
128542
  );
@@ -140476,7 +140189,7 @@ var import_fs13 = require("fs");
140476
140189
  var import_node_assert25 = __toESM(require("node:assert"));
140477
140190
  var import_node_path54 = __toESM(require("node:path"));
140478
140191
  var import_md5_file = __toESM(require_md5_file());
140479
- var import_miniflare23 = require("miniflare");
140192
+ var import_miniflare22 = require("miniflare");
140480
140193
  var import_undici16 = __toESM(require_undici());
140481
140194
 
140482
140195
  // src/d1/splitter.ts
@@ -140812,7 +140525,7 @@ async function executeLocally({
140812
140525
  logger.log(
140813
140526
  "\u{1F300} To execute on your remote database, add a --remote flag to your wrangler command."
140814
140527
  );
140815
- const mf = new import_miniflare23.Miniflare({
140528
+ const mf = new import_miniflare22.Miniflare({
140816
140529
  modules: true,
140817
140530
  script: "",
140818
140531
  d1Persist,
@@ -141075,7 +140788,7 @@ __name(checkForSQLiteBinary, "checkForSQLiteBinary");
141075
140788
  init_import_meta_url();
141076
140789
  var import_promises24 = __toESM(require("node:fs/promises"));
141077
140790
  var import_node_path55 = __toESM(require("node:path"));
141078
- var import_miniflare24 = require("miniflare");
140791
+ var import_miniflare23 = require("miniflare");
141079
140792
  var import_undici17 = __toESM(require_undici());
141080
140793
  function Options7(yargs) {
141081
140794
  return Name(yargs).option("local", {
@@ -141144,7 +140857,7 @@ async function exportLocal(config, name2, output, tables, noSchema, noData) {
141144
140857
  logger.log(
141145
140858
  "\u{1F300} To export your remote database, add a --remote flag to your wrangler command."
141146
140859
  );
141147
- const mf = new import_miniflare24.Miniflare({
140860
+ const mf = new import_miniflare23.Miniflare({
141148
140861
  modules: true,
141149
140862
  script: "export default {}",
141150
140863
  d1Persist,
@@ -144073,13 +143786,6 @@ async function mapBindings(accountId, bindings) {
144073
143786
  };
144074
143787
  }
144075
143788
  break;
144076
- case "images":
144077
- {
144078
- configObj.images = {
144079
- binding: binding.name
144080
- };
144081
- }
144082
- break;
144083
143789
  case "r2_bucket":
144084
143790
  {
144085
143791
  configObj.r2_buckets = [
@@ -147708,11 +147414,6 @@ function Options14(yargs) {
147708
147414
  type: "boolean",
147709
147415
  describe: "Bind to production Vectorize indexes in local development mode",
147710
147416
  default: false
147711
- },
147712
- "experimental-images-local-mode": {
147713
- type: "boolean",
147714
- describe: "Use a local lower-fidelity implementation of the Images binding",
147715
- default: false
147716
147417
  }
147717
147418
  });
147718
147419
  }
@@ -148153,7 +147854,6 @@ ${JSON.stringify(defaultRoutesJSONSpec, null, 2)}`
148153
147854
  logLevel: args.logLevel ?? "log",
148154
147855
  experimentalProvision: void 0,
148155
147856
  experimentalVectorizeBindToProd: false,
148156
- experimentalImagesLocalMode: false,
148157
147857
  enableIpc: true,
148158
147858
  config: Array.isArray(args.config) ? args.config : void 0,
148159
147859
  legacyAssets: void 0,
@@ -148439,12 +148139,12 @@ init_import_meta_url();
148439
148139
  var import_fs14 = require("fs");
148440
148140
  var import_promises28 = require("node:fs/promises");
148441
148141
  var import_toml8 = __toESM(require_toml());
148442
- var import_miniflare25 = require("miniflare");
148142
+ var import_miniflare24 = require("miniflare");
148443
148143
  async function toEnvironment(deploymentConfig, accountId) {
148444
148144
  const configObj = {};
148445
148145
  configObj.compatibility_date = deploymentConfig.compatibility_date ?? (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
148446
148146
  if (deploymentConfig.always_use_latest_compatibility_date) {
148447
- configObj.compatibility_date = import_miniflare25.supportedCompatibilityDate;
148147
+ configObj.compatibility_date = import_miniflare24.supportedCompatibilityDate;
148448
148148
  }
148449
148149
  if (deploymentConfig.compatibility_flags?.length) {
148450
148150
  configObj.compatibility_flags = deploymentConfig.compatibility_flags;
@@ -148802,7 +148502,6 @@ async function createDraftWorker({
148802
148502
  wasm_modules: {},
148803
148503
  browser: void 0,
148804
148504
  ai: void 0,
148805
- images: void 0,
148806
148505
  version_metadata: void 0,
148807
148506
  text_blobs: {},
148808
148507
  data_blobs: {},
@@ -149826,12 +149525,12 @@ init_import_meta_url();
149826
149525
  init_import_meta_url();
149827
149526
 
149828
149527
  // ../../node_modules/.pnpm/@smithy+util-buffer-from@2.2.0/node_modules/@smithy/util-buffer-from/dist-es/index.js
149829
- var import_buffer3 = require("buffer");
149528
+ var import_buffer2 = require("buffer");
149830
149529
  var fromString2 = /* @__PURE__ */ __name((input, encoding) => {
149831
149530
  if (typeof input !== "string") {
149832
149531
  throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`);
149833
149532
  }
149834
- return encoding ? import_buffer3.Buffer.from(input, encoding) : import_buffer3.Buffer.from(input);
149533
+ return encoding ? import_buffer2.Buffer.from(input, encoding) : import_buffer2.Buffer.from(input);
149835
149534
  }, "fromString");
149836
149535
 
149837
149536
  // ../../node_modules/.pnpm/@smithy+util-utf8@2.3.0/node_modules/@smithy/util-utf8/dist-es/fromUtf8.js
@@ -166220,13 +165919,13 @@ __name(triggersDeployHandler, "triggersDeployHandler");
166220
165919
  init_import_meta_url();
166221
165920
  var fs28 = __toESM(require("node:fs"));
166222
165921
  var import_node_path66 = require("node:path");
166223
- var import_miniflare27 = require("miniflare");
165922
+ var import_miniflare26 = require("miniflare");
166224
165923
 
166225
165924
  // src/type-generation/runtime/index.ts
166226
165925
  init_import_meta_url();
166227
165926
  var import_fs23 = require("fs");
166228
165927
  var import_promises32 = require("fs/promises");
166229
- var import_miniflare26 = require("miniflare");
165928
+ var import_miniflare25 = require("miniflare");
166230
165929
  var import_workerd = require("workerd");
166231
165930
  var DEFAULT_OUTFILE_RELATIVE_PATH = "./.wrangler/types/runtime.d.ts";
166232
165931
  async function generateRuntimeTypes({
@@ -166268,7 +165967,7 @@ async function generate({
166268
165967
  compatibilityFlags = []
166269
165968
  }) {
166270
165969
  const worker = (0, import_fs23.readFileSync)(require.resolve("workerd/worker.mjs")).toString();
166271
- const mf = new import_miniflare26.Miniflare({
165970
+ const mf = new import_miniflare25.Miniflare({
166272
165971
  compatibilityDate: "2024-01-01",
166273
165972
  compatibilityFlags: ["nodejs_compat", "rtti_api"],
166274
165973
  modules: true,
@@ -166410,7 +166109,7 @@ var typesCommand = createCommand({
166410
166109
  });
166411
166110
  const tsconfigPath = config.tsconfig ?? (0, import_node_path66.join)((0, import_node_path66.dirname)(config.configPath), "tsconfig.json");
166412
166111
  const tsconfigTypes = readTsconfigTypes(tsconfigPath);
166413
- const { mode } = (0, import_miniflare27.getNodeCompat)(
166112
+ const { mode } = (0, import_miniflare26.getNodeCompat)(
166414
166113
  config.compatibility_date,
166415
166114
  config.compatibility_flags,
166416
166115
  {