1NPM-HOOK(1)                                                        NPM-HOOK(1)
2
3
4

NAME

6       npm-hook - Manage registry hooks
7

SYNOPSIS

9         npm hook ls [pkg]
10         npm hook add <entity> <url> <secret>
11         npm hook update <id> <url> [secret]
12         npm hook rm <id>
13

EXAMPLE

15       Add a hook to watch a package for changes:
16
17         $ npm hook add lodash https://example.com/ my-shared-secret
18
19       Add a hook to watch packages belonging to the user substack:
20
21         $ npm hook add ~substack https://example.com/ my-shared-secret
22
23       Add a hook to watch packages in the scope @npm
24
25         $ npm hook add @npm https://example.com/ my-shared-secret
26
27       List all your active hooks:
28
29         $ npm hook ls
30
31       List your active hooks for the lodash package:
32
33         $ npm hook ls lodash
34
35       Update an existing hook's url:
36
37         $ npm hook update id-deadbeef https://my-new-website.here/
38
39       Remove a hook:
40
41         $ npm hook rm id-deadbeef
42

DESCRIPTION

44       Allows          you         to         manage         npm         hooks
45       https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifi
46       cations-of-npm, including adding, removing, listing, and updating.
47
48       Hooks  allow you to configure URL endpoints that will be notified when‐
49       ever a change happens to any of the supported entity types. Three  dif‐
50       ferent types of entities can be watched by hooks: packages, owners, and
51       scopes.
52
53       To create a package hook, simply reference the package name.
54
55       To create an owner hook, prefix the owner name with  ~  (as  in,  ~you‐
56       ruser).
57
58       To  create  a  scope  hook,  prefix  the  scope  name  with  @  (as in,
59       @yourscope).
60
61       The hook id used by update and rm are the IDs listed in npm hook ls for
62       that particular hook.
63
64       The  shared  secret  will  be sent along to the URL endpoint so you can
65       verify the request came from your own configured hook.
66

SEE ALSO

68       · "Introducing              Hooks"              blog               post
69         https://blog.npmjs.org/post/145260155635/introducing-hooks-get-noti
70         fications-of-npm
71
72
73
74
75                                  April 2019                       NPM-HOOK(1)
Impressum