Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/sxzz/actionspack. Lockfile-first GitHub Actions workflow packer
actions github workflow
Something went wrong. Try again.
1.8 kB · 99 lines
TypeScript
at main
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100import type { GitHubClient } from './utils/github.ts'
export type { GitHubClient }
export interface ActionspackOptions { cwd?: string entries?: WorkflowEntry[] external?: string[] github?: GitHubClient stdout?: WritableStream stderr?: WritableStream}
export interface WritableStream { write: (chunk: string) => void}
export interface WorkflowEntry { source: string output: string}
export interface ActionspackConfig { entries: WorkflowEntry[] external: string[]}
export interface LockDependency { package: string requested: string resolved?: string foundAt?: string}
export interface LockEntry { output: string dependencies: LockDependency[]}
export interface LockPackage { source: 'github' owner: string repo: string path: string requested: string resolved: string type: | 'composite' | 'external-action' | 'external-workflow' | 'reusable-workflow' external?: boolean contentDigest: string dependencies: LockDependency[]}
export interface Lockfile { lockfileVersion: 1 entries: Record<string, LockEntry> packages: Record<string, LockPackage>}
export interface RemoteRef { owner: string repo: string path: string ref: string package: string kind: 'action' | 'reusable-workflow'}
export interface ScanOptions extends ActionspackOptions { refreshPackages?: Set<string>}
export interface UpdateOptions extends ActionspackOptions { packageName?: string lockfileOnly?: boolean}
export interface DiffOptions extends ActionspackOptions { json?: boolean}
export interface DiffResult { added: string[] removed: string[] changed: Array<{ package: string oldResolved: string newResolved: string dependencyChanged: boolean }>}
export interface CommandResult { lockfile: Lockfile entries: WorkflowEntry[]}