From c51678bae6ab129010be3df0dd3d5607735ad75b Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Fri, 20 Jul 2018 00:26:32 -0400 Subject: [PATCH 01/28] v5.10.0-beta.1 --- package.json | 4 ++-- yarn.lock | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index d5dff8d..4fdaaba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.9.1", + "version": "5.10.0-beta.1", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", @@ -23,7 +23,7 @@ "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", "shr-expand": "^5.5.1", - "shr-fhir-export": "^5.6.1", + "shr-fhir-export": "^5.7.0-beta.1", "shr-json-export": "^5.1.4", "shr-json-javadoc": "^1.4.2", "shr-json-schema-export": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index d2c4885..1430e37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,9 +927,9 @@ shr-expand@^5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.1.tgz#e8d3c0cebe9bf05d663f2e90d7ff439b39f1a82c" -shr-fhir-export@^5.6.1: - version "5.6.1" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.6.1.tgz#acb6380380d7b626c7d8b73cd8358d035fcc6e98" +shr-fhir-export@^5.7.0-beta.1: + version "5.7.0-beta.1" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.1.tgz#a02836faad26597e56de15b487ace1c61e9f0fa6" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" From 42877a8fa395fa3deb75502ead85900daf78d071 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 23 Jul 2018 09:15:22 -0400 Subject: [PATCH 02/28] Fix CIMCORE when numbers of mapping targets != 1 If there were no mappings, then the CIMCORE exporter would crash. If there were mappings for more than 1 target, then only the 1st target would be processed. Both of these issues are now fixed. --- app.js | 30 ++++++++++++++++++------------ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/app.js b/app.js index e97db27..63ee84f 100644 --- a/app.js +++ b/app.js @@ -193,18 +193,24 @@ if (doCIMCORE) { } //mappings - for (const mapping of [...expSpecifications.maps._targetMap][0][1].all) { - let namespace = mapping.identifier.namespace.replace(/\./, '-'); - let name = mapping.identifier.name; - let out = Object.assign({ 'fileType': 'Mapping' }, mapping.toJSON()); - cimcoreSpecifications.mappings.push(out); - - const hierarchyPath = `${baseCIMCOREPath}/${namespace}/mappings/${name}-mapping.json`; - try { - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); - fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); - } catch (error) { - logger.error('Unable to successfully serialize mapping %s into CIMCORE, failing with error "%s". ERROR_CODE:15003', mapping.identifier.fqn, error); + for (const target of expSpecifications.maps.targets) { + for (const mapping of expSpecifications.maps.getTargetMapSpecifications(target).all) { + let namespace = mapping.identifier.namespace.replace(/\./, '-'); + let name = mapping.identifier.name; + if (expSpecifications.maps.targets.length > 1) { + // Need to add the target to the name to make it unique + name += `-${target}`; + } + let out = Object.assign({ 'fileType': 'Mapping' }, mapping.toJSON()); + cimcoreSpecifications.mappings.push(out); + + const hierarchyPath = path.join(baseCIMCOREPath, namespace, 'mappings', `${name}-mapping.json`); + try { + mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); + } catch (error) { + logger.error('Unable to successfully serialize mapping %s into CIMCORE, failing with error "%s". ERROR_CODE:15003', mapping.identifier.fqn, error); + } } } } catch (error) { From db56278b60d095a0d69b7bdd9e141e3133218243 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 23 Jul 2018 10:44:52 -0400 Subject: [PATCH 03/28] Make the mapping target part of the output path When producing CIMCORE, put the mappings in /mappings//. --- app.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app.js b/app.js index 63ee84f..9eb7f3f 100644 --- a/app.js +++ b/app.js @@ -197,14 +197,10 @@ if (doCIMCORE) { for (const mapping of expSpecifications.maps.getTargetMapSpecifications(target).all) { let namespace = mapping.identifier.namespace.replace(/\./, '-'); let name = mapping.identifier.name; - if (expSpecifications.maps.targets.length > 1) { - // Need to add the target to the name to make it unique - name += `-${target}`; - } let out = Object.assign({ 'fileType': 'Mapping' }, mapping.toJSON()); cimcoreSpecifications.mappings.push(out); - const hierarchyPath = path.join(baseCIMCOREPath, namespace, 'mappings', `${name}-mapping.json`); + const hierarchyPath = path.join(baseCIMCOREPath, namespace, 'mappings', target, `${name}-mapping.json`); try { mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); From 69877d73186395a57aafad1d212e0dbda4e68959 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 23 Jul 2018 14:41:49 -0400 Subject: [PATCH 04/28] Update shr-fhir-export to 5.7.0-beta.2 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 4fdaaba..79b85c0 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", "shr-expand": "^5.5.1", - "shr-fhir-export": "^5.7.0-beta.1", + "shr-fhir-export": "^5.7.0-beta.2", "shr-json-export": "^5.1.4", "shr-json-javadoc": "^1.4.2", "shr-json-schema-export": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index 1430e37..c18dd49 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,9 +927,9 @@ shr-expand@^5.5.1: version "5.5.1" resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.1.tgz#e8d3c0cebe9bf05d663f2e90d7ff439b39f1a82c" -shr-fhir-export@^5.7.0-beta.1: - version "5.7.0-beta.1" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.1.tgz#a02836faad26597e56de15b487ace1c61e9f0fa6" +shr-fhir-export@^5.7.0-beta.2: + version "5.7.0-beta.2" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.2.tgz#7b05d5b3aa61243b4c4c8c833ae92557351deb1c" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" From 7a33b78792995693bcba06ccb1445e46d2abfb28 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 23 Jul 2018 14:42:52 -0400 Subject: [PATCH 05/28] v5.10.0-beta.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79b85c0..9d17b88 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.1", + "version": "5.10.0-beta.2", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From 65f13d28326d05bf3fbcbc0a2026094a9b86ba9d Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 6 Aug 2018 19:23:13 -0400 Subject: [PATCH 06/28] Upgrade shr-fhir-export and shr-expand to new betas - Fixes problem constraining references - Supports nested slicing --- package.json | 4 ++-- yarn.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 9d17b88..b37a713 100644 --- a/package.json +++ b/package.json @@ -22,8 +22,8 @@ "commander": "^2.9.0", "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", - "shr-expand": "^5.5.1", - "shr-fhir-export": "^5.7.0-beta.2", + "shr-expand": "^5.5.2-beta.1", + "shr-fhir-export": "^5.7.0-beta.3", "shr-json-export": "^5.1.4", "shr-json-javadoc": "^1.4.2", "shr-json-schema-export": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index c18dd49..6952860 100644 --- a/yarn.lock +++ b/yarn.lock @@ -923,13 +923,13 @@ shr-es6-export@^5.4.1: dependencies: reserved-words "^0.1.2" -shr-expand@^5.5.1: - version "5.5.1" - resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.1.tgz#e8d3c0cebe9bf05d663f2e90d7ff439b39f1a82c" +shr-expand@^5.5.2-beta.1: + version "5.5.2-beta.1" + resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.1.tgz#25baa7e4363ebcef1734210253b17da1e4ec1d4f" -shr-fhir-export@^5.7.0-beta.2: - version "5.7.0-beta.2" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.2.tgz#7b05d5b3aa61243b4c4c8c833ae92557351deb1c" +shr-fhir-export@^5.7.0-beta.3: + version "5.7.0-beta.3" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.3.tgz#40b5c7e3a609bba172fbdc73deab4c29b523520d" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" From 22b83f1640b92deaf31524331493f053d3bc07b0 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 6 Aug 2018 19:23:25 -0400 Subject: [PATCH 07/28] v5.10.0-beta.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b37a713..be30c63 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.2", + "version": "5.10.0-beta.3", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From ffd9bc1abfdd8a92adcdce517311f6774a19a3d5 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Tue, 7 Aug 2018 23:07:23 -0400 Subject: [PATCH 08/28] OS-independent paths Fix all file paths to use node path to ensure proper path separators based on OS. --- app.js | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/app.js b/app.js index 9eb7f3f..11f20d5 100644 --- a/app.js +++ b/app.js @@ -33,7 +33,7 @@ program .option('-l, --log-level ', 'the console log level (default: info)', /^(fatal|error|warn|info|debug|trace)$/i, 'info') .option('-m, --log-mode ', 'the console log mode (default: short)', /^(short|long|json|off)$/i, 'short') .option('-s, --skip ', 'skip an export feature (default: )', collect, []) - .option('-o, --out ', 'the path to the output folder (default: ./out)', './out') + .option('-o, --out ', `the path to the output folder (default: ${path.join('.', 'out')})`, path.join('.', 'out')) .option('-c, --config ', 'the name of the config file (default: config.json)', 'config.json') .option('-d, --duplicate', 'show duplicate error messages (default: false)') .arguments('') @@ -130,7 +130,7 @@ if (doCIMCORE) { 'namespaces': {}, //also includes 'projectInfo' }; - const baseCIMCOREPath = `${program.out}/cimcore/`; + const baseCIMCOREPath = path.join(program.out, 'cimcore'); //meta project file let versionInfo = { @@ -141,8 +141,8 @@ if (doCIMCORE) { let projectMetaOutput = Object.assign({ 'fileType': 'ProjectInfo' }, configSpecifications, versionInfo); //project meta information cimcoreSpecifications['projectInfo'] = projectMetaOutput; - const hierarchyPath = `${program.out}/cimcore/project.json`; - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + const hierarchyPath = path.join(program.out, 'cimcore', 'project.json'); + mkdirp.sync(path.dirname(hierarchyPath)); fs.writeFileSync(hierarchyPath, JSON.stringify(projectMetaOutput, null, ' ')); //meta namespace files @@ -151,9 +151,9 @@ if (doCIMCORE) { let out = Object.assign({ 'fileType': 'Namespace' }, ns.toJSON()); cimcoreSpecifications.namespaces[ns.namespace] = out; - const hierarchyPath = `${baseCIMCOREPath}/${namespace}/${namespace}.json`; + const hierarchyPath = path.join(baseCIMCOREPath, namespace, `${namespace}.json`); try { - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + mkdirp.sync(path.dirname(hierarchyPath)); fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); } catch (error) { logger.error('Unable to successfully serialize namespace meta information %s into CIMCORE, failing with error "%s". ERROR_CODE:15004', namespace, error); @@ -167,9 +167,9 @@ if (doCIMCORE) { let out = Object.assign({ 'fileType': 'DataElement' }, de.toJSON()); cimcoreSpecifications.dataElements.push(out); - const hierarchyPath = `${baseCIMCOREPath}/${namespace}/${fqn}.json`; + const hierarchyPath = path.join(baseCIMCOREPath, namespace, `${fqn}.json`); try { - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + mkdirp.sync(path.dirname(hierarchyPath)); fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); } catch (error) { logger.error('Unable to successfully serialize element %s into CIMCORE, failing with error "%s". ERROR_CODE:15001', de.identifier.fqn, error); @@ -183,9 +183,9 @@ if (doCIMCORE) { let out = Object.assign({ 'fileType': 'ValueSet' }, vs.toJSON()); cimcoreSpecifications.valueSets.push(out); - const hierarchyPath = `${baseCIMCOREPath}/${namespace}/valuesets/${name}.json`; + const hierarchyPath = path.join(baseCIMCOREPath, namespace, 'valuesets', `${name}.json`); try { - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + mkdirp.sync(path.dirname(hierarchyPath)); fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); } catch (error) { logger.error('Unable to successfully serialize value set %s into CIMCORE, failing with error "%s". ERROR_CODE:15002', vs.identifier.fqn, error); @@ -202,7 +202,7 @@ if (doCIMCORE) { const hierarchyPath = path.join(baseCIMCOREPath, namespace, 'mappings', target, `${name}-mapping.json`); try { - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + mkdirp.sync(path.dirname(hierarchyPath)); fs.writeFileSync(hierarchyPath, JSON.stringify(out, null, ' ')); } catch (error) { logger.error('Unable to successfully serialize mapping %s into CIMCORE, failing with error "%s". ERROR_CODE:15003', mapping.identifier.fqn, error); @@ -220,8 +220,8 @@ if (doCIMCORE) { if (doJSON) { try { const jsonHierarchyResults = shrJE.exportToJSON(specifications, configSpecifications); - const hierarchyPath = `${program.out}/json/definitions.json`; - mkdirp.sync(hierarchyPath.substring(0, hierarchyPath.lastIndexOf('/'))); + const hierarchyPath = path.join(program.out, 'json', 'definitions.json'); + mkdirp.sync(path.dirname(hierarchyPath)); fs.writeFileSync(hierarchyPath, JSON.stringify(jsonHierarchyResults, null, ' ')); } catch (error) { logger.fatal('Failure in JSON export. Aborting with error message: %s', error); @@ -303,7 +303,7 @@ if (doJSONSchema) { const baseSchemaNamespace = 'https://standardhealthrecord.org/schema'; const baseSchemaNamespaceWithSlash = baseSchemaNamespace + '/'; const jsonSchemaResults = shrJSE.exportToJSONSchema(expSpecifications, baseSchemaNamespace, typeURL); - const jsonSchemaPath = `${program.out}/json-schema/`; + const jsonSchemaPath = path.join(program.out, 'json-schema'); mkdirp.sync(jsonSchemaPath); for (const schemaId in jsonSchemaResults) { const filename = `${schemaId.substring(baseSchemaNamespaceWithSlash.length).replace(/\//g, '.')}.schema.json`; @@ -315,7 +315,7 @@ if (doJSONSchema) { // const baseSchemaExpandedNamespace = 'https://standardhealthrecord.org/schema-expanded'; // const baseSchemaExpandedNamespaceWithSlash = baseSchemaExpandedNamespace + '/'; // const jsonSchemaExpandedResults = shrJSE.exportToJSONSchema(expSpecifications, baseSchemaExpandedNamespace, typeURL, true); - // const jsonSchemaExpandedPath = `${program.out}/json-schema-expanded/`; + // const jsonSchemaExpandedPath = path.join(program.out, 'json-schema-expanded'); // mkdirp.sync(jsonSchemaExpandedPath); // for (const schemaId in jsonSchemaExpandedResults) { // const filename = `${schemaId.substring(baseSchemaExpandedNamespaceWithSlash.length).replace(/\//g, '.')}.schema.json`; @@ -333,8 +333,8 @@ if (doJSONSchema) { if (doModelDoc) { if (doCIMCORE) { try { - const hierarchyPath = `${program.out}/modeldoc`; - const fhirPath = `${program.out}/fhir/guide/pages/modeldoc`; + const hierarchyPath = path.join(program.out, 'modeldoc'); + const fhirPath = path.join(program.out, 'fhir', 'guide', 'pages', 'modeldoc'); const javadocResults = shrJDE.compileJavadoc(cimcoreSpecifications, hierarchyPath); shrJDE.exportToPath(javadocResults, hierarchyPath); if (doFHIR && configSpecifications.implementationGuide.includeModelDoc == true) { From 72b4f8100a1c19078fa2c6ec8321988255784431 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Tue, 7 Aug 2018 23:32:54 -0400 Subject: [PATCH 09/28] Upgrade shr-fhir-export to 5.7.0-beta.4 This updgrade brings in a new igpublisher.jar. --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index be30c63..583adab 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", "shr-expand": "^5.5.2-beta.1", - "shr-fhir-export": "^5.7.0-beta.3", + "shr-fhir-export": "^5.7.0-beta.4", "shr-json-export": "^5.1.4", "shr-json-javadoc": "^1.4.2", "shr-json-schema-export": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index 6952860..f016380 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,9 +927,9 @@ shr-expand@^5.5.2-beta.1: version "5.5.2-beta.1" resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.1.tgz#25baa7e4363ebcef1734210253b17da1e4ec1d4f" -shr-fhir-export@^5.7.0-beta.3: - version "5.7.0-beta.3" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.3.tgz#40b5c7e3a609bba172fbdc73deab4c29b523520d" +shr-fhir-export@^5.7.0-beta.4: + version "5.7.0-beta.4" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.4.tgz#c5a21bdfbf14248da47ee6387f712a3e9be88bbc" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" From 7220dac48567266b4123cb63bc96382a6ecfd3ae Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Tue, 7 Aug 2018 23:33:47 -0400 Subject: [PATCH 10/28] v5.10.0-beta.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 583adab..c4db163 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.3", + "version": "5.10.0-beta.4", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From c974f42bf947cf7df6a72e7beffcdbe4ece49370 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 13 Aug 2018 23:13:00 -0400 Subject: [PATCH 11/28] Update shr-fhir-export and shr-json-javadoc shr-fhir-export to 5.7.0-beta.5 shr-json-javadoc to 1.4.3-beta.1 --- package.json | 4 ++-- yarn.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index c4db163..2561e35 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,9 @@ "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", "shr-expand": "^5.5.2-beta.1", - "shr-fhir-export": "^5.7.0-beta.4", + "shr-fhir-export": "^5.7.0-beta.5", "shr-json-export": "^5.1.4", - "shr-json-javadoc": "^1.4.2", + "shr-json-javadoc": "^1.4.3-beta.1", "shr-json-schema-export": "^5.3.0", "shr-models": "^5.5.2", "shr-text-import": "^5.4.1" diff --git a/yarn.lock b/yarn.lock index f016380..c69bf11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,9 +927,9 @@ shr-expand@^5.5.2-beta.1: version "5.5.2-beta.1" resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.1.tgz#25baa7e4363ebcef1734210253b17da1e4ec1d4f" -shr-fhir-export@^5.7.0-beta.4: - version "5.7.0-beta.4" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.4.tgz#c5a21bdfbf14248da47ee6387f712a3e9be88bbc" +shr-fhir-export@^5.7.0-beta.5: + version "5.7.0-beta.5" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.5.tgz#d846793f9f888238b748cab6a95e7066ef6b3b51" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" @@ -938,9 +938,9 @@ shr-json-export@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/shr-json-export/-/shr-json-export-5.1.4.tgz#9b1cc379002366db70ef529a39b8220253a860ee" -shr-json-javadoc@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/shr-json-javadoc/-/shr-json-javadoc-1.4.2.tgz#3c4e16e311e1ed0497aeceba5a829918af947e71" +shr-json-javadoc@^1.4.3-beta.1: + version "1.4.3-beta.1" + resolved "https://registry.yarnpkg.com/shr-json-javadoc/-/shr-json-javadoc-1.4.3-beta.1.tgz#231b670a3bc7808b553d2c2239eff18d1ccc9237" dependencies: bluebird "^3.5.1" ejs "^2.5.7" From 4e62bbee22baa450de5efc292d833404e6ecaf5b Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Mon, 13 Aug 2018 23:14:27 -0400 Subject: [PATCH 12/28] v5.10.0-beta.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 2561e35..b7fea89 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.4", + "version": "5.10.0-beta.5", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From ea29578bf8af3a923120ebf9aef28e8b8b91a841 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Thu, 16 Aug 2018 00:47:57 -0400 Subject: [PATCH 13/28] Update shr-fhir-export and shr-json-javadoc shr-fhir-export 5.7.0-beta.6 shr-json-javadoc 1.4.3-beta.2 --- package.json | 4 ++-- yarn.lock | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b7fea89..c1c239d 100644 --- a/package.json +++ b/package.json @@ -23,9 +23,9 @@ "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", "shr-expand": "^5.5.2-beta.1", - "shr-fhir-export": "^5.7.0-beta.5", + "shr-fhir-export": "^5.7.0-beta.6", "shr-json-export": "^5.1.4", - "shr-json-javadoc": "^1.4.3-beta.1", + "shr-json-javadoc": "^1.4.3-beta.2", "shr-json-schema-export": "^5.3.0", "shr-models": "^5.5.2", "shr-text-import": "^5.4.1" diff --git a/yarn.lock b/yarn.lock index c69bf11..27124db 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,9 +927,9 @@ shr-expand@^5.5.2-beta.1: version "5.5.2-beta.1" resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.1.tgz#25baa7e4363ebcef1734210253b17da1e4ec1d4f" -shr-fhir-export@^5.7.0-beta.5: - version "5.7.0-beta.5" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.5.tgz#d846793f9f888238b748cab6a95e7066ef6b3b51" +shr-fhir-export@^5.7.0-beta.6: + version "5.7.0-beta.6" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.6.tgz#03f9f34fc3556828654401819c6e73b346275b53" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" @@ -938,9 +938,9 @@ shr-json-export@^5.1.4: version "5.1.4" resolved "https://registry.yarnpkg.com/shr-json-export/-/shr-json-export-5.1.4.tgz#9b1cc379002366db70ef529a39b8220253a860ee" -shr-json-javadoc@^1.4.3-beta.1: - version "1.4.3-beta.1" - resolved "https://registry.yarnpkg.com/shr-json-javadoc/-/shr-json-javadoc-1.4.3-beta.1.tgz#231b670a3bc7808b553d2c2239eff18d1ccc9237" +shr-json-javadoc@^1.4.3-beta.2: + version "1.4.3-beta.2" + resolved "https://registry.yarnpkg.com/shr-json-javadoc/-/shr-json-javadoc-1.4.3-beta.2.tgz#3a07f86e13affd43009330e17ca45d8013eabcdb" dependencies: bluebird "^3.5.1" ejs "^2.5.7" From 5732eb6b309e8ff97a4a622d8477cc85bbe2289b Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Thu, 16 Aug 2018 00:48:46 -0400 Subject: [PATCH 14/28] v5.10.0-beta.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1c239d..14d5d11 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.5", + "version": "5.10.0-beta.6", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From 0406fe1867fc13bd9f51137b14f38210ec8bc452 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Thu, 16 Aug 2018 13:46:09 -0400 Subject: [PATCH 15/28] Fix filter to pickup missing type constraints --- filter.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/filter.js b/filter.js index c34d144..dd0c3b6 100644 --- a/filter.js +++ b/filter.js @@ -26,8 +26,8 @@ class SpecificationsFilter { // recursively find dependencies for each data element in specifications // if element matches filter criteria for (const element of this._expSpecs.dataElements.all) { - if (((strategy === "element") && (target.includes(element.identifier.name))) - || ((strategy === "namespace") && (target.includes(element.identifier.namespace)))) { + if (((strategy === 'element') && (target.includes(element.identifier.name))) + || ((strategy === 'namespace') && (target.includes(element.identifier.namespace)))) { this.findDataElementDependenciesRecursive(element.identifier); } } @@ -151,6 +151,10 @@ class SpecificationsFilter { }); } + field.constraintsFilter.type.constraints.forEach(constraint => { + this._deDependencies.add(constraint.isA); + }); + field.constraintsFilter.includesType.constraints.forEach(constraint => { this._deDependencies.add(constraint.isA); }); From 21e02d6654becd798e589bb0e484d976a6086868 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Thu, 16 Aug 2018 16:14:04 -0400 Subject: [PATCH 16/28] Upgrade shr-fhir-export shr-fhir-export 5.7.0-beta.7 --- package.json | 2 +- yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 14d5d11..c71552c 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "mkdirp": "^0.5.1", "shr-es6-export": "^5.4.1", "shr-expand": "^5.5.2-beta.1", - "shr-fhir-export": "^5.7.0-beta.6", + "shr-fhir-export": "^5.7.0-beta.7", "shr-json-export": "^5.1.4", "shr-json-javadoc": "^1.4.3-beta.2", "shr-json-schema-export": "^5.3.0", diff --git a/yarn.lock b/yarn.lock index 27124db..974c483 100644 --- a/yarn.lock +++ b/yarn.lock @@ -927,9 +927,9 @@ shr-expand@^5.5.2-beta.1: version "5.5.2-beta.1" resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.1.tgz#25baa7e4363ebcef1734210253b17da1e4ec1d4f" -shr-fhir-export@^5.7.0-beta.6: - version "5.7.0-beta.6" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.6.tgz#03f9f34fc3556828654401819c6e73b346275b53" +shr-fhir-export@^5.7.0-beta.7: + version "5.7.0-beta.7" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.7.tgz#3aeae6db0a59913841fac97c94a9d2a3de570118" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" From 4155df0c082863cdf0c47c3574222905a6e26305 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Thu, 16 Aug 2018 16:14:41 -0400 Subject: [PATCH 17/28] v5.10.0-beta.7 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c71552c..9ea58c3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.6", + "version": "5.10.0-beta.7", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From fb4ff588bdab70dead878a1f8f9a7ec5c3aca991 Mon Sep 17 00:00:00 2001 From: Abhijay Saran Date: Wed, 21 Mar 2018 19:03:03 -0400 Subject: [PATCH 18/28] Start of ADL exporter Moved file write logic to adl exporter --- app.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index 11f20d5..46bdb6a 100644 --- a/app.js +++ b/app.js @@ -12,6 +12,7 @@ const shrJSE = require('shr-json-schema-export'); const shrEE = require('shr-es6-export'); const shrFE = require('shr-fhir-export'); const shrJDE = require('shr-json-javadoc'); +const shrAE = require('../shr-adl-exporter'); const LogCounter = require('./logcounter'); const SpecificationsFilter = require('./filter'); @@ -51,10 +52,11 @@ if (typeof input === 'undefined') { // Process the skip flags const doFHIR = program.skip.every(a => a.toLowerCase() != 'fhir' && a.toLowerCase() != 'all'); const doJSON = program.skip.every(a => a.toLowerCase() != 'json' && a.toLowerCase() != 'all'); -const doCIMCORE = program.skip.every(a => a.toLowerCase() != 'cimcore' && a.toLowerCase() != 'all'); const doJSONSchema = program.skip.every(a => a.toLowerCase() != 'json-schema' && a.toLowerCase() != 'all'); const doES6 = program.skip.every(a => a.toLowerCase() != 'es6' && a.toLowerCase() != 'all'); const doModelDoc = program.skip.every(a => a.toLowerCase() != 'model-doc' && a.toLowerCase() != 'all'); +const doCIMCORE = program.skip.every(a => a.toLowerCase() != 'cimcore' && a.toLowerCase() != 'all'); +const doADL = program.skip.every(a => a.toLowerCase() != 'adl' && a.toLowerCase() != 'all'); // Process the de-duplicate error flag @@ -95,7 +97,10 @@ if (doJSONSchema) { shrJSE.setLogger(logger.child({module: 'shr-json-schema-export'})); } if (doModelDoc) { - shrJDE.setLogger(logger.child({module: 'shr-json-javadoc'})); + shrJDE.setLogger(logger.child({ module: 'shr-json-javadoc' })); +} +if (doADL) { + shrAE.setLogger(logger.child({module: 'shr-adl-export'})); } // NOTE: shr-es6-export does not currently support a Bunyan logger @@ -217,6 +222,10 @@ if (doCIMCORE) { logger.info('Skipping CIMCORE export'); } +if (doADL) { + shrAE.generateADLtoPath(expSpecifications, configSpecifications, program.out); +} + if (doJSON) { try { const jsonHierarchyResults = shrJE.exportToJSON(specifications, configSpecifications); From 275d9ff17857e262a212ec9b123a5da93d8e71c7 Mon Sep 17 00:00:00 2001 From: Abhijay Saran Date: Fri, 10 Aug 2018 16:27:51 -0400 Subject: [PATCH 19/28] Added defensive catch --- app.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index 46bdb6a..c696672 100644 --- a/app.js +++ b/app.js @@ -223,7 +223,13 @@ if (doCIMCORE) { } if (doADL) { - shrAE.generateADLtoPath(expSpecifications, configSpecifications, program.out); + try { + shrAE.generateADLtoPath(expSpecifications, configSpecifications, program.out); + } catch (error) { + logger.fatal('Failure in ADL export. Aborting with error message: %s', error); + } +} else { + logger.info('Skipping ADL export'); } if (doJSON) { From e3e7e390994663218bac3b63257b3ac5c08d19d3 Mon Sep 17 00:00:00 2001 From: Abhijay Saran Date: Thu, 16 Aug 2018 06:21:44 -0700 Subject: [PATCH 20/28] Added adl skip flag --- app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.js b/app.js index c696672..addf76e 100644 --- a/app.js +++ b/app.js @@ -33,7 +33,7 @@ program .usage(' [options]') .option('-l, --log-level ', 'the console log level (default: info)', /^(fatal|error|warn|info|debug|trace)$/i, 'info') .option('-m, --log-mode ', 'the console log mode (default: short)', /^(short|long|json|off)$/i, 'short') - .option('-s, --skip ', 'skip an export feature (default: )', collect, []) + .option('-s, --skip ', 'skip an export feature (default: )', collect, []) .option('-o, --out ', `the path to the output folder (default: ${path.join('.', 'out')})`, path.join('.', 'out')) .option('-c, --config ', 'the name of the config file (default: config.json)', 'config.json') .option('-d, --duplicate', 'show duplicate error messages (default: false)') From 819a33d3a0dece4b648db52ec61ec343f638fb26 Mon Sep 17 00:00:00 2001 From: Abhijay Saran Date: Fri, 29 Jun 2018 13:56:59 -0400 Subject: [PATCH 21/28] Minor improvements in variables and output colors --- app.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app.js b/app.js index addf76e..b7b7b17 100644 --- a/app.js +++ b/app.js @@ -12,7 +12,7 @@ const shrJSE = require('shr-json-schema-export'); const shrEE = require('shr-es6-export'); const shrFE = require('shr-fhir-export'); const shrJDE = require('shr-json-javadoc'); -const shrAE = require('../shr-adl-exporter'); +const shrAE = require('../shr-adl-bmm-exporter'); const LogCounter = require('./logcounter'); const SpecificationsFilter = require('./filter'); @@ -126,9 +126,10 @@ if (filter) { const failedExports = []; +let cimcoreSpecifications; if (doCIMCORE) { try { - var cimcoreSpecifications = { + cimcoreSpecifications = { 'dataElements': [], 'valueSets': [], 'mappings': [], @@ -227,6 +228,7 @@ if (doADL) { shrAE.generateADLtoPath(expSpecifications, configSpecifications, program.out); } catch (error) { logger.fatal('Failure in ADL export. Aborting with error message: %s', error); + failedExports.push('shr-adl-bmm-export'); } } else { logger.info('Skipping ADL export'); @@ -374,7 +376,7 @@ logger.info('Finished CLI Import/Export'); const ftlCounter = logCounter.fatal; const errCounter = logCounter.error; const wrnCounter = logCounter.warn; -let [errColor, errLabel, wrnColor, wrnLabel, resetColor, ftlLabel] = ['\x1b[32m', 'errors', '\x1b[32m', 'warnings', '\x1b[0m', 'fatal errors']; +let [errColor, errLabel, wrnColor, wrnLabel, resetColor, ftlColor, ftlLabel] = ['\x1b[32m', 'errors', '\x1b[32m', 'warnings', '\x1b[0m', '\x1b[31m', 'fatal errors']; if (ftlCounter.count > 0) { // logger.fatal(''); ftlLabel = `fatal errors (${failedExports.join(', ')})`; @@ -392,7 +394,7 @@ if (wrnCounter.count > 0) { const hrend = process.hrtime(hrstart); console.log('------------------------------------------------------------'); console.log('Elapsed time: %d.%ds', hrend[0], Math.floor(hrend[1]/1000000)); -if (ftlCounter.count > 0) console.log('%s%d %s%s', errColor, ftlCounter.count, ftlLabel, resetColor); +if (ftlCounter.count > 0) console.log('%s%d %s%s', ftlColor, ftlCounter.count, ftlLabel, resetColor); console.log('%s%d %s%s', errColor, errCounter.count, errLabel, resetColor); console.log('%s%d %s%s', wrnColor, wrnCounter.count, wrnLabel, resetColor); console.log('------------------------------------------------------------'); From ce1cad3fecfc1ff9cfa81d5217481e1a5bc119fb Mon Sep 17 00:00:00 2001 From: Abhijay Saran Date: Thu, 16 Aug 2018 12:55:59 -0700 Subject: [PATCH 22/28] Added ahead and behind indicators to switchall --- switch-all-branches | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/switch-all-branches b/switch-all-branches index 91ae4b3..1c9e328 100755 --- a/switch-all-branches +++ b/switch-all-branches @@ -1,4 +1,12 @@ #!/bin/bash + +# This tool helps manage the different SHR branches +# It is recommended you alias it to a shorter command to ease use. +# I have it aliased in my git config as: +# [alias] +# sa = !bash switchAllBranches +# to easily use it as "git sa feature-branch" + RED='\033[0;31m' GREEN='\033[0;32m' BLUE='\033[0;36m' @@ -146,7 +154,10 @@ function git_branches() #check if repo is out of sync with remote remote=$(cd $sub; git branch -a | grep remotes | grep -s -m 1 $($curr_br) 2>/dev/null | tr -d '*'' ' ) if [[ $remote != "" && -n $(cd $sub; git diff --shortstat $($curr_br)..remotes/origin/$($curr_br)) ]]; then - changed="${changed}${YLW}*${NC}"; + ahead=$(cd $sub; git rev-list --left-right --count $($curr_br)...origin/$($curr_br) | cut -f 1); + behind=$(cd $sub; git rev-list --left-right --count $($curr_br)...origin/$($curr_br) | cut -f 2); + + changed="${changed}${YLW}*${DIM} [$GREEN${ahead}↟ ${RED}${behind}↡${DIM}]$NC"; fi # #adjust spacing if needed @@ -165,4 +176,4 @@ function git_branches() echo } -git_branches +git_branches \ No newline at end of file From 0ef96170f2744b585bfbcd6bee33869da2f6740d Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Thu, 16 Aug 2018 20:42:18 -0400 Subject: [PATCH 23/28] Fix shr-adl-bmm-export reference and yarn link Fix the require on shr-adl-bmm export to use the correct (updated) package name -- and not a relative path. Add it to yarn link and unlink. --- app.js | 2 +- yarn-link-all | 5 +++++ yarn-unlink-all | 5 +++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/app.js b/app.js index b7b7b17..88ba4c8 100644 --- a/app.js +++ b/app.js @@ -12,7 +12,7 @@ const shrJSE = require('shr-json-schema-export'); const shrEE = require('shr-es6-export'); const shrFE = require('shr-fhir-export'); const shrJDE = require('shr-json-javadoc'); -const shrAE = require('../shr-adl-bmm-exporter'); +const shrAE = require('shr-adl-bmm-export'); const LogCounter = require('./logcounter'); const SpecificationsFilter = require('./filter'); diff --git a/yarn-link-all b/yarn-link-all index 7065207..5673c24 100755 --- a/yarn-link-all +++ b/yarn-link-all @@ -53,6 +53,10 @@ yarn link shr-models yarn link shr-test-helpers yarn link +cd ../shr-adl-bmm-export +echo "=============== shr-adl-bmm-export =================" +yarn link + cd ../shr-cli echo "===================== shr-cli ======================" yarn link shr-models @@ -63,3 +67,4 @@ yarn link shr-json-schema-export yarn link shr-json-javadoc yarn link shr-es6-export yarn link shr-fhir-export +yarn link shr-adl-bmm-export diff --git a/yarn-unlink-all b/yarn-unlink-all index a3efed2..11e3180 100755 --- a/yarn-unlink-all +++ b/yarn-unlink-all @@ -1,6 +1,7 @@ #!/usr/bin/env bash echo "===================== shr-cli ======================" +yarn unlink shr-adl-bmm-export yarn unlink shr-fhir-export yarn unlink shr-es6-export yarn unlink shr-json-schema-export @@ -10,6 +11,10 @@ yarn unlink shr-text-import yarn unlink shr-expand yarn unlink shr-models +cd ../shr-adl-bmm-export +echo "=============== shr-adl-bmm-export =================" +yarn unlink + cd ../shr-fhir-export echo "================= shr-fhir-export ==================" yarn unlink shr-models From 358a49bca472bc5c14bcbba990718cb4df729527 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Fri, 17 Aug 2018 13:59:09 -0400 Subject: [PATCH 24/28] Update shr-* dependencies shr-adl-bmm-export@^1.0.0 shr-expand@^5.5.2-beta.2 shr-fhir-export@^5.7.0-beta.8 shr-models@^5.5.3-beta.1 shr-text-import@^5.4.2-beta.1 --- package.json | 9 +++++---- yarn.lock | 38 +++++++++++++++++++++++++------------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/package.json b/package.json index 9ea58c3..1ff1cb0 100644 --- a/package.json +++ b/package.json @@ -21,14 +21,15 @@ "bunyan": "^1.8.12", "commander": "^2.9.0", "mkdirp": "^0.5.1", + "shr-adl-bmm-export": "^1.0.0", "shr-es6-export": "^5.4.1", - "shr-expand": "^5.5.2-beta.1", - "shr-fhir-export": "^5.7.0-beta.7", + "shr-expand": "^5.5.2-beta.2", + "shr-fhir-export": "^5.7.0-beta.8", "shr-json-export": "^5.1.4", "shr-json-javadoc": "^1.4.3-beta.2", "shr-json-schema-export": "^5.3.0", - "shr-models": "^5.5.2", - "shr-text-import": "^5.4.1" + "shr-models": "^5.5.3-beta.1", + "shr-text-import": "^5.4.2-beta.1" }, "devDependencies": { "eslint": "^4.6.1", diff --git a/yarn.lock b/yarn.lock index 974c483..d15126b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -230,6 +230,10 @@ decamelize@^1.1.1: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" +dedent-js@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/dedent-js/-/dedent-js-1.0.1.tgz#bee5fb7c9e727d85dffa24590d10ec1ab1255305" + deep-is@~0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" @@ -277,7 +281,7 @@ eslint-visitor-keys@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d" -eslint@^4.6.1: +eslint@^4.19.1, eslint@^4.6.1: version "4.19.1" resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.19.1.tgz#32d1d653e1d90408854bfb296f076ec7e186a300" dependencies: @@ -917,19 +921,27 @@ showdown@^1.8.6: dependencies: yargs "^10.0.3" +shr-adl-bmm-export@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shr-adl-bmm-export/-/shr-adl-bmm-export-1.0.0.tgz#1d7cfea03f540e0da32f51131bbfa9fdcc84e1de" + dependencies: + bunyan "^1.8.12" + dedent-js "^1.0.1" + eslint "^4.19.1" + shr-es6-export@^5.4.1: version "5.4.1" resolved "https://registry.yarnpkg.com/shr-es6-export/-/shr-es6-export-5.4.1.tgz#f68c17b0ca8286be92d180f0095bc21c9d41f6c3" dependencies: reserved-words "^0.1.2" -shr-expand@^5.5.2-beta.1: - version "5.5.2-beta.1" - resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.1.tgz#25baa7e4363ebcef1734210253b17da1e4ec1d4f" +shr-expand@^5.5.2-beta.2: + version "5.5.2-beta.2" + resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.2.tgz#6115591a73509a84d094a5b4f9c158a1454842ef" -shr-fhir-export@^5.7.0-beta.7: - version "5.7.0-beta.7" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.7.tgz#3aeae6db0a59913841fac97c94a9d2a3de570118" +shr-fhir-export@^5.7.0-beta.8: + version "5.7.0-beta.8" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.8.tgz#f85d3ae0c1a37ec968e550585ed27ef85c98efb4" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" @@ -951,13 +963,13 @@ shr-json-schema-export@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/shr-json-schema-export/-/shr-json-schema-export-5.3.0.tgz#2b1f1dd918381c23b4ebbca9946c0dc85dc227ce" -shr-models@^5.5.2: - version "5.5.2" - resolved "https://registry.yarnpkg.com/shr-models/-/shr-models-5.5.2.tgz#8871fa8626278a53dc729fc04512aaf2acf91b94" +shr-models@^5.5.3-beta.1: + version "5.5.3-beta.1" + resolved "https://registry.yarnpkg.com/shr-models/-/shr-models-5.5.3-beta.1.tgz#7fd4a03a38b893d62bbe2309a669db71fa2940be" -shr-text-import@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/shr-text-import/-/shr-text-import-5.4.1.tgz#ee708eef697b285f5c7decda5dc982e07c58fd38" +shr-text-import@^5.4.2-beta.1: + version "5.4.2-beta.1" + resolved "https://registry.yarnpkg.com/shr-text-import/-/shr-text-import-5.4.2-beta.1.tgz#ade670f26a51e37f079710a9db6e686d72288c5d" dependencies: antlr4 "~4.6.0" From 4c48335a2cf983d1a73b6e44efc4081c358a47fa Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Fri, 17 Aug 2018 14:02:11 -0400 Subject: [PATCH 25/28] v5.10.0-beta.8 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ff1cb0..a33efd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.7", + "version": "5.10.0-beta.8", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0", From f881ba6cd319ad52b43a05af5bd6905a79b3a268 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Fri, 17 Aug 2018 15:18:20 -0400 Subject: [PATCH 26/28] Skip ADL export by default Skip ADL export by default. Turn it on via `-a` or `--adl` flags. --- README.md | 1 + app.js | 7 +++++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89a5c33..f8202d6 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ $ node . --help -l, --log-level the console log level (default: info) -m, --log-mode the console log mode (default: short) -s, --skip skip an export feature (default: ) + -a, --adl run the adl exporter (default: false) -o, --out the path to the output folder (default: ./out) -c, --config ', 'the name of the config file (default: config.json) -d, --duplicate' show duplicate error messages (default: false) diff --git a/app.js b/app.js index 88ba4c8..e16b689 100644 --- a/app.js +++ b/app.js @@ -33,7 +33,8 @@ program .usage(' [options]') .option('-l, --log-level ', 'the console log level (default: info)', /^(fatal|error|warn|info|debug|trace)$/i, 'info') .option('-m, --log-mode ', 'the console log mode (default: short)', /^(short|long|json|off)$/i, 'short') - .option('-s, --skip ', 'skip an export feature (default: )', collect, []) + .option('-s, --skip ', 'skip an export feature ', collect, []) + .option('-a, --adl', 'run the adl exporter (default: false)') .option('-o, --out ', `the path to the output folder (default: ${path.join('.', 'out')})`, path.join('.', 'out')) .option('-c, --config ', 'the name of the config file (default: config.json)', 'config.json') .option('-d, --duplicate', 'show duplicate error messages (default: false)') @@ -56,7 +57,9 @@ const doJSONSchema = program.skip.every(a => a.toLowerCase() != 'json-schema' && const doES6 = program.skip.every(a => a.toLowerCase() != 'es6' && a.toLowerCase() != 'all'); const doModelDoc = program.skip.every(a => a.toLowerCase() != 'model-doc' && a.toLowerCase() != 'all'); const doCIMCORE = program.skip.every(a => a.toLowerCase() != 'cimcore' && a.toLowerCase() != 'all'); -const doADL = program.skip.every(a => a.toLowerCase() != 'adl' && a.toLowerCase() != 'all'); + +// Process the ADL flag +const doADL = program.adl; // Process the de-duplicate error flag From c3df378a2726ef98f93da96bd13e6bc134238db8 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Fri, 31 Aug 2018 10:28:19 -0400 Subject: [PATCH 27/28] Upgrade shr-* dependencies --- package.json | 18 +++++++++--------- yarn.lock | 54 ++++++++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/package.json b/package.json index a33efd5..784688e 100644 --- a/package.json +++ b/package.json @@ -21,15 +21,15 @@ "bunyan": "^1.8.12", "commander": "^2.9.0", "mkdirp": "^0.5.1", - "shr-adl-bmm-export": "^1.0.0", - "shr-es6-export": "^5.4.1", - "shr-expand": "^5.5.2-beta.2", - "shr-fhir-export": "^5.7.0-beta.8", - "shr-json-export": "^5.1.4", - "shr-json-javadoc": "^1.4.3-beta.2", - "shr-json-schema-export": "^5.3.0", - "shr-models": "^5.5.3-beta.1", - "shr-text-import": "^5.4.2-beta.1" + "shr-adl-bmm-export": "^1.0.1", + "shr-es6-export": "^5.4.2", + "shr-expand": "^5.5.2", + "shr-fhir-export": "^5.7.0", + "shr-json-export": "^5.1.5", + "shr-json-javadoc": "^1.4.3", + "shr-json-schema-export": "^5.3.1", + "shr-models": "^5.5.3", + "shr-text-import": "^5.4.2" }, "devDependencies": { "eslint": "^4.6.1", diff --git a/yarn.lock b/yarn.lock index d15126b..cfbef22 100644 --- a/yarn.lock +++ b/yarn.lock @@ -921,55 +921,55 @@ showdown@^1.8.6: dependencies: yargs "^10.0.3" -shr-adl-bmm-export@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shr-adl-bmm-export/-/shr-adl-bmm-export-1.0.0.tgz#1d7cfea03f540e0da32f51131bbfa9fdcc84e1de" +shr-adl-bmm-export@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/shr-adl-bmm-export/-/shr-adl-bmm-export-1.0.1.tgz#e4272bd97dbcf6c387eaeb9a3b7a7c8acbc9a1a3" dependencies: bunyan "^1.8.12" dedent-js "^1.0.1" eslint "^4.19.1" -shr-es6-export@^5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/shr-es6-export/-/shr-es6-export-5.4.1.tgz#f68c17b0ca8286be92d180f0095bc21c9d41f6c3" +shr-es6-export@^5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/shr-es6-export/-/shr-es6-export-5.4.2.tgz#cda40715219c268c4ed1b79ec302e832e7044446" dependencies: reserved-words "^0.1.2" -shr-expand@^5.5.2-beta.2: - version "5.5.2-beta.2" - resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2-beta.2.tgz#6115591a73509a84d094a5b4f9c158a1454842ef" +shr-expand@^5.5.2: + version "5.5.2" + resolved "https://registry.yarnpkg.com/shr-expand/-/shr-expand-5.5.2.tgz#e325327b8e1a1995229c7abb1fbef4a5347b67ff" -shr-fhir-export@^5.7.0-beta.8: - version "5.7.0-beta.8" - resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0-beta.8.tgz#f85d3ae0c1a37ec968e550585ed27ef85c98efb4" +shr-fhir-export@^5.7.0: + version "5.7.0" + resolved "https://registry.yarnpkg.com/shr-fhir-export/-/shr-fhir-export-5.7.0.tgz#9f87bb2f3f095e059c7f8e0bde8e47e225f7f91d" dependencies: fs-extra "^2.0.0" lodash "^4.17.5" -shr-json-export@^5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/shr-json-export/-/shr-json-export-5.1.4.tgz#9b1cc379002366db70ef529a39b8220253a860ee" +shr-json-export@^5.1.5: + version "5.1.5" + resolved "https://registry.yarnpkg.com/shr-json-export/-/shr-json-export-5.1.5.tgz#62ee553e1ac18808ff2cea6400ba128a60fafe8a" -shr-json-javadoc@^1.4.3-beta.2: - version "1.4.3-beta.2" - resolved "https://registry.yarnpkg.com/shr-json-javadoc/-/shr-json-javadoc-1.4.3-beta.2.tgz#3a07f86e13affd43009330e17ca45d8013eabcdb" +shr-json-javadoc@^1.4.3: + version "1.4.3" + resolved "https://registry.yarnpkg.com/shr-json-javadoc/-/shr-json-javadoc-1.4.3.tgz#e317d828ca3e7eccb3e8a86848b61e6e815530f3" dependencies: bluebird "^3.5.1" ejs "^2.5.7" ncp "^2.0.0" showdown "^1.8.6" -shr-json-schema-export@^5.3.0: - version "5.3.0" - resolved "https://registry.yarnpkg.com/shr-json-schema-export/-/shr-json-schema-export-5.3.0.tgz#2b1f1dd918381c23b4ebbca9946c0dc85dc227ce" +shr-json-schema-export@^5.3.1: + version "5.3.1" + resolved "https://registry.yarnpkg.com/shr-json-schema-export/-/shr-json-schema-export-5.3.1.tgz#6eb8201a6c4911292db7aa15354d0ddaad902eee" -shr-models@^5.5.3-beta.1: - version "5.5.3-beta.1" - resolved "https://registry.yarnpkg.com/shr-models/-/shr-models-5.5.3-beta.1.tgz#7fd4a03a38b893d62bbe2309a669db71fa2940be" +shr-models@^5.5.3: + version "5.5.3" + resolved "https://registry.yarnpkg.com/shr-models/-/shr-models-5.5.3.tgz#bc972ba2355bd7dd35d1169c7f17332967165c65" -shr-text-import@^5.4.2-beta.1: - version "5.4.2-beta.1" - resolved "https://registry.yarnpkg.com/shr-text-import/-/shr-text-import-5.4.2-beta.1.tgz#ade670f26a51e37f079710a9db6e686d72288c5d" +shr-text-import@^5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/shr-text-import/-/shr-text-import-5.4.2.tgz#4ee003bf50af1655a3bc6552aaa41e9612fba572" dependencies: antlr4 "~4.6.0" From ba8e03c7567fdbda165c553c19ee32a0cb2b6849 Mon Sep 17 00:00:00 2001 From: Chris Moesel Date: Fri, 31 Aug 2018 10:28:32 -0400 Subject: [PATCH 28/28] v5.10.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 784688e..a87232a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "shr-cli", - "version": "5.10.0-beta.8", + "version": "5.10.0", "description": "Command-line interface for SHR tools", "author": "", "license": "Apache-2.0",