repo-util 1.17.0 → 1.19.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "repo-util",
3
- "version": "1.17.0",
3
+ "version": "1.19.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,12 +21,12 @@
21
21
  "cover": "c8 -x 'tests/**/*' --temp-directory build/tmp ava --timeout 2m tests/*.mjs && c8 report -r lcov -o build/coverage --temp-directory build/tmp"
22
22
  },
23
23
  "dependencies": {
24
- "aggregation-repository-provider": "^5.2.21",
25
- "bitbucket-repository-provider": "^4.1.19",
24
+ "aggregation-repository-provider": "^5.2.23",
25
+ "bitbucket-repository-provider": "^4.1.21",
26
26
  "commander": "^9.2.0",
27
- "gitea-repository-provider": "^2.1.49",
28
- "github-repository-provider": "^7.26.37",
29
- "local-repository-provider": "^8.0.8"
27
+ "gitea-repository-provider": "^2.1.53",
28
+ "github-repository-provider": "^7.28.1",
29
+ "local-repository-provider": "^8.0.9"
30
30
  },
31
31
  "devDependencies": {
32
32
  "ava": "^4.2.0",
@@ -3,6 +3,18 @@
3
3
  import { readFileSync } from "fs";
4
4
  import { fileURLToPath } from "url";
5
5
  import { program, Option } from "commander";
6
+ import {
7
+ Repository,
8
+ RepositoryGroup,
9
+ Branch,
10
+ Tag,
11
+ Application,
12
+ Project,
13
+ Milestone,
14
+ Hook,
15
+ PullRequest,
16
+ MultiGroupProvider
17
+ } from "repository-provider";
6
18
  import AggregationProvider from "aggregation-repository-provider";
7
19
 
8
20
  process.on("uncaughtException", console.error);
@@ -29,13 +41,29 @@ for (const o of [
29
41
  [
30
42
  "provider",
31
43
  "providers",
32
- ["fullName", ...Object.keys(visibleAttributes(AggregationProvider))]
44
+ ["fullName", ...Object.keys(visibleAttributes(MultiGroupProvider))],
45
+ {
46
+ update: {
47
+ description: "update provider attributes",
48
+ executeInstance: async provider => provider.update(properties)
49
+ }
50
+ }
51
+ ],
52
+ [
53
+ "group",
54
+ "repositoryGroups",
55
+ ["fullName", ...Object.keys(visibleAttributes(RepositoryGroup))],
56
+ {
57
+ update: {
58
+ description: "update group attributes",
59
+ executeInstance: async group => group.update(properties)
60
+ }
61
+ }
33
62
  ],
34
- ["group", "repositoryGroups", ["fullName"]],
35
63
  [
36
64
  "repository",
37
65
  "repositories",
38
- ["fullName"],
66
+ ["fullName", ...Object.keys(visibleAttributes(Repository))],
39
67
  {
40
68
  update: {
41
69
  description: "update repository attributes",
@@ -52,14 +80,31 @@ for (const o of [
52
80
  }
53
81
  }
54
82
  ],
55
- ["branch", "branches", ["fullName"]],
56
- ["project", "projects", ["fullName"]],
57
- ["milestone", "milestones", ["fullName"]],
58
- ["application", "applications", ["fullName"]],
83
+ [
84
+ "branch",
85
+ "branches",
86
+ ["fullName", ...Object.keys(visibleAttributes(Branch))]
87
+ ],
88
+ ["tag", "tags", ["fullName", ...Object.keys(visibleAttributes(Tag))]],
89
+ [
90
+ "project",
91
+ "projects",
92
+ ["fullName", ...Object.keys(visibleAttributes(Project))]
93
+ ],
94
+ [
95
+ "milestone",
96
+ "milestones",
97
+ ["fullName", ...Object.keys(visibleAttributes(Milestone))]
98
+ ],
99
+ [
100
+ "application",
101
+ "applications",
102
+ ["fullName", ...Object.keys(visibleAttributes(Application))]
103
+ ],
59
104
  [
60
105
  "hook",
61
106
  "hooks",
62
- ["url", "events", "active"],
107
+ ["url", ...Object.keys(visibleAttributes(Hook))],
63
108
  {
64
109
  create: {
65
110
  suffix: "<name>",
@@ -81,7 +126,7 @@ for (const o of [
81
126
  [
82
127
  "pull-request",
83
128
  "pullRequests",
84
- ["url"],
129
+ ["url", ...Object.keys(visibleAttributes(PullRequest))],
85
130
  {
86
131
  update: {
87
132
  description: "update pr attributes",