repository-provider 31.0.1 → 31.1.2

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
@@ -74,6 +74,7 @@ console.log(await readme.getString());
74
74
  * [equals](#equals)
75
75
  * [Parameters](#parameters-8)
76
76
  * [provider](#provider)
77
+ * [api](#api)
77
78
  * [trace](#trace)
78
79
  * [Parameters](#parameters-9)
79
80
  * [info](#info)
@@ -200,6 +201,7 @@ console.log(await readme.getString());
200
201
  * [Parameters](#parameters-44)
201
202
  * [fullName](#fullname-1)
202
203
  * [toJSON](#tojson-1)
204
+ * [attributes](#attributes-1)
203
205
  * [OwnedObject](#ownedobject)
204
206
  * [Parameters](#parameters-45)
205
207
  * [equals](#equals-3)
@@ -257,7 +259,7 @@ console.log(await readme.getString());
257
259
  * [isArchived](#isarchived)
258
260
  * [isDisabled](#isdisabled)
259
261
  * [isProtected](#isprotected)
260
- * [attributes](#attributes-1)
262
+ * [attributes](#attributes-2)
261
263
  * [isProtected](#isprotected-1)
262
264
  * [RepositoryGroup](#repositorygroup-1)
263
265
  * [Parameters](#parameters-56)
@@ -265,6 +267,7 @@ console.log(await readme.getString());
265
267
  * [attributeMapping](#attributemapping-1)
266
268
  * [type](#type-1)
267
269
  * [url](#url-3)
270
+ * [url](#url-4)
268
271
  * [RepositoryOwner](#repositoryowner)
269
272
  * [Parameters](#parameters-57)
270
273
  * [Repository](#repository-3)
@@ -280,12 +283,9 @@ console.log(await readme.getString());
280
283
  * [Parameters](#parameters-61)
281
284
  * [commits](#commits)
282
285
  * [Parameters](#parameters-62)
283
- * [urls](#urls)
284
- * [url](#url-4)
285
286
  * [cloneURL](#cloneurl)
286
287
  * [issuesURL](#issuesurl-1)
287
288
  * [homePageURL](#homepageurl-2)
288
- * [condensedName](#condensedname)
289
289
  * [isArchived](#isarchived-1)
290
290
  * [isLocked](#islocked-1)
291
291
  * [isDisabled](#isdisabled-1)
@@ -329,9 +329,8 @@ console.log(await readme.getString());
329
329
  * [refId](#refid-1)
330
330
  * [Parameters](#parameters-78)
331
331
  * [toJSON](#tojson-2)
332
- * [attributes](#attributes-2)
332
+ * [attributes](#attributes-3)
333
333
  * [defaultBranchName](#defaultbranchname)
334
- * [urls](#urls-1)
335
334
  * [issuesURL](#issuesurl-2)
336
335
  * [Review](#review)
337
336
  * [SingleGroupProvider](#singlegroupprovider)
@@ -537,6 +536,12 @@ The provider we live in.
537
536
 
538
537
  Returns **[BaseProvider](#baseprovider)**
539
538
 
539
+ ### api
540
+
541
+ API as given by the owner.
542
+
543
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** url
544
+
540
545
  ### trace
541
546
 
542
547
  Forwarded to the owner.
@@ -1196,6 +1201,10 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1196
1201
 
1197
1202
  Provided name and all defined attributes.
1198
1203
 
1204
+ ### attributes
1205
+
1206
+ options
1207
+
1199
1208
  ## OwnedObject
1200
1209
 
1201
1210
  **Extends NamedObject**
@@ -1576,6 +1585,12 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1576
1585
 
1577
1586
  api url
1578
1587
 
1588
+ ## url
1589
+
1590
+ URL of the repository
1591
+
1592
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1593
+
1579
1594
  ## RepositoryOwner
1580
1595
 
1581
1596
  Mixin to define a class able to handle a collection of repositories.
@@ -1663,18 +1678,6 @@ List commits of the default branch.
1663
1678
 
1664
1679
  Returns **AsyncIterator<[Commit](#commit)>** all matching commits in the repository
1665
1680
 
1666
- ### urls
1667
-
1668
- Urls to access the repo.
1669
-
1670
- Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
1671
-
1672
- ### url
1673
-
1674
- Preffered url to access the repo.
1675
-
1676
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1677
-
1678
1681
  ### cloneURL
1679
1682
 
1680
1683
  The url used for cloning the repo.
@@ -1693,12 +1696,6 @@ The url of home page.
1693
1696
 
1694
1697
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1695
1698
 
1696
- ### condensedName
1697
-
1698
- Name without owner.
1699
-
1700
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name
1701
-
1702
1699
  ### isArchived
1703
1700
 
1704
1701
  By default we are not archived.
@@ -1937,12 +1934,6 @@ The name of the default branch
1937
1934
 
1938
1935
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1939
1936
 
1940
- ## urls
1941
-
1942
- URLs of the repository
1943
-
1944
- Returns **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**
1945
-
1946
1937
  ## issuesURL
1947
1938
 
1948
1939
  The url of issue tracking system.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "31.0.1",
3
+ "version": "31.1.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -5,7 +5,6 @@ import { definePropertiesFromOptions, mapAttributes } from "./attribute.mjs";
5
5
  * @param {Object} additionalProperties
6
6
  */
7
7
  export class BaseObject {
8
-
9
8
  /**
10
9
  * @return {string} type we represent
11
10
  */
@@ -16,7 +15,7 @@ export class BaseObject {
16
15
  /**
17
16
  * @return {string} name of the collection holding us in the owner
18
17
  */
19
- static get collectionName() {
18
+ static get collectionName() {
20
19
  return this.type.toLocaleLowerCase() + "s";
21
20
  }
22
21
 
@@ -45,19 +44,7 @@ export class BaseObject {
45
44
  * Unique id.
46
45
  * @return {string}
47
46
  */
48
- uuid: { type: "string" },
49
-
50
- /**
51
- * Avatar.
52
- * @return {string}
53
- */
54
- avatarURL: { type: "url" },
55
-
56
- /**
57
- * The url of home page.
58
- * @return {string}
59
- */
60
- homePageURL: { type: "url", writable: true }
47
+ uuid: { type: "string" }
61
48
  };
62
49
  }
63
50
 
@@ -123,14 +110,14 @@ export class BaseObject {
123
110
  * Complete name in the hierachy.
124
111
  * @return {string}
125
112
  */
126
- get fullCondensedName() {
113
+ get fullCondensedName() {
127
114
  return this.fullName;
128
115
  }
129
116
 
130
117
  get condensedName() {
131
- return this.name;
118
+ return this.name;
132
119
  }
133
-
120
+
134
121
  /**
135
122
  * Short human readable identifier with provider and branch.
136
123
  * @return {string}
@@ -164,6 +151,15 @@ export class BaseObject {
164
151
  return this.owner.provider;
165
152
  }
166
153
 
154
+ /**
155
+ * API as given by the owner.
156
+ * @return {string} url
157
+ */
158
+ get api() {
159
+ // TODO move into owner-object
160
+ return this.owner && this.owner.api;
161
+ }
162
+
167
163
  /**
168
164
  * Forwarded to the owner.
169
165
  * @param {...any} args
@@ -18,7 +18,18 @@ export class NamedObject extends BaseObject {
18
18
  ...super.attributes,
19
19
  name: {
20
20
  type: "string"
21
- }
21
+ },
22
+ /**
23
+ * Avatar.
24
+ * @return {string}
25
+ */
26
+ avatarURL: { type: "url" },
27
+
28
+ /**
29
+ * The url of home page.
30
+ * @return {string}
31
+ */
32
+ homePageURL: { type: "url", writable: true }
22
33
  };
23
34
  }
24
35
 
@@ -22,6 +22,14 @@ export class RepositoryGroup extends RepositoryOwner(OwnedObject) {
22
22
  return "_addRepositoryGroup";
23
23
  }
24
24
 
25
+ static get type() {
26
+ return "repository-group";
27
+ }
28
+
29
+ static get collectionName() {
30
+ return "repositoryGroups";
31
+ }
32
+
25
33
  static get attributes() {
26
34
  return {
27
35
  ...super.attributes,