ghc-proxy 0.10.1 → 0.10.2

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,4 +1,4 @@
1
- import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DdY2evDX.mjs";
1
+ import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DGbju5p-.mjs";
2
2
  //#region node_modules/gpt-tokenizer/esm/bpeRanks/o200k_base.js
3
3
  const c0 = [
4
4
  "!",
@@ -204719,4 +204719,4 @@ const { decode, decodeAsyncGenerator, decodeGenerator, encode, encodeGenerator,
204719
204719
  //#endregion
204720
204720
  export { ALL_SPECIAL_TOKENS, DEFAULT_MERGE_CACHE_SIZE, EndOfPrompt, EndOfText, FimMiddle, FimPrefix, FimSuffix, HarmonyCall, HarmonyChannel, HarmonyConstrain, HarmonyEnd, HarmonyMessage, HarmonyReturn, HarmonyStart, HarmonyStartOfText, ImEnd, ImSep, ImStart, clearMergeCache, countTokens, decode, decodeAsyncGenerator, decodeGenerator, api as default, encode, encodeChat, encodeChatGenerator, encodeGenerator, estimateCost, isWithinTokenLimit, setMergeCacheSize, vocabularySize };
204721
204721
 
204722
- //# sourceMappingURL=o200k_base-DXNwToXP.mjs.map
204722
+ //# sourceMappingURL=o200k_base-8n5G7cJ5.mjs.map
@@ -1,4 +1,4 @@
1
- import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DdY2evDX.mjs";
1
+ import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DGbju5p-.mjs";
2
2
  import { t as bpe } from "./p50k_base-BDWEQNXM.mjs";
3
3
  //#region node_modules/gpt-tokenizer/esm/encoding/p50k_base.js
4
4
  const api = GptEncoding.getEncodingApi("p50k_base", () => bpe);
@@ -6,4 +6,4 @@ const { decode, decodeAsyncGenerator, decodeGenerator, encode, encodeGenerator,
6
6
  //#endregion
7
7
  export { ALL_SPECIAL_TOKENS, DEFAULT_MERGE_CACHE_SIZE, EndOfPrompt, EndOfText, FimMiddle, FimPrefix, FimSuffix, HarmonyCall, HarmonyChannel, HarmonyConstrain, HarmonyEnd, HarmonyMessage, HarmonyReturn, HarmonyStart, HarmonyStartOfText, ImEnd, ImSep, ImStart, clearMergeCache, countTokens, decode, decodeAsyncGenerator, decodeGenerator, api as default, encode, encodeGenerator, estimateCost, isWithinTokenLimit, setMergeCacheSize, vocabularySize };
8
8
 
9
- //# sourceMappingURL=p50k_base-Cab7w92R.mjs.map
9
+ //# sourceMappingURL=p50k_base-Coo3riw5.mjs.map
@@ -1,4 +1,4 @@
1
- import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DdY2evDX.mjs";
1
+ import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DGbju5p-.mjs";
2
2
  import { t as bpe } from "./p50k_base-BDWEQNXM.mjs";
3
3
  //#region node_modules/gpt-tokenizer/esm/encoding/p50k_edit.js
4
4
  const api = GptEncoding.getEncodingApi("p50k_edit", () => bpe);
@@ -6,4 +6,4 @@ const { decode, decodeAsyncGenerator, decodeGenerator, encode, encodeGenerator,
6
6
  //#endregion
7
7
  export { ALL_SPECIAL_TOKENS, DEFAULT_MERGE_CACHE_SIZE, EndOfPrompt, EndOfText, FimMiddle, FimPrefix, FimSuffix, HarmonyCall, HarmonyChannel, HarmonyConstrain, HarmonyEnd, HarmonyMessage, HarmonyReturn, HarmonyStart, HarmonyStartOfText, ImEnd, ImSep, ImStart, clearMergeCache, countTokens, decode, decodeAsyncGenerator, decodeGenerator, api as default, encode, encodeChat, encodeChatGenerator, encodeGenerator, estimateCost, isWithinTokenLimit, setMergeCacheSize, vocabularySize };
8
8
 
9
- //# sourceMappingURL=p50k_edit-DkrRw_em.mjs.map
9
+ //# sourceMappingURL=p50k_edit-Df1WiLDq.mjs.map
@@ -1,4 +1,4 @@
1
- import process$1, { stdin, stdout } from "node:process";
1
+ import g$1, { stdin, stdout } from "node:process";
2
2
  import { WriteStream } from "node:tty";
3
3
  import f from "node:readline";
4
4
  //#region node_modules/consola/dist/chunks/prompt.mjs
@@ -204,7 +204,11 @@ function A$1(t, u = {}) {
204
204
  }
205
205
  return e;
206
206
  }
207
- const m = 10, L$1 = (t = 0) => (u) => `\x1B[${u + t}m`, N = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`, I = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`, r = {
207
+ const m = 10;
208
+ const L$1 = (t = 0) => (u) => `\x1B[${u + t}m`;
209
+ const N = (t = 0) => (u) => `\x1B[${38 + t};5;${u}m`;
210
+ const I = (t = 0) => (u, F, e) => `\x1B[${38 + t};2;${u};${F};${e}m`;
211
+ const r = {
208
212
  modifier: {
209
213
  reset: [0, 0],
210
214
  bold: [1, 22],
@@ -258,7 +262,8 @@ const m = 10, L$1 = (t = 0) => (u) => `\x1B[${u + t}m`, N = (t = 0) => (u) => `\
258
262
  }
259
263
  };
260
264
  Object.keys(r.modifier);
261
- const tD = Object.keys(r.color), eD = Object.keys(r.bgColor);
265
+ const tD = Object.keys(r.color);
266
+ const eD = Object.keys(r.bgColor);
262
267
  [...tD, ...eD];
263
268
  function sD() {
264
269
  const t = /* @__PURE__ */ new Map();
@@ -331,7 +336,18 @@ function sD() {
331
336
  }
332
337
  }), r;
333
338
  }
334
- const iD = sD(), v = new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[", rD = "]", R = "m", y = `${rD}8;;`, V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`, z = (t) => `${v.values().next().value}${y}${t}${w$1}`, ED = (t) => t.split(" ").map((u) => A$1(u)), _ = (t, u, F) => {
339
+ const iD = sD();
340
+ const v = /* @__PURE__ */ new Set(["\x1B", "›"]);
341
+ const CD = 39;
342
+ const w$1 = "\x07";
343
+ const W$1 = "[";
344
+ const rD = "]";
345
+ const R = "m";
346
+ const y = `${rD}8;;`;
347
+ const V$1 = (t) => `${v.values().next().value}${W$1}${t}${R}`;
348
+ const z = (t) => `${v.values().next().value}${y}${t}${w$1}`;
349
+ const ED = (t) => t.split(" ").map((u) => A$1(u));
350
+ const _ = (t, u, F) => {
335
351
  const e = [...u];
336
352
  let s = false, i = false, D = A$1(T$1(t[t.length - 1]));
337
353
  for (const [C, o] of e.entries()) {
@@ -343,12 +359,14 @@ const iD = sD(), v = new Set(["\x1B", "›"]), CD = 39, w$1 = "\x07", W$1 = "[",
343
359
  D += E, D === F && C < e.length - 1 && (t.push(""), D = 0);
344
360
  }
345
361
  !D && t[t.length - 1].length > 0 && t.length > 1 && (t[t.length - 2] += t.pop());
346
- }, nD = (t) => {
362
+ };
363
+ const nD = (t) => {
347
364
  const u = t.split(" ");
348
365
  let F = u.length;
349
366
  for (; F > 0 && !(A$1(u[F - 1]) > 0);) F--;
350
367
  return F === u.length ? t : u.slice(0, F).join(" ") + u.slice(F).join("");
351
- }, oD = (t, u, F = {}) => {
368
+ };
369
+ const oD = (t, u, F = {}) => {
352
370
  if (F.trim !== false && t.trim() === "") return "";
353
371
  let e = "", s, i;
354
372
  const D = ED(t);
@@ -399,7 +417,7 @@ function G(t, u, F) {
399
417
  `);
400
418
  }
401
419
  const c = {
402
- actions: new Set([
420
+ actions: /* @__PURE__ */ new Set([
403
421
  "up",
404
422
  "down",
405
423
  "left",
@@ -408,7 +426,7 @@ const c = {
408
426
  "enter",
409
427
  "cancel"
410
428
  ]),
411
- aliases: new Map([
429
+ aliases: /* @__PURE__ */ new Map([
412
430
  ["k", "up"],
413
431
  ["j", "down"],
414
432
  ["h", "left"],
@@ -436,12 +454,14 @@ function d$1(t, u) {
436
454
  const F = t;
437
455
  F.isTTY && F.setRawMode(u);
438
456
  }
439
- var AD = Object.defineProperty, pD = (t, u, F) => u in t ? AD(t, u, {
457
+ var AD = Object.defineProperty;
458
+ var pD = (t, u, F) => u in t ? AD(t, u, {
440
459
  enumerable: true,
441
460
  configurable: true,
442
461
  writable: true,
443
462
  value: F
444
- }) : t[u] = F, h = (t, u, F) => (pD(t, typeof u != "symbol" ? u + "" : u, F), F);
463
+ }) : t[u] = F;
464
+ var h = (t, u, F) => (pD(t, typeof u != "symbol" ? u + "" : u, F), F);
445
465
  var x = class {
446
466
  constructor(u, F = true) {
447
467
  h(this, "input"), h(this, "output"), h(this, "_abortSignal"), h(this, "rl"), h(this, "opts"), h(this, "_render"), h(this, "_track", false), h(this, "_prevFrame", ""), h(this, "_subscribers", /* @__PURE__ */ new Map()), h(this, "_cursor", 0), h(this, "state", "initial"), h(this, "error", ""), h(this, "value");
@@ -562,12 +582,14 @@ var fD = class extends x {
562
582
  });
563
583
  }
564
584
  };
565
- var bD = Object.defineProperty, mD = (t, u, F) => u in t ? bD(t, u, {
585
+ var bD = Object.defineProperty;
586
+ var mD = (t, u, F) => u in t ? bD(t, u, {
566
587
  enumerable: true,
567
588
  configurable: true,
568
589
  writable: true,
569
590
  value: F
570
- }) : t[u] = F, Y = (t, u, F) => (mD(t, typeof u != "symbol" ? u + "" : u, F), F);
591
+ }) : t[u] = F;
592
+ var Y = (t, u, F) => (mD(t, typeof u != "symbol" ? u + "" : u, F), F);
571
593
  let wD = class extends x {
572
594
  constructor(u) {
573
595
  super(u, false), Y(this, "options"), Y(this, "cursor", 0), this.options = u.options, this.value = [...u.initialValues ?? []], this.cursor = Math.max(this.options.findIndex(({ value: F }) => F === u.cursorAt), 0), this.on("key", (F) => {
@@ -582,9 +604,7 @@ let wD = class extends x {
582
604
  case "right":
583
605
  this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
584
606
  break;
585
- case "space":
586
- this.toggleValue();
587
- break;
607
+ case "space": this.toggleValue();
588
608
  }
589
609
  });
590
610
  }
@@ -600,12 +620,14 @@ let wD = class extends x {
600
620
  this.value = u ? this.value.filter((F) => F !== this._value) : [...this.value, this._value];
601
621
  }
602
622
  };
603
- var SD = Object.defineProperty, $D = (t, u, F) => u in t ? SD(t, u, {
623
+ var SD = Object.defineProperty;
624
+ var $D = (t, u, F) => u in t ? SD(t, u, {
604
625
  enumerable: true,
605
626
  configurable: true,
606
627
  writable: true,
607
628
  value: F
608
- }) : t[u] = F, q = (t, u, F) => ($D(t, typeof u != "symbol" ? u + "" : u, F), F);
629
+ }) : t[u] = F;
630
+ var q = (t, u, F) => ($D(t, typeof u != "symbol" ? u + "" : u, F), F);
609
631
  var jD = class extends x {
610
632
  constructor(u) {
611
633
  super(u, false), q(this, "options"), q(this, "cursor", 0), this.options = u.options, this.cursor = this.options.findIndex(({ value: F }) => F === u.initialValue), this.cursor === -1 && (this.cursor = 0), this.changeValue(), this.on("cursor", (F) => {
@@ -615,9 +637,7 @@ var jD = class extends x {
615
637
  this.cursor = this.cursor === 0 ? this.options.length - 1 : this.cursor - 1;
616
638
  break;
617
639
  case "down":
618
- case "right":
619
- this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
620
- break;
640
+ case "right": this.cursor = this.cursor === this.options.length - 1 ? 0 : this.cursor + 1;
621
641
  }
622
642
  this.changeValue();
623
643
  });
@@ -646,9 +666,22 @@ var PD = class extends x {
646
666
  }
647
667
  };
648
668
  function ce() {
649
- return process$1.platform !== "win32" ? process$1.env.TERM !== "linux" : !!process$1.env.CI || !!process$1.env.WT_SESSION || !!process$1.env.TERMINUS_SUBLIME || process$1.env.ConEmuTask === "{cmd::Cmder}" || process$1.env.TERM_PROGRAM === "Terminus-Sublime" || process$1.env.TERM_PROGRAM === "vscode" || process$1.env.TERM === "xterm-256color" || process$1.env.TERM === "alacritty" || process$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
669
+ return g$1.platform !== "win32" ? g$1.env.TERM !== "linux" : !!g$1.env.CI || !!g$1.env.WT_SESSION || !!g$1.env.TERMINUS_SUBLIME || g$1.env.ConEmuTask === "{cmd::Cmder}" || g$1.env.TERM_PROGRAM === "Terminus-Sublime" || g$1.env.TERM_PROGRAM === "vscode" || g$1.env.TERM === "xterm-256color" || g$1.env.TERM === "alacritty" || g$1.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
650
670
  }
651
- const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"), W = u("▲", "x"), C = u("✔", "√"), o = u(""), d = u(""), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), w = (t) => {
671
+ const V = ce();
672
+ const u = (t, n) => V ? t : n;
673
+ const le = u("❯", ">");
674
+ const L = u("■", "x");
675
+ const W = u("▲", "x");
676
+ const C = u("✔", "√");
677
+ const o = u("");
678
+ const d = u("");
679
+ const k = u("●", ">");
680
+ const P = u("○", " ");
681
+ const A = u("◻", "[•]");
682
+ const T = u("◼", "[+]");
683
+ const F = u("◻", "[ ]");
684
+ const w = (t) => {
652
685
  switch (t) {
653
686
  case "initial":
654
687
  case "active": return e.cyan(le);
@@ -656,7 +689,8 @@ const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"),
656
689
  case "error": return e.yellow(W);
657
690
  case "submit": return e.green(C);
658
691
  }
659
- }, B = (t) => {
692
+ };
693
+ const B = (t) => {
660
694
  const { cursor: n, options: s, style: r } = t, i = t.maxItems ?? Number.POSITIVE_INFINITY, a = Math.max(process.stdout.rows - 4, 0), c = Math.min(a, Math.max(i, 5));
661
695
  let l = 0;
662
696
  n >= l + c - 3 ? l = Math.max(Math.min(n - c + 3, s.length - c), 0) : n < l + 2 && (l = Math.max(n - 2, 0));
@@ -665,7 +699,8 @@ const V = ce(), u = (t, n) => V ? t : n, le = u("❯", ">"), L = u("■", "x"),
665
699
  const j = v === 0 && $, E = v === x.length - 1 && p;
666
700
  return j || E ? e.dim("...") : r(M, v + l === n);
667
701
  });
668
- }, he = (t) => new PD({
702
+ };
703
+ const he = (t) => new PD({
669
704
  validate: t.validate,
670
705
  placeholder: t.placeholder,
671
706
  defaultValue: t.defaultValue,
@@ -687,7 +722,8 @@ ${e.cyan(d)}
687
722
  `;
688
723
  }
689
724
  }
690
- }).prompt(), ye = (t) => {
725
+ }).prompt();
726
+ const ye = (t) => {
691
727
  const n = t.active ?? "Yes", s = t.inactive ?? "No";
692
728
  return new fD({
693
729
  active: n,
@@ -707,7 +743,8 @@ ${e.cyan(d)}
707
743
  }
708
744
  }
709
745
  }).prompt();
710
- }, ve = (t) => {
746
+ };
747
+ const ve = (t) => {
711
748
  const n = (s, r) => {
712
749
  const i = s.label ?? String(s.value);
713
750
  switch (r) {
@@ -740,7 +777,8 @@ ${e.cyan(d)}
740
777
  }
741
778
  }
742
779
  }).prompt();
743
- }, fe = (t) => {
780
+ };
781
+ const fe = (t) => {
744
782
  const n = (s, r) => {
745
783
  const i = s.label ?? String(s.value);
746
784
  return r === "active" ? `${e.cyan(A)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}` : r === "selected" ? `${e.green(T)} ${e.dim(i)}` : r === "cancelled" ? `${e.strikethrough(e.dim(i))}` : r === "active-selected" ? `${e.green(T)} ${i} ${s.hint ? e.dim(`(${s.hint})`) : ""}` : r === "submitted" ? `${e.dim(i)}` : `${e.dim(F)} ${e.dim(i)}`;
@@ -846,4 +884,4 @@ async function prompt(message, opts = {}) {
846
884
  //#endregion
847
885
  export { prompt };
848
886
 
849
- //# sourceMappingURL=prompt-DsMdjS4d.mjs.map
887
+ //# sourceMappingURL=prompt-B9CExZli.mjs.map
@@ -1,4 +1,4 @@
1
- import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DdY2evDX.mjs";
1
+ import { _ as ImStart, a as FimPrefix, c as HarmonyChannel, d as HarmonyMessage, f as HarmonyReturn, g as ImSep, h as ImEnd, i as FimMiddle, l as HarmonyConstrain, m as HarmonyStartOfText, n as EndOfPrompt, o as FimSuffix, p as HarmonyStart, r as EndOfText, s as HarmonyCall, t as GptEncoding, u as HarmonyEnd, v as ALL_SPECIAL_TOKENS, y as DEFAULT_MERGE_CACHE_SIZE } from "./GptEncoding-DGbju5p-.mjs";
2
2
  //#region node_modules/gpt-tokenizer/esm/bpeRanks/r50k_base.js
3
3
  const c0 = [
4
4
  "!",
@@ -50459,4 +50459,4 @@ const { decode, decodeAsyncGenerator, decodeGenerator, encode, encodeGenerator,
50459
50459
  //#endregion
50460
50460
  export { ALL_SPECIAL_TOKENS, DEFAULT_MERGE_CACHE_SIZE, EndOfPrompt, EndOfText, FimMiddle, FimPrefix, FimSuffix, HarmonyCall, HarmonyChannel, HarmonyConstrain, HarmonyEnd, HarmonyMessage, HarmonyReturn, HarmonyStart, HarmonyStartOfText, ImEnd, ImSep, ImStart, clearMergeCache, countTokens, decode, decodeAsyncGenerator, decodeGenerator, api as default, encode, encodeGenerator, estimateCost, isWithinTokenLimit, setMergeCacheSize, vocabularySize };
50461
50461
 
50462
- //# sourceMappingURL=r50k_base-1vVxWqTY.mjs.map
50462
+ //# sourceMappingURL=r50k_base-CrlP1QVX.mjs.map