Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e25fae2

Browse files
chore: bump up dependencies and fix lint issues
1 parent 12af882 commit e25fae2

File tree

6 files changed

+1113
-988
lines changed

6 files changed

+1113
-988
lines changed

.travis.yml

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,29 @@
11
language: node_js
22
dist: trusty
33
sudo: required
4-
node_js: 8
4+
node_js: '8'
55
script:
6-
- npm run test
6+
- npm run test
77

88
cache:
99
directories:
10-
- node_modules
10+
- node_modules
1111
env:
1212
global:
13-
- BX_APP=speech-to-text-demo
14-
- BX_API=https://api.ng.bluemix.net
15-
- BX_ORGANIZATION=WatsonPlatformServices
16-
- BX_SPACE=demos
13+
- BX_APP=speech-to-text-demo
14+
- BX_API=https://api.ng.bluemix.net
15+
- BX_ORGANIZATION=WatsonPlatformServices
16+
- BX_SPACE=demos
1717
before_deploy: npm install -g bx-blue-green
1818
deploy:
19-
- provider: script
20-
skip_cleanup: true
21-
script:
22-
- bx-blue-green-travis
23-
on:
24-
branch: master
25-
repo: watson-developer-cloud/speech-to-text-nodejs
26-
- provider: script
27-
skip_cleanup: true
28-
script: npx semantic-release
29-
on:
30-
node: 8
31-
19+
- provider: script
20+
skip_cleanup: true
21+
script: bx-blue-green-travis
22+
on:
23+
branch: master
24+
repo: watson-developer-cloud/speech-to-text-nodejs
25+
- provider: script
26+
skip_cleanup: true
27+
script: npx semantic-release
28+
on:
29+
node: 8

app.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@
1414
* limitations under the License.
1515
*/
1616

17-
1817
const express = require('express');
1918

2019
const app = express();
21-
const SpeechToTextV1 = require('watson-developer-cloud/speech-to-text/v1');
22-
const AuthorizationV1 = require('watson-developer-cloud/authorization/v1');
23-
const IamTokenManagerV1 = require('watson-developer-cloud/iam-token-manager/v1');
20+
const SpeechToTextV1 = require('ibm-watson/speech-to-text/v1');
21+
const AuthorizationV1 = require('ibm-watson/authorization/v1');
22+
const IamTokenManagerV1 = require('ibm-watson/iam-token-manager/v1');
2423

2524
// Bootstrap application settings
2625
require('./config/express')(app);
@@ -43,7 +42,7 @@ if (process.env.SPEECH_TO_TEXT_IAM_APIKEY && process.env.SPEECH_TO_TEXT_IAM_APIK
4342
password: process.env.SPEECH_TO_TEXT_PASSWORD || '<password>',
4443
url: serviceUrl,
4544
});
46-
tokenManager = new AuthorizationV1(speechService.getCredentials());
45+
tokenManager = new AuthorizationV1(speechService.getServiceCredentials());
4746
}
4847

4948
app.get('/', (req, res) => res.render('index'));

casper-runner.js

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
/**
2-
* Copyright 2015 IBM Corp. All Rights Reserved.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
2+
* Copyright 2015 IBM Corp. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
1616
require('dotenv').config({ silent: true });
1717

18-
if (!process.env.SPEECH_TO_TEXT_USERNAME) {
19-
console.log('Skipping integration tests because SPEECH_TO_TEXT_USERNAME is null');
18+
if (!process.env.SPEECH_TO_TEXT_IAM_APIKEY && !process.env.SPEECH_TO_TEXT_USERNAME) {
19+
console.log(
20+
'Skipping integration tests because SPEECH_TO_TEXT_IAM_APIKEY and SPEECH_TO_TEXT_USERNAME are null',
21+
);
2022
process.exit(0);
2123
}
2224

0 commit comments

Comments
 (0)