Signed-off-by: bnechyporenko <bnechyporenko@bol.com>
This commit is contained in:
bnechyporenko
2024-02-08 20:43:27 +01:00
parent 72d7c6867a
commit 92582f17a0
8 changed files with 74 additions and 147 deletions
+2 -2
View File
@@ -16,7 +16,7 @@
import { Logger } from 'winston';
import { Writable } from 'stream';
import { JsonObject } from '@backstage/types';
import { JsonObject, JsonValue } from '@backstage/types';
import { TaskSecrets } from '../tasks';
import { TemplateInfo } from '@backstage/plugin-scaffolder-common';
import { UserEntity } from '@backstage/catalog-model';
@@ -35,7 +35,7 @@ export type ActionContext<
secrets?: TaskSecrets;
workspacePath: string;
input: TActionInput;
checkpoint?<U extends JsonObject>(
checkpoint<U extends JsonValue>(
key: string,
fn: () => Promise<U>,
): Promise<U>;
+3 -3
View File
@@ -15,7 +15,7 @@
*/
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
import { JsonObject, Observable } from '@backstage/types';
import { JsonObject, JsonValue, Observable } from '@backstage/types';
/**
* TaskSecrets
@@ -36,7 +36,7 @@ export type CheckpointRecord =
| {
key: string;
status: 'success';
value: JsonObject;
value: JsonValue;
}
| {
key: string;
@@ -54,7 +54,7 @@ export type TaskState = {
| { status: 'failed'; reason: string }
| {
status: 'success';
value: JsonObject;
value: JsonValue;
};
};