Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@vuedx/vue-virtual-textdocument
Advanced tools
A virtual filesystem to access blocks in SFC as files
An implementation of virtual filesystem for accessing blocks in a .vue
file as independent files.
npm add @vuedx/vue-virtual-textdocument
Signature:
export declare class VueSFCDocument implements TextDocument {
get blocks(): SFCBlock[];
static create(fileName: string, content: string, options?: Omit<CompileOptions, 'cache' | 'fileName'>, version?: number): VueSFCDocument;
get descriptor(): SFCDescriptor;
get errors(): Array<CompilerError | SyntaxError>;
get fileName(): string;
findGeneratedTextSpan(spanInOriginalText: TextSpan): TextSpan | null;
findMapping(positionType: 'original' | 'generated', position: Position, searchBias?: SourceMapBiasType): Mapping | null;
findOriginalTextSpan(spanInGeneratedText: TextSpan): TextSpan | null;
get generated(): TextDocument;
readonly generatedFileName: string;
generatedOffsetAt(offset: number): number | null;
generatedPositionFor(position: Position): Position | null;
getBlockAt(offset: number): SFCBlock | null;
getLineAndCharacterOfPosition(position: number): Position;
getSourceFile(fileName?: string): {
fileName: string;
readonly text: string;
lineMap: unknown;
getLineAndCharacterOfPosition: (position: number) => Position;
};
getText(range?: Range): string;
get languageId(): string;
get lineCount(): number;
lineMap: unknown | undefined;
get map(): string;
offsetAt(position: Position): number;
readonly options: Required<CompileOptions>;
get original(): TextDocument;
readonly originalFileName: string;
originalOffsetAt(offset: number): number | null;
originalPositionFor(position: Position): Position | null;
positionAt(offset: number): Position;
get snapshot(): VueToTsxSnapshot;
get templateAST(): RootNode | undefined;
get text(): string;
update(changes: TextDocumentContentChangeEvent[], version: number): void;
get uri(): string;
get version(): number;
}
Members:
Signature:
static create(fileName: string, content: string, options?: Omit<CompileOptions, 'cache' | 'fileName'>, version?: number): VueSFCDocument;
Parameter | Type | Description |
---|---|---|
fileName | string | - |
content | string | - |
options | Omit<CompileOptions, 'cache' | 'fileName'> | - |
version | number | - |
Signature:
findGeneratedTextSpan(spanInOriginalText: TextSpan): TextSpan | null;
Parameter | Type | Description |
---|---|---|
spanInOriginalText | TextSpan | - |
Signature:
findMapping(positionType: 'original' | 'generated', position: Position, searchBias?: SourceMapBiasType): Mapping | null;
Parameter | Type | Description |
---|---|---|
positionType | 'original' | 'generated' | - |
position | Position | - |
searchBias | SourceMapBiasType | - |
Signature:
findOriginalTextSpan(spanInGeneratedText: TextSpan): TextSpan | null;
Parameter | Type | Description |
---|---|---|
spanInGeneratedText | TextSpan | - |
Signature:
generatedOffsetAt(offset: number): number | null;
Parameter | Type | Description |
---|---|---|
offset | number | - |
Signature:
generatedPositionFor(position: Position): Position | null;
Parameter | Type | Description |
---|---|---|
position | Position | - |
Signature:
getBlockAt(offset: number): SFCBlock | null;
Parameter | Type | Description |
---|---|---|
offset | number | - |
Signature:
getLineAndCharacterOfPosition(position: number): Position;
Parameter | Type | Description |
---|---|---|
position | number | - |
Signature:
getSourceFile(fileName?: string): {
fileName: string;
readonly text: string;
lineMap: unknown;
getLineAndCharacterOfPosition: (position: number) => Position;
};
Parameter | Type | Description |
---|---|---|
fileName | string | - |
Signature:
getText(range?: Range): string;
Parameter | Type | Description |
---|---|---|
range | Range | - |
Signature:
offsetAt(position: Position): number;
Parameter | Type | Description |
---|---|---|
position | Position | - |
Signature:
originalOffsetAt(offset: number): number | null;
Parameter | Type | Description |
---|---|---|
offset | number | - |
Signature:
originalPositionFor(position: Position): Position | null;
Parameter | Type | Description |
---|---|---|
position | Position | - |
Signature:
positionAt(offset: number): Position;
Parameter | Type | Description |
---|---|---|
offset | number | - |
Signature:
update(changes: TextDocumentContentChangeEvent[], version: number): void;
Parameter | Type | Description |
---|---|---|
changes | TextDocumentContentChangeEvent[] | - |
version | number | - |
export interface TextSpan {
length: number;
start: number;
}
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.
FAQs
A virtual filesystem to access blocks in SFC as files
The npm package @vuedx/vue-virtual-textdocument receives a total of 2,631 weekly downloads. As such, @vuedx/vue-virtual-textdocument popularity was classified as popular.
We found that @vuedx/vue-virtual-textdocument 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
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.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.