@somewhere-cloud/cli 0.38.148 → 0.38.150
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 +12 -7
- package/dist/lib/bundle.js +2556 -2213
- package/dist/lib/bundle.js.map +3 -3
- package/dist/types/lib/app-test.d.ts +7 -2
- package/dist/types/lib/test-identities.d.ts +5 -0
- package/dist/types/testing.d.ts +3 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/runtime/DECLARED-DATA-VENDOR.json +10 -9
- package/runtime/PLATFORM-SOURCE.json +1 -1
- package/runtime/declared-data.cjs +15 -4
- package/src/testing.ts +17 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.38.150
|
|
4
|
+
|
|
5
|
+
- `somewhere typecheck` now checks the source and functions sent to deploy, using the platform's TypeScript version, generated types and checker settings. Use `somewhere typecheck --project` for the full local project check.
|
|
6
|
+
- A server read with an empty `columns` array now has the same row type as a read that omits `columns`.
|
|
7
|
+
|
|
8
|
+
## 0.38.149
|
|
9
|
+
|
|
10
|
+
- The local browser and Playwright test fixtures wait for an app's SDK session check after navigation.
|
|
11
|
+
|
|
3
12
|
## 0.38.148
|
|
4
13
|
|
|
5
14
|
- `somewhere advisor` in a folder linked to an app, while signed in, sends the app's overview and its last deploy (after a failed deploy, the failure's file, line and message), read with your own sign-in, and says so in one line. `--no-context` sends the question alone.
|
package/README.md
CHANGED
|
@@ -71,8 +71,11 @@ when no compiler is installed in the project.
|
|
|
71
71
|
`init` installs React, the SDK, TypeScript, and editor types. For a local Vite server, use
|
|
72
72
|
`npm install -D --save-exact vite@7.2.2` for `somewhere dev`.
|
|
73
73
|
Save each journey you want re-checked after every deploy as `checks/<plain-name>.json`;
|
|
74
|
-
the platform runs them in its browser after each deploy
|
|
75
|
-
|
|
74
|
+
the platform runs them in its browser after each deploy, with nothing to install. Run `somewhere test`
|
|
75
|
+
for the latest result or add `--again` to start a fresh run. The last line is JSON
|
|
76
|
+
with `outcome` and `counts`. Exit codes are 0 for passed, 1 for a named failure,
|
|
77
|
+
and 2 for an incomplete check or cleanup. Warnings leave the exit status unchanged.
|
|
78
|
+
A Playwright script or spec runs locally with
|
|
76
79
|
`somewhere test <file>` after `npm install -D --save-exact @playwright/test@1.65.0`.
|
|
77
80
|
`init --template bare` is the same as `init --bare` and installs no dependencies.
|
|
78
81
|
|
|
@@ -110,7 +113,7 @@ For optional after-edit checking, explicitly run `somewhere hooks install --host
|
|
|
110
113
|
| `somewhere git status` | Show connected repo, commit, deploy status, logs link, and live URL |
|
|
111
114
|
| `somewhere git disconnect` | Stop push-to-deploy; the currently deployed site stays live |
|
|
112
115
|
| `somewhere pull <app>` | Download the live source of an existing app and link the folder before editing |
|
|
113
|
-
| `somewhere typecheck` | Checks
|
|
116
|
+
| `somewhere typecheck` | Checks deployable source with the platform's TypeScript version, generated types and checker settings. Install project dependencies first. Use `--project` for the full project check with your own TypeScript and tsconfig.json. |
|
|
114
117
|
| `somewhere logs` | Show recent logs |
|
|
115
118
|
| `somewhere logs --follow` | Stream logs in real-time |
|
|
116
119
|
| `somewhere logs --level error` | Filter by level |
|
|
@@ -339,10 +342,12 @@ await expectStatus(await user.request('/api/auth/me'), 200);
|
|
|
339
342
|
The app must mount the packaged auth handler at `/api/auth`. `createUser` creates
|
|
340
343
|
an independent throwaway user at the platform test domain; it does not use admin
|
|
341
344
|
credentials. `signIn(url, email, password)` supports an existing test user.
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
345
|
+
From the linked app folder, `session.data('notes', { operation: 'list' })` sends
|
|
346
|
+
the signed-in session, app Origin and deployed contract. For a shell probe, run
|
|
347
|
+
`somewhere test-users prepare alice`, then `somewhere data list notes --as alice`.
|
|
348
|
+
The command prints the HTTP status, outcome and rows or error as JSON.
|
|
349
|
+
`expectRefusal(response, 403, 'DATA_ACCESS_DENIED')` checks the exact status and
|
|
350
|
+
code. For an empty scoped read, also check that the owner can read the same fixture.
|
|
346
351
|
|
|
347
352
|
Browser tests can call `waitForApp(page, 'signed-in')` or `'signed-out'`; omit the
|
|
348
353
|
state for either ready state. Add `data-app-state` to your own app's confirmed auth
|