@onexapis/cli 1.1.17 → 1.1.19
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 +82 -16
- package/dist/cli.js +621 -294
- package/dist/cli.js.map +1 -1
- package/dist/cli.mjs +618 -291
- package/dist/cli.mjs.map +1 -1
- package/dist/index.js +73 -278
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +73 -278
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/templates/default/.env.example +1 -1
- package/templates/default/.mcp.json +8 -0
- package/templates/default/CLAUDE.md +941 -0
- package/templates/default/bundle-entry.ts +18 -0
- package/templates/default/index.ts +26 -0
- package/templates/default/package.json +34 -0
- package/templates/default/pages/about.ts +66 -0
- package/templates/default/pages/home.ts +93 -0
- package/templates/default/pages/showcase.ts +146 -0
- package/templates/default/sections/about/about-default.tsx +237 -0
- package/templates/default/sections/about/about.schema.ts +259 -0
- package/templates/default/sections/about/index.ts +15 -0
- package/templates/default/sections/cta/cta-default.tsx +180 -0
- package/templates/default/sections/cta/cta.schema.ts +210 -0
- package/templates/default/sections/cta/index.ts +11 -0
- package/templates/default/sections/features/features-default.tsx +154 -0
- package/templates/default/sections/features/features.schema.ts +330 -0
- package/templates/default/sections/features/index.ts +11 -0
- package/templates/default/sections/gallery/gallery-default.tsx +134 -0
- package/templates/default/sections/gallery/gallery.schema.ts +397 -0
- package/templates/default/sections/gallery/index.ts +11 -0
- package/templates/default/sections/hero/hero-default.tsx +212 -0
- package/templates/default/sections/hero/hero.schema.ts +273 -0
- package/templates/default/sections/hero/index.ts +15 -0
- package/templates/default/sections/stats/index.ts +11 -0
- package/templates/default/sections/stats/stats-default.tsx +103 -0
- package/templates/default/sections/stats/stats.schema.ts +266 -0
- package/templates/default/sections/testimonials/index.ts +11 -0
- package/templates/default/sections/testimonials/testimonials-default.tsx +130 -0
- package/templates/default/sections/testimonials/testimonials.schema.ts +371 -0
- package/templates/default/sections-registry.ts +32 -0
- package/templates/default/theme.config.ts +107 -0
- package/templates/default/theme.layout.ts +21 -0
- package/templates/default/tsconfig.json +16 -7
- package/templates/default/README.md.ejs +0 -129
- package/templates/default/esbuild.config.js +0 -81
- package/templates/default/package.json.ejs +0 -31
- package/templates/default/src/config.ts.ejs +0 -98
- package/templates/default/src/index.ts.ejs +0 -11
- package/templates/default/src/layout.ts +0 -23
- package/templates/default/src/manifest.ts.ejs +0 -47
- package/templates/default/src/pages/home.ts.ejs +0 -37
- package/templates/default/src/sections/footer/footer-default.tsx +0 -28
- package/templates/default/src/sections/footer/footer.schema.ts +0 -45
- package/templates/default/src/sections/footer/index.ts +0 -2
- package/templates/default/src/sections/header/header-default.tsx +0 -61
- package/templates/default/src/sections/header/header.schema.ts +0 -46
- package/templates/default/src/sections/header/index.ts +0 -2
- package/templates/default/src/sections/hero/hero-default.tsx +0 -52
- package/templates/default/src/sections/hero/hero.schema.ts +0 -52
- package/templates/default/src/sections/hero/index.ts +0 -2
package/README.md
CHANGED
|
@@ -19,24 +19,33 @@ Requires Node.js >= 18.
|
|
|
19
19
|
## Quick Start
|
|
20
20
|
|
|
21
21
|
```bash
|
|
22
|
-
# 1.
|
|
23
|
-
onexthm
|
|
22
|
+
# 1. Login to OneX platform
|
|
23
|
+
onexthm login
|
|
24
24
|
|
|
25
25
|
# 2. Create a new theme project
|
|
26
26
|
onexthm init my-theme
|
|
27
|
+
cd my-theme
|
|
27
28
|
|
|
28
|
-
#
|
|
29
|
-
onexthm
|
|
29
|
+
# 3. Develop with live preview
|
|
30
|
+
onexthm dev
|
|
31
|
+
|
|
32
|
+
# 4. Publish to marketplace (authenticated, secure)
|
|
33
|
+
onexthm publish
|
|
30
34
|
```
|
|
31
35
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
onexthm
|
|
36
|
-
onexthm
|
|
37
|
-
|
|
38
|
-
onexthm
|
|
39
|
-
onexthm
|
|
36
|
+
## Theme Developer Flow
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
onexthm login # Authenticate with OneX platform
|
|
40
|
+
onexthm init my-store # Scaffold theme from template (7 sections, 3 pages)
|
|
41
|
+
cd my-store
|
|
42
|
+
onexthm dev # Live preview at localhost:3456
|
|
43
|
+
onexthm create:section pricing # Add new section
|
|
44
|
+
onexthm validate # Check structure
|
|
45
|
+
onexthm build # Compile for production
|
|
46
|
+
onexthm publish # Register → build → upload → scan → publish
|
|
47
|
+
onexthm whoami # Check logged-in status
|
|
48
|
+
onexthm logout # End session
|
|
40
49
|
```
|
|
41
50
|
|
|
42
51
|
## Commands
|
|
@@ -212,15 +221,72 @@ onexthm clone simple -n my-store
|
|
|
212
221
|
onexthm clone simple -v 1.0.0 -o ./my-clone --no-install
|
|
213
222
|
```
|
|
214
223
|
|
|
215
|
-
### `onexthm
|
|
224
|
+
### `onexthm login`
|
|
216
225
|
|
|
217
|
-
|
|
226
|
+
Authenticate with the OneX platform. Stores encrypted JWT token in `~/.onexthm/auth.json`.
|
|
218
227
|
|
|
219
228
|
```bash
|
|
220
|
-
onexthm
|
|
229
|
+
onexthm login
|
|
230
|
+
# Email: dev@example.com
|
|
231
|
+
# Password: ********
|
|
232
|
+
# ✓ Logged in! Token stored securely.
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
Required before `onexthm publish`. Token auto-refreshes on expiry.
|
|
236
|
+
|
|
237
|
+
### `onexthm logout`
|
|
238
|
+
|
|
239
|
+
Clear stored authentication tokens.
|
|
240
|
+
|
|
241
|
+
```bash
|
|
242
|
+
onexthm logout
|
|
221
243
|
```
|
|
222
244
|
|
|
223
|
-
|
|
245
|
+
### `onexthm whoami`
|
|
246
|
+
|
|
247
|
+
Show current logged-in developer info.
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
onexthm whoami
|
|
251
|
+
# Email: dev@example.com
|
|
252
|
+
# Company: 9e61d187-...
|
|
253
|
+
# Status: ✓ Active
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### `onexthm publish`
|
|
257
|
+
|
|
258
|
+
Build, scan, and publish theme to the marketplace. Requires login.
|
|
259
|
+
|
|
260
|
+
```bash
|
|
261
|
+
onexthm publish
|
|
262
|
+
# ✓ Logged in as dev@example.com
|
|
263
|
+
# Publishing my-store v1.0.0...
|
|
264
|
+
# 1. Registering theme... ✓
|
|
265
|
+
# 2. Building... ✓ (54 KB)
|
|
266
|
+
# 3. Getting upload URL... ✓
|
|
267
|
+
# 4. Uploading bundle... ✓
|
|
268
|
+
# 5. Uploading source... ✓
|
|
269
|
+
# 6. Scanning & publishing... ✓ Published!
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
| Option | Description |
|
|
273
|
+
| -------------------- | -------------------- |
|
|
274
|
+
| `-t, --theme <path>` | Theme directory path |
|
|
275
|
+
|
|
276
|
+
Security features:
|
|
277
|
+
|
|
278
|
+
- **Ownership check** — only theme owner can publish updates
|
|
279
|
+
- **Presigned URLs** — no AWS credentials needed
|
|
280
|
+
- **Security scan** — blocks eval(), XSS, crypto mining, data exfiltration
|
|
281
|
+
- **Audit logging** — every publish is logged with developer identity
|
|
282
|
+
|
|
283
|
+
### `onexthm config` (Legacy)
|
|
284
|
+
|
|
285
|
+
Interactive setup for S3 credentials. **Not needed for `onexthm publish`** — use `onexthm login` instead.
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
onexthm config
|
|
289
|
+
```
|
|
224
290
|
|
|
225
291
|
| Key | Description | Required |
|
|
226
292
|
| ------------------------ | --------------------- | -------- |
|