Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/core-package-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
'@ocpp-debugkit/core': minor
---

Finalize core package for npm publishing.

- Add `sideEffects: false` for tree-shaking
- Add `files` field to limit published content
- Add `keywords`, `repository`, `homepage`, `bugs` fields for npm discoverability
- Verify barrel export is complete (types, schemas, parser, normalizer, timeline, detection, summarizer, validator, fixtures)
16 changes: 12 additions & 4 deletions CURRENT_STATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,19 +69,27 @@ report exported. CLI and web inspector.
- ✅ `packages/core/src/types.ts` — updated with `Failure`, `Scenario`, `SessionSummary`, `ValidationResult` types
- ✅ 78 unit tests (46 normalizer + 32 parser)

### Core Package — Timeline + Detection + Summarizer + Validator (in progress — this PR)
### Core Package — Timeline + Detection + Summarizer + Validator (PR #34)

- ✅ `packages/core/src/timeline.ts` — `buildSessionTimeline()` correlating events by `transactionId` (ADR-0006)
- ✅ `packages/core/src/detection.ts` — `detectFailures()` with 3 rules: `FAILED_AUTHORIZATION`, `CONNECTOR_FAULT`, `STATION_OFFLINE_DURING_SESSION`
- ✅ `packages/core/src/summarizer.ts` — `summarizeSession()` / `summarizeSessions()` producing overview stats
- ✅ `packages/core/src/validator.ts` — `validateMessage()` / `validateMessages()` checking OCPP 1.6 JSON structural compliance
- ✅ 40 additional tests (10 timeline + 11 detection + 5 summarizer + 14 validator)

### Core Package — Public API Export + Package Config (in progress — this PR)

- ✅ Barrel export complete (types, schemas, parser, normalizer, timeline, detection, summarizer, validator, fixtures)
- ✅ `sideEffects: false` for tree-shaking
- ✅ `files` field limits published content to `dist/` + docs
- ✅ `keywords`, `repository`, `homepage`, `bugs` fields for npm discoverability
- ✅ Package is npm-publish-ready (`access: public`)

## What's Next

1. **Issue #20** → complete (PR #33): data model + parser + normalizer
2. **Issue #21** (this PR) → complete: timeline + detection + summarizer + validator
3. **Issue #22**: Core public API export + package config
2. **Issue #21** → complete (PR #34): timeline + detection + summarizer + validator
3. **Issue #22** (this PR) → complete: public API export + package config
4. **Issue #23**: Scenarios package (format + 5 initial scenarios)
5. **Issue #24**: Reporter package (Markdown report generator)
6. **Issue #25**: CLI package (scaffold + inspect + report + scenario commands)
Expand All @@ -94,7 +102,7 @@ report exported. CLI and web inspector.

| Package | Status | Version |
|---------|--------|---------|
| `@ocpp-debugkit/core` | in progress (parser + timeline + detection + summarizer + validator) | 0.0.0 |
| `@ocpp-debugkit/core` | in progress (package config finalized, ready for downstream) | 0.0.0 |
| `@ocpp-debugkit/scenarios` | not started | — |
| `@ocpp-debugkit/reporter` | not started | — |
| `@ocpp-debugkit/cli` | not started | — |
Expand Down
25 changes: 25 additions & 0 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Core data model, parser, normalizer, timeline, and failure detection for OCPP DebugKit.",
"license": "Apache-2.0",
"type": "module",
"sideEffects": false,
"main": "./dist/index.js",
"module": "./dist/index.js",
"types": "./dist/index.d.ts",
Expand All @@ -17,6 +18,30 @@
"import": "./dist/fixtures/index.js"
}
},
"files": [
"dist",
"README.md",
"NOTICE"
],
"keywords": [
"ocpp",
"ocpp1.6",
"ev-charging",
"charge-point",
"csms",
"debugging",
"trace-parser",
"failure-detection"
],
"repository": {
"type": "git",
"url": "https://github.com/ocpp-debugkit/ocpp-debugkit.git",
"directory": "packages/core"
},
"homepage": "https://github.com/ocpp-debugkit/ocpp-debugkit/tree/main/packages/core",
"bugs": {
"url": "https://github.com/ocpp-debugkit/ocpp-debugkit/issues"
},
"scripts": {
"build": "tsc -p tsconfig.json",
"typecheck": "tsc --noEmit",
Expand Down
Loading