@teambit/bundler 1.0.225 → 1.0.227

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.
@@ -1,67 +0,0 @@
1
- import { EnvService, ExecutionContext, EnvDefinition, Env, EnvContext, ServiceTransformationMap } from '@teambit/envs';
2
- import { PubsubMain } from '@teambit/pubsub';
3
- import { DependencyResolverMain } from '@teambit/dependency-resolver';
4
- import { BrowserRuntimeSlot, DevServerTransformerSlot } from './bundler.main.runtime';
5
- import { ComponentServer } from './component-server';
6
- import { DevServer } from './dev-server';
7
- import { DevServerContext } from './dev-server-context';
8
- export type DevServerServiceOptions = {
9
- dedicatedEnvDevServers?: string[];
10
- };
11
- type DevServiceTransformationMap = ServiceTransformationMap & {
12
- /**
13
- * Required for `bit start`
14
- */
15
- getDevEnvId?: (context?: any) => string;
16
- /**
17
- * Returns and configures the dev server
18
- * Required for `bit start`
19
- */
20
- getDevServer?: (context: DevServerContext) => DevServer | Promise<DevServer>;
21
- };
22
- export type DevServerDescriptor = {
23
- /**
24
- * id of the dev server (e.g. webpack)
25
- */
26
- id: string;
27
- /**
28
- * display name of the dev server (e.g. Webpack dev server)
29
- */
30
- displayName: string;
31
- /**
32
- * icon of the configured dev server.
33
- */
34
- icon: string;
35
- /**
36
- * string containing the config for display.
37
- */
38
- config: string;
39
- version?: string;
40
- };
41
- export declare class DevServerService implements EnvService<ComponentServer, DevServerDescriptor> {
42
- private pubsub;
43
- private dependencyResolver;
44
- /**
45
- * browser runtime slot
46
- */
47
- private runtimeSlot;
48
- private devServerTransformerSlot;
49
- name: string;
50
- constructor(pubsub: PubsubMain, dependencyResolver: DependencyResolverMain,
51
- /**
52
- * browser runtime slot
53
- */
54
- runtimeSlot: BrowserRuntimeSlot, devServerTransformerSlot: DevServerTransformerSlot);
55
- render(env: EnvDefinition, context: ExecutionContext[]): Promise<string>;
56
- getDescriptor(environment: EnvDefinition, context?: ExecutionContext[]): Promise<DevServerDescriptor | undefined>;
57
- transform(env: Env, envContext: EnvContext): DevServiceTransformationMap | undefined;
58
- runOnce(contexts: ExecutionContext[], { dedicatedEnvDevServers }: DevServerServiceOptions): Promise<ComponentServer[]>;
59
- mergeContext(): void;
60
- private getComponentsFromContexts;
61
- /**
62
- * builds the execution context for the dev server.
63
- */
64
- private buildContext;
65
- private transformDevServer;
66
- }
67
- export {};
@@ -1,18 +0,0 @@
1
- import { BitBaseEvent } from '@teambit/pubsub';
2
- declare class ComponentsServerStartedEventData {
3
- readonly componentsServer: any;
4
- readonly context: any;
5
- readonly hostname: any;
6
- readonly port: any;
7
- constructor(componentsServer: any, context: any, hostname: any, port: any);
8
- }
9
- export declare class ComponentsServerStartedEvent extends BitBaseEvent<ComponentsServerStartedEventData> {
10
- readonly timestamp: any;
11
- readonly componentsServer: any;
12
- readonly context: any;
13
- readonly hostname: any;
14
- readonly port: any;
15
- static readonly TYPE = "components-server-started";
16
- constructor(timestamp: any, componentsServer: any, context: any, hostname: any, port: any);
17
- }
18
- export {};
@@ -1 +0,0 @@
1
- export * from './components-server-started-event';
@@ -1,2 +0,0 @@
1
- export declare class BindError extends Error {
2
- }
@@ -1 +0,0 @@
1
- export { BindError } from './bind-error';
@@ -1,14 +0,0 @@
1
- import { ComponentID } from '@teambit/component';
2
- import { ExecutionContext } from '@teambit/envs';
3
- import { GetBitMapComponentOptions } from '@teambit/legacy/dist/consumer/bit-map/bit-map';
4
- import { PathOsBased } from '@teambit/legacy/dist/utils/path';
5
- import { BrowserRuntimeSlot } from './bundler.main.runtime';
6
- export type ComponentDir = {
7
- componentDir?: (componentId: ComponentID, bitMapOptions?: GetBitMapComponentOptions, options?: {
8
- relative: boolean;
9
- }) => PathOsBased | undefined;
10
- };
11
- /**
12
- * computes the bundler entry.
13
- */
14
- export declare function getEntry(context: ExecutionContext, runtimeSlot: BrowserRuntimeSlot): Promise<string[]>;
package/dist/index.d.ts DELETED
@@ -1,10 +0,0 @@
1
- import { BundlerAspect } from './bundler.aspect';
2
- export type { DevServer } from './dev-server';
3
- export type { DevServerContext } from './dev-server-context';
4
- export type { BundlerContext, Target, ModuleTarget, HtmlConfig as BundlerHtmlConfig, EntryMap as BundlerEntryMap, Entry as BundlerEntry, MetaData as BundlerContextMetaData, } from './bundler-context';
5
- export type { Bundler, BundlerResult, BundlerMode, Asset, ChunksAssetsMap, EntriesAssetsMap, EntryAssets, } from './bundler';
6
- export type { BundlerMain } from './bundler.main.runtime';
7
- export type { ComponentDir } from './get-entry';
8
- export { ComponentServer } from './component-server';
9
- export * from './events';
10
- export { BundlerAspect, BundlerAspect as default };
@@ -1,4 +0,0 @@
1
- /**
2
- * get an available port between range 3000 to 3200 or from port range
3
- */
4
- export declare function selectPort(range: number[] | number): Promise<number>;