repo-util 1.20.0 → 1.20.1
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 +5 -5
- package/src/repo-util-cli.mjs +28 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "repo-util",
|
|
3
|
-
"version": "1.20.
|
|
3
|
+
"version": "1.20.1",
|
|
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.2.
|
|
25
|
-
"bitbucket-repository-provider": "^4.1.
|
|
24
|
+
"aggregation-repository-provider": "^5.2.28",
|
|
25
|
+
"bitbucket-repository-provider": "^4.1.26",
|
|
26
26
|
"commander": "^9.2.0",
|
|
27
|
-
"gitea-repository-provider": "^2.1.
|
|
28
|
-
"github-repository-provider": "^7.29.
|
|
27
|
+
"gitea-repository-provider": "^2.1.60",
|
|
28
|
+
"github-repository-provider": "^7.29.6",
|
|
29
29
|
"local-repository-provider": "^8.0.11"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
package/src/repo-util-cli.mjs
CHANGED
|
@@ -139,36 +139,29 @@ async function list(provider, names, options, slot, attributes, actions) {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
|
|
143
|
-
if (
|
|
144
|
-
|
|
145
|
-
object[k] = v;
|
|
146
|
-
}
|
|
147
|
-
await object.update();
|
|
142
|
+
|
|
143
|
+
if (options.json) {
|
|
144
|
+
json.push(object);
|
|
148
145
|
} else {
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
} else if (value === undefined) {
|
|
159
|
-
value = "";
|
|
160
|
-
}
|
|
146
|
+
for (const a of attributes) {
|
|
147
|
+
let value = object[a];
|
|
148
|
+
if (Array.isArray(value)) {
|
|
149
|
+
value = value.join(" ");
|
|
150
|
+
} else if (value instanceof Set) {
|
|
151
|
+
value = [...value].join(" ");
|
|
152
|
+
} else if (value === undefined) {
|
|
153
|
+
value = "";
|
|
154
|
+
}
|
|
161
155
|
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
156
|
+
if (options.identifier === false) {
|
|
157
|
+
console.log(value);
|
|
158
|
+
} else {
|
|
159
|
+
console.log(
|
|
160
|
+
attributes.indexOf(a) === 0
|
|
161
|
+
? object.fullName + ":"
|
|
162
|
+
: " ".substring(a.length) + a + ":",
|
|
163
|
+
value
|
|
164
|
+
);
|
|
172
165
|
}
|
|
173
166
|
}
|
|
174
167
|
}
|
|
@@ -212,7 +205,13 @@ function type(clazz, extra) {
|
|
|
212
205
|
{
|
|
213
206
|
update: {
|
|
214
207
|
description: `update ${clazz.type} attributes`,
|
|
215
|
-
executeInstance: object =>
|
|
208
|
+
executeInstance: object => {
|
|
209
|
+
for (const [k, v] of Object.entries(properties)) {
|
|
210
|
+
object[k] = v;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
object.update();
|
|
214
|
+
}
|
|
216
215
|
},
|
|
217
216
|
...extra
|
|
218
217
|
}
|