create-meith 0.20.0 → 0.21.1

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/dist/bin.mjs CHANGED
@@ -26,6 +26,7 @@ var MATERIALIZED_AT_ROOT = [
26
26
  var VERCEL_BUILD_COMMAND = `community migrate && forum-web build ${AT_ROOT_FLAG}`;
27
27
  var TICK_PATH = "/api/system/tick";
28
28
  var TICK_SCHEDULE = "0 3 * * *";
29
+ var RESEND_SENDER_MAILBOX = "noreply";
29
30
  var MATERIALIZED_PUBLIC = [
30
31
  "placeholder-logo.png",
31
32
  "placeholder-logo.svg",
@@ -278,15 +279,17 @@ BLOB_READ_WRITE_TOKEN=
278
279
  # board refuses it on Vercel; 587 with STARTTLS may work, but an API does not
279
280
  # depend on the platform's egress rules staying as they are.
280
281
  #
281
- # MAIL_FROM is yours to decide, and it belongs to the step that adds Resend
282
- # rather than to the deploy: it must be an address at a domain the provider has
283
- # verified for you, no default is right, and until a provider is added the board
284
- # cannot send from any address at all. Set it alongside the integration.
282
+ # MAIL_FROM is optional where a provider publishes the domain it sends from:
283
+ # with RESEND_API_KEY and RESEND_EMAIL_DOMAIN both set, the board sends from
284
+ # noreply@ that domain and this can stay empty. Set it to send from another
285
+ # address \u2014 it must be at a domain the provider has verified for you, and an
286
+ # address set here always wins over the derived one.
285
287
  MAIL_FROM=
286
288
 
287
289
  # Add the Resend integration to the project from Vercel's marketplace and it
288
- # publishes its key under this name, which the board reads: with RESEND_API_KEY
289
- # set, and MAIL_FROM beside it, the board sends over Resend's HTTPS API and
290
+ # publishes its key and its sending domain under these names, which the board
291
+ # reads: with RESEND_API_KEY set, and either RESEND_EMAIL_DOMAIN or a MAIL_FROM
292
+ # beside it, the board sends over Resend's HTTPS API and
290
293
  # needs neither of the two variables below. The mail driver itself is a plain
291
294
  # JSON-over-HTTPS sender and is not Resend-specific \u2014 this is one injected name
292
295
  # bridged to the generic pair, not a provider baked into the board.
@@ -435,6 +438,7 @@ import { defineForumConfig } from '@meith/web/config'
435
438
  import {
436
439
  BROWSER_THEME_COLOR,
437
440
  DARK_TOKENS,
441
+ defaultMessages,
438
442
  defaultTheme,
439
443
  LIGHT_TOKENS,
440
444
  } from '@meith/theme-default'
@@ -449,6 +453,7 @@ export default defineForumConfig({
449
453
  tokens: { light: LIGHT_TOKENS, dark: DARK_TOKENS },
450
454
  browserThemeColor: BROWSER_THEME_COLOR,
451
455
  theme: defaultTheme,
456
+ messages: defaultMessages,
452
457
  },
453
458
  },
454
459
  defaultTheme: 'default',
@@ -1014,18 +1019,19 @@ A forum, built on [Meith](${repositoryUrl}), running as Vercel functions.
1014
1019
  there is no token to copy. This is what used to be four hand-typed \`S3_*\`
1015
1020
  secrets.
1016
1021
  - **A Resend mail account**, attached the same way, which publishes
1017
- \`RESEND_API_KEY\`. The board reads that name directly: its mail driver already
1018
- speaks Resend's request shape, so there is nothing to adapt.
1022
+ \`RESEND_API_KEY\` and \`RESEND_EMAIL_DOMAIN\`. The board reads both names
1023
+ directly: its mail driver already speaks Resend's request shape, so there is
1024
+ nothing to adapt, and the sending domain is what the sender is built from.
1019
1025
  - **A Vercel project** carrying \`vercel.json\` \u2014 the build command
1020
1026
  \`${VERCEL_BUILD_COMMAND}\`,
1021
1027
  which applies the schema before it builds, materializes the board's app at
1022
1028
  the project root so the artefact lands where Vercel reads it, and the cron
1023
1029
  entry that drives the tick.
1024
1030
 
1025
- **Mail needs one thing after the deploy**: the address the board sends from.
1026
- It has to be at a domain Resend has verified, and no form can ask for that
1027
- before the account exists \u2014 see *Mail, after the deploy* below. The board boots
1028
- and runs without it, and delivers nothing, silently, until it is done.
1031
+ **Mail needs no variables after the deploy.** Resend publishes both its key
1032
+ and its sending domain, and the board sends from \`${RESEND_SENDER_MAILBOX}@\`
1033
+ that domain \u2014 see *Mail* below to send from a different address, and for the
1034
+ one case that does need you: a domain Resend has not verified yet.
1029
1035
 
1030
1036
  ## What to type into the deploy form
1031
1037
 
@@ -1076,22 +1082,30 @@ Vercel* below for why that matters \u2014 set \`FILESTORE_DRIVER=s3\` and add
1076
1082
  project's environment settings, with \`S3_ENDPOINT\` for a bucket that is not AWS
1077
1083
  (\`S3_REGION=auto\` for R2). The same board runs either way.
1078
1084
 
1079
- ## Mail, after the deploy
1085
+ ## Mail
1080
1086
 
1081
- A board that cannot send mail cannot reset a password, so do this before you
1082
- invite anybody. The deploy form already added Resend and published its key; two
1083
- steps remain, and neither could have been answered on the form.
1087
+ **There is nothing to set.** The Resend the deploy form added publishes two
1088
+ names into the project: \`RESEND_API_KEY\`, and \`RESEND_EMAIL_DOMAIN\` \u2014 the
1089
+ domain it sends from. The board reads both, sends from
1090
+ \`${RESEND_SENDER_MAILBOX}@\` that domain, and posts over Resend's HTTPS API.
1084
1091
 
1085
- 1. Verify your sending domain in the Resend dashboard if you have not already.
1086
- Resend refuses to send from an address at a domain it has not verified.
1087
- 2. Add \`MAIL_FROM\` to the project's environment settings \u2014 an address at that
1088
- verified domain, and the only mail value you ever type.
1089
- 3. Redeploy, or let the next push redeploy.
1092
+ **If Resend refuses the messages**, that domain is not verified yet. Resend
1093
+ will not send from a domain it has not verified, whoever set the address, so
1094
+ verify it from the Resend dashboard \u2014 the deploy cannot do that step for you,
1095
+ because it is Resend confirming you own the domain. This is the one thing here
1096
+ that can need attention, and it announces itself: the test button below says
1097
+ so rather than the board failing quietly.
1090
1098
 
1091
- That is all. The integration published its key into the project as
1092
- \`RESEND_API_KEY\` when you deployed, and the board reads that name: with it set,
1093
- and \`MAIL_FROM\` beside it, mail sends over Resend's HTTPS API with nothing
1094
- further to configure.
1099
+ **To send from a different address**, set \`MAIL_FROM\` in the project's
1100
+ environment settings and redeploy. It must be at a domain Resend has verified,
1101
+ for the same reason. An address you set always wins over the derived one.
1102
+
1103
+ A board with the key but no verified domain \u2014 which is what you get if you
1104
+ remove the integration's \`RESEND_EMAIL_DOMAIN\` without putting a
1105
+ \`MAIL_FROM\` in its place \u2014 does not guess a sender. It stays on the log
1106
+ driver and delivers nothing, which is the honest outcome: a guessed sender at
1107
+ an unverified domain would be refused by Resend anyway, one message at a
1108
+ time.
1095
1109
 
1096
1110
  The board is not tied to Resend. Its mail driver is a plain JSON-over-HTTPS
1097
1111
  sender that posts \`{from, to, subject, text, html, reply_to}\` with a bearer
@@ -1100,8 +1114,10 @@ it needs no adapter. Any provider with the same shape works: set
1100
1114
  \`MAIL_HTTP_ENDPOINT\`, \`MAIL_HTTP_TOKEN\` and \`MAIL_DRIVER=http\` in the
1101
1115
  project's environment settings, and set the first two **together** \u2014 either
1102
1116
  one on its own stands the Resend bridge down, so a key issued for Resend is
1103
- never presented to an endpoint you chose. Only \`RESEND_API_KEY\` turns the
1104
- driver on by itself. Delete it once you have moved off Resend.
1117
+ never presented to an endpoint you chose. Setting \`MAIL_DRIVER\` to anything
1118
+ but \`http\` stands the bridge down too, for the same reason: a board that
1119
+ moved to SMTP must not send through its new provider from Resend's domain.
1120
+ Delete \`RESEND_API_KEY\` once you have moved off Resend.
1105
1121
 
1106
1122
  Check it worked: sign in as the administrator and use the test button on
1107
1123
  **/admin \u2192 Settings \u2192 Mail**.
@@ -1340,7 +1356,7 @@ async function run(argv, version) {
1340
1356
  }
1341
1357
 
1342
1358
  // src/bin.ts
1343
- var result = await run(process.argv.slice(2), "0.20.0");
1359
+ var result = await run(process.argv.slice(2), "0.21.1");
1344
1360
  for (const line of result.lines) {
1345
1361
  if (result.code === 0) console.log(line);
1346
1362
  else console.error(line);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-meith",
3
- "version": "0.20.0",
3
+ "version": "0.21.1",
4
4
  "description": "Scaffold a Meith board — npx create-meith <name> writes a workspace that depends on @meith/web and @meith/cli.",
5
5
  "license": "MIT",
6
6
  "repository": {
package/src/bin.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { run } from './cli'
3
3
 
4
- const result = await run(process.argv.slice(2), '0.20.0')
4
+ const result = await run(process.argv.slice(2), '0.21.1')
5
5
  for (const line of result.lines) {
6
6
  if (result.code === 0) console.log(line)
7
7
  else console.error(line)
package/src/scaffold.ts CHANGED
@@ -35,6 +35,8 @@ export const TICK_PATH = '/api/system/tick'
35
35
 
36
36
  export const TICK_SCHEDULE = '0 3 * * *'
37
37
 
38
+ export const RESEND_SENDER_MAILBOX = 'noreply'
39
+
38
40
  export const MATERIALIZED_PUBLIC = [
39
41
  'placeholder-logo.png',
40
42
  'placeholder-logo.svg',
@@ -302,15 +304,17 @@ BLOB_READ_WRITE_TOKEN=
302
304
  # board refuses it on Vercel; 587 with STARTTLS may work, but an API does not
303
305
  # depend on the platform's egress rules staying as they are.
304
306
  #
305
- # MAIL_FROM is yours to decide, and it belongs to the step that adds Resend
306
- # rather than to the deploy: it must be an address at a domain the provider has
307
- # verified for you, no default is right, and until a provider is added the board
308
- # cannot send from any address at all. Set it alongside the integration.
307
+ # MAIL_FROM is optional where a provider publishes the domain it sends from:
308
+ # with RESEND_API_KEY and RESEND_EMAIL_DOMAIN both set, the board sends from
309
+ # noreply@ that domain and this can stay empty. Set it to send from another
310
+ # address it must be at a domain the provider has verified for you, and an
311
+ # address set here always wins over the derived one.
309
312
  MAIL_FROM=
310
313
 
311
314
  # Add the Resend integration to the project from Vercel's marketplace and it
312
- # publishes its key under this name, which the board reads: with RESEND_API_KEY
313
- # set, and MAIL_FROM beside it, the board sends over Resend's HTTPS API and
315
+ # publishes its key and its sending domain under these names, which the board
316
+ # reads: with RESEND_API_KEY set, and either RESEND_EMAIL_DOMAIN or a MAIL_FROM
317
+ # beside it, the board sends over Resend's HTTPS API and
314
318
  # needs neither of the two variables below. The mail driver itself is a plain
315
319
  # JSON-over-HTTPS sender and is not Resend-specific — this is one injected name
316
320
  # bridged to the generic pair, not a provider baked into the board.
@@ -469,6 +473,7 @@ import { defineForumConfig } from '@meith/web/config'
469
473
  import {
470
474
  BROWSER_THEME_COLOR,
471
475
  DARK_TOKENS,
476
+ defaultMessages,
472
477
  defaultTheme,
473
478
  LIGHT_TOKENS,
474
479
  } from '@meith/theme-default'
@@ -483,6 +488,7 @@ export default defineForumConfig({
483
488
  tokens: { light: LIGHT_TOKENS, dark: DARK_TOKENS },
484
489
  browserThemeColor: BROWSER_THEME_COLOR,
485
490
  theme: defaultTheme,
491
+ messages: defaultMessages,
486
492
  },
487
493
  },
488
494
  defaultTheme: 'default',
@@ -1075,18 +1081,19 @@ A forum, built on [Meith](${repositoryUrl}), running as Vercel functions.
1075
1081
  there is no token to copy. This is what used to be four hand-typed \`S3_*\`
1076
1082
  secrets.
1077
1083
  - **A Resend mail account**, attached the same way, which publishes
1078
- \`RESEND_API_KEY\`. The board reads that name directly: its mail driver already
1079
- speaks Resend's request shape, so there is nothing to adapt.
1084
+ \`RESEND_API_KEY\` and \`RESEND_EMAIL_DOMAIN\`. The board reads both names
1085
+ directly: its mail driver already speaks Resend's request shape, so there is
1086
+ nothing to adapt, and the sending domain is what the sender is built from.
1080
1087
  - **A Vercel project** carrying \`vercel.json\` — the build command
1081
1088
  \`${VERCEL_BUILD_COMMAND}\`,
1082
1089
  which applies the schema before it builds, materializes the board's app at
1083
1090
  the project root so the artefact lands where Vercel reads it, and the cron
1084
1091
  entry that drives the tick.
1085
1092
 
1086
- **Mail needs one thing after the deploy**: the address the board sends from.
1087
- It has to be at a domain Resend has verified, and no form can ask for that
1088
- before the account exists — see *Mail, after the deploy* below. The board boots
1089
- and runs without it, and delivers nothing, silently, until it is done.
1093
+ **Mail needs no variables after the deploy.** Resend publishes both its key
1094
+ and its sending domain, and the board sends from \`${RESEND_SENDER_MAILBOX}@\`
1095
+ that domain — see *Mail* below to send from a different address, and for the
1096
+ one case that does need you: a domain Resend has not verified yet.
1090
1097
 
1091
1098
  ## What to type into the deploy form
1092
1099
 
@@ -1137,22 +1144,30 @@ Vercel* below for why that matters — set \`FILESTORE_DRIVER=s3\` and add
1137
1144
  project's environment settings, with \`S3_ENDPOINT\` for a bucket that is not AWS
1138
1145
  (\`S3_REGION=auto\` for R2). The same board runs either way.
1139
1146
 
1140
- ## Mail, after the deploy
1147
+ ## Mail
1148
+
1149
+ **There is nothing to set.** The Resend the deploy form added publishes two
1150
+ names into the project: \`RESEND_API_KEY\`, and \`RESEND_EMAIL_DOMAIN\` — the
1151
+ domain it sends from. The board reads both, sends from
1152
+ \`${RESEND_SENDER_MAILBOX}@\` that domain, and posts over Resend's HTTPS API.
1141
1153
 
1142
- A board that cannot send mail cannot reset a password, so do this before you
1143
- invite anybody. The deploy form already added Resend and published its key; two
1144
- steps remain, and neither could have been answered on the form.
1154
+ **If Resend refuses the messages**, that domain is not verified yet. Resend
1155
+ will not send from a domain it has not verified, whoever set the address, so
1156
+ verify it from the Resend dashboard the deploy cannot do that step for you,
1157
+ because it is Resend confirming you own the domain. This is the one thing here
1158
+ that can need attention, and it announces itself: the test button below says
1159
+ so rather than the board failing quietly.
1145
1160
 
1146
- 1. Verify your sending domain in the Resend dashboard if you have not already.
1147
- Resend refuses to send from an address at a domain it has not verified.
1148
- 2. Add \`MAIL_FROM\` to the project's environment settings an address at that
1149
- verified domain, and the only mail value you ever type.
1150
- 3. Redeploy, or let the next push redeploy.
1161
+ **To send from a different address**, set \`MAIL_FROM\` in the project's
1162
+ environment settings and redeploy. It must be at a domain Resend has verified,
1163
+ for the same reason. An address you set always wins over the derived one.
1151
1164
 
1152
- That is all. The integration published its key into the project as
1153
- \`RESEND_API_KEY\` when you deployed, and the board reads that name: with it set,
1154
- and \`MAIL_FROM\` beside it, mail sends over Resend's HTTPS API with nothing
1155
- further to configure.
1165
+ A board with the key but no verified domain which is what you get if you
1166
+ remove the integration's \`RESEND_EMAIL_DOMAIN\` without putting a
1167
+ \`MAIL_FROM\` in its place does not guess a sender. It stays on the log
1168
+ driver and delivers nothing, which is the honest outcome: a guessed sender at
1169
+ an unverified domain would be refused by Resend anyway, one message at a
1170
+ time.
1156
1171
 
1157
1172
  The board is not tied to Resend. Its mail driver is a plain JSON-over-HTTPS
1158
1173
  sender that posts \`{from, to, subject, text, html, reply_to}\` with a bearer
@@ -1161,8 +1176,10 @@ it needs no adapter. Any provider with the same shape works: set
1161
1176
  \`MAIL_HTTP_ENDPOINT\`, \`MAIL_HTTP_TOKEN\` and \`MAIL_DRIVER=http\` in the
1162
1177
  project's environment settings, and set the first two **together** — either
1163
1178
  one on its own stands the Resend bridge down, so a key issued for Resend is
1164
- never presented to an endpoint you chose. Only \`RESEND_API_KEY\` turns the
1165
- driver on by itself. Delete it once you have moved off Resend.
1179
+ never presented to an endpoint you chose. Setting \`MAIL_DRIVER\` to anything
1180
+ but \`http\` stands the bridge down too, for the same reason: a board that
1181
+ moved to SMTP must not send through its new provider from Resend's domain.
1182
+ Delete \`RESEND_API_KEY\` once you have moved off Resend.
1166
1183
 
1167
1184
  Check it worked: sign in as the administrator and use the test button on
1168
1185
  **/admin → Settings → Mail**.