repository-provider 32.7.0 → 32.7.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "32.7.0",
3
+ "version": "32.7.2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -1,6 +1,9 @@
1
- import { definePropertiesFromOptions, mapAttributes } from "./attribute-extras.mjs";
1
+ import {
2
+ definePropertiesFromOptions,
3
+ mapAttributes
4
+ } from "./attribute-extras.mjs";
2
5
  import { description_attribute, id_attribute } from "./attributes.mjs";
3
-
6
+
4
7
  /**
5
8
  * @param {Object} options
6
9
  * @param {Object} additionalProperties
@@ -83,7 +86,7 @@ export class BaseObject {
83
86
  * @return {string} fullName
84
87
  */
85
88
  toString() {
86
- return this.fullName;
89
+ return this.identifier;
87
90
  }
88
91
 
89
92
  /**
@@ -102,6 +105,10 @@ export class BaseObject {
102
105
  return this.name;
103
106
  }
104
107
 
108
+ get identifier() {
109
+ return this.fullName;
110
+ }
111
+
105
112
  /**
106
113
  * Complete name in the hierachy.
107
114
  * @return {string}
package/src/branch.mjs CHANGED
@@ -1,12 +1,9 @@
1
1
  import { Ref } from "./ref.mjs";
2
2
  import { PullRequest } from "./pull-request.mjs";
3
3
  import { Repository } from "./repository.mjs";
4
+ import { RepositoryOwner } from "./repository-owner.mjs";
4
5
  import { Commit } from "./commit.mjs";
5
6
 
6
- /**
7
- * @typedef {import('./repository-owner.mjs').RepositoryOwner} RepositoryOwner
8
- */
9
-
10
7
  /**
11
8
  * @typedef {Object} ContentEntry
12
9
  * @property {string} name
@@ -1,6 +1,10 @@
1
1
  import { optionJSON } from "./attribute-extras.mjs";
2
2
  import { BaseObject } from "./base-object.mjs";
3
- import { name_attribute, url_attribute, description_attribute, id_attribute } from "./attributes.mjs";
3
+ import {
4
+ name_attribute,
5
+ description_attribute,
6
+ id_attribute
7
+ } from "./attributes.mjs";
4
8
 
5
9
  /**
6
10
  * Object with a name.
@@ -11,7 +15,6 @@ import { name_attribute, url_attribute, description_attribute, id_attribute } fr
11
15
  * @property {string} name
12
16
  */
13
17
  export class NamedObject extends BaseObject {
14
-
15
18
  static get attributes() {
16
19
  return {
17
20
  id: id_attribute,
@@ -39,7 +42,7 @@ export class NamedObject extends BaseObject {
39
42
  this.provider.equals(other.provider)
40
43
  );
41
44
  }
42
-
45
+
43
46
  /**
44
47
  * Provided name and all defined attributes.
45
48
  */
package/src/ref.mjs CHANGED
@@ -128,14 +128,6 @@ export class Ref extends OwnedObject {
128
128
  : `${this.owner.identifier}#${this.name}`;
129
129
  }
130
130
 
131
- /**
132
- * Same as identifier.
133
- * @return {string}
134
- */
135
- toString() {
136
- return this.identifier;
137
- }
138
-
139
131
  /**
140
132
  * Url of issue tracking system.
141
133
  * @see {@link Repository#issuesURL}
@@ -80,10 +80,10 @@ export function RepositoryOwner(base) {
80
80
 
81
81
  /**
82
82
  * Lookup entity of a given type and name.
83
- * @param {string} type
84
- * @param {string} name
85
- * @param {function} split
86
- * @param {Object} defaultItem
83
+ * @param {string} type
84
+ * @param {string} name
85
+ * @param {function} [split]
86
+ * @param {Object} [defaultItem]
87
87
  * @returns {NamedObject} from a repository
88
88
  */
89
89
  async lookup(type, name, split, defaultItem) {
@@ -107,10 +107,10 @@ export function RepositoryOwner(base) {
107
107
 
108
108
  /**
109
109
  * List entities for a given type and pattern.
110
- * @param {string} type
111
- * @param {string|string[]} patterns
112
- * @param {function?} split
113
- * @param {Object?} defaultItem
110
+ * @param {string} type
111
+ * @param {string|string[]} patterns
112
+ * @param {function} [split]
113
+ * @param {Object} [defaultItem]
114
114
  * @return {AsyncIterator<NamedObject>} matching type and pattern
115
115
  */
116
116
  async *list(type, patterns, split, defaultItem) {
@@ -4,6 +4,8 @@ import { Hook } from "./hook.mjs";
4
4
  import { Tag } from "./tag.mjs";
5
5
  import { Branch } from "./branch.mjs";
6
6
  import { PullRequest } from "./pull-request.mjs";
7
+ import { RepositoryOwner } from "./repository-owner.mjs";
8
+ import { Commit } from "./commit.mjs";
7
9
  import {
8
10
  url_attribute,
9
11
  boolean_attribute,
@@ -11,10 +13,6 @@ import {
11
13
  default_attribute
12
14
  } from "./attributes.mjs";
13
15
 
14
- /**
15
- * @typedef {import('./repository-owner.mjs').RepositoryOwner} RepositoryOwner
16
- */
17
-
18
16
  /**
19
17
  * @typedef {Object} ContentEntry
20
18
  * @property {string} name