repo-util 2.1.106 → 2.1.108

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": "2.1.106",
3
+ "version": "2.1.108",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": true
@@ -30,17 +30,17 @@
30
30
  "bitbucket-repository-provider": "^7.0.3",
31
31
  "commander": "^14.0.2",
32
32
  "etag-cache-leveldb": "^2.1.17",
33
- "gitea-repository-provider": "^5.0.0",
34
- "github-repository-provider": "^10.0.2",
33
+ "gitea-repository-provider": "^5.0.2",
34
+ "github-repository-provider": "^10.0.3",
35
35
  "leveldown": "^6.1.1",
36
36
  "levelup": "^5.1.1",
37
- "repository-provider-cli-support": "^2.2.55"
37
+ "repository-provider-cli-support": "^2.2.56"
38
38
  },
39
39
  "devDependencies": {
40
40
  "ava": "^6.4.1",
41
41
  "c8": "^10.1.3",
42
42
  "documentation": "^14.0.3",
43
- "execa": "^9.6.0",
43
+ "execa": "^9.6.1",
44
44
  "semantic-release": "^25.0.2"
45
45
  },
46
46
  "engines": {
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env -S node --no-warnings --title repo-util
2
2
  import { program } from "commander";
3
+ import { attributeIterator } from "pacc";
3
4
  import {
4
5
  Repository,
5
6
  RepositoryGroup,
@@ -200,19 +201,20 @@ async function list(provider, names, type, actions) {
200
201
  }
201
202
  }
202
203
 
203
- function visibleAttributes(object) {
204
- return Object.fromEntries(
205
- Object.entries(object.attributes).filter(
204
+ function publicAttributeNames(object) {
205
+ return [
206
+ ...attributeIterator(
207
+ object.attributes,
206
208
  ([k, v]) => k !== "name" && !v.private
207
- )
208
- );
209
+ ).map(([k, v]) => k)
210
+ ].flat();
209
211
  }
210
212
 
211
213
  function type(clazz, extra) {
212
214
  return {
213
215
  name: clazz.type,
214
216
  collectionName: clazz.collectionName,
215
- attributes: ["fullName", ...Object.keys(visibleAttributes(clazz))],
217
+ attributes: ["fullName", ...publicAttributeNames(clazz)],
216
218
  actions: {
217
219
  update: {
218
220
  description: `update ${clazz.type} attributes`,