diff --git a/.github/workflows/backend-review.yml b/.github/workflows/backend-review.yml index a005c10ef..43ed46ce7 100644 --- a/.github/workflows/backend-review.yml +++ b/.github/workflows/backend-review.yml @@ -21,7 +21,7 @@ jobs: BAN_VIOLATIONS: ${{ secrets.BAN_VIOLATIONS }} BAN_DURATION: ${{ secrets.BAN_DURATION }} BAN_INTERVAL: ${{ secrets.BAN_INTERVAL }} - NODE_ENV: ci + NODE_ENV: CI steps: - uses: actions/checkout@v2 - name: Use Node.js 20.x diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index 5e1ddba37..0ede801f8 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -17,7 +17,7 @@ jobs: timeout-minutes: 60 runs-on: ubuntu-latest env: - NODE_ENV: ci + NODE_ENV: CI CI: true SEARCH: false BINGAI_TOKEN: user_provided diff --git a/api/app/clients/tools/.well-known/BrowserOp.json b/api/app/clients/tools/.well-known/BrowserOp.json new file mode 100644 index 000000000..5a3bb86f9 --- /dev/null +++ b/api/app/clients/tools/.well-known/BrowserOp.json @@ -0,0 +1,17 @@ +{ + "schema_version": "v1", + "name_for_human": "BrowserOp", + "name_for_model": "BrowserOp", + "description_for_human": "Browse dozens of webpages in one query. Fetch information more efficiently.", + "description_for_model": "This tool offers the feature for users to input a URL or multiple URLs and interact with them as needed. It's designed to comprehend the user's intent and proffer tailored suggestions in line with the content and functionality of the webpage at hand. Services like text rewrites, translations and more can be requested. When users need specific information to finish a task or if they intend to perform a search, this tool becomes a bridge to the search engine and generates responses based on the results. Whether the user is seeking information about restaurants, rentals, weather, or shopping, this tool connects to the internet and delivers the most recent results.", + "auth": { + "type": "none" + }, + "api": { + "type": "openapi", + "url": "https://testplugin.feednews.com/.well-known/openapi.yaml" + }, + "logo_url": "https://openapi-af.op-mobile.opera.com/openapi/testplugin/.well-known/logo.png", + "contact_email": "aiplugins-contact-list@opera.com", + "legal_info_url": "https://legal.apexnews.com/terms/" +} diff --git a/api/server/controllers/AuthController.js b/api/server/controllers/AuthController.js index 16ba409fd..0c5e2fa9e 100644 --- a/api/server/controllers/AuthController.js +++ b/api/server/controllers/AuthController.js @@ -90,7 +90,7 @@ const refreshController = async (req, res) => { return res.status(401).redirect('/login'); } - if (process.env.NODE_ENV === 'development') { + if (process.env.NODE_ENV === 'CI') { const token = await setAuthTokens(userId, res); const userObj = user.toJSON(); return res.status(200).send({ token, user: userObj }); diff --git a/config/install.js b/config/install.js index 3184db1ab..bc8e0d0a6 100644 --- a/config/install.js +++ b/config/install.js @@ -12,7 +12,7 @@ if (!process.stdin.isTTY) { } // If we are in CI env, lets exit -if (process.env.NODE_ENV === 'ci') { +if (process.env.NODE_ENV === 'CI') { console.log('Note: we are in a CI environment, skipping install script.'); exit(0); } diff --git a/config/loader.js b/config/loader.js index 5c02043cb..401f454b5 100644 --- a/config/loader.js +++ b/config/loader.js @@ -241,7 +241,7 @@ class Env { * @returns {Boolean} */ isCI() { - return this.currentEnvironment() === 'ci'; + return this.currentEnvironment() === 'CI'; } } diff --git a/e2e/playwright.config.local.ts b/e2e/playwright.config.local.ts index 09f499d3e..d9b7c05aa 100644 --- a/e2e/playwright.config.local.ts +++ b/e2e/playwright.config.local.ts @@ -16,7 +16,8 @@ const config: PlaywrightTestConfig = { env: { ...process.env, SEARCH: 'false', - NODE_ENV: 'development', + NODE_ENV: 'CI', + TITLE_CONVO: 'false', SESSION_EXPIRY: '60000', REFRESH_TOKEN_EXPIRY: '300000', }, diff --git a/e2e/playwright.config.ts b/e2e/playwright.config.ts index ea45f1665..83671a9c4 100644 --- a/e2e/playwright.config.ts +++ b/e2e/playwright.config.ts @@ -62,8 +62,8 @@ export default defineConfig({ reuseExistingServer: true, env: { ...process.env, + NODE_ENV: 'CI', SEARCH: 'false', - NODE_ENV: 'development', SESSION_EXPIRY: '60000', ALLOW_REGISTRATION: 'true', REFRESH_TOKEN_EXPIRY: '300000', diff --git a/package.json b/package.json index eb6401d37..0c226c25c 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "upgrade": "node config/upgrade.js", "create-user": "node config/create-user.js", "backend": "cross-env NODE_ENV=production node api/server/index.js", - "backend:dev": "cross-env NODE_ENV=production npx nodemon api/server/index.js", + "backend:dev": "cross-env NODE_ENV=development npx nodemon api/server/index.js", "backend:stop": "node config/stop-backend.js", "build:data-provider": "cd packages/data-provider && npm run build", "frontend": "npm run build:data-provider && cd client && npm run build",