@somewhere-cloud/cli 0.38.86 → 0.38.88

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.
Files changed (42) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/commands/deploy.js +19 -8
  3. package/dist/commands/deploy.js.map +1 -1
  4. package/dist/commands/docs.js +4 -3
  5. package/dist/commands/docs.js.map +1 -1
  6. package/dist/lib/app-test.d.ts +125 -0
  7. package/dist/lib/app-test.js +267 -0
  8. package/dist/lib/app-test.js.map +1 -0
  9. package/dist/lib/deploy-tests.d.ts +6 -0
  10. package/dist/lib/deploy-tests.js +13 -4
  11. package/dist/lib/deploy-tests.js.map +1 -1
  12. package/dist/lib/form-auth.d.ts +83 -0
  13. package/dist/lib/form-auth.js +350 -0
  14. package/dist/lib/form-auth.js.map +1 -0
  15. package/dist/lib/init-agent-guide.d.ts +2 -2
  16. package/dist/lib/init-agent-guide.js +61 -84
  17. package/dist/lib/init-agent-guide.js.map +1 -1
  18. package/dist/lib/init-feature-template.js +10 -10
  19. package/dist/lib/init-green-template.js +0 -3
  20. package/dist/lib/init-green-template.js.map +1 -1
  21. package/dist/lib/init-test-template.d.ts +1 -1
  22. package/dist/lib/init-test-template.js +55 -139
  23. package/dist/lib/init-test-template.js.map +1 -1
  24. package/dist/lib/init-ui-kit.d.ts +2 -2
  25. package/dist/lib/init-ui-kit.js +2 -2
  26. package/dist/lib/playwright-fixtures.d.ts +10 -45
  27. package/dist/lib/playwright-fixtures.js +59 -328
  28. package/dist/lib/playwright-fixtures.js.map +1 -1
  29. package/dist/lib/test-reporter.d.ts +3 -1
  30. package/dist/lib/test-reporter.js +31 -50
  31. package/dist/lib/test-reporter.js.map +1 -1
  32. package/dist/lib/test-run.d.ts +1 -0
  33. package/dist/lib/test-run.js +14 -17
  34. package/dist/lib/test-run.js.map +1 -1
  35. package/dist/script.d.ts +3 -0
  36. package/dist/script.js +4 -0
  37. package/dist/script.js.map +1 -0
  38. package/npm-shrinkwrap.json +2 -2
  39. package/package.json +6 -2
  40. package/dist/lib/test-ledger.d.ts +0 -73
  41. package/dist/lib/test-ledger.js +0 -261
  42. package/dist/lib/test-ledger.js.map +0 -1
@@ -8,35 +8,26 @@ Enough to start a typical app: declare access and use the browser client; docs a
8
8
  | Requirement | Declaration below |
9
9
  | --- | --- |
10
10
  | Each user sees only their own rows | notes: owner() |
11
- | Team: owner adds members; members read/write; creator rights | teams/team_members/tasks: owner() + member(); role-owner delete branch |
12
- | Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain |
11
+ | Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |
12
+ | Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |
13
13
  | Public pages from private drafts | pages: conditional publicRead |
14
14
  | Share one record read-only | shared_notes/note_shares: read-only grant() |
15
15
 
16
16
  db/schema.ts is declaration only: imports, constants/spreads, default schema;
17
17
  no helpers/expressions. id() is random text; owner() stamps user_id. client.read
18
18
  includes the key. Inside anyOf(), owner() takes only column/read: it stamps the
19
- creator, not create/delete options; member() gates placement (non-member create is
20
- refused), while creators or the allowed branch can delete. Other fields: timestamp({ default: 'now' }), text({ nullable: true });
19
+ creator, not create/delete options; group() gates placement (non-member create is
20
+ refused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });
21
21
  indexes: [['team_id']].
22
22
 
