(name: string)
| 35 | } |
| 36 | |
| 37 | function sanitizeNameForFilename(name: string): string { |
| 38 | // Replace spaces with hyphens |
| 39 | // Remove or replace characters that are problematic in filenames |
| 40 | return name |
| 41 | .toLowerCase() |
| 42 | .replace(/\s+/g, "-") // Replace spaces with hyphens |
| 43 | .replace(/[^a-z0-9-_.]/g, "") // Keep only alphanumeric, hyphens, underscores, and dots |
| 44 | .replace(/-+/g, "-") // Replace multiple hyphens with single hyphen |
| 45 | .replace(/^-+|-+$/g, "") // Remove leading/trailing hyphens |
| 46 | .substring(0, 100); // Limit length to 100 characters |
| 47 | } |
| 48 | |
| 49 | export async function packExtension({ |
| 50 | extensionPath, |
no outgoing calls
no test coverage detected
searching dependent graphs…