ta-app-config
Advanced tools
Comparing version 1.1.0 to 1.2.0
{ | ||
"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 |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Install scripts
Supply chain riskInstall scripts are run when the package is installed. The majority of malware in npm is hidden in install scripts.
Found 1 instance in 1 package
0
3
0
3454
7
49
1
- Removedta-scripts@^2.1.0
- Removedansi-regex@2.1.1(transitive)
- Removedany-promise@1.3.0(transitive)
- Removedarray-union@1.0.2(transitive)
- Removedarray-uniq@1.0.3(transitive)
- Removedarrify@1.0.1(transitive)
- Removedaxios@0.15.3(transitive)
- Removedbalanced-match@1.0.2(transitive)
- Removedbluebird@3.7.2(transitive)
- Removedbrace-expansion@1.1.11(transitive)
- Removedcamelcase@3.0.0(transitive)
- Removedcliui@3.2.0(transitive)
- Removedcode-point-at@1.1.0(transitive)
- Removedconcat-map@0.0.1(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removeddel@2.2.2(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedfind-up@1.1.2(transitive)
- Removedfollow-redirects@1.0.0(transitive)
- Removedfs-extra@0.26.7(transitive)
- Removedfs-promise@0.5.0(transitive)
- Removedfs.realpath@1.0.0(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-caller-file@1.0.3(transitive)
- Removedglob@7.2.3(transitive)
- Removedglobby@5.0.0(transitive)
- Removedgraceful-fs@4.2.11(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedinflight@1.0.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedinterpret@1.4.0(transitive)
- Removedinvert-kv@1.0.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-core-module@2.15.1(transitive)
- Removedis-fullwidth-code-point@1.0.0(transitive)
- Removedis-path-cwd@1.0.0(transitive)
- Removedis-path-in-cwd@1.0.1(transitive)
- Removedis-path-inside@1.0.1(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedjsonfile@2.4.0(transitive)
- Removedklaw@1.3.1(transitive)
- Removedlcid@1.0.0(transitive)
- Removedload-json-file@1.1.0(transitive)
- Removedlodash.assign@4.2.0(transitive)
- Removedminimatch@3.1.2(transitive)
- Removedms@2.0.0(transitive)
- Removedmz@2.7.0(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removednumber-is-nan@1.0.1(transitive)
- Removedobject-assign@4.1.1(transitive)
- Removedonce@1.4.0(transitive)
- Removedos-locale@1.4.0(transitive)
- Removedparse-json@2.2.0(transitive)
- Removedpath-exists@2.1.0(transitive)
- Removedpath-is-absolute@1.0.1(transitive)
- Removedpath-is-inside@1.0.2(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@1.1.0(transitive)
- Removedpify@2.3.0(transitive)
- Removedpinkie@2.0.4(transitive)
- Removedpinkie-promise@2.0.1(transitive)
- Removedread-pkg@1.1.0(transitive)
- Removedread-pkg-up@1.0.1(transitive)
- Removedrechoir@0.6.2(transitive)
- Removedrequire-directory@2.1.1(transitive)
- Removedrequire-main-filename@1.0.1(transitive)
- Removedresolve@1.22.8(transitive)
- Removedrimraf@2.7.1(transitive)
- Removedsemver@5.7.2(transitive)
- Removedset-blocking@2.0.0(transitive)
- Removedshelljs@0.7.8(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.20(transitive)
- Removedstring-width@1.0.2(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedta-scripts@2.5.2(transitive)
- Removedthenify@3.3.1(transitive)
- Removedthenify-all@1.6.0(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)
- Removedwhich-module@1.0.0(transitive)
- Removedwindow-size@0.2.0(transitive)
- Removedwrap-ansi@2.1.0(transitive)
- Removedwrappy@1.0.2(transitive)
- Removedy18n@3.2.2(transitive)
- Removedyargs@4.8.1(transitive)
- Removedyargs-parser@2.4.1(transitive)