UNPKG

truffle

Version:

Truffle - Simple development framework for Ethereum

624 lines (504 loc) 18.4 kB
#!/usr/bin/env node /******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 69037: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = { run: __webpack_require__(87365), meta: __webpack_require__(74770) }; /***/ }), /***/ 74770: /***/ ((module) => { module.exports = { command: "version", description: "Show version number and exit", builder: {}, help: { usage: "truffle version", options: [], allowedGlobalOptions: [] } }; /***/ }), /***/ 87365: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { module.exports = async function (options) { const { detectConfigOrDefault } = __webpack_require__(54708); const version = __webpack_require__(64146); const { logger } = options; const config = detectConfigOrDefault(options); version.logAll(logger, config); return; }; /***/ }), /***/ 54708: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { // Extracts the input flags --option & -option from the arguments of type `--option=value` or `--option value` or `--flag` or -flag const extractFlags = inputArguments => { // Get all the args that begins with `--`. This also includes `--option=value` const inputFlags = inputArguments.filter(flag => { return flag.startsWith("--") || flag.startsWith("-") ? flag : null; }); // Extract only the flags i.e `--option` from `--option=value` inputFlags.map((flag, i) => { let indexOfEqualsSign = flag.indexOf("="); if (indexOfEqualsSign > 0) { flag = flag.slice(0, indexOfEqualsSign); inputFlags.splice(i, 1, flag); } }); return inputFlags; }; const detectConfigOrDefault = options => { const Config = __webpack_require__(20553); try { return Config.detect(options); } catch (error) { // Suppress error when truffle can't find a config if (error.message === "Could not find suitable configuration file.") { return Config.default(); } else { throw error; } } }; module.exports = { extractFlags, detectConfigOrDefault }; /***/ }), /***/ 64146: /***/ ((module, __unused_webpack_exports, __webpack_require__) => { const pkg = __webpack_require__(73755); const { CompilerSupplier } = __webpack_require__(4273); const Config = __webpack_require__(20553); const info = config => { let bundleVersion; // NOTE: Webpack will replace BUNDLE_VERSION with a string. if (true) bundleVersion = "5.11.5"; let supplierOptions; if (config && config.compilers) { supplierOptions = { events: config.events, solcConfig: config.compilers.solc }; } else { const { events, compilers } = new Config(); const solcConfig = compilers.solc; supplierOptions = { events, solcConfig }; } const supplier = new CompilerSupplier(supplierOptions); return { core: pkg.version, bundle: bundleVersion, solc: supplier.version }; }; const logTruffle = (logger = console, versionInformation) => { const bundle = versionInformation.bundle ? `v${versionInformation.bundle}` : "(unbundled)"; logger.log(`Truffle ${bundle} (core: ${versionInformation.core})`); }; const logNode = (logger = console) => { logger.log(`Node ${process.version}`); }; const logSolidity = (logger = console, versionInformation, config) => { let solcVersion; if ( config && config.compilers && config.compilers.solc && config.compilers.solc.version ) { solcVersion = config.compilers.solc.version; logger.log(`Solidity - ${solcVersion} (solc-js)`); } else { const versionInformation = info(config); solcVersion = versionInformation.solc; logger.log(`Solidity v${solcVersion} (solc-js)`); } }; const logWeb3 = (logger = console) => { const web3Version = pkg.dependencies.web3; logger.log(`Web3.js v${web3Version}`); }; const logGanache = (logger = console) => { const ganacheVersion = pkg.dependencies.ganache; logger.log(`Ganache v${ganacheVersion}`); }; const logAll = (logger = console, config) => { const versionInformation = info(config); logTruffle(logger, versionInformation); logGanache(logger); logSolidity(logger, versionInformation, config); logNode(logger); logWeb3(logger); }; const logTruffleAndNode = (logger = console, config) => { const versionInformation = info(config); logTruffle(logger, versionInformation); logNode(logger); }; module.exports = { logAll, info, logTruffleAndNode }; /***/ }), /***/ 44516: /***/ ((module) => { "use strict"; module.exports = require("original-require"); /***/ }), /***/ 39491: /***/ ((module) => { "use strict"; module.exports = require("assert"); /***/ }), /***/ 50852: /***/ ((module) => { "use strict"; module.exports = require("async_hooks"); /***/ }), /***/ 14300: /***/ ((module) => { "use strict"; module.exports = require("buffer"); /***/ }), /***/ 32081: /***/ ((module) => { "use strict"; module.exports = require("child_process"); /***/ }), /***/ 22057: /***/ ((module) => { "use strict"; module.exports = require("constants"); /***/ }), /***/ 6113: /***/ ((module) => { "use strict"; module.exports = require("crypto"); /***/ }), /***/ 82361: /***/ ((module) => { "use strict"; module.exports = require("events"); /***/ }), /***/ 57147: /***/ ((module) => { "use strict"; module.exports = require("fs"); /***/ }), /***/ 73292: /***/ ((module) => { "use strict"; module.exports = require("fs/promises"); /***/ }), /***/ 13685: /***/ ((module) => { "use strict"; module.exports = require("http"); /***/ }), /***/ 95687: /***/ ((module) => { "use strict"; module.exports = require("https"); /***/ }), /***/ 98188: /***/ ((module) => { "use strict"; module.exports = require("module"); /***/ }), /***/ 41808: /***/ ((module) => { "use strict"; module.exports = require("net"); /***/ }), /***/ 22037: /***/ ((module) => { "use strict"; module.exports = require("os"); /***/ }), /***/ 71017: /***/ ((module) => { "use strict"; module.exports = require("path"); /***/ }), /***/ 85477: /***/ ((module) => { "use strict"; module.exports = require("punycode"); /***/ }), /***/ 63477: /***/ ((module) => { "use strict"; module.exports = require("querystring"); /***/ }), /***/ 14521: /***/ ((module) => { "use strict"; module.exports = require("readline"); /***/ }), /***/ 12781: /***/ ((module) => { "use strict"; module.exports = require("stream"); /***/ }), /***/ 71576: /***/ ((module) => { "use strict"; module.exports = require("string_decoder"); /***/ }), /***/ 24404: /***/ ((module) => { "use strict"; module.exports = require("tls"); /***/ }), /***/ 76224: /***/ ((module) => { "use strict"; module.exports = require("tty"); /***/ }), /***/ 57310: /***/ ((module) => { "use strict"; module.exports = require("url"); /***/ }), /***/ 73837: /***/ ((module) => { "use strict"; module.exports = require("util"); /***/ }), /***/ 59796: /***/ ((module) => { "use strict"; module.exports = require("zlib"); /***/ }), /***/ 73755: /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"name":"@truffle/core","description":"Core code for Truffle command line tool","license":"MIT","author":"consensys.net","homepage":"https://github.com/trufflesuite/truffle#readme","repository":{"type":"git","url":"https://github.com/trufflesuite/truffle.git","directory":"packages/core"},"bugs":{"url":"https://github.com/trufflesuite/truffle/issues"},"version":"5.11.5","bin":{"truffle":"./cli.js","truffle-exec":"./exec.js"},"scripts":{"prepare":"exit 0","test":"mocha ./test/** ./test/**/*.js ./test/**/**/*.js"},"dependencies":{"@truffle/artifactor":"^4.0.199","@truffle/box":"^2.1.81","@truffle/code-utils":"^3.0.4","@truffle/codec":"^0.17.3","@truffle/compile-common":"^0.9.8","@truffle/compile-solidity":"^6.0.79","@truffle/config":"^1.3.61","@truffle/contract":"^4.6.31","@truffle/dashboard":"^0.4.5","@truffle/db-loader":"^0.2.36","@truffle/debug-utils":"^6.0.57","@truffle/debugger":"^12.1.5","@truffle/decoder":"^6.1.5","@truffle/deployer":"^3.3.27","@truffle/environment":"^0.2.160","@truffle/error":"^0.2.2","@truffle/expect":"^0.1.7","@truffle/fetch-and-compile":"^0.5.56","@truffle/from-hardhat":"^0.2.20","@truffle/hdwallet":"^0.1.4","@truffle/interface-adapter":"^0.5.37","@truffle/migrate":"^3.3.48","@truffle/plugins":"^0.2.15","@truffle/preserve":"^0.2.17","@truffle/promise-tracker":"^0.1.7","@truffle/provider":"^0.3.13","@truffle/provisioner":"^0.2.84","@truffle/require":"^2.1.43","@truffle/resolver":"^9.0.53","@truffle/source-fetcher":"^1.0.44","@truffle/spinners":"^0.2.5","@truffle/test":"^0.2.7","@truffle/workflow-compile":"^4.0.71","JSONStream":"^1.3.5","address":"^1.1.2","chai":"^4.2.0","colors":"1.4.0","command-exists":"^1.2.8","conf":"^10.0.2","debug":"^4.3.1","del":"^2.2.0","ethereum-cryptography":"1.1.2","fs-extra":"^9.1.0","ganache":"7.9.1","get-port":"^5.1.1","get-random-values":"^1.2.2","glob":"^7.1.6","inquirer":"8.2.2","iter-tools":"^7.5.0","js-interpreter":"2.2.0","lodash":"^4.17.21","mixpanel":"^0.17.0","mocha":"10.1.0","node-emoji":"^1.8.1","original-require":"^1.0.1","sane":"^4.0.2","semver":"^7.5.4","source-map-support":"^0.5.19","spawn-args":"0.2.0","tmp":"^0.2.1","uuid":"^9.0.0","web3":"1.10.0","web3-utils":"1.10.0","xregexp":"^4.2.4","yargs":"^13.3.0"},"devDependencies":{"@truffle/blockchain-utils":"^0.1.9","app-module-path":"^2.2.0","chai-as-promised":"^7.1.1","memorystream":"^0.3.1","sinon":"^9.0.2"},"publishConfig":{"access":"public"},"authors":[{"name":"Tim Coulter","email":"tim@trufflesuite.com","url":"https://github.com/tcoulter"}],"namespace":"consensys","engines":{"node":"^16.20 || ^18.16 || >=20"},"gitHead":"a26df1ff53c01e6d82ad490338850360f6f970a9"}'); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ id: moduleId, /******/ loaded: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = __webpack_modules__; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = __webpack_module_cache__; /******/ /******/ // the startup function /******/ __webpack_require__.x = () => { /******/ // Load entry module and return exports /******/ var __webpack_exports__ = __webpack_require__.O(undefined, [5158,9129,6127,5674,6674,439,4957,553,4273], () => (__webpack_require__(69037))) /******/ __webpack_exports__ = __webpack_require__.O(__webpack_exports__); /******/ return __webpack_exports__; /******/ }; /******/ /************************************************************************/ /******/ /* webpack/runtime/amd options */ /******/ (() => { /******/ __webpack_require__.amdO = {}; /******/ })(); /******/ /******/ /* webpack/runtime/chunk loaded */ /******/ (() => { /******/ var deferred = []; /******/ __webpack_require__.O = (result, chunkIds, fn, priority) => { /******/ if(chunkIds) { /******/ priority = priority || 0; /******/ for(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1]; /******/ deferred[i] = [chunkIds, fn, priority]; /******/ return; /******/ } /******/ var notFulfilled = Infinity; /******/ for (var i = 0; i < deferred.length; i++) { /******/ var [chunkIds, fn, priority] = deferred[i]; /******/ var fulfilled = true; /******/ for (var j = 0; j < chunkIds.length; j++) { /******/ if ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) { /******/ chunkIds.splice(j--, 1); /******/ } else { /******/ fulfilled = false; /******/ if(priority < notFulfilled) notFulfilled = priority; /******/ } /******/ } /******/ if(fulfilled) { /******/ deferred.splice(i--, 1) /******/ var r = fn(); /******/ if (r !== undefined) result = r; /******/ } /******/ } /******/ return result; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/ensure chunk */ /******/ (() => { /******/ __webpack_require__.f = {}; /******/ // This file contains only the entry chunk. /******/ // The chunk loading function for additional chunks /******/ __webpack_require__.e = (chunkId) => { /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => { /******/ __webpack_require__.f[key](chunkId, promises); /******/ return promises; /******/ }, [])); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/get javascript chunk filename */ /******/ (() => { /******/ // This function allow to reference async chunks and sibling chunks for the entrypoint /******/ __webpack_require__.u = (chunkId) => { /******/ // return url for filenames based on template /******/ return "" + chunkId + ".bundled.js"; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/node module decorator */ /******/ (() => { /******/ __webpack_require__.nmd = (module) => { /******/ module.paths = []; /******/ if (!module.children) module.children = []; /******/ return module; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/require chunk loading */ /******/ (() => { /******/ // no baseURI /******/ /******/ // object to store loaded chunks /******/ // "1" means "loaded", otherwise not loaded yet /******/ var installedChunks = { /******/ 5872: 1 /******/ }; /******/ /******/ __webpack_require__.O.require = (chunkId) => (installedChunks[chunkId]); /******/ /******/ var installChunk = (chunk) => { /******/ var moreModules = chunk.modules, chunkIds = chunk.ids, runtime = chunk.runtime; /******/ for(var moduleId in moreModules) { /******/ if(__webpack_require__.o(moreModules, moduleId)) { /******/ __webpack_require__.m[moduleId] = moreModules[moduleId]; /******/ } /******/ } /******/ if(runtime) runtime(__webpack_require__); /******/ for(var i = 0; i < chunkIds.length; i++) /******/ installedChunks[chunkIds[i]] = 1; /******/ __webpack_require__.O(); /******/ }; /******/ /******/ // require() chunk loading for javascript /******/ __webpack_require__.f.require = (chunkId, promises) => { /******/ // "1" is the signal for "already loaded" /******/ if(!installedChunks[chunkId]) { /******/ if(true) { // all chunks have JS /******/ installChunk(require("./" + __webpack_require__.u(chunkId))); /******/ } else installedChunks[chunkId] = 1; /******/ } /******/ }; /******/ /******/ // no external install chunk /******/ /******/ // no HMR /******/ /******/ // no HMR manifest /******/ })(); /******/ /******/ /* webpack/runtime/startup chunk dependencies */ /******/ (() => { /******/ var next = __webpack_require__.x; /******/ __webpack_require__.x = () => { /******/ __webpack_require__.e(5158); /******/ __webpack_require__.e(9129); /******/ __webpack_require__.e(6127); /******/ __webpack_require__.e(5674); /******/ __webpack_require__.e(6674); /******/ __webpack_require__.e(439); /******/ __webpack_require__.e(4957); /******/ __webpack_require__.e(553); /******/ __webpack_require__.e(4273); /******/ return next(); /******/ }; /******/ })(); /******/ /************************************************************************/ /******/ /******/ // module cache are used so entry inlining is disabled /******/ // run startup /******/ var __webpack_exports__ = __webpack_require__.x(); /******/ var __webpack_export_target__ = exports; /******/ for(var i in __webpack_exports__) __webpack_export_target__[i] = __webpack_exports__[i]; /******/ if(__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, "__esModule", { value: true }); /******/ /******/ })() ; //# sourceMappingURL=version.bundled.js.map