repository-provider 32.3.19 → 32.3.21

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/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2022 by arlac77
1
+ Copyright (c) 2017-2023 by arlac77
2
2
  All rights reserved.
3
3
 
4
4
  Redistribution and use in source and binary forms, with or without
package/README.md CHANGED
@@ -52,9 +52,9 @@ console.log(await readme.getString());
52
52
  * [Parameters](#parameters)
53
53
  * [defaultValues](#defaultvalues)
54
54
  * [Parameters](#parameters-1)
55
- * [setAttribute](#setattribute)
56
- * [Parameters](#parameters-2)
57
55
  * [tokens](#tokens)
56
+ * [Parameters](#parameters-2)
57
+ * [setAttribute](#setattribute)
58
58
  * [Parameters](#parameters-3)
59
59
  * [getAttribute](#getattribute)
60
60
  * [Parameters](#parameters-4)
@@ -190,6 +190,7 @@ console.log(await readme.getString());
190
190
  * [homePageURL](#homepageurl)
191
191
  * [OwnedObject](#ownedobject)
192
192
  * [Parameters](#parameters-42)
193
+ * [delete](#delete-1)
193
194
  * [equals](#equals-3)
194
195
  * [Parameters](#parameters-43)
195
196
  * [api](#api)
@@ -219,13 +220,12 @@ console.log(await readme.getString());
219
220
  * [fullName](#fullname-2)
220
221
  * [url](#url-2)
221
222
  * [repository](#repository-1)
222
- * [delete](#delete-1)
223
+ * [delete](#delete-2)
223
224
  * [merge](#merge)
224
225
  * [Parameters](#parameters-50)
225
226
  * [decline](#decline)
226
227
  * [reviews](#reviews)
227
228
  * [identifier](#identifier-1)
228
- * [validStates](#validstates)
229
229
  * [defaultListStates](#defaultliststates)
230
230
  * [validMergeMethods](#validmergemethods)
231
231
  * [list](#list-1)
@@ -287,7 +287,7 @@ console.log(await readme.getString());
287
287
  * [isLocked](#islocked-1)
288
288
  * [isDisabled](#isdisabled-1)
289
289
  * [isTemplate](#istemplate)
290
- * [delete](#delete-2)
290
+ * [delete](#delete-3)
291
291
  * [defaultBranch](#defaultbranch)
292
292
  * [branch](#branch-2)
293
293
  * [Parameters](#parameters-63)
@@ -407,6 +407,16 @@ Get default values.
407
407
 
408
408
  Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** filled with default values
409
409
 
410
+ ## tokens
411
+
412
+ Split property path into tokens
413
+
414
+ ### Parameters
415
+
416
+ * `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
417
+
418
+ Returns **Iterator<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
419
+
410
420
  ## setAttribute
411
421
 
412
422
  Set Object attribute.
@@ -418,16 +428,6 @@ The name may be a property path like 'a.b.c'.
418
428
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
419
429
  * `value` **any**&#x20;
420
430
 
421
- ## tokens
422
-
423
- Split property path into tokens
424
-
425
- ### Parameters
426
-
427
- * `string` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
428
-
429
- Returns **Iterator<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
430
-
431
431
  ## getAttribute
432
432
 
433
433
  Deliver attribute value.
@@ -574,6 +574,8 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
574
574
 
575
575
  ### writableAttributes
576
576
 
577
+ User modifyable attributes.
578
+
577
579
  Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** writable attributes
578
580
 
579
581
  ### attributeMapping
@@ -1139,6 +1141,10 @@ Named Object registering itself in the owner.
1139
1141
  * `options` &#x20;
1140
1142
  * `additionalProperties` &#x20;
1141
1143
 
1144
+ ### delete
1145
+
1146
+ Removes the receiver from the owner.
1147
+
1142
1148
  ### equals
1143
1149
 
1144
1150
  Check for equality.
@@ -1330,12 +1336,6 @@ Short human readable identifier with provider and branch.
1330
1336
 
1331
1337
  Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
1332
1338
 
1333
- ### validStates
1334
-
1335
- All valid states
1336
-
1337
- Returns **[Set](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Set)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** valid states
1338
-
1339
1339
  ### defaultListStates
1340
1340
 
1341
1341
  States to list pull request by default
@@ -1471,7 +1471,7 @@ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
1471
1471
  Ref owner.
1472
1472
  By default we provide the repository owner
1473
1473
 
1474
- Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)**&#x20;
1474
+ Returns **[Repository](#repository)**&#x20;
1475
1475
 
1476
1476
  ### fullName
1477
1477
 
@@ -1580,7 +1580,7 @@ Abstract repository
1580
1580
 
1581
1581
  ### Parameters
1582
1582
 
1583
- * `owner` **Owner**&#x20;
1583
+ * `owner` **[RepositoryOwner](#repositoryowner)**&#x20;
1584
1584
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** (#branch) will be removed
1585
1585
  * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**&#x20;
1586
1586
 
@@ -1589,7 +1589,7 @@ Abstract repository
1589
1589
 
1590
1590
  ### Properties
1591
1591
 
1592
- * `owner` **Owner**&#x20;
1592
+ * `owner` **[RepositoryOwner](#repositoryowner)**&#x20;
1593
1593
  * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** without (#branch)
1594
1594
  * `description` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.description
1595
1595
  * `id` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** from options.id
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "32.3.19",
3
+ "version": "32.3.21",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -38,7 +38,7 @@
38
38
  "browser-ava": "^1.3.13",
39
39
  "c8": "^7.12.0",
40
40
  "documentation": "^14.0.1",
41
- "repository-provider-test-support": "^2.2.27",
41
+ "repository-provider-test-support": "^2.2.28",
42
42
  "semantic-release": "^19.0.5",
43
43
  "typescript": "^4.9.4"
44
44
  },
@@ -37,6 +37,7 @@ export class BaseObject {
37
37
  }
38
38
 
39
39
  /**
40
+ * User modifyable attributes.
40
41
  * @return {Object} writable attributes
41
42
  */
42
43
  static get writableAttributes() {
@@ -47,7 +47,7 @@ export class MultiGroupProvider extends BaseProvider {
47
47
  if (rg !== undefined) {
48
48
  const r = await rg.repository(repository);
49
49
  if (r !== undefined) {
50
- return r.branch( branch || r.defaultBranchName);
50
+ return r.branch( branch || r.defaultBranchName);
51
51
  }
52
52
  }
53
53
  }
@@ -1,6 +1,6 @@
1
1
  import { optionJSON } from "./attribute.mjs";
2
2
  import { BaseObject } from "./base-object.mjs";
3
- import { name, url } from "./attributes.mjs";
3
+ import { name, url, description, id, uuid } from "./attributes.mjs";
4
4
 
5
5
  /**
6
6
  * Object with a name.
@@ -16,9 +16,11 @@ export class NamedObject extends BaseObject {
16
16
  */
17
17
  static get attributes() {
18
18
  return {
19
- ...super.attributes,
20
19
  name,
21
-
20
+ id,
21
+ uuid,
22
+ description,
23
+
22
24
  /**
23
25
  * The url of home page.
24
26
  * @return {string}
@@ -23,6 +23,9 @@ export class OwnedObject extends NamedObject {
23
23
  owner[this.constructor.addMethodName](this);
24
24
  }
25
25
 
26
+ /**
27
+ * Removes the receiver from the owner.
28
+ */
26
29
  delete() {
27
30
  this.owner[this.constructor.deleteMethodName](this);
28
31
  }