{"_id":"@centrid/native-modules-prebuilds-patcher","_rev":"11-92ef4a743179f26aa7adf40e8a024d38","time":{"created":"2023-06-27T13:28:53.063Z","1.2.3":"2023-06-27T01:34:50.027Z","modified":"2023-07-06T07:11:04.527Z","1.2.4":"2023-06-27T03:17:09.176Z","1.2.5":"2023-06-27T04:19:25.164Z","1.1.2":"2023-06-27T05:21:33.311Z","1.5.5":"2023-06-27T13:28:53.367Z","1.5.7":"2023-06-28T05:10:43.841Z","1.5.10":"2023-07-06T07:11:04.346Z"},"name":"@centrid/native-modules-prebuilds-patcher","dist-tags":{"latest":"1.5.10"},"versions":{"1.5.5":{"name":"@centrid/native-modules-prebuilds-patcher","main":"./src/PrebuildsPatcher","version":"1.5.5","cnversion":"1.5.5.245304270","description":"Main package for patching native module prebuilds created by the Native Module Prebuilds Creator","keywords":["prebuilt","binaries","prebuildify","packages","native-modules","electron","bindings","patcher"],"author":{"name":"Chido W","email":"chidow@centridsol.tech"},"homepage":"https://github.com/centridsol/native-module-prebuilds-creator/tree/master/packages/native-modules-prebuilds-patcher","contributors":[{}],"license":"SEE LICENSE IN license.md","dependencies":{"cross-spawn":"^7.0.3","fs-extra":"^11.1.1","lodash":"^4.17.21","merge-dirs":"^0.2.1","node-abi":"^3.43.0","node-gyp":"^9.4.0","npmlog":"^7.0.1","rimraf":"^4.0.0","semver":"^7.5.1"},"devDependencies":{"@babel/cli":"^7.21.5","@babel/core":"^7.21.8","@babel/plugin-transform-runtime":"^7.22.5","@babel/preset-env":"^7.21.5","@types/bindings":"^1.5.1","@types/fs-extra":"^11.0.1","@types/jest":"^29.5.1","@types/lodash":"^4.14.195","@types/node-abi":"^3.0.0","@types/semver":"^7.5.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"4.9.5"},"scripts":{"test":"jest --runInBand","build":"tsc --project ./tsconfig.json; cp package.json ./dist/package.json; cp README.md ./dist/README.md; cp LICENSE.md ./dist/LICENSE.md"},"gitHead":"69da139dbe6b636f823bb2a714b536064110e4e3","_id":"@centrid/native-modules-prebuilds-patcher@1.5.5","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-6ZaSBUgjBNEooPEZDC9SAd2xEqoBL8l3U/h1YIHvbNcHCp5RT6AaRXuE2T+H66LKChd+VMrQxBsmNf21rq9N/A==","shasum":"90da893012cc4edc86663af0c920a49eb2a93ed9","tarball":"https://registry.npmjs.org/@centrid/native-modules-prebuilds-patcher/-/native-modules-prebuilds-patcher-1.5.5.tgz","fileCount":10,"unpackedSize":46654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICzz09m96HjxyWSZs/oNpi2N3po4yzWrIcVeqhK1b5ZiAiEAuCg4eSpcVETaWNajt18L6ZM24ShaprY2o0F1cXKu7GI="}]},"_npmUser":{"name":"centridsol","email":"centridsol@gmail.com"},"directories":{},"maintainers":[{"name":"walisc","email":"warambwac@gmail.com"},{"name":"centridsol","email":"centridsol@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-modules-prebuilds-patcher_1.5.5_1687872533159_0.2543921670521123"},"_hasShrinkwrap":false},"1.5.7":{"name":"@centrid/native-modules-prebuilds-patcher","main":"./src/PrebuildsPatcher","version":"1.5.7","cnversion":"1.5.7.187135134","description":"Main package for patching native module prebuilds created by the Native Module Prebuilds Creator","keywords":["prebuilt","binaries","prebuildify","packages","native-modules","electron","bindings","patcher"],"author":{"name":"Chido W","email":"chidow@centridsol.tech"},"homepage":"https://github.com/centridsol/native-module-prebuilds-creator/tree/master/packages/native-modules-prebuilds-patcher","contributors":[{}],"license":"SEE LICENSE IN license.md","dependencies":{"cross-spawn":"^7.0.3","fs-extra":"^11.1.1","lodash":"^4.17.21","merge-dirs":"^0.2.1","node-abi":"^3.43.0","node-gyp":"^9.4.0","npmlog":"^7.0.1","rimraf":"^4.0.0","semver":"^7.5.1"},"devDependencies":{"@babel/cli":"^7.21.5","@babel/core":"^7.21.8","@babel/plugin-transform-runtime":"^7.22.5","@babel/preset-env":"^7.21.5","@types/bindings":"^1.5.1","@types/fs-extra":"^11.0.1","@types/jest":"^29.5.1","@types/lodash":"^4.14.195","@types/node-abi":"^3.0.0","@types/semver":"^7.5.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"4.9.5"},"scripts":{"test":"jest --runInBand","build":"tsc --project ./tsconfig.json; cp package.json ./dist/package.json; cp README.md ./dist/README.md; cp LICENSE.md ./dist/LICENSE.md"},"gitHead":"97bf8fe9c33b31f65357745662bdb3a461690349","_id":"@centrid/native-modules-prebuilds-patcher@1.5.7","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-34xe08oX7Imq8ZU+HwNEi3ShQ+t2xYzXmlG1MKmgd2cPTheawxe4+7jkt95FecYHOoZqn7AyPPUw1zZKt7+luQ==","shasum":"97e5a746d92f640834c3d94dcbd37afd5576713e","tarball":"https://registry.npmjs.org/@centrid/native-modules-prebuilds-patcher/-/native-modules-prebuilds-patcher-1.5.7.tgz","fileCount":10,"unpackedSize":46654,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGwvYA+9G/wgVa1MyGPBWAnssQCByiTl6TyXjVoTjT07AiEAw+TOwl91ernXs4YyrN9OWncQtOcziY0RYXE3hKwfL9Y="}]},"_npmUser":{"name":"centridsol","email":"centridsol@gmail.com"},"directories":{},"maintainers":[{"name":"walisc","email":"warambwac@gmail.com"},{"name":"centridsol","email":"centridsol@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-modules-prebuilds-patcher_1.5.7_1687929043581_0.1742860363101213"},"_hasShrinkwrap":false},"1.5.10":{"name":"@centrid/native-modules-prebuilds-patcher","main":"./src/PrebuildsPatcher","version":"1.5.10","cnversion":"1.5.10.161359725","description":"Main package for patching native module prebuilds created by the Native Module Prebuilds Creator","keywords":["prebuilt","binaries","prebuildify","packages","native-modules","electron","bindings","patcher"],"author":{"name":"Chido W","email":"chidow@centridsol.tech"},"homepage":"https://github.com/centridsol/native-module-prebuilds-creator","contributors":[{}],"license":"SEE LICENSE IN license.md","dependencies":{"cross-spawn":"^7.0.3","fs-extra":"^11.1.1","lodash":"^4.17.21","merge-dirs":"^0.2.1","node-abi":"^3.43.0","node-gyp":"^9.4.0","npmlog":"^7.0.1","rimraf":"^4.0.0","semver":"^7.5.1"},"devDependencies":{"@babel/cli":"^7.21.5","@babel/core":"^7.21.8","@babel/plugin-transform-runtime":"^7.22.5","@babel/preset-env":"^7.21.5","@types/bindings":"^1.5.1","@types/fs-extra":"^11.0.1","@types/jest":"^29.5.1","@types/lodash":"^4.14.195","@types/node-abi":"^3.0.0","@types/semver":"^7.5.0","jest":"^29.5.0","ts-jest":"^29.1.0","typescript":"4.9.5"},"scripts":{"test":"jest --runInBand","build":"tsc --project ./tsconfig.json; cp package.json ./dist/package.json; cp README.md ./dist/README.md; cp LICENSE.md ./dist/LICENSE.md"},"gitHead":"ac68e87171f47672c33de418649b78dbc8d9dfdc","_id":"@centrid/native-modules-prebuilds-patcher@1.5.10","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-FbGHsr+3kJ5ts661FIXNrz/5kplOjSEoYrMkI1Sja74FGWPBWlfy9+MtfbEZC6m6r1eDqVnjKr2mrK0snXnMqw==","shasum":"efaa93fdb11ce82c7eb120b9fff8bb807df6d0d6","tarball":"https://registry.npmjs.org/@centrid/native-modules-prebuilds-patcher/-/native-modules-prebuilds-patcher-1.5.10.tgz","fileCount":10,"unpackedSize":47866,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDUDU0HYGsTWc758eyeP4LjrqTWAYmYxtCgAA27/cIIXwIhAI2sNTPDbhGRoDUX79alL22z34uw9WweNad1CLcvbq4V"}]},"_npmUser":{"name":"centridsol","email":"centridsol@gmail.com"},"directories":{},"maintainers":[{"name":"walisc","email":"warambwac@gmail.com"},{"name":"centridsol","email":"centridsol@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/native-modules-prebuilds-patcher_1.5.10_1688627464144_0.9529256860796029"},"_hasShrinkwrap":false}},"maintainers":[{"name":"walisc","email":"warambwac@gmail.com"},{"name":"centridsol","email":"centridsol@gmail.com"}],"description":"Main package for patching native module prebuilds created by the Native Module Prebuilds Creator","homepage":"https://github.com/centridsol/native-module-prebuilds-creator","keywords":["prebuilt","binaries","prebuildify","packages","native-modules","electron","bindings","patcher"],"contributors":[{}],"author":{"name":"Chido W","email":"chidow@centridsol.tech"},"license":"SEE LICENSE IN license.md","readme":"# Native Module Prebuilds Patcher\n### Main package for patching native module prebuilds created by the Native Module Prebuilds Creator\n\n**Please Note**: This project is maintained on [gitlab.com](https://gitlab.com/centridpub/native-module-prebuilds-creator/-/tree/master/packages/native-modules-prebuilds-patcher)\n\nPlease see the [home](https://gitlab.com/centridpub/native-module-prebuilds-creator) page to get a fuller picture of this package.\n\n**Important Note:** In most cases, you do not need to use the package directly as it is bundled with the generated prebuilds folder created using the [Native Module Prebuild Creator](https://gitlab.com/centridpub/native-module-prebuilds-creator/-/tree/master/packages/native-modules-prebuilds-creator). It wraps the appropriate `prebuild-manifest.json` files, exposes a CLI interface, and unless there is a specific reason, it is recommended to use that one instead.\n\n## Installation\n\nTo install the Native Module Prebuilds Patcher, use either of the following commands:\n\n```shell\nnpm i @centrid/native-modules-prebuilds-patcher\n```\n```shell\nyarn add @centrid/native-modules-prebuilds-patcher\n```\n\n## Usage\n\n```javascript\nimport { PrebuildsPatcher } from \"@centrid/native-modules-prebuilds-patcher\";\n\nconst patcher = new PrebuildsPatcher(\n  path.join(__dirname, \"<path-to-generated-prebuild-manifest.json>\"), \n  /* patcherOptions:IPatcherOptions */\n  {}\n);\n\n/*\nPatch all native modules in your current project using the generated prebuilds. This will look for all the native modules in your current project, check if applicable prebuilds are available, and patch them as appropriate.\n\nasync PatchAll(arch: string, platform: string, runtime: string)\n*/\nlet patcherPromise = patcher.PatchAll(\"x64\", \"win32\", \"electron@25.0.0\");\n\n// OR\n\n/*\nSimilar to PatchAll, but allows you to specify the packages you want to patch.\n\nasync Patch(packagesToPatch: string[], arch: string, platform: string, runtime: string)\n*/\npatcherPromise = patcher.Patch([\"drivelist@9.2.4\", \"msgpackr-extract@3.0.2\"], \"x64\", \"win32\", \"electron@25.0.0\");\n\n// OR\n\n/*\nRevert patched native modules\n\nRevertPatches()\n*/\npatcherPromise = patcher.RevertPatches();\n```\n\nOther methods available:\n\n```javascript\n/*\nSet the project path that contains the native modules to be patched\n\nSetProjectPath(projectDir: string)\n*/\npatcher.SetProjectPath(\"<alternate-project-dir>\");\n\n/*\nUpdate the patcher options\n\nUpdatePatcherOptions(options: IPatcherOptions)\n*/\npatcher.UpdatePatcherOptions(\"<options>\");\n```\n\nPlease correct any grammatical or spelling errors for the readme file above.\n\n\n## Future Improvements and Other Notes\n\n* Most of the operations in these packages are run synchronously, and performance gains can be made by running most of these operations asynchronously. This will be considered for future releases.\n\n## Contributing\n\nNative Module Prebuilds Creator is an open-source project, and contributions are welcome. If you have a bug fix, please create a pull request explaining what the bug is, how you fixed it, and how you tested it.\n\nIf it's a new feature, please add it as an issue with the \"enhancement\" label, providing details about the new feature and why you think it's needed. We will discuss it there, and once it's agreed upon, you can create a pull request with the highlighted details.\n\n## Authors\n\n* **Chido W** - *Initial Work* - [chidow@centridsol.tech](mailto:chidow@centridsol.tech) \n  \n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.","readmeFilename":"README.md"}