@ngx-pwa/local-storage
Version:
Efficient local storage module for Angular: simple API based on native localStorage API, but internally stored via the asynchronous IndexedDB API for performance, and wrapped in RxJS observables to be homogeneous with other Angular modules.
29 lines • 1.55 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = default_1;
const schematics_1 = require("@angular-devkit/schematics");
const tasks_1 = require("@angular-devkit/schematics/tasks");
const config_1 = require("../utility/config");
function default_1() {
return (host, context) => {
/* Get config */
const angularMajorVersion = (0, config_1.getDependencyMajorVersion)("@angular/core", host);
if (angularMajorVersion === undefined) {
context.logger.warn(`Not able to detect @angular/core version. Be aware that Angular versions <= 18 are no longer supported.`);
}
if (angularMajorVersion !== undefined && (angularMajorVersion <= 18)) {
throw new schematics_1.SchematicsException("Angular versions <= 18 are no longer supported.");
}
const rxjsMajorVersion = (0, config_1.getDependencyMajorVersion)("rxjs", host);
if (rxjsMajorVersion === undefined) {
context.logger.warn(`Not able to detect rxjs version. Be aware that rxjs version >= 7.6 is required, rxjs 6 is not supported.`);
}
if (rxjsMajorVersion !== undefined && (rxjsMajorVersion < 7)) {
throw new schematics_1.SchematicsException("rxjs >= 7.6 is required for this lib, rxjs 6 is not supported.");
}
/* Task to run `npm install` (or user package manager) */
context.addTask(new tasks_1.NodePackageInstallTask());
return (0, schematics_1.chain)([]);
};
}
//# sourceMappingURL=index.js.map