@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.
@@ -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;