@hot-updater/cloudflare 0.20.0-rc.0 → 0.20.0
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/iac/index.cjs +136 -154
- package/dist/iac/index.js +136 -154
- package/dist/index.cjs +58 -58
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +59 -59
- package/package.json +4 -4
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +116 -117
- package/worker/dist/index.js.map +3 -3
- package/worker/wrangler.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module";
|
|
2
|
-
import { calculatePagination, createDatabasePlugin } from "@hot-updater/plugin-core";
|
|
2
|
+
import { calculatePagination, createDatabasePlugin, createStorageKeyBuilder } from "@hot-updater/plugin-core";
|
|
3
3
|
import Cloudflare from "cloudflare";
|
|
4
4
|
import path from "path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
@@ -46,7 +46,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
46
46
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js
|
|
49
|
-
var require_utils = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js"(exports, module) {
|
|
49
|
+
var require_utils = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/utils.js": ((exports, module) => {
|
|
50
50
|
const { inspect: inspect$1 } = __require("util");
|
|
51
51
|
function getIndexPos$1(text, index) {
|
|
52
52
|
let lineIdx = 0, colIdx = index, pos = 0;
|
|
@@ -73,11 +73,11 @@ var require_utils = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_
|
|
|
73
73
|
messageGap: messageGap$1,
|
|
74
74
|
addInspection: addInspection$1
|
|
75
75
|
};
|
|
76
|
-
} });
|
|
76
|
+
}) });
|
|
77
77
|
|
|
78
78
|
//#endregion
|
|
79
79
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js
|
|
80
|
-
var require_error = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js"(exports, module) {
|
|
80
|
+
var require_error = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/error.js": ((exports, module) => {
|
|
81
81
|
const { EOL } = __require("os");
|
|
82
82
|
const { addInspection, messageGap } = require_utils();
|
|
83
83
|
const parsingErrorCode$1 = {
|
|
@@ -136,11 +136,11 @@ var require_error = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_
|
|
|
136
136
|
SQLParsingError: SQLParsingError$1,
|
|
137
137
|
parsingErrorCode: parsingErrorCode$1
|
|
138
138
|
};
|
|
139
|
-
} });
|
|
139
|
+
}) });
|
|
140
140
|
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js
|
|
143
|
-
var require_parser = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js"(exports, module) {
|
|
143
|
+
var require_parser = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/parser.js": ((exports, module) => {
|
|
144
144
|
const { parsingErrorCode, SQLParsingError } = require_error();
|
|
145
145
|
const { getIndexPos } = require_utils();
|
|
146
146
|
const compressors = ".,;:()[]=<>+-*/|!?@#";
|
|
@@ -270,21 +270,21 @@ var require_parser = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node
|
|
|
270
270
|
return s === " " || s === " " || s === "\r" || s === "\n";
|
|
271
271
|
}
|
|
272
272
|
module.exports = minify$1;
|
|
273
|
-
} });
|
|
273
|
+
}) });
|
|
274
274
|
|
|
275
275
|
//#endregion
|
|
276
276
|
//#region ../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/index.js
|
|
277
|
-
var require_lib = __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/index.js"(exports, module) {
|
|
277
|
+
var require_lib = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/pg-minify@1.6.5/node_modules/pg-minify/lib/index.js": ((exports, module) => {
|
|
278
278
|
const parser = require_parser();
|
|
279
279
|
const error = require_error();
|
|
280
280
|
parser.SQLParsingError = error.SQLParsingError;
|
|
281
281
|
parser.parsingErrorCode = error.parsingErrorCode;
|
|
282
282
|
module.exports = parser;
|
|
283
|
-
} });
|
|
283
|
+
}) });
|
|
284
284
|
|
|
285
285
|
//#endregion
|
|
286
286
|
//#region src/d1Database.ts
|
|
287
|
-
var import_lib = __toESM(require_lib());
|
|
287
|
+
var import_lib = /* @__PURE__ */ __toESM(require_lib(), 1);
|
|
288
288
|
async function resolvePage(singlePage) {
|
|
289
289
|
const results = [];
|
|
290
290
|
for await (const page of singlePage.iterPages()) {
|
|
@@ -1256,10 +1256,10 @@ const handleCommand = (filePath, rawArguments, rawOptions) => {
|
|
|
1256
1256
|
|
|
1257
1257
|
//#endregion
|
|
1258
1258
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js
|
|
1259
|
-
var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js"(exports, module) {
|
|
1259
|
+
var require_windows = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/windows.js": ((exports, module) => {
|
|
1260
1260
|
module.exports = isexe$3;
|
|
1261
1261
|
isexe$3.sync = sync$2;
|
|
1262
|
-
var fs$
|
|
1262
|
+
var fs$2 = __require("fs");
|
|
1263
1263
|
function checkPathExt(path$5, options) {
|
|
1264
1264
|
var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
|
|
1265
1265
|
if (!pathext) return true;
|
|
@@ -1276,28 +1276,28 @@ var require_windows = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_mo
|
|
|
1276
1276
|
return checkPathExt(path$5, options);
|
|
1277
1277
|
}
|
|
1278
1278
|
function isexe$3(path$5, options, cb) {
|
|
1279
|
-
fs$
|
|
1279
|
+
fs$2.stat(path$5, function(er, stat) {
|
|
1280
1280
|
cb(er, er ? false : checkStat$1(stat, path$5, options));
|
|
1281
1281
|
});
|
|
1282
1282
|
}
|
|
1283
1283
|
function sync$2(path$5, options) {
|
|
1284
|
-
return checkStat$1(fs$
|
|
1284
|
+
return checkStat$1(fs$2.statSync(path$5), path$5, options);
|
|
1285
1285
|
}
|
|
1286
|
-
} });
|
|
1286
|
+
}) });
|
|
1287
1287
|
|
|
1288
1288
|
//#endregion
|
|
1289
1289
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js
|
|
1290
|
-
var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js"(exports, module) {
|
|
1290
|
+
var require_mode = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/mode.js": ((exports, module) => {
|
|
1291
1291
|
module.exports = isexe$2;
|
|
1292
1292
|
isexe$2.sync = sync$1;
|
|
1293
|
-
var fs$
|
|
1293
|
+
var fs$1 = __require("fs");
|
|
1294
1294
|
function isexe$2(path$5, options, cb) {
|
|
1295
|
-
fs$
|
|
1295
|
+
fs$1.stat(path$5, function(er, stat) {
|
|
1296
1296
|
cb(er, er ? false : checkStat(stat, options));
|
|
1297
1297
|
});
|
|
1298
1298
|
}
|
|
1299
1299
|
function sync$1(path$5, options) {
|
|
1300
|
-
return checkStat(fs$
|
|
1300
|
+
return checkStat(fs$1.statSync(path$5), options);
|
|
1301
1301
|
}
|
|
1302
1302
|
function checkStat(stat, options) {
|
|
1303
1303
|
return stat.isFile() && checkMode(stat, options);
|
|
@@ -1315,12 +1315,12 @@ var require_mode = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modul
|
|
|
1315
1315
|
var ret = mod & o$1 || mod & g && gid === myGid || mod & u$1 && uid === myUid || mod & ug && myUid === 0;
|
|
1316
1316
|
return ret;
|
|
1317
1317
|
}
|
|
1318
|
-
} });
|
|
1318
|
+
}) });
|
|
1319
1319
|
|
|
1320
1320
|
//#endregion
|
|
1321
1321
|
//#region ../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js
|
|
1322
|
-
var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js"(exports, module) {
|
|
1323
|
-
|
|
1322
|
+
var require_isexe = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modules/isexe/index.js": ((exports, module) => {
|
|
1323
|
+
__require("fs");
|
|
1324
1324
|
var core;
|
|
1325
1325
|
if (process.platform === "win32" || global.TESTING_WINDOWS) core = require_windows();
|
|
1326
1326
|
else core = require_mode();
|
|
@@ -1358,16 +1358,16 @@ var require_isexe = __commonJS({ "../../node_modules/.pnpm/isexe@2.0.0/node_modu
|
|
|
1358
1358
|
else throw er;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
} });
|
|
1361
|
+
}) });
|
|
1362
1362
|
|
|
1363
1363
|
//#endregion
|
|
1364
1364
|
//#region ../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js
|
|
1365
|
-
var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js"(exports, module) {
|
|
1365
|
+
var require_which = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modules/which/which.js": ((exports, module) => {
|
|
1366
1366
|
const isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
|
|
1367
1367
|
const path$4 = __require("path");
|
|
1368
1368
|
const COLON = isWindows ? ";" : ":";
|
|
1369
1369
|
const isexe = require_isexe();
|
|
1370
|
-
const getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
1370
|
+
const getNotFoundError = (cmd) => Object.assign(/* @__PURE__ */ new Error(`not found: ${cmd}`), { code: "ENOENT" });
|
|
1371
1371
|
const getPathInfo = (cmd, opt) => {
|
|
1372
1372
|
const colon = opt.colon || COLON;
|
|
1373
1373
|
const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [...isWindows ? [process.cwd()] : [], ...(opt.path || process.env.PATH || "").split(colon)];
|
|
@@ -1433,11 +1433,11 @@ var require_which = __commonJS({ "../../node_modules/.pnpm/which@2.0.2/node_modu
|
|
|
1433
1433
|
};
|
|
1434
1434
|
module.exports = which$1;
|
|
1435
1435
|
which$1.sync = whichSync;
|
|
1436
|
-
} });
|
|
1436
|
+
}) });
|
|
1437
1437
|
|
|
1438
1438
|
//#endregion
|
|
1439
1439
|
//#region ../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js
|
|
1440
|
-
var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js"(exports, module) {
|
|
1440
|
+
var require_path_key = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/node_modules/path-key/index.js": ((exports, module) => {
|
|
1441
1441
|
const pathKey$1 = (options = {}) => {
|
|
1442
1442
|
const environment = options.env || process.env;
|
|
1443
1443
|
const platform$1 = options.platform || process.platform;
|
|
@@ -1446,11 +1446,11 @@ var require_path_key = __commonJS({ "../../node_modules/.pnpm/path-key@3.1.1/nod
|
|
|
1446
1446
|
};
|
|
1447
1447
|
module.exports = pathKey$1;
|
|
1448
1448
|
module.exports.default = pathKey$1;
|
|
1449
|
-
} });
|
|
1449
|
+
}) });
|
|
1450
1450
|
|
|
1451
1451
|
//#endregion
|
|
1452
1452
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js
|
|
1453
|
-
var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
|
|
1453
|
+
var require_resolveCommand = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/resolveCommand.js": ((exports, module) => {
|
|
1454
1454
|
const path$3 = __require("path");
|
|
1455
1455
|
const which = require_which();
|
|
1456
1456
|
const getPathKey = require_path_key();
|
|
@@ -1478,11 +1478,11 @@ var require_resolveCommand = __commonJS({ "../../node_modules/.pnpm/cross-spawn@
|
|
|
1478
1478
|
return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
|
|
1479
1479
|
}
|
|
1480
1480
|
module.exports = resolveCommand$1;
|
|
1481
|
-
} });
|
|
1481
|
+
}) });
|
|
1482
1482
|
|
|
1483
1483
|
//#endregion
|
|
1484
1484
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js
|
|
1485
|
-
var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
|
|
1485
|
+
var require_escape = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/escape.js": ((exports, module) => {
|
|
1486
1486
|
const metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
|
|
1487
1487
|
function escapeCommand(arg) {
|
|
1488
1488
|
arg = arg.replace(metaCharsRegExp, "^$1");
|
|
@@ -1499,17 +1499,17 @@ var require_escape = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
|
|
|
1499
1499
|
}
|
|
1500
1500
|
module.exports.command = escapeCommand;
|
|
1501
1501
|
module.exports.argument = escapeArgument;
|
|
1502
|
-
} });
|
|
1502
|
+
}) });
|
|
1503
1503
|
|
|
1504
1504
|
//#endregion
|
|
1505
1505
|
//#region ../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js
|
|
1506
|
-
var require_shebang_regex = __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js"(exports, module) {
|
|
1506
|
+
var require_shebang_regex = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-regex@3.0.0/node_modules/shebang-regex/index.js": ((exports, module) => {
|
|
1507
1507
|
module.exports = /^#!(.*)/;
|
|
1508
|
-
} });
|
|
1508
|
+
}) });
|
|
1509
1509
|
|
|
1510
1510
|
//#endregion
|
|
1511
1511
|
//#region ../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js
|
|
1512
|
-
var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js"(exports, module) {
|
|
1512
|
+
var require_shebang_command = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/shebang-command@2.0.0/node_modules/shebang-command/index.js": ((exports, module) => {
|
|
1513
1513
|
const shebangRegex = require_shebang_regex();
|
|
1514
1514
|
module.exports = (string = "") => {
|
|
1515
1515
|
const match = string.match(shebangRegex);
|
|
@@ -1519,11 +1519,11 @@ var require_shebang_command = __commonJS({ "../../node_modules/.pnpm/shebang-com
|
|
|
1519
1519
|
if (binary === "env") return argument;
|
|
1520
1520
|
return argument ? `${binary} ${argument}` : binary;
|
|
1521
1521
|
};
|
|
1522
|
-
} });
|
|
1522
|
+
}) });
|
|
1523
1523
|
|
|
1524
1524
|
//#endregion
|
|
1525
1525
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js
|
|
1526
|
-
var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
|
|
1526
|
+
var require_readShebang = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/util/readShebang.js": ((exports, module) => {
|
|
1527
1527
|
const fs = __require("fs");
|
|
1528
1528
|
const shebangCommand = require_shebang_command();
|
|
1529
1529
|
function readShebang$1(command) {
|
|
@@ -1538,11 +1538,11 @@ var require_readShebang = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
|
|
|
1538
1538
|
return shebangCommand(buffer.toString());
|
|
1539
1539
|
}
|
|
1540
1540
|
module.exports = readShebang$1;
|
|
1541
|
-
} });
|
|
1541
|
+
}) });
|
|
1542
1542
|
|
|
1543
1543
|
//#endregion
|
|
1544
1544
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js
|
|
1545
|
-
var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js"(exports, module) {
|
|
1545
|
+
var require_parse = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/parse.js": ((exports, module) => {
|
|
1546
1546
|
const path$2 = __require("path");
|
|
1547
1547
|
const resolveCommand = require_resolveCommand();
|
|
1548
1548
|
const escape = require_escape();
|
|
@@ -1601,14 +1601,14 @@ var require_parse = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/nod
|
|
|
1601
1601
|
return options.shell ? parsed : parseNonShell(parsed);
|
|
1602
1602
|
}
|
|
1603
1603
|
module.exports = parse$1;
|
|
1604
|
-
} });
|
|
1604
|
+
}) });
|
|
1605
1605
|
|
|
1606
1606
|
//#endregion
|
|
1607
1607
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js
|
|
1608
|
-
var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js"(exports, module) {
|
|
1608
|
+
var require_enoent = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/lib/enoent.js": ((exports, module) => {
|
|
1609
1609
|
const isWin = process.platform === "win32";
|
|
1610
1610
|
function notFoundError(original, syscall) {
|
|
1611
|
-
return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), {
|
|
1611
|
+
return Object.assign(/* @__PURE__ */ new Error(`${syscall} ${original.command} ENOENT`), {
|
|
1612
1612
|
code: "ENOENT",
|
|
1613
1613
|
errno: "ENOENT",
|
|
1614
1614
|
syscall: `${syscall} ${original.command}`,
|
|
@@ -1641,11 +1641,11 @@ var require_enoent = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/no
|
|
|
1641
1641
|
verifyENOENTSync,
|
|
1642
1642
|
notFoundError
|
|
1643
1643
|
};
|
|
1644
|
-
} });
|
|
1644
|
+
}) });
|
|
1645
1645
|
|
|
1646
1646
|
//#endregion
|
|
1647
1647
|
//#region ../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js
|
|
1648
|
-
var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js"(exports, module) {
|
|
1648
|
+
var require_cross_spawn = /* @__PURE__ */ __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0.6/node_modules/cross-spawn/index.js": ((exports, module) => {
|
|
1649
1649
|
const cp = __require("child_process");
|
|
1650
1650
|
const parse = require_parse();
|
|
1651
1651
|
const enoent = require_enoent();
|
|
@@ -1666,10 +1666,11 @@ var require_cross_spawn = __commonJS({ "../../node_modules/.pnpm/cross-spawn@7.0
|
|
|
1666
1666
|
module.exports.sync = spawnSync$1;
|
|
1667
1667
|
module.exports._parse = parse;
|
|
1668
1668
|
module.exports._enoent = enoent;
|
|
1669
|
-
} });
|
|
1669
|
+
}) });
|
|
1670
1670
|
|
|
1671
1671
|
//#endregion
|
|
1672
1672
|
//#region ../../node_modules/.pnpm/path-key@4.0.0/node_modules/path-key/index.js
|
|
1673
|
+
var import_cross_spawn = /* @__PURE__ */ __toESM(require_cross_spawn(), 1);
|
|
1673
1674
|
function pathKey(options = {}) {
|
|
1674
1675
|
const { env = process.env, platform: platform$1 = process.platform } = options;
|
|
1675
1676
|
if (platform$1 !== "win32") return "PATH";
|
|
@@ -2240,7 +2241,7 @@ const throwOnMissingStrict = (isSubprocess) => {
|
|
|
2240
2241
|
const throwOnStrictDisconnect = (isSubprocess) => {
|
|
2241
2242
|
throw new Error(`${getMethodName("sendMessage", isSubprocess)} failed: the ${getOtherProcessName(isSubprocess)} exited without listening to incoming messages.`);
|
|
2242
2243
|
};
|
|
2243
|
-
const getAbortDisconnectError = () => new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
|
|
2244
|
+
const getAbortDisconnectError = () => /* @__PURE__ */ new Error(`\`cancelSignal\` aborted: the ${getOtherProcessName(true)} disconnected.`);
|
|
2244
2245
|
const throwOnMissingParent = () => {
|
|
2245
2246
|
throw new Error("`getCancelSignal()` cannot be used without setting the `cancelSignal` subprocess option.");
|
|
2246
2247
|
};
|
|
@@ -2878,7 +2879,6 @@ const fixCwdError = (originalMessage, cwd) => {
|
|
|
2878
2879
|
|
|
2879
2880
|
//#endregion
|
|
2880
2881
|
//#region ../../node_modules/.pnpm/execa@9.5.2/node_modules/execa/lib/arguments/options.js
|
|
2881
|
-
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
2882
2882
|
const normalizeOptions = (filePath, rawArguments, rawOptions) => {
|
|
2883
2883
|
rawOptions.cwd = normalizeCwd(rawOptions.cwd);
|
|
2884
2884
|
const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
|
|
@@ -3206,7 +3206,7 @@ const arrayMethods = {
|
|
|
3206
3206
|
async function getStreamAsArrayBuffer(stream, options) {
|
|
3207
3207
|
return getStreamContents$1(stream, arrayBufferMethods, options);
|
|
3208
3208
|
}
|
|
3209
|
-
const initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
|
|
3209
|
+
const initArrayBuffer = () => ({ contents: /* @__PURE__ */ new ArrayBuffer(0) });
|
|
3210
3210
|
const useTextEncoder = (chunk) => textEncoder.encode(chunk);
|
|
3211
3211
|
const textEncoder = new TextEncoder();
|
|
3212
3212
|
const useUint8Array = (chunk) => new Uint8Array(chunk);
|
|
@@ -3555,10 +3555,9 @@ function parseBigint(milliseconds) {
|
|
|
3555
3555
|
}
|
|
3556
3556
|
function parseMilliseconds(milliseconds) {
|
|
3557
3557
|
switch (typeof milliseconds) {
|
|
3558
|
-
case "number":
|
|
3558
|
+
case "number":
|
|
3559
3559
|
if (Number.isFinite(milliseconds)) return parseNumber(milliseconds);
|
|
3560
3560
|
break;
|
|
3561
|
-
}
|
|
3562
3561
|
case "bigint": return parseBigint(milliseconds);
|
|
3563
3562
|
}
|
|
3564
3563
|
throw new TypeError("Expected a finite number or bigint");
|
|
@@ -4098,10 +4097,10 @@ const getDuplicateStream = ({ stdioItem: { type, value, optionName }, direction,
|
|
|
4098
4097
|
optionName
|
|
4099
4098
|
});
|
|
4100
4099
|
};
|
|
4101
|
-
const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map((stdioItem) => ({
|
|
4100
|
+
const getOtherStdioItems = (fileDescriptors, type) => fileDescriptors.flatMap(({ direction, stdioItems }) => stdioItems.filter((stdioItem) => stdioItem.type === type).map(((stdioItem) => ({
|
|
4102
4101
|
...stdioItem,
|
|
4103
4102
|
direction
|
|
4104
|
-
})));
|
|
4103
|
+
}))));
|
|
4105
4104
|
const validateDuplicateStreamSync = ({ otherStdioItems, type, value, optionName, direction }) => {
|
|
4106
4105
|
if (SPECIAL_DUPLICATE_TYPES_SYNC.has(type)) getDuplicateStreamInstance({
|
|
4107
4106
|
otherStdioItems,
|
|
@@ -4618,7 +4617,7 @@ const logLine = (line, fdNumber, verboseInfo) => {
|
|
|
4618
4617
|
const transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
|
|
4619
4618
|
if (output === null) return { output: Array.from({ length: 3 }) };
|
|
4620
4619
|
const state = {};
|
|
4621
|
-
const outputFiles = new Set([]);
|
|
4620
|
+
const outputFiles = /* @__PURE__ */ new Set([]);
|
|
4622
4621
|
const transformedOutput = output.map((result, fdNumber) => transformOutputResultSync({
|
|
4623
4622
|
result,
|
|
4624
4623
|
fileDescriptors,
|
|
@@ -5180,9 +5179,9 @@ const getHighWaterMark = (streams, objectMode) => {
|
|
|
5180
5179
|
return Math.max(...highWaterMarks);
|
|
5181
5180
|
};
|
|
5182
5181
|
var MergedStream = class extends PassThrough {
|
|
5183
|
-
#streams = new Set([]);
|
|
5184
|
-
#ended = new Set([]);
|
|
5185
|
-
#aborted = new Set([]);
|
|
5182
|
+
#streams = /* @__PURE__ */ new Set([]);
|
|
5183
|
+
#ended = /* @__PURE__ */ new Set([]);
|
|
5184
|
+
#aborted = /* @__PURE__ */ new Set([]);
|
|
5186
5185
|
#onFinished;
|
|
5187
5186
|
#unpipeEvent = Symbol("unpipe");
|
|
5188
5187
|
#streamPromises = /* @__PURE__ */ new WeakMap();
|
|
@@ -5781,7 +5780,7 @@ const unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ?
|
|
|
5781
5780
|
const unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
|
|
5782
5781
|
await aborted(unpipeSignal, sourceStream);
|
|
5783
5782
|
await mergedStream.remove(sourceStream);
|
|
5784
|
-
const error$1 = new Error("Pipe canceled by `unpipeSignal` option.");
|
|
5783
|
+
const error$1 = /* @__PURE__ */ new Error("Pipe canceled by `unpipeSignal` option.");
|
|
5785
5784
|
throw createNonCommandError({
|
|
5786
5785
|
error: error$1,
|
|
5787
5786
|
fileDescriptors,
|
|
@@ -8229,10 +8228,11 @@ const r2Storage = (config, hooks) => (_) => {
|
|
|
8229
8228
|
cloudflareApiToken,
|
|
8230
8229
|
cwd: process.cwd()
|
|
8231
8230
|
});
|
|
8231
|
+
const getStorageKey = createStorageKeyBuilder(config.basePath);
|
|
8232
8232
|
return {
|
|
8233
8233
|
name: "r2Storage",
|
|
8234
8234
|
async deleteBundle(bundleId) {
|
|
8235
|
-
const Key =
|
|
8235
|
+
const Key = getStorageKey(bundleId, "bundle.zip");
|
|
8236
8236
|
try {
|
|
8237
8237
|
await wrangler("r2", "object", "delete", [bucketName, Key].join("/"), "--remote");
|
|
8238
8238
|
return { storageUri: `r2://${bucketName}/${Key}` };
|
|
@@ -8243,7 +8243,7 @@ const r2Storage = (config, hooks) => (_) => {
|
|
|
8243
8243
|
async uploadBundle(bundleId, bundlePath) {
|
|
8244
8244
|
const contentType = src_default.getType(bundlePath) ?? void 0;
|
|
8245
8245
|
const filename = path.basename(bundlePath);
|
|
8246
|
-
const Key =
|
|
8246
|
+
const Key = getStorageKey(bundleId, filename);
|
|
8247
8247
|
try {
|
|
8248
8248
|
const { stderr, exitCode } = await wrangler("r2", "object", "put", [bucketName, Key].join("/"), "--file", bundlePath, ...contentType ? ["--content-type", contentType] : [], "--remote");
|
|
8249
8249
|
if (exitCode !== 0 && stderr) throw new Error(stderr);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/cloudflare",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.20.0
|
|
4
|
+
"version": "0.20.0",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"cloudflare": "4.2.0",
|
|
43
|
-
"@hot-updater/core": "0.20.0
|
|
44
|
-
"@hot-updater/js": "0.20.0
|
|
45
|
-
"@hot-updater/plugin-core": "0.20.0
|
|
43
|
+
"@hot-updater/core": "0.20.0",
|
|
44
|
+
"@hot-updater/js": "0.20.0",
|
|
45
|
+
"@hot-updater/plugin-core": "0.20.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@clack/prompts": "0.10.0",
|
package/worker/dist/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
This folder contains the built output assets for the worker "hot-updater" generated at 2025-
|
|
1
|
+
This folder contains the built output assets for the worker "hot-updater" generated at 2025-08-17T10:20:22.242Z.
|