@somewhere-cloud/cli 0.38.122 → 0.38.124

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,3 +1,14 @@
1
+ ## 0.38.124
2
+
3
+ - Keep the name from signed-out init when creating the temporary project.
4
+ - Show temporary deploy expiry only when it can be established from the server's expiry.
5
+ - Save temporary projects during device login and follow the server's approval-code lifetime.
6
+
7
+ ## 0.38.123
8
+
9
+ - Install only app packages and types when creating a starter. Keep the CLI version as a pin and add Vite or Playwright when needed.
10
+ - Accept names on cron update and cron delete.
11
+
1
12
  ## 0.38.122
2
13
 
3
14
  - Ship a runtime-only npm lock so default installs fetch the bundled CLI without its build dependencies.
package/README.md CHANGED
@@ -60,6 +60,19 @@ somewhere logs --follow # Stream logs
60
60
  somewhere open # Open in browser
61
61
  ```
62
62
 
63
+ New starters record the CLI version in `package.json` under
64
+ `somewhere.cli_version`. Use `somewhere` or `npx -y @somewhere-cloud/cli` in
65
+ the project. The pinned version runs from npm’s cache when needed. `somewhere
66
+ upgrade` moves the pin. Type checking uses the pinned compiler through npm
67
+ when no compiler is installed in the project.
68
+
69
+ `init` installs the SDK and editor types. Both starters declare React for the
70
+ platform build. To install React and Vite locally, use
71
+ `npm install --include=optional -D --save-exact vite@7.2.2`
72
+ for `somewhere dev` and `npm install -D --save-exact @playwright/test@1.65.0`
73
+ for browser tests. `somewhere test` supplies its own helpers to the test files.
74
+ `init --template bare` is the same as `init --bare` and installs no dependencies.
75
+
63
76
  The CLI needs no MCP setup: every command works from the shell, and `somewhere run <script>` executes code against your live project. `somewhere init` keeps AGENTS.md and useful skills, but does not install agent hooks or command-running MCP configuration. Existing agent settings stay unchanged. Run `somewhere typecheck`, `somewhere typecheck --deploy`, or `somewhere typecheck --deploy --watch` explicitly when you want local checks. Use `somewhere mcp install <host>` when you explicitly want MCP tools connected to an agent host.
64
77
 
65
78
  For optional after-edit checking, explicitly run `somewhere hooks install --host claude-code` (or `--host codex` / `--host cursor`). It installs only the requested project-local deploy-reference typecheck hook, not MCP registration. Follow the reported host trust step. Shell writes do not trigger the hook; run `somewhere typecheck` after edits, or start `somewhere typecheck --deploy --watch`.
@@ -0,0 +1,19 @@
1
+ import { registerHooks } from 'node:module';
2
+
3
+ const helpers = new Map([
4
+ ['@somewhere-cloud/cli/script', new URL('../dist/script.js', import.meta.url).href],
5
+ ['@somewhere-cloud/cli/testing', new URL('../dist/testing.js', import.meta.url).href],
6
+ ]);
7
+ registerHooks({
8
+ resolve(specifier, context, nextResolve) {
9
+ const url = helpers.get(specifier);
10
+ if (!url) return nextResolve(specifier, context);
11
+ try {
12
+ return nextResolve(specifier, context);
13
+ } catch (error) {
14
+ // Prefer an explicitly installed package and preserve its other errors.
15
+ if (error?.code !== 'ERR_MODULE_NOT_FOUND' && error?.code !== 'MODULE_NOT_FOUND') throw error;
16
+ return { url, format: 'module', shortCircuit: true };
17
+ }
18
+ },
19
+ });