@teambit/builder 0.0.879 → 0.0.880
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/builder.service.tsx +24 -25
- package/dist/build.cmd.d.ts +2 -1
- package/dist/build.cmd.js +9 -3
- package/dist/build.cmd.js.map +1 -1
- package/dist/builder.service.js +12 -4
- package/dist/builder.service.js.map +1 -1
- package/package-tar/teambit-builder-0.0.880.tgz +0 -0
- package/package.json +16 -16
- package/{preview-1665805128745.js → preview-1666312873430.js} +2 -2
- package/package-tar/teambit-builder-0.0.879.tgz +0 -0
package/builder.service.tsx
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { EnvDefinition, EnvService, ExecutionContext } from '@teambit/envs';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { ScopeMain } from '@teambit/scope';
|
|
4
|
+
import pMapSeries from 'p-map-series';
|
|
4
5
|
import { Text, Newline } from 'ink';
|
|
5
6
|
import { Logger } from '@teambit/logger';
|
|
6
7
|
import { IsolatorMain } from '@teambit/isolator';
|
|
@@ -92,31 +93,29 @@ export class BuilderService implements EnvService<BuildServiceResults, BuilderDe
|
|
|
92
93
|
const longProcessLogger = this.logger.createLongProcessLogger(title);
|
|
93
94
|
this.logger.consoleTitle(title);
|
|
94
95
|
const envsBuildContext: EnvsBuildContext = {};
|
|
95
|
-
await
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
})
|
|
119
|
-
);
|
|
96
|
+
await pMapSeries(envsExecutionContext, async (executionContext) => {
|
|
97
|
+
const componentIds = executionContext.components.map((component) => component.id);
|
|
98
|
+
const { originalSeeders } = options;
|
|
99
|
+
const originalSeedersOfThisEnv = componentIds.filter((compId) =>
|
|
100
|
+
originalSeeders ? originalSeeders.find((seeder) => compId.isEqual(seeder)) : true
|
|
101
|
+
);
|
|
102
|
+
const capsuleNetwork = await this.isolator.isolateComponents(componentIds, {
|
|
103
|
+
getExistingAsIs: true,
|
|
104
|
+
seedersOnly: options.seedersOnly,
|
|
105
|
+
});
|
|
106
|
+
capsuleNetwork._originalSeeders = originalSeedersOfThisEnv;
|
|
107
|
+
this.logger.console(
|
|
108
|
+
`generated graph for env "${executionContext.id}", originalSeedersOfThisEnv: ${originalSeedersOfThisEnv.length}, graphOfThisEnv: ${capsuleNetwork.seedersCapsules.length}, graph total: ${capsuleNetwork.graphCapsules.length}`
|
|
109
|
+
);
|
|
110
|
+
const buildContext = Object.assign(executionContext, {
|
|
111
|
+
capsuleNetwork,
|
|
112
|
+
previousTasksResults: [],
|
|
113
|
+
pipeName: this.displayPipeName,
|
|
114
|
+
dev: options.dev,
|
|
115
|
+
laneId: this.scope.legacyScope.currentLaneId,
|
|
116
|
+
});
|
|
117
|
+
envsBuildContext[executionContext.id] = buildContext;
|
|
118
|
+
});
|
|
120
119
|
const buildPipe = new BuildPipe(
|
|
121
120
|
tasksQueue,
|
|
122
121
|
envsBuildContext,
|
package/dist/build.cmd.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import { Workspace } from '@teambit/workspace';
|
|
|
4
4
|
import { BuilderMain } from './builder.main.runtime';
|
|
5
5
|
declare type BuildOpts = {
|
|
6
6
|
all: boolean;
|
|
7
|
+
unmodified?: boolean;
|
|
7
8
|
dev: boolean;
|
|
8
9
|
rebuild: boolean;
|
|
9
10
|
install: boolean;
|
|
@@ -27,7 +28,7 @@ export declare class BuilderCmd implements Command {
|
|
|
27
28
|
group: string;
|
|
28
29
|
options: CommandOptions;
|
|
29
30
|
constructor(builder: BuilderMain, workspace: Workspace, logger: Logger);
|
|
30
|
-
report([pattern]: [string], { all, dev, install, cachePackagesOnCapsulesRoot, reuseCapsules, tasks, listTasks, skipTests, }: BuildOpts): Promise<string>;
|
|
31
|
+
report([pattern]: [string], { all, unmodified, dev, install, cachePackagesOnCapsulesRoot, reuseCapsules, tasks, listTasks, skipTests, }: BuildOpts): Promise<string>;
|
|
31
32
|
private getListTasks;
|
|
32
33
|
}
|
|
33
34
|
export {};
|
package/dist/build.cmd.js
CHANGED
|
@@ -68,12 +68,13 @@ class BuilderCmd {
|
|
|
68
68
|
}]);
|
|
69
69
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
70
70
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
71
|
-
(0, _defineProperty2().default)(this, "options", [['a', 'all', '
|
|
71
|
+
(0, _defineProperty2().default)(this, "options", [['a', 'all', 'DEPRECATED. use --unmodified'], ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are built)'], ['d', 'dev', 'run the pipeline in dev mode'], ['', 'install', 'install core aspects in capsules'], ['', 'reuse-capsules', 'avoid deleting the capsules root-dir before starting the build'], ['', 'tasks <string>', `build the specified task(s) only. for multiple tasks, separate by a comma and wrap with quotes.
|
|
72
72
|
specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. teambit.compilation/compiler)`], ['', 'cache-packages-on-capsule-root', 'set the package-manager cache on the capsule root'], ['', 'list-tasks <string>', 'list tasks of an env or a component-id for each one of the pipelines: build, tag and snap'], ['', 'skip-tests', 'skip running component tests during tag process']]);
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
async report([pattern], {
|
|
76
76
|
all = false,
|
|
77
|
+
unmodified = false,
|
|
77
78
|
dev = false,
|
|
78
79
|
install = false,
|
|
79
80
|
cachePackagesOnCapsulesRoot = false,
|
|
@@ -84,15 +85,20 @@ specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. te
|
|
|
84
85
|
}) {
|
|
85
86
|
if (!this.workspace) throw new (_exceptions().ConsumerNotFound)();
|
|
86
87
|
|
|
88
|
+
if (all) {
|
|
89
|
+
this.logger.consoleWarning(`--all is deprecated, please use --unmodified instead`);
|
|
90
|
+
unmodified = true;
|
|
91
|
+
}
|
|
92
|
+
|
|
87
93
|
if (listTasks) {
|
|
88
94
|
return this.getListTasks(listTasks);
|
|
89
95
|
}
|
|
90
96
|
|
|
91
97
|
const longProcessLogger = this.logger.createLongProcessLogger('build');
|
|
92
|
-
const components = await this.workspace.getComponentsByUserInput(
|
|
98
|
+
const components = await this.workspace.getComponentsByUserInput(unmodified, pattern, true);
|
|
93
99
|
|
|
94
100
|
if (!components.length) {
|
|
95
|
-
return _chalk().default.bold(`no components found to build. use "--
|
|
101
|
+
return _chalk().default.bold(`no components found to build. use "--unmodified" flag to build all components or specify the ids to build, otherwise, only new and modified components will be built`);
|
|
96
102
|
}
|
|
97
103
|
|
|
98
104
|
this.logger.consoleSuccess(`found ${components.length} components to build`);
|
package/dist/build.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BuilderCmd","constructor","builder","workspace","logger","name","description","COMPONENT_PATTERN_HELP","report","pattern","all","dev","install","cachePackagesOnCapsulesRoot","reuseCapsules","tasks","listTasks","skipTests","ConsumerNotFound","getListTasks","longProcessLogger","createLongProcessLogger","components","getComponentsByUserInput","length","chalk","bold","consoleSuccess","envsExecutionResults","build","installOptions","installTeambitBit","packageManagerConfigRootDir","path","linkingOptions","linkTeambitBit","emptyRootDir","getExistingAsIs","split","map","task","trim","end","throwErrorsIfExist","green","tasksQueue","componentIdStr","compId","resolveComponentId","component","get","results","id","toString","envId","buildTasks","join","tagTasks","snapTasks"],"sources":["build.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport chalk from 'chalk';\nimport { BuilderMain } from './builder.main.runtime';\n\ntype BuildOpts = {\n all: boolean;\n dev: boolean;\n rebuild: boolean;\n install: boolean;\n cachePackagesOnCapsulesRoot: boolean;\n reuseCapsules: boolean;\n tasks: string;\n listTasks?: string;\n skipTests?: boolean;\n};\n\nexport class BuilderCmd implements Command {\n name = 'build [component-pattern]';\n description = 'run set of tasks for build';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n alias = '';\n group = 'development';\n options = [\n ['a', 'all', '
|
|
1
|
+
{"version":3,"names":["BuilderCmd","constructor","builder","workspace","logger","name","description","COMPONENT_PATTERN_HELP","report","pattern","all","unmodified","dev","install","cachePackagesOnCapsulesRoot","reuseCapsules","tasks","listTasks","skipTests","ConsumerNotFound","consoleWarning","getListTasks","longProcessLogger","createLongProcessLogger","components","getComponentsByUserInput","length","chalk","bold","consoleSuccess","envsExecutionResults","build","installOptions","installTeambitBit","packageManagerConfigRootDir","path","linkingOptions","linkTeambitBit","emptyRootDir","getExistingAsIs","split","map","task","trim","end","throwErrorsIfExist","green","tasksQueue","componentIdStr","compId","resolveComponentId","component","get","results","id","toString","envId","buildTasks","join","tagTasks","snapTasks"],"sources":["build.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport { Logger } from '@teambit/logger';\nimport { Workspace } from '@teambit/workspace';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { ConsumerNotFound } from '@teambit/legacy/dist/consumer/exceptions';\nimport chalk from 'chalk';\nimport { BuilderMain } from './builder.main.runtime';\n\ntype BuildOpts = {\n all: boolean; // deprecated. use unmodified\n unmodified?: boolean;\n dev: boolean;\n rebuild: boolean;\n install: boolean;\n cachePackagesOnCapsulesRoot: boolean;\n reuseCapsules: boolean;\n tasks: string;\n listTasks?: string;\n skipTests?: boolean;\n};\n\nexport class BuilderCmd implements Command {\n name = 'build [component-pattern]';\n description = 'run set of tasks for build';\n arguments = [{ name: 'component-pattern', description: COMPONENT_PATTERN_HELP }];\n alias = '';\n group = 'development';\n options = [\n ['a', 'all', 'DEPRECATED. use --unmodified'],\n ['u', 'unmodified', 'include unmodified components (by default, only new and modified components are built)'],\n ['d', 'dev', 'run the pipeline in dev mode'],\n ['', 'install', 'install core aspects in capsules'],\n ['', 'reuse-capsules', 'avoid deleting the capsules root-dir before starting the build'],\n [\n '',\n 'tasks <string>',\n `build the specified task(s) only. for multiple tasks, separate by a comma and wrap with quotes.\nspecify the task-name (e.g. \"TypescriptCompiler\") or the task-aspect-id (e.g. teambit.compilation/compiler)`,\n ],\n ['', 'cache-packages-on-capsule-root', 'set the package-manager cache on the capsule root'],\n [\n '',\n 'list-tasks <string>',\n 'list tasks of an env or a component-id for each one of the pipelines: build, tag and snap',\n ],\n ['', 'skip-tests', 'skip running component tests during tag process'],\n ] as CommandOptions;\n\n constructor(private builder: BuilderMain, private workspace: Workspace, private logger: Logger) {}\n\n async report(\n [pattern]: [string],\n {\n all = false,\n unmodified = false,\n dev = false,\n install = false,\n cachePackagesOnCapsulesRoot = false,\n reuseCapsules = false,\n tasks,\n listTasks,\n skipTests,\n }: BuildOpts\n ): Promise<string> {\n if (!this.workspace) throw new ConsumerNotFound();\n if (all) {\n this.logger.consoleWarning(`--all is deprecated, please use --unmodified instead`);\n unmodified = true;\n }\n if (listTasks) {\n return this.getListTasks(listTasks);\n }\n\n const longProcessLogger = this.logger.createLongProcessLogger('build');\n const components = await this.workspace.getComponentsByUserInput(unmodified, pattern, true);\n if (!components.length) {\n return chalk.bold(\n `no components found to build. use \"--unmodified\" flag to build all components or specify the ids to build, otherwise, only new and modified components will be built`\n );\n }\n this.logger.consoleSuccess(`found ${components.length} components to build`);\n\n const envsExecutionResults = await this.builder.build(\n components,\n {\n installOptions: {\n installTeambitBit: install,\n packageManagerConfigRootDir: this.workspace.path,\n },\n linkingOptions: { linkTeambitBit: !install },\n emptyRootDir: !reuseCapsules,\n getExistingAsIs: reuseCapsules,\n cachePackagesOnCapsulesRoot,\n },\n {\n dev,\n tasks: tasks ? tasks.split(',').map((task) => task.trim()) : [],\n skipTests,\n }\n );\n longProcessLogger.end();\n envsExecutionResults.throwErrorsIfExist();\n this.logger.consoleSuccess();\n return chalk.green(`the build has been completed. total: ${envsExecutionResults.tasksQueue.length} tasks`);\n }\n\n private async getListTasks(componentIdStr: string): Promise<string> {\n const compId = await this.workspace.resolveComponentId(componentIdStr);\n const component = await this.workspace.get(compId);\n const results = this.builder.listTasks(component);\n return `${chalk.green('Tasks List')}\nid: ${results.id.toString()}\nenvId: ${results.envId}\n\n${chalk.bold('Build Pipeline Tasks:')}\n${results.buildTasks.join('\\n')}\n\n${chalk.bold('Tag Pipeline Tasks:')}\n${results.tagTasks.join('\\n')}\n\n${chalk.bold('Snap Pipeline Tasks:')}\n${results.snapTasks.join('\\n') || '<N/A>'}`;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAgBO,MAAMA,UAAN,CAAoC;EA2BzCC,WAAW,CAASC,OAAT,EAAuCC,SAAvC,EAAqEC,MAArE,EAAqF;IAAA,KAA5EF,OAA4E,GAA5EA,OAA4E;IAAA,KAA9CC,SAA8C,GAA9CA,SAA8C;IAAA,KAAhBC,MAAgB,GAAhBA,MAAgB;IAAA,8CA1BzF,2BA0ByF;IAAA,qDAzBlF,4BAyBkF;IAAA,mDAxBpF,CAAC;MAAEC,IAAI,EAAE,mBAAR;MAA6BC,WAAW,EAAEC;IAA1C,CAAD,CAwBoF;IAAA,+CAvBxF,EAuBwF;IAAA,+CAtBxF,aAsBwF;IAAA,iDArBtF,CACR,CAAC,GAAD,EAAM,KAAN,EAAa,8BAAb,CADQ,EAER,CAAC,GAAD,EAAM,YAAN,EAAoB,wFAApB,CAFQ,EAGR,CAAC,GAAD,EAAM,KAAN,EAAa,8B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AAnB,CAAwB,IAAxB,CAA8B;AAChC;AACA,EAAE/B,gBAAA,CAAMC,IAAN,CAAW,qBAAX,CAAkC;AACpC,EAAEyB,OAAO,CAACM,QAAR,CAAiBD,IAAjB,CAAsB,IAAtB,CAA4B;AAC9B;AACA,EAAE/B,gBAAA,CAAMC,IAAN,CAAW,sBAAX,CAAmC;AACrC,EAAEyB,OAAO,CAACO,SAAR,CAAkBF,IAAlB,CAAuB,IAAvB,KAAgC,OAAQ,EAXtC;EAYD;;AArGwC"}
|
package/dist/builder.service.js
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
require("core-js/modules/es.array.iterator.js");
|
|
6
|
-
|
|
7
5
|
require("core-js/modules/es.promise.js");
|
|
8
6
|
|
|
9
7
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -31,6 +29,16 @@ function _react() {
|
|
|
31
29
|
return data;
|
|
32
30
|
}
|
|
33
31
|
|
|
32
|
+
function _pMapSeries() {
|
|
33
|
+
const data = _interopRequireDefault(require("p-map-series"));
|
|
34
|
+
|
|
35
|
+
_pMapSeries = function () {
|
|
36
|
+
return data;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return data;
|
|
40
|
+
}
|
|
41
|
+
|
|
34
42
|
function _ink() {
|
|
35
43
|
const data = require("ink");
|
|
36
44
|
|
|
@@ -132,7 +140,7 @@ class BuilderService {
|
|
|
132
140
|
const longProcessLogger = this.logger.createLongProcessLogger(title);
|
|
133
141
|
this.logger.consoleTitle(title);
|
|
134
142
|
const envsBuildContext = {};
|
|
135
|
-
await
|
|
143
|
+
await (0, _pMapSeries().default)(envsExecutionContext, async executionContext => {
|
|
136
144
|
const componentIds = executionContext.components.map(component => component.id);
|
|
137
145
|
const {
|
|
138
146
|
originalSeeders
|
|
@@ -152,7 +160,7 @@ class BuilderService {
|
|
|
152
160
|
laneId: this.scope.legacyScope.currentLaneId
|
|
153
161
|
});
|
|
154
162
|
envsBuildContext[executionContext.id] = buildContext;
|
|
155
|
-
})
|
|
163
|
+
});
|
|
156
164
|
const buildPipe = new (_buildPipe().BuildPipe)(tasksQueue, envsBuildContext, this.logger, this.artifactFactory, options.previousTasksResults);
|
|
157
165
|
const buildResults = await buildPipe.execute();
|
|
158
166
|
longProcessLogger.end();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["pipeNames","getBuildPipe","getTagPipe","getSnapPipe","BuilderService","constructor","isolator","logger","taskSlot","pipeNameOnEnv","displayPipeName","artifactFactory","scope","runOnce","envsExecutionContext","options","envs","map","executionContext","envDefinition","tasksQueue","calculatePipelineOrder","tasks","skipTests","validate","info","toString","title","length","longProcessLogger","createLongProcessLogger","consoleTitle","envsBuildContext","Promise","all","componentIds","components","component","id","originalSeeders","originalSeedersOfThisEnv","filter","compId","find","seeder","isEqual","capsuleNetwork","isolateComponents","getExistingAsIs","seedersOnly","_originalSeeders","console","seedersCapsules","graphCapsules","buildContext","Object","assign","previousTasksResults","pipeName","dev","laneId","legacyScope","currentLaneId","buildPipe","BuildPipe","buildResults","execute","end","hasErrors","consoleFailure","consoleSuccess","render","env","pipes","getDescriptor","BuilderAspect","renderOnePipe","task","index","keys","pipeFuncName","getTasksNamesByPipeFunc","BuildTaskHelper","serializeId","getCurrentPipeTasks"],"sources":["builder.service.tsx"],"sourcesContent":["import { EnvDefinition, EnvService, ExecutionContext } from '@teambit/envs';\nimport React from 'react';\nimport { ScopeMain } from '@teambit/scope';\nimport { Text, Newline } from 'ink';\nimport { Logger } from '@teambit/logger';\nimport { IsolatorMain } from '@teambit/isolator';\nimport { Component, ComponentID } from '@teambit/component';\nimport { BuildPipe, TaskResults } from './build-pipe';\nimport { TaskResultsList } from './task-results-list';\nimport { TaskSlot } from './builder.main.runtime';\nimport { BuildContext, BuildTaskHelper } from './build-task';\nimport { ArtifactFactory } from './artifact';\nimport { calculatePipelineOrder } from './build-pipeline-order';\nimport { BuilderAspect } from './builder.aspect';\n\nexport type BuildServiceResults = {\n id: string;\n buildResults: TaskResultsList;\n components: Component[];\n errors?: [];\n};\n\nexport type BuilderServiceOptions = {\n seedersOnly?: boolean;\n originalSeeders?: ComponentID[];\n tasks?: string[];\n skipTests?: boolean;\n previousTasksResults?: TaskResults[];\n dev?: boolean;\n};\n\nexport type EnvsBuildContext = { [envId: string]: BuildContext };\n\nconst pipeNames = {\n getBuildPipe: 'build',\n getTagPipe: 'tag',\n getSnapPipe: 'snap',\n};\n\nexport type PipeName = 'build' | 'tag' | 'snap';\n\nexport type BuilderDescriptor = Array<{ pipeName: PipeName; tasks: string[] }>;\n\ntype PipeFunctionNames = keyof typeof pipeNames;\nexport class BuilderService implements EnvService<BuildServiceResults, BuilderDescriptor> {\n name = 'builder';\n\n constructor(\n /**\n * isolator extension.\n */\n private isolator: IsolatorMain,\n\n /**\n * logger extension.\n */\n private logger: Logger,\n\n /**\n * task slot (e.g tasks registered by other extensions.).\n */\n private taskSlot: TaskSlot,\n\n /**\n * a method with such name should be implemented on the env in order to run the pipe tasks.\n */\n private pipeNameOnEnv: PipeFunctionNames,\n\n /**\n * pipe name to display on the console during the execution\n */\n private displayPipeName: PipeName,\n private artifactFactory: ArtifactFactory,\n private scope: ScopeMain\n ) {}\n\n /**\n * runs all tasks for all envs\n */\n async runOnce(envsExecutionContext: ExecutionContext[], options: BuilderServiceOptions): Promise<TaskResultsList> {\n const envs = envsExecutionContext.map((executionContext) => executionContext.envDefinition);\n const tasksQueue = calculatePipelineOrder(\n this.taskSlot,\n envs,\n this.pipeNameOnEnv,\n options.tasks,\n options.skipTests\n );\n tasksQueue.validate();\n this.logger.info(`going to run tasks in the following order:\\n${tasksQueue.toString()}`);\n const title = `running ${this.displayPipeName} pipe for ${envs.length} environments, total ${tasksQueue.length} tasks`;\n const longProcessLogger = this.logger.createLongProcessLogger(title);\n this.logger.consoleTitle(title);\n const envsBuildContext: EnvsBuildContext = {};\n await Promise.all(\n envsExecutionContext.map(async (executionContext) => {\n const componentIds = executionContext.components.map((component) => component.id);\n const { originalSeeders } = options;\n const originalSeedersOfThisEnv = componentIds.filter((compId) =>\n originalSeeders ? originalSeeders.find((seeder) => compId.isEqual(seeder)) : true\n );\n const capsuleNetwork = await this.isolator.isolateComponents(componentIds, {\n getExistingAsIs: true,\n seedersOnly: options.seedersOnly,\n });\n capsuleNetwork._originalSeeders = originalSeedersOfThisEnv;\n this.logger.console(\n `generated graph for env \"${executionContext.id}\", originalSeedersOfThisEnv: ${originalSeedersOfThisEnv.length}, graphOfThisEnv: ${capsuleNetwork.seedersCapsules.length}, graph total: ${capsuleNetwork.graphCapsules.length}`\n );\n const buildContext = Object.assign(executionContext, {\n capsuleNetwork,\n previousTasksResults: [],\n pipeName: this.displayPipeName,\n dev: options.dev,\n laneId: this.scope.legacyScope.currentLaneId,\n });\n envsBuildContext[executionContext.id] = buildContext;\n })\n );\n const buildPipe = new BuildPipe(\n tasksQueue,\n envsBuildContext,\n this.logger,\n this.artifactFactory,\n options.previousTasksResults\n );\n const buildResults = await buildPipe.execute();\n longProcessLogger.end();\n buildResults.hasErrors() ? this.logger.consoleFailure() : this.logger.consoleSuccess();\n\n return buildResults;\n }\n\n render(env: EnvDefinition) {\n const pipes = this.getDescriptor(env);\n\n return (\n <Text key={BuilderAspect.id}>{pipes.map(({ pipeName, tasks }) => this.renderOnePipe(pipeName, tasks))}</Text>\n );\n }\n\n private renderOnePipe(pipeName, tasks) {\n if (!tasks || !tasks.length) return null;\n return (\n <Text key={pipeName}>\n <Text underline color=\"green\">\n {pipeName} pipe\n </Text>\n <Newline />\n <Text color=\"cyan\">total {tasks.length} tasks are configured to be executed in the following order</Text>\n <Newline />\n {tasks.map((task, index) => (\n <Text key={index}>\n <Text>\n {index + 1}. {task}\n </Text>\n <Newline />\n </Text>\n ))}\n <Newline />\n </Text>\n );\n }\n\n getDescriptor(env: EnvDefinition) {\n // @ts-ignore\n const tasks = Object.keys(pipeNames).map((pipeFuncName: PipeFunctionNames) => {\n const tasksQueue = this.getTasksNamesByPipeFunc(env, pipeFuncName);\n return { pipeName: pipeNames[pipeFuncName], tasks: tasksQueue };\n });\n return tasks as BuilderDescriptor;\n }\n\n private getTasksNamesByPipeFunc(env: EnvDefinition, pipeFuncName: PipeFunctionNames): string[] {\n const tasksQueue = calculatePipelineOrder(this.taskSlot, [env], pipeFuncName).map(({ task }) =>\n BuildTaskHelper.serializeId(task)\n );\n return tasksQueue;\n }\n\n getCurrentPipeTasks(env: EnvDefinition) {\n return this.getTasksNamesByPipeFunc(env, this.pipeNameOnEnv);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAoBA,MAAMA,SAAS,GAAG;EAChBC,YAAY,EAAE,OADE;EAEhBC,UAAU,EAAE,KAFI;EAGhBC,WAAW,EAAE;AAHG,CAAlB;;AAWO,MAAMC,cAAN,CAAmF;EAGxFC,WAAW;EACT;AACJ;AACA;EACYC,QAJC;EAMT;AACJ;AACA;EACYC,MATC;EAWT;AACJ;AACA;EACYC,QAdC;EAgBT;AACJ;AACA;EACYC,aAnBC;EAqBT;AACJ;AACA;EACYC,eAxBC,EAyBDC,eAzBC,EA0BDC,KA1BC,EA2BT;IAAA,KAvBQN,QAuBR,GAvBQA,QAuBR;IAAA,KAlBQC,MAkBR,GAlBQA,MAkBR;IAAA,KAbQC,QAaR,GAbQA,QAaR;IAAA,KARQC,aAQR,GARQA,aAQR;IAAA,KAHQC,eAGR,GAHQA,eAGR;IAAA,KAFQC,eAER,GAFQA,eAER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gE;IAC7F,MAAM5D,UAAU,GAAG,IAAAC,4CAAA,EAAuB,KAAKb,QAA5B,EAAsC,CAACgE,GAAD,CAAtC,EAA6CQ,YAA7C,EAA2D/D,GAA3D,CAA+D,CAAC;MAAE4D;IAAF,CAAD,KAChFK,4BAAA,CAAgBC,WAAhB,CAA4BN,IAA5B,CADiB,CAAnB;IAGA,OAAOzD,UAAP;EACD;;EAEDgE,mBAAmB,CAACZ,GAAD,EAAqB;IACtC,OAAO,KAAKS,uBAAL,CAA6BT,GAA7B,EAAkC,KAAK/D,aAAvC,CAAP;EACD;;AA1IuF"}
|
|
1
|
+
{"version":3,"names":["pipeNames","getBuildPipe","getTagPipe","getSnapPipe","BuilderService","constructor","isolator","logger","taskSlot","pipeNameOnEnv","displayPipeName","artifactFactory","scope","runOnce","envsExecutionContext","options","envs","map","executionContext","envDefinition","tasksQueue","calculatePipelineOrder","tasks","skipTests","validate","info","toString","title","length","longProcessLogger","createLongProcessLogger","consoleTitle","envsBuildContext","pMapSeries","componentIds","components","component","id","originalSeeders","originalSeedersOfThisEnv","filter","compId","find","seeder","isEqual","capsuleNetwork","isolateComponents","getExistingAsIs","seedersOnly","_originalSeeders","console","seedersCapsules","graphCapsules","buildContext","Object","assign","previousTasksResults","pipeName","dev","laneId","legacyScope","currentLaneId","buildPipe","BuildPipe","buildResults","execute","end","hasErrors","consoleFailure","consoleSuccess","render","env","pipes","getDescriptor","BuilderAspect","renderOnePipe","task","index","keys","pipeFuncName","getTasksNamesByPipeFunc","BuildTaskHelper","serializeId","getCurrentPipeTasks"],"sources":["builder.service.tsx"],"sourcesContent":["import { EnvDefinition, EnvService, ExecutionContext } from '@teambit/envs';\nimport React from 'react';\nimport { ScopeMain } from '@teambit/scope';\nimport pMapSeries from 'p-map-series';\nimport { Text, Newline } from 'ink';\nimport { Logger } from '@teambit/logger';\nimport { IsolatorMain } from '@teambit/isolator';\nimport { Component, ComponentID } from '@teambit/component';\nimport { BuildPipe, TaskResults } from './build-pipe';\nimport { TaskResultsList } from './task-results-list';\nimport { TaskSlot } from './builder.main.runtime';\nimport { BuildContext, BuildTaskHelper } from './build-task';\nimport { ArtifactFactory } from './artifact';\nimport { calculatePipelineOrder } from './build-pipeline-order';\nimport { BuilderAspect } from './builder.aspect';\n\nexport type BuildServiceResults = {\n id: string;\n buildResults: TaskResultsList;\n components: Component[];\n errors?: [];\n};\n\nexport type BuilderServiceOptions = {\n seedersOnly?: boolean;\n originalSeeders?: ComponentID[];\n tasks?: string[];\n skipTests?: boolean;\n previousTasksResults?: TaskResults[];\n dev?: boolean;\n};\n\nexport type EnvsBuildContext = { [envId: string]: BuildContext };\n\nconst pipeNames = {\n getBuildPipe: 'build',\n getTagPipe: 'tag',\n getSnapPipe: 'snap',\n};\n\nexport type PipeName = 'build' | 'tag' | 'snap';\n\nexport type BuilderDescriptor = Array<{ pipeName: PipeName; tasks: string[] }>;\n\ntype PipeFunctionNames = keyof typeof pipeNames;\nexport class BuilderService implements EnvService<BuildServiceResults, BuilderDescriptor> {\n name = 'builder';\n\n constructor(\n /**\n * isolator extension.\n */\n private isolator: IsolatorMain,\n\n /**\n * logger extension.\n */\n private logger: Logger,\n\n /**\n * task slot (e.g tasks registered by other extensions.).\n */\n private taskSlot: TaskSlot,\n\n /**\n * a method with such name should be implemented on the env in order to run the pipe tasks.\n */\n private pipeNameOnEnv: PipeFunctionNames,\n\n /**\n * pipe name to display on the console during the execution\n */\n private displayPipeName: PipeName,\n private artifactFactory: ArtifactFactory,\n private scope: ScopeMain\n ) {}\n\n /**\n * runs all tasks for all envs\n */\n async runOnce(envsExecutionContext: ExecutionContext[], options: BuilderServiceOptions): Promise<TaskResultsList> {\n const envs = envsExecutionContext.map((executionContext) => executionContext.envDefinition);\n const tasksQueue = calculatePipelineOrder(\n this.taskSlot,\n envs,\n this.pipeNameOnEnv,\n options.tasks,\n options.skipTests\n );\n tasksQueue.validate();\n this.logger.info(`going to run tasks in the following order:\\n${tasksQueue.toString()}`);\n const title = `running ${this.displayPipeName} pipe for ${envs.length} environments, total ${tasksQueue.length} tasks`;\n const longProcessLogger = this.logger.createLongProcessLogger(title);\n this.logger.consoleTitle(title);\n const envsBuildContext: EnvsBuildContext = {};\n await pMapSeries(envsExecutionContext, async (executionContext) => {\n const componentIds = executionContext.components.map((component) => component.id);\n const { originalSeeders } = options;\n const originalSeedersOfThisEnv = componentIds.filter((compId) =>\n originalSeeders ? originalSeeders.find((seeder) => compId.isEqual(seeder)) : true\n );\n const capsuleNetwork = await this.isolator.isolateComponents(componentIds, {\n getExistingAsIs: true,\n seedersOnly: options.seedersOnly,\n });\n capsuleNetwork._originalSeeders = originalSeedersOfThisEnv;\n this.logger.console(\n `generated graph for env \"${executionContext.id}\", originalSeedersOfThisEnv: ${originalSeedersOfThisEnv.length}, graphOfThisEnv: ${capsuleNetwork.seedersCapsules.length}, graph total: ${capsuleNetwork.graphCapsules.length}`\n );\n const buildContext = Object.assign(executionContext, {\n capsuleNetwork,\n previousTasksResults: [],\n pipeName: this.displayPipeName,\n dev: options.dev,\n laneId: this.scope.legacyScope.currentLaneId,\n });\n envsBuildContext[executionContext.id] = buildContext;\n });\n const buildPipe = new BuildPipe(\n tasksQueue,\n envsBuildContext,\n this.logger,\n this.artifactFactory,\n options.previousTasksResults\n );\n const buildResults = await buildPipe.execute();\n longProcessLogger.end();\n buildResults.hasErrors() ? this.logger.consoleFailure() : this.logger.consoleSuccess();\n\n return buildResults;\n }\n\n render(env: EnvDefinition) {\n const pipes = this.getDescriptor(env);\n\n return (\n <Text key={BuilderAspect.id}>{pipes.map(({ pipeName, tasks }) => this.renderOnePipe(pipeName, tasks))}</Text>\n );\n }\n\n private renderOnePipe(pipeName, tasks) {\n if (!tasks || !tasks.length) return null;\n return (\n <Text key={pipeName}>\n <Text underline color=\"green\">\n {pipeName} pipe\n </Text>\n <Newline />\n <Text color=\"cyan\">total {tasks.length} tasks are configured to be executed in the following order</Text>\n <Newline />\n {tasks.map((task, index) => (\n <Text key={index}>\n <Text>\n {index + 1}. {task}\n </Text>\n <Newline />\n </Text>\n ))}\n <Newline />\n </Text>\n );\n }\n\n getDescriptor(env: EnvDefinition) {\n // @ts-ignore\n const tasks = Object.keys(pipeNames).map((pipeFuncName: PipeFunctionNames) => {\n const tasksQueue = this.getTasksNamesByPipeFunc(env, pipeFuncName);\n return { pipeName: pipeNames[pipeFuncName], tasks: tasksQueue };\n });\n return tasks as BuilderDescriptor;\n }\n\n private getTasksNamesByPipeFunc(env: EnvDefinition, pipeFuncName: PipeFunctionNames): string[] {\n const tasksQueue = calculatePipelineOrder(this.taskSlot, [env], pipeFuncName).map(({ task }) =>\n BuildTaskHelper.serializeId(task)\n );\n return tasksQueue;\n }\n\n getCurrentPipeTasks(env: EnvDefinition) {\n return this.getTasksNamesByPipeFunc(env, this.pipeNameOnEnv);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAIA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAGA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAEA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AACA;EAAA;;EAAA;IAAA;EAAA;;EAAA;AAAA;;AAoBA,MAAMA,SAAS,GAAG;EAChBC,YAAY,EAAE,OADE;EAEhBC,UAAU,EAAE,KAFI;EAGhBC,WAAW,EAAE;AAHG,CAAlB;;AAWO,MAAMC,cAAN,CAAmF;EAGxFC,WAAW;EACT;AACJ;AACA;EACYC,QAJC;EAMT;AACJ;AACA;EACYC,MATC;EAWT;AACJ;AACA;EACYC,QAdC;EAgBT;AACJ;AACA;EACYC,aAnBC;EAqBT;AACJ;AACA;EACYC,eAxBC,EAyBDC,eAzBC,EA0BDC,KA1BC,EA2BT;IAAA,KAvBQN,QAuBR,GAvBQA,QAu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AAC+E,YAAD,CAArB;QAAqCzD,KAAK,EAAEF;MAA5C,CAAP;IACD,CAHa,CAAd;IAIA,OAAOE,KAAP;EACD;;EAEO0D,uBAAuB,CAACT,GAAD,EAAqBQ,YAArB,EAAgE;IAC7F,MAAM3D,UAAU,GAAG,IAAAC,4CAAA,EAAuB,KAAKb,QAA5B,EAAsC,CAAC+D,GAAD,CAAtC,EAA6CQ,YAA7C,EAA2D9D,GAA3D,CAA+D,CAAC;MAAE2D;IAAF,CAAD,KAChFK,4BAAA,CAAgBC,WAAhB,CAA4BN,IAA5B,CADiB,CAAnB;IAGA,OAAOxD,UAAP;EACD;;EAED+D,mBAAmB,CAACZ,GAAD,EAAqB;IACtC,OAAO,KAAKS,uBAAL,CAA6BT,GAA7B,EAAkC,KAAK9D,aAAvC,CAAP;EACD;;AAxIuF"}
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/builder",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.880",
|
|
4
4
|
"homepage": "https://bit.dev/teambit/pipelines/builder",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"componentId": {
|
|
7
7
|
"scope": "teambit.pipelines",
|
|
8
8
|
"name": "builder",
|
|
9
|
-
"version": "0.0.
|
|
9
|
+
"version": "0.0.880"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"p-map-series": "2.1.0",
|
|
@@ -26,19 +26,19 @@
|
|
|
26
26
|
"core-js": "^3.0.0",
|
|
27
27
|
"@teambit/graph.cleargraph": "0.0.1",
|
|
28
28
|
"@teambit/harmony": "0.3.3",
|
|
29
|
-
"@teambit/component": "0.0.
|
|
30
|
-
"@teambit/envs": "0.0.
|
|
31
|
-
"@teambit/logger": "0.0.
|
|
32
|
-
"@teambit/tester": "0.0.
|
|
33
|
-
"@teambit/isolator": "0.0.
|
|
34
|
-
"@teambit/lane-id": "0.0.
|
|
35
|
-
"@teambit/cli": "0.0.
|
|
36
|
-
"@teambit/workspace": "0.0.
|
|
37
|
-
"@teambit/aspect-loader": "0.0.
|
|
38
|
-
"@teambit/generator": "0.0.
|
|
39
|
-
"@teambit/graphql": "0.0.
|
|
40
|
-
"@teambit/scope": "0.0.
|
|
41
|
-
"@teambit/express": "0.0.
|
|
29
|
+
"@teambit/component": "0.0.880",
|
|
30
|
+
"@teambit/envs": "0.0.880",
|
|
31
|
+
"@teambit/logger": "0.0.683",
|
|
32
|
+
"@teambit/tester": "0.0.880",
|
|
33
|
+
"@teambit/isolator": "0.0.880",
|
|
34
|
+
"@teambit/lane-id": "0.0.108",
|
|
35
|
+
"@teambit/cli": "0.0.590",
|
|
36
|
+
"@teambit/workspace": "0.0.880",
|
|
37
|
+
"@teambit/aspect-loader": "0.0.880",
|
|
38
|
+
"@teambit/generator": "0.0.880",
|
|
39
|
+
"@teambit/graphql": "0.0.880",
|
|
40
|
+
"@teambit/scope": "0.0.880",
|
|
41
|
+
"@teambit/express": "0.0.688",
|
|
42
42
|
"@teambit/bit-error": "0.0.400",
|
|
43
43
|
"@teambit/component-id": "0.0.418"
|
|
44
44
|
},
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"@teambit/pipelines.aspect-docs.builder": "0.0.146"
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@teambit/legacy": "1.0.
|
|
60
|
+
"@teambit/legacy": "1.0.373",
|
|
61
61
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
62
62
|
"react": "^16.8.0 || ^17.0.0"
|
|
63
63
|
},
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.880/dist/builder.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.880/dist/builder.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
Binary file
|