Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ta-app-config

Package Overview
Dependencies
Maintainers
11
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ta-app-config - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

16

package.json
{
"name": "ta-app-config",
"version": "1.1.0",
"version": "1.2.0",
"description": "TA platform utils for node.js and the browser",
"main": "dist/index.js",
"main": "src/index.js",
"scripts": {
"build": "rimraf dist && babel ./src -d dist",
"postinstall": "npm run build",
"lint": "eslint ./",

@@ -25,13 +23,7 @@ "lint:fix": "eslint ./ --fix",

"homepage": "https://github.com/TechnologyAdvice/ta-app-config#readme",
"dependencies": {
"ta-scripts": "^2.1.0"
},
"devDependencies": {
"babel-cli": "^6.6.0",
"babel-core": "^6.6.0",
"babel-preset-es2015": "^6.6.0",
"babel-preset-stage-1": "^6.5.0",
"eslint": "^2.2.0",
"eslint-config-ta": "^4.1.0"
"eslint-config-ta": "^4.1.0",
"ta-scripts": "^2.1.0"
}
}

@@ -0,17 +1,12 @@

/* eslint-disable no-var, object-shorthand */
// ------------------------------------
// Env
// ------------------------------------
var env = process.env.DEPLOY_TARGET || process.env.NODE_ENV || 'development'
var DOMAIN = 'taplatform.net'
var config = {}
const env = process.env.NODE_ENV || 'development'
const __DEV__ = env === 'development'
const __STAGING__ = env === 'staging'
const __TEST__ = env === 'test'
const __PROD__ = env === 'production'
const config = {}
// ------------------------------------
// Apps
// ------------------------------------
config.auth = {

@@ -32,31 +27,22 @@ name: 'TA Auth',

// ------------------------------------
const DOMAIN = 'taplatform.net'
const addLocation = (app, localPort) => {
function createLocation(protocol, subdomain, port) {
var host = subdomain + '.' + DOMAIN
return {
host: host,
port: port,
protocol: protocol,
href: protocol + '//' + host + (port ? ':' + port : ''),
}
}
function createEnvironmentLocations(app, name, localPort) {
app.locations = {
development: {
host: `local.${DOMAIN}`,
port: localPort,
protocol: 'http://',
href: `http://local.${DOMAIN}:${localPort}`,
},
test: {
host: `local.${DOMAIN}`,
port: localPort,
protocol: 'http://',
href: `http://local.${DOMAIN}:${localPort}`,
},
development: createLocation('http:', 'local', localPort),
production: createLocation('http:', name),
staging: {
host: `staging-${app.name}.${DOMAIN}`,
host: 'deweybot.taplatform.net/qa/src/' + name + '/master',
port: '',
protocol: 'https://',
href: `https://staging-${app.name}.${DOMAIN}`,
protocol: 'http:',
href: 'http://deweybot.taplatform.net/qa/src/' + name + '/master',
},
production: {
host: `${app.name}.${DOMAIN}`,
port: '',
protocol: 'https://',
href: `https://${app.name}.${DOMAIN}`,
},
}

@@ -68,14 +54,6 @@

addLocation(config.auth, 3000)
addLocation(config.funnelAdvice, 3010)
addLocation(config.unity, 3020)
createEnvironmentLocations(config.auth, 'ta-auth', 3000)
createEnvironmentLocations(config.funnelAdvice, 'funnel-advice', 3010)
createEnvironmentLocations(config.unity, 'unity', 3020)
// ------------------------------------
// Favicon
// ------------------------------------
config.auth.favicon = `${config.auth.location.href}/favicon.png`
config.funnelAdvice.favicon = `${config.funnelAdvice.location.href}/favicon.png`
config.unity.favicon = `${config.unity.location.href}/favicon.png`
export default config
module.exports = config
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc