{"id":23061801,"url":"https://github.com/rrwen/pg-testdb-template","last_synced_at":"2026-04-14T23:32:16.889Z","repository":{"id":57322656,"uuid":"108071015","full_name":"rrwen/pg-testdb-template","owner":"rrwen","description":"Command line tool for creating a pg-testdb template file","archived":false,"fork":false,"pushed_at":"2018-01-22T02:43:33.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-07T20:29:52.772Z","etag":null,"topics":["cli","cmd","command","database","db","interface","isolated","line","pg","pgtools","postgres","postgresql","tap","tape","temp","template","temporary","test","tool","unit"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/pg-testdb-template","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/rrwen.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":"2017-10-24T03:15:10.000Z","updated_at":"2023-02-16T21:52:39.000Z","dependencies_parsed_at":"2022-08-25T21:01:07.087Z","dependency_job_id":null,"html_url":"https://github.com/rrwen/pg-testdb-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rrwen/pg-testdb-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fpg-testdb-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fpg-testdb-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fpg-testdb-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fpg-testdb-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrwen","download_url":"https://codeload.github.com/rrwen/pg-testdb-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrwen%2Fpg-testdb-template/sbom","scorecard":{"id":786762,"data":{"date":"2025-08-11","repo":{"name":"github.com/rrwen/pg-testdb-template","commit":"a57b3057ce93bc5fd6ef0f209775d88d9aa96e1e"},"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":"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":"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":"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":"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/10 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":"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":"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":"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":"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"}}]},"last_synced_at":"2025-08-23T06:18:13.977Z","repository_id":57322656,"created_at":"2025-08-23T06:18:13.977Z","updated_at":"2025-08-23T06:18:13.977Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31819718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T18:05:02.291Z","status":"ssl_error","status_checked_at":"2026-04-14T18:05:01.765Z","response_time":153,"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":["cli","cmd","command","database","db","interface","isolated","line","pg","pgtools","postgres","postgresql","tap","tape","temp","template","temporary","test","tool","unit"],"created_at":"2024-12-16T03:18:32.428Z","updated_at":"2026-04-14T23:32:16.873Z","avatar_url":"https://github.com/rrwen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg-testdb-template\n\nRichard Wen  \nrrwen.dev@gmail.com  \n  \nCommand line tool for creating a pg-testdb template file  \n\n[![npm version](https://badge.fury.io/js/pg-testdb-template.svg)](https://badge.fury.io/js/pg-testdb-template)\n[![Build Status](https://travis-ci.org/rrwen/pg-testdb-template.svg?branch=master)](https://travis-ci.org/rrwen/pg-testdb-template)\n[![npm](https://img.shields.io/npm/dt/pg-testdb-template.svg)](https://www.npmjs.com/package/pg-testdb-template)\n[![GitHub license](https://img.shields.io/github/license/rrwen/pg-testdb-template.svg)](https://github.com/rrwen/pg-testdb-template/blob/master/LICENSE)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/rrwen/pg-testdb-template.svg?style=social)](https://twitter.com/intent/tweet?text=%23nodejs%20%23npm%20package%20for%20%23template%20of%20isolated%20%23postgres%20%23postgresql%20%23pg%20%23database%20%23unittest:%20https%3A%2F%2Fgithub.com%2Frrwen%2Fpg-testdb-template)\n\n## Install\n\n1. Install [Node.js](https://nodejs.org/en/) (v6.0.0+)\n2. Install [pg-testdb](https://www.npmjs.com/package/pg-testdb) via `npm`\n3. Install [pg-testdb-template](https://www.npmjs.com/package/pg-testdb-template) via `npm`\n\n```\nnpm install pg-testdb --save-dev\nnpm install pg-testdb-template -g\n```\n\nFor the latest developer version, see [Developer Install](#developer-install).\n\n## Usage\n\nCreate a template file named `pg-testdb-template.js` for the [pg-testdb](https://www.npmjs.com/package/pg-testdb) package in the current directory:\n\n```\npg-testdb-template\n```\n\nCreate a template file named `pg_tests.js` in the current directory:\n\n```\npg-testdb-template pg_tests.js\n```\n\nFor help, use:\n\n```\npg-testdb-template --help\n```\n\n## Developer Notes\n\n### Developer Install\n\nInstall the latest developer version with `npm` from github:\n\n```\nnpm install git+https://github.com/rrwen/pg-testdb-template\n```\n  \nInstall from `git` cloned source:\n\n1. Ensure [git](https://git-scm.com/) is installed\n2. Clone into current path\n3. Install via `npm`\n\n```\ngit clone https://github.com/rrwen/pg-testdb-template\ncd pg-testdb-template\nnpm install\n```\n\n### Tests\n\n1. Clone into current path `git clone https://github.com/rrwen/pg-testdb-template`\n2. Enter into folder `cd pg-testdb-template`\n3. Ensure [tape](https://www.npmjs.com/package/tape) and [moment](https://www.npmjs.com/package/moment) are available\n4. Run tests\n5. Results are saved to `./tests/log` with each file corresponding to a version tested\n\n```\nnpm install\nnpm test\n```\n\n### Upload to Github\n\n1. Ensure [git](https://git-scm.com/) is installed\n2. Inside the `pg-testdb-template` folder, add all files and commit changes\n3. Push to github\n\n```\ngit add .\ngit commit -a -m \"Generic update\"\ngit push\n```\n\n### Upload to npm\n\n1. Update the version in `package.json`\n2. Run tests and check for OK status\n3. Login to npm\n4. Publish to npm\n\n```\nnpm test\nnpm login\nnpm publish\n```\n\n### Implementation\n\nThe [npm](https://www.npmjs.com/) core package [fs](https://www.npmjs.com/package/fs) was used to copy a template from the [pg-testdb-template](https://www.npmjs.com/package/pg-testdb-template) install directory to the user's current directory:\n\n1. Create a read stream with `var read = fs.createReadStream('template.js');`\n2. Create a write stream with `var write = fs.createWriteStream('copy.js');`\n3. Pipe the read stream to the write stream `read.pipe(write);`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fpg-testdb-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrwen%2Fpg-testdb-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrwen%2Fpg-testdb-template/lists"}