repository-provider 32.4.1 → 32.4.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.
- package/README.md +5 -10
- package/package.json +1 -1
- package/src/attributes.mjs +23 -14
- package/src/base-object.mjs +3 -3
- package/src/base-provider.mjs +6 -5
- package/src/hook.mjs +2 -2
- package/src/named-object.mjs +5 -12
- package/src/owned-object.mjs +7 -0
- package/src/pull-request.mjs +2 -2
- package/src/repository-group.mjs +3 -3
- package/src/repository.mjs +4 -4
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
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
export const boolean_attribute = {
|
|
2
2
|
type: "boolean",
|
|
3
3
|
default: false,
|
|
4
|
+
mandatory: false,
|
|
4
5
|
writable: true
|
|
5
6
|
};
|
|
6
7
|
|
|
7
8
|
export const boolean_read_only_attribute = {
|
|
8
9
|
type: "boolean",
|
|
9
|
-
default: false
|
|
10
|
+
default: false,
|
|
11
|
+
mandatory: false
|
|
10
12
|
};
|
|
11
13
|
|
|
12
14
|
export const uuid_attiribute = { isKey: true, type: "string" };
|
|
@@ -16,28 +18,28 @@ export const secret_attribute = {
|
|
|
16
18
|
private: true,
|
|
17
19
|
writable: true
|
|
18
20
|
};
|
|
19
|
-
export const size_attribute = { type: "integer" };
|
|
21
|
+
export const size_attribute = { type: "integer", mandatory: false };
|
|
22
|
+
export const name_attribute = {
|
|
23
|
+
type: "string",
|
|
24
|
+
isKey: true
|
|
25
|
+
};
|
|
20
26
|
|
|
21
|
-
export const
|
|
27
|
+
export const url_attribute = { description: "home of the object", type: "url" };
|
|
22
28
|
|
|
23
29
|
/**
|
|
24
30
|
* The description of the object content.
|
|
25
31
|
*/
|
|
26
|
-
export const
|
|
32
|
+
export const description_attribute = {
|
|
27
33
|
type: "string",
|
|
28
34
|
description: "human readable description",
|
|
35
|
+
mandatory: false,
|
|
29
36
|
writable: true
|
|
30
37
|
};
|
|
31
38
|
|
|
32
|
-
export const name = {
|
|
33
|
-
type: "string",
|
|
34
|
-
isKey: true
|
|
35
|
-
};
|
|
36
|
-
|
|
37
39
|
/**
|
|
38
40
|
* Unique id within the provider.
|
|
39
41
|
*/
|
|
40
|
-
export const
|
|
42
|
+
export const id_attribute = { isKey: true, type: "string" };
|
|
41
43
|
|
|
42
44
|
export const state = { type: "string" };
|
|
43
45
|
|
|
@@ -52,19 +54,26 @@ export const body = { type: "string", writable: true };
|
|
|
52
54
|
export const title = {
|
|
53
55
|
type: "string",
|
|
54
56
|
description: "human readable title",
|
|
55
|
-
writable: true
|
|
57
|
+
writable: true,
|
|
58
|
+
mandatory: false
|
|
56
59
|
};
|
|
57
60
|
|
|
58
61
|
/**
|
|
59
62
|
* In case there are several providers able to support a given source which one sould be used ?
|
|
60
63
|
* this defines the order
|
|
61
64
|
*/
|
|
62
|
-
export const
|
|
65
|
+
export const priority_attribute = {
|
|
63
66
|
type: "number",
|
|
64
67
|
default: 0,
|
|
65
|
-
writable: true
|
|
68
|
+
writable: true,
|
|
69
|
+
mandatory: false
|
|
66
70
|
};
|
|
67
71
|
|
|
68
|
-
export const active = {
|
|
72
|
+
export const active = {
|
|
73
|
+
type: "boolean",
|
|
74
|
+
default: true,
|
|
75
|
+
mandatory: false,
|
|
76
|
+
writable: true
|
|
77
|
+
};
|
|
69
78
|
export const language = { type: "string" };
|
|
70
79
|
export const type = { type: "string" };
|
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,15 +97,15 @@ 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.
|
|
106
106
|
*/
|
|
107
107
|
name: {
|
|
108
|
-
...
|
|
108
|
+
...name_attribute,
|
|
109
109
|
env: ["{{instanceIdentifier}}NAME"]
|
|
110
110
|
},
|
|
111
111
|
|
|
@@ -115,6 +115,7 @@ export class BaseProvider extends BaseObject {
|
|
|
115
115
|
messageDestination: {
|
|
116
116
|
type: "object",
|
|
117
117
|
default: console,
|
|
118
|
+
mandatory: false,
|
|
118
119
|
writable: true,
|
|
119
120
|
private: true
|
|
120
121
|
}
|
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 {
|
|
3
|
+
import { name_attribute, url_attribute, description_attribute, id_attribute } from "./attributes.mjs";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Object with a name.
|
|
@@ -16,15 +16,15 @@ export class NamedObject extends BaseObject {
|
|
|
16
16
|
*/
|
|
17
17
|
static get attributes() {
|
|
18
18
|
return {
|
|
19
|
-
name,
|
|
20
|
-
id,
|
|
21
|
-
description,
|
|
19
|
+
name: name_attribute,
|
|
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
|
|
|
@@ -48,13 +48,6 @@ export class NamedObject extends BaseObject {
|
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
/**
|
|
52
|
-
* @return {string} name with owner name
|
|
53
|
-
*/
|
|
54
|
-
get fullName() {
|
|
55
|
-
return this.owner ? this.owner.name + "/" + this.name : this.name;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
51
|
/**
|
|
59
52
|
* Provided name and all defined attributes.
|
|
60
53
|
*/
|
package/src/owned-object.mjs
CHANGED
|
@@ -63,6 +63,13 @@ export class OwnedObject extends NamedObject {
|
|
|
63
63
|
return `${this.provider.name}:${this.fullCondensedName}`;
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* @return {string} name with owner name
|
|
68
|
+
*/
|
|
69
|
+
get fullName() {
|
|
70
|
+
return this.owner.name + "/" + this.name;
|
|
71
|
+
}
|
|
72
|
+
|
|
66
73
|
/**
|
|
67
74
|
* Forwarded to the owner.
|
|
68
75
|
* @param {...any} args
|
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, boolean_attribute, boolean_read_only_attribute } from "./attributes.mjs";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Abstract repository
|
|
@@ -43,7 +43,7 @@ export class Repository extends OwnedObject {
|
|
|
43
43
|
static get attributes() {
|
|
44
44
|
return {
|
|
45
45
|
...super.attributes,
|
|
46
|
-
url,
|
|
46
|
+
url: url_attribute,
|
|
47
47
|
size_attribute,
|
|
48
48
|
language,
|
|
49
49
|
|
|
@@ -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,
|