diff --git a/docs/gen/translate.ts b/docs/gen/translate.ts index 1622909..68174ca 100644 --- a/docs/gen/translate.ts +++ b/docs/gen/translate.ts @@ -23,6 +23,7 @@ If translating in Korean, translate "Git Object" as "Git 개체". If translating in Korean, translate "Tree" as "트리". If translating in Korean, translate "Repository" as "리포지토리". If translating in Japanese, finish the sentence in ます style. +Don't translate signature/example codes (except comments) or parameters name. Finish with a noun if it is a explanation for a parameter or a return value. === @@ -32,7 +33,7 @@ ${JSON.stringify(doc, null, 2)} `; const response = await ai.chat.completions.create({ - model: options?.model ?? 'gpt-4o', + model: options?.model ?? 'gpt-5.2', messages: [{ role: 'user', content: prompt }], }); diff --git a/docs/ko/reference/Reflog/Methods/append.md b/docs/ko/reference/Reflog/Methods/append.md new file mode 100644 index 0000000..161aeab --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/append.md @@ -0,0 +1,58 @@ +# append + +reflog에 새 항목을 추가해요. + +## 시그니처 + +```ts +class Reflog { + append(newOid: string, committer: Signature, msg?: string | null | undefined): void; +} +``` + +### 파라미터 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Reflog/Methods/get.md b/docs/ko/reference/Reflog/Methods/get.md new file mode 100644 index 0000000..a44b40c --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/get.md @@ -0,0 +1,31 @@ +# get + +인덱스로 reflog 항목을 가져와요. + +## 시그니처 + +```ts +class Reflog { + get(i: number): ReflogEntry | null; +} +``` + +### 파라미터 + + + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Reflog/Methods/isEmpty.md b/docs/ko/reference/Reflog/Methods/isEmpty.md new file mode 100644 index 0000000..4b4bc32 --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/isEmpty.md @@ -0,0 +1,21 @@ +# isEmpty + +reflog가 비어 있는지 확인해요. + +## 시그니처 + +```ts +class Reflog { + isEmpty(): boolean; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Reflog/Methods/iter.md b/docs/ko/reference/Reflog/Methods/iter.md new file mode 100644 index 0000000..4b714a0 --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/iter.md @@ -0,0 +1,31 @@ +# iter + +reflog 항목에 대한 이터레이터를 만들어요. + +## 시그니처 + +```ts +class Reflog { + iter(): ReflogIter; +} +``` + +### 반환 값 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Reflog/Methods/len.md b/docs/ko/reference/Reflog/Methods/len.md new file mode 100644 index 0000000..f41e48a --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/len.md @@ -0,0 +1,21 @@ +# len + +reflog의 항목 수를 가져와요. + +## 시그니처 + +```ts +class Reflog { + len(): number; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Reflog/Methods/remove.md b/docs/ko/reference/Reflog/Methods/remove.md new file mode 100644 index 0000000..857a15d --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/remove.md @@ -0,0 +1,36 @@ +# remove + +reflog에서 항목을 제거해요. + +## 시그니처 + +```ts +class Reflog { + remove(i: number, rewritePreviousEntry?: boolean): void; +} +``` + +### 파라미터 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Reflog/Methods/write.md b/docs/ko/reference/Reflog/Methods/write.md new file mode 100644 index 0000000..619bdc6 --- /dev/null +++ b/docs/ko/reference/Reflog/Methods/write.md @@ -0,0 +1,21 @@ +# write + +reflog를 디스크에 써요. + +## 시그니처 + +```ts +class Reflog { + write(): void; +} +``` + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/ReflogEntry/Methods/committer.md b/docs/ko/reference/ReflogEntry/Methods/committer.md new file mode 100644 index 0000000..5f70b5e --- /dev/null +++ b/docs/ko/reference/ReflogEntry/Methods/committer.md @@ -0,0 +1,38 @@ +# committer + +이 reflog 항목의 커미터를 가져와요. + +## 시그니처 + +```ts +class ReflogEntry { + committer(): Signature; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/ReflogEntry/Methods/idNew.md b/docs/ko/reference/ReflogEntry/Methods/idNew.md new file mode 100644 index 0000000..f269823 --- /dev/null +++ b/docs/ko/reference/ReflogEntry/Methods/idNew.md @@ -0,0 +1,21 @@ +# idNew + +이 reflog 항목의 새 개체 ID(SHA1)를 가져와요. + +## 시그니처 + +```ts +class ReflogEntry { + idNew(): string; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/ReflogEntry/Methods/idOld.md b/docs/ko/reference/ReflogEntry/Methods/idOld.md new file mode 100644 index 0000000..b4ed9c5 --- /dev/null +++ b/docs/ko/reference/ReflogEntry/Methods/idOld.md @@ -0,0 +1,21 @@ +# idOld + +이 reflog 항목의 이전 개체 ID(SHA1)를 가져와요. + +## 시그니처 + +```ts +class ReflogEntry { + idOld(): string; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/ReflogEntry/Methods/message.md b/docs/ko/reference/ReflogEntry/Methods/message.md new file mode 100644 index 0000000..1e3f9cd --- /dev/null +++ b/docs/ko/reference/ReflogEntry/Methods/message.md @@ -0,0 +1,31 @@ +# message + +이 reflog 항목의 메시지를 가져와요. + +## 시그니처 + +```ts +class ReflogEntry { + message(): string; +} +``` + +### 반환 값 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/apply.md b/docs/ko/reference/Repository/Methods/apply.md new file mode 100644 index 0000000..f6fad2a --- /dev/null +++ b/docs/ko/reference/Repository/Methods/apply.md @@ -0,0 +1,39 @@ +# apply + +주어진 리포지토리에 Diff를 적용해서 작업 디렉터리, 인덱스 또는 둘 다에 직접 변경 사항을 반영해요. + +## 시그니처 + +```ts +class Repository { + apply(diff: Diff, location: ApplyLocation, options?: ApplyOptions | null | undefined): void; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/applyToTree.md b/docs/ko/reference/Repository/Methods/applyToTree.md new file mode 100644 index 0000000..dddd0ed --- /dev/null +++ b/docs/ko/reference/Repository/Methods/applyToTree.md @@ -0,0 +1,52 @@ +# applyToTree + +제공된 트리에 Diff를 적용하고, 결과 Index를 반환해요. + +## 시그니처 + +```ts +class Repository { + applyToTree( + tree: Tree, + diff: Diff, + options?: ApplyOptions | null | undefined + ): Index; +} +``` + +### 파라미터 + + + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/cherrypick.md b/docs/ko/reference/Repository/Methods/cherrypick.md new file mode 100644 index 0000000..63978cf --- /dev/null +++ b/docs/ko/reference/Repository/Methods/cherrypick.md @@ -0,0 +1,296 @@ +# cherrypick + +지정된 커밋을 HEAD에 체리픽하고 워킹 트리와 인덱스를 업데이트해요. +이 메서드는 커밋이 적용된 것처럼 인덱스와 트리를 준비하지만, 실제로 새 커밋을 만들지는 않아요. + +## 시그니처 + +```ts +class Repository { + cherrypick( + commit: Commit, + options?: CherrypickOptions | undefined | null, + ): void; +} +``` + +### 파라미터 + + + +### 에러 + + + +## 예제 + +```ts +import { openRepository } from 'es-git'; + +const repo = await openRepository('./path/to/repo'); +const cherrypickCommit = repo.getCommit('cherrypick-commit'); + +// Cherrypick the commit onto HEAD and working tree +repo.cherrypick(cherrypickCommit); +repo.cleanupState(); + +// Cherrypick the commit against our commit selecting the first parent as mainline (This is necessary because, for merge commits, there is ambiguity about which side of the merge should be treated as the baseline.) +repo.cherrypick(cherrypickCommit, { mainline: 1 }); +repo.cleanupState(); + +// Prevent working tree changes (dry run) but compute conflicts +repo.cherrypick(cherrypickCommit, { checkoutOptions: { dryRun: true } }); +repo.cleanupState(); + +// Cherrypick the commit against our commit selecting the first parent as mainline and prevent working tree changes (dry run) but compute conflicts +repo.cherrypick(cherrypickCommit, { mainline: 1, checkoutOptions: { dryRun: true } }); +repo.cleanupState(); +``` \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/cherrypickCommit.md b/docs/ko/reference/Repository/Methods/cherrypickCommit.md new file mode 100644 index 0000000..5e5551b --- /dev/null +++ b/docs/ko/reference/Repository/Methods/cherrypickCommit.md @@ -0,0 +1,89 @@ +# cherrypickCommit + +`ourCommit`에 대해 `cherrypickCommit`의 체리픽을 적용하고, 그 결과로 생성되는 Index를 반환해요. +작업 디렉터리나 리포지토리 상태는 수정하지 않아요. +이 메서드는 디스크에 어떤 변경도 기록하지 않고 HEAD도 업데이트하지 않아요. +실제로 적용하지 않고도 체리픽 결과가 어떻게 보일지 계산하는 데 유용해요. + +## 시그니처 + +```ts +class Repository { + cherrypickCommit( + cherrypickCommit: Commit, + ourCommit: Commit, + mainline: number, + mergeOptions?: MergeOptions | undefined | null, + ): Index; +} +``` + +### 파라미터 + + + +### 반환 값 + + + +### 에러 + + + +## 예제 + +```ts +// This is an example for cherrypick_commit +import { openRepository } from "es-git"; + +const repo = await openRepository("./path/to/repo"); +const cherry = repo.getCommit("cherrypick-commit"); +const target = repo.getCommit("onto-commit"); + +// Returns the Index resulting from the cherrypick in memory, +// without affecting HEAD or the working tree. +// The mainline parameter indicates which parent to use as the baseline, +// For merge commits, mainline specifies which parent to use as baseline (1 or 2). +// For normal (non-merge) commits, use mainline 0. +const idx = repo.cherrypickCommit(cherry, target, 0); + +// You can check for conflicts with idx.hasConflicts() +``` \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/getAttr.md b/docs/ko/reference/Repository/Methods/getAttr.md new file mode 100644 index 0000000..8d83889 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/getAttr.md @@ -0,0 +1,67 @@ +# getAttr + +경로에 대한 git 속성 값을 가져와요. + +## 시그니처 + +```ts +class Repository { + getAttr( + path: string, + name: string, + options?: AttrOptions | null | undefined + ): boolean | string | Buffer | null; +``` + + +### 파라미터 + + + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/reflog.md b/docs/ko/reference/Repository/Methods/reflog.md new file mode 100644 index 0000000..a5306dc --- /dev/null +++ b/docs/ko/reference/Repository/Methods/reflog.md @@ -0,0 +1,41 @@ +# reflog + +이름으로 reflog를 조회해요. + +## 시그니처 + +```ts +class Repository { + reflog(name: string): Reflog; +} +``` + +### 파라미터 + + + +### 반환 값 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/reflogDelete.md b/docs/ko/reference/Repository/Methods/reflogDelete.md new file mode 100644 index 0000000..e76a676 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/reflogDelete.md @@ -0,0 +1,31 @@ +# reflogDelete + +reflog을 삭제해요. + +## 시그니처 + +```ts +class Repository { + reflogDelete(name: string): void; +} +``` + +### 파라미터 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/reflogRename.md b/docs/ko/reference/Repository/Methods/reflogRename.md new file mode 100644 index 0000000..0cbf966 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/reflogRename.md @@ -0,0 +1,36 @@ +# reflogRename + +reflog의 이름을 변경해요. + +## 시그니처 + +```ts +class Repository { + reflogRename(oldName: string, newName: string): void; +} +``` + +### 파라미터 + + + +### 에러 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submodule.md b/docs/ko/reference/Repository/Methods/submodule.md new file mode 100644 index 0000000..085747c --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submodule.md @@ -0,0 +1,49 @@ +# submodule + +체크아웃을 위해 새 git 서브모듈을 설정해요. + +이 기능은 서브모듈 내용의 fetch와 checkout까지 "git submodule add"를 수행해요. 새 서브모듈을 준비하고, `.gitmodules`에 항목을 만들고, 작업 디렉터리의 지정된 경로에 또는 `.git/modules`에 빈 초기화된 리포지토리를 만든 다음, 작업 디렉터리에서 새 리포지토리로 향하는 gitlink를 만들어요. + +"git submodule add"를 완전히 에뮬레이트하려면 이 함수를 호출한 다음, 서브모듈 리포지토리를 `open()`하고 필요에 따라 clone 단계를 수행해요. 마지막으로 `addFinalize()`를 호출해 새 서브모듈과 `.gitmodules`를 인덱스에 추가하는 작업을 마무리해 커밋할 준비를 해요. + +## 시그니처 + +```ts +class Repository { + submodule( + url: string, + path: string, + useGitlink?: boolean | null | undefined, + ): Submodule; +} +``` + +### 파라미터 + + + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submoduleSetBranch.md b/docs/ko/reference/Repository/Methods/submoduleSetBranch.md new file mode 100644 index 0000000..5510007 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submoduleSetBranch.md @@ -0,0 +1,28 @@ +# submoduleSetBranch + +구성에서 하위 모듈의 브랜치를 설정해요 + +이것을 호출한 후, 체크아웃된 하위 모듈 리포지토리에 변경 사항을 기록하기 위해 `Submodule#sync()`를 호출하고 싶을 수 있어요. + +## 시그니처 + +```ts +class Repository { + submoduleSetBranch(name: string, branchName: string): void; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submoduleSetIgnore.md b/docs/ko/reference/Repository/Methods/submoduleSetIgnore.md new file mode 100644 index 0000000..51b9c62 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submoduleSetIgnore.md @@ -0,0 +1,29 @@ +# submoduleSetIgnore + +구성에서 서브모듈에 대한 무시 규칙을 설정해요. + +이 작업은 현재 로드된 어떤 인스턴스에도 영향을 주지 않아요. + +## 시그니처 + +```ts +class Repository { + submoduleSetIgnore(name: string, ignore: SubmoduleIgnore): void; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submoduleSetUpdate.md b/docs/ko/reference/Repository/Methods/submoduleSetUpdate.md new file mode 100644 index 0000000..537f5d0 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submoduleSetUpdate.md @@ -0,0 +1,29 @@ +# submoduleSetUpdate + +구성에서 서브모듈의 업데이트 규칙을 설정해요 + +이 설정은 기존 인스턴스에는 영향을 주지 않아요. + +## 시그니처 + +```ts +class Repository { + submoduleSetUpdate(name: string, update: SubmoduleUpdate): void; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submoduleSetUrl.md b/docs/ko/reference/Repository/Methods/submoduleSetUrl.md new file mode 100644 index 0000000..a761ba3 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submoduleSetUrl.md @@ -0,0 +1,28 @@ +# submoduleSetUrl + +구성에서 하위 모듈의 URL을 설정해요. + +이것을 호출한 후에는 `Submodule#sync()`를 호출해서 변경 사항을 체크아웃된 하위 모듈 리포지토리에 기록하고 싶을 수도 있어요. + +## 시그니처 + +```ts +class Repository { + submoduleSetUrl(name: string, url: string): void; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submoduleStatus.md b/docs/ko/reference/Repository/Methods/submoduleStatus.md new file mode 100644 index 0000000..eec4b92 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submoduleStatus.md @@ -0,0 +1,52 @@ +# submoduleStatus + +서브모듈의 상태를 가져와요. + +이 함수는 서브모듈을 확인하고 상태를 판단하려고 해요. `SubmoduleStatus` 값들의 조합을 반환해요. + +## 시그니처 + +```ts +class Repository { + submoduleStatus(name: string, ignore: SubmoduleIgnore): number; +} +``` + +### 파라미터 + + + +### 반환 값 + + + +## 예제 + +```ts +import { openRepository, submoduleStatusContains, SubmoduleStatus } from 'es-git'; + +const repo = await openRepository('...'); +const status = repo.submoduleStatus('mysubmodule', 'None'); + +console.log( + submoduleStatusContains(status, SubmoduleStatus.InHead | SubmoduleStatus.InIndex) +); // true +``` \ No newline at end of file diff --git a/docs/ko/reference/Repository/Methods/submodules.md b/docs/ko/reference/Repository/Methods/submodules.md new file mode 100644 index 0000000..f239f78 --- /dev/null +++ b/docs/ko/reference/Repository/Methods/submodules.md @@ -0,0 +1,21 @@ +# submodules + +이 리포지토리의 모든 서브모듈을 로드하고 반환해요. + +## 시그니처 + +```ts +class Submodule { + submodules(): Submodule[]; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/addFinalize.md b/docs/ko/reference/Submodule/Methods/addFinalize.md new file mode 100644 index 0000000..ce3a31c --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/addFinalize.md @@ -0,0 +1,13 @@ +# addFinalize + +새 git 서브모듈의 설정을 해결해요. + +이 메서드는 add setup을 호출하고 서브모듈의 클론을 완료한 다음, 해당 서브모듈에서 호출해야 해요. 이 메서드는 `.gitmodules` 파일과 새로 클론된 서브모듈을 인덱스에 추가해서 커밋할 준비가 되도록 해요(하지만 실제로 커밋을 수행하지는 않아요). + +## 시그니처 + +```ts +class Submodule { + addFinalize(): void; +} +``` \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/addToIndex.md b/docs/ko/reference/Submodule/Methods/addToIndex.md new file mode 100644 index 0000000..2735c61 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/addToIndex.md @@ -0,0 +1,21 @@ +# addToIndex + +현재 서브모듈 HEAD 커밋을 상위 프로젝트의 인덱스에 추가해요. + +## 시그니처 + +```ts +class Submodule { + addToIndex(writeIndex?: boolean | null | undefined): void; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/clone.md b/docs/ko/reference/Submodule/Methods/clone.md new file mode 100644 index 0000000..31e4d9a --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/clone.md @@ -0,0 +1,237 @@ +# clone + +새로 생성된 서브모듈에 대해 클론 단계를 수행해요. + +이 작업은 새로 생성된 서브모듈을 설정하기 위해 필요한 `git clone`을 수행해요. + +## 시그니처 + +```ts +class Submodule { + clone( + options?: SubmoduleUpdateOptions | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### 파라미터 + + + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/headId.md b/docs/ko/reference/Submodule/Methods/headId.md new file mode 100644 index 0000000..7ffb318 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/headId.md @@ -0,0 +1,21 @@ +# headId + +현재 `HEAD` 트리에서 서브모듈의 OID를 가져와요. + +## 시그니처 + +```ts +class Submodule { + headId(): string | null; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/ignoreRule.md b/docs/ko/reference/Submodule/Methods/ignoreRule.md new file mode 100644 index 0000000..fff0558 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/ignoreRule.md @@ -0,0 +1,22 @@ +# ignoreRule + +서브모듈에 사용될 ignore 규칙을 가져와요. + +## 시그니처 + +```ts +class Submodule { + ignoreRule(): SubmoduleIgnore; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/indexId.md b/docs/ko/reference/Submodule/Methods/indexId.md new file mode 100644 index 0000000..5dc9995 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/indexId.md @@ -0,0 +1,21 @@ +# indexId + +인덱스에서 서브모듈의 OID를 가져와요. + +## 시그니처 + +```ts +class Submodule { + indexId(): string | null; +} +``` + +### 반환 값 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/init.md b/docs/ko/reference/Submodule/Methods/init.md new file mode 100644 index 0000000..8f8dff4 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/init.md @@ -0,0 +1,33 @@ +# init + +서브모듈 정보를 ".git/config" 파일로 복사해요. + +"git submodule init"과 마찬가지로, 서브모듈에 대한 정보를 ".git/config"에 복사해요. 위의 접근자 함수를 사용해서 메모리 내 git_submodule 개체를 변경하고, .gitmodules에 있는 내용을 덮어쓰면서 config에 무엇이 기록될지 제어할 수 있어요. + +기본적으로 기존 항목은 덮어쓰지 않지만, `overwrite`에 `true`를 전달하면 강제로 업데이트돼요. + +## 시그니처 + +```ts +class Submodule { + init( + overwrite?: boolean | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### 파라미터 + + \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/name.md b/docs/ko/reference/Submodule/Methods/name.md new file mode 100644 index 0000000..32585a5 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/name.md @@ -0,0 +1,11 @@ +# name + +하위 모듈의 이름을 가져와요. + +## 시그니처 + +```ts +class Submodule { + name(): string; +} +``` \ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/open.md b/docs/ko/reference/Submodule/Methods/open.md new file mode 100644 index 0000000..9014b22 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/open.md @@ -0,0 +1,33 @@ +# open + +하위 모듈의 리포지토리를 열어요. + +이 기능은 하위 모듈이 작업 디렉터리에 체크아웃되어 있는 경우에만 동작해요. + +## 시그니처 + +```ts +class Submodule { + open(signal?: AbortSignal | null | undefined): Promise; +} +``` + +### 파라미터 + +
    +
  • + signalnull | AbortSignal +
    +

    작업을 취소하기 위한 선택적 AbortSignal

    +
  • +
