@beechcms/cms 0.4.3 → 0.5.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/create.mjs +14 -0
- package/bin/templates/commerce.ts +29 -0
- package/bin/templates/tasks.ts +12 -0
- package/package.json +4 -4
package/bin/create.mjs
CHANGED
|
@@ -33,6 +33,18 @@ const TEMPLATES = {
|
|
|
33
33
|
file: 'contact.ts',
|
|
34
34
|
registryEntries: ['messages: MESSAGE_SEED'],
|
|
35
35
|
},
|
|
36
|
+
commerce: {
|
|
37
|
+
label: 'Commerce',
|
|
38
|
+
hint: 'e-commerce product catalog with prices, inventory and ratings',
|
|
39
|
+
file: 'commerce.ts',
|
|
40
|
+
registryEntries: ['products: PRODUCT_SEED', 'reviews: REVIEW_SEED'],
|
|
41
|
+
},
|
|
42
|
+
tasks: {
|
|
43
|
+
label: 'Tasks',
|
|
44
|
+
hint: 'project management tasks with progress slider',
|
|
45
|
+
file: 'tasks.ts',
|
|
46
|
+
registryEntries: ['tasks: TASK_SEED'],
|
|
47
|
+
},
|
|
36
48
|
}
|
|
37
49
|
|
|
38
50
|
function readTemplate(filename) {
|
|
@@ -319,6 +331,8 @@ async function main() {
|
|
|
319
331
|
{ value: 'blog', label: 'Blog', hint: 'posts with rich text, cover image, tags and authors' },
|
|
320
332
|
{ value: 'gallery', label: 'Gallery', hint: 'media items with image, tags and featured flag' },
|
|
321
333
|
{ value: 'contact', label: 'Contact', hint: 'public form submissions with masked email and read status' },
|
|
334
|
+
{ value: 'commerce',label: 'Commerce',hint: 'e-commerce product catalog with prices, inventory and ratings' },
|
|
335
|
+
{ value: 'tasks', label: 'Tasks', hint: 'project management tasks with progress slider' },
|
|
322
336
|
],
|
|
323
337
|
required: false,
|
|
324
338
|
})
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Product: e-commerce product catalog with prices, inventory and ratings */
|
|
2
|
+
export const PRODUCT_SEED: Seed = {
|
|
3
|
+
slug: 'products',
|
|
4
|
+
label: 'Product',
|
|
5
|
+
labelPlural: 'Products',
|
|
6
|
+
displayNameAlias: 'name',
|
|
7
|
+
allowPublicRead: true,
|
|
8
|
+
branches: [
|
|
9
|
+
{ alias: 'name', label: 'Product Name', type: 'text', requiredOnCreate: true },
|
|
10
|
+
{ alias: 'description', label: 'Description', type: 'richtext' },
|
|
11
|
+
{ alias: 'price', label: 'Price', type: 'number', numberOptions: { format: 'currency', currency: 'EUR', decimals: 2, min: 0, control: 'input', prefix: '€' } },
|
|
12
|
+
{ alias: 'inventory', label: 'Stock level', type: 'number', numberOptions: { min: 0, step: 1, control: 'stepper' } },
|
|
13
|
+
{ alias: 'rating', label: 'Rating', type: 'number', numberOptions: { min: 1, max: 5, step: 0.5, control: 'rating' } }
|
|
14
|
+
],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** Review: product review */
|
|
18
|
+
export const REVIEW_SEED: Seed = {
|
|
19
|
+
slug: 'reviews',
|
|
20
|
+
label: 'Review',
|
|
21
|
+
labelPlural: 'Reviews',
|
|
22
|
+
displayNameAlias: 'title',
|
|
23
|
+
allowPublicRead: true,
|
|
24
|
+
branches: [
|
|
25
|
+
{ alias: 'title', label: 'Review Title', type: 'text', requiredOnCreate: true },
|
|
26
|
+
{ alias: 'body', label: 'Body', type: 'text' },
|
|
27
|
+
{ alias: 'score', label: 'Score', type: 'number', numberOptions: { min: 1, max: 5, step: 1, control: 'rating' } }
|
|
28
|
+
],
|
|
29
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** Task: project management tasks with progress slider */
|
|
2
|
+
export const TASK_SEED: Seed = {
|
|
3
|
+
slug: 'tasks',
|
|
4
|
+
label: 'Task',
|
|
5
|
+
labelPlural: 'Tasks',
|
|
6
|
+
displayNameAlias: 'title',
|
|
7
|
+
branches: [
|
|
8
|
+
{ alias: 'title', label: 'Task Title', type: 'text', requiredOnCreate: true },
|
|
9
|
+
{ alias: 'taskStatus', label: 'Status', type: 'text', options: ['todo', 'in_progress', 'done'] },
|
|
10
|
+
{ alias: 'completion', label: 'Completion', type: 'number', numberOptions: { format: 'percentage', min: 0, max: 100, step: 5, control: 'slider' } }
|
|
11
|
+
],
|
|
12
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beechcms/cms",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"packageManager": "npm@11.9.0",
|
|
5
5
|
"description": "Edge-Native, Schema-Driven Headless CMS built on Cloudflare Workers, D1, and R2. Features the Botanical Engine for alias-stable field management, a modular widget layer, and a React + Vite admin dashboard.",
|
|
6
6
|
"keywords": [
|
|
@@ -57,13 +57,13 @@
|
|
|
57
57
|
"typescript": "^5.9.3"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@beechcms/cli": "^0.
|
|
60
|
+
"@beechcms/cli": "^0.5.0",
|
|
61
61
|
"@clack/prompts": "^0.9.1",
|
|
62
62
|
"picocolors": "^1.1.1"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@beechcms/api": "^0.
|
|
66
|
-
"@beechcms/core": "^0.
|
|
65
|
+
"@beechcms/api": "^0.5.0",
|
|
66
|
+
"@beechcms/core": "^0.5.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependenciesMeta": {
|
|
69
69
|
"@beechcms/api": {
|