Versions 85 to 86
new file, 318 lines
3+// - no Authorization header and no cookie go out, with a token in the environment and a box sign-in
10+
24+
29+
30+/** Every command a visitor folder refuses. A new command fails the allow-list test until it's here or a read. */
87+
101+
102+const json = (res: import("node:http").ServerResponse, status: number, body: unknown, headers = {}) =>
103+ res.writeHead(status, { "content-type": "application/json", ...headers }).end(JSON.stringify(body));
104+
124+ { error: `too many signed-out reads from this address: 120 a minute; sign in, or try again ${ESC}[2Jlater` },
143+
144+/** Runs the client as its own process, in `cwd`, with `home` as its home and only the environment given. */
166+
177+
179+ it("join --reader, signed out, to a public project writes only its config, from the command line", async () => {
191+
192+ it("sends no Authorization and no cookie, with a token set and a box sign-in present, and follows no redirect", async () => {
219+
220+ it("asks fetch for no redirect and no credentials, join's public check too (a fetch spy)", async () => {
230+ const out = await main(["status"], { cwd: root, env: { ABSO_TOKEN: TOKEN }, write: () => {} });
245+
246+ it("join answers a private project, a members-only one and a missing one alike, by the code alone", async () => {
250+ runs.push({ root, ...(await client(root, temp("home"), ["join", project, "--reader", "--server", url])) });
260+
261+ it("runs only its reads: every other command is refused before any call, and a new command fails here", async () => {
287+ assert.match(out.stderr, /This folder reads abso-core signed out\. To work on it: abso login/, argv.join(" "));
294+
306+
- MCP
- compare on this site's /mcp
- CLI
- abso diff 85 86 client/test/visitor.test.ts --json
- JSON
- /christopher/abso-core/compare/85..86?file=client%2Ftest%2Fvisitor.test.ts&format=json