repository-provider 36.0.3 → 36.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "36.0.3",
3
+ "version": "36.0.4",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -68,7 +68,6 @@ export class BaseObject {
68
68
  /**
69
69
  * Takes values from options.
70
70
  * @param {Object} [options]
71
- * @param {Object} [additionalProperties]
72
71
  */
73
72
  updateAttributes(options) {
74
73
  definePropertiesFromAttributes(this, this.constructor.attributes, options);
@@ -107,6 +106,22 @@ export class BaseObject {
107
106
  return false;
108
107
  }
109
108
 
109
+ /**
110
+ * By default we are not disabled.
111
+ * @return {boolean} false
112
+ */
113
+ get isDisabled() {
114
+ return false;
115
+ }
116
+
117
+ /**
118
+ * By default we are not a template.
119
+ * @return {boolean} false
120
+ */
121
+ get isTemplate() {
122
+ return false;
123
+ }
124
+
110
125
  /**
111
126
  * Check for equality
112
127
  * @param {BaseObject|undefined} other
@@ -3,6 +3,7 @@ import { NamedObject } from "./named-object.mjs";
3
3
  /**
4
4
  * @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
5
5
  * @typedef {import('./repository.mjs').Repository} Repository
6
+ * @typedef {import('./base-object.mjs').BaseObject} BaseObject
6
7
  */
7
8
 
8
9
  /**
@@ -29,6 +30,12 @@ export class OwnedObject extends NamedObject {
29
30
 
30
31
  owner;
31
32
 
33
+ /**
34
+ *
35
+ * @param {BaseObject} owner
36
+ * @param {string} name
37
+ * @param {Object|undefined} options
38
+ */
32
39
  constructor(owner, name, options) {
33
40
  super(name, options);
34
41
  this.owner = owner;
@@ -87,7 +87,7 @@ export class Repository extends OwnedObject {
87
87
  /** @type {Map<string,Application>} */ #applications = new Map();
88
88
  /** @type {Map<string,Milestone>} */ #milestones = new Map();
89
89
  /** @type {Map<string,PullRequest>} */ #pullRequests = new Map();
90
- #hooks = [];
90
+ /** @type {Array<Hook>} */ #hooks = [];
91
91
 
92
92
  /**
93
93
  * @param {RepositoryOwner} owner
@@ -197,22 +197,6 @@ export class Repository extends OwnedObject {
197
197
  return false;
198
198
  }
199
199
 
200
- /**
201
- * By default we are not disabled.
202
- * @return {boolean} false
203
- */
204
- get isDisabled() {
205
- return false;
206
- }
207
-
208
- /**
209
- * By default we are not a template.
210
- * @return {boolean} false
211
- */
212
- get isTemplate() {
213
- return false;
214
- }
215
-
216
200
  /**
217
201
  * Delete the repository from the {@link Provider}.
218
202
  * {@link Provider#deleteRepository}
@@ -308,7 +292,7 @@ export class Repository extends OwnedObject {
308
292
  /**
309
293
  * Get a Tag.
310
294
  * @param {string} name
311
- * @return {Promise<Tag>}
295
+ * @return {Promise<Tag|undefined>}
312
296
  */
313
297
  async tag(name) {
314
298
  await this.initializeTags();
@@ -339,6 +323,10 @@ export class Repository extends OwnedObject {
339
323
  return this.#tags.get(name) || new this.tagClass(this, name, options);
340
324
  }
341
325
 
326
+ /**
327
+ *
328
+ * @param {Tag} tag
329
+ */
342
330
  _addTag(tag) {
343
331
  this.#tags.set(tag.name, tag);
344
332
  }
@@ -372,6 +360,10 @@ export class Repository extends OwnedObject {
372
360
  return pr;
373
361
  }
374
362
 
363
+ /**
364
+ *
365
+ * @param {PullRequest} pr
366
+ */
375
367
  _addPullRequest(pr) {
376
368
  this.#pullRequests.set(pr.name, pr);
377
369
  }
@@ -421,6 +413,10 @@ export class Repository extends OwnedObject {
421
413
  );
422
414
  }
423
415
 
416
+ /**
417
+ *
418
+ * @param {Hook} hook
419
+ */
424
420
  _addHook(hook) {
425
421
  this.#hooks.push(hook);
426
422
  }
@@ -459,6 +455,10 @@ export class Repository extends OwnedObject {
459
455
  }
460
456
  }
461
457
 
458
+ /**
459
+ *
460
+ * @param {Milestone} milestone
461
+ */
462
462
  _addMilestone(milestone) {
463
463
  this.#milestones.set(milestone.name, milestone);
464
464
  }
@@ -472,6 +472,10 @@ export class Repository extends OwnedObject {
472
472
  return this.#milestones.get(name);
473
473
  }
474
474
 
475
+ /**
476
+ *
477
+ * @param {Project} project
478
+ */
475
479
  _addProject(project) {
476
480
  this.#projects.set(project.name, project);
477
481
  }
@@ -485,6 +489,10 @@ export class Repository extends OwnedObject {
485
489
  return this.#projects.get(name);
486
490
  }
487
491
 
492
+ /**
493
+ *
494
+ * @param {Application} application
495
+ */
488
496
  _addApplication(application) {
489
497
  this.#applications.set(application.name, application);
490
498
  }