@onlineapps/cookbook-core 2.1.16 → 2.1.17

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 +27 -5
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -17,8 +17,9 @@ npm install @onlineapps/cookbook-core
17
17
  - **JSON Schema validation** - Strict schema enforcement
18
18
  - **Recursive step validation** - All step types supported
19
19
  - **Unique ID validation** - Ensures no duplicate step IDs
20
- - **Lightweight** - ~50KB with minimal dependencies
21
- - **Zero external dependencies** - Only uses `ajv` for validation
20
+ - **Lightweight** - minimal dependency surface
21
+ - **Two runtime dependencies** - `ajv` for schema validation and `ajv-formats`
22
+ for the format keywords the schema uses (`date-time`, `uri`, …)
22
23
 
23
24
  ## Usage
24
25
 
@@ -74,14 +75,35 @@ console.log(CookbookSchema.properties);
74
75
 
75
76
  ### Validator Functions
76
77
 
77
- - `validateCookbook(cookbook)` - Full cookbook validation
78
+ - `validateCookbook(cookbook, options)` - Full cookbook validation. `options`:
79
+ `version` (skip detection), `strict` (default `true`), `warnOnly`
78
80
  - `validateStep(step)` - Single step validation
81
+ - `detectVersion(cookbook)` - Detect cookbook format version
82
+
83
+ ### Reference Validation
84
+
85
+ - `validateAllReferences(cookbook)` - Run every reference check below
86
+ - `validateDependsOnReferences(cookbook)` - `depends_on` targets exist
87
+ - `validateVariableReferences(cookbook)` - Variable references resolve
88
+ - `validateErrorHandlerReferences(cookbook)` - Error-handler targets exist
79
89
 
80
90
  ### Schema Functions
81
91
 
82
92
  - `loadSchema()` - Load cookbook JSON schema
93
+ - `loadValidatorSchema()` - Load the schema used by the validator
83
94
  - `CookbookSchema` - Pre-loaded schema object
84
95
 
96
+ ### Helpers (V2.1)
97
+
98
+ - `CookbookHelpers` - Helper class bundling the functions below
99
+ - `findStep`, `hasStep`, `filterSteps`, `forEachStep`, `mapSteps`
100
+ - `getStepIds`, `getStepCount`, `getFirstStep`, `getNextStep`
101
+ - `isV21Format`, `isV20Format`, `convertV20ToV21`
102
+
103
+ ### Constants
104
+
105
+ - `VERSION` / `SCHEMA_VERSION` - both `'2.1.0'`
106
+
85
107
  ### Error Classes
86
108
 
87
109
  - `CookbookValidationError` - Validation error class
@@ -99,12 +121,12 @@ console.log(CookbookSchema.properties);
99
121
  ## Documentation
100
122
 
101
123
  - [**Schema Audit Report**](docs/SCHEMA_AUDIT.md) - Critical analysis of validation rules
102
- - [Test Coverage](test/parser.test.js) - Progressive test scenarios
124
+ - [Test Coverage](tests/) - `tests/unit`, `tests/component`, `tests/integration`
103
125
 
104
126
  ## Related Packages
105
127
 
106
128
  - `@onlineapps/cookbook-executor` - Workflow execution engine
107
- - `@onlineapps/cookbook-transformer` - OpenAPI mapping
129
+ <!-- cookbook-transformer removed in operations.json-first migration; see /api/docs/biz/30-operations/registration-wire.md -->
108
130
  - `@onlineapps/cookbook-router` - Message routing
109
131
  - `@onlineapps/connector-cookbook` - Full-featured wrapper for microservices
110
132
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onlineapps/cookbook-core",
3
- "version": "2.1.16",
3
+ "version": "2.1.17",
4
4
  "description": "Core cookbook parsing and validation - lightweight foundation for workflow definitions",
5
5
  "main": "src/index.js",
6
6
  "scripts": {