@dbos-inc/dbos-sdk 1.15.5-preview → 1.15.8-preview
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/src/communicator.d.ts +1 -0
- package/dist/src/communicator.d.ts.map +1 -1
- package/dist/src/communicator.js.map +1 -1
- package/dist/src/dbos-executor.d.ts +9 -1
- package/dist/src/dbos-executor.d.ts.map +1 -1
- package/dist/src/dbos-executor.js +29 -2
- package/dist/src/dbos-executor.js.map +1 -1
- package/dist/src/dbos-runtime/runtime.d.ts +1 -2
- package/dist/src/dbos-runtime/runtime.d.ts.map +1 -1
- package/dist/src/dbos-runtime/runtime.js +10 -7
- package/dist/src/dbos-runtime/runtime.js.map +1 -1
- package/dist/src/decorators.d.ts +13 -0
- package/dist/src/decorators.d.ts.map +1 -1
- package/dist/src/decorators.js +19 -1
- package/dist/src/decorators.js.map +1 -1
- package/dist/src/error.d.ts +3 -0
- package/dist/src/error.d.ts.map +1 -1
- package/dist/src/error.js +8 -1
- package/dist/src/error.js.map +1 -1
- package/dist/src/eventreceiver.d.ts +30 -0
- package/dist/src/eventreceiver.d.ts.map +1 -0
- package/dist/src/eventreceiver.js +3 -0
- package/dist/src/eventreceiver.js.map +1 -0
- package/dist/src/index.d.ts +5 -4
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/kafka/kafka.d.ts +13 -20
- package/dist/src/kafka/kafka.d.ts.map +1 -1
- package/dist/src/kafka/kafka.js +60 -52
- package/dist/src/kafka/kafka.js.map +1 -1
- package/dist/src/system_database.d.ts +2 -0
- package/dist/src/system_database.d.ts.map +1 -1
- package/dist/src/system_database.js +11 -2
- package/dist/src/system_database.js.map +1 -1
- package/dist/src/testing/testing_runtime.d.ts +1 -1
- package/dist/src/testing/testing_runtime.d.ts.map +1 -1
- package/dist/src/testing/testing_runtime.js +7 -6
- package/dist/src/testing/testing_runtime.js.map +1 -1
- package/dist/src/transaction.d.ts +1 -0
- package/dist/src/transaction.d.ts.map +1 -1
- package/dist/src/transaction.js.map +1 -1
- package/dist/src/workflow.d.ts +6 -1
- package/dist/src/workflow.d.ts.map +1 -1
- package/dist/src/workflow.js +3 -0
- package/dist/src/workflow.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/migrations/20240621000000_workflow_tries.js +15 -0
- package/package.json +1 -1
package/dist/src/error.d.ts
CHANGED
@@ -50,4 +50,7 @@ export declare class DBOSNonExistentWorkflowError extends DBOSError {
|
|
50
50
|
export declare class DBOSFailLoadOperationsError extends DBOSError {
|
51
51
|
constructor(msg: string);
|
52
52
|
}
|
53
|
+
export declare class DBOSDeadLetterQueueError extends DBOSError {
|
54
|
+
constructor(workflowUUID: string, maxRetries: number);
|
55
|
+
}
|
53
56
|
//# sourceMappingURL=error.d.ts.map
|
package/dist/src/error.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":"AAqDA,wBAAgB,aAAa,CAAC,aAAa,EAAE,MAAM,WAElD;AAED,qBAAa,SAAU,SAAQ,KAAK;IAET,QAAQ,CAAC,aAAa,EAAE,MAAM;gBAA3C,GAAG,EAAE,MAAM,EAAW,aAAa,GAAE,MAAU;CAG5D;AAGD,qBAAa,iCAAkC,SAAQ,SAAS;gBAClD,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM;CAIhD;AAGD,qBAAa,uBAAwB,SAAQ,SAAS;gBACxC,GAAG,EAAE,MAAM;CAGxB;AAGD,qBAAa,8BAA+B,SAAQ,SAAS;gBAC/C,eAAe,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAI7F;AAGD,qBAAa,6BAA8B,SAAQ,SAAS;gBAC9C,YAAY,EAAE,MAAM;CAGjC;AAGD,qBAAa,sBAAuB,SAAQ,SAAS;gBACvC,IAAI,EAAE,MAAM;CAIzB;AAGD,qBAAa,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AY,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAGrD"}
|
package/dist/src/error.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.DBOSFailLoadOperationsError = exports.DBOSNonExistentWorkflowError = exports.DBOSDebuggerError = exports.DBOSConfigKeyTypeError = exports.DBOSUndefinedDecoratorInputError = exports.DBOSNotAuthorizedError = exports.DBOSResponseError = exports.DuplicateWorkflowEventError = exports.DBOSDataValidationError = exports.DBOSPostgresExporterError = exports.DBOSNotRegisteredError = exports.DBOSWorkflowConflictUUIDError = exports.DBOSTopicPermissionDeniedError = exports.DBOSInitializationError = exports.DBOSWorkflowPermissionDeniedError = exports.DBOSError = exports.isClientError = void 0;
|
3
|
+
exports.DBOSDeadLetterQueueError = exports.DBOSFailLoadOperationsError = exports.DBOSNonExistentWorkflowError = exports.DBOSDebuggerError = exports.DBOSConfigKeyTypeError = exports.DBOSUndefinedDecoratorInputError = exports.DBOSNotAuthorizedError = exports.DBOSResponseError = exports.DuplicateWorkflowEventError = exports.DBOSDataValidationError = exports.DBOSPostgresExporterError = exports.DBOSNotRegisteredError = exports.DBOSWorkflowConflictUUIDError = exports.DBOSTopicPermissionDeniedError = exports.DBOSInitializationError = exports.DBOSWorkflowPermissionDeniedError = exports.DBOSError = exports.isClientError = void 0;
|
4
4
|
const pg_1 = require("pg");
|
5
5
|
function formatPgDatabaseError(err) {
|
6
6
|
let msg = "";
|
@@ -182,4 +182,11 @@ class DBOSFailLoadOperationsError extends DBOSError {
|
|
182
182
|
}
|
183
183
|
}
|
184
184
|
exports.DBOSFailLoadOperationsError = DBOSFailLoadOperationsError;
|
185
|
+
const DeadLetterQueueError = 18;
|
186
|
+
class DBOSDeadLetterQueueError extends DBOSError {
|
187
|
+
constructor(workflowUUID, maxRetries) {
|
188
|
+
super(`Workflow ${workflowUUID} has been moved to the dead-letter queue after exceeding the maximum of ${maxRetries} retries`, DeadLetterQueueError);
|
189
|
+
}
|
190
|
+
}
|
191
|
+
exports.DBOSDeadLetterQueueError = DBOSDeadLetterQueueError;
|
185
192
|
//# sourceMappingURL=error.js.map
|
package/dist/src/error.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"error.js","sourceRoot":"","sources":["../../src/error.ts"],"names":[],"mappings":";;;AAAA,2BAAmC;AAEnC,SAAS,qBAAqB,CAAC,GAAkB;IAC/C,IAAI,GAAG,GAAG,EAAE,CAAC;IACb,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACjB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,GAAG,CAAC,QAAQ,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;QACf,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,MAAM,KAAK,CAAC,CAAC;IAC/C,CAAC;IACD,IAAI,GAAG,CAAC,IAAI,EAAE,CAAC;QACb,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,SAAS,GAAG,CAAC,IAAI,KAAK,CAAC,CAAC;IAC3C,CAAC;IACD,IAAI,GAAG,CAAC,QAAQ,EAAE,CAAC;QACjB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,aAAa,GAAG,CAAC,QAAQ,KAAK,CAAC,CAAC;IACnD,CAAC;IACD,IAAI,GAAG,CAAC,gBAAgB,EAAE,CAAC;QACzB,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,qBAAqB,GAAG,CAAC,gBAAgB,KAAK,CAAC,CAAC;IACnE,CAAC;IACD,IAAI,GAAG,CAAC,aAAa,EAAE,CAAC;QACtB,GAAG,GAAG,GAAG,CAAC,MAAM,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AkB;QAClD,KAAK,CAAC,YAAY,YAAY,2EAA2E,UAAU,UAAU,EAAE,oBAAoB,CAAC,CAAC;IACvJ,CAAC;CACF;AAJD,4DAIC"}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import { Tracer } from './telemetry/traces';
|
2
|
+
import { GlobalLogger as Logger } from './telemetry/logs';
|
3
|
+
import { WorkflowFunction, WorkflowHandle, WorkflowParams } from './workflow';
|
4
|
+
import { TransactionFunction } from './transaction';
|
5
|
+
import { MethodRegistrationBase } from './decorators';
|
6
|
+
import { CommunicatorFunction } from './communicator';
|
7
|
+
export interface DBOSExecutorContext {
|
8
|
+
readonly logger: Logger;
|
9
|
+
readonly tracer: Tracer;
|
10
|
+
getConfig<T>(key: string): T | undefined;
|
11
|
+
getConfig<T>(key: string, defaultValue: T): T;
|
12
|
+
getRegistrationsFor(eri: DBOSEventReceiver): {
|
13
|
+
methodConfig: unknown;
|
14
|
+
classConfig: unknown;
|
15
|
+
methodReg: MethodRegistrationBase;
|
16
|
+
}[];
|
17
|
+
transaction<T extends unknown[], R>(txn: TransactionFunction<T, R>, params: WorkflowParams, ...args: T): Promise<R>;
|
18
|
+
workflow<T extends unknown[], R>(wf: WorkflowFunction<T, R>, params: WorkflowParams, ...args: T): Promise<WorkflowHandle<R>>;
|
19
|
+
external<T extends unknown[], R>(commFn: CommunicatorFunction<T, R>, params: WorkflowParams, ...args: T): Promise<R>;
|
20
|
+
send<T>(destinationUUID: string, message: T, topic?: string, idempotencyKey?: string): Promise<void>;
|
21
|
+
getEvent<T>(workflowUUID: string, key: string, timeoutSeconds: number): Promise<T | null>;
|
22
|
+
retrieveWorkflow<R>(workflowUUID: string): WorkflowHandle<R>;
|
23
|
+
}
|
24
|
+
export interface DBOSEventReceiver {
|
25
|
+
executor?: DBOSExecutorContext;
|
26
|
+
destroy(): Promise<void>;
|
27
|
+
initialize(executor: DBOSExecutorContext): Promise<void>;
|
28
|
+
logRegisteredEndpoints(): void;
|
29
|
+
}
|
30
|
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C,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7H,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,EAAE,MAAM,EAAE,oBAAoB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;IAErH,IAAI,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrG,QAAQ,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;IAC1F,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC;CAC9D;AAUD,MAAM,WAAW,iBAAiB;IAE9B,QAAS,CAAC,EAAE,mBAAmB,CAAC;IAChC,OAAO,IAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,UAAU,CAAC,QAAQ,EAAE,mBAAmB,GAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D,sBAAsB,IAAK,IAAI,CAAC;CACnC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventreceiver.js","sourceRoot":"","sources":["../../src/eventreceiver.ts"],"names":[],"mappings":""}
|
package/dist/src/index.d.ts
CHANGED
@@ -1,16 +1,17 @@
|
|
1
1
|
export { createTestingRuntime, TestingRuntime, } from './testing/testing_runtime';
|
2
2
|
export { DBOSContext, InitContext, } from './context';
|
3
|
-
export { TransactionContext, TransactionConfig, } from './transaction';
|
4
|
-
export { WorkflowContext, WorkflowConfig, WorkflowHandle, StatusString, GetWorkflowsInput, GetWorkflowsOutput, } from './workflow';
|
5
|
-
export { CommunicatorContext, CommunicatorConfig, } from './communicator';
|
3
|
+
export { TransactionContext, TransactionConfig, TransactionFunction, } from './transaction';
|
4
|
+
export { WorkflowContext, WorkflowConfig, WorkflowHandle, WorkflowFunction, StatusString, GetWorkflowsInput, GetWorkflowsOutput, } from './workflow';
|
5
|
+
export { CommunicatorContext, CommunicatorConfig, CommunicatorFunction, } from './communicator';
|
6
6
|
export * as Error from './error';
|
7
7
|
export { DBOSResponseError } from './error';
|
8
|
-
export { LogMasks, ArgRequired, ArgOptional, SkipLogging, LogMask, ArgName, ArgDate, ArgVarchar, DefaultRequiredRole, DefaultArgRequired, DefaultArgOptional, OrmEntities, ConfiguredInstance, configureInstance, Transaction, Workflow, Communicator, RequiredRole, DBOSInitializer, DBOSDeploy, } from "./decorators";
|
8
|
+
export { LogMasks, ArgRequired, ArgOptional, SkipLogging, LogMask, ArgName, ArgDate, ArgVarchar, DefaultRequiredRole, DefaultArgRequired, DefaultArgOptional, OrmEntities, ConfiguredInstance, configureInstance, Transaction, Workflow, Communicator, RequiredRole, DBOSInitializer, DBOSDeploy, associateMethodWithEventReceiver, associateClassWithEventReceiver, } from "./decorators";
|
9
9
|
export { ArgSources, } from "./httpServer/handlerTypes";
|
10
10
|
export { HandlerContext, ArgSource, GetApi, PostApi, PatchApi, PutApi, DeleteApi } from "./httpServer/handler";
|
11
11
|
export { DBOSHttpAuthMiddleware, DBOSHttpAuthReturn, MiddlewareContext, Authentication, KoaBodyParser, KoaCors, KoaMiddleware, OpenApiSecurityScheme } from "./httpServer/middleware";
|
12
12
|
export { Kafka, KafkaConsume, } from "./kafka/kafka";
|
13
13
|
export { SchedulerMode, SchedulerConfig, Scheduled, } from "./scheduler/scheduler";
|
14
|
+
export { DBOSEventReceiver, DBOSExecutorContext, } from "./eventreceiver";
|
14
15
|
export { ParseOptions, parseConfigFile, } from "./dbos-runtime/config";
|
15
16
|
export { DBOSRuntimeConfig, } from "./dbos-runtime/runtime";
|
16
17
|
export { DBOSConfig, } from "./dbos-executor";
|
package/dist/src/index.d.ts.map
CHANGED
@@ -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,
|
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,eAAe,EACf,cAAc,EACd,cAAc,EACd,gBAAgB,EAChB,YAAY,EACZ,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,gBAAgB,CAAC;AAExB,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,YAAY,EACZ,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,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,mBAAmB,GACpB,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"}
|
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.parseConfigFile = exports.Scheduled = exports.SchedulerConfig = exports.SchedulerMode = exports.KafkaConsume = exports.Kafka = exports.OpenApiSecurityScheme = exports.KoaMiddleware = exports.KoaCors = exports.KoaBodyParser = exports.Authentication = exports.DeleteApi = exports.PutApi = exports.PatchApi = exports.PostApi = exports.GetApi = exports.ArgSource = exports.ArgSources = exports.DBOSDeploy = exports.DBOSInitializer = exports.RequiredRole = exports.Communicator = 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.parseConfigFile = exports.Scheduled = exports.SchedulerConfig = exports.SchedulerMode = exports.KafkaConsume = exports.Kafka = exports.OpenApiSecurityScheme = exports.KoaMiddleware = 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.Communicator = 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");
|
@@ -59,6 +59,9 @@ Object.defineProperty(exports, "Communicator", { enumerable: true, get: function
|
|
59
59
|
Object.defineProperty(exports, "RequiredRole", { enumerable: true, get: function () { return decorators_1.RequiredRole; } });
|
60
60
|
Object.defineProperty(exports, "DBOSInitializer", { enumerable: true, get: function () { return decorators_1.DBOSInitializer; } });
|
61
61
|
Object.defineProperty(exports, "DBOSDeploy", { enumerable: true, get: function () { return decorators_1.DBOSDeploy; } });
|
62
|
+
// Extensions for others to register event receivers/pollers
|
63
|
+
Object.defineProperty(exports, "associateMethodWithEventReceiver", { enumerable: true, get: function () { return decorators_1.associateMethodWithEventReceiver; } });
|
64
|
+
Object.defineProperty(exports, "associateClassWithEventReceiver", { enumerable: true, get: function () { return decorators_1.associateClassWithEventReceiver; } });
|
62
65
|
var handlerTypes_1 = require("./httpServer/handlerTypes");
|
63
66
|
Object.defineProperty(exports, "ArgSources", { enumerable: true, get: function () { return handlerTypes_1.ArgSources; } });
|
64
67
|
var handler_1 = require("./httpServer/handler");
|
package/dist/src/index.js.map
CHANGED
@@ -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;
|
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;AASb,uCAQoB;AAHlB,wGAAA,YAAY,OAAA;AAWd,iDAAiC;AAEjC,iCAEiB;AADf,0GAAA,iBAAiB,OAAA;AAGnB,2CAkCsB;AAjCpB,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;AAClB,+GAAA,iBAAiB,OAAA;AAEjB,oBAAoB;AACpB,yGAAA,WAAW,OAAA;AACX,sGAAA,QAAQ,OAAA;AACR,0GAAA,YAAY,OAAA;AACZ,0GAAA,YAAY,OAAA;AACZ,6GAAA,eAAe,OAAA;AACf,wGAAA,UAAU,OAAA;AAEV,4DAA4D;AAC5D,8HAAA,gCAAgC,OAAA;AAChC,6HAAA,+BAA+B,OAAA;AAGjC,0DAEmC;AADjC,0GAAA,UAAU,OAAA;AAGZ,gDAY8B;AAT5B,gCAAgC;AAChC,oGAAA,SAAS,OAAA;AAET,sBAAsB;AACtB,iGAAA,MAAM,OAAA;AACN,kGAAA,OAAO,OAAA;AACP,mGAAA,QAAQ,OAAA;AACR,iGAAA,MAAM,OAAA;AACN,oGAAA,SAAS,OAAA;AAGX,sDAaiC;AAR/B,wBAAwB;AACxB,4GAAA,cAAc,OAAA;AACd,2GAAA,aAAa,OAAA;AACb,qGAAA,OAAO,OAAA;AACP,2GAAA,aAAa,OAAA;AAEb,qBAAqB;AACrB,mHAAA,qBAAqB,OAAA;AAGvB,uCAGuB;AAFrB,8FAAA,KAAK,OAAA;AACL,qGAAA,YAAY,OAAA;AAGd,mDAI+B;AAH7B,0GAAA,aAAa,OAAA;AACb,4GAAA,eAAe,OAAA;AACf,sGAAA,SAAS,OAAA;AAQX,gDAG+B;AAD7B,yGAAA,eAAe,OAAA"}
|
@@ -1,31 +1,24 @@
|
|
1
1
|
import { Consumer, ConsumerConfig, KafkaConfig, KafkaMessage } from "kafkajs";
|
2
|
-
import { DBOSContext } from "..";
|
3
|
-
import {
|
4
|
-
import { DBOSExecutor } from "../dbos-executor";
|
2
|
+
import { DBOSContext, DBOSEventReceiver } from "..";
|
3
|
+
import { DBOSExecutorContext } from "..";
|
5
4
|
type KafkaArgs = [string, number, KafkaMessage];
|
6
|
-
export
|
5
|
+
export declare class DBOSKafka implements DBOSEventReceiver {
|
6
|
+
readonly consumers: Consumer[];
|
7
|
+
executor?: DBOSExecutorContext;
|
8
|
+
constructor();
|
9
|
+
initialize(dbosExecI: DBOSExecutorContext): Promise<void>;
|
10
|
+
destroy(): Promise<void>;
|
11
|
+
safeGroupName(topics: Array<string | RegExp>): string;
|
12
|
+
logRegisteredEndpoints(): void;
|
13
|
+
}
|
14
|
+
export interface KafkaRegistrationInfo {
|
7
15
|
kafkaTopics?: string | RegExp | Array<string | RegExp>;
|
8
16
|
consumerConfig?: ConsumerConfig;
|
9
17
|
}
|
10
18
|
export declare function KafkaConsume(topics: string | RegExp | Array<string | RegExp>, consumerConfig?: ConsumerConfig): <This, Ctx extends DBOSContext, Return>(target: object, propertyKey: string, inDescriptor: TypedPropertyDescriptor<(this: This, ctx: Ctx, ...args: KafkaArgs) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ctx: Ctx, args_1: string, args_2: number, args_3: KafkaMessage) => Promise<Return>>;
|
11
|
-
export interface KafkaDefaults
|
12
|
-
kafkaConfig?: KafkaConfig;
|
13
|
-
}
|
14
|
-
export declare class KafkaClassRegistration<CT extends {
|
15
|
-
new (...args: unknown[]): object;
|
16
|
-
}> extends ClassRegistration<CT> implements KafkaDefaults {
|
19
|
+
export interface KafkaDefaults {
|
17
20
|
kafkaConfig?: KafkaConfig;
|
18
|
-
constructor(ctor: CT);
|
19
21
|
}
|
20
22
|
export declare function Kafka(kafkaConfig: KafkaConfig): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
|
21
|
-
export declare class DBOSKafka {
|
22
|
-
readonly dbosExec: DBOSExecutor;
|
23
|
-
readonly consumers: Consumer[];
|
24
|
-
constructor(dbosExec: DBOSExecutor);
|
25
|
-
initKafka(): Promise<void>;
|
26
|
-
destroyKafka(): Promise<void>;
|
27
|
-
safeGroupName(topics: Array<string | RegExp>): string;
|
28
|
-
logRegisteredKafkaEndpoints(): void;
|
29
|
-
}
|
30
23
|
export {};
|
31
24
|
//# sourceMappingURL=kafka.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"kafka.d.ts","sourceRoot":"","sources":["../../../src/kafka/kafka.ts"],"names":[],"mappings":"A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;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,wBAAgB,KAAK,CAAC,WAAW,EAAE,WAAW,4BACH,OAAO,EAAE,KAAG,MAAM,QAAU,CAAC,UAMvE"}
|
package/dist/src/kafka/kafka.js
CHANGED
@@ -1,55 +1,32 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.
|
3
|
+
exports.Kafka = exports.KafkaConsume = exports.DBOSKafka = void 0;
|
4
4
|
const kafkajs_1 = require("kafkajs");
|
5
|
-
const
|
6
|
-
const
|
5
|
+
const __1 = require("..");
|
6
|
+
const __2 = require("..");
|
7
7
|
const utils_1 = require("../utils");
|
8
|
-
function KafkaConsume(topics, consumerConfig) {
|
9
|
-
function kafkadec(target, propertyKey, inDescriptor) {
|
10
|
-
const { descriptor, registration } = (0, decorators_1.registerAndWrapFunction)(target, propertyKey, inDescriptor);
|
11
|
-
const kafkaRegistration = registration;
|
12
|
-
kafkaRegistration.kafkaTopics = topics;
|
13
|
-
kafkaRegistration.consumerConfig = consumerConfig;
|
14
|
-
return descriptor;
|
15
|
-
}
|
16
|
-
return kafkadec;
|
17
|
-
}
|
18
|
-
exports.KafkaConsume = KafkaConsume;
|
19
|
-
class KafkaClassRegistration extends decorators_1.ClassRegistration {
|
20
|
-
kafkaConfig;
|
21
|
-
constructor(ctor) {
|
22
|
-
super(ctor);
|
23
|
-
}
|
24
|
-
}
|
25
|
-
exports.KafkaClassRegistration = KafkaClassRegistration;
|
26
|
-
function Kafka(kafkaConfig) {
|
27
|
-
function clsdec(ctor) {
|
28
|
-
const clsreg = (0, decorators_1.getOrCreateClassRegistration)(ctor);
|
29
|
-
clsreg.kafkaConfig = kafkaConfig;
|
30
|
-
}
|
31
|
-
return clsdec;
|
32
|
-
}
|
33
|
-
exports.Kafka = Kafka;
|
34
8
|
////////////////////////
|
35
9
|
/* Kafka Management */
|
36
10
|
///////////////////////
|
37
11
|
class DBOSKafka {
|
38
|
-
dbosExec;
|
39
12
|
consumers = [];
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
13
|
+
executor = undefined;
|
14
|
+
constructor() { }
|
15
|
+
async initialize(dbosExecI) {
|
16
|
+
this.executor = dbosExecI;
|
17
|
+
const regops = this.executor.getRegistrationsFor(this);
|
18
|
+
for (const registeredOperation of regops) {
|
19
|
+
const ro = registeredOperation.methodConfig;
|
46
20
|
if (ro.kafkaTopics) {
|
47
|
-
const defaults =
|
48
|
-
|
49
|
-
|
21
|
+
const defaults = registeredOperation.classConfig;
|
22
|
+
const method = registeredOperation.methodReg;
|
23
|
+
const cname = method.className;
|
24
|
+
const mname = method.name;
|
25
|
+
if (!method.txnConfig && !method.workflowConfig) {
|
26
|
+
throw new __2.Error.DBOSError(`Error registering method ${cname}.${mname}: A Kafka decorator can only be assigned to a transaction or workflow!`);
|
50
27
|
}
|
51
28
|
if (!defaults.kafkaConfig) {
|
52
|
-
throw new
|
29
|
+
throw new __2.Error.DBOSError(`Error registering method ${cname}.${mname}: Kafka configuration not found. Does class ${cname} have an @Kafka decorator?`);
|
53
30
|
}
|
54
31
|
const topics = [];
|
55
32
|
if (Array.isArray(ro.kafkaTopics)) {
|
@@ -93,13 +70,13 @@ class DBOSKafka {
|
|
93
70
|
// All operations annotated with Kafka decorators must take in these three arguments
|
94
71
|
const args = [topic, partition, message];
|
95
72
|
// We can only guarantee exactly-once-per-message execution of transactions and workflows.
|
96
|
-
if (
|
73
|
+
if (method.txnConfig) {
|
97
74
|
// Execute the transaction
|
98
|
-
await this.
|
75
|
+
await this.executor.transaction(method.registeredFunction, wfParams, ...args);
|
99
76
|
}
|
100
|
-
else if (
|
77
|
+
else if (method.workflowConfig) {
|
101
78
|
// Safely start the workflow
|
102
|
-
await this.
|
79
|
+
await this.executor.workflow(method.registeredFunction, wfParams, ...args);
|
103
80
|
}
|
104
81
|
},
|
105
82
|
});
|
@@ -107,7 +84,7 @@ class DBOSKafka {
|
|
107
84
|
}
|
108
85
|
}
|
109
86
|
}
|
110
|
-
async
|
87
|
+
async destroy() {
|
111
88
|
for (const consumer of this.consumers) {
|
112
89
|
await consumer.disconnect();
|
113
90
|
}
|
@@ -119,24 +96,55 @@ class DBOSKafka {
|
|
119
96
|
.join('-');
|
120
97
|
return `dbos-kafka-group-${safeGroupIdPart}`.slice(0, 255);
|
121
98
|
}
|
122
|
-
|
123
|
-
|
99
|
+
logRegisteredEndpoints() {
|
100
|
+
if (!this.executor)
|
101
|
+
return;
|
102
|
+
const logger = this.executor.logger;
|
124
103
|
logger.info("Kafka endpoints supported:");
|
125
|
-
this.
|
126
|
-
|
104
|
+
const regops = this.executor.getRegistrationsFor(this);
|
105
|
+
regops.forEach((registeredOperation) => {
|
106
|
+
const ro = registeredOperation.methodConfig;
|
127
107
|
if (ro.kafkaTopics) {
|
128
|
-
const
|
108
|
+
const cname = registeredOperation.methodReg.className;
|
109
|
+
const mname = registeredOperation.methodReg.name;
|
129
110
|
if (Array.isArray(ro.kafkaTopics)) {
|
130
111
|
ro.kafkaTopics.forEach(kafkaTopic => {
|
131
|
-
logger.info(` ${kafkaTopic} -> ${
|
112
|
+
logger.info(` ${kafkaTopic} -> ${cname}.${mname}`);
|
132
113
|
});
|
133
114
|
}
|
134
115
|
else {
|
135
|
-
logger.info(` ${ro.kafkaTopics} -> ${
|
116
|
+
logger.info(` ${ro.kafkaTopics} -> ${cname}.${mname}`);
|
136
117
|
}
|
137
118
|
}
|
138
119
|
});
|
139
120
|
}
|
140
121
|
}
|
141
122
|
exports.DBOSKafka = DBOSKafka;
|
123
|
+
/////////////////////////////
|
124
|
+
/* Kafka Method Decorators */
|
125
|
+
/////////////////////////////
|
126
|
+
let kafkaInst = undefined;
|
127
|
+
function KafkaConsume(topics, consumerConfig) {
|
128
|
+
function kafkadec(target, propertyKey, inDescriptor) {
|
129
|
+
if (!kafkaInst)
|
130
|
+
kafkaInst = new DBOSKafka();
|
131
|
+
const { descriptor, receiverInfo } = (0, __1.associateMethodWithEventReceiver)(kafkaInst, target, propertyKey, inDescriptor);
|
132
|
+
const kafkaRegistration = receiverInfo;
|
133
|
+
kafkaRegistration.kafkaTopics = topics;
|
134
|
+
kafkaRegistration.consumerConfig = consumerConfig;
|
135
|
+
return descriptor;
|
136
|
+
}
|
137
|
+
return kafkadec;
|
138
|
+
}
|
139
|
+
exports.KafkaConsume = KafkaConsume;
|
140
|
+
function Kafka(kafkaConfig) {
|
141
|
+
function clsdec(ctor) {
|
142
|
+
if (!kafkaInst)
|
143
|
+
kafkaInst = new DBOSKafka();
|
144
|
+
const kafkaInfo = (0, __1.associateClassWithEventReceiver)(kafkaInst, ctor);
|
145
|
+
kafkaInfo.kafkaConfig = kafkaConfig;
|
146
|
+
}
|
147
|
+
return clsdec;
|
148
|
+
}
|
149
|
+
exports.Kafka = Kafka;
|
142
150
|
//# sourceMappingURL=kafka.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"kafka.js","sourceRoot":"","sources":["../../../src/kafka/kafka.ts"],"names":[],"mappings":";;;AAAA,qCAAsH;AAEtH,
|
1
|
+
{"version":3,"file":"kafka.js","sourceRoot":"","sources":["../../../src/kafka/kafka.ts"],"names":[],"mappings":";;;AAAA,qCAAsH;AAEtH,0BAAuF;AAGvF,0BAAwC;AACxC,oCAAmC;AAKnC,wBAAwB;AACxB,uBAAuB;AACvB,uBAAuB;AAEvB,MAAa,SAAS;IACX,SAAS,GAAe,EAAE,CAAC;IAEpC,QAAQ,GAAyB,SAAS,CAAC;IAE3C,gBAAgB,CAAC;IAEjB,KAAK,CAAC,UAAU,CAAC,SAA8B;QAC7C,IAAI,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC1B,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;QACvD,KAAK,MAAM,mBAAmB,IAAI,MAAM,EAAE,CAAC;YACzC,MAAM,EAAE,GAAG,mBAAmB,CAAC,YA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E,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAiDnI,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,cAAc,GAAG,IAAI,CAAC;IA+BjH,iBAAiB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAkB5D;;;OAGG;IACG,sBAAsB;IAmBtB,oBAAoB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAYzD,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAY1E,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,kBAAkB,CAAC;CA6B1E"}
|
@@ -93,7 +93,7 @@ class PostgresSystemDatabase {
|
|
93
93
|
}
|
94
94
|
}
|
95
95
|
async initWorkflowStatus(initStatus, args) {
|
96
|
-
await this.pool.query(`INSERT INTO ${dbos_executor_1.DBOSExecutor.systemDBSchemaName}.workflow_status (
|
96
|
+
const result = await this.pool.query(`INSERT INTO ${dbos_executor_1.DBOSExecutor.systemDBSchemaName}.workflow_status (
|
97
97
|
workflow_uuid,
|
98
98
|
status,
|
99
99
|
name,
|
@@ -109,7 +109,10 @@ class PostgresSystemDatabase {
|
|
109
109
|
application_id,
|
110
110
|
created_at
|
111
111
|
) VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)
|
112
|
-
ON CONFLICT (workflow_uuid)
|
112
|
+
ON CONFLICT (workflow_uuid)
|
113
|
+
DO UPDATE SET
|
114
|
+
recovery_attempts = CASE WHEN $15 THEN workflow_status.recovery_attempts + 1 ELSE workflow_status.recovery_attempts END
|
115
|
+
RETURNING recovery_attempts`, [
|
113
116
|
initStatus.workflowUUID,
|
114
117
|
initStatus.status,
|
115
118
|
initStatus.name,
|
@@ -124,7 +127,13 @@ class PostgresSystemDatabase {
|
|
124
127
|
initStatus.applicationVersion,
|
125
128
|
initStatus.applicationID,
|
126
129
|
initStatus.createdAt,
|
130
|
+
initStatus.recovery,
|
127
131
|
]);
|
132
|
+
const recovery_attempts = result.rows[0].recovery_attempts;
|
133
|
+
if (recovery_attempts >= initStatus.maxRetries && initStatus.recovery) {
|
134
|
+
await this.pool.query(`UPDATE ${dbos_executor_1.DBOSExecutor.systemDBSchemaName}.workflow_status SET status=$1 WHERE workflow_uuid=$2 AND status=$3`, [workflow_1.StatusString.RETRIES_EXCEEDED, initStatus.workflowUUID, workflow_1.StatusString.PENDING]);
|
135
|
+
throw new error_1.DBOSDeadLetterQueueError(initStatus.workflowUUID, initStatus.maxRetries);
|
136
|
+
}
|
128
137
|
const { rows } = await this.pool.query(`INSERT INTO ${dbos_executor_1.DBOSExecutor.systemDBSchemaName}.workflow_inputs (workflow_uuid, inputs) VALUES($1, $2) ON CONFLICT (workflow_uuid) DO UPDATE SET workflow_uuid = excluded.workflow_uuid RETURNING inputs`, [initStatus.workflowUUID, utils_1.DBOSJSON.stringify(args)]);
|
129
138
|
return utils_1.DBOSJSON.parse(rows[0].inputs);
|
130
139
|
}
|