BuildComponentModel
Defined in: packages/core/src/models/build-component.ts:21
Data operations for the components each published build holds.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new BuildComponentModel(
db,tables?):BuildComponentModel
Defined in: packages/core/src/models/build-component.ts:25
Parameters
Section titled “Parameters”tables?
Section titled “tables?”Returns
Section titled “Returns”BuildComponentModel
Methods
Section titled “Methods”listByBuild()
Section titled “listByBuild()”listByBuild(
buildId):Promise<BuildComponent[]>
Defined in: packages/core/src/models/build-component.ts:31
Components of one build, ordered by title then file.
Parameters
Section titled “Parameters”buildId
Section titled “buildId”string
Returns
Section titled “Returns”Promise<BuildComponent[]>
listByImportPath()
Section titled “listByImportPath()”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”.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
importPath
Section titled “importPath”string
Returns
Section titled “Returns”Promise<BuildComponent[]>
removeForBuild()
Section titled “removeForBuild()”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).
Parameters
Section titled “Parameters”buildId
Section titled “buildId”string
Returns
Section titled “Returns”Promise<number>
replaceForBuild()
Section titled “replaceForBuild()”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.
Parameters
Section titled “Parameters”projectId
Section titled “projectId”string
buildId
Section titled “buildId”string
components
Section titled “components”readonly BuildComponentInput[]
Returns
Section titled “Returns”Promise<void>