@shrkcrft/impact-engine 0.1.0-alpha.23 → 0.1.0-alpha.24
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/engine/analyzer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"analyzer.d.ts","sourceRoot":"","sources":["../../src/engine/analyzer.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAId,MAAM,iBAAiB,CAAC;AAMzB,OAAO,EAIL,KAAK,oBAAoB,EAC1B,MAAM,8BAA8B,CAAC;AAGtC,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GAC3C;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GACpC;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpC,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,iBAAiB,EACxB,OAAO,EAAE,eAAe,GACvB,oBAAoB,CAsPtB;AA8FD,yDAAyD;AACzD,eAAO,MAAM,sBAAsB,EAAG,+BAAwC,CAAC;AAE/E,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,6DAA6D;IAC7D,EAAE,EAAE,MAAM,CAAC;IACX,mDAAmD;IACnD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,GAAG,EAAE,QAAQ,GAAG,WAAW,CAAC;IAC5B,wDAAwD;IACxD,WAAW,EAAE,MAAM,CAAC;IACpB,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,OAAO,sBAAsB,CAAC;IACtC,2EAA2E;IAC3E,eAAe,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,4EAA4E;IAC5E,iBAAiB,EAAE,SAAS,MAAM,EAAE,CAAC;IACrC,wFAAwF;IACxF,OAAO,EAAE,SAAS,cAAc,EAAE,CAAC;IACnC,6BAA6B;IAC7B,WAAW,EAAE,SAAS,MAAM,EAAE,CAAC;CAChC;AAQD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,EACpB,YAAY,EAAE,SAAS,MAAM,EAAE,GAC9B,oBAAoB,CA4EtB"}
|
package/dist/engine/analyzer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { execSync } from 'node:child_process';
|
|
2
1
|
import { EdgeKind, GraphQueryApi, GraphStore, NodeKind, } from '@shrkcrft/graph';
|
|
3
2
|
import { BridgeStore, RuleGraphQueryApi, } from '@shrkcrft/rule-graph';
|
|
3
|
+
import { runGitLines } from '@shrkcrft/shared';
|
|
4
4
|
import { GRAPH_IMPACT_SCHEMA, } from "../schema/impact-analysis.js";
|
|
5
5
|
import { classifyRisk } from "./risk-score.js";
|
|
6
6
|
/**
|
|
@@ -356,20 +356,9 @@ function missingGraphPayload(input, diagnostics) {
|
|
|
356
356
|
};
|
|
357
357
|
}
|
|
358
358
|
function changedFilesSince(projectRoot, ref) {
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
encoding: 'utf8',
|
|
363
|
-
stdio: ['ignore', 'pipe', 'ignore'],
|
|
364
|
-
});
|
|
365
|
-
return raw
|
|
366
|
-
.split('\n')
|
|
367
|
-
.map((s) => s.trim())
|
|
368
|
-
.filter((s) => s.length > 0);
|
|
369
|
-
}
|
|
370
|
-
catch {
|
|
371
|
-
return [];
|
|
372
|
-
}
|
|
359
|
+
// Shell-free + high-maxBuffer: a large changeset no longer ENOBUFS-crashes
|
|
360
|
+
// the gitref impact analysis. Failure → [] (caller degrades cleanly).
|
|
361
|
+
return runGitLines(projectRoot, ['diff', '--name-only', ref]).lines;
|
|
373
362
|
}
|
|
374
363
|
/** Schema id for a {@link findDeletedOrphans} report. */
|
|
375
364
|
export const DELETED_ORPHANS_SCHEMA = 'sharkcraft.deleted-orphans/v1';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shrkcrft/impact-engine",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.24",
|
|
4
4
|
"description": "SharkCraft impact engine: graph-backed change analysis. Combines code graph + rule-graph + symbol-reference edges into a v3 impact payload (affected files, symbols, rules, templates, tests, risk).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "SharkCraft contributors",
|
|
@@ -44,9 +44,10 @@
|
|
|
44
44
|
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@shrkcrft/core": "^0.1.0-alpha.
|
|
48
|
-
"@shrkcrft/graph": "^0.1.0-alpha.
|
|
49
|
-
"@shrkcrft/rule-graph": "^0.1.0-alpha.
|
|
47
|
+
"@shrkcrft/core": "^0.1.0-alpha.24",
|
|
48
|
+
"@shrkcrft/graph": "^0.1.0-alpha.24",
|
|
49
|
+
"@shrkcrft/rule-graph": "^0.1.0-alpha.24",
|
|
50
|
+
"@shrkcrft/shared": "^0.1.0-alpha.24"
|
|
50
51
|
},
|
|
51
52
|
"publishConfig": {
|
|
52
53
|
"access": "public"
|