repository-provider 32.4.2 → 32.4.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/README.md +5 -10
- package/package.json +1 -1
- package/src/attributes.mjs +6 -6
- package/src/base-object.mjs +3 -3
- package/src/base-provider.mjs +4 -4
- package/src/hook.mjs +2 -2
- package/src/named-object.mjs +4 -4
- package/src/pull-request.mjs +2 -2
- package/src/repository-group.mjs +3 -3
- package/src/repository.mjs +6 -6
package/README.md
CHANGED
|
@@ -66,7 +66,6 @@ console.log(await readme.getString());
|
|
|
66
66
|
* [Parameters](#parameters-7)
|
|
67
67
|
* [description](#description)
|
|
68
68
|
* [id](#id)
|
|
69
|
-
* [uuid](#uuid)
|
|
70
69
|
* [body](#body)
|
|
71
70
|
* [title](#title)
|
|
72
71
|
* [priority](#priority)
|
|
@@ -184,7 +183,6 @@ console.log(await readme.getString());
|
|
|
184
183
|
* [Properties](#properties-6)
|
|
185
184
|
* [equals](#equals-2)
|
|
186
185
|
* [Parameters](#parameters-41)
|
|
187
|
-
* [fullName](#fullname-1)
|
|
188
186
|
* [toJSON](#tojson-1)
|
|
189
187
|
* [attributes](#attributes-1)
|
|
190
188
|
* [homePageURL](#homepageurl)
|
|
@@ -196,6 +194,7 @@ console.log(await readme.getString());
|
|
|
196
194
|
* [api](#api)
|
|
197
195
|
* [provider](#provider-1)
|
|
198
196
|
* [identifier](#identifier)
|
|
197
|
+
* [fullName](#fullname-1)
|
|
199
198
|
* [trace](#trace)
|
|
200
199
|
* [Parameters](#parameters-44)
|
|
201
200
|
* [info](#info)
|
|
@@ -489,10 +488,6 @@ The description of the object content.
|
|
|
489
488
|
|
|
490
489
|
Unique id within the provider.
|
|
491
490
|
|
|
492
|
-
## uuid
|
|
493
|
-
|
|
494
|
-
Unique id.
|
|
495
|
-
|
|
496
491
|
## body
|
|
497
492
|
|
|
498
493
|
The description of the pull request.
|
|
@@ -1110,10 +1105,6 @@ Check for equality.
|
|
|
1110
1105
|
|
|
1111
1106
|
Returns **[boolean](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Boolean)** true if names are equal and have the same provider
|
|
1112
1107
|
|
|
1113
|
-
### fullName
|
|
1114
|
-
|
|
1115
|
-
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name with owner name
|
|
1116
|
-
|
|
1117
1108
|
### toJSON
|
|
1118
1109
|
|
|
1119
1110
|
Provided name and all defined attributes.
|
|
@@ -1173,6 +1164,10 @@ Short human readable identifier with provider and branch.
|
|
|
1173
1164
|
|
|
1174
1165
|
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
|
|
1175
1166
|
|
|
1167
|
+
### fullName
|
|
1168
|
+
|
|
1169
|
+
Returns **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** name with owner name
|
|
1170
|
+
|
|
1176
1171
|
### trace
|
|
1177
1172
|
|
|
1178
1173
|
Forwarded to the owner.
|
package/package.json
CHANGED
package/src/attributes.mjs
CHANGED
|
@@ -24,12 +24,12 @@ export const name_attribute = {
|
|
|
24
24
|
isKey: true
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
export const
|
|
27
|
+
export const url_attribute = { description: "home of the object", type: "url" };
|
|
28
28
|
|
|
29
29
|
/**
|
|
30
30
|
* The description of the object content.
|
|
31
31
|
*/
|
|
32
|
-
export const
|
|
32
|
+
export const description_attribute = {
|
|
33
33
|
type: "string",
|
|
34
34
|
description: "human readable description",
|
|
35
35
|
mandatory: false,
|
|
@@ -39,7 +39,7 @@ export const description = {
|
|
|
39
39
|
/**
|
|
40
40
|
* Unique id within the provider.
|
|
41
41
|
*/
|
|
42
|
-
export const
|
|
42
|
+
export const id_attribute = { isKey: true, type: "string" };
|
|
43
43
|
|
|
44
44
|
export const state = { type: "string" };
|
|
45
45
|
|
|
@@ -62,7 +62,7 @@ export const title = {
|
|
|
62
62
|
* In case there are several providers able to support a given source which one sould be used ?
|
|
63
63
|
* this defines the order
|
|
64
64
|
*/
|
|
65
|
-
export const
|
|
65
|
+
export const priority_attribute = {
|
|
66
66
|
type: "number",
|
|
67
67
|
default: 0,
|
|
68
68
|
writable: true,
|
|
@@ -75,5 +75,5 @@ export const active = {
|
|
|
75
75
|
mandatory: false,
|
|
76
76
|
writable: true
|
|
77
77
|
};
|
|
78
|
-
export const
|
|
79
|
-
export const type = { type: "string" };
|
|
78
|
+
export const language_attribute = { type: "string", mandatory: false };
|
|
79
|
+
export const type = { type: "string", mandatory: false };
|
package/src/base-object.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { definePropertiesFromOptions, mapAttributes } from "./attribute.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { description_attribute, id_attribute } from "./attributes.mjs";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @param {Object} options
|
|
@@ -30,8 +30,8 @@ export class BaseObject {
|
|
|
30
30
|
*/
|
|
31
31
|
static get attributes() {
|
|
32
32
|
return {
|
|
33
|
-
description,
|
|
34
|
-
id
|
|
33
|
+
description: description_attribute,
|
|
34
|
+
id: id_attribute
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
|
package/src/base-provider.mjs
CHANGED
|
@@ -8,7 +8,7 @@ import { Hook } from "./hook.mjs";
|
|
|
8
8
|
import { Project } from "./project.mjs";
|
|
9
9
|
import { Milestone } from "./milestone.mjs";
|
|
10
10
|
import { BaseObject } from "./base-object.mjs";
|
|
11
|
-
import {
|
|
11
|
+
import { url_attribute, name_attribute, description_attribute, priority_attribute } from "./attributes.mjs";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {Object} MessageDestination
|
|
@@ -97,9 +97,9 @@ export class BaseProvider extends BaseObject {
|
|
|
97
97
|
|
|
98
98
|
static get attributes() {
|
|
99
99
|
return {
|
|
100
|
-
url,
|
|
101
|
-
description,
|
|
102
|
-
priority,
|
|
100
|
+
url: url_attribute,
|
|
101
|
+
description : description_attribute,
|
|
102
|
+
priority: priority_attribute,
|
|
103
103
|
|
|
104
104
|
/**
|
|
105
105
|
* Name of the provider.
|
package/src/hook.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
secret_attribute,
|
|
4
4
|
boolean_attribute,
|
|
5
5
|
active,
|
|
6
|
-
|
|
6
|
+
url_attribute
|
|
7
7
|
} from "./attributes.mjs";
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -15,7 +15,7 @@ export class Hook extends OwnedObject {
|
|
|
15
15
|
...super.attributes,
|
|
16
16
|
active,
|
|
17
17
|
secret: secret_attribute,
|
|
18
|
-
url: { ...
|
|
18
|
+
url: { ...url_attribute, description: "target url", writable: true },
|
|
19
19
|
content_type: { type: "string", default: "json", writable: true },
|
|
20
20
|
insecure_ssl: boolean_attribute,
|
|
21
21
|
events: { type: "set", default: new Set(["*"]) }
|
package/src/named-object.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { optionJSON } from "./attribute.mjs";
|
|
2
2
|
import { BaseObject } from "./base-object.mjs";
|
|
3
|
-
import { name_attribute,
|
|
3
|
+
import { name_attribute, url_attribute, description_attribute, id_attribute } from "./attributes.mjs";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Object with a name.
|
|
@@ -17,14 +17,14 @@ export class NamedObject extends BaseObject {
|
|
|
17
17
|
static get attributes() {
|
|
18
18
|
return {
|
|
19
19
|
name: name_attribute,
|
|
20
|
-
id,
|
|
21
|
-
description,
|
|
20
|
+
id: id_attribute,
|
|
21
|
+
description: description_attribute,
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* The url of home page.
|
|
25
25
|
* @return {string}
|
|
26
26
|
*/
|
|
27
|
-
homePageURL: { ...
|
|
27
|
+
homePageURL: { ...url_attribute, writable: true }
|
|
28
28
|
};
|
|
29
29
|
}
|
|
30
30
|
|
package/src/pull-request.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { OwnedObject } from "./owned-object.mjs";
|
|
|
3
3
|
import { Branch } from "./branch.mjs";
|
|
4
4
|
import { Repository } from "./repository.mjs";
|
|
5
5
|
import { Review } from "./review.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { url_attribute, state, body, title, boolean_attribute, empty_attiribute } from "./attributes.mjs";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Abstract pull request.
|
|
@@ -87,7 +87,7 @@ export class PullRequest extends OwnedObject {
|
|
|
87
87
|
...super.attributes,
|
|
88
88
|
body,
|
|
89
89
|
title,
|
|
90
|
-
url,
|
|
90
|
+
url: url_attribute,
|
|
91
91
|
|
|
92
92
|
/**
|
|
93
93
|
* state of the pull request.
|
package/src/repository-group.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { RepositoryOwner } from "./repository-owner.mjs";
|
|
2
2
|
import { OwnedObject } from "./owned-object.mjs";
|
|
3
3
|
import { BaseProvider } from "./base-provider.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { url_attribute, boolean_attribute, type } from "./attributes.mjs";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Abstract repository collection.
|
|
@@ -43,8 +43,8 @@ export class RepositoryGroup extends RepositoryOwner(OwnedObject) {
|
|
|
43
43
|
* Type of the repository group either User or Organization.
|
|
44
44
|
*/
|
|
45
45
|
type,
|
|
46
|
-
url,
|
|
47
|
-
avatarURL:
|
|
46
|
+
url: url_attribute,
|
|
47
|
+
avatarURL: url_attribute,
|
|
48
48
|
isAdmin: boolean_attribute
|
|
49
49
|
};
|
|
50
50
|
}
|
package/src/repository.mjs
CHANGED
|
@@ -4,7 +4,7 @@ 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 {
|
|
7
|
+
import { url_attribute, size_attribute, language_attribute, boolean_attribute, boolean_read_only_attribute } from "./attributes.mjs";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Abstract repository
|
|
@@ -43,9 +43,9 @@ export class Repository extends OwnedObject {
|
|
|
43
43
|
static get attributes() {
|
|
44
44
|
return {
|
|
45
45
|
...super.attributes,
|
|
46
|
-
url,
|
|
47
|
-
size_attribute,
|
|
48
|
-
language,
|
|
46
|
+
url: url_attribute,
|
|
47
|
+
size: size_attribute,
|
|
48
|
+
language: language_attribute,
|
|
49
49
|
|
|
50
50
|
/**
|
|
51
51
|
* The name of the default branch
|
|
@@ -53,13 +53,13 @@ export class Repository extends OwnedObject {
|
|
|
53
53
|
*/
|
|
54
54
|
defaultBranchName: { type: "string", default: "master" },
|
|
55
55
|
|
|
56
|
-
cloneURL:
|
|
56
|
+
cloneURL: url_attribute,
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* The url of issue tracking system.
|
|
60
60
|
* @return {string}
|
|
61
61
|
*/
|
|
62
|
-
issuesURL:
|
|
62
|
+
issuesURL: url_attribute,
|
|
63
63
|
isArchived: boolean_attribute,
|
|
64
64
|
isLocked: boolean_attribute,
|
|
65
65
|
isDisabled: boolean_attribute,
|