Dwayne Harris 5 years ago
parent
commit
f3bcfa581f
  1. 535
      package-lock.json
  2. 10
      package.json
  3. 147
      src/plugins/api/apps.ts
  4. 40
      src/plugins/api/authentication.ts
  5. 13
      src/plugins/api/groups.ts
  6. 41
      src/schemas.ts
  7. 21
      src/types/collections.ts

535
package-lock.json

@ -4,32 +4,32 @@
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@azure/abort-controller": {
"version": "1.0.0-preview.2",
"resolved": "https://registry.npmjs.org/@azure/abort-controller/-/abort-controller-1.0.0-preview.2.tgz",
"integrity": "sha512-pd2MVcHaitEC0ZoeixSTkJqTJFkIUVglosV//P2C/VwLg+9moGyx/P+WH2onDYukEOL5CCEuF0LBDfnTeL0gVA==",
"requires": {
"tslib": "^1.9.3"
}
},
"@azure/cosmos": {
"version": "3.2.0",
"resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.2.0.tgz",
"integrity": "sha512-ULgHquAr6LuMs8nQR+6ra9Hv3Psm6Ckku1XN3+9IqG+VsUZ7wgFfBLMnDGJMfm2MA50yRmajFmjuu2EeqRNWCQ==",
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/@azure/cosmos/-/cosmos-3.3.3.tgz",
"integrity": "sha512-Nktqi3cZPwm5rVXif1oAdCsYWyDJINZH1VHkQ03uqQDPuxX2zphA0fMQQ/dhITzR38kPu0PTTSkSsESJ0gXpqw==",
"requires": {
"@azure/cosmos-sign": "1.0.2",
"@azure/abort-controller": "1.0.0-preview.2",
"@azure/cosmos-sign": "^1.0.2",
"@types/debug": "^4.1.4",
"atob": "2.1.2",
"binary-search-bounds": "2.0.3",
"crypto-hash": "1.1.0",
"binary-search-bounds": "^2.0.3",
"crypto-hash": "^1.1.0",
"debug": "^4.1.1",
"fast-json-stable-stringify": "2.0.0",
"node-abort-controller": "1.0.3",
"node-fetch": "2.6.0",
"priorityqueuejs": "1.0.0",
"semaphore": "1.0.5",
"fast-json-stable-stringify": "^2.0.0",
"node-fetch": "^2.6.0",
"priorityqueuejs": "^1.0.0",
"semaphore": "^1.0.5",
"tslib": "^1.9.3",
"universal-user-agent": "2.1.0",
"uuid": "3.3.2"
},
"dependencies": {
"uuid": {
"version": "3.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz",
"integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA=="
}
"universal-user-agent": "^4.0.0",
"uuid": "^3.3.2"
}
},
"@azure/cosmos-sign": {
@ -105,9 +105,9 @@
}
},
"@types/lodash": {
"version": "4.14.138",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.138.tgz",
"integrity": "sha512-A4uJgHz4hakwNBdHNPdxOTkYmXNgmUAKLbXZ7PKGslgeV0Mb8P3BlbYfPovExek1qnod4pDfRbxuzcVs3dlFLg==",
"version": "4.14.142",
"resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.142.tgz",
"integrity": "sha512-ZhNS7c4D4WQ49Dr1FftQj7SwngRswOnPfxktmqSy5BettRCuum2q784jRwNTYfxH00r8+fEgRz6Da8j5DHNd1Q==",
"dev": true
},
"@types/node": {
@ -143,8 +143,7 @@
"abbrev": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",
"dev": true
"integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q=="
},
"abort-controller": {
"version": "3.0.0",
@ -182,8 +181,7 @@
"ansi-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz",
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=",
"dev": true
"integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg="
},
"ansi-styles": {
"version": "3.2.1",
@ -215,19 +213,57 @@
}
}
},
"aproba": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
"integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw=="
},
"archy": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz",
"integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA="
},
"are-we-there-yet": {
"version": "1.1.5",
"resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
"integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==",
"requires": {
"delegates": "^1.0.0",
"readable-stream": "^2.0.6"
},
"dependencies": {
"readable-stream": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"requires": {
"core-util-is": "~1.0.0",
"inherits": "~2.0.3",
"isarray": "~1.0.0",
"process-nextick-args": "~2.0.0",
"safe-buffer": "~5.1.1",
"string_decoder": "~1.1.1",
"util-deprecate": "~1.0.1"
}
},
"string_decoder": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz",
"integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==",
"requires": {
"safe-buffer": "~5.1.0"
}
}
}
},
"argon2": {
"version": "0.24.1",
"resolved": "https://registry.npmjs.org/argon2/-/argon2-0.24.1.tgz",
"integrity": "sha512-2S677iO18I+SQEUONkpvyagF9BJDYdiT82KqSMPQ2zP0oIYagVIPM0Y8T5pJ/4F4CrnN9PTCGA+ye1S0KupW3g==",
"version": "0.25.0",
"resolved": "https://registry.npmjs.org/argon2/-/argon2-0.25.0.tgz",
"integrity": "sha512-Kvj6nb4qrvLi1yen9UZ69hbpRiA47qm6eZNhaQwTtfhahjq3S0GV/K78yrvIWnJOoTQTPxrDglbGGBitdbvM3w==",
"requires": {
"@phc/format": "^0.5.0",
"node-addon-api": "^1.7.1",
"node-gyp-build": "^4.1.0"
"node-pre-gyp": "^0.13.0"
}
},
"args": {
@ -302,7 +338,8 @@
"atob": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz",
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg=="
"integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==",
"dev": true
},
"avvio": {
"version": "6.2.2",
@ -317,8 +354,7 @@
"balanced-match": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
"dev": true
"integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c="
},
"base": {
"version": "0.11.2",
@ -382,9 +418,9 @@
"dev": true
},
"binary-search-bounds": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.3.tgz",
"integrity": "sha1-X/hhbW3SylOIvIWy1iZuK52lAtw="
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/binary-search-bounds/-/binary-search-bounds-2.0.4.tgz",
"integrity": "sha512-2hg5kgdKql5ClF2ErBcSx0U5bnl5hgS4v7wMnLFodyR47yMtj2w+UAZB+0CiqyHct2q543i7Bi4/aMIegorCCg=="
},
"boxen": {
"version": "1.3.0",
@ -405,7 +441,6 @@
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
"integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
"dev": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -510,6 +545,11 @@
"upath": "^1.1.1"
}
},
"chownr": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.3.tgz",
"integrity": "sha512-i70fVHhmV3DtTl6nqvZOnIjbY0Pe4kAUjwHj8z0zAdgBtYrJyYwLKCCuRBQ5ppkyL0AkN7HKRnETdmdp1zqNXw=="
},
"ci-info": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/ci-info/-/ci-info-1.6.0.tgz",
@ -545,6 +585,11 @@
"integrity": "sha1-T6kXw+WclKAEzWH47lCdplFocUM=",
"dev": true
},
"code-point-at": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
"integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c="
},
"collection-visit": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz",
@ -622,8 +667,7 @@
"concat-map": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
"dev": true
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
},
"configstore": {
"version": "3.1.2",
@ -639,6 +683,11 @@
"xdg-basedir": "^3.0.0"
}
},
"console-control-strings": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
"integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4="
},
"content-security-policy-builder": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/content-security-policy-builder/-/content-security-policy-builder-2.1.0.tgz",
@ -677,9 +726,9 @@
}
},
"crypto-hash": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.1.0.tgz",
"integrity": "sha512-5DWmfCxQZHWocCpkOXVFmfYj7v5vZXF3ZNzMeyyJ6OzGfDTEEOm2CWA8KzZ578eA7j5VPCLOdGjOU8sGgi8BYw=="
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/crypto-hash/-/crypto-hash-1.2.2.tgz",
"integrity": "sha512-rXXMXepuKg9gIfqE7I1jtVa6saLhzIkDQ2u3kTGUWYiUGsHcUa3LTsfrjPEdOY8kxKlryQtsOmJOU0F23yRJTg=="
},
"crypto-js": {
"version": "3.1.9-1",
@ -720,8 +769,7 @@
"deep-extend": {
"version": "0.6.0",
"resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz",
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==",
"dev": true
"integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA=="
},
"deepmerge": {
"version": "4.0.0",
@ -782,11 +830,21 @@
"resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz",
"integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk="
},
"delegates": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",
"integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o="
},
"depd": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
"integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw=="
},
"detect-libc": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",
"integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups="
},
"diagnostics": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz",
@ -1083,18 +1141,18 @@
"integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I="
},
"fast-json-stringify": {
"version": "1.15.4",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.4.tgz",
"integrity": "sha512-lsGTxL0OIGjGSUXgWUOdSgjCL/xMyMvMudfGN3D1zOLEv44fYZ1ZXmMyCON5XdpaiZN6nCXmU7GQg7fbXfPG4g==",
"version": "1.15.5",
"resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-1.15.5.tgz",
"integrity": "sha512-isOtZqxaBElpIBG5kibeBDIPyMYCGuI271ujJvAiWE+HNMPCFNiJJLVoxfGwer0u6g9wjv6OWbVzSjBPfHAgmg==",
"requires": {
"ajv": "^6.8.1",
"deepmerge": "^4.0.0"
}
},
"fast-redact": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-1.5.0.tgz",
"integrity": "sha512-Afo61CgUjkzdvOKDHn08qnZ0kwck38AOGcMlvSGzvJbIab6soAP5rdoQayecGCDsD69AiF9vJBXyq31eoEO2tQ=="
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-2.0.0.tgz",
"integrity": "sha512-zxpkULI9W9MNTK2sJ3BpPQrTEXFNESd2X6O1tXMFpK/XM0G5c5Rll2EVYZH2TqI3xRGK/VaJ+eEOt7pnENJpeA=="
},
"fast-safe-stringify": {
"version": "2.0.6",
@ -1102,9 +1160,9 @@
"integrity": "sha512-q8BZ89jjc+mz08rSxROs8VsrBBcn1SIw1kq9NjolL509tkABRk9io01RAjSaEv1Xb2uFLt8VtRiZbGp5H8iDtg=="
},
"fastify": {
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.8.0.tgz",
"integrity": "sha512-+HXe9xZzbj79680hlehEs0B1Z3e5RQT6CtPthseqgRJy2i7Wlro8EEdM7u7ewwL9XREjLWssCPlJiZ3G+t4qsw==",
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/fastify/-/fastify-2.9.0.tgz",
"integrity": "sha512-BFItHh22BaKAwbjj5w/RE+TBXdJgslJeTMJq00nK+gRhNO4IPcDIcYxTQY5DvpByA2jrfEFNc8SyxUDZkseS/Q==",
"requires": {
"abstract-logging": "^1.0.0",
"ajv": "^6.10.2",
@ -1119,7 +1177,7 @@
"readable-stream": "^3.1.1",
"rfdc": "^1.1.2",
"secure-json-parse": "^1.0.0",
"tiny-lru": "^6.0.1"
"tiny-lru": "^7.0.0"
}
},
"fastify-cors": {
@ -1210,9 +1268,9 @@
}
},
"find-my-way": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.1.1.tgz",
"integrity": "sha512-yznKDx1xELFkTrV2Ke9x3IOr9zn5isdFA2Af/NKjU8kmQQhtn3TmqrVZ6OiLO5pj1dAScxe4dAo92ieG4nGcoA==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-2.1.2.tgz",
"integrity": "sha512-z9CnXc2ASkDwtM+MjNyfQfBGagUzE9kQVA5ABlZ8yxj1FlYeEGJ59mHmPuiU1j8PYXpTtlri9JPPo+TGHaFcKw==",
"requires": {
"fast-decode-uri-component": "^1.0.0",
"safe-regex2": "^2.0.0",
@ -1259,6 +1317,19 @@
"resolved": "https://registry.npmjs.org/frameguard/-/frameguard-3.1.0.tgz",
"integrity": "sha512-TxgSKM+7LTA6sidjOiSZK9wxY0ffMPY3Wta//MqwmX0nZuEHc8QrkV8Fh3ZhMJeiH+Uyh/tcaarImRy8u77O7g=="
},
"fs-minipass": {
"version": "1.2.7",
"resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz",
"integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==",
"requires": {
"minipass": "^2.6.0"
}
},
"fs.realpath": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
},
"fsevents": {
"version": "1.2.9",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.9.tgz",
@ -1812,6 +1883,54 @@
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A=="
},
"gauge": {
"version": "2.7.4",
"resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz",
"integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=",
"requires": {
"aproba": "^1.0.3",
"console-control-strings": "^1.0.0",
"has-unicode": "^2.0.0",
"object-assign": "^4.1.0",
"signal-exit": "^3.0.0",
"string-width": "^1.0.1",
"strip-ansi": "^3.0.1",
"wide-align": "^1.1.0"
},
"dependencies": {
"ansi-regex": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
"integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8="
},
"is-fullwidth-code-point": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz",
"integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=",
"requires": {
"number-is-nan": "^1.0.0"
}
},
"string-width": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz",
"integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=",
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",
"strip-ansi": "^3.0.0"
}
},
"strip-ansi": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz",
"integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=",
"requires": {
"ansi-regex": "^2.0.0"
}
}
}
},
"get-stream": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz",
@ -1826,6 +1945,19 @@
"integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=",
"dev": true
},
"glob": {
"version": "7.1.4",
"resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz",
"integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==",
"requires": {
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
}
},
"glob-parent": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz",
@ -1908,6 +2040,11 @@
"resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.0.tgz",
"integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q="
},
"has-unicode": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",
"integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk="
},
"has-value": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",
@ -1980,6 +2117,14 @@
"depd": "2.0.0"
}
},
"iconv-lite": {
"version": "0.4.24",
"resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz",
"integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==",
"requires": {
"safer-buffer": ">= 2.1.2 < 3"
}
},
"ienoopen": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/ienoopen/-/ienoopen-1.1.0.tgz",
@ -1991,6 +2136,14 @@
"integrity": "sha1-SMptcvbGo68Aqa1K5odr44ieKwk=",
"dev": true
},
"ignore-walk": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.2.tgz",
"integrity": "sha512-EXyErtpHbn75ZTsOADsfx6J/FPo6/5cjev46PXrcTpd8z3BoRkXgYu9/JVqrI7tusjmwCZutGeRJeU0Wo1e4Cw==",
"requires": {
"minimatch": "^3.0.4"
}
},
"import-lazy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",
@ -2003,6 +2156,15 @@
"integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=",
"dev": true
},
"inflight": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"requires": {
"once": "^1.3.0",
"wrappy": "1"
}
},
"inherits": {
"version": "2.0.4",
"resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
@ -2011,8 +2173,7 @@
"ini": {
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz",
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==",
"dev": true
"integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw=="
},
"ip-regex": {
"version": "2.1.0",
@ -2137,8 +2298,7 @@
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=",
"dev": true
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"is-glob": {
"version": "4.0.1",
@ -2517,7 +2677,6 @@
"version": "3.0.4",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
"integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
"dev": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -2525,8 +2684,31 @@
"minimist": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
"dev": true
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ="
},
"minipass": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz",
"integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==",
"requires": {
"safe-buffer": "^5.1.2",
"yallist": "^3.0.0"
},
"dependencies": {
"yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
},
"minizlib": {
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz",
"integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==",
"requires": {
"minipass": "^2.9.0"
}
},
"mixin-deep": {
"version": "1.3.2",
@ -2549,6 +2731,21 @@
}
}
},
"mkdirp": {
"version": "0.5.1",
"resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz",
"integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=",
"requires": {
"minimist": "0.0.8"
},
"dependencies": {
"minimist": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz",
"integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0="
}
}
},
"moment": {
"version": "2.24.0",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz",
@ -2591,6 +2788,26 @@
"to-regex": "^3.0.1"
}
},
"needle": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/needle/-/needle-2.4.0.tgz",
"integrity": "sha512-4Hnwzr3mi5L97hMYeNl8wRW/Onhy4nUKR/lVemJ8gJedxxUyBLm9kkrDColJvoSfwi0jCNhD+xCdOtiGDQiRZg==",
"requires": {
"debug": "^3.2.6",
"iconv-lite": "^0.4.4",
"sax": "^1.2.4"
},
"dependencies": {
"debug": {
"version": "3.2.6",
"resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz",
"integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==",
"requires": {
"ms": "^2.1.1"
}
}
}
},
"nice-try": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
@ -2601,11 +2818,6 @@
"resolved": "https://registry.npmjs.org/nocache/-/nocache-2.1.0.tgz",
"integrity": "sha512-0L9FvHG3nfnnmaEQPjT9xhfN4ISk0A8/2j4M37Np4mcDesJjHgEUfgPhdCyZuFI954tjokaIj/A3NdpFNdEh4Q=="
},
"node-abort-controller": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/node-abort-controller/-/node-abort-controller-1.0.3.tgz",
"integrity": "sha512-w07Dwqd/SWv9Lqrlhlx3mo4i4EWsuN3majbIIj4d6twBWGZUKtB9zvT9W+D5Rko56uas55CLO0YZ4zMrf6AKMw=="
},
"node-addon-api": {
"version": "1.7.1",
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.7.1.tgz",
@ -2616,15 +2828,38 @@
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz",
"integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA=="
},
"node-gyp-build": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz",
"integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ=="
"node-pre-gyp": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.13.0.tgz",
"integrity": "sha512-Md1D3xnEne8b/HGVQkZZwV27WUi1ZRuZBij24TNaZwUPU3ZAFtvT6xxJGaUVillfmMKnn5oD1HoGsp2Ftik7SQ==",
"requires": {
"detect-libc": "^1.0.2",
"mkdirp": "^0.5.1",
"needle": "^2.2.1",
"nopt": "^4.0.1",
"npm-packlist": "^1.1.6",
"npmlog": "^4.0.2",
"rc": "^1.2.7",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"tar": "^4"
},
"dependencies": {
"nopt": {
"version": "4.0.1",
"resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.1.tgz",
"integrity": "sha1-0NRoWv1UFRk8jHUFYC0NF81kR00=",
"requires": {
"abbrev": "1",
"osenv": "^0.1.4"
}
}
}
},
"nodemon": {
"version": "1.19.2",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.2.tgz",
"integrity": "sha512-hRLYaw5Ihyw9zK7NF+9EUzVyS6Cvgc14yh8CAYr38tPxJa6UrOxwAQ351GwrgoanHCF0FalQFn6w5eoX/LGdJw==",
"version": "1.19.3",
"resolved": "https://registry.npmjs.org/nodemon/-/nodemon-1.19.3.tgz",
"integrity": "sha512-TBNKRmJykEbxpTniZBusqRrUTHIEqa2fpecbTQDQj1Gxjth7kKAPP296ztR0o5gPUWsiYbuEbt73/+XMYab1+w==",
"dev": true,
"requires": {
"chokidar": "^2.1.5",
@ -2677,6 +2912,20 @@
"integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"dev": true
},
"npm-bundled": {
"version": "1.0.6",
"resolved": "https://registry.npmjs.org/npm-bundled/-/npm-bundled-1.0.6.tgz",
"integrity": "sha512-8/JCaftHwbd//k6y2rEWp6k1wxVfpFzB6t1p825+cUb7Ym2XQfhwIC5KwhrvzZRJu+LtDE585zVaS32+CGtf0g=="
},
"npm-packlist": {
"version": "1.4.4",
"resolved": "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.4.4.tgz",
"integrity": "sha512-zTLo8UcVYtDU3gdeaFu2Xu0n0EvelfHDGuqtNIn5RO7yQj4H1TqNdBc/yZjxnWA0PVB8D3Woyp0i5B43JwQ6Vw==",
"requires": {
"ignore-walk": "^3.0.1",
"npm-bundled": "^1.0.1"
}
},
"npm-run-all": {
"version": "4.1.5",
"resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
@ -2702,6 +2951,27 @@
"path-key": "^2.0.0"
}
},
"npmlog": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz",
"integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==",
"requires": {
"are-we-there-yet": "~1.1.2",
"console-control-strings": "~1.1.0",
"gauge": "~2.7.3",
"set-blocking": "~2.0.0"
}
},
"number-is-nan": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz",
"integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0="
},
"object-assign": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
"integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM="
},
"object-copy": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz",
@ -2778,6 +3048,11 @@
"resolved": "https://registry.npmjs.org/one-time/-/one-time-0.0.4.tgz",
"integrity": "sha1-+M33eISCb+Tf+T46nMN7HkSAdC4="
},
"os-homedir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz",
"integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M="
},
"os-name": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/os-name/-/os-name-3.1.0.tgz",
@ -2787,6 +3062,20 @@
"windows-release": "^3.1.0"
}
},
"os-tmpdir": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz",
"integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ="
},
"osenv": {
"version": "0.1.5",
"resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz",
"integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==",
"requires": {
"os-homedir": "^1.0.0",
"os-tmpdir": "^1.0.0"
}
},
"p-finally": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz",
@ -2829,8 +3118,7 @@
"path-is-absolute": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
"dev": true
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
},
"path-is-inside": {
"version": "1.0.2",
@ -2876,11 +3164,11 @@
"dev": true
},
"pino": {
"version": "5.13.3",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.3.tgz",
"integrity": "sha512-FL12DKlPwBlbhztlUz6kseR03PRR8nD+wvLdN/Sji9UiBYYfSjX+k8ocU7/NwW55JdFRONTn3iACoelXnMFVVQ==",
"version": "5.13.4",
"resolved": "https://registry.npmjs.org/pino/-/pino-5.13.4.tgz",
"integrity": "sha512-heeg8m8FZY8Nl3nuuD+msJUmhamqoGl7JXoTExh9YpGajzz6LYbVByUqrjbf4sCEMYFsqdcqnTJWiSY660DraQ==",
"requires": {
"fast-redact": "^1.4.4",
"fast-redact": "^2.0.0",
"fast-safe-stringify": "^2.0.7",
"flatstr": "^1.0.9",
"pino-std-serializers": "^2.3.0",
@ -2985,15 +3273,14 @@
"integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A=="
},
"quick-format-unescaped": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.2.tgz",
"integrity": "sha512-FXTaCkwvpIlkdKeGDNgcq07SXWS383noQUuZjvdE1QcTt+eLuqof6/BDiEPqB59FWLie/l91+HtlJSw7iCViSA=="
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-3.0.3.tgz",
"integrity": "sha512-dy1yjycmn9blucmJLXOfZDx1ikZJUi6E8bBZLnhPG5gBrVhHXx2xVyqqgKBubVNEXmx51dBACMHpoMQK/N/AXQ=="
},
"rc": {
"version": "1.2.8",
"resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz",
"integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==",
"dev": true,
"requires": {
"deep-extend": "^0.6.0",
"ini": "~1.3.0",
@ -3141,6 +3428,14 @@
"resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.1.4.tgz",
"integrity": "sha512-5C9HXdzK8EAqN7JDif30jqsBzavB7wLpaubisuQIGHWf2gUXSpzy6ArX/+Da8RjFpagWsCn+pIgxTMAmKw9Zug=="
},
"rimraf": {
"version": "2.7.1",
"resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz",
"integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==",
"requires": {
"glob": "^7.1.3"
}
},
"safe-buffer": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
@ -3171,6 +3466,11 @@
"ret": "~0.2.0"
}
},
"safer-buffer": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
},
"sax": {
"version": "1.2.4",
"resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz",
@ -3182,9 +3482,9 @@
"integrity": "sha512-kMg4jXttRQzVyLebIDc+MRxCueJ/zsmHpCn59BRd0mZUCd+V02wNd7/Pds8Nyhv7jfLHo1KkUOzdIF7cRMU4LQ=="
},
"semaphore": {
"version": "1.0.5",
"resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.0.5.tgz",
"integrity": "sha1-tJJXbmavGT25XWXiXsU/Xxl5jWA="
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/semaphore/-/semaphore-1.1.0.tgz",
"integrity": "sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA=="
},
"semver": {
"version": "5.7.0",
@ -3205,6 +3505,11 @@
"resolved": "https://registry.npmjs.org/semver-store/-/semver-store-0.3.0.tgz",
"integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg=="
},
"set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc="
},
"set-value": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz",
@ -3495,7 +3800,6 @@
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz",
"integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==",
"dev": true,
"requires": {
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^4.0.0"
@ -3524,7 +3828,6 @@
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz",
"integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=",
"dev": true,
"requires": {
"ansi-regex": "^3.0.0"
}
@ -3543,8 +3846,7 @@
"strip-json-comments": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz",
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=",
"dev": true
"integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo="
},
"supports-color": {
"version": "5.5.0",
@ -3555,6 +3857,27 @@
"has-flag": "^3.0.0"
}
},
"tar": {
"version": "4.4.13",
"resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz",
"integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==",
"requires": {
"chownr": "^1.1.1",
"fs-minipass": "^1.2.5",
"minipass": "^2.8.6",
"minizlib": "^1.2.1",
"mkdirp": "^0.5.0",
"safe-buffer": "^5.1.2",
"yallist": "^3.0.3"
},
"dependencies": {
"yallist": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
"integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g=="
}
}
},
"term-size": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/term-size/-/term-size-1.2.0.tgz",
@ -3610,9 +3933,9 @@
"dev": true
},
"tiny-lru": {
"version": "6.1.0",
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-6.1.0.tgz",
"integrity": "sha512-lbz53M11ioFDKxPUBR2UVK7a8JolPZpSkzL0iXW60fpvU98P9+VqWQ7bGGJpGjqnIlILQzl9r+fikhqbcOs7bg=="
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.0.tgz",
"integrity": "sha512-9/K3P8iGWe7LAbjGit0beF+AXmUvbdxsFt3/wQtuGgIwPf6L1wE3+xgeUFtJgTz/3n13YO6dcpcQbRA5kLvfyw=="
},
"to-object-path": {
"version": "0.3.0",
@ -3744,11 +4067,11 @@
}
},
"universal-user-agent": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-2.1.0.tgz",
"integrity": "sha512-8itiX7G05Tu3mGDTdNY2fB4KJ8MgZLS54RdG6PkkfwMAavrXu1mV/lls/GABx9O3Rw4PnTtasxrvbMQoBYY92Q==",
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-4.0.0.tgz",
"integrity": "sha512-eM8knLpev67iBDizr/YtqkJsF3GK8gzDc6st/WKzrTuPtcsOKW/0IdL4cnMBsU69pOx0otavLWBDGTwg+dB0aA==",
"requires": {
"os-name": "^3.0.0"
"os-name": "^3.1.0"
}
},
"unset-value": {
@ -3892,6 +4215,14 @@
"isexe": "^2.0.0"
}
},
"wide-align": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz",
"integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==",
"requires": {
"string-width": "^1.0.2 || 2"
}
},
"widest-line": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/widest-line/-/widest-line-2.0.1.tgz",

