@abyssinia-labs/sokie 0.13.0 → 0.13.2-staging.505

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/sokie.mjs +29 -18
  2. package/package.json +2 -2
package/dist/sokie.mjs CHANGED
@@ -25685,9 +25685,9 @@ var require_jmespath_umd = __commonJS((exports, module) => {
25685
25685
 
25686
25686
  // package.json
25687
25687
  var name = "@abyssinia-labs/sokie";
25688
- var version = "0.13.0";
25688
+ var version = "0.13.2-staging.505";
25689
25689
  var sokie = {
25690
- site: "https://sokie.sh"
25690
+ site: "https://staging.sokie.sh"
25691
25691
  };
25692
25692
 
25693
25693
  // src/command.ts
@@ -75869,12 +75869,13 @@ GraphQL schema says neither, so it needs both.`,
75869
75869
  };
75870
75870
 
75871
75871
  // src/commands/keys.ts
75872
- import { stdin as stdin6 } from "node:process";
75872
+ import { stdin as stdin6, stdout as stdout2 } from "node:process";
75873
75873
 
75874
75874
  // src/keys-api.ts
75875
75875
  var API_SCOPES = [
75876
75876
  "servers:read",
75877
75877
  "servers:write",
75878
+ "servers:delete",
75878
75879
  "deploys:read",
75879
75880
  "deploys:write",
75880
75881
  "tools:read",
@@ -76047,12 +76048,18 @@ async function runKeys(argv, out, deps) {
76047
76048
  }), deps.stepUp);
76048
76049
  const where2 = servers.length > 0 ? servers.map((server) => server.name).join(", ") : "all servers";
76049
76050
  const until = days2 === null ? "never expires" : `expires ${formatDate(now + days2 * 86400000)}`;
76050
- await out.line(`Made "${name3}". Copy it now; it isn't shown again:`, "strong");
76051
- await out.line();
76052
- await out.line(` ${made.key}`);
76053
- await out.line();
76054
- await out.line(`${scopes.join(" ")} · ${where2} · ${until}`, "dim");
76055
- await out.line("Set SOKIE_TOKEN to it, and every sokie command runs as the key.", "dim");
76051
+ const summary = `${scopes.join(" ")} · ${where2} · ${until}`;
76052
+ if (!out.json && (deps.piped ?? stdout2.isTTY !== true)) {
76053
+ await out.problem(`Made "${name3}": ${summary}`, "dim");
76054
+ await out.line(made.key);
76055
+ } else {
76056
+ await out.line(`Made "${name3}". Copy it now; it isn't shown again:`, "strong");
76057
+ await out.line();
76058
+ await out.line(` ${made.key}`);
76059
+ await out.line();
76060
+ await out.line(summary, "dim");
76061
+ await out.line("Set SOKIE_TOKEN to it, and every sokie command runs as the key.", "dim");
76062
+ }
76056
76063
  await out.result({
76057
76064
  ok: true,
76058
76065
  keyId: made.keyId,
@@ -76109,7 +76116,8 @@ var keysCommand = {
76109
76116
  help: `With no verb, lists your API keys: what each may do, where, and when it expires.
76110
76117
 
76111
76118
  create <name>
76112
- Makes a key and prints it once. It acts as you, with only what you give it:
76119
+ Makes a key and prints it once; into a pipe or a file, the key alone. It
76120
+ acts as you, with only what you give it:
76113
76121
  --from <p> Start from read, ci (deploy, read logs), agent (read, edit and
76114
76122
  call tools) or all.
76115
76123
  --scope <s> Scopes to add, comma-separated: servers:read, deploys:write, …
@@ -76279,7 +76287,10 @@ function startCallbackServer() {
76279
76287
  };
76280
76288
  });
76281
76289
  },
76282
- close: () => server.close()
76290
+ close: () => {
76291
+ server.close();
76292
+ server.closeAllConnections();
76293
+ }
76283
76294
  });
76284
76295
  });
76285
76296
  });
@@ -80129,21 +80140,21 @@ function ignoreClosedPipe(stream) {
80129
80140
  throw error63;
80130
80141
  });
80131
80142
  }
80132
- function createOutput(json3, stdout2 = process.stdout, stderr2 = process.stderr) {
80133
- ignoreClosedPipe(stdout2);
80143
+ function createOutput(json3, stdout3 = process.stdout, stderr2 = process.stderr) {
80144
+ ignoreClosedPipe(stdout3);
80134
80145
  ignoreClosedPipe(stderr2);
80135
- const outColor = !json3 && colorFor(stdout2);
80146
+ const outColor = !json3 && colorFor(stdout3);
80136
80147
  const errColor = !json3 && colorFor(stderr2);
80137
80148
  return {
80138
80149
  json: json3,
80139
- line: (text11 = "", tone) => json3 ? Promise.resolve() : writeAll(stdout2, `${paint(outColor, tone, text11)}
80150
+ line: (text11 = "", tone) => json3 ? Promise.resolve() : writeAll(stdout3, `${paint(outColor, tone, text11)}
80140
80151
  `),
80141
80152
  problem: (text11, tone) => json3 ? Promise.resolve() : writeAll(stderr2, `${paint(errColor, tone, text11)}
80142
80153
  `),
80143
80154
  tint: (tone, text11) => paint(outColor, tone, text11),
80144
- result: (value2) => json3 ? writeAll(stdout2, `${JSON.stringify(value2, null, 2)}
80155
+ result: (value2) => json3 ? writeAll(stdout3, `${JSON.stringify(value2, null, 2)}
80145
80156
  `) : Promise.resolve(),
80146
- event: (value2) => json3 ? writeAll(stdout2, `${JSON.stringify(value2)}
80157
+ event: (value2) => json3 ? writeAll(stdout3, `${JSON.stringify(value2)}
80147
80158
  `) : Promise.resolve(),
80148
80159
  aside: (value2) => json3 ? writeAll(stderr2, `${JSON.stringify(value2)}
80149
80160
  `) : Promise.resolve()
@@ -80179,7 +80190,7 @@ function shellAbove(ppid, table) {
80179
80190
  }
80180
80191
  function processTable() {
80181
80192
  return new Promise((resolve22, reject) => {
80182
- execFile("ps", ["-A", "-o", "pid=,ppid=,comm="], { timeout: 300 }, (error63, stdout2) => error63 ? reject(error63) : resolve22(stdout2));
80193
+ execFile("ps", ["-A", "-o", "pid=,ppid=,comm="], { timeout: 300 }, (error63, stdout3) => error63 ? reject(error63) : resolve22(stdout3));
80183
80194
  });
80184
80195
  }
80185
80196
  async function terminalSession(runner, ppid = process.ppid, table = processTable) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abyssinia-labs/sokie",
3
3
  "type": "module",
4
- "version": "0.13.0",
4
+ "version": "0.13.2-staging.505",
5
5
  "description": "Turn an OpenAPI or Swagger spec into an MCP server, run it on your machine, and deploy it to Sokie. The sokie command (alias sok).",
6
6
  "license": "Apache-2.0",
7
7
  "homepage": "https://sokie.sh/docs/cli",
@@ -10,7 +10,7 @@
10
10
  },
11
11
  "author": "Abyssinia Labs <hello@sokie.sh> (https://sokie.sh)",
12
12
  "sokie": {
13
- "site": "https://sokie.sh"
13
+ "site": "https://staging.sokie.sh"
14
14
  },
15
15
  "keywords": [
16
16
  "mcp",