@versori/run 0.4.4 → 0.5.0-alpha.1

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 (177) hide show
  1. package/esm/src/connection/DirectConnectionFactory.d.ts.map +1 -1
  2. package/esm/src/connection/DirectConnectionFactory.js +2 -2
  3. package/esm/src/connection/internal/CredentialHolder.d.ts.map +1 -1
  4. package/esm/src/connection/internal/CredentialHolder.js +1 -1
  5. package/esm/src/connection/internal/FetchBuilder.d.ts +9 -2
  6. package/esm/src/connection/internal/FetchBuilder.d.ts.map +1 -1
  7. package/esm/src/connection/internal/FetchBuilder.js +120 -4
  8. package/esm/src/connection/internal/OutboundConnectionFactory.d.ts.map +1 -1
  9. package/esm/src/connection/internal/OutboundConnectionFactory.js +2 -2
  10. package/esm/src/context/Context.d.ts +1 -0
  11. package/esm/src/context/Context.d.ts.map +1 -1
  12. package/esm/src/context/Context.js +3 -0
  13. package/esm/src/context/ContextProvider.d.ts +1 -1
  14. package/esm/src/context/ContextProvider.d.ts.map +1 -1
  15. package/esm/src/context/ContextProvider.js +1 -1
  16. package/esm/src/dsl/Workflow.d.ts.map +1 -1
  17. package/esm/src/dsl/Workflow.js +2 -0
  18. package/esm/src/dsl/http/types.d.ts +2 -0
  19. package/esm/src/dsl/http/types.d.ts.map +1 -1
  20. package/esm/src/dsl/http/versori/configloader.js +1 -1
  21. package/esm/src/dsl/http/versori/cronapi.d.ts +2 -3
  22. package/esm/src/dsl/http/versori/cronapi.d.ts.map +1 -1
  23. package/esm/src/dsl/http/versori/cronapi.js +14 -15
  24. package/esm/src/dsl/http/versori/kvapi/core/OpenAPI.js +1 -1
  25. package/esm/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
  26. package/esm/src/dsl/http/versori/webhookmiddleware.js +69 -38
  27. package/esm/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
  28. package/esm/src/dsl/triggers/WebhookTrigger.js +3 -1
  29. package/esm/src/internal/InternalAuth.d.ts +0 -1
  30. package/esm/src/internal/InternalAuth.d.ts.map +1 -1
  31. package/esm/src/internal/InternalAuth.js +1 -14
  32. package/esm/src/internal/constants.d.ts +3 -1
  33. package/esm/src/internal/constants.d.ts.map +1 -1
  34. package/esm/src/internal/constants.js +4 -1
  35. package/esm/src/internal/supervisor.d.ts +25 -0
  36. package/esm/src/internal/supervisor.d.ts.map +1 -0
  37. package/esm/src/internal/supervisor.js +156 -0
  38. package/esm/src/interpreter/durable/DurableInterpreter.d.ts +8 -2
  39. package/esm/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
  40. package/esm/src/interpreter/durable/DurableInterpreter.js +79 -27
  41. package/esm/src/interpreter/durable/ObservableCompiler.d.ts +6 -1
  42. package/esm/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
  43. package/esm/src/interpreter/durable/Queue.js +1 -1
  44. package/esm/src/interpreter/durable/compilers/catch.d.ts.map +1 -1
  45. package/esm/src/interpreter/durable/compilers/catch.js +1 -0
  46. package/esm/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
  47. package/esm/src/interpreter/durable/compilers/fn.js +19 -4
  48. package/esm/src/interpreter/durable/compilers/http.d.ts.map +1 -1
  49. package/esm/src/interpreter/durable/compilers/http.js +40 -7
  50. package/esm/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
  51. package/esm/src/interpreter/durable/compilers/schedule.js +2 -1
  52. package/esm/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
  53. package/esm/src/interpreter/durable/compilers/webhook.js +14 -4
  54. package/esm/src/interpreter/memory/MemoryInterpreter.d.ts +7 -1
  55. package/esm/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
  56. package/esm/src/interpreter/memory/MemoryInterpreter.js +78 -18
  57. package/esm/src/interpreter/memory/ObservableCompiler.d.ts +6 -1
  58. package/esm/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
  59. package/esm/src/interpreter/memory/compilers/catch.d.ts.map +1 -1
  60. package/esm/src/interpreter/memory/compilers/catch.js +1 -0
  61. package/esm/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
  62. package/esm/src/interpreter/memory/compilers/fn.js +19 -16
  63. package/esm/src/interpreter/memory/compilers/http.d.ts.map +1 -1
  64. package/esm/src/interpreter/memory/compilers/http.js +39 -6
  65. package/esm/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
  66. package/esm/src/interpreter/memory/compilers/schedule.js +2 -1
  67. package/esm/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
  68. package/esm/src/interpreter/memory/compilers/webhook.js +15 -4
  69. package/esm/src/issues/Issues.js +1 -1
  70. package/esm/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
  71. package/package.json +3 -1
  72. package/script/src/connection/DirectConnectionFactory.d.ts.map +1 -1
  73. package/script/src/connection/DirectConnectionFactory.js +2 -2
  74. package/script/src/connection/internal/CredentialHolder.d.ts.map +1 -1
  75. package/script/src/connection/internal/CredentialHolder.js +1 -1
  76. package/script/src/connection/internal/FetchBuilder.d.ts +9 -2
  77. package/script/src/connection/internal/FetchBuilder.d.ts.map +1 -1
  78. package/script/src/connection/internal/FetchBuilder.js +143 -4
  79. package/script/src/connection/internal/OutboundConnectionFactory.d.ts.map +1 -1
  80. package/script/src/connection/internal/OutboundConnectionFactory.js +2 -2
  81. package/script/src/context/Context.d.ts +1 -0
  82. package/script/src/context/Context.d.ts.map +1 -1
  83. package/script/src/context/Context.js +3 -0
  84. package/script/src/context/ContextProvider.d.ts +1 -1
  85. package/script/src/context/ContextProvider.d.ts.map +1 -1
  86. package/script/src/context/ContextProvider.js +1 -1
  87. package/script/src/dsl/Workflow.d.ts.map +1 -1
  88. package/script/src/dsl/Workflow.js +2 -0
  89. package/script/src/dsl/http/types.d.ts +2 -0
  90. package/script/src/dsl/http/types.d.ts.map +1 -1
  91. package/script/src/dsl/http/versori/configloader.js +1 -1
  92. package/script/src/dsl/http/versori/cronapi.d.ts +2 -3
  93. package/script/src/dsl/http/versori/cronapi.d.ts.map +1 -1
  94. package/script/src/dsl/http/versori/cronapi.js +14 -15
  95. package/script/src/dsl/http/versori/kvapi/core/OpenAPI.js +1 -1
  96. package/script/src/dsl/http/versori/webhookmiddleware.d.ts.map +1 -1
  97. package/script/src/dsl/http/versori/webhookmiddleware.js +69 -38
  98. package/script/src/dsl/triggers/WebhookTrigger.d.ts.map +1 -1
  99. package/script/src/dsl/triggers/WebhookTrigger.js +3 -1
  100. package/script/src/internal/InternalAuth.d.ts +0 -1
  101. package/script/src/internal/InternalAuth.d.ts.map +1 -1
  102. package/script/src/internal/InternalAuth.js +0 -13
  103. package/script/src/internal/constants.d.ts +3 -1
  104. package/script/src/internal/constants.d.ts.map +1 -1
  105. package/script/src/internal/constants.js +5 -2
  106. package/script/src/internal/supervisor.d.ts +25 -0
  107. package/script/src/internal/supervisor.d.ts.map +1 -0
  108. package/script/src/internal/supervisor.js +163 -0
  109. package/script/src/interpreter/durable/DurableInterpreter.d.ts +8 -2
  110. package/script/src/interpreter/durable/DurableInterpreter.d.ts.map +1 -1
  111. package/script/src/interpreter/durable/DurableInterpreter.js +84 -32
  112. package/script/src/interpreter/durable/ObservableCompiler.d.ts +6 -1
  113. package/script/src/interpreter/durable/ObservableCompiler.d.ts.map +1 -1
  114. package/script/src/interpreter/durable/Queue.js +1 -1
  115. package/script/src/interpreter/durable/compilers/catch.d.ts.map +1 -1
  116. package/script/src/interpreter/durable/compilers/catch.js +1 -0
  117. package/script/src/interpreter/durable/compilers/fn.d.ts.map +1 -1
  118. package/script/src/interpreter/durable/compilers/fn.js +19 -4
  119. package/script/src/interpreter/durable/compilers/http.d.ts.map +1 -1
  120. package/script/src/interpreter/durable/compilers/http.js +40 -7
  121. package/script/src/interpreter/durable/compilers/schedule.d.ts.map +1 -1
  122. package/script/src/interpreter/durable/compilers/schedule.js +2 -1
  123. package/script/src/interpreter/durable/compilers/webhook.d.ts.map +1 -1
  124. package/script/src/interpreter/durable/compilers/webhook.js +14 -4
  125. package/script/src/interpreter/memory/MemoryInterpreter.d.ts +7 -1
  126. package/script/src/interpreter/memory/MemoryInterpreter.d.ts.map +1 -1
  127. package/script/src/interpreter/memory/MemoryInterpreter.js +78 -18
  128. package/script/src/interpreter/memory/ObservableCompiler.d.ts +6 -1
  129. package/script/src/interpreter/memory/ObservableCompiler.d.ts.map +1 -1
  130. package/script/src/interpreter/memory/compilers/catch.d.ts.map +1 -1
  131. package/script/src/interpreter/memory/compilers/catch.js +1 -0
  132. package/script/src/interpreter/memory/compilers/fn.d.ts.map +1 -1
  133. package/script/src/interpreter/memory/compilers/fn.js +19 -16
  134. package/script/src/interpreter/memory/compilers/http.d.ts.map +1 -1
  135. package/script/src/interpreter/memory/compilers/http.js +39 -6
  136. package/script/src/interpreter/memory/compilers/schedule.d.ts.map +1 -1
  137. package/script/src/interpreter/memory/compilers/schedule.js +2 -1
  138. package/script/src/interpreter/memory/compilers/webhook.d.ts.map +1 -1
  139. package/script/src/interpreter/memory/compilers/webhook.js +15 -4
  140. package/script/src/issues/Issues.js +1 -1
  141. package/script/src/observability/logging/ConsoleLogger.d.ts.map +1 -1
  142. package/esm/src/dsl/http/default.d.ts +0 -26
  143. package/esm/src/dsl/http/default.d.ts.map +0 -1
  144. package/esm/src/dsl/http/default.js +0 -56
  145. package/esm/src/dsl/http/versori/cli.d.ts +0 -2
  146. package/esm/src/dsl/http/versori/cli.d.ts.map +0 -1
  147. package/esm/src/dsl/http/versori/cli.js +0 -32
  148. package/esm/src/dsl/http/versori/constants.d.ts +0 -20
  149. package/esm/src/dsl/http/versori/constants.d.ts.map +0 -1
  150. package/esm/src/dsl/http/versori/constants.js +0 -37
  151. package/esm/src/dsl/http/versori/internalauth.d.ts +0 -15
  152. package/esm/src/dsl/http/versori/internalauth.d.ts.map +0 -1
  153. package/esm/src/dsl/http/versori/internalauth.js +0 -102
  154. package/esm/src/dsl/http/versori/proxyroundtripper.d.ts +0 -23
  155. package/esm/src/dsl/http/versori/proxyroundtripper.d.ts.map +0 -1
  156. package/esm/src/dsl/http/versori/proxyroundtripper.js +0 -208
  157. package/esm/src/internal/cli.d.ts +0 -2
  158. package/esm/src/internal/cli.d.ts.map +0 -1
  159. package/esm/src/internal/cli.js +0 -32
  160. package/script/src/dsl/http/default.d.ts +0 -26
  161. package/script/src/dsl/http/default.d.ts.map +0 -1
  162. package/script/src/dsl/http/default.js +0 -60
  163. package/script/src/dsl/http/versori/cli.d.ts +0 -2
  164. package/script/src/dsl/http/versori/cli.d.ts.map +0 -1
  165. package/script/src/dsl/http/versori/cli.js +0 -35
  166. package/script/src/dsl/http/versori/constants.d.ts +0 -20
  167. package/script/src/dsl/http/versori/constants.d.ts.map +0 -1
  168. package/script/src/dsl/http/versori/constants.js +0 -40
  169. package/script/src/dsl/http/versori/internalauth.d.ts +0 -15
  170. package/script/src/dsl/http/versori/internalauth.d.ts.map +0 -1
  171. package/script/src/dsl/http/versori/internalauth.js +0 -106
  172. package/script/src/dsl/http/versori/proxyroundtripper.d.ts +0 -23
  173. package/script/src/dsl/http/versori/proxyroundtripper.d.ts.map +0 -1
  174. package/script/src/dsl/http/versori/proxyroundtripper.js +0 -212
  175. package/script/src/internal/cli.d.ts +0 -2
  176. package/script/src/internal/cli.d.ts.map +0 -1
  177. package/script/src/internal/cli.js +0 -35
