@hot-updater/cloudflare 1.0.0-rc.36 → 1.0.0-rc.37

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 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,19 @@ 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 that arrived after its installation already ran its
104
+ * target, as when a reload cut the first runtime's report short: the
105
+ * server keeps it in history, but it moves and counts nothing.
106
+ */
107
+ readonly late?: true;
108
+ /**
109
+ * A launch or crash of a bundle whose download report never arrived: the
110
+ * server counted that download with it.
111
+ */
112
+ readonly implied_download?: true;
81
113
  };
82
114
  type BundleEventRowBase = {
83
115
  readonly id: string;
@@ -120,13 +152,14 @@ interface InsightsScope {
120
152
  }
121
153
  /**
122
154
  * Raw event predicates; recovery is attributed to the source bundle. An
123
- * UNCHANGED report is kept as no event, so no filter names it.
155
+ * UNCHANGED filter matches the kept rows that moved an installation to the
156
+ * bundle without an apply report.
124
157
  */
125
158
  type InsightsBundleEventFilter = InsightsScope & ({
126
159
  readonly type: "RECOVERED";
127
160
  readonly fromBundleId: string;
128
161
  } | {
129
- readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
162
+ readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
130
163
  readonly toBundleId: string;
131
164
  });
132
165
  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,19 @@ 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 that arrived after its installation already ran its
104
+ * target, as when a reload cut the first runtime's report short: the
105
+ * server keeps it in history, but it moves and counts nothing.
106
+ */
107
+ readonly late?: true;
108
+ /**
109
+ * A launch or crash of a bundle whose download report never arrived: the
110
+ * server counted that download with it.
111
+ */
112
+ readonly implied_download?: true;
81
113
  };
82
114
  type BundleEventRowBase = {
83
115
  readonly id: string;
@@ -120,13 +152,14 @@ interface InsightsScope {
120
152
  }
121
153
  /**
122
154
  * Raw event predicates; recovery is attributed to the source bundle. An
123
- * UNCHANGED report is kept as no event, so no filter names it.
155
+ * UNCHANGED filter matches the kept rows that moved an installation to the
156
+ * bundle without an apply report.
124
157
  */
125
158
  type InsightsBundleEventFilter = InsightsScope & ({
126
159
  readonly type: "RECOVERED";
127
160
  readonly fromBundleId: string;
128
161
  } | {
129
- readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
162
+ readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
130
163
  readonly toBundleId: string;
131
164
  });
132
165
  type InsightsEventFilter = {
@@ -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,19 @@ 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 that arrived after its installation already ran its
92
+ * target, as when a reload cut the first runtime's report short: the
93
+ * server keeps it in history, but it moves and counts nothing.
94
+ */
95
+ readonly late?: true;
96
+ /**
97
+ * A launch or crash of a bundle whose download report never arrived: the
98
+ * server counted that download with it.
99
+ */
100
+ readonly implied_download?: true;
69
101
  };
70
102
  type BundleEventRowBase = {
71
103
  readonly id: string;
@@ -108,13 +140,14 @@ interface InsightsScope {
108
140
  }
109
141
  /**
110
142
  * Raw event predicates; recovery is attributed to the source bundle. An
111
- * UNCHANGED report is kept as no event, so no filter names it.
143
+ * UNCHANGED filter matches the kept rows that moved an installation to the
144
+ * bundle without an apply report.
112
145
  */
113
146
  type InsightsBundleEventFilter = InsightsScope & ({
114
147
  readonly type: "RECOVERED";
115
148
  readonly fromBundleId: string;
116
149
  } | {
117
- readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
150
+ readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
118
151
  readonly toBundleId: string;
119
152
  });
120
153
  type InsightsEventFilter = {
@@ -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,19 @@ 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 that arrived after its installation already ran its
92
+ * target, as when a reload cut the first runtime's report short: the
93
+ * server keeps it in history, but it moves and counts nothing.
94
+ */
95
+ readonly late?: true;
96
+ /**
97
+ * A launch or crash of a bundle whose download report never arrived: the
98
+ * server counted that download with it.
99
+ */
100
+ readonly implied_download?: true;
69
101
  };
70
102
  type BundleEventRowBase = {
71
103
  readonly id: string;
@@ -108,13 +140,14 @@ interface InsightsScope {
108
140
  }
109
141
  /**
110
142
  * Raw event predicates; recovery is attributed to the source bundle. An
111
- * UNCHANGED report is kept as no event, so no filter names it.
143
+ * UNCHANGED filter matches the kept rows that moved an installation to the
144
+ * bundle without an apply report.
112
145
  */
113
146
  type InsightsBundleEventFilter = InsightsScope & ({
114
147
  readonly type: "RECOVERED";
115
148
  readonly fromBundleId: string;
116
149
  } | {
117
- readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
150
+ readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
118
151
  readonly toBundleId: string;
119
152
  });
120
153
  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.36",
4
+ "version": "1.0.0-rc.37",
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.36",
60
- "@hot-updater/protocol": "1.0.0-rc.36",
61
- "@hot-updater/plugin-core": "1.0.0-rc.36",
62
- "@hot-updater/server": "1.0.0-rc.36"
59
+ "@hot-updater/cli-tools": "1.0.0-rc.37",
60
+ "@hot-updater/protocol": "1.0.0-rc.37",
61
+ "@hot-updater/plugin-core": "1.0.0-rc.37",
62
+ "@hot-updater/server": "1.0.0-rc.37"
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.36"
78
+ "@hot-updater/test-utils": "1.0.0-rc.37"
79
79
  },
80
80
  "scripts": {
81
81
  "build": "tsdown && pnpm build:worker",
@@ -1 +1 @@
1
- This folder contains the built output assets for the worker "hot-updater" generated at 2026-10-06T19:12:49.460Z.
1
+ This folder contains the built output assets for the worker "hot-updater" generated at 2026-10-07T03:20:22.698Z.