feat: configurable logging

This commit is contained in:
ppedziwiatr
2021-08-23 10:25:27 +02:00
parent 77599fb08c
commit cf73d6b8d0
19 changed files with 418 additions and 65 deletions

View File

@@ -11,9 +11,9 @@
"lint": "eslint . --ext .ts",
"lint:fix": "eslint . --ext .ts --fix",
"prettier:format": "prettier --config .prettierrc 'src/**/*.ts' --write",
"prepublishOnly": "yarn run lint",
"preversion": "yarn run lint && yarn run build",
"version": "yarn run format && git add -A src",
"prepublishOnly": "yarn lint",
"preversion": "yarn lint && yarn build",
"version": "yarn format && git add -A src",
"postversion": "git push && git push --tags",
"test": "jest"
},
@@ -29,15 +29,27 @@
"testEnvironment": "node"
},
"files": [
"dist/**/*"
"lib/",
"docs/",
"LICENSE",
"README.md"
],
"keywords": [
"smartweave",
"arweave"
],
"bugs": {
"url": "https://github.com/redstone-finance/redstone-smartweave/issues"
},
"homepage": "https://github.com/redstone-finance/redstone-smartweave#readme",
"dependencies": {
"@weavery/clarity": "^0.1.5",
"arweave": "^1.10.16",
"arweave-multihost": "^0.1.0",
"bignumber.js": "^9.0.1",
"bson": "^4.5.0",
"json-beautify": "^1.1.1"
"json-beautify": "^1.1.1",
"winston": "^3.3.3"
},
"devDependencies": {
"@textury/arlocal": "^1.0.27",
@@ -54,6 +66,7 @@
"smartweave": "^0.4.41",
"ts-jest": "^27.0.5",
"ts-node": "^10.2.1",
"tsconfig-paths": "^3.10.1",
"typescript": "^4.3.5"
}
}

View File

@@ -1,4 +1,5 @@
import Arweave from 'arweave';
import { LoggerFactory } from '../logging';
import { SwClientFactory } from '@client';
const contracts = [
@@ -23,6 +24,7 @@ async function main() {
});
const swcClient = SwClientFactory.memCacheClient(arweave);
LoggerFactory.INST.logLevel('debug');
const contractTxId = 'W_njBtwDRyltjVU1RizJtZfF0S_4X3aSrrrA0HUEhUs';
const contractTxId2 = 'TMkCZKYO3GwcTLEKGgWSJegIlYCHi_UArtG0unCi2xA';

View File

