({config, project, yaml})
| 52 | } |
| 53 | |
| 54 | async validate({config, project, yaml}) { |
| 55 | const fnValidate = await this._compileSchema(); |
| 56 | const valid = fnValidate(config); |
| 57 | if (!valid) { |
| 58 | // Read errors/schema from fnValidate before lazy loading ValidationError module. |
| 59 | // Otherwise they might be cleared already. |
| 60 | const {errors, schema} = fnValidate; |
| 61 | const {default: ValidationError} = await import("./ValidationError.js"); |
| 62 | throw new ValidationError({ |
| 63 | errors, |
| 64 | schema, |
| 65 | project, |
| 66 | yaml |
| 67 | }); |
| 68 | } |
| 69 | } |
| 70 | |
| 71 | static async loadSchema(schemaPath) { |
| 72 | const filePath = schemaPath.replace("http://ui5.sap/schema/", ""); |
no test coverage detected