@boon4681/giri 0.0.2-alpha-4 → 0.0.2-alpha-5
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.js +4 -11
- package/dist/cli.js.map +1 -1
- package/dist/index.js +4 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -729,20 +729,13 @@ function resolveAliasTarget(cwd, target, capture = "") {
|
|
|
729
729
|
}
|
|
730
730
|
function matchAlias(request, key) {
|
|
731
731
|
if (key.includes("*")) {
|
|
732
|
-
const [
|
|
733
|
-
if (request.startsWith(
|
|
734
|
-
return request.slice(
|
|
732
|
+
const [prefix, suffix = ""] = key.split("*");
|
|
733
|
+
if (request.startsWith(prefix) && request.endsWith(suffix)) {
|
|
734
|
+
return request.slice(prefix.length, request.length - suffix.length);
|
|
735
735
|
}
|
|
736
736
|
return void 0;
|
|
737
737
|
}
|
|
738
|
-
|
|
739
|
-
return "";
|
|
740
|
-
}
|
|
741
|
-
const prefix = `${key}/`;
|
|
742
|
-
if (request.startsWith(prefix)) {
|
|
743
|
-
return request.slice(prefix.length);
|
|
744
|
-
}
|
|
745
|
-
return void 0;
|
|
738
|
+
return request === key ? "" : void 0;
|
|
746
739
|
}
|
|
747
740
|
function resolveAliasRequest(request, alias, cwd) {
|
|
748
741
|
for (const [key, value] of Object.entries(alias ?? {})) {
|