import { ArduinoLibraryPropertiesData } from "./sources/arduino-library-properties.js";
import { CinderCinderblockXmlData } from "./sources/cinder-cinderblock-xml.js";
import { CodeStatsData } from "./sources/code-stats.js";
import { CodeMetaJsonData } from "./sources/codemeta-json.js";
import { DependencyUpdatesData } from "./sources/dependency-updates.js";
import { FileStatsData } from "./sources/file-stats.js";
import { GitConfigData } from "./sources/git-config.js";
import { GitStatsData } from "./sources/git-stats.js";
import { GitHubData } from "./sources/github.js";
import { GitHubActionsData } from "./sources/github-actions.js";
import { GoGoModData } from "./sources/go-go-mod.js";
import { GoGoreleaserYamlData } from "./sources/go-goreleaser-yaml.js";
import { JavaPomXmlData } from "./sources/java-pom-xml.js";
import { LicenseFileData } from "./sources/license-file.js";
import { MetadataFileData } from "./sources/metadata-file.js";
import { MetascopeData } from "./sources/metascope.js";
import { NodeNpmRegistryData } from "./sources/node-npm-registry.js";
import { NodePackageJsonData } from "./sources/node-package-json.js";
import { ObsidianPluginManifestJsonData } from "./sources/obsidian-plugin-manifest-json.js";
import { ObsidianPluginRegistryData } from "./sources/obsidian-plugin-registry.js";
import { OpenframeworksAddonConfigMkData } from "./sources/openframeworks-addon-config-mk.js";
import { OpenframeworksInstallXmlData } from "./sources/openframeworks-install-xml.js";
import { ProcessingLibraryPropertiesData } from "./sources/processing-library-properties.js";
import { ProcessingSketchPropertiesData } from "./sources/processing-sketch-properties.js";
import { PubliccodeYamlData } from "./sources/publiccode-yaml.js";
import { PythonPkgInfoData } from "./sources/python-pkg-info.js";
import { PythonPypiRegistryData } from "./sources/python-pypi-registry.js";
import { PythonPyprojectTomlData } from "./sources/python-pyproject-toml.js";
import { PythonSetupCfgData } from "./sources/python-setup-cfg.js";
import { PythonSetupPyData } from "./sources/python-setup-py.js";
import { ReadmeFileData } from "./sources/readme-file.js";
import { RubyGemspecData } from "./sources/ruby-gemspec.js";
import { RustCargoTomlData } from "./sources/rust-cargo-toml.js";
import { XcodeInfoPlistData } from "./sources/xcode-info-plist.js";
import { XcodeProjectPbxprojData } from "./sources/xcode-project-pbxproj.js";

//#region src/lib/metadata-types.d.ts
/**
 * The complete metadata context assembled from all sources.
 * Each key corresponds to a metadata source.
 */
type MetadataContext = {
  arduinoLibraryProperties: ArduinoLibraryPropertiesData;
  cinderCinderblockXml: CinderCinderblockXmlData;
  codemetaJson: CodeMetaJsonData;
  codeStats: CodeStatsData;
  dependencyUpdates: DependencyUpdatesData;
  fileStats: FileStatsData;
  gitConfig: GitConfigData;
  github: GitHubData;
  githubActions: GitHubActionsData;
  gitStats: GitStatsData;
  goGoMod: GoGoModData;
  goGoreleaserYaml: GoGoreleaserYamlData;
  javaPomXml: JavaPomXmlData;
  licenseFile: LicenseFileData;
  metadataFile: MetadataFileData;
  metascope: MetascopeData;
  nodeNpmRegistry: NodeNpmRegistryData;
  nodePackageJson: NodePackageJsonData;
  obsidianPluginManifestJson: ObsidianPluginManifestJsonData;
  obsidianPluginRegistry: ObsidianPluginRegistryData;
  openframeworksAddonConfigMk: OpenframeworksAddonConfigMkData;
  openframeworksInstallXml: OpenframeworksInstallXmlData;
  processingLibraryProperties: ProcessingLibraryPropertiesData;
  processingSketchProperties: ProcessingSketchPropertiesData;
  publiccodeYaml: PubliccodeYamlData;
  pythonPkgInfo: PythonPkgInfoData;
  pythonPypiRegistry: PythonPypiRegistryData;
  pythonPyprojectToml: PythonPyprojectTomlData;
  pythonSetupCfg: PythonSetupCfgData;
  pythonSetupPy: PythonSetupPyData;
  readmeFile: ReadmeFileData;
  rubyGemspec: RubyGemspecData;
  rustCargoToml: RustCargoTomlData;
  xcodeInfoPlist: XcodeInfoPlistData;
  xcodeProjectPbxproj: XcodeProjectPbxprojData;
};
/**
 * The name of a metadata source.
 */
