@openshift-console/dynamic-plugin-sdk-webpack
Version:
Provides webpack ConsoleRemotePlugin used to build all dynamic plugin assets.
29 lines (28 loc) • 1.33 kB
TypeScript
import * as webpack from 'webpack';
import { ConsolePluginBuildMetadata } from '../build-types';
import { Extension } from '../types';
import { BaseValidator } from './BaseValidator';
type ExtensionCodeRefData = {
index: number;
propToCodeRefValue: {
[propName: string]: string;
};
};
/**
* Guess the file path of the module (e.g., full path with extension,
* or relevant barrel file) based on the given base path.
*
* Returns the base path if no relevant module file is found.
*
* @param basePath The base file path to start guessing from.
* @param msgCallback Optional callback to log messages.
*/
export declare const guessModuleFilePath: (basePath: string, msgCallback?: (msg: string) => void) => string;
export declare const collectCodeRefData: (extensions: Extension[]) => ExtensionCodeRefData[];
export declare const findWebpackModules: (compilation: webpack.Compilation, exposedModules: ConsolePluginBuildMetadata["exposedModules"], pluginBasePath?: string) => {
[moduleName: string]: webpack.Module;
};
export declare class ExtensionValidator extends BaseValidator {
validate(compilation: webpack.Compilation, extensions: Extension[], exposedModules: ConsolePluginBuildMetadata['exposedModules'], pluginBasePath?: string): import("./ValidationResult").ValidationResult;
}
export {};