@codesoul-co/hypha-adapters-local / legacy-tool-artifact-migration-rollback
- Package index:
@codesoul-co/hypha-adapters-local - Source:
packages/adapters-local/src/legacy-tool-artifact-migration-rollback.ts - Exports: 8
Using this module
Use the Legacy tool artifact migration rollback module for using the public contracts and operations for this capability boundary. It exports 2 classes, 5 interfaces, 1 type.
Import from the package entrypoint
import {
LegacyToolArtifactMigrationRollbackError,
LegacyToolArtifactMigrationRollbackExecutor,
} from '@codesoul-co/hypha-adapters-local';
import type {
LegacyToolArtifactMigrationRollbackExecutorOptions,
LegacyToolArtifactMigrationRollbackItem,
LegacyToolArtifactMigrationRollbackRequest,
LegacyToolArtifactMigrationRollbackResult,
LegacyToolArtifactMigrationRollbackSummary,
LegacyToolArtifactMigrationRollbackErrorCode,
} from '@codesoul-co/hypha-adapters-local';Usage patterns
- Use the 6 type/interface exports as static contracts in application code, adapters, or tests. Import them with
import type; they do not exist at runtime. - The module exposes 2 classes as constructable runtime implementations. Each symbol entry lists its constructor and public methods.
Public exports
| Symbol | Kind | Signature | Description |
|---|---|---|---|
LegacyToolArtifactMigrationRollbackError | class | new LegacyToolArtifactMigrationRollbackError(code: LegacyToolArtifactMigrationRollbackErrorCode, message: string, details?: Record<string, unknown> | undefined): LegacyToolArtifactMigrationRollbackError | Legacy Tool Artifact Migration Rollback Error class with 10 public constructor or member entries; its exact declarations are listed below. |
LegacyToolArtifactMigrationRollbackExecutor | class | new LegacyToolArtifactMigrationRollbackExecutor(options: LegacyToolArtifactMigrationRollbackExecutorOptions): LegacyToolArtifactMigrationRollbackExecutor | Reverses only Artifacts proven to have been created by a specific migration report. Revision fences prevent rollback from deleting a later mutation. |
LegacyToolArtifactMigrationRollbackExecutorOptions | interface | interface LegacyToolArtifactMigrationRollbackExecutorOptions | Legacy Tool Artifact Migration Rollback Executor Options interface with 1 public fields or methods. |
LegacyToolArtifactMigrationRollbackItem | interface | interface LegacyToolArtifactMigrationRollbackItem | Legacy Tool Artifact Migration Rollback Item interface with 8 public fields or methods. |
LegacyToolArtifactMigrationRollbackRequest | interface | interface LegacyToolArtifactMigrationRollbackRequest | Legacy Tool Artifact Migration Rollback Request interface with 3 public fields or methods. |
LegacyToolArtifactMigrationRollbackResult | interface | interface LegacyToolArtifactMigrationRollbackResult | Legacy Tool Artifact Migration Rollback Result interface with 6 public fields or methods. |
LegacyToolArtifactMigrationRollbackSummary | interface | interface LegacyToolArtifactMigrationRollbackSummary | Legacy Tool Artifact Migration Rollback Summary interface with 5 public fields or methods. |
LegacyToolArtifactMigrationRollbackErrorCode | type | type LegacyToolArtifactMigrationRollbackErrorCode = 'LEGACY_MIGRATION_ROLLBACK_INVALID_REPORT' | 'LEGACY_MIGRATION_ROLLBACK_TARGET_MISMATCH' | Public type alias for Legacy Tool Artifact Migration Rollback Error Code; the declaration contains its complete type expression. |
LegacyToolArtifactMigrationRollbackError
Legacy Tool Artifact Migration Rollback Error class with 10 public constructor or member entries; its exact declarations are listed below.
- Kind: class
- Import:
import { LegacyToolArtifactMigrationRollbackError } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export declare class LegacyToolArtifactMigrationRollbackError extends Error {
readonly code: LegacyToolArtifactMigrationRollbackErrorCode;
readonly details?: Record<string, unknown> | undefined;
constructor(code: LegacyToolArtifactMigrationRollbackErrorCode, message: string, details?: Record<string, unknown> | undefined);
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
cause | property | cause?: unknown | Public property; its type, readonly modifier and optionality are shown in the signature. |
code | property | readonly code: LegacyToolArtifactMigrationRollbackErrorCode | Public property; its type, readonly modifier and optionality are shown in the signature. |
constructor | constructor | (code: LegacyToolArtifactMigrationRollbackErrorCode, message: string, details?: Record<string, unknown> | undefined): LegacyToolArtifactMigrationRollbackError | Creates an instance of this class. |
details | property | readonly details?: Record<string, unknown> | Public property; its type, readonly modifier and optionality are shown in the signature. |
message | property | message: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
name | property | name: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
stack | property | stack?: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
static captureStackTrace | method | static captureStackTrace(targetObject: object, constructorOpt?: Function): void | Creates a .stack property on targetObject, which when accessed returns a string representing the location in the code at which Error.captureStackTrace() was called. js const myObject = {}; Error.captureStackTrace(myObject); myObject.stack; // Similar to `new Error().stack` The first line of the trace will be prefixed with ${myObject.name}: ${myObject.message}. The optional constructorOpt argument accepts a function. If given, all frames above constructorOpt, including constructorOpt, will be omitted from the generated stack trace. The constructorOpt argument is useful for hiding implementation details of error generation from the user. For instance: js function a() { b(); } function b() { c(); } function c() { // Create an error without stack trace to avoid calculating the stack trace twice. const { stackTraceLimit } = Error; Error.stackTraceLimit = 0; const error = new Error(); Error.stackTraceLimit = stackTraceLimit; // Capture the stack trace above function b Error.captureStackTrace(error, b); // Neither function c, nor b is included in the stack trace throw error; } a(); |
static prepareStackTrace | method | static prepareStackTrace(err: Error, stackTraces: NodeJS.CallSite[]): any | Public method; parameters and return type are shown in the signature. |
static stackTraceLimit | property | static stackTraceLimit: number | The Error.stackTraceLimit property specifies the number of stack frames collected by a stack trace (whether generated by new Error().stack or Error.captureStackTrace(obj)). The default value is 10 but may be set to any valid JavaScript number. Changes will affect any stack trace captured after the value has been changed. If set to a non-number value, or set to a negative number, stack traces will not capture any frames. |
LegacyToolArtifactMigrationRollbackExecutor
Reverses only Artifacts proven to have been created by a specific migration report. Revision fences prevent rollback from deleting a later mutation.
- Kind: class
- Import:
import { LegacyToolArtifactMigrationRollbackExecutor } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export declare class LegacyToolArtifactMigrationRollbackExecutor {
constructor(options: LegacyToolArtifactMigrationRollbackExecutorOptions);
rollback(request: LegacyToolArtifactMigrationRollbackRequest): Promise<LegacyToolArtifactMigrationRollbackResult>;
}Public members
| Member | Kind | Signature | Description |
|---|---|---|---|
constructor | constructor | (options: LegacyToolArtifactMigrationRollbackExecutorOptions): LegacyToolArtifactMigrationRollbackExecutor | Creates an instance of this class. |
rollback | method | rollback(request: LegacyToolArtifactMigrationRollbackRequest): Promise<LegacyToolArtifactMigrationRollbackResult> | Public method; parameters and return type are shown in the signature. |
LegacyToolArtifactMigrationRollbackExecutorOptions
Legacy Tool Artifact Migration Rollback Executor Options interface with 1 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationRollbackExecutorOptions } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export interface LegacyToolArtifactMigrationRollbackExecutorOptions {
manager: Pick<ArtifactManager, 'get' | 'delete'>;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
manager | property | manager: Pick<ArtifactManager, "delete" | "get"> | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationRollbackItem
Legacy Tool Artifact Migration Rollback Item interface with 8 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationRollbackItem } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export interface LegacyToolArtifactMigrationRollbackItem {
relativePath: string;
legacyArtifactId: string;
artifactId: string;
versionId: string;
revision: number;
target: LegacyToolArtifactMigrationTargetSummary;
status: 'dry_run' | 'rolled_back' | 'already_absent' | 'failed';
failure?: LegacyToolArtifactMigrationFailure;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
artifactId | property | artifactId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
failure | property | failure?: LegacyToolArtifactMigrationFailure | Public property; its type, readonly modifier and optionality are shown in the signature. |
legacyArtifactId | property | legacyArtifactId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
relativePath | property | relativePath: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
revision | property | revision: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
status | property | status: "failed" | "rolled_back" | "dry_run" | "already_absent" | Public property; its type, readonly modifier and optionality are shown in the signature. |
target | property | target: LegacyToolArtifactMigrationTargetSummary | Public property; its type, readonly modifier and optionality are shown in the signature. |
versionId | property | versionId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationRollbackRequest
Legacy Tool Artifact Migration Rollback Request interface with 3 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationRollbackRequest } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export interface LegacyToolArtifactMigrationRollbackRequest {
plan: LegacyToolArtifactMigrationPlan;
execution: LegacyToolArtifactMigrationExecutionResult;
dryRun?: boolean;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
dryRun | property | dryRun?: boolean | Public property; its type, readonly modifier and optionality are shown in the signature. |
execution | property | execution: LegacyToolArtifactMigrationExecutionResult | Public property; its type, readonly modifier and optionality are shown in the signature. |
plan | property | plan: LegacyToolArtifactMigrationPlan | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationRollbackResult
Legacy Tool Artifact Migration Rollback Result interface with 6 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationRollbackResult } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export interface LegacyToolArtifactMigrationRollbackResult {
planHash: string;
executionReportId: string;
reportId: string;
mode: 'dry_run' | 'rollback';
items: LegacyToolArtifactMigrationRollbackItem[];
summary: LegacyToolArtifactMigrationRollbackSummary;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
executionReportId | property | executionReportId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
items | property | items: LegacyToolArtifactMigrationRollbackItem[] | Public property; its type, readonly modifier and optionality are shown in the signature. |
mode | property | mode: "rollback" | "dry_run" | Public property; its type, readonly modifier and optionality are shown in the signature. |
planHash | property | planHash: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
reportId | property | reportId: string | Public property; its type, readonly modifier and optionality are shown in the signature. |
summary | property | summary: LegacyToolArtifactMigrationRollbackSummary | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationRollbackSummary
Legacy Tool Artifact Migration Rollback Summary interface with 5 public fields or methods.
- Kind: interface
- Import:
import type { LegacyToolArtifactMigrationRollbackSummary } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export interface LegacyToolArtifactMigrationRollbackSummary {
candidates: number;
dryRun: number;
rolledBack: number;
alreadyAbsent: number;
failed: number;
}Contract members
| Member | Kind | Signature | Description |
|---|---|---|---|
alreadyAbsent | property | alreadyAbsent: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
candidates | property | candidates: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
dryRun | property | dryRun: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
failed | property | failed: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
rolledBack | property | rolledBack: number | Public property; its type, readonly modifier and optionality are shown in the signature. |
LegacyToolArtifactMigrationRollbackErrorCode
Public type alias for Legacy Tool Artifact Migration Rollback Error Code; the declaration contains its complete type expression.
- Kind: type
- Import:
import type { LegacyToolArtifactMigrationRollbackErrorCode } from '@codesoul-co/hypha-adapters-local'; - Source module:
legacy-tool-artifact-migration-rollback
Declaration
export type LegacyToolArtifactMigrationRollbackErrorCode = 'LEGACY_MIGRATION_ROLLBACK_INVALID_REPORT' | 'LEGACY_MIGRATION_ROLLBACK_TARGET_MISMATCH';