@dbml/parse 11.0.0-alpha.2 → 11.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { Filepath } from '../../../../core/types/filepath';
|
|
2
|
-
import { ElementDeclarationNode } from '../../../../core/types/nodes';
|
|
2
|
+
import { AttributeNode, ElementDeclarationNode, ListExpressionNode } from '../../../../core/types/nodes';
|
|
3
3
|
import { default as Compiler } from '../../../index';
|
|
4
|
+
import { TextEdit } from '../applyTextEdits';
|
|
4
5
|
export declare function archDeclarations(compiler: Compiler, filepath: Filepath): ElementDeclarationNode[];
|
|
5
6
|
export declare function findArchElement(compiler: Compiler, filepath: Filepath, handle: string): ElementDeclarationNode | undefined;
|
|
6
|
-
export
|
|
7
|
+
export type ArchLinkDefinition = {
|
|
8
|
+
kind: 'standalone';
|
|
9
|
+
declaration: ElementDeclarationNode;
|
|
10
|
+
} | {
|
|
11
|
+
kind: 'inline';
|
|
12
|
+
element: ElementDeclarationNode;
|
|
13
|
+
attribute: AttributeNode;
|
|
14
|
+
op: string;
|
|
15
|
+
};
|
|
16
|
+
export declare function findArchLink(compiler: Compiler, filepath: Filepath, from: string, to: string): ArchLinkDefinition | undefined;
|
|
17
|
+
export declare function removeAttributeEdit(list: ListExpressionNode, attribute: AttributeNode, source: string): TextEdit;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementDeclarationNode, ListExpressionNode, SyntaxNode } from '../types/nodes';
|
|
1
|
+
import { AttributeNode, ElementDeclarationNode, ListExpressionNode, SyntaxNode } from '../types/nodes';
|
|
2
2
|
import { ArchSettingValue, ArchSettings } from '../types/schemaJson';
|
|
3
3
|
export type ArchSort = 'node' | 'group' | 'note' | 'kind' | 'link' | 'metadata' | 'project';
|
|
4
4
|
export declare const declarationWord: (node: ElementDeclarationNode) => string | undefined;
|
|
@@ -30,6 +30,13 @@ export interface LinkParts {
|
|
|
30
30
|
infix: Infix;
|
|
31
31
|
}
|
|
32
32
|
export declare function linkPartsOf(declaration: ElementDeclarationNode): LinkParts | undefined;
|
|
33
|
+
export declare function isInlineLink(attribute: AttributeNode): boolean;
|
|
34
|
+
export declare function inlineLinksOf(declaration: ElementDeclarationNode): AttributeNode[];
|
|
35
|
+
export interface InlineLink {
|
|
36
|
+
op: string;
|
|
37
|
+
target: SyntaxNode;
|
|
38
|
+
}
|
|
39
|
+
export declare function inlineLinkOf(attribute: AttributeNode): InlineLink | undefined;
|
|
33
40
|
export interface Property {
|
|
34
41
|
key: string;
|
|
35
42
|
value: ArchSettingValue | undefined;
|
|
@@ -117,9 +117,10 @@ export declare class MetadataElementMetadata extends NodeMetadata {
|
|
|
117
117
|
owners(compiler: Compiler): NodeSymbol[];
|
|
118
118
|
}
|
|
119
119
|
export declare class LinkMetadata extends NodeMetadata {
|
|
120
|
-
declaration: ElementDeclarationNode;
|
|
120
|
+
declaration: ElementDeclarationNode | AttributeNode;
|
|
121
121
|
readonly kind = MetadataKind.Link;
|
|
122
|
-
constructor(declaration: ElementDeclarationNode);
|
|
122
|
+
constructor(declaration: ElementDeclarationNode | AttributeNode);
|
|
123
|
+
op(): string | undefined;
|
|
123
124
|
endpoints(compiler: Compiler): [NodeSymbol | undefined, NodeSymbol | undefined];
|
|
124
125
|
owners(compiler: Compiler): NodeSymbol[];
|
|
125
126
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/parse",
|
|
4
|
-
"version": "11.0.0-alpha.
|
|
4
|
+
"version": "11.0.0-alpha.3",
|
|
5
5
|
"description": "DBML parser v2",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"engines": {
|
|
52
52
|
"node": ">=18"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "41d44949afde7267a11bd9431ff5cbb7e3051b4d"
|
|
55
55
|
}
|