@uniformdev/redirect 19.90.0 → 19.91.0
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/dist/index.esm.js +14 -8
- package/dist/index.js +14 -8
- package/dist/index.mjs +14 -8
- package/package.json +3 -3
package/dist/index.esm.js
CHANGED
|
@@ -260,15 +260,21 @@ import { ApiClient } from "@uniformdev/context/api";
|
|
|
260
260
|
// src/util/url.ts
|
|
261
261
|
function processUrl(url) {
|
|
262
262
|
var _a, _b, _c, _d, _e, _f;
|
|
263
|
-
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 : "";
|
|
264
270
|
return {
|
|
265
|
-
url
|
|
266
|
-
protocol
|
|
267
|
-
domain
|
|
268
|
-
port
|
|
269
|
-
path
|
|
270
|
-
query
|
|
271
|
-
fragment
|
|
271
|
+
url: `${protocol}${domain}${port}${path}${query}${fragment}`,
|
|
272
|
+
protocol,
|
|
273
|
+
domain,
|
|
274
|
+
port,
|
|
275
|
+
path,
|
|
276
|
+
query,
|
|
277
|
+
fragment
|
|
272
278
|
};
|
|
273
279
|
}
|
|
274
280
|
|
package/dist/index.js
CHANGED
|
@@ -306,15 +306,21 @@ var import_api = require("@uniformdev/context/api");
|
|
|
306
306
|
// src/util/url.ts
|
|
307
307
|
function processUrl(url) {
|
|
308
308
|
var _a, _b, _c, _d, _e, _f;
|
|
309
|
-
const matches = url.match(/^(https?:\/\/)?(([^:/?#]*)(?:(:[0-9]+))?)?([/]{0,1}[^?#]*)(\?[
|
|
309
|
+
const matches = url.match(/^(https?:\/\/)?(([^:/?#]*)(?:(:[0-9]+))?)?([/]{0,1}[^?#]*)(\?[^#?]*|)(#.*|)$/);
|
|
310
|
+
const protocol = (_a = matches == null ? void 0 : matches[1]) != null ? _a : "";
|
|
311
|
+
const domain = (_b = matches == null ? void 0 : matches[3]) != null ? _b : "";
|
|
312
|
+
const port = (_c = matches == null ? void 0 : matches[4]) != null ? _c : "";
|
|
313
|
+
const path = (_d = matches == null ? void 0 : matches[5].replace(/\/+$/g, "")) != null ? _d : "";
|
|
314
|
+
const query = (_e = matches == null ? void 0 : matches[6]) != null ? _e : "";
|
|
315
|
+
const fragment = (_f = matches == null ? void 0 : matches[7]) != null ? _f : "";
|
|
310
316
|
return {
|
|
311
|
-
url
|
|
312
|
-
protocol
|
|
313
|
-
domain
|
|
314
|
-
port
|
|
315
|
-
path
|
|
316
|
-
query
|
|
317
|
-
fragment
|
|
317
|
+
url: `${protocol}${domain}${port}${path}${query}${fragment}`,
|
|
318
|
+
protocol,
|
|
319
|
+
domain,
|
|
320
|
+
port,
|
|
321
|
+
path,
|
|
322
|
+
query,
|
|
323
|
+
fragment
|
|
318
324
|
};
|
|
319
325
|
}
|
|
320
326
|
|
package/dist/index.mjs
CHANGED
|
@@ -260,15 +260,21 @@ import { ApiClient } from "@uniformdev/context/api";
|
|
|
260
260
|
// src/util/url.ts
|
|
261
261
|
function processUrl(url) {
|
|
262
262
|
var _a, _b, _c, _d, _e, _f;
|
|
263
|
-
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 : "";
|
|
264
270
|
return {
|
|
265
|
-
url
|
|
266
|
-
protocol
|
|
267
|
-
domain
|
|
268
|
-
port
|
|
269
|
-
path
|
|
270
|
-
query
|
|
271
|
-
fragment
|
|
271
|
+
url: `${protocol}${domain}${port}${path}${query}${fragment}`,
|
|
272
|
+
protocol,
|
|
273
|
+
domain,
|
|
274
|
+
port,
|
|
275
|
+
path,
|
|
276
|
+
query,
|
|
277
|
+
fragment
|
|
272
278
|
};
|
|
273
279
|
}
|
|
274
280
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/redirect",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.91.0",
|
|
4
4
|
"description": "Uniform redirect client",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -33,12 +33,12 @@
|
|
|
33
33
|
"/dist"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@uniformdev/context": "19.
|
|
36
|
+
"@uniformdev/context": "19.91.0",
|
|
37
37
|
"p-limit": "^3.1.0",
|
|
38
38
|
"rfdc": "^1.3.0"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "c1d1a232c177a29f73ec0334d5b70e11fc6f4d77"
|
|
44
44
|
}
|