Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'use strict';
const Logger = require('@accordproject/concerto-core').Logger;
const Template = require('@accordproject/cicero-core').Template;
const Clause = require('@accordproject/cicero-core').Clause;
const Engine = require('@accordproject/cicero-engine').Engine;
const CodeGen = require('@accordproject/cicero-tools').CodeGen;
const FileWriter = CodeGen.FileWriter;
const fs = require('fs');
const path = require('path');
const mkdirp = require('mkdirp');
const GoLangVisitor = CodeGen.GoLangVisitor;
const JavaVisitor = CodeGen.JavaVisitor;
const CordaVisitor = CodeGen.CordaVisitor;
const JSONSchemaVisitor = CodeGen.JSONSchemaVisitor;
const PlantUMLVisitor = CodeGen.PlantUMLVisitor;
const TypescriptVisitor = CodeGen.TypescriptVisitor;
/**
* Utility class that implements the commands exposed by the Cicero CLI.
* @class
* @memberof module:cicero-cli
*/
class Commands {
/**
* Whether the template path is to a file (template archive)
* @param {string} templatePath - path to the template directory or archive
* @return {boolean} true if the path is to a file, false otherwise
*/
static isTemplateArchive(templatePath) {
return fs.lstatSync(templatePath).isFile();