@dbos-inc/koa-serve 2.11.6-preview.gcb74958171

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/README.md ADDED
@@ -0,0 +1 @@
1
+ # DBOS HTTP Integration
@@ -0,0 +1,76 @@
1
+ /// <reference types="node" />
2
+ /// <reference types="node" />
3
+ /// <reference types="node/http" />
4
+ import { IncomingHttpHeaders } from 'http';
5
+ import { ParsedUrlQuery } from 'querystring';
6
+ import { DBOSLifecycleCallback, MethodParameter } from '@dbos-inc/dbos-sdk';
7
+ export declare enum APITypes {
8
+ GET = "GET",
9
+ POST = "POST",
10
+ PUT = "PUT",
11
+ PATCH = "PATCH",
12
+ DELETE = "DELETE"
13
+ }
14
+ export declare enum ArgSources {
15
+ AUTO = "AUTO",// Look both places
16
+ DEFAULT = "DEFAULT",// Look in the standard place for the method
17
+ BODY = "BODY",// Look in body only
18
+ QUERY = "QUERY"
19
+ }
20
+ export interface DBOSHTTPAuthReturn {
21
+ authenticatedUser: string;
22
+ authenticatedRoles: string[];
23
+ }
24
+ export interface DBOSHTTPReg {
25
+ apiURL: string;
26
+ apiType: APITypes;
27
+ }
28
+ export interface DBOSHTTPMethodInfo {
29
+ registrations?: DBOSHTTPReg[];
30
+ }
31
+ export interface DBOSHTTPArgInfo {
32
+ argSource?: ArgSources;
33
+ }
34
+ /**
35
+ * HTTPRequest includes useful information from http.IncomingMessage and parsed body,
36
+ * URL parameters, and parsed query string.
37
+ * In essence, it is the serializable part of the request.
38
+ */
39
+ export interface DBOSHTTPRequest {
40
+ readonly headers?: IncomingHttpHeaders;
41
+ readonly rawHeaders?: string[];
42
+ readonly params?: unknown;
43
+ readonly body?: unknown;
44
+ readonly rawBody?: string;
45
+ readonly query?: ParsedUrlQuery;
46
+ readonly querystring?: string;
47
+ readonly url?: string;
48
+ readonly method?: string;
49
+ readonly ip?: string;
50
+ readonly requestID?: string;
51
+ }
52
+ export declare const DBOSHTTP = "dboshttp";
53
+ export declare const WorkflowIDHeader = "dbos-idempotency-key";
54
+ export declare const RequestIDHeader = "X-Request-ID";
55
+ export declare function getOrGenerateRequestID(headers: IncomingHttpHeaders): string;
56
+ export declare function isClientRequestError(e: Error): boolean;
57
+ export declare class DBOSHTTPBase extends DBOSLifecycleCallback {
58
+ static HTTP_OPERATION_TYPE: string;
59
+ static get httpRequest(): DBOSHTTPRequest;
60
+ httpApiDec(verb: APITypes, url: string): <This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
61
+ /** Decorator indicating that the method is the target of HTTP GET operations for `url` */
62
+ getApi(url: string): <This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
63
+ /** Decorator indicating that the method is the target of HTTP POST operations for `url` */
64
+ postApi(url: string): <This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
65
+ /** Decorator indicating that the method is the target of HTTP PUT operations for `url` */
66
+ putApi(url: string): <This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
67
+ /** Decorator indicating that the method is the target of HTTP PATCH operations for `url` */
68
+ patchApi(url: string): <This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
69
+ /** Decorator indicating that the method is the target of HTTP DELETE operations for `url` */
70
+ deleteApi(url: string): <This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
71
+ /** Parameter decorator indicating which source to use (URL, BODY, etc) for arg data */
72
+ argSource(source: ArgSources): (target: object, propertyKey: string | symbol, parameterIndex: number) => void;
73
+ getArgSource(arg: MethodParameter): ArgSources;
74
+ logRegisteredEndpoints(): void;
75
+ }
76
+ //# sourceMappingURL=dboshttp.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dboshttp.d.ts","sourceRoot":"","sources":["../../src/dboshttp.ts"],"names":[],"mappings":";;;AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAEL,qBAAqB,EAErB,eAAe,EAEhB,MAAM,oBAAoB,CAAC;AAE5B,oBAAY,QAAQ;IAClB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,GAAG,QAAQ;IACX,KAAK,UAAU;IACf,MAAM,WAAW;CAClB;AAED,oBAAY,UAAU;IACpB,IAAI,SAAS,CAAE,mBAAmB;IAClC,OAAO,YAAY,CAAE,4CAA4C;IACjE,IAAI,SAAS,CAAE,oBAAoB;IACnC,KAAK,UAAU;CAChB;AAED,MAAM,WAAW,kBAAkB;IACjC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,EAAE,CAAC;CAC9B;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,QAAQ,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,aAAa,CAAC,EAAE,WAAW,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,eAAe;IAC9B,SAAS,CAAC,EAAE,UAAU,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,CAAC;IAC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AC1F,MAAM,CAAC,GAAG,EAAE,MAAM;IAIlB,4FAA4F;IAC5F,QAAQ,CAAC,GAAG,EAAE,MAAM;IAIpB,6FAA6F;IAC7F,SAAS,CAAC,GAAG,EAAE,MAAM;IAIrB,uFAAuF;IACvF,SAAS,CAAC,MAAM,EAAE,UAAU,YACD,MAAM,eAAe,MAAM,GAAG,MAAM,kBAAkB,MAAM;IAgBvF,YAAY,CAAC,GAAG,EAAE,eAAe;IAKxB,sBAAsB,IAAI,IAAI;CAkBxC"}
@@ -0,0 +1,122 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DBOSHTTPBase = exports.isClientRequestError = exports.getOrGenerateRequestID = exports.RequestIDHeader = exports.WorkflowIDHeader = exports.DBOSHTTP = exports.ArgSources = exports.APITypes = void 0;
4
+ const node_crypto_1 = require("node:crypto");
5
+ const dbos_sdk_1 = require("@dbos-inc/dbos-sdk");
6
+ var APITypes;
7
+ (function (APITypes) {
8
+ APITypes["GET"] = "GET";
9
+ APITypes["POST"] = "POST";
10
+ APITypes["PUT"] = "PUT";
11
+ APITypes["PATCH"] = "PATCH";
12
+ APITypes["DELETE"] = "DELETE";
13
+ })(APITypes || (exports.APITypes = APITypes = {}));
14
+ var ArgSources;
15
+ (function (ArgSources) {
16
+ ArgSources["AUTO"] = "AUTO";
17
+ ArgSources["DEFAULT"] = "DEFAULT";
18
+ ArgSources["BODY"] = "BODY";
19
+ ArgSources["QUERY"] = "QUERY";
20
+ })(ArgSources || (exports.ArgSources = ArgSources = {}));
21
+ exports.DBOSHTTP = 'dboshttp';
22
+ exports.WorkflowIDHeader = 'dbos-idempotency-key';
23
+ exports.RequestIDHeader = 'X-Request-ID';
24
+ function getOrGenerateRequestID(headers) {
25
+ const reqID = headers[exports.RequestIDHeader.toLowerCase()]; // RequestIDHeader is expected to be a single value, so we dismiss the possible string[] returned type.
26
+ if (reqID) {
27
+ return reqID;
28
+ }
29
+ const newID = (0, node_crypto_1.randomUUID)();
30
+ headers[exports.RequestIDHeader.toLowerCase()] = newID; // This does not carry through the response
31
+ return newID;
32
+ }
33
+ exports.getOrGenerateRequestID = getOrGenerateRequestID;
34
+ function isClientRequestError(e) {
35
+ return dbos_sdk_1.Error.isDataValidationError(e);
36
+ }
37
+ exports.isClientRequestError = isClientRequestError;
38
+ class DBOSHTTPBase extends dbos_sdk_1.DBOSLifecycleCallback {
39
+ static HTTP_OPERATION_TYPE = 'http';
40
+ static get httpRequest() {
41
+ const req = dbos_sdk_1.DBOS.requestObject();
42
+ if (req === undefined) {
43
+ throw new TypeError('`DBOSHTTP.httpRequest` accessed from outside of HTTP requests');
44
+ }
45
+ return req;
46
+ }
47
+ httpApiDec(verb, url) {
48
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
49
+ const er = this;
50
+ return function apidec(target, propertyKey, descriptor) {
51
+ const { registration, regInfo } = dbos_sdk_1.DBOS.associateFunctionWithInfo(er, descriptor.value, {
52
+ classOrInst: target,
53
+ name: propertyKey,
54
+ });
55
+ const handlerRegistration = regInfo;
56
+ if (!handlerRegistration.registrations)
57
+ handlerRegistration.registrations = [];
58
+ handlerRegistration.registrations.push({
59
+ apiURL: url,
60
+ apiType: verb,
61
+ });
62
+ (0, dbos_sdk_1.requestArgValidation)(registration);
63
+ return descriptor;
64
+ };
65
+ }
66
+ /** Decorator indicating that the method is the target of HTTP GET operations for `url` */
67
+ getApi(url) {
68
+ return this.httpApiDec(APITypes.GET, url);
69
+ }
70
+ /** Decorator indicating that the method is the target of HTTP POST operations for `url` */
71
+ postApi(url) {
72
+ return this.httpApiDec(APITypes.POST, url);
73
+ }
74
+ /** Decorator indicating that the method is the target of HTTP PUT operations for `url` */
75
+ putApi(url) {
76
+ return this.httpApiDec(APITypes.PUT, url);
77
+ }
78
+ /** Decorator indicating that the method is the target of HTTP PATCH operations for `url` */
79
+ patchApi(url) {
80
+ return this.httpApiDec(APITypes.PATCH, url);
81
+ }
82
+ /** Decorator indicating that the method is the target of HTTP DELETE operations for `url` */
83
+ deleteApi(url) {
84
+ return this.httpApiDec(APITypes.DELETE, url);
85
+ }
86
+ /** Parameter decorator indicating which source to use (URL, BODY, etc) for arg data */
87
+ argSource(source) {
88
+ return function (target, propertyKey, parameterIndex) {
89
+ const curParam = dbos_sdk_1.DBOS.associateParamWithInfo(exports.DBOSHTTP,
90
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
91
+ Object.getOwnPropertyDescriptor(target, propertyKey).value, {
92
+ classOrInst: target,
93
+ name: propertyKey.toString(),
94
+ param: parameterIndex,
95
+ });
96
+ curParam.argSource = source;
97
+ };
98
+ }
99
+ getArgSource(arg) {
100
+ const arginfo = arg.getRegisteredInfo(exports.DBOSHTTP);
101
+ return arginfo?.argSource ?? ArgSources.AUTO;
102
+ }
103
+ logRegisteredEndpoints() {
104
+ dbos_sdk_1.DBOS.logger.info('HTTP endpoints supported:');
105
+ const eps = dbos_sdk_1.DBOS.getAssociatedInfo(this);
106
+ for (const e of eps) {
107
+ const { methodConfig, methodReg } = e;
108
+ const httpmethod = methodConfig;
109
+ for (const ro of httpmethod.registrations ?? []) {
110
+ if (ro.apiURL) {
111
+ dbos_sdk_1.DBOS.logger.info(' ' + ro.apiType.padEnd(6) + ' : ' + ro.apiURL);
112
+ const roles = methodReg.getRequiredRoles();
113
+ if (roles.length > 0) {
114
+ dbos_sdk_1.DBOS.logger.info(' Required Roles: ' + JSON.stringify(roles));
115
+ }
116
+ }
117
+ }
118
+ }
119
+ }
120
+ }
121
+ exports.DBOSHTTPBase = DBOSHTTPBase;
122
+ //# sourceMappingURL=dboshttp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dboshttp.js","sourceRoot":"","sources":["../../src/dboshttp.ts"],"names":[],"mappings":";;;AAEA,6CAAyC;AAEzC,iDAM4B;AAE5B,IAAY,QAMX;AAND,WAAY,QAAQ;IAClB,uBAAW,CAAA;IACX,yBAAa,CAAA;IACb,uBAAW,CAAA;IACX,2BAAe,CAAA;IACf,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C,EAAE,CAAC;wBACrB,eAAI,CAAC,MAAM,CAAC,IAAI,CAAC,0BAA0B,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC;oBACvE,CAAC;gBACH,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;;AApGH,oCAqGC"}
@@ -0,0 +1,54 @@
1
+ /// <reference types="koa__router" />
2
+ import Koa from 'koa';
3
+ import Router from '@koa/router';
4
+ import { DBOSHTTPAuthReturn, DBOSHTTPBase } from './dboshttp';
5
+ export interface DBOSKoaAuthContext {
6
+ readonly koaContext: Koa.Context;
7
+ readonly name: string;
8
+ readonly requiredRole: string[];
9
+ }
10
+ /**
11
+ * Authentication middleware that executes before a request reaches a function.
12
+ * This is expected to:
13
+ * - Validate the request found in the handler context and extract auth information from the request.
14
+ * - Map the HTTP request to the user identity and roles defined in app.
15
+ * If this succeeds, return the current authenticated user and a list of roles.
16
+ * If any step fails, throw an error.
17
+ */
18
+ export type DBOSKoaAuthMiddleware = (ctx: DBOSKoaAuthContext) => Promise<DBOSHTTPAuthReturn | void>;
19
+ export interface DBOSKoaConfig {
20
+ corsMiddleware?: boolean;
21
+ credentials?: boolean;
22
+ allowedOrigins?: string[];
23
+ }
24
+ export interface DBOSKoaClassReg {
25
+ authMiddleware?: DBOSKoaAuthMiddleware;
26
+ koaBodyParser?: Koa.Middleware;
27
+ koaCors?: Koa.Middleware;
28
+ koaMiddlewares?: Koa.Middleware[];
29
+ koaGlobalMiddlewares?: Koa.Middleware[];
30
+ }
31
+ export declare class DBOSKoa extends DBOSHTTPBase {
32
+ static get koaContext(): Koa.Context;
33
+ /**
34
+ * Define an authentication function for each endpoint in this class.
35
+ */
36
+ authentication(authMiddleware: DBOSKoaAuthMiddleware): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
37
+ koaBodyParser(koaBodyParser: Koa.Middleware): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
38
+ koaCors(koaCors: Koa.Middleware): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
39
+ /**
40
+ * Define Koa middleware that is applied in order to each endpoint in this class.
41
+ */
42
+ koaMiddleware(...koaMiddleware: Koa.Middleware[]): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
43
+ /**
44
+ * Define Koa middleware that is applied to all requests, including this class, other classes,
45
+ * or requests that do not end up in DBOS handlers at all.
46
+ * @deprecated Apply global middleware to your application router directly
47
+ */
48
+ koaGlobalMiddleware(...koaMiddleware: Koa.Middleware[]): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
49
+ app?: Koa;
50
+ appRouter?: Router;
51
+ createApp(config?: DBOSKoaConfig): void;
52
+ registerWithApp(app: Koa, appRouter: Router, config?: DBOSKoaConfig): void;
53
+ }
54
+ //# sourceMappingURL=dboskoa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dboskoa.d.ts","sourceRoot":"","sources":["../../src/dboskoa.ts"],"names":[],"mappings":";AAAA,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,MAAM,MAAM,aAAa,CAAC;AASjC,OAAO,EAGL,kBAAkB,EAClB,YAAY,EAMb,MAAM,YAAY,CAAC;AAIpB,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,OAAO,CAAC;IACjC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,YAAY,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;GAOG;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,GAAG,EAAE,kBAAkB,KAAK,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;AAEpG,MAAM,WAAW,aAAa;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,cAAc,CAAC,EAAE,qBAAqB,CAAC;IACvC,aAAa,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IAC/B,OAAO,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IACzB,cAAc,CAAC,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC;IAClC,oBAAoB,CAAC,EAAE,GAAG,CAAC,UAAU,EAAE,CAAC;CACzC;AAqBD,qBAAa,OAAQ,SAAQ,YAAY;IACvC,MAAM,KAAK,UAAU,IAAI,GAAG,CAAC,OAAO,CAEnC;IAED;;OAEG;IACH,cAAc,CAAC,cAAc,EAAE,qBAAqB,4BAGR,OAAO,EAAE,KAAG,MAAM,QAAU,CAAC;IAOzE,aAAa,CAAC,aAAa,EAAE,GAAG,CAAC,UAAU,4BAGC,OAAO,EAAE,KAAG,MAAM,QAAU,CAAC;IAOzE,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,UAAU,4BAGa,OAAO,EAAE,KAAG,MAAM,QAAU,CAAC;IAOzE;;OAEG;IACH,aAAa,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,UAAU,EAAE,4BAQJ,OAAO,EAAE,KAAG,MAAM,QAAU,CAAC;IAOzE;;;;OAIG;IACH,mBAAmB,CAAC,GAAG,aAAa,EAAE,GAAG,CAAC,UAAU,EAAE,4BAQV,OAAO,EAAE,KAAG,MAAM,QAAU,CAAC;IAOzE,GAAG,CAAC,EAAE,GAAG,CAAC;IACV,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,MAAM,CAAC,EAAE,aAAa;IAMhC,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa;CAgQpE"}
@@ -0,0 +1,333 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.DBOSKoa = void 0;
7
+ const koa_1 = __importDefault(require("koa"));
8
+ const router_1 = __importDefault(require("@koa/router"));
9
+ const bodyparser_1 = __importDefault(require("@koa/bodyparser"));
10
+ const cors_1 = __importDefault(require("@koa/cors"));
11
+ const core_1 = require("@opentelemetry/core");
12
+ const api_1 = require("@opentelemetry/api");
13
+ const dbos_sdk_1 = require("@dbos-inc/dbos-sdk");
14
+ const dboshttp_1 = require("./dboshttp");
15
+ const async_hooks_1 = require("async_hooks");
16
+ function exhaustiveCheckGuard(_) {
17
+ throw new Error('Exaustive matching is not applied');
18
+ }
19
+ const asyncLocalCtx = new async_hooks_1.AsyncLocalStorage();
20
+ function getCurrentKoaContextStore() {
21
+ return asyncLocalCtx.getStore();
22
+ }
23
+ function assertCurrentKoaContextStore() {
24
+ const ctx = getCurrentKoaContextStore();
25
+ if (!ctx)
26
+ throw new TypeError('Invalid use of `DBOSKoa.koaContext` outside of a handler function');
27
+ return ctx;
28
+ }
29
+ class DBOSKoa extends dboshttp_1.DBOSHTTPBase {
30
+ static get koaContext() {
31
+ return assertCurrentKoaContextStore().koaCtxt;
32
+ }
33
+ /**
34
+ * Define an authentication function for each endpoint in this class.
35
+ */
36
+ authentication(authMiddleware) {
37
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
38
+ const er = this;
39
+ function clsdec(ctor) {
40
+ const clsreg = dbos_sdk_1.DBOS.associateClassWithInfo(er, ctor);
41
+ clsreg.authMiddleware = authMiddleware;
42
+ }
43
+ return clsdec;
44
+ }
45
+ koaBodyParser(koaBodyParser) {
46
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
47
+ const er = this;
48
+ function clsdec(ctor) {
49
+ const clsreg = dbos_sdk_1.DBOS.associateClassWithInfo(er, ctor);
50
+ clsreg.koaBodyParser = koaBodyParser;
51
+ }
52
+ return clsdec;
53
+ }
54
+ koaCors(koaCors) {
55
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
56
+ const er = this;
57
+ function clsdec(ctor) {
58
+ const clsreg = dbos_sdk_1.DBOS.associateClassWithInfo(er, ctor);
59
+ clsreg.koaCors = koaCors;
60
+ }
61
+ return clsdec;
62
+ }
63
+ /**
64
+ * Define Koa middleware that is applied in order to each endpoint in this class.
65
+ */
66
+ koaMiddleware(...koaMiddleware) {
67
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
68
+ const er = this;
69
+ koaMiddleware.forEach((i) => {
70
+ if (i === undefined) {
71
+ throw new TypeError('undefined argument passed to koaMiddleware');
72
+ }
73
+ });
74
+ function clsdec(ctor) {
75
+ const clsreg = dbos_sdk_1.DBOS.associateClassWithInfo(er, ctor);
76
+ clsreg.koaMiddlewares = [...(clsreg.koaMiddlewares ?? []), ...koaMiddleware];
77
+ }
78
+ return clsdec;
79
+ }
80
+ /**
81
+ * Define Koa middleware that is applied to all requests, including this class, other classes,
82
+ * or requests that do not end up in DBOS handlers at all.
83
+ * @deprecated Apply global middleware to your application router directly
84
+ */
85
+ koaGlobalMiddleware(...koaMiddleware) {
86
+ // eslint-disable-next-line @typescript-eslint/no-this-alias
87
+ const er = this;
88
+ koaMiddleware.forEach((i) => {
89
+ if (i === undefined) {
90
+ throw new TypeError('undefined argument passed to koaMiddleware');
91
+ }
92
+ });
93
+ function clsdec(ctor) {
94
+ const clsreg = dbos_sdk_1.DBOS.associateClassWithInfo(er, ctor);
95
+ clsreg.koaGlobalMiddlewares = [...(clsreg.koaGlobalMiddlewares ?? []), ...koaMiddleware];
96
+ }
97
+ return clsdec;
98
+ }
99
+ app;
100
+ appRouter;
101
+ createApp(config) {
102
+ this.app = new koa_1.default();
103
+ this.appRouter = new router_1.default();
104
+ this.registerWithApp(this.app, this.appRouter, config);
105
+ }
106
+ registerWithApp(app, appRouter, config) {
107
+ const globalMiddlewares = new Set();
108
+ const eps = dbos_sdk_1.DBOS.getAssociatedInfo(this);
109
+ for (const e of eps) {
110
+ const { methodConfig, classConfig, methodReg } = e;
111
+ const defaults = classConfig;
112
+ const httpmethod = methodConfig;
113
+ for (const ro of httpmethod?.registrations ?? []) {
114
+ // What about instance methods?
115
+ // Those would have to be registered another way that accepted the instances.
116
+ if (methodReg.isInstance) {
117
+ dbos_sdk_1.DBOS.logger.warn(`Operation ${methodReg.className}/${methodReg.name} is registered with an endpoint (${ro.apiURL}) but cannot be invoked without an instance.`);
118
+ continue;
119
+ }
120
+ // Apply CORS, bodyParser, and other middlewares
121
+ // Check if we need to apply a custom CORS
122
+ if (defaults.koaCors) {
123
+ appRouter.all(ro.apiURL, defaults.koaCors); // Use router.all to register with all methods including preflight requests
124
+ }
125
+ else {
126
+ if (config?.corsMiddleware ?? true) {
127
+ appRouter.all(ro.apiURL, (0, cors_1.default)({
128
+ credentials: config?.credentials ?? true,
129
+ origin: (o) => {
130
+ const whitelist = config?.allowedOrigins;
131
+ const origin = o.request.header.origin ?? '*';
132
+ if (whitelist && whitelist.length > 0) {
133
+ return whitelist.includes(origin) ? origin : '';
134
+ }
135
+ return o.request.header.origin || '*';
136
+ },
137
+ allowMethods: 'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
138
+ allowHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization'],
139
+ }));
140
+ }
141
+ }
142
+ // Check if we need to apply any Koa global middleware.
143
+ if (defaults?.koaGlobalMiddlewares) {
144
+ defaults.koaGlobalMiddlewares.forEach((koaMiddleware) => {
145
+ if (globalMiddlewares.has(koaMiddleware)) {
146
+ return;
147
+ }
148
+ dbos_sdk_1.DBOS.logger.debug(`DBOS Koa Server applying middleware ${koaMiddleware.name} globally`);
149
+ globalMiddlewares.add(koaMiddleware);
150
+ app.use(koaMiddleware);
151
+ });
152
+ }
153
+ const wrappedHandler = async (koaCtxt, koaNext) => {
154
+ let authenticatedUser = undefined;
155
+ let authenticatedRoles = undefined;
156
+ let span;
157
+ const httpTracer = new core_1.W3CTraceContextPropagator();
158
+ try {
159
+ // Auth first
160
+ if (defaults?.authMiddleware) {
161
+ const res = await defaults.authMiddleware({
162
+ name: methodReg.name,
163
+ requiredRole: methodReg.getRequiredRoles(),
164
+ koaContext: koaCtxt,
165
+ });
166
+ if (res) {
167
+ authenticatedUser = res.authenticatedUser;
168
+ authenticatedRoles = res.authenticatedRoles;
169
+ }
170
+ }
171
+ // Parse the arguments.
172
+ const args = [];
173
+ methodReg.args.forEach((marg) => {
174
+ let foundArg = undefined;
175
+ const isQueryMethod = ro.apiType === dboshttp_1.APITypes.GET || ro.apiType === dboshttp_1.APITypes.DELETE;
176
+ const isBodyMethod = ro.apiType === dboshttp_1.APITypes.POST || ro.apiType === dboshttp_1.APITypes.PUT || ro.apiType === dboshttp_1.APITypes.PATCH;
177
+ const argSource = this.getArgSource(marg);
178
+ if ((isQueryMethod && argSource !== dboshttp_1.ArgSources.BODY) || argSource === dboshttp_1.ArgSources.QUERY) {
179
+ foundArg = koaCtxt.request.query[marg.name];
180
+ if (foundArg !== undefined) {
181
+ args.push(foundArg);
182
+ }
183
+ else if (argSource === dboshttp_1.ArgSources.AUTO) {
184
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
185
+ foundArg = koaCtxt.request.body?.[marg.name];
186
+ if (foundArg !== undefined) {
187
+ args.push(foundArg);
188
+ }
189
+ }
190
+ }
191
+ else if (isBodyMethod || argSource === dboshttp_1.ArgSources.BODY) {
192
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment
193
+ foundArg = koaCtxt.request.body?.[marg.name];
194
+ if (foundArg !== undefined) {
195
+ args.push(foundArg);
196
+ }
197
+ else if (argSource === dboshttp_1.ArgSources.AUTO) {
198
+ foundArg = koaCtxt.request.query[marg.name];
199
+ if (foundArg !== undefined) {
200
+ args.push(foundArg);
201
+ }
202
+ else {
203
+ if (!koaCtxt.request.body) {
204
+ throw new dbos_sdk_1.Error.DBOSDataValidationError(`Argument ${marg.name} requires a method body.`);
205
+ }
206
+ }
207
+ }
208
+ }
209
+ // Try to parse the argument from the URL if nothing found.
210
+ if (foundArg === undefined) {
211
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
212
+ args.push(koaCtxt.params[marg.name]);
213
+ }
214
+ //console.log(`found arg ${marg.name} ${idx} ${args[idx-1]}`);
215
+ });
216
+ // Extract workflow ID from headers (if any).
217
+ // We pass in the specified workflow ID in for any workflow started, should handler happen to do so.
218
+ const headerWorkflowID = koaCtxt.get(dboshttp_1.WorkflowIDHeader);
219
+ // Retrieve or generate the tracing request ID
220
+ const requestID = (0, dboshttp_1.getOrGenerateRequestID)(koaCtxt.request.headers);
221
+ koaCtxt.set(dboshttp_1.RequestIDHeader, requestID);
222
+ // If present, retrieve the trace context from the request
223
+ const extractedSpanContext = api_1.trace.getSpanContext(httpTracer.extract(api_1.ROOT_CONTEXT, koaCtxt.request.headers, api_1.defaultTextMapGetter));
224
+ const spanAttributes = {
225
+ operationType: dboshttp_1.DBOSHTTPBase.HTTP_OPERATION_TYPE,
226
+ requestID: requestID,
227
+ requestIP: koaCtxt.request.ip,
228
+ requestURL: koaCtxt.request.url,
229
+ requestMethod: koaCtxt.request.method,
230
+ };
231
+ if (extractedSpanContext === undefined) {
232
+ span = dbos_sdk_1.DBOS.tracer?.startSpan(koaCtxt.url, spanAttributes);
233
+ }
234
+ else {
235
+ extractedSpanContext.isRemote = true;
236
+ span = dbos_sdk_1.DBOS.tracer?.startSpanWithContext(extractedSpanContext, koaCtxt.url, spanAttributes);
237
+ }
238
+ // Finally, invoke the function and properly set HTTP response.
239
+ // If functions return successfully and hasn't set the body, we set the body to the function return value.
240
+ // The status code will be automatically set to 200 or 204 (if the body is null/undefined).
241
+ // In case of an exception:
242
+ // - If a client-side error is thrown, we return 400.
243
+ // - If an error contains a `status` field, we return the specified status code.
244
+ // - Otherwise, we return 500.
245
+ const cresult = await asyncLocalCtx.run({ koaCtxt }, async () => {
246
+ return await dbos_sdk_1.DBOS.runWithContext({
247
+ authenticatedUser,
248
+ authenticatedRoles,
249
+ idAssignedForNextWorkflow: headerWorkflowID,
250
+ span,
251
+ request: koaCtxt.request,
252
+ }, async () => {
253
+ return await methodReg.invoke(undefined, args);
254
+ });
255
+ });
256
+ const retValue = cresult;
257
+ // Set the body to the return value unless the body is already set by the handler.
258
+ if (koaCtxt.body === undefined) {
259
+ koaCtxt.body = retValue;
260
+ }
261
+ span?.setStatus({ code: api_1.SpanStatusCode.OK });
262
+ }
263
+ catch (e) {
264
+ if (e instanceof Error) {
265
+ span?.setStatus({ code: api_1.SpanStatusCode.ERROR, message: e.message });
266
+ let st = e?.status || 500;
267
+ if ((0, dboshttp_1.isClientRequestError)(e)) {
268
+ st = 400; // Set to 400: client-side error.
269
+ }
270
+ koaCtxt.status = st;
271
+ koaCtxt.message = e.message;
272
+ koaCtxt.body = {
273
+ status: st,
274
+ message: e.message,
275
+ details: e,
276
+ };
277
+ }
278
+ else {
279
+ // Thrown item was not an Error, which is poor form.
280
+ // using stringify() will not produce a pretty output, because our format function uses stringify() too.
281
+ dbos_sdk_1.DBOS.logger.error(e);
282
+ span?.setStatus({ code: api_1.SpanStatusCode.ERROR, message: JSON.stringify(e) });
283
+ koaCtxt.body = e;
284
+ koaCtxt.status = 500;
285
+ }
286
+ }
287
+ finally {
288
+ if (span) {
289
+ httpTracer.inject(api_1.trace.setSpanContext(api_1.ROOT_CONTEXT, span.spanContext()), {
290
+ context: koaCtxt,
291
+ }, {
292
+ set: (carrier, key, value) => {
293
+ carrier.context.set(key, value);
294
+ },
295
+ });
296
+ dbos_sdk_1.DBOS.tracer?.endSpan(span);
297
+ }
298
+ await koaNext();
299
+ }
300
+ };
301
+ // Middleware functions are applied directly to router verb methods to prevent duplicate calls.
302
+ const routeMiddlewares = [defaults.koaBodyParser ?? (0, bodyparser_1.default)()].concat(defaults.koaMiddlewares ?? []);
303
+ switch (ro.apiType) {
304
+ case dboshttp_1.APITypes.GET:
305
+ appRouter.get(ro.apiURL, ...routeMiddlewares, wrappedHandler);
306
+ dbos_sdk_1.DBOS.logger.debug(`DBOS Server Registered GET ${ro.apiURL}`);
307
+ break;
308
+ case dboshttp_1.APITypes.POST:
309
+ appRouter.post(ro.apiURL, ...routeMiddlewares, wrappedHandler);
310
+ dbos_sdk_1.DBOS.logger.debug(`DBOS Server Registered POST ${ro.apiURL}`);
311
+ break;
312
+ case dboshttp_1.APITypes.PUT:
313
+ appRouter.put(ro.apiURL, ...routeMiddlewares, wrappedHandler);
314
+ dbos_sdk_1.DBOS.logger.debug(`DBOS Server Registered PUT ${ro.apiURL}`);
315
+ break;
316
+ case dboshttp_1.APITypes.PATCH:
317
+ appRouter.patch(ro.apiURL, ...routeMiddlewares, wrappedHandler);
318
+ dbos_sdk_1.DBOS.logger.debug(`DBOS Server Registered PATCH ${ro.apiURL}`);
319
+ break;
320
+ case dboshttp_1.APITypes.DELETE:
321
+ appRouter.delete(ro.apiURL, ...routeMiddlewares, wrappedHandler);
322
+ dbos_sdk_1.DBOS.logger.debug(`DBOS Server Registered DELETE ${ro.apiURL}`);
323
+ break;
324
+ default:
325
+ exhaustiveCheckGuard(ro.apiType);
326
+ }
327
+ }
328
+ }
329
+ app.use(appRouter.routes()).use(appRouter.allowedMethods());
330
+ }
331
+ }
332
+ exports.DBOSKoa = DBOSKoa;
333
+ //# sourceMappingURL=dboskoa.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dboskoa.js","sourceRoot":"","sources":["../../src/dboskoa.ts"],"names":[],"mappings":";;;;;;AAAA,8CAAsB;AACtB,yDAAiC;AACjC,iEAAyC;AACzC,qDAA6B;AAE7B,8CAAgE;AAChE,4CAA+F;AAG/F,iDAA+D;AAC/D,yCAUoB;AACpB,6CAAgD;AAiChD,SAAS,oBAAoB,CAAC,CAAQ;IACpC,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;AACvD,CAAC;AAKD,MAAM,aAAa,GAAG,IAAI,+BAAiB,EAAmB,CAAC;AAE/D,SAAS,yBAAyB;IAChC,OAAO,aAAa,CAAC,QAAQ,EAAE,CAAC;AAClC,CAAC;AAED,SAAS,4BAA4B;IACnC,M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ources, DBOSHTTP, DBOSHTTPArgInfo, DBOSHTTPAuthReturn, DBOSHTTPBase, DBOSHTTPMethodInfo, DBOSHTTPReg, DBOSHTTPRequest, RequestIDHeader, WorkflowIDHeader, } from './dboshttp';
2
+ export { DBOSKoa, DBOSKoaAuthContext, DBOSKoaClassReg, DBOSKoaAuthMiddleware, DBOSKoaConfig } from './dboskoa';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,eAAe,EACf,kBAAkB,EAClB,YAAY,EACZ,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,eAAe,EACf,gBAAgB,GACjB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}