Compare commits
4 commits
895b63961d
...
7c0fe1e8d5
Author | SHA1 | Date | |
---|---|---|---|
Cat /dev/Nulo | 7c0fe1e8d5 | ||
Cat /dev/Nulo | 44d1915830 | ||
Cat /dev/Nulo | 61477f34b0 | ||
Cat /dev/Nulo | 672b5e455a |
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@nulo/isogit-lfs",
|
"name": "@nulo/isogit-lfs",
|
||||||
"version": "0.2.0",
|
"version": "0.2.2",
|
||||||
"description": "LFS helpers for Isomorphic Git",
|
"description": "LFS helpers for Isomorphic Git",
|
||||||
"main": "src/index.ts",
|
"main": "src/index.ts",
|
||||||
"repository": "git@github.com:riboseinc/isogit-lfs.git",
|
"repository": "git@github.com:riboseinc/isogit-lfs.git",
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export { default as downloadBlobFromPointer } from './download';
|
export { default as downloadBlobFromPointer } from "./download";
|
||||||
export { default as populateCache } from './populateCache';
|
export { default as populateCache } from "./populateCache";
|
||||||
export { readPointer } from './pointers';
|
export { readPointer } from "./pointers";
|
||||||
|
export { default as uploadBlob } from "./upload";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
import { Buffer } from "buffer";
|
import { Buffer } from "buffer";
|
||||||
|
|
||||||
import git, { PromiseFsClient } from "isomorphic-git";
|
import git, {
|
||||||
import http, { GitProgressEvent } from "isomorphic-git/http/node";
|
GitProgressEvent,
|
||||||
|
HttpClient,
|
||||||
|
PromiseFsClient,
|
||||||
|
} from "isomorphic-git";
|
||||||
|
|
||||||
import { isVacantAndWriteable, pointsToLFS } from "./util";
|
import { isVacantAndWriteable, pointsToLFS } from "./util";
|
||||||
import downloadBlobFromPointer from "./download";
|
import downloadBlobFromPointer from "./download";
|
||||||
|
@ -26,6 +29,7 @@ type ProgressHandler = (progress: GitProgressEvent) => void;
|
||||||
*/
|
*/
|
||||||
export default async function populateCache(
|
export default async function populateCache(
|
||||||
fs: PromiseFsClient,
|
fs: PromiseFsClient,
|
||||||
|
http: HttpClient,
|
||||||
workDir: string,
|
workDir: string,
|
||||||
remoteURL: string,
|
remoteURL: string,
|
||||||
ref: string = "HEAD",
|
ref: string = "HEAD",
|
||||||
|
|
10
src/types.ts
10
src/types.ts
|
@ -1,12 +1,10 @@
|
||||||
import type { HttpClient } from 'isomorphic-git/http/node';
|
import type { HttpClient } from "isomorphic-git";
|
||||||
|
|
||||||
|
|
||||||
export interface BasicAuth {
|
export interface BasicAuth {
|
||||||
username: string
|
username: string;
|
||||||
password: string
|
password: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: Restructure HTTPRequest to reuse Isomorphic Git’s GitHttpRequest?
|
// TODO: Restructure HTTPRequest to reuse Isomorphic Git’s GitHttpRequest?
|
||||||
|
|
||||||
export interface HTTPRequest {
|
export interface HTTPRequest {
|
||||||
|
@ -17,5 +15,5 @@ export interface HTTPRequest {
|
||||||
url: string;
|
url: string;
|
||||||
|
|
||||||
/** Auth data for basic HTTP auth. */
|
/** Auth data for basic HTTP auth. */
|
||||||
auth?: BasicAuth
|
auth?: BasicAuth;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue