@momentumcms/server-express 0.3.0 → 0.4.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/CHANGELOG.md +17 -0
- package/index.cjs +12 -8
- package/index.js +12 -8
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 0.4.0 (2026-02-22)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- SEO plugin recovery, E2E fixes, and CLI templates ([#37](https://github.com/DonaldMurillo/momentum-cms/pull/37), [#33](https://github.com/DonaldMurillo/momentum-cms/issues/33))
|
|
6
|
+
- blocks showcase with articles, pages, and UI fixes ([#36](https://github.com/DonaldMurillo/momentum-cms/pull/36))
|
|
7
|
+
|
|
8
|
+
### 🩹 Fixes
|
|
9
|
+
|
|
10
|
+
- remove unused CardContent import and duplicate peerDependency ([e67f149](https://github.com/DonaldMurillo/momentum-cms/commit/e67f149))
|
|
11
|
+
- resolve lint errors, fix vitest config excludes, and fix CLI template test assertion ([5124f72](https://github.com/DonaldMurillo/momentum-cms/commit/5124f72))
|
|
12
|
+
|
|
13
|
+
### ❤️ Thank You
|
|
14
|
+
|
|
15
|
+
- Claude Opus 4.6
|
|
16
|
+
- Donald Murillo @DonaldMurillo
|
|
17
|
+
|
|
1
18
|
## 0.3.0 (2026-02-20)
|
|
2
19
|
|
|
3
20
|
### 🚀 Features
|
package/index.cjs
CHANGED
|
@@ -5519,7 +5519,9 @@ function momentumApiMiddleware(config) {
|
|
|
5519
5519
|
router.use((req, res, next) => {
|
|
5520
5520
|
if (!beforeApiRouter) {
|
|
5521
5521
|
const pluginMiddleware2 = getPluginMiddleware();
|
|
5522
|
-
const beforeMw = pluginMiddleware2.filter(
|
|
5522
|
+
const beforeMw = pluginMiddleware2.filter(
|
|
5523
|
+
(mw) => mw.position !== "after-api" && mw.position !== "root"
|
|
5524
|
+
);
|
|
5523
5525
|
if (beforeMw.length > 0) {
|
|
5524
5526
|
beforeApiRouter = (0, import_express.Router)();
|
|
5525
5527
|
for (const mw of beforeMw) {
|
|
@@ -5948,9 +5950,8 @@ function momentumApiMiddleware(config) {
|
|
|
5948
5950
|
};
|
|
5949
5951
|
const fields = {};
|
|
5950
5952
|
if (typeof req.body === "object" && req.body !== null) {
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
)) {
|
|
5953
|
+
const bodyEntries = Object(req.body);
|
|
5954
|
+
for (const [key, value] of Object.entries(bodyEntries)) {
|
|
5954
5955
|
if (key !== "file") {
|
|
5955
5956
|
fields[key] = value;
|
|
5956
5957
|
}
|
|
@@ -6416,9 +6417,8 @@ function momentumApiMiddleware(config) {
|
|
|
6416
6417
|
};
|
|
6417
6418
|
const fields = {};
|
|
6418
6419
|
if (typeof req.body === "object" && req.body !== null) {
|
|
6419
|
-
|
|
6420
|
-
|
|
6421
|
-
)) {
|
|
6420
|
+
const bodyEntries = Object(req.body);
|
|
6421
|
+
for (const [key, value] of Object.entries(bodyEntries)) {
|
|
6422
6422
|
if (key !== "file") {
|
|
6423
6423
|
fields[key] = value;
|
|
6424
6424
|
}
|
|
@@ -6472,7 +6472,7 @@ function momentumApiMiddleware(config) {
|
|
|
6472
6472
|
res.status(500).json({ error: message });
|
|
6473
6473
|
}
|
|
6474
6474
|
} else {
|
|
6475
|
-
const body = typeof req.body === "object" && req.body !== null ? req.body : {};
|
|
6475
|
+
const body = typeof req.body === "object" && req.body !== null ? Object(req.body) : {};
|
|
6476
6476
|
const request = {
|
|
6477
6477
|
method: "PATCH",
|
|
6478
6478
|
collectionSlug: slug2,
|
|
@@ -7596,6 +7596,10 @@ async function createMomentumServer(options) {
|
|
|
7596
7596
|
if (openapi) {
|
|
7597
7597
|
app.use("/api/docs", createOpenAPIMiddleware({ config }));
|
|
7598
7598
|
}
|
|
7599
|
+
const rootMiddleware = getPluginMiddleware().filter((mw) => mw.position === "root");
|
|
7600
|
+
for (const mw of rootMiddleware) {
|
|
7601
|
+
app.use(mw.path, mw.handler);
|
|
7602
|
+
}
|
|
7599
7603
|
app.use("/api", momentumApiMiddleware(config));
|
|
7600
7604
|
function getSsrProviders(user) {
|
|
7601
7605
|
const pluginProviders2 = getPluginProviders().map((p) => ({
|
package/index.js
CHANGED
|
@@ -5490,7 +5490,9 @@ function momentumApiMiddleware(config) {
|
|
|
5490
5490
|
router.use((req, res, next) => {
|
|
5491
5491
|
if (!beforeApiRouter) {
|
|
5492
5492
|
const pluginMiddleware2 = getPluginMiddleware();
|
|
5493
|
-
const beforeMw = pluginMiddleware2.filter(
|
|
5493
|
+
const beforeMw = pluginMiddleware2.filter(
|
|
5494
|
+
(mw) => mw.position !== "after-api" && mw.position !== "root"
|
|
5495
|
+
);
|
|
5494
5496
|
if (beforeMw.length > 0) {
|
|
5495
5497
|
beforeApiRouter = Router();
|
|
5496
5498
|
for (const mw of beforeMw) {
|
|
@@ -5919,9 +5921,8 @@ function momentumApiMiddleware(config) {
|
|
|
5919
5921
|
};
|
|
5920
5922
|
const fields = {};
|
|
5921
5923
|
if (typeof req.body === "object" && req.body !== null) {
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
)) {
|
|
5924
|
+
const bodyEntries = Object(req.body);
|
|
5925
|
+
for (const [key, value] of Object.entries(bodyEntries)) {
|
|
5925
5926
|
if (key !== "file") {
|
|
5926
5927
|
fields[key] = value;
|
|
5927
5928
|
}
|
|
@@ -6387,9 +6388,8 @@ function momentumApiMiddleware(config) {
|
|
|
6387
6388
|
};
|
|
6388
6389
|
const fields = {};
|
|
6389
6390
|
if (typeof req.body === "object" && req.body !== null) {
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
)) {
|
|
6391
|
+
const bodyEntries = Object(req.body);
|
|
6392
|
+
for (const [key, value] of Object.entries(bodyEntries)) {
|
|
6393
6393
|
if (key !== "file") {
|
|
6394
6394
|
fields[key] = value;
|
|
6395
6395
|
}
|
|
@@ -6443,7 +6443,7 @@ function momentumApiMiddleware(config) {
|
|
|
6443
6443
|
res.status(500).json({ error: message });
|
|
6444
6444
|
}
|
|
6445
6445
|
} else {
|
|
6446
|
-
const body = typeof req.body === "object" && req.body !== null ? req.body : {};
|
|
6446
|
+
const body = typeof req.body === "object" && req.body !== null ? Object(req.body) : {};
|
|
6447
6447
|
const request = {
|
|
6448
6448
|
method: "PATCH",
|
|
6449
6449
|
collectionSlug: slug2,
|
|
@@ -7567,6 +7567,10 @@ async function createMomentumServer(options) {
|
|
|
7567
7567
|
if (openapi) {
|
|
7568
7568
|
app.use("/api/docs", createOpenAPIMiddleware({ config }));
|
|
7569
7569
|
}
|
|
7570
|
+
const rootMiddleware = getPluginMiddleware().filter((mw) => mw.position === "root");
|
|
7571
|
+
for (const mw of rootMiddleware) {
|
|
7572
|
+
app.use(mw.path, mw.handler);
|
|
7573
|
+
}
|
|
7570
7574
|
app.use("/api", momentumApiMiddleware(config));
|
|
7571
7575
|
function getSsrProviders(user) {
|
|
7572
7576
|
const pluginProviders2 = getPluginProviders().map((p) => ({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@momentumcms/server-express",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Express adapter for Momentum CMS with Angular SSR support",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Momentum CMS Contributors",
|
|
@@ -33,6 +33,7 @@
|
|
|
33
33
|
"@momentumcms/logger": ">=0.0.1",
|
|
34
34
|
"@momentumcms/plugins-core": ">=0.0.1",
|
|
35
35
|
"@momentumcms/server-core": ">=0.0.1",
|
|
36
|
+
"@momentumcms/storage": ">=0.0.1",
|
|
36
37
|
"better-auth": "^1.0.0",
|
|
37
38
|
"better-sqlite3": "^12.0.0",
|
|
38
39
|
"express": "^4.18.0 || ^5.0.0",
|