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
const { WebAuth } = require('auth0-js'); | |
const url = require('url'); | |
const qs = require('qs'); | |
const exenv = require('exenv'); | |
const config = require('../../config/config.shared'); | |
const helpers = require('./helpers'); | |
const createSession = market => { | |
const { | |
auth0: { audience, domain, clientID, responseType, redirectUri }, |
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
const setGDPRPreferences = data => ({ | |
type: types.SET_GDPR_PREFERENCES, | |
data, | |
}); | |
module.exports = { setGDPRPreferences } |
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
import React from 'react'; | |
import { trackEvent } from './tealium'; | |
const getDisplayName = Component => Component.displayName || Component.name || 'Component'; | |
export function withAnalytics(OriginalComponent) { | |
const WithAnalytics = props => <OriginalComponent {...props} track={trackEvent} />; | |
WithAnalytics.displayName = `WithAnalytics(${getDisplayName(OriginalComponent)})`; | |
WithAnalytics.WrappedComponent = OriginalComponent; | |
return WithAnalytics; |
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
import chalk from "chalk"; | |
import figures from "figures"; | |
module.exports = { | |
log: console.log, | |
error: (...messages) => console.error(chalk.red(figures.cross, ...messages)), | |
info: (...messages) => console.info(chalk.cyan(figures.info, ...messages)), | |
success: (...messages) => console.log(chalk.green(figures.tick, ...messages)), | |
warn: (...messages) => console.log(chalk.yellow(figures.warning, ...messages)), | |
}; |
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
/** | |
* @module build/scripts/rollbar-sourcemap-upload | |
* | |
* Extracts currently built sourcemaps and uploads them to rollbar. | |
*/ | |
const request = require('request'); | |
const fs = require('fs'); | |
const path = require('path'); | |
const chalk = require('chalk'); | |
const logger = require('../lib/logger'); |
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
# update node to latest lts version | |
function nvm::update() { | |
local -r current_node_version=$(nvm current) | |
local -r next_node_version=$(nvm version-remote --lts) | |
if [ "$current_node_version" != "$next_node_version" ]; then | |
local -r previous_node_version=$current_node_version | |
nvm install --lts | |
nvm reinstall-packages "$previous_node_version" | |
nvm uninstall "$previous_node_version" | |
nvm cache clear |