@hot-updater/aws 1.0.0-rc.37 → 1.0.0-rc.38
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/lambda/index.cjs +16 -10
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -132,9 +132,10 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
132
132
|
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
133
133
|
readonly change?: BundleEventChange;
|
|
134
134
|
/**
|
|
135
|
-
* A download or apply
|
|
136
|
-
*
|
|
137
|
-
* server keeps it in history, but it moves
|
|
135
|
+
* A download or apply of a target its installation already ran, as when
|
|
136
|
+
* a reload cut the first runtime's report short, or a download that
|
|
137
|
+
* repeats the pending one: the server keeps it in history, but it moves
|
|
138
|
+
* and counts nothing.
|
|
138
139
|
*/
|
|
139
140
|
readonly late?: true;
|
|
140
141
|
/**
|
package/dist/index.d.mts
CHANGED
|
@@ -132,9 +132,10 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
132
132
|
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
133
133
|
readonly change?: BundleEventChange;
|
|
134
134
|
/**
|
|
135
|
-
* A download or apply
|
|
136
|
-
*
|
|
137
|
-
* server keeps it in history, but it moves
|
|
135
|
+
* A download or apply of a target its installation already ran, as when
|
|
136
|
+
* a reload cut the first runtime's report short, or a download that
|
|
137
|
+
* repeats the pending one: the server keeps it in history, but it moves
|
|
138
|
+
* and counts nothing.
|
|
138
139
|
*/
|
|
139
140
|
readonly late?: true;
|
|
140
141
|
/**
|
package/dist/lambda/index.cjs
CHANGED
|
@@ -4570,7 +4570,7 @@ const createKvAdapter = ({ store, tablePrefix = "" }) => {
|
|
|
4570
4570
|
};
|
|
4571
4571
|
//#endregion
|
|
4572
4572
|
//#region ../../packages/server/dist/version.mjs
|
|
4573
|
-
const HOT_UPDATER_SERVER_VERSION = "1.0.0-rc.
|
|
4573
|
+
const HOT_UPDATER_SERVER_VERSION = "1.0.0-rc.38";
|
|
4574
4574
|
//#endregion
|
|
4575
4575
|
//#region ../../packages/server/dist/handlerVersionRoutes.mjs
|
|
4576
4576
|
/**
|
|
@@ -11702,19 +11702,25 @@ const minBundleIdOf = (row) => row.metadata?.min_bundle_id;
|
|
|
11702
11702
|
/** When the client made a report, from the UUIDv7 it gave it. */
|
|
11703
11703
|
const madeAt = (id) => isUUIDv7(id) ? extractTimestampFromUUIDv7(id) : null;
|
|
11704
11704
|
/**
|
|
11705
|
-
* A report
|
|
11706
|
-
*
|
|
11707
|
-
*
|
|
11708
|
-
*
|
|
11709
|
-
*
|
|
11705
|
+
* A report its installation already moved past, which stays in history but
|
|
11706
|
+
* moves and counts nothing:
|
|
11707
|
+
* - a download or an apply of the bundle the head already runs, or a
|
|
11708
|
+
* download that repeats the head's pending one, from the same bundle to
|
|
11709
|
+
* the same bundle: the installation's download or launch already counted;
|
|
11710
|
+
* - an UNCHANGED report made, by its UUIDv7, before the head's report, even
|
|
11711
|
+
* after a later report replaced the apply it preceded: a reload can cut
|
|
11712
|
+
* one runtime's report short and deliver it after the next runtime's.
|
|
11713
|
+
*
|
|
11714
|
+
* Report IDs are made on the device, so a device whose clock jumps back has
|
|
11715
|
+
* its launch reports judged late until its clock passes its latest report.
|
|
11710
11716
|
*/
|
|
11711
11717
|
const isLate = (event, head) => {
|
|
11712
11718
|
if (head === null) return false;
|
|
11713
|
-
if (event.type === "UPDATE_DOWNLOADED" || event.type === "UPDATE_APPLIED") return event.to_bundle_id === runningOf(head).bundle_id;
|
|
11714
|
-
if (event.type === "UNCHANGED"
|
|
11719
|
+
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;
|
|
11720
|
+
if (event.type === "UNCHANGED") {
|
|
11715
11721
|
const made = madeAt(event.id);
|
|
11716
|
-
const
|
|
11717
|
-
return made !== null &&
|
|
11722
|
+
const latest = madeAt(head.id);
|
|
11723
|
+
return made !== null && latest !== null && made < latest;
|
|
11718
11724
|
}
|
|
11719
11725
|
return false;
|
|
11720
11726
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/aws",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
4
|
+
"version": "1.0.0-rc.38",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
7
7
|
"module": "dist/index.mjs",
|
|
@@ -45,9 +45,9 @@
|
|
|
45
45
|
"es-toolkit": "^1.32.0",
|
|
46
46
|
"execa": "9.5.2",
|
|
47
47
|
"mime": "^4.0.4",
|
|
48
|
-
"@hot-updater/protocol": "1.0.0-rc.
|
|
49
|
-
"@hot-updater/
|
|
50
|
-
"@hot-updater/
|
|
48
|
+
"@hot-updater/protocol": "1.0.0-rc.38",
|
|
49
|
+
"@hot-updater/test-utils": "1.0.0-rc.38",
|
|
50
|
+
"@hot-updater/mock": "1.0.0-rc.38"
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@aws-sdk/client-cloudfront": "3.1066.0",
|
|
@@ -62,9 +62,9 @@
|
|
|
62
62
|
"@aws-sdk/lib-storage": "3.1066.0",
|
|
63
63
|
"@aws-sdk/lib-dynamodb": "3.1066.0",
|
|
64
64
|
"hono": "4.12.34",
|
|
65
|
-
"@hot-updater/cli-tools": "1.0.0-rc.
|
|
66
|
-
"@hot-updater/
|
|
67
|
-
"@hot-updater/
|
|
65
|
+
"@hot-updater/cli-tools": "1.0.0-rc.38",
|
|
66
|
+
"@hot-updater/server": "1.0.0-rc.38",
|
|
67
|
+
"@hot-updater/plugin-core": "1.0.0-rc.38"
|
|
68
68
|
},
|
|
69
69
|
"scripts": {
|
|
70
70
|
"build": "tsdown",
|