myoperator-ui 0.0.47 → 0.0.48
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 +62 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -305,6 +305,68 @@ npx myoperator-ui update --all --dry-run
|
|
|
305
305
|
npx myoperator-ui update --all
|
|
306
306
|
```
|
|
307
307
|
|
|
308
|
+
## Development Workflow (For Maintainers)
|
|
309
|
+
|
|
310
|
+
### Safe Component Updates
|
|
311
|
+
|
|
312
|
+
To ensure changes don't accidentally break other components:
|
|
313
|
+
|
|
314
|
+
```bash
|
|
315
|
+
cd packages/cli
|
|
316
|
+
|
|
317
|
+
# 1. Create a snapshot BEFORE making changes
|
|
318
|
+
npm run integrity:snapshot
|
|
319
|
+
|
|
320
|
+
# 2. Make your changes to a component (e.g., button.tsx)
|
|
321
|
+
|
|
322
|
+
# 3. Verify only the intended component changed
|
|
323
|
+
node scripts/check-integrity.js verify button
|
|
324
|
+
|
|
325
|
+
# 4. If check passes, build and publish
|
|
326
|
+
npm run build
|
|
327
|
+
npm publish
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### Integrity Check Commands
|
|
331
|
+
|
|
332
|
+
```bash
|
|
333
|
+
# Create baseline snapshot of all components
|
|
334
|
+
npm run integrity:snapshot
|
|
335
|
+
|
|
336
|
+
# Verify no unexpected changes
|
|
337
|
+
npm run integrity:verify
|
|
338
|
+
|
|
339
|
+
# Verify specific component changed (others unchanged)
|
|
340
|
+
node scripts/check-integrity.js verify button
|
|
341
|
+
|
|
342
|
+
# Verify multiple components changed
|
|
343
|
+
node scripts/check-integrity.js verify button badge
|
|
344
|
+
|
|
345
|
+
# Check status of a specific component
|
|
346
|
+
node scripts/check-integrity.js diff button
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
### What the Integrity Check Does
|
|
350
|
+
|
|
351
|
+
1. **Creates MD5 hashes** of each component file
|
|
352
|
+
2. **Compares current state** against the snapshot
|
|
353
|
+
3. **Fails if unexpected changes** are detected
|
|
354
|
+
4. **Passes if only expected components** changed
|
|
355
|
+
|
|
356
|
+
Example output when an unexpected change is detected:
|
|
357
|
+
|
|
358
|
+
```
|
|
359
|
+
Component Status:
|
|
360
|
+
──────────────────────────────────────────────────
|
|
361
|
+
✓ badge - unchanged
|
|
362
|
+
✓ button - changed (expected)
|
|
363
|
+
⚠️ table - CHANGED (unexpected!)
|
|
364
|
+
✓ tag - unchanged
|
|
365
|
+
|
|
366
|
+
❌ INTEGRITY CHECK FAILED
|
|
367
|
+
Unexpected changes detected in: table
|
|
368
|
+
```
|
|
369
|
+
|
|
308
370
|
## License
|
|
309
371
|
|
|
310
372
|
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "myoperator-ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.48",
|
|
4
4
|
"description": "CLI for adding myOperator UI components to your project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./dist/index.js",
|
|
@@ -14,7 +14,10 @@
|
|
|
14
14
|
"generate-registry": "node scripts/generate-registry.js",
|
|
15
15
|
"validate-registry": "node scripts/validate-registry.js",
|
|
16
16
|
"verify-build": "node scripts/verify-build.js",
|
|
17
|
+
"integrity:snapshot": "node scripts/check-integrity.js snapshot",
|
|
18
|
+
"integrity:verify": "node scripts/check-integrity.js verify",
|
|
17
19
|
"build": "npm run generate-registry && tsup src/index.ts --format esm --dts && npm run verify-build",
|
|
20
|
+
"build:safe": "npm run integrity:snapshot && npm run build",
|
|
18
21
|
"dev": "tsup src/index.ts --format esm --watch",
|
|
19
22
|
"typecheck": "tsc --noEmit",
|
|
20
23
|
"test": "vitest run",
|