Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync prod with main #1430

Merged
merged 10 commits into from
May 9, 2024
2 changes: 1 addition & 1 deletion .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ runs:
# fail the build if any generated javascript contains 'eval' to help mitigate the need for script-src unsafe-eval CSP
if find html -name "*.js" | xargs grep -El "\beval\("; then echo '"eval" found'; exit 99; else echo '"eval" not found'; fi
- name: Upload built outputs
uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
with:
name: build-output
path: html
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
runs:
using: composite
steps:
- uses: actions/download-artifact@c850b930e6ba138125429b7e5c93fc707a7f8427 # v4.1.4
- uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
with:
name: build-output
path: html
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Build
uses: ./.github/actions/build
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0
uses: github/codeql-action/init@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -53,7 +53,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0
uses: github/codeql-action/autobuild@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -67,4 +67,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@df5a14dc28094dc936e103b37d749c6628682b60 # v3.25.0
uses: github/codeql-action/analyze@d39d31e687223d841ef683f52467bd88e9b21c14 # v3.25.3
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-development-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -27,7 +27,7 @@ jobs:
url: https://talk.brave.software

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-development2-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -27,7 +27,7 @@ jobs:
url: https://dev2.talk.brave.software

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-development3-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -27,7 +27,7 @@ jobs:
url: https://dev3.talk.brave.software

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-production-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -26,7 +26,7 @@ jobs:
url: https://talk.brave.com

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-to-staging-premium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Build
uses: ./.github/actions/build
with:
Expand All @@ -26,7 +26,7 @@ jobs:
url: https://talk.bravesoftware.com

steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4

- name: Configure aws credentials
uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2
Expand Down
42 changes: 21 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"devDependencies": {
"@brave-intl/skus-sdk": "0.1.3",
"@types/jest": "29.5.12",
"@types/react": "18.2.78",
"@types/react": "18.2.79",
"@types/react-dom": "18.2.25",
"@typescript-eslint/eslint-plugin": "6.21.0",
"@typescript-eslint/parser": "6.21.0",
Expand All @@ -44,7 +44,7 @@
"husky": "9.0.11",
"jest": "29.7.0",
"lint-staged": "15.2.2",
"mini-css-extract-plugin": "2.8.1",
"mini-css-extract-plugin": "2.9.0",
"node-forge": "1.3.1",
"npm-run-all2": "6.1.2",
"prettier": "3.2.5",
Expand All @@ -61,7 +61,7 @@
"@emotion/react": "11.11.4",
"@types/dom-screen-wake-lock": "1.0.3",
"buffer": "6.0.3",
"ethers": "6.11.1",
"ethers": "6.12.0",
"i18next": "23.11.2",
"jest-environment-jsdom": "29.7.0",
"react": "18.2.0",
Expand Down
25 changes: 17 additions & 8 deletions src/environment.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
export const env = process.env.ENVIRONMENT ?? "local";
export const isDevelopment = env.startsWith("development") || env === "local";
const useJaasPilot = isDevelopment && env !== "development2";

let vpaas = "";
if (isDevelopment) {
if (useJaasPilot) {
vpaas = "vpaas-magic-cookie-41b5e4eb989e414cac4fe7f51400a1d7";
} else {
vpaas = "vpaas-magic-cookie-cd4131ef77674a71b73411408226e232";
}
} else if (env === "staging") {
vpaas = "vpaas-magic-cookie-520aa9362071418c8a8661950bc0a470";
} else {
vpaas = "vpaas-magic-cookie-a4818bd762a044998d717b70ac734cfe";
}

export const config = {
vpaas: isDevelopment
? "vpaas-magic-cookie-41b5e4eb989e414cac4fe7f51400a1d7"
: env === "staging"
? "vpaas-magic-cookie-520aa9362071418c8a8661950bc0a470"
: env === "local"
? "vpaas-magic-cookie-cd4131ef77674a71b73411408226e232"
: "vpaas-magic-cookie-a4818bd762a044998d717b70ac734cfe",
webrtc_domain: isDevelopment ? "stage.8x8.vc" : "8x8.vc",
vpaas,
webrtc_domain: useJaasPilot ? "stage.8x8.vc" : "8x8.vc",
};

export const isProduction = env === "production";
2 changes: 1 addition & 1 deletion src/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"start_web3_call": "Start a Web3 Call",
"subscribe_login_link": "Log in",
"subscribe_login_premium": "Already have Premium?",
"subscribe_login_text": "Trial brings 30 days of free access to Brave Talk Premium. After 30 days, the credit card you enter will be charged $7.00 US per month. Cancel any time.",
"subscribe_login_text": "Trial brings 7 days of free access to Brave Talk Premium. After 7 days, the credit card you enter will be charged $7.00 US per month. Cancel any time.",
"subscribe_text": "Host video calls with hundreds of people, get moderator controls, and more.",
"talk_title": "Brave Talk",
"talk_title_premium": "Brave Talk Premium",
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/jp/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"start_web3_call": "Web3通話を開始する",
"subscribe_login_link": "ログイン",
"subscribe_login_premium": "すでにプレミアムプランを購入していますか?",
"subscribe_login_text": "30日間Brave Talkプレミアムを無料で試してみましょう。30日後、登録されたクレジットカードに毎月7ドルが請求されます。解約はいつでも可能です。",
"subscribe_login_text": "7日間Brave Talkプレミアムを無料で試してみましょう。7日後、登録されたクレジットカードに毎月7ドルが請求されます。解約はいつでも可能です。",
"subscribe_text": "大人数が参加可能なビデオ通話を行うには、プランのアップグレードが必要です。",
"talk_title": "Brave Talk",
"talk_title_premium": "Brave Talk プレミアム",
Expand Down