type SourceName = keyof MetadataContext;
/**
 * User-supplied data passed to templates for parameterized ownership checks.
 * All fields are optional; templates that don't need them can ignore the argument.
 */
type TemplateData = {
  [key: string]: unknown;
  authorName?: string | string[];
  githubAccount?: string | string[];
};
/**
 * A template function that transforms MetadataContext into a custom shape.
 * The optional second argument provides user-supplied template data.
 */
type Template<T> = (context: MetadataContext, templateData: TemplateData) => T;
/**
 * Identity wrapper for type inference in config files.
 * Use this in `metascope.config.ts` to get autocomplete on available fields.
 * @example
 * ```typescript
 * import { defineTemplate } from 'metascope'
 *
 * export default defineTemplate(({ codemetaJson, github }) => ({
 *   name: codemetaJson?.data.name,
 *   stars: github?.data.stargazerCount,
 * }))
 * ```
 */
declare function defineTemplate<T>(transform: Template<T>): Template<T>;
/**
 * API credentials for remote metadata sources.
 */
type Credentials = {
  githubToken?: string;
};
/**
 * Base options shared by all `getMetadata` overloads.
 */
type GetMetadataBaseOptions = {
  /** When true (the default), all paths in the output (source, workspaceDirectories, etc.) are absolute. When false, paths are relative to the project directory. */absolute?: boolean; /** API credentials for remote sources. */
  credentials?: Credentials; /** Skip web sources (npm registry, GitHub API, PyPI, etc.). */
  offline?: boolean; /** Project directory path. Defaults to `'.'` (resolved to `process.cwd()` via `path.resolve`). */
  path: string; /** Search for metadata files recursively in subdirectories. Defaults to false. */
  recursive?: boolean; /** Ignore files specified .gitignore in the file tree. Defaults to true. */
  respectIgnored?: boolean; /** Only run these specific sources. Defaults to all sources when undefined. */
  sources?: SourceName[]; /** User-supplied data passed to templates. */
  templateData?: TemplateData;
  /**
   * Directories to any monorepo workspaces... only supports yarn, npm, pnpm, lerna, and bolt at the moment
   * Never includes the root path!
   * False is disable, true is auto-discover which turns into string[], string[] is manual list relative to the project directory path...
   */
  workspaces?: boolean | string[];
};
/**
 * Default values for optional fields in `GetMetadataBaseOptions`.
 */
declare const DEFAULT_GET_METADATA_OPTIONS: Required<Omit<GetMetadataBaseOptions, 'credentials' | 'sources' | 'templateData'>>;
/**
 * Options for `getMetadata` without a template (returns full `MetadataContext`).
 */
type GetMetadataOptions = GetMetadataBaseOptions & {
  /** Built-in template name or omit for full output. */template?: 'frontmatter' | 'metadata' | 'project' | (string & {});
};
/**
 * Options for `getMetadata` with a template function (returns the template's return type).
 */
type GetMetadataTemplateOptions<T> = GetMetadataBaseOptions & {
  /** Template function that transforms MetadataContext into a custom shape. */template: Template<T>;
};
//#endregion
export { Credentials, DEFAULT_GET_METADATA_OPTIONS, GetMetadataBaseOptions, GetMetadataOptions, GetMetadataTemplateOptions, MetadataContext, SourceName, Template, TemplateData, defineTemplate };