Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | 16x 16x 16x 16x 16x 16x 16x 16x 3x 36x | import { CompressedProjectResources } from "shared/lib/resources/types";
import {
ProjectResourcesMigrationContext,
ProjectResourcesMigration,
applyProjectResourcesMigration,
} from "./helpers";
import {
migrate410r1To420r1,
migrate420r1To420r2,
migrate420r2To420r3,
migrate420r3To420r4,
migrate420r4To420r5,
migrate420r5To420r6,
migrate420r6To420r7,
migrate420r7To420r8,
migrate420r8To420r9,
migrate420r9To420r10,
} from "./versions/410to420";
import {
migrate420r10To500r1,
migrate500r1To500r2,
} from "lib/project/migration/versions/420to500";
const migrations: ProjectResourcesMigration[] = [
// 4.1.0 to 4.2.0
migrate410r1To420r1,
migrate420r1To420r2,
migrate420r2To420r3,
migrate420r3To420r4,
migrate420r4To420r5,
migrate420r5To420r6,
migrate420r6To420r7,
migrate420r7To420r8,
migrate420r8To420r9,
migrate420r9To420r10,
// 4.2.0 to 5.0.0
migrate420r10To500r1,
migrate500r1To500r2,
];
const lastMigration = migrations[migrations.length - 1];
export const LATEST_PROJECT_VERSION = lastMigration.to.version;
export const LATEST_PROJECT_MINOR_VERSION = lastMigration.to.release;
export const migrateProjectResources = async (
resources: CompressedProjectResources,
context: ProjectResourcesMigrationContext,
): Promise<CompressedProjectResources> => {
return migrations.reduce((migratedResources, migration) => {
return applyProjectResourcesMigration(
migratedResources,
migration,
context,
);
}, resources);
};
|