@dbos-inc/dbos-sdk 1.12.10 → 1.12.13-preview.g7a8a447e44

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/dist/schemas/system_db_schema.d.ts +0 -2
  2. package/dist/schemas/system_db_schema.d.ts.map +1 -1
  3. package/dist/src/communicator.d.ts +1 -1
  4. package/dist/src/communicator.d.ts.map +1 -1
  5. package/dist/src/communicator.js.map +1 -1
  6. package/dist/src/dbos-executor.d.ts +11 -27
  7. package/dist/src/dbos-executor.d.ts.map +1 -1
  8. package/dist/src/dbos-executor.js +46 -139
  9. package/dist/src/dbos-executor.js.map +1 -1
  10. package/dist/src/debugger/debug_workflow.d.ts +5 -14
  11. package/dist/src/debugger/debug_workflow.d.ts.map +1 -1
  12. package/dist/src/debugger/debug_workflow.js +18 -74
  13. package/dist/src/debugger/debug_workflow.js.map +1 -1
  14. package/dist/src/decorators.d.ts +2 -19
  15. package/dist/src/decorators.d.ts.map +1 -1
  16. package/dist/src/decorators.js +27 -104
  17. package/dist/src/decorators.js.map +1 -1
  18. package/dist/src/httpServer/handler.d.ts +15 -22
  19. package/dist/src/httpServer/handler.d.ts.map +1 -1
  20. package/dist/src/httpServer/handler.js +35 -44
  21. package/dist/src/httpServer/handler.js.map +1 -1
  22. package/dist/src/httpServer/handlerTypes.d.ts +1 -4
  23. package/dist/src/httpServer/handlerTypes.d.ts.map +1 -1
  24. package/dist/src/httpServer/handlerTypes.js +0 -3
  25. package/dist/src/httpServer/handlerTypes.js.map +1 -1
  26. package/dist/src/httpServer/server.d.ts.map +1 -1
  27. package/dist/src/httpServer/server.js +10 -34
  28. package/dist/src/httpServer/server.js.map +1 -1
  29. package/dist/src/index.d.ts +1 -1
  30. package/dist/src/index.d.ts.map +1 -1
  31. package/dist/src/index.js +1 -4
  32. package/dist/src/index.js.map +1 -1
  33. package/dist/src/kafka/kafka.d.ts +3 -2
  34. package/dist/src/kafka/kafka.d.ts.map +1 -1
  35. package/dist/src/kafka/kafka.js +13 -2
  36. package/dist/src/kafka/kafka.js.map +1 -1
  37. package/dist/src/scheduler/scheduler.d.ts +8 -4
  38. package/dist/src/scheduler/scheduler.d.ts.map +1 -1
  39. package/dist/src/scheduler/scheduler.js +9 -2
  40. package/dist/src/scheduler/scheduler.js.map +1 -1
  41. package/dist/src/system_database.d.ts +0 -2
  42. package/dist/src/system_database.d.ts.map +1 -1
  43. package/dist/src/system_database.js +4 -61
  44. package/dist/src/system_database.js.map +1 -1
  45. package/dist/src/testing/testing_runtime.d.ts +5 -9
  46. package/dist/src/testing/testing_runtime.d.ts.map +1 -1
  47. package/dist/src/testing/testing_runtime.js +12 -24
  48. package/dist/src/testing/testing_runtime.js.map +1 -1
  49. package/dist/src/transaction.d.ts +1 -1
  50. package/dist/src/transaction.d.ts.map +1 -1
  51. package/dist/src/utils.d.ts +0 -1
  52. package/dist/src/utils.d.ts.map +1 -1
  53. package/dist/src/utils.js +1 -5
  54. package/dist/src/utils.js.map +1 -1
  55. package/dist/src/workflow.d.ts +10 -46
  56. package/dist/src/workflow.d.ts.map +1 -1
  57. package/dist/src/workflow.js +20 -72
  58. package/dist/src/workflow.js.map +1 -1
  59. package/dist/tsconfig.build.tsbuildinfo +1 -1
  60. package/package.json +2 -2
  61. package/migrations/20240517000000_status_class_config.js +0 -18
@@ -3,9 +3,7 @@ import { Transaction } from "../transaction";
3
3
  import { Communicator } from "../communicator";
4
4
  import { UserDatabaseClient } from "../user_database";
5
5
  import { DBOSContextImpl } from "../context";