10
package.json

@ -13,19 +13,19 @@
"devDependencies": {
"@types/dotenv": "^6.1.1",
"@types/jsonwebtoken": "^8.3.4",
"@types/lodash": "^4.14.138",
"@types/lodash": "^4.14.142",
"@types/uuid": "^3.4.5",
"nodemon": "^1.19.2",
"nodemon": "^1.19.3",
"npm-run-all": "^4.1.5",
"pino-pretty": "^3.2.1",
"typescript": "^3.6.3"
},
"dependencies": {
"@azure/cosmos": "^3.2.0",
"@azure/cosmos": "^3.3.3",
"@azure/storage-blob": "^10.5.0",
"argon2": "^0.24.1",
"argon2": "^0.25.0",
"dotenv": "^8.1.0",
"fastify": "^2.8.0",
"fastify": "^2.9.0",
"fastify-cors": "^2.1.3",
"fastify-helmet": "^3.0.1",
"jsonwebtoken": "^8.5.1",

147
src/plugins/api/apps.ts

@ -11,17 +11,14 @@ import {
import { Server, IncomingMessage, ServerResponse } from 'http'
import { appSchema, errorSchema } from '../../schemas'
import { getUsers } from '../../lib/collections'
import { generateString } from '../../lib/crypto'
import { containerFor, getItem, normalize } from '../../lib/database'
import { unauthorizedError, serverError, badRequestError, notFoundError } from '../../lib/errors'
import { APP_PARTITION_KEY } from '../../constants'
import {
App,
AppRevision,
} from '../../types/collections'
import { App, User } from '../../types/collections'
import { PluginOptions } from '../../types'
function appsRoute(server: FastifyInstance<Server, IncomingMessage, ServerResponse>) {
@ -64,16 +61,17 @@ function appsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRespon
const { resources: apps, requestCharge, continuation: newContinuation } = await container.items.query<App>(
`SELECT
a.id,
a.userId,
a.version,
a.name,
a.imageUrl,
a.coverImageUrl,
a.about,
a.websiteUrl,
a.companyName
a.rating,
a.created,
r.displayName,
r.imageUrl,
r.coverImageUrl,
r.about,
r.websiteUrl,
r.companyName
FROM Apps a JOIN r IN a.revisions[a.currentRevisionIndex]
a.created
FROM Apps a
WHERE a.pk = '${APP_PARTITION_KEY}' AND a.active = true ORDER BY a.${sort}`,
{
maxItemCount: 40,
@ -83,8 +81,14 @@ function appsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRespon
request.log.trace('Query: %d', requestCharge)
const users = await getUsers(server.database.client, apps.map(app => app.userId), request.log)
return {
apps,
apps: apps.map(app => ({
...app,
user: users.find(user => user.id === app.userId),
userId: undefined,
})),
continuation: newContinuation,
}
})
@ -122,22 +126,24 @@ function selfAppsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRe
if (!server.database) return serverError(reply)
if (!request.viewer) return unauthorizedError(reply)
const viewer = containerFor(server.database.client, 'Users').item(request.viewer.id, request.viewer.id).read<User>()
const { sort = 'created' } = request.query
const container = containerFor(server.database.client, 'Apps')
const { resources: apps, requestCharge, continuation: newContinuation } = await container.items.query<App>(
const { resources: apps, requestCharge } = await container.items.query<App>(
`SELECT
a.id,
a.version,
a.name,
a.imageUrl,
a.coverImageUrl,
a.about,
a.websiteUrl,
a.companyName
a.rating,
a.created,
r.displayName,
r.imageUrl,
r.coverImageUrl,
r.about,
r.websiteUrl,
r.companyName
FROM Apps a JOIN r IN a.revisions[a.currentRevisionIndex]
a.created
FROM Apps a
WHERE a.pk = '${APP_PARTITION_KEY}' AND a.userId = ${request.viewer.id} ORDER BY a.${sort}`,
{}
).fetchAll()
@ -145,16 +151,19 @@ function selfAppsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRe
request.log.trace('Query: %d', requestCharge)
return {
apps,
apps: apps.map(app => ({
...app,
user: viewer,
userId: undefined,
})),
}
})
}
function createRoute(server: FastifyInstance<Server, IncomingMessage, ServerResponse>) {
interface Body {
name: string
displayName: string
version: string
name: string
imageUrl?: string
coverImageUrl?: string
about?: string
@ -172,11 +181,10 @@ function createRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
schema: {
body: {
type: 'object',
required: ['name', 'displayName', 'version'],
required: ['version', 'name'],
properties: {
name: { type: 'string' },
displayName: { type: 'string' },
version: { type: 'string' },
name: { type: 'string' },
imageUrl: { type: 'string' },
coverImageUrl: { type: 'string' },
about: { type: 'string' },
@ -210,9 +218,8 @@ function createRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
const id = normalize(request.body.name)
const {
name,
displayName,
version,
name,
imageUrl,
coverImageUrl,
about,
@ -229,9 +236,12 @@ function createRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
const existingApp = await getItem<App>({ container, id })
if (existingApp) return badRequestError(reply, 'Name already used')
const revision: AppRevision = {
await container.items.create<App>({
id,
pk: APP_PARTITION_KEY,
userId: request.viewer.id,
version,
displayName,
name,
imageUrl,
coverImageUrl,
about,
@ -243,20 +253,13 @@ function createRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
rendererSchema,
initCallbackUrl,
composeCallbackUrl,
}
await container.items.create<App>({
id,
pk: APP_PARTITION_KEY,
userId: request.viewer.id,
name,
version,
rating: 0,
revisions: [revision],
currentRevisionIndex: 0,
publicKey: generateString(20),
privateKey: generateString(40),
preinstall: false,
revisions: [],
active: false,
updated: Date.now(),
created: Date.now(),
})
@ -273,7 +276,7 @@ function updateRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
interface Body {
version: string
displayName?: string
name: string
imageUrl?: string
coverImageUrl?: string
about?: string
@ -283,18 +286,17 @@ function updateRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
composerSchema?: object
rendererUrl?: string
rendererSchema?: object
initCallbackUrl: string
composeCallbackUrl: string
initCallbackUrl?: string
composeCallbackUrl?: string
}
const options: RouteShorthandOptions = {
schema: {
body: {
type: 'object',
required: ['version'],
required: ['version', 'name'],
properties: {
version: { type: 'string' },
displayName: { type: 'string' },
imageUrl: { type: 'string' },
coverImageUrl: { type: 'string' },
about: { type: 'string' },
@ -319,11 +321,10 @@ function updateRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
if (!request.viewer) return unauthorizedError(reply)
const container = containerFor(server.database.client, 'Apps')
const id = request.params.id
const {
version,
displayName,
name,
imageUrl,
coverImageUrl,
about,
@ -341,31 +342,41 @@ function updateRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
const { resource: app } = await appItem.read<App>()
if (!app) return notFoundError(reply)
const revision = app.revisions[app.revisions.length - 1]
await appItem.replace<App>({
...app,
version,
name: name || app.name,
imageUrl,
coverImageUrl,
about,
websiteUrl,
companyName,
composerUrl,
composerSchema,
rendererUrl,
rendererSchema,
initCallbackUrl,
composeCallbackUrl,
revisions: [
...app.revisions,
{
...revision,
version,
displayName: displayName || revision.displayName,
imageUrl,
coverImageUrl,
about,
websiteUrl,
companyName,
composerUrl,
composerSchema,
rendererUrl,
rendererSchema,
initCallbackUrl,
composeCallbackUrl,
version: app.version,
name: app.name,
imageUrl: app.imageUrl,
coverImageUrl: app.coverImageUrl,
about: app.about,
websiteUrl: app.websiteUrl,
companyName: app.companyName,
composerUrl: app.composerUrl,
composerSchema: app.composerSchema,
rendererUrl: app.rendererUrl,
rendererSchema: app.rendererSchema,
initCallbackUrl: app.initCallbackUrl,
composeCallbackUrl: app.composeCallbackUrl,
created: app.updated,
}
],
currentRevisionIndex: app.currentRevisionIndex + 1,
version,
updated: Date.now(),
})
reply.code(201)

40
src/plugins/api/authentication.ts

@ -17,6 +17,7 @@ import { hashPassword, verifyPassword, JWT } from '../../lib/crypto'
import { containerFor, getItem, queryItems, normalize, createQuerySpec } from '../../lib/database'
import { badRequestError, badRequestFormError, unauthorizedError, serverError } from '../../lib/errors'
import { tokenFromHeader } from '../../lib/http'
import { createInstallationId } from '../../lib/utils'
import {
User,
@ -29,7 +30,8 @@ import {
UserPrivacyType,
GroupItemType,
GroupMembershipType,
GroupRegistrationType
GroupRegistrationType,
App,
} from '../../types/collections'
import { PluginOptions } from '../../types'
@ -133,6 +135,12 @@ function registerRoute(server: FastifyInstance<Server, IncomingMessage, ServerRe
}
}
const apps = await queryItems<App>({
container: containerFor(server.database.client, 'Apps'),
query: 'SELECT * FROM Apps a WHERE a.active = true AND a.preinstall = true',
logger: request.log,
})
const user: User = {
id,
pk: id,
@ -143,7 +151,12 @@ function registerRoute(server: FastifyInstance<Server, IncomingMessage, ServerRe
email,
emailVerified: false,
passwordHash: await hashPassword(password),
installations: [],
installations: apps.map(app => ({
id: createInstallationId(),
appId: app.id,
settings: {},
created: Date.now(),
})),
awards: 0,
points: 0,
balance: 0,
@ -338,7 +351,28 @@ function selfRoute(server: FastifyInstance<Server, IncomingMessage, ServerRespon
})
if (!viewer) return unauthorizedError(reply)
return viewer
const apps = await queryItems<User>({
container: containerFor(server.database.client, 'Apps'),
query: createQuerySpec(
`SELECT * FROM Apps a WHERE ARRAY_CONTAINS(@ids, a.id)`,
{
ids: viewer.installations.map(installation => installation.appId),
}
),
logger: request.log,
})
return {
...viewer,
installations: viewer.installations.map(installation => {
return {
...installation,
app: apps.find(app => app.id === installation.appId),
appId: undefined,
}
}),
}
})
}

13
src/plugins/api/groups.ts

@ -8,7 +8,6 @@ import {
DefaultHeaders,
} from 'fastify'
import { JSONObject } from '@azure/cosmos'
import { Server, IncomingMessage, ServerResponse } from 'http'
import merge from 'lodash/merge'
@ -307,10 +306,16 @@ function updateRoute(server: FastifyInstance<Server, IncomingMessage, ServerResp
const { resource: groupListing } = await groupListingItem.read<GroupListing>()
let updates: JSONObject = {}
interface Updates {
name?: string
about?: string
registration?: GroupRegistrationType
}
let updates: Updates = {}
if (request.body.name) updates.name = request.body.name
if (request.body.about) updates.about = request.body.about
if (request.body.registration) updates.registration = request.body.registration
if (request.body.registration) updates.registration = request.body.registration as GroupRegistrationType
await groupItem.replace<Group>({
...group,
@ -860,8 +865,6 @@ function logsRoute(server: FastifyInstance<Server, IncomingMessage, ServerRespon
}
).fetchAll()
request.log.debug('Logs: %o', logs)
request.log.trace('Query: %d', requestCharge)
const users = await getUsers(server.database.client, logs.map(log => log.userId), request.log)

41
src/schemas.ts

@ -45,6 +45,23 @@ export const userSchema: JSONSchema = {
},
}
export const appSchema: JSONSchema = {
type: 'object',
properties: {
id: { type: 'string' },
user: userSchema,
name: { type: 'string' },
displayName: { type: 'string' },
imageUrl: { type: 'string' },
coverImageUrl: { type: 'string' },
about: { type: 'string' },
websiteUrl: { type: 'string' },
companyName: { type: 'string' },
version: { type: 'string' },
created: { type: 'number' },
}
}
export const selfSchema: JSONSchema = {
type: 'object',
properties: {
@ -63,6 +80,14 @@ export const selfSchema: JSONSchema = {
coverImageUrl: { type: 'string' },
},
},
installations: {
type: 'object',
properties: {
app: appSchema,
settings: { type: 'object' },
created: { type: 'number' },
},
},
membership: { type: 'string' },
created: { type: 'number' },
},
@ -101,22 +126,6 @@ export const groupListingSchema: JSONSchema = {
},
}
export const appSchema: JSONSchema = {
type: 'object',
properties: {
id: { type: 'string' },
name: { type: 'string' },
displayName: { type: 'string' },
imageUrl: { type: 'string' },
coverImageUrl: { type: 'string' },
about: { type: 'string' },
websiteUrl: { type: 'string' },
companyName: { type: 'string' },
version: { type: 'string' },
created: { type: 'number' },
}
}
export const errorSchema: JSONSchema = {
type: 'object',
properties: {

21
src/types/collections.ts

@ -314,7 +314,7 @@ export interface Installation {
export interface AppRevision {
version: string
displayName: string
name: string
imageUrl?: string
coverImageUrl?: string
about?: string
@ -326,19 +326,32 @@ export interface AppRevision {
rendererSchema?: object
initCallbackUrl?: string
composeCallbackUrl?: string
created: number
}
export interface App {
id: string
pk: typeof APP_PARTITION_KEY
userId: string
name: string
version: string
name: string
imageUrl?: string
coverImageUrl?: string
about?: string
websiteUrl?: string
companyName?: string
composerUrl?: string
composerSchema?: object
rendererUrl?: string
rendererSchema?: object
initCallbackUrl?: string
composeCallbackUrl?: string
rating: number
revisions: AppRevision[]
currentRevisionIndex: number
publicKey: string
privateKey: string
preinstall: boolean
revisions: AppRevision[]
active: boolean
updated: number
created: number
}
Loading…
Cancel
Save