@teambit/bundler 1.0.447 → 1.0.448
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/artifacts/__bit_junit.xml +1 -1
- package/artifacts/preview/teambit_compilation_bundler-preview.js +1 -1
- package/artifacts/schema.json +406 -290
- package/dist/bundler-context.d.ts +3 -0
- package/dist/bundler-context.js.map +1 -1
- package/dist/dev-server.service.js +10 -1
- package/dist/dev-server.service.js.map +1 -1
- package/dist/{preview-1729999303301.js → preview-1730330697064.js} +2 -2
- package/package.json +10 -10
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":[],"sources":["bundler-context.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { BuildContext } from '@teambit/builder';\n\nexport type LibraryOptions = {\n /**\n * Specify a name for the library\n */\n name: string;\n // TODO: decide which exact types we want to support and their exact names\n /**\n * Configure how the library will be exposed\n * could be values like: 'umd', 'umd2', 'amd', 'commonjs',\n */\n type?: string;\n};\n\nexport type Entry = {\n /**\n * Specifies the name of each output file on disk\n */\n filename: string;\n /**\n * Module(s) that are loaded upon startup\n */\n import: string | string[];\n\n /**\n * Specify library options to bundle a library from current entry\n */\n library?: LibraryOptions;\n};\n\nexport type EntryMap = {\n [entryName: string]: Entry;\n};\n\nexport type Target = {\n /**\n * entries of the target.\n */\n entries: string[] | EntryMap;\n\n /**\n * array of components included in the target.\n */\n components: Component[];\n\n /**\n * output path of the target\n */\n outputPath: string;\n\n /**\n * This option determines the name of each output bundle\n */\n filename?: string;\n\n /**\n * This option determines the name of non-initial chunk files\n */\n chunkFilename?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * List of peer dependencies\n */\n peers?: string[];\n\n /**\n * config for html generation\n */\n html?: HtmlConfig[];\n\n /**\n * module targets to expose.\n */\n modules?: ModuleTarget[];\n\n /**\n * Name for the runtime chunk\n */\n runtimeChunkName?: string;\n\n /**\n * Different configuration related to chunking\n */\n chunking?: Chunking;\n\n /**\n * A path for the host root dir\n * Host root dir is usually the env root dir\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n hostRootDir?: string;\n\n /**\n * Array of host dependencies, they are used later in case you use one of the following:\n *\n */\n hostDependencies?: string[];\n\n /**\n * Make the hostDependencies externals. externals (from webpack docs):\n * The externals configuration option provides a way of excluding dependencies from the output bundles.\n * Instead, the created bundle relies on that dependency to be present in the consumer's (any end-user application) environment.\n */\n externalizeHostDependencies?: boolean;\n\n /**\n * Make aliases for the hostDependencies.\n * the path of each one will be resolved by [hostRootDir, process.cwd(), __dirname]\n * this will usually replace the instance of import one of the host dependencies by the instance of the env provided it\n */\n aliasHostDependencies?: boolean;\n};\n\nexport type ModuleTarget = {\n /**\n * name of the module.\n */\n name: string;\n\n /**\n * module exposes.\n */\n exposes: {\n [internalPath: string]: string;\n };\n\n shared: {\n [key: string]: any;\n };\n};\n\nexport type HtmlConfig = {\n /**\n * The title to use for the generated HTML document\n */\n title: string;\n /**\n * The file to write the HTML to. Defaults to index.html\n */\n filename?: string;\n /**\n * Allows you to add only some chunks (e.g only the unit-test chunk)\n */\n chunks?: string[];\n /**\n * Load chunks according to their order in the `chunks` array\n * @default auto\n */\n chunkOrder?: 'auto' | 'manual';\n /**\n * provide an inline template\n */\n templateContent: string;\n /**\n * Controls if and in what ways the output should be minified\n */\n minify?: boolean;\n\n /**\n * The favicon for the html page\n */\n favicon?: string;\n\n // TODO: consider add chunksSortMode if there are more needs\n};\n\nexport type Chunking = {\n /**\n * include all types of chunks (async / non-async) in splitting\n */\n splitChunks: boolean;\n};\n\nexport type MetaData = {\n /**\n * Who initiate the bundling process\n */\n initiator?: string;\n /**\n * Env id (used usually to calculate the config)\n */\n envId?: string;\n\n /**\n * Whether the config is for an env template bundling\n */\n isEnvTemplate?: boolean;\n};\nexport interface BundlerContext extends BuildContext {\n /**\n * targets for bundling.\n */\n targets: Target[];\n\n /**\n * determines whether it is a production build, default is `true`.\n * in development, expect the bundler to favour debugging on the expanse of optimization.\n */\n development?: boolean;\n\n /**\n * public path output of the bundle.\n */\n publicPath?: string;\n\n /**\n * root path\n */\n rootPath?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * config for html generation for all targets\n */\n html?: HtmlConfig[];\n\n /**\n * modules for bundle to expose. used by module federation at webpack, or with different methods applied by various bundlers.\n */\n modules?: {\n name: string;\n fileName: string;\n exposes: { [key: string]: string };\n };\n\n /**\n * Additional info that can be used by the bundler for different stuff like logging info\n */\n metaData?: MetaData;\n}\n"],"mappings":"","ignoreList":[]}
|
1
|
+
{"version":3,"names":[],"sources":["bundler-context.ts"],"sourcesContent":["import { Component } from '@teambit/component';\nimport { BuildContext } from '@teambit/builder';\n\nexport type LibraryOptions = {\n /**\n * Specify a name for the library\n */\n name: string;\n // TODO: decide which exact types we want to support and their exact names\n /**\n * Configure how the library will be exposed\n * could be values like: 'umd', 'umd2', 'amd', 'commonjs',\n */\n type?: string;\n};\n\nexport type Entry = {\n /**\n * Specifies the name of each output file on disk\n */\n filename: string;\n /**\n * Module(s) that are loaded upon startup\n */\n import: string | string[];\n\n /**\n * Specify library options to bundle a library from current entry\n */\n library?: LibraryOptions;\n};\n\nexport type EntryMap = {\n [entryName: string]: Entry;\n};\n\nexport type Target = {\n /**\n * entries of the target.\n */\n entries: string[] | EntryMap;\n\n /**\n * array of components included in the target.\n */\n components: Component[];\n\n componentDirectoryMap?: {\n [componentId: string]: string;\n };\n\n /**\n * output path of the target\n */\n outputPath: string;\n\n /**\n * This option determines the name of each output bundle\n */\n filename?: string;\n\n /**\n * This option determines the name of non-initial chunk files\n */\n chunkFilename?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * List of peer dependencies\n */\n peers?: string[];\n\n /**\n * config for html generation\n */\n html?: HtmlConfig[];\n\n /**\n * module targets to expose.\n */\n modules?: ModuleTarget[];\n\n /**\n * Name for the runtime chunk\n */\n runtimeChunkName?: string;\n\n /**\n * Different configuration related to chunking\n */\n chunking?: Chunking;\n\n /**\n * A path for the host root dir\n * Host root dir is usually the env root dir\n * This can be used in different bundle options which run require.resolve\n * for example when configuring webpack aliases or webpack expose loader on the peers deps\n */\n hostRootDir?: string;\n\n /**\n * Array of host dependencies, they are used later in case you use one of the following:\n *\n */\n hostDependencies?: string[];\n\n /**\n * Make the hostDependencies externals. externals (from webpack docs):\n * The externals configuration option provides a way of excluding dependencies from the output bundles.\n * Instead, the created bundle relies on that dependency to be present in the consumer's (any end-user application) environment.\n */\n externalizeHostDependencies?: boolean;\n\n /**\n * Make aliases for the hostDependencies.\n * the path of each one will be resolved by [hostRootDir, process.cwd(), __dirname]\n * this will usually replace the instance of import one of the host dependencies by the instance of the env provided it\n */\n aliasHostDependencies?: boolean;\n};\n\nexport type ModuleTarget = {\n /**\n * name of the module.\n */\n name: string;\n\n /**\n * module exposes.\n */\n exposes: {\n [internalPath: string]: string;\n };\n\n shared: {\n [key: string]: any;\n };\n};\n\nexport type HtmlConfig = {\n /**\n * The title to use for the generated HTML document\n */\n title: string;\n /**\n * The file to write the HTML to. Defaults to index.html\n */\n filename?: string;\n /**\n * Allows you to add only some chunks (e.g only the unit-test chunk)\n */\n chunks?: string[];\n /**\n * Load chunks according to their order in the `chunks` array\n * @default auto\n */\n chunkOrder?: 'auto' | 'manual';\n /**\n * provide an inline template\n */\n templateContent: string;\n /**\n * Controls if and in what ways the output should be minified\n */\n minify?: boolean;\n\n /**\n * The favicon for the html page\n */\n favicon?: string;\n\n // TODO: consider add chunksSortMode if there are more needs\n};\n\nexport type Chunking = {\n /**\n * include all types of chunks (async / non-async) in splitting\n */\n splitChunks: boolean;\n};\n\nexport type MetaData = {\n /**\n * Who initiate the bundling process\n */\n initiator?: string;\n /**\n * Env id (used usually to calculate the config)\n */\n envId?: string;\n\n /**\n * Whether the config is for an env template bundling\n */\n isEnvTemplate?: boolean;\n};\nexport interface BundlerContext extends BuildContext {\n /**\n * targets for bundling.\n */\n targets: Target[];\n\n /**\n * determines whether it is a production build, default is `true`.\n * in development, expect the bundler to favour debugging on the expanse of optimization.\n */\n development?: boolean;\n\n /**\n * public path output of the bundle.\n */\n publicPath?: string;\n\n /**\n * root path\n */\n rootPath?: string;\n\n /**\n * Whether to run compression by the bundler\n */\n compress?: boolean;\n\n /**\n * config for html generation for all targets\n */\n html?: HtmlConfig[];\n\n /**\n * modules for bundle to expose. used by module federation at webpack, or with different methods applied by various bundlers.\n */\n modules?: {\n name: string;\n fileName: string;\n exposes: { [key: string]: string };\n };\n\n /**\n * Additional info that can be used by the bundler for different stuff like logging info\n */\n metaData?: MetaData;\n}\n"],"mappings":"","ignoreList":[]}
|
@@ -153,8 +153,17 @@ class DevServerService {
|
|
153
153
|
context.components = context.components.concat(this.getComponentsFromContexts(additionalContexts));
|
154
154
|
const peers = await this.dependencyResolver.getPreviewHostDependenciesFromEnv(context.envDefinition.env);
|
155
155
|
const hostRootDir = context.envRuntime.envAspectDefinition?.aspectPath;
|
156
|
+
const entry = await (0, _getEntry().getEntry)(context, this.runtimeSlot);
|
157
|
+
const componentDirectoryMap = {};
|
158
|
+
context.components.forEach(component => {
|
159
|
+
// @ts-ignore this is usually a workspace component here so it has a workspace
|
160
|
+
const workspace = component.workspace;
|
161
|
+
if (!workspace) return;
|
162
|
+
componentDirectoryMap[component.id.toString()] = workspace.componentDir(component.id);
|
163
|
+
});
|
156
164
|
return Object.assign(context, {
|
157
|
-
entry
|
165
|
+
entry,
|
166
|
+
componentDirectoryMap,
|
158
167
|
// don't start with a leading "/" because it generates errors on Windows
|
159
168
|
rootPath: `preview/${context.envRuntime.id}`,
|
160
169
|
publicPath: `${_path().sep}public`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_cliHighlight","_path","_pMapSeries","_componentServer","_dedupEnvs","_getEntry","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DevServerService","constructor","pubsub","dependencyResolver","runtimeSlot","devServerTransformerSlot","render","env","context","descriptor","getDescriptor","name","chalk","green","id","displayName","version","configLabel","configObj","config","highlight","language","ignoreIllegals","environment","getDevServer","undefined","mergedContext","buildContext","devServer","icon","displayConfig","transform","envContext","preview","getDevEnvId","runOnce","contexts","dedicatedEnvDevServers","groupedEnvs","dedupEnvs","servers","pMapSeries","entries","contextList","mainContext","find","envDefinition","additionalContexts","filter","devServerContext","envRuntime","transformedDevServer","transformDevServer","envId","ComponentServer","mergeContext","getComponentsFromContexts","flatten","map","components","relatedContexts","ctx","concat","peers","getPreviewHostDependenciesFromEnv","hostRootDir","envAspectDefinition","aspectPath","assign","entry","getEntry","rootPath","publicPath","sep","hostDependencies","aliasHostDependencies","values","reduce","updatedDevServer","transformFn","exports"],"sources":["dev-server.service.ts"],"sourcesContent":["import { EnvService, ExecutionContext, EnvDefinition, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';\nimport { PubsubMain } from '@teambit/pubsub';\nimport chalk from 'chalk';\nimport { flatten } from 'lodash';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport highlight from 'cli-highlight';\nimport { sep } from 'path';\nimport pMapSeries from 'p-map-series';\nimport { BrowserRuntimeSlot, DevServerTransformerSlot } from './bundler.main.runtime';\nimport { ComponentServer } from './component-server';\nimport { dedupEnvs } from './dedup-envs';\nimport { DevServer } from './dev-server';\nimport { DevServerContext } from './dev-server-context';\nimport { getEntry } from './get-entry';\n\nexport type DevServerServiceOptions = { dedicatedEnvDevServers?: string[] };\n\ntype DevServiceTransformationMap = ServiceTransformationMap & {\n /**\n * Required for `bit start`\n */\n getDevEnvId?: (context?: any) => string;\n\n /**\n * Returns and configures the dev server\n * Required for `bit start`\n */\n getDevServer?: (context: DevServerContext) => DevServer | Promise<DevServer>;\n};\n\nexport type DevServerDescriptor = {\n /**\n * id of the dev server (e.g. webpack)\n */\n id: string;\n\n /**\n * display name of the dev server (e.g. Webpack dev server)\n */\n displayName: string;\n\n /**\n * icon of the configured dev server.\n */\n icon: string;\n\n /**\n * string containing the config for display.\n */\n config: string;\n\n version?: string;\n};\n\nexport class DevServerService implements EnvService<ComponentServer, DevServerDescriptor> {\n name = 'dev server';\n\n constructor(\n private pubsub: PubsubMain,\n\n private dependencyResolver: DependencyResolverMain,\n\n /**\n * browser runtime slot\n */\n private runtimeSlot: BrowserRuntimeSlot,\n\n private devServerTransformerSlot: DevServerTransformerSlot\n ) {}\n\n async render(env: EnvDefinition, context: ExecutionContext[]) {\n const descriptor = await this.getDescriptor(env, context);\n const name = `${chalk.green('configured dev server:')} ${descriptor?.id} (${descriptor?.displayName} @ ${\n descriptor?.version\n })`;\n const configLabel = chalk.green('dev server config:');\n const configObj = descriptor?.config\n ? highlight(descriptor?.config, { language: 'javascript', ignoreIllegals: true })\n : '';\n return `${name}\\n${configLabel}\\n${configObj}`;\n }\n\n async getDescriptor(\n environment: EnvDefinition,\n context?: ExecutionContext[]\n ): Promise<DevServerDescriptor | undefined> {\n if (!environment.env.getDevServer || !context) return undefined;\n const mergedContext = await this.buildContext(context[0], []);\n const devServer: DevServer = environment.env.getDevServer(mergedContext);\n\n return {\n id: devServer.id || '',\n displayName: devServer.displayName || '',\n icon: devServer.icon || '',\n config: devServer.displayConfig ? devServer.displayConfig() : '',\n version: devServer.version ? devServer.version() : '?',\n };\n }\n\n transform(env: Env, envContext: EnvContext): DevServiceTransformationMap | undefined {\n // Old env\n if (!env?.preview) return undefined;\n const preview = env.preview()(envContext);\n\n return {\n getDevEnvId: () => {\n return preview.getDevEnvId();\n },\n getDevServer: (context) => {\n return preview.getDevServer(context)(envContext);\n },\n };\n }\n\n // async run(context: ExecutionContext): Promise<ComponentServer[]> {\n // const devServerContext = await this.buildContext(context);\n // const devServer: DevServer = context.env.getDevServer(devServerContext);\n // const port = await selectPort();\n // // TODO: refactor to replace with a component server instance.\n // return new ComponentServer(this.pubsub, context, port, devServer);\n // }\n\n async runOnce(\n contexts: ExecutionContext[],\n { dedicatedEnvDevServers }: DevServerServiceOptions\n ): Promise<ComponentServer[]> {\n const groupedEnvs = await dedupEnvs(contexts, this.dependencyResolver, dedicatedEnvDevServers);\n\n // TODO: (gilad) - change this back to promise all once we make the preview pre-bundle to run before that loop\n const servers = await pMapSeries(Object.entries(groupedEnvs), async ([id, contextList]) => {\n const mainContext = contextList.find((context) => context.envDefinition.id === id) || contextList[0];\n const additionalContexts = contextList.filter((context) => context.envDefinition.id !== id);\n\n const devServerContext = await this.buildContext(mainContext, additionalContexts);\n const devServer: DevServer = await devServerContext.envRuntime.env.getDevServer(devServerContext);\n const transformedDevServer: DevServer = this.transformDevServer(devServer, { envId: id });\n\n return new ComponentServer(this.pubsub, devServerContext, [3300, 3400], transformedDevServer);\n });\n\n return servers;\n }\n\n mergeContext() {}\n\n private getComponentsFromContexts(contexts: ExecutionContext[]) {\n return flatten(\n contexts.map((context) => {\n return context.components;\n })\n );\n }\n\n /**\n * builds the execution context for the dev server.\n */\n private async buildContext(\n context: ExecutionContext,\n additionalContexts: ExecutionContext[] = []\n ): Promise<DevServerContext> {\n context.relatedContexts = additionalContexts.map((ctx) => ctx.envDefinition.id);\n context.components = context.components.concat(this.getComponentsFromContexts(additionalContexts));\n const peers = await this.dependencyResolver.getPreviewHostDependenciesFromEnv(context.envDefinition.env);\n const hostRootDir = context.envRuntime.envAspectDefinition?.aspectPath;\n\n return Object.assign(context, {\n entry: await getEntry(context, this.runtimeSlot),\n // don't start with a leading \"/\" because it generates errors on Windows\n rootPath: `preview/${context.envRuntime.id}`,\n publicPath: `${sep}public`,\n hostRootDir,\n hostDependencies: peers,\n aliasHostDependencies: true,\n });\n }\n\n private transformDevServer(devServer: DevServer, { envId }: { envId: string }): DevServer {\n return this.devServerTransformerSlot\n .values()\n .reduce((updatedDevServer, transformFn) => transformFn(updatedDevServer, { envId }), devServer);\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,OAAA;E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wB,CACjCuE,MAAM,CAAC,CAAC,CACRC,MAAM,CAAC,CAACC,gBAAgB,EAAEC,WAAW,KAAKA,WAAW,CAACD,gBAAgB,EAAE;MAAEzB;IAAM,CAAC,CAAC,EAAEzB,SAAS,CAAC;EACnG;AACF;AAACoD,OAAA,CAAAhF,gBAAA,GAAAA,gBAAA","ignoreList":[]}
|
1
|
+
{"version":3,"names":["_chalk","data","_interopRequireDefault","require","_lodash","_cliHighlight","_path","_pMapSeries","_componentServer","_dedupEnvs","_getEntry","e","__esModule","default","_defineProperty","r","t","_toPropertyKey","Object","defineProperty","value","enumerable","configurable","writable","i","_toPrimitive","Symbol","toPrimitive","call","TypeError","String","Number","DevServerService","constructor","pubsub","dependencyResolver","runtimeSlot","devServerTransformerSlot","render","env","context","descriptor","getDescriptor","name","chalk","green","id","displayName","version","configLabel","configObj","config","highlight","language","ignoreIllegals","environment","getDevServer","undefined","mergedContext","buildContext","devServer","icon","displayConfig","transform","envContext","preview","getDevEnvId","runOnce","contexts","dedicatedEnvDevServers","groupedEnvs","dedupEnvs","servers","pMapSeries","entries","contextList","mainContext","find","envDefinition","additionalContexts","filter","devServerContext","envRuntime","transformedDevServer","transformDevServer","envId","ComponentServer","mergeContext","getComponentsFromContexts","flatten","map","components","relatedContexts","ctx","concat","peers","getPreviewHostDependenciesFromEnv","hostRootDir","envAspectDefinition","aspectPath","entry","getEntry","componentDirectoryMap","forEach","component","workspace","toString","componentDir","assign","rootPath","publicPath","sep","hostDependencies","aliasHostDependencies","values","reduce","updatedDevServer","transformFn","exports"],"sources":["dev-server.service.ts"],"sourcesContent":["import { EnvService, ExecutionContext, EnvDefinition, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';\nimport { PubsubMain } from '@teambit/pubsub';\nimport chalk from 'chalk';\nimport { flatten } from 'lodash';\nimport { DependencyResolverMain } from '@teambit/dependency-resolver';\nimport highlight from 'cli-highlight';\nimport { sep } from 'path';\nimport pMapSeries from 'p-map-series';\nimport { BrowserRuntimeSlot, DevServerTransformerSlot } from './bundler.main.runtime';\nimport { ComponentServer } from './component-server';\nimport { dedupEnvs } from './dedup-envs';\nimport { DevServer } from './dev-server';\nimport { DevServerContext } from './dev-server-context';\nimport { getEntry } from './get-entry';\n\nexport type DevServerServiceOptions = { dedicatedEnvDevServers?: string[] };\n\ntype DevServiceTransformationMap = ServiceTransformationMap & {\n /**\n * Required for `bit start`\n */\n getDevEnvId?: (context?: any) => string;\n\n /**\n * Returns and configures the dev server\n * Required for `bit start`\n */\n getDevServer?: (context: DevServerContext) => DevServer | Promise<DevServer>;\n};\n\nexport type DevServerDescriptor = {\n /**\n * id of the dev server (e.g. webpack)\n */\n id: string;\n\n /**\n * display name of the dev server (e.g. Webpack dev server)\n */\n displayName: string;\n\n /**\n * icon of the configured dev server.\n */\n icon: string;\n\n /**\n * string containing the config for display.\n */\n config: string;\n\n version?: string;\n};\n\nexport class DevServerService implements EnvService<ComponentServer, DevServerDescriptor> {\n name = 'dev server';\n\n constructor(\n private pubsub: PubsubMain,\n\n private dependencyResolver: DependencyResolverMain,\n\n /**\n * browser runtime slot\n */\n private runtimeSlot: BrowserRuntimeSlot,\n\n private devServerTransformerSlot: DevServerTransformerSlot\n ) {}\n\n async render(env: EnvDefinition, context: ExecutionContext[]) {\n const descriptor = await this.getDescriptor(env, context);\n const name = `${chalk.green('configured dev server:')} ${descriptor?.id} (${descriptor?.displayName} @ ${\n descriptor?.version\n })`;\n const configLabel = chalk.green('dev server config:');\n const configObj = descriptor?.config\n ? highlight(descriptor?.config, { language: 'javascript', ignoreIllegals: true })\n : '';\n return `${name}\\n${configLabel}\\n${configObj}`;\n }\n\n async getDescriptor(\n environment: EnvDefinition,\n context?: ExecutionContext[]\n ): Promise<DevServerDescriptor | undefined> {\n if (!environment.env.getDevServer || !context) return undefined;\n const mergedContext = await this.buildContext(context[0], []);\n const devServer: DevServer = environment.env.getDevServer(mergedContext);\n\n return {\n id: devServer.id || '',\n displayName: devServer.displayName || '',\n icon: devServer.icon || '',\n config: devServer.displayConfig ? devServer.displayConfig() : '',\n version: devServer.version ? devServer.version() : '?',\n };\n }\n\n transform(env: Env, envContext: EnvContext): DevServiceTransformationMap | undefined {\n // Old env\n if (!env?.preview) return undefined;\n const preview = env.preview()(envContext);\n\n return {\n getDevEnvId: () => {\n return preview.getDevEnvId();\n },\n getDevServer: (context) => {\n return preview.getDevServer(context)(envContext);\n },\n };\n }\n\n // async run(context: ExecutionContext): Promise<ComponentServer[]> {\n // const devServerContext = await this.buildContext(context);\n // const devServer: DevServer = context.env.getDevServer(devServerContext);\n // const port = await selectPort();\n // // TODO: refactor to replace with a component server instance.\n // return new ComponentServer(this.pubsub, context, port, devServer);\n // }\n\n async runOnce(\n contexts: ExecutionContext[],\n { dedicatedEnvDevServers }: DevServerServiceOptions\n ): Promise<ComponentServer[]> {\n const groupedEnvs = await dedupEnvs(contexts, this.dependencyResolver, dedicatedEnvDevServers);\n\n // TODO: (gilad) - change this back to promise all once we make the preview pre-bundle to run before that loop\n const servers = await pMapSeries(Object.entries(groupedEnvs), async ([id, contextList]) => {\n const mainContext = contextList.find((context) => context.envDefinition.id === id) || contextList[0];\n const additionalContexts = contextList.filter((context) => context.envDefinition.id !== id);\n\n const devServerContext = await this.buildContext(mainContext, additionalContexts);\n const devServer: DevServer = await devServerContext.envRuntime.env.getDevServer(devServerContext);\n const transformedDevServer: DevServer = this.transformDevServer(devServer, { envId: id });\n\n return new ComponentServer(this.pubsub, devServerContext, [3300, 3400], transformedDevServer);\n });\n\n return servers;\n }\n\n mergeContext() {}\n\n private getComponentsFromContexts(contexts: ExecutionContext[]) {\n return flatten(\n contexts.map((context) => {\n return context.components;\n })\n );\n }\n\n /**\n * builds the execution context for the dev server.\n */\n private async buildContext(\n context: ExecutionContext,\n additionalContexts: ExecutionContext[] = []\n ): Promise<DevServerContext> {\n context.relatedContexts = additionalContexts.map((ctx) => ctx.envDefinition.id);\n context.components = context.components.concat(this.getComponentsFromContexts(additionalContexts));\n const peers = await this.dependencyResolver.getPreviewHostDependenciesFromEnv(context.envDefinition.env);\n const hostRootDir = context.envRuntime.envAspectDefinition?.aspectPath;\n const entry = await getEntry(context, this.runtimeSlot);\n const componentDirectoryMap = {};\n context.components.forEach((component) => {\n // @ts-ignore this is usually a workspace component here so it has a workspace\n const workspace = component.workspace;\n if (!workspace) return;\n componentDirectoryMap[component.id.toString()] = workspace.componentDir(component.id);\n });\n\n return Object.assign(context, {\n entry,\n componentDirectoryMap,\n // don't start with a leading \"/\" because it generates errors on Windows\n rootPath: `preview/${context.envRuntime.id}`,\n publicPath: `${sep}public`,\n hostRootDir,\n hostDependencies: peers,\n aliasHostDependencies: true,\n });\n }\n\n private transformDevServer(devServer: DevServer, { envId }: { envId: string }): DevServer {\n return this.devServerTransformerSlot\n .values()\n .reduce((updatedDevServer, transformFn) => transformFn(updatedDevServer, { envId }), devServer);\n }\n}\n"],"mappings":";;;;;;AAEA,SAAAA,OAAA;EAAA,MAAAC,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAH,MAAA,YAAAA,CAAA;IAAA,OAAAC,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAG,QAAA;EAAA,MAAAH,IAAA,GAAAE,OAAA;EAAAC,OAAA,YAAAA,CAAA;IAAA,OAAAH,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AAEA,SAAAI,cAAA;EAAA,MAAAJ,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAE,aAAA,YAAAA,CAAA;IAAA,OAAAJ,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAK,MAAA;EAAA,MAAAL,IAAA,GAAAE,OAAA;EAAAG,KAAA,YAAAA,CAAA;IAAA,OAAAL,IAAA;EAAA;EAAA,OAAAA,IAAA;AAAA;AACA,SAAAM,YAAA;EAAA,MAAAN,IAAA,GAAAC,sBAAA,CAAAC,OAAA;EAAAI,WAAA,YAAAA,CAAA;IAAA,OAAAN,IAAA;EAAA;EAAA,OAAA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caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.
|
2
|
-
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.
|
1
|
+
import * as compositions_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.448/dist/bundler.composition.js';
|
2
|
+
import * as overview_0 from '/home/circleci/Library/Caches/Bit/capsules/8891be5ad/teambit.compilation_bundler@1.0.448/dist/bundler.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/bundler",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.448",
|
4
4
|
"homepage": "https://bit.cloud/teambit/compilation/bundler",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"componentId": {
|
7
7
|
"scope": "teambit.compilation",
|
8
8
|
"name": "bundler",
|
9
|
-
"version": "1.0.
|
9
|
+
"version": "1.0.448"
|
10
10
|
},
|
11
11
|
"dependencies": {
|
12
12
|
"chalk": "2.4.2",
|
@@ -14,14 +14,14 @@
|
|
14
14
|
"lodash": "4.17.21",
|
15
15
|
"p-map-series": "2.1.0",
|
16
16
|
"@teambit/harmony": "0.4.6",
|
17
|
-
"@teambit/envs": "1.0.
|
18
|
-
"@teambit/builder": "1.0.
|
19
|
-
"@teambit/component": "1.0.
|
20
|
-
"@teambit/cli": "0.0.
|
21
|
-
"@teambit/dependency-resolver": "1.0.
|
22
|
-
"@teambit/graphql": "1.0.
|
23
|
-
"@teambit/pubsub": "1.0.
|
24
|
-
"@teambit/legacy.bit-map": "0.0.
|
17
|
+
"@teambit/envs": "1.0.448",
|
18
|
+
"@teambit/builder": "1.0.448",
|
19
|
+
"@teambit/component": "1.0.448",
|
20
|
+
"@teambit/cli": "0.0.1025",
|
21
|
+
"@teambit/dependency-resolver": "1.0.448",
|
22
|
+
"@teambit/graphql": "1.0.448",
|
23
|
+
"@teambit/pubsub": "1.0.448",
|
24
|
+
"@teambit/legacy.bit-map": "0.0.45",
|
25
25
|
"@teambit/toolbox.path.path": "0.0.4",
|
26
26
|
"@teambit/toolbox.network.get-port": "1.0.6"
|
27
27
|
},
|