Skip to content

Commit

Permalink
feat(*): MapDeclaration Parse & Print (accordproject#641)
Browse files Browse the repository at this point in the history
* feat(*): add grammar rules for MapDeclaration

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add MapDeclaration case to Printer

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add cto & ast test data, for Parse & Print tests

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): type definitions updated

Signed-off-by: jonathan.casey <[email protected]>

* chore(*): package-lock update

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): fix JSDoc

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): remove MapPropertyKeyDeclaration & MapPropertValueDeclaration as top level declaration

Signed-off-by: jonathan.casey <[email protected]>

* test(*): decorators on map top level and props

Signed-off-by: jonathan.casey <[email protected]>

* test(*): negative case for map type - too many properties

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): add MapRelationshipPropertyValue

Signed-off-by: jonathan.casey <[email protected]>

* test(*): add more test cov

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): parser.js update

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): AST  rename

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): printer evaluates AggregateRelationshipValueType

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): update test data

Signed-off-by: jonathan.casey <[email protected]>

* feat(*): cleanup

* feat(*): cleanup

* feat(*): update parser.js

---------

Signed-off-by: jonathan.casey <[email protected]>
Signed-off-by: [email protected] <[email protected]>
  • Loading branch information
jonathan-casey authored and ragi-dayananda committed May 22, 2023
1 parent 9009e82 commit 2ab5cff
Show file tree
Hide file tree
Showing 14 changed files with 12,609 additions and 4,119 deletions.
14,949 changes: 11,387 additions & 3,562 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion packages/concerto-core/types/lib/model/identifiable.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ declare class Identifiable extends Typed {
* @protected
*/
protected constructor();
$identifier: string;
$identifierFieldName: any;
$timestamp: string;
/**
* Get the timestamp of this instance
Expand All @@ -42,6 +42,7 @@ declare class Identifiable extends Typed {
* @param {string} id - the new identifier for this object
*/
setIdentifier(id: string): void;
$identifier: string;
/**
* Get the fully qualified identifier of this instance.
* (namespace '.' type '#' identifier).
Expand Down
16 changes: 16 additions & 0 deletions packages/concerto-core/types/lib/modelutil.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,4 +118,20 @@ declare class ModelUtil {
* @returns {string} the fully qualified name minus the namespace version
*/
static removeNamespaceVersionFromFullyQualifiedName(fqn: string): string;
/**
* Returns true if the property is a system property.
* System properties are not declared in the model.
* @param {String} propertyName - the name of the property
* @return {Boolean} true if the property is a system property
* @private
*/
private static isSystemProperty;
/**
* Returns true if the property is an system property that can be set in serialized JSON.
* System properties are not declared in the model.
* @param {String} propertyName - the name of the property
* @return {Boolean} true if the property is a system property
* @private
*/
private static isPrivateSystemProperty;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ declare class JSONGenerator {
* in the object graph only the first instance is serialized, with only the $id
* written for subsequent instances, false by default.
* @param {boolean} [convertResourcesToId] Convert resources that
* @param {boolean} [ergo] - Deprecated - This is a dummy parameter to avoid breaking any consumers. It will be removed in a future release.
* are specified for relationship fields into their id, false by default.
* @param {number} [utcOffset] UTC Offset for DateTime values.
*/
constructor(convertResourcesToRelationships?: boolean, permitResourcesForRelationships?: boolean, deduplicateResources?: boolean, convertResourcesToId?: boolean, utcOffset?: number);
constructor(convertResourcesToRelationships?: boolean, permitResourcesForRelationships?: boolean, deduplicateResources?: boolean, convertResourcesToId?: boolean, ergo?: boolean, utcOffset?: number);
convertResourcesToRelationships: boolean;
permitResourcesForRelationships: boolean;
deduplicateResources: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ declare class JSONPopulator {
* Constructor.
* @param {boolean} [acceptResourcesForRelationships] Permit resources in the
* place of relationships, false by default.
* @param {boolean} [ergo] - Deprecated - This is a dummy parameter to avoid breaking any consumers. It will be removed in a future release.
* @param {number} [utcOffset] - UTC Offset for DateTime values.
* @param {number} [strictQualifiedDateTimes] - Only allow fully-qualified date-times with offsets.
*/
constructor(acceptResourcesForRelationships?: boolean, utcOffset?: number, strictQualifiedDateTimes?: number);
constructor(acceptResourcesForRelationships?: boolean, ergo?: boolean, utcOffset?: number, strictQualifiedDateTimes?: number);
acceptResourcesForRelationships: boolean;
utcOffset: number;
strictQualifiedDateTimes: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,6 @@ declare class ResourceValidator {
* @private
*/
private visitClassDeclaration;
/**
* Returns true if the property is a system property.
* System properties are not declared in the model.
* @param {String} propertyName - the name of the property
* @return {Boolean} true if the property is a system property
* @private
*/
private isSystemProperty;
/**
* Visitor design pattern
* @param {Field} field - the object being visited
Expand Down
Loading

0 comments on commit 2ab5cff

Please sign in to comment.