nf3 0.3.9 → 0.3.11
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 +7 -1
- package/dist/THIRD-PARTY-LICENSES.md +253 -0
- package/dist/_chunks/libs/exsolve.d.mts +1 -0
- package/dist/_chunks/libs/exsolve.mjs +212 -212
- package/dist/_chunks/libs/pathe.mjs +25 -24
- package/dist/_chunks/libs/pkg-types.d.mts +1 -1
- package/dist/_chunks/trace.mjs +6 -0
- package/dist/db.mjs +12 -45
- package/dist/index.mjs +1 -0
- package/dist/node_modules/@vercel/nft/out/analyze.js +1 -1
- package/dist/node_modules/@vercel/nft/out/node-file-trace.js +1 -1
- package/dist/node_modules/@vercel/nft/package.json +1 -1
- package/dist/node_modules/acorn/dist/acorn.js +6 -6
- package/dist/node_modules/acorn/package.json +1 -1
- package/dist/node_modules/consola/dist/basic.cjs +1 -1
- package/dist/node_modules/consola/dist/core.cjs +2 -2
- package/dist/node_modules/consola/dist/shared/consola.DCGIlDNP.cjs +7 -7
- package/dist/node_modules/glob/dist/commonjs/index.min.js +3 -0
- package/dist/node_modules/glob/package.json +13 -3
- package/dist/plugin.mjs +3 -1
- package/package.json +11 -11
- package/dist/node_modules/@isaacs/balanced-match/dist/commonjs/index.js +0 -1
- package/dist/node_modules/@isaacs/balanced-match/dist/commonjs/package.json +0 -3
- package/dist/node_modules/@isaacs/balanced-match/package.json +0 -19
- package/dist/node_modules/@isaacs/brace-expansion/dist/commonjs/index.js +0 -1
- package/dist/node_modules/@isaacs/brace-expansion/dist/commonjs/package.json +0 -3
- package/dist/node_modules/@isaacs/brace-expansion/package.json +0 -19
- package/dist/node_modules/@isaacs/fs-minipass/dist/commonjs/index.js +0 -1
- package/dist/node_modules/@isaacs/fs-minipass/dist/commonjs/package.json +0 -3
- package/dist/node_modules/@isaacs/fs-minipass/package.json +0 -19
- package/dist/node_modules/glob/dist/commonjs/glob.js +0 -1
- package/dist/node_modules/glob/dist/commonjs/has-magic.js +0 -1
- package/dist/node_modules/glob/dist/commonjs/ignore.js +0 -1
- package/dist/node_modules/glob/dist/commonjs/index.js +0 -1
- package/dist/node_modules/glob/dist/commonjs/pattern.js +0 -1
- package/dist/node_modules/glob/dist/commonjs/processor.js +0 -1
- package/dist/node_modules/glob/dist/commonjs/walker.js +0 -1
- package/dist/node_modules/lru-cache/dist/commonjs/index.js +0 -1
- package/dist/node_modules/lru-cache/dist/commonjs/package.json +0 -3
- package/dist/node_modules/lru-cache/package.json +0 -28
- package/dist/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +0 -1
- package/dist/node_modules/minimatch/dist/commonjs/ast.js +0 -1
- package/dist/node_modules/minimatch/dist/commonjs/brace-expressions.js +0 -1
- package/dist/node_modules/minimatch/dist/commonjs/escape.js +0 -1
- package/dist/node_modules/minimatch/dist/commonjs/index.js +0 -3
- package/dist/node_modules/minimatch/dist/commonjs/package.json +0 -3
- package/dist/node_modules/minimatch/dist/commonjs/unescape.js +0 -1
- package/dist/node_modules/minimatch/package.json +0 -19
- package/dist/node_modules/minipass/dist/commonjs/index.js +0 -1
- package/dist/node_modules/minipass/dist/commonjs/package.json +0 -3
- package/dist/node_modules/minipass/package.json +0 -19
- package/dist/node_modules/path-scurry/dist/commonjs/index.js +0 -1
- package/dist/node_modules/path-scurry/dist/commonjs/package.json +0 -3
- package/dist/node_modules/path-scurry/package.json +0 -19
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { URL as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { format, inspect } from "node:util";
|
|
8
|
-
const
|
|
1
|
+
import e, { lstatSync as t, realpathSync as n, statSync as r } from "node:fs";
|
|
2
|
+
import { URL as i, fileURLToPath as a, pathToFileURL as o } from "node:url";
|
|
3
|
+
import s, { isAbsolute as c } from "node:path";
|
|
4
|
+
import l from "node:assert";
|
|
5
|
+
import u from "node:process";
|
|
6
|
+
import d from "node:v8";
|
|
7
|
+
import { format as f, inspect as p } from "node:util";
|
|
8
|
+
const m = `_http_agent._http_client._http_common._http_incoming._http_outgoing._http_server._stream_duplex._stream_passthrough._stream_readable._stream_transform._stream_wrap._stream_writable._tls_common._tls_wrap.assert.assert/strict.async_hooks.buffer.child_process.cluster.console.constants.crypto.dgram.diagnostics_channel.dns.dns/promises.domain.events.fs.fs/promises.http.http2.https.inspector.inspector/promises.module.net.os.path.path/posix.path/win32.perf_hooks.process.punycode.querystring.readline.readline/promises.repl.stream.stream/consumers.stream/promises.stream/web.string_decoder.sys.timers.timers/promises.tls.trace_events.tty.url.util.util/types.v8.vm.wasi.worker_threads.zlib`.split(`.`), h = {}.hasOwnProperty, g = /^([A-Z][a-z\d]*)+$/, ee = new Set([
|
|
9
9
|
`string`,
|
|
10
10
|
`function`,
|
|
11
11
|
`number`,
|
|
@@ -15,21 +15,21 @@ const nodeBuiltins = `_http_agent._http_client._http_common._http_incoming._http
|
|
|
15
15
|
`boolean`,
|
|
16
16
|
`bigint`,
|
|
17
17
|
`symbol`
|
|
18
|
-
]),
|
|
19
|
-
let
|
|
20
|
-
function
|
|
18
|
+
]), _ = /* @__PURE__ */ new Map();
|
|
19
|
+
let v;
|
|
20
|
+
function y(e, t = `and`) {
|
|
21
21
|
return e.length < 3 ? e.join(` ${t} `) : `${e.slice(0, -1).join(`, `)}, ${t} ${e.at(-1)}`;
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
return
|
|
23
|
+
function b(e, t, n) {
|
|
24
|
+
return _.set(e, t), te(n, e);
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function te(e, t) {
|
|
27
27
|
return function(...n) {
|
|
28
28
|
let r = Error.stackTraceLimit;
|
|
29
|
-
|
|
29
|
+
x() && (Error.stackTraceLimit = 0);
|
|
30
30
|
let i = new e();
|
|
31
|
-
|
|
32
|
-
let a =
|
|
31
|
+
x() && (Error.stackTraceLimit = r);
|
|
32
|
+
let a = re(t, n, i);
|
|
33
33
|
return Object.defineProperties(i, {
|
|
34
34
|
message: {
|
|
35
35
|
value: a,
|
|
@@ -45,40 +45,40 @@ function makeNodeErrorWithCode(e, t) {
|
|
|
45
45
|
writable: !0,
|
|
46
46
|
configurable: !0
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), S(i), i.code = t, i;
|
|
49
49
|
};
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function x() {
|
|
52
52
|
try {
|
|
53
|
-
if (
|
|
53
|
+
if (d.startupSnapshot.isBuildingSnapshot()) return !1;
|
|
54
54
|
} catch {}
|
|
55
55
|
let e = Object.getOwnPropertyDescriptor(Error, `stackTraceLimit`);
|
|
56
|
-
return e === void 0 ? Object.isExtensible(Error) :
|
|
56
|
+
return e === void 0 ? Object.isExtensible(Error) : h.call(e, `writable`) && e.writable !== void 0 ? e.writable : e.set !== void 0;
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function ne(e) {
|
|
59
59
|
let t = `__node_internal_` + e.name;
|
|
60
60
|
return Object.defineProperty(e, `name`, { value: t }), e;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
63
|
-
let t =
|
|
64
|
-
return t && (
|
|
62
|
+
const S = ne(function(e) {
|
|
63
|
+
let t = x();
|
|
64
|
+
return t && (v = Error.stackTraceLimit, Error.stackTraceLimit = Infinity), Error.captureStackTrace(e), t && (Error.stackTraceLimit = v), e;
|
|
65
65
|
});
|
|
66
|
-
function
|
|
67
|
-
let r =
|
|
68
|
-
if (
|
|
66
|
+
function re(e, t, n) {
|
|
67
|
+
let r = _.get(e);
|
|
68
|
+
if (l.ok(r !== void 0, "expected `message` to be found"), typeof r == `function`) return l.ok(r.length <= t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${r.length}).`), Reflect.apply(r, n, t);
|
|
69
69
|
let i = /%[dfijoOs]/g, a = 0;
|
|
70
70
|
for (; i.exec(r) !== null;) a++;
|
|
71
|
-
return
|
|
71
|
+
return l.ok(a === t.length, `Code: ${e}; The provided arguments length (${t.length}) does not match the required ones (${a}).`), t.length === 0 ? r : (t.unshift(r), Reflect.apply(f, null, t));
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function ie(e) {
|
|
74
74
|
if (e == null) return String(e);
|
|
75
75
|
if (typeof e == `function` && e.name) return `function ${e.name}`;
|
|
76
|
-
if (typeof e == `object`) return e.constructor && e.constructor.name ? `an instance of ${e.constructor.name}` : `${
|
|
77
|
-
let t =
|
|
76
|
+
if (typeof e == `object`) return e.constructor && e.constructor.name ? `an instance of ${e.constructor.name}` : `${p(e, { depth: -1 })}`;
|
|
77
|
+
let t = p(e, { colors: !1 });
|
|
78
78
|
return t.length > 28 && (t = `${t.slice(0, 25)}...`), `type ${typeof e} (${t})`;
|
|
79
79
|
}
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
b(`ERR_INVALID_ARG_TYPE`, (e, t, n) => {
|
|
81
|
+
l.ok(typeof e == `string`, `'name' must be a string`), Array.isArray(t) || (t = [t]);
|
|
82
82
|
let r = `The `;
|
|
83
83
|
if (e.endsWith(` argument`)) r += `${e} `;
|
|
84
84
|
else {
|
|
@@ -87,30 +87,30 @@ createError(`ERR_INVALID_ARG_TYPE`, (e, t, n) => {
|
|
|
87
87
|
}
|
|
88
88
|
r += `must be `;
|
|
89
89
|
let i = [], a = [], o = [];
|
|
90
|
-
for (let e of t)
|
|
90
|
+
for (let e of t) l.ok(typeof e == `string`, `All expected entries have to be of type string`), ee.has(e) ? i.push(e.toLowerCase()) : g.exec(e) === null ? (l.ok(e !== `object`, `The value "object" should be written as "Object"`), o.push(e)) : a.push(e);
|
|
91
91
|
if (a.length > 0) {
|
|
92
92
|
let e = i.indexOf(`object`);
|
|
93
93
|
e !== -1 && (i.slice(e, 1), a.push(`Object`));
|
|
94
94
|
}
|
|
95
|
-
return i.length > 0 && (r += `${i.length > 1 ? `one of type` : `of type`} ${
|
|
95
|
+
return i.length > 0 && (r += `${i.length > 1 ? `one of type` : `of type`} ${y(i, `or`)}`, (a.length > 0 || o.length > 0) && (r += ` or `)), a.length > 0 && (r += `an instance of ${y(a, `or`)}`, o.length > 0 && (r += ` or `)), o.length > 0 && (o.length > 1 ? r += `one of ${y(o, `or`)}` : (o[0]?.toLowerCase() !== o[0] && (r += `an `), r += `${o[0]}`)), r += `. Received ${ie(n)}`, r;
|
|
96
96
|
}, TypeError);
|
|
97
|
-
const
|
|
97
|
+
const C = b(`ERR_INVALID_MODULE_SPECIFIER`, (e, t, n) => `Invalid module "${e}" ${t}${n ? ` imported from ${n}` : ``}`, TypeError), w = b(`ERR_INVALID_PACKAGE_CONFIG`, (e, t, n) => `Invalid package config ${e}${t ? ` while importing ${t}` : ``}${n ? `. ${n}` : ``}`, Error), ae = b(`ERR_INVALID_PACKAGE_TARGET`, (e, t, n, r = !1, i) => {
|
|
98
98
|
let a = typeof n == `string` && !r && n.length > 0 && !n.startsWith(`./`);
|
|
99
|
-
return t === `.` ? (
|
|
100
|
-
}, Error),
|
|
101
|
-
|
|
102
|
-
const
|
|
103
|
-
|
|
104
|
-
let r =
|
|
99
|
+
return t === `.` ? (l.ok(r === !1), `Invalid "exports" main target ${JSON.stringify(n)} defined in the package config ${e}package.json${i ? ` imported from ${i}` : ``}${a ? `; targets must start with "./"` : ``}`) : `Invalid "${r ? `imports` : `exports`}" target ${JSON.stringify(n)} defined for '${t}' in the package config ${e}package.json${i ? ` imported from ${i}` : ``}${a ? `; targets must start with "./"` : ``}`;
|
|
100
|
+
}, Error), T = b(`ERR_MODULE_NOT_FOUND`, (e, t, n = !1) => `Cannot find ${n ? `module` : `package`} '${e}' imported from ${t}`, Error);
|
|
101
|
+
b(`ERR_NETWORK_IMPORT_DISALLOWED`, `import of '%s' by %s is not supported: %s`, Error);
|
|
102
|
+
const E = b(`ERR_PACKAGE_IMPORT_NOT_DEFINED`, (e, t, n) => `Package import specifier "${e}" is not defined${t ? ` in package ${t || ``}package.json` : ``} imported from ${n}`, TypeError), D = b(`ERR_PACKAGE_PATH_NOT_EXPORTED`, (e, t, n) => t === `.` ? `No "exports" main defined in ${e}package.json${n ? ` imported from ${n}` : ``}` : `Package subpath '${t}' is not defined by "exports" in ${e}package.json${n ? ` imported from ${n}` : ``}`, Error), O = b(`ERR_UNSUPPORTED_DIR_IMPORT`, `Directory import '%s' is not supported resolving ES modules imported from %s`, Error), k = b(`ERR_UNSUPPORTED_RESOLVE_REQUEST`, `Failed to resolve module specifier "%s" from "%s": Invalid relative URL or base scheme is not hierarchical.`, TypeError), oe = b(`ERR_UNKNOWN_FILE_EXTENSION`, (e, t) => `Unknown file extension "${e}" for ${t}`, TypeError);
|
|
103
|
+
b(`ERR_INVALID_ARG_VALUE`, (e, t, n = `is invalid`) => {
|
|
104
|
+
let r = p(t);
|
|
105
105
|
return r.length > 128 && (r = `${r.slice(0, 128)}...`), `The ${e.includes(`.`) ? `property` : `argument`} '${e}' ${n}. Received ${r}`;
|
|
106
106
|
}, TypeError);
|
|
107
|
-
const
|
|
108
|
-
function
|
|
109
|
-
let i =
|
|
107
|
+
const A = {}.hasOwnProperty, j = /* @__PURE__ */ new Map();
|
|
108
|
+
function M(t, { base: n, specifier: r }) {
|
|
109
|
+
let i = j.get(t);
|
|
110
110
|
if (i) return i;
|
|
111
111
|
let o;
|
|
112
112
|
try {
|
|
113
|
-
o =
|
|
113
|
+
o = e.readFileSync(s.toNamespacedPath(t), `utf8`);
|
|
114
114
|
} catch (e) {
|
|
115
115
|
let t = e;
|
|
116
116
|
if (t.code !== `ENOENT`) throw t;
|
|
@@ -129,28 +129,28 @@ function read(t, { base: n, specifier: r }) {
|
|
|
129
129
|
try {
|
|
130
130
|
e = JSON.parse(o);
|
|
131
131
|
} catch (e) {
|
|
132
|
-
let i = new
|
|
132
|
+
let i = new w(t, (n ? `"${r}" from ` : ``) + a(n || r), e.message);
|
|
133
133
|
throw i.cause = e, i;
|
|
134
134
|
}
|
|
135
|
-
c.exists = !0,
|
|
135
|
+
c.exists = !0, A.call(e, `name`) && typeof e.name == `string` && (c.name = e.name), A.call(e, `main`) && typeof e.main == `string` && (c.main = e.main), A.call(e, `exports`) && (c.exports = e.exports), A.call(e, `imports`) && (c.imports = e.imports), A.call(e, `type`) && (e.type === `commonjs` || e.type === `module`) && (c.type = e.type);
|
|
136
136
|
}
|
|
137
|
-
return
|
|
137
|
+
return j.set(t, c), c;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function N(e) {
|
|
140
140
|
let t = new URL(`package.json`, e);
|
|
141
141
|
for (; !t.pathname.endsWith(`node_modules/package.json`);) {
|
|
142
|
-
let n =
|
|
142
|
+
let n = M(a(t), { specifier: e });
|
|
143
143
|
if (n.exists) return n;
|
|
144
144
|
let r = t;
|
|
145
145
|
if (t = new URL(`../package.json`, t), t.pathname === r.pathname) break;
|
|
146
146
|
}
|
|
147
147
|
return {
|
|
148
|
-
pjsonPath:
|
|
148
|
+
pjsonPath: a(t),
|
|
149
149
|
exists: !1,
|
|
150
150
|
type: `none`
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
const
|
|
153
|
+
const se = {}.hasOwnProperty, ce = {
|
|
154
154
|
__proto__: null,
|
|
155
155
|
".json": `json`,
|
|
156
156
|
".cjs": `commonjs`,
|
|
@@ -159,24 +159,24 @@ const hasOwnProperty = {}.hasOwnProperty, extensionFormatMap = {
|
|
|
159
159
|
".ts": `module`,
|
|
160
160
|
".mts": `module`,
|
|
161
161
|
".mjs": `module`
|
|
162
|
-
},
|
|
162
|
+
}, P = {
|
|
163
163
|
__proto__: null,
|
|
164
|
-
"data:":
|
|
165
|
-
"file:":
|
|
164
|
+
"data:": ue,
|
|
165
|
+
"file:": fe,
|
|
166
166
|
"node:": () => `builtin`
|
|
167
167
|
};
|
|
168
|
-
function
|
|
168
|
+
function le(e) {
|
|
169
169
|
return e && /\s*(text|application)\/javascript\s*(;\s*charset=utf-?8\s*)?/i.test(e) ? `module` : e === `application/json` ? `json` : null;
|
|
170
170
|
}
|
|
171
|
-
function
|
|
171
|
+
function ue(e) {
|
|
172
172
|
let { 1: t } = /^([^/]+\/[^;,]+)[^,]*?(;base64)?,/.exec(e.pathname) || [
|
|
173
173
|
null,
|
|
174
174
|
null,
|
|
175
175
|
null
|
|
176
176
|
];
|
|
177
|
-
return
|
|
177
|
+
return le(t);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function de(e) {
|
|
180
180
|
let t = e.pathname, n = t.length;
|
|
181
181
|
for (; n--;) {
|
|
182
182
|
let e = t.codePointAt(n);
|
|
@@ -185,48 +185,48 @@ function extname(e) {
|
|
|
185
185
|
}
|
|
186
186
|
return ``;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
let r =
|
|
188
|
+
function fe(e, t, n) {
|
|
189
|
+
let r = de(e);
|
|
190
190
|
if (r === `.js`) {
|
|
191
|
-
let { type: t } =
|
|
191
|
+
let { type: t } = N(e);
|
|
192
192
|
return t === `none` ? `commonjs` : t;
|
|
193
193
|
}
|
|
194
194
|
if (r === ``) {
|
|
195
|
-
let { type: t } =
|
|
195
|
+
let { type: t } = N(e);
|
|
196
196
|
return t === `none` || t === `commonjs` ? `commonjs` : `module`;
|
|
197
197
|
}
|
|
198
|
-
let i =
|
|
198
|
+
let i = ce[r];
|
|
199
199
|
if (i) return i;
|
|
200
|
-
if (!n) throw new
|
|
200
|
+
if (!n) throw new oe(r, a(e));
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function pe(e, t) {
|
|
203
203
|
let n = e.protocol;
|
|
204
|
-
return
|
|
204
|
+
return se.call(P, n) && P[n](e, t, !0) || null;
|
|
205
205
|
}
|
|
206
|
-
const
|
|
207
|
-
function
|
|
208
|
-
if (
|
|
209
|
-
let c =
|
|
210
|
-
|
|
206
|
+
const F = RegExp.prototype[Symbol.replace], I = {}.hasOwnProperty, L = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i, R = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))(\\|\/|$)/i, z = /^\.|%|\\/, B = /\*/g, me = /%2f|%5c/i, V = /* @__PURE__ */ new Set(), he = /[/\\]{2}/;
|
|
207
|
+
function H(e, t, n, r, i, o, s) {
|
|
208
|
+
if (u.noDeprecation) return;
|
|
209
|
+
let c = a(r), l = he.exec(s ? e : t) !== null;
|
|
210
|
+
u.emitWarning(`Use of deprecated ${l ? `double slash` : `leading or trailing slash matching`} resolving "${e}" for module request "${t}" ${t === n ? `` : `matched to "${n}" `}in the "${i ? `imports` : `exports`}" field module resolution of the package at ${c}${o ? ` imported from ${a(o)}` : ``}.`, `DeprecationWarning`, `DEP0166`);
|
|
211
211
|
}
|
|
212
|
-
function
|
|
213
|
-
if (
|
|
214
|
-
let o =
|
|
215
|
-
r ?
|
|
212
|
+
function U(e, t, n, r) {
|
|
213
|
+
if (u.noDeprecation || pe(e, { parentURL: n.href }) !== `module`) return;
|
|
214
|
+
let o = a(e.href), c = a(new i(`.`, t)), l = a(n);
|
|
215
|
+
r ? s.resolve(c, r) !== o && u.emitWarning(`Package ${c} has a "main" field set to "${r}", excluding the full filename and extension to the resolved file at "${o.slice(c.length)}", imported from ${l}.\n Automatic extension resolution of the "main" field is deprecated for ES modules.`, `DeprecationWarning`, `DEP0151`) : u.emitWarning(`No "main" or "exports" field defined in the package.json for ${c} resolving the main entry point "${o.slice(c.length)}", imported from ${l}.\nDefault "index" lookups for the main are deprecated for ES modules.`, `DeprecationWarning`, `DEP0151`);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function W(e) {
|
|
218
218
|
try {
|
|
219
|
-
return
|
|
219
|
+
return r(e);
|
|
220
220
|
} catch {}
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
let t =
|
|
222
|
+
function G(e) {
|
|
223
|
+
let t = r(e, { throwIfNoEntry: !1 });
|
|
224
224
|
return (t ? t.isFile() : void 0) ?? !1;
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function ge(e, t, n) {
|
|
227
227
|
let r;
|
|
228
228
|
if (t.main !== void 0) {
|
|
229
|
-
if (r = new
|
|
229
|
+
if (r = new i(t.main, e), G(r)) return r;
|
|
230
230
|
let a = [
|
|
231
231
|
`./${t.main}.js`,
|
|
232
232
|
`./${t.main}.json`,
|
|
@@ -235,86 +235,86 @@ function legacyMainResolve(e, t, n) {
|
|
|
235
235
|
`./${t.main}/index.json`,
|
|
236
236
|
`./${t.main}/index.node`
|
|
237
237
|
], o = -1;
|
|
238
|
-
for (; ++o < a.length && (r = new
|
|
239
|
-
if (r) return
|
|
238
|
+
for (; ++o < a.length && (r = new i(a[o], e), !G(r));) r = void 0;
|
|
239
|
+
if (r) return U(r, e, n, t.main), r;
|
|
240
240
|
}
|
|
241
241
|
let o = [
|
|
242
242
|
`./index.js`,
|
|
243
243
|
`./index.json`,
|
|
244
244
|
`./index.node`
|
|
245
245
|
], s = -1;
|
|
246
|
-
for (; ++s < o.length && (r = new
|
|
247
|
-
if (r) return
|
|
248
|
-
throw new
|
|
246
|
+
for (; ++s < o.length && (r = new i(o[s], e), !G(r));) r = void 0;
|
|
247
|
+
if (r) return U(r, e, n, t.main), r;
|
|
248
|
+
throw new T(a(new i(`.`, e)), a(n));
|
|
249
249
|
}
|
|
250
|
-
function
|
|
251
|
-
if (
|
|
250
|
+
function _e(e, t, r) {
|
|
251
|
+
if (me.exec(e.pathname) !== null) throw new C(e.pathname, String.raw`must not include encoded "/" or "\" characters`, a(t));
|
|
252
252
|
let i;
|
|
253
253
|
try {
|
|
254
|
-
i =
|
|
254
|
+
i = a(e);
|
|
255
255
|
} catch (n) {
|
|
256
256
|
throw Object.defineProperty(n, `input`, { value: String(e) }), Object.defineProperty(n, `module`, { value: String(t) }), n;
|
|
257
257
|
}
|
|
258
|
-
let c =
|
|
258
|
+
let c = W(i.endsWith(`/`) ? i.slice(-1) : i);
|
|
259
259
|
if (c && c.isDirectory()) {
|
|
260
|
-
let n = new
|
|
260
|
+
let n = new O(i, a(t));
|
|
261
261
|
throw n.url = String(e), n;
|
|
262
262
|
}
|
|
263
263
|
if (!c || !c.isFile()) {
|
|
264
|
-
let n = new
|
|
264
|
+
let n = new T(i || e.pathname, t && a(t), !0);
|
|
265
265
|
throw n.url = String(e), n;
|
|
266
266
|
}
|
|
267
267
|
if (!r) {
|
|
268
|
-
let t =
|
|
269
|
-
e =
|
|
268
|
+
let t = n(i), { search: r, hash: a } = e;
|
|
269
|
+
e = o(t + (i.endsWith(s.sep) ? `/` : ``)), e.search = r, e.hash = a;
|
|
270
270
|
}
|
|
271
271
|
return e;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
274
|
-
return new
|
|
273
|
+
function ve(e, t, n) {
|
|
274
|
+
return new E(e, t && a(new i(`.`, t)), a(n));
|
|
275
275
|
}
|
|
276
|
-
function
|
|
277
|
-
return new
|
|
276
|
+
function K(e, t, n) {
|
|
277
|
+
return new D(a(new i(`.`, t)), e, n && a(n));
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
throw new
|
|
279
|
+
function ye(e, t, n, r, i) {
|
|
280
|
+
throw new C(e, `request is not a valid match in pattern "${t}" for the "${r ? `imports` : `exports`}" resolution of ${a(n)}`, i && a(i));
|
|
281
281
|
}
|
|
282
|
-
function
|
|
283
|
-
return t = typeof t == `object` && t ? JSON.stringify(t, null, ``) : `${t}`, new
|
|
282
|
+
function q(e, t, n, r, o) {
|
|
283
|
+
return t = typeof t == `object` && t ? JSON.stringify(t, null, ``) : `${t}`, new ae(a(new i(`.`, n)), e, t, r, o && a(o));
|
|
284
284
|
}
|
|
285
|
-
function
|
|
286
|
-
if (t !== `` && !o && e.at(-1) !== `/`) throw
|
|
285
|
+
function be(e, t, n, r, a, o, s, c, l) {
|
|
286
|
+
if (t !== `` && !o && e.at(-1) !== `/`) throw q(n, e, r, s, a);
|
|
287
287
|
if (!e.startsWith(`./`)) {
|
|
288
288
|
if (s && !e.startsWith(`../`) && !e.startsWith(`/`)) {
|
|
289
289
|
let n = !1;
|
|
290
290
|
try {
|
|
291
|
-
new
|
|
291
|
+
new i(e), n = !0;
|
|
292
292
|
} catch {}
|
|
293
|
-
if (!n) return
|
|
293
|
+
if (!n) return Z(o ? F.call(B, e, () => t) : e + t, r, l);
|
|
294
294
|
}
|
|
295
|
-
throw
|
|
295
|
+
throw q(n, e, r, s, a);
|
|
296
296
|
}
|
|
297
|
-
if (
|
|
297
|
+
if (L.exec(e.slice(2)) !== null) if (R.exec(e.slice(2)) === null) {
|
|
298
298
|
if (!c) {
|
|
299
299
|
let i = o ? n.replace(`*`, () => t) : n + t;
|
|
300
|
-
|
|
300
|
+
H(o ? F.call(B, e, () => t) : e, i, n, r, s, a, !0);
|
|
301
301
|
}
|
|
302
|
-
} else throw
|
|
303
|
-
let u = new
|
|
304
|
-
if (!d.startsWith(f)) throw
|
|
302
|
+
} else throw q(n, e, r, s, a);
|
|
303
|
+
let u = new i(e, r), d = u.pathname, f = new i(`.`, r).pathname;
|
|
304
|
+
if (!d.startsWith(f)) throw q(n, e, r, s, a);
|
|
305
305
|
if (t === ``) return u;
|
|
306
|
-
if (
|
|
306
|
+
if (L.exec(t) !== null) {
|
|
307
307
|
let i = o ? n.replace(`*`, () => t) : n + t;
|
|
308
|
-
|
|
308
|
+
R.exec(t) === null ? c || H(o ? F.call(B, e, () => t) : e, i, n, r, s, a, !1) : ye(i, n, r, s, a);
|
|
309
309
|
}
|
|
310
|
-
return o ? new
|
|
310
|
+
return o ? new i(F.call(B, u.href, () => t)) : new i(t, u);
|
|
311
311
|
}
|
|
312
|
-
function
|
|
312
|
+
function xe(e) {
|
|
313
313
|
let t = Number(e);
|
|
314
314
|
return `${t}` === e ? t >= 0 && t < 4294967295 : !1;
|
|
315
315
|
}
|
|
316
|
-
function
|
|
317
|
-
if (typeof t == `string`) return
|
|
316
|
+
function J(e, t, n, r, i, o, s, c, l) {
|
|
317
|
+
if (typeof t == `string`) return be(t, n, r, e, i, o, s, c, l);
|
|
318
318
|
if (Array.isArray(t)) {
|
|
319
319
|
let a = t;
|
|
320
320
|
if (a.length === 0) return null;
|
|
@@ -322,7 +322,7 @@ function resolvePackageTarget(e, t, n, r, i, o, s, c, l) {
|
|
|
322
322
|
for (; ++d < a.length;) {
|
|
323
323
|
let t = a[d], f;
|
|
324
324
|
try {
|
|
325
|
-
f =
|
|
325
|
+
f = J(e, t, n, r, i, o, s, c, l);
|
|
326
326
|
} catch (e) {
|
|
327
327
|
let t = e;
|
|
328
328
|
if (u = t, t.code === `ERR_INVALID_PACKAGE_TARGET`) continue;
|
|
@@ -343,12 +343,12 @@ function resolvePackageTarget(e, t, n, r, i, o, s, c, l) {
|
|
|
343
343
|
let u = Object.getOwnPropertyNames(t), d = -1;
|
|
344
344
|
for (; ++d < u.length;) {
|
|
345
345
|
let t = u[d];
|
|
346
|
-
if (
|
|
346
|
+
if (xe(t)) throw new w(a(e), a(i), `"exports" cannot contain numeric property keys.`);
|
|
347
347
|
}
|
|
348
348
|
for (d = -1; ++d < u.length;) {
|
|
349
349
|
let a = u[d];
|
|
350
350
|
if (a === `default` || l && l.has(a)) {
|
|
351
|
-
let u = t[a], d =
|
|
351
|
+
let u = t[a], d = J(e, u, n, r, i, o, s, c, l);
|
|
352
352
|
if (d === void 0) continue;
|
|
353
353
|
return d;
|
|
354
354
|
}
|
|
@@ -356,59 +356,59 @@ function resolvePackageTarget(e, t, n, r, i, o, s, c, l) {
|
|
|
356
356
|
return null;
|
|
357
357
|
}
|
|
358
358
|
if (t === null) return null;
|
|
359
|
-
throw
|
|
359
|
+
throw q(r, t, e, s, i);
|
|
360
360
|
}
|
|
361
|
-
function
|
|
361
|
+
function Se(e, t, n) {
|
|
362
362
|
if (typeof e == `string` || Array.isArray(e)) return !0;
|
|
363
363
|
if (typeof e != `object` || !e) return !1;
|
|
364
364
|
let r = Object.getOwnPropertyNames(e), i = !1, o = 0, s = -1;
|
|
365
365
|
for (; ++s < r.length;) {
|
|
366
366
|
let e = r[s], c = e === `` || e[0] !== `.`;
|
|
367
367
|
if (o++ === 0) i = c;
|
|
368
|
-
else if (i !== c) throw new
|
|
368
|
+
else if (i !== c) throw new w(a(t), a(n), `"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`);
|
|
369
369
|
}
|
|
370
370
|
return i;
|
|
371
371
|
}
|
|
372
|
-
function
|
|
373
|
-
if (
|
|
374
|
-
let r =
|
|
375
|
-
|
|
372
|
+
function Ce(e, t, n) {
|
|
373
|
+
if (u.noDeprecation) return;
|
|
374
|
+
let r = a(t);
|
|
375
|
+
V.has(r + `|` + e) || (V.add(r + `|` + e), u.emitWarning(`Use of deprecated trailing slash pattern mapping "${e}" in the "exports" field module resolution of the package at ${r}${n ? ` imported from ${a(n)}` : ``}. Mapping specifiers ending in "/" is no longer supported.`, `DeprecationWarning`, `DEP0155`));
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function Y(e, t, n, r, i) {
|
|
378
378
|
let a = n.exports;
|
|
379
|
-
if (
|
|
380
|
-
let n = a[t], o =
|
|
381
|
-
if (o == null) throw
|
|
379
|
+
if (Se(a, e, r) && (a = { ".": a }), I.call(a, t) && !t.includes(`*`) && !t.endsWith(`/`)) {
|
|
380
|
+
let n = a[t], o = J(e, n, ``, t, r, !1, !1, !1, i);
|
|
381
|
+
if (o == null) throw K(t, e, r);
|
|
382
382
|
return o;
|
|
383
383
|
}
|
|
384
384
|
let o = ``, s = ``, c = Object.getOwnPropertyNames(a), l = -1;
|
|
385
385
|
for (; ++l < c.length;) {
|
|
386
386
|
let n = c[l], i = n.indexOf(`*`);
|
|
387
387
|
if (i !== -1 && t.startsWith(n.slice(0, i))) {
|
|
388
|
-
t.endsWith(`/`) &&
|
|
388
|
+
t.endsWith(`/`) && Ce(t, e, r);
|
|
389
389
|
let a = n.slice(i + 1);
|
|
390
|
-
t.length >= n.length && t.endsWith(a) &&
|
|
390
|
+
t.length >= n.length && t.endsWith(a) && X(o, n) === 1 && n.lastIndexOf(`*`) === i && (o = n, s = t.slice(i, t.length - a.length));
|
|
391
391
|
}
|
|
392
392
|
}
|
|
393
393
|
if (o) {
|
|
394
|
-
let n = a[o], c =
|
|
395
|
-
if (c == null) throw
|
|
394
|
+
let n = a[o], c = J(e, n, s, o, r, !0, !1, t.endsWith(`/`), i);
|
|
395
|
+
if (c == null) throw K(t, e, r);
|
|
396
396
|
return c;
|
|
397
397
|
}
|
|
398
|
-
throw
|
|
398
|
+
throw K(t, e, r);
|
|
399
399
|
}
|
|
400
|
-
function
|
|
400
|
+
function X(e, t) {
|
|
401
401
|
let n = e.indexOf(`*`), r = t.indexOf(`*`), i = n === -1 ? e.length : n + 1, a = r === -1 ? t.length : r + 1;
|
|
402
402
|
return i > a ? -1 : a > i || n === -1 ? 1 : r === -1 || e.length > t.length ? -1 : t.length > e.length ? 1 : 0;
|
|
403
403
|
}
|
|
404
|
-
function
|
|
405
|
-
if (e === `#` || e.startsWith(`#/`) || e.endsWith(`/`)) throw new
|
|
406
|
-
let r, i =
|
|
404
|
+
function we(e, t, n) {
|
|
405
|
+
if (e === `#` || e.startsWith(`#/`) || e.endsWith(`/`)) throw new C(e, `is not a valid internal imports specifier name`, a(t));
|
|
406
|
+
let r, i = N(t);
|
|
407
407
|
if (i.exists) {
|
|
408
|
-
r =
|
|
408
|
+
r = o(i.pjsonPath);
|
|
409
409
|
let a = i.imports;
|
|
410
|
-
if (a) if (
|
|
411
|
-
let i =
|
|
410
|
+
if (a) if (I.call(a, e) && !e.includes(`*`)) {
|
|
411
|
+
let i = J(r, a[e], ``, e, t, !1, !0, !1, n);
|
|
412
412
|
if (i != null) return i;
|
|
413
413
|
} else {
|
|
414
414
|
let i = ``, o = ``, s = Object.getOwnPropertyNames(a), c = -1;
|
|
@@ -416,79 +416,79 @@ function packageImportsResolve(e, t, n) {
|
|
|
416
416
|
let t = s[c], n = t.indexOf(`*`);
|
|
417
417
|
if (n !== -1 && e.startsWith(t.slice(0, -1))) {
|
|
418
418
|
let r = t.slice(n + 1);
|
|
419
|
-
e.length >= t.length && e.endsWith(r) &&
|
|
419
|
+
e.length >= t.length && e.endsWith(r) && X(i, t) === 1 && t.lastIndexOf(`*`) === n && (i = t, o = e.slice(n, e.length - r.length));
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
if (i) {
|
|
423
|
-
let e = a[i], s =
|
|
423
|
+
let e = a[i], s = J(r, e, o, i, t, !0, !0, !1, n);
|
|
424
424
|
if (s != null) return s;
|
|
425
425
|
}
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
throw
|
|
428
|
+
throw ve(e, r, t);
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function Te(e, t) {
|
|
431
431
|
let n = e.indexOf(`/`), r = !0, i = !1;
|
|
432
432
|
e[0] === `@` && (i = !0, n === -1 || e.length === 0 ? r = !1 : n = e.indexOf(`/`, n + 1));
|
|
433
433
|
let o = n === -1 ? e : e.slice(0, n);
|
|
434
|
-
if (
|
|
434
|
+
if (z.exec(o) !== null && (r = !1), !r) throw new C(e, `is not a valid package name`, a(t));
|
|
435
435
|
return {
|
|
436
436
|
packageName: o,
|
|
437
437
|
packageSubpath: `.` + (n === -1 ? `` : e.slice(n)),
|
|
438
438
|
isScoped: i
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
|
-
function
|
|
442
|
-
if (
|
|
443
|
-
let { packageName: r, packageSubpath: s, isScoped: c } =
|
|
444
|
-
if (l.exists && l.name === r && l.exports !== void 0 && l.exports !== null) return
|
|
445
|
-
let u = new
|
|
441
|
+
function Z(e, t, n) {
|
|
442
|
+
if (m.includes(e)) return new i(`node:` + e);
|
|
443
|
+
let { packageName: r, packageSubpath: s, isScoped: c } = Te(e, t), l = N(t);
|
|
444
|
+
if (l.exists && l.name === r && l.exports !== void 0 && l.exports !== null) return Y(o(l.pjsonPath), s, l, t, n);
|
|
445
|
+
let u = new i(`./node_modules/` + r + `/package.json`, t), d = a(u), f;
|
|
446
446
|
do {
|
|
447
|
-
let o =
|
|
447
|
+
let o = W(d.slice(0, -13));
|
|
448
448
|
if (!o || !o.isDirectory()) {
|
|
449
|
-
f = d, u = new
|
|
449
|
+
f = d, u = new i((c ? `../../../../node_modules/` : `../../../node_modules/`) + r + `/package.json`, u), d = a(u);
|
|
450
450
|
continue;
|
|
451
451
|
}
|
|
452
|
-
let l =
|
|
452
|
+
let l = M(d, {
|
|
453
453
|
base: t,
|
|
454
454
|
specifier: e
|
|
455
455
|
});
|
|
456
|
-
return l.exports !== void 0 && l.exports !== null ?
|
|
456
|
+
return l.exports !== void 0 && l.exports !== null ? Y(u, s, l, t, n) : s === `.` ? ge(u, l, t) : new i(s, u);
|
|
457
457
|
} while (d.length !== f.length);
|
|
458
|
-
throw new
|
|
458
|
+
throw new T(r, a(t), !1);
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Ee(e) {
|
|
461
461
|
return e[0] === `.` && (e.length === 1 || e[1] === `/` || e[1] === `.` && (e.length === 2 || e[2] === `/`));
|
|
462
462
|
}
|
|
463
|
-
function
|
|
464
|
-
return e === `` ? !1 : e[0] === `/` ? !0 :
|
|
463
|
+
function De(e) {
|
|
464
|
+
return e === `` ? !1 : e[0] === `/` ? !0 : Ee(e);
|
|
465
465
|
}
|
|
466
|
-
function
|
|
466
|
+
function Oe(e, t, n, r) {
|
|
467
467
|
let a = t.protocol, o = a === `data:`, s;
|
|
468
|
-
if (
|
|
469
|
-
s = new
|
|
468
|
+
if (De(e)) try {
|
|
469
|
+
s = new i(e, t);
|
|
470
470
|
} catch (n) {
|
|
471
|
-
let r = new
|
|
471
|
+
let r = new k(e, t);
|
|
472
472
|
throw r.cause = n, r;
|
|
473
473
|
}
|
|
474
|
-
else if (a === `file:` && e[0] === `#`) s =
|
|
474
|
+
else if (a === `file:` && e[0] === `#`) s = we(e, t, n);
|
|
475
475
|
else try {
|
|
476
|
-
s = new
|
|
476
|
+
s = new i(e);
|
|
477
477
|
} catch (r) {
|
|
478
|
-
if (o && !
|
|
479
|
-
let n = new
|
|
478
|
+
if (o && !m.includes(e)) {
|
|
479
|
+
let n = new k(e, t);
|
|
480
480
|
throw n.cause = r, n;
|
|
481
481
|
}
|
|
482
|
-
s =
|
|
482
|
+
s = Z(e, t, n);
|
|
483
483
|
}
|
|
484
|
-
return
|
|
484
|
+
return l.ok(s !== void 0, `expected to be defined`), s.protocol === `file:` ? _e(s, t, r) : s;
|
|
485
485
|
}
|
|
486
|
-
const
|
|
487
|
-
function
|
|
488
|
-
let i =
|
|
486
|
+
const ke = new Set([`node`, `import`]), Ae = process.platform === `win32`, je = globalThis.__EXSOLVE_CACHE__ ||= /* @__PURE__ */ new Map();
|
|
487
|
+
function Q(e, r) {
|
|
488
|
+
let i = Be(e);
|
|
489
489
|
if (`external` in i) return i.external;
|
|
490
490
|
let a = i.specifier, s = i.url, c = i.absolutePath, l, u;
|
|
491
|
-
if (r?.cache !== !1 && (l =
|
|
491
|
+
if (r?.cache !== !1 && (l = Le(c || a, r), u = r?.cache && typeof r?.cache == `object` ? r.cache : je), u) {
|
|
492
492
|
let e = u.get(l);
|
|
493
493
|
if (typeof e == `string`) return e;
|
|
494
494
|
if (e instanceof Error) {
|
|
@@ -497,62 +497,62 @@ function resolveModuleURL(e, r) {
|
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
if (c) try {
|
|
500
|
-
let e =
|
|
501
|
-
if (e.isSymbolicLink() && (c =
|
|
500
|
+
let e = t(c);
|
|
501
|
+
if (e.isSymbolicLink() && (c = n(c), s = o(c)), e.isFile()) return u && u.set(l, s.href), s.href;
|
|
502
502
|
} catch (e) {
|
|
503
503
|
if (e?.code !== `ENOENT`) throw u && u.set(l, e), e;
|
|
504
504
|
}
|
|
505
|
-
let d = r?.conditions ? new Set(r.conditions) :
|
|
505
|
+
let d = r?.conditions ? new Set(r.conditions) : ke, f = a || s.href, p = Pe(r?.from), m = r?.suffixes || [``], h = r?.extensions ? [``, ...r.extensions] : [``], g;
|
|
506
506
|
for (let e of p) {
|
|
507
507
|
for (let t of m) {
|
|
508
|
-
let n =
|
|
508
|
+
let n = Re(f, t);
|
|
509
509
|
n === `.` && (n += `/.`);
|
|
510
|
-
for (let t of h) if (g =
|
|
510
|
+
for (let t of h) if (g = Ne(n + t, e, d), g) break;
|
|
511
511
|
if (g) break;
|
|
512
512
|
}
|
|
513
513
|
if (g) break;
|
|
514
514
|
}
|
|
515
515
|
if (!g) {
|
|
516
|
-
let t = Error(`Cannot resolve module "${e}" (from: ${p.map((e) =>
|
|
516
|
+
let t = Error(`Cannot resolve module "${e}" (from: ${p.map((e) => Ie(e)).join(`, `)})`);
|
|
517
517
|
if (t.code = `ERR_MODULE_NOT_FOUND`, u && u.set(l, t), r?.try) return;
|
|
518
518
|
throw t;
|
|
519
519
|
}
|
|
520
520
|
return u && u.set(l, g.href), g.href;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
let n =
|
|
522
|
+
function Me(e, t) {
|
|
523
|
+
let n = Q(e, t);
|
|
524
524
|
if (!n || !n.startsWith(`file://`) && t?.try) return;
|
|
525
|
-
let r =
|
|
526
|
-
return
|
|
525
|
+
let r = a(n);
|
|
526
|
+
return Ae ? ze(r) : r;
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function Ne(e, t, n) {
|
|
529
529
|
try {
|
|
530
|
-
return
|
|
530
|
+
return Oe(e, t, n);
|
|
531
531
|
} catch {}
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
let t = (Array.isArray(e) ? e : [e]).flatMap((e) =>
|
|
535
|
-
return t.length === 0 ? [
|
|
533
|
+
function Pe(e) {
|
|
534
|
+
let t = (Array.isArray(e) ? e : [e]).flatMap((e) => Fe(e));
|
|
535
|
+
return t.length === 0 ? [o(`./`)] : t;
|
|
536
536
|
}
|
|
537
|
-
function
|
|
537
|
+
function Fe(e) {
|
|
538
538
|
if (!e) return [];
|
|
539
|
-
if (
|
|
539
|
+
if ($(e)) return [e];
|
|
540
540
|
if (typeof e != `string`) return [];
|
|
541
541
|
if (/^(?:node|data|http|https|file):/.test(e)) return new URL(e);
|
|
542
542
|
try {
|
|
543
|
-
return e.endsWith(`/`) ||
|
|
543
|
+
return e.endsWith(`/`) || r(e).isDirectory() ? o(e + `/`) : o(e);
|
|
544
544
|
} catch {
|
|
545
|
-
return [
|
|
545
|
+
return [o(e + `/`), o(e)];
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
function
|
|
548
|
+
function Ie(e) {
|
|
549
549
|
try {
|
|
550
|
-
return
|
|
550
|
+
return a(e);
|
|
551
551
|
} catch {
|
|
552
552
|
return e;
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
function
|
|
555
|
+
function Le(e, t) {
|
|
556
556
|
return JSON.stringify([
|
|
557
557
|
e,
|
|
558
558
|
(t?.conditions || [`node`, `import`]).sort(),
|
|
@@ -561,33 +561,33 @@ function _cacheKey(e, t) {
|
|
|
561
561
|
t?.suffixes
|
|
562
562
|
]);
|
|
563
563
|
}
|
|
564
|
-
function
|
|
564
|
+
function Re(e, t) {
|
|
565
565
|
return !e || !t || t === `/` ? e : (e.endsWith(`/`) ? e : e + `/`) + (t.startsWith(`/`) ? t.slice(1) : t);
|
|
566
566
|
}
|
|
567
|
-
function
|
|
567
|
+
function ze(e) {
|
|
568
568
|
return e.replace(/\\/g, `/`).replace(/^[a-z]:\//, (e) => e.toUpperCase());
|
|
569
569
|
}
|
|
570
|
-
function
|
|
570
|
+
function $(e) {
|
|
571
571
|
return e instanceof URL || e?.constructor?.name === `URL`;
|
|
572
572
|
}
|
|
573
|
-
function
|
|
573
|
+
function Be(e) {
|
|
574
574
|
if (typeof e == `string`) {
|
|
575
575
|
if (e.startsWith(`file:`)) {
|
|
576
576
|
let t = new URL(e);
|
|
577
577
|
return {
|
|
578
578
|
url: t,
|
|
579
|
-
absolutePath:
|
|
579
|
+
absolutePath: a(t)
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
|
-
return
|
|
583
|
-
url:
|
|
582
|
+
return c(e) ? {
|
|
583
|
+
url: o(e),
|
|
584
584
|
absolutePath: e
|
|
585
|
-
} : /^(?:node|data|http|https):/.test(e) ? { external: e } :
|
|
585
|
+
} : /^(?:node|data|http|https):/.test(e) ? { external: e } : m.includes(e) && !e.includes(`:`) ? { external: `node:${e}` } : { specifier: e };
|
|
586
586
|
}
|
|
587
|
-
if (
|
|
587
|
+
if ($(e)) return e.protocol === `file:` ? {
|
|
588
588
|
url: e,
|
|
589
|
-
absolutePath:
|
|
589
|
+
absolutePath: a(e)
|
|
590
590
|
} : { external: e.href };
|
|
591
591
|
throw TypeError("id must be a `string` or `URL`");
|
|
592
592
|
}
|
|
593
|
-
export {
|
|
593
|
+
export { Me as t };
|