MCPcopy Index your code
hub / github.com/coder/mux / writeWorkflowFile

Function writeWorkflowFile

src/node/services/workflows/workflowScriptResolver.test.ts:18–27  ·  view source on GitHub ↗
(
  root: string,
  relativePath: string,
  source = "export default function workflow() {}"
)

Source from the content-addressed store, hash-verified

16import { resolveWorkflowScript } from "./workflowScriptResolver";
17
18async function writeWorkflowFile(
19 root: string,
20 relativePath: string,
21 source = "export default function workflow() {}"
22) {
23 const target = path.join(root, relativePath);
24 await fs.mkdir(path.dirname(target), { recursive: true });
25 await fs.writeFile(target, source, "utf-8");
26 return target;
27}
28
29describe("resolveWorkflowScript", () => {
30 test("resolves a trusted project skill workflow by explicit skill path", async () => {

Callers 1

Calls 1

writeFileMethod · 0.65

Tested by

no test coverage detected