@kryd/cli 0.13.0 → 0.14.0

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.
Files changed (2) hide show
  1. package/dist/index.js +2 -31
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -14963,25 +14963,6 @@ async function parseEnvelope(res) {
14963
14963
  return void 0;
14964
14964
  }
14965
14965
  }
14966
- async function login(apiUrl, creds) {
14967
- const res = await fetch(`${apiUrl}/api/auth/sign-in/email`, {
14968
- method: "POST",
14969
- headers: { "content-type": "application/json", origin: apiUrl },
14970
- body: JSON.stringify(creds)
14971
- });
14972
- if (!res.ok) {
14973
- throw new ApiError(
14974
- `Login failed (${res.status})`,
14975
- await parseEnvelope(res),
14976
- res.status
14977
- );
14978
- }
14979
- const token = res.headers.get("set-auth-token");
14980
- if (!token) {
14981
- throw new ApiError("Login succeeded but the API returned no token.");
14982
- }
14983
- return token;
14984
- }
14985
14966
  async function whoami(apiUrl, token) {
14986
14967
  const res = await fetch(`${apiUrl}/me`, {
14987
14968
  headers: { authorization: `Bearer ${token}` }
@@ -17681,16 +17662,6 @@ async function runLogin(opts) {
17681
17662
  process.stdout.write("Token saved.\n");
17682
17663
  return;
17683
17664
  }
17684
- if (opts.email && opts.password) {
17685
- const token2 = await login(apiUrl, { email: opts.email, password: opts.password });
17686
- saveToken(token2, apiUrl);
17687
- process.stdout.write(`Logged in as ${opts.email}.
17688
- `);
17689
- return;
17690
- }
17691
- if (opts.email || opts.password) {
17692
- throw new Error("Provide BOTH --email and --password, or omit them to log in via the browser.");
17693
- }
17694
17665
  const { token, apiUrl: learnedApiUrl } = await browserLogin(resolveDashboardUrl(opts.dashboardUrl));
17695
17666
  saveToken(token, learnedApiUrl ?? apiUrl);
17696
17667
  process.stdout.write("Logged in.\n");
@@ -19823,13 +19794,13 @@ Run \`kryd env list\` to see what is set. (If you meant the runtime variable of
19823
19794
  await reportError(err);
19824
19795
  }
19825
19796
  }
19826
- var CLI_VERSION = true ? "0.13.0" : "0.0.0-dev";
19797
+ var CLI_VERSION = true ? "0.14.0" : "0.0.0-dev";
19827
19798
  var program = new Command();
19828
19799
  program.name("kryd").description("Kryd CLI").version(CLI_VERSION);
19829
19800
  program.hook("postAction", async () => {
19830
19801
  await backfillLinkAccount();
19831
19802
  });
19832
- program.command("login").description("Sign in via the browser (default) and store a token").option("--email <email>", "account email (with --password; non-interactive escape hatch)").option("--password <password>", "account password (with --email; visible in `ps` \u2014 prefer the browser flow)").option(
19803
+ program.command("login").description("Sign in via the browser (default) and store a token").option(
19833
19804
  "--token <token>",
19834
19805
  "supply a token instead of the browser flow (prefer $KRYD_TOKEN \u2014 flags are visible in `ps`)"
19835
19806
  ).option("--api-url <url>", "control-plane API base URL").option("--dashboard-url <url>", "dashboard base URL for the browser approve page (default app.kryd.eu)").action((opts) => runLogin(opts));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kryd/cli",
3
- "version": "0.13.0",
3
+ "version": "0.14.0",
4
4
  "description": "Kryd CLI — git push → live on the European cloud for your AI: SSL, managed Postgres & object storage, and an EU-hosted AI gateway. Your code and model calls stay in the EU. Beta: sign up at https://kryd.eu/beta",
5
5
  "keywords": [
6
6
  "kryd",
@@ -41,9 +41,9 @@
41
41
  "tsx": "^4.19.2",
42
42
  "typescript": "^5.6.3",
43
43
  "vitest": "^2.1.8",
44
- "@kryd/shared-types": "0.0.0",
45
44
  "@kryd/config-eslint": "0.0.0",
46
- "@kryd/config-ts": "0.0.0"
45
+ "@kryd/config-ts": "0.0.0",
46
+ "@kryd/shared-types": "0.0.0"
47
47
  },
48
48
  "scripts": {
49
49
  "build": "esbuild src/index.ts --bundle --platform=node --format=esm --external:commander --define:__KRYD_VERSION__=\\\"$npm_package_version\\\" --outfile=dist/index.js",