@rolldown/browser 1.0.0-beta.7-commit.a0a7d95 → 1.0.0-beta.7-commit.5436742

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.
@@ -1,10 +1,11 @@
1
1
  import { BindingHookSideEffects, BindingLogLevel, BindingPluginOrder, BindingWatcher, Bundler, parseSync, shutdownAsyncRuntime, startAsyncRuntime } from "./rolldown-binding.wasi-browser.js";
2
+ import path from "pathe";
2
3
  import colors from "ansis";
3
4
  import "@valibot/to-json-schema";
4
5
  import * as v from "valibot";
5
6
 
6
7
  //#region package.json
7
- var version = "1.0.0-beta.7-commit.a0a7d95";
8
+ var version = "1.0.0-beta.7-commit.5436742";
8
9
 
9
10
  //#endregion
10
11
  //#region src/builtin-plugin/utils.ts
@@ -24,460 +25,6 @@ var BuiltinPlugin = class {
24
25
  }
25
26
  };
26
27
 
27
- //#endregion
28
- //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/shared/pathe.M-eThtNZ.mjs
29
- let _lazyMatch = () => {
30
- var __lib__ = (() => {
31
- var m = Object.defineProperty, V = Object.getOwnPropertyDescriptor, G = Object.getOwnPropertyNames, T = Object.prototype.hasOwnProperty, q = (r, e) => {
32
- for (var n in e) m(r, n, {
33
- get: e[n],
34
- enumerable: true
35
- });
36
- }, H = (r, e, n, a) => {
37
- if (e && typeof e == "object" || typeof e == "function") for (let t$1 of G(e)) !T.call(r, t$1) && t$1 !== n && m(r, t$1, {
38
- get: () => e[t$1],
39
- enumerable: !(a = V(e, t$1)) || a.enumerable
40
- });
41
- return r;
42
- }, J = (r) => H(m({}, "__esModule", { value: true }), r), w = {};
43
- q(w, { default: () => re });
44
- 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) => {
45
- const e = new Map();
46
- return (n) => {
47
- const a = e.get(n);
48
- if (a) return a;
49
- const t$1 = r(n);
50
- return e.set(n, t$1), t$1;
51
- };
52
- }, rr = (r, e, n = {}) => {
53
- const a = {
54
- cache: {},
55
- input: r,
56
- index: 0,
57
- indexMax: 0,
58
- options: n,
59
- output: []
60
- };
61
- if (v$1(e)(a) && a.index === r.length) return a.output;
62
- throw new Error(`Failed to parse at index ${a.indexMax}`);
63
- }, i = (r, e) => A(r) ? er(r, e) : b(r) ? ar(r, e) : nr(r, e), er = (r, e) => {
64
- const n = {};
65
- for (const a of r) {
66
- if (a.length !== 1) throw new Error(`Invalid character: "${a}"`);
67
- const t$1 = a.charCodeAt(0);
68
- n[t$1] = true;
69
- }
70
- return (a) => {
71
- const t$1 = a.index, o = a.input;
72
- for (; a.index < o.length && o.charCodeAt(a.index) in n;) a.index += 1;
73
- const u$2 = a.index;
74
- if (u$2 > t$1) {
75
- if (!h(e) && !a.options.silent) {
76
- const s = a.input.slice(t$1, u$2), c = d(e) ? e(s, o, String(t$1)) : e;
77
- h(c) || a.output.push(c);
78
- }
79
- a.indexMax = Math.max(a.indexMax, a.index);
80
- }
81
- return true;
82
- };
83
- }, nr = (r, e) => {
84
- const n = r.source, a = r.flags.replace(/y|$/, "y"), t$1 = new RegExp(n, a);
85
- return g((o) => {
86
- t$1.lastIndex = o.index;
87
- const u$2 = t$1.exec(o.input);
88
- if (u$2) {
89
- if (!h(e) && !o.options.silent) {
90
- const s = d(e) ? e(...u$2, o.input, String(o.index)) : e;
91
- h(s) || o.output.push(s);
92
- }
93
- return o.index += u$2[0].length, o.indexMax = Math.max(o.indexMax, o.index), true;
94
- } else return false;
95
- });
96
- }, ar = (r, e) => (n) => {
97
- if (n.input.startsWith(r, n.index)) {
98
- if (!h(e) && !n.options.silent) {
99
- const t$1 = d(e) ? e(r, n.input, String(n.index)) : e;
100
- h(t$1) || n.output.push(t$1);
101
- }
102
- return n.index += r.length, n.indexMax = Math.max(n.indexMax, n.index), true;
103
- } else return false;
104
- }, C = (r, e, n, a) => {
105
- const t$1 = v$1(r);
106
- return g(_(M((o) => {
107
- let u$2 = 0;
108
- for (; u$2 < n;) {
109
- const s = o.index;
110
- if (!t$1(o) || (u$2 += 1, o.index === s)) break;
111
- }
112
- return u$2 >= e;
113
- })));
114
- }, tr = (r, e) => C(r, 0, 1), f = (r, e) => C(r, 0, Infinity), x = (r, e) => {
115
- const n = r.map(v$1);
116
- return g(_(M((a) => {
117
- for (let t$1 = 0, o = n.length; t$1 < o; t$1++) if (!n[t$1](a)) return false;
118
- return true;
119
- })));
120
- }, l = (r, e) => {
121
- const n = r.map(v$1);
122
- return g(_((a) => {
123
- for (let t$1 = 0, o = n.length; t$1 < o; t$1++) if (n[t$1](a)) return true;
124
- return false;
125
- }));
126
- }, M = (r, e = false) => {
127
- const n = v$1(r);
128
- return (a) => {
129
- const t$1 = a.index, o = a.output.length, u$2 = n(a);
130
- return (!u$2 || e) && (a.index = t$1, a.output.length !== o && (a.output.length = o)), u$2;
131
- };
132
- }, _ = (r, e) => {
133
- const n = v$1(r);
134
- return n;
135
- }, g = (() => {
136
- let r = 0;
137
- return (e) => {
138
- const n = v$1(e), a = r += 1;
139
- return (t$1) => {
140
- var o;
141
- if (t$1.options.memoization === false) return n(t$1);
142
- const u$2 = t$1.index, s = (o = t$1.cache)[a] || (o[a] = new Map()), c = s.get(u$2);
143
- if (c === false) return false;
144
- if (W(c)) return t$1.index = c, true;
145
- if (c) return t$1.index = c.index, c.output?.length && t$1.output.push(...c.output), true;
146
- {
147
- const Z = t$1.output.length;
148
- if (n(t$1)) {
149
- const D = t$1.index, U = t$1.output.length;
150
- if (U > Z) {
151
- const ee = t$1.output.slice(Z, U);
152
- s.set(u$2, {
153
- index: D,
154
- output: ee
155
- });
156
- } else s.set(u$2, D);
157
- return true;
158
- } else return s.set(u$2, false), false;
159
- }
160
- };
161
- };
162
- })(), E = (r) => {
163
- let e;
164
- return (n) => (e || (e = v$1(r())), e(n));
165
- }, v$1 = Y((r) => {
166
- if (d(r)) return Q(r) ? E(r) : r;
167
- if (b(r) || X(r)) return i(r);
168
- if (A(r)) return x(r);
169
- if (K(r)) return l(Object.values(r));
170
- throw new Error("Invalid rule");
171
- }), P = "abcdefghijklmnopqrstuvwxyz", ir = (r) => {
172
- let e = "";
173
- for (; r > 0;) {
174
- const n = (r - 1) % 26;
175
- e = P[n] + e, r = Math.floor((r - 1) / 26);
176
- }
177
- return e;
178
- }, O = (r) => {
179
- let e = 0;
180
- for (let n = 0, a = r.length; n < a; n++) e = e * 26 + P.indexOf(r[n]) + 1;
181
- return e;
182
- }, S = (r, e) => {
183
- if (e < r) return S(e, r);
184
- const n = [];
185
- for (; r <= e;) n.push(r++);
186
- return n;
187
- }, 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) => {
188
- const e = {};
189
- return (n) => e[n] ?? (e[n] = r(n));
190
- }, 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), hr = i(/^(?:!!)*!(.*)$/, (r, e) => `(?!^${L(e)}$).*?`), dr = i(/^(!!)+/, ""), fr = l([hr, dr]), xr = i(/\/(\*\*\/)+/, "(?:/.+/|/)"), gr = i(/^(\*\*\/)+/, "(?:^|.*/)"), mr = i(/\/(\*\*)$/, "(?:/.*|$)"), _r = i(/\*\*/, ".*"), j = l([
191
- xr,
192
- gr,
193
- mr,
194
- _r
195
- ]), Sr = i(/\*\/(?!\*\*\/)/, "[^/]*/"), yr = i(/\*/, "[^/]*"), N = l([Sr, yr]), k = i("?", "[^/]"), $r = i("[", p), wr = i("]", p), Ar = i(/[!^]/, "^/"), br = i(/[a-z]-[a-z]|[0-9]-[0-9]/i, p), Cr = i(/[$.*+?^(){}[\|]/, (r) => `\\${r}`), Mr = i(/[^\]]/, p), Er = l([
196
- y,
197
- Cr,
198
- br,
199
- Mr
200
- ]), B = x([
201
- $r,
202
- tr(Ar),
203
- f(Er),
204
- wr
205
- ]), Pr = i("{", "(?:"), Or = i("}", ")"), Rr = i(/(\d+)\.\.(\d+)/, (r, e, n) => or(+e, +n, Math.min(e.length, n.length)).join("|")), zr = i(/([a-z]+)\.\.([a-z]+)/, (r, e, n) => R(e, n).join("|")), jr = i(/([A-Z]+)\.\.([A-Z]+)/, (r, e, n) => R(e.toLowerCase(), n.toLowerCase()).join("|").toUpperCase()), Nr = l([
206
- Rr,
207
- zr,
208
- jr
209
- ]), I = x([
210
- Pr,
211
- Nr,
212
- Or
213
- ]), kr = i("{", "(?:"), Br = i("}", ")"), Ir = i(",", "|"), Fr = i(/[$.*+?^(){[\]\|]/, (r) => `\\${r}`), Lr = i(/[^}]/, p), Zr = E(() => F), Dr = l([
214
- j,
215
- N,
216
- k,
217
- B,
218
- I,
219
- Zr,
220
- y,
221
- Fr,
222
- Ir,
223
- Lr
224
- ]), F = x([
225
- kr,
226
- f(Dr),
227
- Br
228
- ]), Ur = f(l([
229
- sr,
230
- cr,
231
- lr,
232
- fr,
233
- j,
234
- N,
235
- k,
236
- B,
237
- I,
238
- F,
239
- y,
240
- pr,
241
- vr
242
- ])), Vr = Ur, Gr = z(Vr), L = Gr, Tr = i(/\\./, p), qr = i(/./, p), Hr = i(/\*\*\*+/, "*"), Jr = i(/([^/{[(!])\*\*/, (r, e) => `${e}*`), Qr = i(/(^|.)\*\*(?=[^*/)\]}])/, (r, e) => `${e}*`), Wr = f(l([
243
- Tr,
244
- Hr,
245
- Jr,
246
- Qr,
247
- qr
248
- ])), Kr = Wr, Xr = z(Kr), Yr = Xr, $ = (r, e) => {
249
- const n = Array.isArray(r) ? r : [r];
250
- if (!n.length) return false;
251
- const a = n.map($.compile), t$1 = n.every((s) => /(\/(?:\*\*)?|\[\/\])$/.test(s)), o = e.replace(/[\\\/]+/g, "/").replace(/\/$/, t$1 ? "/" : "");
252
- return a.some((s) => s.test(o));
253
- };
254
- $.compile = (r) => new RegExp(`^${L(Yr(r))}$`, "s");
255
- var re = $;
256
- return J(w);
257
- })();
258
- return __lib__.default || __lib__;
259
- };
260
- let _match;
261
- const zeptomatch = (path, pattern) => {
262
- if (!_match) {
263
- _match = _lazyMatch();
264
- _lazyMatch = null;
265
- }
266
- return _match(path, pattern);
267
- };
268
- const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
269
- function normalizeWindowsPath(input = "") {
270
- if (!input) return input;
271
- return input.replace(/\\/g, "/").replace(_DRIVE_LETTER_START_RE, (r) => r.toUpperCase());
272
- }
273
- const _UNC_REGEX = /^[/\\]{2}/;
274
- const _IS_ABSOLUTE_RE = /^[/\\](?![/\\])|^[/\\]{2}(?!\.)|^[A-Za-z]:[/\\]/;
275
- const _DRIVE_LETTER_RE = /^[A-Za-z]:$/;
276
- const _ROOT_FOLDER_RE = /^\/([A-Za-z]:)?$/;
277
- const _EXTNAME_RE = /.(\.[^./]+|\.)$/;
278
- const _PATH_ROOT_RE = /^[/\\]|^[a-zA-Z]:[/\\]/;
279
- const sep = "/";
280
- const normalize = function(path) {
281
- if (path.length === 0) return ".";
282
- path = normalizeWindowsPath(path);
283
- const isUNCPath = path.match(_UNC_REGEX);
284
- const isPathAbsolute = isAbsolute(path);
285
- const trailingSeparator = path[path.length - 1] === "/";
286
- path = normalizeString(path, !isPathAbsolute);
287
- if (path.length === 0) {
288
- if (isPathAbsolute) return "/";
289
- return trailingSeparator ? "./" : ".";
290
- }
291
- if (trailingSeparator) path += "/";
292
- if (_DRIVE_LETTER_RE.test(path)) path += "/";
293
- if (isUNCPath) {
294
- if (!isPathAbsolute) return `//./${path}`;
295
- return `//${path}`;
296
- }
297
- return isPathAbsolute && !isAbsolute(path) ? `/${path}` : path;
298
- };
299
- const join = function(...segments) {
300
- let path = "";
301
- for (const seg of segments) {
302
- if (!seg) continue;
303
- if (path.length > 0) {
304
- const pathTrailing = path[path.length - 1] === "/";
305
- const segLeading = seg[0] === "/";
306
- const both = pathTrailing && segLeading;
307
- if (both) path += seg.slice(1);
308
- else path += pathTrailing || segLeading ? seg : `/${seg}`;
309
- } else path += seg;
310
- }
311
- return normalize(path);
312
- };
313
- function cwd() {
314
- if (typeof process !== "undefined" && typeof process.cwd === "function") return process.cwd().replace(/\\/g, "/");
315
- return "/";
316
- }
317
- const resolve = function(...arguments_) {
318
- arguments_ = arguments_.map((argument) => normalizeWindowsPath(argument));
319
- let resolvedPath = "";
320
- let resolvedAbsolute = false;
321
- for (let index = arguments_.length - 1; index >= -1 && !resolvedAbsolute; index--) {
322
- const path = index >= 0 ? arguments_[index] : cwd();
323
- if (!path || path.length === 0) continue;
324
- resolvedPath = `${path}/${resolvedPath}`;
325
- resolvedAbsolute = isAbsolute(path);
326
- }
327
- resolvedPath = normalizeString(resolvedPath, !resolvedAbsolute);
328
- if (resolvedAbsolute && !isAbsolute(resolvedPath)) return `/${resolvedPath}`;
329
- return resolvedPath.length > 0 ? resolvedPath : ".";
330
- };
331
- function normalizeString(path, allowAboveRoot) {
332
- let res = "";
333
- let lastSegmentLength = 0;
334
- let lastSlash = -1;
335
- let dots = 0;
336
- let char = null;
337
- for (let index = 0; index <= path.length; ++index) {
338
- if (index < path.length) char = path[index];
339
- else if (char === "/") break;
340
- else char = "/";
341
- if (char === "/") {
342
- if (lastSlash === index - 1 || dots === 1);
343
- else if (dots === 2) {
344
- if (res.length < 2 || lastSegmentLength !== 2 || res[res.length - 1] !== "." || res[res.length - 2] !== ".") {
345
- if (res.length > 2) {
346
- const lastSlashIndex = res.lastIndexOf("/");
347
- if (lastSlashIndex === -1) {
348
- res = "";
349
- lastSegmentLength = 0;
350
- } else {
351
- res = res.slice(0, lastSlashIndex);
352
- lastSegmentLength = res.length - 1 - res.lastIndexOf("/");
353
- }
354
- lastSlash = index;
355
- dots = 0;
356
- continue;
357
- } else if (res.length > 0) {
358
- res = "";
359
- lastSegmentLength = 0;
360
- lastSlash = index;
361
- dots = 0;
362
- continue;
363
- }
364
- }
365
- if (allowAboveRoot) {
366
- res += res.length > 0 ? "/.." : "..";
367
- lastSegmentLength = 2;
368
- }
369
- } else {
370
- if (res.length > 0) res += `/${path.slice(lastSlash + 1, index)}`;
371
- else res = path.slice(lastSlash + 1, index);
372
- lastSegmentLength = index - lastSlash - 1;
373
- }
374
- lastSlash = index;
375
- dots = 0;
376
- } else if (char === "." && dots !== -1) ++dots;
377
- else dots = -1;
378
- }
379
- return res;
380
- }
381
- const isAbsolute = function(p) {
382
- return _IS_ABSOLUTE_RE.test(p);
383
- };
384
- const toNamespacedPath = function(p) {
385
- return normalizeWindowsPath(p);
386
- };
387
- const extname = function(p) {
388
- if (p === "..") return "";
389
- const match = _EXTNAME_RE.exec(normalizeWindowsPath(p));
390
- return match && match[1] || "";
391
- };
392
- const relative = function(from, to) {
393
- const _from = resolve(from).replace(_ROOT_FOLDER_RE, "$1").split("/");
394
- const _to = resolve(to).replace(_ROOT_FOLDER_RE, "$1").split("/");
395
- if (_to[0][1] === ":" && _from[0][1] === ":" && _from[0] !== _to[0]) return _to.join("/");
396
- const _fromCopy = [..._from];
397
- for (const segment of _fromCopy) {
398
- if (_to[0] !== segment) break;
399
- _from.shift();
400
- _to.shift();
401
- }
402
- return [..._from.map(() => ".."), ..._to].join("/");
403
- };
404
- const dirname = function(p) {
405
- const segments = normalizeWindowsPath(p).replace(/\/$/, "").split("/").slice(0, -1);
406
- if (segments.length === 1 && _DRIVE_LETTER_RE.test(segments[0])) segments[0] += "/";
407
- return segments.join("/") || (isAbsolute(p) ? "/" : ".");
408
- };
409
- const format = function(p) {
410
- const ext = p.ext ? p.ext.startsWith(".") ? p.ext : `.${p.ext}` : "";
411
- const segments = [
412
- p.root,
413
- p.dir,
414
- p.base ?? (p.name ?? "") + ext
415
- ].filter(Boolean);
416
- return normalizeWindowsPath(p.root ? resolve(...segments) : segments.join("/"));
417
- };
418
- const basename = function(p, extension) {
419
- const segments = normalizeWindowsPath(p).split("/");
420
- let lastSegment = "";
421
- for (let i = segments.length - 1; i >= 0; i--) {
422
- const val = segments[i];
423
- if (val) {
424
- lastSegment = val;
425
- break;
426
- }
427
- }
428
- return extension && lastSegment.endsWith(extension) ? lastSegment.slice(0, -extension.length) : lastSegment;
429
- };
430
- const parse = function(p) {
431
- const root = _PATH_ROOT_RE.exec(p)?.[0]?.replace(/\\/g, "/") || "";
432
- const base = basename(p);
433
- const extension = extname(base);
434
- return {
435
- root,
436
- dir: dirname(p),
437
- base,
438
- ext: extension,
439
- name: base.slice(0, base.length - extension.length)
440
- };
441
- };
442
- const matchesGlob = (path, pattern) => {
443
- return zeptomatch(pattern, normalize(path));
444
- };
445
- const _path = {
446
- __proto__: null,
447
- basename,
448
- dirname,
449
- extname,
450
- format,
451
- isAbsolute,
452
- join,
453
- matchesGlob,
454
- normalize,
455
- normalizeString,
456
- parse,
457
- relative,
458
- resolve,
459
- sep,
460
- toNamespacedPath
461
- };
462
-
463
- //#endregion
464
- //#region ../../node_modules/.pnpm/pathe@2.0.3/node_modules/pathe/dist/index.mjs
465
- const delimiter = /* @__PURE__ */ (() => globalThis.process?.platform === "win32" ? ";" : ":")();
466
- const _platforms = {
467
- posix: void 0,
468
- win32: void 0
469
- };
470
- const mix = (del = delimiter) => {
471
- return new Proxy(_path, { get(_, prop) {
472
- if (prop === "delimiter") return del;
473
- if (prop === "posix") return posix;
474
- if (prop === "win32") return win32;
475
- return _platforms[prop] || _path[prop];
476
- } });
477
- };
478
- const posix = /* @__PURE__ */ mix(":");
479
- const win32 = /* @__PURE__ */ mix(";");
480
-
481
28
  //#endregion
