From d7a931b8c9546a1d5c792660a58ebdeb0dc9a714 Mon Sep 17 00:00:00 2001 From: jeromesimeon Date: Tue, 28 Sep 2021 07:58:12 -0400 Subject: [PATCH] chore(dep) Upgrade to latest Concerto with Metamodel 0.3 Signed-off-by: jeromesimeon --- package-lock.json | 48 ++++++++++++++----- packages/storybook/package.json | 2 +- packages/ui-concerto/package.json | 2 +- .../ui-concerto/src/modelBuilderVisitor.js | 22 ++++----- 4 files changed, 50 insertions(+), 24 deletions(-) diff --git a/package-lock.json b/package-lock.json index d1a2aa0..0b91ae5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -94,32 +94,49 @@ } }, "@accordproject/concerto-core": { - "version": "1.0.5-20210728143648", - "resolved": "https://registry.npmjs.org/@accordproject/concerto-core/-/concerto-core-1.0.5-20210728143648.tgz", - "integrity": "sha512-q8NWD/9JfntIhT6h1lYK4n9YN5xrCPLOHlVjMRHWy3R3z7SgNYWeAy70a07VtFQl9jDlq6HmMwkGBmU7wNeWIA==", + "version": "1.2.2-20210927172800", + "resolved": "https://registry.npmjs.org/@accordproject/concerto-core/-/concerto-core-1.2.2-20210927172800.tgz", + "integrity": "sha512-Sai0K7F/d4paBUk1mM7+mQxSNstKR350ldWYIxSaemSObbFsx5T+b29Xq9GWyz6dwu7GZCpGuMqXVxvK65E/yA==", "requires": { "@supercharge/promise-pool": "1.7.0", - "axios": "0.21.1", + "axios": "0.21.2", "colors": "1.4.0", "dayjs": "1.10.4", "debug": "4.3.1", - "jsome": "2.5.0", + "json-colorizer": "2.2.2", "lorem-ipsum": "2.0.3", "randexp": "0.5.3", + "semver": "7.3.5", "slash": "3.0.0", - "urijs": "1.19.6", - "uuid": "3.4.0" + "urijs": "1.19.7", + "uuid": "8.3.2" }, "dependencies": { + "axios": { + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.2.tgz", + "integrity": "sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg==", + "requires": { + "follow-redirects": "^1.14.0" + } + }, "colors": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz", "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==" }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "requires": { + "lru-cache": "^6.0.0" + } + }, + "urijs": { + "version": "1.19.7", + "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.7.tgz", + "integrity": "sha512-Id+IKjdU0Hx+7Zx717jwLPsPeUqz7rAtuVBRLLs+qn+J2nf9NGITWVCxcijgYxBqe83C7sqsQPs6H1pyz3x9gA==" } } }, @@ -30602,6 +30619,15 @@ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.0.tgz", "integrity": "sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=" }, + "json-colorizer": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/json-colorizer/-/json-colorizer-2.2.2.tgz", + "integrity": "sha512-56oZtwV1piXrQnRNTtJeqRv+B9Y/dXAYLqBBaYl/COcUdoZxgLBLAO88+CnkbT6MxNs0c5E9mPBIb2sFcNz3vw==", + "requires": { + "chalk": "^2.4.1", + "lodash.get": "^4.4.2" + } + }, "json-loader": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/json-loader/-/json-loader-0.5.7.tgz", diff --git a/packages/storybook/package.json b/packages/storybook/package.json index eddf56e..8c6afb0 100644 --- a/packages/storybook/package.json +++ b/packages/storybook/package.json @@ -3,7 +3,7 @@ "version": "0.98.0", "private": true, "dependencies": { - "@accordproject/concerto-core": "1.0.5-20210728143648", + "@accordproject/concerto-core": "1.2.2-20210927172800", "@accordproject/cicero-core": "0.22.0", "@accordproject/markdown-slate": "0.13.0", "@accordproject/markdown-transform": "0.13.0", diff --git a/packages/ui-concerto/package.json b/packages/ui-concerto/package.json index 3f0deee..23a7149 100644 --- a/packages/ui-concerto/package.json +++ b/packages/ui-concerto/package.json @@ -3,7 +3,7 @@ "version": "0.98.0", "private": false, "dependencies": { - "@accordproject/concerto-core": "1.0.5-20210728143648", + "@accordproject/concerto-core": "1.2.2-20210927172800", "@babel/runtime": "^7.10.3", "lodash.get": "^4.4.2", "lodash.isequal": "^4.5.0", diff --git a/packages/ui-concerto/src/modelBuilderVisitor.js b/packages/ui-concerto/src/modelBuilderVisitor.js index 3e8d18a..7deea7c 100644 --- a/packages/ui-concerto/src/modelBuilderVisitor.js +++ b/packages/ui-concerto/src/modelBuilderVisitor.js @@ -26,13 +26,13 @@ import { } from './utilities'; const declarationTypes = [ - { value: 'concerto.metamodel.StringFieldDeclaration', text: 'Text' }, - { value: 'concerto.metamodel.IntegerFieldDeclaration', text: 'Whole Number' }, - { value: 'concerto.metamodel.BooleanFieldDeclaration', text: 'Boolean' }, - { value: 'concerto.metamodel.DateTimeFieldDeclaration', text: 'Date' }, - { value: 'concerto.metamodel.DoubleFieldDeclaration', text: 'Decimal' }, - { value: 'concerto.metamodel.ObjectFieldDeclaration', text: 'Object' }, - { value: 'concerto.metamodel.RelationshipDeclaration', text: 'Relationship' }, + { value: 'concerto.metamodel.StringProperty', text: 'Text' }, + { value: 'concerto.metamodel.IntegerProperty', text: 'Whole Number' }, + { value: 'concerto.metamodel.BooleanProperty', text: 'Boolean' }, + { value: 'concerto.metamodel.DateTimeProperty', text: 'Date' }, + { value: 'concerto.metamodel.DoubleProperty', text: 'Decimal' }, + { value: 'concerto.metamodel.ObjectProperty', text: 'Object' }, + { value: 'concerto.metamodel.RelationshipProperty', text: 'Relationship' }, ]; /** @@ -72,7 +72,7 @@ class ModelBuilderVisitor extends ReactFormVisitor { const props = declaration.getProperties(); const className = props.find(({ name }) => name === 'name'); const superType = props.find(({ name }) => name === 'superType'); - const fields = props.find(({ name }) => name === 'fields'); + const properties = props.find(({ name }) => name === 'properties'); return
@@ -80,7 +80,7 @@ class ModelBuilderVisitor extends ReactFormVisitor {
{superType.accept(this, parameters)}
- {fields.accept(this, parameters)} + {properties.accept(this, parameters)}
; } @@ -97,8 +97,8 @@ class ModelBuilderVisitor extends ReactFormVisitor { const value = get(parameters.json, key); const hasTypeProperty = name => [ - 'concerto.metamodel.ObjectFieldDeclaration', - 'concerto.metamodel.RelationshipDeclaration' + 'concerto.metamodel.ObjectProperty', + 'concerto.metamodel.RelationshipProperty' ].includes(name); // Create a new concept