@enactprotocol/mcp-server 1.2.3 → 1.2.4

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.
Files changed (3) hide show
  1. package/dist/index.js +307 -237
  2. package/dist/index.js.bak +307 -237
  3. package/package.json +2 -2
package/dist/index.js.bak CHANGED
@@ -7495,7 +7495,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
7495
7495
  if (!(this instanceof SonicBoom)) {
7496
7496
  return new SonicBoom(opts);
7497
7497
  }
7498
- let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {};
7498
+ let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir: mkdir2, retryEAGAIN, fsync, contentMode, mode } = opts || {};
7499
7499
  fd = fd || dest;
7500
7500
  this._len = 0;
7501
7501
  this.fd = -1;
@@ -7520,7 +7520,7 @@ var require_sonic_boom = __commonJS((exports, module) => {
7520
7520
  this.append = append || false;
7521
7521
  this.mode = mode;
7522
7522
  this.retryEAGAIN = retryEAGAIN || (() => true);
7523
- this.mkdir = mkdir || false;
7523
+ this.mkdir = mkdir2 || false;
7524
7524
  let fsWriteSync;
7525
7525
  let fsWrite;
7526
7526
  if (contentMode === kContentModeBuffer) {
@@ -8212,7 +8212,7 @@ var require_thread_stream = __commonJS((exports, module) => {
8212
8212
  var { version } = require_package();
8213
8213
  var { EventEmitter } = __require("events");
8214
8214
  var { Worker } = __require("worker_threads");
8215
- var { join } = __require("path");
8215
+ var { join: join2 } = __require("path");
8216
8216
  var { pathToFileURL } = __require("url");
8217
8217
  var { wait } = require_wait();
8218
8218
  var {
@@ -8248,7 +8248,7 @@ var require_thread_stream = __commonJS((exports, module) => {
8248
8248
  function createWorker(stream, opts) {
8249
8249
  const { filename, workerData } = opts;
8250
8250
  const bundlerOverrides = "__bundlerPathsOverrides" in globalThis ? globalThis.__bundlerPathsOverrides : {};
8251
- const toExecute = bundlerOverrides["thread-stream-worker"] || join(__dirname, "lib", "worker.js");
8251
+ const toExecute = bundlerOverrides["thread-stream-worker"] || join2(__dirname, "lib", "worker.js");
8252
8252
  const worker = new Worker(toExecute, {
8253
8253
  ...opts.workerOpts,
8254
8254
  trackUnmanagedFds: false,
@@ -8632,7 +8632,7 @@ var require_transport = __commonJS((exports, module) => {
8632
8632
  var __dirname = "/Users/keithgroves/projects/enact/enact-cli/node_modules/pino/lib";
8633
8633
  var { createRequire: createRequire2 } = __require("module");
8634
8634
  var getCallers = require_caller();
8635
- var { join, isAbsolute, sep } = __require("node:path");
8635
+ var { join: join2, isAbsolute, sep } = __require("node:path");
8636
8636
  var sleep = require_atomic_sleep();
8637
8637
  var onExit = require_on_exit_leak_free();
8638
8638
  var ThreadStream = require_thread_stream();
@@ -8695,7 +8695,7 @@ var require_transport = __commonJS((exports, module) => {
8695
8695
  throw new Error("only one of target or targets can be specified");
8696
8696
  }
8697
8697
  if (targets) {
8698
- target = bundlerOverrides["pino-worker"] || join(__dirname, "worker.js");
8698
+ target = bundlerOverrides["pino-worker"] || join2(__dirname, "worker.js");
8699
8699
  options.targets = targets.filter((dest) => dest.target).map((dest) => {
8700
8700
  return {
8701
8701
  ...dest,
@@ -8712,7 +8712,7 @@ var require_transport = __commonJS((exports, module) => {
8712
8712
  });
8713
8713
  });
8714
8714
  } else if (pipeline2) {
8715
- target = bundlerOverrides["pino-worker"] || join(__dirname, "worker.js");
8715
+ target = bundlerOverrides["pino-worker"] || join2(__dirname, "worker.js");
8716
8716
  options.pipelines = [pipeline2.map((dest) => {
8717
8717
  return {
8718
8718
  ...dest,
@@ -8734,7 +8734,7 @@ var require_transport = __commonJS((exports, module) => {
8734
8734
  return origin;
8735
8735
  }
8736
8736
  if (origin === "pino/file") {
8737
- return join(__dirname, "..", "file.js");
8737
+ return join2(__dirname, "..", "file.js");
8738
8738
  }
8739
8739
  let fixTarget2;
8740
8740
  for (const filePath of callers) {
@@ -9637,7 +9637,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
9637
9637
  return circularValue;
9638
9638
  }
9639
9639
  let res = "";
9640
- let join = ",";
9640
+ let join2 = ",";
9641
9641
  const originalIndentation = indentation;
9642
9642
  if (Array.isArray(value)) {
9643
9643
  if (value.length === 0) {
@@ -9651,7 +9651,7 @@ var require_safe_stable_stringify = __commonJS((exports, module) => {
9651
9651
  indentation += spacer;
9652
9652
  res += `
9653
9653
  ${indentation}`;
9654
- join = `,
9654
+ join2 = `,
9655
9655
  ${indentation}`;
9656
9656
  }
9657
9657
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9659,13 +9659,13 @@ ${indentation}`;
9659
9659
  for (;i < maximumValuesToStringify - 1; i++) {
9660
9660
  const tmp2 = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9661
9661
  res += tmp2 !== undefined ? tmp2 : "null";
9662
- res += join;
9662
+ res += join2;
9663
9663
  }
9664
9664
  const tmp = stringifyFnReplacer(String(i), value, stack, replacer, spacer, indentation);
9665
9665
  res += tmp !== undefined ? tmp : "null";
9666
9666
  if (value.length - 1 > maximumBreadth) {
9667
9667
  const removedKeys = value.length - maximumBreadth - 1;
9668
- res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
9668
+ res += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
9669
9669
  }
9670
9670
  if (spacer !== "") {
9671
9671
  res += `
@@ -9686,7 +9686,7 @@ ${originalIndentation}`;
9686
9686
  let separator = "";
9687
9687
  if (spacer !== "") {
9688
9688
  indentation += spacer;
9689
- join = `,
9689
+ join2 = `,
9690
9690
  ${indentation}`;
9691
9691
  whitespace = " ";
9692
9692
  }
@@ -9700,13 +9700,13 @@ ${indentation}`;
9700
9700
  const tmp = stringifyFnReplacer(key2, value, stack, replacer, spacer, indentation);
9701
9701
  if (tmp !== undefined) {
9702
9702
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9703
- separator = join;
9703
+ separator = join2;
9704
9704
  }
9705
9705
  }
9706
9706
  if (keyLength > maximumBreadth) {
9707
9707
  const removedKeys = keyLength - maximumBreadth;
9708
9708
  res += `${separator}"...":${whitespace}"${getItemCount(removedKeys)} not stringified"`;
9709
- separator = join;
9709
+ separator = join2;
9710
9710
  }
9711
9711
  if (spacer !== "" && separator.length > 1) {
9712
9712
  res = `
@@ -9746,7 +9746,7 @@ ${originalIndentation}`;
9746
9746
  }
9747
9747
  const originalIndentation = indentation;
9748
9748
  let res = "";
9749
- let join = ",";
9749
+ let join2 = ",";
9750
9750
  if (Array.isArray(value)) {
9751
9751
  if (value.length === 0) {
9752
9752
  return "[]";
@@ -9759,7 +9759,7 @@ ${originalIndentation}`;
9759
9759
  indentation += spacer;
9760
9760
  res += `
9761
9761
  ${indentation}`;
9762
- join = `,
9762
+ join2 = `,
9763
9763
  ${indentation}`;
9764
9764
  }
9765
9765
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
@@ -9767,13 +9767,13 @@ ${indentation}`;
9767
9767
  for (;i < maximumValuesToStringify - 1; i++) {
9768
9768
  const tmp2 = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9769
9769
  res += tmp2 !== undefined ? tmp2 : "null";
9770
- res += join;
9770
+ res += join2;
9771
9771
  }
9772
9772
  const tmp = stringifyArrayReplacer(String(i), value[i], stack, replacer, spacer, indentation);
9773
9773
  res += tmp !== undefined ? tmp : "null";
9774
9774
  if (value.length - 1 > maximumBreadth) {
9775
9775
  const removedKeys = value.length - maximumBreadth - 1;
9776
- res += `${join}"... ${getItemCount(removedKeys)} not stringified"`;
9776
+ res += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
9777
9777
  }
9778
9778
  if (spacer !== "") {
9779
9779
  res += `
@@ -9786,7 +9786,7 @@ ${originalIndentation}`;
9786
9786
  let whitespace = "";
9787
9787
  if (spacer !== "") {
9788
9788
  indentation += spacer;
9789
- join = `,
9789
+ join2 = `,
9790
9790
  ${indentation}`;
9791
9791
  whitespace = " ";
9792
9792
  }
@@ -9795,7 +9795,7 @@ ${indentation}`;
9795
9795
  const tmp = stringifyArrayReplacer(key2, value[key2], stack, replacer, spacer, indentation);
9796
9796
  if (tmp !== undefined) {
9797
9797
  res += `${separator}${strEscape(key2)}:${whitespace}${tmp}`;
9798
- separator = join;
9798
+ separator = join2;
9799
9799
  }
9800
9800
  }
9801
9801
  if (spacer !== "" && separator.length > 1) {
@@ -9852,20 +9852,20 @@ ${originalIndentation}`;
9852
9852
  indentation += spacer;
9853
9853
  let res2 = `
9854
9854
  ${indentation}`;
9855
- const join2 = `,
9855
+ const join3 = `,
9856
9856
  ${indentation}`;
9857
9857
  const maximumValuesToStringify = Math.min(value.length, maximumBreadth);
9858
9858
  let i = 0;
9859
9859
  for (;i < maximumValuesToStringify - 1; i++) {
9860
9860
  const tmp2 = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9861
9861
  res2 += tmp2 !== undefined ? tmp2 : "null";
9862
- res2 += join2;
9862
+ res2 += join3;
9863
9863
  }
9864
9864
  const tmp = stringifyIndent(String(i), value[i], stack, spacer, indentation);
9865
9865
  res2 += tmp !== undefined ? tmp : "null";
9866
9866
  if (value.length - 1 > maximumBreadth) {
9867
9867
  const removedKeys = value.length - maximumBreadth - 1;
9868
- res2 += `${join2}"... ${getItemCount(removedKeys)} not stringified"`;
9868
+ res2 += `${join3}"... ${getItemCount(removedKeys)} not stringified"`;
9869
9869
  }
9870
9870
  res2 += `
9871
9871
  ${originalIndentation}`;
@@ -9881,16 +9881,16 @@ ${originalIndentation}`;
9881
9881
  return '"[Object]"';
9882
9882
  }
9883
9883
  indentation += spacer;
9884
- const join = `,
9884
+ const join2 = `,
9885
9885
  ${indentation}`;
9886
9886
  let res = "";
9887
9887
  let separator = "";
9888
9888
  let maximumPropertiesToStringify = Math.min(keyLength, maximumBreadth);
9889
9889
  if (isTypedArrayWithEntries(value)) {
9890
- res += stringifyTypedArray(value, join, maximumBreadth);
9890
+ res += stringifyTypedArray(value, join2, maximumBreadth);
9891
9891
  keys = keys.slice(value.length);
9892
9892
  maximumPropertiesToStringify -= value.length;
9893
- separator = join;
9893
+ separator = join2;
9894
9894
  }
9895
9895
  if (deterministic) {
9896
9896
  keys = sort(keys, comparator);
@@ -9901,13 +9901,13 @@ ${indentation}`;
9901
9901
  const tmp = stringifyIndent(key2, value[key2], stack, spacer, indentation);
9902
9902
  if (tmp !== undefined) {
9903
9903
  res += `${separator}${strEscape(key2)}: ${tmp}`;
9904
- separator = join;
9904
+ separator = join2;
9905
9905
  }
9906
9906
  }
9907
9907
  if (keyLength > maximumBreadth) {
9908
9908
  const removedKeys = keyLength - maximumBreadth;
9909
9909
  res += `${separator}"...": "${getItemCount(removedKeys)} not stringified"`;
9910
- separator = join;
9910
+ separator = join2;
9911
9911
  }
9912
9912
  if (separator !== "") {
9913
9913
  res = `
@@ -14338,23 +14338,23 @@ var require_printer = __commonJS((exports) => {
14338
14338
  leave: (node) => "$" + node.name
14339
14339
  },
14340
14340
  Document: {
14341
- leave: (node) => join(node.definitions, `
14341
+ leave: (node) => join2(node.definitions, `
14342
14342
 
14343
14343
  `)
14344
14344
  },
14345
14345
  OperationDefinition: {
14346
14346
  leave(node) {
14347
- const varDefs = wrap("(", join(node.variableDefinitions, ", "), ")");
14348
- const prefix = join([
14347
+ const varDefs = wrap("(", join2(node.variableDefinitions, ", "), ")");
14348
+ const prefix = join2([
14349
14349
  node.operation,
14350
- join([node.name, varDefs]),
14351
- join(node.directives, " ")
14350
+ join2([node.name, varDefs]),
14351
+ join2(node.directives, " ")
14352
14352
  ], " ");
14353
14353
  return (prefix === "query" ? "" : prefix + " ") + node.selectionSet;
14354
14354
  }
14355
14355
  },
14356
14356
  VariableDefinition: {
14357
- leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join(directives, " "))
14357
+ leave: ({ variable, type, defaultValue, directives }) => variable + ": " + type + wrap(" = ", defaultValue) + wrap(" ", join2(directives, " "))
14358
14358
  },
14359
14359
  SelectionSet: {
14360
14360
  leave: ({ selections }) => block(selections)
@@ -14362,32 +14362,32 @@ var require_printer = __commonJS((exports) => {
14362
14362
  Field: {
14363
14363
  leave({ alias, name, arguments: args, directives, selectionSet }) {
14364
14364
  const prefix = wrap("", alias, ": ") + name;
14365
- let argsLine = prefix + wrap("(", join(args, ", "), ")");
14365
+ let argsLine = prefix + wrap("(", join2(args, ", "), ")");
14366
14366
  if (argsLine.length > MAX_LINE_LENGTH) {
14367
14367
  argsLine = prefix + wrap(`(
14368
- `, indent(join(args, `
14368
+ `, indent(join2(args, `
14369
14369
  `)), `
14370
14370
  )`);
14371
14371
  }
14372
- return join([argsLine, join(directives, " "), selectionSet], " ");
14372
+ return join2([argsLine, join2(directives, " "), selectionSet], " ");
14373
14373
  }
14374
14374
  },
14375
14375
  Argument: {
14376
14376
  leave: ({ name, value }) => name + ": " + value
14377
14377
  },
14378
14378
  FragmentSpread: {
14379
- leave: ({ name, directives }) => "..." + name + wrap(" ", join(directives, " "))
14379
+ leave: ({ name, directives }) => "..." + name + wrap(" ", join2(directives, " "))
14380
14380
  },
14381
14381
  InlineFragment: {
14382
- leave: ({ typeCondition, directives, selectionSet }) => join([
14382
+ leave: ({ typeCondition, directives, selectionSet }) => join2([
14383
14383
  "...",
14384
14384
  wrap("on ", typeCondition),
14385
- join(directives, " "),
14385
+ join2(directives, " "),
14386
14386
  selectionSet
14387
14387
  ], " ")
14388
14388
  },
14389
14389
  FragmentDefinition: {
14390
- leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(", join(variableDefinitions, ", "), ")")} ` + `on ${typeCondition} ${wrap("", join(directives, " "), " ")}` + selectionSet
14390
+ leave: ({ name, typeCondition, variableDefinitions, directives, selectionSet }) => `fragment ${name}${wrap("(", join2(variableDefinitions, ", "), ")")} ` + `on ${typeCondition} ${wrap("", join2(directives, " "), " ")}` + selectionSet
14391
14391
  },
14392
14392
  IntValue: {
14393
14393
  leave: ({ value }) => value
@@ -14408,16 +14408,16 @@ var require_printer = __commonJS((exports) => {
14408
14408
  leave: ({ value }) => value
14409
14409
  },
14410
14410
  ListValue: {
14411
- leave: ({ values }) => "[" + join(values, ", ") + "]"
14411
+ leave: ({ values }) => "[" + join2(values, ", ") + "]"
14412
14412
  },
14413
14413
  ObjectValue: {
14414
- leave: ({ fields }) => "{" + join(fields, ", ") + "}"
14414
+ leave: ({ fields }) => "{" + join2(fields, ", ") + "}"
14415
14415
  },
14416
14416
  ObjectField: {
14417
14417
  leave: ({ name, value }) => name + ": " + value
14418
14418
  },
14419
14419
  Directive: {
14420
- leave: ({ name, arguments: args }) => "@" + name + wrap("(", join(args, ", "), ")")
14420
+ leave: ({ name, arguments: args }) => "@" + name + wrap("(", join2(args, ", "), ")")
14421
14421
  },
14422
14422
  NamedType: {
14423
14423
  leave: ({ name }) => name
@@ -14430,115 +14430,115 @@ var require_printer = __commonJS((exports) => {
14430
14430
  },
14431
14431
  SchemaDefinition: {
14432
14432
  leave: ({ description, directives, operationTypes }) => wrap("", description, `
14433
- `) + join(["schema", join(directives, " "), block(operationTypes)], " ")
14433
+ `) + join2(["schema", join2(directives, " "), block(operationTypes)], " ")
14434
14434
  },
14435
14435
  OperationTypeDefinition: {
14436
14436
  leave: ({ operation, type }) => operation + ": " + type
14437
14437
  },
14438
14438
  ScalarTypeDefinition: {
14439
14439
  leave: ({ description, name, directives }) => wrap("", description, `
14440
- `) + join(["scalar", name, join(directives, " ")], " ")
14440
+ `) + join2(["scalar", name, join2(directives, " ")], " ")
14441
14441
  },
14442
14442
  ObjectTypeDefinition: {
14443
14443
  leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
14444
- `) + join([
14444
+ `) + join2([
14445
14445
  "type",
14446
14446
  name,
14447
- wrap("implements ", join(interfaces, " & ")),
14448
- join(directives, " "),
14447
+ wrap("implements ", join2(interfaces, " & ")),
14448
+ join2(directives, " "),
14449
14449
  block(fields)
14450
14450
  ], " ")
14451
14451
  },
14452
14452
  FieldDefinition: {
14453
14453
  leave: ({ description, name, arguments: args, type, directives }) => wrap("", description, `
14454
14454
  `) + name + (hasMultilineItems(args) ? wrap(`(
14455
- `, indent(join(args, `
14455
+ `, indent(join2(args, `
14456
14456
  `)), `
14457
- )`) : wrap("(", join(args, ", "), ")")) + ": " + type + wrap(" ", join(directives, " "))
14457
+ )`) : wrap("(", join2(args, ", "), ")")) + ": " + type + wrap(" ", join2(directives, " "))
14458
14458
  },
14459
14459
  InputValueDefinition: {
14460
14460
  leave: ({ description, name, type, defaultValue, directives }) => wrap("", description, `
14461
- `) + join([name + ": " + type, wrap("= ", defaultValue), join(directives, " ")], " ")
14461
+ `) + join2([name + ": " + type, wrap("= ", defaultValue), join2(directives, " ")], " ")
14462
14462
  },
14463
14463
  InterfaceTypeDefinition: {
14464
14464
  leave: ({ description, name, interfaces, directives, fields }) => wrap("", description, `
14465
- `) + join([
14465
+ `) + join2([
14466
14466
  "interface",
14467
14467
  name,
14468
- wrap("implements ", join(interfaces, " & ")),
14469
- join(directives, " "),
14468
+ wrap("implements ", join2(interfaces, " & ")),
14469
+ join2(directives, " "),
14470
14470
  block(fields)
14471
14471
  ], " ")
14472
14472
  },
14473
14473
  UnionTypeDefinition: {
14474
14474
  leave: ({ description, name, directives, types: types2 }) => wrap("", description, `
14475
- `) + join(["union", name, join(directives, " "), wrap("= ", join(types2, " | "))], " ")
14475
+ `) + join2(["union", name, join2(directives, " "), wrap("= ", join2(types2, " | "))], " ")
14476
14476
  },
14477
14477
  EnumTypeDefinition: {
14478
14478
  leave: ({ description, name, directives, values }) => wrap("", description, `
14479
- `) + join(["enum", name, join(directives, " "), block(values)], " ")
14479
+ `) + join2(["enum", name, join2(directives, " "), block(values)], " ")
14480
14480
  },
14481
14481
  EnumValueDefinition: {
14482
14482
  leave: ({ description, name, directives }) => wrap("", description, `
14483
- `) + join([name, join(directives, " ")], " ")
14483
+ `) + join2([name, join2(directives, " ")], " ")
14484
14484
  },
14485
14485
  InputObjectTypeDefinition: {
14486
14486
  leave: ({ description, name, directives, fields }) => wrap("", description, `
14487
- `) + join(["input", name, join(directives, " "), block(fields)], " ")
14487
+ `) + join2(["input", name, join2(directives, " "), block(fields)], " ")
14488
14488
  },
14489
14489
  DirectiveDefinition: {
14490
14490
  leave: ({ description, name, arguments: args, repeatable, locations }) => wrap("", description, `
14491
14491
  `) + "directive @" + name + (hasMultilineItems(args) ? wrap(`(
14492
- `, indent(join(args, `
14492
+ `, indent(join2(args, `
14493
14493
  `)), `
14494
- )`) : wrap("(", join(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join(locations, " | ")
14494
+ )`) : wrap("(", join2(args, ", "), ")")) + (repeatable ? " repeatable" : "") + " on " + join2(locations, " | ")
14495
14495
  },
14496
14496
  SchemaExtension: {
14497
- leave: ({ directives, operationTypes }) => join(["extend schema", join(directives, " "), block(operationTypes)], " ")
14497
+ leave: ({ directives, operationTypes }) => join2(["extend schema", join2(directives, " "), block(operationTypes)], " ")
14498
14498
  },
14499
14499
  ScalarTypeExtension: {
14500
- leave: ({ name, directives }) => join(["extend scalar", name, join(directives, " ")], " ")
14500
+ leave: ({ name, directives }) => join2(["extend scalar", name, join2(directives, " ")], " ")
14501
14501
  },
14502
14502
  ObjectTypeExtension: {
14503
- leave: ({ name, interfaces, directives, fields }) => join([
14503
+ leave: ({ name, interfaces, directives, fields }) => join2([
14504
14504
  "extend type",
14505
14505
  name,
14506
- wrap("implements ", join(interfaces, " & ")),
14507
- join(directives, " "),
14506
+ wrap("implements ", join2(interfaces, " & ")),
14507
+ join2(directives, " "),
14508
14508
  block(fields)
14509
14509
  ], " ")
14510
14510
  },
14511
14511
  InterfaceTypeExtension: {
14512
- leave: ({ name, interfaces, directives, fields }) => join([
14512
+ leave: ({ name, interfaces, directives, fields }) => join2([
14513
14513
  "extend interface",
14514
14514
  name,
14515
- wrap("implements ", join(interfaces, " & ")),
14516
- join(directives, " "),
14515
+ wrap("implements ", join2(interfaces, " & ")),
14516
+ join2(directives, " "),
14517
14517
  block(fields)
14518
14518
  ], " ")
14519
14519
  },
14520
14520
  UnionTypeExtension: {
14521
- leave: ({ name, directives, types: types2 }) => join([
14521
+ leave: ({ name, directives, types: types2 }) => join2([
14522
14522
  "extend union",
14523
14523
  name,
14524
- join(directives, " "),
14525
- wrap("= ", join(types2, " | "))
14524
+ join2(directives, " "),
14525
+ wrap("= ", join2(types2, " | "))
14526
14526
  ], " ")
14527
14527
  },
14528
14528
  EnumTypeExtension: {
14529
- leave: ({ name, directives, values }) => join(["extend enum", name, join(directives, " "), block(values)], " ")
14529
+ leave: ({ name, directives, values }) => join2(["extend enum", name, join2(directives, " "), block(values)], " ")
14530
14530
  },
14531
14531
  InputObjectTypeExtension: {
14532
- leave: ({ name, directives, fields }) => join(["extend input", name, join(directives, " "), block(fields)], " ")
14532
+ leave: ({ name, directives, fields }) => join2(["extend input", name, join2(directives, " "), block(fields)], " ")
14533
14533
  }
14534
14534
  };
14535
- function join(maybeArray, separator = "") {
14535
+ function join2(maybeArray, separator = "") {
14536
14536
  var _maybeArray$filter$jo;
14537
14537
  return (_maybeArray$filter$jo = maybeArray === null || maybeArray === undefined ? undefined : maybeArray.filter((x) => x).join(separator)) !== null && _maybeArray$filter$jo !== undefined ? _maybeArray$filter$jo : "";
14538
14538
  }
14539
14539
  function block(array2) {
14540
14540
  return wrap(`{
14541
- `, indent(join(array2, `
14541
+ `, indent(join2(array2, `
14542
14542
  `)), `
14543
14543
  }`);
14544
14544
  }
@@ -30129,8 +30129,8 @@ var require_adm_zip = __commonJS((exports, module) => {
30129
30129
  return null;
30130
30130
  }
30131
30131
  function fixPath(zipPath) {
30132
- const { join, normalize, sep } = pth.posix;
30133
- return join(".", normalize(sep + zipPath.split("\\").join(sep) + sep));
30132
+ const { join: join2, normalize, sep } = pth.posix;
30133
+ return join2(".", normalize(sep + zipPath.split("\\").join(sep) + sep));
30134
30134
  }
30135
30135
  function filenameFilter(filterfn) {
30136
30136
  if (filterfn instanceof RegExp) {
@@ -41519,7 +41519,7 @@ var require_path_reservations = __commonJS((exports, module) => {
41519
41519
  var assert = __require("assert");
41520
41520
  var normalize = require_normalize_unicode();
41521
41521
  var stripSlashes = require_strip_trailing_slashes();
41522
- var { join } = __require("path");
41522
+ var { join: join2 } = __require("path");
41523
41523
  var platform = process.env.TESTING_TAR_FAKE_PLATFORM || process.platform;
41524
41524
  var isWindows = platform === "win32";
41525
41525
  module.exports = () => {
@@ -41528,7 +41528,7 @@ var require_path_reservations = __commonJS((exports, module) => {
41528
41528
  const getDirs = (path4) => {
41529
41529
  const dirs = path4.split("/").slice(0, -1).reduce((set2, path5) => {
41530
41530
  if (set2.length) {
41531
- path5 = join(set2[set2.length - 1], path5);
41531
+ path5 = join2(set2[set2.length - 1], path5);
41532
41532
  }
41533
41533
  set2.push(path5 || "/");
41534
41534
  return set2;
@@ -41596,7 +41596,7 @@ var require_path_reservations = __commonJS((exports, module) => {
41596
41596
  };
41597
41597
  const reserve = (paths, fn) => {
41598
41598
  paths = isWindows ? ["win32 parallelization disabled"] : paths.map((p) => {
41599
- return stripSlashes(join(normalize(p))).toLowerCase();
41599
+ return stripSlashes(join2(normalize(p))).toLowerCase();
41600
41600
  });
41601
41601
  const dirs = new Set(paths.map((path4) => getDirs(path4)).reduce((a, b) => a.concat(b)));
41602
41602
  reservations.set(fn, { dirs, paths });
@@ -41643,7 +41643,7 @@ var require_unpack = __commonJS((exports, module) => {
41643
41643
  var fs2 = __require("fs");
41644
41644
  var fsm = require_fs_minipass();
41645
41645
  var path4 = __require("path");
41646
- var mkdir = require_mkdir();
41646
+ var mkdir2 = require_mkdir();
41647
41647
  var wc = require_winchars();
41648
41648
  var pathReservations = require_path_reservations();
41649
41649
  var stripAbsolutePath = require_strip_absolute_path();
@@ -41889,7 +41889,7 @@ var require_unpack = __commonJS((exports, module) => {
41889
41889
  }
41890
41890
  }
41891
41891
  [MKDIR](dir, mode, cb) {
41892
- mkdir(normPath(dir), {
41892
+ mkdir2(normPath(dir), {
41893
41893
  uid: this.uid,
41894
41894
  gid: this.gid,
41895
41895
  processUid: this.processUid,
@@ -42280,7 +42280,7 @@ var require_unpack = __commonJS((exports, module) => {
42280
42280
  }
42281
42281
  [MKDIR](dir, mode) {
42282
42282
  try {
42283
- return mkdir.sync(normPath(dir), {
42283
+ return mkdir2.sync(normPath(dir), {
42284
42284
  uid: this.uid,
42285
42285
  gid: this.gid,
42286
42286
  processUid: this.processUid,
@@ -45980,7 +45980,7 @@ var require_typescript = __commonJS((exports, module) => {
45980
45980
  walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,
45981
45981
  whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,
45982
45982
  writeCommentRange: () => writeCommentRange,
45983
- writeFile: () => writeFile,
45983
+ writeFile: () => writeFile2,
45984
45984
  writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
45985
45985
  zipWith: () => zipWith
45986
45986
  });
@@ -51770,8 +51770,8 @@ ${lanes.join(`
51770
51770
  writeOutputIsTTY() {
51771
51771
  return process.stdout.isTTY;
51772
51772
  },
51773
- readFile,
51774
- writeFile: writeFile2,
51773
+ readFile: readFile2,
51774
+ writeFile: writeFile22,
51775
51775
  watchFile: watchFile2,
51776
51776
  watchDirectory,
51777
51777
  preferNonRecursiveWatch: !fsSupportsRecursiveFsWatch,
@@ -51963,7 +51963,7 @@ ${lanes.join(`
51963
51963
  function fsWatchWorker(fileOrDirectory, recursive, callback) {
51964
51964
  return _fs.watch(fileOrDirectory, fsSupportsRecursiveFsWatch ? { persistent: true, recursive: !!recursive } : { persistent: true }, callback);
51965
51965
  }
51966
- function readFile(fileName, _encoding) {
51966
+ function readFile2(fileName, _encoding) {
51967
51967
  let buffer;
51968
51968
  try {
51969
51969
  buffer = _fs.readFileSync(fileName);
@@ -51988,7 +51988,7 @@ ${lanes.join(`
51988
51988
  }
51989
51989
  return buffer.toString("utf8");
51990
51990
  }
51991
- function writeFile2(fileName, data, writeByteOrderMark) {
51991
+ function writeFile22(fileName, data, writeByteOrderMark) {
51992
51992
  if (writeByteOrderMark) {
51993
51993
  data = byteOrderMarkIndicator + data;
51994
51994
  }
@@ -63259,7 +63259,7 @@ ${lanes.join(`
63259
63259
  sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath;
63260
63260
  return combinePaths(newDirPath, sourceFilePath);
63261
63261
  }
63262
- function writeFile(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {
63262
+ function writeFile2(host, diagnostics, fileName, text, writeByteOrderMark, sourceFiles, data) {
63263
63263
  host.writeFile(fileName, text, writeByteOrderMark, (hostErrorMessage) => {
63264
63264
  diagnostics.add(createCompilerDiagnostic(Diagnostics.Could_not_write_file_0_Colon_1, fileName, hostErrorMessage));
63265
63265
  }, sourceFiles, data);
@@ -63271,12 +63271,12 @@ ${lanes.join(`
63271
63271
  createDirectory(directoryPath);
63272
63272
  }
63273
63273
  }
63274
- function writeFileEnsuringDirectories(path5, data, writeByteOrderMark, writeFile2, createDirectory, directoryExists) {
63274
+ function writeFileEnsuringDirectories(path5, data, writeByteOrderMark, writeFile22, createDirectory, directoryExists) {
63275
63275
  try {
63276
- writeFile2(path5, data, writeByteOrderMark);
63276
+ writeFile22(path5, data, writeByteOrderMark);
63277
63277
  } catch {
63278
63278
  ensureDirectoriesExist(getDirectoryPath(normalizePath(path5)), createDirectory, directoryExists);
63279
- writeFile2(path5, data, writeByteOrderMark);
63279
+ writeFile22(path5, data, writeByteOrderMark);
63280
63280
  }
63281
63281
  }
63282
63282
  function getLineOfLocalPosition(sourceFile, pos) {
@@ -82764,7 +82764,7 @@ ${lanes.join(`
82764
82764
  const possibleOption = getSpellingSuggestion(unknownOption, diagnostics.optionDeclarations, getOptionName);
82765
82765
  return possibleOption ? createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownDidYouMeanDiagnostic, unknownOptionErrorText || unknownOption, possibleOption.name) : createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(sourceFile, node, diagnostics.unknownOptionDiagnostic, unknownOptionErrorText || unknownOption);
82766
82766
  }
82767
- function parseCommandLineWorker(diagnostics, commandLine, readFile) {
82767
+ function parseCommandLineWorker(diagnostics, commandLine, readFile2) {
82768
82768
  const options = {};
82769
82769
  let watchOptions;
82770
82770
  const fileNames = [];
@@ -82802,7 +82802,7 @@ ${lanes.join(`
82802
82802
  }
82803
82803
  }
82804
82804
  function parseResponseFile(fileName) {
82805
- const text = tryReadFile(fileName, readFile || ((fileName2) => sys.readFile(fileName2)));
82805
+ const text = tryReadFile(fileName, readFile2 || ((fileName2) => sys.readFile(fileName2)));
82806
82806
  if (!isString(text)) {
82807
82807
  errors2.push(text);
82808
82808
  return;
@@ -82905,8 +82905,8 @@ ${lanes.join(`
82905
82905
  unknownDidYouMeanDiagnostic: Diagnostics.Unknown_compiler_option_0_Did_you_mean_1,
82906
82906
  optionTypeMismatchDiagnostic: Diagnostics.Compiler_option_0_expects_an_argument
82907
82907
  };
82908
- function parseCommandLine(commandLine, readFile) {
82909
- return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile);
82908
+ function parseCommandLine(commandLine, readFile2) {
82909
+ return parseCommandLineWorker(compilerOptionsDidYouMeanDiagnostics, commandLine, readFile2);
82910
82910
  }
82911
82911
  function getOptionFromName(optionName, allowShort) {
82912
82912
  return getOptionDeclarationFromName(getOptionsNameMap, optionName, allowShort);
@@ -82974,8 +82974,8 @@ ${lanes.join(`
82974
82974
  result.originalFileName = result.fileName;
82975
82975
  return parseJsonSourceFileConfigFileContent(result, host, getNormalizedAbsolutePath(getDirectoryPath(configFileName), cwd), optionsToExtend, getNormalizedAbsolutePath(configFileName, cwd), undefined, extraFileExtensions, extendedConfigCache, watchOptionsToExtend);
82976
82976
  }
82977
- function readConfigFile(fileName, readFile) {
82978
- const textOrDiagnostic = tryReadFile(fileName, readFile);
82977
+ function readConfigFile(fileName, readFile2) {
82978
+ const textOrDiagnostic = tryReadFile(fileName, readFile2);
82979
82979
  return isString(textOrDiagnostic) ? parseConfigFileTextToJson(fileName, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };
82980
82980
  }
82981
82981
  function parseConfigFileTextToJson(fileName, jsonText) {
@@ -82985,14 +82985,14 @@ ${lanes.join(`
82985
82985
  error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : undefined
82986
82986
  };
82987
82987
  }
82988
- function readJsonConfigFile(fileName, readFile) {
82989
- const textOrDiagnostic = tryReadFile(fileName, readFile);
82988
+ function readJsonConfigFile(fileName, readFile2) {
82989
+ const textOrDiagnostic = tryReadFile(fileName, readFile2);
82990
82990
  return isString(textOrDiagnostic) ? parseJsonText(fileName, textOrDiagnostic) : { fileName, parseDiagnostics: [textOrDiagnostic] };
82991
82991
  }
82992
- function tryReadFile(fileName, readFile) {
82992
+ function tryReadFile(fileName, readFile2) {
82993
82993
  let text;
82994
82994
  try {
82995
- text = readFile(fileName);
82995
+ text = readFile2(fileName);
82996
82996
  } catch (e2) {
82997
82997
  return createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e2.message);
82998
82998
  }
@@ -145203,7 +145203,7 @@ ${lanes.join(`
145203
145203
  return;
145204
145204
  }
145205
145205
  const buildInfo = host.getBuildInfo() || { version };
145206
- writeFile(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo });
145206
+ writeFile2(host, emitterDiagnostics, buildInfoPath, getBuildInfoText(buildInfo), false, undefined, { buildInfo });
145207
145207
  emittedFilesList == null || emittedFilesList.push(buildInfoPath);
145208
145208
  }
145209
145209
  function emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath) {
@@ -145362,14 +145362,14 @@ ${lanes.join(`
145362
145362
  }
145363
145363
  if (sourceMapFilePath) {
145364
145364
  const sourceMap = sourceMapGenerator.toString();
145365
- writeFile(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
145365
+ writeFile2(host, emitterDiagnostics, sourceMapFilePath, sourceMap, false, sourceFiles);
145366
145366
  }
145367
145367
  } else {
145368
145368
  writer.writeLine();
145369
145369
  }
145370
145370
  const text = writer.getText();
145371
145371
  const data = { sourceMapUrlPos, diagnostics: transform2.diagnostics };
145372
- writeFile(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data);
145372
+ writeFile2(host, emitterDiagnostics, jsFilePath, text, !!compilerOptions.emitBOM, sourceFiles, data);
145373
145373
  writer.clear();
145374
145374
  return !data.skippedDtsWrite;
145375
145375
  }
@@ -145536,7 +145536,7 @@ ${lanes.join(`
145536
145536
  printBundle,
145537
145537
  writeNode,
145538
145538
  writeList,
145539
- writeFile: writeFile2,
145539
+ writeFile: writeFile22,
145540
145540
  writeBundle
145541
145541
  };
145542
145542
  function printNode(hint, node, sourceFile) {
@@ -145569,7 +145569,7 @@ ${lanes.join(`
145569
145569
  return endPrint();
145570
145570
  }
145571
145571
  function printFile(sourceFile) {
145572
- writeFile2(sourceFile, beginPrint(), undefined);
145572
+ writeFile22(sourceFile, beginPrint(), undefined);
145573
145573
  return endPrint();
145574
145574
  }
145575
145575
  function writeNode(hint, node, sourceFile, output) {
@@ -145603,7 +145603,7 @@ ${lanes.join(`
145603
145603
  reset2();
145604
145604
  writer = previousWriter;
145605
145605
  }
145606
- function writeFile2(sourceFile, output, sourceMapGenerator2) {
145606
+ function writeFile22(sourceFile, output, sourceMapGenerator2) {
145607
145607
  isOwnFileEmit = true;
145608
145608
  const previousWriter = writer;
145609
145609
  setWriter(output, sourceMapGenerator2);
@@ -149408,7 +149408,7 @@ ${lanes.join(`
149408
149408
  getDirectories,
149409
149409
  readDirectory,
149410
149410
  createDirectory: host.createDirectory && createDirectory,
149411
- writeFile: host.writeFile && writeFile2,
149411
+ writeFile: host.writeFile && writeFile22,
149412
149412
  addOrDeleteFileOrDirectory,
149413
149413
  addOrDeleteFile,
149414
149414
  clearCache,
@@ -149467,7 +149467,7 @@ ${lanes.join(`
149467
149467
  const index = binarySearch(entries, name, identity2, compareStringsCaseSensitive);
149468
149468
  return index >= 0;
149469
149469
  }
149470
- function writeFile2(fileName, data, writeByteOrderMark) {
149470
+ function writeFile22(fileName, data, writeByteOrderMark) {
149471
149471
  const path5 = toPath3(fileName);
149472
149472
  const result = getCachedFileSystemEntriesForBaseDir(path5);
149473
149473
  if (result) {
@@ -149890,12 +149890,12 @@ ${lanes.join(`
149890
149890
  function createCompilerHost(options, setParentNodes) {
149891
149891
  return createCompilerHostWorker(options, setParentNodes);
149892
149892
  }
149893
- function createGetSourceFile(readFile, setParentNodes) {
149893
+ function createGetSourceFile(readFile2, setParentNodes) {
149894
149894
  return (fileName, languageVersionOrOptions, onError) => {
149895
149895
  let text;
149896
149896
  try {
149897
149897
  mark("beforeIORead");
149898
- text = readFile(fileName);
149898
+ text = readFile2(fileName);
149899
149899
  mark("afterIORead");
149900
149900
  measure("I/O Read", "beforeIORead", "afterIORead");
149901
149901
  } catch (e2) {
@@ -150686,7 +150686,7 @@ ${lanes.join(`
150686
150686
  getSourceOfProjectReferenceRedirect,
150687
150687
  forEachResolvedProjectReference: forEachResolvedProjectReference2
150688
150688
  });
150689
- const readFile = host.readFile.bind(host);
150689
+ const readFile2 = host.readFile.bind(host);
150690
150690
  (_e = tracing) == null || _e.push(tracing.Phase.Program, "shouldProgramCreateNewSourceFiles", { hasOldProgram: !!oldProgram });
150691
150691
  const shouldCreateNewSourceFile = shouldProgramCreateNewSourceFiles(oldProgram, options);
150692
150692
  (_f = tracing) == null || _f.pop();
@@ -150863,7 +150863,7 @@ ${lanes.join(`
150863
150863
  shouldTransformImportCall,
150864
150864
  emitBuildInfo,
150865
150865
  fileExists,
150866
- readFile,
150866
+ readFile: readFile2,
150867
150867
  directoryExists,
150868
150868
  getSymlinkCache,
150869
150869
  realpath: (_o = host.realpath) == null ? undefined : _o.bind(host),
@@ -150871,7 +150871,7 @@ ${lanes.join(`
150871
150871
  getCanonicalFileName,
150872
150872
  getFileIncludeReasons: () => programDiagnostics.getFileReasons(),
150873
150873
  structureIsReused,
150874
- writeFile: writeFile2,
150874
+ writeFile: writeFile22,
150875
150875
  getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation)
150876
150876
  };
150877
150877
  onProgramCreateComplete();
@@ -151321,7 +151321,7 @@ ${lanes.join(`
151321
151321
  getProjectReferenceRedirect,
151322
151322
  isSourceOfProjectReferenceRedirect,
151323
151323
  getSymlinkCache,
151324
- writeFile: writeFileCallback || writeFile2,
151324
+ writeFile: writeFileCallback || writeFile22,
151325
151325
  isEmitBlocked,
151326
151326
  shouldTransformImportCall,
151327
151327
  getEmitModuleFormatOfFile: getEmitModuleFormatOfFile2,
@@ -151351,7 +151351,7 @@ ${lanes.join(`
151351
151351
  getGlobalTypingsCacheLocation: program.getGlobalTypingsCacheLocation
151352
151352
  };
151353
151353
  }
151354
- function writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
151354
+ function writeFile22(fileName, text, writeByteOrderMark, onError, sourceFiles, data) {
151355
151355
  host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
151356
151356
  }
151357
151357
  function emitBuildInfo(writeFileCallback) {
@@ -153061,10 +153061,10 @@ ${lanes.join(`
153061
153061
  }
153062
153062
  }
153063
153063
  var emitSkippedWithNoDiagnostics = { diagnostics: emptyArray, sourceMaps: undefined, emittedFiles: undefined, emitSkipped: true };
153064
- function handleNoEmitOptions(program, sourceFile, writeFile2, cancellationToken) {
153064
+ function handleNoEmitOptions(program, sourceFile, writeFile22, cancellationToken) {
153065
153065
  const options = program.getCompilerOptions();
153066
153066
  if (options.noEmit) {
153067
- return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile2, cancellationToken);
153067
+ return sourceFile ? emitSkippedWithNoDiagnostics : program.emitBuildInfo(writeFile22, cancellationToken);
153068
153068
  }
153069
153069
  if (!options.noEmitOnError)
153070
153070
  return;
@@ -153081,7 +153081,7 @@ ${lanes.join(`
153081
153081
  return;
153082
153082
  let emittedFiles;
153083
153083
  if (!sourceFile) {
153084
- const emitResult = program.emitBuildInfo(writeFile2, cancellationToken);
153084
+ const emitResult = program.emitBuildInfo(writeFile22, cancellationToken);
153085
153085
  if (emitResult.diagnostics)
153086
153086
  diagnostics = [...diagnostics, ...emitResult.diagnostics];
153087
153087
  emittedFiles = emitResult.emittedFiles;
@@ -153419,9 +153419,9 @@ ${lanes.join(`
153419
153419
  }
153420
153420
  function getFileEmitOutput(program, sourceFile, emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit) {
153421
153421
  const outputFiles = [];
153422
- const { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit);
153422
+ const { emitSkipped, diagnostics } = program.emit(sourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit);
153423
153423
  return { outputFiles, emitSkipped, diagnostics };
153424
- function writeFile2(fileName, text, writeByteOrderMark) {
153424
+ function writeFile22(fileName, text, writeByteOrderMark) {
153425
153425
  outputFiles.push({ name: fileName, writeByteOrderMark, text });
153426
153426
  }
153427
153427
  }
@@ -154617,16 +154617,16 @@ ${lanes.join(`
154617
154617
  notImplemented();
154618
154618
  }
154619
154619
  return builderProgram;
154620
- function emitBuildInfo(writeFile2, cancellationToken) {
154620
+ function emitBuildInfo(writeFile22, cancellationToken) {
154621
154621
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154622
154622
  if (getBuildInfoEmitPending(state)) {
154623
- const result = state.program.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken);
154623
+ const result = state.program.emitBuildInfo(writeFile22 || maybeBind(host, host.writeFile), cancellationToken);
154624
154624
  state.buildInfoEmitPending = false;
154625
154625
  return result;
154626
154626
  }
154627
154627
  return emitSkippedWithNoDiagnostics;
154628
154628
  }
154629
- function emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) {
154629
+ function emitNextAffectedFileOrDtsErrors(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers, isForDtsErrors) {
154630
154630
  var _a, _b, _c, _d;
154631
154631
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154632
154632
  let affected = getNextAffectedFile(state, cancellationToken, host);
@@ -154670,7 +154670,7 @@ ${lanes.join(`
154670
154670
  if (isForDtsErrors || !getBuildInfoEmitPending(state))
154671
154671
  return;
154672
154672
  const affected2 = state.program;
154673
- const result2 = affected2.emitBuildInfo(writeFile2 || maybeBind(host, host.writeFile), cancellationToken);
154673
+ const result2 = affected2.emitBuildInfo(writeFile22 || maybeBind(host, host.writeFile), cancellationToken);
154674
154674
  state.buildInfoEmitPending = false;
154675
154675
  return { result: result2, affected: affected2 };
154676
154676
  }
@@ -154680,7 +154680,7 @@ ${lanes.join(`
154680
154680
  emitOnly = 0;
154681
154681
  if (emitKind & 56)
154682
154682
  emitOnly = emitOnly === undefined ? 1 : undefined;
154683
- const result = !isForDtsErrors ? state.program.emit(affected === state.program ? undefined : affected, getWriteFileCallback(writeFile2, customTransformers), cancellationToken, emitOnly, customTransformers, undefined, true) : {
154683
+ const result = !isForDtsErrors ? state.program.emit(affected === state.program ? undefined : affected, getWriteFileCallback(writeFile22, customTransformers), cancellationToken, emitOnly, customTransformers, undefined, true) : {
154684
154684
  emitSkipped: true,
154685
154685
  diagnostics: state.program.getDeclarationDiagnostics(affected === state.program ? undefined : affected, cancellationToken)
154686
154686
  };
@@ -154722,13 +154722,13 @@ ${lanes.join(`
154722
154722
  if (emitDiagnosticsPerFile)
154723
154723
  state.emitDiagnosticsPerFile = emitDiagnosticsPerFile;
154724
154724
  }
154725
- function emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154726
- return emitNextAffectedFileOrDtsErrors(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers, false);
154725
+ function emitNextAffectedFile(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154726
+ return emitNextAffectedFileOrDtsErrors(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers, false);
154727
154727
  }
154728
- function getWriteFileCallback(writeFile2, customTransformers) {
154728
+ function getWriteFileCallback(writeFile22, customTransformers) {
154729
154729
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154730
154730
  if (!getEmitDeclarations(state.compilerOptions))
154731
- return writeFile2 || maybeBind(host, host.writeFile);
154731
+ return writeFile22 || maybeBind(host, host.writeFile);
154732
154732
  return (fileName, text, writeByteOrderMark, onError, sourceFiles, data) => {
154733
154733
  var _a, _b, _c;
154734
154734
  if (isDeclarationFileName(fileName)) {
@@ -154770,8 +154770,8 @@ ${lanes.join(`
154770
154770
  state.outSignature = newSignature;
154771
154771
  }
154772
154772
  }
154773
- if (writeFile2)
154774
- writeFile2(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
154773
+ if (writeFile22)
154774
+ writeFile22(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
154775
154775
  else if (host.writeFile)
154776
154776
  host.writeFile(fileName, text, writeByteOrderMark, onError, sourceFiles, data);
154777
154777
  else
@@ -154794,12 +154794,12 @@ ${lanes.join(`
154794
154794
  }
154795
154795
  };
154796
154796
  }
154797
- function emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154797
+ function emit(targetSourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
154798
154798
  Debug.assert(isBuilderProgramStateWithDefinedProgram(state));
154799
154799
  if (kind === 1) {
154800
154800
  assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile);
154801
154801
  }
154802
- const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile2, cancellationToken);
154802
+ const result = handleNoEmitOptions(builderProgram, targetSourceFile, writeFile22, cancellationToken);
154803
154803
  if (result)
154804
154804
  return result;
154805
154805
  if (!targetSourceFile) {
@@ -154809,7 +154809,7 @@ ${lanes.join(`
154809
154809
  let diagnostics;
154810
154810
  let emittedFiles = [];
154811
154811
  let affectedEmitResult;
154812
- while (affectedEmitResult = emitNextAffectedFile(writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers)) {
154812
+ while (affectedEmitResult = emitNextAffectedFile(writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers)) {
154813
154813
  emitSkipped = emitSkipped || affectedEmitResult.result.emitSkipped;
154814
154814
  diagnostics = addRange(diagnostics, affectedEmitResult.result.diagnostics);
154815
154815
  emittedFiles = addRange(emittedFiles, affectedEmitResult.result.emittedFiles);
@@ -154825,7 +154825,7 @@ ${lanes.join(`
154825
154825
  clearAffectedFilesPendingEmit(state, emitOnlyDtsFiles, false);
154826
154826
  }
154827
154827
  }
154828
- const emitResult = state.program.emit(targetSourceFile, getWriteFileCallback(writeFile2, customTransformers), cancellationToken, emitOnlyDtsFiles, customTransformers);
154828
+ const emitResult = state.program.emit(targetSourceFile, getWriteFileCallback(writeFile22, customTransformers), cancellationToken, emitOnlyDtsFiles, customTransformers);
154829
154829
  handleNonEmitBuilderWithEmitOrDtsErrors(targetSourceFile, emitOnlyDtsFiles, false, emitResult.diagnostics);
154830
154830
  return emitResult;
154831
154831
  }
@@ -155104,8 +155104,8 @@ ${lanes.join(`
155104
155104
  getSyntacticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSyntacticDiagnostics(sourceFile, cancellationToken),
155105
155105
  getDeclarationDiagnostics: (sourceFile, cancellationToken) => getProgram().getDeclarationDiagnostics(sourceFile, cancellationToken),
155106
155106
  getSemanticDiagnostics: (sourceFile, cancellationToken) => getProgram().getSemanticDiagnostics(sourceFile, cancellationToken),
155107
- emit: (sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers) => getProgram().emit(sourceFile, writeFile2, cancellationToken, emitOnlyDts, customTransformers),
155108
- emitBuildInfo: (writeFile2, cancellationToken) => getProgram().emitBuildInfo(writeFile2, cancellationToken),
155107
+ emit: (sourceFile, writeFile22, cancellationToken, emitOnlyDts, customTransformers) => getProgram().emit(sourceFile, writeFile22, cancellationToken, emitOnlyDts, customTransformers),
155108
+ emitBuildInfo: (writeFile22, cancellationToken) => getProgram().emitBuildInfo(writeFile22, cancellationToken),
155109
155109
  getAllDependencies: notImplemented,
155110
155110
  getCurrentDirectory: () => getProgram().getCurrentDirectory(),
155111
155111
  close: noop3
@@ -156365,7 +156365,7 @@ ${lanes.join(`
156365
156365
  const fileName = isString(file) ? file : file.fileName;
156366
156366
  return fileNameConvertor ? fileNameConvertor(fileName) : fileName;
156367
156367
  }
156368
- function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156368
+ function emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156369
156369
  const options = program.getCompilerOptions();
156370
156370
  const allDiagnostics = program.getConfigFileParsingDiagnostics().slice();
156371
156371
  const configFileParsingDiagnosticsLength = allDiagnostics.length;
@@ -156382,7 +156382,7 @@ ${lanes.join(`
156382
156382
  }
156383
156383
  }
156384
156384
  }
156385
- const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(undefined, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers);
156385
+ const emitResult = options.listFilesOnly ? { emitSkipped: true, diagnostics: emptyArray } : program.emit(undefined, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers);
156386
156386
  addRange(allDiagnostics, emitResult.diagnostics);
156387
156387
  const diagnostics = sortAndDeduplicateDiagnostics(allDiagnostics);
156388
156388
  diagnostics.forEach(reportDiagnostic);
@@ -156402,8 +156402,8 @@ ${lanes.join(`
156402
156402
  diagnostics
156403
156403
  };
156404
156404
  }
156405
- function emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156406
- const { emitResult, diagnostics } = emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers);
156405
+ function emitFilesAndReportErrorsAndGetExitStatus(program, reportDiagnostic, write, reportSummary, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) {
156406
+ const { emitResult, diagnostics } = emitFilesAndReportErrors(program, reportDiagnostic, write, reportSummary, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers);
156407
156407
  if (emitResult.emitSkipped && diagnostics.length > 0) {
156408
156408
  return 1;
156409
156409
  } else if (diagnostics.length > 0) {
@@ -157678,20 +157678,20 @@ ${lanes.join(`
157678
157678
  getAllDependencies: (sourceFile) => withProgramOrEmptyArray((program2) => program2.getAllDependencies(sourceFile)),
157679
157679
  getSemanticDiagnostics: (sourceFile, cancellationToken) => withProgramOrEmptyArray((program2) => program2.getSemanticDiagnostics(sourceFile, cancellationToken)),
157680
157680
  getSemanticDiagnosticsOfNextAffectedFile: (cancellationToken, ignoreSourceFile) => withProgramOrUndefined((program2) => program2.getSemanticDiagnosticsOfNextAffectedFile && program2.getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile)),
157681
- emit: (targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers) => {
157681
+ emit: (targetSourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers) => {
157682
157682
  if (targetSourceFile || emitOnlyDtsFiles) {
157683
157683
  return withProgramOrUndefined((program2) => {
157684
157684
  var _a, _b;
157685
- return program2.emit(targetSourceFile, writeFile2, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? undefined : _b.call(_a, project)));
157685
+ return program2.emit(targetSourceFile, writeFile22, cancellationToken, emitOnlyDtsFiles, customTransformers || ((_b = (_a = state.host).getCustomTransformers) == null ? undefined : _b.call(_a, project)));
157686
157686
  });
157687
157687
  }
157688
157688
  executeSteps(0, cancellationToken);
157689
- return emit(writeFile2, cancellationToken, customTransformers);
157689
+ return emit(writeFile22, cancellationToken, customTransformers);
157690
157690
  },
157691
157691
  done
157692
157692
  };
157693
- function done(cancellationToken, writeFile2, customTransformers) {
157694
- executeSteps(3, cancellationToken, writeFile2, customTransformers);
157693
+ function done(cancellationToken, writeFile22, customTransformers) {
157694
+ executeSteps(3, cancellationToken, writeFile22, customTransformers);
157695
157695
  mark("SolutionBuilder::Projects built");
157696
157696
  return doneInvalidatedProject(state, projectPath);
157697
157697
  }
@@ -157791,7 +157791,7 @@ ${lanes.join(`
157791
157791
  step = 2;
157792
157792
  return emitResult;
157793
157793
  }
157794
- function executeSteps(till, cancellationToken, writeFile2, customTransformers) {
157794
+ function executeSteps(till, cancellationToken, writeFile22, customTransformers) {
157795
157795
  while (step <= till && step < 3) {
157796
157796
  const currentStep = step;
157797
157797
  switch (step) {
@@ -157799,7 +157799,7 @@ ${lanes.join(`
157799
157799
  createProgram2();
157800
157800
  break;
157801
157801
  case 1:
157802
- emit(writeFile2, cancellationToken, customTransformers);
157802
+ emit(writeFile22, cancellationToken, customTransformers);
157803
157803
  break;
157804
157804
  case 2:
157805
157805
  queueReferencingProjects(state, project, projectPath, projectIndex, config, buildOrder, Debug.checkDefined(buildResult));
@@ -158354,14 +158354,14 @@ ${lanes.join(`
158354
158354
  }
158355
158355
  }
158356
158356
  }
158357
- function build(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) {
158357
+ function build(state, project, cancellationToken, writeFile22, getCustomTransformers, onlyReferences) {
158358
158358
  mark("SolutionBuilder::beforeBuild");
158359
- const result = buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences);
158359
+ const result = buildWorker(state, project, cancellationToken, writeFile22, getCustomTransformers, onlyReferences);
158360
158360
  mark("SolutionBuilder::afterBuild");
158361
158361
  measure("SolutionBuilder::Build", "SolutionBuilder::beforeBuild", "SolutionBuilder::afterBuild");
158362
158362
  return result;
158363
158363
  }
158364
- function buildWorker(state, project, cancellationToken, writeFile2, getCustomTransformers, onlyReferences) {
158364
+ function buildWorker(state, project, cancellationToken, writeFile22, getCustomTransformers, onlyReferences) {
158365
158365
  const buildOrder = getBuildOrderFor(state, project, onlyReferences);
158366
158366
  if (!buildOrder)
158367
158367
  return 3;
@@ -158373,7 +158373,7 @@ ${lanes.join(`
158373
158373
  if (!invalidatedProject)
158374
158374
  break;
158375
158375
  reportQueue = false;
158376
- invalidatedProject.done(cancellationToken, writeFile2, getCustomTransformers == null ? undefined : getCustomTransformers(invalidatedProject.project));
158376
+ invalidatedProject.done(cancellationToken, writeFile22, getCustomTransformers == null ? undefined : getCustomTransformers(invalidatedProject.project));
158377
158377
  if (!state.diagnostics.has(invalidatedProject.projectPath))
158378
158378
  successfulProjects++;
158379
158379
  }
@@ -158574,9 +158574,9 @@ ${lanes.join(`
158574
158574
  function createSolutionBuilderWorker(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions) {
158575
158575
  const state = createSolutionBuilderState(watch, hostOrHostWithWatch, rootNames, options, baseWatchOptions);
158576
158576
  return {
158577
- build: (project, cancellationToken, writeFile2, getCustomTransformers) => build(state, project, cancellationToken, writeFile2, getCustomTransformers),
158577
+ build: (project, cancellationToken, writeFile22, getCustomTransformers) => build(state, project, cancellationToken, writeFile22, getCustomTransformers),
158578
158578
  clean: (project) => clean(state, project),
158579
- buildReferences: (project, cancellationToken, writeFile2, getCustomTransformers) => build(state, project, cancellationToken, writeFile2, getCustomTransformers, true),
158579
+ buildReferences: (project, cancellationToken, writeFile22, getCustomTransformers) => build(state, project, cancellationToken, writeFile22, getCustomTransformers, true),
158580
158580
  cleanReferences: (project) => clean(state, project, true),
158581
158581
  getNextInvalidatedProject: (cancellationToken) => {
158582
158582
  setupInitialBuild(state, cancellationToken);
@@ -201243,7 +201243,7 @@ ${options.prefix}` : `
201243
201243
  walkUpParenthesizedTypesAndGetParentAndChild: () => walkUpParenthesizedTypesAndGetParentAndChild,
201244
201244
  whitespaceOrMapCommentRegExp: () => whitespaceOrMapCommentRegExp,
201245
201245
  writeCommentRange: () => writeCommentRange,
201246
- writeFile: () => writeFile,
201246
+ writeFile: () => writeFile2,
201247
201247
  writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
201248
201248
  zipWith: () => zipWith
201249
201249
  });
@@ -203071,7 +203071,7 @@ ${options.prefix}` : `
203071
203071
  this.builderState = BuilderState.create(this.program, this.builderState, true);
203072
203072
  return mapDefined(BuilderState.getFilesAffectedBy(this.builderState, this.program, scriptInfo.path, this.cancellationToken, this.projectService.host), (sourceFile) => this.shouldEmitFile(this.projectService.getScriptInfoForPath(sourceFile.path)) ? sourceFile.fileName : undefined);
203073
203073
  }
203074
- emitFile(scriptInfo, writeFile2) {
203074
+ emitFile(scriptInfo, writeFile22) {
203075
203075
  if (!this.languageServiceEnabled || !this.shouldEmitFile(scriptInfo)) {
203076
203076
  return { emitSkipped: true, diagnostics: emptyArray2 };
203077
203077
  }
@@ -203079,7 +203079,7 @@ ${options.prefix}` : `
203079
203079
  if (!emitSkipped) {
203080
203080
  for (const outputFile of outputFiles) {
203081
203081
  const outputFileAbsoluteFileName = getNormalizedAbsolutePath(outputFile.name, this.currentDirectory);
203082
- writeFile2(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark);
203082
+ writeFile22(outputFileAbsoluteFileName, outputFile.text, outputFile.writeByteOrderMark);
203083
203083
  }
203084
203084
  if (this.builderState && getEmitDeclarations(this.compilerOptions)) {
203085
203085
  const dtsFiles = outputFiles.filter((f3) => isDeclarationFileName(f3.name));
@@ -225972,12 +225972,91 @@ class StdioServerTransport {
225972
225972
  }
225973
225973
  }
225974
225974
 
225975
+ // ../shared/dist/utils/config.js
225976
+ import { homedir } from "os";
225977
+ import { join } from "path";
225978
+ import { existsSync } from "fs";
225979
+ import { mkdir, readFile, writeFile } from "fs/promises";
225980
+ var CONFIG_DIR = join(homedir(), ".enact");
225981
+ var CONFIG_FILE = join(CONFIG_DIR, "config.json");
225982
+ var TRUSTED_KEYS_DIR = join(CONFIG_DIR, "trusted-keys");
225983
+ async function ensureConfig() {
225984
+ if (!existsSync(CONFIG_DIR)) {
225985
+ await mkdir(CONFIG_DIR, { recursive: true });
225986
+ }
225987
+ if (!existsSync(CONFIG_FILE)) {
225988
+ const defaultConfig = {
225989
+ history: [],
225990
+ urls: {
225991
+ frontend: DEFAULT_FRONTEND_URL,
225992
+ api: DEFAULT_API_URL
225993
+ }
225994
+ };
225995
+ await writeFile(CONFIG_FILE, JSON.stringify(defaultConfig, null, 2));
225996
+ }
225997
+ }
225998
+ async function readConfig() {
225999
+ await ensureConfig();
226000
+ try {
226001
+ const data = await readFile(CONFIG_FILE, "utf8");
226002
+ const config = JSON.parse(data);
226003
+ if (!config.urls) {
226004
+ config.urls = {
226005
+ frontend: DEFAULT_FRONTEND_URL,
226006
+ api: DEFAULT_API_URL
226007
+ };
226008
+ await writeConfig(config);
226009
+ }
226010
+ return config;
226011
+ } catch (error) {
226012
+ console.error("Failed to read config:", error.message);
226013
+ return {
226014
+ history: [],
226015
+ urls: {
226016
+ frontend: DEFAULT_FRONTEND_URL,
226017
+ api: DEFAULT_API_URL
226018
+ }
226019
+ };
226020
+ }
226021
+ }
226022
+ async function writeConfig(config) {
226023
+ await ensureConfig();
226024
+ await writeFile(CONFIG_FILE, JSON.stringify(config, null, 2));
226025
+ }
226026
+ var DEFAULT_FRONTEND_URL = "https://enact.tools";
226027
+ var DEFAULT_API_URL = "https://xjnhhxwxovjifdxdwzih.supabase.co";
226028
+ async function getFrontendUrl() {
226029
+ if (process.env.ENACT_FRONTEND_URL) {
226030
+ return process.env.ENACT_FRONTEND_URL;
226031
+ }
226032
+ const config = await readConfig();
226033
+ if (config.urls?.frontend) {
226034
+ return config.urls.frontend;
226035
+ }
226036
+ return DEFAULT_FRONTEND_URL;
226037
+ }
226038
+ async function getApiUrl() {
226039
+ if (process.env.ENACT_API_URL) {
226040
+ return process.env.ENACT_API_URL;
226041
+ }
226042
+ const config = await readConfig();
226043
+ if (config.urls?.api) {
226044
+ return config.urls.api;
226045
+ }
226046
+ return DEFAULT_API_URL;
226047
+ }
226048
+
225975
226049
  // ../shared/dist/api/enact-api.js
225976
226050
  class EnactApiClient {
225977
- constructor(baseUrl = "https://enact.tools", supabaseUrl = "https://xjnhhxwxovjifdxdwzih.supabase.co") {
226051
+ constructor(baseUrl, supabaseUrl) {
225978
226052
  this.baseUrl = baseUrl.replace(/\/$/, "");
225979
226053
  this.supabaseUrl = supabaseUrl.replace(/\/$/, "");
225980
226054
  }
226055
+ static async create(baseUrl, supabaseUrl) {
226056
+ const frontendUrl = baseUrl || await getFrontendUrl();
226057
+ const apiUrl = supabaseUrl || await getApiUrl();
226058
+ return new EnactApiClient(frontendUrl, apiUrl);
226059
+ }
225981
226060
  async makeRequest(endpoint, options = {}, token, tokenType = "jwt") {
225982
226061
  const url = endpoint.startsWith("http") ? endpoint : `${this.supabaseUrl}${endpoint}`;
225983
226062
  const headers = {
@@ -226259,7 +226338,7 @@ class EnactApiClient {
226259
226338
  };
226260
226339
  }
226261
226340
  }
226262
- var enactApi = new EnactApiClient;
226341
+ var enactApi = new EnactApiClient("https://enact.tools", "https://xjnhhxwxovjifdxdwzih.supabase.co");
226263
226342
 
226264
226343
  class EnactApiError extends Error {
226265
226344
  constructor(message, statusCode, endpoint) {
@@ -227369,11 +227448,11 @@ import * as crypto2 from "crypto";
227369
227448
  import path from "node:path";
227370
227449
  import os from "node:os";
227371
227450
  import process3 from "node:process";
227372
- var homedir = os.homedir();
227451
+ var homedir2 = os.homedir();
227373
227452
  var tmpdir = os.tmpdir();
227374
227453
  var { env } = process3;
227375
227454
  var macos = (name) => {
227376
- const library = path.join(homedir, "Library");
227455
+ const library = path.join(homedir2, "Library");
227377
227456
  return {
227378
227457
  data: path.join(library, "Application Support", name),
227379
227458
  config: path.join(library, "Preferences", name),
@@ -227383,8 +227462,8 @@ var macos = (name) => {
227383
227462
  };
227384
227463
  };
227385
227464
  var windows = (name) => {
227386
- const appData = env.APPDATA || path.join(homedir, "AppData", "Roaming");
227387
- const localAppData = env.LOCALAPPDATA || path.join(homedir, "AppData", "Local");
227465
+ const appData = env.APPDATA || path.join(homedir2, "AppData", "Roaming");
227466
+ const localAppData = env.LOCALAPPDATA || path.join(homedir2, "AppData", "Local");
227388
227467
  return {
227389
227468
  data: path.join(localAppData, name, "Data"),
227390
227469
  config: path.join(appData, name, "Config"),
@@ -227394,12 +227473,12 @@ var windows = (name) => {
227394
227473
  };
227395
227474
  };
227396
227475
  var linux = (name) => {
227397
- const username = path.basename(homedir);
227476
+ const username = path.basename(homedir2);
227398
227477
  return {
227399
- data: path.join(env.XDG_DATA_HOME || path.join(homedir, ".local", "share"), name),
227400
- config: path.join(env.XDG_CONFIG_HOME || path.join(homedir, ".config"), name),
227401
- cache: path.join(env.XDG_CACHE_HOME || path.join(homedir, ".cache"), name),
227402
- log: path.join(env.XDG_STATE_HOME || path.join(homedir, ".local", "state"), name),
227478
+ data: path.join(env.XDG_DATA_HOME || path.join(homedir2, ".local", "share"), name),
227479
+ config: path.join(env.XDG_CONFIG_HOME || path.join(homedir2, ".config"), name),
227480
+ cache: path.join(env.XDG_CACHE_HOME || path.join(homedir2, ".cache"), name),
227481
+ log: path.join(env.XDG_STATE_HOME || path.join(homedir2, ".local", "state"), name),
227403
227482
  temp: path.join(tmpdir, username, name)
227404
227483
  };
227405
227484
  };
@@ -235792,37 +235871,6 @@ class DaggerExecutionProvider extends ExecutionProvider {
235792
235871
  process.exit(1);
235793
235872
  }
235794
235873
  }
235795
- forceCleanup() {
235796
- if (this.isShuttingDown)
235797
- return;
235798
- try {
235799
- logger_default.info("\uD83D\uDD04 Force cleaning up Dagger engines...");
235800
- const result = spawnSync("docker", [
235801
- "ps",
235802
- "--all",
235803
- "--filter",
235804
- "name=dagger-engine",
235805
- "--format",
235806
- "{{.Names}}"
235807
- ], {
235808
- encoding: "utf8",
235809
- timeout: 5000
235810
- });
235811
- if (result.stdout) {
235812
- const names = result.stdout.trim().split(`
235813
- `).filter((n) => n.trim());
235814
- if (names.length > 0) {
235815
- logger_default.info(`Found ${names.length} engine containers, force removing...`);
235816
- for (const name of names) {
235817
- spawnSync("docker", ["rm", "-f", name.trim()], { timeout: 3000 });
235818
- }
235819
- logger_default.info("✅ Force cleanup completed");
235820
- }
235821
- }
235822
- } catch (error) {
235823
- logger_default.debug("Force cleanup failed (this is usually fine):", error);
235824
- }
235825
- }
235826
235874
  getEngineStatus() {
235827
235875
  return {
235828
235876
  health: { ...this.engineHealth },
@@ -235841,11 +235889,11 @@ class DaggerExecutionProvider extends ExecutionProvider {
235841
235889
 
235842
235890
  // ../shared/dist/utils/env-loader.js
235843
235891
  var import_dotenv = __toESM(require_main(), 1);
235844
- import { join as join2 } from "path";
235845
- import { homedir as homedir2 } from "os";
235846
- import { existsSync as existsSync2 } from "fs";
235847
- import { readFile } from "fs/promises";
235848
- var CONFIG_DIR = join2(homedir2(), ".enact");
235892
+ import { join as join3 } from "path";
235893
+ import { homedir as homedir3 } from "os";
235894
+ import { existsSync as existsSync3 } from "fs";
235895
+ import { readFile as readFile2 } from "fs/promises";
235896
+ var CONFIG_DIR2 = join3(homedir3(), ".enact");
235849
235897
  function extractPackageNamespace(toolName) {
235850
235898
  const parts = toolName.split("/");
235851
235899
  if (parts.length < 2) {
@@ -235857,7 +235905,7 @@ function extractPackageNamespace(toolName) {
235857
235905
  return parts[0];
235858
235906
  }
235859
235907
  function getPackageEnvPath(packageNamespace) {
235860
- return join2(CONFIG_DIR, "env", packageNamespace, ".env");
235908
+ return join3(CONFIG_DIR2, "env", packageNamespace, ".env");
235861
235909
  }
235862
235910
  function decryptValue(encryptedValue) {
235863
235911
  try {
@@ -235868,11 +235916,11 @@ function decryptValue(encryptedValue) {
235868
235916
  }
235869
235917
  async function readPackageEnvConfig(packageNamespace) {
235870
235918
  const envFile = getPackageEnvPath(packageNamespace);
235871
- if (!existsSync2(envFile)) {
235919
+ if (!existsSync3(envFile)) {
235872
235920
  return { variables: {} };
235873
235921
  }
235874
235922
  try {
235875
- const data = await readFile(envFile, "utf8");
235923
+ const data = await readFile2(envFile, "utf8");
235876
235924
  if (data.trim().startsWith("{")) {
235877
235925
  return JSON.parse(data);
235878
235926
  } else {
@@ -235901,7 +235949,7 @@ function loadPackageEnvFile(toolName) {
235901
235949
  try {
235902
235950
  const packageNamespace = extractPackageNamespace(toolName);
235903
235951
  const packageEnvPath = getPackageEnvPath(packageNamespace);
235904
- if (!existsSync2(packageEnvPath)) {
235952
+ if (!existsSync3(packageEnvPath)) {
235905
235953
  return {};
235906
235954
  }
235907
235955
  const result = import_dotenv.config({ path: packageEnvPath });
@@ -238729,6 +238777,15 @@ class EnactCore {
238729
238777
  this.apiClient = new EnactApiClient(this.options.apiUrl, this.options.supabaseUrl);
238730
238778
  this.executionProvider = this.createExecutionProvider();
238731
238779
  }
238780
+ static async create(options = {}) {
238781
+ const frontendUrl = options.apiUrl || await getFrontendUrl();
238782
+ const apiUrl = options.supabaseUrl || await getApiUrl();
238783
+ return new EnactCore({
238784
+ ...options,
238785
+ apiUrl: frontendUrl,
238786
+ supabaseUrl: apiUrl
238787
+ });
238788
+ }
238732
238789
  setAuthToken(token) {
238733
238790
  this.options.authToken = token;
238734
238791
  }
@@ -239123,11 +239180,6 @@ class EnactCore {
239123
239180
  return `exec_${Date.now()}_${Math.random().toString(36).substring(2, 9)}`;
239124
239181
  }
239125
239182
  }
239126
- // ../shared/dist/utils/config.js
239127
- import { homedir as homedir3 } from "os";
239128
- import { join as join3 } from "path";
239129
- var CONFIG_DIR2 = join3(homedir3(), ".enact");
239130
- var CONFIG_FILE = join3(CONFIG_DIR2, "config.json");
239131
239183
  // ../shared/dist/utils/help.js
239132
239184
  var __dirname = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/dist/utils";
239133
239185
  // ../shared/dist/utils/logger.js
@@ -239273,8 +239325,8 @@ var __filename = "/Users/keithgroves/projects/enact/enact-cli/packages/shared/di
239273
239325
  // ../shared/dist/web/env-manager-server.js
239274
239326
  import { createServer } from "http";
239275
239327
  import { parse as parse3 } from "url";
239276
- import { readFile as readFile2, writeFile, mkdir, readdir, stat as stat2 } from "fs/promises";
239277
- import { existsSync as existsSync3 } from "fs";
239328
+ import { readFile as readFile3, writeFile as writeFile2, mkdir as mkdir2, readdir, stat as stat2 } from "fs/promises";
239329
+ import { existsSync as existsSync4 } from "fs";
239278
239330
  import { join as join4, dirname as dirname3 } from "path";
239279
239331
  import { homedir as homedir4 } from "os";
239280
239332
  import { fileURLToPath as fileURLToPath4 } from "url";
@@ -239293,7 +239345,7 @@ function findStaticDir() {
239293
239345
  join4(__dirname3, "..", "..", "src", "web", "static")
239294
239346
  ];
239295
239347
  for (const candidate of candidates) {
239296
- if (existsSync3(join4(candidate, "index.html"))) {
239348
+ if (existsSync4(join4(candidate, "index.html"))) {
239297
239349
  logger_default.debug(`Found static directory: ${candidate}`);
239298
239350
  return candidate;
239299
239351
  }
@@ -239337,7 +239389,7 @@ function generateDotEnv(vars) {
239337
239389
  }
239338
239390
  async function getAllPackageNamespaces() {
239339
239391
  const packages = [];
239340
- if (!existsSync3(ENV_BASE_DIR)) {
239392
+ if (!existsSync4(ENV_BASE_DIR)) {
239341
239393
  return packages;
239342
239394
  }
239343
239395
  try {
@@ -239359,7 +239411,7 @@ async function scanDirectory(dir, relativePath, packages) {
239359
239411
  } else if (entry === ".env") {
239360
239412
  const namespace = relativePath || "root";
239361
239413
  try {
239362
- const content = await readFile2(fullPath, "utf8");
239414
+ const content = await readFile3(fullPath, "utf8");
239363
239415
  const variables = parseDotEnv(content);
239364
239416
  packages.push({
239365
239417
  namespace,
@@ -239377,11 +239429,11 @@ async function scanDirectory(dir, relativePath, packages) {
239377
239429
  }
239378
239430
  async function getPackageEnvVars(namespace) {
239379
239431
  const envFile = join4(ENV_BASE_DIR, namespace, ".env");
239380
- if (!existsSync3(envFile)) {
239432
+ if (!existsSync4(envFile)) {
239381
239433
  return {};
239382
239434
  }
239383
239435
  try {
239384
- const content = await readFile2(envFile, "utf8");
239436
+ const content = await readFile3(envFile, "utf8");
239385
239437
  return parseDotEnv(content);
239386
239438
  } catch (error) {
239387
239439
  logger_default.error(`Failed to read env file for ${namespace}:`, error);
@@ -239391,13 +239443,13 @@ async function getPackageEnvVars(namespace) {
239391
239443
  async function setPackageEnvVar(namespace, key, value) {
239392
239444
  const envFile = join4(ENV_BASE_DIR, namespace, ".env");
239393
239445
  const envDir = dirname3(envFile);
239394
- if (!existsSync3(envDir)) {
239395
- await mkdir(envDir, { recursive: true });
239446
+ if (!existsSync4(envDir)) {
239447
+ await mkdir2(envDir, { recursive: true });
239396
239448
  }
239397
239449
  const existingVars = await getPackageEnvVars(namespace);
239398
239450
  existingVars[key] = value;
239399
239451
  const envContent = generateDotEnv(existingVars);
239400
- await writeFile(envFile, envContent, "utf8");
239452
+ await writeFile2(envFile, envContent, "utf8");
239401
239453
  }
239402
239454
  async function deletePackageEnvVar(namespace, key) {
239403
239455
  const existingVars = await getPackageEnvVars(namespace);
@@ -239407,11 +239459,11 @@ async function deletePackageEnvVar(namespace, key) {
239407
239459
  delete existingVars[key];
239408
239460
  const envFile = join4(ENV_BASE_DIR, namespace, ".env");
239409
239461
  const envContent = generateDotEnv(existingVars);
239410
- await writeFile(envFile, envContent, "utf8");
239462
+ await writeFile2(envFile, envContent, "utf8");
239411
239463
  }
239412
239464
  async function serveStaticFile(filePath, res) {
239413
239465
  try {
239414
- const content = await readFile2(filePath, "utf8");
239466
+ const content = await readFile3(filePath, "utf8");
239415
239467
  const ext = filePath.split(".").pop()?.toLowerCase();
239416
239468
  let contentType = "text/plain";
239417
239469
  switch (ext) {
@@ -239473,11 +239525,11 @@ async function handleRequest(req, res) {
239473
239525
  }
239474
239526
  const envDir = join4(ENV_BASE_DIR, namespace);
239475
239527
  const envFile = join4(envDir, ".env");
239476
- if (!existsSync3(envDir)) {
239477
- await mkdir(envDir, { recursive: true });
239528
+ if (!existsSync4(envDir)) {
239529
+ await mkdir2(envDir, { recursive: true });
239478
239530
  }
239479
- if (!existsSync3(envFile)) {
239480
- await writeFile(envFile, "", "utf8");
239531
+ if (!existsSync4(envFile)) {
239532
+ await writeFile2(envFile, "", "utf8");
239481
239533
  }
239482
239534
  res.writeHead(200, { "Content-Type": "application/json" });
239483
239535
  res.end(JSON.stringify({ success: true }));
@@ -239846,6 +239898,15 @@ class McpCoreService {
239846
239898
  authToken: options?.authToken
239847
239899
  });
239848
239900
  }
239901
+ static async create(options) {
239902
+ const frontendUrl = options?.apiUrl || await getFrontendUrl();
239903
+ const apiUrl = options?.supabaseUrl || await getApiUrl();
239904
+ return new McpCoreService({
239905
+ ...options,
239906
+ apiUrl: frontendUrl,
239907
+ supabaseUrl: apiUrl
239908
+ });
239909
+ }
239849
239910
  setAuthToken(token) {
239850
239911
  this.core.setAuthToken(token);
239851
239912
  }
@@ -239911,13 +239972,22 @@ var mcpCoreService = new McpCoreService;
239911
239972
  class EnactDirect {
239912
239973
  constructor(options = {}) {
239913
239974
  this.core = new EnactCore({
239914
- apiUrl: options.apiUrl || process.env.ENACT_API_URL || "https://enact.tools",
239915
- supabaseUrl: options.supabaseUrl || process.env.ENACT_SUPABASE_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
239975
+ apiUrl: options.apiUrl || process.env.ENACT_FRONTEND_URL || "https://enact.tools",
239976
+ supabaseUrl: options.supabaseUrl || process.env.ENACT_API_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
239916
239977
  executionProvider: "direct",
239917
239978
  authToken: options.authToken || process.env.ENACT_AUTH_TOKEN,
239918
239979
  defaultTimeout: options.defaultTimeout || "30s"
239919
239980
  });
239920
239981
  }
239982
+ static async create(options = {}) {
239983
+ const frontendUrl = options.apiUrl || process.env.ENACT_FRONTEND_URL || await getFrontendUrl();
239984
+ const apiUrl = options.supabaseUrl || process.env.ENACT_API_URL || await getApiUrl();
239985
+ return new EnactDirect({
239986
+ ...options,
239987
+ apiUrl: frontendUrl,
239988
+ supabaseUrl: apiUrl
239989
+ });
239990
+ }
239921
239991
  async executeToolByName(name, inputs = {}, options = {}) {
239922
239992
  return this.core.executeToolByName(name, inputs, options);
239923
239993
  }
@@ -239969,8 +240039,8 @@ if (true) {
239969
240039
  }
239970
240040
  }
239971
240041
  var enactCore = new EnactCore({
239972
- apiUrl: process.env.ENACT_API_URL || "https://enact.tools",
239973
- supabaseUrl: process.env.ENACT_SUPABASE_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
240042
+ apiUrl: process.env.ENACT_FRONTEND_URL || "https://enact.tools",
240043
+ supabaseUrl: process.env.ENACT_API_URL || "https://xjnhhxwxovjifdxdwzih.supabase.co",
239974
240044
  executionProvider: process.env.ENACT_EXECUTION_PROVIDER || "dagger",
239975
240045
  authToken: process.env.ENACT_AUTH_TOKEN,
239976
240046
  defaultTimeout: "120s"