@ocpp-debugkit/scenarios 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/README.md +44 -0
  2. package/package.json +2 -2
package/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # @ocpp-debugkit/scenarios
2
+
3
+ > Predefined OCPP trace scenarios for testing the DebugKit analysis engine.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @ocpp-debugkit/scenarios
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```typescript
14
+ import { scenarios, getScenario } from '@ocpp-debugkit/scenarios';
15
+
16
+ // List all scenario names
17
+ scenarios.forEach(s => console.log(s.name, s.expectedFailures));
18
+
19
+ // Get a specific scenario
20
+ const scenario = getScenario('failed-auth');
21
+
22
+ // Run through the analysis engine
23
+ import { parseTrace, buildSessionTimeline, detectFailures } from '@ocpp-debugkit/core';
24
+
25
+ const result = parseTrace(JSON.stringify(scenario.trace));
26
+ const sessions = buildSessionTimeline(result.events);
27
+ const failures = detectFailures(result.events, sessions);
28
+ ```
29
+
30
+ ## Available Scenarios
31
+
32
+ | Name | Expected Failures |
33
+ |------|-------------------|
34
+ | `normal-session` | none |
35
+ | `failed-auth` | `FAILED_AUTHORIZATION` |
36
+ | `connector-fault` | `CONNECTOR_FAULT` |
37
+ | `station-offline` | `STATION_OFFLINE_DURING_SESSION` |
38
+ | `unexpected-stop-reason` | none (parser/timeline-only fixture) |
39
+
40
+ All scenario data is fully synthetic — no real station identifiers or personal data.
41
+
42
+ ## License
43
+
44
+ Apache 2.0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ocpp-debugkit/scenarios",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Predefined OCPP trace scenarios for testing the DebugKit analysis engine.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -37,7 +37,7 @@
37
37
  "url": "https://github.com/ocpp-debugkit/ocpp-debugkit/issues"
38
38
  },
39
39
  "dependencies": {
40
- "@ocpp-debugkit/core": "0.1.0"
40
+ "@ocpp-debugkit/core": "0.1.1"
41
41
  },
42
42
  "devDependencies": {
43
43
  "typescript": "^5.7.0",