| 116 | } |
| 117 | |
| 118 | const getCyPromptFileSource = async (cyPromptFilePath) => { |
| 119 | const fileContents = await fs.readFile(cyPromptFilePath, 'utf8') |
| 120 | |
| 121 | if (!fileContents.includes('process.env.CYPRESS_LOCAL_CY_PROMPT_PATH')) { |
| 122 | throw new Error(`Expected to find CYPRESS_LOCAL_CY_PROMPT_PATH in cy prompt file`) |
| 123 | } |
| 124 | |
| 125 | return fileContents.replaceAll('process.env.CYPRESS_LOCAL_CY_PROMPT_PATH', 'undefined') |
| 126 | } |
| 127 | |
| 128 | const validateProtocolFile = async (protocolFilePath) => { |
| 129 | const afterReplaceProtocol = await fs.readFile(protocolFilePath, 'utf8') |