@teambit/builder 0.0.761 → 0.0.764
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/dist/build.cmd.d.ts +5 -1
- package/dist/build.cmd.js +17 -3
- package/dist/build.cmd.js.map +1 -1
- package/package-tar/teambit-builder-0.0.764.tgz +0 -0
- package/package.json +15 -15
- package/{preview-1655263660719.js → preview-1655436530187.js} +2 -2
- package/package-tar/teambit-builder-0.0.761.tgz +0 -0
package/dist/build.cmd.d.ts
CHANGED
|
@@ -18,11 +18,15 @@ export declare class BuilderCmd implements Command {
|
|
|
18
18
|
private logger;
|
|
19
19
|
name: string;
|
|
20
20
|
description: string;
|
|
21
|
+
arguments: {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
}[];
|
|
21
25
|
alias: string;
|
|
22
26
|
group: string;
|
|
23
27
|
options: CommandOptions;
|
|
24
28
|
constructor(builder: BuilderMain, workspace: Workspace, logger: Logger);
|
|
25
|
-
report([
|
|
29
|
+
report([pattern]: [string], { all, dev, install, cachePackagesOnCapsulesRoot, reuseCapsules, tasks, listTasks, }: BuildOpts): Promise<string>;
|
|
26
30
|
private getListTasks;
|
|
27
31
|
}
|
|
28
32
|
export {};
|
package/dist/build.cmd.js
CHANGED
|
@@ -25,6 +25,16 @@ function _defineProperty2() {
|
|
|
25
25
|
return data;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
function _constants() {
|
|
29
|
+
const data = require("@teambit/legacy/dist/constants");
|
|
30
|
+
|
|
31
|
+
_constants = function () {
|
|
32
|
+
return data;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
return data;
|
|
36
|
+
}
|
|
37
|
+
|
|
28
38
|
function _exceptions() {
|
|
29
39
|
const data = require("@teambit/legacy/dist/consumer/exceptions");
|
|
30
40
|
|
|
@@ -50,15 +60,19 @@ class BuilderCmd {
|
|
|
50
60
|
this.builder = builder;
|
|
51
61
|
this.workspace = workspace;
|
|
52
62
|
this.logger = logger;
|
|
53
|
-
(0, _defineProperty2().default)(this, "name", 'build [pattern]');
|
|
63
|
+
(0, _defineProperty2().default)(this, "name", 'build [component-pattern]');
|
|
54
64
|
(0, _defineProperty2().default)(this, "description", 'run set of tasks for build');
|
|
65
|
+
(0, _defineProperty2().default)(this, "arguments", [{
|
|
66
|
+
name: 'component-pattern',
|
|
67
|
+
description: _constants().COMPONENT_PATTERN_HELP
|
|
68
|
+
}]);
|
|
55
69
|
(0, _defineProperty2().default)(this, "alias", '');
|
|
56
70
|
(0, _defineProperty2().default)(this, "group", 'development');
|
|
57
71
|
(0, _defineProperty2().default)(this, "options", [['a', 'all', 'build all components, not only modified and new'], ['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.
|
|
58
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']]);
|
|
59
73
|
}
|
|
60
74
|
|
|
61
|
-
async report([
|
|
75
|
+
async report([pattern], {
|
|
62
76
|
all = false,
|
|
63
77
|
dev = false,
|
|
64
78
|
install = false,
|
|
@@ -74,7 +88,7 @@ specify the task-name (e.g. "TypescriptCompiler") or the task-aspect-id (e.g. te
|
|
|
74
88
|
}
|
|
75
89
|
|
|
76
90
|
const longProcessLogger = this.logger.createLongProcessLogger('build');
|
|
77
|
-
const components = await this.workspace.getComponentsByUserInput(all,
|
|
91
|
+
const components = await this.workspace.getComponentsByUserInput(all, pattern, true);
|
|
78
92
|
|
|
79
93
|
if (!components.length) {
|
|
80
94
|
return _chalk().default.bold(`no components found to build. use "--all" flag to build all components or specify the ids to build, otherwise, only new and modified components will be built`);
|
package/dist/build.cmd.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["BuilderCmd","constructor","builder","workspace","logger","report","
|
|
1
|
+
{"version":3,"names":["BuilderCmd","constructor","builder","workspace","logger","name","description","COMPONENT_PATTERN_HELP","report","pattern","all","dev","install","cachePackagesOnCapsulesRoot","reuseCapsules","tasks","listTasks","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};\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', 'build all components, not only modified and new'],\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 ] 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 dev = false,\n install = false,\n cachePackagesOnCapsulesRoot = false,\n reuseCapsules = false,\n tasks,\n listTasks,\n }: BuildOpts\n ): Promise<string> {\n if (!this.workspace) throw new ConsumerNotFound();\n if (listTasks) {\n return this.getListTasks(listTasks);\n }\n\n const longProcessLogger = this.logger.createLongProcessLogger('build');\n const components = await this.workspace.getComponentsByUserInput(all, pattern, true);\n if (!components.length) {\n return chalk.bold(\n `no components found to build. use \"--all\" 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 }\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${ch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AEyB,MAAZL,YAAY,CAAC2B,cAAD,EAA0C;IAClE,MAAMC,MAAM,GAAG,MAAM,KAAK3C,SAAL,CAAe4C,kBAAf,CAAkCF,cAAlC,CAArB;IACA,MAAMG,SAAS,GAAG,MAAM,KAAK7C,SAAL,CAAe8C,GAAf,CAAmBH,MAAnB,CAAxB;IACA,MAAMI,OAAO,GAAG,KAAKhD,OAAL,CAAac,SAAb,CAAuBgC,SAAvB,CAAhB;IACA,OAAQ,GAAExB,gBAAA,CAAMmB,KAAN,CAAY,YAAZ,CAA0B;AACxC,SAASO,OAAO,CAACC,EAAR,CAAWC,QAAX,EAAsB;AAC/B,SAASF,OAAO,CAACG,KAAM;AACvB;AACA,EAAE7B,gBAAA,CAAMC,IAAN,CAAW,uBAAX,CAAoC;AACtC,EAAEyB,OAAO,CAACI,UAAR,CAAmBC,IAAnB,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;;AA5FwC"}
|
|
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.764",
|
|
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.764"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"p-map-series": "2.1.0",
|
|
@@ -22,17 +22,17 @@
|
|
|
22
22
|
"core-js": "^3.0.0",
|
|
23
23
|
"@teambit/graph.cleargraph": "0.0.1",
|
|
24
24
|
"@teambit/harmony": "0.3.3",
|
|
25
|
-
"@teambit/component": "0.0.
|
|
26
|
-
"@teambit/envs": "0.0.
|
|
27
|
-
"@teambit/logger": "0.0.
|
|
28
|
-
"@teambit/tester": "0.0.
|
|
29
|
-
"@teambit/isolator": "0.0.
|
|
30
|
-
"@teambit/cli": "0.0.
|
|
31
|
-
"@teambit/workspace": "0.0.
|
|
32
|
-
"@teambit/aspect-loader": "0.0.
|
|
33
|
-
"@teambit/generator": "0.0.
|
|
34
|
-
"@teambit/graphql": "0.0.
|
|
35
|
-
"@teambit/scope": "0.0.
|
|
25
|
+
"@teambit/component": "0.0.764",
|
|
26
|
+
"@teambit/envs": "0.0.764",
|
|
27
|
+
"@teambit/logger": "0.0.598",
|
|
28
|
+
"@teambit/tester": "0.0.764",
|
|
29
|
+
"@teambit/isolator": "0.0.764",
|
|
30
|
+
"@teambit/cli": "0.0.505",
|
|
31
|
+
"@teambit/workspace": "0.0.764",
|
|
32
|
+
"@teambit/aspect-loader": "0.0.764",
|
|
33
|
+
"@teambit/generator": "0.0.764",
|
|
34
|
+
"@teambit/graphql": "0.0.764",
|
|
35
|
+
"@teambit/scope": "0.0.764",
|
|
36
36
|
"@teambit/bit-error": "0.0.394",
|
|
37
37
|
"@teambit/component-id": "0.0.402"
|
|
38
38
|
},
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@teambit/pipelines.aspect-docs.builder": "0.0.138"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@teambit/legacy": "1.0.
|
|
52
|
+
"@teambit/legacy": "1.0.285",
|
|
53
53
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
54
54
|
"react": "^16.8.0 || ^17.0.0"
|
|
55
55
|
},
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"react": "-"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
|
-
"@teambit/legacy": "1.0.
|
|
80
|
+
"@teambit/legacy": "1.0.285",
|
|
81
81
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
82
82
|
"react": "^16.8.0 || ^17.0.0"
|
|
83
83
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.
|
|
2
|
-
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.
|
|
1
|
+
export const compositions = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.764/dist/builder.composition.js')]
|
|
2
|
+
export const overview = [require('/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.764/dist/builder.docs.mdx')]
|
|
Binary file
|