cnpm / cnpmcore

Private NPM Registry for Enterprise
https://npmmirror.com
MIT License
619 stars 84 forks source link

RFC: 实现 npm hooks #282

Closed killagu closed 2 years ago

killagu commented 2 years ago

api 文档

https://github.com/npm/registry/blob/master/docs/hooks/endpoints.md

hooks 流程

graph TD;
  change[触发变更记录]--> create_hook_task[创建 hooks 执行任务];
  create_hook_task --> scope_hooks[按照 scope 遍历订阅记录];
  scope_hooks --> create_push_task[创建 hooks 推送任务];
  create_hook_task --> name_hooks[按照 name 遍历订阅记录];
  name_hooks --> create_push_task[创建 hooks 推送任务];
  create_hook_task --> owner_hooks[按照 owner 遍历订阅记录];
  owner_hooks --> create_push_task[创建 hooks 推送任务];
  create_push_task --> do_push_task[执行 hook 回调];
  do_push_task -->|Yes| done[hook 执行成功];
  do_push_task -->|No| retry_push_task[执行重试];
  retry_push_task -->|小于最大重试次数| do_push_task;
  retry_push_task -->|大于等于最大重试次数| abort[放弃推送];

task 模型变更

在 hooks 执行过程中,需要幂等的能力,避免重复的推送任务创建,导致订阅方收到重复推送的问题。

task 表中新增 biz_id 以及唯一索引 uk_biz_id 来保障,相同任务只能插入一条。以本次两种类型 task 来说:

hook 模型设计

enum HookType {
  SCOPE = 'SCOPE',
  NAME = 'NAME',
  OWNER = 'OWNER',
}

interface Hook {
  id: bigint;
  hookId: string;
  type: HookType;
  ownerId: string;
  name: string;
  endpoint: string;
  secret: string;
  latestTaskId: string;
}

表结构变更

CREATE TABLE IF NOT EXISTS `tasks` (
   `log_store_position` varchar(10) NOT NULL COMMENT 'cloud store disk position',
   `attempts` int unsigned DEFAULT 0 COMMENT 'task execute attempts times',
   `error` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL COMMENT 'error description',
+  `biz_id` varchar(48) NOT NULL COMMENT 'unique biz id to keep task unique',
   PRIMARY KEY (`id`),
   UNIQUE KEY `uk_task_id` (`task_id`),
+  UNIQUE KEY `uk_biz_id` (`biz_id`)
   KEY `idx_type_state_target_name` (`target_name`, `type`, `state`),
   KEY `idx_type_state_gmt_modified` (`type`, `state`, `gmt_modified`),
   KEY `idx_gmt_modified` (`gmt_modified`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='task info';

CREATE TABLE IF NOT EXISTS `hooks` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'primary key',
  `gmt_create` datetime(3) NOT NULL COMMENT 'create time',
  `gmt_modified` datetime(3) NOT NULL COMMENT 'modified time',
  `hook_id` varchar(24) NOT NULL COMMENT 'hook id',
  `type` varchar(20) NOT NULL COMMENT 'hook type, scope, name, owner',
  `name` varchar(428) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'hook name',
  `owner_id` varchar(24) NOT NULL COMMENT 'hook owner id',
  `endpoint` varchar(2048) NOT NULL COMMENT 'hook endpoint',
  `secret` varchar(200) NOT NULL COMMENT 'sign secret',
  `latest_task_id` varchar(24) NOT NULL COMMENT 'latest task id',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_type_name_owner_id` (`type`, `name`, `owner_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='task info';

回调 header

需要通过 x-npm-signature 来传输签名结果

{
  "x-npm-signature":"sha256=3fd80b480bf480bd63c759be00c851a3e89989d8b4b51bcbe52dfcfc1feaeb4b",
  "user-agent":"npm hook dispatcher v4.0.0",
  "content-type":"application/json",
  "host":"xxxxxxx",
  "connection":"close",
  "transfer-encoding":"chunked"
}

签名方式

crypto.createHmac('sha256', secret).update(body).digest('hex');

hook 类型

本次计划支持:

示例数据

package:star

{
  "event": "package:star",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "7-f1d55111efe79b74fe8220dfcdbbad47",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:03:45.025Z"
    },
    "maintainers": [
      {
        "email": "killa07071201@gmail.com",
        "name": "killagu"
      },
      {
        "email": "killa123@126.com",
        "name": "killa07071201"
      }
    ],
    "license": "MIT",
    "readme": "ERROR: No README data found!",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "_attachments": {}
  },
  "change": {
    "user": "killagu"
  },
  "time": 1660111446583
}

