@dbml/parse 9.0.0-alpha.3 → 9.0.0-optional-ref.2
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.
- package/LICENSE +0 -0
- package/dist/__benchmarks__/compiler.benchmark.d.ts +0 -0
- package/dist/__benchmarks__/compiler.profile.d.ts +0 -0
- package/dist/dbml-parse.js +19 -22
- package/dist/dbml-parse.mjs +8564 -8807
- package/dist/index.d.ts +0 -0
- package/dist/src/compiler/index.d.ts +9 -10
- package/dist/src/compiler/projectLayout/index.d.ts +0 -0
- package/dist/src/compiler/projectLayout/layout.d.ts +0 -0
- package/dist/src/compiler/queries/canonicalName.d.ts +0 -0
- package/dist/src/compiler/queries/container/element.d.ts +0 -0
- package/dist/src/compiler/queries/container/index.d.ts +0 -0
- package/dist/src/compiler/queries/container/scope.d.ts +0 -0
- package/dist/src/compiler/queries/container/scopeKind.d.ts +0 -0
- package/dist/src/compiler/queries/container/stack.d.ts +0 -0
- package/dist/src/compiler/queries/container/token.d.ts +0 -0
- package/dist/src/compiler/queries/files/fileDependencies.d.ts +0 -0
- package/dist/src/compiler/queries/files/reachableFiles.d.ts +0 -0
- package/dist/src/compiler/queries/files/usableMembers.d.ts +0 -0
- package/dist/src/compiler/queries/legacy/parse.d.ts +0 -0
- package/dist/src/compiler/queries/legacy/symbol.d.ts +0 -0
- package/dist/src/compiler/queries/legacy/token.d.ts +0 -0
- package/dist/src/compiler/queries/nodeAtPosition.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/bind.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/index.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/interpret.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/parse.d.ts +0 -0
- package/dist/src/compiler/queries/pipeline/validate.d.ts +0 -0
- package/dist/src/compiler/queries/resolutionIndex.d.ts +0 -0
- package/dist/src/compiler/queries/symbol/lookupMembers.d.ts +0 -0
- package/dist/src/compiler/queries/symbol/symbolAliases.d.ts +0 -0
- package/dist/src/compiler/queries/symbol/symbolUses.d.ts +0 -0
- package/dist/src/compiler/queries/transform/addSetting.d.ts +14 -0
- package/dist/src/compiler/queries/transform/applyTextEdits.d.ts +0 -0
- package/dist/src/compiler/queries/transform/index.d.ts +2 -1
- package/dist/src/compiler/queries/transform/renameTable.d.ts +0 -0
- package/dist/src/compiler/queries/transform/syncDiagramView.d.ts +0 -0
- package/dist/src/compiler/queries/transform/updateSetting.d.ts +8 -0
- package/dist/src/compiler/queries/transform/utils.d.ts +0 -0
- package/dist/src/compiler/queries/utils.d.ts +0 -0
- package/dist/src/compiler/types.d.ts +7 -8
- package/dist/src/constants.d.ts +0 -0
- package/dist/src/core/global_modules/checks/bind.d.ts +0 -0
- package/dist/src/core/global_modules/checks/index.d.ts +0 -0
- package/dist/src/core/global_modules/checks/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/diagramView/bind.d.ts +0 -0
- package/dist/src/core/global_modules/diagramView/index.d.ts +0 -0
- package/dist/src/core/global_modules/diagramView/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/enum/bind.d.ts +0 -0
- package/dist/src/core/global_modules/enum/index.d.ts +0 -0
- package/dist/src/core/global_modules/enum/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/index.d.ts +0 -0
- package/dist/src/core/global_modules/indexes/bind.d.ts +0 -0
- package/dist/src/core/global_modules/indexes/index.d.ts +0 -0
- package/dist/src/core/global_modules/indexes/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/note/bind.d.ts +0 -0
- package/dist/src/core/global_modules/note/index.d.ts +0 -0
- package/dist/src/core/global_modules/note/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/program/bind.d.ts +0 -0
- package/dist/src/core/global_modules/program/index.d.ts +0 -0
- package/dist/src/core/global_modules/program/interpret.d.ts +2 -0
- package/dist/src/core/global_modules/program/utils.d.ts +0 -0
- package/dist/src/core/global_modules/project/bind.d.ts +0 -0
- package/dist/src/core/global_modules/project/index.d.ts +0 -0
- package/dist/src/core/global_modules/project/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/records/bind.d.ts +0 -0
- package/dist/src/core/global_modules/records/index.d.ts +0 -0
- package/dist/src/core/global_modules/records/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/fk.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/helper.d.ts +4 -17
- package/dist/src/core/global_modules/records/utils/constraints/index.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/pk.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/constraints/unique.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/data/index.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/data/sqlTypes.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/data/values.d.ts +0 -0
- package/dist/src/core/global_modules/records/utils/index.d.ts +0 -0
- package/dist/src/core/global_modules/ref/bind.d.ts +0 -0
- package/dist/src/core/global_modules/ref/constraint_fixes.d.ts +8 -0
- package/dist/src/core/global_modules/ref/index.d.ts +0 -1
- package/dist/src/core/global_modules/ref/interpret.d.ts +1 -0
- package/dist/src/core/global_modules/schema/index.d.ts +0 -0
- package/dist/src/core/global_modules/table/bind.d.ts +0 -2
- package/dist/src/core/global_modules/table/index.d.ts +0 -0
- package/dist/src/core/global_modules/table/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/table/utils.d.ts +0 -0
- package/dist/src/core/global_modules/tableGroup/bind.d.ts +0 -0
- package/dist/src/core/global_modules/tableGroup/index.d.ts +0 -0
- package/dist/src/core/global_modules/tableGroup/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/tablePartial/bind.d.ts +0 -0
- package/dist/src/core/global_modules/tablePartial/index.d.ts +0 -0
- package/dist/src/core/global_modules/tablePartial/interpret.d.ts +0 -0
- package/dist/src/core/global_modules/types.d.ts +0 -0
- package/dist/src/core/global_modules/use/index.d.ts +0 -0
- package/dist/src/core/global_modules/utils.d.ts +0 -2
- package/dist/src/core/lexer/lexer.d.ts +0 -0
- package/dist/src/core/lexer/utils.d.ts +0 -0
- package/dist/src/core/local_modules/checks/index.d.ts +0 -0
- package/dist/src/core/local_modules/checks/validate.d.ts +0 -0
- package/dist/src/core/local_modules/custom/index.d.ts +0 -0
- package/dist/src/core/local_modules/custom/validate.d.ts +0 -0
- package/dist/src/core/local_modules/diagramView/index.d.ts +0 -0
- package/dist/src/core/local_modules/diagramView/validate.d.ts +0 -0
- package/dist/src/core/local_modules/enum/index.d.ts +0 -0
- package/dist/src/core/local_modules/enum/validate.d.ts +0 -0
- package/dist/src/core/local_modules/index.d.ts +0 -0
- package/dist/src/core/local_modules/indexes/index.d.ts +0 -0
- package/dist/src/core/local_modules/indexes/validate.d.ts +0 -0
- package/dist/src/core/local_modules/note/index.d.ts +0 -0
- package/dist/src/core/local_modules/note/validate.d.ts +0 -0
- package/dist/src/core/local_modules/program/index.d.ts +0 -0
- package/dist/src/core/local_modules/program/validate.d.ts +0 -0
- package/dist/src/core/local_modules/project/index.d.ts +0 -0
- package/dist/src/core/local_modules/project/validate.d.ts +0 -0
- package/dist/src/core/local_modules/records/index.d.ts +0 -0
- package/dist/src/core/local_modules/records/validate.d.ts +0 -0
- package/dist/src/core/local_modules/ref/index.d.ts +0 -0
- package/dist/src/core/local_modules/ref/validate.d.ts +0 -0
- package/dist/src/core/local_modules/table/index.d.ts +0 -0
- package/dist/src/core/local_modules/table/validate.d.ts +0 -0
- package/dist/src/core/local_modules/tableGroup/index.d.ts +0 -0
- package/dist/src/core/local_modules/tableGroup/validate.d.ts +0 -0
- package/dist/src/core/local_modules/tablePartial/index.d.ts +0 -0
- package/dist/src/core/local_modules/tablePartial/validate.d.ts +0 -0
- package/dist/src/core/local_modules/types.d.ts +0 -0
- package/dist/src/core/local_modules/use/index.d.ts +0 -0
- package/dist/src/core/local_modules/use/validate.d.ts +0 -0
- package/dist/src/core/parser/contextStack.d.ts +0 -0
- package/dist/src/core/parser/factory.d.ts +0 -0
- package/dist/src/core/parser/parser.d.ts +0 -0
- package/dist/src/core/parser/utils.d.ts +0 -0
- package/dist/src/core/types/errors.d.ts +75 -52
- package/dist/src/core/types/filepath.d.ts +0 -0
- package/dist/src/core/types/index.d.ts +0 -0
- package/dist/src/core/types/internable.d.ts +0 -0
- package/dist/src/core/types/keywords.d.ts +0 -2
- package/dist/src/core/types/module.d.ts +0 -0
- package/dist/src/core/types/nodes.d.ts +0 -0
- package/dist/src/core/types/position.d.ts +0 -0
- package/dist/src/core/types/relation.d.ts +19 -0
- package/dist/src/core/types/report.d.ts +5 -3
- package/dist/src/core/types/schemaJson.d.ts +3 -35
- package/dist/src/core/types/symbol/factory.d.ts +0 -0
- package/dist/src/core/types/symbol/index.d.ts +0 -0
- package/dist/src/core/types/symbol/metadata.d.ts +25 -17
- package/dist/src/core/types/symbol/symbols.d.ts +4 -1
- package/dist/src/core/types/tokens.d.ts +0 -0
- package/dist/src/core/utils/chars.d.ts +0 -0
- package/dist/src/core/utils/expression.d.ts +0 -0
- package/dist/src/core/utils/interpret.d.ts +0 -0
- package/dist/src/core/utils/numbers.d.ts +0 -0
- package/dist/src/core/utils/span.d.ts +0 -0
- package/dist/src/core/utils/tokens.d.ts +0 -0
- package/dist/src/core/utils/validate.d.ts +0 -0
- package/dist/src/index.d.ts +2 -2
- package/dist/src/services/code_actions/provider.d.ts +8 -0
- package/dist/src/services/definition/provider.d.ts +0 -0
- package/dist/src/services/diagnostics/provider.d.ts +7 -1
- package/dist/src/services/index.d.ts +2 -1
- package/dist/src/services/monarch.d.ts +0 -0
- package/dist/src/services/references/provider.d.ts +0 -0
- package/dist/src/services/suggestions/crossFile.d.ts +0 -0
- package/dist/src/services/suggestions/provider.d.ts +0 -0
- package/dist/src/services/suggestions/recordRowSnippet.d.ts +0 -0
- package/dist/src/services/suggestions/use.d.ts +0 -0
- package/dist/src/services/suggestions/utils/index.d.ts +0 -0
- package/dist/src/services/suggestions/utils/useMerger.d.ts +0 -0
- package/dist/src/services/types.d.ts +5 -1
- package/dist/src/services/utils.d.ts +0 -0
- package/package.json +2 -2
- package/dist/src/compiler/queries/transform/syncDep.d.ts +0 -98
- package/dist/src/core/global_modules/dep/bind.d.ts +0 -15
- package/dist/src/core/global_modules/dep/index.d.ts +0 -2
- package/dist/src/core/global_modules/dep/interpret.d.ts +0 -34
- package/dist/src/core/local_modules/dep/index.d.ts +0 -2
- package/dist/src/core/local_modules/dep/validate.d.ts +0 -18
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { Dep } from '../../types/schemaJson';
|
|
2
|
-
import { DepMetadata, Filepath } from '../../types';
|
|
3
|
-
import { default as Compiler } from '../../../compiler';
|
|
4
|
-
import { default as Report } from '../../types/report';
|
|
5
|
-
export declare class DepInterpreter {
|
|
6
|
-
private compiler;
|
|
7
|
-
private metadata;
|
|
8
|
-
private declarationNode;
|
|
9
|
-
private filepath;
|
|
10
|
-
private dep;
|
|
11
|
-
constructor(compiler: Compiler, metadata: DepMetadata, filepath: Filepath);
|
|
12
|
-
interpret(): Report<Dep>;
|
|
13
|
-
private interpretName;
|
|
14
|
-
private interpretEdges;
|
|
15
|
-
/**
|
|
16
|
-
* Read settings into `dep.note` and `dep.custom`.
|
|
17
|
-
*
|
|
18
|
-
* Settings come from THREE sources, in this order:
|
|
19
|
-
* 1. The top-level attribute list on the Dep header
|
|
20
|
-
* (e.g. `Dep my_block [color: 'blue'] { ... }`).
|
|
21
|
-
* 2. Per-field setting lists inside the body
|
|
22
|
-
* (e.g. `Dep { a -> b [note: 'x'] }`).
|
|
23
|
-
* 3. Sub-element declarations inside the body
|
|
24
|
-
* (e.g. `Dep { a -> b; note: 'x'; materialized: 'view' }`).
|
|
25
|
-
*
|
|
26
|
-
* All three sources write into the same `custom` object (with `note`
|
|
27
|
-
* routed to the typed slot instead). Precedence is last-write-wins by
|
|
28
|
-
* virtue of plain object assignment — settings later in the source
|
|
29
|
-
* file overwrite earlier ones with the same key.
|
|
30
|
-
*/
|
|
31
|
-
private interpretSettings;
|
|
32
|
-
private consumeSettings;
|
|
33
|
-
private extractAttrValue;
|
|
34
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { default as Compiler } from '../../../compiler';
|
|
2
|
-
import { CompileError } from '../../types/errors';
|
|
3
|
-
import { BlockExpressionNode, ElementDeclarationNode, FunctionApplicationNode, ListExpressionNode } from '../../types/nodes';
|
|
4
|
-
import { default as Report } from '../../types/report';
|
|
5
|
-
import { Settings } from '../../utils/validate';
|
|
6
|
-
export default class DepValidator {
|
|
7
|
-
private declarationNode;
|
|
8
|
-
private compiler;
|
|
9
|
-
constructor(compiler: Compiler, declarationNode: ElementDeclarationNode);
|
|
10
|
-
validate(): CompileError[];
|
|
11
|
-
private validateContext;
|
|
12
|
-
private validateName;
|
|
13
|
-
private validateAlias;
|
|
14
|
-
validateBody(body?: FunctionApplicationNode | BlockExpressionNode): CompileError[];
|
|
15
|
-
validateFields(fields: FunctionApplicationNode[]): CompileError[];
|
|
16
|
-
private validateSubElements;
|
|
17
|
-
}
|
|
18
|
-
export declare function validateDepSettings(settings: ListExpressionNode): Report<Settings>;
|