@atomist/sdm-pack-aspect
Version:
an Atomist SDM Extension Pack for visualizing drift across an organization
101 lines • 3.99 kB
TypeScript
import { ExtensionPack, ExtensionPackMetadata } from "@atomist/sdm";
import { DeliveryGoals } from "@atomist/sdm-core";
import { Aspect, PublishFingerprints, RebaseOptions, VirtualProjectFinder } from "@atomist/sdm-pack-fingerprint";
import { AspectsFactory } from "@atomist/sdm-pack-fingerprint/lib/machine/fingerprintSupport";
import { RepositoryScorer, Tagger, TaggerDefinition, WorkspaceScorer } from "../aspect/AspectRegistry";
import { UndesirableUsageChecker } from "../aspect/ProblemStore";
import { AspectCompatibleScorer } from "../aspect/score/ScoredAspect";
import { ScoreWeightings } from "../scorer/Score";
/**
* Default VirtualProjectFinder, which recognizes Maven, npm,
* and Gradle projects and Python projects using requirements.txt.
*/
export declare const DefaultVirtualProjectFinder: VirtualProjectFinder;
export declare const DefaultScoreWeightings: ScoreWeightings;
/**
* Options to configure the aspect extension pack
*/
export interface AspectSupportOptions {
/**
* Aspects that cause this SDM to calculate fingerprints from projects
* and delivery events.
*/
aspects: Aspect | Aspect[];
/**
* Dynamically add aspects based on current push
*/
aspectsFactory?: AspectsFactory;
/**
* If set, this enables multi-project support by helping aspects work
* on virtual projects. For example, a VirtualProjectFinder may establish
* that subdirectories with package.json or requirements.txt files are
* subprojects, enabling aspects to work on their internal structure
* without needing to drill into the entire repository themselves.
*/
virtualProjectFinder?: VirtualProjectFinder;
/**
* Registrations that can tag projects based on fingerprints.
* Executed as fingerprints
*/
taggers?: Tagger | Tagger[];
/**
* Registrations that can tag projects based on fingerprints.
* Allows rapid in-memory use.
*/
inMemoryTaggers?: TaggerDefinition | TaggerDefinition[];
/**
* Scoring fingerprints. Name to scorers
*/
scorers?: Record<string, AspectCompatibleScorer | AspectCompatibleScorer[]>;
workspaceScorers?: WorkspaceScorer[];
/**
* Scorers that are computed in memory. Allows for faster iteration on scoring logic.
* May ultimately be promoted to scorers.
*/
inMemoryScorers?: RepositoryScorer | RepositoryScorer[];
/**
* Optional weightings for different scorers. The key is scorer name.
*/
weightings?: ScoreWeightings;
/**
* Set this to flag undesirable fingerprints: For example,
* a dependency you wish to eliminate from all projects, or
* an internally inconsistent fingerprint state.
*/
undesirableUsageChecker?: UndesirableUsageChecker;
/**
* Custom fingerprint routing. Used in local mode.
* Default behavior is to send fingerprints to Atomist.
*/
publishFingerprints?: PublishFingerprints;
/**
* Delivery goals to attach fingerprint behavior to, if provided.
* Delivery goals must have well-known names
*/
goals?: Partial<Pick<DeliveryGoals, "build" | "pushImpact">>;
/**
* If this is provided, it can distinguish the UI instance.
* Helps distinguish different SDMs during development.
*/
instanceMetadata?: ExtensionPackMetadata;
/**
* Optionally configure the rebase options for Code Transforms
*/
rebase?: RebaseOptions;
/**
* Optionally expose web endpoints
* Defaults to true in local mode
*/
exposeWeb?: boolean;
/**
* Optionally secure the api endpoints
* Defaults to false in local mode
*/
secureWeb?: boolean;
}
/**
* Return an extension pack to add aspect support with the given aspects to an SDM.
* If we're in local mode, expose analyzer commands and HTTP endpoints.
*/
export declare function aspectSupport(options: AspectSupportOptions): ExtensionPack;
//# sourceMappingURL=aspectSupport.d.ts.map