@uniformdev/redirect
Advanced tools
Comparing version 19.38.2 to 19.38.3-alpha.70
@@ -33,8 +33,8 @@ "use strict"; | ||
// ../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/package.json | ||
// ../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/package.json | ||
var require_package = __commonJS({ | ||
"../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/package.json"(exports, module2) { | ||
"../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/package.json"(exports, module2) { | ||
module2.exports = { | ||
name: "dotenv", | ||
version: "16.1.3", | ||
version: "16.3.1", | ||
description: "Loads environment variables from .env file", | ||
@@ -104,5 +104,5 @@ main: "lib/main.js", | ||
// ../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/lib/main.js | ||
// ../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js | ||
var require_main = __commonJS({ | ||
"../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/lib/main.js"(exports, module2) { | ||
"../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js"(exports, module2) { | ||
"use strict"; | ||
@@ -141,3 +141,3 @@ var fs = require("fs"); | ||
} | ||
const keys = _dotenvKey().split(","); | ||
const keys = _dotenvKey(options).split(","); | ||
const length = keys.length; | ||
@@ -168,3 +168,6 @@ let decrypted; | ||
} | ||
function _dotenvKey() { | ||
function _dotenvKey(options) { | ||
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { | ||
return options.DOTENV_KEY; | ||
} | ||
if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { | ||
@@ -213,3 +216,7 @@ return process.env.DOTENV_KEY; | ||
const parsed = DotenvModule._parseVault(options); | ||
DotenvModule.populate(process.env, parsed, options); | ||
let processEnv = process.env; | ||
if (options && options.processEnv != null) { | ||
processEnv = options.processEnv; | ||
} | ||
DotenvModule.populate(processEnv, parsed, options); | ||
return { parsed }; | ||
@@ -231,3 +238,7 @@ } | ||
const parsed = DotenvModule.parse(fs.readFileSync(dotenvPath, { encoding })); | ||
DotenvModule.populate(process.env, parsed, options); | ||
let processEnv = process.env; | ||
if (options && options.processEnv != null) { | ||
processEnv = options.processEnv; | ||
} | ||
DotenvModule.populate(processEnv, parsed, options); | ||
return { parsed }; | ||
@@ -243,3 +254,3 @@ } catch (e) { | ||
const vaultPath = _vaultPath(options); | ||
if (_dotenvKey().length === 0) { | ||
if (_dotenvKey(options).length === 0) { | ||
return DotenvModule.configDotenv(options); | ||
@@ -696,7 +707,9 @@ } | ||
this.processUrlBestMatch = async (url, options, useTrie) => { | ||
var _a; | ||
var _a, _b; | ||
if (!useTrie) { | ||
const redirects = await this.getRedirects({ sourceUrl: url }); | ||
const processedUrl = processUrl(url); | ||
const redirect = redirects.redirects[0]; | ||
const redirect = (_a = redirects == null ? void 0 : redirects.redirects) == null ? void 0 : _a[0]; | ||
if (!redirect) | ||
return void 0; | ||
return _RedirectClient.processDefinitionToResults( | ||
@@ -710,3 +723,3 @@ processedUrl, | ||
const trie = await this.getRedirectTrie(); | ||
return (_a = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _a[0]; | ||
return (_b = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _b[0]; | ||
}; | ||
@@ -713,0 +726,0 @@ this.processUrlAllMatches = async (url, options, useTrie) => { |
@@ -362,7 +362,9 @@ import "./chunk-TLYAXJ7N.mjs"; | ||
this.processUrlBestMatch = async (url, options, useTrie) => { | ||
var _a; | ||
var _a, _b; | ||
if (!useTrie) { | ||
const redirects = await this.getRedirects({ sourceUrl: url }); | ||
const processedUrl = processUrl(url); | ||
const redirect = redirects.redirects[0]; | ||
const redirect = (_a = redirects == null ? void 0 : redirects.redirects) == null ? void 0 : _a[0]; | ||
if (!redirect) | ||
return void 0; | ||
return _RedirectClient.processDefinitionToResults( | ||
@@ -376,3 +378,3 @@ processedUrl, | ||
const trie = await this.getRedirectTrie(); | ||
return (_a = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _a[0]; | ||
return (_b = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _b[0]; | ||
}; | ||
@@ -618,3 +620,3 @@ this.processUrlAllMatches = async (url, options, useTrie) => { | ||
var getDefaultClient = async () => { | ||
const dotenv = await import("./main-HWDEQR7W.mjs"); | ||
const dotenv = await import("./main-4Y7KG46W.mjs"); | ||
dotenv.config(); | ||
@@ -621,0 +623,0 @@ return new RedirectClient({ |
@@ -33,8 +33,8 @@ "use strict"; | ||
// ../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/package.json | ||
// ../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/package.json | ||
var require_package = __commonJS({ | ||
"../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/package.json"(exports, module2) { | ||
"../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/package.json"(exports, module2) { | ||
module2.exports = { | ||
name: "dotenv", | ||
version: "16.1.3", | ||
version: "16.3.1", | ||
description: "Loads environment variables from .env file", | ||
@@ -104,5 +104,5 @@ main: "lib/main.js", | ||
// ../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/lib/main.js | ||
// ../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js | ||
var require_main = __commonJS({ | ||
"../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/lib/main.js"(exports, module2) { | ||
"../../node_modules/.pnpm/dotenv@16.3.1/node_modules/dotenv/lib/main.js"(exports, module2) { | ||
"use strict"; | ||
@@ -141,3 +141,3 @@ var fs = require("fs"); | ||
} | ||
const keys = _dotenvKey().split(","); | ||
const keys = _dotenvKey(options).split(","); | ||
const length = keys.length; | ||
@@ -168,3 +168,6 @@ let decrypted; | ||
} | ||
function _dotenvKey() { | ||
function _dotenvKey(options) { | ||
if (options && options.DOTENV_KEY && options.DOTENV_KEY.length > 0) { | ||
return options.DOTENV_KEY; | ||
} | ||
if (process.env.DOTENV_KEY && process.env.DOTENV_KEY.length > 0) { | ||
@@ -213,3 +216,7 @@ return process.env.DOTENV_KEY; | ||
const parsed = DotenvModule._parseVault(options); | ||
DotenvModule.populate(process.env, parsed, options); | ||
let processEnv = process.env; | ||
if (options && options.processEnv != null) { | ||
processEnv = options.processEnv; | ||
} | ||
DotenvModule.populate(processEnv, parsed, options); | ||
return { parsed }; | ||
@@ -231,3 +238,7 @@ } | ||
const parsed = DotenvModule.parse(fs.readFileSync(dotenvPath, { encoding })); | ||
DotenvModule.populate(process.env, parsed, options); | ||
let processEnv = process.env; | ||
if (options && options.processEnv != null) { | ||
processEnv = options.processEnv; | ||
} | ||
DotenvModule.populate(processEnv, parsed, options); | ||
return { parsed }; | ||
@@ -243,3 +254,3 @@ } catch (e) { | ||
const vaultPath = _vaultPath(options); | ||
if (_dotenvKey().length === 0) { | ||
if (_dotenvKey(options).length === 0) { | ||
return DotenvModule.configDotenv(options); | ||
@@ -696,7 +707,9 @@ } | ||
this.processUrlBestMatch = async (url, options, useTrie) => { | ||
var _a; | ||
var _a, _b; | ||
if (!useTrie) { | ||
const redirects = await this.getRedirects({ sourceUrl: url }); | ||
const processedUrl = processUrl(url); | ||
const redirect = redirects.redirects[0]; | ||
const redirect = (_a = redirects == null ? void 0 : redirects.redirects) == null ? void 0 : _a[0]; | ||
if (!redirect) | ||
return void 0; | ||
return _RedirectClient.processDefinitionToResults( | ||
@@ -710,3 +723,3 @@ processedUrl, | ||
const trie = await this.getRedirectTrie(); | ||
return (_a = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _a[0]; | ||
return (_b = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _b[0]; | ||
}; | ||
@@ -713,0 +726,0 @@ this.processUrlAllMatches = async (url, options, useTrie) => { |
{ | ||
"name": "@uniformdev/redirect", | ||
"version": "19.38.2", | ||
"version": "19.38.3-alpha.70+55e5a8fe1", | ||
"description": "Uniform redirect client", | ||
@@ -35,3 +35,3 @@ "license": "SEE LICENSE IN LICENSE.txt", | ||
"dependencies": { | ||
"@uniformdev/context": "19.38.2", | ||
"@uniformdev/context": "19.38.3-alpha.70+55e5a8fe1", | ||
"p-limit": "^3.1.0", | ||
@@ -43,3 +43,3 @@ "rfdc": "^1.3.0" | ||
}, | ||
"gitHead": "b97fd17fd44e0f5bd3806e942b516cb2bd218096" | ||
"gitHead": "55e5a8fe1d80971a93ea31d3a50cec72e71be70a" | ||
} |
Sorry, the diff of this file is not supported yet
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
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
177926
4188
2
1
35
0
- Removed@uniformdev/context@19.38.2(transitive)
- Removeddequal@2.0.3(transitive)
- Removedjs-cookie@3.0.5(transitive)
- Removedmitt@3.0.1(transitive)