@hot-updater/cloudflare 0.19.9 → 0.19.10

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/dist/index.cjs CHANGED
@@ -44,7 +44,7 @@ const node_stream = __toESM(require("node:stream"));
44
44
  const node_buffer = __toESM(require("node:buffer"));
45
45
 
46
46
  //#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js
47
- var require_utils = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js"(exports, module) {
47
+ var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js": ((exports, module) => {
48
48
  const { inspect: inspect$2 } = require("util");
49
49
  function getIndexPos$1(text, index) {
50
50
  let lineIdx = 0, colIdx = index, pos = 0;
@@ -71,11 +71,11 @@ var require_utils = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_
71
71
  messageGap: messageGap$1,
72
72
  addInspection: addInspection$1
73
73
  };
74
- } });
74
+ }) });
75
75
 
76
76
  //#endregion
77
77
  //#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js
78
- var require_error = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js"(exports, module) {
78
+ var require_error = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js": ((exports, module) => {
79
79
  const { EOL } = require("os");
80
80
  const { addInspection, messageGap } = require_utils();
81
81
  const parsingErrorCode$1 = {
@@ -134,11 +134,11 @@ var require_error = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_
134
134
  SQLParsingError: SQLParsingError$1,
135
135
  parsingErrorCode: parsingErrorCode$1
136
136
  };
137
- } });
137
+ }) });
138
138
 
139
139
  //#endregion
140
140
  //#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js
141
- var require_parser = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js"(exports, module) {
141
+ var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js": ((exports, module) => {
142
142
  const { parsingErrorCode, SQLParsingError } = require_error();
143
143
  const { getIndexPos } = require_utils();
144
144
  const compressors = ".,;:()[]=<>+-*/|!?@#";
@@ -268,21 +268,21 @@ var require_parser = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node
268
268
  return s === " " || s === " " || s === "\r" || s === "\n";
269
269
  }
270
270
  module.exports = minify$1;
271
- } });
271
+ }) });
272
272
 
273
273
  //#endregion
274
274
  //#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/index.js
275
- var require_lib = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/index.js"(exports, module) {
275
+ var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/index.js": ((exports, module) => {
276
276
  const parser = require_parser();
277
277
  const error = require_error();
278
278
  parser.SQLParsingError = error.SQLParsingError;
279
279
  parser.parsingErrorCode = error.parsingErrorCode;
280
280
  module.exports = parser;
281
- } });
281
+ }) });
282
282
 
283
283
  //#endregion
284
284
  //#region src/d1Database.ts
285
- var import_lib = __toESM(require_lib());
285
+ var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
286
286
  async function resolvePage(singlePage) {
287
287
  const results = [];
288
288
  for await (const page of singlePage.iterPages()) {
@@ -1254,10 +1254,10 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
1254
1254
 
1255
1255
  //#endregion
1256
1256
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
1257
- var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
1257
+ var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
1258
1258
  module.exports = isexe$3;
1259
1259
  isexe$3.sync = sync$2;
1260
- var fs$3 = require("fs");
1260
+ var fs$2 = require("fs");
1261
1261
  function checkPathExt(path$10, options) {
1262
1262
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
1263
1263
  if (!pathext) return true;
@@ -1274,28 +1274,28 @@ var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_mo
1274
1274
  return checkPathExt(path$10, options);
1275
1275
  }
1276
1276
  function isexe$3(path$10, options, cb) {
1277
- fs$3.stat(path$10, function(er, stat) {
1277
+ fs$2.stat(path$10, function(er, stat) {
1278
1278
  cb(er, er ? false : checkStat$1(stat, path$10, options));
1279
1279
  });
1280
1280
  }
1281
1281
  function sync$2(path$10, options) {
1282
- return checkStat$1(fs$3.statSync(path$10), path$10, options);
1282
+ return checkStat$1(fs$2.statSync(path$10), path$10, options);
1283
1283
  }
1284
- } });
1284
+ }) });
1285
1285
 
1286
1286
  //#endregion
1287
1287
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
1288
- var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
1288
+ var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
1289
1289
  module.exports = isexe$2;
1290
1290
  isexe$2.sync = sync$1;
