Skip to content

Commit

Permalink
WIP: remove tsconfig paths and build
Browse files Browse the repository at this point in the history
  • Loading branch information
robert-cronin committed Jul 1, 2020
1 parent 2cafa37 commit ea79a5d
Show file tree
Hide file tree
Showing 173 changed files with 4,461 additions and 1,192 deletions.
11 changes: 9 additions & 2 deletions dist/src/lib/HttpRequest.d.ts → dist/HttpRequest.d.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
/// <reference types="node" />
import net from 'net';
import { Address } from '@polykey/peers/PeerInfo';
import { Address } from './peers/PeerInfo';
declare class HttpRequest {
address: Address;
getSocket: (address: Address) => net.Socket;
constructor(address: Address, getSocket: (address: Address) => net.Socket);
/**
* The custom http request method to feed into isomorphic-git's [custom http object](https://isomorphic-git.org/docs/en/http)
*/
request({ url, method, headers, body, onProgress }: {
url: any;
method: any;
headers: any;
body: any;
onProgress: any;
}): Promise<any>;
private fromNodeStream;
/**
* Converts http incoming message into a iterator that can be used by [isomorphic-git](https://isomorphic-git.org)
* @param message Http IncomingMessage
*/
private httpMessageToIter;
}
export default HttpRequest;
91 changes: 91 additions & 0 deletions dist/HttpRequest.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/HttpRequest.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions dist/Polykey.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/// <reference types="node" />
import fs from 'fs';
import KeyManager from './keys/KeyManager';
import PeerManager from './peers/PeerManager';
import VaultManager from './vaults/VaultManager';
declare class Polykey {
polykeyPath: string;
vaultManager: VaultManager;
keyManager: KeyManager;
peerManager: PeerManager;
private gitServer;
constructor(polykeyPath: string | undefined, fileSystem: typeof fs, keyManager?: KeyManager, vaultManager?: VaultManager, peerManager?: PeerManager);
}
export default Polykey;
26 changes: 26 additions & 0 deletions dist/Polykey.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/Polykey.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/bin/pk.js

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions dist/git/GitServer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { Address } from '../peers/PeerInfo';
import VaultManager from '../vaults/VaultManager';
declare class GitServer {
private polykeyPath;
private vaultManager;
private server;
address: Address;
constructor(polykeyPath: string, vaultManager: VaultManager, port?: number);
/**
* Find out whether vault exists.
* @param vaultName Name of vault to check
* @param publicKey Public key of peer trying to access vault
*/
private exists;
/**
* Handle incoming info or pack requests and delegates to respective functions
* @param req Incoming http message
* @param res Outgoing server response
*/
private handle;
/**
* Returns a not found response
* @param res Outgoing server response
*/
private notFoundResponse;
/**
* Handles a request for remote info
* @param req Incoming http message
* @param res Outgoing server response
*/
private handleInfoRequest;
/**
* Handles a requests for packfiles
* @param req Incoming http message
* @param res Outgoing server response
*/
private handlePackRequest;
/**
* Sends http response containing git info about the particular vault
* @param vaultName Name of the requested vault
* @param service The type of service requested, either upload-pack or recieve-pack
* @param res Outgoing server response
*/
private infoResponse;
/**
* Adds headers to the response object to add cache control
* @param res Outgoing server response
*/
private noCache;
/**
* Encodes a string into a git packet line by prefixing the hexadecimal length of the line
* @param line The line to be encoded
*/
private createGitPacketLine;
/**
* Handles the response to a git packfile request
* @param vaultName Name of the requested vault
* @param vaultPath Path to the target vault
* @param service The type of service requested, either upload-pack or recieve-pack
* @param res Outgoing server response
*/
private uploadPackRespond;
}
export default GitServer;
Loading

0 comments on commit ea79a5d

Please sign in to comment.