@dbml/core 6.5.0 → 7.0.0-alpha.1
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/README.md +0 -0
- package/lib/index.cjs +73 -65
- package/lib/index.mjs +875 -133
- package/package.json +3 -3
- package/types/export/DbmlExporter.d.ts +0 -0
- package/types/export/JsonExporter.d.ts +0 -0
- package/types/export/ModelExporter.d.ts +0 -0
- package/types/export/index.d.ts +0 -0
- package/types/import/index.d.ts +0 -0
- package/types/index.d.ts +5 -0
- package/types/model_structure/check.d.ts +0 -0
- package/types/model_structure/database.d.ts +0 -0
- package/types/model_structure/dbState.d.ts +0 -0
- package/types/model_structure/element.d.ts +0 -0
- package/types/model_structure/endpoint.d.ts +0 -0
- package/types/model_structure/enum.d.ts +0 -0
- package/types/model_structure/enumValue.d.ts +0 -0
- package/types/model_structure/field.d.ts +0 -0
- package/types/model_structure/index.d.ts +0 -0
- package/types/model_structure/indexColumn.d.ts +0 -0
- package/types/model_structure/indexes.d.ts +0 -0
- package/types/model_structure/ref.d.ts +0 -0
- package/types/model_structure/schema.d.ts +0 -0
- package/types/model_structure/stickyNote.d.ts +0 -0
- package/types/model_structure/table.d.ts +0 -0
- package/types/model_structure/tableGroup.d.ts +0 -0
- package/types/model_structure/tablePartial.d.ts +0 -0
- package/types/parse/Parser.d.ts +0 -0
- package/types/parse/error.d.ts +0 -0
- package/types/transform/index.d.ts +12 -0
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@dbml/core",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0-alpha.1",
|
|
5
5
|
"description": "> TODO: description",
|
|
6
6
|
"author": "Holistics <dev@holistics.io>",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"lint:fix": "eslint --fix ."
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@dbml/parse": "^
|
|
49
|
+
"@dbml/parse": "^7.0.0-alpha.1",
|
|
50
50
|
"antlr4": "^4.13.1",
|
|
51
51
|
"lodash": "^4.17.15",
|
|
52
52
|
"lodash-es": "^4.17.15",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"bluebird": "^3.5.5"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "283f3bcf7373ecab1e808e8a8035ce906ee6a52e",
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=16"
|
|
63
63
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/export/index.d.ts
CHANGED
|
File without changes
|
package/types/import/index.d.ts
CHANGED
|
File without changes
|
package/types/index.d.ts
CHANGED
|
@@ -4,9 +4,13 @@ import importer from './import';
|
|
|
4
4
|
import exporter from './export';
|
|
5
5
|
import {
|
|
6
6
|
renameTable,
|
|
7
|
+
syncDiagramView,
|
|
8
|
+
findDiagramViewBlocks,
|
|
7
9
|
} from './transform';
|
|
8
10
|
export {
|
|
9
11
|
renameTable,
|
|
12
|
+
syncDiagramView,
|
|
13
|
+
findDiagramViewBlocks,
|
|
10
14
|
importer,
|
|
11
15
|
exporter,
|
|
12
16
|
ModelExporter,
|
|
@@ -37,3 +41,4 @@ export {
|
|
|
37
41
|
addDoubleQuoteIfNeeded,
|
|
38
42
|
formatRecordValue,
|
|
39
43
|
} from '@dbml/parse';
|
|
44
|
+
export type { DiagramView, DiagramViewSyncOperation, DiagramViewBlock, FilterConfig, TextEdit } from '@dbml/parse';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/types/parse/Parser.d.ts
CHANGED
|
File without changes
|
package/types/parse/error.d.ts
CHANGED
|
File without changes
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { DiagramViewSyncOperation, DiagramViewBlock, TextEdit } from '@dbml/parse';
|
|
2
|
+
|
|
1
3
|
export type TableNameInput = string | { schema?: string; table: string };
|
|
2
4
|
|
|
3
5
|
export function renameTable(
|
|
@@ -5,3 +7,13 @@ export function renameTable(
|
|
|
5
7
|
newName: TableNameInput,
|
|
6
8
|
dbmlCode: string
|
|
7
9
|
): string;
|
|
10
|
+
|
|
11
|
+
export function syncDiagramView(
|
|
12
|
+
dbmlCode: string,
|
|
13
|
+
operations: DiagramViewSyncOperation[],
|
|
14
|
+
blocks?: DiagramViewBlock[],
|
|
15
|
+
): { newDbml: string; edits: TextEdit[] };
|
|
16
|
+
|
|
17
|
+
export function findDiagramViewBlocks(
|
|
18
|
+
dbmlCode: string,
|
|
19
|
+
): DiagramViewBlock[];
|