@xo-union/dist-url
Advanced tools
Comparing version 3.0.4 to 3.0.5
"use strict"; | ||
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js/object/define-property"); | ||
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault"); | ||
_Object$defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.getUrl = exports.getSSIUrl = exports.SSI_URL_TEMPLATE = exports.QA_URL_TEMPLATE = exports.PROD_URL_TEMPLATE = void 0; | ||
var _urlTemplate = _interopRequireDefault(require("@xo-union/url-template")); | ||
const SSI_URL_TEMPLATE = '/union-dist/{name}/{tag}/{path}'; | ||
@@ -21,3 +16,2 @@ exports.SSI_URL_TEMPLATE = SSI_URL_TEMPLATE; | ||
exports.PROD_URL_TEMPLATE = PROD_URL_TEMPLATE; | ||
const urlTemplateFromEnv = () => { | ||
@@ -29,7 +23,5 @@ const env = (() => { | ||
} | ||
console.warn('Using UNION_ASSETS_ENV could result in a misconfigured environment. It is best that you use UNION_DEPLOYMENT_ENV for all your Union services integrations.'); | ||
return process.env.UNION_ASSETS_ENV; | ||
} | ||
if (process.env.UNION_DEPLOYMENT_ENV) { | ||
@@ -39,6 +31,4 @@ if (process.env.UNION_DEPLOYMENT_ENV !== "qa" && process.env.UNION_DEPLOYMENT_ENV !== "production") { | ||
} | ||
return process.env.UNION_DEPLOYMENT_ENV; | ||
} | ||
if (false) { | ||
@@ -48,13 +38,9 @@ console.warn("Expected UNION_DEPLOYMENT_ENV to be 'qa' or 'production'. NODE_ENV fallback will be removed in a future version."); | ||
} | ||
throw new Error("Expected UNION_DEPLOYMENT_ENV to be either 'qa' or 'production'."); | ||
})(); | ||
if (env === 'qa') { | ||
return QA_URL_TEMPLATE; | ||
} | ||
return PROD_URL_TEMPLATE; | ||
}; | ||
const getUrl = _ref => { | ||
@@ -67,5 +53,3 @@ let { | ||
}; | ||
exports.getUrl = getUrl; | ||
const getSSIUrl = _ref2 => { | ||
@@ -78,3 +62,2 @@ let { | ||
}; | ||
exports.getSSIUrl = getSSIUrl; |
@@ -5,3 +5,2 @@ import UrlTemplate from "@xo-union/url-template"; | ||
export const PROD_URL_TEMPLATE = 'https://union.theknot.com/dist/v2/{name}/{tag}/{path}'; | ||
const urlTemplateFromEnv = () => { | ||
@@ -13,7 +12,5 @@ const env = (() => { | ||
} | ||
console.warn('Using UNION_ASSETS_ENV could result in a misconfigured environment. It is best that you use UNION_DEPLOYMENT_ENV for all your Union services integrations.'); | ||
return process.env.UNION_ASSETS_ENV; | ||
} | ||
if (process.env.UNION_DEPLOYMENT_ENV) { | ||
@@ -23,6 +20,4 @@ if (process.env.UNION_DEPLOYMENT_ENV !== "qa" && process.env.UNION_DEPLOYMENT_ENV !== "production") { | ||
} | ||
return process.env.UNION_DEPLOYMENT_ENV; | ||
} | ||
if (false) { | ||
@@ -32,13 +27,9 @@ console.warn("Expected UNION_DEPLOYMENT_ENV to be 'qa' or 'production'. NODE_ENV fallback will be removed in a future version."); | ||
} | ||
throw new Error("Expected UNION_DEPLOYMENT_ENV to be either 'qa' or 'production'."); | ||
})(); | ||
if (env === 'qa') { | ||
return QA_URL_TEMPLATE; | ||
} | ||
return PROD_URL_TEMPLATE; | ||
}; | ||
export const getUrl = _ref => { | ||
@@ -45,0 +36,0 @@ let { |
{ | ||
"name": "@xo-union/dist-url", | ||
"version": "3.0.4", | ||
"version": "3.0.5", | ||
"main": "lib/index.cjs.js", | ||
@@ -16,6 +16,6 @@ "module": "lib/index.js", | ||
"@babel/runtime-corejs3": "^7.15.4", | ||
"@xo-union/url-template": "^2.0.4" | ||
"@xo-union/url-template": "^2.0.5" | ||
}, | ||
"devDependencies": { | ||
"@xo-union/packager": "^6.1.3", | ||
"@xo-union/packager": "^6.1.4", | ||
"@xo-union/pkg-validator": "^3.2.2", | ||
@@ -30,3 +30,3 @@ "@xo-union/union-env.macro": "^1.1.4" | ||
}, | ||
"gitHead": "f32e1fa39baa025d36505f5d9f361009e6bf2df6" | ||
"gitHead": "607f1f1a860a43541901729546ad8300b3d8f4d3" | ||
} |
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
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
16073