@teambit/builder 0.0.1150 → 0.0.1153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { ComponentID, Component } from '@teambit/component';
2
2
  import type { ArtifactObject } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';
3
3
  import { TaskResults } from './build-pipe';
4
- import { Serializable, TaskMetadata } from './types';
4
+ import { TaskMetadata } from './types';
5
5
  export declare type PipelineReport = {
6
6
  taskId: string;
7
7
  taskName: string;
@@ -13,7 +13,7 @@ export declare type PipelineReport = {
13
13
  };
14
14
  export declare type AspectData = {
15
15
  aspectId: string;
16
- data: Serializable;
16
+ data: TaskMetadata;
17
17
  };
18
18
  /**
19
19
  * Helper to get the data and artifacts from the TasksResultsList before saving during the tag
@@ -1 +1 @@
1
- {"version":3,"names":["_component","data","require","_lodash","_artifact","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","BuildPipelineResultList","constructor","tasksResults","components","artifactListsMap","getFlattenedArtifactListsMapFromAllTasks","artifactListsMaps","flatMap","t","artifacts","ComponentMap","as","component","artifactListMap","artifactList","getValueByComponentId","id","ArtifactList","fromArray","getMetadataFromTaskResults","componentId","compResults","reduce","acc","current","foundComponent","componentsResults","find","c","isEqual","taskId","task","aspectId","metadata","mergeDataIfPossible","getPipelineReportOfComponent","map","taskResults","pipelineReport","taskName","name","taskDescription","description","errors","warnings","startTime","endTime","compact","getDataOfComponent","tasksData","getArtifactsDataOfComponent","_this$artifactListsMa","toObject","currentData","existingData","isEmpty","Error","Array","isArray","exports"],"sources":["build-pipeline-result-list.ts"],"sourcesContent":["import { ComponentID, ComponentMap, Component } from '@teambit/component';\nimport { isEmpty, compact } from 'lodash';\nimport type { ArtifactObject } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';\nimport { Artifact, ArtifactList } from './artifact';\nimport { TaskResults } from './build-pipe';\nimport { Serializable, TaskMetadata } from './types';\n\nexport type PipelineReport = {\n taskId: string; // task aspect-id\n taskName: string;\n taskDescription?: string;\n startTime?: number;\n endTime?: number;\n errors?: Array<Error | string>;\n warnings?: string[];\n};\n\nexport type AspectData = {\n aspectId: string;\n data: Serializable;\n};\n\n/**\n * Helper to get the data and artifacts from the TasksResultsList before saving during the tag\n */\nexport class BuildPipelineResultList {\n private artifactListsMap: ComponentMap<ArtifactList<Artifact>>;\n constructor(private tasksResults: TaskResults[], private components: Component[]) {\n this.artifactListsMap = this.getFlattenedArtifactListsMapFromAllTasks();\n }\n\n private getFlattenedArtifactListsMapFromAllTasks(): ComponentMap<ArtifactList<Artifact>> {\n const artifactListsMaps = this.tasksResults.flatMap((t) => (t.artifacts ? [t.artifacts] : []));\n return ComponentMap.as<ArtifactList<Artifact>>(this.components, (component) => {\n const artifacts: Artifact[] = [];\n artifactListsMaps.forEach((artifactListMap) => {\n const artifactList = artifactListMap.getValueByComponentId(component.id);\n if (artifactList) artifacts.push(...artifactList);\n });\n return ArtifactList.fromArray(artifacts);\n });\n }\n\n public getMetadataFromTaskResults(componentId: ComponentID): { [taskId: string]: TaskMetadata } {\n const compResults = this.tasksResults.reduce((acc, current: TaskResults) => {\n const foundComponent = current.componentsResults.find((c) => c.component.id.isEqual(componentId));\n const taskId = current.task.aspectId;\n if (foundComponent && foundComponent.metadata) {\n acc[taskId] = this.mergeDataIfPossible(foundComponent.metadata, acc[taskId], taskId);\n }\n return acc;\n }, {});\n return compResults;\n }\n\n public getPipelineReportOfComponent(componentId: ComponentID): PipelineReport[] {\n const compResults = this.tasksResults.map((taskResults: TaskResults) => {\n const foundComponent = taskResults.componentsResults.find((c) => c.component.id.isEqual(componentId));\n if (!foundComponent) return null;\n const pipelineReport: PipelineReport = {\n taskId: taskResults.task.aspectId,\n taskName: taskResults.task.name,\n taskDescription: taskResults.task.description,\n errors: foundComponent.errors,\n warnings: foundComponent.warnings,\n startTime: foundComponent.startTime,\n endTime: foundComponent.endTime,\n };\n return pipelineReport;\n });\n return compact(compResults);\n }\n\n public getDataOfComponent(componentId: ComponentID): AspectData[] {\n const tasksData = this.getMetadataFromTaskResults(componentId);\n return Object.keys(tasksData).map((taskId) => ({\n aspectId: taskId,\n data: tasksData[taskId],\n }));\n }\n\n public getArtifactsDataOfComponent(componentId: ComponentID): ArtifactObject[] | undefined {\n return this.artifactListsMap.getValueByComponentId(componentId)?.toObject();\n }\n\n private mergeDataIfPossible(currentData: Serializable, existingData: Serializable | undefined, taskId: string) {\n if (!existingData || isEmpty(existingData)) return currentData;\n // both exist\n if (typeof currentData !== 'object') {\n throw new Error(`task data must be \"object\", get ${typeof currentData} for ${taskId}`);\n }\n if (Array.isArray(currentData)) {\n throw new Error(`task data must be \"object\", get Array for ${taskId}`);\n }\n return { ...currentData, ...existingData };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoD,SAAAI,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CA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,OAAOA,WAAW,KAAK,QAAQ,EAAE;MACnC,MAAM,IAAIG,KAAK,CAAE,mCAAkC,OAAOH,WAAY,QAAOvB,MAAO,EAAC,CAAC;IACxF;IACA,IAAI2B,KAAK,CAACC,OAAO,CAACL,WAAW,CAAC,EAAE;MAC9B,MAAM,IAAIG,KAAK,CAAE,6CAA4C1B,MAAO,EAAC,CAAC;IACxE;IACA,OAAA3C,aAAA,CAAAA,aAAA,KAAYkE,WAAW,GAAKC,YAAY;EAC1C;AACF;AAACK,OAAA,CAAA3D,uBAAA,GAAAA,uBAAA"}
1
+ {"version":3,"names":["_component","data","require","_lodash","_artifact","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","BuildPipelineResultList","constructor","tasksResults","components","artifactListsMap","getFlattenedArtifactListsMapFromAllTasks","artifactListsMaps","flatMap","t","artifacts","ComponentMap","as","component","artifactListMap","artifactList","getValueByComponentId","id","ArtifactList","fromArray","getMetadataFromTaskResults","componentId","compResults","reduce","acc","current","foundComponent","componentsResults","find","c","isEqual","taskId","task","aspectId","metadata","mergeDataIfPossible","getPipelineReportOfComponent","map","taskResults","pipelineReport","taskName","name","taskDescription","description","errors","warnings","startTime","endTime","compact","getDataOfComponent","tasksData","getArtifactsDataOfComponent","_this$artifactListsMa","toObject","currentData","existingData","isEmpty","Error","Array","isArray","exports"],"sources":["build-pipeline-result-list.ts"],"sourcesContent":["import { ComponentID, ComponentMap, Component } from '@teambit/component';\nimport { isEmpty, compact } from 'lodash';\nimport type { ArtifactObject } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';\nimport { Artifact, ArtifactList } from './artifact';\nimport { TaskResults } from './build-pipe';\nimport { TaskMetadata } from './types';\n\nexport type PipelineReport = {\n taskId: string; // task aspect-id\n taskName: string;\n taskDescription?: string;\n startTime?: number;\n endTime?: number;\n errors?: Array<Error | string>;\n warnings?: string[];\n};\n\nexport type AspectData = {\n aspectId: string;\n data: TaskMetadata;\n};\n\n/**\n * Helper to get the data and artifacts from the TasksResultsList before saving during the tag\n */\nexport class BuildPipelineResultList {\n private artifactListsMap: ComponentMap<ArtifactList<Artifact>>;\n constructor(private tasksResults: TaskResults[], private components: Component[]) {\n this.artifactListsMap = this.getFlattenedArtifactListsMapFromAllTasks();\n }\n\n private getFlattenedArtifactListsMapFromAllTasks(): ComponentMap<ArtifactList<Artifact>> {\n const artifactListsMaps = this.tasksResults.flatMap((t) => (t.artifacts ? [t.artifacts] : []));\n return ComponentMap.as<ArtifactList<Artifact>>(this.components, (component) => {\n const artifacts: Artifact[] = [];\n artifactListsMaps.forEach((artifactListMap) => {\n const artifactList = artifactListMap.getValueByComponentId(component.id);\n if (artifactList) artifacts.push(...artifactList);\n });\n return ArtifactList.fromArray(artifacts);\n });\n }\n\n public getMetadataFromTaskResults(componentId: ComponentID): { [taskId: string]: TaskMetadata } {\n const compResults = this.tasksResults.reduce((acc, current: TaskResults) => {\n const foundComponent = current.componentsResults.find((c) => c.component.id.isEqual(componentId));\n const taskId = current.task.aspectId;\n if (foundComponent && foundComponent.metadata) {\n acc[taskId] = this.mergeDataIfPossible(foundComponent.metadata, acc[taskId], taskId);\n }\n return acc;\n }, {});\n return compResults;\n }\n\n public getPipelineReportOfComponent(componentId: ComponentID): PipelineReport[] {\n const compResults = this.tasksResults.map((taskResults: TaskResults) => {\n const foundComponent = taskResults.componentsResults.find((c) => c.component.id.isEqual(componentId));\n if (!foundComponent) return null;\n const pipelineReport: PipelineReport = {\n taskId: taskResults.task.aspectId,\n taskName: taskResults.task.name,\n taskDescription: taskResults.task.description,\n errors: foundComponent.errors,\n warnings: foundComponent.warnings,\n startTime: foundComponent.startTime,\n endTime: foundComponent.endTime,\n };\n return pipelineReport;\n });\n return compact(compResults);\n }\n\n public getDataOfComponent(componentId: ComponentID): AspectData[] {\n const tasksData = this.getMetadataFromTaskResults(componentId);\n return Object.keys(tasksData).map((taskId) => ({\n aspectId: taskId,\n data: tasksData[taskId],\n }));\n }\n\n public getArtifactsDataOfComponent(componentId: ComponentID): ArtifactObject[] | undefined {\n return this.artifactListsMap.getValueByComponentId(componentId)?.toObject();\n }\n\n private mergeDataIfPossible(currentData: TaskMetadata, existingData: TaskMetadata | undefined, taskId: string) {\n if (!existingData || isEmpty(existingData)) return currentData;\n // both exist\n if (typeof currentData !== 'object') {\n throw new Error(`task data must be \"object\", get ${typeof currentData} for ${taskId}`);\n }\n if (Array.isArray(currentData)) {\n throw new Error(`task data must be \"object\", get Array for ${taskId}`);\n }\n return { ...currentData, ...existingData };\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,WAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,UAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAE,QAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAG,UAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,SAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAAoD,SAAAI,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAA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AC,EAAE;MAC9B,MAAM,IAAIG,KAAK,CAAE,6CAA4C1B,MAAO,EAAC,CAAC;IACxE;IACA,OAAA3C,aAAA,CAAAA,aAAA,KAAYkE,WAAW,GAAKC,YAAY;EAC1C;AACF;AAACK,OAAA,CAAA3D,uBAAA,GAAAA,uBAAA"}
@@ -72,9 +72,6 @@ export declare function builderSchema(builder: BuilderMain, logger: Logger): {
72
72
  taskName: string;
73
73
  taskDescription?: string | undefined;
74
74
  startTime?: number | undefined;
75
- /**
76
- * artifact file content (only for text files). Use /api/<component-id>/~aspect/builder/<extension-id>/~<path> to fetch binary file data
77
- */
78
75
  endTime?: number | undefined;
79
76
  errors?: (string | Error)[] | undefined;
80
77
  warnings?: string[] | undefined;
@@ -18,7 +18,7 @@ import { BuilderService, BuilderServiceOptions } from './builder.service';
18
18
  import { BuildTask } from './build-task';
19
19
  import { TaskResultsList } from './task-results-list';
20
20
  import { AspectData, PipelineReport } from './build-pipeline-result-list';
21
- import { Serializable } from './types';
21
+ import { TaskMetadata } from './types';
22
22
  export declare type TaskSlot = SlotRegistry<BuildTask[]>;
23
23
  export declare type OnTagResults = {
24
24
  builderDataMap: ComponentMap<RawBuilderData>;
@@ -75,7 +75,12 @@ export declare class BuilderMain {
75
75
  getArtifactsByAspect(component: Component, aspectName: string): ArtifactList<Artifact>;
76
76
  getArtifactsByAspectAndName(component: Component, aspectName: string, name: string): ArtifactList<Artifact>;
77
77
  getArtifactsbyAspectAndTaskName(component: IComponent, aspectName: string, taskName: string): ArtifactList<Artifact>;
78
- getDataByAspect(component: IComponent, aspectName: string): Serializable | undefined;
78
+ /**
79
+ * this is the aspect's data that was generated as "metadata" of the task component-result during the build process
80
+ * and saved by the builder aspect in the "aspectsData" property.
81
+ * (not to be confused with the data saved in the aspect itself, which is saved in the "data" property of the aspect).
82
+ */
83
+ getDataByAspect(component: IComponent, aspectName: string): TaskMetadata | undefined;
79
84
  getArtifacts(component: IComponent): ArtifactList<Artifact>;
80
85
  getBuilderData(component: IComponent): BuilderData | undefined;
81
86
  build(components: Component[], isolateOptions?: IsolateComponentsOptions, builderOptions?: BuilderServiceOptions): Promise<TaskResultsList>;
@@ -398,6 +398,12 @@ class BuilderMain {
398
398
  const artifacts = this.getArtifacts(component).byAspectNameAndTaskName(aspectName, taskName);
399
399
  return artifacts;
400
400
  }
401
+
402
+ /**
403
+ * this is the aspect's data that was generated as "metadata" of the task component-result during the build process
404
+ * and saved by the builder aspect in the "aspectsData" property.
405
+ * (not to be confused with the data saved in the aspect itself, which is saved in the "data" property of the aspect).
406
+ */
401
407
  getDataByAspect(component, aspectName) {
402
408
  var _this$getBuilderData;
403
409
  const aspectsData = (_this$getBuilderData = this.getBuilderData(component)) === null || _this$getBuilderData === void 0 ? void 0 : _this$getBuilderData.aspectsData;
@@ -1 +1 @@
1
- {"version":3,"names":["_lodash","data","require","_artifactFiles","_aspectLoader","_cli","_component","_envs","_graphql","_harmony","_globalConfig","_interopRequireDefault","_logger","_aspect","_scope","_workspace","_isolator","_bootstrap","_findDuplications","_generator","_ui","_artifact","_artifactFactory","_builder","_builder2","_builder3","_build","_buildTask","_exceptions","_buildPipelineResultList","_artifacts","_buildTask2","_builder4","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","FILE_PATH_PARAM_DELIM","exports","BuilderMain","constructor","envs","workspace","buildService","tagService","snapService","scope","isolator","aspectLoader","componentAspect","globalConfig","buildTaskSlot","tagTaskSlot","snapTaskSlot","logger","storeArtifacts","tasksResults","artifacts","flatMap","t","storeP","map","artifactMap","Promise","all","toArray","component","artifactList","store","err","ArtifactStorageError","pipelineResultsToBuilderData","components","buildPipelineResults","buildPipelineResultList","BuildPipelineResultList","ComponentMap","as","aspectsData","getDataOfComponent","id","pipelineReport","getPipelineReportOfComponent","getArtifactsDataOfComponent","pipeline","bitVersion","getHarmonyVersion","tagListener","options","isolateOptions","builderOptions","pipeResults","allTasksResults","throwOnError","forceDeploy","disableTagAndSnapPipelines","isSnap","populateArtifactsFrom","buildEnvsExecutionResults","build","emptyRootDir","tasks","AspectAspect","undefined","throwErrorsIfExist","hasErrors","builderOptionsForTagSnap","seedersOnly","previousTasksResults","deployEnvsExecutionResults","runSnapTasks","runTagTasks","builderDataMap","combineBuildDataFrom","validateBuilderDataMap","buildData","taskSerializedIds","BuildTaskHelper","serializeId","aspectId","taskId","name","taskName","duplications","findDuplications","Error","toString","join","promises","builderData","populateFrom","find","isEqual","ignoreVersion","idStr","populateFromComp","getHost","get","version","populateFromBuilderData","getBuilderData","artifact","artifactObj","toObject","a","task","aspectData","p","flattenValue","getArtifactsVinylByAspect","aspectName","getArtifactsByAspect","vinyls","getVinylsAndImportIfMissing","_legacy","legacyScope","getArtifactsVinylByAspectAndName","getArtifactsByAspectAndName","getArtifactsVinylByAspectAndTaskName","getArtifactsbyAspectAndTaskName","getArtifactsByName","getArtifacts","byAspectNameAndName","byAspectNameAndTaskName","getDataByAspect","_this$getBuilderData","_this$getBuilderData2","ArtifactList","fromArray","_component$get","_clonedData$artifacts","BuilderAspect","clonedData","cloneDeep","artifactFiles","files","ArtifactFiles","fromObject","Artifact","assign","fromArtifactObject","ids","c","capsulesBaseDir","getComponentsCapsulesBaseDir","baseIsolateOpts","baseDir","useHash","mergedIsolateOpts","network","isolateComponents","createEnvironment","graphCapsules","getAllComponents","builderServiceOptions","originalSeeders","consoleTitle","buildResult","runOnce","listTasks","compEnv","getEnv","buildTasks","getCurrentPipeTasks","tagTasks","snapTasks","envId","registerBuildTasks","register","registerDeployTasks","registerTagTasks","registerSnapTasks","getDownloadUrlForArtifact","componentId","path","provider","cli","loggerExt","graphql","generator","ui","config","artifactFactory","ArtifactFactory","createLogger","BuilderService","registerService","builder","BundleUiTask","registerRoute","BuilderRoute","builderSchema","registerComponentTemplate","buildTaskTemplate","commands","BuilderCmd","ArtifactsCmd","Slot","withType","MainRuntime","CLIAspect","EnvsAspect","WorkspaceAspect","ScopeAspect","IsolatorAspect","LoggerAspect","AspectLoaderAspect","GraphqlAspect","GeneratorAspect","ComponentAspect","UIAspect","GlobalConfigAspect","addRuntime"],"sources":["builder.main.runtime.ts"],"sourcesContent":["import { cloneDeep } from 'lodash';\nimport { ArtifactVinyl } from '@teambit/legacy/dist/consumer/component/sources/artifact';\nimport { ArtifactFiles, ArtifactObject } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';\nimport { AspectLoaderAspect, AspectLoaderMain } from '@teambit/aspect-loader';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Component, ComponentMap, IComponent, ComponentAspect, ComponentMain, ComponentID } from '@teambit/component';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport GlobalConfigAspect, { GlobalConfigMain } from '@teambit/global-config';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport AspectAspect from '@teambit/aspect';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { IsolateComponentsOptions, IsolatorAspect, IsolatorMain } from '@teambit/isolator';\nimport { getHarmonyVersion } from '@teambit/legacy/dist/bootstrap';\nimport findDuplications from '@teambit/legacy/dist/utils/array/find-duplications';\nimport { GeneratorAspect, GeneratorMain } from '@teambit/generator';\nimport { UIAspect, UiMain, BundleUiTask } from '@teambit/ui';\nimport { Artifact, ArtifactList, FsArtifact } from './artifact';\nimport { ArtifactFactory } from './artifact/artifact-factory'; // it gets undefined when importing it from './artifact'\nimport { BuilderAspect } from './builder.aspect';\nimport { builderSchema } from './builder.graphql';\nimport { BuilderService, BuilderServiceOptions } from './builder.service';\nimport { BuilderCmd } from './build.cmd';\nimport { BuildTask, BuildTaskHelper } from './build-task';\nimport { TaskResults } from './build-pipe';\nimport { TaskResultsList } from './task-results-list';\nimport { ArtifactStorageError } from './exceptions';\nimport { BuildPipelineResultList, AspectData, PipelineReport } from './build-pipeline-result-list';\nimport { Serializable } from './types';\nimport { ArtifactsCmd } from './artifact/artifacts.cmd';\nimport { buildTaskTemplate } from './templates/build-task';\nimport { BuilderRoute } from './builder.route';\n\nexport type TaskSlot = SlotRegistry<BuildTask[]>;\nexport type OnTagResults = { builderDataMap: ComponentMap<RawBuilderData>; pipeResults: TaskResultsList[] };\nexport type OnTagOpts = {\n disableTagAndSnapPipelines?: boolean;\n throwOnError?: boolean; // on the CI it helps to save the results on failure so this is set to false\n forceDeploy?: boolean; // whether run the deploy-pipeline although the build-pipeline has failed\n populateArtifactsFrom?: ComponentID[]; // helpful for tagging from scope where we want to use the build-artifacts of previous snap.\n isSnap?: boolean;\n};\nexport const FILE_PATH_PARAM_DELIM = '~';\n\n/**\n * builder data format for the bit object store\n */\nexport type RawBuilderData = {\n pipeline: PipelineReport[];\n artifacts?: ArtifactObject[];\n aspectsData: AspectData[];\n bitVersion?: string;\n};\n/**\n * builder data mapped to an ArtifactList instance\n */\nexport type BuilderData = Omit<RawBuilderData, 'artifacts'> & {\n artifacts: ArtifactList<Artifact>;\n};\n\nexport class BuilderMain {\n constructor(\n private envs: EnvsMain,\n private workspace: Workspace,\n private buildService: BuilderService,\n private tagService: BuilderService,\n private snapService: BuilderService,\n private scope: ScopeMain,\n private isolator: IsolatorMain,\n private aspectLoader: AspectLoaderMain,\n private componentAspect: ComponentMain,\n private globalConfig: GlobalConfigMain,\n private buildTaskSlot: TaskSlot,\n private tagTaskSlot: TaskSlot,\n private snapTaskSlot: TaskSlot,\n private logger: Logger\n ) {}\n\n private async storeArtifacts(tasksResults: TaskResults[]) {\n const artifacts = tasksResults.flatMap((t) => (t.artifacts ? [t.artifacts] : []));\n const storeP = artifacts.map(async (artifactMap: ComponentMap<ArtifactList<FsArtifact>>) => {\n return Promise.all(\n artifactMap.toArray().map(async ([component, artifactList]) => {\n try {\n return await artifactList.store(component);\n } catch (err: any) {\n throw new ArtifactStorageError(err, component);\n }\n })\n );\n });\n await Promise.all(storeP);\n }\n\n private pipelineResultsToBuilderData(\n components: Component[],\n buildPipelineResults: TaskResults[]\n ): ComponentMap<RawBuilderData> {\n const buildPipelineResultList = new BuildPipelineResultList(buildPipelineResults, components);\n return ComponentMap.as<RawBuilderData>(components, (component) => {\n const aspectsData = buildPipelineResultList.getDataOfComponent(component.id);\n const pipelineReport = buildPipelineResultList.getPipelineReportOfComponent(component.id);\n const artifacts = buildPipelineResultList.getArtifactsDataOfComponent(component.id);\n return { pipeline: pipelineReport, artifacts, aspectsData, bitVersion: getHarmonyVersion(true) };\n });\n }\n\n async tagListener(\n components: Component[],\n options: OnTagOpts = {},\n isolateOptions: IsolateComponentsOptions = {},\n builderOptions: BuilderServiceOptions = {}\n ): Promise<OnTagResults> {\n const pipeResults: TaskResultsList[] = [];\n const allTasksResults: TaskResults[] = [];\n const { throwOnError, forceDeploy, disableTagAndSnapPipelines, isSnap, populateArtifactsFrom } = options;\n if (populateArtifactsFrom) isolateOptions.populateArtifactsFrom = populateArtifactsFrom;\n const buildEnvsExecutionResults = await this.build(\n components,\n { emptyRootDir: true, ...isolateOptions },\n {\n ...builderOptions,\n // even when build is skipped (in case of tag-from-scope), the pre-build/post-build and teambit.harmony/aspect tasks are needed\n tasks: populateArtifactsFrom ? [AspectAspect.id] : undefined,\n }\n );\n if (throwOnError && !forceDeploy) buildEnvsExecutionResults.throwErrorsIfExist();\n allTasksResults.push(...buildEnvsExecutionResults.tasksResults);\n pipeResults.push(buildEnvsExecutionResults);\n\n if (forceDeploy || (!disableTagAndSnapPipelines && !buildEnvsExecutionResults?.hasErrors())) {\n const builderOptionsForTagSnap: BuilderServiceOptions = {\n ...builderOptions,\n seedersOnly: isolateOptions.seedersOnly,\n previousTasksResults: buildEnvsExecutionResults?.tasksResults,\n };\n const deployEnvsExecutionResults = isSnap\n ? await this.runSnapTasks(components, builderOptionsForTagSnap)\n : await this.runTagTasks(components, builderOptionsForTagSnap);\n if (throwOnError && !forceDeploy) deployEnvsExecutionResults.throwErrorsIfExist();\n allTasksResults.push(...deployEnvsExecutionResults.tasksResults);\n pipeResults.push(deployEnvsExecutionResults);\n }\n await this.storeArtifacts(allTasksResults);\n const builderDataMap = this.pipelineResultsToBuilderData(components, allTasksResults);\n if (populateArtifactsFrom) await this.combineBuildDataFrom(builderDataMap, populateArtifactsFrom);\n this.validateBuilderDataMap(builderDataMap);\n\n return { builderDataMap, pipeResults };\n }\n\n private validateBuilderDataMap(builderDataMap: ComponentMap<RawBuilderData>) {\n builderDataMap.forEach((buildData: RawBuilderData, component) => {\n const taskSerializedIds = buildData.pipeline.map((t) =>\n BuildTaskHelper.serializeId({ aspectId: t.taskId, name: t.taskName })\n );\n const duplications = findDuplications(taskSerializedIds);\n if (duplications.length) {\n throw new Error(\n `build-task-results validation has failed. the following task(s) of \"${component.id.toString()}\" are duplicated: ${duplications.join(\n ', '\n )}`\n );\n }\n });\n }\n\n private async combineBuildDataFrom(\n builderDataMap: ComponentMap<RawBuilderData>,\n populateArtifactsFrom: ComponentID[]\n ) {\n const promises = builderDataMap.map(async (builderData, component) => {\n const populateFrom = populateArtifactsFrom.find((id) => id.isEqual(component.id, { ignoreVersion: true }));\n const idStr = component.id.toString();\n if (!populateFrom) {\n throw new Error(`combineBuildDataFromParent: unable to find where to populate the artifacts from for ${idStr}`);\n }\n const populateFromComp = await this.componentAspect.getHost().get(populateFrom);\n if (!populateFromComp)\n throw new Error(\n `combineBuildDataFromParent, unable to load parent component of ${idStr}. hash: ${populateFrom.version}`\n );\n const populateFromBuilderData = this.getBuilderData(populateFromComp);\n if (!populateFromBuilderData) throw new Error(`parent of ${idStr} was not built yet. unable to continue`);\n populateFromBuilderData.artifacts.forEach((artifact) => {\n const artifactObj = artifact.toObject();\n if (!builderData.artifacts) builderData.artifacts = [];\n if (\n builderData.artifacts.find((a) => a.task.id === artifactObj.task.id && a.task.name === artifactObj.task.name)\n ) {\n return;\n }\n builderData.artifacts.push(artifactObj);\n });\n populateFromBuilderData.aspectsData.forEach((aspectData) => {\n if (builderData.aspectsData.find((a) => a.aspectId === aspectData.aspectId)) return;\n builderData.aspectsData.push(aspectData);\n });\n populateFromBuilderData.pipeline.forEach((pipeline) => {\n if (builderData.pipeline.find((p) => p.taskId === pipeline.taskId && p.taskName === pipeline.taskName)) return;\n builderData.pipeline.push(pipeline);\n });\n });\n\n await Promise.all(promises.flattenValue());\n }\n\n // TODO: merge with getArtifactsVinylByExtensionAndName by getting aspect name and name as object with optional props\n async getArtifactsVinylByAspect(component: Component, aspectName: string): Promise<ArtifactVinyl[]> {\n const artifacts = this.getArtifactsByAspect(component, aspectName);\n const vinyls = await artifacts.getVinylsAndImportIfMissing(component.id._legacy, this.scope.legacyScope);\n return vinyls;\n }\n\n async getArtifactsVinylByAspectAndName(\n component: Component,\n aspectName: string,\n name: string\n ): Promise<ArtifactVinyl[]> {\n const artifacts = this.getArtifactsByAspectAndName(component, aspectName, name);\n const vinyls = await artifacts.getVinylsAndImportIfMissing(component.id._legacy, this.scope.legacyScope);\n return vinyls;\n }\n\n async getArtifactsVinylByAspectAndTaskName(\n component: Component,\n aspectName: string,\n name: string\n ): Promise<ArtifactVinyl[]> {\n const artifacts = this.getArtifactsbyAspectAndTaskName(component, aspectName, name);\n const vinyls = await artifacts.getVinylsAndImportIfMissing(component.id._legacy, this.scope.legacyScope);\n return vinyls;\n }\n\n getArtifactsByName(component: Component, name: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndName(undefined, name);\n return artifacts;\n }\n\n getArtifactsByAspect(component: Component, aspectName: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndName(aspectName);\n return artifacts;\n }\n\n getArtifactsByAspectAndName(component: Component, aspectName: string, name: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndName(aspectName, name);\n return artifacts;\n }\n\n getArtifactsbyAspectAndTaskName(component: IComponent, aspectName: string, taskName: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndTaskName(aspectName, taskName);\n return artifacts;\n }\n\n getDataByAspect(component: IComponent, aspectName: string): Serializable | undefined {\n const aspectsData = this.getBuilderData(component)?.aspectsData;\n const data = aspectsData?.find((aspectData) => aspectData.aspectId === aspectName);\n return data?.data;\n }\n\n getArtifacts(component: IComponent): ArtifactList<Artifact> {\n const artifacts = this.getBuilderData(component)?.artifacts || ArtifactList.fromArray([]);\n return artifacts;\n }\n\n getBuilderData(component: IComponent): BuilderData | undefined {\n const data = component.get(BuilderAspect.id)?.data;\n if (!data) return undefined;\n const clonedData = cloneDeep(data) as BuilderData;\n let artifactFiles: ArtifactFiles;\n const artifacts = clonedData.artifacts?.map((artifact) => {\n if (!(artifact.files instanceof ArtifactFiles)) {\n artifactFiles = ArtifactFiles.fromObject(artifact.files);\n } else {\n artifactFiles = artifact.files;\n }\n if (artifact instanceof Artifact) {\n return artifact;\n }\n Object.assign(artifact, { files: artifactFiles });\n return Artifact.fromArtifactObject(artifact);\n });\n clonedData.artifacts = ArtifactList.fromArray(artifacts || []);\n return clonedData;\n }\n\n async build(\n components: Component[],\n isolateOptions?: IsolateComponentsOptions,\n builderOptions?: BuilderServiceOptions\n ): Promise<TaskResultsList> {\n const ids = components.map((c) => c.id);\n const capsulesBaseDir = this.buildService.getComponentsCapsulesBaseDir();\n const baseIsolateOpts = {\n baseDir: capsulesBaseDir,\n useHash: !capsulesBaseDir,\n };\n const mergedIsolateOpts = {\n ...baseIsolateOpts,\n ...isolateOptions,\n };\n\n const network = await this.isolator.isolateComponents(ids, mergedIsolateOpts, this.scope.legacyScope);\n const envs = await this.envs.createEnvironment(network.graphCapsules.getAllComponents());\n const builderServiceOptions = {\n seedersOnly: isolateOptions?.seedersOnly,\n originalSeeders: ids,\n capsulesBaseDir,\n ...(builderOptions || {}),\n };\n this.logger.consoleTitle(`Total ${components.length} components to build`);\n const buildResult = await envs.runOnce(this.buildService, builderServiceOptions);\n return buildResult;\n }\n\n async runTagTasks(components: Component[], builderOptions: BuilderServiceOptions): Promise<TaskResultsList> {\n const envs = await this.envs.createEnvironment(components);\n const buildResult = await envs.runOnce(this.tagService, builderOptions);\n\n return buildResult;\n }\n\n async runSnapTasks(components: Component[], builderOptions: BuilderServiceOptions): Promise<TaskResultsList> {\n const envs = await this.envs.createEnvironment(components);\n const buildResult = await envs.runOnce(this.snapService, builderOptions);\n\n return buildResult;\n }\n\n listTasks(component: Component) {\n const compEnv = this.envs.getEnv(component);\n const buildTasks = this.buildService.getCurrentPipeTasks(compEnv);\n const tagTasks = this.tagService.getCurrentPipeTasks(compEnv);\n const snapTasks = this.snapService.getCurrentPipeTasks(compEnv);\n return { id: component.id, envId: compEnv.id, buildTasks, tagTasks, snapTasks };\n }\n\n /**\n * register a build task to apply on all component build pipelines.\n * build happens on `bit build` and as part of `bit tag --persist`.\n */\n registerBuildTasks(tasks: BuildTask[]) {\n this.buildTaskSlot.register(tasks);\n return this;\n }\n\n /**\n * @deprecated use registerTagTasks or registerSnapTasks\n */\n registerDeployTasks(tasks: BuildTask[]) {\n this.tagTaskSlot.register(tasks);\n return this;\n }\n\n /**\n * tag tasks that don't get executed on `bit build`, only on `bit tag'.\n * this pipeline is running once the build-pipeline has completed.\n */\n registerTagTasks(tasks: BuildTask[]) {\n this.tagTaskSlot.register(tasks);\n return this;\n }\n\n /**\n * tag tasks that don't get executed on `bit build`, only on `bit snap'.\n * this pipeline is running once the build-pipeline has completed.\n */\n registerSnapTasks(tasks: BuildTask[]) {\n this.snapTaskSlot.register(tasks);\n return this;\n }\n\n getDownloadUrlForArtifact(componentId: ComponentID, taskId: string, path?: string) {\n return `/api/${componentId}/~aspect/builder/${taskId}/${path ? `${FILE_PATH_PARAM_DELIM}${path}` : ''}`;\n }\n\n static slots = [Slot.withType<BuildTask>(), Slot.withType<BuildTask>(), Slot.withType<BuildTask>()];\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n EnvsAspect,\n WorkspaceAspect,\n ScopeAspect,\n IsolatorAspect,\n LoggerAspect,\n AspectLoaderAspect,\n GraphqlAspect,\n GeneratorAspect,\n ComponentAspect,\n UIAspect,\n GlobalConfigAspect,\n ];\n\n static async provider(\n [cli, envs, workspace, scope, isolator, loggerExt, aspectLoader, graphql, generator, component, ui, globalConfig]: [\n CLIMain,\n EnvsMain,\n Workspace,\n ScopeMain,\n IsolatorMain,\n LoggerMain,\n AspectLoaderMain,\n GraphqlMain,\n GeneratorMain,\n ComponentMain,\n UiMain,\n GlobalConfigMain\n ],\n config,\n [buildTaskSlot, tagTaskSlot, snapTaskSlot]: [TaskSlot, TaskSlot, TaskSlot]\n ) {\n const artifactFactory = new ArtifactFactory();\n const logger = loggerExt.createLogger(BuilderAspect.id);\n const buildService = new BuilderService(\n isolator,\n logger,\n buildTaskSlot,\n 'getBuildPipe',\n 'build',\n artifactFactory,\n scope,\n globalConfig\n );\n envs.registerService(buildService);\n const tagService = new BuilderService(\n isolator,\n logger,\n tagTaskSlot,\n 'getTagPipe',\n 'tag',\n artifactFactory,\n scope,\n globalConfig\n );\n const snapService = new BuilderService(\n isolator,\n logger,\n snapTaskSlot,\n 'getSnapPipe',\n 'snap',\n artifactFactory,\n scope,\n globalConfig\n );\n const builder = new BuilderMain(\n envs,\n workspace,\n buildService,\n tagService,\n snapService,\n scope,\n isolator,\n aspectLoader,\n component,\n globalConfig,\n buildTaskSlot,\n tagTaskSlot,\n snapTaskSlot,\n logger\n );\n builder.registerBuildTasks([new BundleUiTask(ui, logger)]);\n component.registerRoute([new BuilderRoute(builder, scope, logger)]);\n graphql.register(builderSchema(builder, logger));\n if (generator) generator.registerComponentTemplate([buildTaskTemplate]);\n const commands = [new BuilderCmd(builder, workspace, logger), new ArtifactsCmd(builder, component)];\n cli.register(...commands);\n\n return builder;\n }\n}\n\nBuilderAspect.addRuntime(BuilderMain);\n"],"mappings":";;;;;;;;;;;;;;;;;;A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AG,CAACR,QAAQ,CAAC,GAAG0B,QAAQ,CAAC;IAEzB,OAAOP,OAAO;EAChB;AACF;AAAC7L,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAAA,IAAAP,gBAAA,GAAAC,OAAA,EA1ZYM,WAAW,WA4TP,CAACsM,eAAI,CAACC,QAAQ,CAAY,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAY,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAY,CAAC,CAAC;AAAA,IAAA9M,gBAAA,GAAAC,OAAA,EA5TxFM,WAAW,aA8TLwM,kBAAW;AAAA,IAAA/M,gBAAA,GAAAC,OAAA,EA9TjBM,WAAW,kBA+TA,CACpByM,gBAAS,EACTC,kBAAU,EACVC,4BAAe,EACfC,oBAAW,EACXC,0BAAc,EACdC,sBAAY,EACZC,kCAAkB,EAClBC,wBAAa,EACbC,4BAAe,EACfC,4BAAe,EACfC,cAAQ,EACRC,uBAAkB,CACnB;AAgFHhF,wBAAa,CAACiF,UAAU,CAACrN,WAAW,CAAC"}
1
+ {"version":3,"names":["_lodash","data","require","_artifactFiles","_aspectLoader","_cli","_component","_envs","_graphql","_harmony","_globalConfig","_interopRequireDefault","_logger","_aspect","_scope","_workspace","_isolator","_bootstrap","_findDuplications","_generator","_ui","_artifact","_artifactFactory","_builder","_builder2","_builder3","_build","_buildTask","_exceptions","_buildPipelineResultList","_artifacts","_buildTask2","_builder4","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty2","default","getOwnPropertyDescriptors","defineProperties","defineProperty","FILE_PATH_PARAM_DELIM","exports","BuilderMain","constructor","envs","workspace","buildService","tagService","snapService","scope","isolator","aspectLoader","componentAspect","globalConfig","buildTaskSlot","tagTaskSlot","snapTaskSlot","logger","storeArtifacts","tasksResults","artifacts","flatMap","t","storeP","map","artifactMap","Promise","all","toArray","component","artifactList","store","err","ArtifactStorageError","pipelineResultsToBuilderData","components","buildPipelineResults","buildPipelineResultList","BuildPipelineResultList","ComponentMap","as","aspectsData","getDataOfComponent","id","pipelineReport","getPipelineReportOfComponent","getArtifactsDataOfComponent","pipeline","bitVersion","getHarmonyVersion","tagListener","options","isolateOptions","builderOptions","pipeResults","allTasksResults","throwOnError","forceDeploy","disableTagAndSnapPipelines","isSnap","populateArtifactsFrom","buildEnvsExecutionResults","build","emptyRootDir","tasks","AspectAspect","undefined","throwErrorsIfExist","hasErrors","builderOptionsForTagSnap","seedersOnly","previousTasksResults","deployEnvsExecutionResults","runSnapTasks","runTagTasks","builderDataMap","combineBuildDataFrom","validateBuilderDataMap","buildData","taskSerializedIds","BuildTaskHelper","serializeId","aspectId","taskId","name","taskName","duplications","findDuplications","Error","toString","join","promises","builderData","populateFrom","find","isEqual","ignoreVersion","idStr","populateFromComp","getHost","get","version","populateFromBuilderData","getBuilderData","artifact","artifactObj","toObject","a","task","aspectData","p","flattenValue","getArtifactsVinylByAspect","aspectName","getArtifactsByAspect","vinyls","getVinylsAndImportIfMissing","_legacy","legacyScope","getArtifactsVinylByAspectAndName","getArtifactsByAspectAndName","getArtifactsVinylByAspectAndTaskName","getArtifactsbyAspectAndTaskName","getArtifactsByName","getArtifacts","byAspectNameAndName","byAspectNameAndTaskName","getDataByAspect","_this$getBuilderData","_this$getBuilderData2","ArtifactList","fromArray","_component$get","_clonedData$artifacts","BuilderAspect","clonedData","cloneDeep","artifactFiles","files","ArtifactFiles","fromObject","Artifact","assign","fromArtifactObject","ids","c","capsulesBaseDir","getComponentsCapsulesBaseDir","baseIsolateOpts","baseDir","useHash","mergedIsolateOpts","network","isolateComponents","createEnvironment","graphCapsules","getAllComponents","builderServiceOptions","originalSeeders","consoleTitle","buildResult","runOnce","listTasks","compEnv","getEnv","buildTasks","getCurrentPipeTasks","tagTasks","snapTasks","envId","registerBuildTasks","register","registerDeployTasks","registerTagTasks","registerSnapTasks","getDownloadUrlForArtifact","componentId","path","provider","cli","loggerExt","graphql","generator","ui","config","artifactFactory","ArtifactFactory","createLogger","BuilderService","registerService","builder","BundleUiTask","registerRoute","BuilderRoute","builderSchema","registerComponentTemplate","buildTaskTemplate","commands","BuilderCmd","ArtifactsCmd","Slot","withType","MainRuntime","CLIAspect","EnvsAspect","WorkspaceAspect","ScopeAspect","IsolatorAspect","LoggerAspect","AspectLoaderAspect","GraphqlAspect","GeneratorAspect","ComponentAspect","UIAspect","GlobalConfigAspect","addRuntime"],"sources":["builder.main.runtime.ts"],"sourcesContent":["import { cloneDeep } from 'lodash';\nimport { ArtifactVinyl } from '@teambit/legacy/dist/consumer/component/sources/artifact';\nimport { ArtifactFiles, ArtifactObject } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';\nimport { AspectLoaderAspect, AspectLoaderMain } from '@teambit/aspect-loader';\nimport { CLIAspect, CLIMain, MainRuntime } from '@teambit/cli';\nimport { Component, ComponentMap, IComponent, ComponentAspect, ComponentMain, ComponentID } from '@teambit/component';\nimport { EnvsAspect, EnvsMain } from '@teambit/envs';\nimport { GraphqlAspect, GraphqlMain } from '@teambit/graphql';\nimport { Slot, SlotRegistry } from '@teambit/harmony';\nimport GlobalConfigAspect, { GlobalConfigMain } from '@teambit/global-config';\nimport { Logger, LoggerAspect, LoggerMain } from '@teambit/logger';\nimport AspectAspect from '@teambit/aspect';\nimport { ScopeAspect, ScopeMain } from '@teambit/scope';\nimport { Workspace, WorkspaceAspect } from '@teambit/workspace';\nimport { IsolateComponentsOptions, IsolatorAspect, IsolatorMain } from '@teambit/isolator';\nimport { getHarmonyVersion } from '@teambit/legacy/dist/bootstrap';\nimport findDuplications from '@teambit/legacy/dist/utils/array/find-duplications';\nimport { GeneratorAspect, GeneratorMain } from '@teambit/generator';\nimport { UIAspect, UiMain, BundleUiTask } from '@teambit/ui';\nimport { Artifact, ArtifactList, FsArtifact } from './artifact';\nimport { ArtifactFactory } from './artifact/artifact-factory'; // it gets undefined when importing it from './artifact'\nimport { BuilderAspect } from './builder.aspect';\nimport { builderSchema } from './builder.graphql';\nimport { BuilderService, BuilderServiceOptions } from './builder.service';\nimport { BuilderCmd } from './build.cmd';\nimport { BuildTask, BuildTaskHelper } from './build-task';\nimport { TaskResults } from './build-pipe';\nimport { TaskResultsList } from './task-results-list';\nimport { ArtifactStorageError } from './exceptions';\nimport { BuildPipelineResultList, AspectData, PipelineReport } from './build-pipeline-result-list';\nimport { TaskMetadata } from './types';\nimport { ArtifactsCmd } from './artifact/artifacts.cmd';\nimport { buildTaskTemplate } from './templates/build-task';\nimport { BuilderRoute } from './builder.route';\n\nexport type TaskSlot = SlotRegistry<BuildTask[]>;\nexport type OnTagResults = { builderDataMap: ComponentMap<RawBuilderData>; pipeResults: TaskResultsList[] };\nexport type OnTagOpts = {\n disableTagAndSnapPipelines?: boolean;\n throwOnError?: boolean; // on the CI it helps to save the results on failure so this is set to false\n forceDeploy?: boolean; // whether run the deploy-pipeline although the build-pipeline has failed\n populateArtifactsFrom?: ComponentID[]; // helpful for tagging from scope where we want to use the build-artifacts of previous snap.\n isSnap?: boolean;\n};\nexport const FILE_PATH_PARAM_DELIM = '~';\n\n/**\n * builder data format for the bit object store\n */\nexport type RawBuilderData = {\n pipeline: PipelineReport[];\n artifacts?: ArtifactObject[];\n aspectsData: AspectData[];\n bitVersion?: string;\n};\n/**\n * builder data mapped to an ArtifactList instance\n */\nexport type BuilderData = Omit<RawBuilderData, 'artifacts'> & {\n artifacts: ArtifactList<Artifact>;\n};\n\nexport class BuilderMain {\n constructor(\n private envs: EnvsMain,\n private workspace: Workspace,\n private buildService: BuilderService,\n private tagService: BuilderService,\n private snapService: BuilderService,\n private scope: ScopeMain,\n private isolator: IsolatorMain,\n private aspectLoader: AspectLoaderMain,\n private componentAspect: ComponentMain,\n private globalConfig: GlobalConfigMain,\n private buildTaskSlot: TaskSlot,\n private tagTaskSlot: TaskSlot,\n private snapTaskSlot: TaskSlot,\n private logger: Logger\n ) {}\n\n private async storeArtifacts(tasksResults: TaskResults[]) {\n const artifacts = tasksResults.flatMap((t) => (t.artifacts ? [t.artifacts] : []));\n const storeP = artifacts.map(async (artifactMap: ComponentMap<ArtifactList<FsArtifact>>) => {\n return Promise.all(\n artifactMap.toArray().map(async ([component, artifactList]) => {\n try {\n return await artifactList.store(component);\n } catch (err: any) {\n throw new ArtifactStorageError(err, component);\n }\n })\n );\n });\n await Promise.all(storeP);\n }\n\n private pipelineResultsToBuilderData(\n components: Component[],\n buildPipelineResults: TaskResults[]\n ): ComponentMap<RawBuilderData> {\n const buildPipelineResultList = new BuildPipelineResultList(buildPipelineResults, components);\n return ComponentMap.as<RawBuilderData>(components, (component) => {\n const aspectsData = buildPipelineResultList.getDataOfComponent(component.id);\n const pipelineReport = buildPipelineResultList.getPipelineReportOfComponent(component.id);\n const artifacts = buildPipelineResultList.getArtifactsDataOfComponent(component.id);\n return { pipeline: pipelineReport, artifacts, aspectsData, bitVersion: getHarmonyVersion(true) };\n });\n }\n\n async tagListener(\n components: Component[],\n options: OnTagOpts = {},\n isolateOptions: IsolateComponentsOptions = {},\n builderOptions: BuilderServiceOptions = {}\n ): Promise<OnTagResults> {\n const pipeResults: TaskResultsList[] = [];\n const allTasksResults: TaskResults[] = [];\n const { throwOnError, forceDeploy, disableTagAndSnapPipelines, isSnap, populateArtifactsFrom } = options;\n if (populateArtifactsFrom) isolateOptions.populateArtifactsFrom = populateArtifactsFrom;\n const buildEnvsExecutionResults = await this.build(\n components,\n { emptyRootDir: true, ...isolateOptions },\n {\n ...builderOptions,\n // even when build is skipped (in case of tag-from-scope), the pre-build/post-build and teambit.harmony/aspect tasks are needed\n tasks: populateArtifactsFrom ? [AspectAspect.id] : undefined,\n }\n );\n if (throwOnError && !forceDeploy) buildEnvsExecutionResults.throwErrorsIfExist();\n allTasksResults.push(...buildEnvsExecutionResults.tasksResults);\n pipeResults.push(buildEnvsExecutionResults);\n\n if (forceDeploy || (!disableTagAndSnapPipelines && !buildEnvsExecutionResults?.hasErrors())) {\n const builderOptionsForTagSnap: BuilderServiceOptions = {\n ...builderOptions,\n seedersOnly: isolateOptions.seedersOnly,\n previousTasksResults: buildEnvsExecutionResults?.tasksResults,\n };\n const deployEnvsExecutionResults = isSnap\n ? await this.runSnapTasks(components, builderOptionsForTagSnap)\n : await this.runTagTasks(components, builderOptionsForTagSnap);\n if (throwOnError && !forceDeploy) deployEnvsExecutionResults.throwErrorsIfExist();\n allTasksResults.push(...deployEnvsExecutionResults.tasksResults);\n pipeResults.push(deployEnvsExecutionResults);\n }\n await this.storeArtifacts(allTasksResults);\n const builderDataMap = this.pipelineResultsToBuilderData(components, allTasksResults);\n if (populateArtifactsFrom) await this.combineBuildDataFrom(builderDataMap, populateArtifactsFrom);\n this.validateBuilderDataMap(builderDataMap);\n\n return { builderDataMap, pipeResults };\n }\n\n private validateBuilderDataMap(builderDataMap: ComponentMap<RawBuilderData>) {\n builderDataMap.forEach((buildData: RawBuilderData, component) => {\n const taskSerializedIds = buildData.pipeline.map((t) =>\n BuildTaskHelper.serializeId({ aspectId: t.taskId, name: t.taskName })\n );\n const duplications = findDuplications(taskSerializedIds);\n if (duplications.length) {\n throw new Error(\n `build-task-results validation has failed. the following task(s) of \"${component.id.toString()}\" are duplicated: ${duplications.join(\n ', '\n )}`\n );\n }\n });\n }\n\n private async combineBuildDataFrom(\n builderDataMap: ComponentMap<RawBuilderData>,\n populateArtifactsFrom: ComponentID[]\n ) {\n const promises = builderDataMap.map(async (builderData, component) => {\n const populateFrom = populateArtifactsFrom.find((id) => id.isEqual(component.id, { ignoreVersion: true }));\n const idStr = component.id.toString();\n if (!populateFrom) {\n throw new Error(`combineBuildDataFromParent: unable to find where to populate the artifacts from for ${idStr}`);\n }\n const populateFromComp = await this.componentAspect.getHost().get(populateFrom);\n if (!populateFromComp)\n throw new Error(\n `combineBuildDataFromParent, unable to load parent component of ${idStr}. hash: ${populateFrom.version}`\n );\n const populateFromBuilderData = this.getBuilderData(populateFromComp);\n if (!populateFromBuilderData) throw new Error(`parent of ${idStr} was not built yet. unable to continue`);\n populateFromBuilderData.artifacts.forEach((artifact) => {\n const artifactObj = artifact.toObject();\n if (!builderData.artifacts) builderData.artifacts = [];\n if (\n builderData.artifacts.find((a) => a.task.id === artifactObj.task.id && a.task.name === artifactObj.task.name)\n ) {\n return;\n }\n builderData.artifacts.push(artifactObj);\n });\n populateFromBuilderData.aspectsData.forEach((aspectData) => {\n if (builderData.aspectsData.find((a) => a.aspectId === aspectData.aspectId)) return;\n builderData.aspectsData.push(aspectData);\n });\n populateFromBuilderData.pipeline.forEach((pipeline) => {\n if (builderData.pipeline.find((p) => p.taskId === pipeline.taskId && p.taskName === pipeline.taskName)) return;\n builderData.pipeline.push(pipeline);\n });\n });\n\n await Promise.all(promises.flattenValue());\n }\n\n // TODO: merge with getArtifactsVinylByExtensionAndName by getting aspect name and name as object with optional props\n async getArtifactsVinylByAspect(component: Component, aspectName: string): Promise<ArtifactVinyl[]> {\n const artifacts = this.getArtifactsByAspect(component, aspectName);\n const vinyls = await artifacts.getVinylsAndImportIfMissing(component.id._legacy, this.scope.legacyScope);\n return vinyls;\n }\n\n async getArtifactsVinylByAspectAndName(\n component: Component,\n aspectName: string,\n name: string\n ): Promise<ArtifactVinyl[]> {\n const artifacts = this.getArtifactsByAspectAndName(component, aspectName, name);\n const vinyls = await artifacts.getVinylsAndImportIfMissing(component.id._legacy, this.scope.legacyScope);\n return vinyls;\n }\n\n async getArtifactsVinylByAspectAndTaskName(\n component: Component,\n aspectName: string,\n name: string\n ): Promise<ArtifactVinyl[]> {\n const artifacts = this.getArtifactsbyAspectAndTaskName(component, aspectName, name);\n const vinyls = await artifacts.getVinylsAndImportIfMissing(component.id._legacy, this.scope.legacyScope);\n return vinyls;\n }\n\n getArtifactsByName(component: Component, name: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndName(undefined, name);\n return artifacts;\n }\n\n getArtifactsByAspect(component: Component, aspectName: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndName(aspectName);\n return artifacts;\n }\n\n getArtifactsByAspectAndName(component: Component, aspectName: string, name: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndName(aspectName, name);\n return artifacts;\n }\n\n getArtifactsbyAspectAndTaskName(component: IComponent, aspectName: string, taskName: string): ArtifactList<Artifact> {\n const artifacts = this.getArtifacts(component).byAspectNameAndTaskName(aspectName, taskName);\n return artifacts;\n }\n\n /**\n * this is the aspect's data that was generated as \"metadata\" of the task component-result during the build process\n * and saved by the builder aspect in the \"aspectsData\" property.\n * (not to be confused with the data saved in the aspect itself, which is saved in the \"data\" property of the aspect).\n */\n getDataByAspect(component: IComponent, aspectName: string): TaskMetadata | undefined {\n const aspectsData = this.getBuilderData(component)?.aspectsData;\n const data = aspectsData?.find((aspectData) => aspectData.aspectId === aspectName);\n return data?.data;\n }\n\n getArtifacts(component: IComponent): ArtifactList<Artifact> {\n const artifacts = this.getBuilderData(component)?.artifacts || ArtifactList.fromArray([]);\n return artifacts;\n }\n\n getBuilderData(component: IComponent): BuilderData | undefined {\n const data = component.get(BuilderAspect.id)?.data;\n if (!data) return undefined;\n const clonedData = cloneDeep(data) as BuilderData;\n let artifactFiles: ArtifactFiles;\n const artifacts = clonedData.artifacts?.map((artifact) => {\n if (!(artifact.files instanceof ArtifactFiles)) {\n artifactFiles = ArtifactFiles.fromObject(artifact.files);\n } else {\n artifactFiles = artifact.files;\n }\n if (artifact instanceof Artifact) {\n return artifact;\n }\n Object.assign(artifact, { files: artifactFiles });\n return Artifact.fromArtifactObject(artifact);\n });\n clonedData.artifacts = ArtifactList.fromArray(artifacts || []);\n return clonedData;\n }\n\n async build(\n components: Component[],\n isolateOptions?: IsolateComponentsOptions,\n builderOptions?: BuilderServiceOptions\n ): Promise<TaskResultsList> {\n const ids = components.map((c) => c.id);\n const capsulesBaseDir = this.buildService.getComponentsCapsulesBaseDir();\n const baseIsolateOpts = {\n baseDir: capsulesBaseDir,\n useHash: !capsulesBaseDir,\n };\n const mergedIsolateOpts = {\n ...baseIsolateOpts,\n ...isolateOptions,\n };\n\n const network = await this.isolator.isolateComponents(ids, mergedIsolateOpts, this.scope.legacyScope);\n const envs = await this.envs.createEnvironment(network.graphCapsules.getAllComponents());\n const builderServiceOptions = {\n seedersOnly: isolateOptions?.seedersOnly,\n originalSeeders: ids,\n capsulesBaseDir,\n ...(builderOptions || {}),\n };\n this.logger.consoleTitle(`Total ${components.length} components to build`);\n const buildResult = await envs.runOnce(this.buildService, builderServiceOptions);\n return buildResult;\n }\n\n async runTagTasks(components: Component[], builderOptions: BuilderServiceOptions): Promise<TaskResultsList> {\n const envs = await this.envs.createEnvironment(components);\n const buildResult = await envs.runOnce(this.tagService, builderOptions);\n\n return buildResult;\n }\n\n async runSnapTasks(components: Component[], builderOptions: BuilderServiceOptions): Promise<TaskResultsList> {\n const envs = await this.envs.createEnvironment(components);\n const buildResult = await envs.runOnce(this.snapService, builderOptions);\n\n return buildResult;\n }\n\n listTasks(component: Component) {\n const compEnv = this.envs.getEnv(component);\n const buildTasks = this.buildService.getCurrentPipeTasks(compEnv);\n const tagTasks = this.tagService.getCurrentPipeTasks(compEnv);\n const snapTasks = this.snapService.getCurrentPipeTasks(compEnv);\n return { id: component.id, envId: compEnv.id, buildTasks, tagTasks, snapTasks };\n }\n\n /**\n * register a build task to apply on all component build pipelines.\n * build happens on `bit build` and as part of `bit tag --persist`.\n */\n registerBuildTasks(tasks: BuildTask[]) {\n this.buildTaskSlot.register(tasks);\n return this;\n }\n\n /**\n * @deprecated use registerTagTasks or registerSnapTasks\n */\n registerDeployTasks(tasks: BuildTask[]) {\n this.tagTaskSlot.register(tasks);\n return this;\n }\n\n /**\n * tag tasks that don't get executed on `bit build`, only on `bit tag'.\n * this pipeline is running once the build-pipeline has completed.\n */\n registerTagTasks(tasks: BuildTask[]) {\n this.tagTaskSlot.register(tasks);\n return this;\n }\n\n /**\n * tag tasks that don't get executed on `bit build`, only on `bit snap'.\n * this pipeline is running once the build-pipeline has completed.\n */\n registerSnapTasks(tasks: BuildTask[]) {\n this.snapTaskSlot.register(tasks);\n return this;\n }\n\n getDownloadUrlForArtifact(componentId: ComponentID, taskId: string, path?: string) {\n return `/api/${componentId}/~aspect/builder/${taskId}/${path ? `${FILE_PATH_PARAM_DELIM}${path}` : ''}`;\n }\n\n static slots = [Slot.withType<BuildTask>(), Slot.withType<BuildTask>(), Slot.withType<BuildTask>()];\n\n static runtime = MainRuntime;\n static dependencies = [\n CLIAspect,\n EnvsAspect,\n WorkspaceAspect,\n ScopeAspect,\n IsolatorAspect,\n LoggerAspect,\n AspectLoaderAspect,\n GraphqlAspect,\n GeneratorAspect,\n ComponentAspect,\n UIAspect,\n GlobalConfigAspect,\n ];\n\n static async provider(\n [cli, envs, workspace, scope, isolator, loggerExt, aspectLoader, graphql, generator, component, ui, globalConfig]: [\n CLIMain,\n EnvsMain,\n Workspace,\n ScopeMain,\n IsolatorMain,\n LoggerMain,\n AspectLoaderMain,\n GraphqlMain,\n GeneratorMain,\n ComponentMain,\n UiMain,\n GlobalConfigMain\n ],\n config,\n [buildTaskSlot, tagTaskSlot, snapTaskSlot]: [TaskSlot, TaskSlot, TaskSlot]\n ) {\n const artifactFactory = new ArtifactFactory();\n const logger = loggerExt.createLogger(BuilderAspect.id);\n const buildService = new BuilderService(\n isolator,\n logger,\n buildTaskSlot,\n 'getBuildPipe',\n 'build',\n artifactFactory,\n scope,\n globalConfig\n );\n envs.registerService(buildService);\n const tagService = new BuilderService(\n isolator,\n logger,\n tagTaskSlot,\n 'getTagPipe',\n 'tag',\n artifactFactory,\n scope,\n globalConfig\n );\n const snapService = new BuilderService(\n isolator,\n logger,\n snapTaskSlot,\n 'getSnapPipe',\n 'snap',\n artifactFactory,\n scope,\n globalConfig\n );\n const builder = new BuilderMain(\n envs,\n workspace,\n buildService,\n tagService,\n snapService,\n scope,\n isolator,\n aspectLoader,\n component,\n globalConfig,\n buildTaskSlot,\n tagTaskSlot,\n snapTaskSlot,\n logger\n );\n builder.registerBuildTasks([new BundleUiTask(ui, logger)]);\n component.registerRoute([new BuilderRoute(builder, scope, logger)]);\n graphql.register(builderSchema(builder, logger));\n if (generator) generator.registerComponentTemplate([buildTaskTemplate]);\n const commands = [new BuilderCmd(builder, workspace, logger), new ArtifactsCmd(builder, component)];\n cli.register(...commands);\n\n return builder;\n }\n}\n\nBuilderAspect.addRuntime(BuilderMain);\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA,SAAAA,QAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,OAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAE,eAAA;EAAA,MAAAF,IAAA,GAAAC,OAAA;EAAAC,cAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,cAAA;EAAA,MAAAH,IAAA,GAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,KAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,IAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAC,OAAA;EAAAK,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO,SAAA;EAAA,MAAAP,IAAA,GAAAC,OAAA;EAAAM,QAAA,YAAAA,CAAA;IAAA,OAAAP,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAQ,SAAA;EAAA,MAAAR,IAAA,GAAAC,OAAA;EAAAO,QA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AAAuB,yBAAa,EAACJ,OAAO,EAAE7K,MAAM,CAAC,CAAC;IAChD,IAAIqK,SAAS,EAAEA,SAAS,CAACa,yBAAyB,CAAC,CAACC,+BAAiB,CAAC,CAAC;IACvE,MAAMC,QAAQ,GAAG,CAAC,KAAIC,mBAAU,EAACR,OAAO,EAAEzL,SAAS,EAAEY,MAAM,CAAC,EAAE,KAAIsL,yBAAY,EAACT,OAAO,EAAEjK,SAAS,CAAC,CAAC;IACnGsJ,GAAG,CAACR,QAAQ,CAAC,GAAG0B,QAAQ,CAAC;IAEzB,OAAOP,OAAO;EAChB;AACF;AAAC7L,OAAA,CAAAC,WAAA,GAAAA,WAAA;AAAA,IAAAP,gBAAA,GAAAC,OAAA,EA/ZYM,WAAW,WAiUP,CAACsM,eAAI,CAACC,QAAQ,CAAY,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAY,CAAC,EAAED,eAAI,CAACC,QAAQ,CAAY,CAAC,CAAC;AAAA,IAAA9M,gBAAA,GAAAC,OAAA,EAjUxFM,WAAW,aAmULwM,kBAAW;AAAA,IAAA/M,gBAAA,GAAAC,OAAA,EAnUjBM,WAAW,kBAoUA,CACpByM,gBAAS,EACTC,kBAAU,EACVC,4BAAe,EACfC,oBAAW,EACXC,0BAAc,EACdC,sBAAY,EACZC,kCAAkB,EAClBC,wBAAa,EACbC,4BAAe,EACfC,4BAAe,EACfC,cAAQ,EACRC,uBAAkB,CACnB;AAgFHhF,wBAAa,CAACiF,UAAU,CAACrN,WAAW,CAAC"}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.1150/dist/builder.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.1150/dist/builder.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.1153/dist/builder.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.1153/dist/builder.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
package/dist/types.d.ts CHANGED
@@ -1,9 +1,6 @@
1
1
  import { Component } from '@teambit/component';
2
- export declare type Serializable = {
3
- toString(): string;
4
- };
5
2
  export declare type TaskMetadata = {
6
- [key: string]: Serializable;
3
+ [key: string]: any;
7
4
  };
8
5
  export declare type ComponentResult = {
9
6
  /**
@@ -12,6 +9,8 @@ export declare type ComponentResult = {
12
9
  component: Component;
13
10
  /**
14
11
  * metadata generated during component build.
12
+ * this eventually gets saved into `aspectsData` prop of the builder aspect data.
13
+ * it can be retrieved later on by `builder.getDataByAspect()` method.
15
14
  */
16
15
  metadata?: TaskMetadata;
17
16
  /**
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { Component } from '@teambit/component';\n\nexport type Serializable = {\n toString(): string;\n};\n\nexport type TaskMetadata = { [key: string]: Serializable };\n\nexport type ComponentResult = {\n /**\n * instance of the component\n */\n component: Component;\n\n /**\n * metadata generated during component build.\n */\n metadata?: TaskMetadata;\n\n /**\n * returning errors from build tasks will cause a pipeline failure and logs all returned errors.\n */\n errors?: Array<Error | string>;\n\n /**\n * warnings generated throughout the build task.\n */\n warnings?: string[];\n\n /**\n * timestamp in milliseconds when the task started\n */\n startTime?: number;\n\n /**\n * timestamp in milliseconds when the task ended\n */\n endTime?: number;\n};\n"],"mappings":""}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { Component } from '@teambit/component';\n\nexport type TaskMetadata = { [key: string]: any };\n\nexport type ComponentResult = {\n /**\n * instance of the component\n */\n component: Component;\n\n /**\n * metadata generated during component build.\n * this eventually gets saved into `aspectsData` prop of the builder aspect data.\n * it can be retrieved later on by `builder.getDataByAspect()` method.\n */\n metadata?: TaskMetadata;\n\n /**\n * returning errors from build tasks will cause a pipeline failure and logs all returned errors.\n */\n errors?: Array<Error | string>;\n\n /**\n * warnings generated throughout the build task.\n */\n warnings?: string[];\n\n /**\n * timestamp in milliseconds when the task started\n */\n startTime?: number;\n\n /**\n * timestamp in milliseconds when the task ended\n */\n endTime?: number;\n};\n"],"mappings":""}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/builder",
3
- "version": "0.0.1150",
3
+ "version": "0.0.1153",
4
4
  "homepage": "https://bit.cloud/teambit/pipelines/builder",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.pipelines",
8
8
  "name": "builder",
9
- "version": "0.0.1150"
9
+ "version": "0.0.1153"
10
10
  },
11
11
  "dependencies": {
12
12
  "chalk": "2.4.2",
@@ -27,23 +27,23 @@
27
27
  "@teambit/graph.cleargraph": "0.0.1",
28
28
  "@teambit/harmony": "0.4.6",
29
29
  "@teambit/component-id": "0.0.427",
30
- "@teambit/component": "0.0.1150",
31
- "@teambit/envs": "0.0.1150",
32
- "@teambit/logger": "0.0.861",
30
+ "@teambit/component": "0.0.1153",
31
+ "@teambit/envs": "0.0.1153",
32
+ "@teambit/logger": "0.0.862",
33
33
  "@teambit/toolbox.string.capitalize": "0.0.490",
34
- "@teambit/tester": "0.0.1150",
35
- "@teambit/isolator": "0.0.1150",
36
- "@teambit/lane-id": "0.0.283",
37
- "@teambit/cli": "0.0.768",
38
- "@teambit/workspace": "0.0.1150",
39
- "@teambit/aspect-loader": "0.0.1150",
40
- "@teambit/aspect": "0.0.1150",
41
- "@teambit/generator": "0.0.1150",
42
- "@teambit/global-config": "0.0.770",
43
- "@teambit/graphql": "0.0.1150",
44
- "@teambit/scope": "0.0.1150",
45
- "@teambit/ui": "0.0.1150",
46
- "@teambit/express": "0.0.867",
34
+ "@teambit/tester": "0.0.1153",
35
+ "@teambit/isolator": "0.0.1153",
36
+ "@teambit/lane-id": "0.0.284",
37
+ "@teambit/cli": "0.0.769",
38
+ "@teambit/workspace": "0.0.1153",
39
+ "@teambit/aspect-loader": "0.0.1153",
40
+ "@teambit/aspect": "0.0.1153",
41
+ "@teambit/generator": "0.0.1153",
42
+ "@teambit/global-config": "0.0.771",
43
+ "@teambit/graphql": "0.0.1153",
44
+ "@teambit/scope": "0.0.1153",
45
+ "@teambit/ui": "0.0.1153",
46
+ "@teambit/express": "0.0.868",
47
47
  "@teambit/bit-error": "0.0.402"
48
48
  },
49
49
  "devDependencies": {
@@ -61,7 +61,7 @@
61
61
  "@teambit/pipelines.aspect-docs.builder": "0.0.156"
62
62
  },
63
63
  "peerDependencies": {
64
- "@teambit/legacy": "1.0.553",
64
+ "@teambit/legacy": "1.0.554",
65
65
  "react": "^16.8.0 || ^17.0.0",
66
66
  "react-dom": "^16.8.0 || ^17.0.0"
67
67
  },