UNPKG

@kubiklabs/wasmkit

Version:

Wasmkit is a development environment to compile, deploy, test, run cosmwasm contracts on different networks.

25 lines (24 loc) 966 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.disableReplWriterShowProxy = exports.isNodeCalledWithoutAScript = void 0; function isNodeCalledWithoutAScript() { const script = process.argv[1]; return script === undefined || script.trim() === ''; } exports.isNodeCalledWithoutAScript = isNodeCalledWithoutAScript; /** * Starting at node 10, proxies are shown in the console by default, instead * of actually inspecting them. This makes all our lazy loading efforts wicked, * so we disable it in wasmkit/register. */ function disableReplWriterShowProxy() { const repl = require('repl'); // eslint-disable-line @typescript-eslint/no-var-requires if (repl.writer.options) { Object.defineProperty(repl.writer.options, 'showProxy', { value: false, writable: false, configurable: false }); } } exports.disableReplWriterShowProxy = disableReplWriterShowProxy;