23
23
  \`\`\`ts
24
- import { schema, table, id, text, owner, member, anyOf, serverOnly, parent, appRole, boolean, grant } from 'somewhere/db';
24
+ import { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';
25
25
  export default schema({
26
26
  notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },
27
27
  }),
28
- teams: table({ id: id(), name: text(), owner_id: text() }, {
29
- scope: member({ group: 'id', membership: 'team_members', member_user: 'user_id', member_group: 'team_id' }),
30
- client: { read: ['id', 'name'] },
31
- }),
32
- team_members: table({ id: id(), team_id: text(), user_id: text(), role: text() }, {
33
- scope: serverOnly(), unique: [['team_id', 'user_id']],
34
- }),
35
- tasks: table({ id: id(), team_id: text({ references: 'teams' }), title: text() }, {
36
- scope: anyOf(owner(), member({ group: 'team_id', membership: 'team_members',
37
- member_user: 'user_id', member_group: 'team_id', operations: ['read', 'create', 'update'] }),
38
- member({ group: 'team_id', membership: 'team_members', member_user: 'user_id',
39
- member_group: 'team_id', where: { role: 'owner' }, operations: ['delete'] })),
28
+ tasks: table({ id: id(), team_id: text(), title: text() }, {
29
+ scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],
30
+ create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),
40
31
  client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },
41
32
  }),
42
33
  tickets: table({ id: id(), subject: text() }, {
@@ -70,7 +61,8 @@ First choice, as above: emailDomain. The role holds once the person verifies an
70
61
  at that domain; no grant code. An email ending alone proves nothing: anyone can sign up
71
62
  as anyone@your-domain without owning that mailbox. Without verification, grant only from
72
63
  something the visitor cannot choose, such as an invitation your app issued, checked inside
73
- the sign-up route: somewhere docs sw.auth --section server-assigned-app-roles-setroles.
64
+ the sign-up route: single use, bound to one account, its link delivered only to that person:
65
+ somewhere docs sw.auth --section server-assigned-app-roles-setroles.
74
66
  messages use parent(): owner() would hide staff replies from the customer.
75
67
  Publish pages in an owner-checked endpoint. Share with caller-scoped
76
68
  sw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.
@@ -86,46 +78,42 @@ export async function save(title: string) {
86
78
  export const list = (after?: string) => data.notes.list({ limit: 100, after });
87
79
  \`\`\`
88
80
 
89
- Teams without verification: own membership table + member(); sw.groups and domain
90
- roles need VERIFIED emails. Members read/create/update tasks; creators or team owners delete while members.
91
- Restrictions narrow operations, not grant read.
92
- Comment author or team owner deletes: declare it as tasks do (owner() plus member() where role owner, delete).
93
- Create the team and its owner membership atomically:
81
+ Teams are built-in groups: the platform keeps the team, invitations, roster, removal,
82
+ leaving, last owner. Starting a team needs a signed-in user; joining needs a verified
83
+ email (a password sign-up joins once it enters its emailed code). The browser cannot call
84
+ sw.groups: pass each call through an endpoint. A parent() child's delete follows the task
85
+ (creator or team owner), so "comment author or team owner deletes" is an endpoint.
86
+ Staff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and
87
+ sw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).
88
+ Complete apps and specs: somewhere docs sw.groups --section team-example or staff-example.
94
89
 
95
90
  \`\`\`ts
96
- // api/teams.ts
97
- export default sw.endpoint({
98
- auth: 'required', body: { name: 'string' },
99
- handler: async ({ user, params, body }, sw) => {
100
- const id = crypto.randomUUID();
101
- await sw.db.server.tx([
102
- { op: 'insert', table: 'teams', values: { id, name: body.name, owner_id: user.id } },
103
- { op: 'insert', table: 'team_members', values: { id: crypto.randomUUID(), team_id: id, user_id: user.id, role: 'owner' } },
104
- ]);
105
- return { id, email: user.email };
106
- },
107
- });
91
+ // api/teams.ts — GET my teams (completes invitations to me); POST starts one I own
92
+ const refusal = (e: { code: string; message: string; status: number }) =>
93
+ Response.json({ error: e.code, message: e.message }, { status: e.status });
94
+ export const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {
95
+ const page = await sw.groups.list(request, { limit: 100 });
96
+ return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };
97
+ } });
98
+ export default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {
99
+ const made = await sw.groups.create(request, { name: body.name });
100
+ return made.error ? refusal(made.error) : { id: made.data.id };
101
+ } });
108
102
  \`\`\`
109
103
 
110
104
  \`\`\`ts
111
- // api/teams/[id]/members.ts — only the team owner adds a member
112
- export default sw.endpoint({
113
- auth: 'required', body: { email: 'string' },
114
- handler: async ({ user, params, body }, sw) => {
115
- const { data: teams } = await sw.db.from('teams', { where: { id: params.id, owner_id: user.id }, limit: 1 });
116
- if (!teams[0]) return Response.json({ error: 'Team owner required' }, { status: 403 });
117
- const { users: [target] } = await sw.auth.server.listUsers({ emails: [body.email] });
118
- if (!target) return Response.json({ error: 'Account not found' }, { status: 404 });
119
- await sw.db.server.insert('team_members', {
120
- id: crypto.randomUUID(), team_id: params.id, user_id: target.id, role: 'member',
121
- }, { onConflict: 'ignore' });
122
- return { ok: true };
123
- },
124
- });
105
+ // api/teams/[id]/invitations.ts — owners invite; others 403; a member's address 409 ALREADY_MEMBER
106
+ export default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {
107
+ const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });
108
+ return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };
109
+ } });
125
110
  \`\`\`
126
111
 
112
+ Same shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)
113
+ (last owner: 409 LAST_OWNER), delete(request, id) by owners.
114
+
127
115
  Do not hand-write access to app-read/write data: declare who may read/write it.
128
- serverOnly() fits job/import/audit/counter state and protected membership ledgers.
116
+ serverOnly() fits job/import/audit/counter state.
129
117
  Grant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates
130
118
  (e.g. expiry) or per-role writable fields (split tables or check that write).
131
119
 
@@ -150,26 +138,17 @@ headers: { 'content-type': 'application/json' }, body: JSON.stringify(values) })
150
138
  Access cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts
151
139
  need Origin equal to the app URL.
152
140
 
153
- Publish: npx @somewhere-cloud/cli deploy, then somewhere test for the rules you changed.
154
- One somewhere test run drives the UI and calls the API: signUp(page) uses your sign-up form
155
- (then signOut, signIn with its password, verify with the emailed code), newUser() acts as
156
- several people, and ready(page, 'signed-in' | 'signed-out') waits for the session check.
157
- You do not need a separate browser script.
158
- Start from the starter's tests/account, phone and access specs: one journey per test, its own people.
159
- One somewhere test runs every spec, old and new together; somewhere deploy --test deploys, then runs them once.
160
- After fixing a test, run only what failed: somewhere test --failed (passed results on this release are kept).
161
- Do not rerun a suite that is already green on this release.
141
+ Test with an ordinary Playwright script: the journeys you changed and your access boundaries.
142
+ Run it only after a successful deploy: npx @somewhere-cloud/cli deploy && node tests/app-check.mjs
143
+ (the starter's short example; one result file, and the exit code is the verdict). Rerun only to answer a question.
144
+ Helpers from @somewhere-cloud/cli/script (import or require): openAppTest() then app.signUp/signIn/signOut(page)
145
+ through your form, app.data(page, { table, operation, id, values, where }) as that person,
146
+ app.expectRefused(page, request, { allowed: ownerPage }), captureResponses, dataReady, launchOptions.
147
+ A rebuilt sign-in form keeps data-sw-auth="email", "password", "sign-up", "sign-in" on its controls,
148
+ or pass app.signUp(page, { form: { email, password, signUp, signIn } }) with your own selectors.
162
149
  Deploy raw source, no frontend build; type errors stop upload.
163
- newUser() gives a signed-in page/API client; make people at once: await Promise.all([newUser(), newUser()]).
164
- newUser({ role: 'staff' }) holds a role declared in appRoles, granted with your developer key.
165
- newUser() takes no chosen email. Test users are verified and visible to this project's server user lookup.
166
- Email-domain role: signUp(page, { domain: 'staff.example' }), then verify(page, person); newPage() for a second person.
167
- Refusals: await expectRefused(person, 'notes', { operation: 'update', id, values }, { allowed: owner }) or
168
- expectRefused(person, 'POST /api/x', body, { allowed }). allowed is someone the same request succeeds for;
169
- an empty list, a null get or a 404 counts as refused only then. person/allowed: page, newUser() or anonymous.
170
- somewhere test --phone runs every test again at 390x844.
171
- For the complete owner-adds-member-by-email test and its endpoints, run
172
- somewhere docs test and follow Two users sharing through the app.
150
+ Email-domain role: app.signUp(page, { domain: 'staff.example' }), then app.verify(page, person).
151
+ The complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.
173
152
  Diagnose with somewhere errors and somewhere logs.
174
153
 
175
154
  On demand:
@@ -177,24 +156,22 @@ On demand:
177
156
 
178
157
  ## Testing shared access
179
158
 
180
- With the teams and membership endpoints above, the owner adds a fixture by email
181
- and that fixture reads the shared team row:
159
+ With the team endpoints above, the owner invites a fixture by email; test users are verified,
160
+ so its next GET /api/teams shows the team. A test user who still owns a team is not deleted:
161
+ delete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take
162
+ about a second, so raise the timeout:
182
163
 
183
164
  \`\`\`ts
184
165
  // tests/team.spec.ts
185
- import { test, expect, data } from '@somewhere-cloud/cli/testing';
186
- test('owner adds a second user by email', async ({ newUser }) => {
187
- const owner = await newUser();
188
- const bob = await newUser();
189
- const name = \`Shared team \${crypto.randomUUID()}\`;
190
- const created = await owner.request.post('/api/teams', { data: { name } });
191
- expect(created.ok()).toBeTruthy();
192
- const { id } = await created.json();
193
- const added = await owner.request.post(\`/api/teams/\${id}/members\`, { data: { email: bob.email } });
194
- expect(added.ok()).toBeTruthy();
195
- const response = await data(bob.request, 'teams', { operation: 'get', id });
196
- expect(response.ok()).toBeTruthy();
197
- expect((await response.json()).data).toMatchObject({ id, name });
166
+ import { test, expect } from '@somewhere-cloud/cli/testing';
167
+ test.describe.configure({ timeout: 90_000 });
168
+ test('owner invites a second user by email', async ({ newUser }) => {
169
+ const [owner, bob] = await Promise.all([newUser(), newUser()]);
170
+ const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();
171
+ expect((await owner.request.post(\`/api/teams/\${id}/invitations\`, { data: { email: bob.email } })).ok()).toBeTruthy();
172
+ const { teams } = await (await bob.request.get('/api/teams')).json();
173
+ expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));
174
+ expect((await owner.request.delete(\`/api/teams/\${id}\`)).status()).toBe(204);
198
175
  });
199
176
  \`\`\`
200
177
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"init-agent-guide.js","sourceRoot":"","sources":["../../src/lib/init-agent-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,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AE9H,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C;;+EAE+E;AAC/E,MAAM,CAAC,MAAM,mBAAmB,GAAG,wDAAwD,CAAC;AAE5F,6EAA6E;AAC7E,MAAM,CAAC,MAAM,WAAW,GAAG,0HAA0H,CAAC;AAEtJ,MAAM,CAAC,MAAM,cAAc,GAAG,uCAAuC,cAAc,KAAK,cAAc,KAAK,mBAAmB,KAAK,WAAW,IAAI,CAAC;AACnJ,MAAM,CAAC,MAAM,cAAc,GAAG,4CAA4C,CAAC"}
@@ -2133,7 +2133,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
2133
2133
  <p className={notes.notice?.tone === 'error' ? 'note-status error' : 'note-status'} role="status">{notes.notice?.text ?? ''}</p>
2134
2134
  </form>
2135
2135
 
2136
- <section aria-labelledby="notes-title" aria-busy={notes.status === 'loading'}>
2136
+ <section aria-labelledby="notes-title" aria-busy={notes.status === 'loading'} data-sw-data={notes.status}>
2137
2137
  <h2 id="notes-title" className="section-title">Your notes</h2>
2138
2138
  {notes.status === 'loading' ? <p className="muted" role="status">Loading notes…</p> : null}
2139
2139
  {notes.status === 'error' ? (
@@ -2298,7 +2298,7 @@ export function NotesBoard({ notes }: { notes: NotesController }) {
2298
2298
  {editing ? <button type="button" onClick={notes.cancelEdit}>Cancel</button> : null}
2299
2299
  <p role="status">{notes.notice?.text ?? ''}</p>
2300
2300
  </form>
2301
- <h2>Your notes</h2>
2301
+ <h2 data-sw-data={notes.status}>Your notes</h2>
2302
2302
  {notes.status === 'loading' ? <p role="status">Loading notes…</p> : null}
2303
2303
  {notes.status === 'error' ? <Alert action={<button type="button" onClick={notes.reload}>Try again</button>}>{notes.loadError}</Alert> : null}
2304
2304
  {notes.status === 'ready' && notes.notes.length === 0 ? <EmptyState title="No notes yet." /> : null}
@@ -3196,14 +3196,14 @@ export function createFeatureTemplate(selection, options) {
3196
3196
  ...starterTests({ privateData }),
3197
3197
  { path: '.gitignore', content: 'node_modules\ndist\nbuild\n.env\n# Generated from db/schema.ts by somewhere typecheck, dev and deploy.\n__somewhere_data.d.ts\n__somewhere_files.d.ts\n' },
3198
3198
  { path: 'AGENTS.md', content: INIT_AGENTS_MD.replace(/## Getting started[^]*?After edits:/, `## Testing
