@crunchdao/shared-cli 1.1.2 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11984,238 +11984,6 @@ var require_eventemitter3 = __commonJS({
11984
11984
  }
11985
11985
  });
11986
11986
 
11987
- // ../../node_modules/file-uri-to-path/index.js
11988
- var require_file_uri_to_path = __commonJS({
11989
- "../../node_modules/file-uri-to-path/index.js"(exports, module) {
11990
- "use strict";
11991
- var sep = __require("path").sep || "/";
11992
- module.exports = fileUriToPath;
11993
- function fileUriToPath(uri) {
11994
- if ("string" != typeof uri || uri.length <= 7 || "file://" != uri.substring(0, 7)) {
11995
- throw new TypeError("must pass in a file:// URI to convert to a file path");
11996
- }
11997
- var rest = decodeURI(uri.substring(7));
11998
- var firstSlash = rest.indexOf("/");
11999
- var host = rest.substring(0, firstSlash);
12000
- var path = rest.substring(firstSlash + 1);
12001
- if ("localhost" == host) host = "";
12002
- if (host) {
12003
- host = sep + sep + host;
12004
- }
12005
- path = path.replace(/^(.+)\|/, "$1:");
12006
- if (sep == "\\") {
12007
- path = path.replace(/\//g, "\\");
12008
- }
12009
- if (/^.+\:/.test(path)) {
12010
- } else {
12011
- path = sep + path;
12012
- }
12013
- return host + path;
12014
- }
12015
- }
12016
- });
12017
-
12018
- // ../../node_modules/bindings/bindings.js
12019
- var require_bindings = __commonJS({
12020
- "../../node_modules/bindings/bindings.js"(exports, module) {
12021
- "use strict";
12022
- var fs = __require("fs");
12023
- var path = __require("path");
12024
- var fileURLToPath2 = require_file_uri_to_path();
12025
- var join = path.join;
12026
- var dirname3 = path.dirname;
12027
- var exists = fs.accessSync && function(path2) {
12028
- try {
12029
- fs.accessSync(path2);
12030
- } catch (e) {
12031
- return false;
12032
- }
12033
- return true;
12034
- } || fs.existsSync || path.existsSync;
12035
- var defaults = {
12036
- arrow: process.env.NODE_BINDINGS_ARROW || " \u2192 ",
12037
- compiled: process.env.NODE_BINDINGS_COMPILED_DIR || "compiled",
12038
- platform: process.platform,
12039
- arch: process.arch,
12040
- nodePreGyp: "node-v" + process.versions.modules + "-" + process.platform + "-" + process.arch,
12041
- version: process.versions.node,
12042
- bindings: "bindings.node",
12043
- try: [
12044
- // node-gyp's linked version in the "build" dir
12045
- ["module_root", "build", "bindings"],
12046
- // node-waf and gyp_addon (a.k.a node-gyp)
12047
- ["module_root", "build", "Debug", "bindings"],
12048
- ["module_root", "build", "Release", "bindings"],
12049
- // Debug files, for development (legacy behavior, remove for node v0.9)
12050
- ["module_root", "out", "Debug", "bindings"],
12051
- ["module_root", "Debug", "bindings"],
12052
- // Release files, but manually compiled (legacy behavior, remove for node v0.9)
12053
- ["module_root", "out", "Release", "bindings"],
12054
- ["module_root", "Release", "bindings"],
12055
- // Legacy from node-waf, node <= 0.4.x
12056
- ["module_root", "build", "default", "bindings"],
12057
- // Production "Release" buildtype binary (meh...)
12058
- ["module_root", "compiled", "version", "platform", "arch", "bindings"],
12059
- // node-qbs builds
12060
- ["module_root", "addon-build", "release", "install-root", "bindings"],
12061
- ["module_root", "addon-build", "debug", "install-root", "bindings"],
12062
- ["module_root", "addon-build", "default", "install-root", "bindings"],
12063
- // node-pre-gyp path ./lib/binding/{node_abi}-{platform}-{arch}
12064
- ["module_root", "lib", "binding", "nodePreGyp", "bindings"]
12065
- ]
12066
- };
12067
- function bindings(opts) {
12068
- if (typeof opts == "string") {
12069
- opts = { bindings: opts };
12070
- } else if (!opts) {
12071
- opts = {};
12072
- }
12073
- Object.keys(defaults).map(function(i2) {
12074
- if (!(i2 in opts)) opts[i2] = defaults[i2];
12075
- });
12076
- if (!opts.module_root) {
12077
- opts.module_root = exports.getRoot(exports.getFileName());
12078
- }
12079
- if (path.extname(opts.bindings) != ".node") {
12080
- opts.bindings += ".node";
12081
- }
12082
- var requireFunc = typeof __webpack_require__ === "function" ? __non_webpack_require__ : __require;
12083
- var tries = [], i = 0, l = opts.try.length, n, b, err;
12084
- for (; i < l; i++) {
12085
- n = join.apply(
12086
- null,
12087
- opts.try[i].map(function(p) {
12088
- return opts[p] || p;
12089
- })
12090
- );
12091
- tries.push(n);
12092
- try {
12093
- b = opts.path ? requireFunc.resolve(n) : requireFunc(n);
12094
- if (!opts.path) {
12095
- b.path = n;
12096
- }
12097
- return b;
12098
- } catch (e) {
12099
- if (e.code !== "MODULE_NOT_FOUND" && e.code !== "QUALIFIED_PATH_RESOLUTION_FAILED" && !/not find/i.test(e.message)) {
12100
- throw e;
12101
- }
12102
- }
12103
- }
12104
- err = new Error(
12105
- "Could not locate the bindings file. Tried:\n" + tries.map(function(a) {
12106
- return opts.arrow + a;
12107
- }).join("\n")
12108
- );
12109
- err.tries = tries;
12110
- throw err;
12111
- }
12112
- module.exports = exports = bindings;
12113
- exports.getFileName = function getFileName(calling_file) {
12114
- var origPST = Error.prepareStackTrace, origSTL = Error.stackTraceLimit, dummy = {}, fileName;
12115
- Error.stackTraceLimit = 10;
12116
- Error.prepareStackTrace = function(e, st) {
12117
- for (var i = 0, l = st.length; i < l; i++) {
12118
- fileName = st[i].getFileName();
12119
- if (fileName !== __filename) {
12120
- if (calling_file) {
12121
- if (fileName !== calling_file) {
12122
- return;
12123
- }
12124
- } else {
12125
- return;
12126
- }
12127
- }
12128
- }
12129
- };
12130
- Error.captureStackTrace(dummy);
12131
- dummy.stack;
12132
- Error.prepareStackTrace = origPST;
12133
- Error.stackTraceLimit = origSTL;
12134
- var fileSchema = "file://";
12135
- if (fileName.indexOf(fileSchema) === 0) {
12136
- fileName = fileURLToPath2(fileName);
12137
- }
12138
- return fileName;
12139
- };
12140
- exports.getRoot = function getRoot(file) {
12141
- var dir = dirname3(file), prev;
12142
- while (true) {
12143
- if (dir === ".") {
12144
- dir = process.cwd();
12145
- }
12146
- if (exists(join(dir, "package.json")) || exists(join(dir, "node_modules"))) {
12147
- return dir;
12148
- }
12149
- if (prev === dir) {
12150
- throw new Error(
12151
- 'Could not find module root given file: "' + file + '". Do you have a `package.json` file? '
12152
- );
12153
- }
12154
- prev = dir;
12155
- dir = join(dir, "..");
12156
- }
12157
- };
12158
- }
12159
- });
12160
-
12161
- // ../../node_modules/bigint-buffer/dist/node.js
12162
- var require_node = __commonJS({
12163
- "../../node_modules/bigint-buffer/dist/node.js"(exports) {
12164
- "use strict";
12165
- Object.defineProperty(exports, "__esModule", { value: true });
12166
- var converter;
12167
- {
12168
- try {
12169
- converter = require_bindings()("bigint_buffer");
12170
- } catch (e) {
12171
- console.warn("bigint: Failed to load bindings, pure JS will be used (try npm run rebuild?)");
12172
- }
12173
- }
12174
- function toBigIntLE2(buf) {
12175
- if (converter === void 0) {
12176
- const reversed = Buffer.from(buf);
12177
- reversed.reverse();
12178
- const hex = reversed.toString("hex");
12179
- if (hex.length === 0) {
12180
- return BigInt(0);
12181
- }
12182
- return BigInt(`0x${hex}`);
12183
- }
12184
- return converter.toBigInt(buf, false);
12185
- }
12186
- exports.toBigIntLE = toBigIntLE2;
12187
- function toBigIntBE2(buf) {
12188
- if (converter === void 0) {
12189
- const hex = buf.toString("hex");
12190
- if (hex.length === 0) {
12191
- return BigInt(0);
12192
- }
12193
- return BigInt(`0x${hex}`);
12194
- }
12195
- return converter.toBigInt(buf, true);
12196
- }
12197
- exports.toBigIntBE = toBigIntBE2;
12198
- function toBufferLE2(num, width) {
12199
- if (converter === void 0) {
12200
- const hex = num.toString(16);
12201
- const buffer = Buffer.from(hex.padStart(width * 2, "0").slice(0, width * 2), "hex");
12202
- buffer.reverse();
12203
- return buffer;
12204
- }
12205
- return converter.fromBigInt(num, Buffer.allocUnsafe(width), false);
12206
- }
12207
- exports.toBufferLE = toBufferLE2;
12208
- function toBufferBE2(num, width) {
12209
- if (converter === void 0) {
12210
- const hex = num.toString(16);
12211
- return Buffer.from(hex.padStart(width * 2, "0").slice(0, width * 2), "hex");
12212
- }
12213
- return converter.fromBigInt(num, Buffer.allocUnsafe(width), true);
12214
- }
12215
- exports.toBufferBE = toBufferBE2;
12216
- }
12217
- });
12218
-
12219
11987
  // ../../node_modules/dotenv/config.js
12220
11988
  (function() {
12221
11989
  require_main().config(
@@ -31221,17 +30989,17 @@ var encodeDecode = (layout) => {
31221
30989
 
31222
30990
  // ../../node_modules/@solana/buffer-layout-utils/lib/esm/bigint.mjs
31223
30991
  var import_buffer_layout2 = __toESM(require_Layout(), 1);
31224
- var import_bigint_buffer = __toESM(require_node(), 1);
30992
+ import { toBigIntBE, toBigIntLE, toBufferBE, toBufferLE } from "bigint-buffer";
31225
30993
  var bigInt = (length) => (property) => {
31226
30994
  const layout = (0, import_buffer_layout2.blob)(length, property);
31227
30995
  const { encode, decode } = encodeDecode(layout);
31228
30996
  const bigIntLayout = layout;
31229
30997
  bigIntLayout.decode = (buffer, offset2) => {
31230
30998
  const src = decode(buffer, offset2);
31231
- return (0, import_bigint_buffer.toBigIntLE)(Buffer.from(src));
30999
+ return toBigIntLE(Buffer.from(src));
31232
31000
  };
31233
31001
  bigIntLayout.encode = (bigInt2, buffer, offset2) => {
31234
- const src = (0, import_bigint_buffer.toBufferLE)(bigInt2, length);
31002
+ const src = toBufferLE(bigInt2, length);
31235
31003
  return encode(src, buffer, offset2);
31236
31004
  };
31237
31005
  return bigIntLayout;
@@ -31242,10 +31010,10 @@ var bigIntBE = (length) => (property) => {
31242
31010
  const bigIntLayout = layout;
31243
31011
  bigIntLayout.decode = (buffer, offset2) => {
31244
31012
  const src = decode(buffer, offset2);
31245
- return (0, import_bigint_buffer.toBigIntBE)(Buffer.from(src));
31013
+ return toBigIntBE(Buffer.from(src));
31246
31014
  };
31247
31015
  bigIntLayout.encode = (bigInt2, buffer, offset2) => {
31248
- const src = (0, import_bigint_buffer.toBufferBE)(bigInt2, length);
31016
+ const src = toBufferBE(bigInt2, length);
31249
31017
  return encode(src, buffer, offset2);
31250
31018
  };
31251
31019
  return bigIntLayout;