@@ -2,7 +2,6 @@ import fs from 'fs';
import path from 'path';
import BSON from 'bson';
import { BlockHeightCacheResult, BlockHeightKey, BlockHeightSwCache } from '@cache';
/**
* An implementation of {@link BlockHeightSwCache} that stores its data in BSON files.
* Data is flushed to disk every 10 new cache entries.
@@ -57,7 +56,7 @@ export class BsonFileBlockHeightSwCache<V = any> implements BlockHeightSwCache<V
if (this.storage[directory] == null) {
this.storage[directory] = {};
}
console.time(`loading cache for ${directory}`);
//logger.info(`loading cache for ${directory}`);
const files = fs.readdirSync(cacheDirPath);
files.forEach((file) => {

View File

@@ -53,7 +53,7 @@ export class MemBlockHeightSwCache<V = any> implements BlockHeightSwCache<V> {
}
contains(key: string) {
return this.storage.hasOwnProperty(key);
return Object.prototype.hasOwnProperty.call(this.storage, key);
}
get(key: string, blockHeight: number): BlockHeightCacheResult<V> | null {

View File

@@ -13,7 +13,7 @@ export class MemCache<V = any> implements SwCache<string, V> {
}
contains(key: string): boolean {
return this.storage.hasOwnProperty(key);
return Object.prototype.hasOwnProperty.call(this.storage, key);
}
get(key: string): V {

View File

@@ -13,10 +13,13 @@ import {
InteractionsLoader,
InteractionsSorter,
InteractionTx,
LoggerFactory,
StateEvaluator,
SwcClient
} from '@smartweave';
const logger = LoggerFactory.INST.create(__filename);
/**
* An implementation of {@link SwcClient} that is backwards compatible with current style
* of writing SW contracts (ie. using the "handle" function).
@@ -39,14 +42,15 @@ export class HandlerBasedSwcClient implements SwcClient {
currentTx?: { interactionTxId: string; contractTxId: string }[],
evaluationOptions?: EvaluationOptions
): Promise<EvalStateResult<State>> {
console.time('Creating execution context');
logger.info('Read state for %s', contractTxId);
logger.profile('Creating execution context');
const executionContext = await this.createExecutionContext(contractTxId, blockHeight, evaluationOptions);
console.timeEnd('Creating execution context');
logger.profile('Creating execution context');
const now = Date.now();
console.time(`\nEvaluating ${contractTxId} state ${now}`);
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
const result = await this.stateEvaluator.eval(executionContext, currentTx || []);
console.timeEnd(`\nEvaluating ${contractTxId} state ${now}`);
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
return result;
}
@@ -58,9 +62,10 @@ export class HandlerBasedSwcClient implements SwcClient {
blockHeight?: number,
evaluationOptions?: EvaluationOptions
): Promise<InteractionResult<any, View>> {
console.time('Creating execution context');
logger.info('View state for %s', contractTxId);
logger.profile('Creating execution context');
let executionContext = await this.createExecutionContext(contractTxId, blockHeight, evaluationOptions);
console.timeEnd('Creating execution context');
logger.profile('Creating execution context');
if (!executionContext.currentBlockData) {
const currentBlockData = executionContext.currentNetworkInfo
@@ -81,9 +86,9 @@ export class HandlerBasedSwcClient implements SwcClient {
};
const now = Date.now();
console.time(`\nEvaluating ${contractTxId} state ${now}`);
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
const evalStateResult = await this.stateEvaluator.eval(executionContext, []);
console.timeEnd(`\nEvaluating ${contractTxId} state ${now}`);
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
const interaction: ContractInteraction = {
input,
@@ -116,14 +121,15 @@ export class HandlerBasedSwcClient implements SwcClient {
transaction: InteractionTx,
evaluationOptions?: EvaluationOptions
): Promise<InteractionResult<any, View>> {
console.time('Creating execution context');
logger.info('Vies state for %s %o', contractTxId, transaction);
logger.profile('Creating execution context');
const executionContext = await this.createExecutionContextFromTx(contractTxId, transaction);
console.timeEnd('Creating execution context');
logger.profile('Creating execution context');
const now = Date.now();
console.time(`\nEvaluating ${contractTxId} state ${now}`);
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
const evalStateResult = await this.stateEvaluator.eval(executionContext, []);
console.timeEnd(`\nEvaluating ${contractTxId} state ${now}`);
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
const interaction: ContractInteraction = {
input,

View File

@@ -1,7 +1,9 @@
import { ContractDefinition, DefinitionLoader, getTag, SmartWeaveTags, SwCache } from '@smartweave';
import { ContractDefinition, DefinitionLoader, getTag, LoggerFactory, SmartWeaveTags, SwCache } from '@smartweave';
import Arweave from 'arweave';
import Transaction from 'arweave/web/lib/transaction';
const logger = LoggerFactory.INST.create(__filename);
export class ContractDefinitionLoader<State = any> implements DefinitionLoader<State> {
constructor(
private readonly arweave: Arweave,
@@ -11,7 +13,7 @@ export class ContractDefinitionLoader<State = any> implements DefinitionLoader<S
async load(contractTxId: string, forcedSrcTxId?: string): Promise<ContractDefinition<State>> {
if (!forcedSrcTxId && this.cache?.contains(contractTxId)) {
console.log('ContractDefinitionLoader: Hit from cache!');
logger.verbose('ContractDefinitionLoader: Hit from cache!');
return Promise.resolve(this.cache?.get(contractTxId));
}

View File

@@ -3,6 +3,7 @@ import {
GQLResultInterface,
GQLTransactionsResultInterface,
InteractionsLoader,
LoggerFactory,
SmartWeaveTags
} from '@smartweave';
import Arweave from 'arweave';
@@ -25,6 +26,8 @@ interface ReqVariables {
after?: string;
}
const logger = LoggerFactory.INST.create(__filename);
export class ContractInteractionsLoader implements InteractionsLoader {
private static readonly query = `query Transactions($tags: [TagFilter!]!, $blockFilter: BlockFilter!, $first: Int!, $after: String) {
transactions(tags: $tags, block: $blockFilter, first: $first, sort: HEIGHT_ASC, after: $after) {
@@ -91,7 +94,7 @@ export class ContractInteractionsLoader implements InteractionsLoader {
txInfos.push(...transactions.edges.filter((tx) => !tx.node.parent || !tx.node.parent.id));
}
console.log('All interactions:', txInfos.length);
logger.verbose('All interactions: $s', txInfos.length);
return txInfos;
}
@@ -107,7 +110,7 @@ export class ContractInteractionsLoader implements InteractionsLoader {
}
if (response.data.errors) {
console.error(response.data.errors);
logger.error(response.data.errors);
throw new Error('Error while loading interaction transactions');
}

View File

@@ -8,11 +8,14 @@ import {
GQLTagInterface,
HandlerApi,
HandlerResult,
LoggerFactory,
SmartWeaveTags,
StateEvaluator
} from '@smartweave';
import Arweave from 'arweave';
const logger = LoggerFactory.INST.create(__filename);
// FIXME: currently this is tightly coupled with the HandlerApi
export class DefaultStateEvaluator<State = any> implements StateEvaluator<State, HandlerApi<State>> {
constructor(
@@ -43,22 +46,31 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
let currentState = baseState.state;
const validity = JSON.parse(JSON.stringify(baseState.validity));
logger.info(
'Evaluating state for %s [%s non-cached of %s all]',
executionContext.contractDefinition.txId,
missingInteractions.length,
executionContext.sortedInteractions.length
);
for (const missingInteraction of missingInteractions) {
/* console.log(`Evaluating [${missingInteraction.node.id}] ${missingInteractions.indexOf(missingInteraction) + 1}/${missingInteractions.length}
[of all:${executionContext.sortedInteractions.length}] interactions of ${executionContext.contractDefinition.txId}`);
*/
console.time(`${missingInteraction.node.id} evaluation`);
logger.verbose(
`${missingInteraction.node.id}: ${missingInteractions.indexOf(missingInteraction) + 1}/${
missingInteractions.length
} [of all:${executionContext.sortedInteractions.length}]`
);
logger.profile(`${missingInteraction.node.id} evaluation`);
const currentInteraction: GQLNodeInterface = missingInteraction.node;
const inputTag = this.findInputTag(missingInteraction, executionContext);
if (!inputTag || inputTag.name !== SmartWeaveTags.INPUT) {
console.error(`Skipping tx with missing or invalid Input tag - ${currentInteraction.id}`);
logger.error(`Skipping tx with missing or invalid Input tag - ${currentInteraction.id}`);
continue;
}
const input = this.parseInput(inputTag);
if (!input) {
console.error(`Skipping tx with missing or invalid Input tag - ${currentInteraction.id}`);
logger.error(`Skipping tx with missing or invalid Input tag - ${currentInteraction.id}`);
continue;
}
@@ -83,7 +95,7 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
validity[currentInteraction.id] = result.type === 'ok';
currentState = result.state;
console.timeEnd(`${missingInteraction.node.id} evaluation`);
logger.profile(`${missingInteraction.node.id} evaluation`);
// I'm really NOT a fan of this "modify" feature, but I don't have idea how to better
// implement the "evolve" feature
@@ -102,12 +114,12 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
currentTx: GQLNodeInterface
) {
if (result.type === 'exception') {
//console.error(`${result.result}`);
//console.error(`Executing of interaction: ${currentTx.id} threw exception.`);
logger.error(`${result.result}`);
logger.error(`Executing of interaction: ${currentTx.id} threw exception.`);
}
if (result.type === 'error') {
//console.error(`${result.result}`);
//console.error(`Executing of interaction: ${currentTx.id} returned error.`);
logger.error(`${result.result}`);
logger.error(`Executing of interaction: ${currentTx.id} returned error.`);
}
}
@@ -115,7 +127,7 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
try {
return JSON.parse(inputTag.value);
} catch (e) {
console.error(e);
logger.error(e);
return null;
}
}