3199
- tests/account, phone and access specs are working journeys: adapt them, one journey per test.
3200
- Each test makes its own people at once (Promise.all of newUser()) and unique row values.
3201
- Run somewhere test (or somewhere deploy --test): every spec, old and new, in one run.
3202
- After fixing a test, run only what failed: somewhere test --failed. Never rerun a green suite on one release.
3203
- A pass means the checks you wrote passed; say which requirements they do not cover.
3204
- Use ready(page) for starter session readiness, or an explicit locator.
3205
- Test users are removed afterwards; rows, files and mail they created remain.
3206
- Managed users bypass signup/onboarding; test those separately if you customize them.
3199
+ Test the journeys you changed and your access boundaries with an ordinary Playwright script.
3200
+ tests/app-check.mjs is a short example to change: npx somewhere deploy && node tests/app-check.mjs
3201
+ (after a successful deploy only; one result file, .somewhere/app-check.json; the exit code is the verdict).
3202
+ Helpers from @somewhere-cloud/cli/script (import or require): signUp/signIn/signOut through your form,
3203
+ data(page, { table, operation, id, values, where }) as that person, expectRefused with a positive control,
3204
+ captureResponses, dataReady (the list has loaded), launchOptions. A rebuilt sign-in form keeps
3205
+ data-sw-auth="email", "password", "sign-up", "sign-in" on its controls, or pass { form: { … } } selectors.
3206
+ Rerun only to answer a question. A pass means the checks you wrote passed; say what they do not cover.
3207
3207
 