package:unstar

{
  "event": "package:unstar",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "6-b590d73d45e586298f8540cf87fbf7fa",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:02:39.320Z"
    },
    "maintainers": [
      {
        "email": "killa07071201@gmail.com",
        "name": "killagu"
      },
      {
        "email": "killa123@126.com",
        "name": "killa07071201"
      }
    ],
    "license": "MIT",
    "readme": "ERROR: No README data found!",
    "readmeFilename": "",
    "users": {},
    "_attachments": {}
  },
  "change": {
    "user": "killagu"
  },
  "time": 1660111446345
}

package:publish

{
  "event": "package:publish",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "9-1216041047dd5a5c266acdbfb7b2862e",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.1.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      },
      "1.1.0": {
        "name": "killa-test-sync",
        "version": "1.1.0",
        "_id": "killa-test-sync@1.1.0",
        "_nodeVersion": "16.14.2",
        "_npmVersion": "8.5.0",
        "dist": {
          "integrity": "sha512-4KHngevaPv5uyoAtQtnNTdTX+hJMSMyxIlGS+bxBoJi8Try2PhqpQzc/+cI4/2RGyPSAu8ztYaG9ivLSFuYTUQ==",
          "shasum": "0b7bca6e9355e9ab6d313eb988b520d657173dd6",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.1.0.tgz",
          "fileCount": 1,
          "unpackedSize": 54,
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEQCIDtJhGsvwVNx418YRGlm+wI0GGMj24Ia+kHg66EozVV7AiAKQozIir92JLiFkJXM2rSa0nCe4EZ7ckrueeHOPyokkw=="
            }
          ],
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi80xqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTPA/+OTowANlJyk8MXX2A0TprTotClIHEgHdOP7dglmzPBXQcrRGs\r\nwCoCFwxX26ut6AI5xDWX6vNv0OJyYyycjtEPyn7z/qLMU4QffIu1SpKZ06mB\r\nT66txm+19e7tL+zhnP8kPSsznNjsWM2exoI8Z1jSpBo8MGtgGawiIRP8BOn4\r\n1nB4NhEPT+qgAthfZtrATYAuynk2SN6Xnz8n53i72bfXzTQbCbYSKLdtPJAs\r\nkILLr/hH1Sc77Q4CBUqrOtFKCc1kAxEcDZh/Do6s3jNF82p3zE6/2okjwCDZ\r\n9QJxN1HSoossybZVO8NX7df8gHdI6T3OvsTkCrAQlxErEAw1yzmfeld4lydw\r\niPcNrhONzGOiC0HrbVUVnLPBqIkjvfOrUsofjzMRBtpeS3FP/GRFTIZUEd5y\r\nlnwsiyUNN7HXk3qwZrKO1H/S4pbr9iQe0vkExR4/pzEHkBwHCBUEjBizdZx9\r\nkdXxjBiQJ8JwQ/9WAj/WqzoUcWV155g7BkgjVXDRI1iAbEZhlxCisObyAUMR\r\n5NsKmaLv7U4WJNca743qtpoeUGRNp3icYjviDPVzNRIH3/FqUyoNXDSwd3Rn\r\nm/+qABzX9S1m8xggytieZ5JOjQ79f0i1VpIQ5gapAc/0X2EU60DVYiQ28nTJ\r\nheySPUJKZbSXHy91n6niCXnw4fs6lD/954k=\r\n=bMV5\r\n-----END PGP SIGNATURE-----\r\n"
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          },
          {
            "name": "gemwuu",
            "email": "gemwuu@gmail.com"
          },
          {
            "name": "killa07071201",
            "email": "killa123@126.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.1.0_1660111978245_0.2475024772468395"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:12:58.490Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      },
      {
        "name": "gemwuu",
        "email": "gemwuu@gmail.com"
      },
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      }
    ],
    "readme": "ERROR: No README data found!",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "_attachments": {}
  },
  "change": {
    "dist-tag": "latest",
    "version": "1.1.0"
  },
  "time": 1660112009777
}

