Skip to content
This repository was archived by the owner on Oct 20, 2020. It is now read-only.

Commit

Permalink
chore(): upgrade to ts 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
kenshyx committed Sep 26, 2016
1 parent 0e6ed17 commit 562246a
Show file tree
Hide file tree
Showing 23 changed files with 140 additions and 6,747 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,4 @@ jspm_packages
bin
.idea
docs
src/*.js
5 changes: 3 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
typings
*.ts
!*.d.ts
.idea
coverage
tests
Expand All @@ -8,5 +9,5 @@ tslint.json
typings.json
bin
docs
node_modules
*.log
*.map
*.logs
14 changes: 12 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
language: node_js
node_js:
- "6.1"
- "6.3"
before_script:
- tsc -p tsconfig.json
after_script:
- npm run coveralls
- npm run coveralls
env:
- CXX=g++-4.8
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-4.8
5 changes: 5 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference path="typings/main.d.ts" />
export { IpfsConnector } from './src/IpfsConnector';
export { IpfsApiHelper } from './src/IpfsApiHelper';
export { IpfsBin } from './src/IpfsBin';
export { events as ipfsEvents } from './src/constants';
9 changes: 0 additions & 9 deletions index.js

This file was deleted.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
"url": "https://github.com/AkashaProject/ipfs-connector/issues"
},
"dependencies": {
"@types/bluebird": "3.0.33",
"@types/node": "6.0.41",
"bin-wrapper": "3.0.2",
"bluebird": "3.4.6",
"ipfs-api": "9.0.0",
Expand All @@ -42,8 +44,8 @@
"rimraf": "2.5.4",
"standard-version": "2.4.0",
"tslint": "3.15.1",
"typescript": "1.8.10",
"typings": "1.3.3"
"typescript": "2.0.3",
"typings": "1.4.0"
},
"homepage": "https://github.com/AkashaProject/ipfs-connector#readme",
"directories": {
Expand Down
20 changes: 20 additions & 0 deletions src/IpfsApiHelper.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/// <reference path="../typings/main.d.ts" />
/// <reference types="node" />
/// <reference types="bluebird" />
import * as Promise from 'bluebird';
export declare class IpfsApiHelper {
apiClient: any;
OBJECT_MAX_SIZE: number;
REQUEST_TIMEOUT: number;
LINK_SYMBOL: string;
constructor(provider: any);
add(data: Object | Buffer): any;
addFile(dataBuffer: Buffer): any;
get(objectHash: string): any;
getObject(objectHash: string): any;
getFile(hash: string): Promise<{}>;
private _getStats(objectHash);
updateObject(hash: string, newData: Object): any;
resolve(path: string): any;
constructObjLink(data: any): any;
}
169 changes: 0 additions & 169 deletions src/IpfsApiHelper.js

This file was deleted.

11 changes: 11 additions & 0 deletions src/IpfsBin.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// <reference path="../typings/main.d.ts" />
/// <reference types="bluebird" />
import * as Promise from 'bluebird';
import Wrapper = require('bin-wrapper');
export declare class IpfsBin {
wrapper: Wrapper;
constructor(target?: string);
getPath(): string;
check(): Promise<{}>;
deleteBin(): Promise<{}>;
}
39 changes: 0 additions & 39 deletions src/IpfsBin.js

This file was deleted.

54 changes: 54 additions & 0 deletions src/IpfsConnector.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
/// <reference path="../typings/main.d.ts" />
/// <reference types="node" />
/// <reference types="bluebird" />
import * as Promise from 'bluebird';
import { IpfsApiHelper } from './IpfsApiHelper';
import { EventEmitter } from 'events';
export declare class IpfsConnector extends EventEmitter {
private process;
private downloadManager;
options: {
retry: boolean;
apiAddress: string;
args: string[];
executable: string;
extra: {
env: {} & {
IPFS_PATH: string;
};
detached: boolean;
};
};
serviceStatus: {
api: boolean;
process: boolean;
};
private _callbacks;
private logger;
private _api;
constructor(enforcer: Symbol);
static getInstance(): IpfsConnector;
readonly api: IpfsApiHelper;
setLogger(logger: {}): void;
setBinPath(path: string): void;
setConfig(option: string, value: string): void;
setIpfsFolder(target: string): void;
checkExecutable(): Promise<{}>;
start(): Promise<boolean>;
private _start();
private _attachStartingEvents();
private _flushStartingEvents();
private _pipeStd();
stop(signal?: string): this;
private _init();
getPorts(): {
gateway: number;
api: number;
swarm: number;
};
setPorts(ports: {
gateway?: number;
api?: number;
swarm?: number;
}, restart?: boolean): Promise<any>;
}
Loading

0 comments on commit 562246a

Please sign in to comment.