@hot-updater/core 0.20.15 → 0.21.1
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 +8 -2
- package/dist/index.d.ts +8 -2
- package/package.json +5 -10
package/dist/index.d.cts
CHANGED
|
@@ -66,7 +66,7 @@ interface Bundle {
|
|
|
66
66
|
metadata?: BundleMetadata;
|
|
67
67
|
}
|
|
68
68
|
type SnakeCase<S extends string> = S extends `${infer T}${infer U}` ? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${SnakeCase<U>}` : S;
|
|
69
|
-
type SnakeKeyObject<T> = T extends Record<string, any> ? { [K in keyof T as SnakeCase<Extract<K, string>>]: T[K] extends object ? SnakeKeyObject<T[K]> : T[K] } : T;
|
|
69
|
+
type SnakeKeyObject<T$1> = T$1 extends Record<string, any> ? { [K in keyof T$1 as SnakeCase<Extract<K, string>>]: T$1[K] extends object ? SnakeKeyObject<T$1[K]> : T$1[K] } : T$1;
|
|
70
70
|
type SnakeCaseBundle = SnakeKeyObject<Bundle>;
|
|
71
71
|
type UpdateStatus = "ROLLBACK" | "UPDATE";
|
|
72
72
|
/**
|
|
@@ -79,13 +79,19 @@ interface UpdateInfo {
|
|
|
79
79
|
message: string | null;
|
|
80
80
|
status: UpdateStatus;
|
|
81
81
|
storageUri: string | null;
|
|
82
|
+
fileHash: string | null;
|
|
82
83
|
}
|
|
83
84
|
/**
|
|
84
85
|
* The update info for the app layer.
|
|
85
86
|
* This is the update info that is used by the app.
|
|
86
87
|
*/
|
|
87
|
-
interface AppUpdateInfo extends UpdateInfo {
|
|
88
|
+
interface AppUpdateInfo extends Omit<UpdateInfo, "storageUri"> {
|
|
88
89
|
fileUrl: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* SHA256 hash of the bundle file for integrity verification.
|
|
92
|
+
* If provided, the client will verify the downloaded file's hash before extraction.
|
|
93
|
+
*/
|
|
94
|
+
fileHash: string | null;
|
|
89
95
|
}
|
|
90
96
|
type UpdateStrategy = "fingerprint" | "appVersion";
|
|
91
97
|
type FingerprintGetBundlesArgs = {
|
package/dist/index.d.ts
CHANGED
|
@@ -66,7 +66,7 @@ interface Bundle {
|
|
|
66
66
|
metadata?: BundleMetadata;
|
|
67
67
|
}
|
|
68
68
|
type SnakeCase<S extends string> = S extends `${infer T}${infer U}` ? `${T extends Capitalize<T> ? "_" : ""}${Lowercase<T>}${SnakeCase<U>}` : S;
|
|
69
|
-
type SnakeKeyObject<T> = T extends Record<string, any> ? { [K in keyof T as SnakeCase<Extract<K, string>>]: T[K] extends object ? SnakeKeyObject<T[K]> : T[K] } : T;
|
|
69
|
+
type SnakeKeyObject<T$1> = T$1 extends Record<string, any> ? { [K in keyof T$1 as SnakeCase<Extract<K, string>>]: T$1[K] extends object ? SnakeKeyObject<T$1[K]> : T$1[K] } : T$1;
|
|
70
70
|
type SnakeCaseBundle = SnakeKeyObject<Bundle>;
|
|
71
71
|
type UpdateStatus = "ROLLBACK" | "UPDATE";
|
|
72
72
|
/**
|
|
@@ -79,13 +79,19 @@ interface UpdateInfo {
|
|
|
79
79
|
message: string | null;
|
|
80
80
|
status: UpdateStatus;
|
|
81
81
|
storageUri: string | null;
|
|
82
|
+
fileHash: string | null;
|
|
82
83
|
}
|
|
83
84
|
/**
|
|
84
85
|
* The update info for the app layer.
|
|
85
86
|
* This is the update info that is used by the app.
|
|
86
87
|
*/
|
|
87
|
-
interface AppUpdateInfo extends UpdateInfo {
|
|
88
|
+
interface AppUpdateInfo extends Omit<UpdateInfo, "storageUri"> {
|
|
88
89
|
fileUrl: string | null;
|
|
90
|
+
/**
|
|
91
|
+
* SHA256 hash of the bundle file for integrity verification.
|
|
92
|
+
* If provided, the client will verify the downloaded file's hash before extraction.
|
|
93
|
+
*/
|
|
94
|
+
fileHash: string | null;
|
|
89
95
|
}
|
|
90
96
|
type UpdateStrategy = "fingerprint" | "appVersion";
|
|
91
97
|
type FingerprintGetBundlesArgs = {
|
package/package.json
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.21.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
7
|
-
"main": "dist/index.cjs",
|
|
8
|
-
"module": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.
|
|
7
|
+
"main": "./dist/index.cjs",
|
|
8
|
+
"module": "./dist/index.js",
|
|
9
|
+
"types": "./dist/index.d.cts",
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"types": "./dist/index.d.ts",
|
|
13
12
|
"import": "./dist/index.js",
|
|
14
13
|
"require": "./dist/index.cjs"
|
|
15
14
|
},
|
|
16
|
-
"./
|
|
17
|
-
"types": "./src/test-utils/index.ts",
|
|
18
|
-
"import": "./src/test-utils/index.ts",
|
|
19
|
-
"require": "./src/test-utils/index.ts"
|
|
20
|
-
}
|
|
15
|
+
"./package.json": "./package.json"
|
|
21
16
|
},
|
|
22
17
|
"files": [
|
|
23
18
|
"dist",
|