@supernovaio/cli
Version:
Supernova.io Command Line Interface
93 lines • 2.73 kB
TypeScript
export declare const analyzerNames: readonly ["static-components", "typescript-api", "storybook-stories", "storybook-docs", "jsdoc", "component-usage"];
export type AnalyzerName = (typeof analyzerNames)[number];
export type AnalyzerStatus = "done" | "warning" | "skipped" | "failed";
export type ComponentExportType = "explicit-export" | "inferred-export" | "star-export";
export type ComponentEnrichmentStatus = "full" | "partial" | "none";
export type ComponentDescriptor = {
componentKey: string;
componentPath: string;
exportName: string;
enrichmentStatus?: ComponentEnrichmentStatus;
exportType?: ComponentExportType;
};
export type ComponentApiProperty = {
name: string;
required: boolean;
type: string;
};
export type LinkedTypeRecord = {
definition: string;
lineEnd: number;
lineStart: number;
name: string;
sourcePath: string;
};
export type ComponentApiRecord = {
linkedTypes?: LinkedTypeRecord[];
props: ComponentApiProperty[];
sourcePath: string;
};
export type StoryRecord = {
lineEnd: number;
lineStart: number;
snippet: string;
storyName: string;
storyPath: string;
};
export type DocRecord = {
content?: string;
docPath: string;
kind: "doc" | "reference";
lineEnd: number;
lineStart: number;
score: number;
snippet?: string;
title?: string;
};
export type JsDocRecord = {
description: string;
sourcePath: string;
};
export type UsageSnippet = {
lineEnd: number;
lineStart: number;
sourcePath: string;
snippet: string;
};
export type PropValueUsage = {
count: number;
value: string;
};
export type PropUsageRecord = {
count: number;
values: PropValueUsage[];
};
export type UsageRecord = {
count: number;
files: string[];
propUsage?: Record<string, PropUsageRecord>;
snippets: UsageSnippet[];
};
export type StaticComponentAnalyzerResult = {
components: ComponentDescriptor[];
jsdocByComponentKey: Record<string, JsDocRecord>;
typescriptApiByComponentKey: Record<string, ComponentApiRecord>;
};
export type ComponentUsageRecordsByPackage = Record<string, Record<string, UsageRecord>>;
export type AnalyzerArtifacts = {
componentUsage: ComponentUsageRecordsByPackage;
jsdoc: Record<string, JsDocRecord>;
staticComponents: ComponentDescriptor[];
storybookDocs: Record<string, DocRecord[]>;
storybookStories: Record<string, StoryRecord[]>;
typescriptApi: Record<string, ComponentApiRecord>;
};
export type AnalyzerRun = {
analyzer: AnalyzerName;
durationMs: number;
finishedAt: string;
message?: string;
startedAt: string;
status: AnalyzerStatus;
};
//# sourceMappingURL=types.d.ts.map