@weapp-tailwindcss/shared 1.1.3 → 2.0.0-next.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/node.mjs CHANGED
@@ -1,28 +1,464 @@
1
- import {
2
- init_esm_shims
3
- } from "./chunk-7QA6IUZF.mjs";
4
-
5
- // src/node.ts
6
- init_esm_shims();
7
- import crypto from "crypto";
8
- import path from "pathe";
1
+ import crypto from "node:crypto";
2
+ //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
3
+ let _lazyMatch = () => {
4
+ var __lib__ = (() => {
5
+ var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e) => {
6
+ for (var n in e) m(r, n, {
7
+ get: e[n],
8
+ enumerable: true
9
+ });
10
+ }, H = (r, e, n, a) => {
11
+ if (e && typeof e == "object" || typeof e == "function") for (let t of G(e)) !T.call(r, t) && t !== n && m(r, t, {
12
+ get: () => e[t],
13
+ enumerable: !(a = V(e, t)) || a.enumerable
14
+ });
15
+ return r;
16
+ }, J = (r) => H(m({}, "__esModule", { value: true }), r), w = {};
17
+ q(w, { default: () => re });
18
+ var A = (r) => Array.isArray(r), d = (r) => typeof r == "function", Q = (r) => r.length === 0, W = (r) => typeof r == "number", K = (r) => typeof r == "object" && r !== null, X = (r) => r instanceof RegExp, b = (r) => typeof r == "string", h = (r) => r === void 0, Y = (r) => {
19
+ const e = /* @__PURE__ */ new Map();
20
+ return (n) => {
21
+ const a = e.get(n);
22
+ if (a) return a;
23
+ const t = r(n);
24
+ return e.set(n, t), t;
25
+ };
26
+ }, rr = (r, e, n = {}) => {
27
+ const a = {
28
+ cache: {},
29
+ input: r,
30
+ index: 0,
31
+ indexMax: 0,
32
+ options: n,
33
+ output: []
34
+ };
35
+ if (v(e)(a) && a.index === r.length) return a.output;
36
+ throw new Error(`Failed to parse at index ${a.indexMax}`);
37
+ }, i = (r, e) => A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e) => {
38
+ const n = {};
39
+ for (const a of r) {
40
+ if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
41
+ const t = a.charCodeAt(0);
42
+ n[t] = true;
43
+ }
44
+ return (a) => {
45
+ const t = a.index, o = a.input;
46
+ for (; a.index < o.length && o.charCodeAt(a.index) in n;) a.index += 1;
47
+ const u = a.index;
48
+ if (u > t) {
49
+ if (!h(e) && !a.options.silent) {
50
+ const s = a.input.slice(t, u), c = d(e) ? e(s, o, String(t)) : e;
51
+ h(c) || a.output.push(c);
52
+ }
53
+ a.indexMax = Math.max(a.indexMax, a.index);
54
+ }
55
+ return true;
56
+ };
57
+ }, nr = (r, e) => {
58
+ const n = r.source, a = r.flags.replace(/y|$/, "y"), t = new RegExp(n, a);
59
+ return g((o) => {
60
+ t.lastIndex = o.index;
61
+ const u = t.exec(o.input);
62
+ if (u) {
63
+ if (!h(e) && !o.options.silent) {
64
+ const s = d(e) ? e(...u, o.input, String(o.index)) : e;
65
+ h(s) || o.output.push(s);
66
+ }
67
+ return o.index += u[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
68
+ } else return false;
69
+ });
70
+ }, ar = (r, e) => (n) => {
71
+ if (n.input.startsWith(r, n.index)) {
72
+ if (!h(e) && !n.options.silent) {
73
+ const t = d(e) ? e(r, n.input, String(n.index)) : e;
74
+ h(t) || n.output.push(t);
75
+ }
76
+ return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
77
+ } else return false;
78
+ }, C = (r, e, n, a) => {
79
+ const t = v(r);
80
+ return g(_(M((o) => {
81
+ let u = 0;
82
+ for (; u < n;) {
83
+ const s = o.index;
84
+ if (!t(o) || (u += 1, o.index === s)) break;
85
+ }
86
+ return u >= e;
87
+ })));
88
+ }, tr = (r, e) => C(r, 0, 1), f = (r, e) => C(r, 0, Infinity), x = (r, e) => {
89
+ const n = r.map(v);
90
+ return g(_(M((a) => {
91
+ for (let t = 0, o = n.length; t < o; t++) if (!n[t](a)) return false;
92
+ return true;
93
+ })));
94
+ }, l = (r, e) => {
95
+ const n = r.map(v);
96
+ return g(_((a) => {
97
+ for (let t = 0, o = n.length; t < o; t++) if (n[t](a)) return true;
98
+ return false;
99
+ }));
100
+ }, M = (r, e = false) => {
101
+ const n = v(r);
102
+ return (a) => {
103
+ const t = a.index, o = a.output.length, u = n(a);
104
+ return (!u || e) && (a.index = t, a.output.length !== o && (a.output.length = o)), u;
105
+ };
106
+ }, _ = (r, e) => {
107
+ return v(r);
108
+ }, g = (() => {
109
+ let r = 0;
110
+ return (e) => {
111
+ const n = v(e), a = r += 1;
112
+ return (t) => {
113
+ var o;
114
+ if (t.options.memoization === false) return n(t);
115
+ const u = t.index, s = (o = t.cache)[a] || (o[a] = /* @__PURE__ */ new Map()), c = s.get(u);
116
+ if (c === false) return false;
117
+ if (W(c)) return t.index = c, true;
118
+ if (c) return t.index = c.index, c.output?.length && t.output.push(...c.output), true;
119
+ {
120
+ const Z = t.output.length;
121
+ if (n(t)) {
122
+ const D = t.index, U = t.output.length;
123
+ if (U > Z) {
124
+ const ee = t.output.slice(Z, U);
125
+ s.set(u, {
126
+ index: D,
127
+ output: ee
128
+ });
129
+ } else s.set(u, D);
130
+ return true;
131
+ } else return s.set(u, false), false;
132
+ }
133
+ };
134
+ };
135
+ })(), E = (r) => {
136
+ let e;
137
+ return (n) => (e || (e = v(r())), e(n));
138
+ }, v = Y((r) => {
139
+ if (d(r)) return Q(r) ? E(r) : r;
140
+ if (b(r) || X(r)) return i(r);
141
+ if (A(r)) return x(r);
142
+ if (K(r)) return l(Object.values(r));
143
+ throw new Error("Invalid rule");
144
+ }), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
145
+ let e = "";
146
+ for (; r > 0;) e = P[(r - 1) % 26] + e, r = Math.floor((r - 1) / 26);
147
+ return e;
148
+ }, O = (r) => {
149
+ let e = 0;
150
+ for (let n = 0, a = r.length; n < a; n++) e = e * 26 + P.indexOf(r[n]) + 1;
151
+ return e;
152
+ }, S = (r, e) => {
153
+ if (e < r) return S(e, r);
154
+ const n = [];
155
+ for (; r <= e;) n.push(r++);
156
+ return n;
157
+ }, or = (r, e, n) => S(r, e).map((a) => String(a).padStart(n, "0")), R = (r, e) => S(O(r), O(e)).map(ir), p = (r) => r, z = (r) => ur((e) => rr(e, r, { memoization: false }).join("")), ur = (r) => {
158
+ const e = {};
159
+ return (n) => e[n] ?? (e[n] = r(n));
160
+ }, sr = i(/^\*\*\/\*$/, ".*"), cr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]+)$/, (r, e, n) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}`), lr = i(/^\*\*\/(\*)?([ a-zA-Z0-9._-]*)\{([ a-zA-Z0-9._-]+(?:,[ a-zA-Z0-9._-]+)*)\}$/, (r, e, n, a) => `.*${e ? "" : "(?:^|/)"}${n.replaceAll(".", "\\.")}(?:${a.replaceAll(",", "|").replaceAll(".", "\\.")})`), y = i(/\\./, p), pr = i(/[$.*+?^(){}[\]\|]/, (r) => `\\${r}`), vr = i(/./, p), fr = l([i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), i(/^(!!)+/, "")]), j = l([
161
+ i(/\/(\*\*\/)+/, "(?:/.+/|/)"),
162
+ i(/^(\*\*\/)+/, "(?:^|.*/)"),
163
+ i(/\/(\*\*)$/, "(?:/.*|$)"),
164
+ i(/\*\*/, ".*")
165
+ ]), N = l([i(/\*\/(?!\*\*\/)/, "[^/]*/"), i(/\*/, "[^/]*")]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Er = l([
166
+ y,
167
+ i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`),
168
+ br,
169
+ i(/[^\]]/, p)
170
+ ]), B = x([
171
+ $r,
172
+ tr(Ar),
173
+ f(Er),
174
+ wr
175
+ ]), Pr = i("{", "(?:"), Or = i("}", ")"), I = x([
176
+ Pr,
177
+ l([
178
+ i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")),
179
+ i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => R(e, n).join("|")),
180
+ i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase())
181
+ ]),
182
+ Or
183
+ ]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), F = x([
184
+ kr,
185
+ f(l([
186
+ j,
187
+ N,
188
+ k,
189
+ B,
190
+ I,
191
+ E(() => F),
192
+ y,
193
+ Fr,
194
+ Ir,
195
+ Lr
196
+ ])),
197
+ Br
198
+ ]), L = z(f(l([
199
+ sr,
200
+ cr,
201
+ lr,
202
+ fr,
203
+ j,
204
+ N,
205
+ k,
206
+ B,
207
+ I,
208
+ F,
209
+ y,
210
+ pr,
211
+ vr
212
+ ]))), Tr = i(/\\./, p), qr = i(/./, p), Yr = z(f(l([
213
+ Tr,
214
+ i(/\*\*\*+/, "*"),
215
+ i(/([^/{[(!])\*\*/, (r, e) => `${e}*`),
216
+ i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`),
217
+ qr
218
+ ]))), $ = (r, e) => {
219
+ const n = Array.isArray(r) ? r : [r];
220
+ if (!n.length) return false;
221
+ const a = n.map($.compile), t = n.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t ? "/" : "");
222
+ return a.some((s) => s.test(o));
223
+ };
224
+ $.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
225
+ var re = $;
226
+ return J(w);
227
+ })();
228
+ return __lib__.default || __lib__;
229
+ };
230
+ let _match;
231
+ const zeptomatch = (path, pattern) => {
232
+ if (!_match) {
233
+ _match = _lazyMatch();
234
+ _lazyMatch = null;
235
+ }
236
+ return _match(path, pattern);
237
+ };
238
+ const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
239
+ function normalizeWindowsPath(input = "") {
240
+ if (!input) return input;
241
+ return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
242
+ }
243
+ const _UNC_REGEX = /^[/\\]{2}/;
244
+ const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
245
+ const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
246
+ const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
247
+ const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
248
+ const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
249
+ const normalize = function(path) {
250
+ if (path.length === 0) return ".";
251
+ path = normalizeWindowsPath(path);
252
+ const isUNCPath = path.match(_UNC_REGEX);
253
+ const isPathAbsolute = isAbsolute(path);
254
+ const trailingSeparator = path[path.length - 1] === "/";
255
+ path = normalizeString(path, !isPathAbsolute);
256
+ if (path.length === 0) {
257
+ if (isPathAbsolute) return "/";
258
+ return trailingSeparator ? "./" : ".";
259
+ }
260
+ if (trailingSeparator) path += "/";
261
+ if (_DRIVE_LETTER_RE.test(path)) path += "/";
262
+ if (isUNCPath) {
263
+ if (!isPathAbsolute) return `//./${path}`;
264
+ return `//${path}`;
265
+ }
266
+ return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
267
+ };
268
+ const join = function(...segments) {
269
+ let path = "";
270
+ for (const seg of segments) {
271
+ if (!seg) continue;
272
+ if (path.length > 0) {
273
+ const pathTrailing = path[path.length - 1] === "/";
274
+ const segLeading = seg[0] === "/";
275
+ if (pathTrailing && segLeading) path += seg.slice(1);
276
+ else path += pathTrailing || segLeading ? seg : `/${seg}`;
277
+ } else path += seg;
278
+ }
279
+ return normalize(path);
280
+ };
281
+ function cwd() {
282
+ if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
283
+ return "/";
284
+ }
285
+ const resolve = function(...arguments_) {
286
+ arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
287
+ let resolvedPath = "";
288
+ let resolvedAbsolute = false;
289
+ for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
290
+ const path = index >= 0 ? arguments_[index] : cwd();
291
+ if (!path || path.length === 0) continue;
292
+ resolvedPath = `${path}/${resolvedPath}`;
293
+ resolvedAbsolute = isAbsolute(path);
294
+ }
295
+ resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
296
+ if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
297
+ return resolvedPath.length > 0 ? resolvedPath : ".";
298
+ };
299
+ function normalizeString(path, allowAboveRoot) {
300
+ let res = "";
301
+ let lastSegmentLength = 0;
302
+ let lastSlash = -1;
303
+ let dots = 0;
304
+ let char = null;
305
+ for (let index = 0; index <= path.length; ++index) {
306
+ if (index < path.length) char = path[index];
307
+ else if (char === "/") break;
308
+ else char = "/";
309
+ if (char === "/") {
310
+ if (lastSlash === index - 1 || dots === 1);
311
+ else if (dots === 2) {
312
+ if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
313
+ if (res.length > 2) {
314
+ const lastSlashIndex = res.lastIndexOf("/");
315
+ if (lastSlashIndex === -1) {
316
+ res = "";
317
+ lastSegmentLength = 0;
318
+ } else {
319
+ res = res.slice(0, lastSlashIndex);
320
+ lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
321
+ }
322
+ lastSlash = index;
323
+ dots = 0;
324
+ continue;
325
+ } else if (res.length > 0) {
326
+ res = "";
327
+ lastSegmentLength = 0;
328
+ lastSlash = index;
329
+ dots = 0;
330
+ continue;
331
+ }
332
+ }
333
+ if (allowAboveRoot) {
334
+ res += res.length > 0 ? "/.." : "..";
335
+ lastSegmentLength = 2;
336
+ }
337
+ } else {
338
+ if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
339
+ else res = path.slice(lastSlash + 1, index);
340
+ lastSegmentLength = index - lastSlash - 1;
341
+ }
342
+ lastSlash = index;
343
+ dots = 0;
344
+ } else if (char === "." && dots !== -1) ++dots;
345
+ else dots = -1;
346
+ }
347
+ return res;
348
+ }
349
+ const isAbsolute = function(p) {
350
+ return _IS_ABSOLUTE_RE.test(p);
351
+ };
352
+ const toNamespacedPath = function(p) {
353
+ return normalizeWindowsPath(p);
354
+ };
355
+ const extname = function(p) {
356
+ if (p === "..") return "";
357
+ const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
358
+ return match && match[1] || "";
359
+ };
360
+ const relative = function(from, to) {
361
+ const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
362
+ const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
363
+ if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/");
364
+ const _fromCopy = [..._from];
365
+ for (const segment of _fromCopy) {
366
+ if (_to[0] !== segment) break;
367
+ _from.shift();
368
+ _to.shift();
369
+ }
370
+ return [..._from.map(() => ".."), ..._to].join("/");
371
+ };
372
+ const dirname = function(p) {
373
+ const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
374
+ if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
375
+ return segments.join("/") || (isAbsolute(p) ? "/" : ".");
376
+ };
377
+ const format = function(p) {
378
+ const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
379
+ const segments = [
380
+ p.root,
381
+ p.dir,
382
+ p.base ?? (p.name ?? "") + ext
383
+ ].filter(Boolean);
384
+ return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
385
+ };
386
+ const basename = function(p, extension) {
387
+ const segments = normalizeWindowsPath(p).split("/");
388
+ let lastSegment = "";
389
+ for (let i = segments.length - 1; i >= 0; i--) {
390
+ const val = segments[i];
391
+ if (val) {
392
+ lastSegment = val;
393
+ break;
394
+ }
395
+ }
396
+ return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
397
+ };
398
+ const parse = function(p) {
399
+ const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
400
+ const base = basename(p);
401
+ const extension = extname(base);
402
+ return {
403
+ root,
404
+ dir: dirname(p),
405
+ base,
406
+ ext: extension,
407
+ name: base.slice(0, base.length - extension.length)
408
+ };
409
+ };
410
+ const matchesGlob = (path, pattern) => {
411
+ return zeptomatch(pattern, normalize(path));
412
+ };
413
+ const _path = {
414
+ __proto__: null,
415
+ basename,
416
+ dirname,
417
+ extname,
418
+ format,
419
+ isAbsolute,
420
+ join,
421
+ matchesGlob,
422
+ normalize,
423
+ normalizeString,
424
+ parse,
425
+ relative,
426
+ resolve,
427
+ sep: "/",
428
+ toNamespacedPath
429
+ };
430
+ //#endregion
431
+ //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
432
+ const delimiter = globalThis.process?.platform === "win32" ? ";" : ":";
433
+ const _platforms = {
434
+ posix: void 0,
435
+ win32: void 0
436
+ };
437
+ const mix = (del = delimiter) => {
438
+ return new Proxy(_path, { get(_, prop) {
439
+ if (prop === "delimiter") return del;
440
+ if (prop === "posix") return posix;
441
+ if (prop === "win32") return win32;
442
+ return _platforms[prop] || _path[prop];
443
+ } });
444
+ };
445
+ const posix = /* @__PURE__ */ mix(":");
446
+ const win32 = /* @__PURE__ */ mix(";");
447
+ //#endregion
448
+ //#region src/node.ts
9
449
  function md5(input) {
10
- return crypto.createHash("md5").update(input).digest("hex");
450
+ return crypto.createHash("md5").update(input).digest("hex");
11
451
  }
12
452
  function removeAllExtensions(filePath) {
13
- if (!filePath) {
14
- return "";
15
- }
16
- let baseName = path.basename(filePath);
17
- let ext = path.extname(baseName);
18
- while (ext) {
19
- baseName = baseName.slice(0, -ext.length);
20
- ext = path.extname(baseName);
21
- }
22
- const dir = path.dirname(filePath);
23
- return dir === "." ? baseName : path.join(dir, baseName);
453
+ if (!filePath) return "";
454
+ let baseName = posix.basename(filePath);
455
+ let ext = posix.extname(baseName);
456
+ while (ext) {
457
+ baseName = baseName.slice(0, -ext.length);
458
+ ext = posix.extname(baseName);
459
+ }
460
+ const dir = posix.dirname(filePath);
461
+ return dir === "." ? baseName : posix.join(dir, baseName);
24
462
  }
25
- export {
26
- md5,
27
- removeAllExtensions
28
- };
463
+ //#endregion
464
+ export { md5, removeAllExtensions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/shared",
3
- "version": "1.1.3",
3
+ "version": "2.0.0-next.0",
4
4
  "description": "@weapp-tailwindcss/shared",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -41,11 +41,16 @@
41
41
  "node": "^20.19.0 || >=22.12.0"
42
42
  },
43
43
  "dependencies": {
44
+ "defu": "^6.1.7",
45
+ "get-value": "^4.0.1",
46
+ "set-value": "^4.1.0"
47
+ },
48
+ "devDependencies": {
44
49
  "pathe": "^2.0.3"
45
50
  },
46
51
  "scripts": {
47
- "dev": "tsup --watch --sourcemap",
48
- "build": "tsup",
52
+ "dev": "tsdown --watch --sourcemap",
53
+ "build": "tsdown",
49
54
  "test": "vitest run",
50
55
  "test:dev": "vitest",
51
56
  "release": "pnpm publish",
@@ -1,41 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __esm = (fn, res) => function __init() {
8
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
- };
10
- var __commonJS = (cb, mod) => function __require() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
-
30
- // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.12.0__@swc+core@1.15.21_@swc+_5ebcbf8346fe43415c2ec13051ebcdfe/node_modules/tsup/assets/cjs_shims.js
31
- var init_cjs_shims = __esm({
32
- "../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.12.0__@swc+core@1.15.21_@swc+_5ebcbf8346fe43415c2ec13051ebcdfe/node_modules/tsup/assets/cjs_shims.js"() {
33
- "use strict";
34
- }
35
- });
36
-
37
-
38
-
39
-
40
-
41
- exports.__commonJS = __commonJS; exports.__toESM = __toESM; exports.init_cjs_shims = init_cjs_shims;
@@ -1,43 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __esm = (fn, res) => function __init() {
8
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
9
- };
10
- var __commonJS = (cb, mod) => function __require() {
11
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
12
- };
13
- var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from))
16
- if (!__hasOwnProp.call(to, key) && key !== except)
17
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
- }
19
- return to;
20
- };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
-
30
- // ../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.12.0__@swc+core@1.15.21_@swc+_5ebcbf8346fe43415c2ec13051ebcdfe/node_modules/tsup/assets/esm_shims.js
31
- import path from "path";
32
- import { fileURLToPath } from "url";
33
- var init_esm_shims = __esm({
34
- "../../node_modules/.pnpm/tsup@8.5.1_@microsoft+api-extractor@7.55.2_@types+node@24.12.0__@swc+core@1.15.21_@swc+_5ebcbf8346fe43415c2ec13051ebcdfe/node_modules/tsup/assets/esm_shims.js"() {
35
- "use strict";
36
- }
37
- });
38
-
39
- export {
40
- __commonJS,
41
- __toESM,
42
- init_esm_shims
43
- };
@@ -1,5 +0,0 @@
1
- declare const validateFilterRE: RegExp;
2
- declare function isValidSelector(selector?: string): selector is string;
3
- declare function splitCode(code: string, allowDoubleQuotes?: boolean): string[];
4
-
5
- export { isValidSelector, splitCode, validateFilterRE };
package/dist/index.d.mts DELETED
@@ -1,30 +0,0 @@
1
- import * as defu from 'defu';
2
- export { defu } from 'defu';
3
- export { default as getValue } from 'get-value';
4
- export { default as setValue } from 'set-value';
5
-
6
- declare function isRegexp(value: unknown): value is RegExp;
7
- declare function isMap<T = unknown, K = unknown>(value: unknown): value is Map<T, K>;
8
- declare function isHttp(target: string): boolean;
9
- declare function cleanUrl(url: string): string;
10
- declare function toArray<T>(value: T | T[] | null | undefined): Array<NonNullable<T>>;
11
- declare function ensurePosix(value: string): string;
12
- declare function normalizeRoot(root: string): string;
13
- declare function normalizeRelativeImport(target: string): string;
14
- declare function regExpTest(arr: (string | RegExp)[], str: string, options?: {
15
- exact?: boolean;
16
- }): boolean;
17
- declare function noop(): void;
18
- declare function groupBy<T>(arr: T[], cb: (arg: T) => string): Record<string, T[]>;
19
- declare function removeExt(file: string): string;
20
- declare const defuOverrideArray: <Source extends {
21
- [x: string]: any;
22
- [x: number]: any;
23
- [x: symbol]: any;
24
- }, Defaults extends Array<{
25
- [x: string]: any;
26
- [x: number]: any;
27
- [x: symbol]: any;
28
- } | (number | boolean | any[] | Record<never, any> | null | undefined)>>(source: Source, ...defaults: Defaults) => defu.Defu<Source, Defaults>;
29
-
30
- export { cleanUrl, defuOverrideArray, ensurePosix, groupBy, isHttp, isMap, isRegexp, noop, normalizeRelativeImport, normalizeRoot, regExpTest, removeExt, toArray };
package/dist/node.d.mts DELETED
@@ -1,6 +0,0 @@
1
- import crypto from 'node:crypto';
2
-
3
- declare function md5(input: crypto.BinaryLike): string;
4
- declare function removeAllExtensions(filePath: string): string;
5
-
6
- export { md5, removeAllExtensions };