repository-provider
Advanced tools
Comparing version 7.2.1 to 7.2.2
@@ -15,6 +15,6 @@ 'use strict'; | ||
* @param {Object} object target object | ||
* @param {Object} options | ||
* @param {Object} properties object properties | ||
* @param {Object} options | ||
*/ | ||
function definePropertiesFromOptions(object, properties, options) { | ||
function definePropertiesFromOptions(object, options, properties = {}) { | ||
const defaultOptions = object.constructor.defaultOptions; | ||
@@ -92,7 +92,7 @@ const after = {}; | ||
this, | ||
options, | ||
{ | ||
name: { value: name }, | ||
repository: { value: repository } | ||
}, | ||
options | ||
} | ||
); | ||
@@ -359,2 +359,3 @@ | ||
this, | ||
options, | ||
{ | ||
@@ -365,4 +366,3 @@ name: { value: name }, | ||
_pullRequests: { value: new Map() } | ||
}, | ||
options | ||
} | ||
); | ||
@@ -908,3 +908,3 @@ } | ||
definePropertiesFromOptions(this, properties, options); | ||
definePropertiesFromOptions(this, options, properties); | ||
@@ -980,5 +980,8 @@ destination.addPullRequest(this); | ||
constructor() { | ||
Object.defineProperties(this, { | ||
repositories: { value: new Map() } | ||
}); | ||
Object.defineProperties( | ||
this, | ||
{ | ||
repositories: { value: new Map() } | ||
} | ||
); | ||
} | ||
@@ -1123,7 +1126,7 @@ | ||
this, | ||
options, | ||
{ | ||
name: { value: name }, | ||
provider: { value: provider } | ||
}, | ||
options | ||
} | ||
); | ||
@@ -1169,14 +1172,5 @@ } | ||
* @property {Map<string,RepositoryGroup>} repositoryGroups | ||
* @property {Object} config | ||
*/ | ||
class Provider extends Owner { | ||
/** | ||
* Default configuration options | ||
* @return {Object} | ||
*/ | ||
static get defaultOptions() { | ||
return {}; | ||
} | ||
/** | ||
* Extract options suitable for the constructor | ||
@@ -1191,11 +1185,2 @@ * form the given set of environment variables | ||
/** | ||
* Pepare configuration by mixing together defaultOptions with actual options | ||
* @param {Object} config raw config | ||
* @return {Object} combined options | ||
*/ | ||
static options(config) { | ||
return Object.assign(this.defaultOptions, config); | ||
} | ||
constructor(options) { | ||
@@ -1206,10 +1191,6 @@ super(); | ||
this, | ||
options, | ||
{ | ||
config: { | ||
// TODO ret rid of config | ||
value: this.constructor.options(options) | ||
}, | ||
repositoryGroups: { value: new Map() } | ||
}, | ||
options | ||
} | ||
); | ||
@@ -1216,0 +1197,0 @@ } |
{ | ||
"name": "repository-provider", | ||
"version": "7.2.1", | ||
"version": "7.2.2", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -61,7 +61,4 @@ [![npm](https://img.shields.io/npm/v/repository-provider.svg)](https://www.npmjs.com/package/repository-provider) | ||
- [provider](#provider-1) | ||
- [defaultOptions](#defaultoptions) | ||
- [optionsFromEnvironment](#optionsfromenvironment) | ||
- [Parameters](#parameters-5) | ||
- [options](#options) | ||
- [Parameters](#parameters-6) | ||
@@ -81,3 +78,2 @@ ## Provider | ||
- `repositoryGroups` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String), RepositoryGroup>** | ||
- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
@@ -151,8 +147,2 @@ ### repositoryGroup | ||
### defaultOptions | ||
Default configuration options | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** | ||
### optionsFromEnvironment | ||
@@ -169,12 +159,2 @@ | ||
### options | ||
Pepare configuration by mixing together defaultOptions with actual options | ||
#### Parameters | ||
- `config` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** raw config | ||
Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** combined options | ||
# install | ||
@@ -181,0 +161,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
69750
2312
167