import { PackageManager } from "./packageManager.js"; //#region src/init/utils/githubActions.d.ts /** A GitHub Actions workflow file to be written to the project. */ export type GithubWorkflowFile = { /** Path relative to the project root, e.g. `.github/workflows/intlayer-fill.yml`. */ filePath: string; /** Full YAML content of the workflow file. */ content: string; }; /** Options controlling how the CI workflows are generated. */ export type GithubWorkflowsOptions = { /** * The repository hosts several Intlayer projects. Every scaffolded command * always carries `--ci` (the CLI discovers each Intlayer project of the * repository and runs the command inside it), so this only adds the * `INTLAYER_PROJECT_CREDENTIALS` hint to the workflow env: a JSON map of * project path to CMS access keys injected per project by the CLI. */ isMonorepo?: boolean; /** * Repository-relative directory (posix separators) the workflow commands run * in. Set when the Intlayer project lives in a subdirectory of the * repository and the repository root has no workspace manifest to install * dependencies from. Undefined = repository root. */ workingDirectory?: string; }; /** * Resolved placement and generation parameters for the CI workflows. * See {@link resolveGithubWorkflowsContext}. */ export type GithubWorkflowsContext = { /** * Directory the workflow files must be written to. GitHub only triggers * workflows stored in `.github/workflows` at the repository root, so this is * the git root whenever the project lives inside a git repository. */ workflowsRootDir: string; /** Package manager whose commands are baked into the workflows. */ packageManager: PackageManager; /** Generation options forwarded to {@link getGithubWorkflows}. */ options: GithubWorkflowsOptions; }; /** * Resolves where the CI workflows must be written and how their commands must * be generated, based on the repository layout around `rootDir` (the Intlayer * project being initialized): * * - Project at the repository root: workflows are written in place. When the * repository is a monorepo (workspace manifest, or several Intlayer projects * discovered by `listProjects`), the per-project credentials hint is added. * - Project nested in a repository whose root has a `package.json` * (workspace-managed monorepo): workflows are written at the git root — * GitHub ignores `.github/workflows` in subdirectories — dependencies are * installed at the root with the root's package manager, and the per-project * credentials hint is added. * - Project nested in a repository without a root `package.json`: workflows * are written at the git root but run inside the project directory * (`working-directory`), keeping the project's own package manager. */ export declare const resolveGithubWorkflowsContext: (rootDir: string, projectPackageManager: PackageManager) => Promise; /** Workflow file path constants, relative to the project root. */ export declare const GITHUB_FILL_WORKFLOW_PATH = ".github/workflows/intlayer-fill.yml"; export declare const GITHUB_TEST_WORKFLOW_PATH = ".github/workflows/intlayer-test.yml"; /** * Returns the two Intlayer GitHub Actions workflows (`fill` and `test`), * generated with commands matching the detected package manager and the * repository layout (see {@link GithubWorkflowsOptions} for the monorepo and * nested-project variants). */ export declare const getGithubWorkflows: (packageManager: PackageManager, options?: GithubWorkflowsOptions) => GithubWorkflowFile[]; //#endregion //# sourceMappingURL=githubActions.d.ts.map