(key)
| 38 | } |
| 39 | |
| 40 | async validateFile(key) { |
| 41 | const absolutePath = path.resolve( |
| 42 | this.serverless.serviceDir, |
| 43 | this.options[key], |
| 44 | ) |
| 45 | try { |
| 46 | return await this.serverless.utils.readFile(absolutePath) |
| 47 | } catch (err) { |
| 48 | if (err.code === 'ENOENT') { |
| 49 | throw new ServerlessError( |
| 50 | 'The file you provided does not exist.', |
| 51 | 'FILE_NOT_FOUND', |
| 52 | ) |
| 53 | } |
| 54 | throw err |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | async extendedValidate() { |
| 59 | this.validate() |
no test coverage detected