{"_id":"@amitbar/pg-dump-restore-node-wrapper","_rev":"2-9a5ad559ac3f756cf57e09601d99e2b3","name":"@amitbar/pg-dump-restore-node-wrapper","dist-tags":{"latest":"0.0.5"},"versions":{"0.0.3":{"name":"@amitbar/pg-dump-restore-node-wrapper","version":"0.0.3","description":"A very basic nodejs wrapper around the pg_dump and pg_restore (version 14)","main":"index.js","scripts":{"test":"jest"},"author":{"name":"Amit Bar"},"license":"MIT","dependencies":{"execa":"^4.0.0","path":"^0.12.7"},"devDependencies":{"fs-extra":"^10.0.0","jest":"^27.3.1","pg":"^8.7.1","sequelize":"^6.8.0"},"directories":{"test":"tests"},"repository":{"type":"git","url":"git+https://github.com/AmitBar2001/pg-dump-restore-node-wrapper.git"},"keywords":["pg","pg_dump","pg_restore","postgres"],"bugs":{"url":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper/issues"},"homepage":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper#readme","gitHead":"9fe7fb70237eb8dc683328998e721d4be40a092b","_id":"@amitbar/pg-dump-restore-node-wrapper@0.0.3","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-UeHoJJY5lxhVTQhgzJGEJ76J4fPjegu3fStYDyikaFTsD72+kVTFO8Uzb0Pa1Cdicnpbz2qkABgPfkBZberndQ==","shasum":"d2d1d3b601bf55ecada743d89852e85adf54015c","tarball":"https://registry.npmjs.org/@amitbar/pg-dump-restore-node-wrapper/-/pg-dump-restore-node-wrapper-0.0.3.tgz","fileCount":25,"unpackedSize":10466661,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDuybhzhQTyh7+eTaVefmQ0tJKBHfy91Cx5HAuWuBArZAIgOVz8qQKTZlZQyDT3+x8RYcY+Ix/Lv7vBNMi5m0d8SQU="}]},"_npmUser":{"name":"amitbar","email":"amitbar2001@gmail.com"},"maintainers":[{"name":"amitbar","email":"amitbar2001@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-dump-restore-node-wrapper_0.0.3_1693325214519_0.9326863907334146"},"_hasShrinkwrap":false},"0.0.4":{"name":"@amitbar/pg-dump-restore-node-wrapper","version":"0.0.4","description":"A very basic nodejs wrapper around the pg_dump and pg_restore (version 14.9)","main":"index.js","scripts":{"test":"jest"},"author":{"name":"Amit Bar"},"license":"MIT","dependencies":{"execa":"^4.0.0","path":"^0.12.7"},"devDependencies":{"fs-extra":"^10.0.0","jest":"^27.3.1","pg":"^8.7.1","sequelize":"^6.8.0"},"directories":{"test":"tests"},"repository":{"type":"git","url":"git+https://github.com/AmitBar2001/pg-dump-restore-node-wrapper.git"},"keywords":["pg","pg_dump","pg_restore","postgres"],"bugs":{"url":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper/issues"},"homepage":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper#readme","gitHead":"7128fabdb0e63183dedb1acc2fa037783349c78d","_id":"@amitbar/pg-dump-restore-node-wrapper@0.0.4","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-a/LeUQWyrovuW+v4I6E4Q52Rdp4PVVon42MYRvZH4zhHHfhTkFYW8bWIoIlWIa8JY/Xlf9yjjcufp1alMaUKiw==","shasum":"1ddd3103a28ac770811d41c5636aa7e5544f7d6f","tarball":"https://registry.npmjs.org/@amitbar/pg-dump-restore-node-wrapper/-/pg-dump-restore-node-wrapper-0.0.4.tgz","fileCount":21,"unpackedSize":13067223,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC5RSFMggkYdxBhGl22BI/IO+k99PZvVsLBDU1hOPDSAgIgfuOv4My7bhabrSCTC/e9AvYN2m99ATfA9dW1ZHBTggg="}]},"_npmUser":{"name":"amitbar","email":"amitbar2001@gmail.com"},"maintainers":[{"name":"amitbar","email":"amitbar2001@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-dump-restore-node-wrapper_0.0.4_1693482323987_0.7197967191571559"},"_hasShrinkwrap":false},"0.0.5":{"name":"@amitbar/pg-dump-restore-node-wrapper","version":"0.0.5","description":"A very basic nodejs wrapper around the pg_dump and pg_restore (version 14.9)","main":"index.js","scripts":{"test":"jest"},"author":{"name":"Amit Bar"},"license":"MIT","dependencies":{"execa":"^4.0.0","path":"^0.12.7"},"devDependencies":{"fs-extra":"^10.0.0","jest":"^27.3.1","pg":"^8.7.1","sequelize":"^6.8.0"},"directories":{"test":"tests"},"repository":{"type":"git","url":"git+https://github.com/AmitBar2001/pg-dump-restore-node-wrapper.git"},"keywords":["pg","pg_dump","pg_restore","postgres"],"bugs":{"url":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper/issues"},"homepage":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper#readme","gitHead":"6daa125204408b9f603bc79601e12c10b0ba1b06","_id":"@amitbar/pg-dump-restore-node-wrapper@0.0.5","_nodeVersion":"16.17.1","_npmVersion":"8.15.0","dist":{"integrity":"sha512-J97fD/2fKdEYT6cdfxit4m7pF3PzR3g1ve6lRATnbT9LS8hDqfQRaj1tkICt5lfLIT+2ZrBimlg0Hb08H13Edg==","shasum":"96ce436977b46e1d706dee48a37fe41ed844a6b9","tarball":"https://registry.npmjs.org/@amitbar/pg-dump-restore-node-wrapper/-/pg-dump-restore-node-wrapper-0.0.5.tgz","fileCount":21,"unpackedSize":13067184,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBqAkndM8T/4oYEQcjxCmpDq3o/+qe5fpMdL0H7hIK0HAiEAiG/r45RQSd3r2wJ6HpC1TmtO61pJV7+MlSzZX//LhZY="}]},"_npmUser":{"name":"amitbar","email":"amitbar2001@gmail.com"},"maintainers":[{"name":"amitbar","email":"amitbar2001@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pg-dump-restore-node-wrapper_0.0.5_1693482495607_0.8618752138726822"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-29T16:06:54.420Z","0.0.3":"2023-08-29T16:06:54.777Z","modified":"2023-08-31T11:48:16.062Z","0.0.4":"2023-08-31T11:45:24.334Z","0.0.5":"2023-08-31T11:48:15.901Z"},"maintainers":[{"name":"amitbar","email":"amitbar2001@gmail.com"}],"description":"A very basic nodejs wrapper around the pg_dump and pg_restore (version 14.9)","homepage":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper#readme","keywords":["pg","pg_dump","pg_restore","postgres"],"repository":{"type":"git","url":"git+https://github.com/AmitBar2001/pg-dump-restore-node-wrapper.git"},"author":{"name":"Amit Bar"},"bugs":{"url":"https://github.com/AmitBar2001/pg-dump-restore-node-wrapper/issues"},"license":"MIT","readme":"# pg-dump-restore-node-wrapper\n\nforked from @endodata\n\nThis very small utility that includes pg_dump and pg_restore binaries for Windows and macOS, taken from Postgres 14. DLLs and dylibs are also included, making the binaries standalone.\n\nA thin CLI wrapper is also provided.\n\n## Usage\n\n```js\nimport pgDumpRestore from \"pg-dump-restore-node-wrapper\";\n\nasync function main() {\n  const { stdout, stderr } = await pgDumpRestore.dump({\n    port, // defaults to 5432\n    host,\n    dbname,\n    username,\n    password,\n    file: \"./test.pgdump\",\n    format, // defaults to 'c'\n  }); // outputs an execa object\n\n  const { stdout, stderr } = await pgDumpRestore.restore({\n    port, // defaults to 5432\n    host,\n    dbname,\n    username,\n    password,\n    filename: \"./test.pgdump\", // note the filename instead of file, following the pg_restore naming.\n    clean, // defaults to false\n    create, // defaults to false\n  }); // outputs an execa object\n}\n```\n\nPlease see the [pg_dump](https://www.postgresql.org/docs/14/app-pgdump.html) and [pg_restore](https://www.postgresql.org/docs/14/app-pgrestore.html) documentation for details on the arguments and [execa](https://github.com/sindresorhus/execa) for details on the output streams.\n\n## Creating the binaries\n\npg_dump V<=X can be restored using pg_restore V>=X.\n\nI chose to use pg_dump and pg_restore for Postgres 14, as most of the machines I manage have Postgres 14.\n\n### macOS\n\nI used macdylibbundler from https://github.com/SCG82/macdylibbundler to list all dll files and I then copied and renamed them.\n\nI did not use the tool to bundle the dependencies as it would corrupt the executable.\n\n### Windows\n\nI used https://github.com/lucasg/Dependencies to determine the required DLL, filtering only the local dependencies.\n\n\n\n## To publish to GHCR\n\nAdd this to `package.json`\n```json\n  \"publishConfig\": {\n    \"registry\":\"https://npm.pkg.github.com\"\n  },\n```\n\nand add a `.npmrc` to the root of the repo with \n```.npmrc\n//npm.pkg.github.com/:_authToken=AUTH_TOKEN\n```\nWhere `AUTH_TOKEN` is replaced with a GitHub token.","readmeFilename":"readme.md"}