404

[ Avaa Bypassed ]




Upload:

Command:

botdev@3.129.209.135: ~ $
{
  "_from": "libnpmhook@5.0.3",
  "_id": "libnpmhook@5.0.3",
  "_inBundle": false,
  "_integrity": "sha512-UdNLMuefVZra/wbnBXECZPefHMGsVDTq5zaM/LgKNE9Keyl5YXQTnGAzEo+nFOpdRqTWI9LYi4ApqF9uVCCtuA==",
  "_location": "/npm/libnpmhook",
  "_phantomChildren": {},
  "_requested": {
    "escapedName": "libnpmhook",
    "fetchSpec": "5.0.3",
    "name": "libnpmhook",
    "raw": "libnpmhook@5.0.3",
    "rawSpec": "5.0.3",
    "registry": true,
    "saveSpec": null,
    "type": "version"
  },
  "_requiredBy": [
    "#USER",
    "/npm",
    "/npm/libnpm"
  ],
  "_resolved": "https://registry.npmjs.org/libnpmhook/-/libnpmhook-5.0.3.tgz",
  "_shasum": "4020c0f5edbf08ebe395325caa5ea01885b928f7",
  "_shrinkwrap": null,
  "_spec": "libnpmhook@5.0.3",
  "_where": "/Users/isaacs/dev/npm/cli",
  "author": {
    "email": "kzm@sykosomatic.org",
    "name": "Kat Marchán"
  },
  "bugs": {
    "url": "https://github.com/npm/libnpmhook/issues"
  },
  "bundleDependencies": false,
  "dependencies": {
    "aproba": "^2.0.0",
    "figgy-pudding": "^3.4.1",
    "get-stream": "^4.0.0",
    "npm-registry-fetch": "^4.0.0"
  },
  "deprecated": false,
  "description": "programmatic API for managing npm registry hooks",
  "devDependencies": {
    "nock": "^9.6.1",
    "standard": "^11.0.1",
    "standard-version": "^4.4.0",
    "tap": "^12.0.1",
    "weallbehave": "^1.2.0",
    "weallcontribute": "^1.0.8"
  },
  "files": [
    "*.js",
    "lib"
  ],
  "homepage": "https://github.com/npm/libnpmhook#readme",
  "keywords": [
    "hooks",
    "npm",
    "npm api",
    "registry"
  ],
  "license": "ISC",
  "main": "index.js",
  "name": "libnpmhook",
  "optionalDependencies": {},
  "readme": "# libnpmhook [![npm version](https://img.shields.io/npm/v/libnpmhook.svg)](https://npm.im/libnpmhook) [![license](https://img.shields.io/npm/l/libnpmhook.svg)](https://npm.im/libnpmhook) [![Travis](https://img.shields.io/travis/npm/libnpmhook.svg)](https://travis-ci.org/npm/libnpmhook) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/libnpmhook?svg=true)](https://ci.appveyor.com/project/zkat/libnpmhook) [![Coverage Status](https://coveralls.io/repos/github/npm/libnpmhook/badge.svg?branch=latest)](https://coveralls.io/github/npm/libnpmhook?branch=latest)\n\n[`libnpmhook`](https://github.com/npm/libnpmhook) is a Node.js library for\nprogrammatically managing the npm registry's server-side hooks.\n\nFor a more general introduction to managing hooks, see [the introductory blog\npost](https://blog.npmjs.org/post/145260155635/introducing-hooks-get-notifications-of-npm).\n\n## Example\n\n```js\nconst hooks = require('libnpmhook')\n\nconsole.log(await hooks.ls('mypkg', {token: 'deadbeef'}))\n// array of hook objects on `mypkg`.\n```\n\n## Install\n\n`$ npm install libnpmhook`\n\n## Table of Contents\n\n* [Example](#example)\n* [Install](#install)\n* [API](#api)\n  * [hook opts](#opts)\n  * [`add()`](#add)\n  * [`rm()`](#rm)\n  * [`ls()`](#ls)\n  * [`ls.stream()`](#ls-stream)\n  * [`update()`](#update)\n\n### API\n\n#### <a name=\"opts\"></a> `opts` for `libnpmhook` commands\n\n`libnpmhook` uses [`npm-registry-fetch`](https://npm.im/npm-registry-fetch).\nAll options are passed through directly to that library, so please refer to [its\nown `opts`\ndocumentation](https://www.npmjs.com/package/npm-registry-fetch#fetch-options)\nfor options that can be passed in.\n\nA couple of options of note for those in a hurry:\n\n* `opts.token` - can be passed in and will be used as the authentication token for the registry. For other ways to pass in auth details, see the n-r-f docs.\n* `opts.otp` - certain operations will require an OTP token to be passed in. If a `libnpmhook` command fails with `err.code === EOTP`, please retry the request with `{otp: <2fa token>}`\n* `opts.Promise` - If you pass this in, the Promises returned by `libnpmhook` commands will use this Promise class instead. For example: `{Promise: require('bluebird')}`\n\n#### <a name=\"add\"></a> `> hooks.add(name, endpoint, secret, [opts]) -> Promise`\n\n`name` is the name of the package, org, or user/org scope to watch. The type is\ndetermined by the name syntax: `'@foo/bar'` and `'foo'` are treated as packages,\n`@foo` is treated as a scope, and `~user` is treated as an org name or scope.\nEach type will attach to different events.\n\nThe `endpoint` should be a fully-qualified http URL for the endpoint the hook\nwill send its payload to when it fires. `secret` is a shared secret that the\nhook will send to that endpoint to verify that it's actually coming from the\nregistry hook.\n\nThe returned Promise resolves to the full hook object that was created,\nincluding its generated `id`.\n\nSee also: [`POST\n/v1/hooks/hook`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#post-v1hookshook)\n\n##### Example\n\n```javascript\nawait hooks.add('~zkat', 'https://zkat.tech/api/added', 'supersekrit', {\n  token: 'myregistrytoken',\n  otp: '694207'\n})\n\n=>\n\n{ id: '16f7xoal',\n  username: 'zkat',\n  name: 'zkat',\n  endpoint: 'https://zkat.tech/api/added',\n  secret: 'supersekrit',\n  type: 'owner',\n  created: '2018-08-21T20:05:25.125Z',\n  updated: '2018-08-21T20:05:25.125Z',\n  deleted: false,\n  delivered: false,\n  last_delivery: null,\n  response_code: 0,\n  status: 'active' }\n```\n\n#### <a name=\"find\"></a> `> hooks.find(id, [opts]) -> Promise`\n\nReturns the hook identified by `id`.\n\nThe returned Promise resolves to the full hook object that was found, or error\nwith `err.code` of `'E404'` if it didn't exist.\n\nSee also: [`GET\n/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hookshookid)\n\n##### Example\n\n```javascript\nawait hooks.find('16f7xoal', {token: 'myregistrytoken'})\n\n=>\n\n{ id: '16f7xoal',\n  username: 'zkat',\n  name: 'zkat',\n  endpoint: 'https://zkat.tech/api/added',\n  secret: 'supersekrit',\n  type: 'owner',\n  created: '2018-08-21T20:05:25.125Z',\n  updated: '2018-08-21T20:05:25.125Z',\n  deleted: false,\n  delivered: false,\n  last_delivery: null,\n  response_code: 0,\n  status: 'active' }\n```\n\n#### <a name=\"rm\"></a> `> hooks.rm(id, [opts]) -> Promise`\n\nRemoves the hook identified by `id`.\n\nThe returned Promise resolves to the full hook object that was removed, if it\nexisted, or `null` if no such hook was there (instead of erroring).\n\nSee also: [`DELETE\n/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#delete-v1hookshookid)\n\n##### Example\n\n```javascript\nawait hooks.rm('16f7xoal', {\n  token: 'myregistrytoken',\n  otp: '694207'\n})\n\n=>\n\n{ id: '16f7xoal',\n  username: 'zkat',\n  name: 'zkat',\n  endpoint: 'https://zkat.tech/api/added',\n  secret: 'supersekrit',\n  type: 'owner',\n  created: '2018-08-21T20:05:25.125Z',\n  updated: '2018-08-21T20:05:25.125Z',\n  deleted: true,\n  delivered: false,\n  last_delivery: null,\n  response_code: 0,\n  status: 'active' }\n\n// Repeat it...\nawait hooks.rm('16f7xoal', {\n  token: 'myregistrytoken',\n  otp: '694207'\n})\n\n=> null\n```\n\n#### <a name=\"update\"></a> `> hooks.update(id, endpoint, secret, [opts]) -> Promise`\n\nThe `id` should be a hook ID from a previously-created hook.\n\nThe `endpoint` should be a fully-qualified http URL for the endpoint the hook\nwill send its payload to when it fires. `secret` is a shared secret that the\nhook will send to that endpoint to verify that it's actually coming from the\nregistry hook.\n\nThe returned Promise resolves to the full hook object that was updated, if it\nexisted. Otherwise, it will error with an `'E404'` error code.\n\nSee also: [`PUT\n/v1/hooks/hook/:id`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#put-v1hookshookid)\n\n##### Example\n\n```javascript\nawait hooks.update('16fxoal', 'https://zkat.tech/api/other', 'newsekrit', {\n  token: 'myregistrytoken',\n  otp: '694207'\n})\n\n=>\n\n{ id: '16f7xoal',\n  username: 'zkat',\n  name: 'zkat',\n  endpoint: 'https://zkat.tech/api/other',\n  secret: 'newsekrit',\n  type: 'owner',\n  created: '2018-08-21T20:05:25.125Z',\n  updated: '2018-08-21T20:14:41.964Z',\n  deleted: false,\n  delivered: false,\n  last_delivery: null,\n  response_code: 0,\n  status: 'active' }\n```\n\n#### <a name=\"ls\"></a> `> hooks.ls([opts]) -> Promise`\n\nResolves to an array of hook objects associated with the account you're\nauthenticated as.\n\nResults can be further filtered with three values that can be passed in through\n`opts`:\n\n* `opts.package` - filter results by package name\n* `opts.limit` - maximum number of hooks to return\n* `opts.offset` - pagination offset for results (use with `opts.limit`)\n\nSee also:\n  * [`hooks.ls.stream()`](#ls-stream)\n  * [`GET\n/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks)\n\n##### Example\n\n```javascript\nawait hooks.ls({token: 'myregistrytoken'})\n\n=>\n[\n  { id: '16f7xoal', ... },\n  { id: 'wnyf98a1', ... },\n  ...\n]\n```\n\n#### <a name=\"ls-stream\"></a> `> hooks.ls.stream([opts]) -> Stream`\n\nReturns a stream of hook objects associated with the account you're\nauthenticated as. The returned stream is a valid `Symbol.asyncIterator` on\n`node@>=10`.\n\nResults can be further filtered with three values that can be passed in through\n`opts`:\n\n* `opts.package` - filter results by package name\n* `opts.limit` - maximum number of hooks to return\n* `opts.offset` - pagination offset for results (use with `opts.limit`)\n\nSee also:\n  * [`hooks.ls()`](#ls)\n  * [`GET\n/v1/hooks`](https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md#get-v1hooks)\n\n##### Example\n\n```javascript\nfor await (let hook of hooks.ls.stream({token: 'myregistrytoken'})) {\n  console.log('found hook:', hook.id)\n}\n\n=>\n// outputs:\n// found hook: 16f7xoal\n// found hook: wnyf98a1\n```\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/npm/libnpmhook.git"
  },
  "scripts": {
    "postrelease": "npm publish && git push --follow-tags",
    "prerelease": "npm t",
    "pretest": "standard",
    "release": "standard-version -s",
    "test": "tap -J --100 --coverage test/*.js",
    "update-coc": "weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'",
    "update-contrib": "weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"
  },
  "version": "5.0.3"
}

Filemanager

Name Type Size Permission Actions
CHANGELOG.md File 2.14 KB 0644
LICENSE.md File 755 B 0644
README.md File 7.72 KB 0644
index.js File 1.81 KB 0644
package.json File 10.25 KB 0644