Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hyperionbt/helios-cli

Package Overview
Dependencies
Maintainers
2
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hyperionbt/helios-cli - npm Package Compare versions

Comparing version 0.1.1 to 0.1.2

53

index.js

@@ -13,3 +13,3 @@ #!/usr/bin/env node

const VERSION = "0.1.1";
const VERSION = "0.1.2";

@@ -28,2 +28,5 @@ const USAGE = `Usage:

eval <input-file> <param-name>
-I, --include <include-module-dir>
version

@@ -237,3 +240,3 @@ `;

if (options.output !== undefined) {
if (options.output != null) {
fs.writeFileSync(options.output, uplc);

@@ -245,2 +248,45 @@ } else {

function parseEvalParamOptions(args) {
const options = {
includeDirs: parseOption(args, "-I", "--include", true)
};
assertNoMoreOptions(args);
return options;
}
async function evalParam(args) {
const options = parseEvalParamOptions(args);
const inputFile = args.shift();
if (inputFile === undefined) {
throw new UsageError("no input-file specified")
}
const paramName = args.shift();
if (paramName === undefined) {
throw new UsageError("no param-name specified");
}
assertEmpty(args);
const includeDirs = options.includeDirs.slice();
includeDirs.unshift(".");
PATHS = listIncludes(inputFile, includeDirs);
const sources = PATHS.map(p => readFile(p));
const inputSource = sources.shift();
const program = Program.new(inputSource, sources);
const json = program.evalParam(paramName).data.toSchemaJson();
console.log(json);
}
function printVersion() {

@@ -274,2 +320,5 @@ console.log(`Helios-CLI version: ${VERSION}`);

break;
case "eval":
await evalParam(args);
break;
case "version":

@@ -276,0 +325,0 @@ printVersion();

2

package.json
{
"name": "@hyperionbt/helios-cli",
"type": "module",
"version": "0.1.1",
"version": "0.1.2",
"description": "CLI tool for compiling Cardano smart contracts written in Helios, and building Cardano transactions.",

@@ -6,0 +6,0 @@ "main": "./index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc