@cmflow/atlas 3.4.0-beta.29 → 3.4.0-beta.30

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.
@@ -2,9 +2,9 @@
2
2
  import { fileURLToPath as __atlasFileURLToPath } from "node:url";
3
3
  const __filename = __atlasFileURLToPath(import.meta.url);
4
4
  import { n as __require, r as __toESM, t as __commonJSMin } from "../rolldown-runtime-CGR6nZuH.mjs";
5
- import { a as note, c as select, d as setUserConfig, f as userConfig$1, i as log, l as isCancel, n as cancel, o as outro, r as intro, s as progress, t as taskProgressService, u as getUserConfig } from "../taskProgressService-BRoIJQbK.mjs";
6
- import { a as resolveModulePath, c as filterAnalysisFiles, d as globby, i as matchesRouteSelector, l as shouldKeepAnalysisFile, n as generateBackendTopologyArtifactsInWorkers, o as inferBackendNameFromFile, s as isKnownBackendType, u as normalizeFilePath } from "../routeBackendTopologyService-NPO-ZHyY.mjs";
7
- import { a as loadOpenApiDocument, i as extractOpenApiOutputProperties, r as extractOpenApiInputProperties, t as require_dist$1 } from "../dist-uTuN89Bv.mjs";
5
+ import { a as isCancel, c as userConfig$1, i as select, n as atlasLogger, o as getUserConfig, r as progress, s as setUserConfig, t as taskProgressService } from "../taskProgressService-BTXcmKRN.mjs";
6
+ import { a as resolveModulePath, c as filterAnalysisFiles, d as globby, i as matchesRouteSelector, l as shouldKeepAnalysisFile, n as generateBackendTopologyArtifactsInWorkers, o as inferBackendNameFromFile, s as isKnownBackendType, u as normalizeFilePath } from "../routeBackendTopologyService-DMzDLqUR.mjs";
7
+ import { a as loadOpenApiDocument, i as extractOpenApiOutputProperties, r as extractOpenApiInputProperties, t as require_dist$1 } from "../dist-KClmoDrs.mjs";
8
8
  import { n as require_auth_errors, r as require_token_error, t as require_token_util } from "../token-util-Dnzm6rU4.mjs";
9
9
  import path from "node:path";
10
10
  import { Node, Project, SyntaxKind } from "ts-morph";
@@ -5525,7 +5525,7 @@ function createPushStepClassifier() {
5525
5525
  };
5526
5526
  }
5527
5527
  var push_default = (program) => void program.command("push").argument("[catalogue-directory-or-route]", "Directory or route such as \"GET /v1/offers\"").option("--route <route>", "Push one route only, for example \"POST /v0/accommodations_arrangement/check\"").option("--update", "Persist changes to Directus", false).description("Push generated per-route YAML documents to Directus").action(async (catalogueDirectoryOrRoute, options) => {
5528
- intro("Datasource catalogue push");
5528
+ atlasLogger.intro("Datasource catalogue push");
5529
5529
  const { cwd } = getUserConfig();
5530
5530
  const progress = taskProgressService.createStepProgress(createPushStepClassifier());
5531
5531
  const update = options.update;
@@ -5541,7 +5541,7 @@ var push_default = (program) => void program.command("push").argument("[catalogu
5541
5541
  write: update
5542
5542
  }));
5543
5543
  progress.finish(update ? "Directus synchronization completed" : "Directus dry-run completed");
5544
- note([
5544
+ atlasLogger.note([
5545
5545
  `Input directory: ${pushResult.inputPath}`,
5546
5546
  `Route documents: ${pushResult.files.length}`,
5547
5547
  routeSelector ? `Route selector: ${routeSelector.method} ${routeSelector.path}` : null,
@@ -5549,10 +5549,10 @@ var push_default = (program) => void program.command("push").argument("[catalogu
5549
5549
  `Items processed: ${pushResult.result.pushedItems}`,
5550
5550
  `Warnings: ${pushResult.result.warnings.length}`
5551
5551
  ].filter(Boolean).join("\n"), "Directus");
5552
- outro("Datasource catalogue push completed");
5552
+ atlasLogger.outro("Datasource catalogue push completed");
5553
5553
  } catch (error) {
5554
5554
  progress.fail("Directus push failed");
5555
- cancel(formatPushError(error));
5555
+ atlasLogger.error(formatPushError(error));
5556
5556
  process.exit(1);
5557
5557
  }
5558
5558
  });
