-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: refactor index page and extract common logic
commit 2765809 Author: Jingchao Di <[email protected]> Date: Mon May 13 08:51:01 2024 +0800 refactor: refactor index page and extract common logic
- Loading branch information
Showing
7 changed files
with
63 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import registerSyntax from '@/editor/syntax'; | ||
import registerER from '@/nodes/er'; | ||
import registerSyntax from '@/services/editor/syntax'; | ||
|
||
registerER(); | ||
registerSyntax(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { CompilerDiagnostic } from '@dbml/core'; | ||
import { CompilerError } from '@dbml/core/types/parse/error'; | ||
|
||
type ImportFormat = | ||
| 'dbml' | ||
| 'mysql' | ||
| 'postgres' | ||
| 'json' | ||
| 'mssql' | ||
| 'postgresLegacy'; | ||
type ExportFormat = 'dbml' | 'mysql' | 'postgres' | 'json' | 'mssql' | 'oracle'; | ||
|
||
export default function ErrorFmt(e: CompilerError): string { | ||
const diags = e.diags | ||
.map((d: CompilerDiagnostic) => { | ||
return `${d.location.start.line}:${d.location.start.column} ${d.message}`; | ||
}) | ||
.join('\n'); | ||
return diags; | ||
} | ||
|
||
export type { ExportFormat, ImportFormat }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.