refactor to alpha exports
Signed-off-by: Kurt King <kurtaking@gmail.com>
This commit is contained in:
@@ -23,7 +23,7 @@ import {
|
||||
BackstageCredentials,
|
||||
LoggerService,
|
||||
} from '@backstage/backend-plugin-api';
|
||||
import { CheckpointContext } from '../checkpoints';
|
||||
import { CheckpointContext } from '../alpha';
|
||||
|
||||
/**
|
||||
* ActionContext is passed into scaffolder actions.
|
||||
|
||||
+1
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
* Copyright 2025 The Backstage Authors
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -13,5 +13,4 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
export * from './types';
|
||||
+6
-6
@@ -18,14 +18,14 @@ import { JsonValue } from '@backstage/types';
|
||||
/**
|
||||
* The status of a checkpoint, indicating whether it succeeded or failed.
|
||||
*
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export type CheckpointStatus = 'failed' | 'success';
|
||||
|
||||
/**
|
||||
* Represents a successful checkpoint state with a value.
|
||||
*
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export type CheckpointSuccessState<T extends JsonValue = JsonValue> = {
|
||||
status: 'success';
|
||||
@@ -35,7 +35,7 @@ export type CheckpointSuccessState<T extends JsonValue = JsonValue> = {
|
||||
/**
|
||||
* Represents a failed checkpoint state with a reason for failure.
|
||||
*
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export type CheckpointFailedState = {
|
||||
status: 'failed';
|
||||
@@ -45,7 +45,7 @@ export type CheckpointFailedState = {
|
||||
/**
|
||||
* Represents the union of all possible checkpoint state values.
|
||||
*
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export type CheckpointStateValue =
|
||||
| CheckpointSuccessState
|
||||
@@ -54,7 +54,7 @@ export type CheckpointStateValue =
|
||||
/**
|
||||
* A map of checkpoint keys to their states.
|
||||
*
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export type CheckpointState = {
|
||||
[key: string]: CheckpointStateValue;
|
||||
@@ -63,7 +63,7 @@ export type CheckpointState = {
|
||||
/**
|
||||
* Context for checkpoint function invocation.
|
||||
*
|
||||
* @public
|
||||
* @alpha
|
||||
*/
|
||||
export type CheckpointContext<T extends JsonValue | void = JsonValue> = {
|
||||
/**
|
||||
@@ -28,6 +28,7 @@ export * from '../tasks/alpha';
|
||||
export * from './filters';
|
||||
export * from './globals';
|
||||
export * from './types';
|
||||
export * from './checkpoints';
|
||||
|
||||
/**
|
||||
* Extension point for managing scaffolder actions.
|
||||
|
||||
@@ -24,4 +24,3 @@ export * from './actions';
|
||||
export * from './tasks';
|
||||
export * from './files';
|
||||
export * from './types';
|
||||
export * from './checkpoints';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { CheckpointStateValue } from '../alpha';
|
||||
|
||||
/*
|
||||
* Copyright 2024 The Backstage Authors
|
||||
*
|
||||
@@ -14,3 +16,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
export * from './serializer';
|
||||
|
||||
/**
|
||||
* Options for updating a checkpoint in a task.
|
||||
*
|
||||
* @alpha
|
||||
*/
|
||||
export type UpdateTaskCheckpointOptions = {
|
||||
key: string;
|
||||
} & CheckpointStateValue;
|
||||
|
||||
@@ -25,5 +25,5 @@ export type {
|
||||
TaskContext,
|
||||
TaskEventType,
|
||||
TaskStatus,
|
||||
UpdateTaskCheckpointOptions,
|
||||
// UpdateTaskCheckpointOptions,
|
||||
} from './types';
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
import { BackstageCredentials } from '@backstage/backend-plugin-api';
|
||||
import { TaskSpec } from '@backstage/plugin-scaffolder-common';
|
||||
import { JsonObject, Observable } from '@backstage/types';
|
||||
import { CheckpointStateValue } from '../checkpoints';
|
||||
import { UpdateTaskCheckpointOptions } from '../alpha';
|
||||
|
||||
/**
|
||||
* TaskSecrets
|
||||
@@ -105,15 +105,6 @@ export type TaskBrokerDispatchOptions = {
|
||||
createdBy?: string;
|
||||
};
|
||||
|
||||
/**
|
||||
* Options for updating a checkpoint in a task.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export type UpdateTaskCheckpointOptions = {
|
||||
key: string;
|
||||
} & CheckpointStateValue;
|
||||
|
||||
/**
|
||||
* Task
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user