1291
- var fs$2 = require("fs");
1291
+ var fs$1 = require("fs");
1292
1292
  function isexe$2(path$10, options, cb) {
1293
- fs$2.stat(path$10, function(er, stat) {
1293
+ fs$1.stat(path$10, function(er, stat) {
1294
1294
  cb(er, er ? false : checkStat(stat, options));
1295
1295
  });
1296
1296
  }
1297
1297
  function sync$1(path$10, options) {
1298
- return checkStat(fs$2.statSync(path$10), options);
1298
+ return checkStat(fs$1.statSync(path$10), options);
1299
1299
  }
1300
1300
  function checkStat(stat, options) {
1301
1301
  return stat.isFile() && checkMode(stat, options);
@@ -1313,12 +1313,12 @@ var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modul
1313
1313
  var ret = mod & o$1 || mod & g && gid === myGid || mod & u$1 && uid === myUid || mod & ug && myUid === 0;
1314
1314
  return ret;
1315
1315
  }
1316
- } });
1316
+ }) });
1317
1317
 
1318
1318
  //#endregion
1319
1319
  //#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
1320
- var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
1321
- var fs$1 = require("fs");
1320
+ var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
1321
+ require("fs");
1322
1322
  var core;
1323
1323
  if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
1324
1324
  else core = require_mode();
@@ -1356,16 +1356,16 @@ var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modu
1356
1356
  else throw er;
1357
1357
  }
1358
1358
  }
1359
- } });
1359
+ }) });
1360
1360
 
1361
1361
  //#endregion
1362
1362
  //#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
1363
- var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
1363
+ var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
1364
1364
  const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
1365
1365
  const path$9 = require("path");
1366
1366
  const COLON = isWindows ? ";" : ":";
1367
1367
  const isexe = require_isexe();
1368
- const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
1368
+ const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
1369
1369
  const getPathInfo = (cmd, opt) => {
1370
1370
  const colon = opt.colon || COLON;
1371
1371
  const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
@@ -1431,11 +1431,11 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
1431
1431
  };
1432
1432
  module.exports = which$1;
1433
1433
  which$1.sync = whichSync;
1434
- } });
1434
+ }) });
1435
1435
 
1436
1436
  //#endregion
1437
1437
  //#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
1438
- var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
1438
+ var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js": ((exports, module) => {
1439
1439
  const pathKey$1 = (options = {}) => {
1440
1440
  const environment = options.env || process.env;
1441
1441
  const platform$1 = options.platform || process.platform;
@@ -1444,11 +1444,11 @@ var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/nod
1444
1444
  };
1445
1445
  module.exports = pathKey$1;
1446
1446
  module.exports.default = pathKey$1;
1447
- } });
1447
+ }) });
1448
1448
 
1449
1449
  //#endregion
1450
1450
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
1451
- var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
1451
+ var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
1452
1452
  const path$8 = require("path");
1453
1453
  const which = require_which();
1454
1454
  const getPathKey = require_path_key();
@@ -1476,11 +1476,11 @@ var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@
1476
1476
  return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
1477
1477
  }
1478
1478
  module.exports = resolveCommand$1;
1479
- } });
1479
+ }) });
1480
1480
 
1481
1481
  //#endregion
1482
1482
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
1483
- var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
1483
+ var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js": ((exports, module) => {
1484
1484
  const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
1485
1485
  function escapeCommand(arg) {
1486
1486
  arg = arg.replace(metaCharsRegExp, "^$1");
@@ -1497,17 +1497,17 @@ var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
1497
1497
  }
1498
1498
  module.exports.command = escapeCommand;
1499
1499
  module.exports.argument = escapeArgument;
1500
- } });
1500
+ }) });
1501
1501
 
1502
1502
  //#endregion
1503
1503
  //#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
1504
- var require_shebang_regex = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
1504
+ var require_shebang_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js": ((exports, module) => {
1505
1505
  module.exports = /^#!(.*)/;
1506
- } });
1506
+ }) });
1507
1507
 
1508
1508
  //#endregion
1509
1509
  //#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
1510
- var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
1510
+ var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js": ((exports, module) => {
1511
1511
  const shebangRegex = require_shebang_regex();
1512
1512
  module.exports = (string = "") => {
1513
1513
  const match = string.match(shebangRegex);
@@ -1517,11 +1517,11 @@ var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-com
1517
1517
  if (binary === "env") return argument;
1518
1518
  return argument ? `${binary} ${argument}` : binary;
1519
1519
  };
1520
- } });
1520
+ }) });
1521
1521
 
1522
1522
  //#endregion
1523
1523
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
1524
- var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
1524
+ var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
1525
1525
  const fs = require("fs");
1526
1526
  const shebangCommand = require_shebang_command();
1527
1527
  function readShebang$1(command) {
@@ -1536,11 +1536,11 @@ var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
1536
1536
  return shebangCommand(buffer.toString());
1537
1537
  }
1538
1538
  module.exports = readShebang$1;
1539
- } });
1539
+ }) });
1540
1540
 