@@ -5560,7 +5560,7 @@ var push_default = (program) => void program.command("push").argument("[catalogu
5560
5560
  //#endregion
5561
5561
  //#region src/commands/cleanOrphans.ts
5562
5562
  var cleanOrphans_default = (program) => void program.command("clean-orphans").option("--directus-url <url>", "Directus base URL").option("--directus-token <token>", "Directus bearer token").option("--write", "Remove the orphaned links", false).description("Find and optionally remove orphaned property-to-backend-property links in Directus").action(async (options) => {
5563
- intro("Datasource catalogue orphan cleanup");
5563
+ atlasLogger.intro("Datasource catalogue orphan cleanup");
5564
5564
  const progress = taskProgressService.createStepProgress();
5565
5565
  try {
5566
5566
  const config = getUserConfig();
@@ -5573,15 +5573,15 @@ var cleanOrphans_default = (program) => void program.command("clean-orphans").op
5573
5573
  dryRun: !options.write
5574
5574
  }));
5575
5575
  progress.finish(options.write ? "Orphaned property links removed" : "Orphaned property links inspected");
5576
- note([
5576
+ atlasLogger.note([
5577
5577
  `Orphaned links found: ${result.orphanedLinks}`,
5578
5578
  `Orphaned links removed: ${result.removedOrphanedLinks}`,
5579
5579
  options.write ? null : "Run again with --write to remove them."
5580
5580
  ].filter(Boolean).join("\n"), "Directus");
5581
- outro("Datasource catalogue orphan cleanup completed");
5581
+ atlasLogger.outro("Datasource catalogue orphan cleanup completed");
5582
5582
  } catch (error) {
5583
5583
  progress.fail("Orphan cleanup failed");
5584
- cancel(formatPushError(error));
5584
+ atlasLogger.error(formatPushError(error));
5585
5585
  process.exit(1);
5586
5586
  }
5587
5587
  });
@@ -5610,10 +5610,11 @@ async function listBackendSourceMetadata(sources, backend, refresh = false) {
5610
5610
  }));
5611
5611
  }
