UNPKG

@aws-amplify/cli-internal

Version:
30 lines 1.46 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.AuthCognitoAssessor = void 0; const assessment_1 = require("../assessment"); const gen1_app_1 = require("../../_common/gen1-app"); class AuthCognitoAssessor { constructor(gen1App, resource) { this.gen1App = gen1App; this.resource = resource; } record(assessment) { var _a; const meta = ((_a = this.gen1App.categoryMeta('auth')) !== null && _a !== void 0 ? _a : {})[this.resource.resourceName]; const isImported = (meta === null || meta === void 0 ? void 0 : meta.serviceType) === 'imported'; if (!isImported) { this.gen1App.ensureCliInputs(this.resource.category, this.resource.resourceName); } assessment.recordResource({ resource: this.resource, generate: (0, assessment_1.supported)(), refactor: (0, assessment_1.supported)() }); const overridesPath = `auth/${this.resource.resourceName}/override.ts`; if (this.gen1App.fileExists(overridesPath)) { assessment.recordFeature({ feature: { name: gen1_app_1.KNOWN_FEATURES.OVERRIDES, path: overridesPath }, generate: (0, assessment_1.unsupported)('requires adding code after generate'), refactor: (0, assessment_1.notApplicable)(), }); } } } exports.AuthCognitoAssessor = AuthCognitoAssessor; //# sourceMappingURL=auth-cognito.assessor.js.map