From 501d4164d30c6a126906dc640cdfdc82207ba34a Mon Sep 17 00:00:00 2001 From: David Luecke Date: Thu, 8 Apr 2021 16:17:09 -0700 Subject: [PATCH] feat(dependencies): Remove direct debug dependency (#2296) --- package-lock.json | 496 ++++++++---------- packages/authentication-client/package.json | 3 +- packages/authentication-local/package.json | 2 +- .../src/hooks/hash-password.ts | 4 +- packages/authentication-local/src/strategy.ts | 4 +- packages/authentication-oauth/package.json | 2 +- packages/authentication-oauth/src/express.ts | 4 +- packages/authentication-oauth/src/index.ts | 4 +- packages/authentication-oauth/src/strategy.ts | 4 +- packages/authentication/package.json | 2 +- packages/authentication/src/core.ts | 4 +- .../authentication/src/hooks/authenticate.ts | 4 +- packages/authentication/src/hooks/event.ts | 4 +- packages/authentication/src/jwt.ts | 4 +- packages/authentication/src/service.ts | 4 +- packages/commons/src/debug.ts | 26 + packages/commons/src/index.ts | 2 + packages/commons/test/debug.test.ts | 30 ++ packages/configuration/package.json | 4 +- packages/configuration/src/index.ts | 4 +- packages/express/package.json | 1 - packages/express/src/authentication.ts | 4 +- packages/express/src/index.ts | 4 +- packages/express/src/rest.ts | 4 +- packages/feathers/package.json | 1 - packages/feathers/src/application.ts | 5 +- packages/feathers/src/events.ts | 4 +- packages/feathers/src/index.ts | 6 +- packages/feathers/src/service.ts | 2 +- packages/socketio/package.json | 2 +- packages/socketio/src/index.ts | 6 +- packages/socketio/src/middleware.ts | 4 +- packages/transport-commons/package.json | 1 - .../transport-commons/src/channels/index.ts | 6 +- .../transport-commons/src/channels/mixins.ts | 6 +- packages/transport-commons/src/client.ts | 4 +- .../transport-commons/src/socket/index.ts | 4 +- .../transport-commons/src/socket/utils.ts | 8 +- 38 files changed, 352 insertions(+), 331 deletions(-) create mode 100644 packages/commons/src/debug.ts create mode 100644 packages/commons/test/debug.test.ts diff --git a/package-lock.json b/package-lock.json index b7fcda6889..8a467654bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,7 +27,6 @@ "babel-loader": "^8.2.2", "bcryptjs": "^2.4.3", "config": "^3.3.6", - "debug": "^4.3.1", "events": "^3.3.0", "express": "^4.17.1", "express-session": "^1.17.1", @@ -2632,9 +2631,9 @@ } }, "node_modules/@octokit/core": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.3.2.tgz", - "integrity": "sha512-Jx83n4tuX/z7QtxnPsAKxXPzH3vANtKmlCB3W3vt18JbkEaBYm+C8dgAlA1FNtqNk3L21pxsKNbWkUQAhiV7ng==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.4.0.tgz", + "integrity": "sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==", "dev": true, "dependencies": { "@octokit/auth-token": "^2.4.4", @@ -2974,9 +2973,9 @@ "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==" }, "node_modules/@types/node-fetch": { - "version": "2.5.9", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.9.tgz", - "integrity": "sha512-6cUyqLK+JBsATAqNQqk10jURoBFrzfRCDh4kaYxg8ivKhRPIpyBgAvuY7zM/3E4AwsYJSh5HCHBCJRM4DsCTaQ==", + "version": "2.5.10", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.10.tgz", + "integrity": "sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ==", "dependencies": { "@types/node": "*", "form-data": "^3.0.0" @@ -3041,13 +3040,13 @@ "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.20.0.tgz", - "integrity": "sha512-sw+3HO5aehYqn5w177z2D82ZQlqHCwcKSMboueo7oE4KU9QiC0SAgfS/D4z9xXvpTc8Bt41Raa9fBR8T2tIhoQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.21.0.tgz", + "integrity": "sha512-FPUyCPKZbVGexmbCFI3EQHzCZdy2/5f+jv6k2EDljGdXSRc0cKvbndd2nHZkSLqCNOPk0jB6lGzwIkglXcYVsQ==", "dev": true, "dependencies": { - "@typescript-eslint/experimental-utils": "4.20.0", - "@typescript-eslint/scope-manager": "4.20.0", + "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/scope-manager": "4.21.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -3073,15 +3072,15 @@ } }, "node_modules/@typescript-eslint/experimental-utils": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.20.0.tgz", - "integrity": "sha512-sQNlf6rjLq2yB5lELl3gOE7OuoA/6IVXJUJ+Vs7emrQMva14CkOwyQwD7CW+TkmOJ4Q/YGmoDLmbfFrpGmbKng==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz", + "integrity": "sha512-cEbgosW/tUFvKmkg3cU7LBoZhvUs+ZPVM9alb25XvR0dal4qHL3SiUqHNrzoWSxaXA9gsifrYrS1xdDV6w/gIA==", "dev": true, "dependencies": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.20.0", - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" }, @@ -3097,14 +3096,14 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.20.0.tgz", - "integrity": "sha512-m6vDtgL9EABdjMtKVw5rr6DdeMCH3OA1vFb0dAyuZSa3e5yw1YRzlwFnm9knma9Lz6b2GPvoNSa8vOXrqsaglA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.21.0.tgz", + "integrity": "sha512-eyNf7QmE5O/l1smaQgN0Lj2M/1jOuNg2NrBm1dqqQN0sVngTLyw8tdCbih96ixlhbF1oINoN8fDCyEH9SjLeIA==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "4.20.0", - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "debug": "^4.1.1" }, "engines": { @@ -3124,13 +3123,13 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz", - "integrity": "sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz", + "integrity": "sha512-kfOjF0w1Ix7+a5T1knOw00f7uAP9Gx44+OEsNQi0PvvTPLYeXJlsCJ4tYnDj5PQEYfpcgOH5yBlw7K+UEI9Agw==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/visitor-keys": "4.20.0" + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0" }, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" @@ -3141,9 +3140,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.20.0.tgz", - "integrity": "sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.21.0.tgz", + "integrity": "sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w==", "dev": true, "engines": { "node": "^8.10.0 || ^10.13.0 || >=11.10.1" @@ -3154,13 +3153,13 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz", - "integrity": "sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz", + "integrity": "sha512-ZD3M7yLaVGVYLw4nkkoGKumb7Rog7QID9YOWobFDMQKNl+vPxqVIW/uDk+MDeGc+OHcoG2nJ2HphwiPNajKw3w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/visitor-keys": "4.20.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -3181,12 +3180,12 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz", - "integrity": "sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz", + "integrity": "sha512-dH22dROWGi5Z6p+Igc8bLVLmwy7vEe8r+8c+raPQU0LxgogPUrRAtRGtvBWmlr9waTu3n+QLt/qrS/hWzk1x5w==", "dev": true, "dependencies": { - "@typescript-eslint/types": "4.20.0", + "@typescript-eslint/types": "4.21.0", "eslint-visitor-keys": "^2.0.0" }, "engines": { @@ -3622,9 +3621,9 @@ } }, "node_modules/anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -5143,9 +5142,9 @@ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" }, "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/base64-arraybuffer": { "version": "0.1.4", @@ -5197,9 +5196,9 @@ "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" }, "node_modules/before-after-hook": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.0.tgz", - "integrity": "sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz", + "integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==", "dev": true }, "node_modules/big.js": { @@ -5302,9 +5301,9 @@ } }, "node_modules/boxen": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.0.tgz", - "integrity": "sha512-5bvsqw+hhgUi3oYGK0Vf4WpIkyemp60WBInn7+WNfoISzAqk/HX4L7WNROq38E6UR/y3YADpv6pEm4BfkeEAdA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", + "integrity": "sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==", "dev": true, "dependencies": { "ansi-align": "^3.0.0", @@ -5615,9 +5614,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001205", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", - "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==" + "version": "1.0.30001208", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", + "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==" }, "node_modules/caseless": { "version": "0.12.0", @@ -6343,9 +6342,9 @@ "hasInstallScript": true }, "node_modules/core-js-compat": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", - "integrity": "sha512-9yVewub2MXNYyGvuLnMHcN1k9RkvB7/ofktpeKTIaASyB88YYqGzUnu0ywMMhJrDHOMiTjSHWGzR+i7Wb9Z1kQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.1.tgz", + "integrity": "sha512-ZHQTdTPkqvw2CeHiZC970NNJcnwzT6YIueDMASKt+p3WbZsLXOcoD392SkcWhkC0wBBHhlfhqGKKsNCQUozYtg==", "dependencies": { "browserslist": "^4.16.3", "semver": "7.0.0" @@ -6834,9 +6833,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "node_modules/electron-to-chromium": { - "version": "1.3.704", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.704.tgz", - "integrity": "sha512-6cz0jvawlUe4h5AbfQWxPzb+8LzVyswGAWiGc32EJEmfj39HTQyNPkLXirc7+L4x5I6RgRkzua8Ryu5QZqc8cA==" + "version": "1.3.710", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.710.tgz", + "integrity": "sha512-b3r0E2o4yc7mNmBeJviejF1rEx49PUBi+2NPa7jHEX3arkAXnVgLhR0YmV8oi6/Qf3HH2a8xzQmCjHNH0IpXWQ==" }, "node_modules/elliptic": { "version": "6.5.4", @@ -7032,9 +7031,9 @@ } }, "node_modules/envinfo": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.4.tgz", - "integrity": "sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==", + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", "bin": { "envinfo": "dist/cli.js" }, @@ -9345,9 +9344,9 @@ } }, "node_modules/hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, "node_modules/html-escaper": { "version": "2.0.2", @@ -11538,9 +11537,9 @@ } }, "node_modules/map-obj": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.0.tgz", - "integrity": "sha512-NAq0fCmZYGz9UFEQyndp7sisrow4GroyGeKluyKC/chuITZsPyOyC1UJZPJlVFImhXdROIP5xqouRLThT3BbpQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", "dev": true, "engines": { "node": ">=8" @@ -11887,19 +11886,19 @@ } }, "node_modules/mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==", + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==", "engines": { "node": ">= 0.6" } }, "node_modules/mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "dependencies": { - "mime-db": "1.46.0" + "mime-db": "1.47.0" }, "engines": { "node": ">= 0.6" @@ -12427,14 +12426,14 @@ } }, "node_modules/mongodb": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", - "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.6.tgz", + "integrity": "sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==", "dependencies": { "bl": "^2.2.1", "bson": "^1.1.4", "denque": "^1.4.1", - "require_optional": "^1.0.1", + "optional-require": "^1.0.2", "safe-buffer": "^5.1.2" }, "engines": { @@ -12753,35 +12752,35 @@ } }, "node_modules/npm-check-updates": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.3.0.tgz", - "integrity": "sha512-7GMDj40cWw/nRn3BsN+20ca3T6CvHqIiFhooVa5a3VybrS7TNBdbR3/BIi9dw4vFORgFZw/OsW3ZtRTFamnPDQ==", + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.4.1.tgz", + "integrity": "sha512-bWElM5CeJ9gA/wvtqB4ljcKzAZ3BlPM2g/7mVi8mPdCR2N6dhgS4q5GCzQn4ZvpeKSFll3bUGkiR/lgSQOlN8Q==", "dev": true, "dependencies": { "chalk": "^4.1.0", "cint": "^8.2.1", - "cli-table": "^0.3.5", + "cli-table": "^0.3.6", "commander": "^6.2.1", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", - "globby": "^11.0.2", - "hosted-git-info": "^4.0.0", + "globby": "^11.0.3", + "hosted-git-info": "^4.0.2", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", - "mem": "^8.0.0", + "mem": "^8.1.0", "minimatch": "^3.0.4", "p-map": "^4.0.0", - "pacote": "^11.3.0", + "pacote": "^11.3.1", "parse-github-url": "^1.0.2", "progress": "^2.0.3", - "prompts": "^2.4.0", + "prompts": "^2.4.1", "rc-config-loader": "^4.0.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", - "semver": "^7.3.4", + "semver": "^7.3.5", "semver-utils": "^1.1.4", "spawn-please": "^1.0.0", "update-notifier": "^5.1.0" @@ -13099,9 +13098,9 @@ } }, "node_modules/nyc/node_modules/y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "node_modules/nyc/node_modules/yargs": { @@ -13284,6 +13283,14 @@ "node": ">=6" } }, + "node_modules/optional-require": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.2.tgz", + "integrity": "sha512-HZubVd6IfHsbnpdNF/ICaSAzBUEW1TievpkjY3tB4Jnk8L7+pJ3conPzUt3Mn/6OZx9uzTDOHYPGA8/AxYHBOg==", + "engines": { + "node": ">=4" + } + }, "node_modules/optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -14995,9 +15002,9 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "node_modules/repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==", "engines": { "node": ">=0.10.0" } @@ -15092,31 +15099,6 @@ "uuid": "bin/uuid" } }, - "node_modules/require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "dependencies": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - } - }, - "node_modules/require_optional/node_modules/resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require_optional/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "bin": { - "semver": "bin/semver" - } - }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -16145,9 +16127,9 @@ } }, "node_modules/table/node_modules/ajv": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.3.tgz", - "integrity": "sha512-Df6NAivu9KpZw+q8ySijAgLvr1mUA5ihkRvCLCxpdYR21ann5yIuN+PpFxmweSj7i3yjJ0x5LN5KVs0RRzskAQ==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.5.tgz", + "integrity": "sha512-RkiLa/AeJx7+9OvniQ/qeWu0w74A8DiPPBclQ6ji3ZQkv5KamO+QGpqmi7O4JIw3rHGUXZ6CoP9tsAkn3gyazg==", "dev": true, "dependencies": { "fast-deep-equal": "^3.1.1", @@ -16657,9 +16639,9 @@ } }, "node_modules/typescript": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", - "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -17026,9 +17008,9 @@ } }, "node_modules/webpack": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.30.0.tgz", - "integrity": "sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.31.0.tgz", + "integrity": "sha512-3fUfZT/FUuThWSSyL32Fsh7weUUfYP/Fjc/cGSbla5KiSo0GtI1JMssCRUopJTvmLjrw05R2q7rlLtiKdSzkzQ==", "dependencies": { "@types/eslint-scope": "^3.7.0", "@types/estree": "^0.0.46", @@ -17548,9 +17530,9 @@ } }, "node_modules/y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==", + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", "engines": { "node": ">=10" } @@ -19764,9 +19746,9 @@ } }, "@octokit/core": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.3.2.tgz", - "integrity": "sha512-Jx83n4tuX/z7QtxnPsAKxXPzH3vANtKmlCB3W3vt18JbkEaBYm+C8dgAlA1FNtqNk3L21pxsKNbWkUQAhiV7ng==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.4.0.tgz", + "integrity": "sha512-6/vlKPP8NF17cgYXqucdshWqmMZGXkuvtcrWCgU5NOI0Pl2GjlmZyWgBMrU8zJ3v2MJlM6++CiB45VKYmhiWWg==", "dev": true, "requires": { "@octokit/auth-token": "^2.4.4", @@ -20088,9 +20070,9 @@ "integrity": "sha512-XYmBiy+ohOR4Lh5jE379fV2IU+6Jn4g5qASinhitfyO71b/sCo6MKsMLF5tc7Zf2CE8hViVQyYSobJNke8OvUw==" }, "@types/node-fetch": { - "version": "2.5.9", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.9.tgz", - "integrity": "sha512-6cUyqLK+JBsATAqNQqk10jURoBFrzfRCDh4kaYxg8ivKhRPIpyBgAvuY7zM/3E4AwsYJSh5HCHBCJRM4DsCTaQ==", + "version": "2.5.10", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.10.tgz", + "integrity": "sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ==", "requires": { "@types/node": "*", "form-data": "^3.0.0" @@ -20154,13 +20136,13 @@ "integrity": "sha512-eQ9qFW/fhfGJF8WKHGEHZEyVWfZxrT+6CLIJGBcZPfxUh/+BnEj+UCGYMlr9qZuX/2AltsvwrGqp0LhEW8D0zQ==" }, "@typescript-eslint/eslint-plugin": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.20.0.tgz", - "integrity": "sha512-sw+3HO5aehYqn5w177z2D82ZQlqHCwcKSMboueo7oE4KU9QiC0SAgfS/D4z9xXvpTc8Bt41Raa9fBR8T2tIhoQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.21.0.tgz", + "integrity": "sha512-FPUyCPKZbVGexmbCFI3EQHzCZdy2/5f+jv6k2EDljGdXSRc0cKvbndd2nHZkSLqCNOPk0jB6lGzwIkglXcYVsQ==", "dev": true, "requires": { - "@typescript-eslint/experimental-utils": "4.20.0", - "@typescript-eslint/scope-manager": "4.20.0", + "@typescript-eslint/experimental-utils": "4.21.0", + "@typescript-eslint/scope-manager": "4.21.0", "debug": "^4.1.1", "functional-red-black-tree": "^1.0.1", "lodash": "^4.17.15", @@ -20170,55 +20152,55 @@ } }, "@typescript-eslint/experimental-utils": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.20.0.tgz", - "integrity": "sha512-sQNlf6rjLq2yB5lELl3gOE7OuoA/6IVXJUJ+Vs7emrQMva14CkOwyQwD7CW+TkmOJ4Q/YGmoDLmbfFrpGmbKng==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.21.0.tgz", + "integrity": "sha512-cEbgosW/tUFvKmkg3cU7LBoZhvUs+ZPVM9alb25XvR0dal4qHL3SiUqHNrzoWSxaXA9gsifrYrS1xdDV6w/gIA==", "dev": true, "requires": { "@types/json-schema": "^7.0.3", - "@typescript-eslint/scope-manager": "4.20.0", - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "eslint-scope": "^5.0.0", "eslint-utils": "^2.0.0" } }, "@typescript-eslint/parser": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.20.0.tgz", - "integrity": "sha512-m6vDtgL9EABdjMtKVw5rr6DdeMCH3OA1vFb0dAyuZSa3e5yw1YRzlwFnm9knma9Lz6b2GPvoNSa8vOXrqsaglA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-4.21.0.tgz", + "integrity": "sha512-eyNf7QmE5O/l1smaQgN0Lj2M/1jOuNg2NrBm1dqqQN0sVngTLyw8tdCbih96ixlhbF1oINoN8fDCyEH9SjLeIA==", "dev": true, "requires": { - "@typescript-eslint/scope-manager": "4.20.0", - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/typescript-estree": "4.20.0", + "@typescript-eslint/scope-manager": "4.21.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/typescript-estree": "4.21.0", "debug": "^4.1.1" } }, "@typescript-eslint/scope-manager": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.20.0.tgz", - "integrity": "sha512-/zm6WR6iclD5HhGpcwl/GOYDTzrTHmvf8LLLkwKqqPKG6+KZt/CfSgPCiybshmck66M2L5fWSF/MKNuCwtKQSQ==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.21.0.tgz", + "integrity": "sha512-kfOjF0w1Ix7+a5T1knOw00f7uAP9Gx44+OEsNQi0PvvTPLYeXJlsCJ4tYnDj5PQEYfpcgOH5yBlw7K+UEI9Agw==", "dev": true, "requires": { - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/visitor-keys": "4.20.0" + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0" } }, "@typescript-eslint/types": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.20.0.tgz", - "integrity": "sha512-cYY+1PIjei1nk49JAPnH1VEnu7OYdWRdJhYI5wiKOUMhLTG1qsx5cQxCUTuwWCmQoyriadz3Ni8HZmGSofeC+w==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.21.0.tgz", + "integrity": "sha512-+OQaupjGVVc8iXbt6M1oZMwyKQNehAfLYJJ3SdvnofK2qcjfor9pEM62rVjBknhowTkh+2HF+/KdRAc/wGBN2w==", "dev": true }, "@typescript-eslint/typescript-estree": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.20.0.tgz", - "integrity": "sha512-Knpp0reOd4ZsyoEJdW8i/sK3mtZ47Ls7ZHvD8WVABNx5Xnn7KhenMTRGegoyMTx6TiXlOVgMz9r0pDgXTEEIHA==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.21.0.tgz", + "integrity": "sha512-ZD3M7yLaVGVYLw4nkkoGKumb7Rog7QID9YOWobFDMQKNl+vPxqVIW/uDk+MDeGc+OHcoG2nJ2HphwiPNajKw3w==", "dev": true, "requires": { - "@typescript-eslint/types": "4.20.0", - "@typescript-eslint/visitor-keys": "4.20.0", + "@typescript-eslint/types": "4.21.0", + "@typescript-eslint/visitor-keys": "4.21.0", "debug": "^4.1.1", "globby": "^11.0.1", "is-glob": "^4.0.1", @@ -20227,12 +20209,12 @@ } }, "@typescript-eslint/visitor-keys": { - "version": "4.20.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.20.0.tgz", - "integrity": "sha512-NXKRM3oOVQL8yNFDNCZuieRIwZ5UtjNLYtmMx2PacEAGmbaEYtGgVHUHVyZvU/0rYZcizdrWjDo+WBtRPSgq+A==", + "version": "4.21.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.21.0.tgz", + "integrity": "sha512-dH22dROWGi5Z6p+Igc8bLVLmwy7vEe8r+8c+raPQU0LxgogPUrRAtRGtvBWmlr9waTu3n+QLt/qrS/hWzk1x5w==", "dev": true, "requires": { - "@typescript-eslint/types": "4.20.0", + "@typescript-eslint/types": "4.21.0", "eslint-visitor-keys": "^2.0.0" } }, @@ -20586,9 +20568,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -21941,9 +21923,9 @@ "integrity": "sha1-MasayLEpNjRj41s+u2n038+6eUc=" }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "base64-arraybuffer": { "version": "0.1.4", @@ -21975,9 +21957,9 @@ "integrity": "sha1-mrVie5PmBiH/fNrF2pczAn3x0Ms=" }, "before-after-hook": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.0.tgz", - "integrity": "sha512-jH6rKQIfroBbhEXVmI7XmXe3ix5S/PgJqpzdDPnR8JGLHWNYLsYZ6tK5iWOF/Ra3oqEX0NobXGlzbiylIzVphQ==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.1.tgz", + "integrity": "sha512-/6FKxSTWoJdbsLDF8tdIjaRiFXiE6UHsEHE3OPI/cwPURCVi1ukP0gmLn7XWEiFk5TcwQjjY5PWsU+j+tgXgmw==", "dev": true }, "big.js": { @@ -22072,9 +22054,9 @@ } }, "boxen": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.0.tgz", - "integrity": "sha512-5bvsqw+hhgUi3oYGK0Vf4WpIkyemp60WBInn7+WNfoISzAqk/HX4L7WNROq38E6UR/y3YADpv6pEm4BfkeEAdA==", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/boxen/-/boxen-5.0.1.tgz", + "integrity": "sha512-49VBlw+PrWEF51aCmy7QIteYPIFZxSpvqBdP/2itCPPlJ49kj9zg/XPRFrdkne2W+CfwXUls8exMvu1RysZpKA==", "dev": true, "requires": { "ansi-align": "^3.0.0", @@ -22299,9 +22281,9 @@ } }, "caniuse-lite": { - "version": "1.0.30001205", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001205.tgz", - "integrity": "sha512-TL1GrS5V6LElbitPazidkBMD9sa448bQDDLrumDqaggmKFcuU2JW1wTOHJPukAcOMtEmLcmDJEzfRrf+GjM0Og==" + "version": "1.0.30001208", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001208.tgz", + "integrity": "sha512-OE5UE4+nBOro8Dyvv0lfx+SRtfVIOM9uhKqFmJeUbGriqhhStgp1A0OyBpgy3OUF8AhYCT+PVwPC1gMl2ZcQMA==" }, "caseless": { "version": "0.12.0", @@ -22876,9 +22858,9 @@ "integrity": "sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ==" }, "core-js-compat": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", - "integrity": "sha512-9yVewub2MXNYyGvuLnMHcN1k9RkvB7/ofktpeKTIaASyB88YYqGzUnu0ywMMhJrDHOMiTjSHWGzR+i7Wb9Z1kQ==", + "version": "3.10.1", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.1.tgz", + "integrity": "sha512-ZHQTdTPkqvw2CeHiZC970NNJcnwzT6YIueDMASKt+p3WbZsLXOcoD392SkcWhkC0wBBHhlfhqGKKsNCQUozYtg==", "requires": { "browserslist": "^4.16.3", "semver": "7.0.0" @@ -23271,9 +23253,9 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" }, "electron-to-chromium": { - "version": "1.3.704", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.704.tgz", - "integrity": "sha512-6cz0jvawlUe4h5AbfQWxPzb+8LzVyswGAWiGc32EJEmfj39HTQyNPkLXirc7+L4x5I6RgRkzua8Ryu5QZqc8cA==" + "version": "1.3.710", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.710.tgz", + "integrity": "sha512-b3r0E2o4yc7mNmBeJviejF1rEx49PUBi+2NPa7jHEX3arkAXnVgLhR0YmV8oi6/Qf3HH2a8xzQmCjHNH0IpXWQ==" }, "elliptic": { "version": "6.5.4", @@ -23420,9 +23402,9 @@ "dev": true }, "envinfo": { - "version": "7.7.4", - "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.7.4.tgz", - "integrity": "sha512-TQXTYFVVwwluWSFis6K2XKxgrD22jEv0FTuLCQI+OjH7rn93+iY0fSSFM5lrSxFY+H1+B0/cvvlamr3UsBivdQ==" + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==" }, "err-code": { "version": "2.0.3", @@ -25223,9 +25205,9 @@ } }, "hosted-git-info": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", - "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==" + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==" }, "html-escaper": { "version": "2.0.2", @@ -26977,9 +26959,9 @@ } }, "map-obj": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.0.tgz", - "integrity": "sha512-NAq0fCmZYGz9UFEQyndp7sisrow4GroyGeKluyKC/chuITZsPyOyC1UJZPJlVFImhXdROIP5xqouRLThT3BbpQ==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.2.1.tgz", + "integrity": "sha512-+WA2/1sPmDj1dlvvJmB5G6JKfY9dpn7EVBUL06+y6PoljPkh+6V1QihwxNkbcGxCRjt2b0F9K0taiCuo7MbdFQ==", "dev": true }, "marko": { @@ -27249,16 +27231,16 @@ "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==" }, "mime-db": { - "version": "1.46.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.46.0.tgz", - "integrity": "sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==" + "version": "1.47.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.47.0.tgz", + "integrity": "sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw==" }, "mime-types": { - "version": "2.1.29", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.29.tgz", - "integrity": "sha512-Y/jMt/S5sR9OaqteJtslsFZKWOIIqMACsJSiHghlCAyhf7jfVYjKBmLiX8OgpWeW+fjJ2b+Az69aPFPkUOY6xQ==", + "version": "2.1.30", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.30.tgz", + "integrity": "sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg==", "requires": { - "mime-db": "1.46.0" + "mime-db": "1.47.0" } }, "mimic-fn": { @@ -27673,14 +27655,14 @@ "dev": true }, "mongodb": { - "version": "3.6.5", - "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.5.tgz", - "integrity": "sha512-mQlYKw1iGbvJJejcPuyTaytq0xxlYbIoVDm2FODR+OHxyEiMR021vc32bTvamgBjCswsD54XIRwhg3yBaWqJjg==", + "version": "3.6.6", + "resolved": "https://registry.npmjs.org/mongodb/-/mongodb-3.6.6.tgz", + "integrity": "sha512-WlirMiuV1UPbej5JeCMqE93JRfZ/ZzqE7nJTwP85XzjAF4rRSeq2bGCb1cjfoHLOF06+HxADaPGqT0g3SbVT1w==", "requires": { "bl": "^2.2.1", "bson": "^1.1.4", "denque": "^1.4.1", - "require_optional": "^1.0.1", + "optional-require": "^1.0.2", "safe-buffer": "^5.1.2", "saslprep": "^1.0.0" } @@ -27920,35 +27902,35 @@ } }, "npm-check-updates": { - "version": "11.3.0", - "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.3.0.tgz", - "integrity": "sha512-7GMDj40cWw/nRn3BsN+20ca3T6CvHqIiFhooVa5a3VybrS7TNBdbR3/BIi9dw4vFORgFZw/OsW3ZtRTFamnPDQ==", + "version": "11.4.1", + "resolved": "https://registry.npmjs.org/npm-check-updates/-/npm-check-updates-11.4.1.tgz", + "integrity": "sha512-bWElM5CeJ9gA/wvtqB4ljcKzAZ3BlPM2g/7mVi8mPdCR2N6dhgS4q5GCzQn4ZvpeKSFll3bUGkiR/lgSQOlN8Q==", "dev": true, "requires": { "chalk": "^4.1.0", "cint": "^8.2.1", - "cli-table": "^0.3.5", + "cli-table": "^0.3.6", "commander": "^6.2.1", "find-up": "5.0.0", "fp-and-or": "^0.1.3", "get-stdin": "^8.0.0", - "globby": "^11.0.2", - "hosted-git-info": "^4.0.0", + "globby": "^11.0.3", + "hosted-git-info": "^4.0.2", "json-parse-helpfulerror": "^1.0.3", "jsonlines": "^0.1.1", "libnpmconfig": "^1.2.1", "lodash": "^4.17.21", - "mem": "^8.0.0", + "mem": "^8.1.0", "minimatch": "^3.0.4", "p-map": "^4.0.0", - "pacote": "^11.3.0", + "pacote": "^11.3.1", "parse-github-url": "^1.0.2", "progress": "^2.0.3", - "prompts": "^2.4.0", + "prompts": "^2.4.1", "rc-config-loader": "^4.0.0", "remote-git-tags": "^3.0.0", "rimraf": "^3.0.2", - "semver": "^7.3.4", + "semver": "^7.3.5", "semver-utils": "^1.1.4", "spawn-please": "^1.0.0", "update-notifier": "^5.1.0" @@ -28205,9 +28187,9 @@ } }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", "dev": true }, "yargs": { @@ -28340,6 +28322,11 @@ } } }, + "optional-require": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/optional-require/-/optional-require-1.0.2.tgz", + "integrity": "sha512-HZubVd6IfHsbnpdNF/ICaSAzBUEW1TievpkjY3tB4Jnk8L7+pJ3conPzUt3Mn/6OZx9uzTDOHYPGA8/AxYHBOg==" + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -29684,9 +29671,9 @@ "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=" }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" }, "repeat-string": { "version": "1.6.1", @@ -29758,27 +29745,6 @@ "uuid": "^8.3.2" } }, - "require_optional": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require_optional/-/require_optional-1.0.1.tgz", - "integrity": "sha512-qhM/y57enGWHAe3v/NcwML6a3/vfESLe/sGM2dII+gEO0BpKRUkWZow/tyloNqJyN6kXSl3RyyM8Ll5D/sJP8g==", - "requires": { - "resolve-from": "^2.0.0", - "semver": "^5.1.0" - }, - "dependencies": { - "resolve-from": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz", - "integrity": "sha1-lICrIOlP+h2egKgEx+oUdhGWa1c=" - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" - } - } - }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -30566,9 +30532,9 @@ }, "dependencies": { "ajv": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.3.tgz", - "integrity": "sha512-Df6NAivu9KpZw+q8ySijAgLvr1mUA5ihkRvCLCxpdYR21ann5yIuN+PpFxmweSj7i3yjJ0x5LN5KVs0RRzskAQ==", + "version": "8.0.5", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.5.tgz", + "integrity": "sha512-RkiLa/AeJx7+9OvniQ/qeWu0w74A8DiPPBclQ6ji3ZQkv5KamO+QGpqmi7O4JIw3rHGUXZ6CoP9tsAkn3gyazg==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -30955,9 +30921,9 @@ } }, "typescript": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.3.tgz", - "integrity": "sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw==" + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==" }, "uglify-js": { "version": "3.13.3", @@ -31251,9 +31217,9 @@ "dev": true }, "webpack": { - "version": "5.30.0", - "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.30.0.tgz", - "integrity": "sha512-Zr9NIri5yzpfmaMea2lSMV1UygbW0zQsSlGLMgKUm63ACXg6alhd1u4v5UBSBjzYKXJN6BNMGVM7w165e7NxYA==", + "version": "5.31.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.31.0.tgz", + "integrity": "sha512-3fUfZT/FUuThWSSyL32Fsh7weUUfYP/Fjc/cGSbla5KiSo0GtI1JMssCRUopJTvmLjrw05R2q7rlLtiKdSzkzQ==", "requires": { "@types/eslint-scope": "^3.7.0", "@types/estree": "^0.0.46", @@ -31633,9 +31599,9 @@ "dev": true }, "y18n": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.5.tgz", - "integrity": "sha512-hsRUr4FFrvhhRH12wOdfs38Gy7k2FFzB9qgN9v3aLykRq0dRcdcpz5C9FxdS2NuhOrI/628b/KSTJ3rwHysYSg==" + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" }, "yallist": { "version": "4.0.0", diff --git a/packages/authentication-client/package.json b/packages/authentication-client/package.json index e858d898a1..19164161a3 100644 --- a/packages/authentication-client/package.json +++ b/packages/authentication-client/package.json @@ -55,8 +55,7 @@ "@feathersjs/authentication": "^5.0.0-pre.2", "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/errors": "^5.0.0-pre.2", - "@feathersjs/feathers": "^5.0.0-pre.2", - "debug": "^4.3.1" + "@feathersjs/feathers": "^5.0.0-pre.2" }, "devDependencies": { "@feathersjs/adapter-memory": "^5.0.0-pre.2", diff --git a/packages/authentication-local/package.json b/packages/authentication-local/package.json index a6eeca0d9e..13e2fd6b79 100644 --- a/packages/authentication-local/package.json +++ b/packages/authentication-local/package.json @@ -53,10 +53,10 @@ }, "dependencies": { "@feathersjs/authentication": "^5.0.0-pre.2", + "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/errors": "^5.0.0-pre.2", "@feathersjs/feathers": "^5.0.0-pre.2", "bcryptjs": "^2.4.3", - "debug": "^4.3.1", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/packages/authentication-local/src/hooks/hash-password.ts b/packages/authentication-local/src/hooks/hash-password.ts index 404eb59c7e..d2be8f8cca 100644 --- a/packages/authentication-local/src/hooks/hash-password.ts +++ b/packages/authentication-local/src/hooks/hash-password.ts @@ -2,11 +2,11 @@ import get from 'lodash/get'; import set from 'lodash/set'; import cloneDeep from 'lodash/cloneDeep'; import { BadRequest } from '@feathersjs/errors'; -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; import { HookContext } from '@feathersjs/feathers'; import { LocalStrategy } from '../strategy'; -const debug = Debug('@feathersjs/authentication-local/hooks/hash-password'); +const debug = createDebug('@feathersjs/authentication-local/hooks/hash-password'); export interface HashPasswordOptions { authentication?: string; diff --git a/packages/authentication-local/src/strategy.ts b/packages/authentication-local/src/strategy.ts index 41a5fd4f00..2cb5cee61b 100644 --- a/packages/authentication-local/src/strategy.ts +++ b/packages/authentication-local/src/strategy.ts @@ -2,14 +2,14 @@ import bcrypt from 'bcryptjs'; import get from 'lodash/get'; import omit from 'lodash/omit'; -import Debug from 'debug'; import { NotAuthenticated } from '@feathersjs/errors'; import { Query, Params } from '@feathersjs/feathers'; import { AuthenticationRequest, AuthenticationBaseStrategy } from '@feathersjs/authentication'; +import { createDebug } from '@feathersjs/commons'; -const debug = Debug('@feathersjs/authentication-local/strategy'); +const debug = createDebug('@feathersjs/authentication-local/strategy'); export class LocalStrategy extends AuthenticationBaseStrategy { verifyConfiguration () { diff --git a/packages/authentication-oauth/package.json b/packages/authentication-oauth/package.json index cc7cab3402..250f1aa19b 100644 --- a/packages/authentication-oauth/package.json +++ b/packages/authentication-oauth/package.json @@ -53,10 +53,10 @@ }, "dependencies": { "@feathersjs/authentication": "^5.0.0-pre.2", + "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/errors": "^5.0.0-pre.2", "@feathersjs/express": "^5.0.0-pre.2", "@feathersjs/feathers": "^5.0.0-pre.2", - "debug": "^4.3.1", "express-session": "^1.17.1", "grant": "^5.4.12", "lodash": "^4.17.21" diff --git a/packages/authentication-oauth/src/express.ts b/packages/authentication-oauth/src/express.ts index 1513071874..b9ea63f7a7 100644 --- a/packages/authentication-oauth/src/express.ts +++ b/packages/authentication-oauth/src/express.ts @@ -1,6 +1,6 @@ import grant from 'grant'; -import Debug from 'debug'; import session from 'express-session'; +import { createDebug } from '@feathersjs/commons'; import { Application } from '@feathersjs/feathers'; import { AuthenticationResult } from '@feathersjs/authentication'; import { @@ -11,7 +11,7 @@ import { OauthSetupSettings } from './utils'; import { OAuthStrategy } from './strategy'; const grantInstance = grant.express(); -const debug = Debug('@feathersjs/authentication-oauth/express'); +const debug = createDebug('@feathersjs/authentication-oauth/express'); declare module 'express-session' { interface SessionData { diff --git a/packages/authentication-oauth/src/index.ts b/packages/authentication-oauth/src/index.ts index 3f4ab0b41c..6d9f36aa6a 100644 --- a/packages/authentication-oauth/src/index.ts +++ b/packages/authentication-oauth/src/index.ts @@ -1,13 +1,13 @@ -import Debug from 'debug'; import merge from 'lodash/merge'; import each from 'lodash/each'; import omit from 'lodash/omit'; +import { createDebug } from '@feathersjs/commons'; import { Application } from '@feathersjs/feathers'; import { OAuthStrategy, OAuthProfile } from './strategy'; import { default as setupExpress } from './express'; import { OauthSetupSettings, getDefaultSettings } from './utils'; -const debug = Debug('@feathersjs/authentication-oauth'); +const debug = createDebug('@feathersjs/authentication-oauth'); export { OauthSetupSettings, OAuthStrategy, OAuthProfile }; diff --git a/packages/authentication-oauth/src/strategy.ts b/packages/authentication-oauth/src/strategy.ts index 7b5f07fe8d..f9883cc1ff 100644 --- a/packages/authentication-oauth/src/strategy.ts +++ b/packages/authentication-oauth/src/strategy.ts @@ -1,14 +1,14 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ // @ts-ignore import querystring from 'querystring'; -import Debug from 'debug'; import { AuthenticationRequest, AuthenticationBaseStrategy, AuthenticationResult } from '@feathersjs/authentication'; import { Params } from '@feathersjs/feathers'; import { NotAuthenticated } from '@feathersjs/errors'; +import { createDebug } from '@feathersjs/commons'; -const debug = Debug('@feathersjs/authentication-oauth/strategy'); +const debug = createDebug('@feathersjs/authentication-oauth/strategy'); export interface OAuthProfile { id?: string|number; diff --git a/packages/authentication/package.json b/packages/authentication/package.json index 94c13926dd..c4a3948110 100644 --- a/packages/authentication/package.json +++ b/packages/authentication/package.json @@ -52,11 +52,11 @@ "access": "public" }, "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/errors": "^5.0.0-pre.2", "@feathersjs/feathers": "^5.0.0-pre.2", "@feathersjs/transport-commons": "^5.0.0-pre.2", "@types/jsonwebtoken": "^8.5.1", - "debug": "^4.3.1", "jsonwebtoken": "^8.5.1", "lodash": "^4.17.21", "long-timeout": "^0.1.1", diff --git a/packages/authentication/src/core.ts b/packages/authentication/src/core.ts index 78dade4617..b462154828 100644 --- a/packages/authentication/src/core.ts +++ b/packages/authentication/src/core.ts @@ -2,12 +2,12 @@ import merge from 'lodash/merge'; import jsonwebtoken, { SignOptions, Secret, VerifyOptions } from 'jsonwebtoken'; import { v4 as uuidv4 } from 'uuid'; import { NotAuthenticated } from '@feathersjs/errors'; -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; import { Application, Params } from '@feathersjs/feathers'; import { IncomingMessage, ServerResponse } from 'http'; import defaultOptions from './options'; -const debug = Debug('@feathersjs/authentication/base'); +const debug = createDebug('@feathersjs/authentication/base'); export interface AuthenticationResult { [key: string]: any; diff --git a/packages/authentication/src/hooks/authenticate.ts b/packages/authentication/src/hooks/authenticate.ts index 28f8671efc..48e23a0cf2 100644 --- a/packages/authentication/src/hooks/authenticate.ts +++ b/packages/authentication/src/hooks/authenticate.ts @@ -2,9 +2,9 @@ import flatten from 'lodash/flatten'; import omit from 'lodash/omit'; import { HookContext } from '@feathersjs/feathers'; import { NotAuthenticated } from '@feathersjs/errors'; -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; -const debug = Debug('@feathersjs/authentication/hooks/authenticate'); +const debug = createDebug('@feathersjs/authentication/hooks/authenticate'); export interface AuthenticateHookSettings { service?: string; diff --git a/packages/authentication/src/hooks/event.ts b/packages/authentication/src/hooks/event.ts index 1520f76f15..4ca8c55043 100644 --- a/packages/authentication/src/hooks/event.ts +++ b/packages/authentication/src/hooks/event.ts @@ -1,8 +1,8 @@ -import Debug from 'debug'; import { HookContext } from '@feathersjs/feathers'; +import { createDebug } from '@feathersjs/commons'; import { ConnectionEvent } from '../core'; -const debug = Debug('@feathersjs/authentication/hooks/connection'); +const debug = createDebug('@feathersjs/authentication/hooks/connection'); export default (event: ConnectionEvent) => async (context: HookContext) => { const { app, result, params } = context; diff --git a/packages/authentication/src/jwt.ts b/packages/authentication/src/jwt.ts index 8173c3a429..9620d5abc5 100644 --- a/packages/authentication/src/jwt.ts +++ b/packages/authentication/src/jwt.ts @@ -1,16 +1,16 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ -import Debug from 'debug'; import omit from 'lodash/omit'; import { IncomingMessage } from 'http'; import { NotAuthenticated } from '@feathersjs/errors'; import { Params } from '@feathersjs/feathers'; +import { createDebug } from '@feathersjs/commons'; // @ts-ignore import lt from 'long-timeout'; import { AuthenticationBaseStrategy } from './strategy'; import { AuthenticationRequest, AuthenticationResult, ConnectionEvent } from './core'; -const debug = Debug('@feathersjs/authentication/jwt'); +const debug = createDebug('@feathersjs/authentication/jwt'); const SPLIT_HEADER = /(\S+)\s+(\S+)/; export class JWTStrategy extends AuthenticationBaseStrategy { diff --git a/packages/authentication/src/service.ts b/packages/authentication/src/service.ts index 70866376d9..04ab7d9e3e 100644 --- a/packages/authentication/src/service.ts +++ b/packages/authentication/src/service.ts @@ -1,13 +1,13 @@ -import Debug from 'debug'; import merge from 'lodash/merge'; import { NotAuthenticated } from '@feathersjs/errors'; import { AuthenticationBase, AuthenticationResult, AuthenticationRequest } from './core'; import { connection, event } from './hooks'; import '@feathersjs/transport-commons'; +import { createDebug } from '@feathersjs/commons'; import { Params, ServiceMethods, ServiceAddons } from '@feathersjs/feathers'; import jsonwebtoken from 'jsonwebtoken'; -const debug = Debug('@feathersjs/authentication/service'); +const debug = createDebug('@feathersjs/authentication/service'); declare module '@feathersjs/feathers/lib/declarations' { interface FeathersApplication { // eslint-disable-line diff --git a/packages/commons/src/debug.ts b/packages/commons/src/debug.ts new file mode 100644 index 0000000000..48f5d23298 --- /dev/null +++ b/packages/commons/src/debug.ts @@ -0,0 +1,26 @@ +export type DebugFunction = (...args: any[]) => void; +export type DebugInitializer = (name: string) => DebugFunction; + +const debuggers: { [key: string]: DebugFunction } = {}; + +export function noopDebug (): DebugFunction { + return () => {} +} + +let defaultInitializer: DebugInitializer = noopDebug; + +export function setDebug (debug: DebugInitializer) { + defaultInitializer = debug; + + Object.keys(debuggers).forEach(name => { + debuggers[name] = debug(name); + }); +} + +export function createDebug (name: string) { + if (!debuggers[name]) { + debuggers[name] = defaultInitializer(name); + } + + return (...args: any[]) => debuggers[name](...args); +} diff --git a/packages/commons/src/index.ts b/packages/commons/src/index.ts index 04f01d5aca..ba30dafaeb 100644 --- a/packages/commons/src/index.ts +++ b/packages/commons/src/index.ts @@ -99,3 +99,5 @@ export function isPromise (result: any) { export function createSymbol (name: string) { return typeof Symbol !== 'undefined' ? Symbol(name) : name; } + +export * from './debug'; diff --git a/packages/commons/test/debug.test.ts b/packages/commons/test/debug.test.ts new file mode 100644 index 0000000000..f299521349 --- /dev/null +++ b/packages/commons/test/debug.test.ts @@ -0,0 +1,30 @@ +import { strict as assert } from 'assert'; +import { createDebug, setDebug, noopDebug } from '../src'; + +const myDebug = createDebug('hello test'); + +describe('debug', () => { + it('default debug does nothing', () => { + assert.equal(myDebug('hi', 'there'), undefined); + }); + + it('can set custom debug later', () => { + let call; + + const customDebug = (name: string) => (...args: any[]) => { + call = [ name ].concat(args); + } + + setDebug(customDebug); + + assert.equal(myDebug('hi', 'there'), undefined); + assert.deepEqual(call, [ 'hello test', 'hi', 'there' ]); + + const newDebug = createDebug('other test'); + + assert.equal(newDebug('other', 'there'), undefined); + assert.deepEqual(call, [ 'other test', 'other', 'there' ]); + + setDebug(noopDebug); + }); +}); diff --git a/packages/configuration/package.json b/packages/configuration/package.json index bc8f8e80f6..06a8db5b59 100644 --- a/packages/configuration/package.json +++ b/packages/configuration/package.json @@ -57,9 +57,9 @@ "access": "public" }, "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/feathers": "^5.0.0-pre.2", - "config": "^3.3.6", - "debug": "^4.3.1" + "config": "^3.3.6" }, "devDependencies": { "@types/config": "^0.0.38", diff --git a/packages/configuration/src/index.ts b/packages/configuration/src/index.ts index 5cdea8193f..d425a7150f 100644 --- a/packages/configuration/src/index.ts +++ b/packages/configuration/src/index.ts @@ -1,8 +1,8 @@ import { Application } from '@feathersjs/feathers'; -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; import config from 'config'; -const debug = Debug('@feathersjs/configuration'); +const debug = createDebug('@feathersjs/configuration'); export = function init () { return (app?: Application) => { diff --git a/packages/express/package.json b/packages/express/package.json index dec44cf5e4..9571fc4e12 100644 --- a/packages/express/package.json +++ b/packages/express/package.json @@ -52,7 +52,6 @@ "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/errors": "^5.0.0-pre.2", "@types/express": "^4.17.11", - "debug": "^4.3.1", "express": "^4.17.1", "lodash": "^4.17.21" }, diff --git a/packages/express/src/authentication.ts b/packages/express/src/authentication.ts index bf805308cb..8f1e8b3edf 100644 --- a/packages/express/src/authentication.ts +++ b/packages/express/src/authentication.ts @@ -1,8 +1,8 @@ -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; import { merge, flatten } from 'lodash'; import { NextFunction, RequestHandler } from 'express'; -const debug = Debug('@feathersjs/express/authentication'); +const debug = createDebug('@feathersjs/express/authentication'); type StrategyOptions = { service?: string; diff --git a/packages/express/src/index.ts b/packages/express/src/index.ts index 193f4a6012..fca57ac86b 100644 --- a/packages/express/src/index.ts +++ b/packages/express/src/index.ts @@ -1,10 +1,10 @@ -import Debug from 'debug'; import express, { Express, static as _static, json, raw, text, urlencoded, query } from 'express'; import { Application as FeathersApplication, defaultServiceMethods } from '@feathersjs/feathers'; +import { createDebug } from '@feathersjs/commons'; import { Application } from './declarations'; import { errorHandler, notFound } from './handlers'; @@ -19,7 +19,7 @@ export { export * from './rest'; export * from './declarations'; -const debug = Debug('@feathersjs/express'); +const debug = createDebug('@feathersjs/express'); export default function feathersExpress (feathersApp?: FeathersApplication, expressApp: Express = express()): Application { if (!feathersApp) { diff --git a/packages/express/src/rest.ts b/packages/express/src/rest.ts index f2f8d283ab..5a17af12c5 100644 --- a/packages/express/src/rest.ts +++ b/packages/express/src/rest.ts @@ -1,12 +1,12 @@ -import Debug from 'debug'; import { MethodNotAllowed } from '@feathersjs/errors'; import { HookContext } from '@feathersjs/hooks'; +import { createDebug } from '@feathersjs/commons'; import { createContext, defaultServiceMethods, getServiceOptions, NullableId, Params } from '@feathersjs/feathers'; import { Request, Response, NextFunction, RequestHandler, Router } from 'express'; import { parseAuthentication } from './authentication'; -const debug = Debug('@feathersjs/express/rest'); +const debug = createDebug('@feathersjs/express/rest'); export const METHOD_HEADER = 'x-service-method'; diff --git a/packages/feathers/package.json b/packages/feathers/package.json index 3314c0be48..65c67cffa5 100644 --- a/packages/feathers/package.json +++ b/packages/feathers/package.json @@ -59,7 +59,6 @@ "dependencies": { "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/hooks": "^0.6.3", - "debug": "^4.3.1", "events": "^3.3.0" }, "devDependencies": { diff --git a/packages/feathers/src/application.ts b/packages/feathers/src/application.ts index a32bc6d8e2..543e04ea63 100644 --- a/packages/feathers/src/application.ts +++ b/packages/feathers/src/application.ts @@ -1,6 +1,5 @@ -import Debug from 'debug'; import { EventEmitter } from 'events'; -import { stripSlashes } from '@feathersjs/commons'; +import { stripSlashes, createDebug } from '@feathersjs/commons'; import { HOOKS } from '@feathersjs/hooks'; import version from './version'; @@ -21,7 +20,7 @@ import { } from './declarations'; import { enableLegacyHooks } from './hooks/legacy'; -const debug = Debug('@feathersjs/feathers'); +const debug = createDebug('@feathersjs/feathers'); export class Feathers extends EventEmitter implements FeathersApplication { services: ServiceTypes = ({} as ServiceTypes); diff --git a/packages/feathers/src/events.ts b/packages/feathers/src/events.ts index fc50352c7e..d675409ee0 100644 --- a/packages/feathers/src/events.ts +++ b/packages/feathers/src/events.ts @@ -15,7 +15,7 @@ export function eventHook (context: HookContext, next: NextFunction) { // This is used for custom events and for client services receiving event from the server if (typeof context.event === 'string' && !events.includes(context.event)) { const results = Array.isArray(context.result) ? context.result : [ context.result ]; - + results.forEach(element => (context as any).self.emit(context.event, element, context)); } }); @@ -28,6 +28,6 @@ export function eventMixin (service: FeathersService) { if (!isEmitter) { Object.assign(service, EventEmitter.prototype); } - + return service; } diff --git a/packages/feathers/src/index.ts b/packages/feathers/src/index.ts index 3a23c6f8e8..1c7ed4eda9 100644 --- a/packages/feathers/src/index.ts +++ b/packages/feathers/src/index.ts @@ -1,4 +1,4 @@ -import { _ } from '@feathersjs/commons'; +import * as commons from '@feathersjs/commons'; import version from './version'; import { Feathers } from './application'; @@ -8,7 +8,9 @@ export function feathers () { return new Feathers() as Application; } -export { version, Feathers }; +feathers.setDebug = commons.setDebug; + +export { version, commons, Feathers }; export * from './declarations'; export * from './service'; export * from './hooks'; diff --git a/packages/feathers/src/service.ts b/packages/feathers/src/service.ts index f6ab028c2d..c0507977c3 100644 --- a/packages/feathers/src/service.ts +++ b/packages/feathers/src/service.ts @@ -24,7 +24,7 @@ export const defaultEventMap = { export function getHookMethods (service: any, options: ServiceOptions) { const { methods } = options; - + return defaultServiceMethods.filter(m => typeof service[m] === 'function' && !methods.includes(m) ).concat(methods); diff --git a/packages/socketio/package.json b/packages/socketio/package.json index e0ab848c31..aaf461b208 100644 --- a/packages/socketio/package.json +++ b/packages/socketio/package.json @@ -50,8 +50,8 @@ "access": "public" }, "dependencies": { + "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/transport-commons": "^5.0.0-pre.2", - "debug": "^4.3.1", "socket.io": "^4.0.1" }, "devDependencies": { diff --git a/packages/socketio/src/index.ts b/packages/socketio/src/index.ts index 05d7a415f1..65462033c2 100644 --- a/packages/socketio/src/index.ts +++ b/packages/socketio/src/index.ts @@ -1,12 +1,12 @@ -import Debug from 'debug'; -import { Server, ServerOptions } from 'socket.io'; import http from 'http'; +import { Server, ServerOptions } from 'socket.io'; +import { createDebug } from '@feathersjs/commons'; import { Application } from '@feathersjs/feathers'; import { socket } from '@feathersjs/transport-commons'; import { disconnect, params, authentication, FeathersSocket } from './middleware'; -const debug = Debug('@feathersjs/socketio'); +const debug = createDebug('@feathersjs/socketio'); declare module '@feathersjs/feathers/lib/declarations' { interface Application { // eslint-disable-line diff --git a/packages/socketio/src/middleware.ts b/packages/socketio/src/middleware.ts index ca5ff43bdf..c4e0d21c4c 100644 --- a/packages/socketio/src/middleware.ts +++ b/packages/socketio/src/middleware.ts @@ -1,8 +1,8 @@ import { Application, Params } from '@feathersjs/feathers'; -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; import { Socket } from 'socket.io'; -const debug = Debug('@feathersjs/socketio/middleware'); +const debug = createDebug('@feathersjs/socketio/middleware'); export type ParamsGetter = (socket: Socket) => any; export type NextFunction = (err?: any) => void; diff --git a/packages/transport-commons/package.json b/packages/transport-commons/package.json index 443a918ee2..ec4029111b 100644 --- a/packages/transport-commons/package.json +++ b/packages/transport-commons/package.json @@ -54,7 +54,6 @@ "dependencies": { "@feathersjs/commons": "^5.0.0-pre.2", "@feathersjs/errors": "^5.0.0-pre.2", - "debug": "^4.3.1", "lodash": "^4.17.21" }, "devDependencies": { diff --git a/packages/transport-commons/src/channels/index.ts b/packages/transport-commons/src/channels/index.ts index a0751f1492..50a66a7d94 100644 --- a/packages/transport-commons/src/channels/index.ts +++ b/packages/transport-commons/src/channels/index.ts @@ -1,12 +1,12 @@ -import Debug from 'debug'; +import { Application, FeathersService, getServiceOptions } from '@feathersjs/feathers'; +import { createDebug } from '@feathersjs/commons'; import { compact, flattenDeep, noop } from 'lodash'; import { Channel, RealTimeConnection } from './channel/base'; import { CombinedChannel } from './channel/combined'; import { channelMixin, publishMixin, keys, PublishMixin, Event, Publisher } from './mixins'; -import { Application, FeathersService, getServiceOptions } from '@feathersjs/feathers'; import EventEmitter from 'events'; -const debug = Debug('@feathersjs/transport-commons/channels'); +const debug = createDebug('@feathersjs/transport-commons/channels'); const { CHANNELS } = keys; declare module '@feathersjs/feathers/lib/declarations' { diff --git a/packages/transport-commons/src/channels/mixins.ts b/packages/transport-commons/src/channels/mixins.ts index 241bab19b1..079f051af0 100644 --- a/packages/transport-commons/src/channels/mixins.ts +++ b/packages/transport-commons/src/channels/mixins.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ -import Debug from 'debug'; +import { HookContext, getServiceOptions } from '@feathersjs/feathers'; +import { createDebug } from '@feathersjs/commons'; import { Channel } from './channel/base'; import { CombinedChannel } from './channel/combined'; -import { HookContext, getServiceOptions } from '@feathersjs/feathers'; -const debug = Debug('@feathersjs/transport-commons:channels/mixins'); +const debug = createDebug('@feathersjs/transport-commons:channels/mixins'); const PUBLISHERS = Symbol('@feathersjs/transport-commons/publishers'); const CHANNELS = Symbol('@feathersjs/transport-commons/channels'); const ALL_EVENTS = Symbol('@feathersjs/transport-commons/all-events'); diff --git a/packages/transport-commons/src/client.ts b/packages/transport-commons/src/client.ts index 0fee28ade1..8819fb95c3 100644 --- a/packages/transport-commons/src/client.ts +++ b/packages/transport-commons/src/client.ts @@ -1,8 +1,8 @@ -import Debug from 'debug'; import { convert } from '@feathersjs/errors'; +import { createDebug } from '@feathersjs/commons'; import { Id, NullableId, Params, ServiceInterface } from '@feathersjs/feathers'; -const debug = Debug('@feathersjs/transport-commons/client'); +const debug = createDebug('@feathersjs/transport-commons/client'); const namespacedEmitterMethods = [ 'addListener', diff --git a/packages/transport-commons/src/socket/index.ts b/packages/transport-commons/src/socket/index.ts index e3e04fffe2..2aefea7748 100644 --- a/packages/transport-commons/src/socket/index.ts +++ b/packages/transport-commons/src/socket/index.ts @@ -1,11 +1,11 @@ import { Application, getServiceOptions, Params } from '@feathersjs/feathers'; -import Debug from 'debug'; +import { createDebug } from '@feathersjs/commons'; import { channels } from '../channels'; import { routing } from '../routing'; import { getDispatcher, runMethod } from './utils'; import { RealTimeConnection } from '../channels/channel/base'; -const debug = Debug('@feathersjs/transport-commons'); +const debug = createDebug('@feathersjs/transport-commons'); export interface SocketOptions { done: Promise; diff --git a/packages/transport-commons/src/socket/utils.ts b/packages/transport-commons/src/socket/utils.ts index 863f7ea701..8e1d94f527 100644 --- a/packages/transport-commons/src/socket/utils.ts +++ b/packages/transport-commons/src/socket/utils.ts @@ -1,11 +1,11 @@ -import Debug from 'debug'; -import isEqual from 'lodash/isEqual'; -import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors'; import { HookContext, Application, createContext, getServiceOptions } from '@feathersjs/feathers'; +import { NotFound, MethodNotAllowed, BadRequest } from '@feathersjs/errors'; +import { createDebug } from '@feathersjs/commons'; +import isEqual from 'lodash/isEqual'; import { CombinedChannel } from '../channels/channel/combined'; import { RealTimeConnection } from '../channels/channel/base'; -const debug = Debug('@feathersjs/transport-commons'); +const debug = createDebug('@feathersjs/transport-commons'); export const DEFAULT_PARAMS_POSITION = 1;