@@ -10,6 +10,7 @@
10
10
  * As of the Change Date, in accordance with the Business Source License,
11
11
  * use of this software will be governed by the Apache License, Version 2.0.
12
12
  */
13
+ import { enabled as supervisorEnabled } from '../../../internal/supervisor.js';
13
14
  // TODO: this gets called for every request for all endpoints, can we cache this?
14
15
  async function getStaticActivation(opts) {
15
16
  const { data: activations } = await opts.platformApi.listActivations({
@@ -38,15 +39,32 @@ async function getStaticActivation(opts) {
38
39
  }
39
40
  // TODO: Refactor this so we don't have like three different middlewares for static and dynamic webhooks
40
41
  export function createStaticWebhookMiddleware(opts) {
42
+ const staticMiddleware = async (_req, res, next) => {
43
+ try {
44
+ res.locals.activation = await getStaticActivation(opts);
45
+ }
46
+ catch (err) {
47
+ if (supervisorEnabled) {
48
+ res.locals.activation = {};
49
+ next();
50
+ return;
51
+ }
52
+ opts.log.error('Failed to get static activation', { error: err });
53
+ res.status(500).json({ error: 'Failed to get static activation' });
54
+ return;
55
+ }
56
+ next();
57
+ };
41
58
  if (opts.connName === undefined) {
42
59
  opts.log.warn(`No connection ID found for webhook, accepting any requests which is unsecure!`, { webhookId: opts.id });
43
- return async (_req, res, next) => {
44
- res.locals.activation = await getStaticActivation(opts);
45
- next();
46
- };
60
+ return staticMiddleware;
47
61
  }
48
62
  // TODO(@teo): move db access to outside of the middleware??? (genuine question - not instruction)
49
63
  return async (req, res, next) => {
64
+ if (supervisorEnabled) {
65
+ opts.log.warn("Disabling webhook auth in test mode.");
66
+ return staticMiddleware(req, res, next);
67
+ }
50
68
  if (!opts.connName) {
51
69
  // This is mainly for type safety, but we should never reach this point
52
70
  opts.log.error('Connection name is not defined for webhook middleware');
@@ -89,23 +107,31 @@ export function createStaticWebhookMiddleware(opts) {
89
107
  };
90
108
  }
91
109
  export function createActIdDynamicWebhookMiddleware(opts) {
110
+ const staticMiddleware = async (_req, res, next) => {
111
+ try {
112
+ res.locals.activation = await getStaticActivation(opts);
113
+ }
114
+ catch (err) {
115
+ if (supervisorEnabled) {
116
+ res.locals.activation = {};
117
+ next();
118
+ return;
119
+ }
120
+ opts.log.error('Failed to get static activation', { error: err });
121
+ res.status(500).json({ error: 'Failed to get static activation' });
122
+ return;
123
+ }
124
+ next();
125
+ };
92
126
  if (!opts.connName) {
93
127
  opts.log.warn(`No template ID found for webhook, accepting any requests which is unsecure!`, { webhookId: opts.id });
94
- return async (req, res, next) => {
95
- const activationId = req.params.activationId;
96
- const activation = await opts.platformApi.getActivation({
97
- path: {
98
- organisation_id: opts.organisationId,
99
- environment_id: opts.environmentId,
100
- activation_id: activationId,
101
- },
102
- throwOnError: true,
103
- });
104
- res.locals.activation = activation;
105
- next();
106
- };
128
+ return staticMiddleware;
107
129
  }
108
130
  return async (req, res, next) => {
131
+ if (supervisorEnabled) {
132
+ opts.log.warn("Disabling webhook out in test mode.");
133
+ return staticMiddleware(req, res, next);
134
+ }
109
135
  if (!opts.connName) {
110
136
  // This is mainly for type safety, but we should never reach this point
111
137
  opts.log.error('Connection name is not defined for webhook middleware');
@@ -140,31 +166,36 @@ export function createActIdDynamicWebhookMiddleware(opts) {
140
166
  };
141
167
  }
142
168
  export function createUserIdDynamicWebhookMiddleware(opts) {
169
+ const staticMiddleware = async (req, res, next) => {
170
+ const userId = req.params.userId;
171
+ const { data: activations } = await opts.platformApi.listUserActivations({
172
+ path: {
173
+ organisation_id: opts.organisationId,
174
+ environment_id: opts.environmentId,
175
+ external_user_id: userId,
176
+ },
177
+ throwOnError: true,
178
+ });
179
+ if (activations.length === 0) {
180
+ opts.log.error(`No activations found for user: ${userId}`);
181
+ res.status(401).json({ error: 'Unauthorised' });
182
+ return;
183
+ }
184
+ if (activations.length > 1) {
185
+ opts.log.warn(`Multiple activations found for user: ${userId}, using the first one: ${activations[0].id}`);
186
+ }
187
+ res.locals.activation = activations[0];
188
+ next();
189
+ };
143
190
  if (!opts.connName) {
144
191
  opts.log.warn(`No template ID found for webhook, accepting any requests which is unsecure!`, { webhookId: opts.id });
145
- return async (req, res, next) => {
146
- const userId = req.params.userId;
147
- const { data: activations } = await opts.platformApi.listUserActivations({
148
- path: {
149
- organisation_id: opts.organisationId,
150
- environment_id: opts.environmentId,
151
- external_user_id: userId,
152
- },
153
- throwOnError: true,
154
- });
155
- if (activations.length === 0) {
156
- opts.log.error(`No activations found for user: ${userId}`);
157
- res.status(401).json({ error: 'Unauthorised' });
158
- return;
159
- }
160
- if (activations.length > 1) {
161
- opts.log.warn(`Multiple activations found for user: ${userId}, using the first one: ${activations[0].id}`);
162
- }
163
- res.locals.activation = activations[0];
164
- next();
165
- };
192
+ return staticMiddleware;
166
193
  }
167
194
  return async (req, res, next) => {
195
+ if (supervisorEnabled) {
196
+ opts.log.warn("Disabling webhook auth in test mode.");
197
+ return staticMiddleware(req, res, next);
198
+ }
168
199
  if (!opts.connName) {
169
200
  // This is mainly for type safety, but we should never reach this point
170
201
  opts.log.error('Connection name is not defined for webhook middleware');
@@ -1 +1 @@
1
- {"version":3,"file":"WebhookTrigger.d.ts","sourceRoot":"","sources":["../../../../src/src/dsl/triggers/WebhookTrigger.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAgB,MAAM,gBAAgB,CAAC;AAExD;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD;;;GAGG;AACH,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG;IACvC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,OAAO,EAAE,MAAM,EAAE,CAAC;IAElB;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IAEzB;;OAEG;IACH,WAAW,EAAE,OAAO,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACjC;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAExB;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;IAE7C;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE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nC,CAAC;AAEF,qBAAa,cAAe,YAAW,OAAO,CAAC,WAAW,CAAC;IACvD,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,cAAc,CAAC;IAExB,CAAC,WAAW,CAAC,EAAE,MAAM,CAAa;gBAEtB,EAAE,EAAE,MAAM,EAAE,OAAO,GAAE,cAAmB;IAOpD,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,WAAW,EAAE,EAAE,CAAC,GAAG,QAAQ,CAAC,EAAE,CAAC;CAK1D;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAElF"}
@@ -36,9 +36,11 @@ export class WebhookTrigger {
36
36
  });
37
37
  this.id = id;
38
38
  this.options = options;
39
+ this.then = this.then.bind(this);
39
40
  }
40
41
  then(task) {
41
- return new WorkflowImpl(this, ensureTask(task));
42
+ const actualTask = ensureTask(task);
43
+ return new WorkflowImpl(this, actualTask);
42
44
  }
43
45
  }
44
46
  _a = TriggerType;
@@ -5,7 +5,6 @@ export declare class InternalAuth {
5
5
  private clientId;
6
6
  private clientSecret;
7
7
  private tokenEndpoint;
8
- private runLocal;
9
8
  private accessToken;
10
9
  private expiresAt;
11
10
  constructor();
@@ -1 +1 @@
1
- {"version":3,"file":"InternalAuth.d.ts","sourceRoot":"","sources":["../../../src/src/internal/InternalAuth.ts"],"names":[],"mappings":"AAsBA,KAAK,kBAAkB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEpD,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAS;IAC9B,OAAO,CAAC,QAAQ,CAAU;IAE1B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;;IAkCpB,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAsBrD"}
1
+ {"version":3,"file":"InternalAuth.d.ts","sourceRoot":"","sources":["../../../src/src/internal/InternalAuth.ts"],"names":[],"mappings":"AAoBA,KAAK,kBAAkB,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AAEpD,qBAAa,YAAY;IACrB,OAAO,CAAC,QAAQ,CAAS;IACzB,OAAO,CAAC,YAAY,CAAS;IAC7B,OAAO,CAAC,aAAa,CAAS;IAE9B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,SAAS,CAAS;;IA2BpB,aAAa,IAAI,OAAO,CAAC,kBAAkB,CAAC;CAsBrD"}
@@ -10,8 +10,7 @@
10
10
  * As of the Change Date, in accordance with the Business Source License,
11
11
  * use of this software will be governed by the Apache License, Version 2.0.
12
12
  */
13
- import { getVersoriCookie } from './cli.js';
14
- import { envVarClientId, envVarClientSecret, envVarInternalToken, envVarLocalRun, envVarTokenEndpoint, } from './constants.js';
13
+ import { envVarClientId, envVarClientSecret, envVarInternalToken, envVarTokenEndpoint, } from './constants.js';
15
14
  export class InternalAuth {
16
15
  constructor() {
17
16
  Object.defineProperty(this, "clientId", {
@@ -32,12 +31,6 @@ export class InternalAuth {
32
31
  writable: true,
33
32
  value: void 0
34
33
  });
35
- Object.defineProperty(this, "runLocal", {
36
- enumerable: true,
37
- configurable: true,
38
- writable: true,
39
- value: void 0
40
- });
41
34
  Object.defineProperty(this, "accessToken", {
42
35
  enumerable: true,
43
36
  configurable: true,
@@ -55,18 +48,12 @@ export class InternalAuth {
55
48
  this.tokenEndpoint = Deno.env.get(envVarTokenEndpoint) || '';
56
49
  this.accessToken = '';
57
50
  this.expiresAt = 0;
58
- this.runLocal = Deno.env.get(envVarLocalRun) === 'true';
59
51
  if (Deno.env.get(envVarInternalToken)) {
60
52
  this.accessToken = Deno.env.get(envVarInternalToken) || '';
61
53
  this.expiresAt = Date.now() + 365 * 24 * 60 * 60 * 1000; // expires in 1 year
62
54
  console.log(`Using static token provided by ${envVarInternalToken}`);
63
55
  return;
64
56
  }
65
- if (this.runLocal) {
66
- console.info('Running in local mode using cookie for authentication');
67
- this.accessToken = getVersoriCookie();
68
- return;
69
- }
70
57
  if (!this.clientId || !this.clientSecret || !this.tokenEndpoint) {
71
58
  const missingVars = [];
72
59
  if (!this.clientId)
@@ -10,11 +10,13 @@ export declare const envVarSelfRefURL = "RUN_SELF_REF_URL";
10
10
  export declare const envVarCredsBaseURL = "RUN_CREDENTIALS_SERVICE_INTERNAL_URL";
11
11
  export declare const envVarOtelTracesURL = "RUN_OTEL_TRACES_URL";
12
12
  export declare const envVarVersion = "RUN_SERVICE_VERSION";
13
+ export declare const envReadyCheckURL = "READY_CHECK_URL";
14
+ export declare const envPort = "PORT";
15
+ export declare const envCronPort = "CRON_PORT";
13
16
  export declare const envVarConfigFile = "RUN_CONFIG_FILE";
14
17
  export declare const envVarClientId = "RUN_CLIENT_ID";
15
18
  export declare const envVarClientSecret = "RUN_CLIENT_SECRET";
16
19
  export declare const envVarTokenEndpoint = "RUN_TOKEN_ENDPOINT";
17
20
  export declare const envVarInternalToken = "RUN_INTERNAL_TOKEN";
18
- export declare const envVarLocalRun = "RUN_LOCAL";
19
21
  export declare const cronPort = 3001;
20
22
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/src/internal/constants.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,WAAW,wBAAwB,CAAC;AACjD,eAAO,MAAM,WAAW,uBAAuB,CAAC;AAChD,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AACvD,eAAO,MAAM,eAAe,mBAAmB,CAAC;AAChD,eAAO,MAAM,aAAa,0BAA0B,CAAC;AACrD,eAAO,MAAM,wBAAwB,kCAAkC,CAAC;AACxE,eAAO,MAAM,oBAAoB,8BAA8B,CAAC;AA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C;AAC9C,eAAO,MAAM,kBAAkB,sBAAsB,CAAC;AACtD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AACxD,eAAO,MAAM,mBAAmB,uBAAuB,CAAC;AAMxD,eAAO,MAAM,QAAQ,OAAO,CAAC"}
@@ -23,6 +23,9 @@ export const envVarSelfRefURL = 'RUN_SELF_REF_URL';
23
23
  export const envVarCredsBaseURL = 'RUN_CREDENTIALS_SERVICE_INTERNAL_URL';
24
24
  export const envVarOtelTracesURL = 'RUN_OTEL_TRACES_URL';
25
25
  export const envVarVersion = 'RUN_SERVICE_VERSION';
26
+ export const envReadyCheckURL = 'READY_CHECK_URL';
27
+ export const envPort = 'PORT';
28
+ export const envCronPort = 'CRON_PORT';
26
29
  // The following environment variables are used for the config file
27
30
  export const envVarConfigFile = 'RUN_CONFIG_FILE';
28
31
  // The following environment variables are used for internal authentication
@@ -31,6 +34,6 @@ export const envVarClientSecret = 'RUN_CLIENT_SECRET';
31
34
  export const envVarTokenEndpoint = 'RUN_TOKEN_ENDPOINT';
32
35
  export const envVarInternalToken = 'RUN_INTERNAL_TOKEN';
33
36
  // The following are for running locally
34
- export const envVarLocalRun = 'RUN_LOCAL';
37
+ // export const envVarLocalRun = 'RUN_LOCAL';
35
38
  // please no changerino
36
39
  export const cronPort = 3001; // The port on which the cron API communicates with the service
@@ -0,0 +1,25 @@
1
+ import { ExportResult } from '@opentelemetry/core';
2
+ import { ReadableSpan, SpanExporter } from '@opentelemetry/sdk-trace-node';
3
+ export declare const enabled: boolean;
4
+ type Webhooks = Map<string, {
5
+ method: string;
6
+ path: string;
7
+ options: any;
8
+ }>;
9
+ type Crons = Map<string, string>;
10
+ type MockConnection = {
11
+ name: string;
12
+ id?: string;
13
+ baseUrl?: string;
14
+ };
15
+ export declare function registerWebhooks(webhooks: Webhooks): Promise<void>;
16
+ export declare function registerCrons(crons: Crons): Promise<void>;
17
+ export declare function mockAPIRequest(info: RequestInfo | URL, cnx?: MockConnection, options?: RequestInit): Promise<Response>;
18
+ export declare class Fake implements SpanExporter {
19
+ constructor();
20
+ export(spans: ReadableSpan[], resultCallback: (result: ExportResult) => void): void;
21
+ shutdown(): Promise<void>;
22
+ forceFlush(): Promise<void>;
23
+ }
24
+ export {};
25
+ //# sourceMappingURL=supervisor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"supervisor.d.ts","sourceRoot":"","sources":["../../../src/src/internal/supervisor.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,YAAY,EAA6D,MAAM,qBAAqB,CAAC;AAC9G,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAO3E,eAAO,MAAM,OAAO,SAEjB,CAAA;AAyBH,KAAK,QAAQ,GAAG,GAAG,CAAC,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,GAAG,CAAA;CAAE,CAAC,CAAC;AAC5E,KAAK,KAAK,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEjC,KAAK,cAAc,GAAG;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAA;AAED,wBAAsB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBxE;AAED,wBAAsB,aAAa,CAAC,KAAK,EAAE,KAAK,GAAG,OAAO,CAAC,IAAI,CAAC,CAgB/D;AAED,wBAAsB,cAAc,CAAC,IAAI,EAAE,WAAW,GAAG,GAAG,EAAE,GAAG,CAAC,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAoC5H;AAyBD,qBAAa,IAAK,YAAW,YAAY;;IAOrC,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,EAAE,cAAc,EAAE,CAAC,MAAM,EAAE,YAAY,KAAK,IAAI,GAAG,IAAI;IAmBnF,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAIzB,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;CAG9B"}
@@ -0,0 +1,156 @@
1
+ /*
2
+ * Copyright (c) 2025 Versori Group Inc
3
+ *
4
+ * Use of this software is governed by the Business Source License 1.1
5
+ * included in the LICENSE file at the root of this repository.
6
+ *
7
+ * Change Date: 2029-01-01
8
+ * Change License: Apache License, Version 2.0
9
+ *
10
+ * As of the Change Date, in accordance with the Business Source License,
11
+ * use of this software will be governed by the Apache License, Version 2.0.
12
+ */
13
+ import { ExportResultCode, hrTimeToMilliseconds, hrTimeToTimeStamp } from '@opentelemetry/core';
14
+ import { ConsoleLogger } from '../observability/logging/ConsoleLogger.js';
15
+ const supervisorURL = function () {
16
+ return Deno.env.get('RUN_SUPERVISOR_URL') || '';
17
+ }();
18
+ export const enabled = function () {
19
+ return Deno.env.get('RUN_SUPERVISOR_URL') ? true : false;
20
+ }();
21
+ const flows = function () {
22
+ try {
23
+ const _cwd = Deno.cwd();
24
+ const flowsFile = Deno.readTextFileSync(_cwd + '/versori-flow.json');
25
+ const flows = JSON.parse(flowsFile);
26
+ const nodes = {};
27
+ for (const node of flows.nodes) {
28
+ nodes[node.id] = {
29
+ description: node.data.description,
30
+ steps: node.data.steps,
31
+ };
32
+ }
33
+ return nodes;
34
+ }
35
+ catch (err) {
36
+ return {};
37
+ }
38
+ }();
39
+ const logger = new ConsoleLogger('debug');
40
+ export async function registerWebhooks(webhooks) {
41
+ if (!enabled) {
42
+ return;
43
+ }
44
+ try {
45
+ await fetch(`${supervisorURL}/register-webhooks`, {
46
+ method: "POST",
47
+ body: JSON.stringify(Object.fromEntries(webhooks)),
48
+ headers: {
49
+ "Content-Type": "application/json",
50
+ },
51
+ });
52
+ }
53
+ catch (err) {
54
+ logger.error('Failed to register webhooks with supervisor', { error: err });
55
+ }
56
+ }
57
+ export async function registerCrons(crons) {
58
+ if (!enabled) {
59
+ return;
60
+ }
61
+ try {
62
+ await fetch(`${supervisorURL}/register-schedulers`, {
63
+ method: "POST",
64
+ body: JSON.stringify(Object.fromEntries(crons)),
65
+ headers: {
66
+ "Content-Type": "application/json",
67
+ },
68
+ });
69
+ }
70
+ catch (err) {
71
+ logger.error('Failed to register crons with supervisor', { error: err });
72
+ }
73
+ }
74
+ export async function mockAPIRequest(info, cnx, options) {
75
+ if (!enabled) {
76
+ return new Response();
77
+ }
78
+ const mockRequest = {
79
+ url: info.toString(),
80
+ payload: options?.body || '',
81
+ method: options?.method || "GET",
82
+ headers: options?.headers,
83
+ connection: cnx?.name,
84
+ connectionId: cnx?.id,
85
+ };
86
+ try {
87
+ const response = await fetch(`${supervisorURL}/ai/fake-fetch-call`, {
88
+ method: "POST",
89
+ body: JSON.stringify(mockRequest),
90
+ headers: {
91
+ "Content-Type": "application/json",
92
+ },
93
+ });
94
+ if (!response.ok) {
95
+ logger.error('Failed to mock api request', { response });
96
+ return new Response();
97
+ }
98
+ const text = await response.text();
99
+ return new Response(text);
100
+ }
101
+ catch (err) {
102
+ logger.error('Failed to mock api request', { error: err });
103
+ return new Response();
104
+ }
105
+ }
106
+ function printableSpan(s) {
107
+ let span = {
108
+ name: s.name,
109
+ startTime: hrTimeToTimeStamp(s.startTime),
110
+ endTime: hrTimeToTimeStamp(s.endTime),
111
+ duration: hrTimeToMilliseconds(s.duration),
112
+ attributes: s.attributes,
113
+ status: s.status,
114
+ ended: s.ended,
115
+ events: s.events,
116
+ parentSpanContext: s.parentSpanContext,
117
+ spanContext: s.spanContext(),
118
+ };
119
+ const nodeDetail = flows[span.attributes['task.id']]; // I know I have coded all of those as string
120
+ if (nodeDetail) {
121
+ span.attributes['description'] = nodeDetail.description;
122
+ span.attributes['steps'] = nodeDetail.steps;
123
+ }
124
+ return span;
125
+ }
126
+ export class Fake {
127
+ constructor() {
128
+ this.export = this.export.bind(this);
129
+ this.shutdown = this.shutdown.bind(this);
130
+ this.forceFlush = this.forceFlush.bind(this);
131
+ }
132
+ export(spans, resultCallback) {
133
+ const ss = spans.map(printableSpan);
134
+ try {
135
+ fetch(`${supervisorURL}/receive-spans`, {
136
+ method: "POST",
137
+ body: JSON.stringify({ spans: ss }),
138
+ headers: {
139
+ "Content-Type": "application/json",
140
+ },
141
+ }).catch((err) => {
142
+ logger.error('Failed to send spans to supervisor', { error: err });
143
+ });
144
+ }
145
+ catch (err) {
146
+ logger.error('Failed to send spans to supervisor', { error: err });
147
+ }
148
+ resultCallback({ code: ExportResultCode.SUCCESS });
149
+ }
150
+ shutdown() {
151
+ return Promise.resolve();
152
+ }
153
+ forceFlush() {
154
+ return Promise.resolve();
155
+ }
156
+ }
@@ -45,6 +45,11 @@ type Registration = {
45
45
  sigintListener: () => void;
46
46
  subscription?: Subscription;
47
47
  };
48
+ type WebhookRegistry = Map<string, {
49
+ method: string;
50
+ path: string;
51
+ options: any;
52
+ }>;
48
53
  /**
49
54
  * DurableInterpreter is an interpreter for executing Versori workflows with support for durable, queue-based workflow
50
55
  * execution. It supports all trigger types including the {@link workflow} trigger which allows workflows to be started
@@ -75,7 +80,8 @@ export declare class DurableInterpreter {
75
80
  private readonly contextProvider;
76
81
  private readonly webhookRouter;
77
82
  private readonly cronRouter;
78
- private readonly cronRegistry;
83
+ private cronRegistry;
84
+ private webhookRegistry;
79
85
  private readonly platformApi;
80
86
  private readonly cnxFetchFactory;
81
87
  private readonly cronProvider;
@@ -89,7 +95,7 @@ export declare class DurableInterpreter {
89
95
  private cronServer?;
90
96
  private shutdownServer?;
91
97
  private isShuttingDown;
92
- constructor(log: Logger, compiler: ObservableCompiler, contextProvider: ContextProvider, webhookRouter: Router, cronRouter: Router, cronRegistry: Map<string, string>, platformApi: PlatformApi, cnxFetchFactory: DirectConnectionFactory, cronProvider: CronProvider, tracer: Tracer, issue: IssueAPI, cfgReader: ConfigReader, queueProvider: QueueAPI, otelSDK?: NodeSDK | undefined);
98
+ constructor(log: Logger, compiler: ObservableCompiler, contextProvider: ContextProvider, webhookRouter: Router, cronRouter: Router, cronRegistry: Map<string, string>, webhookRegistry: WebhookRegistry, platformApi: PlatformApi, cnxFetchFactory: DirectConnectionFactory, cronProvider: CronProvider, tracer: Tracer, issue: IssueAPI, cfgReader: ConfigReader, queueProvider: QueueAPI, otelSDK?: NodeSDK | undefined);
93
99
  static newInstance(options?: DurableInterpreterOptions): Promise<DurableInterpreter>;
94
100
  register<O>(workflow: Workflow<O>, options?: DurableInterpreterOptions): Registration;
95
101
  start(): Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"DurableInterpreter.d.ts","sourceRoot":"","sources":["../../../../src/src/interpreter/durable/DurableInterpreter.ts"],"names":[],"mappings":"AAaA,OAAsB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG3D,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAClD,OAAgB,EAAqB,MAAM,EAAE,MAAM,SAAS,CAAC;AAE7D,OAAO,EAA+B,UAAU,EAAM,YAAY,EAAO,MAAM,MAAM,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AACtF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,eAAe,EAAuB,MAAM,kCAAkC,CAAC;AAExF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAuB,MAAM,yBAAyB,CAAC;AAe1F,OAAO,EAAE,QAAQ,EAAgB,MAAM,uBAAuB,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAa,MAAM,wBAAwB,CAAC;AAK7D,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,WAAW,EAAmB,MAAM,wCAAwC,CAAC;AACtF,OAAO,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAA0B,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,QAAQ,EAAa,MAAM,YAAY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