@somewhere-cloud/cli 0.38.121 → 0.38.123
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 +9 -0
- package/README.md +14 -1
- package/bin/starter-test-imports.mjs +19 -0
- package/dist/lib/bundle.js +160 -92
- package/dist/lib/bundle.js.map +2 -2
- package/npm-shrinkwrap.json +3 -2541
- package/package.json +4 -28
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## 0.38.123
|
|
2
|
+
|
|
3
|
+
- Install only app packages and types when creating a starter. Keep the CLI version as a pin and add Vite or Playwright when needed.
|
|
4
|
+
- Accept names on cron update and cron delete.
|
|
5
|
+
|
|
6
|
+
## 0.38.122
|
|
7
|
+
|
|
8
|
+
- Ship a runtime-only npm lock so default installs fetch the bundled CLI without its build dependencies.
|
|
9
|
+
|
|
1
10
|
## 0.38.121
|
|
2
11
|
|
|
3
12
|
- Ship the same CLI as a readable JavaScript bundle with a source map and third-party notices.
|
package/README.md
CHANGED
|
@@ -29,7 +29,7 @@ installs `cli`, the name `npx @somewhere-cloud/cli` resolves to; use
|
|
|
29
29
|
|
|
30
30
|
The package ships an unminified `dist/lib/bundle.js`. Its module labels identify
|
|
31
31
|
the source files and npm packages. The adjacent source map maps back to the
|
|
32
|
-
published source commit and the dependencies in
|
|
32
|
+
published source commit and the dependencies in that commit’s build lock.
|
|
33
33
|
`NOTICE.third-party.txt` includes their licenses and notices. npm provenance
|
|
34
34
|
links the exact tarball to the build.
|
|
35
35
|
|
|
@@ -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
|
+
});
|