repository-provider 26.7.0 → 26.7.4

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/README.md CHANGED
@@ -125,6 +125,7 @@ console.log(await readme.getString());
125
125
  * [pullRequests](#pullrequests)
126
126
  * [Parameters](#parameters-27)
127
127
  * [name](#name)
128
+ * [fullName](#fullname)
128
129
  * [provider](#provider-1)
129
130
  * [url](#url)
130
131
  * [toJSON](#tojson)
@@ -203,7 +204,7 @@ console.log(await readme.getString());
203
204
  * [PullRequest](#pullrequest)
204
205
  * [Parameters](#parameters-52)
205
206
  * [Properties](#properties-7)
206
- * [fullName](#fullname)
207
+ * [fullName](#fullname-1)
207
208
  * [url](#url-2)
208
209
  * [repository](#repository-1)
209
210
  * [provider](#provider-2)
@@ -245,7 +246,7 @@ console.log(await readme.getString());
245
246
  * [entry](#entry)
246
247
  * [Parameters](#parameters-62)
247
248
  * [owner](#owner)
248
- * [fullName](#fullname-1)
249
+ * [fullName](#fullname-2)
249
250
  * [fullCondensedName](#fullcondensedname)
250
251
  * [identifier](#identifier-1)
251
252
  * [issuesURL](#issuesurl)
@@ -260,6 +261,7 @@ console.log(await readme.getString());
260
261
  * [RepositoryGroup](#repositorygroup-1)
261
262
  * [Parameters](#parameters-63)
262
263
  * [Properties](#properties-9)
264
+ * [fullName](#fullname-3)
263
265
  * [attributeMapping](#attributemapping-1)
264
266
  * [type](#type)
265
267
  * [url](#url-3)
@@ -268,7 +270,7 @@ console.log(await readme.getString());
268
270
  * [Repository](#repository-2)
269
271
  * [Parameters](#parameters-65)
270
272
  * [Properties](#properties-10)
271
- * [fullName](#fullname-2)
273
+ * [fullName](#fullname-4)
272
274
  * [slug](#slug)
273
275
  * [provider](#provider-3)
274
276
  * [identifier](#identifier-2)
@@ -806,6 +808,10 @@ Deliver the provider name.
806
808
 
807
809
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** class name by default
808
810
 
811
+ ### fullName
812
+
813
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name
814
+
809
815
  ### provider
810
816
 
811
817
  We are our own provider.
@@ -1549,6 +1555,10 @@ Abstract repository collection.
1549
1555
  * `provider` **[BaseProvider](#baseprovider)**
1550
1556
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1551
1557
 
1558
+ ### fullName
1559
+
1560
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name with owner name
1561
+
1552
1562
  ### attributeMapping
1553
1563
 
1554
1564
  Map attributes between external and internal representation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "26.7.0",
3
+ "version": "26.7.4",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -36,7 +36,7 @@
36
36
  "ava": "^4.0.1",
37
37
  "c8": "^7.11.0",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.12.1",
39
+ "repository-provider-test-support": "^1.12.4",
40
40
  "semantic-release": "^19.0.2",
41
41
  "typescript": "^4.6.0-dev.20220207"
42
42
  },
package/src/attribute.mjs CHANGED
@@ -49,7 +49,7 @@ export function definePropertiesFromOptions(
49
49
 
50
50
  if (value === undefined) {
51
51
  if (attribute.getDefault) {
52
- value = attribute.getDefault(attribute, object);
52
+ value = attribute.getDefault(attribute, object, properties);
53
53
  } else if (
54
54
  attribute.default !== undefined &&
55
55
  attribute.default !== getAttribute(object, name)
@@ -155,7 +155,7 @@ export function setAttribute(object, name, value) {
155
155
  export function getAttribute(object, name) {
156
156
  let value = object;
157
157
 
158
- if(value && value[name] !== undefined) {
158
+ if (value && value[name] !== undefined) {
159
159
  return value[name];
160
160
  }
161
161
 
@@ -34,6 +34,14 @@ export class NamedObject extends BaseObject {
34
34
  return this.name;
35
35
  }
36
36
 
37
+ /**
38
+ * @return {string} name with owner name
39
+ */
40
+ get fullName()
41
+ {
42
+ return this.owner.name + "/" + this.name;
43
+ }
44
+
37
45
  toString() {
38
46
  return this.name;
39
47
  }
package/src/project.mjs CHANGED
@@ -8,4 +8,6 @@ export class Project extends NamedObject {
8
8
  super(name, options, {
9
9
  owner: { value: owner }
10
10
  });
11
+
12
+ owner._addProject(this);
11
13
  }}
@@ -49,14 +49,6 @@ export class RepositoryGroup extends RepositoryOwner(NamedObject) {
49
49
  });
50
50
  }
51
51
 
52
- /**
53
- * @return {string} name with owner name
54
- */
55
- get fullName()
56
- {
57
- return this.owner.name + "/" + this.name;
58
- }
59
-
60
52
  get owner()
61
53
  {
62
54
  return this.provider;