+ +### 반환 값 + +
    +
  • + Promise<Repository> +
    +

    리포지토리

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/path.md b/docs/ko/reference/Submodule/Methods/path.md new file mode 100644 index 0000000..ce55419 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/path.md @@ -0,0 +1,21 @@ +# path + +서브모듈의 경로를 가져와요. + +## 시그니처 + +```ts +class Submodule { + path(): string; +} +``` + +### 반환 값 + +
    +
  • + string +
    +

    서브모듈의 경로

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/reload.md b/docs/ko/reference/Submodule/Methods/reload.md new file mode 100644 index 0000000..5891245 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/reload.md @@ -0,0 +1,31 @@ +# reload + +config, index, `HEAD`에서 서브모듈 정보를 다시 읽어요. + +이 서브모듈의 캐시된 서브모듈 정보가 변경되었을 가능성이 있다고 생각된다면, 이를 다시 읽기 위해 호출하세요. + +## 시그니처 + +```ts +class Submodule { + reload( + force?: boolean | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### 파라미터 + +
    +
  • + forcenull | boolean +
    +

    이 값이 true이면, 오래된 것처럼 보이지 않더라도 데이터를 다시 로드해요

    +
  • +
  • + signalnull | AbortSignal +
    +

    작업을 취소하기 위한 선택적 AbortSignal

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/repoInit.md b/docs/ko/reference/Submodule/Methods/repoInit.md new file mode 100644 index 0000000..04d570e --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/repoInit.md @@ -0,0 +1,41 @@ +# repoInit + +클론을 준비하기 위해 서브모듈의 서브리포지토리를 설정해요. + +이 함수는 원격에서 클론하기 전에, 서브모듈로부터 서브모듈 리포지토리를 초기화하고 설정하는 데 호출할 수 있어요. + +## 시그니처 + +```ts +class Submodule { + repoInit( + useGitlink?: boolean | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### 파라미터 + +
    +
  • + useGitlinknull | boolean +
    +

    workdir에 리포지토리를 직접 두는 대신, .git/modules에 있는 리포지토리를 가리키는 gitlink를 workdir에 포함해야 하는지 여부

    +
  • +
  • + signalnull | AbortSignal +
    +

    작업을 취소하기 위한 선택적 AbortSignal

    +
  • +
