Skip to content

chore(deps): update dependency typescript to v6 #1251

chore(deps): update dependency typescript to v6

chore(deps): update dependency typescript to v6 #1251

name: Validate Plugin Templates
on:
push:
branches:
- main
- "renovate/**"
pull_request:
paths:
- "plugin-templates/**"
- ".github/workflows/validate-plugin-templates.yml"
jobs:
find-templates:
name: Find plugin templates
runs-on: ubuntu-latest
outputs:
templates: ${{ steps.find-templates.outputs.templates }}
steps:
- uses: actions/checkout@v5
- name: Find template directories
id: find-templates
run: |
templates=$(find plugin-templates -mindepth 1 -maxdepth 1 -type d -exec basename {} \; | jq -R -s -c 'split("\n") | map(select(length > 0))')
echo "templates=$templates" >> $GITHUB_OUTPUT
validate:
name: Validate ${{ matrix.template }}
runs-on: ubuntu-latest
needs: find-templates
strategy:
fail-fast: false
matrix:
template: ${{ fromJSON(needs.find-templates.outputs.templates) }}
steps:
- uses: actions/checkout@v5
- uses: actions/setup-node@v6
with:
node-version: "24"
- name: Validate manifest.json
run: |
manifest_path="plugin-templates/${{ matrix.template }}/manifest.json"
if [ ! -f "$manifest_path" ]; then
echo "Error: manifest.json not found in plugin-templates/${{ matrix.template }}"
exit 1
fi
if ! jq empty "$manifest_path" 2>/dev/null; then
echo "Error: manifest.json is not valid JSON"
exit 1
fi
required_fields=("manifest_version" "version" "type" "name.en" "icon")
for field in "${required_fields[@]}"; do
if ! jq -e ".$field" "$manifest_path" > /dev/null; then
echo "Error: Required field '$field' is missing in manifest.json"
exit 1
fi
done
- name: Validate package.json
run: |
package_path="plugin-templates/${{ matrix.template }}/package.json"
if [ ! -f "$package_path" ]; then
echo "Error: package.json not found in plugin-templates/${{ matrix.template }}"
exit 1
fi
if ! jq empty "$package_path" 2>/dev/null; then
echo "Error: package.json is not valid JSON"
exit 1
fi
if ! jq -e '.name' "$package_path" > /dev/null; then
echo "Error: 'name' field is required in package.json"
exit 1
fi
if ! jq -e '.scripts.keygen' "$package_path" > /dev/null; then
echo "Error: scripts.keygen is required in package.json"
exit 1
fi
if ! jq -e '.scripts.build' "$package_path" > /dev/null; then
echo "Error: scripts.build is required in package.json"
exit 1
fi
- name: Install template dependencies
working-directory: plugin-templates/${{ matrix.template }}
run: |
if [ -f "package-lock.json" ]; then
npm ci
else
npm install
fi
- name: Test keygen command
working-directory: plugin-templates/${{ matrix.template }}
run: |
npm run keygen
if [ ! -f "private.ppk" ]; then
echo "Error: private.ppk was not generated by keygen command"
exit 1
fi
- name: Test build command
working-directory: plugin-templates/${{ matrix.template }}
run: |
npm run build