@atlashub/smartstack-cli 1.4.1 → 1.5.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 (58) hide show
  1. package/.documentation/agents.html +916 -916
  2. package/.documentation/apex.html +1018 -1018
  3. package/.documentation/business-analyse.html +1501 -1501
  4. package/.documentation/commands.html +680 -680
  5. package/.documentation/css/styles.css +2168 -2168
  6. package/.documentation/efcore.html +2505 -2505
  7. package/.documentation/gitflow.html +2618 -2618
  8. package/.documentation/hooks.html +413 -413
  9. package/.documentation/index.html +323 -323
  10. package/.documentation/installation.html +462 -462
  11. package/.documentation/js/app.js +794 -794
  12. package/.documentation/test-web.html +513 -513
  13. package/dist/index.js +807 -277
  14. package/dist/index.js.map +1 -1
  15. package/package.json +1 -1
  16. package/templates/agents/efcore/conflicts.md +44 -17
  17. package/templates/agents/efcore/db-status.md +27 -6
  18. package/templates/agents/efcore/scan.md +43 -13
  19. package/templates/commands/ai-prompt.md +315 -315
  20. package/templates/commands/application/create.md +362 -362
  21. package/templates/commands/controller/create.md +216 -216
  22. package/templates/commands/controller.md +59 -0
  23. package/templates/commands/documentation/module.md +202 -202
  24. package/templates/commands/efcore/_env-check.md +153 -153
  25. package/templates/commands/efcore/conflicts.md +109 -192
  26. package/templates/commands/efcore/db-status.md +101 -89
  27. package/templates/commands/efcore/migration.md +23 -11
  28. package/templates/commands/efcore/scan.md +115 -119
  29. package/templates/commands/efcore.md +54 -6
  30. package/templates/commands/feature-full.md +267 -267
  31. package/templates/commands/gitflow/11-finish.md +145 -11
  32. package/templates/commands/gitflow/13-sync.md +216 -216
  33. package/templates/commands/gitflow/14-rebase.md +251 -251
  34. package/templates/commands/gitflow/2-status.md +120 -10
  35. package/templates/commands/gitflow/3-commit.md +150 -0
  36. package/templates/commands/gitflow/7-pull-request.md +134 -5
  37. package/templates/commands/gitflow/9-merge.md +142 -1
  38. package/templates/commands/implement.md +663 -663
  39. package/templates/commands/init.md +562 -0
  40. package/templates/commands/mcp-integration.md +330 -0
  41. package/templates/commands/notification.md +129 -129
  42. package/templates/commands/validate.md +233 -0
  43. package/templates/commands/workflow.md +193 -193
  44. package/templates/skills/ai-prompt/SKILL.md +778 -778
  45. package/templates/skills/application/SKILL.md +563 -563
  46. package/templates/skills/application/templates-backend.md +450 -450
  47. package/templates/skills/application/templates-frontend.md +531 -531
  48. package/templates/skills/application/templates-i18n.md +520 -520
  49. package/templates/skills/application/templates-seed.md +647 -647
  50. package/templates/skills/controller/SKILL.md +240 -240
  51. package/templates/skills/controller/postman-templates.md +614 -614
  52. package/templates/skills/controller/templates.md +1468 -1468
  53. package/templates/skills/documentation/SKILL.md +133 -133
  54. package/templates/skills/documentation/templates.md +476 -476
  55. package/templates/skills/feature-full/SKILL.md +838 -838
  56. package/templates/skills/notification/SKILL.md +555 -555
  57. package/templates/skills/ui-components/SKILL.md +870 -870
  58. package/templates/skills/workflow/SKILL.md +582 -582