+ +### 반환 값 + +
    +
  • + Promise<Repository> +
    +

    리포지토리

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/sync.md b/docs/ko/reference/Submodule/Methods/sync.md new file mode 100644 index 0000000..f6c551e --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/sync.md @@ -0,0 +1,23 @@ +# sync + +서브모듈 원격 정보를 서브모듈 리포지토리에 복사해요. + +이 작업은 서브모듈 URL에 대한 정보를 체크아웃된 서브모듈 설정으로 복사하며, "git submodule sync"처럼 동작해요. 이 기능은 서브모듈의 URL을 변경했거나(또는 업스트림 변경 사항을 가져오는 과정에서 변경되었을 수도 있어요) 로컬 리포지토리를 업데이트해야 할 때 유용해요. + +## 시그니처 + +```ts +class Submodule { + sync(signal?: AbortSignal | null | undefined): Promise; +} +``` + +### 파라미터 + +
    +
  • + signalnull | AbortSignal +
    +

    작업을 취소하기 위한 선택적 AbortSignal

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/update.md b/docs/ko/reference/Submodule/Methods/update.md new file mode 100644 index 0000000..9a61e1b --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/update.md @@ -0,0 +1,233 @@ +# update + +서브모듈을 업데이트해요. + +이 작업은 누락된 서브모듈을 클론하고, 포함하고 있는 리포지토리의 인덱스에 지정된 커밋으로 서브리포지토리를 체크아웃해요. 서브모듈 리포지토리에 대상 커밋이 포함되어 있지 않으면, options에 제공된 fetch 옵션을 사용해 서브모듈을 fetch해요. + +## 시그니처 + +```ts +class Submodule { + update( + init?: boolean | null | undefined, + options?: SubmoduleUpdateOptions | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### 파라미터 + +
    +
  • + initnull | boolean +
    +

    서브모듈이 아직 초기화되지 않았으면 먼저 초기화해야 하는지 여부

    +
  • +
  • + optionsnull | SubmoduleUpdateOptions +
    +

    업데이트를 위한 구성 옵션

    +
      +
    • + allowFetchboolean +
      +

      대상 커밋을 찾지 못했을 때 서브모듈의 기본 원격에서 fetch하는 것을 허용할지 여부. 기본값: true.

      +
    • +
    • + checkoutCheckoutOptions +
      +

      이 옵션들은 checkout 단계에 전달되는 옵션

      +
        +
      • + allowConflictsboolean +
        +

        안전 모드에서 충돌이 있더라도 checkout을 취소하는 대신 안전한 파일 업데이트를 적용할지 여부. 기본값은 false예요.

        +
      • +
      • + ancestorLabelstring +
        +

        충돌에서 공통 조상(ancestor) 측의 이름

        +
      • +
      • + conflictStyleDiff3boolean +
        +

        충돌에 대해 diff3 형식 파일에 공통 조상 데이터를 포함할지 여부. 기본값은 false예요.

        +
      • +
      • + conflictStyleMergeboolean +
        +

        충돌에 대해 일반 merge 파일을 작성할지 여부. 기본값은 false예요.

        +
      • +
      • + dirPermnumber +
        +

        새 디렉터리를 생성할 때 사용할 모드 설정. 기본값은 0755예요.

        +
      • +
      • + disableFiltersboolean +
        +

        CRLF 변환 같은 필터를 적용할지 여부

        +
      • +
      • + disablePathspecMatchboolean +
        +

        path에 지정된 경로를 pathspec이 아니라 정확한 파일 경로로 처리할지 여부

        +
      • +
      • + dryRunboolean +
        +

        충돌을 확인하되 실제 변경은 하지 않는 드라이 런으로 checkout을 수행할지 여부

        +
      • +
      • + filePermnumber +
        +

        새 파일을 생성할 때 사용할 모드 설정. 기본값은 blob에 따라 0644 또는 0755예요.

        +
      • +
      • + forceboolean +
        +

        수정된 파일을 버릴 수도 있도록 작업 디렉터리를 대상과 일치시키기 위해 필요한 모든 작업을 수행할지 여부

        +
      • +
      • + ourLabelstring +
        +

        충돌에서 공통 우리(ours) 측의 이름

        +
      • +
      • + overwriteIgnoredboolean +
        +

        checkout 중에 무시된 파일을 덮어쓸지 여부. 기본값은 true예요.

        +
      • +
      • + pathstring +
        +

        체크아웃할 경로 추가. disablePathspecMatch가 설정되지 않으면 경로는 <a href="https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-aiddefpathspecapathspec">pathspec</a> 패턴이에요. 경로를 지정하지 않으면 모든 파일을 체크아웃해요. 그렇지 않으면 지정된 경로들만 체크아웃해요.

        +
      • +
      • + recreateMissingboolean +
        +

        안전 모드에서 존재하지 않는 파일을 생성할지 여부. 기본값은 false예요.

        +
      • +
      • + refreshboolean +
        +

        작업을 수행하기 전에 디스크에서 인덱스와 git 속성을 새로 고칠지 여부. 기본값은 true예요.

        +
      • +
      • + removeIgnoredboolean +
        +

        작업 디렉터리에서 무시된 파일을 제거할지 여부. 기본값은 false예요.

        +
      • +
      • + removeUntrackedboolean +
        +

        작업 디렉터리에서 추적되지 않는 파일을 제거할지 여부. 기본값은 false예요.

        +
      • +
      • + safeboolean +
        +

        새 파일 생성은 허용하되 기존 파일이나 변경 사항은 덮어쓰지 않는 안전한 방식으로 checkout을 수행할지 여부. 이것이 기본값이에요.

        +
      • +
      • + skipUnmergedboolean +
        +

        인덱스 항목이 병합되지 않은 파일을 건너뛸지 여부. 기본값은 false예요.

        +
      • +
      • + targetDirstring +
        +

        체크아웃할 디렉터리 설정

        +
      • +
      • + theirLabelstring +
        +

        충돌에서 공통 그들(theirs) 측의 이름

        +
      • +
      • + updateIndexboolean +
        +

        checkout이 업데이트된 파일 정보을 인덱스에 기록하지 못하게 할지 여부. 기본값은 true예요.

        +
      • +
      • + updateOnlyboolean +
        +

        이미 존재하는 파일의 내용만 업데이트할지 여부. 설정하면 파일이 생성되거나 삭제되지 않아요. 기본값은 false예요.

        +
      • +
      • + useOursboolean +
        +

        충돌 시 파일의 stage 2 버전("ours")을 사용해 checkout을 진행할지 여부. 기본값은 false예요.

        +
      • +
      • + useTheirsboolean +
        +

        충돌 시 파일의 stage 3 버전("theirs")을 사용해 checkout을 진행할지 여부. 기본값은 false예요.

        +
      • +
      +
    • +
    • + fetchFetchOptions +
      +

      콜백을 포함해 fetch를 제어하는 옵션

      +
        +
      • + credentialCredential +
        +

        libgit2에서 git 자격 증명을 나타내는 인터페이스

        +
      • +
      • + customHeadersstring[] +
        +

        이 fetch 작업에 대한 추가 헤더 설정

        +
      • +
      • + depthnumber +
        +

        fetch 깊이 설정. 0 이하의 값은 모든 것을 가져오라는 의미로 해석돼요(사실상 깊이 제한을 선언하지 않는 것과 동일해요).

        +
      • +
      • + downloadTagsAutotagOption +
        +

        원격의 태그에 대해 어떻게 동작할지 설정해요. 예를 들어 다운로드 중인 개체에 대한 태그를 자동으로 다운로드할지, 또는 전부 다운로드할지 등을 정해요. 기본값은 태그를 자동으로 따라가는 거예요.

        +

        - Unspecified : 원격 구성의 설정을 사용
        - Auto : 이미 다운로드 중인 개체를 가리키는 태그를 서버에 요청
        - None : refspecs를 넘는 어떤 태그도 요청하지 않음
        - All : 모든 태그를 요청

        +
      • +
      • + followRedirectsRemoteRedirect +
        +

        원격 리다이렉션 설정. 다른 호스트로의 리다이렉트를 허용할지 여부예요. 기본적으로 git은 초기 요청(/info/refs)에서는 리다이렉트를 따르지만, 이후 요청에서는 따르지 않아요.

        +

        - None : fetch 또는 push의 어떤 단계에서도 사이트 외부 리다이렉트를 따르지 않음
        - Initial : 초기 요청에서만 사이트 외부 리다이렉트를 허용. 이것이 기본값이에요.
        - All : fetch 또는 push의 어떤 단계에서도 리다이렉트를 허용

        +
      • +
      • + proxyProxyOptions +
        +

        fetch 작업에 사용할 프록시 옵션 설정

        +
          +
        • + autoboolean +
          +

          git 구성에서 프록시를 자동 감지해 보세요. 이 설정은 이전에 지정한 url을 덮어써요.

          +
        • +
        • + urlstring +
          +

          사용할 프록시의 정확한 URL을 지정해요. 이 설정은 이전에 지정한 auto를 덮어써요.

          +
        • +
        +
      • +
      • + pruneFetchPrune +
        +

        fetch 후 prune을 수행할지 여부 설정

        +

        - Unspecified : 구성의 설정을 사용.
        - On : prune을 강제로 켬.
        - Off : prune을 강제로 끔

        +
      • +
      +
    • +
    +
  • +
  • + signalnull | AbortSignal +
    +

    작업을 취소하기 위한 선택적 AbortSignal

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/updateStrategy.md b/docs/ko/reference/Submodule/Methods/updateStrategy.md new file mode 100644 index 0000000..3f26b96 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/updateStrategy.md @@ -0,0 +1,22 @@ +# updateStrategy + +서브모듈에 사용될 업데이트 규칙을 가져와요. + +## 시그니처 + +```ts +class Submodule { + updateStrategy(): SubmoduleUpdate; +} +``` + +### 반환 값 + +
    +
  • + SubmoduleUpdate +
    +

    서브모듈에 사용될 업데이트 규칙

    +

    서브모듈 업데이트 값

    이 값들은 submodule.$name.update 구성 값에 대한 설정을 나타내며, 이 구성 값은 이 서브모듈에 대해 git submodule update를 어떻게 처리할지 말해요. 값은 보통 ".gitmodules" 파일에 설정되고, 서브모듈이 초기화될 때 ".git/config"로 복사돼요.

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/url.md b/docs/ko/reference/Submodule/Methods/url.md new file mode 100644 index 0000000..032746f --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/url.md @@ -0,0 +1,21 @@ +# url + +서브모듈의 URL을 가져와요. + +## 시그니처 + +```ts +class Submodule { + url(): string | null; +} +``` + +### 반환 값 + +
    +
  • + null | string +
    +

    서브모듈의 URL. URL이 없으면 null을 반환해요.

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/Methods/workdirId.md b/docs/ko/reference/Submodule/Methods/workdirId.md new file mode 100644 index 0000000..a8167e3 --- /dev/null +++ b/docs/ko/reference/Submodule/Methods/workdirId.md @@ -0,0 +1,23 @@ +# workdirId + +현재 작업 디렉터리의 서브모듈에 대한 OID를 가져와요. + +이 메서드는 체크아웃된 서브모듈에서 `HEAD`를 조회하는 것에 해당하는 OID를 반환해요. 인덱스에 보류 중인 변경 사항이 있거나 다른 어떤 것이 있더라도, 이 메서드는 그런 상태를 알아차리지 못해요. + +## 시그니처 + +```ts +class Submodule { + workdirId(): string | null; +} +``` + +### 반환 값 + +
    +
  • + null | string +
    +

    현재 작업 디렉터리의 서브모듈에 대한 OID

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Submodule/submoduleStatusContains.md b/docs/ko/reference/Submodule/submoduleStatusContains.md new file mode 100644 index 0000000..2e38b88 --- /dev/null +++ b/docs/ko/reference/Submodule/submoduleStatusContains.md @@ -0,0 +1,34 @@ +# submoduleStatusContains + +서브모듈 상태에 지정된 값이 포함되어 있는지 확인해요. + +## 시그니처 + +```ts +function submoduleStatusContains(source: number, target: number): boolean; +``` + +### 파라미터 + +
    +
  • + source필수 · number +
    +

    소스 상태

    +
  • +
  • + target필수 · number +
    +

    대상 상태

    +
  • +
+ +### 반환 값 + +
    +
  • + boolean +
    +

    source 상태에 target 상태가 포함되어 있으면 true를 반환

    +
  • +
\ No newline at end of file diff --git a/docs/ko/reference/Tracing/traceClear.md b/docs/ko/reference/Tracing/traceClear.md new file mode 100644 index 0000000..c6bb40f --- /dev/null +++ b/docs/ko/reference/Tracing/traceClear.md @@ -0,0 +1,9 @@ +# traceClear + +전역 구독자를 지워요 + +## 시그니처 + +```ts +function traceClear(): void; +``` \ No newline at end of file diff --git a/docs/ko/reference/Tracing/traceSet.md b/docs/ko/reference/Tracing/traceSet.md new file mode 100644 index 0000000..45823a6 --- /dev/null +++ b/docs/ko/reference/Tracing/traceSet.md @@ -0,0 +1,28 @@ +# traceSet + +libgit2에서 추적 메시지를 생성할 때 호출되는 전역 구독자를 설정해요. + +## 시그니처 + +```ts +function traceSet( + level: TraceLevel, + callback: (level: TraceLevel, message: string) => void, +): void; +``` + +### 파라미터 + +
    +
  • + level필수 · TraceLevel +
    +

    추적을 설정할 레벨

    +

    사용 가능한 추적 레벨. 추적을 특정 레벨로 설정하면 호출자는 해당 레벨과 그보다 낮은 모든 레벨에서의 추적을 제공받아요.

    +
  • +
  • + callback필수 · (level: TraceLevel, message: string) => void +
    +

    추적 데이터와 함께 호출할 콜백

    +
  • +
\ No newline at end of file diff --git a/docs/package.json b/docs/package.json index 6d3d6ae..7a69640 100644 --- a/docs/package.json +++ b/docs/package.json @@ -14,7 +14,7 @@ "es-toolkit": "^1.32.0", "fast-glob": "^3.3.3", "micromatch": "^4.0.8", - "openai": "^4.95.1", + "openai": "^6.15.0", "typanion": "^3.14.0", "typedoc": "0.28.0", "vitepress": "^1.6.3", diff --git a/docs/reference/Reflog/Methods/append.md b/docs/reference/Reflog/Methods/append.md new file mode 100644 index 0000000..fa17022 --- /dev/null +++ b/docs/reference/Reflog/Methods/append.md @@ -0,0 +1,58 @@ +# append + +Append a new entry to the reflog. + +## Signature + +```ts +class Reflog { + append(newOid: string, committer: Signature, msg?: string | null | undefined): void; +} +``` + +### Parameters + +
    +
  • + newOidrequired · string +
    +

    New object ID (SHA1) for this reflog entry.

    +
  • +
  • + committerrequired · Signature +
    +

    Committer signature for this reflog entry.

    +
      +
    • + emailrequired · string +
      +

      Email on the signature.

      +
    • +
    • + namerequired · string +
      +

      Name on the signature.

      +
    • +
    • + timestamprequired · number +
      +

      Time in seconds, from epoch

      +
    • +
    +
  • +
  • + msgnull | string +
    +

    Optional message for this reflog entry.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if the OID is invalid or if appending fails.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Reflog/Methods/get.md b/docs/reference/Reflog/Methods/get.md new file mode 100644 index 0000000..428856c --- /dev/null +++ b/docs/reference/Reflog/Methods/get.md @@ -0,0 +1,31 @@ +# get + +Get a reflog entry by index. + +## Signature + +```ts +class Reflog { + get(i: number): ReflogEntry | null; +} +``` + +### Parameters + +
    +
  • + irequired · number +
    +

    Index of the entry to get.

    +
  • +
+ +### Returns + +
    +
  • + null | ReflogEntry +
    +

    Reflog entry at the given index. Returns null if the index is out of bounds.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Reflog/Methods/isEmpty.md b/docs/reference/Reflog/Methods/isEmpty.md new file mode 100644 index 0000000..974f27c --- /dev/null +++ b/docs/reference/Reflog/Methods/isEmpty.md @@ -0,0 +1,21 @@ +# isEmpty + +Check if the reflog is empty. + +## Signature + +```ts +class Reflog { + isEmpty(): boolean; +} +``` + +### Returns + +
    +
  • + boolean +
    +

    true if the reflog is empty, false otherwise.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Reflog/Methods/iter.md b/docs/reference/Reflog/Methods/iter.md new file mode 100644 index 0000000..9643ebc --- /dev/null +++ b/docs/reference/Reflog/Methods/iter.md @@ -0,0 +1,31 @@ +# iter + +Create an iterator over the entries in the reflog. + +## Signature + +```ts +class Reflog { + iter(): ReflogIter; +} +``` + +### Returns + +
    +
  • + ReflogIter +
    +

    Iterator over the reflog entries.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if the reflog cannot be accessed.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Reflog/Methods/len.md b/docs/reference/Reflog/Methods/len.md new file mode 100644 index 0000000..b376b14 --- /dev/null +++ b/docs/reference/Reflog/Methods/len.md @@ -0,0 +1,21 @@ +# len + +Get the number of entries in the reflog. + +## Signature + +```ts +class Reflog { + len(): number; +} +``` + +### Returns + +
    +
  • + number +
    +

    Number of entries in the reflog.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Reflog/Methods/remove.md b/docs/reference/Reflog/Methods/remove.md new file mode 100644 index 0000000..89fd055 --- /dev/null +++ b/docs/reference/Reflog/Methods/remove.md @@ -0,0 +1,36 @@ +# remove + +Remove an entry from the reflog. + +## Signature + +```ts +class Reflog { + remove(i: number, rewritePreviousEntry?: boolean): void; +} +``` + +### Parameters + +
    +
  • + irequired · number +
    +

    Index of the entry to remove.

    +
  • +
  • + rewritePreviousEntrynull | boolean +
    +

    Whether to rewrite the previous entry. Defaults to false.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if the index is invalid or if removal fails.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Reflog/Methods/write.md b/docs/reference/Reflog/Methods/write.md new file mode 100644 index 0000000..f4dd19f --- /dev/null +++ b/docs/reference/Reflog/Methods/write.md @@ -0,0 +1,21 @@ +# write + +Write the reflog to disk. + +## Signature + +```ts +class Reflog { + write(): void; +} +``` + +### Errors + +
    +
  • + Error +
    +

    Throws error if writing fails.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/ReflogEntry/Methods/committer.md b/docs/reference/ReflogEntry/Methods/committer.md new file mode 100644 index 0000000..03b4c27 --- /dev/null +++ b/docs/reference/ReflogEntry/Methods/committer.md @@ -0,0 +1,38 @@ +# committer + +Get the committer of this reflog entry. + +## Signature + +```ts +class ReflogEntry { + committer(): Signature; +} +``` + +### Returns + +
    +
  • + Signature +
    +

    Committer signature of this reflog entry.

    +
      +
    • + emailrequired · string +
      +

      Email on the signature.

      +
    • +
    • + namerequired · string +
      +

      Name on the signature.

      +
    • +
    • + timestamprequired · number +
      +

      Time in seconds, from epoch

      +
    • +
    +
  • +
