@abyssinia-labs/sokie 0.5.0-staging.127 → 0.5.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/sokie.mjs +50 -12
  2. package/package.json +2 -2
package/dist/sokie.mjs CHANGED
@@ -24033,9 +24033,9 @@ var require___dev__ = __commonJS((exports, module) => {
24033
24033
 
24034
24034
  // package.json
24035
24035
  var name = "@abyssinia-labs/sokie";
24036
- var version = "0.5.0-staging.127";
24036
+ var version = "0.5.0";
24037
24037
  var sokie = {
24038
- site: "https://staging.sokie.sh"
24038
+ site: "https://sokie.sh"
24039
24039
  };
24040
24040
 
24041
24041
  // src/command.ts
@@ -64251,7 +64251,8 @@ var SGR = {
64251
64251
  warn: [33, 39],
64252
64252
  fail: [31, 39],
64253
64253
  dim: [90, 39],
64254
- strong: [1, 22]
64254
+ strong: [1, 22],
64255
+ link: [36, 39]
64255
64256
  };
64256
64257
  function colorFor(stream, env = process.env) {
64257
64258
  if (env.NO_COLOR !== undefined && env.NO_COLOR !== "")
@@ -65936,6 +65937,7 @@ import { stdin as stdin4 } from "node:process";
65936
65937
  // src/domains-api.ts
65937
65938
  var query2 = (name3) => makeFunctionReference(name3);
65938
65939
  var mutation2 = (name3) => makeFunctionReference(name3);
65940
+ var action2 = (name3) => makeFunctionReference(name3);
65939
65941
  var domainFn = {
65940
65942
  workspace: query2("domains:workspace"),
65941
65943
  hostnames: query2("domains:hostnames"),
@@ -65945,7 +65947,9 @@ var domainFn = {
65945
65947
  forServer: query2("serverDomains:forServer"),
65946
65948
  addExact: mutation2("serverDomains:addExact"),
65947
65949
  removeExact: mutation2("serverDomains:removeExact"),
65948
- checkServer: mutation2("serverDomains:checkNow")
65950
+ checkServer: mutation2("serverDomains:checkNow"),
65951
+ dnsForWorkspace: action2("domainProviders:forWorkspace"),
65952
+ dnsForServer: action2("domainProviders:forServer")
65949
65953
  };
65950
65954
 
65951
65955
  // src/domains.ts
@@ -66046,6 +66050,35 @@ async function checkDomains(out, client, server) {
66046
66050
  return EXIT.ok;
66047
66051
  }
66048
66052
 
66053
+ // src/domains-host.ts
66054
+ async function dnsHelp(client, serverId) {
66055
+ try {
66056
+ return serverId ? await client.action(domainFn.dnsForServer, { serverId }) : await client.action(domainFn.dnsForWorkspace, {});
66057
+ } catch {
66058
+ return null;
66059
+ }
66060
+ }
66061
+ function stepLine(out, step) {
66062
+ return step.split("`").map((part, at2) => out.tint(at2 % 2 === 1 ? "strong" : "dim", part)).join("");
66063
+ }
66064
+ async function dnsHelpLines(out, help) {
66065
+ if (!help) {
66066
+ await out.line("At Cloudflare, leave the CNAME DNS only.", "dim");
66067
+ return;
66068
+ }
66069
+ const { provider, connect } = help;
66070
+ await out.line(provider ? `Your DNS is at ${out.tint("strong", provider.name)}.` : "Sokie couldn't tell who runs this domain's DNS.");
66071
+ if (provider?.url) {
66072
+ await out.line(` ${out.tint("dim", "Its DNS settings:")} ${out.tint("link", provider.url)}`);
66073
+ }
66074
+ for (const step of help.steps)
66075
+ await out.line(` ${out.tint("dim", "·")} ${stepLine(out, step)}`);
66076
+ if (connect) {
66077
+ const lead = out.tint("ok", `Or add both at ${connect.provider} in one step:`);
66078
+ await out.line(`${lead} ${out.tint("link", connect.url)}`);
66079
+ }
66080
+ }
66081
+
66049
66082
  // src/domains-add.ts
66050
66083
  var POLL_MS2 = 5000;
66051
66084
  var WAIT_MS2 = 30 * 60000;
@@ -66124,27 +66157,32 @@ async function addDomain(out, client, domain2, options, deps) {
66124
66157
  for (const line of recordLines(added2.records))
66125
66158
  await out.line(line);
66126
66159
  await out.line();
66160
+ const dns2 = await dnsHelp(client, null);
66161
+ await dnsHelpLines(out, dns2);
66127
66162
  if (!wait) {
66128
- await out.line("At Cloudflare, leave the CNAME DNS only. Sokie checks every minute.", "dim");
66129
- await out.result({ ok: true, domain: added2 });
66163
+ await out.line("Sokie checks every minute.", "dim");
66164
+ await out.result({ ok: true, domain: added2, dns: dns2 });
66130
66165
  return EXIT.ok;
66131
66166
  }
66132
- await out.line("At Cloudflare, leave the CNAME DNS only. Waiting for both (Ctrl+C stops waiting; Sokie keeps checking)…", "dim");
66167
+ await out.line("Waiting for both (Ctrl+C stops waiting; Sokie keeps checking)…", "dim");
66133
66168
  const names = await followWorkspace(out, client, deps);
66134
- await out.result({ ok: true, domain: added2, ...names ? { hostnames: names } : {} });
66169
+ await out.result({ ok: true, domain: added2, dns: dns2, ...names ? { hostnames: names } : {} });
66135
66170
  return EXIT.ok;
66136
66171
  }
66137
66172
  const added = await client.mutation(domainFn.addExact, { serverId: server.serverId, domain: domain2 });
66173
+ let dns = null;
66138
66174
  if (added.records) {
66139
66175
  await out.line(`An exact domain for ${server.slug}. Add these records:`, "strong");
66140
66176
  for (const line of recordLines(added.records))
66141
66177
  await out.line(line);
66142
- await out.line("The TXT proves the domain is yours. At Cloudflare, leave the CNAME DNS only.", "dim");
66178
+ await out.line("The TXT proves the domain is yours.", "dim");
66179
+ dns = await dnsHelp(client, server.serverId);
66180
+ await dnsHelpLines(out, dns);
66143
66181
  } else {
66144
66182
  await out.line(`${added.hostname} is under your workspace domain: nothing to add.`, "strong");
66145
66183
  }
66146
66184
  const live = wait ? await followExact(out, client, server, deps) : null;
66147
- await out.result({ ok: true, server: server.slug, hostname: live ?? added });
66185
+ await out.result({ ok: true, server: server.slug, hostname: live ?? added, dns });
66148
66186
  return EXIT.ok;
66149
66187
  } catch (error62) {
66150
66188
  const failure = refused3(out, error62);
@@ -66900,11 +66938,11 @@ var PRESETS = {
66900
66938
  };
66901
66939
  var query3 = (name3) => makeFunctionReference(name3);
66902
66940
  var mutation3 = (name3) => makeFunctionReference(name3);
66903
- var action2 = (name3) => makeFunctionReference(name3);
66941
+ var action3 = (name3) => makeFunctionReference(name3);
66904
66942
  var keyFn = {
66905
66943
  mine: query3("apiKeys:mine"),
66906
66944
  current: query3("apiKeys:current"),
66907
- create: action2("apiKeys:create"),
66945
+ create: action3("apiKeys:create"),
66908
66946
  revoke: mutation3("apiKeys:revoke")
66909
66947
  };
66910
66948
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@abyssinia-labs/sokie",
3
3
  "type": "module",
4
- "version": "0.5.0-staging.127",
4
+ "version": "0.5.0",
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://staging.sokie.sh"
13
+ "site": "https://sokie.sh"
14
14
  },
15
15
  "keywords": [
16
16
  "mcp",