@alteriom/mqtt-schema 0.3.1 → 0.3.2
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 +32 -1
- package/package.json +13 -3
package/README.md
CHANGED
@@ -226,7 +226,38 @@ Backward‑compatible additions: new optional properties or enums, documented in
|
|
226
226
|
|
227
227
|
Issues & PRs welcome. Ensure firmware repo schemas remain the authoritative source—do not manually edit generated `schema_data.ts`.
|
228
228
|
|
229
|
-
|
229
|
+
### Development Workflow
|
230
|
+
|
231
|
+
**Before opening a PR:** Run the comprehensive validation suite:
|
232
|
+
|
233
|
+
```bash
|
234
|
+
npm run verify # Schema sync + changelog + fixtures
|
235
|
+
npm run verify:all # Additional schema compilation + OTA manifest validation
|
236
|
+
npm test # Enhanced fixture validation with detailed reporting
|
237
|
+
```
|
238
|
+
|
239
|
+
**Available validation scripts:**
|
240
|
+
- `npm run test` - Cross-platform fixture validation (CJS/ESM) with enhanced error reporting
|
241
|
+
- `npm run test:ota` - OTA manifest fixture validation
|
242
|
+
- `npm run verify:schemas` - Ensure schemas are synced from source directory
|
243
|
+
- `npm run verify:release` - Check changelog contains current version
|
244
|
+
- `npm run verify:all` - Comprehensive schema compilation and fixture validation
|
245
|
+
|
246
|
+
### Script Organization
|
247
|
+
|
248
|
+
Scripts are organized by category in `package.json`:
|
249
|
+
- **Build Scripts**: `build`, `build:cjs`, `build:esm`, `clean`, etc.
|
250
|
+
- **Testing & Validation**: `test`, `verify:*`, etc.
|
251
|
+
- **Release Management**: `release:prepare`, `wiki:generate`
|
252
|
+
- **Repository Metadata**: `metadata:*` (organization compliance)
|
253
|
+
|
254
|
+
### Release Process
|
255
|
+
|
256
|
+
See `PUBLISH_CHECKLIST.md` for detailed release procedures. Quick summary:
|
257
|
+
1. Update schemas in `docs/mqtt_schema/`
|
258
|
+
2. Run `npm run verify` to ensure everything is valid
|
259
|
+
3. Use `npm run release:prepare -- patch|minor|major` for version bumping
|
260
|
+
4. Follow checklist for tagging and publishing
|
230
261
|
|
231
262
|
## Security
|
232
263
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@alteriom/mqtt-schema",
|
3
|
-
"version": "0.3.
|
3
|
+
"version": "0.3.2",
|
4
4
|
"description": "Alteriom MQTT v1 schemas, TypeScript types, and validation helpers for web integration",
|
5
5
|
"license": "MIT",
|
6
6
|
"author": "Alteriom Development Team",
|
@@ -87,25 +87,35 @@
|
|
87
87
|
"node": ">=16.0.0"
|
88
88
|
},
|
89
89
|
"scripts": {
|
90
|
+
"// Build Scripts": "====================",
|
90
91
|
"prebuild": "npm run clean && node scripts/copy-schemas.cjs",
|
91
92
|
"build:cjs": "tsc -p tsconfig.json",
|
92
93
|
"build:esm": "tsc -p tsconfig.esm.json && node scripts/post-esm.cjs",
|
93
94
|
"build": "npm run build:cjs && npm run build:esm && node scripts/copy-schemas.cjs",
|
94
95
|
"clean": "rimraf dist schemas",
|
95
96
|
"prepare": "npm run build",
|
96
|
-
|
97
|
+
|
98
|
+
"// Testing & Validation": "====================",
|
99
|
+
"lint": "echo 'No linter configured - consider adding ESLint for future releases'",
|
97
100
|
"test": "node test/validate-fixtures.cjs",
|
101
|
+
"test:ota": "node scripts/validate-ota-manifest.js",
|
98
102
|
"verify:schemas": "node scripts/check-schema-sync.cjs",
|
99
103
|
"verify:release": "node scripts/check-release-integrity.cjs",
|
100
104
|
"verify": "npm run verify:schemas && npm run verify:release && npm test",
|
101
105
|
"verify:all": "node scripts/verify_all.cjs",
|
106
|
+
|
107
|
+
"// Release Management": "====================",
|
102
108
|
"release:prepare": "node scripts/release-prepare.cjs",
|
103
109
|
"wiki:generate": "node scripts/generate-wiki.cjs",
|
110
|
+
|
111
|
+
"// Repository Metadata": "====================",
|
104
112
|
"metadata:report": "alteriom-metadata report --org-tag alteriom || echo 'metadata report failed'",
|
105
113
|
"metadata:validate": "alteriom-metadata validate --org-tag alteriom || echo 'metadata validate failed'",
|
106
114
|
"metadata:apply": "alteriom-metadata apply --org-tag alteriom",
|
107
115
|
"metadata:apply:dry": "alteriom-metadata dry-run --org-tag alteriom",
|
108
|
-
|
116
|
+
|
117
|
+
"// Legacy Aliases": "====================",
|
118
|
+
"validate:ota": "npm run test:ota"
|
109
119
|
},
|
110
120
|
"keywords": [
|
111
121
|
"alteriom",
|