feat: fix NocoBase endpoint to justconn.top

This commit is contained in:
nac
2026-08-15 06:03:08 +00:00
parent 6129963256
commit c40e456d7c
12 changed files with 64 additions and 75 deletions
+9 -5
View File
@@ -9,7 +9,7 @@ import { VERSION } from "../src/version.js";
test("package, manifest, and runtime versions agree with no runtime npm dependencies", () => {
const packageJson = JSON.parse(readFileSync(new URL("../package.json", import.meta.url), "utf8"));
const manifest = JSON.parse(readFileSync(new URL("../install-manifest.json", import.meta.url), "utf8"));
assert.equal(VERSION, "0.3.0");
assert.equal(VERSION, "0.3.1");
assert.equal(packageJson.version, VERSION);
assert.equal(manifest.version, VERSION);
assert.deepEqual(packageJson.dependencies, undefined);
@@ -31,10 +31,7 @@ test("setup refuses a non-TTY before creating credential files", async () => {
const previous = process.env.NOCOBASE_MCP_CREDENTIALS;
process.env.NOCOBASE_MCP_CREDENTIALS = path;
try {
await assert.rejects(
runCli(["setup", "--api-base-url", "https://nb.example", "--json"]),
/local terminal/,
);
await assert.rejects(runCli(["setup", "--json"]), /local terminal/);
assert.equal(existsSync(path), false);
assert.equal(existsSync(join(directory, "config.json")), false);
} finally {
@@ -42,3 +39,10 @@ test("setup refuses a non-TTY before creating credential files", async () => {
else process.env.NOCOBASE_MCP_CREDENTIALS = previous;
}
});
test("setup rejects API endpoint overrides", async () => {
await assert.rejects(
runCli(["setup", "--api-base-url", "https://other.example"]),
/Unknown option: --api-base-url/,
);
});