\ No newline at end of file diff --git a/docs/reference/ReflogEntry/Methods/idNew.md b/docs/reference/ReflogEntry/Methods/idNew.md new file mode 100644 index 0000000..9d5ccdc --- /dev/null +++ b/docs/reference/ReflogEntry/Methods/idNew.md @@ -0,0 +1,21 @@ +# idNew + +Get the new object ID (SHA1) of this reflog entry. + +## Signature + +```ts +class ReflogEntry { + idNew(): string; +} +``` + +### Returns + +
    +
  • + string +
    +

    New object ID (SHA1) of this reflog entry.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/ReflogEntry/Methods/idOld.md b/docs/reference/ReflogEntry/Methods/idOld.md new file mode 100644 index 0000000..3d529ac --- /dev/null +++ b/docs/reference/ReflogEntry/Methods/idOld.md @@ -0,0 +1,21 @@ +# idOld + +Get the old object ID (SHA1) of this reflog entry. + +## Signature + +```ts +class ReflogEntry { + idOld(): string; +} +``` + +### Returns + +
    +
  • + string +
    +

    Old object ID (SHA1) of this reflog entry.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/ReflogEntry/Methods/message.md b/docs/reference/ReflogEntry/Methods/message.md new file mode 100644 index 0000000..80d4c61 --- /dev/null +++ b/docs/reference/ReflogEntry/Methods/message.md @@ -0,0 +1,31 @@ +# message + +Get the message of this reflog entry. + +## Signature + +```ts +class ReflogEntry { + message(): string; +} +``` + +### Returns + +
    +
  • + null | string +
    +

    Message of this reflog entry. Returns null if no message is present.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if the message is not valid utf-8.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/apply.md b/docs/reference/Repository/Methods/apply.md new file mode 100644 index 0000000..bb395b5 --- /dev/null +++ b/docs/reference/Repository/Methods/apply.md @@ -0,0 +1,39 @@ +# apply + +Apply a Diff to the given repo, making changes directly in the working directory, the index, or both. + +## Signature + +```ts +class Repository { + apply(diff: Diff, location: ApplyLocation, options?: ApplyOptions | null | undefined): void; +} +``` + +### Parameters + +
    +
  • + diffrequired · Diff +
    +

    The diff to apply

    +
  • +
  • + locationrequired · ApplyLocation +
    +

    The location to apply

    +

    Possible application locations for git_apply
    see <https://libgit2.org/libgit2/#HEAD/type/git_apply_options>

    +
  • +
  • + optionsnull | ApplyOptions +
    +

    The options for the apply

    +
      +
    • + checkboolean +
      +

      Don't actually make changes, just test that the patch applies.

      +
    • +
    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/applyToTree.md b/docs/reference/Repository/Methods/applyToTree.md new file mode 100644 index 0000000..47ccb19 --- /dev/null +++ b/docs/reference/Repository/Methods/applyToTree.md @@ -0,0 +1,52 @@ +# applyToTree + +Apply a Diff to the provided tree, and return the resulting Index. + +## Signature + +```ts +class Repository { + applyToTree( + tree: Tree, + diff: Diff, + options?: ApplyOptions | null | undefined + ): Index; +} +``` + +### Parameters + +
    +
  • + treerequired · Tree +
    +

    The tree to apply the diff to

    +
  • +
  • + diffrequired · Diff +
    +

    The diff to apply

    +
  • +
  • + optionsnull | ApplyOptions +
    +

    The options for the apply

    +
      +
    • + checkboolean +
      +

      Don't actually make changes, just test that the patch applies.

      +
    • +
    +
  • +
+ +### Returns + +
    +
  • + Index +
    +

    The postimage of the application

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/cherrypick.md b/docs/reference/Repository/Methods/cherrypick.md new file mode 100644 index 0000000..768d1aa --- /dev/null +++ b/docs/reference/Repository/Methods/cherrypick.md @@ -0,0 +1,296 @@ +# cherrypick + +Cherrypicks the given commit onto HEAD and updates the working tree and index. +This method prepares the index and tree as if the commit were applied, but does not actually make a new commit. + +## Signature + +```ts +class Repository { + cherrypick( + commit: Commit, + options?: CherrypickOptions | undefined | null, + ): void; +} +``` + +### Parameters + +
    +
  • + commitrequired · Commit +
    +

    The commit to cherrypick.

    +
  • +
  • + optionsnull | CherrypickOptions +
    +

    Options for the cherrypick operation.

    +
      +
    • + checkoutOptionsCheckoutOptions +
      +

      Options for checkout behavior when updating working directory.

      +
        +
      • + allowConflictsboolean +
        +

        In safe mode, apply safe file updates even when there are conflicts instead of canceling the checkout. Defaults to false.

        +
      • +
      • + ancestorLabelstring +
        +

        The name of the common ancestor side of conflicts

        +
      • +
      • + conflictStyleDiff3boolean +
        +

        Indicates whether to include common ancestor data in diff3 format files for conflicts. Defaults to false.

        +
      • +
      • + conflictStyleMergeboolean +
        +

        Indicate whether a normal merge file should be written for conflicts. Defaults to false.

        +
      • +
      • + dirPermnumber +
        +

        Set the mode with which new directories are created. Default is 0755

        +
      • +
      • + disableFiltersboolean +
        +

        Indicate whether to apply filters like CRLF conversion.

        +
      • +
      • + disablePathspecMatchboolean +
        +

        Treat paths specified in path as exact file paths instead of as pathspecs.

        +
      • +
      • + dryRunboolean +
        +

        Indicate that this checkout should perform a dry run by checking for conflicts but not make any actual changes.

        +
      • +
      • + filePermnumber +
        +

        Set the mode with which new files are created. The default is 0644 or 0755 as dictated by the blob.

        +
      • +
      • + forceboolean +
        +

        Take any action necessary to get the working directory to match the target including potentially discarding modified files.

        +
      • +
      • + ourLabelstring +
        +

        The name of the common our side of conflicts

        +
      • +
      • + overwriteIgnoredboolean +
        +

        Indicate whether ignored files should be overwritten during the checkout. Defaults to true.

        +
      • +
      • + pathstring +
        +

        Add a path to be checked out. The path is a <a href="https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-aiddefpathspecapathspec">pathspec</a> pattern, unless disablePathspecMatch is set. If no paths are specified, then all files are checked out. Otherwise only these specified paths are checked out.

        +
      • +
      • + recreateMissingboolean +
        +

        In safe mode, create files that don't exist. Defaults to false.

        +
      • +
      • + refreshboolean +
        +

        Indicate whether the index and git attributes should be refreshed from disk before any operations. Defaults to true,

        +
      • +
      • + removeIgnoredboolean +
        +

        Remove ignored files from the working dir. Defaults to false.

        +
      • +
      • + removeUntrackedboolean +
        +

        Remove untracked files from the working dir. Defaults to false.

        +
      • +
      • + safeboolean +
        +

        Indicate that the checkout should be performed safely, allowing new files to be created but not overwriting existing files or changes. This is the default.

        +
      • +
      • + skipUnmergedboolean +
        +

        Skip files with unmerged index entries. Defaults to false.

        +
      • +
      • + targetDirstring +
        +

        Set the directory to check out to

        +
      • +
      • + theirLabelstring +
        +

        The name of the common their side of conflicts

        +
      • +
      • + updateIndexboolean +
        +

        Prevents checkout from writing the updated files' information to the index. Defaults to true.

        +
      • +
      • + updateOnlyboolean +
        +

        Only update the contents of files that already exist. If set, files will not be created or deleted. Defaults to false.

        +
      • +
      • + useOursboolean +
        +

        Indicate whether the checkout should proceed on conflicts by using the stage 2 version of the file ("ours"). Defaults to false.

        +
      • +
      • + useTheirsboolean +
        +

        Indicate whether the checkout should proceed on conflicts by using the stage 3 version of the file ("theirs"). Defaults to false.

        +
      • +
      +
    • +
    • + mainlinenumber +
      +

      Parent number for merge commits (1-based). When cherrypicking a merge commit, the mainline parent is the one you want to cherrypick from. The mainline is the branch from which the merge was made.

      +
    • +
    • + mergeOptionsMergeOptions +
      +

      Options for merge resolution when cherrypicking a merge commit.

      +
        +
      • + diff3Styleboolean +
        +

        Create diff3-style file

        +
      • +
      • + failOnConflictboolean +
        +

        If a conflict occurs, exit immediately instead of attempting to continue resolving conflicts

        +
      • +
      • + filFavorFileFavor +
        +

        Specify a side to favor for resolving conflicts

        +
      • +
      • + findRenamesboolean +
        +

        Detect file renames

        +
      • +
      • + ignoreWhitespaceboolean +
        +

        Ignore all whitespace

        +
      • +
      • + ignoreWhitespaceChangeboolean +
        +

        Ignore changes in amount of whitespace

        +
      • +
      • + ignoreWhitespaceEolboolean +
        +

        Ignore whitespace at end of line

        +
      • +
      • + minimalboolean +
        +

        Take extra time to find minimal diff

        +
      • +
      • + noRecursiveboolean +
        +

        If the commits being merged have multiple merge bases, do not build a recursive merge base (by merging the multiple merge bases), instead simply use the first base.

        +
      • +
      • + patienceboolean +
        +

        Use the "patience diff" algorithm

        +
      • +
      • + recursionLimitnumber +
        +

        Maximum number of times to merge common ancestors to build a virtual merge base when faced with criss-cross merges. When this limit is reached, the next ancestor will simply be used instead of attempting to merge it. The default is unlimited.

        +
      • +
      • + renameThresholdnumber +
        +

        Similarity to consider a file renamed (default 50)

        +
      • +
      • + simplifyAlnumboolean +
        +

        Condense non-alphanumeric regions for simplified diff file

        +
      • +
      • + skipReucboolean +
        +

        Do not write the REUC extension on the generated index

        +
      • +
      • + standardStyleboolean +
        +

        Create standard conflicted merge files

        +
      • +
      • + targetLimitnumber +
        +

        Maximum similarity sources to examine for renames (default 200). If the number of rename candidates (add / delete pairs) is greater than this value, inexact rename detection is aborted. This setting overrides the merge.renameLimit configuration value.

        +
      • +
      +
    • +
    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    If the commit is a merge commit and no mainline is specified.

    +
  • +
  • + Error +
    +

    If there are conflicts during the cherrypick operation.

    +
  • +
+ +## Examples + +```ts +import { openRepository } from 'es-git'; + +const repo = await openRepository('./path/to/repo'); +const cherrypickCommit = repo.getCommit('cherrypick-commit'); + +// Cherrypick the commit onto HEAD and working tree +repo.cherrypick(cherrypickCommit); +repo.cleanupState(); + +// Cherrypick the commit against our commit selecting the first parent as mainline (This is necessary because, for merge commits, there is ambiguity about which side of the merge should be treated as the baseline.) +repo.cherrypick(cherrypickCommit, { mainline: 1 }); +repo.cleanupState(); + +// Prevent working tree changes (dry run) but compute conflicts +repo.cherrypick(cherrypickCommit, { checkoutOptions: { dryRun: true } }); +repo.cleanupState(); + +// Cherrypick the commit against our commit selecting the first parent as mainline and prevent working tree changes (dry run) but compute conflicts +repo.cherrypick(cherrypickCommit, { mainline: 1, checkoutOptions: { dryRun: true } }); +repo.cleanupState(); +``` \ No newline at end of file diff --git a/docs/reference/Repository/Methods/cherrypickCommit.md b/docs/reference/Repository/Methods/cherrypickCommit.md new file mode 100644 index 0000000..3a2247e --- /dev/null +++ b/docs/reference/Repository/Methods/cherrypickCommit.md @@ -0,0 +1,171 @@ +# cherrypickCommit + +Applies a cherrypick of `cherrypick_commit` against `our_commit` and returns the resulting Index, +without modifying the working directory or repository state. +This method does not write any changes to disk or update HEAD. +it is useful for computing what the cherrypick result would look like without actually applying it. + +## Signature + +```ts +class Repository { + cherrypickCommit( + cherrypickCommit: Commit, + ourCommit: Commit, + mainline: number, + mergeOptions?: MergeOptions | undefined | null, + ): Index; +} +``` + +### Parameters + +
    +
  • + cherrypickCommitrequired · Commit +
    +

    The commit to cherrypick.

    +
  • +
  • + ourCommitrequired · Commit +
    +

    The commit to cherrypick against (usually HEAD).

    +
  • +
  • + mainlinerequired · number +
    +

    The parent of the cherrypick commit, if it is a merge (1-based).

    +
  • +
  • + mergeOptionsnull | MergeOptions +
    +

    Options for merge conflict resolution.

    +
      +
    • + diff3Styleboolean +
      +

      Create diff3-style file

      +
    • +
    • + failOnConflictboolean +
      +

      If a conflict occurs, exit immediately instead of attempting to continue resolving conflicts

      +
    • +
    • + filFavorFileFavor +
      +

      Specify a side to favor for resolving conflicts

      +
    • +
    • + findRenamesboolean +
      +

      Detect file renames

      +
    • +
    • + ignoreWhitespaceboolean +
      +

      Ignore all whitespace

      +
    • +
    • + ignoreWhitespaceChangeboolean +
      +

      Ignore changes in amount of whitespace

      +
    • +
    • + ignoreWhitespaceEolboolean +
      +

      Ignore whitespace at end of line

      +
    • +
    • + minimalboolean +
      +

      Take extra time to find minimal diff

      +
    • +
    • + noRecursiveboolean +
      +

      If the commits being merged have multiple merge bases, do not build a recursive merge base (by merging the multiple merge bases), instead simply use the first base.

      +
    • +
    • + patienceboolean +
      +

      Use the "patience diff" algorithm

      +
    • +
    • + recursionLimitnumber +
      +

      Maximum number of times to merge common ancestors to build a virtual merge base when faced with criss-cross merges. When this limit is reached, the next ancestor will simply be used instead of attempting to merge it. The default is unlimited.

      +
    • +
    • + renameThresholdnumber +
      +

      Similarity to consider a file renamed (default 50)

      +
    • +
    • + simplifyAlnumboolean +
      +

      Condense non-alphanumeric regions for simplified diff file

      +
    • +
    • + skipReucboolean +
      +

      Do not write the REUC extension on the generated index

      +
    • +
    • + standardStyleboolean +
      +

      Create standard conflicted merge files

      +
    • +
    • + targetLimitnumber +
      +

      Maximum similarity sources to examine for renames (default 200). If the number of rename candidates (add / delete pairs) is greater than this value, inexact rename detection is aborted. This setting overrides the merge.renameLimit configuration value.

      +
    • +
    +
  • +
+ +### Returns + +
    +
  • + Index +
    +

    The index result.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    If the cherrypick commit is a merge and mainline is 0.

    +
  • +
  • + Error +
    +

    If there are conflicts and failOnConflict is true (default).

    +
  • +
