UNPKG

angular-auth-oidc-client

Version:
20 lines 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.addStandaloneConfigsToProviders = addStandaloneConfigsToProviders; const schematics_1 = require("@angular-devkit/schematics"); const utility_1 = require("@schematics/angular/utility"); const angular_utils_1 = require("../../utils/angular-utils"); function addStandaloneConfigsToProviders(options) { return (host, context) => { const [projectName] = (0, angular_utils_1.getProject)(host); const { fileName } = options.standaloneInfo; context.logger.info(`✅️ All imports done, please add the 'provideRouter()' as well if you don't have it provided yet.`); return (0, schematics_1.chain)([ (0, utility_1.addRootProvider)(projectName, ({ code, external }) => { external('authConfig', `./auth/${fileName}`); return code `${external('provideAuth', 'angular-auth-oidc-client')}(authConfig)`; }), ]); }; } //# sourceMappingURL=add-standalone-import.js.map