{"id":26566591,"url":"https://github.com/frontend-layers/copy-recursive","last_synced_at":"2026-02-12T17:02:17.187Z","repository":{"id":275047670,"uuid":"924896301","full_name":"Frontend-Layers/copy-recursive","owner":"Frontend-Layers","description":"An utility for recursively copying files and directories with advanced options like depth control, flattening, and conflict resolution","archived":false,"fork":false,"pushed_at":"2025-01-31T00:14:27.000Z","size":394,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T12:20:56.936Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://frontend-layers.github.io/copy-recursive/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Frontend-Layers.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-30T20:49:12.000Z","updated_at":"2025-01-31T00:14:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"6994dc23-3a19-440b-a31e-670ae02b8cc3","html_url":"https://github.com/Frontend-Layers/copy-recursive","commit_stats":null,"previous_names":["frontend-layers/copy-recursive"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Frontend-Layers/copy-recursive","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frontend-Layers%2Fcopy-recursive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frontend-Layers%2Fcopy-recursive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frontend-Layers%2Fcopy-recursive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frontend-Layers%2Fcopy-recursive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Frontend-Layers","download_url":"https://codeload.github.com/Frontend-Layers/copy-recursive/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Frontend-Layers%2Fcopy-recursive/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29373837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T08:51:36.827Z","status":"ssl_error","status_checked_at":"2026-02-12T08:51:26.849Z","response_time":55,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-22T18:35:22.642Z","updated_at":"2026-02-12T17:02:17.182Z","avatar_url":"https://github.com/Frontend-Layers.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# copy-recursive\nA flexible and powerful Node.js utility for recursively copying files and directories with advanced configuration options.\n\n## Features\n- Recursive file and directory copying\n- Configurable copy depth and height limits\n- Directory flattening option\n- Multiple conflict resolution strategies\n- Support for single source or multiple sources\n- Asynchronous operation with Promises\n- Comprehensive error handling\n- Configurable logging levels with Gulp-style output\n\n## Installation\n```bash\nnpm install copy-recursive\n```\n\n## Usage\n```javascript\nimport copy from 'copy-recursive';\n\n// Single file/directory copy with logging\nconst config = [{\n    src: 'source/path',\n    dest: 'destination/path',\n    depth: 2,\n    height: 0,\n    flatten: false,\n    conflictResolution: 'rename',\n    logLevel: 'brief'\n}];\nawait copy(config);\n\n// Multiple sources with verbose logging\nconst multiConfig = [{\n    src: ['source1', 'source2', 'source3'],\n    dest: 'destination/path',\n    flatten: true,\n    logLevel: 'verbose'\n}];\nawait copy(multiConfig);\n```\n\n## Configuration Options\nEach configuration object supports the following options:\n\n| Option | Type | Default | Description |\n|--------|------|---------|-------------|\n| `src` | `string\\|string[]` | required | Source path(s) to copy from |\n| `dest` | `string` | required | Destination path to copy to |\n| `depth` | `number` | `0` | Maximum copy depth (0 for unlimited) |\n| `height` | `number` | `0` | Maximum copy height from root (0 for unlimited) |\n| `flatten` | `boolean` | `false` | When true, flattens directory structure |\n| `conflictResolution` | `string` | `'overwrite'` | How to handle conflicts (`'overwrite'`, `'skip'`, or `'rename'`) |\n| `logLevel` | `string` | `'none'` | Logging level (`'none'`, `'verbose'`, or `'brief'`) |\n\n## Conflict Resolution Strategies\n- `overwrite`: Overwrites existing files at destination\n- `skip`: Skips copying if file exists at destination\n- `rename`: Adds a numeric suffix to create a unique filename\n\n## Logging Levels\n- `none`: No logging output\n- `verbose`: Detailed logging of all operations\n- `brief`: Concise, Gulp-style logging with symbols\n  - `→` File copied\n  - `↺` File overwritten\n  - `⠿` File skipped\n  - `⥅` File renamed\n\nExample brief logging output:\n```\nStarting copy task...\n→ src/file1.txt → dest/file1.txt\n↺ src/file2.txt → dest/file2.txt\n⠿ src/file3.txt\n⥅ src/file4.txt → dest/file4_1.txt\nCopy task completed\n```\n\n## Project Structure\n```\ncopy-recursive/\n├── index.js         # Main module file\n├── test-script.js   # Test script by shell\n├── test/            # Test by Mocha/Chai\n├── docs/            # Generated documentation\n├── jsdoc.json       # JSDoc configuration\n├── .mocharc.json    # Mocha configuration\n├── package.json     # Project configuration\n└── README.md        # This file\n```\n\n## Documentation\nTo generate documentation:\n```bash\nnpm run docs\n```\nDocumentation will be generated in the `docs` directory. Open `docs/index.html` in your browser to view.\n\n## Testing\nTo run tests:\n```bash\nnpm test\n```\n\n## Development\n1. Clone the repository\n2. Install dependencies:\n```bash\nnpm install\n```\n3. Make your changes\n4. Run tests:\n```bash\nnpm test\n```\n5. Generate documentation:\n```bash\nnpm run docs\n```\n\n## License\nMIT\n\n## Contributing\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n## Support\nPlease open an issue for support.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrontend-layers%2Fcopy-recursive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrontend-layers%2Fcopy-recursive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrontend-layers%2Fcopy-recursive/lists"}