repository-provider 35.2.6 → 35.2.7
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 +81 -1
- package/package.json +2 -2
- package/src/attribute-extras.mjs +2 -1
- package/src/attributes.mjs +1 -1
- package/src/base-provider.mjs +2 -23
- package/src/owned-object.mjs +8 -32
- package/src/ref.mjs +2 -1
- package/types/attribute-extras.d.mts +1 -1
- package/types/attributes.d.mts +1 -1
- package/types/base-provider.d.mts +0 -21
- package/types/owned-object.d.mts +13 -38
- package/types/ref.d.mts +3 -9
package/README.md
CHANGED
|
@@ -58,11 +58,25 @@ console.log(await readme.string);
|
|
|
58
58
|
* [mapAttributesInverse](#mapattributesinverse)
|
|
59
59
|
* [Parameters](#parameters-4)
|
|
60
60
|
* [default\_attribute](#default_attribute)
|
|
61
|
+
* [default\_attribute](#default_attribute-1)
|
|
62
|
+
* [boolean\_attribute](#boolean_attribute)
|
|
63
|
+
* [boolean\_read\_only\_attribute](#boolean_read_only_attribute)
|
|
64
|
+
* [uuid\_attribute](#uuid_attribute)
|
|
65
|
+
* [empty\_attiribute](#empty_attiribute)
|
|
66
|
+
* [secret\_attribute](#secret_attribute)
|
|
67
|
+
* [count\_attribute](#count_attribute)
|
|
68
|
+
* [size\_attribute](#size_attribute)
|
|
69
|
+
* [name\_attribute](#name_attribute)
|
|
70
|
+
* [url\_attribute](#url_attribute)
|
|
61
71
|
* [description\_attribute](#description_attribute)
|
|
62
72
|
* [id\_attribute](#id_attribute)
|
|
73
|
+
* [state\_attribute](#state_attribute)
|
|
63
74
|
* [body\_attribute](#body_attribute)
|
|
64
75
|
* [title\_attribute](#title_attribute)
|
|
65
76
|
* [priority\_attribute](#priority_attribute)
|
|
77
|
+
* [active\_attribute](#active_attribute)
|
|
78
|
+
* [language\_attribute](#language_attribute)
|
|
79
|
+
* [type\_attribute](#type_attribute)
|
|
66
80
|
* [BaseObject](#baseobject)
|
|
67
81
|
* [Parameters](#parameters-5)
|
|
68
82
|
* [Properties](#properties)
|
|
@@ -549,28 +563,94 @@ Returns **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/G
|
|
|
549
563
|
|
|
550
564
|
## default\_attribute
|
|
551
565
|
|
|
566
|
+
## default\_attribute
|
|
567
|
+
|
|
552
568
|
common attributes
|
|
553
569
|
|
|
570
|
+
Type: AttributeDefinition
|
|
571
|
+
|
|
572
|
+
## boolean\_attribute
|
|
573
|
+
|
|
574
|
+
Type: AttributeDefinition
|
|
575
|
+
|
|
576
|
+
## boolean\_read\_only\_attribute
|
|
577
|
+
|
|
578
|
+
Type: AttributeDefinition
|
|
579
|
+
|
|
580
|
+
## uuid\_attribute
|
|
581
|
+
|
|
582
|
+
Type: AttributeDefinition
|
|
583
|
+
|
|
584
|
+
## empty\_attiribute
|
|
585
|
+
|
|
586
|
+
Type: AttributeDefinition
|
|
587
|
+
|
|
588
|
+
## secret\_attribute
|
|
589
|
+
|
|
590
|
+
Type: AttributeDefinition
|
|
591
|
+
|
|
592
|
+
## count\_attribute
|
|
593
|
+
|
|
594
|
+
Type: AttributeDefinition
|
|
595
|
+
|
|
596
|
+
## size\_attribute
|
|
597
|
+
|
|
598
|
+
Type: AttributeDefinition
|
|
599
|
+
|
|
600
|
+
## name\_attribute
|
|
601
|
+
|
|
602
|
+
Type: AttributeDefinition
|
|
603
|
+
|
|
604
|
+
## url\_attribute
|
|
605
|
+
|
|
606
|
+
Type: AttributeDefinition
|
|
607
|
+
|
|
554
608
|
## description\_attribute
|
|
555
609
|
|
|
556
610
|
The description of the object content.
|
|
557
611
|
|
|
612
|
+
Type: AttributeDefinition
|
|
613
|
+
|
|
558
614
|
## id\_attribute
|
|
559
615
|
|
|
560
616
|
Unique id within the provider.
|
|
561
617
|
|
|
618
|
+
Type: AttributeDefinition
|
|
619
|
+
|
|
620
|
+
## state\_attribute
|
|
621
|
+
|
|
622
|
+
Type: AttributeDefinition
|
|
623
|
+
|
|
562
624
|
## body\_attribute
|
|
563
625
|
|
|
564
626
|
The description of the pull request.
|
|
565
627
|
|
|
628
|
+
Type: AttributeDefinition
|
|
629
|
+
|
|
566
630
|
## title\_attribute
|
|
567
631
|
|
|
568
632
|
The one line description of the pull request.
|
|
569
633
|
|
|
634
|
+
Type: AttributeDefinition
|
|
635
|
+
|
|
570
636
|
## priority\_attribute
|
|
571
637
|
|
|
572
638
|
In case there are several providers able to support a given source which one sould be used ?
|
|
573
|
-
this defines the order
|
|
639
|
+
this defines the order.
|
|
640
|
+
|
|
641
|
+
Type: AttributeDefinition
|
|
642
|
+
|
|
643
|
+
## active\_attribute
|
|
644
|
+
|
|
645
|
+
Type: AttributeDefinition
|
|
646
|
+
|
|
647
|
+
## language\_attribute
|
|
648
|
+
|
|
649
|
+
Type: AttributeDefinition
|
|
650
|
+
|
|
651
|
+
## type\_attribute
|
|
652
|
+
|
|
653
|
+
Type: AttributeDefinition
|
|
574
654
|
|
|
575
655
|
## BaseObject
|
|
576
656
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "35.2.
|
|
3
|
+
"version": "35.2.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": true
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"browser-ava": "^2.2.0",
|
|
46
46
|
"c8": "^9.1.0",
|
|
47
47
|
"documentation": "^14.0.3",
|
|
48
|
-
"repository-provider-test-support": "^3.0.
|
|
48
|
+
"repository-provider-test-support": "^3.0.5",
|
|
49
49
|
"semantic-release": "^23.0.2",
|
|
50
50
|
"typescript": "^5.3.3"
|
|
51
51
|
},
|
package/src/attribute-extras.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { setAttribute, getAttribute } from "pacc";
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
/**
|
|
4
5
|
* Create properties from options and default options.
|
|
5
6
|
* Already present properties (direct) are skipped.
|
|
@@ -19,7 +20,7 @@ import { setAttribute, getAttribute } from "pacc";
|
|
|
19
20
|
* @see Object.definedProperties()
|
|
20
21
|
* @see Object.getOwnPropertyDescriptor()
|
|
21
22
|
* @param {Object} object target object
|
|
22
|
-
* @param {Object} options as passed to object constructor
|
|
23
|
+
* @param {Object} options as passed to object constructor. Used as values for the attributes.
|
|
23
24
|
* @param {Object} properties object properties
|
|
24
25
|
* @param {Object} [attributes] attribute meta info
|
|
25
26
|
*/
|
package/src/attributes.mjs
CHANGED
package/src/base-provider.mjs
CHANGED
|
@@ -305,7 +305,7 @@ export class BaseProvider extends BaseObject {
|
|
|
305
305
|
const rg = await this.repositoryGroup(group);
|
|
306
306
|
return rg.createRepository(repository, options);
|
|
307
307
|
}
|
|
308
|
-
|
|
308
|
+
|
|
309
309
|
/**
|
|
310
310
|
* List provider objects of a given type.
|
|
311
311
|
*
|
|
@@ -460,51 +460,30 @@ export class BaseProvider extends BaseObject {
|
|
|
460
460
|
return this.messageDestination.error(...args);
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
/**
|
|
464
|
-
* @return {typeof RepositoryGroup} repository group class used by the Provider
|
|
465
|
-
*/
|
|
466
463
|
get repositoryGroupClass() {
|
|
467
464
|
return RepositoryGroup;
|
|
468
465
|
}
|
|
469
466
|
|
|
470
|
-
/**
|
|
471
|
-
* @return {typeof Hook} hook class used by the Provider
|
|
472
|
-
*/
|
|
473
467
|
get hookClass() {
|
|
474
468
|
return Hook;
|
|
475
469
|
}
|
|
476
470
|
|
|
477
|
-
/**
|
|
478
|
-
* @return {typeof Repository} repository class used by the Provider
|
|
479
|
-
*/
|
|
480
471
|
get repositoryClass() {
|
|
481
472
|
return Repository;
|
|
482
473
|
}
|
|
483
474
|
|
|
484
|
-
/**
|
|
485
|
-
* @return {typeof Branch} branch class used by the Provider
|
|
486
|
-
*/
|
|
487
475
|
get branchClass() {
|
|
488
476
|
return Branch;
|
|
489
477
|
}
|
|
490
478
|
|
|
491
|
-
/**
|
|
492
|
-
* @return {typeof Tag} branch class used by the Provider
|
|
493
|
-
*/
|
|
494
479
|
get tagClass() {
|
|
495
480
|
return Tag;
|
|
496
481
|
}
|
|
497
482
|
|
|
498
|
-
/**
|
|
499
|
-
* @return {typeof ContentEntry} entry class used by the Provider
|
|
500
|
-
*/
|
|
501
483
|
get entryClass() {
|
|
502
|
-
return
|
|
484
|
+
return ContentEntry;
|
|
503
485
|
}
|
|
504
486
|
|
|
505
|
-
/**
|
|
506
|
-
* @return {typeof PullRequest} pull request class used by the Provider
|
|
507
|
-
*/
|
|
508
487
|
get pullRequestClass() {
|
|
509
488
|
return PullRequest;
|
|
510
489
|
}
|
package/src/owned-object.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ContentEntry } from "content-entry";
|
|
2
2
|
import { NamedObject } from "./named-object.mjs";
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
6
|
-
* @typedef {import('./repository.mjs').Repository} Repository
|
|
7
|
-
* @typedef {import('./hook.mjs').Hook} Hook
|
|
8
|
-
* @typedef {import('./tag.mjs').Tag} Tag
|
|
9
|
-
* @typedef {import('./branch.mjs').Branch} Branch
|
|
10
|
-
* @typedef {import('./pull-request.mjs').PullRequest} PullRequest
|
|
11
|
-
*/
|
|
4
|
+
/**
|
|
5
|
+
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
6
|
+
* @typedef {import('./repository.mjs').Repository} Repository
|
|
7
|
+
* @typedef {import('./hook.mjs').Hook} Hook
|
|
8
|
+
* @typedef {import('./tag.mjs').Tag} Tag
|
|
9
|
+
* @typedef {import('./branch.mjs').Branch} Branch
|
|
10
|
+
* @typedef {import('./pull-request.mjs').PullRequest} PullRequest
|
|
11
|
+
*/
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Named Object registering itself in the owner.
|
|
@@ -189,50 +189,26 @@ export class OwnedObject extends NamedObject {
|
|
|
189
189
|
return this.owner.debug(...args);
|
|
190
190
|
}
|
|
191
191
|
|
|
192
|
-
/**
|
|
193
|
-
* By default we use the owners implementation.
|
|
194
|
-
* @return {Repository} as defined in the owner
|
|
195
|
-
*/
|
|
196
192
|
get repositoryClass() {
|
|
197
193
|
return this.owner.repositoryClass;
|
|
198
194
|
}
|
|
199
195
|
|
|
200
|
-
/**
|
|
201
|
-
* By default we use the owners implementation.
|
|
202
|
-
* @return {PullRequest} as defined in the owner
|
|
203
|
-
*/
|
|
204
196
|
get pullRequestClass() {
|
|
205
197
|
return this.owner.pullRequestClass;
|
|
206
198
|
}
|
|
207
199
|
|
|
208
|
-
/**
|
|
209
|
-
* By default we use the owners implementation.
|
|
210
|
-
* @return {Branch} as defined in the owner
|
|
211
|
-
*/
|
|
212
200
|
get branchClass() {
|
|
213
201
|
return this.owner.branchClass;
|
|
214
202
|
}
|
|
215
203
|
|
|
216
|
-
/**
|
|
217
|
-
* By default we use the owners implementation.
|
|
218
|
-
* @return {Tag} as defined in the owner
|
|
219
|
-
*/
|
|
220
204
|
get tagClass() {
|
|
221
205
|
return this.owner.tagClass;
|
|
222
206
|
}
|
|
223
207
|
|
|
224
|
-
/**
|
|
225
|
-
* By default we use the owners implementation.
|
|
226
|
-
* @return {ContentEntry} as defined in the owner
|
|
227
|
-
*/
|
|
228
208
|
get entryClass() {
|
|
229
209
|
return this.owner.entryClass;
|
|
230
210
|
}
|
|
231
211
|
|
|
232
|
-
/**
|
|
233
|
-
* By default we use the owners implementation.
|
|
234
|
-
* @return {Hook} as defined in the owner
|
|
235
|
-
*/
|
|
236
212
|
get hookClass() {
|
|
237
213
|
return this.owner.hookClass;
|
|
238
214
|
}
|
package/src/ref.mjs
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
* @see Object.definedProperties()
|
|
18
18
|
* @see Object.getOwnPropertyDescriptor()
|
|
19
19
|
* @param {Object} object target object
|
|
20
|
-
* @param {Object} options as passed to object constructor
|
|
20
|
+
* @param {Object} options as passed to object constructor. Used as values for the attributes.
|
|
21
21
|
* @param {Object} properties object properties
|
|
22
22
|
* @param {Object} [attributes] attribute meta info
|
|
23
23
|
*/
|
package/types/attributes.d.mts
CHANGED
|
@@ -224,33 +224,12 @@ export class BaseProvider extends BaseObject {
|
|
|
224
224
|
info(...args: any[]): any;
|
|
225
225
|
warn(...args: any[]): any;
|
|
226
226
|
error(...args: any[]): any;
|
|
227
|
-
/**
|
|
228
|
-
* @return {typeof RepositoryGroup} repository group class used by the Provider
|
|
229
|
-
*/
|
|
230
227
|
get repositoryGroupClass(): typeof RepositoryGroup;
|
|
231
|
-
/**
|
|
232
|
-
* @return {typeof Hook} hook class used by the Provider
|
|
233
|
-
*/
|
|
234
228
|
get hookClass(): typeof Hook;
|
|
235
|
-
/**
|
|
236
|
-
* @return {typeof Repository} repository class used by the Provider
|
|
237
|
-
*/
|
|
238
229
|
get repositoryClass(): typeof Repository;
|
|
239
|
-
/**
|
|
240
|
-
* @return {typeof Branch} branch class used by the Provider
|
|
241
|
-
*/
|
|
242
230
|
get branchClass(): typeof Branch;
|
|
243
|
-
/**
|
|
244
|
-
* @return {typeof Tag} branch class used by the Provider
|
|
245
|
-
*/
|
|
246
231
|
get tagClass(): typeof Tag;
|
|
247
|
-
/**
|
|
248
|
-
* @return {typeof ContentEntry} entry class used by the Provider
|
|
249
|
-
*/
|
|
250
232
|
get entryClass(): typeof ContentEntry;
|
|
251
|
-
/**
|
|
252
|
-
* @return {typeof PullRequest} pull request class used by the Provider
|
|
253
|
-
*/
|
|
254
233
|
get pullRequestClass(): typeof PullRequest;
|
|
255
234
|
}
|
|
256
235
|
export type Project = import('./project.mjs').Project;
|
package/types/owned-object.d.mts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
3
|
-
* @typedef {import('./repository.mjs').Repository} Repository
|
|
4
|
-
* @typedef {import('./hook.mjs').Hook} Hook
|
|
5
|
-
* @typedef {import('./tag.mjs').Tag} Tag
|
|
6
|
-
* @typedef {import('./branch.mjs').Branch} Branch
|
|
7
|
-
* @typedef {import('./pull-request.mjs').PullRequest} PullRequest
|
|
8
|
-
*/
|
|
2
|
+
* @typedef {import('./base-provider.mjs').BaseProvider} BaseProvider
|
|
3
|
+
* @typedef {import('./repository.mjs').Repository} Repository
|
|
4
|
+
* @typedef {import('./hook.mjs').Hook} Hook
|
|
5
|
+
* @typedef {import('./tag.mjs').Tag} Tag
|
|
6
|
+
* @typedef {import('./branch.mjs').Branch} Branch
|
|
7
|
+
* @typedef {import('./pull-request.mjs').PullRequest} PullRequest
|
|
8
|
+
*/
|
|
9
9
|
/**
|
|
10
10
|
* Named Object registering itself in the owner.
|
|
11
11
|
*/
|
|
@@ -106,36 +106,12 @@ export class OwnedObject extends NamedObject {
|
|
|
106
106
|
* @param {...any} args
|
|
107
107
|
*/
|
|
108
108
|
debug(...args: any[]): any;
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
get
|
|
114
|
-
|
|
115
|
-
* By default we use the owners implementation.
|
|
116
|
-
* @return {PullRequest} as defined in the owner
|
|
117
|
-
*/
|
|
118
|
-
get pullRequestClass(): import("./pull-request.mjs").PullRequest;
|
|
119
|
-
/**
|
|
120
|
-
* By default we use the owners implementation.
|
|
121
|
-
* @return {Branch} as defined in the owner
|
|
122
|
-
*/
|
|
123
|
-
get branchClass(): import("./branch.mjs").Branch;
|
|
124
|
-
/**
|
|
125
|
-
* By default we use the owners implementation.
|
|
126
|
-
* @return {Tag} as defined in the owner
|
|
127
|
-
*/
|
|
128
|
-
get tagClass(): import("./tag.mjs").Tag;
|
|
129
|
-
/**
|
|
130
|
-
* By default we use the owners implementation.
|
|
131
|
-
* @return {ContentEntry} as defined in the owner
|
|
132
|
-
*/
|
|
133
|
-
get entryClass(): ContentEntry;
|
|
134
|
-
/**
|
|
135
|
-
* By default we use the owners implementation.
|
|
136
|
-
* @return {Hook} as defined in the owner
|
|
137
|
-
*/
|
|
138
|
-
get hookClass(): import("./hook.mjs").Hook;
|
|
109
|
+
get repositoryClass(): any;
|
|
110
|
+
get pullRequestClass(): any;
|
|
111
|
+
get branchClass(): any;
|
|
112
|
+
get tagClass(): any;
|
|
113
|
+
get entryClass(): any;
|
|
114
|
+
get hookClass(): any;
|
|
139
115
|
}
|
|
140
116
|
export type BaseProvider = import('./base-provider.mjs').BaseProvider;
|
|
141
117
|
export type Repository = import('./repository.mjs').Repository;
|
|
@@ -144,4 +120,3 @@ export type Tag = import('./tag.mjs').Tag;
|
|
|
144
120
|
export type Branch = import('./branch.mjs').Branch;
|
|
145
121
|
export type PullRequest = import('./pull-request.mjs').PullRequest;
|
|
146
122
|
import { NamedObject } from "./named-object.mjs";
|
|
147
|
-
import { ContentEntry } from "content-entry";
|
package/types/ref.d.mts
CHANGED
|
@@ -8,16 +8,10 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export class Ref extends OwnedObject {
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Attributes
|
|
12
|
+
* @type {Object}
|
|
12
13
|
*/
|
|
13
|
-
static get attributes():
|
|
14
|
-
name: import("pacc").AttributeDefinition;
|
|
15
|
-
/**
|
|
16
|
-
* Can the ref be modified.
|
|
17
|
-
* @return {boolean}
|
|
18
|
-
*/
|
|
19
|
-
isProtected: import("pacc").AttributeDefinition;
|
|
20
|
-
};
|
|
14
|
+
static get attributes(): any;
|
|
21
15
|
static get attributeMapping(): {
|
|
22
16
|
protected: string;
|
|
23
17
|
};
|