@teambit/compiler 1.0.1074 → 1.0.1076
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.
|
@@ -47,12 +47,14 @@ export declare class CompilerMain {
|
|
|
47
47
|
* find the compiler configured on the workspace and ask for the dist folder path.
|
|
48
48
|
*/
|
|
49
49
|
getRelativeDistFolder(component: Component): string;
|
|
50
|
+
private getDistDirOfCompiler;
|
|
50
51
|
/**
|
|
51
52
|
* Check if the dist folder (in the component package under node_modules) exist
|
|
52
53
|
* @param component
|
|
54
|
+
* @param precomputedCompiler pass when the compiler was already resolved, to avoid resolving the env again
|
|
53
55
|
* @returns
|
|
54
56
|
*/
|
|
55
|
-
isDistDirExists(component: Component): Promise<boolean>;
|
|
57
|
+
isDistDirExists(component: Component, precomputedCompiler?: Compiler): Promise<boolean>;
|
|
56
58
|
getDistsFiles(component: Component): Promise<DistArtifact>;
|
|
57
59
|
addMissingDistsIssue(components: Component[], issuesToIgnore: string[]): Promise<void>;
|
|
58
60
|
static runtime: import("@teambit/harmony").RuntimeDefinition;
|
|
@@ -238,7 +238,9 @@ class CompilerMain {
|
|
|
238
238
|
*/
|
|
239
239
|
getRelativeDistFolder(component) {
|
|
240
240
|
const environment = this.envs.getOrCalculateEnv(component).env;
|
|
241
|
-
|
|
241
|
+
return this.getDistDirOfCompiler(environment.getCompiler?.());
|
|
242
|
+
}
|
|
243
|
+
getDistDirOfCompiler(compilerInstance) {
|
|
242
244
|
if (!compilerInstance || !compilerInstance.getDistDir) return _legacy().DEFAULT_DIST_DIRNAME;
|
|
243
245
|
return compilerInstance.getDistDir();
|
|
244
246
|
}
|
|
@@ -246,13 +248,14 @@ class CompilerMain {
|
|
|
246
248
|
/**
|
|
247
249
|
* Check if the dist folder (in the component package under node_modules) exist
|
|
248
250
|
* @param component
|
|
251
|
+
* @param precomputedCompiler pass when the compiler was already resolved, to avoid resolving the env again
|
|
249
252
|
* @returns
|
|
250
253
|
*/
|
|
251
|
-
async isDistDirExists(component) {
|
|
254
|
+
async isDistDirExists(component, precomputedCompiler) {
|
|
252
255
|
const packageDir = await this.workspace.getComponentPackagePath(component);
|
|
253
|
-
const distDir = this.getRelativeDistFolder(component);
|
|
256
|
+
const distDir = precomputedCompiler ? this.getDistDirOfCompiler(precomputedCompiler) : this.getRelativeDistFolder(component);
|
|
254
257
|
const pathToCheck = path().join(packageDir, distDir);
|
|
255
|
-
return _fsExtra().default.
|
|
258
|
+
return _fsExtra().default.pathExists(pathToCheck);
|
|
256
259
|
}
|
|
257
260
|
async getDistsFiles(component) {
|
|
258
261
|
const artifacts = await this.builder.getArtifactsVinylByAspect(component, _compiler().CompilerAspect.id);
|
|
@@ -262,7 +265,13 @@ class CompilerMain {
|
|
|
262
265
|
async addMissingDistsIssue(components, issuesToIgnore) {
|
|
263
266
|
if (issuesToIgnore.includes(_componentIssues().IssuesClasses.MissingDists.name)) return;
|
|
264
267
|
await Promise.all(components.map(async component => {
|
|
265
|
-
const
|
|
268
|
+
const environment = this.envs.getOrCalculateEnv(component).env;
|
|
269
|
+
// an env without a compiler has no dists - the component is consumed as-source, and
|
|
270
|
+
// "bit compile" would not produce anything. getCompiler may also be implemented but
|
|
271
|
+
// return undefined.
|
|
272
|
+
const compilerInstance = environment.getCompiler?.();
|
|
273
|
+
if (!compilerInstance) return;
|
|
274
|
+
const exist = await this.isDistDirExists(component, compilerInstance);
|
|
266
275
|
if (!exist) {
|
|
267
276
|
component.state.issues.getOrCreate(_componentIssues().IssuesClasses.MissingDists).data = true;
|
|
268
277
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["path","data","_interopRequireWildcard","require","_fsExtra","_interopRequireDefault","_aspectLoader","_builder","_cli","_componentIssues","_issues","_legacy","_watcher","_envs","_dependencyResolver","_logger","_generator","_pubsub","_ui","_workspace","_bundler","_compiler","_compiler2","_compiler3","_compiler4","_distArtifact","_exceptions","_types","_workspaceCompiler","_compiler5","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","CompilerMain","constructor","pubsub","workspaceCompiler","envs","builder","workspace","dependencyResolver","compilerService","getCompiler","context","compileOnWorkspace","componentsIds","options","initiator","CompilationInitiator","ComponentAdded","noThrow","componentLoadOptions","compileComponents","createTask","name","compiler","CompilerTask","CompilerAspect","id","getDistPathBySrcPath","component","srcPath","environment","getEnv","env","compilerInstance","getRelativeDistFolder","getOrCalculateEnv","getDistDir","DEFAULT_DIST_DIRNAME","isDistDirExists","packageDir","getComponentPackagePath","distDir","pathToCheck","join","fs","existsSync","getDistsFiles","artifacts","getArtifactsVinylByAspect","length","DistArtifactNotFound","DistArtifact","addMissingDistsIssue","components","issuesToIgnore","includes","IssuesClasses","MissingDists","Promise","all","map","exist","state","issues","getOrCreate","provider","cli","loggerMain","aspectLoader","ui","generator","watcher","bundler","logger","createLogger","CompilerService","WorkspaceCompiler","registerService","compilerMain","register","CompileCmd","registerAddComponentsIssues","bind","registerComponentTemplate","compilerTemplate","registerOnPreDevServerCreated","newCompsWithoutDevServer","debug","c","toString","PreDevServer","exports","MainRuntime","CLIAspect","WorkspaceAspect","EnvsAspect","LoggerAspect","PubsubAspect","AspectLoaderAspect","BuilderAspect","UIAspect","GeneratorAspect","DependencyResolverAspect","WatcherAspect","IssuesAspect","BundlerAspect","addRuntime","_default"],"sources":["compiler.main.runtime.ts"],"sourcesContent":["import * as path from 'path';\nimport fs from 'fs-extra';\nimport type { AspectLoaderMain } from '@teambit/aspect-loader';\nimport { AspectLoaderAspect } from '@teambit/aspect-loader';\nimport type { BuilderMain } from '@teambit/builder';\nimport { BuilderAspect } from '@teambit/builder';\nimport type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { IssuesMain } from '@teambit/issues';\nimport { IssuesAspect } from '@teambit/issues';\nimport type { Component } from '@teambit/component';\nimport { DEFAULT_DIST_DIRNAME } from '@teambit/legacy.constants';\nimport type { WatcherMain } from '@teambit/watcher';\nimport { WatcherAspect } from '@teambit/watcher';\nimport type { EnvsMain, ExecutionContext } from '@teambit/envs';\nimport { EnvsAspect } from '@teambit/envs';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } from '@teambit/dependency-resolver';\nimport type { LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { GeneratorMain } from '@teambit/generator';\nimport { GeneratorAspect } from '@teambit/generator';\nimport type { PubsubMain } from '@teambit/pubsub';\nimport { PubsubAspect } from '@teambit/pubsub';\nimport type { UiMain } from '@teambit/ui';\nimport { UIAspect } from '@teambit/ui';\nimport type { Workspace, WorkspaceComponentLoadOptions } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport type { BundlerMain } from '@teambit/bundler';\nimport { BundlerAspect } from '@teambit/bundler';\nimport { CompilerAspect } from './compiler.aspect';\nimport { CompileCmd } from './compiler.cmd';\nimport { CompilerService } from './compiler.service';\nimport { CompilerTask } from './compiler.task';\nimport { DistArtifact } from './dist-artifact';\nimport { DistArtifactNotFound } from './exceptions';\nimport type { Compiler } from './types';\nimport { CompilationInitiator } from './types';\nimport type { CompileOptions } from './workspace-compiler';\nimport { WorkspaceCompiler } from './workspace-compiler';\nimport { compilerTemplate } from './templates/compiler';\n\nexport class CompilerMain {\n constructor(\n private pubsub: PubsubMain,\n private workspaceCompiler: WorkspaceCompiler,\n private envs: EnvsMain,\n private builder: BuilderMain,\n private workspace: Workspace,\n private dependencyResolver: DependencyResolverMain,\n private compilerService: CompilerService\n ) {}\n\n getCompiler(context: ExecutionContext): Compiler | undefined {\n return this.compilerService.getCompiler(context);\n }\n\n /**\n * Run compilation on `bit new` and when new components are imported\n */\n compileOnWorkspace(\n componentsIds: string[] | ComponentID[] | ComponentID[] = [], // when empty, it compiles all\n options: CompileOptions = { initiator: CompilationInitiator.ComponentAdded },\n noThrow?: boolean,\n componentLoadOptions: WorkspaceComponentLoadOptions = {}\n ) {\n return this.workspaceCompiler.compileComponents(componentsIds, options, noThrow, componentLoadOptions);\n }\n /**\n * API to create a new compiler task, it facilitates the usage of multiple compilers.\n * with this method you can create any number of compilers and add them to the buildPipeline.\n */\n createTask(name: string, compiler: Compiler): CompilerTask {\n return new CompilerTask(CompilerAspect.id, name, compiler, this.dependencyResolver);\n }\n\n /**\n * find the compiler configured on the workspace and ask for the dist path.\n */\n getDistPathBySrcPath(component: Component, srcPath: string): string | null {\n const environment = this.envs.getEnv(component).env;\n const compilerInstance = environment.getCompiler?.();\n if (!compilerInstance) return null;\n return compilerInstance.getDistPathBySrcPath(srcPath);\n }\n\n /**\n * find the compiler configured on the workspace and ask for the dist folder path.\n */\n getRelativeDistFolder(component: Component): string {\n const environment = this.envs.getOrCalculateEnv(component).env;\n const compilerInstance: Compiler | undefined = environment.getCompiler?.();\n if (!compilerInstance || !compilerInstance.getDistDir) return DEFAULT_DIST_DIRNAME;\n return compilerInstance.getDistDir();\n }\n\n /**\n * Check if the dist folder (in the component package under node_modules) exist\n * @param component\n * @returns\n */\n async isDistDirExists(component: Component): Promise<boolean> {\n const packageDir = await this.workspace.getComponentPackagePath(component);\n const distDir = this.getRelativeDistFolder(component);\n const pathToCheck = path.join(packageDir, distDir);\n return fs.existsSync(pathToCheck);\n }\n\n async getDistsFiles(component: Component): Promise<DistArtifact> {\n const artifacts = await this.builder.getArtifactsVinylByAspect(component, CompilerAspect.id);\n if (!artifacts.length) throw new DistArtifactNotFound(component.id);\n\n return new DistArtifact(artifacts);\n }\n\n async addMissingDistsIssue(components: Component[], issuesToIgnore: string[]): Promise<void> {\n if (issuesToIgnore.includes(IssuesClasses.MissingDists.name)) return;\n await Promise.all(\n components.map(async (component) => {\n const exist = await this.isDistDirExists(component);\n if (!exist) {\n component.state.issues.getOrCreate(IssuesClasses.MissingDists).data = true;\n }\n })\n );\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n EnvsAspect,\n LoggerAspect,\n PubsubAspect,\n AspectLoaderAspect,\n BuilderAspect,\n UIAspect,\n GeneratorAspect,\n DependencyResolverAspect,\n WatcherAspect,\n IssuesAspect,\n BundlerAspect,\n ];\n\n static async provider([\n cli,\n workspace,\n envs,\n loggerMain,\n pubsub,\n aspectLoader,\n builder,\n ui,\n generator,\n dependencyResolver,\n watcher,\n issues,\n bundler,\n ]: [\n CLIMain,\n Workspace,\n EnvsMain,\n LoggerMain,\n PubsubMain,\n AspectLoaderMain,\n BuilderMain,\n UiMain,\n GeneratorMain,\n DependencyResolverMain,\n WatcherMain,\n IssuesMain,\n BundlerMain,\n ]) {\n const logger = loggerMain.createLogger(CompilerAspect.id);\n const compilerService = new CompilerService();\n\n const workspaceCompiler = new WorkspaceCompiler(\n workspace,\n envs,\n pubsub,\n aspectLoader,\n ui,\n logger,\n dependencyResolver,\n watcher\n );\n envs.registerService(compilerService);\n const compilerMain = new CompilerMain(\n pubsub,\n workspaceCompiler,\n envs,\n builder,\n workspace,\n dependencyResolver,\n compilerService\n );\n cli.register(new CompileCmd(workspaceCompiler, logger, pubsub));\n if (issues) {\n issues.registerAddComponentsIssues(compilerMain.addMissingDistsIssue.bind(compilerMain));\n }\n if (generator) generator.registerComponentTemplate([compilerTemplate]);\n\n bundler.registerOnPreDevServerCreated(async (newCompsWithoutDevServer) => {\n logger.debug(\n `Compiling ${newCompsWithoutDevServer.length} components: ${newCompsWithoutDevServer.map((c) => c.id.toString()).join(', ')} before dev server creation`\n );\n await compilerMain.compileOnWorkspace(\n newCompsWithoutDevServer.map((c) => c.id),\n { initiator: CompilationInitiator.PreDevServer }\n );\n });\n\n return compilerMain;\n }\n}\n\nCompilerAspect.addRuntime(CompilerMain);\n\nexport default CompilerMain;\n"],"mappings":";;;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AACzG,YAAY,CAAC;AAAC,IAAA0G,QAAA,GAAAhB,OAAA,CAAAvH,OAAA,GAEzB6B,YAAY","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["path","data","_interopRequireWildcard","require","_fsExtra","_interopRequireDefault","_aspectLoader","_builder","_cli","_componentIssues","_issues","_legacy","_watcher","_envs","_dependencyResolver","_logger","_generator","_pubsub","_ui","_workspace","_bundler","_compiler","_compiler2","_compiler3","_compiler4","_distArtifact","_exceptions","_types","_workspaceCompiler","_compiler5","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_defineProperty","_toPropertyKey","value","enumerable","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","CompilerMain","constructor","pubsub","workspaceCompiler","envs","builder","workspace","dependencyResolver","compilerService","getCompiler","context","compileOnWorkspace","componentsIds","options","initiator","CompilationInitiator","ComponentAdded","noThrow","componentLoadOptions","compileComponents","createTask","name","compiler","CompilerTask","CompilerAspect","id","getDistPathBySrcPath","component","srcPath","environment","getEnv","env","compilerInstance","getRelativeDistFolder","getOrCalculateEnv","getDistDirOfCompiler","getDistDir","DEFAULT_DIST_DIRNAME","isDistDirExists","precomputedCompiler","packageDir","getComponentPackagePath","distDir","pathToCheck","join","fs","pathExists","getDistsFiles","artifacts","getArtifactsVinylByAspect","length","DistArtifactNotFound","DistArtifact","addMissingDistsIssue","components","issuesToIgnore","includes","IssuesClasses","MissingDists","Promise","all","map","exist","state","issues","getOrCreate","provider","cli","loggerMain","aspectLoader","ui","generator","watcher","bundler","logger","createLogger","CompilerService","WorkspaceCompiler","registerService","compilerMain","register","CompileCmd","registerAddComponentsIssues","bind","registerComponentTemplate","compilerTemplate","registerOnPreDevServerCreated","newCompsWithoutDevServer","debug","c","toString","PreDevServer","exports","MainRuntime","CLIAspect","WorkspaceAspect","EnvsAspect","LoggerAspect","PubsubAspect","AspectLoaderAspect","BuilderAspect","UIAspect","GeneratorAspect","DependencyResolverAspect","WatcherAspect","IssuesAspect","BundlerAspect","addRuntime","_default"],"sources":["compiler.main.runtime.ts"],"sourcesContent":["import * as path from 'path';\nimport fs from 'fs-extra';\nimport type { AspectLoaderMain } from '@teambit/aspect-loader';\nimport { AspectLoaderAspect } from '@teambit/aspect-loader';\nimport type { BuilderMain } from '@teambit/builder';\nimport { BuilderAspect } from '@teambit/builder';\nimport type { CLIMain } from '@teambit/cli';\nimport { CLIAspect, MainRuntime } from '@teambit/cli';\nimport { IssuesClasses } from '@teambit/component-issues';\nimport type { IssuesMain } from '@teambit/issues';\nimport { IssuesAspect } from '@teambit/issues';\nimport type { Component } from '@teambit/component';\nimport { DEFAULT_DIST_DIRNAME } from '@teambit/legacy.constants';\nimport type { WatcherMain } from '@teambit/watcher';\nimport { WatcherAspect } from '@teambit/watcher';\nimport type { EnvsMain, ExecutionContext } from '@teambit/envs';\nimport { EnvsAspect } from '@teambit/envs';\nimport type { ComponentID } from '@teambit/component-id';\nimport type { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport { DependencyResolverAspect } from '@teambit/dependency-resolver';\nimport type { LoggerMain } from '@teambit/logger';\nimport { LoggerAspect } from '@teambit/logger';\nimport type { GeneratorMain } from '@teambit/generator';\nimport { GeneratorAspect } from '@teambit/generator';\nimport type { PubsubMain } from '@teambit/pubsub';\nimport { PubsubAspect } from '@teambit/pubsub';\nimport type { UiMain } from '@teambit/ui';\nimport { UIAspect } from '@teambit/ui';\nimport type { Workspace, WorkspaceComponentLoadOptions } from '@teambit/workspace';\nimport { WorkspaceAspect } from '@teambit/workspace';\nimport type { BundlerMain } from '@teambit/bundler';\nimport { BundlerAspect } from '@teambit/bundler';\nimport { CompilerAspect } from './compiler.aspect';\nimport { CompileCmd } from './compiler.cmd';\nimport { CompilerService } from './compiler.service';\nimport { CompilerTask } from './compiler.task';\nimport { DistArtifact } from './dist-artifact';\nimport { DistArtifactNotFound } from './exceptions';\nimport type { Compiler } from './types';\nimport { CompilationInitiator } from './types';\nimport type { CompileOptions } from './workspace-compiler';\nimport { WorkspaceCompiler } from './workspace-compiler';\nimport { compilerTemplate } from './templates/compiler';\n\nexport class CompilerMain {\n constructor(\n private pubsub: PubsubMain,\n private workspaceCompiler: WorkspaceCompiler,\n private envs: EnvsMain,\n private builder: BuilderMain,\n private workspace: Workspace,\n private dependencyResolver: DependencyResolverMain,\n private compilerService: CompilerService\n ) {}\n\n getCompiler(context: ExecutionContext): Compiler | undefined {\n return this.compilerService.getCompiler(context);\n }\n\n /**\n * Run compilation on `bit new` and when new components are imported\n */\n compileOnWorkspace(\n componentsIds: string[] | ComponentID[] | ComponentID[] = [], // when empty, it compiles all\n options: CompileOptions = { initiator: CompilationInitiator.ComponentAdded },\n noThrow?: boolean,\n componentLoadOptions: WorkspaceComponentLoadOptions = {}\n ) {\n return this.workspaceCompiler.compileComponents(componentsIds, options, noThrow, componentLoadOptions);\n }\n /**\n * API to create a new compiler task, it facilitates the usage of multiple compilers.\n * with this method you can create any number of compilers and add them to the buildPipeline.\n */\n createTask(name: string, compiler: Compiler): CompilerTask {\n return new CompilerTask(CompilerAspect.id, name, compiler, this.dependencyResolver);\n }\n\n /**\n * find the compiler configured on the workspace and ask for the dist path.\n */\n getDistPathBySrcPath(component: Component, srcPath: string): string | null {\n const environment = this.envs.getEnv(component).env;\n const compilerInstance = environment.getCompiler?.();\n if (!compilerInstance) return null;\n return compilerInstance.getDistPathBySrcPath(srcPath);\n }\n\n /**\n * find the compiler configured on the workspace and ask for the dist folder path.\n */\n getRelativeDistFolder(component: Component): string {\n const environment = this.envs.getOrCalculateEnv(component).env;\n return this.getDistDirOfCompiler(environment.getCompiler?.());\n }\n\n private getDistDirOfCompiler(compilerInstance: Compiler | undefined): string {\n if (!compilerInstance || !compilerInstance.getDistDir) return DEFAULT_DIST_DIRNAME;\n return compilerInstance.getDistDir();\n }\n\n /**\n * Check if the dist folder (in the component package under node_modules) exist\n * @param component\n * @param precomputedCompiler pass when the compiler was already resolved, to avoid resolving the env again\n * @returns\n */\n async isDistDirExists(component: Component, precomputedCompiler?: Compiler): Promise<boolean> {\n const packageDir = await this.workspace.getComponentPackagePath(component);\n const distDir = precomputedCompiler\n ? this.getDistDirOfCompiler(precomputedCompiler)\n : this.getRelativeDistFolder(component);\n const pathToCheck = path.join(packageDir, distDir);\n return fs.pathExists(pathToCheck);\n }\n\n async getDistsFiles(component: Component): Promise<DistArtifact> {\n const artifacts = await this.builder.getArtifactsVinylByAspect(component, CompilerAspect.id);\n if (!artifacts.length) throw new DistArtifactNotFound(component.id);\n\n return new DistArtifact(artifacts);\n }\n\n async addMissingDistsIssue(components: Component[], issuesToIgnore: string[]): Promise<void> {\n if (issuesToIgnore.includes(IssuesClasses.MissingDists.name)) return;\n await Promise.all(\n components.map(async (component) => {\n const environment = this.envs.getOrCalculateEnv(component).env;\n // an env without a compiler has no dists - the component is consumed as-source, and\n // \"bit compile\" would not produce anything. getCompiler may also be implemented but\n // return undefined.\n const compilerInstance: Compiler | undefined = environment.getCompiler?.();\n if (!compilerInstance) return;\n const exist = await this.isDistDirExists(component, compilerInstance);\n if (!exist) {\n component.state.issues.getOrCreate(IssuesClasses.MissingDists).data = true;\n }\n })\n );\n }\n\n static runtime = MainRuntime;\n\n static dependencies = [\n CLIAspect,\n WorkspaceAspect,\n EnvsAspect,\n LoggerAspect,\n PubsubAspect,\n AspectLoaderAspect,\n BuilderAspect,\n UIAspect,\n GeneratorAspect,\n DependencyResolverAspect,\n WatcherAspect,\n IssuesAspect,\n BundlerAspect,\n ];\n\n static async provider([\n cli,\n workspace,\n envs,\n loggerMain,\n pubsub,\n aspectLoader,\n builder,\n ui,\n generator,\n dependencyResolver,\n watcher,\n issues,\n bundler,\n ]: [\n CLIMain,\n Workspace,\n EnvsMain,\n LoggerMain,\n PubsubMain,\n AspectLoaderMain,\n BuilderMain,\n UiMain,\n GeneratorMain,\n DependencyResolverMain,\n WatcherMain,\n IssuesMain,\n BundlerMain,\n ]) {\n const logger = loggerMain.createLogger(CompilerAspect.id);\n const compilerService = new CompilerService();\n\n const workspaceCompiler = new WorkspaceCompiler(\n workspace,\n envs,\n pubsub,\n aspectLoader,\n ui,\n logger,\n dependencyResolver,\n watcher\n );\n envs.registerService(compilerService);\n const compilerMain = new CompilerMain(\n pubsub,\n workspaceCompiler,\n envs,\n builder,\n workspace,\n dependencyResolver,\n compilerService\n );\n cli.register(new CompileCmd(workspaceCompiler, logger, pubsub));\n if (issues) {\n issues.registerAddComponentsIssues(compilerMain.addMissingDistsIssue.bind(compilerMain));\n }\n if (generator) generator.registerComponentTemplate([compilerTemplate]);\n\n bundler.registerOnPreDevServerCreated(async (newCompsWithoutDevServer) => {\n logger.debug(\n `Compiling ${newCompsWithoutDevServer.length} components: ${newCompsWithoutDevServer.map((c) => c.id.toString()).join(', ')} before dev server creation`\n );\n await compilerMain.compileOnWorkspace(\n newCompsWithoutDevServer.map((c) => c.id),\n { initiator: CompilationInitiator.PreDevServer }\n );\n });\n\n return compilerMain;\n }\n}\n\nCompilerAspect.addRuntime(CompilerMain);\n\nexport default CompilerMain;\n"],"mappings":";;;;;;AAAA,SAAAA,KAAA;EAAA,MAAAC,IAAA,GAAAC,uBAAA,CAAAC,OAAA;EAAAH,IAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,SAAA;EAAA,MAAAH,IAAA,GAAAI,sBAAA,CAAAF,OAAA;EAAAC,QAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAK,cAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,aAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAM,SAAA;EAAA,MAAAN,IAAA,GAAAE,OAAA;EAAAI,QAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;A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compilation_compiler@1.0.
|
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.
|
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.1076/dist/compiler.composition.js';
|
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_compiler@1.0.1076/dist/compiler.docs.mdx';
|
|
3
3
|
|
|
4
4
|
export const compositions = [compositions_0];
|
|
5
5
|
export const overview = [overview_0];
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teambit/compiler",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1076",
|
|
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.
|
|
9
|
+
"version": "1.0.1076"
|
|
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/component-id": "1.2.4",
|
|
21
|
-
"@teambit/toolbox.path.path": "0.0.19",
|
|
22
|
-
"@teambit/workspace.root-components": "1.0.1",
|
|
23
|
-
"@teambit/bit-error": "0.0.404",
|
|
24
|
-
"@teambit/envs": "1.0.1074",
|
|
25
20
|
"@teambit/cli": "0.0.1354",
|
|
26
21
|
"@teambit/logger": "0.0.1447",
|
|
27
|
-
"@teambit/
|
|
28
|
-
"@teambit/aspect-loader": "1.0.1074",
|
|
29
|
-
"@teambit/builder": "1.0.1074",
|
|
30
|
-
"@teambit/bundler": "1.0.1074",
|
|
22
|
+
"@teambit/component-id": "1.2.4",
|
|
31
23
|
"@teambit/component-issues": "0.0.178",
|
|
32
|
-
"@teambit/component": "1.0.1074",
|
|
33
|
-
"@teambit/dependency-resolver": "1.0.1074",
|
|
34
|
-
"@teambit/generator": "1.0.1075",
|
|
35
|
-
"@teambit/issues": "1.0.1074",
|
|
36
24
|
"@teambit/legacy.constants": "0.0.35",
|
|
37
|
-
"@teambit/ui": "1.0.1074",
|
|
38
|
-
"@teambit/watcher": "1.0.1074",
|
|
39
|
-
"@teambit/workspace": "1.0.1074",
|
|
40
|
-
"@teambit/isolator": "1.0.1074",
|
|
41
25
|
"@teambit/toolbox.fs.hard-link-directory": "0.0.32",
|
|
42
26
|
"@teambit/component.sources": "0.0.190",
|
|
43
|
-
"@teambit/
|
|
44
|
-
"@teambit/multi-compiler": "1.0.1074",
|
|
27
|
+
"@teambit/toolbox.path.path": "0.0.19",
|
|
45
28
|
"@teambit/pkg.modules.component-package-name": "0.0.145",
|
|
46
|
-
"@teambit/workspace.modules.node-modules-linker": "0.0.369"
|
|
29
|
+
"@teambit/workspace.modules.node-modules-linker": "0.0.369",
|
|
30
|
+
"@teambit/workspace.root-components": "1.0.1",
|
|
31
|
+
"@teambit/bit-error": "0.0.404",
|
|
32
|
+
"@teambit/envs": "1.0.1076",
|
|
33
|
+
"@teambit/pubsub": "1.0.1076",
|
|
34
|
+
"@teambit/aspect-loader": "1.0.1076",
|
|
35
|
+
"@teambit/builder": "1.0.1076",
|
|
36
|
+
"@teambit/bundler": "1.0.1076",
|
|
37
|
+
"@teambit/component": "1.0.1076",
|
|
38
|
+
"@teambit/dependency-resolver": "1.0.1076",
|
|
39
|
+
"@teambit/generator": "1.0.1077",
|
|
40
|
+
"@teambit/issues": "1.0.1076",
|
|
41
|
+
"@teambit/ui": "1.0.1076",
|
|
42
|
+
"@teambit/watcher": "1.0.1076",
|
|
43
|
+
"@teambit/workspace": "1.0.1076",
|
|
44
|
+
"@teambit/isolator": "1.0.1076",
|
|
45
|
+
"@teambit/graph": "1.0.1076",
|
|
46
|
+
"@teambit/multi-compiler": "1.0.1076"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@types/pretty-time": "^1.1.5",
|