@omnia/tooling-composers
Version:
Provide tooling to work with manifest things.
77 lines (76 loc) • 3.21 kB
TypeScript
import { BundleTargetTypes } from "./models/Enums";
import { ClientManifest, LoadableBundleManifest, BundleIdentity, RegiterApiConfiguration } from '../../fx-models';
export interface ResourceManifest extends ClientManifest {
/**
The unique id of the manifest, this will be the id of the resources added.
*/
resourceId: string;
/**
The friendly name of the manifest
*/
resourceName?: string;
/**
register owner api
*/
api?: string[];
/**
register extend api
*/
extendApi?: string[];
/**
register extend api configuration
*/
extendApiConfiguration?: {
[api: string]: Object;
};
/**
The configuration for register api
*/
registerApiConfiguration?: {
[api: string]: RegiterApiConfiguration;
};
/**
whether the resource manifest has the authentication disabled (used in non login routes, e.g. Login/OnBoarding)
*/
authDisabled?: boolean;
}
export declare class StaticClientLoadableManifestProviderProxy implements IClientLoadableManifestProvider {
getClientLoadableManifests: (currentServiceId: string) => Array<LoadableBundleManifest>;
clearState: () => void;
constructor(getClientLoadableManifestsFunc: (currentServiceId: string) => Array<LoadableBundleManifest>, clearStateFunc: () => void);
}
export interface IClientLoadableManifestProvider {
getClientLoadableManifests: (currentServiceId: string) => Array<LoadableBundleManifest>;
clearState: () => void;
}
export declare class LoadableManifestRegistry {
private static ManifestDependencies;
private static WithNoManifestDependencies;
private static ManifestFileTypes;
private static ManifestVersions;
private static ClientManifests;
private static RegisteredManifests;
private static ClientManifestProviders;
static getRegisteredManifest: (manifestId: string) => ResourceManifest;
static withNoDependency: (manifestId: string) => void;
static isDefineWithNoDependency: (manifestId: string) => boolean;
static addManifestDependency: (manifestId: string, dependentOnManifestId: string, dependentManifestOmniaServiceId?: string) => void;
static getManifestDependencies: (manifestId: string, currentServiceId: string) => Array<BundleIdentity>;
static getAllManifestDependencies: () => {
[manifestId: string]: any[];
};
static addManifestVersion: (manifestId: string, type: BundleTargetTypes, version: string) => void;
static getManifestVersion: (manifestId: string) => {
[key: string]: string;
};
static addManifestBundleType: (manifestId: string, type: BundleTargetTypes) => void;
static getManifestBundleTypes: (manifestId: string) => Array<BundleTargetTypes>;
static registerManifest: (manifest: ResourceManifest) => ResourceManifest;
static registerManifestProvider: (provider: IClientLoadableManifestProvider) => void;
static getClientManifests: (currentServiceId: string) => Array<ClientManifest>;
static clearState: () => void;
private static validateDependencies;
private static addClientManifest;
private static getDefaultDependencies;
private static Subscription;
}