Skip to content

Commit 7059025

Browse files
authored
chore: add back BrowserOp, make changes to CI env (danny-avila#1088)
* chore: add back BrowserOp * chore: make CI env and not DEV env generate refresh tokens every time * chore: make 'CI' env var captilization uniform across the app * chore: change NODE_ENV for playwright to
1 parent 4073b7d commit 7059025

File tree

9 files changed

+26
-8
lines changed

9 files changed

+26
-8
lines changed

.github/workflows/backend-review.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
BAN_VIOLATIONS: ${{ secrets.BAN_VIOLATIONS }}
2222
BAN_DURATION: ${{ secrets.BAN_DURATION }}
2323
BAN_INTERVAL: ${{ secrets.BAN_INTERVAL }}
24-
NODE_ENV: ci
24+
NODE_ENV: CI
2525
steps:
2626
- uses: actions/checkout@v2
2727
- name: Use Node.js 20.x

.github/workflows/playwright.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
timeout-minutes: 60
1818
runs-on: ubuntu-latest
1919
env:
20-
NODE_ENV: ci
20+
NODE_ENV: CI
2121
CI: true
2222
SEARCH: false
2323
BINGAI_TOKEN: user_provided
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"schema_version": "v1",
3+
"name_for_human": "BrowserOp",
4+
"name_for_model": "BrowserOp",
5+
"description_for_human": "Browse dozens of webpages in one query. Fetch information more efficiently.",
6+
"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.",
7+
"auth": {
8+
"type": "none"
9+
},
10+
"api": {
11+
"type": "openapi",
12+
"url": "https://testplugin.feednews.com/.well-known/openapi.yaml"
13+
},
14+
"logo_url": "https://openapi-af.op-mobile.opera.com/openapi/testplugin/.well-known/logo.png",
15+
"contact_email": "aiplugins-contact-list@opera.com",
16+
"legal_info_url": "https://legal.apexnews.com/terms/"
17+
}

api/server/controllers/AuthController.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const refreshController = async (req, res) => {
9090
return res.status(401).redirect('/login');
9191
}
9292

93-
if (process.env.NODE_ENV === 'development') {
93+
if (process.env.NODE_ENV === 'CI') {
9494
const token = await setAuthTokens(userId, res);
9595
const userObj = user.toJSON();
9696
return res.status(200).send({ token, user: userObj });

config/install.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ if (!process.stdin.isTTY) {
1212
}
1313

1414
// If we are in CI env, lets exit
15-
if (process.env.NODE_ENV === 'ci') {
15+
if (process.env.NODE_ENV === 'CI') {
1616
console.log('Note: we are in a CI environment, skipping install script.');
1717
exit(0);
1818
}

config/loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ class Env {
241241
* @returns {Boolean}
242242
*/
243243
isCI() {
244-
return this.currentEnvironment() === 'ci';
244+
return this.currentEnvironment() === 'CI';
245245
}
246246
}
247247

e2e/playwright.config.local.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ const config: PlaywrightTestConfig = {
1616
env: {
1717
...process.env,
1818
SEARCH: 'false',
19-
NODE_ENV: 'development',
19+
NODE_ENV: 'CI',
20+
TITLE_CONVO: 'false',
2021
SESSION_EXPIRY: '60000',
2122
REFRESH_TOKEN_EXPIRY: '300000',
2223
},

e2e/playwright.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ export default defineConfig({
6262
reuseExistingServer: true,
6363
env: {
6464
...process.env,
65+
NODE_ENV: 'CI',
6566
SEARCH: 'false',
66-
NODE_ENV: 'development',
6767
SESSION_EXPIRY: '60000',
6868
ALLOW_REGISTRATION: 'true',
6969
REFRESH_TOKEN_EXPIRY: '300000',

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
"upgrade": "node config/upgrade.js",
2727
"create-user": "node config/create-user.js",
2828
"backend": "cross-env NODE_ENV=production node api/server/index.js",
29-
"backend:dev": "cross-env NODE_ENV=production npx nodemon api/server/index.js",
29+
"backend:dev": "cross-env NODE_ENV=development npx nodemon api/server/index.js",
3030
"backend:stop": "node config/stop-backend.js",
3131
"build:data-provider": "cd packages/data-provider && npm run build",
3232
"frontend": "npm run build:data-provider && cd client && npm run build",

0 commit comments

Comments
 (0)