alchemy 0.43.5 → 0.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/bin/alchemy.mjs +430 -343
  2. package/bin/alchemy.ts +7 -21
  3. package/bin/commands/create.ts +79 -23
  4. package/bin/services/template-manager.ts +9 -4
  5. package/bin/services/vibe-rules.ts +47 -0
  6. package/bin/types.ts +25 -5
  7. package/lib/alchemy.d.ts.map +1 -1
  8. package/lib/alchemy.js +8 -11
  9. package/lib/alchemy.js.map +1 -1
  10. package/lib/apply.js +2 -0
  11. package/lib/apply.js.map +1 -1
  12. package/lib/build-date.d.ts +1 -1
  13. package/lib/build-date.js +1 -1
  14. package/lib/cloudflare/assets.d.ts +1 -1
  15. package/lib/cloudflare/assets.d.ts.map +1 -1
  16. package/lib/cloudflare/bucket.d.ts.map +1 -1
  17. package/lib/cloudflare/bucket.js +9 -6
  18. package/lib/cloudflare/bucket.js.map +1 -1
  19. package/lib/cloudflare/bundle/bundle-worker-dev.d.ts.map +1 -1
  20. package/lib/cloudflare/bundle/bundle-worker-dev.js +4 -1
  21. package/lib/cloudflare/bundle/bundle-worker-dev.js.map +1 -1
  22. package/lib/cloudflare/bundle/bundle-worker.d.ts.map +1 -1
  23. package/lib/cloudflare/bundle/bundle-worker.js +4 -1
  24. package/lib/cloudflare/bundle/bundle-worker.js.map +1 -1
  25. package/lib/cloudflare/bundle/external.d.ts +1 -0
  26. package/lib/cloudflare/bundle/external.d.ts.map +1 -1
  27. package/lib/cloudflare/bundle/external.js +1 -1
  28. package/lib/cloudflare/bundle/external.js.map +1 -1
  29. package/lib/cloudflare/bundle/nodejs-import-warning-plugin.d.ts +10 -0
  30. package/lib/cloudflare/bundle/nodejs-import-warning-plugin.d.ts.map +1 -0
  31. package/lib/cloudflare/bundle/nodejs-import-warning-plugin.js +67 -0
  32. package/lib/cloudflare/bundle/nodejs-import-warning-plugin.js.map +1 -0
  33. package/lib/cloudflare/container.d.ts +27 -2
  34. package/lib/cloudflare/container.d.ts.map +1 -1
  35. package/lib/cloudflare/container.js +82 -24
  36. package/lib/cloudflare/container.js.map +1 -1
  37. package/lib/cloudflare/redirect-rule.js +1 -1
  38. package/lib/cloudflare/redirect-rule.js.map +1 -1
  39. package/lib/cloudflare/website.d.ts +17 -0
  40. package/lib/cloudflare/website.d.ts.map +1 -1
  41. package/lib/cloudflare/website.js +1 -0
  42. package/lib/cloudflare/website.js.map +1 -1
  43. package/lib/cloudflare/worker/miniflare.d.ts +4 -1
  44. package/lib/cloudflare/worker/miniflare.d.ts.map +1 -1
  45. package/lib/cloudflare/worker/miniflare.js +22 -2
  46. package/lib/cloudflare/worker/miniflare.js.map +1 -1
  47. package/lib/cloudflare/worker-metadata.d.ts.map +1 -1
  48. package/lib/cloudflare/worker-metadata.js +12 -0
  49. package/lib/cloudflare/worker-metadata.js.map +1 -1
  50. package/lib/cloudflare/worker.d.ts +1 -1
  51. package/lib/cloudflare/wrangler.json.d.ts +24 -0
  52. package/lib/cloudflare/wrangler.json.d.ts.map +1 -1
  53. package/lib/cloudflare/wrangler.json.js +20 -2
  54. package/lib/cloudflare/wrangler.json.js.map +1 -1
  55. package/lib/context.d.ts +6 -1
  56. package/lib/context.d.ts.map +1 -1
  57. package/lib/context.js +2 -1
  58. package/lib/context.js.map +1 -1
  59. package/lib/destroy.d.ts.map +1 -1
  60. package/lib/destroy.js +1 -0
  61. package/lib/destroy.js.map +1 -1
  62. package/lib/docker/api.d.ts +11 -0
  63. package/lib/docker/api.d.ts.map +1 -1
  64. package/lib/docker/api.js +41 -1
  65. package/lib/docker/api.js.map +1 -1
  66. package/lib/docker/image.d.ts +1 -1
  67. package/lib/docker/image.d.ts.map +1 -1
  68. package/lib/docker/image.js +11 -5
  69. package/lib/docker/image.js.map +1 -1
  70. package/lib/esbuild/bundle.d.ts +2 -2
  71. package/lib/index.d.ts.map +1 -1
  72. package/lib/index.js.map +1 -1
  73. package/lib/llms.cloudflare.txt +379 -0
  74. package/lib/llms.d.ts +10 -0
  75. package/lib/llms.d.ts.map +1 -0
  76. package/lib/llms.js +12 -0
  77. package/lib/llms.js.map +1 -0
  78. package/lib/planetscale/index.d.ts +3 -2
  79. package/lib/planetscale/index.d.ts.map +1 -1
  80. package/lib/planetscale/index.js +3 -2
  81. package/lib/planetscale/index.js.map +1 -1
  82. package/lib/planetscale/password.d.ts +233 -0
  83. package/lib/planetscale/password.d.ts.map +1 -0
  84. package/lib/planetscale/password.js +238 -0
  85. package/lib/planetscale/password.js.map +1 -0
  86. package/lib/scope.d.ts +6 -5
  87. package/lib/scope.d.ts.map +1 -1
  88. package/lib/scope.js +18 -7
  89. package/lib/scope.js.map +1 -1
  90. package/lib/test/bun.d.ts.map +1 -1
  91. package/lib/test/bun.js +1 -0
  92. package/lib/test/bun.js.map +1 -1
  93. package/lib/test/vitest.d.ts.map +1 -1
  94. package/lib/test/vitest.js +1 -0
  95. package/lib/test/vitest.js.map +1 -1
  96. package/lib/util/nanoid.d.ts +3 -0
  97. package/lib/util/nanoid.d.ts.map +1 -0
  98. package/lib/util/nanoid.js +13 -0
  99. package/lib/util/nanoid.js.map +1 -0
  100. package/lib/util/safe-fetch.d.ts.map +1 -1
  101. package/lib/util/safe-fetch.js +0 -1
  102. package/lib/util/safe-fetch.js.map +1 -1
  103. package/lib/util/telemetry/client.d.ts.map +1 -1
  104. package/lib/util/telemetry/client.js +13 -3
  105. package/lib/util/telemetry/client.js.map +1 -1
  106. package/lib/util/telemetry/constants.d.ts +2 -1
  107. package/lib/util/telemetry/constants.d.ts.map +1 -1
  108. package/lib/util/telemetry/constants.js +3 -2
  109. package/lib/util/telemetry/constants.js.map +1 -1
  110. package/package.json +10 -2
  111. package/src/alchemy.ts +8 -13
  112. package/src/apply.ts +2 -0
  113. package/src/build-date.ts +1 -1
  114. package/src/cloudflare/bucket.ts +22 -14
  115. package/src/cloudflare/bundle/bundle-worker-dev.ts +4 -1
  116. package/src/cloudflare/bundle/bundle-worker.ts +4 -1
  117. package/src/cloudflare/bundle/external.ts +1 -1
  118. package/src/cloudflare/bundle/nodejs-import-warning-plugin.ts +94 -0
  119. package/src/cloudflare/container.ts +113 -28
  120. package/src/cloudflare/redirect-rule.ts +1 -1
  121. package/src/cloudflare/website.ts +21 -1
  122. package/src/cloudflare/worker/miniflare.ts +33 -8
  123. package/src/cloudflare/worker-metadata.ts +15 -0
  124. package/src/cloudflare/wrangler.json.ts +61 -5
  125. package/src/context.ts +7 -0
  126. package/src/destroy.ts +1 -0
  127. package/src/docker/api.ts +57 -1
  128. package/src/docker/image.ts +15 -6
  129. package/src/index.ts +1 -0
  130. package/src/llms.cloudflare.txt +379 -0
  131. package/src/llms.ts +25 -0
  132. package/src/planetscale/index.ts +3 -2
  133. package/src/planetscale/password.ts +366 -0
  134. package/src/scope.ts +25 -11
  135. package/src/test/bun.ts +1 -0
  136. package/src/test/vitest.ts +1 -0
  137. package/src/util/nanoid.ts +13 -0
  138. package/src/util/safe-fetch.ts +0 -1
  139. package/src/util/telemetry/client.ts +17 -3
  140. package/src/util/telemetry/constants.ts +5 -3
