@accordproject/concerto-cto
Advanced tools
Comparing version 1.2.2-20220201185401 to 1.2.2-20220222214455
@@ -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>; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
355899
20
9674
1
12
+ Added@accordproject/concerto-util@1.2.2-20220222214455(transitive)
+ Added@supercharge/promise-pool@1.7.0(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedaxios@0.23.0(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcolors@1.4.0(transitive)
+ Addeddebug@4.3.1(transitive)
+ Addedescape-string-regexp@1.0.5(transitive)
+ Addedfollow-redirects@1.15.9(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedjson-colorizer@2.2.2(transitive)
+ Addedlodash.get@4.4.2(transitive)
+ Addedms@2.1.2(transitive)
+ Addedsupports-color@5.5.0(transitive)