function findExportsPerAstFile(oxcAst, { skipFileImports }) {
  LogService.debug(`Analyzer "find-exports": started findExportsPerAstFile method`);

  // Visit AST...

  /** @type {FindExportsSpecifierObj[]} */
  const transformedFile = [];
  // Unfortunately, we cannot have async functions in babel traverse.
  // Therefore, we store a temp reference to path that we use later for
  // async post processing (tracking down original export Identifier)
  /** @type {{[key:string]:SwcBinding}} */
  let globalScopeBindings;

  const exportHandler = (/** @type {SwcPath} */ astPath) => {
    const exportSpecifiers = getExportSpecifiers(astPath.node);
    const localMap = getLocalNameSpecifiers(astPath.node);
    const source = astPath.node.source?.value || astPath.node.source?.name;
    const entry = { exportSpecifiers, localMap, source, __tmp: { astPath } };
    const assertionType = getAssertionType(astPath.node);
    if (assertionType) {
      entry.assertionType = assertionType;
    }
    transformedFile.push(entry);
  };

  const exportDefaultHandler = (/** @type {SwcPath} */ astPath) => {
    const exportSpecifiers = ['[default]'];
    const { node } = astPath;
    let source;

    // Is it an inline declaration like "export default class X {};" ?
    if (
      node.decl?.type === 'Identifier' ||
      node.expression?.type === 'Identifier' ||
      node.declaration?.type === 'Identifier'
    ) {
      // It is a reference to an identifier like "export { x } from 'y';"
      const importOrDeclPath = getReferencedDeclaration({
        referencedIdentifierName:
          node.decl?.value || node.expression?.value || node.declaration?.name,
        globalScopeBindings,
      });
      if (isImportingSpecifier(importOrDeclPath)) {
        source = importOrDeclPath.parentPath.node.source.value;
      }
    }
    transformedFile.push({ exportSpecifiers, source, __tmp: { astPath } });
  };

  const globalScopeHandler = ({ scope }) => {
    globalScopeBindings = scope.bindings;
  };

  /** @type {SwcVisitor} */
  const visitor = {
    // for swc
    Module: globalScopeHandler,
    // for oxc and babel
    Program: globalScopeHandler,
    ExportDeclaration: exportHandler,
    ExportNamedDeclaration: exportHandler,
    ExportDefaultDeclaration: exportDefaultHandler,
    ExportDefaultExpression: exportDefaultHandler,
  };

  oxcTraverse(oxcAst, visitor, { needsAdvancedPaths: true });

  if (!skipFileImports) {
    // Always add an entry for just the file 'relativePath'
    // (since this also can be imported directly from a search target project)
    transformedFile.push({
      exportSpecifiers: ['[file]'],
      // source: relativePath,
    });
  }

  return transformedFile;
}
Finds import specifiers and sources for a given ast result
@param {SwcAstModule} oxcAst
@param {FindExportsConfig} config