@dbos-inc/dbos-sdk 1.15.5-preview → 1.15.7-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 +25 -0
- 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/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/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 +1 -0
- package/dist/src/workflow.d.ts.map +1 -1
- package/dist/src/workflow.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -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
|
+
//# sourceMappingURL=eventreceiver.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"eventreceiver.d.ts","sourceRoot":"","sources":["../../src/eventreceiver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM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,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":"AAAA,OAAO,EAAoB,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,YAAY,EAAwB,MAAM,SAAS,CAAC;AACtH,OAAO,EAAE,WAAW,EAAE,MAAM,IAAI,CAAC;
|
1
|
+
{"version":3,"file":"kaf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.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,YAAqC,CAAC;YACrE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;gBACnB,MAAM,QAAQ,GAAG,mBAAmB,CAAC,WAA4B,CAAC;gBAClE,MAAM,MAAM,GAAG,mBAAmB,CAAC,SAAS,CAAC;g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A,oCAAgC,EAAC,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,CAAC,CAAC;QAElH,MAAM,iBAAiB,GAAG,YAAqC,CAAC;QAChE,iBAAiB,CAAC,WAAW,GAAG,MAAM,CAAC;QACvC,iBAAiB,CAAC,cAAc,GAAG,cAAc,CAAC;QAElD,OAAO,UAAU,CAAC;IACpB,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC;AAhBD,oCAgBC;AAUD,SAAgB,KAAK,CAAC,WAAwB;IAC5C,SAAS,MAAM,CAAgD,IAAO;QACpE,IAAI,CAAC,SAAS;YAAE,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;QAC5C,MAAM,SAAS,GAAG,IAAA,mCAA+B,EAAC,SAAS,EAAE,IAAI,CAAkB,CAAC;QACpF,SAAS,CAAC,WAAW,GAAG,WAAW,CAAC;IACtC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAPD,sBAOC"}
|
@@ -13,7 +13,7 @@ import { SystemDatabase } from "../system_database";
|
|
13
13
|
/**
|
14
14
|
* Create a testing runtime. Warn: this function will drop the existing system DB and create a clean new one. Don't run tests against your production database!
|
15
15
|
*/
|
16
|
-
export declare function createTestingRuntime(userClasses?: object[], configFilePath?: string, dropSysDB?: boolean): Promise<TestingRuntime>;
|
16
|
+
export declare function createTestingRuntime(userClasses?: object[] | undefined, configFilePath?: string, dropSysDB?: boolean): Promise<TestingRuntime>;
|
17
17
|
export interface WorkflowInvokeParams {
|
18
18
|
readonly authenticatedUser?: string;
|
19
19
|
readonly authenticatedRoles?: string[];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"testing_runtime.d.ts","sourceRoot":"","sources":["../../../src/testing/testing_runtime.ts"],"names":[],"mappings":";;;AACA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAEvC,OAAO,EAAE,WAAW,EAAmB,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAA2B,MAAM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E,MAAM,EAAE,CAAC,GAAG,kBAAkB,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,oBAAoB,GACjH,kBAAkB,CAAC,CAAC,CAAC,GAAG,sBAAsB,CAAC,CAAC,CAAC;IAWrD;;OAEG;IACH,mBAAmB;IAOnB,gBAAgB;IAOV,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;IAIpG,QAAQ,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,cAAc,GAAE,MAAmD,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAI5I,gBAAgB,CAAC,CAAC,EAAE,YAAY,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAItD,WAAW,CAAC,CAAC,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC;IAK3D,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;IAIvC,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAI/B;;OAEG;IACH,WAAW,IAAI,YAAY;CAM5B"}
|
@@ -9,12 +9,11 @@ const dbos_executor_1 = require("../dbos-executor");
|
|
9
9
|
const config_1 = require("../dbos-runtime/config");
|
10
10
|
const lodash_1 = require("lodash");
|
11
11
|
const pg_1 = require("pg");
|
12
|
-
const kafka_1 = require("../kafka/kafka");
|
13
12
|
const scheduler_1 = require("../scheduler/scheduler");
|
14
13
|
/**
|
15
14
|
* Create a testing runtime. Warn: this function will drop the existing system DB and create a clean new one. Don't run tests against your production database!
|
16
15
|
*/
|
17
|
-
async function createTestingRuntime(userClasses, configFilePath = config_1.dbosConfigFilePath, dropSysDB = true) {
|
16
|
+
async function createTestingRuntime(userClasses = undefined, configFilePath = config_1.dbosConfigFilePath, dropSysDB = true) {
|
18
17
|
const [dbosConfig] = (0, config_1.parseConfigFile)({ configfile: configFilePath });
|
19
18
|
if (dropSysDB) {
|
20
19
|
// Drop system database. Testing runtime always uses Postgres for local testing.
|
@@ -47,7 +46,6 @@ exports.createInternalTestRuntime = createInternalTestRuntime;
|
|
47
46
|
*/
|
48
47
|
class TestingRuntimeImpl {
|
49
48
|
#server = null;
|
50
|
-
#kafka = null;
|
51
49
|
#scheduler = null;
|
52
50
|
#applicationConfig = {};
|
53
51
|
#isInitialized = false;
|
@@ -60,8 +58,9 @@ class TestingRuntimeImpl {
|
|
60
58
|
const dbosExec = new dbos_executor_1.DBOSExecutor(dbosConfig[0], systemDB);
|
61
59
|
await dbosExec.init(userClasses);
|
62
60
|
this.#server = new server_1.DBOSHttpServer(dbosExec);
|
63
|
-
|
64
|
-
|
61
|
+
for (const evtRcvr of dbosExec.eventReceivers) {
|
62
|
+
await evtRcvr.initialize(dbosExec);
|
63
|
+
}
|
65
64
|
this.#scheduler = new scheduler_1.DBOSScheduler(dbosExec);
|
66
65
|
this.#scheduler.initScheduler();
|
67
66
|
this.#applicationConfig = dbosExec.config.application ?? {};
|
@@ -74,7 +73,9 @@ class TestingRuntimeImpl {
|
|
74
73
|
// Only release once.
|
75
74
|
if (this.#isInitialized) {
|
76
75
|
await this.#scheduler?.destroyScheduler();
|
77
|
-
|
76
|
+
for (const evtRcvr of this.#server?.dbosExec?.eventReceivers || []) {
|
77
|
+
await evtRcvr.destroy();
|
78
|
+
}
|
78
79
|
await this.#server?.dbosExec.destroy();
|
79
80
|
this.#isInitialized = false;
|
80
81
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"testing_runtime.js","sourceRoot":"","sources":["../../../src/testing/testing_runtime.ts"],"names":[],"mappings":";;;AAGA,wCAA0D;AAC1D,8CAA4E;AAC5E,oCAA6D;AAE7D,iDAAsD;AACtD,oDAA4D;AAC5D,mDA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CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,gBAAgB;QACpB,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,YAAY,EAAE,CAAC;IACxD,CAAC;IAED,cAAc;QACZ,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC,YAAY,CAAC,UAAU,EAAE,CAAC;IACtD,CAAC;IAED;;OAEG;IACH,WAAW;QACT,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,IAAI,iBAAS,CAAC,qEAAqE,CAAC,CAAC;QAC7F,CAAC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;IAC/B,CAAC;CACF;AApLD,gDAoLC"}
|
@@ -6,6 +6,7 @@ import { ValuesOf } from "./utils";
|
|
6
6
|
import { GlobalLogger as Logger } from "./telemetry/logs";
|
7
7
|
import { WorkflowContextDebug } from "./debugger/debug_workflow";
|
8
8
|
export type Transaction<T extends unknown[], R> = (ctxt: TransactionContext<any>, ...args: T) => Promise<R>;
|
9
|
+
export type TransactionFunction<T extends unknown[], R> = Transaction<T, R>;
|
9
10
|
export interface TransactionConfig {
|
10
11
|
isolationLevel?: IsolationLevel;
|
11
12
|
readOnly?: boolean;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.d.ts","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,YAAY,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC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,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,kBAAkB,CAAE,SAAQ,WAAW;IACnF,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;CACpB;AAED,qBAAa,sBAAsB,CAAC,CAAC,SAAS,kBAAkB,CAAE,SAAQ,eAAgB,YAAW,kBAAkB,CAAC,CAAC,CAAC;IAEtH,QAAQ,CAAC,UAAU,EAAE,gBAAgB;IACrC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAIlB,QAAQ,CAAC,UAAU,EAAE,MAAM;gBALlB,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,CAAC,EAClB,eAAe,EAAE,mBAAmB,GAAG,oBAAoB,EAC3D,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,EACL,UAAU,EAAE,MAAM,EAC3B,aAAa,EAAE,MAAM;CAKxB"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":";;;AAIA,uCAAyD;
|
1
|
+
{"version":3,"file":"transaction.js","sourceRoot":"","sources":["../../src/transaction.ts"],"names":[],"mappings":";;;AAIA,uCAAyD;AAc5C,QAAA,cAAc,GAAG;IAC5B,eAAe,EAAE,kBAAkB;IACnC,aAAa,EAAE,gBAAgB;IAC/B,cAAc,EAAE,iBAAiB;IACjC,YAAY,EAAE,cAAc;CACpB,CAAC;AAOX,MAAa,sBAAqD,SAAQ,yBAAe;IAE5E;IACA;IAIA;IANX,YACW,UAA4B,EAC5B,MAAS,EAClB,eAA2D,EAC3D,IAAU,EACV,MAAc,EACL,UAAkB,EAC3B,aAAqB;QAErB,KAAK,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;QAR3C,eAAU,GAAV,UAAU,CAAkB;QAC5B,WAAM,GAAN,MAAM,CAAG;QAIT,eAAU,GAAV,UAAU,CAAQ;QAI3B,IAAI,CAAC,iBAAiB,GAAG,eAAe,CAAC,iBAAiB,CAAC;IAC7D,CAAC;CACF;AAbD,wDAaC"}
|
package/dist/src/workflow.d.ts
CHANGED
@@ -7,6 +7,7 @@ import { HTTPRequest, DBOSContext, DBOSContextImpl } from './context';
|
|
7
7
|
import { ConfiguredInstance } from "./decorators";
|
8
8
|
import { InvokeFuncsInst } from "./httpServer/handler";
|
9
9
|
export type Workflow<T extends unknown[], R> = (ctxt: WorkflowContext, ...args: T) => Promise<R>;
|
10
|
+
export type WorkflowFunction<T extends unknown[], R> = Workflow<T, R>;
|
10
11
|
export type TailParameters<T extends (arg: any, args: any[]) => any> = T extends (arg: any, ...args: infer P) => any ? P : never;
|
11
12
|
type TxFunc = (ctxt: TransactionContext<any>, ...args: any[]) => Promise<any>;
|
12
13
|
type CommFunc = (ctxt: CommunicatorContext, ...args: any[]) => Promise<any>;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"workflow.d.ts","sourceRoot":"","sources":["../../src/workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqC,MAAM,iBAAiB,CAAC;AAElF,OAAO,EAAkB,WAAW,EAAE,kBAAkB,EAA0B,MAAM,eAAe,CAAC;AACxG,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAA2B,MAAM,gBAAgB,CAAC;AAI5F,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGrD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAA2B,MAAM,cAAc,CAAC;AAC3E,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,MAAM,QAAQ,CAAC,CAAC,SAAS,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,eAAe,EAAE,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC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