@hot-updater/firebase 1.0.0-rc.35 → 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/firebase/functions/index.cjs +1711 -1419
- package/dist/index.d.cts +72 -2
- package/dist/index.d.mts +72 -2
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -62,12 +62,33 @@ type DatabaseHttpResponse = DatabaseJsonObject & {
|
|
|
62
62
|
readonly body_truncated: boolean;
|
|
63
63
|
readonly received_at_ms: number;
|
|
64
64
|
};
|
|
65
|
+
/** What a kept UNCHANGED row changed against its installation's head. */
|
|
66
|
+
type BundleEventChangeKind = "first_seen" | "bundle" | "release" | "app_version" | "channel" | "native_build";
|
|
67
|
+
/**
|
|
68
|
+
* An UNCHANGED report the server keeps: what it changed against its
|
|
69
|
+
* installation's head, and the running values the head held before it. A
|
|
70
|
+
* report from an installation without a head is `first_seen` alone, with no
|
|
71
|
+
* previous values: the installation is new to this server, not necessarily
|
|
72
|
+
* to its device.
|
|
73
|
+
*/
|
|
74
|
+
type BundleEventChange = DatabaseJsonObject & {
|
|
75
|
+
readonly kinds: BundleEventChangeKind[];
|
|
76
|
+
readonly previous: (DatabaseJsonObject & {
|
|
77
|
+
readonly bundle_id: string;
|
|
78
|
+
readonly release_id: string | null;
|
|
79
|
+
readonly app_version: string;
|
|
80
|
+
readonly channel: string;
|
|
81
|
+
readonly min_bundle_id?: string;
|
|
82
|
+
}) | null;
|
|
83
|
+
};
|
|
65
84
|
/** Ancillary report data; queryable identity and lifecycle fields stay on the row. */
|
|
66
85
|
type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
67
86
|
readonly cohort: string;
|
|
68
87
|
readonly update_strategy: "fingerprint" | "appVersion" | null;
|
|
69
88
|
readonly fingerprint_hash: string | null;
|
|
70
89
|
readonly sdk_version: string | null;
|
|
90
|
+
/** The native build's built-in bundle ID, when the SDK reports it. */
|
|
91
|
+
readonly min_bundle_id?: string;
|
|
71
92
|
/** `UPDATE_FAILED`: what failed. */
|
|
72
93
|
readonly failure?: BundleEventFailure;
|
|
73
94
|
readonly http_response?: DatabaseHttpResponse;
|
|
@@ -75,6 +96,19 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
75
96
|
readonly delivery?: "patch" | "manifest" | "archive" | "unknown";
|
|
76
97
|
/** `UPDATE_DOWNLOADED`: a patch failed and the full files came instead. */
|
|
77
98
|
readonly patch_fallback?: boolean;
|
|
99
|
+
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
100
|
+
readonly change?: BundleEventChange;
|
|
101
|
+
/**
|
|
102
|
+
* A download or apply that arrived after its installation already ran its
|
|
103
|
+
* target, as when a reload cut the first runtime's report short: the
|
|
104
|
+
* server keeps it in history, but it moves and counts nothing.
|
|
105
|
+
*/
|
|
106
|
+
readonly late?: true;
|
|
107
|
+
/**
|
|
108
|
+
* A launch or crash of a bundle whose download report never arrived: the
|
|
109
|
+
* server counted that download with it.
|
|
110
|
+
*/
|
|
111
|
+
readonly implied_download?: true;
|
|
78
112
|
};
|
|
79
113
|
type BundleEventRowBase = {
|
|
80
114
|
readonly id: string;
|
|
@@ -117,13 +151,14 @@ interface InsightsScope {
|
|
|
117
151
|
}
|
|
118
152
|
/**
|
|
119
153
|
* Raw event predicates; recovery is attributed to the source bundle. An
|
|
120
|
-
* UNCHANGED
|
|
154
|
+
* UNCHANGED filter matches the kept rows that moved an installation to the
|
|
155
|
+
* bundle without an apply report.
|
|
121
156
|
*/
|
|
122
157
|
type InsightsBundleEventFilter = InsightsScope & ({
|
|
123
158
|
readonly type: "RECOVERED";
|
|
124
159
|
readonly fromBundleId: string;
|
|
125
160
|
} | {
|
|
126
|
-
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
|
|
161
|
+
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
|
|
127
162
|
readonly toBundleId: string;
|
|
128
163
|
});
|
|
129
164
|
type InsightsEventFilter = {
|
|
@@ -243,7 +278,10 @@ interface InsightsGetAppUsageResult {
|
|
|
243
278
|
readonly bundleDistribution: readonly {
|
|
244
279
|
readonly appVersion: string;
|
|
245
280
|
readonly platform: "ios" | "android";
|
|
281
|
+
/** The release the installations run; null for none. */
|
|
246
282
|
readonly releaseId: string | null;
|
|
283
|
+
/** The native build's built-in bundle, when they run it. */
|
|
284
|
+
readonly builtinBundleId: string | null;
|
|
247
285
|
readonly installations: number;
|
|
248
286
|
}[];
|
|
249
287
|
readonly measuredAtMs: number;
|
|
@@ -574,6 +612,38 @@ declare const plugins: readonly [import("@hot-updater/plugin-core").HotUpdaterPl
|
|
|
574
612
|
readonly sort: readonly ["bucket_start_ms"];
|
|
575
613
|
};
|
|
576
614
|
}, never, readonly ["channel", "platform", "app_version", "release_id", "bucket_start_ms"]>;
|
|
615
|
+
readonly insights_builtin_distribution: import("@hot-updater/plugin-core").AggregateDefinition<{
|
|
616
|
+
readonly channel: {
|
|
617
|
+
readonly type: "string";
|
|
618
|
+
};
|
|
619
|
+
readonly platform: {
|
|
620
|
+
readonly type: "string";
|
|
621
|
+
readonly maxLength: 16;
|
|
622
|
+
};
|
|
623
|
+
readonly app_version: {
|
|
624
|
+
readonly type: "string";
|
|
625
|
+
};
|
|
626
|
+
readonly release_id: {
|
|
627
|
+
readonly type: "string";
|
|
628
|
+
readonly maxLength: 36;
|
|
629
|
+
};
|
|
630
|
+
readonly builtin_bundle_id: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
readonly maxLength: 36;
|
|
633
|
+
};
|
|
634
|
+
readonly bucket_start_ms: {
|
|
635
|
+
readonly type: "integer";
|
|
636
|
+
};
|
|
637
|
+
}, "latest_installations", {
|
|
638
|
+
readonly byScope: {
|
|
639
|
+
readonly eq: readonly ["channel", "platform"];
|
|
640
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
641
|
+
};
|
|
642
|
+
readonly byVersion: {
|
|
643
|
+
readonly eq: readonly ["channel", "platform", "app_version"];
|
|
644
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
645
|
+
};
|
|
646
|
+
}, never, readonly ["channel", "platform", "app_version", "release_id", "builtin_bundle_id", "bucket_start_ms"]>;
|
|
577
647
|
readonly insights_latest_by_bundle: import("@hot-updater/plugin-core").AggregateDefinition<{
|
|
578
648
|
readonly platform: {
|
|
579
649
|
readonly type: "string";
|
package/dist/index.d.mts
CHANGED
|
@@ -62,12 +62,33 @@ type DatabaseHttpResponse = DatabaseJsonObject & {
|
|
|
62
62
|
readonly body_truncated: boolean;
|
|
63
63
|
readonly received_at_ms: number;
|
|
64
64
|
};
|
|
65
|
+
/** What a kept UNCHANGED row changed against its installation's head. */
|
|
66
|
+
type BundleEventChangeKind = "first_seen" | "bundle" | "release" | "app_version" | "channel" | "native_build";
|
|
67
|
+
/**
|
|
68
|
+
* An UNCHANGED report the server keeps: what it changed against its
|
|
69
|
+
* installation's head, and the running values the head held before it. A
|
|
70
|
+
* report from an installation without a head is `first_seen` alone, with no
|
|
71
|
+
* previous values: the installation is new to this server, not necessarily
|
|
72
|
+
* to its device.
|
|
73
|
+
*/
|
|
74
|
+
type BundleEventChange = DatabaseJsonObject & {
|
|
75
|
+
readonly kinds: BundleEventChangeKind[];
|
|
76
|
+
readonly previous: (DatabaseJsonObject & {
|
|
77
|
+
readonly bundle_id: string;
|
|
78
|
+
readonly release_id: string | null;
|
|
79
|
+
readonly app_version: string;
|
|
80
|
+
readonly channel: string;
|
|
81
|
+
readonly min_bundle_id?: string;
|
|
82
|
+
}) | null;
|
|
83
|
+
};
|
|
65
84
|
/** Ancillary report data; queryable identity and lifecycle fields stay on the row. */
|
|
66
85
|
type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
67
86
|
readonly cohort: string;
|
|
68
87
|
readonly update_strategy: "fingerprint" | "appVersion" | null;
|
|
69
88
|
readonly fingerprint_hash: string | null;
|
|
70
89
|
readonly sdk_version: string | null;
|
|
90
|
+
/** The native build's built-in bundle ID, when the SDK reports it. */
|
|
91
|
+
readonly min_bundle_id?: string;
|
|
71
92
|
/** `UPDATE_FAILED`: what failed. */
|
|
72
93
|
readonly failure?: BundleEventFailure;
|
|
73
94
|
readonly http_response?: DatabaseHttpResponse;
|
|
@@ -75,6 +96,19 @@ type DatabaseBundleEventMetadata = DatabaseJsonObject & {
|
|
|
75
96
|
readonly delivery?: "patch" | "manifest" | "archive" | "unknown";
|
|
76
97
|
/** `UPDATE_DOWNLOADED`: a patch failed and the full files came instead. */
|
|
77
98
|
readonly patch_fallback?: boolean;
|
|
99
|
+
/** A kept `UNCHANGED` row: what it changed, which the server sets. */
|
|
100
|
+
readonly change?: BundleEventChange;
|
|
101
|
+
/**
|
|
102
|
+
* A download or apply that arrived after its installation already ran its
|
|
103
|
+
* target, as when a reload cut the first runtime's report short: the
|
|
104
|
+
* server keeps it in history, but it moves and counts nothing.
|
|
105
|
+
*/
|
|
106
|
+
readonly late?: true;
|
|
107
|
+
/**
|
|
108
|
+
* A launch or crash of a bundle whose download report never arrived: the
|
|
109
|
+
* server counted that download with it.
|
|
110
|
+
*/
|
|
111
|
+
readonly implied_download?: true;
|
|
78
112
|
};
|
|
79
113
|
type BundleEventRowBase = {
|
|
80
114
|
readonly id: string;
|
|
@@ -117,13 +151,14 @@ interface InsightsScope {
|
|
|
117
151
|
}
|
|
118
152
|
/**
|
|
119
153
|
* Raw event predicates; recovery is attributed to the source bundle. An
|
|
120
|
-
* UNCHANGED
|
|
154
|
+
* UNCHANGED filter matches the kept rows that moved an installation to the
|
|
155
|
+
* bundle without an apply report.
|
|
121
156
|
*/
|
|
122
157
|
type InsightsBundleEventFilter = InsightsScope & ({
|
|
123
158
|
readonly type: "RECOVERED";
|
|
124
159
|
readonly fromBundleId: string;
|
|
125
160
|
} | {
|
|
126
|
-
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED";
|
|
161
|
+
readonly type: "UPDATE_DOWNLOADED" | "UPDATE_APPLIED" | "UPDATE_FAILED" | "UNCHANGED";
|
|
127
162
|
readonly toBundleId: string;
|
|
128
163
|
});
|
|
129
164
|
type InsightsEventFilter = {
|
|
@@ -243,7 +278,10 @@ interface InsightsGetAppUsageResult {
|
|
|
243
278
|
readonly bundleDistribution: readonly {
|
|
244
279
|
readonly appVersion: string;
|
|
245
280
|
readonly platform: "ios" | "android";
|
|
281
|
+
/** The release the installations run; null for none. */
|
|
246
282
|
readonly releaseId: string | null;
|
|
283
|
+
/** The native build's built-in bundle, when they run it. */
|
|
284
|
+
readonly builtinBundleId: string | null;
|
|
247
285
|
readonly installations: number;
|
|
248
286
|
}[];
|
|
249
287
|
readonly measuredAtMs: number;
|
|
@@ -574,6 +612,38 @@ declare const plugins: readonly [import("@hot-updater/plugin-core").HotUpdaterPl
|
|
|
574
612
|
readonly sort: readonly ["bucket_start_ms"];
|
|
575
613
|
};
|
|
576
614
|
}, never, readonly ["channel", "platform", "app_version", "release_id", "bucket_start_ms"]>;
|
|
615
|
+
readonly insights_builtin_distribution: import("@hot-updater/plugin-core").AggregateDefinition<{
|
|
616
|
+
readonly channel: {
|
|
617
|
+
readonly type: "string";
|
|
618
|
+
};
|
|
619
|
+
readonly platform: {
|
|
620
|
+
readonly type: "string";
|
|
621
|
+
readonly maxLength: 16;
|
|
622
|
+
};
|
|
623
|
+
readonly app_version: {
|
|
624
|
+
readonly type: "string";
|
|
625
|
+
};
|
|
626
|
+
readonly release_id: {
|
|
627
|
+
readonly type: "string";
|
|
628
|
+
readonly maxLength: 36;
|
|
629
|
+
};
|
|
630
|
+
readonly builtin_bundle_id: {
|
|
631
|
+
readonly type: "string";
|
|
632
|
+
readonly maxLength: 36;
|
|
633
|
+
};
|
|
634
|
+
readonly bucket_start_ms: {
|
|
635
|
+
readonly type: "integer";
|
|
636
|
+
};
|
|
637
|
+
}, "latest_installations", {
|
|
638
|
+
readonly byScope: {
|
|
639
|
+
readonly eq: readonly ["channel", "platform"];
|
|
640
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
641
|
+
};
|
|
642
|
+
readonly byVersion: {
|
|
643
|
+
readonly eq: readonly ["channel", "platform", "app_version"];
|
|
644
|
+
readonly sort: readonly ["bucket_start_ms"];
|
|
645
|
+
};
|
|
646
|
+
}, never, readonly ["channel", "platform", "app_version", "release_id", "builtin_bundle_id", "bucket_start_ms"]>;
|
|
577
647
|
readonly insights_latest_by_bundle: import("@hot-updater/plugin-core").AggregateDefinition<{
|
|
578
648
|
readonly platform: {
|
|
579
649
|
readonly type: "string";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/firebase",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.0.0-rc.
|
|
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
|
"types": "dist/index.d.cts",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"hono": "4.12.34",
|
|
40
|
-
"@hot-updater/cli-tools": "1.0.0-rc.
|
|
41
|
-
"@hot-updater/
|
|
42
|
-
"@hot-updater/
|
|
43
|
-
"@hot-updater/server": "1.0.0-rc.
|
|
40
|
+
"@hot-updater/cli-tools": "1.0.0-rc.37",
|
|
41
|
+
"@hot-updater/protocol": "1.0.0-rc.37",
|
|
42
|
+
"@hot-updater/plugin-core": "1.0.0-rc.37",
|
|
43
|
+
"@hot-updater/server": "1.0.0-rc.37"
|
|
44
44
|
},
|
|
45
45
|
"publishConfig": {
|
|
46
46
|
"access": "public"
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"firebase-tools": "15.29.0",
|
|
56
56
|
"fkill": "^9.0.0",
|
|
57
57
|
"mime": "^4.0.4",
|
|
58
|
-
"@hot-updater/mock": "1.0.0-rc.
|
|
59
|
-
"@hot-updater/test-utils": "1.0.0-rc.
|
|
58
|
+
"@hot-updater/mock": "1.0.0-rc.37",
|
|
59
|
+
"@hot-updater/test-utils": "1.0.0-rc.37"
|
|
60
60
|
},
|
|
61
61
|
"peerDependencies": {
|
|
62
62
|
"firebase-admin": "*",
|