@hot-updater/plugin-core 0.21.7 → 0.21.9
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/_virtual/rolldown_runtime.cjs +25 -0
- package/dist/calculatePagination.cjs +27 -0
- package/dist/calculatePagination.d.cts +17 -0
- package/dist/calculatePagination.d.ts +17 -0
- package/dist/calculatePagination.js +26 -0
- package/dist/compressionFormat.cjs +59 -0
- package/dist/compressionFormat.d.cts +33 -0
- package/dist/compressionFormat.d.ts +33 -0
- package/dist/compressionFormat.js +54 -0
- package/dist/createBlobDatabasePlugin.cjs +312 -0
- package/dist/createBlobDatabasePlugin.d.cts +38 -0
- package/dist/createBlobDatabasePlugin.d.ts +38 -0
- package/dist/createBlobDatabasePlugin.js +309 -0
- package/dist/createDatabasePlugin.cjs +97 -0
- package/dist/createDatabasePlugin.d.cts +68 -0
- package/dist/createDatabasePlugin.d.ts +68 -0
- package/dist/createDatabasePlugin.js +95 -0
- package/dist/createStorageKeyBuilder.cjs +8 -0
- package/dist/createStorageKeyBuilder.d.cts +4 -0
- package/dist/createStorageKeyBuilder.d.ts +4 -0
- package/dist/createStorageKeyBuilder.js +7 -0
- package/dist/filterCompatibleAppVersions.cjs +17 -0
- package/dist/filterCompatibleAppVersions.d.cts +12 -0
- package/dist/filterCompatibleAppVersions.d.ts +12 -0
- package/dist/filterCompatibleAppVersions.js +17 -0
- package/dist/generateMinBundleId.cjs +11 -0
- package/dist/generateMinBundleId.d.cts +4 -0
- package/dist/generateMinBundleId.d.ts +4 -0
- package/dist/generateMinBundleId.js +10 -0
- package/dist/index.cjs +21 -27391
- package/dist/index.d.cts +12 -560
- package/dist/index.d.ts +12 -560
- package/dist/index.js +11 -27351
- package/dist/parseStorageUri.cjs +35 -0
- package/dist/parseStorageUri.d.cts +24 -0
- package/dist/parseStorageUri.d.ts +24 -0
- package/dist/parseStorageUri.js +34 -0
- package/dist/semverSatisfies.cjs +13 -0
- package/dist/semverSatisfies.d.cts +4 -0
- package/dist/semverSatisfies.d.ts +4 -0
- package/dist/semverSatisfies.js +11 -0
- package/dist/types/index.d.cts +201 -0
- package/dist/types/index.d.ts +201 -0
- package/dist/types/utils.d.cts +12 -0
- package/dist/types/utils.d.ts +12 -0
- package/package.json +4 -15
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
const require_semverSatisfies = require('./semverSatisfies.cjs');
|
|
2
|
+
|
|
3
|
+
//#region src/filterCompatibleAppVersions.ts
|
|
4
|
+
/**
|
|
5
|
+
* Filters target app versions that are compatible with the current app version.
|
|
6
|
+
* Returns only versions that are compatible with the current version according to semver rules.
|
|
7
|
+
*
|
|
8
|
+
* @param targetAppVersionList - List of target app versions to filter
|
|
9
|
+
* @param currentVersion - Current app version
|
|
10
|
+
* @returns Array of target app versions compatible with the current version
|
|
11
|
+
*/
|
|
12
|
+
const filterCompatibleAppVersions = (targetAppVersionList, currentVersion) => {
|
|
13
|
+
return targetAppVersionList.filter((version) => require_semverSatisfies.semverSatisfies(version, currentVersion)).sort((a, b) => b.localeCompare(a));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
exports.filterCompatibleAppVersions = filterCompatibleAppVersions;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/filterCompatibleAppVersions.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Filters target app versions that are compatible with the current app version.
|
|
4
|
+
* Returns only versions that are compatible with the current version according to semver rules.
|
|
5
|
+
*
|
|
6
|
+
* @param targetAppVersionList - List of target app versions to filter
|
|
7
|
+
* @param currentVersion - Current app version
|
|
8
|
+
* @returns Array of target app versions compatible with the current version
|
|
9
|
+
*/
|
|
10
|
+
declare const filterCompatibleAppVersions: (targetAppVersionList: string[], currentVersion: string) => string[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { filterCompatibleAppVersions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
//#region src/filterCompatibleAppVersions.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Filters target app versions that are compatible with the current app version.
|
|
4
|
+
* Returns only versions that are compatible with the current version according to semver rules.
|
|
5
|
+
*
|
|
6
|
+
* @param targetAppVersionList - List of target app versions to filter
|
|
7
|
+
* @param currentVersion - Current app version
|
|
8
|
+
* @returns Array of target app versions compatible with the current version
|
|
9
|
+
*/
|
|
10
|
+
declare const filterCompatibleAppVersions: (targetAppVersionList: string[], currentVersion: string) => string[];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { filterCompatibleAppVersions };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { semverSatisfies } from "./semverSatisfies.js";
|
|
2
|
+
|
|
3
|
+
//#region src/filterCompatibleAppVersions.ts
|
|
4
|
+
/**
|
|
5
|
+
* Filters target app versions that are compatible with the current app version.
|
|
6
|
+
* Returns only versions that are compatible with the current version according to semver rules.
|
|
7
|
+
*
|
|
8
|
+
* @param targetAppVersionList - List of target app versions to filter
|
|
9
|
+
* @param currentVersion - Current app version
|
|
10
|
+
* @returns Array of target app versions compatible with the current version
|
|
11
|
+
*/
|
|
12
|
+
const filterCompatibleAppVersions = (targetAppVersionList, currentVersion) => {
|
|
13
|
+
return targetAppVersionList.filter((version) => semverSatisfies(version, currentVersion)).sort((a, b) => b.localeCompare(a));
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { filterCompatibleAppVersions };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
|
|
2
|
+
//#region src/generateMinBundleId.ts
|
|
3
|
+
const generateMinBundleId = () => {
|
|
4
|
+
const timestamp = BigInt(Date.now());
|
|
5
|
+
const timeHigh = Number(timestamp >> 16n & 4294967295n);
|
|
6
|
+
const timeLow = Number(timestamp & 65535n);
|
|
7
|
+
return `${timeHigh.toString(16).padStart(8, "0")}-${timeLow.toString(16).padStart(4, "0")}-${28672 .toString(16).padStart(4, "0")}-${32768 .toString(16).padStart(4, "0")}-000000000000`;
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.generateMinBundleId = generateMinBundleId;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
//#region src/generateMinBundleId.ts
|
|
2
|
+
const generateMinBundleId = () => {
|
|
3
|
+
const timestamp = BigInt(Date.now());
|
|
4
|
+
const timeHigh = Number(timestamp >> 16n & 4294967295n);
|
|
5
|
+
const timeLow = Number(timestamp & 65535n);
|
|
6
|
+
return `${timeHigh.toString(16).padStart(8, "0")}-${timeLow.toString(16).padStart(4, "0")}-${28672 .toString(16).padStart(4, "0")}-${32768 .toString(16).padStart(4, "0")}-000000000000`;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
//#endregion
|
|
10
|
+
export { generateMinBundleId };
|