Socket
Socket
Sign inDemoInstall

@near-js/utils

Package Overview
Dependencies
Maintainers
2
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@near-js/utils - npm Package Compare versions

Comparing version 0.2.2 to 0.3.0-next.0

2

lib/constants.d.ts

@@ -1,2 +0,2 @@

export declare const DEFAULT_FUNCTION_CALL_GAS: bigint;
export declare const DEFAULT_FUNCTION_CALL_GAS = 30000000000000n;
//# sourceMappingURL=constants.d.ts.map

@@ -1,4 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_FUNCTION_CALL_GAS = void 0;
// Default amount of gas to be sent with the function calls. Used to pay for the fees

@@ -10,2 +7,2 @@ // incurred while running the contract execution. The unused amount will be refunded back to

// For discussion see https://github.com/nearprotocol/NEPs/issues/67
exports.DEFAULT_FUNCTION_CALL_GAS = BigInt('30000000000000');
export const DEFAULT_FUNCTION_CALL_GAS = 30000000000000n;

@@ -66,3 +66,5 @@ {

"Timeout": "Timeout exceeded",
"Closed": "Connection closed"
"Closed": "Connection closed",
"ShardCongested": "Shard {{shard_id}} rejected the transaction due to congestion level {{congestion_level}}, try again later",
"ShardStuck": "Shard {{shard_id}} rejected the transaction because it missed {{missed_chunks}} chunks and needs to recover before accepting new transactions, try again later"
}

@@ -1,10 +0,6 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.logWarning = void 0;
const logger_1 = require("../logger");
import { Logger } from '../logger';
/** @deprecated */
function logWarning(...args) {
export function logWarning(...args) {
const [message, ...optionalParams] = args;
logger_1.Logger.warn(message, ...optionalParams);
Logger.warn(message, ...optionalParams);
}
exports.logWarning = logWarning;

@@ -1,11 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.parseRpcError = exports.parseResultError = exports.getErrorTypeFromErrorMessage = exports.formatError = exports.ServerError = exports.logWarning = void 0;
var errors_1 = require("./errors");
Object.defineProperty(exports, "logWarning", { enumerable: true, get: function () { return errors_1.logWarning; } });
var rpc_errors_1 = require("./rpc_errors");
Object.defineProperty(exports, "ServerError", { enumerable: true, get: function () { return rpc_errors_1.ServerError; } });
Object.defineProperty(exports, "formatError", { enumerable: true, get: function () { return rpc_errors_1.formatError; } });
Object.defineProperty(exports, "getErrorTypeFromErrorMessage", { enumerable: true, get: function () { return rpc_errors_1.getErrorTypeFromErrorMessage; } });
Object.defineProperty(exports, "parseResultError", { enumerable: true, get: function () { return rpc_errors_1.parseResultError; } });
Object.defineProperty(exports, "parseRpcError", { enumerable: true, get: function () { return rpc_errors_1.parseRpcError; } });
export { logWarning } from './errors';
export { ServerError, formatError, getErrorTypeFromErrorMessage, parseResultError, parseRpcError, } from './rpc_errors';

@@ -135,2 +135,3 @@ {

"final_postponed_receipts_balance": "",
"forwarded_buffered_receipts_balance": "",
"incoming_receipts_balance": "",

@@ -140,2 +141,3 @@ "incoming_validator_rewards": "",

"initial_postponed_receipts_balance": "",
"new_buffered_receipts_balance": "",
"new_delayed_receipts_balance": "",

@@ -567,3 +569,6 @@ "other_burnt_amount": "",

"ActionsValidation",
"TransactionSizeExceeded"
"TransactionSizeExceeded",
"StorageError",
"ShardCongested",
"ShardStuck"
],

@@ -725,2 +730,10 @@ "props": {}

},
"ReceiptSizeExceeded": {
"name": "ReceiptSizeExceeded",
"subtypes": [],
"props": {
"limit": "",
"size": ""
}
},
"ReceiptValidationError": {

@@ -735,3 +748,4 @@ "name": "ReceiptValidationError",

"NumberInputDataDependenciesExceeded",
"ActionsValidation"
"ActionsValidation",
"ReceiptSizeExceeded"
],

