@hot-updater/core 0.29.8 → 0.30.0
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 +1 -1
- package/dist/index.d.cts +5 -4
- package/dist/index.d.mts +5 -4
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -106,7 +106,7 @@ function getRolledOutNumericCohorts(bundleId, rolloutCohortCount) {
|
|
|
106
106
|
function isCohortEligibleForUpdate(bundleId, cohort, rolloutCohortCount, targetCohorts) {
|
|
107
107
|
const normalizedCohort = cohort === null || cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
|
|
108
108
|
const normalizedTargetCohorts = targetCohorts?.map((targetCohort) => normalizeCohortValue(targetCohort)) ?? [];
|
|
109
|
-
if (
|
|
109
|
+
if (normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort)) return true;
|
|
110
110
|
const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
|
|
111
111
|
if (normalizedRolloutCount <= 0) return false;
|
|
112
112
|
if (normalizedCohort === void 0) return normalizedRolloutCount >= NUMERIC_COHORT_SIZE;
|
package/dist/index.d.cts
CHANGED
|
@@ -90,9 +90,10 @@ interface Bundle {
|
|
|
90
90
|
*/
|
|
91
91
|
rolloutCohortCount?: number | null;
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
93
|
+
* Additional cohorts to include for this update.
|
|
94
|
+
* Matching cohorts receive the update even if they are outside the current
|
|
95
|
+
* numeric rollout.
|
|
96
|
+
* If empty/null, only rolloutCohortCount-based rollout is used.
|
|
96
97
|
*
|
|
97
98
|
* NOTE: This field is stored in database but should NOT be returned to
|
|
98
99
|
* update-check clients for security reasons. Server uses it for rollout
|
|
@@ -120,7 +121,7 @@ interface UpdateInfo {
|
|
|
120
121
|
*/
|
|
121
122
|
rolloutCohortCount?: number | null;
|
|
122
123
|
/**
|
|
123
|
-
*
|
|
124
|
+
* Additional cohorts included for this update.
|
|
124
125
|
* Used internally for rollout decisions.
|
|
125
126
|
*/
|
|
126
127
|
targetCohorts?: string[] | null;
|
package/dist/index.d.mts
CHANGED
|
@@ -90,9 +90,10 @@ interface Bundle {
|
|
|
90
90
|
*/
|
|
91
91
|
rolloutCohortCount?: number | null;
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
93
|
+
* Additional cohorts to include for this update.
|
|
94
|
+
* Matching cohorts receive the update even if they are outside the current
|
|
95
|
+
* numeric rollout.
|
|
96
|
+
* If empty/null, only rolloutCohortCount-based rollout is used.
|
|
96
97
|
*
|
|
97
98
|
* NOTE: This field is stored in database but should NOT be returned to
|
|
98
99
|
* update-check clients for security reasons. Server uses it for rollout
|
|
@@ -120,7 +121,7 @@ interface UpdateInfo {
|
|
|
120
121
|
*/
|
|
121
122
|
rolloutCohortCount?: number | null;
|
|
122
123
|
/**
|
|
123
|
-
*
|
|
124
|
+
* Additional cohorts included for this update.
|
|
124
125
|
* Used internally for rollout decisions.
|
|
125
126
|
*/
|
|
126
127
|
targetCohorts?: string[] | null;
|
package/dist/index.mjs
CHANGED
|
@@ -105,7 +105,7 @@ function getRolledOutNumericCohorts(bundleId, rolloutCohortCount) {
|
|
|
105
105
|
function isCohortEligibleForUpdate(bundleId, cohort, rolloutCohortCount, targetCohorts) {
|
|
106
106
|
const normalizedCohort = cohort === null || cohort === void 0 ? void 0 : normalizeCohortValue(cohort);
|
|
107
107
|
const normalizedTargetCohorts = targetCohorts?.map((targetCohort) => normalizeCohortValue(targetCohort)) ?? [];
|
|
108
|
-
if (
|
|
108
|
+
if (normalizedCohort !== void 0 && normalizedTargetCohorts.includes(normalizedCohort)) return true;
|
|
109
109
|
const normalizedRolloutCount = normalizeRolloutCohortCount(rolloutCohortCount);
|
|
110
110
|
if (normalizedRolloutCount <= 0) return false;
|
|
111
111
|
if (normalizedCohort === void 0) return normalizedRolloutCount >= NUMERIC_COHORT_SIZE;
|