diff --git a/.ncurc.json b/.ncurc.json new file mode 100644 index 0000000..a8ca417 --- /dev/null +++ b/.ncurc.json @@ -0,0 +1,5 @@ +{ + "reject": [ + "typescript" + ] +} diff --git a/config/default.json b/config/default.json index 323a15c..8dc2b6a 100644 --- a/config/default.json +++ b/config/default.json @@ -2,5 +2,5 @@ "SERVER_HOST": "localhost", "SERVER_PORT": 50051, "SIDECAR_DISABLED": true, - "SIDECAR_WITH_LOGGER": true + "SIDECAR_WITH_LOGGER": false } diff --git a/lib/Recorder.js b/lib/Recorder.js index 566498c..6cd992e 100644 --- a/lib/Recorder.js +++ b/lib/Recorder.js @@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }; Object.defineProperty(exports, "__esModule", { value: true }); const EventMessage_1 = require("./model/EventMessage"); -const Logger = require('@mojaloop/central-services-shared').Logger; +const Logger = require('@mojaloop/central-services-logger'); const logWithLevel = (message) => __awaiter(this, void 0, void 0, function* () { return new Promise((resolve, reject) => { try { diff --git a/lib/Recorder.js.map b/lib/Recorder.js.map index 0228b2e..2e27e49 100644 --- a/lib/Recorder.js.map +++ b/lib/Recorder.js.map @@ -1 +1 @@ -{"version":3,"file":"Recorder.js","sourceRoot":"","sources":["../src/Recorder.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uDAAuH;AAGvH,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC,MAAM,CAAA;AAiBlE,MAAM,YAAY,GAAG,CAAO,OAAqB,EAAgB,EAAE;IACjE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI;YACF,IAAI,IAAiC,CAAA;YACrC,IAAI,MAAqC,CAAA;YACzC,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAC9C,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAK,CAAA;gBACnC,MAAM,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YAC5C,IAAI,QAAQ,EAAE;gBACZ,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAA;aACxB;iBAAM;gBACL,OAAO,MAAM,CAAA;aACd;QACH,CAAC;KAAA;CACF;AAKC,kEAA2B","sourcesContent":["import { EventType, LogEventAction, LogResponseStatus, TypeEventTypeAction, EventMessage } from \"./model/EventMessage\";\nimport { EventLoggingServiceClient } from \"./transport/EventLoggingServiceClient\";\n\nconst Logger = require('@mojaloop/central-services-shared').Logger\n\n/**\n * Describes Event Recorder interface\n * @param recorder instance of EventLogingServiceClient or another recorder\n * @param preProcess preprocessing method with null implementation in the current release\n * @param postProcess postprocessing method with null implementation in the current release\n * @param record the method that records the event depending on the recorder implementation\n */\n\ninterface IEventRecorder {\n recorder: EventLoggingServiceClient | Function\n preProcess: (event: EventMessage) => EventMessage\n postProcess?: (result: any) => any\n record: (event: EventMessage, doLog?: boolean, callback?: (result: any) => void ) => Promise\n}\n\nconst logWithLevel = async (message: EventMessage): Promise => {\n return new Promise((resolve, reject) => {\n try {\n let type: TypeEventTypeAction['type']\n let action: TypeEventTypeAction['action']\n if (message.metadata && message.metadata.event) {\n type = message.metadata.event.type!\n action = message.metadata.event.action!\n } else {\n type = EventType.log\n action = LogEventAction.info\n }\n if (type === EventType.log && Object.values(LogEventAction).includes(action)) \n Logger.log(action, JSON.stringify(message, null, 2))\n else \n Logger.log(type, JSON.stringify(message, null, 2))\n resolve({ status: LogResponseStatus.accepted })\n } catch(e) {\n reject({status: LogResponseStatus.error, error: e})\n }\n })\n}\n\n\nclass DefaultLoggerRecorder implements IEventRecorder {\n recorder: Function\n\n constructor(recorder?: EventLoggingServiceClient) {\n this.recorder = recorder ? recorder : Logger\n return this\n }\n\n preProcess = (event: EventMessage): EventMessage => {\n return event\n }\n\n postProcess = (result: any): any => {\n return result\n }\n\n async record(event: EventMessage): Promise {\n let updatedEvent = this.preProcess(event)\n let result = await logWithLevel(updatedEvent)\n return this.postProcess(result)\n }\n}\n\nclass DefaultSidecarRecorder implements IEventRecorder {\n recorder: EventLoggingServiceClient\n\n constructor(recorder: EventLoggingServiceClient) {\n this.recorder = recorder\n return this\n }\n\n preProcess = (event: EventMessage): EventMessage => {\n return event\n }\n\n postProcess = (result: any): any => {\n return result\n }\n\n async record(event: EventMessage, doLog: boolean = true): Promise {\n doLog && await logWithLevel(event)\n let updatedEvent = this.preProcess(event)\n let result = await this.recorder.log(updatedEvent)\n return this.postProcess(result)\n }\n}\n\nclass DefaultSidecarRecorderAsync implements IEventRecorder {\n recorder: EventLoggingServiceClient\n\n constructor(recorder: EventLoggingServiceClient) {\n this.recorder = recorder\n return this\n }\n\n preProcess = (event: EventMessage): EventMessage => {\n return event\n }\n\n async record(event: EventMessage, doLog: boolean = true, callback?: (result: any) => void): Promise {\n doLog && logWithLevel(event)\n let updatedEvent = this.preProcess(event)\n let result = this.recorder.log(updatedEvent)\n if (callback) {\n return callback(result)\n } else {\n return result\n }\n }\n}\n\nexport {\n DefaultLoggerRecorder,\n DefaultSidecarRecorder,\n DefaultSidecarRecorderAsync,\n IEventRecorder\n}\n"]} \ No newline at end of file +{"version":3,"file":"Recorder.js","sourceRoot":"","sources":["../src/Recorder.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uDAAuH;AAGvH,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAA;AAiB3D,MAAM,YAAY,GAAG,CAAO,OAAqB,EAAgB,EAAE;IACjE,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI;YACF,IAAI,IAAiC,CAAA;YACrC,IAAI,MAAqC,CAAA;YACzC,IAAI,OAAO,CAAC,QAAQ,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,EAAE;gBAC9C,IAAI,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,IAAK,CAAA;gBACnC,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAO,CAAA;aACxC;i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C,CAAA;aACxB;iBAAM;gBACL,OAAO,MAAM,CAAA;aACd;QACH,CAAC;KAAA;CACF;AAKC,kEAA2B","sourcesContent":["import { EventType, LogEventAction, LogResponseStatus, TypeEventTypeAction, EventMessage } from \"./model/EventMessage\";\nimport { EventLoggingServiceClient } from \"./transport/EventLoggingServiceClient\";\n\nconst Logger = require('@mojaloop/central-services-logger')\n\n/**\n * Describes Event Recorder interface\n * @param recorder instance of EventLogingServiceClient or another recorder\n * @param preProcess preprocessing method with null implementation in the current release\n * @param postProcess postprocessing method with null implementation in the current release\n * @param record the method that records the event depending on the recorder implementation\n */\n\ninterface IEventRecorder {\n recorder: EventLoggingServiceClient | Function\n preProcess: (event: EventMessage) => EventMessage\n postProcess?: (result: any) => any\n record: (event: EventMessage, doLog?: boolean, callback?: (result: any) => void ) => Promise\n}\n\nconst logWithLevel = async (message: EventMessage): Promise => {\n return new Promise((resolve, reject) => {\n try {\n let type: TypeEventTypeAction['type']\n let action: TypeEventTypeAction['action']\n if (message.metadata && message.metadata.event) {\n type = message.metadata.event.type!\n action = message.metadata.event.action!\n } else {\n type = EventType.log\n action = LogEventAction.info\n }\n if (type === EventType.log && Object.values(LogEventAction).includes(action)) \n Logger.log(action, JSON.stringify(message, null, 2))\n else \n Logger.log(type, JSON.stringify(message, null, 2))\n resolve({ status: LogResponseStatus.accepted })\n } catch(e) {\n reject({status: LogResponseStatus.error, error: e})\n }\n })\n}\n\n\nclass DefaultLoggerRecorder implements IEventRecorder {\n recorder: Function\n\n constructor(recorder?: EventLoggingServiceClient) {\n this.recorder = recorder ? recorder : Logger\n return this\n }\n\n preProcess = (event: EventMessage): EventMessage => {\n return event\n }\n\n postProcess = (result: any): any => {\n return result\n }\n\n async record(event: EventMessage): Promise {\n let updatedEvent = this.preProcess(event)\n let result = await logWithLevel(updatedEvent)\n return this.postProcess(result)\n }\n}\n\nclass DefaultSidecarRecorder implements IEventRecorder {\n recorder: EventLoggingServiceClient\n\n constructor(recorder: EventLoggingServiceClient) {\n this.recorder = recorder\n return this\n }\n\n preProcess = (event: EventMessage): EventMessage => {\n return event\n }\n\n postProcess = (result: any): any => {\n return result\n }\n\n async record(event: EventMessage, doLog: boolean = true): Promise {\n doLog && await logWithLevel(event)\n let updatedEvent = this.preProcess(event)\n let result = await this.recorder.log(updatedEvent)\n return this.postProcess(result)\n }\n}\n\nclass DefaultSidecarRecorderAsync implements IEventRecorder {\n recorder: EventLoggingServiceClient\n\n constructor(recorder: EventLoggingServiceClient) {\n this.recorder = recorder\n return this\n }\n\n preProcess = (event: EventMessage): EventMessage => {\n return event\n }\n\n async record(event: EventMessage, doLog: boolean = true, callback?: (result: any) => void): Promise {\n doLog && logWithLevel(event)\n let updatedEvent = this.preProcess(event)\n let result = this.recorder.log(updatedEvent)\n if (callback) {\n return callback(result)\n } else {\n return result\n }\n }\n}\n\nexport {\n DefaultLoggerRecorder,\n DefaultSidecarRecorder,\n DefaultSidecarRecorderAsync,\n IEventRecorder\n}\n"]} \ No newline at end of file diff --git a/lib/Span.js b/lib/Span.js index a15a293..7c0db27 100644 --- a/lib/Span.js +++ b/lib/Span.js @@ -7,10 +7,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; Object.defineProperty(exports, "__esModule", { value: true }); const EventMessage_1 = require("./model/EventMessage"); const Recorder_1 = require("./Recorder"); const EventLoggingServiceClient_1 = require("./transport/EventLoggingServiceClient"); +const serialize_error_1 = __importDefault(require("serialize-error")); +// import ErrorCallsites from 'error-callsites' +// const ErrorCallsites = require('error-callsites') const _ = require('lodash'); const TraceParent = require('traceparent'); const Config = require('./lib/config'); @@ -33,7 +39,15 @@ class Span { let defaults = getDefaults(type); let action = _action ? _action : defaults.action; let messageToLog; - if (typeof message === 'string') { + if (message instanceof Error) { + // const callsites = ErrorCallsites(message) + // message.__error_callsites = callsites + messageToLog = new EventMessage_1.EventMessage({ + content: { error: serialize_error_1.default(message) }, + type: 'application/json' + }); + } + else if (typeof message === 'string') { messageToLog = new EventMessage_1.EventMessage({ content: { payload: message }, type: 'application/json' diff --git a/lib/Span.js.map b/lib/Span.js.map index de4377e..45b72bf 100644 --- a/lib/Span.js.map +++ b/lib/Span.js.map @@ -1 +1 @@ -{"version":3,"file":"Span.js","sourceRoot":"","sources":["../src/Span.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,uDAqB6B;AAE7B,yCAEmB;AAEnB,qFAAkF;AAElF,MAAM,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;AAE5B,MAAM,WAAW,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AAE1C,MAAM,MAAM,GAAG,OAAO,CAAC,cAAc,CAAC,CAAA;AAItC,MAAM,eAAe,GAAG,MAAM,CAAC,6BAA6B;IAC1D,CAAC,CAAC,IAAI,gCAAqB,EAAE;IAC7B,CAAC,CAAC,IAAI,iCAAsB,CAAC,IAAI,qDAAyB,CAAC,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB,CAAC,CAAC,CAAA;AAgF/H,MAAM,IAAI;IAKR;;;;;OAKG;IACH,YACE,WAA+B,EAC/B,SAAqB,EACrB,iBAAmD;QAXrD,eAAU,GAAY,KAAK,CAAA;QA4P3B;;WAEG;QACK,uBAAkB,GAAG,CAC3B,OAAsB,EACtB,IAAiC,EACjC,OAAuC,EACvC,QAA4B,iCAAkB,CAAC,OAAO,EAAE,EAAgB,EAAE;YAC1E,IAAI,QAAQ,GAAG,WAAW,CAAC,IAAI,CAAC,CAAA;YAChC,IAAI,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAA;YAChD,IAAI,YAAY,CAAA;YAChB,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE;gBAC/B,YAAY,GAAG,IAAI,2BAAY,CAAC;o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,CAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;SACtE;KACF;AACH,CAAC,CAAA;AAMC,sCAAa","sourcesContent":["import {\n NullEventAction,\n AuditEventAction,\n LogEventAction,\n TraceEventAction,\n LogResponseStatus,\n EventType,\n TraceTags,\n TypeEventMessage,\n TypeEventMetadata,\n TypeSpanContext,\n EventTraceMetadata,\n EventMessage,\n TypeEventTypeAction,\n EventStateMetadata,\n EventMetadata,\n TraceEventTypeAction,\n AuditEventTypeAction,\n LogEventTypeAction,\n TypeEventAction,\n HttpRequestOptions\n} from './model/EventMessage'\n\nimport {\n IEventRecorder, DefaultLoggerRecorder, DefaultSidecarRecorder\n} from './Recorder'\n\nimport { EventLoggingServiceClient } from './transport/EventLoggingServiceClient';\n\nconst _ = require('lodash');\n\nconst TraceParent = require('traceparent')\n\nconst Config = require('./lib/config')\n\ntype RecorderKeys = 'defaultRecorder' | 'logRecorder' | 'auditRecorder' | 'traceRecorder'\n\nconst defaultRecorder = Config.EVENT_LOGGER_SIDECAR_DISABLED\n ? new DefaultLoggerRecorder()\n : new DefaultSidecarRecorder(new EventLoggingServiceClient(Config.EVENT_LOGGER_SERVER_HOST, Config.EVENT_LOGGER_SERVER_PORT))\n\n\ntype PartialWithDefaultRecorder = {\n [P in keyof T]?: T[P]\n} & {\n defaultRecorder: IEventRecorder\n}\n\n/**\n * Defines Recorders type. \n * @param defaultRecorder a recorder that will be used by default by the span if the others are not present.\n * @param logRecorder a recorder that will be used to log any logging level events\n * @param auditRecorder a recorder that will be used to log audit events\n * @param traceRecorder a recorder that will be used to log trace events\n */\n\ntype Recorders = PartialWithDefaultRecorder<{\n defaultRecorder: IEventRecorder\n logRecorder?: IEventRecorder,\n auditRecorder?: IEventRecorder,\n traceRecorder?: IEventRecorder\n}>\n\n/**\n * Defines messages allowed to be sent to the Event framework\n */\ntype TypeOfMessage = { [key: string]: NonNullable } | string\n\n/**\n * defines options to the injectContextToMessage and extractContextFromMessage\n * @param type the carrier type\n * @param path in the carrier where the trace context should be injected or extracted from\n */\ntype ContextOptions = {\n type?: string,\n path?: string\n}\n\n/**\n * Defines Span interface operations\n * @param {TypeSpanContext} spanContext the context of the span\n * @param {Recorders} recorders object that holds span recorders which are going to be used for different operations. defaultRecorder is obligatory\n * @param info Defines a method to log at info level a message from the span perspective\n * @param debug Defines a method to log at debug level a message from the span perspective \n * @param verbose Defines a method to log at verbose level a message from the span perspective \n * @param performance Defines a method to log at performance level a message from the span perspective \n * @param warning Defines a method to log at warning level a message from the span perspective\n * @param error Defines a method to log at error level a message from the span perspective\n * @param audit Defines a method to send audit event to the auditing environment\n * @param defaultTagsSetter Defines a method to set default tags. Currently has null implementation\n * @param getContext Defines method to get the span context as JS object\n * @param finish Defines a method to finish the current span and send tracing information to the tracing environment\n * @param getChild Defines a method to get child span\n * @param setTags Defines a method to set tags to the span\n * @param injectContextToMessage Defnies a method to inject current span context into message carrier\n * @param injectContextToHttpRequest Defnies a method to inject current span context into http request\n */\n\ninterface ISpan {\n spanContext: TypeSpanContext\n recorders: Recorders\n info: (message: TypeOfMessage) => Promise\n debug: (message: TypeOfMessage) => Promise\n verbose: (message: TypeOfMessage) => Promise\n performance: (message: TypeOfMessage) => Promise\n warning: (message: TypeOfMessage) => Promise\n error: (message: TypeOfMessage) => Promise\n audit: (message: TypeOfMessage) => Promise\n // trace: (message: { [key: string]: any}) => Promise // TODO need to findout is there an usecase for that \n defaultTagsSetter: (message?: TypeOfMessage) => Span\n getContext: () => TypeSpanContext\n finish: (message?: TypeOfMessage, state?: EventStateMetadata, finishTimestamp?: TypeSpanContext[\"finishTimestamp\"]) => Promise\n getChild: (service: string, recorders?: Recorders) => ISpan\n setTags: (tags: TraceTags) => Span\n injectContextToMessage: (message: { [key: string]: any }, injectOptions: ContextOptions) => { [key: string]: any },\n injectContextToHttpRequest: (request: { [key: string]: any }, type?: HttpRequestOptions) => { [key: string]: any }\n\n}\n\nclass Span implements Partial {\n spanContext: TypeSpanContext\n recorders: Recorders\n isFinished: boolean = false\n\n /**\n * Creates new span. Normally this is not used directly, but by a Tracer.createSpan method\n * @param spanContext context of the new span. Service is obligatory. Depending on the rest provided values, the new span will be created as a parent or child span\n * @param {Recorders} recorders different recorders to be used for different logging methods \n * @param defaultTagsSetter the tags setter method can be passed here\n */\n constructor(\n spanContext: EventTraceMetadata,\n recorders?: Recorders,\n defaultTagsSetter?: (message: TypeOfMessage) => any) {\n this.spanContext = Object.freeze(spanContext)\n this.defaultTagsSetter = defaultTagsSetter ? defaultTagsSetter : this.defaultTagsSetter\n this.recorders = recorders ? recorders : { defaultRecorder }\n this.defaultTagsSetter()\n return this\n }\n\n /**\n * A method to set tags by default. Not implemented yet\n * @param message the message which tags will be extracted from\n */\n\n defaultTagsSetter(message?: TypeOfMessage): Span {\n return this\n }\n\n /**\n * Gets trace context from the current span\n */\n getContext(): TypeSpanContext {\n return Object.assign({}, this.spanContext, { tags: JSON.parse(JSON.stringify(this.spanContext.tags)) })\n }\n\n /**\n * Creates and returns new child span of the current span and changes the span service name\n * @param service the name of the service of the new child span\n * @param recorders the recorders which are be set to the child span. If omitted, the recorders of the parent span are used\n */\n getChild(service: string, recorders: Recorders = this.recorders): Span {\n try {\n if (this.isFinished) throw new Error('Finished trace cannot have a child span')\n let inputTraceContext: TypeSpanContext = this.getContext()\n return new Span(new EventTraceMetadata(Object.assign({},\n inputTraceContext, {\n service,\n spanId: undefined,\n startTimestamp: undefined,\n parentSpanId: inputTraceContext.spanId\n })), recorders, this.defaultTagsSetter)\n } catch (e) {\n throw (e)\n }\n }\n\n /**\n * Injects trace context into a carrier with optional path.\n * @param carrier any kind of message or other object with keys of type String.\n * @param injectOptions type and path of the carrier. Type is not implemented yet. Path is the path to the trace context.\n */\n injectContextToMessage(carrier: { [key: string]: any }, injectOptions: ContextOptions = {}): { [key: string]: any } {\n let result = _.cloneDeep(carrier)\n let { path } = injectOptions // type not implemented yet\n if (carrier instanceof EventMessage || (('metadata' in carrier))) path = 'metadata'\n else if (carrier instanceof EventTraceMetadata) return Promise.resolve(this.spanContext)\n if (!path) Object.assign(result, { trace: this.spanContext })\n else _.merge(_.get(result, path), { trace: this.spanContext })\n return result\n }\n\n /**\n * Injects trace context into a http request headers.\n * @param request HTTP request.\n * @param type type of the headers that will be created - 'w3c' or 'xb3'.\n */\n\n injectContextToHttpRequest(request: { [key: string]: any }, type: HttpRequestOptions = HttpRequestOptions.w3c): { [key: string]: any } {\n let result = _.cloneDeep(request)\n result.headers = setHttpHeader(this.spanContext, type, result.headers)\n return result\n }\n\n /**\n * Sets tags to the current span. If child span is created, the tags are passed on.\n * @param tags key value pairs of tags. Tags can be changed on different child spans\n */\n setTags(tags: TraceTags): this {\n let newContext: TypeSpanContext = new EventTraceMetadata(this.getContext())\n for (let key in tags) {\n newContext.tags![key] = tags[key]\n }\n this.spanContext = Object.freeze(new EventTraceMetadata(newContext))\n return this\n }\n\n /**\n * Finishes the current span and its trace and sends the data to the tracing framework.\n * @param message optional parameter for a message to be passed to the tracing framework.\n * @param finishTimestamp optional parameter for the finish time. If omitted, current time is used.\n */\n async finish(message?: TypeOfMessage, state?: EventStateMetadata, finishTimestamp?: string | Date): Promise {\n if (this.spanContext.finishTimestamp) return Promise.reject(new Error('span already finished'))\n let spanContext = this._finishSpan(finishTimestamp).getContext()\n await this.trace(message, spanContext, state)\n return Promise.resolve(this)\n }\n\n /**\n * Finishes the trace by adding finish timestamp to the current span.\n * @param finishTimestamp optional parameter for the finish time. If omitted, current time is used.\n */\n private _finishSpan(finishTimestamp?: string | Date): this {\n let newContext: TypeSpanContext = Object.assign({}, this.spanContext)\n if (finishTimestamp instanceof Date) {\n newContext.finishTimestamp = finishTimestamp.toISOString() // ISO 8601\n } else if (!finishTimestamp) {\n newContext.finishTimestamp = (new Date()).toISOString() // ISO 8601\n } else {\n newContext.finishTimestamp = finishTimestamp\n }\n this.spanContext = Object.freeze(new EventTraceMetadata(newContext))\n return this\n }\n\n\n /**\n * Sends trace message to the tracing framework\n * @param message \n * @param spanContext optional parameter. Can be used to trace previous span. If not set, the current span context is used.\n * @param action optional parameter for action. Defaults to 'span'\n * @param state optional parameter for state. Defaults to 'success'\n */\n private async trace(message?: TypeOfMessage, spanContext: TypeSpanContext = this.spanContext, state?: EventStateMetadata, action?: TraceEventAction ): Promise {\n if (!message) message = new EventMessage({\n type: 'application/json',\n content: spanContext\n })\n try {\n await this.recordMessage(message, TraceEventTypeAction.getType(), action, state)\n this.isFinished = this.spanContext.finishTimestamp ? true : false\n return this\n } catch (e) {\n throw new Error(`Error when logging trace. ${JSON.stringify(e, null, 2)}`)\n }\n }\n\n /**\n * Sends audit type message to the event logging framework. \n * @param message message to be recorded as audit event\n * @param action optional parameter for action. Defaults to 'default'\n * @param state optional parameter for state. Defaults to 'success'\n */\n async audit(message: TypeOfMessage, action?: AuditEventAction, state?: EventStateMetadata): Promise {\n let result = await this.recordMessage(message, AuditEventTypeAction.getType(), action, state)\n return result\n }\n\n /**\n * Logs INFO type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async info(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.info)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs DEBUG type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async debug(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.debug)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs VERBOSE type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async verbose(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.verbose)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs PERFORMANCE type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async performance(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.performance)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs WARNING type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async warning(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.warning)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs ERROR type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async error(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.error)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Sends Event message to recorders\n * @param message the Event message that needs to be recorded\n * @param type type of Event\n * @param action optional parameter for action. The default is based on type defaults\n * @param state optional parameter for state. Defaults to 'success'\n */\n\n private async recordMessage(message: TypeOfMessage, type: TypeEventTypeAction['type'], action?: TypeEventTypeAction['action'], state?: EventStateMetadata) {\n if (this.isFinished) throw new Error('span finished. no further actions allowed')\n let newEnvelope = this.createEventMessage(message, type, action, state)\n let logResult\n let key = `${type}Recorder`\n if (this.recorders[key]) logResult = await this.recorders[key]!.record(newEnvelope, Config.EVENT_LOGGER_SIDECAR_WITH_LOGGER)\n else logResult = await this.recorders.defaultRecorder.record(newEnvelope, Config.EVENT_LOGGER_SIDECAR_WITH_LOGGER)\n if (LogResponseStatus.accepted == logResult.status) {\n return logResult\n } else {\n throw new Error(`Error when recording ${type}-${action} event. status: ${logResult.status}`)\n }\n }\n\n /**\n * Helper function to create event message, based on message and event types, action and state.\n */\n private createEventMessage = (\n message: TypeOfMessage,\n type: TypeEventTypeAction['type'],\n _action?: TypeEventTypeAction['action'],\n state: EventStateMetadata = EventStateMetadata.success()): EventMessage => {\n let defaults = getDefaults(type)\n let action = _action ? _action : defaults.action\n let messageToLog\n if (typeof message === 'string') {\n messageToLog = new EventMessage({\n content: { payload: message },\n type: 'application/json'\n })\n } else { // if ((typeof message === 'object') && (!(message.hasOwnProperty('content')) || !(message.hasOwnProperty('type')))) {\n messageToLog = new EventMessage({\n content: message,\n type: 'application/json'\n })\n // } else {\n // messageToLog = new EventMessage(message)\n }\n return Object.assign(messageToLog, {\n metadata: {\n event: defaults.eventMetadataCreator({\n action,\n state\n }),\n trace: this.spanContext\n }\n })\n }\n}\n\ninterface IDefaultActions {\n action: TypeEventAction['action'],\n eventMetadataCreator: (input: TypeEventMetadata) => TypeEventMetadata\n}\n\nconst getDefaults = (type: EventType): IDefaultActions => {\n switch (type) {\n case EventType.audit: {\n return {\n action: AuditEventAction.default,\n eventMetadataCreator: EventMetadata.audit\n }\n }\n case EventType.trace: {\n return {\n action: TraceEventAction.span,\n eventMetadataCreator: EventMetadata.trace\n }\n }\n case EventType.log: {\n return {\n action: LogEventAction.info,\n eventMetadataCreator: EventMetadata.log\n }\n }\n }\n return {\n action: NullEventAction.undefined,\n eventMetadataCreator: EventMetadata.log\n }\n}\n\nconst setHttpHeader = (context: TypeSpanContext, type: HttpRequestOptions, headers: { [key: string]: any }): { [key: string]: any } => {\n\n const createW3CTracestate = (tracestate: string, opaqueValue: string): string => {\n let tracestateArray = (tracestate.split(','))\n let resultMap = new Map()\n let resultArray = []\n let result\n for (let states of tracestateArray) {\n let [vendor] = states.split('=')\n resultMap.set(vendor, states)\n }\n\n if (resultMap.has('mojaloop')) {\n resultMap.delete('mojaloop')\n for (let entry of resultMap.values()) {\n resultArray.push(entry)\n }\n resultArray.unshift(`mojaloop=${opaqueValue}`)\n result = resultArray.join(',')\n } else {\n tracestateArray.unshift(`mojaloop=${opaqueValue}`)\n result = tracestateArray.join(',')\n }\n return result\n }\n\n const { traceId, parentSpanId, spanId, flags, sampled } = context\n\n switch (type) {\n\n case HttpRequestOptions.xb3: {\n let XB3headers = {\n 'X-B3-TraceId': traceId,\n 'X-B3-SpanId': spanId,\n 'X-B3-Sampled': sampled,\n 'X-B3-Flags': flags,\n 'X-B3-Version': '0'\n }\n let result = parentSpanId ? Object.assign({ 'X-B3-ParentSpanId': parentSpanId }, XB3headers) : XB3headers\n return Object.assign(headers, result)\n }\n\n case HttpRequestOptions.w3c:\n default: {\n const version = Buffer.alloc(1).fill(0)\n const flagsForBuff = (flags && sampled) ? (flags | sampled) : flags ? flags : sampled ? sampled : 0x00\n const flagsBuffer = Buffer.alloc(1).fill(flagsForBuff)\n const traceIdBuff = Buffer.from(traceId, 'hex')\n const spanIdBuff = Buffer.from(spanId, 'hex')\n const parentSpanIdBuff = parentSpanId && Buffer.from(parentSpanId, 'hex')\n let result = {}\n let W3CHeaders = parentSpanIdBuff\n ? new TraceParent(Buffer.concat([version, traceIdBuff, spanIdBuff, flagsBuffer, parentSpanIdBuff]))\n : new TraceParent(Buffer.concat([version, traceIdBuff, spanIdBuff, flagsBuffer]))\n if (headers.tracestate) {\n return Object.assign({ traceparent: W3CHeaders.toString() }, { tracestate: createW3CTracestate(headers.tracestate, traceId), headers })\n }\n return Object.assign({ traceparent: W3CHeaders.toString() }, headers)\n }\n }\n}\n\nexport {\n Span,\n ContextOptions,\n Recorders,\n setHttpHeader\n}"]} \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ACD,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,UAAU,CAAC,QAAQ,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;SACtE;KACF;AACH,CAAC,CAAA;AAMC,sCAAa","sourcesContent":["import {\n NullEventAction,\n AuditEventAction,\n LogEventAction,\n TraceEventAction,\n LogResponseStatus,\n EventType,\n TraceTags,\n TypeEventMessage,\n TypeEventMetadata,\n TypeSpanContext,\n EventTraceMetadata,\n EventMessage,\n TypeEventTypeAction,\n EventStateMetadata,\n EventMetadata,\n TraceEventTypeAction,\n AuditEventTypeAction,\n LogEventTypeAction,\n TypeEventAction,\n HttpRequestOptions\n} from './model/EventMessage'\n\nimport {\n IEventRecorder, DefaultLoggerRecorder, DefaultSidecarRecorder\n} from './Recorder'\n\nimport { EventLoggingServiceClient } from './transport/EventLoggingServiceClient';\n\nimport serializeError from 'serialize-error';\n\n// import ErrorCallsites from 'error-callsites'\n// const ErrorCallsites = require('error-callsites')\n\nconst _ = require('lodash');\n\nconst TraceParent = require('traceparent')\n\nconst Config = require('./lib/config')\n\ntype RecorderKeys = 'defaultRecorder' | 'logRecorder' | 'auditRecorder' | 'traceRecorder'\n\nconst defaultRecorder = Config.EVENT_LOGGER_SIDECAR_DISABLED\n ? new DefaultLoggerRecorder()\n : new DefaultSidecarRecorder(new EventLoggingServiceClient(Config.EVENT_LOGGER_SERVER_HOST, Config.EVENT_LOGGER_SERVER_PORT))\n\n\ntype PartialWithDefaultRecorder = {\n [P in keyof T]?: T[P]\n} & {\n defaultRecorder: IEventRecorder\n}\n\n/**\n * Defines Recorders type. \n * @param defaultRecorder a recorder that will be used by default by the span if the others are not present.\n * @param logRecorder a recorder that will be used to log any logging level events\n * @param auditRecorder a recorder that will be used to log audit events\n * @param traceRecorder a recorder that will be used to log trace events\n */\n\ntype Recorders = PartialWithDefaultRecorder<{\n defaultRecorder: IEventRecorder\n logRecorder?: IEventRecorder,\n auditRecorder?: IEventRecorder,\n traceRecorder?: IEventRecorder\n}>\n\n/**\n * Defines messages allowed to be sent to the Event framework\n */\ntype TypeOfMessage = { [key: string]: NonNullable } | string\n\n/**\n * defines options to the injectContextToMessage and extractContextFromMessage\n * @param type the carrier type\n * @param path in the carrier where the trace context should be injected or extracted from\n */\ntype ContextOptions = {\n type?: string,\n path?: string\n}\n\n/**\n * Defines Span interface operations\n * @param {TypeSpanContext} spanContext the context of the span\n * @param {Recorders} recorders object that holds span recorders which are going to be used for different operations. defaultRecorder is obligatory\n * @param info Defines a method to log at info level a message from the span perspective\n * @param debug Defines a method to log at debug level a message from the span perspective \n * @param verbose Defines a method to log at verbose level a message from the span perspective \n * @param performance Defines a method to log at performance level a message from the span perspective \n * @param warning Defines a method to log at warning level a message from the span perspective\n * @param error Defines a method to log at error level a message from the span perspective\n * @param audit Defines a method to send audit event to the auditing environment\n * @param defaultTagsSetter Defines a method to set default tags. Currently has null implementation\n * @param getContext Defines method to get the span context as JS object\n * @param finish Defines a method to finish the current span and send tracing information to the tracing environment\n * @param getChild Defines a method to get child span\n * @param setTags Defines a method to set tags to the span\n * @param injectContextToMessage Defnies a method to inject current span context into message carrier\n * @param injectContextToHttpRequest Defnies a method to inject current span context into http request\n */\n\ninterface ISpan {\n spanContext: TypeSpanContext\n recorders: Recorders\n info: (message: TypeOfMessage) => Promise\n debug: (message: TypeOfMessage) => Promise\n verbose: (message: TypeOfMessage) => Promise\n performance: (message: TypeOfMessage) => Promise\n warning: (message: TypeOfMessage) => Promise\n error: (message: TypeOfMessage) => Promise\n audit: (message: TypeOfMessage) => Promise\n // trace: (message: { [key: string]: any}) => Promise // TODO need to findout is there an usecase for that \n defaultTagsSetter: (message?: TypeOfMessage) => Span\n getContext: () => TypeSpanContext\n finish: (message?: TypeOfMessage, state?: EventStateMetadata, finishTimestamp?: TypeSpanContext[\"finishTimestamp\"]) => Promise\n getChild: (service: string, recorders?: Recorders) => ISpan\n setTags: (tags: TraceTags) => Span\n injectContextToMessage: (message: { [key: string]: any }, injectOptions: ContextOptions) => { [key: string]: any },\n injectContextToHttpRequest: (request: { [key: string]: any }, type?: HttpRequestOptions) => { [key: string]: any }\n\n}\n\nclass Span implements Partial {\n spanContext: TypeSpanContext\n recorders: Recorders\n isFinished: boolean = false\n\n /**\n * Creates new span. Normally this is not used directly, but by a Tracer.createSpan method\n * @param spanContext context of the new span. Service is obligatory. Depending on the rest provided values, the new span will be created as a parent or child span\n * @param {Recorders} recorders different recorders to be used for different logging methods \n * @param defaultTagsSetter the tags setter method can be passed here\n */\n constructor(\n spanContext: EventTraceMetadata,\n recorders?: Recorders,\n defaultTagsSetter?: (message: TypeOfMessage) => any) {\n this.spanContext = Object.freeze(spanContext)\n this.defaultTagsSetter = defaultTagsSetter ? defaultTagsSetter : this.defaultTagsSetter\n this.recorders = recorders ? recorders : { defaultRecorder }\n this.defaultTagsSetter()\n return this\n }\n\n /**\n * A method to set tags by default. Not implemented yet\n * @param message the message which tags will be extracted from\n */\n\n defaultTagsSetter(message?: TypeOfMessage): Span {\n return this\n }\n\n /**\n * Gets trace context from the current span\n */\n getContext(): TypeSpanContext {\n return Object.assign({}, this.spanContext, { tags: JSON.parse(JSON.stringify(this.spanContext.tags)) })\n }\n\n /**\n * Creates and returns new child span of the current span and changes the span service name\n * @param service the name of the service of the new child span\n * @param recorders the recorders which are be set to the child span. If omitted, the recorders of the parent span are used\n */\n getChild(service: string, recorders: Recorders = this.recorders): Span {\n try {\n if (this.isFinished) throw new Error('Finished trace cannot have a child span')\n let inputTraceContext: TypeSpanContext = this.getContext()\n return new Span(new EventTraceMetadata(Object.assign({},\n inputTraceContext, {\n service,\n spanId: undefined,\n startTimestamp: undefined,\n parentSpanId: inputTraceContext.spanId\n })), recorders, this.defaultTagsSetter)\n } catch (e) {\n throw (e)\n }\n }\n\n /**\n * Injects trace context into a carrier with optional path.\n * @param carrier any kind of message or other object with keys of type String.\n * @param injectOptions type and path of the carrier. Type is not implemented yet. Path is the path to the trace context.\n */\n injectContextToMessage(carrier: { [key: string]: any }, injectOptions: ContextOptions = {}): { [key: string]: any } {\n let result = _.cloneDeep(carrier)\n let { path } = injectOptions // type not implemented yet\n if (carrier instanceof EventMessage || (('metadata' in carrier))) path = 'metadata'\n else if (carrier instanceof EventTraceMetadata) return Promise.resolve(this.spanContext)\n if (!path) Object.assign(result, { trace: this.spanContext })\n else _.merge(_.get(result, path), { trace: this.spanContext })\n return result\n }\n\n /**\n * Injects trace context into a http request headers.\n * @param request HTTP request.\n * @param type type of the headers that will be created - 'w3c' or 'xb3'.\n */\n\n injectContextToHttpRequest(request: { [key: string]: any }, type: HttpRequestOptions = HttpRequestOptions.w3c): { [key: string]: any } {\n let result = _.cloneDeep(request)\n result.headers = setHttpHeader(this.spanContext, type, result.headers)\n return result\n }\n\n /**\n * Sets tags to the current span. If child span is created, the tags are passed on.\n * @param tags key value pairs of tags. Tags can be changed on different child spans\n */\n setTags(tags: TraceTags): this {\n let newContext: TypeSpanContext = new EventTraceMetadata(this.getContext())\n for (let key in tags) {\n newContext.tags![key] = tags[key]\n }\n this.spanContext = Object.freeze(new EventTraceMetadata(newContext))\n return this\n }\n\n /**\n * Finishes the current span and its trace and sends the data to the tracing framework.\n * @param message optional parameter for a message to be passed to the tracing framework.\n * @param finishTimestamp optional parameter for the finish time. If omitted, current time is used.\n */\n async finish(message?: TypeOfMessage, state?: EventStateMetadata, finishTimestamp?: string | Date): Promise {\n if (this.spanContext.finishTimestamp) return Promise.reject(new Error('span already finished'))\n let spanContext = this._finishSpan(finishTimestamp).getContext()\n await this.trace(message, spanContext, state)\n return Promise.resolve(this)\n }\n\n /**\n * Finishes the trace by adding finish timestamp to the current span.\n * @param finishTimestamp optional parameter for the finish time. If omitted, current time is used.\n */\n private _finishSpan(finishTimestamp?: string | Date): this {\n let newContext: TypeSpanContext = Object.assign({}, this.spanContext)\n if (finishTimestamp instanceof Date) {\n newContext.finishTimestamp = finishTimestamp.toISOString() // ISO 8601\n } else if (!finishTimestamp) {\n newContext.finishTimestamp = (new Date()).toISOString() // ISO 8601\n } else {\n newContext.finishTimestamp = finishTimestamp\n }\n this.spanContext = Object.freeze(new EventTraceMetadata(newContext))\n return this\n }\n\n\n /**\n * Sends trace message to the tracing framework\n * @param message \n * @param spanContext optional parameter. Can be used to trace previous span. If not set, the current span context is used.\n * @param action optional parameter for action. Defaults to 'span'\n * @param state optional parameter for state. Defaults to 'success'\n */\n private async trace(message?: TypeOfMessage, spanContext: TypeSpanContext = this.spanContext, state?: EventStateMetadata, action?: TraceEventAction): Promise {\n if (!message) message = new EventMessage({\n type: 'application/json',\n content: spanContext\n })\n try {\n await this.recordMessage(message, TraceEventTypeAction.getType(), action, state)\n this.isFinished = this.spanContext.finishTimestamp ? true : false\n return this\n } catch (e) {\n throw new Error(`Error when logging trace. ${JSON.stringify(e, null, 2)}`)\n }\n }\n\n /**\n * Sends audit type message to the event logging framework. \n * @param message message to be recorded as audit event\n * @param action optional parameter for action. Defaults to 'default'\n * @param state optional parameter for state. Defaults to 'success'\n */\n async audit(message: TypeOfMessage, action?: AuditEventAction, state?: EventStateMetadata): Promise {\n let result = await this.recordMessage(message, AuditEventTypeAction.getType(), action, state)\n return result\n }\n\n /**\n * Logs INFO type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async info(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.info)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs DEBUG type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async debug(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.debug)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs VERBOSE type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async verbose(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.verbose)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs PERFORMANCE type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async performance(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.performance)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs WARNING type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async warning(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.warning)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Logs ERROR type message.\n * @param message if message is a string, the message is added to a message property of context of an event message.\n * If message is not following the event framework message format, the message is added as it is to the context of an event message.\n * If message follows the event framework message format, only the metadata is updated and if message lacks an UUID it is created. \n * @param state optional parameter for state. Defaults to 'success'\n */\n async error(message: TypeOfMessage, state?: EventStateMetadata): Promise {\n let { action, type } = new LogEventTypeAction(LogEventAction.error)\n await this.recordMessage(message, type, action, state)\n }\n\n /**\n * Sends Event message to recorders\n * @param message the Event message that needs to be recorded\n * @param type type of Event\n * @param action optional parameter for action. The default is based on type defaults\n * @param state optional parameter for state. Defaults to 'success'\n */\n\n private async recordMessage(message: TypeOfMessage, type: TypeEventTypeAction['type'], action?: TypeEventTypeAction['action'], state?: EventStateMetadata) {\n if (this.isFinished) throw new Error('span finished. no further actions allowed')\n let newEnvelope = this.createEventMessage(message, type, action, state)\n let logResult\n let key = `${type}Recorder`\n if (this.recorders[key]) logResult = await this.recorders[key]!.record(newEnvelope, Config.EVENT_LOGGER_SIDECAR_WITH_LOGGER)\n else logResult = await this.recorders.defaultRecorder.record(newEnvelope, Config.EVENT_LOGGER_SIDECAR_WITH_LOGGER)\n if (LogResponseStatus.accepted == logResult.status) {\n return logResult\n } else {\n throw new Error(`Error when recording ${type}-${action} event. status: ${logResult.status}`)\n }\n }\n\n /**\n * Helper function to create event message, based on message and event types, action and state.\n */\n private createEventMessage = (\n message: TypeOfMessage,\n type: TypeEventTypeAction['type'],\n _action?: TypeEventTypeAction['action'],\n state: EventStateMetadata = EventStateMetadata.success()): EventMessage => {\n let defaults = getDefaults(type)\n let action = _action ? _action : defaults.action\n let messageToLog\n if (message instanceof Error) {\n // const callsites = ErrorCallsites(message)\n // message.__error_callsites = callsites\n messageToLog = new EventMessage({\n content: { error: serializeError(message) },\n type: 'application/json'\n })\n } else if (typeof message === 'string') {\n messageToLog = new EventMessage({\n content: { payload: message },\n type: 'application/json'\n })\n } else { // if ((typeof message === 'object') && (!(message.hasOwnProperty('content')) || !(message.hasOwnProperty('type')))) {\n messageToLog = new EventMessage({\n content: message,\n type: 'application/json'\n })\n // } else {\n // messageToLog = new EventMessage(message)\n }\n return Object.assign(messageToLog, {\n metadata: {\n event: defaults.eventMetadataCreator({\n action,\n state\n }),\n trace: this.spanContext\n }\n })\n }\n}\n\ninterface IDefaultActions {\n action: TypeEventAction['action'],\n eventMetadataCreator: (input: TypeEventMetadata) => TypeEventMetadata\n}\n\nconst getDefaults = (type: EventType): IDefaultActions => {\n switch (type) {\n case EventType.audit: {\n return {\n action: AuditEventAction.default,\n eventMetadataCreator: EventMetadata.audit\n }\n }\n case EventType.trace: {\n return {\n action: TraceEventAction.span,\n eventMetadataCreator: EventMetadata.trace\n }\n }\n case EventType.log: {\n return {\n action: LogEventAction.info,\n eventMetadataCreator: EventMetadata.log\n }\n }\n }\n return {\n action: NullEventAction.undefined,\n eventMetadataCreator: EventMetadata.log\n }\n}\n\nconst setHttpHeader = (context: TypeSpanContext, type: HttpRequestOptions, headers: { [key: string]: any }): { [key: string]: any } => {\n\n const createW3CTracestate = (tracestate: string, opaqueValue: string): string => {\n let tracestateArray = (tracestate.split(','))\n let resultMap = new Map()\n let resultArray = []\n let result\n for (let states of tracestateArray) {\n let [vendor] = states.split('=')\n resultMap.set(vendor, states)\n }\n\n if (resultMap.has('mojaloop')) {\n resultMap.delete('mojaloop')\n for (let entry of resultMap.values()) {\n resultArray.push(entry)\n }\n resultArray.unshift(`mojaloop=${opaqueValue}`)\n result = resultArray.join(',')\n } else {\n tracestateArray.unshift(`mojaloop=${opaqueValue}`)\n result = tracestateArray.join(',')\n }\n return result\n }\n\n const { traceId, parentSpanId, spanId, flags, sampled } = context\n\n switch (type) {\n\n case HttpRequestOptions.xb3: {\n let XB3headers = {\n 'X-B3-TraceId': traceId,\n 'X-B3-SpanId': spanId,\n 'X-B3-Sampled': sampled,\n 'X-B3-Flags': flags,\n 'X-B3-Version': '0'\n }\n let result = parentSpanId ? Object.assign({ 'X-B3-ParentSpanId': parentSpanId }, XB3headers) : XB3headers\n return Object.assign(headers, result)\n }\n\n case HttpRequestOptions.w3c:\n default: {\n const version = Buffer.alloc(1).fill(0)\n const flagsForBuff = (flags && sampled) ? (flags | sampled) : flags ? flags : sampled ? sampled : 0x00\n const flagsBuffer = Buffer.alloc(1).fill(flagsForBuff)\n const traceIdBuff = Buffer.from(traceId, 'hex')\n const spanIdBuff = Buffer.from(spanId, 'hex')\n const parentSpanIdBuff = parentSpanId && Buffer.from(parentSpanId, 'hex')\n let result = {}\n let W3CHeaders = parentSpanIdBuff\n ? new TraceParent(Buffer.concat([version, traceIdBuff, spanIdBuff, flagsBuffer, parentSpanIdBuff]))\n : new TraceParent(Buffer.concat([version, traceIdBuff, spanIdBuff, flagsBuffer]))\n if (headers.tracestate) {\n return Object.assign({ traceparent: W3CHeaders.toString() }, { tracestate: createW3CTracestate(headers.tracestate, traceId), headers })\n }\n return Object.assign({ traceparent: W3CHeaders.toString() }, headers)\n }\n }\n}\n\nexport {\n Span,\n ContextOptions,\n Recorders,\n setHttpHeader\n}"]} \ No newline at end of file diff --git a/lib/examples/js_app.js b/lib/examples/js_app.js index 2f11fe4..ecd692e 100644 --- a/lib/examples/js_app.js +++ b/lib/examples/js_app.js @@ -37,7 +37,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge }); }; const { Tracer } = require('../../lib/index'); -const { AuditEventAction } = require('../../lib/index'); +// const { AuditEventAction } = require('../../lib/index') +// const { DefaultLoggerRecorder } = require('../../lib/index') +const EventSDK = require('../../lib/index'); +const Logger = require('@mojaloop/central-services-logger'); function sleep(ms) { return new Promise(resolve => { setTimeout(resolve, ms); @@ -70,44 +73,44 @@ const request = { const main = () => __awaiter(this, void 0, void 0, function* () { // Creates a new parent span for given service // this sets new traceId and new spanId. - let parentSpan = Tracer.createSpan('parent service'); + const parentSpan = Tracer.createSpan('parent service'); + const IIChildSpan = parentSpan.getChild('child fin service'); // Logs message with logging level info from the parent span - // await parentSpan.info(event) - // await parentSpan.info('this is event message') - // await parentSpan.warning('event') - // await parentSpan.error('event') - // await parentSpan.debug('message') - // await parentSpan.verbose('message') - // await parentSpan.performance('message') - // await parentSpan.audit('message', AuditEventAction.start) + const newEvent = new EventSDK.EventMessage(event); + yield parentSpan.info(newEvent); + yield parentSpan.warning('event'); + yield parentSpan.debug(event); + yield parentSpan.verbose('message'); + yield parentSpan.performance('message'); + yield parentSpan.audit('message'); // Logs message with logging level debug from the parent span - // await parentSpan.debug('this is debug log') + yield parentSpan.debug('this is debug log'); // Creates child span from the parent span with new service name. // The traceId remains the same. The spanId is new and the parentSpanId is the spanId of the parent. - let IIChildSpan = parentSpan.getChild('child fin service'); // Creates audit event message - yield IIChildSpan.audit({ content: event }, AuditEventAction.finish); - // Set tags to the span + // await IIChildSpan.audit({ content: event }, AuditEventAction.finish) + // // Set tags to the span IIChildSpan.setTags({ one: 'two' }); - // Creates error log event from the IIChildSpan + // // Creates error log event from the IIChildSpan yield IIChildSpan.error({ content: { message: 'error appeared' } }); - // Creates audit event message + // // Creates audit event message yield parentSpan.audit(event); - // Finish the span. This also sends the trace context to the tracing platform. All further operations are forbidden after the span is finished. + // // Finish the span. This also sends the trace context to the tracing platform. All further operations are forbidden after the span is finished. yield parentSpan.finish(event); - // Injects trace context to a message carrier. When the trace is carried across few services, the trace context can be injects in the carrier that transports the data. - let messageWithContext = yield IIChildSpan.injectContextToMessage(event); + // // Injects trace context to a message carrier. When the trace is carried across few services, the trace context can be injects in the carrier that transports the data. + const messageWithContext = yield IIChildSpan.injectContextToMessage(event); // await sleep(2000) - let requestHeadersWithContext = yield IIChildSpan.injectContextToHttpRequest(request); - console.log(requestHeadersWithContext); + const requestHeadersWithContext = yield IIChildSpan.injectContextToHttpRequest(request); + Logger.info(requestHeadersWithContext); // Extracts trace context from message carrier. When the message is received from different service, the trace context is extracted by that method. - let contextFromMessage = Tracer.extractContextFromMessage(messageWithContext); - let context = Tracer.extractContextFromHttpRequest(requestHeadersWithContext); - console.log(context); + const contextFromMessage = Tracer.extractContextFromMessage(messageWithContext); + const context = Tracer.extractContextFromHttpRequest(requestHeadersWithContext); + Logger.info(context); // Creates child span from extracted trace context. - let IIIChild = Tracer.createChildSpanFromContext('child III service', contextFromMessage); //, { defaultRecorder: new DefaultLoggerRecorder() }) + const IIIChild = Tracer.createChildSpanFromContext('child III service', contextFromMessage); //, { defaultRecorder: new DefaultLoggerRecorder() }) yield sleep(500); - yield IIChildSpan.finish(); + const state = new EventSDK.EventStateMetadata(EventSDK.EventStatusType.failed, '2001', 'its an errrrrrorrrr'); + yield IIChildSpan.finish(('error message'), state); yield sleep(500); yield IIIChild.finish(); yield sleep(500); diff --git a/lib/examples/js_app.js.map b/lib/examples/js_app.js.map index a0c8c63..5d606b4 100644 --- a/lib/examples/js_app.js.map +++ b/lib/examples/js_app.js.map @@ -1 +1 @@ -{"version":3,"file":"js_app.js","sourceRoot":"","sources":["../../src/examples/js_app.js"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;QAwBQ;AACR;;;GAGG;;;;;;;;;AAEH,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAC7C,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAEvD,SAAS,KAAK,CAAE,EAAE;IAChB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,oBAAoB;IAC1B,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,sCAAsC;IAC1C,OAAO,EAAE;QACP,OAAO,EAAE;YACP,cAAc,EAAE,6DAA6D;YAC7E,IAAI,EAAE,0BAA0B;YAChC,eAAe,EAAE,oBAAoB;YACrC,oBAAoB,EAAE,UAAU;YAChC,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,iRAAiR;KAC3R;IACD,IAAI,EAAE,kBAAkB;CACzB,CAAA;AAED,MAAM,OAAO,GAAG;IACd,OAAO,EAAE;QACP,IAAI,EAAE,gBAAgB;QACtB,YAAY,EAAE,aAAa;QAC3B,MAAM,EAAE,KAAK;KACd;CACF,CAAA;AAED,MAAM,IAAI,GAAG,GAAS,EAAE;IACtB,8CAA8C;IAC9C,wCAAwC;IACxC,IAAI,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAA;IAEpD,4DAA4D;IAC5D,+BAA+B;IAC/B,iDAAiD;IACjD,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,CAAC,qDAAqD;IAC/I,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IAChB,MAAM,WAAW,CAAC,MAAM,EAAE,CAAA;IAC1B,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IAChB,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAA;IACvB,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IAChB,MAAM,KAAK,CAAC,IAAI,CAAC,CAAA;AACnB,CAAC,CAAA,CAAA;AAED,IAAI,EAAE,CAAA","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n - Valentin Genev \n\n --------------\n ******/\n/**\n * Example showing how to use Tracer from JavaScript\n *\n */\n\nconst { Tracer } = require('../../lib/index')\nconst { AuditEventAction } = require('../../lib/index')\n\nfunction sleep (ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms)\n })\n}\n\nconst event = {\n from: 'noresponsepayeefsp',\n to: 'payerfsp',\n id: 'aa398930-f210-4dcd-8af0-7c769cea1660',\n content: {\n headers: {\n 'content-type': 'application/vnd.interoperability.transfers+json;version=1.0',\n date: '2019-05-28T16:34:41.000Z',\n 'fspiop-source': 'noresponsepayeefsp',\n 'fspiop-destination': 'payerfsp',\n priority: 100,\n blocking: false\n },\n payload: 'data:application/vnd.interoperability.transfers+json;version=1.0;base64,ewogICJmdWxmaWxtZW50IjogIlVObEo5OGhaVFlfZHN3MGNBcXc0aV9VTjN2NHV0dDdDWkZCNHlmTGJWRkEiLAogICJjb21wbGV0ZWRUaW1lc3RhbXAiOiAiMjAxOS0wNS0yOVQyMzoxODozMi44NTZaIiwKICAidHJhbnNmZXJTdGF0ZSI6ICJDT01NSVRURUQiCn0'\n },\n type: 'application/json'\n}\n\nconst request = {\n headers: {\n host: 'localhost:4000',\n 'user-agent': 'curl/7.59.0',\n accept: '*/*'\n }\n}\n\nconst main = async () => {\n // Creates a new parent span for given service\n // this sets new traceId and new spanId.\n let parentSpan = Tracer.createSpan('parent service')\n\n // Logs message with logging level info from the parent span\n // await parentSpan.info(event)\n // await parentSpan.info('this is event message')\n // await parentSpan.warning('event')\n // await parentSpan.error('event')\n // await parentSpan.debug('message')\n // await parentSpan.verbose('message')\n // await parentSpan.performance('message')\n // await parentSpan.audit('message', AuditEventAction.start)\n // Logs message with logging level debug from the parent span\n // await parentSpan.debug('this is debug log')\n\n // Creates child span from the parent span with new service name.\n // The traceId remains the same. The spanId is new and the parentSpanId is the spanId of the parent.\n let IIChildSpan = parentSpan.getChild('child fin service')\n\n // Creates audit event message\n await IIChildSpan.audit({ content: event }, AuditEventAction.finish)\n\n // Set tags to the span\n IIChildSpan.setTags({ one: 'two' })\n\n // Creates error log event from the IIChildSpan\n await IIChildSpan.error({ content: { message: 'error appeared' } })\n\n // Creates audit event message\n await parentSpan.audit(event)\n\n // Finish the span. This also sends the trace context to the tracing platform. All further operations are forbidden after the span is finished.\n await parentSpan.finish(event)\n\n // Injects trace context to a message carrier. When the trace is carried across few services, the trace context can be injects in the carrier that transports the data.\n let messageWithContext = await IIChildSpan.injectContextToMessage(event)\n // await sleep(2000)\n let requestHeadersWithContext = await IIChildSpan.injectContextToHttpRequest(request)\n console.log(requestHeadersWithContext)\n // Extracts trace context from message carrier. When the message is received from different service, the trace context is extracted by that method.\n let contextFromMessage = Tracer.extractContextFromMessage(messageWithContext)\n let context = Tracer.extractContextFromHttpRequest(requestHeadersWithContext)\n console.log(context)\n // Creates child span from extracted trace context.\n let IIIChild = Tracer.createChildSpanFromContext('child III service', contextFromMessage) //, { defaultRecorder: new DefaultLoggerRecorder() })\n await sleep(500)\n await IIChildSpan.finish()\n await sleep(500)\n await IIIChild.finish()\n await sleep(500)\n await sleep(1000)\n}\n\nmain()\n"]} \ No newline at end of file +{"version":3,"file":"js_app.js","sourceRoot":"","sources":["../../src/examples/js_app.js"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;QAwBQ;AACR;;;GAGG;;;;;;;;;AAEH,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAC7C,0DAA0D;AAC1D,+DAA+D;AAC/D,MAAM,QAAQ,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAA;AAE3C,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAA;AAE3D,SAAS,KAAK,CAAE,EAAE;IAChB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACzB,CAAC,CAAC,CAAA;AACJ,CAAC;AAED,MAAM,KAAK,GAAG;IACZ,IAAI,EAAE,oBAAoB;IAC1B,EAAE,EAAE,UAAU;IACd,EAAE,EAAE,sCAAsC;IAC1C,OAAO,EAAE;QACP,OAAO,EAAE;YACP,cAAc,EAAE,6DAA6D;YAC7E,IAAI,EAAE,0BAA0B;YAChC,eAAe,EAAE,oBAAoB;YACrC,oBAAoB,EAAE,UAAU;YAChC,QAAQ,EAAE,GAAG;YACb,QAAQ,EAAE,KAAK;SAChB;QACD,OAAO,EAAE,iRAAiR;KAC3R;IACD,IAAI,EAAE,kBAAkB;CACzB,CAAA;AAED,MAAM,OAAO,GAA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;IAC1K,MAAM,kBAAkB,GAAG,MAAM,WAAW,CAAC,sBAAsB,CAAC,KAAK,CAAC,CAAA;IAC1E,oBAAoB;IACpB,MAAM,yBAAyB,GAAG,MAAM,WAAW,CAAC,0BAA0B,CAAC,OAAO,CAAC,CAAA;IACvF,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA;IACtC,mJAAmJ;IACnJ,MAAM,kBAAkB,GAAG,MAAM,CAAC,yBAAyB,CAAC,kBAAkB,CAAC,CAAA;IAC/E,MAAM,OAAO,GAAG,MAAM,CAAC,6BAA6B,CAAC,yBAAyB,CAAC,CAAA;IAC/E,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IACpB,mDAAmD;IACnD,MAAM,QAAQ,GAAG,MAAM,CAAC,0BAA0B,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,CAAA,CAAC,qDAAqD;IACjJ,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IAChB,MAAM,KAAK,GAAG,IAAI,QAAQ,CAAC,kBAAkB,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,qBAAqB,CAAC,CAAA;IAC7G,MAAM,WAAW,CAAC,MAAM,CAAC,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,CAAA;IAClD,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IAChB,MAAM,QAAQ,CAAC,MAAM,EAAE,CAAA;IACvB,MAAM,KAAK,CAAC,GAAG,CAAC,CAAA;IAChB,MAAM,KAAK,CAAC,IAAI,CAAC,CAAA;AACnB,CAAC,CAAA,CAAA;AAED,IAAI,EAAE,CAAA","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n - Valentin Genev \n\n --------------\n ******/\n/**\n * Example showing how to use Tracer from JavaScript\n *\n */\n\nconst { Tracer } = require('../../lib/index')\n// const { AuditEventAction } = require('../../lib/index')\n// const { DefaultLoggerRecorder } = require('../../lib/index')\nconst EventSDK = require('../../lib/index')\n\nconst Logger = require('@mojaloop/central-services-logger')\n\nfunction sleep (ms) {\n return new Promise(resolve => {\n setTimeout(resolve, ms)\n })\n}\n\nconst event = {\n from: 'noresponsepayeefsp',\n to: 'payerfsp',\n id: 'aa398930-f210-4dcd-8af0-7c769cea1660',\n content: {\n headers: {\n 'content-type': 'application/vnd.interoperability.transfers+json;version=1.0',\n date: '2019-05-28T16:34:41.000Z',\n 'fspiop-source': 'noresponsepayeefsp',\n 'fspiop-destination': 'payerfsp',\n priority: 100,\n blocking: false\n },\n payload: 'data:application/vnd.interoperability.transfers+json;version=1.0;base64,ewogICJmdWxmaWxtZW50IjogIlVObEo5OGhaVFlfZHN3MGNBcXc0aV9VTjN2NHV0dDdDWkZCNHlmTGJWRkEiLAogICJjb21wbGV0ZWRUaW1lc3RhbXAiOiAiMjAxOS0wNS0yOVQyMzoxODozMi44NTZaIiwKICAidHJhbnNmZXJTdGF0ZSI6ICJDT01NSVRURUQiCn0'\n },\n type: 'application/json'\n}\n\nconst request = {\n headers: {\n host: 'localhost:4000',\n 'user-agent': 'curl/7.59.0',\n accept: '*/*'\n }\n}\n\nconst main = async () => {\n // Creates a new parent span for given service\n // this sets new traceId and new spanId.\n const parentSpan = Tracer.createSpan('parent service')\n const IIChildSpan = parentSpan.getChild('child fin service')\n\n // Logs message with logging level info from the parent span\n\n const newEvent = new EventSDK.EventMessage(event)\n await parentSpan.info(newEvent)\n await parentSpan.warning('event')\n await parentSpan.debug(event)\n await parentSpan.verbose('message')\n await parentSpan.performance('message')\n await parentSpan.audit('message')\n // Logs message with logging level debug from the parent span\n await parentSpan.debug('this is debug log')\n\n // Creates child span from the parent span with new service name.\n // The traceId remains the same. The spanId is new and the parentSpanId is the spanId of the parent.\n\n // Creates audit event message\n // await IIChildSpan.audit({ content: event }, AuditEventAction.finish)\n\n // // Set tags to the span\n IIChildSpan.setTags({ one: 'two' })\n\n // // Creates error log event from the IIChildSpan\n await IIChildSpan.error({ content: { message: 'error appeared' } })\n\n // // Creates audit event message\n await parentSpan.audit(event)\n\n // // Finish the span. This also sends the trace context to the tracing platform. All further operations are forbidden after the span is finished.\n await parentSpan.finish(event)\n\n // // Injects trace context to a message carrier. When the trace is carried across few services, the trace context can be injects in the carrier that transports the data.\n const messageWithContext = await IIChildSpan.injectContextToMessage(event)\n // await sleep(2000)\n const requestHeadersWithContext = await IIChildSpan.injectContextToHttpRequest(request)\n Logger.info(requestHeadersWithContext)\n // Extracts trace context from message carrier. When the message is received from different service, the trace context is extracted by that method.\n const contextFromMessage = Tracer.extractContextFromMessage(messageWithContext)\n const context = Tracer.extractContextFromHttpRequest(requestHeadersWithContext)\n Logger.info(context)\n // Creates child span from extracted trace context.\n const IIIChild = Tracer.createChildSpanFromContext('child III service', contextFromMessage) //, { defaultRecorder: new DefaultLoggerRecorder() })\n await sleep(500)\n const state = new EventSDK.EventStateMetadata(EventSDK.EventStatusType.failed, '2001', 'its an errrrrrorrrr')\n await IIChildSpan.finish(('error message'), state)\n await sleep(500)\n await IIIChild.finish()\n await sleep(500)\n await sleep(1000)\n}\n\nmain()\n"]} \ No newline at end of file diff --git a/lib/server/server.js b/lib/server/server.js index 71c5b6d..f506d55 100644 --- a/lib/server/server.js +++ b/lib/server/server.js @@ -26,9 +26,10 @@ Object.defineProperty(exports, "__esModule", { value: true }); const EventLoggingServiceServer_1 = require("../transport/EventLoggingServiceServer"); const Config = require('../lib/config'); +const Logger = require('@mojaloop/central-services-logger'); let server = new EventLoggingServiceServer_1.EventLoggingServiceServer(Config.EVENT_LOGGER_SERVER_HOST, Config.EVENT_LOGGER_SERVER_PORT); server.on(EventLoggingServiceServer_1.EVENT_RECEIVED, (eventMessage) => { - console.log('Received eventMessage: ', JSON.stringify(eventMessage, null, 2)); + Logger.debug(`Received eventMessage: ', ${JSON.stringify(eventMessage, null, 2)}`); }); server.start(); //# sourceMappingURL=server.js.map \ No newline at end of file diff --git a/lib/server/server.js.map b/lib/server/server.js.map index 1b7a228..ccce21a 100644 --- a/lib/server/server.js.map +++ b/lib/server/server.js.map @@ -1 +1 @@ -{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;QAuBQ;AACR,YAAY,CAAA;;AAGZ,sFAAmG;AACnG,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AAGvC,IAAI,MAAM,GAAG,IAAI,qDAAyB,CAAC,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB,CAAC,CAAA;AAC5G,MAAM,CAAC,EAAE,CAAC,0CAAc,EAAE,CAAC,YAA2B,EAAE,EAAE;IACxD,OAAO,CAAC,GAAG,CAAC,yBAAyB,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAA;AAC/E,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,KAAK,EAAE,CAAC","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\n'use strict'\n\nimport { EventMessage } from \"../model/EventMessage\";\nimport { EventLoggingServiceServer, EVENT_RECEIVED } from \"../transport/EventLoggingServiceServer\";\nconst Config = require('../lib/config')\n\n\nlet server = new EventLoggingServiceServer(Config.EVENT_LOGGER_SERVER_HOST, Config.EVENT_LOGGER_SERVER_PORT)\nserver.on(EVENT_RECEIVED, (eventMessage : EventMessage) => {\n console.log('Received eventMessage: ', JSON.stringify(eventMessage, null, 2))\n});\nserver.start();\n\n"]} \ No newline at end of file +{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/server/server.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;QAuBQ;AACR,YAAY,CAAA;;AAGZ,sFAAmG;AACnG,MAAM,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC,CAAA;AACvC,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAA;AAE3D,IAAI,MAAM,GAAG,IAAI,qDAAyB,CAAC,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,wBAAwB,CAAC,CAAA;AAC5G,MAAM,CAAC,EAAE,CAAC,0CAAc,EAAE,CAAC,YAA2B,EAAE,EAAE;IACxD,MAAM,CAAC,KAAK,CAAC,6BAA6B,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAA;AACpF,CAAC,CAAC,CAAC;AACH,MAAM,CAAC,KAAK,EAAE,CAAC","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\n'use strict'\n\nimport { EventMessage } from \"../model/EventMessage\";\nimport { EventLoggingServiceServer, EVENT_RECEIVED } from \"../transport/EventLoggingServiceServer\";\nconst Config = require('../lib/config')\nconst Logger = require('@mojaloop/central-services-logger')\n\nlet server = new EventLoggingServiceServer(Config.EVENT_LOGGER_SERVER_HOST, Config.EVENT_LOGGER_SERVER_PORT)\nserver.on(EVENT_RECEIVED, (eventMessage : EventMessage) => {\n Logger.debug(`Received eventMessage: ', ${JSON.stringify(eventMessage, null, 2)}`)\n});\nserver.start();\n"]} \ No newline at end of file diff --git a/lib/transport/EventLoggerServiceLoader.js b/lib/transport/EventLoggerServiceLoader.js index f8cd655..ba7a16c 100644 --- a/lib/transport/EventLoggerServiceLoader.js +++ b/lib/transport/EventLoggerServiceLoader.js @@ -32,7 +32,7 @@ function loadEventLoggerService() { let packageDefinition = protoLoader.loadSync(PROTO_PATH, { keepCase: true, longs: String, enums: String, - defaults: true, + defaults: false, oneofs: true }); let protoDescriptor = grpc.loadPackageDefinition(packageDefinition); diff --git a/lib/transport/EventLoggerServiceLoader.js.map b/lib/transport/EventLoggerServiceLoader.js.map index 7c998f2..581c50a 100644 --- a/lib/transport/EventLoggerServiceLoader.js.map +++ b/lib/transport/EventLoggerServiceLoader.js.map @@ -1 +1 @@ -{"version":3,"file":"EventLoggerServiceLoader.js","sourceRoot":"","sources":["../../src/transport/EventLoggerServiceLoader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;QAuBQ;;AAER,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAEjD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,iCAAiC,CAAC,CAAC;AAE1E,SAAS,sBAAsB;IAC7B,IAAI,iBAAiB,GAAG,WAAW,CAAC,QAAQ,CAC1C,UAAU,EACV,EAAE,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,IAAI;KACb,CAAC,CAAA;IACJ,IAAI,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,CAAA;IACnE,4DAA4D;IAC5D,IAAI,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAA;IAE3E,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAGC,wDAAsB","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\n\nconst path = require('path');\nconst grpc = require('grpc')\nconst protoLoader = require('@grpc/proto-loader')\n\nconst PROTO_PATH = path.join(__dirname,'../../protos/message_type.proto');\n\nfunction loadEventLoggerService() : any {\n let packageDefinition = protoLoader.loadSync(\n PROTO_PATH,\n { keepCase: true,\n longs: String,\n enums: String,\n defaults: true,\n oneofs: true\n })\n let protoDescriptor = grpc.loadPackageDefinition(packageDefinition)\n // The protoDescriptor object has the full package hierarchy\n let eventLoggerService = protoDescriptor.mojaloop.events.EventLoggerService\n\n return eventLoggerService;\n}\n\nexport {\n loadEventLoggerService\n}"]} \ No newline at end of file +{"version":3,"file":"EventLoggerServiceLoader.js","sourceRoot":"","sources":["../../src/transport/EventLoggerServiceLoader.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;QAuBQ;;AAER,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,WAAW,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAEjD,MAAM,UAAU,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAC,iCAAiC,CAAC,CAAC;AAE1E,SAAS,sBAAsB;IAC7B,IAAI,iBAAiB,GAAG,WAAW,CAAC,QAAQ,CAC1C,UAAU,EACV,EAAE,QAAQ,EAAE,IAAI;QACd,KAAK,EAAE,MAAM;QACb,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,KAAK;QACf,MAAM,EAAE,IAAI;KACb,CAAC,CAAA;IACJ,IAAI,eAAe,GAAG,IAAI,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,CAAA;IACnE,4DAA4D;IAC5D,IAAI,kBAAkB,GAAG,eAAe,CAAC,QAAQ,CAAC,MAAM,CAAC,kBAAkB,CAAA;IAE3E,OAAO,kBAAkB,CAAC;AAC5B,CAAC;AAGC,wDAAsB","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\n\nconst path = require('path');\nconst grpc = require('grpc')\nconst protoLoader = require('@grpc/proto-loader')\n\nconst PROTO_PATH = path.join(__dirname,'../../protos/message_type.proto');\n\nfunction loadEventLoggerService() : any {\n let packageDefinition = protoLoader.loadSync(\n PROTO_PATH,\n { keepCase: true,\n longs: String,\n enums: String,\n defaults: false,\n oneofs: true\n })\n let protoDescriptor = grpc.loadPackageDefinition(packageDefinition)\n // The protoDescriptor object has the full package hierarchy\n let eventLoggerService = protoDescriptor.mojaloop.events.EventLoggerService\n\n return eventLoggerService;\n}\n\nexport {\n loadEventLoggerService\n}"]} \ No newline at end of file diff --git a/lib/transport/EventLoggingServiceClient.js b/lib/transport/EventLoggingServiceClient.js index 81b4a52..7bad024 100644 --- a/lib/transport/EventLoggingServiceClient.js +++ b/lib/transport/EventLoggingServiceClient.js @@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge Object.defineProperty(exports, "__esModule", { value: true }); const JsonToStructMapper_1 = require("./JsonToStructMapper"); const EventLoggerServiceLoader_1 = require("./EventLoggerServiceLoader"); -const Logger = require('@mojaloop/central-services-shared').Logger; +const Logger = require('@mojaloop/central-services-logger'); const grpc = require('grpc'); class EventLoggingServiceClient { constructor(host, port) { @@ -26,9 +26,9 @@ class EventLoggingServiceClient { try { // wireEvent.content = convertJsontoStruct(event.content); wireEvent.content = JsonToStructMapper_1.toAny(event.content, event.type); - Logger.info(`EventLoggingServiceClient.log sending wireEvent: ${JSON.stringify(wireEvent, null, 2)}`); + Logger.debug(`EventLoggingServiceClient.log sending wireEvent: ${JSON.stringify(wireEvent, null, 2)}`); this.grpcClient.log(wireEvent, (error, response) => { - Logger.info(`EventLoggingServiceClient.log received response: ${JSON.stringify(response, null, 2)}`); + Logger.debug(`EventLoggingServiceClient.log received response: ${JSON.stringify(response, null, 2)}`); if (error) { reject(error); } diff --git a/lib/transport/EventLoggingServiceClient.js.map b/lib/transport/EventLoggingServiceClient.js.map index a7b6e9a..5e9b01c 100644 --- a/lib/transport/EventLoggingServiceClient.js.map +++ b/lib/transport/EventLoggingServiceClient.js.map @@ -1 +1 @@ -{"version":3,"file":"EventLoggingServiceClient.js","sourceRoot":"","sources":["../../src/transport/EventLoggingServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;AAyBA,6DAA6C;AAC7C,yEAAoE;AAEpE,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAC,MAAM,CAAA;AAClE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAE5B,MAAM,yBAAy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IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAA;QACzF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;IAC1B,CAAC;CA0BF;AAGC,8DAAyB","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\nimport { EventMessage, LogResponse } from \"../model/EventMessage\";\nimport { toAny } from \"./JsonToStructMapper\";\nimport { loadEventLoggerService } from \"./EventLoggerServiceLoader\";\n\nconst Logger = require('@mojaloop/central-services-shared').Logger\nconst grpc = require('grpc')\n\nclass EventLoggingServiceClient {\n\n grpcClient : any;\n\n constructor(host : string, port: number ) {\n\n let eventLoggerService = loadEventLoggerService();\n\n let client = new eventLoggerService(`${host}:${port}`, grpc.credentials.createInsecure())\n this.grpcClient = client\n }\n \n /**\n * Log an event\n */\n log = async ( event: EventMessage): Promise => {\n return new Promise((resolve, reject) => {\n let wireEvent : any = Object.assign({}, event);\n if ( !event.content ) {\n throw new Error('Invalid eventMessage: content is mandatory');\n }\n try {\n // wireEvent.content = convertJsontoStruct(event.content);\n wireEvent.content = toAny(event.content, event.type);\n Logger.info(`EventLoggingServiceClient.log sending wireEvent: ${JSON.stringify(wireEvent, null, 2)}`);\n this.grpcClient.log(wireEvent, (error: any, response: LogResponse) => {\n Logger.info(`EventLoggingServiceClient.log received response: ${JSON.stringify(response, null, 2)}`);\n if ( error ) { reject(error); }\n resolve(response);\n })\n } catch (e) {\n Logger.error(e)\n reject(e)\n }\n })\n }\n}\n\nexport {\n EventLoggingServiceClient\n}"]} \ No newline at end of file +{"version":3,"file":"EventLoggingServiceClient.js","sourceRoot":"","sources":["../../src/transport/EventLoggingServiceClient.ts"],"names":[],"mappings":";;;;;;;;;;AAyBA,6DAA6C;AAC7C,yEAAoE;AAEpE,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAA;AAC3D,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAE5B,MAAM,yBAAyB;IAI7B,YAAY,IAAa,EAAE,IAAY;QAQvC;;WAEG;QACH,QAAG,GAAG,CAAQ,KAAmB,EAAwB,EAAE;YACzD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;gBACrC,IAAI,SAAS,GAAS,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;gBAC/C,IAAK,CAAC,KAAK,CAAC,OAAO,EAAG;oBACpB,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;iBAC/D;gBACD,IAAI;oBACJ,0DAA0D;oBAC1D,SAAS,CAAC,OAAO,GAAG,0BAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;oBACrD,MAAM,CAAC,KAAK,CAAC,oDAAoD,IAAI,CAAC,SAAS,CAAC,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;oBACvG,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,EAAE,CAAC,KAAU,EAAE,QAAqB,EAAE,EAAE;wBACnE,MAAM,CAAC,KAAK,CAAC,oDAAoD,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;wBACtG,IAAK,KAAK,EAAG;4BAAE,MAAM,CAAC,KAAK,CAAC,CAAC;yBAAE;wBAC/B,OAAO,CAAC,QAAQ,CAAC,CAAC;oBACpB,CAAC,CAAC,CAAA;iBACH;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;oBACf,MAAM,CAAC,CAAC,CAAC,CAAA;iBACV;YACD,CAAC,CAAC,CAAA;QACJ,CAAC,CAAA,CAAA;QA7BC,IAAI,kBAAkB,GAAG,iDAAsB,EAAE,CAAC;QAElD,IAAI,MAAM,GAAG,IAAI,kBAAkB,CAAC,GAAG,IAAI,IAAI,IAAI,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,cAAc,EAAE,CAAC,CAAA;QACzF,IAAI,CAAC,UAAU,GAAG,MAAM,CAAA;IAC1B,CAAC;CA0BF;AAGC,8DAAyB","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\nimport { EventMessage, LogResponse } from \"../model/EventMessage\";\nimport { toAny } from \"./JsonToStructMapper\";\nimport { loadEventLoggerService } from \"./EventLoggerServiceLoader\";\n\nconst Logger = require('@mojaloop/central-services-logger')\nconst grpc = require('grpc')\n\nclass EventLoggingServiceClient {\n\n grpcClient : any;\n\n constructor(host : string, port: number ) {\n\n let eventLoggerService = loadEventLoggerService();\n\n let client = new eventLoggerService(`${host}:${port}`, grpc.credentials.createInsecure())\n this.grpcClient = client\n }\n \n /**\n * Log an event\n */\n log = async ( event: EventMessage): Promise => {\n return new Promise((resolve, reject) => {\n let wireEvent : any = Object.assign({}, event);\n if ( !event.content ) {\n throw new Error('Invalid eventMessage: content is mandatory');\n }\n try {\n // wireEvent.content = convertJsontoStruct(event.content);\n wireEvent.content = toAny(event.content, event.type);\n Logger.debug(`EventLoggingServiceClient.log sending wireEvent: ${JSON.stringify(wireEvent, null, 2)}`);\n this.grpcClient.log(wireEvent, (error: any, response: LogResponse) => {\n Logger.debug(`EventLoggingServiceClient.log received response: ${JSON.stringify(response, null, 2)}`);\n if ( error ) { reject(error); }\n resolve(response);\n })\n } catch (e) {\n Logger.error(e)\n reject(e)\n }\n })\n }\n}\n\nexport {\n EventLoggingServiceClient\n}"]} \ No newline at end of file diff --git a/lib/transport/EventLoggingServiceServer.js b/lib/transport/EventLoggingServiceServer.js index 908830b..db6d29b 100644 --- a/lib/transport/EventLoggingServiceServer.js +++ b/lib/transport/EventLoggingServiceServer.js @@ -29,6 +29,7 @@ const JsonToStructMapper_1 = require("./JsonToStructMapper"); const EventLoggerServiceLoader_1 = require("./EventLoggerServiceLoader"); const events = require("events"); const grpc = require('grpc'); +const Logger = require('@mojaloop/central-services-logger'); const EVENT_RECEIVED = 'eventReceived'; exports.EVENT_RECEIVED = EVENT_RECEIVED; class EventLoggingServiceServer extends events.EventEmitter { @@ -46,7 +47,7 @@ class EventLoggingServiceServer extends events.EventEmitter { start() { this.server.bind(`${this.host}:${this.port}`, grpc.ServerCredentials.createInsecure()); this.server.start(); - console.log('Server listening'); + Logger.info(`Server listening on ${this.host}:${this.port}...`); } logEventReceivedHandler(call, callback) { let event = call.request; @@ -54,7 +55,7 @@ class EventLoggingServiceServer extends events.EventEmitter { if (!event.id) { callback(new Error(`Couldn't parse message parameter. It doesn't have an id property. parameter: ${event}`)); } - console.log('Server.logEventReceivedHandler event: ', JSON.stringify(event, null, 2)); + Logger.debug(`Server.logEventReceivedHandler event: ${JSON.stringify(event, null, 2)}`); try { // Convert it to a EventMessage let eventMessage = Object.assign({}, event); diff --git a/lib/transport/EventLoggingServiceServer.js.map b/lib/transport/EventLoggingServiceServer.js.map index e827f0e..1837cca 100644 --- a/lib/transport/EventLoggingServiceServer.js.map +++ b/lib/transport/EventLoggingServiceServer.js.map @@ -1 +1 @@ -{"version":3,"file":"EventLoggingServiceServer.js","sourceRoot":"","sources":["../../src/transport/EventLoggingServiceServer.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;QAuBQ;AACR,wDAAqF;AACrF,6DAAoE;AACpE,yEAAoE;AAEpE,iCAAkC;AAElC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAE5B,MAAM,cAAc,GAAG,eAAe,CAAC;AA2DrC,wCAAc;AAxDhB,MAAM,yBAA0B,SAAQ,MAAM,CAAC,YAAY;IAMzD,YAAY,IAAa,EAAE,IAAY;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,kBAAkB,GAAG,iDAAsB,EAAE,CAAC;QAElD,IAAI,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAA;QAC9B,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE;YAC5C,GAAG,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC;SAC7C,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;IAED,K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;AAIC,8DAAyB","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\nimport { EventMessage, LogResponse, LogResponseStatus } from \"../model/EventMessage\";\nimport { convertStructToJson, fromAny } from \"./JsonToStructMapper\";\nimport { loadEventLoggerService } from \"./EventLoggerServiceLoader\";\n\nimport events = require('events');\n\nconst grpc = require('grpc')\n\nconst EVENT_RECEIVED = 'eventReceived';\n\n\nclass EventLoggingServiceServer extends events.EventEmitter{\n\n private server: any;\n private host : string;\n private port: number;\n\n constructor(host : string, port: number ) {\n super();\n let eventLoggerService = loadEventLoggerService();\n\n var server = new grpc.Server()\n server.addService(eventLoggerService.service, {\n log: this.logEventReceivedHandler.bind(this)\n })\n\n this.server = server;\n this.host = host;\n this.port = port;\n }\n\n start() : any {\n this.server.bind(`${this.host}:${this.port}`, grpc.ServerCredentials.createInsecure())\n this.server.start()\n console.log('Server listening')\n }\n\n logEventReceivedHandler (call: any, callback: any) {\n let event = call.request\n // We're on plain JavaScript, so although this *should* be a EventMessage since gRPC is typed, let's be sure\n if (!event.id) {\n callback(new Error(`Couldn't parse message parameter. It doesn't have an id property. parameter: ${event}`))\n }\n console.log('Server.logEventReceivedHandler event: ', JSON.stringify(event, null, 2))\n \n try {\n // Convert it to a EventMessage\n let eventMessage : EventMessage = Object.assign({}, event);\n // Convert the event.content wich is an Struct to a plan object\n if (eventMessage.content) {\n // eventMessage.content = convertStructToJson(eventMessage.content.fields)\n eventMessage.content = fromAny(eventMessage.content)\n }\n\n this.emit(EVENT_RECEIVED, eventMessage);\n \n let response = new LogResponse(LogResponseStatus.accepted)\n callback(null, response)\n } catch (error) {\n let response = new LogResponse(LogResponseStatus.error)\n callback(null, response) \n }\n }\n \n}\n\nexport {\n EVENT_RECEIVED,\n EventLoggingServiceServer\n}"]} \ No newline at end of file +{"version":3,"file":"EventLoggingServiceServer.js","sourceRoot":"","sources":["../../src/transport/EventLoggingServiceServer.ts"],"names":[],"mappings":";;AAAA;;;;;;;;;;;;;;;;;;;;;;;QAuBQ;AACR,wDAAqF;AACrF,6DAAoE;AACpE,yEAAoE;AAEpE,iCAAkC;AAElC,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AAC5B,MAAM,MAAM,GAAG,OAAO,CAAC,mCAAmC,CAAC,CAAA;AAE3D,MAAM,cAAc,GAAG,eAAe,CAAC;AA4DrC,wCAAc;AAzDhB,MAAM,yBAA0B,SAAQ,MAAM,CAAC,YAAY;IAMzD,YAAY,IAAa,EAAE,IAAY;QACrC,KAAK,EAAE,CAAC;QACR,IAAI,kBAAkB,GAAG,iDAAsB,EAAE,CAAC;QAElD,IAAI,MAAM,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,CAAA;QAC9B,MAAM,CAAC,UAAU,CAAC,kBAAkB,CAAC,OAAO,EAAE;YAC5C,GAAG,EAAE,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,IAAI,CAAC;SAC7C,CAAC,CAAA;QAEF,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,IAAI,CAA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vD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAA;SACzB;IACH,CAAC;CAEF;AAIC,8DAAyB","sourcesContent":["/*****\n License\n --------------\n Copyright © 2017 Bill & Melinda Gates Foundation\n The Mojaloop files are made available by the Bill & Melinda Gates Foundation under the Apache License, Version 2.0 (the \"License\") and you may not use these files except in compliance with the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.\n Contributors\n --------------\n This is the official list of the Mojaloop project contributors for this file.\n Names of the original copyright holders (individuals or organizations)\n should be listed with a '*' in the first column. People who have\n contributed from an organization can be listed under the organization\n that actually holds the copyright for their contributions (see the\n Gates Foundation organization for an example). Those individuals should have\n their names indented and be marked with a '-'. Email address can be added\n optionally within square brackets .\n * Gates Foundation\n - Name Surname \n\n - Ramiro González Maciel \n\n --------------\n ******/\nimport { EventMessage, LogResponse, LogResponseStatus } from \"../model/EventMessage\";\nimport { convertStructToJson, fromAny } from \"./JsonToStructMapper\";\nimport { loadEventLoggerService } from \"./EventLoggerServiceLoader\";\n\nimport events = require('events');\n\nconst grpc = require('grpc')\nconst Logger = require('@mojaloop/central-services-logger')\n\nconst EVENT_RECEIVED = 'eventReceived';\n\n\nclass EventLoggingServiceServer extends events.EventEmitter{\n\n private server: any;\n private host : string;\n private port: number;\n\n constructor(host : string, port: number ) {\n super();\n let eventLoggerService = loadEventLoggerService();\n\n var server = new grpc.Server()\n server.addService(eventLoggerService.service, {\n log: this.logEventReceivedHandler.bind(this)\n })\n\n this.server = server;\n this.host = host;\n this.port = port;\n }\n\n start() : any {\n this.server.bind(`${this.host}:${this.port}`, grpc.ServerCredentials.createInsecure())\n this.server.start()\n Logger.info(`Server listening on ${this.host}:${this.port}...`)\n }\n\n logEventReceivedHandler (call: any, callback: any) {\n let event = call.request\n // We're on plain JavaScript, so although this *should* be a EventMessage since gRPC is typed, let's be sure\n if (!event.id) {\n callback(new Error(`Couldn't parse message parameter. It doesn't have an id property. parameter: ${event}`))\n }\n\n Logger.debug(`Server.logEventReceivedHandler event: ${JSON.stringify(event, null, 2)}`)\n \n try {\n // Convert it to a EventMessage\n let eventMessage : EventMessage = Object.assign({}, event);\n // Convert the event.content wich is an Struct to a plan object\n if (eventMessage.content) {\n // eventMessage.content = convertStructToJson(eventMessage.content.fields)\n eventMessage.content = fromAny(eventMessage.content)\n }\n\n this.emit(EVENT_RECEIVED, eventMessage);\n \n let response = new LogResponse(LogResponseStatus.accepted)\n callback(null, response)\n } catch (error) {\n let response = new LogResponse(LogResponseStatus.error)\n callback(null, response) \n }\n }\n \n}\n\nexport {\n EVENT_RECEIVED,\n EventLoggingServiceServer\n}"]} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 557e190..cc9be0f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@mojaloop/event-sdk", - "version": "7.3.0", + "version": "8.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -112,116 +112,22 @@ } }, "@grpc/proto-loader": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.1.tgz", - "integrity": "sha512-3y0FhacYAwWvyXshH18eDkUI40wT/uGio7MAegzY8lO5+wVsc19+1A7T0pPptae4kl7bdITL+0cHpnAPmryBjQ==", + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/@grpc/proto-loader/-/proto-loader-0.5.2.tgz", + "integrity": "sha512-eBKD/FPxQoY1x6QONW2nBd54QUEyzcFP9FenujmoeDPy1rutVSHki1s/wR68F6O1QfCNDx+ayBH1O2CVNMzyyw==", "requires": { "lodash.camelcase": "^4.3.0", "protobufjs": "^6.8.6" } }, - "@modusbox/mojaloop-sdk-standard-components": { - "version": "0.0.36", - "resolved": "https://registry.npmjs.org/@modusbox/mojaloop-sdk-standard-components/-/mojaloop-sdk-standard-components-0.0.36.tgz", - "integrity": "sha512-wtRm+BOvImnkSaq2UkAWWj3SWaSR2c6l8ibrNWNfZXJaGmcaWb+T+caue/XYGTtQyOjL1+q5Qe4P8ppfc6ZRBA==", - "requires": { - "base64url": "^3.0.1", - "ilp-packet": "2.2.0", - "jsonwebtoken": "^8.5.1", - "jws": "^3.2.2", - "request": "^2.34", - "request-promise-native": "^1.0.7" - } - }, - "@mojaloop/central-services-error-handling": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-error-handling/-/central-services-error-handling-7.2.2.tgz", - "integrity": "sha512-nDzMRXF8OlqE0gFGMv3f3jo5Dx7YverVya3REhV6xlmXTCVytSmk2smefNFYloGumMsfcC8QTaiUhTQIU2KJfA==", + "@mojaloop/central-services-logger": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/@mojaloop/central-services-logger/-/central-services-logger-8.1.1.tgz", + "integrity": "sha512-ZAum8Mtl4NvW4IBfQ91bXsAvMwKFu1IDN0Ds81PemEB1Q6bQzAb4o5sIymeb55vwBxgR0msCsDsjMhIxBOjGMQ==", "requires": { - "@modusbox/mojaloop-sdk-standard-components": "0.0.36", - "@mojaloop/central-services-shared": "6.4.1", - "lodash": "4.17.15" - }, - "dependencies": { - "@mojaloop/central-services-shared": { - "version": "6.4.1", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-6.4.1.tgz", - "integrity": "sha512-ihtRxZiMghJgqXdstVi/qr0VepOfr2uA1VYfnPNB16TZoojWtG0xt538XG/3TfYJfxVOaShc+WlJBVoxUs774w==", - "requires": { - "async": "3.1.0", - "debug": "4.1.1", - "winston": "3.2.1" - } - } - } - }, - "@mojaloop/central-services-shared": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-7.2.0.tgz", - "integrity": "sha512-dBjthgRj38GINGn2UaVHykrSaQHt9CUsxmdCEjKMOPXs67wzg7QFJJf7fOouuIqynvJnz7rBM0Df5pyM+k3ICg==", - "requires": { - "@mojaloop/central-services-error-handling": "7.2.2", - "@mojaloop/central-services-stream": "6.2.2", - "axios": "0.19.0", - "catbox": "10.0.6", - "catbox-memory": "4.0.1", - "glob": "7.1.4", - "immutable": "3.8.2", - "lodash": "4.17.15", - "mustache": "3.0.1", - "raw-body": "2.4.1", - "uuid4": "1.1.4", "winston": "3.2.1" } }, - "@mojaloop/central-services-stream": { - "version": "6.2.2", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-stream/-/central-services-stream-6.2.2.tgz", - "integrity": "sha512-NsKMYRjNQdBJ1290xP1/Kjs1MKgtBINFs3CLcnhrWW1sMwdfLakAwoVdiaZmJMguk5sung7T5hbHWC/XNQOyoQ==", - "requires": { - "@mojaloop/central-services-shared": "5.2.0", - "async": "2.6.2", - "base64url": "3.0.1", - "bluebird": "3.5.3", - "clone": "2.1.2", - "data-urls": "^1.1.0", - "debug": "4.1.1", - "events": "3.0.0", - "node-rdkafka": "2.6.1", - "raw-body": "2.4.0" - }, - "dependencies": { - "@mojaloop/central-services-shared": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/@mojaloop/central-services-shared/-/central-services-shared-5.2.0.tgz", - "integrity": "sha512-wcHlPdJKziJMqjDIbYp8WLXT5ZI/0ITdrxl2QHDK03geZ6UWJ0B6EnRe1LPKWM2M/bBzzybB9vHU8UI+/QwXgw==", - "requires": { - "async": "2.6.2", - "debug": "4.1.1", - "winston": "3.2.1" - } - }, - "async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/async/-/async-2.6.2.tgz", - "integrity": "sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg==", - "requires": { - "lodash": "^4.17.11" - } - }, - "raw-body": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.0.tgz", - "integrity": "sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.2", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - } - } - } - }, "@protobufjs/aspromise": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@protobufjs/aspromise/-/aspromise-1.1.2.tgz", @@ -277,9 +183,9 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@sinonjs/commons": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.4.0.tgz", - "integrity": "sha512-9jHK3YF/8HtJ9wCAbG+j8cD0i0+ATS9A7gXFqS36TblLPNy6rEEc+SB0imo91eCboGaBYGV/MT1/br/J+EE7Tw==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.6.0.tgz", + "integrity": "sha512-w4/WHG7C4WWFyE5geCieFJF6MZkbW4VAriol5KlmQXpAQdxvV0p26sqNZOW6Qyw6Y0l9K4g+cHvvczR2sEEpqg==", "requires": { "type-detect": "4.0.8" } @@ -294,13 +200,13 @@ } }, "@sinonjs/samsam": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.2.tgz", - "integrity": "sha512-ILO/rR8LfAb60Y1Yfp9vxfYAASK43NFC2mLzpvLUbCQY/Qu8YwReboseu8aheCEkyElZF2L2T9mHcR2bgdvZyA==", + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-3.3.3.tgz", + "integrity": "sha512-bKCMKZvWIjYD0BLGnNrxVuw4dkWCYsLqFOUWw8VgKF/+5Y+mE7LfHWPIYoDXowH+3a9LsWDMo0uAP8YDosPvHQ==", "requires": { - "@sinonjs/commons": "^1.0.2", + "@sinonjs/commons": "^1.3.0", "array-from": "^2.1.1", - "lodash": "^4.17.11" + "lodash": "^4.17.15" } }, "@sinonjs/text-encoding": { @@ -308,70 +214,20 @@ "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==" }, - "@types/eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", - "dev": true - }, - "@types/events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", - "integrity": "sha512-EaObqwIvayI5a8dCzhFrjKzVwKLxjoG9T6Ppd5CEo07LRKfQ8Yokw54r5+Wq7FaBQ+yXRvQAYPrHwya1/UFt9g==", - "dev": true - }, - "@types/fs-extra": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-5.1.0.tgz", - "integrity": "sha512-AInn5+UBFIK9FK5xc9yP5e3TQSPNNgjHByqYcj9g5elVBnDQcQL7PlO1CIRy2gWlbwK7UPYqi7vRvFA44dCmYQ==", - "dev": true, - "requires": { - "@types/node": "*" - } - }, - "@types/glob": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.1.tgz", - "integrity": "sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w==", - "dev": true, + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", "requires": { - "@types/events": "*", - "@types/minimatch": "*", + "@types/long": "*", "@types/node": "*" } }, - "@types/handlebars": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/@types/handlebars/-/handlebars-4.1.0.tgz", - "integrity": "sha512-gq9YweFKNNB1uFK71eRqsd4niVkXrxHugqWFQkeLRJvGjnxsLr16bYtcsG4tOFwmYi0Bax+wCkbf1reUfdl4kA==", - "dev": true, - "requires": { - "handlebars": "*" - } - }, - "@types/highlight.js": { - "version": "9.12.3", - "resolved": "https://registry.npmjs.org/@types/highlight.js/-/highlight.js-9.12.3.tgz", - "integrity": "sha512-pGF/zvYOACZ/gLGWdQH8zSwteQS1epp68yRcVLJMgUck/MjEn/FBYmPub9pXT8C1e4a8YZfHo1CKyV8q1vKUnQ==", - "dev": true - }, - "@types/lodash": { - "version": "4.14.136", - "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.136.tgz", - "integrity": "sha512-0GJhzBdvsW2RUccNHOBkabI8HZVdOXmXbXhuKlDEd5Vv12P7oAVGfomGp3Ne21o5D/qu1WmthlNKFaoZJJeErA==", - "dev": true - }, "@types/long": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" }, - "@types/marked": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@types/marked/-/marked-0.4.2.tgz", - "integrity": "sha512-cDB930/7MbzaGF6U3IwSQp6XBru8xWajF5PV2YZZeV8DyiliTuld11afVztGI9+yJZ29il5E+NpGA6ooV/Cjkg==", - "dev": true - }, "@types/minimatch": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", @@ -379,10 +235,9 @@ "dev": true }, "@types/node": { - "version": "11.9.4", - "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.4.tgz", - "integrity": "sha512-Zl8dGvAcEmadgs1tmSPcvwzO1YRsz38bVJQvH1RvRqSR9/5n61Q1ktcDL0ht3FXWR+ZpVmXVwN1LuH4Ax23NsA==", - "dev": true + "version": "12.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-12.7.4.tgz", + "integrity": "sha512-W0+n1Y+gK/8G2P/piTkBBN38Qc5Q1ZSO6B5H3QmPCUewaiXOo2GCAWZ4ElZCcNhjJuBSUSLGFUJnmlCn5+nxOQ==" }, "@types/protobufjs": { "version": "6.0.0", @@ -392,16 +247,6 @@ "protobufjs": "*" } }, - "@types/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@types/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-bZgjwIWu9gHCjirKJoOlLzGi5N0QgZ5t7EXEuoqyWCHTuSddURXo3FOBYDyRPNOWzZ6NbkLvZnVkn483Y/tvcQ==", - "dev": true, - "requires": { - "@types/glob": "*", - "@types/node": "*" - } - }, "@types/tape": { "version": "4.2.33", "resolved": "https://registry.npmjs.org/@types/tape/-/tape-4.2.33.tgz", @@ -411,72 +256,23 @@ "@types/node": "*" } }, - "@typescript-eslint/eslint-plugin": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-1.11.0.tgz", - "integrity": "sha512-mXv9ccCou89C8/4avKHuPB2WkSZyY/XcTQUXd5LFZAcLw1I3mWYVjUu6eS9Ja0QkP/ClolbcW9tb3Ov/pMdcqw==", - "dev": true, - "requires": { - "@typescript-eslint/experimental-utils": "1.11.0", - "eslint-utils": "^1.3.1", - "functional-red-black-tree": "^1.0.1", - "regexpp": "^2.0.1", - "tsutils": "^3.7.0" - } - }, - "@typescript-eslint/experimental-utils": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-1.11.0.tgz", - "integrity": "sha512-7LbfaqF6B8oa8cp/315zxKk8FFzosRzzhF8Kn/ZRsRsnpm7Qcu25cR/9RnAQo5utZ2KIWVgaALr+ZmcbG47ruw==", - "dev": true, - "requires": { - "@typescript-eslint/typescript-estree": "1.11.0", - "eslint-scope": "^4.0.0" - } - }, - "@typescript-eslint/parser": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-1.11.0.tgz", - "integrity": "sha512-5xBExyXaxVyczrZvbRKEXvaTUFFq7gIM9BynXukXZE0zF3IQP/FxF4mPmmh3gJ9egafZFqByCpPTFm3dk4SY7Q==", - "dev": true, - "requires": { - "@types/eslint-visitor-keys": "^1.0.0", - "@typescript-eslint/experimental-utils": "1.11.0", - "@typescript-eslint/typescript-estree": "1.11.0", - "eslint-visitor-keys": "^1.0.0" - } - }, - "@typescript-eslint/typescript-estree": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-1.11.0.tgz", - "integrity": "sha512-fquUHF5tAx1sM2OeRCC7wVxFd1iMELWMGCzOSmJ3pLzArj9+kRixdlC4d5MncuzXpjEqc6045p3KwM0o/3FuUA==", - "dev": true, - "requires": { - "lodash.unescape": "4.0.1", - "semver": "5.5.0" - } - }, - "abab": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz", - "integrity": "sha512-sY5AXXVZv4Y1VACTtR11UJCPHHudgY5i26Qj5TypE6DKlIApbwb5uqhXcJ5UUGbvZNRh7EeIoW+LrJumBsKp7w==" - }, "acorn": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.2.0.tgz", - "integrity": "sha512-8oe72N3WPMjA+2zVG71Ia0nXZ8DpQH+QyyHO+p06jT8eg8FGG3FbcUIi8KziHlAfheJQZeoqbvq1mQSQHXKYLw==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.0.0.tgz", + "integrity": "sha512-PaF/MduxijYYt7unVGRuds1vBC9bFxbNf+VWqhOClfdgy7RlVkQqt610ig1/yxTgsDIfW1cWDel5EBbOy3jdtQ==", "dev": true }, "acorn-jsx": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.1.tgz", - "integrity": "sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1aBXkx9UP/w/ZqMr13XIzg==", + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.0.2.tgz", + "integrity": "sha512-tiNTrP1MP0QrChmD2DdupCr6HWSFeKVw5d/dHTu4Y7rkAkRhU/Dt7dphAfIUyxtHpl/eBVip5uTNSpQJHylpAw==", "dev": true }, "ajv": { "version": "6.10.2", "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.2.tgz", "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "dev": true, "requires": { "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", @@ -484,12 +280,6 @@ "uri-js": "^4.2.2" } }, - "ajv-keywords": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.4.1.tgz", - "integrity": "sha512-RO1ibKvd27e6FEShVFfPALuHI3WjSVNeK5FIsmme/LYRNxjKuNj+Dt7bucLa6NdSv3JcVTyMlm9kGR84z1XpaQ==", - "dev": true - }, "ansi-escapes": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-3.2.0.tgz", @@ -510,6 +300,21 @@ "color-convert": "^1.9.0" } }, + "append-transform": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-1.0.0.tgz", + "integrity": "sha512-P009oYkeHyU742iSZJzZZywj4QRJdnTWffaKuJQLablCZ1uz6/cW4yaRgcDaoQ+uwOxxnt0gRUcwfsNP2ri0gw==", + "dev": true, + "requires": { + "default-require-extensions": "^2.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, "arg": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.1.tgz", @@ -549,140 +354,32 @@ "optjs": "~3.2.2" } }, - "asn1": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", - "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { + "astral-regex": { "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" - }, - "async": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/async/-/async-3.1.0.tgz", - "integrity": "sha512-4vx/aaY6j/j3Lw3fbCHNWP0pPaTCew3F6F3hYyl/tHs/ndmV1q7NW9T5yuJ2XAGwdQrP+6Wu20x06U4APo/iQQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" - }, - "aws4": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", - "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" - }, - "axios": { - "version": "0.19.0", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.19.0.tgz", - "integrity": "sha512-1uvKqKQta3KBxIz14F2v06AEHZ/dIoeKfbTRkK1E5oqjDnuEerLmYTgJB5AiQZHJcljpg1TuRzdjDR06qNk0DQ==", - "requires": { - "follow-redirects": "1.5.10", - "is-buffer": "^2.0.2" - } + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true }, - "babel-code-frame": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", - "integrity": "sha1-Y/1D99weO7fONZR9uP42mj9Yx0s=", + "backbone": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/backbone/-/backbone-1.4.0.tgz", + "integrity": "sha512-RLmDrRXkVdouTg38jcgHhyQ/2zjg7a8E6sz2zxfz21Hh17xDJYUHBZimVIt5fUyS8vbfpeSmTL3gUjTEvUV3qQ==", "dev": true, "requires": { - "chalk": "^1.1.3", - "esutils": "^2.0.2", - "js-tokens": "^3.0.2" - }, - "dependencies": { - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4=", - "dev": true - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg=", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "js-tokens": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz", - "integrity": "sha1-mGbfOVECEw449/mWvOtlRDIJwls=", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha1-U10EXOa2Nj+kARcIRimZXp3zJMc=", - "dev": true - } + "underscore": ">=1.8.3" } }, "balanced-match": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "base64url": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/base64url/-/base64url-3.0.1.tgz", - "integrity": "sha512-ir1UPr3dkwexU7FdV8qBBbNDRUhMmIekYMFZfi+C/sLNnRESKPl23nB9b2pltqfOQNnGzsDdId90AEtG5tCx4A==" - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "bignumber.js": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-5.0.0.tgz", - "integrity": "sha512-KWTu6ZMVk9sxlDJQh2YH1UOnfDP8O8TpxUxgQG/vKASoSnEjK9aVuOueFaPcQEYQ5fyNXNTOYwYw3099RYebWg==" - }, - "bindings": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", - "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", - "requires": { - "file-uri-to-path": "1.0.0" - } - }, - "bluebird": { - "version": "3.5.3", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.3.tgz", - "integrity": "sha512-/qKPUQlaW1OyR51WeCPBvRnAlnZFUJkCSG5HzGnuIqhgyJtF+T94lFnn33eiazjRm2LAHVy2guNnaq48X9SJuw==" - }, - "boom": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-7.3.0.tgz", - "integrity": "sha512-Swpoyi2t5+GhOEGw8rEsKvTxFLIDiiKoUc2gsoV6Lyr43LHBIzch3k2MvYUs8RTROrIkVJ3Al0TkaOGjnb+B6A==", - "requires": { - "hoek": "6.x.x" - } + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -693,11 +390,6 @@ "resolved": "https://registry.npmjs.org/brototype/-/brototype-0.0.6.tgz", "integrity": "sha1-mz8HNkeDOXuPHEvuehQZk1ZuS0Q=" }, - "buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" - }, "buffer-from": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", @@ -710,12 +402,6 @@ "integrity": "sha1-mXjOMXOIxkmth5MCjDR37wRKi1E=", "dev": true }, - "builtin-modules": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", - "integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=", - "dev": true - }, "bytebuffer": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", @@ -731,24 +417,40 @@ } } }, - "bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==" - }, - "caller-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/caller-path/-/caller-path-0.1.0.tgz", - "integrity": "sha1-lAhe9jWB7NPaqSREqP6U6CV3dR8=", + "caching-transform": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-3.0.2.tgz", + "integrity": "sha512-Mtgcv3lh3U0zRii/6qVgQODdPA4G3zhG+jtbCWj39RXuUFTMzH0vcdMtaJS1jPowd+It2Pqr6y3NJMQqOqCE2w==", "dev": true, "requires": { - "callsites": "^0.2.0" + "hasha": "^3.0.0", + "make-dir": "^2.0.0", + "package-hash": "^3.0.0", + "write-file-atomic": "^2.4.2" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, "callsites": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/callsites/-/callsites-0.2.0.tgz", - "integrity": "sha1-r6uWJikQp/M8GaV3WCXGnzTjUMo=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true }, "camelcase": { @@ -756,30 +458,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" - }, - "catbox": { - "version": "10.0.6", - "resolved": "https://registry.npmjs.org/catbox/-/catbox-10.0.6.tgz", - "integrity": "sha512-gQWCnF/jbHcfwGbQ4FQxyRiAwLRipqWTTXjpq7rTqqdcsnZosFa0L3LsCZcPTF33QIeMMkS7QmFBHt6QdzGPvg==", - "requires": { - "boom": "7.x.x", - "hoek": "6.x.x", - "joi": "14.x.x" - } - }, - "catbox-memory": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/catbox-memory/-/catbox-memory-4.0.1.tgz", - "integrity": "sha512-ZmqNiLsYCIu9qvBJ/MQbznDV2bFH5gFiH67TgIJgSSffJFtTXArT+MM3AvJQlby9NSkLHOX4eH/uuUqnch/Ldw==", - "requires": { - "boom": "7.x.x", - "hoek": "6.x.x" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -792,15 +470,9 @@ } }, "chardet": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.4.2.tgz", - "integrity": "sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=", - "dev": true - }, - "circular-json": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/circular-json/-/circular-json-0.3.3.tgz", - "integrity": "sha512-UZK3NBx2Mca+b5LsG7bY183pHWt5Y1xts4P3Pz7ENTwGVnJOUWbRb3ocjvX7hx9tq/yTAdclXm9sZ38gNuem4A==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", "dev": true }, "cli-cursor": { @@ -828,11 +500,6 @@ "wrap-ansi": "^2.0.0" } }, - "clone": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", - "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=" - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -893,24 +560,24 @@ "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, "commander": { "version": "2.20.0", "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", + "dev": true, + "optional": true + }, + "commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", "dev": true }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true }, "concat-stream": { "version": "1.6.2", @@ -956,11 +623,51 @@ "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", "dev": true }, + "convert-source-map": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz", + "integrity": "sha512-eFu7XigvxdZ1ETfbgPBohgyQ/Z++C0eEhTor0qRwBw9unw+L0/6V8wkSuGgzdThkiS5lSpdptOQPD8Ak40a+7A==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, "core-util-is": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, + "cp-file": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-6.2.0.tgz", + "integrity": "sha512-fmvV4caBnofhPe8kOcitBwSn2f39QLjnAnGq3gO9dfd75mUytzKNZB1hde6QHunW2Rt+OwuBOMc3i1tNElbszA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "make-dir": "^2.0.0", + "nested-error-stacks": "^2.0.0", + "pify": "^4.0.1", + "safe-buffer": "^5.0.1" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "cross-spawn": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-5.1.0.tgz", @@ -972,28 +679,11 @@ "which": "^1.2.9" } }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", - "requires": { - "assert-plus": "^1.0.0" - } - }, - "data-urls": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-1.1.0.tgz", - "integrity": "sha512-YTWYI9se1P55u58gL5GkQHW4P6VJBJ5iBT+B5a7i2Tjadhv52paJG0qHX4A0OR6/t52odI64KP2YvFpkDOi3eQ==", - "requires": { - "abab": "^2.0.0", - "whatwg-mimetype": "^2.2.0", - "whatwg-url": "^7.0.0" - } - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, "requires": { "ms": "^2.1.1" } @@ -1026,6 +716,15 @@ "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", "dev": true }, + "default-require-extensions": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-2.0.0.tgz", + "integrity": "sha1-9fj7sYp9bVCyH2QfZJ67Uiz+JPc=", + "dev": true, + "requires": { + "strip-bom": "^3.0.0" + } + }, "define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", @@ -1050,37 +749,27 @@ "dev": true }, "deglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/deglob/-/deglob-2.1.1.tgz", - "integrity": "sha512-2kjwuGGonL7gWE1XU4Fv79+vVzpoQCl0V+boMwWtOQJV2AGDabCwez++nB1Nli/8BabAfZQ/UuHPlp6AymKdWw==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/deglob/-/deglob-4.0.1.tgz", + "integrity": "sha512-/g+RDZ7yf2HvoW+E5Cy+K94YhgcFgr6C8LuHZD1O5HoNPkf3KY6RfXJ0DBGlB/NkLi5gml+G9zqRzk9S0mHZCg==", "dev": true, "requires": { "find-root": "^1.0.0", "glob": "^7.0.5", - "ignore": "^3.0.9", + "ignore": "^5.0.0", "pkg-config": "^1.1.0", "run-parallel": "^1.1.2", "uniq": "^1.0.1" }, "dependencies": { "ignore": { - "version": "3.3.10", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-3.3.10.tgz", - "integrity": "sha512-Pgs951kaMm5GXP7MOvxERINe3gsaVjUWFm+UZPSq9xYriQAksyhg0csnS0KXSNRD5NmNdapXEpjxG49+AKh/ug==", + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", "dev": true } } }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" - }, - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" - }, "diagnostics": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/diagnostics/-/diagnostics-1.1.1.tgz", @@ -1097,9 +786,9 @@ "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==" }, "doctrine": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", - "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, "requires": { "esutils": "^2.0.2" @@ -1111,22 +800,11 @@ "integrity": "sha1-rOb/gIwc5mtX0ev5eXessCM0z8E=", "dev": true }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "requires": { - "safe-buffer": "^5.0.1" - } + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true }, "enabled": { "version": "1.0.2", @@ -1141,7 +819,12 @@ "resolved": "https://registry.npmjs.org/env-variable/-/env-variable-0.0.5.tgz", "integrity": "sha512-zoB603vQReOFvTg5xMl9I1P2PnHsHQQKTEowsKKD7nseUfJq6UWzK+4YtlWUO1nhiQUxe6XMkk+JleSZD1NZFA==" }, - "error-ex": { + "error-callsites": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/error-callsites/-/error-callsites-2.0.2.tgz", + "integrity": "sha512-s35ELWAKAY9oPqnnfP1V4AnasWV0r2ihaLlpsCGrykZgcR/YKsMXV3q8Ap4Mmp8U90VxJqxKJE5Io0IkkRhJIg==" + }, + "error-ex": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", @@ -1159,17 +842,21 @@ } }, "es-abstract": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", - "integrity": "sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg==", + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.14.1.tgz", + "integrity": "sha512-cp/Tb1oA/rh2X7vqeSOvM+TSo3UkJLX70eNihgVEvnzwAgikjkTFr/QVgRCaxjm0knCNQzNoxxxcw2zO2LJdZA==", "dev": true, "requires": { "es-to-primitive": "^1.2.0", "function-bind": "^1.1.1", "has": "^1.0.3", + "has-symbols": "^1.0.0", "is-callable": "^1.1.4", "is-regex": "^1.0.4", - "object-keys": "^1.0.12" + "object-inspect": "^1.6.0", + "object-keys": "^1.1.1", + "string.prototype.trimleft": "^2.0.0", + "string.prototype.trimright": "^2.0.0" }, "dependencies": { "object-keys": { @@ -1191,6 +878,12 @@ "is-symbol": "^1.0.2" } }, + "es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, "escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", @@ -1198,55 +891,54 @@ "dev": true }, "eslint": { - "version": "5.4.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-5.4.0.tgz", - "integrity": "sha512-UIpL91XGex3qtL6qwyCQJar2j3osKxK9e3ano3OcGEIRM4oWIpCkDg9x95AXEC2wMs7PnxzOkPZ2gq+tsMS9yg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.4.0.tgz", + "integrity": "sha512-WTVEzK3lSFoXUovDHEbkJqCVPEPwbhCq4trDktNI6ygs7aO41d4cDT0JFAT5MivzZeVLWlg7vHL+bgrQv/t3vA==", "dev": true, "requires": { - "ajv": "^6.5.0", - "babel-code-frame": "^6.26.0", + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", "chalk": "^2.1.0", "cross-spawn": "^6.0.5", - "debug": "^3.1.0", - "doctrine": "^2.1.0", - "eslint-scope": "^4.0.0", - "eslint-utils": "^1.3.1", - "eslint-visitor-keys": "^1.0.0", - "espree": "^4.0.0", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.2", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.1", "esquery": "^1.0.1", "esutils": "^2.0.2", - "file-entry-cache": "^2.0.0", + "file-entry-cache": "^5.0.1", "functional-red-black-tree": "^1.0.1", - "glob": "^7.1.2", + "glob-parent": "^5.0.0", "globals": "^11.7.0", - "ignore": "^4.0.2", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", "imurmurhash": "^0.1.4", - "inquirer": "^5.2.0", - "is-resolvable": "^1.1.0", - "js-yaml": "^3.11.0", + "inquirer": "^6.4.1", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", "json-stable-stringify-without-jsonify": "^1.0.1", "levn": "^0.3.0", - "lodash": "^4.17.5", + "lodash": "^4.17.14", "minimatch": "^3.0.4", "mkdirp": "^0.5.1", "natural-compare": "^1.4.0", "optionator": "^0.8.2", - "path-is-inside": "^1.0.2", - "pluralize": "^7.0.0", "progress": "^2.0.0", - "regexpp": "^2.0.0", - "require-uncached": "^1.0.3", - "semver": "^5.5.0", - "strip-ansi": "^4.0.0", - "strip-json-comments": "^2.0.1", - "table": "^4.0.3", - "text-table": "^0.2.0" + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "cross-spawn": { @@ -1260,38 +952,49 @@ "semver": "^5.5.0", "shebang-command": "^1.2.0", "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } } }, - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true } } }, "eslint-config-standard": { - "version": "12.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-12.0.0.tgz", - "integrity": "sha512-COUz8FnXhqFitYj4DTqHzidjIL/t4mumGZto5c7DrBpvWoie+Sn3P4sLEzUGeYhRElWuFEf8K1S1EfvD1vixCQ==", + "version": "14.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-14.1.0.tgz", + "integrity": "sha512-EF6XkrrGVbvv8hL/kYa/m6vnvmUT+K82pJJc4JJVMM6+Qgqh0pnwprSxdduDLB9p/7bIxD+YV5O0wfb8lmcPbA==", "dev": true }, "eslint-config-standard-jsx": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-6.0.2.tgz", - "integrity": "sha512-D+YWAoXw+2GIdbMBRAzWwr1ZtvnSf4n4yL0gKGg7ShUOGXkSOLerI17K4F6LdQMJPNMoWYqepzQD/fKY+tXNSg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz", + "integrity": "sha512-ULVC8qH8qCqbU792ZOO6DaiaZyHNS/5CZt3hKqHkEhVlhPEPN3nfBqqxJCyp59XrjIBZPu1chMYe9T2DXZ7TMw==", "dev": true }, "eslint-import-resolver-node": { @@ -1322,9 +1025,9 @@ } }, "eslint-module-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.0.tgz", - "integrity": "sha512-14tltLm38Eu3zS+mt0KvILC3q8jyIAH518MlG+HO0p+yK885Lb1UHTY/UgR91eOyGdmxAPb+OLoW4znqIT6Ndw==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.4.1.tgz", + "integrity": "sha512-H6DOj+ejw7Tesdgbfs4jeS4YMFrT8uI8xwd1gtQqXssaR0EQ26L+2O/w6wkYFy2MymON0fTwHmXBvvfLNZVZEw==", "dev": true, "requires": { "debug": "^2.6.8", @@ -1340,40 +1043,101 @@ "ms": "2.0.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } } } }, "eslint-plugin-es": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-1.4.0.tgz", - "integrity": "sha512-XfFmgFdIUDgvaRAlaXUkxrRg5JSADoRC8IkKLc/cISeR3yHVMefFHQZpcyXXEUUPHfy5DwviBcrfqlyqEwlQVw==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-2.0.0.tgz", + "integrity": "sha512-f6fceVtg27BR02EYnBhgWLFQfK6bN4Ll0nQFrBHOlCsAyxeZkn0NHns5O0YZOPrV1B3ramd6cgFwaoFLcSkwEQ==", "dev": true, "requires": { - "eslint-utils": "^1.3.0", - "regexpp": "^2.0.1" + "eslint-utils": "^1.4.2", + "regexpp": "^3.0.0" + }, + "dependencies": { + "regexpp": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.0.0.tgz", + "integrity": "sha512-Z+hNr7RAVWxznLPuA7DIh8UNX1j9CDrUQxskw9IrBE1Dxue2lyXT+shqEIeLUjrokxIP8CMy1WkjgG3rTsd5/g==", + "dev": true + } } }, "eslint-plugin-import": { - "version": "2.14.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.14.0.tgz", - "integrity": "sha512-FpuRtniD/AY6sXByma2Wr0TXvXJ4nA/2/04VPlfpmUDPOpOY264x+ILiwnrk/k4RINgDAyFZByxqPUbSQ5YE7g==", + "version": "2.18.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.18.2.tgz", + "integrity": "sha512-5ohpsHAiUBRNaBWAF08izwUGlbrJoJJ+W9/TBwsGoR1MnlgfwMIKrFeSjWbt6moabiXW9xNvtFz+97KHRfI4HQ==", "dev": true, "requires": { + "array-includes": "^3.0.3", "contains-path": "^0.1.0", - "debug": "^2.6.8", + "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.1", - "eslint-module-utils": "^2.2.0", - "has": "^1.0.1", - "lodash": "^4.17.4", - "minimatch": "^3.0.3", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.4.0", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.0", "read-pkg-up": "^2.0.0", - "resolve": "^1.6.0" + "resolve": "^1.11.0" }, "dependencies": { "debug": { @@ -1395,57 +1159,186 @@ "isarray": "^1.0.0" } }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, "ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } } } }, "eslint-plugin-node": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-7.0.1.tgz", - "integrity": "sha512-lfVw3TEqThwq0j2Ba/Ckn2ABdwmL5dkOgAux1rvOk6CO7A6yGyPI2+zIxN6FyNkp1X1X/BSvKOceD6mBWSj4Yw==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-10.0.0.tgz", + "integrity": "sha512-1CSyM/QCjs6PXaT18+zuAXsjXGIGo5Rw630rSKwokSs2jrYURQc4R5JZpoanNCqwNmepg+0eZ9L7YiRUJb8jiQ==", "dev": true, "requires": { - "eslint-plugin-es": "^1.3.1", - "eslint-utils": "^1.3.1", - "ignore": "^4.0.2", + "eslint-plugin-es": "^2.0.0", + "eslint-utils": "^1.4.2", + "ignore": "^5.1.1", "minimatch": "^3.0.4", - "resolve": "^1.8.1", - "semver": "^5.5.0" + "resolve": "^1.10.1", + "semver": "^6.1.0" + }, + "dependencies": { + "ignore": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.4.tgz", + "integrity": "sha512-MzbUSahkTW1u7JpKKjY7LCARd1fU5W2rLdxlM4kdkayuCwZImjkpluF9CM1aLewYJguPDqewLam18Y6AU69A8A==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } } }, "eslint-plugin-promise": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.0.1.tgz", - "integrity": "sha512-Si16O0+Hqz1gDHsys6RtFRrW7cCTB6P7p3OJmKp3Y3dxpQE2qwOA7d3xnV+0mBmrPoi0RBnxlCKvqu70te6wjg==", + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-4.2.1.tgz", + "integrity": "sha512-VoM09vT7bfA7D+upt+FjeBO5eHIJQBUWki1aPvB+vbNiHS3+oGIJGIeyBtKQTME6UPXXy3vV07OL1tHd3ANuDw==", "dev": true }, "eslint-plugin-react": { - "version": "7.11.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.11.1.tgz", - "integrity": "sha512-cVVyMadRyW7qsIUh3FHp3u6QHNhOgVrLQYdQEB1bPWBsgbNCHdFAeNMquBMCcZJu59eNthX053L70l7gRt4SCw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.14.3.tgz", + "integrity": "sha512-EzdyyBWC4Uz2hPYBiEJrKCUi2Fn+BJ9B/pJQcjw5X+x/H2Nm59S4MJIvL4O5NEE0+WbnQwEBxWY03oUk+Bc3FA==", "dev": true, "requires": { "array-includes": "^3.0.3", "doctrine": "^2.1.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.0.1", - "prop-types": "^15.6.2" + "jsx-ast-utils": "^2.1.0", + "object.entries": "^1.1.0", + "object.fromentries": "^2.0.0", + "object.values": "^1.1.0", + "prop-types": "^15.7.2", + "resolve": "^1.10.1" + }, + "dependencies": { + "doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + } } }, "eslint-plugin-standard": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.0.tgz", - "integrity": "sha512-OwxJkR6TQiYMmt1EsNRMe5qG3GsbjlcOhbGUBY4LtavF9DsLaTcoR+j2Tdjqi23oUwKNUqX7qcn5fPStafMdlA==", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-standard/-/eslint-plugin-standard-4.0.1.tgz", + "integrity": "sha512-v/KBnfyaOMPmZc/dmc6ozOdWqekGp7bBGq4jLAecEfPGmfKiWS4sA8sC0LqiV9w5qmXAtXVn4M3p1jSyhY85SQ==", "dev": true }, "eslint-scope": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.3.tgz", - "integrity": "sha512-p7VutNr1O/QrxysMo3E45FjYDTeXBy0iTltPFNSqKAIfjDSXC+4dj+qfyuD8bfAXrW/y6lW3O76VaYNPKfpKrg==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.0.0.tgz", + "integrity": "sha512-oYrhJW7S0bxAFDvWqzvMPRm6pcgcnWc4QnofCAqRTRfQC0JcwenzGglTtsLyIuuWFfkqDG9vz67cnttSd53djw==", "dev": true, "requires": { "esrecurse": "^4.1.0", @@ -1453,29 +1346,29 @@ } }, "eslint-utils": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.0.tgz", - "integrity": "sha512-7ehnzPaP5IIEh1r1tkjuIrxqhNkzUJa9z3R92tLJdZIVdWaczEhr3EbhGtsMrVxi1KeR8qA7Off6SWc5WNQqyQ==", + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.2.tgz", + "integrity": "sha512-eAZS2sEUMlIeCjBeubdj45dmBHQwPHWyBcT1VSYB7o9x9WRRqKxyUoiXlRjyAwzN7YEzHJlYg0NmzDRWx6GP4Q==", "dev": true, "requires": { "eslint-visitor-keys": "^1.0.0" } }, "eslint-visitor-keys": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", - "integrity": "sha512-qzm/XxIbxm/FHyH341ZrbnMUpe+5Bocte9xkmFMzPMjRaZMcXww+MpBptFvtU+79L362nqiLhekCxCxDPaUMBQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.1.0.tgz", + "integrity": "sha512-8y9YjtM1JBJU/A9Kc+SbaOV4y29sSWckBwMHa+FGtVj5gN/sbnKDf6xJUl+8g7FAij9LVaP8C24DUiH/f/2Z9A==", "dev": true }, "espree": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-4.1.0.tgz", - "integrity": "sha512-I5BycZW6FCVIub93TeVY1s7vjhP9CY6cXCznIRfiig7nRviKZYdRnj/sHEWC6A7WE9RDWOFq9+7OsWSYz8qv2w==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.1.1.tgz", + "integrity": "sha512-EYbr8XZUhWbYCqQRW0duU5LxzL5bETN6AjKBGy1302qqzPaCH10QbRg3Wvco79Z8x9WbiE8HYB4e75xl6qUYvQ==", "dev": true, "requires": { - "acorn": "^6.0.2", - "acorn-jsx": "^5.0.0", - "eslint-visitor-keys": "^1.0.0" + "acorn": "^7.0.0", + "acorn-jsx": "^5.0.2", + "eslint-visitor-keys": "^1.1.0" } }, "esprima": { @@ -1503,63 +1396,45 @@ } }, "estraverse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.2.0.tgz", - "integrity": "sha1-De4/7TH81GlhjOc0IJn8GvoL2xM=", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, "esutils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.2.tgz", - "integrity": "sha1-Cr9PHKpbyx96nYrMbepPqqBLrJs=", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, - "events": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.0.0.tgz", - "integrity": "sha512-Dc381HFWJzEOhQ+d8pkNon++bk9h6cdAoAj4iE6Q4y6xgTzySWXlKn05/TVNpjnfRqi/X0EpJEJohPjNI3zpVA==" - }, "events-to-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", "integrity": "sha1-LUH1Y+H+QA7Uli/hpNXGp1Od9/Y=", "dev": true }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" - }, - "extensible-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/extensible-error/-/extensible-error-1.0.2.tgz", - "integrity": "sha512-kXU1FiTsGT8PyMKtFM074RK/VBpzwuQJicAHqBpsPDeTXBQiSALPjkjKXlyKdG/GP6lR7bBaEkq8qdoO2geu9g==" - }, "external-editor": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-2.2.0.tgz", - "integrity": "sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", "dev": true, "requires": { - "chardet": "^0.4.0", - "iconv-lite": "^0.4.17", + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", "tmp": "^0.0.33" } }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" - }, "fast-deep-equal": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", - "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=", + "dev": true }, "fast-json-stable-stringify": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", - "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=", + "dev": true }, "fast-levenshtein": { "version": "2.0.6", @@ -1624,20 +1499,14 @@ } }, "file-entry-cache": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-2.0.0.tgz", - "integrity": "sha1-w5KZDD5oR4PYOLjISkXYoEhFg2E=", + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", "dev": true, "requires": { - "flat-cache": "^1.2.1", - "object-assign": "^4.0.1" + "flat-cache": "^2.0.1" } }, - "file-uri-to-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", - "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==" - }, "fill-keys": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/fill-keys/-/fill-keys-1.0.2.tgz", @@ -1648,6 +1517,35 @@ "merge-descriptors": "~1.0.0" } }, + "find-cache-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-2.1.0.tgz", + "integrity": "sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==", + "dev": true, + "requires": { + "commondir": "^1.0.1", + "make-dir": "^2.0.0", + "pkg-dir": "^3.0.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, "find-root": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/find-root/-/find-root-1.1.0.tgz", @@ -1655,48 +1553,30 @@ "dev": true }, "find-up": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", - "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", "dev": true, "requires": { - "locate-path": "^2.0.0" + "locate-path": "^3.0.0" } }, "flat-cache": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-1.3.4.tgz", - "integrity": "sha512-VwyB3Lkgacfik2vhqR4uv2rvebqmDvFu4jlN/C1RzWoJEo8I7z4Q404oiqYCkq41mni8EzQnm95emU9seckwtg==", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", "dev": true, "requires": { - "circular-json": "^0.3.1", - "graceful-fs": "^4.1.2", - "rimraf": "~2.6.2", - "write": "^0.2.1" + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" } }, - "follow-redirects": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.5.10.tgz", - "integrity": "sha512-0V5l4Cizzvqt5D44aTXbFZz+FtyXV1vrDN6qrelxtfYQKW0KO0W2T/hkE8xvGa/540LkZlkaUjO4ailYTFtHVQ==", - "requires": { - "debug": "=3.1.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "requires": { - "ms": "2.0.0" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - } - } + "flatted": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.1.tgz", + "integrity": "sha512-a1hQMktqW9Nmqr5aktAux3JMNqaucxGcjtjWnZLHX7yyPCmlSV3M54nGYbqT8K+0GhF3NBgmJCc3ma+WOgX8Jg==", + "dev": true }, "for-each": { "version": "0.3.3", @@ -1707,28 +1587,35 @@ "is-callable": "^1.1.3" } }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "foreground-child": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-1.5.6.tgz", + "integrity": "sha1-T9ca0t/elnibmApcCilZN8svXOk=", + "dev": true, "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" + "cross-spawn": "^4", + "signal-exit": "^3.0.0" + }, + "dependencies": { + "cross-spawn": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-4.0.2.tgz", + "integrity": "sha1-e5JHYhwjrf3ThWAEqCPL45dCTUE=", + "dev": true, + "requires": { + "lru-cache": "^4.0.1", + "which": "^1.2.9" + } + } } }, "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-8.1.0.tgz", + "integrity": "sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", + "graceful-fs": "^4.2.0", "jsonfile": "^4.0.0", "universalify": "^0.1.0" } @@ -1736,7 +1623,8 @@ "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true }, "function-bind": { "version": "1.1.1", @@ -1750,24 +1638,23 @@ "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", "dev": true }, - "get-stdin": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-6.0.0.tgz", - "integrity": "sha512-jp4tHawyV7+fkkSKyvjuLZswblUtz+SQKzSWnBbii16BuZksJlU1wuBYXY75r+duh/llF1ur6oNwi+2ZzjKZ7g==", + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", "dev": true }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", - "requires": { - "assert-plus": "^1.0.0" - } + "get-stdin": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-7.0.0.tgz", + "integrity": "sha512-zRKcywvrXlXsA0v0i9Io4KDRaAw7+a1ZpjRwl9Wox8PFlVCCHra7E9c4kqXCoCM9nR5tBkaTTZRBoCm60bFqTQ==", + "dev": true }, "glob": { "version": "7.1.4", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.4.tgz", "integrity": "sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A==", + "dev": true, "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -1777,6 +1664,15 @@ "path-is-absolute": "^1.0.0" } }, + "glob-parent": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.0.0.tgz", + "integrity": "sha512-Z2RwiujPRGluePM6j699ktJYxmPpJKCfpGA13jz2hmFZC7gKetzrWvg5KN3+OsIFmydGyZ1AVwERCq1w/ZZwRg==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, "globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", @@ -1790,10 +1686,11 @@ "dev": true }, "grpc": { - "version": "1.21.1", - "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.21.1.tgz", - "integrity": "sha512-PFsZQazf62nP05a0xm23mlImMuw5oVlqF/0zakmsdqJgvbABe+d6VThY2PfhqJmWEL/FhQ6QNYsxS5EAM6++7g==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.23.3.tgz", + "integrity": "sha512-7vdzxPw9s5UYch4aUn4hyM5tMaouaxUUkwkgJlwbR4AXMxiYZJOv19N2ps2eKiuUbJovo5fnGF9hg/X91gWYjw==", "requires": { + "@types/bytebuffer": "^5.0.40", "lodash.camelcase": "^4.3.0", "lodash.clone": "^4.5.0", "nan": "^2.13.2", @@ -1834,7 +1731,7 @@ } }, "chownr": { - "version": "1.1.1", + "version": "1.1.2", "bundled": true }, "code-point-at": { @@ -1853,6 +1750,13 @@ "version": "1.0.2", "bundled": true }, + "debug": { + "version": "3.2.6", + "bundled": true, + "requires": { + "ms": "^2.1.1" + } + }, "deep-extend": { "version": "0.6.0", "bundled": true @@ -1866,7 +1770,7 @@ "bundled": true }, "fs-minipass": { - "version": "1.2.5", + "version": "1.2.6", "bundled": true, "requires": { "minipass": "^2.2.1" @@ -1890,12 +1794,24 @@ "wide-align": "^1.1.0" } }, + "glob": { + "version": "7.1.4", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, "has-unicode": { "version": "2.0.1", "bundled": true }, "iconv-lite": { - "version": "0.4.23", + "version": "0.4.24", "bundled": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" @@ -1917,7 +1833,7 @@ } }, "inherits": { - "version": "2.0.3", + "version": "2.0.4", "bundled": true }, "ini": { @@ -1974,26 +1890,17 @@ } } }, + "ms": { + "version": "2.1.2", + "bundled": true + }, "needle": { - "version": "2.3.1", + "version": "2.4.0", "bundled": true, "requires": { - "debug": "^4.1.0", + "debug": "^3.2.6", "iconv-lite": "^0.4.4", "sax": "^1.2.4" - }, - "dependencies": { - "debug": { - "version": "4.1.1", - "bundled": true, - "requires": { - "ms": "^2.1.1" - } - }, - "ms": { - "version": "2.1.1", - "bundled": true - } } }, "node-pre-gyp": { @@ -2025,7 +1932,7 @@ "bundled": true }, "npm-packlist": { - "version": "1.4.1", + "version": "1.4.4", "bundled": true, "requires": { "ignore-walk": "^3.0.1", @@ -2078,7 +1985,7 @@ "bundled": true }, "process-nextick-args": { - "version": "2.0.0", + "version": "2.0.1", "bundled": true }, "protobufjs": { @@ -2116,24 +2023,10 @@ } }, "rimraf": { - "version": "2.6.3", + "version": "2.7.1", "bundled": true, "requires": { "glob": "^7.1.3" - }, - "dependencies": { - "glob": { - "version": "7.1.4", - "bundled": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } } }, "safe-buffer": { @@ -2149,7 +2042,7 @@ "bundled": true }, "semver": { - "version": "5.7.0", + "version": "5.7.1", "bundled": true }, "set-blocking": { @@ -2188,16 +2081,16 @@ "bundled": true }, "tar": { - "version": "4.4.8", + "version": "4.4.10", "bundled": true, "requires": { "chownr": "^1.1.1", "fs-minipass": "^1.2.5", - "minipass": "^2.3.4", - "minizlib": "^1.1.1", + "minipass": "^2.3.5", + "minizlib": "^1.2.1", "mkdirp": "^0.5.0", "safe-buffer": "^5.1.2", - "yallist": "^3.0.2" + "yallist": "^3.0.3" } }, "util-deprecate": { @@ -2222,9 +2115,9 @@ } }, "handlebars": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.1.2.tgz", - "integrity": "sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.2.0.tgz", + "integrity": "sha512-Kb4xn5Qh1cxAKvQnzNWZ512DhABzyFNmsaJf3OAkWNa4NkaqWcNI8Tao8Tasi0/F4JD9oyG0YxuFyvyR57d+Gw==", "dev": true, "requires": { "neo-async": "^2.6.0", @@ -2241,20 +2134,6 @@ } } }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" - }, - "har-validator": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", - "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", - "requires": { - "ajv": "^6.5.5", - "har-schema": "^2.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2284,56 +2163,32 @@ "integrity": "sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q=", "dev": true }, + "hasha": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-3.0.0.tgz", + "integrity": "sha1-UqMvq4Vp1BymmmH/GiFPjrfIvTk=", + "dev": true, + "requires": { + "is-stream": "^1.0.1" + } + }, "highlight.js": { - "version": "9.15.8", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.8.tgz", - "integrity": "sha512-RrapkKQWwE+wKdF73VsOa2RQdIoO3mxwJ4P8mhbI6KYJUraUHRKM5w5zQQKXNk0xNL4UVRdulV9SBJcmzJNzVA==", + "version": "9.15.10", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.10.tgz", + "integrity": "sha512-RoV7OkQm0T3os3Dd2VHLNMoaoDVx77Wygln3n9l5YV172XonWG6rgQD3XnF/BuFFZw9A0TJgmMSO8FEWQgvcXw==", "dev": true }, - "hoek": { - "version": "6.1.3", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-6.1.3.tgz", - "integrity": "sha512-YXXAAhmF9zpQbC7LEcREFtXfGq5K1fmd+4PHkBq8NUqmzW3G+Dq10bI/i0KucLRwss3YYFQ0fSfoxBZYiGUqtQ==" - }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", "integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==", "dev": true }, - "http-errors": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.2.tgz", - "integrity": "sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "dependencies": { - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, "iconv-lite": { "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, "requires": { "safer-buffer": ">= 2.1.2 < 3" } @@ -2344,29 +2199,16 @@ "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", "dev": true }, - "ilp-packet": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/ilp-packet/-/ilp-packet-2.2.0.tgz", - "integrity": "sha1-qHJcwmMxxuLGU1OKEGPVUBQwXjE=", + "import-fresh": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.1.0.tgz", + "integrity": "sha512-PpuksHKGt8rXfWEr9m9EHIpgyyaltBy8+eF6GJM0QCAxMgxCfucMF3mjecK2QsJr0amJW7gTqh5/wht0z2UhEQ==", + "dev": true, "requires": { - "bignumber.js": "^5.0.0", - "extensible-error": "^1.0.2", - "long": "^3.2.0", - "oer-utils": "^1.3.2" - }, - "dependencies": { - "long": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", - "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" - } + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" } }, - "immutable": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/immutable/-/immutable-3.8.2.tgz", - "integrity": "sha1-wkOZUUVbs5kT2vKBN28VMOEErfM=" - }, "imurmurhash": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", @@ -2377,6 +2219,7 @@ "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, "requires": { "once": "^1.3.0", "wrappy": "1" @@ -2393,23 +2236,23 @@ "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" }, "inquirer": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-5.2.0.tgz", - "integrity": "sha512-E9BmnJbAKLPGonz0HeWHtbKf+EeSP93paWO3ZYoUpq/aowXvYGjjCSuashhXPpzbArIjBbji39THkxTz9ZeEUQ==", + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-6.5.2.tgz", + "integrity": "sha512-cntlB5ghuB0iuO65Ovoi8ogLHiWGs/5yNrtUcKjFhSSiVeAIVpD7koaSU9RM8mpXw5YDi9RdYXGQMaOURB7ycQ==", "dev": true, "requires": { - "ansi-escapes": "^3.0.0", - "chalk": "^2.0.0", + "ansi-escapes": "^3.2.0", + "chalk": "^2.4.2", "cli-cursor": "^2.1.0", "cli-width": "^2.0.0", - "external-editor": "^2.1.0", + "external-editor": "^3.0.3", "figures": "^2.0.0", - "lodash": "^4.3.0", + "lodash": "^4.17.12", "mute-stream": "0.0.7", "run-async": "^2.2.0", - "rxjs": "^5.5.2", + "rxjs": "^6.4.0", "string-width": "^2.1.0", - "strip-ansi": "^4.0.0", + "strip-ansi": "^5.1.0", "through": "^2.3.6" }, "dependencies": { @@ -2433,15 +2276,34 @@ "requires": { "is-fullwidth-code-point": "^2.0.0", "strip-ansi": "^4.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } } } } @@ -2462,11 +2324,6 @@ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" }, - "is-buffer": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.3.tgz", - "integrity": "sha512-U15Q7MXTuZlrbymiz95PJpZxu8IlipAp4dtS3wOdgPXx3mqBnslrWU14kxfHB+Py/+2PVKSr37dMAgM2A4uArw==" - }, "is-callable": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz", @@ -2479,6 +2336,12 @@ "integrity": "sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY=", "dev": true }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, "is-finite": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.0.2.tgz", @@ -2496,6 +2359,15 @@ "number-is-nan": "^1.0.0" } }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, "is-object": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/is-object/-/is-object-1.0.1.tgz", @@ -2517,12 +2389,6 @@ "has": "^1.0.1" } }, - "is-resolvable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-resolvable/-/is-resolvable-1.1.0.tgz", - "integrity": "sha512-qgDYXFSR5WvEfuS5dMj6oTMEbrrSaM0CrFk2Yiq/gXnBvD9pMa2jGXxyhGLfvhZpuMZe18CJpFxAt3CRs42NMg==", - "dev": true - }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -2537,41 +2403,32 @@ "has-symbols": "^1.0.0" } }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" - }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" }, - "isemail": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/isemail/-/isemail-3.2.0.tgz", - "integrity": "sha512-zKqkK+O+dGqevc93KNsbZ/TqTUFd46MwWjYOoMrjIMZ51eU7DtQG3Wmd9SQQT7i7RVnuTPEiYEWHU3MSbxC1Tg==", - "requires": { - "punycode": "2.x.x" - } - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", "dev": true }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" - }, "istanbul-lib-coverage": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", "integrity": "sha512-8aXznuEPCJvGnMSRft4udDRDtb1V3pkQkMMI5LI+6HuQz5oQ4J2UFn1H82raA3qJtyOLkkwVqICBQkjnGtn5mA==", "dev": true }, + "istanbul-lib-hook": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-2.0.7.tgz", + "integrity": "sha512-vrRztU9VRRFDyC+aklfLoeXyNdTfga2EI3udDGn4cZ6fpSXpHLV9X6CHvfoMCPtggg8zvDDmC4b9xfu0z6/llA==", + "dev": true, + "requires": { + "append-transform": "^1.0.0" + } + }, "istanbul-lib-instrument": { "version": "3.3.0", "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-3.3.0.tgz", @@ -2588,23 +2445,103 @@ }, "dependencies": { "semver": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.2.0.tgz", - "integrity": "sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==", + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "istanbul-lib-report": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-2.0.8.tgz", + "integrity": "sha512-fHBeG573EIihhAblwgxrSenp0Dby6tJMFR/HvlerBsrCTD5bkUuoNtn3gVh29ZCS824cGGBPn7Sg7cNk+2xUsQ==", + "dev": true, + "requires": { + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "supports-color": "^6.1.0" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "supports-color": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.1.0.tgz", + "integrity": "sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "istanbul-lib-source-maps": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-3.0.6.tgz", + "integrity": "sha512-R47KzMtDJH6X4/YW9XTx+jrLnZnscW4VpNN+1PViSYTejLVPWv7oov+Duf8YQSPyVRUvueQqz1TcsC6mooZTXw==", + "dev": true, + "requires": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^2.0.5", + "make-dir": "^2.1.0", + "rimraf": "^2.6.3", + "source-map": "^0.6.1" + }, + "dependencies": { + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "dev": true, + "requires": { + "pify": "^4.0.1", + "semver": "^5.6.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true } } }, - "joi": { - "version": "14.3.1", - "resolved": "https://registry.npmjs.org/joi/-/joi-14.3.1.tgz", - "integrity": "sha512-LQDdM+pkOrpAn4Lp+neNIFV3axv1Vna3j38bisbQhETPMANYRbFJFUyOZcOClYvM/hppMhGWuKSFEK9vjrB+bQ==", + "istanbul-reports": { + "version": "2.2.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-2.2.6.tgz", + "integrity": "sha512-SKi4rnMyLBKe0Jy2uUdx28h8oG7ph2PPuQPvIAh31d+Ci+lSiEu4C+h3oBPuJ9+mPKhOyW0M8gY4U5NM1WLeXA==", + "dev": true, "requires": { - "hoek": "6.x.x", - "isemail": "3.x.x", - "topo": "3.x.x" + "handlebars": "^4.1.2" } }, + "jquery": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.4.1.tgz", + "integrity": "sha512-36+AdBzCL+y6qjw5Tx7HgzeGCzC81MDDgaUP8ld2zhx58HdqXGoBd+tHdrBMiyjGQs0Hxs/MLZTu/eHNJJuWPw==", + "dev": true + }, "js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", @@ -2621,11 +2558,6 @@ "esprima": "^4.0.0" } }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" - }, "jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", @@ -2638,15 +2570,11 @@ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", "dev": true }, - "json-schema": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", - "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" - }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true }, "json-stable-stringify-without-jsonify": { "version": "1.0.1", @@ -2654,11 +2582,6 @@ "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", "dev": true }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" - }, "jsonfile": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", @@ -2674,41 +2597,6 @@ "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", "dev": true }, - "jsonwebtoken": { - "version": "8.5.1", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.1.tgz", - "integrity": "sha512-XjwVfRS6jTMsqYs0EsuJ4LGxXV14zQybNd4L2r0UvbVnSF9Af8x7p5MzbJ90Ioz/9TI41/hTCvznF/loiSzn8w==", - "requires": { - "jws": "^3.2.2", - "lodash.includes": "^4.3.0", - "lodash.isboolean": "^3.0.3", - "lodash.isinteger": "^4.0.4", - "lodash.isnumber": "^3.0.3", - "lodash.isplainobject": "^4.0.6", - "lodash.isstring": "^4.0.1", - "lodash.once": "^4.0.0", - "ms": "^2.1.1", - "semver": "^5.6.0" - }, - "dependencies": { - "semver": { - "version": "5.7.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.0.tgz", - "integrity": "sha512-Ya52jSX2u7QKghxeoFGpLwCtGlt7j0oY9DYb5apt9nPlJ42ID+ulTXESnt/qAQcoSERyZ5sl3LDIOw0nAn/5DA==" - } - } - }, - "jsprim": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", - "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.2.3", - "verror": "1.10.0" - } - }, "jsx-ast-utils": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/jsx-ast-utils/-/jsx-ast-utils-2.2.1.tgz", @@ -2724,25 +2612,6 @@ "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.0.2.tgz", "integrity": "sha512-FrLwOgm+iXrPV+5zDU6Jqu4gCRXbWEQg2O3SKONsWE4w7AXFRkryS53bpWdaL9cNol+AmR3AEYz6kn+o0fCPnw==" }, - "jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "requires": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "requires": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, "kuler": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/kuler/-/kuler-1.0.1.tgz", @@ -2770,24 +2639,32 @@ } }, "load-json-file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", - "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", + "parse-json": "^4.0.0", + "pify": "^3.0.0", "strip-bom": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, "locate-path": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", - "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", "dev": true, "requires": { - "p-locate": "^2.0.0", + "p-locate": "^3.0.0", "path-exists": "^3.0.0" } }, @@ -2806,50 +2683,10 @@ "resolved": "https://registry.npmjs.org/lodash.clone/-/lodash.clone-4.5.0.tgz", "integrity": "sha1-GVhwRQ9aExkkeN9Lw9I9LeoZB7Y=" }, - "lodash.includes": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", - "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" - }, - "lodash.isboolean": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", - "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" - }, - "lodash.isinteger": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", - "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" - }, - "lodash.isnumber": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", - "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" - }, - "lodash.isplainobject": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", - "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" - }, - "lodash.isstring": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", - "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" - }, - "lodash.once": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", - "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" - }, - "lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=" - }, - "lodash.unescape": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lodash.unescape/-/lodash.unescape-4.0.1.tgz", - "integrity": "sha1-vyJJiGzlFM2hEvrpIYzcBlIR/Jw=", + "lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha1-+wMJF/hqMTTlvJvsDWngAT3f7bI=", "dev": true }, "logform": { @@ -2865,9 +2702,9 @@ } }, "lolex": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.1.0.tgz", - "integrity": "sha512-BYxIEXiVq5lGIXeVHnsFzqa1TxN5acnKnPCdlZSpzm8viNEOhiigupA4vTQ9HEFQ6nLTQ9wQOgBknJgzUYQ9Aw==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/lolex/-/lolex-4.2.0.tgz", + "integrity": "sha512-gKO5uExCXvSm6zbF562EvM+rd1kQDnB9AZBbiQVzf1ZmdDpxUSvpnAaVOP83N/31mRK8Ml8/VE8DMvsAZQ+7wg==" }, "long": { "version": "4.0.0", @@ -2893,6 +2730,12 @@ "yallist": "^2.1.2" } }, + "lunr": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.6.tgz", + "integrity": "sha512-swStvEyDqQ85MGpABCMBclZcLI/pBIlu8FFDtmX197+oEgKloJ67QnB+Tidh0340HmLMs39c4GrkPY3cmkXp6Q==", + "dev": true + }, "make-error": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz", @@ -2900,9 +2743,9 @@ "dev": true }, "marked": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/marked/-/marked-0.4.0.tgz", - "integrity": "sha512-tMsdNBgOsrUophCAFQl0XPe6Zqk/uy9gnue+jIIKhykO51hxyu6uNx7zBPy0+y/WKYVZZMspV9YeXLNdKk+iYw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-0.7.0.tgz", + "integrity": "sha512-c+yYdCZJQrsRjTPhUx7VKkApw9bwDkNbHUKo1ovgcfDjb2kc8rLuRbIFyXL5WOEUwzSSKo3IXpph2K6DqB/KZg==", "dev": true }, "merge-descriptors": { @@ -2911,17 +2754,21 @@ "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", "dev": true }, - "mime-db": { - "version": "1.40.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.40.0.tgz", - "integrity": "sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA==" - }, - "mime-types": { - "version": "2.1.24", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.24.tgz", - "integrity": "sha512-WaFHS3MCl5fapm3oLxU4eYDw77IQM2ACcxQ9RIxfaC3ooc6PFuBMGZZsYpvoXS5D5QTWPieo1jjLdAm3TBP3cQ==", + "merge-source-map": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/merge-source-map/-/merge-source-map-1.1.0.tgz", + "integrity": "sha512-Qkcp7P2ygktpMPh2mCQZaf3jhN6D3Z/qVZHSdWvQ+2Ef5HgRAPBO57A77+ENm0CPx2+1Ce/MYKi3ymqdfuqibw==", + "dev": true, "requires": { - "mime-db": "1.40.0" + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } } }, "mimic-fn": { @@ -2934,6 +2781,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, "requires": { "brace-expansion": "^1.1.7" } @@ -2976,11 +2824,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, - "mustache": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/mustache/-/mustache-3.0.1.tgz", - "integrity": "sha512-jFI/4UVRsRYdUbuDTKT7KzfOp7FiD5WzYmmwNwXyUVypC0xjoTL78Fqc0jHUPIvvGD+6DQSPHIt1NE7D1ArsqA==" - }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -3004,6 +2847,12 @@ "integrity": "sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw==", "dev": true }, + "nested-error-stacks": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.0.1.tgz", + "integrity": "sha512-SrQrok4CATudVzBS7coSz26QRSmlK9TzzoFbeKfcPBUFPjcQM9Rqvr/DlJkOrwI/0KcgvMub1n1g5Jt9EgRn4A==", + "dev": true + }, "nice-try": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", @@ -3011,26 +2860,17 @@ "dev": true }, "nise": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.0.tgz", - "integrity": "sha512-Z3sfYEkLFzFmL8KY6xnSJLRxwQwYBjOXi/24lb62ZnZiGA0JUzGGTI6TBIgfCSMIDl9Jlu8SRmHNACLTemDHww==", + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/nise/-/nise-1.5.2.tgz", + "integrity": "sha512-/6RhOUlicRCbE9s+94qCUsyE+pKlVJ5AhIv+jEE7ESKwnbXqulKZ1FYU+XAtHHWE9TinYvAxDUJAb912PwPoWA==", "requires": { - "@sinonjs/formatio": "^3.1.0", + "@sinonjs/formatio": "^3.2.1", "@sinonjs/text-encoding": "^0.7.1", "just-extend": "^4.0.2", "lolex": "^4.1.0", "path-to-regexp": "^1.7.0" } }, - "node-rdkafka": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-rdkafka/-/node-rdkafka-2.6.1.tgz", - "integrity": "sha512-mBRq7/7hgnRmbfX8TLPK0JVQYxu/kkuHVT4W7vLXc6wQoV5JfInpV0hWtkGIBjNzFyYSk0faJDIqlDQ2k9vy9Q==", - "requires": { - "bindings": "^1.3.1", - "nan": "^2.11.1" - } - }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -3049,1044 +2889,134 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "nyc": { - "version": "13.3.0", - "resolved": "https://registry.npmjs.org/nyc/-/nyc-13.3.0.tgz", - "integrity": "sha512-P+FwIuro2aFG6B0Esd9ZDWUd51uZrAEoGutqZxzrVmYl3qSfkLgcQpBPBjtDFsUQLFY1dvTQJPOyeqr8S9GF8w==", + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-14.1.1.tgz", + "integrity": "sha512-OI0vm6ZGUnoGZv/tLdZ2esSVzDwUC88SNs+6JoSOMVxA+gKMB8Tk7jBwgemLx4O40lhhvZCVw1C+OYLOBOPXWw==", "dev": true, "requires": { "archy": "^1.0.0", - "arrify": "^1.0.1", - "caching-transform": "^3.0.1", + "caching-transform": "^3.0.2", "convert-source-map": "^1.6.0", - "find-cache-dir": "^2.0.0", + "cp-file": "^6.2.0", + "find-cache-dir": "^2.1.0", "find-up": "^3.0.0", "foreground-child": "^1.5.6", "glob": "^7.1.3", - "istanbul-lib-coverage": "^2.0.3", - "istanbul-lib-hook": "^2.0.3", - "istanbul-lib-instrument": "^3.1.0", - "istanbul-lib-report": "^2.0.4", - "istanbul-lib-source-maps": "^3.0.2", - "istanbul-reports": "^2.1.1", - "make-dir": "^1.3.0", + "istanbul-lib-coverage": "^2.0.5", + "istanbul-lib-hook": "^2.0.7", + "istanbul-lib-instrument": "^3.3.0", + "istanbul-lib-report": "^2.0.8", + "istanbul-lib-source-maps": "^3.0.6", + "istanbul-reports": "^2.2.4", + "js-yaml": "^3.13.1", + "make-dir": "^2.1.0", "merge-source-map": "^1.1.0", "resolve-from": "^4.0.0", "rimraf": "^2.6.3", "signal-exit": "^3.0.2", "spawn-wrap": "^1.4.2", - "test-exclude": "^5.1.0", + "test-exclude": "^5.2.3", "uuid": "^3.3.2", - "yargs": "^12.0.5", - "yargs-parser": "^11.1.1" + "yargs": "^13.2.2", + "yargs-parser": "^13.0.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "bundled": true, + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, - "append-transform": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "default-require-extensions": "^2.0.0" - } - }, - "archy": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "arrify": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "async": { - "version": "2.6.2", - "bundled": true, - "dev": true, - "requires": { - "lodash": "^4.17.11" - } - }, - "balanced-match": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "bundled": true, - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "caching-transform": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "hasha": "^3.0.0", - "make-dir": "^1.3.0", - "package-hash": "^3.0.0", - "write-file-atomic": "^2.3.0" - } - }, - "camelcase": { - "version": "5.0.0", - "bundled": true, - "dev": true - }, - "cliui": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "code-point-at": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "commander": { - "version": "2.17.1", - "bundled": true, - "dev": true, - "optional": true - }, - "commondir": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "bundled": true, - "dev": true - }, - "convert-source-map": { - "version": "1.6.0", - "bundled": true, - "dev": true, - "requires": { - "safe-buffer": "~5.1.1" - } - }, - "cross-spawn": { - "version": "4.0.2", - "bundled": true, - "dev": true, - "requires": { - "lru-cache": "^4.0.1", - "which": "^1.2.9" - } - }, - "debug": { - "version": "4.1.1", - "bundled": true, - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "decamelize": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "default-require-extensions": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "strip-bom": "^3.0.0" - } - }, - "end-of-stream": { - "version": "1.4.1", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "error-ex": { - "version": "1.3.2", - "bundled": true, - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-error": { - "version": "4.1.1", - "bundled": true, - "dev": true - }, - "execa": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "dependencies": { - "cross-spawn": { - "version": "6.0.5", - "bundled": true, - "dev": true, - "requires": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - } - } - } - }, - "find-cache-dir": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "commondir": "^1.0.1", - "make-dir": "^1.0.0", - "pkg-dir": "^3.0.0" - } - }, - "find-up": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "locate-path": "^3.0.0" - } - }, - "foreground-child": { - "version": "1.5.6", - "bundled": true, - "dev": true, - "requires": { - "cross-spawn": "^4", - "signal-exit": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "get-caller-file": { - "version": "1.0.3", - "bundled": true, - "dev": true - }, - "get-stream": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "pump": "^3.0.0" - } - }, - "glob": { - "version": "7.1.3", - "bundled": true, - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "graceful-fs": { - "version": "4.1.15", - "bundled": true, - "dev": true - }, - "handlebars": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "async": "^2.5.0", - "optimist": "^0.6.1", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "has-flag": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "hasha": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "is-stream": "^1.0.1" - } - }, - "hosted-git-info": { - "version": "2.7.1", - "bundled": true, - "dev": true - }, - "imurmurhash": { - "version": "0.1.4", - "bundled": true, - "dev": true - }, - "inflight": { - "version": "1.0.6", - "bundled": true, - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "invert-kv": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-arrayish": { - "version": "0.2.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "is-stream": { - "version": "1.1.0", - "bundled": true, - "dev": true - }, - "isexe": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "istanbul-lib-coverage": { - "version": "2.0.3", - "bundled": true, - "dev": true - }, - "istanbul-lib-hook": { - "version": "2.0.3", - "bundled": true, - "dev": true, - "requires": { - "append-transform": "^1.0.0" - } - }, - "istanbul-lib-report": { - "version": "2.0.4", - "bundled": true, - "dev": true, - "requires": { - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", - "supports-color": "^6.0.0" - }, - "dependencies": { - "supports-color": { - "version": "6.1.0", - "bundled": true, - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - } - } - }, - "istanbul-lib-source-maps": { - "version": "3.0.2", - "bundled": true, - "dev": true, - "requires": { - "debug": "^4.1.1", - "istanbul-lib-coverage": "^2.0.3", - "make-dir": "^1.3.0", - "rimraf": "^2.6.2", - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "istanbul-reports": { - "version": "2.1.1", - "bundled": true, - "dev": true, - "requires": { - "handlebars": "^4.1.0" - } - }, - "json-parse-better-errors": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "lcid": { - "version": "2.0.0", - "bundled": true, - "dev": true, - "requires": { - "invert-kv": "^2.0.0" - } - }, - "load-json-file": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "locate-path": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - } - }, - "lodash": { - "version": "4.17.11", - "bundled": true, - "dev": true - }, - "lodash.flattendeep": { - "version": "4.4.0", - "bundled": true, - "dev": true - }, - "lru-cache": { - "version": "4.1.5", - "bundled": true, - "dev": true, - "requires": { - "pseudomap": "^1.0.2", - "yallist": "^2.1.2" - } - }, - "make-dir": { - "version": "1.3.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "map-age-cleaner": { - "version": "0.1.3", - "bundled": true, - "dev": true, - "requires": { - "p-defer": "^1.0.0" - } - }, - "mem": { - "version": "4.1.0", - "bundled": true, - "dev": true, - "requires": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^1.0.0", - "p-is-promise": "^2.0.0" - } - }, - "merge-source-map": { - "version": "1.1.0", - "bundled": true, - "dev": true, - "requires": { - "source-map": "^0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true - } - } - }, - "mimic-fn": { - "version": "1.2.0", - "bundled": true, - "dev": true - }, - "minimatch": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "0.0.10", - "bundled": true, - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "0.0.8" - }, - "dependencies": { - "minimist": { - "version": "0.0.8", - "bundled": true, - "dev": true - } - } - }, - "ms": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "nice-try": { - "version": "1.0.5", - "bundled": true, - "dev": true - }, - "normalize-package-data": { - "version": "2.5.0", - "bundled": true, - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "npm-run-path": { - "version": "2.0.2", - "bundled": true, - "dev": true, - "requires": { - "path-key": "^2.0.0" - } - }, - "number-is-nan": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "once": { - "version": "1.4.0", - "bundled": true, - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "optimist": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "requires": { - "minimist": "~0.0.1", - "wordwrap": "~0.0.2" - } - }, - "os-homedir": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "os-locale": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - } - }, - "p-defer": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-finally": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "p-is-promise": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "p-limit": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "p-try": "^2.0.0" - } - }, - "p-locate": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "p-limit": "^2.0.0" - } - }, - "p-try": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "package-hash": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "graceful-fs": "^4.1.15", - "hasha": "^3.0.0", - "lodash.flattendeep": "^4.4.0", - "release-zalgo": "^1.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" - } - }, - "path-exists": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "path-is-absolute": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "path-key": { - "version": "2.0.1", - "bundled": true, - "dev": true - }, - "path-parse": { - "version": "1.0.6", - "bundled": true, - "dev": true - }, - "path-type": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "pify": "^3.0.0" - } - }, - "pify": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "pkg-dir": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^3.0.0" - } - }, - "pseudomap": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "pump": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "read-pkg": { - "version": "3.0.0", - "bundled": true, - "dev": true, - "requires": { - "load-json-file": "^4.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^3.0.0" - } - }, - "read-pkg-up": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "find-up": "^3.0.0", - "read-pkg": "^3.0.0" - } - }, - "release-zalgo": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "es6-error": "^4.0.1" - } - }, - "require-directory": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "require-main-filename": { - "version": "1.0.1", - "bundled": true, - "dev": true - }, - "resolve": { - "version": "1.10.0", - "bundled": true, - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } - }, - "resolve-from": { - "version": "4.0.0", - "bundled": true, - "dev": true - }, - "rimraf": { - "version": "2.6.3", - "bundled": true, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", "dev": true, "requires": { - "glob": "^7.1.3" + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" } }, - "safe-buffer": { - "version": "5.1.2", - "bundled": true, - "dev": true - }, - "semver": { - "version": "5.6.0", - "bundled": true, - "dev": true - }, - "set-blocking": { + "is-fullwidth-code-point": { "version": "2.0.0", - "bundled": true, - "dev": true - }, - "shebang-command": { - "version": "1.2.0", - "bundled": true, - "dev": true, - "requires": { - "shebang-regex": "^1.0.0" - } - }, - "shebang-regex": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "signal-exit": { - "version": "3.0.2", - "bundled": true, - "dev": true - }, - "spawn-wrap": { - "version": "1.4.2", - "bundled": true, - "dev": true, - "requires": { - "foreground-child": "^1.5.6", - "mkdirp": "^0.5.0", - "os-homedir": "^1.0.1", - "rimraf": "^2.6.2", - "signal-exit": "^3.0.2", - "which": "^1.3.0" - } - }, - "spdx-correct": { - "version": "3.1.0", - "bundled": true, - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.2.0", - "bundled": true, + "resolved": false, + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", "dev": true }, - "spdx-expression-parse": { - "version": "3.0.0", - "bundled": true, + "make-dir": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", + "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" + "pify": "^4.0.1", + "semver": "^5.6.0" } }, - "spdx-license-ids": { - "version": "3.0.3", - "bundled": true, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true }, "string-width": { - "version": "2.1.1", - "bundled": true, + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "4.0.0", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^3.0.0" - } - }, - "strip-bom": { - "version": "3.0.0", - "bundled": true, - "dev": true - }, - "strip-eof": { - "version": "1.0.0", - "bundled": true, - "dev": true - }, - "test-exclude": { - "version": "5.1.0", - "bundled": true, - "dev": true, - "requires": { - "arrify": "^1.0.1", - "minimatch": "^3.0.4", - "read-pkg-up": "^4.0.0", - "require-main-filename": "^1.0.1" - } - }, - "uglify-js": { - "version": "3.4.9", - "bundled": true, - "dev": true, - "optional": true, - "requires": { - "commander": "~2.17.1", - "source-map": "~0.6.1" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "bundled": true, - "dev": true, - "optional": true - } - } - }, - "uuid": { - "version": "3.3.2", - "bundled": true, - "dev": true - }, - "validate-npm-package-license": { - "version": "3.0.4", - "bundled": true, - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "which": { - "version": "1.3.1", - "bundled": true, + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "isexe": "^2.0.0" + "ansi-regex": "^4.1.0" } }, - "which-module": { - "version": "2.0.0", - "bundled": true, - "dev": true - }, - "wordwrap": { - "version": "0.0.3", - "bundled": true, - "dev": true - }, "wrap-ansi": { - "version": "2.1.0", - "bundled": true, - "dev": true, - "requires": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "2.1.1", - "bundled": true, - "dev": true - }, - "is-fullwidth-code-point": { - "version": "1.0.0", - "bundled": true, - "dev": true, - "requires": { - "number-is-nan": "^1.0.0" - } - }, - "string-width": { - "version": "1.0.2", - "bundled": true, - "dev": true, - "requires": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - } - }, - "strip-ansi": { - "version": "3.0.1", - "bundled": true, - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - } - } - }, - "wrappy": { - "version": "1.0.2", - "bundled": true, - "dev": true - }, - "write-file-atomic": { - "version": "2.4.2", - "bundled": true, + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", "dev": true, "requires": { - "graceful-fs": "^4.1.11", - "imurmurhash": "^0.1.4", - "signal-exit": "^3.0.2" + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" } }, "y18n": { "version": "4.0.0", - "bundled": true, - "dev": true - }, - "yallist": { - "version": "2.1.2", - "bundled": true, + "resolved": false, + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", "dev": true }, "yargs": { - "version": "12.0.5", - "bundled": true, + "version": "13.3.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.0.tgz", + "integrity": "sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA==", "dev": true, "requires": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", + "cliui": "^5.0.0", "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", + "get-caller-file": "^2.0.1", "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", + "require-main-filename": "^2.0.0", "set-blocking": "^2.0.0", - "string-width": "^2.0.0", + "string-width": "^3.0.0", "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "yargs-parser": { - "version": "11.1.1", - "bundled": true, - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" + "y18n": "^4.0.0", + "yargs-parser": "^13.1.1" } } } }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" - }, "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -4125,15 +3055,47 @@ } } }, - "oer-utils": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/oer-utils/-/oer-utils-1.3.4.tgz", - "integrity": "sha1-sqmtvJK8GRVaKgDwRWg9Hm1KyCM=" + "object.entries": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.0.tgz", + "integrity": "sha512-l+H6EQ8qzGRxbkHOd5I/aHRhHDKoQXQ8g0BYt4uSweQU1/J6dZUOyWh9a2Vky35YCKjzmgxOzta2hH6kf9HuXA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "object.fromentries": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.0.tgz", + "integrity": "sha512-9iLiI6H083uiqUuvzyY6qrlmc/Gz8hLQFOcb/Ri/0xXFkSNS3ctV+CbE6yM2+AnkYfOB3dGjdzC0wrMLIhQICA==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "es-abstract": "^1.11.0", + "function-bind": "^1.1.1", + "has": "^1.0.1" + } + }, + "object.values": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.0.tgz", + "integrity": "sha512-8mf0nKLAoFX6VlNVdhGj31SVYpaNFtUnuoOXWyFEstsWRgU837AK+JYM0iAxwkSzGRbwn8cbFmgbyxj1j4VbXg==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.12.0", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } }, "once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, "requires": { "wrappy": "1" } @@ -4195,6 +3157,12 @@ "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=", + "dev": true + }, "os-locale": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", @@ -4216,36 +3184,58 @@ "dev": true }, "p-limit": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", - "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz", + "integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==", "dev": true, "requires": { - "p-try": "^1.0.0" + "p-try": "^2.0.0" } }, "p-locate": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", - "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", "dev": true, "requires": { - "p-limit": "^1.1.0" + "p-limit": "^2.0.0" } }, "p-try": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", - "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", "dev": true }, + "package-hash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", + "integrity": "sha512-lOtmukMDVvtkL84rJHI7dpTYq+0rli8N2wlnqUcBuDWCfVhRUfOmnR9SsoHFMLpACvEV60dX7rd0rFaYDZI+FA==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.15", + "hasha": "^3.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", "dev": true, "requires": { - "error-ex": "^1.2.0" + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" } }, "parse-ms": { @@ -4268,12 +3258,7 @@ "path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "path-is-inside": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", - "integrity": "sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM=", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "dev": true }, "path-key": { @@ -4304,62 +3289,50 @@ } }, "path-type": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", - "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", "dev": true, "requires": { - "pify": "^2.0.0" + "pify": "^3.0.0" + }, + "dependencies": { + "pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", + "dev": true + } } }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" - }, "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", "dev": true }, "pkg-conf": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", - "integrity": "sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-3.1.0.tgz", + "integrity": "sha512-m0OTbR/5VPNPqO1ph6Fqbj7Hv6QU7gR/tQW40ZqrL1rjgCU85W6C1bJn0BItuJqnR98PWzw7Z8hHeChD1WrgdQ==", "dev": true, "requires": { - "find-up": "^2.0.0", - "load-json-file": "^4.0.0" + "find-up": "^3.0.0", + "load-json-file": "^5.2.0" }, "dependencies": { "load-json-file": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", - "integrity": "sha1-L19Fq5HjMhYjT9U62rZo607AmTs=", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-5.3.0.tgz", + "integrity": "sha512-cJGP40Jc/VXUsp8/OrnyKyTZ1y6v/dphm3bioS+RrKXjK2BB6wHUd6JptZEFDGgGahMT+InnZO5i1Ei9mpC8Bw==", "dev": true, "requires": { - "graceful-fs": "^4.1.2", + "graceful-fs": "^4.1.15", "parse-json": "^4.0.0", - "pify": "^3.0.0", - "strip-bom": "^3.0.0" - } - }, - "parse-json": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", - "integrity": "sha1-vjX1Qlvh9/bHRxhPmKeIy5lHfuA=", - "dev": true, - "requires": { - "error-ex": "^1.3.1", - "json-parse-better-errors": "^1.0.1" + "pify": "^4.0.1", + "strip-bom": "^3.0.0", + "type-fest": "^0.3.0" } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true } } }, @@ -4383,12 +3356,12 @@ } }, "pkg-dir": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", - "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", + "integrity": "sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==", "dev": true, "requires": { - "find-up": "^2.1.0" + "find-up": "^3.0.0" } }, "plur": { @@ -4397,12 +3370,6 @@ "integrity": "sha1-24XGgU9eXlo7Se/CjWBP7GKXUVY=", "dev": true }, - "pluralize": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-7.0.0.tgz", - "integrity": "sha512-ARhBOdzS3e41FbkW/XWrTEtukqqLoK5+Z/4UeDaLuSW+39JPeFgs4gCGqsrJHVZX0fUrx//4OF0K1CUGwlIFow==", - "dev": true - }, "pre-commit": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", @@ -4481,9 +3448,9 @@ } }, "proxyquire": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.1.tgz", - "integrity": "sha512-LXZGUxkFTZzPHKBmL3CMYtYIEKuz6XiR3DZ3FZ1wYP7ueXbz2NW+9AdigNzeLIf8vmuhVCwG2F5BvonXK5LhHA==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/proxyquire/-/proxyquire-2.1.3.tgz", + "integrity": "sha512-BQWfCqYM+QINd+yawJz23tbBM40VIGXOdDw3X344KcclI/gtBbdWF6SlQ4nK/bYhF9d27KYug9WzljHC6B9Ysg==", "dev": true, "requires": { "fill-keys": "^1.0.2", @@ -4497,51 +3464,17 @@ "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=", "dev": true }, - "psl": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.3.0.tgz", - "integrity": "sha512-avHdspHO+9rQTLbv1RO+MPYeP/SzsCoxofjVnHanETfQhTJrmB0HlDoW+EiN/R+C0BZ+gERab9NY0lPN2TxNag==" - }, "punycode": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" - }, - "qs": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", - "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true }, "random-poly-fill": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/random-poly-fill/-/random-poly-fill-1.0.1.tgz", "integrity": "sha512-bMOL0hLfrNs52+EHtIPIXxn2PxYwXb0qjnKruTjXiM/sKfYqj506aB2plFwWW1HN+ri724bAVVGparh4AtlJKw==" }, - "raw-body": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", - "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", - "requires": { - "bytes": "3.1.0", - "http-errors": "1.7.3", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "dependencies": { - "http-errors": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", - "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - } - } - } - }, "rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -4560,30 +3493,30 @@ "dev": true }, "react-is": { - "version": "16.8.6", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.8.6.tgz", - "integrity": "sha512-aUk3bHfZ2bRSVFFbbeVS4i+lNPZr3/WM5jT2J5omUVV1zzcs1nAaf3l51ctA5FFvCRbhrH0bdAsRRQddFJZPtA==", + "version": "16.9.0", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz", + "integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw==", "dev": true }, "read-pkg": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", - "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha1-nLxoaXj+5l0WwA4rGcI3/Pbjg4k=", "dev": true, "requires": { - "load-json-file": "^2.0.0", + "load-json-file": "^4.0.0", "normalize-package-data": "^2.3.2", - "path-type": "^2.0.0" + "path-type": "^3.0.0" } }, "read-pkg-up": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", - "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-4.0.0.tgz", + "integrity": "sha512-6etQSH7nJGsK0RbG/2TeDzZFa8shjQ1um+SwQQ5cwKy0dhSXdOncEhb1CPpvQG4h7FyOV6EB6YlV0yJvZQNAkA==", "dev": true, "requires": { - "find-up": "^2.0.0", - "read-pkg": "^2.0.0" + "find-up": "^3.0.0", + "read-pkg": "^3.0.0" } }, "readable-stream": { @@ -4611,66 +3544,32 @@ "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", "dev": true }, + "release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha1-CXALflB0Mpc5Mw5TXFqQ+2eFFzA=", + "dev": true, + "requires": { + "es6-error": "^4.0.1" + } + }, "repeat-string": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", "dev": true }, - "request": { - "version": "2.88.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", - "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.0", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.4.3", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "request-promise-core": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", - "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", - "requires": { - "lodash": "^4.17.11" - } - }, - "request-promise-native": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", - "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", - "requires": { - "request-promise-core": "1.1.2", - "stealthy-require": "^1.1.1", - "tough-cookie": "^2.3.3" - } + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, - "require-uncached": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/require-uncached/-/require-uncached-1.0.3.tgz", - "integrity": "sha1-Tg1W1slmL9MeQwEcS5WqSZVUIdM=", - "dev": true, - "requires": { - "caller-path": "^0.1.0", - "resolve-from": "^1.0.0" - } + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true }, "resolve": { "version": "1.11.1", @@ -4682,9 +3581,9 @@ } }, "resolve-from": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-1.0.1.tgz", - "integrity": "sha1-Jsv+k10a7uq7Kbw/5a6wHpPUQiY=", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true }, "restore-cursor": { @@ -4731,12 +3630,12 @@ "dev": true }, "rxjs": { - "version": "5.5.12", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.5.12.tgz", - "integrity": "sha512-xx2itnL5sBbqeeiVgNPVuQQ1nC8Jp2WfNJhXWHmElW9YmrpS9UVnNzhP3EH3HFqexO5Tlp8GhYY+WEcqcVMvGw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.5.3.tgz", + "integrity": "sha512-wuYsAYYFdWTAnAaPoKGNhfpWwKZbJW+HgAJ+mImp+Epl7BG8oNWBCTyRM8gba9k4lk8BgWdoYm21Mo/RYhhbgA==", "dev": true, "requires": { - "symbol-observable": "1.0.1" + "tslib": "^1.9.0" } }, "safe-buffer": { @@ -4747,7 +3646,8 @@ "safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true }, "semver": { "version": "5.5.0", @@ -4755,10 +3655,19 @@ "integrity": "sha512-4SJ3dm0WAwWy/NVeioZh5AntkdJoWKxHxcmyP622fOkgHa4z3R0TdBJICINyaSDE6uNwVc8gZr+ZinwZAH4xIA==", "dev": true }, - "setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==" + "serialize-error": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-4.1.0.tgz", + "integrity": "sha512-5j9GgyGsP9vV9Uj1S0lDCvlsd+gc2LEPVK7HHHte7IyPwOD4lVQFeaX143gx3U5AnoCi+wbcb3mvaxVysjpxEw==", + "requires": { + "type-fest": "^0.3.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true }, "shebang-command": { "version": "1.2.0", @@ -4801,25 +3710,27 @@ } }, "sinon": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.3.2.tgz", - "integrity": "sha512-thErC1z64BeyGiPvF8aoSg0LEnptSaWE7YhdWWbWXgelOyThent7uKOnnEh9zBxDbKixtr5dEko+ws1sZMuFMA==", + "version": "7.4.2", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-7.4.2.tgz", + "integrity": "sha512-pY5RY99DKelU3pjNxcWo6XqeB1S118GBcVIIdDi6V+h6hevn1izcg2xv1hTHW/sViRXU7sUOxt4wTUJ3gsW2CQ==", "requires": { "@sinonjs/commons": "^1.4.0", "@sinonjs/formatio": "^3.2.1", - "@sinonjs/samsam": "^3.3.1", + "@sinonjs/samsam": "^3.3.3", "diff": "^3.5.0", - "lolex": "^4.0.1", - "nise": "^1.4.10", + "lolex": "^4.2.0", + "nise": "^1.5.2", "supports-color": "^5.5.0" } }, "slice-ansi": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-1.0.0.tgz", - "integrity": "sha512-POqxBK6Lb3q6s047D/XsDVNPnF9Dl8JSaqe9h9lURl0OdNqy/ujDrOiIHtsqXMGbWWTIomRzAMaTyawAU//Reg==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", "dev": true, "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", "is-fullwidth-code-point": "^2.0.0" }, "dependencies": { @@ -4838,9 +3749,9 @@ "dev": true }, "source-map-support": { - "version": "0.5.12", - "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.12.tgz", - "integrity": "sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ==", + "version": "0.5.13", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", + "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", "dev": true, "requires": { "buffer-from": "^1.0.0", @@ -4865,6 +3776,31 @@ "os-shim": "^0.1.2" } }, + "spawn-wrap": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-1.4.3.tgz", + "integrity": "sha512-IgB8md0QW/+tWqcavuFgKYR/qIRvJkRLPJDFaoXtLLUaVcCDK0+HeFTkmQHj3eprcYhc+gOl0aEA1w7qZlYezw==", + "dev": true, + "requires": { + "foreground-child": "^1.5.6", + "mkdirp": "^0.5.0", + "os-homedir": "^1.0.1", + "rimraf": "^2.6.2", + "signal-exit": "^3.0.2", + "which": "^1.3.0" + }, + "dependencies": { + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "spdx-correct": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.0.tgz", @@ -4918,66 +3854,40 @@ "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", "dev": true }, - "sshpk": { - "version": "1.16.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", - "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, "stack-trace": { "version": "0.0.10", "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" }, "standard": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/standard/-/standard-12.0.1.tgz", - "integrity": "sha512-UqdHjh87OG2gUrNCSM4QRLF5n9h3TFPwrCNyVlkqu31Hej0L/rc8hzKqVvkb2W3x0WMq7PzZdkLfEcBhVOR6lg==", - "dev": true, - "requires": { - "eslint": "~5.4.0", - "eslint-config-standard": "12.0.0", - "eslint-config-standard-jsx": "6.0.2", - "eslint-plugin-import": "~2.14.0", - "eslint-plugin-node": "~7.0.1", - "eslint-plugin-promise": "~4.0.0", - "eslint-plugin-react": "~7.11.1", + "version": "14.3.0", + "resolved": "https://registry.npmjs.org/standard/-/standard-14.3.0.tgz", + "integrity": "sha512-F3Su3IAxDrOW+v4O/WiPFp6SZ0FWj+H4NEtGrEI1iaCf5LWD0nIfcXh0GIyKQgpmswQFWBIAvgONihT8U5UM4w==", + "dev": true, + "requires": { + "eslint": "~6.4.0", + "eslint-config-standard": "14.1.0", + "eslint-config-standard-jsx": "8.1.0", + "eslint-plugin-import": "~2.18.0", + "eslint-plugin-node": "~10.0.0", + "eslint-plugin-promise": "~4.2.1", + "eslint-plugin-react": "~7.14.2", "eslint-plugin-standard": "~4.0.0", - "standard-engine": "~9.0.0" + "standard-engine": "^12.0.0" } }, "standard-engine": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-9.0.0.tgz", - "integrity": "sha512-ZfNfCWZ2Xq67VNvKMPiVMKHnMdvxYzvZkf1AH8/cw2NLDBm5LRsxMqvEJpsjLI/dUosZ3Z1d6JlHDp5rAvvk2w==", + "version": "12.0.0", + "resolved": "https://registry.npmjs.org/standard-engine/-/standard-engine-12.0.0.tgz", + "integrity": "sha512-gJIIRb0LpL7AHyGbN9+hJ4UJns37lxmNTnMGRLC8CFrzQ+oB/K60IQjKNgPBCB2VP60Ypm6f8DFXvhVWdBOO+g==", "dev": true, "requires": { - "deglob": "^2.1.0", - "get-stdin": "^6.0.0", + "deglob": "^4.0.0", + "get-stdin": "^7.0.0", "minimist": "^1.1.0", - "pkg-conf": "^2.0.0" + "pkg-conf": "^3.1.0" } }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" - }, - "stealthy-require": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", - "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" - }, "string-width": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", @@ -4999,12 +3909,39 @@ "function-bind": "^1.0.2" } }, + "string.prototype.trimleft": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimleft/-/string.prototype.trimleft-2.0.0.tgz", + "integrity": "sha1-aLaqjhYsaoDnbjqKDC50cYbicf8=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.0.2" + } + }, + "string.prototype.trimright": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.trimright/-/string.prototype.trimright-2.0.0.tgz", + "integrity": "sha1-q0pW2AKgH75yk+EehPJNyBZGYd0=", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.0.2" + } + }, "string_decoder": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz", - "integrity": "sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w==", + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "requires": { - "safe-buffer": "~5.1.0" + "safe-buffer": "~5.2.0" + }, + "dependencies": { + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.0.tgz", + "integrity": "sha512-fZEwUGbVl7kouZs1jCdMLdt95hdIv0ZeHg6L7qPeciMZhZ+/gdesW4wgTARkrFWEpspjEATAzUGPG8N2jJiwbg==" + } } }, "strip-ansi": { @@ -5034,30 +3971,22 @@ "has-flag": "^3.0.0" } }, - "symbol-observable": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.1.tgz", - "integrity": "sha1-g0D8RwLDEi310iKI+IKD9RPT/dQ=", - "dev": true - }, "table": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/table/-/table-4.0.3.tgz", - "integrity": "sha512-S7rnFITmBH1EnyKcvxBh1LjYeQMmnZtCXSEbHcH6S0NoKit24ZuFO/T1vDcLdYsLQkM188PVVhQmzKIuThNkKg==", + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", "dev": true, "requires": { - "ajv": "^6.0.1", - "ajv-keywords": "^3.0.0", - "chalk": "^2.1.0", - "lodash": "^4.17.4", - "slice-ansi": "1.0.0", - "string-width": "^2.1.1" + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" }, "dependencies": { "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", "dev": true }, "is-fullwidth-code-point": { @@ -5067,22 +3996,23 @@ "dev": true }, "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", "dev": true, "requires": { + "emoji-regex": "^7.0.1", "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" + "strip-ansi": "^5.1.0" } }, "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", "dev": true, "requires": { - "ansi-regex": "^3.0.0" + "ansi-regex": "^4.1.0" } } } @@ -5261,9 +4191,9 @@ } }, "tap-xunit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/tap-xunit/-/tap-xunit-2.3.0.tgz", - "integrity": "sha512-YVsURNvn1wfVUWb5wjansxhfbfeo2hOBTUbVgZoaMO8lyZzpiSi9IiZTZ7JG56m6A49LeWjfJIx/SnAre41V/A==", + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/tap-xunit/-/tap-xunit-2.4.1.tgz", + "integrity": "sha512-qcZStDtjjYjMKAo7QNiCtOW256g3tuSyCSe5kNJniG1Q2oeOExJq4vm8CwboHZURpkXAHvtqMl4TVL7mcbMVVA==", "dev": true, "requires": { "duplexer": "~0.1.1", @@ -5329,21 +4259,21 @@ } }, "tape": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/tape/-/tape-4.10.1.tgz", - "integrity": "sha512-G0DywYV1jQeY3axeYnXUOt6ktnxS9OPJh97FGR3nrua8lhWi1zPflLxcAHavZ7Jf3qUfY7cxcVIVFa4mY2IY1w==", + "version": "4.11.0", + "resolved": "https://registry.npmjs.org/tape/-/tape-4.11.0.tgz", + "integrity": "sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA==", "dev": true, "requires": { "deep-equal": "~1.0.1", "defined": "~1.0.0", "for-each": "~0.3.3", "function-bind": "~1.1.1", - "glob": "~7.1.3", + "glob": "~7.1.4", "has": "~1.0.3", - "inherits": "~2.0.3", + "inherits": "~2.0.4", "minimist": "~1.2.0", "object-inspect": "~1.6.0", - "resolve": "~1.10.0", + "resolve": "~1.11.1", "resumer": "~0.0.0", "string.prototype.trim": "~1.1.2", "through": "~2.3.8" @@ -5360,15 +4290,6 @@ "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", "dev": true - }, - "resolve": { - "version": "1.10.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.10.1.tgz", - "integrity": "sha512-KuIe4mf++td/eFb6wkaPbMDnP6kObCaEtIDuHOUED6MNUo4K670KZUHuuvYPZDxNF0WVLw49n06M2m2dXphEzA==", - "dev": true, - "requires": { - "path-parse": "^1.0.6" - } } } }, @@ -5403,6 +4324,18 @@ } } }, + "test-exclude": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-5.2.3.tgz", + "integrity": "sha512-M+oxtseCFO3EDtAaGH7iiej3CBkzXqFMbzqYAACdzKui4eZA+pq3tZEwChvOdNfa7xxy8BfbmgJSIr43cC/+2g==", + "dev": true, + "requires": { + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "read-pkg-up": "^4.0.0", + "require-main-filename": "^2.0.0" + } + }, "text-hex": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", @@ -5471,43 +4404,6 @@ "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", "dev": true }, - "toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==" - }, - "topo": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/topo/-/topo-3.0.3.tgz", - "integrity": "sha512-IgpPtvD4kjrJ7CRA3ov2FhWQADwv+Tdqbsf1ZnPUSAtCJ9e1Z44MmoSGDXGk4IppoZA7jd/QRkNddlLJWlUZsQ==", - "requires": { - "hoek": "6.x.x" - } - }, - "tough-cookie": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", - "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", - "requires": { - "psl": "^1.1.24", - "punycode": "^1.4.1" - }, - "dependencies": { - "punycode": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", - "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" - } - } - }, - "tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "requires": { - "punycode": "^2.1.0" - } - }, "traceparent": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/traceparent/-/traceparent-1.0.0.tgz", @@ -5534,16 +4430,24 @@ "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" }, "ts-node": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.0.2.tgz", - "integrity": "sha512-MosTrinKmaAcWgO8tqMjMJB22h+sp3Rd1i4fdoWY4mhBDekOwIAKI/bzmRi7IcbCmjquccYg2gcF6NBkLgr0Tw==", + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-8.4.1.tgz", + "integrity": "sha512-5LpRN+mTiCs7lI5EtbXmF/HfMeCjzt7DH9CZwtkr6SywStrNQC723wG+aOWFiLNn7zT3kD/RnFqi3ZUfr4l5Qw==", "dev": true, "requires": { "arg": "^4.1.0", - "diff": "^3.1.0", + "diff": "^4.0.1", "make-error": "^1.1.1", "source-map-support": "^0.5.6", "yn": "^3.0.0" + }, + "dependencies": { + "diff": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.1.tgz", + "integrity": "sha512-s2+XdvhPCOF01LRQBC8hf4vhbVmI2CGS5aZnxLJlT5FtdhPCDFq80q++zK2KlrVorVDdL5BOGZ/VfLrVtYNF+Q==", + "dev": true + } } }, "tslib": { @@ -5552,59 +4456,6 @@ "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", "dev": true }, - "tslint": { - "version": "5.12.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.12.1.tgz", - "integrity": "sha512-sfodBHOucFg6egff8d1BvuofoOQ/nOeYNfbp7LDlKBcLNrL3lmS5zoiDGyOMdT7YsEXAwWpTdAHwOGOc8eRZAw==", - "dev": true, - "requires": { - "babel-code-frame": "^6.22.0", - "builtin-modules": "^1.1.1", - "chalk": "^2.3.0", - "commander": "^2.12.1", - "diff": "^3.2.0", - "glob": "^7.1.1", - "js-yaml": "^3.7.0", - "minimatch": "^3.0.4", - "resolve": "^1.3.2", - "semver": "^5.3.0", - "tslib": "^1.8.0", - "tsutils": "^2.27.2" - }, - "dependencies": { - "tsutils": { - "version": "2.29.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", - "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - } - } - }, - "tsutils": { - "version": "3.14.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.14.0.tgz", - "integrity": "sha512-SmzGbB0l+8I0QwsPgjooFRaRvHLBLNYM8SeQ0k6rtNDru5sCGeLJcZdwilNndN+GysuFjF5EIYgN8GfFG6UeUw==", - "dev": true, - "requires": { - "tslib": "^1.8.1" - } - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" - }, "type-check": { "version": "0.3.2", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", @@ -5619,6 +4470,11 @@ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==" }, + "type-fest": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.3.1.tgz", + "integrity": "sha512-cUGJnCdr4STbePCgqNFbpVNCepa+kAVohJs1sLhxzdH+gnEoOd8VhbYa7pD3zZYGiURWM2xzEII3fQcRizDkYQ==" + }, "typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -5626,43 +4482,43 @@ "dev": true }, "typedoc": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.14.2.tgz", - "integrity": "sha512-aEbgJXV8/KqaVhcedT7xG6d2r+mOvB5ep3eIz1KuB5sc4fDYXcepEEMdU7XSqLFO5hVPu0nllHi1QxX2h/QlpQ==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.15.0.tgz", + "integrity": "sha512-NOtfq5Tis4EFt+J2ozhVq9RCeUnfEYMFKoU6nCXCXUULJz1UQynOM+yH3TkfZCPLzigbqB0tQYGVlktUWweKlw==", "dev": true, "requires": { - "@types/fs-extra": "^5.0.3", - "@types/handlebars": "^4.0.38", - "@types/highlight.js": "^9.12.3", - "@types/lodash": "^4.14.110", - "@types/marked": "^0.4.0", "@types/minimatch": "3.0.3", - "@types/shelljs": "^0.8.0", - "fs-extra": "^7.0.0", - "handlebars": "^4.0.6", - "highlight.js": "^9.13.1", - "lodash": "^4.17.10", - "marked": "^0.4.0", + "fs-extra": "^8.1.0", + "handlebars": "^4.1.2", + "highlight.js": "^9.15.8", + "lodash": "^4.17.15", + "marked": "^0.7.0", "minimatch": "^3.0.0", - "progress": "^2.0.0", - "shelljs": "^0.8.2", - "typedoc-default-themes": "^0.5.0", - "typescript": "3.2.x" + "progress": "^2.0.3", + "shelljs": "^0.8.3", + "typedoc-default-themes": "^0.6.0", + "typescript": "3.5.x" }, "dependencies": { "typescript": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.2.4.tgz", - "integrity": "sha512-0RNDbSdEokBeEAkgNbxJ+BLwSManFy9TeXz8uW+48j/xhEXv1ePME60olyzw2XzUqUBNAYFeJadIqAgNqIACwg==", + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-3.5.3.tgz", + "integrity": "sha512-ACzBtm/PhXBDId6a6sDJfroT2pOWt/oOnk4/dElG5G33ZL776N3Y6/6bKZJBFpd+b05F3Ct9qDjMeJmRWtE2/g==", "dev": true } } }, "typedoc-default-themes": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.5.0.tgz", - "integrity": "sha1-bcJDPnjti+qOiHo6zeLzF4W9Yic=", - "dev": true + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.6.0.tgz", + "integrity": "sha512-MdTROOojxod78CEv22rIA69o7crMPLnVZPefuDLt/WepXqJwgiSu8Xxq+H36x0Jj3YGc7lOglI2vPJ2GhoOybw==", + "dev": true, + "requires": { + "backbone": "^1.4.0", + "jquery": "^3.4.1", + "lunr": "^2.3.6", + "underscore": "^1.9.1" + } }, "typescript": { "version": "3.3.3333", @@ -5690,6 +4546,12 @@ } } }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==", + "dev": true + }, "uniq": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/uniq/-/uniq-1.0.1.tgz", @@ -5702,15 +4564,11 @@ "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==", "dev": true }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" - }, "uri-js": { "version": "4.2.2", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, "requires": { "punycode": "^2.1.0" } @@ -5721,15 +4579,22 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.3.tgz", + "integrity": "sha512-pW0No1RGHgzlpHJO1nsVrHKpOEIxkGg1xB+v0ZmdNH5OAeAwzAVrCnI2/6Mtx+Uys6iaylxa+D3g4j63IKKjSQ==", + "dev": true }, "uuid4": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/uuid4/-/uuid4-1.1.4.tgz", "integrity": "sha512-Gr1q2k40LpF8CokcnQFjPDsdslzJbTCTBG5xQIEflUov431gFkY5KduiGIeKYAamkQnNn4IfdHJbLnl9Bib8TQ==" }, + "v8-compile-cache": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.0.tgz", + "integrity": "sha512-usZBT3PW+LOjM25wbqIlZwPeJV+3OSz3M1k1Ws8snlW39dZyYL9lOGC5FgPVHfk0jKmjiDV8Z0mIbVQPiwFs7g==", + "dev": true + }, "validate-npm-package-license": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", @@ -5740,36 +4605,6 @@ "spdx-expression-parse": "^3.0.0" } }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==" - }, - "whatwg-mimetype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.3.0.tgz", - "integrity": "sha512-M4yMwr6mAnQz76TbJm914+gPpB/nCwvZbJU28cUD6dR004SAxDLOOSUaB1JDRqLtaOV/vi0IC5lEAGFgrjGv/g==" - }, - "whatwg-url": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.0.0.tgz", - "integrity": "sha512-37GeVSIJ3kn1JgKyjiYNmSLP1yzbpb29jdmwBSgkD9h40/hyrR/OifpVUndji3tmwGgD8qpw7iQu3RSbCrBpsQ==", - "requires": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, "which": { "version": "1.2.14", "resolved": "https://registry.npmjs.org/which/-/which-1.2.14.tgz", @@ -5779,6 +4614,12 @@ "isexe": "^2.0.0" } }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, "window-size": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", @@ -5861,17 +4702,29 @@ "wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true }, "write": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/write/-/write-0.2.1.tgz", - "integrity": "sha1-X8A4KOJkzqP+kUVUdvejxWbLB1c=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", "dev": true, "requires": { "mkdirp": "^0.5.1" } }, + "write-file-atomic": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-2.4.3.tgz", + "integrity": "sha512-GaETH5wwsX+GcnzhPgKcKjJ6M2Cq3/iZp1WyY/X1CSqrW+jVNM9Y7D8EC2sM4ZG/V8wZlSniJnCKWPmBYAucRQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "imurmurhash": "^0.1.4", + "signal-exit": "^3.0.2" + } + }, "xmlbuilder": { "version": "4.2.1", "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz", @@ -5915,10 +4768,28 @@ "y18n": "^3.2.0" } }, + "yargs-parser": { + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "dependencies": { + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + } + } + }, "yn": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.0.tgz", - "integrity": "sha512-kKfnnYkbTfrAdd0xICNFw7Atm8nKpLcLv9AZGEt+kczL/WQVai4e2V6ZN8U/O+iI6WrNuJjNNOyu4zfhl9D3Hg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", "dev": true } } diff --git a/package.json b/package.json index 47a2b8c..8f96ee1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mojaloop/event-sdk", - "version": "7.4.0", + "version": "8.1.0", "description": "Shared code for Event Logging", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -17,12 +17,15 @@ "test:unit1": "ts-node node_modules/tape/bin/tape ", "test:xunit": "npm run test:unit | tap-xunit", "test:coverage": "nyc --reporter=lcov --require ts-node/register tape test/unit/**/*.test.{ts,js} | tap-spec; nyc report ---reporter=text", - "git:stagelib": "git add lib/*ts; git add lib/*.map; git add lib/*.js", + "git:stagelib": "git add lib/*.map; git add lib/*.js", "git:standardFix": "standard --fix", - "warn-pre-commit": "echo \"pre commit tasks running. build and test\"" + "warn-pre-commit": "echo \"pre commit tasks running. build and test\"", + "dep:check": "npx ncu -e 2", + "dep:update": "npx ncu -u" }, "pre-commit": [ "warn-pre-commit", + "dep:check", "build", "git:standardFix", "test:unit", @@ -35,9 +38,11 @@ "keywords": [ "event" ], - "author": "ramirogm", + "author": "ModusBox", "contributors": [ - "Ramiro González Maciel " + "Ramiro González Maciel ", + "Valentin Genev ", + "Miguel de Barros " ], "license": "Apache-2.0", "bugs": { @@ -45,38 +50,41 @@ }, "homepage": "https://github.com/mojaloop/event-sdk#readme", "dependencies": { - "@grpc/proto-loader": "0.5.1", - "@mojaloop/central-services-shared": "7.2.0", + "@grpc/proto-loader": "0.5.2", + "@mojaloop/central-services-logger": "8.1.1", "@types/protobufjs": "6.0.0", "brototype": "0.0.6", - "grpc": "1.21.1", + "error-callsites": "^2.0.2", + "grpc": "1.23.3", "lodash": "4.17.15", "moment": "2.24.0", "parse-strings-in-object": "1.2.0", "protobufjs": "6.8.8", "rc": "1.2.8", - "sinon": "7.3.2", + "serialize-error": "^4.1.0", + "sinon": "7.4.2", "traceparent": "1.0.0", "uuid4": "1.1.4" }, "devDependencies": { - "@types/node": "11.9.4", + "@types/node": "12.7.5", "@types/tape": "4.2.33", - "@typescript-eslint/eslint-plugin": "1.11.0", - "@typescript-eslint/parser": "1.11.0", + "@typescript-eslint/eslint-plugin": "2.2.0", + "@typescript-eslint/parser": "2.2.0", "debug": "4.1.1", "faucet": "0.0.1", - "nyc": "13.3.0", + "npm-check-updates": "3.1.23", + "nyc": "14.1.1", "pre-commit": "1.2.2", - "proxyquire": "2.1.1", - "standard": "12.0.1", + "proxyquire": "2.1.3", + "standard": "^14.3.0", "tap-spec": "5.0.0", - "tap-xunit": "2.3.0", - "tape": "4.10.1", + "tap-xunit": "2.4.1", + "tape": "4.11.0", "tapes": "4.1.0", - "ts-node": "8.0.2", - "tslint": "5.12.1", - "typedoc": "0.14.2", + "ts-node": "^8.4.1", + "tslint": "5.20.0", + "typedoc": "0.15.0", "typescript": "3.3.3333" }, "nyc": { diff --git a/src/Recorder.ts b/src/Recorder.ts index a9d4e21..8c6bab9 100644 --- a/src/Recorder.ts +++ b/src/Recorder.ts @@ -1,7 +1,7 @@ import { EventType, LogEventAction, LogResponseStatus, TypeEventTypeAction, EventMessage } from "./model/EventMessage"; import { EventLoggingServiceClient } from "./transport/EventLoggingServiceClient"; -const Logger = require('@mojaloop/central-services-shared').Logger +const Logger = require('@mojaloop/central-services-logger') /** * Describes Event Recorder interface diff --git a/src/Span.ts b/src/Span.ts index d3990f0..9b1d998 100644 --- a/src/Span.ts +++ b/src/Span.ts @@ -27,6 +27,11 @@ import { import { EventLoggingServiceClient } from './transport/EventLoggingServiceClient'; +import serializeError from 'serialize-error'; + +// import ErrorCallsites from 'error-callsites' +// const ErrorCallsites = require('error-callsites') + const _ = require('lodash'); const TraceParent = require('traceparent') @@ -253,7 +258,7 @@ class Span implements Partial { * @param action optional parameter for action. Defaults to 'span' * @param state optional parameter for state. Defaults to 'success' */ - private async trace(message?: TypeOfMessage, spanContext: TypeSpanContext = this.spanContext, state?: EventStateMetadata, action?: TraceEventAction ): Promise { + private async trace(message?: TypeOfMessage, spanContext: TypeSpanContext = this.spanContext, state?: EventStateMetadata, action?: TraceEventAction): Promise { if (!message) message = new EventMessage({ type: 'application/json', content: spanContext @@ -383,7 +388,14 @@ class Span implements Partial { let defaults = getDefaults(type) let action = _action ? _action : defaults.action let messageToLog - if (typeof message === 'string') { + if (message instanceof Error) { + // const callsites = ErrorCallsites(message) + // message.__error_callsites = callsites + messageToLog = new EventMessage({ + content: { error: serializeError(message) }, + type: 'application/json' + }) + } else if (typeof message === 'string') { messageToLog = new EventMessage({ content: { payload: message }, type: 'application/json' diff --git a/src/examples/js_app.js b/src/examples/js_app.js index a1445ab..92bfc60 100644 --- a/src/examples/js_app.js +++ b/src/examples/js_app.js @@ -29,7 +29,11 @@ */ const { Tracer } = require('../../lib/index') -const { AuditEventAction } = require('../../lib/index') +// const { AuditEventAction } = require('../../lib/index') +// const { DefaultLoggerRecorder } = require('../../lib/index') +const EventSDK = require('../../lib/index') + +const Logger = require('@mojaloop/central-services-logger') function sleep (ms) { return new Promise(resolve => { @@ -66,52 +70,53 @@ const request = { const main = async () => { // Creates a new parent span for given service // this sets new traceId and new spanId. - let parentSpan = Tracer.createSpan('parent service') + const parentSpan = Tracer.createSpan('parent service') + const IIChildSpan = parentSpan.getChild('child fin service') // Logs message with logging level info from the parent span - // await parentSpan.info(event) - // await parentSpan.info('this is event message') - // await parentSpan.warning('event') - // await parentSpan.error('event') - // await parentSpan.debug('message') - // await parentSpan.verbose('message') - // await parentSpan.performance('message') - // await parentSpan.audit('message', AuditEventAction.start) + + const newEvent = new EventSDK.EventMessage(event) + await parentSpan.info(newEvent) + await parentSpan.warning('event') + await parentSpan.debug(event) + await parentSpan.verbose('message') + await parentSpan.performance('message') + await parentSpan.audit('message') // Logs message with logging level debug from the parent span - // await parentSpan.debug('this is debug log') + await parentSpan.debug('this is debug log') // Creates child span from the parent span with new service name. // The traceId remains the same. The spanId is new and the parentSpanId is the spanId of the parent. - let IIChildSpan = parentSpan.getChild('child fin service') // Creates audit event message - await IIChildSpan.audit({ content: event }, AuditEventAction.finish) + // await IIChildSpan.audit({ content: event }, AuditEventAction.finish) - // Set tags to the span + // // Set tags to the span IIChildSpan.setTags({ one: 'two' }) - // Creates error log event from the IIChildSpan + // // Creates error log event from the IIChildSpan await IIChildSpan.error({ content: { message: 'error appeared' } }) - // Creates audit event message + // // Creates audit event message await parentSpan.audit(event) - // Finish the span. This also sends the trace context to the tracing platform. All further operations are forbidden after the span is finished. + // // Finish the span. This also sends the trace context to the tracing platform. All further operations are forbidden after the span is finished. await parentSpan.finish(event) - // Injects trace context to a message carrier. When the trace is carried across few services, the trace context can be injects in the carrier that transports the data. - let messageWithContext = await IIChildSpan.injectContextToMessage(event) + // // Injects trace context to a message carrier. When the trace is carried across few services, the trace context can be injects in the carrier that transports the data. + const messageWithContext = await IIChildSpan.injectContextToMessage(event) // await sleep(2000) - let requestHeadersWithContext = await IIChildSpan.injectContextToHttpRequest(request) - console.log(requestHeadersWithContext) + const requestHeadersWithContext = await IIChildSpan.injectContextToHttpRequest(request) + Logger.info(requestHeadersWithContext) // Extracts trace context from message carrier. When the message is received from different service, the trace context is extracted by that method. - let contextFromMessage = Tracer.extractContextFromMessage(messageWithContext) - let context = Tracer.extractContextFromHttpRequest(requestHeadersWithContext) - console.log(context) + const contextFromMessage = Tracer.extractContextFromMessage(messageWithContext) + const context = Tracer.extractContextFromHttpRequest(requestHeadersWithContext) + Logger.info(context) // Creates child span from extracted trace context. - let IIIChild = Tracer.createChildSpanFromContext('child III service', contextFromMessage) //, { defaultRecorder: new DefaultLoggerRecorder() }) + const IIIChild = Tracer.createChildSpanFromContext('child III service', contextFromMessage) //, { defaultRecorder: new DefaultLoggerRecorder() }) await sleep(500) - await IIChildSpan.finish() + const state = new EventSDK.EventStateMetadata(EventSDK.EventStatusType.failed, '2001', 'its an errrrrrorrrr') + await IIChildSpan.finish(('error message'), state) await sleep(500) await IIIChild.finish() await sleep(500) diff --git a/src/server/server.ts b/src/server/server.ts index f1bca56..7d5e723 100644 --- a/src/server/server.ts +++ b/src/server/server.ts @@ -27,11 +27,10 @@ import { EventMessage } from "../model/EventMessage"; import { EventLoggingServiceServer, EVENT_RECEIVED } from "../transport/EventLoggingServiceServer"; const Config = require('../lib/config') - +const Logger = require('@mojaloop/central-services-logger') let server = new EventLoggingServiceServer(Config.EVENT_LOGGER_SERVER_HOST, Config.EVENT_LOGGER_SERVER_PORT) server.on(EVENT_RECEIVED, (eventMessage : EventMessage) => { - console.log('Received eventMessage: ', JSON.stringify(eventMessage, null, 2)) + Logger.debug(`Received eventMessage: ', ${JSON.stringify(eventMessage, null, 2)}`) }); server.start(); - diff --git a/src/transport/EventLoggerServiceLoader.ts b/src/transport/EventLoggerServiceLoader.ts index 3ecec01..bc0ce8c 100644 --- a/src/transport/EventLoggerServiceLoader.ts +++ b/src/transport/EventLoggerServiceLoader.ts @@ -35,7 +35,7 @@ function loadEventLoggerService() : any { { keepCase: true, longs: String, enums: String, - defaults: true, + defaults: false, oneofs: true }) let protoDescriptor = grpc.loadPackageDefinition(packageDefinition) diff --git a/src/transport/EventLoggingServiceClient.ts b/src/transport/EventLoggingServiceClient.ts index de55a3e..7cb9027 100644 --- a/src/transport/EventLoggingServiceClient.ts +++ b/src/transport/EventLoggingServiceClient.ts @@ -26,7 +26,7 @@ import { EventMessage, LogResponse } from "../model/EventMessage"; import { toAny } from "./JsonToStructMapper"; import { loadEventLoggerService } from "./EventLoggerServiceLoader"; -const Logger = require('@mojaloop/central-services-shared').Logger +const Logger = require('@mojaloop/central-services-logger') const grpc = require('grpc') class EventLoggingServiceClient { @@ -53,9 +53,9 @@ class EventLoggingServiceClient { try { // wireEvent.content = convertJsontoStruct(event.content); wireEvent.content = toAny(event.content, event.type); - Logger.info(`EventLoggingServiceClient.log sending wireEvent: ${JSON.stringify(wireEvent, null, 2)}`); + Logger.debug(`EventLoggingServiceClient.log sending wireEvent: ${JSON.stringify(wireEvent, null, 2)}`); this.grpcClient.log(wireEvent, (error: any, response: LogResponse) => { - Logger.info(`EventLoggingServiceClient.log received response: ${JSON.stringify(response, null, 2)}`); + Logger.debug(`EventLoggingServiceClient.log received response: ${JSON.stringify(response, null, 2)}`); if ( error ) { reject(error); } resolve(response); }) diff --git a/src/transport/EventLoggingServiceServer.ts b/src/transport/EventLoggingServiceServer.ts index 5ede52e..79e477c 100644 --- a/src/transport/EventLoggingServiceServer.ts +++ b/src/transport/EventLoggingServiceServer.ts @@ -29,6 +29,7 @@ import { loadEventLoggerService } from "./EventLoggerServiceLoader"; import events = require('events'); const grpc = require('grpc') +const Logger = require('@mojaloop/central-services-logger') const EVENT_RECEIVED = 'eventReceived'; @@ -56,7 +57,7 @@ class EventLoggingServiceServer extends events.EventEmitter{ start() : any { this.server.bind(`${this.host}:${this.port}`, grpc.ServerCredentials.createInsecure()) this.server.start() - console.log('Server listening') + Logger.info(`Server listening on ${this.host}:${this.port}...`) } logEventReceivedHandler (call: any, callback: any) { @@ -65,7 +66,8 @@ class EventLoggingServiceServer extends events.EventEmitter{ if (!event.id) { callback(new Error(`Couldn't parse message parameter. It doesn't have an id property. parameter: ${event}`)) } - console.log('Server.logEventReceivedHandler event: ', JSON.stringify(event, null, 2)) + + Logger.debug(`Server.logEventReceivedHandler event: ${JSON.stringify(event, null, 2)}`) try { // Convert it to a EventMessage