Skip to main content

MigrationStep

HardKAS SDK


HardKAS SDK / artifacts/src / MigrationStep

Interface: MigrationStep

Defined in: packages/artifacts/src/migration.ts:22

A single versioned migration step that transforms an artifact payload from one schema version to the next.

Properties​

description​

readonly description: string

Defined in: packages/artifacts/src/migration.ts:28

Human-readable description of what this migration does


fromVersion​

readonly fromVersion: string

Defined in: packages/artifacts/src/migration.ts:24

Source version string (e.g., "0.1.0", "1.0.0-alpha")


toVersion​

readonly toVersion: string

Defined in: packages/artifacts/src/migration.ts:26

Target version string

Methods​

transform()​

transform(artifact): ArtifactPayload

Defined in: packages/artifacts/src/migration.ts:33

Transform function. Receives a shallow clone of the artifact payload and returns the migrated payload. MUST NOT mutate the input.

Parameters​

artifact​

ArtifactPayload

Returns​

ArtifactPayload