package:unpublish

{
  "event": "package:unpublish",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "11-32d2cc6fd8d83393dcaf9030559eea4d",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:17:17.043Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      },
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      }
    ],
    "readme": "",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "license": "MIT",
    "_attachments": {}
  },
  "change": {
    "dist-tag": "latest",
    "version": "1.1.0"
  },
  "time": 1660112555203
}

package:owner

{
  "event": "package:owner",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "8-bd881a1f1893df30149e34d217da7a60",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:10:03.499Z"
    },
    "maintainers": [
      {
        "email": "killa07071201@gmail.com",
        "name": "killagu"
      },
      {
        "email": "gemwuu@gmail.com",
        "name": "gemwuu"
      },
      {
        "email": "killa123@126.com",
        "name": "killa07071201"
      }
    ],
    "license": "MIT",
    "readme": "ERROR: No README data found!",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "_attachments": {}
  },
  "change": {
    "maintainer": "gemwuu"
  },
  "time": 1660111992919
}

package:owner-rm

{
  "event": "package:owner-rm",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "10-f2c06b1cc75a7410e45f32ad695752d0",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.1.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      },
      "1.1.0": {
        "name": "killa-test-sync",
        "version": "1.1.0",
        "_id": "killa-test-sync@1.1.0",
        "_nodeVersion": "16.14.2",
        "_npmVersion": "8.5.0",
        "dist": {
          "integrity": "sha512-4KHngevaPv5uyoAtQtnNTdTX+hJMSMyxIlGS+bxBoJi8Try2PhqpQzc/+cI4/2RGyPSAu8ztYaG9ivLSFuYTUQ==",
          "shasum": "0b7bca6e9355e9ab6d313eb988b520d657173dd6",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.1.0.tgz",
          "fileCount": 1,
          "unpackedSize": 54,
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEQCIDtJhGsvwVNx418YRGlm+wI0GGMj24Ia+kHg66EozVV7AiAKQozIir92JLiFkJXM2rSa0nCe4EZ7ckrueeHOPyokkw=="
            }
          ],
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi80xqACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTPA/+OTowANlJyk8MXX2A0TprTotClIHEgHdOP7dglmzPBXQcrRGs\r\nwCoCFwxX26ut6AI5xDWX6vNv0OJyYyycjtEPyn7z/qLMU4QffIu1SpKZ06mB\r\nT66txm+19e7tL+zhnP8kPSsznNjsWM2exoI8Z1jSpBo8MGtgGawiIRP8BOn4\r\n1nB4NhEPT+qgAthfZtrATYAuynk2SN6Xnz8n53i72bfXzTQbCbYSKLdtPJAs\r\nkILLr/hH1Sc77Q4CBUqrOtFKCc1kAxEcDZh/Do6s3jNF82p3zE6/2okjwCDZ\r\n9QJxN1HSoossybZVO8NX7df8gHdI6T3OvsTkCrAQlxErEAw1yzmfeld4lydw\r\niPcNrhONzGOiC0HrbVUVnLPBqIkjvfOrUsofjzMRBtpeS3FP/GRFTIZUEd5y\r\nlnwsiyUNN7HXk3qwZrKO1H/S4pbr9iQe0vkExR4/pzEHkBwHCBUEjBizdZx9\r\nkdXxjBiQJ8JwQ/9WAj/WqzoUcWV155g7BkgjVXDRI1iAbEZhlxCisObyAUMR\r\n5NsKmaLv7U4WJNca743qtpoeUGRNp3icYjviDPVzNRIH3/FqUyoNXDSwd3Rn\r\nm/+qABzX9S1m8xggytieZ5JOjQ79f0i1VpIQ5gapAc/0X2EU60DVYiQ28nTJ\r\nheySPUJKZbSXHy91n6niCXnw4fs6lD/954k=\r\n=bMV5\r\n-----END PGP SIGNATURE-----\r\n"
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          },
          {
            "name": "gemwuu",
            "email": "gemwuu@gmail.com"
          },
          {
            "name": "killa07071201",
            "email": "killa123@126.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.1.0_1660111978245_0.2475024772468395"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:14:48.317Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "email": "killa07071201@gmail.com",
        "name": "killagu"
      },
      {
        "email": "killa123@126.com",
        "name": "killa07071201"
      }
    ],
    "readme": "ERROR: No README data found!",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "_attachments": {}
  },
  "change": {
    "maintainer": "gemwuu"
  },
  "time": 1660112154444
}

