From 0c0761a2f4b457788e74260f6a730de4ed785f8e Mon Sep 17 00:00:00 2001 From: Dolan Date: Wed, 7 Jun 2017 03:09:58 +0100 Subject: [PATCH] Added Clone and co --- types/nodegit/clone-options.d.ts | 13 +++++++++++++ types/nodegit/clone.d.ts | 16 ++++++++++++++++ types/nodegit/index.d.ts | 2 ++ types/nodegit/tsconfig.json | 2 ++ 4 files changed, 33 insertions(+) create mode 100644 types/nodegit/clone-options.d.ts create mode 100644 types/nodegit/clone.d.ts diff --git a/types/nodegit/clone-options.d.ts b/types/nodegit/clone-options.d.ts new file mode 100644 index 0000000000..b8acc9aad0 --- /dev/null +++ b/types/nodegit/clone-options.d.ts @@ -0,0 +1,13 @@ +import { CheckoutOptions } from './checkout-options'; +import { FetchOptions } from './fetch-options'; + +export class CloneOptions { + version?: number; + checkoutOpts?: CheckoutOptions; + fetchOpts?: FetchOptions; + bare?: number; + local?: number; + checkoutBranch?: string; + repositoryCbPayload?: void; + remoteCbPayload?: void; +} diff --git a/types/nodegit/clone.d.ts b/types/nodegit/clone.d.ts new file mode 100644 index 0000000000..e0b92bb9ea --- /dev/null +++ b/types/nodegit/clone.d.ts @@ -0,0 +1,16 @@ +import { Repository } from './repository'; +import { CloneOptions } from './clone-options'; + +export namespace Clone { + enum LOCAL { + AUTO = 0, + LOCAL = 1, + NO_LOCAL = 2, + NO_LINKS = 3 + } +} + +export class Clone { + static clone(url: string, local_path: string, options?: CloneOptions): Promise; + static initOptions(opts: CloneOptions, version: number): number; +} diff --git a/types/nodegit/index.d.ts b/types/nodegit/index.d.ts index e086fe5d4c..860d1e9c2f 100644 --- a/types/nodegit/index.d.ts +++ b/types/nodegit/index.d.ts @@ -13,6 +13,8 @@ export { Branch } from './branch'; export { Buf } from './buf'; export { CheckoutOptions } from './checkout-options'; export { Checkout } from './checkout'; +export { CloneOptions } from './clone-options'; +export { Clone } from './clone'; export { Commit } from './commit'; export { Config } from './config'; export { ConvenientPatch } from './convenient-patch'; diff --git a/types/nodegit/tsconfig.json b/types/nodegit/tsconfig.json index c8d5c68fc2..39bb95c2fc 100644 --- a/types/nodegit/tsconfig.json +++ b/types/nodegit/tsconfig.json @@ -26,6 +26,8 @@ "buf.d.ts", "checkout-options.d.ts", "checkout.d.ts", + "clone-options.d.ts", + "clone.d.ts", "commit.d.ts", "config.d.ts", "convenient-patch.d.ts",