MCPcopy Create free account
hub / github.com/cortexkit/magic-context / writeProjectConfig

Function writeProjectConfig

packages/pi-plugin/src/config/index.test.ts:39–47  ·  view source on GitHub ↗
(
	cwd: string,
	text: string,
	extension: "jsonc" | "json" = "jsonc",
)

Source from the content-addressed store, hash-verified

37// XDG_CONFIG_HOME ?? <HOME>/.config (XDG_CONFIG_HOME is unset in
38// the test env, so it resolves under the temp HOME below).
39function writeProjectConfig(
40 cwd: string,
41 text: string,
42 extension: "jsonc" | "json" = "jsonc",
43): string {
44 const path = join(cwd, ".cortexkit", `magic-context.${extension}`);
45 writeConfig(path, text);
46 return path;
47}
48
49function writeUserConfig(
50 home: string,

Callers 1

index.test.tsFile · 0.70

Calls 1

writeConfigFunction · 0.70

Tested by

no test coverage detected