diff --git a/.gitignore b/.gitignore
index 8a73b0875a..799a67c869 100644
--- a/.gitignore
+++ b/.gitignore
@@ -32,3 +32,4 @@ src/schemas/abstract-protocol.json
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
+dist/
diff --git a/.gitmodules b/.gitmodules
index 434e4987cf..465204f0e9 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,9 +1,6 @@
[submodule "src/utils/networkQuery"]
path = src/utils/networkQuery
url = https://github.com/complexdatacollective/networkQuery
-[submodule "src/utils/protocol/protocol-validation"]
- path = src/utils/protocol/protocol-validation
- url = https://github.com/complexdatacollective/protocol-validation.git
[submodule "src/utils/network-exporters"]
path = src/utils/network-exporters
url = https://github.com/complexdatacollective/network-exporters
diff --git a/.node-version b/.node-version
index f46d5e3942..2bd5a0a98a 100644
--- a/.node-version
+++ b/.node-version
@@ -1 +1 @@
-14.21.3
+22
diff --git a/config/env.js b/config/env.js
deleted file mode 100644
index 2bfeb840b0..0000000000
--- a/config/env.js
+++ /dev/null
@@ -1,91 +0,0 @@
-'use strict';
-
-const fs = require('fs');
-const path = require('path');
-const paths = require('./paths');
-
-// Make sure that including paths.js after env.js will read .env variables.
-delete require.cache[require.resolve('./paths')];
-
-const NODE_ENV = process.env.NODE_ENV;
-
-if (!NODE_ENV) {
- throw new Error(
- 'The NODE_ENV environment variable is required but was not specified.'
- );
-}
-
-// https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use
-var dotenvFiles = [
- `${paths.dotenv}.${NODE_ENV}.local`,
- `${paths.dotenv}.${NODE_ENV}`,
- // Don't include `.env.local` for `test` environment
- // since normally you expect tests to produce the same
- // results for everyone
- NODE_ENV !== 'test' && `${paths.dotenv}.local`,
- paths.dotenv, // .env
-].filter(Boolean);
-
-// Load environment variables from .env* files. Suppress warnings using silent
-// if this file is missing. dotenv will never modify any environment variables
-// that have already been set.
-// https://github.com/motdotla/dotenv
-dotenvFiles.forEach(dotenvFile => {
- if (fs.existsSync(dotenvFile)) {
- require('dotenv').config({
- path: dotenvFile,
- });
- }
-});
-
-// We support resolving modules according to `NODE_PATH`.
-// This lets you use absolute paths in imports inside large monorepos:
-// https://github.com/facebookincubator/create-react-app/issues/253.
-// It works similar to `NODE_PATH` in Node itself:
-// https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
-// Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
-// Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
-// https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
-// We also resolve them to make sure all tools using them work consistently.
-const appDirectory = fs.realpathSync(process.cwd());
-process.env.NODE_PATH = (process.env.NODE_PATH || '')
- .split(path.delimiter)
- .filter(folder => folder && !path.isAbsolute(folder))
- .map(folder => path.resolve(appDirectory, folder))
- .join(path.delimiter);
-
-// Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be
-// injected into the application via DefinePlugin in Webpack configuration.
-const REACT_APP = /^REACT_APP_/i;
-
-function getClientEnvironment(publicUrl) {
- const raw = Object.keys(process.env)
- .filter(key => REACT_APP.test(key))
- .reduce(
- (env, key) => {
- env[key] = process.env[key];
- return env;
- },
- {
- // Useful for determining whether we’re running in production mode.
- // Most importantly, it switches React into the correct mode.
- NODE_ENV: process.env.NODE_ENV || 'development',
- // Useful for resolving the correct path to static assets in `public`.
- // For example,
.
- // This should only be used as an escape hatch. Normally you would put
- // images into the `src` and `import` them in code to get their paths.
- PUBLIC_URL: publicUrl,
- }
- );
- // Stringify all values so we can feed into Webpack DefinePlugin
- const stringified = {
- 'process.env': Object.keys(raw).reduce((env, key) => {
- env[key] = JSON.stringify(raw[key]);
- return env;
- }, {}),
- };
-
- return { raw, stringified };
-}
-
-module.exports = getClientEnvironment;
diff --git a/config/jest/automock.js b/config/jest/automock.js
deleted file mode 100644
index 9d37975c55..0000000000
--- a/config/jest/automock.js
+++ /dev/null
@@ -1,10 +0,0 @@
-/* eslint-env jest */
-
-jest.mock('electron');
-jest.mock('electron-log');
-jest.mock('fs');
-jest.mock('redux-logger');
-jest.mock('../../src/utils/Environment');
-jest.mock('uuid');
-
-global.console.error = jest.fn();
diff --git a/config/jest/cssTransform.js b/config/jest/cssTransform.js
deleted file mode 100644
index f1534f6fb5..0000000000
--- a/config/jest/cssTransform.js
+++ /dev/null
@@ -1,14 +0,0 @@
-'use strict';
-
-// This is a custom Jest transformer turning style imports into empty objects.
-// http://facebook.github.io/jest/docs/tutorial-webpack.html
-
-module.exports = {
- process() {
- return 'module.exports = {};';
- },
- getCacheKey() {
- // The output is always the same.
- return 'cssTransform';
- },
-};
diff --git a/config/jest/enzyme.js b/config/jest/enzyme.js
deleted file mode 100644
index 82edfc9e5a..0000000000
--- a/config/jest/enzyme.js
+++ /dev/null
@@ -1,4 +0,0 @@
-import { configure } from 'enzyme';
-import Adapter from 'enzyme-adapter-react-16';
-
-configure({ adapter: new Adapter() });
diff --git a/config/jest/fileTransform.js b/config/jest/fileTransform.js
deleted file mode 100644
index ffce0da29a..0000000000
--- a/config/jest/fileTransform.js
+++ /dev/null
@@ -1,12 +0,0 @@
-'use strict';
-
-const path = require('path');
-
-// This is a custom Jest transformer turning file imports into filenames.
-// http://facebook.github.io/jest/docs/tutorial-webpack.html
-
-module.exports = {
- process(src, filename) {
- return `module.exports = ${JSON.stringify(path.basename(filename))};`;
- },
-};
diff --git a/config/jest/matchMedia.js b/config/jest/matchMedia.js
deleted file mode 100644
index 273ca694c1..0000000000
--- a/config/jest/matchMedia.js
+++ /dev/null
@@ -1,9 +0,0 @@
-'use strict';
-
-Object.defineProperty(window, 'matchMedia', {
- value: () => ({
- matches: false,
- addListener: () => {},
- removeListener: () => {},
- }),
-});
diff --git a/config/jest/polyfills.js b/config/jest/polyfills.js
deleted file mode 100644
index 979b7fc9e3..0000000000
--- a/config/jest/polyfills.js
+++ /dev/null
@@ -1,7 +0,0 @@
-global.requestAnimationFrame = (callback) => {
- setTimeout(callback, 1);
-};
-
-global.cancelAnimationFrame = () => {};
-
-global.SVGElement = global.Element;
diff --git a/config/nc-dev-utils.js b/config/nc-dev-utils.js
deleted file mode 100644
index 9a2800bd60..0000000000
--- a/config/nc-dev-utils.js
+++ /dev/null
@@ -1,88 +0,0 @@
-/* eslint-disable no-console */
-const chalk = require('chalk');
-const fs = require('fs');
-const path = require('path');
-
-const paths = require('../config/paths');
-
-const cordovaPlatformMatch = (/^(android|ios)$/);
-
-// Write the LAN URL to a file while running, so that cordova apps can attach
-// to the specified dev server.
-const devUrlFile = paths.dotdevserver;
-
-// When set to `ios` or `android`, this env var will cause the development server
-// to serve (platform-specific) cordova dependencies to the iOS or Android client.
-// (Currently, you must make your choice at server startup time.)
-const isTargetingCordova = cordovaPlatformMatch.test(process.env.NC_TARGET_PLATFORM);
-
-const isTargetingElectron = process.env.NC_TARGET_PLATFORM === 'electron';
-
-const logPlatformInfo = () => {
- if (isTargetingCordova) {
- console.log(chalk.green('Targeting Cordova platform', process.env.NC_TARGET_PLATFORM));
- console.log(chalk.green(`Live mobile dev available: \`npm run ${process.env.NC_TARGET_PLATFORM}:dev\``));
- console.log(chalk.yellow('Content will only run in an', process.env.NC_TARGET_PLATFORM, 'device or emulator'));
- } else if (isTargetingElectron) {
- console.log(chalk.green('Targeting Electron'));
- console.log(chalk.yellow('Content will only run in electron: `npm run dev:electron`'));
- } else {
- console.log(chalk.cyan('Live mobile dev also available: `npm run dev:[android|ios]`'));
- }
-};
-
-// Removes the dotfile from the system.
-const cleanDevUrlFile = () => {
- try {
- fs.unlinkSync(devUrlFile);
- } catch (err) {
- console.warn(err);
- }
-};
-
-// Adds a dotfile to identify the local development server (see `devUrlFile` above)
-const makeDevUrlFile = (serverUrl) => {
- try {
- if (serverUrl) {
- fs.writeFileSync(devUrlFile, chalk.stripColor(serverUrl));
- } else {
- console.warn(chalk.red('Could not get this machine\'s IP address. Using localhost instead.'));
- fs.writeFileSync(devUrlFile, 'http://localhost:3000');
- }
- } catch (err) {
- console.warn(chalk.yellow(`Could not write ${devUrlFile}. Live Mobile dev will be unavailable.`));
- }
-};
-
-const devServerContentBase = () => {
- const platform = process.env.NC_TARGET_PLATFORM;
- let cordovaBase;
- switch (platform) {
- case 'android':
- cordovaBase = path.resolve(paths.cordovaPlatforms, platform, 'app', 'src', 'main', 'assets', 'www');
- break;
- case 'ios':
- cordovaBase = path.resolve(paths.cordovaPlatforms, platform, 'www');
- break;
- default:
- // Not Cordova
- return paths.appPublic;
- }
- if (!fs.existsSync(cordovaBase)) {
- throw new Error(`Cordova platform unavailable: ${process.env.NC_TARGET_PLATFORM} (tried ${cordovaBase})`);
- }
- return cordovaBase;
-};
-
-// Webpack default is 'web'. To get electron working with dev server, use 'electron-renderer'.
-const reactBundleTarget = () => (isTargetingElectron ? 'electron-renderer' : 'web');
-
-module.exports = {
- cleanDevUrlFile,
- devServerContentBase,
- isTargetingCordova,
- isTargetingElectron,
- logPlatformInfo,
- makeDevUrlFile,
- reactBundleTarget,
-};
diff --git a/config/paths.js b/config/paths.js
deleted file mode 100644
index f6a8b5509b..0000000000
--- a/config/paths.js
+++ /dev/null
@@ -1,57 +0,0 @@
-'use strict';
-
-const path = require('path');
-const fs = require('fs');
-const url = require('url');
-
-// Make sure any symlinks in the project folder are resolved:
-// https://github.com/facebookincubator/create-react-app/issues/637
-const appDirectory = fs.realpathSync(process.cwd());
-const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
-
-const envPublicUrl = process.env.PUBLIC_URL;
-
-function ensureSlash(path, needsSlash) {
- const hasSlash = path.endsWith('/');
- if (hasSlash && !needsSlash) {
- return path.substr(path, path.length - 1);
- } else if (!hasSlash && needsSlash) {
- return `${path}/`;
- } else {
- return path;
- }
-}
-
-const getPublicUrl = appPackageJson =>
- envPublicUrl || require(appPackageJson).homepage;
-
-// We use `PUBLIC_URL` environment variable or "homepage" field to infer
-// "public path" at which the app is served.
-// Webpack needs to know it to put the right
+