{"id":16834593,"url":"https://github.com/gobwas/gulp-safe","last_synced_at":"2025-08-23T10:05:02.067Z","repository":{"id":18391158,"uuid":"21572333","full_name":"gobwas/gulp-safe","owner":"gobwas","description":"Simple gulp plugin for saving backuped existing files.","archived":false,"fork":false,"pushed_at":"2014-11-20T13:22:33.000Z","size":204,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-23T10:02:35.405Z","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gobwas.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T13:53:22.000Z","updated_at":"2014-11-20T13:22:33.000Z","dependencies_parsed_at":"2022-08-28T15:33:01.346Z","dependency_job_id":null,"html_url":"https://github.com/gobwas/gulp-safe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gobwas/gulp-safe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobwas%2Fgulp-safe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobwas%2Fgulp-safe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobwas%2Fgulp-safe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobwas%2Fgulp-safe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gobwas","download_url":"https://codeload.github.com/gobwas/gulp-safe/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gobwas%2Fgulp-safe/sbom","scorecard":{"id":433078,"data":{"date":"2025-08-11","repo":{"name":"github.com/gobwas/gulp-safe","commit":"85d7c1b32d821813aecceb9ca174e7158e24fb5d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.6,"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":"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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"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":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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"}}]},"last_synced_at":"2025-08-19T03:50:37.858Z","repository_id":18391158,"created_at":"2025-08-19T03:50:37.858Z","updated_at":"2025-08-19T03:50:37.858Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271746515,"owners_count":24813568,"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-08-23T02:00:09.327Z","response_time":69,"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-10-13T12:07:04.667Z","updated_at":"2025-08-23T10:05:02.006Z","avatar_url":"https://github.com/gobwas.png","language":"JavaScript","readme":"# [gulp](http://gulpjs.com)-safe\n\n\u003e Simple way to backup your files\n\nSimple pass through gulp plugin, that creates backup copy of your file(s) in two ways - by appending postfix to new, or, to existing file.\n\n## Getting started\n\nIf you haven't used [gulp](http://gulpjs.com) before, be sure to check out the [Getting Started](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md) guide.\n\nInstall with [npm](https://npmjs.org/package/gulp-safe)\n\n```\nnpm install --save-dev gulp-safe\n```\n\n## Overview\n\nHere quick example of simple way usage:\n\n```javascript\nvar gulp = require('gulp'),\n\tsafe = require('gulp-safe');\n\ngulp.task('make-my-awesome-files', function() {\n\tvar dest;\n\n\tdest = \"./my/dest/for/files\";\n\n\treturn gulp.src(\"./src/my/files/*.json\")\n\t\t.pipe(someCoolPlugin())\n\t\t.pipe(anotherCoolPlugin())\n\t\t.pipe(safe(dest)) // here we go! just backup already existing files before they overwritten\n\t\t.pipe(gulp.dest(dest));\n});\n```\n\n## API\n\n### safe(destination, [options])\n\n#### destination\n\nType: `String`\n\nThe destination directory. Same as you put into `gulp.dest()`.\n\nThis is needed to be able to compare the current existing files with the destination files.\n\n#### options\n\nType: `Object`\n\nThen options object.\n\nProperty     | Necessary | Type       | Plugin default value\n-------------|-----------|------------|---------------------\n[backup]     | no        | `Boolean`  | `true`\n[format]     | no        | `String`   | `\"(%s)\"`\n[generator]  | no        | `Function` | `null`\n\n#### options.backup\nType: `Boolean`\nDefault value: `true`\n\nDetermines for which file append postfix - if true, existing file will get the postfix, like it will be backuped. If false - the new one file will get the postfix.\n\n#### options.format\nType: `Boolean`\nDefault value: `\"(%s)\"`\n\nThe sprintf format of postfix. Be careful with it, cause if you will do not use `%s` pattern inside it, your plugin can fall in infinite loop.\n\n#### options.generator\nType: `Function`\nDefault value: `null`\nReturn type: `Function`\n\nCurrying generator of file version. Function takes one argument - the file. Then it must return initialized generator, that will be called in each time, when file is already exists. Initialized generator takes one argument, that is callback, that resolved in standard node way - `callback(err, version)`, where version is a `String`:\n```js\n\n\tsafe(\"path\", {\n\t\tgenerator: function(file) {\n\t\t\treturn function(done) {\n\t\t\t\tgetSomeAsyncStuffWith(file)\n\t\t\t\t\t.then(function(result) {\n\t\t\t\t\t\tdone(null, result);\n\t\t\t\t\t})\n\t\t\t\t\t.catch(done);\n\t\t\t}\n\t\t}\n\t});\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobwas%2Fgulp-safe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgobwas%2Fgulp-safe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgobwas%2Fgulp-safe/lists"}