@uniformdev/redirect 19.62.0 → 19.62.1-alpha.127
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +1 -1
- package/dist/index.d.mts +7 -5
- package/dist/index.d.ts +7 -5
- package/dist/index.esm.js +77 -65
- package/dist/index.js +80 -360
- package/dist/index.mjs +77 -65
- package/package.json +3 -3
- package/dist/chunk-TLYAXJ7N.mjs +0 -16
- package/dist/main-4Y7KG46W.mjs +0 -298
package/LICENSE.txt
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
©
|
|
1
|
+
© 2024 Uniform Systems, Inc. All Rights Reserved.
|
|
2
2
|
See details of Uniform Systems, Inc. Master Subscription Agreement here: https://uniform.dev/eula
|
package/dist/index.d.mts
CHANGED
|
@@ -111,9 +111,6 @@ declare class RedirectClient extends ApiClient<RedirectClientOptions> {
|
|
|
111
111
|
*/
|
|
112
112
|
private static processDefinitionToResults;
|
|
113
113
|
static validateRedirect(url: string, redirectDefinition: RedirectDefinition['redirect']): boolean;
|
|
114
|
-
static getTargetVariableExpandedUrl(url: string, redirectDefinition: RedirectDefinition['redirect'], isVariable?: (pathSegment: string) => boolean): string;
|
|
115
|
-
private static mergeQueryStrings;
|
|
116
|
-
private static getSourceVariables;
|
|
117
114
|
}
|
|
118
115
|
declare class UncachedRedirectClient extends RedirectClient {
|
|
119
116
|
constructor(options: Omit<RedirectClientOptions, 'bypassCache'>);
|
|
@@ -162,7 +159,6 @@ interface paths {
|
|
|
162
159
|
"application/json": {
|
|
163
160
|
redirects: components["schemas"]["RedirectGetResponse"];
|
|
164
161
|
total?: number;
|
|
165
|
-
resultUrl?: string;
|
|
166
162
|
};
|
|
167
163
|
};
|
|
168
164
|
};
|
|
@@ -402,6 +398,12 @@ declare class WithMemoryCache extends RedirectClientCache<RedirectClientCacheOpt
|
|
|
402
398
|
refresh(): Promise<void[]>;
|
|
403
399
|
}
|
|
404
400
|
|
|
401
|
+
declare function getTargetVariableExpandedUrl(url: string, redirectDefinition: RedirectDefinition['redirect'], isVariable?: (pathSegment: string) => boolean): string;
|
|
402
|
+
declare function getSourceVariables(path: string, source: string, isVariable?: (pathSegment: string, isLast: boolean) => boolean): {
|
|
403
|
+
[variable: string]: string;
|
|
404
|
+
};
|
|
405
|
+
declare function mergeQueryStrings(qs1: string, qs2: string): string;
|
|
406
|
+
|
|
405
407
|
type Wildcard = {
|
|
406
408
|
pathSegment: string;
|
|
407
409
|
index: number;
|
|
@@ -448,4 +450,4 @@ type ProcessedUrl = {
|
|
|
448
450
|
*/
|
|
449
451
|
declare function processUrl(url: string): ProcessedUrl;
|
|
450
452
|
|
|
451
|
-
export { DirectionAwareRedirectDefinition, ExtractWildcards, PathTrie, PathTrieData, ProcessedUrl, RedirectClient, RedirectClientGetRedirect, RedirectClientGetRedirects, RedirectClientGetRequest, RedirectClientOptions, RedirectDataCache, RedirectDefinition, RedirectDefinitions, RedirectDeleteRequest, RedirectDeleteResponse, RedirectFileConverter, RedirectFileConverterParams, RedirectGetRequest, RedirectGetResponse, RedirectOptions, RedirectResult, RedirectUpsertRequest, RedirectUpsertResponse, SourceAndTarget, SourceTargetAndWildcards, UncachedRedirectClient, Wildcard, WithMemoryCache, pathTrieReturn, processUrl };
|
|
453
|
+
export { type DirectionAwareRedirectDefinition, ExtractWildcards, PathTrie, PathTrieData, type ProcessedUrl, RedirectClient, type RedirectClientGetRedirect, type RedirectClientGetRedirects, type RedirectClientGetRequest, type RedirectClientOptions, type RedirectDataCache, type RedirectDefinition, type RedirectDefinitions, type RedirectDeleteRequest, type RedirectDeleteResponse, RedirectFileConverter, type RedirectFileConverterParams, type RedirectGetRequest, type RedirectGetResponse, type RedirectOptions, type RedirectResult, type RedirectUpsertRequest, type RedirectUpsertResponse, type SourceAndTarget, type SourceTargetAndWildcards, UncachedRedirectClient, type Wildcard, WithMemoryCache, getSourceVariables, getTargetVariableExpandedUrl, mergeQueryStrings, type pathTrieReturn, processUrl };
|
package/dist/index.d.ts
CHANGED
|
@@ -111,9 +111,6 @@ declare class RedirectClient extends ApiClient<RedirectClientOptions> {
|
|
|
111
111
|
*/
|
|
112
112
|
private static processDefinitionToResults;
|
|
113
113
|
static validateRedirect(url: string, redirectDefinition: RedirectDefinition['redirect']): boolean;
|
|
114
|
-
static getTargetVariableExpandedUrl(url: string, redirectDefinition: RedirectDefinition['redirect'], isVariable?: (pathSegment: string) => boolean): string;
|
|
115
|
-
private static mergeQueryStrings;
|
|
116
|
-
private static getSourceVariables;
|
|
117
114
|
}
|
|
118
115
|
declare class UncachedRedirectClient extends RedirectClient {
|
|
119
116
|
constructor(options: Omit<RedirectClientOptions, 'bypassCache'>);
|
|
@@ -162,7 +159,6 @@ interface paths {
|
|
|
162
159
|
"application/json": {
|
|
163
160
|
redirects: components["schemas"]["RedirectGetResponse"];
|
|
164
161
|
total?: number;
|
|
165
|
-
resultUrl?: string;
|
|
166
162
|
};
|
|
167
163
|
};
|
|
168
164
|
};
|
|
@@ -402,6 +398,12 @@ declare class WithMemoryCache extends RedirectClientCache<RedirectClientCacheOpt
|
|
|
402
398
|
refresh(): Promise<void[]>;
|
|
403
399
|
}
|
|
404
400
|
|
|
401
|
+
declare function getTargetVariableExpandedUrl(url: string, redirectDefinition: RedirectDefinition['redirect'], isVariable?: (pathSegment: string) => boolean): string;
|
|
402
|
+
declare function getSourceVariables(path: string, source: string, isVariable?: (pathSegment: string, isLast: boolean) => boolean): {
|
|
403
|
+
[variable: string]: string;
|
|
404
|
+
};
|
|
405
|
+
declare function mergeQueryStrings(qs1: string, qs2: string): string;
|
|
406
|
+
|
|
405
407
|
type Wildcard = {
|
|
406
408
|
pathSegment: string;
|
|
407
409
|
index: number;
|
|
@@ -448,4 +450,4 @@ type ProcessedUrl = {
|
|
|
448
450
|
*/
|
|
449
451
|
declare function processUrl(url: string): ProcessedUrl;
|
|
450
452
|
|
|
451
|
-
export { DirectionAwareRedirectDefinition, ExtractWildcards, PathTrie, PathTrieData, ProcessedUrl, RedirectClient, RedirectClientGetRedirect, RedirectClientGetRedirects, RedirectClientGetRequest, RedirectClientOptions, RedirectDataCache, RedirectDefinition, RedirectDefinitions, RedirectDeleteRequest, RedirectDeleteResponse, RedirectFileConverter, RedirectFileConverterParams, RedirectGetRequest, RedirectGetResponse, RedirectOptions, RedirectResult, RedirectUpsertRequest, RedirectUpsertResponse, SourceAndTarget, SourceTargetAndWildcards, UncachedRedirectClient, Wildcard, WithMemoryCache, pathTrieReturn, processUrl };
|
|
453
|
+
export { type DirectionAwareRedirectDefinition, ExtractWildcards, PathTrie, PathTrieData, type ProcessedUrl, RedirectClient, type RedirectClientGetRedirect, type RedirectClientGetRedirects, type RedirectClientGetRequest, type RedirectClientOptions, type RedirectDataCache, type RedirectDefinition, type RedirectDefinitions, type RedirectDeleteRequest, type RedirectDeleteResponse, RedirectFileConverter, type RedirectFileConverterParams, type RedirectGetRequest, type RedirectGetResponse, type RedirectOptions, type RedirectResult, type RedirectUpsertRequest, type RedirectUpsertResponse, type SourceAndTarget, type SourceTargetAndWildcards, UncachedRedirectClient, type Wildcard, WithMemoryCache, getSourceVariables, getTargetVariableExpandedUrl, mergeQueryStrings, type pathTrieReturn, processUrl };
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import "./chunk-TLYAXJ7N.mjs";
|
|
2
|
-
|
|
3
1
|
// src/cache/data/refresher.ts
|
|
4
2
|
var Refresher = class {
|
|
5
3
|
/**
|
|
@@ -262,22 +260,78 @@ import { ApiClient } from "@uniformdev/context/api";
|
|
|
262
260
|
// src/util/url.ts
|
|
263
261
|
function processUrl(url) {
|
|
264
262
|
var _a, _b, _c, _d, _e, _f;
|
|
265
|
-
const matches = url.match(/^(https?:\/\/)?(([^:/?#]*)(?:(:[0-9]+))?)?([/]{0,1}[^?#]*)(\?[
|
|
263
|
+
const matches = url.match(/^(https?:\/\/)?(([^:/?#]*)(?:(:[0-9]+))?)?([/]{0,1}[^?#]*)(\?[^#?]*|)(#.*|)$/);
|
|
264
|
+
const protocol = (_a = matches == null ? void 0 : matches[1]) != null ? _a : "";
|
|
265
|
+
const domain = (_b = matches == null ? void 0 : matches[3]) != null ? _b : "";
|
|
266
|
+
const port = (_c = matches == null ? void 0 : matches[4]) != null ? _c : "";
|
|
267
|
+
const path = (_d = matches == null ? void 0 : matches[5].replace(/\/+$/g, "")) != null ? _d : "";
|
|
268
|
+
const query = (_e = matches == null ? void 0 : matches[6]) != null ? _e : "";
|
|
269
|
+
const fragment = (_f = matches == null ? void 0 : matches[7]) != null ? _f : "";
|
|
266
270
|
return {
|
|
267
|
-
url
|
|
268
|
-
protocol
|
|
269
|
-
domain
|
|
270
|
-
port
|
|
271
|
-
path
|
|
272
|
-
query
|
|
273
|
-
fragment
|
|
271
|
+
url: `${protocol}${domain}${port}${path}${query}${fragment}`,
|
|
272
|
+
protocol,
|
|
273
|
+
domain,
|
|
274
|
+
port,
|
|
275
|
+
path,
|
|
276
|
+
query,
|
|
277
|
+
fragment
|
|
274
278
|
};
|
|
275
279
|
}
|
|
276
280
|
|
|
281
|
+
// src/util/process.ts
|
|
282
|
+
function getTargetVariableExpandedUrl(url, redirectDefinition, isVariable) {
|
|
283
|
+
const processedTarget = processUrl(redirectDefinition.targetUrl);
|
|
284
|
+
const processedSource = processUrl(redirectDefinition.sourceUrl);
|
|
285
|
+
let finalUrlPath = processedTarget.path;
|
|
286
|
+
const processedUrl = processUrl(url);
|
|
287
|
+
const variables = getSourceVariables(processedUrl.path, processedSource.path, isVariable);
|
|
288
|
+
for (const variable in variables) {
|
|
289
|
+
finalUrlPath = finalUrlPath.replace(variable, variables[variable]);
|
|
290
|
+
}
|
|
291
|
+
let protocol = redirectDefinition.targetPreserveIncomingProtocol || processedTarget.protocol === "" ? processedUrl.protocol : processedTarget.protocol;
|
|
292
|
+
const domain = protocol !== "" ? redirectDefinition.targetPreserveIncomingDomain || processedTarget.domain === "" ? processedUrl.domain : processedTarget.domain : "";
|
|
293
|
+
if (domain === "" && protocol !== "") {
|
|
294
|
+
protocol = "";
|
|
295
|
+
}
|
|
296
|
+
const port = domain === "" ? "" : redirectDefinition.targetPreserveIncomingDomain || processedTarget.domain === "" ? processedUrl.port : processedTarget.port;
|
|
297
|
+
const query = redirectDefinition.sourceRetainQuerystring && redirectDefinition.targetMergeQuerystring ? mergeQueryStrings(processedUrl.query, processedTarget.query) : !redirectDefinition.targetMergeQuerystring && redirectDefinition.sourceRetainQuerystring ? processedUrl.query : processedTarget.query;
|
|
298
|
+
const fragment = redirectDefinition.sourceRetainQuerystring && redirectDefinition.targetMergeQuerystring ? mergeQueryStrings(processedUrl.fragment, processedTarget.fragment) : !redirectDefinition.targetMergeQuerystring && redirectDefinition.sourceRetainQuerystring ? processedUrl.fragment : processedTarget.fragment;
|
|
299
|
+
return `${protocol}${domain}${port}${finalUrlPath}${query}${fragment}`;
|
|
300
|
+
}
|
|
301
|
+
function getSourceVariables(path, source, isVariable = (pathSegment, isLast) => pathSegment.startsWith(":") || pathSegment === "*" && isLast) {
|
|
302
|
+
const variables = {};
|
|
303
|
+
const pathSegments = path.split("/");
|
|
304
|
+
const sourceSegments = source.split("/");
|
|
305
|
+
sourceSegments.forEach((sourceSegment, i) => {
|
|
306
|
+
if (pathSegments.length >= i && isVariable(sourceSegment, i === sourceSegments.length - 1)) {
|
|
307
|
+
variables[sourceSegment] = pathSegments[i];
|
|
308
|
+
}
|
|
309
|
+
});
|
|
310
|
+
return variables;
|
|
311
|
+
}
|
|
312
|
+
function mergeQueryStrings(qs1, qs2) {
|
|
313
|
+
let fragment = false;
|
|
314
|
+
if (qs1.startsWith("#")) {
|
|
315
|
+
fragment = true;
|
|
316
|
+
qs1 = qs1.substring(1);
|
|
317
|
+
}
|
|
318
|
+
if (qs2.startsWith("#")) {
|
|
319
|
+
fragment = true;
|
|
320
|
+
qs2 = qs2.substring(1);
|
|
321
|
+
}
|
|
322
|
+
const params1 = new URLSearchParams(qs1);
|
|
323
|
+
const params2 = new URLSearchParams(qs2);
|
|
324
|
+
const merged = new URLSearchParams([...params1, ...params2]).toString();
|
|
325
|
+
if (merged.length > 0)
|
|
326
|
+
return (fragment ? "#" : "?") + merged;
|
|
327
|
+
return "";
|
|
328
|
+
}
|
|
329
|
+
|
|
277
330
|
// src/redirectClient.ts
|
|
278
331
|
var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
279
332
|
constructor(options) {
|
|
280
333
|
super(options);
|
|
334
|
+
// Get a single redirect by ID or project map id
|
|
281
335
|
this.getRedirect = async (options) => {
|
|
282
336
|
var _a;
|
|
283
337
|
const { projectId } = this.options;
|
|
@@ -285,12 +339,14 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
285
339
|
const results = await this.apiClient(fetchUri);
|
|
286
340
|
return (_a = results.redirects) == null ? void 0 : _a[0];
|
|
287
341
|
};
|
|
342
|
+
// Get redirects by list of IDs, source URL, target URL, or search
|
|
288
343
|
this.getRedirects = async (options) => {
|
|
289
344
|
const { projectId } = this.options;
|
|
290
345
|
const fetchUri = this.createUrl("/api/v1/redirect", { ...options, projectId });
|
|
291
346
|
const results = await this.apiClient(fetchUri);
|
|
292
347
|
return results;
|
|
293
348
|
};
|
|
349
|
+
// Assemble a trie powered search structure, used to have instant resolution of redirects. Note, result set may be large.
|
|
294
350
|
this.getRedirectTrie = async (options) => {
|
|
295
351
|
var _a, _b;
|
|
296
352
|
const { projectId } = this.options;
|
|
@@ -372,7 +428,7 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
372
428
|
return _RedirectClient.processDefinitionToResults(
|
|
373
429
|
processedUrl,
|
|
374
430
|
redirect,
|
|
375
|
-
|
|
431
|
+
getSourceVariables(
|
|
376
432
|
processedUrl.path,
|
|
377
433
|
processUrl((options == null ? void 0 : options.reverse) ? redirect.redirect.targetUrl : redirect.redirect.sourceUrl).path
|
|
378
434
|
),
|
|
@@ -382,6 +438,8 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
382
438
|
const trie = await this.getRedirectTrie();
|
|
383
439
|
return (_b = _RedirectClient.processHops(sanitizedUrl, trie, true, options)) == null ? void 0 : _b[0];
|
|
384
440
|
};
|
|
441
|
+
// Caculate redirect matches based on an incoming URL with an option to use a trie storage structure to streamline future
|
|
442
|
+
// redirect resolutions. Note this may cause a large in memory load for large collections of redirect, off by default.
|
|
385
443
|
this.processUrlAllMatches = async (url, options, useTrie) => {
|
|
386
444
|
const sanitizedUrl = url.endsWith("/") ? url.replace(/\/+$/, "") : url;
|
|
387
445
|
if (!useTrie) {
|
|
@@ -393,7 +451,7 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
393
451
|
return _RedirectClient.processDefinitionToResults(
|
|
394
452
|
processedUrl,
|
|
395
453
|
redirect,
|
|
396
|
-
|
|
454
|
+
getSourceVariables(
|
|
397
455
|
processedUrl.path,
|
|
398
456
|
processUrl((options == null ? void 0 : options.reverse) ? redirect.redirect.targetUrl : redirect.redirect.sourceUrl).path
|
|
399
457
|
),
|
|
@@ -414,6 +472,7 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
414
472
|
}
|
|
415
473
|
}
|
|
416
474
|
}
|
|
475
|
+
// Get all redirects in Uniform 500 at a time.
|
|
417
476
|
async *getAllRedirects(orderBy = "updated_at desc") {
|
|
418
477
|
var _a, _b;
|
|
419
478
|
const { projectId } = this.options;
|
|
@@ -462,6 +521,8 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
462
521
|
}
|
|
463
522
|
return await _RedirectClient.assemblingPromise;
|
|
464
523
|
}
|
|
524
|
+
// Find all redirects involved for the current URL, this is for the case where a redirect definition leads to
|
|
525
|
+
// another redirect. This also involves cycle busting error handling
|
|
465
526
|
static processHops(initialUrl, trie, bestMatch, options) {
|
|
466
527
|
const url = (options == null ? void 0 : options.reverse) ? initialUrl.replace(/\/:/, "/~~") : initialUrl;
|
|
467
528
|
const isCycle = (id, result) => {
|
|
@@ -530,7 +591,7 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
530
591
|
const redirect = definition == null ? void 0 : definition.redirect;
|
|
531
592
|
if (redirect.sourceMustMatchDomain && processedUrl.domain !== processedResult.domain)
|
|
532
593
|
return void 0;
|
|
533
|
-
const finalUrl = (options == null ? void 0 : options.reverse) ? "n/a" :
|
|
594
|
+
const finalUrl = (options == null ? void 0 : options.reverse) ? "n/a" : getTargetVariableExpandedUrl(processedUrl.url, redirect);
|
|
534
595
|
return {
|
|
535
596
|
url: finalUrl,
|
|
536
597
|
definition,
|
|
@@ -556,56 +617,6 @@ var _RedirectClient = class _RedirectClient extends ApiClient {
|
|
|
556
617
|
}
|
|
557
618
|
return true;
|
|
558
619
|
}
|
|
559
|
-
static getTargetVariableExpandedUrl(url, redirectDefinition, isVariable) {
|
|
560
|
-
const processedTarget = processUrl(redirectDefinition.targetUrl);
|
|
561
|
-
const processedSource = processUrl(redirectDefinition.sourceUrl);
|
|
562
|
-
let finalUrlPath = processedTarget.path;
|
|
563
|
-
const processedUrl = processUrl(url);
|
|
564
|
-
const variables = this.getSourceVariables(processedUrl.path, processedSource.path, isVariable);
|
|
565
|
-
for (const variable in variables) {
|
|
566
|
-
finalUrlPath = finalUrlPath.replace(variable, variables[variable]);
|
|
567
|
-
}
|
|
568
|
-
let protocol = redirectDefinition.targetPreserveIncomingProtocol || processedTarget.protocol === "" ? processedUrl.protocol : processedTarget.protocol;
|
|
569
|
-
const domain = protocol !== "" ? redirectDefinition.targetPreserveIncomingDomain || processedTarget.domain === "" ? processedUrl.domain : processedTarget.domain : "";
|
|
570
|
-
if (domain === "" && protocol !== "") {
|
|
571
|
-
protocol = "";
|
|
572
|
-
}
|
|
573
|
-
const port = domain === "" ? "" : redirectDefinition.targetPreserveIncomingDomain || processedTarget.domain === "" ? processedUrl.port : processedTarget.port;
|
|
574
|
-
const query = redirectDefinition.sourceRetainQuerystring && redirectDefinition.targetMergeQuerystring ? this.mergeQueryStrings(processedUrl.query, processedTarget.query) : !redirectDefinition.targetMergeQuerystring && redirectDefinition.sourceRetainQuerystring ? processedUrl.query : processedTarget.query;
|
|
575
|
-
const fragment = redirectDefinition.sourceRetainQuerystring && redirectDefinition.targetMergeQuerystring ? this.mergeQueryStrings(processedUrl.fragment, processedTarget.fragment) : !redirectDefinition.targetMergeQuerystring && redirectDefinition.sourceRetainQuerystring ? processedUrl.fragment : processedTarget.fragment;
|
|
576
|
-
return `${protocol}${domain}${port}${finalUrlPath}${query}${fragment}`;
|
|
577
|
-
}
|
|
578
|
-
static mergeQueryStrings(qs1, qs2) {
|
|
579
|
-
let fragment = false;
|
|
580
|
-
if (qs1.startsWith("#")) {
|
|
581
|
-
fragment = true;
|
|
582
|
-
qs1 = qs1.substring(1);
|
|
583
|
-
}
|
|
584
|
-
if (qs2.startsWith("#")) {
|
|
585
|
-
fragment = true;
|
|
586
|
-
qs2 = qs2.substring(1);
|
|
587
|
-
}
|
|
588
|
-
const params1 = new URLSearchParams(qs1);
|
|
589
|
-
const params2 = new URLSearchParams(qs2);
|
|
590
|
-
const merged = new URLSearchParams([...params1, ...params2]).toString();
|
|
591
|
-
if (merged.length > 0)
|
|
592
|
-
return (fragment ? "#" : "?") + merged;
|
|
593
|
-
return "";
|
|
594
|
-
}
|
|
595
|
-
static getSourceVariables(path, source, isVariable = (pathSegment, isLast) => pathSegment.startsWith(":") || pathSegment === "*" && isLast) {
|
|
596
|
-
const variables = {};
|
|
597
|
-
const pathSegments = path.split("/");
|
|
598
|
-
const sourceSegments = source.split("/");
|
|
599
|
-
if (pathSegments.length !== sourceSegments.length && !source.endsWith("/*")) {
|
|
600
|
-
throw new Error("Path and source have different numbers of path segments, must be the same");
|
|
601
|
-
}
|
|
602
|
-
sourceSegments.forEach((sourceSegment, i) => {
|
|
603
|
-
if (isVariable(sourceSegment, i === sourceSegments.length - 1)) {
|
|
604
|
-
variables[sourceSegment] = pathSegments[i];
|
|
605
|
-
}
|
|
606
|
-
});
|
|
607
|
-
return variables;
|
|
608
|
-
}
|
|
609
620
|
};
|
|
610
621
|
_RedirectClient.processUrlBestMatch = async (url, trie, options) => {
|
|
611
622
|
var _a;
|
|
@@ -624,8 +635,6 @@ var UncachedRedirectClient = class extends RedirectClient {
|
|
|
624
635
|
|
|
625
636
|
// src/util/RedirectFileConverter.ts
|
|
626
637
|
var getDefaultClient = async () => {
|
|
627
|
-
const dotenv = await import("./main-4Y7KG46W.mjs");
|
|
628
|
-
dotenv.config();
|
|
629
638
|
return new RedirectClient({
|
|
630
639
|
apiKey: process.env.UNIFORM_API_KEY,
|
|
631
640
|
apiHost: process.env.UNIFORM_BASE_URL,
|
|
@@ -702,5 +711,8 @@ export {
|
|
|
702
711
|
RedirectFileConverter,
|
|
703
712
|
UncachedRedirectClient,
|
|
704
713
|
WithMemoryCache,
|
|
714
|
+
getSourceVariables,
|
|
715
|
+
getTargetVariableExpandedUrl,
|
|
716
|
+
mergeQueryStrings,
|
|
705
717
|
processUrl
|
|
706
718
|
};
|