@langwatch/server 3.1.0-beta.13 → 3.1.0-beta.14

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@langwatch/server",
3
- "version": "3.1.0-beta.13",
3
+ "version": "3.1.0-beta.14",
4
4
  "description": "Run LangWatch locally with one command — `npx @langwatch/server`. Bundles the Next.js control plane, Python NLP service, evaluators, and the Go AI gateway with embedded postgres, redis, and clickhouse.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://langwatch.ai",
@@ -19140,7 +19140,7 @@ function Pn(s3, t) {
19140
19140
  function zn(s3, t) {
19141
19141
  s3.head = new ue(t, void 0, s3.head, s3), s3.tail || (s3.tail = s3.head), s3.length++;
19142
19142
  }
19143
- var import_events, import_fs, import_node_events15, import_node_stream10, import_node_string_decoder3, import_node_path10, import_node_fs10, import_path, import_events2, import_assert, import_buffer, ks, import_zlib, import_node_path11, import_node_path12, import_fs2, import_fs3, import_path2, import_node_path13, import_path3, import_node_fs11, import_node_assert, import_node_crypto, import_node_fs12, import_node_path14, import_fs4, import_node_fs13, import_node_path15, import_node_fs14, import_promises13, import_node_path16, import_node_path17, import_node_fs15, import_node_path18, kr, vr, Os, Br, Pr, zr, q, j, rt, Le, jt, Ne, Ts, Ae, xs, z, Mt, b, Qt, Bt, _, A, g, yi, De, L, w, Ri, bi, Ls, _i, Z, gi, Ie, Jt, yt, C, te, Ur, Hr, Wr, Gr, Ce, Oi, Zr, Yr, D, Vr, ot, H, ee, m, xi, J, Li, Ii, Ci, se, Fe, Ut, Ht, Ni, Pt, ht, U, nt, Y, zt, Ai, Q, ie, Di, ke, Rt, ve, bt, _t, Me, tt, Wt, $r, As, Ds, Is, Cs, Fs, Xr, re, K, jr, M, Qr, vs, Jr, ki, Ot, Gt, vi, ne, Be, Pe, ze, Ue, He, We, Ge, Ze, Ye, Ms, en, sn, Bs, rn, nn, Ps, zs, Bi, oe, hn, he, Ke, F, an, Tt, Pi, ln, at, cn, fn, dn, lt, un, mn, pn, zi, En, xt, ct, Sn, yn, Rn, bn, f, Yt, Lt, gn, Zi, Yi, On, B, Nt, et, Ui, Us, V, ae, ft, Hs, p, it, dt, Hi, At, y, Ve, $e, Wi, Ws, Gs, le, Gi, Xe, Kt, ut, qe, Dt, je, Qe, Zs, Tn, st, mt, Nn, Ki, An, Dn, It, Vi, Cn, Ys, ce, Je, $i, Fn, kn, Xi, Ks, Js, vn, Xs, qs, js, ji, Qs, fe, ti, Qi, ei, Ji, ts, es, is, pt, ii, ss, qi, X, de, si, ri, Mn, ni, ue, di, tr, oi, me, W, Ct, Ft, pe, rs, G, ns, hi, er, as, ls, ai, li, ir, os3, ci, rr, hs, Et, kt, Un, Hn, or, hr, Wn, Gn, Zn, Yn, fr, dr, ar, ur, mr, pr, Kn, Vn, $n, lr, cs, fs, ui, Xn, ds, qn, us, we, wt, Qn, Er, ms, wr, Jn, Sr, ps, yr, $t, Rr, to, eo, io, Ei, _r, gr, ys, Or, Rs, P, bs, _s, Si, Tr, xr, ye, Lr, Nr, Es, St, O, wi, Ar, Xt, ws, Ss, gs, Re, be, _e, ge, ro, Oe, no, oo, ho, Dr, qt, Se, Te, ao, lo, co, fo, uo, mo, po, Eo, vt, wo, So;
19143
+ var import_events, import_fs, import_node_events15, import_node_stream10, import_node_string_decoder3, import_node_path8, import_node_fs8, import_path, import_events2, import_assert, import_buffer, ks, import_zlib, import_node_path9, import_node_path10, import_fs2, import_fs3, import_path2, import_node_path11, import_path3, import_node_fs9, import_node_assert, import_node_crypto, import_node_fs10, import_node_path12, import_fs4, import_node_fs11, import_node_path13, import_node_fs12, import_promises13, import_node_path14, import_node_path15, import_node_fs13, import_node_path16, kr, vr, Os, Br, Pr, zr, q, j, rt, Le, jt, Ne, Ts, Ae, xs, z, Mt, b, Qt, Bt, _, A, g, yi, De, L, w, Ri, bi, Ls, _i, Z, gi, Ie, Jt, yt, C, te, Ur, Hr, Wr, Gr, Ce, Oi, Zr, Yr, D, Vr, ot, H, ee, m, xi, J, Li, Ii, Ci, se, Fe, Ut, Ht, Ni, Pt, ht, U, nt, Y, zt, Ai, Q, ie, Di, ke, Rt, ve, bt, _t, Me, tt, Wt, $r, As, Ds, Is, Cs, Fs, Xr, re, K, jr, M, Qr, vs, Jr, ki, Ot, Gt, vi, ne, Be, Pe, ze, Ue, He, We, Ge, Ze, Ye, Ms, en, sn, Bs, rn, nn, Ps, zs, Bi, oe, hn, he, Ke, F, an, Tt, Pi, ln, at, cn, fn, dn, lt, un, mn, pn, zi, En, xt, ct, Sn, yn, Rn, bn, f, Yt, Lt, gn, Zi, Yi, On, B, Nt, et, Ui, Us, V, ae, ft, Hs, p, it, dt, Hi, At, y, Ve, $e, Wi, Ws, Gs, le, Gi, Xe, Kt, ut, qe, Dt, je, Qe, Zs, Tn, st, mt, Nn, Ki, An, Dn, It, Vi, Cn, Ys, ce, Je, $i, Fn, kn, Xi, Ks, Js, vn, Xs, qs, js, ji, Qs, fe, ti, Qi, ei, Ji, ts, es, is, pt, ii, ss, qi, X, de, si, ri, Mn, ni, ue, di, tr, oi, me, W, Ct, Ft, pe, rs, G, ns, hi, er, as, ls, ai, li, ir, os3, ci, rr, hs, Et, kt, Un, Hn, or, hr, Wn, Gn, Zn, Yn, fr, dr, ar, ur, mr, pr, Kn, Vn, $n, lr, cs, fs, ui, Xn, ds, qn, us, we, wt, Qn, Er, ms, wr, Jn, Sr, ps, yr, $t, Rr, to, eo, io, Ei, _r, gr, ys, Or, Rs, P, bs, _s, Si, Tr, xr, ye, Lr, Nr, Es, St, O, wi, Ar, Xt, ws, Ss, gs, Re, be, _e, ge, ro, Oe, no, oo, ho, Dr, qt, Se, Te, ao, lo, co, fo, uo, mo, po, Eo, vt, wo, So;
19144
19144
  var init_index_min = __esm({
19145
19145
  "../../node_modules/.pnpm/tar@7.5.13/node_modules/tar/dist/esm/index.min.js"() {
19146
19146
  import_events = __toESM(require("events"), 1);
@@ -19148,35 +19148,35 @@ var init_index_min = __esm({
19148
19148
  import_node_events15 = require("node:events");
19149
19149
  import_node_stream10 = __toESM(require("node:stream"), 1);
19150
19150
  import_node_string_decoder3 = require("node:string_decoder");
19151
- import_node_path10 = __toESM(require("node:path"), 1);
19152
- import_node_fs10 = __toESM(require("node:fs"), 1);
19151
+ import_node_path8 = __toESM(require("node:path"), 1);
19152
+ import_node_fs8 = __toESM(require("node:fs"), 1);
19153
19153
  import_path = require("path");
19154
19154
  import_events2 = require("events");
19155
19155
  import_assert = __toESM(require("assert"), 1);
19156
19156
  import_buffer = require("buffer");
19157
19157
  ks = __toESM(require("zlib"), 1);
19158
19158
  import_zlib = __toESM(require("zlib"), 1);
19159
- import_node_path11 = require("node:path");
19160
- import_node_path12 = require("node:path");
19159
+ import_node_path9 = require("node:path");
19160
+ import_node_path10 = require("node:path");
19161
19161
  import_fs2 = __toESM(require("fs"), 1);
19162
19162
  import_fs3 = __toESM(require("fs"), 1);
19163
19163
  import_path2 = __toESM(require("path"), 1);
19164
- import_node_path13 = require("node:path");
19164
+ import_node_path11 = require("node:path");
19165
19165
  import_path3 = __toESM(require("path"), 1);
19166
- import_node_fs11 = __toESM(require("node:fs"), 1);
19166
+ import_node_fs9 = __toESM(require("node:fs"), 1);
19167
19167
  import_node_assert = __toESM(require("node:assert"), 1);
19168
19168
  import_node_crypto = require("node:crypto");
19169
+ import_node_fs10 = __toESM(require("node:fs"), 1);
19170
+ import_node_path12 = __toESM(require("node:path"), 1);
19171
+ import_fs4 = __toESM(require("fs"), 1);
19172
+ import_node_fs11 = __toESM(require("node:fs"), 1);
19173
+ import_node_path13 = __toESM(require("node:path"), 1);
19169
19174
  import_node_fs12 = __toESM(require("node:fs"), 1);
19175
+ import_promises13 = __toESM(require("node:fs/promises"), 1);
19170
19176
  import_node_path14 = __toESM(require("node:path"), 1);
19171
- import_fs4 = __toESM(require("fs"), 1);
19177
+ import_node_path15 = require("node:path");
19172
19178
  import_node_fs13 = __toESM(require("node:fs"), 1);
19173
- import_node_path15 = __toESM(require("node:path"), 1);
19174
- import_node_fs14 = __toESM(require("node:fs"), 1);
19175
- import_promises13 = __toESM(require("node:fs/promises"), 1);
19176
19179
  import_node_path16 = __toESM(require("node:path"), 1);
19177
- import_node_path17 = require("node:path");
19178
- import_node_fs15 = __toESM(require("node:fs"), 1);
19179
- import_node_path18 = __toESM(require("node:path"), 1);
19180
19180
  kr = Object.defineProperty;
19181
19181
  vr = (s3, t) => {
19182
19182
  for (var e in t) kr(s3, e, { get: t[e], enumerable: true });
@@ -20069,12 +20069,12 @@ var init_index_min = __esm({
20069
20069
  }
20070
20070
  };
20071
20071
  an = (s3, t) => {
20072
- let i2 = s3, r = "", n2, o2 = import_node_path11.posix.parse(s3).root || ".";
20072
+ let i2 = s3, r = "", n2, o2 = import_node_path9.posix.parse(s3).root || ".";
20073
20073
  if (Buffer.byteLength(i2) < 100) n2 = [i2, r, false];
20074
20074
  else {
20075
- r = import_node_path11.posix.dirname(i2), i2 = import_node_path11.posix.basename(i2);
20075
+ r = import_node_path9.posix.dirname(i2), i2 = import_node_path9.posix.basename(i2);
20076
20076
  do
20077
- Buffer.byteLength(i2) <= 100 && Buffer.byteLength(r) <= t ? n2 = [i2, r, false] : Buffer.byteLength(i2) > 100 && Buffer.byteLength(r) <= t ? n2 = [i2.slice(0, 99), r, true] : (i2 = import_node_path11.posix.join(import_node_path11.posix.basename(r), i2), r = import_node_path11.posix.dirname(r));
20077
+ Buffer.byteLength(i2) <= 100 && Buffer.byteLength(r) <= t ? n2 = [i2, r, false] : Buffer.byteLength(i2) > 100 && Buffer.byteLength(r) <= t ? n2 = [i2.slice(0, 99), r, true] : (i2 = import_node_path9.posix.join(import_node_path9.posix.basename(r), i2), r = import_node_path9.posix.dirname(r));
20078
20078
  while (r !== o2 && n2 === void 0);
20079
20079
  n2 || (n2 = [s3.slice(0, 99), "", true]);
20080
20080
  }
@@ -20120,7 +20120,7 @@ var init_index_min = __esm({
20120
20120
  if (t === "") return Buffer.allocUnsafe(0);
20121
20121
  let e = Buffer.byteLength(t), i2 = 512 * Math.ceil(1 + e / 512), r = Buffer.allocUnsafe(i2);
20122
20122
  for (let n2 = 0; n2 < 512; n2++) r[n2] = 0;
20123
- new F({ path: ("PaxHeader/" + (0, import_node_path12.basename)(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
20123
+ new F({ path: ("PaxHeader/" + (0, import_node_path10.basename)(this.path ?? "")).slice(0, 99), mode: this.mode || 420, uid: this.uid, gid: this.gid, size: e, mtime: this.mtime, type: this.global ? "GlobalExtendedHeader" : "ExtendedHeader", linkpath: "", uname: this.uname || "", gname: this.gname || "", devmaj: 0, devmin: 0, atime: this.atime, ctime: this.ctime }).encode(r), r.write(t, 512, e, "utf8");
20124
20124
  for (let n2 = e + 512; n2 < r.length; n2++) r[n2] = 0;
20125
20125
  return r;
20126
20126
  }
@@ -20495,15 +20495,15 @@ var init_index_min = __esm({
20495
20495
  An = (s3) => {
20496
20496
  let t = new st(s3), e = s3.file, i2;
20497
20497
  try {
20498
- i2 = import_node_fs10.default.openSync(e, "r");
20499
- let r = import_node_fs10.default.fstatSync(i2), n2 = s3.maxReadSize || 16 * 1024 * 1024;
20498
+ i2 = import_node_fs8.default.openSync(e, "r");
20499
+ let r = import_node_fs8.default.fstatSync(i2), n2 = s3.maxReadSize || 16 * 1024 * 1024;
20500
20500
  if (r.size < n2) {
20501
- let o2 = Buffer.allocUnsafe(r.size), h2 = import_node_fs10.default.readSync(i2, o2, 0, r.size, 0);
20501
+ let o2 = Buffer.allocUnsafe(r.size), h2 = import_node_fs8.default.readSync(i2, o2, 0, r.size, 0);
20502
20502
  t.end(h2 === o2.byteLength ? o2 : o2.subarray(0, h2));
20503
20503
  } else {
20504
20504
  let o2 = 0, h2 = Buffer.allocUnsafe(n2);
20505
20505
  for (; o2 < r.size; ) {
20506
- let a2 = import_node_fs10.default.readSync(i2, h2, 0, n2, o2);
20506
+ let a2 = import_node_fs8.default.readSync(i2, h2, 0, n2, o2);
20507
20507
  if (a2 === 0) break;
20508
20508
  o2 += a2, t.write(h2.subarray(0, a2));
20509
20509
  }
@@ -20511,7 +20511,7 @@ var init_index_min = __esm({
20511
20511
  }
20512
20512
  } finally {
20513
20513
  if (typeof i2 == "number") try {
20514
- import_node_fs10.default.closeSync(i2);
20514
+ import_node_fs8.default.closeSync(i2);
20515
20515
  } catch {
20516
20516
  }
20517
20517
  }
@@ -20519,7 +20519,7 @@ var init_index_min = __esm({
20519
20519
  Dn = (s3, t) => {
20520
20520
  let e = new st(s3), i2 = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
20521
20521
  return new Promise((o2, h2) => {
20522
- e.on("error", h2), e.on("end", o2), import_node_fs10.default.stat(r, (a2, l) => {
20522
+ e.on("error", h2), e.on("end", o2), import_node_fs8.default.stat(r, (a2, l) => {
20523
20523
  if (a2) h2(a2);
20524
20524
  else {
20525
20525
  let c3 = new _t(r, { readSize: i2, size: l.size });
@@ -20532,7 +20532,7 @@ var init_index_min = __esm({
20532
20532
  t?.length && Ki(s3, t), s3.noResume || Nn(s3);
20533
20533
  });
20534
20534
  Vi = (s3, t, e) => (s3 &= 4095, e && (s3 = (s3 | 384) & -19), t && (s3 & 256 && (s3 |= 64), s3 & 32 && (s3 |= 8), s3 & 4 && (s3 |= 1)), s3);
20535
- ({ isAbsolute: Cn, parse: Ys } = import_node_path13.win32);
20535
+ ({ isAbsolute: Cn, parse: Ys } = import_node_path11.win32);
20536
20536
  ce = (s3) => {
20537
20537
  let t = "", e = Ys(s3);
20538
20538
  for (; Cn(s3) || e.root; ) {
@@ -21213,11 +21213,11 @@ var init_index_min = __esm({
21213
21213
  };
21214
21214
  or = (s3, t) => {
21215
21215
  t.forEach((e) => {
21216
- e.charAt(0) === "@" ? It({ file: import_node_path10.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
21216
+ e.charAt(0) === "@" ? It({ file: import_node_path8.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
21217
21217
  }), s3.end();
21218
21218
  };
21219
21219
  hr = async (s3, t) => {
21220
- for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path10.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => {
21220
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path8.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => {
21221
21221
  s3.add(i2);
21222
21222
  } }) : s3.add(e);
21223
21223
  s3.end();
@@ -21244,29 +21244,29 @@ var init_index_min = __esm({
21244
21244
  cs = lr !== null ? () => lr : Kn ? (s3) => s3 < Vn ? $n : "w" : () => "w";
21245
21245
  fs = (s3, t, e) => {
21246
21246
  try {
21247
- return import_node_fs13.default.lchownSync(s3, t, e);
21247
+ return import_node_fs11.default.lchownSync(s3, t, e);
21248
21248
  } catch (i2) {
21249
21249
  if (i2?.code !== "ENOENT") throw i2;
21250
21250
  }
21251
21251
  };
21252
21252
  ui = (s3, t, e, i2) => {
21253
- import_node_fs13.default.lchown(s3, t, e, (r) => {
21253
+ import_node_fs11.default.lchown(s3, t, e, (r) => {
21254
21254
  i2(r && r?.code !== "ENOENT" ? r : null);
21255
21255
  });
21256
21256
  };
21257
21257
  Xn = (s3, t, e, i2, r) => {
21258
- if (t.isDirectory()) ds(import_node_path15.default.resolve(s3, t.name), e, i2, (n2) => {
21258
+ if (t.isDirectory()) ds(import_node_path13.default.resolve(s3, t.name), e, i2, (n2) => {
21259
21259
  if (n2) return r(n2);
21260
- let o2 = import_node_path15.default.resolve(s3, t.name);
21260
+ let o2 = import_node_path13.default.resolve(s3, t.name);
21261
21261
  ui(o2, e, i2, r);
21262
21262
  });
21263
21263
  else {
21264
- let n2 = import_node_path15.default.resolve(s3, t.name);
21264
+ let n2 = import_node_path13.default.resolve(s3, t.name);
21265
21265
  ui(n2, e, i2, r);
21266
21266
  }
21267
21267
  };
21268
21268
  ds = (s3, t, e, i2) => {
21269
- import_node_fs13.default.readdir(s3, { withFileTypes: true }, (r, n2) => {
21269
+ import_node_fs11.default.readdir(s3, { withFileTypes: true }, (r, n2) => {
21270
21270
  if (r) {
21271
21271
  if (r.code === "ENOENT") return i2();
21272
21272
  if (r.code !== "ENOTDIR" && r.code !== "ENOTSUP") return i2(r);
@@ -21282,12 +21282,12 @@ var init_index_min = __esm({
21282
21282
  });
21283
21283
  };
21284
21284
  qn = (s3, t, e, i2) => {
21285
- t.isDirectory() && us(import_node_path15.default.resolve(s3, t.name), e, i2), fs(import_node_path15.default.resolve(s3, t.name), e, i2);
21285
+ t.isDirectory() && us(import_node_path13.default.resolve(s3, t.name), e, i2), fs(import_node_path13.default.resolve(s3, t.name), e, i2);
21286
21286
  };
21287
21287
  us = (s3, t, e) => {
21288
21288
  let i2;
21289
21289
  try {
21290
- i2 = import_node_fs13.default.readdirSync(s3, { withFileTypes: true });
21290
+ i2 = import_node_fs11.default.readdirSync(s3, { withFileTypes: true });
21291
21291
  } catch (r) {
21292
21292
  let n2 = r;
21293
21293
  if (n2?.code === "ENOENT") return;
@@ -21321,32 +21321,32 @@ var init_index_min = __esm({
21321
21321
  }
21322
21322
  };
21323
21323
  Qn = (s3, t) => {
21324
- import_node_fs14.default.stat(s3, (e, i2) => {
21324
+ import_node_fs12.default.stat(s3, (e, i2) => {
21325
21325
  (e || !i2.isDirectory()) && (e = new we(s3, e?.code || "ENOTDIR")), t(e);
21326
21326
  });
21327
21327
  };
21328
21328
  Er = (s3, t, e) => {
21329
21329
  s3 = f(s3);
21330
21330
  let i2 = t.umask ?? 18, r = t.mode | 448, n2 = (r & i2) !== 0, o2 = t.uid, h2 = t.gid, a2 = typeof o2 == "number" && typeof h2 == "number" && (o2 !== t.processUid || h2 !== t.processGid), l = t.preserve, c3 = t.unlink, d = f(t.cwd), S = (E, x) => {
21331
- E ? e(E) : x && a2 ? ds(x, o2, h2, (xe) => S(xe)) : n2 ? import_node_fs14.default.chmod(s3, r, e) : e();
21331
+ E ? e(E) : x && a2 ? ds(x, o2, h2, (xe) => S(xe)) : n2 ? import_node_fs12.default.chmod(s3, r, e) : e();
21332
21332
  };
21333
21333
  if (s3 === d) return Qn(s3, S);
21334
21334
  if (l) return import_promises13.default.mkdir(s3, { mode: r, recursive: true }).then((E) => S(null, E ?? void 0), S);
21335
- let N = f(import_node_path16.default.relative(d, s3)).split("/");
21335
+ let N = f(import_node_path14.default.relative(d, s3)).split("/");
21336
21336
  ms(d, N, r, c3, d, void 0, S);
21337
21337
  };
21338
21338
  ms = (s3, t, e, i2, r, n2, o2) => {
21339
21339
  if (t.length === 0) return o2(null, n2);
21340
- let h2 = t.shift(), a2 = f(import_node_path16.default.resolve(s3 + "/" + h2));
21341
- import_node_fs14.default.mkdir(a2, e, wr(a2, t, e, i2, r, n2, o2));
21340
+ let h2 = t.shift(), a2 = f(import_node_path14.default.resolve(s3 + "/" + h2));
21341
+ import_node_fs12.default.mkdir(a2, e, wr(a2, t, e, i2, r, n2, o2));
21342
21342
  };
21343
21343
  wr = (s3, t, e, i2, r, n2, o2) => (h2) => {
21344
- h2 ? import_node_fs14.default.lstat(s3, (a2, l) => {
21344
+ h2 ? import_node_fs12.default.lstat(s3, (a2, l) => {
21345
21345
  if (a2) a2.path = a2.path && f(a2.path), o2(a2);
21346
21346
  else if (l.isDirectory()) ms(s3, t, e, i2, r, n2, o2);
21347
- else if (i2) import_node_fs14.default.unlink(s3, (c3) => {
21347
+ else if (i2) import_node_fs12.default.unlink(s3, (c3) => {
21348
21348
  if (c3) return o2(c3);
21349
- import_node_fs14.default.mkdir(s3, e, wr(s3, t, e, i2, r, n2, o2));
21349
+ import_node_fs12.default.mkdir(s3, e, wr(s3, t, e, i2, r, n2, o2));
21350
21350
  });
21351
21351
  else {
21352
21352
  if (l.isSymbolicLink()) return o2(new wt(s3, s3 + "/" + t.join("/")));
@@ -21357,7 +21357,7 @@ var init_index_min = __esm({
21357
21357
  Jn = (s3) => {
21358
21358
  let t = false, e;
21359
21359
  try {
21360
- t = import_node_fs14.default.statSync(s3).isDirectory();
21360
+ t = import_node_fs12.default.statSync(s3).isDirectory();
21361
21361
  } catch (i2) {
21362
21362
  e = i2?.code;
21363
21363
  } finally {
@@ -21367,20 +21367,20 @@ var init_index_min = __esm({
21367
21367
  Sr = (s3, t) => {
21368
21368
  s3 = f(s3);
21369
21369
  let e = t.umask ?? 18, i2 = t.mode | 448, r = (i2 & e) !== 0, n2 = t.uid, o2 = t.gid, h2 = typeof n2 == "number" && typeof o2 == "number" && (n2 !== t.processUid || o2 !== t.processGid), a2 = t.preserve, l = t.unlink, c3 = f(t.cwd), d = (E) => {
21370
- E && h2 && us(E, n2, o2), r && import_node_fs14.default.chmodSync(s3, i2);
21370
+ E && h2 && us(E, n2, o2), r && import_node_fs12.default.chmodSync(s3, i2);
21371
21371
  };
21372
21372
  if (s3 === c3) return Jn(c3), d();
21373
- if (a2) return d(import_node_fs14.default.mkdirSync(s3, { mode: i2, recursive: true }) ?? void 0);
21374
- let T = f(import_node_path16.default.relative(c3, s3)).split("/"), N;
21373
+ if (a2) return d(import_node_fs12.default.mkdirSync(s3, { mode: i2, recursive: true }) ?? void 0);
21374
+ let T = f(import_node_path14.default.relative(c3, s3)).split("/"), N;
21375
21375
  for (let E = T.shift(), x = c3; E && (x += "/" + E); E = T.shift()) {
21376
- x = f(import_node_path16.default.resolve(x));
21376
+ x = f(import_node_path14.default.resolve(x));
21377
21377
  try {
21378
- import_node_fs14.default.mkdirSync(x, i2), N = N || x;
21378
+ import_node_fs12.default.mkdirSync(x, i2), N = N || x;
21379
21379
  } catch {
21380
- let xe = import_node_fs14.default.lstatSync(x);
21380
+ let xe = import_node_fs12.default.lstatSync(x);
21381
21381
  if (xe.isDirectory()) continue;
21382
21382
  if (l) {
21383
- import_node_fs14.default.unlinkSync(x), import_node_fs14.default.mkdirSync(x, i2), N = N || x;
21383
+ import_node_fs12.default.unlinkSync(x), import_node_fs12.default.mkdirSync(x, i2), N = N || x;
21384
21384
  continue;
21385
21385
  } else if (xe.isSymbolicLink()) return new wt(x, x + "/" + T.join("/"));
21386
21386
  }
@@ -21402,14 +21402,14 @@ var init_index_min = __esm({
21402
21402
  eo = to === "win32";
21403
21403
  io = (s3) => s3.split("/").slice(0, -1).reduce((e, i2) => {
21404
21404
  let r = e.at(-1);
21405
- return r !== void 0 && (i2 = (0, import_node_path17.join)(r, i2)), e.push(i2 || "/"), e;
21405
+ return r !== void 0 && (i2 = (0, import_node_path15.join)(r, i2)), e.push(i2 || "/"), e;
21406
21406
  }, []);
21407
21407
  Ei = class {
21408
21408
  #t = /* @__PURE__ */ new Map();
21409
21409
  #i = /* @__PURE__ */ new Map();
21410
21410
  #s = /* @__PURE__ */ new Set();
21411
21411
  reserve(t, e) {
21412
- t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path17.join)(Rr(r))));
21412
+ t = eo ? ["win32 parallelization disabled"] : t.map((r) => mt((0, import_node_path15.join)(Rr(r))));
21413
21413
  let i2 = new Set(t.map((r) => io(r)).reduce((r, n2) => r.concat(n2)));
21414
21414
  this.#i.set(e, { dirs: i2, paths: t });
21415
21415
  for (let r of t) {
@@ -21499,17 +21499,17 @@ var init_index_min = __esm({
21499
21499
  Oe = ro === "win32";
21500
21500
  no = 1024;
21501
21501
  oo = (s3, t) => {
21502
- if (!Oe) return import_node_fs12.default.unlink(s3, t);
21502
+ if (!Oe) return import_node_fs10.default.unlink(s3, t);
21503
21503
  let e = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
21504
- import_node_fs12.default.rename(s3, e, (i2) => {
21504
+ import_node_fs10.default.rename(s3, e, (i2) => {
21505
21505
  if (i2) return t(i2);
21506
- import_node_fs12.default.unlink(e, t);
21506
+ import_node_fs10.default.unlink(e, t);
21507
21507
  });
21508
21508
  };
21509
21509
  ho = (s3) => {
21510
- if (!Oe) return import_node_fs12.default.unlinkSync(s3);
21510
+ if (!Oe) return import_node_fs10.default.unlinkSync(s3);
21511
21511
  let t = s3 + ".DELETE." + (0, import_node_crypto.randomBytes)(16).toString("hex");
21512
- import_node_fs12.default.renameSync(s3, t), import_node_fs12.default.unlinkSync(t);
21512
+ import_node_fs10.default.renameSync(s3, t), import_node_fs10.default.unlinkSync(t);
21513
21513
  };
21514
21514
  Dr = (s3, t, e) => s3 !== void 0 && s3 === s3 >>> 0 ? s3 : t !== void 0 && t === t >>> 0 ? t : e;
21515
21515
  qt = class extends st {
@@ -21549,7 +21549,7 @@ var init_index_min = __esm({
21549
21549
  if (t.preserveOwner) throw new TypeError("cannot preserve owner in archive and also set owner explicitly");
21550
21550
  this.uid = t.uid, this.gid = t.gid, this.setOwner = true;
21551
21551
  } else this.uid = void 0, this.gid = void 0, this.setOwner = false;
21552
- this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path14.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
21552
+ this.preserveOwner = t.preserveOwner === void 0 && typeof t.uid != "number" ? !!(process.getuid && process.getuid() === 0) : !!t.preserveOwner, this.processUid = (this.preserveOwner || this.setOwner) && process.getuid ? process.getuid() : void 0, this.processGid = (this.preserveOwner || this.setOwner) && process.getgid ? process.getgid() : void 0, this.maxDepth = typeof t.maxDepth == "number" ? t.maxDepth : no, this.forceChown = t.forceChown === true, this.win32 = !!t.win32 || Oe, this.newer = !!t.newer, this.keep = !!t.keep, this.noMtime = !!t.noMtime, this.preservePaths = !!t.preservePaths, this.unlink = !!t.unlink, this.cwd = f(import_node_path12.default.resolve(t.cwd || process.cwd())), this.strip = Number(t.strip) || 0, this.processUmask = this.chmod ? typeof t.processUmask == "number" ? t.processUmask : _r() : 0, this.umask = typeof t.umask == "number" ? t.umask : this.processUmask, this.dmode = t.dmode || 511 & ~this.umask, this.fmode = t.fmode || 438 & ~this.umask, this.on("entry", (e) => this[gr](e));
21553
21553
  }
21554
21554
  warn(t, e, i2 = {}) {
21555
21555
  return (t === "TAR_BAD_ARCHIVE" || t === "TAR_ABORT") && (i2.recoverable = false), super.warn(t, e, i2);
@@ -21563,7 +21563,7 @@ var init_index_min = __esm({
21563
21563
  let [n2, o2] = ce(i2), h2 = o2.replaceAll(/\\/g, "/").split("/");
21564
21564
  if (h2.includes("..") || Oe && /^[a-z]:\.\.$/i.test(h2[0] ?? "")) {
21565
21565
  if (e === "path" || r === "Link") return this.warn("TAR_ENTRY_ERROR", `${e} contains '..'`, { entry: t, [e]: i2 }), false;
21566
- let a2 = import_node_path14.default.posix.dirname(t.path), l = import_node_path14.default.posix.normalize(import_node_path14.default.posix.join(a2, h2.join("/")));
21566
+ let a2 = import_node_path12.default.posix.dirname(t.path), l = import_node_path12.default.posix.normalize(import_node_path12.default.posix.join(a2, h2.join("/")));
21567
21567
  if (l.startsWith("../") || l === "..") return this.warn("TAR_ENTRY_ERROR", `${e} escapes extraction directory`, { entry: t, [e]: i2 }), false;
21568
21568
  }
21569
21569
  return n2 && (t[e] = String(o2), this.warn("TAR_ENTRY_INFO", `stripping ${n2} from absolute ${e}`, { entry: t, [e]: i2 })), true;
@@ -21581,12 +21581,12 @@ var init_index_min = __esm({
21581
21581
  }
21582
21582
  if (isFinite(this.maxDepth) && i2.length > this.maxDepth) return this.warn("TAR_ENTRY_ERROR", "path excessively deep", { entry: t, path: e, depth: i2.length, maxDepth: this.maxDepth }), false;
21583
21583
  if (!this[Es](t, "path") || !this[Es](t, "linkpath")) return false;
21584
- if (t.absolute = import_node_path14.default.isAbsolute(t.path) ? f(import_node_path14.default.resolve(t.path)) : f(import_node_path14.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
21584
+ if (t.absolute = import_node_path12.default.isAbsolute(t.path) ? f(import_node_path12.default.resolve(t.path)) : f(import_node_path12.default.resolve(this.cwd, t.path)), !this.preservePaths && typeof t.absolute == "string" && t.absolute.indexOf(this.cwd + "/") !== 0 && t.absolute !== this.cwd) return this.warn("TAR_ENTRY_ERROR", "path escaped extraction target", { entry: t, path: f(t.path), resolvedPath: t.absolute, cwd: this.cwd }), false;
21585
21585
  if (t.absolute === this.cwd && t.type !== "Directory" && t.type !== "GNUDumpDir") return false;
21586
21586
  if (this.win32) {
21587
- let { root: r } = import_node_path14.default.win32.parse(String(t.absolute));
21587
+ let { root: r } = import_node_path12.default.win32.parse(String(t.absolute));
21588
21588
  t.absolute = r + Xi(String(t.absolute).slice(r.length));
21589
- let { root: n2 } = import_node_path14.default.win32.parse(t.path);
21589
+ let { root: n2 } = import_node_path12.default.win32.parse(t.path);
21590
21590
  t.path = n2 + Xi(t.path.slice(n2.length));
21591
21591
  }
21592
21592
  return true;
@@ -21625,16 +21625,16 @@ var init_index_min = __esm({
21625
21625
  [bs](t, e) {
21626
21626
  let i2 = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = new tt(String(t.absolute), { flags: cs(t.size), mode: i2, autoClose: false });
21627
21627
  r.on("error", (a2) => {
21628
- r.fd && import_node_fs12.default.close(r.fd, () => {
21628
+ r.fd && import_node_fs10.default.close(r.fd, () => {
21629
21629
  }), r.write = () => true, this[O](a2, t), e();
21630
21630
  });
21631
21631
  let n2 = 1, o2 = (a2) => {
21632
21632
  if (a2) {
21633
- r.fd && import_node_fs12.default.close(r.fd, () => {
21633
+ r.fd && import_node_fs10.default.close(r.fd, () => {
21634
21634
  }), this[O](a2, t), e();
21635
21635
  return;
21636
21636
  }
21637
- --n2 === 0 && r.fd !== void 0 && import_node_fs12.default.close(r.fd, (l) => {
21637
+ --n2 === 0 && r.fd !== void 0 && import_node_fs10.default.close(r.fd, (l) => {
21638
21638
  l ? this[O](l, t) : this[Xt](), e();
21639
21639
  });
21640
21640
  };
@@ -21643,12 +21643,12 @@ var init_index_min = __esm({
21643
21643
  if (typeof l == "number" && t.mtime && !this.noMtime) {
21644
21644
  n2++;
21645
21645
  let c3 = t.atime || /* @__PURE__ */ new Date(), d = t.mtime;
21646
- import_node_fs12.default.futimes(l, c3, d, (S) => S ? import_node_fs12.default.utimes(a2, c3, d, (T) => o2(T && S)) : o2());
21646
+ import_node_fs10.default.futimes(l, c3, d, (S) => S ? import_node_fs10.default.utimes(a2, c3, d, (T) => o2(T && S)) : o2());
21647
21647
  }
21648
21648
  if (typeof l == "number" && this[Re](t)) {
21649
21649
  n2++;
21650
21650
  let c3 = this[be](t), d = this[_e](t);
21651
- typeof c3 == "number" && typeof d == "number" && import_node_fs12.default.fchown(l, c3, d, (S) => S ? import_node_fs12.default.chown(a2, c3, d, (T) => o2(T && S)) : o2());
21651
+ typeof c3 == "number" && typeof d == "number" && import_node_fs10.default.fchown(l, c3, d, (S) => S ? import_node_fs10.default.chown(a2, c3, d, (T) => o2(T && S)) : o2());
21652
21652
  }
21653
21653
  o2();
21654
21654
  });
@@ -21667,20 +21667,20 @@ var init_index_min = __esm({
21667
21667
  let n2 = 1, o2 = () => {
21668
21668
  --n2 === 0 && (e(), this[Xt](), t.resume());
21669
21669
  };
21670
- t.mtime && !this.noMtime && (n2++, import_node_fs12.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o2)), this[Re](t) && (n2++, import_node_fs12.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o2)), o2();
21670
+ t.mtime && !this.noMtime && (n2++, import_node_fs10.default.utimes(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime, o2)), this[Re](t) && (n2++, import_node_fs10.default.chown(String(t.absolute), Number(this[be](t)), Number(this[_e](t)), o2)), o2();
21671
21671
  });
21672
21672
  }
21673
21673
  [Lr](t) {
21674
21674
  t.unsupported = true, this.warn("TAR_ENTRY_UNSUPPORTED", `unsupported entry type: ${t.type}`, { entry: t }), t.resume();
21675
21675
  }
21676
21676
  [Tr](t, e) {
21677
- let i2 = f(import_node_path14.default.relative(this.cwd, import_node_path14.default.resolve(import_node_path14.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
21677
+ let i2 = f(import_node_path12.default.relative(this.cwd, import_node_path12.default.resolve(import_node_path12.default.dirname(String(t.absolute)), String(t.linkpath)))).split("/");
21678
21678
  this[ye](t, this.cwd, i2, () => this[Si](t, String(t.linkpath), "symlink", e), (r) => {
21679
21679
  this[O](r, t), e();
21680
21680
  });
21681
21681
  }
21682
21682
  [xr](t, e) {
21683
- let i2 = f(import_node_path14.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
21683
+ let i2 = f(import_node_path12.default.resolve(this.cwd, String(t.linkpath))), r = f(String(t.linkpath)).split("/");
21684
21684
  this[ye](t, this.cwd, r, () => this[Si](t, i2, "link", e), (n2) => {
21685
21685
  this[O](n2, t), e();
21686
21686
  });
@@ -21688,10 +21688,10 @@ var init_index_min = __esm({
21688
21688
  [ye](t, e, i2, r, n2) {
21689
21689
  let o2 = i2.shift();
21690
21690
  if (this.preservePaths || o2 === void 0) return r();
21691
- let h2 = import_node_path14.default.resolve(e, o2);
21692
- import_node_fs12.default.lstat(h2, (a2, l) => {
21691
+ let h2 = import_node_path12.default.resolve(e, o2);
21692
+ import_node_fs10.default.lstat(h2, (a2, l) => {
21693
21693
  if (a2) return r();
21694
- if (l?.isSymbolicLink()) return n2(new wt(h2, import_node_path14.default.resolve(h2, i2.join("/"))));
21694
+ if (l?.isSymbolicLink()) return n2(new wt(h2, import_node_path12.default.resolve(h2, i2.join("/"))));
21695
21695
  this[ye](t, h2, i2, r, n2);
21696
21696
  });
21697
21697
  }
@@ -21725,7 +21725,7 @@ var init_index_min = __esm({
21725
21725
  });
21726
21726
  }, n2 = () => {
21727
21727
  if (t.absolute !== this.cwd) {
21728
- let h2 = f(import_node_path14.default.dirname(String(t.absolute)));
21728
+ let h2 = f(import_node_path12.default.dirname(String(t.absolute)));
21729
21729
  if (h2 !== this.cwd) return this[St](h2, this.dmode, (a2) => {
21730
21730
  if (a2) {
21731
21731
  this[O](a2, t), i2();
@@ -21736,7 +21736,7 @@ var init_index_min = __esm({
21736
21736
  }
21737
21737
  o2();
21738
21738
  }, o2 = () => {
21739
- import_node_fs12.default.lstat(String(t.absolute), (h2, a2) => {
21739
+ import_node_fs10.default.lstat(String(t.absolute), (h2, a2) => {
21740
21740
  if (a2 && (this.keep || this.newer && a2.mtime > (t.mtime ?? a2.mtime))) {
21741
21741
  this[gs](t), i2();
21742
21742
  return;
@@ -21745,9 +21745,9 @@ var init_index_min = __esm({
21745
21745
  if (a2.isDirectory()) {
21746
21746
  if (t.type === "Directory") {
21747
21747
  let l = this.chmod && t.mode && (a2.mode & 4095) !== t.mode, c3 = (d) => this[P](d ?? null, t, i2);
21748
- return l ? import_node_fs12.default.chmod(String(t.absolute), Number(t.mode), c3) : c3();
21748
+ return l ? import_node_fs10.default.chmod(String(t.absolute), Number(t.mode), c3) : c3();
21749
21749
  }
21750
- if (t.absolute !== this.cwd) return import_node_fs12.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i2));
21750
+ if (t.absolute !== this.cwd) return import_node_fs10.default.rmdir(String(t.absolute), (l) => this[P](l ?? null, t, i2));
21751
21751
  }
21752
21752
  if (t.absolute === this.cwd) return this[P](null, t, i2);
21753
21753
  oo(String(t.absolute), (l) => this[P](l ?? null, t, i2));
@@ -21775,7 +21775,7 @@ var init_index_min = __esm({
21775
21775
  }
21776
21776
  }
21777
21777
  [Si](t, e, i2, r) {
21778
- import_node_fs12.default[i2](e, String(t.absolute), (n2) => {
21778
+ import_node_fs10.default[i2](e, String(t.absolute), (n2) => {
21779
21779
  n2 ? this[O](n2, t) : (this[Xt](), t.resume()), r();
21780
21780
  });
21781
21781
  }
@@ -21800,23 +21800,23 @@ var init_index_min = __esm({
21800
21800
  this[ge] = true;
21801
21801
  }
21802
21802
  if (t.absolute !== this.cwd) {
21803
- let n2 = f(import_node_path14.default.dirname(String(t.absolute)));
21803
+ let n2 = f(import_node_path12.default.dirname(String(t.absolute)));
21804
21804
  if (n2 !== this.cwd) {
21805
21805
  let o2 = this[St](n2, this.dmode);
21806
21806
  if (o2) return this[O](o2, t);
21807
21807
  }
21808
21808
  }
21809
- let [e, i2] = Se(() => import_node_fs12.default.lstatSync(String(t.absolute)));
21809
+ let [e, i2] = Se(() => import_node_fs10.default.lstatSync(String(t.absolute)));
21810
21810
  if (i2 && (this.keep || this.newer && i2.mtime > (t.mtime ?? i2.mtime))) return this[gs](t);
21811
21811
  if (e || this[Rs](t, i2)) return this[P](null, t);
21812
21812
  if (i2.isDirectory()) {
21813
21813
  if (t.type === "Directory") {
21814
21814
  let o2 = this.chmod && t.mode && (i2.mode & 4095) !== t.mode, [h2] = o2 ? Se(() => {
21815
- import_node_fs12.default.chmodSync(String(t.absolute), Number(t.mode));
21815
+ import_node_fs10.default.chmodSync(String(t.absolute), Number(t.mode));
21816
21816
  }) : [];
21817
21817
  return this[P](h2, t);
21818
21818
  }
21819
- let [n2] = Se(() => import_node_fs12.default.rmdirSync(String(t.absolute)));
21819
+ let [n2] = Se(() => import_node_fs10.default.rmdirSync(String(t.absolute)));
21820
21820
  this[P](n2, t);
21821
21821
  }
21822
21822
  let [r] = t.absolute === this.cwd ? [] : Se(() => ho(String(t.absolute)));
@@ -21826,21 +21826,21 @@ var init_index_min = __esm({
21826
21826
  let i2 = typeof t.mode == "number" ? t.mode & 4095 : this.fmode, r = (h2) => {
21827
21827
  let a2;
21828
21828
  try {
21829
- import_node_fs12.default.closeSync(n2);
21829
+ import_node_fs10.default.closeSync(n2);
21830
21830
  } catch (l) {
21831
21831
  a2 = l;
21832
21832
  }
21833
21833
  (h2 || a2) && this[O](h2 || a2, t), e();
21834
21834
  }, n2;
21835
21835
  try {
21836
- n2 = import_node_fs12.default.openSync(String(t.absolute), cs(t.size), i2);
21836
+ n2 = import_node_fs10.default.openSync(String(t.absolute), cs(t.size), i2);
21837
21837
  } catch (h2) {
21838
21838
  return r(h2);
21839
21839
  }
21840
21840
  let o2 = this.transform && this.transform(t) || t;
21841
21841
  o2 !== t && (o2.on("error", (h2) => this[O](h2, t)), t.pipe(o2)), o2.on("data", (h2) => {
21842
21842
  try {
21843
- import_node_fs12.default.writeSync(n2, h2, 0, h2.length);
21843
+ import_node_fs10.default.writeSync(n2, h2, 0, h2.length);
21844
21844
  } catch (a2) {
21845
21845
  r(a2);
21846
21846
  }
@@ -21849,10 +21849,10 @@ var init_index_min = __esm({
21849
21849
  if (t.mtime && !this.noMtime) {
21850
21850
  let a2 = t.atime || /* @__PURE__ */ new Date(), l = t.mtime;
21851
21851
  try {
21852
- import_node_fs12.default.futimesSync(n2, a2, l);
21852
+ import_node_fs10.default.futimesSync(n2, a2, l);
21853
21853
  } catch (c3) {
21854
21854
  try {
21855
- import_node_fs12.default.utimesSync(String(t.absolute), a2, l);
21855
+ import_node_fs10.default.utimesSync(String(t.absolute), a2, l);
21856
21856
  } catch {
21857
21857
  h2 = c3;
21858
21858
  }
@@ -21861,10 +21861,10 @@ var init_index_min = __esm({
21861
21861
  if (this[Re](t)) {
21862
21862
  let a2 = this[be](t), l = this[_e](t);
21863
21863
  try {
21864
- import_node_fs12.default.fchownSync(n2, Number(a2), Number(l));
21864
+ import_node_fs10.default.fchownSync(n2, Number(a2), Number(l));
21865
21865
  } catch (c3) {
21866
21866
  try {
21867
- import_node_fs12.default.chownSync(String(t.absolute), Number(a2), Number(l));
21867
+ import_node_fs10.default.chownSync(String(t.absolute), Number(a2), Number(l));
21868
21868
  } catch {
21869
21869
  h2 = h2 || c3;
21870
21870
  }
@@ -21880,11 +21880,11 @@ var init_index_min = __esm({
21880
21880
  return;
21881
21881
  }
21882
21882
  if (t.mtime && !this.noMtime) try {
21883
- import_node_fs12.default.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
21883
+ import_node_fs10.default.utimesSync(String(t.absolute), t.atime || /* @__PURE__ */ new Date(), t.mtime);
21884
21884
  } catch {
21885
21885
  }
21886
21886
  if (this[Re](t)) try {
21887
- import_node_fs12.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
21887
+ import_node_fs10.default.chownSync(String(t.absolute), Number(this[be](t)), Number(this[_e](t)));
21888
21888
  } catch {
21889
21889
  }
21890
21890
  e(), t.resume();
@@ -21900,30 +21900,30 @@ var init_index_min = __esm({
21900
21900
  if (this.preservePaths || i2.length === 0) return r();
21901
21901
  let o2 = e;
21902
21902
  for (let h2 of i2) {
21903
- o2 = import_node_path14.default.resolve(o2, h2);
21904
- let [a2, l] = Se(() => import_node_fs12.default.lstatSync(o2));
21903
+ o2 = import_node_path12.default.resolve(o2, h2);
21904
+ let [a2, l] = Se(() => import_node_fs10.default.lstatSync(o2));
21905
21905
  if (a2) return r();
21906
- if (l.isSymbolicLink()) return n2(new wt(o2, import_node_path14.default.resolve(e, i2.join("/"))));
21906
+ if (l.isSymbolicLink()) return n2(new wt(o2, import_node_path12.default.resolve(e, i2.join("/"))));
21907
21907
  }
21908
21908
  r();
21909
21909
  }
21910
21910
  [Si](t, e, i2, r) {
21911
21911
  let n2 = `${i2}Sync`;
21912
21912
  try {
21913
- import_node_fs12.default[n2](e, String(t.absolute)), r(), t.resume();
21913
+ import_node_fs10.default[n2](e, String(t.absolute)), r(), t.resume();
21914
21914
  } catch (o2) {
21915
21915
  return this[O](o2, t);
21916
21916
  }
21917
21917
  }
21918
21918
  };
21919
21919
  ao = (s3) => {
21920
- let t = new Te(s3), e = s3.file, i2 = import_node_fs11.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
21920
+ let t = new Te(s3), e = s3.file, i2 = import_node_fs9.default.statSync(e), r = s3.maxReadSize || 16 * 1024 * 1024;
21921
21921
  new Me(e, { readSize: r, size: i2.size }).pipe(t);
21922
21922
  };
21923
21923
  lo = (s3, t) => {
21924
21924
  let e = new qt(s3), i2 = s3.maxReadSize || 16 * 1024 * 1024, r = s3.file;
21925
21925
  return new Promise((o2, h2) => {
21926
- e.on("error", h2), e.on("close", o2), import_node_fs11.default.stat(r, (a2, l) => {
21926
+ e.on("error", h2), e.on("close", o2), import_node_fs9.default.stat(r, (a2, l) => {
21927
21927
  if (a2) h2(a2);
21928
21928
  else {
21929
21929
  let c3 = new _t(r, { readSize: i2, size: l.size });
@@ -21939,15 +21939,15 @@ var init_index_min = __esm({
21939
21939
  let e = new kt(s3), i2 = true, r, n2;
21940
21940
  try {
21941
21941
  try {
21942
- r = import_node_fs15.default.openSync(s3.file, "r+");
21942
+ r = import_node_fs13.default.openSync(s3.file, "r+");
21943
21943
  } catch (a2) {
21944
- if (a2?.code === "ENOENT") r = import_node_fs15.default.openSync(s3.file, "w+");
21944
+ if (a2?.code === "ENOENT") r = import_node_fs13.default.openSync(s3.file, "w+");
21945
21945
  else throw a2;
21946
21946
  }
21947
- let o2 = import_node_fs15.default.fstatSync(r), h2 = Buffer.alloc(512);
21947
+ let o2 = import_node_fs13.default.fstatSync(r), h2 = Buffer.alloc(512);
21948
21948
  t: for (n2 = 0; n2 < o2.size; n2 += 512) {
21949
21949
  for (let c3 = 0, d = 0; c3 < 512; c3 += d) {
21950
- if (d = import_node_fs15.default.readSync(r, h2, c3, h2.length - c3, n2 + c3), n2 === 0 && h2[0] === 31 && h2[1] === 139) throw new Error("cannot append to compressed archives");
21950
+ if (d = import_node_fs13.default.readSync(r, h2, c3, h2.length - c3, n2 + c3), n2 === 0 && h2[0] === 31 && h2[1] === 139) throw new Error("cannot append to compressed archives");
21951
21951
  if (!d) break t;
21952
21952
  }
21953
21953
  let a2 = new F(h2);
@@ -21959,7 +21959,7 @@ var init_index_min = __esm({
21959
21959
  i2 = false, uo(s3, e, n2, r, t);
21960
21960
  } finally {
21961
21961
  if (i2) try {
21962
- import_node_fs15.default.closeSync(r);
21962
+ import_node_fs13.default.closeSync(r);
21963
21963
  } catch {
21964
21964
  }
21965
21965
  }
@@ -21972,29 +21972,29 @@ var init_index_min = __esm({
21972
21972
  t = Array.from(t);
21973
21973
  let e = new Et(s3), i2 = (n2, o2, h2) => {
21974
21974
  let a2 = (T, N) => {
21975
- T ? import_node_fs15.default.close(n2, (E) => h2(T)) : h2(null, N);
21975
+ T ? import_node_fs13.default.close(n2, (E) => h2(T)) : h2(null, N);
21976
21976
  }, l = 0;
21977
21977
  if (o2 === 0) return a2(null, 0);
21978
21978
  let c3 = 0, d = Buffer.alloc(512), S = (T, N) => {
21979
21979
  if (T || N === void 0) return a2(T);
21980
- if (c3 += N, c3 < 512 && N) return import_node_fs15.default.read(n2, d, c3, d.length - c3, l + c3, S);
21980
+ if (c3 += N, c3 < 512 && N) return import_node_fs13.default.read(n2, d, c3, d.length - c3, l + c3, S);
21981
21981
  if (l === 0 && d[0] === 31 && d[1] === 139) return a2(new Error("cannot append to compressed archives"));
21982
21982
  if (c3 < 512) return a2(null, l);
21983
21983
  let E = new F(d);
21984
21984
  if (!E.cksumValid) return a2(null, l);
21985
21985
  let x = 512 * Math.ceil((E.size ?? 0) / 512);
21986
21986
  if (l + x + 512 > o2 || (l += x + 512, l >= o2)) return a2(null, l);
21987
- s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c3 = 0, import_node_fs15.default.read(n2, d, 0, 512, l, S);
21987
+ s3.mtimeCache && E.mtime && s3.mtimeCache.set(String(E.path), E.mtime), c3 = 0, import_node_fs13.default.read(n2, d, 0, 512, l, S);
21988
21988
  };
21989
- import_node_fs15.default.read(n2, d, 0, 512, l, S);
21989
+ import_node_fs13.default.read(n2, d, 0, 512, l, S);
21990
21990
  };
21991
21991
  return new Promise((n2, o2) => {
21992
21992
  e.on("error", o2);
21993
21993
  let h2 = "r+", a2 = (l, c3) => {
21994
- if (l && l.code === "ENOENT" && h2 === "r+") return h2 = "w+", import_node_fs15.default.open(s3.file, h2, a2);
21994
+ if (l && l.code === "ENOENT" && h2 === "r+") return h2 = "w+", import_node_fs13.default.open(s3.file, h2, a2);
21995
21995
  if (l || !c3) return o2(l);
21996
- import_node_fs15.default.fstat(c3, (d, S) => {
21997
- if (d) return import_node_fs15.default.close(c3, () => o2(d));
21996
+ import_node_fs13.default.fstat(c3, (d, S) => {
21997
+ if (d) return import_node_fs13.default.close(c3, () => o2(d));
21998
21998
  i2(c3, S.size, (T, N) => {
21999
21999
  if (T) return o2(T);
22000
22000
  let E = new tt(s3.file, { fd: c3, start: N });
@@ -22002,16 +22002,16 @@ var init_index_min = __esm({
22002
22002
  });
22003
22003
  });
22004
22004
  };
22005
- import_node_fs15.default.open(s3.file, h2, a2);
22005
+ import_node_fs13.default.open(s3.file, h2, a2);
22006
22006
  });
22007
22007
  };
22008
22008
  po = (s3, t) => {
22009
22009
  t.forEach((e) => {
22010
- e.charAt(0) === "@" ? It({ file: import_node_path18.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
22010
+ e.charAt(0) === "@" ? It({ file: import_node_path16.default.resolve(s3.cwd, e.slice(1)), sync: true, noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
22011
22011
  }), s3.end();
22012
22012
  };
22013
22013
  Eo = async (s3, t) => {
22014
- for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path18.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
22014
+ for (let e of t) e.charAt(0) === "@" ? await It({ file: import_node_path16.default.resolve(String(s3.cwd), e.slice(1)), noResume: true, onReadEntry: (i2) => s3.add(i2) }) : s3.add(e);
22015
22015
  s3.end();
22016
22016
  };
22017
22017
  vt = K(fo, mo, () => {
@@ -26293,18 +26293,28 @@ function makeAigatewayPredep(version) {
26293
26293
 
26294
26294
  // src/predeps/clickhouse.ts
26295
26295
  init_execa();
26296
- var import_node_fs8 = require("node:fs");
26297
- var import_node_path8 = require("node:path");
26298
- function downloadUrl2(platform5) {
26296
+ var import_node_fs14 = require("node:fs");
26297
+ var import_node_path17 = require("node:path");
26298
+ var CH_VERSION = "25.8.22.28";
26299
+ function downloadSource(platform5) {
26300
+ const releaseBase = `https://github.com/ClickHouse/ClickHouse/releases/download/v${CH_VERSION}-lts`;
26299
26301
  const map = {
26300
- "darwin-arm64": "https://builds.clickhouse.com/master/macos-aarch64/clickhouse",
26301
- "darwin-x64": "https://builds.clickhouse.com/master/macos/clickhouse",
26302
- "linux-arm64": "https://builds.clickhouse.com/master/aarch64/clickhouse",
26303
- "linux-x64": "https://builds.clickhouse.com/master/amd64/clickhouse"
26302
+ "darwin-arm64": { kind: "binary", url: `${releaseBase}/clickhouse-macos-aarch64` },
26303
+ "darwin-x64": { kind: "binary", url: `${releaseBase}/clickhouse-macos` },
26304
+ "linux-arm64": {
26305
+ kind: "tarball",
26306
+ url: `${releaseBase}/clickhouse-common-static-${CH_VERSION}-arm64.tgz`,
26307
+ pathInTar: `clickhouse-common-static-${CH_VERSION}/usr/bin/clickhouse`
26308
+ },
26309
+ "linux-x64": {
26310
+ kind: "tarball",
26311
+ url: `${releaseBase}/clickhouse-common-static-${CH_VERSION}-amd64.tgz`,
26312
+ pathInTar: `clickhouse-common-static-${CH_VERSION}/usr/bin/clickhouse`
26313
+ }
26304
26314
  };
26305
- const url = map[platform5];
26306
- if (!url) throw new Error(`No clickhouse build for ${platform5}`);
26307
- return url;
26315
+ const s3 = map[platform5];
26316
+ if (!s3) throw new Error(`No clickhouse build for ${platform5}`);
26317
+ return s3;
26308
26318
  }
26309
26319
  async function resolveVersion2(bin) {
26310
26320
  try {
@@ -26324,19 +26334,42 @@ var clickhousePredep = {
26324
26334
  // type changes, renamed functions). Tarball is large (~360MB) but only
26325
26335
  // downloaded once into ~/.langwatch/bin and reused thereafter.
26326
26336
  async detect(paths2) {
26327
- const bundled = (0, import_node_path8.join)(paths2.bin, "clickhouse");
26328
- if ((0, import_node_fs8.existsSync)(bundled)) {
26337
+ const bundled = (0, import_node_path17.join)(paths2.bin, "clickhouse");
26338
+ if ((0, import_node_fs14.existsSync)(bundled)) {
26329
26339
  const v2 = await resolveVersion2(bundled);
26330
26340
  if (v2) return { installed: true, version: v2, resolvedPath: bundled };
26331
26341
  }
26332
26342
  return { installed: false, reason: `not yet downloaded to ${paths2.bin}/clickhouse` };
26333
26343
  },
26334
26344
  async install({ platform: platform5, paths: paths2, task }) {
26335
- (0, import_node_fs8.mkdirSync)(paths2.bin, { recursive: true });
26336
- const url = downloadUrl2(platform5);
26337
- const out = (0, import_node_path8.join)(paths2.bin, "clickhouse");
26338
- await downloadWithProgress(url, out, task, "downloading clickhouse");
26339
- (0, import_node_fs8.chmodSync)(out, 493);
26345
+ (0, import_node_fs14.mkdirSync)(paths2.bin, { recursive: true });
26346
+ const out = (0, import_node_path17.join)(paths2.bin, "clickhouse");
26347
+ const src = downloadSource(platform5);
26348
+ if (src.kind === "binary") {
26349
+ await downloadWithProgress(src.url, out, task, `downloading clickhouse ${CH_VERSION}`);
26350
+ } else {
26351
+ const tar = await Promise.resolve().then(() => (init_index_min(), index_min_exports));
26352
+ const tmp = (0, import_node_path17.join)(paths2.bin, `.clickhouse-${CH_VERSION}.tgz`);
26353
+ await downloadWithProgress(src.url, tmp, task, `downloading clickhouse ${CH_VERSION}`);
26354
+ task.output = "extracting";
26355
+ tar.x({
26356
+ sync: true,
26357
+ file: tmp,
26358
+ cwd: paths2.bin,
26359
+ filter: (path6) => path6 === src.pathInTar
26360
+ });
26361
+ const extractedAt = (0, import_node_path17.join)(paths2.bin, src.pathInTar);
26362
+ if (!(0, import_node_fs14.existsSync)(extractedAt)) {
26363
+ throw new Error(
26364
+ `clickhouse extraction missed expected entry: ${src.pathInTar} not present after tar.x`
26365
+ );
26366
+ }
26367
+ (0, import_node_fs14.renameSync)(extractedAt, out);
26368
+ const archiveRoot = src.pathInTar.split("/")[0];
26369
+ (0, import_node_fs14.rmSync)((0, import_node_path17.join)(paths2.bin, archiveRoot), { recursive: true, force: true });
26370
+ (0, import_node_fs14.rmSync)(tmp, { force: true });
26371
+ }
26372
+ (0, import_node_fs14.chmodSync)(out, 493);
26340
26373
  const version = await resolveVersion2(out) ?? "unknown";
26341
26374
  return { version, resolvedPath: out };
26342
26375
  }
@@ -26344,10 +26377,10 @@ var clickhousePredep = {
26344
26377
 
26345
26378
  // src/predeps/goose.ts
26346
26379
  init_execa();
26347
- var import_node_fs9 = require("node:fs");
26348
- var import_node_path9 = require("node:path");
26380
+ var import_node_fs15 = require("node:fs");
26381
+ var import_node_path18 = require("node:path");
26349
26382
  var GOOSE_VERSION = "v3.26.0";
26350
- function downloadUrl3(platform5) {
26383
+ function downloadUrl2(platform5) {
26351
26384
  const map = {
26352
26385
  "darwin-arm64": { os: "darwin", arch: "arm64" },
26353
26386
  "darwin-x64": { os: "darwin", arch: "x86_64" },
@@ -26373,8 +26406,8 @@ var goosePredep = {
26373
26406
  label: "goose",
26374
26407
  required: true,
26375
26408
  async detect(paths2) {
26376
- const bundled = (0, import_node_path9.join)(paths2.bin, "goose");
26377
- if ((0, import_node_fs9.existsSync)(bundled)) {
26409
+ const bundled = (0, import_node_path18.join)(paths2.bin, "goose");
26410
+ if ((0, import_node_fs15.existsSync)(bundled)) {
26378
26411
  const v2 = await resolveVersion3(bundled);
26379
26412
  if (v2) return { installed: true, version: v2, resolvedPath: bundled };
26380
26413
  }
@@ -26390,11 +26423,11 @@ var goosePredep = {
26390
26423
  return { installed: false, reason: "goose not on PATH or in ~/.langwatch/bin" };
26391
26424
  },
26392
26425
  async install({ platform: platform5, paths: paths2, task }) {
26393
- (0, import_node_fs9.mkdirSync)(paths2.bin, { recursive: true });
26394
- const url = downloadUrl3(platform5);
26395
- const target = (0, import_node_path9.join)(paths2.bin, "goose");
26426
+ (0, import_node_fs15.mkdirSync)(paths2.bin, { recursive: true });
26427
+ const url = downloadUrl2(platform5);
26428
+ const target = (0, import_node_path18.join)(paths2.bin, "goose");
26396
26429
  await downloadWithProgress(url, target, task, `downloading goose ${GOOSE_VERSION}`);
26397
- (0, import_node_fs9.chmodSync)(target, 493);
26430
+ (0, import_node_fs15.chmodSync)(target, 493);
26398
26431
  const version = await resolveVersion3(target) ?? "unknown";
26399
26432
  return { version, resolvedPath: target };
26400
26433
  }
@@ -26430,7 +26463,7 @@ var embeds_versions_default = {
26430
26463
  var PG_VERSION = embeds_versions_default.postgres.version;
26431
26464
  var PG_MAJOR = PG_VERSION.split(".")[0];
26432
26465
  var EMBEDS_BASE = "https://embeds.langwatch.ai";
26433
- function downloadUrl4(platform5) {
26466
+ function downloadUrl3(platform5) {
26434
26467
  return `${EMBEDS_BASE}/postgres-${PG_VERSION}-${platform5}.tar.gz`;
26435
26468
  }
26436
26469
  async function resolveVersion4(bin) {
@@ -26472,7 +26505,7 @@ var postgresPredep = {
26472
26505
  async install({ platform: platform5, paths: paths2, task }) {
26473
26506
  const target = (0, import_node_path19.join)(paths2.bin, "postgres");
26474
26507
  (0, import_node_fs16.mkdirSync)(target, { recursive: true });
26475
- const url = downloadUrl4(platform5);
26508
+ const url = downloadUrl3(platform5);
26476
26509
  const tar = await Promise.resolve().then(() => (init_index_min(), index_min_exports));
26477
26510
  const tmp = (0, import_node_path19.join)(paths2.bin, `.postgres-${PG_VERSION}-${platform5}.tar.gz`);
26478
26511
  await downloadWithProgress(url, tmp, task, `downloading postgres ${PG_VERSION}`);
@@ -26507,7 +26540,7 @@ var import_node_path20 = require("node:path");
26507
26540
  var import_promises15 = require("node:stream/promises");
26508
26541
  var REDIS_VERSION = embeds_versions_default.redis.version;
26509
26542
  var EMBEDS_BASE2 = "https://embeds.langwatch.ai";
26510
- function downloadUrl5(platform5) {
26543
+ function downloadUrl4(platform5) {
26511
26544
  return `${EMBEDS_BASE2}/redis-${REDIS_VERSION}-${platform5}.tar.gz`;
26512
26545
  }
26513
26546
  async function resolveVersion5(bin) {
@@ -26543,7 +26576,7 @@ var redisPredep = {
26543
26576
  },
26544
26577
  async install({ platform: platform5, paths: paths2, task }) {
26545
26578
  (0, import_node_fs17.mkdirSync)(paths2.bin, { recursive: true });
26546
- const url = downloadUrl5(platform5);
26579
+ const url = downloadUrl4(platform5);
26547
26580
  const tar = await Promise.resolve().then(() => (init_index_min(), index_min_exports));
26548
26581
  const tmp = (0, import_node_path20.join)(paths2.bin, `.redis-${REDIS_VERSION}-${platform5}.tar.gz`);
26549
26582
  await downloadWithProgress(url, tmp, task, `downloading redis ${REDIS_VERSION}`);
@@ -26875,7 +26908,7 @@ var placeholderRuntime = {
26875
26908
  };
26876
26909
 
26877
26910
  // src/cli.ts
26878
- var VERSION = true ? "3.1.0-beta.13" : "0.0.0-dev";
26911
+ var VERSION = true ? "3.1.0-beta.14" : "0.0.0-dev";
26879
26912
  async function loadRuntime() {
26880
26913
  try {
26881
26914
  const real = await Promise.resolve().then(() => (init_runtime(), runtime_exports));
@@ -27013,8 +27046,8 @@ program2.command("reset").description("delete ~/.langwatch (binaries, data, env)
27013
27046
  console.log(source_default.yellow("Aborted."));
27014
27047
  process.exit(0);
27015
27048
  }
27016
- const { rmSync } = await import("node:fs");
27017
- rmSync(paths.root, { recursive: true, force: true });
27049
+ const { rmSync: rmSync2 } = await import("node:fs");
27050
+ rmSync2(paths.root, { recursive: true, force: true });
27018
27051
  console.log(source_default.green(`\u2713 removed ${paths.root}`));
27019
27052
  });
27020
27053
  program2.parseAsync(process.argv).catch((err) => {