{"id":13817276,"url":"https://github.com/davglass/cpr","last_synced_at":"2025-10-07T00:51:03.427Z","repository":{"id":4924290,"uuid":"6080847","full_name":"davglass/cpr","owner":"davglass","description":"Nodejs cp -R","archived":false,"fork":false,"pushed_at":"2021-05-26T19:23:27.000Z","size":113,"stargazers_count":79,"open_issues_count":19,"forks_count":80,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-10T07:25:49.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davglass.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}},"created_at":"2012-10-04T19:39:00.000Z","updated_at":"2025-07-17T15:24:18.000Z","dependencies_parsed_at":"2022-08-22T20:50:40.475Z","dependency_job_id":null,"html_url":"https://github.com/davglass/cpr","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/davglass/cpr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davglass%2Fcpr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davglass%2Fcpr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davglass%2Fcpr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davglass%2Fcpr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davglass","download_url":"https://codeload.github.com/davglass/cpr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davglass%2Fcpr/sbom","scorecard":{"id":325754,"data":{"date":"2025-08-11","repo":{"name":"github.com/davglass/cpr","commit":"ba60b10aad493ef7aa285351deb6a8d51077794c"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":2,"reason":"Found 7/25 approved changesets -- score normalized to 2","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: containerImage not pinned by hash: Dockerfile:1: pin your Docker image by updating node:8 to node:8@sha256:a681bf74805b80d03eb21a6c0ef168a976108a287a74167ab593fc953aac34df","Warn: npmCommand not pinned by hash: Dockerfile:8","Info:   0 out of   1 containerImage dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 14 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T02:27:17.208Z","repository_id":4924290,"created_at":"2025-08-18T02:27:17.208Z","updated_at":"2025-08-18T02:27:17.208Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278703579,"owners_count":26031205,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2024-08-04T06:00:39.183Z","updated_at":"2025-10-07T00:51:03.410Z","avatar_url":"https://github.com/davglass.png","language":"JavaScript","funding_links":[],"categories":["JavaScript","Cross-platform Utilities"],"sub_categories":[],"readme":"CPR (cp -R)\n===========\n\nThere are other modules out there that attempt this, but none did it the way I needed it to be done or they had issues and the author failed to fix them in a timely manner.\n\nInstall\n-------\n\n    npm install cpr\n\n\nBuild Status\n------------\n\n[![Build Status](https://secure.travis-ci.org/davglass/cpr.png)](http://travis-ci.org/davglass/cpr)\n\nUsage\n-----\n\n```js\nvar cpr = require('cpr');\n//or\nvar cpr = require('cpr').cpr; //Back compat\n\ncpr('/path/from', '/path/to', {\n    deleteFirst: true, //Delete \"to\" before\n    overwrite: true, //If the file exists, overwrite it\n    confirm: true //After the copy, stat all the copied files to make sure they are there\n}, function(err, files) {\n    //err - The error if any (err.list might be available with an array of errors for more detailed information)\n    //files - List of files that we copied\n});\n\ncpr('/path/from', '/path/to', function(err, files) {\n    //err - The error if any (err.list might be available with an array of errors for more detailed information)\n    //      In the case of an error, cpr continues to copy files but returns this error object with all of the files that it failed to copy.\n    //files - List of files that we copied\n});\n```\n\nOptions\n-------\n\nAll options default to `false`.\n\n   * `deleteFirst`: Delete the to directory with `rimraf`\n   * `overwrite`: If the destination exists, overwrite it\n   * `confirm`: After the copy operation, stat all the files and report errors if any are missing\n   * `filter`: `RegExp` or `function` to test each file against before copying\n\n\nFiltering\n---------\n\nIf you give it a `RegExp`, it will use that to `test` the full absolute pathnames of the files and directories as they are being gathered. If any of them passes, it will not be copied.\nIf you give it a `function`, it will use that with `Array.filter` on the list of full absolute pathnames of files and directories.\n\n\nCLI\n---\n\n`cpr` can also be used from the command line which is useful for cross platform support.\n\nUsage:\n\n```\ncpr \u003csource\u003e \u003cdestination\u003e [options]\n```\nCopies files from `source` to `destination`.\n\nOptions:\n\n* `-d`, `--delete-first`:             Delete the destination directory before copying.\n* `-f \u003cregex\u003e`, `--filter \u003cregex\u003e`:   Filter out any items that match `\u003cregex\u003e`, a case-insensitive regex pattern.\n* `-h`, `--help`:                     Display this usage info.\n* `-o`, `--overwrite`:                Overwrite the destination exists if it exists.\n* `-v`, `--version`:                  Display the cpr version.\n\nNote that the CLI's `filter` option is simpler than the original NodeJS API, only accepting case-insensitive regular expression patterns and not functions.\n\n![cpr](../master/cpr.jpg?raw=true)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavglass%2Fcpr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavglass%2Fcpr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavglass%2Fcpr/lists"}