@accordproject/concerto-core 2.3.0 → 2.3.1-20220621112225

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/changelog.txt CHANGED
@@ -24,6 +24,9 @@
24
24
  # Note that the latest public API is documented using JSDocs and is available in api.txt.
25
25
  #
26
26
 
27
+ Version 2.3.0 {f60f35d3c6896c932d64837da74f6e6c} 2022-06-06
28
+ - Fix TypeScript types for MetaModel
29
+
27
30
  Version 2.2.0 {3d3fc2a6b3cd623b807ca0c4fc53680d} 2022-06-01
28
31
  - Fix TypeScript types for ModelLoader
29
32
 
@@ -23,7 +23,7 @@ const ModelFile = require('../introspect/modelfile');
23
23
 
24
24
  /**
25
25
  * Create a metamodel manager (for validation against the metamodel)
26
- * @return {*} the metamodel manager
26
+ * @return {ModelManager} the metamodel manager
27
27
  */
28
28
  function newMetaModelManager() {
29
29
  const metaModelManager = new ModelManager();
@@ -56,7 +56,7 @@ function validateMetaModel(input) {
56
56
  * Import metamodel to a model manager
57
57
  * @param {object} metaModel - the metamodel
58
58
  * @param {boolean} [validate] - whether to perform validation
59
- * @return {object} the metamodel for this model manager
59
+ * @return {ModelManager} the metamodel for this model manager
60
60
  */
61
61
  function modelManagerFromMetaModel(metaModel, validate = true) {
62
62
  // First, validate the JSON metaModel
@@ -381,6 +381,9 @@ class ModelFile {
381
381
  // check whether type is defined in another file
382
382
  const fqn = this.resolveImport(type);
383
383
  const modelFile = this.getModelManager().getModelFile(ModelUtil.getNamespace(fqn));
384
+ if (!modelFile) {
385
+ return null;
386
+ }
384
387
  return modelFile.getLocalType(fqn).getFullyQualifiedName();
385
388
  }
386
389
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accordproject/concerto-core",
3
- "version": "2.3.0",
3
+ "version": "2.3.1-20220621112225",
4
4
  "description": "Core Implementation for the Concerto Modeling Language",
5
5
  "homepage": "https://github.com/accordproject/concerto",
6
6
  "engines": {
@@ -65,9 +65,9 @@
65
65
  "yargs": "17.3.1"
66
66
  },
67
67
  "dependencies": {
68
- "@accordproject/concerto-cto": "2.3.0",
69
- "@accordproject/concerto-metamodel": "2.3.0",
70
- "@accordproject/concerto-util": "2.3.0",
68
+ "@accordproject/concerto-cto": "2.3.1-20220621112225",
69
+ "@accordproject/concerto-metamodel": "2.3.1-20220621112225",
70
+ "@accordproject/concerto-util": "2.3.1-20220621112225",
71
71
  "dayjs": "1.10.8",
72
72
  "debug": "4.3.1",
73
73
  "lorem-ipsum": "2.0.3",