pumuki-ast-hooks 5.3.25 → 5.3.27
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 +1 -1
- package/scripts/hooks-system/application/services/installation/FileSystemInstallerService.js +1 -0
- package/scripts/hooks-system/infrastructure/ast/ast-intelligence.js +25 -0
- package/scripts/hooks-system/infrastructure/ast/ios/analyzers/iOSEnterpriseAnalyzer.js +3 -0
- package/scripts/hooks-system/infrastructure/ast/ios/ast-ios.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pumuki-ast-hooks",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.27",
|
|
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
|
|
|
@@ -269,6 +269,9 @@ class iOSEnterpriseAnalyzer {
|
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
async analyzeNetworking(content, filePath) {
|
|
272
|
+
if (String(filePath || '').endsWith('/Package.swift') || String(filePath || '').endsWith('Package.swift')) {
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
272
275
|
if (!content.includes('URLSession') && !content.includes('Alamofire')) {
|
|
273
276
|
if (content.includes('http://') || content.includes('https://')) {
|
|
274
277
|
this.addFinding('ios.networking.missing_urlsession', 'high', filePath, 1,
|
|
@@ -1250,7 +1250,7 @@ async function runIOSIntelligence(project, findings, platform) {
|
|
|
1250
1250
|
);
|
|
1251
1251
|
}
|
|
1252
1252
|
|
|
1253
|
-
if (filePath.endsWith('.swift') && !filePath.includes('/Domain/') && !filePath.includes('/Application/') &&
|
|
1253
|
+
if (filePath.endsWith('.swift') && !filePath.endsWith('/Package.swift') && !filePath.endsWith('Package.swift') && !filePath.includes('/Domain/') && !filePath.includes('/Application/') &&
|
|
1254
1254
|
!filePath.includes('/Infrastructure/') && !filePath.includes('/Presentation/') &&
|
|
1255
1255
|
!filePath.includes('/Tests/') && !filePath.includes('AppDelegate')) {
|
|
1256
1256
|
pushFinding(
|