5612
5612
  var backendSources_default = (program) => void program.command("backend-sources").alias("backend-source").option("--backend <name>", "Only execute one backend source").option("--all", "Execute every configured backend source without prompting").option("--refresh", "Bypass backend source caches and rewrite them").description("Execute configured backend sources and display their resolved property metadata").action(async (options) => {
5613
- intro("Atlas backend source metadata");
5613
+ atlasLogger.intro("Atlas backend source metadata");
5614
5614
  try {
5615
5615
  if (options.backend && options.all) throw new Error("Specify either --backend or --all, not both");
5616
5616
  const sources = getUserConfig().analysis.backends.filter((source) => Boolean(source.resolve) && (!options.refresh || Boolean(source.cache)));
5617
+ if (atlasLogger.isCi && !options.all && !options.backend) throw new Error("Specify --backend or --all when CI=1");
5617
5618
  const selectedBackend = options.all ? void 0 : options.backend || await select({
5618
5619
  message: "Which backend source do you want to execute?",
5619
5620
  options: sources.map((source) => ({
@@ -5623,15 +5624,15 @@ var backendSources_default = (program) => void program.command("backend-sources"
5623
5624
  }))
5624
5625
  });
5625
5626
  if (isCancel(selectedBackend)) {
5626
- cancel("Backend source execution cancelled");
5627
+ atlasLogger.error("Backend source execution cancelled");
5627
5628
  process.exitCode = 1;
5628
5629
  return;
5629
5630
  }
5630
5631
  const metadata = await listBackendSourceMetadata(sources, selectedBackend, options.refresh);
5631
- log.message(JSON.stringify(metadata, null, 2));
5632
- outro("Backend source metadata generated");
5632
+ atlasLogger.info(JSON.stringify(metadata, null, 2));
5633
+ atlasLogger.outro("Backend source metadata generated");
5633
5634
  } catch (error) {
5634
- cancel(error instanceof Error ? error.message : String(error));
5635
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
5635
5636
  process.exitCode = 1;
5636
5637
  }
5637
5638
  });
@@ -5741,7 +5742,7 @@ async function writeBackendMetadataArtifacts(params) {
5741
5742
  //#endregion
5742
5743
  //#region src/commands/generate.ts
5743
5744
  async function generateHandler(cwd, routeArgument, options) {
5744
- intro("Datasource catalogue generation");
5745
+ atlasLogger.intro("Datasource catalogue generation");
5745
5746
  const progress$3 = taskProgressService.createStepProgress();
5746
5747
  const routeSelector = parseRouteSelector(routeArgument);
5747
5748
  const profile = createAnalysisProfile(Boolean(options.profile));
@@ -5778,13 +5779,13 @@ async function generateHandler(cwd, routeArgument, options) {
5778
5779
  const totalRoutes = routeSelector ? 1 : Object.values(openApiDocument.paths || {}).reduce((total, pathItem) => total + Object.keys(pathItem || {}).filter((method) => /^(get|post|put|patch|delete|head|options)$/i.test(method)).length, 0);
5779
5780
  const analysisStartedAt = performance.now();
5780
5781
  progress$3.finish("OpenAPI contract loaded");
5781
- const analysisProgress = progress({
5782
+ const analysisProgress = atlasLogger.isCi ? void 0 : progress({
5782
5783
  style: "heavy",
5783
5784
  max: totalRoutes,
5784
5785
  size: 40
5785
5786
  });
5786
5787
  let analyzedRoutes = 0;
5787
- analysisProgress.start(`Analyzing · [0/${totalRoutes}] routes`);
5788
+ analysisProgress?.start(`Analyzing · [0/${totalRoutes}] routes`);
5788
5789
  const documents = await analyzeCodebaseRouteContracts({
5789
5790
  cwd,
5790
5791
  openApiDocument,
@@ -5801,13 +5802,13 @@ async function generateHandler(cwd, routeArgument, options) {
5801
5802
  onDocument: async (document) => {
5802
5803
  const artifactStartedAt = performance.now();
5803
5804
  analyzedRoutes += 1;
5804
- analysisProgress.advance(1, `Analyzing · [${analyzedRoutes}/${totalRoutes}] routes · ${document.method} ${document.path} ...`);
5805
+ analysisProgress?.advance(1, `Analyzing · [${analyzedRoutes}/${totalRoutes}] routes · ${document.method} ${document.path} ...`);
5805
5806
  const routeCatalogue = await buildCatalogue([document]);
5806
5807
  await writeRouteReviewDocument(routeCatalogue, outputDir, process.cwd(), document.key);
5807
5808
  profile.add("Artifacts", performance.now() - artifactStartedAt);
5808
5809
  }
5809
5810
  });
5810
- analysisProgress.stop("Static route analysis completed");
5811
+ analysisProgress?.stop("Static route analysis completed");
5811
5812
  profile.add("Static analysis", performance.now() - analysisStartedAt);
5812
5813
  const catalogueStartedAt = performance.now();
5813
5814
  const catalogue = await progress$3.run({
@@ -5817,17 +5818,17 @@ async function generateHandler(cwd, routeArgument, options) {
5817
5818
  detail: `${documents.length} route${documents.length === 1 ? "" : "s"}`
5818
5819
  }, () => buildCatalogue(documents));
5819
5820
  profile.add("Catalogue build", performance.now() - catalogueStartedAt);
5820
- note([
5821
+ atlasLogger.note([
5821
5822
  `Output directory: ${outputDir}`,
5822
5823
  `Route documents: ${catalogue.routes.length}`,
5823
5824
  routeSelector ? `Route selector: ${routeSelector.method} ${routeSelector.path}` : null
5824
5825
  ].filter(Boolean).join("\n"), "Artifacts");
5825
- note(JSON.stringify(catalogue.stats, null, 2), "Stats");
5826
- if (options.profile) note(profile.report().join("\n"), "Performance profile");
5827
- outro("Datasource catalogue generation completed");
5826
+ atlasLogger.note(JSON.stringify(catalogue.stats, null, 2), "Stats");
5827
+ if (options.profile) atlasLogger.note(profile.report().join("\n"), "Performance profile");
5828
+ atlasLogger.outro("Datasource catalogue generation completed");
5828
5829
  } catch (error) {
5829
5830
  progress$3.fail("Generation failed");
5830
- cancel(error instanceof Error ? error.message : String(error));
5831
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
5831
5832
  process.exit(1);
5832
5833
  }
5833
5834
  }
@@ -5851,7 +5852,7 @@ function parsePositiveInteger(value, message = "Expected a positive integer") {
5851
5852
  //#region src/commands/generateGraph.ts
5852
5853
  const parseWorkerCount$1 = (value) => parsePositiveInteger(value, "Worker count must be a positive integer");
5853
5854
  async function generateGraphHandler(cwd, routeArgument, options) {
5854
- intro("Code source Graph generation");
5855
+ atlasLogger.intro("Code source Graph generation");
5855
5856
  const progress$2 = taskProgressService.createStepProgress((message) => {
5856
5857
  if (message === "Discovering route files") return {
5857
5858
  id: "route-files",
@@ -5894,12 +5895,14 @@ async function generateGraphHandler(cwd, routeArgument, options) {
5894
5895
  let routeProgress;
5895
5896
  const onRoutesDiscovered = (total) => {
5896
5897
  progress$2.finish("Route declarations extracted");
5897
- routeProgress = progress({
5898
- style: "heavy",
5899
- max: total,
5900
- size: 40
5901
- });
5902
- routeProgress.start(`${workerCount} worker${workerCount > 1 ? "s" : ""} · Graph · [0/${total}] routes`);
5898
+ if (!atlasLogger.isCi) {
5899
+ routeProgress = progress({
5900
+ style: "heavy",
5901
+ max: total,
5902
+ size: 40
5903
+ });
5904
+ routeProgress.start(`${workerCount} worker${workerCount > 1 ? "s" : ""} · Graph · [0/${total}] routes`);
5905
+ }
5903
5906
  };
5904
5907
  const onArtifact = async (artifact) => {
5905
5908
  routeProgress?.message(`${workerCount} worker${workerCount > 1 ? "s" : ""} · Graph · Writing ${artifact.route.method} ${artifact.route.path}`);
@@ -5919,16 +5922,16 @@ async function generateGraphHandler(cwd, routeArgument, options) {
5919
5922
  routeProgress?.stop("API-to-backend graph generated");
5920
5923
  progress$2.finish("API-to-backend graph generated");
5921
5924
  const backendPaths = artifacts.reduce((total, artifact) => total + artifact.backend_paths.length, 0);
5922
- note([
5925
+ atlasLogger.note([
5923
5926
  `Output directory: ${outputDir}`,
5924
5927
  `Route documents: ${files.length}`,
5925
5928
  `Backend paths: ${backendPaths}`,
5926
5929
  routeSelector ? `Route selector: ${routeSelector.method} ${routeSelector.path}` : null
5927
5930
  ].filter(Boolean).join("\n"), "Artifacts");
5928
- outro("Code source graph generation completed");
5931
+ atlasLogger.outro("Code source graph generation completed");
5929
5932
  } catch (error) {
5930
5933
  progress$2.fail("Graph generation failed");
5931
- cancel(error instanceof Error ? error.message : String(error));
5934
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
5932
5935
  process.exitCode = 1;
5933
5936
  }
5934
5937
  }
@@ -5996,18 +5999,18 @@ async function generateTestHandler(cwd) {
5996
5999
  catalogues.set(expectation.route, await buildCatalogue(documents));
5997
6000
  }
5998
6001
  const results = validateCoverage(coverage, catalogues);
5999
- log.message(results.map((result) => `${result.passed ? "✓" : "✗"} ${result.route}: ${formatPercentage(result.actual)} (minimum ${formatPercentage(result.expected)})`).join("\n"));
6002
+ atlasLogger.info(results.map((result) => `${result.passed ? "✓" : "✗"} ${result.route}: ${formatPercentage(result.actual)} (minimum ${formatPercentage(result.expected)})`).join("\n"));
6000
6003
  if (results.some((result) => !result.passed)) throw new Error(formatCoverageFailure(results));
6001
6004
  }
6002
6005
  var generateTest_default = (program) => void program.command("generate:test").description("Generate configured routes and verify their resolved-field coverage does not regress").action(async () => {
6003
- intro("Datasource catalogue generation regression check");
6006
+ atlasLogger.intro("Datasource catalogue generation regression check");
6004
6007
  const { cwd, test } = getUserConfig();
6005
6008
  try {
6006
6009
  await generateTestHandler(cwd);
6007
- note(`Routes checked: ${test.coverage.length}`, "Coverage");
6008
- outro("Datasource catalogue generation regression check completed");
6010
+ atlasLogger.note(`Routes checked: ${test.coverage.length}`, "Coverage");
6011
+ atlasLogger.outro("Datasource catalogue generation regression check completed");
6009
6012
  } catch (error) {
6010
- cancel(error instanceof Error ? error.message : String(error));
6013
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
6011
6014
  process.exit(1);
6012
6015
  }
6013
6016
  });
@@ -23464,7 +23467,7 @@ function parseWorkerCount(value) {
23464
23467
  return workers;
23465
23468
  }
23466
23469
  var infer_default = (program) => void program.command("infer").argument("[route-or-directory]", "Route selector (GET /v1/offers) or catalogue directory").option("-i, --input <directory>", "Directory containing generated route YAML documents", ".tmp/datasource-catalogue").option("-o, --output <directory>", "Output directory; defaults to updating the input directory").option("--model <name>", "AI model name").option("--ai-url <url>", "AI base URL").option("--min-confidence <number>", "Minimum confidence required to accept an ai/sdk mapping", parseConfidence).option("--timeout <milliseconds>", "Maximum duration of one route-level ai/sdk request", (value) => parsePositiveNumber(value)).option("-w, --workers <count>", "Maximum number of concurrent route inference jobs (max 10)", parseWorkerCount).description("Use AI to review unresolved mappings in generated route YAML documents").action(async (routeOrDirectory, options) => {
23467
- intro("Datasource catalogue inference");
23470
+ atlasLogger.intro("Datasource catalogue inference");
23468
23471
  const config = getUserConfig();
23469
23472
  const inference = config.inference;
23470
23473
  const resolvedOptions = {
@@ -23498,26 +23501,28 @@ var infer_default = (program) => void program.command("infer").argument("[route-
23498
23501
  const w = resolvedOptions.workers;
23499
23502
  if (!inferenceProgress) {
23500
23503
  progress$1.finish("Route artifacts loaded");
23501
- inferenceProgress = progress({
23502
- style: "heavy",
23503
- max: total,
23504
- size: 40
23505
- });
23506
- inferenceProgress.start(`${w} worker${w > 1 ? "s" : ""} · Infer · [0/${total}] routes`);
23504
+ if (!atlasLogger.isCi) {
23505
+ inferenceProgress = progress({
23506
+ style: "heavy",
23507
+ max: total,
23508
+ size: 40
23509
+ });
23510
+ inferenceProgress.start(`${w} worker${w > 1 ? "s" : ""} · Infer · [0/${total}] routes`);
23511
+ }
23507
23512
  }
23508
23513
  const label = `${w} worker${w > 1 ? "s" : ""} · Infer · [${completedRoutes}/${total}] routes · ${route.method} ${route.path} [${phase}]`;
23509
23514
  if (completed) {
23510
23515
  completedRoutes += 1;
23511
- inferenceProgress.advance(1, label.replace(`[${completedRoutes - 1}/${total}]`, `[${completedRoutes}/${total}]`));
23516
+ inferenceProgress?.advance(1, label.replace(`[${completedRoutes - 1}/${total}]`, `[${completedRoutes}/${total}]`));
23512
23517
  return;
23513
23518
  }
23514
- inferenceProgress.message(label);
23519
+ inferenceProgress?.message(label);
23515
23520
  }
23516
23521
  }));
23517
23522
  inferenceProgress?.stop(`Inference completed: ${completedRoutes} route${completedRoutes > 1 ? "s" : ""} · ${resolvedOptions.workers} worker${resolvedOptions.workers > 1 ? "s" : ""}`);
23518
23523
  progress$1.finish("Inferrence mapping review completed");
23519
23524
  const rejectionSummary = Object.entries(result.rejectionReasons).filter(([, count]) => count > 0).map(([reason, count]) => `${reason}=${count}`).join(", ");
23520
- note([
23525
+ atlasLogger.note([
23521
23526
  `Input directory: ${result.inputPath}`,
23522
23527
  `Output directory: ${result.outputPath}`,
23523
23528
  routeSelector ? `Route selector: ${routeSelector.method} ${routeSelector.path}` : null,
@@ -23530,10 +23535,10 @@ var infer_default = (program) => void program.command("infer").argument("[route-
23530
23535
  `Mappings inferred: ${result.inferred}`,
23531
23536
  `Needs review remaining in scope: ${result.remainingInScope}`
23532
23537
  ].filter(Boolean).join("\n"), "Inference");
23533
- outro("Datasource catalogue inference completed");
23538
+ atlasLogger.outro("Datasource catalogue inference completed");
23534
23539
  } catch (error) {
23535
23540
  progress$1.fail("AI mapping review failed");
23536
- cancel(error instanceof Error ? error.message : String(error));
23541
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
23537
23542
  process.exit(1);
23538
23543
  }
23539
23544
  });
@@ -23584,7 +23589,7 @@ export default defineConfig({
23584
23589
  var init_default = (program, datasourceCommand) => void program.command("init").option("--force", "Overwrite an existing atlas.config.ts", false).description("Create an atlas.config.ts in the target API project").action(async (options) => {
23585
23590
  const configPath = path.resolve(datasourceCommand.opts().config ?? CONFIG_FILE_NAME);
23586
23591
  const configDirectory = path.dirname(configPath);
23587
- intro("Initialize datasource configuration");
23592
+ atlasLogger.intro("Initialize datasource configuration");
23588
23593
  try {
23589
23594
  await fsPromises.mkdir(configDirectory, { recursive: true });
23590
23595
  if (!options.force) {
@@ -23598,9 +23603,9 @@ var init_default = (program, datasourceCommand) => void program.command("init").
23598
23603
  if (exists) throw new Error(`${configPath} already exists. Use --force to overwrite it.`);
23599
23604
  }
23600
23605
  await fsPromises.writeFile(configPath, configTemplate, "utf8");
23601
- outro(`Created ${configPath}`);
23606
+ atlasLogger.outro(`Created ${configPath}`);
23602
23607
  } catch (error) {
23603
- cancel(error instanceof Error ? error.message : String(error));
23608
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
23604
23609
  process.exitCode = 1;
23605
23610
  }
23606
23611
  });
@@ -23672,7 +23677,7 @@ function formatNeedsReviewTable(rows) {
23672
23677
  ].join("\n");
23673
23678
  }
23674
23679
  var needsReview_default = (program) => void program.command("needs-review").argument("[catalogue-directory]", "Directory containing generated route YAML documents", ".tmp/datasource-catalogue").addOption(new Option("--sort <metric>", "Sort candidates by review count or percentage").choices(["count", "percentage"]).default("count")).option("--limit <number>", "Maximum number of candidate routes to display", (value) => parsePositiveInteger(value)).description("Display needs_review metrics grouped by route").action(async (catalogueDirectory, options) => {
23675
- intro("Datasource catalogue needs review report");
23680
+ atlasLogger.intro("Datasource catalogue needs review report");
23676
23681
  const { cwd } = getUserConfig();
23677
23682
  const progress = taskProgressService.createStepProgress();
23678
23683
  try {
@@ -23687,10 +23692,10 @@ var needsReview_default = (program) => void program.command("needs-review").argu
23687
23692
  limit: options.limit
23688
23693
  }));
23689
23694
  if (report.rows.length) {
23690
- log.info("Candidate routes");
23691
- log.message(formatNeedsReviewTable(report.rows));
23692
- } else log.info("No route requires review.");
23693
- note([
23695
+ atlasLogger.info("Candidate routes");
23696
+ atlasLogger.info(formatNeedsReviewTable(report.rows));
23697
+ } else atlasLogger.info("No route requires review.");
23698
+ atlasLogger.note([
23694
23699
  `Input directory: ${report.inputPath}`,
23695
23700
  `Route documents: ${report.files.length}`,
23696
23701
  `Candidate routes: ${report.candidateRoutes}/${report.totalRoutes}`,
@@ -23699,10 +23704,10 @@ var needsReview_default = (program) => void program.command("needs-review").argu
23699
23704
  `Needs review percentage: ${formatPercentage(report.needsReviewPercentage)}`,
23700
23705
  options.limit ? `Rows displayed: ${report.rows.length}/${report.candidateRoutes}` : null
23701
23706
  ].filter(Boolean).join("\n"), "Summary");
23702
- outro("Datasource catalogue needs review report completed");
23707
+ atlasLogger.outro("Datasource catalogue needs review report completed");
23703
23708
  } catch (error) {
23704
23709
  progress.fail("Needs review report failed");
23705
- cancel(error instanceof Error ? error.message : String(error));
23710
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
23706
23711
  process.exit(1);
23707
23712
  }
23708
23713
  });
@@ -23857,16 +23862,16 @@ async function reportChangedHandler(cwd, options) {
23857
23862
  const reportPath = path.resolve(cwd, options.report ?? path.join(config.outputDir, "changed-routes-report.md"));
23858
23863
  await fsPromises.mkdir(path.dirname(reportPath), { recursive: true });
23859
23864
  await fsPromises.writeFile(reportPath, `${report}\n`, "utf8");
23860
- note(report, "Datasource mapping report");
23865
+ atlasLogger.note(report, "Datasource mapping report");
23861
23866
  }
23862
23867
  var reportChanged_default = (program) => void program.command("report:changed").requiredOption("--changed-files <file>", "Newline-delimited list of changed repository files").option("-o, --output <directory>", "Directory containing generated graph artifacts, overriding outputDir").option("--report <file>", "Markdown report output path; defaults to outputDir/changed-routes-report.md").description("Report deterministic mapping coverage for routes impacted by changed files").action(async (options) => {
23863
- intro("Datasource changed-route report");
23868
+ atlasLogger.intro("Datasource changed-route report");
23864
23869
  const { cwd } = getUserConfig();
23865
23870
  try {
23866
23871
  await reportChangedHandler(cwd, options);
23867
- outro("Datasource changed-route report completed");
23872
+ atlasLogger.outro("Datasource changed-route report completed");
23868
23873
  } catch (error) {
23869
- cancel(error instanceof Error ? error.message : String(error));
23874
+ atlasLogger.error(error instanceof Error ? error.message : String(error));
23870
23875
  process.exit(1);
23871
23876
  }
23872
23877
  });