MCPcopy Create free account
hub / github.com/cypress-io/cypress / getStudioFileSource

Function getStudioFileSource

scripts/binary/binary-sources.js:108–116  ·  view source on GitHub ↗
(studioFilePath)

Source from the content-addressed store, hash-verified

106}
107
108const getStudioFileSource = async (studioFilePath) => {
109 const fileContents = await fs.readFile(studioFilePath, 'utf8')
110
111 if (!fileContents.includes('process.env.CYPRESS_LOCAL_STUDIO_PATH')) {
112 throw new Error(`Expected to find CYPRESS_LOCAL_STUDIO_PATH in studio file`)
113 }
114
115 return fileContents.replaceAll('process.env.CYPRESS_LOCAL_STUDIO_PATH', 'undefined')
116}
117
118const getCyPromptFileSource = async (cyPromptFilePath) => {
119 const fileContents = await fs.readFile(cyPromptFilePath, 'utf8')

Callers

nothing calls this directly

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected