feat: migrate to TypeScript, Spec Kit SDD, and lab observability stack #4
@@ -34,7 +34,7 @@ jobs:
|
||||
npm run test:coverage
|
||||
|
||||
- name: SonarQube Scan + Quality Gate
|
||||
uses: sonarsource/sonarqube-scan-action@v5
|
||||
uses: sonarsource/sonarqube-scan-action@v6
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
"start": "node dist/hello.js",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"migrate": "npm run build && node dist/db/migrate.js",
|
||||
"test": "npm run build && node --test dist/**/*.test.js",
|
||||
"test:coverage": "npm run build && node -e \"require('fs').mkdirSync('coverage',{recursive:true})\" && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test dist/**/*.test.js"
|
||||
"test": "npm run build && node --test \"dist/**/*.test.js\"",
|
||||
"test:coverage": "npm run build && node -e \"require('fs').mkdirSync('coverage',{recursive:true})\" && node --experimental-test-coverage --test-reporter=spec --test-reporter-destination=stdout --test-reporter=lcov --test-reporter-destination=coverage/lcov.info --test \"dist/**/*.test.js\" && node scripts/remap-lcov.cjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@opentelemetry/api": "^1.9.1",
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
|
||||
const file = path.join("coverage", "lcov.info");
|
||||
const remapped = fs.readFileSync(file, "utf8").replace(/^SF:(.+)$/gm, (_, p) => {
|
||||
const norm = String(p).replaceAll("\\", "/");
|
||||
const match = /(?:^|\/)dist\/(.+)\.js$/.exec(norm);
|
||||
return match ? `SF:src/${match[1]}.ts` : `SF:${norm}`;
|
||||
});
|
||||
fs.writeFileSync(file, remapped);
|
||||
Reference in New Issue
Block a user