@usearazzo/runner 1.0.1-alpha.23 → 1.0.1-alpha.25
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/CHANGELOG.md +20 -0
- package/README.md +3 -1
- package/dist/arazzo-runner.browser.js +400 -229
- package/dist/arazzo-runner.browser.min.js +1 -1
- package/package.json +4 -4
- package/src/action/ActionResolver.cjs +4 -4
- package/src/action/ActionResolver.mjs +4 -4
- package/src/criterion/CriterionEvaluator.cjs +8 -9
- package/src/criterion/CriterionEvaluator.mjs +8 -9
- package/src/criterion/JSONPathCriterionEvaluator.cjs +1 -2
- package/src/criterion/JSONPathCriterionEvaluator.mjs +1 -2
- package/src/criterion/RegexCriterionEvaluator.cjs +1 -2
- package/src/criterion/RegexCriterionEvaluator.mjs +1 -2
- package/src/criterion/SimpleCriterionEvaluator.cjs +1 -2
- package/src/criterion/SimpleCriterionEvaluator.mjs +1 -2
- package/src/criterion/XPathCriterionEvaluator.cjs +4 -5
- package/src/criterion/XPathCriterionEvaluator.mjs +4 -5
- package/src/document/ArazzoDocument.cjs +33 -1
- package/src/document/ArazzoDocument.mjs +32 -1
- package/src/errors/CriterionError.cjs +52 -2
- package/src/errors/CriterionError.mjs +53 -2
- package/src/errors/ExecutionError.cjs +73 -2
- package/src/errors/ExecutionError.mjs +74 -2
- package/src/errors/ResolverError.cjs +53 -2
- package/src/errors/ResolverError.mjs +54 -2
- package/src/errors/RuntimeExpressionError.cjs +32 -2
- package/src/errors/RuntimeExpressionError.mjs +33 -2
- package/src/executor/ArazzoWorkflowLocatorNormalizer.cjs +4 -4
- package/src/executor/ArazzoWorkflowLocatorNormalizer.mjs +4 -4
- package/src/executor/OpenAPIOperationLocatorNormalizer.cjs +11 -11
- package/src/executor/OpenAPIOperationLocatorNormalizer.mjs +11 -11
- package/src/executor/StepExecutor.cjs +7 -7
- package/src/executor/StepExecutor.mjs +7 -7
- package/src/executor/StepRetryRunner.cjs +1 -1
- package/src/executor/StepRetryRunner.mjs +1 -1
- package/src/executor/StepTransitionInterpreter.cjs +3 -3
- package/src/executor/StepTransitionInterpreter.mjs +3 -3
- package/src/executor/WorkflowCallStack.cjs +2 -2
- package/src/executor/WorkflowCallStack.mjs +2 -2
- package/src/executor/WorkflowExecutor.cjs +13 -13
- package/src/executor/WorkflowExecutor.mjs +13 -13
- package/src/executor/abort.cjs +3 -3
- package/src/executor/abort.mjs +3 -3
- package/src/expression/RuntimeExpressionEvaluator.cjs +5 -5
- package/src/expression/RuntimeExpressionEvaluator.mjs +5 -5
- package/src/index.cjs +0 -7
- package/src/index.mjs +0 -1
- package/src/resolver/OpenAPIOperationParameterResolver.cjs +6 -6
- package/src/resolver/OpenAPIOperationParameterResolver.mjs +6 -6
- package/src/resolver/OutputResolver.cjs +3 -3
- package/src/resolver/OutputResolver.mjs +3 -3
- package/src/resolver/RequestBodyResolver.cjs +6 -6
- package/src/resolver/RequestBodyResolver.mjs +6 -6
- package/src/resolver/WorkflowParameterResolver.cjs +1 -1
- package/src/resolver/WorkflowParameterResolver.mjs +1 -1
- package/types/runner.d.ts +228 -46
- package/src/criterion/CriterionErrorReason.cjs +0 -51
- package/src/criterion/CriterionErrorReason.mjs +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,26 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.0.1-alpha.25](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.24...v1.0.1-alpha.25) (2026-11-04)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **runner:** list the workflows of an Arazzo document ([#321](https://github.com/usearazzo/arazzo-toolkit/issues/321)) ([93a2fc9](https://github.com/usearazzo/arazzo-toolkit/commit/93a2fc9738d095fab25bb5ba7afffe791ed4eb20)), closes [#83](https://github.com/usearazzo/arazzo-toolkit/issues/83)
|
|
11
|
+
|
|
12
|
+
## [1.0.1-alpha.24](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.23...v1.0.1-alpha.24) (2026-11-04)
|
|
13
|
+
|
|
14
|
+
### Features
|
|
15
|
+
|
|
16
|
+
- **runner:** type error reasons as static fields on error classes ([#320](https://github.com/usearazzo/arazzo-toolkit/issues/320)) ([3cdec78](https://github.com/usearazzo/arazzo-toolkit/commit/3cdec783d6fa9e54d83c3d9696ef1da1d6405bb5)), closes [#319](https://github.com/usearazzo/arazzo-toolkit/issues/319) [#78](https://github.com/usearazzo/arazzo-toolkit/issues/78)
|
|
17
|
+
|
|
18
|
+
### BREAKING CHANGES
|
|
19
|
+
|
|
20
|
+
- **runner:** CriterionErrorReason is now a type-only export; use the
|
|
21
|
+
CriterionError statics (CriterionError.InvalidRegex) instead of the
|
|
22
|
+
CriterionErrorReason object. The reason of ExecutionError, ResolverError
|
|
23
|
+
and RuntimeExpressionError is typed as a union of its reasons instead of
|
|
24
|
+
string, and their constructors reject reasons the class does not list.
|
|
25
|
+
|
|
6
26
|
## [1.0.1-alpha.23](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.22...v1.0.1-alpha.23) (2026-11-04)
|
|
7
27
|
|
|
8
28
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ A runner is four building blocks, composed bottom-up; `ArazzoRunner` composes th
|
|
|
44
44
|
<img alt="Runner architecture: WorkflowExecutor runs steps through StepExecutor, which runs OpenAPI operations through OpenAPIOperationExecutor and the HTTPClient; DocumentRegistry supplies documents to all three executors" src="https://raw.githubusercontent.com/usearazzo/arazzo-toolkit/main/packages/runner/assets/architecture.svg">
|
|
45
45
|
</p>
|
|
46
46
|
|
|
47
|
-
A step whose criteria go unmet is a result, not an error: the run resolves with `status: 'failed'`. A criterion whose condition cannot be evaluated (an invalid regex, JSONPath, XPath or simple condition, or non-XML data under an `xpath` query) counts as unmet, as Arazzo 1.1.0 requires, rather than throwing. So does a criterion of a step that calls a workflow when it reads `$statusCode`, `$url`, `$method`, `$request` or `$response`: that step made no HTTP call. Each step record's `successCriteria` and `actionCriteria` list every criterion its last attempt evaluated, as a `CriterionEvaluationRecord` with the condition, whether it was met, the action's name for an action criterion and, when it could not be evaluated, a `diagnostic` with a `code` and `message`, never request or response data. The type-specific criterion evaluators raise an unevaluable condition as `CriterionEvaluationError`, a `CriterionError` subclass, and every `CriterionError` carries a `reason`
|
|
47
|
+
A step whose criteria go unmet is a result, not an error: the run resolves with `status: 'failed'`. A criterion whose condition cannot be evaluated (an invalid regex, JSONPath, XPath or simple condition, or non-XML data under an `xpath` query) counts as unmet, as Arazzo 1.1.0 requires, rather than throwing. So does a criterion of a step that calls a workflow when it reads `$statusCode`, `$url`, `$method`, `$request` or `$response`: that step made no HTTP call. Each step record's `successCriteria` and `actionCriteria` list every criterion its last attempt evaluated, as a `CriterionEvaluationRecord` with the condition, whether it was met, the action's name for an action criterion and, when it could not be evaluated, a `diagnostic` with a `code` and `message`, never request or response data. The type-specific criterion evaluators raise an unevaluable condition as `CriterionEvaluationError`, a `CriterionError` subclass, and every `CriterionError` carries a `reason`. `CriterionError`, `ExecutionError`, `ResolverError` and `RuntimeExpressionError` each list the reasons they can carry as static fields (`CriterionError.InvalidRegex`, `ExecutionError.OperationNotFound`), typed by `CriterionErrorReason`, `ExecutionErrorReason`, `ResolverErrorReason` and `RuntimeExpressionErrorReason`. Only a document that cannot be loaded or run as written, a request that cannot be built or sent, or a cancelled run throws, and every such error extends `ArazzoRunnerError`; a document that cannot be read or loaded (a missing file, an HTTP error, an unresolvable reference) throws `DocumentLoadError` with the underlying failure as its `cause`.
|
|
48
48
|
|
|
49
49
|
## Installation
|
|
50
50
|
|
|
@@ -112,6 +112,8 @@ const result = await runner.execute('authenticateAndOrderPet', {
|
|
|
112
112
|
|
|
113
113
|
`runner.document` and `runner.registry` are the loaded entry document and the registry holding its source descriptions; unless you pass one, every runner `load` returns has a registry of its own. `load` takes the seams of the building blocks it wires: `registry` (one registry backs one entry document, so loading a different document into it throws `InvalidEntryDocumentError`), `httpClient` and `requestInterceptor`, and the workflow executor's `maxSteps`, `maxWorkflowDepth`, `sleep` and `now`. To bind a runner to a document you already acquired, use `new ArazzoRunner({ document, registry })`; it throws `InvalidEntryDocumentError` unless `document` is the entry document of `registry`.
|
|
114
114
|
|
|
115
|
+
To see what a document offers before running it, `runner.document.listWorkflows()` returns a `WorkflowDescriptor` for each workflow `execute` accepts, in document order: its `workflowId`, its `jsonPointer` in the document and, when the document gives them as strings, its `summary` and `description`. It reads the entry document only; source descriptions are not loaded.
|
|
116
|
+
|
|
115
117
|
To add credentials, pass a `requestInterceptor`:
|
|
116
118
|
|
|
117
119
|
```js
|