@lizard-build/cli 0.3.35 → 0.3.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/updater.d.ts +1 -1
- package/dist/lib/updater.js +1 -1
- package/package.json +1 -1
- package/src/lib/updater.ts +1 -1
- package/test/cli.test.ts +11 -11
- package/test/unit/json.test.ts +3 -3
package/dist/lib/updater.d.ts
CHANGED
package/dist/lib/updater.js
CHANGED
|
@@ -3,7 +3,7 @@ import { pipeline } from "node:stream/promises";
|
|
|
3
3
|
import { Readable } from "node:stream";
|
|
4
4
|
import { tmpdir } from "node:os";
|
|
5
5
|
import { join } from "node:path";
|
|
6
|
-
export const CURRENT_VERSION = "0.3.
|
|
6
|
+
export const CURRENT_VERSION = "0.3.36";
|
|
7
7
|
const RELEASES_API = "https://api.github.com/repos/lizard-build/lizard-cli/releases/latest";
|
|
8
8
|
const RELEASE_BASE = "https://github.com/lizard-build/lizard-cli/releases/latest/download";
|
|
9
9
|
function getBinaryName() {
|
package/package.json
CHANGED
package/src/lib/updater.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
|
|
|
5
5
|
import { join } from "node:path";
|
|
6
6
|
import { execFileSync } from "node:child_process";
|
|
7
7
|
|
|
8
|
-
export const CURRENT_VERSION = "0.3.
|
|
8
|
+
export const CURRENT_VERSION = "0.3.36";
|
|
9
9
|
const RELEASES_API = "https://api.github.com/repos/lizard-build/lizard-cli/releases/latest";
|
|
10
10
|
const RELEASE_BASE = "https://github.com/lizard-build/lizard-cli/releases/latest/download";
|
|
11
11
|
|
package/test/cli.test.ts
CHANGED
|
@@ -116,19 +116,19 @@ beforeAll(async () => {
|
|
|
116
116
|
projectId = process.env.LIZARD_TEST_PROJECT_ID;
|
|
117
117
|
return;
|
|
118
118
|
}
|
|
119
|
-
//
|
|
120
|
-
|
|
121
|
-
const linked = Object.values(cfg.projects ?? {})[0];
|
|
122
|
-
if (linked?.projectId) {
|
|
123
|
-
projectId = linked.projectId;
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
// Last resort: pick any project the auth'd user can see.
|
|
119
|
+
// Fetch the canonical list so we don't trust stale entries in
|
|
120
|
+
// ~/.lizard/config.json that point at projects deleted on the server.
|
|
127
121
|
const projects = await cliJSON("project", "list");
|
|
128
122
|
if (!Array.isArray(projects) || projects.length === 0) {
|
|
129
123
|
throw new Error("No projects found — run `lizard init` first or set LIZARD_TEST_PROJECT_ID");
|
|
130
124
|
}
|
|
131
|
-
|
|
125
|
+
const liveIds = new Set(projects.map((p: any) => p.id));
|
|
126
|
+
// Prefer a cwd-linked project, but only if it still exists server-side.
|
|
127
|
+
const cfg = loadConfig();
|
|
128
|
+
const linked = Object.values(cfg.projects ?? {}).find(
|
|
129
|
+
(p: any) => p?.projectId && liveIds.has(p.projectId),
|
|
130
|
+
);
|
|
131
|
+
projectId = (linked as any)?.projectId ?? projects[0].id;
|
|
132
132
|
});
|
|
133
133
|
|
|
134
134
|
// ── Auth ──────────────────────────────────────────────────────────────────────
|
|
@@ -229,7 +229,7 @@ describe("project secrets", () => {
|
|
|
229
229
|
});
|
|
230
230
|
|
|
231
231
|
test("delete the key", async () => {
|
|
232
|
-
const { stdout } = await cli("secret", "delete", KEY, "--global", "--project", projectId);
|
|
232
|
+
const { stdout } = await cli("secret", "delete", KEY, "--global", "-y", "--project", projectId);
|
|
233
233
|
expect(stdout).toMatch(/deleted/i);
|
|
234
234
|
});
|
|
235
235
|
|
|
@@ -442,7 +442,7 @@ describe.skipIf(process.env.LIZARD_SKIP_DEPLOY === "1")("deploy", () => {
|
|
|
442
442
|
});
|
|
443
443
|
|
|
444
444
|
test("delete the key", async () => {
|
|
445
|
-
const { stdout } = await cliFrom(FIXTURE, "secret", "delete", KEY);
|
|
445
|
+
const { stdout } = await cliFrom(FIXTURE, "secret", "delete", KEY, "-y");
|
|
446
446
|
expect(stdout).toMatch(/deleted/i);
|
|
447
447
|
});
|
|
448
448
|
|
package/test/unit/json.test.ts
CHANGED
|
@@ -57,10 +57,10 @@ function parseJSON(s: string): any {
|
|
|
57
57
|
// assert the dump is complete and to drill into each subcommand's --help
|
|
58
58
|
// --json output.
|
|
59
59
|
const TOP_LEVEL_COMMANDS = [
|
|
60
|
-
"add", "config", "docs", "domain", "git", "init", "link", "
|
|
60
|
+
"add", "config", "docs", "domain", "git", "init", "link", "login",
|
|
61
61
|
"logout", "logs", "open", "port", "project", "ps", "redeploy", "regions",
|
|
62
|
-
"restart", "run", "scale", "secrets", "service", "
|
|
63
|
-
"up", "upgrade", "whoami", "workspace",
|
|
62
|
+
"restart", "run", "scale", "secrets", "service", "skills", "ssh", "status",
|
|
63
|
+
"unlink", "up", "upgrade", "whoami", "workspace",
|
|
64
64
|
];
|
|
65
65
|
|
|
66
66
|
// ── help dump ────────────────────────────────────────────────────────────────
|