function findImportsPerAstFile(oxcAst) {
  LogService.debug(`Analyzer "find-imports": started findImportsPerAstFile method`);

  // TODO: possibly make traversal quicker by using import/export data from oxcAst.module

  // https://github.com/babel/babel/blob/672a58660f0b15691c44582f1f3fdcdac0fa0d2f/packages/babel-core/src/transformation/index.ts#L110
  // Visit AST...
  /** @type {Partial<FindImportsAnalyzerEntry>[]} */
  const transformedFile = [];
  oxcTraverse(oxcAst, {
    ImportDeclaration({ node }) {
      const importSpecifiers = getImportOrReexportsSpecifiers(node);
      if (!importSpecifiers.length) {
        importSpecifiers.push('[file]'); // apparently, there was just a file import
      }

      const source = node.source.value;
      const entry = /** @type {Partial<FindImportsAnalyzerEntry>} */ ({ importSpecifiers, source });
      const assertionType = getAssertionType(node);
      if (assertionType) {
        entry.assertionType = assertionType;
      }
      transformedFile.push(entry);
    },
    ExportNamedDeclaration({ node }) {
      // Are we dealing with a regular export, not a re-export?
      if (!node.source) return;

      const importSpecifiers = getImportOrReexportsSpecifiers(node);
      const source = node.source.value;
      const entry = /** @type {Partial<FindImportsAnalyzerEntry>} */ ({ importSpecifiers, source });
      const assertionType = getAssertionType(node);
      if (assertionType) {
        entry.assertionType = assertionType;
      }
      transformedFile.push(entry);
    },
    ExportAllDeclaration({ node }) {
      // Are we dealing with a regular export, not a re-export?
      if (!node.source) return;

      const importSpecifiers = ['[*]'];

      const source = node.source.value;
      const entry = /** @type {Partial<FindImportsAnalyzerEntry>} */ ({ importSpecifiers, source });
      const assertionType = getAssertionType(node);
      if (assertionType) {
        entry.assertionType = assertionType;
      }
      transformedFile.push(entry);
    },
    // Dynamic imports for swc
    // TODO: remove if swc is completely phased out
    CallExpression({ node }) {
      if (node.callee?.type !== 'Import') {
        return;
      }
      // TODO: check for specifiers catched via obj destructuring?
      // TODO: also check for ['file']
      const importSpecifiers = ['[default]'];
      const dynamicImportExpression = node.arguments[0].expression;
      const source = isLiteral(dynamicImportExpression)
        ? dynamicImportExpression.value
        : '[variable]';
      transformedFile.push({ importSpecifiers, source });
    },
    // Dynamic imports for oxc

    ExpressionStatement({ node }) {
      if (node.expression.type !== 'ImportExpression') return;

      // TODO: check for specifiers catched via obj destructuring?
      // TODO: also check for ['file']
      const importSpecifiers = ['[default]'];
      const dynamicImportExpression = node.expression;
      const source = isLiteral(dynamicImportExpression.source)
        ? dynamicImportExpression.source.value
        : '[variable]';
      transformedFile.push({ importSpecifiers, source });
    },
  });

  return transformedFile;
}
Finds import specifiers and sources
@param {oxcAstModule} oxcAst