@saptools/cf-live-trace 0.2.0 → 0.2.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/dist/cli.js CHANGED
@@ -196,7 +196,7 @@ function regionKeyForApiEndpoint(apiEndpoint) {
196
196
  return void 0;
197
197
  }
198
198
  function normalizeApiEndpoint(apiEndpoint) {
199
- return apiEndpoint.trim().replace(/\/+$/, "").toLowerCase();
199
+ return apiEndpoint.trim().replace(/(?<!\/)\/+$/, "").toLowerCase();
200
200
  }
201
201
  function parseSshStatus(stdout) {
202
202
  return stdout.toLowerCase().includes("enabled") && !stdout.toLowerCase().includes("disabled") ? "enabled" : "disabled";
@@ -1848,11 +1848,11 @@ function targetSlug(target) {
1848
1848
  return fullSlug;
1849
1849
  }
1850
1850
  const hash = createHash("sha256").update(fullSlug).digest("hex").slice(0, 12);
1851
- const prefix = fullSlug.slice(0, MAX_TARGET_SLUG_BYTES - hash.length - 1).replace(/-+$/, "");
1851
+ const prefix = fullSlug.slice(0, MAX_TARGET_SLUG_BYTES - hash.length - 1).replace(/(?<!-)-+$/, "");
1852
1852
  return `${prefix}-${hash}`;
1853
1853
  }
1854
1854
  function sanitizePathPart(value) {
1855
- const sanitized = value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
1855
+ const sanitized = value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|(?<!-)-+$/g, "");
1856
1856
  return sanitized.length === 0 ? "unknown" : sanitized;
1857
1857
  }
1858
1858
  function fileTimestamp(now) {