@teambit/compiler 1.0.1097 → 1.0.1099

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.
@@ -92,13 +92,21 @@ automatically triggered by "bit watch", "bit start", or IDE extensions, but can
92
92
  return this.failedComponents(componentsStatus).length ? 1 : 0;
93
93
  }
94
94
  getSummaryLine(componentsStatus) {
95
- const numberOfComponents = componentsStatus.length;
96
- const numberOfFailingComponents = this.failedComponents(componentsStatus).length;
97
- const numberOfSuccessfulComponents = componentsStatus.filter(component => !component.errors.length).length;
95
+ // a component whose env provides no compiler went through neither a success nor a failure, so
96
+ // it is kept out of the ratio and named separately - the ratio alone would report doing
97
+ // nothing as having compiled everything.
98
+ const skipped = componentsStatus.filter(component => component.skipped);
99
+ const attempted = componentsStatus.filter(component => !component.skipped);
100
+ const numberOfFailingComponents = this.failedComponents(attempted).length;
101
+ const numberOfSuccessfulComponents = attempted.length - numberOfFailingComponents;
102
+ const skippedSuffix = skipped.length ? ` ${skipped.length} component(s) skipped, no compiler.` : '';
98
103
  if (numberOfFailingComponents) {
99
- return (0, _cli().formatWarningSummary)(`${numberOfFailingComponents}/${numberOfComponents} components failed to compile.`);
104
+ return (0, _cli().formatWarningSummary)(`${numberOfFailingComponents}/${attempted.length} components failed to compile.${skippedSuffix}`);
100
105
  }
101
- return (0, _cli().formatSuccessSummary)(`${numberOfSuccessfulComponents}/${numberOfComponents} components compiled successfully.`);
106
+ if (!attempted.length && skipped.length) {
107
+ return (0, _cli().formatWarningSummary)(`nothing was compiled. ${skipped.length} component(s) have an env that provides no compiler.`);
108
+ }
109
+ return (0, _cli().formatSuccessSummary)(`${numberOfSuccessfulComponents}/${attempted.length} components compiled successfully.${skippedSuffix}`);
102
110
  }
103
111
  }
104
112
  exports.CompileCmd = CompileCmd;
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","_prettyTime","_interopRequireDefault","_outputFormatter","_types","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CompileCmd","constructor","compile","logger","pubsub","name","description","report","components","compilerOptions","startTimestamp","process","hrtime","setStatusLine","results","compileComponents","initiator","CompilationInitiator","CmdReport","compileTimeLength","compiledOutput","formatCompileResults","verbose","summaryLine","getSummaryLine","timingLine","formatHint","prettyTime","clearStatusLine","joinSections","code","getExitCode","json","deleteDistDir","compileResults","CmdJson","failedComponents","componentsStatus","component","errors","numberOfComponents","numberOfFailingComponents","numberOfSuccessfulComponents","formatWarningSummary","formatSuccessSummary","exports"],"sources":["compiler.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport { formatSuccessSummary, formatWarningSummary, formatHint, joinSections } from '@teambit/cli';\nimport type { Logger } from '@teambit/logger';\nimport type { PubsubMain } from '@teambit/pubsub';\nimport prettyTime from 'pretty-time';\nimport { formatCompileResults } from './output-formatter';\nimport type { WorkspaceCompiler, CompileOptions, BuildResult } from './workspace-compiler';\nimport { CompilationInitiator } from './types';\n\nexport class CompileCmd implements Command {\n name = 'compile [component-names...]';\n description = 'transpile component source files';\n extendedDescription = `compiles TypeScript, JSX, and other source files into JavaScript using the compiler configured by each component's environment.\noutputs compiled files to node_modules/component-package-name/dist for consumption by other components.\nautomatically triggered by \"bit watch\", \"bit start\", or IDE extensions, but can be run manually for debugging.`;\n helpUrl = 'reference/compiling/compiler-overview';\n arguments = [\n {\n name: 'component-names...',\n description: 'a list of component names or component IDs (defaults to all components)',\n },\n ];\n alias = '';\n group = 'component-development';\n options = [\n ['c', 'changed', 'compile only new and modified components'],\n ['v', 'verbose', 'show more data, such as, dist paths'],\n ['j', 'json', 'return the compile results in json format'],\n ['d', 'delete-dist-dir', 'delete existing dist folder before writing new compiled files'],\n ['', 'generate-types', 'EXPERIMENTAL. generate d.ts files for typescript components (hurts performance)'],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private compile: WorkspaceCompiler,\n private logger: Logger,\n private pubsub: PubsubMain\n ) {}\n\n async report([components = []]: [string[]], compilerOptions: CompileOptions) {\n const startTimestamp = process.hrtime();\n this.logger.setStatusLine('compiling components...');\n\n const results = await this.compile.compileComponents(components, {\n ...compilerOptions,\n initiator: CompilationInitiator.CmdReport,\n });\n const compileTimeLength = process.hrtime(startTimestamp);\n\n const compiledOutput = formatCompileResults(results, !!compilerOptions.verbose);\n const summaryLine = this.getSummaryLine(results);\n const timingLine = formatHint(`Finished. (${prettyTime(compileTimeLength)})`);\n\n this.logger.clearStatusLine();\n\n return {\n data: joinSections([compiledOutput, `${summaryLine}\\n${timingLine}`]),\n code: this.getExitCode(results),\n };\n }\n\n async json([components]: [string[]], compilerOptions: CompileOptions) {\n compilerOptions.deleteDistDir = true;\n const compileResults = await this.compile.compileComponents(components, {\n ...compilerOptions,\n initiator: CompilationInitiator.CmdJson,\n });\n return {\n data: compileResults,\n // @todo: fix the code once compile is ready.\n code: 0,\n };\n }\n\n private failedComponents(componentsStatus: BuildResult[]): BuildResult[] {\n return componentsStatus.filter((component) => component.errors.length);\n }\n\n private getExitCode(componentsStatus: BuildResult[]) {\n return this.failedComponents(componentsStatus).length ? 1 : 0;\n }\n\n private getSummaryLine(componentsStatus: BuildResult[]) {\n const numberOfComponents = componentsStatus.length;\n const numberOfFailingComponents = this.failedComponents(componentsStatus).length;\n const numberOfSuccessfulComponents = componentsStatus.filter((component) => !component.errors.length).length;\n\n if (numberOfFailingComponents) {\n return formatWarningSummary(`${numberOfFailingComponents}/${numberOfComponents} components failed to compile.`);\n }\n return formatSuccessSummary(\n `${numberOfSuccessfulComponents}/${numberOfComponents} components compiled successfully.`\n );\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;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AAM;IAE5G,IAAI2D,yBAAyB,EAAE;MAC7B,OAAO,IAAAE,2BAAoB,EAAC,GAAGF,yBAAyB,IAAID,kBAAkB,gCAAgC,CAAC;IACjH;IACA,OAAO,IAAAI,2BAAoB,EACzB,GAAGF,4BAA4B,IAAIF,kBAAkB,oCACvD,CAAC;EACH;AACF;AAACK,OAAA,CAAA7C,UAAA,GAAAA,UAAA","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","_prettyTime","_interopRequireDefault","_outputFormatter","_types","e","__esModule","default","ownKeys","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","CompileCmd","constructor","compile","logger","pubsub","name","description","report","components","compilerOptions","startTimestamp","process","hrtime","setStatusLine","results","compileComponents","initiator","CompilationInitiator","CmdReport","compileTimeLength","compiledOutput","formatCompileResults","verbose","summaryLine","getSummaryLine","timingLine","formatHint","prettyTime","clearStatusLine","joinSections","code","getExitCode","json","deleteDistDir","compileResults","CmdJson","failedComponents","componentsStatus","component","errors","skipped","attempted","numberOfFailingComponents","numberOfSuccessfulComponents","skippedSuffix","formatWarningSummary","formatSuccessSummary","exports"],"sources":["compiler.cmd.ts"],"sourcesContent":["import type { Command, CommandOptions } from '@teambit/cli';\nimport { formatSuccessSummary, formatWarningSummary, formatHint, joinSections } from '@teambit/cli';\nimport type { Logger } from '@teambit/logger';\nimport type { PubsubMain } from '@teambit/pubsub';\nimport prettyTime from 'pretty-time';\nimport { formatCompileResults } from './output-formatter';\nimport type { WorkspaceCompiler, CompileOptions, BuildResult } from './workspace-compiler';\nimport { CompilationInitiator } from './types';\n\nexport class CompileCmd implements Command {\n name = 'compile [component-names...]';\n description = 'transpile component source files';\n extendedDescription = `compiles TypeScript, JSX, and other source files into JavaScript using the compiler configured by each component's environment.\noutputs compiled files to node_modules/component-package-name/dist for consumption by other components.\nautomatically triggered by \"bit watch\", \"bit start\", or IDE extensions, but can be run manually for debugging.`;\n helpUrl = 'reference/compiling/compiler-overview';\n arguments = [\n {\n name: 'component-names...',\n description: 'a list of component names or component IDs (defaults to all components)',\n },\n ];\n alias = '';\n group = 'component-development';\n options = [\n ['c', 'changed', 'compile only new and modified components'],\n ['v', 'verbose', 'show more data, such as, dist paths'],\n ['j', 'json', 'return the compile results in json format'],\n ['d', 'delete-dist-dir', 'delete existing dist folder before writing new compiled files'],\n ['', 'generate-types', 'EXPERIMENTAL. generate d.ts files for typescript components (hurts performance)'],\n ] as CommandOptions;\n loader = true;\n\n constructor(\n private compile: WorkspaceCompiler,\n private logger: Logger,\n private pubsub: PubsubMain\n ) {}\n\n async report([components = []]: [string[]], compilerOptions: CompileOptions) {\n const startTimestamp = process.hrtime();\n this.logger.setStatusLine('compiling components...');\n\n const results = await this.compile.compileComponents(components, {\n ...compilerOptions,\n initiator: CompilationInitiator.CmdReport,\n });\n const compileTimeLength = process.hrtime(startTimestamp);\n\n const compiledOutput = formatCompileResults(results, !!compilerOptions.verbose);\n const summaryLine = this.getSummaryLine(results);\n const timingLine = formatHint(`Finished. (${prettyTime(compileTimeLength)})`);\n\n this.logger.clearStatusLine();\n\n return {\n data: joinSections([compiledOutput, `${summaryLine}\\n${timingLine}`]),\n code: this.getExitCode(results),\n };\n }\n\n async json([components]: [string[]], compilerOptions: CompileOptions) {\n compilerOptions.deleteDistDir = true;\n const compileResults = await this.compile.compileComponents(components, {\n ...compilerOptions,\n initiator: CompilationInitiator.CmdJson,\n });\n return {\n data: compileResults,\n // @todo: fix the code once compile is ready.\n code: 0,\n };\n }\n\n private failedComponents(componentsStatus: BuildResult[]): BuildResult[] {\n return componentsStatus.filter((component) => component.errors.length);\n }\n\n private getExitCode(componentsStatus: BuildResult[]) {\n return this.failedComponents(componentsStatus).length ? 1 : 0;\n }\n\n private getSummaryLine(componentsStatus: BuildResult[]) {\n // a component whose env provides no compiler went through neither a success nor a failure, so\n // it is kept out of the ratio and named separately - the ratio alone would report doing\n // nothing as having compiled everything.\n const skipped = componentsStatus.filter((component) => component.skipped);\n const attempted = componentsStatus.filter((component) => !component.skipped);\n const numberOfFailingComponents = this.failedComponents(attempted).length;\n const numberOfSuccessfulComponents = attempted.length - numberOfFailingComponents;\n const skippedSuffix = skipped.length ? ` ${skipped.length} component(s) skipped, no compiler.` : '';\n\n if (numberOfFailingComponents) {\n return formatWarningSummary(\n `${numberOfFailingComponents}/${attempted.length} components failed to compile.${skippedSuffix}`\n );\n }\n if (!attempted.length && skipped.length) {\n return formatWarningSummary(\n `nothing was compiled. ${skipped.length} component(s) have an env that provides no compiler.`\n );\n }\n return formatSuccessSummary(\n `${numberOfSuccessfulComponents}/${attempted.length} components compiled successfully.${skippedSuffix}`\n );\n }\n}\n"],"mappings":";;;;;;AACA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAE,YAAA;EAAA,MAAAF,IAAA,GAAAG,sBAAA,CAAAF,OAAA;EAAAC,WAAA,YAAAA,CAAA;IAAA,OAAAF,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,iBAAA;EAAA,MAAAJ,IAAA,GAAAC,OAAA;EAAAG,gBAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,OAAA;EAAA,MAAAL,IAAA,GAAAC,OAAA;EAAAI,MAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAA+C,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,QAAAH,CAAA,EAAAI,CA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CAAC;EACH;AACF;AAACG,OAAA,CAAA/C,UAAA,GAAAA,UAAA","ignoreList":[]}
@@ -12,10 +12,18 @@ function _cli() {
12
12
  return data;
13
13
  }
14
14
  const formatCompileResults = (compileResults, verbose) => {
15
- const lines = compileResults.filter(result => verbose || result.errors.length > 0).map(componentResult => {
15
+ const lines = compileResults.filter(result => verbose || result.errors.length > 0 || result.skipped).map(componentResult => {
16
16
  const failed = componentResult.errors.length > 0;
17
- const symbol = failed ? _cli().errorSymbol : undefined;
18
- const suffix = failed ? ' ... failed' : '';
17
+ const skipped = componentResult.skipped;
18
+ let symbol;
19
+ let suffix = '';
20
+ if (failed) {
21
+ symbol = _cli().errorSymbol;
22
+ suffix = ' ... failed';
23
+ } else if (skipped) {
24
+ symbol = _cli().warnSymbol;
25
+ suffix = ` ... not compiled, ${skipped.reason}`;
26
+ }
19
27
  let line = (0, _cli().formatItem)(`${componentResult.component}${suffix}`, symbol);
20
28
  if (verbose && componentResult.buildResults?.length) {
21
29
  line += '\n' + componentResult.buildResults.map(file => `\t\t - ${file}`).join('\n');
@@ -1 +1 @@
1
- {"version":3,"names":["_cli","data","require","formatCompileResults","compileResults","verbose","lines","filter","result","errors","length","map","componentResult","failed","symbol","errorSymbol","undefined","suffix","line","formatItem","component","buildResults","file","join","exports"],"sources":["output-formatter.ts"],"sourcesContent":["import { errorSymbol, formatItem } from '@teambit/cli';\nimport type { BuildResult } from './workspace-compiler';\n\nexport const formatCompileResults = (compileResults: BuildResult[], verbose: boolean) => {\n const lines = compileResults\n .filter((result) => verbose || result.errors.length > 0)\n .map((componentResult: BuildResult) => {\n const failed = componentResult.errors.length > 0;\n const symbol = failed ? errorSymbol : undefined;\n const suffix = failed ? ' ... failed' : '';\n let line = formatItem(`${componentResult.component}${suffix}`, symbol);\n if (verbose && componentResult.buildResults?.length) {\n line += '\\n' + componentResult.buildResults.map((file) => `\\t\\t - ${file}`).join('\\n');\n }\n return line;\n });\n return lines.join(verbose ? '\\n\\n' : '\\n');\n};\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,oBAAoB,GAAGA,CAACC,cAA6B,EAAEC,OAAgB,KAAK;EACvF,MAAMC,KAAK,GAAGF,cAAc,CACzBG,MAAM,CAAEC,MAAM,IAAKH,OAAO,IAAIG,MAAM,CAACC,MAAM,CAACC,MAAM,GAAG,CAAC,CAAC,CACvDC,GAAG,CAAEC,eAA4B,IAAK;IACrC,MAAMC,MAAM,GAAGD,eAAe,CAACH,MAAM,CAACC,MAAM,GAAG,CAAC;IAChD,MAAMI,MAAM,GAAGD,MAAM,GAAGE,kBAAW,GAAGC,SAAS;IAC/C,MAAMC,MAAM,GAAGJ,MAAM,GAAG,aAAa,GAAG,EAAE;IAC1C,IAAIK,IAAI,GAAG,IAAAC,iBAAU,EAAC,GAAGP,eAAe,CAACQ,SAAS,GAAGH,MAAM,EAAE,EAAEH,MAAM,CAAC;IACtE,IAAIT,OAAO,IAAIO,eAAe,CAACS,YAAY,EAAEX,MAAM,EAAE;MACnDQ,IAAI,IAAI,IAAI,GAAGN,eAAe,CAACS,YAAY,CAACV,GAAG,CAAEW,IAAI,IAAK,UAAUA,IAAI,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IACxF;IACA,OAAOL,IAAI;EACb,CAAC,CAAC;EACJ,OAAOZ,KAAK,CAACiB,IAAI,CAAClB,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;AAC5C,CAAC;AAACmB,OAAA,CAAArB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_cli","data","require","formatCompileResults","compileResults","verbose","lines","filter","result","errors","length","skipped","map","componentResult","failed","symbol","suffix","errorSymbol","warnSymbol","reason","line","formatItem","component","buildResults","file","join","exports"],"sources":["output-formatter.ts"],"sourcesContent":["import { errorSymbol, warnSymbol, formatItem } from '@teambit/cli';\nimport type { BuildResult } from './workspace-compiler';\n\nexport const formatCompileResults = (compileResults: BuildResult[], verbose: boolean) => {\n const lines = compileResults\n .filter((result) => verbose || result.errors.length > 0 || result.skipped)\n .map((componentResult: BuildResult) => {\n const failed = componentResult.errors.length > 0;\n const skipped = componentResult.skipped;\n let symbol: string | undefined;\n let suffix = '';\n if (failed) {\n symbol = errorSymbol;\n suffix = ' ... failed';\n } else if (skipped) {\n symbol = warnSymbol;\n suffix = ` ... not compiled, ${skipped.reason}`;\n }\n let line = formatItem(`${componentResult.component}${suffix}`, symbol);\n if (verbose && componentResult.buildResults?.length) {\n line += '\\n' + componentResult.buildResults.map((file) => `\\t\\t - ${file}`).join('\\n');\n }\n return line;\n });\n return lines.join(verbose ? '\\n\\n' : '\\n');\n};\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,OAAA;EAAAF,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGO,MAAME,oBAAoB,GAAGA,CAACC,cAA6B,EAAEC,OAAgB,KAAK;EACvF,MAAMC,KAAK,GAAGF,cAAc,CACzBG,MAAM,CAAEC,MAAM,IAAKH,OAAO,IAAIG,MAAM,CAACC,MAAM,CAACC,MAAM,GAAG,CAAC,IAAIF,MAAM,CAACG,OAAO,CAAC,CACzEC,GAAG,CAAEC,eAA4B,IAAK;IACrC,MAAMC,MAAM,GAAGD,eAAe,CAACJ,MAAM,CAACC,MAAM,GAAG,CAAC;IAChD,MAAMC,OAAO,GAAGE,eAAe,CAACF,OAAO;IACvC,IAAII,MAA0B;IAC9B,IAAIC,MAAM,GAAG,EAAE;IACf,IAAIF,MAAM,EAAE;MACVC,MAAM,GAAGE,kBAAW;MACpBD,MAAM,GAAG,aAAa;IACxB,CAAC,MAAM,IAAIL,OAAO,EAAE;MAClBI,MAAM,GAAGG,iBAAU;MACnBF,MAAM,GAAG,sBAAsBL,OAAO,CAACQ,MAAM,EAAE;IACjD;IACA,IAAIC,IAAI,GAAG,IAAAC,iBAAU,EAAC,GAAGR,eAAe,CAACS,SAAS,GAAGN,MAAM,EAAE,EAAED,MAAM,CAAC;IACtE,IAAIV,OAAO,IAAIQ,eAAe,CAACU,YAAY,EAAEb,MAAM,EAAE;MACnDU,IAAI,IAAI,IAAI,GAAGP,eAAe,CAACU,YAAY,CAACX,GAAG,CAAEY,IAAI,IAAK,UAAUA,IAAI,EAAE,CAAC,CAACC,IAAI,CAAC,IAAI,CAAC;IACxF;IACA,OAAOL,IAAI;EACb,CAAC,CAAC;EACJ,OAAOd,KAAK,CAACmB,IAAI,CAACpB,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC;AAC5C,CAAC;AAACqB,OAAA,CAAAvB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -1,5 +1,5 @@
1
- import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.1097/dist/compiler.composition.js';
2
- import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.1097/dist/compiler.docs.mdx';
1
+ import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.1099/dist/compiler.composition.js';
2
+ import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.1099/dist/compiler.docs.mdx';
3
3
 
4
4
  export const compositions = [compositions_0];
5
5
  export const overview = [overview_0];
@@ -16,6 +16,13 @@ export type BuildResult = {
16
16
  component: string;
17
17
  buildResults: string[];
18
18
  errors: CompileError[];
19
+ /**
20
+ * set when nothing was compiled for the component because its env provides no compiler. such a
21
+ * component is neither a success nor a failure, so it is counted and reported on its own.
22
+ */
23
+ skipped?: {
24
+ reason: string;
25
+ };
19
26
  };
20
27
  export type CompileOptions = {
21
28
  changed?: boolean;
@@ -549,6 +549,7 @@ class WorkspaceCompiler {
549
549
  }
550
550
  async runCompileComponents(components, options, noThrow) {
551
551
  const componentsCompilers = [];
552
+ const skipped = [];
552
553
  components.forEach(c => {
553
554
  const env = this.envs.getOrCalculateEnv(c);
554
555
  const environment = env.env;
@@ -558,6 +559,14 @@ class WorkspaceCompiler {
558
559
  componentsCompilers.push(new ComponentCompiler(this.pubsub, this.workspace, c, compilerInstance, compilerName, this.logger, env));
559
560
  } else {
560
561
  this.logger.warn(`unable to find a compiler instance for ${c.id.toString()}`);
562
+ skipped.push({
563
+ component: c.id.toString(),
564
+ buildResults: [],
565
+ errors: [],
566
+ skipped: {
567
+ reason: `the env "${env.id}" provides no compiler`
568
+ }
569
+ });
561
570
  }
562
571
  });
563
572
  const typeGeneratorParamsPerEnv = options.generateTypes ? await this.getTypesCompilerPerEnv(componentsCompilers) : undefined;
@@ -568,7 +577,7 @@ class WorkspaceCompiler {
568
577
  if (typeGeneratorParamsPerEnv) {
569
578
  await this.generateTypesOnWorkspace(typeGeneratorParamsPerEnv, componentsCompilers);
570
579
  }
571
- return resultOnWorkspace;
580
+ return [...resultOnWorkspace, ...skipped];
572
581
  }
573
582
  async getTypesCompilerPerEnv(componentsCompilers) {
574
583
  const envsMap = {};
@@ -716,9 +725,9 @@ class WorkspaceCompiler {
716
725
  }
717
726
  exports.WorkspaceCompiler = WorkspaceCompiler;
718
727
  function formatCompileResults(buildResults, verbose) {
719
- if (!buildResults.length) return '';
720
728
  // this gets called when a file is changed, so the buildResults array always has only one item
721
- const buildResult = buildResults[0];
729
+ const buildResult = buildResults.find(result => !result.skipped);
730
+ if (!buildResult) return '';
722
731
  const title = ` ${_chalk().default.underline('STATUS\tCOMPONENT ID')}`;
723
732
  const verboseComponentFilesArrayToString = () => {
724
733
  return buildResult.buildResults.map(filePath => ` \t - ${filePath}`).join('\n');
@@ -1 +1 @@
1
- {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_globby","_fsExtra","_workspace","_path","_chalk","_componentId","_logger","_legacy","_component","_workspaceModules","_dependencyResolver","_pkgModules","_workspace2","_lodash","_compiler","_events","_types","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompiler","constructor","pubsub","workspace","component","compilerInstance","compilerId","logger","env","dists","compileErrors","compile","noThrow","options","dataToPersist","deleteDistDir","distDirs","relativeDistDirs","filter","distDir","path","isAbsolute","absoluteDistDirs","length","DataToPersist","removePath","RemovePath","addBasePath","persistAllToFS","Promise","all","map","fs","remove","compilers","canTranspileFile","find","c","transpileFile","canTranspileComponent","transpileComponent","filesystem","files","file","compileOneFile","initiator","compileAllFiles","Error","toString","throwOnCompileErrors","relativeDists","distFile","absoluteDists","addManyFiles","write","buildResults","state","_consumer","compiler","consoleSuccess","id","errors","getPackageDir","packageName","componentIdToPackageName","join","toAbsolutePath","pathToResolve","forEach","errorItem","error","formatError","err","pub","CompilerAspect","CompilerErrorEvent","console","message","packageDir","distDirName","getDistDir","DEFAULT_DIST_DIRNAME","injectedDirs","getInjectedDirs","dist","rootDirs","readRootComponentsDir","rootComponentsPath","rootDir","relative","componentDir","copyTypesToOtherDists","packageDistDir","otherDirs","slice","packageDistDirAbs","matches","globby","cwd","onlyFiles","ignore","distDirAbs","match","source","dest","copyFile","copyCompiledFilesToOtherDists","outputDir","getComponentPackagePath","sourceDistDirAbs","pathExists","dir","resolve","ensureDir","dirname","filePath","isFileSupported","compileResults","contents","push","base","result","Dist","outputPath","Buffer","from","outputText","shouldCopyNonSupportedFiles","filesToCompile","exports","WorkspaceCompiler","envs","aspectLoader","ui","dependencyResolver","watcher","Set","registerOnComponentChange","onComponentChange","bind","registerOnComponentAdd","onComponentAdd","registerOnPreWatch","onPreWatch","registerPreStart","onPreStart","registerOnAspectLoadErrorSlot","onAspectLoadFail","preStartOpts","skipCompilation","compileComponents","changed","verbose","CompilationInitiator","PreStart","watchScopeInternalFiles","code","includes","inInstallContext","inInstallAfterPmContext","shouldCompile","idStr","componentsBeingProcessedInOnAspectLoadFail","has","debug","add","graph","successors","getEnvDepsGraph","depsIds","s","AspectLoadFail","loadExtensions","executeLoadSlot","delete","envComponentId","getGraphIds","nodeFilter","node","hasId","attr","watchOpts","undefined","removedFiles","Boolean","removeLinksFromNodeModules","ComponentChanged","generateTypes","results","formatCompileResults","componentIds","preCompile","start","Date","now","PreWatch","end","componentsIds","componentLoadOptions","OutsideWorkspaceError","getIdsToCompile","loadSeedersAsAspects","components","getMany","loadExternalEnvs","grouped","buildGroupsToCompile","mapSeries","group","runCompileComponents","linkComponents","linkToNodeModulesByComponents","flat","componentsIdsStr","envIdsCompIdsMap","compsWithWrongEnvId","envId","calculateEnvId","envIdByGet","getEnvId","externalEnvsIds","keys","nonLoadedEnvs","isEnvRegistered","loadAspects","idsToClearCache","uniq","reduce","acc","compIds","concat","clearComponentsCache","ComponentID","fromString","componentsCompilers","getOrCalculateEnv","environment","getCompiler","compilerName","name","warn","typeGeneratorParamsPerEnv","getTypesCompilerPerEnv","preGenerateTypesOnWorkspace","resultOnWorkspace","componentCompiler","generateTypesOnWorkspace","envsMap","componentCompilers","compParams","typeCompiler","buildPipe","getBuildPipe","compilerTasks","task","aspectId","tsTask","displayName","compact","typesGeneratorParamsPerEnv","envCompIds","envsIds","groupedByIsEnv","groupBy","isEnv","envsOfEnvsCompIds","groupedByEnvsOfEnvs","envsOfEnvsWithoutCoreCompIds","isCoreEnv","depsOfEnvsOfEnvsCompIds","subGraph","successorsSubgraph","nodes","n","depsOfEnvsOfEnvsCompLists","envsOfEnvs","envComp","getDependencies","DependencyList","merge","getComponentDependencies","dep","groupedByIsDepsOfEnvsOfEnvs","other","depsOfEnvsOfCompIds","otherEnvsIds","otherEnvs","otherEnvsWithoutCoreIds","depsOfEnvsCompLists","groupedByIsDepsOfEnvs","depsOfEnvsOfEnvs","depsOfEnvs","resolveMultipleComponentIds","filterIds","getNewAndModifiedIds","listIds","buildResult","title","chalk","underline","verboseComponentFilesArrayToString","Logger","successSymbol"],"sources":["workspace-compiler.ts"],"sourcesContent":["/* eslint-disable max-classes-per-file */\nimport mapSeries from 'p-map-series';\nimport globby from 'globby';\nimport fs from 'fs-extra';\nimport type { Component } from '@teambit/component';\nimport type { EnvDefinition, EnvsMain } from '@teambit/envs';\nimport type { PubsubMain } from '@teambit/pubsub';\nimport { OutsideWorkspaceError } from '@teambit/workspace';\nimport type { WorkspaceComponentLoadOptions, SerializableResults, Workspace } from '@teambit/workspace';\nimport type { WatcherMain, WatchOptions } from '@teambit/watcher';\nimport path from 'path';\nimport chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\nimport { Logger } from '@teambit/logger';\nimport { DEFAULT_DIST_DIRNAME } from '@teambit/legacy.constants';\nimport type { AbstractVinyl } from '@teambit/component.sources';\nimport { Dist, DataToPersist, RemovePath } from '@teambit/component.sources';\nimport {\n linkToNodeModulesByComponents,\n removeLinksFromNodeModules,\n} from '@teambit/workspace.modules.node-modules-linker';\nimport type { AspectLoaderMain } from '@teambit/aspect-loader';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyList } from '@teambit/dependency-resolver';\nimport type { PathOsBasedAbsolute } from '@teambit/toolbox.path.path';\nimport { componentIdToPackageName } from '@teambit/pkg.modules.component-package-name';\nimport type { UiMain, PreStartOpts } from '@teambit/ui';\nimport { readRootComponentsDir } from '@teambit/workspace.root-components';\nimport { compact, groupBy, uniq } from 'lodash';\nimport type { MultiCompiler } from '@teambit/multi-compiler';\nimport type { CompIdGraph } from '@teambit/graph';\nimport { CompilerAspect } from './compiler.aspect';\nimport { CompilerErrorEvent } from './events';\nimport type { Compiler, TypeGeneratorCompParams } from './types';\nimport { CompilationInitiator } from './types';\n\nexport type BuildResult = {\n component: string;\n buildResults: string[];\n errors: CompileError[];\n};\n\nexport type CompileOptions = {\n changed?: boolean; // compile only new and modified components\n verbose?: boolean; // show more data, such as, dist paths\n /**\n * whether the dist root dir should be deleted before writing new dists.\n * defaults to true for `bit compile` and false everywhere else, such as `bit watch` and `bit\n * start` to avoid webpack \"EINTR\" error.\n */\n deleteDistDir?: boolean;\n initiator: CompilationInitiator; // describes where the compilation is coming from\n // should we create links in node_modules for the compiled components (default = true)\n // this will link the source files, and create the package.json\n linkComponents?: boolean;\n /**\n * whether to generate types after the compilation, default = false.\n * keep in mind that it's a heavy operation, and hurts the performance.\n */\n generateTypes?: boolean;\n};\n\nexport type CompileError = { path: string; error: Error };\n\nexport class ComponentCompiler {\n constructor(\n private pubsub: PubsubMain,\n private workspace: Workspace,\n readonly component: Component,\n readonly compilerInstance: Compiler,\n private compilerId: string,\n private logger: Logger,\n readonly env: EnvDefinition,\n private dists: Dist[] = [],\n private compileErrors: CompileError[] = []\n ) {}\n\n async compile(noThrow = true, options: CompileOptions): Promise<BuildResult> {\n let dataToPersist;\n const deleteDistDir = options.deleteDistDir ?? this.compilerInstance.deleteDistDir;\n const distDirs = await this.distDirs();\n // delete dist folder before transpilation (because some compilers (like ngPackagr) can generate files there during the compilation process)\n if (deleteDistDir) {\n const relativeDistDirs = distDirs.filter((distDir) => !path.isAbsolute(distDir));\n const absoluteDistDirs = distDirs.filter((distDir) => path.isAbsolute(distDir));\n if (relativeDistDirs.length) {\n dataToPersist = new DataToPersist();\n for (const distDir of relativeDistDirs) {\n dataToPersist.removePath(new RemovePath(distDir));\n }\n dataToPersist.addBasePath(this.workspace.path);\n await dataToPersist.persistAllToFS();\n }\n await Promise.all(absoluteDistDirs.map((distDir) => fs.remove(distDir)));\n }\n\n const compilers: Compiler[] = (this.compilerInstance as MultiCompiler).compilers\n ? (this.compilerInstance as MultiCompiler).compilers\n : [this.compilerInstance];\n const canTranspileFile = compilers.find((c) => c.transpileFile);\n const canTranspileComponent = compilers.find((c) => c.transpileComponent);\n\n if (canTranspileFile) {\n await Promise.all(\n this.component.filesystem.files.map((file: AbstractVinyl) =>\n this.compileOneFile(file, options.initiator, distDirs)\n )\n );\n }\n\n if (canTranspileComponent) {\n await this.compileAllFiles(options.initiator, distDirs);\n }\n\n if (!canTranspileFile && !canTranspileComponent) {\n throw new Error(\n `compiler ${this.compilerId.toString()} doesn't implement either \"transpileFile\" or \"transpileComponent\" methods`\n );\n }\n this.throwOnCompileErrors(noThrow);\n\n // writing the dists with `component.setDists(dists); component.dists.writeDists` is tricky\n // as it uses other base-paths and doesn't respect the new node-modules base path.\n const relativeDists = this.dists.filter((distFile) => !path.isAbsolute(distFile.path));\n const absoluteDists = this.dists.filter((distFile) => path.isAbsolute(distFile.path));\n if (relativeDists.length) {\n dataToPersist = new DataToPersist();\n dataToPersist.addManyFiles(relativeDists);\n dataToPersist.addBasePath(this.workspace.path);\n await dataToPersist.persistAllToFS();\n }\n await Promise.all(absoluteDists.map((distFile) => distFile.write()));\n const buildResults = this.dists.map((distFile) => distFile.path);\n if (this.component.state._consumer.compiler) this.logger.consoleSuccess();\n\n return { component: this.component.id.toString(), buildResults, errors: this.compileErrors };\n }\n\n getPackageDir() {\n const packageName = componentIdToPackageName(this.component.state._consumer);\n return path.join('node_modules', packageName);\n }\n\n private toAbsolutePath(pathToResolve: string): string {\n return path.isAbsolute(pathToResolve) ? pathToResolve : path.join(this.workspace.path, pathToResolve);\n }\n\n private throwOnCompileErrors(noThrow = true) {\n if (this.compileErrors.length) {\n this.compileErrors.forEach((errorItem) => {\n this.logger.error(`compilation error at ${errorItem.path}`, errorItem.error);\n });\n const formatError = (errorItem) => `${errorItem.path}\\n${errorItem.error}`;\n const err = new Error(`compilation failed. see the following errors from the compiler\n${this.compileErrors.map(formatError).join('\\n')}`);\n\n this.pubsub.pub(CompilerAspect.id, new CompilerErrorEvent(err));\n\n if (!noThrow) {\n throw err;\n }\n\n this.logger.console(err.message);\n }\n }\n\n private async distDirs(): Promise<string[]> {\n const packageName = componentIdToPackageName(this.component.state._consumer);\n const packageDir = path.join('node_modules', packageName);\n const distDirName = this.compilerInstance.getDistDir?.() || DEFAULT_DIST_DIRNAME;\n const injectedDirs = await this.getInjectedDirs(packageName);\n return [packageDir, ...injectedDirs].map((dist) => path.join(dist, distDirName));\n }\n\n private async getInjectedDirs(packageName: string): Promise<string[]> {\n const injectedDirs = await this.workspace.getInjectedDirs(this.component);\n if (injectedDirs.length > 0) return injectedDirs;\n\n const rootDirs = await readRootComponentsDir(this.workspace.rootComponentsPath);\n return rootDirs.map((rootDir) => path.relative(this.workspace.path, path.join(rootDir, packageName)));\n }\n\n private get componentDir(): PathOsBasedAbsolute {\n return this.workspace.componentDir(this.component.id);\n }\n\n async copyTypesToOtherDists() {\n const distDirs = await this.distDirs();\n if (distDirs.length <= 1) return;\n const packageDistDir = distDirs[0];\n const otherDirs = distDirs.slice(1);\n const packageDistDirAbs = this.toAbsolutePath(packageDistDir);\n const matches = await globby(`**/*.d.ts`, {\n cwd: packageDistDirAbs,\n onlyFiles: true,\n ignore: [`${packageDistDir}/node_modules/`],\n });\n if (!matches.length) return;\n await Promise.all(\n otherDirs.map(async (distDir) => {\n const distDirAbs = this.toAbsolutePath(distDir);\n await Promise.all(\n matches.map(async (match) => {\n const source = path.join(packageDistDirAbs, match);\n const dest = path.join(distDirAbs, match);\n await fs.copyFile(source, dest);\n })\n );\n })\n );\n }\n\n /**\n * Copy all compiled files from the outputDir (where the compiler wrote) to all other dist directories.\n * This is needed for compilers that use transpileComponent and write directly to the filesystem,\n * as they only receive one outputDir but files need to be available in all dist locations.\n */\n async copyCompiledFilesToOtherDists() {\n const distDirs = await this.distDirs();\n if (distDirs.length <= 1) return;\n\n // The compiler writes to the outputDir from getComponentPackagePath + distDirName\n const outputDir = await this.workspace.getComponentPackagePath(this.component);\n const distDirName = this.compilerInstance.getDistDir?.() || DEFAULT_DIST_DIRNAME;\n const sourceDistDirAbs = path.join(outputDir, distDirName);\n\n // Check if the dist directory exists (compiler may not have written anything)\n if (!(await fs.pathExists(sourceDistDirAbs))) return;\n\n const otherDirs = distDirs.filter(\n (dir) => path.resolve(this.toAbsolutePath(dir)) !== path.resolve(sourceDistDirAbs)\n );\n\n if (!otherDirs.length) return;\n\n const matches = await globby(`**/*`, {\n cwd: sourceDistDirAbs,\n onlyFiles: true,\n ignore: ['node_modules/**'],\n });\n if (!matches.length) return;\n\n await Promise.all(\n otherDirs.map(async (distDir) => {\n const distDirAbs = this.toAbsolutePath(distDir);\n await Promise.all(\n matches.map(async (match) => {\n const source = path.join(sourceDistDirAbs, match);\n const dest = path.join(distDirAbs, match);\n try {\n await fs.ensureDir(path.dirname(dest));\n await fs.copyFile(source, dest);\n } catch (err: any) {\n throw new Error(`failed to copy compiled file from \"${source}\" to \"${dest}\": ${err.message}`);\n }\n })\n );\n })\n );\n }\n\n private async compileOneFile(\n file: AbstractVinyl,\n initiator: CompilationInitiator,\n distDirs: string[]\n ): Promise<void> {\n const options = { componentDir: this.componentDir, filePath: file.relative, initiator };\n const isFileSupported = this.compilerInstance.isFileSupported(file.path);\n let compileResults;\n if (isFileSupported) {\n try {\n compileResults = await this.compilerInstance.transpileFile?.(file.contents.toString(), options);\n } catch (error: any) {\n this.compileErrors.push({ path: file.path, error });\n return;\n }\n }\n for (const base of distDirs) {\n if (isFileSupported && compileResults) {\n this.dists.push(\n ...compileResults.map(\n (result) =>\n new Dist({\n base,\n path: path.join(base, result.outputPath),\n contents: Buffer.from(result.outputText),\n })\n )\n );\n } else if (this.compilerInstance.shouldCopyNonSupportedFiles) {\n // compiler doesn't support this file type. copy the file as is to the dist dir.\n this.dists.push(new Dist({ base, path: path.join(base, file.relative), contents: file.contents }));\n }\n }\n }\n\n private async compileAllFiles(initiator: CompilationInitiator, distDirs: string[]): Promise<void> {\n const filesToCompile: AbstractVinyl[] = [];\n for (const base of distDirs) {\n this.component.filesystem.files.forEach((file: AbstractVinyl) => {\n const isFileSupported = this.compilerInstance.isFileSupported(file.path);\n if (isFileSupported) {\n filesToCompile.push(file);\n } else if (this.compilerInstance.shouldCopyNonSupportedFiles) {\n // compiler doesn't support this file type. copy the file as is to the dist dir.\n this.dists.push(\n new Dist({\n base,\n path: path.join(base, file.relative),\n contents: file.contents,\n })\n );\n }\n });\n }\n\n if (filesToCompile.length) {\n try {\n await this.compilerInstance.transpileComponent?.({\n component: this.component,\n componentDir: this.componentDir,\n outputDir: await this.workspace.getComponentPackagePath(this.component),\n initiator,\n });\n // Copy compiled files to all other dist directories (injected dirs)\n await this.copyCompiledFilesToOtherDists();\n } catch (error: any) {\n this.compileErrors.push({ path: this.componentDir, error });\n }\n }\n }\n}\n\ntype TypeGeneratorParamsPerEnv = { envId: string; compParams: TypeGeneratorCompParams[]; typeCompiler: Compiler };\n\nexport class WorkspaceCompiler {\n private componentsBeingProcessedInOnAspectLoadFail = new Set<string>();\n\n constructor(\n private workspace: Workspace,\n private envs: EnvsMain,\n private pubsub: PubsubMain,\n private aspectLoader: AspectLoaderMain,\n private ui: UiMain,\n private logger: Logger,\n private dependencyResolver: DependencyResolverMain,\n private watcher: WatcherMain\n ) {\n if (this.workspace) {\n this.workspace.registerOnComponentChange(this.onComponentChange.bind(this));\n this.workspace.registerOnComponentAdd(this.onComponentAdd.bind(this));\n this.watcher.registerOnPreWatch(this.onPreWatch.bind(this));\n }\n this.ui.registerPreStart(this.onPreStart.bind(this));\n if (this.aspectLoader) {\n this.aspectLoader.registerOnAspectLoadErrorSlot(this.onAspectLoadFail.bind(this));\n }\n }\n\n async onPreStart(preStartOpts: PreStartOpts): Promise<void> {\n if (this.workspace) {\n if (preStartOpts.skipCompilation) {\n return;\n }\n await this.compileComponents([], {\n changed: true,\n verbose: false,\n deleteDistDir: false,\n initiator: CompilationInitiator.PreStart,\n });\n } else {\n await this.watcher.watchScopeInternalFiles();\n }\n }\n\n async onAspectLoadFail(err: Error & { code?: string }, component: Component): Promise<boolean> {\n if (\n ((err.code &&\n (err.code === 'MODULE_NOT_FOUND' || err.code === 'ERR_MODULE_NOT_FOUND' || err.code === 'ERR_REQUIRE_ESM')) ||\n err.message.includes('import.meta') ||\n err.message.includes('exports is not defined')) &&\n this.workspace\n ) {\n const inInstallContext = this.workspace.inInstallContext;\n const inInstallAfterPmContext = this.workspace.inInstallAfterPmContext;\n // If we are now running install we only want to compile after the package manager is done\n const shouldCompile = (inInstallContext && inInstallAfterPmContext) || !inInstallContext;\n if (shouldCompile) {\n const id = component.id;\n const idStr = id.toString();\n\n // Prevent infinite loop when there's a circular dependency between an env and a component.\n // If we're already processing this component, don't re-enter.\n if (this.componentsBeingProcessedInOnAspectLoadFail.has(idStr)) {\n this.logger.debug(\n `onAspectLoadFail: skipping ${idStr} as it's already being processed (preventing infinite loop)`\n );\n return false;\n }\n\n this.componentsBeingProcessedInOnAspectLoadFail.add(idStr);\n try {\n const { graph, successors } = await this.getEnvDepsGraph(id);\n // const deps = this.dependencyResolver.getDependencies(component);\n // const depsIds = deps.getComponentDependencies().map((dep) => {\n // return dep.id.toString();\n // });\n const depsIds = successors.map((s) => s.id);\n await this.compileComponents(\n [id.toString(), ...depsIds],\n { initiator: CompilationInitiator.AspectLoadFail },\n true,\n { loadExtensions: true, executeLoadSlot: true },\n graph\n );\n return true;\n } finally {\n this.componentsBeingProcessedInOnAspectLoadFail.delete(idStr);\n }\n }\n }\n return false;\n }\n\n async getEnvDepsGraph(envComponentId: ComponentID): Promise<{ graph: CompIdGraph; successors: { id: string }[] }> {\n const graph = await this.workspace.getGraphIds([envComponentId]);\n const successors = graph.successors(envComponentId.toString(), {\n nodeFilter: (node) => this.workspace.hasId(node.attr),\n });\n return { graph, successors };\n }\n\n async onComponentAdd(component: Component, files: string[], watchOpts: WatchOptions) {\n return this.onComponentChange(component, files, undefined, watchOpts);\n }\n\n async onComponentChange(\n component: Component,\n files: string[],\n removedFiles: string[] = [],\n watchOpts: WatchOptions\n ): Promise<SerializableResults | void> {\n if (!watchOpts.compile) return undefined;\n // when files are removed, we need to remove the dist directories and the old symlinks, otherwise, it has\n // symlinks to non-exist files and the dist has stale files\n const deleteDistDir = Boolean(removedFiles?.length);\n if (removedFiles?.length) {\n await removeLinksFromNodeModules(component, this.workspace, removedFiles);\n }\n const buildResults = await this.compileComponents(\n [component.id.toString()],\n {\n initiator: watchOpts.initiator || CompilationInitiator.ComponentChanged,\n deleteDistDir,\n generateTypes: watchOpts.generateTypes,\n },\n true\n );\n return {\n results: buildResults,\n toString() {\n return formatCompileResults(buildResults, watchOpts.verbose);\n },\n };\n }\n\n async onPreWatch(componentIds: ComponentID[], watchOpts: WatchOptions) {\n if (watchOpts.preCompile) {\n const start = Date.now();\n this.logger.console(`compiling ${componentIds.length} components`);\n await this.compileComponents(\n componentIds.map((id) => id),\n { initiator: CompilationInitiator.PreWatch, generateTypes: watchOpts.generateTypes }\n );\n const end = Date.now() - start;\n this.logger.consoleSuccess(`compiled ${componentIds.length} components successfully (${end / 1000} sec)`);\n }\n }\n\n async compileComponents(\n componentsIds: string[] | ComponentID[] | ComponentID[], // when empty, it compiles new+modified (unless options.all is set),\n options: CompileOptions,\n noThrow?: boolean,\n componentLoadOptions: WorkspaceComponentLoadOptions = {},\n graph?: CompIdGraph\n ): Promise<BuildResult[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentIds = await this.getIdsToCompile(componentsIds, options.changed);\n // In case the aspect failed to load, we want to compile it without try to re-load it again\n if (options.initiator === CompilationInitiator.AspectLoadFail) {\n componentLoadOptions.loadSeedersAsAspects = false;\n }\n let components = await this.workspace.getMany(componentIds, componentLoadOptions);\n await this.loadExternalEnvs(components);\n // reload components as we might cleared the cache as part of the loadExternalEnvs\n components = await this.workspace.getMany(componentIds, componentLoadOptions);\n const grouped = await this.buildGroupsToCompile(components, graph);\n\n const results = await mapSeries(grouped, async (group) => {\n return this.runCompileComponents(group.components, options, noThrow);\n });\n const linkComponents = options.linkComponents ?? true;\n if (linkComponents) {\n await linkToNodeModulesByComponents(components, this.workspace);\n }\n return results.flat();\n }\n\n /**\n * This will ensue that the envs of the components are loaded before the compilation starts.\n * @param components\n */\n private async loadExternalEnvs(components: Component[]) {\n const componentsIdsStr = components.map((c) => c.id.toString());\n const envIdsCompIdsMap = {};\n const compsWithWrongEnvId: string[] = [];\n await Promise.all(\n components.map(async (component) => {\n // It's important to use calculate here to get the real id even if it's not loaded\n const envId = (await this.envs.calculateEnvId(component)).toString();\n // This might be different from the env id above, because the component might be loaded before the env\n // in that case we will need to clear the cache of that component\n const envIdByGet = this.envs.getEnvId(component);\n if (envId !== envIdByGet) {\n compsWithWrongEnvId.push(component.id.toString());\n }\n // If it's part of the components it will be handled later as it's not external\n // and might need to be compiled as well\n if (componentsIdsStr.includes(envId)) return undefined;\n if (!envIdsCompIdsMap[envId]) envIdsCompIdsMap[envId] = [component.id.toString()];\n envIdsCompIdsMap[envId].push(component.id.toString());\n })\n );\n const externalEnvsIds = Object.keys(envIdsCompIdsMap);\n\n if (!externalEnvsIds.length) return;\n const nonLoadedEnvs = externalEnvsIds.filter((envId) => !this.envs.isEnvRegistered(envId));\n await this.workspace.loadAspects(nonLoadedEnvs);\n const idsToClearCache: string[] = uniq(\n nonLoadedEnvs\n .reduce((acc, envId) => {\n const compIds = envIdsCompIdsMap[envId];\n return [...acc, ...compIds];\n }, [] as string[])\n .concat(compsWithWrongEnvId)\n );\n this.workspace.clearComponentsCache(idsToClearCache.map((id) => ComponentID.fromString(id)));\n }\n\n private async runCompileComponents(\n components: Component[],\n options: CompileOptions,\n noThrow?: boolean\n ): Promise<BuildResult[]> {\n const componentsCompilers: ComponentCompiler[] = [];\n\n components.forEach((c) => {\n const env = this.envs.getOrCalculateEnv(c);\n const environment = env.env;\n const compilerInstance = environment.getCompiler?.();\n\n if (compilerInstance) {\n const compilerName = compilerInstance.constructor.name || 'compiler';\n componentsCompilers.push(\n new ComponentCompiler(this.pubsub, this.workspace, c, compilerInstance, compilerName, this.logger, env)\n );\n } else {\n this.logger.warn(`unable to find a compiler instance for ${c.id.toString()}`);\n }\n });\n\n const typeGeneratorParamsPerEnv = options.generateTypes\n ? await this.getTypesCompilerPerEnv(componentsCompilers)\n : undefined;\n\n if (typeGeneratorParamsPerEnv) {\n await this.preGenerateTypesOnWorkspace(typeGeneratorParamsPerEnv);\n }\n\n const resultOnWorkspace = await mapSeries(componentsCompilers, (componentCompiler) =>\n componentCompiler.compile(noThrow, options)\n );\n\n if (typeGeneratorParamsPerEnv) {\n await this.generateTypesOnWorkspace(typeGeneratorParamsPerEnv, componentsCompilers);\n }\n\n return resultOnWorkspace;\n }\n\n private async getTypesCompilerPerEnv(componentsCompilers: ComponentCompiler[]): Promise<TypeGeneratorParamsPerEnv[]> {\n const envsMap: { [envId: string]: ComponentCompiler[] } = {};\n componentsCompilers.forEach((componentCompiler) => {\n const envId = componentCompiler.env.id;\n if (!envsMap[envId]) envsMap[envId] = [];\n envsMap[envId].push(componentCompiler);\n });\n\n const results = await mapSeries(Object.keys(envsMap), async (envId) => {\n const componentCompilers = envsMap[envId];\n const compParams = await Promise.all(\n componentCompilers.map(async (componentCompiler) => {\n return {\n component: componentCompiler.component,\n packageDir: path.join(this.workspace.path, componentCompiler.getPackageDir()),\n };\n })\n );\n\n let typeCompiler = componentCompilers[0].compilerInstance;\n if (!typeCompiler.preGenerateTypesOnWorkspace) {\n const buildPipe = componentCompilers[0].env.env.getBuildPipe();\n const compilerTasks = buildPipe.filter((task) => task.aspectId === CompilerAspect.id);\n const tsTask = compilerTasks.find(\n (task) => task.compilerInstance && task.compilerInstance.displayName === 'TypeScript'\n );\n if (!tsTask) return;\n typeCompiler = tsTask.compilerInstance;\n if (!typeCompiler.preGenerateTypesOnWorkspace) return;\n }\n return { envId, compParams, typeCompiler };\n });\n return compact(results);\n }\n\n private async preGenerateTypesOnWorkspace(typesGeneratorParamsPerEnv: TypeGeneratorParamsPerEnv[]) {\n await mapSeries(typesGeneratorParamsPerEnv, async ({ envId, compParams, typeCompiler }) => {\n await typeCompiler.preGenerateTypesOnWorkspace!(compParams, envId);\n });\n }\n\n private async generateTypesOnWorkspace(\n typesGeneratorParamsPerEnv: TypeGeneratorParamsPerEnv[],\n componentsCompilers: ComponentCompiler[]\n ) {\n await mapSeries(typesGeneratorParamsPerEnv, async ({ compParams, typeCompiler }) => {\n await typeCompiler.generateTypesOnWorkspace!(path.join(this.workspace.path, 'node_modules'), compParams);\n });\n await Promise.all(componentsCompilers.map((componentCompiler) => componentCompiler.copyTypesToOtherDists()));\n }\n\n /**\n * This function groups the components to compile into groups by their environment and dependencies.\n * The order of the groups is important, the first group should be compiled first.\n * The order inside the group is not important.\n * The groups are:\n * 1. dependencies of envs of envs.\n * 2. envs of envs.\n * 3. dependencies of envs.\n * 4. envs.\n * 5. the rest.\n * @param ids\n */\n async buildGroupsToCompile(\n components: Component[],\n graph?: CompIdGraph\n ): Promise<\n Array<{\n components: Component[];\n envsOfEnvs?: boolean;\n envs?: boolean;\n depsOfEnvsOfEnvs?: boolean;\n depsOfEnvs?: boolean;\n other?: boolean;\n }>\n > {\n const envCompIds = await Promise.all(\n components\n // .map((component) => this.envs.getEnvId(component))\n .map(async (component) => {\n const envId = await this.envs.calculateEnvId(component);\n return envId.toString();\n })\n );\n const envsIds = uniq(envCompIds);\n const groupedByIsEnv = groupBy(components, (component) => {\n if (envsIds.includes(component.id.toString())) return 'envs';\n if (this.envs.isEnv(component)) return 'envs';\n return 'other';\n });\n const envsOfEnvsCompIds = await Promise.all(\n (groupedByIsEnv.envs || [])\n // .map((component) => this.envs.getEnvId(component))\n .map(async (component) => (await this.envs.calculateEnvId(component)).toString())\n );\n const groupedByEnvsOfEnvs = groupBy(groupedByIsEnv.envs, (component) => {\n if (envsOfEnvsCompIds.includes(component.id.toString())) return 'envsOfEnvs';\n return 'otherEnvs';\n });\n const envsOfEnvsWithoutCoreCompIds = envsOfEnvsCompIds.filter((id) => !this.envs.isCoreEnv(id));\n let depsOfEnvsOfEnvsCompIds: string[] = [];\n if (graph) {\n const subGraph = graph.successorsSubgraph(envsOfEnvsWithoutCoreCompIds, {\n nodeFilter: (node) => this.workspace.hasId(node.attr),\n });\n depsOfEnvsOfEnvsCompIds = subGraph.nodes.map((n) => n.id);\n } else {\n const depsOfEnvsOfEnvsCompLists = (groupedByEnvsOfEnvs.envsOfEnvs || []).map((envComp) =>\n this.dependencyResolver.getDependencies(envComp)\n );\n depsOfEnvsOfEnvsCompIds = DependencyList.merge(depsOfEnvsOfEnvsCompLists)\n .getComponentDependencies()\n .map((dep) => dep.id.toString());\n }\n const groupedByIsDepsOfEnvsOfEnvs = groupBy(groupedByIsEnv.other, (component) => {\n if (depsOfEnvsOfEnvsCompIds.includes(component.id.toString())) return 'depsOfEnvsOfEnvs';\n return 'other';\n });\n let depsOfEnvsOfCompIds: string[] = [];\n if (graph) {\n const otherEnvsIds = (groupedByEnvsOfEnvs.otherEnvs || []).map((c) => c.id.toString());\n if (otherEnvsIds.length) {\n const otherEnvsWithoutCoreIds = otherEnvsIds.filter((id) => !this.envs.isCoreEnv(id));\n const subGraph = graph.successorsSubgraph(otherEnvsWithoutCoreIds, {\n nodeFilter: (node) => this.workspace.hasId(node.attr),\n });\n depsOfEnvsOfCompIds = subGraph.nodes.map((n) => n.id);\n }\n } else {\n const depsOfEnvsCompLists = (groupedByEnvsOfEnvs.otherEnvs || []).map((envComp) =>\n this.dependencyResolver.getDependencies(envComp)\n );\n depsOfEnvsOfCompIds = DependencyList.merge(depsOfEnvsCompLists)\n .getComponentDependencies()\n .map((dep) => dep.id.toString());\n }\n const groupedByIsDepsOfEnvs = groupBy(groupedByIsDepsOfEnvsOfEnvs.other, (component) => {\n if (depsOfEnvsOfCompIds.includes(component.id.toString())) return 'depsOfEnvs';\n return 'other';\n });\n return [\n {\n components: groupedByIsDepsOfEnvsOfEnvs.depsOfEnvsOfEnvs || [],\n depsOfEnvsOfEnvs: true,\n },\n {\n components: groupedByEnvsOfEnvs.envsOfEnvs || [],\n envsOfEnvs: true,\n },\n {\n components: groupedByIsDepsOfEnvs.depsOfEnvs || [],\n depsOfEnvs: true,\n },\n {\n components: groupedByEnvsOfEnvs.otherEnvs || [],\n envs: true,\n },\n {\n components: groupedByIsDepsOfEnvs.other || [],\n other: true,\n },\n ];\n }\n\n private async getIdsToCompile(componentsIds: Array<string | ComponentID>, changed = false): Promise<ComponentID[]> {\n if (componentsIds.length) {\n const componentIds = await this.workspace.resolveMultipleComponentIds(componentsIds);\n return this.workspace.filterIds(componentIds);\n }\n if (changed) {\n return this.workspace.getNewAndModifiedIds();\n }\n return this.workspace.listIds();\n }\n}\n\nfunction formatCompileResults(buildResults: BuildResult[], verbose?: boolean) {\n if (!buildResults.length) return '';\n // this gets called when a file is changed, so the buildResults array always has only one item\n const buildResult = buildResults[0];\n const title = ` ${chalk.underline('STATUS\\tCOMPONENT ID')}`;\n const verboseComponentFilesArrayToString = () => {\n return buildResult.buildResults.map((filePath) => ` \\t - ${filePath}`).join('\\n');\n };\n\n return `${title}\n ${Logger.successSymbol()}SUCCESS\\t${buildResult.component}\\n\n ${verbose ? `${verboseComponentFilesArrayToString()}\\n` : ''}`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,UAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAGA,SAAAM,MAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,KAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAO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KAAK,IAAI,EAAE;MAC7CA,KAAK,EAAE;IACT,CAAC,CACF;EACH;EAEA,MAAcnF,eAAeA,CAACH,aAA0C,EAAE9C,OAAO,GAAG,KAAK,EAA0B;IACjH,IAAI8C,aAAa,CAAC9K,MAAM,EAAE;MACxB,MAAMuK,YAAY,GAAG,MAAM,IAAI,CAAC3L,SAAS,CAACiS,2BAA2B,CAAC/F,aAAa,CAAC;MACpF,OAAO,IAAI,CAAClM,SAAS,CAACkS,SAAS,CAACvG,YAAY,CAAC;IAC/C;IACA,IAAIvC,OAAO,EAAE;MACX,OAAO,IAAI,CAACpJ,SAAS,CAACmS,oBAAoB,CAAC,CAAC;IAC9C;IACA,OAAO,IAAI,CAACnS,SAAS,CAACoS,OAAO,CAAC,CAAC;EACjC;AACF;AAACtK,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAED,SAAS2D,oBAAoBA,CAACtI,YAA2B,EAAEiG,OAAiB,EAAE;EAC5E,IAAI,CAACjG,YAAY,CAAChC,MAAM,EAAE,OAAO,EAAE;EACnC;EACA,MAAMiR,WAAW,GAAGjP,YAAY,CAAC,CAAC,CAAC;EACnC,MAAMkP,KAAK,GAAG,IAAIC,gBAAK,CAACC,SAAS,CAAC,sBAAsB,CAAC,EAAE;EAC3D,MAAMC,kCAAkC,GAAGA,CAAA,KAAM;IAC/C,OAAOJ,WAAW,CAACjP,YAAY,CAACxB,GAAG,CAAEoF,QAAQ,IAAK,SAASA,QAAQ,EAAE,CAAC,CAAClD,IAAI,CAAC,IAAI,CAAC;EACnF,CAAC;EAED,OAAO,GAAGwO,KAAK;AACjB,IAAII,gBAAM,CAACC,aAAa,CAAC,CAAC,YAAYN,WAAW,CAACpS,SAAS;AAC3D,IAAIoJ,OAAO,GAAG,GAAGoJ,kCAAkC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE;AAChE","ignoreList":[]}
1
+ {"version":3,"names":["_pMapSeries","data","_interopRequireDefault","require","_globby","_fsExtra","_workspace","_path","_chalk","_componentId","_logger","_legacy","_component","_workspaceModules","_dependencyResolver","_pkgModules","_workspace2","_lodash","_compiler","_events","_types","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","ComponentCompiler","constructor","pubsub","workspace","component","compilerInstance","compilerId","logger","env","dists","compileErrors","compile","noThrow","options","dataToPersist","deleteDistDir","distDirs","relativeDistDirs","filter","distDir","path","isAbsolute","absoluteDistDirs","length","DataToPersist","removePath","RemovePath","addBasePath","persistAllToFS","Promise","all","map","fs","remove","compilers","canTranspileFile","find","c","transpileFile","canTranspileComponent","transpileComponent","filesystem","files","file","compileOneFile","initiator","compileAllFiles","Error","toString","throwOnCompileErrors","relativeDists","distFile","absoluteDists","addManyFiles","write","buildResults","state","_consumer","compiler","consoleSuccess","id","errors","getPackageDir","packageName","componentIdToPackageName","join","toAbsolutePath","pathToResolve","forEach","errorItem","error","formatError","err","pub","CompilerAspect","CompilerErrorEvent","console","message","packageDir","distDirName","getDistDir","DEFAULT_DIST_DIRNAME","injectedDirs","getInjectedDirs","dist","rootDirs","readRootComponentsDir","rootComponentsPath","rootDir","relative","componentDir","copyTypesToOtherDists","packageDistDir","otherDirs","slice","packageDistDirAbs","matches","globby","cwd","onlyFiles","ignore","distDirAbs","match","source","dest","copyFile","copyCompiledFilesToOtherDists","outputDir","getComponentPackagePath","sourceDistDirAbs","pathExists","dir","resolve","ensureDir","dirname","filePath","isFileSupported","compileResults","contents","push","base","result","Dist","outputPath","Buffer","from","outputText","shouldCopyNonSupportedFiles","filesToCompile","exports","WorkspaceCompiler","envs","aspectLoader","ui","dependencyResolver","watcher","Set","registerOnComponentChange","onComponentChange","bind","registerOnComponentAdd","onComponentAdd","registerOnPreWatch","onPreWatch","registerPreStart","onPreStart","registerOnAspectLoadErrorSlot","onAspectLoadFail","preStartOpts","skipCompilation","compileComponents","changed","verbose","CompilationInitiator","PreStart","watchScopeInternalFiles","code","includes","inInstallContext","inInstallAfterPmContext","shouldCompile","idStr","componentsBeingProcessedInOnAspectLoadFail","has","debug","add","graph","successors","getEnvDepsGraph","depsIds","s","AspectLoadFail","loadExtensions","executeLoadSlot","delete","envComponentId","getGraphIds","nodeFilter","node","hasId","attr","watchOpts","undefined","removedFiles","Boolean","removeLinksFromNodeModules","ComponentChanged","generateTypes","results","formatCompileResults","componentIds","preCompile","start","Date","now","PreWatch","end","componentsIds","componentLoadOptions","OutsideWorkspaceError","getIdsToCompile","loadSeedersAsAspects","components","getMany","loadExternalEnvs","grouped","buildGroupsToCompile","mapSeries","group","runCompileComponents","linkComponents","linkToNodeModulesByComponents","flat","componentsIdsStr","envIdsCompIdsMap","compsWithWrongEnvId","envId","calculateEnvId","envIdByGet","getEnvId","externalEnvsIds","keys","nonLoadedEnvs","isEnvRegistered","loadAspects","idsToClearCache","uniq","reduce","acc","compIds","concat","clearComponentsCache","ComponentID","fromString","componentsCompilers","skipped","getOrCalculateEnv","environment","getCompiler","compilerName","name","warn","reason","typeGeneratorParamsPerEnv","getTypesCompilerPerEnv","preGenerateTypesOnWorkspace","resultOnWorkspace","componentCompiler","generateTypesOnWorkspace","envsMap","componentCompilers","compParams","typeCompiler","buildPipe","getBuildPipe","compilerTasks","task","aspectId","tsTask","displayName","compact","typesGeneratorParamsPerEnv","envCompIds","envsIds","groupedByIsEnv","groupBy","isEnv","envsOfEnvsCompIds","groupedByEnvsOfEnvs","envsOfEnvsWithoutCoreCompIds","isCoreEnv","depsOfEnvsOfEnvsCompIds","subGraph","successorsSubgraph","nodes","n","depsOfEnvsOfEnvsCompLists","envsOfEnvs","envComp","getDependencies","DependencyList","merge","getComponentDependencies","dep","groupedByIsDepsOfEnvsOfEnvs","other","depsOfEnvsOfCompIds","otherEnvsIds","otherEnvs","otherEnvsWithoutCoreIds","depsOfEnvsCompLists","groupedByIsDepsOfEnvs","depsOfEnvsOfEnvs","depsOfEnvs","resolveMultipleComponentIds","filterIds","getNewAndModifiedIds","listIds","buildResult","title","chalk","underline","verboseComponentFilesArrayToString","Logger","successSymbol"],"sources":["workspace-compiler.ts"],"sourcesContent":["/* eslint-disable max-classes-per-file */\nimport mapSeries from 'p-map-series';\nimport globby from 'globby';\nimport fs from 'fs-extra';\nimport type { Component } from '@teambit/component';\nimport type { EnvDefinition, EnvsMain } from '@teambit/envs';\nimport type { PubsubMain } from '@teambit/pubsub';\nimport { OutsideWorkspaceError } from '@teambit/workspace';\nimport type { WorkspaceComponentLoadOptions, SerializableResults, Workspace } from '@teambit/workspace';\nimport type { WatcherMain, WatchOptions } from '@teambit/watcher';\nimport path from 'path';\nimport chalk from 'chalk';\nimport { ComponentID } from '@teambit/component-id';\nimport { Logger } from '@teambit/logger';\nimport { DEFAULT_DIST_DIRNAME } from '@teambit/legacy.constants';\nimport type { AbstractVinyl } from '@teambit/component.sources';\nimport { Dist, DataToPersist, RemovePath } from '@teambit/component.sources';\nimport {\n linkToNodeModulesByComponents,\n removeLinksFromNodeModules,\n} from '@teambit/workspace.modules.node-modules-linker';\nimport type { AspectLoaderMain } from '@teambit/aspect-loader';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyList } from '@teambit/dependency-resolver';\nimport type { PathOsBasedAbsolute } from '@teambit/toolbox.path.path';\nimport { componentIdToPackageName } from '@teambit/pkg.modules.component-package-name';\nimport type { UiMain, PreStartOpts } from '@teambit/ui';\nimport { readRootComponentsDir } from '@teambit/workspace.root-components';\nimport { compact, groupBy, uniq } from 'lodash';\nimport type { MultiCompiler } from '@teambit/multi-compiler';\nimport type { CompIdGraph } from '@teambit/graph';\nimport { CompilerAspect } from './compiler.aspect';\nimport { CompilerErrorEvent } from './events';\nimport type { Compiler, TypeGeneratorCompParams } from './types';\nimport { CompilationInitiator } from './types';\n\nexport type BuildResult = {\n component: string;\n buildResults: string[];\n errors: CompileError[];\n /**\n * set when nothing was compiled for the component because its env provides no compiler. such a\n * component is neither a success nor a failure, so it is counted and reported on its own.\n */\n skipped?: { reason: string };\n};\n\nexport type CompileOptions = {\n changed?: boolean; // compile only new and modified components\n verbose?: boolean; // show more data, such as, dist paths\n /**\n * whether the dist root dir should be deleted before writing new dists.\n * defaults to true for `bit compile` and false everywhere else, such as `bit watch` and `bit\n * start` to avoid webpack \"EINTR\" error.\n */\n deleteDistDir?: boolean;\n initiator: CompilationInitiator; // describes where the compilation is coming from\n // should we create links in node_modules for the compiled components (default = true)\n // this will link the source files, and create the package.json\n linkComponents?: boolean;\n /**\n * whether to generate types after the compilation, default = false.\n * keep in mind that it's a heavy operation, and hurts the performance.\n */\n generateTypes?: boolean;\n};\n\nexport type CompileError = { path: string; error: Error };\n\nexport class ComponentCompiler {\n constructor(\n private pubsub: PubsubMain,\n private workspace: Workspace,\n readonly component: Component,\n readonly compilerInstance: Compiler,\n private compilerId: string,\n private logger: Logger,\n readonly env: EnvDefinition,\n private dists: Dist[] = [],\n private compileErrors: CompileError[] = []\n ) {}\n\n async compile(noThrow = true, options: CompileOptions): Promise<BuildResult> {\n let dataToPersist;\n const deleteDistDir = options.deleteDistDir ?? this.compilerInstance.deleteDistDir;\n const distDirs = await this.distDirs();\n // delete dist folder before transpilation (because some compilers (like ngPackagr) can generate files there during the compilation process)\n if (deleteDistDir) {\n const relativeDistDirs = distDirs.filter((distDir) => !path.isAbsolute(distDir));\n const absoluteDistDirs = distDirs.filter((distDir) => path.isAbsolute(distDir));\n if (relativeDistDirs.length) {\n dataToPersist = new DataToPersist();\n for (const distDir of relativeDistDirs) {\n dataToPersist.removePath(new RemovePath(distDir));\n }\n dataToPersist.addBasePath(this.workspace.path);\n await dataToPersist.persistAllToFS();\n }\n await Promise.all(absoluteDistDirs.map((distDir) => fs.remove(distDir)));\n }\n\n const compilers: Compiler[] = (this.compilerInstance as MultiCompiler).compilers\n ? (this.compilerInstance as MultiCompiler).compilers\n : [this.compilerInstance];\n const canTranspileFile = compilers.find((c) => c.transpileFile);\n const canTranspileComponent = compilers.find((c) => c.transpileComponent);\n\n if (canTranspileFile) {\n await Promise.all(\n this.component.filesystem.files.map((file: AbstractVinyl) =>\n this.compileOneFile(file, options.initiator, distDirs)\n )\n );\n }\n\n if (canTranspileComponent) {\n await this.compileAllFiles(options.initiator, distDirs);\n }\n\n if (!canTranspileFile && !canTranspileComponent) {\n throw new Error(\n `compiler ${this.compilerId.toString()} doesn't implement either \"transpileFile\" or \"transpileComponent\" methods`\n );\n }\n this.throwOnCompileErrors(noThrow);\n\n // writing the dists with `component.setDists(dists); component.dists.writeDists` is tricky\n // as it uses other base-paths and doesn't respect the new node-modules base path.\n const relativeDists = this.dists.filter((distFile) => !path.isAbsolute(distFile.path));\n const absoluteDists = this.dists.filter((distFile) => path.isAbsolute(distFile.path));\n if (relativeDists.length) {\n dataToPersist = new DataToPersist();\n dataToPersist.addManyFiles(relativeDists);\n dataToPersist.addBasePath(this.workspace.path);\n await dataToPersist.persistAllToFS();\n }\n await Promise.all(absoluteDists.map((distFile) => distFile.write()));\n const buildResults = this.dists.map((distFile) => distFile.path);\n if (this.component.state._consumer.compiler) this.logger.consoleSuccess();\n\n return { component: this.component.id.toString(), buildResults, errors: this.compileErrors };\n }\n\n getPackageDir() {\n const packageName = componentIdToPackageName(this.component.state._consumer);\n return path.join('node_modules', packageName);\n }\n\n private toAbsolutePath(pathToResolve: string): string {\n return path.isAbsolute(pathToResolve) ? pathToResolve : path.join(this.workspace.path, pathToResolve);\n }\n\n private throwOnCompileErrors(noThrow = true) {\n if (this.compileErrors.length) {\n this.compileErrors.forEach((errorItem) => {\n this.logger.error(`compilation error at ${errorItem.path}`, errorItem.error);\n });\n const formatError = (errorItem) => `${errorItem.path}\\n${errorItem.error}`;\n const err = new Error(`compilation failed. see the following errors from the compiler\n${this.compileErrors.map(formatError).join('\\n')}`);\n\n this.pubsub.pub(CompilerAspect.id, new CompilerErrorEvent(err));\n\n if (!noThrow) {\n throw err;\n }\n\n this.logger.console(err.message);\n }\n }\n\n private async distDirs(): Promise<string[]> {\n const packageName = componentIdToPackageName(this.component.state._consumer);\n const packageDir = path.join('node_modules', packageName);\n const distDirName = this.compilerInstance.getDistDir?.() || DEFAULT_DIST_DIRNAME;\n const injectedDirs = await this.getInjectedDirs(packageName);\n return [packageDir, ...injectedDirs].map((dist) => path.join(dist, distDirName));\n }\n\n private async getInjectedDirs(packageName: string): Promise<string[]> {\n const injectedDirs = await this.workspace.getInjectedDirs(this.component);\n if (injectedDirs.length > 0) return injectedDirs;\n\n const rootDirs = await readRootComponentsDir(this.workspace.rootComponentsPath);\n return rootDirs.map((rootDir) => path.relative(this.workspace.path, path.join(rootDir, packageName)));\n }\n\n private get componentDir(): PathOsBasedAbsolute {\n return this.workspace.componentDir(this.component.id);\n }\n\n async copyTypesToOtherDists() {\n const distDirs = await this.distDirs();\n if (distDirs.length <= 1) return;\n const packageDistDir = distDirs[0];\n const otherDirs = distDirs.slice(1);\n const packageDistDirAbs = this.toAbsolutePath(packageDistDir);\n const matches = await globby(`**/*.d.ts`, {\n cwd: packageDistDirAbs,\n onlyFiles: true,\n ignore: [`${packageDistDir}/node_modules/`],\n });\n if (!matches.length) return;\n await Promise.all(\n otherDirs.map(async (distDir) => {\n const distDirAbs = this.toAbsolutePath(distDir);\n await Promise.all(\n matches.map(async (match) => {\n const source = path.join(packageDistDirAbs, match);\n const dest = path.join(distDirAbs, match);\n await fs.copyFile(source, dest);\n })\n );\n })\n );\n }\n\n /**\n * Copy all compiled files from the outputDir (where the compiler wrote) to all other dist directories.\n * This is needed for compilers that use transpileComponent and write directly to the filesystem,\n * as they only receive one outputDir but files need to be available in all dist locations.\n */\n async copyCompiledFilesToOtherDists() {\n const distDirs = await this.distDirs();\n if (distDirs.length <= 1) return;\n\n // The compiler writes to the outputDir from getComponentPackagePath + distDirName\n const outputDir = await this.workspace.getComponentPackagePath(this.component);\n const distDirName = this.compilerInstance.getDistDir?.() || DEFAULT_DIST_DIRNAME;\n const sourceDistDirAbs = path.join(outputDir, distDirName);\n\n // Check if the dist directory exists (compiler may not have written anything)\n if (!(await fs.pathExists(sourceDistDirAbs))) return;\n\n const otherDirs = distDirs.filter(\n (dir) => path.resolve(this.toAbsolutePath(dir)) !== path.resolve(sourceDistDirAbs)\n );\n\n if (!otherDirs.length) return;\n\n const matches = await globby(`**/*`, {\n cwd: sourceDistDirAbs,\n onlyFiles: true,\n ignore: ['node_modules/**'],\n });\n if (!matches.length) return;\n\n await Promise.all(\n otherDirs.map(async (distDir) => {\n const distDirAbs = this.toAbsolutePath(distDir);\n await Promise.all(\n matches.map(async (match) => {\n const source = path.join(sourceDistDirAbs, match);\n const dest = path.join(distDirAbs, match);\n try {\n await fs.ensureDir(path.dirname(dest));\n await fs.copyFile(source, dest);\n } catch (err: any) {\n throw new Error(`failed to copy compiled file from \"${source}\" to \"${dest}\": ${err.message}`);\n }\n })\n );\n })\n );\n }\n\n private async compileOneFile(\n file: AbstractVinyl,\n initiator: CompilationInitiator,\n distDirs: string[]\n ): Promise<void> {\n const options = { componentDir: this.componentDir, filePath: file.relative, initiator };\n const isFileSupported = this.compilerInstance.isFileSupported(file.path);\n let compileResults;\n if (isFileSupported) {\n try {\n compileResults = await this.compilerInstance.transpileFile?.(file.contents.toString(), options);\n } catch (error: any) {\n this.compileErrors.push({ path: file.path, error });\n return;\n }\n }\n for (const base of distDirs) {\n if (isFileSupported && compileResults) {\n this.dists.push(\n ...compileResults.map(\n (result) =>\n new Dist({\n base,\n path: path.join(base, result.outputPath),\n contents: Buffer.from(result.outputText),\n })\n )\n );\n } else if (this.compilerInstance.shouldCopyNonSupportedFiles) {\n // compiler doesn't support this file type. copy the file as is to the dist dir.\n this.dists.push(new Dist({ base, path: path.join(base, file.relative), contents: file.contents }));\n }\n }\n }\n\n private async compileAllFiles(initiator: CompilationInitiator, distDirs: string[]): Promise<void> {\n const filesToCompile: AbstractVinyl[] = [];\n for (const base of distDirs) {\n this.component.filesystem.files.forEach((file: AbstractVinyl) => {\n const isFileSupported = this.compilerInstance.isFileSupported(file.path);\n if (isFileSupported) {\n filesToCompile.push(file);\n } else if (this.compilerInstance.shouldCopyNonSupportedFiles) {\n // compiler doesn't support this file type. copy the file as is to the dist dir.\n this.dists.push(\n new Dist({\n base,\n path: path.join(base, file.relative),\n contents: file.contents,\n })\n );\n }\n });\n }\n\n if (filesToCompile.length) {\n try {\n await this.compilerInstance.transpileComponent?.({\n component: this.component,\n componentDir: this.componentDir,\n outputDir: await this.workspace.getComponentPackagePath(this.component),\n initiator,\n });\n // Copy compiled files to all other dist directories (injected dirs)\n await this.copyCompiledFilesToOtherDists();\n } catch (error: any) {\n this.compileErrors.push({ path: this.componentDir, error });\n }\n }\n }\n}\n\ntype TypeGeneratorParamsPerEnv = { envId: string; compParams: TypeGeneratorCompParams[]; typeCompiler: Compiler };\n\nexport class WorkspaceCompiler {\n private componentsBeingProcessedInOnAspectLoadFail = new Set<string>();\n\n constructor(\n private workspace: Workspace,\n private envs: EnvsMain,\n private pubsub: PubsubMain,\n private aspectLoader: AspectLoaderMain,\n private ui: UiMain,\n private logger: Logger,\n private dependencyResolver: DependencyResolverMain,\n private watcher: WatcherMain\n ) {\n if (this.workspace) {\n this.workspace.registerOnComponentChange(this.onComponentChange.bind(this));\n this.workspace.registerOnComponentAdd(this.onComponentAdd.bind(this));\n this.watcher.registerOnPreWatch(this.onPreWatch.bind(this));\n }\n this.ui.registerPreStart(this.onPreStart.bind(this));\n if (this.aspectLoader) {\n this.aspectLoader.registerOnAspectLoadErrorSlot(this.onAspectLoadFail.bind(this));\n }\n }\n\n async onPreStart(preStartOpts: PreStartOpts): Promise<void> {\n if (this.workspace) {\n if (preStartOpts.skipCompilation) {\n return;\n }\n await this.compileComponents([], {\n changed: true,\n verbose: false,\n deleteDistDir: false,\n initiator: CompilationInitiator.PreStart,\n });\n } else {\n await this.watcher.watchScopeInternalFiles();\n }\n }\n\n async onAspectLoadFail(err: Error & { code?: string }, component: Component): Promise<boolean> {\n if (\n ((err.code &&\n (err.code === 'MODULE_NOT_FOUND' || err.code === 'ERR_MODULE_NOT_FOUND' || err.code === 'ERR_REQUIRE_ESM')) ||\n err.message.includes('import.meta') ||\n err.message.includes('exports is not defined')) &&\n this.workspace\n ) {\n const inInstallContext = this.workspace.inInstallContext;\n const inInstallAfterPmContext = this.workspace.inInstallAfterPmContext;\n // If we are now running install we only want to compile after the package manager is done\n const shouldCompile = (inInstallContext && inInstallAfterPmContext) || !inInstallContext;\n if (shouldCompile) {\n const id = component.id;\n const idStr = id.toString();\n\n // Prevent infinite loop when there's a circular dependency between an env and a component.\n // If we're already processing this component, don't re-enter.\n if (this.componentsBeingProcessedInOnAspectLoadFail.has(idStr)) {\n this.logger.debug(\n `onAspectLoadFail: skipping ${idStr} as it's already being processed (preventing infinite loop)`\n );\n return false;\n }\n\n this.componentsBeingProcessedInOnAspectLoadFail.add(idStr);\n try {\n const { graph, successors } = await this.getEnvDepsGraph(id);\n // const deps = this.dependencyResolver.getDependencies(component);\n // const depsIds = deps.getComponentDependencies().map((dep) => {\n // return dep.id.toString();\n // });\n const depsIds = successors.map((s) => s.id);\n await this.compileComponents(\n [id.toString(), ...depsIds],\n { initiator: CompilationInitiator.AspectLoadFail },\n true,\n { loadExtensions: true, executeLoadSlot: true },\n graph\n );\n return true;\n } finally {\n this.componentsBeingProcessedInOnAspectLoadFail.delete(idStr);\n }\n }\n }\n return false;\n }\n\n async getEnvDepsGraph(envComponentId: ComponentID): Promise<{ graph: CompIdGraph; successors: { id: string }[] }> {\n const graph = await this.workspace.getGraphIds([envComponentId]);\n const successors = graph.successors(envComponentId.toString(), {\n nodeFilter: (node) => this.workspace.hasId(node.attr),\n });\n return { graph, successors };\n }\n\n async onComponentAdd(component: Component, files: string[], watchOpts: WatchOptions) {\n return this.onComponentChange(component, files, undefined, watchOpts);\n }\n\n async onComponentChange(\n component: Component,\n files: string[],\n removedFiles: string[] = [],\n watchOpts: WatchOptions\n ): Promise<SerializableResults | void> {\n if (!watchOpts.compile) return undefined;\n // when files are removed, we need to remove the dist directories and the old symlinks, otherwise, it has\n // symlinks to non-exist files and the dist has stale files\n const deleteDistDir = Boolean(removedFiles?.length);\n if (removedFiles?.length) {\n await removeLinksFromNodeModules(component, this.workspace, removedFiles);\n }\n const buildResults = await this.compileComponents(\n [component.id.toString()],\n {\n initiator: watchOpts.initiator || CompilationInitiator.ComponentChanged,\n deleteDistDir,\n generateTypes: watchOpts.generateTypes,\n },\n true\n );\n return {\n results: buildResults,\n toString() {\n return formatCompileResults(buildResults, watchOpts.verbose);\n },\n };\n }\n\n async onPreWatch(componentIds: ComponentID[], watchOpts: WatchOptions) {\n if (watchOpts.preCompile) {\n const start = Date.now();\n this.logger.console(`compiling ${componentIds.length} components`);\n await this.compileComponents(\n componentIds.map((id) => id),\n { initiator: CompilationInitiator.PreWatch, generateTypes: watchOpts.generateTypes }\n );\n const end = Date.now() - start;\n this.logger.consoleSuccess(`compiled ${componentIds.length} components successfully (${end / 1000} sec)`);\n }\n }\n\n async compileComponents(\n componentsIds: string[] | ComponentID[] | ComponentID[], // when empty, it compiles new+modified (unless options.all is set),\n options: CompileOptions,\n noThrow?: boolean,\n componentLoadOptions: WorkspaceComponentLoadOptions = {},\n graph?: CompIdGraph\n ): Promise<BuildResult[]> {\n if (!this.workspace) throw new OutsideWorkspaceError();\n const componentIds = await this.getIdsToCompile(componentsIds, options.changed);\n // In case the aspect failed to load, we want to compile it without try to re-load it again\n if (options.initiator === CompilationInitiator.AspectLoadFail) {\n componentLoadOptions.loadSeedersAsAspects = false;\n }\n let components = await this.workspace.getMany(componentIds, componentLoadOptions);\n await this.loadExternalEnvs(components);\n // reload components as we might cleared the cache as part of the loadExternalEnvs\n components = await this.workspace.getMany(componentIds, componentLoadOptions);\n const grouped = await this.buildGroupsToCompile(components, graph);\n\n const results = await mapSeries(grouped, async (group) => {\n return this.runCompileComponents(group.components, options, noThrow);\n });\n const linkComponents = options.linkComponents ?? true;\n if (linkComponents) {\n await linkToNodeModulesByComponents(components, this.workspace);\n }\n return results.flat();\n }\n\n /**\n * This will ensue that the envs of the components are loaded before the compilation starts.\n * @param components\n */\n private async loadExternalEnvs(components: Component[]) {\n const componentsIdsStr = components.map((c) => c.id.toString());\n const envIdsCompIdsMap = {};\n const compsWithWrongEnvId: string[] = [];\n await Promise.all(\n components.map(async (component) => {\n // It's important to use calculate here to get the real id even if it's not loaded\n const envId = (await this.envs.calculateEnvId(component)).toString();\n // This might be different from the env id above, because the component might be loaded before the env\n // in that case we will need to clear the cache of that component\n const envIdByGet = this.envs.getEnvId(component);\n if (envId !== envIdByGet) {\n compsWithWrongEnvId.push(component.id.toString());\n }\n // If it's part of the components it will be handled later as it's not external\n // and might need to be compiled as well\n if (componentsIdsStr.includes(envId)) return undefined;\n if (!envIdsCompIdsMap[envId]) envIdsCompIdsMap[envId] = [component.id.toString()];\n envIdsCompIdsMap[envId].push(component.id.toString());\n })\n );\n const externalEnvsIds = Object.keys(envIdsCompIdsMap);\n\n if (!externalEnvsIds.length) return;\n const nonLoadedEnvs = externalEnvsIds.filter((envId) => !this.envs.isEnvRegistered(envId));\n await this.workspace.loadAspects(nonLoadedEnvs);\n const idsToClearCache: string[] = uniq(\n nonLoadedEnvs\n .reduce((acc, envId) => {\n const compIds = envIdsCompIdsMap[envId];\n return [...acc, ...compIds];\n }, [] as string[])\n .concat(compsWithWrongEnvId)\n );\n this.workspace.clearComponentsCache(idsToClearCache.map((id) => ComponentID.fromString(id)));\n }\n\n private async runCompileComponents(\n components: Component[],\n options: CompileOptions,\n noThrow?: boolean\n ): Promise<BuildResult[]> {\n const componentsCompilers: ComponentCompiler[] = [];\n const skipped: BuildResult[] = [];\n\n components.forEach((c) => {\n const env = this.envs.getOrCalculateEnv(c);\n const environment = env.env;\n const compilerInstance = environment.getCompiler?.();\n\n if (compilerInstance) {\n const compilerName = compilerInstance.constructor.name || 'compiler';\n componentsCompilers.push(\n new ComponentCompiler(this.pubsub, this.workspace, c, compilerInstance, compilerName, this.logger, env)\n );\n } else {\n this.logger.warn(`unable to find a compiler instance for ${c.id.toString()}`);\n skipped.push({\n component: c.id.toString(),\n buildResults: [],\n errors: [],\n skipped: { reason: `the env \"${env.id}\" provides no compiler` },\n });\n }\n });\n\n const typeGeneratorParamsPerEnv = options.generateTypes\n ? await this.getTypesCompilerPerEnv(componentsCompilers)\n : undefined;\n\n if (typeGeneratorParamsPerEnv) {\n await this.preGenerateTypesOnWorkspace(typeGeneratorParamsPerEnv);\n }\n\n const resultOnWorkspace = await mapSeries(componentsCompilers, (componentCompiler) =>\n componentCompiler.compile(noThrow, options)\n );\n\n if (typeGeneratorParamsPerEnv) {\n await this.generateTypesOnWorkspace(typeGeneratorParamsPerEnv, componentsCompilers);\n }\n\n return [...resultOnWorkspace, ...skipped];\n }\n\n private async getTypesCompilerPerEnv(componentsCompilers: ComponentCompiler[]): Promise<TypeGeneratorParamsPerEnv[]> {\n const envsMap: { [envId: string]: ComponentCompiler[] } = {};\n componentsCompilers.forEach((componentCompiler) => {\n const envId = componentCompiler.env.id;\n if (!envsMap[envId]) envsMap[envId] = [];\n envsMap[envId].push(componentCompiler);\n });\n\n const results = await mapSeries(Object.keys(envsMap), async (envId) => {\n const componentCompilers = envsMap[envId];\n const compParams = await Promise.all(\n componentCompilers.map(async (componentCompiler) => {\n return {\n component: componentCompiler.component,\n packageDir: path.join(this.workspace.path, componentCompiler.getPackageDir()),\n };\n })\n );\n\n let typeCompiler = componentCompilers[0].compilerInstance;\n if (!typeCompiler.preGenerateTypesOnWorkspace) {\n const buildPipe = componentCompilers[0].env.env.getBuildPipe();\n const compilerTasks = buildPipe.filter((task) => task.aspectId === CompilerAspect.id);\n const tsTask = compilerTasks.find(\n (task) => task.compilerInstance && task.compilerInstance.displayName === 'TypeScript'\n );\n if (!tsTask) return;\n typeCompiler = tsTask.compilerInstance;\n if (!typeCompiler.preGenerateTypesOnWorkspace) return;\n }\n return { envId, compParams, typeCompiler };\n });\n return compact(results);\n }\n\n private async preGenerateTypesOnWorkspace(typesGeneratorParamsPerEnv: TypeGeneratorParamsPerEnv[]) {\n await mapSeries(typesGeneratorParamsPerEnv, async ({ envId, compParams, typeCompiler }) => {\n await typeCompiler.preGenerateTypesOnWorkspace!(compParams, envId);\n });\n }\n\n private async generateTypesOnWorkspace(\n typesGeneratorParamsPerEnv: TypeGeneratorParamsPerEnv[],\n componentsCompilers: ComponentCompiler[]\n ) {\n await mapSeries(typesGeneratorParamsPerEnv, async ({ compParams, typeCompiler }) => {\n await typeCompiler.generateTypesOnWorkspace!(path.join(this.workspace.path, 'node_modules'), compParams);\n });\n await Promise.all(componentsCompilers.map((componentCompiler) => componentCompiler.copyTypesToOtherDists()));\n }\n\n /**\n * This function groups the components to compile into groups by their environment and dependencies.\n * The order of the groups is important, the first group should be compiled first.\n * The order inside the group is not important.\n * The groups are:\n * 1. dependencies of envs of envs.\n * 2. envs of envs.\n * 3. dependencies of envs.\n * 4. envs.\n * 5. the rest.\n * @param ids\n */\n async buildGroupsToCompile(\n components: Component[],\n graph?: CompIdGraph\n ): Promise<\n Array<{\n components: Component[];\n envsOfEnvs?: boolean;\n envs?: boolean;\n depsOfEnvsOfEnvs?: boolean;\n depsOfEnvs?: boolean;\n other?: boolean;\n }>\n > {\n const envCompIds = await Promise.all(\n components\n // .map((component) => this.envs.getEnvId(component))\n .map(async (component) => {\n const envId = await this.envs.calculateEnvId(component);\n return envId.toString();\n })\n );\n const envsIds = uniq(envCompIds);\n const groupedByIsEnv = groupBy(components, (component) => {\n if (envsIds.includes(component.id.toString())) return 'envs';\n if (this.envs.isEnv(component)) return 'envs';\n return 'other';\n });\n const envsOfEnvsCompIds = await Promise.all(\n (groupedByIsEnv.envs || [])\n // .map((component) => this.envs.getEnvId(component))\n .map(async (component) => (await this.envs.calculateEnvId(component)).toString())\n );\n const groupedByEnvsOfEnvs = groupBy(groupedByIsEnv.envs, (component) => {\n if (envsOfEnvsCompIds.includes(component.id.toString())) return 'envsOfEnvs';\n return 'otherEnvs';\n });\n const envsOfEnvsWithoutCoreCompIds = envsOfEnvsCompIds.filter((id) => !this.envs.isCoreEnv(id));\n let depsOfEnvsOfEnvsCompIds: string[] = [];\n if (graph) {\n const subGraph = graph.successorsSubgraph(envsOfEnvsWithoutCoreCompIds, {\n nodeFilter: (node) => this.workspace.hasId(node.attr),\n });\n depsOfEnvsOfEnvsCompIds = subGraph.nodes.map((n) => n.id);\n } else {\n const depsOfEnvsOfEnvsCompLists = (groupedByEnvsOfEnvs.envsOfEnvs || []).map((envComp) =>\n this.dependencyResolver.getDependencies(envComp)\n );\n depsOfEnvsOfEnvsCompIds = DependencyList.merge(depsOfEnvsOfEnvsCompLists)\n .getComponentDependencies()\n .map((dep) => dep.id.toString());\n }\n const groupedByIsDepsOfEnvsOfEnvs = groupBy(groupedByIsEnv.other, (component) => {\n if (depsOfEnvsOfEnvsCompIds.includes(component.id.toString())) return 'depsOfEnvsOfEnvs';\n return 'other';\n });\n let depsOfEnvsOfCompIds: string[] = [];\n if (graph) {\n const otherEnvsIds = (groupedByEnvsOfEnvs.otherEnvs || []).map((c) => c.id.toString());\n if (otherEnvsIds.length) {\n const otherEnvsWithoutCoreIds = otherEnvsIds.filter((id) => !this.envs.isCoreEnv(id));\n const subGraph = graph.successorsSubgraph(otherEnvsWithoutCoreIds, {\n nodeFilter: (node) => this.workspace.hasId(node.attr),\n });\n depsOfEnvsOfCompIds = subGraph.nodes.map((n) => n.id);\n }\n } else {\n const depsOfEnvsCompLists = (groupedByEnvsOfEnvs.otherEnvs || []).map((envComp) =>\n this.dependencyResolver.getDependencies(envComp)\n );\n depsOfEnvsOfCompIds = DependencyList.merge(depsOfEnvsCompLists)\n .getComponentDependencies()\n .map((dep) => dep.id.toString());\n }\n const groupedByIsDepsOfEnvs = groupBy(groupedByIsDepsOfEnvsOfEnvs.other, (component) => {\n if (depsOfEnvsOfCompIds.includes(component.id.toString())) return 'depsOfEnvs';\n return 'other';\n });\n return [\n {\n components: groupedByIsDepsOfEnvsOfEnvs.depsOfEnvsOfEnvs || [],\n depsOfEnvsOfEnvs: true,\n },\n {\n components: groupedByEnvsOfEnvs.envsOfEnvs || [],\n envsOfEnvs: true,\n },\n {\n components: groupedByIsDepsOfEnvs.depsOfEnvs || [],\n depsOfEnvs: true,\n },\n {\n components: groupedByEnvsOfEnvs.otherEnvs || [],\n envs: true,\n },\n {\n components: groupedByIsDepsOfEnvs.other || [],\n other: true,\n },\n ];\n }\n\n private async getIdsToCompile(componentsIds: Array<string | ComponentID>, changed = false): Promise<ComponentID[]> {\n if (componentsIds.length) {\n const componentIds = await this.workspace.resolveMultipleComponentIds(componentsIds);\n return this.workspace.filterIds(componentIds);\n }\n if (changed) {\n return this.workspace.getNewAndModifiedIds();\n }\n return this.workspace.listIds();\n }\n}\n\nfunction formatCompileResults(buildResults: BuildResult[], verbose?: boolean) {\n // this gets called when a file is changed, so the buildResults array always has only one item\n const buildResult = buildResults.find((result) => !result.skipped);\n if (!buildResult) return '';\n const title = ` ${chalk.underline('STATUS\\tCOMPONENT ID')}`;\n const verboseComponentFilesArrayToString = () => {\n return buildResult.buildResults.map((filePath) => ` \\t - ${filePath}`).join('\\n');\n };\n\n return `${title}\n ${Logger.successSymbol()}SUCCESS\\t${buildResult.component}\\n\n ${verbose ? `${verboseComponentFilesArrayToString()}\\n` : ''}`;\n}\n"],"mappings":";;;;;;AACA,SAAAA,YAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,WAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAI,SAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,QAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAIA,SAAAK,WAAA;EAAA,MAAAL,IAAA,GAAAE,OAA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CAACkH,OAAO,CAAC;EAClE,IAAI,CAAC+D,WAAW,EAAE,OAAO,EAAE;EAC3B,MAAMC,KAAK,GAAG,IAAIC,gBAAK,CAACC,SAAS,CAAC,sBAAsB,CAAC,EAAE;EAC3D,MAAMC,kCAAkC,GAAGA,CAAA,KAAM;IAC/C,OAAOJ,WAAW,CAACnP,YAAY,CAACxB,GAAG,CAAEoF,QAAQ,IAAK,SAASA,QAAQ,EAAE,CAAC,CAAClD,IAAI,CAAC,IAAI,CAAC;EACnF,CAAC;EAED,OAAO,GAAG0O,KAAK;AACjB,IAAII,gBAAM,CAACC,aAAa,CAAC,CAAC,YAAYN,WAAW,CAACtS,SAAS;AAC3D,IAAIoJ,OAAO,GAAG,GAAGsJ,kCAAkC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE;AAChE","ignoreList":[]}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@teambit/compiler",
3
- "version": "1.0.1097",
3
+ "version": "1.0.1099",
4
4
  "homepage": "https://bit.cloud/teambit/compilation/compiler",
5
5
  "main": "dist/index.js",
6
6
  "componentId": {
7
7
  "scope": "teambit.compilation",
8
8
  "name": "compiler",
9
- "version": "1.0.1097"
9
+ "version": "1.0.1099"
10
10
  },
11
11
  "dependencies": {
12
12
  "pretty-time": "1.1.0",
@@ -17,33 +17,33 @@
17
17
  "lodash": "4.17.21",
18
18
  "p-map-series": "2.1.0",
19
19
  "@teambit/harmony": "0.4.12",
20
+ "@teambit/cli": "0.0.1364",
21
+ "@teambit/logger": "0.0.1457",
20
22
  "@teambit/component-id": "1.2.4",
21
23
  "@teambit/component-issues": "0.0.183",
24
+ "@teambit/legacy.constants": "0.0.41",
22
25
  "@teambit/toolbox.fs.hard-link-directory": "0.0.37",
26
+ "@teambit/component.sources": "0.0.197",
23
27
  "@teambit/toolbox.path.path": "0.0.21",
28
+ "@teambit/pkg.modules.component-package-name": "0.0.152",
29
+ "@teambit/workspace.modules.node-modules-linker": "0.0.376",
24
30
  "@teambit/workspace.root-components": "1.0.1",
25
31
  "@teambit/bit-error": "0.0.404",
26
- "@teambit/envs": "1.0.1097",
27
- "@teambit/cli": "0.0.1364",
28
- "@teambit/logger": "0.0.1457",
29
- "@teambit/pubsub": "1.0.1097",
30
- "@teambit/aspect-loader": "1.0.1097",
31
- "@teambit/builder": "1.0.1097",
32
- "@teambit/bundler": "1.0.1097",
33
- "@teambit/component": "1.0.1097",
34
- "@teambit/dependency-resolver": "1.0.1097",
35
- "@teambit/generator": "1.0.1098",
36
- "@teambit/issues": "1.0.1097",
37
- "@teambit/legacy.constants": "0.0.41",
38
- "@teambit/ui": "1.0.1097",
39
- "@teambit/watcher": "1.0.1097",
40
- "@teambit/workspace": "1.0.1097",
41
- "@teambit/isolator": "1.0.1097",
42
- "@teambit/component.sources": "0.0.197",
43
- "@teambit/graph": "1.0.1097",
44
- "@teambit/multi-compiler": "1.0.1097",
45
- "@teambit/pkg.modules.component-package-name": "0.0.152",
46
- "@teambit/workspace.modules.node-modules-linker": "0.0.376"
32
+ "@teambit/envs": "1.0.1099",
33
+ "@teambit/pubsub": "1.0.1099",
34
+ "@teambit/aspect-loader": "1.0.1099",
35
+ "@teambit/builder": "1.0.1099",
36
+ "@teambit/bundler": "1.0.1099",
37
+ "@teambit/component": "1.0.1099",
38
+ "@teambit/dependency-resolver": "1.0.1099",
39
+ "@teambit/generator": "1.0.1100",
40
+ "@teambit/issues": "1.0.1099",
41
+ "@teambit/ui": "1.0.1099",
42
+ "@teambit/watcher": "1.0.1099",
43
+ "@teambit/workspace": "1.0.1099",
44
+ "@teambit/isolator": "1.0.1099",
45
+ "@teambit/graph": "1.0.1099",
46
+ "@teambit/multi-compiler": "1.0.1099"
47
47
  },
48
48
  "devDependencies": {
49
49
  "@types/pretty-time": "^1.1.5",