View File

@@ -1,7 +1,14 @@
import Arweave from 'arweave';
import BigNumber from 'bignumber.js';
import * as clarity from '@weavery/clarity';
import { ContractDefinition, ExecutionContext, ExecutorFactory, InteractionTx, SmartWeaveGlobal } from '@smartweave';
import {
ContractDefinition,
ExecutionContext,
ExecutorFactory,
InteractionTx,
LoggerFactory,
SmartWeaveGlobal
} from '@smartweave';
/**
* A handle that effectively runs contract's code.
@@ -16,6 +23,8 @@ export interface HandlerApi<State> {
): Promise<InteractionResult<State, Result>>;
}
const logger = LoggerFactory.INST.create(__filename);
/**
* A factory that produces handlers that are compatible with the "current" style of
* writing SW contracts (ie. using "handle" function).
@@ -33,6 +42,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
const contractFunction = new Function(normalizedSource);
const handler = contractFunction(swGlobal, BigNumber, clarity) as HandlerFunction<State>;
// eslint-disable-next-line @typescript-eslint/no-this-alias
const self = this;
return {
@@ -46,7 +56,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
try {
const stateCopy = JSON.parse(JSON.stringify(state));
swGlobal._activeTx = interactionTx;
console.log('SmartWeave.contract.id -', swGlobal.contract.id);
logger.debug('SmartWeave.contract.id: %s', swGlobal.contract.id);
self.assignReadContractState(swGlobal, contractDefinition, interaction, executionContext, currentTx);
self.assignViewContractState(swGlobal, contractDefinition, executionContext);
@@ -89,7 +99,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
executionContext: ExecutionContext<State, HandlerApi<State>>
) {
swGlobal.contracts.viewContractState = async <View>(contractTxId: string, input: any) => {
console.log('swGlobal.viewContractState call: ', {
logger.verbose('swGlobal.viewContractState call: %o', {
from: contractDefinition.txId,
to: contractTxId,
input
@@ -106,7 +116,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
currentTx: { interactionTxId: string; contractTxId: string }[]
) {
swGlobal.contracts.readContractState = async (contractTxId: string, height?: number, returnValidity?: boolean) => {
console.log('swGlobal.readContractState call: ', {
logger.verbose('swGlobal.readContractState call: ', {
from: contractDefinition.txId,
to: contractTxId,
interaction
@@ -145,7 +155,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
return `
const [SmartWeave, BigNumber, clarity] = arguments;
clarity.SmartWeave = SmartWeave;
class ContractError extends Error { constructor(message) { super(message); this.name = \'ContractError\' } };
class ContractError extends Error { constructor(message) { super(message); this.name = 'ContractError' } };
function ContractAssert(cond, message) { if (!cond) throw new ContractError(message) };
${contractSrc};
return handle;

View File

@@ -1,3 +1,4 @@
export * from '@logging'; // this needs to be the first exported element.
export * from '@core';
export * from '@client';
export * from '@cache';

View File

@@ -0,0 +1,126 @@
import winston, { createLogger, format, LogEntry, Logger, LoggerOptions, transports } from 'winston';
import path from 'path';
const { combine, errors, timestamp, colorize, printf } = format;
export const baseFormat = combine(
timestamp({ format: 'YYYY-MM-DD HH:mm:ss.SSS' }),
errors({ stack: true }),
format.splat(),
format((info) => {
info.level = info.level.toUpperCase();
return info;
})()
);
winston.addColors({
error: 'bold redBG',
warn: 'bold magenta',
info: 'bold green',
http: 'bold magentaBG',
verbose: 'bold cyan',
debug: 'bold blue',
silly: 'grey'
});
export const prettyFormat = combine(
baseFormat,
colorize({ all: false }),
printf(({ timestamp, level, message, ...rest }) => {
let result = `[${timestamp}] [${rest.module || 'SWC'}] ${level}: ${message}`;
if (rest?.durationMs) {
result += ` - ${rest.durationMs}ms`;
}
return result;
})
);
export const defaultLoggerOptions = {
level: 'debug',
format: prettyFormat,
transports: [new transports.Console()],
exitOnError: false
};
export type LogLevel = 'error' | 'warn' | 'info' | 'http' | 'verbose' | 'debug' | 'silly';
/**
* A wrapper around "Winston" logging library that allows to change logging settings at runtime
* (for each registered module independently, or globally - for all loggers).
*/
export class LoggerFactory {
static readonly INST: LoggerFactory = new LoggerFactory();
private readonly registeredLoggers: { [moduleName: string]: Logger } = {};
private readonly registeredOptions: { [moduleName: string]: LoggerOptions } = {};
private defaultOptions: LoggerOptions = { ...defaultLoggerOptions };
private constructor() {
// noop
}
setOptions(newOptions: LoggerOptions, moduleName: string) {
console.log('setOptions', { newOptions, moduleName });
// if moduleName not specified
if (!moduleName) {
// update default options
LoggerFactory.INST.defaultOptions = newOptions;
// update options for all already registered loggers
Object.keys(this.registeredLoggers).forEach((key: string) => {
Object.assign(this.registeredLoggers[key], newOptions);
});
} else {
// if logger already registered
if (this.registeredLoggers[moduleName]) {
// update its options
Object.assign(this.registeredLoggers[moduleName], newOptions);
} else {
// if logger not yet registered - save options that will be used for its creation
this.registeredOptions[moduleName] = {
...this.defaultOptions,
...newOptions
};
}
}
}
getOptions(moduleName?: string): LoggerOptions {
if (!moduleName) {
return this.defaultOptions;
} else {
if (this.registeredLoggers[moduleName]) {
return this.registeredLoggers[moduleName];
} else if (this.registeredOptions[moduleName]) {
return this.registeredOptions[moduleName];
} else {
return this.defaultOptions;
}
}
}
logLevel(level: LogLevel, moduleName?: string) {
this.setOptions({ level }, moduleName);
}
create(moduleName = 'SWC'): Logger {
// in case of passing '__dirname' as moduleName - leaves only the file name without extension.
const normalizedModuleName = path.basename(moduleName, path.extname(moduleName));
if (!this.registeredLoggers[normalizedModuleName]) {
const logger = createLogger({
...this.getOptions(normalizedModuleName),
// note: profiler this not currently honor defaultMeta - https://github.com/winstonjs/winston/pull/1935
defaultMeta: { module: normalizedModuleName }
});
// note: winston by default logs profile message with info level (to high IMO),
// with no option to set different default - so we're forcing level by
// overwriting default function...
const originalProfile = logger.profile.bind(logger);
logger.profile = (id: string | number, meta?: LogEntry) => {
return originalProfile(id, meta || { message: '', level: 'debug' });
};
this.registeredLoggers[normalizedModuleName] = logger;
}
return this.registeredLoggers[normalizedModuleName];
}
}

