Skip to content

Commit 87a2e94

Browse files
committed
Initial commit: Production-ready XsltDebugger VS Code extension
- Upgraded to .NET 8.0 for better performance and security - Added comprehensive CI/CD with GitHub Actions - Enhanced error handling and logging throughout - Fixed all test cases and improved test coverage - Updated ignore files for proper packaging - Resolved C# compilation conflicts - Improved documentation with setup and usage guides - Maintained XSLT 1.0 support with robust debugging capabilities - Clean architecture with IXsltEngine interface and multiple engine support - Added extension function support with dynamic C# compilation - Comprehensive breakpoint and stepping functionality
0 parents  commit 87a2e94

35 files changed

Lines changed: 6224 additions & 0 deletions

.github/workflows/ci.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: '18'
20+
cache: 'npm'
21+
22+
- name: Setup .NET
23+
uses: actions/setup-dotnet@v4
24+
with:
25+
dotnet-version: '8.0.x'
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Compile TypeScript
31+
run: npm run compile
32+
33+
- name: Lint
34+
run: npm run lint
35+
36+
- name: Build C# Debug Adapter
37+
run: dotnet build --configuration Release ./XsltDebugger.DebugAdapter
38+
39+
- name: Run tests
40+
uses: coactions/setup-xvfb@v1
41+
with:
42+
run: npm test

.gitignore

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
out
2+
dist
3+
node_modules
4+
.vscode-test/
5+
*.vsix
6+
7+
# .NET
8+
bin/
9+
obj/
10+
*.user
11+
*.suo
12+
*.cache
13+
*.log
14+
*.tmp
15+
16+
# OS generated files
17+
.DS_Store
18+
.DS_Store?
19+
._*
20+
.Spotlight-V100
21+
.Trashes
22+
ehthumbs.db
23+
Thumbs.db
24+
25+
# IDE
26+
.vscode/settings.json
27+
.vscode/launch.json
28+
.idea/
29+
30+
# Logs
31+
logs
32+
*.log
33+
npm-debug.log*
34+
yarn-debug.log*
35+
yarn-error.log*
36+
37+
# Runtime data
38+
pids
39+
*.pid
40+
*.seed
41+
*.pid.lock
42+
43+
# Coverage directory used by tools like istanbul
44+
coverage/
45+
46+
# nyc test coverage
47+
.nyc_output
48+
49+
# Dependency directories
50+
jspm_packages/
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional REPL history
56+
.node_repl_history
57+
58+
# Output of 'npm pack'
59+
*.tgz
60+
61+
# Yarn Integrity file
62+
.yarn-integrity
63+
64+
# dotenv environment variables file
65+
.env
66+
67+
# Temporary folders
68+
tmp/
69+
temp/

.vscode-test.mjs

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+
});

.vscode/extensions.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
// See http://go.microsoft.com/fwlink/?LinkId=827846
3+
// for the documentation about the extensions.json format
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint",
6+
"ms-vscode.extension-test-runner"
7+
]
8+
}

.vscode/launch.json.bak

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Backup of original launch.json
2+
// Generated automatically by patch
3+
4+
...existing code...

.vscode/tasks.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// See https://go.microsoft.com/fwlink/?LinkId=733558
2+
// for the documentation about the tasks.json format
3+
{
4+
"version": "2.0.0",
5+
"tasks": [
6+
{
7+
"type": "npm",
8+
"script": "watch",
9+
"problemMatcher": "$tsc-watch",
10+
"isBackground": true,
11+
"presentation": {
12+
"reveal": "never"
13+
},
14+
"group": {
15+
"kind": "build",
16+
"isDefault": true
17+
}
18+
}
19+
]
20+
}

.vscode/xslt-debug.launch.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Debug XSLT (Compiled)",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"program": "${workspaceFolder}/XsltDebugger.DebugAdapter/bin/Debug/net6.0/XsltDebugger.DebugAdapter.dll",
9+
"args": [],
10+
"cwd": "${workspaceFolder}",
11+
"stopAtEntry": false,
12+
"engine": "compiled",
13+
"stylesheet": "${workspaceFolder}/sample/sample.xslt",
14+
"xml": "${workspaceFolder}/sample/sample.xml"
15+
},
16+
{
17+
"name": "Debug XSLT (Inline C#)",
18+
"type": "coreclr",
19+
"request": "launch",
20+
"program": "${workspaceFolder}/XsltDebugger.DebugAdapter/bin/Debug/net6.0/XsltDebugger.DebugAdapter.dll",
21+
"args": [],
22+
"cwd": "${workspaceFolder}",
23+
"stopAtEntry": false,
24+
"engine": "compiled",
25+
"stylesheet": "${workspaceFolder}/sample/sample-inline-cs.xslt",
26+
"xml": "${workspaceFolder}/sample/sample.xml"
27+
},
28+
{
29+
"name": "Debug XSLT (Saxon)",
30+
"type": "coreclr",
31+
"request": "launch",
32+
"program": "${workspaceFolder}/XsltDebugger.DebugAdapter/bin/Debug/net6.0/XsltDebugger.DebugAdapter.dll",
33+
"args": [],
34+
"cwd": "${workspaceFolder}",
35+
"stopAtEntry": false,
36+
"engine": "saxon",
37+
"stylesheet": "${workspaceFolder}/sample/sample.xslt",
38+
"xml": "${workspaceFolder}/sample/sample.xml"
39+
},
40+
{
41+
"type": "xslt",
42+
"request": "launch",
43+
"name": "Debug XSLT (.NET Hybrid)",
44+
"stylesheet": "${workspaceFolder}/sample/sample-inline-cs.xslt",
45+
"xml": "${workspaceFolder}/sample/sample.xml",
46+
"engine": "xsltcompiled"
47+
}
48+
]
49+
}

.vscodeignore

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.vscode/**
2+
.vscode-test/**
3+
src/**
4+
.gitignore
5+
.vscodeignore
6+
.yarnrc
7+
vsc-extension-quickstart.md
8+
**/tsconfig.json
9+
**/eslint.config.mjs
10+
**/*.map
11+
**/*.ts
12+
**/.vscode-test.*
13+
.github/**
14+
15+
# .NET build artifacts
16+
**/bin/**
17+
**/obj/**
18+
*.user
19+
*.suo
20+
*.cache
21+
22+
# OS generated files
23+
.DS_Store
24+
.DS_Store?
25+
._*
26+
.Spotlight-V100
27+
.Trashes
28+
ehthumbs.db
29+
Thumbs.db
30+
31+
# Logs
32+
logs
33+
*.log
34+
npm-debug.log*
35+
yarn-debug.log*
36+
yarn-error.log*
37+
38+
# Node modules (should be handled by vsce, but just in case)
39+
node_modules/**
40+
41+
# Test files
42+
**/*.test.*
43+
**/test/**
44+
45+
# Development files
46+
.eslintrc.*
47+
.prettierrc.*
48+
.prettierignore
49+
50+
# CI/CD
51+
.github/**
52+
53+
# Documentation drafts
54+
*.md~
55+
*.markdown~

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Change Log
2+
3+
All notable changes to the "xsltdebugger" 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+
## [Unreleased]
8+
9+
- Initial release

LICENSE

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
MIT License
2+
3+
Copyright (c) 2025
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 SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
17+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
18+
SOFTWARE.

0 commit comments

Comments
 (0)