@uniformdev/redirect
Advanced tools
Comparing version 19.29.1-alpha.21 to 19.29.1-alpha.24
@@ -539,3 +539,3 @@ "use strict"; | ||
getPropsStartingWithColon(cur).forEach((wildcard) => { | ||
if (!processed.has(wildcard)) { | ||
if (!processed.has(wildcard + i)) { | ||
wildcards.push({ | ||
@@ -547,3 +547,3 @@ startTrie: cur[wildcard], | ||
}); | ||
processed.add(wildcard); | ||
processed.add(wildcard + i); | ||
} | ||
@@ -746,3 +746,3 @@ }); | ||
}); | ||
trie.insert(target.path, { | ||
trie.insert(target.path.replace(/\/:/, "/~~"), { | ||
redirect: redirect.redirect, | ||
@@ -759,4 +759,5 @@ metadata: redirect.metadata, | ||
} | ||
static processHops(url, trie, bestMatch, options) { | ||
static processHops(initialUrl, trie, bestMatch, options) { | ||
var _a; | ||
const url = (options == null ? void 0 : options.reverse) ? initialUrl.replace(/\/:/, "/~~") : initialUrl; | ||
const isCycle = (id, result) => { | ||
@@ -806,9 +807,3 @@ var _a2; | ||
const processedUrl = processUrl(url); | ||
let definition = trie.find(url, false); | ||
if (!(definition == null ? void 0 : definition.length)) { | ||
definition = trie.find(processedUrl.path + processedUrl.query, bestMatch); | ||
} | ||
if (!(definition == null ? void 0 : definition.length)) { | ||
definition = trie.find(processedUrl.path, bestMatch); | ||
} | ||
const definition = trie.find(processedUrl.path, false); | ||
if (definition == null ? void 0 : definition.length) { | ||
@@ -836,3 +831,3 @@ return definition.filter( | ||
return void 0; | ||
const finalUrl = _RedirectClient.getTargetVariableExpandedUrl(processedUrl.url, redirect); | ||
const finalUrl = (options == null ? void 0 : options.reverse) ? "n/a" : _RedirectClient.getTargetVariableExpandedUrl(processedUrl.url, redirect); | ||
return { | ||
@@ -839,0 +834,0 @@ url: finalUrl, |
@@ -212,3 +212,3 @@ import "./chunk-FFYIGW52.mjs"; | ||
getPropsStartingWithColon(cur).forEach((wildcard) => { | ||
if (!processed.has(wildcard)) { | ||
if (!processed.has(wildcard + i)) { | ||
wildcards.push({ | ||
@@ -220,3 +220,3 @@ startTrie: cur[wildcard], | ||
}); | ||
processed.add(wildcard); | ||
processed.add(wildcard + i); | ||
} | ||
@@ -419,3 +419,3 @@ }); | ||
}); | ||
trie.insert(target.path, { | ||
trie.insert(target.path.replace(/\/:/, "/~~"), { | ||
redirect: redirect.redirect, | ||
@@ -432,4 +432,5 @@ metadata: redirect.metadata, | ||
} | ||
static processHops(url, trie, bestMatch, options) { | ||
static processHops(initialUrl, trie, bestMatch, options) { | ||
var _a; | ||
const url = (options == null ? void 0 : options.reverse) ? initialUrl.replace(/\/:/, "/~~") : initialUrl; | ||
const isCycle = (id, result) => { | ||
@@ -479,9 +480,3 @@ var _a2; | ||
const processedUrl = processUrl(url); | ||
let definition = trie.find(url, false); | ||
if (!(definition == null ? void 0 : definition.length)) { | ||
definition = trie.find(processedUrl.path + processedUrl.query, bestMatch); | ||
} | ||
if (!(definition == null ? void 0 : definition.length)) { | ||
definition = trie.find(processedUrl.path, bestMatch); | ||
} | ||
const definition = trie.find(processedUrl.path, false); | ||
if (definition == null ? void 0 : definition.length) { | ||
@@ -509,3 +504,3 @@ return definition.filter( | ||
return void 0; | ||
const finalUrl = _RedirectClient.getTargetVariableExpandedUrl(processedUrl.url, redirect); | ||
const finalUrl = (options == null ? void 0 : options.reverse) ? "n/a" : _RedirectClient.getTargetVariableExpandedUrl(processedUrl.url, redirect); | ||
return { | ||
@@ -512,0 +507,0 @@ url: finalUrl, |
@@ -539,3 +539,3 @@ "use strict"; | ||
getPropsStartingWithColon(cur).forEach((wildcard) => { | ||
if (!processed.has(wildcard)) { | ||
if (!processed.has(wildcard + i)) { | ||
wildcards.push({ | ||
@@ -547,3 +547,3 @@ startTrie: cur[wildcard], | ||
}); | ||
processed.add(wildcard); | ||
processed.add(wildcard + i); | ||
} | ||
@@ -746,3 +746,3 @@ }); | ||
}); | ||
trie.insert(target.path, { | ||
trie.insert(target.path.replace(/\/:/, "/~~"), { | ||
redirect: redirect.redirect, | ||
@@ -759,4 +759,5 @@ metadata: redirect.metadata, | ||
} | ||
static processHops(url, trie, bestMatch, options) { | ||
static processHops(initialUrl, trie, bestMatch, options) { | ||
var _a; | ||
const url = (options == null ? void 0 : options.reverse) ? initialUrl.replace(/\/:/, "/~~") : initialUrl; | ||
const isCycle = (id, result) => { | ||
@@ -806,9 +807,3 @@ var _a2; | ||
const processedUrl = processUrl(url); | ||
let definition = trie.find(url, false); | ||
if (!(definition == null ? void 0 : definition.length)) { | ||
definition = trie.find(processedUrl.path + processedUrl.query, bestMatch); | ||
} | ||
if (!(definition == null ? void 0 : definition.length)) { | ||
definition = trie.find(processedUrl.path, bestMatch); | ||
} | ||
const definition = trie.find(processedUrl.path, false); | ||
if (definition == null ? void 0 : definition.length) { | ||
@@ -836,3 +831,3 @@ return definition.filter( | ||
return void 0; | ||
const finalUrl = _RedirectClient.getTargetVariableExpandedUrl(processedUrl.url, redirect); | ||
const finalUrl = (options == null ? void 0 : options.reverse) ? "n/a" : _RedirectClient.getTargetVariableExpandedUrl(processedUrl.url, redirect); | ||
return { | ||
@@ -839,0 +834,0 @@ url: finalUrl, |
{ | ||
"name": "@uniformdev/redirect", | ||
"version": "19.29.1-alpha.21+e4a85089b", | ||
"version": "19.29.1-alpha.24+52c8819dc", | ||
"description": "Uniform redirect client", | ||
@@ -35,3 +35,3 @@ "license": "SEE LICENSE IN LICENSE.txt", | ||
"dependencies": { | ||
"@uniformdev/context": "19.29.1-alpha.21+e4a85089b", | ||
"@uniformdev/context": "19.29.1-alpha.24+52c8819dc", | ||
"p-limit": "^3.1.0", | ||
@@ -43,3 +43,3 @@ "rfdc": "^1.3.0" | ||
}, | ||
"gitHead": "e4a85089be25614f3eefba2382c9704e80789a4b" | ||
"gitHead": "52c8819dc742c4f4816246468258f11ed6294862" | ||
} |
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
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
151976
4047