@somewhere-cloud/cli 0.38.150 → 0.38.152
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 +10 -0
- package/README.md +14 -0
- package/dist/lib/bundle.js +234 -229
- package/dist/lib/bundle.js.map +3 -3
- package/dist/types/lib/client.d.ts +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -2
- package/runtime/DECLARED-DATA-VENDOR.json +7 -7
- package/runtime/PLATFORM-SOURCE.json +1 -1
- package/runtime/SOURCE-LINT-VENDOR.json +2 -2
- package/runtime/declared-data.cjs +16 -13
- package/runtime/source-lint.cjs +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.38.152
|
|
4
|
+
|
|
5
|
+
- Run a scheduled job twice in a preview with `somewhere cron run <name> --preview --twice` and see each result and table row-count change.
|
|
6
|
+
- Use a Playwright session from `somewhere test-users prepare` with the data testing helper.
|
|
7
|
+
|
|
8
|
+
## 0.38.151
|
|
9
|
+
|
|
10
|
+
- The generated project guide shows where to declare data access and how to check it with signed-in users.
|
|
11
|
+
- `somewhere typecheck` recognizes `ownerOnly: true` for caller-scoped browser and function reads. Use it to return only rows owned by the current user.
|
|
12
|
+
|
|
3
13
|
## 0.38.150
|
|
4
14
|
|
|
5
15
|
- `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.
|
package/README.md
CHANGED
|
@@ -346,6 +346,20 @@ From the linked app folder, `session.data('notes', { operation: 'list' })` sends
|
|
|
346
346
|
the signed-in session, app Origin and deployed contract. For a shell probe, run
|
|
347
347
|
`somewhere test-users prepare alice`, then `somewhere data list notes --as alice`.
|
|
348
348
|
The command prints the HTTP status, outcome and rows or error as JSON.
|
|
349
|
+
|
|
350
|
+
To reuse the prepared user in your own Playwright script, run
|
|
351
|
+
`somewhere test-users prepare alice` in the linked app folder:
|
|
352
|
+
|
|
353
|
+
```ts
|
|
354
|
+
import { data } from '@somewhere-cloud/cli/testing';
|
|
355
|
+
const alice = await browser.newContext({ storageState: '.somewhere/test/alice.state.json' });
|
|
356
|
+
const response = await data(alice.request, 'notes', { operation: 'list' });
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
`data()` uses the linked app's contract and the context's own session. Save the
|
|
360
|
+
context's storage state back to the same file if the app refreshes the session.
|
|
361
|
+
Run `somewhere test-users cleanup` when finished.
|
|
362
|
+
|
|
349
363
|
`expectRefusal(response, 403, 'DATA_ACCESS_DENIED')` checks the exact status and
|
|
350
364
|
code. For an empty scoped read, also check that the owner can read the same fixture.
|
|
351
365
|
|