@@ -766,2 +780,18 @@ "props": {}

},
"ShardCongested": {
"name": "ShardCongested",
"subtypes": [],
"props": {
"congestion_level": "",
"shard_id": ""
}
},
"ShardStuck": {
"name": "ShardStuck",
"subtypes": [],
"props": {
"missed_chunks": "",
"shard_id": ""
}
},
"SignerDoesNotExist": {

@@ -768,0 +798,0 @@ "name": "SignerDoesNotExist",

@@ -1,23 +0,17 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getErrorTypeFromErrorMessage = exports.formatError = exports.parseResultError = exports.parseRpcError = exports.ServerError = void 0;
const types_1 = require("@near-js/types");
const mustache_1 = __importDefault(require("mustache"));
const format_1 = require("../format");
const error_messages_json_1 = __importDefault(require("./error_messages.json"));
const rpc_error_schema_json_1 = __importDefault(require("./rpc_error_schema.json"));
import { TypedError } from '@near-js/types';
import Mustache from 'mustache';
import { formatNearAmount } from '../format';
import messages from './error_messages.json';
import schema from './rpc_error_schema.json';
const mustacheHelpers = {
formatNear: () => (n, render) => (0, format_1.formatNearAmount)(render(n))
formatNear: () => (n, render) => formatNearAmount(render(n))
};
class ServerError extends types_1.TypedError {
export class ServerError extends TypedError {
}
exports.ServerError = ServerError;
class ServerTransactionError extends ServerError {
transaction_outcome;
}
function parseRpcError(errorObj) {
export function parseRpcError(errorObj) {
const result = {};
const errorClassName = walkSubtype(errorObj, rpc_error_schema_json_1.default.schema, result, '');
const errorClassName = walkSubtype(errorObj, schema.schema, result, '');
// NOTE: This assumes that all errors extend TypedError

@@ -28,4 +22,3 @@ const error = new ServerError(formatError(errorClassName, result), errorClassName);

}
exports.parseRpcError = parseRpcError;
function parseResultError(result) {
export function parseResultError(result) {
const server_error = parseRpcError(result.status.Failure);

@@ -39,10 +32,11 @@ const server_tx_error = new ServerTransactionError();

}
exports.parseResultError = parseResultError;
function formatError(errorClassName, errorData) {
if (typeof error_messages_json_1.default[errorClassName] === 'string') {
return mustache_1.default.render(error_messages_json_1.default[errorClassName], Object.assign(Object.assign({}, errorData), mustacheHelpers));
export function formatError(errorClassName, errorData) {
if (typeof messages[errorClassName] === 'string') {
return Mustache.render(messages[errorClassName], {
...errorData,
...mustacheHelpers
});
}
return JSON.stringify(errorData);
}
exports.formatError = formatError;
/**

@@ -90,3 +84,3 @@ * Walks through defined schema returning error(s) recursively

}
function getErrorTypeFromErrorMessage(errorMessage, errorType) {
export function getErrorTypeFromErrorMessage(errorMessage, errorType) {
// This function should be removed when JSON RPC starts returning typed errors.

@@ -114,3 +108,2 @@ switch (true) {

}
exports.getErrorTypeFromErrorMessage = getErrorTypeFromErrorMessage;
/**

@@ -117,0 +110,0 @@ * Helper function determining if the argument is an object

@@ -1,20 +0,14 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.baseDecode = exports.baseEncode = exports.parseNearAmount = exports.formatNearAmount = exports.NEAR_NOMINATION = exports.NEAR_NOMINATION_EXP = void 0;
const bs58_1 = __importDefault(require("bs58"));
import bs58 from "bs58";
/**
* Exponent for calculating how many indivisible units are there in one NEAR. See {@link NEAR_NOMINATION}.
*/
exports.NEAR_NOMINATION_EXP = 24;
export const NEAR_NOMINATION_EXP = 24;
/**
* Number of indivisible units in one NEAR. Derived from {@link NEAR_NOMINATION_EXP}.
*/
exports.NEAR_NOMINATION = BigInt(10) ** BigInt(exports.NEAR_NOMINATION_EXP);
export const NEAR_NOMINATION = 10n ** BigInt(NEAR_NOMINATION_EXP);
// Pre-calculate offsets used for rounding to different number of digits
const ROUNDING_OFFSETS = [];
const BN10 = BigInt(10);
for (let i = 0, offset = BigInt(5); i < exports.NEAR_NOMINATION_EXP; i++, offset = offset * BN10) {
const BN10 = 10n;
for (let i = 0, offset = 5n; i < NEAR_NOMINATION_EXP; i++, offset = offset * BN10) {
ROUNDING_OFFSETS[i] = offset;

@@ -30,7 +24,7 @@ }

*/
function formatNearAmount(balance, fracDigits = exports.NEAR_NOMINATION_EXP) {
export function formatNearAmount(balance, fracDigits = NEAR_NOMINATION_EXP) {
let balanceBN = BigInt(balance);
if (fracDigits !== exports.NEAR_NOMINATION_EXP) {
if (fracDigits !== NEAR_NOMINATION_EXP) {
// Adjust balance for rounding at given number of digits
const roundingExp = exports.NEAR_NOMINATION_EXP - fracDigits - 1;
const roundingExp = NEAR_NOMINATION_EXP - fracDigits - 1;
if (roundingExp > 0) {

@@ -41,10 +35,9 @@ balanceBN += ROUNDING_OFFSETS[roundingExp];

balance = balanceBN.toString();
const wholeStr = balance.substring(0, balance.length - exports.NEAR_NOMINATION_EXP) || "0";
const wholeStr = balance.substring(0, balance.length - NEAR_NOMINATION_EXP) || "0";
const fractionStr = balance
.substring(balance.length - exports.NEAR_NOMINATION_EXP)
.padStart(exports.NEAR_NOMINATION_EXP, "0")
.substring(balance.length - NEAR_NOMINATION_EXP)
.padStart(NEAR_NOMINATION_EXP, "0")
.substring(0, fracDigits);
return trimTrailingZeroes(`${formatWithCommas(wholeStr)}.${fractionStr}`);
}
exports.formatNearAmount = formatNearAmount;
/**

@@ -57,3 +50,3 @@ * Convert human readable NEAR amount to internal indivisible units.

*/
function parseNearAmount(amt) {
export function parseNearAmount(amt) {
if (!amt) {

@@ -66,8 +59,7 @@ return null;

const fracPart = split[1] || "";
if (split.length > 2 || fracPart.length > exports.NEAR_NOMINATION_EXP) {
if (split.length > 2 || fracPart.length > NEAR_NOMINATION_EXP) {
throw new Error(`Cannot parse '${amt}' as NEAR amount`);
}
return trimLeadingZeroes(wholePart + fracPart.padEnd(exports.NEAR_NOMINATION_EXP, "0"));
return trimLeadingZeroes(wholePart + fracPart.padEnd(NEAR_NOMINATION_EXP, "0"));
}
exports.parseNearAmount = parseNearAmount;
/**

@@ -118,3 +110,3 @@ * Removes commas from the input

*/
function baseEncode(value) {
export function baseEncode(value) {
if (typeof value === "string") {

@@ -127,5 +119,4 @@ const bytes = [];

}
return bs58_1.default.encode(value);
return bs58.encode(value);
}
exports.baseEncode = baseEncode;
/**

@@ -136,5 +127,4 @@ * Decodes a base58 string into a Uint8Array

*/
function baseDecode(value) {
return new Uint8Array(bs58_1.default.decode(value));
export function baseDecode(value) {
return new Uint8Array(bs58.decode(value));
}
exports.baseDecode = baseDecode;

@@ -1,24 +0,8 @@

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./constants"), exports);
__exportStar(require("./errors"), exports);
__exportStar(require("./format"), exports);
__exportStar(require("./logging"), exports);
__exportStar(require("./provider"), exports);
__exportStar(require("./validators"), exports);
__exportStar(require("./logger"), exports);
__exportStar(require("./utils"), exports);
export * from './constants';
export * from './errors';
export * from './format';
export * from './logging';
export * from './provider';
export * from './validators';
export * from './logger';
export * from './utils';

@@ -1,11 +0,9 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConsoleLogger = void 0;
class ConsoleLogger {
export class ConsoleLogger {
logLevels;
constructor(logLevels) {
this.logLevels = logLevels;
this.isLevelEnabled = (level) => {
return this.logLevels.includes(level);
};
}
isLevelEnabled = (level) => {
return this.logLevels.includes(level);
};
print(level, message, ...optionalParams) {

@@ -56,2 +54,1 @@ switch (level) {

}
exports.ConsoleLogger = ConsoleLogger;

@@ -0,3 +1,4 @@

export { ConsoleLogger } from './console.logger';
export { Logger } from './logger';
export type { LoggerService } from './interface';
//# sourceMappingURL=index.d.ts.map

@@ -1,5 +0,2 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logger = void 0;
var logger_1 = require("./logger");
Object.defineProperty(exports, "Logger", { enumerable: true, get: function () { return logger_1.Logger; } });
export { ConsoleLogger } from './console.logger';
export { Logger } from './logger';

@@ -1,2 +0,1 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
export {};

@@ -1,6 +0,2 @@

"use strict";
var _a;
Object.defineProperty(exports, "__esModule", { value: true });
exports.Logger = void 0;
const console_logger_1 = require("./console.logger");
import { ConsoleLogger } from './console.logger';
const DEFAULT_LOG_LEVELS = [

@@ -14,12 +10,13 @@ 'verbose',

];
const DEFAULT_LOGGER = typeof process === 'object' && process.env.NEAR_NO_LOGS
? undefined
: new console_logger_1.ConsoleLogger(DEFAULT_LOG_LEVELS);
const DEFAULT_LOGGER = new ConsoleLogger(DEFAULT_LOG_LEVELS);
/**
* Used to log the library messages
*/
class Logger {
export class Logger {
static instanceRef = DEFAULT_LOGGER;
static overrideLogger = (logger) => {
this.instanceRef = logger;
};
static error(message, ...optionalParams) {
var _b;
(_b = this.instanceRef) === null || _b === void 0 ? void 0 : _b.error(message, ...optionalParams);
this.instanceRef?.error(message, ...optionalParams);
}

@@ -30,4 +27,3 @@ /**

static log(message, ...optionalParams) {
var _b;
(_b = this.instanceRef) === null || _b === void 0 ? void 0 : _b.log(message, ...optionalParams);
this.instanceRef?.log(message, ...optionalParams);
}

@@ -38,4 +34,3 @@ /**

static warn(message, ...optionalParams) {
var _b;
(_b = this.instanceRef) === null || _b === void 0 ? void 0 : _b.warn(message, ...optionalParams);
this.instanceRef?.warn(message, ...optionalParams);
}

@@ -46,4 +41,3 @@ /**

static debug(message, ...optionalParams) {
var _b, _c;
(_c = (_b = this.instanceRef) === null || _b === void 0 ? void 0 : _b.debug) === null || _c === void 0 ? void 0 : _c.call(_b, message, ...optionalParams);
this.instanceRef?.debug?.(message, ...optionalParams);
}

@@ -54,15 +48,7 @@ /**

static verbose(message, ...optionalParams) {
var _b, _c;
(_c = (_b = this.instanceRef) === null || _b === void 0 ? void 0 : _b.verbose) === null || _c === void 0 ? void 0 : _c.call(_b, message, ...optionalParams);
this.instanceRef?.verbose?.(message, ...optionalParams);
}
static fatal(message, ...optionalParams) {
var _b, _c;
(_c = (_b = this.instanceRef) === null || _b === void 0 ? void 0 : _b.fatal) === null || _c === void 0 ? void 0 : _c.call(_b, message, ...optionalParams);
this.instanceRef?.fatal?.(message, ...optionalParams);
}
}
exports.Logger = Logger;
_a = Logger;
Logger.instanceRef = DEFAULT_LOGGER;
Logger.overrideLogger = (logger) => {
_a.instanceRef = logger;
};

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.printTxOutcomeLogs = exports.printTxOutcomeLogsAndFailures = void 0;
const errors_1 = require("./errors");
const logger_1 = require("./logger");
import { parseRpcError } from './errors';
import { Logger } from './logger';
/**

@@ -12,3 +9,3 @@ * Parse and print details from a query execution response

*/
function printTxOutcomeLogsAndFailures({ contractId, outcome, }) {
export function printTxOutcomeLogsAndFailures({ contractId, outcome, }) {
const flatLogs = [outcome.transaction_outcome, ...outcome.receipts_outcome]

@@ -22,3 +19,3 @@ .reduce((acc, it) => {

failure: typeof it.outcome.status === 'object' && it.outcome.status.Failure !== undefined
? (0, errors_1.parseRpcError)(it.outcome.status.Failure)
? parseRpcError(it.outcome.status.Failure)
: null

@@ -32,3 +29,3 @@ });

for (const result of flatLogs) {
logger_1.Logger.log(`Receipt${result.receiptIds.length > 1 ? 's' : ''}: ${result.receiptIds.join(', ')}`);
Logger.log(`Receipt${result.receiptIds.length > 1 ? 's' : ''}: ${result.receiptIds.join(', ')}`);
printTxOutcomeLogs({

@@ -40,7 +37,6 @@ contractId,

if (result.failure) {
logger_1.Logger.warn(`\tFailure [${contractId}]: ${result.failure}`);
Logger.warn(`\tFailure [${contractId}]: ${result.failure}`);
}
}
}
exports.printTxOutcomeLogsAndFailures = printTxOutcomeLogsAndFailures;
/**

@@ -53,7 +49,6 @@ * Format and print log output from a query execution response

*/
function printTxOutcomeLogs({ contractId, logs, prefix = '', }) {
export function printTxOutcomeLogs({ contractId, logs, prefix = '', }) {
for (const log of logs) {
logger_1.Logger.log(`${prefix}Log [${contractId}]: ${log}`);
Logger.log(`${prefix}Log [${contractId}]: ${log}`);
}
}
exports.printTxOutcomeLogs = printTxOutcomeLogs;

@@ -1,6 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTransactionLastResult = void 0;
/** @hidden */
function getTransactionLastResult(txResult) {
export function getTransactionLastResult(txResult) {
if (typeof txResult.status === 'object' && typeof txResult.status.SuccessValue === 'string') {

@@ -17,2 +14,1 @@ const value = Buffer.from(txResult.status.SuccessValue, 'base64').toString();

}
exports.getTransactionLastResult = getTransactionLastResult;

@@ -1,7 +0,3 @@

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sortBigIntAsc = void 0;
function sortBigIntAsc(a, b) {
export function sortBigIntAsc(a, b) {
return (a < b ? -1 : a > b ? 1 : 0);
}
exports.sortBigIntAsc = sortBigIntAsc;

@@ -1,9 +0,3 @@

"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.diffEpochValidators = exports.findSeatPrice = void 0;
const depd_1 = __importDefault(require("depd"));
const utils_1 = require("./utils");
import depd from 'depd';
import { sortBigIntAsc } from './utils';
/** Finds seat price given validators stakes and number of seats.

@@ -16,3 +10,3 @@ * Calculation follow the spec: https://nomicon.io/Economics/README.html#validator-selection

*/
function findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio, protocolVersion) {
export function findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio, protocolVersion) {
if (protocolVersion && protocolVersion < 49) {

@@ -22,3 +16,3 @@ return findSeatPriceForProtocolBefore49(validators, maxNumberOfSeats);

if (!minimumStakeRatio) {
const deprecate = (0, depd_1.default)('findSeatPrice(validators, maxNumberOfSeats)');
const deprecate = depd('findSeatPrice(validators, maxNumberOfSeats)');
deprecate('`use `findSeatPrice(validators, maxNumberOfSeats, minimumStakeRatio)` instead');

@@ -29,5 +23,4 @@ minimumStakeRatio = [1, 6250]; // hardcoded minimumStakeRation from 12/7/21

}
exports.findSeatPrice = findSeatPrice;
function findSeatPriceForProtocolBefore49(validators, numSeats) {
const stakes = validators.map(v => BigInt(v.stake)).sort(utils_1.sortBigIntAsc);
const stakes = validators.map(v => BigInt(v.stake)).sort(sortBigIntAsc);
const num = BigInt(numSeats);

@@ -39,7 +32,7 @@ const stakesSum = stakes.reduce((a, b) => a + b);

// assert stakesSum >= numSeats
let left = BigInt(1), right = stakesSum + BigInt(1);
while (left !== right - BigInt(1)) {
const mid = (left + right) / BigInt(2);
let left = 1n, right = stakesSum + 1n;
while (left !== right - 1n) {
const mid = (left + right) / 2n;
let found = false;
let currentSum = BigInt(0);
let currentSum = 0n;
for (let i = 0; i < stakes.length; ++i) {

@@ -64,3 +57,3 @@ currentSum = currentSum + (stakes[i] / mid);

}
const stakes = validators.map(v => BigInt(v.stake)).sort(utils_1.sortBigIntAsc);
const stakes = validators.map(v => BigInt(v.stake)).sort(sortBigIntAsc);
const stakesSum = stakes.reduce((a, b) => a + b);

@@ -71,3 +64,3 @@ if (validators.length < maxNumberOfSeats) {

else {
return stakes[0] + BigInt(1);
return stakes[0] + 1n;
}

@@ -80,3 +73,3 @@ }

*/
function diffEpochValidators(currentValidators, nextValidators) {
export function diffEpochValidators(currentValidators, nextValidators) {
const validatorsMap = new Map();

@@ -92,2 +85,1 @@ currentValidators.forEach(v => validatorsMap.set(v.account_id, v));

}
exports.diffEpochValidators = diffEpochValidators;
{
"name": "@near-js/utils",
"version": "0.2.2",
"version": "0.3.0-next.0",
"description": "Common methods and constants for the NEAR API JavaScript client",
"main": "lib/index.js",
"type": "module",
"keywords": [],

@@ -13,9 +14,11 @@ "author": "",

"mustache": "4.0.0",
"@near-js/types": "0.2.1"
"@near-js/types": "0.3.0-next.0"
},
"devDependencies": {
"@types/node": "18.11.18",
"jest": "26.0.1",
"ts-jest": "26.5.6",
"typescript": "4.9.4"
"@jest/globals": "^29.7.0",
"@types/node": "20.0.0",
"jest": "29.7.0",
"ts-jest": "29.1.5",
"typescript": "5.4.5",
"tsconfig": "0.0.0"
},

@@ -28,6 +31,6 @@ "files": [

"compile": "tsc -p tsconfig.json",
"lint:ts": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts --no-eslintrc",
"lint:fix": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts --no-eslintrc && eslint -c ../../.eslintrc.js.yml test/**/*.js --no-eslintrc --fix --no-error-on-unmatched-pattern",
"test": "jest test"
"lint": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts test/**/*.ts --no-eslintrc",
"lint:fix": "eslint -c ../../.eslintrc.ts.yml src/**/*.ts test/**/*.ts --no-eslintrc --fix",
"test": "jest"
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc