Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 23 additions & 23 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"env": {
"node": true,
"es2021": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"no-console": "off"
},
"ignorePatterns": ["out/", "node_modules/", ".vscode-test/"]
}
{
"root": true,
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"env": {
"node": true,
"es2021": true
},
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"rules": {
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }],
"@typescript-eslint/no-explicit-any": "warn",
"no-console": "off"
},
"ignorePatterns": ["out/", "node_modules/", ".vscode-test/"]
}
20 changes: 10 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
101 changes: 68 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,33 +1,68 @@
name: CI

on:
push:
branches: [main]
pull_request:
branches: [main]

permissions:
contents: read

jobs:
build-and-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Compile
run: npm run compile

- name: Lint
run: npm run lint
name: CI

on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
strategy:
matrix:
node-version: [18, 20, 22]

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Compile
run: npm run compile

- name: Test
run: npm test

package:
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Package VSIX
run: npx @vscode/vsce package --no-dependencies

- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-schemaforge
path: "*.vsix"
60 changes: 60 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish to VS Code Marketplace

on:
release:
types: [published]
workflow_dispatch:
inputs:
target:
description: 'Publish target (marketplace or open-vsx)'
default: 'marketplace'
type: choice
options:
- marketplace
- open-vsx
- both

permissions:
contents: read

jobs:
publish-marketplace:
runs-on: ubuntu-latest
if: ${{ inputs.target == 'marketplace' || inputs.target == 'both' || github.event_name == 'release' }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Publish to VS Code Marketplace
run: npx @vscode/vsce publish -p ${{ secrets.VSCE_PAT }}
if: ${{ inputs.target != 'open-vsx' }}

publish-open-vsx:
runs-on: ubuntu-latest
if: ${{ inputs.target == 'open-vsx' || inputs.target == 'both' }}
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm

- name: Install dependencies
run: npm ci

- name: Publish to Open VSX Registry
run: npx ovsx publish -p ${{ secrets.OVSX_PAT }}
43 changes: 21 additions & 22 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
# Dependencies
node_modules/

# Build output
out/
*.vsix

# IDE
.vscode-test/
.vscode/*.log

# Temp files
.temp/

# OS files
.DS_Store
Thumbs.db

# Local opencode config
AGENTS.md
.agents/

# Dependencies
node_modules/

# Build output
out/
*.vsix

# IDE
.vscode-test/
.vscode/*.log

# Temp files
.temp/

# OS files
.DS_Store
Thumbs.db

# Local opencode config
.agents/

32 changes: 32 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# vscode-schemaforge

## Purpose
Bidirectional schema converter extension for VS Code — convert between SQL DDL, Prisma, Django, TypeORM, SQLAlchemy, Alembic, JSON Schema, GraphQL, EF Core, and Scala case classes.

## Build & Test Commands
- Install: `npm install`
- Test: `npm test` (runs vscode-test)
- Lint: `npm run lint` (eslint src --ext ts)
- Build: `npm run compile` (tsc -p ./)
- Pre-publish: `npm run vscode:prepublish`

## Architecture
Key directories:
- `src/` — Main extension source
- `extension.ts` — Extension entry point + activation
- `cli.ts` — SchemaForge CLI wrapper
- `commands/` — Convert, detect, diff command handlers
- `panels/` — Live preview WebView panel
- `providers/` — Custom editor provider
- `.github/workflows/` — CI/CD (2 workflows)
- `syntaxes/` — TextMate grammars
- `media/` — Icons/assets

## Conventions
- Language: TypeScript
- Test framework: @vscode/test-electron (vscode-test)
- CI: GitHub Actions (2 workflows)
- Linting: eslint with @typescript-eslint
- Compilation: TypeScript 5.3+
- VS Code Engine: ^1.85.0
- Publisher: revenue-holdings
42 changes: 21 additions & 21 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
MIT License

Copyright (c) 2026 Revenue Holdings

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
MIT License
Copyright (c) 2026 Revenue Holdings
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading