From ae187b6d75c8079da0be1dc288613bad8466fe61 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Tue, 24 Oct 2023 17:43:37 +0200 Subject: Initial commit --- .../roarr/dist/factories/createLogger.js | 192 ++++++++++++++++++++ .../roarr/dist/factories/createLogger.js.flow | 197 +++++++++++++++++++++ .../roarr/dist/factories/createLogger.js.map | 1 + .../roarr/dist/factories/createMockLogger.js | 44 +++++ .../roarr/dist/factories/createMockLogger.js.flow | 46 +++++ .../roarr/dist/factories/createMockLogger.js.map | 1 + .../roarr/dist/factories/createNodeWriter.js | 25 +++ .../roarr/dist/factories/createNodeWriter.js.flow | 22 +++ .../roarr/dist/factories/createNodeWriter.js.map | 1 + .../factories/createRoarrInititialGlobalState.js | 53 ++++++ .../createRoarrInititialGlobalState.js.flow | 43 +++++ .../createRoarrInititialGlobalState.js.map | 1 + desktop/node_modules/roarr/dist/factories/index.js | 32 ++++ .../roarr/dist/factories/index.js.flow | 11 ++ .../node_modules/roarr/dist/factories/index.js.map | 1 + 15 files changed, 670 insertions(+) create mode 100644 desktop/node_modules/roarr/dist/factories/createLogger.js create mode 100644 desktop/node_modules/roarr/dist/factories/createLogger.js.flow create mode 100644 desktop/node_modules/roarr/dist/factories/createLogger.js.map create mode 100644 desktop/node_modules/roarr/dist/factories/createMockLogger.js create mode 100644 desktop/node_modules/roarr/dist/factories/createMockLogger.js.flow create mode 100644 desktop/node_modules/roarr/dist/factories/createMockLogger.js.map create mode 100644 desktop/node_modules/roarr/dist/factories/createNodeWriter.js create mode 100644 desktop/node_modules/roarr/dist/factories/createNodeWriter.js.flow create mode 100644 desktop/node_modules/roarr/dist/factories/createNodeWriter.js.map create mode 100644 desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js create mode 100644 desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow create mode 100644 desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map create mode 100644 desktop/node_modules/roarr/dist/factories/index.js create mode 100644 desktop/node_modules/roarr/dist/factories/index.js.flow create mode 100644 desktop/node_modules/roarr/dist/factories/index.js.map (limited to 'desktop/node_modules/roarr/dist/factories') diff --git a/desktop/node_modules/roarr/dist/factories/createLogger.js b/desktop/node_modules/roarr/dist/factories/createLogger.js new file mode 100644 index 0000000..3936101 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createLogger.js @@ -0,0 +1,192 @@ +"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/desktop/node_modules/roarr/dist/factories/createLogger.js.flow b/desktop/node_modules/roarr/dist/factories/createLogger.js.flow new file mode 100644 index 0000000..4cd6c27 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createLogger.js.flow @@ -0,0 +1,197 @@ +// @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/desktop/node_modules/roarr/dist/factories/createLogger.js.map b/desktop/node_modules/roarr/dist/factories/createLogger.js.map new file mode 100644 index 0000000..4c8854c --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createLogger.js.map @@ -0,0 +1 @@ +{"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;AACD;;AAED,MAAIK,aAAa,GAAGC,OAAO,CAACN,MAA5B,CALwC,CAOxC;;AACA,MAAIK,aAAa,IAAIA,aAAa,CAACG,KAA/B,IAAwCH,aAAa,CAACG,KAA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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/desktop/node_modules/roarr/dist/factories/createMockLogger.js b/desktop/node_modules/roarr/dist/factories/createMockLogger.js new file mode 100644 index 0000000..b25a37b --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createMockLogger.js @@ -0,0 +1,44 @@ +"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/desktop/node_modules/roarr/dist/factories/createMockLogger.js.flow b/desktop/node_modules/roarr/dist/factories/createMockLogger.js.flow new file mode 100644 index 0000000..37e0912 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createMockLogger.js.flow @@ -0,0 +1,46 @@ +// @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/desktop/node_modules/roarr/dist/factories/createMockLogger.js.map b/desktop/node_modules/roarr/dist/factories/createMockLogger.js.map new file mode 100644 index 0000000..a57fe4f --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createMockLogger.js.map @@ -0,0 +1 @@ +{"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/desktop/node_modules/roarr/dist/factories/createNodeWriter.js b/desktop/node_modules/roarr/dist/factories/createNodeWriter.js new file mode 100644 index 0000000..731020a --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createNodeWriter.js @@ -0,0 +1,25 @@ +"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/desktop/node_modules/roarr/dist/factories/createNodeWriter.js.flow b/desktop/node_modules/roarr/dist/factories/createNodeWriter.js.flow new file mode 100644 index 0000000..b03d9c3 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createNodeWriter.js.flow @@ -0,0 +1,22 @@ +// @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/desktop/node_modules/roarr/dist/factories/createNodeWriter.js.map b/desktop/node_modules/roarr/dist/factories/createNodeWriter.js.map new file mode 100644 index 0000000..5f54e92 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createNodeWriter.js.map @@ -0,0 +1 @@ +{"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/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js b/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js new file mode 100644 index 0000000..7cc70bd --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js @@ -0,0 +1,53 @@ +"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/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow b/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow new file mode 100644 index 0000000..15a1605 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.flow @@ -0,0 +1,43 @@ +// @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/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map b/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map new file mode 100644 index 0000000..7c221b6 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/createRoarrInititialGlobalState.js.map @@ -0,0 +1 @@ +{"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/desktop/node_modules/roarr/dist/factories/index.js b/desktop/node_modules/roarr/dist/factories/index.js new file mode 100644 index 0000000..97e8167 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/index.js @@ -0,0 +1,32 @@ +"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/desktop/node_modules/roarr/dist/factories/index.js.flow b/desktop/node_modules/roarr/dist/factories/index.js.flow new file mode 100644 index 0000000..b4881ce --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/index.js.flow @@ -0,0 +1,11 @@ +// @flow + +export { + default as createLogger, +} from './createLogger'; +export { + default as createMockLogger, +} from './createMockLogger'; +export { + default as createRoarrInititialGlobalState, +} from './createRoarrInititialGlobalState'; diff --git a/desktop/node_modules/roarr/dist/factories/index.js.map b/desktop/node_modules/roarr/dist/factories/index.js.map new file mode 100644 index 0000000..e023a47 --- /dev/null +++ b/desktop/node_modules/roarr/dist/factories/index.js.map @@ -0,0 +1 @@ +{"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 -- cgit