@hot-updater/cloudflare 1.0.0-rc.37 → 1.0.0-rc.39
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.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/dist/worker/index.d.cts +4 -3
- package/dist/worker/index.d.mts +4 -3
- package/package.json +6 -6
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +13 -8
- package/worker/dist/index.js.map +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -100,9 +100,10 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
100
100
|
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
101
101
|
readonly change?: BundleEventChange;
|
|
102
102
|
/**
|
|
103
|
-
* A download or apply
|
|
104
|
-
*
|
|
105
|
-
* server keeps it in history, but it moves
|
|
103
|
+
* A download or apply of a target its installation already ran, as when
|
|
104
|
+
* a reload cut the first runtime's report short, or a download that
|
|
105
|
+
* repeats the pending one: the server keeps it in history, but it moves
|
|
106
|
+
* and counts nothing.
|
|
106
107
|
*/
|
|
107
108
|
readonly late?: true;
|
|
108
109
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -100,9 +100,10 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
100
100
|
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
101
101
|
readonly change?: BundleEventChange;
|
|
102
102
|
/**
|
|
103
|
-
* A download or apply
|
|
104
|
-
*
|
|
105
|
-
* server keeps it in history, but it moves
|
|
103
|
+
* A download or apply of a target its installation already ran, as when
|
|
104
|
+
* a reload cut the first runtime's report short, or a download that
|
|
105
|
+
* repeats the pending one: the server keeps it in history, but it moves
|
|
106
|
+
* and counts nothing.
|
|
106
107
|
*/
|
|
107
108
|
readonly late?: true;
|
|
108
109
|
/**
|
package/dist/worker/index.d.cts
CHANGED
|
@@ -88,9 +88,10 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
88
88
|
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
89
89
|
readonly change?: BundleEventChange;
|
|
90
90
|
/**
|
|
91
|
-
* A download or apply
|
|
92
|
-
*
|
|
93
|
-
* server keeps it in history, but it moves
|
|
91
|
+
* A download or apply of a target its installation already ran, as when
|
|
92
|
+
* a reload cut the first runtime's report short, or a download that
|
|
93
|
+
* repeats the pending one: the server keeps it in history, but it moves
|
|
94
|
+
* and counts nothing.
|
|
94
95
|
*/
|
|
95
96
|
readonly late?: true;
|
|
96
97
|
/**
|
package/dist/worker/index.d.mts
CHANGED
|
@@ -88,9 +88,10 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
88
88
|
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
89
89
|
readonly change?: BundleEventChange;
|
|
90
90
|
/**
|
|
91
|
-
* A download or apply
|
|
92
|
-
*
|
|
93
|
-
* server keeps it in history, but it moves
|
|
91
|
+
* A download or apply of a target its installation already ran, as when
|
|
92
|
+
* a reload cut the first runtime's report short, or a download that
|
|
93
|
+
* repeats the pending one: the server keeps it in history, but it moves
|
|
94
|
+
* and counts nothing.
|
|
94
95
|
*/
|
|
95
96
|
readonly late?: true;
|
|
96
97
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/cloudflare",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.39",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -56,10 +56,10 @@
|
|
|
56
56
|
"cloudflare": "4.2.0",
|
|
57
57
|
"hono": "4.12.34",
|
|
58
58
|
"uuidv7": "^1.0.2",
|
|
59
|
-
"@hot-updater/
|
|
60
|
-
"@hot-updater/protocol": "1.0.0-rc.
|
|
61
|
-
"@hot-updater/
|
|
62
|
-
"@hot-updater/
|
|
59
|
+
"@hot-updater/plugin-core": "1.0.0-rc.39",
|
|
60
|
+
"@hot-updater/protocol": "1.0.0-rc.39",
|
|
61
|
+
"@hot-updater/server": "1.0.0-rc.39",
|
|
62
|
+
"@hot-updater/cli-tools": "1.0.0-rc.39"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@cloudflare/vitest-pool-workers": "0.13.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.0.0-rc.
|
|
78
|
+
"@hot-updater/test-utils": "1.0.0-rc.39"
|
|
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-10-
|
|
1
|
+
This folder contains the built output assets for the worker "hot-updater" generated at 2026-10-07T10:42:49.668Z.
|
package/worker/dist/index.js
CHANGED
|
@@ -4511,7 +4511,7 @@ var createSqlAdapter = /* @__PURE__ */ __name(({ executor, tablePrefix = "", max
|
|
|
4511
4511
|
}, "createSqlAdapter");
|
|
4512
4512
|
|
|
4513
4513
|
// ../../packages/server/dist/package.mjs
|
|
4514
|
-
var version = "1.0.0-rc.
|
|
4514
|
+
var version = "1.0.0-rc.39";
|
|
4515
4515
|
|
|
4516
4516
|
// ../../packages/server/dist/version.mjs
|
|
4517
4517
|
var HOT_UPDATER_SERVER_VERSION = version;
|
|
@@ -11178,13 +11178,18 @@ var countEvent = /* @__PURE__ */ __name((tx, event) => {
|
|
|
11178
11178
|
}, "countEvent");
|
|
11179
11179
|
var countOutcome = /* @__PURE__ */ __name((tx, event) => {
|
|
11180
11180
|
const shardBy = event.install_id;
|
|
11181
|
-
|
|
11181
|
+
const hour2 = /* @__PURE__ */ __name((type, bundleRef) => tx.aggregate("insights_outcomes", {
|
|
11182
11182
|
platform: event.platform,
|
|
11183
11183
|
channel: event.channel,
|
|
11184
|
-
type
|
|
11184
|
+
type,
|
|
11185
11185
|
bundle_ref: bundleRef,
|
|
11186
11186
|
bucket_start_ms: hourOf(event.received_at_ms)
|
|
11187
|
-
}, { events: 1 }, { shardBy });
|
|
11187
|
+
}, { events: 1 }, { shardBy }), "hour");
|
|
11188
|
+
for (const bundleRef of bundleRefsOf(event)) hour2(event.type, bundleRef);
|
|
11189
|
+
if (event.metadata.implied_download === true) hour2("UPDATE_DOWNLOADED", bundleRefOfFilter({
|
|
11190
|
+
type: "UPDATE_DOWNLOADED",
|
|
11191
|
+
toBundleId: event.type === "RECOVERED" ? event.from_bundle_id : event.to_bundle_id
|
|
11192
|
+
}));
|
|
11188
11193
|
tx.aggregate("insights_outcomes", {
|
|
11189
11194
|
...DAILY_EVENTS,
|
|
11190
11195
|
bucket_start_ms: dayOf(event.received_at_ms)
|
|
@@ -11285,11 +11290,11 @@ var minBundleIdOf = /* @__PURE__ */ __name((row) => row.metadata?.min_bundle_id,
|
|
|
11285
11290
|
var madeAt = /* @__PURE__ */ __name((id) => isUUIDv7(id) ? extractTimestampFromUUIDv7(id) : null, "madeAt");
|
|
11286
11291
|
var isLate = /* @__PURE__ */ __name((event, head) => {
|
|
11287
11292
|
if (head === null) return false;
|
|
11288
|
-
if (event.type === "UPDATE_DOWNLOADED" || event.type === "UPDATE_APPLIED") return event.to_bundle_id === runningOf(head).bundle_id;
|
|
11289
|
-
if (event.type === "UNCHANGED"
|
|
11293
|
+
if (event.type === "UPDATE_DOWNLOADED" || event.type === "UPDATE_APPLIED") return event.to_bundle_id === runningOf(head).bundle_id || event.type === "UPDATE_DOWNLOADED" && head.type === "UPDATE_DOWNLOADED" && event.from_bundle_id === head.from_bundle_id && event.to_bundle_id === head.to_bundle_id;
|
|
11294
|
+
if (event.type === "UNCHANGED") {
|
|
11290
11295
|
const made = madeAt(event.id);
|
|
11291
|
-
const
|
|
11292
|
-
return made !== null &&
|
|
11296
|
+
const latest = madeAt(head.id);
|
|
11297
|
+
return made !== null && latest !== null && made < latest;
|
|
11293
11298
|
}
|
|
11294
11299
|
return false;
|
|
11295
11300
|
}, "isLate");
|