Skip to content
Merged
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
9 changes: 9 additions & 0 deletions .audit-ci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"moderate": true,
"high": true,
"critical": true,
"allowlist": [],
"skip-dev": false,
"show-found": true,
"show-not-found": false
}
31 changes: 31 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"root": true,
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"extends": [
"eslint:recommended"
],
"env": {
"node": true,
"es6": true,
"mocha": true
},
"rules": {
"curly": "warn",
"eqeqeq": "warn",
"no-throw-literal": "warn",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["warn", { "argsIgnorePattern": "^_" }]
},
"ignorePatterns": [
"out",
"dist",
"**/*.d.ts"
]
}
29 changes: 17 additions & 12 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
name: Bug Report
about: Create a report to help us improve AppleScript Support
title: '[BUG] '
labels: bug
assignees: ''

---

**Describe the bug**
## 🐛 Bug Description
A clear and concise description of what the bug is.

**To Reproduce**
## 📋 Steps to Reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. See error

**Expected behavior**
## ✅ Expected Behavior
A clear and concise description of what you expected to happen.

**Screenshots**
## 🖼️ Screenshots
If applicable, add screenshots to help explain your problem.

**Environment:**
- OS: [e.g. macOS 14.2]
- VS Code Version: [e.g. 1.91.0]
- Extension Version: [e.g. 0.0.1]
## 💻 Environment
- OS: [e.g. macOS 14.2]
- VS Code Version: [e.g. 1.91.0]
- Extension Version: [e.g. 0.0.1]

**Additional context**
## 📝 AppleScript Code (if applicable)
```applescript
-- Paste your AppleScript code here
```

## 📋 Additional Context
Add any other context about the problem here.
22 changes: 15 additions & 7 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,28 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
name: Feature Request
about: Suggest an idea for AppleScript Support
title: '[FEATURE] '
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
## 🚀 Feature Description
A clear and concise description of what you want to happen.

## 🎯 Problem/Use Case
A clear and concise description of what the problem is.

**Describe the solution you'd like**
## 💡 Proposed Solution
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
## 🔄 Alternatives Considered
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
## 📝 AppleScript Context (if applicable)
```applescript
-- Example AppleScript code that would benefit from this feature
```

## 📋 Additional Context
Add any other context or screenshots about the feature request here.
44 changes: 39 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,48 @@ jobs:

strategy:
matrix:
node-version: [16.x, 18.x]
node-version: [18.x, 20.x]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build --if-present
- run: npm test --if-present
- run: npm run compile
- name: Setup virtual display
run: |
sudo apt-get update
sudo apt-get install -y xvfb
- name: Run tests
run: xvfb-run -a npm test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Check TypeScript
run: npx tsc --noEmit

security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Run security audit
run: npm audit --audit-level=moderate
- name: Check for outdated dependencies
run: npm outdated || true
29 changes: 22 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Publish Extension

on:
push:
tags:
Expand All @@ -8,14 +9,28 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20.x
cache: 'npm'
- run: npm ci
- name: Publish to Visual Studio Marketplace
- name: Compile extension
run: npm run compile
- name: Run tests
run: npm test
env:
DISPLAY: ':99'
- name: Package extension
run: |
npm install -g vsce
vsce publish -p ${{ secrets.VSCE_PAT }}
npm install -g @vscode/vsce
vsce package
- name: Publish to Visual Studio Marketplace
run: vsce publish -p ${{ secrets.VSCE_PAT }}
env:
VSCE_PAT: ${{ secrets.VSCE_PAT }}
VSCE_PAT: ${{ secrets.VSCE_PAT }}
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vsix-package
path: "*.vsix"
65 changes: 65 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Security

on:
schedule:
- cron: '0 2 * * 1' # Run weekly on Mondays at 2 AM UTC
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
dependency-scan:
runs-on: ubuntu-latest
name: Dependency Vulnerability Scan
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'npm'
- run: npm ci

- name: Run npm audit
run: npm audit --audit-level=high
continue-on-error: true

- name: Run security audit with audit-ci
run: |
npx audit-ci --config .audit-ci.json || echo "Security issues found - check output"
continue-on-error: true

codeql:
name: CodeQL Security Analysis
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'typescript' ]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

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

- run: npm ci
- run: npm run compile

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
35 changes: 35 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# Source files
src/**
**/*.ts
!out/**
tsconfig.json
.eslintrc.json

# Development dependencies
node_modules/
**/.vscode-test/**

# Development files
.vscode/**
.vscode-test/**
.gitignore
Expand All @@ -8,3 +20,26 @@ vsc-extension-quickstart.md
**/*.ts
.github/**
images/demo.gif

# Documentation
CONTRIBUTING.md
applescript-support/vsc-extension-quickstart.md

# Test files
test/**
test-workspace/**
src/test/**

# Build and packaging
*.vsix
.vscode-test/
.vscode-test-web/

# Logs and temporary files
*.log
npm-debug.log*
.DS_Store

# Unnecessary files
applescript-support/.vscode/
applescript-support/.vscodeignore
Loading
Loading