chore(dependency): update fomantic-ui to v2.9.3
This commit is contained in:
parent
d4489ec7af
commit
dc93c34819
601 changed files with 25613 additions and 219642 deletions
51
node_modules/.yarn-integrity
generated
vendored
51
node_modules/.yarn-integrity
generated
vendored
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"systemParams": "win32-x64-115",
|
||||
"systemParams": "win32-x64-120",
|
||||
"modulesFolders": [
|
||||
"node_modules"
|
||||
],
|
||||
|
@ -8,7 +8,7 @@
|
|||
"topLevelPatterns": [
|
||||
"@fontsource/atkinson-hyperlegible@^4.5.9",
|
||||
"@fontsource/raleway@^4.5.10",
|
||||
"fomantic-ui@^2.9.0",
|
||||
"fomantic-ui@^2.9.3",
|
||||
"html2canvas@^1.4.1"
|
||||
],
|
||||
"lockfileEntries": {
|
||||
|
@ -20,30 +20,27 @@
|
|||
"@nodelib/fs.stat@2.0.5": "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b",
|
||||
"@nodelib/fs.stat@^2.0.2": "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b",
|
||||
"@nodelib/fs.walk@^1.2.3": "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a",
|
||||
"@octokit/auth-token@^2.4.0": "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36",
|
||||
"@octokit/auth-token@^2.4.4": "https://registry.yarnpkg.com/@octokit/auth-token/-/auth-token-2.5.0.tgz#27c37ea26c205f28443402477ffd261311f21e36",
|
||||
"@octokit/core@^3.5.1": "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085",
|
||||
"@octokit/core@^3.6.0": "https://registry.yarnpkg.com/@octokit/core/-/core-3.6.0.tgz#3376cb9f3008d9b3d110370d90e0a1fcd5fe6085",
|
||||
"@octokit/endpoint@^6.0.1": "https://registry.yarnpkg.com/@octokit/endpoint/-/endpoint-6.0.12.tgz#3b4d47a4b0e79b1027fb8d75d4221928b2d05658",
|
||||
"@octokit/graphql@^4.5.8": "https://registry.yarnpkg.com/@octokit/graphql/-/graphql-4.8.0.tgz#664d9b11c0e12112cbf78e10f49a05959aa22cc3",
|
||||
"@octokit/openapi-types@^12.11.0": "https://registry.yarnpkg.com/@octokit/openapi-types/-/openapi-types-12.11.0.tgz#da5638d64f2b919bca89ce6602d059f1b52d3ef0",
|
||||
"@octokit/plugin-paginate-rest@^1.1.1": "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-1.1.2.tgz#004170acf8c2be535aba26727867d692f7b488fc",
|
||||
"@octokit/plugin-request-log@^1.0.0": "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85",
|
||||
"@octokit/plugin-rest-endpoint-methods@2.4.0": "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-2.4.0.tgz#3288ecf5481f68c494dd0602fc15407a59faf61e",
|
||||
"@octokit/request-error@^1.0.2": "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-1.2.1.tgz#ede0714c773f32347576c25649dc013ae6b31801",
|
||||
"@octokit/plugin-paginate-rest@^2.16.8": "https://registry.yarnpkg.com/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.21.3.tgz#7f12532797775640dbb8224da577da7dc210c87e",
|
||||
"@octokit/plugin-request-log@^1.0.4": "https://registry.yarnpkg.com/@octokit/plugin-request-log/-/plugin-request-log-1.0.4.tgz#5e50ed7083a613816b1e4a28aeec5fb7f1462e85",
|
||||
"@octokit/plugin-rest-endpoint-methods@^5.12.0": "https://registry.yarnpkg.com/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-5.16.2.tgz#7ee8bf586df97dd6868cf68f641354e908c25342",
|
||||
"@octokit/request-error@^2.0.5": "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677",
|
||||
"@octokit/request-error@^2.1.0": "https://registry.yarnpkg.com/@octokit/request-error/-/request-error-2.1.0.tgz#9e150357831bfc788d13a4fd4b1913d60c74d677",
|
||||
"@octokit/request@^5.2.0": "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0",
|
||||
"@octokit/request@^5.6.0": "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0",
|
||||
"@octokit/request@^5.6.3": "https://registry.yarnpkg.com/@octokit/request/-/request-5.6.3.tgz#19a022515a5bba965ac06c9d1334514eb50c48b0",
|
||||
"@octokit/rest@^16.16.0": "https://registry.yarnpkg.com/@octokit/rest/-/rest-16.43.2.tgz#c53426f1e1d1044dee967023e3279c50993dd91b",
|
||||
"@octokit/types@^2.0.0": "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2",
|
||||
"@octokit/types@^2.0.1": "https://registry.yarnpkg.com/@octokit/types/-/types-2.16.2.tgz#4c5f8da3c6fecf3da1811aef678fda03edac35d2",
|
||||
"@octokit/rest@^18.12.0": "https://registry.yarnpkg.com/@octokit/rest/-/rest-18.12.0.tgz#f06bc4952fc87130308d810ca9d00e79f6988881",
|
||||
"@octokit/types@^6.0.3": "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04",
|
||||
"@octokit/types@^6.16.1": "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04",
|
||||
"@octokit/types@^6.39.0": "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04",
|
||||
"@octokit/types@^6.40.0": "https://registry.yarnpkg.com/@octokit/types/-/types-6.41.0.tgz#e58ef78d78596d2fb7df9c6259802464b5f84a04",
|
||||
"@one-ini/wasm@0.1.1": "https://registry.yarnpkg.com/@one-ini/wasm/-/wasm-0.1.1.tgz#6013659736c9dbfccc96e8a9c2b3de317df39323",
|
||||
"@types/expect@^1.20.4": "https://registry.yarnpkg.com/@types/expect/-/expect-1.20.4.tgz#8288e51737bf7e3ab5d7c77bfa695883745264e5",
|
||||
"@types/node@*": "https://registry.yarnpkg.com/@types/node/-/node-20.5.0.tgz#7fc8636d5f1aaa3b21e6245e97d56b7f56702313",
|
||||
"@types/node@>= 8": "https://registry.yarnpkg.com/@types/node/-/node-20.5.0.tgz#7fc8636d5f1aaa3b21e6245e97d56b7f56702313",
|
||||
"@types/vinyl@^2.0.4": "https://registry.yarnpkg.com/@types/vinyl/-/vinyl-2.0.7.tgz#9739a9a2afaf9af32761c54a0e82c735279f726c",
|
||||
"abbrev@^1.0.0": "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8",
|
||||
"aggregate-error@^3.0.0": "https://registry.yarnpkg.com/aggregate-error/-/aggregate-error-3.1.0.tgz#92670ff50f5359bdb7a3e0d40d0ec30c5737687a",
|
||||
|
@ -93,7 +90,6 @@
|
|||
"async-each@^1.0.1": "https://registry.yarnpkg.com/async-each/-/async-each-1.0.6.tgz#52f1d9403818c179b7561e11a5d1b77eb2160e77",
|
||||
"async-settle@^1.0.0": "https://registry.yarnpkg.com/async-settle/-/async-settle-1.0.0.tgz#1d0a914bb02575bec8a8f3a74e5080f72b2c0c6b",
|
||||
"async@^1.2.1": "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a",
|
||||
"atob-lite@^2.0.0": "https://registry.yarnpkg.com/atob-lite/-/atob-lite-2.0.0.tgz#0fef5ad46f1bd7a8502c65727f0367d5ee43d696",
|
||||
"atob@^2.1.2": "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9",
|
||||
"autoprefixer@^10.2.6": "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.15.tgz#a1230f4aeb3636b89120b34a1f513e2f6834d530",
|
||||
"bach@^1.0.0": "https://registry.yarnpkg.com/bach/-/bach-1.2.0.tgz#4b3ce96bf27134f79a1b414a51c14e34c3bd9880",
|
||||
|
@ -102,7 +98,6 @@
|
|||
"base64-js@^1.3.1": "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a",
|
||||
"base@^0.11.1": "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f",
|
||||
"beeper@^1.0.0": "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809",
|
||||
"before-after-hook@^2.0.0": "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c",
|
||||
"before-after-hook@^2.2.0": "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c",
|
||||
"better-console@^1.0.1": "https://registry.yarnpkg.com/better-console/-/better-console-1.0.1.tgz#9a3361f9f45cdafaffa5d87d62fd49b7f8dbf32b",
|
||||
"binary-extensions@^1.0.0": "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65",
|
||||
|
@ -116,7 +111,6 @@
|
|||
"braces@^3.0.2": "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107",
|
||||
"browserslist@^4.21.10": "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0",
|
||||
"browserslist@^4.21.4": "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0",
|
||||
"btoa-lite@^1.0.0": "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337",
|
||||
"buffer-equal@^1.0.0": "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.1.tgz#2f7651be5b1b3f057fcd6e7ee16cf34767077d90",
|
||||
"buffer-from@^1.0.0": "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5",
|
||||
"buffer@^5.5.0": "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0",
|
||||
|
@ -167,7 +161,6 @@
|
|||
"copy-descriptor@^0.1.0": "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d",
|
||||
"copy-props@^2.0.1": "https://registry.yarnpkg.com/copy-props/-/copy-props-2.0.5.tgz#03cf9ae328d4ebb36f8f1d804448a6af9ee3f2d2",
|
||||
"core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85",
|
||||
"cross-spawn@^6.0.0": "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4",
|
||||
"css-line-break@^2.1.0": "https://registry.yarnpkg.com/css-line-break/-/css-line-break-2.1.0.tgz#bfef660dfa6f5397ea54116bb3cb4873edbc4fa0",
|
||||
"css@^2.0.0": "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929",
|
||||
"d@1": "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a",
|
||||
|
@ -217,7 +210,6 @@
|
|||
"escape-string-regexp@^1.0.2": "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4",
|
||||
"escape-string-regexp@^1.0.3": "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4",
|
||||
"escape-string-regexp@^1.0.5": "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4",
|
||||
"execa@^1.0.0": "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8",
|
||||
"expand-brackets@^2.1.4": "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622",
|
||||
"expand-tilde@^2.0.0": "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502",
|
||||
"expand-tilde@^2.0.2": "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502",
|
||||
|
@ -248,7 +240,7 @@
|
|||
"first-chunk-stream@^2.0.0": "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-2.0.0.tgz#1bdecdb8e083c0664b91945581577a43a9f31d70",
|
||||
"flagged-respawn@^1.0.0": "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.1.tgz#e7de6f1279ddd9ca9aac8a5971d618606b3aab41",
|
||||
"flush-write-stream@^1.0.2": "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.1.1.tgz#8dd7d873a1babc207d94ead0c2e0e44276ebf2e8",
|
||||
"fomantic-ui@^2.9.0": "https://registry.yarnpkg.com/fomantic-ui/-/fomantic-ui-2.9.2.tgz#a1b353127dce9f75c80b411d08b00e896d523021",
|
||||
"fomantic-ui@^2.9.3": "https://registry.yarnpkg.com/fomantic-ui/-/fomantic-ui-2.9.3.tgz#d0300742c543ede6446e1ecc554711c37f89ce01",
|
||||
"for-in@^1.0.1": "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80",
|
||||
"for-in@^1.0.2": "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80",
|
||||
"for-own@^1.0.0": "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b",
|
||||
|
@ -263,7 +255,6 @@
|
|||
"get-imports@^1.0.0": "https://registry.yarnpkg.com/get-imports/-/get-imports-1.0.0.tgz#47c0b4ee989351642c54977193bf4fcaabf5378f",
|
||||
"get-intrinsic@^1.0.2": "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82",
|
||||
"get-intrinsic@^1.1.1": "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82",
|
||||
"get-stream@^4.0.0": "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5",
|
||||
"get-value@^2.0.3": "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28",
|
||||
"get-value@^2.0.6": "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28",
|
||||
"glob-parent@^3.1.0": "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae",
|
||||
|
@ -381,7 +372,6 @@
|
|||
"is-plain-object@^2.0.4": "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677",
|
||||
"is-plain-object@^5.0.0": "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-5.0.0.tgz#4427f50ab3429e9025ea7d52e9043a9ef4159344",
|
||||
"is-relative@^1.0.0": "https://registry.yarnpkg.com/is-relative/-/is-relative-1.0.0.tgz#a1bb6935ce8c5dba1e8b9754b9b2dcc020e2260d",
|
||||
"is-stream@^1.1.0": "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44",
|
||||
"is-unc-path@^1.0.0": "https://registry.yarnpkg.com/is-unc-path/-/is-unc-path-1.0.0.tgz#d731e8898ed090a12c352ad2eaed5095ad322c9d",
|
||||
"is-unicode-supported@^0.1.0": "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7",
|
||||
"is-utf8@^0.2.0": "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72",
|
||||
|
@ -415,6 +405,7 @@
|
|||
"lazystream@^1.0.0": "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.1.tgz#494c831062f1f9408251ec44db1cba29242a2638",
|
||||
"lcid@^1.0.0": "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835",
|
||||
"lead@^1.0.0": "https://registry.yarnpkg.com/lead/-/lead-1.0.0.tgz#6f14f99a37be3a9dd784f5495690e5903466ee42",
|
||||
"less@^3.12.0 || ^4.0.0": "https://registry.yarnpkg.com/less/-/less-4.2.0.tgz#cbefbfaa14a4cd388e2099b2b51f956e1465c450",
|
||||
"less@^3.7.1 || ^4.0.0": "https://registry.yarnpkg.com/less/-/less-4.2.0.tgz#cbefbfaa14a4cd388e2099b2b51f956e1465c450",
|
||||
"liftoff@^3.1.0": "https://registry.yarnpkg.com/liftoff/-/liftoff-3.1.0.tgz#c9ba6081f908670607ee79062d700df062c52ed3",
|
||||
"load-json-file@^1.0.0": "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0",
|
||||
|
@ -438,24 +429,20 @@
|
|||
"lodash.defaults@^3.0.0": "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-3.1.2.tgz#c7308b18dbf8bc9372d701a73493c61192bd2e2c",
|
||||
"lodash.defaults@~2.4.1": "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-2.4.1.tgz#a7e8885f05e68851144b6e12a8f3678026bc4c54",
|
||||
"lodash.escape@^3.0.0": "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698",
|
||||
"lodash.get@^4.4.2": "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99",
|
||||
"lodash.isarguments@^3.0.0": "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a",
|
||||
"lodash.isarray@^3.0.0": "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55",
|
||||
"lodash.isobject@~2.4.1": "https://registry.yarnpkg.com/lodash.isobject/-/lodash.isobject-2.4.1.tgz#5a2e47fe69953f1ee631a7eba1fe64d2d06558f5",
|
||||
"lodash.keys@^3.0.0": "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a",
|
||||
"lodash.keys@~2.4.1": "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-2.4.1.tgz#48dea46df8ff7632b10d706b8acb26591e2b3727",
|
||||
"lodash.restparam@^3.0.0": "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805",
|
||||
"lodash.set@^4.3.2": "https://registry.yarnpkg.com/lodash.set/-/lodash.set-4.3.2.tgz#d8757b1da807dde24816b0d6a84bea1a76230b23",
|
||||
"lodash.template@^3.0.0": "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f",
|
||||
"lodash.template@^4.4.0": "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab",
|
||||
"lodash.template@^4.5.0": "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab",
|
||||
"lodash.templatesettings@^3.0.0": "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5",
|
||||
"lodash.templatesettings@^4.0.0": "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33",
|
||||
"lodash.uniq@^4.5.0": "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773",
|
||||
"lodash@^4.17.21": "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c",
|
||||
"log-symbols@^4.1.0": "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.1.0.tgz#3fbdbb95b4683ac9fc785111e792e558d4abd503",
|
||||
"lru-cache@^6.0.0": "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94",
|
||||
"macos-release@^2.2.0": "https://registry.yarnpkg.com/macos-release/-/macos-release-2.5.1.tgz#bccac4a8f7b93163a8d163b8ebf385b3c5f55bf9",
|
||||
"make-dir@^2.1.0": "https://registry.yarnpkg.com/make-dir/-/make-dir-2.1.0.tgz#5f0310e18b8be898cc07009295a30ae41e91e6f5",
|
||||
"make-error-cause@^1.1.1": "https://registry.yarnpkg.com/make-error-cause/-/make-error-cause-1.2.2.tgz#df0388fcd0b37816dff0a5fb8108939777dcbc9d",
|
||||
"make-error@^1.2.0": "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2",
|
||||
|
@ -494,7 +481,6 @@
|
|||
"nanomatch@^1.2.9": "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119",
|
||||
"needle@^3.1.0": "https://registry.yarnpkg.com/needle/-/needle-3.2.0.tgz#07d240ebcabfd65c76c03afae7f6defe6469df44",
|
||||
"next-tick@^1.1.0": "https://registry.yarnpkg.com/next-tick/-/next-tick-1.1.0.tgz#1836ee30ad56d67ef281b22bd199f709449b35eb",
|
||||
"nice-try@^1.0.4": "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366",
|
||||
"node-fetch@^2.6.7": "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.12.tgz#02eb8e22074018e3d5a83016649d04df0e348fba",
|
||||
"node-releases@^2.0.13": "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d",
|
||||
"nopt@^6.0.0": "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d",
|
||||
|
@ -503,7 +489,6 @@
|
|||
"normalize-path@^3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65",
|
||||
"normalize-range@^0.1.2": "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942",
|
||||
"now-and-later@^2.0.0": "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.1.tgz#8e579c8685764a7cc02cb680380e94f43ccb1f7c",
|
||||
"npm-run-path@^2.0.0": "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f",
|
||||
"number-is-nan@^1.0.0": "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d",
|
||||
"object-assign@^3.0.0": "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2",
|
||||
"object-assign@^4.0.1": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863",
|
||||
|
@ -518,7 +503,6 @@
|
|||
"object.pick@^1.2.0": "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747",
|
||||
"object.pick@^1.3.0": "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747",
|
||||
"object.reduce@^1.0.0": "https://registry.yarnpkg.com/object.reduce/-/object.reduce-1.0.1.tgz#6fe348f2ac7fa0f95ca621226599096825bb03ad",
|
||||
"octokit-pagination-methods@^1.1.0": "https://registry.yarnpkg.com/octokit-pagination-methods/-/octokit-pagination-methods-1.1.0.tgz#cf472edc9d551055f9ef73f6e42b4dbb4c80bea4",
|
||||
"once@^1.3.0": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1",
|
||||
"once@^1.3.1": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1",
|
||||
"once@^1.3.2": "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1",
|
||||
|
@ -527,9 +511,7 @@
|
|||
"ora@^5.4.1": "https://registry.yarnpkg.com/ora/-/ora-5.4.1.tgz#1b2678426af4ac4a509008e5e4ac9e9959db9e18",
|
||||
"ordered-read-streams@^1.0.0": "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e",
|
||||
"os-locale@^1.4.0": "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9",
|
||||
"os-name@^3.1.0": "https://registry.yarnpkg.com/os-name/-/os-name-3.1.0.tgz#dec19d966296e1cd62d701a5a66ee1ddeae70801",
|
||||
"os-tmpdir@~1.0.2": "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274",
|
||||
"p-finally@^1.0.0": "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae",
|
||||
"p-limit@^3.0.2": "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b",
|
||||
"p-locate@^5.0.0": "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834",
|
||||
"p-map@^4.0.0": "https://registry.yarnpkg.com/p-map/-/p-map-4.0.0.tgz#bb2f95a5eda2ec168ec9274e06a747c3e2904d2b",
|
||||
|
@ -544,8 +526,6 @@
|
|||
"path-exists@^2.0.0": "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b",
|
||||
"path-exists@^4.0.0": "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3",
|
||||
"path-is-absolute@^1.0.0": "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
|
||||
"path-key@^2.0.0": "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40",
|
||||
"path-key@^2.0.1": "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40",
|
||||
"path-parse@^1.0.7": "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735",
|
||||
"path-root-regex@^0.1.0": "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d",
|
||||
"path-root@^0.1.1": "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7",
|
||||
|
@ -572,7 +552,6 @@
|
|||
"proto-list@~1.2.1": "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849",
|
||||
"prr@~1.0.1": "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476",
|
||||
"pump@^2.0.0": "https://registry.yarnpkg.com/pump/-/pump-2.0.1.tgz#12399add6e4cf7526d973cbc8b5ce2e2908b3909",
|
||||
"pump@^3.0.0": "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64",
|
||||
"pumpify@^1.3.5": "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce",
|
||||
"queue-microtask@^1.2.2": "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.3.tgz#4929228bbc724dfac43e0efb058caf7b6cfb6243",
|
||||
"read-pkg-up@^1.0.1": "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02",
|
||||
|
@ -643,15 +622,11 @@
|
|||
"sax@^1.2.4": "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9",
|
||||
"semver-greatest-satisfied-range@^1.1.0": "https://registry.yarnpkg.com/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz#13e8c2658ab9691cb0cd71093240280d36f77a5b",
|
||||
"semver@2 || 3 || 4 || 5": "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8",
|
||||
"semver@^5.5.0": "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8",
|
||||
"semver@^5.6.0": "https://registry.yarnpkg.com/semver/-/semver-5.7.2.tgz#48d55db737c3287cd4835e17fa13feace1c41ef8",
|
||||
"semver@^7.5.3": "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e",
|
||||
"set-blocking@^2.0.0": "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7",
|
||||
"set-value@^2.0.0": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b",
|
||||
"set-value@^2.0.1": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b",
|
||||
"shebang-command@^1.2.0": "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea",
|
||||
"shebang-regex@^1.0.0": "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3",
|
||||
"signal-exit@^3.0.0": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9",
|
||||
"signal-exit@^3.0.2": "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9",
|
||||
"slash@^3.0.0": "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634",
|
||||
"snapdragon-node@^2.0.1": "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b",
|
||||
|
@ -691,7 +666,6 @@
|
|||
"strip-bom-buf@^1.0.0": "https://registry.yarnpkg.com/strip-bom-buf/-/strip-bom-buf-1.0.0.tgz#1cb45aaf57530f4caf86c7f75179d2c9a51dd572",
|
||||
"strip-bom-stream@^3.0.0": "https://registry.yarnpkg.com/strip-bom-stream/-/strip-bom-stream-3.0.0.tgz#956bcc5d84430f69256a90ed823765cd858e159c",
|
||||
"strip-bom@^2.0.0": "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e",
|
||||
"strip-eof@^1.0.0": "https://registry.yarnpkg.com/strip-eof/-/strip-eof-1.0.0.tgz#bb43ff5598a6eb05d89b59fcd129c983313606bf",
|
||||
"strip-json-comments@^3.1.1": "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006",
|
||||
"supports-color@^2.0.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7",
|
||||
"supports-color@^7.1.0": "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da",
|
||||
|
@ -736,7 +710,6 @@
|
|||
"undertaker@^1.2.1": "https://registry.yarnpkg.com/undertaker/-/undertaker-1.3.0.tgz#363a6e541f27954d5791d6fa3c1d321666f86d18",
|
||||
"union-value@^1.0.0": "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847",
|
||||
"unique-stream@^2.0.2": "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.3.1.tgz#c65d110e9a4adf9a6c5948b28053d9a8d04cbeac",
|
||||
"universal-user-agent@^4.0.0": "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-4.0.1.tgz#fd8d6cb773a679a709e967ef8288a31fcc03e557",
|
||||
"universal-user-agent@^6.0.0": "https://registry.yarnpkg.com/universal-user-agent/-/universal-user-agent-6.0.0.tgz#3381f8503b251c0d9cd21bc1de939ec9df5480ee",
|
||||
"unset-value@^1.0.0": "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559",
|
||||
"upath@^1.1.1": "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894",
|
||||
|
@ -766,8 +739,6 @@
|
|||
"whatwg-url@^5.0.0": "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d",
|
||||
"which-module@^1.0.0": "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f",
|
||||
"which@^1.2.14": "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a",
|
||||
"which@^1.2.9": "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a",
|
||||
"windows-release@^3.1.0": "https://registry.yarnpkg.com/windows-release/-/windows-release-3.3.3.tgz#1c10027c7225743eec6b89df160d64c2e0293999",
|
||||
"wrap-ansi@^2.0.0": "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85",
|
||||
"wrap-ansi@^6.0.1": "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz#e9393ba07102e6c91a3b221478f0257cd2856e53",
|
||||
"wrappy@1": "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f",
|
||||
|
|
180
node_modules/@octokit/plugin-paginate-rest/README.md
generated
vendored
180
node_modules/@octokit/plugin-paginate-rest/README.md
generated
vendored
|
@ -4,7 +4,6 @@
|
|||
|
||||
[![@latest](https://img.shields.io/npm/v/@octokit/plugin-paginate-rest.svg)](https://www.npmjs.com/package/@octokit/plugin-paginate-rest)
|
||||
[![Build Status](https://github.com/octokit/plugin-paginate-rest.js/workflows/Test/badge.svg)](https://github.com/octokit/plugin-paginate-rest.js/actions?workflow=Test)
|
||||
[![Greenkeeper](https://badges.greenkeeper.io/octokit/plugin-paginate-rest.js.svg)](https://greenkeeper.io/)
|
||||
|
||||
## Usage
|
||||
|
||||
|
@ -14,12 +13,15 @@
|
|||
Browsers
|
||||
</th><td width=100%>
|
||||
|
||||
Load `@octokit/plugin-paginate-rest` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.pika.dev](https://cdn.pika.dev)
|
||||
Load `@octokit/plugin-paginate-rest` and [`@octokit/core`](https://github.com/octokit/core.js) (or core-compatible module) directly from [cdn.skypack.dev](https://cdn.skypack.dev)
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
import { Octokit } from "https://cdn.pika.dev/@octokit/core";
|
||||
import { paginateRest } from "https://cdn.pika.dev/@octokit/plugin-paginate-rest";
|
||||
import { Octokit } from "https://cdn.skypack.dev/@octokit/core";
|
||||
import {
|
||||
paginateRest,
|
||||
composePaginateRest,
|
||||
} from "https://cdn.skypack.dev/@octokit/plugin-paginate-rest";
|
||||
</script>
|
||||
```
|
||||
|
||||
|
@ -32,7 +34,10 @@ Install with `npm install @octokit/core @octokit/plugin-paginate-rest`. Optional
|
|||
|
||||
```js
|
||||
const { Octokit } = require("@octokit/core");
|
||||
const { paginateRest } = require("@octokit/plugin-paginate-rest");
|
||||
const {
|
||||
paginateRest,
|
||||
composePaginateRest,
|
||||
} = require("@octokit/plugin-paginate-rest");
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
|
@ -44,15 +49,31 @@ const MyOctokit = Octokit.plugin(paginateRest);
|
|||
const octokit = new MyOctokit({ auth: "secret123" });
|
||||
|
||||
// See https://developer.github.com/v3/issues/#list-issues-for-a-repository
|
||||
const issues = await octokit.paginate("GET /repos/:owner/:repo/issues", {
|
||||
const issues = await octokit.paginate("GET /repos/{owner}/{repo}/issues", {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100
|
||||
per_page: 100,
|
||||
});
|
||||
```
|
||||
|
||||
## `octokit.paginate(route, parameters, mapFunction)` or `octokit.paginate(options, mapFunction)`
|
||||
If you want to utilize the pagination methods in another plugin, use `composePaginateRest`.
|
||||
|
||||
```js
|
||||
function myPlugin(octokit, options) {
|
||||
return {
|
||||
allStars({owner, repo}) => {
|
||||
return composePaginateRest(
|
||||
octokit,
|
||||
"GET /repos/{owner}/{repo}/stargazers",
|
||||
{owner, repo }
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## `octokit.paginate()`
|
||||
|
||||
The `paginateRest` plugin adds a new `octokit.paginate()` method which accepts the same parameters as [`octokit.request`](https://github.com/octokit/request.js#request). Only "List ..." endpoints such as [List issues for a repository](https://developer.github.com/v3/issues/#list-issues-for-a-repository) are supporting pagination. Their [response includes a Link header](https://developer.github.com/v3/issues/#response-1). For other endpoints, `octokit.paginate()` behaves the same as `octokit.request()`.
|
||||
|
||||
|
@ -62,14 +83,14 @@ An optional `mapFunction` can be passed to map each page response to a new value
|
|||
|
||||
```js
|
||||
const issueTitles = await octokit.paginate(
|
||||
"GET /repos/:owner/:repo/issues",
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
{
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100
|
||||
per_page: 100,
|
||||
},
|
||||
response => response.data.map(issue => issue.title)
|
||||
(response) => response.data.map((issue) => issue.title)
|
||||
);
|
||||
```
|
||||
|
||||
|
@ -77,15 +98,15 @@ The `mapFunction` gets a 2nd argument `done` which can be called to end the pagi
|
|||
|
||||
```js
|
||||
const issues = await octokit.paginate(
|
||||
"GET /repos/:owner/:repo/issues",
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
{
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100
|
||||
per_page: 100,
|
||||
},
|
||||
(response, done) => {
|
||||
if (response.data.find(issues => issue.title.includes("something"))) {
|
||||
if (response.data.find((issue) => issue.title.includes("something"))) {
|
||||
done();
|
||||
}
|
||||
return response.data;
|
||||
|
@ -93,28 +114,66 @@ const issues = await octokit.paginate(
|
|||
);
|
||||
```
|
||||
|
||||
## `octokit.paginate.iterator(route, parameters)` or `octokit.paginate.iterator(options)`
|
||||
Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/):
|
||||
|
||||
```js
|
||||
const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
});
|
||||
```
|
||||
|
||||
## `octokit.paginate.iterator()`
|
||||
|
||||
If your target runtime environments supports async iterators (such as most modern browsers and Node 10+), you can iterate through each response
|
||||
|
||||
```js
|
||||
const parameters = {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100
|
||||
}
|
||||
for await (const response of octokit.paginate.iterator("GET /repos/:owner/:repo/issues", parameters)) {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
};
|
||||
for await (const response of octokit.paginate.iterator(
|
||||
"GET /repos/{owner}/{repo}/issues",
|
||||
parameters
|
||||
)) {
|
||||
// do whatever you want with each response, break out of the loop, etc.
|
||||
console.log(response.data.title)
|
||||
const issues = response.data;
|
||||
console.log("%d issues found", issues.length);
|
||||
}
|
||||
```
|
||||
|
||||
Alternatively you can pass a `request` method as first argument. This is great when using in combination with [`@octokit/plugin-rest-endpoint-methods`](https://github.com/octokit/plugin-rest-endpoint-methods.js/):
|
||||
|
||||
```js
|
||||
const parameters = {
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
since: "2010-10-01",
|
||||
per_page: 100,
|
||||
};
|
||||
for await (const response of octokit.paginate.iterator(
|
||||
octokit.rest.issues.listForRepo,
|
||||
parameters
|
||||
)) {
|
||||
// do whatever you want with each response, break out of the loop, etc.
|
||||
const issues = response.data;
|
||||
console.log("%d issues found", issues.length);
|
||||
}
|
||||
```
|
||||
|
||||
## `composePaginateRest` and `composePaginateRest.iterator`
|
||||
|
||||
The `compose*` methods work just like their `octokit.*` counterparts described above, with the differenct that both methods require an `octokit` instance to be passed as first argument
|
||||
|
||||
## How it works
|
||||
|
||||
`octokit.paginate()` wraps `octokit.request()`. As long as a `rel="next"` link value is present in the response's `Link` header, it sends another request for that URL, and so on.
|
||||
|
||||
Most of GitHub's paginating REST API endpoints return an array, but there are a few exceptions which return an object with a key that includes the items array.
|
||||
Most of GitHub's paginating REST API endpoints return an array, but there are a few exceptions which return an object with a key that includes the items array. For example:
|
||||
|
||||
- [Search repositories](https://developer.github.com/v3/search/#example) (key `items`)
|
||||
- [List check runs for a specific ref](https://developer.github.com/v3/checks/runs/#response-3) (key: `check_runs`)
|
||||
|
@ -126,6 +185,81 @@ Most of GitHub's paginating REST API endpoints return an array, but there are a
|
|||
|
||||
If a response is lacking the `Link` header, `octokit.paginate()` still resolves with an array, even if the response returns a single object.
|
||||
|
||||
## Types
|
||||
|
||||
The plugin also exposes some types and runtime type guards for TypeScript projects.
|
||||
|
||||
<table>
|
||||
<tbody valign=top align=left>
|
||||
<tr><th>
|
||||
Types
|
||||
</th><td>
|
||||
|
||||
```typescript
|
||||
import {
|
||||
PaginateInterface,
|
||||
PaginatingEndpoints,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
<tr><th>
|
||||
Guards
|
||||
</th><td>
|
||||
|
||||
```typescript
|
||||
import { isPaginatingEndpoint } from "@octokit/plugin-paginate-rest";
|
||||
```
|
||||
|
||||
</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
### PaginateInterface
|
||||
|
||||
An `interface` that declares all the overloads of the `.paginate` method.
|
||||
|
||||
### PaginatingEndpoints
|
||||
|
||||
An `interface` which describes all API endpoints supported by the plugin. Some overloads of `.paginate()` method and `composePaginateRest()` function depend on `PaginatingEndpoints`, using the `keyof PaginatingEndpoints` as a type for one of its arguments.
|
||||
|
||||
```typescript
|
||||
import { Octokit } from "@octokit/core";
|
||||
import {
|
||||
PaginatingEndpoints,
|
||||
composePaginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
|
||||
type DataType<T> = "data" extends keyof T ? T["data"] : unknown;
|
||||
|
||||
async function myPaginatePlugin<E extends keyof PaginatingEndpoints>(
|
||||
octokit: Octokit,
|
||||
endpoint: E,
|
||||
parameters?: PaginatingEndpoints[E]["parameters"]
|
||||
): Promise<DataType<PaginatingEndpoints[E]["response"]>> {
|
||||
return await composePaginateRest(octokit, endpoint, parameters);
|
||||
}
|
||||
```
|
||||
|
||||
### isPaginatingEndpoint
|
||||
|
||||
A type guard, `isPaginatingEndpoint(arg)` returns `true` if `arg` is one of the keys in `PaginatingEndpoints` (is `keyof PaginatingEndpoints`).
|
||||
|
||||
```typescript
|
||||
import { Octokit } from "@octokit/core";
|
||||
import {
|
||||
isPaginatingEndpoint,
|
||||
composePaginateRest,
|
||||
} from "@octokit/plugin-paginate-rest";
|
||||
|
||||
async function myPlugin(octokit: Octokit, arg: unknown) {
|
||||
if (isPaginatingEndpoint(arg)) {
|
||||
return await composePaginateRest(octokit, arg);
|
||||
}
|
||||
// ...
|
||||
}
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md)
|
||||
|
|
141
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js
generated
vendored
141
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map
generated
vendored
2
node_modules/@octokit/plugin-paginate-rest/dist-node/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
6
node_modules/@octokit/plugin-paginate-rest/dist-src/index.js
generated
vendored
6
node_modules/@octokit/plugin-paginate-rest/dist-src/index.js
generated
vendored
|
@ -1,6 +1,8 @@
|
|||
import { VERSION } from "./version";
|
||||
import { paginate } from "./paginate";
|
||||
import { iterator } from "./iterator";
|
||||
export { composePaginateRest } from "./compose-paginate";
|
||||
export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints";
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
|
@ -8,8 +10,8 @@ import { iterator } from "./iterator";
|
|||
export function paginateRest(octokit) {
|
||||
return {
|
||||
paginate: Object.assign(paginate.bind(null, octokit), {
|
||||
iterator: iterator.bind(null, octokit)
|
||||
})
|
||||
iterator: iterator.bind(null, octokit),
|
||||
}),
|
||||
};
|
||||
}
|
||||
paginateRest.VERSION = VERSION;
|
||||
|
|
41
node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js
generated
vendored
41
node_modules/@octokit/plugin-paginate-rest/dist-src/iterator.js
generated
vendored
|
@ -1,26 +1,39 @@
|
|||
import { normalizePaginatedListResponse } from "./normalize-paginated-list-response";
|
||||
export function iterator(octokit, route, parameters) {
|
||||
const options = octokit.request.endpoint(route, parameters);
|
||||
const options = typeof route === "function"
|
||||
? route.endpoint(parameters)
|
||||
: octokit.request.endpoint(route, parameters);
|
||||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||||
const method = options.method;
|
||||
const headers = options.headers;
|
||||
let url = options.url;
|
||||
return {
|
||||
[Symbol.asyncIterator]: () => ({
|
||||
next() {
|
||||
if (!url) {
|
||||
return Promise.resolve({ done: true });
|
||||
}
|
||||
return octokit
|
||||
.request({ method, url, headers })
|
||||
.then((response) => {
|
||||
normalizePaginatedListResponse(octokit, url, response);
|
||||
async next() {
|
||||
if (!url)
|
||||
return { done: true };
|
||||
try {
|
||||
const response = await requestMethod({ method, url, headers });
|
||||
const normalizedResponse = normalizePaginatedListResponse(response);
|
||||
// `response.headers.link` format:
|
||||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||||
url = ((response.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: response };
|
||||
});
|
||||
}
|
||||
})
|
||||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: normalizedResponse };
|
||||
}
|
||||
catch (error) {
|
||||
if (error.status !== 409)
|
||||
throw error;
|
||||
url = "";
|
||||
return {
|
||||
value: {
|
||||
status: 200,
|
||||
headers: {},
|
||||
data: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
|
46
node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js
generated
vendored
46
node_modules/@octokit/plugin-paginate-rest/dist-src/normalize-paginated-list-response.js
generated
vendored
|
@ -3,35 +3,28 @@
|
|||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint:
|
||||
*
|
||||
* - https://developer.github.com/v3/search/#example (key `items`)
|
||||
* - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`)
|
||||
* - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`)
|
||||
* - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`)
|
||||
* - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`)
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not. For the exceptions with the namespace, a fallback check for the route
|
||||
* paths has to be added in order to normalize the response. We cannot check for the total_count
|
||||
* property because it also exists in the response of Get the combined status for a specific ref.
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
const REGEX = [
|
||||
/^\/search\//,
|
||||
/^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/,
|
||||
/^\/installation\/repositories([^/]|$)/,
|
||||
/^\/user\/installations([^/]|$)/,
|
||||
/^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/,
|
||||
/^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/,
|
||||
/^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/
|
||||
];
|
||||
export function normalizePaginatedListResponse(octokit, url, response) {
|
||||
const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, "");
|
||||
const responseNeedsNormalization = REGEX.find(regex => regex.test(path));
|
||||
export function normalizePaginatedListResponse(response) {
|
||||
// endpoints can respond with 204 if repository is empty
|
||||
if (!response.data) {
|
||||
return {
|
||||
...response,
|
||||
data: [],
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
if (!responseNeedsNormalization)
|
||||
return;
|
||||
return response;
|
||||
// keep the additional properties intact as there is currently no other way
|
||||
// to retrieve the same information.
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
|
@ -50,10 +43,5 @@ export function normalizePaginatedListResponse(octokit, url, response) {
|
|||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
Object.defineProperty(response.data, namespaceKey, {
|
||||
get() {
|
||||
octokit.log.warn(`[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path}". Get the results directly from "response.data"`);
|
||||
return Array.from(data);
|
||||
}
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
|
2
node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js
generated
vendored
2
node_modules/@octokit/plugin-paginate-rest/dist-src/paginate.js
generated
vendored
|
@ -7,7 +7,7 @@ export function paginate(octokit, route, parameters, mapFn) {
|
|||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||||
}
|
||||
function gather(octokit, results, iterator, mapFn) {
|
||||
return iterator.next().then(result => {
|
||||
return iterator.next().then((result) => {
|
||||
if (result.done) {
|
||||
return results;
|
||||
}
|
||||
|
|
1
node_modules/@octokit/plugin-paginate-rest/dist-src/types.js
generated
vendored
1
node_modules/@octokit/plugin-paginate-rest/dist-src/types.js
generated
vendored
|
@ -0,0 +1 @@
|
|||
export {};
|
2
node_modules/@octokit/plugin-paginate-rest/dist-src/version.js
generated
vendored
2
node_modules/@octokit/plugin-paginate-rest/dist-src/version.js
generated
vendored
|
@ -1 +1 @@
|
|||
export const VERSION = "1.1.2";
|
||||
export const VERSION = "2.21.3";
|
||||
|
|
5
node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts
generated
vendored
5
node_modules/@octokit/plugin-paginate-rest/dist-types/index.d.ts
generated
vendored
|
@ -1,6 +1,9 @@
|
|||
import { Octokit } from "@octokit/core";
|
||||
import { PaginateInterface } from "./types";
|
||||
export { PaginateInterface } from "./types";
|
||||
import { Octokit } from "@octokit/core";
|
||||
export { PaginatingEndpoints } from "./types";
|
||||
export { composePaginateRest } from "./compose-paginate";
|
||||
export { isPaginatingEndpoint, paginatingEndpoints, } from "./paginating-endpoints";
|
||||
/**
|
||||
* @param octokit Octokit instance
|
||||
* @param options Options passed to Octokit constructor
|
||||
|
|
17
node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts
generated
vendored
17
node_modules/@octokit/plugin-paginate-rest/dist-types/iterator.d.ts
generated
vendored
|
@ -1,11 +1,20 @@
|
|||
import { Octokit } from "@octokit/core";
|
||||
import { OctokitResponse, RequestParameters, Route } from "./types";
|
||||
export declare function iterator(octokit: Octokit, route: Route, parameters?: RequestParameters): {
|
||||
import { RequestInterface, RequestParameters, Route } from "./types";
|
||||
export declare function iterator(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters): {
|
||||
[Symbol.asyncIterator]: () => {
|
||||
next(): Promise<{
|
||||
done: boolean;
|
||||
}> | Promise<{
|
||||
value: OctokitResponse<any>;
|
||||
value?: undefined;
|
||||
} | {
|
||||
value: import("@octokit/types/dist-types/OctokitResponse").OctokitResponse<any, number>;
|
||||
done?: undefined;
|
||||
} | {
|
||||
value: {
|
||||
status: number;
|
||||
headers: {};
|
||||
data: never[];
|
||||
};
|
||||
done?: undefined;
|
||||
}>;
|
||||
};
|
||||
};
|
||||
|
|
|
@ -3,21 +3,16 @@
|
|||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint:
|
||||
*
|
||||
* - https://developer.github.com/v3/search/#example (key `items`)
|
||||
* - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`)
|
||||
* - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`)
|
||||
* - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`)
|
||||
* - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`)
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not. For the exceptions with the namespace, a fallback check for the route
|
||||
* paths has to be added in order to normalize the response. We cannot check for the total_count
|
||||
* property because it also exists in the response of Get the combined status for a specific ref.
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
import { Octokit } from "@octokit/core";
|
||||
import { OctokitResponse } from "./types";
|
||||
export declare function normalizePaginatedListResponse(octokit: Octokit, url: string, response: OctokitResponse<any>): void;
|
||||
export declare function normalizePaginatedListResponse(response: OctokitResponse<any>): OctokitResponse<any>;
|
||||
|
|
4
node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts
generated
vendored
4
node_modules/@octokit/plugin-paginate-rest/dist-types/paginate.d.ts
generated
vendored
|
@ -1,3 +1,3 @@
|
|||
import { Octokit } from "@octokit/core";
|
||||
import { MapFunction, PaginationResults, RequestParameters, Route } from "./types";
|
||||
export declare function paginate(octokit: Octokit, route: Route, parameters?: RequestParameters, mapFn?: MapFunction): Promise<PaginationResults<any>>;
|
||||
import { MapFunction, PaginationResults, RequestParameters, Route, RequestInterface } from "./types";
|
||||
export declare function paginate(octokit: Octokit, route: Route | RequestInterface, parameters?: RequestParameters, mapFn?: MapFunction): Promise<PaginationResults<unknown>>;
|
||||
|
|
233
node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts
generated
vendored
233
node_modules/@octokit/plugin-paginate-rest/dist-types/types.d.ts
generated
vendored
|
@ -1,69 +1,242 @@
|
|||
import { Octokit } from "@octokit/core";
|
||||
import * as OctokitTypes from "@octokit/types";
|
||||
export { EndpointOptions } from "@octokit/types";
|
||||
export { OctokitResponse } from "@octokit/types";
|
||||
export { RequestParameters } from "@octokit/types";
|
||||
export { Route } from "@octokit/types";
|
||||
export { EndpointOptions, RequestInterface, OctokitResponse, RequestParameters, Route, } from "@octokit/types";
|
||||
export { PaginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
import { PaginatingEndpoints } from "./generated/paginating-endpoints";
|
||||
declare type KnownKeys<T> = Extract<{
|
||||
[K in keyof T]: string extends K ? never : number extends K ? never : K;
|
||||
} extends {
|
||||
[_ in keyof T]: infer U;
|
||||
} ? U : never, keyof T>;
|
||||
declare type KeysMatching<T, V> = {
|
||||
[K in keyof T]: T[K] extends V ? K : never;
|
||||
}[keyof T];
|
||||
declare type KnownKeysMatching<T, V> = KeysMatching<Pick<T, KnownKeys<T>>, V>;
|
||||
declare type GetResultsType<T> = T extends {
|
||||
data: any[];
|
||||
} ? T["data"] : T extends {
|
||||
data: object;
|
||||
} ? T["data"][KnownKeysMatching<T["data"], any[]>] : never;
|
||||
declare type NormalizeResponse<T> = T & {
|
||||
data: GetResultsType<T>;
|
||||
};
|
||||
declare type DataType<T> = "data" extends keyof T ? T["data"] : unknown;
|
||||
export interface MapFunction<T = OctokitTypes.OctokitResponse<PaginationResults<unknown>>, M = unknown[]> {
|
||||
(response: T, done: () => void): M;
|
||||
}
|
||||
export declare type PaginationResults<T = unknown> = T[];
|
||||
export interface PaginateInterface {
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
* Paginate a request using endpoint options and map each response to a custom array
|
||||
*
|
||||
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<T, R>(options: OctokitTypes.EndpointOptions, mapFn: MapFunction<T, R>): Promise<PaginationResults<R>>;
|
||||
<T, M>(options: OctokitTypes.EndpointOptions, mapFn: MapFunction<OctokitTypes.OctokitResponse<PaginationResults<T>>, M[]>): Promise<PaginationResults<M>>;
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
* Paginate a request using endpoint options
|
||||
*
|
||||
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(options: OctokitTypes.EndpointOptions): Promise<PaginationResults<T>>;
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
* Paginate a request using a known endpoint route string and map each response to a custom array
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/:org'`
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<T, R>(route: OctokitTypes.Route, mapFn: MapFunction<T>): Promise<PaginationResults<R>>;
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(route: R, mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
* Paginate a request using a known endpoint route string and parameters, and map each response to a custom array
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/:org'`
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<T, R>(route: OctokitTypes.Route, parameters: OctokitTypes.RequestParameters, mapFn: MapFunction<T>): Promise<PaginationResults<R>>;
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
* Paginate a request using an known endpoint route string
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/:org'`
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints>(route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise<DataType<PaginatingEndpoints[R]["response"]>>;
|
||||
/**
|
||||
* Paginate a request using an unknown endpoint route string
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise<T[]>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and a map function
|
||||
*
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(request: R, mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method, parameters, and a map function
|
||||
*
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<T>(route: OctokitTypes.Route, parameters: OctokitTypes.RequestParameters): Promise<PaginationResults<T>>;
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(request: R, parameters: Parameters<R>[0], mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Sends a request based on endpoint options
|
||||
* Paginate a request using an endpoint method and parameters
|
||||
*
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/:org'`
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(route: OctokitTypes.Route): Promise<PaginationResults<T>>;
|
||||
<R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): Promise<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>["data"]>;
|
||||
iterator: {
|
||||
/**
|
||||
* Get an asynchronous iterator for use with `for await()`,
|
||||
* Get an async iterator to paginate a request using endpoint options
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @param {object} endpoint Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(EndpointOptions: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
<T>(options: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an asynchronous iterator for use with `for await()`,
|
||||
* Get an async iterator to paginate a request using a known endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/:org'`
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(route: OctokitTypes.Route, parameters?: OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
<R extends keyof PaginatingEndpoints>(route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a request method and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
* @param {string} request `@octokit/request` or `octokit.request` method
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(request: R, parameters?: Parameters<R>[0]): AsyncIterableIterator<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>;
|
||||
};
|
||||
}
|
||||
export interface MapFunction<T = any, R = any> {
|
||||
(response: OctokitTypes.OctokitResponse<PaginationResults<T>>, done: () => void): R[];
|
||||
export interface ComposePaginateInterface {
|
||||
/**
|
||||
* Paginate a request using endpoint options and map each response to a custom array
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<T, M>(octokit: Octokit, options: OctokitTypes.EndpointOptions, mapFn: MapFunction<OctokitTypes.OctokitResponse<PaginationResults<T>>, M[]>): Promise<PaginationResults<M>>;
|
||||
/**
|
||||
* Paginate a request using endpoint options
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(octokit: Octokit, options: OctokitTypes.EndpointOptions): Promise<PaginationResults<T>>;
|
||||
/**
|
||||
* Paginate a request using a known endpoint route string and map each response to a custom array
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(octokit: Octokit, route: R, mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using a known endpoint route string and parameters, and map each response to a custom array
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints, M extends unknown[]>(octokit: Octokit, route: R, parameters: PaginatingEndpoints[R]["parameters"], mapFn: MapFunction<PaginatingEndpoints[R]["response"], M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an known endpoint route string
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints>(octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): Promise<DataType<PaginatingEndpoints[R]["response"]>>;
|
||||
/**
|
||||
* Paginate a request using an unknown endpoint route string
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): Promise<T[]>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and a map function
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(octokit: Octokit, request: R, mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method, parameters, and a map function
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
* @param {function} mapFn? Optional method to map each response to a custom array
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface, M extends unknown[]>(octokit: Octokit, request: R, parameters: Parameters<R>[0], mapFn: MapFunction<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>, M>): Promise<M>;
|
||||
/**
|
||||
* Paginate a request using an endpoint method and parameters
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request Request method (`octokit.request` or `@octokit/request`)
|
||||
* @param {object} parameters? URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(octokit: Octokit, request: R, parameters?: Parameters<R>[0]): Promise<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>["data"]>;
|
||||
iterator: {
|
||||
/**
|
||||
* Get an async iterator to paginate a request using endpoint options
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {object} options Must set `method` and `url`. Plus URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T>(octokit: Octokit, options: OctokitTypes.EndpointOptions): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a known endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends keyof PaginatingEndpoints>(octokit: Octokit, route: R, parameters?: PaginatingEndpoints[R]["parameters"]): AsyncIterableIterator<OctokitTypes.OctokitResponse<DataType<PaginatingEndpoints[R]["response"]>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using an unknown endpoint route string and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} route Request method + URL. Example: `'GET /orgs/{org}'`
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<T, R extends OctokitTypes.Route = OctokitTypes.Route>(octokit: Octokit, route: R, parameters?: R extends keyof PaginatingEndpoints ? PaginatingEndpoints[R]["parameters"] : OctokitTypes.RequestParameters): AsyncIterableIterator<OctokitTypes.OctokitResponse<PaginationResults<T>>>;
|
||||
/**
|
||||
* Get an async iterator to paginate a request using a request method and optional parameters
|
||||
*
|
||||
* @see {link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for-await...of} for await...of
|
||||
*
|
||||
* @param {object} octokit Octokit instance
|
||||
* @param {string} request `@octokit/request` or `octokit.request` method
|
||||
* @param {object} [parameters] URL, query or body parameters, as well as `headers`, `mediaType.{format|previews}`, `request`, or `baseUrl`.
|
||||
*/
|
||||
<R extends OctokitTypes.RequestInterface>(octokit: Octokit, request: R, parameters?: Parameters<R>[0]): AsyncIterableIterator<NormalizeResponse<OctokitTypes.GetResponseTypeFromEndpointMethod<R>>>;
|
||||
};
|
||||
}
|
||||
export declare type PaginationResults<T = any> = T[];
|
||||
|
|
2
node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts
generated
vendored
2
node_modules/@octokit/plugin-paginate-rest/dist-types/version.d.ts
generated
vendored
|
@ -1 +1 @@
|
|||
export declare const VERSION = "1.1.2";
|
||||
export declare const VERSION = "2.21.3";
|
||||
|
|
327
node_modules/@octokit/plugin-paginate-rest/dist-web/index.js
generated
vendored
327
node_modules/@octokit/plugin-paginate-rest/dist-web/index.js
generated
vendored
|
@ -1,39 +1,32 @@
|
|||
const VERSION = "1.1.2";
|
||||
const VERSION = "2.21.3";
|
||||
|
||||
/**
|
||||
* Some “list” response that can be paginated have a different response structure
|
||||
*
|
||||
* They have a `total_count` key in the response (search also has `incomplete_results`,
|
||||
* /installation/repositories also has `repository_selection`), as well as a key with
|
||||
* the list of the items which name varies from endpoint to endpoint:
|
||||
*
|
||||
* - https://developer.github.com/v3/search/#example (key `items`)
|
||||
* - https://developer.github.com/v3/checks/runs/#response-3 (key: `check_runs`)
|
||||
* - https://developer.github.com/v3/checks/suites/#response-1 (key: `check_suites`)
|
||||
* - https://developer.github.com/v3/apps/installations/#list-repositories (key: `repositories`)
|
||||
* - https://developer.github.com/v3/apps/installations/#list-installations-for-a-user (key `installations`)
|
||||
* the list of the items which name varies from endpoint to endpoint.
|
||||
*
|
||||
* Octokit normalizes these responses so that paginated results are always returned following
|
||||
* the same structure. One challenge is that if the list response has only one page, no Link
|
||||
* header is provided, so this header alone is not sufficient to check wether a response is
|
||||
* paginated or not. For the exceptions with the namespace, a fallback check for the route
|
||||
* paths has to be added in order to normalize the response. We cannot check for the total_count
|
||||
* property because it also exists in the response of Get the combined status for a specific ref.
|
||||
* paginated or not.
|
||||
*
|
||||
* We check if a "total_count" key is present in the response data, but also make sure that
|
||||
* a "url" property is not, as the "Get the combined status for a specific ref" endpoint would
|
||||
* otherwise match: https://developer.github.com/v3/repos/statuses/#get-the-combined-status-for-a-specific-ref
|
||||
*/
|
||||
const REGEX = [
|
||||
/^\/search\//,
|
||||
/^\/repos\/[^/]+\/[^/]+\/commits\/[^/]+\/(check-runs|check-suites)([^/]|$)/,
|
||||
/^\/installation\/repositories([^/]|$)/,
|
||||
/^\/user\/installations([^/]|$)/,
|
||||
/^\/repos\/[^/]+\/[^/]+\/actions\/secrets([^/]|$)/,
|
||||
/^\/repos\/[^/]+\/[^/]+\/actions\/workflows(\/[^/]+\/runs)?([^/]|$)/,
|
||||
/^\/repos\/[^/]+\/[^/]+\/actions\/runs(\/[^/]+\/(artifacts|jobs))?([^/]|$)/
|
||||
];
|
||||
function normalizePaginatedListResponse(octokit, url, response) {
|
||||
const path = url.replace(octokit.request.endpoint.DEFAULTS.baseUrl, "");
|
||||
const responseNeedsNormalization = REGEX.find(regex => regex.test(path));
|
||||
function normalizePaginatedListResponse(response) {
|
||||
// endpoints can respond with 204 if repository is empty
|
||||
if (!response.data) {
|
||||
return {
|
||||
...response,
|
||||
data: [],
|
||||
};
|
||||
}
|
||||
const responseNeedsNormalization = "total_count" in response.data && !("url" in response.data);
|
||||
if (!responseNeedsNormalization)
|
||||
return;
|
||||
return response;
|
||||
// keep the additional properties intact as there is currently no other way
|
||||
// to retrieve the same information.
|
||||
const incompleteResults = response.data.incomplete_results;
|
||||
|
@ -52,37 +45,45 @@ function normalizePaginatedListResponse(octokit, url, response) {
|
|||
response.data.repository_selection = repositorySelection;
|
||||
}
|
||||
response.data.total_count = totalCount;
|
||||
Object.defineProperty(response.data, namespaceKey, {
|
||||
get() {
|
||||
octokit.log.warn(`[@octokit/paginate-rest] "response.data.${namespaceKey}" is deprecated for "GET ${path}". Get the results directly from "response.data"`);
|
||||
return Array.from(data);
|
||||
}
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
||||
function iterator(octokit, route, parameters) {
|
||||
const options = octokit.request.endpoint(route, parameters);
|
||||
const options = typeof route === "function"
|
||||
? route.endpoint(parameters)
|
||||
: octokit.request.endpoint(route, parameters);
|
||||
const requestMethod = typeof route === "function" ? route : octokit.request;
|
||||
const method = options.method;
|
||||
const headers = options.headers;
|
||||
let url = options.url;
|
||||
return {
|
||||
[Symbol.asyncIterator]: () => ({
|
||||
next() {
|
||||
if (!url) {
|
||||
return Promise.resolve({ done: true });
|
||||
}
|
||||
return octokit
|
||||
.request({ method, url, headers })
|
||||
.then((response) => {
|
||||
normalizePaginatedListResponse(octokit, url, response);
|
||||
async next() {
|
||||
if (!url)
|
||||
return { done: true };
|
||||
try {
|
||||
const response = await requestMethod({ method, url, headers });
|
||||
const normalizedResponse = normalizePaginatedListResponse(response);
|
||||
// `response.headers.link` format:
|
||||
// '<https://api.github.com/users/aseemk/followers?page=2>; rel="next", <https://api.github.com/users/aseemk/followers?page=2>; rel="last"'
|
||||
// sets `url` to undefined if "next" URL is not present or `link` header is not set
|
||||
url = ((response.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: response };
|
||||
});
|
||||
}
|
||||
})
|
||||
url = ((normalizedResponse.headers.link || "").match(/<([^>]+)>;\s*rel="next"/) || [])[1];
|
||||
return { value: normalizedResponse };
|
||||
}
|
||||
catch (error) {
|
||||
if (error.status !== 409)
|
||||
throw error;
|
||||
url = "";
|
||||
return {
|
||||
value: {
|
||||
status: 200,
|
||||
headers: {},
|
||||
data: [],
|
||||
},
|
||||
};
|
||||
}
|
||||
},
|
||||
}),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -94,7 +95,7 @@ function paginate(octokit, route, parameters, mapFn) {
|
|||
return gather(octokit, [], iterator(octokit, route, parameters)[Symbol.asyncIterator](), mapFn);
|
||||
}
|
||||
function gather(octokit, results, iterator, mapFn) {
|
||||
return iterator.next().then(result => {
|
||||
return iterator.next().then((result) => {
|
||||
if (result.done) {
|
||||
return results;
|
||||
}
|
||||
|
@ -110,6 +111,236 @@ function gather(octokit, results, iterator, mapFn) {
|
|||
});
|
||||
}
|
||||
|
||||
const composePaginateRest = Object.assign(paginate, {
|
||||
iterator,
|
||||
});
|
||||
|
||||
const paginatingEndpoints = [
|
||||
"GET /app/hook/deliveries",
|
||||
"GET /app/installations",
|
||||
"GET /applications/grants",
|
||||
"GET /authorizations",
|
||||
"GET /enterprises/{enterprise}/actions/permissions/organizations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/organizations",
|
||||
"GET /enterprises/{enterprise}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /enterprises/{enterprise}/actions/runners",
|
||||
"GET /enterprises/{enterprise}/audit-log",
|
||||
"GET /enterprises/{enterprise}/secret-scanning/alerts",
|
||||
"GET /enterprises/{enterprise}/settings/billing/advanced-security",
|
||||
"GET /events",
|
||||
"GET /gists",
|
||||
"GET /gists/public",
|
||||
"GET /gists/starred",
|
||||
"GET /gists/{gist_id}/comments",
|
||||
"GET /gists/{gist_id}/commits",
|
||||
"GET /gists/{gist_id}/forks",
|
||||
"GET /installation/repositories",
|
||||
"GET /issues",
|
||||
"GET /licenses",
|
||||
"GET /marketplace_listing/plans",
|
||||
"GET /marketplace_listing/plans/{plan_id}/accounts",
|
||||
"GET /marketplace_listing/stubbed/plans",
|
||||
"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts",
|
||||
"GET /networks/{owner}/{repo}/events",
|
||||
"GET /notifications",
|
||||
"GET /organizations",
|
||||
"GET /orgs/{org}/actions/cache/usage-by-repository",
|
||||
"GET /orgs/{org}/actions/permissions/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/repositories",
|
||||
"GET /orgs/{org}/actions/runner-groups/{runner_group_id}/runners",
|
||||
"GET /orgs/{org}/actions/runners",
|
||||
"GET /orgs/{org}/actions/secrets",
|
||||
"GET /orgs/{org}/actions/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/audit-log",
|
||||
"GET /orgs/{org}/blocks",
|
||||
"GET /orgs/{org}/code-scanning/alerts",
|
||||
"GET /orgs/{org}/codespaces",
|
||||
"GET /orgs/{org}/credential-authorizations",
|
||||
"GET /orgs/{org}/dependabot/secrets",
|
||||
"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories",
|
||||
"GET /orgs/{org}/events",
|
||||
"GET /orgs/{org}/external-groups",
|
||||
"GET /orgs/{org}/failed_invitations",
|
||||
"GET /orgs/{org}/hooks",
|
||||
"GET /orgs/{org}/hooks/{hook_id}/deliveries",
|
||||
"GET /orgs/{org}/installations",
|
||||
"GET /orgs/{org}/invitations",
|
||||
"GET /orgs/{org}/invitations/{invitation_id} |