Versions 155 to 156
Lines 5–13 at 156 (were 5–11 at 155)
55// - in a joined folder, --server naming the folder's own server reaches it; another server is refused, never
66// swapped in, and nothing is sent; outside a joined folder a folder command with --server is refused too;
77// - an explicit --server goes to that server's own Issues Worker, which ABSO_ISSUES_SERVER doesn't redirect;
8−// - a command that picks its server (whoami, box, logout) uses the one named, even inside a folder on another.
8+// - a command that picks its server (whoami, box, logout) uses the one named, even inside a folder on another;
9+// - with nothing named (abso-core issue 9) the server is the joined folder's, else ABSO_SERVER, else prod, whatever
10+// this box is signed in to (doctor.test.ts has whoami with staging alone and with staging and prod both).
911
Lines 18–24 at 156 (were 16–22 at 155)
19−import { sameServer, serverHelp, serverUse } from "../src/server-choice.ts";
21+import { chooseServer, PROD_SERVER, SERVER_ORDER, sameServer, serverHelp, serverUse } from "../src/server-choice.ts";
2022
Lines 218–267 at 156 (were 216–218 at 155)
221+
224+
230+ assert.equal(chooseServer(undefined, outside, { ABSO_SERVER: STAGING }), STAGING, "the environment");
231+ assert.equal(chooseServer(undefined, outside, { AVCS_SERVER: STAGING }), STAGING, "its older name");
233+ assert.equal(chooseServer(undefined, staging, { ABSO_SERVER: "https://env.example" }), STAGING, "folder first");
234+ assert.equal(chooseServer(PROD_SERVER, staging, { ABSO_SERVER: STAGING }), PROD_SERVER, "explicit prod");
241+
245+ "--server <url>, else the server of the abso folder you're in, else ABSO_SERVER, else prod (https://api.abso.dev)",
247+ for (const name of ["join", "init", "login", "whoami", "doctor", "box", "logout", "orgs", "org"])
251+
252+ it("a joined folder's commands go to its server with nothing named, and ABSO_SERVER doesn't move them", async () => {
259+
260+ it("whoami in a joined folder looks at the folder's server, and another named there is used as given", async () => {
- MCP
- compare on this site's /mcp
- CLI
- abso diff 155 156 client/test/server-flag.test.ts --json
- JSON
- /christopher/abso-core/compare/155..156?file=client%2Ftest%2Fserver-flag.test.ts&format=json