3208
3208
  After edits:`) },
3209
3209
  { path: 'CLAUDE.md', content: INIT_CLAUDE_MD },
@@ -1,7 +1,6 @@
1
1
  import { CLI_VERSION } from './version.js';
2
2
  import { INIT_AGENTS_MD, INIT_CLAUDE_MD } from './init-agent-guide.js';
3
3
  import { ASSET_TYPES_FILE } from './init-asset-types.js';
4
- import { starterTests } from './init-test-template.js';
5
4
  const PACKAGE_JSON = `{
6
5
  "name": "somewhere-starter",
7
6
  "private": true,
@@ -18,7 +17,6 @@ const PACKAGE_JSON = `{
18
17
  },
19
18
  "devDependencies": {
20
19
  "@somewhere-cloud/cli": "${CLI_VERSION}",
21
- "@playwright/test": "1.65.0",
22
20
  "@types/react": "19.2.2",
23
21
  "@types/react-dom": "19.2.2",
24
22
  "typescript": "5.9.3",
@@ -169,7 +167,6 @@ Deploy the raw source. The platform compiles it; do not create or deploy a
169
167
  `;
170
168
  export function createGreenTemplate() {
171
169
  return [
172
- ...starterTests({ minimal: true }),
173
170
  { path: '.gitignore', content: 'node_modules\ndist\nbuild\n.env\n# Generated from db/schema.ts by somewhere typecheck, dev and deploy.\n__somewhere_data.d.ts\n__somewhere_files.d.ts\n' },
174
171
  { path: 'AGENTS.md', content: INIT_AGENTS_MD },
175
172
  { path: 'CLAUDE.md', content: INIT_CLAUDE_MD },
@@ -1 +1 @@
1
- {"version":3,"file":"init-green-template.js","sourceRoot":"","sources":["../../src/lib/init-green-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEvD,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;+BAeU,WAAW;;;;;;;;;;;CAWzC,CAAC;AAEF,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;CAchB,CAAC;AAEF,MAAM,SAAS,GAAG;;;CAGjB,CAAC;AAEF,MAAM,MAAM,GAAG;;;;;;;;;;;;;;;;;;;CAmBd,CAAC;AAEF,MAAM,GAAG,GAAG;;;;;;;;;CASX,CAAC;AAEF,MAAM,OAAO,GAAG;;;;;;;CAOf,CAAC;AAEF,MAAM,GAAG,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAuBX,CAAC;AAEF,MAAM,IAAI,GAAG;;;;;;;;;;CAUZ,CAAC;AAEF,MAAM,MAAM,GAAG;;;;;;;;;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AO,EAAE,GAAG,EAAE;QACrC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE;QACvC,EAAE,IAAI,EAAE,0BAA0B,EAAE,OAAO,EAAE,OAAO,EAAE;QACtD,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE;QAC3C,EAAE,IAAI,EAAE,iBAAiB,EAAE,OAAO,EAAE,GAAG,EAAE;QACzC,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,2EAA2E,EAAE;QACvH,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE;QACzC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,SAAS,EAAE;QAC5C,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { InitScaffoldFile } from './init-scaffold.js';
2
+ /** The starter's example script (auth starters only; the minimal starter has no sign-in form). */
2
3
  export declare function starterTests(options?: {
3
4
  privateData?: boolean;
4
- minimal?: boolean;
5
5
  }): InitScaffoldFile[];
@@ -1,145 +1,61 @@
1
- // The starter's journeys: small, independent specs an agent adapts instead of writing from nothing.
2
- // Each one makes its own people (at the same time, with Promise.all), shares nothing with the others,
3
- // runs alone or in any order, and waits on what the app does, never on a fixed sleep.
4
- const FORM_ACCOUNT = `import { test, expect } from '@somewhere-cloud/cli/testing';
5
-
6
- // A visitor signs up through the app's own form, signs out and signs back in.
7
- test('sign up, sign out and sign back in', async ({ page, signUp, signOut, signIn }) => {
8
- const person = await signUp(page);
9
- await expect(page.getByText(person.email)).toBeVisible();
10
- await signOut(page);
11
- await signIn(page, person);
12
- await expect(page.getByText(person.email)).toBeVisible();
13
- });
14
- `;
15
- // The minimal starter has no sign-in screens yet: these steps call its auth route from the page.
16
- // Once the app has a form, drop the steps (starter form) or replace them with the form's own steps.
17
- const ROUTE_ACCOUNT = `import { test, expect, type FormSteps } from '@somewhere-cloud/cli/testing';
18
-
19
- // This app has no sign-in screens yet, so these steps use its auth route from the page.
20
- // When you add a form, replace them with your form's steps: fill, submit.
21
- const viaAuthRoute = (path: string): FormSteps => async (page, { email, password }) => {
22
- if (page.url() === 'about:blank') await page.goto('/');
23
- await page.evaluate(async ([path, body]) => {
24
- const response = await fetch(path, { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify(body) });
25
- await response.text(); // read the answer, as a form would
26
- }, [path, { email, password }] as const);
1
+ // One short, ordinary Playwright script an agent copies and changes, not a second test suite:
2
+ // nothing here is discovered by `somewhere test` (it runs tests/**/*.spec.ts only). The helpers come
3
+ // from @somewhere-cloud/cli/script and work the same from .mjs or .cjs.
4
+ const SCRIPT = (privateData) => `// tests/app-check.mjs — an ordinary Playwright script for this app: change the checks to match
5
+ // what you built. Run it after a successful deploy, never after a refused one:
6
+ // npx somewhere deploy && node tests/app-check.mjs
7
+ // It writes its result once to .somewhere/app-check.json; the exit code is the verdict.
8
+ // From a .cjs script: const { openAppTest } = require('@somewhere-cloud/cli/script');
9
+ import { chromium } from '@playwright/test';
10
+ import { openAppTest${privateData ? ', captureResponses, dataReady' : ''} } from '@somewhere-cloud/cli/script';
11
+
12
+ const app = await openAppTest(); // stops if this folder has changes the live release lacks
13
+ const browser = await chromium.launch(app.launchOptions());
14
+ // One person = one browser context, signed up through the app's own form (accounts are
15
+ // deleted by exact id in finish()).
16
+ const person = async () => {
17
+ const page = await browser.newPage({ baseURL: app.origin });
18
+ return { page, account: await app.signUp(page) };
27
19
  };
28
- const signedInAs = async (page: import('@playwright/test').Page) => (await (await page.request.get('/api/auth/me')).json()).user;
29
-
30
- test('sign up, sign out and sign back in', async ({ page, signUp, signOut, signIn }) => {
31
- const person = await signUp(page, { steps: viaAuthRoute('/api/auth/signup') });
32
- expect((await signedInAs(page)).email).toBe(person.email);
33
- await signOut(page, { steps: async page => { expect((await page.request.post('/api/auth/logout', { data: {} })).ok()).toBe(true); } });
34
- expect(await signedInAs(page)).toBeNull();
35
- await signIn(page, person, { steps: viaAuthRoute('/api/auth/login') });
36
- expect((await signedInAs(page)).email).toBe(person.email);
37
- });
38
- `;
39
- // Nothing scrolls sideways at phone width: not the page, and not a table or panel inside it.
40
- const SIDEWAYS = `async function scrollsSideways(page: import('@playwright/test').Page) {
41
- return page.evaluate(() => [document.documentElement, ...document.querySelectorAll('body *')]
42
- .filter((el) => el.scrollWidth > el.clientWidth + 1
43
- && (el === document.documentElement || ['auto', 'scroll'].includes(getComputedStyle(el).overflowX)))
44
- .map((el) => el.tagName.toLowerCase() + (typeof el.className === 'string' && el.className ? '.' + el.className.split(' ')[0] : '')));
20
+ try {
21
+ const [ana, ben] = await Promise.all([person(), person()]);
22
+ await app.check('the signed-in page shows the account', () => ana.page.getByText(ana.account.email).waitFor());
23
+ await app.check('sign out, then sign back in', async () => {
24
+ await app.signOut(ana.page);
25
+ await app.signIn(ana.page, ana.account);
26
+ });
27
+ ${privateData ? ` await app.check('a note stays private to its owner', async () => {
28
+ const secret = 'private ' + crypto.randomUUID(); // a unique value: search for it, not a common word
29
+ await ana.page.getByLabel('Title').fill(secret);
30
+ await ana.page.getByRole('button', { name: 'Add note' }).click();
31
+ await ana.page.getByRole('heading', { name: secret }).waitFor();
32
+ const seen = captureResponses(ben.page);
33
+ await ben.page.reload();
34
+ await dataReady(ben.page); // the list has loaded, not merely "signed in"
35
+ const leaks = await seen.find(secret);
36
+ if (leaks.length) throw new Error('the other person received the note: ' + JSON.stringify(leaks));
37
+ const { data: [note] } = await app.data(ana.page, { table: 'notes', operation: 'list', where: { title: secret } });
38
+ await app.expectRefused(ben.page, { table: 'notes', operation: 'get', id: note.id }, { allowed: ana.page });
39
+ await app.expectRefused(ben.page, { table: 'notes', operation: 'update', id: note.id, values: { title: 'changed' } }, { allowed: ana.page });
40
+ await app.expectRefused(ben.page, { table: 'notes', operation: 'delete', id: note.id }, { allowed: ana.page });
41
+ });
42
+ ` : ''} await app.check('at phone width nothing scrolls sideways', async () => {
43
+ await ana.page.setViewportSize({ width: 390, height: 844 });
44
+ await ana.page.reload();
45
+ await ana.page.getByText(ana.account.email).waitFor();
46
+ const wide = await ana.page.evaluate(() => [document.documentElement, ...document.querySelectorAll('body *')]
47
+ .filter((el) => el.scrollWidth > el.clientWidth + 1
48
+ && (el === document.documentElement || ['auto', 'scroll'].includes(getComputedStyle(el).overflowX)))
49
+ .map((el) => el.tagName.toLowerCase() + (typeof el.className === 'string' && el.className ? '.' + el.className.split(' ')[0] : '')));
50
+ if (wide.length) throw new Error('scrolls sideways at 390 px: ' + wide.join(', '));
51
+ });
52
+ } finally {
53
+ await app.finish(); // confirms the release, deletes the accounts, writes the result once
54
+ await browser.close();
45
55
  }
46
56
  `;
47
- const FORM_PHONE = (privateData) => `import { test, expect } from '@somewhere-cloud/cli/testing';
48
-
49
- // One pass at phone width. Adapt: do the app's main action here, as a person on a phone would.
50
- test.use({ viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true });
51
- ${SIDEWAYS}
52
- test('phone: ${privateData ? 'sign up, add a note and sign out' : 'sign up and sign out'}', async ({ page, signUp, signOut }) => {
53
- const person = await signUp(page);
54
- await expect(page.getByText(person.email)).toBeVisible();
55
- expect(await scrollsSideways(page), 'these scroll sideways at 390 px').toEqual([]);
56
- ${privateData ? ` const title = 'phone ' + crypto.randomUUID();
57
- await page.getByLabel('Title').fill(title);
58
- await page.getByRole('button', { name: 'Add note' }).click();
59
- await expect(page.getByRole('heading', { name: title })).toBeVisible();
60
- ` : ''} await signOut(page);
61
- });
62
- `;
63
- const ROUTE_PHONE = `import { test, expect } from '@somewhere-cloud/cli/testing';
64
-
65
- // One pass at phone width. Adapt: do the app's main action here, as a person on a phone would.
66
- test.use({ viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true });
67
- ${SIDEWAYS}
68
- test('phone: the page shows the greeting from its function', async ({ page }) => {
69
- await page.goto('/');
70
- await expect(page.getByText('Your full-stack app is ready.')).toBeVisible();
71
- expect(await scrollsSideways(page), 'these scroll sideways at 390 px').toEqual([]);
72
- });
73
- `;
74
- // Two people, one role-holder: the access journeys. In the private-data starter the first one runs
75
- // against its notes; elsewhere both say exactly what to fill in and are skipped until then.
76
- const ACCESS = (variant) => `import { test, expect, data, expectRefused } from '@somewhere-cloud/cli/testing';
77
-
78
- // Adapt: a table whose rows belong to the person who made them, values to create one, and a change.
79
- const OWNED = ${variant === 'notes'
80
- ? `{ table: 'notes', values: { title: 'private ' + crypto.randomUUID() }, change: { title: 'changed' } }`
81
- : `{ table: '', values: {} as Record<string, unknown>, change: {} as Record<string, unknown> }`};
82
- // Adapt: a role from appRoles in db/schema.ts, a table only that role may use, and values to create a row.
83
- const ROLE = { role: '', table: '', values: {} as Record<string, unknown> };
84
-
85
- test('one person cannot see or change another person\\'s rows', async ({ newUser }) => {
86
- test.skip(!OWNED.table, 'Fill in OWNED at the top of tests/access.spec.ts');
87
- const [owner, other] = await Promise.all([newUser(), newUser()]);
88
- ${variant === 'notes' ? ` // The owner adds the row through the app's own form.
89
- await owner.page.goto('/');
90
- await owner.page.getByLabel('Title').fill(OWNED.values.title);
91
- await owner.page.getByRole('button', { name: 'Add note' }).click();
92
- await expect(owner.page.getByRole('heading', { name: OWNED.values.title })).toBeVisible();
93
- const listed = await data(owner.request, OWNED.table, { operation: 'list', where: { title: OWNED.values.title } });
94
- const { id } = (await listed.json()).data[0];
95
- // The other person's own list loads without it.
96
- await other.page.goto('/');
97
- await expect(other.page.getByText('No notes yet.')).toBeVisible();
98
- ` : ` const created = await data(owner.request, OWNED.table, { operation: 'create', values: OWNED.values });
99
- expect(created.status()).toBe(200);
100
- const { id } = (await created.json()).data;
101
- `} // Every way the other person could reach the row is refused; the owner is the positive control.
102
- await Promise.all([
103
- expectRefused(other, OWNED.table, { operation: 'get', id }, { allowed: owner }),
104
- expectRefused(other, OWNED.table, { operation: 'list', where: { id } }, { allowed: owner }),
105
- expectRefused(other, OWNED.table, { operation: 'update', id, values: OWNED.change }, { allowed: owner }),
106
- expectRefused(other, OWNED.table, { operation: 'delete', id }, { allowed: owner }),
107
- ]);
108
- // Nothing they tried changed it.
109
- const after = await data(owner.request, OWNED.table, { operation: 'get', id });
110
- expect((await after.json()).data).toMatchObject(OWNED.values);
111
- });
112
-
113
- test('a role-holder may use what a non-holder is refused', async ({ newUser }) => {
114
- test.skip(!ROLE.role, 'Fill in ROLE at the top of tests/access.spec.ts');
115
- const [holder, person] = await Promise.all([newUser({ role: ROLE.role }), newUser()]);
116
- const created = await data(holder.request, ROLE.table, { operation: 'create', values: ROLE.values });
117
- expect(created.status()).toBe(200);
118
- const { id } = (await created.json()).data;
119
- await Promise.all([
120
- expectRefused(person, ROLE.table, { operation: 'get', id }, { allowed: holder }),
121
- expectRefused(person, ROLE.table, { operation: 'create', values: ROLE.values }, { allowed: holder }),
122
- expectRefused(person, ROLE.table, { operation: 'delete', id }, { allowed: holder }),
123
- ]);
124
- expect((await (await data(holder.request, ROLE.table, { operation: 'get', id })).json()).data).toMatchObject(ROLE.values);
125
- });
126
- ${variant === 'minimal' ? `
127
- test('visitors cannot read the server-only greetings table', async ({ anonymous }) => {
128
- await expectRefused(anonymous, 'greetings', { operation: 'list' });
129
- });
130
- ` : ''}`;
57
+ /** The starter's example script (auth starters only; the minimal starter has no sign-in form). */
131
58
  export function starterTests(options = {}) {
132
- if (options.minimal) {
133
- return [
134
- { path: 'tests/account.spec.ts', content: ROUTE_ACCOUNT },
135
- { path: 'tests/phone.spec.ts', content: ROUTE_PHONE },
136
- { path: 'tests/access.spec.ts', content: ACCESS('minimal') },
137
- ];
138
- }
139
- return [
140
- { path: 'tests/account.spec.ts', content: FORM_ACCOUNT },
141
- { path: 'tests/phone.spec.ts', content: FORM_PHONE(Boolean(options.privateData)) },
142
- { path: 'tests/access.spec.ts', content: ACCESS(options.privateData ? 'notes' : 'none') },
143
- ];
59
+ return [{ path: 'tests/app-check.mjs', content: SCRIPT(Boolean(options.privateData)) }];
144
60
  }
145
61
  //# sourceMappingURL=init-test-template.js.map
@@ -1 +1 @@
1
- {"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