@usearazzo/runner 1.0.1-alpha.24 → 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
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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
|
+
|
|
6
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)
|
|
7
13
|
|
|
8
14
|
### Features
|
package/README.md
CHANGED
|
@@ -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
|
|
@@ -10573,16 +10573,27 @@ class APIDocument {
|
|
|
10573
10573
|
"use strict";
|
|
10574
10574
|
__webpack_require__.r(__webpack_exports__);
|
|
10575
10575
|
/* harmony import */ var _speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7456);
|
|
10576
|
-
/* harmony import */ var
|
|
10576
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(62823);
|
|
10577
|
+
/* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(94851);
|
|
10578
|
+
/* harmony import */ var _APIDocument_ts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(44919);
|
|
10579
|
+
|
|
10580
|
+
|
|
10581
|
+
|
|
10582
|
+
|
|
10577
10583
|
|
|
10584
|
+
/**
|
|
10585
|
+
* A workflow of an Arazzo document, as listed by
|
|
10586
|
+
* {@link ArazzoDocument.listWorkflows}.
|
|
10587
|
+
* @public
|
|
10588
|
+
*/
|
|
10578
10589
|
|
|
10579
10590
|
/**
|
|
10580
10591
|
* An Arazzo document held by the document registry: the parse result together
|
|
10581
10592
|
* with the indexes the provider built over it — a container, not a logic
|
|
10582
|
-
* bearer. The methods below are thin reads of
|
|
10593
|
+
* bearer. The methods below are thin reads of those indexes.
|
|
10583
10594
|
* @public
|
|
10584
10595
|
*/
|
|
10585
|
-
class ArazzoDocument extends
|
|
10596
|
+
class ArazzoDocument extends _APIDocument_ts__WEBPACK_IMPORTED_MODULE_3__["default"] {
|
|
10586
10597
|
type = 'arazzo';
|
|
10587
10598
|
isEntry;
|
|
10588
10599
|
/**
|
|
@@ -10615,6 +10626,30 @@ class ArazzoDocument extends _APIDocument_ts__WEBPACK_IMPORTED_MODULE_1__["defau
|
|
|
10615
10626
|
return doc.type === 'arazzo';
|
|
10616
10627
|
}
|
|
10617
10628
|
|
|
10629
|
+
/**
|
|
10630
|
+
* The workflows of this document that can be addressed by `workflowId`, in
|
|
10631
|
+
* document order. Reads this document only: source descriptions are neither
|
|
10632
|
+
* loaded nor listed.
|
|
10633
|
+
*/
|
|
10634
|
+
listWorkflows() {
|
|
10635
|
+
return [...this.workflowIndex].map(([workflowId, jsonPointer]) => {
|
|
10636
|
+
const {
|
|
10637
|
+
summary,
|
|
10638
|
+
description
|
|
10639
|
+
} = (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_2__.evaluate)(this.parseResult.api, jsonPointer);
|
|
10640
|
+
return {
|
|
10641
|
+
workflowId,
|
|
10642
|
+
jsonPointer,
|
|
10643
|
+
...((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(summary) && {
|
|
10644
|
+
summary: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(summary)
|
|
10645
|
+
}),
|
|
10646
|
+
...((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement)(description) && {
|
|
10647
|
+
description: (0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_0__["default"])(description)
|
|
10648
|
+
})
|
|
10649
|
+
};
|
|
10650
|
+
});
|
|
10651
|
+
}
|
|
10652
|
+
|
|
10618
10653
|
/**
|
|
10619
10654
|
* Resolves a source description name to its canonical URI — precomputed by
|
|
10620
10655
|
* the provider, resolved against this document's base URI.
|