@deneb-ui/cli 2.0.0 → 2.0.3
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/README.md +49 -142
- package/bin/index.js +16 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
#
|
|
1
|
+
# DENEB
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### The official developer CLI for DENEB UI.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **DENEB UI — Build beautiful interfaces, effortlessly.**
|
|
6
|
+
> The premier visual-first React component ecosystem.
|
|
7
|
+
> Created by **Chamika Gayashan & Induranga Kawishwara**.
|
|
8
|
+
|
|
9
|
+
[](https://github.com/chamikathereal)
|
|
6
10
|
[](https://opensource.org/licenses/MIT)
|
|
7
11
|
|
|
8
12
|
---
|
|
@@ -11,187 +15,90 @@ Official developer CLI for creating, initializing, testing, validating, and pack
|
|
|
11
15
|
|
|
12
16
|
You can run commands directly using `npx`:
|
|
13
17
|
```bash
|
|
14
|
-
npx @
|
|
18
|
+
npx @deneb-ui/cli <command>
|
|
15
19
|
```
|
|
16
20
|
|
|
17
|
-
Or install
|
|
21
|
+
Or install as a project devDependency:
|
|
18
22
|
```bash
|
|
19
|
-
npm install -
|
|
23
|
+
npm install -D @deneb-ui/cli
|
|
20
24
|
```
|
|
21
25
|
|
|
22
|
-
Or install
|
|
26
|
+
Or install globally:
|
|
23
27
|
```bash
|
|
24
|
-
npm install -
|
|
28
|
+
npm install -g @deneb-ui/cli
|
|
25
29
|
```
|
|
26
30
|
|
|
27
|
-
The CLI command is available as `
|
|
31
|
+
The CLI command is available as `deneb` (with alias `denebui`).
|
|
28
32
|
|
|
29
33
|
---
|
|
30
34
|
|
|
31
35
|
## Commands
|
|
32
36
|
|
|
33
|
-
### 1. `
|
|
34
|
-
|
|
37
|
+
### 1. `deneb add <component>` (Component Registry)
|
|
38
|
+
Add production-ready DENEB UI components into `src/components/ui/`:
|
|
35
39
|
|
|
36
40
|
```bash
|
|
37
|
-
#
|
|
38
|
-
npx @
|
|
39
|
-
|
|
40
|
-
|
|
41
|
+
# List available components:
|
|
42
|
+
npx @deneb-ui/cli add list
|
|
43
|
+
|
|
44
|
+
# Add specific components:
|
|
45
|
+
npx @deneb-ui/cli add product-card
|
|
46
|
+
npx @deneb-ui/cli add contact-actions
|
|
47
|
+
npx @deneb-ui/cli add location-card
|
|
48
|
+
npx @deneb-ui/cli add whatsapp-button
|
|
49
|
+
npx @deneb-ui/cli add dialog
|
|
50
|
+
npx @deneb-ui/cli add all
|
|
41
51
|
```
|
|
42
52
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
- Generates `fivora-template.json` (Version 2 strict visual editing contract) with detected pages.
|
|
46
|
-
- Generates `src/data/site-data.json` for merchant branding, navigation labels, and editable copy.
|
|
47
|
-
- Injects npm scripts (`lab`, `validate`, `zip`, `package:template`) into `package.json`.
|
|
48
|
-
- Installs `@fivora/editable-components` and `@fivora/cli`.
|
|
49
|
-
- Checks `next.config` to verify `output: 'export'` for static export builds.
|
|
53
|
+
### 2. `deneb init` (Configure an Existing Project)
|
|
54
|
+
Converts any **existing Next.js project** into a compliant DENEB storefront template:
|
|
50
55
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
---
|
|
56
|
+
```bash
|
|
57
|
+
npx @deneb-ui/cli init
|
|
58
|
+
```
|
|
55
59
|
|
|
56
|
-
###
|
|
57
|
-
Scaffolds a brand-new
|
|
60
|
+
### 3. `deneb create <project-name>` (Start from Scratch)
|
|
61
|
+
Scaffolds a brand-new Next.js App Router storefront with Tailwind CSS and `@deneb-ui/ui`:
|
|
58
62
|
|
|
59
63
|
```bash
|
|
60
|
-
|
|
61
|
-
cd my-store
|
|
62
|
-
npm run dev
|
|
64
|
+
npx @deneb-ui/cli create my-store
|
|
63
65
|
```
|
|
64
66
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
### 3. `fivora lab [path]` (Visual Editing Lab)
|
|
68
|
-
Starts the local **Fivora Visual Editing Lab**. It boots your Next.js store inside an interactive editor simulation so you can test merchant visual click-to-edit interactions and field highlights before uploading.
|
|
67
|
+
### 4. `deneb lab` (Local Visual Editing Lab)
|
|
68
|
+
Launches the interactive visual editing test lab:
|
|
69
69
|
|
|
70
70
|
```bash
|
|
71
|
-
fivora lab .
|
|
72
|
-
# Or via npm script:
|
|
73
71
|
npm run lab
|
|
72
|
+
# Or: deneb lab .
|
|
74
73
|
```
|
|
75
74
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
- `--preview-port <port>` – Template dev server port (default: `4173`)
|
|
79
|
-
- `--skip-install` – Do not install missing dependencies automatically
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
### 4. `fivora validate [path]` (Contract Preflight Validation)
|
|
84
|
-
Runs strict preflight compliance checks against the Fivora template contract:
|
|
85
|
-
|
|
86
|
-
- **Manifest Validation:** Ensures `fivora-template.json` satisfies contract version 2.
|
|
87
|
-
- **Probe Fixture Test:** Verifies that all `data-preview-field-path` annotations render without breaking.
|
|
88
|
-
- **Empty-State Safety:** Verifies the template does not crash when merchant content is empty or omitted.
|
|
89
|
-
- **Unselected Page Link Filtering:** Verifies links to optional unselected pages are cleanly filtered.
|
|
75
|
+
### 5. `deneb validate` (Preflight Contract Validator)
|
|
76
|
+
Runs preflight checks to guarantee 100% compliance with visual editing and platform rules:
|
|
90
77
|
|
|
91
78
|
```bash
|
|
92
|
-
fivora validate .
|
|
93
|
-
# Or via npm script:
|
|
94
79
|
npm run validate
|
|
80
|
+
# Or: deneb validate .
|
|
95
81
|
```
|
|
96
82
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- `--skip-build` – Skip building output directory
|
|
100
|
-
- `--json` – Output results as structured JSON
|
|
101
|
-
|
|
102
|
-
---
|
|
103
|
-
|
|
104
|
-
### 5. `fivora zip [path]` (Clean 1-Click Packaging)
|
|
105
|
-
Packages your template into an upload-ready `.zip` file for the Fivora Developer Portal.
|
|
83
|
+
### 6. `deneb zip` / `deneb pack` (Clean Package Generator)
|
|
84
|
+
Creates a clean, production-ready template ZIP excluding `node_modules`, `.next`, `.git`, `.env*`:
|
|
106
85
|
|
|
107
86
|
```bash
|
|
108
|
-
fivora zip .
|
|
109
|
-
# Or via npm script:
|
|
110
87
|
npm run zip
|
|
88
|
+
# Or: deneb zip .
|
|
111
89
|
```
|
|
112
90
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- `node_modules/`
|
|
116
|
-
- `.next/` and `.turbo/`
|
|
117
|
-
- `.git/`
|
|
118
|
-
- `.env*` files
|
|
119
|
-
- Temporary logs and build caches
|
|
120
|
-
|
|
121
|
-
Output is saved as `fivora-template.zip` in your project root.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
### 6. `fivora update [path]` (Update Fivora Dependencies)
|
|
126
|
-
Updates `@fivora/editable-components` and `@fivora/cli` to their latest versions:
|
|
91
|
+
### 7. `deneb update` (Dependency Updater)
|
|
92
|
+
Updates `@deneb-ui/ui` and `@deneb-ui/cli` to the latest versions:
|
|
127
93
|
|
|
128
94
|
```bash
|
|
129
|
-
|
|
130
|
-
# Or
|
|
131
|
-
npm run update:fivora
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
**What it does:**
|
|
135
|
-
- In standard/published projects: Runs `npm install @fivora/editable-components@latest @fivora/cli@latest`.
|
|
136
|
-
- In local development workspaces: Automatically detects `file:` package paths (or with `--local` flag) and re-links directly against local package folders.
|
|
137
|
-
|
|
138
|
-
**Options:**
|
|
139
|
-
- `--local` / `-l` (optional `--local=<path>`) – Re-link against a local workspace for developing packages locally (defaults to `/mnt/GAMES/GitHub/fivora_package`).
|
|
140
|
-
|
|
141
|
-
---
|
|
142
|
-
|
|
143
|
-
## Template Manifest (`fivora-template.json`)
|
|
144
|
-
|
|
145
|
-
The template manifest declares template metadata, pages, and editable schema:
|
|
146
|
-
|
|
147
|
-
```json
|
|
148
|
-
{
|
|
149
|
-
"framework": "nextjs-static-export",
|
|
150
|
-
"version": 2,
|
|
151
|
-
"visualEditing": {
|
|
152
|
-
"contractVersion": 1,
|
|
153
|
-
"mode": "strict",
|
|
154
|
-
"controlOnlyPaths": []
|
|
155
|
-
},
|
|
156
|
-
"siteDataFile": "src/data/site-data.json",
|
|
157
|
-
"outputDirectory": "out",
|
|
158
|
-
"installCommand": "npm install",
|
|
159
|
-
"buildCommand": "npm run build",
|
|
160
|
-
"basePathEnvVar": "NEXT_PUBLIC_SITE_BASE_PATH",
|
|
161
|
-
"pages": [
|
|
162
|
-
{ "id": "home", "label": "Home", "route": "/", "required": true },
|
|
163
|
-
{ "id": "products", "label": "Products", "route": "/products" },
|
|
164
|
-
{ "id": "contact", "label": "Contact", "route": "/contact", "required": true }
|
|
165
|
-
],
|
|
166
|
-
"editorSchema": {
|
|
167
|
-
"version": 1,
|
|
168
|
-
"sections": []
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
---
|
|
174
|
-
|
|
175
|
-
## Troubleshooting
|
|
176
|
-
|
|
177
|
-
### `Error: Template manifest is missing or invalid`
|
|
178
|
-
Your project is missing `fivora-template.json`. Run:
|
|
179
|
-
```bash
|
|
180
|
-
npx @fivora/cli init
|
|
181
|
-
```
|
|
182
|
-
This will automatically generate the manifest and site data for your project.
|
|
183
|
-
|
|
184
|
-
### `Error: Template manifest framework must be "nextjs-static-export"`
|
|
185
|
-
Make sure your `next.config.ts` or `next.config.js` specifies static export:
|
|
186
|
-
```typescript
|
|
187
|
-
const nextConfig = {
|
|
188
|
-
output: 'export',
|
|
189
|
-
};
|
|
190
|
-
export default nextConfig;
|
|
95
|
+
npm run update:deneb
|
|
96
|
+
# Or: deneb update
|
|
191
97
|
```
|
|
192
98
|
|
|
193
99
|
---
|
|
194
100
|
|
|
195
|
-
##
|
|
101
|
+
## 👤 Author & Credits
|
|
196
102
|
|
|
197
|
-
|
|
103
|
+
Created and architected by **Chamika Gayashan & Induranga Kawishwara**.
|
|
104
|
+
Part of the **DENEB UI** ecosystem.
|
package/bin/index.js
CHANGED
|
@@ -704,6 +704,21 @@ function addComponent(componentName, targetDirInput) {
|
|
|
704
704
|
component: 'BusinessHours',
|
|
705
705
|
code: `'use client';\n\nimport { BusinessHours, type BusinessHoursProps } from '${importPkg}';\n\nexport { BusinessHours, type BusinessHoursProps };\n`,
|
|
706
706
|
},
|
|
707
|
+
'announcement-bar': {
|
|
708
|
+
file: 'AnnouncementBar.tsx',
|
|
709
|
+
component: 'EditableAnnouncementBar',
|
|
710
|
+
code: `'use client';\n\nimport { EditableAnnouncementBar, AnnouncementBar, type EditableAnnouncementBarProps } from '${importPkg}';\n\nexport { EditableAnnouncementBar, AnnouncementBar, type EditableAnnouncementBarProps };\n`,
|
|
711
|
+
},
|
|
712
|
+
'category-pills': {
|
|
713
|
+
file: 'CategoryPills.tsx',
|
|
714
|
+
component: 'EditableCategoryPills',
|
|
715
|
+
code: `'use client';\n\nimport { EditableCategoryPills, CategoryPills, type EditableCategoryPillsProps } from '${importPkg}';\n\nexport { EditableCategoryPills, CategoryPills, type EditableCategoryPillsProps };\n`,
|
|
716
|
+
},
|
|
717
|
+
'floating-contact-widget': {
|
|
718
|
+
file: 'FloatingContactWidget.tsx',
|
|
719
|
+
component: 'FloatingContactWidget',
|
|
720
|
+
code: `'use client';\n\nimport { FloatingContactWidget, type FloatingContactWidgetProps } from '${importPkg}';\n\nexport { FloatingContactWidget, type FloatingContactWidgetProps };\n`,
|
|
721
|
+
},
|
|
707
722
|
'deneb-action': {
|
|
708
723
|
file: 'DenebAction.tsx',
|
|
709
724
|
component: 'DenebAction',
|
|
@@ -768,7 +783,7 @@ if (command === 'init') {
|
|
|
768
783
|
process.exit(res.status ?? 0);
|
|
769
784
|
} else {
|
|
770
785
|
console.log(`Usage: deneb <command> [options] (or fivora <command> [options])
|
|
771
|
-
DENEB UI Framework — Created by Chamika Gayashan
|
|
786
|
+
DENEB UI Framework — Created by Chamika Gayashan & Induranga Kawishwara
|
|
772
787
|
|
|
773
788
|
Commands:
|
|
774
789
|
add Add a DENEB UI component to src/components/ui/ (e.g. deneb add product-card)
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deneb-ui/cli",
|
|
3
|
-
"version": "2.0.
|
|
4
|
-
"description": "Official developer CLI for DENEB UI — Validating, scaffolding, testing, and packaging storefront templates. Created by Chamika Gayashan
|
|
3
|
+
"version": "2.0.3",
|
|
4
|
+
"description": "Official developer CLI for DENEB UI — Validating, scaffolding, testing, and packaging storefront templates. Created by Chamika Gayashan & Induranga Kawishwara.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"deneb": "bin/index.js",
|
|
7
7
|
"denebui": "bin/index.js",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"validator",
|
|
27
27
|
"packager"
|
|
28
28
|
],
|
|
29
|
-
"author": "Chamika Gayashan
|
|
29
|
+
"author": "Chamika Gayashan & Induranga Kawishwara",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"adm-zip": "^0.6.0"
|