Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions frontend/api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ app.get('/config/project-overrides', (req, res) => {
name: 'e2eToken',
value: process.env[`E2E_TEST_TOKEN_${(process.env.ENV || 'dev').toUpperCase()}`] || process.env.E2E_TEST_TOKEN || '',
},
{
name: 'evaluationAnalyticsServerUrl',
value: process.env.EVALUATION_ANALYTICS_SERVER_URL,
},
]
let output = values.map(getVariable).join('')
res.setHeader('Cache-Control', 's-max-age=1, stale-while-revalidate')
Expand Down
2 changes: 1 addition & 1 deletion frontend/common/loadChat.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import moment from 'moment'
import AccountStore from './stores/account-store'
import { getStore } from './store'
Expand Down
2 changes: 1 addition & 1 deletion frontend/common/providers/ConfigProvider.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import ConfigStore from 'common/stores/config-store'

export default (WrappedComponent) => {
Expand Down
7 changes: 7 additions & 0 deletions frontend/common/stores/config-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,13 @@ flagsmith
environmentID: Project.flagsmith,
onChange: controller.loaded,
realtime: window.E2E ? false : Project.flagsmithRealtime,
...(Project.evaluationAnalyticsServerUrl
? {
evaluationAnalyticsConfig: {
analyticsServerUrl: Project.evaluationAnalyticsServerUrl,
},
}
: {}),
})
.catch(() => {
controller.onError()
Expand Down
2 changes: 1 addition & 1 deletion frontend/common/stores/feature-list-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
import Utils from 'common/utils/utils'
import Actions from 'common/dispatcher/action-constants'
import Project from 'common/project'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import API from 'project/api'
import { Req } from 'common/types/requests'
import { getVersionFeatureState } from 'common/services/useVersionFeatureState'
Expand Down
2 changes: 1 addition & 1 deletion frontend/common/useViewMode.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import { useState, useCallback } from 'react'

export type ViewMode =
Expand Down
2 changes: 1 addition & 1 deletion frontend/common/utils/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
PConfidence,
UserPermissions,
} from 'common/types/responses'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import { ReactNode } from 'react'
import _ from 'lodash'
import ErrorMessage from 'components/ErrorMessage'
Expand Down
7 changes: 7 additions & 0 deletions frontend/package-lock.json

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@babel/register": "^7.12.1",
"@datadog/ui-extensions-react": "0.32.0",
"@datadog/ui-extensions-sdk": "0.32.0",
"@flagsmith/flagsmith": "^11.0.0-internal.5",
"@ionic/react": "^7.5.3",
"@material-ui/core": "4.12.4",
"@react-oauth/google": "^0.2.8",
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/Announcement.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react'
import InfoMessage from './InfoMessage'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import Utils from 'common/utils/utils'

export type AnnouncementValueType = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/AnnouncementPerPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { FC } from 'react'
import InfoMessage from './InfoMessage'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import Utils from 'common/utils/utils'
import { AnnouncementValueType } from './Announcement'
import { matchPath } from 'react-router-dom'
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/components/JSONReference.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { isArray, isObject } from 'lodash'
import Highlight from './Highlight'
import Button from './base/forms/Button'
import Switch from './Switch'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import Icon from './Icon'
import Utils from 'common/utils/utils'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { useHasPermission } from 'common/providers/Permission'
import Switch from 'components/Switch'
import Tooltip from 'components/Tooltip'
import Icon from 'components/Icon'
import Utils from 'common/utils/utils'
import { useCreateTagMutation, useGetTagsQuery } from 'common/services/useTag'

type CreateFeatureTabProps = {
Expand Down
2 changes: 1 addition & 1 deletion frontend/web/project/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const Cookies = require('js-cookie')
import Project from 'common/project'
import { AccountModel, User } from 'common/types/responses'
import AccountStore from 'common/stores/account-store'
import flagsmith from 'flagsmith'
import flagsmith from '@flagsmith/flagsmith'
import Utils from 'common/utils/utils'
import loadChat, { identifyChatUser } from 'common/loadChat'

Expand Down
2 changes: 1 addition & 1 deletion frontend/web/project/libs.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import flagsmith from 'flagsmith';
import flagsmith from '@flagsmith/flagsmith';
import * as Sentry from '@sentry/browser';
// Optimise lodash
import each from 'lodash/each';
Expand Down
Loading