create-meith 0.27.0 → 0.28.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
@@ -473,25 +473,14 @@ export default defineForumConfig({
473
473
  `);
474
474
  files.set(
475
475
  "meith.plugins.ts",
476
- `/**
477
- * The board's installed-plugin list.
478
- *
479
- * Inside the Meith monorepo this file is generated from board.plugins.json
480
- * by \`pnpm board:gen\` (see docs/customization/plugins.md) \u2014 that generator is
481
- * repository tooling, not something this workspace carries, so this file
482
- * starts as a plain, valid file with the same shape instead. Add a plugin by
483
- * importing its \`plugin\`/\`messages\` exports and adding an entry:
484
- *
485
- * import { messages as greeterMessages, plugin as greeterPlugin } from '@meith/plugin-greeter'
486
- *
487
- * export const INSTALLED_PLUGINS: readonly InstalledPlugin<PluginDefinition>[] = [
488
- * { key: 'greeter', enabled: true, plugin: greeterPlugin, messages: greeterMessages },
489
- * ]
490
- *
491
- * and the matching entry in board.plugins.json, which is what
492
- * \`meith plugin:add\`/\`plugin:remove\` read inside the monorepo \u2014 kept
493
- * here too so the two files agree about what is installed.
494
- */
476
+ `// Generated from board.plugins.json by \`meith plugin:add\` and \`meith plugin:remove\`.
477
+ //
478
+ // The simple path is those commands, or editing board.plugins.json and running one of
479
+ // them. A plugin that does not fit that convention can be added here by hand instead \u2014
480
+ // keep it out of board.plugins.json so a regenerate does not drop it.
481
+ //
482
+ // docs/customization/plugins.md explains both.
483
+
495
484
  import type { InstalledPlugin } from '@meith/web/config'
496
485
 
497
486
  export const INSTALLED_PLUGINS: readonly InstalledPlugin[] = []
@@ -594,6 +583,23 @@ ENV PORT=3000
594
583
  ENV HOSTNAME=0.0.0.0
595
584
  EXPOSE 3000
596
585
 
586
+ # Uploaded files \u2014 avatars, board images, attachments \u2014 land here, and the
587
+ # compose file mounts the persistent "uploads" volume over this path. Creating
588
+ # it in the image, owned by node, is what lets the fresh volume inherit that
589
+ # ownership; UPLOADS_DIR gives the board an absolute path so the working
590
+ # directory never decides where uploads go. Without both, uploads land on the
591
+ # container's own layer and a redeploy discards them.
592
+ ENV UPLOADS_DIR=/app/.uploads
593
+ RUN mkdir -p /app/.uploads && chown node:node /app/.uploads
594
+
595
+ # \`meith <command>\` on PATH runs this board's own operator CLI \u2014 the same one
596
+ # node_modules/.bin/meith is \u2014 so a Coolify terminal or \`docker compose exec web
597
+ # meith ...\` needs no path. It cd's to /board so the CLI finds this board's
598
+ # config, and overrides any wrapper an inherited base image installed, which
599
+ # would target the board that image was built from, not this one.
600
+ RUN printf '#!/bin/sh\\ncd /board\\nexec node_modules/.bin/meith "$@"\\n' > /usr/local/bin/meith \\
601
+ && chmod +x /usr/local/bin/meith
602
+
597
603
  # node:alpine already carries a non-root "node" user; the board's own files
598
604
  # are copied in as root above, so they need handing over before this drops
599
605
  # privilege.
@@ -671,6 +677,23 @@ ENV PORT=3000
671
677
  ENV HOSTNAME=0.0.0.0
672
678
  EXPOSE 3000
673
679
 
680
+ # Uploaded files \u2014 avatars, board images, attachments \u2014 land here, and the
681
+ # compose file mounts the persistent "uploads" volume over this path. Creating
682
+ # it in the image, owned by node, is what lets the fresh volume inherit that
683
+ # ownership; UPLOADS_DIR gives the board an absolute path so the working
684
+ # directory never decides where uploads go. Without both, uploads land on the
685
+ # container's own layer and a redeploy discards them.
686
+ ENV UPLOADS_DIR=/app/.uploads
687
+ RUN mkdir -p /app/.uploads && chown node:node /app/.uploads
688
+
689
+ # \`meith <command>\` on PATH runs this board's own operator CLI \u2014 the same one
690
+ # node_modules/.bin/meith is \u2014 so a Coolify terminal or \`docker compose exec web
691
+ # meith ...\` needs no path. It cd's to /board so the CLI finds this board's
692
+ # config, and overrides any wrapper an inherited base image installed, which
693
+ # would target the board that image was built from, not this one.
694
+ RUN printf '#!/bin/sh\\ncd /board\\nexec node_modules/.bin/meith "$@"\\n' > /usr/local/bin/meith \\
695
+ && chmod +x /usr/local/bin/meith
696
+
674
697
  # node:alpine already carries a non-root "node" user; the board's own files
675
698
  # are copied in as root above, so they need handing over before this drops
676
699
  # privilege.
@@ -699,8 +722,8 @@ ENTRYPOINT ["./docker-entrypoint.sh"]
699
722
  set -e
700
723
 
701
724
  # An explicit command wins over the role, the same as the official image \u2014
702
- # \`docker run <image> node_modules/.bin/meith --help\` should still run
703
- # the CLI rather than silently starting the web server.
725
+ # \`docker compose run --rm web meith --help\` (or \`exec\` into the running
726
+ # container) should run the CLI rather than silently starting the web server.
704
727
  if [ "$#" -gt 0 ]; then
705
728
  exec "$@"
706
729
  fi
@@ -1232,44 +1255,36 @@ echo "<password>" | npm run meith -- user:create --username <name> --email <addr
1232
1255
  ## Installing plugins and themes
1233
1256
 
1234
1257
  Nothing installs into a running container \u2014 a plugin or theme has to be
1235
- built into the image, the same as any other dependency:
1236
-
1237
- 1. **In this repository**, install it:
1238
-
1239
- \`\`\`sh
1240
- npm install --save-exact @meith/plugin-dues
1241
- \`\`\`
1242
-
1243
- (a theme is the same command with its own package, e.g.
1244
- \`@meith/theme-midnight\`).
1258
+ built into the image. In this repository:
1245
1259
 
1246
- 2. **Register it.** A **theme** goes in \`meith.config.ts\`, in the \`themes\`
1247
- map, following the shape of the \`default\` entry already there. A
1248
- **plugin** goes in \`meith.plugins.ts\`: import its \`plugin\` and
1249
- \`messages\` exports and add \`{ key, enabled: true, plugin, messages }\`
1250
- to \`INSTALLED_PLUGINS\` \u2014 or run
1260
+ 1. **Add it.** A **plugin** is one command, which installs the package and
1261
+ registers it:
1251
1262
 
1252
1263
  \`\`\`sh
1253
1264
  npm run meith -- plugin:add @meith/plugin-dues
1254
1265
  \`\`\`
1255
1266
 
1256
- which edits \`board.plugins.json\` and regenerates \`meith.plugins.ts\`
1257
- for you.
1267
+ It writes \`board.plugins.json\` and regenerates \`meith.plugins.ts\` for you
1268
+ (\`npm run meith -- plugin:remove <key>\` reverses it). A **theme** is
1269
+ \`npm install --save-exact @meith/theme-midnight\`, then an entry in
1270
+ \`meith.config.ts\`'s \`themes\` map following the shape of the \`default\` one
1271
+ already there \u2014 set \`defaultTheme\` to its key to make it the board's
1272
+ default.
1258
1273
 
1259
- 3. **Commit and push**, then **Redeploy** from Coolify \u2014 pushing alone does
1274
+ 2. **Commit and push**, then **Redeploy** from Coolify \u2014 pushing alone does
1260
1275
  not rebuild. Quick start builds the new image on that redeploy; advanced/prebuilt
1261
1276
  waits for \`.github/workflows/build.yml\` to finish first, and Redeploy is
1262
1277
  what actually pulls the result.
1263
1278
 
1264
- 4. **Once it is up, run its migrations one time:**
1279
+ 3. **If it ships database changes, apply them once it is up** \u2014 from
1280
+ **Admin \u2192 System** (**Version & migrations**) in the browser, or:
1265
1281
 
1266
1282
  \`\`\`sh
1267
1283
  docker compose run --rm web meith upgrade
1268
1284
  \`\`\`
1269
1285
 
1270
- See [docs/customization/plugins.md](${repositoryUrl}/blob/main/docs/customization/plugins.md)
1271
- and [docs/customization/themes.md](${repositoryUrl}/blob/main/docs/customization/themes.md)
1272
- for the full reference.
1286
+ See [Installing plugins and themes](${repositoryUrl}/blob/main/docs/customization/installing.md)
1287
+ for the full guide.
1273
1288
 
1274
1289
  ## Upgrading
1275
1290
 
@@ -2204,7 +2219,7 @@ async function run(argv, version) {
2204
2219
  }
2205
2220
 
2206
2221
  // src/bin.ts
2207
- var result = await run(process.argv.slice(2), "0.27.0");
2222
+ var result = await run(process.argv.slice(2), "0.28.1");
2208
2223
  for (const line of result.lines) {
2209
2224
  if (result.code === 0) console.log(line);
2210
2225
  else console.error(line);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-meith",
3
- "version": "0.27.0",
3
+ "version": "0.28.1",
4
4
  "description": "Scaffold a Meith board, plugin or theme — npx create-meith <name> writes a deployable board workspace; --plugin and --theme write extension workspaces built on the published kits.",
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.27.0')
4
+ const result = await run(process.argv.slice(2), '0.28.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
@@ -509,25 +509,14 @@ export default defineForumConfig({
509
509
 
510
510
  files.set(
511
511
  'meith.plugins.ts',
512
- `/**
513
- * The board's installed-plugin list.
514
- *
515
- * Inside the Meith monorepo this file is generated from board.plugins.json
516
- * by \`pnpm board:gen\` (see docs/customization/plugins.md) that generator is
517
- * repository tooling, not something this workspace carries, so this file
518
- * starts as a plain, valid file with the same shape instead. Add a plugin by
519
- * importing its \`plugin\`/\`messages\` exports and adding an entry:
520
- *
521
- * import { messages as greeterMessages, plugin as greeterPlugin } from '@meith/plugin-greeter'
522
- *
523
- * export const INSTALLED_PLUGINS: readonly InstalledPlugin<PluginDefinition>[] = [
524
- * { key: 'greeter', enabled: true, plugin: greeterPlugin, messages: greeterMessages },
525
- * ]
526
- *
527
- * and the matching entry in board.plugins.json, which is what
528
- * \`meith plugin:add\`/\`plugin:remove\` read inside the monorepo — kept
529
- * here too so the two files agree about what is installed.
530
- */
512
+ `// Generated from board.plugins.json by \`meith plugin:add\` and \`meith plugin:remove\`.
513
+ //
514
+ // The simple path is those commands, or editing board.plugins.json and running one of
515
+ // them. A plugin that does not fit that convention can be added here by hand instead —
516
+ // keep it out of board.plugins.json so a regenerate does not drop it.
517
+ //
518
+ // docs/customization/plugins.md explains both.
519
+
531
520
  import type { InstalledPlugin } from '@meith/web/config'
532
521
 
533
522
  export const INSTALLED_PLUGINS: readonly InstalledPlugin[] = []
@@ -634,6 +623,23 @@ ENV PORT=3000
634
623
  ENV HOSTNAME=0.0.0.0
635
624
  EXPOSE 3000
636
625
 
626
+ # Uploaded files — avatars, board images, attachments — land here, and the
627
+ # compose file mounts the persistent "uploads" volume over this path. Creating
628
+ # it in the image, owned by node, is what lets the fresh volume inherit that
629
+ # ownership; UPLOADS_DIR gives the board an absolute path so the working
630
+ # directory never decides where uploads go. Without both, uploads land on the
631
+ # container's own layer and a redeploy discards them.
632
+ ENV UPLOADS_DIR=/app/.uploads
633
+ RUN mkdir -p /app/.uploads && chown node:node /app/.uploads
634
+
635
+ # \`meith <command>\` on PATH runs this board's own operator CLI — the same one
636
+ # node_modules/.bin/meith is — so a Coolify terminal or \`docker compose exec web
637
+ # meith ...\` needs no path. It cd's to /board so the CLI finds this board's
638
+ # config, and overrides any wrapper an inherited base image installed, which
639
+ # would target the board that image was built from, not this one.
640
+ RUN printf '#!/bin/sh\\ncd /board\\nexec node_modules/.bin/meith "$@"\\n' > /usr/local/bin/meith \\
641
+ && chmod +x /usr/local/bin/meith
642
+
637
643
  # node:alpine already carries a non-root "node" user; the board's own files
638
644
  # are copied in as root above, so they need handing over before this drops
639
645
  # privilege.
@@ -712,6 +718,23 @@ ENV PORT=3000
712
718
  ENV HOSTNAME=0.0.0.0
713
719
  EXPOSE 3000
714
720
 
721
+ # Uploaded files — avatars, board images, attachments — land here, and the
722
+ # compose file mounts the persistent "uploads" volume over this path. Creating
723
+ # it in the image, owned by node, is what lets the fresh volume inherit that
724
+ # ownership; UPLOADS_DIR gives the board an absolute path so the working
725
+ # directory never decides where uploads go. Without both, uploads land on the
726
+ # container's own layer and a redeploy discards them.
727
+ ENV UPLOADS_DIR=/app/.uploads
728
+ RUN mkdir -p /app/.uploads && chown node:node /app/.uploads
729
+
730
+ # \`meith <command>\` on PATH runs this board's own operator CLI — the same one
731
+ # node_modules/.bin/meith is — so a Coolify terminal or \`docker compose exec web
732
+ # meith ...\` needs no path. It cd's to /board so the CLI finds this board's
733
+ # config, and overrides any wrapper an inherited base image installed, which
734
+ # would target the board that image was built from, not this one.
735
+ RUN printf '#!/bin/sh\\ncd /board\\nexec node_modules/.bin/meith "$@"\\n' > /usr/local/bin/meith \\
736
+ && chmod +x /usr/local/bin/meith
737
+
715
738
  # node:alpine already carries a non-root "node" user; the board's own files
716
739
  # are copied in as root above, so they need handing over before this drops
717
740
  # privilege.
@@ -741,8 +764,8 @@ ENTRYPOINT ["./docker-entrypoint.sh"]
741
764
  set -e
742
765
 
743
766
  # An explicit command wins over the role, the same as the official image —
744
- # \`docker run <image> node_modules/.bin/meith --help\` should still run
745
- # the CLI rather than silently starting the web server.
767
+ # \`docker compose run --rm web meith --help\` (or \`exec\` into the running
768
+ # container) should run the CLI rather than silently starting the web server.
746
769
  if [ "$#" -gt 0 ]; then
747
770
  exec "$@"
748
771
  fi
@@ -1280,44 +1303,36 @@ echo "<password>" | npm run meith -- user:create --username <name> --email <addr
1280
1303
  ## Installing plugins and themes
1281
1304
 
1282
1305
  Nothing installs into a running container — a plugin or theme has to be
1283
- built into the image, the same as any other dependency:
1284
-
1285
- 1. **In this repository**, install it:
1286
-
1287
- \`\`\`sh
1288
- npm install --save-exact @meith/plugin-dues
1289
- \`\`\`
1290
-
1291
- (a theme is the same command with its own package, e.g.
1292
- \`@meith/theme-midnight\`).
1306
+ built into the image. In this repository:
1293
1307
 
1294
- 2. **Register it.** A **theme** goes in \`meith.config.ts\`, in the \`themes\`
1295
- map, following the shape of the \`default\` entry already there. A
1296
- **plugin** goes in \`meith.plugins.ts\`: import its \`plugin\` and
1297
- \`messages\` exports and add \`{ key, enabled: true, plugin, messages }\`
1298
- to \`INSTALLED_PLUGINS\` — or run
1308
+ 1. **Add it.** A **plugin** is one command, which installs the package and
1309
+ registers it:
1299
1310
 
1300
1311
  \`\`\`sh
1301
1312
  npm run meith -- plugin:add @meith/plugin-dues
1302
1313
  \`\`\`
1303
1314
 
1304
- which edits \`board.plugins.json\` and regenerates \`meith.plugins.ts\`
1305
- for you.
1315
+ It writes \`board.plugins.json\` and regenerates \`meith.plugins.ts\` for you
1316
+ (\`npm run meith -- plugin:remove <key>\` reverses it). A **theme** is
1317
+ \`npm install --save-exact @meith/theme-midnight\`, then an entry in
1318
+ \`meith.config.ts\`'s \`themes\` map following the shape of the \`default\` one
1319
+ already there — set \`defaultTheme\` to its key to make it the board's
1320
+ default.
1306
1321
 
1307
- 3. **Commit and push**, then **Redeploy** from Coolify — pushing alone does
1322
+ 2. **Commit and push**, then **Redeploy** from Coolify — pushing alone does
1308
1323
  not rebuild. Quick start builds the new image on that redeploy; advanced/prebuilt
1309
1324
  waits for \`.github/workflows/build.yml\` to finish first, and Redeploy is
1310
1325
  what actually pulls the result.
1311
1326
 
1312
- 4. **Once it is up, run its migrations one time:**
1327
+ 3. **If it ships database changes, apply them once it is up** — from
1328
+ **Admin → System** (**Version & migrations**) in the browser, or:
1313
1329
 
1314
1330
  \`\`\`sh
1315
1331
  docker compose run --rm web meith upgrade
1316
1332
  \`\`\`
1317
1333
 
1318
- See [docs/customization/plugins.md](${repositoryUrl}/blob/main/docs/customization/plugins.md)
1319
- and [docs/customization/themes.md](${repositoryUrl}/blob/main/docs/customization/themes.md)
1320
- for the full reference.
1334
+ See [Installing plugins and themes](${repositoryUrl}/blob/main/docs/customization/installing.md)
1335
+ for the full guide.
1321
1336
 
1322
1337
  ## Upgrading
1323
1338