merge: wave 2 executor (01-02) into main
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a5b8fcf9d3
commit
aa1a78d7d9
1081 files changed
+445341
No files matched your search
@@ -0,0 +1,16 @@
|
||||
const PROJECT_URL_KEY_DELIM_RE = /[^a-z0-9]+/g;
|
||||
const PROJECT_URL_KEY_TRIM_RE = /^-+|-+$/g;
|
||||
|
||||
export function normalizeProjectUrlKey(value: string | null | undefined): string | null {
|
||||
if (typeof value !== "string") return null;
|
||||
const normalized = value
|
||||
.trim()
|
||||
.toLowerCase()
|
||||
.replace(PROJECT_URL_KEY_DELIM_RE, "-")
|
||||
.replace(PROJECT_URL_KEY_TRIM_RE, "");
|
||||
return normalized.length > 0 ? normalized : null;
|
||||
}
|
||||
|
||||
export function deriveProjectUrlKey(name: string | null | undefined, fallback?: string | null): string {
|
||||
return normalizeProjectUrlKey(name) ?? normalizeProjectUrlKey(fallback) ?? "project";
|
||||
}
|
||||
Reference in new issue
Block a user