diff --git a/.gitignore b/.gitignore index 0efd754f..29a1a488 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,7 @@ /__tests__/r4/ /r4/ /stu3/ +/sample-app/node_modules/ +/fhirValidatorr4.js +/fhirValidatorstu3.js +/index.js diff --git a/.npmrc b/.npmrc new file mode 100644 index 00000000..2399683a --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +node-options=--max_old_space_size=32768 diff --git a/package-lock.json b/package-lock.json index 0c644c97..780474c9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@d4l/js-fhir-validator", - "version": "1.0.3", + "version": "1.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -775,9 +775,9 @@ "dev": true }, "ajv": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.2.3.tgz", - "integrity": "sha512-idv5WZvKVXDqKralOImQgPM9v6WOdLNa0IY3B3doOjw/YxRGT8I+allIJ6kd7Uaj+SF1xZUSU+nPM5aDNBVtnw==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.3.tgz", + "integrity": "sha512-Df6NAivu9KpZw+q8ySijAgLvr1mUA5ihkRvCLCxpdYR21ann5yIuN+PpFxmweSj7i3yjJ0x5LN5KVs0RRzskAQ==", "requires": { "fast-deep-equal": "^3.1.1", "json-schema-traverse": "^1.0.0", diff --git a/package.json b/package.json index 49d2f5b7..b41a78dc 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "@d4l/js-fhir-validator", - "version": "1.0.3", + "version": "1.0.4", "description": "Runtime FHIR Validator", "main": "index.js", "scripts": { - "test": "jest __tests__/r4; jest __tests__/stu3", + "test": "jest __tests__/r4 --runInBand; jest __tests__/stu3 --runInBand", "build": "npm run build:r4; npm run build:index; npm run build:stu3; npm run compress-files", "build:index": "npx ajv compile -s fhir.schema.v401.json -o index.js", "build:test": "node ./scripts/generate-test-scripts.js", @@ -15,7 +15,7 @@ "generate-validator-scripts": "node ./scripts/generate-validator-scripts.js" }, "dependencies": { - "ajv": "^7.2.3", + "ajv": "^8.0.3", "terser": "^5.3.8" }, "devDependencies": { diff --git a/sample-app/src/components/Validator.vue b/sample-app/src/components/Validator.vue index 509c229a..9ee13076 100644 --- a/sample-app/src/components/Validator.vue +++ b/sample-app/src/components/Validator.vue @@ -2,7 +2,7 @@ - +
@@ -23,7 +23,7 @@ v-model="version" />
-
+

✅ Valid!

@@ -73,7 +73,6 @@ import "vue-json-pretty/lib/styles.css"; export default defineComponent({ name: "Validator", - // components: { VueJsonPretty, "d4l-button": d4lButton }, components: { VueJsonPretty, AppSection }, data: function() { return { @@ -116,7 +115,6 @@ export default defineComponent({ this.result = false; } if (validatorModule) { - // todo: extension const validatorFunction = validatorModule.default; const validationResult = validatorFunction(sourceAsJson); @@ -204,14 +202,14 @@ button:disabled { background: #faf8f8; } -formgroup { +.formgroup { margin-top: 20px; display: flex; align-items: center; justify-content: space-evenly; } -formgroup label { +.formgroup label { display: inline; } diff --git a/sample-app/vue.config.js b/sample-app/vue.config.js new file mode 100644 index 00000000..5f0bae4b --- /dev/null +++ b/sample-app/vue.config.js @@ -0,0 +1,5 @@ +module.exports = { + chainWebpack: config => { + config.plugins.delete("prefetch"); + } +}; diff --git a/scripts/generate-validator-scripts.js b/scripts/generate-validator-scripts.js index bdab15b4..3218d023 100644 --- a/scripts/generate-validator-scripts.js +++ b/scripts/generate-validator-scripts.js @@ -23,7 +23,7 @@ fs.readdir(jsonDirectory, (err, files) => { process.stdout.write(`Current progress: [${index + 1}/${files.length}]`); execSync( - `npx ajv compile -s ${jsonDirectory}${file} -o ${jsDirectory}${jsFileName}` + `npx ajv compile --strict=false -s ${jsonDirectory}${file} -o ${jsDirectory}${jsFileName}` ); }); });