///
///
import type webpack from 'webpack';
import type { ITerminal } from '@rushstack/terminal';
import type { ILocalizedWebpackChunk } from '@rushstack/webpack5-localization-plugin';
import type { IModuleConfiguration, IClientSideComponentLoaderConfiguration, IIntegrityPath } from '@microsoft/sp-module-interfaces';
import type { _IManifestsFileMetadata as IManifestsFileMetadata } from '@msinternal/spfx-manifests-file';
import type { IExternalProject } from '../utilities/ExternalsProcessor';
import type { IBundleEntry } from '../interfaces';
import { type CumulativeManifestProcessor, type IReferencedProjectMap } from '../cumulativeManifestProcessor/CumulativeManifestProcessor';
import type { ITranslationsForLocFile } from '../../plugins/webpackConfigurationPlugin/ILocalization';
import type { Entrypoint, WebpackAssets } from '../../plugins/webpackConfigurationPlugin/webpackPlugins/webpackTypes';
import type { IFlightedDependencyConfig } from '../../plugins/webpackConfigurationPlugin/WebpackConfigurationGenerator';
/**
* @internal
*/
export interface IAsyncOnlyDependenciesOptions {
asyncOnlyDependencyNames: string[];
violationsAsErrors: boolean;
}
/**
* @internal
*/
export interface ILegacyExternal {
moduleConfigurations: {
[externalName: string]: IModuleConfiguration;
};
assets: {
[name: string]: string;
};
}
/**
* @beta
*/
export interface IManifestPluginOptions {
terminal: ITerminal;
bundleEntries: IBundleEntry[];
internalModuleBaseUrls: string[];
debugInternalModuleBaseUrls: string[];
linkedExternals: Map;
referencedProjects: IReferencedProjectMap;
cumulativeManifestProcessor: CumulativeManifestProcessor;
useManifestsJsonForComponentDependencies?: boolean;
sourceLocaleName: string;
tryGetLocFileTranslations: (absoluteFilePath: string) => ITranslationsForLocFile | undefined;
selectedLocales: Set | undefined;
production: boolean;
includeIntegrity?: boolean;
firstPassLocaleRemapping?: Map;
/** @internal */
_asyncOnlyDependencies?: IAsyncOnlyDependenciesOptions;
componentDependenciesAuditDropPath?: string;
/** @internal */
_tryGetLegacyExternalByNameAsync?: (name: string) => Promise;
/** @internal */
_manifestsJsFileMetadata?: IManifestsFileMetadata;
/** @internal */
_flightedDependencyConfig?: IFlightedDependencyConfig;
}
/**
* @internal
*/
export interface IComponentDependenciesAuditFile {
bundles: {
[bundleName: string]: IComponentDependenciesAuditFileBundle;
};
}
/**
* @internal
*/
export interface IComponentDependenciesAuditFileBundle {
dependencies: IComponentDependenciesAuditFileDependency[];
asyncChunks?: IComponentDependenciesAuditFileBundleAsyncChunks;
}
/**
* @internal
*/
export interface IComponentDependenciesAuditFileBundleAsyncChunks {
[chunkName: string]: {
asyncComponentDependencies: IComponentDependenciesAuditFileDependency[];
};
}
/**
* @internal
*/
export interface IComponentDependenciesAuditFileDependency {
componentId: string;
componentName: string;
componentVersion: string | undefined;
isDirectDependency: boolean;
}
/**
* @internal
*/
export interface IWebpackEntrypoint {
readonly runtimeChunk: ILocalizedWebpackChunk;
}
/**
* @internal
*/
export declare function computeIntegrity(source: string | Buffer | Buffer[]): string;
export interface IDevReleaseManifestSource extends webpack.sources.RawSource {
releaseManifest: string;
}
/**
* @beta
*/
export declare class ManifestPlugin implements webpack.WebpackPluginInstance {
/**
* @internal
*/
readonly _options: IManifestPluginOptions;
private _parsedLocFileCache;
private readonly _manifestReferenceResolver;
constructor(options: IManifestPluginOptions);
apply(compiler: webpack.Compiler): void;
/**
* @internal
*/
protected _generateLoaderConfigurationAsync(terminal: ITerminal, thisWebpack: typeof webpack, bundleName: string, compilation: webpack.Compilation, asyncOnlyDependencies: Set, asyncOnlyDependenciesViolationsAsErrors: boolean, dependenciesForAudit: Map): Promise;
/**
* @internal
*/
protected _getRuntimeChunk(bundleName: string, entrypoint: Entrypoint): ILocalizedWebpackChunk;
/**
* @internal
*/
protected _getExternalsScriptResourcesAsync(terminal: ITerminal, thisWebpack: typeof webpack, bundleName: string, compilation: webpack.Compilation, runtimeChunk: webpack.Chunk, asyncOnlyDependencies: Set, asyncOnlyDependenciesViolationsAsErrors: boolean, dependenciesForAudit: Map): Promise<{
[name: string]: IModuleConfiguration;
}>;
/**
* @internal
*/
protected _getRuntimeChunkInfo(bundleName: string, runtimeChunk: webpack.Chunk, assets: WebpackAssets): string | IIntegrityPath;
private _generateComponentManifest;
private _processAIProperties;
private _isManifestReference;
/**
* Process experimentalData.propertiesMetadataForReInstate when present as a $-style reference
* and only if the manifest has opted into AI via aiProperties.
*/
private _processpropertiesMetadataForReInstate;
/**
* Process and localize WebPart manifest.
* @remarks Also used for AdaptiveCardExtension manifests
*/
private _processWebpartManifest;
private _processApplicationManifest;
/**
* Does extension-specific manifest processing.
*/
private _processExtensionsManifest;
/**
* Localizes a string with an ID in the form of $:;
* If the string to localize is not based on an id, it returns the input param untouched.
*/
private _localizeString;
private _getEntryManifestModule;
private _populateLinkedExternalComponentInDependencyMap;
}
//# sourceMappingURL=ManifestPlugin.d.ts.map