MCPcopy Index your code
hub / github.com/AI45Lab/Code / loadConfig

Function loadConfig

sdk/node/examples/basic/test_generate_object.ts:24–36  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

22// ============================================================================
23
24function loadConfig(): string {
25 const candidates = [
26 path.resolve(__dirname, '../../../../../../.a3s/config.acl'),
27 path.resolve(__dirname, '../../../../../.a3s/config.acl'),
28 path.resolve(__dirname, '../../../../.a3s/config.acl'),
29 ];
30 for (const p of candidates) {
31 if (fs.existsSync(p)) {
32 return fs.readFileSync(p, 'utf-8');
33 }
34 }
35 throw new Error(`.a3s/config.acl not found. Tried: ${candidates.join(', ')}`);
36}
37
38// ============================================================================
39// Test runner

Callers 1

mainFunction · 0.85

Calls 1

resolveMethod · 0.80

Tested by

no test coverage detected