@rdlabo/ionic-angular-kit 21.5.19 → 21.5.20
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.
|
@@ -665,6 +665,11 @@ function normalizeOfflineReplicaMigrations(migrations, bundleVersion) {
|
|
|
665
665
|
if (sorted.length > 0 && sorted[0].fromVersion !== 1) {
|
|
666
666
|
throw new Error(`Replica migrations must advance consecutive schema versions; expected fromVersion 1, received ${sorted[0].fromVersion}.`);
|
|
667
667
|
}
|
|
668
|
+
const finalRequiredFromVersion = bundleVersion - 1;
|
|
669
|
+
if (finalRequiredFromVersion > 0 && sorted.at(-1)?.fromVersion !== finalRequiredFromVersion) {
|
|
670
|
+
const firstMissingVersion = (sorted.at(-1)?.fromVersion ?? 0) + 1;
|
|
671
|
+
throw new Error(`Missing offline replica schema migration from version ${firstMissingVersion} to ${firstMissingVersion + 1}.`);
|
|
672
|
+
}
|
|
668
673
|
return sorted;
|
|
669
674
|
}
|
|
670
675
|
function buildBundleSchemaFingerprintInput(version, entities, migrations) {
|