@voidagency/skills 1.0.1 → 1.0.2
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/dist/cli.mjs +19 -3
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -96,9 +96,25 @@ function parseSource(input) {
|
|
|
96
96
|
const githubPrefixMatch = input.match(/^github:(.+)$/);
|
|
97
97
|
if (githubPrefixMatch) return parseSource(githubPrefixMatch[1]);
|
|
98
98
|
const gitlabPrefixMatch = input.match(/^gitlab:(.+)$/);
|
|
99
|
-
if (gitlabPrefixMatch)
|
|
99
|
+
if (gitlabPrefixMatch) {
|
|
100
|
+
const rest = gitlabPrefixMatch[1];
|
|
101
|
+
const atIdx = rest.lastIndexOf("@");
|
|
102
|
+
const repoPart = atIdx > 0 ? rest.slice(0, atIdx).trim() : rest;
|
|
103
|
+
const skillPart = atIdx > 0 ? rest.slice(atIdx + 1).trim() : void 0;
|
|
104
|
+
const result = parseSource(`https://gitlab.com/${repoPart}`);
|
|
105
|
+
if (skillPart) result.skillFilter = skillPart;
|
|
106
|
+
return result;
|
|
107
|
+
}
|
|
100
108
|
const bitbucketPrefixMatch = input.match(/^bitbucket:(.+)$/);
|
|
101
|
-
if (bitbucketPrefixMatch)
|
|
109
|
+
if (bitbucketPrefixMatch) {
|
|
110
|
+
const rest = bitbucketPrefixMatch[1];
|
|
111
|
+
const atIdx = rest.lastIndexOf("@");
|
|
112
|
+
const repoPart = atIdx > 0 ? rest.slice(0, atIdx).trim() : rest;
|
|
113
|
+
const skillPart = atIdx > 0 ? rest.slice(atIdx + 1).trim() : void 0;
|
|
114
|
+
const result = parseSource(`https://bitbucket.org/${repoPart}`);
|
|
115
|
+
if (skillPart) result.skillFilter = skillPart;
|
|
116
|
+
return result;
|
|
117
|
+
}
|
|
102
118
|
const atIdx = input.lastIndexOf("@");
|
|
103
119
|
if (atIdx > 0) {
|
|
104
120
|
const pathPart = input.slice(0, atIdx).trim();
|
|
@@ -2117,7 +2133,7 @@ function createEmptyLocalLock() {
|
|
|
2117
2133
|
}
|
|
2118
2134
|
//#endregion
|
|
2119
2135
|
//#region package.json
|
|
2120
|
-
var version$1 = "1.0.
|
|
2136
|
+
var version$1 = "1.0.2";
|
|
2121
2137
|
//#endregion
|
|
2122
2138
|
//#region src/add.ts
|
|
2123
2139
|
const isCancelled$1 = (value) => typeof value === "symbol";
|