UNPKG

@o3r/configuration

Version:

This module contains configuration-related features such as CMS compatibility, Configuration override, store and debugging. It enables your application runtime configuration and comes with an integrated ng builder to help you generate configurations suppo

23 lines 987 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.updateV10_3 = void 0; const schematics_1 = require("@o3r/schematics"); const configObserverRegExp = /\bConfigObserver\b/g; // eslint-disable-next-line @typescript-eslint/naming-convention -- version in the function name function updateV10_3Fn() { return (tree) => { const files = (0, schematics_1.findFilesInTree)(tree.getDir(''), (filePath) => /.*\.ts/.test(filePath)); files.forEach(({ content, path }) => { const str = content.toString(); if (configObserverRegExp.test(str)) { tree.overwrite(path, str.replaceAll(configObserverRegExp, 'O3rConfig')); } }); }; } /** * Update of Otter configuration V10.3 */ // eslint-disable-next-line @typescript-eslint/naming-convention -- version in the function name exports.updateV10_3 = (0, schematics_1.createOtterSchematic)(updateV10_3Fn); //# sourceMappingURL=index.js.map