create-volt 0.22.0 → 0.24.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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,31 @@ All notable changes to `create-volt` are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/), and this project adheres to
|
|
5
5
|
[Semantic Versioning](https://semver.org/).
|
|
6
6
|
|
|
7
|
+
## [0.24.0] - 2026-06-29
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
- The `pages` add-on now supports **`format: html`** in front-matter — those
|
|
11
|
+
pages are served **verbatim** (no markdown processing), so rich/complex layouts
|
|
12
|
+
(e.g. from the WYSIWYG editor) are preserved losslessly. Plain markdown pages
|
|
13
|
+
are unchanged. (`volt-addon-editor` 0.2.0 now stores `getHTML()` with
|
|
14
|
+
`format: html` so editor layouts round-trip exactly.)
|
|
15
|
+
|
|
16
|
+
## [0.23.0] - 2026-06-29
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- Plugin context now includes **`requireAuth`** and **`sessionFromReq`** (when the
|
|
20
|
+
auth add-on is on) so third-party add-ons can gate routes by login. Purely
|
|
21
|
+
additive — no change to defaults or security posture.
|
|
22
|
+
|
|
23
|
+
### Note
|
|
24
|
+
- New companion package **`volt-addon-editor`** (separate npm package): a
|
|
25
|
+
standing, role-gated RTEPro WYSIWYG editor that writes markdown pages. Mounts
|
|
26
|
+
only if `ADMIN_PATH` is set (**fail-closed**), behind magic-link auth + an
|
|
27
|
+
`ADMIN_EMAILS` allowlist; the secret path is obscurity *on top of* auth, never
|
|
28
|
+
instead. The AI key stays server-side via a key-injecting proxy. The core stays
|
|
29
|
+
no-standing-admin by default — install only where you want it
|
|
30
|
+
(`npx create-volt add editor`). See `/docs/editor`.
|
|
31
|
+
|
|
7
32
|
## [0.22.0] - 2026-06-29
|
|
8
33
|
|
|
9
34
|
### Added
|
|
@@ -318,6 +343,8 @@ All notable changes to `create-volt` are documented here. The format follows
|
|
|
318
343
|
watching and full-page hot reload. Supports `--skip-install` and `--force`,
|
|
319
344
|
and auto-detects npm / pnpm / yarn / bun for the install step.
|
|
320
345
|
|
|
346
|
+
[0.24.0]: https://github.com/MIR-2025/volt/releases/tag/v0.24.0
|
|
347
|
+
[0.23.0]: https://github.com/MIR-2025/volt/releases/tag/v0.23.0
|
|
321
348
|
[0.22.0]: https://github.com/MIR-2025/volt/releases/tag/v0.22.0
|
|
322
349
|
[0.21.0]: https://github.com/MIR-2025/volt/releases/tag/v0.21.0
|
|
323
350
|
[0.20.0]: https://github.com/MIR-2025/volt/releases/tag/v0.20.0
|
|
@@ -78,7 +78,10 @@ export async function pagesRouter({ dir }) {
|
|
|
78
78
|
const file = path.join(dir, slug + ".md");
|
|
79
79
|
if (!fs.existsSync(file)) return next();
|
|
80
80
|
const { meta, body } = parseFrontMatter(fs.readFileSync(file, "utf8"));
|
|
81
|
-
|
|
81
|
+
// `format: html` pages (e.g. from the WYSIWYG editor) are served verbatim to
|
|
82
|
+
// preserve complex layouts; everything else is markdown rendered with marked.
|
|
83
|
+
const inner = meta.format === "html" ? body : marked.parse(body);
|
|
84
|
+
res.type("html").send(shell(meta.title || slug, inner));
|
|
82
85
|
});
|
|
83
86
|
return r;
|
|
84
87
|
}
|
package/package.json
CHANGED
|
@@ -141,13 +141,21 @@ async function startApp() {
|
|
|
141
141
|
const io = new SocketServer(server);
|
|
142
142
|
if (enabled.has("realtime") && store) (await addonMod("realtime")).attachRealtime(io, { store });
|
|
143
143
|
|
|
144
|
-
// third-party add-ons — register(ctx)
|
|
144
|
+
// third-party add-ons — register(ctx). When auth is on, requireAuth/sessionFromReq
|
|
145
|
+
// are provided so add-ons can gate routes by login.
|
|
146
|
+
let requireAuth = null;
|
|
147
|
+
let sessionFromReq = null;
|
|
148
|
+
if (enabled.has("auth") && store) {
|
|
149
|
+
const a = await addonMod("auth");
|
|
150
|
+
requireAuth = a.requireAuth(store);
|
|
151
|
+
sessionFromReq = (req) => a.sessionFromReq(store, req);
|
|
152
|
+
}
|
|
145
153
|
for (const name of enabled) {
|
|
146
154
|
if (BUILTINS.has(name)) continue;
|
|
147
155
|
const mod = await loadAddon(name);
|
|
148
156
|
const register = mod && (mod.register || mod.default);
|
|
149
157
|
if (typeof register === "function") {
|
|
150
|
-
await register({ app, express, io, store, mailer, env: process.env, log: (...a) => console.log(`[${name}]`, ...a) });
|
|
158
|
+
await register({ app, express, io, store, mailer, env: process.env, requireAuth, sessionFromReq, log: (...a) => console.log(`[${name}]`, ...a) });
|
|
151
159
|
} else {
|
|
152
160
|
console.warn(`[volt] add-on "${name}" not found or missing a register() export — skipped`);
|
|
153
161
|
}
|
|
@@ -167,13 +167,21 @@ async function startApp() {
|
|
|
167
167
|
const io = new SocketServer(server);
|
|
168
168
|
if (enabled.has("realtime") && store) (await addonMod("realtime")).attachRealtime(io, { store });
|
|
169
169
|
|
|
170
|
-
// third-party add-ons — register(ctx)
|
|
170
|
+
// third-party add-ons — register(ctx). When auth is on, requireAuth/sessionFromReq
|
|
171
|
+
// are provided so add-ons can gate routes by login.
|
|
172
|
+
let requireAuth = null;
|
|
173
|
+
let sessionFromReq = null;
|
|
174
|
+
if (enabled.has("auth") && store) {
|
|
175
|
+
const a = await addonMod("auth");
|
|
176
|
+
requireAuth = a.requireAuth(store);
|
|
177
|
+
sessionFromReq = (req) => a.sessionFromReq(store, req);
|
|
178
|
+
}
|
|
171
179
|
for (const name of enabled) {
|
|
172
180
|
if (BUILTINS.has(name)) continue;
|
|
173
181
|
const mod = await loadAddon(name);
|
|
174
182
|
const register = mod && (mod.register || mod.default);
|
|
175
183
|
if (typeof register === "function") {
|
|
176
|
-
await register({ app, express, io, store, mailer, env: process.env, log: (...a) => console.log(`[${name}]`, ...a) });
|
|
184
|
+
await register({ app, express, io, store, mailer, env: process.env, requireAuth, sessionFromReq, log: (...a) => console.log(`[${name}]`, ...a) });
|
|
177
185
|
} else {
|
|
178
186
|
console.warn(`[volt] add-on "${name}" not found or missing a register() export — skipped`);
|
|
179
187
|
}
|