ferst-core 0.17.1 → 0.19.0
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/bin/ferst-modules.mjs +8 -13
- package/components/BlockRenderer.astro +0 -2
- package/components/islands/MembersAccount.tsx +501 -395
- package/content/blocks.ts +2 -19
- package/content/cookies.ts +2 -3
- package/content/recipe-questions.ts +0 -1
- package/examples/recipes.ts +0 -1
- package/lib/members-account.ts +352 -283
- package/lib/members.ts +88 -134
- package/package.json +1 -1
- package/components/recipes/MembersContent.astro +0 -176
package/bin/ferst-modules.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
// ferst-modules — what this site has from its organisation's modules in the Ferst portal:
|
|
3
|
-
// the forms it can place, what it can take payment for and bookings for,
|
|
4
|
-
// the calendar it shows.
|
|
3
|
+
// the forms it can place, what it can take payment for and bookings for, whether Members is on,
|
|
4
|
+
// and the calendar it shows.
|
|
5
5
|
// Run it in a client repo root:
|
|
6
6
|
//
|
|
7
7
|
// npx --no-install ferst-modules # the site named in ferst-site.json
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
// Forms and calendars live in the portal, never in the repo: place a form with a
|
|
12
12
|
// `{ "type": "form", "form": "<its name on this site>" }` block, take a payment with a
|
|
13
13
|
// `{ "type": "pay", "item": "<its id>" }` block, take bookings with a
|
|
14
|
-
// `{ "type": "book", "service": "<its id>" }` block (or `"resource"`, for a person or a place), show
|
|
15
|
-
//
|
|
14
|
+
// `{ "type": "book", "service": "<its id>" }` block (or `"resource"`, for a person or a place), and show the
|
|
15
|
+
// calendar by setting
|
|
16
16
|
// calendarSettings.embedUrl to the address printed here.
|
|
17
17
|
import { readFileSync, realpathSync } from 'node:fs';
|
|
18
18
|
import { resolve } from 'node:path';
|
|
@@ -107,16 +107,11 @@ export function formatModules(data) {
|
|
|
107
107
|
out.push('');
|
|
108
108
|
}
|
|
109
109
|
|
|
110
|
-
// Members (platform 2026-11-30+):
|
|
111
|
-
//
|
|
112
|
-
if (data.modules.members !== undefined
|
|
110
|
+
// Members (platform 2026-11-30+): whether visitors sign in on this site. Members-only content is a
|
|
111
|
+
// setting on a page in the CMS, not a block (members' pages were removed on 2026-12-02).
|
|
112
|
+
if (data.modules.members !== undefined) {
|
|
113
113
|
out.push('Members');
|
|
114
|
-
|
|
115
|
-
else if (!data.members?.pages?.length) out.push(' No members’ pages on this site yet. They are written in the portal (Members, Pages).');
|
|
116
|
-
for (const p of data.members?.pages ?? []) {
|
|
117
|
-
out.push(` ${p.title}`);
|
|
118
|
-
out.push(` place it with: { "type": "membersContent", "page": "${p.id}" }`);
|
|
119
|
-
}
|
|
114
|
+
out.push(data.modules.members ? ' On: visitors join and sign in on the site’s /account page.' : ' The Members module is off for this site.');
|
|
120
115
|
out.push('');
|
|
121
116
|
}
|
|
122
117
|
|
|
@@ -29,7 +29,6 @@ import ContactForm from './recipes/ContactForm.astro';
|
|
|
29
29
|
import Form from './recipes/Form.astro';
|
|
30
30
|
import Pay from './recipes/Pay.astro';
|
|
31
31
|
import Book from './recipes/Book.astro';
|
|
32
|
-
import MembersContent from './recipes/MembersContent.astro';
|
|
33
32
|
import Accordion from './recipes/Accordion.astro';
|
|
34
33
|
import Tiles from './recipes/Tiles.astro';
|
|
35
34
|
import Banner from './recipes/Banner.astro';
|
|
@@ -86,7 +85,6 @@ const registry: Record<BlockType, any> = {
|
|
|
86
85
|
form: Form,
|
|
87
86
|
pay: Pay,
|
|
88
87
|
book: Book,
|
|
89
|
-
membersContent: MembersContent,
|
|
90
88
|
accordion: Accordion,
|
|
91
89
|
tiles: Tiles,
|
|
92
90
|
banner: Banner,
|