Open History to see the last commit
1import { spawn } from "node:child_process";
2import { existsSync } from "node:fs";
3const entry = new URL(
4 "../.tools/neon-pkgs/packages/cli/dist/cli.js",
5 import.meta.url,
6);
7if (!existsSync(entry))
8 throw new Error("Build the pinned Neon toolchain first; see README.md.");
9const child = spawn(
10 process.execPath,
11 [
12 entry.pathname,
13 ...process.argv.slice(2),
14 "--profile",
15 "staging",
16 "--api-host",
17 "https://console-stage.neon.build/api/v2",
18 "--no-analytics",
19 ],
20 {
21 stdio: "inherit",
22 env: {
23 ...process.env,
24 NEON_API_HOST: "https://console-stage.neon.build/api/v2",
25 NEON_OAUTH_HOST: "https://oauth2-stage.neon.build",
26 NEON_PROFILE: "staging",
27 },
28 },
29);
30child.on("exit", (code) => process.exit(code ?? 1));