repository-provider 27.0.3 → 27.0.6

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
@@ -250,6 +250,7 @@ console.log(await readme.getString());
250
250
  * [fullName](#fullname-3)
251
251
  * [fullCondensedName](#fullcondensedname)
252
252
  * [identifier](#identifier-1)
253
+ * [toString](#tostring)
253
254
  * [issuesURL](#issuesurl)
254
255
  * [homePageURL](#homepageurl-1)
255
256
  * [isLocked](#islocked)
@@ -292,6 +293,7 @@ console.log(await readme.getString());
292
293
  * [isLocked](#islocked-1)
293
294
  * [isDisabled](#isdisabled-1)
294
295
  * [isTemplate](#istemplate)
296
+ * [delete](#delete-2)
295
297
  * [defaultBranch](#defaultbranch)
296
298
  * [branch](#branch-2)
297
299
  * [Parameters](#parameters-70)
@@ -309,7 +311,6 @@ console.log(await readme.getString());
309
311
  * [Parameters](#parameters-76)
310
312
  * [addTag](#addtag)
311
313
  * [Parameters](#parameters-77)
312
- * [delete](#delete-2)
313
314
  * [createPullRequest](#createpullrequest-1)
314
315
  * [Parameters](#parameters-78)
315
316
  * [addPullRequest](#addpullrequest)
@@ -329,6 +330,7 @@ console.log(await readme.getString());
329
330
  * [type](#type-1)
330
331
  * [refId](#refid-1)
331
332
  * [Parameters](#parameters-85)
333
+ * [toString](#tostring-1)
332
334
  * [toJSON](#tojson-3)
333
335
  * [attributes](#attributes-2)
334
336
  * [defaultBranchName](#defaultbranchname)
@@ -540,37 +542,37 @@ Forwarded to the owner.
540
542
 
541
543
  By default we use the owners implementation.
542
544
 
543
- Returns **Class** as defined in the owner
545
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
544
546
 
545
547
  ### pullRequestClass
546
548
 
547
549
  By default we use the owners implementation.
548
550
 
549
- Returns **Class** as defined in the owner
551
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
550
552
 
551
553
  ### branchClass
552
554
 
553
555
  By default we use the owners implementation.
554
556
 
555
- Returns **Class** as defined in the owner
557
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
556
558
 
557
559
  ### tagClass
558
560
 
559
561
  By default we use the owners implementation.
560
562
 
561
- Returns **Class** as defined in the owner
563
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
562
564
 
563
565
  ### entryClass
564
566
 
565
567
  By default we use the owners implementation.
566
568
 
567
- Returns **Class** as defined in the owner
569
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
568
570
 
569
571
  ### hookClass
570
572
 
571
573
  By default we use the owners implementation.
572
574
 
573
- Returns **Class** as defined in the owner
575
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** as defined in the owner
574
576
 
575
577
  ### attributes
576
578
 
@@ -832,31 +834,31 @@ return {object}
832
834
 
833
835
  ### repositoryGroupClass
834
836
 
835
- Returns **Class** repository group class used by the Provider
837
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** repository group class used by the Provider
836
838
 
837
839
  ### hookClass
838
840
 
839
- Returns **Class** hook class used by the Provider
841
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** hook class used by the Provider
840
842
 
841
843
  ### repositoryClass
842
844
 
843
- Returns **Class** repository class used by the Provider
845
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** repository class used by the Provider
844
846
 
845
847
  ### branchClass
846
848
 
847
- Returns **Class** branch class used by the Provider
849
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** branch class used by the Provider
848
850
 
849
851
  ### tagClass
850
852
 
851
- Returns **Class** branch class used by the Provider
853
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** branch class used by the Provider
852
854
 
853
855
  ### entryClass
854
856
 
855
- Returns **Class** entry class used by the Provider
857
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** entry class used by the Provider
856
858
 
857
859
  ### pullRequestClass
858
860
 
859
- Returns **Class** pull request class used by the Provider
861
+ Returns **[Function](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Statements/function)** pull request class used by the Provider
860
862
 
861
863
  ### instanceIdentifier
862
864
 
@@ -1416,7 +1418,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1416
1418
 
1417
1419
  ### ref
1418
1420
 
1419
- ref name.
1421
+ Full ref path.
1420
1422
 
1421
1423
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** git ref of the Ref
1422
1424
 
@@ -1470,7 +1472,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1470
1472
 
1471
1473
  * **See**: [Repository#owner](Repository#owner)
1472
1474
 
1473
- Branch owner.
1475
+ Ref owner.
1474
1476
  By default we provide the repository owner
1475
1477
 
1476
1478
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
@@ -1494,6 +1496,12 @@ Short human readable identifier with provider and branch.
1494
1496
 
1495
1497
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1496
1498
 
1499
+ ### toString
1500
+
1501
+ Same as identifier.
1502
+
1503
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1504
+
1497
1505
  ### issuesURL
1498
1506
 
1499
1507
  * **See**: [Repository#issuesURL](#repositoryissuesurl)
@@ -1618,7 +1626,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1618
1626
 
1619
1627
  ### slug
1620
1628
 
1621
- URL name of the repo.
1629
+ Name of the repo as used in the URL.
1622
1630
 
1623
1631
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1624
1632
 
@@ -1689,7 +1697,7 @@ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
1689
1697
 
1690
1698
  ### cloneURL
1691
1699
 
1692
- The url used fro cloning the repo.
1700
+ The url used for cloning the repo.
1693
1701
 
1694
1702
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1695
1703
 
@@ -1735,6 +1743,13 @@ By default we are not a template.
1735
1743
 
1736
1744
  Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** false
1737
1745
 
1746
+ ### delete
1747
+
1748
+ Delete the repository from the [Provider](Provider).
1749
+ [Provider#deleteRepository](Provider#deleteRepository)
1750
+
1751
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
1752
+
1738
1753
  ### defaultBranch
1739
1754
 
1740
1755
  Lookup the default branch.
@@ -1823,13 +1838,6 @@ Internal tag creation does not call repository.initialize()
1823
1838
 
1824
1839
  Returns **[Tag](#tag)** newly created tag
1825
1840
 
1826
- ### delete
1827
-
1828
- Delete the repository from the [Provider](Provider).
1829
- [Provider#deleteRepository](Provider#deleteRepository)
1830
-
1831
- Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<any>**
1832
-
1833
1841
  ### createPullRequest
1834
1842
 
1835
1843
  Create a pull request (or deliver an already present for thefiven name).
@@ -1928,6 +1936,12 @@ Get sha of a ref.
1928
1936
 
1929
1937
  Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** sha of the ref
1930
1938
 
1939
+ ### toString
1940
+
1941
+ full name.
1942
+
1943
+ Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**
1944
+
1931
1945
  ### toJSON
1932
1946
 
1933
1947
  Provide name and all defined attributes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "27.0.3",
3
+ "version": "27.0.6",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -27,18 +27,18 @@
27
27
  "docs": "documentation readme --section=API ./src/**/*.mjs",
28
28
  "lint": "npm run lint:docs && npm run lint:tsc",
29
29
  "lint:docs": "documentation lint ./src/**/*.mjs",
30
- "lint:tsc": "tsc --allowJs --checkJs --noEmit -module nodenext -t es2022 ./src/*.mjs"
30
+ "lint:tsc": "tsc --allowJs --checkJs --noEmit -t es2022 ./src/*.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "matching-iterator": "^2.0.3"
33
+ "matching-iterator": "^2.0.4"
34
34
  },
35
35
  "devDependencies": {
36
- "ava": "^4.0.1",
36
+ "ava": "^4.1.0",
37
37
  "c8": "^7.11.0",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.12.8",
39
+ "repository-provider-test-support": "^1.12.11",
40
40
  "semantic-release": "^19.0.2",
41
- "typescript": "^4.7.0-dev.20220225"
41
+ "typescript": "^4.6.3"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.18.3"
@@ -124,7 +124,7 @@ export class BaseObject {
124
124
 
125
125
  /**
126
126
  * By default we use the owners implementation.
127
- * @return {Class} as defined in the owner
127
+ * @return {Function} as defined in the owner
128
128
  */
129
129
  get repositoryClass() {
130
130
  return this.owner.repositoryClass;
@@ -132,7 +132,7 @@ export class BaseObject {
132
132
 
133
133
  /**
134
134
  * By default we use the owners implementation.
135
- * @return {Class} as defined in the owner
135
+ * @return {Function} as defined in the owner
136
136
  */
137
137
  get pullRequestClass() {
138
138
  return this.owner.pullRequestClass;
@@ -140,7 +140,7 @@ export class BaseObject {
140
140
 
141
141
  /**
142
142
  * By default we use the owners implementation.
143
- * @return {Class} as defined in the owner
143
+ * @return {Function} as defined in the owner
144
144
  */
145
145
  get branchClass() {
146
146
  return this.owner.branchClass;
@@ -148,7 +148,7 @@ export class BaseObject {
148
148
 
149
149
  /**
150
150
  * By default we use the owners implementation.
151
- * @return {Class} as defined in the owner
151
+ * @return {Function} as defined in the owner
152
152
  */
153
153
  get tagClass() {
154
154
  return this.owner.tagClass;
@@ -156,7 +156,7 @@ export class BaseObject {
156
156
 
157
157
  /**
158
158
  * By default we use the owners implementation.
159
- * @return {Class} as defined in the owner
159
+ * @return {Function} as defined in the owner
160
160
  */
161
161
  get entryClass() {
162
162
  return this.owner.entryClass;
@@ -164,7 +164,7 @@ export class BaseObject {
164
164
 
165
165
  /**
166
166
  * By default we use the owners implementation.
167
- * @return {Class} as defined in the owner
167
+ * @return {Function} as defined in the owner
168
168
  */
169
169
  get hookClass() {
170
170
  return this.owner.hookClass;
@@ -462,49 +462,49 @@ export class BaseProvider extends BaseObject {
462
462
  }
463
463
 
464
464
  /**
465
- * @return {Class} repository group class used by the Provider
465
+ * @return {Function} repository group class used by the Provider
466
466
  */
467
467
  get repositoryGroupClass() {
468
468
  return RepositoryGroup;
469
469
  }
470
470
 
471
471
  /**
472
- * @return {Class} hook class used by the Provider
472
+ * @return {Function} hook class used by the Provider
473
473
  */
474
474
  get hookClass() {
475
475
  return Hook;
476
476
  }
477
477
 
478
478
  /**
479
- * @return {Class} repository class used by the Provider
479
+ * @return {Function} repository class used by the Provider
480
480
  */
481
481
  get repositoryClass() {
482
482
  return Repository;
483
483
  }
484
484
 
485
485
  /**
486
- * @return {Class} branch class used by the Provider
486
+ * @return {Function} branch class used by the Provider
487
487
  */
488
488
  get branchClass() {
489
489
  return Branch;
490
490
  }
491
491
 
492
492
  /**
493
- * @return {Class} branch class used by the Provider
493
+ * @return {Function} branch class used by the Provider
494
494
  */
495
495
  get tagClass() {
496
496
  return Tag;
497
497
  }
498
498
 
499
499
  /**
500
- * @return {Class} entry class used by the Provider
500
+ * @return {Function} entry class used by the Provider
501
501
  */
502
502
  get entryClass() {
503
503
  return undefined;
504
504
  }
505
505
 
506
506
  /**
507
- * @return {Class} pull request class used by the Provider
507
+ * @return {Function} pull request class used by the Provider
508
508
  */
509
509
  get pullRequestClass() {
510
510
  return PullRequest;
package/src/ref.mjs CHANGED
@@ -43,7 +43,7 @@ export class Ref extends NamedObject {
43
43
  }
44
44
 
45
45
  /**
46
- * ref name.
46
+ * Full ref path.
47
47
  * @return {string} git ref of the Ref
48
48
  */
49
49
  get ref() {
@@ -97,7 +97,7 @@ export class Ref extends NamedObject {
97
97
  }
98
98
 
99
99
  /**
100
- * Branch owner.
100
+ * Ref owner.
101
101
  * By default we provide the repository owner
102
102
  * @see {@link Repository#owner}
103
103
  * @return {string}
@@ -137,6 +137,10 @@ export class Ref extends NamedObject {
137
137
  return `${this.provider.name}:${this.fullCondensedName}`;
138
138
  }
139
139
 
140
+ /**
141
+ * Same as identifier.
142
+ * @return {string}
143
+ */
140
144
  toString() {
141
145
  return this.identifier;
142
146
  }
@@ -84,7 +84,7 @@ export class Repository extends NamedObject {
84
84
  }
85
85
 
86
86
  /**
87
- * URL name of the repo.
87
+ * Name of the repo as used in the URL.
88
88
  * @return {string}
89
89
  */
90
90
  get slug() {
@@ -166,7 +166,7 @@ export class Repository extends NamedObject {
166
166
  }
167
167
 
168
168
  /**
169
- * The url used fro cloning the repo.
169
+ * The url used for cloning the repo.
170
170
  * @return {string}
171
171
  */
172
172
  get cloneURL() {
@@ -229,6 +229,15 @@ export class Repository extends NamedObject {
229
229
  return false;
230
230
  }
231
231
 
232
+ /**
233
+ * Delete the repository from the {@link Provider}.
234
+ * {@link Provider#deleteRepository}
235
+ * @return {Promise<any>}
236
+ */
237
+ async delete() {
238
+ return this.owner.deleteRepository(this.name);
239
+ }
240
+
232
241
  /**
233
242
  * Lookup the default branch.
234
243
  * @return {Promise<Branch>} branch named after defaultBranchName
@@ -340,15 +349,6 @@ export class Repository extends NamedObject {
340
349
  this._tags.set(tag.name, tag);
341
350
  }
342
351
 
343
- /**
344
- * Delete the repository from the {@link Provider}.
345
- * {@link Provider#deleteRepository}
346
- * @return {Promise<any>}
347
- */
348
- async delete() {
349
- return this.owner.deleteRepository(this.name);
350
- }
351
-
352
352
  /**
353
353
  * Create a pull request (or deliver an already present for thefiven name).
354
354
  * @param {string} name of the pr
@@ -487,9 +487,12 @@ export class Repository extends NamedObject {
487
487
  * @return {Promise<string>} sha of the ref
488
488
  */
489
489
  async refId(ref) {
490
- return undefined;
491
490
  }
492
491
 
492
+ /**
493
+ * full name.
494
+ * @returns {string}
495
+ */
493
496
  toString() {
494
497
  return this.fullName;
495
498
  }