package/bin/alchemy.mjs CHANGED
@@ -2514,7 +2514,7 @@ var require_command = __commonJS({
2514
2514
  var EventEmitter2 = __require("node:events").EventEmitter;
2515
2515
  var childProcess = __require("node:child_process");
2516
2516
  var path11 = __require("node:path");
2517
- var fs9 = __require("node:fs");
2517
+ var fs10 = __require("node:fs");
2518
2518
  var process12 = __require("node:process");
2519
2519
  var { Argument, humanReadableArgName } = require_argument();
2520
2520
  var { CommanderError } = require_error();
@@ -3509,7 +3509,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3509
3509
  * @param {string} subcommandName
3510
3510
  */
3511
3511
  _checkForMissingExecutable(executableFile, executableDir, subcommandName) {
3512
- if (fs9.existsSync(executableFile)) return;
3512
+ if (fs10.existsSync(executableFile)) return;
3513
3513
  const executableDirMessage = executableDir ? `searched for local subcommand relative to directory '${executableDir}'` : "no directory for search for local subcommand, use .executableDir() to supply a custom directory";
3514
3514
  const executableMissing = `'${executableFile}' does not exist
3515
3515
  - if '${subcommandName}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
@@ -3528,10 +3528,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
3528
3528
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
3529
3529
  function findFile(baseDir, baseName) {
3530
3530
  const localBin = path11.resolve(baseDir, baseName);
3531
- if (fs9.existsSync(localBin)) return localBin;
3531
+ if (fs10.existsSync(localBin)) return localBin;
3532
3532
  if (sourceExt.includes(path11.extname(baseName))) return void 0;
3533
3533
  const foundExt = sourceExt.find(
3534
- (ext) => fs9.existsSync(`${localBin}${ext}`)
3534
+ (ext) => fs10.existsSync(`${localBin}${ext}`)
3535
3535
  );
3536
3536
  if (foundExt) return `${localBin}${foundExt}`;
3537
3537
  return void 0;
@@ -3543,7 +3543,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
3543
3543
  if (this._scriptPath) {
3544
3544
  let resolvedScriptPath;
3545
3545
  try {
3546
- resolvedScriptPath = fs9.realpathSync(this._scriptPath);
3546
+ resolvedScriptPath = fs10.realpathSync(this._scriptPath);
3547
3547
  } catch {
3548
3548
  resolvedScriptPath = this._scriptPath;
3549
3549
  }
@@ -26025,54 +26025,54 @@ var require_polyfills = __commonJS({
26025
26025
  }
26026
26026
  var chdir;
26027
26027
  module2.exports = patch;
26028
- function patch(fs9) {
26028
+ function patch(fs10) {
26029
26029
  if (constants4.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
26030
- patchLchmod(fs9);
26031
- }
26032
- if (!fs9.lutimes) {
26033
- patchLutimes(fs9);
26034
- }
26035
- fs9.chown = chownFix(fs9.chown);
26036
- fs9.fchown = chownFix(fs9.fchown);
26037
- fs9.lchown = chownFix(fs9.lchown);
26038
- fs9.chmod = chmodFix(fs9.chmod);
26039
- fs9.fchmod = chmodFix(fs9.fchmod);
26040
- fs9.lchmod = chmodFix(fs9.lchmod);
26041
- fs9.chownSync = chownFixSync(fs9.chownSync);
26042
- fs9.fchownSync = chownFixSync(fs9.fchownSync);
26043
- fs9.lchownSync = chownFixSync(fs9.lchownSync);
26044
- fs9.chmodSync = chmodFixSync(fs9.chmodSync);
26045
- fs9.fchmodSync = chmodFixSync(fs9.fchmodSync);
26046
- fs9.lchmodSync = chmodFixSync(fs9.lchmodSync);
26047
- fs9.stat = statFix(fs9.stat);
26048
- fs9.fstat = statFix(fs9.fstat);
26049
- fs9.lstat = statFix(fs9.lstat);
26050
- fs9.statSync = statFixSync(fs9.statSync);
26051
- fs9.fstatSync = statFixSync(fs9.fstatSync);
26052
- fs9.lstatSync = statFixSync(fs9.lstatSync);
26053
- if (fs9.chmod && !fs9.lchmod) {
26054
- fs9.lchmod = function(path11, mode, cb) {
26030
+ patchLchmod(fs10);
26031
+ }
26032
+ if (!fs10.lutimes) {
26033
+ patchLutimes(fs10);
26034
+ }
26035
+ fs10.chown = chownFix(fs10.chown);
26036
+ fs10.fchown = chownFix(fs10.fchown);
26037
+ fs10.lchown = chownFix(fs10.lchown);
26038
+ fs10.chmod = chmodFix(fs10.chmod);
26039
+ fs10.fchmod = chmodFix(fs10.fchmod);
26040
+ fs10.lchmod = chmodFix(fs10.lchmod);
26041
+ fs10.chownSync = chownFixSync(fs10.chownSync);
26042
+ fs10.fchownSync = chownFixSync(fs10.fchownSync);
26043
+ fs10.lchownSync = chownFixSync(fs10.lchownSync);
26044
+ fs10.chmodSync = chmodFixSync(fs10.chmodSync);
26045
+ fs10.fchmodSync = chmodFixSync(fs10.fchmodSync);
26046
+ fs10.lchmodSync = chmodFixSync(fs10.lchmodSync);
26047
+ fs10.stat = statFix(fs10.stat);
26048
+ fs10.fstat = statFix(fs10.fstat);
26049
+ fs10.lstat = statFix(fs10.lstat);
26050
+ fs10.statSync = statFixSync(fs10.statSync);
26051
+ fs10.fstatSync = statFixSync(fs10.fstatSync);
26052
+ fs10.lstatSync = statFixSync(fs10.lstatSync);
26053
+ if (fs10.chmod && !fs10.lchmod) {
26054
+ fs10.lchmod = function(path11, mode, cb) {
26055
26055
  if (cb) process.nextTick(cb);
26056
26056
  };
26057
- fs9.lchmodSync = function() {
26057
+ fs10.lchmodSync = function() {
26058
26058
  };
26059
26059
  }
26060
- if (fs9.chown && !fs9.lchown) {
26061
- fs9.lchown = function(path11, uid, gid, cb) {
26060
+ if (fs10.chown && !fs10.lchown) {
26061
+ fs10.lchown = function(path11, uid, gid, cb) {
26062
26062
  if (cb) process.nextTick(cb);
26063
26063
  };
26064
- fs9.lchownSync = function() {
26064
+ fs10.lchownSync = function() {
26065
26065
  };
26066
26066
  }
26067
26067
  if (platform2 === "win32") {
26068
- fs9.rename = typeof fs9.rename !== "function" ? fs9.rename : function(fs$rename) {
26068
+ fs10.rename = typeof fs10.rename !== "function" ? fs10.rename : function(fs$rename) {
26069
26069
  function rename(from, to, cb) {
26070
26070
  var start = Date.now();
26071
26071
  var backoff = 0;
26072
26072
  fs$rename(from, to, function CB(er) {
26073
26073
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
26074
26074
  setTimeout(function() {
26075
- fs9.stat(to, function(stater, st) {
26075
+ fs10.stat(to, function(stater, st) {
26076
26076
  if (stater && stater.code === "ENOENT")
26077
26077
  fs$rename(from, to, CB);
26078
26078
  else
@@ -26088,9 +26088,9 @@ var require_polyfills = __commonJS({
26088
26088
  }
26089
26089
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
26090
26090
  return rename;
26091
- }(fs9.rename);
26091
+ }(fs10.rename);
26092
26092
  }
26093
- fs9.read = typeof fs9.read !== "function" ? fs9.read : function(fs$read) {
26093
+ fs10.read = typeof fs10.read !== "function" ? fs10.read : function(fs$read) {
26094
26094
  function read(fd, buffer, offset, length, position, callback_) {
26095
26095
  var callback;
26096
26096
  if (callback_ && typeof callback_ === "function") {
@@ -26098,22 +26098,22 @@ var require_polyfills = __commonJS({
26098
26098
  callback = function(er, _3, __) {
26099
26099
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
26100
26100
  eagCounter++;
26101
- return fs$read.call(fs9, fd, buffer, offset, length, position, callback);
26101
+ return fs$read.call(fs10, fd, buffer, offset, length, position, callback);
26102
26102
  }
26103
26103
  callback_.apply(this, arguments);
26104
26104
  };
26105
26105
  }
26106
- return fs$read.call(fs9, fd, buffer, offset, length, position, callback);
26106
+ return fs$read.call(fs10, fd, buffer, offset, length, position, callback);
26107
26107
  }
26108
26108
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
26109
26109
  return read;
26110
- }(fs9.read);
26111
- fs9.readSync = typeof fs9.readSync !== "function" ? fs9.readSync : /* @__PURE__ */ function(fs$readSync) {
26110
+ }(fs10.read);
26111
+ fs10.readSync = typeof fs10.readSync !== "function" ? fs10.readSync : /* @__PURE__ */ function(fs$readSync) {
26112
26112
  return function(fd, buffer, offset, length, position) {
26113
26113
  var eagCounter = 0;
26114
26114
  while (true) {
26115
26115
  try {
26116
- return fs$readSync.call(fs9, fd, buffer, offset, length, position);
26116
+ return fs$readSync.call(fs10, fd, buffer, offset, length, position);
26117
26117
  } catch (er) {
26118
26118
  if (er.code === "EAGAIN" && eagCounter < 10) {
26119
26119
  eagCounter++;
@@ -26123,10 +26123,10 @@ var require_polyfills = __commonJS({
26123
26123
  }
26124
26124
  }
26125
26125
  };
26126
- }(fs9.readSync);
26127
- function patchLchmod(fs10) {
26128
- fs10.lchmod = function(path11, mode, callback) {
26129
- fs10.open(
26126
+ }(fs10.readSync);
26127
+ function patchLchmod(fs11) {
26128
+ fs11.lchmod = function(path11, mode, callback) {
26129
+ fs11.open(
26130
26130
  path11,
26131
26131
  constants4.O_WRONLY | constants4.O_SYMLINK,
26132
26132
  mode,
@@ -26135,80 +26135,80 @@ var require_polyfills = __commonJS({
26135
26135
  if (callback) callback(err);
26136
26136
  return;
26137
26137
  }
26138
- fs10.fchmod(fd, mode, function(err2) {
26139
- fs10.close(fd, function(err22) {
26138
+ fs11.fchmod(fd, mode, function(err2) {
26139
+ fs11.close(fd, function(err22) {
26140
26140
  if (callback) callback(err2 || err22);
26141
26141
  });
26142
26142
  });
26143
26143
  }
26144
26144
  );
26145
26145
  };
26146
- fs10.lchmodSync = function(path11, mode) {
26147
- var fd = fs10.openSync(path11, constants4.O_WRONLY | constants4.O_SYMLINK, mode);
26146
+ fs11.lchmodSync = function(path11, mode) {
26147
+ var fd = fs11.openSync(path11, constants4.O_WRONLY | constants4.O_SYMLINK, mode);
26148
26148
  var threw = true;
26149
26149
  var ret;
26150
26150
  try {
26151
- ret = fs10.fchmodSync(fd, mode);
26151
+ ret = fs11.fchmodSync(fd, mode);
26152
26152
  threw = false;
26153
26153
  } finally {
26154
26154
  if (threw) {
26155
26155
  try {
26156
- fs10.closeSync(fd);
26156
+ fs11.closeSync(fd);
26157
26157
  } catch (er) {
26158
26158
  }
26159
26159
  } else {
26160
- fs10.closeSync(fd);
26160
+ fs11.closeSync(fd);
26161
26161
  }
26162
26162
  }
26163
26163
  return ret;
26164
26164
  };
26165
26165
  }
26166
- function patchLutimes(fs10) {
26167
- if (constants4.hasOwnProperty("O_SYMLINK") && fs10.futimes) {
26168
- fs10.lutimes = function(path11, at, mt, cb) {
26169
- fs10.open(path11, constants4.O_SYMLINK, function(er, fd) {
26166
+ function patchLutimes(fs11) {
26167
+ if (constants4.hasOwnProperty("O_SYMLINK") && fs11.futimes) {
26168
+ fs11.lutimes = function(path11, at, mt, cb) {
26169
+ fs11.open(path11, constants4.O_SYMLINK, function(er, fd) {
26170
26170
  if (er) {
26171
26171
  if (cb) cb(er);
26172
26172
  return;
26173
26173
  }
26174
- fs10.futimes(fd, at, mt, function(er2) {
26175
- fs10.close(fd, function(er22) {
26174
+ fs11.futimes(fd, at, mt, function(er2) {
26175
+ fs11.close(fd, function(er22) {
26176
26176
  if (cb) cb(er2 || er22);
26177
26177
  });
26178
26178
  });
26179
26179
  });
26180
26180
  };
26181
- fs10.lutimesSync = function(path11, at, mt) {
26182
- var fd = fs10.openSync(path11, constants4.O_SYMLINK);
26181
+ fs11.lutimesSync = function(path11, at, mt) {
26182
+ var fd = fs11.openSync(path11, constants4.O_SYMLINK);
26183
26183
  var ret;
26184
26184
  var threw = true;
26185
26185
  try {
26186
- ret = fs10.futimesSync(fd, at, mt);
26186
+ ret = fs11.futimesSync(fd, at, mt);
26187
26187
  threw = false;
26188
26188
  } finally {
26189
26189
  if (threw) {
26190
26190
  try {
26191
- fs10.closeSync(fd);
26191
+ fs11.closeSync(fd);
26192
26192
  } catch (er) {
26193
26193
  }
26194
26194
  } else {
26195
- fs10.closeSync(fd);
26195
+ fs11.closeSync(fd);
26196
26196
  }
26197
26197
  }
26198
26198
  return ret;
26199
26199
  };
26200
- } else if (fs10.futimes) {
26201
- fs10.lutimes = function(_a, _b, _c, cb) {
26200
+ } else if (fs11.futimes) {
26201
+ fs11.lutimes = function(_a, _b, _c, cb) {
26202
26202
  if (cb) process.nextTick(cb);
26203
26203
  };
26204
- fs10.lutimesSync = function() {
26204
+ fs11.lutimesSync = function() {
26205
26205
  };
26206
26206
  }
26207
26207
  }
26208
26208
  function chmodFix(orig) {
26209
26209
  if (!orig) return orig;
26210
26210
  return function(target, mode, cb) {
26211
- return orig.call(fs9, target, mode, function(er) {
26211
+ return orig.call(fs10, target, mode, function(er) {
26212
26212
  if (chownErOk(er)) er = null;
26213
26213
  if (cb) cb.apply(this, arguments);
26214
26214
  });
@@ -26218,7 +26218,7 @@ var require_polyfills = __commonJS({
26218
26218
  if (!orig) return orig;
26219
26219
  return function(target, mode) {
26220
26220
  try {
26221
- return orig.call(fs9, target, mode);
26221
+ return orig.call(fs10, target, mode);
26222
26222
  } catch (er) {
26223
26223
  if (!chownErOk(er)) throw er;
26224
26224
  }
@@ -26227,7 +26227,7 @@ var require_polyfills = __commonJS({
26227
26227
  function chownFix(orig) {
26228
26228
  if (!orig) return orig;
26229
26229
  return function(target, uid, gid, cb) {
26230
- return orig.call(fs9, target, uid, gid, function(er) {
26230
+ return orig.call(fs10, target, uid, gid, function(er) {
26231
26231
  if (chownErOk(er)) er = null;
26232
26232
  if (cb) cb.apply(this, arguments);
26233
26233
  });
@@ -26237,7 +26237,7 @@ var require_polyfills = __commonJS({
26237
26237
  if (!orig) return orig;
26238
26238
  return function(target, uid, gid) {
26239
26239
  try {
26240
- return orig.call(fs9, target, uid, gid);
26240
+ return orig.call(fs10, target, uid, gid);
26241
26241
  } catch (er) {
26242
26242
  if (!chownErOk(er)) throw er;
26243
26243
  }
@@ -26257,13 +26257,13 @@ var require_polyfills = __commonJS({
26257
26257
  }
26258
26258
  if (cb) cb.apply(this, arguments);
26259
26259
  }
26260
- return options2 ? orig.call(fs9, target, options2, callback) : orig.call(fs9, target, callback);
26260
+ return options2 ? orig.call(fs10, target, options2, callback) : orig.call(fs10, target, callback);
26261
26261
  };
26262
26262
  }
26263
26263
  function statFixSync(orig) {
26264
26264
  if (!orig) return orig;
26265
26265
  return function(target, options2) {
26266
- var stats = options2 ? orig.call(fs9, target, options2) : orig.call(fs9, target);
26266
+ var stats = options2 ? orig.call(fs10, target, options2) : orig.call(fs10, target);
26267
26267
  if (stats) {
26268
26268
  if (stats.uid < 0) stats.uid += 4294967296;
26269
26269
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -26292,7 +26292,7 @@ var require_legacy_streams = __commonJS({
26292
26292
  "../node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
26293
26293
  var Stream = __require("stream").Stream;
26294
26294
  module2.exports = legacy;
26295
- function legacy(fs9) {
26295
+ function legacy(fs10) {
26296
26296
  return {
26297
26297
  ReadStream,
26298
26298
  WriteStream
@@ -26335,7 +26335,7 @@ var require_legacy_streams = __commonJS({
26335
26335
  });
26336
26336
  return;
26337
26337
  }
26338
- fs9.open(this.path, this.flags, this.mode, function(err, fd) {
26338
+ fs10.open(this.path, this.flags, this.mode, function(err, fd) {
26339
26339
  if (err) {
26340
26340
  self.emit("error", err);
26341
26341
  self.readable = false;
@@ -26374,7 +26374,7 @@ var require_legacy_streams = __commonJS({
26374
26374
  this.busy = false;
26375
26375
  this._queue = [];
26376
26376
  if (this.fd === null) {
26377
- this._open = fs9.open;
26377
+ this._open = fs10.open;
26378
26378
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
26379
26379
  this.flush();
26380
26380
  }
@@ -26409,7 +26409,7 @@ var require_clone = __commonJS({
26409
26409
  // ../node_modules/graceful-fs/graceful-fs.js
26410
26410
  var require_graceful_fs = __commonJS({
26411
26411
  "../node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
26412
- var fs9 = __require("fs");
26412
+ var fs10 = __require("fs");
26413
26413
  var polyfills = require_polyfills();
26414
26414
  var legacy = require_legacy_streams();
26415
26415
  var clone = require_clone();
@@ -26441,12 +26441,12 @@ var require_graceful_fs = __commonJS({
26441
26441
  m2 = "GFS4: " + m2.split(/\n/).join("\nGFS4: ");
26442
26442
  console.error(m2);
26443
26443
  };
26444
- if (!fs9[gracefulQueue]) {
26444
+ if (!fs10[gracefulQueue]) {
26445
26445
  queue = global[gracefulQueue] || [];
26446
- publishQueue(fs9, queue);
26447
- fs9.close = function(fs$close) {
26446
+ publishQueue(fs10, queue);
26447
+ fs10.close = function(fs$close) {
26448
26448
  function close(fd, cb) {
26449
- return fs$close.call(fs9, fd, function(err) {
26449
+ return fs$close.call(fs10, fd, function(err) {
26450
26450
  if (!err) {
26451
26451
  resetQueue();
26452
26452
  }
@@ -26458,40 +26458,40 @@ var require_graceful_fs = __commonJS({
26458
26458
  value: fs$close
26459
26459
  });
26460
26460
  return close;
26461
- }(fs9.close);
26462
- fs9.closeSync = function(fs$closeSync) {
26461
+ }(fs10.close);
26462
+ fs10.closeSync = function(fs$closeSync) {
26463
26463
  function closeSync(fd) {
26464
- fs$closeSync.apply(fs9, arguments);
26464
+ fs$closeSync.apply(fs10, arguments);
26465
26465
  resetQueue();
26466
26466
  }
26467
26467
  Object.defineProperty(closeSync, previousSymbol, {
26468
26468
  value: fs$closeSync
26469
26469
  });
26470
26470
  return closeSync;
26471
- }(fs9.closeSync);
26471
+ }(fs10.closeSync);
26472
26472
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
26473
26473
  process.on("exit", function() {
26474
- debug(fs9[gracefulQueue]);
26475
- __require("assert").equal(fs9[gracefulQueue].length, 0);
26474
+ debug(fs10[gracefulQueue]);
26475
+ __require("assert").equal(fs10[gracefulQueue].length, 0);
26476
26476
  });
26477
26477
  }
26478
26478
  }
26479
26479
  var queue;
26480
26480
  if (!global[gracefulQueue]) {
26481
- publishQueue(global, fs9[gracefulQueue]);
26482
- }
26483
- module2.exports = patch(clone(fs9));
26484
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs9.__patched) {
26485
- module2.exports = patch(fs9);
26486
- fs9.__patched = true;
26487
- }
26488
- function patch(fs10) {
26489
- polyfills(fs10);
26490
- fs10.gracefulify = patch;
26491
- fs10.createReadStream = createReadStream2;
26492
- fs10.createWriteStream = createWriteStream2;
26493
- var fs$readFile = fs10.readFile;
26494
- fs10.readFile = readFile;
26481
+ publishQueue(global, fs10[gracefulQueue]);
26482
+ }
26483
+ module2.exports = patch(clone(fs10));
26484
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs10.__patched) {
26485
+ module2.exports = patch(fs10);
26486
+ fs10.__patched = true;
26487
+ }
26488
+ function patch(fs11) {
26489
+ polyfills(fs11);
26490
+ fs11.gracefulify = patch;
26491
+ fs11.createReadStream = createReadStream2;
26492
+ fs11.createWriteStream = createWriteStream2;
26493
+ var fs$readFile = fs11.readFile;
26494
+ fs11.readFile = readFile;
26495
26495
  function readFile(path11, options2, cb) {
26496
26496
  if (typeof options2 === "function")
26497
26497
  cb = options2, options2 = null;
@@ -26507,9 +26507,9 @@ var require_graceful_fs = __commonJS({
26507
26507
  });
26508
26508
  }
26509
26509
  }
26510
- var fs$writeFile = fs10.writeFile;
26511
- fs10.writeFile = writeFile2;
26512
- function writeFile2(path11, data, options2, cb) {
26510
+ var fs$writeFile = fs11.writeFile;
26511
+ fs11.writeFile = writeFile;
26512
+ function writeFile(path11, data, options2, cb) {
26513
26513
  if (typeof options2 === "function")
26514
26514
  cb = options2, options2 = null;
26515
26515
  return go$writeFile(path11, data, options2, cb);
@@ -26524,9 +26524,9 @@ var require_graceful_fs = __commonJS({
26524
26524
  });
26525
26525
  }
26526
26526
  }
26527
- var fs$appendFile = fs10.appendFile;
26527
+ var fs$appendFile = fs11.appendFile;
26528
26528
  if (fs$appendFile)
26529
- fs10.appendFile = appendFile;
26529
+ fs11.appendFile = appendFile;
26530
26530
  function appendFile(path11, data, options2, cb) {
26531
26531
  if (typeof options2 === "function")
26532
26532
  cb = options2, options2 = null;
@@ -26542,9 +26542,9 @@ var require_graceful_fs = __commonJS({
26542
26542
  });
26543
26543
  }
26544
26544
  }
26545
- var fs$copyFile = fs10.copyFile;
26545
+ var fs$copyFile = fs11.copyFile;
26546
26546
  if (fs$copyFile)
26547
- fs10.copyFile = copyFile;
26547
+ fs11.copyFile = copyFile;
26548
26548
  function copyFile(src, dest, flags, cb) {
26549
26549
  if (typeof flags === "function") {
26550
26550
  cb = flags;
@@ -26562,8 +26562,8 @@ var require_graceful_fs = __commonJS({
26562
26562
  });
26563
26563
  }
26564
26564
  }
26565
- var fs$readdir = fs10.readdir;
26566
- fs10.readdir = readdir;
26565
+ var fs$readdir = fs11.readdir;
26566
+ fs11.readdir = readdir;
26567
26567
  var noReaddirOptionVersions = /^v[0-5]\./;
26568
26568
  function readdir(path11, options2, cb) {
26569
26569
  if (typeof options2 === "function")
@@ -26604,21 +26604,21 @@ var require_graceful_fs = __commonJS({
26604
26604
  }
26605
26605
  }
26606
26606
  if (process.version.substr(0, 4) === "v0.8") {
26607
- var legStreams = legacy(fs10);
26607
+ var legStreams = legacy(fs11);
26608
26608
  ReadStream = legStreams.ReadStream;
26609
26609
  WriteStream = legStreams.WriteStream;
26610
26610
  }
26611
- var fs$ReadStream = fs10.ReadStream;
26611
+ var fs$ReadStream = fs11.ReadStream;
26612
26612
  if (fs$ReadStream) {
26613
26613
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
26614
26614
  ReadStream.prototype.open = ReadStream$open;
26615
26615
  }
26616
- var fs$WriteStream = fs10.WriteStream;
26616
+ var fs$WriteStream = fs11.WriteStream;
26617
26617
  if (fs$WriteStream) {
26618
26618
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
26619
26619
  WriteStream.prototype.open = WriteStream$open;
26620
26620
  }
26621
- Object.defineProperty(fs10, "ReadStream", {
26621
+ Object.defineProperty(fs11, "ReadStream", {
26622
26622
  get: function() {
26623
26623
  return ReadStream;
26624
26624
  },
@@ -26628,7 +26628,7 @@ var require_graceful_fs = __commonJS({
26628
26628
  enumerable: true,
26629
26629
  configurable: true
26630
26630
  });
26631
- Object.defineProperty(fs10, "WriteStream", {
26631
+ Object.defineProperty(fs11, "WriteStream", {
26632
26632
  get: function() {
26633
26633
  return WriteStream;
26634
26634
  },
@@ -26639,7 +26639,7 @@ var require_graceful_fs = __commonJS({
26639
26639
  configurable: true
26640
26640
  });
26641
26641
  var FileReadStream = ReadStream;
26642
- Object.defineProperty(fs10, "FileReadStream", {
26642
+ Object.defineProperty(fs11, "FileReadStream", {
26643
26643
  get: function() {
26644
26644
  return FileReadStream;
26645
26645
  },
@@ -26650,7 +26650,7 @@ var require_graceful_fs = __commonJS({
26650
26650
  configurable: true
26651
26651
  });
26652
26652
  var FileWriteStream = WriteStream;
26653
- Object.defineProperty(fs10, "FileWriteStream", {
26653
+ Object.defineProperty(fs11, "FileWriteStream", {
26654
26654
  get: function() {
26655
26655
  return FileWriteStream;
26656
26656
  },
@@ -26699,13 +26699,13 @@ var require_graceful_fs = __commonJS({
26699
26699
  });
26700
26700
  }
26701
26701
  function createReadStream2(path11, options2) {
26702
- return new fs10.ReadStream(path11, options2);
26702
+ return new fs11.ReadStream(path11, options2);
26703
26703
  }
26704
26704
  function createWriteStream2(path11, options2) {
26705
- return new fs10.WriteStream(path11, options2);
26705
+ return new fs11.WriteStream(path11, options2);
26706
26706
  }
26707
- var fs$open = fs10.open;
26708
- fs10.open = open;
26707
+ var fs$open = fs11.open;
26708
+ fs11.open = open;
26709
26709
  function open(path11, flags, mode, cb) {
26710
26710
  if (typeof mode === "function")
26711
26711
  cb = mode, mode = null;
@@ -26721,20 +26721,20 @@ var require_graceful_fs = __commonJS({
26721
26721
  });
26722
26722
  }
26723
26723
  }
26724
- return fs10;
26724
+ return fs11;
26725
26725
  }
26726
26726
  function enqueue(elem) {
26727
26727
  debug("ENQUEUE", elem[0].name, elem[1]);
26728
- fs9[gracefulQueue].push(elem);
26728
+ fs10[gracefulQueue].push(elem);
26729
26729
  retry();
26730
26730
  }
26731
26731
  var retryTimer;
26732
26732
  function resetQueue() {
26733
26733
  var now = Date.now();
26734
- for (var i2 = 0; i2 < fs9[gracefulQueue].length; ++i2) {
26735
- if (fs9[gracefulQueue][i2].length > 2) {
26736
- fs9[gracefulQueue][i2][3] = now;
26737
- fs9[gracefulQueue][i2][4] = now;
26734
+ for (var i2 = 0; i2 < fs10[gracefulQueue].length; ++i2) {
26735
+ if (fs10[gracefulQueue][i2].length > 2) {
26736
+ fs10[gracefulQueue][i2][3] = now;
26737
+ fs10[gracefulQueue][i2][4] = now;
26738
26738
  }
26739
26739
  }
26740
26740
  retry();
@@ -26742,9 +26742,9 @@ var require_graceful_fs = __commonJS({
26742
26742
  function retry() {
26743
26743
  clearTimeout(retryTimer);
26744
26744
  retryTimer = void 0;
26745
- if (fs9[gracefulQueue].length === 0)
26745
+ if (fs10[gracefulQueue].length === 0)
26746
26746
  return;
26747
- var elem = fs9[gracefulQueue].shift();
26747
+ var elem = fs10[gracefulQueue].shift();
26748
26748
  var fn = elem[0];
26749
26749
  var args2 = elem[1];
26750
26750
  var err = elem[2];
@@ -26766,7 +26766,7 @@ var require_graceful_fs = __commonJS({
26766
26766
  debug("RETRY", fn.name, args2);
26767
26767
  fn.apply(null, args2.concat([startTime]));
26768
26768
  } else {
26769
- fs9[gracefulQueue].push(elem);
26769
+ fs10[gracefulQueue].push(elem);
26770
26770
  }
26771
26771
  }
26772
26772
  if (retryTimer === void 0) {
@@ -26781,7 +26781,7 @@ var require_fs = __commonJS({
26781
26781
  "../node_modules/fs-extra/lib/fs/index.js"(exports2) {
26782
26782
  "use strict";
26783
26783
  var u3 = require_universalify().fromCallback;
26784
- var fs9 = require_graceful_fs();
26784
+ var fs10 = require_graceful_fs();
26785
26785
  var api = [
26786
26786
  "access",
26787
26787
  "appendFile",
@@ -26822,26 +26822,26 @@ var require_fs = __commonJS({
26822
26822
  "utimes",
26823
26823
  "writeFile"
26824
26824
  ].filter((key) => {
26825
- return typeof fs9[key] === "function";
26825
+ return typeof fs10[key] === "function";
26826
26826
  });
26827
- Object.assign(exports2, fs9);
26827
+ Object.assign(exports2, fs10);
26828
26828
  api.forEach((method) => {
26829
- exports2[method] = u3(fs9[method]);
26829
+ exports2[method] = u3(fs10[method]);
26830
26830
  });
26831
26831
  exports2.exists = function(filename, callback) {
26832
26832
  if (typeof callback === "function") {
26833
- return fs9.exists(filename, callback);
26833
+ return fs10.exists(filename, callback);
26834
26834
  }
26835
26835
  return new Promise((resolve2) => {
26836
- return fs9.exists(filename, resolve2);
26836
+ return fs10.exists(filename, resolve2);
26837
26837
  });
26838
26838
  };
26839
26839
  exports2.read = function(fd, buffer, offset, length, position, callback) {
26840
26840
  if (typeof callback === "function") {
26841
- return fs9.read(fd, buffer, offset, length, position, callback);
26841
+ return fs10.read(fd, buffer, offset, length, position, callback);
26842
26842
  }
26843
26843
  return new Promise((resolve2, reject) => {
26844
- fs9.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
26844
+ fs10.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
26845
26845
  if (err) return reject(err);
26846
26846
  resolve2({ bytesRead, buffer: buffer2 });
26847
26847
  });
@@ -26849,10 +26849,10 @@ var require_fs = __commonJS({
26849
26849
  };
26850
26850
  exports2.write = function(fd, buffer, ...args2) {
26851
26851
  if (typeof args2[args2.length - 1] === "function") {
26852
- return fs9.write(fd, buffer, ...args2);
26852
+ return fs10.write(fd, buffer, ...args2);
26853
26853
  }
26854
26854
  return new Promise((resolve2, reject) => {
26855
- fs9.write(fd, buffer, ...args2, (err, bytesWritten, buffer2) => {
26855
+ fs10.write(fd, buffer, ...args2, (err, bytesWritten, buffer2) => {
26856
26856
  if (err) return reject(err);
26857
26857
  resolve2({ bytesWritten, buffer: buffer2 });
26858
26858
  });
@@ -26860,10 +26860,10 @@ var require_fs = __commonJS({
26860
26860
  };
26861
26861
  exports2.readv = function(fd, buffers, ...args2) {
26862
26862
  if (typeof args2[args2.length - 1] === "function") {
26863
- return fs9.readv(fd, buffers, ...args2);
26863
+ return fs10.readv(fd, buffers, ...args2);
26864
26864
  }
26865
26865
  return new Promise((resolve2, reject) => {
26866
- fs9.readv(fd, buffers, ...args2, (err, bytesRead, buffers2) => {
26866
+ fs10.readv(fd, buffers, ...args2, (err, bytesRead, buffers2) => {
26867
26867
  if (err) return reject(err);
26868
26868
  resolve2({ bytesRead, buffers: buffers2 });
26869
26869
  });
@@ -26871,17 +26871,17 @@ var require_fs = __commonJS({
26871
26871
  };
26872
26872
  exports2.writev = function(fd, buffers, ...args2) {
26873
26873
  if (typeof args2[args2.length - 1] === "function") {
26874
- return fs9.writev(fd, buffers, ...args2);
26874
+ return fs10.writev(fd, buffers, ...args2);
26875
26875
  }
26876
26876
  return new Promise((resolve2, reject) => {
26877
- fs9.writev(fd, buffers, ...args2, (err, bytesWritten, buffers2) => {
26877
+ fs10.writev(fd, buffers, ...args2, (err, bytesWritten, buffers2) => {
26878
26878
  if (err) return reject(err);
26879
26879
  resolve2({ bytesWritten, buffers: buffers2 });
26880
26880
  });
26881
26881
  });
26882
26882
  };
26883
- if (typeof fs9.realpath.native === "function") {
26884
- exports2.realpath.native = u3(fs9.realpath.native);
26883
+ if (typeof fs10.realpath.native === "function") {
26884
+ exports2.realpath.native = u3(fs10.realpath.native);
26885
26885
  } else {
26886
26886
  process.emitWarning(
26887
26887
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -26914,7 +26914,7 @@ var require_utils2 = __commonJS({
26914
26914
  var require_make_dir = __commonJS({
26915
26915
  "../node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
26916
26916
  "use strict";
26917
- var fs9 = require_fs();
26917
+ var fs10 = require_fs();
26918
26918
  var { checkPath } = require_utils2();
26919
26919
  var getMode = (options2) => {
26920
26920
  const defaults = { mode: 511 };
@@ -26923,14 +26923,14 @@ var require_make_dir = __commonJS({
26923
26923
  };
26924
26924
  module2.exports.makeDir = async (dir, options2) => {
26925
26925
  checkPath(dir);
26926
- return fs9.mkdir(dir, {
26926
+ return fs10.mkdir(dir, {
26927
26927
  mode: getMode(options2),
26928
26928
  recursive: true
26929
26929
  });
26930
26930
  };
26931
26931
  module2.exports.makeDirSync = (dir, options2) => {
26932
26932
  checkPath(dir);
26933
- return fs9.mkdirSync(dir, {
26933
+ return fs10.mkdirSync(dir, {
26934
26934
  mode: getMode(options2),
26935
26935
  recursive: true
26936
26936
  });
@@ -26962,13 +26962,13 @@ var require_path_exists = __commonJS({
26962
26962
  "../node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
26963
26963
  "use strict";
26964
26964
  var u3 = require_universalify().fromPromise;
26965
- var fs9 = require_fs();
26966
- function pathExists(path11) {
26967
- return fs9.access(path11).then(() => true).catch(() => false);
26965
+ var fs10 = require_fs();
26966
+ function pathExists2(path11) {
26967
+ return fs10.access(path11).then(() => true).catch(() => false);
26968
26968
  }
26969
26969
  module2.exports = {
26970
- pathExists: u3(pathExists),
26971
- pathExistsSync: fs9.existsSync
26970
+ pathExists: u3(pathExists2),
26971
+ pathExistsSync: fs10.existsSync
26972
26972
  };
26973
26973
  }
26974
26974
  });
@@ -26977,16 +26977,16 @@ var require_path_exists = __commonJS({
26977
26977
  var require_utimes = __commonJS({
26978
26978
  "../node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
26979
26979
  "use strict";
26980
- var fs9 = require_fs();
26980
+ var fs10 = require_fs();
26981
26981
  var u3 = require_universalify().fromPromise;
26982
26982
  async function utimesMillis(path11, atime, mtime) {
26983
- const fd = await fs9.open(path11, "r+");
26983
+ const fd = await fs10.open(path11, "r+");
26984
26984
  let closeErr = null;
26985
26985
  try {
26986
- await fs9.futimes(fd, atime, mtime);
26986
+ await fs10.futimes(fd, atime, mtime);
26987
26987
  } finally {
26988
26988
  try {
26989
- await fs9.close(fd);
26989
+ await fs10.close(fd);
26990
26990
  } catch (e2) {
26991
26991
  closeErr = e2;
26992
26992
  }
@@ -26996,9 +26996,9 @@ var require_utimes = __commonJS({
26996
26996
  }
26997
26997
  }
26998
26998
  function utimesMillisSync(path11, atime, mtime) {
26999
- const fd = fs9.openSync(path11, "r+");
27000
- fs9.futimesSync(fd, atime, mtime);
27001
- return fs9.closeSync(fd);
26999
+ const fd = fs10.openSync(path11, "r+");
27000
+ fs10.futimesSync(fd, atime, mtime);
27001
+ return fs10.closeSync(fd);
27002
27002
  }
27003
27003
  module2.exports = {
27004
27004
  utimesMillis: u3(utimesMillis),
@@ -27011,11 +27011,11 @@ var require_utimes = __commonJS({
27011
27011
  var require_stat = __commonJS({
27012
27012
  "../node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
27013
27013
  "use strict";
27014
- var fs9 = require_fs();
27014
+ var fs10 = require_fs();
27015
27015
  var path11 = __require("path");
27016
27016
  var u3 = require_universalify().fromPromise;
27017
27017
  function getStats(src, dest, opts) {
27018
- const statFunc = opts.dereference ? (file) => fs9.stat(file, { bigint: true }) : (file) => fs9.lstat(file, { bigint: true });
27018
+ const statFunc = opts.dereference ? (file) => fs10.stat(file, { bigint: true }) : (file) => fs10.lstat(file, { bigint: true });
27019
27019
  return Promise.all([
27020
27020
  statFunc(src),
27021
27021
  statFunc(dest).catch((err) => {
@@ -27026,7 +27026,7 @@ var require_stat = __commonJS({
27026
27026
  }
27027
27027
  function getStatsSync(src, dest, opts) {
27028
27028
  let destStat;
27029
- const statFunc = opts.dereference ? (file) => fs9.statSync(file, { bigint: true }) : (file) => fs9.lstatSync(file, { bigint: true });
27029
+ const statFunc = opts.dereference ? (file) => fs10.statSync(file, { bigint: true }) : (file) => fs10.lstatSync(file, { bigint: true });
27030
27030
  const srcStat = statFunc(src);
27031
27031
  try {
27032
27032
  destStat = statFunc(dest);
@@ -27088,7 +27088,7 @@ var require_stat = __commonJS({
27088
27088
  if (destParent === srcParent || destParent === path11.parse(destParent).root) return;
27089
27089
  let destStat;
27090
27090
  try {
27091
- destStat = await fs9.stat(destParent, { bigint: true });
27091
+ destStat = await fs10.stat(destParent, { bigint: true });
27092
27092
  } catch (err) {
27093
27093
  if (err.code === "ENOENT") return;
27094
27094
  throw err;
@@ -27104,7 +27104,7 @@ var require_stat = __commonJS({
27104
27104
  if (destParent === srcParent || destParent === path11.parse(destParent).root) return;
27105
27105
  let destStat;
27106
27106
  try {
27107
- destStat = fs9.statSync(destParent, { bigint: true });
27107
+ destStat = fs10.statSync(destParent, { bigint: true });
27108
27108
  } catch (err) {
27109
27109
  if (err.code === "ENOENT") return;
27110
27110
  throw err;
@@ -27143,10 +27143,10 @@ var require_stat = __commonJS({
27143
27143
  var require_copy = __commonJS({
27144
27144
  "../node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
27145
27145
  "use strict";
27146
- var fs9 = require_fs();
27146
+ var fs10 = require_fs();
27147
27147
  var path11 = __require("path");
27148
27148
  var { mkdirs } = require_mkdirs();
27149
- var { pathExists } = require_path_exists();
27149
+ var { pathExists: pathExists2 } = require_path_exists();
27150
27150
  var { utimesMillis } = require_utimes();
27151
27151
  var stat = require_stat();
27152
27152
  async function copy2(src, dest, opts = {}) {
@@ -27167,7 +27167,7 @@ var require_copy = __commonJS({
27167
27167
  const include = await runFilter(src, dest, opts);
27168
27168
  if (!include) return;
27169
27169
  const destParent = path11.dirname(dest);
27170
- const dirExists = await pathExists(destParent);
27170
+ const dirExists = await pathExists2(destParent);
27171
27171
  if (!dirExists) {
27172
27172
  await mkdirs(destParent);
27173
27173
  }
@@ -27178,7 +27178,7 @@ var require_copy = __commonJS({
27178
27178
  return opts.filter(src, dest);
27179
27179
  }
27180
27180
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
27181
- const statFn = opts.dereference ? fs9.stat : fs9.lstat;
27181
+ const statFn = opts.dereference ? fs10.stat : fs10.lstat;
27182
27182
  const srcStat = await statFn(src);
27183
27183
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
27184
27184
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -27190,7 +27190,7 @@ var require_copy = __commonJS({
27190
27190
  async function onFile(srcStat, destStat, src, dest, opts) {
27191
27191
  if (!destStat) return copyFile(srcStat, src, dest, opts);
27192
27192
  if (opts.overwrite) {
27193
- await fs9.unlink(dest);
27193
+ await fs10.unlink(dest);
27194
27194
  return copyFile(srcStat, src, dest, opts);
27195
27195
  }
27196
27196
  if (opts.errorOnExist) {
@@ -27198,28 +27198,28 @@ var require_copy = __commonJS({
27198
27198
  }
27199
27199
  }
27200
27200
  async function copyFile(srcStat, src, dest, opts) {
27201
- await fs9.copyFile(src, dest);
27201
+ await fs10.copyFile(src, dest);
27202
27202
  if (opts.preserveTimestamps) {
27203
27203
  if (fileIsNotWritable(srcStat.mode)) {
27204
27204
  await makeFileWritable(dest, srcStat.mode);
27205
27205
  }
27206
- const updatedSrcStat = await fs9.stat(src);
27206
+ const updatedSrcStat = await fs10.stat(src);
27207
27207
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
27208
27208
  }
27209
- return fs9.chmod(dest, srcStat.mode);
27209
+ return fs10.chmod(dest, srcStat.mode);
27210
27210
  }
27211
27211
  function fileIsNotWritable(srcMode) {
27212
27212
  return (srcMode & 128) === 0;
27213
27213
  }
27214
27214
  function makeFileWritable(dest, srcMode) {
27215
- return fs9.chmod(dest, srcMode | 128);
27215
+ return fs10.chmod(dest, srcMode | 128);
27216
27216
  }
27217
27217
  async function onDir(srcStat, destStat, src, dest, opts) {
27218
27218
  if (!destStat) {
27219
- await fs9.mkdir(dest);
27219
+ await fs10.mkdir(dest);
27220
27220
  }
27221
27221
  const promises = [];
27222
- for await (const item of await fs9.opendir(src)) {
27222
+ for await (const item of await fs10.opendir(src)) {
27223
27223
  const srcItem = path11.join(src, item.name);
27224
27224
  const destItem = path11.join(dest, item.name);
27225
27225
  promises.push(
@@ -27234,22 +27234,22 @@ var require_copy = __commonJS({
27234
27234
  }
27235
27235
  await Promise.all(promises);
27236
27236
  if (!destStat) {
27237
- await fs9.chmod(dest, srcStat.mode);
27237
+ await fs10.chmod(dest, srcStat.mode);
27238
27238
  }
27239
27239
  }
27240
27240
  async function onLink(destStat, src, dest, opts) {
27241
- let resolvedSrc = await fs9.readlink(src);
27241
+ let resolvedSrc = await fs10.readlink(src);
27242
27242
  if (opts.dereference) {
27243
27243
  resolvedSrc = path11.resolve(process.cwd(), resolvedSrc);
27244
27244
  }
27245
27245
  if (!destStat) {
27246
- return fs9.symlink(resolvedSrc, dest);
27246
+ return fs10.symlink(resolvedSrc, dest);
27247
27247
  }
27248
27248
  let resolvedDest = null;
27249
27249
  try {
27250
- resolvedDest = await fs9.readlink(dest);
27250
+ resolvedDest = await fs10.readlink(dest);
27251
27251
  } catch (e2) {
27252
- if (e2.code === "EINVAL" || e2.code === "UNKNOWN") return fs9.symlink(resolvedSrc, dest);
27252
+ if (e2.code === "EINVAL" || e2.code === "UNKNOWN") return fs10.symlink(resolvedSrc, dest);
27253
27253
  throw e2;
27254
27254
  }
27255
27255
  if (opts.dereference) {
@@ -27261,8 +27261,8 @@ var require_copy = __commonJS({
27261
27261
  if (stat.isSrcSubdir(resolvedDest, resolvedSrc)) {
27262
27262
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
27263
27263
  }
27264
- await fs9.unlink(dest);
27265
- return fs9.symlink(resolvedSrc, dest);
27264
+ await fs10.unlink(dest);
27265
+ return fs10.symlink(resolvedSrc, dest);
27266
27266
  }
27267
27267
  module2.exports = copy2;
27268
27268
  }
@@ -27272,7 +27272,7 @@ var require_copy = __commonJS({
27272
27272
  var require_copy_sync = __commonJS({
27273
27273
  "../node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
27274
27274
  "use strict";
27275
- var fs9 = require_graceful_fs();
27275
+ var fs10 = require_graceful_fs();
27276
27276
  var path11 = __require("path");
27277
27277
  var mkdirsSync = require_mkdirs().mkdirsSync;
27278
27278
  var utimesMillisSync = require_utimes().utimesMillisSync;
@@ -27295,11 +27295,11 @@ var require_copy_sync = __commonJS({
27295
27295
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
27296
27296
  if (opts.filter && !opts.filter(src, dest)) return;
27297
27297
  const destParent = path11.dirname(dest);
27298
- if (!fs9.existsSync(destParent)) mkdirsSync(destParent);
27298
+ if (!fs10.existsSync(destParent)) mkdirsSync(destParent);
27299
27299
  return getStats(destStat, src, dest, opts);
27300
27300
  }
27301
27301
  function getStats(destStat, src, dest, opts) {
27302
- const statSync2 = opts.dereference ? fs9.statSync : fs9.lstatSync;
27302
+ const statSync2 = opts.dereference ? fs10.statSync : fs10.lstatSync;
27303
27303
  const srcStat = statSync2(src);
27304
27304
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
27305
27305
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -27314,14 +27314,14 @@ var require_copy_sync = __commonJS({
27314
27314
  }
27315
27315
  function mayCopyFile(srcStat, src, dest, opts) {
27316
27316
  if (opts.overwrite) {
27317
- fs9.unlinkSync(dest);
27317
+ fs10.unlinkSync(dest);
27318
27318
  return copyFile(srcStat, src, dest, opts);
27319
27319
  } else if (opts.errorOnExist) {
27320
27320
  throw new Error(`'${dest}' already exists`);
27321
27321
  }
27322
27322
  }
27323
27323
  function copyFile(srcStat, src, dest, opts) {
27324
- fs9.copyFileSync(src, dest);
27324
+ fs10.copyFileSync(src, dest);
27325
27325
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
27326
27326
  return setDestMode(dest, srcStat.mode);
27327
27327
  }
@@ -27336,10 +27336,10 @@ var require_copy_sync = __commonJS({
27336
27336
  return setDestMode(dest, srcMode | 128);
27337
27337
  }
27338
27338
  function setDestMode(dest, srcMode) {
27339
- return fs9.chmodSync(dest, srcMode);
27339
+ return fs10.chmodSync(dest, srcMode);
27340
27340
  }
27341
27341
  function setDestTimestamps(src, dest) {
27342
- const updatedSrcStat = fs9.statSync(src);
27342
+ const updatedSrcStat = fs10.statSync(src);
27343
27343
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
27344
27344
  }
27345
27345
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -27347,12 +27347,12 @@ var require_copy_sync = __commonJS({
27347
27347
  return copyDir(src, dest, opts);
27348
27348
  }
27349
27349
  function mkDirAndCopy(srcMode, src, dest, opts) {
27350
- fs9.mkdirSync(dest);
27350
+ fs10.mkdirSync(dest);
27351
27351
  copyDir(src, dest, opts);
27352
27352
  return setDestMode(dest, srcMode);
27353
27353
  }
27354
27354
  function copyDir(src, dest, opts) {
27355
- const dir = fs9.opendirSync(src);
27355
+ const dir = fs10.opendirSync(src);
27356
27356
  try {
27357
27357
  let dirent;
27358
27358
  while ((dirent = dir.readSync()) !== null) {
@@ -27370,18 +27370,18 @@ var require_copy_sync = __commonJS({
27370
27370
  return getStats(destStat, srcItem, destItem, opts);
27371
27371
  }
27372
27372
  function onLink(destStat, src, dest, opts) {
27373
- let resolvedSrc = fs9.readlinkSync(src);
27373
+ let resolvedSrc = fs10.readlinkSync(src);
27374
27374
  if (opts.dereference) {
27375
27375
  resolvedSrc = path11.resolve(process.cwd(), resolvedSrc);
27376
27376
  }
27377
27377
  if (!destStat) {
27378
- return fs9.symlinkSync(resolvedSrc, dest);
27378
+ return fs10.symlinkSync(resolvedSrc, dest);
27379
27379
  } else {
27380
27380
  let resolvedDest;
27381
27381
  try {
27382
- resolvedDest = fs9.readlinkSync(dest);
27382
+ resolvedDest = fs10.readlinkSync(dest);
27383
27383
  } catch (err) {
27384
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs9.symlinkSync(resolvedSrc, dest);
27384
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs10.symlinkSync(resolvedSrc, dest);
27385
27385
  throw err;
27386
27386
  }
27387
27387
  if (opts.dereference) {
@@ -27397,8 +27397,8 @@ var require_copy_sync = __commonJS({
27397
27397
  }
27398
27398
  }
27399
27399
  function copyLink(resolvedSrc, dest) {
27400
- fs9.unlinkSync(dest);
27401
- return fs9.symlinkSync(resolvedSrc, dest);
27400
+ fs10.unlinkSync(dest);
27401
+ return fs10.symlinkSync(resolvedSrc, dest);
27402
27402
  }
27403
27403
  module2.exports = copySync;
27404
27404
  }
@@ -27420,13 +27420,13 @@ var require_copy2 = __commonJS({
27420
27420
  var require_remove = __commonJS({
27421
27421
  "../node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
27422
27422
  "use strict";
27423
- var fs9 = require_graceful_fs();
27423
+ var fs10 = require_graceful_fs();
27424
27424
  var u3 = require_universalify().fromCallback;
27425
27425
  function remove(path11, callback) {
27426
- fs9.rm(path11, { recursive: true, force: true }, callback);
27426
+ fs10.rm(path11, { recursive: true, force: true }, callback);
27427
27427
  }
27428
27428
  function removeSync(path11) {
27429
- fs9.rmSync(path11, { recursive: true, force: true });
27429
+ fs10.rmSync(path11, { recursive: true, force: true });
27430
27430
  }
27431
27431
  module2.exports = {
27432
27432
  remove: u3(remove),
@@ -27440,14 +27440,14 @@ var require_empty = __commonJS({
27440
27440
  "../node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
27441
27441
  "use strict";
27442
27442
  var u3 = require_universalify().fromPromise;
27443
- var fs9 = require_fs();
27443
+ var fs10 = require_fs();
27444
27444
  var path11 = __require("path");
27445
27445
  var mkdir = require_mkdirs();
27446
27446
  var remove = require_remove();
27447
27447
  var emptyDir = u3(async function emptyDir2(dir) {
27448
27448
  let items;
27449
27449
  try {
27450
- items = await fs9.readdir(dir);
27450
+ items = await fs10.readdir(dir);
27451
27451
  } catch {
27452
27452
  return mkdir.mkdirs(dir);
27453
27453
  }
@@ -27456,7 +27456,7 @@ var require_empty = __commonJS({
27456
27456
  function emptyDirSync(dir) {
27457
27457
  let items;
27458
27458
  try {
27459
- items = fs9.readdirSync(dir);
27459
+ items = fs10.readdirSync(dir);
27460
27460
  } catch {
27461
27461
  return mkdir.mkdirsSync(dir);
27462
27462
  }
@@ -27480,51 +27480,51 @@ var require_file = __commonJS({
27480
27480
  "use strict";
27481
27481
  var u3 = require_universalify().fromPromise;
27482
27482
  var path11 = __require("path");
27483
- var fs9 = require_fs();
27483
+ var fs10 = require_fs();
27484
27484
  var mkdir = require_mkdirs();
27485
27485
  async function createFile(file) {
27486
27486
  let stats;
27487
27487
  try {
27488
- stats = await fs9.stat(file);
27488
+ stats = await fs10.stat(file);
27489
27489
  } catch {
27490
27490
  }
27491
27491
  if (stats && stats.isFile()) return;
27492
27492
  const dir = path11.dirname(file);
27493
27493
  let dirStats = null;
27494
27494
  try {
27495
- dirStats = await fs9.stat(dir);
27495
+ dirStats = await fs10.stat(dir);
27496
27496
  } catch (err) {
27497
27497
  if (err.code === "ENOENT") {
27498
27498
  await mkdir.mkdirs(dir);
27499
- await fs9.writeFile(file, "");
27499
+ await fs10.writeFile(file, "");
27500
27500
  return;
27501
27501
  } else {
27502
27502
  throw err;
27503
27503
  }
27504
27504
  }
27505
27505
  if (dirStats.isDirectory()) {
27506
- await fs9.writeFile(file, "");
27506
+ await fs10.writeFile(file, "");
27507
27507
  } else {
27508
- await fs9.readdir(dir);
27508
+ await fs10.readdir(dir);
27509
27509
  }
27510
27510
  }
27511
27511
  function createFileSync(file) {
27512
27512
  let stats;
27513
27513
  try {
27514
- stats = fs9.statSync(file);
27514
+ stats = fs10.statSync(file);
27515
27515
  } catch {
27516
27516
  }
27517
27517
  if (stats && stats.isFile()) return;
27518
27518
  const dir = path11.dirname(file);
27519
27519
  try {
27520
- if (!fs9.statSync(dir).isDirectory()) {
27521
- fs9.readdirSync(dir);
27520
+ if (!fs10.statSync(dir).isDirectory()) {
27521
+ fs10.readdirSync(dir);
27522
27522
  }
27523
27523
  } catch (err) {
27524
27524
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
27525
27525
  else throw err;
27526
27526
  }
27527
- fs9.writeFileSync(file, "");
27527
+ fs10.writeFileSync(file, "");
27528
27528
  }
27529
27529
  module2.exports = {
27530
27530
  createFile: u3(createFile),
@@ -27539,49 +27539,49 @@ var require_link = __commonJS({
27539
27539
  "use strict";
27540
27540
  var u3 = require_universalify().fromPromise;
27541
27541
  var path11 = __require("path");
27542
- var fs9 = require_fs();
27542
+ var fs10 = require_fs();
27543
27543
  var mkdir = require_mkdirs();
27544
- var { pathExists } = require_path_exists();
27544
+ var { pathExists: pathExists2 } = require_path_exists();
27545
27545
  var { areIdentical } = require_stat();
27546
27546
  async function createLink(srcpath, dstpath) {
27547
27547
  let dstStat;
27548
27548
  try {
27549
- dstStat = await fs9.lstat(dstpath);
27549
+ dstStat = await fs10.lstat(dstpath);
27550
27550
  } catch {
27551
27551
  }
27552
27552
  let srcStat;
27553
27553
  try {
27554
- srcStat = await fs9.lstat(srcpath);
27554
+ srcStat = await fs10.lstat(srcpath);
27555
27555
  } catch (err) {
27556
27556
  err.message = err.message.replace("lstat", "ensureLink");
27557
27557
  throw err;
27558
27558
  }
27559
27559
  if (dstStat && areIdentical(srcStat, dstStat)) return;
27560
27560
  const dir = path11.dirname(dstpath);
27561
- const dirExists = await pathExists(dir);
27561
+ const dirExists = await pathExists2(dir);
27562
27562
  if (!dirExists) {
27563
27563
  await mkdir.mkdirs(dir);
27564
27564
  }
27565
- await fs9.link(srcpath, dstpath);
27565
+ await fs10.link(srcpath, dstpath);
27566
27566
  }
27567
27567
  function createLinkSync(srcpath, dstpath) {
27568
27568
  let dstStat;
27569
27569
  try {
27570
- dstStat = fs9.lstatSync(dstpath);
27570
+ dstStat = fs10.lstatSync(dstpath);
27571
27571
  } catch {
27572
27572
  }
27573
27573
  try {
27574
- const srcStat = fs9.lstatSync(srcpath);
27574
+ const srcStat = fs10.lstatSync(srcpath);
27575
27575
  if (dstStat && areIdentical(srcStat, dstStat)) return;
27576
27576
  } catch (err) {
27577
27577
  err.message = err.message.replace("lstat", "ensureLink");
27578
27578
  throw err;
27579
27579
  }
27580
27580
  const dir = path11.dirname(dstpath);
27581
- const dirExists = fs9.existsSync(dir);
27582
- if (dirExists) return fs9.linkSync(srcpath, dstpath);
27581
+ const dirExists = fs10.existsSync(dir);
27582
+ if (dirExists) return fs10.linkSync(srcpath, dstpath);
27583
27583
  mkdir.mkdirsSync(dir);
27584
- return fs9.linkSync(srcpath, dstpath);
27584
+ return fs10.linkSync(srcpath, dstpath);
27585
27585
  }
27586
27586
  module2.exports = {
27587
27587
  createLink: u3(createLink),
@@ -27595,13 +27595,13 @@ var require_symlink_paths = __commonJS({
27595
27595
  "../node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
27596
27596
  "use strict";
27597
27597
  var path11 = __require("path");
27598
- var fs9 = require_fs();
27599
- var { pathExists } = require_path_exists();
27598
+ var fs10 = require_fs();
27599
+ var { pathExists: pathExists2 } = require_path_exists();
27600
27600
  var u3 = require_universalify().fromPromise;
27601
27601
  async function symlinkPaths(srcpath, dstpath) {
27602
27602
  if (path11.isAbsolute(srcpath)) {
27603
27603
  try {
27604
- await fs9.lstat(srcpath);
27604
+ await fs10.lstat(srcpath);
27605
27605
  } catch (err) {
27606
27606
  err.message = err.message.replace("lstat", "ensureSymlink");
27607
27607
  throw err;
@@ -27613,7 +27613,7 @@ var require_symlink_paths = __commonJS({
27613
27613
  }
27614
27614
  const dstdir = path11.dirname(dstpath);
27615
27615
  const relativeToDst = path11.join(dstdir, srcpath);
27616
- const exists = await pathExists(relativeToDst);
27616
+ const exists = await pathExists2(relativeToDst);
27617
27617
  if (exists) {
27618
27618
  return {
27619
27619
  toCwd: relativeToDst,
@@ -27621,7 +27621,7 @@ var require_symlink_paths = __commonJS({
27621
27621
  };
27622
27622
  }
27623
27623
  try {
27624
- await fs9.lstat(srcpath);
27624
+ await fs10.lstat(srcpath);
27625
27625
  } catch (err) {
27626
27626
  err.message = err.message.replace("lstat", "ensureSymlink");
27627
27627
  throw err;
@@ -27633,7 +27633,7 @@ var require_symlink_paths = __commonJS({
27633
27633
  }
27634
27634
  function symlinkPathsSync(srcpath, dstpath) {
27635
27635
  if (path11.isAbsolute(srcpath)) {
27636
- const exists2 = fs9.existsSync(srcpath);
27636
+ const exists2 = fs10.existsSync(srcpath);
27637
27637
  if (!exists2) throw new Error("absolute srcpath does not exist");
27638
27638
  return {
27639
27639
  toCwd: srcpath,
@@ -27642,14 +27642,14 @@ var require_symlink_paths = __commonJS({
27642
27642
  }
27643
27643
  const dstdir = path11.dirname(dstpath);
27644
27644
  const relativeToDst = path11.join(dstdir, srcpath);
27645
- const exists = fs9.existsSync(relativeToDst);
27645
+ const exists = fs10.existsSync(relativeToDst);
27646
27646
  if (exists) {
27647
27647
  return {
27648
27648
  toCwd: relativeToDst,
27649
27649
  toDst: srcpath
27650
27650
  };
27651
27651
  }
27652
- const srcExists = fs9.existsSync(srcpath);
27652
+ const srcExists = fs10.existsSync(srcpath);
27653
27653
  if (!srcExists) throw new Error("relative srcpath does not exist");
27654
27654
  return {
27655
27655
  toCwd: srcpath,
@@ -27667,13 +27667,13 @@ var require_symlink_paths = __commonJS({
27667
27667
  var require_symlink_type = __commonJS({
27668
27668
  "../node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
27669
27669
  "use strict";
27670
- var fs9 = require_fs();
27670
+ var fs10 = require_fs();
27671
27671
  var u3 = require_universalify().fromPromise;
27672
27672
  async function symlinkType(srcpath, type) {
27673
27673
  if (type) return type;
27674
27674
  let stats;
27675
27675
  try {
27676
- stats = await fs9.lstat(srcpath);
27676
+ stats = await fs10.lstat(srcpath);
27677
27677
  } catch {
27678
27678
  return "file";
27679
27679
  }
@@ -27683,7 +27683,7 @@ var require_symlink_type = __commonJS({
27683
27683
  if (type) return type;
27684
27684
  let stats;
27685
27685
  try {
27686
- stats = fs9.lstatSync(srcpath);
27686
+ stats = fs10.lstatSync(srcpath);
27687
27687
  } catch {
27688
27688
  return "file";
27689
27689
  }
@@ -27702,22 +27702,22 @@ var require_symlink = __commonJS({
27702
27702
  "use strict";
27703
27703
  var u3 = require_universalify().fromPromise;
27704
27704
  var path11 = __require("path");
27705
- var fs9 = require_fs();
27705
+ var fs10 = require_fs();
27706
27706
  var { mkdirs, mkdirsSync } = require_mkdirs();
27707
27707
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
27708
27708
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
27709
- var { pathExists } = require_path_exists();
27709
+ var { pathExists: pathExists2 } = require_path_exists();
27710
27710
  var { areIdentical } = require_stat();
27711
27711
  async function createSymlink(srcpath, dstpath, type) {
27712
27712
  let stats;
27713
27713
  try {
27714
- stats = await fs9.lstat(dstpath);
27714
+ stats = await fs10.lstat(dstpath);
27715
27715
  } catch {
27716
27716
  }
27717
27717
  if (stats && stats.isSymbolicLink()) {
27718
27718
  const [srcStat, dstStat] = await Promise.all([
27719
- fs9.stat(srcpath),
27720
- fs9.stat(dstpath)
27719
+ fs10.stat(srcpath),
27720
+ fs10.stat(dstpath)
27721
27721
  ]);
27722
27722
  if (areIdentical(srcStat, dstStat)) return;
27723
27723
  }
@@ -27725,30 +27725,30 @@ var require_symlink = __commonJS({
27725
27725
  srcpath = relative.toDst;
27726
27726
  const toType = await symlinkType(relative.toCwd, type);
27727
27727
  const dir = path11.dirname(dstpath);
27728
- if (!await pathExists(dir)) {
27728
+ if (!await pathExists2(dir)) {
27729
27729
  await mkdirs(dir);
27730
27730
  }
27731
- return fs9.symlink(srcpath, dstpath, toType);
27731
+ return fs10.symlink(srcpath, dstpath, toType);
27732
27732
  }
27733
27733
  function createSymlinkSync(srcpath, dstpath, type) {
27734
27734
  let stats;
27735
27735
  try {
27736
- stats = fs9.lstatSync(dstpath);
27736
+ stats = fs10.lstatSync(dstpath);
27737
27737
  } catch {
27738
27738
  }
27739
27739
  if (stats && stats.isSymbolicLink()) {
27740
- const srcStat = fs9.statSync(srcpath);
27741
- const dstStat = fs9.statSync(dstpath);
27740
+ const srcStat = fs10.statSync(srcpath);
27741
+ const dstStat = fs10.statSync(dstpath);
27742
27742
  if (areIdentical(srcStat, dstStat)) return;
27743
27743
  }
27744
27744
  const relative = symlinkPathsSync(srcpath, dstpath);
27745
27745
  srcpath = relative.toDst;
27746
27746
  type = symlinkTypeSync(relative.toCwd, type);
27747
27747
  const dir = path11.dirname(dstpath);
27748
- const exists = fs9.existsSync(dir);
27749
- if (exists) return fs9.symlinkSync(srcpath, dstpath, type);
27748
+ const exists = fs10.existsSync(dir);
27749
+ if (exists) return fs10.symlinkSync(srcpath, dstpath, type);
27750
27750
  mkdirsSync(dir);
27751
- return fs9.symlinkSync(srcpath, dstpath, type);
27751
+ return fs10.symlinkSync(srcpath, dstpath, type);
27752
27752
  }
27753
27753
  module2.exports = {
27754
27754
  createSymlink: u3(createSymlink),
@@ -27815,9 +27815,9 @@ var require_jsonfile = __commonJS({
27815
27815
  if (typeof options2 === "string") {
27816
27816
  options2 = { encoding: options2 };
27817
27817
  }
27818
- const fs9 = options2.fs || _fs;
27818
+ const fs10 = options2.fs || _fs;
27819
27819
  const shouldThrow = "throws" in options2 ? options2.throws : true;
27820
- let data = await universalify.fromCallback(fs9.readFile)(file, options2);
27820
+ let data = await universalify.fromCallback(fs10.readFile)(file, options2);
27821
27821
  data = stripBom(data);
27822
27822
  let obj;
27823
27823
  try {
@@ -27837,10 +27837,10 @@ var require_jsonfile = __commonJS({
27837
27837
  if (typeof options2 === "string") {
27838
27838
  options2 = { encoding: options2 };
27839
27839
  }
27840
- const fs9 = options2.fs || _fs;
27840
+ const fs10 = options2.fs || _fs;
27841
27841
  const shouldThrow = "throws" in options2 ? options2.throws : true;
27842
27842
  try {
27843
- let content = fs9.readFileSync(file, options2);
27843
+ let content = fs10.readFileSync(file, options2);
27844
27844
  content = stripBom(content);
27845
27845
  return JSON.parse(content, options2.reviver);
27846
27846
  } catch (err) {
@@ -27853,20 +27853,20 @@ var require_jsonfile = __commonJS({
27853
27853
  }
27854
27854
  }
27855
27855
  async function _writeFile(file, obj, options2 = {}) {
27856
- const fs9 = options2.fs || _fs;
27856
+ const fs10 = options2.fs || _fs;
27857
27857
  const str = stringify(obj, options2);
27858
- await universalify.fromCallback(fs9.writeFile)(file, str, options2);
27858
+ await universalify.fromCallback(fs10.writeFile)(file, str, options2);
27859
27859
  }
27860
- var writeFile2 = universalify.fromPromise(_writeFile);
27860
+ var writeFile = universalify.fromPromise(_writeFile);
27861
27861
  function writeFileSync2(file, obj, options2 = {}) {
27862
- const fs9 = options2.fs || _fs;
27862
+ const fs10 = options2.fs || _fs;
27863
27863
  const str = stringify(obj, options2);
27864
- return fs9.writeFileSync(file, str, options2);
27864
+ return fs10.writeFileSync(file, str, options2);
27865
27865
  }
27866
27866
  var jsonfile = {
27867
27867
  readFile,
27868
27868
  readFileSync: readFileSync3,
27869
- writeFile: writeFile2,
27869
+ writeFile,
27870
27870
  writeFileSync: writeFileSync2
27871
27871
  };
27872
27872
  module2.exports = jsonfile;
@@ -27893,23 +27893,23 @@ var require_output_file = __commonJS({
27893
27893
  "../node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
27894
27894
  "use strict";
27895
27895
  var u3 = require_universalify().fromPromise;
27896
- var fs9 = require_fs();
27896
+ var fs10 = require_fs();
27897
27897
  var path11 = __require("path");
27898
27898
  var mkdir = require_mkdirs();
27899
- var pathExists = require_path_exists().pathExists;
27899
+ var pathExists2 = require_path_exists().pathExists;
27900
27900
  async function outputFile(file, data, encoding = "utf-8") {
27901
27901
  const dir = path11.dirname(file);
27902
- if (!await pathExists(dir)) {
27902
+ if (!await pathExists2(dir)) {
27903
27903
  await mkdir.mkdirs(dir);
27904
27904
  }
27905
- return fs9.writeFile(file, data, encoding);
27905
+ return fs10.writeFile(file, data, encoding);
27906
27906
  }
27907
27907
  function outputFileSync(file, ...args2) {
27908
27908
  const dir = path11.dirname(file);
27909
- if (!fs9.existsSync(dir)) {
27909
+ if (!fs10.existsSync(dir)) {
27910
27910
  mkdir.mkdirsSync(dir);
27911
27911
  }
27912
- fs9.writeFileSync(file, ...args2);
27912
+ fs10.writeFileSync(file, ...args2);
27913
27913
  }
27914
27914
  module2.exports = {
27915
27915
  outputFile: u3(outputFile),
@@ -27968,12 +27968,12 @@ var require_json2 = __commonJS({
27968
27968
  var require_move = __commonJS({
27969
27969
  "../node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
27970
27970
  "use strict";
27971
- var fs9 = require_fs();
27971
+ var fs10 = require_fs();
27972
27972
  var path11 = __require("path");
27973
27973
  var { copy: copy2 } = require_copy2();
27974
27974
  var { remove } = require_remove();
27975
27975
  var { mkdirp } = require_mkdirs();
27976
- var { pathExists } = require_path_exists();
27976
+ var { pathExists: pathExists2 } = require_path_exists();
27977
27977
  var stat = require_stat();
27978
27978
  async function move(src, dest, opts = {}) {
27979
27979
  const overwrite = opts.overwrite || opts.clobber || false;
@@ -27990,12 +27990,12 @@ var require_move = __commonJS({
27990
27990
  if (!isChangingCase) {
27991
27991
  if (overwrite) {
27992
27992
  await remove(dest);
27993
- } else if (await pathExists(dest)) {
27993
+ } else if (await pathExists2(dest)) {
27994
27994
  throw new Error("dest already exists.");
27995
27995
  }
27996
27996
  }
27997
27997
  try {
27998
- await fs9.rename(src, dest);
27998
+ await fs10.rename(src, dest);
27999
27999
  } catch (err) {
28000
28000
  if (err.code !== "EXDEV") {
28001
28001
  throw err;
@@ -28020,7 +28020,7 @@ var require_move = __commonJS({
28020
28020
  var require_move_sync = __commonJS({
28021
28021
  "../node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
28022
28022
  "use strict";
28023
- var fs9 = require_graceful_fs();
28023
+ var fs10 = require_graceful_fs();
28024
28024
  var path11 = __require("path");
28025
28025
  var copySync = require_copy2().copySync;
28026
28026
  var removeSync = require_remove().removeSync;
@@ -28045,12 +28045,12 @@ var require_move_sync = __commonJS({
28045
28045
  removeSync(dest);
28046
28046
  return rename(src, dest, overwrite);
28047
28047
  }
28048
- if (fs9.existsSync(dest)) throw new Error("dest already exists.");
28048
+ if (fs10.existsSync(dest)) throw new Error("dest already exists.");
28049
28049
  return rename(src, dest, overwrite);
28050
28050
  }
28051
28051
  function rename(src, dest, overwrite) {
28052
28052
  try {
28053
- fs9.renameSync(src, dest);
28053
+ fs10.renameSync(src, dest);
28054
28054
  } catch (err) {
28055
28055
  if (err.code !== "EXDEV") throw err;
28056
28056
  return moveAcrossDevice(src, dest, overwrite);
@@ -28107,7 +28107,7 @@ var require_windows = __commonJS({
28107
28107
  "../node_modules/cross-spawn/node_modules/which/node_modules/isexe/windows.js"(exports2, module2) {
28108
28108
  module2.exports = isexe;
28109
28109
  isexe.sync = sync;
28110
- var fs9 = __require("fs");
28110
+ var fs10 = __require("fs");
28111
28111
  function checkPathExt(path11, options2) {
28112
28112
  var pathext = options2.pathExt !== void 0 ? options2.pathExt : process.env.PATHEXT;
28113
28113
  if (!pathext) {
@@ -28132,12 +28132,12 @@ var require_windows = __commonJS({
28132
28132
  return checkPathExt(path11, options2);
28133
28133
  }
28134
28134
  function isexe(path11, options2, cb) {
28135
- fs9.stat(path11, function(er, stat) {
28135
+ fs10.stat(path11, function(er, stat) {
28136
28136
  cb(er, er ? false : checkStat(stat, path11, options2));
28137
28137
  });
28138
28138
  }
28139
28139
  function sync(path11, options2) {
28140
- return checkStat(fs9.statSync(path11), path11, options2);
28140
+ return checkStat(fs10.statSync(path11), path11, options2);
28141
28141
  }
28142
28142
  }
28143
28143
  });
@@ -28147,14 +28147,14 @@ var require_mode = __commonJS({
28147
28147
  "../node_modules/cross-spawn/node_modules/which/node_modules/isexe/mode.js"(exports2, module2) {
28148
28148
  module2.exports = isexe;
28149
28149
  isexe.sync = sync;
28150
- var fs9 = __require("fs");
28150
+ var fs10 = __require("fs");
28151
28151
  function isexe(path11, options2, cb) {
28152
- fs9.stat(path11, function(er, stat) {
28152
+ fs10.stat(path11, function(er, stat) {
28153
28153
  cb(er, er ? false : checkStat(stat, options2));
28154
28154
  });
28155
28155
  }
28156
28156
  function sync(path11, options2) {
28157
- return checkStat(fs9.statSync(path11), options2);
28157
+ return checkStat(fs10.statSync(path11), options2);
28158
28158
  }
28159
28159
  function checkStat(stat, options2) {
28160
28160
  return stat.isFile() && checkMode(stat, options2);
@@ -28178,7 +28178,7 @@ var require_mode = __commonJS({
28178
28178
  // ../node_modules/cross-spawn/node_modules/which/node_modules/isexe/index.js
28179
28179
  var require_isexe = __commonJS({
28180
28180
  "../node_modules/cross-spawn/node_modules/which/node_modules/isexe/index.js"(exports2, module2) {
28181
- var fs9 = __require("fs");
28181
+ var fs10 = __require("fs");
28182
28182
  var core;
28183
28183
  if (process.platform === "win32" || global.TESTING_WINDOWS) {
28184
28184
  core = require_windows();
@@ -28442,16 +28442,16 @@ var require_shebang_command = __commonJS({
28442
28442
  var require_readShebang = __commonJS({
28443
28443
  "../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
28444
28444
  "use strict";
28445
- var fs9 = __require("fs");
28445
+ var fs10 = __require("fs");
28446
28446
  var shebangCommand = require_shebang_command();
28447
28447
  function readShebang(command2) {
28448
28448
  const size = 150;
28449
28449
  const buffer = Buffer.alloc(size);
28450
28450
  let fd;
28451
28451
  try {
28452
- fd = fs9.openSync(command2, "r");
28453
- fs9.readSync(fd, buffer, 0, size, 0);
28454
- fs9.closeSync(fd);
28452
+ fd = fs10.openSync(command2, "r");
28453
+ fs10.readSync(fd, buffer, 0, size, 0);
28454
+ fs10.closeSync(fd);
28455
28455
  } catch (e2) {
28456
28456
  }
28457
28457
  return shebangCommand(buffer.toString());
@@ -31981,8 +31981,8 @@ var require_utils6 = __commonJS({
31981
31981
  exports2.array = array;
31982
31982
  var errno = require_errno();
31983
31983
  exports2.errno = errno;
31984
- var fs9 = require_fs2();
31985
- exports2.fs = fs9;
31984
+ var fs10 = require_fs2();
31985
+ exports2.fs = fs10;
31986
31986
  var path11 = require_path();
31987
31987
  exports2.path = path11;
31988
31988
  var pattern = require_pattern();
@@ -32166,12 +32166,12 @@ var require_fs3 = __commonJS({
32166
32166
  "use strict";
32167
32167
  Object.defineProperty(exports2, "__esModule", { value: true });
32168
32168
  exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
32169
- var fs9 = __require("fs");
32169
+ var fs10 = __require("fs");
32170
32170
  exports2.FILE_SYSTEM_ADAPTER = {
32171
- lstat: fs9.lstat,
32172
- stat: fs9.stat,
32173
- lstatSync: fs9.lstatSync,
32174
- statSync: fs9.statSync
32171
+ lstat: fs10.lstat,
32172
+ stat: fs10.stat,
32173
+ lstatSync: fs10.lstatSync,
32174
+ statSync: fs10.statSync
32175
32175
  };
32176
32176
  function createFileSystemAdapter(fsMethods) {
32177
32177
  if (fsMethods === void 0) {
@@ -32188,12 +32188,12 @@ var require_settings = __commonJS({
32188
32188
  "../node_modules/@nodelib/fs.stat/out/settings.js"(exports2) {
32189
32189
  "use strict";
32190
32190
  Object.defineProperty(exports2, "__esModule", { value: true });
32191
- var fs9 = require_fs3();
32191
+ var fs10 = require_fs3();
32192
32192
  var Settings = class {
32193
32193
  constructor(_options = {}) {
32194
32194
  this._options = _options;
32195
32195
  this.followSymbolicLink = this._getValue(this._options.followSymbolicLink, true);
32196
- this.fs = fs9.createFileSystemAdapter(this._options.fs);
32196
+ this.fs = fs10.createFileSystemAdapter(this._options.fs);
32197
32197
  this.markSymbolicLink = this._getValue(this._options.markSymbolicLink, false);
32198
32198
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
32199
32199
  }
@@ -32348,8 +32348,8 @@ var require_utils7 = __commonJS({
32348
32348
  "use strict";
32349
32349
  Object.defineProperty(exports2, "__esModule", { value: true });
32350
32350
  exports2.fs = void 0;
32351
- var fs9 = require_fs4();
32352
- exports2.fs = fs9;
32351
+ var fs10 = require_fs4();
32352
+ exports2.fs = fs10;
32353
32353
  }
32354
32354
  });
32355
32355
 
@@ -32544,14 +32544,14 @@ var require_fs5 = __commonJS({
32544
32544
  "use strict";
32545
32545
  Object.defineProperty(exports2, "__esModule", { value: true });
32546
32546
  exports2.createFileSystemAdapter = exports2.FILE_SYSTEM_ADAPTER = void 0;
32547
- var fs9 = __require("fs");
32547
+ var fs10 = __require("fs");
32548
32548
  exports2.FILE_SYSTEM_ADAPTER = {
32549
- lstat: fs9.lstat,
32550
- stat: fs9.stat,
32551
- lstatSync: fs9.lstatSync,
32552
- statSync: fs9.statSync,
32553
- readdir: fs9.readdir,
32554
- readdirSync: fs9.readdirSync
32549
+ lstat: fs10.lstat,
32550
+ stat: fs10.stat,
32551
+ lstatSync: fs10.lstatSync,
32552
+ statSync: fs10.statSync,
32553
+ readdir: fs10.readdir,
32554
+ readdirSync: fs10.readdirSync
32555
32555
  };
32556
32556
  function createFileSystemAdapter(fsMethods) {
32557
32557
  if (fsMethods === void 0) {
@@ -32570,12 +32570,12 @@ var require_settings2 = __commonJS({
32570
32570
  Object.defineProperty(exports2, "__esModule", { value: true });
32571
32571
  var path11 = __require("path");
32572
32572
  var fsStat = require_out();
32573
- var fs9 = require_fs5();
32573
+ var fs10 = require_fs5();
32574
32574
  var Settings = class {
32575
32575
  constructor(_options = {}) {
32576
32576
  this._options = _options;
32577
32577
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
32578
- this.fs = fs9.createFileSystemAdapter(this._options.fs);
32578
+ this.fs = fs10.createFileSystemAdapter(this._options.fs);
32579
32579
  this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path11.sep);
32580
32580
  this.stats = this._getValue(this._options.stats, false);
32581
32581
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
@@ -33933,16 +33933,16 @@ var require_settings4 = __commonJS({
33933
33933
  "use strict";
33934
33934
  Object.defineProperty(exports2, "__esModule", { value: true });
33935
33935
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
33936
- var fs9 = __require("fs");
33936
+ var fs10 = __require("fs");
33937
33937
  var os = __require("os");
33938
33938
  var CPU_COUNT = Math.max(os.cpus().length, 1);
33939
33939
  exports2.DEFAULT_FILE_SYSTEM_ADAPTER = {
33940
- lstat: fs9.lstat,
33941
- lstatSync: fs9.lstatSync,
33942
- stat: fs9.stat,
33943
- statSync: fs9.statSync,
33944
- readdir: fs9.readdir,
33945
- readdirSync: fs9.readdirSync
33940
+ lstat: fs10.lstat,
33941
+ lstatSync: fs10.lstatSync,
33942
+ stat: fs10.stat,
33943
+ statSync: fs10.statSync,
33944
+ readdir: fs10.readdir,
33945
+ readdirSync: fs10.readdirSync
33946
33946
  };
33947
33947
  var Settings = class {
33948
33948
  constructor(_options = {}) {
@@ -35171,10 +35171,9 @@ var Y2 = ({ indicator: t2 = "dots" } = {}) => {
35171
35171
  };
35172
35172
 
35173
35173
  // bin/commands/create.ts
35174
- var fs8 = __toESM(require_lib(), 1);
35174
+ var fs9 = __toESM(require_lib(), 1);
35175
35175
  var import_picocolors4 = __toESM(require_picocolors(), 1);
35176
- import { existsSync as existsSync2 } from "node:fs";
35177
- import { join as join3, resolve } from "node:path";
35176
+ import { resolve } from "node:path";
35178
35177
 
35179
35178
  // bin/errors.ts
35180
35179
  var import_picocolors3 = __toESM(require_picocolors(), 1);
@@ -42571,7 +42570,6 @@ var generateGlobTasksSync = normalizeArgumentsSync(generateTasksSync);
42571
42570
  var { convertPathToPattern } = import_fast_glob2.default;
42572
42571
 
42573
42572
  // bin/services/template-manager.ts
42574
- import { existsSync } from "node:fs";
42575
42573
  import * as path10 from "node:path";
42576
42574
  import { join as join2 } from "node:path";
42577
42575
 
@@ -42630,10 +42628,16 @@ var addPackageDependencies = async (opts) => {
42630
42628
  // bin/services/template-manager.ts
42631
42629
  async function copyTemplate(templateName, context) {
42632
42630
  const templatePath = path10.join(PKG_ROOT, "templates", templateName);
42633
- if (!existsSync(templatePath)) {
42631
+ if (!fs7.existsSync(templatePath)) {
42634
42632
  throw new Error(`Template '${templateName}' not found at ${templatePath}`);
42635
42633
  }
42636
- const filesToRename = ["_gitignore", "_npmrc", "_env", "_env.example"];
42634
+ const filesToRename = [
42635
+ "_gitignore",
42636
+ "_npmrc",
42637
+ "_env",
42638
+ "_env.example",
42639
+ "_prettierignore"
42640
+ ];
42637
42641
  try {
42638
42642
  const copySpinner = Y2();
42639
42643
  copySpinner.start("Copying template files...");
@@ -42682,7 +42686,7 @@ async function copyTemplate(templateName, context) {
42682
42686
  }
42683
42687
  async function updateTemplatePackageJson(context) {
42684
42688
  const packageJsonPath = join2(context.path, "package.json");
42685
- if (!existsSync(packageJsonPath)) {
42689
+ if (!fs7.existsSync(packageJsonPath)) {
42686
42690
  return;
42687
42691
  }
42688
42692
  const packageJson = await fs7.readJson(packageJsonPath);
@@ -42717,6 +42721,40 @@ async function handleRwsdkPostInstall(context) {
42717
42721
  }
42718
42722
  }
42719
42723
 
42724
+ // bin/services/vibe-rules.ts
42725
+ var fs8 = __toESM(require_lib(), 1);
42726
+ import { join as join3 } from "node:path";
42727
+ async function ensureVibeRulesPostinstall(cwd, editor) {
42728
+ try {
42729
+ const packageJsonPath = join3(cwd, "package.json");
42730
+ if (!await fs8.pathExists(packageJsonPath)) return;
42731
+ const packageJson = await fs8.readJson(packageJsonPath);
42732
+ const postinstallCmd = `vibe-rules install ${editor}`;
42733
+ if (!packageJson.scripts) {
42734
+ packageJson.scripts = {};
42735
+ }
42736
+ if (packageJson.scripts.postinstall) {
42737
+ if (!packageJson.scripts.postinstall.includes("vibe-rules install")) {
42738
+ packageJson.scripts.postinstall = `${packageJson.scripts.postinstall} && ${postinstallCmd}`;
42739
+ }
42740
+ } else {
42741
+ packageJson.scripts.postinstall = postinstallCmd;
42742
+ }
42743
+ await fs8.writeJson(packageJsonPath, packageJson, { spaces: 2 });
42744
+ } catch (_err) {
42745
+ }
42746
+ }
42747
+ async function installAlchemyRules(input2) {
42748
+ const packageManager = input2.packageManager || "bun";
42749
+ const commands = getPackageManagerCommands(packageManager);
42750
+ const args2 = ["vibe-rules", "install", input2.editor];
42751
+ await execa(commands.x, args2, {
42752
+ stdio: "pipe",
42753
+ cwd: input2.cwd
42754
+ });
42755
+ await ensureVibeRulesPostinstall(input2.cwd ?? process.cwd(), input2.editor);
42756
+ }
42757
+
42720
42758
  // ../node_modules/zod/v3/external.js
42721
42759
  var external_exports = {};
42722
42760
  __export(external_exports, {
@@ -46785,6 +46823,19 @@ var ProjectNameSchema = external_exports.string().min(1, "Project name cannot be
46785
46823
  (name) => name.toLowerCase() !== "node_modules",
46786
46824
  "Project name is reserved"
46787
46825
  ).describe("Project name or path");
46826
+ var EditorSchema = external_exports.enum([
46827
+ "cursor",
46828
+ "windsurf",
46829
+ "vscode",
46830
+ "zed",
46831
+ "claude-code",
46832
+ "gemini",
46833
+ "codex",
46834
+ "amp",
46835
+ "clinerules",
46836
+ "roo",
46837
+ "unified"
46838
+ ]).describe("Editor for vibe-rules");
46788
46839
 
46789
46840
  // bin/commands/create.ts
46790
46841
  var isTest = process.env.NODE_ENV === "test";
@@ -46843,11 +46894,7 @@ async function createProjectContext(cliOptions) {
46843
46894
  );
46844
46895
  }
46845
46896
  const path11 = resolve(process.cwd(), name);
46846
- let packageManager = options2.packageManager || detectedPm;
46847
- if (options2.bun) packageManager = "bun";
46848
- else if (options2.npm) packageManager = "npm";
46849
- else if (options2.pnpm) packageManager = "pnpm";
46850
- else if (options2.yarn) packageManager = "yarn";
46897
+ let packageManager = options2.pm || detectedPm;
46851
46898
  let shouldInstall = true;
46852
46899
  if (options2.install !== void 0) {
46853
46900
  shouldInstall = options2.install;
@@ -46878,7 +46925,7 @@ async function createProjectContext(cliOptions) {
46878
46925
  };
46879
46926
  }
46880
46927
  async function handleDirectoryOverwrite(context) {
46881
- if (!existsSync2(context.path)) {
46928
+ if (!fs9.existsSync(context.path)) {
46882
46929
  return;
46883
46930
  }
46884
46931
  let shouldOverwrite = false;
@@ -46905,7 +46952,7 @@ async function handleDirectoryOverwrite(context) {
46905
46952
  const s = Y2();
46906
46953
  s.start(`Removing existing directory: ${import_picocolors4.default.yellow(context.path)}`);
46907
46954
  try {
46908
- await fs8.rm(context.path, { recursive: true, force: true });
46955
+ await fs9.rm(context.path, { recursive: true, force: true });
46909
46956
  s.stop(`Directory ${import_picocolors4.default.yellow(context.path)} removed.`);
46910
46957
  } catch (error) {
46911
46958
  s.stop(import_picocolors4.default.red(`Failed to remove directory ${import_picocolors4.default.yellow(context.path)}.`));
@@ -46927,17 +46974,55 @@ async function initializeTemplate(context) {
46927
46974
  `Template initialization failed for '${context.template}'`
46928
46975
  );
46929
46976
  }
46930
- const gitignorePath = join3(context.path, ".gitignore");
46931
- if (!existsSync2(gitignorePath)) {
46932
- try {
46933
- await fs8.writeFile(
46934
- gitignorePath,
46935
- "node_modules/\n.env\n.env.local\ndist/\nlib/\n.wrangler/\nwrangler.jsonc\n*.tsbuildinfo\n"
46936
- );
46937
- } catch (error) {
46938
- const errorMsg = error instanceof Error ? error.message : String(error);
46939
- M2.warn(`Failed to create .gitignore: ${errorMsg}`);
46977
+ }
46978
+ async function setupVibeRules(context) {
46979
+ let selectedEditor = context.options.vibeRules;
46980
+ if (!selectedEditor && !context.isTest && !context.options.yes) {
46981
+ const setupResult = await ye({
46982
+ message: "Setup vibe-rules for AI development assistance?",
46983
+ initialValue: true
46984
+ });
46985
+ if (pD(setupResult) || !setupResult) {
46986
+ return;
46987
+ }
46988
+ const editorResult = await ve({
46989
+ message: "Which editor would you like to configure?",
46990
+ options: [
46991
+ { label: "Cursor", value: "cursor" },
46992
+ { label: "Windsurf", value: "windsurf" },
46993
+ { label: "VSCode", value: "vscode" },
46994
+ { label: "Zed", value: "zed" },
46995
+ { label: "Claude Code", value: "claude-code" },
46996
+ { label: "Gemini", value: "gemini" },
46997
+ { label: "Codex", value: "codex" },
46998
+ { label: "Amp", value: "amp" },
46999
+ { label: "Cline Rules", value: "clinerules" },
47000
+ { label: "Roo", value: "roo" },
47001
+ { label: "Unified (.rules)", value: "unified" }
47002
+ ]
47003
+ });
47004
+ if (pD(editorResult)) {
47005
+ return;
46940
47006
  }
47007
+ selectedEditor = editorResult;
47008
+ }
47009
+ if (!selectedEditor) {
47010
+ return;
47011
+ }
47012
+ const s = Y2();
47013
+ s.start("Configuring vibe-rules...");
47014
+ try {
47015
+ await installAlchemyRules({
47016
+ editor: selectedEditor,
47017
+ packageManager: context.packageManager,
47018
+ cwd: context.path
47019
+ });
47020
+ await ensureVibeRulesPostinstall(context.path, selectedEditor);
47021
+ await installDependencies(context);
47022
+ s.stop("vibe-rules configured");
47023
+ } catch (error) {
47024
+ s.stop("Failed to configure vibe-rules");
47025
+ throwWithContext(error, "Failed to configure vibe-rules");
46941
47026
  }
46942
47027
  }
46943
47028
  async function createAlchemy(cliOptions) {
@@ -46954,6 +47039,7 @@ ${import_picocolors4.default.cyan("\u{1F4E6} Install dependencies:")}
46954
47039
  ${context.packageManager} install
46955
47040
 
46956
47041
  ` : "";
47042
+ await setupVibeRules(context);
46957
47043
  Me(
46958
47044
  `
46959
47045
  ${import_picocolors4.default.cyan("\u{1F4C1} Navigate to your project:")}
@@ -46998,14 +47084,15 @@ var router2 = t.router({
46998
47084
  ProjectNameSchema.optional(),
46999
47085
  import_trpc_cli.zod.object({
47000
47086
  template: TemplateSchema.optional(),
47001
- packageManager: PackageManagerSchema.optional(),
47002
47087
  yes: import_trpc_cli.zod.boolean().optional().default(false).describe("Skip prompts and use defaults"),
47003
47088
  overwrite: import_trpc_cli.zod.boolean().optional().default(false).describe("Overwrite existing directory"),
47004
- bun: import_trpc_cli.zod.boolean().optional().default(false).describe("Use Bun as the package manager"),
47005
- npm: import_trpc_cli.zod.boolean().optional().default(false).describe("Use npm as the package manager"),
47006
- pnpm: import_trpc_cli.zod.boolean().optional().default(false).describe("Use pnpm as the package manager"),
47007
- yarn: import_trpc_cli.zod.boolean().optional().default(false).describe("Use Yarn as the package manager"),
47008
- install: import_trpc_cli.zod.boolean().optional().describe("Install dependencies after scaffolding")
47089
+ install: import_trpc_cli.zod.boolean().optional().describe("Install dependencies after scaffolding"),
47090
+ pm: PackageManagerSchema.optional().describe(
47091
+ "Package manager to use (bun, npm, pnpm, yarn)"
47092
+ ),
47093
+ vibeRules: EditorSchema.optional().describe(
47094
+ "Setup vibe-rules for the specified editor (cursor, windsurf, vscode, zed, claude-code, gemini, codex, amp, clinerules, roo, unified)"
47095
+ )
47009
47096
  }).optional().default({})
47010
47097
  ])
47011
47098
  ).mutation(async ({ input: input2 }) => {