pumuki-ast-hooks 5.3.25 → 5.3.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.26",
|
|
4
4
|
"description": "Enterprise-grade AST Intelligence System with multi-platform support (iOS, Android, Backend, Frontend) and Feature-First + DDD + Clean Architecture enforcement. Includes dynamic violations API for intelligent querying.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -323,6 +323,31 @@ async function runPlatformAnalysis(project, findings, context) {
|
|
|
323
323
|
* Generate analysis output and reports
|
|
324
324
|
*/
|
|
325
325
|
function generateOutput(findings, context, project, root) {
|
|
326
|
+
const stagingOnlyMode = env.get('STAGING_ONLY_MODE', '0') === '1';
|
|
327
|
+
if (stagingOnlyMode) {
|
|
328
|
+
try {
|
|
329
|
+
const { execSync } = require('child_process');
|
|
330
|
+
const stagedRel = execSync('git diff --cached --name-only --diff-filter=ACM', {
|
|
331
|
+
encoding: 'utf8',
|
|
332
|
+
cwd: root
|
|
333
|
+
})
|
|
334
|
+
.trim()
|
|
335
|
+
.split('\n')
|
|
336
|
+
.map(s => s.trim())
|
|
337
|
+
.filter(Boolean);
|
|
338
|
+
|
|
339
|
+
const stagedAbs = new Set(stagedRel.map(r => path.resolve(root, r)));
|
|
340
|
+
findings = (findings || []).filter(f => {
|
|
341
|
+
if (!f || !f.filePath) return false;
|
|
342
|
+
const fp = String(f.filePath);
|
|
343
|
+
if (stagedAbs.has(fp)) return true;
|
|
344
|
+
return stagedRel.some(rel => fp.endsWith(rel) || fp.includes(`/${rel}`));
|
|
345
|
+
});
|
|
346
|
+
} catch {
|
|
347
|
+
findings = [];
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
326
351
|
const levelTotals = { CRITICAL: 0, HIGH: 0, MEDIUM: 0, LOW: 0 };
|
|
327
352
|
const platformTotals = { Backend: 0, Frontend: 0, iOS: 0, Android: 0, Other: 0 };
|
|
328
353
|
|