@o3r/core
Version:
Core of the Otter Framework
60 lines • 2.66 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.updateAll = exports.updateV12_1 = exports.updateV12_0 = exports.updateV10_0 = exports.updateV8_2 = void 0;
const node_path_1 = require("node:path");
const schematics_1 = require("@angular-devkit/schematics");
const schematics_2 = require("@o3r/schematics");
const configuration_1 = require("./v10.0/configuration");
const import_map_1 = require("./v8.2/import-map");
const o3rPackageJsonPath = (0, node_path_1.join)(__dirname, '../../package.json');
/**
* Update of Otter library V8.2
*/
// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name
function updateV8_2Fn() {
return (tree, context) => {
const updateRules = [
(0, schematics_2.updateImports)(import_map_1.mapImportAsyncStore)
];
return (0, schematics_1.chain)(updateRules)(tree, context);
};
}
/**
* Update of Otter library V8.2
*/
// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name
exports.updateV8_2 = (0, schematics_2.createOtterSchematic)(updateV8_2Fn);
/**
* Update of Otter library V10.0
*/
// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name
function updateV10_0Fn() {
return (tree, context) => {
const updateRules = [
// Some of these imports were missed in the generators of v9, so it's easier to just run the update again
(0, schematics_2.updateImports)(import_map_1.mapImportAsyncStore),
configuration_1.updateConfiguration
];
return (0, schematics_1.chain)(updateRules)(tree, context);
};
}
/**
* Update of Otter library V10.0
*/
// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name
exports.updateV10_0 = (0, schematics_2.createOtterSchematic)(updateV10_0Fn);
/**
* Update of Otter library V12.0
*/
// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name
exports.updateV12_0 = (0, schematics_2.createOtterSchematic)(() => (0, schematics_2.updatePackageGroup)(o3rPackageJsonPath, '<12.1.0-0'));
/**
* Update of Otter library V12.1
*/
// eslint-disable-next-line @typescript-eslint/naming-convention -- version is in the function name
exports.updateV12_1 = (0, schematics_2.createOtterSchematic)(() => (0, schematics_2.updatePackageGroup)(o3rPackageJsonPath));
/**
* Update of All versions
*/
exports.updateAll = (0, schematics_2.createOtterSchematic)(() => (0, schematics_2.updatePackageGroup)(o3rPackageJsonPath));
//# sourceMappingURL=index.js.map