@atlashub/smartstack-cli 2.6.2 → 2.7.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 (37) hide show
  1. package/.documentation/agents.html +1 -1
  2. package/.documentation/apex.html +1 -1
  3. package/.documentation/business-analyse.html +749 -1419
  4. package/.documentation/cli-commands.html +1 -1
  5. package/.documentation/commands.html +1 -1
  6. package/.documentation/css/styles.css +160 -0
  7. package/.documentation/efcore.html +1 -1
  8. package/.documentation/gitflow.html +3 -453
  9. package/.documentation/hooks.html +1 -1
  10. package/.documentation/index.html +177 -68
  11. package/.documentation/init.html +747 -290
  12. package/.documentation/installation.html +63 -8
  13. package/.documentation/ralph-loop.html +1 -1
  14. package/.documentation/test-web.html +1 -1
  15. package/dist/index.js +588 -339
  16. package/dist/index.js.map +1 -1
  17. package/package.json +1 -1
  18. package/templates/agents/ba-reader.md +23 -0
  19. package/templates/agents/ba-writer.md +63 -4
  20. package/templates/skills/business-analyse/questionnaire/00-application.md +1 -1
  21. package/templates/skills/business-analyse/questionnaire/03-scope.md +2 -2
  22. package/templates/skills/business-analyse/questionnaire.md +1 -1
  23. package/templates/skills/business-analyse/react/application-viewer.md +1 -1
  24. package/templates/skills/business-analyse/react/schema.md +88 -1
  25. package/templates/skills/business-analyse/schemas/application-schema.json +16 -1
  26. package/templates/skills/business-analyse/schemas/feature-schema.json +19 -986
  27. package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +157 -0
  28. package/templates/skills/business-analyse/schemas/sections/discovery-schema.json +82 -0
  29. package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +80 -0
  30. package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +69 -0
  31. package/templates/skills/business-analyse/schemas/sections/specification-schema.json +445 -0
  32. package/templates/skills/business-analyse/schemas/sections/validation-schema.json +93 -0
  33. package/templates/skills/business-analyse/schemas/shared/common-defs.json +133 -0
  34. package/templates/skills/business-analyse/steps/step-01-cadrage.md +22 -3
  35. package/templates/skills/business-analyse/steps/step-03-specify.md +129 -0
  36. package/templates/skills/business-analyse/steps/step-04-consolidation.md +38 -5
  37. package/templates/skills/business-analyse/steps/step-05-handoff.md +94 -218
