@@ -86,6 +86,9 @@ oc preview http://localhost:3030/my-component
86
86
# Add registry (one-time setup)
87
87
oc registry add https://my-registry.com
88
88
89
+ # Validate component before publishing
90
+ oc validate my-component/
91
+
89
92
# Package and publish
90
93
oc publish my-component --username=myuser --password=mypass
91
94
@@ -113,6 +116,7 @@ oc mock plugin hash "test-value"
113
116
- ` oc init <name> ` - Create new component
114
117
- ` oc dev . <port> ` - Start development server
115
118
- ` oc preview <url> ` - Preview component
119
+ - ` oc validate <path> ` - Validate component against registry requirements
116
120
- ` oc publish <path> ` - Publish component
117
121
118
122
### Setup Commands (One-time)
@@ -133,6 +137,7 @@ oc mock plugin hash "test-value"
133
137
| ` init ` | Create component | ` oc init header ` |
134
138
| ` dev ` | Start dev server | ` oc dev . 3030 ` |
135
139
| ` preview ` | Test component | ` oc preview http://localhost:3030/header ` |
140
+ | ` validate ` | Validate component | ` oc validate header/ ` |
136
141
| ` publish ` | Deploy component | ` oc publish header/ ` |
137
142
| ` registry add ` | Add registry | ` oc registry add https://my-registry.com ` |
138
143
| ` clean ` | Remove node_modules | ` oc clean . --yes ` |
@@ -338,6 +343,44 @@ $ oc preview "http://localhost:3000/my-new-component/1.0.0/?param1=hello&name=Ar
338
343
339
344
---
340
345
346
+ ### validate
347
+
348
+ Validate a component against registry requirements without publishing
349
+
350
+ #### Usage:
351
+
352
+ ``` sh
353
+ $ oc validate < componentPath> [options]
354
+ ```
355
+
356
+ #### Parameters:
357
+
358
+ | Name | Description | Default |
359
+ | --------------- | ------------------------------------- | ------- |
360
+ | ` componentPath ` | The path of the component to validate | |
361
+
362
+ #### Options:
363
+
364
+ | Name | Description | Default |
365
+ | --------------- | ----------------------------------------------------------------- | ------- |
366
+ | ` --skipPackage ` | Skip packaging step and validate existing ` _package/package.json ` | false |
367
+ | ` --registries ` | Override registries from ` oc.json ` with custom list | |
368
+
369
+ #### Examples:
370
+
371
+ ``` sh
372
+ # Validate component against configured registries
373
+ $ oc validate my-component/
374
+
375
+ # Validate without packaging (uses existing _package/package.json)
376
+ $ oc validate my-component/ --skipPackage
377
+
378
+ # Validate against specific registries
379
+ $ oc validate my-component/ --registries http://registry1.com/ http://registry2.com/
380
+ ```
381
+
382
+ ---
383
+
341
384
### publish
342
385
343
386
Publish a component
0 commit comments