package/dist/index.js CHANGED
@@ -966,7 +966,7 @@ var require_command = __commonJS({
966
966
  var EventEmitter = require("events").EventEmitter;
967
967
  var childProcess = require("child_process");
968
968
  var path3 = require("path");
969
- var fs4 = require("fs");
969
+ var fs5 = require("fs");
970
970
  var process11 = require("process");
971
971
  var { Argument: Argument2, humanReadableArgName } = require_argument();
972
972
  var { CommanderError: CommanderError2 } = require_error();
@@ -1899,10 +1899,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1899
1899
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1900
1900
  function findFile(baseDir, baseName) {
1901
1901
  const localBin = path3.resolve(baseDir, baseName);
1902
- if (fs4.existsSync(localBin)) return localBin;
1902
+ if (fs5.existsSync(localBin)) return localBin;
1903
1903
  if (sourceExt.includes(path3.extname(baseName))) return void 0;
1904
1904
  const foundExt = sourceExt.find(
1905
- (ext) => fs4.existsSync(`${localBin}${ext}`)
1905
+ (ext) => fs5.existsSync(`${localBin}${ext}`)
1906
1906
  );
1907
1907
  if (foundExt) return `${localBin}${foundExt}`;
1908
1908
  return void 0;
@@ -1914,7 +1914,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1914
1914
  if (this._scriptPath) {
1915
1915
  let resolvedScriptPath;
1916
1916
  try {
1917
- resolvedScriptPath = fs4.realpathSync(this._scriptPath);
1917
+ resolvedScriptPath = fs5.realpathSync(this._scriptPath);
1918
1918
  } catch (err) {
1919
1919
  resolvedScriptPath = this._scriptPath;
1920
1920
  }
@@ -4726,54 +4726,54 @@ var require_polyfills = __commonJS({
4726
4726
  }
4727
4727
  var chdir;
4728
4728
  module2.exports = patch;
4729
- function patch(fs4) {
4729
+ function patch(fs5) {
4730
4730
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
4731
- patchLchmod(fs4);
4732
- }
4733
- if (!fs4.lutimes) {
4734
- patchLutimes(fs4);
4735
- }
4736
- fs4.chown = chownFix(fs4.chown);
4737
- fs4.fchown = chownFix(fs4.fchown);
4738
- fs4.lchown = chownFix(fs4.lchown);
4739
- fs4.chmod = chmodFix(fs4.chmod);
4740
- fs4.fchmod = chmodFix(fs4.fchmod);
4741
- fs4.lchmod = chmodFix(fs4.lchmod);
4742
- fs4.chownSync = chownFixSync(fs4.chownSync);
4743
- fs4.fchownSync = chownFixSync(fs4.fchownSync);
4744
- fs4.lchownSync = chownFixSync(fs4.lchownSync);
4745
- fs4.chmodSync = chmodFixSync(fs4.chmodSync);
4746
- fs4.fchmodSync = chmodFixSync(fs4.fchmodSync);
4747
- fs4.lchmodSync = chmodFixSync(fs4.lchmodSync);
4748
- fs4.stat = statFix(fs4.stat);
4749
- fs4.fstat = statFix(fs4.fstat);
4750
- fs4.lstat = statFix(fs4.lstat);
4751
- fs4.statSync = statFixSync(fs4.statSync);
4752
- fs4.fstatSync = statFixSync(fs4.fstatSync);
4753
- fs4.lstatSync = statFixSync(fs4.lstatSync);
4754
- if (fs4.chmod && !fs4.lchmod) {
4755
- fs4.lchmod = function(path3, mode, cb) {
4731
+ patchLchmod(fs5);
4732
+ }
4733
+ if (!fs5.lutimes) {
4734
+ patchLutimes(fs5);
4735
+ }
4736
+ fs5.chown = chownFix(fs5.chown);
4737
+ fs5.fchown = chownFix(fs5.fchown);
4738
+ fs5.lchown = chownFix(fs5.lchown);
4739
+ fs5.chmod = chmodFix(fs5.chmod);
4740
+ fs5.fchmod = chmodFix(fs5.fchmod);
4741
+ fs5.lchmod = chmodFix(fs5.lchmod);
4742
+ fs5.chownSync = chownFixSync(fs5.chownSync);
4743
+ fs5.fchownSync = chownFixSync(fs5.fchownSync);
4744
+ fs5.lchownSync = chownFixSync(fs5.lchownSync);
4745
+ fs5.chmodSync = chmodFixSync(fs5.chmodSync);
4746
+ fs5.fchmodSync = chmodFixSync(fs5.fchmodSync);
4747
+ fs5.lchmodSync = chmodFixSync(fs5.lchmodSync);
4748
+ fs5.stat = statFix(fs5.stat);
4749
+ fs5.fstat = statFix(fs5.fstat);
4750
+ fs5.lstat = statFix(fs5.lstat);
4751
+ fs5.statSync = statFixSync(fs5.statSync);
4752
+ fs5.fstatSync = statFixSync(fs5.fstatSync);
4753
+ fs5.lstatSync = statFixSync(fs5.lstatSync);
4754
+ if (fs5.chmod && !fs5.lchmod) {
4755
+ fs5.lchmod = function(path3, mode, cb) {
4756
4756
  if (cb) process.nextTick(cb);
4757
4757
  };
4758
- fs4.lchmodSync = function() {
4758
+ fs5.lchmodSync = function() {
4759
4759
  };
4760
4760
  }
4761
- if (fs4.chown && !fs4.lchown) {
4762
- fs4.lchown = function(path3, uid, gid, cb) {
4761
+ if (fs5.chown && !fs5.lchown) {
4762
+ fs5.lchown = function(path3, uid, gid, cb) {
4763
4763
  if (cb) process.nextTick(cb);
4764
4764
  };
4765
- fs4.lchownSync = function() {
4765
+ fs5.lchownSync = function() {
4766
4766
  };
4767
4767
  }
4768
4768
  if (platform === "win32") {
4769
- fs4.rename = typeof fs4.rename !== "function" ? fs4.rename : (function(fs$rename) {
4769
+ fs5.rename = typeof fs5.rename !== "function" ? fs5.rename : (function(fs$rename) {
4770
4770
  function rename(from3, to, cb) {
4771
4771
  var start = Date.now();
4772
4772
  var backoff = 0;
4773
4773
  fs$rename(from3, to, function CB(er) {
4774
4774
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
4775
4775
  setTimeout(function() {
4776
- fs4.stat(to, function(stater, st) {
4776
+ fs5.stat(to, function(stater, st) {
4777
4777
  if (stater && stater.code === "ENOENT")
4778
4778
  fs$rename(from3, to, CB);
4779
4779
  else
@@ -4789,9 +4789,9 @@ var require_polyfills = __commonJS({
4789
4789
  }
4790
4790
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
4791
4791
  return rename;
4792
- })(fs4.rename);
4792
+ })(fs5.rename);
4793
4793
  }
4794
- fs4.read = typeof fs4.read !== "function" ? fs4.read : (function(fs$read) {
4794
+ fs5.read = typeof fs5.read !== "function" ? fs5.read : (function(fs$read) {
4795
4795
  function read(fd, buffer, offset, length, position, callback_) {
4796
4796
  var callback;
4797
4797
  if (callback_ && typeof callback_ === "function") {
@@ -4799,22 +4799,22 @@ var require_polyfills = __commonJS({
4799
4799
  callback = function(er, _2, __) {
4800
4800
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
4801
4801
  eagCounter++;
4802
- return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
4802
+ return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
4803
4803
  }
4804
4804
  callback_.apply(this, arguments);
4805
4805
  };
4806
4806
  }
4807
- return fs$read.call(fs4, fd, buffer, offset, length, position, callback);
4807
+ return fs$read.call(fs5, fd, buffer, offset, length, position, callback);
4808
4808
  }
4809
4809
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
4810
4810
  return read;
4811
- })(fs4.read);
4812
- fs4.readSync = typeof fs4.readSync !== "function" ? fs4.readSync : /* @__PURE__ */ (function(fs$readSync) {
4811
+ })(fs5.read);
4812
+ fs5.readSync = typeof fs5.readSync !== "function" ? fs5.readSync : /* @__PURE__ */ (function(fs$readSync) {
4813
4813
  return function(fd, buffer, offset, length, position) {
4814
4814
  var eagCounter = 0;
4815
4815
  while (true) {
4816
4816
  try {
4817
- return fs$readSync.call(fs4, fd, buffer, offset, length, position);
4817
+ return fs$readSync.call(fs5, fd, buffer, offset, length, position);
4818
4818
  } catch (er) {
4819
4819
  if (er.code === "EAGAIN" && eagCounter < 10) {
4820
4820
  eagCounter++;
@@ -4824,10 +4824,10 @@ var require_polyfills = __commonJS({
4824
4824
  }
4825
4825
  }
4826
4826
  };
4827
- })(fs4.readSync);
4828
- function patchLchmod(fs5) {
4829
- fs5.lchmod = function(path3, mode, callback) {
4830
- fs5.open(
4827
+ })(fs5.readSync);
4828
+ function patchLchmod(fs6) {
4829
+ fs6.lchmod = function(path3, mode, callback) {
4830
+ fs6.open(
4831
4831
  path3,
4832
4832
  constants.O_WRONLY | constants.O_SYMLINK,
4833
4833
  mode,
@@ -4836,80 +4836,80 @@ var require_polyfills = __commonJS({
4836
4836
  if (callback) callback(err);
4837
4837
  return;
4838
4838
  }
4839
- fs5.fchmod(fd, mode, function(err2) {
4840
- fs5.close(fd, function(err22) {
4839
+ fs6.fchmod(fd, mode, function(err2) {
4840
+ fs6.close(fd, function(err22) {
4841
4841
  if (callback) callback(err2 || err22);
4842
4842
  });
4843
4843
  });
4844
4844
  }
4845
4845
  );
4846
4846
  };
4847
- fs5.lchmodSync = function(path3, mode) {
4848
- var fd = fs5.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
4847
+ fs6.lchmodSync = function(path3, mode) {
4848
+ var fd = fs6.openSync(path3, constants.O_WRONLY | constants.O_SYMLINK, mode);
4849
4849
  var threw = true;
4850
4850
  var ret;
4851
4851
  try {
4852
- ret = fs5.fchmodSync(fd, mode);
4852
+ ret = fs6.fchmodSync(fd, mode);
4853
4853
  threw = false;
4854
4854
  } finally {
4855
4855
  if (threw) {
4856
4856
  try {
4857
- fs5.closeSync(fd);
4857
+ fs6.closeSync(fd);
4858
4858
  } catch (er) {
4859
4859
  }
4860
4860
  } else {
4861
- fs5.closeSync(fd);
4861
+ fs6.closeSync(fd);
4862
4862
  }
4863
4863
  }
4864
4864
  return ret;
4865
4865
  };
4866
4866
  }
4867
- function patchLutimes(fs5) {
4868
- if (constants.hasOwnProperty("O_SYMLINK") && fs5.futimes) {
4869
- fs5.lutimes = function(path3, at, mt, cb) {
4870
- fs5.open(path3, constants.O_SYMLINK, function(er, fd) {
4867
+ function patchLutimes(fs6) {
4868
+ if (constants.hasOwnProperty("O_SYMLINK") && fs6.futimes) {
4869
+ fs6.lutimes = function(path3, at, mt, cb) {
4870
+ fs6.open(path3, constants.O_SYMLINK, function(er, fd) {
4871
4871
  if (er) {
4872
4872
  if (cb) cb(er);
4873
4873
  return;
4874
4874
  }
4875
- fs5.futimes(fd, at, mt, function(er2) {
4876
- fs5.close(fd, function(er22) {
4875
+ fs6.futimes(fd, at, mt, function(er2) {
4876
+ fs6.close(fd, function(er22) {
4877
4877
  if (cb) cb(er2 || er22);
4878
4878
  });
4879
4879
  });
4880
4880
  });
4881
4881
  };
4882
- fs5.lutimesSync = function(path3, at, mt) {
4883
- var fd = fs5.openSync(path3, constants.O_SYMLINK);
4882
+ fs6.lutimesSync = function(path3, at, mt) {
4883
+ var fd = fs6.openSync(path3, constants.O_SYMLINK);
4884
4884
  var ret;
4885
4885
  var threw = true;
4886
4886
  try {
4887
- ret = fs5.futimesSync(fd, at, mt);
4887
+ ret = fs6.futimesSync(fd, at, mt);
4888
4888
  threw = false;
4889
4889
  } finally {
4890
4890
  if (threw) {
4891
4891
  try {
4892
- fs5.closeSync(fd);
4892
+ fs6.closeSync(fd);
4893
4893
  } catch (er) {
4894
4894
  }
4895
4895
  } else {
4896
- fs5.closeSync(fd);
4896
+ fs6.closeSync(fd);
4897
4897
  }
4898
4898
  }
4899
4899
  return ret;
4900
4900
  };
4901
- } else if (fs5.futimes) {
4902
- fs5.lutimes = function(_a, _b, _c, cb) {
4901
+ } else if (fs6.futimes) {
4902
+ fs6.lutimes = function(_a, _b, _c, cb) {
4903
4903
  if (cb) process.nextTick(cb);
4904
4904
  };
4905
- fs5.lutimesSync = function() {
4905
+ fs6.lutimesSync = function() {
4906
4906
  };
4907
4907
  }
4908
4908
  }
4909
4909
  function chmodFix(orig) {
4910
4910
  if (!orig) return orig;
4911
4911
  return function(target, mode, cb) {
4912
- return orig.call(fs4, target, mode, function(er) {
4912
+ return orig.call(fs5, target, mode, function(er) {
4913
4913
  if (chownErOk(er)) er = null;
4914
4914
  if (cb) cb.apply(this, arguments);
4915
4915
  });
@@ -4919,7 +4919,7 @@ var require_polyfills = __commonJS({
4919
4919
  if (!orig) return orig;
4920
4920
  return function(target, mode) {
4921
4921
  try {
4922
- return orig.call(fs4, target, mode);
4922
+ return orig.call(fs5, target, mode);
4923
4923
  } catch (er) {
4924
4924
  if (!chownErOk(er)) throw er;
4925
4925
  }
@@ -4928,7 +4928,7 @@ var require_polyfills = __commonJS({
4928
4928
  function chownFix(orig) {
4929
4929
  if (!orig) return orig;
4930
4930
  return function(target, uid, gid, cb) {
4931
- return orig.call(fs4, target, uid, gid, function(er) {
4931
+ return orig.call(fs5, target, uid, gid, function(er) {
4932
4932
  if (chownErOk(er)) er = null;
4933
4933
  if (cb) cb.apply(this, arguments);
4934
4934
  });
@@ -4938,7 +4938,7 @@ var require_polyfills = __commonJS({
4938
4938
  if (!orig) return orig;
4939
4939
  return function(target, uid, gid) {
4940
4940
  try {
4941
- return orig.call(fs4, target, uid, gid);
4941
+ return orig.call(fs5, target, uid, gid);
4942
4942
  } catch (er) {
4943
4943
  if (!chownErOk(er)) throw er;
4944
4944
  }
@@ -4958,13 +4958,13 @@ var require_polyfills = __commonJS({
4958
4958
  }
4959
4959
  if (cb) cb.apply(this, arguments);
4960
4960
  }
4961
- return options ? orig.call(fs4, target, options, callback) : orig.call(fs4, target, callback);
4961
+ return options ? orig.call(fs5, target, options, callback) : orig.call(fs5, target, callback);
4962
4962
  };
4963
4963
  }
4964
4964
  function statFixSync(orig) {
4965
4965
  if (!orig) return orig;
4966
4966
  return function(target, options) {
4967
- var stats = options ? orig.call(fs4, target, options) : orig.call(fs4, target);
4967
+ var stats = options ? orig.call(fs5, target, options) : orig.call(fs5, target);
4968
4968
  if (stats) {
4969
4969
  if (stats.uid < 0) stats.uid += 4294967296;
4970
4970
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -4994,7 +4994,7 @@ var require_legacy_streams = __commonJS({
4994
4994
  "use strict";
4995
4995
  var Stream = require("stream").Stream;
4996
4996
  module2.exports = legacy;
4997
- function legacy(fs4) {
4997
+ function legacy(fs5) {
4998
4998
  return {
4999
4999
  ReadStream,
5000
5000
  WriteStream
@@ -5037,7 +5037,7 @@ var require_legacy_streams = __commonJS({
5037
5037
  });
5038
5038
  return;
5039
5039
  }
5040
- fs4.open(this.path, this.flags, this.mode, function(err, fd) {
5040
+ fs5.open(this.path, this.flags, this.mode, function(err, fd) {
5041
5041
  if (err) {
5042
5042
  self2.emit("error", err);
5043
5043
  self2.readable = false;
@@ -5076,7 +5076,7 @@ var require_legacy_streams = __commonJS({
5076
5076
  this.busy = false;
5077
5077
  this._queue = [];
5078
5078
  if (this.fd === null) {
5079
- this._open = fs4.open;
5079
+ this._open = fs5.open;
5080
5080
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
5081
5081
  this.flush();
5082
5082
  }
@@ -5112,7 +5112,7 @@ var require_clone = __commonJS({
5112
5112
  var require_graceful_fs = __commonJS({
5113
5113
  "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
5114
5114
  "use strict";
5115
- var fs4 = require("fs");
5115
+ var fs5 = require("fs");
5116
5116
  var polyfills = require_polyfills();
5117
5117
  var legacy = require_legacy_streams();
5118
5118
  var clone = require_clone();
@@ -5144,12 +5144,12 @@ var require_graceful_fs = __commonJS({
5144
5144
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
5145
5145
  console.error(m);
5146
5146
  };
5147
- if (!fs4[gracefulQueue]) {
5147
+ if (!fs5[gracefulQueue]) {
5148
5148
  queue = global[gracefulQueue] || [];
5149
- publishQueue(fs4, queue);
5150
- fs4.close = (function(fs$close) {
5149
+ publishQueue(fs5, queue);
5150
+ fs5.close = (function(fs$close) {
5151
5151
  function close(fd, cb) {
5152
- return fs$close.call(fs4, fd, function(err) {
5152
+ return fs$close.call(fs5, fd, function(err) {
5153
5153
  if (!err) {
5154
5154
  resetQueue();
5155
5155
  }
@@ -5161,40 +5161,40 @@ var require_graceful_fs = __commonJS({
5161
5161
  value: fs$close
5162
5162
  });
5163
5163
  return close;
5164
- })(fs4.close);
5165
- fs4.closeSync = (function(fs$closeSync) {
5164
+ })(fs5.close);
5165
+ fs5.closeSync = (function(fs$closeSync) {
5166
5166
  function closeSync(fd) {
5167
- fs$closeSync.apply(fs4, arguments);
5167
+ fs$closeSync.apply(fs5, arguments);
5168
5168
  resetQueue();
5169
5169
  }
5170
5170
  Object.defineProperty(closeSync, previousSymbol, {
5171
5171
  value: fs$closeSync
5172
5172
  });
5173
5173
  return closeSync;
5174
- })(fs4.closeSync);
5174
+ })(fs5.closeSync);
5175
5175
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
5176
5176
  process.on("exit", function() {
5177
- debug(fs4[gracefulQueue]);
5178
- require("assert").equal(fs4[gracefulQueue].length, 0);
5177
+ debug(fs5[gracefulQueue]);
5178
+ require("assert").equal(fs5[gracefulQueue].length, 0);
5179
5179
  });
5180
5180
  }
5181
5181
  }
5182
5182
  var queue;
5183
5183
  if (!global[gracefulQueue]) {
5184
- publishQueue(global, fs4[gracefulQueue]);
5185
- }
5186
- module2.exports = patch(clone(fs4));
5187
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs4.__patched) {
5188
- module2.exports = patch(fs4);
5189
- fs4.__patched = true;
5190
- }
5191
- function patch(fs5) {
5192
- polyfills(fs5);
5193
- fs5.gracefulify = patch;
5194
- fs5.createReadStream = createReadStream;
5195
- fs5.createWriteStream = createWriteStream;
5196
- var fs$readFile = fs5.readFile;
5197
- fs5.readFile = readFile2;
5184
+ publishQueue(global, fs5[gracefulQueue]);
5185
+ }
5186
+ module2.exports = patch(clone(fs5));
5187
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs5.__patched) {
5188
+ module2.exports = patch(fs5);
5189
+ fs5.__patched = true;
5190
+ }
5191
+ function patch(fs6) {
5192
+ polyfills(fs6);
5193
+ fs6.gracefulify = patch;
5194
+ fs6.createReadStream = createReadStream;
5195
+ fs6.createWriteStream = createWriteStream;
5196
+ var fs$readFile = fs6.readFile;
5197
+ fs6.readFile = readFile2;
5198
5198
  function readFile2(path3, options, cb) {
5199
5199
  if (typeof options === "function")
5200
5200
  cb = options, options = null;
@@ -5210,8 +5210,8 @@ var require_graceful_fs = __commonJS({
5210
5210
  });
5211
5211
  }
5212
5212
  }
5213
- var fs$writeFile = fs5.writeFile;
5214
- fs5.writeFile = writeFile2;
5213
+ var fs$writeFile = fs6.writeFile;
5214
+ fs6.writeFile = writeFile2;
5215
5215
  function writeFile2(path3, data, options, cb) {
5216
5216
  if (typeof options === "function")
5217
5217
  cb = options, options = null;
@@ -5227,9 +5227,9 @@ var require_graceful_fs = __commonJS({
5227
5227
  });
5228
5228
  }
5229
5229
  }
5230
- var fs$appendFile = fs5.appendFile;
5230
+ var fs$appendFile = fs6.appendFile;
5231
5231
  if (fs$appendFile)
5232
- fs5.appendFile = appendFile;
5232
+ fs6.appendFile = appendFile;
5233
5233
  function appendFile(path3, data, options, cb) {
5234
5234
  if (typeof options === "function")
5235
5235
  cb = options, options = null;
@@ -5245,9 +5245,9 @@ var require_graceful_fs = __commonJS({
5245
5245
  });
5246
5246
  }
5247
5247
  }
5248
- var fs$copyFile = fs5.copyFile;
5248
+ var fs$copyFile = fs6.copyFile;
5249
5249
  if (fs$copyFile)
5250
- fs5.copyFile = copyFile;
5250
+ fs6.copyFile = copyFile;
5251
5251
  function copyFile(src, dest, flags, cb) {
5252
5252
  if (typeof flags === "function") {
5253
5253
  cb = flags;
@@ -5265,8 +5265,8 @@ var require_graceful_fs = __commonJS({
5265
5265
  });
5266
5266
  }
5267
5267
  }
5268
- var fs$readdir = fs5.readdir;
5269
- fs5.readdir = readdir;
5268
+ var fs$readdir = fs6.readdir;
5269
+ fs6.readdir = readdir;
5270
5270
  var noReaddirOptionVersions = /^v[0-5]\./;
5271
5271
  function readdir(path3, options, cb) {
5272
5272
  if (typeof options === "function")
@@ -5307,21 +5307,21 @@ var require_graceful_fs = __commonJS({
5307
5307
  }
5308
5308
  }
5309
5309
  if (process.version.substr(0, 4) === "v0.8") {
5310
- var legStreams = legacy(fs5);
5310
+ var legStreams = legacy(fs6);
5311
5311
  ReadStream = legStreams.ReadStream;
5312
5312
  WriteStream = legStreams.WriteStream;
5313
5313
  }
5314
- var fs$ReadStream = fs5.ReadStream;
5314
+ var fs$ReadStream = fs6.ReadStream;
5315
5315
  if (fs$ReadStream) {
5316
5316
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
5317
5317
  ReadStream.prototype.open = ReadStream$open;
5318
5318
  }
5319
- var fs$WriteStream = fs5.WriteStream;
5319
+ var fs$WriteStream = fs6.WriteStream;
5320
5320
  if (fs$WriteStream) {
5321
5321
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
5322
5322
  WriteStream.prototype.open = WriteStream$open;
5323
5323
  }
5324
- Object.defineProperty(fs5, "ReadStream", {
5324
+ Object.defineProperty(fs6, "ReadStream", {
5325
5325
  get: function() {
5326
5326
  return ReadStream;
5327
5327
  },
@@ -5331,7 +5331,7 @@ var require_graceful_fs = __commonJS({
5331
5331
  enumerable: true,
5332
5332
  configurable: true
5333
5333
  });
5334
- Object.defineProperty(fs5, "WriteStream", {
5334
+ Object.defineProperty(fs6, "WriteStream", {
5335
5335
  get: function() {
5336
5336
  return WriteStream;
5337
5337
  },
@@ -5342,7 +5342,7 @@ var require_graceful_fs = __commonJS({
5342
5342
  configurable: true
5343
5343
  });
5344
5344
  var FileReadStream = ReadStream;
5345
- Object.defineProperty(fs5, "FileReadStream", {
5345
+ Object.defineProperty(fs6, "FileReadStream", {
5346
5346
  get: function() {
5347
5347
  return FileReadStream;
5348
5348
  },
@@ -5353,7 +5353,7 @@ var require_graceful_fs = __commonJS({
5353
5353
  configurable: true
5354
5354
  });
5355
5355
  var FileWriteStream = WriteStream;
5356
- Object.defineProperty(fs5, "FileWriteStream", {
5356
+ Object.defineProperty(fs6, "FileWriteStream", {
5357
5357
  get: function() {
5358
5358
  return FileWriteStream;
5359
5359
  },
@@ -5402,13 +5402,13 @@ var require_graceful_fs = __commonJS({
5402
5402
  });
5403
5403
  }
5404
5404
  function createReadStream(path3, options) {
5405
- return new fs5.ReadStream(path3, options);
5405
+ return new fs6.ReadStream(path3, options);
5406
5406
  }
5407
5407
  function createWriteStream(path3, options) {
5408
- return new fs5.WriteStream(path3, options);
5408
+ return new fs6.WriteStream(path3, options);
5409
5409
  }
5410
- var fs$open = fs5.open;
5411
- fs5.open = open;
5410
+ var fs$open = fs6.open;
5411
+ fs6.open = open;
5412
5412
  function open(path3, flags, mode, cb) {
5413
5413
  if (typeof mode === "function")
5414
5414
  cb = mode, mode = null;
@@ -5424,20 +5424,20 @@ var require_graceful_fs = __commonJS({
5424
5424
  });
5425
5425
  }
5426
5426
  }
5427
- return fs5;
5427
+ return fs6;
5428
5428
  }
5429
5429
  function enqueue(elem) {
5430
5430
  debug("ENQUEUE", elem[0].name, elem[1]);
5431
- fs4[gracefulQueue].push(elem);
5431
+ fs5[gracefulQueue].push(elem);
5432
5432
  retry();
5433
5433
  }
5434
5434
  var retryTimer;
5435
5435
  function resetQueue() {
5436
5436
  var now = Date.now();
5437
- for (var i = 0; i < fs4[gracefulQueue].length; ++i) {
5438
- if (fs4[gracefulQueue][i].length > 2) {
5439
- fs4[gracefulQueue][i][3] = now;
5440
- fs4[gracefulQueue][i][4] = now;
5437
+ for (var i = 0; i < fs5[gracefulQueue].length; ++i) {
5438
+ if (fs5[gracefulQueue][i].length > 2) {
5439
+ fs5[gracefulQueue][i][3] = now;
5440
+ fs5[gracefulQueue][i][4] = now;
5441
5441
  }
5442
5442
  }
5443
5443
  retry();
@@ -5445,9 +5445,9 @@ var require_graceful_fs = __commonJS({
5445
5445
  function retry() {
5446
5446
  clearTimeout(retryTimer);
5447
5447
  retryTimer = void 0;
5448
- if (fs4[gracefulQueue].length === 0)
5448
+ if (fs5[gracefulQueue].length === 0)
5449
5449
  return;
5450
- var elem = fs4[gracefulQueue].shift();
5450
+ var elem = fs5[gracefulQueue].shift();
5451
5451
  var fn = elem[0];
5452
5452
  var args = elem[1];
5453
5453
  var err = elem[2];
@@ -5469,7 +5469,7 @@ var require_graceful_fs = __commonJS({
5469
5469
  debug("RETRY", fn.name, args);
5470
5470
  fn.apply(null, args.concat([startTime]));
5471
5471
  } else {
5472
- fs4[gracefulQueue].push(elem);
5472
+ fs5[gracefulQueue].push(elem);
5473
5473
  }
5474
5474
  }
5475
5475
  if (retryTimer === void 0) {
@@ -5484,7 +5484,7 @@ var require_fs = __commonJS({
5484
5484
  "node_modules/fs-extra/lib/fs/index.js"(exports2) {
5485
5485
  "use strict";
5486
5486
  var u = require_universalify().fromCallback;
5487
- var fs4 = require_graceful_fs();
5487
+ var fs5 = require_graceful_fs();
5488
5488
  var api = [
5489
5489
  "access",
5490
5490
  "appendFile",
@@ -5525,26 +5525,26 @@ var require_fs = __commonJS({
5525
5525
  "utimes",
5526
5526
  "writeFile"
5527
5527
  ].filter((key) => {
5528
- return typeof fs4[key] === "function";
5528
+ return typeof fs5[key] === "function";
5529
5529
  });
5530
- Object.assign(exports2, fs4);
5530
+ Object.assign(exports2, fs5);
5531
5531
  api.forEach((method) => {
5532
- exports2[method] = u(fs4[method]);
5532
+ exports2[method] = u(fs5[method]);
5533
5533
  });
5534
5534
  exports2.exists = function(filename, callback) {
5535
5535
  if (typeof callback === "function") {
5536
- return fs4.exists(filename, callback);
5536
+ return fs5.exists(filename, callback);
5537
5537
  }
5538
5538
  return new Promise((resolve) => {
5539
- return fs4.exists(filename, resolve);
5539
+ return fs5.exists(filename, resolve);
5540
5540
  });
5541
5541
  };
5542
5542
  exports2.read = function(fd, buffer, offset, length, position, callback) {
5543
5543
  if (typeof callback === "function") {
5544
- return fs4.read(fd, buffer, offset, length, position, callback);
5544
+ return fs5.read(fd, buffer, offset, length, position, callback);
5545
5545
  }
5546
5546
  return new Promise((resolve, reject) => {
5547
- fs4.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
5547
+ fs5.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
5548
5548
  if (err) return reject(err);
5549
5549
  resolve({ bytesRead, buffer: buffer2 });
5550
5550
  });
@@ -5552,10 +5552,10 @@ var require_fs = __commonJS({
5552
5552
  };
5553
5553
  exports2.write = function(fd, buffer, ...args) {
5554
5554
  if (typeof args[args.length - 1] === "function") {
5555
- return fs4.write(fd, buffer, ...args);
5555
+ return fs5.write(fd, buffer, ...args);
5556
5556
  }
5557
5557
  return new Promise((resolve, reject) => {
5558
- fs4.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
5558
+ fs5.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
5559
5559
  if (err) return reject(err);
5560
5560
  resolve({ bytesWritten, buffer: buffer2 });
5561
5561
  });
@@ -5563,10 +5563,10 @@ var require_fs = __commonJS({
5563
5563
  };
5564
5564
  exports2.readv = function(fd, buffers, ...args) {
5565
5565
  if (typeof args[args.length - 1] === "function") {
5566
- return fs4.readv(fd, buffers, ...args);
5566
+ return fs5.readv(fd, buffers, ...args);
5567
5567
  }
5568
5568
  return new Promise((resolve, reject) => {
5569
- fs4.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
5569
+ fs5.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
5570
5570
  if (err) return reject(err);
5571
5571
  resolve({ bytesRead, buffers: buffers2 });
5572
5572
  });
@@ -5574,17 +5574,17 @@ var require_fs = __commonJS({
5574
5574
  };
5575
5575
  exports2.writev = function(fd, buffers, ...args) {
5576
5576
  if (typeof args[args.length - 1] === "function") {
5577
- return fs4.writev(fd, buffers, ...args);
5577
+ return fs5.writev(fd, buffers, ...args);
5578
5578
  }
5579
5579
  return new Promise((resolve, reject) => {
5580
- fs4.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
5580
+ fs5.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
5581
5581
  if (err) return reject(err);
5582
5582
  resolve({ bytesWritten, buffers: buffers2 });
5583
5583
  });
5584
5584
  });
5585
5585
  };
5586
- if (typeof fs4.realpath.native === "function") {
5587
- exports2.realpath.native = u(fs4.realpath.native);
5586
+ if (typeof fs5.realpath.native === "function") {
5587
+ exports2.realpath.native = u(fs5.realpath.native);
5588
5588
  } else {
5589
5589
  process.emitWarning(
5590
5590
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -5617,7 +5617,7 @@ var require_utils = __commonJS({
5617
5617
  var require_make_dir = __commonJS({
5618
5618
  "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
5619
5619
  "use strict";
5620
- var fs4 = require_fs();
5620
+ var fs5 = require_fs();
5621
5621
  var { checkPath } = require_utils();
5622
5622
  var getMode = (options) => {
5623
5623
  const defaults = { mode: 511 };
@@ -5626,14 +5626,14 @@ var require_make_dir = __commonJS({
5626
5626
  };
5627
5627
  module2.exports.makeDir = async (dir, options) => {
5628
5628
  checkPath(dir);
5629
- return fs4.mkdir(dir, {
5629
+ return fs5.mkdir(dir, {
5630
5630
  mode: getMode(options),
5631
5631
  recursive: true
5632
5632
  });
5633
5633
  };
5634
5634
  module2.exports.makeDirSync = (dir, options) => {
5635
5635
  checkPath(dir);
5636
- return fs4.mkdirSync(dir, {
5636
+ return fs5.mkdirSync(dir, {
5637
5637
  mode: getMode(options),
5638
5638
  recursive: true
5639
5639
  });
@@ -5665,13 +5665,13 @@ var require_path_exists = __commonJS({
5665
5665
  "node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
5666
5666
  "use strict";
5667
5667
  var u = require_universalify().fromPromise;
5668
- var fs4 = require_fs();
5668
+ var fs5 = require_fs();
5669
5669
  function pathExists2(path3) {
5670
- return fs4.access(path3).then(() => true).catch(() => false);
5670
+ return fs5.access(path3).then(() => true).catch(() => false);
5671
5671
  }
5672
5672
  module2.exports = {
5673
5673
  pathExists: u(pathExists2),
5674
- pathExistsSync: fs4.existsSync
5674
+ pathExistsSync: fs5.existsSync
5675
5675
  };
5676
5676
  }
5677
5677
  });
@@ -5680,16 +5680,16 @@ var require_path_exists = __commonJS({
5680
5680
  var require_utimes = __commonJS({
5681
5681
  "node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
5682
5682
  "use strict";
5683
- var fs4 = require_fs();
5683
+ var fs5 = require_fs();
5684
5684
  var u = require_universalify().fromPromise;
5685
5685
  async function utimesMillis(path3, atime, mtime) {
5686
- const fd = await fs4.open(path3, "r+");
5686
+ const fd = await fs5.open(path3, "r+");
5687
5687
  let closeErr = null;
5688
5688
  try {
5689
- await fs4.futimes(fd, atime, mtime);
5689
+ await fs5.futimes(fd, atime, mtime);
5690
5690
  } finally {
5691
5691
  try {
5692
- await fs4.close(fd);
5692
+ await fs5.close(fd);
5693
5693
  } catch (e) {
5694
5694
  closeErr = e;
5695
5695
  }
@@ -5699,9 +5699,9 @@ var require_utimes = __commonJS({
5699
5699
  }
5700
5700
  }
5701
5701
  function utimesMillisSync(path3, atime, mtime) {
5702
- const fd = fs4.openSync(path3, "r+");
5703
- fs4.futimesSync(fd, atime, mtime);
5704
- return fs4.closeSync(fd);
5702
+ const fd = fs5.openSync(path3, "r+");
5703
+ fs5.futimesSync(fd, atime, mtime);
5704
+ return fs5.closeSync(fd);
5705
5705
  }
5706
5706
  module2.exports = {
5707
5707
  utimesMillis: u(utimesMillis),
@@ -5714,11 +5714,11 @@ var require_utimes = __commonJS({
5714
5714
  var require_stat = __commonJS({
5715
5715
  "node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
5716
5716
  "use strict";
5717
- var fs4 = require_fs();
5717
+ var fs5 = require_fs();
5718
5718
  var path3 = require("path");
5719
5719
  var u = require_universalify().fromPromise;
5720
5720
  function getStats(src, dest, opts) {
5721
- const statFunc = opts.dereference ? (file) => fs4.stat(file, { bigint: true }) : (file) => fs4.lstat(file, { bigint: true });
5721
+ const statFunc = opts.dereference ? (file) => fs5.stat(file, { bigint: true }) : (file) => fs5.lstat(file, { bigint: true });
5722
5722
  return Promise.all([
5723
5723
  statFunc(src),
5724
5724
  statFunc(dest).catch((err) => {
@@ -5729,7 +5729,7 @@ var require_stat = __commonJS({
5729
5729
  }
5730
5730
  function getStatsSync(src, dest, opts) {
5731
5731
  let destStat;
5732
- const statFunc = opts.dereference ? (file) => fs4.statSync(file, { bigint: true }) : (file) => fs4.lstatSync(file, { bigint: true });
5732
+ const statFunc = opts.dereference ? (file) => fs5.statSync(file, { bigint: true }) : (file) => fs5.lstatSync(file, { bigint: true });
5733
5733
  const srcStat = statFunc(src);
5734
5734
  try {
5735
5735
  destStat = statFunc(dest);
@@ -5791,7 +5791,7 @@ var require_stat = __commonJS({
5791
5791
  if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
5792
5792
  let destStat;
5793
5793
  try {
5794
- destStat = await fs4.stat(destParent, { bigint: true });
5794
+ destStat = await fs5.stat(destParent, { bigint: true });
5795
5795
  } catch (err) {
5796
5796
  if (err.code === "ENOENT") return;
5797
5797
  throw err;
@@ -5807,7 +5807,7 @@ var require_stat = __commonJS({
5807
5807
  if (destParent === srcParent || destParent === path3.parse(destParent).root) return;
5808
5808
  let destStat;
5809
5809
  try {
5810
- destStat = fs4.statSync(destParent, { bigint: true });
5810
+ destStat = fs5.statSync(destParent, { bigint: true });
5811
5811
  } catch (err) {
5812
5812
  if (err.code === "ENOENT") return;
5813
5813
  throw err;
@@ -5874,7 +5874,7 @@ var require_async = __commonJS({
5874
5874
  var require_copy = __commonJS({
5875
5875
  "node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
5876
5876
  "use strict";
5877
- var fs4 = require_fs();
5877
+ var fs5 = require_fs();
5878
5878
  var path3 = require("path");
5879
5879
  var { mkdirs } = require_mkdirs();
5880
5880
  var { pathExists: pathExists2 } = require_path_exists();
@@ -5910,7 +5910,7 @@ var require_copy = __commonJS({
5910
5910
  return opts.filter(src, dest);
5911
5911
  }
5912
5912
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
5913
- const statFn = opts.dereference ? fs4.stat : fs4.lstat;
5913
+ const statFn = opts.dereference ? fs5.stat : fs5.lstat;
5914
5914
  const srcStat = await statFn(src);
5915
5915
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
5916
5916
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -5922,7 +5922,7 @@ var require_copy = __commonJS({
5922
5922
  async function onFile(srcStat, destStat, src, dest, opts) {
5923
5923
  if (!destStat) return copyFile(srcStat, src, dest, opts);
5924
5924
  if (opts.overwrite) {
5925
- await fs4.unlink(dest);
5925
+ await fs5.unlink(dest);
5926
5926
  return copyFile(srcStat, src, dest, opts);
5927
5927
  }
5928
5928
  if (opts.errorOnExist) {
@@ -5930,27 +5930,27 @@ var require_copy = __commonJS({
5930
5930
  }
5931
5931
  }
5932
5932
  async function copyFile(srcStat, src, dest, opts) {
5933
- await fs4.copyFile(src, dest);
5933
+ await fs5.copyFile(src, dest);
5934
5934
  if (opts.preserveTimestamps) {
5935
5935
  if (fileIsNotWritable(srcStat.mode)) {
5936
5936
  await makeFileWritable(dest, srcStat.mode);
5937
5937
  }
5938
- const updatedSrcStat = await fs4.stat(src);
5938
+ const updatedSrcStat = await fs5.stat(src);
5939
5939
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
5940
5940
  }
5941
- return fs4.chmod(dest, srcStat.mode);
5941
+ return fs5.chmod(dest, srcStat.mode);
5942
5942
  }
5943
5943
  function fileIsNotWritable(srcMode) {
5944
5944
  return (srcMode & 128) === 0;
5945
5945
  }
5946
5946
  function makeFileWritable(dest, srcMode) {
5947
- return fs4.chmod(dest, srcMode | 128);
5947
+ return fs5.chmod(dest, srcMode | 128);
5948
5948
  }
5949
5949
  async function onDir(srcStat, destStat, src, dest, opts) {
5950
5950
  if (!destStat) {
5951
- await fs4.mkdir(dest);
5951
+ await fs5.mkdir(dest);
5952
5952
  }
5953
- await asyncIteratorConcurrentProcess(await fs4.opendir(src), async (item) => {
5953
+ await asyncIteratorConcurrentProcess(await fs5.opendir(src), async (item) => {
5954
5954
  const srcItem = path3.join(src, item.name);
5955
5955
  const destItem = path3.join(dest, item.name);
5956
5956
  const include = await runFilter(srcItem, destItem, opts);
@@ -5960,22 +5960,22 @@ var require_copy = __commonJS({
5960
5960
  }
5961
5961
  });
5962
5962
  if (!destStat) {
5963
- await fs4.chmod(dest, srcStat.mode);
5963
+ await fs5.chmod(dest, srcStat.mode);
5964
5964
  }
5965
5965
  }
5966
5966
  async function onLink(destStat, src, dest, opts) {
5967
- let resolvedSrc = await fs4.readlink(src);
5967
+ let resolvedSrc = await fs5.readlink(src);
5968
5968
  if (opts.dereference) {
5969
5969
  resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
5970
5970
  }
5971
5971
  if (!destStat) {
5972
- return fs4.symlink(resolvedSrc, dest);
5972
+ return fs5.symlink(resolvedSrc, dest);
5973
5973
  }
5974
5974
  let resolvedDest = null;
5975
5975
  try {
5976
- resolvedDest = await fs4.readlink(dest);
5976
+ resolvedDest = await fs5.readlink(dest);
5977
5977
  } catch (e) {
5978
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs4.symlink(resolvedSrc, dest);
5978
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs5.symlink(resolvedSrc, dest);
5979
5979
  throw e;
5980
5980
  }
5981
5981
  if (opts.dereference) {
@@ -5989,8 +5989,8 @@ var require_copy = __commonJS({
5989
5989
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
5990
5990
  }
5991
5991
  }
5992
- await fs4.unlink(dest);
5993
- return fs4.symlink(resolvedSrc, dest);
5992
+ await fs5.unlink(dest);
5993
+ return fs5.symlink(resolvedSrc, dest);
5994
5994
  }
5995
5995
  module2.exports = copy;
5996
5996
  }
@@ -6000,7 +6000,7 @@ var require_copy = __commonJS({
6000
6000
  var require_copy_sync = __commonJS({
6001
6001
  "node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
6002
6002
  "use strict";
6003
- var fs4 = require_graceful_fs();
6003
+ var fs5 = require_graceful_fs();
6004
6004
  var path3 = require("path");
6005
6005
  var mkdirsSync = require_mkdirs().mkdirsSync;
6006
6006
  var utimesMillisSync = require_utimes().utimesMillisSync;
@@ -6023,11 +6023,11 @@ var require_copy_sync = __commonJS({
6023
6023
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
6024
6024
  if (opts.filter && !opts.filter(src, dest)) return;
6025
6025
  const destParent = path3.dirname(dest);
6026
- if (!fs4.existsSync(destParent)) mkdirsSync(destParent);
6026
+ if (!fs5.existsSync(destParent)) mkdirsSync(destParent);
6027
6027
  return getStats(destStat, src, dest, opts);
6028
6028
  }
6029
6029
  function getStats(destStat, src, dest, opts) {
6030
- const statSync = opts.dereference ? fs4.statSync : fs4.lstatSync;
6030
+ const statSync = opts.dereference ? fs5.statSync : fs5.lstatSync;
6031
6031
  const srcStat = statSync(src);
6032
6032
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
6033
6033
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -6042,14 +6042,14 @@ var require_copy_sync = __commonJS({
6042
6042
  }
6043
6043
  function mayCopyFile(srcStat, src, dest, opts) {
6044
6044
  if (opts.overwrite) {
6045
- fs4.unlinkSync(dest);
6045
+ fs5.unlinkSync(dest);
6046
6046
  return copyFile(srcStat, src, dest, opts);
6047
6047
  } else if (opts.errorOnExist) {
6048
6048
  throw new Error(`'${dest}' already exists`);
6049
6049
  }
6050
6050
  }
6051
6051
  function copyFile(srcStat, src, dest, opts) {
6052
- fs4.copyFileSync(src, dest);
6052
+ fs5.copyFileSync(src, dest);
6053
6053
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
6054
6054
  return setDestMode(dest, srcStat.mode);
6055
6055
  }
@@ -6064,10 +6064,10 @@ var require_copy_sync = __commonJS({
6064
6064
  return setDestMode(dest, srcMode | 128);
6065
6065
  }
6066
6066
  function setDestMode(dest, srcMode) {
6067
- return fs4.chmodSync(dest, srcMode);
6067
+ return fs5.chmodSync(dest, srcMode);
6068
6068
  }
6069
6069
  function setDestTimestamps(src, dest) {
6070
- const updatedSrcStat = fs4.statSync(src);
6070
+ const updatedSrcStat = fs5.statSync(src);
6071
6071
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
6072
6072
  }
6073
6073
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -6075,12 +6075,12 @@ var require_copy_sync = __commonJS({
6075
6075
  return copyDir(src, dest, opts);
6076
6076
  }
6077
6077
  function mkDirAndCopy(srcMode, src, dest, opts) {
6078
- fs4.mkdirSync(dest);
6078
+ fs5.mkdirSync(dest);
6079
6079
  copyDir(src, dest, opts);
6080
6080
  return setDestMode(dest, srcMode);
6081
6081
  }
6082
6082
  function copyDir(src, dest, opts) {
6083
- const dir = fs4.opendirSync(src);
6083
+ const dir = fs5.opendirSync(src);
6084
6084
  try {
6085
6085
  let dirent;
6086
6086
  while ((dirent = dir.readSync()) !== null) {
@@ -6098,18 +6098,18 @@ var require_copy_sync = __commonJS({
6098
6098
  return getStats(destStat, srcItem, destItem, opts);
6099
6099
  }
6100
6100
  function onLink(destStat, src, dest, opts) {
6101
- let resolvedSrc = fs4.readlinkSync(src);
6101
+ let resolvedSrc = fs5.readlinkSync(src);
6102
6102
  if (opts.dereference) {
6103
6103
  resolvedSrc = path3.resolve(process.cwd(), resolvedSrc);
6104
6104
  }
6105
6105
  if (!destStat) {
6106
- return fs4.symlinkSync(resolvedSrc, dest);
6106
+ return fs5.symlinkSync(resolvedSrc, dest);
6107
6107
  } else {
6108
6108
  let resolvedDest;
6109
6109
  try {
6110
- resolvedDest = fs4.readlinkSync(dest);
6110
+ resolvedDest = fs5.readlinkSync(dest);
6111
6111
  } catch (err) {
6112
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs4.symlinkSync(resolvedSrc, dest);
6112
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs5.symlinkSync(resolvedSrc, dest);
6113
6113
  throw err;
6114
6114
  }
6115
6115
  if (opts.dereference) {
@@ -6127,8 +6127,8 @@ var require_copy_sync = __commonJS({
6127
6127
  }
6128
6128
  }
6129
6129
  function copyLink(resolvedSrc, dest) {
6130
- fs4.unlinkSync(dest);
6131
- return fs4.symlinkSync(resolvedSrc, dest);
6130
+ fs5.unlinkSync(dest);
6131
+ return fs5.symlinkSync(resolvedSrc, dest);
6132
6132
  }
6133
6133
  module2.exports = copySync;
6134
6134
  }
@@ -6150,13 +6150,13 @@ var require_copy2 = __commonJS({
6150
6150
  var require_remove = __commonJS({
6151
6151
  "node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
6152
6152
  "use strict";
6153
- var fs4 = require_graceful_fs();
6153
+ var fs5 = require_graceful_fs();
6154
6154
  var u = require_universalify().fromCallback;
6155
6155
  function remove2(path3, callback) {
6156
- fs4.rm(path3, { recursive: true, force: true }, callback);
6156
+ fs5.rm(path3, { recursive: true, force: true }, callback);
6157
6157
  }
6158
6158
  function removeSync(path3) {
6159
- fs4.rmSync(path3, { recursive: true, force: true });
6159
+ fs5.rmSync(path3, { recursive: true, force: true });
6160
6160
  }
6161
6161
  module2.exports = {
6162
6162
  remove: u(remove2),
@@ -6170,14 +6170,14 @@ var require_empty = __commonJS({
6170
6170
  "node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
6171
6171
  "use strict";
6172
6172
  var u = require_universalify().fromPromise;
6173
- var fs4 = require_fs();
6173
+ var fs5 = require_fs();
6174
6174
  var path3 = require("path");
6175
6175
  var mkdir = require_mkdirs();
6176
6176
  var remove2 = require_remove();
6177
6177
  var emptyDir = u(async function emptyDir2(dir) {
6178
6178
  let items;
6179
6179
  try {
6180
- items = await fs4.readdir(dir);
6180
+ items = await fs5.readdir(dir);
6181
6181
  } catch {
6182
6182
  return mkdir.mkdirs(dir);
6183
6183
  }
@@ -6186,7 +6186,7 @@ var require_empty = __commonJS({
6186
6186
  function emptyDirSync(dir) {
6187
6187
  let items;
6188
6188
  try {
6189
- items = fs4.readdirSync(dir);
6189
+ items = fs5.readdirSync(dir);
6190
6190
  } catch {
6191
6191
  return mkdir.mkdirsSync(dir);
6192
6192
  }
@@ -6210,51 +6210,51 @@ var require_file = __commonJS({
6210
6210
  "use strict";
6211
6211
  var u = require_universalify().fromPromise;
6212
6212
  var path3 = require("path");
6213
- var fs4 = require_fs();
6213
+ var fs5 = require_fs();
6214
6214
  var mkdir = require_mkdirs();
6215
6215
  async function createFile(file) {
6216
6216
  let stats;
6217
6217
  try {
6218
- stats = await fs4.stat(file);
6218
+ stats = await fs5.stat(file);
6219
6219
  } catch {
6220
6220
  }
6221
6221
  if (stats && stats.isFile()) return;
6222
6222
  const dir = path3.dirname(file);
6223
6223
  let dirStats = null;
6224
6224
  try {
6225
- dirStats = await fs4.stat(dir);
6225
+ dirStats = await fs5.stat(dir);
6226
6226
  } catch (err) {
6227
6227
  if (err.code === "ENOENT") {
6228
6228
  await mkdir.mkdirs(dir);
6229
- await fs4.writeFile(file, "");
6229
+ await fs5.writeFile(file, "");
6230
6230
  return;
6231
6231
  } else {
6232
6232
  throw err;
6233
6233
  }
6234
6234
  }
6235
6235
  if (dirStats.isDirectory()) {
6236
- await fs4.writeFile(file, "");
6236
+ await fs5.writeFile(file, "");
6237
6237
  } else {
6238
- await fs4.readdir(dir);
6238
+ await fs5.readdir(dir);
6239
6239
  }
6240
6240
  }
6241
6241
  function createFileSync(file) {
6242
6242
  let stats;
6243
6243
  try {
6244
- stats = fs4.statSync(file);
6244
+ stats = fs5.statSync(file);
6245
6245
  } catch {
6246
6246
  }
6247
6247
  if (stats && stats.isFile()) return;
6248
6248
  const dir = path3.dirname(file);
6249
6249
  try {
6250
- if (!fs4.statSync(dir).isDirectory()) {
6251
- fs4.readdirSync(dir);
6250
+ if (!fs5.statSync(dir).isDirectory()) {
6251
+ fs5.readdirSync(dir);
6252
6252
  }
6253
6253
  } catch (err) {
6254
6254
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
6255
6255
  else throw err;
6256
6256
  }
6257
- fs4.writeFileSync(file, "");
6257
+ fs5.writeFileSync(file, "");
6258
6258
  }
6259
6259
  module2.exports = {
6260
6260
  createFile: u(createFile),
@@ -6269,19 +6269,19 @@ var require_link = __commonJS({
6269
6269
  "use strict";
6270
6270
  var u = require_universalify().fromPromise;
6271
6271
  var path3 = require("path");
6272
- var fs4 = require_fs();
6272
+ var fs5 = require_fs();
6273
6273
  var mkdir = require_mkdirs();
6274
6274
  var { pathExists: pathExists2 } = require_path_exists();
6275
6275
  var { areIdentical } = require_stat();
6276
6276
  async function createLink(srcpath, dstpath) {
6277
6277
  let dstStat;
6278
6278
  try {
6279
- dstStat = await fs4.lstat(dstpath);
6279
+ dstStat = await fs5.lstat(dstpath);
6280
6280
  } catch {
6281
6281
  }
6282
6282
  let srcStat;
6283
6283
  try {
6284
- srcStat = await fs4.lstat(srcpath);
6284
+ srcStat = await fs5.lstat(srcpath);
6285
6285
  } catch (err) {
6286
6286
  err.message = err.message.replace("lstat", "ensureLink");
6287
6287
  throw err;
@@ -6292,26 +6292,26 @@ var require_link = __commonJS({
6292
6292
  if (!dirExists) {
6293
6293
  await mkdir.mkdirs(dir);
6294
6294
  }
6295
- await fs4.link(srcpath, dstpath);
6295
+ await fs5.link(srcpath, dstpath);
6296
6296
  }
6297
6297
  function createLinkSync(srcpath, dstpath) {
6298
6298
  let dstStat;
6299
6299
  try {
6300
- dstStat = fs4.lstatSync(dstpath);
6300
+ dstStat = fs5.lstatSync(dstpath);
6301
6301
  } catch {
6302
6302
  }
6303
6303
  try {
6304
- const srcStat = fs4.lstatSync(srcpath);
6304
+ const srcStat = fs5.lstatSync(srcpath);
6305
6305
  if (dstStat && areIdentical(srcStat, dstStat)) return;
6306
6306
  } catch (err) {
6307
6307
  err.message = err.message.replace("lstat", "ensureLink");
6308
6308
  throw err;
6309
6309
  }
6310
6310
  const dir = path3.dirname(dstpath);
6311
- const dirExists = fs4.existsSync(dir);
6312
- if (dirExists) return fs4.linkSync(srcpath, dstpath);
6311
+ const dirExists = fs5.existsSync(dir);
6312
+ if (dirExists) return fs5.linkSync(srcpath, dstpath);
6313
6313
  mkdir.mkdirsSync(dir);
6314
- return fs4.linkSync(srcpath, dstpath);
6314
+ return fs5.linkSync(srcpath, dstpath);
6315
6315
  }
6316
6316
  module2.exports = {
6317
6317
  createLink: u(createLink),
@@ -6325,13 +6325,13 @@ var require_symlink_paths = __commonJS({
6325
6325
  "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
6326
6326
  "use strict";
6327
6327
  var path3 = require("path");
6328
- var fs4 = require_fs();
6328
+ var fs5 = require_fs();
6329
6329
  var { pathExists: pathExists2 } = require_path_exists();
6330
6330
  var u = require_universalify().fromPromise;
6331
6331
  async function symlinkPaths(srcpath, dstpath) {
6332
6332
  if (path3.isAbsolute(srcpath)) {
6333
6333
  try {
6334
- await fs4.lstat(srcpath);
6334
+ await fs5.lstat(srcpath);
6335
6335
  } catch (err) {
6336
6336
  err.message = err.message.replace("lstat", "ensureSymlink");
6337
6337
  throw err;
@@ -6351,7 +6351,7 @@ var require_symlink_paths = __commonJS({
6351
6351
  };
6352
6352
  }
6353
6353
  try {
6354
- await fs4.lstat(srcpath);
6354
+ await fs5.lstat(srcpath);
6355
6355
  } catch (err) {
6356
6356
  err.message = err.message.replace("lstat", "ensureSymlink");
6357
6357
  throw err;
@@ -6363,7 +6363,7 @@ var require_symlink_paths = __commonJS({
6363
6363
  }
6364
6364
  function symlinkPathsSync(srcpath, dstpath) {
6365
6365
  if (path3.isAbsolute(srcpath)) {
6366
- const exists2 = fs4.existsSync(srcpath);
6366
+ const exists2 = fs5.existsSync(srcpath);
6367
6367
  if (!exists2) throw new Error("absolute srcpath does not exist");
6368
6368
  return {
6369
6369
  toCwd: srcpath,
@@ -6372,14 +6372,14 @@ var require_symlink_paths = __commonJS({
6372
6372
  }
6373
6373
  const dstdir = path3.dirname(dstpath);
6374
6374
  const relativeToDst = path3.join(dstdir, srcpath);
6375
- const exists = fs4.existsSync(relativeToDst);
6375
+ const exists = fs5.existsSync(relativeToDst);
6376
6376
  if (exists) {
6377
6377
  return {
6378
6378
  toCwd: relativeToDst,
6379
6379
  toDst: srcpath
6380
6380
  };
6381
6381
  }
6382
- const srcExists = fs4.existsSync(srcpath);
6382
+ const srcExists = fs5.existsSync(srcpath);
6383
6383
  if (!srcExists) throw new Error("relative srcpath does not exist");
6384
6384
  return {
6385
6385
  toCwd: srcpath,
@@ -6397,13 +6397,13 @@ var require_symlink_paths = __commonJS({
6397
6397
  var require_symlink_type = __commonJS({
6398
6398
  "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
6399
6399
  "use strict";
6400
- var fs4 = require_fs();
6400
+ var fs5 = require_fs();
6401
6401
  var u = require_universalify().fromPromise;
6402
6402
  async function symlinkType(srcpath, type) {
6403
6403
  if (type) return type;
6404
6404
  let stats;
6405
6405
  try {
6406
- stats = await fs4.lstat(srcpath);
6406
+ stats = await fs5.lstat(srcpath);
6407
6407
  } catch {
6408
6408
  return "file";
6409
6409
  }
@@ -6413,7 +6413,7 @@ var require_symlink_type = __commonJS({
6413
6413
  if (type) return type;
6414
6414
  let stats;
6415
6415
  try {
6416
- stats = fs4.lstatSync(srcpath);
6416
+ stats = fs5.lstatSync(srcpath);
6417
6417
  } catch {
6418
6418
  return "file";
6419
6419
  }
@@ -6432,7 +6432,7 @@ var require_symlink = __commonJS({
6432
6432
  "use strict";
6433
6433
  var u = require_universalify().fromPromise;
6434
6434
  var path3 = require("path");
6435
- var fs4 = require_fs();
6435
+ var fs5 = require_fs();
6436
6436
  var { mkdirs, mkdirsSync } = require_mkdirs();
6437
6437
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
6438
6438
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -6441,13 +6441,13 @@ var require_symlink = __commonJS({
6441
6441
  async function createSymlink(srcpath, dstpath, type) {
6442
6442
  let stats;
6443
6443
  try {
6444
- stats = await fs4.lstat(dstpath);
6444
+ stats = await fs5.lstat(dstpath);
6445
6445
  } catch {
6446
6446
  }
6447
6447
  if (stats && stats.isSymbolicLink()) {
6448
6448
  const [srcStat, dstStat] = await Promise.all([
6449
- fs4.stat(srcpath),
6450
- fs4.stat(dstpath)
6449
+ fs5.stat(srcpath),
6450
+ fs5.stat(dstpath)
6451
6451
  ]);
6452
6452
  if (areIdentical(srcStat, dstStat)) return;
6453
6453
  }
@@ -6458,27 +6458,27 @@ var require_symlink = __commonJS({
6458
6458
  if (!await pathExists2(dir)) {
6459
6459
  await mkdirs(dir);
6460
6460
  }
6461
- return fs4.symlink(srcpath, dstpath, toType);
6461
+ return fs5.symlink(srcpath, dstpath, toType);
6462
6462
  }
6463
6463
  function createSymlinkSync(srcpath, dstpath, type) {
6464
6464
  let stats;
6465
6465
  try {
6466
- stats = fs4.lstatSync(dstpath);
6466
+ stats = fs5.lstatSync(dstpath);
6467
6467
  } catch {
6468
6468
  }
6469
6469
  if (stats && stats.isSymbolicLink()) {
6470
- const srcStat = fs4.statSync(srcpath);
6471
- const dstStat = fs4.statSync(dstpath);
6470
+ const srcStat = fs5.statSync(srcpath);
6471
+ const dstStat = fs5.statSync(dstpath);
6472
6472
  if (areIdentical(srcStat, dstStat)) return;
6473
6473
  }
6474
6474
  const relative = symlinkPathsSync(srcpath, dstpath);
6475
6475
  srcpath = relative.toDst;
6476
6476
  type = symlinkTypeSync(relative.toCwd, type);
6477
6477
  const dir = path3.dirname(dstpath);
6478
- const exists = fs4.existsSync(dir);
6479
- if (exists) return fs4.symlinkSync(srcpath, dstpath, type);
6478
+ const exists = fs5.existsSync(dir);
6479
+ if (exists) return fs5.symlinkSync(srcpath, dstpath, type);
6480
6480
  mkdirsSync(dir);
6481
- return fs4.symlinkSync(srcpath, dstpath, type);
6481
+ return fs5.symlinkSync(srcpath, dstpath, type);
6482
6482
  }
6483
6483
  module2.exports = {
6484
6484
  createSymlink: u(createSymlink),
@@ -6547,9 +6547,9 @@ var require_jsonfile = __commonJS({
6547
6547
  if (typeof options === "string") {
6548
6548
  options = { encoding: options };
6549
6549
  }
6550
- const fs4 = options.fs || _fs;
6550
+ const fs5 = options.fs || _fs;
6551
6551
  const shouldThrow = "throws" in options ? options.throws : true;
6552
- let data = await universalify.fromCallback(fs4.readFile)(file, options);
6552
+ let data = await universalify.fromCallback(fs5.readFile)(file, options);
6553
6553
  data = stripBom(data);
6554
6554
  let obj;
6555
6555
  try {
@@ -6569,10 +6569,10 @@ var require_jsonfile = __commonJS({
6569
6569
  if (typeof options === "string") {
6570
6570
  options = { encoding: options };
6571
6571
  }
6572
- const fs4 = options.fs || _fs;
6572
+ const fs5 = options.fs || _fs;
6573
6573
  const shouldThrow = "throws" in options ? options.throws : true;
6574
6574
  try {
6575
- let content = fs4.readFileSync(file, options);
6575
+ let content = fs5.readFileSync(file, options);
6576
6576
  content = stripBom(content);
6577
6577
  return JSON.parse(content, options.reviver);
6578
6578
  } catch (err) {
@@ -6585,15 +6585,15 @@ var require_jsonfile = __commonJS({
6585
6585
  }
6586
6586
  }
6587
6587
  async function _writeFile(file, obj, options = {}) {
6588
- const fs4 = options.fs || _fs;
6588
+ const fs5 = options.fs || _fs;
6589
6589
  const str = stringify(obj, options);
6590
- await universalify.fromCallback(fs4.writeFile)(file, str, options);
6590
+ await universalify.fromCallback(fs5.writeFile)(file, str, options);
6591
6591
  }
6592
6592
  var writeFile2 = universalify.fromPromise(_writeFile);
6593
6593
  function writeFileSync2(file, obj, options = {}) {
6594
- const fs4 = options.fs || _fs;
6594
+ const fs5 = options.fs || _fs;
6595
6595
  const str = stringify(obj, options);
6596
- return fs4.writeFileSync(file, str, options);
6596
+ return fs5.writeFileSync(file, str, options);
6597
6597
  }
6598
6598
  module2.exports = {
6599
6599
  readFile: readFile2,
@@ -6624,7 +6624,7 @@ var require_output_file = __commonJS({
6624
6624
  "node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
6625
6625
  "use strict";
6626
6626
  var u = require_universalify().fromPromise;
6627
- var fs4 = require_fs();
6627
+ var fs5 = require_fs();
6628
6628
  var path3 = require("path");
6629
6629
  var mkdir = require_mkdirs();
6630
6630
  var pathExists2 = require_path_exists().pathExists;
@@ -6633,14 +6633,14 @@ var require_output_file = __commonJS({
6633
6633
  if (!await pathExists2(dir)) {
6634
6634
  await mkdir.mkdirs(dir);
6635
6635
  }
6636
- return fs4.writeFile(file, data, encoding);
6636
+ return fs5.writeFile(file, data, encoding);
6637
6637
  }
6638
6638
  function outputFileSync(file, ...args) {
6639
6639
  const dir = path3.dirname(file);
6640
- if (!fs4.existsSync(dir)) {
6640
+ if (!fs5.existsSync(dir)) {
6641
6641
  mkdir.mkdirsSync(dir);
6642
6642
  }
6643
- fs4.writeFileSync(file, ...args);
6643
+ fs5.writeFileSync(file, ...args);
6644
6644
  }
6645
6645
  module2.exports = {
6646
6646
  outputFile: u(outputFile),
@@ -6699,7 +6699,7 @@ var require_json = __commonJS({
6699
6699
  var require_move = __commonJS({
6700
6700
  "node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
6701
6701
  "use strict";
6702
- var fs4 = require_fs();
6702
+ var fs5 = require_fs();
6703
6703
  var path3 = require("path");
6704
6704
  var { copy } = require_copy2();
6705
6705
  var { remove: remove2 } = require_remove();
@@ -6726,7 +6726,7 @@ var require_move = __commonJS({
6726
6726
  }
6727
6727
  }
6728
6728
  try {
6729
- await fs4.rename(src, dest);
6729
+ await fs5.rename(src, dest);
6730
6730
  } catch (err) {
6731
6731
  if (err.code !== "EXDEV") {
6732
6732
  throw err;
@@ -6751,7 +6751,7 @@ var require_move = __commonJS({
6751
6751
  var require_move_sync = __commonJS({
6752
6752
  "node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
6753
6753
  "use strict";
6754
- var fs4 = require_graceful_fs();
6754
+ var fs5 = require_graceful_fs();
6755
6755
  var path3 = require("path");
6756
6756
  var copySync = require_copy2().copySync;
6757
6757
  var removeSync = require_remove().removeSync;
@@ -6776,12 +6776,12 @@ var require_move_sync = __commonJS({
6776
6776
  removeSync(dest);
6777
6777
  return rename(src, dest, overwrite);
6778
6778
  }
6779
- if (fs4.existsSync(dest)) throw new Error("dest already exists.");
6779
+ if (fs5.existsSync(dest)) throw new Error("dest already exists.");
6780
6780
  return rename(src, dest, overwrite);
6781
6781
  }
6782
6782
  function rename(src, dest, overwrite) {
6783
6783
  try {
6784
- fs4.renameSync(src, dest);
6784
+ fs5.renameSync(src, dest);
6785
6785
  } catch (err) {
6786
6786
  if (err.code !== "EXDEV") throw err;
6787
6787
  return moveAcrossDevice(src, dest, overwrite);
@@ -19192,7 +19192,7 @@ var require_buffer_list = __commonJS({
19192
19192
  }
19193
19193
  }, {
19194
19194
  key: "join",
19195
- value: function join6(s) {
19195
+ value: function join7(s) {
19196
19196
  if (this.length === 0) return "";
19197
19197
  var p = this.head;
19198
19198
  var ret = "" + p.data;
@@ -28069,10 +28069,10 @@ var require_lib2 = __commonJS({
28069
28069
  exports2.analyse = analyse;
28070
28070
  var detectFile = (filepath, opts = {}) => new Promise((resolve, reject) => {
28071
28071
  let fd;
28072
- const fs4 = (0, node_1.default)();
28072
+ const fs5 = (0, node_1.default)();
28073
28073
  const handler = (err, buffer) => {
28074
28074
  if (fd) {
28075
- fs4.closeSync(fd);
28075
+ fs5.closeSync(fd);
28076
28076
  }
28077
28077
  if (err) {
28078
28078
  reject(err);
@@ -28084,9 +28084,9 @@ var require_lib2 = __commonJS({
28084
28084
  };
28085
28085
  const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
28086
28086
  if (sampleSize > 0) {
28087
- fd = fs4.openSync(filepath, "r");
28087
+ fd = fs5.openSync(filepath, "r");
28088
28088
  let sample = Buffer.allocUnsafe(sampleSize);
28089
- fs4.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
28089
+ fs5.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
28090
28090
  if (err) {
28091
28091
  handler(err, null);
28092
28092
  } else {
@@ -28098,22 +28098,22 @@ var require_lib2 = __commonJS({
28098
28098
  });
28099
28099
  return;
28100
28100
  }
28101
- fs4.readFile(filepath, handler);
28101
+ fs5.readFile(filepath, handler);
28102
28102
  });
28103
28103
  exports2.detectFile = detectFile;
28104
28104
  var detectFileSync = (filepath, opts = {}) => {
28105
- const fs4 = (0, node_1.default)();
28105
+ const fs5 = (0, node_1.default)();
28106
28106
  if (opts && opts.sampleSize) {
28107
- const fd = fs4.openSync(filepath, "r");
28107
+ const fd = fs5.openSync(filepath, "r");
28108
28108
  let sample = Buffer.allocUnsafe(opts.sampleSize);
28109
- const bytesRead = fs4.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
28109
+ const bytesRead = fs5.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
28110
28110
  if (bytesRead < opts.sampleSize) {
28111
28111
  sample = sample.subarray(0, bytesRead);
28112
28112
  }
28113
- fs4.closeSync(fd);
28113
+ fs5.closeSync(fd);
28114
28114
  return (0, exports2.detect)(sample);
28115
28115
  }
28116
- return (0, exports2.detect)(fs4.readFileSync(filepath));
28116
+ return (0, exports2.detect)(fs5.readFileSync(filepath));
28117
28117
  };
28118
28118
  exports2.detectFileSync = detectFileSync;
28119
28119
  exports2.default = {
@@ -42003,9 +42003,538 @@ var docsCommand = new Command("docs").alias("d").description("Open SmartStack do
42003
42003
  });
42004
42004
  });
42005
42005
 
42006
+ // src/commands/init.ts
42007
+ var import_fs_extra3 = __toESM(require_lib());
42008
+ var import_path4 = require("path");
42009
+ var import_os2 = require("os");
42010
+ var import_child_process4 = require("child_process");
42011
+ function checkPrerequisites() {
42012
+ const check = (cmd, args) => {
42013
+ try {
42014
+ const result = (0, import_child_process4.spawnSync)(cmd, args, { encoding: "utf-8", shell: true, timeout: 1e4 });
42015
+ return result.status === 0;
42016
+ } catch {
42017
+ return false;
42018
+ }
42019
+ };
42020
+ return {
42021
+ dotnet: check("dotnet", ["--version"]),
42022
+ node: check("node", ["--version"]),
42023
+ npm: check("npm", ["--version"])
42024
+ };
42025
+ }
42026
+ async function checkMcpServers() {
42027
+ const result = {
42028
+ smartstack: { installed: false },
42029
+ context7: { installed: false }
42030
+ };
42031
+ const possiblePaths = [
42032
+ (0, import_path4.join)((0, import_os2.homedir)(), ".claude", "settings.json"),
42033
+ (0, import_path4.join)((0, import_os2.homedir)(), ".claude.json"),
42034
+ (0, import_path4.join)((0, import_os2.homedir)(), "AppData", "Roaming", "Claude", "settings.json"),
42035
+ (0, import_path4.join)((0, import_os2.homedir)(), "Library", "Application Support", "Claude", "settings.json")
42036
+ ];
42037
+ const mcpSettingsPaths = [
42038
+ (0, import_path4.join)((0, import_os2.homedir)(), ".claude", "mcp_servers.json"),
42039
+ (0, import_path4.join)((0, import_os2.homedir)(), ".config", "claude-code", "mcp.json")
42040
+ ];
42041
+ for (const settingsPath of [...possiblePaths, ...mcpSettingsPaths]) {
42042
+ try {
42043
+ if (await import_fs_extra3.default.pathExists(settingsPath)) {
42044
+ const content = await import_fs_extra3.default.readFile(settingsPath, "utf-8");
42045
+ const settings = JSON.parse(content);
42046
+ const mcpServers = settings.mcpServers || settings.mcp_servers || settings.servers || settings;
42047
+ if (mcpServers) {
42048
+ if (mcpServers.smartstack || mcpServers["smartstack-mcp"] || mcpServers["@atlashub/smartstack-mcp"]) {
42049
+ result.smartstack.installed = true;
42050
+ const server = mcpServers.smartstack || mcpServers["smartstack-mcp"] || mcpServers["@atlashub/smartstack-mcp"];
42051
+ result.smartstack.path = server?.command || server?.path;
42052
+ }
42053
+ if (mcpServers.context7 || mcpServers["context7-mcp"] || mcpServers["plugin:context7:context7"]) {
42054
+ result.context7.installed = true;
42055
+ }
42056
+ }
42057
+ }
42058
+ } catch {
42059
+ }
42060
+ }
42061
+ try {
42062
+ const claudeResult = (0, import_child_process4.spawnSync)("claude", ["mcp", "list"], {
42063
+ encoding: "utf-8",
42064
+ shell: true,
42065
+ timeout: 1e4
42066
+ });
42067
+ if (claudeResult.status === 0 && claudeResult.stdout) {
42068
+ const output = claudeResult.stdout.toLowerCase();
42069
+ if (output.includes("smartstack")) {
42070
+ result.smartstack.installed = true;
42071
+ }
42072
+ if (output.includes("context7")) {
42073
+ result.context7.installed = true;
42074
+ }
42075
+ }
42076
+ } catch {
42077
+ }
42078
+ return result;
42079
+ }
42080
+ function displayMcpStatus(status) {
42081
+ console.log();
42082
+ logger.info("MCP Servers Status:");
42083
+ const smartstackStatus = status.smartstack.installed ? source_default.green("\u2713 Installed") : source_default.red("\u2717 Not found");
42084
+ const context7Status = status.context7.installed ? source_default.green("\u2713 Installed") : source_default.red("\u2717 Not found");
42085
+ console.log(` SmartStack MCP: ${smartstackStatus}`);
42086
+ console.log(` Context7 MCP: ${context7Status}`);
42087
+ console.log();
42088
+ }
42089
+ function execCommand(command, cwd, dryRun = false) {
42090
+ if (dryRun) {
42091
+ logger.info(`[DRY RUN] ${command}`);
42092
+ return;
42093
+ }
42094
+ try {
42095
+ (0, import_child_process4.execSync)(command, {
42096
+ cwd,
42097
+ stdio: "inherit",
42098
+ shell: true
42099
+ });
42100
+ } catch (error) {
42101
+ throw new Error(`Command failed: ${command}`);
42102
+ }
42103
+ }
42104
+ async function createBackendStructure(config, dryRun) {
42105
+ const { name } = config;
42106
+ const srcDir = (0, import_path4.join)(name, "src");
42107
+ logger.info("Creating .NET solution structure...");
42108
+ execCommand(`dotnet new sln -n "${name}" -o "${name}"`, void 0, dryRun);
42109
+ const projects = [
42110
+ { proj: `${name}.Domain`, type: "classlib" },
42111
+ { proj: `${name}.Application`, type: "classlib" },
42112
+ { proj: `${name}.Infrastructure`, type: "classlib" },
42113
+ { proj: `${name}.Api`, type: "webapi" }
42114
+ ];
42115
+ for (const { proj, type } of projects) {
42116
+ execCommand(`dotnet new ${type} -n "${proj}" -o "${(0, import_path4.join)(srcDir, proj)}"`, void 0, dryRun);
42117
+ execCommand(`dotnet sln "${(0, import_path4.join)(name, `${name}.sln`)}" add "${(0, import_path4.join)(srcDir, proj)}"`, void 0, dryRun);
42118
+ }
42119
+ const refs = [
42120
+ { from: `${name}.Application`, to: `${name}.Domain` },
42121
+ { from: `${name}.Infrastructure`, to: `${name}.Domain` },
42122
+ { from: `${name}.Infrastructure`, to: `${name}.Application` },
42123
+ { from: `${name}.Api`, to: `${name}.Application` },
42124
+ { from: `${name}.Api`, to: `${name}.Infrastructure` }
42125
+ ];
42126
+ for (const { from: from3, to } of refs) {
42127
+ execCommand(
42128
+ `dotnet add "${(0, import_path4.join)(srcDir, from3)}" reference "${(0, import_path4.join)(srcDir, to)}"`,
42129
+ void 0,
42130
+ dryRun
42131
+ );
42132
+ }
42133
+ logger.info("Installing SmartStack NuGet packages...");
42134
+ const nugetPackages = [
42135
+ { project: `${name}.Domain`, packages: ["SmartStack.Domain"] },
42136
+ { project: `${name}.Application`, packages: ["SmartStack.Application"] },
42137
+ { project: `${name}.Infrastructure`, packages: ["SmartStack.Infrastructure", "Microsoft.EntityFrameworkCore.Design"] },
42138
+ { project: `${name}.Api`, packages: ["SmartStack.Api.Core"] }
42139
+ ];
42140
+ const dbPackage = {
42141
+ sqlserver: "Microsoft.EntityFrameworkCore.SqlServer",
42142
+ postgresql: "Npgsql.EntityFrameworkCore.PostgreSQL",
42143
+ sqlite: "Microsoft.EntityFrameworkCore.Sqlite"
42144
+ }[config.database];
42145
+ nugetPackages.find((p) => p.project === `${name}.Infrastructure`)?.packages.push(dbPackage);
42146
+ for (const { project, packages } of nugetPackages) {
42147
+ for (const pkg2 of packages) {
42148
+ execCommand(`dotnet add "${(0, import_path4.join)(srcDir, project)}" package ${pkg2}`, void 0, dryRun);
42149
+ }
42150
+ }
42151
+ }
42152
+ async function createFrontendStructure(config, dryRun) {
42153
+ const { name, nameLower } = config;
42154
+ const webDir = (0, import_path4.join)(name, "web", `${nameLower}-web`);
42155
+ logger.info("Creating React application...");
42156
+ if (!dryRun) {
42157
+ await import_fs_extra3.default.ensureDir(webDir);
42158
+ }
42159
+ execCommand(`npm create vite@latest . -- --template react-ts`, webDir, dryRun);
42160
+ execCommand("npm install", webDir, dryRun);
42161
+ logger.info("Installing @atlashub/smartstack-react...");
42162
+ execCommand("npm install @atlashub/smartstack-react", webDir, dryRun);
42163
+ execCommand("npm install axios react-router-dom i18next react-i18next", webDir, dryRun);
42164
+ execCommand("npm install -D tailwindcss @tailwindcss/vite", webDir, dryRun);
42165
+ if (!dryRun) {
42166
+ const viteConfig = `import { defineConfig } from 'vite'
42167
+ import react from '@vitejs/plugin-react'
42168
+ import tailwindcss from '@tailwindcss/vite'
42169
+
42170
+ export default defineConfig({
42171
+ plugins: [react(), tailwindcss()],
42172
+ server: {
42173
+ port: 5173,
42174
+ proxy: {
42175
+ '/api': {
42176
+ target: 'https://localhost:5001',
42177
+ changeOrigin: true,
42178
+ secure: false
42179
+ }
42180
+ }
42181
+ }
42182
+ })
42183
+ `;
42184
+ await import_fs_extra3.default.writeFile((0, import_path4.join)(webDir, "vite.config.ts"), viteConfig);
42185
+ }
42186
+ if (!dryRun) {
42187
+ const mainTsx = `import { StrictMode } from 'react'
42188
+ import { createRoot } from 'react-dom/client'
42189
+ import { BrowserRouter } from 'react-router-dom'
42190
+ import { SmartStackProvider } from '@atlashub/smartstack-react'
42191
+ import '@atlashub/smartstack-react/styles'
42192
+ import App from './App'
42193
+
42194
+ createRoot(document.getElementById('root')!).render(
42195
+ <StrictMode>
42196
+ <BrowserRouter>
42197
+ <SmartStackProvider apiUrl="https://localhost:5001/api">
42198
+ <App />
42199
+ </SmartStackProvider>
42200
+ </BrowserRouter>
42201
+ </StrictMode>
42202
+ )
42203
+ `;
42204
+ await import_fs_extra3.default.writeFile((0, import_path4.join)(webDir, "src", "main.tsx"), mainTsx);
42205
+ }
42206
+ }
42207
+ async function createConfigFiles(config, dryRun) {
42208
+ const { name } = config;
42209
+ if (dryRun) {
42210
+ logger.info("[DRY RUN] Would create configuration files");
42211
+ return;
42212
+ }
42213
+ const buildProps = `<Project>
42214
+ <PropertyGroup>
42215
+ <TargetFramework>net10.0</TargetFramework>
42216
+ <Nullable>enable</Nullable>
42217
+ <ImplicitUsings>enable</ImplicitUsings>
42218
+ <TreatWarningsAsErrors>false</TreatWarningsAsErrors>
42219
+ </PropertyGroup>
42220
+ </Project>
42221
+ `;
42222
+ await import_fs_extra3.default.writeFile((0, import_path4.join)(name, "Directory.Build.props"), buildProps);
42223
+ const connectionString = {
42224
+ sqlserver: `Server=(localdb)\\mssqllocaldb;Database=${name};Trusted_Connection=True;MultipleActiveResultSets=true`,
42225
+ postgresql: `Host=localhost;Database=${name.toLowerCase()};Username=postgres;Password=postgres`,
42226
+ sqlite: `Data Source=${name.toLowerCase()}.db`
42227
+ }[config.database];
42228
+ const appSettings = {
42229
+ ConnectionStrings: {
42230
+ DefaultConnection: connectionString
42231
+ },
42232
+ SmartStack: {
42233
+ Modules: {
42234
+ Auth: config.modules.includes("Auth"),
42235
+ Navigation: config.modules.includes("Navigation"),
42236
+ AI: config.modules.includes("AI"),
42237
+ Notifications: config.modules.includes("Notifications")
42238
+ }
42239
+ },
42240
+ Jwt: {
42241
+ Secret: "CHANGE_THIS_SECRET_IN_PRODUCTION_MIN_32_CHARS_LONG",
42242
+ Issuer: name,
42243
+ Audience: name,
42244
+ ExpirationMinutes: 60
42245
+ },
42246
+ Logging: {
42247
+ LogLevel: {
42248
+ Default: "Information"
42249
+ }
42250
+ }
42251
+ };
42252
+ await import_fs_extra3.default.writeFile(
42253
+ (0, import_path4.join)(name, "src", `${name}.Api`, "appsettings.json"),
42254
+ JSON.stringify(appSettings, null, 2)
42255
+ );
42256
+ const gitignore = `## .NET
42257
+ bin/
42258
+ obj/
42259
+ *.user
42260
+ *.suo
42261
+ .vs/
42262
+
42263
+ ## Node
42264
+ node_modules/
42265
+ dist/
42266
+
42267
+ ## IDE
42268
+ .idea/
42269
+ .vscode/
42270
+
42271
+ ## Environment
42272
+ *.env
42273
+ *.env.local
42274
+ appsettings.*.json
42275
+ !appsettings.json
42276
+ !appsettings.Development.json
42277
+
42278
+ ## Build
42279
+ *.log
42280
+ `;
42281
+ await import_fs_extra3.default.writeFile((0, import_path4.join)(name, ".gitignore"), gitignore);
42282
+ const readme = `# ${name}
42283
+
42284
+ A SmartStack application.
42285
+
42286
+ ## Prerequisites
42287
+
42288
+ - .NET 10.0 SDK
42289
+ - Node.js 18+
42290
+ - npm 9+
42291
+
42292
+ ## Getting Started
42293
+
42294
+ ### Backend
42295
+
42296
+ \`\`\`bash
42297
+ # Restore packages
42298
+ dotnet restore
42299
+
42300
+ # Create initial migration
42301
+ dotnet ef migrations add InitialCreate -p src/${name}.Infrastructure -s src/${name}.Api
42302
+
42303
+ # Apply migrations
42304
+ dotnet ef database update -p src/${name}.Infrastructure -s src/${name}.Api
42305
+
42306
+ # Run the API
42307
+ dotnet run --project src/${name}.Api
42308
+ \`\`\`
42309
+
42310
+ ### Frontend
42311
+
42312
+ \`\`\`bash
42313
+ cd web/${name.toLowerCase()}-web
42314
+ npm install
42315
+ npm run dev
42316
+ \`\`\`
42317
+
42318
+ ## Project Structure
42319
+
42320
+ \`\`\`
42321
+ ${name}/
42322
+ \u251C\u2500\u2500 src/
42323
+ \u2502 \u251C\u2500\u2500 ${name}.Domain/ # Domain entities and interfaces
42324
+ \u2502 \u251C\u2500\u2500 ${name}.Application/ # Application services and DTOs
42325
+ \u2502 \u251C\u2500\u2500 ${name}.Infrastructure/ # EF Core, repositories, external services
42326
+ \u2502 \u2514\u2500\u2500 ${name}.Api/ # Web API controllers and configuration
42327
+ \u251C\u2500\u2500 web/
42328
+ \u2502 \u2514\u2500\u2500 ${name.toLowerCase()}-web/ # React frontend
42329
+ \u2514\u2500\u2500 tests/ # Unit and integration tests
42330
+ \`\`\`
42331
+
42332
+ ## Documentation
42333
+
42334
+ - SmartStack: https://docs.smartstack.app
42335
+ - API Reference: https://localhost:5001/scalar (when running)
42336
+
42337
+ ---
42338
+
42339
+ Generated with [SmartStack CLI](https://atlashub.io/products/smartstack-cli)
42340
+ `;
42341
+ await import_fs_extra3.default.writeFile((0, import_path4.join)(name, "README.md"), readme);
42342
+ }
42343
+ async function initializeGit(config, dryRun) {
42344
+ const { name } = config;
42345
+ logger.info("Initializing Git repository...");
42346
+ execCommand("git init", name, dryRun);
42347
+ execCommand("git add .", name, dryRun);
42348
+ execCommand('git commit -m "chore: initial SmartStack project setup"', name, dryRun);
42349
+ }
42350
+ var initCommand = new Command("init").description("Initialize a new SmartStack project").argument("<name>", "Project name").option("--full-stack", "Create full stack project (default)").option("--backend", "Create backend only").option("--frontend", "Create frontend only").option("--db <type>", "Database type (sqlserver, postgresql, sqlite)", "sqlserver").option("--dry-run", "Show what would be created without actually creating").option("-y, --yes", "Skip prompts and use defaults").option("--skip-mcp-check", "Skip MCP servers verification").action(async (name, options) => {
42351
+ logger.header("SmartStack Project Initialization");
42352
+ if (!options.skipMcpCheck) {
42353
+ logger.info("Checking MCP servers...");
42354
+ const mcpStatus = await checkMcpServers();
42355
+ displayMcpStatus(mcpStatus);
42356
+ const mcpMissing = [];
42357
+ if (!mcpStatus.smartstack.installed) {
42358
+ mcpMissing.push("SmartStack MCP");
42359
+ }
42360
+ if (!mcpStatus.context7.installed) {
42361
+ mcpMissing.push("Context7 MCP");
42362
+ }
42363
+ if (mcpMissing.length > 0) {
42364
+ console.log(source_default.yellow(`
42365
+ \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510
42366
+ \u2502 \u26A0\uFE0F MCP SERVERS MISSING \u2502
42367
+ \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524
42368
+ \u2502 The following MCP servers are not installed: \u2502
42369
+ \u2502 ${mcpMissing.map((m) => `\u2022 ${m}`).join("\n\u2502 ").padEnd(74)}\u2502
42370
+ \u2502 \u2502
42371
+ \u2502 SmartStack projects require these MCP servers for optimal development: \u2502
42372
+ \u2502 \u2022 SmartStack MCP: Conventions validation, scaffolding, API docs \u2502
42373
+ \u2502 \u2022 Context7 MCP: Library documentation and code examples \u2502
42374
+ \u2502 \u2502
42375
+ \u2502 INSTALLATION: \u2502
42376
+ \u2502 \u2192 SmartStack MCP: claude mcp add smartstack \u2502
42377
+ \u2502 \u2192 Context7 MCP: claude mcp add context7 \u2502
42378
+ \u2502 \u2502
42379
+ \u2502 Or use --skip-mcp-check to continue without MCP servers. \u2502
42380
+ \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518
42381
+ `));
42382
+ if (!options.yes) {
42383
+ const { continueWithoutMcp } = await lib_default.prompt([
42384
+ {
42385
+ type: "confirm",
42386
+ name: "continueWithoutMcp",
42387
+ message: "Continue without MCP servers?",
42388
+ default: false
42389
+ }
42390
+ ]);
42391
+ if (!continueWithoutMcp) {
42392
+ logger.info("Install MCP servers and try again.");
42393
+ process.exit(0);
42394
+ }
42395
+ } else {
42396
+ logger.warning("Continuing without MCP servers (--yes mode)");
42397
+ }
42398
+ } else {
42399
+ logger.success("All required MCP servers are installed");
42400
+ }
42401
+ }
42402
+ const prereqs = checkPrerequisites();
42403
+ const needsBackend = !options.frontend;
42404
+ const needsFrontend = !options.backend;
42405
+ if (needsBackend && !prereqs.dotnet) {
42406
+ logger.error(".NET SDK not found. Please install .NET 10.0 or later.");
42407
+ process.exit(1);
42408
+ }
42409
+ if (needsFrontend && (!prereqs.node || !prereqs.npm)) {
42410
+ logger.error("Node.js/npm not found. Please install Node.js 18 or later.");
42411
+ process.exit(1);
42412
+ }
42413
+ if (await import_fs_extra3.default.pathExists(name)) {
42414
+ logger.error(`Directory '${name}' already exists.`);
42415
+ process.exit(1);
42416
+ }
42417
+ let projectType = "full-stack";
42418
+ if (options.backend) projectType = "backend";
42419
+ if (options.frontend) projectType = "frontend";
42420
+ let config;
42421
+ if (options.yes) {
42422
+ config = {
42423
+ name,
42424
+ nameLower: name.toLowerCase(),
42425
+ type: projectType,
42426
+ database: options.db || "sqlserver",
42427
+ modules: ["Auth", "Navigation", "Notifications"]
42428
+ };
42429
+ } else {
42430
+ const answers = await lib_default.prompt([
42431
+ {
42432
+ type: "list",
42433
+ name: "type",
42434
+ message: "What type of project do you want to create?",
42435
+ choices: [
42436
+ { name: "Full Stack (Backend .NET + Frontend React)", value: "full-stack" },
42437
+ { name: "Backend Only (.NET API)", value: "backend" },
42438
+ { name: "Frontend Only (React)", value: "frontend" }
42439
+ ],
42440
+ default: projectType
42441
+ },
42442
+ {
42443
+ type: "list",
42444
+ name: "database",
42445
+ message: "Which database do you want to use?",
42446
+ choices: [
42447
+ { name: "SQL Server", value: "sqlserver" },
42448
+ { name: "PostgreSQL", value: "postgresql" },
42449
+ { name: "SQLite", value: "sqlite" }
42450
+ ],
42451
+ default: options.db || "sqlserver",
42452
+ when: (ans) => ans.type !== "frontend"
42453
+ },
42454
+ {
42455
+ type: "checkbox",
42456
+ name: "modules",
42457
+ message: "Which SmartStack modules do you want to enable?",
42458
+ choices: [
42459
+ { name: "Auth (JWT + OAuth)", value: "Auth", checked: true },
42460
+ { name: "Navigation (Dynamic menus)", value: "Navigation", checked: true },
42461
+ { name: "AI (OpenAI/Claude integration)", value: "AI", checked: false },
42462
+ { name: "Notifications (SignalR real-time)", value: "Notifications", checked: true }
42463
+ ],
42464
+ when: (ans) => ans.type !== "frontend"
42465
+ }
42466
+ ]);
42467
+ config = {
42468
+ name,
42469
+ nameLower: name.toLowerCase(),
42470
+ type: answers.type,
42471
+ database: answers.database || "sqlserver",
42472
+ modules: answers.modules || []
42473
+ };
42474
+ }
42475
+ const dryRun = options.dryRun || false;
42476
+ if (dryRun) {
42477
+ logger.warning("DRY RUN MODE - No files will be created");
42478
+ }
42479
+ console.log();
42480
+ logger.info(`Project: ${source_default.cyan(config.name)}`);
42481
+ logger.info(`Type: ${source_default.cyan(config.type)}`);
42482
+ if (config.type !== "frontend") {
42483
+ logger.info(`Database: ${source_default.cyan(config.database)}`);
42484
+ logger.info(`Modules: ${source_default.cyan(config.modules.join(", ") || "None")}`);
42485
+ }
42486
+ console.log();
42487
+ try {
42488
+ if (!dryRun) {
42489
+ await import_fs_extra3.default.ensureDir(name);
42490
+ }
42491
+ if (config.type === "full-stack" || config.type === "backend") {
42492
+ await createBackendStructure(config, dryRun);
42493
+ }
42494
+ if (config.type === "full-stack" || config.type === "frontend") {
42495
+ await createFrontendStructure(config, dryRun);
42496
+ }
42497
+ if (config.type !== "frontend") {
42498
+ await createConfigFiles(config, dryRun);
42499
+ }
42500
+ await initializeGit(config, dryRun);
42501
+ const summary = [
42502
+ source_default.green.bold("Project created successfully!"),
42503
+ "",
42504
+ `Location: ${source_default.cyan((0, import_path4.join)(process.cwd(), name))}`,
42505
+ "",
42506
+ source_default.bold("Next steps:"),
42507
+ ""
42508
+ ];
42509
+ if (config.type !== "frontend") {
42510
+ summary.push(
42511
+ ` 1. Configure connection string in ${source_default.cyan("appsettings.json")}`,
42512
+ ` 2. Create migration: ${source_default.cyan(`dotnet ef migrations add InitialCreate -p src/${name}.Infrastructure -s src/${name}.Api`)}`,
42513
+ ` 3. Apply migration: ${source_default.cyan(`dotnet ef database update -p src/${name}.Infrastructure -s src/${name}.Api`)}`,
42514
+ ` 4. Run backend: ${source_default.cyan(`dotnet run --project src/${name}.Api`)}`
42515
+ );
42516
+ }
42517
+ if (config.type !== "backend") {
42518
+ summary.push(
42519
+ ` 5. Run frontend: ${source_default.cyan(`cd web/${name.toLowerCase()}-web && npm run dev`)}`
42520
+ );
42521
+ }
42522
+ summary.push(
42523
+ "",
42524
+ source_default.bold("Documentation:"),
42525
+ ` SmartStack: ${source_default.cyan("https://docs.smartstack.app")}`,
42526
+ ` API Reference: ${source_default.cyan("https://localhost:5001/scalar")} (when running)`
42527
+ );
42528
+ logger.box(summary, "success");
42529
+ } catch (error) {
42530
+ logger.error(`Failed to create project: ${error instanceof Error ? error.message : error}`);
42531
+ process.exit(1);
42532
+ }
42533
+ });
42534
+
42006
42535
  // src/lib/license.ts
42007
42536
  var jwt = __toESM(require_jsonwebtoken());
42008
- var fs3 = __toESM(require_lib());
42537
+ var fs4 = __toESM(require_lib());
42009
42538
  var path2 = __toESM(require("path"));
42010
42539
  var os3 = __toESM(require("os"));
42011
42540
  var PUBLIC_KEY = `-----BEGIN PUBLIC KEY-----
@@ -42025,20 +42554,20 @@ function getLicenseFilePath() {
42025
42554
  }
42026
42555
  async function saveLicenseKey(licenseKey) {
42027
42556
  const licensePath = getLicenseFilePath();
42028
- await fs3.ensureDir(path2.dirname(licensePath));
42029
- await fs3.writeFile(licensePath, licenseKey.trim(), "utf-8");
42557
+ await fs4.ensureDir(path2.dirname(licensePath));
42558
+ await fs4.writeFile(licensePath, licenseKey.trim(), "utf-8");
42030
42559
  }
42031
42560
  async function loadLicenseKey() {
42032
42561
  const licensePath = getLicenseFilePath();
42033
- if (await fs3.pathExists(licensePath)) {
42034
- return (await fs3.readFile(licensePath, "utf-8")).trim();
42562
+ if (await fs4.pathExists(licensePath)) {
42563
+ return (await fs4.readFile(licensePath, "utf-8")).trim();
42035
42564
  }
42036
42565
  return null;
42037
42566
  }
42038
42567
  async function removeLicenseKey() {
42039
42568
  const licensePath = getLicenseFilePath();
42040
- if (await fs3.pathExists(licensePath)) {
42041
- await fs3.remove(licensePath);
42569
+ if (await fs4.pathExists(licensePath)) {
42570
+ await fs4.remove(licensePath);
42042
42571
  }
42043
42572
  }
42044
42573
  function validateLicenseKey(licenseKey) {
@@ -42179,8 +42708,8 @@ function createLicenseCommand() {
42179
42708
 
42180
42709
  // src/index.ts
42181
42710
  var import_fs3 = require("fs");
42182
- var import_path4 = require("path");
42183
- var pkg = JSON.parse((0, import_fs3.readFileSync)((0, import_path4.join)(__dirname, "..", "package.json"), "utf-8"));
42711
+ var import_path5 = require("path");
42712
+ var pkg = JSON.parse((0, import_fs3.readFileSync)((0, import_path5.join)(__dirname, "..", "package.json"), "utf-8"));
42184
42713
  var LICENSE_FREE_COMMANDS = ["license", "help", "--help", "-h", "--version", "-v"];
42185
42714
  async function main2() {
42186
42715
  const program2 = new Command();
@@ -42191,6 +42720,7 @@ async function main2() {
42191
42720
  program2.addCommand(statusCommand);
42192
42721
  program2.addCommand(updateCommand);
42193
42722
  program2.addCommand(docsCommand);
42723
+ program2.addCommand(initCommand);
42194
42724
  const args = process.argv.slice(2);
42195
42725
  const commandName = args[0] || "";
42196
42726
  const requiresLicense = !LICENSE_FREE_COMMANDS.some(