@hot-updater/js 0.16.1 → 0.16.3
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.cjs +2 -2
- package/dist/index.js +2 -2
- package/dist/withJwtSignedUrl.d.ts +2 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -2442,7 +2442,7 @@ var __webpack_exports__ = {};
|
|
|
2442
2442
|
return sig.sign(key, options);
|
|
2443
2443
|
}
|
|
2444
2444
|
}
|
|
2445
|
-
const withJwtSignedUrl = async ({ data, reqUrl, jwtSecret })=>{
|
|
2445
|
+
const withJwtSignedUrl = async ({ pathPrefix = "", data, reqUrl, jwtSecret })=>{
|
|
2446
2446
|
if (!data) return null;
|
|
2447
2447
|
if (data.id === core_namespaceObject.NIL_UUID) return {
|
|
2448
2448
|
...data,
|
|
@@ -2451,7 +2451,7 @@ var __webpack_exports__ = {};
|
|
|
2451
2451
|
const key = `${data.id}/bundle.zip`;
|
|
2452
2452
|
const token = await signToken(key, jwtSecret);
|
|
2453
2453
|
const url = new URL(reqUrl);
|
|
2454
|
-
url.pathname =
|
|
2454
|
+
url.pathname = `${pathPrefix}/${key}`;
|
|
2455
2455
|
url.searchParams.set("token", token);
|
|
2456
2456
|
return {
|
|
2457
2457
|
...data,
|
package/dist/index.js
CHANGED
|
@@ -2419,7 +2419,7 @@ class SignJWT {
|
|
|
2419
2419
|
return sig.sign(key, options);
|
|
2420
2420
|
}
|
|
2421
2421
|
}
|
|
2422
|
-
const withJwtSignedUrl = async ({ data, reqUrl, jwtSecret })=>{
|
|
2422
|
+
const withJwtSignedUrl = async ({ pathPrefix = "", data, reqUrl, jwtSecret })=>{
|
|
2423
2423
|
if (!data) return null;
|
|
2424
2424
|
if (data.id === __WEBPACK_EXTERNAL_MODULE__hot_updater_core_132f924c__.NIL_UUID) return {
|
|
2425
2425
|
...data,
|
|
@@ -2428,7 +2428,7 @@ const withJwtSignedUrl = async ({ data, reqUrl, jwtSecret })=>{
|
|
|
2428
2428
|
const key = `${data.id}/bundle.zip`;
|
|
2429
2429
|
const token = await signToken(key, jwtSecret);
|
|
2430
2430
|
const url = new URL(reqUrl);
|
|
2431
|
-
url.pathname =
|
|
2431
|
+
url.pathname = `${pathPrefix}/${key}`;
|
|
2432
2432
|
url.searchParams.set("token", token);
|
|
2433
2433
|
return {
|
|
2434
2434
|
...data,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hot-updater/js",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React Native OTA solution for self-hosted",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"access": "public"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@hot-updater/core": "0.16.
|
|
41
|
+
"@hot-updater/core": "0.16.3"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@types/node": "^20.9.4",
|