@kubiklabs/wasmkit
Version:
Wasmkit is a development environment to compile, deploy, test, run cosmwasm contracts on different networks.
113 lines (112 loc) • 3.53 kB
JavaScript
;
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WASMKIT_SHORT_PARAM_SUBSTITUTIONS = exports.WASMKIT_PARAM_DEFINITIONS = void 0;
const types = __importStar(require("./argument-types"));
exports.WASMKIT_PARAM_DEFINITIONS = {
network: {
name: "network",
defaultValue: "default",
description: "The network to connect to.",
type: types.string,
isOptional: true,
isFlag: false,
isVariadic: false
},
command: {
name: "command",
defaultValue: "",
description: "Name of WasmKit task ran.",
type: types.string,
isFlag: false,
isOptional: true,
isVariadic: false
},
useCheckpoints: {
name: "useCheckpoints",
defaultValue: true,
description: "Specify if checkpoints should be used.",
type: types.boolean,
isFlag: true,
isOptional: true,
isVariadic: false
},
showStackTraces: {
name: "showStackTraces",
defaultValue: false,
description: "Show stack traces.",
type: types.boolean,
isFlag: true,
isOptional: true,
isVariadic: false
},
version: {
name: "version",
shortName: "v",
defaultValue: false,
description: "Shows version and exit.",
type: types.boolean,
isFlag: true,
isOptional: true,
isVariadic: false
},
help: {
name: "help",
shortName: "h",
defaultValue: false,
description: "Shows this message, or a task's help if its name is provided",
type: types.boolean,
isFlag: true,
isOptional: true,
isVariadic: false
},
config: {
name: "config",
defaultValue: undefined,
description: "Path to WASMKIT config file.",
type: types.inputFile,
isFlag: false,
isOptional: true,
isVariadic: false
},
verbose: {
name: "verbose",
defaultValue: false,
description: "Enables verbose logging",
type: types.boolean,
isFlag: true,
isOptional: true,
isVariadic: false
}
};
// reverse lookup map for short parameters
exports.WASMKIT_SHORT_PARAM_SUBSTITUTIONS = Object.entries(exports.WASMKIT_PARAM_DEFINITIONS)
.reduce((out, kv) => {
const [name, value] = kv;
if (value.shortName) {
out[value.shortName] = name;
}
return out;
}, {});