diff --git a/apps/dashboard/src/lib/remote-development-environment/config-file.test.ts b/apps/dashboard/src/lib/remote-development-environment/config-file.test.ts index f94f164f4..450bc534d 100644 --- a/apps/dashboard/src/lib/remote-development-environment/config-file.test.ts +++ b/apps/dashboard/src/lib/remote-development-environment/config-file.test.ts @@ -24,7 +24,7 @@ afterEach(() => { describe("remote development environment config file", () => { it("loads config exports wrapped in defineStackConfig", async () => { const configPath = writeTempConfig(` - import { defineStackConfig } from "@stackframe/stack-shared/config"; + import { defineStackConfig } from "@hexclave/shared/config"; export const config = defineStackConfig({ auth: { @@ -49,7 +49,7 @@ describe("remote development environment config file", () => { it("loads config exports wrapped in defineHexclaveConfig", async () => { const configPath = writeTempConfig(` - import { defineHexclaveConfig } from "@stackframe/stack-shared/config"; + import { defineHexclaveConfig } from "@hexclave/shared/config"; export const config = defineHexclaveConfig({ auth: { @@ -182,7 +182,7 @@ describe("remote development environment config file", () => { }); expect(readFileSync(configPath, "utf-8")).toMatchInlineSnapshot(` - "import type { StackConfig } from "@stackframe/js"; + "import type { StackConfig } from "@hexclave/js"; export const config: StackConfig = { "auth": { diff --git a/apps/e2e/tests/general/cli.test.ts b/apps/e2e/tests/general/cli.test.ts index 1e34adf1c..cb2f59ae0 100644 --- a/apps/e2e/tests/general/cli.test.ts +++ b/apps/e2e/tests/general/cli.test.ts @@ -10,7 +10,6 @@ import { it, niceFetch, STACK_BACKEND_BASE_URL, STACK_INTERNAL_PROJECT_CLIENT_KE const isLocalEmulator = process.env.NEXT_PUBLIC_STACK_IS_LOCAL_EMULATOR === "true"; const CLI_BIN = path.resolve("packages/stack-cli/dist/index.js"); -const CLI_SRC_BIN = path.resolve("packages/stack-cli/src/index.ts"); function extractConfigObjectString(content: string): string { const configMatch = content.match(/export const config:\s*StackConfig\s*=\s*(.+);\s*$/s); @@ -375,7 +374,7 @@ describe("Stack CLI", () => { }, ); expect(exitCode).toBe(1); - expect(stderr).toContain("Local emulator publishable client key not found"); + expect(stderr).toContain("Development environment publishable client key not found"); } finally { fs.rmSync(fakeEmulatorHome, { recursive: true }); } @@ -401,7 +400,7 @@ describe("Stack CLI", () => { }, ); expect(exitCode).toBe(1); - expect(stderr).toContain("Cannot reach local emulator"); + expect(stderr).toContain("Cannot reach development environment"); } finally { fs.rmSync(fakeEmulatorHome, { recursive: true }); } @@ -669,75 +668,6 @@ describe("Stack CLI", () => { }); }); -// Emulator CLI tests — no backend required, just validates help/arg parsing -describe("Stack CLI — Emulator", () => { - function runCliBare( - args: string[], - ): Promise<{ stdout: string, stderr: string, exitCode: number | null }> { - return new Promise((resolve) => { - execFile("node", [CLI_BIN, ...args], { - env: { PATH: process.env.PATH ?? "", HOME: process.env.HOME ?? "", CI: "1" }, - timeout: 15_000, - }, (error, stdout, stderr) => { - resolve({ - stdout: stdout.toString(), - stderr: stderr.toString(), - exitCode: error ? (error as any).code ?? 1 : 0, - }); - }); - }); - } - - function runCliBareFromSource( - args: string[], - ): Promise<{ stdout: string, stderr: string, exitCode: number | null }> { - return new Promise((resolve) => { - execFile("node", ["--import", "tsx", CLI_SRC_BIN, ...args], { - env: { PATH: process.env.PATH ?? "", HOME: process.env.HOME ?? "", CI: "1" }, - timeout: 15_000, - }, (error, stdout, stderr) => { - resolve({ - stdout: stdout.toString(), - stderr: stderr.toString(), - exitCode: error ? (error as any).code ?? 1 : 0, - }); - }); - }); - } - - it("emulator help shows subcommands", async ({ expect }) => { - const { stdout, exitCode } = await runCliBare(["emulator", "--help"]); - expect(exitCode).toBe(0); - expect(stdout).toContain("pull"); - expect(stdout).toContain("start"); - expect(stdout).toContain("stop"); - expect(stdout).toContain("reset"); - expect(stdout).toContain("status"); - expect(stdout).toContain("list-releases"); - }); - - it("emulator pull help shows options", async ({ expect }) => { - const { stdout, exitCode } = await runCliBare(["emulator", "pull", "--help"]); - expect(exitCode).toBe(0); - expect(stdout).toContain("--arch"); - expect(stdout).toContain("--branch"); - expect(stdout).toContain("--tag"); - expect(stdout).toContain("--repo"); - }); - - it("emulator pull rejects invalid arch values", async ({ expect }) => { - const { stderr, exitCode } = await runCliBareFromSource(["emulator", "pull", "--arch", "sparc"]); - expect(exitCode).toBe(1); - expect(stderr).toContain("Invalid architecture: sparc. Expected arm64 or amd64."); - }); - - it("emulator list-releases help shows repo option", async ({ expect }) => { - const { stdout, exitCode } = await runCliBare(["emulator", "list-releases", "--help"]); - expect(exitCode).toBe(0); - expect(stdout).toContain("--repo"); - }); -}); - // Doctor CLI tests — no backend required. Each test builds a fixture project // in a temp dir and runs `stack doctor --output-dir