1541
1541
  //#endregion
1542
1542
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
1543
- var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
1543
+ var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
1544
1544
  const path$7 = require("path");
1545
1545
  const resolveCommand = require_resolveCommand();
1546
1546
  const escape = require_escape();
@@ -1599,14 +1599,14 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
1599
1599
  return options.shell ? parsed : parseNonShell(parsed);
1600
1600
  }
1601
1601
  module.exports = parse$1;
1602
- } });
1602
+ }) });
1603
1603
 
1604
1604
  //#endregion
1605
1605
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
1606
- var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
1606
+ var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js": ((exports, module) => {
1607
1607
  const isWin = process.platform === "win32";
1608
1608
  function notFoundError(original, syscall) {
1609
- return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
1609
+ return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
1610
1610
  code: "ENOENT",
1611
1611
  errno: "ENOENT",
1612
1612
  syscall: `${syscall} ${original.command}`,
@@ -1639,11 +1639,11 @@ var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
1639
1639
  verifyENOENTSync,
1640
1640
  notFoundError
1641
1641
  };
1642
- } });
1642
+ }) });
1643
1643
 
1644
1644
  //#endregion
1645
1645
  //#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
1646
- var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
1646
+ var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
1647
1647
  const cp = require("child_process");
1648
1648
  const parse = require_parse();
1649
1649
  const enoent = require_enoent();
@@ -1664,10 +1664,11 @@ var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
1664
1664
  module.exports.sync = spawnSync$1;
1665
1665
  module.exports._parse = parse;
1666
1666
  module.exports._enoent = enoent;
1667
- } });
1667
+ }) });
1668
1668
 
1669
1669
  //#endregion
1670
1670
  //#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
