Skip to content
Clone
98e06cb
178 lines 3.6 KB
/**
* Public API of entities/repo — the repository domain model shared by the
* repo features and the workspace page's repo area. Consumers import from
* '@app/domains/repo/model', never from deeper files.
*
* Importing this barrel also loads `ui/embed.css` globally: it styles
* server-rendered fragments wherever they appear (file tree, README sandbox,
* aside language bar), so every repo surface is guaranteed to have it.
*/
import '../embed.css'
export { default as embedCssText } from '../embed.css?raw'
export {
type ArchiveFormat,
type ArchiveResult,
createArchive,
createBundle,
queryArchive,
} from './archives'
// advanced reads: blame & submodules
export {
type BlameRange,
blameLineMap,
fetchBlame,
fetchConflictDetail,
listSubmodules,
resolveSubmodule,
type SubmoduleRow,
} from './blame'
// code line comments
export {
type CodeComment,
type CodeCommentPageData,
createCodeComment,
deleteCodeComment,
groupCommentsByLine,
listCodeComments,
resolveCodeComment,
unresolveCodeComment,
updateCodeComment,
} from './code-comments'
// commits & diffs
export {
type CommitRow,
type CommitsPage,
fetchCommit,
fetchDiffStyle,
fetchNumstat,
fetchRawDiff,
listCommitsPage,
} from './commits'
export {
applyNumstat,
type DiffFile,
type DiffFileStatus,
type DiffHunk,
type DiffLine,
type DiffStyle,
EMPTY_TREE,
type NumstatRow,
normalizeDiffStyle,
parseHunks,
splitDiffFiles,
toSplitRows,
} from './diff'
// html fragments & web-path mapping
export {
fetchHtmlFragment,
type HtmlFragment,
htmlFragmentUrl,
prefetchHtmlFragment,
useHtmlFragment,
} from './fragment'
export { parentPath, parseRepoAppHref, parseWebHref, repoWebHref } from './href'
export {
type CodeActivity,
type ContributorRow,
fetchCodeActivity,
type LanguageStat,
listContributors,
readLanguageStats,
rescanLanguages,
} from './insights'
export {
createLfsLock,
type LfsLockPage,
listLfsLocks,
unlockLfsById,
unlockLfsPath,
verifyLfsLocks,
} from './lfs'
// protection rules (branch policies + whitelists)
export {
addBranchWhitelist,
addTagWhitelist,
type BranchPolicy,
type BranchWhitelistRow,
type CreatePolicyInput,
createPolicy,
createTagPolicy,
deletePolicy,
deleteTagPolicy,
getPolicy,
listBranchWhitelists,
listPolicies,
listTagPolicies,
listTagWhitelists,
listUserOptions,
removeBranchWhitelist,
removeTagWhitelist,
type TagPolicy,
type TagWhitelistRow,
type UserOption,
updatePolicy,
type WhitelistKind,
} from './protection'
// refs (branches & tags)
export {
type BranchRow,
createBranch,
createTag,
deleteBranch,
deleteTag,
fetchTag,
listBranches,
listTags,
renameBranch,
setDefaultBranch,
type TagRow,
} from './refs'
// releases
export {
createRelease,
deleteRelease,
getRelease,
listReleases,
type Release,
type ReleaseListPage,
updateRelease,
} from './releases'
export {
type FetchResult,
fetchRemote,
type ImportResult,
importRemote,
listRemotes,
type PushResult,
pushRemote,
type RemoteRow,
removeRemote,
upsertRemote,
} from './remotes'
// repo metadata + clone urls
export {
archiveRepo,
type CloneTarget,
cloneTargets,
fetchRepo,
listSpaceRepos,
primaryCloneUrl,
type RepoDetail,
type RepoSummary,
setRepoWatch,
starRepo,
unarchiveRepo,
unstarRepo,
updateRepo,
} from './repo'
// settings domains
export { addTopic, listTopics, removeTopic, type TopicRow } from './topics'
// tree & blob
export {
type BlobPayload,
fetchBlob,
fetchTreeJson,
type TreeEntry,
type TreeMode,
} from './tree'