@hot-updater/cloudflare 1.0.0-rc.36 → 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 +36 -2
- package/dist/index.d.mts +36 -2
- package/dist/worker/index.d.cts +36 -2
- package/dist/worker/index.d.mts +36 -2
- package/package.json +6 -6
- package/worker/dist/README.md +1 -1
- package/worker/dist/index.js +1499 -1371
- package/worker/dist/index.js.map +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -63,6 +63,25 @@ type DatabaseHttpResponse = DatabaseJsonObject & {
|
|
|
63
63
|
readonly body_truncated: boolean;
|
|
64
64
|
readonly received_at_ms: number;
|
|
65
65
|
};
|
|
66
|
+
/** What a kept UNCHANGED row changed against its installation's head. */
|
|
67
|
+
type BundleEventChangeKind = "first_seen" | "bundle" | "release" | "app_version" | "channel" | "native_build";
|
|
68
|
+
/**
|
|
69
|
+
* An UNCHANGED report the server keeps: what it changed against its
|
|
70
|
+
* installation's head, and the running values the head held before it. A
|
|
71
|
+
* report from an installation without a head is `first_seen` alone, with no
|
|
72
|
+
* previous values: the installation is new to this server, not necessarily
|
|
73
|
+
* to its device.
|
|
74
|
+
*/
|
|
75
|
+
type BundleEventChange = DatabaseJsonObject & {
|
|
76
|
+
readonly kinds: BundleEventChangeKind[];
|
|
77
|
+
readonly previous: (DatabaseJsonObject & {
|
|
78
|
+
readonly bundle_id: string;
|
|
79
|
+
readonly release_id: string | null;
|
|
80
|
+
readonly app_version: string;
|
|
81
|
+
readonly channel: string;
|
|
82
|
+
readonly min_bundle_id?: string;
|
|
83
|
+
}) | null;
|
|
84
|
+
};
|
|
66
85
|
/** Ancillary report data; queryable identity and lifecycle fields stay on the row. */
|
|
67
86
|
type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
68
87
|
readonly cohort: string;
|
|
@@ -78,6 +97,20 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
78
97
|
readonly delivery?: "patch" | "manifest" | "archive" | "unknown";
|
|
79
98
|
/** `UPDATE_DOWNLOADED`: a patch failed and the full files came instead. */
|
|
80
99
|
readonly patch_fallback?: boolean;
|
|
100
|
+
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
101
|
+
readonly change?: BundleEventChange;
|
|
102
|
+
/**
|
|
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.
|
|
107
|
+
*/
|
|
108
|
+
readonly late?: true;
|
|
109
|
+
/**
|
|
110
|
+
* A launch or crash of a bundle whose download report never arrived: the
|
|
111
|
+
* server counted that download with it.
|
|
112
|
+
*/
|
|
113
|
+
readonly implied_download?: true;
|
|
81
114
|
};
|
|
82
115
|
type BundleEventRowBase = {
|
|
83
116
|
readonly id: string;
|
|
@@ -120,13 +153,14 @@ interface InsightsScope {
|
|
|
120
153
|
}
|
|
121
154
|
/**
|
|
122
155
|
* Raw event predicates; recovery is attributed to the source bundle. An
|
|
123
|
-
* UNCHANGED
|
|
156
|
+
* UNCHANGED filter matches the kept rows that moved an installation to the
|
|
157
|
+
* bundle without an apply report.
|
|
124
158
|
*/
|
|
125
159
|
type InsightsBundleEventFilter = InsightsScope & ({
|
|
126
160
|
readonly type: "RECOVERED";
|
|
127
161
|
readonly fromBundleId: string;
|
|
128
162
|
} | {
|
|
129
|
-
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
|
|
163
|
+
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
|
|
130
164
|
readonly toBundleId: string;
|
|
131
165
|
});
|
|
132
166
|
type InsightsEventFilter = {
|
package/dist/index.d.mts
CHANGED
|
@@ -63,6 +63,25 @@ type DatabaseHttpResponse = DatabaseJsonObject & {
|
|
|
63
63
|
readonly body_truncated: boolean;
|
|
64
64
|
readonly received_at_ms: number;
|
|
65
65
|
};
|
|
66
|
+
/** What a kept UNCHANGED row changed against its installation's head. */
|
|
67
|
+
type BundleEventChangeKind = "first_seen" | "bundle" | "release" | "app_version" | "channel" | "native_build";
|
|
68
|
+
/**
|
|
69
|
+
* An UNCHANGED report the server keeps: what it changed against its
|
|
70
|
+
* installation's head, and the running values the head held before it. A
|
|
71
|
+
* report from an installation without a head is `first_seen` alone, with no
|
|
72
|
+
* previous values: the installation is new to this server, not necessarily
|
|
73
|
+
* to its device.
|
|
74
|
+
*/
|
|
75
|
+
type BundleEventChange = DatabaseJsonObject & {
|
|
76
|
+
readonly kinds: BundleEventChangeKind[];
|
|
77
|
+
readonly previous: (DatabaseJsonObject & {
|
|
78
|
+
readonly bundle_id: string;
|
|
79
|
+
readonly release_id: string | null;
|
|
80
|
+
readonly app_version: string;
|
|
81
|
+
readonly channel: string;
|
|
82
|
+
readonly min_bundle_id?: string;
|
|
83
|
+
}) | null;
|
|
84
|
+
};
|
|
66
85
|
/** Ancillary report data; queryable identity and lifecycle fields stay on the row. */
|
|
67
86
|
type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
68
87
|
readonly cohort: string;
|
|
@@ -78,6 +97,20 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
78
97
|
readonly delivery?: "patch" | "manifest" | "archive" | "unknown";
|
|
79
98
|
/** `UPDATE_DOWNLOADED`: a patch failed and the full files came instead. */
|
|
80
99
|
readonly patch_fallback?: boolean;
|
|
100
|
+
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
101
|
+
readonly change?: BundleEventChange;
|
|
102
|
+
/**
|
|
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.
|
|
107
|
+
*/
|
|
108
|
+
readonly late?: true;
|
|
109
|
+
/**
|
|
110
|
+
* A launch or crash of a bundle whose download report never arrived: the
|
|
111
|
+
* server counted that download with it.
|
|
112
|
+
*/
|
|
113
|
+
readonly implied_download?: true;
|
|
81
114
|
};
|
|
82
115
|
type BundleEventRowBase = {
|
|
83
116
|
readonly id: string;
|
|
@@ -120,13 +153,14 @@ interface InsightsScope {
|
|
|
120
153
|
}
|
|
121
154
|
/**
|
|
122
155
|
* Raw event predicates; recovery is attributed to the source bundle. An
|
|
123
|
-
* UNCHANGED
|
|
156
|
+
* UNCHANGED filter matches the kept rows that moved an installation to the
|
|
157
|
+
* bundle without an apply report.
|
|
124
158
|
*/
|
|
125
159
|
type InsightsBundleEventFilter = InsightsScope & ({
|
|
126
160
|
readonly type: "RECOVERED";
|
|
127
161
|
readonly fromBundleId: string;
|
|
128
162
|
} | {
|
|
129
|
-
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
|
|
163
|
+
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
|
|
130
164
|
readonly toBundleId: string;
|
|
131
165
|
});
|
|
132
166
|
type InsightsEventFilter = {
|
package/dist/worker/index.d.cts
CHANGED
|
@@ -51,6 +51,25 @@ type DatabaseHttpResponse = DatabaseJsonObject & {
|
|
|
51
51
|
readonly body_truncated: boolean;
|
|
52
52
|
readonly received_at_ms: number;
|
|
53
53
|
};
|
|
54
|
+
/** What a kept UNCHANGED row changed against its installation's head. */
|
|
55
|
+
type BundleEventChangeKind = "first_seen" | "bundle" | "release" | "app_version" | "channel" | "native_build";
|
|
56
|
+
/**
|
|
57
|
+
* An UNCHANGED report the server keeps: what it changed against its
|
|
58
|
+
* installation's head, and the running values the head held before it. A
|
|
59
|
+
* report from an installation without a head is `first_seen` alone, with no
|
|
60
|
+
* previous values: the installation is new to this server, not necessarily
|
|
61
|
+
* to its device.
|
|
62
|
+
*/
|
|
63
|
+
type BundleEventChange = DatabaseJsonObject & {
|
|
64
|
+
readonly kinds: BundleEventChangeKind[];
|
|
65
|
+
readonly previous: (DatabaseJsonObject & {
|
|
66
|
+
readonly bundle_id: string;
|
|
67
|
+
readonly release_id: string | null;
|
|
68
|
+
readonly app_version: string;
|
|
69
|
+
readonly channel: string;
|
|
70
|
+
readonly min_bundle_id?: string;
|
|
71
|
+
}) | null;
|
|
72
|
+
};
|
|
54
73
|
/** Ancillary report data; queryable identity and lifecycle fields stay on the row. */
|
|
55
74
|
type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
56
75
|
readonly cohort: string;
|
|
@@ -66,6 +85,20 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
66
85
|
readonly delivery?: "patch" | "manifest" | "archive" | "unknown";
|
|
67
86
|
/** `UPDATE_DOWNLOADED`: a patch failed and the full files came instead. */
|
|
68
87
|
readonly patch_fallback?: boolean;
|
|
88
|
+
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
89
|
+
readonly change?: BundleEventChange;
|
|
90
|
+
/**
|
|
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.
|
|
95
|
+
*/
|
|
96
|
+
readonly late?: true;
|
|
97
|
+
/**
|
|
98
|
+
* A launch or crash of a bundle whose download report never arrived: the
|
|
99
|
+
* server counted that download with it.
|
|
100
|
+
*/
|
|
101
|
+
readonly implied_download?: true;
|
|
69
102
|
};
|
|
70
103
|
type BundleEventRowBase = {
|
|
71
104
|
readonly id: string;
|
|
@@ -108,13 +141,14 @@ interface InsightsScope {
|
|
|
108
141
|
}
|
|
109
142
|
/**
|
|
110
143
|
* Raw event predicates; recovery is attributed to the source bundle. An
|
|
111
|
-
* UNCHANGED
|
|
144
|
+
* UNCHANGED filter matches the kept rows that moved an installation to the
|
|
145
|
+
* bundle without an apply report.
|
|
112
146
|
*/
|
|
113
147
|
type InsightsBundleEventFilter = InsightsScope & ({
|
|
114
148
|
readonly type: "RECOVERED";
|
|
115
149
|
readonly fromBundleId: string;
|
|
116
150
|
} | {
|
|
117
|
-
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
|
|
151
|
+
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
|
|
118
152
|
readonly toBundleId: string;
|
|
119
153
|
});
|
|
120
154
|
type InsightsEventFilter = {
|
package/dist/worker/index.d.mts
CHANGED
|
@@ -51,6 +51,25 @@ type DatabaseHttpResponse = DatabaseJsonObject & {
|
|
|
51
51
|
readonly body_truncated: boolean;
|
|
52
52
|
readonly received_at_ms: number;
|
|
53
53
|
};
|
|
54
|
+
/** What a kept UNCHANGED row changed against its installation's head. */
|
|
55
|
+
type BundleEventChangeKind = "first_seen" | "bundle" | "release" | "app_version" | "channel" | "native_build";
|
|
56
|
+
/**
|
|
57
|
+
* An UNCHANGED report the server keeps: what it changed against its
|
|
58
|
+
* installation's head, and the running values the head held before it. A
|
|
59
|
+
* report from an installation without a head is `first_seen` alone, with no
|
|
60
|
+
* previous values: the installation is new to this server, not necessarily
|
|
61
|
+
* to its device.
|
|
62
|
+
*/
|
|
63
|
+
type BundleEventChange = DatabaseJsonObject & {
|
|
64
|
+
readonly kinds: BundleEventChangeKind[];
|
|
65
|
+
readonly previous: (DatabaseJsonObject & {
|
|
66
|
+
readonly bundle_id: string;
|
|
67
|
+
readonly release_id: string | null;
|
|
68
|
+
readonly app_version: string;
|
|
69
|
+
readonly channel: string;
|
|
70
|
+
readonly min_bundle_id?: string;
|
|
71
|
+
}) | null;
|
|
72
|
+
};
|
|
54
73
|
/** Ancillary report data; queryable identity and lifecycle fields stay on the row. */
|
|
55
74
|
type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
56
75
|
readonly cohort: string;
|
|
@@ -66,6 +85,20 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
66
85
|
readonly delivery?: "patch" | "manifest" | "archive" | "unknown";
|
|
67
86
|
/** `UPDATE_DOWNLOADED`: a patch failed and the full files came instead. */
|
|
68
87
|
readonly patch_fallback?: boolean;
|
|
88
|
+
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
89
|
+
readonly change?: BundleEventChange;
|
|
90
|
+
/**
|
|
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.
|
|
95
|
+
*/
|
|
96
|
+
readonly late?: true;
|
|
97
|
+
/**
|
|
98
|
+
* A launch or crash of a bundle whose download report never arrived: the
|
|
99
|
+
* server counted that download with it.
|
|
100
|
+
*/
|
|
101
|
+
readonly implied_download?: true;
|
|
69
102
|
};
|
|
70
103
|
type BundleEventRowBase = {
|
|
71
104
|
readonly id: string;
|
|
@@ -108,13 +141,14 @@ interface InsightsScope {
|
|
|
108
141
|
}
|
|
109
142
|
/**
|
|
110
143
|
* Raw event predicates; recovery is attributed to the source bundle. An
|
|
111
|
-
* UNCHANGED
|
|
144
|
+
* UNCHANGED filter matches the kept rows that moved an installation to the
|
|
145
|
+
* bundle without an apply report.
|
|
112
146
|
*/
|
|
113
147
|
type InsightsBundleEventFilter = InsightsScope & ({
|
|
114
148
|
readonly type: "RECOVERED";
|
|
115
149
|
readonly fromBundleId: string;
|
|
116
150
|
} | {
|
|
117
|
-
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
|
|
151
|
+
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
|
|
118
152
|
readonly toBundleId: string;
|
|
119
153
|
});
|
|
120
154
|
type InsightsEventFilter = {
|
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.38",
|
|
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/cli-tools": "1.0.0-rc.
|
|
60
|
-
"@hot-updater/protocol": "1.0.0-rc.
|
|
61
|
-
"@hot-updater/plugin-core": "1.0.0-rc.
|
|
62
|
-
"@hot-updater/server": "1.0.0-rc.
|
|
59
|
+
"@hot-updater/cli-tools": "1.0.0-rc.38",
|
|
60
|
+
"@hot-updater/protocol": "1.0.0-rc.38",
|
|
61
|
+
"@hot-updater/plugin-core": "1.0.0-rc.38",
|
|
62
|
+
"@hot-updater/server": "1.0.0-rc.38"
|
|
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.38"
|
|
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-07T08:39:33.968Z.
|