MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / unixFixtureCommand

Function unixFixtureCommand

e2e/cli/custom-tools-packed.test.ts:110–130  ·  view source on GitHub ↗
(path: string)

Source from the content-addressed store, hash-verified

108`;
109
110const unixFixtureCommand = (path: string): string => `
111set -eu
112rm -rf '${path}'
113mkdir -p '${path}/tools'
114cat >'${path}/tools/greet.ts' <<'EOF'
115${"import"} { z } from "zod";
116${"import"} { defineTool } from "executor:app";
117
118const Input = z.object({ name: z.string() });
119
120export default defineTool({
121 description: "Greet",
122 input: Input,
123 async handler(input) {
124 return { greeting: "hello " + input.name };
125 },
126});
127EOF
128printf '%s' '{"name":"packed-apps-smoke","dependencies":{"zod":"4.3.6"}}' >'${path}/package.json'
129: >'${path}/bun.lock'
130`;
131
132const writeFixture = async (path: string): Promise<void> => {
133 const result = await ssh(

Callers 1

writeFixtureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected