-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(feature-manager): remove Sentry from feature manager
- Loading branch information
1 parent
e62494e
commit 37f6060
Showing
6 changed files
with
33 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,28 @@ | ||
import { FeatureNames, RegisterableFeature } from './types' | ||
import convict, { Schema } from 'convict' | ||
import { url } from 'convict-format-with-validator' | ||
|
||
const sentryFeature: RegisterableFeature<FeatureNames.Sentry> = { | ||
name: FeatureNames.Sentry, | ||
schema: { | ||
sentryConfigUrl: { | ||
doc: 'Sentry.io URL for configuring the Sentry SDK', | ||
format: 'url', | ||
default: null, | ||
env: 'SENTRY_CONFIG_URL', | ||
}, | ||
cspReportUri: { | ||
doc: 'Endpoint for content security policy reporting', | ||
format: 'url', | ||
default: null, | ||
env: 'CSP_REPORT_URI', | ||
}, | ||
export interface ISentry { | ||
sentryConfigUrl: string | ||
cspReportUri: string | ||
} | ||
|
||
convict.addFormat(url) | ||
|
||
const sentryFeature: Schema<ISentry> = { | ||
sentryConfigUrl: { | ||
doc: 'Sentry.io URL for configuring the Sentry SDK', | ||
format: 'url', | ||
default: null, | ||
env: 'SENTRY_CONFIG_URL', | ||
}, | ||
cspReportUri: { | ||
doc: 'Endpoint for content security policy reporting', | ||
format: 'url', | ||
default: null, | ||
env: 'CSP_REPORT_URI', | ||
}, | ||
} | ||
|
||
export default sentryFeature | ||
export const sentryConfig = convict(sentryFeature) | ||
.validate({ allowed: 'strict' }) | ||
.getProperties() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters