@atlashub/smartstack-cli 2.6.3 → 2.7.1
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.
- package/.documentation/agents.html +1 -1
- package/.documentation/apex.html +1 -1
- package/.documentation/business-analyse.html +749 -1419
- package/.documentation/cli-commands.html +1 -1
- package/.documentation/commands.html +1 -1
- package/.documentation/css/styles.css +160 -0
- package/.documentation/efcore.html +1 -1
- package/.documentation/gitflow.html +3 -453
- package/.documentation/hooks.html +1 -1
- package/.documentation/index.html +177 -68
- package/.documentation/init.html +747 -290
- package/.documentation/installation.html +63 -8
- package/.documentation/ralph-loop.html +1 -1
- package/.documentation/test-web.html +1 -1
- package/dist/index.js +552 -304
- package/dist/index.js.map +1 -1
- package/dist/mcp-entry.mjs +12 -10
- package/dist/mcp-entry.mjs.map +1 -1
- package/package.json +2 -2
- package/templates/agents/ba-reader.md +23 -0
- package/templates/agents/ba-writer.md +63 -4
- package/templates/skills/business-analyse/questionnaire/00-application.md +1 -1
- package/templates/skills/business-analyse/questionnaire/03-scope.md +2 -2
- package/templates/skills/business-analyse/questionnaire.md +1 -1
- package/templates/skills/business-analyse/react/application-viewer.md +1 -1
- package/templates/skills/business-analyse/react/schema.md +88 -1
- package/templates/skills/business-analyse/schemas/application-schema.json +16 -1
- package/templates/skills/business-analyse/schemas/feature-schema.json +19 -986
- package/templates/skills/business-analyse/schemas/sections/analysis-schema.json +157 -0
- package/templates/skills/business-analyse/schemas/sections/discovery-schema.json +82 -0
- package/templates/skills/business-analyse/schemas/sections/handoff-schema.json +80 -0
- package/templates/skills/business-analyse/schemas/sections/metadata-schema.json +69 -0
- package/templates/skills/business-analyse/schemas/sections/specification-schema.json +445 -0
- package/templates/skills/business-analyse/schemas/sections/validation-schema.json +93 -0
- package/templates/skills/business-analyse/schemas/shared/common-defs.json +133 -0
- package/templates/skills/business-analyse/steps/step-01-cadrage.md +22 -3
- package/templates/skills/business-analyse/steps/step-03-specify.md +129 -0
- package/templates/skills/business-analyse/steps/step-04-consolidation.md +38 -5
- 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
|
|
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 (
|
|
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) =>
|
|
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 =
|
|
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(
|
|
4737
|
+
function patch(fs16) {
|
|
4738
4738
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
4739
|
-
patchLchmod(
|
|
4740
|
-
}
|
|
4741
|
-
if (!
|
|
4742
|
-
patchLutimes(
|
|
4743
|
-
}
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
|
|
4760
|
-
|
|
4761
|
-
|
|
4762
|
-
if (
|
|
4763
|
-
|
|
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
|
-
|
|
4766
|
+
fs16.lchmodSync = function() {
|
|
4767
4767
|
};
|
|
4768
4768
|
}
|
|
4769
|
-
if (
|
|
4770
|
-
|
|
4769
|
+
if (fs16.chown && !fs16.lchown) {
|
|
4770
|
+
fs16.lchown = function(path5, uid, gid, cb) {
|
|
4771
4771
|
if (cb) process.nextTick(cb);
|
|
4772
4772
|
};
|
|
4773
|
-
|
|
4773
|
+
fs16.lchownSync = function() {
|
|
4774
4774
|
};
|
|
4775
4775
|
}
|
|
4776
4776
|
if (platform3 === "win32") {
|
|
4777
|
-
|
|
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
|
-
|
|
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
|
-
})(
|
|
4800
|
+
})(fs16.rename);
|
|
4801
4801
|
}
|
|
4802
|
-
|
|
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(
|
|
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(
|
|
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
|
-
})(
|
|
4820
|
-
|
|
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(
|
|
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
|
-
})(
|
|
4836
|
-
function patchLchmod(
|
|
4837
|
-
|
|
4838
|
-
|
|
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
|
-
|
|
4848
|
-
|
|
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
|
-
|
|
4856
|
-
var fd =
|
|
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 =
|
|
4860
|
+
ret = fs17.fchmodSync(fd, mode);
|
|
4861
4861
|
threw = false;
|
|
4862
4862
|
} finally {
|
|
4863
4863
|
if (threw) {
|
|
4864
4864
|
try {
|
|
4865
|
-
|
|
4865
|
+
fs17.closeSync(fd);
|
|
4866
4866
|
} catch (er) {
|
|
4867
4867
|
}
|
|
4868
4868
|
} else {
|
|
4869
|
-
|
|
4869
|
+
fs17.closeSync(fd);
|
|
4870
4870
|
}
|
|
4871
4871
|
}
|
|
4872
4872
|
return ret;
|
|
4873
4873
|
};
|
|
4874
4874
|
}
|
|
4875
|
-
function patchLutimes(
|
|
4876
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
4877
|
-
|
|
4878
|
-
|
|
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
|
-
|
|
4884
|
-
|
|
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
|
-
|
|
4891
|
-
var fd =
|
|
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 =
|
|
4895
|
+
ret = fs17.futimesSync(fd, at, mt);
|
|
4896
4896
|
threw = false;
|
|
4897
4897
|
} finally {
|
|
4898
4898
|
if (threw) {
|
|
4899
4899
|
try {
|
|
4900
|
-
|
|
4900
|
+
fs17.closeSync(fd);
|
|
4901
4901
|
} catch (er) {
|
|
4902
4902
|
}
|
|
4903
4903
|
} else {
|
|
4904
|
-
|
|
4904
|
+
fs17.closeSync(fd);
|
|
4905
4905
|
}
|
|
4906
4906
|
}
|
|
4907
4907
|
return ret;
|
|
4908
4908
|
};
|
|
4909
|
-
} else if (
|
|
4910
|
-
|
|
4909
|
+
} else if (fs17.futimes) {
|
|
4910
|
+
fs17.lutimes = function(_a, _b, _c, cb) {
|
|
4911
4911
|
if (cb) process.nextTick(cb);
|
|
4912
4912
|
};
|
|
4913
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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 =
|
|
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
|
|
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 (!
|
|
5155
|
+
if (!fs16[gracefulQueue]) {
|
|
5156
5156
|
queue = global[gracefulQueue] || [];
|
|
5157
|
-
publishQueue(
|
|
5158
|
-
|
|
5157
|
+
publishQueue(fs16, queue);
|
|
5158
|
+
fs16.close = (function(fs$close) {
|
|
5159
5159
|
function close(fd, cb) {
|
|
5160
|
-
return fs$close.call(
|
|
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
|
-
})(
|
|
5173
|
-
|
|
5172
|
+
})(fs16.close);
|
|
5173
|
+
fs16.closeSync = (function(fs$closeSync) {
|
|
5174
5174
|
function closeSync(fd) {
|
|
5175
|
-
fs$closeSync.apply(
|
|
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
|
-
})(
|
|
5182
|
+
})(fs16.closeSync);
|
|
5183
5183
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
5184
5184
|
process.on("exit", function() {
|
|
5185
|
-
debug(
|
|
5186
|
-
require("assert").equal(
|
|
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,
|
|
5193
|
-
}
|
|
5194
|
-
module2.exports = patch(clone(
|
|
5195
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
5196
|
-
module2.exports = patch(
|
|
5197
|
-
|
|
5198
|
-
}
|
|
5199
|
-
function patch(
|
|
5200
|
-
polyfills(
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
var fs$readFile =
|
|
5205
|
-
|
|
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 =
|
|
5222
|
-
|
|
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 =
|
|
5238
|
+
var fs$appendFile = fs17.appendFile;
|
|
5239
5239
|
if (fs$appendFile)
|
|
5240
|
-
|
|
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 =
|
|
5256
|
+
var fs$copyFile = fs17.copyFile;
|
|
5257
5257
|
if (fs$copyFile)
|
|
5258
|
-
|
|
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 =
|
|
5277
|
-
|
|
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(
|
|
5318
|
+
var legStreams = legacy(fs17);
|
|
5319
5319
|
ReadStream = legStreams.ReadStream;
|
|
5320
5320
|
WriteStream = legStreams.WriteStream;
|
|
5321
5321
|
}
|
|
5322
|
-
var fs$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 =
|
|
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(
|
|
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(
|
|
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(
|
|
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(
|
|
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
|
|
5413
|
+
return new fs17.ReadStream(path5, options);
|
|
5414
5414
|
}
|
|
5415
5415
|
function createWriteStream(path5, options) {
|
|
5416
|
-
return new
|
|
5416
|
+
return new fs17.WriteStream(path5, options);
|
|
5417
5417
|
}
|
|
5418
|
-
var fs$open =
|
|
5419
|
-
|
|
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
|
|
5435
|
+
return fs17;
|
|
5436
5436
|
}
|
|
5437
5437
|
function enqueue(elem) {
|
|
5438
5438
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
5439
|
-
|
|
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 <
|
|
5446
|
-
if (
|
|
5447
|
-
|
|
5448
|
-
|
|
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 (
|
|
5456
|
+
if (fs16[gracefulQueue].length === 0)
|
|
5457
5457
|
return;
|
|
5458
|
-
var elem =
|
|
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
|
-
|
|
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
|
|
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
|
|
5536
|
+
return typeof fs16[key] === "function";
|
|
5537
5537
|
});
|
|
5538
|
-
Object.assign(exports2,
|
|
5538
|
+
Object.assign(exports2, fs16);
|
|
5539
5539
|
api.forEach((method) => {
|
|
5540
|
-
exports2[method] = u(
|
|
5540
|
+
exports2[method] = u(fs16[method]);
|
|
5541
5541
|
});
|
|
5542
5542
|
exports2.exists = function(filename, callback) {
|
|
5543
5543
|
if (typeof callback === "function") {
|
|
5544
|
-
return
|
|
5544
|
+
return fs16.exists(filename, callback);
|
|
5545
5545
|
}
|
|
5546
5546
|
return new Promise((resolve) => {
|
|
5547
|
-
return
|
|
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
|
|
5552
|
+
return fs16.read(fd, buffer, offset, length, position, callback);
|
|
5553
5553
|
}
|
|
5554
5554
|
return new Promise((resolve, reject) => {
|
|
5555
|
-
|
|
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
|
|
5563
|
+
return fs16.write(fd, buffer, ...args);
|
|
5564
5564
|
}
|
|
5565
5565
|
return new Promise((resolve, reject) => {
|
|
5566
|
-
|
|
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
|
|
5574
|
+
return fs16.readv(fd, buffers, ...args);
|
|
5575
5575
|
}
|
|
5576
5576
|
return new Promise((resolve, reject) => {
|
|
5577
|
-
|
|
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
|
|
5585
|
+
return fs16.writev(fd, buffers, ...args);
|
|
5586
5586
|
}
|
|
5587
5587
|
return new Promise((resolve, reject) => {
|
|
5588
|
-
|
|
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
|
|
5595
|
-
exports2.realpath.native = u(
|
|
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
|
|
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
|
|
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
|
|
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
|
|
5676
|
+
var fs16 = require_fs();
|
|
5677
5677
|
function pathExists2(path5) {
|
|
5678
|
-
return
|
|
5678
|
+
return fs16.access(path5).then(() => true).catch(() => false);
|
|
5679
5679
|
}
|
|
5680
5680
|
module2.exports = {
|
|
5681
5681
|
pathExists: u(pathExists2),
|
|
5682
|
-
pathExistsSync:
|
|
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
|
|
5691
|
+
var fs16 = require_fs();
|
|
5692
5692
|
var u = require_universalify().fromPromise;
|
|
5693
5693
|
async function utimesMillis(path5, atime, mtime) {
|
|
5694
|
-
const fd = await
|
|
5694
|
+
const fd = await fs16.open(path5, "r+");
|
|
5695
5695
|
let closeErr = null;
|
|
5696
5696
|
try {
|
|
5697
|
-
await
|
|
5697
|
+
await fs16.futimes(fd, atime, mtime);
|
|
5698
5698
|
} finally {
|
|
5699
5699
|
try {
|
|
5700
|
-
await
|
|
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 =
|
|
5711
|
-
|
|
5712
|
-
return
|
|
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
|
|
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) =>
|
|
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) =>
|
|
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
|
|
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 =
|
|
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
|
|
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 ?
|
|
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
|
|
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
|
|
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
|
|
5946
|
+
const updatedSrcStat = await fs16.stat(src);
|
|
5947
5947
|
await utimesMillis(dest, updatedSrcStat.atime, updatedSrcStat.mtime);
|
|
5948
5948
|
}
|
|
5949
|
-
return
|
|
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
|
|
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
|
|
5959
|
+
await fs16.mkdir(dest);
|
|
5960
5960
|
}
|
|
5961
|
-
await asyncIteratorConcurrentProcess(await
|
|
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
|
|
5971
|
+
await fs16.chmod(dest, srcStat.mode);
|
|
5972
5972
|
}
|
|
5973
5973
|
}
|
|
5974
5974
|
async function onLink(destStat, src, dest, opts) {
|
|
5975
|
-
let resolvedSrc = await
|
|
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
|
|
5980
|
+
return fs16.symlink(resolvedSrc, dest);
|
|
5981
5981
|
}
|
|
5982
5982
|
let resolvedDest = null;
|
|
5983
5983
|
try {
|
|
5984
|
-
resolvedDest = await
|
|
5984
|
+
resolvedDest = await fs16.readlink(dest);
|
|
5985
5985
|
} catch (e) {
|
|
5986
|
-
if (e.code === "EINVAL" || e.code === "UNKNOWN") return
|
|
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
|
|
6001
|
-
return
|
|
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
|
|
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 (!
|
|
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 ?
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
6075
|
+
return fs16.chmodSync(dest, srcMode);
|
|
6076
6076
|
}
|
|
6077
6077
|
function setDestTimestamps(src, dest) {
|
|
6078
|
-
const updatedSrcStat =
|
|
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
|
-
|
|
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 =
|
|
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 =
|
|
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
|
|
6114
|
+
return fs16.symlinkSync(resolvedSrc, dest);
|
|
6115
6115
|
} else {
|
|
6116
6116
|
let resolvedDest;
|
|
6117
6117
|
try {
|
|
6118
|
-
resolvedDest =
|
|
6118
|
+
resolvedDest = fs16.readlinkSync(dest);
|
|
6119
6119
|
} catch (err) {
|
|
6120
|
-
if (err.code === "EINVAL" || err.code === "UNKNOWN") return
|
|
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
|
-
|
|
6139
|
-
return
|
|
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
|
|
6161
|
+
var fs16 = require_graceful_fs();
|
|
6162
6162
|
var u = require_universalify().fromCallback;
|
|
6163
6163
|
function remove2(path5, callback) {
|
|
6164
|
-
|
|
6164
|
+
fs16.rm(path5, { recursive: true, force: true }, callback);
|
|
6165
6165
|
}
|
|
6166
6166
|
function removeSync(path5) {
|
|
6167
|
-
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
|
6233
|
+
dirStats = await fs16.stat(dir);
|
|
6234
6234
|
} catch (err) {
|
|
6235
6235
|
if (err.code === "ENOENT") {
|
|
6236
6236
|
await mkdir.mkdirs(dir);
|
|
6237
|
-
await
|
|
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
|
|
6244
|
+
await fs16.writeFile(file, "");
|
|
6245
6245
|
} else {
|
|
6246
|
-
await
|
|
6246
|
+
await fs16.readdir(dir);
|
|
6247
6247
|
}
|
|
6248
6248
|
}
|
|
6249
6249
|
function createFileSync(file) {
|
|
6250
6250
|
let stats;
|
|
6251
6251
|
try {
|
|
6252
|
-
stats =
|
|
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 (!
|
|
6259
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
6287
|
+
dstStat = await fs16.lstat(dstpath);
|
|
6288
6288
|
} catch {
|
|
6289
6289
|
}
|
|
6290
6290
|
let srcStat;
|
|
6291
6291
|
try {
|
|
6292
|
-
srcStat = await
|
|
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
|
|
6303
|
+
await fs16.link(srcpath, dstpath);
|
|
6304
6304
|
}
|
|
6305
6305
|
function createLinkSync(srcpath, dstpath) {
|
|
6306
6306
|
let dstStat;
|
|
6307
6307
|
try {
|
|
6308
|
-
dstStat =
|
|
6308
|
+
dstStat = fs16.lstatSync(dstpath);
|
|
6309
6309
|
} catch {
|
|
6310
6310
|
}
|
|
6311
6311
|
try {
|
|
6312
|
-
const srcStat =
|
|
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 =
|
|
6320
|
-
if (dirExists) return
|
|
6319
|
+
const dirExists = fs16.existsSync(dir);
|
|
6320
|
+
if (dirExists) return fs16.linkSync(srcpath, dstpath);
|
|
6321
6321
|
mkdir.mkdirsSync(dir);
|
|
6322
|
-
return
|
|
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
|
|
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
|
|
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
|
|
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 =
|
|
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 =
|
|
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 =
|
|
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
|
|
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
|
|
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 =
|
|
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
|
|
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
|
|
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
|
-
|
|
6458
|
-
|
|
6457
|
+
fs16.stat(srcpath),
|
|
6458
|
+
fs16.stat(dstpath)
|
|
6459
6459
|
]);
|
|
6460
6460
|
if (areIdentical(srcStat, dstStat)) return;
|
|
6461
6461
|
}
|
|
6462
|
-
const
|
|
6463
|
-
srcpath =
|
|
6464
|
-
const toType = await symlinkType(
|
|
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
|
|
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 =
|
|
6474
|
+
stats = fs16.lstatSync(dstpath);
|
|
6475
6475
|
} catch {
|
|
6476
6476
|
}
|
|
6477
6477
|
if (stats && stats.isSymbolicLink()) {
|
|
6478
|
-
const srcStat =
|
|
6479
|
-
const dstStat =
|
|
6478
|
+
const srcStat = fs16.statSync(srcpath);
|
|
6479
|
+
const dstStat = fs16.statSync(dstpath);
|
|
6480
6480
|
if (areIdentical(srcStat, dstStat)) return;
|
|
6481
6481
|
}
|
|
6482
|
-
const
|
|
6483
|
-
srcpath =
|
|
6484
|
-
type = symlinkTypeSync(
|
|
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 =
|
|
6487
|
-
if (exists) return
|
|
6486
|
+
const exists = fs16.existsSync(dir);
|
|
6487
|
+
if (exists) return fs16.symlinkSync(srcpath, dstpath, type);
|
|
6488
6488
|
mkdirsSync(dir);
|
|
6489
|
-
return
|
|
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
|
|
6558
|
+
const fs16 = options.fs || _fs;
|
|
6559
6559
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
6560
|
-
let data = await universalify.fromCallback(
|
|
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
|
|
6580
|
+
const fs16 = options.fs || _fs;
|
|
6581
6581
|
const shouldThrow = "throws" in options ? options.throws : true;
|
|
6582
6582
|
try {
|
|
6583
|
-
let content =
|
|
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
|
|
6596
|
+
const fs16 = options.fs || _fs;
|
|
6597
6597
|
const str = stringify2(obj, options);
|
|
6598
|
-
await universalify.fromCallback(
|
|
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
|
|
6602
|
+
const fs16 = options.fs || _fs;
|
|
6603
6603
|
const str = stringify2(obj, options);
|
|
6604
|
-
return
|
|
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
|
|
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
|
|
6644
|
+
return fs16.writeFile(file, data, encoding);
|
|
6645
6645
|
}
|
|
6646
6646
|
function outputFileSync(file, ...args) {
|
|
6647
6647
|
const dir = path5.dirname(file);
|
|
6648
|
-
if (!
|
|
6648
|
+
if (!fs16.existsSync(dir)) {
|
|
6649
6649
|
mkdir.mkdirsSync(dir);
|
|
6650
6650
|
}
|
|
6651
|
-
|
|
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
|
|
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
|
|
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
|
|
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 (
|
|
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
|
-
|
|
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
|
|
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
|
|
28080
|
+
const fs16 = (0, node_1.default)();
|
|
28081
28081
|
const handler = (err, buffer) => {
|
|
28082
28082
|
if (fd) {
|
|
28083
|
-
|
|
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 =
|
|
28095
|
+
fd = fs16.openSync(filepath, "r");
|
|
28096
28096
|
let sample = Buffer.allocUnsafe(sampleSize);
|
|
28097
|
-
|
|
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
|
-
|
|
28109
|
+
fs16.readFile(filepath, handler);
|
|
28110
28110
|
});
|
|
28111
28111
|
exports2.detectFile = detectFile;
|
|
28112
28112
|
var detectFileSync = (filepath, opts = {}) => {
|
|
28113
|
-
const
|
|
28113
|
+
const fs16 = (0, node_1.default)();
|
|
28114
28114
|
if (opts && opts.sampleSize) {
|
|
28115
|
-
const fd =
|
|
28115
|
+
const fd = fs16.openSync(filepath, "r");
|
|
28116
28116
|
let sample = Buffer.allocUnsafe(opts.sampleSize);
|
|
28117
|
-
const bytesRead =
|
|
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
|
-
|
|
28121
|
+
fs16.closeSync(fd);
|
|
28122
28122
|
return (0, exports2.detect)(sample);
|
|
28123
28123
|
}
|
|
28124
|
-
return (0, exports2.detect)(
|
|
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
|
|
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
|
-
|
|
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
|
|
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 =
|
|
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(
|
|
91574
|
+
function RelativeDayOfWeek2(relative2, dayOfWeek) {
|
|
91575
91575
|
var _this3;
|
|
91576
91576
|
_this3 = _TemporalAdjuster3.call(this) || this;
|
|
91577
91577
|
requireNonNull(dayOfWeek, "dayOfWeek");
|
|
91578
|
-
_this3._relative =
|
|
91578
|
+
_this3._relative = relative2;
|
|
91579
91579
|
_this3._dowValue = dayOfWeek.value();
|
|
91580
91580
|
return _this3;
|
|
91581
91581
|
}
|
|
@@ -117947,6 +117947,7 @@ var openPattern = /\\{/g;
|
|
|
117947
117947
|
var closePattern = /\\}/g;
|
|
117948
117948
|
var commaPattern = /\\,/g;
|
|
117949
117949
|
var periodPattern = /\\./g;
|
|
117950
|
+
var EXPANSION_MAX = 1e5;
|
|
117950
117951
|
function numeric(str) {
|
|
117951
117952
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
117952
117953
|
}
|
|
@@ -117977,14 +117978,15 @@ function parseCommaParts(str) {
|
|
|
117977
117978
|
parts.push.apply(parts, p);
|
|
117978
117979
|
return parts;
|
|
117979
117980
|
}
|
|
117980
|
-
function expand(str) {
|
|
117981
|
+
function expand(str, options = {}) {
|
|
117981
117982
|
if (!str) {
|
|
117982
117983
|
return [];
|
|
117983
117984
|
}
|
|
117985
|
+
const { max = EXPANSION_MAX } = options;
|
|
117984
117986
|
if (str.slice(0, 2) === "{}") {
|
|
117985
117987
|
str = "\\{\\}" + str.slice(2);
|
|
117986
117988
|
}
|
|
117987
|
-
return expand_(escapeBraces(str), true).map(unescapeBraces);
|
|
117989
|
+
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
|
|
117988
117990
|
}
|
|
117989
117991
|
function embrace(str) {
|
|
117990
117992
|
return "{" + str + "}";
|
|
@@ -117998,15 +118000,15 @@ function lte(i, y) {
|
|
|
117998
118000
|
function gte(i, y) {
|
|
117999
118001
|
return i >= y;
|
|
118000
118002
|
}
|
|
118001
|
-
function expand_(str, isTop) {
|
|
118003
|
+
function expand_(str, max, isTop) {
|
|
118002
118004
|
const expansions = [];
|
|
118003
118005
|
const m = balanced("{", "}", str);
|
|
118004
118006
|
if (!m)
|
|
118005
118007
|
return [str];
|
|
118006
118008
|
const pre = m.pre;
|
|
118007
|
-
const post = m.post.length ? expand_(m.post, false) : [""];
|
|
118009
|
+
const post = m.post.length ? expand_(m.post, max, false) : [""];
|
|
118008
118010
|
if (/\$$/.test(m.pre)) {
|
|
118009
|
-
for (let k = 0; k < post.length; k++) {
|
|
118011
|
+
for (let k = 0; k < post.length && k < max; k++) {
|
|
118010
118012
|
const expansion = pre + "{" + m.body + "}" + post[k];
|
|
118011
118013
|
expansions.push(expansion);
|
|
118012
118014
|
}
|
|
@@ -118018,7 +118020,7 @@ function expand_(str, isTop) {
|
|
|
118018
118020
|
if (!isSequence && !isOptions) {
|
|
118019
118021
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
118020
118022
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
118021
|
-
return expand_(str);
|
|
118023
|
+
return expand_(str, max, true);
|
|
118022
118024
|
}
|
|
118023
118025
|
return [str];
|
|
118024
118026
|
}
|
|
@@ -118028,7 +118030,7 @@ function expand_(str, isTop) {
|
|
|
118028
118030
|
} else {
|
|
118029
118031
|
n = parseCommaParts(m.body);
|
|
118030
118032
|
if (n.length === 1 && n[0] !== void 0) {
|
|
118031
|
-
n = expand_(n[0], false).map(embrace);
|
|
118033
|
+
n = expand_(n[0], max, false).map(embrace);
|
|
118032
118034
|
if (n.length === 1) {
|
|
118033
118035
|
return post.map((p) => m.pre + n[0] + p);
|
|
118034
118036
|
}
|
|
@@ -118074,11 +118076,11 @@ function expand_(str, isTop) {
|
|
|
118074
118076
|
} else {
|
|
118075
118077
|
N = [];
|
|
118076
118078
|
for (let j = 0; j < n.length; j++) {
|
|
118077
|
-
N.push.apply(N, expand_(n[j], false));
|
|
118079
|
+
N.push.apply(N, expand_(n[j], max, false));
|
|
118078
118080
|
}
|
|
118079
118081
|
}
|
|
118080
118082
|
for (let j = 0; j < N.length; j++) {
|
|
118081
|
-
for (let k = 0; k < post.length; k++) {
|
|
118083
|
+
for (let k = 0; k < post.length && expansions.length < max; k++) {
|
|
118082
118084
|
const expansion = pre + N[j] + post[k];
|
|
118083
118085
|
if (!isTop || isSequence || expansion) {
|
|
118084
118086
|
expansions.push(expansion);
|
|
@@ -122862,8 +122864,8 @@ var PathScurryBase = class {
|
|
|
122862
122864
|
*
|
|
122863
122865
|
* @internal
|
|
122864
122866
|
*/
|
|
122865
|
-
constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs:
|
|
122866
|
-
this.#fs = fsFromOption(
|
|
122867
|
+
constructor(cwd = process.cwd(), pathImpl, sep2, { nocase, childrenCacheSize = 16 * 1024, fs: fs16 = defaultFS } = {}) {
|
|
122868
|
+
this.#fs = fsFromOption(fs16);
|
|
122867
122869
|
if (cwd instanceof URL || cwd.startsWith("file://")) {
|
|
122868
122870
|
cwd = (0, import_node_url.fileURLToPath)(cwd);
|
|
122869
122871
|
}
|
|
@@ -123421,8 +123423,8 @@ var PathScurryWin32 = class extends PathScurryBase {
|
|
|
123421
123423
|
/**
|
|
123422
123424
|
* @internal
|
|
123423
123425
|
*/
|
|
123424
|
-
newRoot(
|
|
123425
|
-
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
123426
|
+
newRoot(fs16) {
|
|
123427
|
+
return new PathWin32(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs16 });
|
|
123426
123428
|
}
|
|
123427
123429
|
/**
|
|
123428
123430
|
* Return true if the provided path string is an absolute path
|
|
@@ -123450,8 +123452,8 @@ var PathScurryPosix = class extends PathScurryBase {
|
|
|
123450
123452
|
/**
|
|
123451
123453
|
* @internal
|
|
123452
123454
|
*/
|
|
123453
|
-
newRoot(
|
|
123454
|
-
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs:
|
|
123455
|
+
newRoot(fs16) {
|
|
123456
|
+
return new PathPosix(this.rootPath, IFDIR, void 0, this.roots, this.nocase, this.childrenCache(), { fs: fs16 });
|
|
123455
123457
|
}
|
|
123456
123458
|
/**
|
|
123457
123459
|
* Return true if the provided path string is an absolute path
|
|
@@ -123694,10 +123696,10 @@ var Ignore = class {
|
|
|
123694
123696
|
ignored(p) {
|
|
123695
123697
|
const fullpath = p.fullpath();
|
|
123696
123698
|
const fullpaths = `${fullpath}/`;
|
|
123697
|
-
const
|
|
123698
|
-
const relatives = `${
|
|
123699
|
+
const relative2 = p.relative() || ".";
|
|
123700
|
+
const relatives = `${relative2}/`;
|
|
123699
123701
|
for (const m of this.relative) {
|
|
123700
|
-
if (m.match(
|
|
123702
|
+
if (m.match(relative2) || m.match(relatives))
|
|
123701
123703
|
return true;
|
|
123702
123704
|
}
|
|
123703
123705
|
for (const m of this.absolute) {
|
|
@@ -123708,9 +123710,9 @@ var Ignore = class {
|
|
|
123708
123710
|
}
|
|
123709
123711
|
childrenIgnored(p) {
|
|
123710
123712
|
const fullpath = p.fullpath() + "/";
|
|
123711
|
-
const
|
|
123713
|
+
const relative2 = (p.relative() || ".") + "/";
|
|
123712
123714
|
for (const m of this.relativeChildren) {
|
|
123713
|
-
if (m.match(
|
|
123715
|
+
if (m.match(relative2))
|
|
123714
123716
|
return true;
|
|
123715
123717
|
}
|
|
123716
123718
|
for (const m of this.absoluteChildren) {
|
|
@@ -125907,7 +125909,7 @@ function executeSqlCmd(server, database, query, sqlAuth) {
|
|
|
125907
125909
|
const sqlServer = server === "(local)" ? "." : server;
|
|
125908
125910
|
const authFlag = sqlAuth ? `-U "${sqlAuth.user}" -P "${sqlAuth.password}"` : "-E";
|
|
125909
125911
|
const cmd = `sqlcmd -S "${sqlServer}" -d "${database}" ${authFlag} -I -C -Q "${query.replace(/"/g, '\\"')}" -h -1 -W`;
|
|
125910
|
-
return (0, import_child_process8.execSync)(cmd, { encoding: "utf-8" }).trim();
|
|
125912
|
+
return (0, import_child_process8.execSync)(cmd, { encoding: "utf-8", timeout: 15e3 }).trim();
|
|
125911
125913
|
}
|
|
125912
125914
|
function isLoginFailure(error) {
|
|
125913
125915
|
const msg = error instanceof Error ? error.message : String(error);
|
|
@@ -126120,7 +126122,23 @@ adminCommand.command("reset").description("Reset the localAdmin account password
|
|
|
126120
126122
|
if (nativeDriver) {
|
|
126121
126123
|
try {
|
|
126122
126124
|
spinner.text = "Connecting with Windows Authentication...";
|
|
126123
|
-
|
|
126125
|
+
const nativeServer = connInfo.server === "(local)" ? "localhost" : connInfo.server;
|
|
126126
|
+
const nativeConfig = {
|
|
126127
|
+
server: nativeServer,
|
|
126128
|
+
database: connInfo.database,
|
|
126129
|
+
options: {
|
|
126130
|
+
trustedConnection: true,
|
|
126131
|
+
trustServerCertificate: true
|
|
126132
|
+
},
|
|
126133
|
+
connectionTimeout: 15e3,
|
|
126134
|
+
requestTimeout: 15e3
|
|
126135
|
+
};
|
|
126136
|
+
await Promise.race([
|
|
126137
|
+
nativeDriver.connect(nativeConfig),
|
|
126138
|
+
new Promise(
|
|
126139
|
+
(_3, reject) => setTimeout(() => reject(new Error("Connection timeout (15s)")), 15e3)
|
|
126140
|
+
)
|
|
126141
|
+
]);
|
|
126124
126142
|
nativeConnected = true;
|
|
126125
126143
|
await resetViaMssql(nativeDriver);
|
|
126126
126144
|
} catch (nativeError) {
|
|
@@ -126418,10 +126436,239 @@ mcpCommand.command("remove").description("Unregister MCP servers from CLI and VS
|
|
|
126418
126436
|
logger.box(["MCP servers unregistered.", "", "Re-register with: ss mcp install"], "info");
|
|
126419
126437
|
});
|
|
126420
126438
|
|
|
126439
|
+
// src/commands/derive-prd.ts
|
|
126440
|
+
var import_fs_extra9 = __toESM(require_lib());
|
|
126441
|
+
var import_path11 = require("path");
|
|
126442
|
+
|
|
126443
|
+
// src/utils/prd-extractor.ts
|
|
126444
|
+
function extractPrd(moduleFeature, featureJsonPath, namespace) {
|
|
126445
|
+
const { metadata, analysis, specification, handoff } = moduleFeature;
|
|
126446
|
+
return {
|
|
126447
|
+
version: "2.0.0",
|
|
126448
|
+
source: {
|
|
126449
|
+
type: "ba-handoff-programmatic",
|
|
126450
|
+
featureJson: featureJsonPath,
|
|
126451
|
+
extractedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
126452
|
+
},
|
|
126453
|
+
project: {
|
|
126454
|
+
application: metadata.application,
|
|
126455
|
+
module: metadata.module,
|
|
126456
|
+
...namespace ? { namespace } : {}
|
|
126457
|
+
},
|
|
126458
|
+
requirements: {
|
|
126459
|
+
useCases: (specification?.useCases ?? []).map((uc) => ({
|
|
126460
|
+
id: uc.id,
|
|
126461
|
+
name: uc.name,
|
|
126462
|
+
actor: uc.primaryActor,
|
|
126463
|
+
permission: uc.permission,
|
|
126464
|
+
steps: uc.mainScenario ?? [],
|
|
126465
|
+
linkedRules: uc.linkedRules ?? []
|
|
126466
|
+
})),
|
|
126467
|
+
functionalRequirements: (specification?.functionalRequirements ?? []).map((fr) => ({
|
|
126468
|
+
id: fr.id,
|
|
126469
|
+
statement: fr.statement,
|
|
126470
|
+
priority: fr.priority,
|
|
126471
|
+
linkedUCs: fr.linkedUseCases ?? []
|
|
126472
|
+
}))
|
|
126473
|
+
},
|
|
126474
|
+
businessRules: (analysis?.businessRules ?? []).map((br) => ({
|
|
126475
|
+
id: br.id,
|
|
126476
|
+
name: br.name,
|
|
126477
|
+
category: br.category,
|
|
126478
|
+
statement: br.statement,
|
|
126479
|
+
priority: br.priority
|
|
126480
|
+
})),
|
|
126481
|
+
architecture: {
|
|
126482
|
+
entities: (analysis?.entities ?? []).map((e) => ({
|
|
126483
|
+
name: e.name,
|
|
126484
|
+
description: e.description,
|
|
126485
|
+
type: e.type,
|
|
126486
|
+
attributes: e.attributes,
|
|
126487
|
+
relationships: e.relationships
|
|
126488
|
+
})),
|
|
126489
|
+
apiEndpoints: (specification?.apiEndpoints ?? []).map((ep) => ({
|
|
126490
|
+
method: ep.method,
|
|
126491
|
+
route: ep.route,
|
|
126492
|
+
operation: ep.operation,
|
|
126493
|
+
permission: ep.permission,
|
|
126494
|
+
requestSchema: ep.requestSchema,
|
|
126495
|
+
responseSchema: ep.responseSchema,
|
|
126496
|
+
errorCodes: ep.errorCodes,
|
|
126497
|
+
linkedUC: ep.linkedUC,
|
|
126498
|
+
module: ep.module
|
|
126499
|
+
})),
|
|
126500
|
+
permissionMatrix: specification?.permissionMatrix ?? { permissions: [], roleAssignments: [] },
|
|
126501
|
+
sections: (specification?.sections ?? []).map((s) => ({
|
|
126502
|
+
code: s.code,
|
|
126503
|
+
name: s.name,
|
|
126504
|
+
description: s.description,
|
|
126505
|
+
route: s.route,
|
|
126506
|
+
permission: s.permission,
|
|
126507
|
+
resources: s.resources?.map((r) => ({
|
|
126508
|
+
code: r.code,
|
|
126509
|
+
type: r.type,
|
|
126510
|
+
entity: r.entity,
|
|
126511
|
+
permission: r.permission,
|
|
126512
|
+
columns: r.columns,
|
|
126513
|
+
actions: r.actions
|
|
126514
|
+
}))
|
|
126515
|
+
}))
|
|
126516
|
+
},
|
|
126517
|
+
implementation: {
|
|
126518
|
+
strategy: handoff?.implementationStrategy ?? "module-by-module",
|
|
126519
|
+
filesToCreate: handoff?.filesToCreate ?? {},
|
|
126520
|
+
brToCodeMapping: (handoff?.brToCodeMapping ?? []).map((m) => ({
|
|
126521
|
+
ruleId: m.ruleId,
|
|
126522
|
+
ruleName: m.ruleName,
|
|
126523
|
+
targetFile: m.targetFile,
|
|
126524
|
+
targetMethod: m.targetMethod,
|
|
126525
|
+
implementationType: m.implementationType
|
|
126526
|
+
}))
|
|
126527
|
+
},
|
|
126528
|
+
seedData: {
|
|
126529
|
+
core: specification?.seedDataCore,
|
|
126530
|
+
business: specification?.seedDataBusiness
|
|
126531
|
+
}
|
|
126532
|
+
};
|
|
126533
|
+
}
|
|
126534
|
+
function validateForPrdExtraction(feature) {
|
|
126535
|
+
const errors = [];
|
|
126536
|
+
if (!feature.id) {
|
|
126537
|
+
errors.push("Missing feature ID");
|
|
126538
|
+
}
|
|
126539
|
+
if (!feature.metadata?.application) {
|
|
126540
|
+
errors.push("Missing metadata.application");
|
|
126541
|
+
}
|
|
126542
|
+
if (!feature.metadata?.module) {
|
|
126543
|
+
errors.push("Missing metadata.module");
|
|
126544
|
+
}
|
|
126545
|
+
if (feature.status !== "handed-off" && feature.status !== "approved" && feature.status !== "consolidated") {
|
|
126546
|
+
errors.push(`Feature status is "${feature.status}" \u2014 expected "handed-off", "approved", or "consolidated"`);
|
|
126547
|
+
}
|
|
126548
|
+
if (!feature.specification?.useCases?.length) {
|
|
126549
|
+
errors.push("No use cases found in specification");
|
|
126550
|
+
}
|
|
126551
|
+
if (!feature.analysis?.businessRules?.length) {
|
|
126552
|
+
errors.push("No business rules found in analysis");
|
|
126553
|
+
}
|
|
126554
|
+
if (!feature.handoff?.filesToCreate) {
|
|
126555
|
+
errors.push("No filesToCreate found in handoff");
|
|
126556
|
+
}
|
|
126557
|
+
return errors;
|
|
126558
|
+
}
|
|
126559
|
+
|
|
126560
|
+
// src/commands/derive-prd.ts
|
|
126561
|
+
function readSmartStackNamespace() {
|
|
126562
|
+
try {
|
|
126563
|
+
const configPath = (0, import_path11.join)(process.cwd(), ".smartstack", "config.json");
|
|
126564
|
+
if (import_fs_extra9.default.existsSync(configPath)) {
|
|
126565
|
+
const config = import_fs_extra9.default.readJsonSync(configPath);
|
|
126566
|
+
return config.baseNamespace;
|
|
126567
|
+
}
|
|
126568
|
+
} catch {
|
|
126569
|
+
}
|
|
126570
|
+
return void 0;
|
|
126571
|
+
}
|
|
126572
|
+
async function findModuleFeatureFiles(masterPath) {
|
|
126573
|
+
const master = await import_fs_extra9.default.readJson(masterPath);
|
|
126574
|
+
const masterDir = (0, import_path11.dirname)(masterPath);
|
|
126575
|
+
const paths = [];
|
|
126576
|
+
if (master.modules) {
|
|
126577
|
+
for (const mod of master.modules) {
|
|
126578
|
+
if (mod.featureJsonPath) {
|
|
126579
|
+
const fullPath = (0, import_path11.join)(masterDir, "..", "..", mod.featureJsonPath);
|
|
126580
|
+
if (await import_fs_extra9.default.pathExists(fullPath)) {
|
|
126581
|
+
paths.push(fullPath);
|
|
126582
|
+
}
|
|
126583
|
+
}
|
|
126584
|
+
}
|
|
126585
|
+
}
|
|
126586
|
+
return paths;
|
|
126587
|
+
}
|
|
126588
|
+
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) => {
|
|
126589
|
+
if (!options.feature && !options.application) {
|
|
126590
|
+
console.log(source_default.red("Error: Provide either --feature or --application path"));
|
|
126591
|
+
process.exit(1);
|
|
126592
|
+
}
|
|
126593
|
+
const namespace = readSmartStackNamespace();
|
|
126594
|
+
const ralphDir = (0, import_path11.join)(process.cwd(), ".ralph");
|
|
126595
|
+
await import_fs_extra9.default.ensureDir(ralphDir);
|
|
126596
|
+
let featurePaths = [];
|
|
126597
|
+
if (options.application) {
|
|
126598
|
+
const appPath = (0, import_path11.join)(process.cwd(), options.application);
|
|
126599
|
+
if (!await import_fs_extra9.default.pathExists(appPath)) {
|
|
126600
|
+
console.log(source_default.red(`Application feature.json not found: ${appPath}`));
|
|
126601
|
+
process.exit(1);
|
|
126602
|
+
}
|
|
126603
|
+
const modulePaths = await findModuleFeatureFiles(appPath);
|
|
126604
|
+
if (modulePaths.length === 0) {
|
|
126605
|
+
console.log(source_default.red("No module feature.json files found referenced in application master"));
|
|
126606
|
+
process.exit(1);
|
|
126607
|
+
}
|
|
126608
|
+
featurePaths = modulePaths.map((p) => ({ path: p, isApplicationMode: true }));
|
|
126609
|
+
console.log(source_default.cyan(`Found ${featurePaths.length} module(s) to process`));
|
|
126610
|
+
} else if (options.feature) {
|
|
126611
|
+
const featurePath = (0, import_path11.join)(process.cwd(), options.feature);
|
|
126612
|
+
if (!await import_fs_extra9.default.pathExists(featurePath)) {
|
|
126613
|
+
console.log(source_default.red(`Feature.json not found: ${featurePath}`));
|
|
126614
|
+
process.exit(1);
|
|
126615
|
+
}
|
|
126616
|
+
featurePaths = [{ path: featurePath, isApplicationMode: false }];
|
|
126617
|
+
}
|
|
126618
|
+
let totalGenerated = 0;
|
|
126619
|
+
let totalErrors = 0;
|
|
126620
|
+
for (const entry of featurePaths) {
|
|
126621
|
+
const featureJson = await import_fs_extra9.default.readJson(entry.path);
|
|
126622
|
+
const moduleName = featureJson.metadata?.module ?? "unknown";
|
|
126623
|
+
console.log(source_default.cyan(`
|
|
126624
|
+
Processing module: ${source_default.bold(moduleName)}`));
|
|
126625
|
+
const errors = validateForPrdExtraction(featureJson);
|
|
126626
|
+
if (errors.length > 0) {
|
|
126627
|
+
console.log(source_default.yellow(` Validation warnings:`));
|
|
126628
|
+
for (const err of errors) {
|
|
126629
|
+
console.log(source_default.yellow(` - ${err}`));
|
|
126630
|
+
}
|
|
126631
|
+
if (options.strict) {
|
|
126632
|
+
console.log(source_default.red(` Skipping ${moduleName} (--strict mode)`));
|
|
126633
|
+
totalErrors++;
|
|
126634
|
+
continue;
|
|
126635
|
+
}
|
|
126636
|
+
}
|
|
126637
|
+
const relativePath = (0, import_path11.relative)(process.cwd(), entry.path);
|
|
126638
|
+
const prd = extractPrd(featureJson, relativePath, namespace);
|
|
126639
|
+
let outputPath;
|
|
126640
|
+
if (options.output && !entry.isApplicationMode) {
|
|
126641
|
+
outputPath = (0, import_path11.join)(process.cwd(), options.output);
|
|
126642
|
+
} else {
|
|
126643
|
+
outputPath = (0, import_path11.join)(ralphDir, `prd-${moduleName}.json`);
|
|
126644
|
+
}
|
|
126645
|
+
await import_fs_extra9.default.writeJson(outputPath, prd, { spaces: 2 });
|
|
126646
|
+
totalGenerated++;
|
|
126647
|
+
const relOutput = (0, import_path11.relative)(process.cwd(), outputPath);
|
|
126648
|
+
console.log(source_default.green(` Generated: ${relOutput}`));
|
|
126649
|
+
console.log(source_default.gray(` UCs: ${prd.requirements.useCases.length} | FRs: ${prd.requirements.functionalRequirements.length} | BRs: ${prd.businessRules.length}`));
|
|
126650
|
+
console.log(source_default.gray(` Endpoints: ${prd.architecture.apiEndpoints.length} | Sections: ${prd.architecture.sections.length}`));
|
|
126651
|
+
const fileCount = Object.values(prd.implementation.filesToCreate).reduce((sum, files) => sum + (files?.length ?? 0), 0);
|
|
126652
|
+
console.log(source_default.gray(` Files to create: ${fileCount} | BR mappings: ${prd.implementation.brToCodeMapping.length}`));
|
|
126653
|
+
}
|
|
126654
|
+
console.log();
|
|
126655
|
+
if (totalErrors > 0) {
|
|
126656
|
+
logger.box([
|
|
126657
|
+
`PRD extraction completed with ${totalErrors} error(s)`,
|
|
126658
|
+
`${totalGenerated} prd.json file(s) generated`
|
|
126659
|
+
], "warning");
|
|
126660
|
+
} else {
|
|
126661
|
+
logger.box([
|
|
126662
|
+
`PRD extraction complete`,
|
|
126663
|
+
`${totalGenerated} prd.json file(s) generated in .ralph/`
|
|
126664
|
+
], "success");
|
|
126665
|
+
}
|
|
126666
|
+
});
|
|
126667
|
+
|
|
126421
126668
|
// src/index.ts
|
|
126422
126669
|
var import_fs5 = require("fs");
|
|
126423
|
-
var
|
|
126424
|
-
var pkg = JSON.parse((0, import_fs5.readFileSync)((0,
|
|
126670
|
+
var import_path12 = require("path");
|
|
126671
|
+
var pkg = JSON.parse((0, import_fs5.readFileSync)((0, import_path12.join)(__dirname, "..", "package.json"), "utf-8"));
|
|
126425
126672
|
var LICENSE_FREE_COMMANDS = ["license", "help", "--help", "-h", "--version", "-v"];
|
|
126426
126673
|
async function main2() {
|
|
126427
126674
|
const program2 = new Command();
|
|
@@ -126439,6 +126686,7 @@ async function main2() {
|
|
|
126439
126686
|
program2.addCommand(doctorCommand);
|
|
126440
126687
|
program2.addCommand(adminCommand);
|
|
126441
126688
|
program2.addCommand(mcpCommand);
|
|
126689
|
+
program2.addCommand(derivePrdCommand);
|
|
126442
126690
|
const args = process.argv.slice(2);
|
|
126443
126691
|
const commandName = args[0] || "";
|
|
126444
126692
|
const requiresLicense = !LICENSE_FREE_COMMANDS.some(
|