@orbytautomation/engine 0.2.4 → 0.3.0
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 +1 -1
- package/dist/errors/ErrorCodes.d.ts +205 -6
- package/dist/errors/ErrorCodes.d.ts.map +1 -1
- package/dist/errors/ErrorCodes.js +398 -5
- package/dist/errors/ErrorCodes.js.map +1 -1
- package/dist/errors/ErrorDebugger.d.ts +98 -0
- package/dist/errors/ErrorDebugger.d.ts.map +1 -0
- package/dist/errors/ErrorDebugger.js +283 -0
- package/dist/errors/ErrorDebugger.js.map +1 -0
- package/dist/errors/ErrorDetector.d.ts +148 -0
- package/dist/errors/ErrorDetector.d.ts.map +1 -0
- package/dist/errors/ErrorDetector.js +358 -0
- package/dist/errors/ErrorDetector.js.map +1 -0
- package/dist/errors/ErrorFormatter.d.ts +92 -3
- package/dist/errors/ErrorFormatter.d.ts.map +1 -1
- package/dist/errors/ErrorFormatter.js +220 -4
- package/dist/errors/ErrorFormatter.js.map +1 -1
- package/dist/errors/ErrorHandler.d.ts +259 -0
- package/dist/errors/ErrorHandler.d.ts.map +1 -0
- package/dist/errors/ErrorHandler.js +378 -0
- package/dist/errors/ErrorHandler.js.map +1 -0
- package/dist/errors/FieldRegistry.d.ts +39 -0
- package/dist/errors/FieldRegistry.d.ts.map +1 -1
- package/dist/errors/FieldRegistry.js +172 -74
- package/dist/errors/FieldRegistry.js.map +1 -1
- package/dist/errors/OrbytError.d.ts +85 -3
- package/dist/errors/OrbytError.d.ts.map +1 -1
- package/dist/errors/OrbytError.js +151 -4
- package/dist/errors/OrbytError.js.map +1 -1
- package/dist/errors/SchedulerError.d.ts +93 -1
- package/dist/errors/SchedulerError.d.ts.map +1 -1
- package/dist/errors/SchedulerError.js +145 -1
- package/dist/errors/SchedulerError.js.map +1 -1
- package/dist/errors/SecurityErrors.d.ts +94 -12
- package/dist/errors/SecurityErrors.d.ts.map +1 -1
- package/dist/errors/SecurityErrors.js +162 -18
- package/dist/errors/SecurityErrors.js.map +1 -1
- package/dist/errors/StepError.d.ts +111 -1
- package/dist/errors/StepError.d.ts.map +1 -1
- package/dist/errors/StepError.js +182 -1
- package/dist/errors/StepError.js.map +1 -1
- package/dist/errors/WorkflowError.d.ts +139 -2
- package/dist/errors/WorkflowError.d.ts.map +1 -1
- package/dist/errors/WorkflowError.js +264 -22
- package/dist/errors/WorkflowError.js.map +1 -1
- package/dist/errors/index.d.ts +5 -1
- package/dist/errors/index.d.ts.map +1 -1
- package/dist/errors/index.js +7 -4
- package/dist/errors/index.js.map +1 -1
- package/dist/loader/WorkflowLoader.d.ts +83 -21
- package/dist/loader/WorkflowLoader.d.ts.map +1 -1
- package/dist/loader/WorkflowLoader.js +169 -55
- package/dist/loader/WorkflowLoader.js.map +1 -1
- package/dist/parser/SchemaValidator.d.ts.map +1 -1
- package/dist/parser/SchemaValidator.js +2 -1
- package/dist/parser/SchemaValidator.js.map +1 -1
- package/package.json +1 -1
|
@@ -2,53 +2,190 @@
|
|
|
2
2
|
* Workflow Schema and Validation Errors
|
|
3
3
|
*
|
|
4
4
|
* Specific error types for workflow parsing and validation.
|
|
5
|
-
* Includes
|
|
5
|
+
* Includes factory methods for creating diagnostic-rich errors with:
|
|
6
|
+
* - Clear, actionable error messages
|
|
7
|
+
* - Fix suggestions (hints)
|
|
8
|
+
* - Exit codes from ecosystem-core
|
|
9
|
+
* - Field locations and context
|
|
10
|
+
*
|
|
11
|
+
* USAGE:
|
|
12
|
+
* =====
|
|
13
|
+
* Instead of creating generic errors, use factory methods:
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // ❌ Bad: Generic error
|
|
17
|
+
* throw new Error('Unknown field: foo');
|
|
18
|
+
*
|
|
19
|
+
* // ✅ Good: Structured error with diagnostics
|
|
20
|
+
* throw SchemaError.unknownField('foo', 'workflow.steps[0]', 'name');
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ADDING NEW ERRORS:
|
|
24
|
+
* ==================
|
|
25
|
+
* 1. Add error code to OrbytErrorCode enum in ErrorCodes.ts
|
|
26
|
+
* 2. Add description in getErrorDescription()
|
|
27
|
+
* 3. Add factory method here
|
|
28
|
+
* 4. Use the factory method throughout engine
|
|
6
29
|
*
|
|
7
30
|
* @module errors
|
|
8
31
|
*/
|
|
9
32
|
import { OrbytError, type OrbytErrorDiagnostic } from './OrbytError.js';
|
|
10
33
|
/**
|
|
11
34
|
* Schema validation error (structure problems)
|
|
35
|
+
*
|
|
36
|
+
* Used for:
|
|
37
|
+
* - Unknown/misspelled fields
|
|
38
|
+
* - Invalid field types
|
|
39
|
+
* - Missing required fields
|
|
40
|
+
* - Invalid enum values
|
|
41
|
+
* - YAML/JSON syntax errors
|
|
12
42
|
*/
|
|
13
43
|
export declare class SchemaError extends OrbytError {
|
|
14
44
|
constructor(diagnostic: OrbytErrorDiagnostic);
|
|
15
45
|
/**
|
|
16
46
|
* Create unknown field error with suggestion
|
|
47
|
+
*
|
|
48
|
+
* @param field - The unknown field name
|
|
49
|
+
* @param path - Path where field was found (e.g., "workflow.steps[0]")
|
|
50
|
+
* @param suggestion - Suggested correct field name
|
|
51
|
+
* @returns SchemaError with typo detection hint
|
|
17
52
|
*/
|
|
18
53
|
static unknownField(field: string, path: string, suggestion?: string): SchemaError;
|
|
19
54
|
/**
|
|
20
55
|
* Create invalid type error
|
|
56
|
+
*
|
|
57
|
+
* @param field - Field name with wrong type
|
|
58
|
+
* @param expected - Expected type (e.g., "string", "number", "array")
|
|
59
|
+
* @param received - Actual type received
|
|
60
|
+
* @param path - Path to the field
|
|
61
|
+
* @returns SchemaError with type mismatch details
|
|
21
62
|
*/
|
|
22
63
|
static invalidType(field: string, expected: string, received: string, path: string): SchemaError;
|
|
23
64
|
/**
|
|
24
65
|
* Create missing required field error
|
|
66
|
+
*
|
|
67
|
+
* @param field - Name of missing required field
|
|
68
|
+
* @param path - Path where field should be
|
|
69
|
+
* @returns SchemaError for missing field
|
|
25
70
|
*/
|
|
26
71
|
static missingField(field: string, path: string): SchemaError;
|
|
27
72
|
/**
|
|
28
73
|
* Create invalid enum value error
|
|
74
|
+
*
|
|
75
|
+
* @param field - Field name with invalid value
|
|
76
|
+
* @param value - Invalid value provided
|
|
77
|
+
* @param validValues - List of valid values
|
|
78
|
+
* @param path - Path to the field
|
|
79
|
+
* @returns SchemaError with valid options
|
|
29
80
|
*/
|
|
30
81
|
static invalidEnum(field: string, value: string, validValues: string[], path: string): SchemaError;
|
|
82
|
+
/**
|
|
83
|
+
* Create YAML/JSON parsing error
|
|
84
|
+
*
|
|
85
|
+
* @param filePath - Path to workflow file with syntax error
|
|
86
|
+
* @param line - Line number where error occurred (optional)
|
|
87
|
+
* @param column - Column number where error occurred (optional)
|
|
88
|
+
* @param details - Additional parsing error details (optional)
|
|
89
|
+
* @returns SchemaError with parse location
|
|
90
|
+
*/
|
|
91
|
+
static parseError(filePath: string, line?: number, column?: number, details?: string): SchemaError;
|
|
92
|
+
/**
|
|
93
|
+
* Create reserved field error
|
|
94
|
+
*
|
|
95
|
+
* @param field - Reserved field name that was used
|
|
96
|
+
* @param path - Path where field was found
|
|
97
|
+
* @returns SchemaError for reserved field usage
|
|
98
|
+
*/
|
|
99
|
+
static reservedField(field: string, path: string): SchemaError;
|
|
100
|
+
/**
|
|
101
|
+
* Create invalid adapter error
|
|
102
|
+
*
|
|
103
|
+
* @param adapter - Unknown adapter name
|
|
104
|
+
* @param path - Path to step using unknown adapter
|
|
105
|
+
* @param validAdapters - List of valid adapter names (optional)
|
|
106
|
+
* @returns SchemaError for unknown adapter
|
|
107
|
+
*/
|
|
108
|
+
static invalidAdapter(adapter: string, path: string, validAdapters?: string[]): SchemaError;
|
|
31
109
|
}
|
|
32
110
|
/**
|
|
33
111
|
* Semantic validation error (logic problems)
|
|
112
|
+
*
|
|
113
|
+
* Used for:
|
|
114
|
+
* - Duplicate step IDs
|
|
115
|
+
* - Unknown step references
|
|
116
|
+
* - Circular dependencies
|
|
117
|
+
* - Forward references
|
|
118
|
+
* - Invalid variable references
|
|
34
119
|
*/
|
|
35
120
|
export declare class ValidationError extends OrbytError {
|
|
36
121
|
constructor(diagnostic: OrbytErrorDiagnostic);
|
|
37
122
|
/**
|
|
38
123
|
* Create duplicate ID error
|
|
124
|
+
*
|
|
125
|
+
* @param stepId - The duplicated step ID
|
|
126
|
+
* @param path - Path to where duplicate was found
|
|
127
|
+
* @param firstOccurrence - Path to first occurrence (optional)
|
|
128
|
+
* @returns ValidationError for duplicate ID
|
|
39
129
|
*/
|
|
40
|
-
static duplicateId(stepId: string, path: string): ValidationError;
|
|
130
|
+
static duplicateId(stepId: string, path: string, firstOccurrence?: string): ValidationError;
|
|
41
131
|
/**
|
|
42
132
|
* Create unknown step reference error
|
|
133
|
+
*
|
|
134
|
+
* @param stepId - The referenced step ID that doesn't exist
|
|
135
|
+
* @param path - Path where the reference was made
|
|
136
|
+
* @param availableSteps - List of valid step IDs
|
|
137
|
+
* @returns ValidationError for unknown reference
|
|
43
138
|
*/
|
|
44
139
|
static unknownStep(stepId: string, path: string, availableSteps?: string[]): ValidationError;
|
|
45
140
|
/**
|
|
46
141
|
* Create circular dependency error
|
|
142
|
+
*
|
|
143
|
+
* @param cycle - Array of step IDs forming the cycle
|
|
144
|
+
* @param path - Path where cycle was detected
|
|
145
|
+
* @returns ValidationError for circular dependency
|
|
47
146
|
*/
|
|
48
147
|
static circularDependency(cycle: string[], path: string): ValidationError;
|
|
49
148
|
/**
|
|
50
149
|
* Create forward reference error
|
|
150
|
+
*
|
|
151
|
+
* @param stepId - Step making the forward reference
|
|
152
|
+
* @param referencedStep - Step being referenced that executes later
|
|
153
|
+
* @param path - Path where reference was made
|
|
154
|
+
* @returns ValidationError for forward reference
|
|
51
155
|
*/
|
|
52
156
|
static forwardReference(stepId: string, referencedStep: string, path: string): ValidationError;
|
|
157
|
+
/**
|
|
158
|
+
* Create empty workflow error
|
|
159
|
+
*
|
|
160
|
+
* @param path - Path to workflow file
|
|
161
|
+
* @returns ValidationError for workflow with no steps
|
|
162
|
+
*/
|
|
163
|
+
static emptyWorkflow(path: string): ValidationError;
|
|
164
|
+
/**
|
|
165
|
+
* Create missing input error
|
|
166
|
+
*
|
|
167
|
+
* @param inputName - Required input that is missing
|
|
168
|
+
* @param path - Path to step requiring the input
|
|
169
|
+
* @returns ValidationError for missing required input
|
|
170
|
+
*/
|
|
171
|
+
static missingInput(inputName: string, path: string): ValidationError;
|
|
172
|
+
/**
|
|
173
|
+
* Create invalid condition error
|
|
174
|
+
*
|
|
175
|
+
* @param condition - The invalid condition expression
|
|
176
|
+
* @param path - Path to step with invalid condition
|
|
177
|
+
* @param reason - Why the condition is invalid (optional)
|
|
178
|
+
* @returns ValidationError for invalid condition
|
|
179
|
+
*/
|
|
180
|
+
static invalidCondition(condition: string, path: string, reason?: string): ValidationError;
|
|
181
|
+
/**
|
|
182
|
+
* Create invalid variable reference error
|
|
183
|
+
*
|
|
184
|
+
* @param variable - The invalid variable name/reference
|
|
185
|
+
* @param path - Path where variable is referenced
|
|
186
|
+
* @param availableVars - List of available variable names (optional)
|
|
187
|
+
* @returns ValidationError for invalid variable
|
|
188
|
+
*/
|
|
189
|
+
static invalidVariable(variable: string, path: string, availableVars?: string[]): ValidationError;
|
|
53
190
|
}
|
|
54
191
|
//# sourceMappingURL=WorkflowError.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowError.d.ts","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"WorkflowError.d.ts","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAGH,OAAO,EAAE,UAAU,EAAE,KAAK,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAGxE;;;;;;;;;GASG;AACH,qBAAa,WAAY,SAAQ,UAAU;gBAC7B,UAAU,EAAE,o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,EACd,IAAI,EAAE,MAAM,EACZ,cAAc,CAAC,EAAE,MAAM,EAAE,GACxB,eAAe;IAgBlB;;;;;;OAMG;IACH,MAAM,CAAC,kBAAkB,CACvB,KAAK,EAAE,MAAM,EAAE,EACf,IAAI,EAAE,MAAM,GACX,eAAe;IAYlB;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,GACX,eAAe;IAYlB;;;;;OAKG;IACH,MAAM,CAAC,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,eAAe;IAYnD;;;;;;OAMG;IACH,MAAM,CAAC,YAAY,CACjB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,GACX,eAAe;IAYlB;;;;;;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,MAAM,CAAC,EAAE,MAAM,GACd,eAAe;IAYlB;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CACpB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,aAAa,CAAC,EAAE,MAAM,EAAE,GACvB,eAAe;CAenB"}
|
|
@@ -2,127 +2,369 @@
|
|
|
2
2
|
* Workflow Schema and Validation Errors
|
|
3
3
|
*
|
|
4
4
|
* Specific error types for workflow parsing and validation.
|
|
5
|
-
* Includes
|
|
5
|
+
* Includes factory methods for creating diagnostic-rich errors with:
|
|
6
|
+
* - Clear, actionable error messages
|
|
7
|
+
* - Fix suggestions (hints)
|
|
8
|
+
* - Exit codes from ecosystem-core
|
|
9
|
+
* - Field locations and context
|
|
10
|
+
*
|
|
11
|
+
* USAGE:
|
|
12
|
+
* =====
|
|
13
|
+
* Instead of creating generic errors, use factory methods:
|
|
14
|
+
*
|
|
15
|
+
* ```typescript
|
|
16
|
+
* // ❌ Bad: Generic error
|
|
17
|
+
* throw new Error('Unknown field: foo');
|
|
18
|
+
*
|
|
19
|
+
* // ✅ Good: Structured error with diagnostics
|
|
20
|
+
* throw SchemaError.unknownField('foo', 'workflow.steps[0]', 'name');
|
|
21
|
+
* ```
|
|
22
|
+
*
|
|
23
|
+
* ADDING NEW ERRORS:
|
|
24
|
+
* ==================
|
|
25
|
+
* 1. Add error code to OrbytErrorCode enum in ErrorCodes.ts
|
|
26
|
+
* 2. Add description in getErrorDescription()
|
|
27
|
+
* 3. Add factory method here
|
|
28
|
+
* 4. Use the factory method throughout engine
|
|
6
29
|
*
|
|
7
30
|
* @module errors
|
|
8
31
|
*/
|
|
32
|
+
import { ExitCodes } from '@dev-ecosystem/core';
|
|
9
33
|
import { OrbytError } from './OrbytError.js';
|
|
10
34
|
import { OrbytErrorCode, ErrorSeverity } from './ErrorCodes.js';
|
|
11
35
|
/**
|
|
12
36
|
* Schema validation error (structure problems)
|
|
37
|
+
*
|
|
38
|
+
* Used for:
|
|
39
|
+
* - Unknown/misspelled fields
|
|
40
|
+
* - Invalid field types
|
|
41
|
+
* - Missing required fields
|
|
42
|
+
* - Invalid enum values
|
|
43
|
+
* - YAML/JSON syntax errors
|
|
13
44
|
*/
|
|
14
45
|
export class SchemaError extends OrbytError {
|
|
15
46
|
constructor(diagnostic) {
|
|
16
|
-
super({
|
|
47
|
+
super({
|
|
48
|
+
...diagnostic,
|
|
49
|
+
severity: ErrorSeverity.ERROR,
|
|
50
|
+
exitCode: diagnostic.exitCode || ExitCodes.INVALID_SCHEMA,
|
|
51
|
+
});
|
|
17
52
|
}
|
|
18
53
|
/**
|
|
19
54
|
* Create unknown field error with suggestion
|
|
55
|
+
*
|
|
56
|
+
* @param field - The unknown field name
|
|
57
|
+
* @param path - Path where field was found (e.g., "workflow.steps[0]")
|
|
58
|
+
* @param suggestion - Suggested correct field name
|
|
59
|
+
* @returns SchemaError with typo detection hint
|
|
20
60
|
*/
|
|
21
61
|
static unknownField(field, path, suggestion) {
|
|
22
62
|
const hint = suggestion
|
|
23
|
-
? `Did you mean "${suggestion}"
|
|
24
|
-
: 'Check the workflow schema documentation.';
|
|
63
|
+
? `Did you mean "${suggestion}"? Check for typos in field names.`
|
|
64
|
+
: 'Check the Orbyt workflow schema documentation for valid fields.';
|
|
25
65
|
return new SchemaError({
|
|
26
66
|
code: OrbytErrorCode.SCHEMA_UNKNOWN_FIELD,
|
|
27
|
-
message: `Unknown field "${field}"`,
|
|
67
|
+
message: `Unknown field "${field}" in workflow definition`,
|
|
68
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
28
69
|
path,
|
|
29
70
|
hint,
|
|
30
71
|
severity: ErrorSeverity.ERROR,
|
|
72
|
+
context: { field, suggestion },
|
|
31
73
|
});
|
|
32
74
|
}
|
|
33
75
|
/**
|
|
34
76
|
* Create invalid type error
|
|
77
|
+
*
|
|
78
|
+
* @param field - Field name with wrong type
|
|
79
|
+
* @param expected - Expected type (e.g., "string", "number", "array")
|
|
80
|
+
* @param received - Actual type received
|
|
81
|
+
* @param path - Path to the field
|
|
82
|
+
* @returns SchemaError with type mismatch details
|
|
35
83
|
*/
|
|
36
84
|
static invalidType(field, expected, received, path) {
|
|
37
85
|
return new SchemaError({
|
|
38
86
|
code: OrbytErrorCode.SCHEMA_INVALID_TYPE,
|
|
39
|
-
message: `Field "${field}"
|
|
87
|
+
message: `Field "${field}" has incorrect type: expected ${expected}, received ${received}`,
|
|
88
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
40
89
|
path,
|
|
41
|
-
hint: `
|
|
90
|
+
hint: `Change the value of "${field}" to match the expected type: ${expected}`,
|
|
42
91
|
severity: ErrorSeverity.ERROR,
|
|
92
|
+
context: { field, expected, received },
|
|
43
93
|
});
|
|
44
94
|
}
|
|
45
95
|
/**
|
|
46
96
|
* Create missing required field error
|
|
97
|
+
*
|
|
98
|
+
* @param field - Name of missing required field
|
|
99
|
+
* @param path - Path where field should be
|
|
100
|
+
* @returns SchemaError for missing field
|
|
47
101
|
*/
|
|
48
102
|
static missingField(field, path) {
|
|
49
103
|
return new SchemaError({
|
|
50
104
|
code: OrbytErrorCode.SCHEMA_MISSING_FIELD,
|
|
51
|
-
message: `Missing required field "${field}"`,
|
|
105
|
+
message: `Missing required field "${field}" in workflow definition`,
|
|
106
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
52
107
|
path,
|
|
53
|
-
hint: `Add the "${field}"
|
|
108
|
+
hint: `Add the required field "${field}" to your workflow at ${path}`,
|
|
54
109
|
severity: ErrorSeverity.ERROR,
|
|
110
|
+
context: { field, path },
|
|
55
111
|
});
|
|
56
112
|
}
|
|
57
113
|
/**
|
|
58
114
|
* Create invalid enum value error
|
|
115
|
+
*
|
|
116
|
+
* @param field - Field name with invalid value
|
|
117
|
+
* @param value - Invalid value provided
|
|
118
|
+
* @param validValues - List of valid values
|
|
119
|
+
* @param path - Path to the field
|
|
120
|
+
* @returns SchemaError with valid options
|
|
59
121
|
*/
|
|
60
122
|
static invalidEnum(field, value, validValues, path) {
|
|
61
123
|
return new SchemaError({
|
|
62
124
|
code: OrbytErrorCode.SCHEMA_INVALID_ENUM,
|
|
63
|
-
message: `Invalid value "${value}" for field "${field}"`,
|
|
125
|
+
message: `Invalid value "${value}" for field "${field}". Must be one of: ${validValues.join(', ')}`,
|
|
126
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
64
127
|
path,
|
|
65
|
-
hint: `
|
|
128
|
+
hint: `Change "${field}" to one of the valid values: ${validValues.join(', ')}`,
|
|
129
|
+
severity: ErrorSeverity.ERROR,
|
|
130
|
+
context: { field, value, validValues },
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Create YAML/JSON parsing error
|
|
135
|
+
*
|
|
136
|
+
* @param filePath - Path to workflow file with syntax error
|
|
137
|
+
* @param line - Line number where error occurred (optional)
|
|
138
|
+
* @param column - Column number where error occurred (optional)
|
|
139
|
+
* @param details - Additional parsing error details (optional)
|
|
140
|
+
* @returns SchemaError with parse location
|
|
141
|
+
*/
|
|
142
|
+
static parseError(filePath, line, column, details) {
|
|
143
|
+
const location = line ? ` at line ${line}${column ? `, column ${column}` : ''}` : '';
|
|
144
|
+
return new SchemaError({
|
|
145
|
+
code: OrbytErrorCode.SCHEMA_PARSE_ERROR,
|
|
146
|
+
message: `Failed to parse workflow file${location}`,
|
|
147
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
148
|
+
path: filePath,
|
|
149
|
+
hint: details || 'Check YAML/JSON syntax - ensure proper indentation, quotes, and structure',
|
|
66
150
|
severity: ErrorSeverity.ERROR,
|
|
151
|
+
context: { filePath, line, column, details },
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Create reserved field error
|
|
156
|
+
*
|
|
157
|
+
* @param field - Reserved field name that was used
|
|
158
|
+
* @param path - Path where field was found
|
|
159
|
+
* @returns SchemaError for reserved field usage
|
|
160
|
+
*/
|
|
161
|
+
static reservedField(field, path) {
|
|
162
|
+
return new SchemaError({
|
|
163
|
+
code: OrbytErrorCode.SCHEMA_RESERVED_FIELD,
|
|
164
|
+
message: `Reserved field "${field}" cannot be used in workflow definition`,
|
|
165
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
166
|
+
path,
|
|
167
|
+
hint: `Field "${field}" is reserved by Orbyt engine. Use a different field name`,
|
|
168
|
+
severity: ErrorSeverity.ERROR,
|
|
169
|
+
context: { field },
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Create invalid adapter error
|
|
174
|
+
*
|
|
175
|
+
* @param adapter - Unknown adapter name
|
|
176
|
+
* @param path - Path to step using unknown adapter
|
|
177
|
+
* @param validAdapters - List of valid adapter names (optional)
|
|
178
|
+
* @returns SchemaError for unknown adapter
|
|
179
|
+
*/
|
|
180
|
+
static invalidAdapter(adapter, path, validAdapters) {
|
|
181
|
+
const hint = validAdapters
|
|
182
|
+
? `Use one of the supported adapters: ${validAdapters.join(', ')}`
|
|
183
|
+
: `Adapter "${adapter}" is not registered. Check spelling or register the adapter`;
|
|
184
|
+
return new SchemaError({
|
|
185
|
+
code: OrbytErrorCode.SCHEMA_UNKNOWN_FIELD,
|
|
186
|
+
message: `Unknown adapter "${adapter}"`,
|
|
187
|
+
exitCode: ExitCodes.INVALID_SCHEMA,
|
|
188
|
+
path,
|
|
189
|
+
hint,
|
|
190
|
+
severity: ErrorSeverity.ERROR,
|
|
191
|
+
context: { adapter, validAdapters },
|
|
67
192
|
});
|
|
68
193
|
}
|
|
69
194
|
}
|
|
70
195
|
/**
|
|
71
196
|
* Semantic validation error (logic problems)
|
|
197
|
+
*
|
|
198
|
+
* Used for:
|
|
199
|
+
* - Duplicate step IDs
|
|
200
|
+
* - Unknown step references
|
|
201
|
+
* - Circular dependencies
|
|
202
|
+
* - Forward references
|
|
203
|
+
* - Invalid variable references
|
|
72
204
|
*/
|
|
73
205
|
export class ValidationError extends OrbytError {
|
|
74
206
|
constructor(diagnostic) {
|
|
75
|
-
super({
|
|
207
|
+
super({
|
|
208
|
+
...diagnostic,
|
|
209
|
+
severity: ErrorSeverity.ERROR,
|
|
210
|
+
exitCode: diagnostic.exitCode || ExitCodes.VALIDATION_FAILED,
|
|
211
|
+
});
|
|
76
212
|
}
|
|
77
213
|
/**
|
|
78
214
|
* Create duplicate ID error
|
|
215
|
+
*
|
|
216
|
+
* @param stepId - The duplicated step ID
|
|
217
|
+
* @param path - Path to where duplicate was found
|
|
218
|
+
* @param firstOccurrence - Path to first occurrence (optional)
|
|
219
|
+
* @returns ValidationError for duplicate ID
|
|
79
220
|
*/
|
|
80
|
-
static duplicateId(stepId, path) {
|
|
221
|
+
static duplicateId(stepId, path, firstOccurrence) {
|
|
222
|
+
const hint = firstOccurrence
|
|
223
|
+
? `Step ID "${stepId}" was first used at ${firstOccurrence}. Each step must have a unique ID.`
|
|
224
|
+
: `Rename one of the steps with ID "${stepId}" to make it unique.`;
|
|
81
225
|
return new ValidationError({
|
|
82
226
|
code: OrbytErrorCode.VALIDATION_DUPLICATE_ID,
|
|
83
|
-
message: `Duplicate step ID "${stepId}"`,
|
|
227
|
+
message: `Duplicate step ID "${stepId}" found in workflow`,
|
|
228
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
84
229
|
path,
|
|
85
|
-
hint
|
|
230
|
+
hint,
|
|
86
231
|
severity: ErrorSeverity.ERROR,
|
|
232
|
+
context: { stepId, firstOccurrence },
|
|
87
233
|
});
|
|
88
234
|
}
|
|
89
235
|
/**
|
|
90
236
|
* Create unknown step reference error
|
|
237
|
+
*
|
|
238
|
+
* @param stepId - The referenced step ID that doesn't exist
|
|
239
|
+
* @param path - Path where the reference was made
|
|
240
|
+
* @param availableSteps - List of valid step IDs
|
|
241
|
+
* @returns ValidationError for unknown reference
|
|
91
242
|
*/
|
|
92
243
|
static unknownStep(stepId, path, availableSteps) {
|
|
93
244
|
const hint = availableSteps && availableSteps.length > 0
|
|
94
|
-
? `Available
|
|
95
|
-
:
|
|
245
|
+
? `Available step IDs: ${availableSteps.join(', ')}. Check for typos in the step ID.`
|
|
246
|
+
: `Step "${stepId}" does not exist in this workflow. Check the step ID spelling.`;
|
|
96
247
|
return new ValidationError({
|
|
97
248
|
code: OrbytErrorCode.VALIDATION_UNKNOWN_STEP,
|
|
98
|
-
message: `
|
|
249
|
+
message: `Step "${stepId}" referenced but not defined in workflow`,
|
|
250
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
99
251
|
path,
|
|
100
252
|
hint,
|
|
101
253
|
severity: ErrorSeverity.ERROR,
|
|
254
|
+
context: { stepId, availableSteps },
|
|
102
255
|
});
|
|
103
256
|
}
|
|
104
257
|
/**
|
|
105
258
|
* Create circular dependency error
|
|
259
|
+
*
|
|
260
|
+
* @param cycle - Array of step IDs forming the cycle
|
|
261
|
+
* @param path - Path where cycle was detected
|
|
262
|
+
* @returns ValidationError for circular dependency
|
|
106
263
|
*/
|
|
107
264
|
static circularDependency(cycle, path) {
|
|
108
265
|
return new ValidationError({
|
|
109
266
|
code: OrbytErrorCode.VALIDATION_CIRCULAR_DEPENDENCY,
|
|
110
|
-
message: `Circular dependency detected: ${cycle.join(' → ')}`,
|
|
267
|
+
message: `Circular dependency detected: ${cycle.join(' → ')} → ${cycle[0]}`,
|
|
268
|
+
exitCode: ExitCodes.CIRCULAR_DEPENDENCY,
|
|
111
269
|
path,
|
|
112
|
-
hint: 'Remove
|
|
270
|
+
hint: 'Remove one of the dependencies to break the cycle',
|
|
113
271
|
severity: ErrorSeverity.ERROR,
|
|
272
|
+
context: { cycle },
|
|
114
273
|
});
|
|
115
274
|
}
|
|
116
275
|
/**
|
|
117
276
|
* Create forward reference error
|
|
277
|
+
*
|
|
278
|
+
* @param stepId - Step making the forward reference
|
|
279
|
+
* @param referencedStep - Step being referenced that executes later
|
|
280
|
+
* @param path - Path where reference was made
|
|
281
|
+
* @returns ValidationError for forward reference
|
|
118
282
|
*/
|
|
119
283
|
static forwardReference(stepId, referencedStep, path) {
|
|
120
284
|
return new ValidationError({
|
|
121
285
|
code: OrbytErrorCode.VALIDATION_FORWARD_REFERENCE,
|
|
122
|
-
message: `Step "${stepId}" references "${referencedStep}" which
|
|
286
|
+
message: `Step "${stepId}" references "${referencedStep}" which executes later`,
|
|
287
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
288
|
+
path,
|
|
289
|
+
hint: 'Steps can only reference steps that execute before them',
|
|
290
|
+
severity: ErrorSeverity.ERROR,
|
|
291
|
+
context: { stepId, referencedStep },
|
|
292
|
+
});
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* Create empty workflow error
|
|
296
|
+
*
|
|
297
|
+
* @param path - Path to workflow file
|
|
298
|
+
* @returns ValidationError for workflow with no steps
|
|
299
|
+
*/
|
|
300
|
+
static emptyWorkflow(path) {
|
|
301
|
+
return new ValidationError({
|
|
302
|
+
code: OrbytErrorCode.VALIDATION_EMPTY_WORKFLOW,
|
|
303
|
+
message: 'Workflow has no steps defined',
|
|
304
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
305
|
+
path,
|
|
306
|
+
hint: 'Add at least one step to the workflow.steps array',
|
|
307
|
+
severity: ErrorSeverity.ERROR,
|
|
308
|
+
context: {},
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
/**
|
|
312
|
+
* Create missing input error
|
|
313
|
+
*
|
|
314
|
+
* @param inputName - Required input that is missing
|
|
315
|
+
* @param path - Path to step requiring the input
|
|
316
|
+
* @returns ValidationError for missing required input
|
|
317
|
+
*/
|
|
318
|
+
static missingInput(inputName, path) {
|
|
319
|
+
return new ValidationError({
|
|
320
|
+
code: OrbytErrorCode.VALIDATION_MISSING_INPUT,
|
|
321
|
+
message: `Required input "${inputName}" is not provided`,
|
|
322
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
123
323
|
path,
|
|
124
|
-
hint:
|
|
324
|
+
hint: `Add "${inputName}" to the workflow inputs or step inputs`,
|
|
325
|
+
severity: ErrorSeverity.ERROR,
|
|
326
|
+
context: { inputName },
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* Create invalid condition error
|
|
331
|
+
*
|
|
332
|
+
* @param condition - The invalid condition expression
|
|
333
|
+
* @param path - Path to step with invalid condition
|
|
334
|
+
* @param reason - Why the condition is invalid (optional)
|
|
335
|
+
* @returns ValidationError for invalid condition
|
|
336
|
+
*/
|
|
337
|
+
static invalidCondition(condition, path, reason) {
|
|
338
|
+
return new ValidationError({
|
|
339
|
+
code: OrbytErrorCode.VALIDATION_INVALID_CONDITION,
|
|
340
|
+
message: `Invalid condition expression: ${condition}`,
|
|
341
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
342
|
+
path,
|
|
343
|
+
hint: reason || 'Check the condition syntax - ensure proper operators and variable references',
|
|
344
|
+
severity: ErrorSeverity.ERROR,
|
|
345
|
+
context: { condition, reason },
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
/**
|
|
349
|
+
* Create invalid variable reference error
|
|
350
|
+
*
|
|
351
|
+
* @param variable - The invalid variable name/reference
|
|
352
|
+
* @param path - Path where variable is referenced
|
|
353
|
+
* @param availableVars - List of available variable names (optional)
|
|
354
|
+
* @returns ValidationError for invalid variable
|
|
355
|
+
*/
|
|
356
|
+
static invalidVariable(variable, path, availableVars) {
|
|
357
|
+
const hint = availableVars && availableVars.length > 0
|
|
358
|
+
? `Available variables: ${availableVars.join(', ')}`
|
|
359
|
+
: `Variable "${variable}" is not defined. Check spelling or define the variable`;
|
|
360
|
+
return new ValidationError({
|
|
361
|
+
code: OrbytErrorCode.VALIDATION_INVALID_VARIABLE,
|
|
362
|
+
message: `Invalid variable reference: ${variable}`,
|
|
363
|
+
exitCode: ExitCodes.VALIDATION_FAILED,
|
|
364
|
+
path,
|
|
365
|
+
hint,
|
|
125
366
|
severity: ErrorSeverity.ERROR,
|
|
367
|
+
context: { variable, availableVars },
|
|
126
368
|
});
|
|
127
369
|
}
|
|
128
370
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WorkflowError.js","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"WorkflowError.js","sourceRoot":"","sources":["../../src/errors/WorkflowError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,UAAU,EAA6B,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhE;;;;;;;;;GASG;AACH,MAAM,OAAO,WAAY,SAAQ,UAAU;IACzC,YAAY,UAAgC;QAC1C,KAAK,CAAC;YACJ,GAAG,UAAU;YACb,QAAQ,EAAE,aAAa,CAAC,KAAK;YAC7B,QAAQ,EAAE,UAAU,CAAC,QAAQ,IAAI,SAAS,CAAC,cAAc;SAC1D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;;OAOG;IACH,MAAM,CAAC,gBAAgB,CACrB,SAAiB,EACjB,IAAY,EACZ,MAAe;QAEf,OAAO,IAAI,eAAe,CAAC;YACzB,IAAI,EAAE,cAAc,CAAC,4BAA4B;YACjD,OAAO,EAAE,iCAAiC,SAAS,EAAE;YACrD,QAAQ,EAAE,SAAS,CAAC,iBAAiB;YACrC,IAAI;YACJ,IAAI,EAAE,MAAM,IAAI,8EAA8E;YAC9F,QAAQ,EAAE,aAAa,CAAC,KAAK;YAC7B,OAAO,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE;SAC/B,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CACpB,QAAgB,EAChB,IAAY,EACZ,aAAwB;QAExB,MAAM,IAAI,GAAG,aAAa,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC;YACpD,CAAC,CAAC,wBAAwB,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACpD,CAAC,CAAC,aAAa,QAAQ,yDAAyD,CAAC;QAEnF,OAAO,IAAI,eAAe,CAAC;YACzB,IAAI,EAAE,cAAc,CAAC,2BAA2B;YAChD,OAAO,EAAE,+BAA+B,QAAQ,EAAE;YAClD,QAAQ,EAAE,SAAS,CAAC,iBAAiB;YACrC,IAAI;YACJ,IAAI;YACJ,QAAQ,EAAE,aAAa,CAAC,KAAK;YAC7B,OAAO,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE;SACrC,CAAC,CAAC;IACL,CAAC;CACF"}
|
package/dist/errors/index.d.ts
CHANGED
|
@@ -9,7 +9,11 @@ export * from './ErrorCodes.js';
|
|
|
9
9
|
export * from './OrbytError.js';
|
|
10
10
|
export * from './WorkflowError.js';
|
|
11
11
|
export * from './TypoDetector.js';
|
|
12
|
-
export * from './FieldRegistry.js';
|
|
13
12
|
export * from './ErrorFormatter.js';
|
|
14
13
|
export * from './SecurityErrors.js';
|
|
14
|
+
export * from './StepError.js';
|
|
15
|
+
export * from './SchedulerError.js';
|
|
16
|
+
export * from './ErrorDetector.js';
|
|
17
|
+
export * from './ErrorDebugger.js';
|
|
18
|
+
export * from './ErrorHandler.js';
|
|
15
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAGlC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|
package/dist/errors/index.js
CHANGED
|
@@ -9,10 +9,13 @@ export * from './ErrorCodes.js';
|
|
|
9
9
|
export * from './OrbytError.js';
|
|
10
10
|
export * from './WorkflowError.js';
|
|
11
11
|
export * from './TypoDetector.js';
|
|
12
|
-
|
|
12
|
+
// FieldRegistry is internal - not exported to prevent conflicts with security/ReservedFields
|
|
13
|
+
// export * from './FieldRegistry.js';
|
|
13
14
|
export * from './ErrorFormatter.js';
|
|
14
15
|
export * from './SecurityErrors.js';
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
export * from './StepError.js';
|
|
17
|
+
export * from './SchedulerError.js';
|
|
18
|
+
export * from './ErrorDetector.js';
|
|
19
|
+
export * from './ErrorDebugger.js';
|
|
20
|
+
export * from './ErrorHandler.js';
|
|
18
21
|
//# sourceMappingURL=index.js.map
|
package/dist/errors/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/errors/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC;AAClC,6FAA6F;AAC7F,sCAAsC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,oBAAoB,CAAC;AACnC,cAAc,mBAAmB,CAAC"}
|