package/dist/index.js CHANGED
@@ -974,7 +974,7 @@ var require_command = __commonJS({
974
974
  var EventEmitter2 = require("events").EventEmitter;
975
975
  var childProcess2 = require("child_process");
976
976
  var path5 = require("path");
977
- var fs15 = require("fs");
977
+ var fs16 = require("fs");
978
978
  var process17 = require("process");
979
979
  var { Argument: Argument2, humanReadableArgName } = require_argument();
980
980
  var { CommanderError: CommanderError2 } = require_error();
@@ -1907,10 +1907,10 @@ Expecting one of '${allowedValues.join("', '")}'`);
1907
1907
  const sourceExt = [".js", ".ts", ".tsx", ".mjs", ".cjs"];
1908
1908
  function findFile(baseDir, baseName) {
1909
1909
  const localBin = path5.resolve(baseDir, baseName);
1910
- if (fs15.existsSync(localBin)) return localBin;
1910
+ if (fs16.existsSync(localBin)) return localBin;
1911
1911
  if (sourceExt.includes(path5.extname(baseName))) return void 0;
1912
1912
  const foundExt = sourceExt.find(
1913
- (ext2) => fs15.existsSync(`${localBin}${ext2}`)
1913
+ (ext2) => fs16.existsSync(`${localBin}${ext2}`)
1914
1914
  );
1915
1915
  if (foundExt) return `${localBin}${foundExt}`;
1916
1916
  return void 0;
@@ -1922,7 +1922,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
1922
1922
  if (this._scriptPath) {
1923
1923
  let resolvedScriptPath;
1924
1924
  try {
1925
- resolvedScriptPath = fs15.realpathSync(this._scriptPath);
1925
+ resolvedScriptPath = fs16.realpathSync(this._scriptPath);
1926
1926
  } catch (err) {
1927
1927
  resolvedScriptPath = this._scriptPath;
1928
1928
  }
@@ -4734,54 +4734,54 @@ var require_polyfills = __commonJS({
4734
4734
  }
4735
4735
  var chdir;
4736
4736
  module2.exports = patch;
4737
- function patch(fs15) {
4737
+ function patch(fs16) {
4738
4738
  if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
4739
- patchLchmod(fs15);
4740
- }
4741
- if (!fs15.lutimes) {
4742
- patchLutimes(fs15);
4743
- }
4744
- fs15.chown = chownFix(fs15.chown);
4745
- fs15.fchown = chownFix(fs15.fchown);
4746
- fs15.lchown = chownFix(fs15.lchown);
4747
- fs15.chmod = chmodFix(fs15.chmod);
4748
- fs15.fchmod = chmodFix(fs15.fchmod);
4749
- fs15.lchmod = chmodFix(fs15.lchmod);
4750
- fs15.chownSync = chownFixSync(fs15.chownSync);
4751
- fs15.fchownSync = chownFixSync(fs15.fchownSync);
4752
- fs15.lchownSync = chownFixSync(fs15.lchownSync);
4753
- fs15.chmodSync = chmodFixSync(fs15.chmodSync);
4754
- fs15.fchmodSync = chmodFixSync(fs15.fchmodSync);
4755
- fs15.lchmodSync = chmodFixSync(fs15.lchmodSync);
4756
- fs15.stat = statFix(fs15.stat);
4757
- fs15.fstat = statFix(fs15.fstat);
4758
- fs15.lstat = statFix(fs15.lstat);
4759
- fs15.statSync = statFixSync(fs15.statSync);
4760
- fs15.fstatSync = statFixSync(fs15.fstatSync);
4761
- fs15.lstatSync = statFixSync(fs15.lstatSync);
4762
- if (fs15.chmod && !fs15.lchmod) {
4763
- fs15.lchmod = function(path5, mode, cb) {
4739
+ patchLchmod(fs16);
4740
+ }
4741
+ if (!fs16.lutimes) {
4742
+ patchLutimes(fs16);
4743
+ }
4744
+ fs16.chown = chownFix(fs16.chown);
4745
+ fs16.fchown = chownFix(fs16.fchown);
4746
+ fs16.lchown = chownFix(fs16.lchown);
4747
+ fs16.chmod = chmodFix(fs16.chmod);
4748
+ fs16.fchmod = chmodFix(fs16.fchmod);
4749
+ fs16.lchmod = chmodFix(fs16.lchmod);
4750
+ fs16.chownSync = chownFixSync(fs16.chownSync);
4751
+ fs16.fchownSync = chownFixSync(fs16.fchownSync);
4752
+ fs16.lchownSync = chownFixSync(fs16.lchownSync);
4753
+ fs16.chmodSync = chmodFixSync(fs16.chmodSync);
4754
+ fs16.fchmodSync = chmodFixSync(fs16.fchmodSync);
4755
+ fs16.lchmodSync = chmodFixSync(fs16.lchmodSync);
4756
+ fs16.stat = statFix(fs16.stat);
4757
+ fs16.fstat = statFix(fs16.fstat);
4758
+ fs16.lstat = statFix(fs16.lstat);
4759
+ fs16.statSync = statFixSync(fs16.statSync);
4760
+ fs16.fstatSync = statFixSync(fs16.fstatSync);
4761
+ fs16.lstatSync = statFixSync(fs16.lstatSync);
4762
+ if (fs16.chmod && !fs16.lchmod) {
4763
+ fs16.lchmod = function(path5, mode, cb) {
4764
4764
  if (cb) process.nextTick(cb);
4765
4765
  };
4766
- fs15.lchmodSync = function() {
4766
+ fs16.lchmodSync = function() {
4767
4767
  };
4768
4768
  }
4769
- if (fs15.chown && !fs15.lchown) {
4770
- fs15.lchown = function(path5, uid, gid, cb) {
4769
+ if (fs16.chown && !fs16.lchown) {
4770
+ fs16.lchown = function(path5, uid, gid, cb) {
4771
4771
  if (cb) process.nextTick(cb);
4772
4772
  };
4773
- fs15.lchownSync = function() {
4773
+ fs16.lchownSync = function() {
4774
4774
  };
4775
4775
  }
4776
4776
  if (platform3 === "win32") {
4777
- fs15.rename = typeof fs15.rename !== "function" ? fs15.rename : (function(fs$rename) {
4777
+ fs16.rename = typeof fs16.rename !== "function" ? fs16.rename : (function(fs$rename) {
4778
4778
  function rename(from3, to, cb) {
4779
4779
  var start = Date.now();
4780
4780
  var backoff = 0;
4781
4781
  fs$rename(from3, to, function CB(er) {
4782
4782
  if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
4783
4783
  setTimeout(function() {
4784
- fs15.stat(to, function(stater, st) {
4784
+ fs16.stat(to, function(stater, st) {
4785
4785
  if (stater && stater.code === "ENOENT")
4786
4786
  fs$rename(from3, to, CB);
4787
4787
  else
@@ -4797,9 +4797,9 @@ var require_polyfills = __commonJS({
4797
4797
  }
4798
4798
  if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
4799
4799
  return rename;
4800
- })(fs15.rename);
4800
+ })(fs16.rename);
4801
4801
  }
4802
- fs15.read = typeof fs15.read !== "function" ? fs15.read : (function(fs$read) {
4802
+ fs16.read = typeof fs16.read !== "function" ? fs16.read : (function(fs$read) {
4803
4803
  function read(fd, buffer, offset, length, position, callback_) {
4804
4804
  var callback;
4805
4805
  if (callback_ && typeof callback_ === "function") {
@@ -4807,22 +4807,22 @@ var require_polyfills = __commonJS({
4807
4807
  callback = function(er, _3, __) {
4808
4808
  if (er && er.code === "EAGAIN" && eagCounter < 10) {
4809
4809
  eagCounter++;
4810
- return fs$read.call(fs15, fd, buffer, offset, length, position, callback);
4810
+ return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
4811
4811
  }
4812
4812
  callback_.apply(this, arguments);
4813
4813
  };
4814
4814
  }
4815
- return fs$read.call(fs15, fd, buffer, offset, length, position, callback);
4815
+ return fs$read.call(fs16, fd, buffer, offset, length, position, callback);
4816
4816
  }
4817
4817
  if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
4818
4818
  return read;
4819
- })(fs15.read);
4820
- fs15.readSync = typeof fs15.readSync !== "function" ? fs15.readSync : /* @__PURE__ */ (function(fs$readSync) {
4819
+ })(fs16.read);
4820
+ fs16.readSync = typeof fs16.readSync !== "function" ? fs16.readSync : /* @__PURE__ */ (function(fs$readSync) {
4821
4821
  return function(fd, buffer, offset, length, position) {
4822
4822
  var eagCounter = 0;
4823
4823
  while (true) {
4824
4824
  try {
4825
- return fs$readSync.call(fs15, fd, buffer, offset, length, position);
4825
+ return fs$readSync.call(fs16, fd, buffer, offset, length, position);
4826
4826
  } catch (er) {
4827
4827
  if (er.code === "EAGAIN" && eagCounter < 10) {
4828
4828
  eagCounter++;
@@ -4832,10 +4832,10 @@ var require_polyfills = __commonJS({
4832
4832
  }
4833
4833
  }
4834
4834
  };
4835
- })(fs15.readSync);
4836
- function patchLchmod(fs16) {
4837
- fs16.lchmod = function(path5, mode, callback) {
4838
- fs16.open(
4835
+ })(fs16.readSync);
4836
+ function patchLchmod(fs17) {
4837
+ fs17.lchmod = function(path5, mode, callback) {
4838
+ fs17.open(
4839
4839
  path5,
4840
4840
  constants.O_WRONLY | constants.O_SYMLINK,
4841
4841
  mode,
@@ -4844,80 +4844,80 @@ var require_polyfills = __commonJS({
4844
4844
  if (callback) callback(err);
4845
4845
  return;
4846
4846
  }
4847
- fs16.fchmod(fd, mode, function(err2) {
4848
- fs16.close(fd, function(err22) {
4847
+ fs17.fchmod(fd, mode, function(err2) {
4848
+ fs17.close(fd, function(err22) {
4849
4849
  if (callback) callback(err2 || err22);
4850
4850
  });
4851
4851
  });
4852
4852
  }
4853
4853
  );
4854
4854
  };
4855
- fs16.lchmodSync = function(path5, mode) {
4856
- var fd = fs16.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
4855
+ fs17.lchmodSync = function(path5, mode) {
4856
+ var fd = fs17.openSync(path5, constants.O_WRONLY | constants.O_SYMLINK, mode);
4857
4857
  var threw = true;
4858
4858
  var ret;
4859
4859
  try {
4860
- ret = fs16.fchmodSync(fd, mode);
4860
+ ret = fs17.fchmodSync(fd, mode);
4861
4861
  threw = false;
4862
4862
  } finally {
4863
4863
  if (threw) {
4864
4864
  try {
4865
- fs16.closeSync(fd);
4865
+ fs17.closeSync(fd);
4866
4866
  } catch (er) {
4867
4867
  }
4868
4868
  } else {
4869
- fs16.closeSync(fd);
4869
+ fs17.closeSync(fd);
4870
4870
  }
4871
4871
  }
4872
4872
  return ret;
4873
4873
  };
4874
4874
  }
4875
- function patchLutimes(fs16) {
4876
- if (constants.hasOwnProperty("O_SYMLINK") && fs16.futimes) {
4877
- fs16.lutimes = function(path5, at, mt, cb) {
4878
- fs16.open(path5, constants.O_SYMLINK, function(er, fd) {
4875
+ function patchLutimes(fs17) {
4876
+ if (constants.hasOwnProperty("O_SYMLINK") && fs17.futimes) {
4877
+ fs17.lutimes = function(path5, at, mt, cb) {
4878
+ fs17.open(path5, constants.O_SYMLINK, function(er, fd) {
4879
4879
  if (er) {
4880
4880
  if (cb) cb(er);
4881
4881
  return;
4882
4882
  }
4883
- fs16.futimes(fd, at, mt, function(er2) {
4884
- fs16.close(fd, function(er22) {
4883
+ fs17.futimes(fd, at, mt, function(er2) {
4884
+ fs17.close(fd, function(er22) {
4885
4885
  if (cb) cb(er2 || er22);
4886
4886
  });
4887
4887
  });
4888
4888
  });
4889
4889
  };
4890
- fs16.lutimesSync = function(path5, at, mt) {
4891
- var fd = fs16.openSync(path5, constants.O_SYMLINK);
4890
+ fs17.lutimesSync = function(path5, at, mt) {
4891
+ var fd = fs17.openSync(path5, constants.O_SYMLINK);
4892
4892
  var ret;
4893
4893
  var threw = true;
4894
4894
  try {
4895
- ret = fs16.futimesSync(fd, at, mt);
4895
+ ret = fs17.futimesSync(fd, at, mt);
4896
4896
  threw = false;
4897
4897
  } finally {
4898
4898
  if (threw) {
4899
4899
  try {
4900
- fs16.closeSync(fd);
4900
+ fs17.closeSync(fd);
4901
4901
  } catch (er) {
4902
4902
  }
4903
4903
  } else {
4904
- fs16.closeSync(fd);
4904
+ fs17.closeSync(fd);
4905
4905
  }
4906
4906
  }
4907
4907
  return ret;
4908
4908
  };
4909
- } else if (fs16.futimes) {
4910
- fs16.lutimes = function(_a, _b, _c, cb) {
4909
+ } else if (fs17.futimes) {
4910
+ fs17.lutimes = function(_a, _b, _c, cb) {
4911
4911
  if (cb) process.nextTick(cb);
4912
4912
  };
4913
- fs16.lutimesSync = function() {
4913
+ fs17.lutimesSync = function() {
4914
4914
  };
4915
4915
  }
4916
4916
  }
4917
4917
  function chmodFix(orig) {
4918
4918
  if (!orig) return orig;
4919
4919
  return function(target, mode, cb) {
4920
- return orig.call(fs15, target, mode, function(er) {
4920
+ return orig.call(fs16, target, mode, function(er) {
4921
4921
  if (chownErOk(er)) er = null;
4922
4922
  if (cb) cb.apply(this, arguments);
4923
4923
  });
@@ -4927,7 +4927,7 @@ var require_polyfills = __commonJS({
4927
4927
  if (!orig) return orig;
4928
4928
  return function(target, mode) {
4929
4929
  try {
4930
- return orig.call(fs15, target, mode);
4930
+ return orig.call(fs16, target, mode);
4931
4931
  } catch (er) {
4932
4932
  if (!chownErOk(er)) throw er;
4933
4933
  }
@@ -4936,7 +4936,7 @@ var require_polyfills = __commonJS({
4936
4936
  function chownFix(orig) {
4937
4937
  if (!orig) return orig;
4938
4938
  return function(target, uid, gid, cb) {
4939
- return orig.call(fs15, target, uid, gid, function(er) {
4939
+ return orig.call(fs16, target, uid, gid, function(er) {
4940
4940
  if (chownErOk(er)) er = null;
4941
4941
  if (cb) cb.apply(this, arguments);
4942
4942
  });
@@ -4946,7 +4946,7 @@ var require_polyfills = __commonJS({
4946
4946
  if (!orig) return orig;
4947
4947
  return function(target, uid, gid) {
4948
4948
  try {
4949
- return orig.call(fs15, target, uid, gid);
4949
+ return orig.call(fs16, target, uid, gid);
4950
4950
  } catch (er) {
4951
4951
  if (!chownErOk(er)) throw er;
4952
4952
  }
@@ -4966,13 +4966,13 @@ var require_polyfills = __commonJS({
4966
4966
  }
4967
4967
  if (cb) cb.apply(this, arguments);
4968
4968
  }
4969
- return options ? orig.call(fs15, target, options, callback) : orig.call(fs15, target, callback);
4969
+ return options ? orig.call(fs16, target, options, callback) : orig.call(fs16, target, callback);
4970
4970
  };
4971
4971
  }
4972
4972
  function statFixSync(orig) {
4973
4973
  if (!orig) return orig;
4974
4974
  return function(target, options) {
4975
- var stats = options ? orig.call(fs15, target, options) : orig.call(fs15, target);
4975
+ var stats = options ? orig.call(fs16, target, options) : orig.call(fs16, target);
4976
4976
  if (stats) {
4977
4977
  if (stats.uid < 0) stats.uid += 4294967296;
4978
4978
  if (stats.gid < 0) stats.gid += 4294967296;
@@ -5002,7 +5002,7 @@ var require_legacy_streams = __commonJS({
5002
5002
  "use strict";
5003
5003
  var Stream2 = require("stream").Stream;
5004
5004
  module2.exports = legacy;
5005
- function legacy(fs15) {
5005
+ function legacy(fs16) {
5006
5006
  return {
5007
5007
  ReadStream,
5008
5008
  WriteStream
@@ -5045,7 +5045,7 @@ var require_legacy_streams = __commonJS({
5045
5045
  });
5046
5046
  return;
5047
5047
  }
5048
- fs15.open(this.path, this.flags, this.mode, function(err, fd) {
5048
+ fs16.open(this.path, this.flags, this.mode, function(err, fd) {
5049
5049
  if (err) {
5050
5050
  self2.emit("error", err);
5051
5051
  self2.readable = false;
@@ -5084,7 +5084,7 @@ var require_legacy_streams = __commonJS({
5084
5084
  this.busy = false;
5085
5085
  this._queue = [];
5086
5086
  if (this.fd === null) {
5087
- this._open = fs15.open;
5087
+ this._open = fs16.open;
5088
5088
  this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
5089
5089
  this.flush();
5090
5090
  }
@@ -5120,7 +5120,7 @@ var require_clone = __commonJS({
5120
5120
  var require_graceful_fs = __commonJS({
5121
5121
  "node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
5122
5122
  "use strict";
5123
- var fs15 = require("fs");
5123
+ var fs16 = require("fs");
5124
5124
  var polyfills = require_polyfills();
5125
5125
  var legacy = require_legacy_streams();
5126
5126
  var clone = require_clone();
@@ -5152,12 +5152,12 @@ var require_graceful_fs = __commonJS({
5152
5152
  m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
5153
5153
  console.error(m);
5154
5154
  };
5155
- if (!fs15[gracefulQueue]) {
5155
+ if (!fs16[gracefulQueue]) {
5156
5156
  queue = global[gracefulQueue] || [];
5157
- publishQueue(fs15, queue);
5158
- fs15.close = (function(fs$close) {
5157
+ publishQueue(fs16, queue);
5158
+ fs16.close = (function(fs$close) {
5159
5159
  function close(fd, cb) {
5160
- return fs$close.call(fs15, fd, function(err) {
5160
+ return fs$close.call(fs16, fd, function(err) {
5161
5161
  if (!err) {
5162
5162
  resetQueue();
5163
5163
  }
@@ -5169,40 +5169,40 @@ var require_graceful_fs = __commonJS({
5169
5169
  value: fs$close
5170
5170
  });
5171
5171
  return close;
5172
- })(fs15.close);
5173
- fs15.closeSync = (function(fs$closeSync) {
5172
+ })(fs16.close);
5173
+ fs16.closeSync = (function(fs$closeSync) {
5174
5174
  function closeSync(fd) {
5175
- fs$closeSync.apply(fs15, arguments);
5175
+ fs$closeSync.apply(fs16, arguments);
5176
5176
  resetQueue();
5177
5177
  }
5178
5178
  Object.defineProperty(closeSync, previousSymbol, {
5179
5179
  value: fs$closeSync
5180
5180
  });
5181
5181
  return closeSync;
5182
- })(fs15.closeSync);
5182
+ })(fs16.closeSync);
5183
5183
  if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
5184
5184
  process.on("exit", function() {
5185
- debug(fs15[gracefulQueue]);
5186
- require("assert").equal(fs15[gracefulQueue].length, 0);
5185
+ debug(fs16[gracefulQueue]);
5186
+ require("assert").equal(fs16[gracefulQueue].length, 0);
5187
5187
  });
5188
5188
  }
5189
5189
  }
5190
5190
  var queue;
5191
5191
  if (!global[gracefulQueue]) {
5192
- publishQueue(global, fs15[gracefulQueue]);
5193
- }
5194
- module2.exports = patch(clone(fs15));
5195
- if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs15.__patched) {
5196
- module2.exports = patch(fs15);
5197
- fs15.__patched = true;
5198
- }
5199
- function patch(fs16) {
5200
- polyfills(fs16);
5201
- fs16.gracefulify = patch;
5202
- fs16.createReadStream = createReadStream;
5203
- fs16.createWriteStream = createWriteStream;
5204
- var fs$readFile = fs16.readFile;
5205
- fs16.readFile = readFile2;
5192
+ publishQueue(global, fs16[gracefulQueue]);
5193
+ }
5194
+ module2.exports = patch(clone(fs16));
5195
+ if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs16.__patched) {
5196
+ module2.exports = patch(fs16);
5197
+ fs16.__patched = true;
5198
+ }
5199
+ function patch(fs17) {
5200
+ polyfills(fs17);
5201
+ fs17.gracefulify = patch;
5202
+ fs17.createReadStream = createReadStream;
5203
+ fs17.createWriteStream = createWriteStream;
5204
+ var fs$readFile = fs17.readFile;
5205
+ fs17.readFile = readFile2;
5206
5206
  function readFile2(path5, options, cb) {
5207
5207
  if (typeof options === "function")
5208
5208
  cb = options, options = null;
@@ -5218,8 +5218,8 @@ var require_graceful_fs = __commonJS({
5218
5218
  });
5219
5219
  }
5220
5220
  }
5221
- var fs$writeFile = fs16.writeFile;
5222
- fs16.writeFile = writeFile2;
5221
+ var fs$writeFile = fs17.writeFile;
5222
+ fs17.writeFile = writeFile2;
5223
5223
  function writeFile2(path5, data, options, cb) {
5224
5224
  if (typeof options === "function")
5225
5225
  cb = options, options = null;
@@ -5235,9 +5235,9 @@ var require_graceful_fs = __commonJS({
5235
5235
  });
5236
5236
  }
5237
5237
  }
5238
- var fs$appendFile = fs16.appendFile;
5238
+ var fs$appendFile = fs17.appendFile;
5239
5239
  if (fs$appendFile)
5240
- fs16.appendFile = appendFile;
5240
+ fs17.appendFile = appendFile;
5241
5241
  function appendFile(path5, data, options, cb) {
5242
5242
  if (typeof options === "function")
5243
5243
  cb = options, options = null;
@@ -5253,9 +5253,9 @@ var require_graceful_fs = __commonJS({
5253
5253
  });
5254
5254
  }
5255
5255
  }
5256
- var fs$copyFile = fs16.copyFile;
5256
+ var fs$copyFile = fs17.copyFile;
5257
5257
  if (fs$copyFile)
5258
- fs16.copyFile = copyFile;
5258
+ fs17.copyFile = copyFile;
5259
5259
  function copyFile(src, dest, flags, cb) {
5260
5260
  if (typeof flags === "function") {
5261
5261
  cb = flags;
@@ -5273,8 +5273,8 @@ var require_graceful_fs = __commonJS({
5273
5273
  });
5274
5274
  }
5275
5275
  }
5276
- var fs$readdir = fs16.readdir;
5277
- fs16.readdir = readdir2;
5276
+ var fs$readdir = fs17.readdir;
5277
+ fs17.readdir = readdir2;
5278
5278
  var noReaddirOptionVersions = /^v[0-5]\./;
5279
5279
  function readdir2(path5, options, cb) {
5280
5280
  if (typeof options === "function")
@@ -5315,21 +5315,21 @@ var require_graceful_fs = __commonJS({
5315
5315
  }
5316
5316
  }
5317
5317
  if (process.version.substr(0, 4) === "v0.8") {
5318
- var legStreams = legacy(fs16);
5318
+ var legStreams = legacy(fs17);
5319
5319
  ReadStream = legStreams.ReadStream;
5320
5320
  WriteStream = legStreams.WriteStream;
5321
5321
  }
5322
- var fs$ReadStream = fs16.ReadStream;
5322
+ var fs$ReadStream = fs17.ReadStream;
5323
5323
  if (fs$ReadStream) {
5324
5324
  ReadStream.prototype = Object.create(fs$ReadStream.prototype);
5325
5325
  ReadStream.prototype.open = ReadStream$open;
5326
5326
  }
5327
- var fs$WriteStream = fs16.WriteStream;
5327
+ var fs$WriteStream = fs17.WriteStream;
5328
5328
  if (fs$WriteStream) {
5329
5329
  WriteStream.prototype = Object.create(fs$WriteStream.prototype);
5330
5330
  WriteStream.prototype.open = WriteStream$open;
5331
5331
  }
5332
- Object.defineProperty(fs16, "ReadStream", {
5332
+ Object.defineProperty(fs17, "ReadStream", {
5333
5333
  get: function() {
5334
5334
  return ReadStream;
5335
5335
  },
@@ -5339,7 +5339,7 @@ var require_graceful_fs = __commonJS({
5339
5339
  enumerable: true,
5340
5340
  configurable: true
5341
5341
  });
5342
- Object.defineProperty(fs16, "WriteStream", {
5342
+ Object.defineProperty(fs17, "WriteStream", {
5343
5343
  get: function() {
5344
5344
  return WriteStream;
5345
5345
  },
@@ -5350,7 +5350,7 @@ var require_graceful_fs = __commonJS({
5350
5350
  configurable: true
5351
5351
  });
5352
5352
  var FileReadStream = ReadStream;
5353
- Object.defineProperty(fs16, "FileReadStream", {
5353
+ Object.defineProperty(fs17, "FileReadStream", {
5354
5354
  get: function() {
5355
5355
  return FileReadStream;
5356
5356
  },
@@ -5361,7 +5361,7 @@ var require_graceful_fs = __commonJS({
5361
5361
  configurable: true
5362
5362
  });
5363
5363
  var FileWriteStream = WriteStream;
5364
- Object.defineProperty(fs16, "FileWriteStream", {
5364
+ Object.defineProperty(fs17, "FileWriteStream", {
5365
5365
  get: function() {
5366
5366
  return FileWriteStream;
5367
5367
  },
@@ -5410,13 +5410,13 @@ var require_graceful_fs = __commonJS({
5410
5410
  });
5411
5411
  }
5412
5412
  function createReadStream(path5, options) {
5413
- return new fs16.ReadStream(path5, options);
5413
+ return new fs17.ReadStream(path5, options);
5414
5414
  }
5415
5415
  function createWriteStream(path5, options) {
5416
- return new fs16.WriteStream(path5, options);
5416
+ return new fs17.WriteStream(path5, options);
5417
5417
  }
5418
- var fs$open = fs16.open;
5419
- fs16.open = open2;
5418
+ var fs$open = fs17.open;
5419
+ fs17.open = open2;
5420
5420
  function open2(path5, flags, mode, cb) {
5421
5421
  if (typeof mode === "function")
5422
5422
  cb = mode, mode = null;
@@ -5432,20 +5432,20 @@ var require_graceful_fs = __commonJS({
5432
5432
  });
5433
5433
  }
5434
5434
  }
5435
- return fs16;
5435
+ return fs17;
5436
5436
  }
5437
5437
  function enqueue(elem) {
5438
5438
  debug("ENQUEUE", elem[0].name, elem[1]);
5439
- fs15[gracefulQueue].push(elem);
5439
+ fs16[gracefulQueue].push(elem);
5440
5440
  retry();
5441
5441
  }
5442
5442
  var retryTimer;
5443
5443
  function resetQueue() {
5444
5444
  var now = Date.now();
5445
- for (var i = 0; i < fs15[gracefulQueue].length; ++i) {
5446
- if (fs15[gracefulQueue][i].length > 2) {
5447
- fs15[gracefulQueue][i][3] = now;
5448
- fs15[gracefulQueue][i][4] = now;
5445
+ for (var i = 0; i < fs16[gracefulQueue].length; ++i) {
5446
+ if (fs16[gracefulQueue][i].length > 2) {
5447
+ fs16[gracefulQueue][i][3] = now;
5448
+ fs16[gracefulQueue][i][4] = now;
5449
5449
  }
5450
5450
  }
5451
5451
  retry();
@@ -5453,9 +5453,9 @@ var require_graceful_fs = __commonJS({
5453
5453
  function retry() {
5454
5454
  clearTimeout(retryTimer);
5455
5455
  retryTimer = void 0;
5456
- if (fs15[gracefulQueue].length === 0)
5456
+ if (fs16[gracefulQueue].length === 0)
5457
5457
  return;
5458
- var elem = fs15[gracefulQueue].shift();
5458
+ var elem = fs16[gracefulQueue].shift();
5459
5459
  var fn = elem[0];
5460
5460
  var args = elem[1];
5461
5461
  var err = elem[2];
@@ -5477,7 +5477,7 @@ var require_graceful_fs = __commonJS({
5477
5477
  debug("RETRY", fn.name, args);
5478
5478
  fn.apply(null, args.concat([startTime]));
5479
5479
  } else {
5480
- fs15[gracefulQueue].push(elem);
5480
+ fs16[gracefulQueue].push(elem);
5481
5481
  }
5482
5482
  }
5483
5483
  if (retryTimer === void 0) {
@@ -5492,7 +5492,7 @@ var require_fs = __commonJS({
5492
5492
  "node_modules/fs-extra/lib/fs/index.js"(exports2) {
5493
5493
  "use strict";
5494
5494
  var u = require_universalify().fromCallback;
5495
- var fs15 = require_graceful_fs();
5495
+ var fs16 = require_graceful_fs();
5496
5496
  var api = [
5497
5497
  "access",
5498
5498
  "appendFile",
@@ -5533,26 +5533,26 @@ var require_fs = __commonJS({
5533
5533
  "utimes",
5534
5534
  "writeFile"
5535
5535
  ].filter((key) => {
5536
- return typeof fs15[key] === "function";
5536
+ return typeof fs16[key] === "function";
5537
5537
  });
5538
- Object.assign(exports2, fs15);
5538
+ Object.assign(exports2, fs16);
5539
5539
  api.forEach((method) => {
5540
- exports2[method] = u(fs15[method]);
5540
+ exports2[method] = u(fs16[method]);
5541
5541
  });
5542
5542
  exports2.exists = function(filename, callback) {
5543
5543
  if (typeof callback === "function") {
5544
- return fs15.exists(filename, callback);
5544
+ return fs16.exists(filename, callback);
5545
5545
  }
5546
5546
  return new Promise((resolve) => {
5547
- return fs15.exists(filename, resolve);
5547
+ return fs16.exists(filename, resolve);
5548
5548
  });
5549
5549
  };
5550
5550
  exports2.read = function(fd, buffer, offset, length, position, callback) {
5551
5551
  if (typeof callback === "function") {
5552
- return fs15.read(fd, buffer, offset, length, position, callback);
5552
+ return fs16.read(fd, buffer, offset, length, position, callback);
5553
5553
  }
5554
5554
  return new Promise((resolve, reject) => {
5555
- fs15.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
5555
+ fs16.read(fd, buffer, offset, length, position, (err, bytesRead, buffer2) => {
5556
5556
  if (err) return reject(err);
5557
5557
  resolve({ bytesRead, buffer: buffer2 });
5558
5558
  });
@@ -5560,10 +5560,10 @@ var require_fs = __commonJS({
5560
5560
  };
5561
5561
  exports2.write = function(fd, buffer, ...args) {
5562
5562
  if (typeof args[args.length - 1] === "function") {
5563
- return fs15.write(fd, buffer, ...args);
5563
+ return fs16.write(fd, buffer, ...args);
5564
5564
  }
5565
5565
  return new Promise((resolve, reject) => {
5566
- fs15.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
5566
+ fs16.write(fd, buffer, ...args, (err, bytesWritten, buffer2) => {
5567
5567
  if (err) return reject(err);
5568
5568
  resolve({ bytesWritten, buffer: buffer2 });
5569
5569
  });
@@ -5571,10 +5571,10 @@ var require_fs = __commonJS({
5571
5571
  };
5572
5572
  exports2.readv = function(fd, buffers, ...args) {
5573
5573
  if (typeof args[args.length - 1] === "function") {
5574
- return fs15.readv(fd, buffers, ...args);
5574
+ return fs16.readv(fd, buffers, ...args);
5575
5575
  }
5576
5576
  return new Promise((resolve, reject) => {
5577
- fs15.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
5577
+ fs16.readv(fd, buffers, ...args, (err, bytesRead, buffers2) => {
5578
5578
  if (err) return reject(err);
5579
5579
  resolve({ bytesRead, buffers: buffers2 });
5580
5580
  });
@@ -5582,17 +5582,17 @@ var require_fs = __commonJS({
5582
5582
  };
5583
5583
  exports2.writev = function(fd, buffers, ...args) {
5584
5584
  if (typeof args[args.length - 1] === "function") {
5585
- return fs15.writev(fd, buffers, ...args);
5585
+ return fs16.writev(fd, buffers, ...args);
5586
5586
  }
5587
5587
  return new Promise((resolve, reject) => {
5588
- fs15.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
5588
+ fs16.writev(fd, buffers, ...args, (err, bytesWritten, buffers2) => {
5589
5589
  if (err) return reject(err);
5590
5590
  resolve({ bytesWritten, buffers: buffers2 });
5591
5591
  });
5592
5592
  });
5593
5593
  };
5594
- if (typeof fs15.realpath.native === "function") {
5595
- exports2.realpath.native = u(fs15.realpath.native);
5594
+ if (typeof fs16.realpath.native === "function") {
5595
+ exports2.realpath.native = u(fs16.realpath.native);
5596
5596
  } else {
5597
5597
  process.emitWarning(
5598
5598
  "fs.realpath.native is not a function. Is fs being monkey-patched?",
@@ -5625,7 +5625,7 @@ var require_utils = __commonJS({
5625
5625
  var require_make_dir = __commonJS({
5626
5626
  "node_modules/fs-extra/lib/mkdirs/make-dir.js"(exports2, module2) {
5627
5627
  "use strict";
5628
- var fs15 = require_fs();
5628
+ var fs16 = require_fs();
5629
5629
  var { checkPath } = require_utils();
5630
5630
  var getMode = (options) => {
5631
5631
  const defaults2 = { mode: 511 };
@@ -5634,14 +5634,14 @@ var require_make_dir = __commonJS({
5634
5634
  };
5635
5635
  module2.exports.makeDir = async (dir, options) => {
5636
5636
  checkPath(dir);
5637
- return fs15.mkdir(dir, {
5637
+ return fs16.mkdir(dir, {
5638
5638
  mode: getMode(options),
5639
5639
  recursive: true
5640
5640
  });
5641
5641
  };
5642
5642
  module2.exports.makeDirSync = (dir, options) => {
5643
5643
  checkPath(dir);
5644
- return fs15.mkdirSync(dir, {
5644
+ return fs16.mkdirSync(dir, {
5645
5645
  mode: getMode(options),
5646
5646
  recursive: true
5647
5647
  });
@@ -5673,13 +5673,13 @@ var require_path_exists = __commonJS({
5673
5673
  "node_modules/fs-extra/lib/path-exists/index.js"(exports2, module2) {
5674
5674
  "use strict";
5675
5675
  var u = require_universalify().fromPromise;
5676
- var fs15 = require_fs();
5676
+ var fs16 = require_fs();
5677
5677
  function pathExists2(path5) {
5678
- return fs15.access(path5).then(() => true).catch(() => false);
5678
+ return fs16.access(path5).then(() => true).catch(() => false);
5679
5679
  }
5680
5680
  module2.exports = {
5681
5681
  pathExists: u(pathExists2),
5682
- pathExistsSync: fs15.existsSync
5682
+ pathExistsSync: fs16.existsSync
5683
5683
  };
5684
5684
  }
5685
5685
  });
@@ -5688,16 +5688,16 @@ var require_path_exists = __commonJS({
5688
5688
  var require_utimes = __commonJS({
5689
5689
  "node_modules/fs-extra/lib/util/utimes.js"(exports2, module2) {
5690
5690
  "use strict";
5691
- var fs15 = require_fs();
5691
+ var fs16 = require_fs();
5692
5692
  var u = require_universalify().fromPromise;
5693
5693
  async function utimesMillis(path5, atime, mtime) {
5694
- const fd = await fs15.open(path5, "r+");
5694
+ const fd = await fs16.open(path5, "r+");
5695
5695
  let closeErr = null;
5696
5696
  try {
5697
- await fs15.futimes(fd, atime, mtime);
5697
+ await fs16.futimes(fd, atime, mtime);
5698
5698
  } finally {
5699
5699
  try {
5700
- await fs15.close(fd);
5700
+ await fs16.close(fd);
5701
5701
  } catch (e) {
5702
5702
  closeErr = e;
5703
5703
  }
@@ -5707,9 +5707,9 @@ var require_utimes = __commonJS({
5707
5707
  }
5708
5708
  }
5709
5709
  function utimesMillisSync(path5, atime, mtime) {
5710
- const fd = fs15.openSync(path5, "r+");
5711
- fs15.futimesSync(fd, atime, mtime);
5712
- return fs15.closeSync(fd);
5710
+ const fd = fs16.openSync(path5, "r+");
5711
+ fs16.futimesSync(fd, atime, mtime);
5712
+ return fs16.closeSync(fd);
5713
5713
  }
5714
5714
  module2.exports = {
5715
5715
  utimesMillis: u(utimesMillis),
@@ -5722,11 +5722,11 @@ var require_utimes = __commonJS({
5722
5722
  var require_stat = __commonJS({
5723
5723
  "node_modules/fs-extra/lib/util/stat.js"(exports2, module2) {
5724
5724
  "use strict";
5725
- var fs15 = require_fs();
5725
+ var fs16 = require_fs();
5726
5726
  var path5 = require("path");
5727
5727
  var u = require_universalify().fromPromise;
5728
5728
  function getStats(src, dest, opts) {
5729
- const statFunc = opts.dereference ? (file) => fs15.stat(file, { bigint: true }) : (file) => fs15.lstat(file, { bigint: true });
5729
+ const statFunc = opts.dereference ? (file) => fs16.stat(file, { bigint: true }) : (file) => fs16.lstat(file, { bigint: true });
5730
5730
  return Promise.all([
5731
5731
  statFunc(src),
5732
5732
  statFunc(dest).catch((err) => {
@@ -5737,7 +5737,7 @@ var require_stat = __commonJS({
5737
5737
  }
5738
5738
  function getStatsSync(src, dest, opts) {
5739
5739
  let destStat;
5740
- const statFunc = opts.dereference ? (file) => fs15.statSync(file, { bigint: true }) : (file) => fs15.lstatSync(file, { bigint: true });
5740
+ const statFunc = opts.dereference ? (file) => fs16.statSync(file, { bigint: true }) : (file) => fs16.lstatSync(file, { bigint: true });
5741
5741
  const srcStat = statFunc(src);
5742
5742
  try {
5743
5743
  destStat = statFunc(dest);
@@ -5799,7 +5799,7 @@ var require_stat = __commonJS({
5799
5799
  if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
5800
5800
  let destStat;
5801
5801
  try {
5802
- destStat = await fs15.stat(destParent, { bigint: true });
5802
+ destStat = await fs16.stat(destParent, { bigint: true });
5803
5803
  } catch (err) {
5804
5804
  if (err.code === "ENOENT") return;
5805
5805
  throw err;
@@ -5815,7 +5815,7 @@ var require_stat = __commonJS({
5815
5815
  if (destParent === srcParent || destParent === path5.parse(destParent).root) return;
5816
5816
  let destStat;
5817
5817
  try {
5818
- destStat = fs15.statSync(destParent, { bigint: true });
5818
+ destStat = fs16.statSync(destParent, { bigint: true });
5819
5819
  } catch (err) {
5820
5820
  if (err.code === "ENOENT") return;
5821
5821
  throw err;
@@ -5882,7 +5882,7 @@ var require_async = __commonJS({
5882
5882
  var require_copy = __commonJS({
5883
5883
  "node_modules/fs-extra/lib/copy/copy.js"(exports2, module2) {
5884
5884
  "use strict";
5885
- var fs15 = require_fs();
5885
+ var fs16 = require_fs();
5886
5886
  var path5 = require("path");
5887
5887
  var { mkdirs } = require_mkdirs();
5888
5888
  var { pathExists: pathExists2 } = require_path_exists();
@@ -5918,7 +5918,7 @@ var require_copy = __commonJS({
5918
5918
  return opts.filter(src, dest);
5919
5919
  }
5920
5920
  async function getStatsAndPerformCopy(destStat, src, dest, opts) {
5921
- const statFn = opts.dereference ? fs15.stat : fs15.lstat;
5921
+ const statFn = opts.dereference ? fs16.stat : fs16.lstat;
5922
5922
  const srcStat = await statFn(src);
5923
5923
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
5924
5924
  if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -5930,7 +5930,7 @@ var require_copy = __commonJS({
5930
5930
  async function onFile(srcStat, destStat, src, dest, opts) {
5931
5931
  if (!destStat) return copyFile(srcStat, src, dest, opts);
5932
5932
  if (opts.overwrite) {
5933
- await fs15.unlink(dest);
5933
+ await fs16.unlink(dest);
5934
5934
  return copyFile(srcStat, src, dest, opts);
5935
5935
  }
5936
5936
  if (opts.errorOnExist) {
@@ -5938,27 +5938,27 @@ var require_copy = __commonJS({
5938
5938
  }
5939
5939
  }
5940
5940
  async function copyFile(srcStat, src, dest, opts) {
5941
- await fs15.copyFile(src, dest);
5941
+ await fs16.copyFile(src, dest);
5942
5942
  if (opts.preserveTimestamps) {
5943
5943
  if (fileIsNotWritable(srcStat.mode)) {
5944
5944
  await makeFileWritable(dest, srcStat.mode);
5945
5945
  }
5946
- const updatedSrcStat = await fs15.stat(src);
5946
+ const updatedSrcStat = await fs16.stat(src);
5947
5947
  await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
5948
5948
  }
5949
- return fs15.chmod(dest, srcStat.mode);
5949
+ return fs16.chmod(dest, srcStat.mode);
5950
5950
  }
5951
5951
  function fileIsNotWritable(srcMode) {
5952
5952
  return (srcMode & 128) === 0;
5953
5953
  }
5954
5954
  function makeFileWritable(dest, srcMode) {
5955
- return fs15.chmod(dest, srcMode | 128);
5955
+ return fs16.chmod(dest, srcMode | 128);
5956
5956
  }
5957
5957
  async function onDir(srcStat, destStat, src, dest, opts) {
5958
5958
  if (!destStat) {
5959
- await fs15.mkdir(dest);
5959
+ await fs16.mkdir(dest);
5960
5960
  }
5961
- await asyncIteratorConcurrentProcess(await fs15.opendir(src), async (item) => {
5961
+ await asyncIteratorConcurrentProcess(await fs16.opendir(src), async (item) => {
5962
5962
  const srcItem = path5.join(src, item.name);
5963
5963
  const destItem = path5.join(dest, item.name);
5964
5964
  const include = await runFilter(srcItem, destItem, opts);
@@ -5968,22 +5968,22 @@ var require_copy = __commonJS({
5968
5968
  }
5969
5969
  });
5970
5970
  if (!destStat) {
5971
- await fs15.chmod(dest, srcStat.mode);
5971
+ await fs16.chmod(dest, srcStat.mode);
5972
5972
  }
5973
5973
  }
5974
5974
  async function onLink(destStat, src, dest, opts) {
5975
- let resolvedSrc = await fs15.readlink(src);
5975
+ let resolvedSrc = await fs16.readlink(src);
5976
5976
  if (opts.dereference) {
5977
5977
  resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
5978
5978
  }
5979
5979
  if (!destStat) {
5980
- return fs15.symlink(resolvedSrc, dest);
5980
+ return fs16.symlink(resolvedSrc, dest);
5981
5981
  }
5982
5982
  let resolvedDest = null;
5983
5983
  try {
5984
- resolvedDest = await fs15.readlink(dest);
5984
+ resolvedDest = await fs16.readlink(dest);
5985
5985
  } catch (e) {
5986
- if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs15.symlink(resolvedSrc, dest);
5986
+ if (e.code === "EINVAL" || e.code === "UNKNOWN") return fs16.symlink(resolvedSrc, dest);
5987
5987
  throw e;
5988
5988
  }
5989
5989
  if (opts.dereference) {
@@ -5997,8 +5997,8 @@ var require_copy = __commonJS({
5997
5997
  throw new Error(`Cannot overwrite '${resolvedDest}' with '${resolvedSrc}'.`);
5998
5998
  }
5999
5999
  }
6000
- await fs15.unlink(dest);
6001
- return fs15.symlink(resolvedSrc, dest);
6000
+ await fs16.unlink(dest);
6001
+ return fs16.symlink(resolvedSrc, dest);
6002
6002
  }
6003
6003
  module2.exports = copy;
6004
6004
  }
@@ -6008,7 +6008,7 @@ var require_copy = __commonJS({
6008
6008
  var require_copy_sync = __commonJS({
6009
6009
  "node_modules/fs-extra/lib/copy/copy-sync.js"(exports2, module2) {
6010
6010
  "use strict";
6011
- var fs15 = require_graceful_fs();
6011
+ var fs16 = require_graceful_fs();
6012
6012
  var path5 = require("path");
6013
6013
  var mkdirsSync = require_mkdirs().mkdirsSync;
6014
6014
  var utimesMillisSync = require_utimes().utimesMillisSync;
@@ -6031,11 +6031,11 @@ var require_copy_sync = __commonJS({
6031
6031
  stat.checkParentPathsSync(src, srcStat, dest, "copy");
6032
6032
  if (opts.filter && !opts.filter(src, dest)) return;
6033
6033
  const destParent = path5.dirname(dest);
6034
- if (!fs15.existsSync(destParent)) mkdirsSync(destParent);
6034
+ if (!fs16.existsSync(destParent)) mkdirsSync(destParent);
6035
6035
  return getStats(destStat, src, dest, opts);
6036
6036
  }
6037
6037
  function getStats(destStat, src, dest, opts) {
6038
- const statSync = opts.dereference ? fs15.statSync : fs15.lstatSync;
6038
+ const statSync = opts.dereference ? fs16.statSync : fs16.lstatSync;
6039
6039
  const srcStat = statSync(src);
6040
6040
  if (srcStat.isDirectory()) return onDir(srcStat, destStat, src, dest, opts);
6041
6041
  else if (srcStat.isFile() || srcStat.isCharacterDevice() || srcStat.isBlockDevice()) return onFile(srcStat, destStat, src, dest, opts);
@@ -6050,14 +6050,14 @@ var require_copy_sync = __commonJS({
6050
6050
  }
6051
6051
  function mayCopyFile(srcStat, src, dest, opts) {
6052
6052
  if (opts.overwrite) {
6053
- fs15.unlinkSync(dest);
6053
+ fs16.unlinkSync(dest);
6054
6054
  return copyFile(srcStat, src, dest, opts);
6055
6055
  } else if (opts.errorOnExist) {
6056
6056
  throw new Error(`'${dest}' already exists`);
6057
6057
  }
6058
6058
  }
6059
6059
  function copyFile(srcStat, src, dest, opts) {
6060
- fs15.copyFileSync(src, dest);
6060
+ fs16.copyFileSync(src, dest);
6061
6061
  if (opts.preserveTimestamps) handleTimestamps(srcStat.mode, src, dest);
6062
6062
  return setDestMode(dest, srcStat.mode);
6063
6063
  }
@@ -6072,10 +6072,10 @@ var require_copy_sync = __commonJS({
6072
6072
  return setDestMode(dest, srcMode | 128);
6073
6073
  }
6074
6074
  function setDestMode(dest, srcMode) {
6075
- return fs15.chmodSync(dest, srcMode);
6075
+ return fs16.chmodSync(dest, srcMode);
6076
6076
  }
6077
6077
  function setDestTimestamps(src, dest) {
6078
- const updatedSrcStat = fs15.statSync(src);
6078
+ const updatedSrcStat = fs16.statSync(src);
6079
6079
  return utimesMillisSync(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
6080
6080
  }
6081
6081
  function onDir(srcStat, destStat, src, dest, opts) {
@@ -6083,12 +6083,12 @@ var require_copy_sync = __commonJS({
6083
6083
  return copyDir(src, dest, opts);
6084
6084
  }
6085
6085
  function mkDirAndCopy(srcMode, src, dest, opts) {
6086
- fs15.mkdirSync(dest);
6086
+ fs16.mkdirSync(dest);
6087
6087
  copyDir(src, dest, opts);
6088
6088
  return setDestMode(dest, srcMode);
6089
6089
  }
6090
6090
  function copyDir(src, dest, opts) {
6091
- const dir = fs15.opendirSync(src);
6091
+ const dir = fs16.opendirSync(src);
6092
6092
  try {
6093
6093
  let dirent;
6094
6094
  while ((dirent = dir.readSync()) !== null) {
@@ -6106,18 +6106,18 @@ var require_copy_sync = __commonJS({
6106
6106
  return getStats(destStat, srcItem, destItem, opts);
6107
6107
  }
6108
6108
  function onLink(destStat, src, dest, opts) {
6109
- let resolvedSrc = fs15.readlinkSync(src);
6109
+ let resolvedSrc = fs16.readlinkSync(src);
6110
6110
  if (opts.dereference) {
6111
6111
  resolvedSrc = path5.resolve(process.cwd(), resolvedSrc);
6112
6112
  }
6113
6113
  if (!destStat) {
6114
- return fs15.symlinkSync(resolvedSrc, dest);
6114
+ return fs16.symlinkSync(resolvedSrc, dest);
6115
6115
  } else {
6116
6116
  let resolvedDest;
6117
6117
  try {
6118
- resolvedDest = fs15.readlinkSync(dest);
6118
+ resolvedDest = fs16.readlinkSync(dest);
6119
6119
  } catch (err) {
6120
- if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs15.symlinkSync(resolvedSrc, dest);
6120
+ if (err.code === "EINVAL" || err.code === "UNKNOWN") return fs16.symlinkSync(resolvedSrc, dest);
6121
6121
  throw err;
6122
6122
  }
6123
6123
  if (opts.dereference) {
@@ -6135,8 +6135,8 @@ var require_copy_sync = __commonJS({
6135
6135
  }
6136
6136
  }
6137
6137
  function copyLink(resolvedSrc, dest) {
6138
- fs15.unlinkSync(dest);
6139
- return fs15.symlinkSync(resolvedSrc, dest);
6138
+ fs16.unlinkSync(dest);
6139
+ return fs16.symlinkSync(resolvedSrc, dest);
6140
6140
  }
6141
6141
  module2.exports = copySync;
6142
6142
  }
@@ -6158,13 +6158,13 @@ var require_copy2 = __commonJS({
6158
6158
  var require_remove = __commonJS({
6159
6159
  "node_modules/fs-extra/lib/remove/index.js"(exports2, module2) {
6160
6160
  "use strict";
6161
- var fs15 = require_graceful_fs();
6161
+ var fs16 = require_graceful_fs();
6162
6162
  var u = require_universalify().fromCallback;
6163
6163
  function remove2(path5, callback) {
6164
- fs15.rm(path5, { recursive: true, force: true }, callback);
6164
+ fs16.rm(path5, { recursive: true, force: true }, callback);
6165
6165
  }
6166
6166
  function removeSync(path5) {
6167
- fs15.rmSync(path5, { recursive: true, force: true });
6167
+ fs16.rmSync(path5, { recursive: true, force: true });
6168
6168
  }
6169
6169
  module2.exports = {
6170
6170
  remove: u(remove2),
@@ -6178,14 +6178,14 @@ var require_empty = __commonJS({
6178
6178
  "node_modules/fs-extra/lib/empty/index.js"(exports2, module2) {
6179
6179
  "use strict";
6180
6180
  var u = require_universalify().fromPromise;
6181
- var fs15 = require_fs();
6181
+ var fs16 = require_fs();
6182
6182
  var path5 = require("path");
6183
6183
  var mkdir = require_mkdirs();
6184
6184
  var remove2 = require_remove();
6185
6185
  var emptyDir = u(async function emptyDir2(dir) {
6186
6186
  let items;
6187
6187
  try {
6188
- items = await fs15.readdir(dir);
6188
+ items = await fs16.readdir(dir);
6189
6189
  } catch {
6190
6190
  return mkdir.mkdirs(dir);
6191
6191
  }
@@ -6194,7 +6194,7 @@ var require_empty = __commonJS({
6194
6194
  function emptyDirSync(dir) {
6195
6195
  let items;
6196
6196
  try {
6197
- items = fs15.readdirSync(dir);
6197
+ items = fs16.readdirSync(dir);
6198
6198
  } catch {
6199
6199
  return mkdir.mkdirsSync(dir);
6200
6200
  }
@@ -6218,51 +6218,51 @@ var require_file = __commonJS({
6218
6218
  "use strict";
6219
6219
  var u = require_universalify().fromPromise;
6220
6220
  var path5 = require("path");
6221
- var fs15 = require_fs();
6221
+ var fs16 = require_fs();
6222
6222
  var mkdir = require_mkdirs();
6223
6223
  async function createFile(file) {
6224
6224
  let stats;
6225
6225
  try {
6226
- stats = await fs15.stat(file);
6226
+ stats = await fs16.stat(file);
6227
6227
  } catch {
6228
6228
  }
6229
6229
  if (stats && stats.isFile()) return;
6230
6230
  const dir = path5.dirname(file);
6231
6231
  let dirStats = null;
6232
6232
  try {
6233
- dirStats = await fs15.stat(dir);
6233
+ dirStats = await fs16.stat(dir);
6234
6234
  } catch (err) {
6235
6235
  if (err.code === "ENOENT") {
6236
6236
  await mkdir.mkdirs(dir);
6237
- await fs15.writeFile(file, "");
6237
+ await fs16.writeFile(file, "");
6238
6238
  return;
6239
6239
  } else {
6240
6240
  throw err;
6241
6241
  }
6242
6242
  }
6243
6243
  if (dirStats.isDirectory()) {
6244
- await fs15.writeFile(file, "");
6244
+ await fs16.writeFile(file, "");
6245
6245
  } else {
6246
- await fs15.readdir(dir);
6246
+ await fs16.readdir(dir);
6247
6247
  }
6248
6248
  }
6249
6249
  function createFileSync(file) {
6250
6250
  let stats;
6251
6251
  try {
6252
- stats = fs15.statSync(file);
6252
+ stats = fs16.statSync(file);
6253
6253
  } catch {
6254
6254
  }
6255
6255
  if (stats && stats.isFile()) return;
6256
6256
  const dir = path5.dirname(file);
6257
6257
  try {
6258
- if (!fs15.statSync(dir).isDirectory()) {
6259
- fs15.readdirSync(dir);
6258
+ if (!fs16.statSync(dir).isDirectory()) {
6259
+ fs16.readdirSync(dir);
6260
6260
  }
6261
6261
  } catch (err) {
6262
6262
  if (err && err.code === "ENOENT") mkdir.mkdirsSync(dir);
6263
6263
  else throw err;
6264
6264
  }
6265
- fs15.writeFileSync(file, "");
6265
+ fs16.writeFileSync(file, "");
6266
6266
  }
6267
6267
  module2.exports = {
6268
6268
  createFile: u(createFile),
@@ -6277,19 +6277,19 @@ var require_link = __commonJS({
6277
6277
  "use strict";
6278
6278
  var u = require_universalify().fromPromise;
6279
6279
  var path5 = require("path");
6280
- var fs15 = require_fs();
6280
+ var fs16 = require_fs();
6281
6281
  var mkdir = require_mkdirs();
6282
6282
  var { pathExists: pathExists2 } = require_path_exists();
6283
6283
  var { areIdentical } = require_stat();
6284
6284
  async function createLink(srcpath, dstpath) {
6285
6285
  let dstStat;
6286
6286
  try {
6287
- dstStat = await fs15.lstat(dstpath);
6287
+ dstStat = await fs16.lstat(dstpath);
6288
6288
  } catch {
6289
6289
  }
6290
6290
  let srcStat;
6291
6291
  try {
6292
- srcStat = await fs15.lstat(srcpath);
6292
+ srcStat = await fs16.lstat(srcpath);
6293
6293
  } catch (err) {
6294
6294
  err.message = err.message.replace("lstat", "ensureLink");
6295
6295
  throw err;
@@ -6300,26 +6300,26 @@ var require_link = __commonJS({
6300
6300
  if (!dirExists) {
6301
6301
  await mkdir.mkdirs(dir);
6302
6302
  }
6303
- await fs15.link(srcpath, dstpath);
6303
+ await fs16.link(srcpath, dstpath);
6304
6304
  }
6305
6305
  function createLinkSync(srcpath, dstpath) {
6306
6306
  let dstStat;
6307
6307
  try {
6308
- dstStat = fs15.lstatSync(dstpath);
6308
+ dstStat = fs16.lstatSync(dstpath);
6309
6309
  } catch {
6310
6310
  }
6311
6311
  try {
6312
- const srcStat = fs15.lstatSync(srcpath);
6312
+ const srcStat = fs16.lstatSync(srcpath);
6313
6313
  if (dstStat && areIdentical(srcStat, dstStat)) return;
6314
6314
  } catch (err) {
6315
6315
  err.message = err.message.replace("lstat", "ensureLink");
6316
6316
  throw err;
6317
6317
  }
6318
6318
  const dir = path5.dirname(dstpath);
6319
- const dirExists = fs15.existsSync(dir);
6320
- if (dirExists) return fs15.linkSync(srcpath, dstpath);
6319
+ const dirExists = fs16.existsSync(dir);
6320
+ if (dirExists) return fs16.linkSync(srcpath, dstpath);
6321
6321
  mkdir.mkdirsSync(dir);
6322
- return fs15.linkSync(srcpath, dstpath);
6322
+ return fs16.linkSync(srcpath, dstpath);
6323
6323
  }
6324
6324
  module2.exports = {
6325
6325
  createLink: u(createLink),
@@ -6333,13 +6333,13 @@ var require_symlink_paths = __commonJS({
6333
6333
  "node_modules/fs-extra/lib/ensure/symlink-paths.js"(exports2, module2) {
6334
6334
  "use strict";
6335
6335
  var path5 = require("path");
6336
- var fs15 = require_fs();
6336
+ var fs16 = require_fs();
6337
6337
  var { pathExists: pathExists2 } = require_path_exists();
6338
6338
  var u = require_universalify().fromPromise;
6339
6339
  async function symlinkPaths(srcpath, dstpath) {
6340
6340
  if (path5.isAbsolute(srcpath)) {
6341
6341
  try {
6342
- await fs15.lstat(srcpath);
6342
+ await fs16.lstat(srcpath);
6343
6343
  } catch (err) {
6344
6344
  err.message = err.message.replace("lstat", "ensureSymlink");
6345
6345
  throw err;
@@ -6359,7 +6359,7 @@ var require_symlink_paths = __commonJS({
6359
6359
  };
6360
6360
  }
6361
6361
  try {
6362
- await fs15.lstat(srcpath);
6362
+ await fs16.lstat(srcpath);
6363
6363
  } catch (err) {
6364
6364
  err.message = err.message.replace("lstat", "ensureSymlink");
6365
6365
  throw err;
@@ -6371,7 +6371,7 @@ var require_symlink_paths = __commonJS({
6371
6371
  }
6372
6372
  function symlinkPathsSync(srcpath, dstpath) {
6373
6373
  if (path5.isAbsolute(srcpath)) {
6374
- const exists2 = fs15.existsSync(srcpath);
6374
+ const exists2 = fs16.existsSync(srcpath);
6375
6375
  if (!exists2) throw new Error("absolute srcpath does not exist");
6376
6376
  return {
6377
6377
  toCwd: srcpath,
@@ -6380,14 +6380,14 @@ var require_symlink_paths = __commonJS({
6380
6380
  }
6381
6381
  const dstdir = path5.dirname(dstpath);
6382
6382
  const relativeToDst = path5.join(dstdir, srcpath);
6383
- const exists = fs15.existsSync(relativeToDst);
6383
+ const exists = fs16.existsSync(relativeToDst);
6384
6384
  if (exists) {
6385
6385
  return {
6386
6386
  toCwd: relativeToDst,
6387
6387
  toDst: srcpath
6388
6388
  };
6389
6389
  }
6390
- const srcExists = fs15.existsSync(srcpath);
6390
+ const srcExists = fs16.existsSync(srcpath);
6391
6391
  if (!srcExists) throw new Error("relative srcpath does not exist");
6392
6392
  return {
6393
6393
  toCwd: srcpath,
@@ -6405,13 +6405,13 @@ var require_symlink_paths = __commonJS({
6405
6405
  var require_symlink_type = __commonJS({
6406
6406
  "node_modules/fs-extra/lib/ensure/symlink-type.js"(exports2, module2) {
6407
6407
  "use strict";
6408
- var fs15 = require_fs();
6408
+ var fs16 = require_fs();
6409
6409
  var u = require_universalify().fromPromise;
6410
6410
  async function symlinkType(srcpath, type) {
6411
6411
  if (type) return type;
6412
6412
  let stats;
6413
6413
  try {
6414
- stats = await fs15.lstat(srcpath);
6414
+ stats = await fs16.lstat(srcpath);
6415
6415
  } catch {
6416
6416
  return "file";
6417
6417
  }
@@ -6421,7 +6421,7 @@ var require_symlink_type = __commonJS({
6421
6421
  if (type) return type;
6422
6422
  let stats;
6423
6423
  try {
6424
- stats = fs15.lstatSync(srcpath);
6424
+ stats = fs16.lstatSync(srcpath);
6425
6425
  } catch {
6426
6426
  return "file";
6427
6427
  }
@@ -6440,7 +6440,7 @@ var require_symlink = __commonJS({
6440
6440
  "use strict";
6441
6441
  var u = require_universalify().fromPromise;
6442
6442
  var path5 = require("path");
6443
- var fs15 = require_fs();
6443
+ var fs16 = require_fs();
6444
6444
  var { mkdirs, mkdirsSync } = require_mkdirs();
6445
6445
  var { symlinkPaths, symlinkPathsSync } = require_symlink_paths();
6446
6446
  var { symlinkType, symlinkTypeSync } = require_symlink_type();
@@ -6449,44 +6449,44 @@ var require_symlink = __commonJS({
6449
6449
  async function createSymlink(srcpath, dstpath, type) {
6450
6450
  let stats;
6451
6451
  try {
6452
- stats = await fs15.lstat(dstpath);
6452
+ stats = await fs16.lstat(dstpath);
6453
6453
  } catch {
6454
6454
  }
6455
6455
  if (stats && stats.isSymbolicLink()) {
6456
6456
  const [srcStat, dstStat] = await Promise.all([
6457
- fs15.stat(srcpath),
6458
- fs15.stat(dstpath)
6457
+ fs16.stat(srcpath),
6458
+ fs16.stat(dstpath)
6459
6459
  ]);
6460
6460
  if (areIdentical(srcStat, dstStat)) return;
6461
6461
  }
6462
- const relative = await symlinkPaths(srcpath, dstpath);
6463
- srcpath = relative.toDst;
6464
- const toType = await symlinkType(relative.toCwd, type);
6462
+ const relative2 = await symlinkPaths(srcpath, dstpath);
6463
+ srcpath = relative2.toDst;
6464
+ const toType = await symlinkType(relative2.toCwd, type);
6465
6465
  const dir = path5.dirname(dstpath);
6466
6466
  if (!await pathExists2(dir)) {
6467
6467
  await mkdirs(dir);
6468
6468
  }
6469
- return fs15.symlink(srcpath, dstpath, toType);
6469
+ return fs16.symlink(srcpath, dstpath, toType);
6470
6470
  }
6471
6471
  function createSymlinkSync(srcpath, dstpath, type) {
6472
6472
  let stats;
6473
6473
  try {
6474
- stats = fs15.lstatSync(dstpath);
6474
+ stats = fs16.lstatSync(dstpath);
6475
6475
  } catch {
6476
6476
  }
6477
6477
  if (stats && stats.isSymbolicLink()) {
6478
- const srcStat = fs15.statSync(srcpath);
6479
- const dstStat = fs15.statSync(dstpath);
6478
+ const srcStat = fs16.statSync(srcpath);
6479
+ const dstStat = fs16.statSync(dstpath);
6480
6480
  if (areIdentical(srcStat, dstStat)) return;
6481
6481
  }
6482
- const relative = symlinkPathsSync(srcpath, dstpath);
6483
- srcpath = relative.toDst;
6484
- type = symlinkTypeSync(relative.toCwd, type);
6482
+ const relative2 = symlinkPathsSync(srcpath, dstpath);
6483
+ srcpath = relative2.toDst;
6484
+ type = symlinkTypeSync(relative2.toCwd, type);
6485
6485
  const dir = path5.dirname(dstpath);
6486
- const exists = fs15.existsSync(dir);
6487
- if (exists) return fs15.symlinkSync(srcpath, dstpath, type);
6486
+ const exists = fs16.existsSync(dir);
6487
+ if (exists) return fs16.symlinkSync(srcpath, dstpath, type);
6488
6488
  mkdirsSync(dir);
6489
- return fs15.symlinkSync(srcpath, dstpath, type);
6489
+ return fs16.symlinkSync(srcpath, dstpath, type);
6490
6490
  }
6491
6491
  module2.exports = {
6492
6492
  createSymlink: u(createSymlink),
@@ -6555,9 +6555,9 @@ var require_jsonfile = __commonJS({
6555
6555
  if (typeof options === "string") {
6556
6556
  options = { encoding: options };
6557
6557
  }
6558
- const fs15 = options.fs || _fs;
6558
+ const fs16 = options.fs || _fs;
6559
6559
  const shouldThrow = "throws" in options ? options.throws : true;
6560
- let data = await universalify.fromCallback(fs15.readFile)(file, options);
6560
+ let data = await universalify.fromCallback(fs16.readFile)(file, options);
6561
6561
  data = stripBom(data);
6562
6562
  let obj;
6563
6563
  try {
@@ -6577,10 +6577,10 @@ var require_jsonfile = __commonJS({
6577
6577
  if (typeof options === "string") {
6578
6578
  options = { encoding: options };
6579
6579
  }
6580
- const fs15 = options.fs || _fs;
6580
+ const fs16 = options.fs || _fs;
6581
6581
  const shouldThrow = "throws" in options ? options.throws : true;
6582
6582
  try {
6583
- let content = fs15.readFileSync(file, options);
6583
+ let content = fs16.readFileSync(file, options);
6584
6584
  content = stripBom(content);
6585
6585
  return JSON.parse(content, options.reviver);
6586
6586
  } catch (err) {
@@ -6593,15 +6593,15 @@ var require_jsonfile = __commonJS({
6593
6593
  }
6594
6594
  }
6595
6595
  async function _writeFile(file, obj, options = {}) {
6596
- const fs15 = options.fs || _fs;
6596
+ const fs16 = options.fs || _fs;
6597
6597
  const str = stringify2(obj, options);
6598
- await universalify.fromCallback(fs15.writeFile)(file, str, options);
6598
+ await universalify.fromCallback(fs16.writeFile)(file, str, options);
6599
6599
  }
6600
6600
  var writeFile2 = universalify.fromPromise(_writeFile);
6601
6601
  function writeFileSync2(file, obj, options = {}) {
6602
- const fs15 = options.fs || _fs;
6602
+ const fs16 = options.fs || _fs;
6603
6603
  const str = stringify2(obj, options);
6604
- return fs15.writeFileSync(file, str, options);
6604
+ return fs16.writeFileSync(file, str, options);
6605
6605
  }
6606
6606
  module2.exports = {
6607
6607
  readFile: readFile2,
@@ -6632,7 +6632,7 @@ var require_output_file = __commonJS({
6632
6632
  "node_modules/fs-extra/lib/output-file/index.js"(exports2, module2) {
6633
6633
  "use strict";
6634
6634
  var u = require_universalify().fromPromise;
6635
- var fs15 = require_fs();
6635
+ var fs16 = require_fs();
6636
6636
  var path5 = require("path");
6637
6637
  var mkdir = require_mkdirs();
6638
6638
  var pathExists2 = require_path_exists().pathExists;
@@ -6641,14 +6641,14 @@ var require_output_file = __commonJS({
6641
6641
  if (!await pathExists2(dir)) {
6642
6642
  await mkdir.mkdirs(dir);
6643
6643
  }
6644
- return fs15.writeFile(file, data, encoding);
6644
+ return fs16.writeFile(file, data, encoding);
6645
6645
  }
6646
6646
  function outputFileSync(file, ...args) {
6647
6647
  const dir = path5.dirname(file);
6648
- if (!fs15.existsSync(dir)) {
6648
+ if (!fs16.existsSync(dir)) {
6649
6649
  mkdir.mkdirsSync(dir);
6650
6650
  }
6651
- fs15.writeFileSync(file, ...args);
6651
+ fs16.writeFileSync(file, ...args);
6652
6652
  }
6653
6653
  module2.exports = {
6654
6654
  outputFile: u(outputFile),
@@ -6707,7 +6707,7 @@ var require_json = __commonJS({
6707
6707
  var require_move = __commonJS({
6708
6708
  "node_modules/fs-extra/lib/move/move.js"(exports2, module2) {
6709
6709
  "use strict";
6710
- var fs15 = require_fs();
6710
+ var fs16 = require_fs();
6711
6711
  var path5 = require("path");
6712
6712
  var { copy } = require_copy2();
6713
6713
  var { remove: remove2 } = require_remove();
@@ -6734,7 +6734,7 @@ var require_move = __commonJS({
6734
6734
  }
6735
6735
  }
6736
6736
  try {
6737
- await fs15.rename(src, dest);
6737
+ await fs16.rename(src, dest);
6738
6738
  } catch (err) {
6739
6739
  if (err.code !== "EXDEV") {
6740
6740
  throw err;
@@ -6759,7 +6759,7 @@ var require_move = __commonJS({
6759
6759
  var require_move_sync = __commonJS({
6760
6760
  "node_modules/fs-extra/lib/move/move-sync.js"(exports2, module2) {
6761
6761
  "use strict";
6762
- var fs15 = require_graceful_fs();
6762
+ var fs16 = require_graceful_fs();
6763
6763
  var path5 = require("path");
6764
6764
  var copySync = require_copy2().copySync;
6765
6765
  var removeSync = require_remove().removeSync;
@@ -6784,12 +6784,12 @@ var require_move_sync = __commonJS({
6784
6784
  removeSync(dest);
6785
6785
  return rename(src, dest, overwrite);
6786
6786
  }
6787
- if (fs15.existsSync(dest)) throw new Error("dest already exists.");
6787
+ if (fs16.existsSync(dest)) throw new Error("dest already exists.");
6788
6788
  return rename(src, dest, overwrite);
6789
6789
  }
6790
6790
  function rename(src, dest, overwrite) {
6791
6791
  try {
6792
- fs15.renameSync(src, dest);
6792
+ fs16.renameSync(src, dest);
6793
6793
  } catch (err) {
6794
6794
  if (err.code !== "EXDEV") throw err;
6795
6795
  return moveAcrossDevice(src, dest, overwrite);
@@ -19200,7 +19200,7 @@ var require_buffer_list = __commonJS({
19200
19200
  }
19201
19201
  }, {
19202
19202
  key: "join",
19203
- value: function join13(s) {
19203
+ value: function join14(s) {
19204
19204
  if (this.length === 0) return "";
19205
19205
  var p = this.head;
19206
19206
  var ret = "" + p.data;
@@ -28077,10 +28077,10 @@ var require_lib2 = __commonJS({
28077
28077
  exports2.analyse = analyse;
28078
28078
  var detectFile = (filepath, opts = {}) => new Promise((resolve, reject) => {
28079
28079
  let fd;
28080
- const fs15 = (0, node_1.default)();
28080
+ const fs16 = (0, node_1.default)();
28081
28081
  const handler = (err, buffer) => {
28082
28082
  if (fd) {
28083
- fs15.closeSync(fd);
28083
+ fs16.closeSync(fd);
28084
28084
  }
28085
28085
  if (err) {
28086
28086
  reject(err);
@@ -28092,9 +28092,9 @@ var require_lib2 = __commonJS({
28092
28092
  };
28093
28093
  const sampleSize = (opts === null || opts === void 0 ? void 0 : opts.sampleSize) || 0;
28094
28094
  if (sampleSize > 0) {
28095
- fd = fs15.openSync(filepath, "r");
28095
+ fd = fs16.openSync(filepath, "r");
28096
28096
  let sample = Buffer.allocUnsafe(sampleSize);
28097
- fs15.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
28097
+ fs16.read(fd, sample, 0, sampleSize, opts.offset, (err, bytesRead) => {
28098
28098
  if (err) {
28099
28099
  handler(err, null);
28100
28100
  } else {
@@ -28106,22 +28106,22 @@ var require_lib2 = __commonJS({
28106
28106
  });
28107
28107
  return;
28108
28108
  }
28109
- fs15.readFile(filepath, handler);
28109
+ fs16.readFile(filepath, handler);
28110
28110
  });
28111
28111
  exports2.detectFile = detectFile;
28112
28112
  var detectFileSync = (filepath, opts = {}) => {
28113
- const fs15 = (0, node_1.default)();
28113
+ const fs16 = (0, node_1.default)();
28114
28114
  if (opts && opts.sampleSize) {
28115
- const fd = fs15.openSync(filepath, "r");
28115
+ const fd = fs16.openSync(filepath, "r");
28116
28116
  let sample = Buffer.allocUnsafe(opts.sampleSize);
28117
- const bytesRead = fs15.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
28117
+ const bytesRead = fs16.readSync(fd, sample, 0, opts.sampleSize, opts.offset);
28118
28118
  if (bytesRead < opts.sampleSize) {
28119
28119
  sample = sample.subarray(0, bytesRead);
28120
28120
  }
28121
- fs15.closeSync(fd);
28121
+ fs16.closeSync(fd);
28122
28122
  return (0, exports2.detect)(sample);
28123
28123
  }
28124
- return (0, exports2.detect)(fs15.readFileSync(filepath));
28124
+ return (0, exports2.detect)(fs16.readFileSync(filepath));
28125
28125
  };
28126
28126
  exports2.detectFileSync = detectFileSync;
28127
28127
  exports2.default = {
@@ -52396,7 +52396,7 @@ var require_msal_node = __commonJS({
52396
52396
  var crypto5 = require("crypto");
52397
52397
  var msalCommon = require_lib6();
52398
52398
  var jwt2 = require_jsonwebtoken();
52399
- var fs15 = require("fs");
52399
+ var fs16 = require("fs");
52400
52400
  var path5 = require("path");
52401
52401
  var Serializer = class {
52402
52402
  /**
@@ -62095,7 +62095,7 @@ Headers: ${JSON.stringify(headers)}`
62095
62095
  if (!identityEndpoint || !imdsEndpoint) {
62096
62096
  const fileDetectionPath = AZURE_ARC_FILE_DETECTION[process.platform];
62097
62097
  try {
62098
- fs15.accessSync(fileDetectionPath, fs15.constants.F_OK | fs15.constants.R_OK);
62098
+ fs16.accessSync(fileDetectionPath, fs16.constants.F_OK | fs16.constants.R_OK);
62099
62099
  identityEndpoint = DEFAULT_AZURE_ARC_IDENTITY_ENDPOINT;
62100
62100
  imdsEndpoint = HIMDS_EXECUTABLE_HELPER_STRING;
62101
62101
  } catch (err) {
@@ -62207,7 +62207,7 @@ Headers: ${JSON.stringify(headers)}`
62207
62207
  }
62208
62208
  let secretFileSize;
62209
62209
  try {
62210
- secretFileSize = await fs15.statSync(secretFilePath).size;
62210
+ secretFileSize = await fs16.statSync(secretFilePath).size;
62211
62211
  } catch (e) {
62212
62212
  throw createManagedIdentityError(unableToReadSecretFile);
62213
62213
  }
@@ -62216,7 +62216,7 @@ Headers: ${JSON.stringify(headers)}`
62216
62216
  }
62217
62217
  let secret;
62218
62218
  try {
62219
- secret = fs15.readFileSync(secretFilePath, EncodingTypes.UTF8);
62219
+ secret = fs16.readFileSync(secretFilePath, EncodingTypes.UTF8);
62220
62220
  } catch (e) {
62221
62221
  throw createManagedIdentityError(unableToReadSecretFile);
62222
62222
  }
@@ -91571,11 +91571,11 @@ var init_js_joda_esm = __esm({
91571
91571
  })(TemporalAdjuster);
91572
91572
  RelativeDayOfWeek = (function(_TemporalAdjuster3) {
91573
91573
  _inheritsLoose(RelativeDayOfWeek2, _TemporalAdjuster3);
91574
- function RelativeDayOfWeek2(relative, dayOfWeek) {
91574
+ function RelativeDayOfWeek2(relative2, dayOfWeek) {
91575
91575
  var _this3;
91576
91576
  _this3 = _TemporalAdjuster3.call(this) || this;
91577
91577
  requireNonNull(dayOfWeek, "dayOfWeek");
91578
- _this3._relative = relative;
91578
+ _this3._relative = relative2;
91579
91579
  _this3._dowValue = dayOfWeek.value();
91580
91580
  return _this3;
91581
91581
  }
@@ -122862,8 +122862,8 @@ var PathScurryBase = class {
122862
122862
  *
122863
122863
  * @internal
122864
122864
  */
122865
- constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs15 = defaultFS } = {}) {
122866
- this.#fs = fsFromOption(fs15);
122865
+ constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs16 = defaultFS } = {}) {
122866
+ this.#fs = fsFromOption(fs16);
122867
122867
  if (cwd instanceof URL || cwd.startsWith("file://")) {
122868
122868
  cwd = (0, import_node_url.fileURLToPath)(cwd);
122869
122869
  }
@@ -123421,8 +123421,8 @@ var PathScurryWin32 = class extends PathScurryBase {
123421
123421
  /**
123422
123422
  * @internal
123423
123423
  */
123424
- newRoot(fs15) {
123425
- return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs15 });
123424
+ newRoot(fs16) {
123425
+ return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs16 });
123426
123426
  }
123427
123427
  /**
123428
123428
  * Return true if the provided path string is an absolute path
@@ -123450,8 +123450,8 @@ var PathScurryPosix = class extends PathScurryBase {
123450
123450
  /**
123451
123451
  * @internal
123452
123452
  */
123453
- newRoot(fs15) {
123454
- return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs15 });
123453
+ newRoot(fs16) {
123454
+ return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs16 });
123455
123455
  }
