@marinade.finance/cli-common
Advanced tools
Comparing version 1.1.0 to 2.0.0
{ | ||
"name": "@marinade.finance/cli-common", | ||
"version": "1.1.0", | ||
"version": "2.0.0", | ||
"description": "CLI tooling", | ||
@@ -25,19 +25,20 @@ "repository": { | ||
"devDependencies": { | ||
"pino": "^8.15.1", | ||
"@solana/web3.js": "^1.78.5", | ||
"@marinade.finance/web3js-common": "^1.1.0", | ||
"@types/expand-tilde": "^2.0.0", | ||
"bn.js": "^5.2.1", | ||
"borsh": "^0.7.0", | ||
"@types/expand-tilde": "^2.0.0", | ||
"bs58": "^5.0.0", | ||
"expand-tilde": "^2.0.2", | ||
"bs58": "^5.0.0", | ||
"bn.js": "^5.2.1", | ||
"@types/bn.js": "^5.1.0", | ||
"pino": "^8.15.1", | ||
"yaml": "^2.3.2" | ||
}, | ||
"peerDependencies": { | ||
"pino": "^8.15.1", | ||
"@solana/web3.js": "^1.78.5", | ||
"@marinade.finance/web3js-common": "^1.1.0", | ||
"bn.js": "^5.2.1", | ||
"borsh": "^0.7.0", | ||
"bs58": "^5.0.0", | ||
"expand-tilde": "^2.0.2", | ||
"bs58": "^5.0.0", | ||
"bn.js": "^5.2.1", | ||
"pino": "^8.15.1", | ||
"yaml": "^2.3.2" | ||
@@ -44,0 +45,0 @@ }, |
import { Logger } from 'pino'; | ||
import { Wallet } from './wallet'; | ||
import { Wallet } from '@marinade.finance/web3js-common'; | ||
import { Transaction, VersionedTransaction, PublicKey } from '@solana/web3.js'; | ||
@@ -4,0 +4,0 @@ export declare function getContext(): Context; |
import { Transaction, VersionedTransaction } from '@solana/web3.js'; | ||
export interface WithCommandName { | ||
readonly name: string; | ||
readonly age: number; | ||
} | ||
export declare class CliCommandError extends Error { | ||
import { ExecutionError } from '@marinade.finance/web3js-common'; | ||
export declare class CliCommandError extends ExecutionError { | ||
readonly cause?: Error; | ||
@@ -19,6 +16,3 @@ readonly logs?: string[]; | ||
}); | ||
messageWithCause(): string; | ||
static fromMsg(msg: string): CliCommandError; | ||
get [Symbol.toStringTag](): string; | ||
static get [Symbol.species](): typeof CliCommandError; | ||
} |
@@ -6,3 +6,4 @@ "use strict"; | ||
const context_1 = require("./context"); | ||
class CliCommandError extends Error { | ||
const web3js_common_1 = require("@marinade.finance/web3js-common"); | ||
class CliCommandError extends web3js_common_1.ExecutionError { | ||
constructor({ commandName, valueName, value, msg, cause, logs, transaction, }) { | ||
@@ -21,31 +22,9 @@ if (commandName === undefined) { | ||
} | ||
super(errorMessage); | ||
this.cause = cause; | ||
this.logs = logs; | ||
this.transaction = transaction; | ||
// restore prototype chain | ||
const actualProto = new.target.prototype; | ||
if (Object.setPrototypeOf) { | ||
Object.setPrototypeOf(this, actualProto); | ||
} | ||
else { | ||
// eslint-disable-next-line | ||
this.proto = actualProto; | ||
} | ||
super({ msg: errorMessage, cause, logs, transaction }); | ||
} | ||
messageWithCause() { | ||
const causeMessage = this.cause ? '; caused: ' + this.cause.message : ''; | ||
return this.message + causeMessage; | ||
} | ||
static fromMsg(msg) { | ||
return new CliCommandError({ msg }); | ||
} | ||
get [Symbol.toStringTag]() { | ||
return 'CliCommandError'; | ||
} | ||
static get [Symbol.species]() { | ||
return CliCommandError; | ||
} | ||
} | ||
exports.CliCommandError = CliCommandError; | ||
//# sourceMappingURL=error.js.map |
@@ -0,8 +1,5 @@ | ||
export * from './context'; | ||
export * from './error'; | ||
export * from './formatter'; | ||
export * from './parsers'; | ||
export * from './error'; | ||
export * from './context'; | ||
export * from './tx'; | ||
export * from './txToBase64'; | ||
export * from './wallet'; | ||
export * from './createTempFileKeypair'; | ||
export * from './pinoLogging'; |
@@ -17,10 +17,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./context"), exports); | ||
__exportStar(require("./error"), exports); | ||
__exportStar(require("./formatter"), exports); | ||
__exportStar(require("./parsers"), exports); | ||
__exportStar(require("./error"), exports); | ||
__exportStar(require("./context"), exports); | ||
__exportStar(require("./tx"), exports); | ||
__exportStar(require("./txToBase64"), exports); | ||
__exportStar(require("./wallet"), exports); | ||
__exportStar(require("./createTempFileKeypair"), exports); | ||
__exportStar(require("./pinoLogging"), exports); | ||
//# sourceMappingURL=index.js.map |
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
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
2
28239
8
19
493