repo-util 1.19.1 → 1.20.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.19.1",
3
+ "version": "1.20.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.25",
25
- "bitbucket-repository-provider": "^4.1.23",
24
+ "aggregation-repository-provider": "^5.2.26",
25
+ "bitbucket-repository-provider": "^4.1.24",
26
26
  "commander": "^9.2.0",
27
- "gitea-repository-provider": "^2.1.55",
28
- "github-repository-provider": "^7.29.1",
29
- "local-repository-provider": "^8.0.10"
27
+ "gitea-repository-provider": "^2.1.57",
28
+ "github-repository-provider": "^7.29.2",
29
+ "local-repository-provider": "^8.0.11"
30
30
  },
31
31
  "devDependencies": {
32
32
  "ava": "^4.2.0",
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { readFileSync } from "fs";
4
4
  import { fileURLToPath } from "url";
5
- import { program, Option } from "commander";
5
+ import { program } from "commander";
6
6
  import {
7
7
  Repository,
8
8
  RepositoryGroup,
@@ -38,23 +38,9 @@ program
38
38
  );
39
39
 
40
40
  for (const o of [
41
- type(MultiGroupProvider, {
42
- update: {
43
- description: "update provider attributes",
44
- executeInstance: async provider => provider.update(properties)
45
- }
46
- }),
47
- type(RepositoryGroup, {
48
- update: {
49
- description: "update group attributes",
50
- executeInstance: async group => group.update(properties)
51
- }
52
- }),
41
+ type(MultiGroupProvider),
42
+ type(RepositoryGroup),
53
43
  type(Repository, {
54
- update: {
55
- description: "update repository attributes",
56
- executeInstance: async repository => repository.update(properties)
57
- },
58
44
  create: {
59
45
  suffix: "<names>",
60
46
  description: "create repositories",
@@ -78,20 +64,12 @@ for (const o of [
78
64
  console.log("create a hook");
79
65
  }
80
66
  },
81
- update: {
82
- description: "update hook attributes",
83
- executeInstance: hook => hook.update(properties)
84
- },
85
67
  delete: {
86
68
  description: "delete a hook",
87
69
  executeInstance: hook => hook.delete()
88
70
  }
89
71
  }),
90
72
  type(PullRequest, {
91
- update: {
92
- description: "update pr attributes",
93
- executeInstance: pr => pr.update(properties)
94
- },
95
73
  merge: {
96
74
  description: "merge the pr",
97
75
  executeInstance: pr => pr.merge()
@@ -231,6 +209,12 @@ function type(clazz, extra) {
231
209
  clazz.type,
232
210
  clazz.collectionName,
233
211
  ["fullName", ...Object.keys(visibleAttributes(clazz))],
234
- extra
212
+ {
213
+ update: {
214
+ description: `update ${clazz.type} attributes`,
215
+ executeInstance: object => object.update(properties)
216
+ },
217
+ ...extra
218
+ }
235
219
  ];
236
220
  }