@dbos-inc/dbos-sdk 1.28.14-preview.g65f6845035 → 1.29.84-preview.gd5bdeb6a8d

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. package/dist/src/context.d.ts +36 -0
  2. package/dist/src/context.d.ts.map +1 -1
  3. package/dist/src/context.js +104 -1
  4. package/dist/src/context.js.map +1 -1
  5. package/dist/src/data_validation.d.ts.map +1 -1
  6. package/dist/src/data_validation.js +6 -2
  7. package/dist/src/data_validation.js.map +1 -1
  8. package/dist/src/dbos-executor.d.ts +36 -20
  9. package/dist/src/dbos-executor.d.ts.map +1 -1
  10. package/dist/src/dbos-executor.js +309 -21
  11. package/dist/src/dbos-executor.js.map +1 -1
  12. package/dist/src/dbos-runtime/runtime.d.ts +3 -8
  13. package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
  14. package/dist/src/dbos-runtime/runtime.js +7 -11
  15. package/dist/src/dbos-runtime/runtime.js.map +1 -1
  16. package/dist/src/dbos.d.ts +109 -0
  17. package/dist/src/dbos.d.ts.map +1 -0
  18. package/dist/src/dbos.js +551 -0
  19. package/dist/src/dbos.js.map +1 -0
  20. package/dist/src/debugger/debug_workflow.d.ts.map +1 -1
  21. package/dist/src/debugger/debug_workflow.js +5 -1
  22. package/dist/src/debugger/debug_workflow.js.map +1 -1
  23. package/dist/src/decorators.d.ts +11 -2
  24. package/dist/src/decorators.d.ts.map +1 -1
  25. package/dist/src/decorators.js +30 -8
  26. package/dist/src/decorators.js.map +1 -1
  27. package/dist/src/error.d.ts +6 -0
  28. package/dist/src/error.d.ts.map +1 -1
  29. package/dist/src/error.js +20 -2
  30. package/dist/src/error.js.map +1 -1
  31. package/dist/src/eventreceiver.d.ts +6 -2
  32. package/dist/src/eventreceiver.d.ts.map +1 -1
  33. package/dist/src/httpServer/handler.d.ts +0 -1
  34. package/dist/src/httpServer/handler.d.ts.map +1 -1
  35. package/dist/src/httpServer/handler.js +5 -13
  36. package/dist/src/httpServer/handler.js.map +1 -1
  37. package/dist/src/httpServer/middleware.d.ts +13 -2
  38. package/dist/src/httpServer/middleware.d.ts.map +1 -1
  39. package/dist/src/httpServer/middleware.js +101 -1
  40. package/dist/src/httpServer/middleware.js.map +1 -1
  41. package/dist/src/httpServer/server.d.ts +3 -2
  42. package/dist/src/httpServer/server.d.ts.map +1 -1
  43. package/dist/src/httpServer/server.js +40 -30
  44. package/dist/src/httpServer/server.js.map +1 -1
  45. package/dist/src/index.d.ts +2 -1
  46. package/dist/src/index.d.ts.map +1 -1
  47. package/dist/src/index.js +3 -3
  48. package/dist/src/index.js.map +1 -1
  49. package/dist/src/procedure.d.ts +1 -0
  50. package/dist/src/procedure.d.ts.map +1 -1
  51. package/dist/src/procedure.js.map +1 -1
  52. package/dist/src/scheduler/scheduler.d.ts.map +1 -1
  53. package/dist/src/scheduler/scheduler.js +3 -1
  54. package/dist/src/scheduler/scheduler.js.map +1 -1
  55. package/dist/src/system_database.d.ts.map +1 -1
  56. package/dist/src/system_database.js.map +1 -1
  57. package/dist/src/telemetry/logs.d.ts +11 -5
  58. package/dist/src/telemetry/logs.d.ts.map +1 -1
  59. package/dist/src/telemetry/logs.js +8 -11
  60. package/dist/src/telemetry/logs.js.map +1 -1
  61. package/dist/src/testing/testing_runtime.d.ts.map +1 -1
  62. package/dist/src/testing/testing_runtime.js +10 -4
  63. package/dist/src/testing/testing_runtime.js.map +1 -1
  64. package/dist/src/user_database.d.ts +1 -1
  65. package/dist/src/user_database.d.ts.map +1 -1
  66. package/dist/src/wfqueue.d.ts.map +1 -1
  67. package/dist/src/wfqueue.js +17 -2
  68. package/dist/src/wfqueue.js.map +1 -1
  69. package/dist/src/workflow.d.ts +7 -6
  70. package/dist/src/workflow.d.ts.map +1 -1
  71. package/dist/src/workflow.js +10 -187
  72. package/dist/src/workflow.js.map +1 -1
  73. package/dist/tsconfig.build.tsbuildinfo +1 -1
  74. package/package.json +5 -1
