From ed9707a3f0df9e812b50f8345be0a33ea2495ff8 Mon Sep 17 00:00:00 2001 From: Justin Persaud Date: Fri, 27 Oct 2023 16:55:10 -0400 Subject: [PATCH] Change hostname to dev.new.expensify.com --- README.md | 6 +++--- config/webpack/webpack.dev.js | 2 +- contributingGuides/APPLE_GOOGLE_SIGNIN.md | 4 ++-- desktop/main.js | 4 ++-- desktop/start.js | 2 +- docs/_includes/CONST.html | 2 +- package.json | 2 +- src/CONST.ts | 2 +- src/libs/Navigation/linkingConfig.js | 2 +- tests/unit/ReportUtilsTest.js | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 46eb240e310..fdbf82df381 100644 --- a/README.md +++ b/README.md @@ -36,9 +36,9 @@ These instructions should get you set up ready to work on New Expensify 🙌 2. Install `watchman`: `brew install watchman` 3. Install dependencies: `npm install` 4. Install `mkcert`: `brew install mkcert` followed by `npm run setup-https`. If you are not using macOS, follow the instructions [here](https://github.com/FiloSottile/mkcert?tab=readme-ov-file#installation). -5. Create a host entry in your local hosts file, `/etc/hosts` for new.expensify.com.dev pointing to localhost: +5. Create a host entry in your local hosts file, `/etc/hosts` for dev.new.expensify.com pointing to localhost: ``` -127.0.0.1 new.expensify.com.dev +127.0.0.1 dev.new.expensify.com ``` You can use any IDE or code editing tool for developing on any platform. Use your favorite! @@ -133,7 +133,7 @@ Note - If you want to run app on `https://127.0.0.1:8082`, then just install the 2. Select the emulator you want to run if prompted. (If single emulator is available, then it will open automatically) 3. Let the script execute till the message `🎉 Done!`. -Note - If you want to run app on `https://new.expensify.com.dev:8082`, then just do the Android flow and use `npm run startAndroidEmulator` to start the Android Emulator every time (It will configure the emulator). +Note - If you want to run app on `https://dev.new.expensify.com:8082`, then just do the Android flow and use `npm run startAndroidEmulator` to start the Android Emulator every time (It will configure the emulator). Possible Scenario: diff --git a/config/webpack/webpack.dev.js b/config/webpack/webpack.dev.js index dcca84ce5e9..e28383eff55 100644 --- a/config/webpack/webpack.dev.js +++ b/config/webpack/webpack.dev.js @@ -44,7 +44,7 @@ module.exports = (env = {}) => ...proxySettings, historyApiFallback: true, port, - host: 'new.expensify.com.dev', + host: 'dev.new.expensify.com', server: { type: 'https', options: { diff --git a/contributingGuides/APPLE_GOOGLE_SIGNIN.md b/contributingGuides/APPLE_GOOGLE_SIGNIN.md index 3a1feac073d..3ade13554bd 100644 --- a/contributingGuides/APPLE_GOOGLE_SIGNIN.md +++ b/contributingGuides/APPLE_GOOGLE_SIGNIN.md @@ -161,10 +161,10 @@ function beginAppleSignIn(idToken) { You can use any SSH tunneling service that allows you to configure custom subdomains so that we have a consistent address to use. We'll use ngrok in these examples, but ngrok requires a paid account for this. If you need a free option, try serveo.net. -After you've set ngrok up to be able to run on your machine (requires configuring a key with the command line tool, instructions provided by the ngrok website after you create an account), test hosting the web app on a custom subdomain. This example assumes the development web app is running at `new.expensify.com.dev:8082`: +After you've set ngrok up to be able to run on your machine (requires configuring a key with the command line tool, instructions provided by the ngrok website after you create an account), test hosting the web app on a custom subdomain. This example assumes the development web app is running at `dev.new.expensify.com:8082`: ``` -ngrok http 8082 --host-header="new.expensify.com.dev:8082" --subdomain=mysubdomain +ngrok http 8082 --host-header="dev.new.expensify.com:8082" --subdomain=mysubdomain ``` The `--host-header` flag is there to avoid webpack errors with header validation. In addition, add `allowedHosts: 'all'` to the dev server config in `webpack.dev.js`: diff --git a/desktop/main.js b/desktop/main.js index 4b43ff128f6..7ab8d748b54 100644 --- a/desktop/main.js +++ b/desktop/main.js @@ -85,7 +85,7 @@ _.assign(console, log.functions); // until it detects that it has been upgraded to the correct version. const EXPECTED_UPDATE_VERSION_FLAG = '--expected-update-version'; -const APP_DOMAIN = __DEV__ ? `https://new.expensify.com.dev:${port}` : 'app://-'; +const APP_DOMAIN = __DEV__ ? `https://dev.new.expensify.com:${port}` : 'app://-'; let expectedUpdateVersion; for (let i = 0; i < process.argv.length; i++) { @@ -221,7 +221,7 @@ const mainWindow = () => { let deeplinkUrl; let browserWindow; - const loadURL = __DEV__ ? (win) => win.loadURL(`https://new.expensify.com.dev:${port}`) : serve({directory: `${__dirname}/www`}); + const loadURL = __DEV__ ? (win) => win.loadURL(`https://dev.new.expensify.com:${port}`) : serve({directory: `${__dirname}/www`}); // Prod and staging set the icon in the electron-builder config, so only update it here for dev if (__DEV__) { diff --git a/desktop/start.js b/desktop/start.js index a9bb5a2d588..05a1b031350 100644 --- a/desktop/start.js +++ b/desktop/start.js @@ -32,7 +32,7 @@ portfinder env, }, { - command: `wait-port new.expensify.com.dev:${port} && npx electronmon ./desktop/dev.js`, + command: `wait-port dev.new.expensify.com:${port} && npx electronmon ./desktop/dev.js`, name: 'Electron', prefixColor: 'cyan.dim', env, diff --git a/docs/_includes/CONST.html b/docs/_includes/CONST.html index af6a14a7833..231423f1058 100644 --- a/docs/_includes/CONST.html +++ b/docs/_includes/CONST.html @@ -1,7 +1,7 @@ {% if jekyll.environment == "production" %} {% assign MAIN_SITE_URL = "https://new.expensify.com" %} {% else %} - {% assign MAIN_SITE_URL = "https://new.expensify.com.dev:8082" %} + {% assign MAIN_SITE_URL = "https://dev.new.expensify.com:8082" %} {% endif %} {% capture CONCIERGE_CHAT_URL %}{{MAIN_SITE_URL}}/concierge{% endcapture %} diff --git a/package.json b/package.json index f7f32936314..c86ae5dfe26 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "gh-actions-unused-styles": "./.github/scripts/findUnusedKeys.sh", "workflow-test": "./workflow_tests/scripts/runWorkflowTests.sh", "workflow-test:generate": "node workflow_tests/utils/preGenerateTest.js", - "setup-https": "mkcert -install && mkcert -cert-file config/webpack/certificate.pem -key-file config/webpack/key.pem new.expensify.com.dev localhost 127.0.0.1" + "setup-https": "mkcert -install && mkcert -cert-file config/webpack/certificate.pem -key-file config/webpack/key.pem dev.new.expensify.com localhost 127.0.0.1" }, "dependencies": { "@expensify/react-native-web": "0.18.15", diff --git a/src/CONST.ts b/src/CONST.ts index c8e6fcc65e2..cc3c7e0922f 100755 --- a/src/CONST.ts +++ b/src/CONST.ts @@ -448,7 +448,7 @@ const CONST = { ONFIDO_TERMS_OF_SERVICE_URL: 'https://onfido.com/terms-of-service/', // Use Environment.getEnvironmentURL to get the complete URL with port number - DEV_NEW_EXPENSIFY_URL: 'https://new.expensify.com.dev:', + DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:', SIGN_IN_FORM_WIDTH: 300, diff --git a/src/libs/Navigation/linkingConfig.js b/src/libs/Navigation/linkingConfig.js index 1e695fa9dce..86c3e67cab2 100644 --- a/src/libs/Navigation/linkingConfig.js +++ b/src/libs/Navigation/linkingConfig.js @@ -4,7 +4,7 @@ import CONST from '../../CONST'; import NAVIGATORS from '../../NAVIGATORS'; export default { - prefixes: ['new-expensify://', 'https://www.expensify.cash', 'https://staging.expensify.cash', 'https://new.expensify.com.dev', CONST.NEW_EXPENSIFY_URL, CONST.STAGING_NEW_EXPENSIFY_URL], + prefixes: ['new-expensify://', 'https://www.expensify.cash', 'https://staging.expensify.cash', 'https://dev.new.expensify.com', CONST.NEW_EXPENSIFY_URL, CONST.STAGING_NEW_EXPENSIFY_URL], config: { initialRouteName: SCREENS.HOME, screens: { diff --git a/tests/unit/ReportUtilsTest.js b/tests/unit/ReportUtilsTest.js index 9ddf9b93f8d..40a0ea31ce8 100644 --- a/tests/unit/ReportUtilsTest.js +++ b/tests/unit/ReportUtilsTest.js @@ -503,7 +503,7 @@ describe('ReportUtils', () => { expect(ReportUtils.getReportIDFromLink('new-expensify://r/75431276')).toBe('75431276'); expect(ReportUtils.getReportIDFromLink('https://www.expensify.cash/r/75431276')).toBe('75431276'); expect(ReportUtils.getReportIDFromLink('https://staging.new.expensify.com/r/75431276')).toBe('75431276'); - expect(ReportUtils.getReportIDFromLink('https://new.expensify.com.dev/r/75431276')).toBe('75431276'); + expect(ReportUtils.getReportIDFromLink('https://dev.new.expensify.com/r/75431276')).toBe('75431276'); expect(ReportUtils.getReportIDFromLink('https://staging.expensify.cash/r/75431276')).toBe('75431276'); expect(ReportUtils.getReportIDFromLink('https://new.expensify.com/r/75431276')).toBe('75431276'); });