ipx 4.0.0-alpha.2 → 4.0.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/README.md +505 -77
- package/dist/THIRD-PARTY-LICENSES.md.gz +0 -0
- package/dist/_chunks/libs/@fastify/accept-negotiator.mjs +23 -24
- package/dist/_chunks/libs/crossws.d.mts +1 -0
- package/dist/_chunks/libs/css-select.mjs +1078 -938
- package/dist/_chunks/libs/css-tree.mjs +175 -297
- package/dist/_chunks/libs/csso.mjs +65 -110
- package/dist/_chunks/libs/etag.mjs +1 -1
- package/dist/_chunks/libs/h3.d.mts +3 -0
- package/dist/_chunks/libs/h3.mjs +138 -95
- package/dist/_chunks/libs/image-meta.d.mts +2 -6
- package/dist/_chunks/libs/image-meta.mjs +465 -306
- package/dist/_chunks/libs/sax.mjs +82 -80
- package/dist/_chunks/libs/svgo.mjs +970 -1013
- package/dist/_chunks/libs/ufo.mjs +17 -24
- package/dist/_chunks/node-fs.mjs +1100 -200
- package/dist/_chunks/rolldown-runtime.mjs +2 -11
- package/dist/cli.d.mts +1 -1
- package/dist/cli.mjs +4 -3
- package/dist/index.d.mts +242 -21
- package/dist/index.mjs +2 -2
- package/package.json +32 -28
- package/dist/THIRD-PARTY-LICENSES.md +0 -539
|
@@ -1,41 +1,34 @@
|
|
|
1
1
|
String.fromCharCode;
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
} catch {
|
|
6
|
-
return `` + e;
|
|
7
|
-
}
|
|
2
|
+
const e = /^[\s\w\0+.-]{2,}:([/\\]{1,2})/, t = /^[\s\w\0+.-]{2,}:([/\\]{2})?/, n = /^([/\\]\s*){2,}[^/\\]/, r = /\/$|\/\?|\/#/, i = /^\.?\//;
|
|
3
|
+
function a(r, i = {}) {
|
|
4
|
+
return typeof i == `boolean` && (i = { acceptRelative: i }), i.strict ? e.test(r) : t.test(r) || (i.acceptRelative ? n.test(r) : !1);
|
|
8
5
|
}
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return typeof i == `boolean` && (i = { acceptRelative: i }), i.strict ? t.test(e) : n.test(e) || (i.acceptRelative ? r.test(e) : !1);
|
|
6
|
+
function o(e = ``, t) {
|
|
7
|
+
return t ? r.test(e) : e.endsWith(`/`);
|
|
12
8
|
}
|
|
13
9
|
function s(e = ``, t) {
|
|
14
|
-
return t ? i.test(e) : e.endsWith(`/`);
|
|
15
|
-
}
|
|
16
|
-
function c(e = ``, t) {
|
|
17
10
|
if (!t) return e.endsWith(`/`) ? e : e + `/`;
|
|
18
|
-
if (
|
|
11
|
+
if (o(e, !0)) return e || `/`;
|
|
19
12
|
let n = e, r = ``, i = e.indexOf(`#`);
|
|
20
13
|
if (i !== -1 && (n = e.slice(0, i), r = e.slice(i), !n)) return r;
|
|
21
|
-
let [a, ...
|
|
22
|
-
return a + `/` + (
|
|
14
|
+
let [a, ...s] = n.split(`?`);
|
|
15
|
+
return a + `/` + (s.length > 0 ? `?${s.join(`?`)}` : ``) + r;
|
|
23
16
|
}
|
|
24
|
-
function
|
|
17
|
+
function c(e = ``) {
|
|
25
18
|
return e.startsWith(`/`);
|
|
26
19
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
20
|
+
function l(e = ``) {
|
|
21
|
+
return c(e) ? e : `/` + e;
|
|
29
22
|
}
|
|
30
|
-
function
|
|
23
|
+
function u(e) {
|
|
31
24
|
return e && e !== `/`;
|
|
32
25
|
}
|
|
33
|
-
function
|
|
26
|
+
function d(e, ...t) {
|
|
34
27
|
let n = e || ``;
|
|
35
|
-
for (let e of t.filter((e) =>
|
|
36
|
-
let t = e.replace(
|
|
37
|
-
n =
|
|
28
|
+
for (let e of t.filter((e) => u(e))) if (n) {
|
|
29
|
+
let t = e.replace(i, ``);
|
|
30
|
+
n = s(n) + t;
|
|
38
31
|
} else n = e;
|
|
39
32
|
return n;
|
|
40
33
|
}
|
|
41
|
-
export {
|
|
34
|
+
export { a as hasProtocol, d as joinURL, l as withLeadingSlash };
|