@dataparade/cli 0.0.21 → 0.0.23
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/dist/package.json +1 -1
- package/dist/src/ai-enrichment/agent-orchestrator.d.ts +8 -2
- package/dist/src/ai-enrichment/agent-orchestrator.js +140 -70
- package/dist/src/ai-enrichment/provider-prompt.js +36 -2
- package/dist/src/core/pipeline/omit-internal-implementation.d.ts +34 -0
- package/dist/src/core/pipeline/omit-internal-implementation.js +146 -0
- package/dist/src/core/pipeline/scan-pipeline.js +21 -0
- package/dist/tests/unit/ai-enrichment/agent-orchestrator.spec.js +227 -147
- package/dist/tests/unit/ai-enrichment/provider-prompt.spec.js +35 -0
- package/dist/tests/unit/core/omit-internal-implementation.spec.d.ts +1 -0
- package/dist/tests/unit/core/omit-internal-implementation.spec.js +125 -0
- package/package.json +1 -1
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.runScanPipeline = runScanPipeline;
|
|
7
|
+
const fs_1 = __importDefault(require("fs"));
|
|
8
|
+
const path_1 = __importDefault(require("path"));
|
|
4
9
|
const ai_orchestrator_options_1 = require("./ai-orchestrator-options");
|
|
10
|
+
const omit_internal_implementation_1 = require("./omit-internal-implementation");
|
|
5
11
|
const scanner_1 = require("@dataparade/scanner");
|
|
6
12
|
const pipeline_1 = require("../../ai-enrichment/pipeline");
|
|
7
13
|
const fallbacks_1 = require("../../ai-enrichment/fallbacks");
|
|
@@ -267,6 +273,21 @@ async function runScanPipelineInner(rootPath, config, onProgress, onRecognition)
|
|
|
267
273
|
const fallbackResult = (0, fallbacks_1.applyDeterministicInferenceFallbacks)(components, dataFlows);
|
|
268
274
|
components.splice(0, components.length, ...fallbackResult.components);
|
|
269
275
|
let finalizedFlows = fallbackResult.dataFlows;
|
|
276
|
+
const omitted = (0, omit_internal_implementation_1.omitInternalImplementationNodes)(components, finalizedFlows, {
|
|
277
|
+
readSource: (filePath) => {
|
|
278
|
+
const absolute = path_1.default.isAbsolute(filePath)
|
|
279
|
+
? filePath
|
|
280
|
+
: path_1.default.join(rootPath, filePath);
|
|
281
|
+
try {
|
|
282
|
+
return fs_1.default.readFileSync(absolute, 'utf8');
|
|
283
|
+
}
|
|
284
|
+
catch {
|
|
285
|
+
return undefined;
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
components.splice(0, components.length, ...omitted.components);
|
|
290
|
+
finalizedFlows = omitted.dataFlows;
|
|
270
291
|
const redFlagPass = (0, red_flags_1.applyConnectivityRedFlagPass)(components, finalizedFlows);
|
|
271
292
|
components.splice(0, components.length, ...redFlagPass.components);
|
|
272
293
|
finalizedFlows = redFlagPass.dataFlows;
|