@taskcluster/client 105.0.0 → 105.1.0
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/package.json +1 -1
- package/src/client.js +5 -1
package/package.json
CHANGED
package/src/client.js
CHANGED
|
@@ -247,6 +247,10 @@ export const createClient = (reference, name) => {
|
|
|
247
247
|
throw new Error('options.randomizationFactor must be between 0 and 1!');
|
|
248
248
|
}
|
|
249
249
|
|
|
250
|
+
if (this._options.authorizedScopes != null && !Array.isArray(this._options.authorizedScopes)) {
|
|
251
|
+
throw new Error('options.authorizedScopes must be an array of scopes');
|
|
252
|
+
}
|
|
253
|
+
|
|
250
254
|
if (this._options.agent) {
|
|
251
255
|
// We have explicit options for new agent create one...
|
|
252
256
|
this._httpAgent = {
|
|
@@ -286,7 +290,7 @@ export const createClient = (reference, name) => {
|
|
|
286
290
|
|
|
287
291
|
// If set of authorized scopes is provided, we'll restrict the request
|
|
288
292
|
// to only use these scopes
|
|
289
|
-
if (
|
|
293
|
+
if (this._options.authorizedScopes) {
|
|
290
294
|
ext.authorizedScopes = this._options.authorizedScopes;
|
|
291
295
|
}
|
|
292
296
|
|