@somewhere-cloud/cli 0.38.94 → 0.38.96
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 +17 -0
- package/dist/commands/deploy.js +2 -2
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/test.js +22 -1
- package/dist/commands/test.js.map +1 -1
- package/dist/lib/declared-data.js +5 -2
- package/dist/lib/declared-data.js.map +1 -1
- package/dist/lib/init-agent-guide.d.ts +2 -2
- package/dist/lib/init-agent-guide.js +11 -5
- package/dist/lib/init-agent-guide.js.map +1 -1
- package/dist/lib/init-feature-template.js +28 -41
- package/dist/lib/init-feature-template.js.map +1 -1
- package/dist/lib/init-green-template.js +2 -1
- package/dist/lib/init-green-template.js.map +1 -1
- package/dist/lib/init-template.js +2 -1
- package/dist/lib/init-template.js.map +1 -1
- package/dist/lib/init-test-template.js +9 -5
- package/dist/lib/init-test-template.js.map +1 -1
- package/dist/lib/init-ui-kit.d.ts +3 -3
- package/dist/lib/init-ui-kit.js +50 -48
- package/dist/lib/init-ui-kit.js.map +1 -1
- package/dist/lib/scaffold.d.ts +2 -2
- package/dist/lib/scaffold.js +5 -3
- package/dist/lib/scaffold.js.map +1 -1
- package/dist/lib/test-scripts.d.ts +21 -0
- package/dist/lib/test-scripts.js +118 -0
- package/dist/lib/test-scripts.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/runtime/DECLARED-DATA-VENDOR.json +13 -12
- package/runtime/PLATFORM-SOURCE.json +1 -1
- package/runtime/SOURCE-LINT-VENDOR.json +4 -3
- package/runtime/declared-data.cjs +335 -23
- package/runtime/source-lint.cjs +236 -13
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const AGENT_WORKFLOW = "## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code). The browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nTest with an ordinary Playwright script: the journeys you changed and your access boundaries.\nRun it only after a successful deploy: npx @somewhere-cloud/cli deploy && node tests/app-check.mjs\n(the starter's short example; one result file, and the exit code is the verdict).\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun only the checks that failed: node tests/app-check.mjs --failed.\n Keep setup (sign-ups, rows a check needs) outside app.check() so a rerun still has it.\nCall the data endpoint as a signed-in person: app.data(page, { table, operation, id, values })\n(the raw request: somewhere docs declared-data --section calling-the-data-endpoint-directly).\nHelpers from @somewhere-cloud/cli/script (import or require): openAppTest() then app.signUp/signIn/signOut(page)\nthrough your form, app.data(page, { table, operation, id, values, where }) as that person,\napp.expectRefused(page, request, { allowed: ownerPage }), captureResponses, dataReady, launchOptions.\nA rebuilt sign-in form keeps data-sw-auth=\"email\", \"password\", \"sign-up\", \"sign-in\" on its controls,\nor pass app.signUp(page, { form: { email, password, signUp, signIn } }) with your own selectors.\nDeploy raw source, no frontend build; type errors stop upload.\nEmail-domain role: app.signUp(page, { domain: 'staff.example' }), then app.verify(page, person).\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n";
|
|
1
|
+
export declare const AGENT_WORKFLOW = "## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nA page that needs several reads: start them together and show it once every read it depends on has answered.\nKeep an input disabled until the data it depends on has loaded, including who the user is.\nNever let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code).\nNo email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).\nThe browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nRun somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test\nIt runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from\ntests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun only the checks that failed: npx @somewhere-cloud/cli test --failed.\n Keep setup (sign-ups, rows a check needs) outside app.check() so a rerun still has it.\nCall the data endpoint as a signed-in person: app.data(page, { table, operation, id, values })\n(the raw request: somewhere docs declared-data --section calling-the-data-endpoint-directly).\nHelpers from @somewhere-cloud/cli/script (import or require): openAppTest() then app.signUp/signIn/signOut(page)\nthrough your form, app.data(page, { table, operation, id, values, where }) as that person,\napp.expectRefused(page, request, { allowed: ownerPage }), captureResponses, dataReady, launchOptions.\nA rebuilt sign-in form keeps data-sw-auth=\"email\", \"password\", \"sign-up\", \"sign-in\" on its controls,\nor pass app.signUp(page, { form: { email, password, signUp, signIn } }) with your own selectors.\nDeploy raw source, no frontend build; type errors stop upload.\nEmail-domain role: app.signUp(page, { domain: 'staff.example' }), then app.verify(page, person).\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n";
|
|
2
2
|
export declare const SKILLS_POINTER = "Task-specific skills: `.agents/skills/`. Inspect/update with somewhere skills status/update.";
|
|
3
3
|
export declare const DECLARED_ACCESS_POINTER = "";
|
|
4
4
|
/** One line telling agents the app's data and code can leave:
|
|
@@ -10,5 +10,5 @@ export declare const MCP_POINTER = "Use this app from Claude as its signed-in us
|
|
|
10
10
|
/** One line on what a preview cannot do today, so no agent learns it by failing.
|
|
11
11
|
* Rewrite it when previews gain these (the full list: docs dev-environments). */
|
|
12
12
|
export declare const PREVIEW_POINTER = "somewhere preview runs your change on a copy of production data with its own sign-in: a preview starts with no users (sign up in it or `somewhere preview user-add`), its sign-in mail is captured (`somewhere preview mail`), and rows private to a production user stay hidden from preview users. Server user lookup, roles and built-in teams work in a preview (its own users, its own copy; team invitations are captured); jobs/cron handlers do not yet: check those in production after promoting (`somewhere docs dev-environments`). Test your change in the preview before you promote it: `somewhere test --preview`.";
|
|
13
|
-
export declare const INIT_AGENTS_MD = "# somewhere.cloud project contract\n## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code). The browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nTest with an ordinary Playwright script: the journeys you changed and your access boundaries.\nRun it only after a successful deploy: npx @somewhere-cloud/cli deploy && node tests/app-check.mjs\n(the starter's short example; one result file, and the exit code is the verdict).\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun only the checks that failed: node tests/app-check.mjs --failed.\n Keep setup (sign-ups, rows a check needs) outside app.check() so a rerun still has it.\nCall the data endpoint as a signed-in person: app.data(page, { table, operation, id, values })\n(the raw request: somewhere docs declared-data --section calling-the-data-endpoint-directly).\nHelpers from @somewhere-cloud/cli/script (import or require): openAppTest() then app.signUp/signIn/signOut(page)\nthrough your form, app.data(page, { table, operation, id, values, where }) as that person,\napp.expectRefused(page, request, { allowed: ownerPage }), captureResponses, dataReady, launchOptions.\nA rebuilt sign-in form keeps data-sw-auth=\"email\", \"password\", \"sign-up\", \"sign-in\" on its controls,\nor pass app.signUp(page, { form: { email, password, signUp, signIn } }) with your own selectors.\nDeploy raw source, no frontend build; type errors stop upload.\nEmail-domain role: app.signUp(page, { domain: 'staff.example' }), then app.verify(page, person).\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n\nTask-specific skills: `.agents/skills/`. Inspect/update with somewhere skills status/update.\nData/code export limits: `somewhere docs portability`.\nUse this app from Claude as its signed-in user (MCP tools): `somewhere docs sw.endpoint --section mcp-tools-for-claude`.\nsomewhere preview runs your change on a copy of production data with its own sign-in: a preview starts with no users (sign up in it or `somewhere preview user-add`), its sign-in mail is captured (`somewhere preview mail`), and rows private to a production user stay hidden from preview users. Server user lookup, roles and built-in teams work in a preview (its own users, its own copy; team invitations are captured); jobs/cron handlers do not yet: check those in production after promoting (`somewhere docs dev-environments`). Test your change in the preview before you promote it: `somewhere test --preview`.\n";
|
|
13
|
+
export declare const INIT_AGENTS_MD = "# somewhere.cloud project contract\n## Build, deploy, test\n\nEnough to start a typical app: declare access and use the browser client; docs are for exceptions.\n\n| Requirement | Declaration below |\n| --- | --- |\n| Each user sees only their own rows | notes: owner() |\n| Team: owner invites members; members read/write; creator or team owner deletes | tasks: anyOf(owner(), group()); sw.groups endpoints below |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain (or grantableBy) |\n| Public pages from private drafts | pages: conditional publicRead |\n| Share one record read-only | shared_notes/note_shares: read-only grant() |\n\ndb/schema.ts is declaration only: imports, constants/spreads, default schema;\nno helpers/expressions. id() is random text; owner() stamps user_id. client.read\nincludes the key. Inside anyOf(), owner() takes only column/read: it stamps the\ncreator, not create/delete options; group() gates placement (non-member create is\nrefused); inside anyOf an operation missing from roles allows no group role. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, group, anyOf, parent, appRole, boolean, grant } from 'somewhere/db';\nexport default schema({\n notes: table({ id: id(), title: text() }, { scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'], delete: true },\n }),\n tasks: table({ id: id(), team_id: text(), title: text() }, {\n scope: anyOf(owner(), group({ column: 'team_id', roles: { read: ['owner', 'admin', 'member'],\n create: ['owner', 'admin', 'member'], update: ['owner', 'admin', 'member'], delete: ['owner'] } })),\n client: { read: ['id', 'team_id', 'title'], create: ['team_id', 'title'], update: ['title'], delete: true },\n }),\n tickets: table({ id: id(), subject: text() }, {\n scope: anyOf(owner(), appRole({ roles: { read: ['staff'], create: ['staff'], update: ['staff'] } })),\n client: { read: true, create: ['subject'], update: ['subject'] },\n }),\n messages: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: parent({ via: 'ticket_id' }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n staff_notes: table({ id: id(), ticket_id: text({ references: 'tickets' }), body: text() }, {\n scope: appRole({ roles: { read: ['staff'], create: ['staff'] } }),\n client: { read: true, create: ['ticket_id', 'body'] },\n }),\n pages: table({ id: id(), title: text(), published: boolean({ default: false }) }, {\n scope: owner(), client: { read: ['id', 'title'], create: ['title'], update: ['title'],\n publicRead: { where: { published: true } } },\n }),\n note_shares: table({ id: id(), grantee_id: text(), note_id: text({ references: 'shared_notes', onDelete: 'cascade' }) }, {\n scope: owner(), unique: [['note_id', 'grantee_id']],\n }),\n shared_notes: table({ id: id(), title: text() }, {\n scope: anyOf(owner(), grant({ table: 'note_shares', grantee: 'grantee_id', row: 'note_id', operations: ['read'] })),\n client: { read: ['id', 'title'], create: ['title'], update: ['title'] },\n }),\n}, { appRoles: { staff: { emailDomain: 'staff.example' } } });\n```\n\nWho is staff is your app's decision; the platform enforces what the role may do.\nFirst choice, as above: emailDomain. The role holds once the person verifies an address\nat that domain; no grant code. An email ending alone proves nothing: anyone can sign up\nas anyone@your-domain without owning that mailbox. Without verification, grant only from\nsomething the visitor cannot choose, such as an invitation your app issued, checked inside\nthe sign-up route: single use, bound to one account, its link delivered only to that person:\nsomewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\nA staff reply is a messages row, and creating a parent() child needs create on the parent\nfor that person: its owner, or a role listed under the parent's create. Read or update is\nnot enough. So tickets lists create: ['staff']; without it every staff reply is refused\n(403 POLICY_AUTHORITY_REQUIRED).\nPublish pages in an owner-checked endpoint. Share with caller-scoped\nsw.db.insert('note_shares', { grantee_id, note_id }); it checks row ownership.\nBrowser calls THROW, not { error }; catch below.\nBrowser list: max 100, paginate after; no order (sort locally or in an endpoint).\n\n```ts\nimport { data } from 'somewhere:data';\nexport async function save(title: string) {\n try { await data.notes.create({ title }); return null; }\n catch (e) { return e instanceof Error ? e.message : 'Save failed'; }\n}\nexport const list = (after?: string) => data.notes.list({ limit: 100, after });\n```\n\nA page that needs several reads: start them together and show it once every read it depends on has answered.\nKeep an input disabled until the data it depends on has loaded, including who the user is.\nNever let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.\n\nTeams are built-in groups: the platform keeps the team, invitations, roster, removal,\nleaving, last owner. Starting a team needs a signed-in user; joining needs a verified\nemail (a password sign-up joins once it enters its emailed code).\nNo email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).\nThe browser cannot call\nsw.groups: pass each call through an endpoint. A parent() child's delete follows the task\n(creator or team owner), so \"comment author or team owner deletes\" is an endpoint.\nStaff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and\nsw.groups.appRoles.grant(request, userId, 'staff') in an endpoint (never to oneself).\nComplete apps and specs: somewhere docs sw.groups --section team-example or staff-example.\n\n```ts\n// api/teams.ts \u2014 GET my teams (completes invitations to me); POST starts one I own\nconst refusal = (e: { code: string; message: string; status: number }) =>\n Response.json({ error: e.code, message: e.message }, { status: e.status });\nexport const GET = sw.endpoint({ auth: 'required', handler: async ({ request }, sw) => {\n const page = await sw.groups.list(request, { limit: 100 });\n return page.error ? refusal(page.error) : { teams: page.data.items, next_cursor: page.data.next_cursor };\n} });\nexport default sw.endpoint({ auth: 'required', body: { name: 'string' }, handler: async ({ request, body }, sw) => {\n const made = await sw.groups.create(request, { name: body.name });\n return made.error ? refusal(made.error) : { id: made.data.id };\n} });\n```\n\n```ts\n// api/teams/[id]/invitations.ts \u2014 owners invite; others 403; a member's address 409 ALREADY_MEMBER\nexport default sw.endpoint({ auth: 'required', body: { email: 'string' }, handler: async ({ request, params, body }, sw) => {\n const sent = await sw.groups.invite(request, params.id, { email: body.email, role: 'member', redirect_uri: '/' });\n return sent.error ? Response.json({ error: sent.error.code }, { status: sent.error.status }) : { delivery: sent.data.delivery };\n} });\n```\n\nSame shape: sw.groups.get/members(request, id), remove(request, id, userId), leave(request, id)\n(last owner: 409 LAST_OWNER), delete(request, id) by owners.\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state.\nGrant ledgers use owner() without browser writes. Undeclarable: arbitrary predicates\n(e.g. expiry) or per-role writable fields (split tables or check that write).\n\nBuild src/pages/HomePage.tsx; routes src/App.tsx + src/routes.ts; auth src/auth/hooks.ts.\nAuth is wired: keep api/auth/[...path].ts; src/config.ts controls providers.\napi/notes/[id]/sub.ts \u2192 params.id; underscore files are helpers. POST: default export;\nGET/DELETE: named exports.\n\n```ts\nexport const GET = sw.endpoint({ auth: 'required', handler: async (_, sw) => sw.db.from('notes', { limit: 100 }) });\n```\n\nsw.db applies caller scopes; sw.db.server bypasses them: authorize first.\nCaller-scoped sw.db.insert needs no client.create grant: client limits only the browser.\nReads: from(table, { where, columns, order: [['id', 'asc']], limit, offset }).\nFilter: { id: { in: ids } }; unique: [['a', 'b']] in schema.\nWrites: insert(table, values), update(table, { where, set }), remove(table, { where }).\ntx takes an ARRAY of write intents, never a callback; pre-generate related IDs.\n\nBrowser: fetch(path, { method: 'POST', credentials: 'same-origin',\nheaders: { 'content-type': 'application/json' }, body: JSON.stringify(values) }).\nAccess cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts\nneed Origin equal to the app URL.\n\nRun somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test\nIt runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from\ntests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.\nKeep each run short:\n- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under\n a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).\n- Stop at the first failure and print what the page showed (page.url(), the visible error\n text). Checks after a failure only wait out their timeouts. app.check() does both.\n- After a fix, rerun only the checks that failed: npx @somewhere-cloud/cli test --failed.\n Keep setup (sign-ups, rows a check needs) outside app.check() so a rerun still has it.\nCall the data endpoint as a signed-in person: app.data(page, { table, operation, id, values })\n(the raw request: somewhere docs declared-data --section calling-the-data-endpoint-directly).\nHelpers from @somewhere-cloud/cli/script (import or require): openAppTest() then app.signUp/signIn/signOut(page)\nthrough your form, app.data(page, { table, operation, id, values, where }) as that person,\napp.expectRefused(page, request, { allowed: ownerPage }), captureResponses, dataReady, launchOptions.\nA rebuilt sign-in form keeps data-sw-auth=\"email\", \"password\", \"sign-up\", \"sign-in\" on its controls,\nor pass app.signUp(page, { form: { email, password, signUp, signIn } }) with your own selectors.\nDeploy raw source, no frontend build; type errors stop upload.\nEmail-domain role: app.signUp(page, { domain: 'staff.example' }), then app.verify(page, person).\nThe complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.\nDiagnose with somewhere errors and somewhere logs.\n\nOn demand:\n- Server paging: `somewhere docs sw.db --section server-read-paging`\n\n## Testing shared access\n\nWith the team endpoints above, the owner invites a fixture by email; test users are verified,\nso its next GET /api/teams shows the team. A test user who still owns a team is not deleted:\ndelete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take\nabout a second, so raise the timeout:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect } from '@somewhere-cloud/cli/testing';\ntest.describe.configure({ timeout: 90_000 });\ntest('owner invites a second user by email', async ({ newUser }) => {\n const [owner, bob] = await Promise.all([newUser(), newUser()]);\n const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();\n expect((await owner.request.post(`/api/teams/${id}/invitations`, { data: { email: bob.email } })).ok()).toBeTruthy();\n const { teams } = await (await bob.request.get('/api/teams')).json();\n expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));\n expect((await owner.request.delete(`/api/teams/${id}`)).status()).toBe(204);\n});\n```\n\nTask-specific skills: `.agents/skills/`. Inspect/update with somewhere skills status/update.\nData/code export limits: `somewhere docs portability`.\nUse this app from Claude as its signed-in user (MCP tools): `somewhere docs sw.endpoint --section mcp-tools-for-claude`.\nsomewhere preview runs your change on a copy of production data with its own sign-in: a preview starts with no users (sign up in it or `somewhere preview user-add`), its sign-in mail is captured (`somewhere preview mail`), and rows private to a production user stay hidden from preview users. Server user lookup, roles and built-in teams work in a preview (its own users, its own copy; team invitations are captured); jobs/cron handlers do not yet: check those in production after promoting (`somewhere docs dev-environments`). Test your change in the preview before you promote it: `somewhere test --preview`.\n";
|
|
14
14
|
export declare const INIT_CLAUDE_MD = "Read AGENTS.md for project instructions.\n";
|
|
@@ -82,9 +82,15 @@ export async function save(title: string) {
|
|
|
82
82
|
export const list = (after?: string) => data.notes.list({ limit: 100, after });
|
|
83
83
|
\`\`\`
|
|
84
84
|
|
|
85
|
+
A page that needs several reads: start them together and show it once every read it depends on has answered.
|
|
86
|
+
Keep an input disabled until the data it depends on has loaded, including who the user is.
|
|
87
|
+
Never let a late answer overwrite what the user typed: fill an input from loaded data only before it is enabled.
|
|
88
|
+
|
|
85
89
|
Teams are built-in groups: the platform keeps the team, invitations, roster, removal,
|
|
86
90
|
leaving, last owner. Starting a team needs a signed-in user; joining needs a verified
|
|
87
|
-
email (a password sign-up joins once it enters its emailed code).
|
|
91
|
+
email (a password sign-up joins once it enters its emailed code).
|
|
92
|
+
No email verification in your app: keep membership in your own table with member() (somewhere docs sw.groups --section relationships-that-are-not-teams) and assign staff with setRoles in the sign-up route (above).
|
|
93
|
+
The browser cannot call
|
|
88
94
|
sw.groups: pass each call through an endpoint. A parent() child's delete follows the task
|
|
89
95
|
(creator or team owner), so "comment author or team owner deletes" is an endpoint.
|
|
90
96
|
Staff making others staff: appRoles { staff: { grantableBy: ['staff'] } } and
|
|
@@ -142,15 +148,15 @@ headers: { 'content-type': 'application/json' }, body: JSON.stringify(values) })
|
|
|
142
148
|
Access cookies refresh automatically. Cookie-auth POST/PATCH/DELETE from scripts
|
|
143
149
|
need Origin equal to the app URL.
|
|
144
150
|
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
151
|
+
Run somewhere test after a successful deploy: npx @somewhere-cloud/cli deploy && npx @somewhere-cloud/cli test
|
|
152
|
+
It runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first. Start from
|
|
153
|
+
tests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.
|
|
148
154
|
Keep each run short:
|
|
149
155
|
- Short waits: page.setDefaultTimeout(5_000) on every page; a deployed app answers in under
|
|
150
156
|
a second. Never sleep for a fixed time: wait for the thing itself (the text, the response).
|
|
151
157
|
- Stop at the first failure and print what the page showed (page.url(), the visible error
|
|
152
158
|
text). Checks after a failure only wait out their timeouts. app.check() does both.
|
|
153
|
-
- After a fix, rerun only the checks that failed:
|
|
159
|
+
- After a fix, rerun only the checks that failed: npx @somewhere-cloud/cli test --failed.
|
|
154
160
|
Keep setup (sign-ups, rows a check needs) outside app.check() so a rerun still has it.
|
|
155
161
|
Call the data endpoint as a signed-in person: app.data(page, { table, operation, id, values })
|
|
156
162
|
(the raw request: somewhere docs declared-data --section calling-the-data-endpoint-directly).
|
|
@@ -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,kBAAkB,CAAC;AAE9C,2EAA2E;AAC3E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG
|
|
1
|
+
{"version":3,"file":"init-agent-guide.js","sourceRoot":"","sources":["../../src/lib/init-agent-guide.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,2EAA2E;AAC3E,0EAA0E;AAC1E,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgM7B,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,2BAA2B,UAAU,0DAA0D,CAAC;AAE9H,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;kFACkF;AAClF,MAAM,CAAC,MAAM,eAAe,GAAG,omBAAomB,CAAC;AAEpoB,MAAM,CAAC,MAAM,cAAc,GAAG,uCAAuC,cAAc,KAAK,cAAc,KAAK,mBAAmB,KAAK,WAAW,KAAK,eAAe,IAAI,CAAC;AACvK,MAAM,CAAC,MAAM,cAAc,GAAG,4CAA4C,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { starterTests } from './init-test-template.js';
|
|
2
|
+
import { buildScaffoldGitignore } from './scaffold.js';
|
|
2
3
|
import { CLI_VERSION } from './version.js';
|
|
3
4
|
import { ASSET_TYPES_FILE } from './init-asset-types.js';
|
|
4
5
|
import { INIT_AGENTS_MD, INIT_CLAUDE_MD } from './init-agent-guide.js';
|
|
@@ -112,19 +113,19 @@ export interface MfaContinuation {
|
|
|
112
113
|
capture(reason: unknown): boolean;
|
|
113
114
|
}
|
|
114
115
|
|
|
116
|
+
/** One form, both actions: Sign in and Create account are both on the page. */
|
|
115
117
|
export interface CredentialsForm {
|
|
116
118
|
mfa: MfaContinuation;
|
|
117
|
-
mode: CredentialsMode;
|
|
118
119
|
email: string;
|
|
119
120
|
password: string;
|
|
120
121
|
passwordMinLength: number;
|
|
121
|
-
|
|
122
|
+
/** The action under way, or null. */
|
|
123
|
+
pending: CredentialsMode | null;
|
|
122
124
|
error: string | null;
|
|
123
|
-
canSubmit: boolean;
|
|
124
125
|
setEmail(value: string): void;
|
|
125
126
|
setPassword(value: string): void;
|
|
126
|
-
|
|
127
|
-
submit(): Promise<void>;
|
|
127
|
+
/** Runs the action with the fields as typed. A missing field or a short new password is the app's own error. */
|
|
128
|
+
submit(action: CredentialsMode): Promise<void>;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
export interface SignOutAction {
|
|
@@ -307,50 +308,36 @@ export function useAuthState(): AuthState {
|
|
|
307
308
|
}
|
|
308
309
|
}
|
|
309
310
|
|
|
310
|
-
export function useCredentialsForm(
|
|
311
|
+
export function useCredentialsForm(): CredentialsForm {
|
|
311
312
|
const auth = useAuth();
|
|
312
|
-
const [mode, setMode] = useState<CredentialsMode>(initialMode);
|
|
313
313
|
const [email, setEmail] = useState('');
|
|
314
314
|
const [password, setPassword] = useState('');
|
|
315
|
-
const [pending, setPending] = useState(
|
|
315
|
+
const [pending, setPending] = useState<CredentialsMode | null>(null);
|
|
316
316
|
const [error, setError] = useState<string | null>(null);
|
|
317
317
|
|
|
318
318
|
const mfa = useMfaContinuation();
|
|
319
|
-
const passwordReady = mode === 'sign-up' ? password.length >= PASSWORD_MIN_LENGTH : password.length > 0;
|
|
320
|
-
const canSubmit = !pending && email.trim() !== '' && passwordReady;
|
|
321
319
|
|
|
322
|
-
async function submit() {
|
|
323
|
-
if (
|
|
324
|
-
|
|
320
|
+
async function submit(action: CredentialsMode) {
|
|
321
|
+
if (pending) return;
|
|
322
|
+
if (!email.trim() || !password) { setError('Enter your email and password.'); return; }
|
|
323
|
+
if (action === 'sign-up' && password.length < PASSWORD_MIN_LENGTH) {
|
|
324
|
+
setError('Use at least ' + PASSWORD_MIN_LENGTH + ' characters for a new password.');
|
|
325
|
+
return;
|
|
326
|
+
}
|
|
327
|
+
setPending(action);
|
|
325
328
|
setError(null);
|
|
326
329
|
try {
|
|
327
330
|
const credentials = { email: email.trim(), password };
|
|
328
|
-
await (
|
|
331
|
+
await (action === 'sign-in' ? auth.signIn(credentials) : auth.signUp(credentials));
|
|
329
332
|
// The provider now has the user; App replaces the sign-in page.
|
|
330
333
|
} catch (reason: unknown) {
|
|
331
334
|
if (!mfa.capture(reason)) setError(authErrorMessage(reason));
|
|
332
335
|
setPassword('');
|
|
333
|
-
setPending(
|
|
336
|
+
setPending(null);
|
|
334
337
|
}
|
|
335
338
|
}
|
|
336
339
|
|
|
337
|
-
return {
|
|
338
|
-
mfa,
|
|
339
|
-
mode,
|
|
340
|
-
email,
|
|
341
|
-
password,
|
|
342
|
-
passwordMinLength: PASSWORD_MIN_LENGTH,
|
|
343
|
-
pending,
|
|
344
|
-
error,
|
|
345
|
-
canSubmit,
|
|
346
|
-
setEmail,
|
|
347
|
-
setPassword,
|
|
348
|
-
toggleMode() {
|
|
349
|
-
setMode(mode === 'sign-in' ? 'sign-up' : 'sign-in');
|
|
350
|
-
setError(null);
|
|
351
|
-
},
|
|
352
|
-
submit,
|
|
353
|
-
};
|
|
340
|
+
return { mfa, email, password, passwordMinLength: PASSWORD_MIN_LENGTH, pending, error, setEmail, setPassword, submit };
|
|
354
341
|
}
|
|
355
342
|
|
|
356
343
|
export function useSignOut(): SignOutAction {
|
|
@@ -1591,7 +1578,7 @@ export function AssistantPanel({ assistant }: { assistant: AssistantController }
|
|
|
1591
1578
|
{view.status === 'error' ? <button type="button" className="button button--quiet" onClick={assistant.reload}>Try again</button> : null}
|
|
1592
1579
|
</div>
|
|
1593
1580
|
) : null}
|
|
1594
|
-
<form className="composer" onSubmit={onSubmit} aria-label="Send a message">
|
|
1581
|
+
<form className="composer" onSubmit={onSubmit} noValidate aria-label="Send a message">
|
|
1595
1582
|
<div className="field">
|
|
1596
1583
|
<label htmlFor="assistant-message">Message</label>
|
|
1597
1584
|
<textarea id="assistant-message" rows={2} maxLength={assistant.limit} disabled={loading || assistant.readOnly}
|
|
@@ -1678,7 +1665,7 @@ export function AssistantPanel({ assistant }: { assistant: AssistantController }
|
|
|
1678
1665
|
{view.status === 'error' ? <button type="button" onClick={assistant.reload}>Try again</button> : null}
|
|
1679
1666
|
</div>
|
|
1680
1667
|
) : null}
|
|
1681
|
-
<form onSubmit={onSubmit} aria-label="Send a message">
|
|
1668
|
+
<form onSubmit={onSubmit} noValidate aria-label="Send a message">
|
|
1682
1669
|
<label htmlFor="assistant-message">Message</label>
|
|
1683
1670
|
<textarea id="assistant-message" rows={2} maxLength={assistant.limit} disabled={loading || assistant.readOnly}
|
|
1684
1671
|
value={assistant.draft} onChange={(event) => assistant.setDraft(event.target.value)} />
|
|
@@ -1821,7 +1808,7 @@ export function MfaStep({ continuation }: { continuation: MfaContinuation }) {
|
|
|
1821
1808
|
const busy = continuation.pending || continuation.resending;
|
|
1822
1809
|
return (
|
|
1823
1810
|
<main className="loading">
|
|
1824
|
-
<form className="panel auth__form" onSubmit={(event) => { event.preventDefault(); void continuation.submit(); }}>
|
|
1811
|
+
<form className="panel auth__form" onSubmit={(event) => { event.preventDefault(); void continuation.submit(); }} noValidate>
|
|
1825
1812
|
<h1 className="panel__title">Check your email</h1>
|
|
1826
1813
|
<p>We emailed you a 6-digit sign-in code. It expires 5 minutes after you signed in.</p>
|
|
1827
1814
|
<div className="field">
|
|
@@ -2736,7 +2723,7 @@ export function MagicLinkStatus({ landing }: { landing: Exclude<MagicLinkLanding
|
|
|
2736
2723
|
if (landing.status === 'confirm') {
|
|
2737
2724
|
return (
|
|
2738
2725
|
<main className="loading">
|
|
2739
|
-
<form className="panel auth__form" onSubmit={(event) => { event.preventDefault(); landing.confirm(); }} aria-label="Continue with your emailed link">
|
|
2726
|
+
<form className="panel auth__form" onSubmit={(event) => { event.preventDefault(); landing.confirm(); }} noValidate aria-label="Continue with your emailed link">
|
|
2740
2727
|
<p>This link signs you in with the email address it was sent to, and accepts the invitation if it carries one. It works once.</p>
|
|
2741
2728
|
{landing.signedInAs
|
|
2742
2729
|
? <p className="hint">You are signed in here as {landing.signedInAs}. Continuing signs that account out first.</p>
|
|
@@ -2793,7 +2780,7 @@ export function MagicLinkStatus({ landing }: { landing: Exclude<MagicLinkLanding
|
|
|
2793
2780
|
if (landing.status === 'confirm') {
|
|
2794
2781
|
return (
|
|
2795
2782
|
<main>
|
|
2796
|
-
<form onSubmit={(event) => { event.preventDefault(); landing.confirm(); }} aria-label="Continue with your emailed link">
|
|
2783
|
+
<form onSubmit={(event) => { event.preventDefault(); landing.confirm(); }} noValidate aria-label="Continue with your emailed link">
|
|
2797
2784
|
<p>This link signs you in with the email address it was sent to, and accepts the invitation if it carries one. It works once.</p>
|
|
2798
2785
|
{landing.signedInAs ? <p>You are signed in here as {landing.signedInAs}. Continuing signs that account out first.</p> : null}
|
|
2799
2786
|
{landing.error ? <p role="alert">{landing.error}</p> : null}
|
|
@@ -3194,11 +3181,11 @@ export function createFeatureTemplate(selection, options) {
|
|
|
3194
3181
|
const magicLink = selection.modules.includes('magic-link');
|
|
3195
3182
|
const files = [
|
|
3196
3183
|
...starterTests({ privateData }),
|
|
3197
|
-
{ path: '.gitignore', content:
|
|
3184
|
+
{ path: '.gitignore', content: buildScaffoldGitignore() },
|
|
3198
3185
|
{ path: 'AGENTS.md', content: INIT_AGENTS_MD.replace(/## Getting started[^]*?After edits:/, `## Testing
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3186
|
+
Run somewhere test after a successful deploy: npx somewhere deploy && npx somewhere test
|
|
3187
|
+
It runs every tests/*.mjs and tests/*.cjs Playwright script and prints failures first.
|
|
3188
|
+
Start from tests/app-check.mjs: change its checks to the journeys you changed and your access boundaries.
|
|
3202
3189
|
Helpers from @somewhere-cloud/cli/script (import or require): signUp/signIn/signOut through your form,
|
|
3203
3190
|
data(page, { table, operation, id, values, where }) as that person, expectRefused with a positive control,
|
|
3204
3191
|
captureResponses, dataReady (the list has loaded), launchOptions. A rebuilt sign-in form keeps
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-feature-template.js","sourceRoot":"","sources":["../../src/lib/init-feature-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAW5I,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;+BAeU,WAAW;;;;;;;;;;;CAWzC,CAAC;AAEF,MAAM,QAAQ,GAAG;;;;;;;;;;;;;;CAchB,CAAC;AAEF,SAAS,SAAS,CAAC,OAAe;IAChC,6EAA6E;IAC7E,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACjH,OAAO;;;;;aAKI,KAAK;wCACsB,KAAK;;;;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OAAO,EAAE,aAAa,EAAE,EAC5D,EAAE,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,kBAAkB,EAAE,EAClE,EAAE,IAAI,EAAE,qCAAqC,EAAE,OAAO,EAAE,uBAAuB,EAAE,EACjF,EAAE,IAAI,EAAE,2BAA2B,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,qBAAqB,EAAE,EACvG,EAAE,IAAI,EAAE,+BAA+B,EAAE,OAAO,EAAE,uBAAuB,EAAE,CAC5E,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CLI_VERSION } from './version.js';
|
|
2
|
+
import { buildScaffoldGitignore } from './scaffold.js';
|
|
2
3
|
import { INIT_AGENTS_MD, INIT_CLAUDE_MD } from './init-agent-guide.js';
|
|
3
4
|
import { ASSET_TYPES_FILE } from './init-asset-types.js';
|
|
4
5
|
const PACKAGE_JSON = `{
|
|
@@ -167,7 +168,7 @@ Deploy the raw source. The platform compiles it; do not create or deploy a
|
|
|
167
168
|
`;
|
|
168
169
|
export function createGreenTemplate() {
|
|
169
170
|
return [
|
|
170
|
-
{ path: '.gitignore', content:
|
|
171
|
+
{ path: '.gitignore', content: buildScaffoldGitignore() },
|
|
171
172
|
{ path: 'AGENTS.md', content: INIT_AGENTS_MD },
|
|
172
173
|
{ path: 'CLAUDE.md', content: INIT_CLAUDE_MD },
|
|
173
174
|
{ path: 'README.md', content: README },
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"init-green-template.js","sourceRoot":"","sources":["../../src/lib/init-green-template.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAA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AAa,EAAE,OAAO,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,3 +1,4 @@
|
|
|
1
|
+
import { buildScaffoldGitignore } from './scaffold.js';
|
|
1
2
|
import { INIT_AGENTS_MD, INIT_CLAUDE_MD } from './init-agent-guide.js';
|
|
2
3
|
const PACKAGE_JSON = `{
|
|
3
4
|
"name": "somewhere-happy-path",
|
|
@@ -384,7 +385,7 @@ Deploy the raw source. There is intentionally no build script.
|
|
|
384
385
|
`;
|
|
385
386
|
export function createHappyPathTemplate() {
|
|
386
387
|
return [
|
|
387
|
-
{ path: '.gitignore', content:
|
|
388
|
+
{ path: '.gitignore', content: buildScaffoldGitignore() },
|
|
388
389
|
{ path: 'AGENTS.md', content: INIT_AGENTS_MD },
|
|
389
390
|
{ path: 'CLAUDE.md', content: INIT_CLAUDE_MD },
|
|
390
391
|
{ path: 'README.md', content: README },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-template.js","sourceRoot":"","sources":["../../src/lib/init-template.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvE,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;CAu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AE,QAAQ,EAAE;QAC5C;YACE,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,2IAA2I;SACrJ;QACD;YACE,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,8RAA8R;SACxS;QACD,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,aAAa,EAAE;QACvD,EAAE,IAAI,EAAE,uBAAuB,EAAE,OAAO,EAAE,aAAa,EAAE;QACzD,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,aAAa,EAAE;QAC/C,EAAE,IAAI,EAAE,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE;QACnD,EAAE,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,SAAS,EAAE;QAChD,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,YAAY,EAAE;QACtD,EAAE,IAAI,EAAE,wBAAwB,EAAE,OAAO,EAAE,SAAS,EAAE;QACtD,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,GAAG,EAAE;QACrC,EAAE,IAAI,EAAE,cAAc,EAAE,OAAO,EAAE,IAAI,EAAE;QACvC,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,EAAE;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// One short, ordinary Playwright script an agent copies and changes
|
|
2
|
-
//
|
|
1
|
+
// One short, ordinary Playwright script an agent copies and changes: `somewhere test` runs every
|
|
2
|
+
// tests/*.mjs and tests/*.cjs script when the project has no tests/**/*.spec.ts. The helpers come
|
|
3
3
|
// from @somewhere-cloud/cli/script and work the same from .mjs or .cjs.
|
|
4
4
|
const SCRIPT = (privateData) => `// tests/app-check.mjs — an ordinary Playwright script for this app: change the checks to match
|
|
5
5
|
// what you built. Run it after a successful deploy, never after a refused one:
|
|
6
|
-
// npx somewhere deploy &&
|
|
6
|
+
// npx somewhere deploy && npx somewhere test (runs every tests/*.mjs and *.cjs script)
|
|
7
7
|
// It writes its result once to .somewhere/app-check.json; the exit code is the verdict.
|
|
8
8
|
// It stops at the first failed check and prints the page's URL and visible error text.
|
|
9
|
-
// After a fix, rerun only what failed:
|
|
9
|
+
// After a fix, rerun only what failed: npx somewhere test --failed (keep setup outside app.check).
|
|
10
10
|
// From a .cjs script: const { openAppTest } = require('@somewhere-cloud/cli/script');
|
|
11
11
|
import { chromium } from '@playwright/test';
|
|
12
12
|
import { openAppTest${privateData ? ', captureResponses, dataReady' : ''} } from '@somewhere-cloud/cli/script';
|
|
@@ -42,7 +42,11 @@ ${privateData ? ` await app.check('a note stays private to its owner', async ()
|
|
|
42
42
|
await app.expectRefused(ben.page, { table: 'notes', operation: 'update', id: note.id, values: { title: 'changed' } }, { allowed: ana.page });
|
|
43
43
|
await app.expectRefused(ben.page, { table: 'notes', operation: 'delete', id: note.id }, { allowed: ana.page });
|
|
44
44
|
});
|
|
45
|
-
` :
|
|
45
|
+
` : ` // Your own tables (db/schema.ts), called as a signed-in person: app.data adds the release's
|
|
46
|
+
// data contract and the Origin, and says ok, empty or refused. No need to read either from the page.
|
|
47
|
+
// const { data: [task] } = await app.data(ana.page, { table: 'tasks', operation: 'list' });
|
|
48
|
+
// await app.expectRefused(ben.page, { table: 'tasks', operation: 'get', id: task.id }, { allowed: ana.page });
|
|
49
|
+
`} await app.check('at phone width nothing scrolls sideways', async () => {
|
|
46
50
|
await ana.page.setViewportSize({ width: 390, height: 844 });
|
|
47
51
|
await ana.page.reload();
|
|
48
52
|
await ana.page.getByText(ana.account.email).waitFor();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-test-template.js","sourceRoot":"","sources":["../../src/lib/init-test-template.ts"],"names":[],"mappings":"AAEA,
|
|
1
|
+
{"version":3,"file":"init-test-template.js","sourceRoot":"","sources":["../../src/lib/init-test-template.ts"],"names":[],"mappings":"AAEA,iGAAiG;AACjG,kGAAkG;AAClG,wEAAwE;AAExE,MAAM,MAAM,GAAG,CAAC,WAAoB,EAAE,EAAE,CAAC;;;;;;;;sBAQnB,WAAW,CAAC,CAAC,CAAC,+BAA+B,CAAC,CAAC,CAAC,EAAE;;;;;;;;;;;;;;;;;;EAkBtE,WAAW,CAAC,CAAC,CAAC;;;;;;;;;;;;;;;CAef,CAAC,CAAC,CAAC;;;;CAIH;;;;;;;;;;;;;;CAcA,CAAC;AAEF,kGAAkG;AAClG,MAAM,UAAU,YAAY,CAAC,UAAqC,EAAE;IAClE,OAAO,CAAC,EAAE,IAAI,EAAE,qBAAqB,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC;AAC1F,CAAC"}
|