From 4c1e1213d091631759634e3e2f1727a7d488f7ba Mon Sep 17 00:00:00 2001 From: raikasdev Date: Tue, 22 Aug 2023 17:54:20 +0300 Subject: [PATCH 01/19] chore: update to node 18 lts --- .devcontainer/Dockerfile | 5 +---- .devcontainer/docker-compose.yml | 2 +- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/actions/setup-project/action.yml | 2 +- .github/workflows/community-label.yml | 2 +- .github/workflows/issue-label.yml | 2 +- .github/workflows/milestone-assign.yml | 2 +- .github/workflows/tag-images.yml | 3 +-- .nvmrc | 2 +- CONTRIBUTING.md | 2 +- _templates/provider/new/package.ejs.t | 2 +- apps/api/Dockerfile | 2 +- apps/inbound-mail/Dockerfile | 2 +- apps/web/Dockerfile | 4 ++-- apps/webhook/Dockerfile | 2 +- apps/widget/Dockerfile | 2 +- apps/worker/Dockerfile | 2 +- apps/ws/Dockerfile | 2 +- docs/docs/community/create-provider.md | 2 +- docs/docs/community/faq.md | 2 +- docs/docs/community/run-locally.md | 2 +- libs/embed/Dockerfile | 2 +- package.json | 2 +- providers/africas-talking/package.json | 2 +- providers/forty-six-elks/package.json | 2 +- providers/maqsam/package.json | 2 +- providers/mattermost/package.json | 2 +- providers/one-signal/package.json | 2 +- providers/plunk/package.json | 2 +- providers/push-webhook/package.json | 2 +- providers/sendchamp/package.json | 2 +- providers/sms-central/package.json | 2 +- scripts/dev-environment-setup.sh | 3 +-- 33 files changed, 34 insertions(+), 39 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 73ca2ecbca2..cc46bcd477c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster -ARG VARIANT=16-bullseye +ARG VARIANT=18-bullseye FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} # Install MongoDB command line tools if on buster and x86_64 (arm64 not supported) @@ -23,6 +23,3 @@ RUN . /etc/os-release \ # [Optional] Uncomment if you want to install more global node modules RUN su node -c "npm install -g pnpm@7.33.4" - - - diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 30c8a74bae2..8ecbfd6112d 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -9,7 +9,7 @@ services: # Update 'VARIANT' to pick an LTS version of Node.js: 16, 14, 12. # Append -bullseye or -buster to pin to an OS version. # Use -bullseye variants on local arm64/Apple Silicon. - VARIANT: 16-bullseye + VARIANT: 18-bullseye volumes: - ..:/workspace:cached diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index a5ea37cd2e3..83a71d70d52 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -64,7 +64,7 @@ body: attributes: label: node version description: In case of self-hosting or local installation mention the node version. If using our cloud-managed solution, mention NA. - placeholder: 16.0.0 + placeholder: 18.0.0 - type: textarea id: additional-context validations: diff --git a/.github/actions/setup-project/action.yml b/.github/actions/setup-project/action.yml index f336296f986..3f37634402b 100644 --- a/.github/actions/setup-project/action.yml +++ b/.github/actions/setup-project/action.yml @@ -28,7 +28,7 @@ runs: - uses: actions/setup-node@v3 name: ⚙️ Setup Node Version with: - node-version: '16.15.1' + node-version: '18.17.1' cache: 'pnpm' - name: 💵 Start Redis diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml index c317dfe0c80..a7b9f508300 100644 --- a/.github/workflows/community-label.yml +++ b/.github/workflows/community-label.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install Octokit run: npm --prefix .github/workflows/scripts install @octokit/action diff --git a/.github/workflows/issue-label.yml b/.github/workflows/issue-label.yml index a5b107db6f3..fd783bfcf15 100644 --- a/.github/workflows/issue-label.yml +++ b/.github/workflows/issue-label.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install Octokit run: npm --prefix .github/workflows/scripts install @octokit/action diff --git a/.github/workflows/milestone-assign.yml b/.github/workflows/milestone-assign.yml index e1e48065dab..8dee14fb807 100644 --- a/.github/workflows/milestone-assign.yml +++ b/.github/workflows/milestone-assign.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 16 + node-version: 18 - name: Install Octokit run: npm --prefix .github/workflows/scripts install @octokit/action diff --git a/.github/workflows/tag-images.yml b/.github/workflows/tag-images.yml index 5ff1258b229..8cc14d0e822 100644 --- a/.github/workflows/tag-images.yml +++ b/.github/workflows/tag-images.yml @@ -26,7 +26,7 @@ jobs: run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - uses: actions/setup-node@v3 with: - node-version: '16.15.1' + node-version: '18.17.1' - name: Login to docker env: @@ -125,4 +125,3 @@ jobs: docker pull ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$DOCKER_VERSION - diff --git a/.nvmrc b/.nvmrc index d9289897d30..4a1f488b6c3 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.15.1 +18.17.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 258093d9004..7092c88b030 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ You can open a new issue with this [issue form](https://github.com/novuhq/novu/i ### Requirements -- Node.js version v14.19.3 +- Node.js version v18.17.1 (LTS) - MongoDB - Redis. To install Redis on your O.S, please follow the below guides - [To install Redis on Windows](https://redis.io/docs/getting-started/installation/install-redis-on-windows/) diff --git a/_templates/provider/new/package.ejs.t b/_templates/provider/new/package.ejs.t index 2929f4d7a08..7cd4ae98d5c 100644 --- a/_templates/provider/new/package.ejs.t +++ b/_templates/provider/new/package.ejs.t @@ -34,7 +34,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 05b4170e517..6547280e46b 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base ARG BULL_MQ_PRO_TOKEN ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN diff --git a/apps/inbound-mail/Dockerfile b/apps/inbound-mail/Dockerfile index 6592c77d7aa..a9bfd435c16 100644 --- a/apps/inbound-mail/Dockerfile +++ b/apps/inbound-mail/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base ARG BULL_MQ_PRO_TOKEN ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index ab2f64095a8..d515f5f52a6 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,5 +1,5 @@ # start build stage -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as builder +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as builder ENV NX_DAEMON=false WORKDIR /usr/src/app @@ -37,7 +37,7 @@ RUN NX_DAEMON=false pnpm build:web # end build stage # start production stage -FROM node:16-alpine +FROM node:18-alpine WORKDIR /app diff --git a/apps/webhook/Dockerfile b/apps/webhook/Dockerfile index a3bde25c75c..cb1d67fd3bf 100644 --- a/apps/webhook/Dockerfile +++ b/apps/webhook/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base ENV NX_DAEMON=false RUN npm i pm2 -g diff --git a/apps/widget/Dockerfile b/apps/widget/Dockerfile index 6f36836b2be..e52270634af 100644 --- a/apps/widget/Dockerfile +++ b/apps/widget/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine ENV NX_DAEMON=false WORKDIR /usr/src/app diff --git a/apps/worker/Dockerfile b/apps/worker/Dockerfile index a0ee51501fc..045c6bf127c 100644 --- a/apps/worker/Dockerfile +++ b/apps/worker/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base RUN apk --update --no-cache add curl ENV NX_DAEMON=false diff --git a/apps/ws/Dockerfile b/apps/ws/Dockerfile index 95097cdb8dc..61e035b3363 100644 --- a/apps/ws/Dockerfile +++ b/apps/ws/Dockerfile @@ -1,4 +1,4 @@ -FROM node:16-alpine3.16 +FROM node:18-alpine3.16 ARG BULL_MQ_PRO_TOKEN ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN diff --git a/docs/docs/community/create-provider.md b/docs/docs/community/create-provider.md index 57aa65c604f..20e8581cf71 100644 --- a/docs/docs/community/create-provider.md +++ b/docs/docs/community/create-provider.md @@ -13,7 +13,7 @@ Providers allow us to handle message delivery over multiple channels. We have mu ## Requirements -- Node.js version v16.15.1 +- Node.js version v18.17.1 - MongoDB - Redis - **(Optional)** pnpm - Needed if you want to install new packages diff --git a/docs/docs/community/faq.md b/docs/docs/community/faq.md index 58db30b601f..d38476c395b 100644 --- a/docs/docs/community/faq.md +++ b/docs/docs/community/faq.md @@ -10,7 +10,7 @@ Here we will outline some of the most common questions we get asked about the pr Novu consists of multiple services written in Node.js and Typescript. The following are the dependencies required to run the project fully: -- Node.js version v16.15.1 +- Node.js version v18.17.1 - MongoDB - Redis - File storage (S3/GCP/Azure) - Optional diff --git a/docs/docs/community/run-locally.md b/docs/docs/community/run-locally.md index 6d55d353b5c..a023a6199d4 100644 --- a/docs/docs/community/run-locally.md +++ b/docs/docs/community/run-locally.md @@ -13,7 +13,7 @@ import FAQItem from '@site/src/components/FAQItem'; ## Requirements -- Node.js version v16.15.1 +- Node.js version v18.17.1 - MongoDB - Redis - **(Optional)** pnpm - Needed if you want to install new packages diff --git a/libs/embed/Dockerfile b/libs/embed/Dockerfile index ae1df77321e..d729d3b8fab 100644 --- a/libs/embed/Dockerfile +++ b/libs/embed/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs16-alpine +FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine WORKDIR /usr/src/app diff --git a/package.json b/package.json index 6cbca769ffd..aeb6fca28a2 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,7 @@ } }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.33.4" }, "dependencies": { diff --git a/providers/africas-talking/package.json b/providers/africas-talking/package.json index 9155709b49c..82b1c2a6711 100644 --- a/providers/africas-talking/package.json +++ b/providers/africas-talking/package.json @@ -30,7 +30,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/forty-six-elks/package.json b/providers/forty-six-elks/package.json index f4fc2aa140c..dfc0c40b876 100644 --- a/providers/forty-six-elks/package.json +++ b/providers/forty-six-elks/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/maqsam/package.json b/providers/maqsam/package.json index 6b1789e433f..6f4ee95ca36 100644 --- a/providers/maqsam/package.json +++ b/providers/maqsam/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/mattermost/package.json b/providers/mattermost/package.json index f84afbe4e49..b9d72d4f957 100644 --- a/providers/mattermost/package.json +++ b/providers/mattermost/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/one-signal/package.json b/providers/one-signal/package.json index 74698003a0e..3ecb323561e 100644 --- a/providers/one-signal/package.json +++ b/providers/one-signal/package.json @@ -30,7 +30,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/plunk/package.json b/providers/plunk/package.json index bea661cc126..3016ddb2a94 100644 --- a/providers/plunk/package.json +++ b/providers/plunk/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/push-webhook/package.json b/providers/push-webhook/package.json index 7acbcaffa18..e3158845c16 100644 --- a/providers/push-webhook/package.json +++ b/providers/push-webhook/package.json @@ -30,7 +30,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/sendchamp/package.json b/providers/sendchamp/package.json index c83040344be..236d3ab9c32 100644 --- a/providers/sendchamp/package.json +++ b/providers/sendchamp/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/sms-central/package.json b/providers/sms-central/package.json index 75c4ff5eb4e..6c1c17ff2ab 100644 --- a/providers/sms-central/package.json +++ b/providers/sms-central/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=13.0.0 <17.0.0", + "node": ">=18.17.1 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/scripts/dev-environment-setup.sh b/scripts/dev-environment-setup.sh index e5bf357159c..61bca96688e 100755 --- a/scripts/dev-environment-setup.sh +++ b/scripts/dev-environment-setup.sh @@ -261,7 +261,7 @@ check_nvm () { } install_node () { - NODE_JS_VERSION="v16.15.1" + NODE_JS_VERSION="v18.17.1" SKIP="$(check_nvm)" @@ -512,4 +512,3 @@ install_os_dependencies () { install_os_dependencies clone_monorepo refresh_shell - From 0af6d8441a49c7ca2f406ac6fb493ce20d695ea6 Mon Sep 17 00:00:00 2001 From: raikasdev Date: Tue, 29 Aug 2023 18:14:41 +0300 Subject: [PATCH 02/19] fix: add words to .cspell.json --- .cspell.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index e5eb242e1ae..641b0d70889 100644 --- a/.cspell.json +++ b/.cspell.json @@ -499,7 +499,9 @@ "nextjs", "vanillajs", "quckstart", - "errmsg" + "errmsg", + "devcontainer", + "INITDB" ], "flagWords": [], "patterns": [ From a1625e0cc725f4e1bc74189f447f413aacb39882 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Thu, 28 Sep 2023 22:55:01 +0300 Subject: [PATCH 03/19] fix: replace tcp port --- .github/workflows/reusable-web-e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-web-e2e.yml b/.github/workflows/reusable-web-e2e.yml index 4cbc5f16302..651e0db92e2 100644 --- a/.github/workflows/reusable-web-e2e.yml +++ b/.github/workflows/reusable-web-e2e.yml @@ -90,7 +90,7 @@ jobs: cd apps/ws && pnpm start:test & - name: Wait on Services - run: wait-on --timeout=180000 http://localhost:1340/v1/health-check http://localhost:4200 + run: wait-on --timeout=180000 http://localhost:1340/v1/health-check tcp:4200 # run cypress install only when cache was not hit - name: Cypress install From 09c53c7c59ab79b3a88fbee9cda9cebc4671fb2c Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Thu, 28 Sep 2023 23:03:49 +0300 Subject: [PATCH 04/19] fix: update tcp on wait-on --- .github/workflows/reusable-widget-e2e.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-widget-e2e.yml b/.github/workflows/reusable-widget-e2e.yml index 2e786ce7ed2..fc8cbb6a9c9 100644 --- a/.github/workflows/reusable-widget-e2e.yml +++ b/.github/workflows/reusable-widget-e2e.yml @@ -93,7 +93,7 @@ jobs: cd apps/ws && pnpm start:prod & - name: Wait on Widget and WS Services - run: wait-on --timeout=180000 http://localhost:1340/v1/health-check http://localhost:3500 + run: wait-on --timeout=180000 http://localhost:1340/v1/health-check tcp:3500 - name: Cypress install if: steps.setup-project.outputs.cypress_cache_hit != 'true' @@ -108,7 +108,7 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_WIDGET_KEY }} with: working-directory: apps/widget - wait-on: http://localhost:3500 + wait-on: tcp:3500 browser: chrome install: false record: true From 6a70cf58e9020f86d980fbd07d126f2b1b53ffb0 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Thu, 28 Sep 2023 23:08:13 +0300 Subject: [PATCH 05/19] refactor: more restrictive node engine permission --- _templates/provider/new/package.ejs.t | 2 +- package.json | 2 +- providers/africas-talking/package.json | 2 +- providers/forty-six-elks/package.json | 2 +- providers/maqsam/package.json | 2 +- providers/mattermost/package.json | 2 +- providers/one-signal/package.json | 2 +- providers/plunk/package.json | 2 +- providers/push-webhook/package.json | 2 +- providers/sendchamp/package.json | 2 +- providers/sms-central/package.json | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/_templates/provider/new/package.ejs.t b/_templates/provider/new/package.ejs.t index 57392fa3635..076b3cd9fd2 100644 --- a/_templates/provider/new/package.ejs.t +++ b/_templates/provider/new/package.ejs.t @@ -34,7 +34,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/package.json b/package.json index 6818bf1aad3..036a73f1796 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ } }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.33.4" }, "dependencies": { diff --git a/providers/africas-talking/package.json b/providers/africas-talking/package.json index 40805cb1451..8faf150d53d 100644 --- a/providers/africas-talking/package.json +++ b/providers/africas-talking/package.json @@ -30,7 +30,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/forty-six-elks/package.json b/providers/forty-six-elks/package.json index 8ec361641ad..8e0afa9323c 100644 --- a/providers/forty-six-elks/package.json +++ b/providers/forty-six-elks/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/maqsam/package.json b/providers/maqsam/package.json index bdd8cfeea19..892c0d4de3d 100644 --- a/providers/maqsam/package.json +++ b/providers/maqsam/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/mattermost/package.json b/providers/mattermost/package.json index 198213c09be..c4b03d5e0ca 100644 --- a/providers/mattermost/package.json +++ b/providers/mattermost/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/one-signal/package.json b/providers/one-signal/package.json index 7cf5f0e9f7b..056d87b5800 100644 --- a/providers/one-signal/package.json +++ b/providers/one-signal/package.json @@ -30,7 +30,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/plunk/package.json b/providers/plunk/package.json index 4ca74af6f3a..9cb5f6b30ea 100644 --- a/providers/plunk/package.json +++ b/providers/plunk/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/push-webhook/package.json b/providers/push-webhook/package.json index f755a79581b..5c1466d3902 100644 --- a/providers/push-webhook/package.json +++ b/providers/push-webhook/package.json @@ -30,7 +30,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/sendchamp/package.json b/providers/sendchamp/package.json index 942b397abe3..db79ea28073 100644 --- a/providers/sendchamp/package.json +++ b/providers/sendchamp/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { diff --git a/providers/sms-central/package.json b/providers/sms-central/package.json index 12ed3cb541d..6c9e7d0d5d1 100644 --- a/providers/sms-central/package.json +++ b/providers/sms-central/package.json @@ -29,7 +29,7 @@ "access": "public" }, "engines": { - "node": ">=18.17.1 <19", + "node": ">=18 <19", "pnpm": "^7.26.0" }, "dependencies": { From 892af64cd0b702fc400bbf99ba50e7c563309747 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Fri, 29 Sep 2023 12:22:58 +0300 Subject: [PATCH 06/19] fix: wait-on check --- .github/workflows/reusable-web-e2e.yml | 2 +- .github/workflows/reusable-widget-e2e.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-web-e2e.yml b/.github/workflows/reusable-web-e2e.yml index 651e0db92e2..7c53f19e90b 100644 --- a/.github/workflows/reusable-web-e2e.yml +++ b/.github/workflows/reusable-web-e2e.yml @@ -90,7 +90,7 @@ jobs: cd apps/ws && pnpm start:test & - name: Wait on Services - run: wait-on --timeout=180000 http://localhost:1340/v1/health-check tcp:4200 + run: wait-on --timeout=180000 http://localhost:1340/v1/health-check http://0.0.0.0:4200/ # run cypress install only when cache was not hit - name: Cypress install diff --git a/.github/workflows/reusable-widget-e2e.yml b/.github/workflows/reusable-widget-e2e.yml index fc8cbb6a9c9..dd437b1ba7b 100644 --- a/.github/workflows/reusable-widget-e2e.yml +++ b/.github/workflows/reusable-widget-e2e.yml @@ -93,7 +93,7 @@ jobs: cd apps/ws && pnpm start:prod & - name: Wait on Widget and WS Services - run: wait-on --timeout=180000 http://localhost:1340/v1/health-check tcp:3500 + run: wait-on --timeout=180000 http://localhost:1340/v1/health-check http://0.0.0.0:3500/ - name: Cypress install if: steps.setup-project.outputs.cypress_cache_hit != 'true' @@ -108,7 +108,7 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_WIDGET_KEY }} with: working-directory: apps/widget - wait-on: tcp:3500 + wait-on: http://0.0.0.0:3500/ browser: chrome install: false record: true From 55d926570e0cf910de74be2753fd6347abf1ea6b Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Fri, 29 Sep 2023 12:53:21 +0300 Subject: [PATCH 07/19] chore: test cypress --- apps/web/cypress.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/web/cypress.config.ts b/apps/web/cypress.config.ts index ba218888be9..534714d6bb3 100644 --- a/apps/web/cypress.config.ts +++ b/apps/web/cypress.config.ts @@ -34,13 +34,13 @@ export default defineConfig({ // eslint-disable-next-line import/extensions return require('./cypress/plugins/index.ts')(on, config); }, - baseUrl: 'http://localhost:4200', + baseUrl: 'http://127.0.0.1:4200', specPattern: 'cypress/tests/**/*.{js,jsx,ts,tsx}', }, env: { NODE_ENV: 'test', - apiUrl: 'http://localhost:1336', + apiUrl: 'http://127.0.0.1:1336', GITHUB_USER_EMAIL: '', GITHUB_USER_PASSWORD: '', BLUEPRINT_CREATOR: '645b648b36dd6d25f8650d37', From 5a261f847e8eaa1f990e3ef141bf007c04e8fed5 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 14:54:08 +0300 Subject: [PATCH 08/19] fix: localhost binding --- .github/actions/docker/build-api/action.yml | 2 +- .../actions/docker/build-worker/action.yml | 2 +- .github/actions/run-api/action.yml | 2 +- .github/actions/run-backend/action.yml | 4 ++-- .github/actions/run-worker/action.yml | 2 +- .github/actions/start-localstack/action.yml | 4 ++-- .github/actions/validate-swagger/action.yml | 2 +- .github/workflows/dev-deploy-webhook.yml | 2 +- .github/workflows/dev-deploy-ws.yml | 2 +- .github/workflows/prod-deploy-api.yml | 2 +- .github/workflows/prod-deploy-webhook.yml | 2 +- .github/workflows/prod-deploy-worker.yml | 2 +- .github/workflows/prod-deploy-ws.yml | 2 +- .github/workflows/reusable-web-e2e.yml | 8 ++++---- .github/workflows/reusable-widget-e2e.yml | 2 +- apps/api/src/.env.test | 20 +++++++++---------- apps/api/src/.example.env | 10 +++++----- .../app/events/e2e/process-subscriber.e2e.ts | 2 +- .../e2e/get-notifications-feed.e2e.ts | 2 +- .../subscribers/e2e/get-unseen-count.e2e.ts | 2 +- apps/api/src/app/widgets/e2e/get-count.e2e.ts | 8 ++++---- .../widgets/e2e/get-notification-feed.e2e.ts | 4 ++-- .../e2e/get-subscriber-preference.e2e.ts | 2 +- .../app/widgets/e2e/get-unread-count.e2e.ts | 8 ++++---- .../app/widgets/e2e/get-unseen-count.e2e.ts | 10 +++++----- .../app/widgets/e2e/mark-all-as-read.e2e.ts | 8 ++++---- .../src/app/widgets/e2e/mark-as-seen.e2e.ts | 2 +- .../widgets/e2e/remove-all-messages.e2e.ts | 4 ++-- .../e2e/update-subscriber-preference.e2e.ts | 2 +- apps/web/README.md | 2 +- apps/web/cypress/plugins/index.ts | 16 +++++++-------- apps/web/cypress/support/commands.ts | 16 +++++++-------- .../debugging-test-trigger.spec.ts | 2 +- apps/web/package.json | 2 +- apps/web/src/config/index.ts | 16 +++++++-------- .../quick-start/components/SetupTimeline.tsx | 2 +- apps/webhook/src/.env.development | 2 +- apps/webhook/src/.env.test | 2 +- apps/webhook/src/.example.env | 2 +- .../src/webhooks/e2e/email-webhook.e2e.ts | 2 +- apps/widget/.env | 4 ++-- apps/widget/cypress.config.ts | 4 ++-- .../widget/cypress/e2e/initialization.spec.ts | 4 ++-- apps/widget/cypress/plugins/index.ts | 6 +++--- apps/widget/cypress/support/commands.ts | 2 +- apps/widget/cypress/test-shell/index.html | 2 +- apps/widget/index.html | 2 +- apps/widget/package.json | 4 ++-- apps/widget/src/config/index.ts | 8 ++++---- apps/worker/src/.env.development | 2 +- apps/worker/src/.env.production | 2 +- apps/worker/src/.env.test | 4 ++-- apps/worker/src/.example.env | 4 ++-- .../src/app/health/e2e/health-check.e2e.ts | 2 +- apps/ws/src/.env.development | 2 +- apps/ws/src/.env.test | 2 +- apps/ws/src/.example.env | 2 +- docker/.env.example | 14 ++++++------- docker/Readme.md | 2 +- .../helm/templates/localstack-secrets.yaml | 2 +- docker/kubernetes/helm/values.yaml | 4 ++-- docker/kubernetes/kustomize/env-dev | 12 +++++------ .../docker-compose.redis-cluster.yml | 4 ++-- docker/local/development/docker-compose.yml | 4 ++-- docker/local/docker-compose.localstack.yml | 2 +- libs/embed/src/shared/resources.js | 6 +++--- libs/testing/src/notifications.service.ts | 2 +- libs/testing/src/user.session.ts | 2 +- packages/application-generic/src/.env.test | 18 ++++++++--------- .../src/services/auth/shared.ts | 2 +- packages/cli/package.json | 2 +- .../headless/src/lib/headless.service.test.ts | 4 ++-- .../.vscode/launch.json | 4 ++-- .../notification-center-angular/README.md | 2 +- .../src/lib/email-webhook.provider.spec.ts | 4 ++-- .../src/lib/push-webhook.provider.spec.ts | 4 ++-- scripts/jarvis.js | 20 +++++++++---------- 77 files changed, 179 insertions(+), 179 deletions(-) diff --git a/.github/actions/docker/build-api/action.yml b/.github/actions/docker/build-api/action.yml index 4566e4981ba..2c4a51b1b2b 100644 --- a/.github/actions/docker/build-api/action.yml +++ b/.github/actions/docker/build-api/action.yml @@ -101,7 +101,7 @@ runs: docker tag novu-api ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG docker run --network=host --name api -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1337/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1337/v1/health-check | grep 'ok' echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT diff --git a/.github/actions/docker/build-worker/action.yml b/.github/actions/docker/build-worker/action.yml index c2cf91bd604..0ee74b07421 100644 --- a/.github/actions/docker/build-worker/action.yml +++ b/.github/actions/docker/build-worker/action.yml @@ -104,7 +104,7 @@ runs: echo "Run image" docker run --network=host --name worker -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1342/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1342/v1/health-check | grep 'ok' echo "IMAGE=ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG" >> $GITHUB_OUTPUT diff --git a/.github/actions/run-api/action.yml b/.github/actions/run-api/action.yml index a1e2ecb2f1c..9714366fe32 100644 --- a/.github/actions/run-api/action.yml +++ b/.github/actions/run-api/action.yml @@ -24,4 +24,4 @@ runs: - name: Wait on API shell: bash - run: wait-on --timeout=180000 http://localhost:1336/v1/health-check + run: wait-on --timeout=180000 http://127.0.0.1:1336/v1/health-check diff --git a/.github/actions/run-backend/action.yml b/.github/actions/run-backend/action.yml index b102b92e500..998f96eb84e 100644 --- a/.github/actions/run-backend/action.yml +++ b/.github/actions/run-backend/action.yml @@ -26,7 +26,7 @@ runs: NODE_ENV: "test" PORT: "1336" TZ: "UTC" - GITHUB_OAUTH_REDIRECT: "http://localhost:1336/v1/auth/github/callback" + GITHUB_OAUTH_REDIRECT: "http://127.0.0.1:1336/v1/auth/github/callback" LAUNCH_DARKLY_SDK_KEY: ${{ inputs.launch_darkly_sdk_key }} run: cd apps/api && pnpm start:build & @@ -41,4 +41,4 @@ runs: - name: Wait on API and Worker shell: bash - run: wait-on --timeout=180000 http://localhost:1336/v1/health-check http://localhost:1342/v1/health-check + run: wait-on --timeout=180000 http://127.0.0.1:1336/v1/health-check http://127.0.0.1:1342/v1/health-check diff --git a/.github/actions/run-worker/action.yml b/.github/actions/run-worker/action.yml index 1aa1d2379a9..49df4aa1855 100644 --- a/.github/actions/run-worker/action.yml +++ b/.github/actions/run-worker/action.yml @@ -25,4 +25,4 @@ runs: - name: Wait on worker shell: bash - run: wait-on --timeout=180000 http://localhost:1342/v1/health-check + run: wait-on --timeout=180000 http://127.0.0.1:1342/v1/health-check diff --git a/.github/actions/start-localstack/action.yml b/.github/actions/start-localstack/action.yml index 7f99da25234..e7a2a8a32be 100644 --- a/.github/actions/start-localstack/action.yml +++ b/.github/actions/start-localstack/action.yml @@ -24,9 +24,9 @@ runs: do sleep 1 [[ counter -eq $max_retry ]] && echo "Failed!" && exit 1 - aws --endpoint-url=http://localhost:4566 s3 ls + aws --endpoint-url=http://127.0.0.1:4566 s3 ls echo "Trying again. Try #$counter" ((counter++)) done docker-compose -f docker-compose.localstack.yml logs --tail="all" - aws --endpoint-url=http://localhost:4566 --cli-connect-timeout 600 s3 mb s3://novu-test + aws --endpoint-url=http://127.0.0.1:4566 --cli-connect-timeout 600 s3 mb s3://novu-test diff --git a/.github/actions/validate-swagger/action.yml b/.github/actions/validate-swagger/action.yml index 855874f628d..25197bbf806 100644 --- a/.github/actions/validate-swagger/action.yml +++ b/.github/actions/validate-swagger/action.yml @@ -9,7 +9,7 @@ runs: - name: Get swagger json as file shell: bash run: | - curl -o swagger.json http://localhost:1336/api-json + curl -o swagger.json http://127.0.0.1:1336/api-json - uses: char0n/swagger-editor-validate@v1 with: diff --git a/.github/workflows/dev-deploy-webhook.yml b/.github/workflows/dev-deploy-webhook.yml index e51bcca3147..df2e4238289 100644 --- a/.github/workflows/dev-deploy-webhook.yml +++ b/.github/workflows/dev-deploy-webhook.yml @@ -51,7 +51,7 @@ jobs: docker tag novu-webhook ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG docker run --network=host --name webhook -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1341/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1341/v1/health-check | grep 'ok' docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG diff --git a/.github/workflows/dev-deploy-ws.yml b/.github/workflows/dev-deploy-ws.yml index 7acc3a28dbd..8cf7098c0a8 100644 --- a/.github/workflows/dev-deploy-ws.yml +++ b/.github/workflows/dev-deploy-ws.yml @@ -99,7 +99,7 @@ jobs: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin docker build -t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG --build-arg BULL_MQ_PRO_TOKEN=${BULL_MQ_PRO_NPM_TOKEN} -f apps/ws/Dockerfile . docker run --network=host --name api -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1340/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1340/v1/health-check | grep 'ok' docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:dev docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG diff --git a/.github/workflows/prod-deploy-api.yml b/.github/workflows/prod-deploy-api.yml index 8f886ad620f..e0d76d085ad 100644 --- a/.github/workflows/prod-deploy-api.yml +++ b/.github/workflows/prod-deploy-api.yml @@ -108,7 +108,7 @@ jobs: docker tag novu-api ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG docker run --network=host --name api -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1337/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1337/v1/health-check | grep 'ok' docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest diff --git a/.github/workflows/prod-deploy-webhook.yml b/.github/workflows/prod-deploy-webhook.yml index 10f34b95b70..0081c220add 100644 --- a/.github/workflows/prod-deploy-webhook.yml +++ b/.github/workflows/prod-deploy-webhook.yml @@ -43,7 +43,7 @@ jobs: docker tag novu-webhook ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG docker run --network=host --name webhook -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1341/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1341/v1/health-check | grep 'ok' docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest diff --git a/.github/workflows/prod-deploy-worker.yml b/.github/workflows/prod-deploy-worker.yml index 8ce444cf0c9..b25ffc8d637 100644 --- a/.github/workflows/prod-deploy-worker.yml +++ b/.github/workflows/prod-deploy-worker.yml @@ -71,7 +71,7 @@ jobs: docker tag novu-worker ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG docker run --network=host --name worker -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1342/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1342/v1/health-check | grep 'ok' docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest diff --git a/.github/workflows/prod-deploy-ws.yml b/.github/workflows/prod-deploy-ws.yml index 87b98c2b825..1cc1f151538 100644 --- a/.github/workflows/prod-deploy-ws.yml +++ b/.github/workflows/prod-deploy-ws.yml @@ -55,7 +55,7 @@ jobs: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin docker build --build-arg BULL_MQ_PRO_TOKEN=${BULL_MQ_PRO_NPM_TOKEN} -t ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG -f apps/ws/Dockerfile . docker run --network=host --name api -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:1340/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:1340/v1/health-check | grep 'ok' docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod docker tag ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:latest docker push ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:prod diff --git a/.github/workflows/reusable-web-e2e.yml b/.github/workflows/reusable-web-e2e.yml index e5aa2cfd03c..1301ab669d7 100644 --- a/.github/workflows/reusable-web-e2e.yml +++ b/.github/workflows/reusable-web-e2e.yml @@ -74,9 +74,9 @@ jobs: - name: Start Client working-directory: apps/web env: - REACT_APP_API_URL: http://localhost:1336 - REACT_APP_WS_URL: http://localhost:1340 - REACT_APP_WEBHOOK_URL: http://localhost:1341 + REACT_APP_API_URL: http://127.0.0.1:1336 + REACT_APP_WS_URL: http://127.0.0.1:1340 + REACT_APP_WEBHOOK_URL: http://127.0.0.1:1341 REACT_APP_LAUNCH_DARKLY_CLIENT_SIDE_ID: ${{ secrets.TEST_LAUNCH_DARKLY_CLIENT_SIDE_ID }} run: pnpm start:static:build & @@ -85,7 +85,7 @@ jobs: cd apps/ws && pnpm start:test & - name: Wait on Services - run: wait-on --timeout=180000 http://localhost:1340/v1/health-check http://0.0.0.0:4200/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:4200/ # run cypress install only when cache was not hit - name: Cypress install diff --git a/.github/workflows/reusable-widget-e2e.yml b/.github/workflows/reusable-widget-e2e.yml index 48a65560110..37909bf80a3 100644 --- a/.github/workflows/reusable-widget-e2e.yml +++ b/.github/workflows/reusable-widget-e2e.yml @@ -87,7 +87,7 @@ jobs: cd apps/ws && pnpm start:prod & - name: Wait on Widget and WS Services - run: wait-on --timeout=180000 http://localhost:1340/v1/health-check http://0.0.0.0:3500/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:3500/ - name: Cypress install if: steps.setup-project.outputs.cypress_cache_hit != 'true' diff --git a/apps/api/src/.env.test b/apps/api/src/.env.test index 5b43216c298..199d7ffc622 100644 --- a/apps/api/src/.env.test +++ b/apps/api/src/.env.test @@ -1,12 +1,12 @@ GOOGLE_OAUTH_CLIENT_ID=11 GOOGLE_OAUTH_CLIENT_SECRET=11 -GOOGLE_OAUTH_REDIRECT=http://localhost:3000/v1/auth/google/callback +GOOGLE_OAUTH_REDIRECT=http://127.0.0.1:3000/v1/auth/google/callback STORE_ENCRYPTION_KEY="" BLUEPRINT_CREATOR=645b648b36dd6d25f8650d37 -CLIENT_SUCCESS_AUTH_REDIRECT=http://localhost:4200/auth/login +CLIENT_SUCCESS_AUTH_REDIRECT=http://127.0.0.1:4200/auth/login -MONGO_URL=mongodb://localhost:27017/novu-test +MONGO_URL=mongodb://127.0.0.1:27017/novu-test REDIS_PORT=6379 REDIS_HOST=localhost REDIS_PREFIX= @@ -21,7 +21,7 @@ REDIS_CACHE_CONNECTION_TIMEOUT= REDIS_CACHE_KEEP_ALIVE= REDIS_CACHE_FAMILY= REDIS_CACHE_KEY_PREFIX= -REDIS_CACHE_ENABLE_AUTOPIPELINING=false +REDIS_CACHE_ENABLE_AUTOPIPELINING=false IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= @@ -36,8 +36,8 @@ REDIS_CLUSTER_KEEP_ALIVE= REDIS_CLUSTER_FAMILY= REDIS_CLUSTER_KEY_PREFIX= -SYNC_PATH=http://localhost:3001 -API_ROOT_URL=http://localhost:3000 +SYNC_PATH=http://127.0.0.1:3001 +API_ROOT_URL=http://127.0.0.1:3000 DISABLE_USER_REGISTRATION=false PORT=1337 JWT_SECRET=ASD#asda23DFEFSFHG%fg @@ -46,14 +46,14 @@ SENDGRID_API_KEY=SG.123123 S3_ACCESS_KEY= S3_SECRET= REDIS_ARENA_PORT=4568 -FRONT_BASE_URL=http://localhost:4200 +FRONT_BASE_URL=http://127.0.0.1:4200 RELEASLY_MAIL=support@starter.co -BACK_OFFICE_URL=http://localhost:5200 +BACK_OFFICE_URL=http://127.0.0.1:5200 INTERCOM_API_KEY= GLOBAL_CONTEXT_PATH= API_CONTEXT_PATH= -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-test S3_REGION=us-east-1 GCS_BUCKET_NAME=novu-test @@ -70,7 +70,7 @@ MAIL_SERVER_DOMAIN= VERCEL_CLIENT_ID= VERCEL_CLIENT_SECRET= -VERCEL_REDIRECT_URI=http://localhost:4200/auth/login +VERCEL_REDIRECT_URI=http://127.0.0.1:4200/auth/login VERCEL_BASE_URL=https://api.vercel.com FF_IS_TOPIC_NOTIFICATION_ENABLED=true diff --git a/apps/api/src/.example.env b/apps/api/src/.example.env index b70a633dab1..a28c8417580 100644 --- a/apps/api/src/.example.env +++ b/apps/api/src/.example.env @@ -1,11 +1,11 @@ NODE_ENV=local PORT=3000 -API_ROOT_URL=http://localhost:3000 -FRONT_BASE_URL=http://localhost:4200 +API_ROOT_URL=http://127.0.0.1:3000 +FRONT_BASE_URL=http://127.0.0.1:4200 STORE_ENCRYPTION_KEY="" DISABLE_USER_REGISTRATION=false -MONGO_URL=mongodb://localhost:27017/novu-db +MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 REDIS_PREFIX= @@ -37,7 +37,7 @@ REDIS_CLUSTER_KEY_PREFIX= JWT_SECRET=%LOCAL_TEST&@Ub4&9s -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-local S3_REGION=us-east-1 AWS_ACCESS_KEY_ID=test @@ -51,7 +51,7 @@ GLOBAL_CONTEXT_PATH= API_CONTEXT_PATH= VERCEL_CLIENT_ID= VERCEL_CLIENT_SECRET= -VERCEL_REDIRECT_URI=http://localhost:4200/auth/login +VERCEL_REDIRECT_URI=http://127.0.0.1:4200/auth/login VERCEL_BASE_URL=https://api.vercel.com FF_IS_TOPIC_NOTIFICATION_ENABLED=true diff --git a/apps/api/src/app/events/e2e/process-subscriber.e2e.ts b/apps/api/src/app/events/e2e/process-subscriber.e2e.ts index 22fe8f871c6..eb721f88b8c 100644 --- a/apps/api/src/app/events/e2e/process-subscriber.e2e.ts +++ b/apps/api/src/app/events/e2e/process-subscriber.e2e.ts @@ -260,7 +260,7 @@ async function updateSubscriberPreference( subscriberToken: string, templateId: string ) { - return await axios.patch(`http://localhost:${process.env.PORT}/v1/widgets/preferences/${templateId}`, data, { + return await axios.patch(`http://127.0.0.1:${process.env.PORT}/v1/widgets/preferences/${templateId}`, data, { headers: { Authorization: `Bearer ${subscriberToken}`, }, diff --git a/apps/api/src/app/subscribers/e2e/get-notifications-feed.e2e.ts b/apps/api/src/app/subscribers/e2e/get-notifications-feed.e2e.ts index 540ff7e0cec..4824c24e3eb 100644 --- a/apps/api/src/app/subscribers/e2e/get-notifications-feed.e2e.ts +++ b/apps/api/src/app/subscribers/e2e/get-notifications-feed.e2e.ts @@ -93,7 +93,7 @@ describe('Get Notifications feed - /:subscriberId/notifications/feed (GET)', fun async function getNotificationsFeed(subscriberId: string, apiKey: string, query = {}) { const response = await axios.get( - `http://localhost:${process.env.PORT}/v1/subscribers/${subscriberId}/notifications/feed`, + `http://127.0.0.1:${process.env.PORT}/v1/subscribers/${subscriberId}/notifications/feed`, { params: { ...query, diff --git a/apps/api/src/app/subscribers/e2e/get-unseen-count.e2e.ts b/apps/api/src/app/subscribers/e2e/get-unseen-count.e2e.ts index 0acd8f47940..fe2dc079bf3 100644 --- a/apps/api/src/app/subscribers/e2e/get-unseen-count.e2e.ts +++ b/apps/api/src/app/subscribers/e2e/get-unseen-count.e2e.ts @@ -38,7 +38,7 @@ describe('Get Unseen Count - /:subscriberId/notifications/unseen (GET)', functio async function getUnSeenCount(subscriberId: string, apiKey: string, query = {}) { const response = await axios.get( - `http://localhost:${process.env.PORT}/v1/subscribers/${subscriberId}/notifications/unseen`, + `http://127.0.0.1:${process.env.PORT}/v1/subscribers/${subscriberId}/notifications/unseen`, { params: { ...query, diff --git a/apps/api/src/app/widgets/e2e/get-count.e2e.ts b/apps/api/src/app/widgets/e2e/get-count.e2e.ts index 835e31b919c..2f16c03dcc6 100644 --- a/apps/api/src/app/widgets/e2e/get-count.e2e.ts +++ b/apps/api/src/app/widgets/e2e/get-count.e2e.ts @@ -263,7 +263,7 @@ describe('Count - GET /widget/notifications/count', function () { expect(messages[0].seen).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { @@ -294,7 +294,7 @@ describe('Count - GET /widget/notifications/count', function () { expect(messages[0].read).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true, read: true } }, { headers: { @@ -342,7 +342,7 @@ describe('Count - GET /widget/notifications/count', function () { }); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { @@ -356,7 +356,7 @@ describe('Count - GET /widget/notifications/count', function () { }); async function getFeedCount(query = {}) { - const response = await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/notifications/count`, { + const response = await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/notifications/count`, { params: { ...query, }, diff --git a/apps/api/src/app/widgets/e2e/get-notification-feed.e2e.ts b/apps/api/src/app/widgets/e2e/get-notification-feed.e2e.ts index 36064ec2361..41ea07dfeba 100644 --- a/apps/api/src/app/widgets/e2e/get-notification-feed.e2e.ts +++ b/apps/api/src/app/widgets/e2e/get-notification-feed.e2e.ts @@ -209,7 +209,7 @@ describe('GET /widget/notifications/feed', function () { }); async function getSubscriberFeed(query = {}) { - const response = await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/notifications/feed`, { + const response = await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/notifications/feed`, { params: { page: 0, ...query, @@ -224,7 +224,7 @@ describe('GET /widget/notifications/feed', function () { async function markMessageAsSeen(messageId: string) { return await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { diff --git a/apps/api/src/app/widgets/e2e/get-subscriber-preference.e2e.ts b/apps/api/src/app/widgets/e2e/get-subscriber-preference.e2e.ts index 6751742fae6..6a1bcf8e474 100644 --- a/apps/api/src/app/widgets/e2e/get-subscriber-preference.e2e.ts +++ b/apps/api/src/app/widgets/e2e/get-subscriber-preference.e2e.ts @@ -83,7 +83,7 @@ describe('GET /widget/preferences', function () { }); export async function getSubscriberPreference(subscriberToken: string) { - return await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/preferences`, { + return await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/preferences`, { headers: { Authorization: `Bearer ${subscriberToken}`, }, diff --git a/apps/api/src/app/widgets/e2e/get-unread-count.e2e.ts b/apps/api/src/app/widgets/e2e/get-unread-count.e2e.ts index c0c464a0457..bc7512da204 100644 --- a/apps/api/src/app/widgets/e2e/get-unread-count.e2e.ts +++ b/apps/api/src/app/widgets/e2e/get-unread-count.e2e.ts @@ -56,7 +56,7 @@ describe('Unread Count - GET /widget/notifications/unread', function () { expect(messages[0].read).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { read: true } }, { headers: { @@ -85,7 +85,7 @@ describe('Unread Count - GET /widget/notifications/unread', function () { expect(messages[0].read).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { read: true } }, { headers: { @@ -114,7 +114,7 @@ describe('Unread Count - GET /widget/notifications/unread', function () { expect(messages[0].read).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { read: true } }, { headers: { @@ -128,7 +128,7 @@ describe('Unread Count - GET /widget/notifications/unread', function () { }); async function getUnreadCount(query = {}) { - const response = await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/notifications/unread`, { + const response = await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/notifications/unread`, { params: { ...query, }, diff --git a/apps/api/src/app/widgets/e2e/get-unseen-count.e2e.ts b/apps/api/src/app/widgets/e2e/get-unseen-count.e2e.ts index d1a7c6aa39a..3190446a59e 100644 --- a/apps/api/src/app/widgets/e2e/get-unseen-count.e2e.ts +++ b/apps/api/src/app/widgets/e2e/get-unseen-count.e2e.ts @@ -75,7 +75,7 @@ describe('Unseen Count - GET /widget/notifications/unseen', function () { expect(messages[0].seen).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { @@ -104,7 +104,7 @@ describe('Unseen Count - GET /widget/notifications/unseen', function () { expect(messages[0].seen).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { @@ -133,7 +133,7 @@ describe('Unseen Count - GET /widget/notifications/unseen', function () { expect(messages[0].seen).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { @@ -178,7 +178,7 @@ describe('Unseen Count - GET /widget/notifications/unseen', function () { }); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { @@ -192,7 +192,7 @@ describe('Unseen Count - GET /widget/notifications/unseen', function () { }); async function getUnseenCount(query = {}) { - const response = await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/notifications/unseen`, { + const response = await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/notifications/unseen`, { params: { ...query, }, diff --git a/apps/api/src/app/widgets/e2e/mark-all-as-read.e2e.ts b/apps/api/src/app/widgets/e2e/mark-all-as-read.e2e.ts index 838777e511d..935ba5a993b 100644 --- a/apps/api/src/app/widgets/e2e/mark-all-as-read.e2e.ts +++ b/apps/api/src/app/widgets/e2e/mark-all-as-read.e2e.ts @@ -51,7 +51,7 @@ describe('Mark all as read - /widgets/messages/seen (POST)', function () { expect(unseenMessagesBefore.data.count).to.equal(3); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/seen`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/seen`, {}, { headers: { @@ -76,7 +76,7 @@ describe('Mark all as read - /widgets/messages/seen (POST)', function () { expect(unseenMessagesBefore.data.count).to.equal(3); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/read`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/read`, {}, { headers: { @@ -91,7 +91,7 @@ describe('Mark all as read - /widgets/messages/seen (POST)', function () { }); async function getFeedCount(query = {}) { - const response = await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/notifications/unseen`, { + const response = await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/notifications/unseen`, { params: { ...query, }, @@ -104,7 +104,7 @@ describe('Mark all as read - /widgets/messages/seen (POST)', function () { } async function getNotificationCount(query: string) { - const response = await axios.get(`http://localhost:${process.env.PORT}/v1/widgets/notifications/count?${query}`, { + const response = await axios.get(`http://127.0.0.1:${process.env.PORT}/v1/widgets/notifications/count?${query}`, { headers: { Authorization: `Bearer ${subscriberToken}`, }, diff --git a/apps/api/src/app/widgets/e2e/mark-as-seen.e2e.ts b/apps/api/src/app/widgets/e2e/mark-as-seen.e2e.ts index acf61255e02..c006c7f73c7 100644 --- a/apps/api/src/app/widgets/e2e/mark-as-seen.e2e.ts +++ b/apps/api/src/app/widgets/e2e/mark-as-seen.e2e.ts @@ -43,7 +43,7 @@ describe('Mark as Seen - /widgets/messages/:messageId/seen (POST)', async () => expect(messages[0].seen).to.equal(false); await axios.post( - `http://localhost:${process.env.PORT}/v1/widgets/messages/markAs`, + `http://127.0.0.1:${process.env.PORT}/v1/widgets/messages/markAs`, { messageId, mark: { seen: true } }, { headers: { diff --git a/apps/api/src/app/widgets/e2e/remove-all-messages.e2e.ts b/apps/api/src/app/widgets/e2e/remove-all-messages.e2e.ts index 7c5bc3cd33b..3c984801c5b 100644 --- a/apps/api/src/app/widgets/e2e/remove-all-messages.e2e.ts +++ b/apps/api/src/app/widgets/e2e/remove-all-messages.e2e.ts @@ -54,7 +54,7 @@ describe('Remove all messages - /widgets/messages (DELETE)', function () { }); expect(messagesBefore.length).to.equal(3); - await axios.delete(`http://localhost:${process.env.PORT}/v1/widgets/messages`, { + await axios.delete(`http://127.0.0.1:${process.env.PORT}/v1/widgets/messages`, { headers: { Authorization: `Bearer ${subscriberToken}`, }, @@ -91,7 +91,7 @@ describe('Remove all messages - /widgets/messages (DELETE)', function () { expect(messagesBefore.length).to.equal(5); - await axios.delete(`http://localhost:${process.env.PORT}/v1/widgets/messages?feedId=${_feedId}`, { + await axios.delete(`http://127.0.0.1:${process.env.PORT}/v1/widgets/messages?feedId=${_feedId}`, { headers: { Authorization: `Bearer ${subscriberToken}`, }, diff --git a/apps/api/src/app/widgets/e2e/update-subscriber-preference.e2e.ts b/apps/api/src/app/widgets/e2e/update-subscriber-preference.e2e.ts index a798cc37714..4890cdfb94f 100644 --- a/apps/api/src/app/widgets/e2e/update-subscriber-preference.e2e.ts +++ b/apps/api/src/app/widgets/e2e/update-subscriber-preference.e2e.ts @@ -115,7 +115,7 @@ export async function updateSubscriberPreference( subscriberToken: string, templateId: string ) { - return await axios.patch(`http://localhost:${process.env.PORT}/v1/widgets/preferences/${templateId}`, data, { + return await axios.patch(`http://127.0.0.1:${process.env.PORT}/v1/widgets/preferences/${templateId}`, data, { headers: { Authorization: `Bearer ${subscriberToken}`, }, diff --git a/apps/web/README.md b/apps/web/README.md index 2a86d53b46f..27499c1c736 100644 --- a/apps/web/README.md +++ b/apps/web/README.md @@ -9,7 +9,7 @@ In the project directory, you can run: ### `yarn start` Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in the browser. +Open [http://127.0.0.1:3000](http://127.0.0.1:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. diff --git a/apps/web/cypress/plugins/index.ts b/apps/web/cypress/plugins/index.ts index 168fa8d6eb5..16cbbed4ac4 100644 --- a/apps/web/cypress/plugins/index.ts +++ b/apps/web/cypress/plugins/index.ts @@ -60,13 +60,13 @@ module.exports = (on, config) => { }, async clearDatabase() { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); await dal.destroy(); return true; }, async seedDatabase() { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const userService = new UserService(); await userService.createCypressTestUser(); @@ -75,7 +75,7 @@ module.exports = (on, config) => { }, async passwordResetToken(id: string) { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const userService = new UserService(); const user = await userService.getUser(id); @@ -84,7 +84,7 @@ module.exports = (on, config) => { }, async addOrganization(userId: string) { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const organizationService = new OrganizationService(); const organization = await organizationService.createOrganization(); @@ -99,7 +99,7 @@ module.exports = (on, config) => { organizationId: string; }) { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const repository = new IntegrationRepository(); @@ -119,9 +119,9 @@ module.exports = (on, config) => { } = {} ) { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); - const session = new UserSession('http://localhost:1336'); + const session = new UserSession('http://127.0.0.1:1336'); await session.initialize({ noEnvironment: settings?.noEnvironment, showOnBoardingTour: settings?.showOnBoardingTour, @@ -160,7 +160,7 @@ module.exports = (on, config) => { }, async makeBlueprints() { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const userService = new UserService(); const user = await userService.createUser(); diff --git a/apps/web/cypress/support/commands.ts b/apps/web/cypress/support/commands.ts index a476d5db895..3324b4443c8 100644 --- a/apps/web/cypress/support/commands.ts +++ b/apps/web/cypress/support/commands.ts @@ -13,8 +13,8 @@ Cypress.Commands.add('getBySelectorLike', (selector, ...args) => { }); Cypress.Commands.add('waitLoadEnv', (beforeWait: () => void): void => { - cy.intercept('GET', 'http://localhost:1336/v1/environments').as('environments'); - cy.intercept('GET', 'http://localhost:1336/v1/environments/me').as('environments-me'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/environments').as('environments'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/environments/me').as('environments-me'); beforeWait && beforeWait(); @@ -22,12 +22,12 @@ Cypress.Commands.add('waitLoadEnv', (beforeWait: () => void): void => { }); Cypress.Commands.add('waitLoadTemplatePage', (beforeWait: () => void): void => { - cy.intercept('GET', 'http://localhost:1336/v1/environments').as('environments'); - cy.intercept('GET', 'http://localhost:1336/v1/environments/me').as('environments-me'); - cy.intercept('GET', 'http://localhost:1336/v1/notification-groups').as('notification-groups'); - cy.intercept('GET', 'http://localhost:1336/v1/changes/count').as('changes-count'); - cy.intercept('GET', 'http://localhost:1336/v1/integrations/active').as('active-integrations'); - cy.intercept('GET', 'http://localhost:1336/v1/users/me').as('me'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/environments').as('environments'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/environments/me').as('environments-me'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/notification-groups').as('notification-groups'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/changes/count').as('changes-count'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/integrations/active').as('active-integrations'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/users/me').as('me'); beforeWait && beforeWait(); diff --git a/apps/web/cypress/tests/notification-editor/debugging-test-trigger.spec.ts b/apps/web/cypress/tests/notification-editor/debugging-test-trigger.spec.ts index d7ac81d3e19..b48edb71363 100644 --- a/apps/web/cypress/tests/notification-editor/debugging-test-trigger.spec.ts +++ b/apps/web/cypress/tests/notification-editor/debugging-test-trigger.spec.ts @@ -7,7 +7,7 @@ describe('Debugging - test trigger', function () { const template = this.session.templates[0]; const userId = this.session.user.id; - cy.intercept('GET', 'http://localhost:1336/v1/notification-templates/*').as('notification-templates'); + cy.intercept('GET', 'http://127.0.0.1:1336/v1/notification-templates/*').as('notification-templates'); cy.waitLoadTemplatePage(() => { cy.visit('/workflows/edit/' + template._id); diff --git a/apps/web/package.json b/apps/web/package.json index 55ebb1cc392..b369b50a832 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -10,7 +10,7 @@ "docker:build": "docker buildx build -f ./Dockerfile -t novu-web ./../..", "envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js", "envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js", - "start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://localhost:4200?", + "start:static:build": "pnpm envsetup:docker && http-server build -p 4200 --proxy http://127.0.0.1:4200?", "start:docker": "pnpm build && pnpm start:static:build", "start:dev": "pnpm start", "cypress:run": "cross-env NODE_ENV=test cypress run", diff --git a/apps/web/src/config/index.ts b/apps/web/src/config/index.ts index 7fc49a1cc54..416a1adb6af 100644 --- a/apps/web/src/config/index.ts +++ b/apps/web/src/config/index.ts @@ -12,12 +12,12 @@ const isCypress = (isBrowser() && (window as any).Cypress) || (isBrowser() && (w export const API_ROOT = window._env_.REACT_APP_API_URL || isCypress - ? window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://localhost:1336' - : window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://localhost:3000'; + ? window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://127.0.0.1:1336' + : window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://127.0.0.1:3000'; export const WS_URL = isCypress - ? window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://localhost:1340' - : window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://localhost:3002'; + ? window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://127.0.0.1:1340' + : window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://127.0.0.1:3002'; export const SENTRY_DSN = window._env_.REACT_APP_SENTRY_DSN || process.env.REACT_APP_SENTRY_DSN; @@ -27,7 +27,7 @@ const blueprintApiUrlByEnv = ENV === 'production' || ENV === 'prod' ? 'https://a export const BLUEPRINTS_API_URL = window._env_.REACT_APP_BLUEPRINTS_API_URL || isCypress - ? window._env_.REACT_APP_BLUEPRINTS_API_URL || process.env.REACT_APP_BLUEPRINTS_API_URL || 'http://localhost:1336' + ? window._env_.REACT_APP_BLUEPRINTS_API_URL || process.env.REACT_APP_BLUEPRINTS_API_URL || 'http://127.0.0.1:1336' : blueprintApiUrlByEnv; export const APP_ID = window._env_.REACT_APP_NOVU_APP_ID || process.env.REACT_APP_NOVU_APP_ID; @@ -35,7 +35,7 @@ export const APP_ID = window._env_.REACT_APP_NOVU_APP_ID || process.env.REACT_AP export const WIDGET_EMBED_PATH = window._env_.REACT_APP_WIDGET_EMBED_PATH || process.env.REACT_APP_WIDGET_EMBED_PATH || - 'http://localhost:4701/embed.umd.min.js'; + 'http://127.0.0.1:4701/embed.umd.min.js'; export const IS_DOCKER_HOSTED = window._env_.REACT_APP_DOCKER_HOSTED_ENV === 'true' || process.env.REACT_APP_DOCKER_HOSTED_ENV === 'true'; @@ -49,8 +49,8 @@ export const CONTEXT_PATH = getContextPath(NovuComponentEnum.WEB); export const LOGROCKET_ID = (window._env_.REACT_APP_LOGROCKET_ID || process.env.REACT_APP_LOGROCKET_ID) ?? ''; export const WEBHOOK_URL = isCypress - ? window._env_.REACT_APP_WEBHOOK_URL || process.env.REACT_APP_WEBHOOK_URL || 'http://localhost:1341' - : window._env_.REACT_APP_WEBHOOK_URL || process.env.REACT_APP_WEBHOOK_URL || 'http://localhost:3003'; + ? window._env_.REACT_APP_WEBHOOK_URL || process.env.REACT_APP_WEBHOOK_URL || 'http://127.0.0.1:1341' + : window._env_.REACT_APP_WEBHOOK_URL || process.env.REACT_APP_WEBHOOK_URL || 'http://127.0.0.1:3003'; export const MAIL_SERVER_DOMAIN = window._env_.REACT_APP_MAIL_SERVER_DOMAIN || process.env.REACT_APP_MAIL_SERVER_DOMAIN || 'dev.inbound-mail.novu.co'; diff --git a/apps/web/src/pages/quick-start/components/SetupTimeline.tsx b/apps/web/src/pages/quick-start/components/SetupTimeline.tsx index 8516295f9f9..3f7019bf6d5 100644 --- a/apps/web/src/pages/quick-start/components/SetupTimeline.tsx +++ b/apps/web/src/pages/quick-start/components/SetupTimeline.tsx @@ -87,7 +87,7 @@ export const SetupTimeline = ({ - If your browser did not automatically open, go to localhost at http://localhost:3000 + If your browser did not automatically open, go to localhost at http://127.0.0.1:3000 diff --git a/apps/webhook/src/.env.development b/apps/webhook/src/.env.development index a0ec01d78b3..4414fed41d9 100644 --- a/apps/webhook/src/.env.development +++ b/apps/webhook/src/.env.development @@ -1,6 +1,6 @@ NODE_ENV=dev PORT=3003 -MONGO_URL=mongodb://localhost:27017/novu-db +MONGO_URL=mongodb://127.0.0.1:27017/novu-db NEW_RELIC_ENABLED=true NEW_RELIC_APP_NAME="[DEV] - WEBHOOK" diff --git a/apps/webhook/src/.env.test b/apps/webhook/src/.env.test index 26226c931ec..8331ce6467d 100644 --- a/apps/webhook/src/.env.test +++ b/apps/webhook/src/.env.test @@ -1,4 +1,4 @@ -MONGO_URL=mongodb://localhost:27017/novu-test +MONGO_URL=mongodb://127.0.0.1:27017/novu-test PORT=1341 NODE_ENV=test diff --git a/apps/webhook/src/.example.env b/apps/webhook/src/.example.env index 2f2af83b8b1..524561b87af 100644 --- a/apps/webhook/src/.example.env +++ b/apps/webhook/src/.example.env @@ -1,6 +1,6 @@ NODE_ENV=local PORT=3003 -MONGO_URL=mongodb://localhost:27017/novu-db +MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 LOGGING_LEVEL=info diff --git a/apps/webhook/src/webhooks/e2e/email-webhook.e2e.ts b/apps/webhook/src/webhooks/e2e/email-webhook.e2e.ts index 433e7858008..ebd9767aedc 100644 --- a/apps/webhook/src/webhooks/e2e/email-webhook.e2e.ts +++ b/apps/webhook/src/webhooks/e2e/email-webhook.e2e.ts @@ -7,7 +7,7 @@ import axios from 'axios'; const axiosInstance = axios.create(); const callSendgridWebhook = async (environmentId, organizationId, webhookBody) => { - const serverUrl = `http://localhost:${process.env.PORT}`; + const serverUrl = `http://127.0.0.1:${process.env.PORT}`; const { data } = await axiosInstance.post( `${serverUrl}/webhooks/organizations/${organizationId}/environments/${environmentId}/email/sendgrid`, diff --git a/apps/widget/.env b/apps/widget/.env index 3309aba99e0..978677690ac 100644 --- a/apps/widget/.env +++ b/apps/widget/.env @@ -1,6 +1,6 @@ SKIP_PREFLIGHT_CHECK=true -REACT_APP_API_URL=http://localhost:3000 -REACT_APP_WS_URL=http://localhost:3002 +REACT_APP_API_URL=http://127.0.0.1:3000 +REACT_APP_WS_URL=http://127.0.0.1:3002 GLOBAL_CONTEXT_PATH= WIDGET_CONTEXT_PATH= diff --git a/apps/widget/cypress.config.ts b/apps/widget/cypress.config.ts index 065a21cc23f..089cb9d1f74 100644 --- a/apps/widget/cypress.config.ts +++ b/apps/widget/cypress.config.ts @@ -6,7 +6,7 @@ export default defineConfig({ projectId: 'kedzap', env: { NODE_ENV: 'test', - API_URL: 'http://localhost:1336', + API_URL: 'http://127.0.0.1:1336', }, e2e: { /* @@ -17,7 +17,7 @@ export default defineConfig({ // eslint-disable-next-line import/extensions return require('./cypress/plugins/index.ts')(on, config); }, - baseUrl: 'http://localhost:3500', + baseUrl: 'http://127.0.0.1:3500', specPattern: 'cypress/e2e/**/*.{js,jsx,ts,tsx}', }, }); diff --git a/apps/widget/cypress/e2e/initialization.spec.ts b/apps/widget/cypress/e2e/initialization.spec.ts index b5eaed19152..925f5de14a7 100644 --- a/apps/widget/cypress/e2e/initialization.spec.ts +++ b/apps/widget/cypress/e2e/initialization.spec.ts @@ -33,8 +33,8 @@ describe('Initialization with enabled HMAC encryption in shell', function () { .as('session') .then((session: any) => { cy.wait(500); - Cypress.config('baseUrl', 'http://localhost:3500'); - const WidgetURL = `http://localhost:3500/${session.environment.identifier}`; + Cypress.config('baseUrl', 'http://127.0.0.1:3500'); + const WidgetURL = `http://127.0.0.1:3500/${session.environment.identifier}`; return cy.forceVisit(WidgetURL); }); cy.wait('@sessionInitialize', { diff --git a/apps/widget/cypress/plugins/index.ts b/apps/widget/cypress/plugins/index.ts index 9f2576bc22f..2c2f930e0dc 100644 --- a/apps/widget/cypress/plugins/index.ts +++ b/apps/widget/cypress/plugins/index.ts @@ -55,14 +55,14 @@ module.exports = (on, config) => { async clearDatabase() { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); await dal.destroy(); return true; }, async seedDatabase() { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const session = new UserSession(config.env.API_URL); @@ -71,7 +71,7 @@ module.exports = (on, config) => { async getSession({ settings, templateOverride }) { const dal = new DalService(); - await dal.connect('mongodb://localhost:27017/novu-test'); + await dal.connect('mongodb://127.0.0.1:27017/novu-test'); const session = new UserSession(config.env.API_URL); await session.initialize({ diff --git a/apps/widget/cypress/support/commands.ts b/apps/widget/cypress/support/commands.ts index 708c2823125..f215a68e141 100644 --- a/apps/widget/cypress/support/commands.ts +++ b/apps/widget/cypress/support/commands.ts @@ -17,7 +17,7 @@ Cypress.Commands.add('openWidget', (settings = {}) => { Cypress.Commands.add( 'initializeShellSession', ({ subscriberId, identifier, encryptedHmacHash, tabs, stores }: IInitializeShellSessionSettings) => { - cy.visit('http://localhost:4700/cypress/test-shell', { log: false }); + cy.visit('http://127.0.0.1:4700/cypress/test-shell', { log: false }); return cy .window() diff --git a/apps/widget/cypress/test-shell/index.html b/apps/widget/cypress/test-shell/index.html index 80dae4631b5..f21a0ca1126 100644 --- a/apps/widget/cypress/test-shell/index.html +++ b/apps/widget/cypress/test-shell/index.html @@ -209,7 +209,7 @@

elt.src = t; var before = o.getElementsByTagName(f)[0]; before.parentNode.insertBefore(elt, before); - })(window, document, "http://localhost:4702/embed.umd.min.js", "novu", "script"); + })(window, document, "http://127.0.0.1:4702/embed.umd.min.js", "novu", "script"); diff --git a/apps/widget/index.html b/apps/widget/index.html index 7a99c2119d6..7a617d81528 100644 --- a/apps/widget/index.html +++ b/apps/widget/index.html @@ -287,7 +287,7 @@

Dashboard

elt.src = t; var before = o.getElementsByTagName(f)[0]; before.parentNode.insertBefore(elt, before); - })(window, document, 'http://localhost:4702/embed.umd.min.js', 'novu', 'script'); + })(window, document, 'http://127.0.0.1:4702/embed.umd.min.js', 'novu', 'script'); novu.init( '', diff --git a/apps/widget/package.json b/apps/widget/package.json index 2c44a8bf060..37a0fc49696 100644 --- a/apps/widget/package.json +++ b/apps/widget/package.json @@ -6,10 +6,10 @@ "start": "react-app-rewired start", "start:dev": "cross-env PORT=4500 pnpm start", "start:cli:local": "pnpm start:shell:test & pnpm start:shell:embed & cross-env PORT=3500 pnpm start", - "start:test": "pnpm start:shell:test & pnpm start:shell:embed & cross-env NODE_ENV=test REACT_APP_API_URL=http://localhost:1336 REACT_APP_WS_URL=http://localhost:1340 PORT=3500 pnpm start", + "start:test": "pnpm start:shell:test & pnpm start:shell:embed & cross-env NODE_ENV=test REACT_APP_API_URL=http://127.0.0.1:1336 REACT_APP_WS_URL=http://127.0.0.1:1340 PORT=3500 pnpm start", "envsetup": "chmod +x ./env.sh && ./env.sh && mv env-config.js ./public/env-config.js", "envsetup:docker": "chmod +x ./env.sh && ./env.sh && mv ./env-config.js ./build/env-config.js", - "start:static:build": "pnpm envsetup:docker && http-server build -p 4500 --proxy http://localhost:4500?", + "start:static:build": "pnpm envsetup:docker && http-server build -p 4500 --proxy http://127.0.0.1:4500?", "start:docker": "pnpm build && pnpm start:static:build", "docker:build": "docker build -f ./Dockerfile -t novu-widget ./../..", "prebuild": "rimraf build", diff --git a/apps/widget/src/config/index.ts b/apps/widget/src/config/index.ts index a276a19c7d5..e15bfd6c4cc 100644 --- a/apps/widget/src/config/index.ts +++ b/apps/widget/src/config/index.ts @@ -3,11 +3,11 @@ import { getContextPath, NovuComponentEnum } from '@novu/shared'; export const API_URL = isBrowser() && (window as any).Cypress - ? window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://localhost:1336' - : window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://localhost:3000'; + ? window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://127.0.0.1:1336' + : window._env_.REACT_APP_API_URL || process.env.REACT_APP_API_URL || 'http://127.0.0.1:3000'; export const WS_URL = isBrowser() && (window as any).Cypress - ? window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://localhost:1340' - : window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://localhost:3002'; + ? window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://127.0.0.1:1340' + : window._env_.REACT_APP_WS_URL || process.env.REACT_APP_WS_URL || 'http://127.0.0.1:3002'; export const CONTEXT_PATH = getContextPath(NovuComponentEnum.WIDGET); diff --git a/apps/worker/src/.env.development b/apps/worker/src/.env.development index 84ef802331a..c5e511d06cf 100644 --- a/apps/worker/src/.env.development +++ b/apps/worker/src/.env.development @@ -47,7 +47,7 @@ REDIS_CLUSTER_KEY_PREFIX= # MONGO_URL= # Storage -# S3_LOCAL_STACK=http://localhost:4566 +# S3_LOCAL_STACK=http://127.0.0.1:4566 # S3_BUCKET_NAME=novu-local # S3_REGION=us-east-1 # GCS_BUCKET_NAME=novu-local diff --git a/apps/worker/src/.env.production b/apps/worker/src/.env.production index 391b9be2e6c..0f303d215f2 100644 --- a/apps/worker/src/.env.production +++ b/apps/worker/src/.env.production @@ -50,7 +50,7 @@ REDIS_CLUSTER_KEY_PREFIX= MONGO_MIN_POOL_SIZE=50 # Storage -# S3_LOCAL_STACK=http://localhost:4566 +# S3_LOCAL_STACK=http://127.0.0.1:4566 # S3_BUCKET_NAME=novu-local # S3_REGION=us-east-1 # GCS_BUCKET_NAME=novu-local diff --git a/apps/worker/src/.env.test b/apps/worker/src/.env.test index a8b0c8ee1ac..8375edc7171 100644 --- a/apps/worker/src/.env.test +++ b/apps/worker/src/.env.test @@ -47,10 +47,10 @@ REDIS_CLUSTER_FAMILY= REDIS_CLUSTER_KEY_PREFIX= # MongoDB -MONGO_URL=mongodb://localhost:27017/novu-test +MONGO_URL=mongodb://127.0.0.1:27017/novu-test # Storage -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-test S3_REGION=us-east-1 # GCS_BUCKET_NAME=novu-test diff --git a/apps/worker/src/.example.env b/apps/worker/src/.example.env index 3bae76e85a2..ee875c6287b 100644 --- a/apps/worker/src/.example.env +++ b/apps/worker/src/.example.env @@ -45,11 +45,11 @@ IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false # REDIS_CLUSTER_KEY_PREFIX= # MongoDB -MONGO_URL=mongodb://localhost:27017/novu-db +MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 # Storage -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-local S3_REGION=us-east-1 # GCS_BUCKET_NAME=novu-local diff --git a/apps/worker/src/app/health/e2e/health-check.e2e.ts b/apps/worker/src/app/health/e2e/health-check.e2e.ts index 55fa750b699..40c82de2688 100644 --- a/apps/worker/src/app/health/e2e/health-check.e2e.ts +++ b/apps/worker/src/app/health/e2e/health-check.e2e.ts @@ -10,7 +10,7 @@ describe('Health-check', () => { const inMemoryProviderService = new InMemoryProviderService(InMemoryProviderEnum.REDIS); await inMemoryProviderService.delayUntilReadiness(); - testAgent = defaults(request(`http://localhost:${process.env.PORT}`)); + testAgent = defaults(request(`http://127.0.0.1:${process.env.PORT}`)); }); describe('/health-check (GET)', () => { diff --git a/apps/ws/src/.env.development b/apps/ws/src/.env.development index 8eac9074863..624c6461925 100644 --- a/apps/ws/src/.env.development +++ b/apps/ws/src/.env.development @@ -1,6 +1,6 @@ NODE_ENV=dev PORT=3002 -MONGO_URL=mongodb://localhost:27017/novu-db +MONGO_URL=mongodb://127.0.0.1:27017/novu-db REDIS_PORT=6379 REDIS_HOST=localhost REDIS_PREFIX= diff --git a/apps/ws/src/.env.test b/apps/ws/src/.env.test index 35a085e1704..9053eb070b6 100644 --- a/apps/ws/src/.env.test +++ b/apps/ws/src/.env.test @@ -1,4 +1,4 @@ -MONGO_URL=mongodb://localhost:27017/novu-test +MONGO_URL=mongodb://127.0.0.1:27017/novu-test REDIS_PORT=6379 REDIS_HOST=localhost REDIS_DB_INDEX=1 diff --git a/apps/ws/src/.example.env b/apps/ws/src/.example.env index abc79a5e674..32af0977591 100644 --- a/apps/ws/src/.example.env +++ b/apps/ws/src/.example.env @@ -1,6 +1,6 @@ NODE_ENV=local PORT=3002 -MONGO_URL=mongodb://localhost:27017/novu-db +MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 REDIS_HOST=localhost diff --git a/docker/.env.example b/docker/.env.example index c22de1aea1f..1bf5d02a39f 100644 --- a/docker/.env.example +++ b/docker/.env.example @@ -12,7 +12,7 @@ REDIS_PASSWORD= REDIS_CACHE_SERVICE_HOST= # AWS -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-local S3_REGION=us-east-1 AWS_ACCESS_KEY_ID=test @@ -25,16 +25,16 @@ REDIS_CACHE_SERVICE_PORT=6379 WS_PORT=3002 # Root URL -REACT_APP_WS_URL=http://localhost:3002 +REACT_APP_WS_URL=http://127.0.0.1:3002 # Uncomment this one when deploying Novu in the local environment -# as Web app local Dockerfile will have to load this to be used. +# as Web app local Dockerfile will have to load this to be used. # Deployment version doesn't need as we inject it with API_ROOT_URL value. -# REACT_APP_API_URL=http://localhost:3000 -API_ROOT_URL=http://localhost:3000 +# REACT_APP_API_URL=http://127.0.0.1:3000 +API_ROOT_URL=http://127.0.0.1:3000 DISABLE_USER_REGISTRATION=false FRONT_BASE_URL=http://client:4200 -WIDGET_EMBED_PATH=http://localhost:4701/embed.umd.min.js -WIDGET_URL=http://localhost:4500 +WIDGET_EMBED_PATH=http://127.0.0.1:4701/embed.umd.min.js +WIDGET_URL=http://127.0.0.1:4500 # Context Paths # Only needed for setups with reverse-proxies diff --git a/docker/Readme.md b/docker/Readme.md index 91bdc55bc5f..edffe85eeb3 100644 --- a/docker/Readme.md +++ b/docker/Readme.md @@ -29,7 +29,7 @@ cp .env.example ./local/deployment/.env docker-compose -f ./local/deployment/docker-compose.yml up ``` -Now visit [http://localhost:4200](http://localhost:4200) to start using Novu. +Now visit [http://127.0.0.1:4200](http://127.0.0.1:4200) to start using Novu. ### Securing your setup diff --git a/docker/kubernetes/helm/templates/localstack-secrets.yaml b/docker/kubernetes/helm/templates/localstack-secrets.yaml index e6058adba0a..0194a33bbe6 100644 --- a/docker/kubernetes/helm/templates/localstack-secrets.yaml +++ b/docker/kubernetes/helm/templates/localstack-secrets.yaml @@ -14,7 +14,7 @@ metadata: {{- end }} type: Opaque data: - endpoint: {{ "http://localhost:4566" | b64enc | quote }} + endpoint: {{ "http://127.0.0.1:4566" | b64enc | quote }} bucketName: {{ "novu-local" | b64enc | quote }} region: {{ "us-east-1" | b64enc | quote }} accessKey: {{ "test" | b64enc | quote }} diff --git a/docker/kubernetes/helm/values.yaml b/docker/kubernetes/helm/values.yaml index 409e3db8983..89e853b889d 100644 --- a/docker/kubernetes/helm/values.yaml +++ b/docker/kubernetes/helm/values.yaml @@ -1565,10 +1565,10 @@ web: ## @param web.apiExternalEndpoint The external endpoint of the API ## - apiExternalEndpoint: http://localhost:3000 + apiExternalEndpoint: http://127.0.0.1:3000 ## @param web.wsExternalEndpoint The external websocket endpoint of the API - wsExternalEndpoint: ws://localhost:3002 + wsExternalEndpoint: ws://127.0.0.1:3002 ## @section Persistence Parameters ## diff --git a/docker/kubernetes/kustomize/env-dev b/docker/kubernetes/kustomize/env-dev index f6153b84c66..6cb3d452b0b 100644 --- a/docker/kubernetes/kustomize/env-dev +++ b/docker/kubernetes/kustomize/env-dev @@ -13,7 +13,7 @@ REDIS_CACHE_SERVICE_HOST=novu-redis-dev REDIS_CACHE_SERVICE_PORT=6379 # AWS -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-local S3_REGION=us-east-1 AWS_ACCESS_KEY_ID=test @@ -25,13 +25,13 @@ REDIS_PORT=6379 WS_PORT=3002 # Root URL -REACT_APP_API_URL=http://localhost:3000 -REACT_APP_WS_URL=http://localhost:3002 -API_ROOT_URL=http://localhost:3000 +REACT_APP_API_URL=http://127.0.0.1:3000 +REACT_APP_WS_URL=http://127.0.0.1:3002 +API_ROOT_URL=http://127.0.0.1:3000 DISABLE_USER_REGISTRATION=false FRONT_BASE_URL=http://client:4200 -WIDGET_EMBED_PATH=http://localhost:4701/embed.umd.min.js -WIDGET_URL=http://localhost:4500 +WIDGET_EMBED_PATH=http://127.0.0.1:4701/embed.umd.min.js +WIDGET_URL=http://127.0.0.1:4500 # Context Paths # Only needed for setups with reverse-proxies diff --git a/docker/local/development/docker-compose.redis-cluster.yml b/docker/local/development/docker-compose.redis-cluster.yml index 0b7c6e6d4f8..72559636ac7 100644 --- a/docker/local/development/docker-compose.redis-cluster.yml +++ b/docker/local/development/docker-compose.redis-cluster.yml @@ -13,7 +13,7 @@ services: - "${TMPDIR:-/tmp/localstack}:/tmp/localstack" - "/var/run/docker.sock:/var/run/docker.sock" healthcheck: - test: "bash -c 'AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test aws --endpoint-url=http://localhost:4566 s3 ls'" + test: "bash -c 'AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test aws --endpoint-url=http://127.0.0.1:4566 s3 ls'" retries: 5 interval: 10s mongo: @@ -25,7 +25,7 @@ services: volumes: - "${TMPDIR:-/tmp/mongo}:/db/data" healthcheck: - test: "bash -c 'mongo --host localhost:27017 --eval \"printjson(rs.status())\"'" + test: "bash -c 'mongo --host 127.0.0.1:27017 --eval \"printjson(rs.status())\"'" retries: 5 interval: 10s diff --git a/docker/local/development/docker-compose.yml b/docker/local/development/docker-compose.yml index 6a3b35e5b57..7b455a81961 100644 --- a/docker/local/development/docker-compose.yml +++ b/docker/local/development/docker-compose.yml @@ -13,7 +13,7 @@ services: - "${TMPDIR:-/tmp/localstack}:/tmp/localstack" - "/var/run/docker.sock:/var/run/docker.sock" healthcheck: - test: "bash -c 'AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test aws --endpoint-url=http://localhost:4566 s3 ls'" + test: "bash -c 'AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test aws --endpoint-url=http://127.0.0.1:4566 s3 ls'" retries: 5 interval: 10s mongo: @@ -25,7 +25,7 @@ services: volumes: - "${TMPDIR:-/tmp/mongo}:/db/data" healthcheck: - test: "bash -c 'mongo --host localhost:27017 --eval \"printjson(rs.status())\"'" + test: "bash -c 'mongo --host 127.0.0.1:27017 --eval \"printjson(rs.status())\"'" retries: 5 interval: 10s redis: diff --git a/docker/local/docker-compose.localstack.yml b/docker/local/docker-compose.localstack.yml index 45c71dfcbe7..2ccb6fa485f 100644 --- a/docker/local/docker-compose.localstack.yml +++ b/docker/local/docker-compose.localstack.yml @@ -13,6 +13,6 @@ services: - "${TMPDIR:-/tmp/localstack}:/tmp/localstack" - "/var/run/docker.sock:/var/run/docker.sock" healthcheck: - test: "bash -c 'AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test aws --endpoint-url=http://localhost:4566 s3 ls'" + test: "bash -c 'AWS_ACCESS_KEY_ID=test AWS_SECRET_ACCESS_KEY=test aws --endpoint-url=http://127.0.0.1:4566 s3 ls'" retries: 15 interval: 10s diff --git a/libs/embed/src/shared/resources.js b/libs/embed/src/shared/resources.js index 752fc3a301a..e8f7ada0139 100644 --- a/libs/embed/src/shared/resources.js +++ b/libs/embed/src/shared/resources.js @@ -11,14 +11,14 @@ if (process.env.ENVIRONMENT === 'production') { ResourcesConstants = { API_URL: '', IFRAME_URL: process.env.WIDGET_URL || 'https://dev.widget.novu.co', - WWW_URL: process.env.WIDGET_URL || 'http://localhost:3500', + WWW_URL: process.env.WIDGET_URL || 'http://127.0.0.1:3500', SENTRY_DSN: '', }; } else { ResourcesConstants = { API_URL: '', - IFRAME_URL: process.env.WIDGET_URL || 'http://localhost:3500', - WWW_URL: process.env.WIDGET_URL || 'http://localhost:3500', + IFRAME_URL: process.env.WIDGET_URL || 'http://127.0.0.1:3500', + WWW_URL: process.env.WIDGET_URL || 'http://127.0.0.1:3500', SENTRY_DSN: '', }; } diff --git a/libs/testing/src/notifications.service.ts b/libs/testing/src/notifications.service.ts index 18537532623..9da91a68682 100644 --- a/libs/testing/src/notifications.service.ts +++ b/libs/testing/src/notifications.service.ts @@ -9,7 +9,7 @@ export class NotificationsService { async triggerEvent(name: string, subscriberId: string, payload = {}) { await axios.post( - 'http://localhost:1336/v1/events/trigger', + 'http://127.0.0.1:1336/v1/events/trigger', { name, to: subscriberId, diff --git a/libs/testing/src/user.session.ts b/libs/testing/src/user.session.ts index d99f4eabedb..702a868b9b2 100644 --- a/libs/testing/src/user.session.ts +++ b/libs/testing/src/user.session.ts @@ -69,7 +69,7 @@ export class UserSession { apiKey: string; - constructor(public serverUrl = `http://localhost:${process.env.PORT}`) { + constructor(public serverUrl = `http://127.0.0.1:${process.env.PORT}`) { this.jobsService = new JobsService(); } diff --git a/packages/application-generic/src/.env.test b/packages/application-generic/src/.env.test index 03f5fd1f712..6a267ff4825 100644 --- a/packages/application-generic/src/.env.test +++ b/packages/application-generic/src/.env.test @@ -1,12 +1,12 @@ GOOGLE_OAUTH_CLIENT_ID=11 GOOGLE_OAUTH_CLIENT_SECRET=11 -GOOGLE_OAUTH_REDIRECT=http://localhost:3000/v1/auth/google/callback +GOOGLE_OAUTH_REDIRECT=http://127.0.0.1:3000/v1/auth/google/callback STORE_ENCRYPTION_KEY="" BLUEPRINT_CREATOR="" -CLIENT_SUCCESS_AUTH_REDIRECT=http://localhost:4200/auth/login +CLIENT_SUCCESS_AUTH_REDIRECT=http://127.0.0.1:4200/auth/login -MONGO_URL=mongodb://localhost:27017/novu-test +MONGO_URL=mongodb://127.0.0.1:27017/novu-test MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 REDIS_HOST=localhost @@ -37,8 +37,8 @@ REDIS_CLUSTER_KEEP_ALIVE= REDIS_CLUSTER_FAMILY= REDIS_CLUSTER_KEY_PREFIX= -SYNC_PATH=http://localhost:3001 -API_ROOT_URL=http://localhost:3000 +SYNC_PATH=http://127.0.0.1:3001 +API_ROOT_URL=http://127.0.0.1:3000 DISABLE_USER_REGISTRATION=false PORT=1337 JWT_SECRET=ASD#asda23DFEFSFHG%fg @@ -47,14 +47,14 @@ SENDGRID_API_KEY=SG.123123 S3_ACCESS_KEY= S3_SECRET= REDIS_ARENA_PORT=4568 -FRONT_BASE_URL=http://localhost:4200 +FRONT_BASE_URL=http://127.0.0.1:4200 RELEASLY_MAIL=support@starter.co -BACK_OFFICE_URL=http://localhost:5200 +BACK_OFFICE_URL=http://127.0.0.1:5200 INTERCOM_API_KEY= GLOBAL_CONTEXT_PATH= API_CONTEXT_PATH= -S3_LOCAL_STACK=http://localhost:4566 +S3_LOCAL_STACK=http://127.0.0.1:4566 S3_BUCKET_NAME=novu-test S3_REGION=us-east-1 GCS_BUCKET_NAME=novu-test @@ -71,7 +71,7 @@ MAIL_SERVER_DOMAIN= VERCEL_CLIENT_ID= VERCEL_CLIENT_SECRET= -VERCEL_REDIRECT_URI=http://localhost:4200/auth/login +VERCEL_REDIRECT_URI=http://127.0.0.1:4200/auth/login VERCEL_BASE_URL=https://api.vercel.com FF_IS_TOPIC_NOTIFICATION_ENABLED=true diff --git a/packages/application-generic/src/services/auth/shared.ts b/packages/application-generic/src/services/auth/shared.ts index 2dc554d42dc..ec58c24496f 100644 --- a/packages/application-generic/src/services/auth/shared.ts +++ b/packages/application-generic/src/services/auth/shared.ts @@ -13,7 +13,7 @@ export const buildOauthRedirectUrl = (request): string => { */ if ( redirectUrl && - redirectUrl.startsWith('http://localhost:') && + redirectUrl.startsWith('http://127.0.0.1:') && !redirectUrl.includes('@') ) { url = redirectUrl; diff --git a/packages/cli/package.json b/packages/cli/package.json index 8e11559583b..a210171bc4c 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -11,7 +11,7 @@ "format": "prettier --write \"src/**/*.ts\"", "precommit": "lint-staged", "start": "pnpm start:dev", - "start:dev": "cross-env NODE_ENV=dev NOVU_EMBED_PATH=http://localhost:4701/embed.umd.min.js NOVU_API_ADDRESS=http://localhost:3000 NOVU_CLIENT_LOGIN=http://localhost:4200/auth/login CLI_SEGMENT_WRITE_KEY=GdQ594CEBj4pU6RFldDOjKJwZjxZOsIj TZ=UTC nodemon init", + "start:dev": "cross-env NODE_ENV=dev NOVU_EMBED_PATH=http://127.0.0.1:4701/embed.umd.min.js NOVU_API_ADDRESS=http://127.0.0.1:3000 NOVU_CLIENT_LOGIN=http://127.0.0.1:4200/auth/login CLI_SEGMENT_WRITE_KEY=GdQ594CEBj4pU6RFldDOjKJwZjxZOsIj TZ=UTC nodemon init", "start:test": "cross-env NODE_ENV=test PORT=1336 TZ=UTC nodemon init", "start:debug": "cross-env TZ=UTC nodemon --config nodemon-debug.json", "start:prod": "cross-env TZ=UTC node dist/index.js" diff --git a/packages/headless/src/lib/headless.service.test.ts b/packages/headless/src/lib/headless.service.test.ts index b833569ded3..062e0ef1aae 100644 --- a/packages/headless/src/lib/headless.service.test.ts +++ b/packages/headless/src/lib/headless.service.test.ts @@ -162,8 +162,8 @@ Storage.prototype.removeItem = jest.fn(); describe('headless.service', () => { const options = { - backendUrl: 'http://localhost:3000', - socketUrl: 'http://localhost:3001', + backendUrl: 'http://127.0.0.1:3000', + socketUrl: 'http://127.0.0.1:3001', applicationIdentifier: 'applicationIdentifier', subscriberId: 'subscriberId', subscriberHash: 'subscriberHash', diff --git a/packages/notification-center-angular/.vscode/launch.json b/packages/notification-center-angular/.vscode/launch.json index 740e35a0c04..0693cba63e7 100644 --- a/packages/notification-center-angular/.vscode/launch.json +++ b/packages/notification-center-angular/.vscode/launch.json @@ -7,14 +7,14 @@ "type": "pwa-chrome", "request": "launch", "preLaunchTask": "npm: start", - "url": "http://localhost:4200/" + "url": "http://127.0.0.1:4200/" }, { "name": "ng test", "type": "chrome", "request": "launch", "preLaunchTask": "npm: test", - "url": "http://localhost:9876/debug.html" + "url": "http://127.0.0.1:9876/debug.html" } ] } diff --git a/packages/notification-center-angular/README.md b/packages/notification-center-angular/README.md index 9e1e55bce76..7c536d71d0b 100644 --- a/packages/notification-center-angular/README.md +++ b/packages/notification-center-angular/README.md @@ -4,7 +4,7 @@ This project was generated with [Angular CLI](https://github.com/angular/angular ## Development server -Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The application will automatically reload if you change any of the source files. +Run `ng serve` for a dev server. Navigate to `http://127.0.0.1:4200/`. The application will automatically reload if you change any of the source files. ## Code scaffolding diff --git a/providers/email-webhook/src/lib/email-webhook.provider.spec.ts b/providers/email-webhook/src/lib/email-webhook.provider.spec.ts index 1a1bd1e5a08..940aa799376 100644 --- a/providers/email-webhook/src/lib/email-webhook.provider.spec.ts +++ b/providers/email-webhook/src/lib/email-webhook.provider.spec.ts @@ -9,7 +9,7 @@ test('should trigger email-webhook-provider library correctly', async () => { jest.spyOn(axios, 'post').mockImplementation(fakePost); const provider = new EmailWebhookProvider({ - webhookUrl: 'http://localhost:8080/webhook', + webhookUrl: 'http://127.0.0.1:8080/webhook', hmacSecretKey: 'super-secret-key', retryDelay: 1, retryCount: 1, @@ -30,7 +30,7 @@ test('should trigger email-webhook-provider library correctly', async () => { expect(fakePost).toHaveBeenCalled(); expect(fakePost).toHaveBeenCalledWith( - 'http://localhost:8080/webhook', + 'http://127.0.0.1:8080/webhook', '{"to":["johndoe@example.com"],"from":"janedoe@example.com","subject":"test","html":"

test

","text":"test"}', { headers: { diff --git a/providers/push-webhook/src/lib/push-webhook.provider.spec.ts b/providers/push-webhook/src/lib/push-webhook.provider.spec.ts index 489702c72a0..a23e465a6dd 100644 --- a/providers/push-webhook/src/lib/push-webhook.provider.spec.ts +++ b/providers/push-webhook/src/lib/push-webhook.provider.spec.ts @@ -13,7 +13,7 @@ test('should trigger push-webhook library correctly', async () => { jest.spyOn(axios, 'post').mockImplementation(fakePost); const provider = new PushWebhookPushProvider({ - webhookUrl: 'http://localhost:8080/webhook', + webhookUrl: 'http://127.0.0.1:8080/webhook', hmacSecretKey: 'super-secret-key', }); @@ -33,7 +33,7 @@ test('should trigger push-webhook library correctly', async () => { expect(fakePost).toHaveBeenCalled(); expect(fakePost).toHaveBeenCalledWith( - 'http://localhost:8080/webhook', + 'http://127.0.0.1:8080/webhook', JSON.stringify({ title: 'Test', content: 'Test push', diff --git a/scripts/jarvis.js b/scripts/jarvis.js index 9113298b61d..28725c43a8b 100644 --- a/scripts/jarvis.js +++ b/scripts/jarvis.js @@ -120,10 +120,10 @@ async function setupRunner() { console.log(` Everything is running 🎊 - Web: http://localhost:4200 - Widget: http://localhost:4500 - API: http://localhost:3000 - Worker: http://localhost:3004 + Web: http://127.0.0.1:4200 + Widget: http://127.0.0.1:4500 + API: http://127.0.0.1:3000 + Worker: http://127.0.0.1:3004 `); } else if (answers.runConfiguration === WEB_PROJECT) { try { @@ -153,10 +153,10 @@ async function setupRunner() { console.log(` Everything is running 🎊 - Web: http://localhost:4200 - API: http://localhost:3000 - WS: http://localhost:3002 - Worker: http://localhost:3004 + Web: http://127.0.0.1:4200 + API: http://127.0.0.1:3000 + WS: http://127.0.0.1:3002 + Worker: http://127.0.0.1:3004 `); } catch (e) { console.error(`Failed to spin up the project ❌`, e); @@ -178,8 +178,8 @@ async function setupRunner() { console.log(` Everything is running 🎊 - API: http://localhost:3000 - Worker: http://localhost:3004 + API: http://127.0.0.1:3000 + Worker: http://127.0.0.1:3004 `); } else if (answers.runApiConfiguration === API_INTEGRATION_TESTS) { shell.exec('nx run-many --target=build --projects=@novu/api,@novu/worker'); From 86598e9e3951ee6547600b20ef17ea507e1d5972 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 15:10:47 +0300 Subject: [PATCH 09/19] fix: localhost to 127.0.0.1 --- apps/api/src/.env.development | 6 ++-- apps/api/src/.env.test | 6 ++-- apps/api/src/.example.env | 2 +- apps/inbound-mail/.example.env | 2 +- apps/inbound-mail/src/.env.development | 4 +-- apps/inbound-mail/src/.env.production | 2 +- apps/inbound-mail/src/.env.test | 4 +-- apps/worker/src/.env.development | 6 ++-- apps/worker/src/.env.production | 6 ++-- apps/worker/src/.env.test | 6 ++-- apps/worker/src/.example.env | 6 ++-- apps/ws/src/.env.development | 2 +- apps/ws/src/.env.test | 2 +- apps/ws/src/.example.env | 2 +- packages/application-generic/src/.env.test | 6 ++-- .../services/bull-mq/bull-mq.service.spec.ts | 2 +- .../distributed-lock.service.spec.ts | 4 +-- .../providers/redis-provider.ts | 2 +- packages/cli/src/constants/constants.ts | 2 +- .../infobip/src/lib/infobip.provider.spec.ts | 4 +-- scripts/jarvis.js | 30 +++++++++---------- 21 files changed, 53 insertions(+), 53 deletions(-) diff --git a/apps/api/src/.env.development b/apps/api/src/.env.development index 8af859ce673..221b92800d4 100644 --- a/apps/api/src/.env.development +++ b/apps/api/src/.env.development @@ -10,11 +10,11 @@ NEST_STARTER_MAIL=support@novu.co CLIENT_SUCCESS_AUTH_REDIRECT=https://dev.web.novu.co/auth/login REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PREFIX= REDIS_DB_INDEX=2 -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -28,7 +28,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING=true IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/api/src/.env.test b/apps/api/src/.env.test index 199d7ffc622..65741633b58 100644 --- a/apps/api/src/.env.test +++ b/apps/api/src/.env.test @@ -8,11 +8,11 @@ CLIENT_SUCCESS_AUTH_REDIRECT=http://127.0.0.1:4200/auth/login MONGO_URL=mongodb://127.0.0.1:27017/novu-test REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PREFIX= REDIS_DB_INDEX=1 -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -26,7 +26,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING=false IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/api/src/.example.env b/apps/api/src/.example.env index a28c8417580..d446a208d43 100644 --- a/apps/api/src/.example.env +++ b/apps/api/src/.example.env @@ -9,7 +9,7 @@ MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 REDIS_PREFIX= -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_DB_INDEX=2 REDIS_CACHE_SERVICE_HOST= diff --git a/apps/inbound-mail/.example.env b/apps/inbound-mail/.example.env index cb33a758e93..3804931839d 100644 --- a/apps/inbound-mail/.example.env +++ b/apps/inbound-mail/.example.env @@ -3,7 +3,7 @@ HOST="0.0.0.0" REDIS_DB_INDEX="2" -REDIS_HOST="localhost" +REDIS_HOST="127.0.0.1" REDIS_PORT="6379" LOGGING_LEVEL=info diff --git a/apps/inbound-mail/src/.env.development b/apps/inbound-mail/src/.env.development index 5ed27ba166f..7cceb83ceb6 100644 --- a/apps/inbound-mail/src/.env.development +++ b/apps/inbound-mail/src/.env.development @@ -5,13 +5,13 @@ HOST="0.0.0.0" REDIS_PORT="6379" -REDIS_HOST="localhost" +REDIS_HOST="127.0.0.1" REDIS_PREFIX= REDIS_DB_INDEX="2" IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/inbound-mail/src/.env.production b/apps/inbound-mail/src/.env.production index eab410478bc..50a9d54e739 100644 --- a/apps/inbound-mail/src/.env.production +++ b/apps/inbound-mail/src/.env.production @@ -3,7 +3,7 @@ NODE_ENV=production POST="25" HOST="0.0.0.0" -REDIS_HOST="localhost" +REDIS_HOST="127.0.0.1" REDIS_PORT=6379 REDIS_PREFIX= REDIS_DB_INDEX=2 diff --git a/apps/inbound-mail/src/.env.test b/apps/inbound-mail/src/.env.test index 8f58f5f941d..b3fbe56f7dd 100644 --- a/apps/inbound-mail/src/.env.test +++ b/apps/inbound-mail/src/.env.test @@ -5,12 +5,12 @@ HOST="0.0.0.0" REDIS_DB_INDEX=2 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PORT=6379 REDIS_PREFIX= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.env.development b/apps/worker/src/.env.development index c5e511d06cf..3499379f654 100644 --- a/apps/worker/src/.env.development +++ b/apps/worker/src/.env.development @@ -11,13 +11,13 @@ MAX_NOVU_INTEGRATION_SMS_REQUESTS=20 # STORAGE_SERVICE= # Redis -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PORT=6379 # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=2 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -33,7 +33,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING=true IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.env.production b/apps/worker/src/.env.production index 0f303d215f2..d194a83b7dc 100644 --- a/apps/worker/src/.env.production +++ b/apps/worker/src/.env.production @@ -14,13 +14,13 @@ MAX_NOVU_INTEGRATION_SMS_REQUESTS=20 # STORAGE_SERVICE= # Redis -# REDIS_HOST=localhost +# REDIS_HOST=127.0.0.1 REDIS_PORT=6379 # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=2 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -35,7 +35,7 @@ REDIS_CACHE_SERVICE_TLS= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.env.test b/apps/worker/src/.env.test index 8375edc7171..1033e18aa33 100644 --- a/apps/worker/src/.env.test +++ b/apps/worker/src/.env.test @@ -16,12 +16,12 @@ NOVU_SMS_INTEGRATION_SENDER=1234567890 # Redis REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=1 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -36,7 +36,7 @@ REDIS_CACHE_SERVICE_TLS= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.example.env b/apps/worker/src/.example.env index ee875c6287b..e280b9c07c8 100644 --- a/apps/worker/src/.example.env +++ b/apps/worker/src/.example.env @@ -14,12 +14,12 @@ MAX_NOVU_INTEGRATION_SMS_REQUESTS=20 # Redis REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=2 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -34,7 +34,7 @@ REDIS_CACHE_SERVICE_TLS= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false # ELASTICACHE_CLUSTER_SERVICE_HOST= # ELASTICACHE_CLUSTER_SERVICE_PORT= -# REDIS_CLUSTER_SERVICE_HOST=localhost +# REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 # REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] # REDIS_CLUSTER_DB_INDEX= # REDIS_CLUSTER_TTL= diff --git a/apps/ws/src/.env.development b/apps/ws/src/.env.development index 624c6461925..c3adbcb4426 100644 --- a/apps/ws/src/.env.development +++ b/apps/ws/src/.env.development @@ -2,7 +2,7 @@ NODE_ENV=dev PORT=3002 MONGO_URL=mongodb://127.0.0.1:27017/novu-db REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PREFIX= REDIS_DB_INDEX=2 JWT_SECRET=TEST_CHANGE9s diff --git a/apps/ws/src/.env.test b/apps/ws/src/.env.test index 9053eb070b6..70277ecdf60 100644 --- a/apps/ws/src/.env.test +++ b/apps/ws/src/.env.test @@ -1,6 +1,6 @@ MONGO_URL=mongodb://127.0.0.1:27017/novu-test REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_DB_INDEX=1 REDIS_PREFIX= PORT=1340 diff --git a/apps/ws/src/.example.env b/apps/ws/src/.example.env index 32af0977591..ee03be6b1bb 100644 --- a/apps/ws/src/.example.env +++ b/apps/ws/src/.example.env @@ -3,7 +3,7 @@ PORT=3002 MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_DB_INDEX=2 REDIS_PREFIX= JWT_SECRET=%ASTEST_CHANGE9s diff --git a/packages/application-generic/src/.env.test b/packages/application-generic/src/.env.test index 6a267ff4825..c750660c74a 100644 --- a/packages/application-generic/src/.env.test +++ b/packages/application-generic/src/.env.test @@ -9,11 +9,11 @@ CLIENT_SUCCESS_AUTH_REDIRECT=http://127.0.0.1:4200/auth/login MONGO_URL=mongodb://127.0.0.1:27017/novu-test MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 -REDIS_HOST=localhost +REDIS_HOST=127.0.0.1 REDIS_PREFIX= REDIS_DB_INDEX=1 -REDIS_CACHE_SERVICE_HOST=localhost +REDIS_CACHE_SERVICE_HOST=127.0.0.1 REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -27,7 +27,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING= IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=localhost +REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts b/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts index 3e2f5d38dbc..fcf0f139d75 100644 --- a/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts +++ b/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts @@ -62,7 +62,7 @@ describe('BullMQ Service', () => { describe('Prefix functionality', () => { it('should use prefix if any Cluster provider enabled', async () => { - process.env.MEMORY_DB_CLUSTER_SERVICE_HOST = 'localhost'; + process.env.MEMORY_DB_CLUSTER_SERVICE_HOST = '127.0.0.1'; process.env.IS_IN_MEMORY_CLUSTER_MODE_ENABLED = 'true'; bullMqService = new BullMqService(); diff --git a/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts b/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts index b4d8ad0f3c6..0b02c5aa9ba 100644 --- a/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts +++ b/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts @@ -11,7 +11,7 @@ import { } from '../in-memory-provider'; const originalRedisCacheServiceHost = (process.env.REDIS_CACHE_SERVICE_HOST = - process.env.REDIS_CACHE_SERVICE_HOST ?? 'localhost'); + process.env.REDIS_CACHE_SERVICE_HOST ?? '127.0.0.1'); const originalRedisCacheServicePort = (process.env.REDIS_CACHE_SERVICE_PORT = process.env.REDIS_CACHE_SERVICE_PORT ?? '6379'); const originalRedisClusterServiceHost = process.env.REDIS_CLUSTER_SERVICE_HOST; @@ -301,7 +301,7 @@ describe('Distributed Lock Service', () => { inMemoryProviderService = new InMemoryProviderService(undefined); expect(inMemoryProviderService.inMemoryProviderConfig.host).toEqual( - 'localhost' + '127.0.0.1' ); distributedLockService = new DistributedLockService(undefined); // If no initializing the service is like the client is not properly set diff --git a/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts b/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts index 9fc4bc6d72e..5df3d20c912 100644 --- a/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts +++ b/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts @@ -6,7 +6,7 @@ export { Redis, RedisOptions, ScanStream }; export const CLIENT_READY = 'ready'; const DEFAULT_TTL_SECONDS = 60 * 60 * 2; const DEFAULT_CONNECT_TIMEOUT = 50000; -const DEFAULT_HOST = 'localhost'; +const DEFAULT_HOST = '127.0.0.1'; const DEFAULT_KEEP_ALIVE = 30000; const DEFAULT_KEY_PREFIX = ''; const DEFAULT_FAMILY = 4; diff --git a/packages/cli/src/constants/constants.ts b/packages/cli/src/constants/constants.ts index 62925eb7735..a266eb4af0a 100644 --- a/packages/cli/src/constants/constants.ts +++ b/packages/cli/src/constants/constants.ts @@ -2,7 +2,7 @@ import * as getPort from 'get-port'; import * as dotenv from 'dotenv'; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import dotenv.config(); // CLI Server -export const SERVER_HOST = 'localhost'; +export const SERVER_HOST = '127.0.0.1'; export const REDIRECT_ROUTE = '/cli/callback'; export const WIDGET_DEMO_ROUTE = '/demo'; export const TRIGGER_ROUTE = '/trigger'; diff --git a/providers/infobip/src/lib/infobip.provider.spec.ts b/providers/infobip/src/lib/infobip.provider.spec.ts index eb137509e70..c8e554831ad 100644 --- a/providers/infobip/src/lib/infobip.provider.spec.ts +++ b/providers/infobip/src/lib/infobip.provider.spec.ts @@ -2,7 +2,7 @@ import { InfobipEmailProvider, InfobipSmsProvider } from './infobip.provider'; test('should trigger infobip library correctly - SMS', async () => { const provider = new InfobipSmsProvider({ - baseUrl: 'localhost', + baseUrl: '127.0.0.1', apiKey: '', }); @@ -43,7 +43,7 @@ test('should trigger infobip library correctly - SMS', async () => { }); test('should trigger infobip library correctly - E-mail', async () => { const provider = new InfobipEmailProvider({ - baseUrl: 'localhost', + baseUrl: '127.0.0.1', apiKey: '', }); diff --git a/scripts/jarvis.js b/scripts/jarvis.js index 28725c43a8b..8f78eb69a90 100644 --- a/scripts/jarvis.js +++ b/scripts/jarvis.js @@ -100,19 +100,19 @@ async function setupRunner() { shell.exec('npm run start:dev', { async: true }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3000, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3004, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 4500, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 4200, }); @@ -134,15 +134,15 @@ async function setupRunner() { shell.exec('npm run start:worker', { async: true }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3000, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3002, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3004, }); @@ -167,11 +167,11 @@ async function setupRunner() { shell.exec('npm run start:worker', { async: true }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3000, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 3004, }); @@ -186,7 +186,7 @@ async function setupRunner() { shell.exec('npm run start:worker:test', { async: true }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 1342, }); @@ -196,7 +196,7 @@ async function setupRunner() { shell.exec('npm run start:worker:test', { async: true }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 1342, }); @@ -210,22 +210,22 @@ async function setupRunner() { shell.exec('cd apps/web && npm run start', { async: true }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 1336, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 1340, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 1342, }); await waitPort({ - host: 'localhost', + host: '127.0.0.1', port: 4200, }); From fa0fe3acc0be9c52bea4a119f0ddc89634ad8876 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 15:12:53 +0300 Subject: [PATCH 10/19] fix: localhost pointer --- .github/workflows/reusable-web-e2e.yml | 2 +- .github/workflows/reusable-widget-e2e.yml | 4 ++-- apps/inbound-mail/.example.env | 2 +- apps/inbound-mail/src/.env.development | 2 +- apps/inbound-mail/src/.env.production | 2 +- apps/inbound-mail/src/.env.test | 2 +- apps/inbound-mail/src/main.ts | 2 +- apps/inbound-mail/src/server/index.ts | 2 +- providers/kannel/src/lib/kannel.provider.spec.ts | 11 +++++++---- 9 files changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/reusable-web-e2e.yml b/.github/workflows/reusable-web-e2e.yml index 1301ab669d7..bd6972e205b 100644 --- a/.github/workflows/reusable-web-e2e.yml +++ b/.github/workflows/reusable-web-e2e.yml @@ -85,7 +85,7 @@ jobs: cd apps/ws && pnpm start:test & - name: Wait on Services - run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:4200/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:4200/ # run cypress install only when cache was not hit - name: Cypress install diff --git a/.github/workflows/reusable-widget-e2e.yml b/.github/workflows/reusable-widget-e2e.yml index 37909bf80a3..b6b68e62368 100644 --- a/.github/workflows/reusable-widget-e2e.yml +++ b/.github/workflows/reusable-widget-e2e.yml @@ -87,7 +87,7 @@ jobs: cd apps/ws && pnpm start:prod & - name: Wait on Widget and WS Services - run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:3500/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:3500/ - name: Cypress install if: steps.setup-project.outputs.cypress_cache_hit != 'true' @@ -102,7 +102,7 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_WIDGET_KEY }} with: working-directory: apps/widget - wait-on: http://0.0.0.0:3500/ + wait-on: http://127.0.0.1:3500/ browser: chrome install: false record: true diff --git a/apps/inbound-mail/.example.env b/apps/inbound-mail/.example.env index 3804931839d..594552bf11c 100644 --- a/apps/inbound-mail/.example.env +++ b/apps/inbound-mail/.example.env @@ -1,5 +1,5 @@ POST="25" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_DB_INDEX="2" diff --git a/apps/inbound-mail/src/.env.development b/apps/inbound-mail/src/.env.development index 7cceb83ceb6..ecadc838b3a 100644 --- a/apps/inbound-mail/src/.env.development +++ b/apps/inbound-mail/src/.env.development @@ -1,7 +1,7 @@ NODE_ENV=dev POST="25" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_PORT="6379" diff --git a/apps/inbound-mail/src/.env.production b/apps/inbound-mail/src/.env.production index 50a9d54e739..b7fa84b94c4 100644 --- a/apps/inbound-mail/src/.env.production +++ b/apps/inbound-mail/src/.env.production @@ -1,7 +1,7 @@ NODE_ENV=production POST="25" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_HOST="127.0.0.1" REDIS_PORT=6379 diff --git a/apps/inbound-mail/src/.env.test b/apps/inbound-mail/src/.env.test index b3fbe56f7dd..262c401e57e 100644 --- a/apps/inbound-mail/src/.env.test +++ b/apps/inbound-mail/src/.env.test @@ -1,7 +1,7 @@ NODE_ENV=test PORT="2500" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_DB_INDEX=2 diff --git a/apps/inbound-mail/src/main.ts b/apps/inbound-mail/src/main.ts index 7609617b97c..1a011d8822f 100644 --- a/apps/inbound-mail/src/main.ts +++ b/apps/inbound-mail/src/main.ts @@ -22,7 +22,7 @@ if (process.env.SENTRY_DSN) { export default mailin.start( { port: env.PORT || 25, - host: env.HOST || '0.0.0.0', + host: env.HOST || '127.0.0.1', disableDkim: env.disableDkim, disableSpf: env.disableSpf, disableSpamScore: env.disableSpamScore, diff --git a/apps/inbound-mail/src/server/index.ts b/apps/inbound-mail/src/server/index.ts index d8ec1afc28d..1fee1c4442c 100644 --- a/apps/inbound-mail/src/server/index.ts +++ b/apps/inbound-mail/src/server/index.ts @@ -33,7 +33,7 @@ class Mailin extends events.EventEmitter { super(); this.configuration = { - host: '0.0.0.0', + host: '127.0.0.1', port: 2500, tmp: '.tmp', disableWebhook: true, diff --git a/providers/kannel/src/lib/kannel.provider.spec.ts b/providers/kannel/src/lib/kannel.provider.spec.ts index e733906e384..1374e41ccee 100644 --- a/providers/kannel/src/lib/kannel.provider.spec.ts +++ b/providers/kannel/src/lib/kannel.provider.spec.ts @@ -9,7 +9,7 @@ test('should trigger Kannel SMS axios request correctly', async () => { jest.spyOn(axios, 'get').mockImplementation(fakeGet); const provider = new KannelSmsProvider({ - host: '0.0.0.0', + host: '127.0.0.1', port: '13000', from: '0000', }); @@ -29,7 +29,10 @@ test('should trigger Kannel SMS axios request correctly', async () => { }); expect(fakeGet).toHaveBeenCalled(); - expect(fakeGet).toHaveBeenCalledWith('http://0.0.0.0:13000/cgi-bin/sendsms', { - params: testQueryParams, - }); + expect(fakeGet).toHaveBeenCalledWith( + 'http://127.0.0.1:13000/cgi-bin/sendsms', + { + params: testQueryParams, + } + ); }); From 73bb0448c5911b1cac86f9ac9f4c686d47f47fbb Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 15:38:22 +0300 Subject: [PATCH 11/19] Revert "fix: localhost to 127.0.0.1" This reverts commit 86598e9e3951ee6547600b20ef17ea507e1d5972. --- apps/api/src/.env.development | 6 ++-- apps/api/src/.env.test | 6 ++-- apps/api/src/.example.env | 2 +- apps/inbound-mail/.example.env | 2 +- apps/inbound-mail/src/.env.development | 4 +-- apps/inbound-mail/src/.env.production | 2 +- apps/inbound-mail/src/.env.test | 4 +-- apps/worker/src/.env.development | 6 ++-- apps/worker/src/.env.production | 6 ++-- apps/worker/src/.env.test | 6 ++-- apps/worker/src/.example.env | 6 ++-- apps/ws/src/.env.development | 2 +- apps/ws/src/.env.test | 2 +- apps/ws/src/.example.env | 2 +- packages/application-generic/src/.env.test | 6 ++-- .../services/bull-mq/bull-mq.service.spec.ts | 2 +- .../distributed-lock.service.spec.ts | 4 +-- .../providers/redis-provider.ts | 2 +- packages/cli/src/constants/constants.ts | 2 +- .../infobip/src/lib/infobip.provider.spec.ts | 4 +-- scripts/jarvis.js | 30 +++++++++---------- 21 files changed, 53 insertions(+), 53 deletions(-) diff --git a/apps/api/src/.env.development b/apps/api/src/.env.development index 221b92800d4..8af859ce673 100644 --- a/apps/api/src/.env.development +++ b/apps/api/src/.env.development @@ -10,11 +10,11 @@ NEST_STARTER_MAIL=support@novu.co CLIENT_SUCCESS_AUTH_REDIRECT=https://dev.web.novu.co/auth/login REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_PREFIX= REDIS_DB_INDEX=2 -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -28,7 +28,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING=true IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/api/src/.env.test b/apps/api/src/.env.test index 65741633b58..199d7ffc622 100644 --- a/apps/api/src/.env.test +++ b/apps/api/src/.env.test @@ -8,11 +8,11 @@ CLIENT_SUCCESS_AUTH_REDIRECT=http://127.0.0.1:4200/auth/login MONGO_URL=mongodb://127.0.0.1:27017/novu-test REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_PREFIX= REDIS_DB_INDEX=1 -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -26,7 +26,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING=false IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/api/src/.example.env b/apps/api/src/.example.env index d446a208d43..a28c8417580 100644 --- a/apps/api/src/.example.env +++ b/apps/api/src/.example.env @@ -9,7 +9,7 @@ MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 REDIS_PREFIX= -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_DB_INDEX=2 REDIS_CACHE_SERVICE_HOST= diff --git a/apps/inbound-mail/.example.env b/apps/inbound-mail/.example.env index 594552bf11c..cc801826134 100644 --- a/apps/inbound-mail/.example.env +++ b/apps/inbound-mail/.example.env @@ -3,7 +3,7 @@ HOST="127.0.0.1" REDIS_DB_INDEX="2" -REDIS_HOST="127.0.0.1" +REDIS_HOST="localhost" REDIS_PORT="6379" LOGGING_LEVEL=info diff --git a/apps/inbound-mail/src/.env.development b/apps/inbound-mail/src/.env.development index ecadc838b3a..47afdea9fe5 100644 --- a/apps/inbound-mail/src/.env.development +++ b/apps/inbound-mail/src/.env.development @@ -5,13 +5,13 @@ HOST="127.0.0.1" REDIS_PORT="6379" -REDIS_HOST="127.0.0.1" +REDIS_HOST="localhost" REDIS_PREFIX= REDIS_DB_INDEX="2" IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/inbound-mail/src/.env.production b/apps/inbound-mail/src/.env.production index b7fa84b94c4..87217b06b4a 100644 --- a/apps/inbound-mail/src/.env.production +++ b/apps/inbound-mail/src/.env.production @@ -3,7 +3,7 @@ NODE_ENV=production POST="25" HOST="127.0.0.1" -REDIS_HOST="127.0.0.1" +REDIS_HOST="localhost" REDIS_PORT=6379 REDIS_PREFIX= REDIS_DB_INDEX=2 diff --git a/apps/inbound-mail/src/.env.test b/apps/inbound-mail/src/.env.test index 262c401e57e..0f03ba716dd 100644 --- a/apps/inbound-mail/src/.env.test +++ b/apps/inbound-mail/src/.env.test @@ -5,12 +5,12 @@ HOST="127.0.0.1" REDIS_DB_INDEX=2 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_PORT=6379 REDIS_PREFIX= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.env.development b/apps/worker/src/.env.development index 3499379f654..c5e511d06cf 100644 --- a/apps/worker/src/.env.development +++ b/apps/worker/src/.env.development @@ -11,13 +11,13 @@ MAX_NOVU_INTEGRATION_SMS_REQUESTS=20 # STORAGE_SERVICE= # Redis -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_PORT=6379 # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=2 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -33,7 +33,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING=true IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.env.production b/apps/worker/src/.env.production index d194a83b7dc..0f303d215f2 100644 --- a/apps/worker/src/.env.production +++ b/apps/worker/src/.env.production @@ -14,13 +14,13 @@ MAX_NOVU_INTEGRATION_SMS_REQUESTS=20 # STORAGE_SERVICE= # Redis -# REDIS_HOST=127.0.0.1 +# REDIS_HOST=localhost REDIS_PORT=6379 # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=2 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -35,7 +35,7 @@ REDIS_CACHE_SERVICE_TLS= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.env.test b/apps/worker/src/.env.test index 1033e18aa33..8375edc7171 100644 --- a/apps/worker/src/.env.test +++ b/apps/worker/src/.env.test @@ -16,12 +16,12 @@ NOVU_SMS_INTEGRATION_SENDER=1234567890 # Redis REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=1 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -36,7 +36,7 @@ REDIS_CACHE_SERVICE_TLS= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/apps/worker/src/.example.env b/apps/worker/src/.example.env index e280b9c07c8..ee875c6287b 100644 --- a/apps/worker/src/.example.env +++ b/apps/worker/src/.example.env @@ -14,12 +14,12 @@ MAX_NOVU_INTEGRATION_SMS_REQUESTS=20 # Redis REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost # REDIS_REDIS_PASSWORD= REDIS_DB_INDEX=2 # Redis (for caching) -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -34,7 +34,7 @@ REDIS_CACHE_SERVICE_TLS= IS_IN_MEMORY_CLUSTER_MODE_ENABLED=false # ELASTICACHE_CLUSTER_SERVICE_HOST= # ELASTICACHE_CLUSTER_SERVICE_PORT= -# REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +# REDIS_CLUSTER_SERVICE_HOST=localhost # REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] # REDIS_CLUSTER_DB_INDEX= # REDIS_CLUSTER_TTL= diff --git a/apps/ws/src/.env.development b/apps/ws/src/.env.development index c3adbcb4426..624c6461925 100644 --- a/apps/ws/src/.env.development +++ b/apps/ws/src/.env.development @@ -2,7 +2,7 @@ NODE_ENV=dev PORT=3002 MONGO_URL=mongodb://127.0.0.1:27017/novu-db REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_PREFIX= REDIS_DB_INDEX=2 JWT_SECRET=TEST_CHANGE9s diff --git a/apps/ws/src/.env.test b/apps/ws/src/.env.test index 70277ecdf60..9053eb070b6 100644 --- a/apps/ws/src/.env.test +++ b/apps/ws/src/.env.test @@ -1,6 +1,6 @@ MONGO_URL=mongodb://127.0.0.1:27017/novu-test REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_DB_INDEX=1 REDIS_PREFIX= PORT=1340 diff --git a/apps/ws/src/.example.env b/apps/ws/src/.example.env index ee03be6b1bb..32af0977591 100644 --- a/apps/ws/src/.example.env +++ b/apps/ws/src/.example.env @@ -3,7 +3,7 @@ PORT=3002 MONGO_URL=mongodb://127.0.0.1:27017/novu-db MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_DB_INDEX=2 REDIS_PREFIX= JWT_SECRET=%ASTEST_CHANGE9s diff --git a/packages/application-generic/src/.env.test b/packages/application-generic/src/.env.test index c750660c74a..6a267ff4825 100644 --- a/packages/application-generic/src/.env.test +++ b/packages/application-generic/src/.env.test @@ -9,11 +9,11 @@ CLIENT_SUCCESS_AUTH_REDIRECT=http://127.0.0.1:4200/auth/login MONGO_URL=mongodb://127.0.0.1:27017/novu-test MONGO_MAX_POOL_SIZE=500 REDIS_PORT=6379 -REDIS_HOST=127.0.0.1 +REDIS_HOST=localhost REDIS_PREFIX= REDIS_DB_INDEX=1 -REDIS_CACHE_SERVICE_HOST=127.0.0.1 +REDIS_CACHE_SERVICE_HOST=localhost REDIS_CACHE_SERVICE_PORT=6379 REDIS_CACHE_DB_INDEX= REDIS_CACHE_TTL= @@ -27,7 +27,7 @@ REDIS_CACHE_ENABLE_AUTOPIPELINING= IN_MEMORY_CLUSTER_MODE_ENABLED=false ELASTICACHE_CLUSTER_SERVICE_HOST= ELASTICACHE_CLUSTER_SERVICE_PORT= -REDIS_CLUSTER_SERVICE_HOST=127.0.0.1 +REDIS_CLUSTER_SERVICE_HOST=localhost REDIS_CLUSTER_SERVICE_PORTS=[7000,7001,7002,7003,7004,7005] REDIS_CLUSTER_DB_INDEX= REDIS_CLUSTER_TTL= diff --git a/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts b/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts index fcf0f139d75..3e2f5d38dbc 100644 --- a/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts +++ b/packages/application-generic/src/services/bull-mq/bull-mq.service.spec.ts @@ -62,7 +62,7 @@ describe('BullMQ Service', () => { describe('Prefix functionality', () => { it('should use prefix if any Cluster provider enabled', async () => { - process.env.MEMORY_DB_CLUSTER_SERVICE_HOST = '127.0.0.1'; + process.env.MEMORY_DB_CLUSTER_SERVICE_HOST = 'localhost'; process.env.IS_IN_MEMORY_CLUSTER_MODE_ENABLED = 'true'; bullMqService = new BullMqService(); diff --git a/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts b/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts index 0b02c5aa9ba..b4d8ad0f3c6 100644 --- a/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts +++ b/packages/application-generic/src/services/distributed-lock/distributed-lock.service.spec.ts @@ -11,7 +11,7 @@ import { } from '../in-memory-provider'; const originalRedisCacheServiceHost = (process.env.REDIS_CACHE_SERVICE_HOST = - process.env.REDIS_CACHE_SERVICE_HOST ?? '127.0.0.1'); + process.env.REDIS_CACHE_SERVICE_HOST ?? 'localhost'); const originalRedisCacheServicePort = (process.env.REDIS_CACHE_SERVICE_PORT = process.env.REDIS_CACHE_SERVICE_PORT ?? '6379'); const originalRedisClusterServiceHost = process.env.REDIS_CLUSTER_SERVICE_HOST; @@ -301,7 +301,7 @@ describe('Distributed Lock Service', () => { inMemoryProviderService = new InMemoryProviderService(undefined); expect(inMemoryProviderService.inMemoryProviderConfig.host).toEqual( - '127.0.0.1' + 'localhost' ); distributedLockService = new DistributedLockService(undefined); // If no initializing the service is like the client is not properly set diff --git a/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts b/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts index 5df3d20c912..9fc4bc6d72e 100644 --- a/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts +++ b/packages/application-generic/src/services/in-memory-provider/providers/redis-provider.ts @@ -6,7 +6,7 @@ export { Redis, RedisOptions, ScanStream }; export const CLIENT_READY = 'ready'; const DEFAULT_TTL_SECONDS = 60 * 60 * 2; const DEFAULT_CONNECT_TIMEOUT = 50000; -const DEFAULT_HOST = '127.0.0.1'; +const DEFAULT_HOST = 'localhost'; const DEFAULT_KEEP_ALIVE = 30000; const DEFAULT_KEY_PREFIX = ''; const DEFAULT_FAMILY = 4; diff --git a/packages/cli/src/constants/constants.ts b/packages/cli/src/constants/constants.ts index a266eb4af0a..62925eb7735 100644 --- a/packages/cli/src/constants/constants.ts +++ b/packages/cli/src/constants/constants.ts @@ -2,7 +2,7 @@ import * as getPort from 'get-port'; import * as dotenv from 'dotenv'; // see https://github.com/motdotla/dotenv#how-do-i-use-dotenv-with-import dotenv.config(); // CLI Server -export const SERVER_HOST = '127.0.0.1'; +export const SERVER_HOST = 'localhost'; export const REDIRECT_ROUTE = '/cli/callback'; export const WIDGET_DEMO_ROUTE = '/demo'; export const TRIGGER_ROUTE = '/trigger'; diff --git a/providers/infobip/src/lib/infobip.provider.spec.ts b/providers/infobip/src/lib/infobip.provider.spec.ts index c8e554831ad..eb137509e70 100644 --- a/providers/infobip/src/lib/infobip.provider.spec.ts +++ b/providers/infobip/src/lib/infobip.provider.spec.ts @@ -2,7 +2,7 @@ import { InfobipEmailProvider, InfobipSmsProvider } from './infobip.provider'; test('should trigger infobip library correctly - SMS', async () => { const provider = new InfobipSmsProvider({ - baseUrl: '127.0.0.1', + baseUrl: 'localhost', apiKey: '', }); @@ -43,7 +43,7 @@ test('should trigger infobip library correctly - SMS', async () => { }); test('should trigger infobip library correctly - E-mail', async () => { const provider = new InfobipEmailProvider({ - baseUrl: '127.0.0.1', + baseUrl: 'localhost', apiKey: '', }); diff --git a/scripts/jarvis.js b/scripts/jarvis.js index 8f78eb69a90..28725c43a8b 100644 --- a/scripts/jarvis.js +++ b/scripts/jarvis.js @@ -100,19 +100,19 @@ async function setupRunner() { shell.exec('npm run start:dev', { async: true }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3000, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3004, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 4500, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 4200, }); @@ -134,15 +134,15 @@ async function setupRunner() { shell.exec('npm run start:worker', { async: true }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3000, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3002, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3004, }); @@ -167,11 +167,11 @@ async function setupRunner() { shell.exec('npm run start:worker', { async: true }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3000, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 3004, }); @@ -186,7 +186,7 @@ async function setupRunner() { shell.exec('npm run start:worker:test', { async: true }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 1342, }); @@ -196,7 +196,7 @@ async function setupRunner() { shell.exec('npm run start:worker:test', { async: true }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 1342, }); @@ -210,22 +210,22 @@ async function setupRunner() { shell.exec('cd apps/web && npm run start', { async: true }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 1336, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 1340, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 1342, }); await waitPort({ - host: '127.0.0.1', + host: 'localhost', port: 4200, }); From d5d797a022bb24d32f368a8bf87eb63f94247a9f Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 15:38:27 +0300 Subject: [PATCH 12/19] Revert "fix: localhost pointer" This reverts commit fa0fe3acc0be9c52bea4a119f0ddc89634ad8876. --- .github/workflows/reusable-web-e2e.yml | 2 +- .github/workflows/reusable-widget-e2e.yml | 4 ++-- apps/inbound-mail/.example.env | 2 +- apps/inbound-mail/src/.env.development | 2 +- apps/inbound-mail/src/.env.production | 2 +- apps/inbound-mail/src/.env.test | 2 +- apps/inbound-mail/src/main.ts | 2 +- apps/inbound-mail/src/server/index.ts | 2 +- providers/kannel/src/lib/kannel.provider.spec.ts | 11 ++++------- 9 files changed, 13 insertions(+), 16 deletions(-) diff --git a/.github/workflows/reusable-web-e2e.yml b/.github/workflows/reusable-web-e2e.yml index bd6972e205b..1301ab669d7 100644 --- a/.github/workflows/reusable-web-e2e.yml +++ b/.github/workflows/reusable-web-e2e.yml @@ -85,7 +85,7 @@ jobs: cd apps/ws && pnpm start:test & - name: Wait on Services - run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:4200/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:4200/ # run cypress install only when cache was not hit - name: Cypress install diff --git a/.github/workflows/reusable-widget-e2e.yml b/.github/workflows/reusable-widget-e2e.yml index b6b68e62368..37909bf80a3 100644 --- a/.github/workflows/reusable-widget-e2e.yml +++ b/.github/workflows/reusable-widget-e2e.yml @@ -87,7 +87,7 @@ jobs: cd apps/ws && pnpm start:prod & - name: Wait on Widget and WS Services - run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:3500/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:3500/ - name: Cypress install if: steps.setup-project.outputs.cypress_cache_hit != 'true' @@ -102,7 +102,7 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_WIDGET_KEY }} with: working-directory: apps/widget - wait-on: http://127.0.0.1:3500/ + wait-on: http://0.0.0.0:3500/ browser: chrome install: false record: true diff --git a/apps/inbound-mail/.example.env b/apps/inbound-mail/.example.env index cc801826134..cb33a758e93 100644 --- a/apps/inbound-mail/.example.env +++ b/apps/inbound-mail/.example.env @@ -1,5 +1,5 @@ POST="25" -HOST="127.0.0.1" +HOST="0.0.0.0" REDIS_DB_INDEX="2" diff --git a/apps/inbound-mail/src/.env.development b/apps/inbound-mail/src/.env.development index 47afdea9fe5..5ed27ba166f 100644 --- a/apps/inbound-mail/src/.env.development +++ b/apps/inbound-mail/src/.env.development @@ -1,7 +1,7 @@ NODE_ENV=dev POST="25" -HOST="127.0.0.1" +HOST="0.0.0.0" REDIS_PORT="6379" diff --git a/apps/inbound-mail/src/.env.production b/apps/inbound-mail/src/.env.production index 87217b06b4a..eab410478bc 100644 --- a/apps/inbound-mail/src/.env.production +++ b/apps/inbound-mail/src/.env.production @@ -1,7 +1,7 @@ NODE_ENV=production POST="25" -HOST="127.0.0.1" +HOST="0.0.0.0" REDIS_HOST="localhost" REDIS_PORT=6379 diff --git a/apps/inbound-mail/src/.env.test b/apps/inbound-mail/src/.env.test index 0f03ba716dd..8f58f5f941d 100644 --- a/apps/inbound-mail/src/.env.test +++ b/apps/inbound-mail/src/.env.test @@ -1,7 +1,7 @@ NODE_ENV=test PORT="2500" -HOST="127.0.0.1" +HOST="0.0.0.0" REDIS_DB_INDEX=2 diff --git a/apps/inbound-mail/src/main.ts b/apps/inbound-mail/src/main.ts index 1a011d8822f..7609617b97c 100644 --- a/apps/inbound-mail/src/main.ts +++ b/apps/inbound-mail/src/main.ts @@ -22,7 +22,7 @@ if (process.env.SENTRY_DSN) { export default mailin.start( { port: env.PORT || 25, - host: env.HOST || '127.0.0.1', + host: env.HOST || '0.0.0.0', disableDkim: env.disableDkim, disableSpf: env.disableSpf, disableSpamScore: env.disableSpamScore, diff --git a/apps/inbound-mail/src/server/index.ts b/apps/inbound-mail/src/server/index.ts index 1fee1c4442c..d8ec1afc28d 100644 --- a/apps/inbound-mail/src/server/index.ts +++ b/apps/inbound-mail/src/server/index.ts @@ -33,7 +33,7 @@ class Mailin extends events.EventEmitter { super(); this.configuration = { - host: '127.0.0.1', + host: '0.0.0.0', port: 2500, tmp: '.tmp', disableWebhook: true, diff --git a/providers/kannel/src/lib/kannel.provider.spec.ts b/providers/kannel/src/lib/kannel.provider.spec.ts index 1374e41ccee..e733906e384 100644 --- a/providers/kannel/src/lib/kannel.provider.spec.ts +++ b/providers/kannel/src/lib/kannel.provider.spec.ts @@ -9,7 +9,7 @@ test('should trigger Kannel SMS axios request correctly', async () => { jest.spyOn(axios, 'get').mockImplementation(fakeGet); const provider = new KannelSmsProvider({ - host: '127.0.0.1', + host: '0.0.0.0', port: '13000', from: '0000', }); @@ -29,10 +29,7 @@ test('should trigger Kannel SMS axios request correctly', async () => { }); expect(fakeGet).toHaveBeenCalled(); - expect(fakeGet).toHaveBeenCalledWith( - 'http://127.0.0.1:13000/cgi-bin/sendsms', - { - params: testQueryParams, - } - ); + expect(fakeGet).toHaveBeenCalledWith('http://0.0.0.0:13000/cgi-bin/sendsms', { + params: testQueryParams, + }); }); From f996437f4c22a4b4f7d10895db7e91a79d44663c Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 16:50:01 +0300 Subject: [PATCH 13/19] fix: update localhost values --- .github/workflows/reusable-web-e2e.yml | 2 +- .github/workflows/reusable-widget-e2e.yml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/reusable-web-e2e.yml b/.github/workflows/reusable-web-e2e.yml index 1301ab669d7..bd6972e205b 100644 --- a/.github/workflows/reusable-web-e2e.yml +++ b/.github/workflows/reusable-web-e2e.yml @@ -85,7 +85,7 @@ jobs: cd apps/ws && pnpm start:test & - name: Wait on Services - run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:4200/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:4200/ # run cypress install only when cache was not hit - name: Cypress install diff --git a/.github/workflows/reusable-widget-e2e.yml b/.github/workflows/reusable-widget-e2e.yml index 37909bf80a3..b6b68e62368 100644 --- a/.github/workflows/reusable-widget-e2e.yml +++ b/.github/workflows/reusable-widget-e2e.yml @@ -87,7 +87,7 @@ jobs: cd apps/ws && pnpm start:prod & - name: Wait on Widget and WS Services - run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://0.0.0.0:3500/ + run: wait-on --timeout=180000 http://127.0.0.1:1340/v1/health-check http://127.0.0.1:3500/ - name: Cypress install if: steps.setup-project.outputs.cypress_cache_hit != 'true' @@ -102,7 +102,7 @@ jobs: CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_WIDGET_KEY }} with: working-directory: apps/widget - wait-on: http://0.0.0.0:3500/ + wait-on: http://127.0.0.1:3500/ browser: chrome install: false record: true From 077eab9cbe9852213ae152782b581ec6480d9886 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 16:51:58 +0300 Subject: [PATCH 14/19] fix: restore ipv 4 address --- apps/inbound-mail/.example.env | 2 +- apps/inbound-mail/src/.env.development | 2 +- apps/inbound-mail/src/.env.production | 2 +- apps/inbound-mail/src/.env.test | 2 +- apps/inbound-mail/src/main.ts | 2 +- apps/inbound-mail/src/server/index.ts | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/apps/inbound-mail/.example.env b/apps/inbound-mail/.example.env index cb33a758e93..cc801826134 100644 --- a/apps/inbound-mail/.example.env +++ b/apps/inbound-mail/.example.env @@ -1,5 +1,5 @@ POST="25" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_DB_INDEX="2" diff --git a/apps/inbound-mail/src/.env.development b/apps/inbound-mail/src/.env.development index 5ed27ba166f..47afdea9fe5 100644 --- a/apps/inbound-mail/src/.env.development +++ b/apps/inbound-mail/src/.env.development @@ -1,7 +1,7 @@ NODE_ENV=dev POST="25" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_PORT="6379" diff --git a/apps/inbound-mail/src/.env.production b/apps/inbound-mail/src/.env.production index eab410478bc..87217b06b4a 100644 --- a/apps/inbound-mail/src/.env.production +++ b/apps/inbound-mail/src/.env.production @@ -1,7 +1,7 @@ NODE_ENV=production POST="25" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_HOST="localhost" REDIS_PORT=6379 diff --git a/apps/inbound-mail/src/.env.test b/apps/inbound-mail/src/.env.test index 8f58f5f941d..0f03ba716dd 100644 --- a/apps/inbound-mail/src/.env.test +++ b/apps/inbound-mail/src/.env.test @@ -1,7 +1,7 @@ NODE_ENV=test PORT="2500" -HOST="0.0.0.0" +HOST="127.0.0.1" REDIS_DB_INDEX=2 diff --git a/apps/inbound-mail/src/main.ts b/apps/inbound-mail/src/main.ts index 7609617b97c..1a011d8822f 100644 --- a/apps/inbound-mail/src/main.ts +++ b/apps/inbound-mail/src/main.ts @@ -22,7 +22,7 @@ if (process.env.SENTRY_DSN) { export default mailin.start( { port: env.PORT || 25, - host: env.HOST || '0.0.0.0', + host: env.HOST || '127.0.0.1', disableDkim: env.disableDkim, disableSpf: env.disableSpf, disableSpamScore: env.disableSpamScore, diff --git a/apps/inbound-mail/src/server/index.ts b/apps/inbound-mail/src/server/index.ts index d8ec1afc28d..1fee1c4442c 100644 --- a/apps/inbound-mail/src/server/index.ts +++ b/apps/inbound-mail/src/server/index.ts @@ -33,7 +33,7 @@ class Mailin extends events.EventEmitter { super(); this.configuration = { - host: '0.0.0.0', + host: '127.0.0.1', port: 2500, tmp: '.tmp', disableWebhook: true, From 32db13252cb6e397b1318f497d49279ff9b57ab9 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 17:54:48 +0300 Subject: [PATCH 15/19] Update .cspell.json Co-authored-by: Richard Fontein <32132657+rifont@users.noreply.github.com> --- .cspell.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.cspell.json b/.cspell.json index 3633bc3a600..69739fe0de2 100644 --- a/.cspell.json +++ b/.cspell.json @@ -499,7 +499,6 @@ "reactjs", "nextjs", "vanillajs", - "quckstart", "errmsg", "devcontainer", "INITDB", From f817bad088d2807ffe27ab6fdb6ae2725675344f Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 18:58:17 +0300 Subject: [PATCH 16/19] fix: node 20 update --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- .github/actions/setup-project/action.yml | 2 +- .github/workflows/community-label.yml | 2 +- .github/workflows/issue-label.yml | 2 +- .github/workflows/milestone-assign.yml | 2 +- .github/workflows/tag-images.yml | 2 +- .nvmrc | 2 +- CONTRIBUTING.md | 2 +- package.json | 2 +- scripts/dev-environment-setup.sh | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 83a71d70d52..c0b29ba2813 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -64,7 +64,7 @@ body: attributes: label: node version description: In case of self-hosting or local installation mention the node version. If using our cloud-managed solution, mention NA. - placeholder: 18.0.0 + placeholder: 20.0.0 - type: textarea id: additional-context validations: diff --git a/.github/actions/setup-project/action.yml b/.github/actions/setup-project/action.yml index 3f37634402b..8100947ce96 100644 --- a/.github/actions/setup-project/action.yml +++ b/.github/actions/setup-project/action.yml @@ -28,7 +28,7 @@ runs: - uses: actions/setup-node@v3 name: ⚙️ Setup Node Version with: - node-version: '18.17.1' + node-version: '20.8.1' cache: 'pnpm' - name: 💵 Start Redis diff --git a/.github/workflows/community-label.yml b/.github/workflows/community-label.yml index a7b9f508300..bac384db43b 100644 --- a/.github/workflows/community-label.yml +++ b/.github/workflows/community-label.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20.8.1 - name: Install Octokit run: npm --prefix .github/workflows/scripts install @octokit/action diff --git a/.github/workflows/issue-label.yml b/.github/workflows/issue-label.yml index fd783bfcf15..9c07d7ed6ee 100644 --- a/.github/workflows/issue-label.yml +++ b/.github/workflows/issue-label.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20.8.1 - name: Install Octokit run: npm --prefix .github/workflows/scripts install @octokit/action diff --git a/.github/workflows/milestone-assign.yml b/.github/workflows/milestone-assign.yml index 8dee14fb807..517fef45c76 100644 --- a/.github/workflows/milestone-assign.yml +++ b/.github/workflows/milestone-assign.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/setup-node@v3 with: - node-version: 18 + node-version: 20.8.1 - name: Install Octokit run: npm --prefix .github/workflows/scripts install @octokit/action diff --git a/.github/workflows/tag-images.yml b/.github/workflows/tag-images.yml index 8cc14d0e822..9ea6f242c0b 100644 --- a/.github/workflows/tag-images.yml +++ b/.github/workflows/tag-images.yml @@ -26,7 +26,7 @@ jobs: run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p - uses: actions/setup-node@v3 with: - node-version: '18.17.1' + node-version: '20.8.1' - name: Login to docker env: diff --git a/.nvmrc b/.nvmrc index 4a1f488b6c3..6569dfa4f32 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -18.17.1 +20.8.1 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index bc788cd85a0..924da592a6a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ You can open a new issue with this [issue form](https://github.com/novuhq/novu/i ### Requirements -- Node.js version v18.17.1 (LTS) +- Node.js version v20.8.1 (LTS) - MongoDB - Redis. To install Redis on your O.S, please follow the below guides - [To install Redis on Windows](https://redis.io/docs/getting-started/installation/install-redis-on-windows/) diff --git a/package.json b/package.json index e37df5e273a..c5d27dc122c 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ } }, "engines": { - "node": ">=18 <19", + "node": ">=20 <21", "pnpm": "^8.9.0" }, "dependencies": { diff --git a/scripts/dev-environment-setup.sh b/scripts/dev-environment-setup.sh index 1eaf7008453..63fa2d3702b 100755 --- a/scripts/dev-environment-setup.sh +++ b/scripts/dev-environment-setup.sh @@ -261,7 +261,7 @@ check_nvm () { } install_node () { - NODE_JS_VERSION="v18.17.1" + NODE_JS_VERSION="v20.8.1" SKIP="$(check_nvm)" From b893e8d22bacbe09f19357b1d72b9509eb3a58cc Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Tue, 17 Oct 2023 19:00:09 +0300 Subject: [PATCH 17/19] chore: update docker images --- .devcontainer/Dockerfile | 2 +- .devcontainer/docker-compose.yml | 4 ++-- apps/api/Dockerfile | 2 +- apps/inbound-mail/Dockerfile | 2 +- apps/web/Dockerfile | 4 ++-- apps/webhook/Dockerfile | 2 +- apps/widget/Dockerfile | 2 +- apps/worker/Dockerfile | 2 +- apps/ws/Dockerfile | 2 +- libs/embed/Dockerfile | 2 +- 10 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ef1458067b2..a7b9f9f3d05 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,5 +1,5 @@ # [Choice] Node.js version (use -bullseye variants on local arm64/Apple Silicon): 16, 14, 12, 16-bullseye, 14-bullseye, 12-bullseye, 16-buster, 14-buster, 12-buster -ARG VARIANT=18-bullseye +ARG VARIANT=20-bullseye FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT} # Install MongoDB command line tools if on buster and x86_64 (arm64 not supported) diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index 8ecbfd6112d..9a5217e90a2 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -9,7 +9,7 @@ services: # Update 'VARIANT' to pick an LTS version of Node.js: 16, 14, 12. # Append -bullseye or -buster to pin to an OS version. # Use -bullseye variants on local arm64/Apple Silicon. - VARIANT: 18-bullseye + VARIANT: 20-bullseye volumes: - ..:/workspace:cached @@ -21,7 +21,7 @@ services: # Uncomment the next line to use a non-root user for all processes. # user: node - # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. + # Use "forwardPorts" in **devcontainer.json** to forward an app port locally. # (Adding the "ports" property to this file will not forward from a Codespace.) db: diff --git a/apps/api/Dockerfile b/apps/api/Dockerfile index 0138efcd41d..9ebbc6dbca1 100644 --- a/apps/api/Dockerfile +++ b/apps/api/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine as dev_base ARG BULL_MQ_PRO_TOKEN ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN diff --git a/apps/inbound-mail/Dockerfile b/apps/inbound-mail/Dockerfile index 418f9527d7d..6c28ed00808 100644 --- a/apps/inbound-mail/Dockerfile +++ b/apps/inbound-mail/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine as dev_base ARG BULL_MQ_PRO_TOKEN ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN diff --git a/apps/web/Dockerfile b/apps/web/Dockerfile index e1a57f980dd..7055ddf802c 100644 --- a/apps/web/Dockerfile +++ b/apps/web/Dockerfile @@ -1,5 +1,5 @@ # start build stage -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as builder +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine as builder ENV NX_DAEMON=false WORKDIR /usr/src/app @@ -37,7 +37,7 @@ RUN NX_DAEMON=false pnpm build:web # end build stage # start production stage -FROM node:18-alpine +FROM node:20-alpine WORKDIR /app diff --git a/apps/webhook/Dockerfile b/apps/webhook/Dockerfile index 617e5028dd5..0bd03a51373 100644 --- a/apps/webhook/Dockerfile +++ b/apps/webhook/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine as dev_base ENV NX_DAEMON=false RUN npm i pm2 -g diff --git a/apps/widget/Dockerfile b/apps/widget/Dockerfile index 3c65fe8db71..5a002e1f3be 100644 --- a/apps/widget/Dockerfile +++ b/apps/widget/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine ENV NX_DAEMON=false WORKDIR /usr/src/app diff --git a/apps/worker/Dockerfile b/apps/worker/Dockerfile index 8e0e4667f14..13ae856459f 100644 --- a/apps/worker/Dockerfile +++ b/apps/worker/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine as dev_base +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine as dev_base RUN apk --update --no-cache add curl ENV NX_DAEMON=false diff --git a/apps/ws/Dockerfile b/apps/ws/Dockerfile index aabdaac1e9e..1be83a9c56d 100644 --- a/apps/ws/Dockerfile +++ b/apps/ws/Dockerfile @@ -1,4 +1,4 @@ -FROM node:18-alpine3.16 +FROM node:20-alpine3.16 ARG BULL_MQ_PRO_TOKEN ENV BULL_MQ_PRO_NPM_TOKEN=$BULL_MQ_PRO_TOKEN diff --git a/libs/embed/Dockerfile b/libs/embed/Dockerfile index 5903dd2b988..fa9ef210533 100644 --- a/libs/embed/Dockerfile +++ b/libs/embed/Dockerfile @@ -1,4 +1,4 @@ -FROM nikolaik/python-nodejs:python3.10-nodejs18-alpine +FROM nikolaik/python-nodejs:python3.10-nodejs20-alpine WORKDIR /usr/src/app From aeb6a0823575fe812d6a5ef7393579aa76b93c61 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Thu, 28 Dec 2023 14:15:53 +0200 Subject: [PATCH 18/19] fix: replace localhost --- .github/workflows/reusable-docker.yml | 2 +- .idea/vcs.xml | 1 + apps/api/package.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/reusable-docker.yml b/.github/workflows/reusable-docker.yml index cee0ca1f369..0aa0c1345eb 100644 --- a/.github/workflows/reusable-docker.yml +++ b/.github/workflows/reusable-docker.yml @@ -146,4 +146,4 @@ jobs: echo $GH_PASSWORD | docker login ghcr.io -u $GH_ACTOR --password-stdin docker run --network=host --name $LOCAL_TAG -dit --env NODE_ENV=test ghcr.io/$REGISTRY_OWNER/$DOCKER_NAME:$IMAGE_TAG - docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://localhost:$TEST_PORT/v1/health-check | grep 'ok' + docker run --network=host appropriate/curl --retry 10 --retry-delay 5 --retry-connrefused http://127.0.0.1:$TEST_PORT/v1/health-check | grep 'ok' diff --git a/.idea/vcs.xml b/.idea/vcs.xml index a46828097c7..164e953630f 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -18,5 +18,6 @@ + \ No newline at end of file diff --git a/apps/api/package.json b/apps/api/package.json index e4a9c1c43d0..6c942b993d8 100644 --- a/apps/api/package.json +++ b/apps/api/package.json @@ -20,7 +20,7 @@ "start:build": "TZ=UTC node dist/main.js", "lint": "eslint src", "lint:fix": "pnpm lint -- --fix", - "lint:openapi": "spectral lint http://localhost:${PORT:-3000}/openapi.yaml", + "lint:openapi": "spectral lint http://127.0.0.1:${PORT:-3000}/openapi.yaml", "test": "cross-env TS_NODE_COMPILER_OPTIONS='{\"strictNullChecks\": false}' TZ=UTC NODE_ENV=test E2E_RUNNER=true mocha --require ts-node/register --exit --file e2e/setup.ts src/**/**/*.spec.ts", "test:e2e": "cross-env TS_NODE_COMPILER_OPTIONS='{\"strictNullChecks\": false}' TZ=UTC NODE_ENV=test E2E_RUNNER=true mocha --require ts-node/register --exit --file e2e/setup.ts src/**/*.e2e.ts", "test:e2e:ee": "cross-env TS_NODE_COMPILER_OPTIONS='{\"strictNullChecks\": false}' TZ=UTC NODE_ENV=test E2E_RUNNER=true mocha --require ts-node/register --exit --file e2e/setup.ts src/**/*.e2e-ee.ts", From 38026299b9527139daefeea2f576900c47a4bf52 Mon Sep 17 00:00:00 2001 From: Dima Grossman Date: Thu, 28 Dec 2023 14:17:20 +0200 Subject: [PATCH 19/19] fix: test --- enterprise | 1 - 1 file changed, 1 deletion(-) delete mode 160000 enterprise diff --git a/enterprise b/enterprise deleted file mode 160000 index 73dab96e0f6..00000000000 --- a/enterprise +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 73dab96e0f63f2f988fa3348c77b4a691d63ea8d