@punks/backend-entity-manager 0.0.134 → 0.0.135
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.js +12 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/templates/pipelines/instance/index.d.ts +1 -0
- package/dist/esm/index.js +12 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/templates/pipelines/instance/index.d.ts +1 -0
- package/package.json +1 -1
|
@@ -5,6 +5,7 @@ export declare class PipelineInstance<TPipelineInput, TPipelineOutput, TContext>
|
|
|
5
5
|
private readonly input;
|
|
6
6
|
private readonly context;
|
|
7
7
|
private status;
|
|
8
|
+
private readonly logger;
|
|
8
9
|
constructor(definition: PipelineDefinition<TPipelineInput, TPipelineOutput, TContext>, input: TPipelineInput, context: TContext);
|
|
9
10
|
execute(): Promise<PipelineResult<TPipelineInput, TPipelineOutput>>;
|
|
10
11
|
private buildInitialStepState;
|
package/dist/esm/index.js
CHANGED
|
@@ -21156,6 +21156,7 @@ class PipelineInstance {
|
|
|
21156
21156
|
this.input = input;
|
|
21157
21157
|
this.context = context;
|
|
21158
21158
|
this.status = PipelineStatus.Initializing;
|
|
21159
|
+
this.logger = Log.getLogger(PipelineInstance.name);
|
|
21159
21160
|
}
|
|
21160
21161
|
async execute() {
|
|
21161
21162
|
this.status = PipelineStatus.Running;
|
|
@@ -21288,6 +21289,9 @@ class PipelineInstance {
|
|
|
21288
21289
|
};
|
|
21289
21290
|
}
|
|
21290
21291
|
catch (error) {
|
|
21292
|
+
this.logger.exception(`Pipeline operation error -> operation:${operation.name}`, error, {
|
|
21293
|
+
input,
|
|
21294
|
+
});
|
|
21291
21295
|
return {
|
|
21292
21296
|
type: "error",
|
|
21293
21297
|
input,
|
|
@@ -21322,6 +21326,11 @@ class PipelineInstance {
|
|
|
21322
21326
|
};
|
|
21323
21327
|
}
|
|
21324
21328
|
catch (error) {
|
|
21329
|
+
this.logger.exception(`Pipeline operation rollback error -> rollbackOperation:${rollbackOperation.name}`, error, {
|
|
21330
|
+
operationInput,
|
|
21331
|
+
operationOutput,
|
|
21332
|
+
state,
|
|
21333
|
+
});
|
|
21325
21334
|
return {
|
|
21326
21335
|
type: "error",
|
|
21327
21336
|
error: toPipelineOperationError(error),
|
|
@@ -22500,7 +22509,9 @@ class NestPipelineTemplate {
|
|
|
22500
22509
|
const instance = await this.controller.createInstance(this.getDefinition(), data.input, data.context);
|
|
22501
22510
|
const result = await instance.execute();
|
|
22502
22511
|
if (result.type === "error") {
|
|
22503
|
-
this.logger.error(`[ERROR] | ${this.metadata.name} -> ${result.exception
|
|
22512
|
+
this.logger.error(`[ERROR] | ${this.metadata.name} -> ${result.exception
|
|
22513
|
+
? `exception: ${result.exception.name}\n${result.exception.stack}`
|
|
22514
|
+
: ""}`, {
|
|
22504
22515
|
...logMetadata,
|
|
22505
22516
|
result,
|
|
22506
22517
|
});
|