Skip to content

Commit abd140c

Browse files
committed
feat(prisma-ext): create prisma extension
1 parent f6b01e3 commit abd140c

25 files changed

+12716
-3
lines changed

.vscode/launch.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,18 @@
2828
"${workspaceFolder}/packages/dbml-vs-code-extension/dist/extension/*.js"
2929
],
3030
"preLaunchTask": "npm: build"
31+
},
32+
{
33+
"name": "Preview Prisma Extension",
34+
"type": "extensionHost",
35+
"request": "launch",
36+
"args": [
37+
"--extensionDevelopmentPath=${workspaceFolder}/packages/prisma-vs-code-extension"
38+
],
39+
"outFiles": [
40+
"${workspaceFolder}/packages/prisma-vs-code-extension/dist/extension/*.js"
41+
],
42+
"preLaunchTask": "npm: build:prisma"
3143
}
3244
]
3345
}

.vscode/tasks.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@
4444
"options": {
4545
"cwd": "${workspaceFolder}/packages/dbml-vs-code-extension"
4646
}
47+
},
48+
49+
// prisma
50+
{
51+
"type": "npm",
52+
"script": "build:prisma",
53+
"group": {
54+
"kind": "build",
55+
"isDefault": true
56+
},
57+
"problemMatcher": [],
58+
"options": {
59+
"cwd": "${workspaceFolder}/packages/prisma-vs-code-extension"
60+
}
4761
}
4862
]
4963
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"root": true,
3+
"parser": "@typescript-eslint/parser",
4+
"parserOptions": {
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"plugins": ["@typescript-eslint"],
9+
"rules": {
10+
"@typescript-eslint/naming-convention": [
11+
"warn",
12+
{
13+
"selector": "import",
14+
"format": ["camelCase", "PascalCase"]
15+
}
16+
],
17+
"@typescript-eslint/semi": "warn",
18+
"curly": "warn",
19+
"eqeqeq": "warn",
20+
"no-throw-literal": "warn",
21+
"semi": "off"
22+
},
23+
"ignorePatterns": ["out", "dist", "**/*.d.ts"]
24+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
dist
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
.vscode/**
2+
.vscode-test/**
3+
out/**
4+
node_modules/**
5+
src/**
6+
.gitignore
7+
.yarnrc
8+
webpack.config.js
9+
vsc-extension-quickstart.md
10+
**/tsconfig.json
11+
**/.eslintrc.json
12+
**/*.map
13+
**/*.ts
14+
**/.vscode-test.*
15+
*.vsix
16+
extension/**
17+
index.html
18+
vite.config.js
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--ignore-engines true
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Change Log
2+
3+
All notable changes to the "prisma-erd-visualizer" extension will be documented in this file.
4+
5+
Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6+
7+
## [0.0.1]
8+
9+
### Added
10+
11+
- Create diagram from Prisma code
12+
- Add light and dark theme
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License
2+
3+
Copyright (c) 2024 DBSchemaVisualizer
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Prisma ERD Visualizer
2+
3+
Allow to visualize the database schema in ERD ( Entity Relationship Diagram ) from .prisma file in your vscode.
4+
5+
## Features
6+
7+
![Demo](https://github.com/BOCOVO/db-schema-visualizer/assets/51182814/a59fd0c0-246d-4f00-be39-9885d88b8b85)
8+
9+
- Create Entity Relationship Diagram from your prisma file
10+
- Allow you to drag diagrams
11+
- Support both light and dark themes
12+
13+
## Extension Settings
14+
15+
The following Visual Studio Code settings are available for the extension.
16+
17+
- `prismaERDPreviewer.preferredTheme`: This configuration define the theme to use. There are two different theme the `light` and `dark`. The default theme is `dark`.
18+
19+
## Release Notes
20+
21+
Release notes are [here](./CHANGELOG.md)
22+
23+
## Author
24+
25+
[@BOCOVO](https://github.com/BOCOVO)

0 commit comments

Comments
 (0)