+ +## Examples + +```ts +// This is an example for cherrypick_commit +import { openRepository } from "es-git"; + +const repo = await openRepository("./path/to/repo"); +const cherry = repo.getCommit("cherrypick-commit"); +const target = repo.getCommit("onto-commit"); + +// Returns the Index resulting from the cherrypick in memory, +// without affecting HEAD or the working tree. +// The mainline parameter indicates which parent to use as the baseline, +// For merge commits, mainline specifies which parent to use as baseline (1 or 2). +// For normal (non-merge) commits, use mainline 0. +const idx = repo.cherrypickCommit(cherry, target, 0); + +// You can check for conflicts with idx.hasConflicts() +``` \ No newline at end of file diff --git a/docs/reference/Repository/Methods/getAttr.md b/docs/reference/Repository/Methods/getAttr.md new file mode 100644 index 0000000..0787c4d --- /dev/null +++ b/docs/reference/Repository/Methods/getAttr.md @@ -0,0 +1,66 @@ +# getAttr + +Get the value of a git attribute for a path. + +## Signature + +```ts +class Repository { + getAttr( + path: string, + name: string, + options?: AttrOptions | null | undefined + ): boolean | string | Buffer | null; +``` + +### Parameters + +
    +
  • + pathrequired · string +
    +

    The path to check for attributes. Relative paths are interpreted relative to the repo root.

    +
  • +
  • + namerequired · string +
    +

    The name of the attribute to look up.

    +
  • +
  • + optionsnull | AttrOptions +
    +

    Options for attribute lookup.

    +
      +
    • + checkFileThenIndexboolean +
      +

      Check the working directory, then the index.

      +
    • +
    • + checkIndexOnlyboolean +
      +

      Check the index only.

      +
    • +
    • + checkIndexThenFileboolean +
      +

      Check the index, then the working directory.

      +
    • +
    • + checkNoSystemboolean +
      +

      Do not use the system gitattributes file.

      +
    • +
    +
  • +
+ +### Returns + +
    +
  • + null | string | boolean | Buffer<ArrayBufferLike> +
    +

    Output of the value of the attribute.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/reflog.md b/docs/reference/Repository/Methods/reflog.md new file mode 100644 index 0000000..20366f2 --- /dev/null +++ b/docs/reference/Repository/Methods/reflog.md @@ -0,0 +1,41 @@ +# reflog + +Lookup a reflog by its name. + +## Signature + +```ts +class Repository { + reflog(name: string): Reflog; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    Name of the reference whose reflog to lookup (e.g., "HEAD", "refs/heads/main").

    +
  • +
+ +### Returns + +
    +
  • + Reflog +
    +

    Reflog instance for the given reference name.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if the reflog does not exist or cannot be opened.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/reflogDelete.md b/docs/reference/Repository/Methods/reflogDelete.md new file mode 100644 index 0000000..b99f9a3 --- /dev/null +++ b/docs/reference/Repository/Methods/reflogDelete.md @@ -0,0 +1,31 @@ +# reflogDelete + +Delete a reflog. + +## Signature + +```ts +class Repository { + reflogDelete(name: string): void; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    Name of the reference whose reflog to delete.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if deletion fails.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/reflogRename.md b/docs/reference/Repository/Methods/reflogRename.md new file mode 100644 index 0000000..41965fa --- /dev/null +++ b/docs/reference/Repository/Methods/reflogRename.md @@ -0,0 +1,36 @@ +# reflogRename + +Rename a reflog. + +## Signature + +```ts +class Repository { + reflogRename(oldName: string, newName: string): void; +} +``` + +### Parameters + +
    +
  • + oldNamerequired · string +
    +

    Old name of the reference.

    +
  • +
  • + newNamerequired · string +
    +

    New name of the reference.

    +
  • +
+ +### Errors + +
    +
  • + Error +
    +

    Throws error if renaming fails.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/submodule.md b/docs/reference/Repository/Methods/submodule.md new file mode 100644 index 0000000..0d08a47 --- /dev/null +++ b/docs/reference/Repository/Methods/submodule.md @@ -0,0 +1,56 @@ +# submodule + +Set up a new git submodule for checkout. + +This does "git submodule add" up to the fetch and checkout of the +submodule contents. It preps a new submodule, creates an entry in +`.gitmodules` and creates an empty initialized repository either at the +given path in the working directory or in `.git/modules` with a gitlink +from the working directory to the new repo. + +To fully emulate "git submodule add" call this function, then `open()` +the submodule repo and perform the clone step as needed. Lastly, call +`addFinalize()` to wrap up adding the new submodule and `.gitmodules` +to the index to be ready to commit. + +## Signature + +```ts +class Repository { + submodule( + url: string, + path: string, + useGitlink?: boolean | null | undefined, + ): Submodule; +} +``` + +### Parameters + +
    +
  • + urlrequired · string +
    +

    URL for the submodule's remote.

    +
  • +
  • + pathrequired · string +
    +

    Path at which the submodule should be created.

    +
  • +
  • + useGitlinknull | boolean +
    +

    Should workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir.

    +
  • +
+ +### Returns + +
    +
  • + Submodule +
    +

    The submodule.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/submoduleSetBranch.md b/docs/reference/Repository/Methods/submoduleSetBranch.md new file mode 100644 index 0000000..d41655b --- /dev/null +++ b/docs/reference/Repository/Methods/submoduleSetBranch.md @@ -0,0 +1,29 @@ +# submoduleSetBranch + +Set the branch for the submodule in the configuration + +After calling this, you may wish to call `Submodule#sync()` to write +the changes to the checked out submodule repository. + +## Signature + +```ts +class Repository { + submoduleSetBranch(name: string, branchName: string): void; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    The name of the submodule to configure.

    +
  • +
  • + branchNamerequired · string +
    +

    Branch that should be used for the submodule

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/submoduleSetIgnore.md b/docs/reference/Repository/Methods/submoduleSetIgnore.md new file mode 100644 index 0000000..8d411fa --- /dev/null +++ b/docs/reference/Repository/Methods/submoduleSetIgnore.md @@ -0,0 +1,29 @@ +# submoduleSetIgnore + +Set the ignore rule for the submodule in the configuration + +This does not affect any currently-loaded instances. + +## Signature + +```ts +class Repository { + submoduleSetIgnore(name: string, ignore: SubmoduleIgnore): void; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    The name of the submodule.

    +
  • +
  • + ignorerequired · SubmoduleIgnore +
    +

    The new value for the ignore rule.

    +

    Submodule ignore values

    These values represent settings for the submodule.$name.ignore
    configuration value which says how deeply to look at the working
    directory when getting the submodule status.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/submoduleSetUpdate.md b/docs/reference/Repository/Methods/submoduleSetUpdate.md new file mode 100644 index 0000000..0885dc2 --- /dev/null +++ b/docs/reference/Repository/Methods/submoduleSetUpdate.md @@ -0,0 +1,29 @@ +# submoduleSetUpdate + +Set the update rule for the submodule in the configuration + +This setting won't affect any existing instances. + +## Signature + +```ts +class Repository { + submoduleSetUpdate(name: string, update: SubmoduleUpdate): void; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    The name of the submodule.

    +
  • +
  • + updaterequired · SubmoduleUpdate +
    +

    The new value to use.

    +

    Submodule update values

    These values represent settings for the submodule.$name.update
    configuration value which says how to handle git submodule update
    for this submodule. The value is usually set in the ".gitmodules"
    file and copied to ".git/config" when the submodule is initialized.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/submoduleSetUrl.md b/docs/reference/Repository/Methods/submoduleSetUrl.md new file mode 100644 index 0000000..dc59b7d --- /dev/null +++ b/docs/reference/Repository/Methods/submoduleSetUrl.md @@ -0,0 +1,29 @@ +# submoduleSetUrl + +Set the URL for the submodule in the configuration + +After calling this, you may wish to call `Submodule#sync()` to write +the changes to the checked out submodule repository. + +## Signature + +```ts +class Repository { + submoduleSetUrl(name: string, url: string): void; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    The name of the submodule to configure.

    +
  • +
  • + urlrequired · string +
    +

    URL that should be used for the submodule.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Repository/Methods/submoduleStatus.md b/docs/reference/Repository/Methods/submoduleStatus.md new file mode 100644 index 0000000..08fc0c4 --- /dev/null +++ b/docs/reference/Repository/Methods/submoduleStatus.md @@ -0,0 +1,53 @@ +# submoduleStatus + +Get the status for a submodule. + +This looks at a submodule and tries to determine the status. It +will return a combination of the `SubmoduleStatus` values. + +## Signature + +```ts +class Repository { + submoduleStatus(name: string, ignore: SubmoduleIgnore): number; +} +``` + +### Parameters + +
    +
  • + namerequired · string +
    +

    The name of the submodule.

    +
  • +
  • + ignorerequired · SubmoduleIgnore +
    +

    The ignore rules to follow.

    +

    Submodule ignore values

    These values represent settings for the submodule.$name.ignore
    configuration value which says how deeply to look at the working
    directory when getting the submodule status.

    +
  • +
+ +### Returns + +
    +
  • + number +
    +

    The combination of the SubmoduleStatus values.

    +
  • +
+ +## Examples + +```ts +import { openRepository, submoduleStatusContains, SubmoduleStatus } from 'es-git'; + +const repo = await openRepository('...'); +const status = repo.submoduleStatus('mysubmodule', 'None'); + +console.log( + submoduleStatusContains(status, SubmoduleStatus.InHead | SubmoduleStatus.InIndex) +); // true +``` \ No newline at end of file diff --git a/docs/reference/Repository/Methods/submodules.md b/docs/reference/Repository/Methods/submodules.md new file mode 100644 index 0000000..b7b7afa --- /dev/null +++ b/docs/reference/Repository/Methods/submodules.md @@ -0,0 +1,21 @@ +# submodules + +Load all submodules for this repository and return them. + +## Signature + +```ts +class Submodule { + submodules(): Submodule[]; +} +``` + +### Returns + +
    +
  • + Submodule[] +
    +

    for this repository.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/addFinalize.md b/docs/reference/Submodule/Methods/addFinalize.md new file mode 100644 index 0000000..50ba5aa --- /dev/null +++ b/docs/reference/Submodule/Methods/addFinalize.md @@ -0,0 +1,16 @@ +# addFinalize + +Resolve the setup of a new git submodule. + +This should be called on a submodule once you have called add setup and +done the clone of the submodule. This adds the `.gitmodules` file and the +newly cloned submodule to the index to be ready to be committed (but +doesn't actually do the commit). + +## Signature + +```ts +class Submodule { + addFinalize(): void; +} +``` \ No newline at end of file diff --git a/docs/reference/Submodule/Methods/addToIndex.md b/docs/reference/Submodule/Methods/addToIndex.md new file mode 100644 index 0000000..a7938c3 --- /dev/null +++ b/docs/reference/Submodule/Methods/addToIndex.md @@ -0,0 +1,21 @@ +# addToIndex + +Add current submodule HEAD commit to index of superproject. + +## Signature + +```ts +class Submodule { + addToIndex(writeIndex?: boolean | null | undefined): void; +} +``` + +### Parameters + +
    +
  • + writeIndexnull | boolean +
    +

    If is true, then the index file will be immediately written. Otherwise, you must explicitly call write() on an Index later on.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/clone.md b/docs/reference/Submodule/Methods/clone.md new file mode 100644 index 0000000..ac4bd02 --- /dev/null +++ b/docs/reference/Submodule/Methods/clone.md @@ -0,0 +1,237 @@ +# clone + +Perform the clone step for a newly created submodule. + +This performs the necessary `git clone` to setup a newly-created submodule. + +## Signature + +```ts +class Submodule { + clone( + options?: SubmoduleUpdateOptions | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### Parameters + +
    +
  • + optionsnull | SubmoduleUpdateOptions +
    +

    The options to use.

    +
      +
    • + allowFetchboolean +
      +

      Allow fetching from the submodule's default remote if the target commit isn't found. Default: true.

      +
    • +
    • + checkoutCheckoutOptions +
      +

      These options are passed to the checkout step.

      +
        +
      • + allowConflictsboolean +
        +

        In safe mode, apply safe file updates even when there are conflicts instead of canceling the checkout. Defaults to false.

        +
      • +
      • + ancestorLabelstring +
        +

        The name of the common ancestor side of conflicts

        +
      • +
      • + conflictStyleDiff3boolean +
        +

        Indicates whether to include common ancestor data in diff3 format files for conflicts. Defaults to false.

        +
      • +
      • + conflictStyleMergeboolean +
        +

        Indicate whether a normal merge file should be written for conflicts. Defaults to false.

        +
      • +
      • + dirPermnumber +
        +

        Set the mode with which new directories are created. Default is 0755

        +
      • +
      • + disableFiltersboolean +
        +

        Indicate whether to apply filters like CRLF conversion.

        +
      • +
      • + disablePathspecMatchboolean +
        +

        Treat paths specified in path as exact file paths instead of as pathspecs.

        +
      • +
      • + dryRunboolean +
        +

        Indicate that this checkout should perform a dry run by checking for conflicts but not make any actual changes.

        +
      • +
      • + filePermnumber +
        +

        Set the mode with which new files are created. The default is 0644 or 0755 as dictated by the blob.

        +
      • +
      • + forceboolean +
        +

        Take any action necessary to get the working directory to match the target including potentially discarding modified files.

        +
      • +
      • + ourLabelstring +
        +

        The name of the common our side of conflicts

        +
      • +
      • + overwriteIgnoredboolean +
        +

        Indicate whether ignored files should be overwritten during the checkout. Defaults to true.

        +
      • +
      • + pathstring +
        +

        Add a path to be checked out. The path is a <a href="https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-aiddefpathspecapathspec">pathspec</a> pattern, unless disablePathspecMatch is set. If no paths are specified, then all files are checked out. Otherwise only these specified paths are checked out.

        +
      • +
      • + recreateMissingboolean +
        +

        In safe mode, create files that don't exist. Defaults to false.

        +
      • +
      • + refreshboolean +
        +

        Indicate whether the index and git attributes should be refreshed from disk before any operations. Defaults to true,

        +
      • +
      • + removeIgnoredboolean +
        +

        Remove ignored files from the working dir. Defaults to false.

        +
      • +
      • + removeUntrackedboolean +
        +

        Remove untracked files from the working dir. Defaults to false.

        +
      • +
      • + safeboolean +
        +

        Indicate that the checkout should be performed safely, allowing new files to be created but not overwriting existing files or changes. This is the default.

        +
      • +
      • + skipUnmergedboolean +
        +

        Skip files with unmerged index entries. Defaults to false.

        +
      • +
      • + targetDirstring +
        +

        Set the directory to check out to

        +
      • +
      • + theirLabelstring +
        +

        The name of the common their side of conflicts

        +
      • +
      • + updateIndexboolean +
        +

        Prevents checkout from writing the updated files' information to the index. Defaults to true.

        +
      • +
      • + updateOnlyboolean +
        +

        Only update the contents of files that already exist. If set, files will not be created or deleted. Defaults to false.

        +
      • +
      • + useOursboolean +
        +

        Indicate whether the checkout should proceed on conflicts by using the stage 2 version of the file ("ours"). Defaults to false.

        +
      • +
      • + useTheirsboolean +
        +

        Indicate whether the checkout should proceed on conflicts by using the stage 3 version of the file ("theirs"). Defaults to false.

        +
      • +
      +
    • +
    • + fetchFetchOptions +
      +

      Options which control the fetch, including callbacks.

      +
        +
      • + credentialCredential +
        +

        A interface to represent git credentials in libgit2.

        +
      • +
      • + customHeadersstring[] +
        +

        Set extra headers for this fetch operation.

        +
      • +
      • + depthnumber +
        +

        Set fetch depth, a value less or equal to 0 is interpreted as pull everything (effectively the same as not declaring a limit depth).

        +
      • +
      • + downloadTagsAutotagOption +
        +

        Set how to behave regarding tags on the remote, such as auto-downloading tags for objects we're downloading or downloading all of them. The default is to auto-follow tags.

        +

        - Unspecified : Use the setting from the remote's configuration
        - Auto : Ask the server for tags pointing to objects we're already downloading
        - None : Don't ask for any tags beyond the refspecs
        - All : Ask for all the tags

        +
      • +
      • + followRedirectsRemoteRedirect +
        +

        Set remote redirection settings; whether redirects to another host are permitted. By default, git will follow a redirect on the initial request (/info/refs), but not subsequent requests.

        +

        - None : Do not follow any off-site redirects at any stage of the fetch or push.
        - Initial : Allow off-site redirects only upon the initial request. This is the default.
        - All : Allow redirects at any stage in the fetch or push.

        +
      • +
      • + proxyProxyOptions +
        +

        Set the proxy options to use for the fetch operation.

        +
          +
        • + autoboolean +
          +

          Try to auto-detect the proxy from the git configuration. Note that this will override url specified before.

          +
        • +
        • + urlstring +
          +

          Specify the exact URL of the proxy to use. Note that this will override auto specified before.

          +
        • +
        +
      • +
      • + pruneFetchPrune +
        +

        Set whether to perform a prune after the fetch.

        +

        - Unspecified : Use the setting from the configuration.
        - On : Force pruning on.
        - Off : Force pruning off

        +
      • +
      +
    • +
    +
  • +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
