@codefast/cli 0.3.1-canary.14 โ†’ 0.3.1-canary.15

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/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["webpack://@codefast/cli/./src/ioc/types.ts","webpack://@codefast/cli/./src/application/commands/create-project.command.ts","webpack://@codefast/cli/./src/application/commands/update-exports.command.ts","webpack://@codefast/cli/./src/application/utilities/error-handler.ts","webpack://@codefast/cli/./src/infrastructure/services/config.service.ts","webpack://@codefast/cli/./src/application/use-cases/create-project.use-case.ts","webpack://@codefast/cli/./src/application/use-cases/update-exports.use-case.ts","webpack://@codefast/cli/./src/infrastructure/adapters/cli.adapter.ts","webpack://@codefast/cli/./src/domain/entities/package-config.ts","webpack://@codefast/cli/./src/infrastructure/adapters/node-command-executor.adapter.ts","webpack://@codefast/cli/./src/infrastructure/adapters/node-file-system.adapter.ts","webpack://@codefast/cli/./src/infrastructure/adapters/node-prompt.adapter.ts","webpack://@codefast/cli/./src/infrastructure/adapters/ts-morph-analysis.adapter.ts","webpack://@codefast/cli/./src/infrastructure/repositories/file-system-package.repository.ts","webpack://@codefast/cli/./src/domain/entities/project.ts","webpack://@codefast/cli/./src/infrastructure/repositories/file-system-project.repository.ts","webpack://@codefast/cli/./src/infrastructure/services/dependency-config.service.ts","webpack://@codefast/cli/./src/infrastructure/services/node-package-info.service.ts","webpack://@codefast/cli/./src/infrastructure/utilities/file-system-utility.ts","webpack://@codefast/cli/./src/ioc/container.ts","webpack://@codefast/cli/./src/index.ts"],"sourcesContent":["export const TYPES = {\n ProjectRepository: Symbol.for(\"ProjectRepository\"),\n PackageRepository: Symbol.for(\"PackageRepository\"),\n\n FileSystemPort: Symbol.for(\"FileSystemPort\"),\n CommandExecutorPort: Symbol.for(\"CommandExecutorPort\"),\n PromptPort: Symbol.for(\"PromptPort\"),\n AnalysisPort: Symbol.for(\"AnalysisPort\"),\n\n PackageInfoService: Symbol.for(\"PackageInfoService\"),\n DependencyConfigService: Symbol.for(\"DependencyConfigService\"),\n ConfigService: Symbol.for(\"ConfigService\"),\n\n FileSystemUtility: Symbol.for(\"FileSystemUtility\"),\n\n CreateProjectUseCase: Symbol.for(\"CreateProjectUseCase\"),\n UpdateExportsUseCase: Symbol.for(\"UpdateExportsUseCase\"),\n\n CreateProjectCommand: Symbol.for(\"CreateProjectCommand\"),\n UpdateExportsCommand: Symbol.for(\"UpdateExportsCommand\"),\n\n CLIAdapter: Symbol.for(\"CLIAdapter\"),\n};\n","import { Command } from \"commander\";\nimport { inject, injectable } from \"inversify\";\nimport process from \"node:process\";\n\nimport type { CreateProjectUseCase } from \"@/application/use-cases/create-project.use-case\";\n\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class CreateProjectCommand {\n constructor(@inject(TYPES.CreateProjectUseCase) private createProjectUseCase: CreateProjectUseCase) {}\n\n /**\n * Returns a Commander.js command for creating or configuring a project.\n *\n * @returns Configured Commander.js command.\n */\n getCommand(): Command {\n return new Command()\n .name(\"create-project\")\n .description(\"Create a new Next.js project with TypeScript, TailwindCSS, and linting setup\")\n .argument(\"[project-name]\", \"Name of the project to create\")\n .action(async (projectName: string) => {\n await this.createProjectUseCase.execute(projectName);\n\n process.exit(0);\n });\n }\n}\n","import { Command } from \"commander\";\nimport { inject, injectable } from \"inversify\";\nimport * as process from \"node:process\";\n\nimport type { UpdateExportsUseCase } from \"@/application/use-cases/update-exports.use-case\";\n\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class UpdateExportsCommand {\n constructor(@inject(TYPES.UpdateExportsUseCase) private updateExportsUseCase: UpdateExportsUseCase) {}\n\n /**\n * Returns a Commander.js command for updating package exports.\n *\n * @returns Configured Commander.js command.\n */\n getCommand(): Command {\n return new Command()\n .name(\"update-exports\")\n .description(\"Updates exports for all packages\")\n .option(\"-p, --package <package>\", \"Filter by package name\")\n .option(\"-d, --dry-run\", \"Run without making changes\")\n .option(\"-c, --config <path>\", \"Path to configuration file\")\n .action(async (options: { config?: string; dryRun?: string; package?: string }) => {\n await this.updateExportsUseCase.execute({\n packageFilter: options.package,\n dryRun: Boolean(options.dryRun),\n configPath: options.config,\n });\n\n process.exit(0);\n });\n }\n}\n","/**\n * Utility function for handling errors consistently across use cases and repositories.\n * @param error - The error object or unknown value.\n * @param defaultMessage - Default message to display if an error message is unavailable.\n */\nexport function handleError(error: unknown, defaultMessage: string): void {\n const message = error instanceof Error ? error.message : defaultMessage;\n\n console.error(`\\nโŒ ${message}`);\n}\n","import { injectable } from \"inversify\";\n\nimport type { ConfigGroups } from \"@/domain/entities/config-file\";\nimport type { ConfigServiceInterface } from \"@/domain/interfaces/config.service\";\n\n@injectable()\nexport class ConfigService implements ConfigServiceInterface {\n private readonly configGroups: ConfigGroups = {\n deployment: [\n {\n path: \".vercelignore\",\n content: `#-------------------------------------------------------------------------------\n# Dependencies and package managers\n#-------------------------------------------------------------------------------\n\n# Node dependencies\nnode_modules\n.pnpm-store\n.yarn\n\n#-------------------------------------------------------------------------------\n# Development and environment\n#-------------------------------------------------------------------------------\n\n# Environment variables (except examples)\n.env*\n!.env.example\n\n# Build artifacts\n.next\nbuild\ndist\n.git\n.github\n.turbo\n.changeset\n.eslintcache\n\n# Debug logs\nnpm-debug.log*\nyarn-debug.log*\n\n#-------------------------------------------------------------------------------\n# Testing\n#-------------------------------------------------------------------------------\n\n# Test coverage reports and config snapshots\ncoverage\n*.test.*\n*.e2e.*\n\n#-------------------------------------------------------------------------------\n# Editor and IDE configuration\n#-------------------------------------------------------------------------------\n\n# IDE project files\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n#-------------------------------------------------------------------------------\n# Operating system files\n#-------------------------------------------------------------------------------\n\n# System metadata files\n.DS_Store\nThumbs.db\n\n#-------------------------------------------------------------------------------\n# Deployment\n#-------------------------------------------------------------------------------\n\n# Vercel deployment configuration\n.vercel\n`,\n description: \"Ignore files that should not be deployed to Vercel\",\n },\n ],\n formatting: [\n {\n path: \"prettier.config.mjs\",\n content: `/**\n * @see https://prettier.io/docs/en/configuration.html\n * @type {import('prettier').Config}\n */\nconst config = {\n plugins: [\"prettier-plugin-packagejson\", \"prettier-plugin-tailwindcss\"],\n printWidth: 100,\n tailwindAttributes: [\"classNames\"],\n tailwindFunctions: [\"tv\"],\n};\n\nexport default config;\n`,\n description: \"Prettier configuration for source code formatting\",\n },\n {\n path: \".editorconfig\",\n content: `# https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\ninsert_final_newline = true\n\nend_of_line = lf\nindent_style = space\nindent_size = 2\nmax_line_length = 120\n\ntrim_trailing_whitespace = true\n\n[Makefile]\nindent_style = tab\n\n[{go.mod,go.sum,*.go}]\nindent_style = tab\n\n[*.rs]\n# Keep in sync with rustfmt\nindent_size = 4\n`,\n description: \"Editor configuration for source code formatting\",\n },\n {\n path: \".prettierignore\",\n content: `# changesets\n.changeset\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n.pnpm-debug.log*\n\n# lock files\npackage-lock.json\nyarn.lock\npnpm-lock.yaml\n`,\n description: \"\",\n },\n ],\n linting: [\n {\n path: \"commitlint.config.mjs\",\n content: `/**\n * @see https://commitlint.js.org/reference/configuration.html\n * @type {import('@commitlint/types').UserConfig}\n */\nconst config = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"body-max-line-length\": [2, \"always\", 350],\n \"header-max-length\": [2, \"always\", 150],\n },\n};\n\nexport default config;\n`,\n description: \"Commitlint configuration\",\n },\n {\n path: \"eslint.config.mjs\",\n content: `import { config } from \"@codefast/eslint-config/next\";\n\n/**\n * @see https://eslint.org/docs/latest/use/configure/configuration-files\n * @type {import('eslint').Linter.Config[]}\n */\nconst eslintConfig = [...config];\n\nexport default eslintConfig;\n`,\n description: \"ESLint configuration for the project\",\n },\n {\n path: \"lint-staged.config.mjs\",\n content: `import { relative } from \"node:path\";\n\n/**\n * Builds an ESLint command with the given filenames.\n *\n * @param {string[]} filenames - An array of filenames to be passed to the\n * ESLint command.\n * @returns {string} - The generated ESLint command.\n */\nfunction buildEslintCommand(filenames) {\n return \\`next lint --fix --max-warnings 0 --file \\${filenames.map((file) => relative(import.meta.dirname, file)).\n join(\" --file \")}\\`;\n}\n\n/**\n * @see https://www.npmjs.com/package/lint-staged\n * @type {import('lint-staged').Configuration}\n */\nconst config = {\n \"*.{js,mjs,jsx,ts,tsx}\": [buildEslintCommand, \"prettier --list-different --write\"],\n \"*.{json,css,md,mdx}\": [\"prettier --list-different --write\"],\n};\n\nexport default config;\n`,\n description: \"Configure lint-staged for pre-commit checks\",\n },\n ],\n styles: [\n {\n path: \"src/lib/fonts.ts\",\n content: `import { cn } from \"@codefast/ui\";\nimport { Geist, Geist_Mono as GeistMono } from \"next/font/google\";\n\nconst fontGeistSans = Geist({\n subsets: [\"latin\"],\n variable: \"--font-geist-sans\",\n});\n\nconst fontGeistMono = GeistMono({\n subsets: [\"latin\"],\n variable: \"--font-geist-mono\",\n});\n\nexport const fontVariables = cn(fontGeistSans.variable, fontGeistMono.variable);\n`,\n description: \"Font configuration for the application\",\n },\n {\n path: \"src/app/globals.css\",\n content: `@import \"tailwindcss\";\n\n@import \"@codefast/ui/styles.css\";\n\n@source '../../node_modules/@codefast/ui';\n\n@custom-variant dark (&:where(.dark, .dark *));\n\n@layer base {\n :root {\n --font-sans: var(--font-geist-sans);\n --font-mono: var(--font-geist-mono);\n\n --input: var(--color-neutral-200);\n --border: var(--color-neutral-200);\n --ring: var(--color-neutral-400);\n --background: var(--color-white);\n --foreground: var(--color-neutral-950);\n --primary: var(--color-sky-500);\n --primary-foreground: var(--color-neutral-50);\n --secondary: var(--color-neutral-100);\n --secondary-foreground: var(--color-neutral-900);\n --destructive: var(--color-red-600);\n --accent: var(--color-neutral-100);\n --accent-foreground: var(--color-neutral-900);\n --muted: var(--color-neutral-100);\n --muted-foreground: var(--color-neutral-500);\n --popover: var(--color-white);\n --popover-foreground: var(--color-neutral-950);\n --popover-overlay: --alpha(var(--color-neutral-900) / 20%);\n --card: var(--color-white);\n --card-foreground: var(--color-neutral-950);\n --sidebar: var(--color-neutral-50);\n --sidebar-foreground: var(--color-neutral-950);\n --sidebar-primary: var(--color-sky-500);\n --sidebar-primary-foreground: var(--color-neutral-50);\n --sidebar-accent: var(--color-neutral-100);\n --sidebar-accent-foreground: var(--color-neutral-900);\n --sidebar-border: var(--color-neutral-200);\n --sidebar-ring: var(--color-neutral-400);\n --chart-1: var(--color-orange-600);\n --chart-2: var(--color-teal-600);\n --chart-3: var(--color-cyan-600);\n --chart-4: var(--color-amber-600);\n --chart-5: var(--color-amber-500);\n }\n\n .dark {\n --input: var(--color-neutral-700);\n --border: --alpha(var(--color-neutral-700) / 50%);\n --ring: var(--color-neutral-500);\n --background: var(--color-neutral-950);\n --foreground: var(--color-neutral-50);\n --primary: var(--color-sky-700);\n --primary-foreground: var(--color-neutral-50);\n --secondary: var(--color-neutral-800);\n --secondary-foreground: var(--color-neutral-50);\n --destructive: var(--color-red-400);\n --accent: var(--color-neutral-700);\n --accent-foreground: var(--color-neutral-50);\n --muted: var(--color-neutral-800);\n --muted-foreground: var(--color-neutral-400);\n --popover: var(--color-neutral-800);\n --popover-foreground: var(--color-neutral-50);\n --popover-overlay: --alpha(var(--color-neutral-900) / 80%);\n --card: var(--color-neutral-900);\n --card-foreground: var(--color-neutral-50);\n --sidebar: var(--color-neutral-900);\n --sidebar-foreground: var(--color-neutral-50);\n --sidebar-primary: var(--color-sky-700);\n --sidebar-primary-foreground: var(--color-neutral-50);\n --sidebar-accent: var(--color-neutral-800);\n --sidebar-accent-foreground: var(--color-neutral-50);\n --sidebar-border: var(--color-neutral-800);\n --sidebar-ring: var(--color-neutral-600);\n --chart-1: var(--color-blue-700);\n --chart-2: var(--color-emerald-500);\n --chart-3: var(--color-amber-500);\n --chart-4: var(--color-purple-500);\n --chart-5: var(--color-rose-500);\n }\n}\n`,\n description: \"Global CSS variables for the application\",\n },\n ],\n };\n\n getConfigGroups(): ConfigGroups {\n return this.configGroups;\n }\n}\n","import { inject, injectable } from \"inversify\";\n\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\nimport type { ConfigGroups } from \"@/domain/entities/config-file\";\nimport type { Project } from \"@/domain/entities/project\";\nimport type { ProjectRepositoryInterface } from \"@/domain/interfaces/project.repository\";\n\nimport { handleError } from \"@/application/utilities/error-handler\";\nimport { ConfigService } from \"@/infrastructure/services/config.service\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class CreateProjectUseCase {\n constructor(\n @inject(TYPES.ProjectRepository) private projectRepository: ProjectRepositoryInterface,\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.CommandExecutorPort) private commandExecutorPort: CommandExecutorPort,\n @inject(TYPES.PromptPort) private promptPort: PromptPort,\n @inject(TYPES.ConfigService) private configService: ConfigService,\n ) {}\n\n /**\n * Executes the project creation or configuration process.\n * @param projectName - Optional project name provided via CLI.\n *\n * @returns The created or configured project.\n */\n async execute(projectName?: string): Promise<Project> {\n try {\n this.commandExecutorPort.checkEnvironment();\n const project = await this.checkExistingProject(projectName);\n const configGroups = this.configService.getConfigGroups();\n\n this.createOrConfigureProject(project, configGroups);\n this.displaySuccessMessage(project);\n\n return project;\n } catch (error) {\n handleError(error, \"Failed to create or configure project\");\n throw error;\n } finally {\n this.promptPort.close();\n }\n }\n\n private async checkExistingProject(projectNameArg?: string): Promise<Project> {\n return await this.projectRepository.checkExistingProject(projectNameArg);\n }\n\n private createOrConfigureProject(project: Project, configGroups: ConfigGroups): void {\n if (!project.packageJsonExists) {\n console.log(`\\n๐Ÿš€ Starting project creation for ${project.name}...\\n`);\n this.projectRepository.createNextProject(project.name);\n process.chdir(project.name);\n console.log(`๐Ÿ“‚ Moved to ${project.name}`);\n }\n\n this.updateProjectFiles(project.directory);\n this.commandExecutorPort.installDependencies();\n this.commandExecutorPort.cleanupPackages();\n this.fileSystemPort.createConfigFiles(project.directory, configGroups);\n this.projectRepository.updateNextConfig(project.directory);\n this.projectRepository.updatePackageJson(project.directory);\n this.commandExecutorPort.enableGitHooks();\n this.commandExecutorPort.runFormatter();\n this.commandExecutorPort.runLinter();\n }\n\n private updateProjectFiles(projectDir: string): void {\n this.projectRepository.updateLayoutFile(projectDir);\n this.projectRepository.updatePageFile(projectDir);\n this.projectRepository.updatePostcssConfig(projectDir);\n }\n\n private displaySuccessMessage(project: Project): void {\n console.log(`\\nโœ… Project ${project.packageJsonExists ? \"configured\" : \"created\"} successfully!`);\n console.log(`- Project: ${project.name}`);\n console.log(\"- Next.js with TypeScript\");\n console.log(\"- TailwindCSS and @codefast/ui\");\n console.log(\"- ESLint, Prettier, Commitlint, and Git Hooks\");\n console.log(\"- Lint-staged for pre-commit checks\");\n console.log(`\\n๐Ÿ“ Project directory: ${process.cwd()}`);\n console.log(`\\n๐Ÿš€ To start development:`);\n console.log(`${project.packageJsonExists ? `cd ${project.name} && ` : \"\"}pnpm dev`);\n }\n}\n","import { inject, injectable } from \"inversify\";\n\nimport type { PackageRepository } from \"@/domain/interfaces/package.repository\";\n\nimport { handleError } from \"@/application/utilities/error-handler\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class UpdateExportsUseCase {\n constructor(@inject(TYPES.PackageRepository) private packageRepository: PackageRepository) {}\n\n /**\n * Updates exports for all packages based on provided options and configuration.\n * @param options - Options for dry run, config path, and package filter.\n */\n async execute(options: { dryRun: boolean; configPath?: string; packageFilter?: string }): Promise<void> {\n try {\n console.info(\"โ™ขโ€’ Searching for packages...\");\n const packageJsonPaths = await this.packageRepository.findAllPackages(options.configPath);\n\n if (packageJsonPaths.length === 0) {\n console.warn(\"No packages found.\");\n\n return;\n }\n\n console.log(` Found ${packageJsonPaths.length} packages.`);\n\n let successCount = 0;\n let skipCount = 0;\n let errorCount = 0;\n\n for (const packageJsonPath of packageJsonPaths) {\n const result = this.packageRepository.processPackage(packageJsonPath, options);\n\n if (result) {\n successCount++;\n } else if (options.packageFilter) {\n skipCount++;\n } else {\n errorCount++;\n }\n }\n\n console.log(\"โ™ขโ€’ Completed exports update.\\n\");\n console.info(`Stats: ${successCount} succeeded, ${skipCount} skipped, ${errorCount} failed`);\n } catch (error) {\n handleError(error, \"Error processing packages\");\n throw error;\n }\n }\n}\n","import { Command } from \"commander\";\nimport { inject, injectable } from \"inversify\";\n\nimport type { PackageInfoServiceInterface } from \"@/domain/interfaces/package-info.service\";\n\nimport { CreateProjectCommand } from \"@/application/commands/create-project.command\";\nimport { UpdateExportsCommand } from \"@/application/commands/update-exports.command\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class CLIAdapter {\n constructor(\n @inject(TYPES.CreateProjectCommand) private createProjectCommand: CreateProjectCommand,\n @inject(TYPES.UpdateExportsCommand) private updateExportsCommand: UpdateExportsCommand,\n @inject(TYPES.PackageInfoService) private packageInfoService: PackageInfoServiceInterface,\n ) {}\n\n /**\n * Initializes the CLI with commands for project creation and export updates.\n */\n initialize(): void {\n const program = new Command();\n\n program\n .name(\"codefast\")\n .description(\"CodeFast CLI - A development toolkit for CodeFast.\")\n .version(this.packageInfoService.getPackageVersion(), \"-v, --version\", \"display CLI version\")\n .addCommand(this.createProjectCommand.getCommand())\n .addCommand(this.updateExportsCommand.getCommand())\n .parse(process.argv);\n }\n}\n","import { z } from \"zod\";\n\nexport const packageConfigSchema = z.object({\n cjsOutputPattern: z.string().describe(\"Output pattern for CommonJS format, e.g., './dist/cjs/{dir}/{name}.cjs'\"),\n esmOutputPattern: z.string().describe(\"Output pattern for ESM format, e.g., './dist/esm/{dir}/{name}.js'\"),\n packageJsonPath: z.string().describe(\"Path to the package.json file, e.g., 'package.json'\"),\n srcIndexPath: z.string().describe(\"Path to the source index file, e.g., 'src/index.ts'\"),\n typesOutputCjsPattern: z\n .string()\n .describe(\"Output pattern for CommonJS type declarations, e.g., './dist/types/{dir}/{name}.d.cts'\"),\n typesOutputPattern: z\n .string()\n .describe(\"Output pattern for type declarations, e.g., './dist/types/{dir}/{name}.d.ts'\"),\n exportPathPrefixesToRemove: z\n .array(z.string())\n .optional()\n .describe(\"Prefixes to remove from export paths, e.g., ['components']\"),\n});\n\nexport const scriptConfigSchema = z.object({\n customPackageConfigs: z\n .record(z.string(), packageConfigSchema.partial())\n .describe(\"Custom configurations for specific packages\"),\n defaultPackageConfig: packageConfigSchema.describe(\"Default configuration applied to all packages unless overridden\"),\n packagesGlob: z.string().describe(\"Glob pattern to find package.json files, e.g., './packages/**/package.json'\"),\n});\n\nexport const importPathSchema = z.object({\n directory: z.string().describe(\"Directory containing the import, e.g., 'components'\"),\n exportPath: z.string().describe(\"Resolved export path from the directory, e.g., './button'\"),\n name: z.string().describe(\"Name of the import, e.g., 'Button'\"),\n originalPath: z.string().describe(\"Original unresolved path, e.g., './components/button'\"),\n});\n\nexport const exportConfigSchema = z.object({\n import: z.object({\n default: z.string().describe(\"ESM default export path\"),\n types: z.string().describe(\"ESM types export path\"),\n }),\n require: z.object({\n default: z.string().describe(\"CommonJS default export path\"),\n types: z.string().describe(\"CommonJS types export path\"),\n }),\n});\n\nexport const PackageExportsSchema = z.record(z.string(), z.union([exportConfigSchema, z.string()]));\n\nexport const packageJsonSchema = z\n .object({\n dependencies: z\n .record(z.string(), z.string())\n .optional()\n .describe(\"List of runtime dependencies with their versions\"),\n devDependencies: z\n .record(z.string(), z.string())\n .optional()\n .describe(\"List of development dependencies with their versions\"),\n exports: PackageExportsSchema.optional().describe(\"Export mappings for the package\"),\n name: z.string().describe(\"Name of the package\"),\n scripts: z.record(z.string(), z.string()).describe(\"Script commands defined for the package\"),\n \"simple-git-hooks\": z.record(z.string(), z.string()).optional().describe(\"Git hooks configuration for the package\"),\n version: z.string().optional().describe(\"Version of the package\"),\n })\n .catchall(z.unknown());\n\nexport type PackageConfig = z.infer<typeof packageConfigSchema>;\n\nexport type ScriptConfig = z.infer<typeof scriptConfigSchema>;\n\nexport type ImportPath = z.infer<typeof importPathSchema>;\n\nexport type ExportConfig = z.infer<typeof exportConfigSchema>;\n\nexport type PackageExports = z.infer<typeof PackageExportsSchema>;\n\nexport type PackageJson = z.infer<typeof packageJsonSchema>;\n\nexport interface AnalysisResult {\n imports: ImportPath[];\n}\n","import { inject, injectable } from \"inversify\";\nimport { execSync } from \"node:child_process\";\nimport path from \"node:path\";\n\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { DependencyConfigServiceInterface } from \"@/domain/interfaces/dependency-config.service\";\n\nimport { packageJsonSchema } from \"@/domain/entities/package-config\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class NodeCommandExecutorAdapter implements CommandExecutorPort {\n constructor(\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.DependencyConfigService) private dependencyConfigService: DependencyConfigServiceInterface,\n ) {}\n\n runCommand(command: string): void {\n execSync(command, { stdio: \"inherit\" });\n }\n\n checkEnvironment(): void {\n try {\n this.runCommand(\"pnpm --version\");\n } catch {\n throw new Error(\"PNPM is not installed. Please install PNPM first.\");\n }\n }\n\n installDependencies(): void {\n console.log(`\\n๐Ÿ“š Installing dependencies...`);\n const mainDependencies = this.dependencyConfigService.getMainDependencies();\n\n if (mainDependencies.length > 0) {\n this.runCommand(`pnpm add ${mainDependencies.join(\" \")}`);\n }\n\n const devDependencies = this.dependencyConfigService.getDevDependencies();\n const allDevDependencies = Object.values(devDependencies).flat().join(\" \");\n\n if (allDevDependencies) {\n this.runCommand(`pnpm add -D ${allDevDependencies}`);\n }\n }\n\n cleanupPackages(): void {\n console.log(`\\n๐Ÿงน Cleaning up unnecessary packages...`);\n const packageJsonPath = path.join(process.cwd(), \"package.json\");\n\n if (!this.fileSystemPort.exists(packageJsonPath)) {\n console.warn(`โš ๏ธ package.json not found, skipping cleanup.`);\n\n return;\n }\n\n let packageJson;\n\n try {\n packageJson = packageJsonSchema.parse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n } catch (error) {\n console.warn(\n `โš ๏ธ Error reading package.json: ${error instanceof Error ? error.message : \"Unknown error\"}, skipping cleanup.`,\n );\n\n return;\n }\n\n const dependencies = packageJson.dependencies ?? {};\n const devDependencies = packageJson.devDependencies ?? {};\n const packagesToRemove = this.dependencyConfigService\n .getPackagesToRemove()\n .filter((pkg) => pkg in dependencies || pkg in devDependencies);\n\n if (packagesToRemove.length > 0) {\n this.runCommand(`pnpm remove ${packagesToRemove.join(\" \")}`);\n } else {\n console.log(`โ„น๏ธ No unnecessary packages found in package.json to remove.`);\n }\n }\n\n enableGitHooks(): void {\n console.log(`\\n๐Ÿ”„ Activating git hooks...`);\n this.runCommand(\"pnpm simple-git-hooks\");\n }\n\n runFormatter(): void {\n console.log(`\\n๐Ÿ“ Formatting files with Prettier...`);\n this.runCommand(\"pnpm format\");\n }\n\n runLinter(): void {\n console.log(`\\n๐Ÿ” Running ESLint to check code style...`);\n this.runCommand(\"pnpm lint\");\n }\n}\n","import { injectable } from \"inversify\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { ConfigGroups } from \"@/domain/entities/config-file\";\n\n@injectable()\nexport class NodeFileSystemAdapter implements FileSystemPort {\n exists(filePath: string): boolean {\n return fs.existsSync(filePath);\n }\n\n access(filePath: string): void {\n fs.accessSync(filePath, fs.constants.W_OK);\n }\n\n readFile(filePath: string): string {\n try {\n return fs.readFileSync(filePath, \"utf8\");\n } catch (error) {\n throw new Error(`Failed to read file ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n writeFile(filePath: string, content: string): void {\n try {\n const dir = path.dirname(filePath);\n\n this.createDirectory(dir);\n fs.writeFileSync(filePath, content);\n } catch (error) {\n throw new Error(\n `Failed to write to file ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n );\n }\n }\n\n createDirectory(dirPath: string): void {\n if (!this.exists(dirPath)) {\n fs.mkdirSync(dirPath, { recursive: true });\n }\n }\n\n writeConfigFile(filePath: string, content: string): void {\n this.writeFile(filePath, content);\n console.log(`๐Ÿ“ Created ${filePath}`);\n }\n\n createConfigFiles(projectDir: string, configGroups: ConfigGroups): void {\n console.log(`\\n๐Ÿ“ Creating configuration files...`);\n\n for (const [category, configs] of Object.entries(configGroups)) {\n console.log(`\\n๐Ÿ“‚ Setting up ${category} configurations:`);\n\n for (const config of configs) {\n const fullPath = path.join(projectDir, config.path);\n\n this.writeConfigFile(fullPath, config.content);\n\n if (config.description) {\n console.log(`โ„น๏ธ ${config.path}: ${config.description}`);\n }\n }\n }\n }\n}\n","import { injectable } from \"inversify\";\nimport readline from \"node:readline\";\n\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\n\n@injectable()\nexport class NodePromptAdapter implements PromptPort {\n private rl: readline.Interface;\n\n constructor() {\n this.rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n }\n\n async prompt(message: string): Promise<string> {\n return new Promise((resolve) => {\n this.rl.question(message, (answer) => {\n resolve(answer.trim());\n });\n });\n }\n\n close(): void {\n this.rl.close();\n }\n}\n","import { injectable } from \"inversify\";\nimport { Project, SourceFile } from \"ts-morph\";\n\nimport type { AnalysisPort } from \"@/application/ports/analysis.port\";\nimport type { AnalysisResult, ImportPath, PackageConfig } from \"@/domain/entities/package-config\";\n\n@injectable()\nexport class TsMorphAnalysisAdapter implements AnalysisPort {\n analyzeImports(indexFilePath: string, packageConfig: PackageConfig): AnalysisResult {\n const project = new Project();\n let sourceFile: SourceFile;\n\n try {\n sourceFile = project.addSourceFileAtPath(indexFilePath);\n } catch (error) {\n console.error(\n `Error loading source file at ${indexFilePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n );\n\n return { imports: [] };\n }\n\n const imports: ImportPath[] = [];\n const prefixesToRemove = packageConfig.exportPathPrefixesToRemove ?? [];\n const regexPattern = new RegExp(`^.?\\\\/?(?:${prefixesToRemove.join(\"|\")})\\\\/(.*)$`);\n\n for (const exportDecl of sourceFile.getExportDeclarations()) {\n let moduleSpecifier = exportDecl.getModuleSpecifierValue();\n\n if (!moduleSpecifier) {\n continue;\n }\n\n // Normalize @/ to ./\n if (moduleSpecifier.startsWith(\"@/\")) {\n moduleSpecifier = `./${moduleSpecifier.slice(2)}`;\n }\n\n const isExternal = !moduleSpecifier.startsWith(\".\");\n\n if (isExternal) {\n continue;\n }\n\n const parts = moduleSpecifier.split(\"/\").filter(Boolean);\n\n if (parts.length < 2) {\n continue;\n }\n\n let directory = parts.length <= 1 ? \".\" : parts.slice(0, -1).join(\"/\");\n\n if (directory.startsWith(\"./\")) {\n directory = directory.slice(2);\n }\n\n const name = parts.at(-1) ?? \"\";\n const exportPath = this.processExportPath(moduleSpecifier, regexPattern);\n\n imports.push({\n originalPath: moduleSpecifier,\n directory,\n name,\n exportPath,\n });\n }\n\n return { imports };\n }\n\n private processExportPath(modulePath: string, regexPattern: RegExp): string {\n const match = modulePath.match(regexPattern);\n\n if (match) {\n const remainingPath = match[1];\n\n return remainingPath.startsWith(\"./\") ? remainingPath : `./${remainingPath}`;\n }\n\n return modulePath;\n }\n}\n","import { glob } from \"glob\";\nimport { inject, injectable } from \"inversify\";\nimport { merge } from \"lodash-es\";\nimport path from \"node:path\";\n\nimport type { AnalysisPort } from \"@/application/ports/analysis.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type {\n AnalysisResult,\n PackageConfig,\n PackageExports,\n PackageJson,\n ScriptConfig,\n} from \"@/domain/entities/package-config\";\nimport type { PackageRepository } from \"@/domain/interfaces/package.repository\";\nimport type { FileSystemUtility } from \"@/infrastructure/utilities/file-system-utility\";\n\nimport { scriptConfigSchema } from \"@/domain/entities/package-config\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class FileSystemPackageRepository implements PackageRepository {\n private readonly DEFAULT_IGNORE_PATTERN = [\"**/node_modules/**\"];\n private cachedConfig: null | ScriptConfig = null;\n private defaultConfig: ScriptConfig = {\n packagesGlob: \"./packages/**/package.json\",\n defaultPackageConfig: {\n cjsOutputPattern: \"./dist/cjs/{dir}/{name}.cjs\",\n esmOutputPattern: \"./dist/esm/{dir}/{name}.js\",\n packageJsonPath: \"package.json\",\n srcIndexPath: \"src/index.ts\",\n typesOutputCjsPattern: \"./dist/types/{dir}/{name}.d.ts\",\n typesOutputPattern: \"./dist/types/{dir}/{name}.d.ts\",\n },\n customPackageConfigs: {\n \"@codefast/ui\": {\n exportPathPrefixesToRemove: [\"components\"],\n },\n \"@codefast/style-guide\": {\n exportPathPrefixesToRemove: [\"configs\"],\n },\n },\n };\n\n constructor(\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.AnalysisPort) private analysisPort: AnalysisPort,\n @inject(TYPES.FileSystemUtility) private fileSystemUtility: FileSystemUtility,\n ) {}\n\n async findAllPackages(configPath?: string): Promise<string[]> {\n const config = this.getConfig(configPath);\n\n return await glob(config.packagesGlob, {\n ignore: this.DEFAULT_IGNORE_PATTERN,\n });\n }\n\n processPackage(\n packageJsonPath: string,\n options: {\n dryRun: boolean;\n configPath?: string;\n packageFilter?: string;\n },\n ): boolean {\n const packageDir = path.dirname(packageJsonPath);\n let packageJson;\n\n try {\n packageJson = JSON.parse(this.fileSystemPort.readFile(packageJsonPath)) as PackageJson;\n } catch (error) {\n console.error(`Failed to parse ${packageJsonPath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\n return false;\n }\n\n const packageName = packageJson.name;\n\n if (options.packageFilter && packageName !== options.packageFilter) {\n console.debug(`Skipping ${packageName} (does not match filter)`);\n\n return false;\n }\n\n console.info(`โ™ขโ€’ Processing package: ${packageName}`);\n\n const config = this.getConfig(options.configPath);\n const packageConfig = this.getPackageConfig(packageName, config);\n const srcIndexPath = path.join(packageDir, packageConfig.srcIndexPath);\n\n if (!this.fileSystemPort.exists(srcIndexPath)) {\n console.error(`โŽน โ›”๏ธŽ Source file not found at ${srcIndexPath}`);\n\n return false;\n }\n\n console.info(`โŽน Analyzing imports from ${srcIndexPath}...`);\n const analysis = this.analyzeImports(srcIndexPath, packageConfig);\n\n if (analysis.imports.length === 0) {\n console.warn(`โŽน โ›”๏ธŽ No imports found to analyze in ${packageName}`);\n\n return false;\n }\n\n console.log(`โŽน Analysis complete. Found ${analysis.imports.length} subpath exports.`);\n\n this.saveExportsAnalysis(packageDir, analysis);\n\n const newExports = this.generateExports(packageName, analysis.imports, packageJson.exports ?? {}, config);\n\n const currentExportsCount = packageJson.exports ? Object.keys(packageJson.exports).length : 0;\n const newExportsCount = Object.keys(newExports).length;\n\n console.info(`โŽน Exports: ${currentExportsCount} -> ${newExportsCount}`);\n\n if (options.dryRun) {\n this.saveExportsPreview(packageDir, newExports);\n console.warn(`โŽน Saved exports preview to .exports-analysis`);\n console.warn(`โŽน Dry run: no changes saved for ${packageName}`);\n\n return true;\n }\n\n this.fileSystemUtility.backupFile(packageJsonPath, \".exports-analysis\");\n console.log(`โŽน Backed up ${packageJsonPath}`);\n\n const updatedPackageJson = { ...packageJson, exports: newExports };\n\n this.fileSystemPort.writeFile(packageJsonPath, `${JSON.stringify(updatedPackageJson, null, 2)}\\n`);\n console.log(`โŽน Updated exports for ${packageName}`);\n\n return true;\n }\n\n analyzeImports(indexFilePath: string, packageConfig: PackageConfig): AnalysisResult {\n return this.analysisPort.analyzeImports(indexFilePath, packageConfig);\n }\n\n generateExports(\n packageName: string,\n imports: AnalysisResult[\"imports\"],\n existingExports: PackageExports,\n config: ScriptConfig,\n ): PackageExports {\n const packageConfig = this.getPackageConfig(packageName, config);\n const exports: PackageExports = {\n \".\": existingExports[\".\"] ?? {\n import: {\n default: \"./dist/esm/index.js\",\n types: \"./dist/types/index.d.ts\",\n },\n require: {\n default: \"./dist/cjs/index.cjs\",\n types: \"./dist/types/index.d.cts\",\n },\n },\n };\n\n if (existingExports[\"./styles.css\"]) {\n exports[\"./styles.css\"] = existingExports[\"./styles.css\"];\n }\n\n for (const importPath of imports) {\n const { directory, name, exportPath } = importPath;\n const esmOutput = this.formatOutputPath(packageConfig.esmOutputPattern, directory, name);\n const cjsOutput = this.formatOutputPath(packageConfig.cjsOutputPattern, directory, name);\n const typesOutput = this.formatOutputPath(packageConfig.typesOutputPattern, directory, name);\n const typesCjsOutput = this.formatOutputPath(packageConfig.typesOutputCjsPattern, directory, name);\n\n exports[exportPath] = {\n import: {\n default: esmOutput,\n types: typesOutput,\n },\n require: {\n default: cjsOutput,\n types: typesCjsOutput,\n },\n };\n }\n\n return exports;\n }\n\n private getConfig(configPath?: string): ScriptConfig {\n if (this.cachedConfig && !configPath) {\n return this.cachedConfig;\n }\n\n const userConfig = this.loadConfigFile(configPath);\n const config = merge({}, this.defaultConfig, userConfig) as ScriptConfig;\n\n if (!configPath) {\n this.cachedConfig = config;\n }\n\n return config;\n }\n\n private loadConfigFile(configPath?: string): Partial<ScriptConfig> {\n if (!configPath) {\n return {};\n }\n\n try {\n const fullPath = path.resolve(configPath);\n\n if (!this.fileSystemPort.exists(fullPath)) {\n console.warn(`Configuration file not found at ${fullPath}`);\n\n return {};\n }\n\n const configContent = this.fileSystemPort.readFile(fullPath);\n\n return scriptConfigSchema.parse(JSON.parse(configContent));\n } catch (error) {\n console.error(`Error reading configuration file: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\n return {};\n }\n }\n\n private getPackageConfig(packageName: string, config: ScriptConfig): PackageConfig {\n const customConfig = config.customPackageConfigs[packageName] ?? {};\n\n return { ...config.defaultPackageConfig, ...customConfig };\n }\n\n private formatOutputPath(pattern: string, directory: string, name: string): string {\n const dirPart = directory === \".\" ? \"\" : `${directory}/`;\n\n return pattern.replace(\"{dir}/\", dirPart).replace(\"{dir}\", directory).replace(\"{name}\", name);\n }\n\n private saveExportsAnalysis(packageDir: string, analysis: AnalysisResult): void {\n const outputDir = path.join(packageDir, \".exports-analysis\");\n\n this.fileSystemPort.createDirectory(outputDir);\n this.fileSystemPort.writeFile(path.join(outputDir, \"exports-analysis.json\"), JSON.stringify(analysis, null, 2));\n }\n\n private saveExportsPreview(packageDir: string, exports: PackageExports): void {\n const outputDir = path.join(packageDir, \".exports-analysis\");\n\n this.fileSystemPort.createDirectory(outputDir);\n this.fileSystemPort.writeFile(path.join(outputDir, \"exports-preview.json\"), JSON.stringify(exports, null, 2));\n }\n}\n","import { z } from \"zod\";\n\n/**\n * Schema for validating project configuration.\n * Ensures the project name is URL-friendly, not reserved, and the directory is valid.\n */\nexport const projectSchema = z.object({\n name: z\n .string()\n .min(1, \"Project name cannot be empty\")\n .max(100, \"Project name is too long (maximum 100 characters)\")\n .regex(/^[a-z0-9-~][a-z0-9-._~]*$/, {\n message:\n \"Project name must be URL-friendly (letters, numbers, hyphens, underscores, dots; no @ or scoped packages)\",\n })\n .refine((name) => name !== \".\" && name !== \"..\", {\n message: \"Project name cannot be '.' or '..'\",\n })\n .refine((name) => !/^(?<reserved>CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/i.test(name), {\n message: \"Project name is a reserved system name\",\n }),\n directory: z.string().describe(\"Project directory path\"),\n packageJsonExists: z.boolean().describe(\"Whether package.json exists in the project directory\"),\n});\n\nexport type Project = z.infer<typeof projectSchema>;\n","import { inject, injectable } from \"inversify\";\nimport path from \"node:path\";\n\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\nimport type { Project } from \"@/domain/entities/project\";\nimport type { ProjectRepositoryInterface } from \"@/domain/interfaces/project.repository\";\nimport type { FileSystemUtility } from \"@/infrastructure/utilities/file-system-utility\";\n\nimport { PackageJson, packageJsonSchema } from \"@/domain/entities/package-config\";\nimport { projectSchema } from \"@/domain/entities/project\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class FileSystemProjectRepository implements ProjectRepositoryInterface {\n constructor(\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.CommandExecutorPort) private commandExecutorPort: CommandExecutorPort,\n @inject(TYPES.PromptPort) private promptPort: PromptPort,\n @inject(TYPES.FileSystemUtility) private fileSystemUtility: FileSystemUtility,\n ) {}\n\n async checkExistingProject(projectName?: string): Promise<Project> {\n let fullPath = process.cwd();\n let name = \"\";\n const packageJsonPath = path.join(process.cwd(), \"package.json\");\n const packageJsonExists = this.fileSystemPort.exists(packageJsonPath);\n\n if (packageJsonExists) {\n const result = packageJsonSchema.safeParse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n\n if (result.success) {\n name = result.data.name;\n }\n } else {\n name = await this.getValidProjectName(projectName);\n\n fullPath = path.resolve(process.cwd(), name);\n }\n\n return {\n name,\n directory: fullPath,\n packageJsonExists,\n };\n }\n\n createNextProject(projectName: string): void {\n const flags = [\n \"--ts\",\n \"--tailwind\",\n \"--eslint\",\n \"--app\",\n \"--turbo\",\n \"--use-pnpm\",\n \"--src-dir\",\n \"--turbopack\",\n '--import-alias \"@/*\"',\n ].join(\" \");\n\n this.commandExecutorPort.runCommand(`npx create-next-app@latest ${projectName} ${flags}`);\n }\n\n updateLayoutFile(projectDir: string): void {\n const layoutPath = path.join(projectDir, \"src\", \"app\", \"layout.tsx\");\n const htmlTarget = '<html className={cn(fontVariables, \"antialiased\")} lang=\"en\">';\n\n this.fileSystemUtility.updateFileIfNeeded(\n layoutPath,\n (content) => content.includes(htmlTarget),\n (content) => {\n // Import replacements\n const newImports = `import type { Metadata } from \"next\";\nimport type { JSX, ReactNode } from \"react\";\nimport { cn } from \"@codefast/ui\";\nimport { fontVariables } from \"@/lib/fonts\";\nimport \"@/app/globals.css\";`;\n\n let result = content;\n\n // Remove existing font imports and definitions\n result = result.replaceAll(/import\\s+{[^}]+}\\s+from\\s+[\"']next\\/font\\/google[\"'];\\s*/g, \"\");\n result = result.replace(/const\\s+geistSans\\s*=[^;]+;\\s*const\\s+geistMono\\s*=[^;]+;\\s*/, \"\");\n result = result.replace(\n /import\\s+type\\s+{[^}]+}\\s+from\\s+[\"']next[\"'];\\s*import\\s+[\"']\\.\\/globals\\.css[\"'];\\s*/,\n newImports,\n );\n\n // Update React.ReactNode to ReactNode and add a return type\n result = result.replace(\n /export default function RootLayout\\({\\s*children,\\s*}\\s*:\\s*Readonly<{\\s*children:\\s*React\\.ReactNode;\\s*}>\\)\\s*{/,\n `export default function RootLayout({ children }: Readonly<{ children: ReactNode }>): JSX.Element {`,\n );\n\n // Update HTML and body tags\n result = result.replace(/<html\\s+lang=\"en\"\\s*>/, htmlTarget);\n result = result.replace(/<body\\s+className={`[^`]*`}\\s*>/, `<body>`);\n\n return result;\n },\n );\n }\n\n updatePageFile(projectDir: string): void {\n const pagePath = path.join(projectDir, \"src\", \"app\", \"page.tsx\");\n\n this.fileSystemUtility.updateFileIfNeeded(\n pagePath,\n (content) => content.includes(\"): JSX.Element\"),\n (content) => {\n let result = content;\n\n // Add JSX import if not present\n if (!result.includes(\"import type { JSX }\")) {\n if (result.includes(\"import type {\")) {\n // Add JSX to existing type import\n result = result.replace(\n /import type {(?<types>[^}]+)} from \"react\";/,\n 'import type {$1, JSX } from \"react\";',\n );\n } else if (result.includes(\"import {\")) {\n // Add type import before the first import\n result = result.replace(/import {/, 'import type { JSX } from \"react\";\\n\\nimport {');\n } else {\n // Add type import at the beginning of the file\n result = `import type { JSX } from \"react\";\\n\\n${result}`;\n }\n }\n\n // Add JSX.Element return type to the Home component\n result = result.replace(/export default function Home\\(\\) {/, \"export default function Home(): JSX.Element {\");\n\n return result;\n },\n );\n }\n\n updatePostcssConfig(projectDir: string): void {\n const postcssConfigPath = path.join(projectDir, \"postcss.config.mjs\");\n const typeComment = `/** @type {import('postcss-load-config').Config} */\\n`;\n\n this.fileSystemUtility.updateFileIfNeeded(\n postcssConfigPath,\n (content) => content.includes(typeComment),\n (content) => content.replace(\"const config = {\", `${typeComment}const config = {`),\n );\n }\n\n updateNextConfig(projectDir: string): void {\n const nextConfigPath = path.join(projectDir, \"next.config.ts\");\n const optimizePackagesConfig = 'optimizePackageImports: [\"@codefast/ui\"]';\n\n this.fileSystemUtility.updateFileIfNeeded(\n nextConfigPath,\n (content) => content.includes(optimizePackagesConfig),\n (content) =>\n content.replace(\n /const nextConfig: NextConfig = \\{/,\n `const nextConfig: NextConfig = {\n experimental: {\n optimizePackageImports: [\"@codefast/ui\"],\n },`,\n ),\n );\n }\n\n updatePackageJson(projectDir: string): void {\n const packageJsonPath = path.join(projectDir, \"package.json\");\n\n if (!this.fileSystemPort.exists(packageJsonPath)) {\n console.warn(`โš ๏ธ package.json not found, skipping update.`);\n\n return;\n }\n\n let packageJson: PackageJson | undefined;\n\n try {\n packageJson = packageJsonSchema.parse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n } catch {\n console.warn(`Failed to parse ${packageJsonPath}, skipping update.`);\n\n return;\n }\n\n packageJson.scripts = {\n ...packageJson.scripts,\n \"check-types\": \"tsc --noEmit\",\n \"deploy:preview\": \"vercel deploy --archive=tgz\",\n \"deploy:prod\": \"vercel deploy --archive=tgz --prod\",\n format: \"prettier --write --ignore-unknown .\",\n \"format:check\": \"prettier --check --ignore-unknown .\",\n lint: \"next lint --fix --max-warnings 0\",\n \"lint:check\": \"next lint --max-warnings 0\",\n \"package:install\": \"pnpm install\",\n \"package:outdated\": \"pnpm outdated\",\n \"package:upgrade\": \"pnpm update --latest\",\n preview: \"pnpm build && pnpm start\",\n };\n\n packageJson[\"simple-git-hooks\"] = {\n \"pre-commit\": \"pnpm lint-staged\",\n \"commit-msg\": \"pnpm commitlint --edit\",\n };\n\n this.fileSystemPort.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));\n console.log(`๐Ÿ“ Updated ${packageJsonPath}`);\n }\n\n private async getValidProjectName(initialName?: string, attempts = 0, maxAttempts = 3): Promise<string> {\n const projectName = initialName ?? (await this.promptPort.prompt(\"Enter project name: \"));\n const result = projectSchema.safeParse({ name: projectName, directory: \"\", packageJsonExists: false });\n\n if (result.success) {\n const fullPath = path.resolve(process.cwd(), projectName);\n\n if (this.fileSystemPort.exists(fullPath)) {\n throw new Error(`A directory named \"${projectName}\" already exists.`);\n }\n\n try {\n this.fileSystemPort.access(process.cwd());\n } catch {\n throw new Error(\"Cannot create project: No write permission in current directory.\");\n }\n\n return projectName;\n }\n\n if (attempts >= maxAttempts - 1) {\n throw new Error(`Exceeded maximum attempts to enter a valid project name.`);\n }\n\n console.error(`โŒ ${result.error.message} (${maxAttempts - attempts - 1} attempts remaining)`);\n\n return this.getValidProjectName(undefined, attempts + 1, maxAttempts);\n }\n}\n","import { injectable } from \"inversify\";\n\nimport type { DependencyConfigServiceInterface } from \"@/domain/interfaces/dependency-config.service\";\n\n@injectable()\nexport class DependencyConfigService implements DependencyConfigServiceInterface {\n private readonly MAIN_DEPENDENCIES: string[] = [\n \"@codefast/ui\",\n \"@codefast/hooks\",\n \"recharts\",\n \"react-hook-form\",\n \"next-themes\",\n \"date-fns\",\n \"lucide-react\",\n ];\n\n private readonly DEV_DEPENDENCIES: Record<string, string[]> = {\n commitLint: [\"@commitlint/cli\", \"@commitlint/config-conventional\", \"@commitlint/types\"],\n gitTools: [\"simple-git-hooks\"],\n formatting: [\"prettier\", \"prettier-plugin-packagejson\", \"prettier-plugin-tailwindcss\", \"lint-staged\"],\n linting: [\"@codefast/eslint-config\"],\n };\n\n private readonly PACKAGES_TO_REMOVE: string[] = [\"@eslint/eslintrc\", \"eslint-config-next\"];\n\n getMainDependencies(): string[] {\n return this.MAIN_DEPENDENCIES;\n }\n\n getDevDependencies(): Record<string, string[]> {\n return this.DEV_DEPENDENCIES;\n }\n\n getPackagesToRemove(): string[] {\n return this.PACKAGES_TO_REMOVE;\n }\n}\n","import { inject, injectable } from \"inversify\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PackageInfoServiceInterface } from \"@/domain/interfaces/package-info.service\";\n\nimport { packageJsonSchema } from \"@/domain/entities/package-config\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class NodePackageInfoService implements PackageInfoServiceInterface {\n constructor(@inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort) {}\n\n getPackageVersion(): string {\n try {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n const packageJsonPath = path.resolve(__dirname, \"..\", \"package.json\");\n const packageJsonResult = packageJsonSchema.parse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n\n return packageJsonResult.version ?? \"0.0.0\";\n } catch (error) {\n console.warn(`Failed to read package version: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\n return \"unknown\";\n }\n }\n}\n","import { inject, injectable } from \"inversify\";\nimport path from \"node:path\";\n\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\n\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class FileSystemUtility {\n constructor(@inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort) {}\n\n /**\n * Updates the file content if a condition is met.\n *\n * @param filePath - The path of the file to potentially update.\n * @param checkFn - A function that determines if the current content needs updating.\n * It takes the current content as input and returns a boolean indicating whether an update is\n * necessary.\n * @param updateFn - A function that generates new content for the file based on its current content.\n * It takes the current content as input and returns the updated content as output.\n *\n * This method checks if the specified file exists in the file system. If it does, it reads the current content of\n * the file and uses `checkFn` to determine whether an update is required. If `checkFn` returns true, indicating no\n * updates are needed, a log message is displayed. Otherwise, `updateFn` is used to generate new content for the\n * file. The file system is then updated with this new content, and a success message is logged. In case of an\n * error during the update process, a warning message is logged instead.\n *\n * @returns void - This method does not return any value.\n */\n updateFileIfNeeded(\n filePath: string,\n checkFn: (content: string) => boolean,\n updateFn: (content: string) => string,\n ): void {\n if (!this.fileSystemPort.exists(filePath)) {\n return;\n }\n\n const currentContent = this.fileSystemPort.readFile(filePath);\n\n if (checkFn(currentContent)) {\n console.log(`โ„น๏ธ ${filePath} is already up to date`);\n\n return;\n }\n\n try {\n const updatedContent = updateFn(currentContent);\n\n this.fileSystemPort.writeFile(filePath, updatedContent);\n console.log(`๐Ÿ“ Updated ${filePath}`);\n } catch (error) {\n console.warn(`โš ๏ธ Failed to update ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n /**\n * Backs up a file to a specified backup directory with a timestamped filename.\n *\n * @param filePath - The path of the file to be backed up.\n * @param backupDir - The name of the subdirectory under the original file's directory where the backup should be\n * stored. This directory will be created if it does not exist.\n *\n * @returns void\n */\n backupFile(filePath: string, backupDir: string): void {\n try {\n const content = this.fileSystemPort.readFile(filePath);\n const baseName = path.basename(filePath);\n const timestamp = new Date().toISOString().replaceAll(/[:.]/g, \"-\");\n const backupPath = path.join(path.dirname(filePath), backupDir, `${baseName}.backup.${timestamp}`);\n\n this.fileSystemPort.createDirectory(path.dirname(backupPath));\n this.fileSystemPort.writeFile(backupPath, content);\n } catch (error) {\n console.error(`Error backing up ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n}\n","import { Container } from \"inversify\";\n\nimport type { AnalysisPort } from \"@/application/ports/analysis.port\";\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\nimport type { ConfigServiceInterface } from \"@/domain/interfaces/config.service\";\nimport type { DependencyConfigServiceInterface } from \"@/domain/interfaces/dependency-config.service\";\nimport type { PackageInfoServiceInterface } from \"@/domain/interfaces/package-info.service\";\nimport type { PackageRepository } from \"@/domain/interfaces/package.repository\";\nimport type { ProjectRepositoryInterface } from \"@/domain/interfaces/project.repository\";\n\nimport { CreateProjectCommand } from \"@/application/commands/create-project.command\";\nimport { UpdateExportsCommand } from \"@/application/commands/update-exports.command\";\nimport { CreateProjectUseCase } from \"@/application/use-cases/create-project.use-case\";\nimport { UpdateExportsUseCase } from \"@/application/use-cases/update-exports.use-case\";\nimport { CLIAdapter } from \"@/infrastructure/adapters/cli.adapter\";\nimport { NodeCommandExecutorAdapter } from \"@/infrastructure/adapters/node-command-executor.adapter\";\nimport { NodeFileSystemAdapter } from \"@/infrastructure/adapters/node-file-system.adapter\";\nimport { NodePromptAdapter } from \"@/infrastructure/adapters/node-prompt.adapter\";\nimport { TsMorphAnalysisAdapter } from \"@/infrastructure/adapters/ts-morph-analysis.adapter\";\nimport { FileSystemPackageRepository } from \"@/infrastructure/repositories/file-system-package.repository\";\nimport { FileSystemProjectRepository } from \"@/infrastructure/repositories/file-system-project.repository\";\nimport { ConfigService } from \"@/infrastructure/services/config.service\";\nimport { DependencyConfigService } from \"@/infrastructure/services/dependency-config.service\";\nimport { NodePackageInfoService } from \"@/infrastructure/services/node-package-info.service\";\nimport { FileSystemUtility } from \"@/infrastructure/utilities/file-system-utility\";\nimport { TYPES } from \"@/ioc/types\";\n\nconst container = new Container();\n\n// Domain bindings\ncontainer.bind<ProjectRepositoryInterface>(TYPES.ProjectRepository).to(FileSystemProjectRepository).inSingletonScope(); // Handles project creation and file updates\ncontainer.bind<PackageRepository>(TYPES.PackageRepository).to(FileSystemPackageRepository).inSingletonScope(); // Manages package.json exports\n\ncontainer.bind<PackageInfoServiceInterface>(TYPES.PackageInfoService).to(NodePackageInfoService).inSingletonScope(); // Provides package version\ncontainer\n .bind<DependencyConfigServiceInterface>(TYPES.DependencyConfigService)\n .to(DependencyConfigService)\n .inSingletonScope(); // Provides dependency configuration\ncontainer.bind<ConfigServiceInterface>(TYPES.ConfigService).to(ConfigService).inSingletonScope(); // Provides CLI configuration\n\n// Application bindings\ncontainer.bind<FileSystemPort>(TYPES.FileSystemPort).to(NodeFileSystemAdapter).inSingletonScope(); // File system operations\ncontainer.bind<CommandExecutorPort>(TYPES.CommandExecutorPort).to(NodeCommandExecutorAdapter).inSingletonScope(); // Command execution\ncontainer.bind<PromptPort>(TYPES.PromptPort).to(NodePromptAdapter).inSingletonScope(); // User input prompting\ncontainer.bind<AnalysisPort>(TYPES.AnalysisPort).to(TsMorphAnalysisAdapter).inSingletonScope(); // Import analysis\n\ncontainer.bind<CreateProjectUseCase>(TYPES.CreateProjectUseCase).to(CreateProjectUseCase).inSingletonScope(); // Project creation logic\ncontainer.bind<UpdateExportsUseCase>(TYPES.UpdateExportsUseCase).to(UpdateExportsUseCase).inSingletonScope(); // Export update logic\n\ncontainer.bind<CreateProjectCommand>(TYPES.CreateProjectCommand).to(CreateProjectCommand).inSingletonScope(); // CLI command for project creation\ncontainer.bind<UpdateExportsCommand>(TYPES.UpdateExportsCommand).to(UpdateExportsCommand).inSingletonScope(); // CLI command for export updates\n\n// Infrastructure bindings\ncontainer.bind<CLIAdapter>(TYPES.CLIAdapter).to(CLIAdapter).inSingletonScope(); // CLI setup and command registration\n\ncontainer.bind<FileSystemUtility>(TYPES.FileSystemUtility).to(FileSystemUtility).inSingletonScope(); // File system utility functions\n\nexport { container };\n","\n\nimport type { CLIAdapter } from \"@/infrastructure/adapters/cli.adapter\";\n\nimport { container } from \"@/ioc/container\";\nimport { TYPES } from \"@/ioc/types\";\n\nfunction main(): void {\n const cliAdapter = container.get<CLIAdapter>(TYPES.CLIAdapter);\n\n cliAdapter.initialize();\n}\n\nmain();\n"],"names":["TYPES","Symbol","CreateProjectCommand","createProjectUseCase","Command","projectName","process","UpdateExportsCommand","updateExportsUseCase","options","Boolean","handleError","error","defaultMessage","message","Error","console","ConfigService","CreateProjectUseCase","projectRepository","fileSystemPort","commandExecutorPort","promptPort","configService","project","configGroups","projectNameArg","projectDir","UpdateExportsUseCase","packageRepository","packageJsonPaths","successCount","skipCount","errorCount","packageJsonPath","result","CLIAdapter","createProjectCommand","updateExportsCommand","packageInfoService","program","packageConfigSchema","z","scriptConfigSchema","exportConfigSchema","PackageExportsSchema","packageJsonSchema","NodeCommandExecutorAdapter","dependencyConfigService","command","execSync","mainDependencies","devDependencies","allDevDependencies","Object","path","packageJson","JSON","dependencies","packagesToRemove","pkg","NodeFileSystemAdapter","filePath","fs","content","dir","dirPath","category","configs","config","fullPath","NodePromptAdapter","readline","Promise","resolve","answer","TsMorphAnalysisAdapter","indexFilePath","packageConfig","Project","sourceFile","imports","prefixesToRemove","regexPattern","RegExp","exportDecl","moduleSpecifier","isExternal","parts","directory","name","exportPath","modulePath","match","remainingPath","FileSystemPackageRepository","analysisPort","fileSystemUtility","configPath","glob","packageDir","packageName","srcIndexPath","analysis","newExports","currentExportsCount","newExportsCount","updatedPackageJson","existingExports","exports","importPath","esmOutput","cjsOutput","typesOutput","typesCjsOutput","userConfig","merge","configContent","customConfig","pattern","dirPart","outputDir","projectSchema","FileSystemProjectRepository","packageJsonExists","flags","layoutPath","htmlTarget","newImports","pagePath","postcssConfigPath","typeComment","nextConfigPath","optimizePackagesConfig","initialName","attempts","maxAttempts","undefined","DependencyConfigService","NodePackageInfoService","__filename","fileURLToPath","__dirname","packageJsonResult","FileSystemUtility","checkFn","updateFn","currentContent","updatedContent","backupDir","baseName","timestamp","Date","backupPath","container","Container","main","cliAdapter"],"mappings":";;;;;;;;;;;;;AAAO,MAAMA,QAAQ;IACnB,mBAAmBC,OAAO,GAAG,CAAC;IAC9B,mBAAmBA,OAAO,GAAG,CAAC;IAE9B,gBAAgBA,OAAO,GAAG,CAAC;IAC3B,qBAAqBA,OAAO,GAAG,CAAC;IAChC,YAAYA,OAAO,GAAG,CAAC;IACvB,cAAcA,OAAO,GAAG,CAAC;IAEzB,oBAAoBA,OAAO,GAAG,CAAC;IAC/B,yBAAyBA,OAAO,GAAG,CAAC;IACpC,eAAeA,OAAO,GAAG,CAAC;IAE1B,mBAAmBA,OAAO,GAAG,CAAC;IAE9B,sBAAsBA,OAAO,GAAG,CAAC;IACjC,sBAAsBA,OAAO,GAAG,CAAC;IAEjC,sBAAsBA,OAAO,GAAG,CAAC;IACjC,sBAAsBA,OAAO,GAAG,CAAC;IAEjC,YAAYA,OAAO,GAAG,CAAC;AACzB;;;;;;;;;;;;;;;ACbO,MAAMC;IAC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gBAAgB;AAG1GmJ,UAAU,IAAI,CAAa1J,MAAM,UAAU,EAAE,EAAE,CAACoC,YAAY,gBAAgB;AAE5EsH,UAAU,IAAI,CAAoB1J,MAAM,iBAAiB,EAAE,EAAE,CAACgJ,uCAAmB,gBAAgB;AClDjG,SAASY;IACP,MAAMC,aAAaH,UAAU,GAAG,CAAa1J,MAAM,UAAU;IAE7D6J,WAAW,UAAU;AACvB;AAEAD"}
1
+ {"version":3,"file":"index.js","sources":["webpack://@codefast/cli/./src/ioc/types.ts","webpack://@codefast/cli/./src/application/commands/create-project.command.ts","webpack://@codefast/cli/./src/application/commands/update-exports.command.ts","webpack://@codefast/cli/./src/application/utilities/error-handler.ts","webpack://@codefast/cli/./src/infrastructure/services/config.service.ts","webpack://@codefast/cli/./src/application/use-cases/create-project.use-case.ts","webpack://@codefast/cli/./src/application/use-cases/update-exports.use-case.ts","webpack://@codefast/cli/./src/infrastructure/adapters/cli.adapter.ts","webpack://@codefast/cli/./src/domain/entities/package-config.ts","webpack://@codefast/cli/./src/infrastructure/adapters/node-command-executor.adapter.ts","webpack://@codefast/cli/./src/infrastructure/adapters/node-file-system.adapter.ts","webpack://@codefast/cli/./src/infrastructure/adapters/node-prompt.adapter.ts","webpack://@codefast/cli/./src/infrastructure/adapters/ts-morph-analysis.adapter.ts","webpack://@codefast/cli/./src/infrastructure/repositories/file-system-package.repository.ts","webpack://@codefast/cli/./src/domain/entities/project.ts","webpack://@codefast/cli/./src/infrastructure/repositories/file-system-project.repository.ts","webpack://@codefast/cli/./src/infrastructure/services/dependency-config.service.ts","webpack://@codefast/cli/./src/infrastructure/services/node-package-info.service.ts","webpack://@codefast/cli/./src/infrastructure/utilities/file-system-utility.ts","webpack://@codefast/cli/./src/ioc/container.ts","webpack://@codefast/cli/./src/index.ts"],"sourcesContent":["export const TYPES = {\n ProjectRepository: Symbol.for(\"ProjectRepository\"),\n PackageRepository: Symbol.for(\"PackageRepository\"),\n\n FileSystemPort: Symbol.for(\"FileSystemPort\"),\n CommandExecutorPort: Symbol.for(\"CommandExecutorPort\"),\n PromptPort: Symbol.for(\"PromptPort\"),\n AnalysisPort: Symbol.for(\"AnalysisPort\"),\n\n PackageInfoService: Symbol.for(\"PackageInfoService\"),\n DependencyConfigService: Symbol.for(\"DependencyConfigService\"),\n ConfigService: Symbol.for(\"ConfigService\"),\n\n FileSystemUtility: Symbol.for(\"FileSystemUtility\"),\n\n CreateProjectUseCase: Symbol.for(\"CreateProjectUseCase\"),\n UpdateExportsUseCase: Symbol.for(\"UpdateExportsUseCase\"),\n\n CreateProjectCommand: Symbol.for(\"CreateProjectCommand\"),\n UpdateExportsCommand: Symbol.for(\"UpdateExportsCommand\"),\n\n CLIAdapter: Symbol.for(\"CLIAdapter\"),\n};\n","import { Command } from \"commander\";\nimport { inject, injectable } from \"inversify\";\nimport process from \"node:process\";\n\nimport type { CreateProjectUseCase } from \"@/application/use-cases/create-project.use-case\";\n\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class CreateProjectCommand {\n constructor(@inject(TYPES.CreateProjectUseCase) private createProjectUseCase: CreateProjectUseCase) {}\n\n /**\n * Returns a Commander.js command for creating or configuring a project.\n *\n * @returns Configured Commander.js command.\n */\n getCommand(): Command {\n return new Command()\n .name(\"create-project\")\n .description(\"Create a new Next.js project with TypeScript, TailwindCSS, and linting setup\")\n .argument(\"[project-name]\", \"Name of the project to create\")\n .action(async (projectName: string) => {\n await this.createProjectUseCase.execute(projectName);\n\n process.exit(0);\n });\n }\n}\n","import { Command } from \"commander\";\nimport { inject, injectable } from \"inversify\";\nimport * as process from \"node:process\";\n\nimport type { UpdateExportsUseCase } from \"@/application/use-cases/update-exports.use-case\";\n\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class UpdateExportsCommand {\n constructor(@inject(TYPES.UpdateExportsUseCase) private updateExportsUseCase: UpdateExportsUseCase) {}\n\n /**\n * Returns a Commander.js command for updating package exports.\n *\n * @returns Configured Commander.js command.\n */\n getCommand(): Command {\n return new Command()\n .name(\"update-exports\")\n .description(\"Updates exports for all packages\")\n .option(\"-p, --package <package>\", \"Filter by package name\")\n .option(\"-d, --dry-run\", \"Run without making changes\")\n .option(\"-c, --config <path>\", \"Path to configuration file\")\n .action(async (options: { config?: string; dryRun?: string; package?: string }) => {\n await this.updateExportsUseCase.execute({\n packageFilter: options.package,\n dryRun: Boolean(options.dryRun),\n configPath: options.config,\n });\n\n process.exit(0);\n });\n }\n}\n","/**\n * Utility function for handling errors consistently across use cases and repositories.\n * @param error - The error object or unknown value.\n * @param defaultMessage - Default message to display if an error message is unavailable.\n */\nexport function handleError(error: unknown, defaultMessage: string): void {\n const message = error instanceof Error ? error.message : defaultMessage;\n\n console.error(`\\nโŒ ${message}`);\n}\n","import { injectable } from \"inversify\";\n\nimport type { ConfigGroups } from \"@/domain/entities/config-file\";\nimport type { ConfigServiceInterface } from \"@/domain/interfaces/config.service\";\n\n@injectable()\nexport class ConfigService implements ConfigServiceInterface {\n private readonly configGroups: ConfigGroups = {\n deployment: [\n {\n path: \".vercelignore\",\n content: `#-------------------------------------------------------------------------------\n# Dependencies and package managers\n#-------------------------------------------------------------------------------\n\n# Node dependencies\nnode_modules\n.pnpm-store\n.yarn\n\n#-------------------------------------------------------------------------------\n# Development and environment\n#-------------------------------------------------------------------------------\n\n# Environment variables (except examples)\n.env*\n!.env.example\n\n# Build artifacts\n.next\nbuild\ndist\n.git\n.github\n.turbo\n.changeset\n.eslintcache\n\n# Debug logs\nnpm-debug.log*\nyarn-debug.log*\n\n#-------------------------------------------------------------------------------\n# Testing\n#-------------------------------------------------------------------------------\n\n# Test coverage reports and config snapshots\ncoverage\n*.test.*\n*.e2e.*\n\n#-------------------------------------------------------------------------------\n# Editor and IDE configuration\n#-------------------------------------------------------------------------------\n\n# IDE project files\n.idea\n*.suo\n*.ntvs*\n*.njsproj\n*.sln\n\n#-------------------------------------------------------------------------------\n# Operating system files\n#-------------------------------------------------------------------------------\n\n# System metadata files\n.DS_Store\nThumbs.db\n\n#-------------------------------------------------------------------------------\n# Deployment\n#-------------------------------------------------------------------------------\n\n# Vercel deployment configuration\n.vercel\n`,\n description: \"Ignore files that should not be deployed to Vercel\",\n },\n ],\n formatting: [\n {\n path: \"prettier.config.mjs\",\n content: `/**\n * @see https://prettier.io/docs/en/configuration.html\n * @type {import('prettier').Config}\n */\nconst config = {\n plugins: [\"prettier-plugin-packagejson\", \"prettier-plugin-tailwindcss\"],\n printWidth: 100,\n tailwindAttributes: [\"classNames\"],\n tailwindFunctions: [\"tv\"],\n};\n\nexport default config;\n`,\n description: \"Prettier configuration for source code formatting\",\n },\n {\n path: \".editorconfig\",\n content: `# https://editorconfig.org\nroot = true\n\n[*]\ncharset = utf-8\ninsert_final_newline = true\n\nend_of_line = lf\nindent_style = space\nindent_size = 2\nmax_line_length = 120\n\ntrim_trailing_whitespace = true\n\n[Makefile]\nindent_style = tab\n\n[{go.mod,go.sum,*.go}]\nindent_style = tab\n\n[*.rs]\n# Keep in sync with rustfmt\nindent_size = 4\n`,\n description: \"Editor configuration for source code formatting\",\n },\n {\n path: \".prettierignore\",\n content: `# changesets\n.changeset\n\n# debug\nnpm-debug.log*\nyarn-debug.log*\nyarn-error.log*\n.pnpm-debug.log*\n\n# lock files\npackage-lock.json\nyarn.lock\npnpm-lock.yaml\n`,\n description: \"\",\n },\n ],\n linting: [\n {\n path: \"commitlint.config.mjs\",\n content: `/**\n * @see https://commitlint.js.org/reference/configuration.html\n * @type {import('@commitlint/types').UserConfig}\n */\nconst config = {\n extends: [\"@commitlint/config-conventional\"],\n rules: {\n \"body-max-line-length\": [2, \"always\", 350],\n \"header-max-length\": [2, \"always\", 150],\n },\n};\n\nexport default config;\n`,\n description: \"Commitlint configuration\",\n },\n {\n path: \"eslint.config.mjs\",\n content: `import { config } from \"@codefast/eslint-config/next\";\n\n/**\n * @see https://eslint.org/docs/latest/use/configure/configuration-files\n * @type {import('eslint').Linter.Config[]}\n */\nconst eslintConfig = [...config];\n\nexport default eslintConfig;\n`,\n description: \"ESLint configuration for the project\",\n },\n {\n path: \"lint-staged.config.mjs\",\n content: `import { relative } from \"node:path\";\n\n/**\n * Builds an ESLint command with the given filenames.\n *\n * @param {string[]} filenames - An array of filenames to be passed to the\n * ESLint command.\n * @returns {string} - The generated ESLint command.\n */\nfunction buildEslintCommand(filenames) {\n return \\`next lint --fix --max-warnings 0 --file \\${filenames.map((file) => relative(import.meta.dirname, file)).\n join(\" --file \")}\\`;\n}\n\n/**\n * @see https://www.npmjs.com/package/lint-staged\n * @type {import('lint-staged').Configuration}\n */\nconst config = {\n \"*.{js,mjs,jsx,ts,tsx}\": [buildEslintCommand, \"prettier --list-different --write\"],\n \"*.{json,css,md,mdx}\": [\"prettier --list-different --write\"],\n};\n\nexport default config;\n`,\n description: \"Configure lint-staged for pre-commit checks\",\n },\n ],\n styles: [\n {\n path: \"src/lib/fonts.ts\",\n content: `import { cn } from \"@codefast/ui\";\nimport { Geist, Geist_Mono as GeistMono } from \"next/font/google\";\n\nconst fontGeistSans = Geist({\n subsets: [\"latin\"],\n variable: \"--font-geist-sans\",\n});\n\nconst fontGeistMono = GeistMono({\n subsets: [\"latin\"],\n variable: \"--font-geist-mono\",\n});\n\nexport const fontVariables = cn(fontGeistSans.variable, fontGeistMono.variable);\n`,\n description: \"Font configuration for the application\",\n },\n {\n path: \"src/app/globals.css\",\n content: `@import \"tailwindcss\";\n\n@import \"@codefast/ui/styles.css\";\n\n@source '../../node_modules/@codefast/ui';\n\n@custom-variant dark (&:where(.dark, .dark *));\n\n@layer base {\n :root {\n --font-sans: var(--font-geist-sans);\n --font-mono: var(--font-geist-mono);\n\n --input: var(--color-neutral-200);\n --border: var(--color-neutral-200);\n --ring: var(--color-neutral-400);\n --background: var(--color-white);\n --foreground: var(--color-neutral-950);\n --primary: var(--color-sky-500);\n --primary-foreground: var(--color-neutral-50);\n --secondary: var(--color-neutral-100);\n --secondary-foreground: var(--color-neutral-900);\n --destructive: var(--color-red-600);\n --accent: var(--color-neutral-100);\n --accent-foreground: var(--color-neutral-900);\n --muted: var(--color-neutral-100);\n --muted-foreground: var(--color-neutral-500);\n --popover: var(--color-white);\n --popover-foreground: var(--color-neutral-950);\n --popover-overlay: --alpha(var(--color-neutral-900) / 20%);\n --card: var(--color-white);\n --card-foreground: var(--color-neutral-950);\n --sidebar: var(--color-neutral-50);\n --sidebar-foreground: var(--color-neutral-950);\n --sidebar-primary: var(--color-sky-500);\n --sidebar-primary-foreground: var(--color-neutral-50);\n --sidebar-accent: var(--color-neutral-100);\n --sidebar-accent-foreground: var(--color-neutral-900);\n --sidebar-border: var(--color-neutral-200);\n --sidebar-ring: var(--color-neutral-400);\n --chart-1: var(--color-orange-600);\n --chart-2: var(--color-teal-600);\n --chart-3: var(--color-cyan-600);\n --chart-4: var(--color-amber-600);\n --chart-5: var(--color-amber-500);\n }\n\n .dark {\n --input: var(--color-neutral-700);\n --border: --alpha(var(--color-neutral-700) / 50%);\n --ring: var(--color-neutral-500);\n --background: var(--color-neutral-950);\n --foreground: var(--color-neutral-50);\n --primary: var(--color-sky-700);\n --primary-foreground: var(--color-neutral-50);\n --secondary: var(--color-neutral-800);\n --secondary-foreground: var(--color-neutral-50);\n --destructive: var(--color-red-400);\n --accent: var(--color-neutral-700);\n --accent-foreground: var(--color-neutral-50);\n --muted: var(--color-neutral-800);\n --muted-foreground: var(--color-neutral-400);\n --popover: var(--color-neutral-800);\n --popover-foreground: var(--color-neutral-50);\n --popover-overlay: --alpha(var(--color-neutral-900) / 80%);\n --card: var(--color-neutral-900);\n --card-foreground: var(--color-neutral-50);\n --sidebar: var(--color-neutral-900);\n --sidebar-foreground: var(--color-neutral-50);\n --sidebar-primary: var(--color-sky-700);\n --sidebar-primary-foreground: var(--color-neutral-50);\n --sidebar-accent: var(--color-neutral-800);\n --sidebar-accent-foreground: var(--color-neutral-50);\n --sidebar-border: var(--color-neutral-800);\n --sidebar-ring: var(--color-neutral-600);\n --chart-1: var(--color-blue-700);\n --chart-2: var(--color-emerald-500);\n --chart-3: var(--color-amber-500);\n --chart-4: var(--color-purple-500);\n --chart-5: var(--color-rose-500);\n }\n}\n`,\n description: \"Global CSS variables for the application\",\n },\n ],\n };\n\n getConfigGroups(): ConfigGroups {\n return this.configGroups;\n }\n}\n","import { inject, injectable } from \"inversify\";\n\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\nimport type { ConfigGroups } from \"@/domain/entities/config-file\";\nimport type { Project } from \"@/domain/entities/project\";\nimport type { ProjectRepositoryInterface } from \"@/domain/interfaces/project.repository\";\n\nimport { handleError } from \"@/application/utilities/error-handler\";\nimport { ConfigService } from \"@/infrastructure/services/config.service\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class CreateProjectUseCase {\n constructor(\n @inject(TYPES.ProjectRepository) private projectRepository: ProjectRepositoryInterface,\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.CommandExecutorPort) private commandExecutorPort: CommandExecutorPort,\n @inject(TYPES.PromptPort) private promptPort: PromptPort,\n @inject(TYPES.ConfigService) private configService: ConfigService,\n ) {}\n\n /**\n * Executes the project creation or configuration process.\n * @param projectName - Optional project name provided via CLI.\n *\n * @returns The created or configured project.\n */\n async execute(projectName?: string): Promise<Project> {\n try {\n this.commandExecutorPort.checkEnvironment();\n const project = await this.checkExistingProject(projectName);\n const configGroups = this.configService.getConfigGroups();\n\n this.createOrConfigureProject(project, configGroups);\n this.displaySuccessMessage(project);\n\n return project;\n } catch (error) {\n handleError(error, \"Failed to create or configure project\");\n throw error;\n } finally {\n this.promptPort.close();\n }\n }\n\n private async checkExistingProject(projectNameArg?: string): Promise<Project> {\n return await this.projectRepository.checkExistingProject(projectNameArg);\n }\n\n private createOrConfigureProject(project: Project, configGroups: ConfigGroups): void {\n if (!project.packageJsonExists) {\n console.log(`\\n๐Ÿš€ Starting project creation for ${project.name}...\\n`);\n this.projectRepository.createNextProject(project.name);\n process.chdir(project.name);\n console.log(`๐Ÿ“‚ Moved to ${project.name}`);\n }\n\n this.updateProjectFiles(project.directory);\n this.commandExecutorPort.installDependencies();\n this.commandExecutorPort.cleanupPackages();\n this.fileSystemPort.createConfigFiles(project.directory, configGroups);\n this.projectRepository.updateNextConfig(project.directory);\n this.projectRepository.updatePackageJson(project.directory);\n this.commandExecutorPort.enableGitHooks();\n this.commandExecutorPort.runFormatter();\n this.commandExecutorPort.runLinter();\n }\n\n private updateProjectFiles(projectDir: string): void {\n this.projectRepository.updateLayoutFile(projectDir);\n this.projectRepository.updatePageFile(projectDir);\n this.projectRepository.updatePostcssConfig(projectDir);\n }\n\n private displaySuccessMessage(project: Project): void {\n console.log(`\\nโœ… Project ${project.packageJsonExists ? \"configured\" : \"created\"} successfully!`);\n console.log(`- Project: ${project.name}`);\n console.log(\"- Next.js with TypeScript\");\n console.log(\"- TailwindCSS and @codefast/ui\");\n console.log(\"- ESLint, Prettier, Commitlint, and Git Hooks\");\n console.log(\"- Lint-staged for pre-commit checks\");\n console.log(`\\n๐Ÿ“ Project directory: ${process.cwd()}`);\n console.log(`\\n๐Ÿš€ To start development:`);\n console.log(`${project.packageJsonExists ? `cd ${project.name} && ` : \"\"}pnpm dev`);\n }\n}\n","import { inject, injectable } from \"inversify\";\n\nimport type { PackageRepository } from \"@/domain/interfaces/package.repository\";\n\nimport { handleError } from \"@/application/utilities/error-handler\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class UpdateExportsUseCase {\n constructor(@inject(TYPES.PackageRepository) private packageRepository: PackageRepository) {}\n\n /**\n * Updates exports for all packages based on provided options and configuration.\n * @param options - Options for dry run, config path, and package filter.\n */\n async execute(options: { dryRun: boolean; configPath?: string; packageFilter?: string }): Promise<void> {\n try {\n console.info(\"โ™ขโ€’ Searching for packages...\");\n const packageJsonPaths = await this.packageRepository.findAllPackages(options.configPath);\n\n if (packageJsonPaths.length === 0) {\n console.warn(\"No packages found.\");\n\n return;\n }\n\n console.log(` Found ${packageJsonPaths.length} packages.`);\n\n let successCount = 0;\n let skipCount = 0;\n let errorCount = 0;\n\n for (const packageJsonPath of packageJsonPaths) {\n const result = this.packageRepository.processPackage(packageJsonPath, options);\n\n if (result) {\n successCount++;\n } else if (options.packageFilter) {\n skipCount++;\n } else {\n errorCount++;\n }\n }\n\n console.log(\"โ™ขโ€’ Completed exports update.\\n\");\n console.info(`Stats: ${successCount} succeeded, ${skipCount} skipped, ${errorCount} failed`);\n } catch (error) {\n handleError(error, \"Error processing packages\");\n throw error;\n }\n }\n}\n","import { Command } from \"commander\";\nimport { inject, injectable } from \"inversify\";\n\nimport type { PackageInfoServiceInterface } from \"@/domain/interfaces/package-info.service\";\n\nimport { CreateProjectCommand } from \"@/application/commands/create-project.command\";\nimport { UpdateExportsCommand } from \"@/application/commands/update-exports.command\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class CLIAdapter {\n constructor(\n @inject(TYPES.CreateProjectCommand) private createProjectCommand: CreateProjectCommand,\n @inject(TYPES.UpdateExportsCommand) private updateExportsCommand: UpdateExportsCommand,\n @inject(TYPES.PackageInfoService) private packageInfoService: PackageInfoServiceInterface,\n ) {}\n\n /**\n * Initializes the CLI with commands for project creation and export updates.\n */\n initialize(): void {\n const program = new Command();\n\n program\n .name(\"codefast\")\n .description(\"CodeFast CLI - A development toolkit for CodeFast.\")\n .version(this.packageInfoService.getPackageVersion(), \"-v, --version\", \"display CLI version\")\n .addCommand(this.createProjectCommand.getCommand())\n .addCommand(this.updateExportsCommand.getCommand())\n .parse(process.argv);\n }\n}\n","import { z } from \"zod\";\n\nexport const packageConfigSchema = z.object({\n cjsOutputPattern: z.string().describe(\"Output pattern for CommonJS format, e.g., './dist/cjs/{dir}/{name}.cjs'\"),\n esmOutputPattern: z.string().describe(\"Output pattern for ESM format, e.g., './dist/esm/{dir}/{name}.js'\"),\n packageJsonPath: z.string().describe(\"Path to the package.json file, e.g., 'package.json'\"),\n srcIndexPath: z.string().describe(\"Path to the source index file, e.g., 'src/index.ts'\"),\n typesOutputCjsPattern: z\n .string()\n .describe(\"Output pattern for CommonJS type declarations, e.g., './dist/types/{dir}/{name}.d.cts'\"),\n typesOutputPattern: z\n .string()\n .describe(\"Output pattern for type declarations, e.g., './dist/types/{dir}/{name}.d.ts'\"),\n exportPathPrefixesToRemove: z\n .array(z.string())\n .optional()\n .describe(\"Prefixes to remove from export paths, e.g., ['components']\"),\n});\n\nexport const scriptConfigSchema = z.object({\n customPackageConfigs: z\n .record(z.string(), packageConfigSchema.partial())\n .describe(\"Custom configurations for specific packages\"),\n defaultPackageConfig: packageConfigSchema.describe(\"Default configuration applied to all packages unless overridden\"),\n packagesGlob: z.string().describe(\"Glob pattern to find package.json files, e.g., './packages/**/package.json'\"),\n});\n\nexport const importPathSchema = z.object({\n directory: z.string().describe(\"Directory containing the import, e.g., 'components'\"),\n exportPath: z.string().describe(\"Resolved export path from the directory, e.g., './button'\"),\n name: z.string().describe(\"Name of the import, e.g., 'Button'\"),\n originalPath: z.string().describe(\"Original unresolved path, e.g., './components/button'\"),\n});\n\nexport const exportConfigSchema = z.object({\n import: z.object({\n default: z.string().describe(\"ESM default export path\"),\n types: z.string().describe(\"ESM types export path\"),\n }),\n require: z.object({\n default: z.string().describe(\"CommonJS default export path\"),\n types: z.string().describe(\"CommonJS types export path\"),\n }),\n});\n\nexport const PackageExportsSchema = z.record(z.string(), z.union([exportConfigSchema, z.string()]));\n\nexport const packageJsonSchema = z\n .object({\n dependencies: z\n .record(z.string(), z.string())\n .optional()\n .describe(\"List of runtime dependencies with their versions\"),\n devDependencies: z\n .record(z.string(), z.string())\n .optional()\n .describe(\"List of development dependencies with their versions\"),\n exports: PackageExportsSchema.optional().describe(\"Export mappings for the package\"),\n name: z.string().describe(\"Name of the package\"),\n scripts: z.record(z.string(), z.string()).describe(\"Script commands defined for the package\"),\n \"simple-git-hooks\": z.record(z.string(), z.string()).optional().describe(\"Git hooks configuration for the package\"),\n version: z.string().optional().describe(\"Version of the package\"),\n })\n .catchall(z.unknown());\n\nexport type PackageConfig = z.infer<typeof packageConfigSchema>;\n\nexport type ScriptConfig = z.infer<typeof scriptConfigSchema>;\n\nexport type ImportPath = z.infer<typeof importPathSchema>;\n\nexport type ExportConfig = z.infer<typeof exportConfigSchema>;\n\nexport type PackageExports = z.infer<typeof PackageExportsSchema>;\n\nexport type PackageJson = z.infer<typeof packageJsonSchema>;\n\nexport interface AnalysisResult {\n imports: ImportPath[];\n}\n","import { inject, injectable } from \"inversify\";\nimport { execSync } from \"node:child_process\";\nimport path from \"node:path\";\n\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { DependencyConfigServiceInterface } from \"@/domain/interfaces/dependency-config.service\";\n\nimport { packageJsonSchema } from \"@/domain/entities/package-config\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class NodeCommandExecutorAdapter implements CommandExecutorPort {\n constructor(\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.DependencyConfigService) private dependencyConfigService: DependencyConfigServiceInterface,\n ) {}\n\n runCommand(command: string): void {\n execSync(command, { stdio: \"inherit\" });\n }\n\n checkEnvironment(): void {\n try {\n this.runCommand(\"pnpm --version\");\n } catch {\n throw new Error(\"PNPM is not installed. Please install PNPM first.\");\n }\n }\n\n installDependencies(): void {\n console.log(`\\n๐Ÿ“š Installing dependencies...`);\n const mainDependencies = this.dependencyConfigService.getMainDependencies();\n\n if (mainDependencies.length > 0) {\n this.runCommand(`pnpm add ${mainDependencies.join(\" \")}`);\n }\n\n const devDependencies = this.dependencyConfigService.getDevDependencies();\n const allDevDependencies = Object.values(devDependencies).flat().join(\" \");\n\n if (allDevDependencies) {\n this.runCommand(`pnpm add -D ${allDevDependencies}`);\n }\n }\n\n cleanupPackages(): void {\n console.log(`\\n๐Ÿงน Cleaning up unnecessary packages...`);\n const packageJsonPath = path.join(process.cwd(), \"package.json\");\n\n if (!this.fileSystemPort.exists(packageJsonPath)) {\n console.warn(`โš ๏ธ package.json not found, skipping cleanup.`);\n\n return;\n }\n\n let packageJson;\n\n try {\n packageJson = packageJsonSchema.parse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n } catch (error) {\n console.warn(\n `โš ๏ธ Error reading package.json: ${error instanceof Error ? error.message : \"Unknown error\"}, skipping cleanup.`,\n );\n\n return;\n }\n\n const dependencies = packageJson.dependencies ?? {};\n const devDependencies = packageJson.devDependencies ?? {};\n const packagesToRemove = this.dependencyConfigService\n .getPackagesToRemove()\n .filter((pkg) => pkg in dependencies || pkg in devDependencies);\n\n if (packagesToRemove.length > 0) {\n this.runCommand(`pnpm remove ${packagesToRemove.join(\" \")}`);\n } else {\n console.log(`โ„น๏ธ No unnecessary packages found in package.json to remove.`);\n }\n }\n\n enableGitHooks(): void {\n console.log(`\\n๐Ÿ”„ Activating git hooks...`);\n this.runCommand(\"pnpm simple-git-hooks\");\n }\n\n runFormatter(): void {\n console.log(`\\n๐Ÿ“ Formatting files with Prettier...`);\n this.runCommand(\"pnpm format\");\n }\n\n runLinter(): void {\n console.log(`\\n๐Ÿ” Running ESLint to check code style...`);\n this.runCommand(\"pnpm lint\");\n }\n}\n","import { injectable } from \"inversify\";\nimport fs from \"node:fs\";\nimport path from \"node:path\";\n\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { ConfigGroups } from \"@/domain/entities/config-file\";\n\n@injectable()\nexport class NodeFileSystemAdapter implements FileSystemPort {\n exists(filePath: string): boolean {\n return fs.existsSync(filePath);\n }\n\n access(filePath: string): void {\n fs.accessSync(filePath, fs.constants.W_OK);\n }\n\n readFile(filePath: string): string {\n try {\n return fs.readFileSync(filePath, \"utf8\");\n } catch (error) {\n throw new Error(`Failed to read file ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n writeFile(filePath: string, content: string): void {\n try {\n const dir = path.dirname(filePath);\n\n this.createDirectory(dir);\n fs.writeFileSync(filePath, content);\n } catch (error) {\n throw new Error(\n `Failed to write to file ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n );\n }\n }\n\n createDirectory(dirPath: string): void {\n if (!this.exists(dirPath)) {\n fs.mkdirSync(dirPath, { recursive: true });\n }\n }\n\n writeConfigFile(filePath: string, content: string): void {\n this.writeFile(filePath, content);\n console.log(`๐Ÿ“ Created ${filePath}`);\n }\n\n createConfigFiles(projectDir: string, configGroups: ConfigGroups): void {\n console.log(`\\n๐Ÿ“ Creating configuration files...`);\n\n for (const [category, configs] of Object.entries(configGroups)) {\n console.log(`\\n๐Ÿ“‚ Setting up ${category} configurations:`);\n\n for (const config of configs) {\n const fullPath = path.join(projectDir, config.path);\n\n this.writeConfigFile(fullPath, config.content);\n\n if (config.description) {\n console.log(`โ„น๏ธ ${config.path}: ${config.description}`);\n }\n }\n }\n }\n}\n","import { injectable } from \"inversify\";\nimport readline from \"node:readline\";\n\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\n\n@injectable()\nexport class NodePromptAdapter implements PromptPort {\n private rl: readline.Interface;\n\n constructor() {\n this.rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout,\n });\n }\n\n async prompt(message: string): Promise<string> {\n return new Promise((resolve) => {\n this.rl.question(message, (answer) => {\n resolve(answer.trim());\n });\n });\n }\n\n close(): void {\n this.rl.close();\n }\n}\n","import { injectable } from \"inversify\";\nimport { Project, SourceFile } from \"ts-morph\";\n\nimport type { AnalysisPort } from \"@/application/ports/analysis.port\";\nimport type { AnalysisResult, ImportPath, PackageConfig } from \"@/domain/entities/package-config\";\n\n@injectable()\nexport class TsMorphAnalysisAdapter implements AnalysisPort {\n analyzeImports(indexFilePath: string, packageConfig: PackageConfig): AnalysisResult {\n const project = new Project();\n let sourceFile: SourceFile;\n\n try {\n sourceFile = project.addSourceFileAtPath(indexFilePath);\n } catch (error) {\n console.error(\n `Error loading source file at ${indexFilePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`,\n );\n\n return { imports: [] };\n }\n\n const imports: ImportPath[] = [];\n const prefixesToRemove = packageConfig.exportPathPrefixesToRemove ?? [];\n const regexPattern = new RegExp(`^.?\\\\/?(?:${prefixesToRemove.join(\"|\")})\\\\/(.*)$`);\n\n for (const exportDecl of sourceFile.getExportDeclarations()) {\n let moduleSpecifier = exportDecl.getModuleSpecifierValue();\n\n if (!moduleSpecifier) {\n continue;\n }\n\n // Normalize @/ to ./\n if (moduleSpecifier.startsWith(\"@/\")) {\n moduleSpecifier = `./${moduleSpecifier.slice(2)}`;\n }\n\n const isExternal = !moduleSpecifier.startsWith(\".\");\n\n if (isExternal) {\n continue;\n }\n\n const parts = moduleSpecifier.split(\"/\").filter(Boolean);\n\n if (parts.length < 2) {\n continue;\n }\n\n let directory = parts.length <= 1 ? \".\" : parts.slice(0, -1).join(\"/\");\n\n if (directory.startsWith(\"./\")) {\n directory = directory.slice(2);\n }\n\n const name = parts.at(-1) ?? \"\";\n const exportPath = this.processExportPath(moduleSpecifier, regexPattern);\n\n imports.push({\n originalPath: moduleSpecifier,\n directory,\n name,\n exportPath,\n });\n }\n\n return { imports };\n }\n\n private processExportPath(modulePath: string, regexPattern: RegExp): string {\n const match = modulePath.match(regexPattern);\n\n if (match) {\n const remainingPath = match[1];\n\n return remainingPath.startsWith(\"./\") ? remainingPath : `./${remainingPath}`;\n }\n\n return modulePath;\n }\n}\n","import { glob } from \"glob\";\nimport { inject, injectable } from \"inversify\";\nimport { merge } from \"lodash-es\";\nimport path from \"node:path\";\n\nimport type { AnalysisPort } from \"@/application/ports/analysis.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type {\n AnalysisResult,\n PackageConfig,\n PackageExports,\n PackageJson,\n ScriptConfig,\n} from \"@/domain/entities/package-config\";\nimport type { PackageRepository } from \"@/domain/interfaces/package.repository\";\nimport type { FileSystemUtility } from \"@/infrastructure/utilities/file-system-utility\";\n\nimport { scriptConfigSchema } from \"@/domain/entities/package-config\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class FileSystemPackageRepository implements PackageRepository {\n private readonly DEFAULT_IGNORE_PATTERN = [\"**/node_modules/**\"];\n private cachedConfig: null | ScriptConfig = null;\n private defaultConfig: ScriptConfig = {\n packagesGlob: \"./packages/**/package.json\",\n defaultPackageConfig: {\n cjsOutputPattern: \"./dist/cjs/{dir}/{name}.cjs\",\n esmOutputPattern: \"./dist/esm/{dir}/{name}.js\",\n packageJsonPath: \"package.json\",\n srcIndexPath: \"src/index.ts\",\n typesOutputCjsPattern: \"./dist/types/{dir}/{name}.d.ts\",\n typesOutputPattern: \"./dist/types/{dir}/{name}.d.ts\",\n },\n customPackageConfigs: {\n \"@codefast/ui\": {\n exportPathPrefixesToRemove: [\"components\"],\n },\n \"@codefast/style-guide\": {\n exportPathPrefixesToRemove: [\"configs\"],\n },\n },\n };\n\n constructor(\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.AnalysisPort) private analysisPort: AnalysisPort,\n @inject(TYPES.FileSystemUtility) private fileSystemUtility: FileSystemUtility,\n ) {}\n\n async findAllPackages(configPath?: string): Promise<string[]> {\n const config = this.getConfig(configPath);\n\n return await glob(config.packagesGlob, {\n ignore: this.DEFAULT_IGNORE_PATTERN,\n });\n }\n\n processPackage(\n packageJsonPath: string,\n options: {\n dryRun: boolean;\n configPath?: string;\n packageFilter?: string;\n },\n ): boolean {\n const packageDir = path.dirname(packageJsonPath);\n let packageJson;\n\n try {\n packageJson = JSON.parse(this.fileSystemPort.readFile(packageJsonPath)) as PackageJson;\n } catch (error) {\n console.error(`Failed to parse ${packageJsonPath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\n return false;\n }\n\n const packageName = packageJson.name;\n\n if (options.packageFilter && packageName !== options.packageFilter) {\n console.debug(`Skipping ${packageName} (does not match filter)`);\n\n return false;\n }\n\n console.info(`โ™ขโ€’ Processing package: ${packageName}`);\n\n const config = this.getConfig(options.configPath);\n const packageConfig = this.getPackageConfig(packageName, config);\n const srcIndexPath = path.join(packageDir, packageConfig.srcIndexPath);\n\n if (!this.fileSystemPort.exists(srcIndexPath)) {\n console.error(`โŽน โ›”๏ธŽ Source file not found at ${srcIndexPath}`);\n\n return false;\n }\n\n console.info(`โŽน Analyzing imports from ${srcIndexPath}...`);\n const analysis = this.analyzeImports(srcIndexPath, packageConfig);\n\n if (analysis.imports.length === 0) {\n console.warn(`โŽน โ›”๏ธŽ No imports found to analyze in ${packageName}`);\n\n return false;\n }\n\n console.log(`โŽน Analysis complete. Found ${analysis.imports.length} subpath exports.`);\n\n this.saveExportsAnalysis(packageDir, analysis);\n\n const newExports = this.generateExports(packageName, analysis.imports, packageJson.exports ?? {}, config);\n\n const currentExportsCount = packageJson.exports ? Object.keys(packageJson.exports).length : 0;\n const newExportsCount = Object.keys(newExports).length;\n\n console.info(`โŽน Exports: ${currentExportsCount} -> ${newExportsCount}`);\n\n if (options.dryRun) {\n this.saveExportsPreview(packageDir, newExports);\n console.warn(`โŽน Saved exports preview to .exports-analysis`);\n console.warn(`โŽน Dry run: no changes saved for ${packageName}`);\n\n return true;\n }\n\n this.fileSystemUtility.backupFile(packageJsonPath, \".exports-analysis\");\n console.log(`โŽน Backed up ${packageJsonPath}`);\n\n const updatedPackageJson = { ...packageJson, exports: newExports };\n\n this.fileSystemPort.writeFile(packageJsonPath, `${JSON.stringify(updatedPackageJson, null, 2)}\\n`);\n console.log(`โŽน Updated exports for ${packageName}`);\n\n return true;\n }\n\n analyzeImports(indexFilePath: string, packageConfig: PackageConfig): AnalysisResult {\n return this.analysisPort.analyzeImports(indexFilePath, packageConfig);\n }\n\n generateExports(\n packageName: string,\n imports: AnalysisResult[\"imports\"],\n existingExports: PackageExports,\n config: ScriptConfig,\n ): PackageExports {\n const packageConfig = this.getPackageConfig(packageName, config);\n const exports: PackageExports = {\n \".\": existingExports[\".\"] ?? {\n import: {\n default: \"./dist/esm/index.js\",\n types: \"./dist/types/index.d.ts\",\n },\n require: {\n default: \"./dist/cjs/index.cjs\",\n types: \"./dist/types/index.d.cts\",\n },\n },\n };\n\n if (existingExports[\"./styles.css\"]) {\n exports[\"./styles.css\"] = existingExports[\"./styles.css\"];\n }\n\n for (const importPath of imports) {\n const { directory, name, exportPath } = importPath;\n const esmOutput = this.formatOutputPath(packageConfig.esmOutputPattern, directory, name);\n const cjsOutput = this.formatOutputPath(packageConfig.cjsOutputPattern, directory, name);\n const typesOutput = this.formatOutputPath(packageConfig.typesOutputPattern, directory, name);\n const typesCjsOutput = this.formatOutputPath(packageConfig.typesOutputCjsPattern, directory, name);\n\n exports[exportPath] = {\n import: {\n default: esmOutput,\n types: typesOutput,\n },\n require: {\n default: cjsOutput,\n types: typesCjsOutput,\n },\n };\n }\n\n return exports;\n }\n\n private getConfig(configPath?: string): ScriptConfig {\n if (this.cachedConfig && !configPath) {\n return this.cachedConfig;\n }\n\n const userConfig = this.loadConfigFile(configPath);\n const config = merge({}, this.defaultConfig, userConfig) as ScriptConfig;\n\n if (!configPath) {\n this.cachedConfig = config;\n }\n\n return config;\n }\n\n private loadConfigFile(configPath?: string): Partial<ScriptConfig> {\n if (!configPath) {\n return {};\n }\n\n try {\n const fullPath = path.resolve(configPath);\n\n if (!this.fileSystemPort.exists(fullPath)) {\n console.warn(`Configuration file not found at ${fullPath}`);\n\n return {};\n }\n\n const configContent = this.fileSystemPort.readFile(fullPath);\n\n return scriptConfigSchema.parse(JSON.parse(configContent));\n } catch (error) {\n console.error(`Error reading configuration file: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\n return {};\n }\n }\n\n private getPackageConfig(packageName: string, config: ScriptConfig): PackageConfig {\n const customConfig = config.customPackageConfigs[packageName] ?? {};\n\n return { ...config.defaultPackageConfig, ...customConfig };\n }\n\n private formatOutputPath(pattern: string, directory: string, name: string): string {\n const dirPart = directory === \".\" ? \"\" : `${directory}/`;\n\n return pattern.replace(\"{dir}/\", dirPart).replace(\"{dir}\", directory).replace(\"{name}\", name);\n }\n\n private saveExportsAnalysis(packageDir: string, analysis: AnalysisResult): void {\n const outputDir = path.join(packageDir, \".exports-analysis\");\n\n this.fileSystemPort.createDirectory(outputDir);\n this.fileSystemPort.writeFile(path.join(outputDir, \"exports-analysis.json\"), JSON.stringify(analysis, null, 2));\n }\n\n private saveExportsPreview(packageDir: string, exports: PackageExports): void {\n const outputDir = path.join(packageDir, \".exports-analysis\");\n\n this.fileSystemPort.createDirectory(outputDir);\n this.fileSystemPort.writeFile(path.join(outputDir, \"exports-preview.json\"), JSON.stringify(exports, null, 2));\n }\n}\n","import { z } from \"zod\";\n\n/**\n * Schema for validating project configuration.\n * Ensures the project name is URL-friendly, not reserved, and the directory is valid.\n */\nexport const projectSchema = z.object({\n name: z\n .string()\n .min(1, \"Project name cannot be empty\")\n .max(100, \"Project name is too long (maximum 100 characters)\")\n .regex(/^[a-z0-9-~][a-z0-9-._~]*$/, {\n message:\n \"Project name must be URL-friendly (letters, numbers, hyphens, underscores, dots; no @ or scoped packages)\",\n })\n .refine((name) => name !== \".\" && name !== \"..\", {\n message: \"Project name cannot be '.' or '..'\",\n })\n .refine((name) => !/^(?<reserved>CON|PRN|AUX|NUL|COM[1-9]|LPT[1-9])$/i.test(name), {\n message: \"Project name is a reserved system name\",\n }),\n directory: z.string().describe(\"Project directory path\"),\n packageJsonExists: z.boolean().describe(\"Whether package.json exists in the project directory\"),\n});\n\nexport type Project = z.infer<typeof projectSchema>;\n","import { inject, injectable } from \"inversify\";\nimport path from \"node:path\";\n\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\nimport type { Project } from \"@/domain/entities/project\";\nimport type { ProjectRepositoryInterface } from \"@/domain/interfaces/project.repository\";\nimport type { FileSystemUtility } from \"@/infrastructure/utilities/file-system-utility\";\n\nimport { PackageJson, packageJsonSchema } from \"@/domain/entities/package-config\";\nimport { projectSchema } from \"@/domain/entities/project\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class FileSystemProjectRepository implements ProjectRepositoryInterface {\n constructor(\n @inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort,\n @inject(TYPES.CommandExecutorPort) private commandExecutorPort: CommandExecutorPort,\n @inject(TYPES.PromptPort) private promptPort: PromptPort,\n @inject(TYPES.FileSystemUtility) private fileSystemUtility: FileSystemUtility,\n ) {}\n\n async checkExistingProject(projectName?: string): Promise<Project> {\n let fullPath = process.cwd();\n let name = \"\";\n const packageJsonPath = path.join(process.cwd(), \"package.json\");\n const packageJsonExists = this.fileSystemPort.exists(packageJsonPath);\n\n if (packageJsonExists) {\n const result = packageJsonSchema.safeParse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n\n if (result.success) {\n name = result.data.name;\n }\n } else {\n name = await this.getValidProjectName(projectName);\n\n fullPath = path.resolve(process.cwd(), name);\n }\n\n return {\n name,\n directory: fullPath,\n packageJsonExists,\n };\n }\n\n createNextProject(projectName: string): void {\n const flags = [\n \"--ts\",\n \"--tailwind\",\n \"--eslint\",\n \"--app\",\n \"--turbo\",\n \"--use-pnpm\",\n \"--src-dir\",\n \"--turbopack\",\n '--import-alias \"@/*\"',\n ].join(\" \");\n\n this.commandExecutorPort.runCommand(`npx create-next-app@latest ${projectName} ${flags}`);\n }\n\n updateLayoutFile(projectDir: string): void {\n const layoutPath = path.join(projectDir, \"src\", \"app\", \"layout.tsx\");\n const htmlTarget = '<html className={cn(fontVariables, \"antialiased\")} lang=\"en\">';\n\n this.fileSystemUtility.updateFileIfNeeded(\n layoutPath,\n (content) => content.includes(htmlTarget),\n (content) => {\n // Import replacements\n const newImports = `import type { Metadata } from \"next\";\nimport type { JSX, ReactNode } from \"react\";\nimport { cn } from \"@codefast/ui\";\nimport { fontVariables } from \"@/lib/fonts\";\nimport \"@/app/globals.css\";`;\n\n let result = content;\n\n // Remove existing font imports and definitions\n result = result.replaceAll(/import\\s+{[^}]+}\\s+from\\s+[\"']next\\/font\\/google[\"'];\\s*/g, \"\");\n result = result.replace(/const\\s+geistSans\\s*=[^;]+;\\s*const\\s+geistMono\\s*=[^;]+;\\s*/, \"\");\n result = result.replace(\n /import\\s+type\\s+{[^}]+}\\s+from\\s+[\"']next[\"'];\\s*import\\s+[\"']\\.\\/globals\\.css[\"'];\\s*/,\n newImports,\n );\n\n // Update React.ReactNode to ReactNode and add a return type\n result = result.replace(\n /export default function RootLayout\\({\\s*children,\\s*}\\s*:\\s*Readonly<{\\s*children:\\s*React\\.ReactNode;\\s*}>\\)\\s*{/,\n `export default function RootLayout({ children }: Readonly<{ children: ReactNode }>): JSX.Element {`,\n );\n\n // Update HTML and body tags\n result = result.replace(/<html\\s+lang=\"en\"\\s*>/, htmlTarget);\n result = result.replace(/<body\\s+className={`[^`]*`}\\s*>/, `<body>`);\n\n return result;\n },\n );\n }\n\n updatePageFile(projectDir: string): void {\n const pagePath = path.join(projectDir, \"src\", \"app\", \"page.tsx\");\n\n this.fileSystemUtility.updateFileIfNeeded(\n pagePath,\n (content) => content.includes(\"): JSX.Element\"),\n (content) => {\n let result = content;\n\n // Add JSX import if not present\n if (!result.includes(\"import type { JSX }\")) {\n if (result.includes(\"import type {\")) {\n // Add JSX to existing type import\n result = result.replace(\n /import type {(?<types>[^}]+)} from \"react\";/,\n 'import type {$1, JSX } from \"react\";',\n );\n } else if (result.includes(\"import {\")) {\n // Add type import before the first import\n result = result.replace(/import {/, 'import type { JSX } from \"react\";\\n\\nimport {');\n } else {\n // Add type import at the beginning of the file\n result = `import type { JSX } from \"react\";\\n\\n${result}`;\n }\n }\n\n // Add JSX.Element return type to the Home component\n result = result.replace(/export default function Home\\(\\) {/, \"export default function Home(): JSX.Element {\");\n\n return result;\n },\n );\n }\n\n updatePostcssConfig(projectDir: string): void {\n const postcssConfigPath = path.join(projectDir, \"postcss.config.mjs\");\n const typeComment = `/** @type {import('postcss-load-config').Config} */\\n`;\n\n this.fileSystemUtility.updateFileIfNeeded(\n postcssConfigPath,\n (content) => content.includes(typeComment),\n (content) => content.replace(\"const config = {\", `${typeComment}const config = {`),\n );\n }\n\n updateNextConfig(projectDir: string): void {\n const nextConfigPath = path.join(projectDir, \"next.config.ts\");\n const optimizePackagesConfig = 'optimizePackageImports: [\"@codefast/ui\"]';\n\n this.fileSystemUtility.updateFileIfNeeded(\n nextConfigPath,\n (content) => content.includes(optimizePackagesConfig),\n (content) =>\n content.replace(\n /const nextConfig: NextConfig = \\{/,\n `const nextConfig: NextConfig = {\n experimental: {\n optimizePackageImports: [\"@codefast/ui\"],\n },`,\n ),\n );\n }\n\n updatePackageJson(projectDir: string): void {\n const packageJsonPath = path.join(projectDir, \"package.json\");\n\n if (!this.fileSystemPort.exists(packageJsonPath)) {\n console.warn(`โš ๏ธ package.json not found, skipping update.`);\n\n return;\n }\n\n let packageJson: PackageJson | undefined;\n\n try {\n packageJson = packageJsonSchema.parse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n } catch {\n console.warn(`Failed to parse ${packageJsonPath}, skipping update.`);\n\n return;\n }\n\n packageJson.scripts = {\n ...packageJson.scripts,\n \"check-types\": \"tsc --noEmit\",\n \"deploy:preview\": \"vercel deploy --archive=tgz\",\n \"deploy:prod\": \"vercel deploy --archive=tgz --prod\",\n format: \"prettier --write --ignore-unknown .\",\n \"format:check\": \"prettier --check --ignore-unknown .\",\n lint: \"next lint --fix --max-warnings 0\",\n \"lint:check\": \"next lint --max-warnings 0\",\n \"package:install\": \"pnpm install\",\n \"package:outdated\": \"pnpm outdated\",\n \"package:upgrade\": \"pnpm update --latest\",\n preview: \"pnpm build && pnpm start\",\n };\n\n packageJson[\"simple-git-hooks\"] = {\n \"pre-commit\": \"pnpm lint-staged\",\n \"commit-msg\": \"pnpm commitlint --edit\",\n };\n\n this.fileSystemPort.writeFile(packageJsonPath, JSON.stringify(packageJson, null, 2));\n console.log(`๐Ÿ“ Updated ${packageJsonPath}`);\n }\n\n private async getValidProjectName(initialName?: string, attempts = 0, maxAttempts = 3): Promise<string> {\n const projectName = initialName ?? (await this.promptPort.prompt(\"Enter project name: \"));\n const result = projectSchema.safeParse({ name: projectName, directory: \"\", packageJsonExists: false });\n\n if (result.success) {\n const fullPath = path.resolve(process.cwd(), projectName);\n\n if (this.fileSystemPort.exists(fullPath)) {\n throw new Error(`A directory named \"${projectName}\" already exists.`);\n }\n\n try {\n this.fileSystemPort.access(process.cwd());\n } catch {\n throw new Error(\"Cannot create project: No write permission in current directory.\");\n }\n\n return projectName;\n }\n\n if (attempts >= maxAttempts - 1) {\n throw new Error(`Exceeded maximum attempts to enter a valid project name.`);\n }\n\n console.error(`โŒ ${result.error.message} (${maxAttempts - attempts - 1} attempts remaining)`);\n\n return this.getValidProjectName(undefined, attempts + 1, maxAttempts);\n }\n}\n","import { injectable } from \"inversify\";\n\nimport type { DependencyConfigServiceInterface } from \"@/domain/interfaces/dependency-config.service\";\n\n@injectable()\nexport class DependencyConfigService implements DependencyConfigServiceInterface {\n private readonly MAIN_DEPENDENCIES: string[] = [\n \"@codefast/ui\",\n \"@codefast/hooks\",\n \"recharts\",\n \"react-hook-form\",\n \"next-themes\",\n \"date-fns\",\n \"lucide-react\",\n ];\n\n private readonly DEV_DEPENDENCIES: Record<string, string[]> = {\n commitLint: [\"@commitlint/cli\", \"@commitlint/config-conventional\", \"@commitlint/types\"],\n gitTools: [\"simple-git-hooks\"],\n formatting: [\"prettier\", \"prettier-plugin-packagejson\", \"prettier-plugin-tailwindcss\", \"lint-staged\"],\n linting: [\"@codefast/eslint-config\"],\n };\n\n private readonly PACKAGES_TO_REMOVE: string[] = [\"@eslint/eslintrc\", \"eslint-config-next\"];\n\n getMainDependencies(): string[] {\n return this.MAIN_DEPENDENCIES;\n }\n\n getDevDependencies(): Record<string, string[]> {\n return this.DEV_DEPENDENCIES;\n }\n\n getPackagesToRemove(): string[] {\n return this.PACKAGES_TO_REMOVE;\n }\n}\n","import { inject, injectable } from \"inversify\";\nimport path from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PackageInfoServiceInterface } from \"@/domain/interfaces/package-info.service\";\n\nimport { packageJsonSchema } from \"@/domain/entities/package-config\";\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class NodePackageInfoService implements PackageInfoServiceInterface {\n constructor(@inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort) {}\n\n getPackageVersion(): string {\n try {\n const __filename = fileURLToPath(import.meta.url);\n const __dirname = path.dirname(__filename);\n const packageJsonPath = path.resolve(__dirname, \"..\", \"package.json\");\n const packageJsonResult = packageJsonSchema.parse(JSON.parse(this.fileSystemPort.readFile(packageJsonPath)));\n\n return packageJsonResult.version ?? \"0.0.0\";\n } catch (error) {\n console.warn(`Failed to read package version: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\n return \"unknown\";\n }\n }\n}\n","import { inject, injectable } from \"inversify\";\nimport path from \"node:path\";\n\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\n\nimport { TYPES } from \"@/ioc/types\";\n\n@injectable()\nexport class FileSystemUtility {\n constructor(@inject(TYPES.FileSystemPort) private fileSystemPort: FileSystemPort) {}\n\n /**\n * Updates the file content if a condition is met.\n *\n * @param filePath - The path of the file to potentially update.\n * @param checkFn - A function that determines if the current content needs updating.\n * It takes the current content as input and returns a boolean indicating whether an update is\n * necessary.\n * @param updateFn - A function that generates new content for the file based on its current content.\n * It takes the current content as input and returns the updated content as output.\n *\n * This method checks if the specified file exists in the file system. If it does, it reads the current content of\n * the file and uses `checkFn` to determine whether an update is required. If `checkFn` returns true, indicating no\n * updates are needed, a log message is displayed. Otherwise, `updateFn` is used to generate new content for the\n * file. The file system is then updated with this new content, and a success message is logged. In case of an\n * error during the update process, a warning message is logged instead.\n *\n * @returns void - This method does not return any value.\n */\n updateFileIfNeeded(\n filePath: string,\n checkFn: (content: string) => boolean,\n updateFn: (content: string) => string,\n ): void {\n if (!this.fileSystemPort.exists(filePath)) {\n return;\n }\n\n const currentContent = this.fileSystemPort.readFile(filePath);\n\n if (checkFn(currentContent)) {\n console.log(`โ„น๏ธ ${filePath} is already up to date`);\n\n return;\n }\n\n try {\n const updatedContent = updateFn(currentContent);\n\n this.fileSystemPort.writeFile(filePath, updatedContent);\n console.log(`๐Ÿ“ Updated ${filePath}`);\n } catch (error) {\n console.warn(`โš ๏ธ Failed to update ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n\n /**\n * Backs up a file to a specified backup directory with a timestamped filename.\n *\n * @param filePath - The path of the file to be backed up.\n * @param backupDir - The name of the subdirectory under the original file's directory where the backup should be\n * stored. This directory will be created if it does not exist.\n *\n * @returns void\n */\n backupFile(filePath: string, backupDir: string): void {\n try {\n const content = this.fileSystemPort.readFile(filePath);\n const baseName = path.basename(filePath);\n const timestamp = new Date().toISOString().replaceAll(/[:.]/g, \"-\");\n const backupPath = path.join(path.dirname(filePath), backupDir, `${baseName}.backup.${timestamp}`);\n\n this.fileSystemPort.createDirectory(path.dirname(backupPath));\n this.fileSystemPort.writeFile(backupPath, content);\n } catch (error) {\n console.error(`Error backing up ${filePath}: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n }\n }\n}\n","import { Container } from \"inversify\";\n\nimport type { AnalysisPort } from \"@/application/ports/analysis.port\";\nimport type { CommandExecutorPort } from \"@/application/ports/command-executor.port\";\nimport type { FileSystemPort } from \"@/application/ports/file-system.port\";\nimport type { PromptPort } from \"@/application/ports/prompt.port\";\nimport type { ConfigServiceInterface } from \"@/domain/interfaces/config.service\";\nimport type { DependencyConfigServiceInterface } from \"@/domain/interfaces/dependency-config.service\";\nimport type { PackageInfoServiceInterface } from \"@/domain/interfaces/package-info.service\";\nimport type { PackageRepository } from \"@/domain/interfaces/package.repository\";\nimport type { ProjectRepositoryInterface } from \"@/domain/interfaces/project.repository\";\n\nimport { CreateProjectCommand } from \"@/application/commands/create-project.command\";\nimport { UpdateExportsCommand } from \"@/application/commands/update-exports.command\";\nimport { CreateProjectUseCase } from \"@/application/use-cases/create-project.use-case\";\nimport { UpdateExportsUseCase } from \"@/application/use-cases/update-exports.use-case\";\nimport { CLIAdapter } from \"@/infrastructure/adapters/cli.adapter\";\nimport { NodeCommandExecutorAdapter } from \"@/infrastructure/adapters/node-command-executor.adapter\";\nimport { NodeFileSystemAdapter } from \"@/infrastructure/adapters/node-file-system.adapter\";\nimport { NodePromptAdapter } from \"@/infrastructure/adapters/node-prompt.adapter\";\nimport { TsMorphAnalysisAdapter } from \"@/infrastructure/adapters/ts-morph-analysis.adapter\";\nimport { FileSystemPackageRepository } from \"@/infrastructure/repositories/file-system-package.repository\";\nimport { FileSystemProjectRepository } from \"@/infrastructure/repositories/file-system-project.repository\";\nimport { ConfigService } from \"@/infrastructure/services/config.service\";\nimport { DependencyConfigService } from \"@/infrastructure/services/dependency-config.service\";\nimport { NodePackageInfoService } from \"@/infrastructure/services/node-package-info.service\";\nimport { FileSystemUtility } from \"@/infrastructure/utilities/file-system-utility\";\nimport { TYPES } from \"@/ioc/types\";\n\nconst container = new Container();\n\n// Domain bindings\ncontainer.bind<ProjectRepositoryInterface>(TYPES.ProjectRepository).to(FileSystemProjectRepository).inSingletonScope(); // Handles project creation and file updates\ncontainer.bind<PackageRepository>(TYPES.PackageRepository).to(FileSystemPackageRepository).inSingletonScope(); // Manages package.json exports\n\ncontainer.bind<PackageInfoServiceInterface>(TYPES.PackageInfoService).to(NodePackageInfoService).inSingletonScope(); // Provides package version\ncontainer\n .bind<DependencyConfigServiceInterface>(TYPES.DependencyConfigService)\n .to(DependencyConfigService)\n .inSingletonScope(); // Provides dependency configuration\ncontainer.bind<ConfigServiceInterface>(TYPES.ConfigService).to(ConfigService).inSingletonScope(); // Provides CLI configuration\n\n// Application bindings\ncontainer.bind<FileSystemPort>(TYPES.FileSystemPort).to(NodeFileSystemAdapter).inSingletonScope(); // File system operations\ncontainer.bind<CommandExecutorPort>(TYPES.CommandExecutorPort).to(NodeCommandExecutorAdapter).inSingletonScope(); // Command execution\ncontainer.bind<PromptPort>(TYPES.PromptPort).to(NodePromptAdapter).inSingletonScope(); // User input prompting\ncontainer.bind<AnalysisPort>(TYPES.AnalysisPort).to(TsMorphAnalysisAdapter).inSingletonScope(); // Import analysis\n\ncontainer.bind<CreateProjectUseCase>(TYPES.CreateProjectUseCase).to(CreateProjectUseCase).inSingletonScope(); // Project creation logic\ncontainer.bind<UpdateExportsUseCase>(TYPES.UpdateExportsUseCase).to(UpdateExportsUseCase).inSingletonScope(); // Export update logic\n\ncontainer.bind<CreateProjectCommand>(TYPES.CreateProjectCommand).to(CreateProjectCommand).inSingletonScope(); // CLI command for project creation\ncontainer.bind<UpdateExportsCommand>(TYPES.UpdateExportsCommand).to(UpdateExportsCommand).inSingletonScope(); // CLI command for export updates\n\n// Infrastructure bindings\ncontainer.bind<CLIAdapter>(TYPES.CLIAdapter).to(CLIAdapter).inSingletonScope(); // CLI setup and command registration\n\ncontainer.bind<FileSystemUtility>(TYPES.FileSystemUtility).to(FileSystemUtility).inSingletonScope(); // File system utility functions\n\nexport { container };\n","\n\nimport type { CLIAdapter } from \"@/infrastructure/adapters/cli.adapter\";\n\nimport { container } from \"@/ioc/container\";\nimport { TYPES } from \"@/ioc/types\";\n\nfunction main(): void {\n const cliAdapter = container.get<CLIAdapter>(TYPES.CLIAdapter);\n\n cliAdapter.initialize();\n}\n\nmain();\n"],"names":["TYPES","Symbol","CreateProjectCommand","createProjectUseCase","Command","projectName","process","UpdateExportsCommand","updateExportsUseCase","options","Boolean","handleError","error","defaultMessage","message","Error","console","ConfigService","CreateProjectUseCase","projectRepository","fileSystemPort","commandExecutorPort","promptPort","configService","project","configGroups","projectNameArg","projectDir","UpdateExportsUseCase","packageRepository","packageJsonPaths","successCount","skipCount","errorCount","packageJsonPath","result","CLIAdapter","createProjectCommand","updateExportsCommand","packageInfoService","program","packageConfigSchema","z","scriptConfigSchema","exportConfigSchema","PackageExportsSchema","packageJsonSchema","NodeCommandExecutorAdapter","dependencyConfigService","command","execSync","mainDependencies","devDependencies","allDevDependencies","Object","path","packageJson","JSON","dependencies","packagesToRemove","pkg","NodeFileSystemAdapter","filePath","fs","content","dir","dirPath","category","configs","config","fullPath","NodePromptAdapter","readline","Promise","resolve","answer","TsMorphAnalysisAdapter","indexFilePath","packageConfig","Project","sourceFile","imports","prefixesToRemove","regexPattern","RegExp","exportDecl","moduleSpecifier","isExternal","parts","directory","name","exportPath","modulePath","match","remainingPath","FileSystemPackageRepository","analysisPort","fileSystemUtility","configPath","glob","packageDir","packageName","srcIndexPath","analysis","newExports","currentExportsCount","newExportsCount","updatedPackageJson","existingExports","exports","importPath","esmOutput","cjsOutput","typesOutput","typesCjsOutput","userConfig","merge","configContent","customConfig","pattern","dirPart","outputDir","projectSchema","FileSystemProjectRepository","packageJsonExists","flags","layoutPath","htmlTarget","newImports","pagePath","postcssConfigPath","typeComment","nextConfigPath","optimizePackagesConfig","initialName","attempts","maxAttempts","undefined","DependencyConfigService","NodePackageInfoService","__filename","fileURLToPath","__dirname","packageJsonResult","FileSystemUtility","checkFn","updateFn","currentContent","updatedContent","backupDir","baseName","timestamp","Date","backupPath","container","Container","main","cliAdapter"],"mappings":";;;;;;;;;;;;;AAAO,MAAMA,QAAQ;IACnB,mBAAmBC,OAAO,GAAG,CAAC;IAC9B,mBAAmBA,OAAO,GAAG,CAAC;IAE9B,gBAAgBA,OAAO,GAAG,CAAC;IAC3B,qBAAqBA,OAAO,GAAG,CAAC;IAChC,YAAYA,OAAO,GAAG,CAAC;IACvB,cAAcA,OAAO,GAAG,CAAC;IAEzB,oBAAoBA,OAAO,GAAG,CAAC;IAC/B,yBAAyBA,OAAO,GAAG,CAAC;IACpC,eAAeA,OAAO,GAAG,CAAC;IAE1B,mBAAmBA,OAAO,GAAG,CAAC;IAE9B,sBAAsBA,OAAO,GAAG,CAAC;IACjC,sBAAsBA,OAAO,GAAG,CAAC;IAEjC,sBAAsBA,OAAO,GAAG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BAAoB,EAAE,EAAE,CAACE,sBAAsB,gBAAgB;AAC1GwJ,UAAU,IAAI,CAAuB1J,MAAM,oBAAoB,EAAE,EAAE,CAACO,sBAAsB,gBAAgB;AAG1GmJ,UAAU,IAAI,CAAa1J,MAAM,UAAU,EAAE,EAAE,CAACoC,YAAY,gBAAgB;AAE5EsH,UAAU,IAAI,CAAoB1J,MAAM,iBAAiB,EAAE,EAAE,CAACgJ,uCAAmB,gBAAgB;AClDjG,SAASY;IACP,MAAMC,aAAaH,UAAU,GAAG,CAAa1J,MAAM,UAAU;IAE7D6J,WAAW,UAAU;AACvB;AAEAD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codefast/cli",
3
- "version": "0.3.1-canary.14",
3
+ "version": "0.3.1-canary.15",
4
4
  "description": "CodeFast CLI - A development toolkit for CodeFast.",
5
5
  "bugs": {
6
6
  "url": "https://github.com/codefastlabs/codefast/issues"
@@ -33,15 +33,15 @@
33
33
  "zod": "4.0.0-beta.20250414T061543"
34
34
  },
35
35
  "devDependencies": {
36
- "@rslib/core": "^0.6.7",
36
+ "@rslib/core": "^0.6.8",
37
37
  "@types/commander": "^2.12.5",
38
38
  "@types/lodash-es": "^4.17.12",
39
- "@types/node": "^22.14.1",
40
- "eslint": "^9.25.1",
39
+ "@types/node": "^22.15.3",
40
+ "eslint": "^9.26.0",
41
41
  "ts-node": "^10.9.2",
42
42
  "typescript": "^5.8.3",
43
- "@codefast/eslint-config": "0.3.1-canary.14",
44
- "@codefast/typescript-config": "0.3.1-canary.14"
43
+ "@codefast/eslint-config": "0.3.1-canary.15",
44
+ "@codefast/typescript-config": "0.3.1-canary.15"
45
45
  },
46
46
  "publishConfig": {
47
47
  "access": "public"