@uniformdev/redirect
Advanced tools
Comparing version 19.29.0 to 19.29.1-alpha.19
@@ -106,2 +106,3 @@ "use strict"; | ||
"../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/lib/main.js"(exports, module2) { | ||
"use strict"; | ||
var fs = require("fs"); | ||
@@ -376,3 +377,3 @@ var path = require("path"); | ||
// src/cache/withMemoryCache.ts | ||
var _WithMemoryCache = class extends RedirectClientCache { | ||
var _WithMemoryCache = class _WithMemoryCache extends RedirectClientCache { | ||
constructor(options) { | ||
@@ -420,4 +421,7 @@ super(options); | ||
if (p) { | ||
_WithMemoryCache.trieCache[key] = { ..._WithMemoryCache.trieCache[key], data: p }; | ||
caches.push(p.then()); | ||
caches.push( | ||
p.then(() => { | ||
_WithMemoryCache.trieCache[key] = { ..._WithMemoryCache.trieCache[key], data: p }; | ||
}) | ||
); | ||
} | ||
@@ -428,5 +432,5 @@ } | ||
}; | ||
/* Memory static class level variable to store data across multiple instances of the redirect client */ | ||
_WithMemoryCache.trieCache = {}; | ||
var WithMemoryCache = _WithMemoryCache; | ||
/* Memory static class level variable to store data across multiple instances of the redirect client */ | ||
WithMemoryCache.trieCache = {}; | ||
@@ -511,3 +515,3 @@ // src/data/pathTrie.ts | ||
}; | ||
const scanWildcards = (i) => { | ||
const scanWildcards = () => { | ||
let wildcard = void 0; | ||
@@ -522,3 +526,3 @@ while ((!wildcard || wildcard.active) && wildcards.length) { | ||
wildcards.push(wildcard); | ||
if (i === segments.length - 1 && wildcards.length && wildcards[wildcards.length - 1].active && wildcards[wildcards.length - 1].startTrie[dataProp]) { | ||
if (wildcards.length && wildcards[wildcards.length - 1].start === segments.length - 1 && wildcards[wildcards.length - 1].active && wildcards[wildcards.length - 1].startTrie[dataProp]) { | ||
wildcards[wildcards.length - 1].startTrie[dataProp].forEach( | ||
@@ -557,3 +561,3 @@ (d) => ret.push({ data: d, variables: getVariables() }) | ||
} else { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
@@ -565,9 +569,12 @@ return [...ret, ...splats]; | ||
} else { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
return [...ret, ...splats]; | ||
i = more; | ||
if (ret.length > 0 && bestMatch) | ||
return [...ret, ...splats]; | ||
continue; | ||
} | ||
if (i === segments.length - 1 && wildcards.length !== 0) { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
@@ -605,3 +612,3 @@ return [...ret, ...splats]; | ||
// src/redirectClient.ts | ||
var _RedirectClient = class extends import_api.ApiClient { | ||
var _RedirectClient = class _RedirectClient extends import_api.ApiClient { | ||
constructor(options) { | ||
@@ -907,11 +914,11 @@ super(options); | ||
}; | ||
var RedirectClient = _RedirectClient; | ||
RedirectClient.processUrlBestMatch = async (url, trie, options) => { | ||
_RedirectClient.processUrlBestMatch = async (url, trie, options) => { | ||
var _a; | ||
return (_a = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _a[0]; | ||
}; | ||
RedirectClient.assembling = false; | ||
RedirectClient.assemblingPromise = new Promise( | ||
_RedirectClient.assembling = false; | ||
_RedirectClient.assemblingPromise = new Promise( | ||
() => new PathTrie() | ||
); | ||
var RedirectClient = _RedirectClient; | ||
var UncachedRedirectClient = class extends RedirectClient { | ||
@@ -918,0 +925,0 @@ constructor(options) { |
@@ -89,2 +89,3 @@ import { ClientOptions, ApiClient } from '@uniformdev/context/api'; | ||
createdBy?: string | undefined; | ||
createdByName?: string | undefined; | ||
}; | ||
@@ -274,4 +275,6 @@ total: number | undefined; | ||
createdAt?: string; | ||
/** @description The user who created this redirect or system */ | ||
/** @description The user who created this redirect */ | ||
createdBy?: string; | ||
/** @description The user who created this redirect's name */ | ||
createdByName?: string; | ||
}; | ||
@@ -278,0 +281,0 @@ Redirect: { |
@@ -49,3 +49,3 @@ import "./chunk-FFYIGW52.mjs"; | ||
// src/cache/withMemoryCache.ts | ||
var _WithMemoryCache = class extends RedirectClientCache { | ||
var _WithMemoryCache = class _WithMemoryCache extends RedirectClientCache { | ||
constructor(options) { | ||
@@ -93,4 +93,7 @@ super(options); | ||
if (p) { | ||
_WithMemoryCache.trieCache[key] = { ..._WithMemoryCache.trieCache[key], data: p }; | ||
caches.push(p.then()); | ||
caches.push( | ||
p.then(() => { | ||
_WithMemoryCache.trieCache[key] = { ..._WithMemoryCache.trieCache[key], data: p }; | ||
}) | ||
); | ||
} | ||
@@ -101,5 +104,5 @@ } | ||
}; | ||
/* Memory static class level variable to store data across multiple instances of the redirect client */ | ||
_WithMemoryCache.trieCache = {}; | ||
var WithMemoryCache = _WithMemoryCache; | ||
/* Memory static class level variable to store data across multiple instances of the redirect client */ | ||
WithMemoryCache.trieCache = {}; | ||
@@ -184,3 +187,3 @@ // src/data/pathTrie.ts | ||
}; | ||
const scanWildcards = (i) => { | ||
const scanWildcards = () => { | ||
let wildcard = void 0; | ||
@@ -195,3 +198,3 @@ while ((!wildcard || wildcard.active) && wildcards.length) { | ||
wildcards.push(wildcard); | ||
if (i === segments.length - 1 && wildcards.length && wildcards[wildcards.length - 1].active && wildcards[wildcards.length - 1].startTrie[dataProp]) { | ||
if (wildcards.length && wildcards[wildcards.length - 1].start === segments.length - 1 && wildcards[wildcards.length - 1].active && wildcards[wildcards.length - 1].startTrie[dataProp]) { | ||
wildcards[wildcards.length - 1].startTrie[dataProp].forEach( | ||
@@ -230,3 +233,3 @@ (d) => ret.push({ data: d, variables: getVariables() }) | ||
} else { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
@@ -238,9 +241,12 @@ return [...ret, ...splats]; | ||
} else { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
return [...ret, ...splats]; | ||
i = more; | ||
if (ret.length > 0 && bestMatch) | ||
return [...ret, ...splats]; | ||
continue; | ||
} | ||
if (i === segments.length - 1 && wildcards.length !== 0) { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
@@ -278,3 +284,3 @@ return [...ret, ...splats]; | ||
// src/redirectClient.ts | ||
var _RedirectClient = class extends ApiClient { | ||
var _RedirectClient = class _RedirectClient extends ApiClient { | ||
constructor(options) { | ||
@@ -580,11 +586,11 @@ super(options); | ||
}; | ||
var RedirectClient = _RedirectClient; | ||
RedirectClient.processUrlBestMatch = async (url, trie, options) => { | ||
_RedirectClient.processUrlBestMatch = async (url, trie, options) => { | ||
var _a; | ||
return (_a = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _a[0]; | ||
}; | ||
RedirectClient.assembling = false; | ||
RedirectClient.assemblingPromise = new Promise( | ||
_RedirectClient.assembling = false; | ||
_RedirectClient.assemblingPromise = new Promise( | ||
() => new PathTrie() | ||
); | ||
var RedirectClient = _RedirectClient; | ||
var UncachedRedirectClient = class extends RedirectClient { | ||
@@ -591,0 +597,0 @@ constructor(options) { |
@@ -106,2 +106,3 @@ "use strict"; | ||
"../../node_modules/.pnpm/dotenv@16.1.3/node_modules/dotenv/lib/main.js"(exports, module2) { | ||
"use strict"; | ||
var fs = require("fs"); | ||
@@ -376,3 +377,3 @@ var path = require("path"); | ||
// src/cache/withMemoryCache.ts | ||
var _WithMemoryCache = class extends RedirectClientCache { | ||
var _WithMemoryCache = class _WithMemoryCache extends RedirectClientCache { | ||
constructor(options) { | ||
@@ -420,4 +421,7 @@ super(options); | ||
if (p) { | ||
_WithMemoryCache.trieCache[key] = { ..._WithMemoryCache.trieCache[key], data: p }; | ||
caches.push(p.then()); | ||
caches.push( | ||
p.then(() => { | ||
_WithMemoryCache.trieCache[key] = { ..._WithMemoryCache.trieCache[key], data: p }; | ||
}) | ||
); | ||
} | ||
@@ -428,5 +432,5 @@ } | ||
}; | ||
/* Memory static class level variable to store data across multiple instances of the redirect client */ | ||
_WithMemoryCache.trieCache = {}; | ||
var WithMemoryCache = _WithMemoryCache; | ||
/* Memory static class level variable to store data across multiple instances of the redirect client */ | ||
WithMemoryCache.trieCache = {}; | ||
@@ -511,3 +515,3 @@ // src/data/pathTrie.ts | ||
}; | ||
const scanWildcards = (i) => { | ||
const scanWildcards = () => { | ||
let wildcard = void 0; | ||
@@ -522,3 +526,3 @@ while ((!wildcard || wildcard.active) && wildcards.length) { | ||
wildcards.push(wildcard); | ||
if (i === segments.length - 1 && wildcards.length && wildcards[wildcards.length - 1].active && wildcards[wildcards.length - 1].startTrie[dataProp]) { | ||
if (wildcards.length && wildcards[wildcards.length - 1].start === segments.length - 1 && wildcards[wildcards.length - 1].active && wildcards[wildcards.length - 1].startTrie[dataProp]) { | ||
wildcards[wildcards.length - 1].startTrie[dataProp].forEach( | ||
@@ -557,3 +561,3 @@ (d) => ret.push({ data: d, variables: getVariables() }) | ||
} else { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
@@ -565,9 +569,12 @@ return [...ret, ...splats]; | ||
} else { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
return [...ret, ...splats]; | ||
i = more; | ||
if (ret.length > 0 && bestMatch) | ||
return [...ret, ...splats]; | ||
continue; | ||
} | ||
if (i === segments.length - 1 && wildcards.length !== 0) { | ||
const more = scanWildcards(i); | ||
const more = scanWildcards(); | ||
if (typeof more === "undefined" || ret.length > 0 && bestMatch) | ||
@@ -605,3 +612,3 @@ return [...ret, ...splats]; | ||
// src/redirectClient.ts | ||
var _RedirectClient = class extends import_api.ApiClient { | ||
var _RedirectClient = class _RedirectClient extends import_api.ApiClient { | ||
constructor(options) { | ||
@@ -907,11 +914,11 @@ super(options); | ||
}; | ||
var RedirectClient = _RedirectClient; | ||
RedirectClient.processUrlBestMatch = async (url, trie, options) => { | ||
_RedirectClient.processUrlBestMatch = async (url, trie, options) => { | ||
var _a; | ||
return (_a = _RedirectClient.processHops(url, trie, true, options)) == null ? void 0 : _a[0]; | ||
}; | ||
RedirectClient.assembling = false; | ||
RedirectClient.assemblingPromise = new Promise( | ||
_RedirectClient.assembling = false; | ||
_RedirectClient.assemblingPromise = new Promise( | ||
() => new PathTrie() | ||
); | ||
var RedirectClient = _RedirectClient; | ||
var UncachedRedirectClient = class extends RedirectClient { | ||
@@ -918,0 +925,0 @@ constructor(options) { |
{ | ||
"name": "@uniformdev/redirect", | ||
"version": "19.29.0", | ||
"version": "19.29.1-alpha.19+838467072", | ||
"description": "Uniform redirect client", | ||
@@ -35,3 +35,3 @@ "license": "SEE LICENSE IN LICENSE.txt", | ||
"dependencies": { | ||
"@uniformdev/context": "19.29.0", | ||
"@uniformdev/context": "19.29.1-alpha.19+838467072", | ||
"p-limit": "^3.1.0", | ||
@@ -43,3 +43,3 @@ "rfdc": "^1.3.0" | ||
}, | ||
"gitHead": "f8e9d5f6283fb3d72ba095c0e307907dc591ce4a" | ||
"gitHead": "8384670725623d7fab7ef04837c79491e7e45442" | ||
} |
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
152212
4067
2
1
- Removed@uniformdev/context@19.29.0(transitive)
- Removeddequal@2.0.3(transitive)
- Removedjs-cookie@3.0.5(transitive)
- Removedmitt@3.0.1(transitive)