@somewhere-cloud/cli 0.38.139 → 0.38.141

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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.38.141
4
+
5
+ - Typecheck keeps the compiler result and exit code when its advisory source scan fails, and reports the source failure in text and JSON.
6
+
7
+ ## 0.38.140
8
+
9
+ - Sign-in prints the Claude Code MCP install command when Somewhere is not configured.
10
+
3
11
  ## 0.38.139
4
12
 
5
13
  - `somewhere typecheck` now reports the same platform source warnings and fixes as `somewhere lint`, alongside TypeScript diagnostics.
6
14
  - CLI login leaves your agent's settings alone. When you sign in against another server, the CLI uses that server's instructions.
7
15
  - `somewhere run` and `somewhere run check` explain the single-file limit and flag relative imports when TypeScript is installed in the project.
8
- - The package installs the `somewhere` and `sw` commands.
16
+ - The package installs the `somewhere` and `sw` commands. Update scripts that invoke the removed `cli` executable to use `somewhere`.
9
17
  - Updated CLI dependencies, including the MCP SDK, HTTP client and archive tooling.
10
18
 
11
19
  ## 0.38.138
package/README.md CHANGED
@@ -60,6 +60,8 @@ somewhere logs --follow # Stream logs
60
60
  somewhere open # Open in browser
61
61
  ```
62
62
 
63
+ To use the Somewhere MCP tools in Claude Code, run `somewhere mcp install claude-code` after signing in. Reload Claude Code to make the tools available.
64
+
63
65
  New starters record the CLI version in `package.json` under
64
66
  `somewhere.cli_version`. Use `somewhere` or `npx -y @somewhere-cloud/cli` in
65
67
  the project. The pinned version runs from npm’s cache when needed. `somewhere
@@ -138,8 +140,7 @@ Short alias: `sw` works everywhere `somewhere` does.
138
140
  approve the code. Use `--browser-callback` for Google sign-in with a localhost
139
141
  callback. Credentials are saved in `~/.somewhere/config.json` with mode 600.
140
142
 
141
- MCP connections are optional: `somewhere mcp install <host>` configures the
142
- stdio bridge (`somewhere mcp`). The bridge reads the saved credentials when it
143
+ To connect Claude Code, run `somewhere mcp install claude-code`. The command registers the stdio bridge (`somewhere mcp`). The bridge reads the saved credentials when it
143
144
  starts. Refreshable credentials can renew automatically; if renewal fails,
144
145
  follow the reported sign-in instructions.
145
146
 
@@ -8756,17 +8756,21 @@ function saveGlobalMcpConfig() {
8756
8756
  config2.mcpServers = servers;
8757
8757
  writeFileSync(CLAUDE_CONFIG_PATH, JSON.stringify(config2, null, 2) + "\n");
8758
8758
  }
8759
- function hasGlobalMcpConfig() {
8760
- if (!existsSync(CLAUDE_CONFIG_PATH))
8761
- return false;
8759
+ function hasSomewhereMcpConfig(path3) {
8762
8760
  try {
8763
- const config2 = JSON.parse(readFileSync(CLAUDE_CONFIG_PATH, "utf-8"));
8761
+ const config2 = JSON.parse(readFileSync(path3, "utf-8"));
8764
8762
  const servers = config2.mcpServers;
8765
8763
  return !!servers?.somewhere;
8766
8764
  } catch {
8767
8765
  return false;
8768
8766
  }
8769
8767
  }
8768
+ function hasGlobalMcpConfig() {
8769
+ return hasSomewhereMcpConfig(CLAUDE_CONFIG_PATH);
8770
+ }
8771
+ function hasProjectMcpConfig(dir = process.cwd()) {
8772
+ return hasSomewhereMcpConfig(join(dir, ".mcp.json"));
8773
+ }
8770
8774
  function saveCursorMcpConfig() {
8771
8775
  let config2 = {};
8772
8776
  if (existsSync(CURSOR_MCP_PATH)) {
@@ -8841,7 +8845,9 @@ var init_config = __esm({
8841
8845
  __name(somewhereStdioEntry, "somewhereStdioEntry");
8842
8846
  __name(saveMcpConfig, "saveMcpConfig");
8843
8847
  __name(saveGlobalMcpConfig, "saveGlobalMcpConfig");
8848
+ __name(hasSomewhereMcpConfig, "hasSomewhereMcpConfig");
8844
8849
  __name(hasGlobalMcpConfig, "hasGlobalMcpConfig");
8850
+ __name(hasProjectMcpConfig, "hasProjectMcpConfig");
8845
8851
  CURSOR_DIR = join(homedir(), ".cursor");
8846
8852
  CURSOR_MCP_PATH = join(CURSOR_DIR, "mcp.json");
8847
8853
  __name(saveCursorMcpConfig, "saveCursorMcpConfig");
@@ -43372,6 +43378,9 @@ function registerAuthRoles(auth2) {
43372
43378
  }
43373
43379
  function printPostLoginNext() {
43374
43380
  console.log("");
43381
+ if (!hasGlobalMcpConfig() && !hasProjectMcpConfig()) {
43382
+ console.log("To connect Somewhere to Claude Code, run somewhere mcp install claude-code");
43383
+ }
43375
43384
  info(bold("Next"));
43376
43385
  const actions = nextActions({ stage: "login", linkedProject: Boolean(loadProjectConfig()) });
43377
43386
  for (const line of formatNextActions(actions, { command: teal, why: dim })) {
@@ -77948,12 +77957,18 @@ function registerTypecheck(program2) {
77948
77957
  const spinner = opts.json || refused || opts.watch ? null : ora("Typechecking (tsc --noEmit)...").start();
77949
77958
  const result2 = refused ?? await runTypecheck(dir);
77950
77959
  spinner?.stop();
77951
- const sourceLint = await lintProject(dir);
77960
+ const sourceLint = await lintProject(dir).catch((failure2) => ({
77961
+ ok: false,
77962
+ error: failure2 instanceof Error ? failure2.message : String(failure2)
77963
+ }));
77952
77964
  if (opts.json)
77953
77965
  printJson({ ...result2, sourceLint });
77954
77966
  else {
77955
77967
  reportTypecheck(result2);
77956
- printLintFindings(sourceLint);
77968
+ if ("error" in sourceLint)
77969
+ warn(`Source lint failed: ${sourceLint.error}`);
77970
+ else
77971
+ printLintFindings(sourceLint);
77957
77972
  }
77958
77973
  return result2;
77959
77974
  }, "check");