@bedrock/vc-delivery 7.6.0 → 7.7.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/lib/index.js +8 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -17,8 +17,13 @@ import './config.js';
|
|
|
17
17
|
|
|
18
18
|
const {util: {BedrockError}} = bedrock;
|
|
19
19
|
|
|
20
|
+
// export programmatic access to workflow service
|
|
21
|
+
export let workflowService;
|
|
22
|
+
|
|
20
23
|
bedrock.events.on('bedrock.init', async () => {
|
|
21
|
-
await _initService({
|
|
24
|
+
workflowService = await _initService({
|
|
25
|
+
serviceType: 'vc-workflow', routePrefix: '/workflows'
|
|
26
|
+
});
|
|
22
27
|
// backwards compatibility: deprecrated `exchangers` service
|
|
23
28
|
await _initService({serviceType: 'vc-exchanger', routePrefix: '/exchangers'});
|
|
24
29
|
});
|
|
@@ -102,6 +107,8 @@ async function _initService({serviceType, routePrefix}) {
|
|
|
102
107
|
bedrock.events.on(event, async () => {
|
|
103
108
|
await initializeServiceAgent({serviceType});
|
|
104
109
|
});
|
|
110
|
+
|
|
111
|
+
return service;
|
|
105
112
|
}
|
|
106
113
|
|
|
107
114
|
async function usageAggregator({meter, signal, service} = {}) {
|