@amplitude/ampli
Version:
Amplitude CLI
42 lines (41 loc) • 1.63 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OAuthRefreshTokenTTLHours = exports.OAuthAccessTokenTTLHours = exports.APP_SETTINGS = exports.ZONE_SETTINGS = void 0;
const { version } = require('../package.json');
const sentryEnabled = process.env.AMPLI_SENTRY !== 'disabled';
const sentryDSN = sentryEnabled ? 'https://f2587c0897834285be5dab446d5387db@o13027.ingest.sentry.io/5974462' : undefined;
const environment = process.env.APP_ENV || 'production';
exports.ZONE_SETTINGS = {
us: {
apiUrl: 'https://data-api.amplitude.com/graphql',
webUrl: 'https://data.amplitude.com/',
oAuthHost: 'https://auth.amplitude.com/',
oAuthClientId: 'cli-client-pkce',
},
eu: {
apiUrl: 'https://data-api.eu.amplitude.com/graphql',
webUrl: 'https://data.eu.amplitude.com/',
oAuthHost: 'https://auth.eu.amplitude.com/',
oAuthClientId: 'cli-client-pkce',
},
};
exports.APP_SETTINGS = Object.freeze({
localDevelopment: process.env.LOCAL_DEVELOPMENT === 'true',
app: {
environment,
version: process.env.AMPLI_VERSION || version,
},
ampli: (zone) => ({
apiUrl: (process.env.API_URL || exports.ZONE_SETTINGS[zone].apiUrl).replace(/\/+$/, ''),
webUrl: (process.env.APP_URL || exports.ZONE_SETTINGS[zone].webUrl).replace(/\/+$/, ''),
}),
sentry: {
enabled: sentryEnabled,
dsn: sentryDSN,
release: `ampli@${version}`,
environment,
},
NODE_VERSION_MINIMUM: 12,
});
exports.OAuthAccessTokenTTLHours = 1;
exports.OAuthRefreshTokenTTLHours = 8760;