Versions 16 to 17
Lines 6–15 at 17 (were 6–14 at 16)
66
9−import { dirname, join, resolve } from "node:path";
1111import { type MachineServers, machineServers, TOKEN_SERVERS, tokenGoesTo, trustedList } from "./core.ts";
1213
Lines 26–36 at 17 (were 25–37 at 16)
2728
28−export const AVCS_DIR = ".avcs";
29−
31− return join(root, AVCS_DIR, "config.json");
3332
34−/** The nearest folder at or above `start` that has .avcs/config.json, or undefined. */
33+/** The nearest folder at or above `start` that has .abso/config.json (or .avcs/config.json, from before the rename), or undefined. */
Lines 91–97 at 17 (were 92–98 at 16)
9392
95− return join(root, AVCS_DIR, "key");
9796
Lines 125–131 at 17 (were 126–132 at 16)
129− if (!server) throw new UsageError("this folder has no .avcs/config.json yet: give --server <url>");
128+ if (!server) throw new UsageError("this folder has no .abso/config.json yet: give --server <url>");
Lines 139–145 at 17 (were 140–146 at 16)
143− mkdirSync(join(root, AVCS_DIR), { recursive: true });
144143 writeFileSync(keyPath(root), `${JSON.stringify({ server, key: parsed.key, id: parsed.id })}\n`, { mode: 0o600 });
Lines 166–181 at 17 (were 167–182 at 16)
170− `this folder's server is ${server}, and abso sends your token only to ${[...TOKEN_SERVERS, "this machine"].join(", ")}, and the servers ~/.avcs/servers.json or AVCS_TRUSTED_SERVERS name. ` +
171− `If ${server} is yours, name it in ~/.avcs/servers.json or AVCS_TRUSTED_SERVERS (comma-separated); if you didn't set it, someone else wrote .avcs/config.json.`,
169+ `this folder's server is ${server}, and abso sends your token only to ${[...TOKEN_SERVERS, "this machine"].join(", ")}, and the servers ~/.abso/servers.json or AVCS_TRUSTED_SERVERS name. ` +
170+ `If ${server} is yours, name it in ~/.abso/servers.json or AVCS_TRUSTED_SERVERS (comma-separated); if you didn't set it, someone else wrote .abso/config.json.`,
174173
176−/** This machine's servers (core.ts machineServers), from ~/.avcs/servers.json, read once. AVCS_SERVERS_FILE names another file (tests). */
175+/** This machine's servers (core.ts machineServers), from ~/.abso/servers.json (or ~/.abso/servers.json), read once. AVCS_SERVERS_FILE names another file (tests). */
177176export function readMachineServers(env: Readonly<Record<string, string | undefined>> = process.env): MachineServers {
178177 if (env.AVCS_SERVERS_FILE !== undefined) return machineServers(readOr(env.AVCS_SERVERS_FILE));
179− machine ??= machineServers(readOr(join(homedir(), AVCS_DIR, "servers.json")));
Lines 191–208 at 17 (were 192–209 at 16)
194193
195−/** AVCS_TOKEN if set, else ~/.avcs/token, else none. */
196195export function readToken(env: Readonly<Record<string, string | undefined>> = process.env): string | undefined {
199− return readFileSync(join(homedir(), AVCS_DIR, "token"), "utf8").trim() || undefined;
204203
206− mkdirSync(join(root, AVCS_DIR), { recursive: true });
Lines 211–224 at 17 (were 212–224 at 16)
214213
215−/** If the folder is a git repo, keep .avcs/ out of it (in .git/info/exclude, so .gitignore isn't changed). */
214+/** If the folder is a git repo, keep its state folder (.abso/, or .avcs/ in an older folder) out of it (in .git/info/exclude, so .gitignore isn't changed). */
221− if (text.split(/\r?\n/).some((line) => line.trim() === ".avcs/" || line.trim() === "/.avcs/")) return;
221+ if (text.split(/\r?\n/).some((line) => line.trim() === name || line.trim() === `/${name}`)) return;
223− writeFileSync(exclude, `${text}${text === "" || text.endsWith("\n") ? "" : "\n"}/.avcs/\n`);
- MCP
- compare on this site's /mcp
- CLI
- abso diff 16 17 client/src/config.ts --json
- JSON
- /christopher/abso-core/compare/16..17?file=client%2Fsrc%2Fconfig.ts&format=json