+ +### Returns + +
    +
  • + Promise<Repository> +
    +

    The newly created repository object.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/headId.md b/docs/reference/Submodule/Methods/headId.md new file mode 100644 index 0000000..82df06c --- /dev/null +++ b/docs/reference/Submodule/Methods/headId.md @@ -0,0 +1,21 @@ +# headId + +Get the OID for the submodule in the current `HEAD` tree. + +## Signature + +```ts +class Submodule { + headId(): string | null; +} +``` + +### Returns + +
    +
  • + null | string +
    +

    The OID for the submodule in the current HEAD tree.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/ignoreRule.md b/docs/reference/Submodule/Methods/ignoreRule.md new file mode 100644 index 0000000..df6efc4 --- /dev/null +++ b/docs/reference/Submodule/Methods/ignoreRule.md @@ -0,0 +1,22 @@ +# ignoreRule + +Get the ignore rule that will be used for the submodule. + +## Signature + +```ts +class Submodule { + ignoreRule(): SubmoduleIgnore; +} +``` + +### Returns + +
    +
  • + SubmoduleIgnore +
    +

    The ignore rule that will be used for the submodule.

    +

    Submodule ignore values

    These values represent settings for the submodule.$name.ignore
    configuration value which says how deeply to look at the working
    directory when getting the submodule status.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/indexId.md b/docs/reference/Submodule/Methods/indexId.md new file mode 100644 index 0000000..9898aa5 --- /dev/null +++ b/docs/reference/Submodule/Methods/indexId.md @@ -0,0 +1,21 @@ +# indexId + +Get the OID for the submodule in the index. + +## Signature + +```ts +class Submodule { + indexId(): string | null; +} +``` + +### Returns + +
    +
  • + null | string +
    +

    The OID for the submodule in the index.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/init.md b/docs/reference/Submodule/Methods/init.md new file mode 100644 index 0000000..7644e37 --- /dev/null +++ b/docs/reference/Submodule/Methods/init.md @@ -0,0 +1,37 @@ +# init + +Copy submodule info into ".git/config" file. + +Just like "git submodule init", this copies information about the +submodule into ".git/config". You can use the accessor functions above +to alter the in-memory git_submodule object and control what is written +to the config, overriding what is in .gitmodules. + +By default, existing entries will not be overwritten, but passing `true` +for `overwrite` forces them to be updated. + +## Signature + +```ts +class Submodule { + init( + overwrite?: boolean | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### Parameters + +
    +
  • + overwritenull | boolean +
    +

    By default, existing entries will not be overwritten, but setting this to true forces them to be updated.

    +
  • +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/name.md b/docs/reference/Submodule/Methods/name.md new file mode 100644 index 0000000..3e0e373 --- /dev/null +++ b/docs/reference/Submodule/Methods/name.md @@ -0,0 +1,11 @@ +# name + +Get the name for the submodule. + +## Signature + +```ts +class Submodule { + name(): string; +} +``` \ No newline at end of file diff --git a/docs/reference/Submodule/Methods/open.md b/docs/reference/Submodule/Methods/open.md new file mode 100644 index 0000000..c9ab855 --- /dev/null +++ b/docs/reference/Submodule/Methods/open.md @@ -0,0 +1,34 @@ +# open + +Open the repository for a submodule. + +This will only work if the submodule is checked out into the working +directory. + +## Signature + +```ts +class Submodule { + open(signal?: AbortSignal | null | undefined): Promise; +} +``` + +### Parameters + +
    +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
+ +### Returns + +
    +
  • + Promise<Repository> +
    +

    The repository.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/path.md b/docs/reference/Submodule/Methods/path.md new file mode 100644 index 0000000..5ab0737 --- /dev/null +++ b/docs/reference/Submodule/Methods/path.md @@ -0,0 +1,21 @@ +# path + +Get the path for the submodule. + +## Signature + +```ts +class Submodule { + path(): string; +} +``` + +### Returns + +
    +
  • + string +
    +

    The path for the submodule.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/reload.md b/docs/reference/Submodule/Methods/reload.md new file mode 100644 index 0000000..7b78085 --- /dev/null +++ b/docs/reference/Submodule/Methods/reload.md @@ -0,0 +1,32 @@ +# reload + +Reread submodule info from config, index, and `HEAD`. + +Call this to reread cached submodule information for this submodule if +you have reason to believe that it has changed. + +## Signature + +```ts +class Submodule { + reload( + force?: boolean | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### Parameters + +
    +
  • + forcenull | boolean +
    +

    If this is true, then data will be reloaded even if it doesn't seem out of date.

    +
  • +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/repoInit.md b/docs/reference/Submodule/Methods/repoInit.md new file mode 100644 index 0000000..7869c65 --- /dev/null +++ b/docs/reference/Submodule/Methods/repoInit.md @@ -0,0 +1,42 @@ +# repoInit + +Set up the subrepository for a submodule in preparation for clone. + +This function can be called to init and set up a submodule repository +from a submodule in preparation to clone it from its remote. + +## Signature + +```ts +class Submodule { + repoInit( + useGitlink?: boolean | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### Parameters + +
    +
  • + useGitlinknull | boolean +
    +

    Should the workdir contain a gitlink to the repo in .git/modules vs. repo directly in workdir.

    +
  • +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
+ +### Returns + +
    +
  • + Promise<Repository> +
    +

    The repository.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/sync.md b/docs/reference/Submodule/Methods/sync.md new file mode 100644 index 0000000..0510069 --- /dev/null +++ b/docs/reference/Submodule/Methods/sync.md @@ -0,0 +1,26 @@ +# sync + +Copy submodule remote info into submodule repo. + +This copies the information about the submodules URL into the checked +out submodule config, acting like "git submodule sync". This is useful +if you have altered the URL for the submodule (or it has been altered +by a fetch of upstream changes) and you need to update your local repo. + +## Signature + +```ts +class Submodule { + sync(signal?: AbortSignal | null | undefined): Promise; +} +``` + +### Parameters + +
    +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/update.md b/docs/reference/Submodule/Methods/update.md new file mode 100644 index 0000000..c62db13 --- /dev/null +++ b/docs/reference/Submodule/Methods/update.md @@ -0,0 +1,236 @@ +# update + +Update submodule. + +This will clone a missing submodule and check out the subrepository to +the commit specified in the index of the containing repository. If +the submodule repository doesn't contain the target commit, then the +submodule is fetched using the fetch options supplied in options. + +## Signature + +```ts +class Submodule { + update( + init?: boolean | null | undefined, + options?: SubmoduleUpdateOptions | null | undefined, + signal?: AbortSignal | null | undefined, + ): Promise; +} +``` + +### Parameters + +
    +
  • + initnull | boolean +
    +

    Indicates if the submodule should be initialized first if it has not been initialized yet.

    +
  • +
  • + optionsnull | SubmoduleUpdateOptions +
    +

    Configuration options for the update.

    +
      +
    • + allowFetchboolean +
      +

      Allow fetching from the submodule's default remote if the target commit isn't found. Default: true.

      +
    • +
    • + checkoutCheckoutOptions +
      +

      These options are passed to the checkout step.

      +
        +
      • + allowConflictsboolean +
        +

        In safe mode, apply safe file updates even when there are conflicts instead of canceling the checkout. Defaults to false.

        +
      • +
      • + ancestorLabelstring +
        +

        The name of the common ancestor side of conflicts

        +
      • +
      • + conflictStyleDiff3boolean +
        +

        Indicates whether to include common ancestor data in diff3 format files for conflicts. Defaults to false.

        +
      • +
      • + conflictStyleMergeboolean +
        +

        Indicate whether a normal merge file should be written for conflicts. Defaults to false.

        +
      • +
      • + dirPermnumber +
        +

        Set the mode with which new directories are created. Default is 0755

        +
      • +
      • + disableFiltersboolean +
        +

        Indicate whether to apply filters like CRLF conversion.

        +
      • +
      • + disablePathspecMatchboolean +
        +

        Treat paths specified in path as exact file paths instead of as pathspecs.

        +
      • +
      • + dryRunboolean +
        +

        Indicate that this checkout should perform a dry run by checking for conflicts but not make any actual changes.

        +
      • +
      • + filePermnumber +
        +

        Set the mode with which new files are created. The default is 0644 or 0755 as dictated by the blob.

        +
      • +
      • + forceboolean +
        +

        Take any action necessary to get the working directory to match the target including potentially discarding modified files.

        +
      • +
      • + ourLabelstring +
        +

        The name of the common our side of conflicts

        +
      • +
      • + overwriteIgnoredboolean +
        +

        Indicate whether ignored files should be overwritten during the checkout. Defaults to true.

        +
      • +
      • + pathstring +
        +

        Add a path to be checked out. The path is a <a href="https://git-scm.com/docs/gitglossary.html#Documentation/gitglossary.txt-aiddefpathspecapathspec">pathspec</a> pattern, unless disablePathspecMatch is set. If no paths are specified, then all files are checked out. Otherwise only these specified paths are checked out.

        +
      • +
      • + recreateMissingboolean +
        +

        In safe mode, create files that don't exist. Defaults to false.

        +
      • +
      • + refreshboolean +
        +

        Indicate whether the index and git attributes should be refreshed from disk before any operations. Defaults to true,

        +
      • +
      • + removeIgnoredboolean +
        +

        Remove ignored files from the working dir. Defaults to false.

        +
      • +
      • + removeUntrackedboolean +
        +

        Remove untracked files from the working dir. Defaults to false.

        +
      • +
      • + safeboolean +
        +

        Indicate that the checkout should be performed safely, allowing new files to be created but not overwriting existing files or changes. This is the default.

        +
      • +
      • + skipUnmergedboolean +
        +

        Skip files with unmerged index entries. Defaults to false.

        +
      • +
      • + targetDirstring +
        +

        Set the directory to check out to

        +
      • +
      • + theirLabelstring +
        +

        The name of the common their side of conflicts

        +
      • +
      • + updateIndexboolean +
        +

        Prevents checkout from writing the updated files' information to the index. Defaults to true.

        +
      • +
      • + updateOnlyboolean +
        +

        Only update the contents of files that already exist. If set, files will not be created or deleted. Defaults to false.

        +
      • +
      • + useOursboolean +
        +

        Indicate whether the checkout should proceed on conflicts by using the stage 2 version of the file ("ours"). Defaults to false.

        +
      • +
      • + useTheirsboolean +
        +

        Indicate whether the checkout should proceed on conflicts by using the stage 3 version of the file ("theirs"). Defaults to false.

        +
      • +
      +
    • +
    • + fetchFetchOptions +
      +

      Options which control the fetch, including callbacks.

      +
        +
      • + credentialCredential +
        +

        A interface to represent git credentials in libgit2.

        +
      • +
      • + customHeadersstring[] +
        +

        Set extra headers for this fetch operation.

        +
      • +
      • + depthnumber +
        +

        Set fetch depth, a value less or equal to 0 is interpreted as pull everything (effectively the same as not declaring a limit depth).

        +
      • +
      • + downloadTagsAutotagOption +
        +

        Set how to behave regarding tags on the remote, such as auto-downloading tags for objects we're downloading or downloading all of them. The default is to auto-follow tags.

        +

        - Unspecified : Use the setting from the remote's configuration
        - Auto : Ask the server for tags pointing to objects we're already downloading
        - None : Don't ask for any tags beyond the refspecs
        - All : Ask for all the tags

        +
      • +
      • + followRedirectsRemoteRedirect +
        +

        Set remote redirection settings; whether redirects to another host are permitted. By default, git will follow a redirect on the initial request (/info/refs), but not subsequent requests.

        +

        - None : Do not follow any off-site redirects at any stage of the fetch or push.
        - Initial : Allow off-site redirects only upon the initial request. This is the default.
        - All : Allow redirects at any stage in the fetch or push.

        +
      • +
      • + proxyProxyOptions +
        +

        Set the proxy options to use for the fetch operation.

        +
          +
        • + autoboolean +
          +

          Try to auto-detect the proxy from the git configuration. Note that this will override url specified before.

          +
        • +
        • + urlstring +
          +

          Specify the exact URL of the proxy to use. Note that this will override auto specified before.

          +
        • +
        +
      • +
      • + pruneFetchPrune +
        +

        Set whether to perform a prune after the fetch.

        +

        - Unspecified : Use the setting from the configuration.
        - On : Force pruning on.
        - Off : Force pruning off

        +
      • +
      +
    • +
    +
  • +
  • + signalnull | AbortSignal +
    +

    Optional AbortSignal to cancel the operation.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/updateStrategy.md b/docs/reference/Submodule/Methods/updateStrategy.md new file mode 100644 index 0000000..9a382e2 --- /dev/null +++ b/docs/reference/Submodule/Methods/updateStrategy.md @@ -0,0 +1,22 @@ +# updateStrategy + +Get the update rule that will be used for the submodule. + +## Signature + +```ts +class Submodule { + updateStrategy(): SubmoduleUpdate; +} +``` + +### Returns + +
    +
  • + SubmoduleUpdate +
    +

    The update rule that will be used for the submodule.

    +

    Submodule update values

    These values represent settings for the submodule.$name.update
    configuration value which says how to handle git submodule update
    for this submodule. The value is usually set in the ".gitmodules"
    file and copied to ".git/config" when the submodule is initialized.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/url.md b/docs/reference/Submodule/Methods/url.md new file mode 100644 index 0000000..996e16b --- /dev/null +++ b/docs/reference/Submodule/Methods/url.md @@ -0,0 +1,21 @@ +# url + +Get the submodule's URL. + +## Signature + +```ts +class Submodule { + url(): string | null; +} +``` + +### Returns + +
    +
  • + null | string +
    +

    The URL of the submodule. Returns null if the URL isn't present.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/Methods/workdirId.md b/docs/reference/Submodule/Methods/workdirId.md new file mode 100644 index 0000000..fdc65a4 --- /dev/null +++ b/docs/reference/Submodule/Methods/workdirId.md @@ -0,0 +1,25 @@ +# workdirId + +Get the OID for the submodule in the current working directory. + +This returns the OID that corresponds to looking up `HEAD` in the +checked out submodule. If there are pending changes in the index or +anything else, this won't notice that. + +## Signature + +```ts +class Submodule { + workdirId(): string | null; +} +``` + +### Returns + +
    +
  • + null | string +
    +

    The OID for the submodule in the current working directory.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Submodule/submoduleStatusContains.md b/docs/reference/Submodule/submoduleStatusContains.md new file mode 100644 index 0000000..6c8afc3 --- /dev/null +++ b/docs/reference/Submodule/submoduleStatusContains.md @@ -0,0 +1,34 @@ +# submoduleStatusContains + +Check submodule status contains given value. + +## Signature + +```ts +function submoduleStatusContains(source: number, target: number): boolean; +``` + +### Parameters + +
    +
  • + sourcerequired · number +
    +

    Source status.

    +
  • +
  • + targetrequired · number +
    +

    Target status.

    +
  • +
