{"id":23069712,"url":"https://github.com/gherking/gpc-replacer","last_synced_at":"2025-08-26T02:16:18.523Z","repository":{"id":35799944,"uuid":"219362513","full_name":"gherking/gpc-replacer","owner":"gherking","description":"The Replacer precompiler is responsible for exchanging predefined strings in the feature files. It inserts the provided text in the place held for them.","archived":false,"fork":false,"pushed_at":"2024-06-13T04:30:48.000Z","size":261,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-09T07:27:14.228Z","etag":null,"topics":["cucumber","feature-file","gherkin","gherking","gpc","hacktoberfest","precompiler","typescript"],"latest_commit_sha":null,"homepage":"https://gherking.github.io/gpc-replacer/","language":"Gherkin","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/gherking.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":"2019-11-03T20:40:20.000Z","updated_at":"2025-07-11T15:54:35.000Z","dependencies_parsed_at":"2023-01-16T06:46:21.203Z","dependency_job_id":"b964f98a-5794-4f02-8ec6-6dbaa8ea5145","html_url":"https://github.com/gherking/gpc-replacer","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":"gherking/gpc-for-loop","purl":"pkg:github/gherking/gpc-replacer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-replacer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-replacer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-replacer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-replacer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gherking","download_url":"https://codeload.github.com/gherking/gpc-replacer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gherking%2Fgpc-replacer/sbom","scorecard":{"id":425646,"data":{"date":"2025-08-11","repo":{"name":"github.com/gherking/gpc-replacer","commit":"bce834dc6d28531ee56d24c5cc3b5ffa957cfa78"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.7,"checks":[{"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":4,"reason":"Found 2/5 approved changesets -- score normalized to 4","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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Info: jobLevel 'actions' permission set to 'read': .github/workflows/codeql-analysis.yml:28","Info: jobLevel 'contents' permission set to 'read': .github/workflows/codeql-analysis.yml:29","Warn: no topLevel permission defined: .github/workflows/beta-release.yml:1","Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Warn: no topLevel permission defined: .github/workflows/codeql-analysis.yml:1","Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/pull-request.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"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":4,"reason":"dependency not pinned by hash detected -- score normalized to 4","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beta-release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/beta-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beta-release.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/beta-release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/beta-release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/beta-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beta-release.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/beta-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/beta-release.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/beta-release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/ci.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:45: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:56: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/codeql-analysis.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/codeql-analysis.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull-request.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/pull-request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/pull-request.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/pull-request.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/pull-request.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/pull-request.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:16: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/gherking/gpc-replacer/release.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/docs.yml:23","Info:   0 out of  17 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned","Info:   6 out of   7 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":"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":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":"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"}},{"name":"Security-Policy","score":10,"reason":"security policy file detected","details":["Info: security policy file detected: github.com/gherking/.github/SECURITY.md:1","Info: Found linked content: github.com/gherking/.github/SECURITY.md:1","Info: Found disclosure, vulnerability, and/or timelines in security policy: github.com/gherking/.github/SECURITY.md:1","Info: Found text in security policy: github.com/gherking/.github/SECURITY.md:1"],"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":"SAST","score":7,"reason":"SAST tool detected but not run on all commits","details":["Info: SAST configuration detected: CodeQL","Warn: 0 commits out of 8 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"}},{"name":"Vulnerabilities","score":5,"reason":"5 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275","Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T02:10:34.953Z","repository_id":35799944,"created_at":"2025-08-19T02:10:34.953Z","updated_at":"2025-08-19T02:10:34.953Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272160241,"owners_count":24883779,"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-26T02:00:07.904Z","response_time":60,"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":["cucumber","feature-file","gherkin","gherking","gpc","hacktoberfest","precompiler","typescript"],"created_at":"2024-12-16T06:16:46.318Z","updated_at":"2025-08-26T02:16:18.478Z","avatar_url":"https://github.com/gherking.png","language":"Gherkin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gpc-replacer\n\n![Downloads](https://img.shields.io/npm/dw/gpc-replacer?style=flat-square)\n![Version@npm](https://img.shields.io/npm/v/gpc-replacer?label=version%40npm\u0026style=flat-square)\n![Version@git](https://img.shields.io/github/package-json/v/gherking/gpc-replacer/master?label=version%40git\u0026style=flat-square)\n![CI](https://img.shields.io/github/workflow/status/gherking/gpc-replacer/CI/master?label=ci\u0026style=flat-square)\n![Docs](https://img.shields.io/github/workflow/status/gherking/gpc-replacer/Docs/master?label=docs\u0026style=flat-square)\n\nThis GherKing Precompiler is responsible to replace keys in feature files with given values.\n\n## Usage\n\n```javascript\n'use strict';\nconst compiler = require('gherking');\nconst { default: Replacer } = require('gpc-replacer');\n\nlet ast = await compiler.load('./features/src/login.feature');\nast = compiler.process(\n    ast,\n    new Replacer({\n        // config\n        stringToBeReplaced1: \"stringToReplaceWith1\",\n        stringToBeReplaced2: \"stringToReplaceWith2\",\n    })\n);\nawait compiler.save('./features/dist/login.feature', ast, {\n    lineBreak: '\\r\\n'\n});\n```\n\n```typescript\n'use strict';\nimport {load, process, save} from \"gherking\";\nimport Replacer, { ReplacerConfig } from \"gpc-replacer\";\n\nlet ast = await load(\"./features/src/login.feature\");\nast = process(\n    ast,\n    new Replacer({\n        // config\n        stringToBeReplaced1: \"stringToReplaceWith1\",\n        stringToBeReplaced2: \"stringToReplaceWith2\",\n    })\n);\nawait save('./features/dist/login.feature', ast, {\n    lineBreak: '\\r\\n'\n});\n```\n\nThis Replacer is responsible for exchanging predefined strings in the\nfeature files. It inserts the provided text in the place held for them.\n\nAs an input it needs the feature file to be modified, and a config\njson file, which contains the words to be replaced, and the words\nto replace them with. It is a regular json, where the keys are the\nwords need replacing, and their values are the words they will get\nreplaced by.\nIn case the config file is not available, or its format is incorrect\nthe Replacer throws an error.\n\nIt replaces strings given in a format `${to_replace}` in the input\nfeature.\n\nIt can find and replace such strings in the textual parts of a\nfeature file:\n\n* **Document**: comments\n* **Feature**: name, description, comments\n* **Rule**: name, description, comments\n* **Background**: name, description, comments\n* **Scenario Outline**: name, decription, comments\n* **Scenario**: name, description, comments\n* **Step**: text, comment\n* **Tag**: name, value, comments\n* **Examples**: name, comments\n* **Doc String**: content, comment\n* **Data Table**, **Table Rows**: cell values, comments\n\nSee examples for the input files and an output in the test/data folder.\n\n## Other\n\nThis package uses [debug](https://www.npmjs.com/package/debug) for logging, use `gpc:replacer` :\n\n```shell\nDEBUG=gpc:replacer* gherking ...\n```\n\nFor detailed documentation see the [TypeDocs documentation](https://gherking.github.io/gpc-replacer/).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgherking%2Fgpc-replacer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgherking%2Fgpc-replacer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgherking%2Fgpc-replacer/lists"}