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

@accordproject/concerto-cto

Package Overview
Dependencies
Maintainers
6
Versions
498
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accordproject/concerto-cto - npm Package Compare versions

Comparing version 1.2.2-20220201185401 to 1.2.2-20220222214455

lib/external.js

3

index.js

@@ -34,1 +34,4 @@ /*

module.exports.Printer = require('./lib/printer');
// External models resolution
module.exports.External = require('./lib/external');

@@ -39,4 +39,22 @@ /*

/**
* Parses an array of model files
* @param {string[]} files - array of cto files
* @return {*} the AST / metamodel
*/
function parseModels(files) {
const result = {
$class: 'concerto.metamodel.Models',
models: [],
};
files.forEach((modelFile) => {
let metaModel = Parser.parse(modelFile);
result.models.push(metaModel);
});
return result;
}
module.exports = {
parse,
parseModels,
};
{
"name": "@accordproject/concerto-cto",
"version": "1.2.2-20220201185401",
"version": "1.2.2-20220222214455",
"description": "Parser for Concerto CTO files",

@@ -41,2 +41,3 @@ "homepage": "https://github.com/accordproject/concerto",

"chai-things": "0.2.0",
"debug": "4.3.1",
"eslint": "8.2.0",

@@ -51,2 +52,5 @@ "jsdoc": "^3.6.7",

},
"dependencies": {
"@accordproject/concerto-util": "1.2.2-20220222214455"
},
"browserslist": "> 0.25%, not dead",

@@ -53,0 +57,0 @@ "license-check-and-add-config": {

@@ -8,1 +8,17 @@ /**

export function parse(cto: string, fileName?: string): object;
/**
* Parses an array of model files
* @param {string[]} files - array of cto files
* @return {*} the AST / metamodel
*/
export function parseModels(files: string[]): any;
/**
* Downloads all ModelFiles that are external dependencies and adds or
* updates them in this ModelManager.
* @param {*} models - the AST for all the known models
* @param {Object} [options] - Options object passed to ModelFileLoaders
* @param {FileDownloader} [fileDownloader] - an optional FileDownloader
* @throws {IllegalModelException} if the models fail validation
* @return {Promise} a promise when the download and update operation is completed.
*/
export function resolve(models: any, options?: any, fileDownloader?: typeof import("@accordproject/concerto-util/types/lib/filedownloader")): Promise<any>;
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