repository-provider 32.3.21 → 32.4.1
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 +14 -8
- package/src/base-object.mjs +2 -3
- package/src/hook.mjs +8 -3
- package/src/index.mjs +1 -0
- package/src/named-object.mjs +2 -3
- package/src/pull-request.mjs +3 -10
- package/src/ref.mjs +2 -1
- package/src/repository.mjs +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repository-provider",
|
|
3
|
-
"version": "32.
|
|
3
|
+
"version": "32.4.1",
|
|
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.29",
|
|
42
42
|
"semantic-release": "^19.0.5",
|
|
43
43
|
"typescript": "^4.9.4"
|
|
44
44
|
},
|
package/src/attributes.mjs
CHANGED
|
@@ -4,6 +4,20 @@ export const boolean_attribute = {
|
|
|
4
4
|
writable: true
|
|
5
5
|
};
|
|
6
6
|
|
|
7
|
+
export const boolean_read_only_attribute = {
|
|
8
|
+
type: "boolean",
|
|
9
|
+
default: false
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const uuid_attiribute = { isKey: true, type: "string" };
|
|
13
|
+
export const empty_attiribute = { type: "boolean" };
|
|
14
|
+
export const secret_attribute = {
|
|
15
|
+
type: "string",
|
|
16
|
+
private: true,
|
|
17
|
+
writable: true
|
|
18
|
+
};
|
|
19
|
+
export const size_attribute = { type: "integer" };
|
|
20
|
+
|
|
7
21
|
export const url = { description: "home of the object", type: "url" };
|
|
8
22
|
|
|
9
23
|
/**
|
|
@@ -25,15 +39,8 @@ export const name = {
|
|
|
25
39
|
*/
|
|
26
40
|
export const id = { isKey: true, type: "string" };
|
|
27
41
|
|
|
28
|
-
/**
|
|
29
|
-
* Unique id.
|
|
30
|
-
*/
|
|
31
|
-
export const uuid = { isKey: true, type: "string" };
|
|
32
|
-
|
|
33
42
|
export const state = { type: "string" };
|
|
34
43
|
|
|
35
|
-
export const secret = { type: "string", private: true, writable: true };
|
|
36
|
-
|
|
37
44
|
/**
|
|
38
45
|
* The description of the pull request.
|
|
39
46
|
*/
|
|
@@ -59,6 +66,5 @@ export const priority = {
|
|
|
59
66
|
};
|
|
60
67
|
|
|
61
68
|
export const active = { type: "boolean", default: true, writable: true };
|
|
62
|
-
export const size = { type: "integer" };
|
|
63
69
|
export const language = { type: "string" };
|
|
64
70
|
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 { description, id
|
|
2
|
+
import { description, id } from "./attributes.mjs";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* @param {Object} options
|
|
@@ -31,8 +31,7 @@ export class BaseObject {
|
|
|
31
31
|
static get attributes() {
|
|
32
32
|
return {
|
|
33
33
|
description,
|
|
34
|
-
id
|
|
35
|
-
uuid
|
|
34
|
+
id
|
|
36
35
|
};
|
|
37
36
|
}
|
|
38
37
|
|
package/src/hook.mjs
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { OwnedObject } from "./owned-object.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
secret_attribute,
|
|
4
|
+
boolean_attribute,
|
|
5
|
+
active,
|
|
6
|
+
url
|
|
7
|
+
} from "./attributes.mjs";
|
|
3
8
|
|
|
4
9
|
/**
|
|
5
10
|
* Repository hook.
|
|
@@ -9,7 +14,7 @@ export class Hook extends OwnedObject {
|
|
|
9
14
|
return {
|
|
10
15
|
...super.attributes,
|
|
11
16
|
active,
|
|
12
|
-
secret,
|
|
17
|
+
secret: secret_attribute,
|
|
13
18
|
url: { ...url, description: "target url", writable: true },
|
|
14
19
|
content_type: { type: "string", default: "json", writable: true },
|
|
15
20
|
insecure_ssl: boolean_attribute,
|
|
@@ -22,6 +27,6 @@ export class Hook extends OwnedObject {
|
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
static get delteteMethodName() {
|
|
25
|
-
|
|
30
|
+
return "_deleteHook";
|
|
26
31
|
}
|
|
27
32
|
}
|
package/src/index.mjs
CHANGED
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, url, description, id
|
|
3
|
+
import { name, url, description, id } from "./attributes.mjs";
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Object with a name.
|
|
@@ -18,9 +18,8 @@ export class NamedObject extends BaseObject {
|
|
|
18
18
|
return {
|
|
19
19
|
name,
|
|
20
20
|
id,
|
|
21
|
-
uuid,
|
|
22
21
|
description,
|
|
23
|
-
|
|
22
|
+
|
|
24
23
|
/**
|
|
25
24
|
* The url of home page.
|
|
26
25
|
* @return {string}
|
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, state, body, title, boolean_attribute } from "./attributes.mjs";
|
|
6
|
+
import { url, state, body, title, boolean_attribute, boolean_read_only_attribute, empty_attiribute } from "./attributes.mjs";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Abstract pull request.
|
|
@@ -120,15 +120,8 @@ export class PullRequest extends OwnedObject {
|
|
|
120
120
|
* @return {boolean}
|
|
121
121
|
*/
|
|
122
122
|
draft: boolean_attribute,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
type: "boolean",
|
|
126
|
-
default: false
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
empty: {
|
|
130
|
-
type: "boolean"
|
|
131
|
-
}
|
|
123
|
+
dry: boolean_attribute,
|
|
124
|
+
empty: empty_attiribute
|
|
132
125
|
};
|
|
133
126
|
}
|
|
134
127
|
|
package/src/ref.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { OwnedObject } from "./owned-object.mjs";
|
|
2
|
+
import { boolean_read_only_attribute } from "./attributes.mjs";
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* @typedef {Object} ContentEntry
|
|
@@ -21,7 +22,7 @@ export class Ref extends OwnedObject {
|
|
|
21
22
|
* Can the ref be modified.
|
|
22
23
|
* @return {string}
|
|
23
24
|
*/
|
|
24
|
-
isProtected:
|
|
25
|
+
isProtected: boolean_read_only_attribute
|
|
25
26
|
};
|
|
26
27
|
}
|
|
27
28
|
|
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 { url,
|
|
7
|
+
import { url, size_attribute, language, boolean_attribute, boolean_read_only_attribute } from "./attributes.mjs";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Abstract repository
|
|
@@ -44,7 +44,7 @@ export class Repository extends OwnedObject {
|
|
|
44
44
|
return {
|
|
45
45
|
...super.attributes,
|
|
46
46
|
url,
|
|
47
|
-
|
|
47
|
+
size_attribute,
|
|
48
48
|
language,
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -64,7 +64,7 @@ export class Repository extends OwnedObject {
|
|
|
64
64
|
isLocked: boolean_attribute,
|
|
65
65
|
isDisabled: boolean_attribute,
|
|
66
66
|
isTemplate: boolean_attribute,
|
|
67
|
-
isFork:
|
|
67
|
+
isFork: boolean_read_only_attribute
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
70
|
|