482
29
  //#region src/utils/misc.ts
483
30
  function arraify(value) {
@@ -776,8 +323,8 @@ const getExtendedLogMessage = (log) => {
776
323
  return prefix + log.message;
777
324
  };
778
325
  function relativeId(id) {
779
- if (!posix.isAbsolute(id)) return id;
780
- return posix.relative(posix.resolve(), id);
326
+ if (!path.isAbsolute(id)) return id;
327
+ return path.relative(path.resolve(), id);
781
328
  }
782
329
 
783
330
  //#endregion
@@ -1326,12 +873,12 @@ function validateOption(key, options) {
1326
873
  let parsed = v.safeParse(key === "input" ? InputOptionsSchema : OutputOptionsSchema, options);
1327
874
  if (!parsed.success) {
1328
875
  const errors = parsed.issues.map((issue) => {
1329
- const issuePaths = issue.path.map((path) => path.key);
876
+ const issuePaths = issue.path.map((path$1) => path$1.key);
1330
877
  let issueMsg = issue.message;
1331
878
  if (issue.type === "union") {
1332
879
  const subIssue = issue.issues?.find((i) => !(i.type !== issue.received && i.input === issue.input));
1333
880
  if (subIssue) {
1334
- if (subIssue.path) issuePaths.push(subIssue.path.map((path) => path.key));
881
+ if (subIssue.path) issuePaths.push(subIssue.path.map((path$1) => path$1.key));
1335
882
  issueMsg = subIssue.message;
1336
883
  }
1337
884
  }
@@ -1656,8 +1203,8 @@ var PluginContextImpl = class extends MinimalPluginContextImpl {
1656
1203
  const loadPromise = data.loadModulePromiseMap.get(id);
1657
1204
  if (loadPromise) return loadPromise;
1658
1205
  let resolveFn;
1659
- const promise = new Promise((resolve$1, _) => {
1660
- resolveFn = resolve$1;
1206
+ const promise = new Promise((resolve, _) => {
1207
+ resolveFn = resolve;
1661
1208
  });
1662
1209
  data.loadModulePromiseMap.set(id, promise);
1663
1210
  try {
@@ -1898,9 +1445,9 @@ function preProcessSourceMap(ret, id) {
1898
1445
  if (!ret.map) return;
1899
1446
  let map = typeof ret.map === "object" ? ret.map : JSON.parse(ret.map);
1900
1447
  if (!isEmptySourcemapFiled(map.sources)) {
1901
- const directory = posix.dirname(id) || ".";
1448
+ const directory = path.dirname(id) || ".";
1902
1449
  const sourceRoot = map.sourceRoot || ".";
1903
- map.sources = map.sources.map((source) => posix.resolve(directory, sourceRoot, source));
1450
+ map.sources = map.sources.map((source) => path.resolve(directory, sourceRoot, source));
1904
1451
  }
1905
1452
  return map;
1906
1453
  }
@@ -1983,11 +1530,11 @@ function transformChunkModules(modules) {
1983
1530
  //#endregion
1984
1531
  //#region src/utils/bindingify-output-options.ts
1985
1532
  function bindingifyOutputOptions(outputOptions) {
1986
- const { dir, format: format$1, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1533
+ const { dir, format, exports, hashCharacters, sourcemap, sourcemapDebugIds, sourcemapIgnoreList, sourcemapPathTransform, name, assetFileNames, entryFileNames, chunkFileNames, cssEntryFileNames, cssChunkFileNames, banner, footer, intro, outro, esModule, globals, file, sanitizeFileName } = outputOptions;
1987
1534
  return {
1988
1535
  dir,
1989
1536
  file: file == null ? void 0 : file,
1990
- format: bindingifyFormat(format$1),
1537
+ format: bindingifyFormat(format),
1991
1538
  exports,
1992
1539
  hashCharacters,
1993
1540
  sourcemap: bindingifySourcemap(sourcemap),
@@ -2023,8 +1570,8 @@ function bindingifyAddon(configAddon) {
2023
1570
  return configAddon || "";
2024
1571
  };
2025
1572
  }
2026
- function bindingifyFormat(format$1) {
2027
- switch (format$1) {
1573
+ function bindingifyFormat(format) {
1574
+ switch (format) {
2028
1575
  case void 0:
2029
1576
  case "es":
2030
1577
  case "esm":
@@ -2034,7 +1581,7 @@ function bindingifyFormat(format$1) {
2034
1581
  case "iife": return "iife";
2035
1582
  case "umd": return "umd";
2036
1583
  case "experimental-app": return "app";
2037
- default: unimplemented(`output.format: ${format$1}`);
1584
+ default: unimplemented(`output.format: ${format}`);
2038
1585
  }
2039
1586
  }
2040
1587
  function bindingifySourcemap(sourcemap) {
@@ -2757,9 +2304,9 @@ function bindingifyExternal(external) {
2757
2304
  };
2758
2305
  }
2759
2306
  }
2760
- function bindingifyResolve(resolve$1) {
2761
- if (resolve$1) {
2762
- const { alias, extensionAlias,...rest } = resolve$1;
2307
+ function bindingifyResolve(resolve) {
2308
+ if (resolve) {
2309
+ const { alias, extensionAlias,...rest } = resolve;
2763
2310
  return {
2764
2311
  alias: alias ? Object.entries(alias).map(([name, replacement]) => ({
2765
2312
  find: name,
@@ -3014,14 +2561,14 @@ function createComposedPlugin(plugins) {
3014
2561
  for (let handlerIdx = 0; handlerIdx < batchedHandlers.length; handlerIdx++) {
3015
2562
  const [_handler, plugin] = batchedHandlers[handlerIdx];
3016
2563
  const handlerSymbol = handlerSymbols[handlerIdx];
3017
- const createFixedPluginResolveFn = (ctx, resolve$1) => {
2564
+ const createFixedPluginResolveFn = (ctx, resolve) => {
3018
2565
  return (source, importer, rawContextResolveOptions) => {
3019
2566
  const contextResolveOptions = rawContextResolveOptions ?? {};
3020
2567
  if (contextResolveOptions.skipSelf) {
3021
2568
  contextResolveOptions[SYMBOL_FOR_RESOLVE_CALLER_THAT_SKIP_SELF] = handlerSymbol;
3022
2569
  contextResolveOptions.skipSelf = false;
3023
2570
  }
3024
- return resolve$1(source, importer, contextResolveOptions);
2571
+ return resolve(source, importer, contextResolveOptions);
3025
2572
  };
3026
2573
  };
3027
2574
  createFixedPluginResolveFnMap.set(plugin, createFixedPluginResolveFn);
@@ -3389,8 +2936,8 @@ var WatcherEmitter = class {
3389
2936
  break;
3390
2937
  case "change":
3391
2938
  for (const listener of listeners) {
3392
- const { path, kind } = event.watchChangeData();
3393
- await listener(path, { event: kind });
2939
+ const { path: path$1, kind } = event.watchChangeData();
2940
+ await listener(path$1, { event: kind });
3394
2941
  }
3395
2942
  break;
3396
2943
  default: throw new Error(`Unknown event: ${event}`);
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./shared/chunk-Dc32QXFI.cjs');
2
- const require_src = require('./shared/src-6_rb-jCl.cjs');
2
+ const require_src = require('./shared/src-C-WFClWx.cjs');
3
3
  require('./shared/parse-ast-index-C29iO6Jv.cjs');
4
4
  const node_path = require_chunk.__toESM(require("node:path"));
5
5
  const ansis = require_chunk.__toESM(require("ansis"));
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __commonJS, __esm } from "./shared/chunk-BuCFLigr.mjs";
2
- import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-QrPvO0Ec.mjs";
2
+ import { arraify, description, getInputCliKeys, getJsonSchema, getOutputCliKeys, init_misc, init_rolldown, init_validator, init_watch, rolldown, validateCliOptions, version, watch } from "./shared/src-CzNh90FA.mjs";
3
3
  import "./shared/parse-ast-index-GcZLh6_d.mjs";
4
4
  import path, { sep } from "node:path";
5
5
  import colors from "ansis";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const require_chunk = require('./shared/chunk-Dc32QXFI.cjs');
3
- const require_src = require('./shared/src-6_rb-jCl.cjs');
3
+ const require_src = require('./shared/src-C-WFClWx.cjs');
4
4
  require('./shared/parse-ast-index-C29iO6Jv.cjs');
5
5
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
6
6
  const node_url = require_chunk.__toESM(require("node:url"));
@@ -1,4 +1,4 @@
1
- import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-QrPvO0Ec.mjs";
1
+ import { BuiltinPlugin, buildImportAnalysisPlugin, composeJsPlugins, createBundler, dynamicImportVarsPlugin, handleOutputErrors, importGlobPlugin, init_compose_js_plugins, init_constructors, init_create_bundler, init_normalize_string_or_regex, init_transform_to_rollup_output, isolatedDeclarationPlugin, jsonPlugin, loadFallbackPlugin, manifestPlugin, moduleFederationPlugin, modulePreloadPolyfillPlugin, normalizedStringOrRegex, viteResolvePlugin, wasmFallbackPlugin, wasmHelperPlugin } from "./shared/src-CzNh90FA.mjs";
2
2
  import "./shared/parse-ast-index-GcZLh6_d.mjs";
3
3
  import { moduleRunnerTransform, transform } from "./rolldown-binding.wasi.cjs";
4
4
  import { pathToFileURL } from "node:url";
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- const require_src = require('./shared/src-6_rb-jCl.cjs');
1
+ const require_src = require('./shared/src-C-WFClWx.cjs');
2
2
  require('./shared/parse-ast-index-C29iO6Jv.cjs');
3
3
 
4
4
  exports.VERSION = require_src.VERSION
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-QrPvO0Ec.mjs";
1
+ import { VERSION, build, defineConfig, init_src, rolldown, watch, withFilter } from "./shared/src-CzNh90FA.mjs";
2
2
  import "./shared/parse-ast-index-GcZLh6_d.mjs";
3
3
 
4
4
  init_src();
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./shared/chunk-Dc32QXFI.cjs');
2
- const require_src = require('./shared/src-6_rb-jCl.cjs');
2
+ const require_src = require('./shared/src-C-WFClWx.cjs');
3
3
  require('./shared/parse-ast-index-C29iO6Jv.cjs');
4
4
  const src_rolldown_binding_wasi_cjs = require_chunk.__toESM(require("./rolldown-binding.wasi.cjs"));
5
5
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
@@ -1,5 +1,5 @@
1
1
  import { __commonJS } from "./shared/chunk-BuCFLigr.mjs";
2
- import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-QrPvO0Ec.mjs";
2
+ import { PluginContextData, bindingifyPlugin, init_bindingify_plugin, init_plugin_context_data } from "./shared/src-CzNh90FA.mjs";
3
3
  import "./shared/parse-ast-index-GcZLh6_d.mjs";
4
4
  import { registerPlugins } from "./rolldown-binding.wasi.cjs";
5
5
  import { parentPort, workerData } from "node:worker_threads";
@@ -10,7 +10,7 @@ const node_os = require_chunk.__toESM(require("node:os"));
10
10
  const node_worker_threads = require_chunk.__toESM(require("node:worker_threads"));
11
11
 
12
12
  //#region package.json
13
- var version = "1.0.0-beta.7-commit.a0a7d95";
13
+ var version = "1.0.0-beta.7-commit.5436742";
14
14
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
15
15
 
16
16
  //#endregion
@@ -9,7 +9,7 @@ import { availableParallelism } from "node:os";
9
9
  import { Worker } from "node:worker_threads";
10
10
 
11
11
  //#region package.json
12
- var version = "1.0.0-beta.7-commit.a0a7d95";
12
+ var version = "1.0.0-beta.7-commit.5436742";
13
13
  var description = "Fast JavaScript/TypeScript bundler in Rust with Rollup-compatible API.";
14
14
 
15
15
  //#endregion