Skip to content

Commit 7cdac29

Browse files
committed
Draft for packaging
Creation of a package.json to eventually publish on npm Signed-off-by: Simon Delisle <simon.delisle@ericsson.com>
1 parent 764b433 commit 7cdac29

File tree

4 files changed

+40
-4
lines changed

4 files changed

+40
-4
lines changed

compile.tsconfig.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"extends": "../../configs/base.tsconfig",
3+
"compilerOptions": {
4+
"rootDir": "src",
5+
"outDir": "lib"
6+
},
7+
"include": [
8+
"src"
9+
]
10+
}

package.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "tsp-typescript-client",
3+
"version": "0.0.0",
4+
"description": "Trace Server Protocol client written in TypeScript",
5+
"author": "Ericsson and others",
6+
"publishConfig": {
7+
"access": "public"
8+
},
9+
"keywords": [
10+
"tsp",
11+
"trace server protocol",
12+
"tracing",
13+
"trace"
14+
],
15+
"license": "Apache-2.0",
16+
"repository": {
17+
"type": "git",
18+
"url": "https://github.com/theia-ide/tsp-typescript-client"
19+
},
20+
"bugs": {
21+
"url": "https://github.com/theia-ide/tsp-typescript-client/issues"
22+
},
23+
"homepage": "https://github.com/theia-ide/tsp-typescript-client",
24+
"files": [
25+
"lib"
26+
]
27+
}

src/models/response/timegraph-response.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616

1717
import { EntryHeader } from '../tree';
1818
import { GenericEntryResponse } from './entry-response';
19-
import { TimeGraphEntry, TimeGraphRow } from '../timegraph';
20-
import { GenericResponse } from './responses';
19+
import { TimeGraphEntry } from '../timegraph';
2120

2221
/**
2322
* Time graph specific entry response extends the GenericEntryResponse.

src/protocol/rest-client.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class RestClient {
3737
* @param parameters Query parameters. The string should be in this format: key1=value1&key2=value2
3838
*/
3939
public static async get(url: string, parameters?: string): Promise<any> {
40-
const getUrl = parameters.length > 0 ? url + '?' + parameters : url;
40+
const getUrl = parameters !== undefined && parameters.length > 0 ? url + '?' + parameters : url;
4141
return this.performRequest('get', getUrl);
4242
}
4343

@@ -65,7 +65,7 @@ export class RestClient {
6565
* @param parameters Query parameters. The string should be in this format: key1=value1&key2=value2
6666
*/
6767
public static async delete(url: string, parameters?: string): Promise<any> {
68-
const deleteUrl = parameters.length > 0 ? url + '?' + parameters : url;
68+
const deleteUrl = parameters !== undefined && parameters.length > 0 ? url + '?' + parameters : url;
6969
return this.performRequest('delete', deleteUrl);
7070
}
7171
}

0 commit comments

Comments
 (0)