@cmflow/atlas 3.4.0-beta.27 → 3.4.0-beta.28

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.
@@ -5402,7 +5402,12 @@ async function readCatalogueFromDirectory(inputDir) {
5402
5402
  const files = await globby("**/*.@(yaml|yml)", {
5403
5403
  cwd: inputDir,
5404
5404
  absolute: true,
5405
- ignore: ["**/*.graph.yaml", "**/*.graph.yml"]
5405
+ ignore: [
5406
+ "backends/**/*.yaml",
5407
+ "backends/**/*.yml",
5408
+ "**/*.graph.yaml",
5409
+ "**/*.graph.yml"
5410
+ ]
5406
5411
  });
5407
5412
  if (!files.length) throw new Error(`No route YAML documents found in ${inputDir}`);
5408
5413
  return {
@@ -5583,10 +5588,10 @@ var cleanOrphans_default = (program) => void program.command("clean-orphans").op
5583
5588
  //#endregion
5584
5589
  //#region src/commands/backendSources.ts
5585
5590
  async function listBackendSourceMetadata(sources, backend, refresh = false) {
5586
- const resolvableSources = sources.filter((source) => Boolean(source.resolve));
5591
+ const resolvableSources = sources.filter((source) => Boolean(source.resolve) && (!refresh || Boolean(source.cache)));
5587
5592
  const selectedSources = backend ? resolvableSources.filter((source) => source.name === backend) : resolvableSources;
5588
- if (backend && !selectedSources.length) throw new Error(`Unknown backend source with a resolver: ${backend}`);
5589
- if (!backend && !selectedSources.length) throw new Error("No backend source with a resolver is configured");
5593
+ if (backend && !selectedSources.length) throw new Error(`Unknown backend source with a resolver${refresh ? " and cache" : ""}: ${backend}`);
5594
+ if (!backend && !selectedSources.length) throw new Error(`No backend source with a resolver${refresh ? " and cache" : ""} is configured`);
5590
5595
  const previousRefresh = process.env.ATLAS_BACKEND_SOURCE_REFRESH;
5591
5596
  if (refresh) process.env.ATLAS_BACKEND_SOURCE_REFRESH = "true";
5592
5597
  let propertiesByBackend;
@@ -5607,13 +5612,13 @@ var backendSources_default = (program) => void program.command("backend-sources"
5607
5612
  intro("Atlas backend source metadata");
5608
5613
  try {
5609
5614
  if (options.backend && options.all) throw new Error("Specify either --backend or --all, not both");
5610
- const sources = getUserConfig().analysis.backends.filter((source) => Boolean(source.resolve));
5615
+ const sources = getUserConfig().analysis.backends.filter((source) => Boolean(source.resolve) && (!options.refresh || Boolean(source.cache)));
5611
5616
  const selectedBackend = options.all ? void 0 : options.backend || await select({
5612
5617
  message: "Which backend source do you want to execute?",
5613
5618
  options: sources.map((source) => ({
5614
5619
  value: source.name,
5615
5620
  label: source.name,
5616
- hint: "resolver configured"
5621
+ hint: options.refresh ? "resolver and cache configured" : "resolver configured"
5617
5622
  }))
5618
5623
  });
5619
5624
  if (isCancel(selectedBackend)) {