+ +### Returns + +
    +
  • + boolean +
    +

    Returns true is source status contains target status.

    +
  • +
\ No newline at end of file diff --git a/docs/reference/Tracing/traceClear.md b/docs/reference/Tracing/traceClear.md new file mode 100644 index 0000000..a80617f --- /dev/null +++ b/docs/reference/Tracing/traceClear.md @@ -0,0 +1,9 @@ +# traceClear + +Clear the global subscriber + +## Signature + +```ts +function traceClear(): void; +``` \ No newline at end of file diff --git a/docs/reference/Tracing/traceSet.md b/docs/reference/Tracing/traceSet.md new file mode 100644 index 0000000..86ad448 --- /dev/null +++ b/docs/reference/Tracing/traceSet.md @@ -0,0 +1,28 @@ +# traceSet + +Set the global subscriber called when libgit2 produces a tracing message. + +## Signature + +```ts +function traceSet( + level: TraceLevel, + callback: (level: TraceLevel, message: string) => void, +): void; +``` + +### Parameters + +
    +
  • + levelrequired · TraceLevel +
    +

    Level to set tracing to

    +

    Available tracing levels. When tracing is set to a particular level,
    callers will be provided tracing at the given level and all lower levels.

    +
  • +
  • + callbackrequired · (level: TraceLevel, message: string) => void +
    +

    Callback to call with trace data

    +
  • +
