repo-util 1.13.11 → 1.14.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 +3 -3
- package/src/repo-util-cli.mjs +22 -13
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-util",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -25,11 +25,11 @@
|
|
|
25
25
|
"bitbucket-repository-provider": "^3.10.22",
|
|
26
26
|
"commander": "^9.1.0",
|
|
27
27
|
"gitea-repository-provider": "^2.1.18",
|
|
28
|
-
"github-repository-provider": "^7.26.
|
|
28
|
+
"github-repository-provider": "^7.26.5",
|
|
29
29
|
"local-repository-provider": "^8.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"ava": "^4.
|
|
32
|
+
"ava": "^4.2.0",
|
|
33
33
|
"c8": "^7.11.0",
|
|
34
34
|
"execa": "^6.1.0",
|
|
35
35
|
"semantic-release": "^19.0.2"
|
package/src/repo-util-cli.mjs
CHANGED
|
@@ -15,18 +15,6 @@ const { version, description } = JSON.parse(
|
|
|
15
15
|
|
|
16
16
|
const properties = {};
|
|
17
17
|
|
|
18
|
-
async function prepareProvider() {
|
|
19
|
-
const provider = await AggregationProvider.initialize([], properties, process.env);
|
|
20
|
-
|
|
21
|
-
provider.messageDestination = {
|
|
22
|
-
info : () => {},
|
|
23
|
-
warn : console.warn,
|
|
24
|
-
error: console.error
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
return provider;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
18
|
program
|
|
31
19
|
.description(description)
|
|
32
20
|
.version(version)
|
|
@@ -55,6 +43,7 @@ for (const o of [
|
|
|
55
43
|
|
|
56
44
|
command
|
|
57
45
|
.option("--json", "output as json")
|
|
46
|
+
.option("--no-identifier", "do not output identifier attributes only")
|
|
58
47
|
.option("-a, --attribute <attributes>", "list attribute", a =>
|
|
59
48
|
a.split(",")
|
|
60
49
|
);
|
|
@@ -116,7 +105,11 @@ async function list(provider, names, options, slot, attributes, actions) {
|
|
|
116
105
|
json.push(object);
|
|
117
106
|
} else {
|
|
118
107
|
for (const a of attributes) {
|
|
119
|
-
|
|
108
|
+
if (options.identifier === false) {
|
|
109
|
+
console.log(object[a]);
|
|
110
|
+
} else {
|
|
111
|
+
console.log(object.fullName + ":", object[a]);
|
|
112
|
+
}
|
|
120
113
|
}
|
|
121
114
|
}
|
|
122
115
|
}
|
|
@@ -126,3 +119,19 @@ async function list(provider, names, options, slot, attributes, actions) {
|
|
|
126
119
|
console.log(JSON.stringify(json));
|
|
127
120
|
}
|
|
128
121
|
}
|
|
122
|
+
|
|
123
|
+
async function prepareProvider(options) {
|
|
124
|
+
const provider = await AggregationProvider.initialize(
|
|
125
|
+
[],
|
|
126
|
+
properties,
|
|
127
|
+
process.env
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
provider.messageDestination = {
|
|
131
|
+
info: () => {},
|
|
132
|
+
warn: console.warn,
|
|
133
|
+
error: console.error
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
return provider;
|
|
137
|
+
}
|