diff options
author | LinuxWizard42 <computerwizard@linuxmail.org> | 2022-10-12 23:08:57 +0300 |
---|---|---|
committer | LinuxWizard42 <computerwizard@linuxmail.org> | 2022-10-12 23:08:57 +0300 |
commit | 726b81b19251674e149ccfbb1abacbd837fc6db0 (patch) | |
tree | fbdbb227dc01357eb76e8222d76185bc124c5ca6 /node_modules/roarr/dist | |
parent | 34f0890e175698940d49238097579f44e4d78c89 (diff) | |
download | FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.gz FlashRunner-726b81b19251674e149ccfbb1abacbd837fc6db0.tar.zst |
Removed files that should not have been included in git
Diffstat (limited to 'node_modules/roarr/dist')
24 files changed, 0 insertions, 871 deletions
diff --git a/node_modules/roarr/dist/constants.js b/node_modules/roarr/dist/constants.js deleted file mode 100644 index 799cf55..0000000 --- a/node_modules/roarr/dist/constants.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.logLevels = void 0; -const logLevels = { - debug: 20, - error: 50, - fatal: 60, - info: 30, - trace: 10, - warn: 40 -}; -exports.logLevels = logLevels; -//# sourceMappingURL=constants.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/constants.js.flow b/node_modules/roarr/dist/constants.js.flow deleted file mode 100644 index 59116ad..0000000 --- a/node_modules/roarr/dist/constants.js.flow +++ /dev/null @@ -1,10 +0,0 @@ -// @flow - -export const logLevels = { - debug: 20, - error: 50, - fatal: 60, - info: 30, - trace: 10, - warn: 40, -}; diff --git a/node_modules/roarr/dist/constants.js.map b/node_modules/roarr/dist/constants.js.map deleted file mode 100644 index dc45d21..0000000 --- a/node_modules/roarr/dist/constants.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/constants.js"],"names":["logLevels","debug","error","fatal","info","trace","warn"],"mappings":";;;;;;AAEO,MAAMA,SAAS,GAAG;AACvBC,EAAAA,KAAK,EAAE,EADgB;AAEvBC,EAAAA,KAAK,EAAE,EAFgB;AAGvBC,EAAAA,KAAK,EAAE,EAHgB;AAIvBC,EAAAA,IAAI,EAAE,EAJiB;AAKvBC,EAAAA,KAAK,EAAE,EALgB;AAMvBC,EAAAA,IAAI,EAAE;AANiB,CAAlB","sourcesContent":["// @flow\n\nexport const logLevels = {\n debug: 20,\n error: 50,\n fatal: 60,\n info: 30,\n trace: 10,\n warn: 40,\n};\n"],"file":"constants.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createLogger.js b/node_modules/roarr/dist/factories/createLogger.js deleted file mode 100644 index 3936101..0000000 --- a/node_modules/roarr/dist/factories/createLogger.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _detectNode = _interopRequireDefault(require("detect-node")); - -var _globalthis = _interopRequireDefault(require("globalthis")); - -var _jsonStringifySafe = _interopRequireDefault(require("json-stringify-safe")); - -var _sprintfJs = require("sprintf-js"); - -var _constants = require("../constants"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -const globalThis = (0, _globalthis.default)(); -let domain; - -if (_detectNode.default) { - // eslint-disable-next-line global-require - domain = require('domain'); -} - -const getParentDomainContext = () => { - if (!domain) { - return {}; - } - - const parentRoarrContexts = []; - let currentDomain = process.domain; // $FlowFixMe - - if (!currentDomain || !currentDomain.parentDomain) { - return {}; - } - - while (currentDomain && currentDomain.parentDomain) { - currentDomain = currentDomain.parentDomain; - - if (currentDomain.roarr && currentDomain.roarr.context) { - parentRoarrContexts.push(currentDomain.roarr.context); - } - } - - let domainContext = {}; - - for (const parentRoarrContext of parentRoarrContexts) { - domainContext = _objectSpread(_objectSpread({}, domainContext), parentRoarrContext); - } - - return domainContext; -}; - -const getFirstParentDomainContext = () => { - if (!domain) { - return {}; - } - - let currentDomain = process.domain; // $FlowFixMe - - if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) { - return currentDomain.roarr.context; - } // $FlowFixMe - - - if (!currentDomain || !currentDomain.parentDomain) { - return {}; - } - - while (currentDomain && currentDomain.parentDomain) { - currentDomain = currentDomain.parentDomain; - - if (currentDomain.roarr && currentDomain.roarr.context) { - return currentDomain.roarr.context; - } - } - - return {}; -}; - -const createLogger = (onMessage, parentContext) => { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations - const log = (a, b, c, d, e, f, g, h, i, k) => { - const time = Date.now(); - const sequence = globalThis.ROARR.sequence++; - let context; - let message; - - if (typeof a === 'string') { - context = _objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext || {}); // eslint-disable-next-line id-length, object-property-newline - - const args = _extends({}, { - a, - b, - c, - d, - e, - f, - g, - h, - i, - k - }); - - const values = Object.keys(args).map(key => { - return args[key]; - }); // eslint-disable-next-line unicorn/no-reduce - - const hasOnlyOneParameterValued = 1 === values.reduce((accumulator, value) => { - // eslint-disable-next-line no-return-assign, no-param-reassign - return accumulator += typeof value === 'undefined' ? 0 : 1; - }, 0); - message = hasOnlyOneParameterValued ? (0, _sprintfJs.sprintf)('%s', a) : (0, _sprintfJs.sprintf)(a, b, c, d, e, f, g, h, i, k); - } else { - if (typeof b !== 'string') { - throw new TypeError('Message must be a string.'); - } - - context = JSON.parse((0, _jsonStringifySafe.default)(_objectSpread(_objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext || {}), a))); - message = (0, _sprintfJs.sprintf)(b, c, d, e, f, g, h, i, k); - } - - onMessage({ - context, - message, - sequence, - time, - version: '1.0.0' - }); - }; - - log.child = context => { - if (typeof context === 'function') { - return createLogger(message => { - if (typeof context !== 'function') { - throw new TypeError('Unexpected state.'); - } - - onMessage(context(message)); - }, parentContext); - } - - return createLogger(onMessage, _objectSpread(_objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext), context)); - }; - - log.getContext = () => { - return _objectSpread(_objectSpread({}, getFirstParentDomainContext()), parentContext || {}); - }; - - log.adopt = async (routine, context) => { - if (!domain) { - return routine(); - } - - const adoptedDomain = domain.create(); - return adoptedDomain.run(() => { - // $FlowFixMe - adoptedDomain.roarr = { - context: _objectSpread(_objectSpread({}, getParentDomainContext()), context) - }; - return routine(); - }); - }; - - for (const logLevel of Object.keys(_constants.logLevels)) { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations - log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => { - return log.child({ - logLevel: _constants.logLevels[logLevel] - })(a, b, c, d, e, f, g, h, i, k); - }; - } // @see https://github.com/facebook/flow/issues/6705 - // $FlowFixMe - - - return log; -}; - -var _default = createLogger; -exports.default = _default; -//# sourceMappingURL=createLogger.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createLogger.js.flow b/node_modules/roarr/dist/factories/createLogger.js.flow deleted file mode 100644 index 4cd6c27..0000000 --- a/node_modules/roarr/dist/factories/createLogger.js.flow +++ /dev/null @@ -1,197 +0,0 @@ -// @flow - -import environmentIsNode from 'detect-node'; -import createGlobalThis from 'globalthis'; -import stringify from 'json-stringify-safe'; -import { - sprintf, -} from 'sprintf-js'; -import { - logLevels, -} from '../constants'; -import type { - LoggerType, - MessageContextType, - MessageEventHandlerType, - TranslateMessageFunctionType, -} from '../types'; - -const globalThis = createGlobalThis(); - -let domain; - -if (environmentIsNode) { - // eslint-disable-next-line global-require - domain = require('domain'); -} - -const getParentDomainContext = () => { - if (!domain) { - return {}; - } - - const parentRoarrContexts = []; - - let currentDomain = process.domain; - - // $FlowFixMe - if (!currentDomain || !currentDomain.parentDomain) { - return {}; - } - - while (currentDomain && currentDomain.parentDomain) { - currentDomain = currentDomain.parentDomain; - - if (currentDomain.roarr && currentDomain.roarr.context) { - parentRoarrContexts.push(currentDomain.roarr.context); - } - } - - let domainContext = {}; - - for (const parentRoarrContext of parentRoarrContexts) { - domainContext = { - ...domainContext, - ...parentRoarrContext, - }; - } - - return domainContext; -}; - -const getFirstParentDomainContext = () => { - if (!domain) { - return {}; - } - - let currentDomain = process.domain; - - // $FlowFixMe - if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) { - return currentDomain.roarr.context; - } - - // $FlowFixMe - if (!currentDomain || !currentDomain.parentDomain) { - return {}; - } - - while (currentDomain && currentDomain.parentDomain) { - currentDomain = currentDomain.parentDomain; - - if (currentDomain.roarr && currentDomain.roarr.context) { - return currentDomain.roarr.context; - } - } - - return {}; -}; - -const createLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations - const log = (a, b, c, d, e, f, g, h, i, k) => { - const time = Date.now(); - const sequence = globalThis.ROARR.sequence++; - - let context; - let message; - - if (typeof a === 'string') { - context = { - ...getFirstParentDomainContext(), - ...parentContext || {}, - }; - // eslint-disable-next-line id-length, object-property-newline - const {...args} = {a, b, c, d, e, f, g, h, i, k}; - const values = Object.keys(args).map((key) => { - return args[key]; - }); - // eslint-disable-next-line unicorn/no-reduce - const hasOnlyOneParameterValued = 1 === values.reduce((accumulator, value) => { - // eslint-disable-next-line no-return-assign, no-param-reassign - return accumulator += typeof value === 'undefined' ? 0 : 1; - }, 0); - message = hasOnlyOneParameterValued ? sprintf('%s', a) : sprintf(a, b, c, d, e, f, g, h, i, k); - } else { - if (typeof b !== 'string') { - throw new TypeError('Message must be a string.'); - } - - context = JSON.parse(stringify({ - ...getFirstParentDomainContext(), - ...parentContext || {}, - ...a, - })); - - message = sprintf(b, c, d, e, f, g, h, i, k); - } - - onMessage({ - context, - message, - sequence, - time, - version: '1.0.0', - }); - }; - - log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => { - if (typeof context === 'function') { - return createLogger((message) => { - if (typeof context !== 'function') { - throw new TypeError('Unexpected state.'); - } - onMessage(context(message)); - }, parentContext); - } - - return createLogger(onMessage, { - ...getFirstParentDomainContext(), - ...parentContext, - ...context, - }); - }; - - log.getContext = (): MessageContextType => { - return { - ...getFirstParentDomainContext(), - ...parentContext || {}, - }; - }; - - log.adopt = async (routine, context) => { - if (!domain) { - return routine(); - } - - const adoptedDomain = domain.create(); - - return adoptedDomain - .run(() => { - // $FlowFixMe - adoptedDomain.roarr = { - context: { - ...getParentDomainContext(), - ...context, - }, - }; - - return routine(); - }); - }; - - for (const logLevel of Object.keys(logLevels)) { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations - log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => { - return log.child({ - logLevel: logLevels[logLevel], - })(a, b, c, d, e, f, g, h, i, k); - }; - } - - // @see https://github.com/facebook/flow/issues/6705 - // $FlowFixMe - return log; -}; - -export default createLogger; diff --git a/node_modules/roarr/dist/factories/createLogger.js.map b/node_modules/roarr/dist/factories/createLogger.js.map deleted file mode 100644 index 4c8854c..0000000 --- a/node_modules/roarr/dist/factories/createLogger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/factories/createLogger.js"],"names":["globalThis","domain","environmentIsNode","require","getParentDomainContext","parentRoarrContexts","currentDomain","process","parentDomain","roarr","context","push","domainContext","parentRoarrContext","getFirstParentDomainContext","createLogger","onMessage","parentContext","log","a","b","c","d","e","f","g","h","i","k","time","Date","now","sequence","ROARR","message","args","values","Object","keys","map","key","hasOnlyOneParameterValued","reduce","accumulator","value","TypeError","JSON","parse","version","child","getContext","adopt","routine","adoptedDomain","create","run","logLevel","logLevels"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AACA;;AAGA;;;;;;;;;;;;AAUA,MAAMA,UAAU,GAAG,0BAAnB;AAEA,IAAIC,MAAJ;;AAEA,IAAIC,mBAAJ,EAAuB;AACrB;AACAD,EAAAA,MAAM,GAAGE,OAAO,CAAC,QAAD,CAAhB;AACD;;AAED,MAAMC,sBAAsB,GAAG,MAAM;AACnC,MAAI,CAACH,MAAL,EAAa;AACX,WAAO,EAAP;AACD;;AAED,QAAMI,mBAAmB,GAAG,EAA5B;AAEA,MAAIC,aAAa,GAAGC,OAAO,CAACN,MAA5B,CAPmC,CASnC;;AACA,MAAI,CAACK,aAAD,IAAkB,CAACA,aAAa,CAACE,YAArC,EAAmD;AACjD,WAAO,EAAP;AACD;;AAED,SAAOF,aAAa,IAAIA,aAAa,CAACE,YAAtC,EAAoD;AAClDF,IAAAA,aAAa,GAAGA,aAAa,CAACE,YAA9B;;AAEA,QAAIF,aAAa,CAACG,KAAd,IAAuBH,aAAa,CAACG,KAAd,CAAoBC,OAA/C,EAAwD;AACtDL,MAAAA,mBAAmB,CAACM,IAApB,CAAyBL,aAAa,CAACG,KAAd,CAAoBC,OAA7C;AACD;AACF;;AAED,MAAIE,aAAa,GAAG,EAApB;;AAEA,OAAK,MAAMC,kBAAX,IAAiCR,mBAAjC,EAAsD;AACpDO,IAAAA,aAAa,mCACRA,aADQ,GAERC,kBAFQ,CAAb;AAID;;AAED,SAAOD,aAAP;AACD,CAhCD;;AAkCA,MAAME,2BAA2B,GAAG,MAAM;AACxC,MAAI,CAACb,MAAL,EAAa;AACX,WAAO,EAAP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rC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC;AAChD,aAAOV,GAAG,CAAC+B,KAAJ,CAAU;AACfO,QAAAA,QAAQ,EAAEC,qBAAUD,QAAV;AADK,OAAV,EAEJrC,CAFI,EAEDC,CAFC,EAEEC,CAFF,EAEKC,CAFL,EAEQC,CAFR,EAEWC,CAFX,EAEcC,CAFd,EAEiBC,CAFjB,EAEoBC,CAFpB,EAEuBC,CAFvB,CAAP;AAGD,KAJD;AAKD,GApG0G,CAsG3G;AACA;;;AACA,SAAOV,GAAP;AACD,CAzGD;;eA2GeH,Y","sourcesContent":["// @flow\n\nimport environmentIsNode from 'detect-node';\nimport createGlobalThis from 'globalthis';\nimport stringify from 'json-stringify-safe';\nimport {\n sprintf,\n} from 'sprintf-js';\nimport {\n logLevels,\n} from '../constants';\nimport type {\n LoggerType,\n MessageContextType,\n MessageEventHandlerType,\n TranslateMessageFunctionType,\n} from '../types';\n\nconst globalThis = createGlobalThis();\n\nlet domain;\n\nif (environmentIsNode) {\n // eslint-disable-next-line global-require\n domain = require('domain');\n}\n\nconst getParentDomainContext = () => {\n if (!domain) {\n return {};\n }\n\n const parentRoarrContexts = [];\n\n let currentDomain = process.domain;\n\n // $FlowFixMe\n if (!currentDomain || !currentDomain.parentDomain) {\n return {};\n }\n\n while (currentDomain && currentDomain.parentDomain) {\n currentDomain = currentDomain.parentDomain;\n\n if (currentDomain.roarr && currentDomain.roarr.context) {\n parentRoarrContexts.push(currentDomain.roarr.context);\n }\n }\n\n let domainContext = {};\n\n for (const parentRoarrContext of parentRoarrContexts) {\n domainContext = {\n ...domainContext,\n ...parentRoarrContext,\n };\n }\n\n return domainContext;\n};\n\nconst getFirstParentDomainContext = () => {\n if (!domain) {\n return {};\n }\n\n let currentDomain = process.domain;\n\n // $FlowFixMe\n if (currentDomain && currentDomain.roarr && currentDomain.roarr.context) {\n return currentDomain.roarr.context;\n }\n\n // $FlowFixMe\n if (!currentDomain || !currentDomain.parentDomain) {\n return {};\n }\n\n while (currentDomain && currentDomain.parentDomain) {\n currentDomain = currentDomain.parentDomain;\n\n if (currentDomain.roarr && currentDomain.roarr.context) {\n return currentDomain.roarr.context;\n }\n }\n\n return {};\n};\n\nconst createLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations\n const log = (a, b, c, d, e, f, g, h, i, k) => {\n const time = Date.now();\n const sequence = globalThis.ROARR.sequence++;\n\n let context;\n let message;\n\n if (typeof a === 'string') {\n context = {\n ...getFirstParentDomainContext(),\n ...parentContext || {},\n };\n // eslint-disable-next-line id-length, object-property-newline\n const {...args} = {a, b, c, d, e, f, g, h, i, k};\n const values = Object.keys(args).map((key) => {\n return args[key];\n });\n // eslint-disable-next-line unicorn/no-reduce\n const hasOnlyOneParameterValued = 1 === values.reduce((accumulator, value) => {\n // eslint-disable-next-line no-return-assign, no-param-reassign\n return accumulator += typeof value === 'undefined' ? 0 : 1;\n }, 0);\n message = hasOnlyOneParameterValued ? sprintf('%s', a) : sprintf(a, b, c, d, e, f, g, h, i, k);\n } else {\n if (typeof b !== 'string') {\n throw new TypeError('Message must be a string.');\n }\n\n context = JSON.parse(stringify({\n ...getFirstParentDomainContext(),\n ...parentContext || {},\n ...a,\n }));\n\n message = sprintf(b, c, d, e, f, g, h, i, k);\n }\n\n onMessage({\n context,\n message,\n sequence,\n time,\n version: '1.0.0',\n });\n };\n\n log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => {\n if (typeof context === 'function') {\n return createLogger((message) => {\n if (typeof context !== 'function') {\n throw new TypeError('Unexpected state.');\n }\n onMessage(context(message));\n }, parentContext);\n }\n\n return createLogger(onMessage, {\n ...getFirstParentDomainContext(),\n ...parentContext,\n ...context,\n });\n };\n\n log.getContext = (): MessageContextType => {\n return {\n ...getFirstParentDomainContext(),\n ...parentContext || {},\n };\n };\n\n log.adopt = async (routine, context) => {\n if (!domain) {\n return routine();\n }\n\n const adoptedDomain = domain.create();\n\n return adoptedDomain\n .run(() => {\n // $FlowFixMe\n adoptedDomain.roarr = {\n context: {\n ...getParentDomainContext(),\n ...context,\n },\n };\n\n return routine();\n });\n };\n\n for (const logLevel of Object.keys(logLevels)) {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations\n log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {\n return log.child({\n logLevel: logLevels[logLevel],\n })(a, b, c, d, e, f, g, h, i, k);\n };\n }\n\n // @see https://github.com/facebook/flow/issues/6705\n // $FlowFixMe\n return log;\n};\n\nexport default createLogger;\n"],"file":"createLogger.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createMockLogger.js b/node_modules/roarr/dist/factories/createMockLogger.js deleted file mode 100644 index b25a37b..0000000 --- a/node_modules/roarr/dist/factories/createMockLogger.js +++ /dev/null @@ -1,44 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _constants = require("../constants"); - -const createMockLogger = (onMessage, parentContext) => { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations, no-unused-vars - const log = (a, b, c, d, e, f, g, h, i, k) => {// - }; - - log.adopt = async routine => { - return routine(); - }; // eslint-disable-next-line no-unused-vars - - - log.child = context => { - return createMockLogger(onMessage, parentContext); - }; - - log.getContext = () => { - return {}; - }; - - for (const logLevel of Object.keys(_constants.logLevels)) { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations - log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => { - return log.child({ - logLevel: _constants.logLevels[logLevel] - })(a, b, c, d, e, f, g, h, i, k); - }; - } // @see https://github.com/facebook/flow/issues/6705 - // $FlowFixMe - - - return log; -}; - -var _default = createMockLogger; -exports.default = _default; -//# sourceMappingURL=createMockLogger.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createMockLogger.js.flow b/node_modules/roarr/dist/factories/createMockLogger.js.flow deleted file mode 100644 index 37e0912..0000000 --- a/node_modules/roarr/dist/factories/createMockLogger.js.flow +++ /dev/null @@ -1,46 +0,0 @@ -// @flow - -import { - logLevels, -} from '../constants'; -import type { - LoggerType, - MessageContextType, - MessageEventHandlerType, - TranslateMessageFunctionType, -} from '../types'; - -const createMockLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations, no-unused-vars - const log = (a, b, c, d, e, f, g, h, i, k) => { - // - }; - - log.adopt = async (routine) => { - return routine(); - }; - - // eslint-disable-next-line no-unused-vars - log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => { - return createMockLogger(onMessage, parentContext); - }; - - log.getContext = (): MessageContextType => { - return {}; - }; - - for (const logLevel of Object.keys(logLevels)) { - // eslint-disable-next-line id-length, unicorn/prevent-abbreviations - log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => { - return log.child({ - logLevel: logLevels[logLevel], - })(a, b, c, d, e, f, g, h, i, k); - }; - } - - // @see https://github.com/facebook/flow/issues/6705 - // $FlowFixMe - return log; -}; - -export default createMockLogger; diff --git a/node_modules/roarr/dist/factories/createMockLogger.js.map b/node_modules/roarr/dist/factories/createMockLogger.js.map deleted file mode 100644 index a57fe4f..0000000 --- a/node_modules/roarr/dist/factories/createMockLogger.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/factories/createMockLogger.js"],"names":["createMockLogger","onMessage","parentContext","log","a","b","c","d","e","f","g","h","i","k","adopt","routine","child","context","getContext","logLevel","Object","keys","logLevels"],"mappings":";;;;;;;AAEA;;AAUA,MAAMA,gBAAgB,GAAG,CAACC,SAAD,EAAqCC,aAArC,KAAwF;AAC/G;AACA,QAAMC,GAAG,GAAG,CAACC,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC,CAC5C;AACD,GAFD;;AAIAV,EAAAA,GAAG,CAACW,KAAJ,GAAY,MAAOC,OAAP,IAAmB;AAC7B,WAAOA,OAAO,EAAd;AACD,GAFD,CAN+G,CAU/G;;;AACAZ,EAAAA,GAAG,CAACa,KAAJ,GAAaC,OAAD,IAA4E;AACtF,WAAOjB,gBAAgB,CAACC,SAAD,EAAYC,aAAZ,CAAvB;AACD,GAFD;;AAIAC,EAAAA,GAAG,CAACe,UAAJ,GAAiB,MAA0B;AACzC,WAAO,EAAP;AACD,GAFD;;AAIA,OAAK,MAAMC,QAAX,IAAuBC,MAAM,CAACC,IAAP,CAAYC,oBAAZ,CAAvB,EAA+C;AAC7C;AACAnB,IAAAA,GAAG,CAACgB,QAAD,CAAH,GAAgB,CAACf,CAAD,EAAIC,CAAJ,EAAOC,CAAP,EAAUC,CAAV,EAAaC,CAAb,EAAgBC,CAAhB,EAAmBC,CAAnB,EAAsBC,CAAtB,EAAyBC,CAAzB,EAA4BC,CAA5B,KAAkC;AAChD,aAAOV,GAAG,CAACa,KAAJ,CAAU;AACfG,QAAAA,QAAQ,EAAEG,qBAAUH,QAAV;AADK,OAAV,EAEJf,CAFI,EAEDC,CAFC,EAEEC,CAFF,EAEKC,CAFL,EAEQC,CAFR,EAEWC,CAFX,EAEcC,CAFd,EAEiBC,CAFjB,EAEoBC,CAFpB,EAEuBC,CAFvB,CAAP;AAGD,KAJD;AAKD,GA1B8G,CA4B/G;AACA;;;AACA,SAAOV,GAAP;AACD,CA/BD;;eAiCeH,gB","sourcesContent":["// @flow\n\nimport {\n logLevels,\n} from '../constants';\nimport type {\n LoggerType,\n MessageContextType,\n MessageEventHandlerType,\n TranslateMessageFunctionType,\n} from '../types';\n\nconst createMockLogger = (onMessage: MessageEventHandlerType, parentContext?: MessageContextType): LoggerType => {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations, no-unused-vars\n const log = (a, b, c, d, e, f, g, h, i, k) => {\n //\n };\n\n log.adopt = async (routine) => {\n return routine();\n };\n\n // eslint-disable-next-line no-unused-vars\n log.child = (context: TranslateMessageFunctionType | MessageContextType): LoggerType => {\n return createMockLogger(onMessage, parentContext);\n };\n\n log.getContext = (): MessageContextType => {\n return {};\n };\n\n for (const logLevel of Object.keys(logLevels)) {\n // eslint-disable-next-line id-length, unicorn/prevent-abbreviations\n log[logLevel] = (a, b, c, d, e, f, g, h, i, k) => {\n return log.child({\n logLevel: logLevels[logLevel],\n })(a, b, c, d, e, f, g, h, i, k);\n };\n }\n\n // @see https://github.com/facebook/flow/issues/6705\n // $FlowFixMe\n return log;\n};\n\nexport default createMockLogger;\n"],"file":"createMockLogger.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createNodeWriter.js b/node_modules/roarr/dist/factories/createNodeWriter.js deleted file mode 100644 index 731020a..0000000 --- a/node_modules/roarr/dist/factories/createNodeWriter.js +++ /dev/null @@ -1,25 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -const createBlockingWriter = stream => { - return { - write: message => { - stream.write(message + '\n'); - } - }; -}; - -const createNodeWriter = () => { - // eslint-disable-next-line no-process-env - const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase(); - const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr; - return createBlockingWriter(stream); -}; - -var _default = createNodeWriter; -exports.default = _default; -//# sourceMappingURL=createNodeWriter.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createNodeWriter.js.flow b/node_modules/roarr/dist/factories/createNodeWriter.js.flow deleted file mode 100644 index b03d9c3..0000000 --- a/node_modules/roarr/dist/factories/createNodeWriter.js.flow +++ /dev/null @@ -1,22 +0,0 @@ -// @flow - -import type { - WriterType, -} from '../types'; - -const createBlockingWriter = (stream: stream$Writable): WriterType => { - return { - write: (message: string) => { - stream.write(message + '\n'); - }, - }; -}; - -export default (): WriterType => { - // eslint-disable-next-line no-process-env - const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase(); - - const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr; - - return createBlockingWriter(stream); -}; diff --git a/node_modules/roarr/dist/factories/createNodeWriter.js.map b/node_modules/roarr/dist/factories/createNodeWriter.js.map deleted file mode 100644 index 5f54e92..0000000 --- a/node_modules/roarr/dist/factories/createNodeWriter.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/factories/createNodeWriter.js"],"names":["createBlockingWriter","stream","write","message","targetStream","process","env","ROARR_STREAM","toUpperCase","stdout","stderr"],"mappings":";;;;;;;AAMA,MAAMA,oBAAoB,GAAIC,MAAD,IAAyC;AACpE,SAAO;AACLC,IAAAA,KAAK,EAAGC,OAAD,IAAqB;AAC1BF,MAAAA,MAAM,CAACC,KAAP,CAAaC,OAAO,GAAG,IAAvB;AACD;AAHI,GAAP;AAKD,CAND;;+BAQiC;AAC/B;AACA,QAAMC,YAAY,GAAG,CAACC,OAAO,CAACC,GAAR,CAAYC,YAAZ,IAA4B,QAA7B,EAAuCC,WAAvC,EAArB;AAEA,QAAMP,MAAM,GAAGG,YAAY,CAACI,WAAb,OAA+B,QAA/B,GAA0CH,OAAO,CAACI,MAAlD,GAA2DJ,OAAO,CAACK,MAAlF;AAEA,SAAOV,oBAAoB,CAACC,MAAD,CAA3B;AACD,C","sourcesContent":["// @flow\n\nimport type {\n WriterType,\n} from '../types';\n\nconst createBlockingWriter = (stream: stream$Writable): WriterType => {\n return {\n write: (message: string) => {\n stream.write(message + '\\n');\n },\n };\n};\n\nexport default (): WriterType => {\n // eslint-disable-next-line no-process-env\n const targetStream = (process.env.ROARR_STREAM || 'STDOUT').toUpperCase();\n\n const stream = targetStream.toUpperCase() === 'STDOUT' ? process.stdout : process.stderr;\n\n return createBlockingWriter(stream);\n};\n"],"file":"createNodeWriter.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js deleted file mode 100644 index 7cc70bd..0000000 --- a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js +++ /dev/null @@ -1,53 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = void 0; - -var _detectNode = _interopRequireDefault(require("detect-node")); - -var _semverCompare = _interopRequireDefault(require("semver-compare")); - -var _package = require("../../package.json"); - -var _createNodeWriter = _interopRequireDefault(require("./createNodeWriter")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } - -function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -// eslint-disable-next-line flowtype/no-weak-types -const createRoarrInititialGlobalState = currentState => { - const versions = (currentState.versions || []).concat(); - versions.sort(_semverCompare.default); - const currentIsLatestVersion = !versions.length || (0, _semverCompare.default)(_package.version, versions[versions.length - 1]) === 1; - - if (!versions.includes(_package.version)) { - versions.push(_package.version); - } - - versions.sort(_semverCompare.default); - - let newState = _objectSpread(_objectSpread({ - sequence: 0 - }, currentState), {}, { - versions - }); - - if (_detectNode.default) { - if (currentIsLatestVersion || !newState.write) { - newState = _objectSpread(_objectSpread({}, newState), (0, _createNodeWriter.default)()); - } - } - - return newState; -}; - -var _default = createRoarrInititialGlobalState; -exports.default = _default; -//# sourceMappingURL=createRoarrInititialGlobalState.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow deleted file mode 100644 index 15a1605..0000000 --- a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow +++ /dev/null @@ -1,43 +0,0 @@ -// @flow - -import environmentIsNode from 'detect-node'; -import cmp from 'semver-compare'; -import { - version, -} from '../../package.json'; -import type { - RoarrGlobalStateType, -} from '../types'; -import createNodeWriter from './createNodeWriter'; - -// eslint-disable-next-line flowtype/no-weak-types -export default (currentState: Object): RoarrGlobalStateType => { - const versions = (currentState.versions || []).concat(); - - versions.sort(cmp); - - const currentIsLatestVersion = !versions.length || cmp(version, versions[versions.length - 1]) === 1; - - if (!versions.includes(version)) { - versions.push(version); - } - - versions.sort(cmp); - - let newState = { - sequence: 0, - ...currentState, - versions, - }; - - if (environmentIsNode) { - if (currentIsLatestVersion || !newState.write) { - newState = { - ...newState, - ...createNodeWriter(), - }; - } - } - - return newState; -}; diff --git a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map b/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map deleted file mode 100644 index 7c221b6..0000000 --- a/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/factories/createRoarrInititialGlobalState.js"],"names":["currentState","versions","concat","sort","cmp","currentIsLatestVersion","length","version","includes","push","newState","sequence","environmentIsNode","write"],"mappings":";;;;;;;AAEA;;AACA;;AACA;;AAMA;;;;;;;;;;AAEA;wCACgBA,Y,IAA+C;AAC7D,QAAMC,QAAQ,GAAG,CAACD,YAAY,CAACC,QAAb,IAAyB,EAA1B,EAA8BC,MAA9B,EAAjB;AAEAD,EAAAA,QAAQ,CAACE,IAAT,CAAcC,sBAAd;AAEA,QAAMC,sBAAsB,GAAG,CAACJ,QAAQ,CAACK,MAAV,IAAoB,4BAAIC,gBAAJ,EAAaN,QAAQ,CAACA,QAAQ,CAACK,MAAT,GAAkB,CAAnB,CAArB,MAAgD,CAAnG;;AAEA,MAAI,CAACL,QAAQ,CAACO,QAAT,CAAkBD,gBAAlB,CAAL,EAAiC;AAC/BN,IAAAA,QAAQ,CAACQ,IAAT,CAAcF,gBAAd;AACD;;AAEDN,EAAAA,QAAQ,CAACE,IAAT,CAAcC,sBAAd;;AAEA,MAAIM,QAAQ;AACVC,IAAAA,QAAQ,EAAE;AADA,KAEPX,YAFO;AAGVC,IAAAA;AAHU,IAAZ;;AAMA,MAAIW,mBAAJ,EAAuB;AACrB,QAAIP,sBAAsB,IAAI,CAACK,QAAQ,CAACG,KAAxC,EAA+C;AAC7CH,MAAAA,QAAQ,mCACHA,QADG,GAEH,gCAFG,CAAR;AAID;AACF;;AAED,SAAOA,QAAP;AACD,C","sourcesContent":["// @flow\n\nimport environmentIsNode from 'detect-node';\nimport cmp from 'semver-compare';\nimport {\n version,\n} from '../../package.json';\nimport type {\n RoarrGlobalStateType,\n} from '../types';\nimport createNodeWriter from './createNodeWriter';\n\n// eslint-disable-next-line flowtype/no-weak-types\nexport default (currentState: Object): RoarrGlobalStateType => {\n const versions = (currentState.versions || []).concat();\n\n versions.sort(cmp);\n\n const currentIsLatestVersion = !versions.length || cmp(version, versions[versions.length - 1]) === 1;\n\n if (!versions.includes(version)) {\n versions.push(version);\n }\n\n versions.sort(cmp);\n\n let newState = {\n sequence: 0,\n ...currentState,\n versions,\n };\n\n if (environmentIsNode) {\n if (currentIsLatestVersion || !newState.write) {\n newState = {\n ...newState,\n ...createNodeWriter(),\n };\n }\n }\n\n return newState;\n};\n"],"file":"createRoarrInititialGlobalState.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/index.js b/node_modules/roarr/dist/factories/index.js deleted file mode 100644 index 97e8167..0000000 --- a/node_modules/roarr/dist/factories/index.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -Object.defineProperty(exports, "createLogger", { - enumerable: true, - get: function () { - return _createLogger.default; - } -}); -Object.defineProperty(exports, "createMockLogger", { - enumerable: true, - get: function () { - return _createMockLogger.default; - } -}); -Object.defineProperty(exports, "createRoarrInititialGlobalState", { - enumerable: true, - get: function () { - return _createRoarrInititialGlobalState.default; - } -}); - -var _createLogger = _interopRequireDefault(require("./createLogger")); - -var _createMockLogger = _interopRequireDefault(require("./createMockLogger")); - -var _createRoarrInititialGlobalState = _interopRequireDefault(require("./createRoarrInititialGlobalState")); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -//# sourceMappingURL=index.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/factories/index.js.flow b/node_modules/roarr/dist/factories/index.js.flow deleted file mode 100644 index b4881ce..0000000 --- a/node_modules/roarr/dist/factories/index.js.flow +++ /dev/null @@ -1,11 +0,0 @@ -// @flow - -export { - default as createLogger, -} from './createLogger'; -export { - default as createMockLogger, -} from './createMockLogger'; -export { - default as createRoarrInititialGlobalState, -} from './createRoarrInititialGlobalState'; diff --git a/node_modules/roarr/dist/factories/index.js.map b/node_modules/roarr/dist/factories/index.js.map deleted file mode 100644 index e023a47..0000000 --- a/node_modules/roarr/dist/factories/index.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../../src/factories/index.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAGA;;AAGA","sourcesContent":["// @flow\n\nexport {\n default as createLogger,\n} from './createLogger';\nexport {\n default as createMockLogger,\n} from './createMockLogger';\nexport {\n default as createRoarrInititialGlobalState,\n} from './createRoarrInititialGlobalState';\n"],"file":"index.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/log.js b/node_modules/roarr/dist/log.js deleted file mode 100644 index 23036e3..0000000 --- a/node_modules/roarr/dist/log.js +++ /dev/null @@ -1,42 +0,0 @@ -"use strict"; - -Object.defineProperty(exports, "__esModule", { - value: true -}); -exports.default = exports.ROARR = void 0; - -var _boolean = require("boolean"); - -var _detectNode = _interopRequireDefault(require("detect-node")); - -var _globalthis = _interopRequireDefault(require("globalthis")); - -var _factories = require("./factories"); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -const globalThis = (0, _globalthis.default)(); -const ROARR = globalThis.ROARR = (0, _factories.createRoarrInititialGlobalState)(globalThis.ROARR || {}); -exports.ROARR = ROARR; -let logFactory = _factories.createLogger; - -if (_detectNode.default) { - // eslint-disable-next-line no-process-env - const enabled = (0, _boolean.boolean)(process.env.ROARR_LOG || ''); - - if (!enabled) { - logFactory = _factories.createMockLogger; - } -} - -var _default = logFactory(message => { - if (ROARR.write) { - // Stringify message as soon as it is received to prevent - // properties of the context from being modified by reference. - const body = JSON.stringify(message); - ROARR.write(body); - } -}); - -exports.default = _default; -//# sourceMappingURL=log.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/log.js.flow b/node_modules/roarr/dist/log.js.flow deleted file mode 100644 index 803ccfc..0000000 --- a/node_modules/roarr/dist/log.js.flow +++ /dev/null @@ -1,47 +0,0 @@ -// @flow - -import { - boolean, -} from 'boolean'; -import environmentIsNode from 'detect-node'; -import createGlobalThis from 'globalthis'; -import { - createLogger, - createMockLogger, - createRoarrInititialGlobalState, -} from './factories'; - -const globalThis = createGlobalThis(); - -const ROARR = globalThis.ROARR = createRoarrInititialGlobalState(globalThis.ROARR || {}); - -let logFactory = createLogger; - -if (environmentIsNode) { - // eslint-disable-next-line no-process-env - const enabled = boolean(process.env.ROARR_LOG || ''); - - if (!enabled) { - logFactory = createMockLogger; - } -} - -export type { - LoggerType, - MessageType, - TranslateMessageFunctionType, -} from './types'; - -export { - ROARR, -}; - -export default logFactory((message) => { - if (ROARR.write) { - // Stringify message as soon as it is received to prevent - // properties of the context from being modified by reference. - const body = JSON.stringify(message); - - ROARR.write(body); - } -}); diff --git a/node_modules/roarr/dist/log.js.map b/node_modules/roarr/dist/log.js.map deleted file mode 100644 index b72f603..0000000 --- a/node_modules/roarr/dist/log.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["../src/log.js"],"names":["globalThis","ROARR","logFactory","createLogger","environmentIsNode","enabled","process","env","ROARR_LOG","createMockLogger","message","write","body","JSON","stringify"],"mappings":";;;;;;;AAEA;;AAGA;;AACA;;AACA;;;;AAMA,MAAMA,UAAU,GAAG,0BAAnB;AAEA,MAAMC,KAAK,GAAGD,UAAU,CAACC,KAAX,GAAmB,gDAAgCD,UAAU,CAACC,KAAX,IAAoB,EAApD,CAAjC;;AAEA,IAAIC,UAAU,GAAGC,uBAAjB;;AAEA,IAAIC,mBAAJ,EAAuB;AACrB;AACA,QAAMC,OAAO,GAAG,sBAAQC,OAAO,CAACC,GAAR,CAAYC,SAAZ,IAAyB,EAAjC,CAAhB;;AAEA,MAAI,CAACH,OAAL,EAAc;AACZH,IAAAA,UAAU,GAAGO,2BAAb;AACD;AACF;;eAYcP,UAAU,CAAEQ,OAAD,IAAa;AACrC,MAAIT,KAAK,CAACU,KAAV,EAAiB;AACf;AACA;AACA,UAAMC,IAAI,GAAGC,IAAI,CAACC,SAAL,CAAeJ,OAAf,CAAb;AAEAT,IAAAA,KAAK,CAACU,KAAN,CAAYC,IAAZ;AACD;AACF,CARwB,C","sourcesContent":["// @flow\n\nimport {\n boolean,\n} from 'boolean';\nimport environmentIsNode from 'detect-node';\nimport createGlobalThis from 'globalthis';\nimport {\n createLogger,\n createMockLogger,\n createRoarrInititialGlobalState,\n} from './factories';\n\nconst globalThis = createGlobalThis();\n\nconst ROARR = globalThis.ROARR = createRoarrInititialGlobalState(globalThis.ROARR || {});\n\nlet logFactory = createLogger;\n\nif (environmentIsNode) {\n // eslint-disable-next-line no-process-env\n const enabled = boolean(process.env.ROARR_LOG || '');\n\n if (!enabled) {\n logFactory = createMockLogger;\n }\n}\n\nexport type {\n LoggerType,\n MessageType,\n TranslateMessageFunctionType,\n} from './types';\n\nexport {\n ROARR,\n};\n\nexport default logFactory((message) => {\n if (ROARR.write) {\n // Stringify message as soon as it is received to prevent\n // properties of the context from being modified by reference.\n const body = JSON.stringify(message);\n\n ROARR.write(body);\n }\n});\n"],"file":"log.js"}
\ No newline at end of file diff --git a/node_modules/roarr/dist/types.js b/node_modules/roarr/dist/types.js deleted file mode 100644 index 2f0e414..0000000 --- a/node_modules/roarr/dist/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -//# sourceMappingURL=types.js.map
\ No newline at end of file diff --git a/node_modules/roarr/dist/types.js.flow b/node_modules/roarr/dist/types.js.flow deleted file mode 100644 index 18be149..0000000 --- a/node_modules/roarr/dist/types.js.flow +++ /dev/null @@ -1,81 +0,0 @@ -// @flow - -/* eslint-disable import/exports-last, flowtype/require-types-at-top */ - -export type SerializableValueType = string | number | boolean | null | {+[key: string]: SerializableValueType, ...} | $ReadOnlyArray<SerializableValueType>; - -export type SerializableObjectType = { - +[key: string]: SerializableValueType, - ... -}; - -export type WriterType = {| - +write: (message: string) => void, -|}; - -export type RoarrGlobalStateType = {| - sequence: number, - versions: $ReadOnlyArray<string>, - ...WriterType, -|}; - -export type SprintfArgumentType = string | number | boolean | null; - -// eslint-disable-next-line flowtype/no-weak-types -export type MessageContextType = Object; - -export type MessageType = {| - +context: MessageContextType, - +message: string, - +sequence: number, - +time: number, - +version: string, -|}; - -export type TranslateMessageFunctionType = (message: MessageType) => MessageType; - -declare function Logger ( - context: MessageContextType, - message: string, - c?: SprintfArgumentType, - d?: SprintfArgumentType, - e?: SprintfArgumentType, - f?: SprintfArgumentType, - g?: SprintfArgumentType, - h?: SprintfArgumentType, - i?: SprintfArgumentType, - k?: SprintfArgumentType -): void; - -// eslint-disable-next-line no-redeclare -declare function Logger ( - message: string, - b?: SprintfArgumentType, - c?: SprintfArgumentType, - d?: SprintfArgumentType, - e?: SprintfArgumentType, - f?: SprintfArgumentType, - g?: SprintfArgumentType, - h?: SprintfArgumentType, - i?: SprintfArgumentType, - k?: SprintfArgumentType -): void; - -/** - * see https://twitter.com/kuizinas/status/914139352908943360 - */ -export type LoggerType = {| - // eslint-disable-next-line no-undef - [[call]]: typeof Logger, - +adopt: <T>(routine: () => Promise<T>, context: MessageContextType) => Promise<T>, - +child: (context: TranslateMessageFunctionType | MessageContextType) => LoggerType, - +debug: typeof Logger, - +error: typeof Logger, - +fatal: typeof Logger, - +getContext: () => MessageContextType, - +info: typeof Logger, - +trace: typeof Logger, - +warn: typeof Logger, -|}; - -export type MessageEventHandlerType = (message: MessageType) => void; diff --git a/node_modules/roarr/dist/types.js.map b/node_modules/roarr/dist/types.js.map deleted file mode 100644 index 036ac15..0000000 --- a/node_modules/roarr/dist/types.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"types.js"}
\ No newline at end of file |