1671
+ var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
1671
1672
  function pathKey(options = {}) {
1672
1673
  const { env = process.env, platform: platform$1 = process.platform } = options;
1673
1674
  if (platform$1 !== "win32") return "PATH";
@@ -2238,7 +2239,7 @@ const throwOnMissingStrict = (isSubprocess) => {
2238
2239
  const throwOnStrictDisconnect = (isSubprocess) => {
2239
2240
  throw new Error(`${getMethodName("sendMessage", isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} exited without listening to incoming messages.`);
2240
2241
  };
2241
- const getAbortDisconnectError = () => new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
2242
+ const getAbortDisconnectError = () => /* @__PURE__ */ new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
2242
2243
  const throwOnMissingParent = () => {
2243
2244
  throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.");
2244
2245
  };
@@ -2876,7 +2877,6 @@ const fixCwdError = (originalMessage, cwd) => {
2876
2877
 
2877
2878
  //#endregion
2878
2879
  //#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
2879
- var import_cross_spawn = __toESM(require_cross_spawn(), 1);
2880
2880
  const normalizeOptions = (filePath, rawArguments, rawOptions) => {
2881
2881
  rawOptions.cwd = normalizeCwd(rawOptions.cwd);
2882
2882
  const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
@@ -3204,7 +3204,7 @@ const arrayMethods = {
3204
3204
  async function getStreamAsArrayBuffer(stream, options) {
3205
3205
  return getStreamContents$1(stream, arrayBufferMethods, options);
3206
3206
  }
3207
- const initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
3207
+ const initArrayBuffer = () => ({ contents: /* @__PURE__ */ new ArrayBuffer(0) });
3208
3208
  const useTextEncoder = (chunk) => textEncoder.encode(chunk);
3209
3209
  const textEncoder = new TextEncoder();
3210
3210
  const useUint8Array = (chunk) => new Uint8Array(chunk);
@@ -3553,10 +3553,9 @@ function parseBigint(milliseconds) {
3553
3553
  }
3554
3554
  function parseMilliseconds(milliseconds) {
3555
3555
  switch (typeof milliseconds) {
3556
- case "number": {
3556
+ case "number":
3557
3557
  if (Number.isFinite(milliseconds)) return parseNumber(milliseconds);
3558
3558
  break;
3559
- }
3560
3559
  case "bigint": return parseBigint(milliseconds);
3561
3560
  }
3562
3561
  throw new TypeError("Expected a finite number or bigint");
@@ -4096,10 +4095,10 @@ const getDuplicateStream = ({ stdioItem: { type, value, optionName }, direction,
4096
4095
  optionName
4097
4096
  });
4098
4097
  };
4099
- const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map((stdioItem) => ({
4098
+ const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map(((stdioItem) => ({
4100
4099
  ...stdioItem,
4101
4100
  direction
4102
- })));
4101
+ }))));
4103
4102
  const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName, direction }) => {
4104
4103
  if (SPECIAL_DUPLICATE_TYPES_SYNC.has(type)) getDuplicateStreamInstance({
4105
4104
  otherStdioItems,
@@ -4616,7 +4615,7 @@ const logLine = (line, fdNumber, verboseInfo) => {
4616
4615
  const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
4617
4616
  if (output === null) return { output: Array.from({ length: 3 }) };
4618
4617
  const state = {};
4619
- const outputFiles = new Set([]);
4618
+ const outputFiles = /* @__PURE__ */ new Set([]);
4620
4619
  const transformedOutput = output.map((result, fdNumber) => transformOutputResultSync({
4621
4620
  result,
4622
4621
  fileDescriptors,
@@ -5178,9 +5177,9 @@ const getHighWaterMark = (streams, objectMode) => {
5178
5177
  return Math.max(...highWaterMarks);
5179
5178
  };
5180
5179
  var MergedStream = class extends node_stream.PassThrough {
5181
- #streams = new Set([]);
5182
- #ended = new Set([]);
5183
- #aborted = new Set([]);
5180
+ #streams = /* @__PURE__ */ new Set([]);
5181
+ #ended = /* @__PURE__ */ new Set([]);
5182
+ #aborted = /* @__PURE__ */ new Set([]);
5184
5183
  #onFinished;
5185
5184
  #unpipeEvent = Symbol("unpipe");
5186
5185
  #streamPromises = /* @__PURE__ */ new WeakMap();
@@ -5779,7 +5778,7 @@ const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ?
5779
5778
  const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
5780
5779
  await (0, node_util.aborted)(unpipeSignal, sourceStream);
5781
5780
  await mergedStream.remove(sourceStream);
5782
- const error$1 = new Error("Pipe canceled by `unpipeSignal` option.");
5781
+ const error$1 = /* @__PURE__ */ new Error("Pipe canceled by `unpipeSignal` option.");
5783
5782
  throw createNonCommandError({
5784
5783
  error: error$1,
5785
5784
  fileDescriptors,
@@ -8227,10 +8226,11 @@ const r2Storage = (config, hooks) => (_) => {
8227
8226
  cloudflareApiToken,
8228
8227
  cwd: process.cwd()
8229
8228
  });
8229
+ const getStorageKey = (0, __hot_updater_plugin_core.createStorageKeyBuilder)(config.basePath);
8230
8230
  return {
8231
8231
  name: "r2Storage",
8232
8232
  async deleteBundle(bundleId) {
8233
- const Key = `${bundleId}/bundle.zip `;
8233
+ const Key = getStorageKey(bundleId, "bundle.zip");
8234
8234
  try {
8235
8235
  await wrangler("r2", "object", "delete", [bucketName, Key].join("/"), "--remote");
8236
8236
  return { storageUri: `r2://${bucketName}/${Key}` };
@@ -8241,7 +8241,7 @@ const r2Storage = (config, hooks) => (_) => {
8241
8241
  async uploadBundle(bundleId, bundlePath) {
8242
8242
  const contentType = src_default.getType(bundlePath) ?? void 0;
8243
8243
  const filename = path.default.basename(bundlePath);
8244
- const Key = [bundleId, filename].join("/");
8244
+ const Key = getStorageKey(bundleId, filename);
8245
8245
  try {
8246
8246
  const { stderr, exitCode } = await wrangler("r2", "object", "put", [bucketName, Key].join("/"), "--file", bundlePath, ...contentType ? ["--content-type", contentType] : [], "--remote");
8247
8247
  if (exitCode !== 0 && stderr) throw new Error(stderr);
package/dist/index.d.cts CHANGED
@@ -14,6 +14,10 @@ interface R2StorageConfig {
14
14
  cloudflareApiToken: string;
15
15
  accountId: string;
16
16
  bucketName: string;
17
+ /**
18
+ * Base path where bundles will be stored in the bucket
19
+ */
20
+ basePath?: string;
17
21
  }
18
22
  declare const r2Storage: (config: R2StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
19
23
  //#endregion
package/dist/index.d.ts CHANGED
@@ -14,6 +14,10 @@ interface R2StorageConfig {
14
14
  cloudflareApiToken: string;
15
15
  accountId: string;
16
16
  bucketName: string;
17
+ /**
18
+ * Base path where bundles will be stored in the bucket
19
+ */
20
+ basePath?: string;
17
21
  }
18
22
  declare const r2Storage: (config: R2StorageConfig, hooks?: StoragePluginHooks) => (_: BasePluginArgs) => StoragePlugin;
19
23
  //#endregion