@somewhere-cloud/cli 0.38.85 → 0.38.87
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 +174 -7
- package/dist/commands/deploy.js +12 -5
- package/dist/commands/deploy.js.map +1 -1
- package/dist/commands/docs.js +4 -3
- package/dist/commands/docs.js.map +1 -1
- package/dist/lib/deploy-tests.d.ts +6 -0
- package/dist/lib/deploy-tests.js +13 -4
- package/dist/lib/deploy-tests.js.map +1 -1
- package/dist/lib/init-agent-guide.d.ts +2 -2
- package/dist/lib/init-agent-guide.js +55 -69
- package/dist/lib/init-agent-guide.js.map +1 -1
- package/dist/lib/init-test-template.js +12 -3
- package/dist/lib/init-test-template.js.map +1 -1
- package/dist/lib/init-ui-kit.d.ts +1 -1
- package/dist/lib/init-ui-kit.js +21 -3
- package/dist/lib/init-ui-kit.js.map +1 -1
- package/dist/lib/playwright-fixtures.js +49 -28
- package/dist/lib/playwright-fixtures.js.map +1 -1
- package/dist/lib/test-inputs.d.ts +23 -0
- package/dist/lib/test-inputs.js +42 -0
- package/dist/lib/test-inputs.js.map +1 -0
- package/dist/lib/test-ledger.d.ts +34 -16
- package/dist/lib/test-ledger.js +131 -58
- package/dist/lib/test-ledger.js.map +1 -1
- package/dist/lib/test-reporter.d.ts +3 -0
- package/dist/lib/test-reporter.js +61 -28
- package/dist/lib/test-reporter.js.map +1 -1
- package/dist/lib/test-run.d.ts +1 -0
- package/dist/lib/test-run.js +25 -9
- package/dist/lib/test-run.js.map +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docs.js","sourceRoot":"","sources":["../../src/commands/docs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,EAAE,mBAA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,gDAAgD,CAAC,CAAC;gBACrH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;YAClB,CAAC;YACD,IAAI,IAAI,CAAC,IAAI,EAAE,CAAC;gBACd,SAAS,CAAC;oBACR,KAAK,EAAE,GAAG;oBACV,GAAG,EAAE,SAAS,GAAG,KAAK,CAAC,IAAI;oBAC3B,OAAO,EAAE,MAAM,GAAG,CAAC,IAAI,EAAE;iBAC1B,CAAC,CAAC;gBACH,OAAO;YACT,CAAC;YACD,MAAM,yBAAyB,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,KAAK,CAAC,mBAAmB,SAAS,8BAA8B,CAAC,YAAY,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC;YAClH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -23,5 +23,11 @@ export declare function runDeployTests(input: {
|
|
|
23
23
|
renderPending: boolean;
|
|
24
24
|
prepared: Promise<PreparedOrError>;
|
|
25
25
|
}): Promise<DeployTests>;
|
|
26
|
+
/** Passed only when the runner passed AND confirmed, at the end, that the release it tested is the
|
|
27
|
+
* one this deploy published. */
|
|
28
|
+
export declare function deployTestStatus(exitCode: number, results: Record<string, unknown> | null, expected: string): {
|
|
29
|
+
status: 'passed' | 'failed';
|
|
30
|
+
reason?: string;
|
|
31
|
+
};
|
|
26
32
|
/** The plain closing line: the deploy and its tests are reported separately, never as one green. */
|
|
27
33
|
export declare function formatDeployTestsLine(tests: DeployTests): string;
|
package/dist/lib/deploy-tests.js
CHANGED
|
@@ -27,8 +27,7 @@ export async function runDeployTests(input) {
|
|
|
27
27
|
mark('deploy-test:start');
|
|
28
28
|
try {
|
|
29
29
|
const outcome = await runTests({ root: input.root, client: input.client, projectId: input.projectId, prepared: prepared.value, options: { workers: '5', json: input.json }, expectRelease: input.release, toStderr: input.json });
|
|
30
|
-
|
|
31
|
-
return { status: passed ? 'passed' : 'failed', release, results: outcome.results, ...(outcome.results ? {} : { reason: 'the runner wrote no results' }) };
|
|
30
|
+
return { ...deployTestStatus(outcome.exitCode, outcome.results, input.release), release, results: outcome.results };
|
|
32
31
|
}
|
|
33
32
|
catch (error) {
|
|
34
33
|
return notRun(error instanceof Error ? error.message : String(error));
|
|
@@ -37,13 +36,23 @@ export async function runDeployTests(input) {
|
|
|
37
36
|
mark('deploy-test:end');
|
|
38
37
|
}
|
|
39
38
|
}
|
|
39
|
+
/** Passed only when the runner passed AND confirmed, at the end, that the release it tested is the
|
|
40
|
+
* one this deploy published. */
|
|
41
|
+
export function deployTestStatus(exitCode, results, expected) {
|
|
42
|
+
if (!results)
|
|
43
|
+
return { status: 'failed', reason: 'the runner wrote no results' };
|
|
44
|
+
if (results.releaseConfirmed !== true || results.release !== expected)
|
|
45
|
+
return { status: 'failed', reason: `the tests did not run against ${expected} from start to end (${String(results.release)})` };
|
|
46
|
+
return exitCode === 0 ? { status: 'passed' } : { status: 'failed' };
|
|
47
|
+
}
|
|
40
48
|
/** The plain closing line: the deploy and its tests are reported separately, never as one green. */
|
|
41
49
|
export function formatDeployTestsLine(tests) {
|
|
42
50
|
const r = tests.results;
|
|
51
|
+
const skipped = r?.skipped ? `, ${r.skipped} skipped (a skipped test proves nothing)` : '';
|
|
43
52
|
if (tests.status === 'passed')
|
|
44
|
-
return `The deploy is live and its tests passed: ${r?.passed ?? 0} passed on ${tests.release}.`;
|
|
53
|
+
return `The deploy is live and its tests passed: ${r?.passed ?? 0} passed${skipped} on ${tests.release}.`;
|
|
45
54
|
if (tests.status === 'failed')
|
|
46
|
-
return `The deploy is live. Its tests FAILED: ${r?.failed ?? 0} failed, ${r?.passed ?? 0} passed${r?.setupErrors ? `, ${r.setupErrors} setup errors` : ''}${tests.reason ? ` (${tests.reason})` : ''} on ${tests.release}. After fixing a test: somewhere test --failed. After fixing the app: somewhere deploy --test.`;
|
|
55
|
+
return `The deploy is live. Its tests FAILED: ${r?.failed ?? 0} failed, ${r?.passed ?? 0} passed${skipped}${r?.setupErrors ? `, ${r.setupErrors} setup errors` : ''}${tests.reason ? ` (${tests.reason})` : ''} on ${tests.release}. After fixing a test: somewhere test --failed. After fixing the app: somewhere deploy --test.`;
|
|
47
56
|
return `The deploy is live. Its tests did NOT run: ${tests.reason}.`;
|
|
48
57
|
}
|
|
49
58
|
//# sourceMappingURL=deploy-tests.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-tests.js","sourceRoot":"","sources":["../../src/lib/deploy-tests.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAuB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAgB1C,MAAM,UAAU,kBAAkB,CAAC,KAAoC;IACrE,OAAO,KAAK,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC,KAAc,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AAC7E,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAGpC;IACC,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,IAAI,CAAC;IACtC,MAAM,MAAM,GAAG,CAAC,MAAc,EAAe,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACzF,IAAI,KAAK,CAAC,SAAS;QAAE,OAAO,MAAM,CAAC,yFAAyF,CAAC,CAAC;IAC9H,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,OAAO;QAAE,OAA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,CAAC,WAAW,eAAe,CAAC,CAAC,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,CAAC,OAAO,gGAAgG,CAAC;IAClW,OAAO,8CAA8C,KAAK,CAAC,MAAM,GAAG,CAAC;AACvE,CAAC"}
|
|
@@ -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 adds members; members read/write; creator rights | teams/team_members/tasks: owner() + member(); role-owner delete branch |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain |\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; member() gates placement (non-member create is\nrefused), while creators or the allowed branch can delete. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, member, anyOf, serverOnly, 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 teams: table({ id: id(), name: text(), owner_id: text() }, {\n scope: member({ group: 'id', membership: 'team_members', member_user: 'user_id', member_group: 'team_id' }),\n client: { read: ['id', 'name'] },\n }),\n team_members: table({ id: id(), team_id: text(), user_id: text(), role: text() }, {\n scope: serverOnly(), unique: [['team_id', 'user_id']],\n }),\n tasks: table({ id: id(), team_id: text({ references: 'teams' }), title: text() }, {\n scope: anyOf(owner(), member({ group: 'team_id', membership: 'team_members',\n member_user: 'user_id', member_group: 'team_id', operations: ['read', 'create', 'update'] }),\n member({ group: 'team_id', membership: 'team_members', member_user: 'user_id',\n member_group: 'team_id', where: { role: 'owner' }, operations: ['delete'] })),\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: somewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\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 without verification: own membership table + member(); sw.groups and domain\nroles need VERIFIED emails. Members read/create/update tasks; creators or team owners delete while members.\nRestrictions narrow operations, not grant read.\nComment author or team owner deletes: declare it as tasks do (owner() plus member() where role owner, delete).\nCreate the team and its owner membership atomically:\n\n```ts\n// api/teams.ts\nexport default sw.endpoint({\n auth: 'required', body: { name: 'string' },\n handler: async ({ user, params, body }, sw) => {\n const id = crypto.randomUUID();\n await sw.db.server.tx([\n { op: 'insert', table: 'teams', values: { id, name: body.name, owner_id: user.id } },\n { op: 'insert', table: 'team_members', values: { id: crypto.randomUUID(), team_id: id, user_id: user.id, role: 'owner' } },\n ]);\n return { id, email: user.email };\n },\n});\n```\n\n```ts\n// api/teams/[id]/members.ts \u2014 only the team owner adds a member\nexport default sw.endpoint({\n auth: 'required', body: { email: 'string' },\n handler: async ({ user, params, body }, sw) => {\n const { data: teams } = await sw.db.from('teams', { where: { id: params.id, owner_id: user.id }, limit: 1 });\n if (!teams[0]) return Response.json({ error: 'Team owner required' }, { status: 403 });\n const { users: [target] } = await sw.auth.server.listUsers({ emails: [body.email] });\n if (!target) return Response.json({ error: 'Account not found' }, { status: 404 });\n await sw.db.server.insert('team_members', {\n id: crypto.randomUUID(), team_id: params.id, user_id: target.id, role: 'member',\n }, { onConflict: 'ignore' });\n return { ok: true };\n },\n});\n```\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state and protected membership ledgers.\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\nPublish: npx @somewhere-cloud/cli deploy, then somewhere test for the rules you changed.\nOne somewhere test run drives the UI and calls the API: signUp(page) uses your sign-up form\n(then signOut, signIn with its password, verify with the emailed code), newUser() acts as\nseveral people, and ready(page, 'signed-in' | 'signed-out') waits for the session check.\nYou do not need a separate browser script.\nStart from the starter's tests/account, phone and access specs: one journey per test, its own people.\nOne somewhere test runs every spec, old and new together; somewhere deploy --test deploys, then runs them once.\nAfter fixing a test, run only what failed: somewhere test --failed (passed results on this release are kept).\nDo not rerun a suite that is already green on this release.\nDeploy raw source, no frontend build; type errors stop upload.\nnewUser() gives a signed-in page/API client; make people at once: await Promise.all([newUser(), newUser()]).\nnewUser({ role: 'staff' }) holds a role declared in appRoles, granted with your developer key.\nnewUser() takes no chosen email. Test users are verified and visible to this project's server user lookup.\nEmail-domain role: signUp(page, { domain: 'staff.example' }), then verify(page, person); newPage() for a second person.\nRefusals: await expectRefused(person, 'notes', { operation: 'update', id, values }, { allowed: owner }) or\nexpectRefused(person, 'POST /api/x', body, { allowed }). allowed is someone the same request succeeds for;\nan empty list, a null get or a 404 counts as refused only then. person/allowed: page, newUser() or anonymous.\nsomewhere test --phone runs every test again at 390x844.\nFor the complete owner-adds-member-by-email test and its endpoints, run\nsomewhere docs test and follow Two users sharing through the app.\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 teams and membership endpoints above, the owner adds a fixture by email\nand that fixture reads the shared team row:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect, data } from '@somewhere-cloud/cli/testing';\ntest('owner adds a second user by email', async ({ newUser }) => {\n const owner = await newUser();\n const bob = await newUser();\n const name = `Shared team ${crypto.randomUUID()}`;\n const created = await owner.request.post('/api/teams', { data: { name } });\n expect(created.ok()).toBeTruthy();\n const { id } = await created.json();\n const added = await owner.request.post(`/api/teams/${id}/members`, { data: { email: bob.email } });\n expect(added.ok()).toBeTruthy();\n const response = await data(bob.request, 'teams', { operation: 'get', id });\n expect(response.ok()).toBeTruthy();\n expect((await response.json()).data).toMatchObject({ id, name });\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.\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\nPublish: npx @somewhere-cloud/cli deploy, then somewhere test for the rules you changed.\nOne somewhere test run drives the UI and calls the API: signUp(page) uses your sign-up form\n(then signOut, signIn with its password, verify with the emailed code), newUser() acts as\nseveral people, and ready(page, 'signed-in' | 'signed-out') waits for the session check.\nYou do not need a separate browser script.\nStart from the starter's tests/account, phone and access specs: one journey per test, its own people.\nOne somewhere test runs every spec, old and new together; somewhere deploy --test deploys, then runs them once.\nAfter fixing a test, run only what is owed: somewhere test --failed (results that still hold are kept).\nDo not rerun a suite that is already green on this release.\nDeploy raw source, no frontend build; type errors stop upload.\nnewUser() gives a signed-in page/API client; make people at once: await Promise.all([newUser(), newUser()]).\nnewUser({ role: 'staff' }) holds a role declared in appRoles, granted with your developer key;\nit tests what staff may do, not how someone becomes staff.\nnewUser() takes no chosen email. Test users are verified and visible to this project's server user lookup.\nEmail-domain role: signUp(page, { domain: 'staff.example' }), then verify(page, person); newPage() for a second person.\nRefusals: await expectRefused(person, 'notes', { operation: 'update', id, values }, { allowed: owner }) or\nexpectRefused(person, 'POST /api/x', body, { allowed }). allowed is someone the same request succeeds for;\nan empty list, a null get or a 404 counts as refused only then. person/allowed: page, newUser() or anonymous.\nsomewhere test --phone runs every test again at 390x844.\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:
|
|
@@ -7,5 +7,5 @@ export declare const DECLARED_ACCESS_POINTER = "";
|
|
|
7
7
|
export declare const PORTABILITY_POINTER = "Data/code export limits: `somewhere docs portability`.";
|
|
8
8
|
/** One line: using the app from Claude as its signed-in user (MCP tools). */
|
|
9
9
|
export declare const MCP_POINTER = "Use this app from Claude as its signed-in user (MCP tools): `somewhere docs sw.endpoint --section mcp-tools-for-claude`.";
|
|
10
|
-
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 adds members; members read/write; creator rights | teams/team_members/tasks: owner() + member(); role-owner delete branch |\n| Owner/staff record with staff-only child notes | tickets: owner() or appRole(); parent() thread; staff-only notes; staff by verified emailDomain |\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; member() gates placement (non-member create is\nrefused), while creators or the allowed branch can delete. Other fields: timestamp({ default: 'now' }), text({ nullable: true });\nindexes: [['team_id']].\n\n```ts\nimport { schema, table, id, text, owner, member, anyOf, serverOnly, 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 teams: table({ id: id(), name: text(), owner_id: text() }, {\n scope: member({ group: 'id', membership: 'team_members', member_user: 'user_id', member_group: 'team_id' }),\n client: { read: ['id', 'name'] },\n }),\n team_members: table({ id: id(), team_id: text(), user_id: text(), role: text() }, {\n scope: serverOnly(), unique: [['team_id', 'user_id']],\n }),\n tasks: table({ id: id(), team_id: text({ references: 'teams' }), title: text() }, {\n scope: anyOf(owner(), member({ group: 'team_id', membership: 'team_members',\n member_user: 'user_id', member_group: 'team_id', operations: ['read', 'create', 'update'] }),\n member({ group: 'team_id', membership: 'team_members', member_user: 'user_id',\n member_group: 'team_id', where: { role: 'owner' }, operations: ['delete'] })),\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: somewhere docs sw.auth --section server-assigned-app-roles-setroles.\nmessages use parent(): owner() would hide staff replies from the customer.\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 without verification: own membership table + member(); sw.groups and domain\nroles need VERIFIED emails. Members read/create/update tasks; creators or team owners delete while members.\nRestrictions narrow operations, not grant read.\nComment author or team owner deletes: declare it as tasks do (owner() plus member() where role owner, delete).\nCreate the team and its owner membership atomically:\n\n```ts\n// api/teams.ts\nexport default sw.endpoint({\n auth: 'required', body: { name: 'string' },\n handler: async ({ user, params, body }, sw) => {\n const id = crypto.randomUUID();\n await sw.db.server.tx([\n { op: 'insert', table: 'teams', values: { id, name: body.name, owner_id: user.id } },\n { op: 'insert', table: 'team_members', values: { id: crypto.randomUUID(), team_id: id, user_id: user.id, role: 'owner' } },\n ]);\n return { id, email: user.email };\n },\n});\n```\n\n```ts\n// api/teams/[id]/members.ts \u2014 only the team owner adds a member\nexport default sw.endpoint({\n auth: 'required', body: { email: 'string' },\n handler: async ({ user, params, body }, sw) => {\n const { data: teams } = await sw.db.from('teams', { where: { id: params.id, owner_id: user.id }, limit: 1 });\n if (!teams[0]) return Response.json({ error: 'Team owner required' }, { status: 403 });\n const { users: [target] } = await sw.auth.server.listUsers({ emails: [body.email] });\n if (!target) return Response.json({ error: 'Account not found' }, { status: 404 });\n await sw.db.server.insert('team_members', {\n id: crypto.randomUUID(), team_id: params.id, user_id: target.id, role: 'member',\n }, { onConflict: 'ignore' });\n return { ok: true };\n },\n});\n```\n\nDo not hand-write access to app-read/write data: declare who may read/write it.\nserverOnly() fits job/import/audit/counter state and protected membership ledgers.\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\nPublish: npx @somewhere-cloud/cli deploy, then somewhere test for the rules you changed.\nOne somewhere test run drives the UI and calls the API: signUp(page) uses your sign-up form\n(then signOut, signIn with its password, verify with the emailed code), newUser() acts as\nseveral people, and ready(page, 'signed-in' | 'signed-out') waits for the session check.\nYou do not need a separate browser script.\nStart from the starter's tests/account, phone and access specs: one journey per test, its own people.\nOne somewhere test runs every spec, old and new together; somewhere deploy --test deploys, then runs them once.\nAfter fixing a test, run only what failed: somewhere test --failed (passed results on this release are kept).\nDo not rerun a suite that is already green on this release.\nDeploy raw source, no frontend build; type errors stop upload.\nnewUser() gives a signed-in page/API client; make people at once: await Promise.all([newUser(), newUser()]).\nnewUser({ role: 'staff' }) holds a role declared in appRoles, granted with your developer key.\nnewUser() takes no chosen email. Test users are verified and visible to this project's server user lookup.\nEmail-domain role: signUp(page, { domain: 'staff.example' }), then verify(page, person); newPage() for a second person.\nRefusals: await expectRefused(person, 'notes', { operation: 'update', id, values }, { allowed: owner }) or\nexpectRefused(person, 'POST /api/x', body, { allowed }). allowed is someone the same request succeeds for;\nan empty list, a null get or a 404 counts as refused only then. person/allowed: page, newUser() or anonymous.\nsomewhere test --phone runs every test again at 390x844.\nFor the complete owner-adds-member-by-email test and its endpoints, run\nsomewhere docs test and follow Two users sharing through the app.\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 teams and membership endpoints above, the owner adds a fixture by email\nand that fixture reads the shared team row:\n\n```ts\n// tests/team.spec.ts\nimport { test, expect, data } from '@somewhere-cloud/cli/testing';\ntest('owner adds a second user by email', async ({ newUser }) => {\n const owner = await newUser();\n const bob = await newUser();\n const name = `Shared team ${crypto.randomUUID()}`;\n const created = await owner.request.post('/api/teams', { data: { name } });\n expect(created.ok()).toBeTruthy();\n const { id } = await created.json();\n const added = await owner.request.post(`/api/teams/${id}/members`, { data: { email: bob.email } });\n expect(added.ok()).toBeTruthy();\n const response = await data(bob.request, 'teams', { operation: 'get', id });\n expect(response.ok()).toBeTruthy();\n expect((await response.json()).data).toMatchObject({ id, name });\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`.\n";
|
|
10
|
+
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.\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\nPublish: npx @somewhere-cloud/cli deploy, then somewhere test for the rules you changed.\nOne somewhere test run drives the UI and calls the API: signUp(page) uses your sign-up form\n(then signOut, signIn with its password, verify with the emailed code), newUser() acts as\nseveral people, and ready(page, 'signed-in' | 'signed-out') waits for the session check.\nYou do not need a separate browser script.\nStart from the starter's tests/account, phone and access specs: one journey per test, its own people.\nOne somewhere test runs every spec, old and new together; somewhere deploy --test deploys, then runs them once.\nAfter fixing a test, run only what is owed: somewhere test --failed (results that still hold are kept).\nDo not rerun a suite that is already green on this release.\nDeploy raw source, no frontend build; type errors stop upload.\nnewUser() gives a signed-in page/API client; make people at once: await Promise.all([newUser(), newUser()]).\nnewUser({ role: 'staff' }) holds a role declared in appRoles, granted with your developer key;\nit tests what staff may do, not how someone becomes staff.\nnewUser() takes no chosen email. Test users are verified and visible to this project's server user lookup.\nEmail-domain role: signUp(page, { domain: 'staff.example' }), then verify(page, person); newPage() for a second person.\nRefusals: await expectRefused(person, 'notes', { operation: 'update', id, values }, { allowed: owner }) or\nexpectRefused(person, 'POST /api/x', body, { allowed }). allowed is someone the same request succeeds for;\nan empty list, a null get or a 404 counts as refused only then. person/allowed: page, newUser() or anonymous.\nsomewhere test --phone runs every test again at 390x844.\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`.\n";
|
|
11
11
|
export declare const INIT_CLAUDE_MD = "Read AGENTS.md for project instructions.\n";
|
|
@@ -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
|
|
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;
|
|
20
|
-
refused)
|
|
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,
|
|
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
|
-
|
|
29
|
-
scope:
|
|
30
|
-
|
|
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:
|
|
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
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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]/
|
|
112
|
-
export default sw.endpoint({
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
|
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
|
|
|
@@ -157,19 +145,19 @@ several people, and ready(page, 'signed-in' | 'signed-out') waits for the sessio
|
|
|
157
145
|
You do not need a separate browser script.
|
|
158
146
|
Start from the starter's tests/account, phone and access specs: one journey per test, its own people.
|
|
159
147
|
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
|
|
148
|
+
After fixing a test, run only what is owed: somewhere test --failed (results that still hold are kept).
|
|
161
149
|
Do not rerun a suite that is already green on this release.
|
|
162
150
|
Deploy raw source, no frontend build; type errors stop upload.
|
|
163
151
|
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
|
|
152
|
+
newUser({ role: 'staff' }) holds a role declared in appRoles, granted with your developer key;
|
|
153
|
+
it tests what staff may do, not how someone becomes staff.
|
|
165
154
|
newUser() takes no chosen email. Test users are verified and visible to this project's server user lookup.
|
|
166
155
|
Email-domain role: signUp(page, { domain: 'staff.example' }), then verify(page, person); newPage() for a second person.
|
|
167
156
|
Refusals: await expectRefused(person, 'notes', { operation: 'update', id, values }, { allowed: owner }) or
|
|
168
157
|
expectRefused(person, 'POST /api/x', body, { allowed }). allowed is someone the same request succeeds for;
|
|
169
158
|
an empty list, a null get or a 404 counts as refused only then. person/allowed: page, newUser() or anonymous.
|
|
170
159
|
somewhere test --phone runs every test again at 390x844.
|
|
171
|
-
|
|
172
|
-
somewhere docs test and follow Two users sharing through the app.
|
|
160
|
+
The complete team spec, with removal and leaving: somewhere docs sw.groups --section team-example.
|
|
173
161
|
Diagnose with somewhere errors and somewhere logs.
|
|
174
162
|
|
|
175
163
|
On demand:
|
|
@@ -177,24 +165,22 @@ On demand:
|
|
|
177
165
|
|
|
178
166
|
## Testing shared access
|
|
179
167
|
|
|
180
|
-
With the
|
|
181
|
-
|
|
168
|
+
With the team endpoints above, the owner invites a fixture by email; test users are verified,
|
|
169
|
+
so its next GET /api/teams shows the team. A test user who still owns a team is not deleted:
|
|
170
|
+
delete the team last (api/teams/[id].ts DELETE: sw.groups.delete). Group calls take
|
|
171
|
+
about a second, so raise the timeout:
|
|
182
172
|
|
|
183
173
|
\`\`\`ts
|
|
184
174
|
// tests/team.spec.ts
|
|
185
|
-
import { test, expect
|
|
186
|
-
test(
|
|
187
|
-
|
|
188
|
-
const bob = await newUser();
|
|
189
|
-
const
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
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 });
|
|
175
|
+
import { test, expect } from '@somewhere-cloud/cli/testing';
|
|
176
|
+
test.describe.configure({ timeout: 90_000 });
|
|
177
|
+
test('owner invites a second user by email', async ({ newUser }) => {
|
|
178
|
+
const [owner, bob] = await Promise.all([newUser(), newUser()]);
|
|
179
|
+
const { id } = await (await owner.request.post('/api/teams', { data: { name: 'Shared team' } })).json();
|
|
180
|
+
expect((await owner.request.post(\`/api/teams/\${id}/invitations\`, { data: { email: bob.email } })).ok()).toBeTruthy();
|
|
181
|
+
const { teams } = await (await bob.request.get('/api/teams')).json();
|
|
182
|
+
expect(teams).toContainEqual(expect.objectContaining({ id, role: 'member' }));
|
|
183
|
+
expect((await owner.request.delete(\`/api/teams/\${id}\`)).status()).toBe(204);
|
|
198
184
|
});
|
|
199
185
|
\`\`\`
|
|
200
186
|
`;
|
|
@@ -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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsL7B,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,MAAM,CAAC,MAAM,cAAc,GAAG,uCAAuC,cAAc,KAAK,cAAc,KAAK,mBAAmB,KAAK,WAAW,IAAI,CAAC;AACnJ,MAAM,CAAC,MAAM,cAAc,GAAG,4CAA4C,CAAC"}
|
|
@@ -36,14 +36,23 @@ test('sign up, sign out and sign back in', async ({ page, signUp, signOut, signI
|
|
|
36
36
|
expect((await signedInAs(page)).email).toBe(person.email);
|
|
37
37
|
});
|
|
38
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] : '')));
|
|
45
|
+
}
|
|
46
|
+
`;
|
|
39
47
|
const FORM_PHONE = (privateData) => `import { test, expect } from '@somewhere-cloud/cli/testing';
|
|
40
48
|
|
|
41
49
|
// One pass at phone width. Adapt: do the app's main action here, as a person on a phone would.
|
|
42
50
|
test.use({ viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true });
|
|
43
|
-
|
|
51
|
+
${SIDEWAYS}
|
|
44
52
|
test('phone: ${privateData ? 'sign up, add a note and sign out' : 'sign up and sign out'}', async ({ page, signUp, signOut }) => {
|
|
45
53
|
const person = await signUp(page);
|
|
46
54
|
await expect(page.getByText(person.email)).toBeVisible();
|
|
55
|
+
expect(await scrollsSideways(page), 'these scroll sideways at 390 px').toEqual([]);
|
|
47
56
|
${privateData ? ` const title = 'phone ' + crypto.randomUUID();
|
|
48
57
|
await page.getByLabel('Title').fill(title);
|
|
49
58
|
await page.getByRole('button', { name: 'Add note' }).click();
|
|
@@ -55,11 +64,11 @@ const ROUTE_PHONE = `import { test, expect } from '@somewhere-cloud/cli/testing'
|
|
|
55
64
|
|
|
56
65
|
// One pass at phone width. Adapt: do the app's main action here, as a person on a phone would.
|
|
57
66
|
test.use({ viewport: { width: 390, height: 844 }, isMobile: true, hasTouch: true });
|
|
58
|
-
|
|
67
|
+
${SIDEWAYS}
|
|
59
68
|
test('phone: the page shows the greeting from its function', async ({ page }) => {
|
|
60
69
|
await page.goto('/');
|
|
61
70
|
await expect(page.getByText('Your full-stack app is ready.')).toBeVisible();
|
|
62
|
-
expect(await page
|
|
71
|
+
expect(await scrollsSideways(page), 'these scroll sideways at 390 px').toEqual([]);
|
|
63
72
|
});
|
|
64
73
|
`;
|
|
65
74
|
// Two people, one role-holder: the access journeys. In the private-data starter the first one runs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init-test-template.js","sourceRoot":"","sources":["../../src/lib/init-test-template.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,sGAAsG;AACtG,sFAAsF;AAEtF,MAAM,YAAY,GAAG;;;;;;;;;;CAUpB,CAAC;AAEF,iGAAiG;AACjG,oGAAoG;AACpG,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBrB,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,WAAoB,EAAE,EAAE,CAAC
|
|
1
|
+
{"version":3,"file":"init-test-template.js","sourceRoot":"","sources":["../../src/lib/init-test-template.ts"],"names":[],"mappings":"AAEA,oGAAoG;AACpG,sGAAsG;AACtG,sFAAsF;AAEtF,MAAM,YAAY,GAAG;;;;;;;;;;CAUpB,CAAC;AAEF,iGAAiG;AACjG,oGAAoG;AACpG,MAAM,aAAa,GAAG;;;;;;;;;;;;;;;;;;;;;CAqBrB,CAAC;AAEF,6FAA6F;AAC7F,MAAM,QAAQ,GAAG;;;;;;CAMhB,CAAC;AAEF,MAAM,UAAU,GAAG,CAAC,WAAoB,EAAE,EAAE,CAAC;;;;EAI3C,QAAQ;eACK,WAAW,CAAC,CAAC,CAAC,kCAAkC,CAAC,CAAC,CAAC,sBAAsB;;;;EAItF,WAAW,CAAC,CAAC,CAAC;;;;CAIf,CAAC,CAAC,CAAC,EAAE;;CAEL,CAAC;AAEF,MAAM,WAAW,GAAG;;;;EAIlB,QAAQ;;;;;;CAMT,CAAC;AAEF,mGAAmG;AACnG,4FAA4F;AAC5F,MAAM,MAAM,GAAG,CAAC,OAAqC,EAAE,EAAE,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