@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 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 [prefix2, suffix = ""] = key.split("*");
733
- if (request.startsWith(prefix2) && request.endsWith(suffix)) {
734
- return request.slice(prefix2.length, request.length - suffix.length);
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
- if (request === key) {
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 ?? {})) {