repo-util 1.14.7 → 1.15.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.14.7",
3
+ "version": "1.15.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -21,11 +21,11 @@
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.0.2",
24
+ "aggregation-repository-provider": "^5.0.3",
25
25
  "bitbucket-repository-provider": "^4.1.2",
26
26
  "commander": "^9.2.0",
27
- "gitea-repository-provider": "^2.1.25",
28
- "github-repository-provider": "^7.26.15",
27
+ "gitea-repository-provider": "^2.1.26",
28
+ "github-repository-provider": "^7.26.16",
29
29
  "local-repository-provider": "^8.0.3"
30
30
  },
31
31
  "devDependencies": {
@@ -25,7 +25,11 @@ program
25
25
  );
26
26
 
27
27
  for (const o of [
28
- ["provider", "providers", ["fullName"]],
28
+ [
29
+ "provider",
30
+ "providers",
31
+ ["name", ...Object.keys(visibleAttributes(AggregationProvider))]
32
+ ],
29
33
  ["group", "repositoryGroups", ["fullName"]],
30
34
  ["repository", "repositories", ["fullName"]],
31
35
  ["branch", "branches", ["fullName"]],
@@ -115,12 +119,19 @@ async function list(provider, names, options, slot, attributes, actions) {
115
119
  value = value.join(" ");
116
120
  } else if (value instanceof Set) {
117
121
  value = [...value].join(" ");
122
+ } else if (value === undefined) {
123
+ value = "";
118
124
  }
119
125
 
120
126
  if (options.identifier === false) {
121
127
  console.log(value);
122
128
  } else {
123
- console.log(object.fullName + ":", value);
129
+ console.log(
130
+ attributes.indexOf(a) === 0
131
+ ? object.fullName + ":"
132
+ : " ".substring(a.length) + a + ":",
133
+ value
134
+ );
124
135
  }
125
136
  }
126
137
  }
@@ -148,3 +159,9 @@ async function prepareProvider(options) {
148
159
 
149
160
  return provider;
150
161
  }
162
+
163
+ function visibleAttributes(object) {
164
+ return Object.fromEntries(
165
+ Object.entries(object.attributes).filter(([k, v]) => k!=="name" && !v.private)
166
+ );
167
+ }