@teambit/builder 1.0.159 → 1.0.160
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.
- package/artifact/artifact-factory.ts +3 -1
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_pipelines_builder-preview.js +1 -1
- package/artifacts/schema.json +87 -87
- package/dist/artifact/artifact-factory.js +9 -1
- package/dist/artifact/artifact-factory.js.map +1 -1
- package/dist/{preview-1707239008585.js → preview-1707275702806.js} +2 -2
- package/package.json +13 -13
|
@@ -3,6 +3,7 @@ import globby from 'globby';
|
|
|
3
3
|
import { flatten } from 'lodash';
|
|
4
4
|
import { ArtifactFiles } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';
|
|
5
5
|
import { Component, ComponentMap } from '@teambit/component';
|
|
6
|
+
import { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';
|
|
6
7
|
import { ArtifactDefinition } from './artifact-definition';
|
|
7
8
|
import { DefaultResolver } from '../storage';
|
|
8
9
|
import { ArtifactList } from './artifact-list';
|
|
@@ -17,7 +18,8 @@ export type ArtifactMap = ComponentMap<ArtifactList<FsArtifact>>;
|
|
|
17
18
|
export class ArtifactFactory {
|
|
18
19
|
resolvePaths(root: string, def: ArtifactDefinition): string[] {
|
|
19
20
|
const patternsFlattened = flatten(def.globPatterns);
|
|
20
|
-
const
|
|
21
|
+
const patternsFlattenedLinux = patternsFlattened.map(pathNormalizeToLinux);
|
|
22
|
+
const paths = globby.sync(patternsFlattenedLinux, { cwd: root });
|
|
21
23
|
return paths;
|
|
22
24
|
}
|
|
23
25
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
2
|
<testsuites tests="0" failures="0" errors="0" skipped="0">
|
|
3
|
-
<testsuite name="teambit.pipelines/builder@1.0.
|
|
3
|
+
<testsuite name="teambit.pipelines/builder@1.0.160" tests="0" failures="0" errors="0" skipped="0"/>
|
|
4
4
|
</testsuites>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.pipelines/builder-preview"]=n():e["teambit.pipelines/builder-preview"]=n()}(self,(()=>(()=>{"use strict";var e={4220:(e,n,t)=>{var i={id:"teambit.pipelines/aspect-docs/builder@0.0.167",homepage:"https://bit.cloud/teambit/pipelines/aspect-docs/builder",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=u,o(t(6376));var a=t(50762),r=["components"];function o(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},s.apply(this,arguments)}function l(e,n){if(null==e)return{};var t,i,a=d(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function d(e,n){if(null==e)return{};var t,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(a[t]=e[t]);return a}o.__bit_component=i,s.__bit_component=i,l.__bit_component=i,d.__bit_component=i;var p={},m="wrapper";function u(e){var n=e.components,t=l(e,r);return(0,a.mdx)(m,s({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h2",null,"Background"),(0,a.mdx)("p",null,"Bit's build process is an extensible CI for independent components. It validates a component is not dependent on its context (the workspace), tests it, and generates all artifacts necessary for it to be viewed and consumed as an independent module (its distributable code, bundled preview, etc.)."),(0,a.mdx)("p",null,"The Build Pipeline is an Environment Service responsible for sequencing and executing a component's Build Tasks. As mentioned earlier, these tasks are performed on a component only after it's been isolated from the rest of the workspace."),(0,a.mdx)("p",null,"A component's default series of Build Tasks is composed of tasks set by Bit and by its environment."),(0,a.mdx)("h2",null,"Isolated builds"),(0,a.mdx)("p",null,"Components authored in a Bit workspace are created to be completely portable, and thus independent. To address that, the build process starts by creating a component 'capsule' which is an isolated instance of a component, generated in a separate directory in your filesystem."),(0,a.mdx)("p",null,'As part of the capsule creation, all packages listed as dependencies of that component will be installed. This step is necessary to validate there are no dependency-graph issues (a component that is not totally isolated will be able to use packages installed in parent directories in your workspace, by other components. This will translate into a "false positive" result when testing for dependency-graph issues in a non-isolated location).'),(0,a.mdx)("h2",null,"Incremental builds"),(0,a.mdx)("p",null,'When a component "goes through" the build pipeline, all of its dependencies are built as well. If a dependency has not changed since its last build, the build process will use its artifacts from the previous build (and will not process it again). This optimization to the build process supplements the "innate optimization" that naturally comes from developing (and building) independent components instead of a single monolithic codebase.'),(0,a.mdx)("h2",null,"Environment-specific builds"),(0,a.mdx)("p",null,"Each Bit environment determines its own build pipeline. That means, a single workspace that uses multiple environments will run a different set of build tasks on different components depending on their associated environment. This is another Bit feature that enables seamless transitioning between different development environments, all in the same workspace. It also makes it much easier to integrate the Build Pipeline in your (remote) CI, as it only requires executing the build step - all other per-component build configurations are already set by the various environments being used."),(0,a.mdx)("p",null,"Since environments are extensible, so are the build pipelines configured by them."),(0,a.mdx)("h2",null,"Build task"),(0,a.mdx)("p",null,"An example of a build-task is ",(0,a.mdx)("inlineCode",{parentName:"p"},"compile"),", it's written in the compiler aspect and is running on each one of the capsules created by the build process. build-tasks in many cases generate artifacts, in this case, the compiler generates ",(0,a.mdx)("inlineCode",{parentName:"p"},"dists")," files and write them on the isolated capsules. There artifacts files are used later for example when creating packages."),(0,a.mdx)("h2",null,"Pipelines"),(0,a.mdx)("p",null,"There are three pipelines: ",(0,a.mdx)("inlineCode",{parentName:"p"},"build"),", ",(0,a.mdx)("inlineCode",{parentName:"p"},"tag")," and ",(0,a.mdx)("inlineCode",{parentName:"p"},"snap"),"."),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit build")," runs the build pipeline."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit tag")," runs the build pipeline and then the tag pipeline."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit snap")," runs the build pipeline and then the snap pipeline.")),(0,a.mdx)("h2",null,"List Build Tasks"),(0,a.mdx)("p",null,"To get a list of all the tasks that will be running per pipeline on a specific component, run ",(0,a.mdx)("inlineCode",{parentName:"p"},"bit build --list-tasks <id>"),".\nHere is an example of the relevant part from the output:"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre"},"➜ bit build --list-tasks ui/tooltip\nTasks List\nid: teambit.design/ui/tooltip@0.0.347\nenvId: teambit.react/react\n\nBuild Pipeline Tasks:\nteambit.harmony/aspect:CoreExporter\nteambit.compilation/compiler:TSCompiler\nteambit.defender/tester:TestComponents\nteambit.pkg/pkg:PreparePackages\nteambit.pkg/pkg:PublishDryRun\nteambit.preview/preview:GeneratePreview\n\nTag Pipeline Tasks:\nteambit.harmony/application:build_ui_application\nteambit.pkg/pkg:PublishComponents\n\nSnap Pipeline Tasks:\n<N/A>\n")),(0,a.mdx)("h2",null,"Implementing Build Tasks"),(0,a.mdx)("p",null,"The ",(0,a.mdx)("inlineCode",{parentName:"p"},"BuildTask")," interface is a good start to understand how to implement a new build-task.\nWhen writing a build task, the ",(0,a.mdx)("inlineCode",{parentName:"p"},"Network")," object is passed and it includes the seeders capsules, as well as the entire graph including the dependencies.\nKeep in mind that the entire graph may contain components from other envs."),(0,a.mdx)("p",null,"Some tasks, such as, compiling in typescript and bundling with Webpack, need the entire graph.\nOthers, such as, Babel, need only the seeders. However, normally, the bundling is running after the compilation and it expects to have the dependencies compiled, so you might need the entire graph regardless."),(0,a.mdx)("h2",null,"Adding Tasks to a pipeline"),(0,a.mdx)("p",null,"There are two ways of adding tasks to the build pipeline."),(0,a.mdx)("ol",null,(0,a.mdx)("li",{parentName:"ol"},(0,a.mdx)("inlineCode",{parentName:"li"},"getBuildPipe()")," method of the env. (or ",(0,a.mdx)("inlineCode",{parentName:"li"},"getTagPipe()")," and ",(0,a.mdx)("inlineCode",{parentName:"li"},"getSnapPipe()"),")"),(0,a.mdx)("li",{parentName:"ol"},"registering to the slot via ",(0,a.mdx)("inlineCode",{parentName:"li"},"builder.registerBuildTask()"),". (or ",(0,a.mdx)("inlineCode",{parentName:"li"},"registerTagTask()")," and ",(0,a.mdx)("inlineCode",{parentName:"li"},"registerSnapTask()"),")")),(0,a.mdx)("p",null,"in the option #1, it's possible to determine the order. e.g. ",(0,a.mdx)("inlineCode",{parentName:"p"},"getBuildPipe() { return [taskA, taskB, taskC]; }"),"\nin the option #2, the register happens once the extension is loaded, so there is no way to put\none task before/after another task as of now."),(0,a.mdx)("h2",null,"Sequencing the build tasks"),(0,a.mdx)("p",null,"The Build Pipeline takes into consideration the following factors when deciding the order of which to execute each task:"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("strong",{parentName:"li"},"Location"),": A task can be executed either at the start or end of the build pipeline. This can be explicitly configured by the task itself."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("strong",{parentName:"li"},"Dependencies"),": A task can depend on other tasks. That means, the dependencies must be completed successfully for all envs before this task starts. The dependencies are applicable inside a location and not across locations. This is configured by the task itself."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("strong",{parentName:"li"},"An environment's list of build tasks"),": This is the array of tasks as it is defined by an environment")),(0,a.mdx)("h2",null,"Executing the pipelines"),(0,a.mdx)("p",null,"Commands that trigger the build pipeline:"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit build")," - runs the build pipeline on your local machine, for the entire workspace. The output data will not persist. - That is most often used for testing and debugging the build process."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit tag")," - runs the tag pipeline in addition to the build pipeline, before creating a new component release version. The output data will persist."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit snap")," - runs the snap pipeline in addition to the build pipeline. The output data will persist.")),(0,a.mdx)("p",null,"Build pipelines are determined by the environments in use. That means, in order to override the default pipeline, we need to create a new environment extension or modify an existing one."),(0,a.mdx)("p",null,"The example task below, shown being used by a customized environment, prints out the component name of every component handled by it. In addition to that, the task returns the component name as custom metadata to be logged and/or stored in the component tagged version. ",(0,a.mdx)("a",{parentName:"p",href:"https://github.com/teambit/harmony-build-examples"},"See a demo project here"),"."),(0,a.mdx)("blockquote",null,(0,a.mdx)("p",{parentName:"blockquote"},"Information returned by a build task will only persist if the build-pipeline was triggered by the 'hard-tag' command (",(0,a.mdx)("inlineCode",{parentName:"p"},"bit tag <component-id>"),").")),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="print-cmp-name-task.ts"',title:'"print-cmp-name-task.ts"'},"import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\n// A task is an implementation of 'BuildTask' provided by the 'builder' aspect\nexport class PrintCmpNameTask implements BuildTask {\n // The constructor leaves these properties up to the hands of the environment using this task\n constructor(readonly aspectId: string, readonly name: string) {}\n\n // This is where the task logic is placed. It will be executed by the build pipeline\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n\n // Go through every isolated component instance\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(`The current component name is: ${capsule.component.id.name}`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n // An array of component objects, enriched with additional data produced by the task\n componentsResults,\n };\n }\n}\n")),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="customized-react.extension.ts"',title:'"customized-react.extension.ts"'},"import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\n\n// Import the task\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n static async provider([envs, react]: [EnvsMain, ReactMain]) {\n // Get the environment's default build pipeline\n const reactPipe = react.env.getBuildPipe();\n\n // Add the custom task to the end of the build tasks sequence.\n // Provide the task with the component ID of the extension using it.\n // Provide the ask with a name.\n const tasks = [...reactPipe, new PrintCompTask('extensions/custom-react', 'PrintCmpNameTask')];\n\n // Create a new environment by merging these configurations with the env's default ones\n const customReactEnv = react.compose([react.overrideBuildPipe(tasks)]);\n\n // register the extension as an environment\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n")),(0,a.mdx)("h2",null,"Positioning a build task in the pipeline"),(0,a.mdx)("p",null,"A build task is positioned in the build pipeline sequence either by overriding the entire ",(0,a.mdx)("em",{parentName:"p"},"customizable")," pipeline or, by registering it to a location in the pipeline using the designated builder slot."),(0,a.mdx)("h3",null,"Override the build pipeline sequence"),(0,a.mdx)("p",null,"This methodology leaves the task completely agnostic as to its position in the build pipeline. Instead, the task position is determined by the environment using the ",(0,a.mdx)("inlineCode",{parentName:"p"},"getBuildPipe")," Environment Handler."),(0,a.mdx)("p",null,"The example above shows the React environment ",(0,a.mdx)("inlineCode",{parentName:"p"},"overrideBuildPipe")," method being used to override its default pipeline. This method uses the ",(0,a.mdx)("inlineCode",{parentName:"p"},"getBuildPipe()")," Environment Handler, internally."),(0,a.mdx)("h3",null,"Append to the start or end of the pipeline, in relation to other tasks"),(0,a.mdx)("p",null,"This methodology places the task at the start or end of the build pipeline sequence, and lists all other tasks needed to run successfully before it is executed."),(0,a.mdx)("p",null,"Example:"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="print-cmp-name-task.ts"',title:'"print-cmp-name-task.ts"'},"import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\nexport class PrintCmpNameTask implements BuildTask {\n constructor(readonly aspectId: string, readonly name: string) {}\n\n // Place the task at the end of the build pipeline\n readonly location = 'end';\n\n // Run this task only after the '@teambit/preview' task is completed successfully\n readonly dependencies = ['@teambit/preview'];\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(`The current component name is: ${capsule.component.id.name}`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n componentsResults,\n };\n }\n}\n")),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="customized-react.extension.ts"',title:'"customized-react.extension.ts"'},"import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\nimport { BuilderMain } from '@teambit/builder';\n\n// Import the task (in reality, it should be an independent component)\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n // Inject the builder\n static async provider([envs, react, builder]: [EnvsMain, ReactMain, BuilderMain]) {\n // Register this task using the registration slot, made available by the 'builder'.\n // Here, the environment has no say in the positioning of the task\n builder.registerBuildTasks([new ExampleTask('extensions/custom-react', 'PrintCmpNameTask')]);\n\n const customReactEnv = react.compose([]);\n\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n")),(0,a.mdx)("h2",null,"A build task anatomy"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"aspectId")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"aspectId: string"),(0,a.mdx)("br",null),"\nThe component ID of the environment using this task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"name")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"name: string")," ",(0,a.mdx)("br",null),"\nA name for this task. Only alphanumerical characters are allowed. PascalCase should be used as a convention.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"location")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"location?: 'start' | 'end'")," ",(0,a.mdx)("br",null),"\nThe section of the build-pipeline to which to append this task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"dependencies")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"dependencies?: string[]")," ",(0,a.mdx)("br",null),"\nAn list of tasks that must be completed before this task gets executed. ",(0,a.mdx)("br",null),"\nFor example ",(0,a.mdx)("inlineCode",{parentName:"p"},"dependencies = ['@teambit/preview']"),".")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"execute")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"execute(context: BuildContext): Promise<BuiltTaskResult>")," ",(0,a.mdx)("br",null),"\nThe execute method is where all the task logic is placed."),(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"context")," (argument) ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"context: BuildContext")," ",(0,a.mdx)("br",null),"\nThe context of the build pipeline. Use this object (provided by the build pipeline) to get information regarding all components handled by the build pipeline. ",(0,a.mdx)("br",null),(0,a.mdx)("br",null),"\nFor example, ",(0,a.mdx)("inlineCode",{parentName:"p"},"context.capsuleNetwork.seedersCapsules")," are models representing isolated instances of components handled by the build pipeline. These isolated instances are independent projects, generated in your local filesystem (by the build pipeline).")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"return")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"Promise<BuiltTaskResult>")," ",(0,a.mdx)("br",null),"\nA ",(0,a.mdx)("inlineCode",{parentName:"p"},"context")," method returns an object with data regarding the build task process, additional data regarding the components handled by the task and, if available, data regarding the different artifacts generated by this task.",(0,a.mdx)("br",null),"\nThe returned object has the following attributes:"),(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"componentsResults")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"componentsResults: ComponentResult[]"),"\nAn array of objects, each containing an instance of an object handled the task and additional information regarding the process and the component itself.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"component")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"component: Component")," ",(0,a.mdx)("br",null),"\nAn instance of the component handled by the task (see the above task example).")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"metadata")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"metadata?: { [key: string]: Serializable }")," ",(0,a.mdx)("br",null),"\nComponent metadata generated during the build task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"errors")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"errors?: Array<Error | string>")," ",(0,a.mdx)("br",null),"\nBuild task errors. A task returning errors will abort the build pipeline and log the returned errors.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"warnings")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"warnings?: string[]")," ",(0,a.mdx)("br",null),"\nwarnings generated throughout the build task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"startTime")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"startTime?: number")," ",(0,a.mdx)("br",null),"\nA timestamp (in milliseconds) of when the task started")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"endTime")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"endTime?: number")," ",(0,a.mdx)("br",null),"\nA timestamp (in milliseconds) of when the task ended")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"artifacts")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"artifacts?: ArtifactDefinition[]")," ",(0,a.mdx)("br",null),"\nAn array of artifact definitions to generate after a successful build")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"name")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"name: string")," ",(0,a.mdx)("br",null),"\nThe name of the artifact. ",(0,a.mdx)("br",null),"\nFor example, a project might utilize two different artifacts for the same typescript compiler, one that generates ES5 files and another for ES6. This prop helps to distinguish between the two.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"generatedBy")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"generatedBy?: string;")," ",(0,a.mdx)("br",null),"\nId of the component that generated this artifact.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"description")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"description?: string")," ",(0,a.mdx)("br",null),"\nA description of the artifact. ",(0,a.mdx)("br",null))),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"globPatterns")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"globPatterns: string[]")," ",(0,a.mdx)("br",null),"\nGlob patterns of files to include upon artifact creation. Minimatch is used to match the patterns. ",(0,a.mdx)("br",null),"\nFor example, ",(0,a.mdx)("inlineCode",{parentName:"p"},"['*.ts', '!foo.ts']")," matches all ts files but ignores ",(0,a.mdx)("inlineCode",{parentName:"p"},"foo.ts"),".")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"rootDir")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"rootDir?: string")," ",(0,a.mdx)("br",null),"\nDefines the root directory of the artifacts in the capsule file system. The rootDir must be unique for every artifact, otherwise data might be overridden.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"dirPrefix")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"dirPrefix?: string")," ",(0,a.mdx)("br",null),"\nAdds a directory prefix for all artifact files.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"context")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"context?: 'component' | 'env'")," ",(0,a.mdx)("br",null),"\nDetermine the context of the artifact. The default artifact context is ",(0,a.mdx)("inlineCode",{parentName:"p"},"component"),". ",(0,a.mdx)("inlineCode",{parentName:"p"},"env"),' is useful when the same file is generated for all components, for example, a "preview" task may create the same webpack file for all components of that env.')),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"storageResolver")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"storageResolver?: string")," ",(0,a.mdx)("br",null),"\nUsed to replace the location of the stored artifacts. The default resolver persists artifacts on scope (that's not recommended for large files).")))))),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"preBuild")," (advanced) ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"preBuild?(context: BuildContext): Promise<void>")," ",(0,a.mdx)("br",null),"\nRuns before the build pipeline has started. This method should only be used when preparations are needed to be done on all environments before the build starts.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"postBuild")," (advanced) ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"postBuild?(context: BuildContext, tasksResults: TaskResultsList): Promise<void>")," ",(0,a.mdx)("br",null),"\nRuns after the dependencies were completed for all environments."))))}u.__bit_component=i,u.isMDXComponent=!0},5144:(e,n,t)=>{Object.defineProperty(n,"E",{enumerable:!0,get:function(){return i.default}});var i=a(t(4220));function a(e){return e&&e.__esModule?e:{default:e}}a.__bit_component={id:"teambit.pipelines/aspect-docs/builder@0.0.167",homepage:"https://bit.cloud/teambit/pipelines/aspect-docs/builder",exported:!0}},40776:(e,n,t)=>{var i={id:"teambit.pipelines/builder@1.0.159",homepage:"https://bit.cloud/teambit/pipelines/builder",exported:!0};function a(){const e=r(t(6376));return a=function(){return e},e}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,a.__bit_component=i,r.__bit_component=i;const o=()=>a().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},a().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/builder.svg"}));o.__bit_component=i,n.Logo=o},50762:e=>{e.exports=MdxJsReact},6376:e=>{e.exports=React}},n={};function t(i){var a=n[i];if(void 0!==a)return a.exports;var r=n[i]={exports:{}};return e[i](r,r.exports,t),r.exports}t.d=(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{t.r(i),t.d(i,{compositions:()=>u,compositions_metadata:()=>h,overview:()=>c});var e={};t.r(e),t.d(e,{default:()=>m});var n=t(40776),a=(t(6376),t(50762));const r=TeambitMdxUiMdxScopeContext;var o=t(5144),s=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},l.apply(this,arguments)}var d={},p="wrapper";function m(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,i,a=function(e,n){if(null==e)return{};var t,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,s);return(0,a.mdx)(p,l({},d,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)(r.MDXScopeProvider,{components:{Builder:o.E},mdxType:"MDXScopeProvider"},(0,a.mdx)(o.E,{mdxType:"Builder"})))}m.isMDXComponent=!0;const u=[n],c=[e],h={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),i})()));
|
|
1
|
+
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports["teambit.pipelines/builder-preview"]=n():e["teambit.pipelines/builder-preview"]=n()}(self,(()=>(()=>{"use strict";var e={4220:(e,n,t)=>{var i={id:"teambit.pipelines/aspect-docs/builder@0.0.167",homepage:"https://bit.cloud/teambit/pipelines/aspect-docs/builder",exported:!0};Object.defineProperty(n,"__esModule",{value:!0}),n.default=u,o(t(6376));var a=t(50762),r=["components"];function o(e){return e&&e.__esModule?e:{default:e}}function s(){return s=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},s.apply(this,arguments)}function l(e,n){if(null==e)return{};var t,i,a=d(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function d(e,n){if(null==e)return{};var t,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(a[t]=e[t]);return a}o.__bit_component=i,s.__bit_component=i,l.__bit_component=i,d.__bit_component=i;var p={},m="wrapper";function u(e){var n=e.components,t=l(e,r);return(0,a.mdx)(m,s({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h2",null,"Background"),(0,a.mdx)("p",null,"Bit's build process is an extensible CI for independent components. It validates a component is not dependent on its context (the workspace), tests it, and generates all artifacts necessary for it to be viewed and consumed as an independent module (its distributable code, bundled preview, etc.)."),(0,a.mdx)("p",null,"The Build Pipeline is an Environment Service responsible for sequencing and executing a component's Build Tasks. As mentioned earlier, these tasks are performed on a component only after it's been isolated from the rest of the workspace."),(0,a.mdx)("p",null,"A component's default series of Build Tasks is composed of tasks set by Bit and by its environment."),(0,a.mdx)("h2",null,"Isolated builds"),(0,a.mdx)("p",null,"Components authored in a Bit workspace are created to be completely portable, and thus independent. To address that, the build process starts by creating a component 'capsule' which is an isolated instance of a component, generated in a separate directory in your filesystem."),(0,a.mdx)("p",null,'As part of the capsule creation, all packages listed as dependencies of that component will be installed. This step is necessary to validate there are no dependency-graph issues (a component that is not totally isolated will be able to use packages installed in parent directories in your workspace, by other components. This will translate into a "false positive" result when testing for dependency-graph issues in a non-isolated location).'),(0,a.mdx)("h2",null,"Incremental builds"),(0,a.mdx)("p",null,'When a component "goes through" the build pipeline, all of its dependencies are built as well. If a dependency has not changed since its last build, the build process will use its artifacts from the previous build (and will not process it again). This optimization to the build process supplements the "innate optimization" that naturally comes from developing (and building) independent components instead of a single monolithic codebase.'),(0,a.mdx)("h2",null,"Environment-specific builds"),(0,a.mdx)("p",null,"Each Bit environment determines its own build pipeline. That means, a single workspace that uses multiple environments will run a different set of build tasks on different components depending on their associated environment. This is another Bit feature that enables seamless transitioning between different development environments, all in the same workspace. It also makes it much easier to integrate the Build Pipeline in your (remote) CI, as it only requires executing the build step - all other per-component build configurations are already set by the various environments being used."),(0,a.mdx)("p",null,"Since environments are extensible, so are the build pipelines configured by them."),(0,a.mdx)("h2",null,"Build task"),(0,a.mdx)("p",null,"An example of a build-task is ",(0,a.mdx)("inlineCode",{parentName:"p"},"compile"),", it's written in the compiler aspect and is running on each one of the capsules created by the build process. build-tasks in many cases generate artifacts, in this case, the compiler generates ",(0,a.mdx)("inlineCode",{parentName:"p"},"dists")," files and write them on the isolated capsules. There artifacts files are used later for example when creating packages."),(0,a.mdx)("h2",null,"Pipelines"),(0,a.mdx)("p",null,"There are three pipelines: ",(0,a.mdx)("inlineCode",{parentName:"p"},"build"),", ",(0,a.mdx)("inlineCode",{parentName:"p"},"tag")," and ",(0,a.mdx)("inlineCode",{parentName:"p"},"snap"),"."),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit build")," runs the build pipeline."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit tag")," runs the build pipeline and then the tag pipeline."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit snap")," runs the build pipeline and then the snap pipeline.")),(0,a.mdx)("h2",null,"List Build Tasks"),(0,a.mdx)("p",null,"To get a list of all the tasks that will be running per pipeline on a specific component, run ",(0,a.mdx)("inlineCode",{parentName:"p"},"bit build --list-tasks <id>"),".\nHere is an example of the relevant part from the output:"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre"},"➜ bit build --list-tasks ui/tooltip\nTasks List\nid: teambit.design/ui/tooltip@0.0.347\nenvId: teambit.react/react\n\nBuild Pipeline Tasks:\nteambit.harmony/aspect:CoreExporter\nteambit.compilation/compiler:TSCompiler\nteambit.defender/tester:TestComponents\nteambit.pkg/pkg:PreparePackages\nteambit.pkg/pkg:PublishDryRun\nteambit.preview/preview:GeneratePreview\n\nTag Pipeline Tasks:\nteambit.harmony/application:build_ui_application\nteambit.pkg/pkg:PublishComponents\n\nSnap Pipeline Tasks:\n<N/A>\n")),(0,a.mdx)("h2",null,"Implementing Build Tasks"),(0,a.mdx)("p",null,"The ",(0,a.mdx)("inlineCode",{parentName:"p"},"BuildTask")," interface is a good start to understand how to implement a new build-task.\nWhen writing a build task, the ",(0,a.mdx)("inlineCode",{parentName:"p"},"Network")," object is passed and it includes the seeders capsules, as well as the entire graph including the dependencies.\nKeep in mind that the entire graph may contain components from other envs."),(0,a.mdx)("p",null,"Some tasks, such as, compiling in typescript and bundling with Webpack, need the entire graph.\nOthers, such as, Babel, need only the seeders. However, normally, the bundling is running after the compilation and it expects to have the dependencies compiled, so you might need the entire graph regardless."),(0,a.mdx)("h2",null,"Adding Tasks to a pipeline"),(0,a.mdx)("p",null,"There are two ways of adding tasks to the build pipeline."),(0,a.mdx)("ol",null,(0,a.mdx)("li",{parentName:"ol"},(0,a.mdx)("inlineCode",{parentName:"li"},"getBuildPipe()")," method of the env. (or ",(0,a.mdx)("inlineCode",{parentName:"li"},"getTagPipe()")," and ",(0,a.mdx)("inlineCode",{parentName:"li"},"getSnapPipe()"),")"),(0,a.mdx)("li",{parentName:"ol"},"registering to the slot via ",(0,a.mdx)("inlineCode",{parentName:"li"},"builder.registerBuildTask()"),". (or ",(0,a.mdx)("inlineCode",{parentName:"li"},"registerTagTask()")," and ",(0,a.mdx)("inlineCode",{parentName:"li"},"registerSnapTask()"),")")),(0,a.mdx)("p",null,"in the option #1, it's possible to determine the order. e.g. ",(0,a.mdx)("inlineCode",{parentName:"p"},"getBuildPipe() { return [taskA, taskB, taskC]; }"),"\nin the option #2, the register happens once the extension is loaded, so there is no way to put\none task before/after another task as of now."),(0,a.mdx)("h2",null,"Sequencing the build tasks"),(0,a.mdx)("p",null,"The Build Pipeline takes into consideration the following factors when deciding the order of which to execute each task:"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("strong",{parentName:"li"},"Location"),": A task can be executed either at the start or end of the build pipeline. This can be explicitly configured by the task itself."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("strong",{parentName:"li"},"Dependencies"),": A task can depend on other tasks. That means, the dependencies must be completed successfully for all envs before this task starts. The dependencies are applicable inside a location and not across locations. This is configured by the task itself."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("strong",{parentName:"li"},"An environment's list of build tasks"),": This is the array of tasks as it is defined by an environment")),(0,a.mdx)("h2",null,"Executing the pipelines"),(0,a.mdx)("p",null,"Commands that trigger the build pipeline:"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit build")," - runs the build pipeline on your local machine, for the entire workspace. The output data will not persist. - That is most often used for testing and debugging the build process."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit tag")," - runs the tag pipeline in addition to the build pipeline, before creating a new component release version. The output data will persist."),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"bit snap")," - runs the snap pipeline in addition to the build pipeline. The output data will persist.")),(0,a.mdx)("p",null,"Build pipelines are determined by the environments in use. That means, in order to override the default pipeline, we need to create a new environment extension or modify an existing one."),(0,a.mdx)("p",null,"The example task below, shown being used by a customized environment, prints out the component name of every component handled by it. In addition to that, the task returns the component name as custom metadata to be logged and/or stored in the component tagged version. ",(0,a.mdx)("a",{parentName:"p",href:"https://github.com/teambit/harmony-build-examples"},"See a demo project here"),"."),(0,a.mdx)("blockquote",null,(0,a.mdx)("p",{parentName:"blockquote"},"Information returned by a build task will only persist if the build-pipeline was triggered by the 'hard-tag' command (",(0,a.mdx)("inlineCode",{parentName:"p"},"bit tag <component-id>"),").")),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="print-cmp-name-task.ts"',title:'"print-cmp-name-task.ts"'},"import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\n// A task is an implementation of 'BuildTask' provided by the 'builder' aspect\nexport class PrintCmpNameTask implements BuildTask {\n // The constructor leaves these properties up to the hands of the environment using this task\n constructor(readonly aspectId: string, readonly name: string) {}\n\n // This is where the task logic is placed. It will be executed by the build pipeline\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n\n // Go through every isolated component instance\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(`The current component name is: ${capsule.component.id.name}`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n // An array of component objects, enriched with additional data produced by the task\n componentsResults,\n };\n }\n}\n")),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="customized-react.extension.ts"',title:'"customized-react.extension.ts"'},"import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\n\n// Import the task\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n static async provider([envs, react]: [EnvsMain, ReactMain]) {\n // Get the environment's default build pipeline\n const reactPipe = react.env.getBuildPipe();\n\n // Add the custom task to the end of the build tasks sequence.\n // Provide the task with the component ID of the extension using it.\n // Provide the ask with a name.\n const tasks = [...reactPipe, new PrintCompTask('extensions/custom-react', 'PrintCmpNameTask')];\n\n // Create a new environment by merging these configurations with the env's default ones\n const customReactEnv = react.compose([react.overrideBuildPipe(tasks)]);\n\n // register the extension as an environment\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n")),(0,a.mdx)("h2",null,"Positioning a build task in the pipeline"),(0,a.mdx)("p",null,"A build task is positioned in the build pipeline sequence either by overriding the entire ",(0,a.mdx)("em",{parentName:"p"},"customizable")," pipeline or, by registering it to a location in the pipeline using the designated builder slot."),(0,a.mdx)("h3",null,"Override the build pipeline sequence"),(0,a.mdx)("p",null,"This methodology leaves the task completely agnostic as to its position in the build pipeline. Instead, the task position is determined by the environment using the ",(0,a.mdx)("inlineCode",{parentName:"p"},"getBuildPipe")," Environment Handler."),(0,a.mdx)("p",null,"The example above shows the React environment ",(0,a.mdx)("inlineCode",{parentName:"p"},"overrideBuildPipe")," method being used to override its default pipeline. This method uses the ",(0,a.mdx)("inlineCode",{parentName:"p"},"getBuildPipe()")," Environment Handler, internally."),(0,a.mdx)("h3",null,"Append to the start or end of the pipeline, in relation to other tasks"),(0,a.mdx)("p",null,"This methodology places the task at the start or end of the build pipeline sequence, and lists all other tasks needed to run successfully before it is executed."),(0,a.mdx)("p",null,"Example:"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="print-cmp-name-task.ts"',title:'"print-cmp-name-task.ts"'},"import { BuildTask, BuildContext, BuiltTaskResult, ComponentResult } from '@teambit/builder';\n\nexport class PrintCmpNameTask implements BuildTask {\n constructor(readonly aspectId: string, readonly name: string) {}\n\n // Place the task at the end of the build pipeline\n readonly location = 'end';\n\n // Run this task only after the '@teambit/preview' task is completed successfully\n readonly dependencies = ['@teambit/preview'];\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n const componentsResults: ComponentResult[] = [];\n context.capsuleNetwork.seedersCapsules.forEach((capsule) => {\n console.log(`The current component name is: ${capsule.component.id.name}`);\n\n componentsResults.push({\n component: capsule.component,\n metadata: { customProp: capsule.component.id.name },\n });\n });\n return {\n componentsResults,\n };\n }\n}\n")),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-ts",metastring:'title="customized-react.extension.ts"',title:'"customized-react.extension.ts"'},"import { EnvsMain, EnvsAspect } from '@teambit/envs';\nimport { ReactAspect, ReactMain } from '@teambit/react';\nimport { BuilderMain } from '@teambit/builder';\n\n// Import the task (in reality, it should be an independent component)\nimport { PrintCmpNameTask } from './print-cmp-name-task';\n\nexport class CustomReact {\n constructor(private react: ReactMain) {}\n\n static dependencies: any = [EnvsAspect, ReactAspect];\n\n // Inject the builder\n static async provider([envs, react, builder]: [EnvsMain, ReactMain, BuilderMain]) {\n // Register this task using the registration slot, made available by the 'builder'.\n // Here, the environment has no say in the positioning of the task\n builder.registerBuildTasks([new ExampleTask('extensions/custom-react', 'PrintCmpNameTask')]);\n\n const customReactEnv = react.compose([]);\n\n envs.registerEnv(customReactEnv);\n return new CustomReact(react);\n }\n}\n")),(0,a.mdx)("h2",null,"A build task anatomy"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"aspectId")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"aspectId: string"),(0,a.mdx)("br",null),"\nThe component ID of the environment using this task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"name")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"name: string")," ",(0,a.mdx)("br",null),"\nA name for this task. Only alphanumerical characters are allowed. PascalCase should be used as a convention.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"location")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"location?: 'start' | 'end'")," ",(0,a.mdx)("br",null),"\nThe section of the build-pipeline to which to append this task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"dependencies")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"dependencies?: string[]")," ",(0,a.mdx)("br",null),"\nAn list of tasks that must be completed before this task gets executed. ",(0,a.mdx)("br",null),"\nFor example ",(0,a.mdx)("inlineCode",{parentName:"p"},"dependencies = ['@teambit/preview']"),".")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"execute")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"execute(context: BuildContext): Promise<BuiltTaskResult>")," ",(0,a.mdx)("br",null),"\nThe execute method is where all the task logic is placed."),(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"context")," (argument) ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"context: BuildContext")," ",(0,a.mdx)("br",null),"\nThe context of the build pipeline. Use this object (provided by the build pipeline) to get information regarding all components handled by the build pipeline. ",(0,a.mdx)("br",null),(0,a.mdx)("br",null),"\nFor example, ",(0,a.mdx)("inlineCode",{parentName:"p"},"context.capsuleNetwork.seedersCapsules")," are models representing isolated instances of components handled by the build pipeline. These isolated instances are independent projects, generated in your local filesystem (by the build pipeline).")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"return")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"Promise<BuiltTaskResult>")," ",(0,a.mdx)("br",null),"\nA ",(0,a.mdx)("inlineCode",{parentName:"p"},"context")," method returns an object with data regarding the build task process, additional data regarding the components handled by the task and, if available, data regarding the different artifacts generated by this task.",(0,a.mdx)("br",null),"\nThe returned object has the following attributes:"),(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"componentsResults")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"componentsResults: ComponentResult[]"),"\nAn array of objects, each containing an instance of an object handled the task and additional information regarding the process and the component itself.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"component")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"component: Component")," ",(0,a.mdx)("br",null),"\nAn instance of the component handled by the task (see the above task example).")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"metadata")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"metadata?: { [key: string]: Serializable }")," ",(0,a.mdx)("br",null),"\nComponent metadata generated during the build task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"errors")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"errors?: Array<Error | string>")," ",(0,a.mdx)("br",null),"\nBuild task errors. A task returning errors will abort the build pipeline and log the returned errors.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"warnings")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"warnings?: string[]")," ",(0,a.mdx)("br",null),"\nwarnings generated throughout the build task.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"startTime")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"startTime?: number")," ",(0,a.mdx)("br",null),"\nA timestamp (in milliseconds) of when the task started")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"endTime")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"endTime?: number")," ",(0,a.mdx)("br",null),"\nA timestamp (in milliseconds) of when the task ended")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"artifacts")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"artifacts?: ArtifactDefinition[]")," ",(0,a.mdx)("br",null),"\nAn array of artifact definitions to generate after a successful build")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"name")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"name: string")," ",(0,a.mdx)("br",null),"\nThe name of the artifact. ",(0,a.mdx)("br",null),"\nFor example, a project might utilize two different artifacts for the same typescript compiler, one that generates ES5 files and another for ES6. This prop helps to distinguish between the two.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"generatedBy")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"generatedBy?: string;")," ",(0,a.mdx)("br",null),"\nId of the component that generated this artifact.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"description")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"description?: string")," ",(0,a.mdx)("br",null),"\nA description of the artifact. ",(0,a.mdx)("br",null))),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"globPatterns")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"globPatterns: string[]")," ",(0,a.mdx)("br",null),"\nGlob patterns of files to include upon artifact creation. Minimatch is used to match the patterns. ",(0,a.mdx)("br",null),"\nFor example, ",(0,a.mdx)("inlineCode",{parentName:"p"},"['*.ts', '!foo.ts']")," matches all ts files but ignores ",(0,a.mdx)("inlineCode",{parentName:"p"},"foo.ts"),".")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"rootDir")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"rootDir?: string")," ",(0,a.mdx)("br",null),"\nDefines the root directory of the artifacts in the capsule file system. The rootDir must be unique for every artifact, otherwise data might be overridden.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"dirPrefix")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"dirPrefix?: string")," ",(0,a.mdx)("br",null),"\nAdds a directory prefix for all artifact files.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"context")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"context?: 'component' | 'env'")," ",(0,a.mdx)("br",null),"\nDetermine the context of the artifact. The default artifact context is ",(0,a.mdx)("inlineCode",{parentName:"p"},"component"),". ",(0,a.mdx)("inlineCode",{parentName:"p"},"env"),' is useful when the same file is generated for all components, for example, a "preview" task may create the same webpack file for all components of that env.')),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"storageResolver")," ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"storageResolver?: string")," ",(0,a.mdx)("br",null),"\nUsed to replace the location of the stored artifacts. The default resolver persists artifacts on scope (that's not recommended for large files).")))))),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"preBuild")," (advanced) ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"preBuild?(context: BuildContext): Promise<void>")," ",(0,a.mdx)("br",null),"\nRuns before the build pipeline has started. This method should only be used when preparations are needed to be done on all environments before the build starts.")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("p",{parentName:"li"},(0,a.mdx)("strong",{parentName:"p"},"postBuild")," (advanced) ",(0,a.mdx)("br",null),"\n",(0,a.mdx)("inlineCode",{parentName:"p"},"postBuild?(context: BuildContext, tasksResults: TaskResultsList): Promise<void>")," ",(0,a.mdx)("br",null),"\nRuns after the dependencies were completed for all environments."))))}u.__bit_component=i,u.isMDXComponent=!0},5144:(e,n,t)=>{Object.defineProperty(n,"E",{enumerable:!0,get:function(){return i.default}});var i=a(t(4220));function a(e){return e&&e.__esModule?e:{default:e}}a.__bit_component={id:"teambit.pipelines/aspect-docs/builder@0.0.167",homepage:"https://bit.cloud/teambit/pipelines/aspect-docs/builder",exported:!0}},89376:(e,n,t)=>{var i={id:"teambit.pipelines/builder@1.0.160",homepage:"https://bit.cloud/teambit/pipelines/builder",exported:!0};function a(){const e=r(t(6376));return a=function(){return e},e}function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(n,"__esModule",{value:!0}),n.Logo=void 0,a.__bit_component=i,r.__bit_component=i;const o=()=>a().default.createElement("div",{style:{height:"100%",display:"flex",justifyContent:"center"}},a().default.createElement("img",{style:{width:70},src:"https://static.bit.dev/extensions-icons/builder.svg"}));o.__bit_component=i,n.Logo=o},50762:e=>{e.exports=MdxJsReact},6376:e=>{e.exports=React}},n={};function t(i){var a=n[i];if(void 0!==a)return a.exports;var r=n[i]={exports:{}};return e[i](r,r.exports,t),r.exports}t.d=(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{t.r(i),t.d(i,{compositions:()=>u,compositions_metadata:()=>h,overview:()=>c});var e={};t.r(e),t.d(e,{default:()=>m});var n=t(89376),a=(t(6376),t(50762));const r=TeambitMdxUiMdxScopeContext;var o=t(5144),s=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},l.apply(this,arguments)}var d={},p="wrapper";function m(e){var n=e.components,t=function(e,n){if(null==e)return{};var t,i,a=function(e,n){if(null==e)return{};var t,i,a={},r=Object.keys(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(i=0;i<r.length;i++)t=r[i],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}(e,s);return(0,a.mdx)(p,l({},d,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)(r.MDXScopeProvider,{components:{Builder:o.E},mdxType:"MDXScopeProvider"},(0,a.mdx)(o.E,{mdxType:"Builder"})))}m.isMDXComponent=!0;const u=[n],c=[e],h={compositions:[{displayName:"Logo",identifier:"Logo"}]}})(),i})()));
|
package/artifacts/schema.json
CHANGED
|
@@ -1043,7 +1043,7 @@
|
|
|
1043
1043
|
"_legacy": {
|
|
1044
1044
|
"scope": "teambit.pipelines",
|
|
1045
1045
|
"name": "builder",
|
|
1046
|
-
"version": "1.0.
|
|
1046
|
+
"version": "1.0.160"
|
|
1047
1047
|
},
|
|
1048
1048
|
"_scope": "teambit.pipelines"
|
|
1049
1049
|
}
|
|
@@ -7151,7 +7151,7 @@
|
|
|
7151
7151
|
"_legacy": {
|
|
7152
7152
|
"scope": "teambit.pipelines",
|
|
7153
7153
|
"name": "builder",
|
|
7154
|
-
"version": "1.0.
|
|
7154
|
+
"version": "1.0.160"
|
|
7155
7155
|
},
|
|
7156
7156
|
"_scope": "teambit.pipelines"
|
|
7157
7157
|
}
|
|
@@ -7164,7 +7164,7 @@
|
|
|
7164
7164
|
"__schema": "ClassSchema",
|
|
7165
7165
|
"location": {
|
|
7166
7166
|
"filePath": "artifact/artifact-factory.ts",
|
|
7167
|
-
"line":
|
|
7167
|
+
"line": 18,
|
|
7168
7168
|
"character": 1
|
|
7169
7169
|
},
|
|
7170
7170
|
"signature": "class ArtifactFactory",
|
|
@@ -7174,7 +7174,7 @@
|
|
|
7174
7174
|
"__schema": "FunctionLikeSchema",
|
|
7175
7175
|
"location": {
|
|
7176
7176
|
"filePath": "artifact/artifact-factory.ts",
|
|
7177
|
-
"line":
|
|
7177
|
+
"line": 19,
|
|
7178
7178
|
"character": 3
|
|
7179
7179
|
},
|
|
7180
7180
|
"signature": "(method) ArtifactFactory.resolvePaths(root: string, def: ArtifactDefinition): string[]",
|
|
@@ -7184,7 +7184,7 @@
|
|
|
7184
7184
|
"__schema": "ParameterSchema",
|
|
7185
7185
|
"location": {
|
|
7186
7186
|
"filePath": "artifact/artifact-factory.ts",
|
|
7187
|
-
"line":
|
|
7187
|
+
"line": 19,
|
|
7188
7188
|
"character": 16
|
|
7189
7189
|
},
|
|
7190
7190
|
"name": "root",
|
|
@@ -7192,7 +7192,7 @@
|
|
|
7192
7192
|
"__schema": "KeywordTypeSchema",
|
|
7193
7193
|
"location": {
|
|
7194
7194
|
"filePath": "artifact/artifact-factory.ts",
|
|
7195
|
-
"line":
|
|
7195
|
+
"line": 19,
|
|
7196
7196
|
"character": 22
|
|
7197
7197
|
},
|
|
7198
7198
|
"name": "string"
|
|
@@ -7204,7 +7204,7 @@
|
|
|
7204
7204
|
"__schema": "ParameterSchema",
|
|
7205
7205
|
"location": {
|
|
7206
7206
|
"filePath": "artifact/artifact-factory.ts",
|
|
7207
|
-
"line":
|
|
7207
|
+
"line": 19,
|
|
7208
7208
|
"character": 30
|
|
7209
7209
|
},
|
|
7210
7210
|
"name": "def",
|
|
@@ -7212,7 +7212,7 @@
|
|
|
7212
7212
|
"__schema": "TypeRefSchema",
|
|
7213
7213
|
"location": {
|
|
7214
7214
|
"filePath": "artifact/artifact-factory.ts",
|
|
7215
|
-
"line":
|
|
7215
|
+
"line": 19,
|
|
7216
7216
|
"character": 35
|
|
7217
7217
|
},
|
|
7218
7218
|
"name": "ArtifactDefinition"
|
|
@@ -7225,14 +7225,14 @@
|
|
|
7225
7225
|
"__schema": "TypeArraySchema",
|
|
7226
7226
|
"location": {
|
|
7227
7227
|
"filePath": "artifact/artifact-factory.ts",
|
|
7228
|
-
"line":
|
|
7228
|
+
"line": 19,
|
|
7229
7229
|
"character": 56
|
|
7230
7230
|
},
|
|
7231
7231
|
"type": {
|
|
7232
7232
|
"__schema": "KeywordTypeSchema",
|
|
7233
7233
|
"location": {
|
|
7234
7234
|
"filePath": "artifact/artifact-factory.ts",
|
|
7235
|
-
"line":
|
|
7235
|
+
"line": 19,
|
|
7236
7236
|
"character": 56
|
|
7237
7237
|
},
|
|
7238
7238
|
"name": "string"
|
|
@@ -7244,7 +7244,7 @@
|
|
|
7244
7244
|
"__schema": "FunctionLikeSchema",
|
|
7245
7245
|
"location": {
|
|
7246
7246
|
"filePath": "artifact/artifact-factory.ts",
|
|
7247
|
-
"line":
|
|
7247
|
+
"line": 41,
|
|
7248
7248
|
"character": 3
|
|
7249
7249
|
},
|
|
7250
7250
|
"signature": "(method) ArtifactFactory.createFromComponent(context: BuildContext, component: Component, def: ArtifactDefinition, task: BuildTask): FsArtifact | undefined",
|
|
@@ -7254,7 +7254,7 @@
|
|
|
7254
7254
|
"__schema": "ParameterSchema",
|
|
7255
7255
|
"location": {
|
|
7256
7256
|
"filePath": "artifact/artifact-factory.ts",
|
|
7257
|
-
"line":
|
|
7257
|
+
"line": 42,
|
|
7258
7258
|
"character": 5
|
|
7259
7259
|
},
|
|
7260
7260
|
"name": "context",
|
|
@@ -7262,7 +7262,7 @@
|
|
|
7262
7262
|
"__schema": "TypeRefSchema",
|
|
7263
7263
|
"location": {
|
|
7264
7264
|
"filePath": "artifact/artifact-factory.ts",
|
|
7265
|
-
"line":
|
|
7265
|
+
"line": 42,
|
|
7266
7266
|
"character": 14
|
|
7267
7267
|
},
|
|
7268
7268
|
"name": "BuildContext"
|
|
@@ -7274,7 +7274,7 @@
|
|
|
7274
7274
|
"__schema": "ParameterSchema",
|
|
7275
7275
|
"location": {
|
|
7276
7276
|
"filePath": "artifact/artifact-factory.ts",
|
|
7277
|
-
"line":
|
|
7277
|
+
"line": 43,
|
|
7278
7278
|
"character": 5
|
|
7279
7279
|
},
|
|
7280
7280
|
"name": "component",
|
|
@@ -7282,7 +7282,7 @@
|
|
|
7282
7282
|
"__schema": "TypeRefSchema",
|
|
7283
7283
|
"location": {
|
|
7284
7284
|
"filePath": "artifact/artifact-factory.ts",
|
|
7285
|
-
"line":
|
|
7285
|
+
"line": 43,
|
|
7286
7286
|
"character": 16
|
|
7287
7287
|
},
|
|
7288
7288
|
"name": "Component"
|
|
@@ -7294,7 +7294,7 @@
|
|
|
7294
7294
|
"__schema": "ParameterSchema",
|
|
7295
7295
|
"location": {
|
|
7296
7296
|
"filePath": "artifact/artifact-factory.ts",
|
|
7297
|
-
"line":
|
|
7297
|
+
"line": 44,
|
|
7298
7298
|
"character": 5
|
|
7299
7299
|
},
|
|
7300
7300
|
"name": "def",
|
|
@@ -7302,7 +7302,7 @@
|
|
|
7302
7302
|
"__schema": "TypeRefSchema",
|
|
7303
7303
|
"location": {
|
|
7304
7304
|
"filePath": "artifact/artifact-factory.ts",
|
|
7305
|
-
"line":
|
|
7305
|
+
"line": 44,
|
|
7306
7306
|
"character": 10
|
|
7307
7307
|
},
|
|
7308
7308
|
"name": "ArtifactDefinition"
|
|
@@ -7314,7 +7314,7 @@
|
|
|
7314
7314
|
"__schema": "ParameterSchema",
|
|
7315
7315
|
"location": {
|
|
7316
7316
|
"filePath": "artifact/artifact-factory.ts",
|
|
7317
|
-
"line":
|
|
7317
|
+
"line": 45,
|
|
7318
7318
|
"character": 5
|
|
7319
7319
|
},
|
|
7320
7320
|
"name": "task",
|
|
@@ -7322,7 +7322,7 @@
|
|
|
7322
7322
|
"__schema": "TypeRefSchema",
|
|
7323
7323
|
"location": {
|
|
7324
7324
|
"filePath": "artifact/artifact-factory.ts",
|
|
7325
|
-
"line":
|
|
7325
|
+
"line": 45,
|
|
7326
7326
|
"character": 11
|
|
7327
7327
|
},
|
|
7328
7328
|
"name": "BuildTask"
|
|
@@ -7335,7 +7335,7 @@
|
|
|
7335
7335
|
"__schema": "TypeUnionSchema",
|
|
7336
7336
|
"location": {
|
|
7337
7337
|
"filePath": "artifact/artifact-factory.ts",
|
|
7338
|
-
"line":
|
|
7338
|
+
"line": 46,
|
|
7339
7339
|
"character": 6
|
|
7340
7340
|
},
|
|
7341
7341
|
"types": [
|
|
@@ -7343,7 +7343,7 @@
|
|
|
7343
7343
|
"__schema": "TypeRefSchema",
|
|
7344
7344
|
"location": {
|
|
7345
7345
|
"filePath": "artifact/artifact-factory.ts",
|
|
7346
|
-
"line":
|
|
7346
|
+
"line": 46,
|
|
7347
7347
|
"character": 6
|
|
7348
7348
|
},
|
|
7349
7349
|
"name": "FsArtifact"
|
|
@@ -7352,7 +7352,7 @@
|
|
|
7352
7352
|
"__schema": "KeywordTypeSchema",
|
|
7353
7353
|
"location": {
|
|
7354
7354
|
"filePath": "artifact/artifact-factory.ts",
|
|
7355
|
-
"line":
|
|
7355
|
+
"line": 46,
|
|
7356
7356
|
"character": 19
|
|
7357
7357
|
},
|
|
7358
7358
|
"name": "undefined"
|
|
@@ -7365,7 +7365,7 @@
|
|
|
7365
7365
|
"__schema": "FunctionLikeSchema",
|
|
7366
7366
|
"location": {
|
|
7367
7367
|
"filePath": "artifact/artifact-factory.ts",
|
|
7368
|
-
"line":
|
|
7368
|
+
"line": 69,
|
|
7369
7369
|
"character": 3
|
|
7370
7370
|
},
|
|
7371
7371
|
"signature": "(method) ArtifactFactory.getRootDir(rootDir: string, def: ArtifactDefinition): string",
|
|
@@ -7375,7 +7375,7 @@
|
|
|
7375
7375
|
"__schema": "ParameterSchema",
|
|
7376
7376
|
"location": {
|
|
7377
7377
|
"filePath": "artifact/artifact-factory.ts",
|
|
7378
|
-
"line":
|
|
7378
|
+
"line": 69,
|
|
7379
7379
|
"character": 14
|
|
7380
7380
|
},
|
|
7381
7381
|
"name": "rootDir",
|
|
@@ -7383,7 +7383,7 @@
|
|
|
7383
7383
|
"__schema": "KeywordTypeSchema",
|
|
7384
7384
|
"location": {
|
|
7385
7385
|
"filePath": "artifact/artifact-factory.ts",
|
|
7386
|
-
"line":
|
|
7386
|
+
"line": 69,
|
|
7387
7387
|
"character": 23
|
|
7388
7388
|
},
|
|
7389
7389
|
"name": "string"
|
|
@@ -7395,7 +7395,7 @@
|
|
|
7395
7395
|
"__schema": "ParameterSchema",
|
|
7396
7396
|
"location": {
|
|
7397
7397
|
"filePath": "artifact/artifact-factory.ts",
|
|
7398
|
-
"line":
|
|
7398
|
+
"line": 69,
|
|
7399
7399
|
"character": 31
|
|
7400
7400
|
},
|
|
7401
7401
|
"name": "def",
|
|
@@ -7403,7 +7403,7 @@
|
|
|
7403
7403
|
"__schema": "TypeRefSchema",
|
|
7404
7404
|
"location": {
|
|
7405
7405
|
"filePath": "artifact/artifact-factory.ts",
|
|
7406
|
-
"line":
|
|
7406
|
+
"line": 69,
|
|
7407
7407
|
"character": 36
|
|
7408
7408
|
},
|
|
7409
7409
|
"name": "ArtifactDefinition"
|
|
@@ -7416,7 +7416,7 @@
|
|
|
7416
7416
|
"__schema": "InferenceTypeSchema",
|
|
7417
7417
|
"location": {
|
|
7418
7418
|
"filePath": "artifact/artifact-factory.ts",
|
|
7419
|
-
"line":
|
|
7419
|
+
"line": 69,
|
|
7420
7420
|
"character": 3
|
|
7421
7421
|
},
|
|
7422
7422
|
"type": "string"
|
|
@@ -7427,14 +7427,14 @@
|
|
|
7427
7427
|
"__schema": "FunctionLikeSchema",
|
|
7428
7428
|
"location": {
|
|
7429
7429
|
"filePath": "artifact/artifact-factory.ts",
|
|
7430
|
-
"line":
|
|
7430
|
+
"line": 77,
|
|
7431
7431
|
"character": 3
|
|
7432
7432
|
},
|
|
7433
7433
|
"doc": {
|
|
7434
7434
|
"__schema": "DocSchema",
|
|
7435
7435
|
"location": {
|
|
7436
7436
|
"filePath": "artifact/artifact-factory.ts",
|
|
7437
|
-
"line":
|
|
7437
|
+
"line": 74,
|
|
7438
7438
|
"character": 3
|
|
7439
7439
|
},
|
|
7440
7440
|
"raw": "/**\n * generate artifacts from a build context according to the spec defined in the artifact definitions.\n */",
|
|
@@ -7447,7 +7447,7 @@
|
|
|
7447
7447
|
"__schema": "ParameterSchema",
|
|
7448
7448
|
"location": {
|
|
7449
7449
|
"filePath": "artifact/artifact-factory.ts",
|
|
7450
|
-
"line":
|
|
7450
|
+
"line": 77,
|
|
7451
7451
|
"character": 12
|
|
7452
7452
|
},
|
|
7453
7453
|
"name": "context",
|
|
@@ -7455,7 +7455,7 @@
|
|
|
7455
7455
|
"__schema": "TypeRefSchema",
|
|
7456
7456
|
"location": {
|
|
7457
7457
|
"filePath": "artifact/artifact-factory.ts",
|
|
7458
|
-
"line":
|
|
7458
|
+
"line": 77,
|
|
7459
7459
|
"character": 21
|
|
7460
7460
|
},
|
|
7461
7461
|
"name": "BuildContext"
|
|
@@ -7467,7 +7467,7 @@
|
|
|
7467
7467
|
"__schema": "ParameterSchema",
|
|
7468
7468
|
"location": {
|
|
7469
7469
|
"filePath": "artifact/artifact-factory.ts",
|
|
7470
|
-
"line":
|
|
7470
|
+
"line": 77,
|
|
7471
7471
|
"character": 35
|
|
7472
7472
|
},
|
|
7473
7473
|
"name": "defs",
|
|
@@ -7475,14 +7475,14 @@
|
|
|
7475
7475
|
"__schema": "TypeArraySchema",
|
|
7476
7476
|
"location": {
|
|
7477
7477
|
"filePath": "artifact/artifact-factory.ts",
|
|
7478
|
-
"line":
|
|
7478
|
+
"line": 77,
|
|
7479
7479
|
"character": 41
|
|
7480
7480
|
},
|
|
7481
7481
|
"type": {
|
|
7482
7482
|
"__schema": "TypeRefSchema",
|
|
7483
7483
|
"location": {
|
|
7484
7484
|
"filePath": "artifact/artifact-factory.ts",
|
|
7485
|
-
"line":
|
|
7485
|
+
"line": 77,
|
|
7486
7486
|
"character": 41
|
|
7487
7487
|
},
|
|
7488
7488
|
"name": "ArtifactDefinition"
|
|
@@ -7495,7 +7495,7 @@
|
|
|
7495
7495
|
"__schema": "ParameterSchema",
|
|
7496
7496
|
"location": {
|
|
7497
7497
|
"filePath": "artifact/artifact-factory.ts",
|
|
7498
|
-
"line":
|
|
7498
|
+
"line": 77,
|
|
7499
7499
|
"character": 63
|
|
7500
7500
|
},
|
|
7501
7501
|
"name": "task",
|
|
@@ -7503,7 +7503,7 @@
|
|
|
7503
7503
|
"__schema": "TypeRefSchema",
|
|
7504
7504
|
"location": {
|
|
7505
7505
|
"filePath": "artifact/artifact-factory.ts",
|
|
7506
|
-
"line":
|
|
7506
|
+
"line": 77,
|
|
7507
7507
|
"character": 69
|
|
7508
7508
|
},
|
|
7509
7509
|
"name": "BuildTask"
|
|
@@ -7516,7 +7516,7 @@
|
|
|
7516
7516
|
"__schema": "TypeRefSchema",
|
|
7517
7517
|
"location": {
|
|
7518
7518
|
"filePath": "artifact/artifact-factory.ts",
|
|
7519
|
-
"line":
|
|
7519
|
+
"line": 77,
|
|
7520
7520
|
"character": 81
|
|
7521
7521
|
},
|
|
7522
7522
|
"name": "ComponentMap",
|
|
@@ -7525,7 +7525,7 @@
|
|
|
7525
7525
|
"__schema": "TypeRefSchema",
|
|
7526
7526
|
"location": {
|
|
7527
7527
|
"filePath": "artifact/artifact-factory.ts",
|
|
7528
|
-
"line":
|
|
7528
|
+
"line": 77,
|
|
7529
7529
|
"character": 94
|
|
7530
7530
|
},
|
|
7531
7531
|
"name": "ArtifactList",
|
|
@@ -7534,7 +7534,7 @@
|
|
|
7534
7534
|
"__schema": "TypeRefSchema",
|
|
7535
7535
|
"location": {
|
|
7536
7536
|
"filePath": "artifact/artifact-factory.ts",
|
|
7537
|
-
"line":
|
|
7537
|
+
"line": 77,
|
|
7538
7538
|
"character": 107
|
|
7539
7539
|
},
|
|
7540
7540
|
"name": "FsArtifact"
|
|
@@ -9344,7 +9344,7 @@
|
|
|
9344
9344
|
"_legacy": {
|
|
9345
9345
|
"scope": "teambit.pipelines",
|
|
9346
9346
|
"name": "builder",
|
|
9347
|
-
"version": "1.0.
|
|
9347
|
+
"version": "1.0.160"
|
|
9348
9348
|
},
|
|
9349
9349
|
"_scope": "teambit.pipelines"
|
|
9350
9350
|
}
|
|
@@ -14606,7 +14606,7 @@
|
|
|
14606
14606
|
"__schema": "VariableLikeSchema",
|
|
14607
14607
|
"location": {
|
|
14608
14608
|
"filePath": "artifact/artifact-factory.ts",
|
|
14609
|
-
"line":
|
|
14609
|
+
"line": 14,
|
|
14610
14610
|
"character": 14
|
|
14611
14611
|
},
|
|
14612
14612
|
"signature": "const DEFAULT_CONTEXT: \"component\"",
|
|
@@ -14615,7 +14615,7 @@
|
|
|
14615
14615
|
"__schema": "InferenceTypeSchema",
|
|
14616
14616
|
"location": {
|
|
14617
14617
|
"filePath": "artifact/artifact-factory.ts",
|
|
14618
|
-
"line":
|
|
14618
|
+
"line": 14,
|
|
14619
14619
|
"character": 14
|
|
14620
14620
|
},
|
|
14621
14621
|
"type": "\"component\""
|
|
@@ -14627,7 +14627,7 @@
|
|
|
14627
14627
|
"__schema": "TypeSchema",
|
|
14628
14628
|
"location": {
|
|
14629
14629
|
"filePath": "artifact/artifact-factory.ts",
|
|
14630
|
-
"line":
|
|
14630
|
+
"line": 16,
|
|
14631
14631
|
"character": 1
|
|
14632
14632
|
},
|
|
14633
14633
|
"signature": "type ArtifactMap = ComponentMap<ArtifactList<FsArtifact>>",
|
|
@@ -14636,7 +14636,7 @@
|
|
|
14636
14636
|
"__schema": "TypeRefSchema",
|
|
14637
14637
|
"location": {
|
|
14638
14638
|
"filePath": "artifact/artifact-factory.ts",
|
|
14639
|
-
"line":
|
|
14639
|
+
"line": 16,
|
|
14640
14640
|
"character": 27
|
|
14641
14641
|
},
|
|
14642
14642
|
"name": "ComponentMap",
|
|
@@ -14645,7 +14645,7 @@
|
|
|
14645
14645
|
"__schema": "TypeRefSchema",
|
|
14646
14646
|
"location": {
|
|
14647
14647
|
"filePath": "artifact/artifact-factory.ts",
|
|
14648
|
-
"line":
|
|
14648
|
+
"line": 16,
|
|
14649
14649
|
"character": 40
|
|
14650
14650
|
},
|
|
14651
14651
|
"name": "ArtifactList",
|
|
@@ -14654,7 +14654,7 @@
|
|
|
14654
14654
|
"__schema": "TypeRefSchema",
|
|
14655
14655
|
"location": {
|
|
14656
14656
|
"filePath": "artifact/artifact-factory.ts",
|
|
14657
|
-
"line":
|
|
14657
|
+
"line": 16,
|
|
14658
14658
|
"character": 53
|
|
14659
14659
|
},
|
|
14660
14660
|
"name": "FsArtifact"
|
|
@@ -14668,7 +14668,7 @@
|
|
|
14668
14668
|
"__schema": "ClassSchema",
|
|
14669
14669
|
"location": {
|
|
14670
14670
|
"filePath": "artifact/artifact-factory.ts",
|
|
14671
|
-
"line":
|
|
14671
|
+
"line": 18,
|
|
14672
14672
|
"character": 1
|
|
14673
14673
|
},
|
|
14674
14674
|
"signature": "class ArtifactFactory",
|
|
@@ -14678,7 +14678,7 @@
|
|
|
14678
14678
|
"__schema": "FunctionLikeSchema",
|
|
14679
14679
|
"location": {
|
|
14680
14680
|
"filePath": "artifact/artifact-factory.ts",
|
|
14681
|
-
"line":
|
|
14681
|
+
"line": 19,
|
|
14682
14682
|
"character": 3
|
|
14683
14683
|
},
|
|
14684
14684
|
"signature": "(method) ArtifactFactory.resolvePaths(root: string, def: ArtifactDefinition): string[]",
|
|
@@ -14688,7 +14688,7 @@
|
|
|
14688
14688
|
"__schema": "ParameterSchema",
|
|
14689
14689
|
"location": {
|
|
14690
14690
|
"filePath": "artifact/artifact-factory.ts",
|
|
14691
|
-
"line":
|
|
14691
|
+
"line": 19,
|
|
14692
14692
|
"character": 16
|
|
14693
14693
|
},
|
|
14694
14694
|
"name": "root",
|
|
@@ -14696,7 +14696,7 @@
|
|
|
14696
14696
|
"__schema": "KeywordTypeSchema",
|
|
14697
14697
|
"location": {
|
|
14698
14698
|
"filePath": "artifact/artifact-factory.ts",
|
|
14699
|
-
"line":
|
|
14699
|
+
"line": 19,
|
|
14700
14700
|
"character": 22
|
|
14701
14701
|
},
|
|
14702
14702
|
"name": "string"
|
|
@@ -14708,7 +14708,7 @@
|
|
|
14708
14708
|
"__schema": "ParameterSchema",
|
|
14709
14709
|
"location": {
|
|
14710
14710
|
"filePath": "artifact/artifact-factory.ts",
|
|
14711
|
-
"line":
|
|
14711
|
+
"line": 19,
|
|
14712
14712
|
"character": 30
|
|
14713
14713
|
},
|
|
14714
14714
|
"name": "def",
|
|
@@ -14716,7 +14716,7 @@
|
|
|
14716
14716
|
"__schema": "TypeRefSchema",
|
|
14717
14717
|
"location": {
|
|
14718
14718
|
"filePath": "artifact/artifact-factory.ts",
|
|
14719
|
-
"line":
|
|
14719
|
+
"line": 19,
|
|
14720
14720
|
"character": 35
|
|
14721
14721
|
},
|
|
14722
14722
|
"name": "ArtifactDefinition"
|
|
@@ -14729,14 +14729,14 @@
|
|
|
14729
14729
|
"__schema": "TypeArraySchema",
|
|
14730
14730
|
"location": {
|
|
14731
14731
|
"filePath": "artifact/artifact-factory.ts",
|
|
14732
|
-
"line":
|
|
14732
|
+
"line": 19,
|
|
14733
14733
|
"character": 56
|
|
14734
14734
|
},
|
|
14735
14735
|
"type": {
|
|
14736
14736
|
"__schema": "KeywordTypeSchema",
|
|
14737
14737
|
"location": {
|
|
14738
14738
|
"filePath": "artifact/artifact-factory.ts",
|
|
14739
|
-
"line":
|
|
14739
|
+
"line": 19,
|
|
14740
14740
|
"character": 56
|
|
14741
14741
|
},
|
|
14742
14742
|
"name": "string"
|
|
@@ -14748,7 +14748,7 @@
|
|
|
14748
14748
|
"__schema": "FunctionLikeSchema",
|
|
14749
14749
|
"location": {
|
|
14750
14750
|
"filePath": "artifact/artifact-factory.ts",
|
|
14751
|
-
"line":
|
|
14751
|
+
"line": 41,
|
|
14752
14752
|
"character": 3
|
|
14753
14753
|
},
|
|
14754
14754
|
"signature": "(method) ArtifactFactory.createFromComponent(context: BuildContext, component: Component, def: ArtifactDefinition, task: BuildTask): FsArtifact | undefined",
|
|
@@ -14758,7 +14758,7 @@
|
|
|
14758
14758
|
"__schema": "ParameterSchema",
|
|
14759
14759
|
"location": {
|
|
14760
14760
|
"filePath": "artifact/artifact-factory.ts",
|
|
14761
|
-
"line":
|
|
14761
|
+
"line": 42,
|
|
14762
14762
|
"character": 5
|
|
14763
14763
|
},
|
|
14764
14764
|
"name": "context",
|
|
@@ -14766,7 +14766,7 @@
|
|
|
14766
14766
|
"__schema": "TypeRefSchema",
|
|
14767
14767
|
"location": {
|
|
14768
14768
|
"filePath": "artifact/artifact-factory.ts",
|
|
14769
|
-
"line":
|
|
14769
|
+
"line": 42,
|
|
14770
14770
|
"character": 14
|
|
14771
14771
|
},
|
|
14772
14772
|
"name": "BuildContext"
|
|
@@ -14778,7 +14778,7 @@
|
|
|
14778
14778
|
"__schema": "ParameterSchema",
|
|
14779
14779
|
"location": {
|
|
14780
14780
|
"filePath": "artifact/artifact-factory.ts",
|
|
14781
|
-
"line":
|
|
14781
|
+
"line": 43,
|
|
14782
14782
|
"character": 5
|
|
14783
14783
|
},
|
|
14784
14784
|
"name": "component",
|
|
@@ -14786,7 +14786,7 @@
|
|
|
14786
14786
|
"__schema": "TypeRefSchema",
|
|
14787
14787
|
"location": {
|
|
14788
14788
|
"filePath": "artifact/artifact-factory.ts",
|
|
14789
|
-
"line":
|
|
14789
|
+
"line": 43,
|
|
14790
14790
|
"character": 16
|
|
14791
14791
|
},
|
|
14792
14792
|
"name": "Component"
|
|
@@ -14798,7 +14798,7 @@
|
|
|
14798
14798
|
"__schema": "ParameterSchema",
|
|
14799
14799
|
"location": {
|
|
14800
14800
|
"filePath": "artifact/artifact-factory.ts",
|
|
14801
|
-
"line":
|
|
14801
|
+
"line": 44,
|
|
14802
14802
|
"character": 5
|
|
14803
14803
|
},
|
|
14804
14804
|
"name": "def",
|
|
@@ -14806,7 +14806,7 @@
|
|
|
14806
14806
|
"__schema": "TypeRefSchema",
|
|
14807
14807
|
"location": {
|
|
14808
14808
|
"filePath": "artifact/artifact-factory.ts",
|
|
14809
|
-
"line":
|
|
14809
|
+
"line": 44,
|
|
14810
14810
|
"character": 10
|
|
14811
14811
|
},
|
|
14812
14812
|
"name": "ArtifactDefinition"
|
|
@@ -14818,7 +14818,7 @@
|
|
|
14818
14818
|
"__schema": "ParameterSchema",
|
|
14819
14819
|
"location": {
|
|
14820
14820
|
"filePath": "artifact/artifact-factory.ts",
|
|
14821
|
-
"line":
|
|
14821
|
+
"line": 45,
|
|
14822
14822
|
"character": 5
|
|
14823
14823
|
},
|
|
14824
14824
|
"name": "task",
|
|
@@ -14826,7 +14826,7 @@
|
|
|
14826
14826
|
"__schema": "TypeRefSchema",
|
|
14827
14827
|
"location": {
|
|
14828
14828
|
"filePath": "artifact/artifact-factory.ts",
|
|
14829
|
-
"line":
|
|
14829
|
+
"line": 45,
|
|
14830
14830
|
"character": 11
|
|
14831
14831
|
},
|
|
14832
14832
|
"name": "BuildTask"
|
|
@@ -14839,7 +14839,7 @@
|
|
|
14839
14839
|
"__schema": "TypeUnionSchema",
|
|
14840
14840
|
"location": {
|
|
14841
14841
|
"filePath": "artifact/artifact-factory.ts",
|
|
14842
|
-
"line":
|
|
14842
|
+
"line": 46,
|
|
14843
14843
|
"character": 6
|
|
14844
14844
|
},
|
|
14845
14845
|
"types": [
|
|
@@ -14847,7 +14847,7 @@
|
|
|
14847
14847
|
"__schema": "TypeRefSchema",
|
|
14848
14848
|
"location": {
|
|
14849
14849
|
"filePath": "artifact/artifact-factory.ts",
|
|
14850
|
-
"line":
|
|
14850
|
+
"line": 46,
|
|
14851
14851
|
"character": 6
|
|
14852
14852
|
},
|
|
14853
14853
|
"name": "FsArtifact"
|
|
@@ -14856,7 +14856,7 @@
|
|
|
14856
14856
|
"__schema": "KeywordTypeSchema",
|
|
14857
14857
|
"location": {
|
|
14858
14858
|
"filePath": "artifact/artifact-factory.ts",
|
|
14859
|
-
"line":
|
|
14859
|
+
"line": 46,
|
|
14860
14860
|
"character": 19
|
|
14861
14861
|
},
|
|
14862
14862
|
"name": "undefined"
|
|
@@ -14869,7 +14869,7 @@
|
|
|
14869
14869
|
"__schema": "FunctionLikeSchema",
|
|
14870
14870
|
"location": {
|
|
14871
14871
|
"filePath": "artifact/artifact-factory.ts",
|
|
14872
|
-
"line":
|
|
14872
|
+
"line": 69,
|
|
14873
14873
|
"character": 3
|
|
14874
14874
|
},
|
|
14875
14875
|
"signature": "(method) ArtifactFactory.getRootDir(rootDir: string, def: ArtifactDefinition): string",
|
|
@@ -14879,7 +14879,7 @@
|
|
|
14879
14879
|
"__schema": "ParameterSchema",
|
|
14880
14880
|
"location": {
|
|
14881
14881
|
"filePath": "artifact/artifact-factory.ts",
|
|
14882
|
-
"line":
|
|
14882
|
+
"line": 69,
|
|
14883
14883
|
"character": 14
|
|
14884
14884
|
},
|
|
14885
14885
|
"name": "rootDir",
|
|
@@ -14887,7 +14887,7 @@
|
|
|
14887
14887
|
"__schema": "KeywordTypeSchema",
|
|
14888
14888
|
"location": {
|
|
14889
14889
|
"filePath": "artifact/artifact-factory.ts",
|
|
14890
|
-
"line":
|
|
14890
|
+
"line": 69,
|
|
14891
14891
|
"character": 23
|
|
14892
14892
|
},
|
|
14893
14893
|
"name": "string"
|
|
@@ -14899,7 +14899,7 @@
|
|
|
14899
14899
|
"__schema": "ParameterSchema",
|
|
14900
14900
|
"location": {
|
|
14901
14901
|
"filePath": "artifact/artifact-factory.ts",
|
|
14902
|
-
"line":
|
|
14902
|
+
"line": 69,
|
|
14903
14903
|
"character": 31
|
|
14904
14904
|
},
|
|
14905
14905
|
"name": "def",
|
|
@@ -14907,7 +14907,7 @@
|
|
|
14907
14907
|
"__schema": "TypeRefSchema",
|
|
14908
14908
|
"location": {
|
|
14909
14909
|
"filePath": "artifact/artifact-factory.ts",
|
|
14910
|
-
"line":
|
|
14910
|
+
"line": 69,
|
|
14911
14911
|
"character": 36
|
|
14912
14912
|
},
|
|
14913
14913
|
"name": "ArtifactDefinition"
|
|
@@ -14920,7 +14920,7 @@
|
|
|
14920
14920
|
"__schema": "InferenceTypeSchema",
|
|
14921
14921
|
"location": {
|
|
14922
14922
|
"filePath": "artifact/artifact-factory.ts",
|
|
14923
|
-
"line":
|
|
14923
|
+
"line": 69,
|
|
14924
14924
|
"character": 3
|
|
14925
14925
|
},
|
|
14926
14926
|
"type": "string"
|
|
@@ -14931,14 +14931,14 @@
|
|
|
14931
14931
|
"__schema": "FunctionLikeSchema",
|
|
14932
14932
|
"location": {
|
|
14933
14933
|
"filePath": "artifact/artifact-factory.ts",
|
|
14934
|
-
"line":
|
|
14934
|
+
"line": 77,
|
|
14935
14935
|
"character": 3
|
|
14936
14936
|
},
|
|
14937
14937
|
"doc": {
|
|
14938
14938
|
"__schema": "DocSchema",
|
|
14939
14939
|
"location": {
|
|
14940
14940
|
"filePath": "artifact/artifact-factory.ts",
|
|
14941
|
-
"line":
|
|
14941
|
+
"line": 74,
|
|
14942
14942
|
"character": 3
|
|
14943
14943
|
},
|
|
14944
14944
|
"raw": "/**\n * generate artifacts from a build context according to the spec defined in the artifact definitions.\n */",
|
|
@@ -14951,7 +14951,7 @@
|
|
|
14951
14951
|
"__schema": "ParameterSchema",
|
|
14952
14952
|
"location": {
|
|
14953
14953
|
"filePath": "artifact/artifact-factory.ts",
|
|
14954
|
-
"line":
|
|
14954
|
+
"line": 77,
|
|
14955
14955
|
"character": 12
|
|
14956
14956
|
},
|
|
14957
14957
|
"name": "context",
|
|
@@ -14959,7 +14959,7 @@
|
|
|
14959
14959
|
"__schema": "TypeRefSchema",
|
|
14960
14960
|
"location": {
|
|
14961
14961
|
"filePath": "artifact/artifact-factory.ts",
|
|
14962
|
-
"line":
|
|
14962
|
+
"line": 77,
|
|
14963
14963
|
"character": 21
|
|
14964
14964
|
},
|
|
14965
14965
|
"name": "BuildContext"
|
|
@@ -14971,7 +14971,7 @@
|
|
|
14971
14971
|
"__schema": "ParameterSchema",
|
|
14972
14972
|
"location": {
|
|
14973
14973
|
"filePath": "artifact/artifact-factory.ts",
|
|
14974
|
-
"line":
|
|
14974
|
+
"line": 77,
|
|
14975
14975
|
"character": 35
|
|
14976
14976
|
},
|
|
14977
14977
|
"name": "defs",
|
|
@@ -14979,14 +14979,14 @@
|
|
|
14979
14979
|
"__schema": "TypeArraySchema",
|
|
14980
14980
|
"location": {
|
|
14981
14981
|
"filePath": "artifact/artifact-factory.ts",
|
|
14982
|
-
"line":
|
|
14982
|
+
"line": 77,
|
|
14983
14983
|
"character": 41
|
|
14984
14984
|
},
|
|
14985
14985
|
"type": {
|
|
14986
14986
|
"__schema": "TypeRefSchema",
|
|
14987
14987
|
"location": {
|
|
14988
14988
|
"filePath": "artifact/artifact-factory.ts",
|
|
14989
|
-
"line":
|
|
14989
|
+
"line": 77,
|
|
14990
14990
|
"character": 41
|
|
14991
14991
|
},
|
|
14992
14992
|
"name": "ArtifactDefinition"
|
|
@@ -14999,7 +14999,7 @@
|
|
|
14999
14999
|
"__schema": "ParameterSchema",
|
|
15000
15000
|
"location": {
|
|
15001
15001
|
"filePath": "artifact/artifact-factory.ts",
|
|
15002
|
-
"line":
|
|
15002
|
+
"line": 77,
|
|
15003
15003
|
"character": 63
|
|
15004
15004
|
},
|
|
15005
15005
|
"name": "task",
|
|
@@ -15007,7 +15007,7 @@
|
|
|
15007
15007
|
"__schema": "TypeRefSchema",
|
|
15008
15008
|
"location": {
|
|
15009
15009
|
"filePath": "artifact/artifact-factory.ts",
|
|
15010
|
-
"line":
|
|
15010
|
+
"line": 77,
|
|
15011
15011
|
"character": 69
|
|
15012
15012
|
},
|
|
15013
15013
|
"name": "BuildTask"
|
|
@@ -15020,7 +15020,7 @@
|
|
|
15020
15020
|
"__schema": "TypeRefSchema",
|
|
15021
15021
|
"location": {
|
|
15022
15022
|
"filePath": "artifact/artifact-factory.ts",
|
|
15023
|
-
"line":
|
|
15023
|
+
"line": 77,
|
|
15024
15024
|
"character": 81
|
|
15025
15025
|
},
|
|
15026
15026
|
"name": "ComponentMap",
|
|
@@ -15029,7 +15029,7 @@
|
|
|
15029
15029
|
"__schema": "TypeRefSchema",
|
|
15030
15030
|
"location": {
|
|
15031
15031
|
"filePath": "artifact/artifact-factory.ts",
|
|
15032
|
-
"line":
|
|
15032
|
+
"line": 77,
|
|
15033
15033
|
"character": 94
|
|
15034
15034
|
},
|
|
15035
15035
|
"name": "ArtifactList",
|
|
@@ -15038,7 +15038,7 @@
|
|
|
15038
15038
|
"__schema": "TypeRefSchema",
|
|
15039
15039
|
"location": {
|
|
15040
15040
|
"filePath": "artifact/artifact-factory.ts",
|
|
15041
|
-
"line":
|
|
15041
|
+
"line": 77,
|
|
15042
15042
|
"character": 107
|
|
15043
15043
|
},
|
|
15044
15044
|
"name": "FsArtifact"
|
|
@@ -15831,7 +15831,7 @@
|
|
|
15831
15831
|
"_legacy": {
|
|
15832
15832
|
"scope": "teambit.pipelines",
|
|
15833
15833
|
"name": "builder",
|
|
15834
|
-
"version": "1.0.
|
|
15834
|
+
"version": "1.0.160"
|
|
15835
15835
|
},
|
|
15836
15836
|
"_scope": "teambit.pipelines"
|
|
15837
15837
|
}
|
|
@@ -16093,7 +16093,7 @@
|
|
|
16093
16093
|
"componentId": {
|
|
16094
16094
|
"scope": "teambit.pipelines",
|
|
16095
16095
|
"name": "builder",
|
|
16096
|
-
"version": "1.0.
|
|
16096
|
+
"version": "1.0.160"
|
|
16097
16097
|
},
|
|
16098
16098
|
"taggedModuleExports": []
|
|
16099
16099
|
}
|
|
@@ -39,6 +39,13 @@ function _component() {
|
|
|
39
39
|
};
|
|
40
40
|
return data;
|
|
41
41
|
}
|
|
42
|
+
function _utils() {
|
|
43
|
+
const data = require("@teambit/legacy/dist/utils");
|
|
44
|
+
_utils = function () {
|
|
45
|
+
return data;
|
|
46
|
+
};
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
42
49
|
function _storage() {
|
|
43
50
|
const data = require("../storage");
|
|
44
51
|
_storage = function () {
|
|
@@ -72,7 +79,8 @@ const DEFAULT_CONTEXT = exports.DEFAULT_CONTEXT = 'component';
|
|
|
72
79
|
class ArtifactFactory {
|
|
73
80
|
resolvePaths(root, def) {
|
|
74
81
|
const patternsFlattened = (0, _lodash().flatten)(def.globPatterns);
|
|
75
|
-
const
|
|
82
|
+
const patternsFlattenedLinux = patternsFlattened.map(_utils().pathNormalizeToLinux);
|
|
83
|
+
const paths = _globby().default.sync(patternsFlattenedLinux, {
|
|
76
84
|
cwd: root
|
|
77
85
|
});
|
|
78
86
|
return paths;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_path","data","require","_globby","_interopRequireDefault","_lodash","_artifactFiles","_component","_storage","_artifactList","_exceptions","_fsArtifact","obj","__esModule","default","DEFAULT_CONTEXT","exports","ArtifactFactory","resolvePaths","root","def","patternsFlattened","flatten","globPatterns","paths","globby","sync","cwd","getArtifactContextPath","context","component","artifactContext","getArtifactContext","capsulePath","capsuleNetwork","graphCapsules","getCapsule","id","path","CapsuleNotFound","capsulesRootDir","createFromComponent","task","contextPath","rootDir","getRootDir","length","undefined","FsArtifact","ArtifactFiles","getStorageResolver","storageResolver","DefaultResolver","toComponentMap","artifactMap","ComponentMap","as","components","toString","artifacts","filter","targetId","
|
|
1
|
+
{"version":3,"names":["_path","data","require","_globby","_interopRequireDefault","_lodash","_artifactFiles","_component","_utils","_storage","_artifactList","_exceptions","_fsArtifact","obj","__esModule","default","DEFAULT_CONTEXT","exports","ArtifactFactory","resolvePaths","root","def","patternsFlattened","flatten","globPatterns","patternsFlattenedLinux","map","pathNormalizeToLinux","paths","globby","sync","cwd","getArtifactContextPath","context","component","artifactContext","getArtifactContext","capsulePath","capsuleNetwork","graphCapsules","getCapsule","id","path","CapsuleNotFound","capsulesRootDir","createFromComponent","task","contextPath","rootDir","getRootDir","length","undefined","FsArtifact","ArtifactFiles","getStorageResolver","storageResolver","DefaultResolver","toComponentMap","artifactMap","ComponentMap","as","components","toString","artifacts","filter","targetId","artifact","ArtifactList","fromArray","join","generate","defs","tupleArr","forEach","capsuleDir","push"],"sources":["artifact-factory.ts"],"sourcesContent":["import { join } from 'path';\nimport globby from 'globby';\nimport { flatten } from 'lodash';\nimport { ArtifactFiles } from '@teambit/legacy/dist/consumer/component/sources/artifact-files';\nimport { Component, ComponentMap } from '@teambit/component';\nimport { pathNormalizeToLinux } from '@teambit/legacy/dist/utils';\nimport { ArtifactDefinition } from './artifact-definition';\nimport { DefaultResolver } from '../storage';\nimport { ArtifactList } from './artifact-list';\nimport type { BuildContext, BuildTask } from '../build-task';\nimport { CapsuleNotFound } from '../exceptions';\nimport { FsArtifact } from './fs-artifact';\n\nexport const DEFAULT_CONTEXT = 'component';\n\nexport type ArtifactMap = ComponentMap<ArtifactList<FsArtifact>>;\n\nexport class ArtifactFactory {\n resolvePaths(root: string, def: ArtifactDefinition): string[] {\n const patternsFlattened = flatten(def.globPatterns);\n const patternsFlattenedLinux = patternsFlattened.map(pathNormalizeToLinux);\n const paths = globby.sync(patternsFlattenedLinux, { cwd: root });\n return paths;\n }\n\n private getArtifactContextPath(context: BuildContext, component: Component, def: ArtifactDefinition) {\n const artifactContext = this.getArtifactContext(def);\n if (artifactContext === 'component') {\n const capsulePath = context.capsuleNetwork.graphCapsules.getCapsule(component.id)?.path;\n if (!capsulePath) throw new CapsuleNotFound(component.id);\n return capsulePath;\n }\n\n return context.capsuleNetwork.capsulesRootDir;\n }\n\n private getArtifactContext(def: ArtifactDefinition) {\n return def.context || DEFAULT_CONTEXT;\n }\n\n createFromComponent(\n context: BuildContext,\n component: Component,\n def: ArtifactDefinition,\n task: BuildTask\n ): FsArtifact | undefined {\n const contextPath = this.getArtifactContextPath(context, component, def);\n const rootDir = this.getRootDir(contextPath, def);\n const paths = this.resolvePaths(rootDir, def);\n if (!paths || !paths.length) {\n return undefined;\n }\n return new FsArtifact(def, new ArtifactFiles(paths), task, rootDir);\n }\n\n private getStorageResolver(def: ArtifactDefinition) {\n return def.storageResolver || new DefaultResolver();\n }\n\n private toComponentMap(context: BuildContext, artifactMap: [string, FsArtifact][]) {\n return ComponentMap.as<ArtifactList<FsArtifact>>(context.components, (component) => {\n const id = component.id.toString();\n const artifacts = artifactMap.filter(([targetId]) => targetId === id).map(([, artifact]) => artifact);\n\n return ArtifactList.fromArray(artifacts);\n });\n }\n\n getRootDir(rootDir: string, def: ArtifactDefinition) {\n if (!def.rootDir) return rootDir;\n return join(rootDir, def.rootDir);\n }\n\n /**\n * generate artifacts from a build context according to the spec defined in the artifact definitions.\n */\n generate(context: BuildContext, defs: ArtifactDefinition[], task: BuildTask): ComponentMap<ArtifactList<FsArtifact>> {\n const tupleArr: [string, FsArtifact][] = [];\n\n defs.forEach((def) => {\n const artifactContext = this.getArtifactContext(def);\n if (artifactContext === 'env') {\n const capsuleDir = context.capsuleNetwork.capsulesRootDir;\n const rootDir = this.getRootDir(capsuleDir, def);\n const paths = this.resolvePaths(rootDir, def);\n if (paths && paths.length) {\n const artifact = new FsArtifact(def, new ArtifactFiles(this.resolvePaths(rootDir, def)), task, rootDir);\n\n return context.components.forEach((component) => {\n tupleArr.push([component.id.toString(), artifact]);\n });\n }\n }\n\n return context.components.forEach((component) => {\n const artifact = this.createFromComponent(context, component, def, task);\n if (artifact) {\n tupleArr.push([component.id.toString(), artifact]);\n }\n });\n });\n\n return this.toComponentMap(context, tupleArr);\n }\n}\n"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.160/dist/builder.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@1.0.160/dist/builder.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.160",
|
|
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": "1.0.
|
|
9
|
+
"version": "1.0.160"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -27,21 +27,21 @@
|
|
|
27
27
|
"@teambit/harmony": "0.4.6",
|
|
28
28
|
"@teambit/bit-error": "0.0.404",
|
|
29
29
|
"@teambit/component-id": "1.2.0",
|
|
30
|
-
"@teambit/component": "1.0.
|
|
31
|
-
"@teambit/envs": "1.0.
|
|
30
|
+
"@teambit/component": "1.0.160",
|
|
31
|
+
"@teambit/envs": "1.0.160",
|
|
32
32
|
"@teambit/logger": "0.0.944",
|
|
33
33
|
"@teambit/toolbox.string.capitalize": "0.0.496",
|
|
34
|
-
"@teambit/tester": "1.0.
|
|
35
|
-
"@teambit/isolator": "1.0.
|
|
34
|
+
"@teambit/tester": "1.0.160",
|
|
35
|
+
"@teambit/isolator": "1.0.160",
|
|
36
36
|
"@teambit/cli": "0.0.851",
|
|
37
|
-
"@teambit/workspace": "1.0.
|
|
38
|
-
"@teambit/aspect-loader": "1.0.
|
|
39
|
-
"@teambit/aspect": "1.0.
|
|
40
|
-
"@teambit/generator": "1.0.
|
|
37
|
+
"@teambit/workspace": "1.0.160",
|
|
38
|
+
"@teambit/aspect-loader": "1.0.160",
|
|
39
|
+
"@teambit/aspect": "1.0.160",
|
|
40
|
+
"@teambit/generator": "1.0.161",
|
|
41
41
|
"@teambit/global-config": "0.0.854",
|
|
42
|
-
"@teambit/graphql": "1.0.
|
|
43
|
-
"@teambit/scope": "1.0.
|
|
44
|
-
"@teambit/ui": "1.0.
|
|
42
|
+
"@teambit/graphql": "1.0.160",
|
|
43
|
+
"@teambit/scope": "1.0.160",
|
|
44
|
+
"@teambit/ui": "1.0.160",
|
|
45
45
|
"@teambit/express": "0.0.950"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|