@teambit/builder 0.0.593 → 0.0.597
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/templates/build-task/files/task-file.js +4 -4
- package/dist/templates/build-task/files/task-file.js.map +1 -1
- package/package-tar/teambit-builder-0.0.597.tgz +0 -0
- package/package.json +18 -18
- package/templates/build-task/files/task-file.ts +4 -4
- package/package-tar/teambit-builder-0.0.593.tgz +0 -0
|
@@ -22,14 +22,14 @@ export class ${namePascalCase} implements BuildTask {
|
|
|
22
22
|
readonly name = '${namePascalCase}';
|
|
23
23
|
|
|
24
24
|
async execute(context: BuildContext): Promise<BuiltTaskResult> {
|
|
25
|
-
// Prepare the component results array which will be used to report back the components
|
|
25
|
+
// Prepare the component results array which will be used to report back the components processed
|
|
26
26
|
// as well as any additional data regarding this build task execution
|
|
27
27
|
const componentsResults: ComponentResult[] = [];
|
|
28
28
|
// The 'seeder capsules' are capsules for components that are built for their own sake -
|
|
29
29
|
// not for the sake of other components that have them as their dependencies
|
|
30
30
|
const capsules = context.capsuleNetwork.seedersCapsules;
|
|
31
31
|
capsules.forEach((capsule) => {
|
|
32
|
-
//
|
|
32
|
+
// Prepare an 'errors' array to report back of any errors during execution (this will be part of the 'Component Results' data)
|
|
33
33
|
const errors: Error[] = [];
|
|
34
34
|
// Each 'capsule' provides data regarding the component as well as the capsule itself
|
|
35
35
|
const componentName = capsule.component.id.name;
|
|
@@ -38,7 +38,7 @@ export class ${namePascalCase} implements BuildTask {
|
|
|
38
38
|
const artifactContent = \`The component name is \${componentName}\`
|
|
39
39
|
|
|
40
40
|
try {
|
|
41
|
-
// Generate the artifact inside the capsule's
|
|
41
|
+
// Generate the artifact inside the capsule's directory
|
|
42
42
|
fs.writeFileSync(
|
|
43
43
|
path.join(capsuleDir, 'output.my-artifact.txt'),
|
|
44
44
|
artifactContent
|
|
@@ -54,7 +54,7 @@ export class ${namePascalCase} implements BuildTask {
|
|
|
54
54
|
{
|
|
55
55
|
generatedBy: this.aspectId,
|
|
56
56
|
name: this.name,
|
|
57
|
-
// The glob pattern for artifacts to include in the
|
|
57
|
+
// The glob pattern for artifacts to include in the component version
|
|
58
58
|
globPatterns: ['**/*.my-artifact.txt'],
|
|
59
59
|
},
|
|
60
60
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["task-file.ts"],"names":["taskFile","namePascalCase"],"mappings":";;;;;;;AAEO,SAASA,QAAT,CAAkB;AAAEC,EAAAA;AAAF,CAAlB,EAAwD;AAC7D,SAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeA,cAAe;AAC9B;AACA,qBAAqBA,cAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EArDE;AAsDD","sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function taskFile({ namePascalCase }: ComponentContext) {\n return `import {\n BuildTask,\n BuildContext,\n BuiltTaskResult,\n ComponentResult,\n} from '@teambit/builder';\nimport path from 'path';\nimport fs from 'fs';\n\nexport class ${namePascalCase} implements BuildTask {\n constructor(readonly aspectId: string) {}\n readonly name = '${namePascalCase}';\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n // Prepare the component results array which will be used to report back the components
|
|
1
|
+
{"version":3,"sources":["task-file.ts"],"names":["taskFile","namePascalCase"],"mappings":";;;;;;;AAEO,SAASA,QAAT,CAAkB;AAAEC,EAAAA;AAAF,CAAlB,EAAwD;AAC7D,SAAQ;AACV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeA,cAAe;AAC9B;AACA,qBAAqBA,cAAe;AACpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EArDE;AAsDD","sourcesContent":["import { ComponentContext } from '@teambit/generator';\n\nexport function taskFile({ namePascalCase }: ComponentContext) {\n return `import {\n BuildTask,\n BuildContext,\n BuiltTaskResult,\n ComponentResult,\n} from '@teambit/builder';\nimport path from 'path';\nimport fs from 'fs';\n\nexport class ${namePascalCase} implements BuildTask {\n constructor(readonly aspectId: string) {}\n readonly name = '${namePascalCase}';\n\n async execute(context: BuildContext): Promise<BuiltTaskResult> {\n // Prepare the component results array which will be used to report back the components processed\n // as well as any additional data regarding this build task execution\n const componentsResults: ComponentResult[] = [];\n // The 'seeder capsules' are capsules for components that are built for their own sake - \n // not for the sake of other components that have them as their dependencies\n const capsules = context.capsuleNetwork.seedersCapsules;\n capsules.forEach((capsule) => {\n // Prepare an 'errors' array to report back of any errors during execution (this will be part of the 'Component Results' data)\n const errors: Error[] = [];\n // Each 'capsule' provides data regarding the component as well as the capsule itself\n const componentName = capsule.component.id.name;\n const capsuleDir = capsule.path;\n\n const artifactContent = \\`The component name is \\${componentName}\\`\n\n try {\n // Generate the artifact inside the capsule's directory\n fs.writeFileSync(\n path.join(capsuleDir, 'output.my-artifact.txt'),\n artifactContent\n );\n } catch (err: any) {\n errors.push(err);\n }\n componentsResults.push({ component: capsule.component, errors });\n });\n\n return {\n artifacts: [\n {\n generatedBy: this.aspectId,\n name: this.name,\n // The glob pattern for artifacts to include in the component version\n globPatterns: ['**/*.my-artifact.txt'],\n },\n ],\n componentsResults,\n };\n }\n}`;\n}\n"]}
|
|
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.597",
|
|
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.597"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"p-map-series": "2.1.0",
|
|
@@ -22,19 +22,19 @@
|
|
|
22
22
|
"globby": "11.0.1",
|
|
23
23
|
"@babel/runtime": "7.12.18",
|
|
24
24
|
"core-js": "^3.0.0",
|
|
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.
|
|
36
|
-
"@teambit/bit-error": "0.0.
|
|
37
|
-
"@teambit/component-id": "0.0.
|
|
25
|
+
"@teambit/component": "0.0.597",
|
|
26
|
+
"@teambit/envs": "0.0.597",
|
|
27
|
+
"@teambit/logger": "0.0.498",
|
|
28
|
+
"@teambit/tester": "0.0.597",
|
|
29
|
+
"@teambit/isolator": "0.0.597",
|
|
30
|
+
"@teambit/cli": "0.0.410",
|
|
31
|
+
"@teambit/workspace": "0.0.597",
|
|
32
|
+
"@teambit/aspect-loader": "0.0.597",
|
|
33
|
+
"@teambit/generator": "0.0.597",
|
|
34
|
+
"@teambit/graphql": "0.0.597",
|
|
35
|
+
"@teambit/scope": "0.0.597",
|
|
36
|
+
"@teambit/bit-error": "0.0.394",
|
|
37
|
+
"@teambit/component-id": "0.0.398"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@types/lodash": "4.14.165",
|
|
@@ -46,10 +46,10 @@
|
|
|
46
46
|
"@types/jest": "^26.0.0",
|
|
47
47
|
"@types/react-dom": "^17.0.5",
|
|
48
48
|
"@types/node": "12.20.4",
|
|
49
|
-
"@teambit/pipelines.aspect-docs.builder": "0.0.
|
|
49
|
+
"@teambit/pipelines.aspect-docs.builder": "0.0.130"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@teambit/legacy": "1.0.
|
|
52
|
+
"@teambit/legacy": "1.0.197",
|
|
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.197",
|
|
81
81
|
"react-dom": "^16.8.0 || ^17.0.0",
|
|
82
82
|
"react": "^16.8.0 || ^17.0.0"
|
|
83
83
|
}
|
|
@@ -15,14 +15,14 @@ export class ${namePascalCase} implements BuildTask {
|
|
|
15
15
|
readonly name = '${namePascalCase}';
|
|
16
16
|
|
|
17
17
|
async execute(context: BuildContext): Promise<BuiltTaskResult> {
|
|
18
|
-
// Prepare the component results array which will be used to report back the components
|
|
18
|
+
// Prepare the component results array which will be used to report back the components processed
|
|
19
19
|
// as well as any additional data regarding this build task execution
|
|
20
20
|
const componentsResults: ComponentResult[] = [];
|
|
21
21
|
// The 'seeder capsules' are capsules for components that are built for their own sake -
|
|
22
22
|
// not for the sake of other components that have them as their dependencies
|
|
23
23
|
const capsules = context.capsuleNetwork.seedersCapsules;
|
|
24
24
|
capsules.forEach((capsule) => {
|
|
25
|
-
//
|
|
25
|
+
// Prepare an 'errors' array to report back of any errors during execution (this will be part of the 'Component Results' data)
|
|
26
26
|
const errors: Error[] = [];
|
|
27
27
|
// Each 'capsule' provides data regarding the component as well as the capsule itself
|
|
28
28
|
const componentName = capsule.component.id.name;
|
|
@@ -31,7 +31,7 @@ export class ${namePascalCase} implements BuildTask {
|
|
|
31
31
|
const artifactContent = \`The component name is \${componentName}\`
|
|
32
32
|
|
|
33
33
|
try {
|
|
34
|
-
// Generate the artifact inside the capsule's
|
|
34
|
+
// Generate the artifact inside the capsule's directory
|
|
35
35
|
fs.writeFileSync(
|
|
36
36
|
path.join(capsuleDir, 'output.my-artifact.txt'),
|
|
37
37
|
artifactContent
|
|
@@ -47,7 +47,7 @@ export class ${namePascalCase} implements BuildTask {
|
|
|
47
47
|
{
|
|
48
48
|
generatedBy: this.aspectId,
|
|
49
49
|
name: this.name,
|
|
50
|
-
// The glob pattern for artifacts to include in the
|
|
50
|
+
// The glob pattern for artifacts to include in the component version
|
|
51
51
|
globPatterns: ['**/*.my-artifact.txt'],
|
|
52
52
|
},
|
|
53
53
|
],
|
|
Binary file
|