@devries-cameron20 / t3code-1 / commits / 1508552a16
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

test(server): the ACP registry's fake npm is a fixture file, not a generated string (#15483)

Signed-off-by: Yordis Prieto <yordis.prieto@gmail.com>

Yordis Prieto committed Oct 4, 2026 at 00:51 UTC 1508552a16edebe29cab4820c54c16b75c142408
2 files changed +25 -25
apps/server/src/provider/acp/AcpRegistrySupport.test.ts
+4 -25
@@ -78,32 +78,11 @@ const makeFakeNpmToolchain = Effect.fn("AcpRegistrySupport.test.makeFakeNpmToolc
78 yield* fileSystem.makeDirectory(toolchainBin, { recursive: true });
79 yield* fileSystem.makeDirectory(globalPrefix, { recursive: true });
80 yield* fileSystem.writeFileString(logPath, "");
81 - yield* fileSystem.writeFileString(
81 + yield* fileSystem.copyFile(
82 + yield* path.fromFileUrl(
83 + new URL("./testing/AcpRegistrySupport.npm.fixture.sh", import.meta.url),
84 + ),
85 npmPath,
83 - [
84 - "#!/bin/sh",
85 - 'printf \'%s\\n\' "$*" >> "$FAKE_NPM_LOG"',
86 - 'prefix="${npm_config_prefix:-$FAKE_NPM_PREFIX}"',
87 - 'if [ "$1" = "root" ] && [ "$2" = "--global" ]; then',
88 - " printf '%s\\n' \"$prefix/lib/node_modules\"",
89 - " exit 0",
90 - "fi",
91 - 'if [ "$1" = "prefix" ] && [ "$2" = "--global" ]; then',
92 - " printf '%s\\n' \"$prefix\"",
93 - " exit 0",
94 - "fi",
95 - 'if [ "$1" = "install" ] && [ "$2" = "--global" ]; then',
96 - ' package_root="$prefix/lib/node_modules/@example/acp"',
97 - ' executable="$prefix/bin/example-agent"',
98 - ' mkdir -p "$package_root" "$prefix/bin"',
99 - ' printf \'%s\' "$FAKE_NPM_MANIFEST" > "$package_root/package.json"',
100 - " printf '#!/bin/sh\\n' > \"$executable\"",
101 - ' chmod 755 "$executable"',
102 - " exit 0",
103 - "fi",
104 - "exit 64",
105 - "",
106 - ].join("\n"),
86 );
87 yield* fileSystem.chmod(npmPath, 0o755);
88 return {
apps/server/src/provider/acp/testing/AcpRegistrySupport.npm.fixture.sh new
+21
@@ -0,0 +1,21 @@
1 +#!/bin/sh
2 +printf '%s\n' "$*" >> "$FAKE_NPM_LOG"
3 +prefix="${npm_config_prefix:-$FAKE_NPM_PREFIX}"
4 +if [ "$1" = "root" ] && [ "$2" = "--global" ]; then
5 + printf '%s\n' "$prefix/lib/node_modules"
6 + exit 0
7 +fi
8 +if [ "$1" = "prefix" ] && [ "$2" = "--global" ]; then
9 + printf '%s\n' "$prefix"
10 + exit 0
11 +fi
12 +if [ "$1" = "install" ] && [ "$2" = "--global" ]; then
13 + package_root="$prefix/lib/node_modules/@example/acp"
14 + executable="$prefix/bin/example-agent"
15 + mkdir -p "$package_root" "$prefix/bin"
16 + printf '%s' "$FAKE_NPM_MANIFEST" > "$package_root/package.json"
17 + printf '#!/bin/sh\n' > "$executable"
18 + chmod 755 "$executable"
19 + exit 0
20 +fi
21 +exit 64