@teambit/builder 1.0.336 → 1.0.337
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/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_pipelines_builder-preview.js +1 -1
- package/artifacts/schema.json +823 -581
- package/dist/build.cmd.d.ts +2 -1
- package/dist/build.cmd.js +14 -3
- package/dist/build.cmd.js.map +1 -1
- package/dist/builder.main.runtime.d.ts +9 -3
- package/dist/builder.main.runtime.js +55 -5
- package/dist/builder.main.runtime.js.map +1 -1
- package/dist/exceptions/components-have-issues.d.ts +5 -0
- package/dist/exceptions/components-have-issues.js +69 -0
- package/dist/exceptions/components-have-issues.js.map +1 -0
- package/dist/{preview-1721013596376.js → preview-1721099996991.js} +2 -2
- package/exceptions/components-have-issues.ts +42 -0
- package/package.json +20 -18
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ComponentsHaveIssues = void 0;
|
|
7
|
+
function _bitError() {
|
|
8
|
+
const data = require("@teambit/bit-error");
|
|
9
|
+
_bitError = function () {
|
|
10
|
+
return data;
|
|
11
|
+
};
|
|
12
|
+
return data;
|
|
13
|
+
}
|
|
14
|
+
function _issues() {
|
|
15
|
+
const data = require("@teambit/issues");
|
|
16
|
+
_issues = function () {
|
|
17
|
+
return data;
|
|
18
|
+
};
|
|
19
|
+
return data;
|
|
20
|
+
}
|
|
21
|
+
function _chalk() {
|
|
22
|
+
const data = _interopRequireDefault(require("chalk"));
|
|
23
|
+
_chalk = function () {
|
|
24
|
+
return data;
|
|
25
|
+
};
|
|
26
|
+
return data;
|
|
27
|
+
}
|
|
28
|
+
function _lodash() {
|
|
29
|
+
const data = require("lodash");
|
|
30
|
+
_lodash = function () {
|
|
31
|
+
return data;
|
|
32
|
+
};
|
|
33
|
+
return data;
|
|
34
|
+
}
|
|
35
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
36
|
+
class ComponentsHaveIssues extends _bitError().BitError {
|
|
37
|
+
constructor(components) {
|
|
38
|
+
components.forEach(component => {
|
|
39
|
+
component.issues = component.issues.filterNonTagBlocking();
|
|
40
|
+
});
|
|
41
|
+
const allIssueNames = (0, _lodash().uniq)(components.map(comp => comp.issues.getAllIssueNames()).flat());
|
|
42
|
+
const issuesColored = componentIssuesTemplate(components);
|
|
43
|
+
super(`error: issues found with the following components
|
|
44
|
+
${issuesColored}
|
|
45
|
+
|
|
46
|
+
to get the list of component-issues names and suggestions how to resolve them, run "bit component-issues".
|
|
47
|
+
|
|
48
|
+
while highly not recommended, it's possible to ignore issues in two ways:
|
|
49
|
+
1) temporarily ignore for this tag/snap/build command by entering "--ignore-issues" flag, e.g. \`bit tag --ignore-issues "${allIssueNames.join(', ')}" \`
|
|
50
|
+
2) ignore the issue completely by configuring it in the workspace.jsonc file. e.g:
|
|
51
|
+
"${_issues().IssuesAspect.id}": {
|
|
52
|
+
"ignoreIssues": [${allIssueNames.map(issue => `"${issue}"`).join(', ')}]
|
|
53
|
+
}
|
|
54
|
+
`);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.ComponentsHaveIssues = ComponentsHaveIssues;
|
|
58
|
+
function formatIssues(compWithIssues) {
|
|
59
|
+
return ` ${compWithIssues.issues?.outputForCLI()}\n`;
|
|
60
|
+
}
|
|
61
|
+
function componentIssuesTemplate(components) {
|
|
62
|
+
function format(component) {
|
|
63
|
+
return `${_chalk().default.underline(_chalk().default.cyan(component.id.toString()))}\n${formatIssues(component)}`;
|
|
64
|
+
}
|
|
65
|
+
const result = `\n${components.map(format).join('\n')}`;
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
//# sourceMappingURL=components-have-issues.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_bitError","data","require","_issues","_chalk","_interopRequireDefault","_lodash","e","__esModule","default","ComponentsHaveIssues","BitError","constructor","components","forEach","component","issues","filterNonTagBlocking","allIssueNames","uniq","map","comp","getAllIssueNames","flat","issuesColored","componentIssuesTemplate","join","IssuesAspect","id","issue","exports","formatIssues","compWithIssues","outputForCLI","format","chalk","underline","cyan","toString","result"],"sources":["components-have-issues.ts"],"sourcesContent":["import { BitError } from '@teambit/bit-error';\nimport { IssuesAspect } from '@teambit/issues';\nimport ConsumerComponent from '@teambit/legacy/dist/consumer/component';\nimport chalk from 'chalk';\nimport { uniq } from 'lodash';\n\nexport class ComponentsHaveIssues extends BitError {\n constructor(components: ConsumerComponent[]) {\n components.forEach((component) => {\n component.issues = component.issues.filterNonTagBlocking();\n });\n const allIssueNames = uniq(components.map((comp) => comp.issues.getAllIssueNames()).flat());\n const issuesColored = componentIssuesTemplate(components);\n super(`error: issues found with the following components\n${issuesColored}\n\nto get the list of component-issues names and suggestions how to resolve them, run \"bit component-issues\".\n\nwhile highly not recommended, it's possible to ignore issues in two ways:\n1) temporarily ignore for this tag/snap/build command by entering \"--ignore-issues\" flag, e.g. \\`bit tag --ignore-issues \"${allIssueNames.join(\n ', '\n )}\" \\`\n2) ignore the issue completely by configuring it in the workspace.jsonc file. e.g:\n\"${IssuesAspect.id}\": {\n \"ignoreIssues\": [${allIssueNames.map((issue) => `\"${issue}\"`).join(', ')}]\n}\n`);\n }\n}\n\nfunction formatIssues(compWithIssues: ConsumerComponent) {\n return ` ${compWithIssues.issues?.outputForCLI()}\\n`;\n}\n\nfunction componentIssuesTemplate(components: ConsumerComponent[]) {\n function format(component: ConsumerComponent) {\n return `${chalk.underline(chalk.cyan(component.id.toString()))}\\n${formatIssues(component)}`;\n }\n\n const result = `\\n${components.map(format).join('\\n')}`;\n return result;\n}\n"],"mappings":";;;;;;AAAA,SAAAA,UAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,SAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;E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A,CAAC,CAAC;EACA;AACF;AAACI,OAAA,CAAApB,oBAAA,GAAAA,oBAAA;AAED,SAASqB,YAAYA,CAACC,cAAiC,EAAE;EACvD,OAAO,UAAUA,cAAc,CAAChB,MAAM,EAAEiB,YAAY,CAAC,CAAC,IAAI;AAC5D;AAEA,SAASR,uBAAuBA,CAACZ,UAA+B,EAAE;EAChE,SAASqB,MAAMA,CAACnB,SAA4B,EAAE;IAC5C,OAAO,GAAGoB,gBAAK,CAACC,SAAS,CAACD,gBAAK,CAACE,IAAI,CAACtB,SAAS,CAACa,EAAE,CAACU,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAKP,YAAY,CAAChB,SAAS,CAAC,EAAE;EAC9F;EAEA,MAAMwB,MAAM,GAAG,KAAK1B,UAAU,CAACO,GAAG,CAACc,MAAM,CAAC,CAACR,IAAI,CAAC,IAAI,CAAC,EAAE;EACvD,OAAOa,MAAM;AACf","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_builder@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_builder@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_builder@1.0.337/dist/builder.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.pipelines_builder@1.0.337/dist/builder.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { BitError } from '@teambit/bit-error';
|
|
2
|
+
import { IssuesAspect } from '@teambit/issues';
|
|
3
|
+
import ConsumerComponent from '@teambit/legacy/dist/consumer/component';
|
|
4
|
+
import chalk from 'chalk';
|
|
5
|
+
import { uniq } from 'lodash';
|
|
6
|
+
|
|
7
|
+
export class ComponentsHaveIssues extends BitError {
|
|
8
|
+
constructor(components: ConsumerComponent[]) {
|
|
9
|
+
components.forEach((component) => {
|
|
10
|
+
component.issues = component.issues.filterNonTagBlocking();
|
|
11
|
+
});
|
|
12
|
+
const allIssueNames = uniq(components.map((comp) => comp.issues.getAllIssueNames()).flat());
|
|
13
|
+
const issuesColored = componentIssuesTemplate(components);
|
|
14
|
+
super(`error: issues found with the following components
|
|
15
|
+
${issuesColored}
|
|
16
|
+
|
|
17
|
+
to get the list of component-issues names and suggestions how to resolve them, run "bit component-issues".
|
|
18
|
+
|
|
19
|
+
while highly not recommended, it's possible to ignore issues in two ways:
|
|
20
|
+
1) temporarily ignore for this tag/snap/build command by entering "--ignore-issues" flag, e.g. \`bit tag --ignore-issues "${allIssueNames.join(
|
|
21
|
+
', '
|
|
22
|
+
)}" \`
|
|
23
|
+
2) ignore the issue completely by configuring it in the workspace.jsonc file. e.g:
|
|
24
|
+
"${IssuesAspect.id}": {
|
|
25
|
+
"ignoreIssues": [${allIssueNames.map((issue) => `"${issue}"`).join(', ')}]
|
|
26
|
+
}
|
|
27
|
+
`);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function formatIssues(compWithIssues: ConsumerComponent) {
|
|
32
|
+
return ` ${compWithIssues.issues?.outputForCLI()}\n`;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
function componentIssuesTemplate(components: ConsumerComponent[]) {
|
|
36
|
+
function format(component: ConsumerComponent) {
|
|
37
|
+
return `${chalk.underline(chalk.cyan(component.id.toString()))}\n${formatIssues(component)}`;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const result = `\n${components.map(format).join('\n')}`;
|
|
41
|
+
return result;
|
|
42
|
+
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/builder",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.337",
|
|
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.337"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"chalk": "2.4.2",
|
|
@@ -26,25 +26,27 @@
|
|
|
26
26
|
"@teambit/harmony": "0.4.6",
|
|
27
27
|
"@teambit/bit-error": "0.0.404",
|
|
28
28
|
"@teambit/component-id": "1.2.0",
|
|
29
|
-
"@teambit/component": "1.0.
|
|
30
|
-
"@teambit/envs": "1.0.
|
|
31
|
-
"@teambit/logger": "0.0.
|
|
29
|
+
"@teambit/component": "1.0.337",
|
|
30
|
+
"@teambit/envs": "1.0.337",
|
|
31
|
+
"@teambit/logger": "0.0.1007",
|
|
32
32
|
"@teambit/toolbox.string.capitalize": "0.0.496",
|
|
33
|
-
"@teambit/tester": "1.0.
|
|
34
|
-
"@teambit/component.sources": "0.0.
|
|
35
|
-
"@teambit/isolator": "1.0.
|
|
36
|
-
"@teambit/cli": "0.0.
|
|
37
|
-
"@teambit/
|
|
38
|
-
"@teambit/
|
|
39
|
-
"@teambit/aspect": "1.0.
|
|
33
|
+
"@teambit/tester": "1.0.337",
|
|
34
|
+
"@teambit/component.sources": "0.0.4",
|
|
35
|
+
"@teambit/isolator": "1.0.337",
|
|
36
|
+
"@teambit/cli": "0.0.914",
|
|
37
|
+
"@teambit/component-issues": "0.0.150",
|
|
38
|
+
"@teambit/workspace": "1.0.337",
|
|
39
|
+
"@teambit/aspect-loader": "1.0.337",
|
|
40
|
+
"@teambit/aspect": "1.0.337",
|
|
40
41
|
"@teambit/bit.get-bit-version": "0.0.1",
|
|
41
|
-
"@teambit/generator": "1.0.
|
|
42
|
-
"@teambit/global-config": "0.0.
|
|
43
|
-
"@teambit/graphql": "1.0.
|
|
44
|
-
"@teambit/
|
|
42
|
+
"@teambit/generator": "1.0.338",
|
|
43
|
+
"@teambit/global-config": "0.0.917",
|
|
44
|
+
"@teambit/graphql": "1.0.337",
|
|
45
|
+
"@teambit/issues": "1.0.337",
|
|
46
|
+
"@teambit/scope": "1.0.337",
|
|
45
47
|
"@teambit/toolbox.array.duplications-finder": "0.0.1",
|
|
46
|
-
"@teambit/ui": "1.0.
|
|
47
|
-
"@teambit/express": "0.0.
|
|
48
|
+
"@teambit/ui": "1.0.337",
|
|
49
|
+
"@teambit/express": "0.0.1013",
|
|
48
50
|
"@teambit/legacy.utils": "0.0.4"
|
|
49
51
|
},
|
|
50
52
|
"devDependencies": {
|