oci-devops 2.99.0 → 2.100.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.d.ts
CHANGED
|
@@ -36,6 +36,7 @@ export declare class DevopsClient {
|
|
|
36
36
|
protected "_region": common.Region;
|
|
37
37
|
protected _lastSetRegionOrRegionId: string;
|
|
38
38
|
protected _httpClient: common.HttpClient;
|
|
39
|
+
protected _authProvider: common.AuthenticationDetailsProvider | undefined;
|
|
39
40
|
constructor(params: common.AuthParams, clientConfiguration?: common.ClientConfiguration);
|
|
40
41
|
/**
|
|
41
42
|
* Get the endpoint that is being used to call (ex, https://www.example.com).
|
|
@@ -85,6 +86,10 @@ export declare class DevopsClient {
|
|
|
85
86
|
* Shutdown the circuit breaker used by the client when it is no longer needed
|
|
86
87
|
*/
|
|
87
88
|
shutdownCircuitBreaker(): void;
|
|
89
|
+
/**
|
|
90
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
91
|
+
*/
|
|
92
|
+
closeProvider(): void;
|
|
88
93
|
/**
|
|
89
94
|
* Close the client once it is no longer needed
|
|
90
95
|
*/
|
package/lib/client.js
CHANGED
|
@@ -69,6 +69,7 @@ class DevopsClient {
|
|
|
69
69
|
const requestSigner = params.authenticationDetailsProvider
|
|
70
70
|
? new common.DefaultRequestSigner(params.authenticationDetailsProvider)
|
|
71
71
|
: null;
|
|
72
|
+
this._authProvider = params.authenticationDetailsProvider;
|
|
72
73
|
if (clientConfiguration) {
|
|
73
74
|
this._clientConfiguration = clientConfiguration;
|
|
74
75
|
this._circuitBreaker = clientConfiguration.circuitBreaker
|
|
@@ -190,11 +191,21 @@ class DevopsClient {
|
|
|
190
191
|
this._circuitBreaker.shutdown();
|
|
191
192
|
}
|
|
192
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* Close the provider if possible which in turn shuts down any associated circuit breaker
|
|
196
|
+
*/
|
|
197
|
+
closeProvider() {
|
|
198
|
+
if (this._authProvider) {
|
|
199
|
+
if (this._authProvider instanceof common.AbstractRequestingAuthenticationDetailsProvider)
|
|
200
|
+
(this._authProvider).closeProvider();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
193
203
|
/**
|
|
194
204
|
* Close the client once it is no longer needed
|
|
195
205
|
*/
|
|
196
206
|
close() {
|
|
197
207
|
this.shutdownCircuitBreaker();
|
|
208
|
+
this.closeProvider();
|
|
198
209
|
}
|
|
199
210
|
/**
|
|
200
211
|
* Submit stage approval.
|