Skip to content

craft-hub / SoftwareCatalogService

Class: SoftwareCatalogService ​

Defined in: packages/craft-hub/src/software-catalog.ts:186

Validate and isolate independent catalogs without executing metadata or exposing raw errors.

Constructors ​

Constructor ​

new SoftwareCatalogService(providers?, bundledCatalogs?): SoftwareCatalogService

Defined in: packages/craft-hub/src/software-catalog.ts:189

Parameters ​

providers? ​

SoftwareCatalogProvider[] = []

bundledCatalogs? ​

object[] = []

Returns ​

SoftwareCatalogService

Methods ​

cancel() ​

cancel(sourceId, runId): Promise<{ createdAt: string; id: string; items: object[]; planId: string; retryOf?: string; sourceId: string; state: "waiting" | "cancelled" | "running" | "completed" | "failed" | "queued" | "cancelling" | "interrupted"; updatedAt: string; version: 1; }>

Defined in: packages/craft-hub/src/software-catalog.ts:286

Request cancellation through the owner of the worker and process group.

Parameters ​

sourceId ​

string

runId ​

string

Returns ​

Promise<{ createdAt: string; id: string; items: object[]; planId: string; retryOf?: string; sourceId: string; state: "waiting" | "cancelled" | "running" | "completed" | "failed" | "queued" | "cancelling" | "interrupted"; updatedAt: string; version: 1; }>


install() ​

install(sourceId, planId, confirmed): Promise<{ createdAt: string; id: string; items: object[]; planId: string; retryOf?: string; sourceId: string; state: "waiting" | "cancelled" | "running" | "completed" | "failed" | "queued" | "cancelling" | "interrupted"; updatedAt: string; version: 1; }>

Defined in: packages/craft-hub/src/software-catalog.ts:263

Start an explicitly confirmed provider plan; the adapter checks freshness and idempotency.

Parameters ​

sourceId ​

string

planId ​

string

confirmed ​

boolean

Returns ​

Promise<{ createdAt: string; id: string; items: object[]; planId: string; retryOf?: string; sourceId: string; state: "waiting" | "cancelled" | "running" | "completed" | "failed" | "queued" | "cancelling" | "interrupted"; updatedAt: string; version: 1; }>


open() ​

open(sourceId, softwareId): Promise<{ destination: "application"; softwareId: string; version: 1; }>

Defined in: packages/craft-hub/src/software-catalog.ts:297

Open one application by catalog identity; no browser-supplied application paths.

Parameters ​

sourceId ​

string

softwareId ​

string

Returns ​

Promise<{ destination: "application"; softwareId: string; version: 1; }>


preview() ​

preview(sourceId, softwareIds): Promise<{ createdAt: string; id: string; items: object[]; prerequisites: string[]; sourceId: string; version: 1; }>

Defined in: packages/craft-hub/src/software-catalog.ts:252

Review selected identifiers through the configured provider without executing software.

Parameters ​

sourceId ​

string

softwareIds ​

string[]

Returns ​

Promise<{ createdAt: string; id: string; items: object[]; prerequisites: string[]; sourceId: string; version: 1; }>


runs() ​

runs(sourceId): Promise<{ runs: object[]; version: 1; }>

Defined in: packages/craft-hub/src/software-catalog.ts:276

Read persisted runs, independent of the project registry or project trust.

Parameters ​

sourceId ​

string

Returns ​

Promise<{ runs: object[]; version: 1; }>


snapshot() ​

snapshot(__namedParameters?): Promise<SoftwareCatalogSnapshot>

Defined in: packages/craft-hub/src/software-catalog.ts:200

Read fresh metadata from configured host providers; no installation or project trust changes.

Parameters ​

__namedParameters? ​
localDiscovery? ​

boolean = true

repositories? ​

object[] = []

Returns ​

Promise<SoftwareCatalogSnapshot>

Released under the MIT License.