@somewhere-tech/cli 0.37.4 → 0.37.5

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.
@@ -9,7 +9,7 @@ const PACKAGE_JSON = `{
9
9
  "typecheck": "somewhere typecheck"
10
10
  },
11
11
  "dependencies": {
12
- "@somewhere-tech/sdk": "0.11.1",
12
+ "@somewhere-tech/sdk": "0.11.2",
13
13
  "react": "19.2.7",
14
14
  "react-dom": "19.2.7"
15
15
  },
@@ -9,7 +9,7 @@ const PACKAGE_JSON = `{
9
9
  "typecheck": "tsc --noEmit"
10
10
  },
11
11
  "dependencies": {
12
- "@somewhere-tech/sdk": "^0.11.1",
12
+ "@somewhere-tech/sdk": "^0.11.2",
13
13
  "react": "^19.2.0",
14
14
  "react-dom": "^19.2.0",
15
15
  "react-router-dom": "^7.9.5"
@@ -1,8 +1,8 @@
1
1
  export const BUNDLED_SKILLS_PACK = {
2
2
  "schema": 1,
3
3
  "name": "somewhere-skills",
4
- "version": "1+efd062ab7fba",
5
- "sha256": "efd062ab7fba9b20d6229afba854ef03383a83a3b8c4206a1ab6bea3067f6898",
4
+ "version": "1+67e91d53902e",
5
+ "sha256": "67e91d53902ec9e948ff2eeeb2542720046355f2da351b6b86c4fd4364e8da96",
6
6
  "files": [
7
7
  {
8
8
  "path": "deploy-verify-loop/SKILL.md",
@@ -16,8 +16,8 @@ export const BUNDLED_SKILLS_PACK = {
16
16
  },
17
17
  {
18
18
  "path": "sign-in-setup/SKILL.md",
19
- "sha256": "57ff03a9d3064541ccb39f9b42a3e75a49f098748539e16722ed5daad26e8ce3",
20
- "content": "---\nname: sign-in-setup\ndescription: When the app needs users to sign up, sign in, or sign out.\n---\n\n# Set up sign-in\n\n## Server: one route file\n\n`login` / `signup` are developer-key-gated (the browser can't call them), so one server route mediates them and sets the session cookies.\n\n```ts\n// api/auth/[...path].ts\nexport { somewhereAuth as default } from '@somewhere-tech/sdk/server';\n```\n\nIt serves `POST /signup`, `/login`, `/logout`, `/magic-link`, `/magic-link/verify`, `GET /me`, and the Google/GitHub/Discord `GET /<provider>-url` + `POST /<provider>` code exchange.\n\n## Page: the SDK client\n\n```bash\nnpm i @somewhere-tech/sdk\n```\n\n```ts\nimport { createSomewhereAuth } from '@somewhere-tech/sdk/auth'; // 0.11.1+\nconst auth = createSomewhereAuth(); // talks to /api/auth, cookie mode\n\ntry {\n await auth.signUp({ email, password }); // or auth.signIn({ email, password })\n} catch (err) {\n showMessage((err as Error).message); // \"Wrong email or password.\"\n}\nconst user = await auth.getUser(); // probes /api/auth/me; null when signed out\nawait auth.signOut();\n```\n\nCalls to your own `api/*` functions just send `credentials: 'include'`.\n\n`sw.auth.fromRequest(req)` reads the cookie or Authorization header and returns the validated user — or null. **Never** parse cookies manually inside a function.\n\nsign up as `<name>@<subdomain>.test.somewhere.site`, then `somewhere email test-inbox <addr>` prints the message and its magic link.\n\n## Failure 1: sign-in errors\n\nexpected failures (wrong password, duplicate email, weak password) come back as structured 4xx with the real message, never an opaque 500.\n\n## Failure 2: AUTH_REQUIRED from an owner() table\n\nThe table is user-owned, so the platform scopes it to a principal, and this request had none: there is no signed-in user, and this table does not declare `owner({ visitors: true })`, which is the declaration that accepts a stable anonymous visitor identity.\n\nSources (`somewhere docs <topic>`): auth-client, getting-started, sdk, troubleshooting.\n"
19
+ "sha256": "6618e9a89ba7b3bec31d1f3cff076b0f3a105f67c95ae597f80d89fb7b5716f4",
20
+ "content": "---\nname: sign-in-setup\ndescription: When the app needs users to sign up, sign in, or sign out.\n---\n\n# Set up sign-in\n\n## Server: one route file\n\n`login` / `signup` are developer-key-gated (the browser can't call them), so one server route mediates them and sets the session cookies.\n\n```ts\n// api/auth/[...path].ts\nexport { somewhereAuth as default } from '@somewhere-tech/sdk/server';\n```\n\nIt serves `POST /signup`, `/login`, `/logout`, `/magic-link`, `/magic-link/verify`, `GET /me`, and the Google/GitHub/Discord `GET /<provider>-url` + `POST /<provider>` code exchange.\n\n## Page: the SDK client\n\n```bash\nnpm i @somewhere-tech/sdk\n```\n\n```ts\nimport { createSomewhereAuth } from '@somewhere-tech/sdk/auth'; // 0.11.2+\nconst auth = createSomewhereAuth(); // talks to /api/auth, cookie mode\n\ntry {\n await auth.signUp({ email, password }); // or auth.signIn({ email, password })\n} catch (err) {\n showMessage((err as Error).message); // \"Wrong email or password.\"\n}\nconst user = await auth.getUser(); // probes /api/auth/me; null when signed out\nawait auth.signOut();\n```\n\nCalls to your own `api/*` functions just send `credentials: 'include'`.\n\n`sw.auth.fromRequest(req)` reads the cookie or Authorization header and returns the validated user — or null. **Never** parse cookies manually inside a function.\n\nsign up as `<name>@<subdomain>.test.somewhere.site`, then `somewhere email test-inbox <addr>` prints the message and its magic link.\n\n## Failure 1: sign-in errors\n\nexpected failures (wrong password, duplicate email, weak password) come back as structured 4xx with the real message, never an opaque 500.\n\n## Failure 2: AUTH_REQUIRED from an owner() table\n\nThe table is user-owned, so the platform scopes it to a principal, and this request had none: there is no signed-in user, and this table does not declare `owner({ visitors: true })`, which is the declaration that accepts a stable anonymous visitor identity.\n\nSources (`somewhere docs <topic>`): auth-client, getting-started, sdk, troubleshooting.\n"
21
21
  },
22
22
  {
23
23
  "path": "troubleshooting/SKILL.md",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@somewhere-tech/cli",
3
- "version": "0.37.4",
3
+ "version": "0.37.5",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@somewhere-tech/cli",
9
- "version": "0.37.4",
9
+ "version": "0.37.5",
10
10
  "bundleDependencies": [
11
11
  "@modelcontextprotocol/sdk",
12
12
  "chokidar",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@somewhere-tech/cli",
3
- "version": "0.37.4",
3
+ "version": "0.37.5",
4
4
  "description": "CLI for somewhere.tech — auth, projects, deploy, pull, promote, db, logs, env, MCP bridge.",
5
5
  "keywords": [
6
6
  "somewhere",