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

@accordproject/concerto-metamodel

Package Overview
Dependencies
Maintainers
6
Versions
318
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@accordproject/concerto-metamodel - npm Package Compare versions

Comparing version 1.2.2-20220311171354 to 1.2.2-20220315163947

38

lib/metamodelutil.js

@@ -377,2 +377,38 @@ /*

module.exports = { metaModelAst, metaModelCto, resolveLocalNames, resolveLocalNamesForAll };
/**
* Return the fully qualified name for an import
* @param {object} imp - the import
* @return {string} - the fully qualified name for that import
* @private
*/
function importFullyQualifiedName(imp) {
return imp.$class === 'concerto.metamodel.ImportAll' ? `${imp.namespace}.*` : `${imp.namespace}.${imp.name}`;
}
/**
* Returns an object that maps from the import declarations to the URIs specified
* @param {*} ast - the model ast
* @return {Object} keys are import declarations, values are URIs
* @private
*/
function getExternalImports(ast) {
const uriMap = {};
if (ast.imports) {
ast.imports.forEach((imp) => {
const fqn = importFullyQualifiedName(imp);
if(imp.uri) {
uriMap[fqn] = imp.uri;
}
});
}
return uriMap;
}
module.exports = {
metaModelAst,
metaModelCto,
resolveLocalNames,
resolveLocalNamesForAll,
importFullyQualifiedName,
getExternalImports,
};

4

package.json
{
"name": "@accordproject/concerto-metamodel",
"version": "1.2.2-20220311171354",
"version": "1.2.2-20220315163947",
"description": "Concerto metamodel utilities",

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

"dependencies": {
"@accordproject/concerto-util": "1.2.2-20220311171354"
"@accordproject/concerto-util": "1.2.2-20220315163947"
},

@@ -54,0 +54,0 @@ "browserslist": "> 0.25%, not dead",

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