repo-util 1.13.9 → 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 +6 -6
- package/src/repo-util-cli.mjs +24 -16
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
|
},
|
|
@@ -24,18 +24,18 @@
|
|
|
24
24
|
"aggregation-repository-provider": "^4.0.46",
|
|
25
25
|
"bitbucket-repository-provider": "^3.10.22",
|
|
26
26
|
"commander": "^9.1.0",
|
|
27
|
-
"gitea-repository-provider": "^2.1.
|
|
28
|
-
"github-repository-provider": "^7.
|
|
29
|
-
"local-repository-provider": "^
|
|
27
|
+
"gitea-repository-provider": "^2.1.18",
|
|
28
|
+
"github-repository-provider": "^7.26.5",
|
|
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"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
|
38
|
-
"node": ">=16.14.
|
|
38
|
+
"node": ">=16.14.2"
|
|
39
39
|
},
|
|
40
40
|
"repository": {
|
|
41
41
|
"type": "git",
|
package/src/repo-util-cli.mjs
CHANGED
|
@@ -4,8 +4,8 @@ import { readFileSync } from "fs";
|
|
|
4
4
|
import { program, Option } from "commander";
|
|
5
5
|
import AggregationProvider from "aggregation-repository-provider";
|
|
6
6
|
|
|
7
|
-
process.on("uncaughtException",
|
|
8
|
-
process.on("unhandledRejection",
|
|
7
|
+
process.on("uncaughtException", console.error);
|
|
8
|
+
process.on("unhandledRejection", console.error);
|
|
9
9
|
|
|
10
10
|
const { version, description } = JSON.parse(
|
|
11
11
|
readFileSync(new URL("../package.json", import.meta.url).pathname, {
|
|
@@ -15,22 +15,9 @@ 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)
|
|
33
|
-
.option("--dry", "do not create branch/pull request")
|
|
34
21
|
.option("--trace", "log level trace")
|
|
35
22
|
.option("--debug", "log level debug")
|
|
36
23
|
.option("-D --define <a=b>", "define property", str =>
|
|
@@ -56,6 +43,7 @@ for (const o of [
|
|
|
56
43
|
|
|
57
44
|
command
|
|
58
45
|
.option("--json", "output as json")
|
|
46
|
+
.option("--no-identifier", "do not output identifier attributes only")
|
|
59
47
|
.option("-a, --attribute <attributes>", "list attribute", a =>
|
|
60
48
|
a.split(",")
|
|
61
49
|
);
|
|
@@ -117,7 +105,11 @@ async function list(provider, names, options, slot, attributes, actions) {
|
|
|
117
105
|
json.push(object);
|
|
118
106
|
} else {
|
|
119
107
|
for (const a of attributes) {
|
|
120
|
-
|
|
108
|
+
if (options.identifier === false) {
|
|
109
|
+
console.log(object[a]);
|
|
110
|
+
} else {
|
|
111
|
+
console.log(object.fullName + ":", object[a]);
|
|
112
|
+
}
|
|
121
113
|
}
|
|
122
114
|
}
|
|
123
115
|
}
|
|
@@ -127,3 +119,19 @@ async function list(provider, names, options, slot, attributes, actions) {
|
|
|
127
119
|
console.log(JSON.stringify(json));
|
|
128
120
|
}
|
|
129
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
|
+
}
|