package:dist-tag

{
  "event": "package:dist-tag",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "12-f4422dee79d65726a2604e7e0b07a6fe",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0",
      "latest-1": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:20:18.472Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      },
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      }
    ],
    "readme": "",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "license": "MIT",
    "_attachments": {}
  },
  "change": {
    "dist-tag": "latest-1"
  },
  "time": 1660113000055
}

package:dist-tag-rm

{
  "event": "package:dist-tag-rm",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "13-052dc7a31d3248b9d8e2a1282af0aa39",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:28:26.930Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      },
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      }
    ],
    "readme": "",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "license": "MIT",
    "_attachments": {}
  },
  "change": {
    "dist-tag": "latest-1"
  },
  "time": 1660113080089
}

package:deprecated

{
  "event": "package:deprecated",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "14-bcb08e26b50b6bd6246c0d685ef87f09",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false,
        "deprecated": "dep"
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:31:10.783Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      },
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      }
    ],
    "readme": "",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "license": "MIT",
    "_attachments": {}
  },
  "change": {
    "deprecated": "1.0.0"
  },
  "time": 1660113094172
}

package:undeprecated

{
  "event": "package:undeprecated",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "15-2db95c7b239586a5adb174ed6bbb789b",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.0.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:33:56.343Z",
      "1.1.0": "2022-08-10T06:12:58.401Z"
    },
    "maintainers": [
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      },
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      }
    ],
    "readme": "",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "license": "MIT",
    "_attachments": {}
  },
  "change": {
    "deprecated": "1.0.0"
  },
  "time": 1660113320078
}

package:change

