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

Function getStudioFileSource

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

Source from the content-addressed store, hash-verified

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

Callers 1

after-pack-hook.jsFile · 0.85

Calls 1

readFileMethod · 0.80

Tested by

no test coverage detected