Skip to content

Commit

Permalink
fix(core) a few fixes to the public API
Browse files Browse the repository at this point in the history
Signed-off-by: jeromesimeon <[email protected]>
  • Loading branch information
jeromesimeon committed Dec 2, 2021
1 parent 87d86fd commit 87bc9c2
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 11 deletions.
3 changes: 2 additions & 1 deletion packages/concerto-core/api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ class ModelManager {
+ void clearModelFiles()
+ ModelFile getModelFile(string)
+ string[] getNamespaces()
+ ClassDeclaration getType(string) throws TypeNotFoundException
+ AssetDeclaration[] getAssetDeclarations()
+ TransactionDeclaration[] getTransactionDeclarations()
+ EventDeclaration[] getEventDeclarations()
Expand All @@ -228,7 +229,7 @@ class Serializer {
+ void constructor(Factory,ModelManager,object?)
+ void setDefaultOptions(Object)
+ Object toJSON(Resource,Object?,boolean?,boolean?,boolean?,boolean?,boolean?,number?) throws Error
+ Resource fromJSON(Object,Object,boolean,boolean,number?)
+ Resource fromJSON(Object,Object?,boolean,boolean,number?)
}
class TypeNotFoundException extends BaseException {
+ void constructor(string,string?,string)
Expand Down
2 changes: 1 addition & 1 deletion packages/concerto-core/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
# Note that the latest public API is documented using JSDocs and is available in api.txt.
#

Version 1.2.2 {e30709343834104db4936fc5f1c96091} 2021-11-24
Version 1.2.2 {fb3110c45d21beac59b99bba03d41197} 2021-11-24
- Remove custom instanceof and add methods to check runtime type
- Remove support for Node 12
- Generate Typescript definitions from JSDoc
Expand Down
1 change: 0 additions & 1 deletion packages/concerto-core/lib/modelmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ abstract concept Event {}
* @param {string} qualifiedName - fully qualified type name.
* @return {ClassDeclaration} - the class declaration for the specified type.
* @throws {TypeNotFoundException} - if the type cannot be found or is a primitive type.
* @private
*/
getType(qualifiedName) {

Expand Down
2 changes: 1 addition & 1 deletion packages/concerto-core/lib/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class Serializer {
* The Resource is populated based on the JavaScript object.
*
* @param {Object} jsonObject The JavaScript Object for a Resource
* @param {Object} options - the optional serialization options
* @param {Object} [options] - the optional serialization options
* @param {boolean} options.acceptResourcesForRelationships - handle JSON objects
* in the place of strings for relationships, defaults to false.
* @param {boolean} options.validate - validate the structure of the Resource
Expand Down
3 changes: 1 addition & 2 deletions packages/concerto-core/types/lib/modelmanager.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,8 @@ declare class ModelManager {
* @param {string} qualifiedName - fully qualified type name.
* @return {ClassDeclaration} - the class declaration for the specified type.
* @throws {TypeNotFoundException} - if the type cannot be found or is a primitive type.
* @private
*/
private getType;
getType(qualifiedName: string): ClassDeclaration;
/**
* Get the AssetDeclarations defined in this model manager
* @return {AssetDeclaration[]} the AssetDeclarations defined in the model manager
Expand Down
4 changes: 2 additions & 2 deletions packages/concerto-core/types/lib/serializer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ declare class Serializer {
* The Resource is populated based on the JavaScript object.
*
* @param {Object} jsonObject The JavaScript Object for a Resource
* @param {Object} options - the optional serialization options
* @param {Object} [options] - the optional serialization options
* @param {boolean} options.acceptResourcesForRelationships - handle JSON objects
* in the place of strings for relationships, defaults to false.
* @param {boolean} options.validate - validate the structure of the Resource
* with its model prior to serialization (default to true)
* @param {number} [options.utcOffset] - UTC Offset for DateTime values.
* @return {Resource} The new populated resource
*/
fromJSON(jsonObject: any, options: {
fromJSON(jsonObject: any, options?: {
acceptResourcesForRelationships: boolean;
validate: boolean;
utcOffset?: number;
Expand Down
1 change: 0 additions & 1 deletion packages/concerto-util/lib/filedownloader.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ const handleJobError = async (error, job) => {
class FileDownloader {
/**
* Create a FileDownloader and bind to a FileLoader.
* @constructor
* @param {*} fileLoader - the loader to use to download model files
* @param {*} getExternalImports - a function taking a file and returning new files
* @param {Number} concurrency - the number of model files to download concurrently
Expand Down
1 change: 0 additions & 1 deletion packages/concerto-util/types/lib/filedownloader.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ export = FileDownloader;
declare class FileDownloader {
/**
* Create a FileDownloader and bind to a FileLoader.
* @constructor
* @param {*} fileLoader - the loader to use to download model files
* @param {*} getExternalImports - a function taking a file and returning new files
* @param {Number} concurrency - the number of model files to download concurrently
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ declare class CompositeFileLoader {
addFileLoader(fileLoader: any): void;
/**
* Get the array of FileLoader instances
* @return {*[]} The FileLoader registered
* @return {*} The FileLoader registered
* @private
*/
private getFileLoaders;
Expand Down

0 comments on commit 87bc9c2

Please sign in to comment.