列出带有后安装挂钩的NPM软件包
为了在隔离网络中的CI/CD上运行构建,我想知道项目中的poststall脚本在做什么,因此我可以相应地配置网络。
有没有更好的方法来查看哪些软件包执行后安装脚本?
For running my build on a CI/CD that's inside an isolated network I would like to know what the postinstall scripts in my project are doing, so I can configure the network accordingly.
Is there a better way than reverse engineering to see which packages execute postinstall scripts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
回答原始问题,您可以运行一些这样的命令,以获取具有后安装脚本的所有dep的列表:
Answering the original question, you can run some command like this to get a list of all deps that have postinstall scripts:
有@lavamoat/washer-scripts 。
只需添加
到
package.json
即可运行允许脚本的后安装。可用于使用后插头挂钩检测脚本
there is @lavamoat/allow-scripts.
simply add
to the
package.json
to run the postinstall of the allowed scripts.can be used to detect scripts with a postinstall hook