{
  "event": "package:change",
  "name": "killa-test-sync",
  "type": "package",
  "version": "1.0.0",
  "hookOwner": {
    "username": "killagu"
  },
  "payload": {
    "_id": "killa-test-sync",
    "_rev": "18-11146c2ea55ce31eaae589ff17932033",
    "name": "killa-test-sync",
    "dist-tags": {
      "latest": "1.2.0",
      "canary": "1.0.0"
    },
    "versions": {
      "1.0.0": {
        "name": "killa-test-sync",
        "version": "1.0.0",
        "description": "",
        "dependencies": {},
        "devDependencies": {},
        "main": "index.js",
        "engines": {
          "node": ">=8.0.0"
        },
        "license": "MIT",
        "_id": "killa-test-sync@1.0.0",
        "_nodeVersion": "12.16.3",
        "_npmVersion": "6.14.4",
        "dist": {
          "integrity": "sha512-vbT8yc6QvskLjjMsDfPAD5QVcQwHEwG1X0hIpsJi+k1QofRuHthPl4cosca6suM1GUW2mQlg7DdvLUOXvggNug==",
          "shasum": "9e720468c652e676d55abf1b7d50a4469a2fb31e",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.0.0.tgz",
          "fileCount": 2,
          "unpackedSize": 306,
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgL2l0CRA9TVsSAnZWagAAvlUP/jAzkqpmgtMbMRpUWvsy\nzm/uwqvHIw1oH9peuWNLpOcQJ9i7iu5JFGcIiG7Z5zj0NvqAOnF5R9KzDYNG\nB/b3WQ15asknPtgIBEtK0SN4jmKfx55WpdFMtiL0rWPk8IQrpoTm/LQgFoxm\n4np5szIWy2v4MO4WuE9+/Tc3vmAbdxN6z7lLR3yVgi2WNhqFh9/nffkR6PuY\nc1w5GvlYdOp7sueRIfyZ7ImwdW/e1ONOZpq/lz1sr2TAI2RcjdSQmMyET1DA\nGR/JIfqs7QizjopWY8NhkxsP0JnHHMUIhtHqwBLg1rQDlxqfTTPzkKThMsR+\nvKONs1wG3vRK/sJzHBpdI+lCLf0p4Q8ynBf1Sf0dc3h27wYKcbx9ammLJCth\n3GznWZ0VHBKtOZES2FvL2zHr2sHUh/EnE8UWgpF4HmJbs5w2VcPC/fKMafOO\n5EjAkP5fuaJuAbslU2zuqD0Mo6jSM1iRyukfVfBwW62rw/xoBRR0djw4GMDz\n6SoclQmImqM0WCSvvjKkjLxSNy68KRU+uPwkETbJTXLghk7UhxPALv9sC0ia\nvUrY5d1w6SShZvsJnv41bBK9afBPxF6VvtAYNbh2vlVN73XF5VJd4AY2VdQR\nTJw9KGNqpDVGLoMIs5C/7LyIG+wmIE/kVgPkAdoHpuYcnUGExMbmqnizQ0Ix\niqwC\r\n=8H3v\r\n-----END PGP SIGNATURE-----\r\n",
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEYCIQCJPp1LKTSwekWLDCvfc7OSXNUPfmmPtB/rk/NBBawObQIhANR+vrd5BeZhic6PIrDGrQeHJhuB4s2ak25VzzvJnSCC"
            }
          ]
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.0.0_1613719923757_0.6563964630164918"
        },
        "_hasShrinkwrap": false
      },
      "1.2.0": {
        "name": "killa-test-sync",
        "version": "1.2.0",
        "_id": "killa-test-sync@1.2.0",
        "_nodeVersion": "16.14.2",
        "_npmVersion": "8.5.0",
        "dist": {
          "integrity": "sha512-ywsfakJrB4HHP2BFAY2xrXdBc1JU0zadF4fPTGEaljivMcTQcsOYiIc+MySKLULHErQAX8LcHFkQb77Knrl6Rg==",
          "shasum": "56bc912e0cad3ce7e342838888c02997297b2a1f",
          "tarball": "https://registry.npmjs.org/killa-test-sync/-/killa-test-sync-1.2.0.tgz",
          "fileCount": 1,
          "unpackedSize": 54,
          "signatures": [
            {
              "keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
              "sig": "MEQCIAY/4r/XaEcR289kjJ9HvJKP4jvZ37JDOZiG5Q0p6Z6GAiBU8ClFyIbctxzi0WBISl/xQrwktiTz9RbgoHSEByaIgQ=="
            }
          ],
          "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJi81JNACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqu7g/8DtLC3mfKRIttZrbXtlXjwancY2TeSDBOIEfLI6KzkMWAuB6z\r\nIQLlLx6vQ2MCVIDxpQNxg/tj7VQkFATQIqxkWlwOc2VYO69HNXJcuV6KqGly\r\n3fn8KfPflbm+2QZJlLFpSSkEIlHmSbpxa0jD4o337niPrPYwJLjCWZfgjyDg\r\noMEgoK1tz+CdlXAfwoivwGCbhSR/P4o3Upj+/TDVGk5ma8gH+yrRxs8AN9Gf\r\nIhmKHzx52UpaeJmX0FDvWb1VIJONND6/UoqJNuibFvK+9tNGw1whJhU0PCFv\r\nyT8OVg0WQ6zM6s/K53XR+WZQLWTUwm7bhfNf5tiG3NMtUJ6UvKtL1nttdsZ0\r\nfqGl7iWl4ADJO8oxY85jkdCVmP07UQ1wZ/IewO4YJX3sYsOh0ZybT2Od5p/0\r\nNDWKYJhe6UIUAtul07qmRp5VPtnjTxIcrdhRw7oYRybt3kZCofWug0oavgHZ\r\nRfsxIKX9ZtB4p+0wpkJN9KdQkXfk+xrE2/3zrdTua1CkCh0njXYL6hLRbYjf\r\nlSwjtsXRFJeui7uFlR5FFAGtP4w/Hgy+4IM+o0ruiNIFmRuGYt7f6n5h+wfF\r\n0kwfq8ghGX9lOBVA5Mv1loYTXa9bzr4N3SuMlDx6qW5MqpRDrul1UEeyiNQg\r\nb/v9KOf4uLurhx1hqm6Hm0bRycT3eH02UeA=\r\n=U0Z1\r\n-----END PGP SIGNATURE-----\r\n"
        },
        "_npmUser": {
          "name": "killagu",
          "email": "killa07071201@gmail.com"
        },
        "directories": {},
        "maintainers": [
          {
            "name": "killagu",
            "email": "killa07071201@gmail.com"
          },
          {
            "name": "killa07071201",
            "email": "killa123@126.com"
          }
        ],
        "_npmOperationalInternal": {
          "host": "s3://npm-registry-packages",
          "tmp": "tmp/killa-test-sync_1.2.0_1660113485839_0.12422532348757587"
        },
        "_hasShrinkwrap": false
      }
    },
    "time": {
      "created": "2021-02-19T07:32:03.757Z",
      "1.0.0": "2021-02-19T07:32:03.924Z",
      "modified": "2022-08-10T06:40:17.758Z",
      "1.1.0": "2022-08-10T06:12:58.401Z",
      "1.2.0": "2022-08-10T06:38:05.957Z"
    },
    "maintainers": [
      {
        "name": "killa07071201",
        "email": "killa123@126.com"
      },
      {
        "name": "killagu",
        "email": "killa07071201@gmail.com"
      }
    ],
    "readme": "ERROR: No README data found!",
    "readmeFilename": "",
    "users": {
      "killagu": true
    },
    "_attachments": {}
  },
  "change": {},
  "time": 1660113755142
}
elrrrrrrr commented 2 years ago

package 可能来自多个 registry,根路径是否考虑添加一下 packageId 字段?

elrrrrrrr commented 2 years ago

https://github.com/npm/registry/blob/master/docs/hooks/hooks-payload.md

payload 默认返回全量信息,需要在 post 请求体的时候先判断一下 body 大小加个限制吗?

killagu commented 2 years ago

package 可能来自多个 registry,根路径是否考虑添加一下 packageId 字段?

虽然会有多 registry 同步的问题,但是一个 registry 中 name 一定是唯一的,否则会有同名攻击。

payload 默认返回全量信息,需要在 post 请求体的时候先判断一下 body 大小加个限制吗?

这个暂时不考虑,未来可以在读取的时候做这个限制。