npm package diff
Package: @forge/bundler
Versions: 4.20.1-next.6 - 4.20.1-next.7
File: package/out/webpack.d.ts
Index: package/out/webpack.d.ts
===================================================================
--- package/out/webpack.d.ts
+++ package/out/webpack.d.ts
@@ -1,15 +1,21 @@
import webpack from 'webpack';
import { FileSystemReader, FileSystemWriter } from '@forge/cli-shared';
import { LintLogger } from '@forge/lint';
-import { CommonWebpackConfig, ConfigBuilder, EntryPoint } from './config/common';
-import { WrapperProvider } from './config/node';
-import { Bundler, BundleLogger, BundlerMetadata } from './types';
-export declare function handleWebpackCompilationResult(logger: BundleLogger, err: Error | null | undefined, stats: webpack.Stats | undefined): asserts stats is webpack.Stats;
+import { CommonOutputOptions } from './config/common';
+import { Bundler, BundleLogger, BundlerOutput, BundlerArgs, BundlerWatch, BundlerWatchArgs, BundlerWatchOutput } from './types';
+export declare function handleWebpackCompilationResult(logger: BundleLogger, err: Error | null | undefined, stats: Pick<webpack.Stats, 'hasErrors' | 'hasWarnings' | 'toJson'> | undefined): asserts stats is webpack.Stats;
export declare function getCompiler(config: webpack.Configuration): webpack.Compiler;
-export declare function getMetadata(config: CommonWebpackConfig, stats?: webpack.Stats): BundlerMetadata;
export declare const runLinter: (logger?: LintLogger, fileSystemReader?: FileSystemReader, fileSystemWriter?: FileSystemWriter) => Promise<void>;
-export declare function createBundler(getBuildConfig: (entrypoints: EntryPoint[], configBuilder: ConfigBuilder) => CommonWebpackConfig): Bundler;
-export declare const getSandboxBundler: () => Bundler;
-export declare const getNodeBundler: (wrapperProvider: WrapperProvider) => Bundler;
-export declare const nativeUiBundle: Bundler;
+export declare type ConfigWithOutput = webpack.Configuration & {
+ output: CommonOutputOptions;
+};
+export declare abstract class WebpackBundler implements Bundler {
+ protected readonly logger: BundleLogger;
+ constructor(logger: BundleLogger);
+ protected getOutput(config: ConfigWithOutput, stats: webpack.Stats): BundlerOutput;
+ protected runCompiler(config: ConfigWithOutput): Promise<BundlerOutput>;
+ abstract getConfig(args: BundlerArgs): ConfigWithOutput;
+ bundle(args: BundlerArgs): Promise<BundlerOutput>;
+ watch(args: BundlerWatchArgs, watch: BundlerWatch): Promise<BundlerWatchOutput>;
+}
//# sourceMappingURL=webpack.d.ts.map
\ No newline at end of file