From 2682228f6105bf12b4e088504d2a052650317390 Mon Sep 17 00:00:00 2001 From: Steve Cassidy Date: Sun, 22 Oct 2023 22:21:27 +1100 Subject: [PATCH] Upgrade faims3-data-model and remove some debug output Signed-off-by: Steve Cassidy --- package-lock.json | 144 +++++++++++++++++++---------- package.json | 2 +- src/gui/components/record/form.tsx | 9 +- src/sync/draft-storage.ts | 17 +--- 4 files changed, 104 insertions(+), 68 deletions(-) diff --git a/package-lock.json b/package-lock.json index 670b721ac..f3fac5bda 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,7 +42,7 @@ "clsx": "1.2.1", "cordova": "11.1.0", "cordova-plugin-inappbrowser": "^5.0.0", - "faims3-datamodel": "github:FAIMS/faims3-data-model#v1.0.0", + "faims3-datamodel": "github:FAIMS/faims3-data-model#v1.0.4", "fast-json-stable-stringify": "2.1.0", "formik": "2.2.9", "formik-mui": "4.0.0", @@ -4494,7 +4494,8 @@ }, "node_modules/argsarray": { "version": "0.0.1", - "license": "WTFPL", + "resolved": "https://registry.npmjs.org/argsarray/-/argsarray-0.0.1.tgz", + "integrity": "sha512-u96dg2GcAKtpTrBdDoFIM7PjcBA+6rSP0OR94MOReNRyUECL6MtQt5XXmRr4qrftYaef9+l5hcpO5te7sML1Cg==", "peer": true }, "node_modules/aria-query": { @@ -6699,7 +6700,8 @@ }, "node_modules/encoding-down": { "version": "6.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/encoding-down/-/encoding-down-6.3.0.tgz", + "integrity": "sha512-QKrV0iKR6MZVJV08QY0wp1e7vF6QbhnbQhb07bwpEyuz4uZiZgPlEGdkCROuFkUwdxlFaiPIhjyarH1ee/3vhw==", "peer": true, "dependencies": { "abstract-leveldown": "^6.2.1", @@ -6713,7 +6715,8 @@ }, "node_modules/encoding-down/node_modules/abstract-leveldown": { "version": "6.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.3.0.tgz", + "integrity": "sha512-TU5nlYgta8YrBMNpc9FwQzRbiXsj49gsALsXadbGHt9CROPzX5fB0rWDR5mtdpOOKa5XqRFpbj1QroPAoPzVjQ==", "peer": true, "dependencies": { "buffer": "^5.5.0", @@ -6728,6 +6731,8 @@ }, "node_modules/encoding-down/node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -6742,7 +6747,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "peer": true, "dependencies": { "base64-js": "^1.3.1", @@ -6751,7 +6755,8 @@ }, "node_modules/encoding-down/node_modules/level-concat-iterator": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", "peer": true, "engines": { "node": ">=6" @@ -6759,7 +6764,8 @@ }, "node_modules/encoding-down/node_modules/level-errors": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", "peer": true, "dependencies": { "errno": "~0.1.1" @@ -6770,7 +6776,8 @@ }, "node_modules/encoding-down/node_modules/level-supports": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", "peer": true, "dependencies": { "xtend": "^4.0.2" @@ -6799,6 +6806,8 @@ }, "node_modules/end-stream": { "version": "0.1.0", + "resolved": "https://registry.npmjs.org/end-stream/-/end-stream-0.1.0.tgz", + "integrity": "sha512-Brl10T8kYnc75IepKizW6Y9liyW8ikz1B7n/xoHrJxoVSSjoqPn30sb7XVFfQERK4QfUMYRGs9dhWwtt2eu6uA==", "peer": true, "dependencies": { "write-stream": "~0.4.3" @@ -7641,8 +7650,8 @@ "license": "MIT" }, "node_modules/faims3-datamodel": { - "version": "1.0.3", - "resolved": "git+ssh://git@github.com/FAIMS/faims3-data-model.git#aaf2a98b456501d78ab400a7fe2c266a2d32a3e6", + "version": "1.0.4", + "resolved": "git+ssh://git@github.com/FAIMS/faims3-data-model.git#cf0bdc388462715e3e77ff10c23f936e68a93007", "license": "Apache", "dependencies": { "@demvsystems/yup-ast": "^1.2.2", @@ -11117,7 +11126,8 @@ }, "node_modules/level": { "version": "6.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level/-/level-6.0.1.tgz", + "integrity": "sha512-psRSqJZCsC/irNhfHzrVZbmPYXDcEYhA5TVNwr+V92jF44rbf86hqGp8fiT702FyiArScYIlPSBTDUASCVNSpw==", "peer": true, "dependencies": { "level-js": "^5.0.0", @@ -11194,7 +11204,8 @@ }, "node_modules/level-js": { "version": "5.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-js/-/level-js-5.0.2.tgz", + "integrity": "sha512-SnBIDo2pdO5VXh02ZmtAyPP6/+6YTJg2ibLtl9C34pWvmtMEmRTWpra+qO/hifkUtBTOtfx6S9vLDjBsBK4gRg==", "peer": true, "dependencies": { "abstract-leveldown": "~6.2.3", @@ -11205,7 +11216,8 @@ }, "node_modules/level-js/node_modules/abstract-leveldown": { "version": "6.2.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", + "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", "peer": true, "dependencies": { "buffer": "^5.5.0", @@ -11220,6 +11232,8 @@ }, "node_modules/level-js/node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -11234,7 +11248,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "peer": true, "dependencies": { "base64-js": "^1.3.1", @@ -11243,7 +11256,8 @@ }, "node_modules/level-js/node_modules/level-concat-iterator": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", "peer": true, "engines": { "node": ">=6" @@ -11251,7 +11265,8 @@ }, "node_modules/level-js/node_modules/level-supports": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", "peer": true, "dependencies": { "xtend": "^4.0.2" @@ -11262,7 +11277,8 @@ }, "node_modules/level-packager": { "version": "5.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-packager/-/level-packager-5.1.1.tgz", + "integrity": "sha512-HMwMaQPlTC1IlcwT3+swhqf/NUO+ZhXVz6TY1zZIIZlIR0YSn8GtAAWmIvKjNY16ZkEg/JcpAuQskxsXqC0yOQ==", "peer": true, "dependencies": { "encoding-down": "^6.3.0", @@ -11274,7 +11290,8 @@ }, "node_modules/level-packager/node_modules/abstract-leveldown": { "version": "6.2.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", + "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", "peer": true, "dependencies": { "buffer": "^5.5.0", @@ -11289,6 +11306,8 @@ }, "node_modules/level-packager/node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -11303,7 +11322,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "peer": true, "dependencies": { "base64-js": "^1.3.1", @@ -11312,7 +11330,8 @@ }, "node_modules/level-packager/node_modules/deferred-leveldown": { "version": "5.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", + "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", "peer": true, "dependencies": { "abstract-leveldown": "~6.2.1", @@ -11324,7 +11343,8 @@ }, "node_modules/level-packager/node_modules/level-concat-iterator": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", "peer": true, "engines": { "node": ">=6" @@ -11332,7 +11352,8 @@ }, "node_modules/level-packager/node_modules/level-errors": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", "peer": true, "dependencies": { "errno": "~0.1.1" @@ -11343,7 +11364,8 @@ }, "node_modules/level-packager/node_modules/level-iterator-stream": { "version": "4.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", + "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", "peer": true, "dependencies": { "inherits": "^2.0.4", @@ -11356,7 +11378,8 @@ }, "node_modules/level-packager/node_modules/level-supports": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", "peer": true, "dependencies": { "xtend": "^4.0.2" @@ -11367,7 +11390,8 @@ }, "node_modules/level-packager/node_modules/levelup": { "version": "4.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", + "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", "peer": true, "dependencies": { "deferred-leveldown": "~5.3.0", @@ -11389,6 +11413,8 @@ }, "node_modules/level-write-stream": { "version": "1.0.0", + "resolved": "https://registry.npmjs.org/level-write-stream/-/level-write-stream-1.0.0.tgz", + "integrity": "sha512-bBNKOEOMl8msO+uIM9YX/gUO6ckokZ/4pCwTm/lwvs46x6Xs8Zy0sn3Vh37eDqse4mhy4fOMIb/JsSM2nyQFtw==", "peer": true, "dependencies": { "end-stream": "~0.1.0" @@ -11396,8 +11422,9 @@ }, "node_modules/leveldown": { "version": "5.6.0", + "resolved": "https://registry.npmjs.org/leveldown/-/leveldown-5.6.0.tgz", + "integrity": "sha512-iB8O/7Db9lPaITU1aA2txU/cBEXAt4vWwKQRrrWuS6XDgbP4QZGj9BL2aNbwb002atoQ/lIotJkfyzz+ygQnUQ==", "hasInstallScript": true, - "license": "MIT", "peer": true, "dependencies": { "abstract-leveldown": "~6.2.1", @@ -11410,7 +11437,8 @@ }, "node_modules/leveldown/node_modules/abstract-leveldown": { "version": "6.2.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", + "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", "peer": true, "dependencies": { "buffer": "^5.5.0", @@ -11425,6 +11453,8 @@ }, "node_modules/leveldown/node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -11439,7 +11469,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "peer": true, "dependencies": { "base64-js": "^1.3.1", @@ -11448,7 +11477,8 @@ }, "node_modules/leveldown/node_modules/level-concat-iterator": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", "peer": true, "engines": { "node": ">=6" @@ -11456,7 +11486,8 @@ }, "node_modules/leveldown/node_modules/level-supports": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", "peer": true, "dependencies": { "xtend": "^4.0.2" @@ -12156,7 +12187,8 @@ }, "node_modules/napi-macros": { "version": "2.0.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", + "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==", "peer": true }, "node_modules/native-run": { @@ -12285,7 +12317,8 @@ }, "node_modules/node-gyp-build": { "version": "4.1.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.1.1.tgz", + "integrity": "sha512-dSq1xmcPDKPZ2EED2S6zw/b9NKsqzXRE6dVr8TVQnI3FJOTteUMuqF3Qqs6LZg+mLGYJWqQzMbIjMtJqTv87nQ==", "peer": true, "bin": { "node-gyp-build": "bin.js", @@ -14080,7 +14113,8 @@ }, "node_modules/pouchdb/node_modules/abstract-leveldown": { "version": "6.2.3", - "license": "MIT", + "resolved": "https://registry.npmjs.org/abstract-leveldown/-/abstract-leveldown-6.2.3.tgz", + "integrity": "sha512-BsLm5vFMRUrrLeCcRc+G0t2qOaTzpoJQLOubq2XM72eNpjF5UdU5o/5NvlNhx95XHcAvcl8OMXr4mlg/fRgUXQ==", "peer": true, "dependencies": { "buffer": "^5.5.0", @@ -14095,6 +14129,8 @@ }, "node_modules/pouchdb/node_modules/buffer": { "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "funding": [ { "type": "github", @@ -14109,7 +14145,6 @@ "url": "https://feross.org/support" } ], - "license": "MIT", "peer": true, "dependencies": { "base64-js": "^1.3.1", @@ -14118,7 +14153,8 @@ }, "node_modules/pouchdb/node_modules/deferred-leveldown": { "version": "5.3.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/deferred-leveldown/-/deferred-leveldown-5.3.0.tgz", + "integrity": "sha512-a59VOT+oDy7vtAbLRCZwWgxu2BaCfd5Hk7wxJd48ei7I+nsg8Orlb9CLG0PMZienk9BSUKgeAqkO2+Lw+1+Ukw==", "peer": true, "dependencies": { "abstract-leveldown": "~6.2.1", @@ -14130,12 +14166,14 @@ }, "node_modules/pouchdb/node_modules/isarray": { "version": "0.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", "peer": true }, "node_modules/pouchdb/node_modules/level-concat-iterator": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-concat-iterator/-/level-concat-iterator-2.0.1.tgz", + "integrity": "sha512-OTKKOqeav2QWcERMJR7IS9CUo1sHnke2C0gkSmcR7QuEtFNLLzHQAvnMw8ykvEcv0Qtkg0p7FOwP1v9e5Smdcw==", "peer": true, "engines": { "node": ">=6" @@ -14143,7 +14181,8 @@ }, "node_modules/pouchdb/node_modules/level-errors": { "version": "2.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-errors/-/level-errors-2.0.1.tgz", + "integrity": "sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw==", "peer": true, "dependencies": { "errno": "~0.1.1" @@ -14154,7 +14193,8 @@ }, "node_modules/pouchdb/node_modules/level-iterator-stream": { "version": "4.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-iterator-stream/-/level-iterator-stream-4.0.2.tgz", + "integrity": "sha512-ZSthfEqzGSOMWoUGhTXdX9jv26d32XJuHz/5YnuHZzH6wldfWMOVwI9TBtKcya4BKTyTt3XVA0A3cF3q5CY30Q==", "peer": true, "dependencies": { "inherits": "^2.0.4", @@ -14167,7 +14207,8 @@ }, "node_modules/pouchdb/node_modules/level-iterator-stream/node_modules/readable-stream": { "version": "3.6.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "peer": true, "dependencies": { "inherits": "^2.0.3", @@ -14180,7 +14221,8 @@ }, "node_modules/pouchdb/node_modules/level-supports": { "version": "1.0.1", - "license": "MIT", + "resolved": "https://registry.npmjs.org/level-supports/-/level-supports-1.0.1.tgz", + "integrity": "sha512-rXM7GYnW8gsl1vedTJIbzOrRv85c/2uCMpiiCzO2fndd06U/kUXEEU9evYn4zFggBOg36IsBW8LzqIpETwwQzg==", "peer": true, "dependencies": { "xtend": "^4.0.2" @@ -14191,7 +14233,8 @@ }, "node_modules/pouchdb/node_modules/levelup": { "version": "4.4.0", - "license": "MIT", + "resolved": "https://registry.npmjs.org/levelup/-/levelup-4.4.0.tgz", + "integrity": "sha512-94++VFO3qN95cM/d6eBXvd894oJE0w3cInq9USsyQzzoJxmiYzPAocNcuGCPGGjoXqDVJcr3C1jzt1TSjyaiLQ==", "peer": true, "dependencies": { "deferred-leveldown": "~5.3.0", @@ -14206,7 +14249,8 @@ }, "node_modules/pouchdb/node_modules/readable-stream": { "version": "1.1.14", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", "peer": true, "dependencies": { "core-util-is": "~1.0.0", @@ -14217,12 +14261,14 @@ }, "node_modules/pouchdb/node_modules/readable-stream/node_modules/string_decoder": { "version": "0.10.31", - "license": "MIT", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", "peer": true }, "node_modules/pouchdb/node_modules/through2": { "version": "3.0.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.2.tgz", + "integrity": "sha512-enaDQ4MUyP2W6ZyT6EsMzqBPZaM/avg8iuo+l2d3QCs0J+6RaqkHV/2/lOwDTueBHeJ/2LG9lrLW3d5rWPucuQ==", "peer": true, "dependencies": { "inherits": "^2.0.4", @@ -14231,7 +14277,8 @@ }, "node_modules/pouchdb/node_modules/through2/node_modules/readable-stream": { "version": "3.6.2", - "license": "MIT", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "peer": true, "dependencies": { "inherits": "^2.0.3", @@ -18303,6 +18350,8 @@ }, "node_modules/write-stream": { "version": "0.4.3", + "resolved": "https://registry.npmjs.org/write-stream/-/write-stream-0.4.3.tgz", + "integrity": "sha512-IJrvkhbAnj89W/GAVdVgbnPiVw5Ntg/B4tc/MUCIEwj/g6JIww1DWJyB/yBMT3yw2/TkT6IUZ0+IYef3flEw8A==", "peer": true, "dependencies": { "readable-stream": "~0.0.2" @@ -18310,7 +18359,8 @@ }, "node_modules/write-stream/node_modules/readable-stream": { "version": "0.0.4", - "license": "BSD", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-0.0.4.tgz", + "integrity": "sha512-azrivNydKRYt7zwLV5wWUK7YzKTWs3q87xSmY6DlHapPrCvaT6ZrukvM5erV+yCSSPmZT8zkSdttOHQpWWm9zw==", "peer": true }, "node_modules/ws": { diff --git a/package.json b/package.json index 93a1ed432..8cb7c9048 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "clsx": "1.2.1", "cordova": "11.1.0", "cordova-plugin-inappbrowser": "^5.0.0", - "faims3-datamodel": "github:FAIMS/faims3-data-model#v1.0.0", + "faims3-datamodel": "github:FAIMS/faims3-data-model#v1.0.4", "fast-json-stable-stringify": "2.1.0", "formik": "2.2.9", "formik-mui": "4.0.0", diff --git a/src/gui/components/record/form.tsx b/src/gui/components/record/form.tsx index 9911d737c..0da8b6397 100644 --- a/src/gui/components/record/form.tsx +++ b/src/gui/components/record/form.tsx @@ -756,12 +756,6 @@ class RecordForm extends React.Component< this.state.annotation, ui_specification ); - if (DEBUG_APP) - console.debug( - 'current revision id', - this.state.revision_cached, - this.props.revision_id - ); return ( getCurrentUserId(this.props.project_id) .then(userid => { @@ -817,7 +811,10 @@ class RecordForm extends React.Component< return result; }) .catch(err => { + // TODO: this is actually very serious and we should work out how + // to never get here or provide a good reason if we do const message = 'Could not save record'; + console.error('Could not save record:', err); (this.context as any).dispatch({ type: ActionType.ADD_ALERT, payload: { diff --git a/src/sync/draft-storage.ts b/src/sync/draft-storage.ts index e7a8f8053..c8ac6782e 100644 --- a/src/sync/draft-storage.ts +++ b/src/sync/draft-storage.ts @@ -15,7 +15,7 @@ * * Filename: draft-storage.ts * Description: - * TODO + * Handle storage of draft records */ import PouchDB from 'pouchdb-browser'; @@ -28,14 +28,12 @@ import { FAIMSTypeName, HRID_STRING, Relationship, -} from 'faims3-datamodel'; -import {DEBUG_APP} from '../buildconfig'; -import {local_pouch_options} from './connection'; -import { EncodedDraft, DraftMetadataList, attachment_to_file, } from 'faims3-datamodel'; +import {DEBUG_APP} from '../buildconfig'; +import {local_pouch_options} from './connection'; import {logError} from '../logging'; export type DraftDB = PouchDB.Database; @@ -47,7 +45,6 @@ export const draft_db: DraftDB = new PouchDB( // Note: duplicated from faims3-datamodel as it doesn't do anything important export function generate_file_name(): string { - console.debug('Generating a uuid-filename'); return 'file-' + uuidv4(); } @@ -184,9 +181,6 @@ function encodeStagedData( content_type: file.type, data: file, }; - if (DEBUG_APP) { - console.debug('Saving draft file:', file_name); - } attachment_metadata[field_name].push(file_name); } } else { @@ -302,17 +296,12 @@ function getDraftHRID(record: EncodedDraft): string | null { } } - if (DEBUG_APP) { - console.debug('hrid_name:', hrid_name); - } if (hrid_name === null) { - console.warn('No HRID field found'); return null; } const hrid_id = record.fields[hrid_name] as string | undefined | null; if (hrid_id === undefined || hrid_id === null) { - console.warn('No HRID field set for revision'); return null; } return hrid_id;