123456
123456
  /**
123457
123457
  * Return true if the provided path string is an absolute path
@@ -123694,10 +123694,10 @@ var Ignore = class {
123694
123694
  ignored(p) {
123695
123695
  const fullpath = p.fullpath();
123696
123696
  const fullpaths = `${fullpath}/`;
123697
- const relative = p.relative() || ".";
123698
- const relatives = `${relative}/`;
123697
+ const relative2 = p.relative() || ".";
123698
+ const relatives = `${relative2}/`;
123699
123699
  for (const m of this.relative) {
123700
- if (m.match(relative) || m.match(relatives))
123700
+ if (m.match(relative2) || m.match(relatives))
123701
123701
  return true;
123702
123702
  }
123703
123703
  for (const m of this.absolute) {
@@ -123708,9 +123708,9 @@ var Ignore = class {
123708
123708
  }
123709
123709
  childrenIgnored(p) {
123710
123710
  const fullpath = p.fullpath() + "/";
123711
- const relative = (p.relative() || ".") + "/";
123711
+ const relative2 = (p.relative() || ".") + "/";
123712
123712
  for (const m of this.relativeChildren) {
123713
- if (m.match(relative))
123713
+ if (m.match(relative2))
123714
123714
  return true;
123715
123715
  }
123716
123716
  for (const m of this.absoluteChildren) {
@@ -124629,7 +124629,7 @@ function readAllPackageReferences(csprojContent) {
124629
124629
  }
124630
124630
  return packages;
124631
124631
  }
124632
- async function findProjectsWithSmartStack(projectDir) {
124632
+ async function findAllProjects(projectDir) {
124633
124633
  const srcDir = (0, import_path7.join)(projectDir, "src");
124634
124634
  if (!await import_fs_extra6.default.pathExists(srcDir)) {
124635
124635
  return [];
@@ -124645,13 +124645,11 @@ async function findProjectsWithSmartStack(projectDir) {
124645
124645
  const csprojPath = (0, import_path7.join)(folderPath, csproj);
124646
124646
  const content = await import_fs_extra6.default.readFile(csprojPath, "utf-8");
124647
124647
  const currentVersion = readPackageVersion(content, "SmartStack");
124648
- if (currentVersion !== null) {
124649
- projects.push({
124650
- csprojPath,
124651
- relPath: csprojPath.replace(projectDir, "").replace(/^[/\\]/, ""),
124652
- currentVersion
124653
- });
124654
- }
124648
+ projects.push({
124649
+ csprojPath,
124650
+ relPath: csprojPath.replace(projectDir, "").replace(/^[/\\]/, ""),
124651
+ currentVersion
124652
+ });
124655
124653
  }
124656
124654
  }
124657
124655
  }
@@ -124833,51 +124831,62 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124833
124831
  logger.success(`Latest npm version: ${source_default.cyan(npmVersion)}`);
124834
124832
  }
124835
124833
  console.log();
124836
- logger.info("Scanning for SmartStack projects...");
124837
- const projects = await findProjectsWithSmartStack(projectDir);
124838
- if (projects.length === 0) {
124839
- logger.warning("No .NET projects found with SmartStack PackageReference.");
124840
- logger.info('Tip: Ensure your .csproj files contain <PackageReference Include="SmartStack" Version="..." />');
124834
+ logger.info("Scanning for .NET projects...");
124835
+ const allProjects = await findAllProjects(projectDir);
124836
+ if (allProjects.length === 0) {
124837
+ logger.warning("No .NET projects found in src/ directory.");
124841
124838
  } else {
124842
- logger.info(`Found ${source_default.cyan(projects.length)} project(s):`);
124843
- for (const p of projects) {
124844
- const versionInfo = p.currentVersion ? `${source_default.yellow(p.currentVersion)} \u2192 ${source_default.cyan(nugetVersion)}` : source_default.gray("version unknown");
124845
- const upToDate = p.currentVersion === nugetVersion;
124846
- const statusIcon = upToDate ? source_default.green("\u2713") : source_default.yellow("\u2191");
124847
- logger.info(` ${statusIcon} ${p.relPath} (${upToDate ? source_default.green("up to date") : versionInfo})`);
124839
+ const smartStackProjects = allProjects.filter((p) => p.currentVersion !== null);
124840
+ const otherProjects = allProjects.filter((p) => p.currentVersion === null);
124841
+ if (smartStackProjects.length > 0) {
124842
+ logger.info(`Found ${source_default.cyan(smartStackProjects.length)} project(s) with SmartStack:`);
124843
+ for (const p of smartStackProjects) {
124844
+ const versionInfo = `${source_default.yellow(p.currentVersion)} \u2192 ${source_default.cyan(nugetVersion)}`;
124845
+ const upToDate = p.currentVersion === nugetVersion;
124846
+ const statusIcon = upToDate ? source_default.green("\u2713") : source_default.yellow("\u2191");
124847
+ logger.info(` ${statusIcon} ${p.relPath} (${upToDate ? source_default.green("up to date") : versionInfo})`);
124848
+ }
124849
+ }
124850
+ if (otherProjects.length > 0) {
124851
+ logger.info(`Found ${source_default.cyan(otherProjects.length)} other project(s):`);
124852
+ for (const p of otherProjects) {
124853
+ logger.info(` ${source_default.gray("\u25CB")} ${p.relPath}`);
124854
+ }
124848
124855
  }
124849
124856
  console.log();
124850
- const projectsToUpgrade = projects.filter((p) => p.currentVersion !== nugetVersion);
124851
- result.nugetSkipped = projects.length - projectsToUpgrade.length;
124852
- if (projectsToUpgrade.length === 0) {
124853
- logger.success(`All ${projects.length} project(s) already at ${source_default.cyan(nugetVersion)}`);
124854
- } else {
124855
- logger.info(`Upgrading ${projectsToUpgrade.length} project(s)...`);
124856
- for (const project of projectsToUpgrade) {
124857
- logger.info(`Upgrading ${source_default.cyan(project.relPath)}...`);
124858
- try {
124859
- execCommand2(`dotnet add "${project.csprojPath}" package SmartStack --version ${nugetVersion}`, void 0, dryRun);
124860
- result.nugetUpgraded++;
124861
- } catch (error) {
124862
- result.nugetFailed++;
124863
- logger.error(`Failed to upgrade ${project.relPath}: ${error instanceof Error ? error.message : error}`);
124857
+ if (smartStackProjects.length > 0) {
124858
+ const projectsToUpgrade = smartStackProjects.filter((p) => p.currentVersion !== nugetVersion);
124859
+ result.nugetSkipped = smartStackProjects.length - projectsToUpgrade.length;
124860
+ if (projectsToUpgrade.length === 0) {
124861
+ logger.success(`All ${smartStackProjects.length} SmartStack project(s) already at ${source_default.cyan(nugetVersion)}`);
124862
+ } else {
124863
+ logger.info(`Upgrading SmartStack in ${projectsToUpgrade.length} project(s)...`);
124864
+ for (const project of projectsToUpgrade) {
124865
+ logger.info(`Upgrading ${source_default.cyan(project.relPath)}...`);
124866
+ try {
124867
+ execCommand2(`dotnet add "${project.csprojPath}" package SmartStack --version ${nugetVersion}`, void 0, dryRun);
124868
+ result.nugetUpgraded++;
124869
+ } catch (error) {
124870
+ result.nugetFailed++;
124871
+ logger.error(`Failed to upgrade ${project.relPath}: ${error instanceof Error ? error.message : error}`);
124872
+ }
124873
+ }
124874
+ if (result.nugetUpgraded > 0) {
124875
+ logger.success(`${result.nugetUpgraded} project(s) upgraded to ${source_default.cyan(nugetVersion)}`);
124876
+ }
124877
+ if (result.nugetFailed > 0) {
124878
+ logger.error(`${result.nugetFailed} project(s) failed to upgrade`);
124864
124879
  }
124865
124880
  }
124866
- if (result.nugetUpgraded > 0) {
124867
- logger.success(`${result.nugetUpgraded} project(s) upgraded to ${source_default.cyan(nugetVersion)}`);
124868
- }
124869
- if (result.nugetFailed > 0) {
124870
- logger.error(`${result.nugetFailed} project(s) failed to upgrade`);
124871
- }
124881
+ console.log();
124872
124882
  }
124873
- console.log();
124874
124883
  logger.info("Checking other NuGet packages...");
124875
- for (const project of projects) {
124884
+ for (const project of allProjects) {
124876
124885
  const content = await import_fs_extra6.default.readFile(project.csprojPath, "utf-8");
124877
124886
  const allPackages = readAllPackageReferences(content);
124878
124887
  const otherPackages = allPackages.filter((p) => p.name !== "SmartStack");
124879
124888
  if (otherPackages.length === 0) continue;
124880
- const relPath = project.relPath;
124889
+ logger.info(` ${source_default.cyan(project.relPath)}:`);
124881
124890
  for (const pkg2 of otherPackages) {
124882
124891
  try {
124883
124892
  const output = dryRun ? `[DRY RUN] dotnet add "${project.csprojPath}" package ${pkg2.name}` : (0, import_child_process6.execSync)(
@@ -124885,21 +124894,21 @@ var upgradeCommand = new Command("upgrade").description("Upgrade SmartStack pack
124885
124894
  { shell: true, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }
124886
124895
  );
124887
124896
  if (dryRun) {
124888
- logger.info(` [DRY RUN] ${pkg2.name} ${source_default.yellow(pkg2.currentVersion)} \u2192 latest`);
124897
+ logger.info(` [DRY RUN] ${pkg2.name} ${source_default.yellow(pkg2.currentVersion)} \u2192 latest`);
124889
124898
  result.otherPkgUpdated++;
124890
124899
  continue;
124891
124900
  }
124892
124901
  const newContent = await import_fs_extra6.default.readFile(project.csprojPath, "utf-8");
124893
124902
  const newVersion = readPackageVersion(newContent, pkg2.name);
124894
124903
  if (newVersion && newVersion !== pkg2.currentVersion) {
124895
- logger.success(` ${source_default.green("\u2713")} ${pkg2.name} ${source_default.yellow(pkg2.currentVersion)} \u2192 ${source_default.cyan(newVersion)}`);
124904
+ logger.success(` ${source_default.green("\u2713")} ${pkg2.name} ${source_default.yellow(pkg2.currentVersion)} \u2192 ${source_default.cyan(newVersion)}`);
124896
124905
  result.otherPkgUpdated++;
124897
124906
  } else {
124898
124907
  result.otherPkgSkipped++;
124899
124908
  }
124900
124909
  } catch (error) {
124901
124910
  result.otherPkgFailed++;
124902
- logger.error(` ${source_default.red("\u2717")} ${pkg2.name}: ${error instanceof Error ? error.message : error}`);
124911
+ logger.error(` ${source_default.red("\u2717")} ${pkg2.name}: ${error instanceof Error ? error.message : error}`);
124903
124912
  }
124904
124913
  }
124905
124914
  }
@@ -126111,7 +126120,17 @@ adminCommand.command("reset").description("Reset the localAdmin account password
126111
126120
  if (nativeDriver) {
126112
126121
  try {
126113
126122
  spinner.text = "Connecting with Windows Authentication...";
126114
- await nativeDriver.connect(connectionString);
126123
+ const nativeConfig = {
126124
+ server: connInfo.server,
126125
+ database: connInfo.database,
126126
+ options: {
126127
+ trustedConnection: true,
126128
+ trustServerCertificate: true
126129
+ },
126130
+ connectionTimeout: 15e3,
126131
+ requestTimeout: 15e3
126132
+ };
126133
+ await nativeDriver.connect(nativeConfig);
126115
126134
  nativeConnected = true;
126116
126135
  await resetViaMssql(nativeDriver);
126117
126136
  } catch (nativeError) {
@@ -126409,10 +126428,239 @@ mcpCommand.command("remove").description("Unregister MCP servers from CLI and VS
126409
126428
  logger.box(["MCP servers unregistered.", "", "Re-register with: ss mcp install"], "info");
126410
126429
  });
126411
126430
 
126431
+ // src/commands/derive-prd.ts
126432
+ var import_fs_extra9 = __toESM(require_lib());
126433
+ var import_path11 = require("path");
126434
+
126435
+ // src/utils/prd-extractor.ts
126436
+ function extractPrd(moduleFeature, featureJsonPath, namespace) {
126437
+ const { metadata, analysis, specification, handoff } = moduleFeature;
126438
+ return {
126439
+ version: "2.0.0",
126440
+ source: {
126441
+ type: "ba-handoff-programmatic",
126442
+ featureJson: featureJsonPath,
126443
+ extractedAt: (/* @__PURE__ */ new Date()).toISOString()
126444
+ },
126445
+ project: {
126446
+ application: metadata.application,
126447
+ module: metadata.module,
126448
+ ...namespace ? { namespace } : {}
126449
+ },
126450
+ requirements: {
126451
+ useCases: (specification?.useCases ?? []).map((uc) => ({
126452
+ id: uc.id,
126453
+ name: uc.name,
126454
+ actor: uc.primaryActor,
126455
+ permission: uc.permission,
126456
+ steps: uc.mainScenario ?? [],
126457
+ linkedRules: uc.linkedRules ?? []
126458
+ })),
126459
+ functionalRequirements: (specification?.functionalRequirements ?? []).map((fr) => ({
126460
+ id: fr.id,
126461
+ statement: fr.statement,
126462
+ priority: fr.priority,
126463
+ linkedUCs: fr.linkedUseCases ?? []
126464
+ }))
126465
+ },
126466
+ businessRules: (analysis?.businessRules ?? []).map((br) => ({
126467
+ id: br.id,
126468
+ name: br.name,
126469
+ category: br.category,
126470
+ statement: br.statement,
126471
+ priority: br.priority
126472
+ })),
126473
+ architecture: {
126474
+ entities: (analysis?.entities ?? []).map((e) => ({
126475
+ name: e.name,
126476
+ description: e.description,
126477
+ type: e.type,
126478
+ attributes: e.attributes,
126479
+ relationships: e.relationships
126480
+ })),
126481
+ apiEndpoints: (specification?.apiEndpoints ?? []).map((ep) => ({
126482
+ method: ep.method,
126483
+ route: ep.route,
126484
+ operation: ep.operation,
126485
+ permission: ep.permission,
126486
+ requestSchema: ep.requestSchema,
126487
+ responseSchema: ep.responseSchema,
126488
+ errorCodes: ep.errorCodes,
126489
+ linkedUC: ep.linkedUC,
126490
+ module: ep.module
126491
+ })),
126492
+ permissionMatrix: specification?.permissionMatrix ?? { permissions: [], roleAssignments: [] },
126493
+ sections: (specification?.sections ?? []).map((s) => ({
126494
+ code: s.code,
126495
+ name: s.name,
126496
+ description: s.description,
126497
+ route: s.route,
126498
+ permission: s.permission,
126499
+ resources: s.resources?.map((r) => ({
126500
+ code: r.code,
126501
+ type: r.type,
126502
+ entity: r.entity,
126503
+ permission: r.permission,
126504
+ columns: r.columns,
126505
+ actions: r.actions
126506
+ }))
126507
+ }))
126508
+ },
126509
+ implementation: {
126510
+ strategy: handoff?.implementationStrategy ?? "module-by-module",
126511
+ filesToCreate: handoff?.filesToCreate ?? {},
126512
+ brToCodeMapping: (handoff?.brToCodeMapping ?? []).map((m) => ({
126513
+ ruleId: m.ruleId,
126514
+ ruleName: m.ruleName,
126515
+ targetFile: m.targetFile,
126516
+ targetMethod: m.targetMethod,
126517
+ implementationType: m.implementationType
126518
+ }))
126519
+ },
126520
+ seedData: {
126521
+ core: specification?.seedDataCore,
126522
+ business: specification?.seedDataBusiness
126523
+ }
126524
+ };
126525
+ }
126526
+ function validateForPrdExtraction(feature) {
126527
+ const errors = [];
126528
+ if (!feature.id) {
126529
+ errors.push("Missing feature ID");
126530
+ }
126531
+ if (!feature.metadata?.application) {
126532
+ errors.push("Missing metadata.application");
126533
+ }
126534
+ if (!feature.metadata?.module) {
126535
+ errors.push("Missing metadata.module");
126536
+ }
126537
+ if (feature.status !== "handed-off" && feature.status !== "approved" && feature.status !== "consolidated") {
126538
+ errors.push(`Feature status is "${feature.status}" \u2014 expected "handed-off", "approved", or "consolidated"`);
126539
+ }
126540
+ if (!feature.specification?.useCases?.length) {
126541
+ errors.push("No use cases found in specification");
126542
+ }
126543
+ if (!feature.analysis?.businessRules?.length) {
126544
+ errors.push("No business rules found in analysis");
126545
+ }
126546
+ if (!feature.handoff?.filesToCreate) {
126547
+ errors.push("No filesToCreate found in handoff");
126548
+ }
126549
+ return errors;
126550
+ }
126551
+
126552
+ // src/commands/derive-prd.ts
126553
+ function readSmartStackNamespace() {
126554
+ try {
126555
+ const configPath = (0, import_path11.join)(process.cwd(), ".smartstack", "config.json");
126556
+ if (import_fs_extra9.default.existsSync(configPath)) {
126557
+ const config = import_fs_extra9.default.readJsonSync(configPath);
126558
+ return config.baseNamespace;
126559
+ }
126560
+ } catch {
126561
+ }
126562
+ return void 0;
126563
+ }
126564
+ async function findModuleFeatureFiles(masterPath) {
126565
+ const master = await import_fs_extra9.default.readJson(masterPath);
126566
+ const masterDir = (0, import_path11.dirname)(masterPath);
126567
+ const paths = [];
126568
+ if (master.modules) {
126569
+ for (const mod of master.modules) {
126570
+ if (mod.featureJsonPath) {
126571
+ const fullPath = (0, import_path11.join)(masterDir, "..", "..", mod.featureJsonPath);
126572
+ if (await import_fs_extra9.default.pathExists(fullPath)) {
126573
+ paths.push(fullPath);
126574
+ }
126575
+ }
126576
+ }
126577
+ }
126578
+ return paths;
126579
+ }
126580
+ var derivePrdCommand = new Command("derive-prd").description("Extract prd.json programmatically from feature.json (no LLM)").option("-f, --feature <path>", "Path to a module-level feature.json").option("-a, --application <path>", "Path to a master application-level feature.json (processes all modules)").option("-o, --output <path>", "Output path for prd.json (default: .ralph/prd-{module}.json)").option("--strict", "Fail on validation warnings").action(async (options) => {
126581
+ if (!options.feature && !options.application) {
126582
+ console.log(source_default.red("Error: Provide either --feature or --application path"));
126583
+ process.exit(1);
126584
+ }
126585
+ const namespace = readSmartStackNamespace();
126586
+ const ralphDir = (0, import_path11.join)(process.cwd(), ".ralph");
126587
+ await import_fs_extra9.default.ensureDir(ralphDir);
126588
+ let featurePaths = [];
126589
+ if (options.application) {
126590
+ const appPath = (0, import_path11.join)(process.cwd(), options.application);
126591
+ if (!await import_fs_extra9.default.pathExists(appPath)) {
126592
+ console.log(source_default.red(`Application feature.json not found: ${appPath}`));
126593
+ process.exit(1);
126594
+ }
126595
+ const modulePaths = await findModuleFeatureFiles(appPath);
126596
+ if (modulePaths.length === 0) {
126597
+ console.log(source_default.red("No module feature.json files found referenced in application master"));
126598
+ process.exit(1);
126599
+ }
126600
+ featurePaths = modulePaths.map((p) => ({ path: p, isApplicationMode: true }));
126601
+ console.log(source_default.cyan(`Found ${featurePaths.length} module(s) to process`));
126602
+ } else if (options.feature) {
126603
+ const featurePath = (0, import_path11.join)(process.cwd(), options.feature);
126604
+ if (!await import_fs_extra9.default.pathExists(featurePath)) {
126605
+ console.log(source_default.red(`Feature.json not found: ${featurePath}`));
126606
+ process.exit(1);
126607
+ }
126608
+ featurePaths = [{ path: featurePath, isApplicationMode: false }];
126609
+ }
126610
+ let totalGenerated = 0;
126611
+ let totalErrors = 0;
126612
+ for (const entry of featurePaths) {
126613
+ const featureJson = await import_fs_extra9.default.readJson(entry.path);
126614
+ const moduleName = featureJson.metadata?.module ?? "unknown";
126615
+ console.log(source_default.cyan(`
126616
+ Processing module: ${source_default.bold(moduleName)}`));
126617
+ const errors = validateForPrdExtraction(featureJson);
126618
+ if (errors.length > 0) {
126619
+ console.log(source_default.yellow(` Validation warnings:`));
126620
+ for (const err of errors) {
126621
+ console.log(source_default.yellow(` - ${err}`));
126622
+ }
126623
+ if (options.strict) {
126624
+ console.log(source_default.red(` Skipping ${moduleName} (--strict mode)`));
126625
+ totalErrors++;
126626
+ continue;
126627
+ }
126628
+ }
126629
+ const relativePath = (0, import_path11.relative)(process.cwd(), entry.path);
126630
+ const prd = extractPrd(featureJson, relativePath, namespace);
126631
+ let outputPath;
126632
+ if (options.output && !entry.isApplicationMode) {
126633
+ outputPath = (0, import_path11.join)(process.cwd(), options.output);
126634
+ } else {
126635
+ outputPath = (0, import_path11.join)(ralphDir, `prd-${moduleName}.json`);
126636
+ }
126637
+ await import_fs_extra9.default.writeJson(outputPath, prd, { spaces: 2 });
126638
+ totalGenerated++;
126639
+ const relOutput = (0, import_path11.relative)(process.cwd(), outputPath);
126640
+ console.log(source_default.green(` Generated: ${relOutput}`));
126641
+ console.log(source_default.gray(` UCs: ${prd.requirements.useCases.length} | FRs: ${prd.requirements.functionalRequirements.length} | BRs: ${prd.businessRules.length}`));
126642
+ console.log(source_default.gray(` Endpoints: ${prd.architecture.apiEndpoints.length} | Sections: ${prd.architecture.sections.length}`));
126643
+ const fileCount = Object.values(prd.implementation.filesToCreate).reduce((sum, files) => sum + (files?.length ?? 0), 0);
126644
+ console.log(source_default.gray(` Files to create: ${fileCount} | BR mappings: ${prd.implementation.brToCodeMapping.length}`));
126645
+ }
126646
+ console.log();
126647
+ if (totalErrors > 0) {
126648
+ logger.box([
126649
+ `PRD extraction completed with ${totalErrors} error(s)`,
126650
+ `${totalGenerated} prd.json file(s) generated`
126651
+ ], "warning");
126652
+ } else {
126653
+ logger.box([
126654
+ `PRD extraction complete`,
126655
+ `${totalGenerated} prd.json file(s) generated in .ralph/`
126656
+ ], "success");
126657
+ }
126658
+ });
126659
+
126412
126660
  // src/index.ts
126413
126661
  var import_fs5 = require("fs");
126414
- var import_path11 = require("path");
126415
- var pkg = JSON.parse((0, import_fs5.readFileSync)((0, import_path11.join)(__dirname, "..", "package.json"), "utf-8"));
126662
+ var import_path12 = require("path");
126663
+ var pkg = JSON.parse((0, import_fs5.readFileSync)((0, import_path12.join)(__dirname, "..", "package.json"), "utf-8"));
126416
126664
  var LICENSE_FREE_COMMANDS = ["license", "help", "--help", "-h", "--version", "-v"];
126417
126665
  async function main2() {
126418
126666
  const program2 = new Command();
@@ -126430,6 +126678,7 @@ async function main2() {
126430
126678
  program2.addCommand(doctorCommand);
126431
126679
  program2.addCommand(adminCommand);
126432
126680
  program2.addCommand(mcpCommand);
126681
+ program2.addCommand(derivePrdCommand);
126433
126682
  const args = process.argv.slice(2);
126434
126683
  const commandName = args[0] || "";
126435
126684
  const requiresLicense = !LICENSE_FREE_COMMANDS.some(