Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@vuedx/analyze
Advanced tools
Extracts public API information from Vue component.
A tool to statically analyze Vue single file components.
This package is part of VueDX project, maintained by Rahul Kadyan. You can 💖 sponsor him for continued development of this package and other VueDX tools.
Signature:
declare class ConfiguredVueProject extends VueProject {
constructor(rootDir: string, packageFile: string | undefined, packageJSON: Partial<PackageJSON>, configFile: string, config: Readonly<ProjectConfig>, requireModule?: NodeJS.Require);
readonly configFile: string;
kind: "configured";
protected refresh(): void;
setFileNames(fileNames: string[]): void;
}
Members:
Signature:
protected refresh(): void;
Signature:
setFileNames(fileNames: string[]): void;
Parameter | Type | Description |
---|---|---|
fileNames | string[] | - |
Signature:
declare class InferredVueProject extends VueProject {
kind: "inferred";
protected refresh(): void;
}
Members:
Signature:
protected refresh(): void;
Signature:
declare abstract class VueProject {
protected _config: Readonly<ProjectConfigNormalized>;
protected _externalComponents: ComponentRegistrationInfo[];
protected _fileNames: string[];
protected _globalComponents: ComponentRegistrationInfo[];
protected _projectComponents: Map<string, ComponentRegistrationInfo[]>;
protected _version: string;
constructor(rootDir: string, packageFile: string | undefined, packageJSON: Partial<PackageJSON>, requireModule?: NodeJS.Require);
get components(): ComponentRegistrationInfo[];
get config(): Readonly<ProjectConfigNormalized>;
get fileNames(): string[];
get globalComponents(): ComponentRegistrationInfo[];
protected isDirty: boolean;
abstract kind: 'inferred' | 'configured';
protected loadGlobalComponents(): void;
markDirty(): void;
readonly packageFile: string | undefined;
packageJSON: PackageJSON;
protected abstract refresh(): void;
protected reloadIfNeeded(): void;
protected readonly requireModule: NodeJS.Require;
readonly rootDir: string;
setConfig(config: ProjectConfig): void;
setFileNames(fileNames: string[]): void;
get version(): string;
get vueFileNames(): string[];
}
Members:
Signature:
protected loadGlobalComponents(): void;
Signature:
markDirty(): void;
Signature:
protected abstract refresh(): void;
Signature:
protected reloadIfNeeded(): void;
Signature:
setConfig(config: ProjectConfig): void;
Parameter | Type | Description |
---|---|---|
config | ProjectConfig | - |
Signature:
setFileNames(fileNames: string[]): void;
Parameter | Type | Description |
---|---|---|
fileNames | string[] | - |
Signature:
declare function createAnalyzer(plugins: Plugin[], options?: Partial<Context['parsers']>): Analyzer;
Parameter | Type | Description |
---|---|---|
plugins | Plugin[] | - |
options | Partial<Context['parsers']> | - |
Signature:
declare function createFullAnalyzer(plugins?: Plugin[], options?: Partial<Context['parsers']>): ReturnType<typeof createAnalyzer>;
Parameter | Type | Description |
---|---|---|
plugins | Plugin[] | - |
options | Partial<Context['parsers']> | - |
Signature:
declare function createSourceRange(context: Context | ScriptAnalyzerContext, node: Node): SourceRange;
Parameter | Type | Description |
---|---|---|
context | Context | ScriptAnalyzerContext | - |
node | Node | - |
Signature:
declare function toVeturData(components: ComponentInfo[]): VeturData;
Parameter | Type | Description |
---|---|---|
components | ComponentInfo[] | - |
Signature:
declare function toWebTypes(name: string, version: string, components: ComponentInfo[]): WebTypes;
Parameter | Type | Description |
---|---|---|
name | string | - |
version | string | - |
components | ComponentInfo[] | - |
Signature:
declare function transformToFunction(content: string, options?: FunctionTransformOptions): string;
Parameter | Type | Description |
---|---|---|
content | string | - |
options | FunctionTransformOptions | - |
interface Analyzer {
analyze(content: string, fileName?: string): ComponentInfo;
analyzeScript(content: string, fileName?: string, mode?: 'script' | 'scriptSetup'): ComponentInfo;
analyzeTemplate(content: string, fileName?: string): ComponentInfo;
}
interface ComponentInfo extends Taggable {
aliases: string[];
components: LocalComponentRegistrationInfo[];
description: string;
emits: EmitInfo[];
errors: SyntaxError[];
fileName: string;
fnSetupOption?: SetupInfo;
identifierSource: Record<string, IdentifierSource>;
name: string;
options?: ComponentOptionsInfo;
props: PropInfo[];
scriptSetup?: ScriptSetupInfo;
}
interface ComponentRegistrationInfo {
aliases: string[];
name: string;
source: ImportSource;
}
interface EmitInfo extends Taggable, Addressable {
description: string;
isDynamic: boolean;
isInferred: boolean;
name: string;
references: SourceRange[];
type: TypeInfo[];
}
interface IdentifierSource extends Addressable {
name: string;
}
interface ImportSource {
exportName?: string;
localName: string;
moduleName: string;
}
interface ImportSourceWithLocation extends ImportSource, Addressable {
}
interface LocalComponentRegistrationInfo extends ComponentRegistrationInfo, Addressable {
kind: 'script' | 'scriptSetup';
source: ImportSourceWithLocation;
}
interface Plugin {
babel?: AbstractScriptAnalyzerFn | AbstractAnalyzerHandler;
blocks?: Partial<{
script: BlockAnalyzer<SFCScriptBlock>;
template: BlockAnalyzer<SFCTemplateBlock>;
style: BlockAnalyzer<SFCStyleBlock>;
}> & Record<string, BlockAnalyzer<any>>;
declaration?: ComponentDeclarationAnalyzer[];
options?: ComponentOptionsAnalyzer[] | Record<string, AbstractScriptAnalyzerFn<ObjectMember>>;
setup?: ComponentSetupFnAnalyzer[];
templateExpression?(node: File, context: Context): void;
}
interface PropInfo extends Taggable, Addressable {
defaultValue: ValueInfo | null;
description: string;
name: string;
required: boolean;
type: TypeInfo[];
}
interface ScriptSetupInfo {
defineEmit?: Addressable;
defineProps?: Addressable;
}
interface SetupInfo extends Addressable {
context?: {
identifiers: Partial<{
attrs: string;
slots: string;
emit: string;
}>;
rest?: string;
} & Addressable;
props?: {
identifiers: string[];
rest?: string;
} & Addressable;
return?: Addressable;
}
interface SourceRange {
end: SourceLocation;
source: string;
start: SourceLocation;
}
interface SyntaxError {
loc: SourceLocation;
message: string;
}
interface VeturData {
attributes: Record<string, {
type: string;
description: string;
}>;
tags: Record<string, {
description: string;
attributes: string[];
}>;
}
interface WebTypes {
contributions: {
'types-syntax': 'typescript';
'description-markup': 'html' | 'markdown' | 'none';
tags: Tag[];
attributes: Attribute[];
};
framework: 'vue';
name: string;
version: string;
}
FAQs
Extracts public API information from Vue component.
The npm package @vuedx/analyze receives a total of 211 weekly downloads. As such, @vuedx/analyze popularity was classified as not popular.
We found that @vuedx/analyze demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.