(path: string)
| 286 | } |
| 287 | |
| 288 | export function isWorkflowAliasBackingPath(path: string): boolean { |
| 289 | const trimmedPath = path.trim().replace(/^\/+|\/+$/g, '') |
| 290 | let normalizedPath = trimmedPath |
| 291 | if (trimmedPath.startsWith('files/')) { |
| 292 | try { |
| 293 | normalizedPath = `files/${decodeVfsPathSegments(trimmedPath.slice('files/'.length)) |
| 294 | .map((segment) => normalizeVfsSegment(segment)) |
| 295 | .join('/')}` |
| 296 | } catch { |
| 297 | normalizedPath = trimmedPath |
| 298 | } |
| 299 | } |
| 300 | return ( |
| 301 | normalizedPath === `files/${normalizeVfsSegment(WORKFLOW_CHANGELOG_BACKING_FOLDER)}` || |
| 302 | normalizedPath === `files/${normalizeVfsSegment(WORKFLOW_PLANS_BACKING_FOLDER)}` || |
| 303 | normalizedPath.startsWith(`files/${normalizeVfsSegment(WORKFLOW_CHANGELOG_BACKING_FOLDER)}/`) || |
| 304 | normalizedPath.startsWith(`files/${normalizeVfsSegment(WORKFLOW_PLANS_BACKING_FOLDER)}/`) |
| 305 | ) |
| 306 | } |
| 307 | |
| 308 | export function isReservedWorkflowAliasBackingDisplayPath(path?: string | null): boolean { |
| 309 | if (!path) return false |
no test coverage detected