{"id":18389578,"url":"https://github.com/anseki/gulp-confirm","last_synced_at":"2025-11-06T08:03:16.069Z","repository":{"id":21073714,"uuid":"24373249","full_name":"anseki/gulp-confirm","owner":"anseki","description":"Abort or continue the flow of tasks according to an answer (with or without Enter key) to the specified question. The flow of tasks is paused, until the user responds and the next behavior is found by specified options.","archived":false,"fork":false,"pushed_at":"2022-08-19T03:11:39.000Z","size":27,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-11-06T08:02:55.625Z","etag":null,"topics":["abort","confirm","continue","flow","gulpplugin","javascript","pause","prompt","question","wait"],"latest_commit_sha":null,"homepage":"","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/anseki.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2014-09-23T13:48:23.000Z","updated_at":"2022-08-19T03:11:42.000Z","dependencies_parsed_at":"2022-08-02T10:38:46.337Z","dependency_job_id":null,"html_url":"https://github.com/anseki/gulp-confirm","commit_stats":null,"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/anseki/gulp-confirm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-confirm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-confirm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-confirm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-confirm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anseki","download_url":"https://codeload.github.com/anseki/gulp-confirm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anseki%2Fgulp-confirm/sbom","scorecard":{"id":197997,"data":{"date":"2025-08-11","repo":{"name":"github.com/anseki/gulp-confirm","commit":"f66f73e244b6d1f440acdf5b80a0f4db6510535a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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"}}]},"last_synced_at":"2025-08-16T22:11:19.587Z","repository_id":21073714,"created_at":"2025-08-16T22:11:19.587Z","updated_at":"2025-08-16T22:11:19.587Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":282969330,"owners_count":26757313,"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-11-06T02:00:06.180Z","response_time":55,"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":["abort","confirm","continue","flow","gulpplugin","javascript","pause","prompt","question","wait"],"created_at":"2024-11-06T01:43:48.718Z","updated_at":"2025-11-06T08:03:16.032Z","avatar_url":"https://github.com/anseki.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gulp-confirm\n\n[![npm](https://img.shields.io/npm/v/gulp-confirm.svg)](https://www.npmjs.com/package/gulp-confirm) [![GitHub issues](https://img.shields.io/github/issues/anseki/gulp-confirm.svg)](https://github.com/anseki/gulp-confirm/issues) [![David](https://img.shields.io/david/anseki/gulp-confirm.svg)](package.json) [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nAbort or continue the flow of tasks according to an answer (with or without Enter key) to the specified question. The flow of tasks is paused, until the user responds and the next behavior is found by specified options.\n\n![sample](cl_01.png)\n\n![sample](cl_02.png)\n\n## Getting Started\n\n```shell\nnpm install gulp-confirm --save-dev\n```\n\n## Usage\n\n`gulpfile.js`\n\n```js\nvar gulp = require('gulp'),\n  confirm = require('gulp-confirm');\n\ngulp.task('default', function() {\n  return gulp.src('./develop/*.html')\n    .pipe(confirm(options))\n    // Other tasks...\n    .pipe(gulp.dest('./public_html/'));\n});\n```\n\n### Options\n\n#### `question`\n\n*Type:* string, function or `undefined`\n\nDisplay a specified string or a returned string by a specified function to the user.  \nIf the function returns a *falsy*, this task is finished immediately. And the flow of tasks is continued.\n\nIf this option is not specified when `'_key'` is specified to the [`input`](#input) option and the [`proceed`](#proceed) option is not specified (i.e. you want to let the flow of tasks just pause), a message `'Continue... (Hit any key)'` is displayed.\n\nFor example:\n\n`gulpfile.js`\n\n```js\ngulp.task('default', function() {\n  return gulp.src('./develop/*.html')\n    .pipe(confirm({\n      // Static text.\n      question: 'This processing requires about 10 minutes. Continue?',\n      input: '_key:y'\n    }))\n    // Other tasks...\n    .pipe(gulp.dest('./public_html/'));\n});\n```\n\n```js\nvar pattern = './src/*.html';\ngulp.task('default', function() {\n  return gulp.src(pattern)\n    .pipe(confirm({\n      question: function() {\n        var files = require('glob').sync(pattern);\n        return !files.length ? false : // No file. And do nothing.\n          files.length + ' files are copied at next task. Are you sure?';\n      },\n      input: '_key:y'\n    }))\n    .pipe(gulp.dest('./public_html/'));\n});\n```\n\n#### `input`\n\n*Type:* string or `undefined`\n\nAccept the user's input that is specified type.\n\n* If it is not specified (i.e. `undefined`), accept a **text** (with an Enter key), and let the [`proceed`](#proceed) option decide whether to continue the flow of tasks.\n* If a comma-separated string like `'text1,text2'` is specified, accept a **text** (with an Enter key), and continue the flow of tasks when the input text was found in that comma-separated string, otherwise abort it.\n* If `'_key'` is specified, get a pressed **key** (without an Enter key), and let the [`proceed`](#proceed) option decide whether to continue the flow of tasks.\n* If a string `'_key:charlist'` is specified, get a pressed **key** (without an Enter key), and continue the flow of tasks when the pressed key was found in that `charlist`, otherwise abort it. The `charlist` is a string that includes characters as the keys. For example, if `'_key:abc'` is specified, continue the flow of tasks when the `A`, `B` or `C` key is pressed.\n\nThe string comparisons are case-insensitive (i.e. `a` equals `A`).\n\n#### `proceed`\n\n*Type:* function, boolean or `undefined`\n\nDecide whether to continue the flow of tasks when the [`input`](#input) option is not specified (i.e. `undefined`) or `'_key'` is specified to it.\n\nIf a function is specified, call the function, and continue the flow of tasks when that returns a *truthy*, otherwise abort it.  \nThe function is passed an `answer` argument. It is a string that was input by the user, or a single character as a pressed key by the user.  \nThe function can determine to abort or continue by using it.\n\nIf `false` is specified, the flow of tasks is aborted immediately. And the remaining tasks will not run.  \nOtherwise the flow of tasks is continued. That is, when any text was input or any key was pressed, it is continued. It is just paused until it.\n\nFor example:\n\n`gulpfile.js`\n\n```js\nvar pattern = './src/*.*';\ngulp.task('default', function() {\n  return gulp.src(pattern)\n    .pipe(confirm({\n      question: 'How many files are required?',\n      proceed: function(answer) {\n        var files = require('glob').sync(pattern);\n        if (files.length \u003c +answer) {\n          console.log('There are only ' + files.length + ' files.');\n          return false;\n        } else {\n          return true;\n        }\n      }\n    }))\n    // Other tasks...\n    .pipe(gulp.dest('./pack/'));\n});\n```\n\n```js\ngulp.task('default', function() {\n  return gulp.src('./src/*.*')\n    .pipe(confirm({\n      question: 'Do you want to build? :',\n      input: '_key:y' // Continue the flow if `Y` key is pressed.\n    }))\n    // Other tasks...\n    .pipe(gulp.dest('./pack/'));\n});\n```\n\n```js\ngulp.task('default', function() {\n  return gulp.src('./develop/*.html')\n    // Show something. Pause until any key is pressed.\n    .pipe(confirm({options: {input: '_key'}}))\n    // Other tasks...\n    .pipe(gulp.dest('./public_html/'));\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanseki%2Fgulp-confirm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanseki%2Fgulp-confirm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanseki%2Fgulp-confirm/lists"}