Skip to content

BuildComponentModel

Defined in: packages/core/src/models/build-component.ts:21

Data operations for the components each published build holds.

new BuildComponentModel(db, tables?): BuildComponentModel

Defined in: packages/core/src/models/build-component.ts:25

DatabaseAdapter

BuildComponentTables

BuildComponentModel

listByBuild(buildId): Promise<BuildComponent[]>

Defined in: packages/core/src/models/build-component.ts:31

Components of one build, ordered by title then file.

string

Promise<BuildComponent[]>


listByImportPath(projectId, importPath): Promise<BuildComponent[]>

Defined in: packages/core/src/models/build-component.ts:42

Rows of one story file across the project’s builds, newest first: “which builds contain it”.

string

string

Promise<BuildComponent[]>


removeForBuild(buildId): Promise<number>

Defined in: packages/core/src/models/build-component.ts:74

Forget a build’s rows (the foreign key cascades too; stub tables have none).

string

Promise<number>


replaceForBuild(projectId, buildId, components): Promise<void>

Defined in: packages/core/src/models/build-component.ts:54

Replace a build’s rows with components; repeating a publish never duplicates.

string

string

readonly BuildComponentInput[]

Promise<void>