@remixhq/claude-plugin 0.1.8 → 0.1.9

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,17 +1,12 @@
1
1
  #!/usr/bin/env node
2
+ "use strict";
2
3
  var __create = Object.create;
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
9
- get: (a2, b) => (typeof require !== "undefined" ? require : a2)[b]
10
- }) : x)(function(x) {
11
- if (typeof require !== "undefined") return require.apply(this, arguments);
12
- throw Error('Dynamic require of "' + x + '" is not supported');
13
- });
14
- var __commonJS = (cb, mod) => function __require2() {
9
+ var __commonJS = (cb, mod) => function __require() {
15
10
  return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
16
11
  };
17
12
  var __export = (target, all) => {
@@ -37,11 +32,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
37
32
 
38
33
  // node_modules/isexe/windows.js
39
34
  var require_windows = __commonJS({
40
- "node_modules/isexe/windows.js"(exports, module) {
35
+ "node_modules/isexe/windows.js"(exports2, module2) {
41
36
  "use strict";
42
- module.exports = isexe;
37
+ module2.exports = isexe;
43
38
  isexe.sync = sync;
44
- var fs8 = __require("fs");
39
+ var fs8 = require("fs");
45
40
  function checkPathExt(path12, options) {
46
41
  var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT;
47
42
  if (!pathext) {
@@ -78,11 +73,11 @@ var require_windows = __commonJS({
78
73
 
79
74
  // node_modules/isexe/mode.js
80
75
  var require_mode = __commonJS({
81
- "node_modules/isexe/mode.js"(exports, module) {
76
+ "node_modules/isexe/mode.js"(exports2, module2) {
82
77
  "use strict";
83
- module.exports = isexe;
78
+ module2.exports = isexe;
84
79
  isexe.sync = sync;
85
- var fs8 = __require("fs");
80
+ var fs8 = require("fs");
86
81
  function isexe(path12, options, cb) {
87
82
  fs8.stat(path12, function(er, stat) {
88
83
  cb(er, er ? false : checkStat(stat, options));
@@ -112,16 +107,16 @@ var require_mode = __commonJS({
112
107
 
113
108
  // node_modules/isexe/index.js
114
109
  var require_isexe = __commonJS({
115
- "node_modules/isexe/index.js"(exports, module) {
110
+ "node_modules/isexe/index.js"(exports2, module2) {
116
111
  "use strict";
117
- var fs8 = __require("fs");
112
+ var fs8 = require("fs");
118
113
  var core;
119
114
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
120
115
  core = require_windows();
121
116
  } else {
122
117
  core = require_mode();
123
118
  }
124
- module.exports = isexe;
119
+ module2.exports = isexe;
125
120
  isexe.sync = sync;
126
121
  function isexe(path12, options, cb) {
127
122
  if (typeof options === "function") {
@@ -168,10 +163,10 @@ var require_isexe = __commonJS({
168
163
 
169
164
  // node_modules/which/which.js
170
165
  var require_which = __commonJS({
171
- "node_modules/which/which.js"(exports, module) {
166
+ "node_modules/which/which.js"(exports2, module2) {
172
167
  "use strict";
173
168
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
174
- var path12 = __require("path");
169
+ var path12 = require("path");
175
170
  var COLON = isWindows ? ";" : ":";
176
171
  var isexe = require_isexe();
177
172
  var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" });
@@ -258,14 +253,14 @@ var require_which = __commonJS({
258
253
  return null;
259
254
  throw getNotFoundError(cmd);
260
255
  };
261
- module.exports = which;
256
+ module2.exports = which;
262
257
  which.sync = whichSync;
263
258
  }
264
259
  });
265
260
 
266
261
  // node_modules/path-key/index.js
267
262
  var require_path_key = __commonJS({
268
- "node_modules/path-key/index.js"(exports, module) {
263
+ "node_modules/path-key/index.js"(exports2, module2) {
269
264
  "use strict";
270
265
  var pathKey2 = (options = {}) => {
271
266
  const environment = options.env || process.env;
@@ -275,16 +270,16 @@ var require_path_key = __commonJS({
275
270
  }
276
271
  return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
277
272
  };
278
- module.exports = pathKey2;
279
- module.exports.default = pathKey2;
273
+ module2.exports = pathKey2;
274
+ module2.exports.default = pathKey2;
280
275
  }
281
276
  });
282
277
 
283
278
  // node_modules/cross-spawn/lib/util/resolveCommand.js
284
279
  var require_resolveCommand = __commonJS({
285
- "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) {
280
+ "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
286
281
  "use strict";
287
- var path12 = __require("path");
282
+ var path12 = require("path");
288
283
  var which = require_which();
289
284
  var getPathKey = require_path_key();
290
285
  function resolveCommandAttempt(parsed, withoutPathExt) {
@@ -318,13 +313,13 @@ var require_resolveCommand = __commonJS({
318
313
  function resolveCommand(parsed) {
319
314
  return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true);
320
315
  }
321
- module.exports = resolveCommand;
316
+ module2.exports = resolveCommand;
322
317
  }
323
318
  });
324
319
 
325
320
  // node_modules/cross-spawn/lib/util/escape.js
326
321
  var require_escape = __commonJS({
327
- "node_modules/cross-spawn/lib/util/escape.js"(exports, module) {
322
+ "node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
328
323
  "use strict";
329
324
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
330
325
  function escapeCommand(arg) {
@@ -342,25 +337,25 @@ var require_escape = __commonJS({
342
337
  }
343
338
  return arg;
344
339
  }
345
- module.exports.command = escapeCommand;
346
- module.exports.argument = escapeArgument;
340
+ module2.exports.command = escapeCommand;
341
+ module2.exports.argument = escapeArgument;
347
342
  }
348
343
  });
349
344
 
350
345
  // node_modules/shebang-regex/index.js
351
346
  var require_shebang_regex = __commonJS({
352
- "node_modules/shebang-regex/index.js"(exports, module) {
347
+ "node_modules/shebang-regex/index.js"(exports2, module2) {
353
348
  "use strict";
354
- module.exports = /^#!(.*)/;
349
+ module2.exports = /^#!(.*)/;
355
350
  }
356
351
  });
357
352
 
358
353
  // node_modules/shebang-command/index.js
359
354
  var require_shebang_command = __commonJS({
360
- "node_modules/shebang-command/index.js"(exports, module) {
355
+ "node_modules/shebang-command/index.js"(exports2, module2) {
361
356
  "use strict";
362
357
  var shebangRegex = require_shebang_regex();
363
- module.exports = (string = "") => {
358
+ module2.exports = (string = "") => {
364
359
  const match = string.match(shebangRegex);
365
360
  if (!match) {
366
361
  return null;
@@ -377,9 +372,9 @@ var require_shebang_command = __commonJS({
377
372
 
378
373
  // node_modules/cross-spawn/lib/util/readShebang.js
379
374
  var require_readShebang = __commonJS({
380
- "node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) {
375
+ "node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
381
376
  "use strict";
382
- var fs8 = __require("fs");
377
+ var fs8 = require("fs");
383
378
  var shebangCommand = require_shebang_command();
384
379
  function readShebang(command) {
385
380
  const size = 150;
@@ -393,15 +388,15 @@ var require_readShebang = __commonJS({
393
388
  }
394
389
  return shebangCommand(buffer.toString());
395
390
  }
396
- module.exports = readShebang;
391
+ module2.exports = readShebang;
397
392
  }
398
393
  });
399
394
 
400
395
  // node_modules/cross-spawn/lib/parse.js
401
396
  var require_parse = __commonJS({
402
- "node_modules/cross-spawn/lib/parse.js"(exports, module) {
397
+ "node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
403
398
  "use strict";
404
- var path12 = __require("path");
399
+ var path12 = require("path");
405
400
  var resolveCommand = require_resolveCommand();
406
401
  var escape = require_escape();
407
402
  var readShebang = require_readShebang();
@@ -455,13 +450,13 @@ var require_parse = __commonJS({
455
450
  };
456
451
  return options.shell ? parsed : parseNonShell(parsed);
457
452
  }
458
- module.exports = parse;
453
+ module2.exports = parse;
459
454
  }
460
455
  });
461
456
 
462
457
  // node_modules/cross-spawn/lib/enoent.js
463
458
  var require_enoent = __commonJS({
464
- "node_modules/cross-spawn/lib/enoent.js"(exports, module) {
459
+ "node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
465
460
  "use strict";
466
461
  var isWin = process.platform === "win32";
467
462
  function notFoundError(original, syscall) {
@@ -500,7 +495,7 @@ var require_enoent = __commonJS({
500
495
  }
501
496
  return null;
502
497
  }
503
- module.exports = {
498
+ module2.exports = {
504
499
  hookChildProcess,
505
500
  verifyENOENT,
506
501
  verifyENOENTSync,
@@ -511,9 +506,9 @@ var require_enoent = __commonJS({
511
506
 
512
507
  // node_modules/cross-spawn/index.js
513
508
  var require_cross_spawn = __commonJS({
514
- "node_modules/cross-spawn/index.js"(exports, module) {
509
+ "node_modules/cross-spawn/index.js"(exports2, module2) {
515
510
  "use strict";
516
- var cp = __require("child_process");
511
+ var cp = require("child_process");
517
512
  var parse = require_parse();
518
513
  var enoent = require_enoent();
519
514
  function spawn2(command, args, options) {
@@ -528,11 +523,11 @@ var require_cross_spawn = __commonJS({
528
523
  result.error = result.error || enoent.verifyENOENTSync(result.status, parsed);
529
524
  return result;
530
525
  }
531
- module.exports = spawn2;
532
- module.exports.spawn = spawn2;
533
- module.exports.sync = spawnSync2;
534
- module.exports._parse = parse;
535
- module.exports._enoent = enoent;
526
+ module2.exports = spawn2;
527
+ module2.exports.spawn = spawn2;
528
+ module2.exports.sync = spawnSync2;
529
+ module2.exports._parse = parse;
530
+ module2.exports._enoent = enoent;
536
531
  }
537
532
  });
538
533
 
@@ -551,14 +546,14 @@ var RemixError = class extends Error {
551
546
  };
552
547
 
553
548
  // node_modules/@remixhq/core/dist/chunk-FAZUMWBS.js
554
- import fs2 from "fs/promises";
555
- import path2 from "path";
549
+ var import_promises = __toESM(require("fs/promises"), 1);
550
+ var import_path = __toESM(require("path"), 1);
556
551
  function getCollabBindingPath(repoRoot) {
557
- return path2.join(repoRoot, ".remix", "config.json");
552
+ return import_path.default.join(repoRoot, ".remix", "config.json");
558
553
  }
559
554
  async function readCollabBinding(repoRoot) {
560
555
  try {
561
- const raw = await fs2.readFile(getCollabBindingPath(repoRoot), "utf8");
556
+ const raw = await import_promises.default.readFile(getCollabBindingPath(repoRoot), "utf8");
562
557
  const parsed = JSON.parse(raw);
563
558
  if (parsed?.schemaVersion !== 1) return null;
564
559
  if (!parsed.projectId || !parsed.currentAppId || !parsed.upstreamAppId) return null;
@@ -588,10 +583,10 @@ var REMIX_ERROR_CODES = {
588
583
  };
589
584
 
590
585
  // node_modules/@remixhq/core/dist/chunk-UGKPOCN5.js
591
- import fs from "fs/promises";
592
- import { createHash } from "crypto";
593
- import os from "os";
594
- import path7 from "path";
586
+ var import_promises13 = __toESM(require("fs/promises"), 1);
587
+ var import_crypto = require("crypto");
588
+ var import_os = __toESM(require("os"), 1);
589
+ var import_path2 = __toESM(require("path"), 1);
595
590
 
596
591
  // node_modules/is-plain-obj/index.js
597
592
  function isPlainObject(value) {
@@ -603,7 +598,7 @@ function isPlainObject(value) {
603
598
  }
604
599
 
605
600
  // node_modules/execa/lib/arguments/file-url.js
606
- import { fileURLToPath } from "url";
601
+ var import_node_url = require("url");
607
602
  var safeNormalizeFileUrl = (file, name) => {
608
603
  const fileString = normalizeFileUrl(normalizeDenoExecPath(file));
609
604
  if (typeof fileString !== "string") {
@@ -613,7 +608,7 @@ var safeNormalizeFileUrl = (file, name) => {
613
608
  };
614
609
  var normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : file;
615
610
  var isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
616
- var normalizeFileUrl = (file) => file instanceof URL ? fileURLToPath(file) : file;
611
+ var normalizeFileUrl = (file) => file instanceof URL ? (0, import_node_url.fileURLToPath)(file) : file;
617
612
 
618
613
  // node_modules/execa/lib/methods/parameters.js
619
614
  var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
@@ -637,10 +632,10 @@ var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
637
632
  };
638
633
 
639
634
  // node_modules/execa/lib/methods/template.js
640
- import { ChildProcess } from "child_process";
635
+ var import_node_child_process = require("child_process");
641
636
 
642
637
  // node_modules/execa/lib/utils/uint-array.js
643
- import { StringDecoder } from "string_decoder";
638
+ var import_node_string_decoder = require("string_decoder");
644
639
  var { toString: objectToString } = Object.prototype;
645
640
  var isArrayBuffer = (value) => objectToString.call(value) === "[object ArrayBuffer]";
646
641
  var isUint8Array = (value) => objectToString.call(value) === "[object Uint8Array]";
@@ -657,7 +652,7 @@ var uint8ArraysToStrings = (uint8ArraysOrStrings, encoding) => {
657
652
  if (encoding === "utf8" && uint8ArraysOrStrings.every((uint8ArrayOrString) => typeof uint8ArrayOrString === "string")) {
658
653
  return uint8ArraysOrStrings;
659
654
  }
660
- const decoder = new StringDecoder(encoding);
655
+ const decoder = new import_node_string_decoder.StringDecoder(encoding);
661
656
  const strings = uint8ArraysOrStrings.map((uint8ArrayOrString) => typeof uint8ArrayOrString === "string" ? stringToUint8Array(uint8ArrayOrString) : uint8ArrayOrString).map((uint8Array) => decoder.write(uint8Array));
662
657
  const finalString = decoder.end();
663
658
  return finalString === "" ? strings : [...strings, finalString];
@@ -768,7 +763,7 @@ var parseExpression = (expression) => {
768
763
  if (isPlainObject(expression) && ("stdout" in expression || "isMaxBuffer" in expression)) {
769
764
  return getSubprocessResult(expression);
770
765
  }
771
- if (expression instanceof ChildProcess || Object.prototype.toString.call(expression) === "[object Promise]") {
766
+ if (expression instanceof import_node_child_process.ChildProcess || Object.prototype.toString.call(expression) === "[object Promise]") {
772
767
  throw new TypeError("Unexpected subprocess in template expression. Please use ${await subprocess} instead of ${subprocess}.");
773
768
  }
774
769
  throw new TypeError(`Unexpected "${typeOfExpression}" in template expression`);
@@ -787,15 +782,15 @@ var getSubprocessResult = ({ stdout }) => {
787
782
  };
788
783
 
789
784
  // node_modules/execa/lib/methods/main-sync.js
790
- import { spawnSync } from "child_process";
785
+ var import_node_child_process3 = require("child_process");
791
786
 
792
787
  // node_modules/execa/lib/arguments/specific.js
793
- import { debuglog } from "util";
788
+ var import_node_util = require("util");
794
789
 
795
790
  // node_modules/execa/lib/utils/standard-stream.js
796
- import process2 from "process";
791
+ var import_node_process = __toESM(require("process"), 1);
797
792
  var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
798
- var STANDARD_STREAMS = [process2.stdin, process2.stdout, process2.stderr];
793
+ var STANDARD_STREAMS = [import_node_process.default.stdin, import_node_process.default.stdout, import_node_process.default.stderr];
799
794
  var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
800
795
  var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
801
796
 
@@ -858,7 +853,7 @@ var parseFd = (fdName) => {
858
853
  };
859
854
  var FD_REGEXP = /^fd(\d+)$/;
860
855
  var addDefaultValue = (optionArray, optionName) => optionArray.map((optionValue) => optionValue === void 0 ? DEFAULT_OPTIONS[optionName] : optionValue);
861
- var verboseDefault = debuglog("execa").enabled ? "full" : "none";
856
+ var verboseDefault = (0, import_node_util.debuglog)("execa").enabled ? "full" : "none";
862
857
  var DEFAULT_OPTIONS = {
863
858
  lines: false,
864
859
  buffer: true,
@@ -882,18 +877,18 @@ var isVerboseFunction = (fdVerbose) => typeof fdVerbose === "function";
882
877
  var VERBOSE_VALUES = ["none", "short", "full"];
883
878
 
884
879
  // node_modules/execa/lib/verbose/log.js
885
- import { inspect } from "util";
880
+ var import_node_util3 = require("util");
886
881
 
887
882
  // node_modules/execa/lib/arguments/escape.js
888
- import { platform } from "process";
889
- import { stripVTControlCharacters } from "util";
883
+ var import_node_process2 = require("process");
884
+ var import_node_util2 = require("util");
890
885
  var joinCommand = (filePath, rawArguments) => {
891
886
  const fileAndArguments = [filePath, ...rawArguments];
892
887
  const command = fileAndArguments.join(" ");
893
888
  const escapedCommand = fileAndArguments.map((fileAndArgument) => quoteString(escapeControlCharacters(fileAndArgument))).join(" ");
894
889
  return { command, escapedCommand };
895
890
  };
896
- var escapeLines = (lines) => stripVTControlCharacters(lines).split("\n").map((line) => escapeControlCharacters(line)).join("\n");
891
+ var escapeLines = (lines) => (0, import_node_util2.stripVTControlCharacters)(lines).split("\n").map((line) => escapeControlCharacters(line)).join("\n");
897
892
  var escapeControlCharacters = (line) => line.replaceAll(SPECIAL_CHAR_REGEXP, (character) => escapeControlCharacter(character));
898
893
  var escapeControlCharacter = (character) => {
899
894
  const commonEscape = COMMON_ESCAPES[character];
@@ -925,16 +920,16 @@ var quoteString = (escapedArgument) => {
925
920
  if (NO_ESCAPE_REGEXP.test(escapedArgument)) {
926
921
  return escapedArgument;
927
922
  }
928
- return platform === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
923
+ return import_node_process2.platform === "win32" ? `"${escapedArgument.replaceAll('"', '""')}"` : `'${escapedArgument.replaceAll("'", "'\\''")}'`;
929
924
  };
930
925
  var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
931
926
 
932
927
  // node_modules/is-unicode-supported/index.js
933
- import process3 from "process";
928
+ var import_node_process3 = __toESM(require("process"), 1);
934
929
  function isUnicodeSupported() {
935
- const { env } = process3;
930
+ const { env } = import_node_process3.default;
936
931
  const { TERM, TERM_PROGRAM } = env;
937
- if (process3.platform !== "win32") {
932
+ if (import_node_process3.default.platform !== "win32") {
938
933
  return TERM !== "linux";
939
934
  }
940
935
  return Boolean(env.WT_SESSION) || Boolean(env.TERMINUS_SUBLIME) || env.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
@@ -1217,8 +1212,8 @@ var figures_default = figures;
1217
1212
  var replacements = Object.entries(specialMainSymbols);
1218
1213
 
1219
1214
  // node_modules/yoctocolors/base.js
1220
- import tty from "tty";
1221
- var hasColors = tty?.WriteStream?.prototype?.hasColors?.() ?? false;
1215
+ var import_node_tty = __toESM(require("tty"), 1);
1216
+ var hasColors = import_node_tty.default?.WriteStream?.prototype?.hasColors?.() ?? false;
1222
1217
  var format = (open, close) => {
1223
1218
  if (!hasColors) {
1224
1219
  return (input) => input;
@@ -1370,7 +1365,7 @@ var getPrintedLine = (verboseObject) => {
1370
1365
  return { verboseLine, verboseObject };
1371
1366
  };
1372
1367
  var serializeVerboseMessage = (message) => {
1373
- const messageString = typeof message === "string" ? message : inspect(message);
1368
+ const messageString = typeof message === "string" ? message : (0, import_node_util3.inspect)(message);
1374
1369
  const escapedMessage = escapeLines(messageString);
1375
1370
  return escapedMessage.replaceAll(" ", " ".repeat(TAB_SIZE));
1376
1371
  };
@@ -1417,9 +1412,9 @@ var validateVerbose = (verbose) => {
1417
1412
  };
1418
1413
 
1419
1414
  // node_modules/execa/lib/return/duration.js
1420
- import { hrtime } from "process";
1421
- var getStartTime = () => hrtime.bigint();
1422
- var getDurationMs = (startTime) => Number(hrtime.bigint() - startTime) / 1e6;
1415
+ var import_node_process4 = require("process");
1416
+ var getStartTime = () => import_node_process4.hrtime.bigint();
1417
+ var getDurationMs = (startTime) => Number(import_node_process4.hrtime.bigint() - startTime) / 1e6;
1423
1418
 
1424
1419
  // node_modules/execa/lib/arguments/command.js
1425
1420
  var handleCommand = (filePath, rawArguments, rawOptions) => {
@@ -1437,13 +1432,13 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
1437
1432
  };
1438
1433
 
1439
1434
  // node_modules/execa/lib/arguments/options.js
1435
+ var import_node_path5 = __toESM(require("path"), 1);
1436
+ var import_node_process8 = __toESM(require("process"), 1);
1440
1437
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
1441
- import path6 from "path";
1442
- import process6 from "process";
1443
1438
 
1444
1439
  // node_modules/npm-run-path/index.js
1445
- import process4 from "process";
1446
- import path3 from "path";
1440
+ var import_node_process5 = __toESM(require("process"), 1);
1441
+ var import_node_path2 = __toESM(require("path"), 1);
1447
1442
 
1448
1443
  // node_modules/npm-run-path/node_modules/path-key/index.js
1449
1444
  function pathKey(options = {}) {
@@ -1458,23 +1453,23 @@ function pathKey(options = {}) {
1458
1453
  }
1459
1454
 
1460
1455
  // node_modules/unicorn-magic/node.js
1461
- import { promisify } from "util";
1462
- import { execFile as execFileCallback, execFileSync as execFileSyncOriginal } from "child_process";
1463
- import path from "path";
1464
- import { fileURLToPath as fileURLToPath2 } from "url";
1465
- var execFileOriginal = promisify(execFileCallback);
1456
+ var import_node_util4 = require("util");
1457
+ var import_node_child_process2 = require("child_process");
1458
+ var import_node_path = __toESM(require("path"), 1);
1459
+ var import_node_url2 = require("url");
1460
+ var execFileOriginal = (0, import_node_util4.promisify)(import_node_child_process2.execFile);
1466
1461
  function toPath(urlOrPath) {
1467
- return urlOrPath instanceof URL ? fileURLToPath2(urlOrPath) : urlOrPath;
1462
+ return urlOrPath instanceof URL ? (0, import_node_url2.fileURLToPath)(urlOrPath) : urlOrPath;
1468
1463
  }
1469
1464
  function traversePathUp(startPath) {
1470
1465
  return {
1471
1466
  *[Symbol.iterator]() {
1472
- let currentPath = path.resolve(toPath(startPath));
1467
+ let currentPath = import_node_path.default.resolve(toPath(startPath));
1473
1468
  let previousPath;
1474
1469
  while (previousPath !== currentPath) {
1475
1470
  yield currentPath;
1476
1471
  previousPath = currentPath;
1477
- currentPath = path.resolve(currentPath, "..");
1472
+ currentPath = import_node_path.default.resolve(currentPath, "..");
1478
1473
  }
1479
1474
  }
1480
1475
  };
@@ -1483,38 +1478,38 @@ var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
1483
1478
 
1484
1479
  // node_modules/npm-run-path/index.js
1485
1480
  var npmRunPath = ({
1486
- cwd = process4.cwd(),
1487
- path: pathOption = process4.env[pathKey()],
1481
+ cwd = import_node_process5.default.cwd(),
1482
+ path: pathOption = import_node_process5.default.env[pathKey()],
1488
1483
  preferLocal = true,
1489
- execPath: execPath2 = process4.execPath,
1484
+ execPath: execPath2 = import_node_process5.default.execPath,
1490
1485
  addExecPath = true
1491
1486
  } = {}) => {
1492
- const cwdPath = path3.resolve(toPath(cwd));
1487
+ const cwdPath = import_node_path2.default.resolve(toPath(cwd));
1493
1488
  const result = [];
1494
- const pathParts = pathOption.split(path3.delimiter);
1489
+ const pathParts = pathOption.split(import_node_path2.default.delimiter);
1495
1490
  if (preferLocal) {
1496
1491
  applyPreferLocal(result, pathParts, cwdPath);
1497
1492
  }
1498
1493
  if (addExecPath) {
1499
1494
  applyExecPath(result, pathParts, execPath2, cwdPath);
1500
1495
  }
1501
- return pathOption === "" || pathOption === path3.delimiter ? `${result.join(path3.delimiter)}${pathOption}` : [...result, pathOption].join(path3.delimiter);
1496
+ return pathOption === "" || pathOption === import_node_path2.default.delimiter ? `${result.join(import_node_path2.default.delimiter)}${pathOption}` : [...result, pathOption].join(import_node_path2.default.delimiter);
1502
1497
  };
1503
1498
  var applyPreferLocal = (result, pathParts, cwdPath) => {
1504
1499
  for (const directory of traversePathUp(cwdPath)) {
1505
- const pathPart = path3.join(directory, "node_modules/.bin");
1500
+ const pathPart = import_node_path2.default.join(directory, "node_modules/.bin");
1506
1501
  if (!pathParts.includes(pathPart)) {
1507
1502
  result.push(pathPart);
1508
1503
  }
1509
1504
  }
1510
1505
  };
1511
1506
  var applyExecPath = (result, pathParts, execPath2, cwdPath) => {
1512
- const pathPart = path3.resolve(cwdPath, toPath(execPath2), "..");
1507
+ const pathPart = import_node_path2.default.resolve(cwdPath, toPath(execPath2), "..");
1513
1508
  if (!pathParts.includes(pathPart)) {
1514
1509
  result.push(pathPart);
1515
1510
  }
1516
1511
  };
1517
- var npmRunPathEnv = ({ env = process4.env, ...options } = {}) => {
1512
+ var npmRunPathEnv = ({ env = import_node_process5.default.env, ...options } = {}) => {
1518
1513
  env = { ...env };
1519
1514
  const pathName = pathKey({ env });
1520
1515
  options.path = env[pathName];
@@ -1523,7 +1518,7 @@ var npmRunPathEnv = ({ env = process4.env, ...options } = {}) => {
1523
1518
  };
1524
1519
 
1525
1520
  // node_modules/execa/lib/terminate/kill.js
1526
- import { setTimeout as setTimeout2 } from "timers/promises";
1521
+ var import_promises2 = require("timers/promises");
1527
1522
 
1528
1523
  // node_modules/execa/lib/return/final-error.js
1529
1524
  var getFinalError = (originalError, message, isSync) => {
@@ -1558,10 +1553,10 @@ var ExecaSyncError = class extends Error {
1558
1553
  setErrorName(ExecaSyncError, ExecaSyncError.name);
1559
1554
 
1560
1555
  // node_modules/execa/lib/terminate/signal.js
1561
- import { constants as constants3 } from "os";
1556
+ var import_node_os3 = require("os");
1562
1557
 
1563
1558
  // node_modules/human-signals/build/src/main.js
1564
- import { constants as constants2 } from "os";
1559
+ var import_node_os2 = require("os");
1565
1560
 
1566
1561
  // node_modules/human-signals/build/src/realtime.js
1567
1562
  var getRealtimeSignals = () => {
@@ -1579,7 +1574,7 @@ var SIGRTMIN = 34;
1579
1574
  var SIGRTMAX = 64;
1580
1575
 
1581
1576
  // node_modules/human-signals/build/src/signals.js
1582
- import { constants } from "os";
1577
+ var import_node_os = require("os");
1583
1578
 
1584
1579
  // node_modules/human-signals/build/src/core.js
1585
1580
  var SIGNALS = [
@@ -1870,7 +1865,7 @@ var normalizeSignal = ({
1870
1865
  }) => {
1871
1866
  const {
1872
1867
  signals: { [name]: constantSignal }
1873
- } = constants;
1868
+ } = import_node_os.constants;
1874
1869
  const supported = constantSignal !== void 0;
1875
1870
  const number = supported ? constantSignal : defaultNumber;
1876
1871
  return { name, number, description, supported, action, forced, standard };
@@ -1919,7 +1914,7 @@ var getSignalByNumber = (number, signals2) => {
1919
1914
  };
1920
1915
  };
1921
1916
  var findSignalByNumber = (number, signals2) => {
1922
- const signal = signals2.find(({ name }) => constants2.signals[name] === number);
1917
+ const signal = signals2.find(({ name }) => import_node_os2.constants.signals[name] === number);
1923
1918
  if (signal !== void 0) {
1924
1919
  return signal;
1925
1920
  }
@@ -1953,13 +1948,13 @@ var normalizeSignalInteger = (signalInteger, optionName) => {
1953
1948
  throw new TypeError(`Invalid ${optionName} ${signalInteger}: this signal integer does not exist.
1954
1949
  ${getAvailableSignals()}`);
1955
1950
  };
1956
- var getSignalsIntegerToName = () => new Map(Object.entries(constants3.signals).reverse().map(([signalName, signalInteger]) => [signalInteger, signalName]));
1951
+ var getSignalsIntegerToName = () => new Map(Object.entries(import_node_os3.constants.signals).reverse().map(([signalName, signalInteger]) => [signalInteger, signalName]));
1957
1952
  var signalsIntegerToName = getSignalsIntegerToName();
1958
1953
  var normalizeSignalName = (signalName, optionName) => {
1959
- if (signalName in constants3.signals) {
1954
+ if (signalName in import_node_os3.constants.signals) {
1960
1955
  return signalName;
1961
1956
  }
1962
- if (signalName.toUpperCase() in constants3.signals) {
1957
+ if (signalName.toUpperCase() in import_node_os3.constants.signals) {
1963
1958
  throw new TypeError(`Invalid ${optionName} '${signalName}': please rename it to '${signalName.toUpperCase()}'.`);
1964
1959
  }
1965
1960
  throw new TypeError(`Invalid ${optionName} '${signalName}': this signal name does not exist.
@@ -1967,8 +1962,8 @@ ${getAvailableSignals()}`);
1967
1962
  };
1968
1963
  var getAvailableSignals = () => `Available signal names: ${getAvailableSignalNames()}.
1969
1964
  Available signal numbers: ${getAvailableSignalIntegers()}.`;
1970
- var getAvailableSignalNames = () => Object.keys(constants3.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
1971
- var getAvailableSignalIntegers = () => [...new Set(Object.values(constants3.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
1965
+ var getAvailableSignalNames = () => Object.keys(import_node_os3.constants.signals).sort().map((signalName) => `'${signalName}'`).join(", ");
1966
+ var getAvailableSignalIntegers = () => [...new Set(Object.values(import_node_os3.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
1972
1967
  var getSignalDescription = (signal) => signalsByName[signal].description;
1973
1968
 
1974
1969
  // node_modules/execa/lib/terminate/kill.js
@@ -2030,7 +2025,7 @@ var killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSigna
2030
2025
  return;
2031
2026
  }
2032
2027
  try {
2033
- await setTimeout2(forceKillAfterDelay, void 0, { signal: controllerSignal });
2028
+ await (0, import_promises2.setTimeout)(forceKillAfterDelay, void 0, { signal: controllerSignal });
2034
2029
  if (kill("SIGKILL")) {
2035
2030
  context.isForcefullyTerminated ??= true;
2036
2031
  }
@@ -2039,10 +2034,10 @@ var killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSigna
2039
2034
  };
2040
2035
 
2041
2036
  // node_modules/execa/lib/utils/abort-signal.js
2042
- import { once } from "events";
2037
+ var import_node_events = require("events");
2043
2038
  var onAbortedSignal = async (mainSignal, stopSignal) => {
2044
2039
  if (!mainSignal.aborted) {
2045
- await once(mainSignal, "abort", { signal: stopSignal });
2040
+ await (0, import_node_events.once)(mainSignal, "abort", { signal: stopSignal });
2046
2041
  }
2047
2042
  };
2048
2043
 
@@ -2061,10 +2056,10 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
2061
2056
  };
2062
2057
 
2063
2058
  // node_modules/execa/lib/ipc/graceful.js
2064
- import { scheduler as scheduler2 } from "timers/promises";
2059
+ var import_promises4 = require("timers/promises");
2065
2060
 
2066
2061
  // node_modules/execa/lib/ipc/send.js
2067
- import { promisify as promisify2 } from "util";
2062
+ var import_node_util5 = require("util");
2068
2063
 
2069
2064
  // node_modules/execa/lib/ipc/validation.js
2070
2065
  var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected: isConnected2 }) => {
@@ -2228,27 +2223,27 @@ var serializeOptionValue = (value) => {
2228
2223
  };
2229
2224
 
2230
2225
  // node_modules/execa/lib/ipc/strict.js
2231
- import { once as once3 } from "events";
2226
+ var import_node_events5 = require("events");
2232
2227
 
2233
2228
  // node_modules/execa/lib/utils/max-listeners.js
2234
- import { addAbortListener } from "events";
2229
+ var import_node_events2 = require("events");
2235
2230
  var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
2236
2231
  const maxListeners = eventEmitter.getMaxListeners();
2237
2232
  if (maxListeners === 0 || maxListeners === Number.POSITIVE_INFINITY) {
2238
2233
  return;
2239
2234
  }
2240
2235
  eventEmitter.setMaxListeners(maxListeners + maxListenersIncrement);
2241
- addAbortListener(signal, () => {
2236
+ (0, import_node_events2.addAbortListener)(signal, () => {
2242
2237
  eventEmitter.setMaxListeners(eventEmitter.getMaxListeners() - maxListenersIncrement);
2243
2238
  });
2244
2239
  };
2245
2240
 
2246
2241
  // node_modules/execa/lib/ipc/forward.js
2247
- import { EventEmitter } from "events";
2242
+ var import_node_events4 = require("events");
2248
2243
 
2249
2244
  // node_modules/execa/lib/ipc/incoming.js
2250
- import { once as once2 } from "events";
2251
- import { scheduler } from "timers/promises";
2245
+ var import_node_events3 = require("events");
2246
+ var import_promises3 = require("timers/promises");
2252
2247
 
2253
2248
  // node_modules/execa/lib/ipc/reference.js
2254
2249
  var addReference = (channel, reference) => {
@@ -2295,7 +2290,7 @@ var onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappe
2295
2290
  }
2296
2291
  while (incomingMessages.length > 0) {
2297
2292
  await waitForOutgoingMessages(anyProcess, ipcEmitter, wrappedMessage);
2298
- await scheduler.yield();
2293
+ await import_promises3.scheduler.yield();
2299
2294
  const message = await handleStrictRequest({
2300
2295
  wrappedMessage: incomingMessages[0],
2301
2296
  anyProcess,
@@ -2312,7 +2307,7 @@ var onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bound
2312
2307
  abortOnDisconnect();
2313
2308
  const incomingMessages = INCOMING_MESSAGES.get(anyProcess);
2314
2309
  while (incomingMessages?.length > 0) {
2315
- await once2(ipcEmitter, "message:done");
2310
+ await (0, import_node_events3.once)(ipcEmitter, "message:done");
2316
2311
  }
2317
2312
  anyProcess.removeListener("message", boundOnMessage);
2318
2313
  redoAddedReferences(channel, isSubprocess);
@@ -2326,7 +2321,7 @@ var getIpcEmitter = (anyProcess, channel, isSubprocess) => {
2326
2321
  if (IPC_EMITTERS.has(anyProcess)) {
2327
2322
  return IPC_EMITTERS.get(anyProcess);
2328
2323
  }
2329
- const ipcEmitter = new EventEmitter();
2324
+ const ipcEmitter = new import_node_events4.EventEmitter();
2330
2325
  ipcEmitter.connected = true;
2331
2326
  IPC_EMITTERS.set(anyProcess, ipcEmitter);
2332
2327
  forwardEvents({
@@ -2437,7 +2432,7 @@ var waitForStrictResponse = async (wrappedMessage, anyProcess, isSubprocess) =>
2437
2432
  var STRICT_RESPONSES = {};
2438
2433
  var throwOnDisconnect = async (anyProcess, isSubprocess, { signal }) => {
2439
2434
  incrementMaxListeners(anyProcess, 1, signal);
2440
- await once3(anyProcess, "disconnect", { signal });
2435
+ await (0, import_node_events5.once)(anyProcess, "disconnect", { signal });
2441
2436
  throwOnStrictDisconnect(isSubprocess);
2442
2437
  };
2443
2438
  var REQUEST_TYPE = "execa:ipc:request";
@@ -2534,7 +2529,7 @@ var getSendMethod = (anyProcess) => {
2534
2529
  if (PROCESS_SEND_METHODS.has(anyProcess)) {
2535
2530
  return PROCESS_SEND_METHODS.get(anyProcess);
2536
2531
  }
2537
- const sendMethod = promisify2(anyProcess.send.bind(anyProcess));
2532
+ const sendMethod = (0, import_node_util5.promisify)(anyProcess.send.bind(anyProcess));
2538
2533
  PROCESS_SEND_METHODS.set(anyProcess, sendMethod);
2539
2534
  return sendMethod;
2540
2535
  };
@@ -2575,7 +2570,7 @@ var startIpc = async ({ anyProcess, channel, isSubprocess, ipc }) => {
2575
2570
  return;
2576
2571
  }
2577
2572
  getIpcEmitter(anyProcess, channel, isSubprocess);
2578
- await scheduler2.yield();
2573
+ await import_promises4.scheduler.yield();
2579
2574
  };
2580
2575
  var cancelListening = false;
2581
2576
  var handleAbort = (wrappedMessage) => {
@@ -2648,7 +2643,7 @@ var getReason = ({ reason }) => {
2648
2643
  };
2649
2644
 
2650
2645
  // node_modules/execa/lib/terminate/timeout.js
2651
- import { setTimeout as setTimeout3 } from "timers/promises";
2646
+ var import_promises5 = require("timers/promises");
2652
2647
  var validateTimeout = ({ timeout }) => {
2653
2648
  if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
2654
2649
  throw new TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${timeout}\` (${typeof timeout})`);
@@ -2656,15 +2651,15 @@ var validateTimeout = ({ timeout }) => {
2656
2651
  };
2657
2652
  var throwOnTimeout = (subprocess, timeout, context, controller) => timeout === 0 || timeout === void 0 ? [] : [killAfterTimeout(subprocess, timeout, context, controller)];
2658
2653
  var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
2659
- await setTimeout3(timeout, void 0, { signal });
2654
+ await (0, import_promises5.setTimeout)(timeout, void 0, { signal });
2660
2655
  context.terminationReason ??= "timeout";
2661
2656
  subprocess.kill();
2662
2657
  throw new DiscardedError();
2663
2658
  };
2664
2659
 
2665
2660
  // node_modules/execa/lib/methods/node.js
2666
- import { execPath, execArgv } from "process";
2667
- import path4 from "path";
2661
+ var import_node_process6 = require("process");
2662
+ var import_node_path3 = __toESM(require("path"), 1);
2668
2663
  var mapNode = ({ options }) => {
2669
2664
  if (options.node === false) {
2670
2665
  throw new TypeError('The "node" option cannot be false with `execaNode()`.');
@@ -2673,8 +2668,8 @@ var mapNode = ({ options }) => {
2673
2668
  };
2674
2669
  var handleNodeOption = (file, commandArguments, {
2675
2670
  node: shouldHandleNode = false,
2676
- nodePath = execPath,
2677
- nodeOptions = execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")),
2671
+ nodePath = import_node_process6.execPath,
2672
+ nodeOptions = import_node_process6.execArgv.filter((nodeOption) => !nodeOption.startsWith("--inspect")),
2678
2673
  cwd,
2679
2674
  execPath: formerNodePath,
2680
2675
  ...options
@@ -2683,7 +2678,7 @@ var handleNodeOption = (file, commandArguments, {
2683
2678
  throw new TypeError('The "execPath" option has been removed. Please use the "nodePath" option instead.');
2684
2679
  }
2685
2680
  const normalizedNodePath = safeNormalizeFileUrl(nodePath, 'The "nodePath" option');
2686
- const resolvedNodePath = path4.resolve(cwd, normalizedNodePath);
2681
+ const resolvedNodePath = import_node_path3.default.resolve(cwd, normalizedNodePath);
2687
2682
  const newOptions = {
2688
2683
  ...options,
2689
2684
  nodePath: resolvedNodePath,
@@ -2693,7 +2688,7 @@ var handleNodeOption = (file, commandArguments, {
2693
2688
  if (!shouldHandleNode) {
2694
2689
  return [file, commandArguments, newOptions];
2695
2690
  }
2696
- if (path4.basename(file, ".exe") === "node") {
2691
+ if (import_node_path3.default.basename(file, ".exe") === "node") {
2697
2692
  throw new TypeError('When the "node" option is true, the first argument does not need to be "node".');
2698
2693
  }
2699
2694
  return [
@@ -2704,7 +2699,7 @@ var handleNodeOption = (file, commandArguments, {
2704
2699
  };
2705
2700
 
2706
2701
  // node_modules/execa/lib/ipc/ipc-input.js
2707
- import { serialize } from "v8";
2702
+ var import_node_v8 = require("v8");
2708
2703
  var validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
2709
2704
  if (ipcInput === void 0) {
2710
2705
  return;
@@ -2716,7 +2711,7 @@ var validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
2716
2711
  };
2717
2712
  var validateAdvancedInput = (ipcInput) => {
2718
2713
  try {
2719
- serialize(ipcInput);
2714
+ (0, import_node_v8.serialize)(ipcInput);
2720
2715
  } catch (error) {
2721
2716
  throw new Error("The `ipcInput` option is not serializable with a structured clone.", { cause: error });
2722
2717
  }
@@ -2782,16 +2777,16 @@ var ENCODING_ALIASES = {
2782
2777
  var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
2783
2778
 
2784
2779
  // node_modules/execa/lib/arguments/cwd.js
2785
- import { statSync } from "fs";
2786
- import path5 from "path";
2787
- import process5 from "process";
2780
+ var import_node_fs = require("fs");
2781
+ var import_node_path4 = __toESM(require("path"), 1);
2782
+ var import_node_process7 = __toESM(require("process"), 1);
2788
2783
  var normalizeCwd = (cwd = getDefaultCwd()) => {
2789
2784
  const cwdString = safeNormalizeFileUrl(cwd, 'The "cwd" option');
2790
- return path5.resolve(cwdString);
2785
+ return import_node_path4.default.resolve(cwdString);
2791
2786
  };
2792
2787
  var getDefaultCwd = () => {
2793
2788
  try {
2794
- return process5.cwd();
2789
+ return import_node_process7.default.cwd();
2795
2790
  } catch (error) {
2796
2791
  error.message = `The current directory does not exist.
2797
2792
  ${error.message}`;
@@ -2804,7 +2799,7 @@ var fixCwdError = (originalMessage, cwd) => {
2804
2799
  }
2805
2800
  let cwdStat;
2806
2801
  try {
2807
- cwdStat = statSync(cwd);
2802
+ cwdStat = (0, import_node_fs.statSync)(cwd);
2808
2803
  } catch (error) {
2809
2804
  return `The "cwd" option is invalid: ${cwd}.
2810
2805
  ${error.message}
@@ -2834,7 +2829,7 @@ var normalizeOptions = (filePath, rawArguments, rawOptions) => {
2834
2829
  options.killSignal = normalizeKillSignal(options.killSignal);
2835
2830
  options.forceKillAfterDelay = normalizeForceKillAfterDelay(options.forceKillAfterDelay);
2836
2831
  options.lines = options.lines.map((lines, fdNumber) => lines && !BINARY_ENCODINGS.has(options.encoding) && options.buffer[fdNumber]);
2837
- if (process6.platform === "win32" && path6.basename(file, ".exe") === "cmd") {
2832
+ if (import_node_process8.default.platform === "win32" && import_node_path5.default.basename(file, ".exe") === "cmd") {
2838
2833
  commandArguments.unshift("/q");
2839
2834
  }
2840
2835
  return { file, commandArguments, options };
@@ -2875,7 +2870,7 @@ var addDefaultOptions = ({
2875
2870
  serialization
2876
2871
  });
2877
2872
  var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, nodePath }) => {
2878
- const env = extendEnv ? { ...process6.env, ...envOption } : envOption;
2873
+ const env = extendEnv ? { ...import_node_process8.default.env, ...envOption } : envOption;
2879
2874
  if (preferLocal || node) {
2880
2875
  return npmRunPathEnv({
2881
2876
  env,
@@ -2892,7 +2887,7 @@ var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, no
2892
2887
  var concatenateShell = (file, commandArguments, options) => options.shell && commandArguments.length > 0 ? [[file, ...commandArguments].join(" "), [], options] : [file, commandArguments, options];
2893
2888
 
2894
2889
  // node_modules/execa/lib/return/message.js
2895
- import { inspect as inspect2 } from "util";
2890
+ var import_node_util6 = require("util");
2896
2891
 
2897
2892
  // node_modules/strip-final-newline/index.js
2898
2893
  function stripFinalNewline(input) {
@@ -2912,8 +2907,8 @@ var CR = "\r";
2912
2907
  var CR_BINARY = CR.codePointAt(0);
2913
2908
 
2914
2909
  // node_modules/get-stream/source/index.js
2915
- import { on } from "events";
2916
- import { finished } from "stream/promises";
2910
+ var import_node_events6 = require("events");
2911
+ var import_promises6 = require("stream/promises");
2917
2912
 
2918
2913
  // node_modules/is-stream/index.js
2919
2914
  function isStream(stream, { checkOpen = true } = {}) {
@@ -3279,7 +3274,7 @@ var stringMethods = {
3279
3274
  };
3280
3275
 
3281
3276
  // node_modules/get-stream/source/index.js
3282
- Object.assign(nodeImports, { on, finished });
3277
+ Object.assign(nodeImports, { on: import_node_events6.on, finished: import_promises6.finished });
3283
3278
 
3284
3279
  // node_modules/execa/lib/io/max-buffer.js
3285
3280
  var handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
@@ -3446,7 +3441,7 @@ var getOriginalMessage = (originalError, cwd) => {
3446
3441
  const escapedOriginalMessage = escapeLines(fixCwdError(originalMessage, cwd));
3447
3442
  return escapedOriginalMessage === "" ? void 0 : escapedOriginalMessage;
3448
3443
  };
3449
- var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : inspect2(ipcMessage);
3444
+ var serializeIpcMessage = (ipcMessage) => typeof ipcMessage === "string" ? ipcMessage : (0, import_node_util6.inspect)(ipcMessage);
3450
3445
  var serializeMessagePart = (messagePart) => Array.isArray(messagePart) ? messagePart.map((messageItem) => stripFinalNewline(serializeMessageItem(messageItem))).filter(Boolean).join("\n") : serializeMessageItem(messagePart);
3451
3446
  var serializeMessageItem = (messageItem) => {
3452
3447
  if (typeof messageItem === "string") {
@@ -3809,7 +3804,7 @@ var handleResult = (result, verboseInfo, { reject }) => {
3809
3804
  };
3810
3805
 
3811
3806
  // node_modules/execa/lib/stdio/handle-sync.js
3812
- import { readFileSync as readFileSync2 } from "fs";
3807
+ var import_node_fs3 = require("fs");
3813
3808
 
3814
3809
  // node_modules/execa/lib/stdio/type.js
3815
3810
  var getStdioItemType = (value, optionName) => {
@@ -4052,7 +4047,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
4052
4047
  var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
4053
4048
 
4054
4049
  // node_modules/execa/lib/stdio/direction.js
4055
- import process7 from "process";
4050
+ var import_node_process9 = __toESM(require("process"), 1);
4056
4051
  var getStreamDirection = (stdioItems, fdNumber, optionName) => {
4057
4052
  const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
4058
4053
  if (directions.includes("input") && directions.includes("output")) {
@@ -4092,10 +4087,10 @@ var guessStreamDirection = {
4092
4087
  }
4093
4088
  };
4094
4089
  var getStandardStreamDirection = (value) => {
4095
- if ([0, process7.stdin].includes(value)) {
4090
+ if ([0, import_node_process9.default.stdin].includes(value)) {
4096
4091
  return "input";
4097
4092
  }
4098
- if ([1, 2, process7.stdout, process7.stderr].includes(value)) {
4093
+ if ([1, 2, import_node_process9.default.stdout, import_node_process9.default.stderr].includes(value)) {
4099
4094
  return "output";
4100
4095
  }
4101
4096
  };
@@ -4139,8 +4134,8 @@ var normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((st
4139
4134
  var isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
4140
4135
 
4141
4136
  // node_modules/execa/lib/stdio/native.js
4142
- import { readFileSync } from "fs";
4143
- import tty2 from "tty";
4137
+ var import_node_fs2 = require("fs");
4138
+ var import_node_tty2 = __toESM(require("tty"), 1);
4144
4139
  var handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
4145
4140
  if (!isStdioArray || type !== "native") {
4146
4141
  return stdioItem;
@@ -4170,10 +4165,10 @@ var getTargetFd = ({ value, optionName, fdNumber, direction }) => {
4170
4165
  if (direction === "output") {
4171
4166
  return { type: "fileNumber", value: targetFdNumber, optionName };
4172
4167
  }
4173
- if (tty2.isatty(targetFdNumber)) {
4168
+ if (import_node_tty2.default.isatty(targetFdNumber)) {
4174
4169
  throw new TypeError(`The \`${optionName}: ${serializeOptionValue(value)}\` option is invalid: it cannot be a TTY with synchronous methods.`);
4175
4170
  }
4176
- return { type: "uint8Array", value: bufferToUint8Array(readFileSync(targetFdNumber)), optionName };
4171
+ return { type: "uint8Array", value: bufferToUint8Array((0, import_node_fs2.readFileSync)(targetFdNumber)), optionName };
4177
4172
  };
4178
4173
  var getTargetFdNumber = (value, fdNumber) => {
4179
4174
  if (value === "inherit") {
@@ -4506,8 +4501,8 @@ var addProperties = {
4506
4501
  var addPropertiesSync = {
4507
4502
  input: {
4508
4503
  ...addProperties,
4509
- fileUrl: ({ value }) => ({ contents: [bufferToUint8Array(readFileSync2(value))] }),
4510
- filePath: ({ value: { file } }) => ({ contents: [bufferToUint8Array(readFileSync2(file))] }),
4504
+ fileUrl: ({ value }) => ({ contents: [bufferToUint8Array((0, import_node_fs3.readFileSync)(value))] }),
4505
+ filePath: ({ value: { file } }) => ({ contents: [bufferToUint8Array((0, import_node_fs3.readFileSync)(file))] }),
4511
4506
  fileNumber: forbiddenIfSync,
4512
4507
  iterable: ({ value }) => ({ contents: [...value] }),
4513
4508
  string: ({ value }) => ({ contents: [value] }),
@@ -4529,7 +4524,7 @@ var stripNewline = (value, { stripFinalNewline: stripFinalNewline2 }, fdNumber)
4529
4524
  var getStripFinalNewline = (stripFinalNewline2, fdNumber) => fdNumber === "all" ? stripFinalNewline2[1] || stripFinalNewline2[2] : stripFinalNewline2[fdNumber];
4530
4525
 
4531
4526
  // node_modules/execa/lib/transform/generator.js
4532
- import { Transform, getDefaultHighWaterMark } from "stream";
4527
+ var import_node_stream = require("stream");
4533
4528
 
4534
4529
  // node_modules/execa/lib/transform/split.js
4535
4530
  var getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
@@ -4612,10 +4607,10 @@ var linesUint8ArrayInfo = {
4612
4607
  };
4613
4608
 
4614
4609
  // node_modules/execa/lib/transform/validate.js
4615
- import { Buffer as Buffer2 } from "buffer";
4610
+ var import_node_buffer = require("buffer");
4616
4611
  var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
4617
4612
  var validateStringTransformInput = function* (optionName, chunk) {
4618
- if (typeof chunk !== "string" && !isUint8Array(chunk) && !Buffer2.isBuffer(chunk)) {
4613
+ if (typeof chunk !== "string" && !isUint8Array(chunk) && !import_node_buffer.Buffer.isBuffer(chunk)) {
4619
4614
  throw new TypeError(`The \`${optionName}\` option's transform must use "objectMode: true" to receive as input: ${typeof chunk}.`);
4620
4615
  }
4621
4616
  yield chunk;
@@ -4641,8 +4636,8 @@ Instead, \`yield\` should either be called with a value, or not be called at all
4641
4636
  };
4642
4637
 
4643
4638
  // node_modules/execa/lib/transform/encoding-transform.js
4644
- import { Buffer as Buffer3 } from "buffer";
4645
- import { StringDecoder as StringDecoder2 } from "string_decoder";
4639
+ var import_node_buffer2 = require("buffer");
4640
+ var import_node_string_decoder2 = require("string_decoder");
4646
4641
  var getEncodingTransformGenerator = (binary, encoding, skipped) => {
4647
4642
  if (skipped) {
4648
4643
  return;
@@ -4650,14 +4645,14 @@ var getEncodingTransformGenerator = (binary, encoding, skipped) => {
4650
4645
  if (binary) {
4651
4646
  return { transform: encodingUint8ArrayGenerator.bind(void 0, new TextEncoder()) };
4652
4647
  }
4653
- const stringDecoder = new StringDecoder2(encoding);
4648
+ const stringDecoder = new import_node_string_decoder2.StringDecoder(encoding);
4654
4649
  return {
4655
4650
  transform: encodingStringGenerator.bind(void 0, stringDecoder),
4656
4651
  final: encodingStringFinal.bind(void 0, stringDecoder)
4657
4652
  };
4658
4653
  };
4659
4654
  var encodingUint8ArrayGenerator = function* (textEncoder3, chunk) {
4660
- if (Buffer3.isBuffer(chunk)) {
4655
+ if (import_node_buffer2.Buffer.isBuffer(chunk)) {
4661
4656
  yield bufferToUint8Array(chunk);
4662
4657
  } else if (typeof chunk === "string") {
4663
4658
  yield textEncoder3.encode(chunk);
@@ -4676,8 +4671,8 @@ var encodingStringFinal = function* (stringDecoder) {
4676
4671
  };
4677
4672
 
4678
4673
  // node_modules/execa/lib/transform/run-async.js
4679
- import { callbackify } from "util";
4680
- var pushChunks = callbackify(async (getChunks, state, getChunksArguments, transformStream) => {
4674
+ var import_node_util7 = require("util");
4675
+ var pushChunks = (0, import_node_util7.callbackify)(async (getChunks, state, getChunksArguments, transformStream) => {
4681
4676
  state.currentIterable = getChunks(...getChunksArguments);
4682
4677
  try {
4683
4678
  for await (const chunk of state.currentIterable) {
@@ -4710,7 +4705,7 @@ var generatorFinalChunks = async function* (final, index, generators) {
4710
4705
  yield* transformChunk(finalChunk, generators, index + 1);
4711
4706
  }
4712
4707
  };
4713
- var destroyTransform = callbackify(async ({ currentIterable }, error) => {
4708
+ var destroyTransform = (0, import_node_util7.callbackify)(async ({ currentIterable }, error) => {
4714
4709
  if (currentIterable !== void 0) {
4715
4710
  await (error ? currentIterable.throw(error) : currentIterable.return());
4716
4711
  return;
@@ -4778,11 +4773,11 @@ var generatorToStream = ({
4778
4773
  const transformMethod = transformAsync ? pushChunks.bind(void 0, transformChunk, state) : pushChunksSync.bind(void 0, transformChunkSync);
4779
4774
  const finalMethod = transformAsync || finalAsync ? pushChunks.bind(void 0, finalChunks, state) : pushChunksSync.bind(void 0, finalChunksSync);
4780
4775
  const destroyMethod = transformAsync || finalAsync ? destroyTransform.bind(void 0, state) : void 0;
4781
- const stream = new Transform({
4776
+ const stream = new import_node_stream.Transform({
4782
4777
  writableObjectMode,
4783
- writableHighWaterMark: getDefaultHighWaterMark(writableObjectMode),
4778
+ writableHighWaterMark: (0, import_node_stream.getDefaultHighWaterMark)(writableObjectMode),
4784
4779
  readableObjectMode,
4785
- readableHighWaterMark: getDefaultHighWaterMark(readableObjectMode),
4780
+ readableHighWaterMark: (0, import_node_stream.getDefaultHighWaterMark)(readableObjectMode),
4786
4781
  transform(chunk, encoding2, done) {
4787
4782
  transformMethod([chunk, generators, 0], this, done);
4788
4783
  },
@@ -4853,7 +4848,7 @@ var validateSerializable = (newContents) => {
4853
4848
  };
4854
4849
 
4855
4850
  // node_modules/execa/lib/io/output-sync.js
4856
- import { writeFileSync, appendFileSync } from "fs";
4851
+ var import_node_fs4 = require("fs");
4857
4852
 
4858
4853
  // node_modules/execa/lib/verbose/output.js
4859
4854
  var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type, value }) => type === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type }) => TRANSFORM_TYPES.has(type)));
@@ -4977,10 +4972,10 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
4977
4972
  for (const { path: path12, append } of stdioItems.filter(({ type }) => FILE_TYPES.has(type))) {
4978
4973
  const pathString = typeof path12 === "string" ? path12 : path12.toString();
4979
4974
  if (append || outputFiles.has(pathString)) {
4980
- appendFileSync(path12, serializedResult);
4975
+ (0, import_node_fs4.appendFileSync)(path12, serializedResult);
4981
4976
  } else {
4982
4977
  outputFiles.add(pathString);
4983
- writeFileSync(path12, serializedResult);
4978
+ (0, import_node_fs4.writeFileSync)(path12, serializedResult);
4984
4979
  }
4985
4980
  }
4986
4981
  };
@@ -5009,7 +5004,7 @@ var getAllSync = ([, stdout, stderr], options) => {
5009
5004
  };
5010
5005
 
5011
5006
  // node_modules/execa/lib/resolve/exit-async.js
5012
- import { once as once4 } from "events";
5007
+ var import_node_events7 = require("events");
5013
5008
  var waitForExit = async (subprocess, context) => {
5014
5009
  const [exitCode, signal] = await waitForExitOrError(subprocess);
5015
5010
  context.isForcefullyTerminated ??= false;
@@ -5017,8 +5012,8 @@ var waitForExit = async (subprocess, context) => {
5017
5012
  };
5018
5013
  var waitForExitOrError = async (subprocess) => {
5019
5014
  const [spawnPayload, exitPayload] = await Promise.allSettled([
5020
- once4(subprocess, "spawn"),
5021
- once4(subprocess, "exit")
5015
+ (0, import_node_events7.once)(subprocess, "spawn"),
5016
+ (0, import_node_events7.once)(subprocess, "exit")
5022
5017
  ]);
5023
5018
  if (spawnPayload.status === "rejected") {
5024
5019
  return [];
@@ -5027,7 +5022,7 @@ var waitForExitOrError = async (subprocess) => {
5027
5022
  };
5028
5023
  var waitForSubprocessExit = async (subprocess) => {
5029
5024
  try {
5030
- return await once4(subprocess, "exit");
5025
+ return await (0, import_node_events7.once)(subprocess, "exit");
5031
5026
  } catch {
5032
5027
  return waitForSubprocessExit(subprocess);
5033
5028
  }
@@ -5153,7 +5148,7 @@ var runSubprocessSync = ({ file, commandArguments, options, command, escapedComm
5153
5148
  try {
5154
5149
  addInputOptionsSync(fileDescriptors, options);
5155
5150
  const normalizedOptions = normalizeSpawnSyncOptions(options);
5156
- return spawnSync(...concatenateShell(file, commandArguments, normalizedOptions));
5151
+ return (0, import_node_child_process3.spawnSync)(...concatenateShell(file, commandArguments, normalizedOptions));
5157
5152
  } catch (error) {
5158
5153
  return makeEarlyError({
5159
5154
  error,
@@ -5195,14 +5190,14 @@ var getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio, al
5195
5190
  });
5196
5191
 
5197
5192
  // node_modules/execa/lib/methods/main-async.js
5198
- import { setMaxListeners } from "events";
5199
- import { spawn } from "child_process";
5193
+ var import_node_events14 = require("events");
5194
+ var import_node_child_process5 = require("child_process");
5200
5195
 
5201
5196
  // node_modules/execa/lib/ipc/methods.js
5202
- import process8 from "process";
5197
+ var import_node_process10 = __toESM(require("process"), 1);
5203
5198
 
5204
5199
  // node_modules/execa/lib/ipc/get-one.js
5205
- import { once as once5, on as on2 } from "events";
5200
+ var import_node_events8 = require("events");
5206
5201
  var getOneMessage = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
5207
5202
  validateIpcMethod({
5208
5203
  methodName: "getOneMessage",
@@ -5238,26 +5233,26 @@ var getOneMessageAsync = async ({ anyProcess, channel, isSubprocess, filter, ref
5238
5233
  };
5239
5234
  var getMessage = async (ipcEmitter, filter, { signal }) => {
5240
5235
  if (filter === void 0) {
5241
- const [message] = await once5(ipcEmitter, "message", { signal });
5236
+ const [message] = await (0, import_node_events8.once)(ipcEmitter, "message", { signal });
5242
5237
  return message;
5243
5238
  }
5244
- for await (const [message] of on2(ipcEmitter, "message", { signal })) {
5239
+ for await (const [message] of (0, import_node_events8.on)(ipcEmitter, "message", { signal })) {
5245
5240
  if (filter(message)) {
5246
5241
  return message;
5247
5242
  }
5248
5243
  }
5249
5244
  };
5250
5245
  var throwOnDisconnect2 = async (ipcEmitter, isSubprocess, { signal }) => {
5251
- await once5(ipcEmitter, "disconnect", { signal });
5246
+ await (0, import_node_events8.once)(ipcEmitter, "disconnect", { signal });
5252
5247
  throwOnEarlyDisconnect(isSubprocess);
5253
5248
  };
5254
5249
  var throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
5255
- const [error] = await once5(ipcEmitter, "strict:error", { signal });
5250
+ const [error] = await (0, import_node_events8.once)(ipcEmitter, "strict:error", { signal });
5256
5251
  throw getStrictResponseError(error, isSubprocess);
5257
5252
  };
5258
5253
 
5259
5254
  // node_modules/execa/lib/ipc/get-each.js
5260
- import { once as once6, on as on3 } from "events";
5255
+ var import_node_events9 = require("events");
5261
5256
  var getEachMessage = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
5262
5257
  anyProcess,
5263
5258
  channel,
@@ -5297,14 +5292,14 @@ var loopOnMessages = ({ anyProcess, channel, isSubprocess, ipc, shouldAwait, ref
5297
5292
  };
5298
5293
  var stopOnDisconnect = async (anyProcess, ipcEmitter, controller) => {
5299
5294
  try {
5300
- await once6(ipcEmitter, "disconnect", { signal: controller.signal });
5295
+ await (0, import_node_events9.once)(ipcEmitter, "disconnect", { signal: controller.signal });
5301
5296
  controller.abort();
5302
5297
  } catch {
5303
5298
  }
5304
5299
  };
5305
5300
  var abortOnStrictError = async ({ ipcEmitter, isSubprocess, controller, state }) => {
5306
5301
  try {
5307
- const [error] = await once6(ipcEmitter, "strict:error", { signal: controller.signal });
5302
+ const [error] = await (0, import_node_events9.once)(ipcEmitter, "strict:error", { signal: controller.signal });
5308
5303
  state.error = getStrictResponseError(error, isSubprocess);
5309
5304
  controller.abort();
5310
5305
  } catch {
@@ -5312,7 +5307,7 @@ var abortOnStrictError = async ({ ipcEmitter, isSubprocess, controller, state })
5312
5307
  };
5313
5308
  var iterateOnMessages = async function* ({ anyProcess, channel, ipcEmitter, isSubprocess, shouldAwait, controller, state, reference }) {
5314
5309
  try {
5315
- for await (const [message] of on3(ipcEmitter, "message", { signal: controller.signal })) {
5310
+ for await (const [message] of (0, import_node_events9.on)(ipcEmitter, "message", { signal: controller.signal })) {
5316
5311
  throwIfStrictError(state);
5317
5312
  yield message;
5318
5313
  }
@@ -5340,9 +5335,9 @@ var addIpcMethods = (subprocess, { ipc }) => {
5340
5335
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
5341
5336
  };
5342
5337
  var getIpcExport = () => {
5343
- const anyProcess = process8;
5338
+ const anyProcess = import_node_process10.default;
5344
5339
  const isSubprocess = true;
5345
- const ipc = process8.channel !== void 0;
5340
+ const ipc = import_node_process10.default.channel !== void 0;
5346
5341
  return {
5347
5342
  ...getIpcMethods(anyProcess, isSubprocess, ipc),
5348
5343
  getCancelSignal: getCancelSignal.bind(void 0, {
@@ -5375,16 +5370,11 @@ var getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
5375
5370
  });
5376
5371
 
5377
5372
  // node_modules/execa/lib/return/early-error.js
5378
- import { ChildProcess as ChildProcess2 } from "child_process";
5379
- import {
5380
- PassThrough,
5381
- Readable,
5382
- Writable,
5383
- Duplex
5384
- } from "stream";
5373
+ var import_node_child_process4 = require("child_process");
5374
+ var import_node_stream2 = require("stream");
5385
5375
  var handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
5386
5376
  cleanupCustomStreams(fileDescriptors);
5387
- const subprocess = new ChildProcess2();
5377
+ const subprocess = new import_node_child_process4.ChildProcess();
5388
5378
  createDummyStreams(subprocess, fileDescriptors);
5389
5379
  Object.assign(subprocess, { readable, writable, duplex });
5390
5380
  const earlyError = makeEarlyError({
@@ -5415,23 +5405,23 @@ var createDummyStreams = (subprocess, fileDescriptors) => {
5415
5405
  });
5416
5406
  };
5417
5407
  var createDummyStream = () => {
5418
- const stream = new PassThrough();
5408
+ const stream = new import_node_stream2.PassThrough();
5419
5409
  stream.end();
5420
5410
  return stream;
5421
5411
  };
5422
- var readable = () => new Readable({ read() {
5412
+ var readable = () => new import_node_stream2.Readable({ read() {
5423
5413
  } });
5424
- var writable = () => new Writable({ write() {
5414
+ var writable = () => new import_node_stream2.Writable({ write() {
5425
5415
  } });
5426
- var duplex = () => new Duplex({ read() {
5416
+ var duplex = () => new import_node_stream2.Duplex({ read() {
5427
5417
  }, write() {
5428
5418
  } });
5429
5419
  var handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
5430
5420
 
5431
5421
  // node_modules/execa/lib/stdio/handle-async.js
5432
- import { createReadStream, createWriteStream } from "fs";
5433
- import { Buffer as Buffer4 } from "buffer";
5434
- import { Readable as Readable2, Writable as Writable2, Duplex as Duplex2 } from "stream";
5422
+ var import_node_fs5 = require("fs");
5423
+ var import_node_buffer3 = require("buffer");
5424
+ var import_node_stream3 = require("stream");
5435
5425
  var handleStdioAsync = (options, verboseInfo) => handleStdio(addPropertiesAsync, options, verboseInfo, false);
5436
5426
  var forbiddenIfAsync = ({ type, optionName }) => {
5437
5427
  throw new TypeError(`The \`${optionName}\` option cannot be ${TYPE_TO_MESSAGE[type]}.`);
@@ -5443,7 +5433,7 @@ var addProperties2 = {
5443
5433
  nodeStream: ({ value }) => ({ stream: value }),
5444
5434
  webTransform({ value: { transform, writableObjectMode, readableObjectMode } }) {
5445
5435
  const objectMode = writableObjectMode || readableObjectMode;
5446
- const stream = Duplex2.fromWeb(transform, { objectMode });
5436
+ const stream = import_node_stream3.Duplex.fromWeb(transform, { objectMode });
5447
5437
  return { stream };
5448
5438
  },
5449
5439
  duplex: ({ value: { transform } }) => ({ stream: transform }),
@@ -5453,19 +5443,19 @@ var addProperties2 = {
5453
5443
  var addPropertiesAsync = {
5454
5444
  input: {
5455
5445
  ...addProperties2,
5456
- fileUrl: ({ value }) => ({ stream: createReadStream(value) }),
5457
- filePath: ({ value: { file } }) => ({ stream: createReadStream(file) }),
5458
- webStream: ({ value }) => ({ stream: Readable2.fromWeb(value) }),
5459
- iterable: ({ value }) => ({ stream: Readable2.from(value) }),
5460
- asyncIterable: ({ value }) => ({ stream: Readable2.from(value) }),
5461
- string: ({ value }) => ({ stream: Readable2.from(value) }),
5462
- uint8Array: ({ value }) => ({ stream: Readable2.from(Buffer4.from(value)) })
5446
+ fileUrl: ({ value }) => ({ stream: (0, import_node_fs5.createReadStream)(value) }),
5447
+ filePath: ({ value: { file } }) => ({ stream: (0, import_node_fs5.createReadStream)(file) }),
5448
+ webStream: ({ value }) => ({ stream: import_node_stream3.Readable.fromWeb(value) }),
5449
+ iterable: ({ value }) => ({ stream: import_node_stream3.Readable.from(value) }),
5450
+ asyncIterable: ({ value }) => ({ stream: import_node_stream3.Readable.from(value) }),
5451
+ string: ({ value }) => ({ stream: import_node_stream3.Readable.from(value) }),
5452
+ uint8Array: ({ value }) => ({ stream: import_node_stream3.Readable.from(import_node_buffer3.Buffer.from(value)) })
5463
5453
  },
5464
5454
  output: {
5465
5455
  ...addProperties2,
5466
- fileUrl: ({ value }) => ({ stream: createWriteStream(value) }),
5467
- filePath: ({ value: { file, append } }) => ({ stream: createWriteStream(file, append ? { flags: "a" } : {}) }),
5468
- webStream: ({ value }) => ({ stream: Writable2.fromWeb(value) }),
5456
+ fileUrl: ({ value }) => ({ stream: (0, import_node_fs5.createWriteStream)(value) }),
5457
+ filePath: ({ value: { file, append } }) => ({ stream: (0, import_node_fs5.createWriteStream)(file, append ? { flags: "a" } : {}) }),
5458
+ webStream: ({ value }) => ({ stream: import_node_stream3.Writable.fromWeb(value) }),
5469
5459
  iterable: forbiddenIfAsync,
5470
5460
  asyncIterable: forbiddenIfAsync,
5471
5461
  string: forbiddenIfAsync,
@@ -5474,9 +5464,9 @@ var addPropertiesAsync = {
5474
5464
  };
5475
5465
 
5476
5466
  // node_modules/@sindresorhus/merge-streams/index.js
5477
- import { on as on4, once as once7 } from "events";
5478
- import { PassThrough as PassThroughStream, getDefaultHighWaterMark as getDefaultHighWaterMark2 } from "stream";
5479
- import { finished as finished2 } from "stream/promises";
5467
+ var import_node_events10 = require("events");
5468
+ var import_node_stream4 = require("stream");
5469
+ var import_promises7 = require("stream/promises");
5480
5470
  function mergeStreams(streams) {
5481
5471
  if (!Array.isArray(streams)) {
5482
5472
  throw new TypeError(`Expected an array, got \`${typeof streams}\`.`);
@@ -5498,12 +5488,12 @@ function mergeStreams(streams) {
5498
5488
  }
5499
5489
  var getHighWaterMark = (streams, objectMode) => {
5500
5490
  if (streams.length === 0) {
5501
- return getDefaultHighWaterMark2(objectMode);
5491
+ return (0, import_node_stream4.getDefaultHighWaterMark)(objectMode);
5502
5492
  }
5503
5493
  const highWaterMarks = streams.filter(({ readableObjectMode }) => readableObjectMode === objectMode).map(({ readableHighWaterMark }) => readableHighWaterMark);
5504
5494
  return Math.max(...highWaterMarks);
5505
5495
  };
5506
- var MergedStream = class extends PassThroughStream {
5496
+ var MergedStream = class extends import_node_stream4.PassThrough {
5507
5497
  #streams = /* @__PURE__ */ new Set([]);
5508
5498
  #ended = /* @__PURE__ */ new Set([]);
5509
5499
  #aborted = /* @__PURE__ */ new Set([]);
@@ -5559,14 +5549,14 @@ var onMergedStreamFinished = async (passThroughStream, streams, unpipeEvent) =>
5559
5549
  };
5560
5550
  var onMergedStreamEnd = async (passThroughStream, { signal }) => {
5561
5551
  try {
5562
- await finished2(passThroughStream, { signal, cleanup: true });
5552
+ await (0, import_promises7.finished)(passThroughStream, { signal, cleanup: true });
5563
5553
  } catch (error) {
5564
5554
  errorOrAbortStream(passThroughStream, error);
5565
5555
  throw error;
5566
5556
  }
5567
5557
  };
5568
5558
  var onInputStreamsUnpipe = async (passThroughStream, streams, unpipeEvent, { signal }) => {
5569
- for await (const [unpipedStream] of on4(passThroughStream, "unpipe", { signal })) {
5559
+ for await (const [unpipedStream] of (0, import_node_events10.on)(passThroughStream, "unpipe", { signal })) {
5570
5560
  if (streams.has(unpipedStream)) {
5571
5561
  unpipedStream.emit(unpipeEvent);
5572
5562
  }
@@ -5626,7 +5616,7 @@ var afterMergedStreamFinished = async (onFinished, stream, { signal }) => {
5626
5616
  };
5627
5617
  var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, aborted: aborted2, controller: { signal } }) => {
5628
5618
  try {
5629
- await finished2(stream, {
5619
+ await (0, import_promises7.finished)(stream, {
5630
5620
  signal,
5631
5621
  cleanup: true,
5632
5622
  readable: true,
@@ -5647,9 +5637,9 @@ var onInputStreamEnd = async ({ passThroughStream, stream, streams, ended, abort
5647
5637
  }
5648
5638
  };
5649
5639
  var onInputStreamUnpipe = async ({ stream, streams, ended, aborted: aborted2, unpipeEvent, controller: { signal } }) => {
5650
- await once7(stream, unpipeEvent, { signal });
5640
+ await (0, import_node_events10.once)(stream, unpipeEvent, { signal });
5651
5641
  if (!stream.readable) {
5652
- return once7(signal, "abort", { signal });
5642
+ return (0, import_node_events10.once)(signal, "abort", { signal });
5653
5643
  }
5654
5644
  streams.delete(stream);
5655
5645
  ended.delete(stream);
@@ -5691,7 +5681,7 @@ var PASSTHROUGH_LISTENERS_COUNT = 2;
5691
5681
  var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
5692
5682
 
5693
5683
  // node_modules/execa/lib/io/pipeline.js
5694
- import { finished as finished3 } from "stream/promises";
5684
+ var import_promises8 = require("stream/promises");
5695
5685
  var pipeStreams = (source, destination) => {
5696
5686
  source.pipe(destination);
5697
5687
  onSourceFinish(source, destination);
@@ -5702,7 +5692,7 @@ var onSourceFinish = async (source, destination) => {
5702
5692
  return;
5703
5693
  }
5704
5694
  try {
5705
- await finished3(source, { cleanup: true, readable: true, writable: false });
5695
+ await (0, import_promises8.finished)(source, { cleanup: true, readable: true, writable: false });
5706
5696
  } catch {
5707
5697
  }
5708
5698
  endDestinationStream(destination);
@@ -5717,7 +5707,7 @@ var onDestinationFinish = async (source, destination) => {
5717
5707
  return;
5718
5708
  }
5719
5709
  try {
5720
- await finished3(destination, { cleanup: true, readable: false, writable: true });
5710
+ await (0, import_promises8.finished)(destination, { cleanup: true, readable: false, writable: true });
5721
5711
  } catch {
5722
5712
  }
5723
5713
  abortSourceStream(source);
@@ -5781,7 +5771,7 @@ var setStandardStreamMaxListeners = (stream, { signal }) => {
5781
5771
  var MAX_LISTENERS_INCREMENT = 2;
5782
5772
 
5783
5773
  // node_modules/execa/lib/terminate/cleanup.js
5784
- import { addAbortListener as addAbortListener2 } from "events";
5774
+ var import_node_events11 = require("events");
5785
5775
 
5786
5776
  // node_modules/signal-exit/dist/mjs/signals.js
5787
5777
  var signals = [];
@@ -6042,7 +6032,7 @@ var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
6042
6032
  const removeExitHandler = onExit(() => {
6043
6033
  subprocess.kill();
6044
6034
  });
6045
- addAbortListener2(signal, () => {
6035
+ (0, import_node_events11.addAbortListener)(signal, () => {
6046
6036
  removeExitHandler();
6047
6037
  });
6048
6038
  };
@@ -6188,7 +6178,7 @@ var waitForBothSubprocesses = async (subprocessPromises) => {
6188
6178
  };
6189
6179
 
6190
6180
  // node_modules/execa/lib/pipe/streaming.js
6191
- import { finished as finished4 } from "stream/promises";
6181
+ var import_promises9 = require("stream/promises");
6192
6182
  var pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
6193
6183
  const mergedStream = MERGED_STREAMS.has(destinationStream) ? pipeMoreSubprocessStream(sourceStream, destinationStream) : pipeFirstSubprocessStream(sourceStream, destinationStream);
6194
6184
  incrementMaxListeners(sourceStream, SOURCE_LISTENERS_PER_PIPE, maxListenersController.signal);
@@ -6209,7 +6199,7 @@ var pipeMoreSubprocessStream = (sourceStream, destinationStream) => {
6209
6199
  };
6210
6200
  var cleanupMergedStreamsMap = async (destinationStream) => {
6211
6201
  try {
6212
- await finished4(destinationStream, { cleanup: true, readable: false, writable: true });
6202
+ await (0, import_promises9.finished)(destinationStream, { cleanup: true, readable: false, writable: true });
6213
6203
  } catch {
6214
6204
  }
6215
6205
  MERGED_STREAMS.delete(destinationStream);
@@ -6219,10 +6209,10 @@ var SOURCE_LISTENERS_PER_PIPE = 2;
6219
6209
  var DESTINATION_LISTENERS_PER_PIPE = 1;
6220
6210
 
6221
6211
  // node_modules/execa/lib/pipe/abort.js
6222
- import { aborted } from "util";
6212
+ var import_node_util8 = require("util");
6223
6213
  var unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
6224
6214
  var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
6225
- await aborted(unpipeSignal, sourceStream);
6215
+ await (0, import_node_util8.aborted)(unpipeSignal, sourceStream);
6226
6216
  await mergedStream.remove(sourceStream);
6227
6217
  const error = new Error("Pipe canceled by `unpipeSignal` option.");
6228
6218
  throw createNonCommandError({
@@ -6293,11 +6283,11 @@ var handlePipePromise = async ({
6293
6283
  var getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
6294
6284
 
6295
6285
  // node_modules/execa/lib/io/contents.js
6296
- import { setImmediate } from "timers/promises";
6286
+ var import_promises10 = require("timers/promises");
6297
6287
 
6298
6288
  // node_modules/execa/lib/io/iterate.js
6299
- import { on as on5 } from "events";
6300
- import { getDefaultHighWaterMark as getDefaultHighWaterMark3 } from "stream";
6289
+ var import_node_events12 = require("events");
6290
+ var import_node_stream5 = require("stream");
6301
6291
  var iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
6302
6292
  const controller = new AbortController();
6303
6293
  stopReadingOnExit(subprocess, controller);
@@ -6343,7 +6333,7 @@ var stopReadingOnStreamEnd = async (onStreamEnd, controller, stream) => {
6343
6333
  }
6344
6334
  };
6345
6335
  var iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) => {
6346
- const onStdoutChunk = on5(stream, "data", {
6336
+ const onStdoutChunk = (0, import_node_events12.on)(stream, "data", {
6347
6337
  signal: controller.signal,
6348
6338
  highWaterMark: HIGH_WATER_MARK,
6349
6339
  // Backward compatibility with older name for this option
@@ -6361,7 +6351,7 @@ var iterateOnStream = ({ stream, controller, binary, shouldEncode, encoding, sho
6361
6351
  preserveNewlines
6362
6352
  });
6363
6353
  };
6364
- var DEFAULT_OBJECT_HIGH_WATER_MARK = getDefaultHighWaterMark3(true);
6354
+ var DEFAULT_OBJECT_HIGH_WATER_MARK = (0, import_node_stream5.getDefaultHighWaterMark)(true);
6365
6355
  var HIGH_WATER_MARK = DEFAULT_OBJECT_HIGH_WATER_MARK;
6366
6356
  var iterateOnData = async function* ({ onStdoutChunk, controller, binary, shouldEncode, encoding, shouldSplit, preserveNewlines }) {
6367
6357
  const generators = getGenerators({
@@ -6445,7 +6435,7 @@ var logOutputAsync = async ({ stream, onStreamEnd, fdNumber, encoding, allMixed,
6445
6435
  await logLines(linesIterable, stream, fdNumber, verboseInfo);
6446
6436
  };
6447
6437
  var resumeStream = async (stream) => {
6448
- await setImmediate();
6438
+ await (0, import_promises10.setImmediate)();
6449
6439
  if (stream.readableFlowing === null) {
6450
6440
  stream.resume();
6451
6441
  }
@@ -6480,14 +6470,14 @@ var getBufferedData = async (streamPromise) => {
6480
6470
  var handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
6481
6471
 
6482
6472
  // node_modules/execa/lib/resolve/wait-stream.js
6483
- import { finished as finished5 } from "stream/promises";
6473
+ var import_promises11 = require("stream/promises");
6484
6474
  var waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
6485
6475
  const state = handleStdinDestroy(stream, streamInfo);
6486
6476
  const abortController = new AbortController();
6487
6477
  try {
6488
6478
  await Promise.race([
6489
6479
  ...stopOnExit ? [streamInfo.exitPromise] : [],
6490
- finished5(stream, { cleanup: true, signal: abortController.signal })
6480
+ (0, import_promises11.finished)(stream, { cleanup: true, signal: abortController.signal })
6491
6481
  ]);
6492
6482
  } catch (error) {
6493
6483
  if (!state.stdinCleanedUp) {
@@ -6602,7 +6592,7 @@ var getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =>
6602
6592
  var getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
6603
6593
 
6604
6594
  // node_modules/execa/lib/resolve/wait-subprocess.js
6605
- import { once as once8 } from "events";
6595
+ var import_node_events13 = require("events");
6606
6596
 
6607
6597
  // node_modules/execa/lib/verbose/ipc.js
6608
6598
  var shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
@@ -6766,7 +6756,7 @@ var waitForCustomStreamsEnd = (fileDescriptors, streamInfo) => fileDescriptors.f
6766
6756
  stopOnExit: type === "native"
6767
6757
  })));
6768
6758
  var throwOnSubprocessError = async (subprocess, { signal }) => {
6769
- const [error] = await once8(subprocess, "error", { signal });
6759
+ const [error] = await (0, import_node_events13.once)(subprocess, "error", { signal });
6770
6760
  throw error;
6771
6761
  };
6772
6762
 
@@ -6797,11 +6787,11 @@ var waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
6797
6787
  };
6798
6788
 
6799
6789
  // node_modules/execa/lib/convert/readable.js
6800
- import { Readable as Readable3 } from "stream";
6801
- import { callbackify as callbackify2 } from "util";
6790
+ var import_node_stream6 = require("stream");
6791
+ var import_node_util9 = require("util");
6802
6792
 
6803
6793
  // node_modules/execa/lib/convert/shared.js
6804
- import { finished as finished6 } from "stream/promises";
6794
+ var import_promises12 = require("stream/promises");
6805
6795
  var safeWaitForSubprocessStdin = async (subprocessStdin) => {
6806
6796
  if (subprocessStdin === void 0) {
6807
6797
  return;
@@ -6821,10 +6811,10 @@ var safeWaitForSubprocessStdout = async (subprocessStdout) => {
6821
6811
  }
6822
6812
  };
6823
6813
  var waitForSubprocessStdin = async (subprocessStdin) => {
6824
- await finished6(subprocessStdin, { cleanup: true, readable: false, writable: true });
6814
+ await (0, import_promises12.finished)(subprocessStdin, { cleanup: true, readable: false, writable: true });
6825
6815
  };
6826
6816
  var waitForSubprocessStdout = async (subprocessStdout) => {
6827
- await finished6(subprocessStdout, { cleanup: true, readable: true, writable: false });
6817
+ await (0, import_promises12.finished)(subprocessStdout, { cleanup: true, readable: true, writable: false });
6828
6818
  };
6829
6819
  var waitForSubprocess = async (subprocess, error) => {
6830
6820
  await subprocess;
@@ -6852,9 +6842,9 @@ var createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binar
6852
6842
  encoding,
6853
6843
  preserveNewlines
6854
6844
  });
6855
- const readable2 = new Readable3({
6845
+ const readable2 = new import_node_stream6.Readable({
6856
6846
  read,
6857
- destroy: callbackify2(onReadableDestroy.bind(void 0, { subprocessStdout, subprocess, waitReadableDestroy })),
6847
+ destroy: (0, import_node_util9.callbackify)(onReadableDestroy.bind(void 0, { subprocessStdout, subprocess, waitReadableDestroy })),
6858
6848
  highWaterMark: readableHighWaterMark,
6859
6849
  objectMode: readableObjectMode,
6860
6850
  encoding: readableEncoding
@@ -6926,13 +6916,13 @@ var destroyOtherReadable = (stream, error) => {
6926
6916
  };
6927
6917
 
6928
6918
  // node_modules/execa/lib/convert/writable.js
6929
- import { Writable as Writable3 } from "stream";
6930
- import { callbackify as callbackify3 } from "util";
6919
+ var import_node_stream7 = require("stream");
6920
+ var import_node_util10 = require("util");
6931
6921
  var createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
6932
6922
  const { subprocessStdin, waitWritableFinal, waitWritableDestroy } = getSubprocessStdin(subprocess, to, concurrentStreams);
6933
- const writable2 = new Writable3({
6923
+ const writable2 = new import_node_stream7.Writable({
6934
6924
  ...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
6935
- destroy: callbackify3(onWritableDestroy.bind(void 0, {
6925
+ destroy: (0, import_node_util10.callbackify)(onWritableDestroy.bind(void 0, {
6936
6926
  subprocessStdin,
6937
6927
  subprocess,
6938
6928
  waitWritableFinal,
@@ -6952,7 +6942,7 @@ var getSubprocessStdin = (subprocess, to, concurrentStreams) => {
6952
6942
  };
6953
6943
  var getWritableMethods = (subprocessStdin, subprocess, waitWritableFinal) => ({
6954
6944
  write: onWrite.bind(void 0, subprocessStdin),
6955
- final: callbackify3(onWritableFinal.bind(void 0, subprocessStdin, subprocess, waitWritableFinal))
6945
+ final: (0, import_node_util10.callbackify)(onWritableFinal.bind(void 0, subprocessStdin, subprocess, waitWritableFinal))
6956
6946
  });
6957
6947
  var onWrite = (subprocessStdin, chunk, encoding, done) => {
6958
6948
  if (subprocessStdin.write(chunk, encoding)) {
@@ -6992,8 +6982,8 @@ var destroyOtherWritable = (stream, error) => {
6992
6982
  };
6993
6983
 
6994
6984
  // node_modules/execa/lib/convert/duplex.js
6995
- import { Duplex as Duplex3 } from "stream";
6996
- import { callbackify as callbackify4 } from "util";
6985
+ var import_node_stream8 = require("stream");
6986
+ var import_node_util11 = require("util");
6997
6987
  var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
6998
6988
  const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
6999
6989
  const { subprocessStdout, waitReadableDestroy } = getSubprocessStdout(subprocess, from, concurrentStreams);
@@ -7006,10 +6996,10 @@ var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, bin
7006
6996
  encoding,
7007
6997
  preserveNewlines
7008
6998
  });
7009
- const duplex2 = new Duplex3({
6999
+ const duplex2 = new import_node_stream8.Duplex({
7010
7000
  read,
7011
7001
  ...getWritableMethods(subprocessStdin, subprocess, waitWritableFinal),
7012
- destroy: callbackify4(onDuplexDestroy.bind(void 0, {
7002
+ destroy: (0, import_node_util11.callbackify)(onDuplexDestroy.bind(void 0, {
7013
7003
  subprocessStdout,
7014
7004
  subprocessStdin,
7015
7005
  subprocess,
@@ -7146,7 +7136,7 @@ var handleAsyncOptions = ({ timeout, signal, ...options }) => {
7146
7136
  var spawnSubprocessAsync = ({ file, commandArguments, options, startTime, verboseInfo, command, escapedCommand, fileDescriptors }) => {
7147
7137
  let subprocess;
7148
7138
  try {
7149
- subprocess = spawn(...concatenateShell(file, commandArguments, options));
7139
+ subprocess = (0, import_node_child_process5.spawn)(...concatenateShell(file, commandArguments, options));
7150
7140
  } catch (error) {
7151
7141
  return handleEarlyError({
7152
7142
  error,
@@ -7159,7 +7149,7 @@ var spawnSubprocessAsync = ({ file, commandArguments, options, startTime, verbos
7159
7149
  });
7160
7150
  }
7161
7151
  const controller = new AbortController();
7162
- setMaxListeners(Number.POSITIVE_INFINITY, controller.signal);
7152
+ (0, import_node_events14.setMaxListeners)(Number.POSITIVE_INFINITY, controller.signal);
7163
7153
  const originalStreams = [...subprocess.stdio];
7164
7154
  pipeOutputAsync(subprocess, fileDescriptors, controller);
7165
7155
  cleanupOnExit(subprocess, options, controller);
@@ -7395,8 +7385,8 @@ async function runGitDetailed(args, cwd) {
7395
7385
  };
7396
7386
  }
7397
7387
  function normalizeRepoRelativePath(value) {
7398
- const normalized = path7.posix.normalize(value.replace(/\\/g, "/").trim());
7399
- if (!normalized || normalized === "." || normalized === ".." || normalized.startsWith("../") || path7.posix.isAbsolute(normalized)) {
7388
+ const normalized = import_path2.default.posix.normalize(value.replace(/\\/g, "/").trim());
7389
+ if (!normalized || normalized === "." || normalized === ".." || normalized.startsWith("../") || import_path2.default.posix.isAbsolute(normalized)) {
7400
7390
  throw new RemixError("Git returned an invalid repository-relative path.", {
7401
7391
  exitCode: 1,
7402
7392
  hint: `Path: ${value}`
@@ -7405,21 +7395,21 @@ function normalizeRepoRelativePath(value) {
7405
7395
  return normalized;
7406
7396
  }
7407
7397
  function resolveRepoRelativePath(repoRoot, relativePath) {
7408
- return path7.resolve(repoRoot, ...relativePath.split("/"));
7398
+ return import_path2.default.resolve(repoRoot, ...relativePath.split("/"));
7409
7399
  }
7410
7400
  function isWithinRepoRoot(repoRoot, targetPath) {
7411
- const relative = path7.relative(repoRoot, targetPath);
7412
- return relative === "" || !relative.startsWith("..") && !path7.isAbsolute(relative);
7401
+ const relative = import_path2.default.relative(repoRoot, targetPath);
7402
+ return relative === "" || !relative.startsWith("..") && !import_path2.default.isAbsolute(relative);
7413
7403
  }
7414
7404
  function sha256Hex(value) {
7415
- return createHash("sha256").update(value).digest("hex");
7405
+ return (0, import_crypto.createHash)("sha256").update(value).digest("hex");
7416
7406
  }
7417
7407
  function resolveGitReportedPath(cwd, reportedPath) {
7418
7408
  const value = reportedPath.trim();
7419
7409
  if (!value) {
7420
7410
  throw new RemixError("Git returned an empty internal path.", { exitCode: 1 });
7421
7411
  }
7422
- return path7.isAbsolute(value) ? value : path7.resolve(cwd, value);
7412
+ return import_path2.default.isAbsolute(value) ? value : import_path2.default.resolve(cwd, value);
7423
7413
  }
7424
7414
  function parseGitNameStatusZ(stdout) {
7425
7415
  const tokens = stdout.split("\0");
@@ -7490,12 +7480,12 @@ function classifyGitApplyFailure(detail) {
7490
7480
  return "unknown";
7491
7481
  }
7492
7482
  async function pruneEmptyParentDirectories(repoRoot, filePath) {
7493
- let current = path7.dirname(filePath);
7483
+ let current = import_path2.default.dirname(filePath);
7494
7484
  while (current !== repoRoot && isWithinRepoRoot(repoRoot, current)) {
7495
- const entries = await fs.readdir(current).catch(() => null);
7485
+ const entries = await import_promises13.default.readdir(current).catch(() => null);
7496
7486
  if (!entries || entries.length > 0) return;
7497
- await fs.rmdir(current).catch(() => void 0);
7498
- current = path7.dirname(current);
7487
+ await import_promises13.default.rmdir(current).catch(() => void 0);
7488
+ current = import_path2.default.dirname(current);
7499
7489
  }
7500
7490
  }
7501
7491
  async function findGitRoot(startDir) {
@@ -7550,8 +7540,8 @@ async function getWorkspaceSnapshot(cwd) {
7550
7540
  throw new RemixError("Failed to resolve local HEAD commit.", { exitCode: 1 });
7551
7541
  }
7552
7542
  const includedUntrackedPaths = Array.from(new Set((await listUntrackedFiles(cwd)).map((entry) => normalizeRepoRelativePath(entry))));
7553
- const tempDir = await fs.mkdtemp(path7.join(os.tmpdir(), "remix-index-"));
7554
- const tempIndexPath = path7.join(tempDir, "index");
7543
+ const tempDir = await import_promises13.default.mkdtemp(import_path2.default.join(import_os.default.tmpdir(), "remix-index-"));
7544
+ const tempIndexPath = import_path2.default.join(tempDir, "index");
7555
7545
  const env = { ...process.env, GIT_INDEX_FILE: tempIndexPath };
7556
7546
  try {
7557
7547
  try {
@@ -7574,14 +7564,14 @@ async function getWorkspaceSnapshot(cwd) {
7574
7564
  });
7575
7565
  }
7576
7566
  } finally {
7577
- await fs.rm(tempDir, { recursive: true, force: true }).catch(() => void 0);
7567
+ await import_promises13.default.rm(tempDir, { recursive: true, force: true }).catch(() => void 0);
7578
7568
  }
7579
7569
  }
7580
7570
  async function writeTempUnifiedDiffBackup(diff, prefix = "remix-add-backup") {
7581
7571
  const safePrefix = prefix.replace(/[^a-zA-Z0-9._-]+/g, "-") || "remix-add-backup";
7582
- const tmpDir = await fs.mkdtemp(path7.join(os.tmpdir(), `${safePrefix}-`));
7583
- const backupPath = path7.join(tmpDir, "submitted.diff");
7584
- await fs.writeFile(backupPath, diff, "utf8");
7572
+ const tmpDir = await import_promises13.default.mkdtemp(import_path2.default.join(import_os.default.tmpdir(), `${safePrefix}-`));
7573
+ const backupPath = import_path2.default.join(tmpDir, "submitted.diff");
7574
+ await import_promises13.default.writeFile(backupPath, diff, "utf8");
7585
7575
  return { backupPath, diffSha256: sha256Hex(diff) };
7586
7576
  }
7587
7577
  async function validateUnifiedDiff(cwd, diff) {
@@ -7598,7 +7588,7 @@ async function validateUnifiedDiff(cwd, diff) {
7598
7588
  detail
7599
7589
  };
7600
7590
  } finally {
7601
- await fs.rm(path7.dirname(backupPath), { recursive: true, force: true }).catch(() => void 0);
7591
+ await import_promises13.default.rm(import_path2.default.dirname(backupPath), { recursive: true, force: true }).catch(() => void 0);
7602
7592
  }
7603
7593
  }
7604
7594
  async function preserveWorkspaceChanges(cwd, prefix = "remix-add-preserve") {
@@ -7618,7 +7608,7 @@ async function preserveWorkspaceChanges(cwd, prefix = "remix-add-preserve") {
7618
7608
  }
7619
7609
  async function reapplyPreservedWorkspaceChanges(cwd, preserved, operation = "`remix collab add`") {
7620
7610
  const patchFilePath = preserved.preservedDiffPath;
7621
- const tempPatchHash = await fs.readFile(patchFilePath, "utf8").then((content) => sha256Hex(content)).catch(() => null);
7611
+ const tempPatchHash = await import_promises13.default.readFile(patchFilePath, "utf8").then((content) => sha256Hex(content)).catch(() => null);
7622
7612
  if (!tempPatchHash) {
7623
7613
  return { status: "failed", detail: "Preserved diff artifact is missing." };
7624
7614
  }
@@ -7750,7 +7740,7 @@ async function discardCapturedUntrackedChanges(repoRoot, capturedPaths) {
7750
7740
  hint: `Path: ${relativePath}`
7751
7741
  });
7752
7742
  }
7753
- await fs.rm(absolutePath, { recursive: true, force: true }).catch((err) => {
7743
+ await import_promises13.default.rm(absolutePath, { recursive: true, force: true }).catch((err) => {
7754
7744
  throw new RemixError("Failed to remove a captured untracked path before syncing.", {
7755
7745
  exitCode: 1,
7756
7746
  hint: err instanceof Error ? `${relativePath}
@@ -7826,15 +7816,15 @@ function summarizeUnifiedDiff(diff) {
7826
7816
  }
7827
7817
 
7828
7818
  // node_modules/@remixhq/core/dist/collab.js
7829
- import fs3 from "fs/promises";
7830
- import path32 from "path";
7831
- import { createHash as createHash2 } from "crypto";
7832
- import fs4 from "fs/promises";
7833
- import os2 from "os";
7834
- import path8 from "path";
7835
- import fs22 from "fs/promises";
7836
- import os22 from "os";
7837
- import path22 from "path";
7819
+ var import_promises14 = __toESM(require("fs/promises"), 1);
7820
+ var import_path3 = __toESM(require("path"), 1);
7821
+ var import_crypto2 = require("crypto");
7822
+ var import_promises15 = __toESM(require("fs/promises"), 1);
7823
+ var import_os2 = __toESM(require("os"), 1);
7824
+ var import_path4 = __toESM(require("path"), 1);
7825
+ var import_promises16 = __toESM(require("fs/promises"), 1);
7826
+ var import_os3 = __toESM(require("os"), 1);
7827
+ var import_path5 = __toESM(require("path"), 1);
7838
7828
  function describeBranch(value) {
7839
7829
  const normalized = String(value ?? "").trim();
7840
7830
  return normalized || "(detached)";
@@ -7878,7 +7868,7 @@ function sleep(ms) {
7878
7868
  return new Promise((resolve) => setTimeout(resolve, ms));
7879
7869
  }
7880
7870
  function buildDeterministicIdempotencyKey(parts) {
7881
- return createHash2("sha256").update(JSON.stringify(parts)).digest("hex");
7871
+ return (0, import_crypto2.createHash)("sha256").update(JSON.stringify(parts)).digest("hex");
7882
7872
  }
7883
7873
  function formatCliErrorDetail(err) {
7884
7874
  if (err instanceof RemixError) {
@@ -8137,7 +8127,7 @@ function createOwner(params) {
8137
8127
  operation: params.operation,
8138
8128
  repoRoot: params.repoRoot,
8139
8129
  pid: process.pid,
8140
- hostname: os2.hostname(),
8130
+ hostname: import_os2.default.hostname(),
8141
8131
  startedAt: now,
8142
8132
  heartbeatAt: now,
8143
8133
  version: process.version,
@@ -8145,12 +8135,12 @@ function createOwner(params) {
8145
8135
  };
8146
8136
  }
8147
8137
  async function writeOwnerMetadata(ownerPath, owner) {
8148
- await fs4.writeFile(ownerPath, `${JSON.stringify(owner, null, 2)}
8138
+ await import_promises15.default.writeFile(ownerPath, `${JSON.stringify(owner, null, 2)}
8149
8139
  `, "utf8");
8150
8140
  }
8151
8141
  async function readOwnerMetadata(ownerPath) {
8152
8142
  try {
8153
- const raw = await fs4.readFile(ownerPath, "utf8");
8143
+ const raw = await import_promises15.default.readFile(ownerPath, "utf8");
8154
8144
  const parsed = JSON.parse(raw);
8155
8145
  if (!parsed || typeof parsed !== "object") return null;
8156
8146
  if (!parsed.operation || !parsed.repoRoot || typeof parsed.pid !== "number" || !parsed.startedAt || !parsed.heartbeatAt) {
@@ -8172,7 +8162,7 @@ async function readOwnerMetadata(ownerPath) {
8172
8162
  }
8173
8163
  async function isProcessAlive(owner) {
8174
8164
  if (!owner) return null;
8175
- if (owner.hostname !== os2.hostname()) return null;
8165
+ if (owner.hostname !== import_os2.default.hostname()) return null;
8176
8166
  try {
8177
8167
  process.kill(owner.pid, 0);
8178
8168
  return true;
@@ -8187,23 +8177,23 @@ async function getLastKnownUpdateMs(lockDir, ownerPath, owner) {
8187
8177
  if (Number.isFinite(heartbeatMs)) return heartbeatMs;
8188
8178
  const startedMs = owner ? Date.parse(owner.startedAt) : Number.NaN;
8189
8179
  if (Number.isFinite(startedMs)) return startedMs;
8190
- const stat = await fs4.stat(ownerPath).catch(() => null);
8180
+ const stat = await import_promises15.default.stat(ownerPath).catch(() => null);
8191
8181
  if (stat) return stat.mtimeMs;
8192
- const dirStat = await fs4.stat(lockDir).catch(() => null);
8182
+ const dirStat = await import_promises15.default.stat(lockDir).catch(() => null);
8193
8183
  if (dirStat) return dirStat.mtimeMs;
8194
8184
  return 0;
8195
8185
  }
8196
8186
  async function ensureLockDir(lockDir) {
8197
- await fs4.mkdir(path8.dirname(lockDir), { recursive: true });
8187
+ await import_promises15.default.mkdir(import_path4.default.dirname(lockDir), { recursive: true });
8198
8188
  }
8199
8189
  async function tryAcquireLock(lockDir, ownerPath, owner) {
8200
8190
  try {
8201
8191
  await ensureLockDir(lockDir);
8202
- await fs4.mkdir(lockDir);
8192
+ await import_promises15.default.mkdir(lockDir);
8203
8193
  try {
8204
8194
  await writeOwnerMetadata(ownerPath, owner);
8205
8195
  } catch (error) {
8206
- await fs4.rm(lockDir, { recursive: true, force: true }).catch(() => void 0);
8196
+ await import_promises15.default.rm(lockDir, { recursive: true, force: true }).catch(() => void 0);
8207
8197
  throw error;
8208
8198
  }
8209
8199
  return true;
@@ -8252,7 +8242,7 @@ async function acquirePhysicalLock(lockDir, ownerPath, owner, options) {
8252
8242
  const alive = await isProcessAlive(currentOwner2);
8253
8243
  if (ageMs >= options.staleMs && alive !== true) {
8254
8244
  notices.push(buildStaleRecoveryNotice(currentOwner2));
8255
- await fs4.rm(lockDir, { recursive: true, force: true }).catch(() => void 0);
8245
+ await import_promises15.default.rm(lockDir, { recursive: true, force: true }).catch(() => void 0);
8256
8246
  continue;
8257
8247
  }
8258
8248
  await sleep2(RETRY_DELAY_MS);
@@ -8277,7 +8267,7 @@ function startHeartbeat(lockDir, ownerPath, owner, heartbeatMs) {
8277
8267
  };
8278
8268
  owner.heartbeatAt = nextOwner.heartbeatAt;
8279
8269
  void writeOwnerMetadata(ownerPath, nextOwner).catch(() => void 0);
8280
- void fs4.utimes(lockDir, /* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()).catch(() => void 0);
8270
+ void import_promises15.default.utimes(lockDir, /* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()).catch(() => void 0);
8281
8271
  }, heartbeatMs);
8282
8272
  }
8283
8273
  async function releaseReentrantLock(lockDir) {
@@ -8287,12 +8277,12 @@ async function releaseReentrantLock(lockDir) {
8287
8277
  if (held.count > 0) return;
8288
8278
  clearInterval(held.heartbeatTimer);
8289
8279
  heldLocks.delete(lockDir);
8290
- await fs4.rm(lockDir, { recursive: true, force: true }).catch(() => void 0);
8280
+ await import_promises15.default.rm(lockDir, { recursive: true, force: true }).catch(() => void 0);
8291
8281
  }
8292
8282
  async function withRepoMutationLock(options, fn) {
8293
8283
  const repoRoot = await findGitRoot(options.cwd);
8294
8284
  const gitCommonDir = await getGitCommonDir(repoRoot);
8295
- const lockDir = path8.join(gitCommonDir, "remix", "locks", "repo-mutation.lock");
8285
+ const lockDir = import_path4.default.join(gitCommonDir, "remix", "locks", "repo-mutation.lock");
8296
8286
  const owner = createOwner({
8297
8287
  operation: options.operation,
8298
8288
  repoRoot,
@@ -8304,11 +8294,11 @@ async function withRepoMutationLock(options, fn) {
8304
8294
  const existing = heldLocks.get(lockDir);
8305
8295
  let notices = [];
8306
8296
  if (!existing) {
8307
- notices = await acquirePhysicalLock(lockDir, path8.join(lockDir, "owner.json"), owner, {
8297
+ notices = await acquirePhysicalLock(lockDir, import_path4.default.join(lockDir, "owner.json"), owner, {
8308
8298
  acquireTimeoutMs,
8309
8299
  staleMs
8310
8300
  });
8311
- const ownerPath = path8.join(lockDir, "owner.json");
8301
+ const ownerPath = import_path4.default.join(lockDir, "owner.json");
8312
8302
  heldLocks.set(lockDir, {
8313
8303
  count: 1,
8314
8304
  lockDir,
@@ -8427,10 +8417,10 @@ async function collabSync(params) {
8427
8417
  allowBranchMismatch: params.allowBranchMismatch,
8428
8418
  operation: "`remix collab sync`"
8429
8419
  });
8430
- const tempDir = await fs22.mkdtemp(path22.join(os22.tmpdir(), "remix-sync-"));
8431
- const bundlePath = path22.join(tempDir, "sync-local.bundle");
8420
+ const tempDir = await import_promises16.default.mkdtemp(import_path5.default.join(import_os3.default.tmpdir(), "remix-sync-"));
8421
+ const bundlePath = import_path5.default.join(tempDir, "sync-local.bundle");
8432
8422
  try {
8433
- await fs22.writeFile(bundlePath, Buffer.from(bundleBase64, "base64"));
8423
+ await import_promises16.default.writeFile(bundlePath, Buffer.from(bundleBase64, "base64"));
8434
8424
  await importGitBundle(lockedRepoRoot, bundlePath, bundleRef);
8435
8425
  await ensureCommitExists(lockedRepoRoot, sync.targetCommitHash);
8436
8426
  const localCommitHash = await fastForwardToCommit(lockedRepoRoot, sync.targetCommitHash);
@@ -8442,7 +8432,7 @@ async function collabSync(params) {
8442
8432
  ...warnings.length > 0 ? { warnings } : {}
8443
8433
  };
8444
8434
  } finally {
8445
- await fs22.rm(tempDir, { recursive: true, force: true });
8435
+ await import_promises16.default.rm(tempDir, { recursive: true, force: true });
8446
8436
  }
8447
8437
  }
8448
8438
  );
@@ -8592,7 +8582,7 @@ async function collabAdd(params) {
8592
8582
  const replayResp = await params.api.startChangeStepReplay(binding.currentAppId, {
8593
8583
  prompt,
8594
8584
  assistantResponse: assistantResponse ?? void 0,
8595
- diff: await fs3.readFile(preserved.preservedDiffPath, "utf8"),
8585
+ diff: await import_promises14.default.readFile(preserved.preservedDiffPath, "utf8"),
8596
8586
  baseCommitHash: preserved.baseHeadCommitHash,
8597
8587
  targetHeadCommitHash: headCommitHash,
8598
8588
  expectedPaths: preserved.stagePlan.expectedPaths,
@@ -8724,7 +8714,7 @@ async function collabAdd(params) {
8724
8714
  dryRun: false,
8725
8715
  allowBranchMismatch: params.allowBranchMismatch
8726
8716
  });
8727
- await fs3.rm(path32.dirname(backupPath), { recursive: true, force: true }).catch(() => void 0);
8717
+ await import_promises14.default.rm(import_path3.default.dirname(backupPath), { recursive: true, force: true }).catch(() => void 0);
8728
8718
  } catch (err) {
8729
8719
  const detail = formatCliErrorDetail(err);
8730
8720
  const hint = [
@@ -13193,9 +13183,9 @@ var coerce = {
13193
13183
  var NEVER = INVALID;
13194
13184
 
13195
13185
  // node_modules/@remixhq/core/dist/chunk-EVWDYCBL.js
13196
- import fs5 from "fs/promises";
13197
- import os3 from "os";
13198
- import path9 from "path";
13186
+ var import_promises17 = __toESM(require("fs/promises"), 1);
13187
+ var import_os4 = __toESM(require("os"), 1);
13188
+ var import_path6 = __toESM(require("path"), 1);
13199
13189
 
13200
13190
  // node_modules/tslib/tslib.es6.mjs
13201
13191
  function __rest(s, e) {
@@ -32854,7 +32844,7 @@ var storedSessionSchema = external_exports.object({
32854
32844
  function xdgConfigHome() {
32855
32845
  const value = process.env.XDG_CONFIG_HOME;
32856
32846
  if (typeof value === "string" && value.trim()) return value;
32857
- return path9.join(os3.homedir(), ".config");
32847
+ return import_path6.default.join(import_os4.default.homedir(), ".config");
32858
32848
  }
32859
32849
  async function maybeLoadKeytar() {
32860
32850
  try {
@@ -32872,22 +32862,22 @@ async function maybeLoadKeytar() {
32872
32862
  return null;
32873
32863
  }
32874
32864
  async function ensurePathPermissions(filePath) {
32875
- const dir = path9.dirname(filePath);
32876
- await fs5.mkdir(dir, { recursive: true });
32865
+ const dir = import_path6.default.dirname(filePath);
32866
+ await import_promises17.default.mkdir(dir, { recursive: true });
32877
32867
  try {
32878
- await fs5.chmod(dir, 448);
32868
+ await import_promises17.default.chmod(dir, 448);
32879
32869
  } catch {
32880
32870
  }
32881
32871
  try {
32882
- await fs5.chmod(filePath, 384);
32872
+ await import_promises17.default.chmod(filePath, 384);
32883
32873
  } catch {
32884
32874
  }
32885
32875
  }
32886
32876
  async function writeJsonAtomic(filePath, value) {
32887
- await fs5.mkdir(path9.dirname(filePath), { recursive: true });
32877
+ await import_promises17.default.mkdir(import_path6.default.dirname(filePath), { recursive: true });
32888
32878
  const tmpPath = `${filePath}.tmp-${Date.now()}-${Math.random().toString(16).slice(2)}`;
32889
- await fs5.writeFile(tmpPath, JSON.stringify(value, null, 2) + "\n", "utf8");
32890
- await fs5.rename(tmpPath, filePath);
32879
+ await import_promises17.default.writeFile(tmpPath, JSON.stringify(value, null, 2) + "\n", "utf8");
32880
+ await import_promises17.default.rename(tmpPath, filePath);
32891
32881
  }
32892
32882
  async function writeSessionFileFallback(filePath, session) {
32893
32883
  await writeJsonAtomic(filePath, session);
@@ -32896,7 +32886,7 @@ async function writeSessionFileFallback(filePath, session) {
32896
32886
  function createLocalSessionStore(params) {
32897
32887
  const service = params?.service?.trim() || "remix-cli";
32898
32888
  const account = params?.account?.trim() || "default";
32899
- const filePath = params?.filePath?.trim() || path9.join(xdgConfigHome(), "remix", "session.json");
32889
+ const filePath = params?.filePath?.trim() || import_path6.default.join(xdgConfigHome(), "remix", "session.json");
32900
32890
  return {
32901
32891
  async getSession() {
32902
32892
  const keytar = await maybeLoadKeytar();
@@ -32910,7 +32900,7 @@ function createLocalSessionStore(params) {
32910
32900
  return null;
32911
32901
  }
32912
32902
  }
32913
- const raw = await fs5.readFile(filePath, "utf8").catch(() => null);
32903
+ const raw = await import_promises17.default.readFile(filePath, "utf8").catch(() => null);
32914
32904
  if (!raw) return null;
32915
32905
  try {
32916
32906
  const parsed = storedSessionSchema.safeParse(JSON.parse(raw));
@@ -33096,27 +33086,27 @@ async function createHookCollabApiClient() {
33096
33086
  }
33097
33087
 
33098
33088
  // src/hook-state.ts
33099
- import fs6 from "fs/promises";
33100
- import os4 from "os";
33101
- import path10 from "path";
33102
- import { randomUUID } from "crypto";
33089
+ var import_promises18 = __toESM(require("fs/promises"), 1);
33090
+ var import_node_os4 = __toESM(require("os"), 1);
33091
+ var import_node_path6 = __toESM(require("path"), 1);
33092
+ var import_node_crypto = require("crypto");
33103
33093
  function stateRoot() {
33104
- return path10.join(os4.tmpdir(), "remix-claude-plugin-hooks");
33094
+ return import_node_path6.default.join(import_node_os4.default.tmpdir(), "remix-claude-plugin-hooks");
33105
33095
  }
33106
33096
  function statePath(sessionId) {
33107
- return path10.join(stateRoot(), `${sessionId}.json`);
33097
+ return import_node_path6.default.join(stateRoot(), `${sessionId}.json`);
33108
33098
  }
33109
33099
  function stateLockPath(sessionId) {
33110
- return path10.join(stateRoot(), `${sessionId}.lock`);
33100
+ return import_node_path6.default.join(stateRoot(), `${sessionId}.lock`);
33111
33101
  }
33112
33102
  function stateLockMetaPath(sessionId) {
33113
- return path10.join(stateLockPath(sessionId), "owner.json");
33103
+ return import_node_path6.default.join(stateLockPath(sessionId), "owner.json");
33114
33104
  }
33115
33105
  async function writeJsonAtomic2(filePath, value) {
33116
- await fs6.mkdir(path10.dirname(filePath), { recursive: true });
33106
+ await import_promises18.default.mkdir(import_node_path6.default.dirname(filePath), { recursive: true });
33117
33107
  const tmpPath = `${filePath}.tmp-${Date.now()}-${Math.random().toString(16).slice(2)}`;
33118
- await fs6.writeFile(tmpPath, JSON.stringify(value, null, 2) + "\n", "utf8");
33119
- await fs6.rename(tmpPath, filePath);
33108
+ await import_promises18.default.writeFile(tmpPath, JSON.stringify(value, null, 2) + "\n", "utf8");
33109
+ await import_promises18.default.rename(tmpPath, filePath);
33120
33110
  }
33121
33111
  var STATE_LOCK_WAIT_MS = 2e3;
33122
33112
  var STATE_LOCK_POLL_MS = 25;
@@ -33126,7 +33116,7 @@ async function sleep4(ms) {
33126
33116
  await new Promise((resolve) => setTimeout(resolve, ms));
33127
33117
  }
33128
33118
  async function readStateLockMetadata(sessionId) {
33129
- const raw = await fs6.readFile(stateLockMetaPath(sessionId), "utf8").catch(() => null);
33119
+ const raw = await import_promises18.default.readFile(stateLockMetaPath(sessionId), "utf8").catch(() => null);
33130
33120
  if (!raw) return null;
33131
33121
  try {
33132
33122
  const parsed = JSON.parse(raw);
@@ -33151,13 +33141,13 @@ async function tryRemoveStaleStateLock(sessionId) {
33151
33141
  const metadata = await readStateLockMetadata(sessionId);
33152
33142
  const staleByHeartbeat = metadata && Date.now() - new Date(metadata.heartbeatAt).getTime() > STATE_LOCK_STALE_MS;
33153
33143
  if (staleByHeartbeat) {
33154
- await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
33144
+ await import_promises18.default.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
33155
33145
  return true;
33156
33146
  }
33157
33147
  if (!metadata) {
33158
- const lockStat = await fs6.stat(lockPath).catch(() => null);
33148
+ const lockStat = await import_promises18.default.stat(lockPath).catch(() => null);
33159
33149
  if (lockStat && Date.now() - lockStat.mtimeMs > STATE_LOCK_STALE_MS) {
33160
- await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
33150
+ await import_promises18.default.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
33161
33151
  return true;
33162
33152
  }
33163
33153
  }
@@ -33168,8 +33158,8 @@ async function acquireStateLock(sessionId) {
33168
33158
  const deadline = Date.now() + STATE_LOCK_WAIT_MS;
33169
33159
  while (true) {
33170
33160
  try {
33171
- await fs6.mkdir(lockPath);
33172
- const ownerId = randomUUID();
33161
+ await import_promises18.default.mkdir(lockPath);
33162
+ const ownerId = (0, import_node_crypto.randomUUID)();
33173
33163
  const createdAt = (/* @__PURE__ */ new Date()).toISOString();
33174
33164
  const metadata = {
33175
33165
  ownerId,
@@ -33193,7 +33183,7 @@ async function acquireStateLock(sessionId) {
33193
33183
  clearInterval(heartbeat);
33194
33184
  const currentMetadata = await readStateLockMetadata(sessionId);
33195
33185
  if (currentMetadata?.ownerId === ownerId) {
33196
- await fs6.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
33186
+ await import_promises18.default.rm(lockPath, { recursive: true, force: true }).catch(() => void 0);
33197
33187
  }
33198
33188
  };
33199
33189
  } catch (error) {
@@ -33276,7 +33266,7 @@ async function updatePendingTurnState(sessionId, updater) {
33276
33266
  });
33277
33267
  }
33278
33268
  async function loadPendingTurnState(sessionId) {
33279
- const raw = await fs6.readFile(statePath(sessionId), "utf8").catch(() => null);
33269
+ const raw = await import_promises18.default.readFile(statePath(sessionId), "utf8").catch(() => null);
33280
33270
  if (!raw) return null;
33281
33271
  try {
33282
33272
  const parsed = JSON.parse(raw);
@@ -33351,25 +33341,67 @@ async function listTouchedRepos(sessionId) {
33351
33341
  }
33352
33342
  async function clearPendingTurnState(sessionId) {
33353
33343
  await withStateLock(sessionId, async () => {
33354
- await fs6.rm(statePath(sessionId), { force: true }).catch(() => void 0);
33344
+ await import_promises18.default.rm(statePath(sessionId), { force: true }).catch(() => void 0);
33355
33345
  });
33356
33346
  }
33357
33347
 
33348
+ // package.json
33349
+ var package_default = {
33350
+ name: "@remixhq/claude-plugin",
33351
+ version: "0.1.9",
33352
+ description: "Claude Code plugin for Remix collaboration workflows",
33353
+ homepage: "https://github.com/RemixDotOne/remix-claude-plugin",
33354
+ license: "MIT",
33355
+ repository: {
33356
+ type: "git",
33357
+ url: "https://github.com/RemixDotOne/remix-claude-plugin.git"
33358
+ },
33359
+ type: "module",
33360
+ engines: {
33361
+ node: ">=20"
33362
+ },
33363
+ publishConfig: {
33364
+ access: "public"
33365
+ },
33366
+ files: [
33367
+ "dist",
33368
+ ".claude-plugin/plugin.json",
33369
+ ".mcp.json",
33370
+ "skills",
33371
+ "hooks",
33372
+ "agents"
33373
+ ],
33374
+ scripts: {
33375
+ build: "tsup",
33376
+ postbuild: `node -e "const fs=require('node:fs'); for (const p of ['dist/mcp-server.cjs','dist/hook-pre-git.cjs','dist/hook-user-prompt.cjs','dist/hook-post-collab.cjs','dist/hook-stop-collab.cjs']) fs.chmodSync(p, 0o755);"`,
33377
+ dev: "tsx src/mcp-server.ts",
33378
+ typecheck: "tsc -p tsconfig.json --noEmit",
33379
+ prepack: "npm run build"
33380
+ },
33381
+ dependencies: {
33382
+ "@remixhq/core": "^0.1.7",
33383
+ "@remixhq/mcp": "^0.1.7"
33384
+ },
33385
+ devDependencies: {
33386
+ "@types/node": "^25.4.0",
33387
+ tsup: "^8.5.1",
33388
+ tsx: "^4.21.0",
33389
+ typescript: "^5.9.3"
33390
+ }
33391
+ };
33392
+
33358
33393
  // src/metadata.ts
33359
- import { createRequire } from "module";
33360
- var require2 = createRequire(import.meta.url);
33361
- var pkg = require2("../package.json");
33362
33394
  var pluginMetadata = {
33363
- name: pkg.name,
33364
- version: pkg.version,
33365
- description: pkg.description,
33395
+ name: package_default.name,
33396
+ version: package_default.version,
33397
+ description: package_default.description,
33366
33398
  pluginId: "remix",
33367
33399
  agentName: "remix-collab"
33368
33400
  };
33369
33401
 
33370
33402
  // src/hook-utils.ts
33371
- import fs7 from "fs/promises";
33372
- import path11 from "path";
33403
+ var import_promises19 = __toESM(require("fs/promises"), 1);
33404
+ var import_node_path7 = __toESM(require("path"), 1);
33373
33405
  async function readJsonStdin() {
33374
33406
  const chunks = [];
33375
33407
  for await (const chunk of process.stdin) {
@@ -33586,4 +33618,4 @@ main().catch((error) => {
33586
33618
  `);
33587
33619
  process.exitCode = 0;
33588
33620
  });
33589
- //# sourceMappingURL=hook-stop-collab.js.map
33621
+ //# sourceMappingURL=hook-stop-collab.cjs.map