6
- import { ConfiguredInstance } from "../decorators";
7
- import { WFInvokeFuncs, WfInvokeWfs, WfInvokeWfsAsync, Workflow, WorkflowConfig, WorkflowContext, WorkflowHandle } from "../workflow";
8
- import { InvokeFuncsInst } from "../httpServer/handler";
6
+ import { WFInvokeFuncs, Workflow, WorkflowConfig, WorkflowContext, WorkflowHandle } from "../workflow";
9
7
  interface RecordedResult<R> {
10
8
  output: R;
11
9
  txn_snapshot: string;
@@ -21,23 +19,16 @@ export declare class WorkflowContextDebug extends DBOSContextImpl implements Wor
21
19
  readonly isTempWorkflow: boolean;
22
20
  constructor(dbosExec: DBOSExecutor, parentCtx: DBOSContextImpl | undefined, workflowUUID: string, workflowConfig: WorkflowConfig, workflowName: string);
23
21
  functionIDGetIncrement(): number;
24
- invoke<T extends object>(object: T | ConfiguredInstance): WFInvokeFuncs<T> | InvokeFuncsInst<T>;
22
+ invoke<T extends object>(object: T): WFInvokeFuncs<T>;
25
23
  checkExecution<R>(client: UserDatabaseClient, funcID: number): Promise<RecordedResult<R> | Error>;
26
24
  /**
27
25
  * Execute a transactional function in debug mode.
28
26
  * If a debug proxy is provided, it connects to a debug proxy and everything should be read-only.
29
27
  */
30
- transaction<T extends unknown[], R>(txn: Transaction<T, R>, clsinst: ConfiguredInstance | null, ...args: T): Promise<R>;
31
- external<T extends unknown[], R>(commFn: Communicator<T, R>, _clsinst: ConfiguredInstance | null, ..._args: T): Promise<R>;
28
+ transaction<T extends any[], R>(txn: Transaction<T, R>, ...args: T): Promise<R>;
29
+ external<T extends any[], R>(commFn: Communicator<T, R>, ..._args: T): Promise<R>;
32
30
  startChildWorkflow<T extends any[], R>(wf: Workflow<T, R>, ...args: T): Promise<WorkflowHandle<R>>;
33
- invokeChildWorkflow<T extends unknown[], R>(wf: Workflow<T, R>, ...args: T): Promise<R>;
34
- /**
35
- * Generate a proxy object for the provided class that wraps direct calls (i.e. OpClass.someMethod(param))
36
- * to use WorkflowContext.Transaction(OpClass.someMethod, param);
37
- */
38
- proxyInvokeWF<T extends object>(object: T, workflowUUID: string | undefined, asyncWf: boolean, configuredInstance: ConfiguredInstance | null): WfInvokeWfsAsync<T>;
39
- startWorkflow<T extends object>(target: T, workflowUUID?: string): WfInvokeWfsAsync<T>;
40
- invokeWorkflow<T extends object>(target: T, workflowUUID?: string): WfInvokeWfs<T>;
31
+ invokeChildWorkflow<T extends any[], R>(wf: Workflow<T, R>, ...args: T): Promise<R>;
41
32
  childWorkflow<T extends any[], R>(wf: Workflow<T, R>, ...args: T): Promise<WorkflowHandle<R>>;
42
33
  send<T>(_destinationUUID: string, _message: T, _topic?: string | undefined): Promise<void>;
43
34
  recv<T>(_topic?: string | undefined, _timeoutSeconds?: number | undefined): Promise<T | null>;
@@ -1 +1 @@
1
- {"version":3,"file":"debug_workflow.d.ts","sourceRoot":"","sources":["../../../src/debugger/debug_workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAqC,MAAM,kBAAkB,CAAC;AAEnF,OAAO,EAAE,WAAW,EAA0B,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAI/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,kBAAkB,EAA2B,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,gBAAgB,EAAE,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAkB,MAAM,aAAa,CAAC;AACtJ,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAExD,UAAU,cAAc,CAAC,CAAC;IACxB,MAAM,EAAE,CAAC,CAAC;IACV,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,eAAgB,YAAW,eAAe;;IAKgB,QAAQ,CAAC,cAAc,EAAE,cAAc;IAJzI,UAAU,EAAE,MAAM,CAAK;IAEvB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;gBAErB,QAAQ,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,GAAG,SAAS,EAAE,YAAY,EAAE,MAAM,EAAW,cAAc,EAAE,cAAc,EACvI,YAAY,EAAE,MAAM;IAoBtB,sBAAsB,IAAI,MAAM;IAIhC,MAAM,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,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aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC;IAY/G,gBAAgB,CAAC,CAAC,EAAE,UAAU,EAAE,MAAM,GAAG,cAAc,CAAC,CAAC,CAAC;IAMpD,OAAO,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKjC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGtC"}
@@ -35,35 +35,19 @@ class WorkflowContextDebug extends context_1.DBOSContextImpl {
35
35
  return this.functionID++;
36
36
  }
37
37
  invoke(object) {
38
- if (typeof object === 'function') {
39
- const ops = (0, decorators_1.getRegisteredOperations)(object);
40
- const proxy = {};
41
- for (const op of ops) {
42
- proxy[op.name] = op.txnConfig
43
- ?
44
- (...args) => this.transaction(op.registeredFunction, null, ...args)
45
- : op.commConfig
46
- ?
47
- (...args) => this.external(op.registeredFunction, null, ...args)
48
- : undefined;
49
- }
50
- return proxy;
51
- }
52
- else {
53
- const targetInst = object;
54
- const ops = (0, decorators_1.getRegisteredOperations)(targetInst);
55
- const proxy = {};
56
- for (const op of ops) {
57
- proxy[op.name] = op.txnConfig
58
- ?
59
- (...args) => this.transaction(op.registeredFunction, targetInst, ...args)
60
- : op.commConfig
61
- ?
62
- (...args) => this.external(op.registeredFunction, targetInst, ...args)
63
- : undefined;
64
- }
65
- return proxy;
38
+ const ops = (0, decorators_1.getRegisteredOperations)(object);
39
+ const proxy = {};
40
+ for (const op of ops) {
41
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
42
+ proxy[op.name] = op.txnConfig
43
+ ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
44
+ (...args) => this.transaction(op.registeredFunction, ...args)
45
+ : op.commConfig
46
+ ? // eslint-disable-next-line @typescript-eslint/no-unsafe-argument
47
+ (...args) => this.external(op.registeredFunction, ...args)
48
+ : undefined;
66
49
  }
50
+ return proxy;
67
51
  }
68
52
  async checkExecution(client, funcID) {
69
53
  // Note: we read the recorded snapshot and transaction ID!
@@ -91,8 +75,8 @@ class WorkflowContextDebug extends context_1.DBOSContextImpl {
91
75
  * Execute a transactional function in debug mode.
92
76
  * If a debug proxy is provided, it connects to a debug proxy and everything should be read-only.
93
77
  */
94
- async transaction(txn, clsinst, ...args) {
95
- const txnInfo = this.#dbosExec.getTransactionInfo(txn);
78
+ async transaction(txn, ...args) {
79
+ const txnInfo = this.#dbosExec.transactionInfoMap.get(txn.name);
96
80
  if (txnInfo === undefined) {
97
81
  throw new error_1.DBOSDebuggerError(`Transaction ${txn.name} not registered!`);
98
82
  }
@@ -125,7 +109,7 @@ class WorkflowContextDebug extends context_1.DBOSContextImpl {
125
109
  return check.output;
126
110
  }
127
111
  // If we have a proxy, then execute the user's transaction.
128
- const result = await txn.call(clsinst, tCtxt, ...args);
112
+ const result = await txn(tCtxt, ...args);
129
113
  return result;
130
114
  };
131
115
  let result;
@@ -149,8 +133,8 @@ class WorkflowContextDebug extends context_1.DBOSContextImpl {
149
133
  }
150
134
  return check.output; // Always return the recorded result.
151
135
  }
152
- async external(commFn, _clsinst, ..._args) {
153
- const commConfig = this.#dbosExec.getCommunicatorInfo(commFn);
136
+ async external(commFn, ..._args) {
137
+ const commConfig = this.#dbosExec.communicatorInfoMap.get(commFn.name);
154
138
  if (commConfig === undefined) {
155
139
  throw new error_1.DBOSDebuggerError(`Communicator ${commFn.name} not registered!`);
156
140
  }
@@ -173,47 +157,7 @@ class WorkflowContextDebug extends context_1.DBOSContextImpl {
173
157
  async invokeChildWorkflow(wf, ...args) {
174
158
  return this.startChildWorkflow(wf, ...args).then((handle) => handle.getResult());
175
159
  }
176
- /**
177
- * Generate a proxy object for the provided class that wraps direct calls (i.e. OpClass.someMethod(param))
178
- * to use WorkflowContext.Transaction(OpClass.someMethod, param);
179
- */
180
- proxyInvokeWF(object, workflowUUID, asyncWf, configuredInstance) {
181
- const ops = (0, decorators_1.getRegisteredOperations)(object);
182
- const proxy = {};
183
- const funcId = this.functionIDGetIncrement();
184
- const childUUID = workflowUUID || (this.workflowUUID + "-" + funcId);
185
- const params = { workflowUUID: childUUID, parentCtx: this, configuredInstance };
186
- for (const op of ops) {
187
- if (asyncWf) {
188
- proxy[op.name] = op.workflowConfig
189
- ? (...args) => this.#dbosExec.debugWorkflow(op.registeredFunction, params, this.workflowUUID, funcId, ...args)
190
- : undefined;
191
- }
192
- else {
193
- proxy[op.name] = op.workflowConfig
194
- ? (...args) => this.#dbosExec.debugWorkflow(op.registeredFunction, params, this.workflowUUID, funcId, ...args)
195
- .then((handle) => handle.getResult())
196
- : undefined;
197
- }
198
- }
199
- return proxy;
200
- }
201
- startWorkflow(target, workflowUUID) {
202
- if (typeof target === 'function') {
203
- return this.proxyInvokeWF(target, workflowUUID, true, null);
204
- }
205
- else {
206
- return this.proxyInvokeWF(target, workflowUUID, true, target);
207
- }
208
- }
209
- invokeWorkflow(target, workflowUUID) {
210
- if (typeof target === 'function') {
211
- return this.proxyInvokeWF(target, workflowUUID, false, null);
212
- }
213
- else {
214
- return this.proxyInvokeWF(target, workflowUUID, false, target);
215
- }
216
- }
160
+ // Deprecated
217
161
  async childWorkflow(wf, ...args) {
218
162
  return this.startChildWorkflow(wf, ...args);
219
163
  }
@@ -1 +1 @@
1
- {"version":3,"file":"debug_workflow.js","sourceRoot":"","sources":["../../../src/debugger/debug_workflow.ts"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,oDAAmF;AAEnF,gDAAqE;AAErE,oCAA6C;AAC7C,qDAAmD;AAInD,wCAA6C;AAC7C,8CAA4E;AAU5E;;GAEG;AACH,MAAa,oBAAqB,SAAQ,yBAAe;IAKoD;IAJ3G,UAAU,GAAW,CAAC,CAAC;IACd,SAAS,CAAC;IACV,cAAc,CAAU;IAEjC,YAAY,QAAsB,EAAE,SAAsC,EAAE,YAAoB,EAAW,cAA8B,EACvI,YAAoB;Q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D,oDAiPC;AAED;;GAEG;AACH,MAAM,oBAAoB;IACH;IAAyC;IAA+B;IAA6B;IAA1H,YAAqB,cAA8B,EAAW,YAAoB,EAAW,UAAkB,EAAW,gBAAwB;QAA7H,mBAAc,GAAd,cAAc,CAAgB;QAAW,iBAAY,GAAZ,YAAY,CAAQ;QAAW,eAAU,GAAV,UAAU,CAAQ;QAAW,qBAAgB,GAAhB,gBAAgB,CAAQ;IAAI,CAAC;IAEvJ,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,SAAS;QACb,4BAA4B;QAC5B,MAAM,KAAK,GAAqC,MAAM,IAAI,CAAC,cAAc,CAAC,oBAAoB,CAAwB,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9J,IAAI,KAAK,KAAK,wBAAQ,EAAE,CAAC;YACvB,MAAM,IAAI,yBAAiB,CAAC,uEAAuE,CAAC,CAAC;QACvG,CAAC;QACD,OAAO,KAA8B,CAAC;IACxC,CAAC;IAED,KAAK,CAAC,SAAS;QACb,OAAO,MAAM,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAI,IAAI,CAAC,YAAY,CAAC,CAAC;IAC3E,CAAC;CACF"}
@@ -47,26 +47,22 @@ export interface RegistrationDefaults {
47
47
  }
48
48
  export interface MethodRegistrationBase {
49
49
  name: string;
50
- className: string;
51
50
  args: MethodParameter[];
52
51
  defaults?: RegistrationDefaults;
53
52
  getRequiredRoles(): string[];
54
53
  workflowConfig?: WorkflowConfig;
55
54
  txnConfig?: TransactionConfig;
56
55
  commConfig?: CommunicatorConfig;
57
- isInstance: boolean;
58
56
  registeredFunction: Function | undefined;
59
57
  invoke(pthis: unknown, args: unknown[]): unknown;
60
58
  }
61
59
  export declare class MethodRegistration<This, Args extends unknown[], Return> implements MethodRegistrationBase {
62
60
  defaults?: RegistrationDefaults | undefined;
63
61
  name: string;
64
- className: string;
65
62
  requiredRole: string[] | undefined;
66
63
  args: MethodParameter[];
67
- constructor(origFunc: (this: This, ...args: Args) => Promise<Return>, isInstance: boolean);
64
+ constructor(origFunc: (this: This, ...args: Args) => Promise<Return>);
68
65
  needInitialized: boolean;
69
- isInstance: boolean;
70
66
  origFunction: (this: This, ...args: Args) => Promise<Return>;
71
67
  registeredFunction: ((this: This, ...args: Args) => Promise<Return>) | undefined;
72
68
  workflowConfig?: WorkflowConfig;
@@ -76,11 +72,6 @@ export declare class MethodRegistration<This, Args extends unknown[], Return> im
76
72
  invoke(pthis: This, args: Args): Promise<Return>;
77
73
  getRequiredRoles(): string[];
78
74
  }
79
- export declare abstract class ConfiguredInstance {
80
- readonly name: string;
81
- constructor(name: string);
82
- abstract initialize(ctx: InitContext): Promise<void>;
83
- }
84
75
  export declare class ClassRegistration<CT extends {
85
76
  new (...args: unknown[]): object;
86
77
  }> implements RegistrationDefaults {
@@ -89,24 +80,18 @@ export declare class ClassRegistration<CT extends {
89
80
  defaultArgRequired: ArgRequiredOptions;
90
81
  needsInitialized: boolean;
91
82
  ormEntities: Function[];
92
- registeredOperations: Map<string, MethodRegistrationBase>;
93
- configuredInstances: Map<string, ConfiguredInstance>;
94
83
  ctor: CT;
95
84
  constructor(ctor: CT);
96
85
  }
97
- export declare function getRegisteredMethodClassName(func: unknown): string;
98
- export declare function getRegisteredMethodName(func: unknown): string;
99
86
  export declare function getRegisteredOperations(target: object): ReadonlyArray<MethodRegistrationBase>;
100
- export declare function getConfiguredInstance(clsname: string, cfgname: string): ConfiguredInstance | null;
101
87
  export declare function getOrCreateMethodArgsRegistration(target: object, propertyKey: string | symbol): MethodParameter[];
102
88
  export declare function registerAndWrapFunction<This, Args extends unknown[], Return>(target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>): {
103
89
  descriptor: TypedPropertyDescriptor<(this: This, ...args: Args) => Promise<Return>>;
104
90
  registration: MethodRegistration<This, Args, Return>;
105
91
  };
106
- type AnyConstructor = new (...args: unknown[]) => object;
107
92
  export declare function getOrCreateClassRegistration<CT extends {
108
93
  new (...args: unknown[]): object;
109
- }>(ctor: CT): ClassRegistration<AnyConstructor>;
94
+ }>(ctor: CT): ClassRegistration<CT>;
110
95
  export declare function ArgRequired(target: object, propertyKey: string | symbol, parameterIndex: number): void;
111
96
  export declare function ArgOptional(target: object, propertyKey: string | symbol, parameterIndex: number): void;
112
97
  export declare function SkipLogging(target: object, propertyKey: string | symbol, parameterIndex: number): void;
@@ -121,7 +106,6 @@ export declare function DefaultArgRequired<T extends {
121
106
  export declare function DefaultArgOptional<T extends {
122
107
  new (...args: unknown[]): object;
123
108
  }>(ctor: T): void;
124
- export declare function configureInstance<R extends ConfiguredInstance, T extends unknown[]>(cls: new (name: string, ...args: T) => R, name: string, ...args: T): R;
125
109
  export declare function RequiredRole(anyOf: string[]): <This, Ctx extends DBOSContext, Args extends unknown[], Return>(target: object, propertyKey: string, inDescriptor: TypedPropertyDescriptor<(this: This, ctx: Ctx, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ctx: Ctx, ...args: Args) => Promise<Return>>;
126
110
  export declare function Workflow(config?: WorkflowConfig): <This, Args extends unknown[], Return>(target: object, propertyKey: string, inDescriptor: TypedPropertyDescriptor<(this: This, ctx: WorkflowContext, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ctx: WorkflowContext, ...args: Args) => Promise<Return>>;
127
111
  export declare function Transaction(config?: TransactionConfig): <This, Args extends unknown[], Return>(target: object, propertyKey: string, inDescriptor: TypedPropertyDescriptor<(this: This, ctx: TransactionContext<any>, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ctx: TransactionContext<any>, ...args: Args) => Promise<Return>>;
@@ -129,5 +113,4 @@ export declare function Communicator(config?: CommunicatorConfig): <This, Args e
129
113
  export declare function OrmEntities(entities: Function[]): <T extends new (...args: unknown[]) => object>(ctor: T) => void;
130
114
  export declare function DBOSInitializer(): <This, Args extends unknown[], Return>(target: object, propertyKey: string, inDescriptor: TypedPropertyDescriptor<(this: This, ctx: InitContext, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ctx: InitContext, ...args: Args) => Promise<Return>>;
131
115
  export declare function DBOSDeploy(): <This, Args extends unknown[], Return>(target: object, propertyKey: string, inDescriptor: TypedPropertyDescriptor<(this: This, ctx: InitContext, ...args: Args) => Promise<Return>>) => TypedPropertyDescriptor<(this: This, ctx: InitContext, ...args: Args) => Promise<Return>>;
132
- export {};
133
116
  //# sourceMappingURL=decorators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../src/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACtE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAmB,WAAW,EAAE,MAAM,WAAW,CAAC;AACtE,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAIzE;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,MAAM,CAAC;AAE9H,qBAAa,YAAY;IACvB,QAAQ,EAAE,aAAa,CAAU;IACjC,MAAM,EAAE,MAAM,CAAM;IACpB,SAAS,EAAE,MAAM,CAAM;IACvB,KAAK,EAAE,MAAM,CAAM;IAEnB,yBAAyB;IACzB,MAAM,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM;IAO7B,gFAAgF;IAChF,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAS/C,sCAAsC;IAEtC,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,QAAQ;IAkB5B,cAAc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EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,IAAI,KAAK,QAAQ,MAAM,CAAC,CAAC,+FAO1G;AAGD,wBAAgB,UAAU,mDAEd,MAAM,eACD,MAAM,gBACL,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,IAAI,EAAE,IAAI,KAAK,QAAQ,MAAM,CAAC,CAAC,+FAO1G"}
@@ -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.DBOSDeploy = exports.DBOSInitializer = exports.OrmEntities = exports.Communicator = exports.Transaction = exports.Workflow = exports.RequiredRole = exports.configureInstance = exports.DefaultArgOptional = exports.DefaultArgRequired = exports.DefaultRequiredRole = exports.ArgVarchar = exports.ArgDate = exports.ArgName = exports.LogMask = exports.SkipLogging = exports.ArgOptional = exports.ArgRequired = exports.getOrCreateClassRegistration = exports.registerAndWrapFunction = exports.getOrCreateMethodArgsRegistration = exports.getConfiguredInstance = exports.getRegisteredOperations = exports.getRegisteredMethodName = exports.getRegisteredMethodClassName = exports.ClassRegistration = exports.ConfiguredInstance = exports.MethodRegistration = exports.MethodParameter = exports.ArgRequiredOptions = exports.LogMasks = exports.DBOSDataType = void 0;
26
+ exports.DBOSDeploy = exports.DBOSInitializer = exports.OrmEntities = exports.Communicator = exports.Transaction = exports.Workflow = exports.RequiredRole = exports.DefaultArgOptional = exports.DefaultArgRequired = exports.DefaultRequiredRole = exports.ArgVarchar = exports.ArgDate = exports.ArgName = exports.LogMask = exports.SkipLogging = exports.ArgOptional = exports.ArgRequired = exports.getOrCreateClassRegistration = exports.registerAndWrapFunction = exports.getOrCreateMethodArgsRegistration = exports.getRegisteredOperations = exports.ClassRegistration = exports.MethodRegistration = exports.MethodParameter = exports.ArgRequiredOptions = exports.LogMasks = exports.DBOSDataType = void 0;
27
27
  require("reflect-metadata");
28
28
  const crypto = __importStar(require("crypto"));
29
29
  const error_1 = require("./error");
@@ -87,6 +87,8 @@ class DBOSDataType {
87
87
  }
88
88
  exports.DBOSDataType = DBOSDataType;
89
89
  const paramMetadataKey = Symbol.for("dbos:parameter");
90
+ const methodMetadataKey = Symbol.for("dbos:method");
91
+ const classMetadataKey = Symbol.for("dbos:class");
90
92
  /* Arguments parsing heuristic:
91
93
  * - Convert the function to a string
92
94
  * - Minify the function
@@ -133,15 +135,12 @@ exports.MethodParameter = MethodParameter;
133
135
  class MethodRegistration {
134
136
  defaults;
135
137
  name = "";
136
- className = "";
137
138
  requiredRole = undefined;
138
139
  args = [];
139
- constructor(origFunc, isInstance) {
140
+ constructor(origFunc) {
140
141
  this.origFunction = origFunc;
141
- this.isInstance = isInstance;
142
142
  }
143
143
  needInitialized = true;
144
- isInstance;
145
144
  origFunction;
146
145
  registeredFunction;
147
146
  workflowConfig;
@@ -159,13 +158,6 @@ class MethodRegistration {
159
158
  }
160
159
  }
161
160
  exports.MethodRegistration = MethodRegistration;
162
- class ConfiguredInstance {
163
- name;
164
- constructor(name) {
165
- this.name = name;
166
- }
167
- }
168
- exports.ConfiguredInstance = ConfiguredInstance;
169
161
  class ClassRegistration {
170
162
  name = "";
171
163
  requiredRole;
@@ -173,75 +165,36 @@ class ClassRegistration {
173
165
  needsInitialized = true;
174
166
  // eslint-disable-next-line @typescript-eslint/ban-types
175
167
  ormEntities = [];
176
- registeredOperations = new Map();
177
- configuredInstances = new Map();
178
168
  ctor;
179
169
  constructor(ctor) {
180
170
  this.ctor = ctor;
181
171
  }
182
172
  }
183
173
  exports.ClassRegistration = ClassRegistration;
184
- // This is a bit ugly, if we got the class / instance it would help avoid this auxiliary structure
185
- const methodToRegistration = new Map();
186
- function getRegisteredMethodClassName(func) {
187
- let rv = "";
188
- if (methodToRegistration.has(func)) {
189
- rv = methodToRegistration.get(func).className;
190
- }
191
- return rv;
192
- }
193
- exports.getRegisteredMethodClassName = getRegisteredMethodClassName;
194
- function getRegisteredMethodName(func) {
195
- let rv = "";
196
- if (methodToRegistration.has(func)) {
197
- rv = methodToRegistration.get(func).name;
198
- }
199
- return rv;
200
- }
201
- exports.getRegisteredMethodName = getRegisteredMethodName;
174
+ ////////////////////////////////////////////////////////////////////////////////
175
+ // DECORATOR REGISTRATION
176
+ // These manage registration objects, creating them at decorator evaluation time
177
+ // and making wrapped methods available for function registration at runtime
178
+ // initialization time.
179
+ ////////////////////////////////////////////////////////////////////////////////
202
180
  function getRegisteredOperations(target) {
203
181
  const registeredOperations = [];
204
- if (typeof target === 'function') { // Constructor case
205
- const classReg = classesByName.get(target.name);
206
- classReg?.registeredOperations?.forEach((m) => registeredOperations.push(m));
207
- }
208
- else {
209
- let current = target;
210
- while (current) {
211
- const cname = current.constructor.name;
212
- if (classesByName.has(cname)) {
213
- registeredOperations.push(...getRegisteredOperations(current.constructor));
214
- }
215
- current = Object.getPrototypeOf(current);
182
+ for (const name of Object.getOwnPropertyNames(target)) {
183
+ const operation = Reflect.getOwnMetadata(methodMetadataKey, target, name);
184
+ if (operation) {
185
+ registeredOperations.push(operation);
216
186
  }
217
187
  }
218
188
  return registeredOperations;
219
189
  }
220
190
  exports.getRegisteredOperations = getRegisteredOperations;
221
- function getConfiguredInstance(clsname, cfgname) {
222
- const classReg = classesByName.get(clsname);
223
- if (!classReg)
224
- return null;
225
- return classReg.configuredInstances.get(cfgname) ?? null;
226
- }
227
- exports.getConfiguredInstance = getConfiguredInstance;
228
- ////////////////////////////////////////////////////////////////////////////////
229
- // DECORATOR REGISTRATION
230
- // These manage registration objects, creating them at decorator evaluation time
231
- // and making wrapped methods available for function registration at runtime
232
- // initialization time.
233
- ////////////////////////////////////////////////////////////////////////////////
234
191
  function getOrCreateMethodArgsRegistration(target, propertyKey) {
235
- let regtarget = target;
236
- if (typeof regtarget !== 'function') {
237
- regtarget = regtarget.constructor;
238
- }
239
- let mParameters = Reflect.getOwnMetadata(paramMetadataKey, regtarget, propertyKey) || [];
192
+ let mParameters = Reflect.getOwnMetadata(paramMetadataKey, target, propertyKey) || [];
240
193
  if (!mParameters.length) {
241
194
  // eslint-disable-next-line @typescript-eslint/ban-types
242
195
  const designParamTypes = Reflect.getMetadata("design:paramtypes", target, propertyKey);
243
196
  mParameters = designParamTypes.map((value, index) => new MethodParameter(index, value));
244
- Reflect.defineMetadata(paramMetadataKey, mParameters, regtarget, propertyKey);
197
+ Reflect.defineMetadata(paramMetadataKey, mParameters, target, propertyKey);
245
198
  }
246
199
  return mParameters;
247
200
  }
@@ -252,28 +205,9 @@ function generateSaltedHash(data, salt) {
252
205
  return hash.digest("hex");
253
206
  }
254
207
  function getOrCreateMethodRegistration(target, propertyKey, descriptor) {
255
- let regtarget;
256
- let isInstance = false;
257
- if (typeof target === 'function') {
258
- // Static method case
259
- regtarget = target;
260
- }
261
- else {
262
- // Instance method case
263
- regtarget = target.constructor;
264
- isInstance = true;
265
- }
266
- const classReg = getOrCreateClassRegistration(regtarget);
267
- const fname = propertyKey.toString();
268
- if (!classReg.registeredOperations.has(fname)) {
269
- classReg.registeredOperations.set(fname, new MethodRegistration(descriptor.value, isInstance));
270
- }
271
- const methReg = classReg.registeredOperations.get(fname);
208
+ const methReg = Reflect.getOwnMetadata(methodMetadataKey, target, propertyKey) || new MethodRegistration(descriptor.value);
272
209
  if (methReg.needInitialized) {
273
- methReg.needInitialized = false;
274
- methReg.name = fname;
275
- methReg.className = classReg.name;
276
- methReg.defaults = classReg;
210
+ methReg.name = propertyKey.toString();
277
211
  methReg.args = getOrCreateMethodArgsRegistration(target, propertyKey);
278
212
  const argNames = getArgNames(descriptor.value);
279
213
  methReg.args.forEach((e) => {
@@ -287,6 +221,7 @@ function getOrCreateMethodRegistration(target, propertyKey, descriptor) {
287
221
  // TODO else warn/log something
288
222
  }
289
223
  });
224
+ Reflect.defineMetadata(methodMetadataKey, methReg, target, propertyKey);
290
225
  const wrappedMethod = async function (...rawArgs) {
291
226
  let opCtx = undefined;
292
227
  // Validate the user authentication and populate the role field
@@ -346,8 +281,7 @@ function getOrCreateMethodRegistration(target, propertyKey, descriptor) {
346
281
  });
347
282
  descriptor.value = wrappedMethod;
348
283
  methReg.registeredFunction = wrappedMethod;
349
- methodToRegistration.set(methReg.registeredFunction, methReg);
350
- methodToRegistration.set(methReg.origFunction, methReg);
284
+ methReg.needInitialized = false;
351
285
  }
352
286
  return methReg;
353
287
  }
@@ -359,16 +293,15 @@ function registerAndWrapFunction(target, propertyKey, descriptor) {
359
293
  return { descriptor, registration };
360
294
  }
361
295
  exports.registerAndWrapFunction = registerAndWrapFunction;
362
- const classesByName = new Map();
363
296
  function getOrCreateClassRegistration(ctor) {
364
- const name = ctor.name;
365
- if (!classesByName.has(name)) {
366
- classesByName.set(name, new ClassRegistration(ctor));
367
- }
368
- const clsReg = classesByName.get(name);
297
+ const clsReg = Reflect.getOwnMetadata(classMetadataKey, ctor, "dbosclassreg") || new ClassRegistration(ctor);
369
298
  if (clsReg.needsInitialized) {
370
- clsReg.name = name;
371
- clsReg.needsInitialized = false;
299
+ clsReg.name = ctor.name;
300
+ Reflect.defineMetadata(classMetadataKey, clsReg, ctor, "dbosclassreg");
301
+ const ops = getRegisteredOperations(ctor);
302
+ ops.forEach((op) => {
303
+ op.defaults = clsReg;
304
+ });
372
305
  }
373
306
  return clsReg;
374
307
  }
@@ -447,16 +380,6 @@ function DefaultArgOptional(ctor) {
447
380
  clsreg.defaultArgRequired = ArgRequiredOptions.OPTIONAL;
448
381
  }
449
382
  exports.DefaultArgOptional = DefaultArgOptional;
450
- function configureInstance(cls, name, ...args) {
451
- const inst = new cls(name, ...args);
452
- const creg = getOrCreateClassRegistration(cls);
453
- if (creg.configuredInstances.has(name)) {
454
- throw new error_1.DBOSError(`Registration: Class ${cls.name} configuration ${name} is not unique`);
455
- }
456
- creg.configuredInstances.set(name, inst);
457
- return inst;
458
- }
459
- exports.configureInstance = configureInstance;
460
383
  ///////////////////////
461
384
  /* METHOD DECORATORS */
462
385
  ///////////////////////