@hot-updater/cloudflare 1.1.13 → 1.1.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +7 -7
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +13 -5
- package/worker/dist/index.js.map +3 -3
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/cloudflare",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.14",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"cloudflare": "4.2.0",
|
|
53
53
|
"hono": "4.12.34",
|
|
54
54
|
"uuidv7": "^1.0.2",
|
|
55
|
-
"@hot-updater/
|
|
56
|
-
"@hot-updater/
|
|
57
|
-
"@hot-updater/
|
|
58
|
-
"@hot-updater/
|
|
59
|
-
"@hot-updater/
|
|
55
|
+
"@hot-updater/cli-tools": "1.1.14",
|
|
56
|
+
"@hot-updater/protocol": "1.1.14",
|
|
57
|
+
"@hot-updater/plugin-core": "1.1.14",
|
|
58
|
+
"@hot-updater/server": "1.1.14",
|
|
59
|
+
"@hot-updater/storage-s3": "1.1.14"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@aws-sdk/client-s3": "3.1066.0",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
"vitest": "4.1.4",
|
|
76
76
|
"wrangler": "^4.69.0",
|
|
77
77
|
"xdg-app-paths": "^8.3.0",
|
|
78
|
-
"@hot-updater/test-utils": "1.1.
|
|
78
|
+
"@hot-updater/test-utils": "1.1.14"
|
|
79
79
|
},
|
|
80
80
|
"scripts": {
|
|
81
81
|
"build": "tsdown && pnpm build:worker",
|
package/worker/dist/README.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
This folder contains the built output assets for the worker "hot-updater" generated at 2026-11-
|
|
1
|
+
This folder contains the built output assets for the worker "hot-updater" generated at 2026-11-14T12:29:41.415Z.
|
package/worker/dist/index.js
CHANGED
|
@@ -2248,9 +2248,17 @@ var pruneStatements = /* @__PURE__ */ __name((dialect, table, tablePrefix, limit
|
|
|
2248
2248
|
const order = retentionOrder(table).columns.map(quote);
|
|
2249
2249
|
const list = /* @__PURE__ */ __name((alias, direction = "") => order.map((column) => `${alias}.${column}${direction}`).join(", "), "list");
|
|
2250
2250
|
const oldest = /* @__PURE__ */ __name((before) => `SELECT ${list("i")} FROM ${name} i WHERE i.${at} <= ${before()} ORDER BY ${list("i", " ASC")} LIMIT ${limit}`, "oldest");
|
|
2251
|
-
const doomed = /* @__PURE__ */ __name((alias, before) =>
|
|
2251
|
+
const doomed = /* @__PURE__ */ __name((alias, before) => `(${list(alias)}) <= (SELECT ${list("b")} FROM (${oldest(before)}) b ORDER BY ${list("b", " DESC")} LIMIT 1) AND ${alias}.${at} <= ${before()}`, "doomed");
|
|
2252
2252
|
const entries = table.indexes.filter((index) => isMultiIndex(table, index)).map((index) => quote(`${tablePrefix}${table.name}__${index.name}`));
|
|
2253
2253
|
const keyOf = /* @__PURE__ */ __name((left, right) => table.key.map((column) => `${left}.${quote(column)} = ${right}.${quote(column)}`).join(" AND "), "keyOf");
|
|
2254
|
+
if (dialect === "sqlite") return [...table.indexes.filter((index) => isMultiIndex(table, index)).map((index) => {
|
|
2255
|
+
const columns = [...index.eq, ...indexOrderColumns(table, index)];
|
|
2256
|
+
const multi = columns.filter((column) => findPhysicalColumn(table, column).multi);
|
|
2257
|
+
const values = columns.map((column) => multi.includes(column) ? `j${multi.indexOf(column)}.${quote("value")}` : `b.${quote(column)}`);
|
|
2258
|
+
const each = multi.map((column, at2) => `, json_each(b.${quote(column)}) j${at2}`);
|
|
2259
|
+
const into = quote(`${tablePrefix}${table.name}__${index.name}`);
|
|
2260
|
+
return (before) => `DELETE FROM ${into} WHERE (${columns.map(quote).join(", ")}) IN (SELECT ${values.join(", ")} FROM ${name} b${each.join("")} WHERE ${doomed("b", before)})`;
|
|
2261
|
+
}), (before) => `DELETE FROM ${name} WHERE ${doomed(name, before)}`];
|
|
2254
2262
|
if (dialect === "mysql") return [...entries.map((index) => (before) => `DELETE e FROM ${index} e JOIN (${oldest(before)}) d ON ${keyOf("e", "d")}`), (before) => `DELETE FROM ${name} WHERE ${at} <= ${before()} ORDER BY ${order.join(", ")} LIMIT ${limit}`];
|
|
2255
2263
|
return [...entries.map((index) => (before) => `DELETE FROM ${index} WHERE EXISTS (SELECT * FROM ${name} b WHERE ${keyOf("b", index)} AND ${doomed("b", before)})`), (before) => `DELETE FROM ${name} WHERE ${doomed(name, before)}`];
|
|
2256
2264
|
}, "pruneStatements");
|
|
@@ -4340,20 +4348,20 @@ var createSqlAdapter = /* @__PURE__ */ __name(({ executor, tablePrefix = "", max
|
|
|
4340
4348
|
const where = /* @__PURE__ */ __name((bind, key, v) => `${keyMatch(bind, table, key)}${v === void 0 ? "" : ` AND ${version2} = ${bind(v)}`}${when ? ` AND ${when(bind)}` : ""}`, "where");
|
|
4341
4349
|
const insert = /* @__PURE__ */ __name((bind, into, columns, values) => `INSERT INTO ${into} (${columns.map(quote).join(", ")}) ${when ? `SELECT ${values.join(", ")} WHERE ${when(bind)}` : `VALUES (${values.join(", ")})`}`, "insert");
|
|
4342
4350
|
const insertRow = /* @__PURE__ */ __name((bind, row) => insert(bind, name, table.columns.map((column) => column.name), table.columns.map((column) => bind(row[column.name], column))), "insertRow");
|
|
4343
|
-
const entries = /* @__PURE__ */ __name((key, row, changed) => table.indexes.flatMap((index) => {
|
|
4351
|
+
const entries = /* @__PURE__ */ __name((key, row, changed, stale = true) => table.indexes.flatMap((index) => {
|
|
4344
4352
|
const columns = [...index.eq, ...indexOrderColumns(table, index)];
|
|
4345
4353
|
if (!isMultiIndex(table, index) || changed && !columns.some((column) => changed.includes(column))) return [];
|
|
4346
4354
|
const into = tableOf(table, index);
|
|
4347
4355
|
const found = row ? indexEntries(table, index, row) : [];
|
|
4348
4356
|
const order = found.length > 0 ? indexOrderTuple(table, index, row) : [];
|
|
4349
|
-
return [sql((bind) => `DELETE FROM ${into} WHERE ${where(bind, key)}`), ...found.map((eq) => sql((bind) => {
|
|
4357
|
+
return [...stale ? [sql((bind) => `DELETE FROM ${into} WHERE ${where(bind, key)}`)] : [], ...found.map((eq) => sql((bind) => {
|
|
4350
4358
|
const values = [...eq, ...order].map((value) => bind(value));
|
|
4351
4359
|
return insert(bind, into, columns, values);
|
|
4352
4360
|
}))];
|
|
4353
4361
|
}), "entries");
|
|
4354
4362
|
switch (op.type) {
|
|
4355
4363
|
case "insert":
|
|
4356
|
-
return [sql((bind) => insertRow(bind, op.row)), ...entries(rowKey(table, op.row), op.row)];
|
|
4364
|
+
return [sql((bind) => insertRow(bind, op.row)), ...entries(rowKey(table, op.row), op.row, void 0, false)];
|
|
4357
4365
|
case "patch":
|
|
4358
4366
|
return [sql((bind) => {
|
|
4359
4367
|
const set = Object.entries(op.set).map(([column, value]) => `${quote(column)} = ${bind(value, findPhysicalColumn(table, column))}`);
|
|
@@ -4512,7 +4520,7 @@ var createSqlAdapter = /* @__PURE__ */ __name(({ executor, tablePrefix = "", max
|
|
|
4512
4520
|
}, "createSqlAdapter");
|
|
4513
4521
|
|
|
4514
4522
|
// ../../packages/server/dist/package.mjs
|
|
4515
|
-
var version = "1.1.
|
|
4523
|
+
var version = "1.1.14";
|
|
4516
4524
|
|
|
4517
4525
|
// ../../packages/server/dist/version.mjs
|
|
4518
4526
|
var HOT_UPDATER_SERVER_VERSION = version;
|