repository-provider 32.3.10 → 32.3.12
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 +2 -2
- package/src/attributes.mjs +34 -0
- package/src/base-object.mjs +4 -21
- package/src/base-provider.mjs +2 -2
- package/src/hook.mjs +3 -2
- package/src/milestone.mjs +2 -1
- package/src/named-object.mjs +2 -4
- package/src/pull-request.mjs +2 -2
- package/src/repository-group.mjs +1 -4
- package/src/repository.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.3.
|
|
3
|
+
"version": "32.3.12",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"browser-ava": "^1.3.13",
|
|
39
39
|
"c8": "^7.12.0",
|
|
40
40
|
"documentation": "^14.0.1",
|
|
41
|
-
"repository-provider-test-support": "^2.2.
|
|
41
|
+
"repository-provider-test-support": "^2.2.25",
|
|
42
42
|
"semantic-release": "^19.0.5",
|
|
43
43
|
"typescript": "^4.9.4"
|
|
44
44
|
},
|
package/src/attributes.mjs
CHANGED
|
@@ -1 +1,35 @@
|
|
|
1
1
|
export const url = { description: "home of the object", type: "url" };
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The description of the object content.
|
|
6
|
+
* @return {string}
|
|
7
|
+
*/
|
|
8
|
+
export const description = {
|
|
9
|
+
type: "string",
|
|
10
|
+
description: "human readable description",
|
|
11
|
+
writable: true
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export const name = {
|
|
15
|
+
type: "string",
|
|
16
|
+
isKey: true
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Unique id within the provider.
|
|
21
|
+
* @return {string}
|
|
22
|
+
*/
|
|
23
|
+
export const id = { isKey: true, type: "string" };
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Unique id.
|
|
27
|
+
* @return {string}
|
|
28
|
+
*/
|
|
29
|
+
export const uuid = { isKey: true, type: "string" };
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
export const state = { type: "string" };
|
|
33
|
+
|
|
34
|
+
export const secret = { type: "string", private: true, writable: true };
|
|
35
|
+
|
package/src/base-object.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { definePropertiesFromOptions, mapAttributes } from "./attribute.mjs";
|
|
2
|
+
import { description, id, uuid } from "./attributes.mjs";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @param {Object} options
|
|
@@ -29,27 +30,9 @@ export class BaseObject {
|
|
|
29
30
|
*/
|
|
30
31
|
static get attributes() {
|
|
31
32
|
return {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
*/
|
|
36
|
-
description: {
|
|
37
|
-
type: "string",
|
|
38
|
-
description: "human readable description",
|
|
39
|
-
writable: true
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Unique id within the provider.
|
|
44
|
-
* @return {string}
|
|
45
|
-
*/
|
|
46
|
-
id: { isKey: true, type: "string" },
|
|
47
|
-
|
|
48
|
-
/**
|
|
49
|
-
* Unique id.
|
|
50
|
-
* @return {string}
|
|
51
|
-
*/
|
|
52
|
-
uuid: { isKey: true, type: "string" }
|
|
33
|
+
description,
|
|
34
|
+
id,
|
|
35
|
+
uuid
|
|
53
36
|
};
|
|
54
37
|
}
|
|
55
38
|
|
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 { url } from "./attributes.mjs";
|
|
11
|
+
import { url, name } from "./attributes.mjs";
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* @typedef {Object} MessageDestination
|
|
@@ -112,7 +112,7 @@ export class BaseProvider extends BaseObject {
|
|
|
112
112
|
* Name of the provider.
|
|
113
113
|
*/
|
|
114
114
|
name: {
|
|
115
|
-
|
|
115
|
+
...name,
|
|
116
116
|
env: ["{{instanceIdentifier}}NAME"]
|
|
117
117
|
},
|
|
118
118
|
|
package/src/hook.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OwnedObject } from "./owned-object.mjs";
|
|
2
|
+
import { secret, url } from "./attributes.mjs";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Repository hook.
|
|
@@ -7,8 +8,8 @@ export class Hook extends OwnedObject {
|
|
|
7
8
|
static get attributes() {
|
|
8
9
|
return {
|
|
9
10
|
...super.attributes,
|
|
10
|
-
url: {
|
|
11
|
-
secret
|
|
11
|
+
url: { ...url, description: "target url", writable: true },
|
|
12
|
+
secret,
|
|
12
13
|
content_type: { type: "string", default: "json", writable: true },
|
|
13
14
|
insecure_ssl: { type: "boolean", default: false },
|
|
14
15
|
active: { type: "boolean", default: true, writable: true },
|
package/src/milestone.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OwnedObject } from "./owned-object.mjs";
|
|
2
|
+
import { state } from "./attributes.mjs";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
*/
|
|
@@ -6,7 +7,7 @@ export class Milestone extends OwnedObject {
|
|
|
6
7
|
static get attributes() {
|
|
7
8
|
return {
|
|
8
9
|
...super.attributes,
|
|
9
|
-
state
|
|
10
|
+
state
|
|
10
11
|
};
|
|
11
12
|
}
|
|
12
13
|
|
package/src/named-object.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { optionJSON } from "./attribute.mjs";
|
|
2
2
|
import { BaseObject } from "./base-object.mjs";
|
|
3
|
+
import { name } from "./attributes.mjs";
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Object with a name.
|
|
@@ -16,10 +17,7 @@ export class NamedObject extends BaseObject {
|
|
|
16
17
|
static get attributes() {
|
|
17
18
|
return {
|
|
18
19
|
...super.attributes,
|
|
19
|
-
name
|
|
20
|
-
type: "string",
|
|
21
|
-
isKey: true
|
|
22
|
-
},
|
|
20
|
+
name,
|
|
23
21
|
|
|
24
22
|
/**
|
|
25
23
|
* The url of home page.
|
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 { url } from "./attributes.mjs";
|
|
6
|
+
import { url, state } from "./attributes.mjs";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Abstract pull request.
|
|
@@ -109,8 +109,8 @@ export class PullRequest extends OwnedObject {
|
|
|
109
109
|
* @return {string}
|
|
110
110
|
*/
|
|
111
111
|
state: {
|
|
112
|
+
...state,
|
|
112
113
|
default: "OPEN",
|
|
113
|
-
type: "string",
|
|
114
114
|
writable: true
|
|
115
115
|
},
|
|
116
116
|
|
package/src/repository-group.mjs
CHANGED
|
@@ -41,16 +41,13 @@ export class RepositoryGroup extends RepositoryOwner(OwnedObject) {
|
|
|
41
41
|
*/
|
|
42
42
|
type: { type: "string" },
|
|
43
43
|
|
|
44
|
-
/**
|
|
45
|
-
* api url
|
|
46
|
-
*/
|
|
47
44
|
url,
|
|
48
45
|
|
|
49
46
|
/**
|
|
50
47
|
* Avatar.
|
|
51
48
|
* @return {string}
|
|
52
49
|
*/
|
|
53
|
-
avatarURL: {
|
|
50
|
+
avatarURL: { ...url },
|
|
54
51
|
|
|
55
52
|
isAdmin: { type: "boolean", default: false }
|
|
56
53
|
};
|
package/src/repository.mjs
CHANGED
|
@@ -52,13 +52,13 @@ export class Repository extends OwnedObject {
|
|
|
52
52
|
*/
|
|
53
53
|
url,
|
|
54
54
|
|
|
55
|
-
cloneURL: {
|
|
55
|
+
cloneURL: { ...url },
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* The url of issue tracking system.
|
|
59
59
|
* @return {string}
|
|
60
60
|
*/
|
|
61
|
-
issuesURL: {
|
|
61
|
+
issuesURL: { ...url },
|
|
62
62
|
size: { type: "integer" },
|
|
63
63
|
language: { type: "string" },
|
|
64
64
|
isArchived: { type: "boolean", default: false, writable: true },
|