@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 +3 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1225,11 +1225,11 @@ function targetSlug(target) {
|
|
|
1225
1225
|
return fullSlug;
|
|
1226
1226
|
}
|
|
1227
1227
|
const hash = createHash("sha256").update(fullSlug).digest("hex").slice(0, 12);
|
|
1228
|
-
const prefix = fullSlug.slice(0, MAX_TARGET_SLUG_BYTES - hash.length - 1).replace(
|
|
1228
|
+
const prefix = fullSlug.slice(0, MAX_TARGET_SLUG_BYTES - hash.length - 1).replace(/(?<!-)-+$/, "");
|
|
1229
1229
|
return `${prefix}-${hash}`;
|
|
1230
1230
|
}
|
|
1231
1231
|
function sanitizePathPart(value) {
|
|
1232
|
-
const sanitized = value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(
|
|
1232
|
+
const sanitized = value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|(?<!-)-+$/g, "");
|
|
1233
1233
|
return sanitized.length === 0 ? "unknown" : sanitized;
|
|
1234
1234
|
}
|
|
1235
1235
|
function fileTimestamp(now) {
|