MCPcopy Create free account
hub / github.com/expo/eas-cli / hashFiles

Method hashFiles

packages/steps/src/BuildStepContext.ts:194–216  ·  view source on GitHub ↗
(...patterns: string[])

Source from the content-addressed store, hash-verified

192 }
193
194 public hashFiles(...patterns: string[]): string {
195 const cwd = this.defaultWorkingDirectory;
196 const workspacePath = path.resolve(cwd);
197
198 // Use glob to find matching files across all patterns
199 const filePaths = fg.sync(patterns, {
200 cwd,
201 absolute: true,
202 onlyFiles: true,
203 });
204
205 if (filePaths.length === 0) {
206 return '';
207 }
208
209 const validFilePaths = filePaths.filter(file => file.startsWith(`${workspacePath}${path.sep}`));
210
211 if (validFilePaths.length === 0) {
212 return '';
213 }
214
215 return hashFiles(validFilePaths);
216 }
217
218 public serialize(): SerializedBuildStepGlobalContext {
219 return {

Callers 2

Calls 1

hashFilesFunction · 0.90

Tested by

no test coverage detected