@protobase/cli 0.66.1 → 0.66.3

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.
@@ -1,4 +1,4 @@
1
1
  //#region package.json
2
- var version = "0.66.1";
2
+ var version = "0.66.3";
3
3
  //#endregion
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@protobase/cli",
3
- "version": "0.66.1",
3
+ "version": "0.66.3",
4
4
  "description": "The protobase command: scaffold, doctor, dev, build and serve a Protobase project.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
@@ -42,12 +42,12 @@
42
42
  "dependencies": {
43
43
  "@better-auth/core": "^1.7.12",
44
44
  "@hono/node-server": "^2.1.3",
45
- "@protobase/config": "0.66.1",
46
- "@protobase/layout": "0.66.1",
47
- "@protobase/query": "0.66.1",
48
- "@protobase/schema": "0.66.1",
49
- "@protobase/server": "0.66.1",
50
- "@protobase/ui": "0.66.1",
45
+ "@protobase/config": "0.66.3",
46
+ "@protobase/layout": "0.66.3",
47
+ "@protobase/query": "0.66.3",
48
+ "@protobase/schema": "0.66.3",
49
+ "@protobase/server": "0.66.3",
50
+ "@protobase/ui": "0.66.3",
51
51
  "@react-email/render": "^2.1.0",
52
52
  "@scalar/hono-api-reference": "^0.12.10",
53
53
  "@tailwindcss/vite": "^4.3.3",
@@ -43,7 +43,7 @@ export default defineConfig(({ env }) => ({
43
43
 
44
44
  ## 3. Link a mailbox
45
45
 
46
- Signed in, open the account page (`/-/account`): under **Mailbox** it offers "Connect Gmail". Google asks which account to use and whether the app may send mail as it, then sends you back to the account page, which now says **Connected**. Someone who already signs in with Google still connects here, as their sign-in did not allow sending mail. The Google account may have another address than the one they sign in with.
46
+ Signed in, open the account page (`/-/account`): under **Mailbox** it offers "Connect Gmail". Google asks which account to use and whether the app may send mail as it, then sends you back to the account page, which now says **Connected**. Someone who already signs in with Google still connects here, as their sign-in did not allow sending mail. The Google account may have another address than the one they sign in with. Once connected, the mailbox offers "Connect Gmail again": with the same Google account it gets a fresh link, and with another one it moves the mailbox to that account, as mail goes out through the account connected last.
47
47
 
48
48
  ## 4. Send from it
49
49
 
@@ -65,4 +65,4 @@ export default defineFunction(async (request, { personalMail }) => {
65
65
  })
66
66
  ```
67
67
 
68
- The message goes out from the linked Gmail, and shows in its Sent folder. When the person linked nothing the call answers `409` with `code: "not_linked"`, and when Google no longer honours the link, as after they removed the app from their Google account, `code: "link_expired"`: point them to the account page to connect Gmail again.
68
+ The message goes out from the linked Gmail, and shows in its Sent folder. When the person linked nothing the call answers `409` with `code: "not_linked"`, and when Google no longer honours the link, as after they removed the app from their Google account, `code: "link_expired"`: point them to Account → Mailbox to connect Gmail again.
@@ -241,15 +241,17 @@ export default defineFunction(async (request, { personalMail }) => {
241
241
  ```
242
242
 
243
243
  - **Tokens:** the link is the sign-in provider's account Better Auth keeps for the person, with its access and refresh tokens, encrypted: `auth.personalMail` needs `encryptOAuthTokens: true`, and startup stops without it. The tokens never leave the server. An access token that has expired is refreshed before the message goes out, and the new one is stored.
244
- - **When it cannot send:** `send` rejects with a `PersonalMailError` and sends nothing. Its `code` is `not_linked` when the person linked no mailbox, or signed in with Google without allowing it to send mail, and `link_expired` when the provider no longer honours the link, as when they revoked it or its refresh token expired: they connect it again. Thrown on, it answers the function's caller as a `409` problem with that `code` (`urn:protobase:problem:personal-mail-not-linked` or `-link-expired`), so the page can offer to link the mailbox:
244
+ - **When it cannot send:** `send` rejects with a `PersonalMailError` and sends nothing. Its `code` is `not_linked` when the person linked no mailbox, or signed in with Google without allowing it to send mail, and `link_expired` when the provider no longer honours the link, as when they revoked it or its refresh token expired: they connect it again under Account → Mailbox. Thrown on, it answers the function's caller as a `409` problem with that `code` (`urn:protobase:problem:personal-mail-not-linked` or `-link-expired`), so the page can offer to link the mailbox:
245
245
 
246
246
  ```json
247
247
  { "type": "urn:protobase:problem:personal-mail-link-expired", "status": 409, "code": "link_expired", "provider": "gmail" }
248
248
  ```
249
249
 
250
250
  - **Sender:** the provider sends as the linked address; Gmail sets the From header to it.
251
+ - **Which account:** mail goes out through the account the person connected for mail last. Connecting Gmail with another Google account takes the mail scopes off the earlier one in the app's store, and signing in with the earlier one does not take the mail back; connecting it again does. When the chosen account's link fails, sending fails: it never falls back to another account. Of two accounts that both still hold the mail scopes, as when both connected before this rule came in, mail goes through the one linked to the person last, until they connect one again.
251
252
  - **Only the person:** mail goes out from a mailbox only for someone signed in as themselves. Staff [signed in as them](auth.md#staff-sign-in), or an outside app acting for them, is refused with a `403` problem (`own-sign-in-only`), and nothing is sent.
252
253
  - **Providers:** Gmail, through Google sign-in. A provider is added to Protobase behind the same `PersonalMailProvider` shape: its sign-in provider, the scopes linking asks for, and how it sends.
254
+ - <gap>The account page cannot show which account a mailbox is linked through or disconnect it because unlinking a mailbox is not implemented.</gap>
253
255
  - <gap>Jobs cannot send from someone's own mailbox because a job's context has no personal mailer.</gap>
254
256
  - <gap>Mailboxes other than Gmail cannot be linked because no other mail provider is implemented.</gap>
255
257