@@ -1 +1 @@
1
- {"version":3,"file":"handler.js","sourceRoot":"","sources":["../../../src/httpServer/handler.ts"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AElF,MAAM,QAAQ,GAAG,kBAAkB,CAAC,cAAc,CAAqB,CAAC;QACxE,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC;IAC9B,CAAC,CAAC;AACJ,CAAC;AAPD,8BAOC"}
@@ -1,9 +1,15 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node/http" />
1
3
  import Koa from "koa";
4
+ import { Request, Response, NextFunction } from "express";
5
+ import { IncomingHttpHeaders } from "http";
2
6
  import { ClassRegistration, RegistrationDefaults } from "../decorators";
7
+ import { Logger as DBOSLogger } from "../telemetry/logs";
3
8
  import { UserDatabaseClient } from "../user_database";
9
+ import { HTTPRequest } from "../context";
4
10
  import { Span } from "@opentelemetry/sdk-trace-base";
5
- import { Logger as DBOSLogger } from "../telemetry/logs";
6
- import { OpenAPIV3 as OpenApi3 } from 'openapi-types';
11
+ import { W3CTraceContextPropagator } from "@opentelemetry/core";
12
+ import { OpenAPIV3 as OpenApi3 } from "openapi-types";
7
13
  export interface MiddlewareContext {
8
14
  readonly koaContext: Koa.Context;
9
15
  readonly name: string;
@@ -71,5 +77,10 @@ type SecurityScheme = Exclude<OpenApi3.SecuritySchemeObject, OpenApi3.OAuth2Secu
71
77
  * affect runtime behavior of the app.
72
78
  */
73
79
  export declare function OpenApiSecurityScheme(securityScheme: SecurityScheme): <T extends new (...args: unknown[]) => object>(_ctor: T) => void;
80
+ export declare const RequestIDHeader = "X-Request-ID";
81
+ export declare function getOrGenerateRequestID(headers: IncomingHttpHeaders): string;
82
+ export declare function createHTTPSpan(request: HTTPRequest, httpTracer: W3CTraceContextPropagator): Span;
83
+ export declare function koaTracingMiddleware(ctx: Koa.Context, next: Koa.Next): Promise<void>;
84
+ export declare function expressTracingMiddleware(req: Request, res: Response, next: NextFunction): Promise<void>;
74
85
  export {};
75
86
  //# sourceMappingURL=middleware.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.d.ts","sourceRoot":"","sources":["../../../src/httpServer/middleware.ts"],"names":[],"mappings":"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,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,iBA4B7F"}
@@ -1,8 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OpenApiSecurityScheme = exports.KoaGlobalMiddleware = exports.KoaMiddleware = exports.KoaCors = exports.KoaBodyParser = exports.Authentication = exports.MiddlewareClassRegistration = void 0;
3
+ exports.expressTracingMiddleware = exports.koaTracingMiddleware = exports.createHTTPSpan = exports.getOrGenerateRequestID = exports.RequestIDHeader = exports.OpenApiSecurityScheme = exports.KoaGlobalMiddleware = exports.KoaMiddleware = exports.KoaCors = exports.KoaBodyParser = exports.Authentication = exports.MiddlewareClassRegistration = void 0;
4
4
  const decorators_1 = require("../decorators");
5
5
  const error_1 = require("../error");
6
+ const dbos_executor_1 = require("../dbos-executor");
7
+ const dbos_1 = require("../dbos");
8
+ const core_1 = require("@opentelemetry/core");
9
+ const api_1 = require("@opentelemetry/api");
10
+ const uuid_1 = require("uuid");
6
11
  class MiddlewareClassRegistration extends decorators_1.ClassRegistration {
7
12
  authMiddleware;
8
13
  koaBodyParser;
@@ -96,4 +101,99 @@ function OpenApiSecurityScheme(securityScheme) {
96
101
  return function (_ctor) { };
97
102
  }
98
103
  exports.OpenApiSecurityScheme = OpenApiSecurityScheme;
104
+ /////////////////////////////////
105
+ /* HTTP APP TRACING MIDDLEWARES */
106
+ /////////////////////////////////
107
+ exports.RequestIDHeader = "X-Request-ID";
108
+ function getOrGenerateRequestID(headers) {
109
+ const reqID = headers[exports.RequestIDHeader.toLowerCase()]; // RequestIDHeader is expected to be a single value, so we dismiss the possible string[] returned type.
110
+ if (reqID) {
111
+ return reqID;
112
+ }
113
+ const newID = (0, uuid_1.v4)();
114
+ headers[exports.RequestIDHeader.toLowerCase()] = newID; // This does not carry through the response
115
+ return newID;
116
+ }
117
+ exports.getOrGenerateRequestID = getOrGenerateRequestID;
118
+ function createHTTPSpan(request, httpTracer) {
119
+ // If present, retrieve the trace context from the request
120
+ const extractedSpanContext = api_1.trace.getSpanContext(httpTracer.extract(api_1.ROOT_CONTEXT, request.headers, api_1.defaultTextMapGetter));
121
+ let span;
122
+ const spanAttributes = {
123
+ operationType: dbos_executor_1.OperationType.HANDLER,
124
+ requestID: request.requestID,
125
+ requestIP: request.ip,
126
+ requestURL: request.url,
127
+ requestMethod: request.method,
128
+ };
129
+ if (extractedSpanContext === undefined) {
130
+ // request.url should be defined by now. Let's cast it to string
131
+ span = dbos_1.DBOS.executor.tracer.startSpan(request.url, spanAttributes);
132
+ }
133
+ else {
134
+ extractedSpanContext.isRemote = true;
135
+ span = dbos_1.DBOS.executor.tracer.startSpanWithContext(extractedSpanContext, request.url, spanAttributes);
136
+ }
137
+ return span;
138
+ }
139
+ exports.createHTTPSpan = createHTTPSpan;
140
+ async function koaTracingMiddleware(ctx, next) {
141
+ // Retrieve or generate the request ID
142
+ const requestID = getOrGenerateRequestID(ctx.request.headers);
143
+ // Attach it to the response headers (here through Koa's context)
144
+ ctx.set(exports.RequestIDHeader, requestID);
145
+ const request = {
146
+ headers: ctx.request.headers,
147
+ rawHeaders: ctx.req.rawHeaders,
148
+ params: ctx.params,
149
+ body: ctx.request.body,
150
+ rawBody: ctx.request.rawBody,
151
+ query: ctx.request.query,
152
+ querystring: ctx.request.querystring,
153
+ url: ctx.request.url,
154
+ ip: ctx.request.ip,
155
+ method: ctx.request.method,
156
+ requestID,
157
+ };
158
+ const httpTracer = new core_1.W3CTraceContextPropagator();
159
+ const span = createHTTPSpan(request, httpTracer);
160
+ await dbos_1.DBOS.withTracedContext(span, request, next);
161
+ httpTracer.inject(api_1.trace.setSpanContext(api_1.ROOT_CONTEXT, span.spanContext()), {
162
+ context: ctx,
163
+ }, {
164
+ set: (carrier, key, value) => {
165
+ carrier.context.set(key, value);
166
+ },
167
+ });
168
+ dbos_1.DBOS.executor.tracer.endSpan(span);
169
+ }
170
+ exports.koaTracingMiddleware = koaTracingMiddleware;
171
+ async function expressTracingMiddleware(req, res, next) {
172
+ // Retrieve or generate the request ID
173
+ const requestID = getOrGenerateRequestID(req.headers);
174
+ // Attach it to the response headers (here through Express's response)
175
+ res.setHeader(exports.RequestIDHeader, requestID);
176
+ const request = {
177
+ headers: req.headers,
178
+ rawHeaders: req.rawHeaders,
179
+ params: req.params,
180
+ body: req.body,
181
+ rawBody: req.rawBody,
182
+ // query: req.query,
183
+ querystring: req.url.split("?")[1],
184
+ url: req.url,
185
+ ip: req.ip,
186
+ method: req.method,
187
+ requestID,
188
+ };
189
+ const httpTracer = new core_1.W3CTraceContextPropagator();
190
+ const span = createHTTPSpan(request, httpTracer);
191
+ await dbos_1.DBOS.withTracedContext(span, request, next);
192
+ // We could probably define a context type and type the parameters in the set closure (see Koa middleware above)
193
+ httpTracer.inject(api_1.trace.setSpanContext(api_1.ROOT_CONTEXT, span.spanContext()), res, {
194
+ set: (_, header, value) => res.setHeader(header, value),
195
+ });
196
+ dbos_1.DBOS.executor.tracer.endSpan(span);
197
+ }
198
+ exports.expressTracingMiddleware = expressTracingMiddleware;
99
199
  //# sourceMappingURL=middleware.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../../src/httpServer/middleware.ts"],"names":[],"mappings":";;;AACA,8CAAsG;AACtG,oCAA4D;AA8C5D,MAAa,2BAA4E,SAAQ,8BAAqB;IACpH,cAAc,CAA0B;IACxC,aAAa,CAAkB;IAC/B,OAAO,CAAkB;IACzB,cAAc,CAAoB;IAClC,oBAAoB,CAAoB;IAExC,YAAY,IAAQ;QAClB,KAAK,CAAC,IAAI,CAAC,CAAC;IACd,CAAC;CACF;AAVD,kEAUC;AAED,iCAAiC;AACjC,iCAAiC;AACjC,iCAAiC;AAEjC;;GAEG;AACH,SAAgB,cAAc,CAAC,cAAsC;IACnE,IAAI,cAAc,KAAK,SAAS,EAAE,CAAC;QACjC,MAAM,IAAI,wCAAgC,CAAC,gBAAgB,CAAC,CAAC;IAC/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AAC,CAAC;IAEjD,MAAM,WAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,IAA2B,CAAC,CAAC;IAEzE,gHAAgH;IAChH,UAAU,CAAC,MAAM,CAAC,WAAK,CAAC,cAAc,CAAC,kBAAY,EAAE,IAAI,CAAC,WAAW,EAAE,CAAC,EAAE,GAAG,EAAE;QAC7E,GAAG,EAAE,CAAC,CAAC,EAAE,MAAc,EAAE,KAAa,EAAE,EAAE,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,KAAK,CAAC;KACxE,CAAC,CAAC;IACH,WAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACrC,CAAC;AA5BD,4DA4BC"}
@@ -15,7 +15,6 @@ export declare class DBOSHttpServer {
15
15
  readonly app: Koa;
16
16
  readonly adminApp: Koa;
17
17
  readonly applicationRouter: Router;
18
- readonly adminRouter: Router;
19
18
  readonly logger: Logger;
20
19
  /**
21
20
  * Create a Koa app.
@@ -23,6 +22,7 @@ export declare class DBOSHttpServer {
23
22
  * TODO: maybe call dbosExec.init() somewhere in this class?
24
23
  */
25
24
  constructor(dbosExec: DBOSExecutor);
25
+ static setupAdminApp(dbosExec: DBOSExecutor): Koa;
26
26
  /**
27
27
  * Register HTTP endpoints and attach to the app. Then start the server at the given port.
28
28
  * @param port
@@ -31,7 +31,8 @@ export declare class DBOSHttpServer {
31
31
  appServer: import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
32
32
  adminServer: import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
33
33
  }>;
34
- checkPortAvailability(port: number, host: string): Promise<void>;
34
+ static checkPortAvailabilityIPv4Ipv6(port: number, logger: Logger): Promise<void>;
35
+ static checkPortAvailability(port: number, host: string): Promise<void>;
35
36
  /**
36
37
  * Health check endpoint.
37
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../src/http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AC,sBAAsB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAUtE;;;OAGG;IACH,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAkBtE;;;OAGG;IACH,MAAM,CAAC,oBAAoB,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAalE;;;;OAIG;IACH,MAAM,CAAC,0BAA0B,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAWxE;;OAEG;IACH,MAAM,CAAC,0BAA0B,CAAC,QAAQ,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG;CAqOnF"}
@@ -38,6 +38,7 @@ const api_1 = require("@opentelemetry/api");
38
38
  const net = __importStar(require("net"));
39
39
  const perf_hooks_1 = require("perf_hooks");
40
40
  const utils_1 = require("../utils");
41
+ const context_1 = require("../context");
41
42
  exports.WorkflowUUIDHeader = "dbos-idempotency-key";
42
43
  exports.WorkflowRecoveryUrl = "/dbos-workflow-recovery";
43
44
  exports.HealthUrl = "/dbos-healthz";
@@ -48,7 +49,6 @@ class DBOSHttpServer {
48
49
  app;
49
50
  adminApp;
50
51
  applicationRouter;
51
- adminRouter;
52
52
  logger;
53
53
  /**
54
54
  * Create a Koa app.
@@ -58,37 +58,52 @@ class DBOSHttpServer {
58
58
  constructor(dbosExec) {
59
59
  this.dbosExec = dbosExec;
60
60
  this.applicationRouter = new router_1.default();
61
- this.adminRouter = new router_1.default();
62
61
  this.logger = dbosExec.logger;
63
62
  this.app = new koa_1.default();
64
- this.adminApp = new koa_1.default();
65
- this.adminApp.use((0, bodyparser_1.bodyParser)());
66
- this.adminApp.use((0, cors_1.default)());
67
- // Register HTTP endpoints.
68
- DBOSHttpServer.registerHealthEndpoint(this.dbosExec, this.adminRouter);
69
- DBOSHttpServer.registerRecoveryEndpoint(this.dbosExec, this.adminRouter);
70
- DBOSHttpServer.registerPerfEndpoint(this.dbosExec, this.adminRouter);
71
- DBOSHttpServer.registerDeactivateEndpoint(this.dbosExec, this.adminRouter);
72
- this.adminApp.use(this.adminRouter.routes()).use(this.adminRouter.allowedMethods());
63
+ this.adminApp = DBOSHttpServer.setupAdminApp(this.dbosExec);
73
64
  DBOSHttpServer.registerDecoratedEndpoints(this.dbosExec, this.applicationRouter, this.app);
74
65
  this.app.use(this.applicationRouter.routes()).use(this.applicationRouter.allowedMethods());
75
66
  }
67
+ static setupAdminApp(dbosExec) {
68
+ const adminRouter = new router_1.default();
69
+ const adminApp = new koa_1.default();
70
+ adminApp.use((0, bodyparser_1.bodyParser)());
71
+ adminApp.use((0, cors_1.default)());
72
+ // Register HTTP endpoints.
73
+ DBOSHttpServer.registerHealthEndpoint(dbosExec, adminRouter);
74
+ DBOSHttpServer.registerRecoveryEndpoint(dbosExec, adminRouter);
75
+ DBOSHttpServer.registerPerfEndpoint(dbosExec, adminRouter);
76
+ DBOSHttpServer.registerDeactivateEndpoint(dbosExec, adminRouter);
77
+ adminApp.use(adminRouter.routes()).use(adminRouter.allowedMethods());
78
+ return adminApp;
79
+ }
76
80
  /**
77
81
  * Register HTTP endpoints and attach to the app. Then start the server at the given port.
78
82
  * @param port
79
83
  */
80
84
  async listen(port, adminPort) {
85
+ await DBOSHttpServer.checkPortAvailabilityIPv4Ipv6(port, this.logger);
86
+ // TODO we should check adminPort as well.
87
+ const appServer = this.app.listen(port, () => {
88
+ this.logger.info(`DBOS Server is running at http://localhost:${port}`);
89
+ });
90
+ const adminServer = this.adminApp.listen(adminPort, () => {
91
+ this.logger.info(`DBOS Admin Server is running at http://localhost:${adminPort}`);
92
+ });
93
+ return { appServer: appServer, adminServer: adminServer };
94
+ }
95
+ static async checkPortAvailabilityIPv4Ipv6(port, logger) {
81
96
  try {
82
97
  await this.checkPortAvailability(port, "127.0.0.1");
83
98
  }
84
99
  catch (error) {
85
100
  const err = error;
86
- if (err.code === 'EADDRINUSE') {
87
- this.logger.error(`Port ${port} is already used for IPv4 address "127.0.0.1". Please use the -p option to choose another port.\n${err.message}`);
101
+ if (err.code === "EADDRINUSE") {
102
+ logger.error(`Port ${port} is already used for IPv4 address "127.0.0.1". Please use the -p option to choose another port.\n${err.message}`);
88
103
  process.exit(1);
89
104
  }
90
105
  else {
91
- this.logger.warn(`Error occurred while checking port availability for IPv4 address "127.0.0.1" : ${err.code}\n${err.message}`);
106
+ logger.warn(`Error occurred while checking port availability for IPv4 address "127.0.0.1" : ${err.code}\n${err.message}`);
92
107
  }
93
108
  }
94
109
  try {
@@ -96,23 +111,16 @@ class DBOSHttpServer {
96
111
  }
97
112
  catch (error) {
98
113
  const err = error;
99
- if (err.code === 'EADDRINUSE') {
100
- this.logger.error(`Port ${port} is already used for IPv6 address "::1". Please use the -p option to choose another port.\n${err.message}`);
114
+ if (err.code === "EADDRINUSE") {
115
+ logger.error(`Port ${port} is already used for IPv6 address "::1". Please use the -p option to choose another port.\n${err.message}`);
101
116
  process.exit(1);
102
117
  }
103
118
  else {
104
- this.logger.warn(`Error occurred while checking port availability for IPv6 address "::1" : ${err.code}\n${err.message}`);
119
+ logger.warn(`Error occurred while checking port availability for IPv6 address "::1" : ${err.code}\n${err.message}`);
105
120
  }
106
121
  }
107
- const appServer = this.app.listen(port, () => {
108
- this.logger.info(`DBOS Server is running at http://localhost:${port}`);
109
- });
110
- const adminServer = this.adminApp.listen(adminPort, () => {
111
- this.logger.info(`DBOS Admin Server is running at http://localhost:${adminPort}`);
112
- });
113
- return { appServer: appServer, adminServer: adminServer };
114
122
  }
115
- async checkPortAvailability(port, host) {
123
+ static async checkPortAvailability(port, host) {
116
124
  return new Promise((resolve, reject) => {
117
125
  const server = new net.Server();
118
126
  server.on('error', (error) => {
@@ -180,12 +188,12 @@ class DBOSHttpServer {
180
188
  static registerDeactivateEndpoint(dbosExec, router) {
181
189
  const deactivateHandler = async (koaCtxt, koaNext) => {
182
190
  await dbosExec.deactivateEventReceivers();
183
- dbosExec.logger.info("Deactivating Event Recievers");
191
+ dbosExec.logger.info("Deactivating Event Receivers");
184
192
  koaCtxt.body = "Deactivated";
185
193
  await koaNext();
186
194
  };
187
195
  router.get(exports.DeactivateUrl, deactivateHandler);
188
- dbosExec.logger.info(`DBOS Server deactivate GET ${exports.DeactivateUrl}`);
196
+ dbosExec.logger.debug(`DBOS Server Registered Deactivate GET ${exports.DeactivateUrl}`);
189
197
  }
190
198
  /**
191
199
  * Register decorated functions as HTTP endpoints.
@@ -325,7 +333,11 @@ class DBOSHttpServer {
325
333
  }
326
334
  else {
327
335
  // Directly invoke the handler code.
328
- const retValue = await ro.invoke(undefined, [oc, ...args]);
336
+ let cresult;
337
+ await (0, context_1.runWithDBOSContext)(oc, async () => {
338
+ cresult = await ro.invoke(undefined, [oc, ...args]);
339
+ });
340
+ const retValue = cresult;
329
341
  // Set the body to the return value unless the body is already set by the handler.
330
342
  if (koaCtxt.body === undefined) {
331
343
  koaCtxt.body = retValue;
@@ -371,8 +383,6 @@ class DBOSHttpServer {
371
383
  },
372
384
  });
373
385
  dbosExec.tracer.endSpan(oc.span);
374
- // Add requestID to response headers.
375
- koaCtxt.set(handler_1.RequestIDHeader, oc.request.requestID);
376
386
  await koaNext();
377
387
  }
378
388
  };
@@ -1 +1 @@
1
- {"version":3,"file":"server.js","sourceRoot":"","sources":["../../../src/httpServer/server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,8CAAmC;AACnC,yDAAiC;AACjC,gDAA6C;AAC7C,qDAA6B;AAC7B,uCAImB;AACnB,iDAAsD;AAGtD,oCAKkB;AAIlB,4CAAyE;AAEzE,yCAA2B;AAC3B,2CAAyC;AACzC,oCAA0D;AAE7C,QAAA,kBAAkB,GAAG,sBAAsB,CAAC;AAC5C,QAAA,mBAAmB,GAAG,yBAAyB,CAAA;AAC/C,QAAA,SAAS,GAAG,eAAe,CAAA;AAC3B,QAAA,OAAO,GAAG,YAAY,CAAA;AACtB,QAAA,aAAa,GAAG,a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gCAAgC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;wBACnE,MAAM;oBACR,KAAK,uBAAQ,CAAC,MAAM;wBAClB,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;wBACzC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;wBACpE,MAAM;oBACR;wBACE,IAAA,4BAAoB,EAAC,EAAE,CAAC,OAAO,CAAC,CAAA;gBACpC,CAAC;YACH,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AA/YD,wCA+YC"}
@@ -14,7 +14,8 @@ export { Kafka, KafkaConsume, } from "./kafka/kafka";
14
14
  export { SchedulerMode, SchedulerConfig, Scheduled, } from "./scheduler/scheduler";
15
15
  export { DBOSEventReceiver, DBOSEventReceiverRegistration, DBOSExecutorContext, DBNotification, DBNotificationListener, DBOSEventReceiverQuery, DBOSEventReceiverState, } from "./eventreceiver";
16
16
  export { ParseOptions, parseConfigFile, } from "./dbos-runtime/config";
17
- export { DBOSRuntimeConfig, DBOS, } from "./dbos-runtime/runtime";
17
+ export { DBOSRuntimeConfig, } from "./dbos-runtime/runtime";
18
18
  export { DBOSConfig, } from "./dbos-executor";
19
19
  export { WorkflowQueue, } from "./wfqueue";
20
+ export { DBOS, } from "./dbos";
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,cAAc,GACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,aAAa,CAAC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,EACd,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,YAAY,EACZ,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,IAAI,GACL,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,UAAU,GACX,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,aAAa,GACd,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,cAAc,GACf,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,WAAW,EACX,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,sBAAsB,EACtB,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAErB,OAAO,EACL,eAAe,EACf,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,WAAW,IAAI,mBAAmB,EAClC,UAAU,IAAI,kBAAkB,EAChC,YAAY,IAAI,oBAAoB,EACpC,WAAW,EACX,UAAU,EACV,YAAY,GACb,MAAM,QAAQ,CAAC;AAEhB,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC;AAEjC,OAAO,EACL,iBAAiB,EAClB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,QAAQ,EAGR,WAAW,EACX,WAAW,EACX,WAAW,EACX,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,EAGV,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,EAElB,WAAW,EAGX,kBAAkB,EAClB,iBAAiB,EAGjB,WAAW,EACX,QAAQ,EACR,IAAI,EACJ,IAAI,IAAI,YAAY,EACpB,eAAe,EACf,YAAY,EACZ,eAAe,EACf,UAAU,EAGV,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,UAAU,GACX,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EACL,cAAc,EAGd,SAAS,EAGT,MAAM,EACN,OAAO,EACP,QAAQ,EACR,MAAM,EACN,SAAS,EACV,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,iBAAiB,EAGjB,cAAc,EACd,aAAa,EACb,OAAO,EACP,mBAAmB,EACnB,aAAa,EAGb,qBAAqB,EACtB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACL,KAAK,EACL,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,aAAa,EACb,eAAe,EACf,SAAS,GACV,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,EACjB,6BAA6B,EAC7B,mBAAmB,EACnB,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EACL,YAAY,EACZ,eAAe,GAChB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,iBAAiB,GAClB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,UAAU,GACX,MAAM,iBAAiB,CAAA;AAExB,OAAO,EACL,aAAa,GACd,MAAM,WAAW,CAAA;AAElB,OAAO,EACL,IAAI,GACL,MAAM,QAAQ,CAAA"}
package/dist/src/index.js CHANGED
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.WorkflowQueue = exports.DBOS = exports.parseConfigFile = exports.Scheduled = exports.SchedulerConfig = exports.SchedulerMode = exports.KafkaConsume = exports.Kafka = exports.OpenApiSecurityScheme = exports.KoaMiddleware = exports.KoaGlobalMiddleware = exports.KoaCors = exports.KoaBodyParser = exports.Authentication = exports.DeleteApi = exports.PutApi = exports.PatchApi = exports.PostApi = exports.GetApi = exports.ArgSource = exports.ArgSources = exports.associateClassWithEventReceiver = exports.associateMethodWithEventReceiver = exports.DBOSDeploy = exports.DBOSInitializer = exports.RequiredRole = exports.StoredProcedure = exports.Communicator = exports.Step = exports.Workflow = exports.Transaction = exports.configureInstance = exports.ConfiguredInstance = exports.OrmEntities = exports.DefaultArgOptional = exports.DefaultArgRequired = exports.DefaultRequiredRole = exports.ArgVarchar = exports.ArgDate = exports.ArgName = exports.LogMask = exports.SkipLogging = exports.ArgOptional = exports.ArgRequired = exports.LogMasks = exports.DBOSResponseError = exports.Error = exports.StatusString = exports.InitContext = exports.createTestingRuntime = void 0;
26
+ exports.DBOS = exports.WorkflowQueue = exports.parseConfigFile = exports.Scheduled = exports.SchedulerConfig = exports.SchedulerMode = exports.KafkaConsume = exports.Kafka = exports.OpenApiSecurityScheme = exports.KoaMiddleware = exports.KoaGlobalMiddleware = exports.KoaCors = exports.KoaBodyParser = exports.Authentication = exports.DeleteApi = exports.PutApi = exports.PatchApi = exports.PostApi = exports.GetApi = exports.ArgSource = exports.ArgSources = exports.associateClassWithEventReceiver = exports.associateMethodWithEventReceiver = exports.DBOSDeploy = exports.DBOSInitializer = exports.RequiredRole = exports.StoredProcedure = exports.Communicator = exports.Step = exports.Workflow = exports.Transaction = exports.configureInstance = exports.ConfiguredInstance = exports.OrmEntities = exports.DefaultArgOptional = exports.DefaultArgRequired = exports.DefaultRequiredRole = exports.ArgVarchar = exports.ArgDate = exports.ArgName = exports.LogMask = exports.SkipLogging = exports.ArgOptional = exports.ArgRequired = exports.LogMasks = exports.DBOSResponseError = exports.Error = exports.StatusString = exports.InitContext = exports.createTestingRuntime = void 0;
27
27
  var testing_runtime_1 = require("./testing/testing_runtime");
28
28
  Object.defineProperty(exports, "createTestingRuntime", { enumerable: true, get: function () { return testing_runtime_1.createTestingRuntime; } });
29
29
  var context_1 = require("./context");
@@ -93,8 +93,8 @@ Object.defineProperty(exports, "SchedulerConfig", { enumerable: true, get: funct
93
93
  Object.defineProperty(exports, "Scheduled", { enumerable: true, get: function () { return scheduler_1.Scheduled; } });
94
94
  var config_1 = require("./dbos-runtime/config");
95
95
  Object.defineProperty(exports, "parseConfigFile", { enumerable: true, get: function () { return config_1.parseConfigFile; } });
96
- var runtime_1 = require("./dbos-runtime/runtime");
97
- Object.defineProperty(exports, "DBOS", { enumerable: true, get: function () { return runtime_1.DBOS; } });
98
96
  var wfqueue_1 = require("./wfqueue");
99
97
  Object.defineProperty(exports, "WorkflowQueue", { enumerable: true, get: function () { return wfqueue_1.WorkflowQueue; } });
98
+ var dbos_1 = require("./dbos");
99
+ Object.defineProperty(exports, "DBOS", { enumerable: true, get: function () { return dbos_1.DBOS; } });
100
100
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6DAGmC;AAFjC,uHAAA,oBAAoB,OAAA;AAItB,qCAGmB;AADjB,sGAAA,WAAW,OAAA;AAcb,uCAQoB;AAHlB,wGAAA,YAAY,OAAA;AAcd,iDAAiC;AAEjC,iCAEiB;AADf,0GAAA,iBAAiB,OAAA;AAGnB,2CAoCsB;AAnCpB,sGAAA,QAAQ,OAAA;AAER,uBAAuB;AACvB,yGAAA,WAAW,OAAA;AACX,yGAAA,WAAW,OAAA;AACX,yGAAA,WAAW,OAAA;AACX,qGAAA,OAAO,OAAA;AACP,qGAAA,OAAO,OAAA;AACP,qGAAA,OAAO,OAAA;AACP,wGAAA,UAAU,OAAA;AAEV,mBAAmB;AACnB,iHAAA,mBAAmB,OAAA;AACnB,gHAAA,kBAAkB,OAAA;AAClB,gHAAA,kBAAkB,OAAA;AAClB,2BAA2B;AAC3B,yGAAA,WAAW,OAAA;AAEX,kBAAkB;AAClB,gHAAA,kBAAkB,OAAA;A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AFrB,8FAAA,KAAK,OAAA;AACL,qGAAA,YAAY,OAAA;AAGd,mDAI+B;AAH7B,0GAAA,aAAa,OAAA;AACb,4GAAA,eAAe,OAAA;AACf,sGAAA,SAAS,OAAA;AAaX,gDAG+B;AAD7B,yGAAA,eAAe,OAAA;AAWjB,qCAEkB;AADhB,wGAAA,aAAa,OAAA;AAGf,+BAEe;AADb,4FAAA,IAAI,OAAA"}
@@ -18,6 +18,7 @@ export interface QueryResult<R extends QueryResultRow> extends QueryResultBase {
18
18
  rows: R[];
19
19
  }
20
20
  export type StoredProcedure<R> = (ctxt: StoredProcedureContext, ...args: unknown[]) => Promise<R>;
21
+ export type StoredProcedureFunc<R> = StoredProcedure<R>;
21
22
  export interface StoredProcedureContext extends Pick<DBOSContext, 'request' | 'workflowUUID' | 'authenticatedUser' | 'assumedRole' | 'authenticatedRoles' | 'logger'> {
22
23
  query<R extends QueryResultRow>(sql: string, ...params: unknown[]): Promise<QueryResult<R>>;
23
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"procedure.d.ts","sourceRoot":"","sources":["../../src/procedure.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,MAAM,WA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EAAE,MAAM,EACd,aAAa,EAAE,MAAM;IAIjB,KAAK,CAAC,CAAC,SAAS,cAAc,EAAE,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;CAI/F"}
@@ -1 +1 @@
1
- {"version":3,"file":"procedure.js","sourceRoot":"","sources":["../../src/procedure.ts"],"names":[],"mappings":";;;AAAA,uCAAyD;AA+BzD,MAAa,0BAA2B,SAAQ,yBAAe;IAElD;IADX,YACW,MAAkB,EAC3B,eAA2D,EAC3D,IAAU,EACV,MAAc,EACd,aAAqB;QAErB,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAN3C,WAAM,GAAN,MAAM,CAAY;IAO7B,CAAC;IACD,KAAK,CAAC,KAAK,CAA2B,GAAW,EAAE,MAAiB;QAClE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;QACnE,OAAO,EAAE,QAAQ,EAAE,QAAQ,IAAI,IAAI,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC;IACrD,CAAC;CACF;AAdD,gEAcC"}
1
+ {"version":3,"file":"procedure.js","sourceRoot":"","sources":["../../src/procedure.ts"],"names":[],"mappings":";;;AAAA,uCAAyD;AAgCzD,MAAa,0BAA2B,SAAQ,yBAAe;IAElD;IADX,YACW,MAAkB,EAC3B,eAA2D,EAC3D,IAAU,EACV,MAAc,EACd,aAAqB;QAErB,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAN3C,WAAM,GAAN,MAAM,CAAY;IAO7B,CAAC;IACD,KAAK,CAAC,KAAK,CAA2B,GAAW,EAAE,MAAiB;QAClE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM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GAAG,EAAE,GAAG,IAAI,EAAE,aAAa,KAAK,QAAQ,MAAM,CAAC,CAAC,oGAS/G;AAMD,qBAAa,aAAa;IACV,QAAQ,CAAC,QAAQ,EAAE,YAAY;gBAAtB,QAAQ,EAAE,YAAY;IAI3C,UAAU,EAAE,cAAc,EAAE,CAAM;IAClC,UAAU,EAAE,OAAO,CAAC,IAAI,CAAC,EAAG,CAAM;IAElC,aAAa;IAiBP,gBAAgB;IActB,+BAA+B;CAUlC;AAID,cAAM,cAAc;IAOJ,QAAQ,CAAC,QAAQ,EAAE,YAAY;IAAE,QAAQ,CAAC,OAAO,EAAE,MAAM;IAAE,QAAQ,CAAC,SAAS,EAAC,aAAa;IAC3F,QAAQ,CAAC,eAAe,EAAE,yBAAyB;IAAE,QAAQ,CAAC,SAAS,CAAC;IAPpF,OAAO,CAAC,SAAS,CAAkB;IACnC,OAAO,CAAC,gBAAgB,CAAC,CAAa;IACtC,OAAO,CAAC,QAAQ,CAAO;IACvB,OAAO,CAAC,WAAW,CAAc;IACjC,OAAO,CAAC,mBAAmB,CAAS;gBAEf,QAAQ,EAAE,YAAY,EAAW,OAAO,EAAE,MAAM,EAAW,SAAS,EAAC,aAAa,EAClF,eAAe,EAAE,yBAAyB,EAAW,SAAS,CAAC,oBAAQ;IAQtF,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAgFhC,eAAe;CAOlB"}
@@ -140,7 +140,9 @@ class DetachableLoop {
140
140
  // Init workflow
141
141
  const workflowUUID = `sched-${this.scheduledMethodName}-${nextExecTime.toISOString()}`;
142
142
  this.dbosExec.logger.debug(`Executing scheduled workflow ${workflowUUID}`);
143
- const wfParams = { workflowUUID: workflowUUID, configuredInstance: null, queueName: this.queueName };
143
+ const wfParams = {
144
+ workflowUUID: workflowUUID, configuredInstance: null, queueName: this.queueName,
145
+ };
144
146
  // All operations annotated with Scheduled decorators must take in these four
145
147
  const args = [nextExecTime, new Date()];
146
148
  // We currently only support scheduled workflows
@@ -1 +1 @@
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