feat(cli): scaffold + inspect + report + scenario commands + package config#41
Merged
Conversation
…config - ocpp-debugkit inspect <file> — parse + analyze + output summary - ocpp-debugkit report <file> — generate Markdown report (stdout or --output) - ocpp-debugkit scenario list — list all 5 built-in scenarios - ocpp-debugkit scenario run <name> — run scenario through analysis engine, compare detected vs expected failures - Path safety: validated file paths, size limits - Input validation: safe parsing, non-sensitive error messages - 17 integration tests (execa-based) - Converted JSON fixtures to TS modules (fixes Node.js ESM JSON import issue) Closes #25
faefcef to
fb39fbf
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Creates the
@ocpp-debugkit/clipackage withinspect,report, andscenariocommands. Also converts JSON fixtures to TS modules to fix Node.js ESM JSON import compatibility.Closes #25
Changes
New package:
packages/cli/src/index.ts— CLI entry point (Commander)src/commands/inspect.ts—ocpp-debugkit inspect <file>src/commands/report.ts—ocpp-debugkit report <file> [--format markdown] [--output <file>]src/commands/scenario.ts—ocpp-debugkit scenario list+scenario run <name>src/utils.ts— file reading with path safety, size limitssrc/cli.test.ts— 17 integration tests (execa-based)package.json— publish-ready withbinfieldFixture format change
Converted all JSON fixtures to TypeScript modules to fix Node.js ESM JSON import compatibility (
ERR_IMPORT_ATTRIBUTE_MISSING):packages/core/src/__fixtures__/*.json→*.tspackages/scenarios/src/__scenarios__/*.json→*.tsNote on
scenario runRuns built-in static fixtures through the local analysis engine only. It is NOT active endpoint testing, WebSocket simulation, or live station/CSMS testing.
Verification
pnpm lint— ✅pnpm typecheck— ✅pnpm test— ✅ (196 tests)pnpm build— ✅pnpm format:check— ✅