From 26dde0f7c850c9ca60fe9dc7f91c0bc59c88099c Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 1 Dec 2023 13:23:01 +0200 Subject: [PATCH 01/15] Implement experimental workaround for Android Server pairing The new android platform introduced in 6.5.0 made the app be served from the HTTPS context by default. This broke pairing, because requests to Server are sent via insecure HTTP (we use our own TLS certificate to secure the communication once pairing is complete) and chrome disallows "mixed content" requests. I implemented a preference here that forces the app to load from HTTP, which "fixes" the issue, but it has some drawbacks: - Some browser features are disabled when loaded from an insecure context. We don't know what these are, exactly. - iOS uses its own preference for 'scheme', so pairing is presumably still broken there. --- config.xml | 5 ++++- config/nc-dev-utils.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index 18100a2848..aa1106c6f9 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + Network Canvas Interviewer A tool for conducting Network Canvas Interviews. @@ -28,6 +28,7 @@ + @@ -37,6 +38,7 @@ + @@ -64,6 +66,7 @@ + diff --git a/config/nc-dev-utils.js b/config/nc-dev-utils.js index 9a2800bd60..937d986115 100644 --- a/config/nc-dev-utils.js +++ b/config/nc-dev-utils.js @@ -75,7 +75,9 @@ const devServerContentBase = () => { }; // Webpack default is 'web'. To get electron working with dev server, use 'electron-renderer'. -const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web'); +// const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web'); + +const reactBundleTarget = () => 'web'; module.exports = { cleanDevUrlFile, From 99b53eb12273b84951c3558299972dd0bbd80c17 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 1 Dec 2023 16:55:58 +0200 Subject: [PATCH 02/15] attempt to fix csv writing on cordova by replacing streaming This is an attempt to fix duplicate headers in the csv export. It replaces the node stream functionality with simple string writing, and uses papa parse instead of constructing the csv manually. It doesn't seem to work! --- config.xml | 9 ++++++--- config/nc-dev-utils.js | 4 +--- package-lock.json | 11 +++++++++++ package.json | 1 + 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/config.xml b/config.xml index aa1106c6f9..7d3954c69c 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,8 @@ - + Network Canvas Interviewer A tool for conducting Network Canvas Interviews. @@ -7,7 +10,7 @@ Complex Data Collective - + @@ -84,4 +87,4 @@ - \ No newline at end of file + diff --git a/config/nc-dev-utils.js b/config/nc-dev-utils.js index 937d986115..9a2800bd60 100644 --- a/config/nc-dev-utils.js +++ b/config/nc-dev-utils.js @@ -75,9 +75,7 @@ const devServerContentBase = () => { }; // Webpack default is 'web'. To get electron working with dev server, use 'electron-renderer'. -// const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web'); - -const reactBundleTarget = () => 'web'; +const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web'); module.exports = { cleanDevUrlFile, diff --git a/package-lock.json b/package-lock.json index cbc91f9ba3..82530c7236 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,6 +13,7 @@ "d3-force": "~3.0.0", "dmg-builder": "~23.6.0", "electron-devtools-installer": "^3.0.0", + "papaparse": "~5.4.1", "xcode": "~3.0.1", "zeroconf": "^0.1.4" }, @@ -24279,6 +24280,11 @@ "version": "1.0.11", "license": "(MIT AND Zlib)" }, + "node_modules/papaparse": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", + "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" + }, "node_modules/parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", @@ -55017,6 +55023,11 @@ "pako": { "version": "1.0.11" }, + "papaparse": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", + "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" + }, "parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", diff --git a/package.json b/package.json index c098239ba8..8d818571f6 100644 --- a/package.json +++ b/package.json @@ -185,6 +185,7 @@ "d3-force": "~3.0.0", "dmg-builder": "~23.6.0", "electron-devtools-installer": "^3.0.0", + "papaparse": "~5.4.1", "xcode": "~3.0.1", "zeroconf": "^0.1.4" }, From 016baa84e3a5a1c5c86054de565f9621e7483b53 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 1 Dec 2023 17:01:53 +0200 Subject: [PATCH 03/15] update network-exporters reference --- src/utils/network-exporters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/network-exporters b/src/utils/network-exporters index 8c0e9f39ec..124ca40e15 160000 --- a/src/utils/network-exporters +++ b/src/utils/network-exporters @@ -1 +1 @@ -Subproject commit 8c0e9f39ec49d85f9b7d83e270b2a46105cc782b +Subproject commit 124ca40e154b7a55cc56aa1e9b10e64a13035a35 From 94cae259eb48637f5a9101482fc9fb3b89f4e308 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 1 Dec 2023 17:02:39 +0200 Subject: [PATCH 04/15] manually revert content path in config.xml --- config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 7d3954c69c..e805a0713a 100644 --- a/config.xml +++ b/config.xml @@ -10,7 +10,7 @@ Complex Data Collective - + From 4e9d9a381d047f3ef2026db0fa6ccc0843864872 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Fri, 1 Dec 2023 17:10:23 +0200 Subject: [PATCH 05/15] bump version and remove debug from build --- config.xml | 3 +-- package-lock.json | 4 ++-- package.json | 2 +- public/package.json | 2 +- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/config.xml b/config.xml index e805a0713a..3390c22155 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - @@ -31,7 +31,6 @@ - diff --git a/package-lock.json b/package-lock.json index 82530c7236..ae22b81c0d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "network-canvas-interviewer", - "version": "6.5.1", + "version": "6.5.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "network-canvas-interviewer", - "version": "6.5.1", + "version": "6.5.2", "dependencies": { "@babel/runtime": "7.10.1", "archiver": "^4.0.1", diff --git a/package.json b/package.json index 8d818571f6..4b98ffdca4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "network-canvas-interviewer", - "version": "6.5.1", + "version": "6.5.2", "productName": "Network Canvas Interviewer", "description": "A tool for conducting Network Canvas Interviews.", "author": "Complex Data Collective", diff --git a/public/package.json b/public/package.json index 7ab23555b3..bef634fc54 100644 --- a/public/package.json +++ b/public/package.json @@ -1,6 +1,6 @@ { "name": "network-canvas-interviewer", - "version": "6.5.1", + "version": "6.5.2", "productName": "Network Canvas Interviewer", "description": "A tool for conducting Network Canvas Interviews.", "author": "Complex Data Collective", From 4aec529b4f921932644c7ade82e9a9a3bc4479e4 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Mon, 4 Dec 2023 11:18:05 +0200 Subject: [PATCH 06/15] correctly reset filename --- config.xml | 4 ++-- .../SessionManagementScreen/SessionManagementScreen.js | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/config.xml b/config.xml index 3390c22155..8a95d829a1 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - @@ -10,7 +10,7 @@ Complex Data Collective - + diff --git a/src/containers/SessionManagementScreen/SessionManagementScreen.js b/src/containers/SessionManagementScreen/SessionManagementScreen.js index b453fc482f..65f080fb97 100644 --- a/src/containers/SessionManagementScreen/SessionManagementScreen.js +++ b/src/containers/SessionManagementScreen/SessionManagementScreen.js @@ -23,12 +23,14 @@ const fatalExportErrorAction = withErrorDialog((error) => ({ error, })); +const getInitialFilename = () => `networkCanvasExport-${Date.now()}`; + const DataExportScreen = ({ show, onClose }) => { const [step, setStep] = useState(3); const [selectedSessions, setSelectedSessions] = useState([]); // Set the default filename to 'networkCanvasExport-' - const [filename, setFilename] = useState(`networkCanvasExport-${Date.now()}`); + const [filename, setFilename] = useState(getInitialFilename()); const [abortHandlers, setAbortHandlers] = useState(null); const pairedServer = useSelector((state) => state.pairedServer); @@ -40,6 +42,7 @@ const DataExportScreen = ({ show, onClose }) => { const openDialog = (dialog) => dispatch(dialogActions.openDialog(dialog)); const reset = () => { + setFilename(getInitialFilename()); setSelectedSessions([]); setStep(1); }; From ebd579d52938c587248f7b838b3fd7baa5928e05 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Mon, 4 Dec 2023 15:31:28 +0200 Subject: [PATCH 07/15] add specific git SHAs to file and file-transfer plugins, and update network-exporters reference --- package-lock.json | 31 ++++++++++--------------------- package.json | 5 ++--- src/utils/network-exporters | 2 +- 3 files changed, 13 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index ae22b81c0d..c517238241 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,6 @@ "d3-force": "~3.0.0", "dmg-builder": "~23.6.0", "electron-devtools-installer": "^3.0.0", - "papaparse": "~5.4.1", "xcode": "~3.0.1", "zeroconf": "^0.1.4" }, @@ -52,8 +51,8 @@ "connected-react-router": "^6.8.0", "cordova-android": "~12.0.0", "cordova-ios": "~7.0.0", - "cordova-plugin-file": "github:apache/cordova-plugin-file", - "cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer", + "cordova-plugin-file": "github:apache/cordova-plugin-file#265a932", + "cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer#f12b73e", "cordova-plugin-fullscreen": "github:mesmotronic/cordova-plugin-fullscreen", "cordova-plugin-ionic-keyboard": "github:ionic-team/cordova-plugin-ionic-keyboard", "cordova-plugin-network-canvas-client": "github:complexdatacollective/cordova-plugin-network-canvas-client", @@ -9929,8 +9928,8 @@ } }, "node_modules/cordova-plugin-file": { - "version": "8.0.1-dev", - "resolved": "git+ssh://git@github.com/apache/cordova-plugin-file.git#faba1bf0f1479cafe5ed256bc0181fe10768527f", + "version": "8.0.2-dev", + "resolved": "git+ssh://git@github.com/apache/cordova-plugin-file.git#265a932f3b5d11739fd08c0437477f441f6212c7", "dev": true, "license": "Apache-2.0", "engines": { @@ -9951,8 +9950,8 @@ } }, "node_modules/cordova-plugin-file-transfer": { - "version": "2.0.0-dev", - "resolved": "git+ssh://git@github.com/apache/cordova-plugin-file-transfer.git#06335fea28f7ad4d815aa621e02823a63b0a9bc6", + "version": "2.0.1-dev", + "resolved": "git+ssh://git@github.com/apache/cordova-plugin-file-transfer.git#f12b73eb0ba70536072eeab89843c96082fce512", "dev": true, "license": "Apache-2.0", "engines": { @@ -24280,11 +24279,6 @@ "version": "1.0.11", "license": "(MIT AND Zlib)" }, - "node_modules/papaparse": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", - "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" - }, "node_modules/parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", @@ -43786,14 +43780,14 @@ } }, "cordova-plugin-file": { - "version": "git+ssh://git@github.com/apache/cordova-plugin-file.git#faba1bf0f1479cafe5ed256bc0181fe10768527f", + "version": "git+ssh://git@github.com/apache/cordova-plugin-file.git#265a932f3b5d11739fd08c0437477f441f6212c7", "dev": true, - "from": "cordova-plugin-file@github:apache/cordova-plugin-file" + "from": "cordova-plugin-file@github:apache/cordova-plugin-file#265a932" }, "cordova-plugin-file-transfer": { - "version": "git+ssh://git@github.com/apache/cordova-plugin-file-transfer.git#06335fea28f7ad4d815aa621e02823a63b0a9bc6", + "version": "git+ssh://git@github.com/apache/cordova-plugin-file-transfer.git#f12b73eb0ba70536072eeab89843c96082fce512", "dev": true, - "from": "cordova-plugin-file-transfer@github:apache/cordova-plugin-file-transfer" + "from": "cordova-plugin-file-transfer@github:apache/cordova-plugin-file-transfer#f12b73e" }, "cordova-plugin-fullscreen": { "version": "git+ssh://git@github.com/mesmotronic/cordova-plugin-fullscreen.git#942a9592e5ffd23b588661bfbaed708d0b56f1ca", @@ -55023,11 +55017,6 @@ "pako": { "version": "1.0.11" }, - "papaparse": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/papaparse/-/papaparse-5.4.1.tgz", - "integrity": "sha512-HipMsgJkZu8br23pW15uvo6sib6wne/4woLZPlFf3rpDyMe9ywEXUsuD7+6K9PRkJlVT51j/sCOYDKGGS3ZJrw==" - }, "parallel-transform": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/parallel-transform/-/parallel-transform-1.2.0.tgz", diff --git a/package.json b/package.json index 4b98ffdca4..9681b08a63 100644 --- a/package.json +++ b/package.json @@ -78,8 +78,8 @@ "connected-react-router": "^6.8.0", "cordova-android": "~12.0.0", "cordova-ios": "~7.0.0", - "cordova-plugin-file": "github:apache/cordova-plugin-file", - "cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer", + "cordova-plugin-file": "github:apache/cordova-plugin-file#265a932", + "cordova-plugin-file-transfer": "github:apache/cordova-plugin-file-transfer#f12b73e", "cordova-plugin-fullscreen": "github:mesmotronic/cordova-plugin-fullscreen", "cordova-plugin-ionic-keyboard": "github:ionic-team/cordova-plugin-ionic-keyboard", "cordova-plugin-network-canvas-client": "github:complexdatacollective/cordova-plugin-network-canvas-client", @@ -185,7 +185,6 @@ "d3-force": "~3.0.0", "dmg-builder": "~23.6.0", "electron-devtools-installer": "^3.0.0", - "papaparse": "~5.4.1", "xcode": "~3.0.1", "zeroconf": "^0.1.4" }, diff --git a/src/utils/network-exporters b/src/utils/network-exporters index 124ca40e15..069945944b 160000 --- a/src/utils/network-exporters +++ b/src/utils/network-exporters @@ -1 +1 @@ -Subproject commit 124ca40e154b7a55cc56aa1e9b10e64a13035a35 +Subproject commit 069945944b0bed25c2b42d35fe51abbe1974666d From 57b040a41278c4bf8ae368e733248b7a89d0738b Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Mon, 4 Dec 2023 15:42:14 +0200 Subject: [PATCH 08/15] update exporters reference --- src/utils/network-exporters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/network-exporters b/src/utils/network-exporters index 069945944b..19ce35fb85 160000 --- a/src/utils/network-exporters +++ b/src/utils/network-exporters @@ -1 +1 @@ -Subproject commit 069945944b0bed25c2b42d35fe51abbe1974666d +Subproject commit 19ce35fb859a461651a7a91fa2717750b3f6db67 From f0729da9552e20f4b715d84c73c7df590f33aa36 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Mon, 4 Dec 2023 15:43:12 +0200 Subject: [PATCH 09/15] reset config.xml --- config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 8a95d829a1..cb0aa853ab 100644 --- a/config.xml +++ b/config.xml @@ -10,7 +10,7 @@ Complex Data Collective - + From 9e986558934fcf5e4a923bb35d63b5836e2e48d1 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Mon, 4 Dec 2023 22:04:49 +0200 Subject: [PATCH 10/15] fix importing protocols from Server on iOS --- config.xml | 12 +++++------- package-lock.json | 11 +++-------- package.json | 2 +- src/utils/protocol/downloadProtocol.js | 21 +++++++++++++++------ 4 files changed, 24 insertions(+), 22 deletions(-) diff --git a/config.xml b/config.xml index cb0aa853ab..27b35a3441 100644 --- a/config.xml +++ b/config.xml @@ -1,8 +1,5 @@ - + Network Canvas Interviewer A tool for conducting Network Canvas Interviews. @@ -10,7 +7,7 @@ Complex Data Collective - + @@ -19,6 +16,7 @@ + @@ -40,6 +38,7 @@ + @@ -68,7 +67,6 @@ - @@ -86,4 +84,4 @@ - + \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index c517238241..613a0b495e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -157,11 +157,6 @@ "npm": "8.19.4" } }, - "../cordova-plugin-network-canvas-client": { - "version": "0.0.2", - "extraneous": true, - "license": "GPL-3.0-or-later" - }, "node_modules/@ampproject/remapping": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.1.2.tgz", @@ -9985,7 +9980,7 @@ }, "node_modules/cordova-plugin-network-canvas-client": { "version": "0.0.2", - "resolved": "git+ssh://git@github.com/complexdatacollective/cordova-plugin-network-canvas-client.git#4bf75df4d6bf975a26d85ce2db02c23541b7e6aa", + "resolved": "git+ssh://git@github.com/complexdatacollective/cordova-plugin-network-canvas-client.git#364662b79e1a97ac88ec0b0e520e497e810b1f0f", "dev": true, "license": "GPL-3.0-or-later" }, @@ -43800,9 +43795,9 @@ "from": "cordova-plugin-ionic-keyboard@github:ionic-team/cordova-plugin-ionic-keyboard" }, "cordova-plugin-network-canvas-client": { - "version": "git+ssh://git@github.com/complexdatacollective/cordova-plugin-network-canvas-client.git#4bf75df4d6bf975a26d85ce2db02c23541b7e6aa", + "version": "git+ssh://git@github.com/complexdatacollective/cordova-plugin-network-canvas-client.git#364662b79e1a97ac88ec0b0e520e497e810b1f0f", "dev": true, - "from": "cordova-plugin-network-canvas-client@github:complexdatacollective/cordova-plugin-network-canvas-client" + "from": "cordova-plugin-network-canvas-client@https://github.com/complexdatacollective/cordova-plugin-network-canvas-client.git" }, "core-js": { "version": "3.21.1", diff --git a/package.json b/package.json index 9681b08a63..180f8e3bc4 100644 --- a/package.json +++ b/package.json @@ -315,4 +315,4 @@ "cordova-plugin-ionic-keyboard": {} } } -} +} \ No newline at end of file diff --git a/src/utils/protocol/downloadProtocol.js b/src/utils/protocol/downloadProtocol.js index c38c726179..fc6dcb66ba 100644 --- a/src/utils/protocol/downloadProtocol.js +++ b/src/utils/protocol/downloadProtocol.js @@ -36,8 +36,8 @@ const downloadProtocol = inEnvironment((environment) => { if (environment === environments.ELECTRON) { const request = require('request-promise-native'); const destination = path.join(tempDataPath(), getProtocolName()); - return (uri, pairedServer = false) => { + let promisedResponse; if (pairedServer) { promisedResponse = new ApiClient(pairedServer).downloadProtocol(uri); @@ -56,29 +56,38 @@ const downloadProtocol = inEnvironment((environment) => { } if (environment === environments.CORDOVA) { - const destination = `${tempDataPath()}${getProtocolName()}` return (uri, pairedServer) => { let promisedResponse; + if (pairedServer) { + // In cordova, the cordova-plugin-network-canvas-client wants the destination + // to be a folder, not a file. It assigns a temp filename itself. + const destination = tempDataPath(); promisedResponse = new ApiClient(pairedServer) // .addTrustedCert() is not required, assuming we've just fetched the protocol list .downloadProtocol(uri, destination) - .then(() => destination); + .then((result) => { + // Result is a FileEntry object + return result.nativeURL; + }) } else { promisedResponse = getURL(uri) .then(url => url.href) .catch(urlError) .then(href => new Promise((resolve, reject) => { + // The filetransfer plugin requires a folder to write to + const destinationWithFolder = `${tempDataPath()}${getProtocolName()}`; + const fileTransfer = new FileTransfer(); - console.log('fileTransfer', destination); fileTransfer.download( href, - destination, - () => resolve(destination), + destinationWithFolder, + () => resolve(destinationWithFolder), error => reject(error), ); })); } + return promisedResponse .catch((error) => { const getErrorMessage = ({ code }) => { From a3184f98421dd8a406450f4027a33eb87833e07f Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Mon, 4 Dec 2023 22:20:44 +0200 Subject: [PATCH 11/15] revert confif.xml --- config.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config.xml b/config.xml index 27b35a3441..579a609890 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + Network Canvas Interviewer A tool for conducting Network Canvas Interviews. @@ -7,7 +7,7 @@ Complex Data Collective - + From 6bb984bb7bcefad6455b8db85da0da91bbccb46d Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Tue, 5 Dec 2023 15:03:14 +0200 Subject: [PATCH 12/15] update network-exporters to correctly resequence IDs when the merge option is used --- src/utils/network-exporters | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/network-exporters b/src/utils/network-exporters index 19ce35fb85..376417cf4a 160000 --- a/src/utils/network-exporters +++ b/src/utils/network-exporters @@ -1 +1 @@ -Subproject commit 19ce35fb859a461651a7a91fa2717750b3f6db67 +Subproject commit 376417cf4aba486431d65453d415489b5f414dfe From 530d181025780c22c71f4e3a03e1a807c4ac17ae Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Tue, 5 Dec 2023 15:11:11 +0200 Subject: [PATCH 13/15] add missing transient dependencies from network-exporters --- package-lock.json | 33 +++++++++++++++------------------ package.json | 4 ++-- 2 files changed, 17 insertions(+), 20 deletions(-) diff --git a/package-lock.json b/package-lock.json index 613a0b495e..72bd56ae47 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,6 +9,7 @@ "version": "6.5.2", "dependencies": { "@babel/runtime": "7.10.1", + "@xmldom/xmldom": "~0.8.10", "archiver": "^4.0.1", "d3-force": "~3.0.0", "dmg-builder": "~23.6.0", @@ -149,7 +150,6 @@ "whatwg-fetch": "2.0.3", "worker-loader": "^2.0.0", "xml2js": "~0.4.23", - "xmldom": "~0.1.27", "xss": "^0.3.4" }, "engines": { @@ -6029,6 +6029,14 @@ "@xtuc/long": "4.2.2" } }, + "node_modules/@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==", + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -36293,16 +36301,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "node_modules/xmldom": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha512-7WpJBYwyhvsddFJA51SOIU0Be9W44sbGGjc6Z3ly8Wx/Wl7nriMPZ5xf6Np9ASlJ6gACfXcTLukm4DtX372lFw==", - "deprecated": "Deprecated due to CVE-2021-21366 resolved in 0.5.0", - "dev": true, - "engines": { - "node": ">=0.1" - } - }, "node_modules/xss": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/xss/-/xss-0.3.8.tgz", @@ -40704,6 +40702,11 @@ "@xtuc/long": "4.2.2" } }, + "@xmldom/xmldom": { + "version": "0.8.10", + "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.10.tgz", + "integrity": "sha512-2WALfTl4xo2SkGCYRt6rDTFfk9R1czmBvUQy12gK2KuRKIpWEhcbbzy8EZXtz/jkRqHX8bFEc6FC1HjX4TUWYw==" + }, "@xtuc/ieee754": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", @@ -43797,7 +43800,7 @@ "cordova-plugin-network-canvas-client": { "version": "git+ssh://git@github.com/complexdatacollective/cordova-plugin-network-canvas-client.git#364662b79e1a97ac88ec0b0e520e497e810b1f0f", "dev": true, - "from": "cordova-plugin-network-canvas-client@https://github.com/complexdatacollective/cordova-plugin-network-canvas-client.git" + "from": "cordova-plugin-network-canvas-client@github:complexdatacollective/cordova-plugin-network-canvas-client" }, "core-js": { "version": "3.21.1", @@ -64418,12 +64421,6 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, - "xmldom": { - "version": "0.1.27", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.27.tgz", - "integrity": "sha512-7WpJBYwyhvsddFJA51SOIU0Be9W44sbGGjc6Z3ly8Wx/Wl7nriMPZ5xf6Np9ASlJ6gACfXcTLukm4DtX372lFw==", - "dev": true - }, "xss": { "version": "0.3.8", "resolved": "https://registry.npmjs.org/xss/-/xss-0.3.8.tgz", diff --git a/package.json b/package.json index 180f8e3bc4..0e7613adfc 100644 --- a/package.json +++ b/package.json @@ -176,11 +176,11 @@ "whatwg-fetch": "2.0.3", "worker-loader": "^2.0.0", "xml2js": "~0.4.23", - "xmldom": "~0.1.27", "xss": "^0.3.4" }, "dependencies": { "@babel/runtime": "7.10.1", + "@xmldom/xmldom": "~0.8.10", "archiver": "^4.0.1", "d3-force": "~3.0.0", "dmg-builder": "~23.6.0", @@ -315,4 +315,4 @@ "cordova-plugin-ionic-keyboard": {} } } -} \ No newline at end of file +} From 19a7f4380d12c4cff2089d8ada04a059e4e33241 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Tue, 5 Dec 2023 15:23:13 +0200 Subject: [PATCH 14/15] update config.xml --- config.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config.xml b/config.xml index 579a609890..879099e23b 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,5 @@ - + Network Canvas Interviewer A tool for conducting Network Canvas Interviews. From 0864ae1e5f15d53dfe4aae578da1dc90f432d531 Mon Sep 17 00:00:00 2001 From: Joshua Melville Date: Wed, 6 Dec 2023 01:15:35 +0200 Subject: [PATCH 15/15] fix fetching protocol from server on Android --- config.xml | 9 +++++---- src/utils/protocol/downloadProtocol.js | 9 ++++++--- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/config.xml b/config.xml index 879099e23b..499ee606ff 100644 --- a/config.xml +++ b/config.xml @@ -1,5 +1,8 @@ - + Network Canvas Interviewer A tool for conducting Network Canvas Interviews. @@ -38,8 +41,6 @@ - - @@ -84,4 +85,4 @@ - \ No newline at end of file + diff --git a/src/utils/protocol/downloadProtocol.js b/src/utils/protocol/downloadProtocol.js index fc6dcb66ba..b0ecc04b51 100644 --- a/src/utils/protocol/downloadProtocol.js +++ b/src/utils/protocol/downloadProtocol.js @@ -2,7 +2,7 @@ /* global FileTransfer */ import uuid from 'uuid/v4'; import environments from '../environments'; -import inEnvironment from '../Environment'; +import inEnvironment, { isIOS } from '../Environment'; import { writeFile, tempDataPath } from '../filesystem'; import friendlyErrorMessage from '../../utils/friendlyErrorMessage'; import ApiClient from '../../utils/ApiClient'; @@ -60,9 +60,12 @@ const downloadProtocol = inEnvironment((environment) => { let promisedResponse; if (pairedServer) { - // In cordova, the cordova-plugin-network-canvas-client wants the destination + // on iOS, the cordova-plugin-network-canvas-client wants the destination // to be a folder, not a file. It assigns a temp filename itself. - const destination = tempDataPath(); + // + // however, on android it needs to be a file. + const destination = isIOS() ? tempDataPath() : `${tempDataPath()}${getProtocolName()}`; + promisedResponse = new ApiClient(pairedServer) // .addTrustedCert() is not required, assuming we've just fetched the protocol list .downloadProtocol(uri, destination)