npm hook

管理注册表挂钩

概要

npm hook ls [pkg]
npm hook add <entity> <url> <secret>
npm hook update <id> <url> [secret]
npm hook rm <id>

注意:此命令对工作区无感知。

描述

允许您管理 npm hooks,包括添加、删除、列出和更新。

挂钩允许您配置 URL 端点,只要任何受支持的实体类型发生更改,就会通知这些端点。钩子可以监视三种不同类型的实体:包、所有者和范围。

要创建包挂钩,只需引用包名称。

C88te/+0C0nxuUgaqjN0Ulyo9QQ3rDkgZrf1ehafmAceT4Th5hH7SqJ81YcfnEhvco0YcqJzHjRSQqNOPZFc2ksNnB/P+QDO3s6rG5C2qoRqizWslkxGvh6KinHfcDe0Zl7hwxZ4DPtuAxEfhGW8og==

bsAjrzLfkWf/6nEbn3epKHhCm62h3+rRtS1Cb/FfuZg497YsVjao4TbNekbIxnjyBirUdICzGHomVAVPOzcK8wK0AIRFdnP/f+OA+D2q4tTH/9XK1U5IBnEm5um3EfX6ksshovWSnAyZNxMdZVm5HA==

um9j4bazGbWlXKn52ob5ETmS/NE58xhYp/XlIg2ldKySqmNS7SROv2oQc2YR72e65GSFwg6aEbMR0MeRmdo0i7lKJM8d+1Oo/KbcS1yc1DbHAnjj/m3ZDSPp2ZVsCxPgiiqEbm/KnmzWVQhh0fHqOrUzxhRXjkwv1OpPprb+zAT1q+JcfiVv84QHlbRdivuF

avQCWRB6f/Cd/Lcu6ZoaPyvm9cnfOzCsU2klgsul4iOH8nToR7IbB34F6G43+FR9/xuiHu5UnV2hXu8MAeJKE9V9hU5423Ycvc1+Vy6YEiccW93ull90oGRcCwS49nbwL1gOxd/ZnHacHwYsBgUo2A==

示例

kxWNssWczGU85b+yHotc1l+AzoPf6f/6TTgCnDld8erXbCrC+Q2Af+M1qO8tqUlCBr3MQ26Ljsv+CjxFdrx7Uw==

$ npm hook add lodash https://example.com/ my-shared-secret

kxWNssWczGU85b+yHotc1neAp0623CbHVKS1qXZMCow1SjUVLZE/iH+0d5kf6Me/Ht2kcx2iGulgR4Iqaa8uLdepxM2mcSSf2S8crwLUnuk=

$ npm hook add ~substack https://example.com/ my-shared-secret

kxWNssWczGU85b+yHotc1txx8xFQK5sXnsmOTk8SWiqt3BjGbmbf8K425R6HepMM0J+7DqmCqAZdIcDvyce2HQ==

$ npm hook add @npm https://example.com/ my-shared-secret

1MgKWwTn8PbmG7zqvzEC+SO6Ts1UKsTCI9IV91Je18I=

$ npm hook ls

iGtRnnlqu4YVvxSkan8eZMcndf0tfiVYvehOaWt9HsUCvSLgT/OxMQREFzAPG+nsokN+sp07TDQfUNujigJdzQ==

$ npm hook ls lodash

Lk4KWsx8Q8rxupu/fBH8FSlwZyeBGa2KMVYvLbtpkNI=

$ npm hook update id-deadbeef https://my-new-website.here/

ncMdUQnqg24pa5Kux/5ZPXe/P/eO5VjW/URhXJA6Jl4=

$ npm hook rm id-deadbeef

配置

registry

    Jo9YyMATQgc1FiySMtnVB7dq8l+1jVnpSvlj10Yu+tGb9ebRFPqDnZKf/pum9/uMmqeJieA5VgdRavSVSeTCia9Xl5DJP7Jjfdnu4rXR/lj+/KNbrvjmWvnNJ7u8+/ZAq10CumDZI6GcWsTOrD3+o/BlfQgJFYV40sXxHUHIt8A=

hYQ/LDDVu6WMgobClOZy0DheSadLexaLfr0eSvR/UhY=

otp

    Jo9YyMATQgc1FiySMtnVB+uyUAddeXNxm/I66ZKI1kaTcCpxz68Z81QQ4awSoJJf1gJyeeqVOanLPvtmRu19hA==

PRcc3yNJHYzj2w5idiW7JHA/J+p3nEsxTNx7wRw/iYUZv137gdlLCrKB1nx6iPyajdWY/ShxBNSdBU4fDn3yrvapmewppA3w5rEB79GcP8aIAHcsSHdionTRAa+OhQcne0s9m5mCcRteouhlEGZon0DgzABg2Hxm5mO1IlA8c0I=

WD+ZGaqlTvtxRp1AAlBIovy2xyHEmz7Z00kXhfPDlHjC4HLf8J2S5xQ+S37IO3HtnlCBStr/AEJHIO6MTMntMZQ5JXaai8KQbZDywOz0Z5g83qqWcxkdPqCZmDPcKhg69Z7FzDEOUYL1QCqTcfi9BrtQwUTnvn5v4pnfy96/0D8=