From 3e0d0886d930a17c7b77d995cc0fa628ef3ecdc2 Mon Sep 17 00:00:00 2001 From: Erez Rokah Date: Mon, 6 Jul 2020 18:50:39 +0300 Subject: [PATCH] feat(proxy-server): allow setting proxy log level (#3989) --- cypress/plugins/proxy.js | 2 +- .../netlify-cms-proxy-server/.env.example | 4 +- .../netlify-cms-proxy-server/package.json | 3 +- .../netlify-cms-proxy-server/src/index.ts | 17 ++- .../netlify-cms-proxy-server/src/logger.ts | 15 ++ .../src/middlewares.ts | 25 +++- .../src/middlewares/common/index.ts | 15 +- .../src/middlewares/localFs/index.ts | 21 ++- .../src/middlewares/localGit/index.ts | 23 ++- yarn.lock | 138 +++++++++++++++++- 10 files changed, 226 insertions(+), 37 deletions(-) create mode 100644 packages/netlify-cms-proxy-server/src/logger.ts diff --git a/cypress/plugins/proxy.js b/cypress/plugins/proxy.js index 0179f437..d5eddcdc 100644 --- a/cypress/plugins/proxy.js +++ b/cypress/plugins/proxy.js @@ -44,7 +44,7 @@ const startServer = async (repoDir, mode) => { serverProcess.stdout.on('data', data => { const message = data.toString().trim(); console.log(`server:stdout: ${message}`); - if (message.startsWith('Netlify CMS Proxy Server listening on port')) { + if (message.includes('Netlify CMS Proxy Server listening on port')) { resolve(serverProcess); } }); diff --git a/packages/netlify-cms-proxy-server/.env.example b/packages/netlify-cms-proxy-server/.env.example index 4941b7f6..029285dc 100644 --- a/packages/netlify-cms-proxy-server/.env.example +++ b/packages/netlify-cms-proxy-server/.env.example @@ -1,4 +1,6 @@ # optional, defaults to current directory GIT_REPO_DIRECTORY=FULL_PATH_TO_LOCAL_GIT_REPO # optional, defaults to 8081 -PORT=CUSTOM_PORT \ No newline at end of file +PORT=CUSTOM_PORT +# optional, defaults to false +LOG_LEVEL=info \ No newline at end of file diff --git a/packages/netlify-cms-proxy-server/package.json b/packages/netlify-cms-proxy-server/package.json index e2ab0a3f..591ffca8 100644 --- a/packages/netlify-cms-proxy-server/package.json +++ b/packages/netlify-cms-proxy-server/package.json @@ -28,7 +28,8 @@ "express": "^4.17.1", "morgan": "^1.9.1", "simple-git": "^2.0.0", - "what-the-diff": "^0.6.0" + "what-the-diff": "^0.6.0", + "winston": "^3.3.3" }, "devDependencies": { "@types/cors": "^2.8.6", diff --git a/packages/netlify-cms-proxy-server/src/index.ts b/packages/netlify-cms-proxy-server/src/index.ts index d4a68ea7..8694cfbd 100644 --- a/packages/netlify-cms-proxy-server/src/index.ts +++ b/packages/netlify-cms-proxy-server/src/index.ts @@ -3,28 +3,35 @@ import express from 'express'; import { registerCommonMiddlewares } from './middlewares/common'; import { registerMiddleware as registerLocalGit } from './middlewares/localGit'; import { registerMiddleware as registerLocalFs } from './middlewares/localFs'; +import { createLogger } from './logger'; const app = express(); const port = process.env.PORT || 8081; +const level = process.env.LOG_LEVEL || 'info'; (async () => { - registerCommonMiddlewares(app); + const logger = createLogger({ level }); + const options = { + logger, + }; + + registerCommonMiddlewares(app, options); try { const mode = process.env.MODE || 'fs'; if (mode === 'fs') { - registerLocalFs(app); + registerLocalFs(app, options); } else if (mode === 'git') { - registerLocalGit(app); + registerLocalGit(app, options); } else { throw new Error(`Unknown proxy mode '${mode}'`); } } catch (e) { - console.error(e.message); + logger.error(e.message); process.exit(1); } return app.listen(port, () => { - console.log(`Netlify CMS Proxy Server listening on port ${port}`); + logger.info(`Netlify CMS Proxy Server listening on port ${port}`); }); })(); diff --git a/packages/netlify-cms-proxy-server/src/logger.ts b/packages/netlify-cms-proxy-server/src/logger.ts new file mode 100644 index 00000000..47e16c26 --- /dev/null +++ b/packages/netlify-cms-proxy-server/src/logger.ts @@ -0,0 +1,15 @@ +import winston from 'winston'; + +const { combine, colorize, simple } = winston.format; + +type LogOptions = { + level: string; +}; + +export const createLogger = ({ level }: LogOptions) => { + return winston.createLogger({ + level, + format: combine(colorize(), simple()), + transports: [new winston.transports.Console()], + }); +}; diff --git a/packages/netlify-cms-proxy-server/src/middlewares.ts b/packages/netlify-cms-proxy-server/src/middlewares.ts index 2ac5026c..5dd97bbb 100644 --- a/packages/netlify-cms-proxy-server/src/middlewares.ts +++ b/packages/netlify-cms-proxy-server/src/middlewares.ts @@ -2,13 +2,26 @@ import express from 'express'; import { registerCommonMiddlewares } from './middlewares/common'; import { registerMiddleware as localGit } from './middlewares/localGit'; import { registerMiddleware as localFs } from './middlewares/localFs'; +import { createLogger } from './logger'; -export const registerLocalGit = async (app: express.Express) => { - registerCommonMiddlewares(app); - await localGit(app); +type Options = { + logLevel?: string; }; -export const registerLocalFs = async (app: express.Express) => { - registerCommonMiddlewares(app); - await localFs(app); +const createOptions = (options: Options) => { + return { + logger: createLogger({ level: options.logLevel || 'info' }), + }; +}; + +export const registerLocalGit = async (app: express.Express, options: Options = {}) => { + const opts = createOptions(options); + registerCommonMiddlewares(app, opts); + await localGit(app, opts); +}; + +export const registerLocalFs = async (app: express.Express, options: Options = {}) => { + const opts = createOptions(options); + registerCommonMiddlewares(app, opts); + await localFs(app, opts); }; diff --git a/packages/netlify-cms-proxy-server/src/middlewares/common/index.ts b/packages/netlify-cms-proxy-server/src/middlewares/common/index.ts index ad0f4497..31739fa0 100644 --- a/packages/netlify-cms-proxy-server/src/middlewares/common/index.ts +++ b/packages/netlify-cms-proxy-server/src/middlewares/common/index.ts @@ -1,9 +1,20 @@ +import winston from 'winston'; import express from 'express'; import morgan from 'morgan'; import cors from 'cors'; -export const registerCommonMiddlewares = (app: express.Express) => { - app.use(morgan('combined')); +export type Options = { + logger: winston.Logger; +}; + +export const registerCommonMiddlewares = (app: express.Express, options: Options) => { + const { logger } = options; + const stream = { + write: (message: string) => { + logger.info(String(message).trim()); + }, + }; + app.use(morgan('combined', { stream })); app.use(cors()); app.use(express.json({ limit: '50mb' })); }; diff --git a/packages/netlify-cms-proxy-server/src/middlewares/localFs/index.ts b/packages/netlify-cms-proxy-server/src/middlewares/localFs/index.ts index 6272e2fe..26c7a8c0 100644 --- a/packages/netlify-cms-proxy-server/src/middlewares/localFs/index.ts +++ b/packages/netlify-cms-proxy-server/src/middlewares/localFs/index.ts @@ -1,3 +1,4 @@ +import winston from 'winston'; import express from 'express'; import path from 'path'; import { defaultSchema, joi } from '../joi'; @@ -15,11 +16,12 @@ import { import { listRepoFiles, deleteFile, writeFile, move } from '../utils/fs'; import { entriesFromFiles, readMediaFile } from '../utils/entries'; -type Options = { +type FsOptions = { repoPath: string; + logger: winston.Logger; }; -export const localFsMiddleware = ({ repoPath }: Options) => { +export const localFsMiddleware = ({ repoPath, logger }: FsOptions) => { return async function(req: express.Request, res: express.Response) { try { const { body } = req; @@ -113,20 +115,25 @@ export const localFsMiddleware = ({ repoPath }: Options) => { } } } catch (e) { - console.error(`Error handling ${JSON.stringify(req.body)}: ${e.message}`); + logger.error(`Error handling ${JSON.stringify(req.body)}: ${e.message}`); res.status(500).json({ error: 'Unknown error' }); } }; }; -export const getSchema = ({ repoPath }: Options) => { +export const getSchema = ({ repoPath }: { repoPath: string }) => { const schema = defaultSchema({ path: pathTraversal(repoPath) }); return schema; }; -export const registerMiddleware = async (app: express.Express) => { +type Options = { + logger: winston.Logger; +}; + +export const registerMiddleware = async (app: express.Express, options: Options) => { + const { logger } = options; const repoPath = path.resolve(process.env.GIT_REPO_DIRECTORY || process.cwd()); app.post('/api/v1', joi(getSchema({ repoPath }))); - app.post('/api/v1', localFsMiddleware({ repoPath })); - console.log(`Netlify CMS File System Proxy Server configured with ${repoPath}`); + app.post('/api/v1', localFsMiddleware({ repoPath, logger })); + logger.info(`Netlify CMS File System Proxy Server configured with ${repoPath}`); }; diff --git a/packages/netlify-cms-proxy-server/src/middlewares/localGit/index.ts b/packages/netlify-cms-proxy-server/src/middlewares/localGit/index.ts index b9375e94..67e67d59 100644 --- a/packages/netlify-cms-proxy-server/src/middlewares/localGit/index.ts +++ b/packages/netlify-cms-proxy-server/src/middlewares/localGit/index.ts @@ -1,3 +1,4 @@ +import winston from 'winston'; import express from 'express'; import path from 'path'; import { promises as fs } from 'fs'; @@ -65,8 +66,9 @@ const runOnBranch = async (git: simpleGit.SimpleGit, branch: string, func: () const branchDescription = (branch: string) => `branch.${branch}.description`; -type Options = { +type GitOptions = { repoPath: string; + logger: winston.Logger; }; const commitEntry = async ( @@ -142,7 +144,7 @@ const getDiffs = async (git: simpleGit.SimpleGit, source: string, dest: string) return diffs; }; -export const validateRepo = async ({ repoPath }: Options) => { +export const validateRepo = async ({ repoPath }: { repoPath: string }) => { const git = simpleGit(repoPath).silent(false); const isRepo = await git.checkIsRepo(); if (!isRepo) { @@ -150,12 +152,12 @@ export const validateRepo = async ({ repoPath }: Options) => { } }; -export const getSchema = ({ repoPath }: Options) => { +export const getSchema = ({ repoPath }: { repoPath: string }) => { const schema = defaultSchema({ path: pathTraversal(repoPath) }); return schema; }; -export const localGitMiddleware = ({ repoPath }: Options) => { +export const localGitMiddleware = ({ repoPath, logger }: GitOptions) => { const git = simpleGit(repoPath).silent(false); return async function(req: express.Request, res: express.Response) { @@ -386,16 +388,21 @@ export const localGitMiddleware = ({ repoPath }: Options) => { } } } catch (e) { - console.error(`Error handling ${JSON.stringify(req.body)}: ${e.message}`); + logger.error(`Error handling ${JSON.stringify(req.body)}: ${e.message}`); res.status(500).json({ error: 'Unknown error' }); } }; }; -export const registerMiddleware = async (app: express.Express) => { +type Options = { + logger: winston.Logger; +}; + +export const registerMiddleware = async (app: express.Express, options: Options) => { + const { logger } = options; const repoPath = path.resolve(process.env.GIT_REPO_DIRECTORY || process.cwd()); await validateRepo({ repoPath }); app.post('/api/v1', joi(getSchema({ repoPath }))); - app.post('/api/v1', localGitMiddleware({ repoPath })); - console.log(`Netlify CMS Git Proxy Server configured with ${repoPath}`); + app.post('/api/v1', localGitMiddleware({ repoPath, logger })); + logger.info(`Netlify CMS Git Proxy Server configured with ${repoPath}`); }; diff --git a/yarn.lock b/yarn.lock index 05647e30..a6498496 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1158,6 +1158,15 @@ debug "^3.1.0" lodash.once "^4.1.1" +"@dabh/diagnostics@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.2.tgz#290d08f7b381b8f94607dc8f471a12c675f9db31" + integrity sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q== + dependencies: + colorspace "1.1.x" + enabled "2.0.x" + kuler "^2.0.0" + "@emotion/babel-plugin-jsx-pragmatic@^0.1.5": version "0.1.5" resolved "https://registry.yarnpkg.com/@emotion/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-0.1.5.tgz#27debfe9c27c4d83574d509787ae553bf8a34d7e" @@ -4246,7 +4255,7 @@ async@^2.6.2: dependencies: lodash "^4.17.14" -async@^3.0.1, async@^3.2.0: +async@^3.0.1, async@^3.1.0, async@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/async/-/async-3.2.0.tgz#b3a2685c5ebb641d3de02d161002c60fc9f85720" integrity sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw== @@ -5672,7 +5681,7 @@ collection-visit@^1.0.0: map-visit "^1.0.0" object-visit "^1.0.0" -color-convert@^1.9.0: +color-convert@^1.9.0, color-convert@^1.9.1: version "1.9.3" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== @@ -5691,17 +5700,33 @@ color-name@1.1.3: resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= -color-name@~1.1.4: +color-name@^1.0.0, color-name@~1.1.4: version "1.1.4" resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-string@^1.5.2: + version "1.5.3" + resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.5.3.tgz#c9bbc5f01b58b5492f3d6857459cb6590ce204cc" + integrity sha512-dC2C5qeWoYkxki5UAXapdjqO672AM4vZuPGRQfO8b5HKuKGBbKWpITyDYN7TOFKvRW7kOgAn3746clDBMDJyQw== + dependencies: + color-name "^1.0.0" + simple-swizzle "^0.2.2" + +color@3.0.x: + version "3.0.0" + resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a" + integrity sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w== + dependencies: + color-convert "^1.9.1" + color-string "^1.5.2" + colorette@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b" integrity sha512-puCDz0CzydiSYOrnXpz/PKd69zRrribezjtE9yd4zvytoRc8+RY/KJPvtPFKZS3E3wP6neGyMe0vOTlHO5L3Pw== -colors@^1.1.2, colors@^1.4.0: +colors@^1.1.2, colors@^1.2.1, colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -5711,6 +5736,14 @@ colors@~1.1.2: resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63" integrity sha1-FopHAXVran9RoSzgyXv6KMCE7WM= +colorspace@1.1.x: + version "1.1.2" + resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.2.tgz#e0128950d082b86a2168580796a0aa5d6c68d8c5" + integrity sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ== + dependencies: + color "3.0.x" + text-hex "1.0.x" + columnify@^1.5.4: version "1.5.4" resolved "https://registry.yarnpkg.com/columnify/-/columnify-1.5.4.tgz#4737ddf1c7b69a8a7c340570782e947eec8e78bb" @@ -7135,6 +7168,11 @@ emotion@^9.1.2: babel-plugin-emotion "^9.2.11" create-emotion "^9.2.12" +enabled@2.0.x: + version "2.0.0" + resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2" + integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ== + encodeurl@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" @@ -7858,6 +7896,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6: resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc= +fast-safe-stringify@^2.0.4: + version "2.0.7" + resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz#124aa885899261f68aedb42a7c080de9da608743" + integrity sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA== + fault@^1.0.2: version "1.0.4" resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.4.tgz#eafcfc0a6d214fc94601e170df29954a4f842f13" @@ -7906,6 +7949,11 @@ fd-slicer@~1.1.0: dependencies: pend "~1.2.0" +fecha@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.0.tgz#3ffb6395453e3f3efff850404f0a59b6747f5f41" + integrity sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg== + figgy-pudding@^3.4.1, figgy-pudding@^3.5.1: version "3.5.2" resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e" @@ -8097,6 +8145,11 @@ flush-write-stream@^1.0.0: inherits "^2.0.3" readable-stream "^2.3.6" +fn.name@1.x.x: + version "1.1.0" + resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc" + integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw== + focus-group@^0.3.1: version "0.3.1" resolved "https://registry.yarnpkg.com/focus-group/-/focus-group-0.3.1.tgz#e0f32ed86b0dabdd6ffcebdf898ecb32e47fedce" @@ -9645,6 +9698,11 @@ is-arrayish@^0.2.1: resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-arrayish@^0.3.1: + version "0.3.2" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03" + integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ== + is-binary-path@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898" @@ -10837,6 +10895,11 @@ known-css-properties@^0.11.0: resolved "https://registry.yarnpkg.com/known-css-properties/-/known-css-properties-0.11.0.tgz#0da784f115ea77c76b81536d7052e90ee6c86a8a" integrity sha512-bEZlJzXo5V/ApNNa5z375mJC6Nrz4vG43UgcSCrg2OHC+yuB6j0iDSrY7RQ/+PRofFB03wNIIt9iXIVLr4wc7w== +kuler@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3" + integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A== + ky-universal@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/ky-universal/-/ky-universal-0.3.0.tgz#3fcbb0dd03da39b5f05100d9362a630d5e1d402e" @@ -11212,6 +11275,17 @@ log-update@^2.3.0: cli-cursor "^2.0.0" wrap-ansi "^3.0.1" +logform@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/logform/-/logform-2.2.0.tgz#40f036d19161fc76b68ab50fdc7fe495544492f2" + integrity sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg== + dependencies: + colors "^1.2.1" + fast-safe-stringify "^2.0.4" + fecha "^4.2.0" + ms "^2.1.1" + triple-beam "^1.3.0" + loglevel@^1.6.8: version "1.6.8" resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.8.tgz#8a25fb75d092230ecd4457270d80b54e28011171" @@ -12464,6 +12538,13 @@ once@^1.3.0, once@^1.3.1, once@^1.4.0: dependencies: wrappy "1" +one-time@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45" + integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g== + dependencies: + fn.name "1.x.x" + onetime@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" @@ -14326,7 +14407,7 @@ read@1, read@~1.0.1: dependencies: mute-stream "~0.0.4" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@^2.3.7, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -14339,7 +14420,7 @@ read@1, read@~1.0.1: string_decoder "~1.1.1" util-deprecate "~1.0.1" -"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.6.0: +"readable-stream@2 || 3", readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -15324,6 +15405,13 @@ simple-html-tokenizer@^0.1.1: resolved "https://registry.yarnpkg.com/simple-html-tokenizer/-/simple-html-tokenizer-0.1.1.tgz#05c2eec579ffffe145a030ac26cfea61b980fabe" integrity sha1-BcLuxXn//+FFoDCsJs/qYbmA+r4= +simple-swizzle@^0.2.2: + version "0.2.2" + resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a" + integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo= + dependencies: + is-arrayish "^0.3.1" + simplebar-react@^1.0.0-alpha.6: version "1.2.3" resolved "https://registry.yarnpkg.com/simplebar-react/-/simplebar-react-1.2.3.tgz#bd81fa9827628470e9470d06caef6ece15e1c882" @@ -15730,6 +15818,11 @@ stable@^0.1.8: resolved "https://registry.yarnpkg.com/stable/-/stable-0.1.8.tgz#836eb3c8382fe2936feaf544631017ce7d47a3cf" integrity sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w== +stack-trace@0.0.x: + version "0.0.10" + resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0" + integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA= + stack-utils@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-1.0.2.tgz#33eba3897788558bebfc2db059dc158ec36cebb8" @@ -16391,6 +16484,11 @@ text-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/text-extensions/-/text-extensions-1.9.0.tgz#1853e45fee39c945ce6f6c36b2d659b5aabc2a26" integrity sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ== +text-hex@1.0.x: + version "1.0.0" + resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5" + integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg== + text-table@0.2.0, text-table@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" @@ -16645,6 +16743,11 @@ trim@0.0.1: resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd" integrity sha1-WFhUf2spB1fulczMZm+1AITEYN0= +triple-beam@^1.2.0, triple-beam@^1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9" + integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw== + trough@^1.0.0: version "1.0.5" resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406" @@ -17690,6 +17793,29 @@ windows-release@^3.1.0: dependencies: execa "^1.0.0" +winston-transport@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.4.0.tgz#17af518daa690d5b2ecccaa7acf7b20ca7925e59" + integrity sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw== + dependencies: + readable-stream "^2.3.7" + triple-beam "^1.2.0" + +winston@^3.3.3: + version "3.3.3" + resolved "https://registry.yarnpkg.com/winston/-/winston-3.3.3.tgz#ae6172042cafb29786afa3d09c8ff833ab7c9170" + integrity sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw== + dependencies: + "@dabh/diagnostics" "^2.0.2" + async "^3.1.0" + is-stream "^2.0.0" + logform "^2.2.0" + one-time "^1.0.0" + readable-stream "^3.4.0" + stack-trace "0.0.x" + triple-beam "^1.3.0" + winston-transport "^4.4.0" + word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"