1
src/logging/index.ts Normal file
View File

@@ -0,0 +1 @@
export * from './LoggerFactory';

View File

@@ -1,4 +1,6 @@
import { BlockHeightKey, BlockHeightSwCache, GQLEdgeInterface, InteractionsLoader } from '@smartweave';
import { BlockHeightKey, BlockHeightSwCache, GQLEdgeInterface, InteractionsLoader, LoggerFactory } from '@smartweave';
const logger = LoggerFactory.INST.create(__filename);
/**
* Very simple and naive implementation of cache for InteractionsLoader layer.
@@ -14,7 +16,7 @@ export class CacheableContractInteractionsLoader implements InteractionsLoader {
) {}
async load(contractId: string, blockHeight: number): Promise<GQLEdgeInterface[]> {
console.log('Loading interactions:', {
logger.debug('Loading interactions %o', {
contractId,
blockHeight
});
@@ -22,7 +24,7 @@ export class CacheableContractInteractionsLoader implements InteractionsLoader {
const cached = this.cache.get(contractId, blockHeight);
if (cached !== null) {
console.log('InteractionsLoader - hit from cache!');
logger.verbose('InteractionsLoader - hit from cache!');
return cached.cachedValue;
} else {
const result = await this.baseImplementation.load(contractId, blockHeight);

View File

@@ -1,6 +1,9 @@
import Arweave from 'arweave';
import { ContractDefinition, ExecutorFactory } from '@core';
import { SwCache } from '@cache';
import { LoggerFactory } from '@logging';
const logger = LoggerFactory.INST.create(__filename);
/**
* An implementation of ExecutorFactory that adds caching capabilities
@@ -18,10 +21,9 @@ export class CacheableExecutorFactory<State, Api> implements ExecutorFactory<Sta
// with the same SwGlobal object being cached for all contracts with the same source code
// (eg. SwGlobal.contract.id field - which of course should have different value for contracts
// with the same source).
const cacheKey = contractDefinition.txId;
if (!this.cache.contains(cacheKey)) {
console.log('Updating executor factory cache');
logger.verbose('Updating executor factory cache');
const handler = await this.baseImplementation.create(contractDefinition);
this.cache.put(cacheKey, handler);
}

View File

@@ -2,6 +2,9 @@ import { BlockHeightCacheResult, BlockHeightKey, BlockHeightSwCache } from '@cac
import { DefaultStateEvaluator, EvalStateResult, ExecutionContext, ExecutionContextModifier, HandlerApi } from '@core';
import Arweave from 'arweave';
import { GQLNodeInterface } from '@legacy';
import { LoggerFactory } from '@logging';
const logger = LoggerFactory.INST.create(__filename);
/**
* An implementation of DefaultStateEvaluator that adds caching capabilities
@@ -20,7 +23,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
currentTx: { interactionTxId: string; contractTxId: string }[]
): Promise<EvalStateResult<State>> {
const requestedBlockHeight = executionContext.blockHeight;
console.log(`Requested state block height: ${requestedBlockHeight}`);
logger.verbose(`Requested state block height: ${requestedBlockHeight}`);
let cachedState: BlockHeightCacheResult<EvalStateResult<State>> | null = null;
@@ -36,7 +39,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
cachedState = this.cache.getLessOrEqual(executionContext.contractDefinition.txId, requestedBlockHeight);
if (cachedState != null) {
console.log(`Cached state for ${executionContext.contractDefinition.txId}`, {
logger.verbose(`Cached state for ${executionContext.contractDefinition.txId} %o`, {
block: cachedState.cachedHeight,
requestedBlockHeight
});
@@ -48,7 +51,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
);
}
console.log(`Interactions until [${requestedBlockHeight}]`, {
logger.verbose(`Interactions until [${requestedBlockHeight}] %o`, {
total: sortedInteractionsUpToBlock.length,
cached: sortedInteractionsUpToBlock.length - missingInteractions.length
});
@@ -63,7 +66,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
if (entry.contractTxId === executionContext.contractDefinition.txId) {
const index = missingInteractions.findIndex((tx) => tx.node.id === entry.interactionTxId);
if (index !== -1) {
console.log('Inf. Loop fix - removing interaction', {
logger.verbose('Inf. Loop fix - removing interaction %o', {
contractTxId: entry.contractTxId,
interactionTxId: entry.interactionTxId
});
@@ -74,7 +77,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
// if cache is up-to date - return immediately to speed-up the whole process
if (missingInteractions.length === 0 && cachedState) {
console.log(`State up to requested height [${requestedBlockHeight}] fully cached!`);
logger.verbose(`State up to requested height [${requestedBlockHeight}] fully cached!`);
return cachedState.cachedValue;
}
}

View File

@@ -3,6 +3,7 @@ import {
ExecutionContext,
ExecutionContextModifier,
ExecutorFactory,
LoggerFactory,
SmartWeaveError,
SmartWeaveErrorType
} from '@smartweave';
@@ -13,6 +14,8 @@ export interface EvolveCompatibleState {
evolve: string; // the transaction id of the Arweave transaction with the updated source code. odd naming convention..
}
const logger = LoggerFactory.INST.create(__filename);
/*
...I'm still not fully convinced to the whole "evolve" idea.
@@ -41,7 +44,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
async modify(state: State, executionContext: ExecutionContext<State, Api>): Promise<ExecutionContext<State, Api>> {
const contractTxId = executionContext.contractDefinition.txId;
console.log('trying to evolve for:', contractTxId);
logger.verbose(`trying to evolve for: ${contractTxId}`);
const currentSrcTxId = executionContext.contractDefinition.srcTxId;
const settings =
@@ -57,7 +60,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
canEvolve = true;
}
if (evolve && /[a-z0-9_-]{43}/i.test(evolve) && canEvolve) {
console.log('Checking evolve: ', {
logger.debug('Checking evolve: %o', {
current: currentSrcTxId,
evolve
});
@@ -65,7 +68,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
if (currentSrcTxId !== evolve) {
try {
// note: that's really nasty IMO - loading original contract definition, but forcing different sourceTxId...
console.log('Evolving to:', evolve);
logger.info('Evolving to: %s', evolve);
const newContractDefinition = await this.definitionLoader.load(contractTxId, evolve);
const newHandler = await this.executorFactory.create(newContractDefinition);
@@ -74,7 +77,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
contractDefinition: newContractDefinition,
handler: newHandler
};
console.log('evolved to: ', {
logger.verbose('evolved to: %o', {
txId: modifiedContext.contractDefinition.txId,
srcTxId: modifiedContext.contractDefinition.srcTxId
});

View File

@@ -1,6 +1,7 @@
{
"compilerOptions": {
"target": "es2015",
"sourceMap": true,
"target": "es2019",
"module": "commonjs",
"declaration": true,
"outDir": "./lib",
@@ -14,9 +15,10 @@
"@core": ["core/index"],
"@legacy": ["legacy/index"],
"@plugins": ["plugins/index"],
"@logging": ["logging/index"],
"@smartweave": ["index"],
}
},
"include": ["src"],
"exclude": ["node_modules", "**/__tests__/*"]
"exclude": ["node_modules", "**/__tests__/*", "src/_scripts"]
}

180
yarn.lock
View File

@@ -365,6 +365,15 @@
dependencies:
"@cspotcode/source-map-consumer" "0.8.0"
"@dabh/diagnostics@^2.0.2":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@dabh/diagnostics/-/diagnostics-2.0.2.tgz#290d08f7b381b8f94607dc8f471a12c675f9db31"
integrity sha512-+A1YivoVDNNVCdfozHSR8v/jyuuLTMXwjWuxPFlFlUapXoGc+Gj9mDlTDDfrwl7rXCl2tNZ0kE8sIBO6YOn96Q==
dependencies:
colorspace "1.1.x"
enabled "2.0.x"
kuler "^2.0.0"
"@eslint/eslintrc@^0.4.3":
version "0.4.3"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
@@ -1496,6 +1505,11 @@ async-retry@^1.2.1:
dependencies:
retry "0.13.1"
async@^3.1.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/async/-/async-3.2.1.tgz#d3274ec66d107a47476a4c49136aacdb00665fc8"
integrity sha512-XdD5lRO/87udXCMC9meWdYiR+Nq6ZjUfXidViUZGu2F1MO4T3XwZ1et0hb2++BgLfhyJwy44BGB/yx80ABx8hg==
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -1851,7 +1865,7 @@ collect-v8-coverage@^1.0.0:
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59"
integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==
color-convert@^1.9.0:
color-convert@^1.9.0, color-convert@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
@@ -1870,11 +1884,27 @@ color-name@1.1.3:
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
color-name@~1.1.4:
color-name@^1.0.0, color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
color-string@^1.5.2:
version "1.6.0"
resolved "https://registry.yarnpkg.com/color-string/-/color-string-1.6.0.tgz#c3915f61fe267672cb7e1e064c9d692219f6c312"
integrity sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==
dependencies:
color-name "^1.0.0"
simple-swizzle "^0.2.2"
color@3.0.x:
version "3.0.0"
resolved "https://registry.yarnpkg.com/color/-/color-3.0.0.tgz#d920b4328d534a3ac8295d68f7bd4ba6c427be9a"
integrity sha512-jCpd5+s0s0t7p3pHQKpnJ0TpQKKdleP71LWcA0aqiljpiuAkOSUFN/dyH8ZwF0hRmFlrIuRhufds1QyEP9EB+w==
dependencies:
color-convert "^1.9.1"
color-string "^1.5.2"
colorette@1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
@@ -1885,6 +1915,19 @@ colorette@^1.3.0:
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af"
integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==
colors@^1.2.1:
version "1.4.0"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78"
integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==
colorspace@1.1.x:
version "1.1.2"
resolved "https://registry.yarnpkg.com/colorspace/-/colorspace-1.1.2.tgz#e0128950d082b86a2168580796a0aa5d6c68d8c5"
integrity sha512-vt+OoIP2d76xLhjwbBaucYlNSpPsrJWPlBTtwCpQKIu6/CSMutyzX93O/Do0qzpH3YoHEes8YEFXyZ797rEhzQ==
dependencies:
color "3.0.x"
text-hex "1.0.x"
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
version "1.0.8"
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
@@ -2190,6 +2233,11 @@ emoji-regex@^8.0.0:
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
enabled@2.0.x:
version "2.0.0"
resolved "https://registry.yarnpkg.com/enabled/-/enabled-2.0.0.tgz#f9dd92ec2d6f4bbc0d5d1e64e21d61cd4665e7c2"
integrity sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==
encodeurl@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
@@ -2582,6 +2630,11 @@ fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.6:
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
fast-safe-stringify@^2.0.4:
version "2.0.8"
resolved "https://registry.yarnpkg.com/fast-safe-stringify/-/fast-safe-stringify-2.0.8.tgz#dc2af48c46cf712b683e849b2bbd446b32de936f"
integrity sha512-lXatBjf3WPjmWD6DpIZxkeSsCOwqI0maYMpgDlx8g4U2qi4lbjA9oH/HD2a87G+KfsUmo5WbJFmqBZlPxtptag==
fastq@^1.6.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794"
@@ -2596,6 +2649,11 @@ fb-watchman@^2.0.0:
dependencies:
bser "2.1.1"
fecha@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/fecha/-/fecha-4.2.1.tgz#0a83ad8f86ef62a091e22bb5a039cd03d23eecce"
integrity sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q==
figlet@^1.5.0:
version "1.5.2"
resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.2.tgz#dda34ff233c9a48e36fcff6741aeb5bafe49b634"
@@ -2643,6 +2701,11 @@ flatted@^3.1.0:
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561"
integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==
fn.name@1.x.x:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fn.name/-/fn.name-1.1.0.tgz#26cad8017967aea8731bc42961d04a3d5988accc"
integrity sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==
follow-redirects@^1.10.0:
version "1.14.2"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.2.tgz#cecb825047c00f5e66b142f90fed4f515dec789b"
@@ -3070,7 +3133,7 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@~2.0.0, inherits@~2.0.3:
inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.3:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
@@ -3113,6 +3176,11 @@ interpret@^2.2.0:
resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9"
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
is-arrayish@^0.3.1:
version "0.3.2"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.3.2.tgz#4574a2ae56f7ab206896fb431eaeed066fdf8f03"
integrity sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==
is-bigint@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3"
@@ -3805,7 +3873,7 @@ json-stringify-safe@5, json-stringify-safe@~5.0.1:
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
json5@2.x, json5@^2.1.2:
json5@2.x, json5@^2.1.2, json5@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
@@ -3953,6 +4021,11 @@ koa@2.13.1, koa@^2.13.1:
type-is "^1.6.16"
vary "^1.1.2"
kuler@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/kuler/-/kuler-2.0.0.tgz#e2c570a3800388fb44407e851531c1d670b061b3"
integrity sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==
leven@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
@@ -4006,6 +4079,17 @@ lodash@4.x, lodash@^4.17.11, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.7.0:
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
logform@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/logform/-/logform-2.2.0.tgz#40f036d19161fc76b68ab50fdc7fe495544492f2"
integrity sha512-N0qPlqfypFx7UHNn4B3lzS/b0uLqt2hmuoa+PpuXNYgozdJYAyauF5Ky0BWVjrxDlMWiT3qN4zPq3vVAfZy7Yg==
dependencies:
colors "^1.2.1"
fast-safe-stringify "^2.0.4"
fecha "^4.2.0"
ms "^2.1.1"
triple-beam "^1.3.0"
loglevel@^1.6.7, loglevel@^1.7.0:
version "1.7.1"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197"
@@ -4409,6 +4493,13 @@ once@^1.3.0:
dependencies:
wrappy "1"
one-time@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/one-time/-/one-time-1.0.0.tgz#e06bc174aed214ed58edede573b433bbf827cb45"
integrity sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==
dependencies:
fn.name "1.x.x"
onetime@^5.1.0, onetime@^5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
@@ -4696,7 +4787,7 @@ react-is@^17.0.1:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
readable-stream@2, readable-stream@^2.0.6:
readable-stream@2, readable-stream@^2.0.6, readable-stream@^2.3.7:
version "2.3.7"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
@@ -4709,6 +4800,15 @@ readable-stream@2, readable-stream@^2.0.6:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
readable-stream@^3.4.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198"
integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==
dependencies:
inherits "^2.0.3"
string_decoder "^1.1.1"
util-deprecate "^1.0.1"
rechoir@0.7.0:
version "0.7.0"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca"
@@ -4843,7 +4943,7 @@ safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1:
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1:
safe-buffer@^5.0.1, safe-buffer@^5.1.2, safe-buffer@^5.2.1, safe-buffer@~5.2.0:
version "5.2.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
@@ -4946,6 +5046,13 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3:
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
simple-swizzle@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/simple-swizzle/-/simple-swizzle-0.2.2.tgz#a4da6b635ffcccca33f70d17cb92592de95e557a"
integrity sha1-pNprY1/8zMoz9w0Xy5JZLeleVXo=
dependencies:
is-arrayish "^0.3.1"
sisteransi@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
@@ -5044,6 +5151,11 @@ sshpk@^1.7.0:
safer-buffer "^2.0.2"
tweetnacl "~0.14.0"
stack-trace@0.0.x:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
integrity sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=
stack-utils@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277"
@@ -5131,6 +5243,13 @@ string.prototype.trimstart@^1.0.4:
call-bind "^1.0.2"
define-properties "^1.1.3"
string_decoder@^1.1.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e"
integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==
dependencies:
safe-buffer "~5.2.0"
string_decoder@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
@@ -5159,6 +5278,11 @@ strip-ansi@^6.0.0:
dependencies:
ansi-regex "^5.0.0"
strip-bom@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
integrity sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=
strip-bom@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
@@ -5290,6 +5414,11 @@ test-exclude@^6.0.0:
glob "^7.1.4"
minimatch "^3.0.4"
text-hex@1.0.x:
version "1.0.0"
resolved "https://registry.yarnpkg.com/text-hex/-/text-hex-1.0.0.tgz#69dc9c1b17446ee79a92bf5b884bb4b9127506f5"
integrity sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==
text-table@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
@@ -5371,6 +5500,11 @@ tr46@^2.1.0:
dependencies:
punycode "^2.1.1"
triple-beam@^1.2.0, triple-beam@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/triple-beam/-/triple-beam-1.3.0.tgz#a595214c7298db8339eeeee083e4d10bd8cb8dd9"
integrity sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==
ts-invariant@^0.4.0:
version "0.4.4"
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86"
@@ -5421,6 +5555,15 @@ tsc-watch@^4.4.0:
string-argv "^0.1.1"
strip-ansi "^6.0.0"
tsconfig-paths@^3.10.1:
version "3.10.1"
resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.10.1.tgz#79ae67a68c15289fdf5c51cb74f397522d795ed7"
integrity sha512-rETidPDgCpltxF7MjBZlAFPUHv5aHH2MymyPvh+vEyWAED4Eb/WeMbsnD/JDr4OKPOA1TssDHgIcpTN5Kh0p6Q==
dependencies:
json5 "^2.2.0"
minimist "^1.2.0"
strip-bom "^3.0.0"
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
@@ -5546,7 +5689,7 @@ uri-js@^4.2.2:
dependencies:
punycode "^2.1.0"
util-deprecate@~1.0.1:
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
@@ -5684,6 +5827,29 @@ wide-align@^1.1.0:
dependencies:
string-width "^1.0.2 || 2"
winston-transport@^4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/winston-transport/-/winston-transport-4.4.0.tgz#17af518daa690d5b2ecccaa7acf7b20ca7925e59"
integrity sha512-Lc7/p3GtqtqPBYYtS6KCN3c77/2QCev51DvcJKbkFPQNoj1sinkGwLGFDxkXY9J6p9+EPnYs+D90uwbnaiURTw==
dependencies:
readable-stream "^2.3.7"
triple-beam "^1.2.0"
winston@^3.3.3:
version "3.3.3"
resolved "https://registry.yarnpkg.com/winston/-/winston-3.3.3.tgz#ae6172042cafb29786afa3d09c8ff833ab7c9170"
integrity sha512-oEXTISQnC8VlSAKf1KYSSd7J6IWuRPQqDdo8eoRNaYKLvwSb5+79Z3Yi1lrl6KDpU6/VWaxpakDAtb1oQ4n9aw==
dependencies:
"@dabh/diagnostics" "^2.0.2"
async "^3.1.0"
is-stream "^2.0.0"
logform "^2.2.0"
one-time "^1.0.0"
readable-stream "^3.4.0"
stack-trace "0.0.x"
triple-beam "^1.3.0"
winston-transport "^4.4.0"
word-wrap@^1.2.3, word-wrap@~1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"