@teambit/builder 0.0.917 → 0.0.919

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.
@@ -19,7 +19,7 @@ export type ArtifactsOpts = {
19
19
 
20
20
  export class ArtifactsCmd implements Command {
21
21
  name = 'artifacts <component-pattern>';
22
- description = 'EXPERIMENTAL. list and download components artifacts';
22
+ description = 'list and download components artifacts';
23
23
  extendedDescription = `artifacts are created on isolated capsules during tag or snap commands.
24
24
  example of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester
25
25
  and a package.tgz file generated by pkg aspect.
@@ -50,7 +50,7 @@ class ArtifactsCmd {
50
50
  this.builder = builder;
51
51
  this.scope = scope;
52
52
  (0, _defineProperty2().default)(this, "name", 'artifacts <component-pattern>');
53
- (0, _defineProperty2().default)(this, "description", 'EXPERIMENTAL. list and download components artifacts');
53
+ (0, _defineProperty2().default)(this, "description", 'list and download components artifacts');
54
54
  (0, _defineProperty2().default)(this, "extendedDescription", `artifacts are created on isolated capsules during tag or snap commands.
55
55
  example of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester
56
56
  and a package.tgz file generated by pkg aspect.
@@ -1 +1 @@
1
- {"version":3,"names":["INDENT_TITLE","repeat","INDENT_SUB_TITLE","INDENT_FILES","ArtifactsCmd","constructor","builder","scope","name","description","COMPONENT_PATTERN_HELP","report","componentPattern","artifactsOpts","BitError","artifactExtractor","ArtifactExtractor","list","grouped","groupResultsByAspect","outputArtifacts","aspectId","artifactData","title","chalk","green","artifactDataStr","map","artifact","subTitle","white","taskName","artifactName","files","f","dim","join","outputResult","result","idStr","cyan","id","toString","artifacts","Object","keys","footer","outDir"],"sources":["artifacts.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport { ScopeMain } from '@teambit/scope';\nimport { BuilderMain } from '../builder.main.runtime';\nimport { ArtifactExtractor, ExtractorArtifactResult, ExtractorResultGrouped } from './artifact-extractor';\n\nconst INDENT_TITLE = ' '.repeat(2);\nconst INDENT_SUB_TITLE = ' '.repeat(4);\nconst INDENT_FILES = ' '.repeat(6);\n\nexport type ArtifactsOpts = {\n aspect?: string;\n task?: string;\n files?: string;\n outDir?: string;\n};\n\nexport class ArtifactsCmd implements Command {\n name = 'artifacts <component-pattern>';\n description = 'EXPERIMENTAL. list and download components artifacts';\n extendedDescription = `artifacts are created on isolated capsules during tag or snap commands.\nexample of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester\nand a package.tgz file generated by pkg aspect.\n`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n alias = '';\n group = 'development';\n helpUrl = 'reference/components/component-artifacts';\n options = [\n ['', 'aspect <aspect-id>', 'show/download only artifacts generated by this aspect-id'],\n ['', 'task <task-id>', 'show/download only artifacts generated by this task-id'],\n [\n '',\n 'files <glob>',\n 'show/download only artifacts matching the given files or the glob pattern (wrap glob patterns in quotes)',\n ],\n ['', 'out-dir <string>', 'download the files to the specified dir'],\n ] as CommandOptions;\n\n constructor(private builder: BuilderMain, private scope: ScopeMain) {}\n\n async report([componentPattern]: [string], artifactsOpts: ArtifactsOpts): Promise<string> {\n if (!this.scope) throw new BitError(`unable to run \"bit artifacts\" outside of a workspace or a scope`);\n const artifactExtractor = new ArtifactExtractor(this.scope, this.builder, componentPattern, artifactsOpts);\n const list = await artifactExtractor.list();\n const grouped = artifactExtractor.groupResultsByAspect(list);\n const outputArtifacts = (aspectId: string, artifactData: ExtractorArtifactResult[]) => {\n const title = chalk.green(aspectId);\n const artifactDataStr = artifactData\n .map((artifact) => {\n const subTitle = chalk.white(`${artifact.taskName} (${artifact.artifactName})`);\n const files = artifact.files.map((f) => INDENT_FILES + chalk.dim(f)).join('\\n');\n return `${INDENT_SUB_TITLE}${subTitle}\\n${files}`;\n })\n .join('\\n');\n return `${INDENT_TITLE}${title}\\n${artifactDataStr}`;\n };\n const outputResult = (result: ExtractorResultGrouped) => {\n const idStr = chalk.cyan(result.id.toString());\n const artifacts = Object.keys(result.artifacts)\n .map((aspectId) => outputArtifacts(aspectId, result.artifacts[aspectId]))\n .join('\\n\\n');\n return `${idStr}\\n${artifacts}`;\n };\n const footer = artifactsOpts.outDir\n ? chalk.green('\\n\\nThe above files were saved successfully to the file system')\n : '';\n return grouped.map(outputResult).join('\\n\\n') + footer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,YAAY,GAAG,GAAG,CAACC,MAAM,CAAC,CAAC,CAAC;AAClC,MAAMC,gBAAgB,GAAG,GAAG,CAACD,MAAM,CAAC,CAAC,CAAC;AACtC,MAAME,YAAY,GAAG,GAAG,CAACF,MAAM,CAAC,CAAC,CAAC;AAS3B,MAAMG,YAAY,CAAoB;EA2B3CC,WAAW,CAASC,OAAoB,EAAUC,KAAgB,EAAE;IAAA,KAAhDD,OAAoB,GAApBA,OAAoB;IAAA,KAAUC,KAAgB,GAAhBA,KAAgB;IAAA,8CA1B3D,+BAA+B;IAAA,qDACxB,sDAAsD;IAAA,6DAC7C;AACzB;AACA;AACA,CAAC;IAAA,mDACa,CACV;MACEC,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EAAEC;IACf,CAAC,CACF;IAAA,+CACO,EAAE;IAAA,+CACF,aAAa;IAAA,iDACX,0CAA0C;IAAA,iDAC1C,CACR,CAAC,EAAE,EAAE,oBAAoB,EAAE,0DAA0D,CAAC,EACtF,CAAC,EAAE,EAAE,gBAAgB,EAAE,wDAAwD,CAAC,EAChF,CACE,EAAE,EACF,cAAc,EACd,0GAA0G,CAC3G,E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CAACG,EAAE,CAACC,QAAQ,EAAE,CAAC;MAC9C,MAAMC,SAAS,GAAGC,MAAM,CAACC,IAAI,CAACP,MAAM,CAACK,SAAS,CAAC,CAC5ChB,GAAG,CAAEN,QAAQ,IAAKD,eAAe,CAACC,QAAQ,EAAEiB,MAAM,CAACK,SAAS,CAACtB,QAAQ,CAAC,CAAC,CAAC,CACxEe,IAAI,CAAC,MAAM,CAAC;MACf,OAAQ,GAAEG,KAAM,KAAII,SAAU,EAAC;IACjC,CAAC;IACD,MAAMG,MAAM,GAAGjC,aAAa,CAACkC,MAAM,GAC/BvB,gBAAK,CAACC,KAAK,CAAC,gEAAgE,CAAC,GAC7E,EAAE;IACN,OAAOP,OAAO,CAACS,GAAG,CAACU,YAAY,CAAC,CAACD,IAAI,CAAC,MAAM,CAAC,GAAGU,MAAM;EACxD;AACF;AAAC"}
1
+ {"version":3,"names":["INDENT_TITLE","repeat","INDENT_SUB_TITLE","INDENT_FILES","ArtifactsCmd","constructor","builder","scope","name","description","COMPONENT_PATTERN_HELP","report","componentPattern","artifactsOpts","BitError","artifactExtractor","ArtifactExtractor","list","grouped","groupResultsByAspect","outputArtifacts","aspectId","artifactData","title","chalk","green","artifactDataStr","map","artifact","subTitle","white","taskName","artifactName","files","f","dim","join","outputResult","result","idStr","cyan","id","toString","artifacts","Object","keys","footer","outDir"],"sources":["artifacts.cmd.ts"],"sourcesContent":["import { Command, CommandOptions } from '@teambit/cli';\nimport chalk from 'chalk';\nimport { COMPONENT_PATTERN_HELP } from '@teambit/legacy/dist/constants';\nimport { BitError } from '@teambit/bit-error';\nimport { ScopeMain } from '@teambit/scope';\nimport { BuilderMain } from '../builder.main.runtime';\nimport { ArtifactExtractor, ExtractorArtifactResult, ExtractorResultGrouped } from './artifact-extractor';\n\nconst INDENT_TITLE = ' '.repeat(2);\nconst INDENT_SUB_TITLE = ' '.repeat(4);\nconst INDENT_FILES = ' '.repeat(6);\n\nexport type ArtifactsOpts = {\n aspect?: string;\n task?: string;\n files?: string;\n outDir?: string;\n};\n\nexport class ArtifactsCmd implements Command {\n name = 'artifacts <component-pattern>';\n description = 'list and download components artifacts';\n extendedDescription = `artifacts are created on isolated capsules during tag or snap commands.\nexample of artifacts are dists files generated by a compiler, a JUnit.xml file generated by a tester\nand a package.tgz file generated by pkg aspect.\n`;\n arguments = [\n {\n name: 'component-pattern',\n description: COMPONENT_PATTERN_HELP,\n },\n ];\n alias = '';\n group = 'development';\n helpUrl = 'reference/components/component-artifacts';\n options = [\n ['', 'aspect <aspect-id>', 'show/download only artifacts generated by this aspect-id'],\n ['', 'task <task-id>', 'show/download only artifacts generated by this task-id'],\n [\n '',\n 'files <glob>',\n 'show/download only artifacts matching the given files or the glob pattern (wrap glob patterns in quotes)',\n ],\n ['', 'out-dir <string>', 'download the files to the specified dir'],\n ] as CommandOptions;\n\n constructor(private builder: BuilderMain, private scope: ScopeMain) {}\n\n async report([componentPattern]: [string], artifactsOpts: ArtifactsOpts): Promise<string> {\n if (!this.scope) throw new BitError(`unable to run \"bit artifacts\" outside of a workspace or a scope`);\n const artifactExtractor = new ArtifactExtractor(this.scope, this.builder, componentPattern, artifactsOpts);\n const list = await artifactExtractor.list();\n const grouped = artifactExtractor.groupResultsByAspect(list);\n const outputArtifacts = (aspectId: string, artifactData: ExtractorArtifactResult[]) => {\n const title = chalk.green(aspectId);\n const artifactDataStr = artifactData\n .map((artifact) => {\n const subTitle = chalk.white(`${artifact.taskName} (${artifact.artifactName})`);\n const files = artifact.files.map((f) => INDENT_FILES + chalk.dim(f)).join('\\n');\n return `${INDENT_SUB_TITLE}${subTitle}\\n${files}`;\n })\n .join('\\n');\n return `${INDENT_TITLE}${title}\\n${artifactDataStr}`;\n };\n const outputResult = (result: ExtractorResultGrouped) => {\n const idStr = chalk.cyan(result.id.toString());\n const artifacts = Object.keys(result.artifacts)\n .map((aspectId) => outputArtifacts(aspectId, result.artifacts[aspectId]))\n .join('\\n\\n');\n return `${idStr}\\n${artifacts}`;\n };\n const footer = artifactsOpts.outDir\n ? chalk.green('\\n\\nThe above files were saved successfully to the file system')\n : '';\n return grouped.map(outputResult).join('\\n\\n') + footer;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AACA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAGA;EAAA;EAAA;IAAA;EAAA;EAAA;AAAA;AAEA,MAAMA,YAAY,GAAG,GAAG,CAACC,MAAM,CAAC,CAAC,CAAC;AAClC,MAAMC,gBAAgB,GAAG,GAAG,CAACD,MAAM,CAAC,CAAC,CAAC;AACtC,MAAME,YAAY,GAAG,GAAG,CAACF,MAAM,CAAC,CAAC,CAAC;AAS3B,MAAMG,YAAY,CAAoB;EA2B3CC,WAAW,CAASC,OAAoB,EAAUC,KAAgB,EAAE;IAAA,KAAhDD,OAAoB,GAApBA,OAAoB;IAAA,KAAUC,KAAgB,GAAhBA,KAAgB;IAAA,8CA1B3D,+BAA+B;IAAA,qDACxB,wCAAwC;IAAA,6DAC/B;AACzB;AACA;AACA,CAAC;IAAA,mDACa,CACV;MACEC,IAAI,EAAE,mBAAmB;MACzBC,WAAW,EAAEC;IACf,CAAC,CACF;IAAA,+CACO,EAAE;IAAA,+CACF,aAAa;IAAA,iDACX,0CAA0C;IAAA,iDAC1C,CACR,CAAC,EAAE,EAAE,oBAAoB,EAAE,0DAA0D,CAAC,EACtF,CAAC,EAAE,EAAE,gBAAgB,EAAE,wDAAwD,CAAC,EAChF,CACE,EAAE,EACF,cAAc,EACd,0GAA0G,CAC3G,EACD,CAAC,EAAE,EAAE,kBAAkB,EAAE,yCAAyC,CAAC,CACpE;EAEoE;EAErE,MAAMC,MAAM,CAAC,CAACC,gBAAgB,CAAW,EAAEC,aAA4B,EAAmB;IACxF,IAAI,CAAC,IAAI,CAACN,KAAK,EAAE,MAAM,KAAIO,oBAAQ,EAAE,iEAAgE,CAAC;IACtG,M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CAAC,CACxEe,IAAI,CAAC,MAAM,CAAC;MACf,OAAQ,GAAEG,KAAM,KAAII,SAAU,EAAC;IACjC,CAAC;IACD,MAAMG,MAAM,GAAGjC,aAAa,CAACkC,MAAM,GAC/BvB,gBAAK,CAACC,KAAK,CAAC,gEAAgE,CAAC,GAC7E,EAAE;IACN,OAAOP,OAAO,CAACS,GAAG,CAACU,YAAY,CAAC,CAACD,IAAI,CAAC,MAAM,CAAC,GAAGU,MAAM;EACxD;AACF;AAAC"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/builder",
3
- "version": "0.0.917",
3
+ "version": "0.0.919",
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.917"
9
+ "version": "0.0.919"
10
10
  },
11
11
  "dependencies": {
12
12
  "p-map-series": "2.1.0",
@@ -26,20 +26,20 @@
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.917",
30
- "@teambit/envs": "0.0.917",
31
- "@teambit/logger": "0.0.706",
32
- "@teambit/tester": "0.0.917",
33
- "@teambit/isolator": "0.0.917",
34
- "@teambit/lane-id": "0.0.131",
35
- "@teambit/cli": "0.0.613",
36
- "@teambit/workspace": "0.0.917",
37
- "@teambit/aspect-loader": "0.0.917",
38
- "@teambit/aspect": "0.0.917",
39
- "@teambit/generator": "0.0.917",
40
- "@teambit/graphql": "0.0.917",
41
- "@teambit/scope": "0.0.917",
42
- "@teambit/express": "0.0.711",
29
+ "@teambit/component": "0.0.919",
30
+ "@teambit/envs": "0.0.919",
31
+ "@teambit/logger": "0.0.708",
32
+ "@teambit/tester": "0.0.919",
33
+ "@teambit/isolator": "0.0.919",
34
+ "@teambit/lane-id": "0.0.133",
35
+ "@teambit/cli": "0.0.615",
36
+ "@teambit/workspace": "0.0.919",
37
+ "@teambit/aspect-loader": "0.0.919",
38
+ "@teambit/aspect": "0.0.919",
39
+ "@teambit/generator": "0.0.919",
40
+ "@teambit/graphql": "0.0.919",
41
+ "@teambit/scope": "0.0.919",
42
+ "@teambit/express": "0.0.713",
43
43
  "@teambit/bit-error": "0.0.402",
44
44
  "@teambit/component-id": "0.0.425"
45
45
  },
@@ -58,7 +58,7 @@
58
58
  "@teambit/pipelines.aspect-docs.builder": "0.0.148"
59
59
  },
60
60
  "peerDependencies": {
61
- "@teambit/legacy": "1.0.391",
61
+ "@teambit/legacy": "1.0.396",
62
62
  "react-dom": "^16.8.0 || ^17.0.0",
63
63
  "react": "^16.8.0 || ^17.0.0"
64
64
  },
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.917/dist/builder.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.917/dist/builder.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.919/dist/builder.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad3d35bfc38b9cd90c0e05b598a5a55af/teambit.pipelines_builder@0.0.919/dist/builder.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];