MCPcopy Create free account
hub / github.com/adobe/react-spectrum / buildPath

Function buildPath

perf/build.mjs:21–26  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

19export const hash = text => createHash('sha256').update(text).digest('hex');
20
21export function buildPath(name) {
22 if (!/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/.test(name)) {
23 throw new Error('Build names must contain only letters, numbers, hyphens, or underscores.');
24 }
25 return path.join(local, 'builds', name);
26}
27
28async function filesIn(dir) {
29 let entries = await fs.readdir(dir, {withFileTypes: true});

Callers 4

serveFunction · 0.90
smokeFunction · 0.90
buildFunction · 0.85
loadBuildFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected