@dbml/core 9.0.0-alpha.7 → 9.0.0-alpha.8
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/lib/index.cjs +1 -1
- package/lib/index.mjs +19830 -19834
- package/package.json +3 -3
- package/types/index.d.ts +14 -0
- package/types/transform/index.d.ts +10 -5
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": "9.0.0-alpha.
|
|
4
|
+
"version": "9.0.0-alpha.8",
|
|
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": "^9.0.0-alpha.
|
|
49
|
+
"@dbml/parse": "^9.0.0-alpha.8",
|
|
50
50
|
"antlr4": "^4.13.1",
|
|
51
51
|
"lodash": "^4.18.1",
|
|
52
52
|
"lodash-es": "^4.18.1",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"bluebird": "^3.5.5"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "3049d76952a6bf7e05aa51188bf5546145ba2b17",
|
|
61
61
|
"engines": {
|
|
62
62
|
"node": ">=16"
|
|
63
63
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import importer from './import';
|
|
|
4
4
|
import exporter from './export';
|
|
5
5
|
import {
|
|
6
6
|
renameTable,
|
|
7
|
+
updateElementSetting,
|
|
7
8
|
syncDiagramView,
|
|
8
9
|
findDiagramViewBlocks,
|
|
9
10
|
syncDep,
|
|
@@ -11,6 +12,7 @@ import {
|
|
|
11
12
|
} from './transform';
|
|
12
13
|
export {
|
|
13
14
|
renameTable,
|
|
15
|
+
updateElementSetting,
|
|
14
16
|
syncDiagramView,
|
|
15
17
|
findDiagramViewBlocks,
|
|
16
18
|
syncDep,
|
|
@@ -46,6 +48,8 @@ export {
|
|
|
46
48
|
formatRecordValue,
|
|
47
49
|
DEFAULT_ENTRY,
|
|
48
50
|
Filepath,
|
|
51
|
+
SymbolKind,
|
|
52
|
+
MetadataKind,
|
|
49
53
|
} from '@dbml/parse';
|
|
50
54
|
|
|
51
55
|
// Re-export types
|
|
@@ -60,4 +64,14 @@ export type {
|
|
|
60
64
|
DepEndpointRef,
|
|
61
65
|
DepBlock,
|
|
62
66
|
TextEdit,
|
|
67
|
+
ElementIdentifier,
|
|
68
|
+
SchemaIdentifier,
|
|
69
|
+
TableIdentifier,
|
|
70
|
+
ColumnIdentifier,
|
|
71
|
+
EnumIdentifier,
|
|
72
|
+
EndpointRef,
|
|
73
|
+
RefIdentifier,
|
|
74
|
+
DepIdentifier,
|
|
75
|
+
NoteIdentifier,
|
|
76
|
+
TableGroupIdentifier,
|
|
63
77
|
} from '@dbml/parse';
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
import type {
|
|
2
2
|
DiagramViewSyncOperation, DiagramViewBlock, TextEdit,
|
|
3
|
-
DepSyncOperation, DepBlock,
|
|
3
|
+
DepSyncOperation, DepBlock, ElementIdentifier, TableIdentifier,
|
|
4
4
|
} from '@dbml/parse';
|
|
5
5
|
|
|
6
|
-
export type TableNameInput = string | { schema?: string; table: string };
|
|
7
|
-
|
|
8
6
|
export function renameTable(
|
|
9
|
-
oldName:
|
|
10
|
-
newName:
|
|
7
|
+
oldName: string | TableIdentifier,
|
|
8
|
+
newName: string | TableIdentifier,
|
|
11
9
|
dbmlCode: string
|
|
12
10
|
): string;
|
|
13
11
|
|
|
12
|
+
export function updateElementSetting(
|
|
13
|
+
dbmlCode: string,
|
|
14
|
+
target: ElementIdentifier,
|
|
15
|
+
settingName: string,
|
|
16
|
+
value: string | null | undefined,
|
|
17
|
+
): string;
|
|
18
|
+
|
|
14
19
|
export function syncDiagramView(
|
|
15
20
|
dbmlCode: string,
|
|
16
21
|
operations: DiagramViewSyncOperation[],
|