Skip to content

Commit 92f6303

Browse files
Merge pull request #260 from xcomponent/fixapilist
fix api list
2 parents eed0aea + cc4479a commit 92f6303

File tree

6 files changed

+24
-25
lines changed

6 files changed

+24
-25
lines changed

.travis.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
language: node_js
22
node_js:
3-
- '8'
4-
- '10'
5-
sudo: false
3+
- '18'
4+
- '20'
65
os:
7-
- linux
6+
- linux
87
cache:
98
directories:
10-
- node_modules
9+
- node_modules
1110
install:
12-
- yarn install
11+
- yarn install
1312
script:
14-
- yarn run lint
15-
- yarn run test --coverage
16-
- yarn build
13+
- yarn run lint
14+
- yarn run test --coverage
15+
- yarn build
1716
deploy:
1817
- provider: npm
1918
email: dev@xcomponent.com

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"tslint-loader": "^3.6.0",
103103
"tslint-plugin-prettier": "^2.0.0",
104104
"tslint-react": "^3.6.0",
105-
"typescript": "^3.0.1"
105+
"typescript": "^5.8.2"
106106
},
107107
"husky": {
108108
"hooks": {

src/communication/WebSocketBridgeCommunication.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export class WebSocketBridgeCommunication {
3737
});
3838
let commandData = {
3939
Command: command,
40-
Data: {}
40+
Data: {},
4141
};
4242
let input = thisWebSocketBridgeCommunication.serializer.convertCommandDataToWebsocketInputFormat(commandData);
4343
this.heartbeatTimer = setInterval(() => {
@@ -71,7 +71,7 @@ export class WebSocketBridgeCommunication {
7171
});
7272
const commandData = {
7373
Command: command,
74-
Data: { Name: apiName }
74+
Data: { Name: apiName },
7575
};
7676
const input = thisWebSocketBridgeCommunication.serializer.convertCommandDataToWebsocketInputFormat(commandData);
7777
this.webSocket.send(input);
@@ -86,7 +86,7 @@ export class WebSocketBridgeCommunication {
8686
filter((data: DeserializedData) => data.command === command),
8787
first(),
8888
map((data: DeserializedData) => {
89-
this.logger.info('ApiList received successfully');
89+
this.logger.info('ApiList received successfully : ' + JSON.stringify(data));
9090
return thisWebSocketBridgeCommunication.deserializer.getJsonDataFromGetXcApiListRequest(
9191
data.stringData
9292
);
@@ -95,7 +95,7 @@ export class WebSocketBridgeCommunication {
9595
.toPromise();
9696
const commandData = {
9797
Command: command,
98-
Data: {}
98+
Data: {},
9999
};
100100
this.webSocket.send(
101101
thisWebSocketBridgeCommunication.serializer.convertCommandDataToWebsocketInputFormat(commandData)
@@ -127,7 +127,7 @@ export class WebSocketBridgeCommunication {
127127
});
128128
const commandData = {
129129
Command: command,
130-
Data: { Name: apiName }
130+
Data: { Name: apiName },
131131
};
132132
this.webSocket.send(
133133
thisWebSocketBridgeCommunication.serializer.convertCommandDataToWebsocketInputFormat(commandData)

src/communication/xcomponentMessages.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ export interface DeserializedData {
6666

6767
export let getHeaderWithIncomingType = (): Header => {
6868
return {
69-
IncomingEventType: 0
69+
IncomingEventType: 0,
7070
};
7171
};
7272

@@ -96,15 +96,15 @@ export class Deserializer {
9696
components.push({
9797
name: component.Name,
9898
model: this.decodeServerMessage(component.Model)!,
99-
graphical: this.decodeServerMessage(component.Graphical)
99+
graphical: this.decodeServerMessage(component.Graphical),
100100
});
101101
}
102102
}
103103
if (jsonData.ModelContent.Composition) {
104104
return {
105105
projectName: jsonData.ModelContent.ProjectName,
106106
components: components,
107-
composition: this.decodeServerMessage(jsonData.ModelContent.Composition)!
107+
composition: this.decodeServerMessage(jsonData.ModelContent.Composition)!,
108108
};
109109
}
110110

@@ -139,7 +139,7 @@ export class Deserializer {
139139

140140
public getJsonDataFromGetXcApiListRequest(data: string): Array<string> {
141141
let jsonData = this.getJsonData(data);
142-
return jsonData.Apis;
142+
return jsonData.Apis.$values;
143143
}
144144

145145
// tslint:disable-next-line:no-any
@@ -159,7 +159,7 @@ export class Deserializer {
159159
return {
160160
command: command,
161161
topic: topic,
162-
stringData: stringData
162+
stringData: stringData,
163163
};
164164
}
165165

@@ -170,7 +170,7 @@ export class Deserializer {
170170
return {
171171
command: command,
172172
topic: undefined,
173-
stringData: stringData
173+
stringData: stringData,
174174
};
175175
}
176176
}

tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"noImplicitThis": true,
2020
"noImplicitAny": false,
2121
"strictNullChecks": true,
22-
"suppressImplicitAnyIndexErrors": true,
2322
"noUnusedLocals": true,
2423
"skipLibCheck": true
2524
},

yarn.lock

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5205,9 +5205,10 @@ typedarray-to-buffer@^3.1.5:
52055205
dependencies:
52065206
is-typedarray "^1.0.0"
52075207

5208-
typescript@^3.0.1:
5209-
version "3.3.3"
5210-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.3.3.tgz#f1657fc7daa27e1a8930758ace9ae8da31403221"
5208+
typescript@^5.8.2:
5209+
version "5.8.2"
5210+
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.2.tgz#8170b3702f74b79db2e5a96207c15e65807999e4"
5211+
integrity sha512-aJn6wq13/afZp/jT9QZmwEjDqqvSGp1VT5GVg+f/t6/oVyrgXM6BY1h9BRh/O5p3PlUPAe+WuiEZOmb/49RqoQ==
52115212

52125213
uglify-js@^3.1.4:
52135214
version "3.7.3"

0 commit comments

Comments
 (0)