@accordproject/concerto-core 2.2.1 → 2.3.0

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.2.0 {3d3fc2a6b3cd623b807ca0c4fc53680d} 2022-06-01
28
+ - Fix TypeScript types for ModelLoader
29
+
27
30
  Version 2.0.2 {c9e7b234a5786db232520137be0a0fa8} 22-05-25
28
31
  - Add ClassDeclaration.getDirectSubclasses for use in visitor
29
32
 
@@ -36,7 +36,7 @@ class ModelLoader {
36
36
  * @param {object} modelFileLoader - the model loader
37
37
  * @param {object} modelManager - the model manager
38
38
  * @param {string} ctoFile - the model file
39
- * @return {object} the model manager
39
+ * @return {Promise<ModelManager>} the model manager
40
40
  * @private
41
41
  */
42
42
  static async addModel(modelFileLoader, modelManager, ctoFile) {
@@ -61,7 +61,7 @@ class ModelLoader {
61
61
  * @param {object} options - optional parameters
62
62
  * @param {boolean} [options.offline] - do not resolve external models
63
63
  * @param {number} [options.utcOffset] - UTC Offset for this execution
64
- * @return {object} the model manager
64
+ * @return {Promise<ModelManager>} the model manager
65
65
  */
66
66
  static async loadModelManager(ctoFiles, options = { offline: false }) {
67
67
  let modelManager = new ModelManager(options);
@@ -95,7 +95,7 @@ class ModelLoader {
95
95
  * @param {object} options - optional parameters
96
96
  * @param {boolean} [options.offline] - do not resolve external models
97
97
  * @param {number} [options.utcOffset] - UTC Offset for this execution
98
- * @return {object} the model manager
98
+ * @return {Promise<ModelManager>} the model manager
99
99
  */
100
100
  static async loadModelManagerFromModelFiles(modelFiles, fileNames, options = { offline: false }) {
101
101
  let modelManager = new ModelManager(options);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@accordproject/concerto-core",
3
- "version": "2.2.1",
3
+ "version": "2.3.0",
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.2.1",
69
- "@accordproject/concerto-metamodel": "2.2.1",
70
- "@accordproject/concerto-util": "2.2.1",
68
+ "@accordproject/concerto-cto": "2.3.0",
69
+ "@accordproject/concerto-metamodel": "2.3.0",
70
+ "@accordproject/concerto-util": "2.3.0",
71
71
  "dayjs": "1.10.8",
72
72
  "debug": "4.3.1",
73
73
  "lorem-ipsum": "2.0.3",
@@ -14,7 +14,7 @@ declare class ModelLoader {
14
14
  * @param {object} modelFileLoader - the model loader
15
15
  * @param {object} modelManager - the model manager
16
16
  * @param {string} ctoFile - the model file
17
- * @return {object} the model manager
17
+ * @return {Promise<ModelManager>} the model manager
18
18
  * @private
19
19
  */
20
20
  private static addModel;
@@ -25,12 +25,12 @@ declare class ModelLoader {
25
25
  * @param {object} options - optional parameters
26
26
  * @param {boolean} [options.offline] - do not resolve external models
27
27
  * @param {number} [options.utcOffset] - UTC Offset for this execution
28
- * @return {object} the model manager
28
+ * @return {Promise<ModelManager>} the model manager
29
29
  */
30
30
  static loadModelManager(ctoFiles: string[], options?: {
31
31
  offline?: boolean;
32
32
  utcOffset?: number;
33
- }): object;
33
+ }): Promise<ModelManager>;
34
34
  /**
35
35
  * Load system and models in a new model manager from model files objects
36
36
  *
@@ -39,10 +39,11 @@ declare class ModelLoader {
39
39
  * @param {object} options - optional parameters
40
40
  * @param {boolean} [options.offline] - do not resolve external models
41
41
  * @param {number} [options.utcOffset] - UTC Offset for this execution
42
- * @return {object} the model manager
42
+ * @return {Promise<ModelManager>} the model manager
43
43
  */
44
44
  static loadModelManagerFromModelFiles(modelFiles: object[], fileNames?: string[], options?: {
45
45
  offline?: boolean;
46
46
  utcOffset?: number;
47
- }): object;
47
+ }): Promise<ModelManager>;
48
48
  }
49
+ import ModelManager = require("./modelmanager");