repository-provider 26.1.2 → 26.1.3

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.
Files changed (3) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +124 -98
  3. package/package.json +5 -5
package/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017-2021 by arlac77
1
+ Copyright (c) 2017-2022 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
@@ -51,20 +51,22 @@ console.log(await readme.getString());
51
51
  * [Properties](#properties)
52
52
  * [definePropertiesFromOptions](#definepropertiesfromoptions)
53
53
  * [Parameters](#parameters-1)
54
- * [setAttribute](#setattribute)
54
+ * [defaultValues](#defaultvalues)
55
55
  * [Parameters](#parameters-2)
56
- * [getAttribute](#getattribute)
56
+ * [setAttribute](#setattribute)
57
57
  * [Parameters](#parameters-3)
58
- * [optionJSON](#optionjson)
58
+ * [getAttribute](#getattribute)
59
59
  * [Parameters](#parameters-4)
60
- * [mapAttributes](#mapattributes)
60
+ * [optionJSON](#optionjson)
61
61
  * [Parameters](#parameters-5)
62
- * [mapAttributesInverse](#mapattributesinverse)
62
+ * [mapAttributes](#mapattributes)
63
63
  * [Parameters](#parameters-6)
64
- * [BaseObject](#baseobject)
64
+ * [mapAttributesInverse](#mapattributesinverse)
65
65
  * [Parameters](#parameters-7)
66
+ * [BaseObject](#baseobject)
67
+ * [Parameters](#parameters-8)
66
68
  * [equals](#equals)
67
- * [Parameters](#parameters-8)
69
+ * [Parameters](#parameters-9)
68
70
  * [attributes](#attributes)
69
71
  * [writableAttributes](#writableattributes)
70
72
  * [attributeMapping](#attributemapping)
@@ -74,129 +76,131 @@ console.log(await readme.getString());
74
76
  * [avatarURL](#avatarurl)
75
77
  * [homePageURL](#homepageurl)
76
78
  * [MessageDestination](#messagedestination)
77
- * [Parameters](#parameters-9)
78
- * [BaseProvider](#baseprovider)
79
79
  * [Parameters](#parameters-10)
80
+ * [BaseProvider](#baseprovider)
81
+ * [Parameters](#parameters-11)
80
82
  * [Properties](#properties-1)
81
83
  * [equals](#equals-1)
82
- * [Parameters](#parameters-11)
84
+ * [Parameters](#parameters-12)
83
85
  * [repositoryBases](#repositorybases)
84
86
  * [normalizeRepositoryName](#normalizerepositoryname)
85
- * [Parameters](#parameters-12)
86
- * [normalizeGroupName](#normalizegroupname)
87
87
  * [Parameters](#parameters-13)
88
+ * [normalizeGroupName](#normalizegroupname)
89
+ * [Parameters](#parameters-14)
88
90
  * [areRepositoryNamesCaseSensitive](#arerepositorynamescasesensitive)
89
91
  * [areGroupNamesCaseSensitive](#aregroupnamescasesensitive)
90
92
  * [supportsBase](#supportsbase)
91
- * [Parameters](#parameters-14)
92
- * [parseName](#parsename)
93
93
  * [Parameters](#parameters-15)
94
- * [list](#list)
94
+ * [parseName](#parsename)
95
95
  * [Parameters](#parameters-16)
96
- * [projects](#projects)
96
+ * [createRepository](#createrepository)
97
97
  * [Parameters](#parameters-17)
98
- * [milestones](#milestones)
98
+ * [list](#list)
99
99
  * [Parameters](#parameters-18)
100
- * [repositories](#repositories)
100
+ * [projects](#projects)
101
101
  * [Parameters](#parameters-19)
102
- * [branches](#branches)
102
+ * [milestones](#milestones)
103
103
  * [Parameters](#parameters-20)
104
- * [tags](#tags)
104
+ * [repositories](#repositories)
105
105
  * [Parameters](#parameters-21)
106
- * [hooks](#hooks)
106
+ * [branches](#branches)
107
107
  * [Parameters](#parameters-22)
108
- * [pullRequests](#pullrequests)
108
+ * [tags](#tags)
109
109
  * [Parameters](#parameters-23)
110
- * [repositoryGroupClass](#repositorygroupclass)
111
- * [hookClass](#hookclass)
110
+ * [hooks](#hooks)
111
+ * [Parameters](#parameters-24)
112
+ * [pullRequests](#pullrequests)
113
+ * [Parameters](#parameters-25)
112
114
  * [name](#name)
113
115
  * [provider](#provider)
114
116
  * [url](#url)
115
117
  * [toJSON](#tojson)
118
+ * [repositoryGroupClass](#repositorygroupclass)
119
+ * [hookClass](#hookclass)
116
120
  * [repositoryClass](#repositoryclass)
117
121
  * [branchClass](#branchclass)
118
122
  * [entryClass](#entryclass)
119
123
  * [pullRequestClass](#pullrequestclass)
120
124
  * [instanceIdentifier](#instanceidentifier)
121
125
  * [optionsFromEnvironment](#optionsfromenvironment)
122
- * [Parameters](#parameters-24)
126
+ * [Parameters](#parameters-26)
123
127
  * [areOptionsSufficcient](#areoptionssufficcient)
124
- * [Parameters](#parameters-25)
128
+ * [Parameters](#parameters-27)
125
129
  * [initialize](#initialize)
126
- * [Parameters](#parameters-26)
130
+ * [Parameters](#parameters-28)
127
131
  * [priority](#priority)
128
132
  * [name](#name-1)
129
133
  * [messageDestination](#messagedestination-1)
130
134
  * [Commit](#commit)
131
135
  * [Properties](#properties-2)
132
136
  * [Commit](#commit-1)
133
- * [Parameters](#parameters-27)
137
+ * [Parameters](#parameters-29)
134
138
  * [Properties](#properties-3)
135
139
  * [CommitResult](#commitresult)
136
140
  * [Properties](#properties-4)
137
141
  * [Branch](#branch)
138
- * [Parameters](#parameters-28)
142
+ * [Parameters](#parameters-30)
139
143
  * [Properties](#properties-5)
140
144
  * [url](#url-1)
141
145
  * [refType](#reftype)
142
146
  * [isDefault](#isdefault)
143
147
  * [delete](#delete)
144
148
  * [commit](#commit-2)
145
- * [Parameters](#parameters-29)
149
+ * [Parameters](#parameters-31)
146
150
  * [commitIntoPullRequest](#commitintopullrequest)
147
- * [Parameters](#parameters-30)
151
+ * [Parameters](#parameters-32)
148
152
  * [removeEntries](#removeentries)
149
- * [Parameters](#parameters-31)
153
+ * [Parameters](#parameters-33)
150
154
  * [entryClass](#entryclass-1)
151
155
  * [createPullRequest](#createpullrequest)
152
- * [Parameters](#parameters-32)
156
+ * [Parameters](#parameters-34)
153
157
  * [pullRequestClass](#pullrequestclass-1)
154
158
  * [createBranch](#createbranch)
155
- * [Parameters](#parameters-33)
159
+ * [Parameters](#parameters-35)
156
160
  * [Hook](#hook)
157
- * [Parameters](#parameters-34)
161
+ * [Parameters](#parameters-36)
158
162
  * [Properties](#properties-6)
159
163
  * [equals](#equals-2)
160
- * [Parameters](#parameters-35)
164
+ * [Parameters](#parameters-37)
161
165
  * [toJSON](#tojson-1)
162
166
  * [Issue](#issue)
163
- * [Parameters](#parameters-36)
167
+ * [Parameters](#parameters-38)
164
168
  * [Milestone](#milestone)
165
- * [Parameters](#parameters-37)
169
+ * [Parameters](#parameters-39)
166
170
  * [MultiGroupProvider](#multigroupprovider)
167
- * [Parameters](#parameters-38)
171
+ * [Parameters](#parameters-40)
168
172
  * [repository](#repository)
169
- * [Parameters](#parameters-39)
173
+ * [Parameters](#parameters-41)
170
174
  * [repositoryGroup](#repositorygroup)
171
- * [Parameters](#parameters-40)
175
+ * [Parameters](#parameters-42)
172
176
  * [repositoryGroups](#repositorygroups)
173
- * [Parameters](#parameters-41)
177
+ * [Parameters](#parameters-43)
174
178
  * [createRepositoryGroup](#createrepositorygroup)
175
- * [Parameters](#parameters-42)
179
+ * [Parameters](#parameters-44)
176
180
  * [addRepositoryGroup](#addrepositorygroup)
177
- * [Parameters](#parameters-43)
181
+ * [Parameters](#parameters-45)
178
182
  * [NamedObject](#namedobject)
179
- * [Parameters](#parameters-44)
183
+ * [Parameters](#parameters-46)
180
184
  * [Properties](#properties-7)
181
185
  * [equals](#equals-3)
182
- * [Parameters](#parameters-45)
186
+ * [Parameters](#parameters-47)
183
187
  * [displayName](#displayname)
184
188
  * [update](#update)
185
189
  * [toJSON](#tojson-2)
186
190
  * [Project](#project)
187
- * [Parameters](#parameters-46)
191
+ * [Parameters](#parameters-48)
188
192
  * [PullRequest](#pullrequest)
189
- * [Parameters](#parameters-47)
193
+ * [Parameters](#parameters-49)
190
194
  * [Properties](#properties-8)
191
195
  * [fullName](#fullname)
192
196
  * [url](#url-2)
193
197
  * [repository](#repository-1)
194
198
  * [provider](#provider-1)
195
199
  * [equals](#equals-4)
196
- * [Parameters](#parameters-48)
200
+ * [Parameters](#parameters-50)
197
201
  * [delete](#delete-1)
198
202
  * [merge](#merge)
199
- * [Parameters](#parameters-49)
203
+ * [Parameters](#parameters-51)
200
204
  * [decline](#decline)
201
205
  * [reviews](#reviews)
202
206
  * [identifier](#identifier)
@@ -204,9 +208,9 @@ console.log(await readme.getString());
204
208
  * [defaultListStates](#defaultliststates)
205
209
  * [validMergeMethods](#validmergemethods)
206
210
  * [list](#list-1)
207
- * [Parameters](#parameters-50)
211
+ * [Parameters](#parameters-52)
208
212
  * [open](#open)
209
- * [Parameters](#parameters-51)
213
+ * [Parameters](#parameters-53)
210
214
  * [title](#title)
211
215
  * [body](#body)
212
216
  * [state](#state)
@@ -216,19 +220,19 @@ console.log(await readme.getString());
216
220
  * [ContentEntry](#contententry)
217
221
  * [Properties](#properties-9)
218
222
  * [Ref](#ref)
219
- * [Parameters](#parameters-52)
223
+ * [Parameters](#parameters-54)
220
224
  * [equals](#equals-5)
221
- * [Parameters](#parameters-53)
225
+ * [Parameters](#parameters-55)
222
226
  * [ref](#ref-1)
223
227
  * [refId](#refid)
224
- * [Parameters](#parameters-54)
228
+ * [Parameters](#parameters-56)
225
229
  * [entries](#entries)
226
- * [Parameters](#parameters-55)
230
+ * [Parameters](#parameters-57)
227
231
  * [asyncIterator](#asynciterator)
228
232
  * [maybeEntry](#maybeentry)
229
- * [Parameters](#parameters-56)
233
+ * [Parameters](#parameters-58)
230
234
  * [entry](#entry)
231
- * [Parameters](#parameters-57)
235
+ * [Parameters](#parameters-59)
232
236
  * [provider](#provider-2)
233
237
  * [owner](#owner)
234
238
  * [fullName](#fullname-1)
@@ -244,7 +248,7 @@ console.log(await readme.getString());
244
248
  * [attributes](#attributes-1)
245
249
  * [isProtected](#isprotected-1)
246
250
  * [RepositoryGroup](#repositorygroup-1)
247
- * [Parameters](#parameters-58)
251
+ * [Parameters](#parameters-60)
248
252
  * [Properties](#properties-10)
249
253
  * [repositoryClass](#repositoryclass-1)
250
254
  * [branchClass](#branchclass-1)
@@ -255,22 +259,22 @@ console.log(await readme.getString());
255
259
  * [type](#type)
256
260
  * [url](#url-3)
257
261
  * [RepositoryOwner](#repositoryowner)
258
- * [Parameters](#parameters-59)
262
+ * [Parameters](#parameters-61)
259
263
  * [Repository](#repository-2)
260
- * [Parameters](#parameters-60)
264
+ * [Parameters](#parameters-62)
261
265
  * [Properties](#properties-11)
262
266
  * [fullName](#fullname-2)
263
267
  * [slug](#slug)
264
268
  * [provider](#provider-3)
265
269
  * [identifier](#identifier-2)
266
270
  * [equals](#equals-6)
267
- * [Parameters](#parameters-61)
271
+ * [Parameters](#parameters-63)
268
272
  * [entry](#entry-1)
269
- * [Parameters](#parameters-62)
273
+ * [Parameters](#parameters-64)
270
274
  * [entries](#entries-1)
271
- * [Parameters](#parameters-63)
275
+ * [Parameters](#parameters-65)
272
276
  * [maybeEntry](#maybeentry-1)
273
- * [Parameters](#parameters-64)
277
+ * [Parameters](#parameters-66)
274
278
  * [urls](#urls)
275
279
  * [url](#url-4)
276
280
  * [cloneURL](#cloneurl)
@@ -282,40 +286,40 @@ console.log(await readme.getString());
282
286
  * [isDisabled](#isdisabled-1)
283
287
  * [isTemplate](#istemplate)
284
288
  * [branch](#branch-1)
285
- * [Parameters](#parameters-65)
289
+ * [Parameters](#parameters-67)
286
290
  * [defaultBranch](#defaultbranch)
287
291
  * [branches](#branches-1)
288
- * [Parameters](#parameters-66)
292
+ * [Parameters](#parameters-68)
289
293
  * [createBranch](#createbranch-1)
290
- * [Parameters](#parameters-67)
294
+ * [Parameters](#parameters-69)
291
295
  * [addBranch](#addbranch)
292
- * [Parameters](#parameters-68)
296
+ * [Parameters](#parameters-70)
293
297
  * [deleteBranch](#deletebranch)
294
- * [Parameters](#parameters-69)
298
+ * [Parameters](#parameters-71)
295
299
  * [tags](#tags-1)
296
- * [Parameters](#parameters-70)
300
+ * [Parameters](#parameters-72)
297
301
  * [tag](#tag)
298
- * [Parameters](#parameters-71)
302
+ * [Parameters](#parameters-73)
299
303
  * [delete](#delete-2)
300
304
  * [createPullRequest](#createpullrequest-1)
301
- * [Parameters](#parameters-72)
305
+ * [Parameters](#parameters-74)
302
306
  * [addPullRequest](#addpullrequest)
303
- * [Parameters](#parameters-73)
307
+ * [Parameters](#parameters-75)
304
308
  * [pullRequests](#pullrequests-1)
305
309
  * [pullRequest](#pullrequest-1)
306
- * [Parameters](#parameters-74)
310
+ * [Parameters](#parameters-76)
307
311
  * [deletePullRequest](#deletepullrequest)
308
- * [Parameters](#parameters-75)
312
+ * [Parameters](#parameters-77)
309
313
  * [addHook](#addhook)
310
- * [Parameters](#parameters-76)
314
+ * [Parameters](#parameters-78)
311
315
  * [createHook](#createhook)
312
- * [Parameters](#parameters-77)
316
+ * [Parameters](#parameters-79)
313
317
  * [hooks](#hooks-1)
314
318
  * [hook](#hook-1)
315
- * [Parameters](#parameters-78)
319
+ * [Parameters](#parameters-80)
316
320
  * [type](#type-1)
317
321
  * [refId](#refid-1)
318
- * [Parameters](#parameters-79)
322
+ * [Parameters](#parameters-81)
319
323
  * [repositoryClass](#repositoryclass-2)
320
324
  * [pullRequestClass](#pullrequestclass-3)
321
325
  * [branchClass](#branchclass-2)
@@ -329,23 +333,23 @@ console.log(await readme.getString());
329
333
  * [Review](#review)
330
334
  * [SingleGroupProvider](#singlegroupprovider)
331
335
  * [repository](#repository-3)
332
- * [Parameters](#parameters-80)
336
+ * [Parameters](#parameters-82)
333
337
  * [repositoryGroup](#repositorygroup-2)
334
- * [Parameters](#parameters-81)
338
+ * [Parameters](#parameters-83)
335
339
  * [repositoryGroups](#repositorygroups-1)
336
- * [Parameters](#parameters-82)
340
+ * [Parameters](#parameters-84)
337
341
  * [Tag](#tag-1)
338
- * [Parameters](#parameters-83)
342
+ * [Parameters](#parameters-85)
339
343
  * [refType](#reftype-1)
340
344
  * [isWritable](#iswritable-1)
341
345
  * [asArray](#asarray)
342
- * [Parameters](#parameters-84)
346
+ * [Parameters](#parameters-86)
343
347
  * [stripBaseName](#stripbasename)
344
- * [Parameters](#parameters-85)
348
+ * [Parameters](#parameters-87)
345
349
  * [stripBaseNames](#stripbasenames)
346
- * [Parameters](#parameters-86)
350
+ * [Parameters](#parameters-88)
347
351
  * [generateBranchName](#generatebranchname)
348
- * [Parameters](#parameters-87)
352
+ * [Parameters](#parameters-89)
349
353
 
350
354
  ## Application
351
355
 
@@ -397,6 +401,17 @@ Object.definedProperties(new aClass(),{ with_default: { value: 77 }})
397
401
  * `properties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** object properties (optional, default `{}`)
398
402
  * `attributes` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** (optional, default `object.constructor.attributes`)
399
403
 
404
+ ## defaultValues
405
+
406
+ Get default values.
407
+
408
+ ### Parameters
409
+
410
+ * `attributes` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
411
+ * `object`
412
+
413
+ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** filled with default values
414
+
400
415
  ## setAttribute
401
416
 
402
417
  Set Object attribute.
@@ -553,7 +568,7 @@ Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/
553
568
 
554
569
  ### repositoryBases
555
570
 
556
- All possible base urls.
571
+ All supported base urls.
557
572
  For github something like:
558
573
 
559
574
  * <git@github.com>
@@ -624,6 +639,17 @@ base, group, repository and branch.
624
639
 
625
640
  Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** with separated attributes
626
641
 
642
+ ### createRepository
643
+
644
+ Create a repository.
645
+
646
+ #### Parameters
647
+
648
+ * `name` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** of group and repository
649
+ * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)**
650
+
651
+ Returns **[Promise](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)<[Repository](#repository)>**
652
+
627
653
  ### list
628
654
 
629
655
  List provider objects of a given type.
@@ -703,14 +729,6 @@ List pull requests.
703
729
 
704
730
  Returns **AsyncIterator<[PullRequest](#pullrequest)>** all matching pullRequests of the provider
705
731
 
706
- ### repositoryGroupClass
707
-
708
- Returns **Class** repository group class used by the Provider
709
-
710
- ### hookClass
711
-
712
- Returns **Class** hook class used by the Provider
713
-
714
732
  ### name
715
733
 
716
734
  Deliver the provider name.
@@ -732,6 +750,14 @@ Returns **any** url otf the provider.
732
750
  List all defined entries from attributes.
733
751
  return {object}
734
752
 
753
+ ### repositoryGroupClass
754
+
755
+ Returns **Class** repository group class used by the Provider
756
+
757
+ ### hookClass
758
+
759
+ Returns **Class** hook class used by the Provider
760
+
735
761
  ### repositoryClass
736
762
 
737
763
  Returns **Class** repository class used by the Provider
@@ -782,7 +808,7 @@ Creates a new provider for a given set of options.
782
808
 
783
809
  * `options` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** additional options (optional, default `{}`)
784
810
 
785
- * `options.instanceIdentifier` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**
811
+ * `options.instanceIdentifier` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?** name of the provider instance
786
812
  * `env` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** taken from process.env
787
813
 
788
814
  Returns **[BaseProvider](#baseprovider)** newly created provider or undefined if options are not sufficient to construct a provider
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repository-provider",
3
- "version": "26.1.2",
3
+ "version": "26.1.3",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -33,15 +33,15 @@
33
33
  "matching-iterator": "^2.0.0"
34
34
  },
35
35
  "devDependencies": {
36
- "ava": "^3.15.0",
36
+ "ava": "^4.0.1",
37
37
  "c8": "^7.11.0",
38
38
  "documentation": "^13.2.5",
39
- "repository-provider-test-support": "^1.9.1",
39
+ "repository-provider-test-support": "^1.9.6",
40
40
  "semantic-release": "^18.0.1",
41
- "typescript": "^4.6.0-dev.20211231"
41
+ "typescript": "^4.6.0-dev.20220115"
42
42
  },
43
43
  "engines": {
44
- "node": ">=14.18.1"
44
+ "node": ">=14.18.3"
45
45
  },
46
46
  "repository": {
47
47
  "type": "git",