\ No newline at end of file diff --git a/index.d.ts b/index.d.ts index 01cfca2..cb86dfe 100644 --- a/index.d.ts +++ b/index.d.ts @@ -2839,6 +2839,7 @@ export declare class Repository { * Apply a Diff to the given repo, making changes directly in the working directory, the index, or both. * * @category Repository/Methods + * @signature * ```ts * class Repository { * apply(diff: Diff, location: ApplyLocation, options?: ApplyOptions | null | undefined): void; @@ -2875,7 +2876,7 @@ export declare class Repository { /** * Get the value of a git attribute for a path. * - * @ository/Methods + * @category Repository/Methods * @signature * ```ts * class Repository { @@ -3099,7 +3100,7 @@ export declare class Repository { */ cherrypick(commit: Commit, options?: CherrypickOptions | undefined | null): void /** - * Applies a cherrypick of `cherrypick_commit` against `our_commit` and returns the resulting Index, + * Applies a cherrypick of `cherrypickCommit` against `ourCommit` and returns the resulting Index, * without modifying the working directory or repository state. * This method does not write any changes to disk or update HEAD. * it is useful for computing what the cherrypick result would look like without actually applying it. @@ -4800,6 +4801,19 @@ export declare class Repository { * @returns The submodule. */ submodule(url: string, path: string, useGitlink?: boolean | undefined | null): Submodule + /** + * Load all submodules for this repository and return them. + * + * @category Repository/Methods + * @signature + * ```ts + * class Submodule { + * submodules(): Submodule[]; + * } + * ``` + * + * @returns for this repository. + */ submodules(): Array /** * Lookup submodule information by name or path. @@ -8948,7 +8962,7 @@ export interface SubmoduleUpdateOptions { export declare function traceClear(): void /** - * Available tracing levels. When tracing is set to a particular level, + * Available tracing levels. When tracing is set to a particular level, * callers will be provided tracing at the given level and all lower levels. */ export type TraceLevel = 'None'| diff --git a/src/apply.rs b/src/apply.rs index 7085fbd..1efeb43 100644 --- a/src/apply.rs +++ b/src/apply.rs @@ -57,6 +57,7 @@ impl Repository { /// Apply a Diff to the given repo, making changes directly in the working directory, the index, or both. /// /// @category Repository/Methods + /// @signature /// ```ts /// class Repository { /// apply(diff: Diff, location: ApplyLocation, options?: ApplyOptions | null | undefined): void; diff --git a/src/attr.rs b/src/attr.rs index 29f00fe..c4bba6e 100644 --- a/src/attr.rs +++ b/src/attr.rs @@ -61,7 +61,7 @@ impl Repository { #[napi(ts_return_type = "boolean | string | Buffer | null")] /// Get the value of a git attribute for a path. /// - /// @ository/Methods + /// @category Repository/Methods /// @signature /// ```ts /// class Repository { diff --git a/src/cherrypick.rs b/src/cherrypick.rs index 3c4f8bb..4fd0ff9 100644 --- a/src/cherrypick.rs +++ b/src/cherrypick.rs @@ -91,7 +91,7 @@ impl Repository { } #[napi] - /// Applies a cherrypick of `cherrypick_commit` against `our_commit` and returns the resulting Index, + /// Applies a cherrypick of `cherrypickCommit` against `ourCommit` and returns the resulting Index, /// without modifying the working directory or repository state. /// This method does not write any changes to disk or update HEAD. /// it is useful for computing what the cherrypick result would look like without actually applying it. diff --git a/src/submodule.rs b/src/submodule.rs index 34747d8..e2c12c4 100644 --- a/src/submodule.rs +++ b/src/submodule.rs @@ -864,6 +864,17 @@ impl Repository { } #[napi] + /// Load all submodules for this repository and return them. + /// + /// @category Repository/Methods + /// @signature + /// ```ts + /// class Submodule { + /// submodules(): Submodule[]; + /// } + /// ``` + /// + /// @returns for this repository. pub fn submodules(&self, this: Reference, env: Env) -> crate::Result> { let mut submodules = vec![]; for sub in self.inner.submodules()? { diff --git a/src/tracing.rs b/src/tracing.rs index 0ab29fd..cf35c63 100644 --- a/src/tracing.rs +++ b/src/tracing.rs @@ -3,7 +3,7 @@ use napi::bindgen_prelude::FnArgs; use napi_derive::napi; use std::sync::{Mutex, OnceLock}; -/// Available tracing levels. When tracing is set to a particular level, +/// Available tracing levels. When tracing is set to a particular level, /// callers will be provided tracing at the given level and all lower levels. #[napi(string_enum)] pub enum TraceLevel { diff --git a/yarn.lock b/yarn.lock index 71233b5..1530d9e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3020,16 +3020,6 @@ __metadata: languageName: node linkType: hard -"@types/node-fetch@npm:^2.6.4": - version: 2.6.12 - resolution: "@types/node-fetch@npm:2.6.12" - dependencies: - "@types/node": "npm:*" - form-data: "npm:^4.0.0" - checksum: 10c0/7693acad5499b7df2d1727d46cff092a63896dc04645f36b973dd6dd754a59a7faba76fcb777bdaa35d80625c6a9dd7257cca9c401a4bab03b04480cda7fd1af - languageName: node - linkType: hard - "@types/node@npm:*": version: 22.13.11 resolution: "@types/node@npm:22.13.11" @@ -3039,15 +3029,6 @@ __metadata: languageName: node linkType: hard -"@types/node@npm:^18.11.18": - version: 18.19.86 - resolution: "@types/node@npm:18.19.86" - dependencies: - undici-types: "npm:~5.26.4" - checksum: 10c0/1017c4ba61661ab30e4b4a78040cb66980919549f56d85755326dcccbe7a0405be7d6be1b2a91bace8eaef0d2a24b63d4f104b381be7f957c2483e465d829690 - languageName: node - linkType: hard - "@types/node@npm:^22.8.4": version: 22.8.4 resolution: "@types/node@npm:22.8.4" @@ -3395,15 +3376,6 @@ __metadata: languageName: node linkType: hard -"abort-controller@npm:^3.0.0": - version: 3.0.0 - resolution: "abort-controller@npm:3.0.0" - dependencies: - event-target-shim: "npm:^5.0.0" - checksum: 10c0/90ccc50f010250152509a344eb2e71977fbf8db0ab8f1061197e3275ddf6c61a41a6edfd7b9409c664513131dd96e962065415325ef23efa5db931b382d24ca5 - languageName: node - linkType: hard - "agent-base@npm:6, agent-base@npm:^6.0.2": version: 6.0.2 resolution: "agent-base@npm:6.0.2" @@ -3608,13 +3580,6 @@ __metadata: languageName: node linkType: hard -"asynckit@npm:^0.4.0": - version: 0.4.0 - resolution: "asynckit@npm:0.4.0" - checksum: 10c0/d73e2ddf20c4eb9337e1b3df1a0f6159481050a5de457c55b14ea2e5cb6d90bb69e004c9af54737a5ee0917fcf2c9e25de67777bbe58261847846066ba75bc9d - languageName: node - linkType: hard - "balanced-match@npm:^1.0.0": version: 1.0.2 resolution: "balanced-match@npm:1.0.2" @@ -3754,16 +3719,6 @@ __metadata: languageName: node linkType: hard -"call-bind-apply-helpers@npm:^1.0.1, call-bind-apply-helpers@npm:^1.0.2": - version: 1.0.2 - resolution: "call-bind-apply-helpers@npm:1.0.2" - dependencies: - es-errors: "npm:^1.3.0" - function-bind: "npm:^1.1.2" - checksum: 10c0/47bd9901d57b857590431243fea704ff18078b16890a6b3e021e12d279bbf211d039155e27d7566b374d49ee1f8189344bac9833dec7a20cdec370506361c938 - languageName: node - linkType: hard - "caniuse-lite@npm:^1.0.30001688": version: 1.0.30001695 resolution: "caniuse-lite@npm:1.0.30001695" @@ -3932,15 +3887,6 @@ __metadata: languageName: node linkType: hard -"combined-stream@npm:^1.0.8": - version: 1.0.8 - resolution: "combined-stream@npm:1.0.8" - dependencies: - delayed-stream: "npm:~1.0.0" - checksum: 10c0/0dbb829577e1b1e839fa82b40c07ffaf7de8a09b935cadd355a73652ae70a88b4320db322f6634a4ad93424292fa80973ac6480986247f1734a1137debf271d5 - languageName: node - linkType: hard - "comma-separated-tokens@npm:^2.0.0": version: 2.0.3 resolution: "comma-separated-tokens@npm:2.0.3" @@ -4113,13 +4059,6 @@ __metadata: languageName: node linkType: hard -"delayed-stream@npm:~1.0.0": - version: 1.0.0 - resolution: "delayed-stream@npm:1.0.0" - checksum: 10c0/d758899da03392e6712f042bec80aa293bbe9e9ff1b2634baae6a360113e708b91326594c8a486d475c69d6259afb7efacdc3537bfcda1c6c648e390ce601b19 - languageName: node - linkType: hard - "delegates@npm:^1.0.0": version: 1.0.0 resolution: "delegates@npm:1.0.0" @@ -4180,7 +4119,7 @@ __metadata: es-toolkit: "npm:^1.32.0" fast-glob: "npm:^3.3.3" micromatch: "npm:^4.0.8" - openai: "npm:^4.95.1" + openai: "npm:^6.15.0" tsx: "npm:^4.19.3" typanion: "npm:^3.14.0" typedoc: "npm:0.28.0" @@ -4197,17 +4136,6 @@ __metadata: languageName: node linkType: hard -"dunder-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "dunder-proto@npm:1.0.1" - dependencies: - call-bind-apply-helpers: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - gopd: "npm:^1.2.0" - checksum: 10c0/199f2a0c1c16593ca0a145dbf76a962f8033ce3129f01284d48c45ed4e14fea9bbacd7b3610b6cdc33486cef20385ac054948fefc6272fcce645c09468f93031 - languageName: node - linkType: hard - "eastasianwidth@npm:^0.2.0": version: 0.2.0 resolution: "eastasianwidth@npm:0.2.0" @@ -4285,20 +4213,6 @@ __metadata: languageName: node linkType: hard -"es-define-property@npm:^1.0.1": - version: 1.0.1 - resolution: "es-define-property@npm:1.0.1" - checksum: 10c0/3f54eb49c16c18707949ff25a1456728c883e81259f045003499efba399c08bad00deebf65cccde8c0e07908c1a225c9d472b7107e558f2a48e28d530e34527c - languageName: node - linkType: hard - -"es-errors@npm:^1.3.0": - version: 1.3.0 - resolution: "es-errors@npm:1.3.0" - checksum: 10c0/0a61325670072f98d8ae3b914edab3559b6caa980f08054a3b872052640d91da01d38df55df797fcc916389d77fc92b8d5906cf028f4db46d7e3003abecbca85 - languageName: node - linkType: hard - "es-git@workspace:.": version: 0.0.0-use.local resolution: "es-git@workspace:." @@ -4321,27 +4235,6 @@ __metadata: languageName: node linkType: hard -"es-object-atoms@npm:^1.0.0, es-object-atoms@npm:^1.1.1": - version: 1.1.1 - resolution: "es-object-atoms@npm:1.1.1" - dependencies: - es-errors: "npm:^1.3.0" - checksum: 10c0/65364812ca4daf48eb76e2a3b7a89b3f6a2e62a1c420766ce9f692665a29d94fe41fe88b65f24106f449859549711e4b40d9fb8002d862dfd7eb1c512d10be0c - languageName: node - linkType: hard - -"es-set-tostringtag@npm:^2.1.0": - version: 2.1.0 - resolution: "es-set-tostringtag@npm:2.1.0" - dependencies: - es-errors: "npm:^1.3.0" - get-intrinsic: "npm:^1.2.6" - has-tostringtag: "npm:^1.0.2" - hasown: "npm:^2.0.2" - checksum: 10c0/ef2ca9ce49afe3931cb32e35da4dcb6d86ab02592cfc2ce3e49ced199d9d0bb5085fc7e73e06312213765f5efa47cc1df553a6a5154584b21448e9fb8355b1af - languageName: node - linkType: hard - "es-toolkit@npm:^1.32.0": version: 1.33.0 resolution: "es-toolkit@npm:1.33.0" @@ -4658,13 +4551,6 @@ __metadata: languageName: node linkType: hard -"event-target-shim@npm:^5.0.0": - version: 5.0.1 - resolution: "event-target-shim@npm:5.0.1" - checksum: 10c0/0255d9f936215fd206156fd4caa9e8d35e62075d720dc7d847e89b417e5e62cf1ce6c9b4e0a1633a9256de0efefaf9f8d26924b1f3c8620cffb9db78e7d3076b - languageName: node - linkType: hard - "expect-type@npm:^1.1.0": version: 1.1.0 resolution: "expect-type@npm:1.1.0" @@ -4787,36 +4673,6 @@ __metadata: languageName: node linkType: hard -"form-data-encoder@npm:1.7.2": - version: 1.7.2 - resolution: "form-data-encoder@npm:1.7.2" - checksum: 10c0/56553768037b6d55d9de524f97fe70555f0e415e781cb56fc457a68263de3d40fadea2304d4beef2d40b1a851269bd7854e42c362107071892cb5238debe9464 - languageName: node - linkType: hard - -"form-data@npm:^4.0.0": - version: 4.0.4 - resolution: "form-data@npm:4.0.4" - dependencies: - asynckit: "npm:^0.4.0" - combined-stream: "npm:^1.0.8" - es-set-tostringtag: "npm:^2.1.0" - hasown: "npm:^2.0.2" - mime-types: "npm:^2.1.12" - checksum: 10c0/373525a9a034b9d57073e55eab79e501a714ffac02e7a9b01be1c820780652b16e4101819785e1e18f8d98f0aee866cc654d660a435c378e16a72f2e7cac9695 - languageName: node - linkType: hard - -"formdata-node@npm:^4.3.2": - version: 4.4.1 - resolution: "formdata-node@npm:4.4.1" - dependencies: - node-domexception: "npm:1.0.0" - web-streams-polyfill: "npm:4.0.0-beta.3" - checksum: 10c0/74151e7b228ffb33b565cec69182694ad07cc3fdd9126a8240468bb70a8ba66e97e097072b60bcb08729b24c7ce3fd3e0bd7f1f80df6f9f662b9656786e76f6a - languageName: node - linkType: hard - "front-matter@npm:^4.0.2": version: 4.0.2 resolution: "front-matter@npm:4.0.2" @@ -4868,13 +4724,6 @@ __metadata: languageName: node linkType: hard -"function-bind@npm:^1.1.2": - version: 1.1.2 - resolution: "function-bind@npm:1.1.2" - checksum: 10c0/d8680ee1e5fcd4c197e4ac33b2b4dce03c71f4d91717292785703db200f5c21f977c568d28061226f9b5900cbcd2c84463646134fd5337e7925e0942bc3f46d5 - languageName: node - linkType: hard - "gauge@npm:^4.0.3": version: 4.0.4 resolution: "gauge@npm:4.0.4" @@ -4898,34 +4747,6 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.2.6": - version: 1.3.0 - resolution: "get-intrinsic@npm:1.3.0" - dependencies: - call-bind-apply-helpers: "npm:^1.0.2" - es-define-property: "npm:^1.0.1" - es-errors: "npm:^1.3.0" - es-object-atoms: "npm:^1.1.1" - function-bind: "npm:^1.1.2" - get-proto: "npm:^1.0.1" - gopd: "npm:^1.2.0" - has-symbols: "npm:^1.1.0" - hasown: "npm:^2.0.2" - math-intrinsics: "npm:^1.1.0" - checksum: 10c0/52c81808af9a8130f581e6a6a83e1ba4a9f703359e7a438d1369a5267a25412322f03dcbd7c549edaef0b6214a0630a28511d7df0130c93cfd380f4fa0b5b66a - languageName: node - linkType: hard - -"get-proto@npm:^1.0.1": - version: 1.0.1 - resolution: "get-proto@npm:1.0.1" - dependencies: - dunder-proto: "npm:^1.0.1" - es-object-atoms: "npm:^1.0.0" - checksum: 10c0/9224acb44603c5526955e83510b9da41baf6ae73f7398875fba50edc5e944223a89c4a72b070fcd78beb5f7bdda58ecb6294adc28f7acfc0da05f76a2399643c - languageName: node - linkType: hard - "get-tsconfig@npm:^4.7.5": version: 4.10.0 resolution: "get-tsconfig@npm:4.10.0" @@ -4994,13 +4815,6 @@ __metadata: languageName: node linkType: hard -"gopd@npm:^1.2.0": - version: 1.2.0 - resolution: "gopd@npm:1.2.0" - checksum: 10c0/50fff1e04ba2b7737c097358534eacadad1e68d24cccee3272e04e007bed008e68d2614f3987788428fd192a5ae3889d08fb2331417e4fc4a9ab366b2043cead - languageName: node - linkType: hard - "graceful-fs@npm:^4.1.9, graceful-fs@npm:^4.2.4": version: 4.2.11 resolution: "graceful-fs@npm:4.2.11" @@ -5033,22 +4847,6 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": - version: 1.1.0 - resolution: "has-symbols@npm:1.1.0" - checksum: 10c0/dde0a734b17ae51e84b10986e651c664379018d10b91b6b0e9b293eddb32f0f069688c841fb40f19e9611546130153e0a2a48fd7f512891fb000ddfa36f5a20e - languageName: node - linkType: hard - -"has-tostringtag@npm:^1.0.2": - version: 1.0.2 - resolution: "has-tostringtag@npm:1.0.2" - dependencies: - has-symbols: "npm:^1.0.3" - checksum: 10c0/a8b166462192bafe3d9b6e420a1d581d93dd867adb61be223a17a8d6dad147aa77a8be32c961bb2f27b3ef893cae8d36f564ab651f5e9b7938ae86f74027c48c - languageName: node - linkType: hard - "has-unicode@npm:^2.0.1": version: 2.0.1 resolution: "has-unicode@npm:2.0.1" @@ -5056,15 +4854,6 @@ __metadata: languageName: node linkType: hard -"hasown@npm:^2.0.2": - version: 2.0.2 - resolution: "hasown@npm:2.0.2" - dependencies: - function-bind: "npm:^1.1.2" - checksum: 10c0/3769d434703b8ac66b209a4cca0737519925bbdb61dd887f93a16372b14694c63ff4e797686d87c90f08168e81082248b9b028bad60d4da9e0d1148766f56eb9 - languageName: node - linkType: hard - "hast-util-to-html@npm:^9.0.4": version: 9.0.5 resolution: "hast-util-to-html@npm:9.0.5" @@ -5642,13 +5431,6 @@ __metadata: languageName: node linkType: hard -"math-intrinsics@npm:^1.1.0": - version: 1.1.0 - resolution: "math-intrinsics@npm:1.1.0" - checksum: 10c0/7579ff94e899e2f76ab64491d76cf606274c874d8f2af4a442c016bd85688927fcfca157ba6bf74b08e9439dc010b248ce05b96cc7c126a354c3bae7fcb48b7f - languageName: node - linkType: hard - "mdast-util-to-hast@npm:^13.0.0": version: 13.2.1 resolution: "mdast-util-to-hast@npm:13.2.1" @@ -5732,22 +5514,6 @@ __metadata: languageName: node linkType: hard -"mime-db@npm:1.52.0": - version: 1.52.0 - resolution: "mime-db@npm:1.52.0" - checksum: 10c0/0557a01deebf45ac5f5777fe7740b2a5c309c6d62d40ceab4e23da9f821899ce7a900b7ac8157d4548ddbb7beffe9abc621250e6d182b0397ec7f10c7b91a5aa - languageName: node - linkType: hard - -"mime-types@npm:^2.1.12": - version: 2.1.35 - resolution: "mime-types@npm:2.1.35" - dependencies: - mime-db: "npm:1.52.0" - checksum: 10c0/82fb07ec56d8ff1fc999a84f2f217aa46cb6ed1033fefaabd5785b9a974ed225c90dc72fff460259e66b95b73648596dbcc50d51ed69cdf464af2d237d3149b2 - languageName: node - linkType: hard - "minimatch@npm:^3.1.1": version: 3.1.2 resolution: "minimatch@npm:3.1.2" @@ -5949,27 +5715,6 @@ __metadata: languageName: node linkType: hard -"node-domexception@npm:1.0.0": - version: 1.0.0 - resolution: "node-domexception@npm:1.0.0" - checksum: 10c0/5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b - languageName: node - linkType: hard - -"node-fetch@npm:^2.6.7": - version: 2.7.0 - resolution: "node-fetch@npm:2.7.0" - dependencies: - whatwg-url: "npm:^5.0.0" - peerDependencies: - encoding: ^0.1.0 - peerDependenciesMeta: - encoding: - optional: true - checksum: 10c0/b55786b6028208e6fbe594ccccc213cab67a72899c9234eb59dba51062a299ea853210fcf526998eaa2867b0963ad72338824450905679ff0fa304b8c5093ae8 - languageName: node - linkType: hard - "node-gyp@npm:latest": version: 9.3.0 resolution: "node-gyp@npm:9.3.0" @@ -6067,20 +5812,12 @@ __metadata: languageName: node linkType: hard -"openai@npm:^4.95.1": - version: 4.95.1 - resolution: "openai@npm:4.95.1" - dependencies: - "@types/node": "npm:^18.11.18" - "@types/node-fetch": "npm:^2.6.4" - abort-controller: "npm:^3.0.0" - agentkeepalive: "npm:^4.2.1" - form-data-encoder: "npm:1.7.2" - formdata-node: "npm:^4.3.2" - node-fetch: "npm:^2.6.7" +"openai@npm:^6.15.0": + version: 6.15.0 + resolution: "openai@npm:6.15.0" peerDependencies: ws: ^8.18.0 - zod: ^3.23.8 + zod: ^3.25 || ^4.0 peerDependenciesMeta: ws: optional: true @@ -6088,7 +5825,7 @@ __metadata: optional: true bin: openai: bin/cli - checksum: 10c0/857faf4f734f628a246571be66390d947c4a1409f0e0715cff48b1391af7ad5c891323fbf7dda65f5887edc69df824a08dfc50db366a6ff4a9290a4cb029b16c + checksum: 10c0/08400449dac9be2629f051045fb46b0384a1e9ba9738b72c23853a443857e3a81f237c2d306fbd287689b9c15c18790203893fc31611976617a6be474489df8e languageName: node linkType: hard @@ -7033,13 +6770,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:~0.0.3": - version: 0.0.3 - resolution: "tr46@npm:0.0.3" - checksum: 10c0/047cb209a6b60c742f05c9d3ace8fa510bff609995c129a37ace03476a9b12db4dbf975e74600830ef0796e18882b2381fb5fb1f6b4f96b832c374de3ab91a11 - languageName: node - linkType: hard - "trim-lines@npm:^3.0.0": version: 3.0.1 resolution: "trim-lines@npm:3.0.1" @@ -7178,13 +6908,6 @@ __metadata: languageName: node linkType: hard -"undici-types@npm:~5.26.4": - version: 5.26.5 - resolution: "undici-types@npm:5.26.5" - checksum: 10c0/bb673d7876c2d411b6eb6c560e0c571eef4a01c1c19925175d16e3a30c4c428181fb8d7ae802a261f283e4166a0ac435e2f505743aa9e45d893f9a3df017b501 - languageName: node - linkType: hard - "undici-types@npm:~6.19.8": version: 6.19.8 resolution: "undici-types@npm:6.19.8" @@ -7561,30 +7284,6 @@ __metadata: languageName: node linkType: hard -"web-streams-polyfill@npm:4.0.0-beta.3": - version: 4.0.0-beta.3 - resolution: "web-streams-polyfill@npm:4.0.0-beta.3" - checksum: 10c0/a9596779db2766990117ed3a158e0b0e9f69b887a6d6ba0779940259e95f99dc3922e534acc3e5a117b5f5905300f527d6fbf8a9f0957faf1d8e585ce3452e8e - languageName: node - linkType: hard - -"webidl-conversions@npm:^3.0.0": - version: 3.0.1 - resolution: "webidl-conversions@npm:3.0.1" - checksum: 10c0/5612d5f3e54760a797052eb4927f0ddc01383550f542ccd33d5238cfd65aeed392a45ad38364970d0a0f4fea32e1f4d231b3d8dac4a3bdd385e5cf802ae097db - languageName: node - linkType: hard - -"whatwg-url@npm:^5.0.0": - version: 5.0.0 - resolution: "whatwg-url@npm:5.0.0" - dependencies: - tr46: "npm:~0.0.3" - webidl-conversions: "npm:^3.0.0" - checksum: 10c0/1588bed84d10b72d5eec1d0faa0722ba1962f1821e7539c535558fb5398d223b0c50d8acab950b8c488b4ba69043fd833cc2697056b167d8ad46fac3995a55d5 - languageName: node - linkType: hard - "which@npm:^2.0.1, which@npm:^2.0.2": version: 2.0.2 resolution: "which@npm:2.0.2"