feat: configurable logging
This commit is contained in:
23
package.json
23
package.json
@@ -11,9 +11,9 @@
|
|||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"lint:fix": "eslint . --ext .ts --fix",
|
"lint:fix": "eslint . --ext .ts --fix",
|
||||||
"prettier:format": "prettier --config .prettierrc 'src/**/*.ts' --write",
|
"prettier:format": "prettier --config .prettierrc 'src/**/*.ts' --write",
|
||||||
"prepublishOnly": "yarn run lint",
|
"prepublishOnly": "yarn lint",
|
||||||
"preversion": "yarn run lint && yarn run build",
|
"preversion": "yarn lint && yarn build",
|
||||||
"version": "yarn run format && git add -A src",
|
"version": "yarn format && git add -A src",
|
||||||
"postversion": "git push && git push --tags",
|
"postversion": "git push && git push --tags",
|
||||||
"test": "jest"
|
"test": "jest"
|
||||||
},
|
},
|
||||||
@@ -29,15 +29,27 @@
|
|||||||
"testEnvironment": "node"
|
"testEnvironment": "node"
|
||||||
},
|
},
|
||||||
"files": [
|
"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": {
|
"dependencies": {
|
||||||
"@weavery/clarity": "^0.1.5",
|
"@weavery/clarity": "^0.1.5",
|
||||||
"arweave": "^1.10.16",
|
"arweave": "^1.10.16",
|
||||||
"arweave-multihost": "^0.1.0",
|
"arweave-multihost": "^0.1.0",
|
||||||
"bignumber.js": "^9.0.1",
|
"bignumber.js": "^9.0.1",
|
||||||
"bson": "^4.5.0",
|
"bson": "^4.5.0",
|
||||||
"json-beautify": "^1.1.1"
|
"json-beautify": "^1.1.1",
|
||||||
|
"winston": "^3.3.3"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@textury/arlocal": "^1.0.27",
|
"@textury/arlocal": "^1.0.27",
|
||||||
@@ -54,6 +66,7 @@
|
|||||||
"smartweave": "^0.4.41",
|
"smartweave": "^0.4.41",
|
||||||
"ts-jest": "^27.0.5",
|
"ts-jest": "^27.0.5",
|
||||||
"ts-node": "^10.2.1",
|
"ts-node": "^10.2.1",
|
||||||
|
"tsconfig-paths": "^3.10.1",
|
||||||
"typescript": "^4.3.5"
|
"typescript": "^4.3.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import Arweave from 'arweave';
|
import Arweave from 'arweave';
|
||||||
|
import { LoggerFactory } from '../logging';
|
||||||
import { SwClientFactory } from '@client';
|
import { SwClientFactory } from '@client';
|
||||||
|
|
||||||
const contracts = [
|
const contracts = [
|
||||||
@@ -23,6 +24,7 @@ async function main() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const swcClient = SwClientFactory.memCacheClient(arweave);
|
const swcClient = SwClientFactory.memCacheClient(arweave);
|
||||||
|
LoggerFactory.INST.logLevel('debug');
|
||||||
|
|
||||||
const contractTxId = 'W_njBtwDRyltjVU1RizJtZfF0S_4X3aSrrrA0HUEhUs';
|
const contractTxId = 'W_njBtwDRyltjVU1RizJtZfF0S_4X3aSrrrA0HUEhUs';
|
||||||
const contractTxId2 = 'TMkCZKYO3GwcTLEKGgWSJegIlYCHi_UArtG0unCi2xA';
|
const contractTxId2 = 'TMkCZKYO3GwcTLEKGgWSJegIlYCHi_UArtG0unCi2xA';
|
||||||
|
|||||||
3
src/cache/impl/BsonFileBlockHeightCache.ts
vendored
3
src/cache/impl/BsonFileBlockHeightCache.ts
vendored
@@ -2,7 +2,6 @@ import fs from 'fs';
|
|||||||
import path from 'path';
|
import path from 'path';
|
||||||
import BSON from 'bson';
|
import BSON from 'bson';
|
||||||
import { BlockHeightCacheResult, BlockHeightKey, BlockHeightSwCache } from '@cache';
|
import { BlockHeightCacheResult, BlockHeightKey, BlockHeightSwCache } from '@cache';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of {@link BlockHeightSwCache} that stores its data in BSON files.
|
* An implementation of {@link BlockHeightSwCache} that stores its data in BSON files.
|
||||||
* Data is flushed to disk every 10 new cache entries.
|
* 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) {
|
if (this.storage[directory] == null) {
|
||||||
this.storage[directory] = {};
|
this.storage[directory] = {};
|
||||||
}
|
}
|
||||||
console.time(`loading cache for ${directory}`);
|
//logger.info(`loading cache for ${directory}`);
|
||||||
|
|
||||||
const files = fs.readdirSync(cacheDirPath);
|
const files = fs.readdirSync(cacheDirPath);
|
||||||
files.forEach((file) => {
|
files.forEach((file) => {
|
||||||
|
|||||||
2
src/cache/impl/MemBlockHeightCache.ts
vendored
2
src/cache/impl/MemBlockHeightCache.ts
vendored
@@ -53,7 +53,7 @@ export class MemBlockHeightSwCache<V = any> implements BlockHeightSwCache<V> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
contains(key: string) {
|
contains(key: string) {
|
||||||
return this.storage.hasOwnProperty(key);
|
return Object.prototype.hasOwnProperty.call(this.storage, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
get(key: string, blockHeight: number): BlockHeightCacheResult<V> | null {
|
get(key: string, blockHeight: number): BlockHeightCacheResult<V> | null {
|
||||||
|
|||||||
2
src/cache/impl/MemCache.ts
vendored
2
src/cache/impl/MemCache.ts
vendored
@@ -13,7 +13,7 @@ export class MemCache<V = any> implements SwCache<string, V> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
contains(key: string): boolean {
|
contains(key: string): boolean {
|
||||||
return this.storage.hasOwnProperty(key);
|
return Object.prototype.hasOwnProperty.call(this.storage, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
get(key: string): V {
|
get(key: string): V {
|
||||||
|
|||||||
@@ -13,10 +13,13 @@ import {
|
|||||||
InteractionsLoader,
|
InteractionsLoader,
|
||||||
InteractionsSorter,
|
InteractionsSorter,
|
||||||
InteractionTx,
|
InteractionTx,
|
||||||
|
LoggerFactory,
|
||||||
StateEvaluator,
|
StateEvaluator,
|
||||||
SwcClient
|
SwcClient
|
||||||
} from '@smartweave';
|
} from '@smartweave';
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of {@link SwcClient} that is backwards compatible with current style
|
* An implementation of {@link SwcClient} that is backwards compatible with current style
|
||||||
* of writing SW contracts (ie. using the "handle" function).
|
* of writing SW contracts (ie. using the "handle" function).
|
||||||
@@ -39,14 +42,15 @@ export class HandlerBasedSwcClient implements SwcClient {
|
|||||||
currentTx?: { interactionTxId: string; contractTxId: string }[],
|
currentTx?: { interactionTxId: string; contractTxId: string }[],
|
||||||
evaluationOptions?: EvaluationOptions
|
evaluationOptions?: EvaluationOptions
|
||||||
): Promise<EvalStateResult<State>> {
|
): 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);
|
const executionContext = await this.createExecutionContext(contractTxId, blockHeight, evaluationOptions);
|
||||||
console.timeEnd('Creating execution context');
|
logger.profile('Creating execution context');
|
||||||
|
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
console.time(`\nEvaluating ${contractTxId} state ${now}`);
|
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
|
||||||
const result = await this.stateEvaluator.eval(executionContext, currentTx || []);
|
const result = await this.stateEvaluator.eval(executionContext, currentTx || []);
|
||||||
console.timeEnd(`\nEvaluating ${contractTxId} state ${now}`);
|
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@@ -58,9 +62,10 @@ export class HandlerBasedSwcClient implements SwcClient {
|
|||||||
blockHeight?: number,
|
blockHeight?: number,
|
||||||
evaluationOptions?: EvaluationOptions
|
evaluationOptions?: EvaluationOptions
|
||||||
): Promise<InteractionResult<any, View>> {
|
): 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);
|
let executionContext = await this.createExecutionContext(contractTxId, blockHeight, evaluationOptions);
|
||||||
console.timeEnd('Creating execution context');
|
logger.profile('Creating execution context');
|
||||||
|
|
||||||
if (!executionContext.currentBlockData) {
|
if (!executionContext.currentBlockData) {
|
||||||
const currentBlockData = executionContext.currentNetworkInfo
|
const currentBlockData = executionContext.currentNetworkInfo
|
||||||
@@ -81,9 +86,9 @@ export class HandlerBasedSwcClient implements SwcClient {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
console.time(`\nEvaluating ${contractTxId} state ${now}`);
|
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
|
||||||
const evalStateResult = await this.stateEvaluator.eval(executionContext, []);
|
const evalStateResult = await this.stateEvaluator.eval(executionContext, []);
|
||||||
console.timeEnd(`\nEvaluating ${contractTxId} state ${now}`);
|
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
|
||||||
|
|
||||||
const interaction: ContractInteraction = {
|
const interaction: ContractInteraction = {
|
||||||
input,
|
input,
|
||||||
@@ -116,14 +121,15 @@ export class HandlerBasedSwcClient implements SwcClient {
|
|||||||
transaction: InteractionTx,
|
transaction: InteractionTx,
|
||||||
evaluationOptions?: EvaluationOptions
|
evaluationOptions?: EvaluationOptions
|
||||||
): Promise<InteractionResult<any, View>> {
|
): 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);
|
const executionContext = await this.createExecutionContextFromTx(contractTxId, transaction);
|
||||||
console.timeEnd('Creating execution context');
|
logger.profile('Creating execution context');
|
||||||
|
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
console.time(`\nEvaluating ${contractTxId} state ${now}`);
|
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
|
||||||
const evalStateResult = await this.stateEvaluator.eval(executionContext, []);
|
const evalStateResult = await this.stateEvaluator.eval(executionContext, []);
|
||||||
console.timeEnd(`\nEvaluating ${contractTxId} state ${now}`);
|
logger.profile(`\nEvaluating ${contractTxId} state ${now}`);
|
||||||
|
|
||||||
const interaction: ContractInteraction = {
|
const interaction: ContractInteraction = {
|
||||||
input,
|
input,
|
||||||
|
|||||||
@@ -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 Arweave from 'arweave';
|
||||||
import Transaction from 'arweave/web/lib/transaction';
|
import Transaction from 'arweave/web/lib/transaction';
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
export class ContractDefinitionLoader<State = any> implements DefinitionLoader<State> {
|
export class ContractDefinitionLoader<State = any> implements DefinitionLoader<State> {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly arweave: Arweave,
|
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>> {
|
async load(contractTxId: string, forcedSrcTxId?: string): Promise<ContractDefinition<State>> {
|
||||||
if (!forcedSrcTxId && this.cache?.contains(contractTxId)) {
|
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));
|
return Promise.resolve(this.cache?.get(contractTxId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
GQLResultInterface,
|
GQLResultInterface,
|
||||||
GQLTransactionsResultInterface,
|
GQLTransactionsResultInterface,
|
||||||
InteractionsLoader,
|
InteractionsLoader,
|
||||||
|
LoggerFactory,
|
||||||
SmartWeaveTags
|
SmartWeaveTags
|
||||||
} from '@smartweave';
|
} from '@smartweave';
|
||||||
import Arweave from 'arweave';
|
import Arweave from 'arweave';
|
||||||
@@ -25,6 +26,8 @@ interface ReqVariables {
|
|||||||
after?: string;
|
after?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
export class ContractInteractionsLoader implements InteractionsLoader {
|
export class ContractInteractionsLoader implements InteractionsLoader {
|
||||||
private static readonly query = `query Transactions($tags: [TagFilter!]!, $blockFilter: BlockFilter!, $first: Int!, $after: String) {
|
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) {
|
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));
|
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;
|
return txInfos;
|
||||||
}
|
}
|
||||||
@@ -107,7 +110,7 @@ export class ContractInteractionsLoader implements InteractionsLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (response.data.errors) {
|
if (response.data.errors) {
|
||||||
console.error(response.data.errors);
|
logger.error(response.data.errors);
|
||||||
throw new Error('Error while loading interaction transactions');
|
throw new Error('Error while loading interaction transactions');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,11 +8,14 @@ import {
|
|||||||
GQLTagInterface,
|
GQLTagInterface,
|
||||||
HandlerApi,
|
HandlerApi,
|
||||||
HandlerResult,
|
HandlerResult,
|
||||||
|
LoggerFactory,
|
||||||
SmartWeaveTags,
|
SmartWeaveTags,
|
||||||
StateEvaluator
|
StateEvaluator
|
||||||
} from '@smartweave';
|
} from '@smartweave';
|
||||||
import Arweave from 'arweave';
|
import Arweave from 'arweave';
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
// FIXME: currently this is tightly coupled with the HandlerApi
|
// FIXME: currently this is tightly coupled with the HandlerApi
|
||||||
export class DefaultStateEvaluator<State = any> implements StateEvaluator<State, HandlerApi<State>> {
|
export class DefaultStateEvaluator<State = any> implements StateEvaluator<State, HandlerApi<State>> {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -43,22 +46,31 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
|
|||||||
let currentState = baseState.state;
|
let currentState = baseState.state;
|
||||||
const validity = JSON.parse(JSON.stringify(baseState.validity));
|
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) {
|
for (const missingInteraction of missingInteractions) {
|
||||||
/* console.log(`Evaluating [${missingInteraction.node.id}] ${missingInteractions.indexOf(missingInteraction) + 1}/${missingInteractions.length}
|
logger.verbose(
|
||||||
[of all:${executionContext.sortedInteractions.length}] interactions of ${executionContext.contractDefinition.txId}`);
|
`${missingInteraction.node.id}: ${missingInteractions.indexOf(missingInteraction) + 1}/${
|
||||||
*/
|
missingInteractions.length
|
||||||
console.time(`${missingInteraction.node.id} evaluation`);
|
} [of all:${executionContext.sortedInteractions.length}]`
|
||||||
|
);
|
||||||
|
logger.profile(`${missingInteraction.node.id} evaluation`);
|
||||||
const currentInteraction: GQLNodeInterface = missingInteraction.node;
|
const currentInteraction: GQLNodeInterface = missingInteraction.node;
|
||||||
|
|
||||||
const inputTag = this.findInputTag(missingInteraction, executionContext);
|
const inputTag = this.findInputTag(missingInteraction, executionContext);
|
||||||
if (!inputTag || inputTag.name !== SmartWeaveTags.INPUT) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const input = this.parseInput(inputTag);
|
const input = this.parseInput(inputTag);
|
||||||
if (!input) {
|
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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -83,7 +95,7 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
|
|||||||
|
|
||||||
validity[currentInteraction.id] = result.type === 'ok';
|
validity[currentInteraction.id] = result.type === 'ok';
|
||||||
currentState = result.state;
|
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
|
// I'm really NOT a fan of this "modify" feature, but I don't have idea how to better
|
||||||
// implement the "evolve" feature
|
// implement the "evolve" feature
|
||||||
@@ -102,12 +114,12 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
|
|||||||
currentTx: GQLNodeInterface
|
currentTx: GQLNodeInterface
|
||||||
) {
|
) {
|
||||||
if (result.type === 'exception') {
|
if (result.type === 'exception') {
|
||||||
//console.error(`${result.result}`);
|
logger.error(`${result.result}`);
|
||||||
//console.error(`Executing of interaction: ${currentTx.id} threw exception.`);
|
logger.error(`Executing of interaction: ${currentTx.id} threw exception.`);
|
||||||
}
|
}
|
||||||
if (result.type === 'error') {
|
if (result.type === 'error') {
|
||||||
//console.error(`${result.result}`);
|
logger.error(`${result.result}`);
|
||||||
//console.error(`Executing of interaction: ${currentTx.id} returned error.`);
|
logger.error(`Executing of interaction: ${currentTx.id} returned error.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,7 +127,7 @@ export class DefaultStateEvaluator<State = any> implements StateEvaluator<State,
|
|||||||
try {
|
try {
|
||||||
return JSON.parse(inputTag.value);
|
return JSON.parse(inputTag.value);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e);
|
logger.error(e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
import Arweave from 'arweave';
|
import Arweave from 'arweave';
|
||||||
import BigNumber from 'bignumber.js';
|
import BigNumber from 'bignumber.js';
|
||||||
import * as clarity from '@weavery/clarity';
|
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.
|
* A handle that effectively runs contract's code.
|
||||||
@@ -16,6 +23,8 @@ export interface HandlerApi<State> {
|
|||||||
): Promise<InteractionResult<State, Result>>;
|
): Promise<InteractionResult<State, Result>>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A factory that produces handlers that are compatible with the "current" style of
|
* A factory that produces handlers that are compatible with the "current" style of
|
||||||
* writing SW contracts (ie. using "handle" function).
|
* 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 contractFunction = new Function(normalizedSource);
|
||||||
const handler = contractFunction(swGlobal, BigNumber, clarity) as HandlerFunction<State>;
|
const handler = contractFunction(swGlobal, BigNumber, clarity) as HandlerFunction<State>;
|
||||||
|
|
||||||
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
||||||
const self = this;
|
const self = this;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
@@ -46,7 +56,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
|
|||||||
try {
|
try {
|
||||||
const stateCopy = JSON.parse(JSON.stringify(state));
|
const stateCopy = JSON.parse(JSON.stringify(state));
|
||||||
swGlobal._activeTx = interactionTx;
|
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.assignReadContractState(swGlobal, contractDefinition, interaction, executionContext, currentTx);
|
||||||
self.assignViewContractState(swGlobal, contractDefinition, executionContext);
|
self.assignViewContractState(swGlobal, contractDefinition, executionContext);
|
||||||
@@ -89,7 +99,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
|
|||||||
executionContext: ExecutionContext<State, HandlerApi<State>>
|
executionContext: ExecutionContext<State, HandlerApi<State>>
|
||||||
) {
|
) {
|
||||||
swGlobal.contracts.viewContractState = async <View>(contractTxId: string, input: any) => {
|
swGlobal.contracts.viewContractState = async <View>(contractTxId: string, input: any) => {
|
||||||
console.log('swGlobal.viewContractState call: ', {
|
logger.verbose('swGlobal.viewContractState call: %o', {
|
||||||
from: contractDefinition.txId,
|
from: contractDefinition.txId,
|
||||||
to: contractTxId,
|
to: contractTxId,
|
||||||
input
|
input
|
||||||
@@ -106,7 +116,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
|
|||||||
currentTx: { interactionTxId: string; contractTxId: string }[]
|
currentTx: { interactionTxId: string; contractTxId: string }[]
|
||||||
) {
|
) {
|
||||||
swGlobal.contracts.readContractState = async (contractTxId: string, height?: number, returnValidity?: boolean) => {
|
swGlobal.contracts.readContractState = async (contractTxId: string, height?: number, returnValidity?: boolean) => {
|
||||||
console.log('swGlobal.readContractState call: ', {
|
logger.verbose('swGlobal.readContractState call: ', {
|
||||||
from: contractDefinition.txId,
|
from: contractDefinition.txId,
|
||||||
to: contractTxId,
|
to: contractTxId,
|
||||||
interaction
|
interaction
|
||||||
@@ -145,7 +155,7 @@ export class HandlerExecutorFactory<State = any> implements ExecutorFactory<Stat
|
|||||||
return `
|
return `
|
||||||
const [SmartWeave, BigNumber, clarity] = arguments;
|
const [SmartWeave, BigNumber, clarity] = arguments;
|
||||||
clarity.SmartWeave = SmartWeave;
|
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) };
|
function ContractAssert(cond, message) { if (!cond) throw new ContractError(message) };
|
||||||
${contractSrc};
|
${contractSrc};
|
||||||
return handle;
|
return handle;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
export * from '@logging'; // this needs to be the first exported element.
|
||||||
export * from '@core';
|
export * from '@core';
|
||||||
export * from '@client';
|
export * from '@client';
|
||||||
export * from '@cache';
|
export * from '@cache';
|
||||||
|
|||||||
126
src/logging/LoggerFactory.ts
Normal file
126
src/logging/LoggerFactory.ts
Normal 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
1
src/logging/index.ts
Normal file
@@ -0,0 +1 @@
|
|||||||
|
export * from './LoggerFactory';
|
||||||
@@ -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.
|
* 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[]> {
|
async load(contractId: string, blockHeight: number): Promise<GQLEdgeInterface[]> {
|
||||||
console.log('Loading interactions:', {
|
logger.debug('Loading interactions %o', {
|
||||||
contractId,
|
contractId,
|
||||||
blockHeight
|
blockHeight
|
||||||
});
|
});
|
||||||
@@ -22,7 +24,7 @@ export class CacheableContractInteractionsLoader implements InteractionsLoader {
|
|||||||
const cached = this.cache.get(contractId, blockHeight);
|
const cached = this.cache.get(contractId, blockHeight);
|
||||||
|
|
||||||
if (cached !== null) {
|
if (cached !== null) {
|
||||||
console.log('InteractionsLoader - hit from cache!');
|
logger.verbose('InteractionsLoader - hit from cache!');
|
||||||
return cached.cachedValue;
|
return cached.cachedValue;
|
||||||
} else {
|
} else {
|
||||||
const result = await this.baseImplementation.load(contractId, blockHeight);
|
const result = await this.baseImplementation.load(contractId, blockHeight);
|
||||||
|
|||||||
@@ -1,6 +1,9 @@
|
|||||||
import Arweave from 'arweave';
|
import Arweave from 'arweave';
|
||||||
import { ContractDefinition, ExecutorFactory } from '@core';
|
import { ContractDefinition, ExecutorFactory } from '@core';
|
||||||
import { SwCache } from '@cache';
|
import { SwCache } from '@cache';
|
||||||
|
import { LoggerFactory } from '@logging';
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of ExecutorFactory that adds caching capabilities
|
* 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
|
// 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
|
// (eg. SwGlobal.contract.id field - which of course should have different value for contracts
|
||||||
// with the same source).
|
// with the same source).
|
||||||
|
|
||||||
const cacheKey = contractDefinition.txId;
|
const cacheKey = contractDefinition.txId;
|
||||||
if (!this.cache.contains(cacheKey)) {
|
if (!this.cache.contains(cacheKey)) {
|
||||||
console.log('Updating executor factory cache');
|
logger.verbose('Updating executor factory cache');
|
||||||
const handler = await this.baseImplementation.create(contractDefinition);
|
const handler = await this.baseImplementation.create(contractDefinition);
|
||||||
this.cache.put(cacheKey, handler);
|
this.cache.put(cacheKey, handler);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import { BlockHeightCacheResult, BlockHeightKey, BlockHeightSwCache } from '@cac
|
|||||||
import { DefaultStateEvaluator, EvalStateResult, ExecutionContext, ExecutionContextModifier, HandlerApi } from '@core';
|
import { DefaultStateEvaluator, EvalStateResult, ExecutionContext, ExecutionContextModifier, HandlerApi } from '@core';
|
||||||
import Arweave from 'arweave';
|
import Arweave from 'arweave';
|
||||||
import { GQLNodeInterface } from '@legacy';
|
import { GQLNodeInterface } from '@legacy';
|
||||||
|
import { LoggerFactory } from '@logging';
|
||||||
|
|
||||||
|
const logger = LoggerFactory.INST.create(__filename);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of DefaultStateEvaluator that adds caching capabilities
|
* An implementation of DefaultStateEvaluator that adds caching capabilities
|
||||||
@@ -20,7 +23,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
|
|||||||
currentTx: { interactionTxId: string; contractTxId: string }[]
|
currentTx: { interactionTxId: string; contractTxId: string }[]
|
||||||
): Promise<EvalStateResult<State>> {
|
): Promise<EvalStateResult<State>> {
|
||||||
const requestedBlockHeight = executionContext.blockHeight;
|
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;
|
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);
|
cachedState = this.cache.getLessOrEqual(executionContext.contractDefinition.txId, requestedBlockHeight);
|
||||||
|
|
||||||
if (cachedState != null) {
|
if (cachedState != null) {
|
||||||
console.log(`Cached state for ${executionContext.contractDefinition.txId}`, {
|
logger.verbose(`Cached state for ${executionContext.contractDefinition.txId} %o`, {
|
||||||
block: cachedState.cachedHeight,
|
block: cachedState.cachedHeight,
|
||||||
requestedBlockHeight
|
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,
|
total: sortedInteractionsUpToBlock.length,
|
||||||
cached: sortedInteractionsUpToBlock.length - missingInteractions.length
|
cached: sortedInteractionsUpToBlock.length - missingInteractions.length
|
||||||
});
|
});
|
||||||
@@ -63,7 +66,7 @@ export class CacheableStateEvaluator<State> extends DefaultStateEvaluator<State>
|
|||||||
if (entry.contractTxId === executionContext.contractDefinition.txId) {
|
if (entry.contractTxId === executionContext.contractDefinition.txId) {
|
||||||
const index = missingInteractions.findIndex((tx) => tx.node.id === entry.interactionTxId);
|
const index = missingInteractions.findIndex((tx) => tx.node.id === entry.interactionTxId);
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
console.log('Inf. Loop fix - removing interaction', {
|
logger.verbose('Inf. Loop fix - removing interaction %o', {
|
||||||
contractTxId: entry.contractTxId,
|
contractTxId: entry.contractTxId,
|
||||||
interactionTxId: entry.interactionTxId
|
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 cache is up-to date - return immediately to speed-up the whole process
|
||||||
if (missingInteractions.length === 0 && cachedState) {
|
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;
|
return cachedState.cachedValue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import {
|
|||||||
ExecutionContext,
|
ExecutionContext,
|
||||||
ExecutionContextModifier,
|
ExecutionContextModifier,
|
||||||
ExecutorFactory,
|
ExecutorFactory,
|
||||||
|
LoggerFactory,
|
||||||
SmartWeaveError,
|
SmartWeaveError,
|
||||||
SmartWeaveErrorType
|
SmartWeaveErrorType
|
||||||
} from '@smartweave';
|
} 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..
|
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.
|
...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>> {
|
async modify(state: State, executionContext: ExecutionContext<State, Api>): Promise<ExecutionContext<State, Api>> {
|
||||||
const contractTxId = executionContext.contractDefinition.txId;
|
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 currentSrcTxId = executionContext.contractDefinition.srcTxId;
|
||||||
|
|
||||||
const settings =
|
const settings =
|
||||||
@@ -57,7 +60,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
|
|||||||
canEvolve = true;
|
canEvolve = true;
|
||||||
}
|
}
|
||||||
if (evolve && /[a-z0-9_-]{43}/i.test(evolve) && canEvolve) {
|
if (evolve && /[a-z0-9_-]{43}/i.test(evolve) && canEvolve) {
|
||||||
console.log('Checking evolve: ', {
|
logger.debug('Checking evolve: %o', {
|
||||||
current: currentSrcTxId,
|
current: currentSrcTxId,
|
||||||
evolve
|
evolve
|
||||||
});
|
});
|
||||||
@@ -65,7 +68,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
|
|||||||
if (currentSrcTxId !== evolve) {
|
if (currentSrcTxId !== evolve) {
|
||||||
try {
|
try {
|
||||||
// note: that's really nasty IMO - loading original contract definition, but forcing different sourceTxId...
|
// 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 newContractDefinition = await this.definitionLoader.load(contractTxId, evolve);
|
||||||
const newHandler = await this.executorFactory.create(newContractDefinition);
|
const newHandler = await this.executorFactory.create(newContractDefinition);
|
||||||
|
|
||||||
@@ -74,7 +77,7 @@ export class Evolve<State extends EvolveCompatibleState, Api> implements Executi
|
|||||||
contractDefinition: newContractDefinition,
|
contractDefinition: newContractDefinition,
|
||||||
handler: newHandler
|
handler: newHandler
|
||||||
};
|
};
|
||||||
console.log('evolved to: ', {
|
logger.verbose('evolved to: %o', {
|
||||||
txId: modifiedContext.contractDefinition.txId,
|
txId: modifiedContext.contractDefinition.txId,
|
||||||
srcTxId: modifiedContext.contractDefinition.srcTxId
|
srcTxId: modifiedContext.contractDefinition.srcTxId
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"target": "es2015",
|
"sourceMap": true,
|
||||||
|
"target": "es2019",
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"declaration": true,
|
"declaration": true,
|
||||||
"outDir": "./lib",
|
"outDir": "./lib",
|
||||||
@@ -14,9 +15,10 @@
|
|||||||
"@core": ["core/index"],
|
"@core": ["core/index"],
|
||||||
"@legacy": ["legacy/index"],
|
"@legacy": ["legacy/index"],
|
||||||
"@plugins": ["plugins/index"],
|
"@plugins": ["plugins/index"],
|
||||||
|
"@logging": ["logging/index"],
|
||||||
"@smartweave": ["index"],
|
"@smartweave": ["index"],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"exclude": ["node_modules", "**/__tests__/*"]
|
"exclude": ["node_modules", "**/__tests__/*", "src/_scripts"]
|
||||||
}
|
}
|
||||||
|
|||||||
180
yarn.lock
180
yarn.lock
@@ -365,6 +365,15 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
"@cspotcode/source-map-consumer" "0.8.0"
|
"@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":
|
"@eslint/eslintrc@^0.4.3":
|
||||||
version "0.4.3"
|
version "0.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
|
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c"
|
||||||
@@ -1496,6 +1505,11 @@ async-retry@^1.2.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
retry "0.13.1"
|
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:
|
asynckit@^0.4.0:
|
||||||
version "0.4.0"
|
version "0.4.0"
|
||||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
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"
|
resolved "https://registry.yarnpkg.com/collect-v8-coverage/-/collect-v8-coverage-1.0.1.tgz#cc2c8e94fc18bbdffe64d6534570c8a673b27f59"
|
||||||
integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==
|
integrity sha512-iBPtljfCNcTKNAto0KEtDfZ3qzjJvqE3aTGZsbhjSBlorqpXJlaWWtPO35D+ZImoC3KWejX64o+yPGxhWSTzfg==
|
||||||
|
|
||||||
color-convert@^1.9.0:
|
color-convert@^1.9.0, color-convert@^1.9.1:
|
||||||
version "1.9.3"
|
version "1.9.3"
|
||||||
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
|
||||||
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
|
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"
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
|
||||||
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=
|
||||||
|
|
||||||
color-name@~1.1.4:
|
color-name@^1.0.0, color-name@~1.1.4:
|
||||||
version "1.1.4"
|
version "1.1.4"
|
||||||
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
|
||||||
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
|
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:
|
colorette@1.2.1:
|
||||||
version "1.2.1"
|
version "1.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.1.tgz#4d0b921325c14faf92633086a536db6e89564b1b"
|
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"
|
resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.3.0.tgz#ff45d2f0edb244069d3b772adeb04fed38d0a0af"
|
||||||
integrity sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==
|
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:
|
combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6:
|
||||||
version "1.0.8"
|
version "1.0.8"
|
||||||
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
|
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"
|
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
|
||||||
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
|
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:
|
encodeurl@^1.0.2:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
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"
|
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
|
||||||
integrity sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=
|
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:
|
fastq@^1.6.0:
|
||||||
version "1.12.0"
|
version "1.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794"
|
resolved "https://registry.yarnpkg.com/fastq/-/fastq-1.12.0.tgz#ed7b6ab5d62393fb2cc591c853652a5c318bf794"
|
||||||
@@ -2596,6 +2649,11 @@ fb-watchman@^2.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
bser "2.1.1"
|
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:
|
figlet@^1.5.0:
|
||||||
version "1.5.2"
|
version "1.5.2"
|
||||||
resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.5.2.tgz#dda34ff233c9a48e36fcff6741aeb5bafe49b634"
|
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"
|
resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561"
|
||||||
integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA==
|
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:
|
follow-redirects@^1.10.0:
|
||||||
version "1.14.2"
|
version "1.14.2"
|
||||||
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.2.tgz#cecb825047c00f5e66b142f90fed4f515dec789b"
|
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"
|
once "^1.3.0"
|
||||||
wrappy "1"
|
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"
|
version "2.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
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"
|
resolved "https://registry.yarnpkg.com/interpret/-/interpret-2.2.0.tgz#1a78a0b5965c40a5416d007ad6f50ad27c417df9"
|
||||||
integrity sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==
|
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:
|
is-bigint@^1.0.1:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3"
|
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"
|
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||||
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
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"
|
version "2.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
|
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.0.tgz#2dfefe720c6ba525d9ebd909950f0515316c89a3"
|
||||||
integrity sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==
|
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"
|
type-is "^1.6.16"
|
||||||
vary "^1.1.2"
|
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:
|
leven@^3.1.0:
|
||||||
version "3.1.0"
|
version "3.1.0"
|
||||||
resolved "https://registry.yarnpkg.com/leven/-/leven-3.1.0.tgz#77891de834064cccba82ae7842bb6b14a13ed7f2"
|
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"
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||||
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
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:
|
loglevel@^1.6.7, loglevel@^1.7.0:
|
||||||
version "1.7.1"
|
version "1.7.1"
|
||||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197"
|
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.7.1.tgz#005fde2f5e6e47068f935ff28573e125ef72f197"
|
||||||
@@ -4409,6 +4493,13 @@ once@^1.3.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
wrappy "1"
|
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:
|
onetime@^5.1.0, onetime@^5.1.2:
|
||||||
version "5.1.2"
|
version "5.1.2"
|
||||||
resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e"
|
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"
|
resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0"
|
||||||
integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==
|
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"
|
version "2.3.7"
|
||||||
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||||
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
||||||
@@ -4709,6 +4800,15 @@ readable-stream@2, readable-stream@^2.0.6:
|
|||||||
string_decoder "~1.1.1"
|
string_decoder "~1.1.1"
|
||||||
util-deprecate "~1.0.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:
|
rechoir@0.7.0:
|
||||||
version "0.7.0"
|
version "0.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.7.0.tgz#32650fd52c21ab252aa5d65b19310441c7e03aca"
|
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"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
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"
|
version "5.2.1"
|
||||||
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6"
|
||||||
integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==
|
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"
|
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||||
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
|
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:
|
sisteransi@^1.0.5:
|
||||||
version "1.0.5"
|
version "1.0.5"
|
||||||
resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed"
|
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"
|
safer-buffer "^2.0.2"
|
||||||
tweetnacl "~0.14.0"
|
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:
|
stack-utils@^2.0.3:
|
||||||
version "2.0.3"
|
version "2.0.3"
|
||||||
resolved "https://registry.yarnpkg.com/stack-utils/-/stack-utils-2.0.3.tgz#cd5f030126ff116b78ccb3c027fe302713b61277"
|
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"
|
call-bind "^1.0.2"
|
||||||
define-properties "^1.1.3"
|
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:
|
string_decoder@~1.1.1:
|
||||||
version "1.1.1"
|
version "1.1.1"
|
||||||
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||||
@@ -5159,6 +5278,11 @@ strip-ansi@^6.0.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
ansi-regex "^5.0.0"
|
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:
|
strip-bom@^4.0.0:
|
||||||
version "4.0.0"
|
version "4.0.0"
|
||||||
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-4.0.0.tgz#9c3505c1db45bcedca3d9cf7a16f5c5aa3901878"
|
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"
|
glob "^7.1.4"
|
||||||
minimatch "^3.0.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:
|
text-table@^0.2.0:
|
||||||
version "0.2.0"
|
version "0.2.0"
|
||||||
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
|
||||||
@@ -5371,6 +5500,11 @@ tr46@^2.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.1"
|
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:
|
ts-invariant@^0.4.0:
|
||||||
version "0.4.4"
|
version "0.4.4"
|
||||||
resolved "https://registry.yarnpkg.com/ts-invariant/-/ts-invariant-0.4.4.tgz#97a523518688f93aafad01b0e80eb803eb2abd86"
|
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"
|
string-argv "^0.1.1"
|
||||||
strip-ansi "^6.0.0"
|
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:
|
tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.0, tslib@^1.9.3:
|
||||||
version "1.14.1"
|
version "1.14.1"
|
||||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
|
||||||
@@ -5546,7 +5689,7 @@ uri-js@^4.2.2:
|
|||||||
dependencies:
|
dependencies:
|
||||||
punycode "^2.1.0"
|
punycode "^2.1.0"
|
||||||
|
|
||||||
util-deprecate@~1.0.1:
|
util-deprecate@^1.0.1, util-deprecate@~1.0.1:
|
||||||
version "1.0.2"
|
version "1.0.2"
|
||||||
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||||
@@ -5684,6 +5827,29 @@ wide-align@^1.1.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
string-width "^1.0.2 || 2"
|
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:
|
word-wrap@^1.2.3, word-wrap@~1.2.3:
|
||||||
version "1.2.3"
|
version "1.2.3"
|
||||||
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
|
resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c"
|
||||||
|
|||||||
Reference in New Issue
Block a user