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
53 changes: 53 additions & 0 deletions .github/workflows/pull-request-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: CI

on:
push:
pull_request:

permissions: {}

jobs:
build-and-test:
name: Lint, Build, Test
runs-on: ubuntu-latest
permissions:
contents: read

defaults:
run:
working-directory: extension

steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
persist-credentials: false

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # 6.4.0
with:
node-version: 22
cache: npm
cache-dependency-path: extension/package-lock.json

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Test
run: xvfb-run -a npm run test

- name: Package VSIX
run: npx @vscode/vsce package --out turtle-pr-${{ github.run_number }}.vsix

- name: Upload packaged VSIX artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
with:
name: turtle-vsix
path: extension/turtle-pr-${{ github.run_number }}.vsix
if-no-files-found: error
100 changes: 100 additions & 0 deletions .github/workflows/release-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Publish VS Code Extension

on:
workflow_dispatch:
inputs:
release_version:
description: 'Release version (semantic versioning, e.g. 1.2.3)'
required: true
type: string

permissions: {}

env:
RELEASE_VERSION: ${{ github.event.inputs.release_version }}

jobs:
publish:
name: Package and Publish to Marketplace
runs-on: ubuntu-latest
permissions:
contents: write
actions: read
issues: write
pull-requests: write

defaults:
run:
working-directory: extension

steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
persist-credentials: true

- name: Validate version input
run: |
if [[ ! "${RELEASE_VERSION}" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Error: '${RELEASE_VERSION}' is not a valid semantic version (expected format: X.Y.Z)"
exit 1
fi
echo "Version '${RELEASE_VERSION}' is valid."

- name: Setup Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # 6.4.0
with:
node-version: 22
package-manager-cache: false

- name: Set version in package.json
run: |
npm version --no-git-tag-version -- "${RELEASE_VERSION}"

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Test
run: xvfb-run -a npm run test

- name: Package VSIX
run: |
npx @vscode/vsce package --out "turtle-${RELEASE_VERSION}.vsix"

- name: Upload VSIX artifact
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f #v6.0.0
with:
name: turtle-vsix
path: extension/turtle-${{ env.RELEASE_VERSION }}.vsix
if-no-files-found: error

- name: Publish to VS Code Marketplace
run: npx @vscode/vsce publish --pat "${{ secrets.VS_MARKETPLACE_TOKEN }}"

- name: Commit version changes and push to upstream repository
uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
with:
branch: ${{ env.release_branch_name }}
commit_user_name: github-actions
commit_user_email: github-actions@github.com
commit_author: Author <actions@github.com>
file_pattern: 'package.json, package-lock.json'

- name: Create Github release (full)
uses: softprops/action-gh-release@de2c0eb89ae2a093876385947365aca7b0e5f844 # v0.1.15
with:
body: "Release version ${{ env.RELEASE_VERSION }}."
tag_name: v${{ env.RELEASE_VERSION }}
target_commitish: ${{ env.release_branch_name }}
draft: false
prerelease: false
files: |
turtle-${{ env.RELEASE_VERSION }}.vsix
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/zizmor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#
# Copyright (c) 2026 Robert Bosch Manufacturing Solutions GmbH, Germany. All rights reserved.
#
name: GitHub Actions SAST (zizmor)

on:
pull_request:
branches:
- main
push:
branches:
- main

permissions: {}

jobs:
zizmor:
runs-on: ubuntu-latest
permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 #v6.0.1
with:
persist-credentials: false

- name: Run zizmor (PR annotations)
uses: zizmorcore/zizmor-action@e639db99335bc9038abc0e066dfcd72e23d26fb4 # v0.3.0
with:
advanced-security: false
version: v1.22.0
annotations: true
persona: auditor
min-severity: medium
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.idea
22 changes: 22 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}/extension"
],
"sourceMaps": true,
"outFiles": [
"${workspaceFolder}/extension/out/**/*.js"
],
"resolveSourceMapLocations": [
"${workspaceFolder}/extension/out/**/*.js",
"!**/node_modules/**"
],
"preLaunchTask": "extension: build"
}
]
}
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"java.compile.nullAnalysis.mode": "automatic"
}
17 changes: 17 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "extension: build",
"type": "shell",
"command": "npm",
"args": [
"--prefix",
"${workspaceFolder}/extension",
"run",
"build"
],
"problemMatcher": []
}
]
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# esmf-vs-code-plugin
VS Code extension for editing Aspect Models
# esmf-vs-code-plugin
7 changes: 7 additions & 0 deletions extension/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
out
dist
node_modules
.vscode-test/
*.vsix
logs
.npm/
9 changes: 9 additions & 0 deletions extension/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"printWidth": 140,
"singleQuote": true,
"useTabs": false,
"tabWidth": 4,
"semi": true,
"bracketSpacing": false,
"arrowParens": "avoid"
}
9 changes: 9 additions & 0 deletions extension/.vscode-test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
files: 'out/test/**/*.test.js',
launchArgs: [
'--user-data-dir=/tmp/extension-vscode-test-user-data',
'--extensions-dir=/tmp/extension-vscode-test-extensions'
],
});
8 changes: 8 additions & 0 deletions extension/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"dbaeumer.vscode-eslint",
"ms-vscode.extension-test-runner"
]
}
21 changes: 21 additions & 0 deletions extension/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// A launch configuration that compiles the extension and then opens it inside a new window
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
{
"version": "0.2.0",
"configurations": [
{
"name": "Run Extension",
"type": "extensionHost",
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}"
}
]
}
11 changes: 11 additions & 0 deletions extension/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Place your settings in this file to overwrite default and user settings.
{
"files.exclude": {
"out": false // set this to true to hide the "out" folder with the compiled JS files
},
"search.exclude": {
"out": true // set this to false to include "out" folder in search results
},
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
"typescript.tsc.autoDetect": "off"
}
20 changes: 20 additions & 0 deletions extension/.vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "watch",
"problemMatcher": "$tsc-watch",
"isBackground": true,
"presentation": {
"reveal": "never"
},
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
11 changes: 11 additions & 0 deletions extension/.vscodeignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
.vscode/**
.vscode-test/**
src/**
.gitignore
.yarnrc
vsc-extension-quickstart.md
**/tsconfig.json
**/eslint.config.mjs
**/*.map
**/*.ts
**/.vscode-test.*
Loading