///
import { AsyncParallelHook } from 'tapable';
import { AsyncSeriesHook } from 'tapable';
import { AsyncSeriesWaterfallHook } from 'tapable';
import { BlobHTTPHeaders } from '@azure/storage-blob';
import { default as crypto_2 } from 'node:crypto';
import type { GenerateCssClassNameFunction } from '@microsoft/sp-css-loader';
import type { getMark } from '@rushstack/webpack5-localization-plugin/lib/utilities/EntityMarker';
import type { HeftConfiguration } from '@rushstack/heft';
import type { IClientSideComponentLoaderConfiguration } from '@microsoft/sp-module-interfaces';
import type { IClientSideComponentManifest } from '@microsoft/sp-module-interfaces';
import type { IHeftTaskPlugin } from '@rushstack/heft';
import type { IHeftTaskSession } from '@rushstack/heft';
import type { IIntegrityPath } from '@microsoft/sp-module-interfaces';
import type { ILocalizedPathModuleConfiguration } from '@microsoft/sp-module-interfaces';
import type { ILocalizedString } from '@microsoft/sp-module-interfaces';
import type { ILocalizedStrings } from '@rushstack/webpack5-localization-plugin';
import type { ILocalizedWebpackChunk } from '@rushstack/webpack5-localization-plugin';
import type { _IManifestsFileMetadata } from '@msinternal/spfx-manifests-file';
import type { IModuleConfiguration } from '@microsoft/sp-module-interfaces';
import type { IModuleMinifier } from '@rushstack/module-minifier';
import type { _IOperatorOrSwitch } from '@microsoft/sp-module-interfaces';
import { IPackageJson } from '@rushstack/node-core-library';
import type { IRigConfig } from '@rushstack/rig-package';
import { ITerminal } from '@rushstack/terminal';
import type { IWebpackConfigurationWithDevServer } from '@rushstack/heft-webpack5-plugin/lib/index';
import type { LocalizationPlugin } from '@rushstack/webpack5-localization-plugin';
import type { markEntity } from '@rushstack/webpack5-localization-plugin/lib/utilities/EntityMarker';
import { SyncHook } from 'tapable';
import { SyncWaterfallHook } from 'tapable';
import * as webpack from 'webpack';
import type { default as webpack_2 } from 'webpack';
/**
* @internal
*/
export declare class _AzureUploader {
static readonly DEFAULT_AZURE_MAX_PARALLELISM: number;
static readonly DEFAULT_AZURE_RETRY_DELAY_MILLISECONDS: number;
static readonly DEFAULT_AZURE_MAX_NUMBER_OF_RETRIES: number;
private readonly _containerClient;
constructor(options: _IAzureUploaderOptionsForSas | _IAzureUploaderOptionsForKey);
/**
* Upload file to Azure
*/
uploadFileToAzureAsync(terminal: ITerminal | undefined, localFilename: string, serverFilename: string, blobHeaders?: BlobHTTPHeaders): Promise;
uploadToAzureAsync(terminal: ITerminal, contents: string | Buffer, serverFilename: string, blobMetadata?: {
[name: string]: string;
}): Promise;
/**
* Upload files to Azure
*/
uploadFilesToAzureAsync(terminal: ITerminal, files: _IUploadableFile[], maxParallelism?: number, maxRetries?: number, retryDelayMs?: number, onFileUploaded?: (serverPath: string) => void): Promise;
ensureContainerExistsAsync(terminal: ITerminal): Promise;
private _getBlockBlobClient;
}
/**
* @internal
*/
export declare const _COMMON_RULE_OPTIONS: Partial;
/**
* @internal
*/
export declare function _computeIntegrity(source: string | Buffer | Buffer[]): string;
/**
* @public
*/
export declare const CONFIG_JSON_SYMBOL: unique symbol;
/**
* @beta
*/
export declare class CumulativeManifestProcessor {
private readonly _options;
private readonly _discoveryCache;
constructor(options: Partial & ICumulativeManifestEnvironmentOptions);
/**
* Ths function:
* 1. discovers all packages referenced in package.json
* 2a. looks for a file in each discovered project's temp folder called manifests.json
* 2b. looks for .manifest.json files in the dist folder
* 3. keeps a record of all of the manifests discovered in the referenced projects, and resolves duplicates by
* taking the newest file
* 4. generates new base URLs for each of the referenced projects' manifests to make them valid when "gulp serve"
* is run from this current project's directory
* 5. collects all of these discovered manifests and the debugManifests parameter and generates an array of all
* manifests
* 6. filters this array by the ignoreOutputManifestIds options
* 7. drops a JSON file in the temp directory called manifests.json containing this array
* 8. drops an initialization script in the temp directory called manifests.js that
* exports two functions. One that returns the array with the manifests' base URLs as fully-qualified, and the
* other with manifests' base URLs as relative to the page root.
*/
generateCumulativeManifestAsync(debugManifests: IClientSideComponentManifest[], manifestsJsFileMetadata: _IManifestsFileMetadata | undefined, discoveryMode?: DependencyDiscoveryMode): Promise;
reset(): void;
discoverManifests(packagePath: string, forceSearchMode?: DependencyDiscoveryMode, options?: IDiscoverManifestsOptions): IReferencedProjectMap;
private _discoverManifestsInner;
private _insertManifestIntoMap;
private _doTemporaryManifestFixups;
private _resolvePackage;
}
/**
* @public
*/
declare const CustomizeWebpackConfigPlugin: 'customize-spfx-webpack-configuration-plugin';
/**
* @internal
*/
export declare class _CustomizeWebpackConfigurationPlugin implements IHeftTaskPlugin<_ICustomizeWebpackConfigurationPluginOptions> {
apply(taskSession: IHeftTaskSession, heftConfiguration: HeftConfiguration, options: _ICustomizeWebpackConfigurationPluginOptions): void;
private _updateWebpackConfigurationAsync;
}
/**
* @alpha
*/
export declare const DEFAULT_PORT: 4321;
/**
* @public
*/
export declare const DEFAULT_TEMP_FOLDER: 'temp/build';
/**
* @beta
*/
export declare enum DependencyDiscoveryMode {
/**
* Don't force a manifest search anywhere. Use the manifests.json file everywhere if it's found.
*/
none = 0,
/**
* Don't force a manifest search in the first project, but use the manifests.json file in other packages.
*/
shallow = 1,
/**
* Don't use the manifests.json file anywhere, and search every single package.
*/
deep = 2,
/**
* Don't use the manifests.json file anywhere, but only recurse in packages where other manifests were found.
*/
deepSparse = 3,
/**
* Don't use the manifests.json file anywhere, but only recurse in packages where other manifests were found,
* except for the first project. Always recurse from the first project. This option is useful if it's uncertain
* whether the first project has been built, but otherwise "deepSparse" is intended behavior.
*/
deepSparseIgnoreFirstProject = 4
}
/**
* @public
*/
declare const DeployAzureStoragePlugin: 'deploy-azure-storage-plugin';
/**
* @internal
*/
export declare class _DeployAzureStoragePlugin implements IHeftTaskPlugin {
static deployToAzureAsync({ terminal, buildFolder, emitError, rigConfig, tryCreateContainer }: _IDeployToAzureOptions): Promise;
apply(taskSession: IHeftTaskSession, heftConfiguration: HeftConfiguration): void;
}
/**
* Helper functions for dev-deploy.
* @public
*/
export declare class DevDeployHelper {
static deployFilesAsync(terminal: ITerminal, deployConfig: IDevDeployConfig, deployData: IDevDeployData, deployPathsFunction?: (pathsToUpload: IDeployFile[]) => Promise): Promise;
}
/**
* @public
*/
export declare class DevDeployHooks {
/**
* Initialize
*/
readonly init: AsyncParallelHook;
/**
* Perform any pre processing such as delete any existing deployment info json, clean up dist folder, etc.
*/
readonly preProcess: SyncHook;
/**
* Gets the files to be deployed to the CDN
*/
readonly getFiles: AsyncSeriesWaterfallHook;
/**
* Gets the name of the folder in the container into which files should be uploaded
*/
readonly getContainerFolderName: SyncWaterfallHook;
/**
* Gets the name of the Azure storage account
*/
readonly getStorageAccountName: SyncWaterfallHook;
/**
* Gets the name of the container
*/
readonly getContainerName: SyncWaterfallHook;
/**
* Gets the URL to the container that will be used when reading files
*/
readonly getContainerUrlForRead: SyncWaterfallHook;
/**
* Gets a SAS for the storage container
*/
readonly getStorageSas: AsyncSeriesWaterfallHook;
/**
* Returns true if the deployment is in a prod environment
*/
readonly isProd: SyncWaterfallHook;
/**
* Perform any post processing, usually print the deploy link, save deployment info json, collect library files, etc.
*/
readonly postProcess: AsyncSeriesHook;
}
/**
* @public
*/
declare const DevDeployPlugin: 'spfx-dev-deploy-plugin';
/**
* @internal
*/
declare type Entrypoint = webpack_2.Compilation['asyncEntrypoints'][number];
/**
* @public
*/
export declare const FILE_LOADER_EXTENSIONS: string[];
/**
* @internal
*/
export declare const _FILE_LOADER_RULE_TEST: webpack.RuleSetCondition;
/**
* @internal
*/
export declare function _getFullHash(data: crypto_2.BinaryLike, salt?: string): string;
/**
* @internal
*/
export declare function _getVersionFromPackageJson(packageName: string): (projectRootPath: string) => string | undefined;
/**
* @public
*/
export declare interface IApplicationDefinition {
}
/**
* @internal
*/
export declare interface _IAsyncOnlyDependenciesOptions {
asyncOnlyDependencyNames: string[];
violationsAsErrors: boolean;
}
/**
* @internal
*/
export declare interface _IAzureUploaderOptions {
storageAccountName: string;
containerName: string;
}
/**
* @internal
*/
export declare interface _IAzureUploaderOptionsForKey extends _IAzureUploaderOptions {
storageKey: string;
}
/**
* @internal
*/
export declare interface _IAzureUploaderOptionsForSas extends _IAzureUploaderOptions {
sas: string;
}
/**
* @internal
*/
export declare interface _IBaseConfigJsonResult {
/**
* True if the file is missing.
*/
missingFile: boolean;
/**
* Parse error data.
*/
readError?: {};
/**
* The version of the original config file.
*/
version?: string;
/**
* True if the config file is the latest version.
*/
isLatestVersion?: boolean;
}
/**
* @beta
*/
export declare interface IBundleComponent extends IConfigComponent {
manifestData: IClientSideComponentManifest;
manifestPath: string;
exportName: string | undefined;
}
/**
* @beta
*/
export declare interface IBundleEntry {
bundleName: string;
components: {
[id: string]: IBundleComponent;
};
}
/**
* @public
*/
export declare interface IComponent {
name: string;
description: string;
id: string;
manifest: IClientSideComponentManifest;
requiresCustomScript: boolean;
componentDefinition: IWebPartDefinition | IApplicationDefinition | IExtensionDefinition | undefined;
}
/**
* @internal
*/
export declare interface _IComponentDependenciesAuditFile {
bundles: {
[bundleName: string]: _IComponentDependenciesAuditFileBundle;
};
}
/**
* @internal
*/
export declare interface _IComponentDependenciesAuditFileBundle {
dependencies: _IComponentDependenciesAuditFileDependency[];
asyncChunks?: _IComponentDependenciesAuditFileBundleAsyncChunks;
}
/**
* @internal
*/
export declare interface _IComponentDependenciesAuditFileBundleAsyncChunks {
[chunkName: string]: {
asyncComponentDependencies: _IComponentDependenciesAuditFileDependency[];
};
}
/**
* @internal
*/
export declare interface _IComponentDependenciesAuditFileDependency {
componentId: string;
componentName: string;
componentVersion: string | undefined;
isDirectDependency: boolean;
}
/**
* @public
*/
export declare interface IConfigBundle {
/**
* An array of components to be included in this bundle.
*/
components: IConfigComponent[];
}
/**
* @public
*/
export declare interface IConfigComponent {
/**
* The path to the code entrypoint for this component, relative to the project root.
*/
entrypoint: string;
/**
* The path to the manifest for this component, relative to the project root.
*/
manifest: string;
}
/**
* @public
*/
export declare interface IConfigJson {
$schema: string;
/**
* The config version
*/
version: '2.0';
/**
* A list of bundle definitions. Bundle names may be between 10 and 30 lowercase alphanumeric or dash characters.
*/
bundles: {
[name: string]: IConfigBundle;
};
/**
* The localized resources specified in config.json
*/
localizedResources?: {
[key: string]: string;
};
/**
* The externals specified in config.json
*/
externals?: {
[name: string]: string | INonAMDExternalModuleConfig;
};
/**
* A list of components that should generate a warning if made synchronous dependencies of any component in
* this project.
*/
asyncComponents?: string[];
}
/**
* @internal
*/
export declare interface _IConfigJsonResult extends _IBaseConfigJsonResult {
/**
* The data in the config file.
*/
configData?: IConfigJson;
}
/**
* @beta
*/
export declare interface ICumulativeManifestEnvironmentOptions {
rootPath: string;
tempFolderName: string;
distFolderName: string;
terminal: ITerminal;
}
/**
* @beta
*/
export declare interface ICumulativeManifestOptions {
/**
* IDs of manifests to exclude from the manifest map file.
*/
ignoreOutputManifestIds: string[];
/**
* The base path for debug manifests. Expected to match the result of the "debugBasePath" function passed to the
* WriteManifestsTask task.
*/
baseUrl?: string;
/**
* Optional array of IDs to ensure aren't filtered out of the results if they are discovered.
*/
explicitInclude: string[];
/**
* If set to true, include assemblies. Defaults to false. Assemblies are excluded by default.
*/
includeAssemblies: boolean;
/**
* If set to true, validate manifests against the SPFx manifest schema. If the manifest is invalid, ignore it.
*/
ignoreNonSpfxManifests: boolean;
}
/**
* @internal
*/
export declare interface _ICustomActionConfiguration {
/**
* The type of custom action, use "ClientSideExtension.ApplicationCustomizer" for the Application Customizer
* extension.
*/
location: 'ClientSideExtension.ApplicationCustomizer' | 'ClientSideExtension.ListViewCommandSet.ContextMenu' | 'ClientSideExtension.ListViewCommandSet.CommandBar' | 'ClientSideExtension.ListViewCommandSet' | 'ClientSideExtension.SearchQueryModifier';
properties?: unknown;
}
/**
* @internal
*/
export declare interface _ICustomizeWebpackConfigurationPluginOptions {
customizationFilename: string;
}
/**
* @public
*/
export declare interface IDeployFile {
localPath: string;
deployPath: string;
}
/**
* @internal
*/
export declare interface _IDeployToAzureOptions {
terminal: ITerminal;
emitError: (error: Error) => void;
buildFolder: string;
tryCreateContainer: boolean;
rigConfig?: IRigConfig;
}
/**
* @public
*/
export declare interface IDevDeployConfig {
accountName: string;
sas: string;
containerName: string;
/**
* The URL to the Azure container, as seen when reading files.
* This may be different if, e.g. using a custom domain, or using the Static Website feature.
*/
containerUrlForRead: string;
/**
* The directory in the Azure container to use. Recommended to be set to something that includes your user name
* to ensure you don't clobber others' work.
*/
folderNameInContainer?: string;
/**
* The number of upload retries
*/
maxRetries?: number;
/**
* Include these folders alongside the "dist" directory. This is useful for deploying integration tests.
*
* @internal
*/
_additionalFoldersToInclude?: string[];
/**
* True if the deployment is in a prod environment.
*/
isProd?: boolean;
}
/**
* @public
*/
export declare interface IDevDeployData {
filesToUpload: IDeployFile[];
loaderPath?: string;
}
/**
* @public
*/
export declare interface IDevDeployOptions {
/**
* If true, projects will be uploaded into individual directories. This is useful if projects have files that may
* have conflicting names. If this is false and a collision is detected, a warning will be printed. Defaults to true.
*/
isolateProjects?: boolean;
/**
* The project root path
*/
rootPath: string;
terminal: ITerminal;
ignoreCollisions?: boolean;
devDeployConfig: IDevDeployConfig;
}
/**
* @public
*/
export declare interface IDevDeployParameters {
rush: boolean;
maxRetries: number | undefined;
}
/**
* @public
*/
export declare interface IDevDeployPluginAccessor {
hooks: DevDeployHooks;
properties: IDevDeployPluginAccessorProperties;
}
/**
* @public
*/
export declare interface IDevDeployPluginAccessorProperties {
/**
* @internal
*/
_manifestsJsFileMetadata?: _IManifestsFileMetadata;
}
/**
* Defines the necessary information to generate a feature xml
*/
/**
* @public
*/
export declare interface IDevProperties {
name: string;
websiteUrl: string;
privacyUrl: string;
termsOfUseUrl: string;
mpnId?: string;
}
/**
* @beta
*/
export declare interface IDiscoverManifestsOptions {
/**
* The directory in each project's directory where we should search for manifests. Defaults to "dist"
*/
projectTargetFolder?: string;
/**
* The regex to use to search for manifest files. Defaults to /^[^\.\\\/]+\.manifest\.json$/
*/
manifestFileRegex?: RegExp;
/**
* If expressly set to false, realpath symlinks while crawling.
*/
preserveSymlinks?: boolean;
}
/**
* @internal
*/
export declare interface _IDynamicExternalProject extends IExternalProject {
/**
* A function to get the failover path given the package's root.
*/
getFailoverPath?: (projectRootPath: string) => string;
/**
* A function to get the version of the package. Return undefined if the package is not a dependency.
*/
getVersion: (projectRootPath: string, referencedProjects: IReferencedProjectMap) => string | undefined;
}
/**
* @public
*/
export declare interface IExtensionDefinition {
}
/**
* @beta
*/
export declare interface IExternalProject {
/**
* The ID of the project from the manifest.
*/
id: string;
/**
* The name of the project.
*/
name: string;
/**
* The version of the project from the manifest.
*/
version: string | undefined;
/**
* The failover path, if one exists.
*/
failoverPath?: string;
}
/**
* @public
*/
export declare interface IFeature {
title: string;
description: string;
id: string;
version?: string;
componentIds?: string[];
components?: IComponent[];
assets?: ISharepointAssets;
}
/**
* @internal
*/
export declare interface _IFieldCustomizerConfiguration {
/**
* The ID of the field customizer component.
*/
id: string;
properties?: unknown;
}
/**
* @internal
*/
export declare interface _IFlightedDependencyConfig {
/** A GUID to entry mapping, where the GUID should be the manifest of the multiversion bundle that is being flighted. */
[id: string]: IFlightedDependencyEntry;
}
/**
* @internal
*/
declare interface IFlightedDependencyEntry {
/** The version which should be used when the condition resolves to FALSE. */
activeVersion: string;
/** The version which should be used when the condition resolves to TRUE. */
fallbackVersion: string;
/** The condition controlling if we are using the active (false) or fallback (true) version. */
condition: _IOperatorOrSwitch;
}
/**
* @internal
*
* @remarks this interface is used to construct query string for List Form page.
* The service (server-side) expects parameters in PascalCase.
* That's why we are using PascalCase here instead of camelCase.
*/
export declare interface _IFormCustomizerConfiguration {
componentId: string;
/**
* Form Display Mode.
* See {@link @microsoft/sp-core-library#FormDisplayMode} for more information.
*/
PageType: 4 | 6 | 8;
/**
* Server relative URL to the current folder of the list.
*/
RootFolder: string;
/**
* The ID of the content type for New form.
*/
ContentTypeID?: string;
/**
* The ID of the item for Edit/Display forms.
*/
ID?: number;
/**
* Component properties
*/
properties?: unknown;
}
/**
* @internal
*/
export declare interface _IGenerateLocalizedManifestModuleExistingIntegrityOptions extends _IGenerateLocalizedManifestModuleOptionsBase {
generateIntegrity?: never;
assets?: never;
}
/**
* @internal
*/
export declare interface _IGenerateLocalizedManifestModuleGenerateIntegrityOptions extends _IGenerateLocalizedManifestModuleOptionsBase {
generateIntegrity?: boolean;
assets: WebpackAssets;
}
/**
* @internal
*/
export declare type _IGenerateLocalizedManifestModuleOptions = _IGenerateLocalizedManifestModuleGenerateIntegrityOptions | _IGenerateLocalizedManifestModuleExistingIntegrityOptions;
/**
* @internal
*/
export declare interface _IGenerateLocalizedManifestModuleOptionsBase {
bundleName: string;
localizedPaths: {
[locale: string]: string | IIntegrityPath;
};
firstPassLocaleRemapping: Map | undefined;
production: boolean;
selectedLocales: ReadonlySet | undefined;
}
declare interface IInfoPluginOptions {
terminal: ITerminal;
debugPageUrl: SPFxDebugPageUrl;
}
/**
* @internal
*/
export declare interface _ILegacyExternal {
moduleConfigurations: {
[externalName: string]: IModuleConfiguration;
};
assets: {
[name: string]: string;
};
}
/**
* @internal
*/
export declare interface _ILegacyLocalizationOptions {
configJson: IConfigJson;
terminal: ITerminal;
selectedLocales: ReadonlyArray | undefined;
buildFolder: string;
serveMode: boolean;
production: boolean;
hashSalt?: string | undefined;
}
/**
* @alpha
*/
export declare interface ILocalization {
getProjectLocalizedStringsAsync(): Promise;
getLocFileTranslations(absoluteFilePath: string): ITranslationsForLocFile;
getLocalizationConfigurationAsync(selectedLocales: Iterable): Promise;
}
/**
* @alpha
*/
export declare interface ILocalizationConfiguration {
localizationPlugin: LocalizationPlugin;
additionalPlugins?: webpack.WebpackPluginInstance[];
stringsLoaders: webpack.RuleSetRule[];
getMark: typeof getMark;
markEntity: typeof markEntity;
}
/**
* @beta
*/
export declare 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<_ILegacyExternal | undefined>;
/** @internal */
_manifestsJsFileMetadata?: _IManifestsFileMetadata;
/** @internal */
_flightedDependencyConfig?: _IFlightedDependencyConfig;
}
/**
* @internal
*/
export declare function _includeNonStandardExternal(name: string, external: _IDynamicExternalProject): void;
/**
* Configuration for a non-AMD external module
*
* @public
*/
export declare interface INonAMDExternalModuleConfig {
/**
* The path or URL to the bundled external non-AMD file
*/
path: string;
/**
* The name of the global variable where an non-AMD dependency drops its exports
*/
globalName: string;
/**
* The names of the non-AMD dependencies for this project
*/
globalDependencies?: string[];
}
/**
* @public
*/
export declare interface IPackageSolution extends IPackageSolutionConfig {
$schema: string;
}
/**
* @public
*/
export declare interface IPackageSolutionConfig {
paths: IPackageSolutionConfigPaths;
/** A mapping of extensions to content types for resources included in the package */
contentTypes: Record;
/**
* The definition of this solution's package, features, and components
*/
solution: ISolution;
}
/**
* @public
*/
export declare interface IPackageSolutionConfigPaths {
/**
* The packaging root folder. Defaults to './sharepoint'. All other paths are relative to this folder.
*/
packageDir: string;
/**
* The folder to write the raw package to disk for debugging. Defaults to 'solution/debug'
*/
debugDir: string;
/**
* The name of the sppkg to create (including extension) Defaults to 'ClientSolution.sppkg'
*/
zippedPackage: string;
/**
* The folder containing the custom feature xml to import into the package. Defaults to 'feature_xml'.
* Note that all files in this folder will be included in the SPPKG, however, you must create a .rels
* file for your custom feature for it to be included in the package manifest.
*/
featureXmlDir: string;
/**
* The directory containing Sharepoint assets (such as feature elements, element manifests, and upgrade actions),
* which will be automatically included in the sharepoint package. Defaults to 'assets'.
*/
sharepointAssetDir: string;
/**
* The directory containing teams assets (such as icons)
*/
teamsDir: string;
}
/**
* @beta
*/
export declare interface _IReferencedProject {
/**
* The creation time of the newest version of this manifest we've found
*/
manifestCreationTime: number;
/**
* The ID of the manifest.
*/
id: string;
/**
* The version of the manifest.
*/
version: string;
/**
* The project's manifest data
*/
manifestData: IClientSideComponentManifest;
/**
* The path to the manifest.
*/
manifestPath: string;
/**
* The name of the package, if it can be inferred. The name can only be inferred if it's in a project with only
* one manifest.
*/
packageName: string;
/**
* If set to true, this is an assembly manifest
*/
isAssembly: boolean;
}
/**
* @beta
*/
export declare type IReferencedProjectMap = _IVersionedIdMap<_IReferencedProject>;
/**
* @public
*/
export declare const IS_SPFX_WEBPACK_CONFIGURATION_SYMBOL: unique symbol;
/**
* @internal
*
* @remarks
* If this schema is updated, dependant schemas MUST also be updated, including the spfx-serve.schema.json.
* The spfx-serve.schema.json is the serve.schema.json file with the spfx-specific properties included. The
* merge is simple, but must be done manually whenever the serve.schema.json file is changed.
*/
export declare interface _IServeTaskConfig {
/**
* API server configuration
*/
api?: {
/**
* The port on which to run the API server
*/
port: number;
/**
* The path to the script to run as the API server
*/
entryPath: string;
};
/**
* The path to the page which should open automatically after this task completes. If you prefer no page to be
* launched, run the build with the "--nobrowser" flag
*/
initialPage?: string;
/**
* The port on which to host the file server.
*/
port?: number;
/**
* The name of the host on which serve is running. Defaults to 'localhost'
*/
hostname?: string;
/**
* IP address of the host on which serve is running.
* @remarks
* This parameter is helpful when using Docker containers. For example, to set the serve host as '0.0.0.0'.
*/
ipAddress?: string;
/**
* If true, the server should run on HTTPS
*/
https?: boolean;
/**
* The project relative path or array of paths to serve static content from.
*/
contentBase?: string | string[];
/**
* The URL path to serve static content requests from.
*/
contentBasePublicPath?: string;
/**
* Path to the HTTPS key
*/
keyPath?: string;
/**
* Path to the HTTPS cert
*/
certPath?: string;
/**
* Path to the HTTPS PFX cert
*/
pfxPath?: string;
/**
* If true, when serve is initialized and a dev certificate doesn't already exist and hasn't been
* specified, attempt to generate one and trust it automatically.
*
* defaults to false
*/
tryCreateDevCertificate?: boolean;
}
/**
* A list of asset files which will be automatically included.
* These are expected to be exist in the sharepointAssetDir.
*
* @public
*/
export declare interface ISharepointAssets {
/**
* A list of element filenames.
* Any supported files that accompany the element manifest will be an element file.
* For example, the list instance schema is an element manifest that is associated with a
* list instance that is defined in an element manifest.
*/
elementManifests?: T[];
/**
* A list of element manifest filenames.
*/
elementFiles?: T[];
/**
* A list of upgrade action filenames
*/
upgradeActions?: T[];
}
/**
* @public
*/
export declare interface ISolution {
name: string;
id: string;
title?: string;
supportedLocales?: string[];
version?: string;
features?: IFeature[];
iconPath?: string;
skipFeatureDeployment?: boolean;
includeClientSideAssets?: boolean;
clientSideAssets?: Array;
webApiPermissionRequests?: Array;
isDomainIsolated?: boolean;
developer?: IDevProperties;
metadata?: ISolutionMetadata;
}
/**
* @public
*/
export declare interface ISolutionAsset {
originalFilename: string;
packageFilename: string;
}
/**
* @public
*/
export declare interface ISolutionMetadata {
shortDescription?: ILocalizedString;
longDescription?: ILocalizedString;
screenshotPaths?: string[];
videoUrl?: string;
categories?: SolutionCategories[];
}
/**
* @internal
*/
export declare interface _ISolutionPackagerOptions {
buildFolder: string;
terminal: ITerminal;
emitError: (error: Error) => void;
emitWarning: (warning: Error) => void;
}
/**
* Options for sp-client dev-deploy
* @public
*/
export declare interface ISpDevDeployOptions extends IDevDeployOptions {
/**
* @internal
*/
_projectDiscoveryMode?: DependencyDiscoveryMode;
/**
* @internal
*/
_manifestsJsFileMetadata?: _IManifestsFileMetadata;
}
/**
* Describes the interface for serve.json config files in SPFx projects.
*
* @internal
*/
export declare interface _ISpfxServe extends _ISpfxServeTaskConfig {
$schema: string;
}
/**
* @internal
*/
export declare interface _ISpfxServeSessionConfiguration {
/**
* The fully-qualified URL of the page to launch
*/
pageUrl: string;
/**
* An optional list of custom actions to provide as query parameters to the page. The key of this
* object must be the ID of the custom action component.
*/
customActions?: {
[id: string]: _ICustomActionConfiguration;
};
/**
* An optional list of field customizers to provide as query parameters to the page. The key of this
* object must be the field ID the customizer applies to.
*/
fieldCustomizers?: {
[fieldName: string]: _IFieldCustomizerConfiguration;
};
/**
* An optional list of form customizers to provide as query parameters to the page. The key of this
* object must be the ID of the form component.
*/
formCustomizer?: _IFormCustomizerConfiguration;
}
/**
* @remarks
* If the GCB-serve schema is updated, this schema MUST also be updated. The spfx-serve.schema.json is
* the serve.schema.json file with the spfx-specific properties included. The merge is simple, but
* must be done manually whenever the serve.schema.json file in GCB is changed.
*
* @internal
*/
export declare interface _ISpfxServeTaskConfig extends _IServeTaskConfig {
serveConfigurations?: {
default: _ISpfxServeSessionConfiguration;
[id: string]: _ISpfxServeSessionConfiguration;
};
}
/**
* @public
*/
export declare interface ISpfxWebpackConfiguration extends IWebpackConfigurationWithDevServer {
[IS_SPFX_WEBPACK_CONFIGURATION_SYMBOL]: true;
[CONFIG_JSON_SYMBOL]: IConfigJson;
}
/**
* @public
*/
export declare interface ISpfxWebpackFolderPaths {
buildFolder: string;
tempFolder: string;
outputFolder: string;
releaseFolder: string;
}
/**
* @beta
*/
export declare interface ITranslationsForLocFile {
[locale: string]: Record;
}
/**
* Represents a file's local path and container-root-relative path in Azure Storage destination
* @internal
*/
export declare interface _IUploadableFile {
/**
* A container-root-relative path to the file's Azure Storage destination
*
* For example, if the account name is "example" the container's name is "files",
* and this property is "foo/bar/baz.json", the fully-qualified URL of the uploaded
* file will be:
* https://example.blob.core.windows.net/files/foo/bar/baz.json
*/
azurePath: string;
/**
* A fully-qualified filesystem path to a file.
*/
localPath: string;
blobHeaders?: BlobHTTPHeaders;
}
/**
* @beta
*/
export declare interface _IVersionedIdMap {
[id: string]: IVersionMap;
}
/**
* @beta
*/
export declare interface IVersionMap {
[version: string]: TMember;
}
/**
* Defines the necessary information to generate the WebApiPermissionRequests xml nodes.
*/
/**
* @public
*/
export declare interface IWebApiPermissionRequest {
resource: string;
scope: string;
appId?: string;
replyUrl?: string;
}
/**
* @public
*/
export declare interface IWebpackConfigurationGeneratorOptions {
configJson: IConfigJson;
folders: ISpfxWebpackFolderPaths;
terminal: ITerminal;
emitStats?: boolean;
production: boolean;
serveMode: boolean;
projectPackageJson: IPackageJson;
/**
* @alpha
*/
getLocalization?: () => ILocalization;
selectedLocales?: ReadonlyArray;
linkedExternalsToBundle?: string[];
disableAsyncComponentLoading?: boolean;
assetsAreVersioned?: boolean;
generateCssClassName?: GenerateCssClassNameFunction;
loadThemedStylesImportPath?: string;
releaseManifestFolderName?: string;
crossOriginLoading?: boolean;
buildSourceMaps?: boolean;
releaseMapFiles?: boolean;
sourceMapUrlFilter?: (url: string, resourcePath: string) => boolean | string;
/**
* @internal
*/
_manifestsJsFileMetadata?: _IManifestsFileMetadata;
/**
* @internal
*/
_includeIntegrityInManifestPaths?: boolean;
/**
* @internal
*/
_useManifestsJsonForComponentDependencies?: boolean;
/**
* @internal
*/
_moduleMinifier?: IModuleMinifier;
/**
* @internal
*/
_flightedDependencyConfig?: _IFlightedDependencyConfig;
}
/**
* @public
*/
export declare interface IWebpackConfigurationPluginAccessor {
properties: IWebpackConfigurationPluginAccessorProperties;
}
/**
* @public
*/
export declare interface IWebpackConfigurationPluginAccessorProperties {
linkedExternalsToBundle?: string[];
disableAsyncComponentLoading?: boolean;
assetsAreVersioned?: boolean;
generateCssClassName?: GenerateCssClassNameFunction;
loadThemedStylesImportPath?: string;
configJson?: IConfigJson;
buildSourceMaps?: boolean;
releaseMapFiles?: boolean;
sourceMapUrlFilter?: (url: string, resourcePath: string) => boolean | string;
/**
* @alpha
*/
getLocalization?: () => ILocalization;
releaseManifestFolderName?: string;
/**
* @internal
*/
_manifestsJsFileMetadata?: _IManifestsFileMetadata;
/**
* @internal
*/
_allowMissingConfigJson?: boolean;
/**
* @internal
*/
_includeIntegrityInManifestPaths?: boolean;
/**
* @internal
*/
_useManifestsJsonForComponentDependencies?: boolean;
/**
* @internal
*/
_moduleMinifier?: IModuleMinifier;
/**
* @internal
*/
_flightedDependencyConfig?: _IFlightedDependencyConfig;
}
/**
* @internal
*/
export declare interface _IWebpackEntrypoint {
readonly runtimeChunk: ILocalizedWebpackChunk;
}
/**
* @public
*/
export declare interface IWebpackServeConfigurationPluginAccessor {
properties: {
getAdditionalServePathsAsync?: () => Promise