@dbml/core 6.5.0 → 7.0.0-alpha.0

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/core",
4
- "version": "6.5.0",
4
+ "version": "7.0.0-alpha.0",
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": "^6.5.0",
49
+ "@dbml/parse": "^7.0.0-alpha.0",
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": "9ed15e01a00d4f58564ccdfb75f2f85bf5de5199",
60
+ "gitHead": "cb925c52bc255aa63688dc04db48f2ad5d7129c9",
61
61
  "engines": {
62
62
  "node": ">=16"
63
63
  }
File without changes
File without changes
File without changes
File without changes
File without changes
package/types/index.d.ts CHANGED
@@ -36,4 +36,6 @@ export {
36
36
  tryExtractEnum,
37
37
  addDoubleQuoteIfNeeded,
38
38
  formatRecordValue,
39
+ syncDiagramView,
39
40
  } from '@dbml/parse';
41
+ export type { DiagramView, DiagramViewSyncOperation, FilterConfig } from '@dbml/parse';
@@ -4,7 +4,7 @@ import Field from './field';
4
4
  import Table from './table';
5
5
  import TablePartial from './tablePartial';
6
6
 
7
- export interface RawCheck {
7
+ interface RawCheck {
8
8
  token: Token;
9
9
  name: string;
10
10
  expression: string;
@@ -38,7 +38,6 @@ export interface RawTableRecord {
38
38
 
39
39
  export interface TableRecord extends RawTableRecord {
40
40
  id: number;
41
- tableId?: number;
42
41
  }
43
42
 
44
43
  export type NormalizedRecord = TableRecord;
@@ -13,5 +13,5 @@ export default class DbState {
13
13
  fieldId: number;
14
14
  indexColumnId: number;
15
15
  tablePartialId: number;
16
- generateId(el: string): number;
16
+ generateId(el: string): any;
17
17
  }
File without changes
File without changes
@@ -4,7 +4,7 @@ import Element, { Token, RawNote } from './element';
4
4
  import EnumValue from './enumValue';
5
5
  import Field from './field';
6
6
  import Schema from './schema';
7
- export interface RawEnum {
7
+ interface RawEnum {
8
8
  name: string;
9
9
  token: Token;
10
10
  values: EnumValue[];
@@ -2,7 +2,7 @@ import { NormalizedModel } from './database';
2
2
  import DbState from './dbState';
3
3
  import Element, { Token, RawNote } from './element';
4
4
  import Enum from './enum';
5
- export interface RawEnumValue {
5
+ interface RawEnumValue {
6
6
  name: string;
7
7
  token: Token;
8
8
  note: RawNote;
File without changes
File without changes
@@ -1,15 +1,7 @@
1
1
  import { NormalizedModel } from './database';
2
2
  import DbState from './dbState';
3
- import Element, { Token } from './element';
3
+ import Element from './element';
4
4
  import Index from './indexes';
5
-
6
- export interface RawIndexColumn {
7
- type: any;
8
- value: any;
9
- index: Index;
10
- token: Token;
11
- }
12
-
13
5
  declare class IndexColumn extends Element {
14
6
  type: any;
15
7
  value: any;
@@ -4,7 +4,7 @@ import Element, { RawNote, Token } from './element';
4
4
  import IndexColumn from './indexColumn';
5
5
  import Table from './table';
6
6
  import TablePartial from './tablePartial';
7
- export interface RawIndex {
7
+ interface RawIndex {
8
8
  columns: IndexColumn;
9
9
  type: any;
10
10
  unique: boolean;
@@ -4,7 +4,7 @@ import Schema from './schema';
4
4
  import DbState from './dbState';
5
5
  import Database, { NormalizedModel } from './database';
6
6
  import TablePartial from './tablePartial';
7
- export interface RawRef {
7
+ interface RawRef {
8
8
  name: string;
9
9
  color?: string;
10
10
  endpoints: Endpoint[];
File without changes
File without changes
@@ -6,9 +6,9 @@ import Schema from './schema';
6
6
  import DbState from './dbState';
7
7
  import TableGroup from './tableGroup';
8
8
  import TablePartial from './tablePartial';
9
- import { NormalizedModel, TableRecord } from './database';
9
+ import { NormalizedModel } from './database';
10
10
 
11
- export interface RawTable {
11
+ interface RawTable {
12
12
  name: string;
13
13
  alias: string;
14
14
  note: RawNote;
@@ -35,7 +35,6 @@ declare class Table extends Element {
35
35
  id: number;
36
36
  group: TableGroup;
37
37
  partials: TablePartial[];
38
- records: TableRecord[];
39
38
 
40
39
  constructor({ name, alias, note, fields, indexes, checks, schema, token, headerColor }: RawTable);
41
40
  generateId(): void;
@@ -116,7 +115,6 @@ declare class Table extends Element {
116
115
  note: string;
117
116
  headerColor: string;
118
117
  partials: TablePartial[];
119
- recordIds: number[];
120
118
  };
121
119
  normalize(model: NormalizedModel): void;
122
120
  }
@@ -130,7 +128,6 @@ export interface NormalizedTable {
130
128
  fieldIds: number[];
131
129
  indexIds: number[];
132
130
  checkIds: number[];
133
- recordIds: number[];
134
131
  schemaId: number;
135
132
  groupId: number | null;
136
133
  partials: TablePartial[];
@@ -4,7 +4,7 @@ import Element, { RawNote, Token} from './element';
4
4
  import Schema from './schema';
5
5
  import Table from './table';
6
6
 
7
- export interface RawTableGroup {
7
+ interface RawTableGroup {
8
8
  name: string;
9
9
  tables: Table[];
10
10
  schema: Schema;
@@ -5,7 +5,7 @@ import Check from './check';
5
5
  import DbState from './dbState';
6
6
  import { NormalizedModel } from './database';
7
7
 
8
- export interface RawTablePartial {
8
+ interface RawTablePartial {
9
9
  name: string;
10
10
  note: RawNote;
11
11
  fields: Field[];
File without changes
File without changes
File without changes