sbuilder-mcp 0.57.0 → 0.58.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
|
@@ -6,6 +6,11 @@ All notable changes to this project are documented in this file.
|
|
|
6
6
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
7
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.58.0] - 2026-09-15
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_review` now reports `blogCategoryPage` and `coursePage` readiness gaps when a site has blog categories or courses but no published page of the `blog` or `course` type, since `/blog-categories/{slug}` and `/courses/{slug}` fall back to those templates and every entity link 404s without them, completing the check against all five entity prefixes the storefront registers.
|
|
13
|
+
|
|
9
14
|
## [0.57.0] - 2026-09-15
|
|
10
15
|
|
|
11
16
|
### Added
|
package/CHANGELOG.vi.md
CHANGED
|
@@ -6,6 +6,11 @@ Mọi thay đổi đáng chú ý của dự án được ghi lại trong file n
|
|
|
6
6
|
Định dạng dựa trên [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
7
7
|
và dự án tuân theo [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
8
8
|
|
|
9
|
+
## [0.58.0] - 2026-09-15
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
- `sb_review` giờ báo lỗi sẵn sàng `blogCategoryPage` và `coursePage` khi site có danh mục blog hoặc khoá học nhưng chưa có trang loại `blog` hoặc `course` nào được publish, vì `/blog-categories/{slug}` và `/courses/{slug}` sẽ dùng các template đó, và mọi liên kết sẽ trả về 404 nếu thiếu — hoàn tất việc kiểm tra cho cả năm tiền tố thực thể mà storefront đăng ký.
|
|
13
|
+
|
|
9
14
|
## [0.57.0] - 2026-09-15
|
|
10
15
|
|
|
11
16
|
### Added
|
|
@@ -24,7 +24,7 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
|
|
|
24
24
|
}
|
|
25
25
|
};
|
|
26
26
|
const site = encodeURIComponent(siteId);
|
|
27
|
-
const [pageList, gateways, shipping, globals, productList, categoryList, pageLinks, formList, articleList] = await Promise.all([
|
|
27
|
+
const [pageList, gateways, shipping, globals, productList, categoryList, pageLinks, formList, articleList, blogCategoryList, courseList] = await Promise.all([
|
|
28
28
|
get(`/api/sites/${site}/pages`),
|
|
29
29
|
get(`/api/sites/${site}/payment-gateways`),
|
|
30
30
|
get(`/api/sites/${site}/shipping-methods`),
|
|
@@ -52,6 +52,13 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
|
|
|
52
52
|
// resolves to the site's `post` template, so a site that has written
|
|
53
53
|
// articles and has no template 404s every one of them.
|
|
54
54
|
get(`/api/sites/${site}/articles?limit=1`),
|
|
55
|
+
// THE LAST TWO ENTITY PREFIXES the storefront registers
|
|
56
|
+
// (storefront/entityroute.go): /blog-categories/{slug} and /courses/{slug}.
|
|
57
|
+
// Each resolves to the site's published page of its own TYPE, so each has
|
|
58
|
+
// the hole /products/{slug} has, and counting is how we know the site uses
|
|
59
|
+
// the prefix at all.
|
|
60
|
+
get(`/api/sites/${site}/blog-categories?limit=1`),
|
|
61
|
+
get(`/api/sites/${site}/courses?limit=1`),
|
|
55
62
|
]);
|
|
56
63
|
// A gateway counts only when it is BOTH enabled and configured — the editor's
|
|
57
64
|
// `live` getter also filters by the store's currency, which is a narrowing:
|
|
@@ -62,6 +69,10 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
|
|
|
62
69
|
: null;
|
|
63
70
|
const methods = shipping?.shippingMethods ?? shipping?.methods;
|
|
64
71
|
const shippingMethods = Array.isArray(methods) ? methods.length : null;
|
|
72
|
+
// Either key, like the product categories below: this reader has met both
|
|
73
|
+
// spellings from the platform and guessing one would read a real list as none.
|
|
74
|
+
const rawBlogCats = blogCategoryList?.blogCategories ?? blogCategoryList?.categories;
|
|
75
|
+
const blogCats = Array.isArray(rawBlogCats) ? rawBlogCats : null;
|
|
65
76
|
const cats = categoryList?.categories ?? categoryList?.productCategories;
|
|
66
77
|
const categories = Array.isArray(cats) ? (categoryList?.total ?? cats.length) : null;
|
|
67
78
|
const links = pageLinks?.links ?? pageLinks?.pageLinks;
|
|
@@ -101,5 +112,9 @@ export async function gatherReadiness(ctx, siteId, pageNodes) {
|
|
|
101
112
|
articles: Array.isArray(articleList?.articles)
|
|
102
113
|
? (articleList?.total ?? articleList.articles.length)
|
|
103
114
|
: null,
|
|
115
|
+
blogCategories: blogCats ? (blogCategoryList?.total ?? blogCats.length) : null,
|
|
116
|
+
courses: Array.isArray(courseList?.courses)
|
|
117
|
+
? (courseList?.total ?? courseList.courses.length)
|
|
118
|
+
: null,
|
|
104
119
|
};
|
|
105
120
|
}
|
|
@@ -203,6 +203,35 @@ export function readinessGaps(input) {
|
|
|
203
203
|
'headline, date and body an article cannot be read without.',
|
|
204
204
|
});
|
|
205
205
|
}
|
|
206
|
+
// THE LAST TWO ENTITY PREFIXES, the same hole in the same shape.
|
|
207
|
+
//
|
|
208
|
+
// storefront/entityroute.go registers five: /products, /collections, /blog,
|
|
209
|
+
// /blog-categories and /courses. Each resolves to the site's published page of
|
|
210
|
+
// its own TYPE, so each 404s everything under it when that page is missing.
|
|
211
|
+
// Four of the five are now checked above; these are the other two.
|
|
212
|
+
//
|
|
213
|
+
// COUNTED, NOT ASSUMED. A site with no blog categories has nothing under
|
|
214
|
+
// /blog-categories to break, and a site with no courses has not installed the
|
|
215
|
+
// app — the count IS the gate, which is why neither needs to ask about the
|
|
216
|
+
// app separately. Both sit above the store gate: a course is sold, but a blog
|
|
217
|
+
// is not commerce, and a site can be neither and still have one.
|
|
218
|
+
for (const [count, type, id, prefix, what] of [
|
|
219
|
+
[input.blogCategories, 'blog', 'blogCategoryPage', '/blog-categories/{slug}', 'blog category'],
|
|
220
|
+
[input.courses, 'course', 'coursePage', '/courses/{slug}', 'course'],
|
|
221
|
+
]) {
|
|
222
|
+
if (!pages || (count ?? 0) === 0 || published(pages, type))
|
|
223
|
+
continue;
|
|
224
|
+
const draft = drafted(pages, type);
|
|
225
|
+
gaps.push({
|
|
226
|
+
id,
|
|
227
|
+
draft,
|
|
228
|
+
problem: `This site has ${count} ${what}${count === 1 ? '' : count && count > 1 ? 's' : ''} and no ` +
|
|
229
|
+
`published page of the "${type}" type. ${prefix} needs one, so every ${what} link 404s.`,
|
|
230
|
+
fix: draft
|
|
231
|
+
? `Publish the ${what} template page that already exists.`
|
|
232
|
+
: `Create a page of type "${type}" and publish it.`,
|
|
233
|
+
});
|
|
234
|
+
}
|
|
206
235
|
if (!isStore(input))
|
|
207
236
|
return gaps;
|
|
208
237
|
if (pages && !published(pages, 'checkout')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sbuilder-mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.58.0",
|
|
4
4
|
"description": "MCP server that designs and operates a Store Builder site — pages, data, theme and publish — through the platform's own API and live-edit protocol.",
|
|
5
5
|
"mcpName": "io.github.vuluu2k/sbuilder-mcp",
|
|
6
6
|
"type": "module",
|