repository-provider 30.0.2 → 30.1.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 +1 -1
- package/src/base-provider.mjs +4 -8
package/package.json
CHANGED
package/src/base-provider.mjs
CHANGED
|
@@ -192,7 +192,7 @@ export class BaseProvider extends BaseObject {
|
|
|
192
192
|
* @return {string} normalized name
|
|
193
193
|
*/
|
|
194
194
|
normalizeGroupName(name, forLookup) {
|
|
195
|
-
const { group } = this.parseName(name,
|
|
195
|
+
const { group } = this.parseName(name, "group");
|
|
196
196
|
return group && forLookup && !this.areGroupNamesCaseSensitive
|
|
197
197
|
? group.toLowerCase()
|
|
198
198
|
: group;
|
|
@@ -239,10 +239,10 @@ export class BaseProvider extends BaseObject {
|
|
|
239
239
|
* Parses repository name and tries to split it into
|
|
240
240
|
* base, group, repository and branch.
|
|
241
241
|
* @param {string} name
|
|
242
|
-
* @param {
|
|
242
|
+
* @param {string} focus where lies the focus if only one path component is given
|
|
243
243
|
* @return {Object} with separated attributes
|
|
244
244
|
*/
|
|
245
|
-
parseName(name,
|
|
245
|
+
parseName(name, focus = "repository") {
|
|
246
246
|
const result = {};
|
|
247
247
|
|
|
248
248
|
if (name === undefined) {
|
|
@@ -286,11 +286,7 @@ export class BaseProvider extends BaseObject {
|
|
|
286
286
|
result.group = parts[i];
|
|
287
287
|
result.repository = parts[i + 1];
|
|
288
288
|
} else {
|
|
289
|
-
|
|
290
|
-
result.group = name;
|
|
291
|
-
} else {
|
|
292
|
-
result.repository = name;
|
|
293
|
-
}
|
|
289
|
+
result[focus] = name;
|
|
294
290
|
}
|
|
295
291
|
}
|
|
296
292
|
|