This repository was archived by the owner on Mar 11, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +17
-3
lines changed
Expand file tree Collapse file tree 3 files changed +17
-3
lines changed Original file line number Diff line number Diff line change 11# UNRELEASED
22- [ NEW] Added option for client to authenticate with IAM token server.
3+ - [ FIXED] Add ` vcapServiceName ` configuration option to TS declarations.
34- [ FIXED] Case where ` .resume() ` was called on an undefined response.
5+ - [ FIXED] Updated the default IAM token server URL.
46- [ BREAKING CHANGE] Nano 7 accepted a callback to the ` *AsStream ` functions, but
57 the correct behaviour when using the ` request ` object from ` *AsStream `
68 functions is to use event handlers. Users of the ` *AsStream ` functions should
79 ensure they are using event handlers not callbacks before moving to this
810 version.
911- [ UPGRADED] Apache CouchDB Nano to a minimum of version 8 for ` *AsStream `
1012 function fixes.
11- - [ FIXED] Updated the default IAM token server URL.
1213
1314# 3.0.2 (2019-01-07)
1415- [ FIXED] Remove unnecessary ` @types/nano ` dependancy.
Original file line number Diff line number Diff line change 1- // Copyright © 2018 IBM Corp. All rights reserved.
1+ // Copyright © 2018, 2019 IBM Corp. All rights reserved.
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -33,6 +33,7 @@ declare namespace cloudant {
3333 password ?: string ;
3434 vcapInstanceName ?: string ;
3535 vcapServices ?: string ;
36+ vcapServiceName ?: string ;
3637 url ?: string ;
3738 cookie ?: string ;
3839 requestDefaults ?: CoreOptions ;
Original file line number Diff line number Diff line change 1- // Copyright © 2018 IBM Corp. All rights reserved.
1+ // Copyright © 2018, 2019 IBM Corp. All rights reserved.
22//
33// Licensed under the Apache License, Version 2.0 (the "License");
44// you may not use this file except in compliance with the License.
@@ -28,6 +28,18 @@ const config: cloudant.Configuration = {
2828
2929const cfgInstance = cloudant ( config ) ;
3030
31+ /*
32+ * Instantiate with VCAP configuration object
33+ */
34+
35+ const vcapConfig : cloudant . Configuration = {
36+ vcapInstanceName : 'foo' ,
37+ vcapServiceName : 'cloudantXYZ' ,
38+ vcapServices : JSON . parse ( process . env . VCAP_SERVICES || '{}' )
39+ } ;
40+
41+ const vcapInstance = cloudant ( vcapConfig ) ;
42+
3143/*
3244 * Run Initialization Callback
3345 */
You can’t perform that action at this time.
0 commit comments