@mrrlin-dev/mcp 0.2.3 → 0.2.4
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/dist/bin.cjs +354 -271
- package/dist/prompts/report-issue.md +155 -0
- package/package.json +5 -4
package/dist/bin.cjs
CHANGED
|
@@ -5730,54 +5730,54 @@ var require_polyfills = __commonJS({
|
|
|
5730
5730
|
}
|
|
5731
5731
|
var chdir;
|
|
5732
5732
|
module2.exports = patch;
|
|
5733
|
-
function patch(
|
|
5733
|
+
function patch(fs6) {
|
|
5734
5734
|
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
5735
|
-
patchLchmod(
|
|
5736
|
-
}
|
|
5737
|
-
if (!
|
|
5738
|
-
patchLutimes(
|
|
5739
|
-
}
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5750
|
-
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
if (
|
|
5759
|
-
|
|
5735
|
+
patchLchmod(fs6);
|
|
5736
|
+
}
|
|
5737
|
+
if (!fs6.lutimes) {
|
|
5738
|
+
patchLutimes(fs6);
|
|
5739
|
+
}
|
|
5740
|
+
fs6.chown = chownFix(fs6.chown);
|
|
5741
|
+
fs6.fchown = chownFix(fs6.fchown);
|
|
5742
|
+
fs6.lchown = chownFix(fs6.lchown);
|
|
5743
|
+
fs6.chmod = chmodFix(fs6.chmod);
|
|
5744
|
+
fs6.fchmod = chmodFix(fs6.fchmod);
|
|
5745
|
+
fs6.lchmod = chmodFix(fs6.lchmod);
|
|
5746
|
+
fs6.chownSync = chownFixSync(fs6.chownSync);
|
|
5747
|
+
fs6.fchownSync = chownFixSync(fs6.fchownSync);
|
|
5748
|
+
fs6.lchownSync = chownFixSync(fs6.lchownSync);
|
|
5749
|
+
fs6.chmodSync = chmodFixSync(fs6.chmodSync);
|
|
5750
|
+
fs6.fchmodSync = chmodFixSync(fs6.fchmodSync);
|
|
5751
|
+
fs6.lchmodSync = chmodFixSync(fs6.lchmodSync);
|
|
5752
|
+
fs6.stat = statFix(fs6.stat);
|
|
5753
|
+
fs6.fstat = statFix(fs6.fstat);
|
|
5754
|
+
fs6.lstat = statFix(fs6.lstat);
|
|
5755
|
+
fs6.statSync = statFixSync(fs6.statSync);
|
|
5756
|
+
fs6.fstatSync = statFixSync(fs6.fstatSync);
|
|
5757
|
+
fs6.lstatSync = statFixSync(fs6.lstatSync);
|
|
5758
|
+
if (fs6.chmod && !fs6.lchmod) {
|
|
5759
|
+
fs6.lchmod = function(path14, mode, cb) {
|
|
5760
5760
|
if (cb) process.nextTick(cb);
|
|
5761
5761
|
};
|
|
5762
|
-
|
|
5762
|
+
fs6.lchmodSync = function() {
|
|
5763
5763
|
};
|
|
5764
5764
|
}
|
|
5765
|
-
if (
|
|
5766
|
-
|
|
5765
|
+
if (fs6.chown && !fs6.lchown) {
|
|
5766
|
+
fs6.lchown = function(path14, uid, gid, cb) {
|
|
5767
5767
|
if (cb) process.nextTick(cb);
|
|
5768
5768
|
};
|
|
5769
|
-
|
|
5769
|
+
fs6.lchownSync = function() {
|
|
5770
5770
|
};
|
|
5771
5771
|
}
|
|
5772
5772
|
if (platform === "win32") {
|
|
5773
|
-
|
|
5773
|
+
fs6.rename = typeof fs6.rename !== "function" ? fs6.rename : function(fs$rename) {
|
|
5774
5774
|
function rename(from, to, cb) {
|
|
5775
5775
|
var start = Date.now();
|
|
5776
5776
|
var backoff = 0;
|
|
5777
5777
|
fs$rename(from, to, function CB(er) {
|
|
5778
5778
|
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
5779
5779
|
setTimeout(function() {
|
|
5780
|
-
|
|
5780
|
+
fs6.stat(to, function(stater, st) {
|
|
5781
5781
|
if (stater && stater.code === "ENOENT")
|
|
5782
5782
|
fs$rename(from, to, CB);
|
|
5783
5783
|
else
|
|
@@ -5793,9 +5793,9 @@ var require_polyfills = __commonJS({
|
|
|
5793
5793
|
}
|
|
5794
5794
|
if (Object.setPrototypeOf) Object.setPrototypeOf(rename, fs$rename);
|
|
5795
5795
|
return rename;
|
|
5796
|
-
}(
|
|
5796
|
+
}(fs6.rename);
|
|
5797
5797
|
}
|
|
5798
|
-
|
|
5798
|
+
fs6.read = typeof fs6.read !== "function" ? fs6.read : function(fs$read) {
|
|
5799
5799
|
function read(fd, buffer, offset, length, position, callback_) {
|
|
5800
5800
|
var callback;
|
|
5801
5801
|
if (callback_ && typeof callback_ === "function") {
|
|
@@ -5803,22 +5803,22 @@ var require_polyfills = __commonJS({
|
|
|
5803
5803
|
callback = function(er, _, __) {
|
|
5804
5804
|
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
5805
5805
|
eagCounter++;
|
|
5806
|
-
return fs$read.call(
|
|
5806
|
+
return fs$read.call(fs6, fd, buffer, offset, length, position, callback);
|
|
5807
5807
|
}
|
|
5808
5808
|
callback_.apply(this, arguments);
|
|
5809
5809
|
};
|
|
5810
5810
|
}
|
|
5811
|
-
return fs$read.call(
|
|
5811
|
+
return fs$read.call(fs6, fd, buffer, offset, length, position, callback);
|
|
5812
5812
|
}
|
|
5813
5813
|
if (Object.setPrototypeOf) Object.setPrototypeOf(read, fs$read);
|
|
5814
5814
|
return read;
|
|
5815
|
-
}(
|
|
5816
|
-
|
|
5815
|
+
}(fs6.read);
|
|
5816
|
+
fs6.readSync = typeof fs6.readSync !== "function" ? fs6.readSync : /* @__PURE__ */ function(fs$readSync) {
|
|
5817
5817
|
return function(fd, buffer, offset, length, position) {
|
|
5818
5818
|
var eagCounter = 0;
|
|
5819
5819
|
while (true) {
|
|
5820
5820
|
try {
|
|
5821
|
-
return fs$readSync.call(
|
|
5821
|
+
return fs$readSync.call(fs6, fd, buffer, offset, length, position);
|
|
5822
5822
|
} catch (er) {
|
|
5823
5823
|
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
5824
5824
|
eagCounter++;
|
|
@@ -5828,11 +5828,11 @@ var require_polyfills = __commonJS({
|
|
|
5828
5828
|
}
|
|
5829
5829
|
}
|
|
5830
5830
|
};
|
|
5831
|
-
}(
|
|
5832
|
-
function patchLchmod(
|
|
5833
|
-
|
|
5834
|
-
|
|
5835
|
-
|
|
5831
|
+
}(fs6.readSync);
|
|
5832
|
+
function patchLchmod(fs7) {
|
|
5833
|
+
fs7.lchmod = function(path14, mode, callback) {
|
|
5834
|
+
fs7.open(
|
|
5835
|
+
path14,
|
|
5836
5836
|
constants.O_WRONLY | constants.O_SYMLINK,
|
|
5837
5837
|
mode,
|
|
5838
5838
|
function(err, fd) {
|
|
@@ -5840,80 +5840,80 @@ var require_polyfills = __commonJS({
|
|
|
5840
5840
|
if (callback) callback(err);
|
|
5841
5841
|
return;
|
|
5842
5842
|
}
|
|
5843
|
-
|
|
5844
|
-
|
|
5843
|
+
fs7.fchmod(fd, mode, function(err2) {
|
|
5844
|
+
fs7.close(fd, function(err22) {
|
|
5845
5845
|
if (callback) callback(err2 || err22);
|
|
5846
5846
|
});
|
|
5847
5847
|
});
|
|
5848
5848
|
}
|
|
5849
5849
|
);
|
|
5850
5850
|
};
|
|
5851
|
-
|
|
5852
|
-
var fd =
|
|
5851
|
+
fs7.lchmodSync = function(path14, mode) {
|
|
5852
|
+
var fd = fs7.openSync(path14, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
5853
5853
|
var threw = true;
|
|
5854
5854
|
var ret;
|
|
5855
5855
|
try {
|
|
5856
|
-
ret =
|
|
5856
|
+
ret = fs7.fchmodSync(fd, mode);
|
|
5857
5857
|
threw = false;
|
|
5858
5858
|
} finally {
|
|
5859
5859
|
if (threw) {
|
|
5860
5860
|
try {
|
|
5861
|
-
|
|
5861
|
+
fs7.closeSync(fd);
|
|
5862
5862
|
} catch (er) {
|
|
5863
5863
|
}
|
|
5864
5864
|
} else {
|
|
5865
|
-
|
|
5865
|
+
fs7.closeSync(fd);
|
|
5866
5866
|
}
|
|
5867
5867
|
}
|
|
5868
5868
|
return ret;
|
|
5869
5869
|
};
|
|
5870
5870
|
}
|
|
5871
|
-
function patchLutimes(
|
|
5872
|
-
if (constants.hasOwnProperty("O_SYMLINK") &&
|
|
5873
|
-
|
|
5874
|
-
|
|
5871
|
+
function patchLutimes(fs7) {
|
|
5872
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs7.futimes) {
|
|
5873
|
+
fs7.lutimes = function(path14, at, mt, cb) {
|
|
5874
|
+
fs7.open(path14, constants.O_SYMLINK, function(er, fd) {
|
|
5875
5875
|
if (er) {
|
|
5876
5876
|
if (cb) cb(er);
|
|
5877
5877
|
return;
|
|
5878
5878
|
}
|
|
5879
|
-
|
|
5880
|
-
|
|
5879
|
+
fs7.futimes(fd, at, mt, function(er2) {
|
|
5880
|
+
fs7.close(fd, function(er22) {
|
|
5881
5881
|
if (cb) cb(er2 || er22);
|
|
5882
5882
|
});
|
|
5883
5883
|
});
|
|
5884
5884
|
});
|
|
5885
5885
|
};
|
|
5886
|
-
|
|
5887
|
-
var fd =
|
|
5886
|
+
fs7.lutimesSync = function(path14, at, mt) {
|
|
5887
|
+
var fd = fs7.openSync(path14, constants.O_SYMLINK);
|
|
5888
5888
|
var ret;
|
|
5889
5889
|
var threw = true;
|
|
5890
5890
|
try {
|
|
5891
|
-
ret =
|
|
5891
|
+
ret = fs7.futimesSync(fd, at, mt);
|
|
5892
5892
|
threw = false;
|
|
5893
5893
|
} finally {
|
|
5894
5894
|
if (threw) {
|
|
5895
5895
|
try {
|
|
5896
|
-
|
|
5896
|
+
fs7.closeSync(fd);
|
|
5897
5897
|
} catch (er) {
|
|
5898
5898
|
}
|
|
5899
5899
|
} else {
|
|
5900
|
-
|
|
5900
|
+
fs7.closeSync(fd);
|
|
5901
5901
|
}
|
|
5902
5902
|
}
|
|
5903
5903
|
return ret;
|
|
5904
5904
|
};
|
|
5905
|
-
} else if (
|
|
5906
|
-
|
|
5905
|
+
} else if (fs7.futimes) {
|
|
5906
|
+
fs7.lutimes = function(_a3, _b, _c, cb) {
|
|
5907
5907
|
if (cb) process.nextTick(cb);
|
|
5908
5908
|
};
|
|
5909
|
-
|
|
5909
|
+
fs7.lutimesSync = function() {
|
|
5910
5910
|
};
|
|
5911
5911
|
}
|
|
5912
5912
|
}
|
|
5913
5913
|
function chmodFix(orig) {
|
|
5914
5914
|
if (!orig) return orig;
|
|
5915
5915
|
return function(target, mode, cb) {
|
|
5916
|
-
return orig.call(
|
|
5916
|
+
return orig.call(fs6, target, mode, function(er) {
|
|
5917
5917
|
if (chownErOk(er)) er = null;
|
|
5918
5918
|
if (cb) cb.apply(this, arguments);
|
|
5919
5919
|
});
|
|
@@ -5923,7 +5923,7 @@ var require_polyfills = __commonJS({
|
|
|
5923
5923
|
if (!orig) return orig;
|
|
5924
5924
|
return function(target, mode) {
|
|
5925
5925
|
try {
|
|
5926
|
-
return orig.call(
|
|
5926
|
+
return orig.call(fs6, target, mode);
|
|
5927
5927
|
} catch (er) {
|
|
5928
5928
|
if (!chownErOk(er)) throw er;
|
|
5929
5929
|
}
|
|
@@ -5932,7 +5932,7 @@ var require_polyfills = __commonJS({
|
|
|
5932
5932
|
function chownFix(orig) {
|
|
5933
5933
|
if (!orig) return orig;
|
|
5934
5934
|
return function(target, uid, gid, cb) {
|
|
5935
|
-
return orig.call(
|
|
5935
|
+
return orig.call(fs6, target, uid, gid, function(er) {
|
|
5936
5936
|
if (chownErOk(er)) er = null;
|
|
5937
5937
|
if (cb) cb.apply(this, arguments);
|
|
5938
5938
|
});
|
|
@@ -5942,7 +5942,7 @@ var require_polyfills = __commonJS({
|
|
|
5942
5942
|
if (!orig) return orig;
|
|
5943
5943
|
return function(target, uid, gid) {
|
|
5944
5944
|
try {
|
|
5945
|
-
return orig.call(
|
|
5945
|
+
return orig.call(fs6, target, uid, gid);
|
|
5946
5946
|
} catch (er) {
|
|
5947
5947
|
if (!chownErOk(er)) throw er;
|
|
5948
5948
|
}
|
|
@@ -5962,13 +5962,13 @@ var require_polyfills = __commonJS({
|
|
|
5962
5962
|
}
|
|
5963
5963
|
if (cb) cb.apply(this, arguments);
|
|
5964
5964
|
}
|
|
5965
|
-
return options ? orig.call(
|
|
5965
|
+
return options ? orig.call(fs6, target, options, callback) : orig.call(fs6, target, callback);
|
|
5966
5966
|
};
|
|
5967
5967
|
}
|
|
5968
5968
|
function statFixSync(orig) {
|
|
5969
5969
|
if (!orig) return orig;
|
|
5970
5970
|
return function(target, options) {
|
|
5971
|
-
var stats = options ? orig.call(
|
|
5971
|
+
var stats = options ? orig.call(fs6, target, options) : orig.call(fs6, target);
|
|
5972
5972
|
if (stats) {
|
|
5973
5973
|
if (stats.uid < 0) stats.uid += 4294967296;
|
|
5974
5974
|
if (stats.gid < 0) stats.gid += 4294967296;
|
|
@@ -5997,16 +5997,16 @@ var require_legacy_streams = __commonJS({
|
|
|
5997
5997
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports2, module2) {
|
|
5998
5998
|
var Stream = require("stream").Stream;
|
|
5999
5999
|
module2.exports = legacy;
|
|
6000
|
-
function legacy(
|
|
6000
|
+
function legacy(fs6) {
|
|
6001
6001
|
return {
|
|
6002
6002
|
ReadStream,
|
|
6003
6003
|
WriteStream
|
|
6004
6004
|
};
|
|
6005
|
-
function ReadStream(
|
|
6006
|
-
if (!(this instanceof ReadStream)) return new ReadStream(
|
|
6005
|
+
function ReadStream(path14, options) {
|
|
6006
|
+
if (!(this instanceof ReadStream)) return new ReadStream(path14, options);
|
|
6007
6007
|
Stream.call(this);
|
|
6008
6008
|
var self = this;
|
|
6009
|
-
this.path =
|
|
6009
|
+
this.path = path14;
|
|
6010
6010
|
this.fd = null;
|
|
6011
6011
|
this.readable = true;
|
|
6012
6012
|
this.paused = false;
|
|
@@ -6040,7 +6040,7 @@ var require_legacy_streams = __commonJS({
|
|
|
6040
6040
|
});
|
|
6041
6041
|
return;
|
|
6042
6042
|
}
|
|
6043
|
-
|
|
6043
|
+
fs6.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
6044
6044
|
if (err) {
|
|
6045
6045
|
self.emit("error", err);
|
|
6046
6046
|
self.readable = false;
|
|
@@ -6051,10 +6051,10 @@ var require_legacy_streams = __commonJS({
|
|
|
6051
6051
|
self._read();
|
|
6052
6052
|
});
|
|
6053
6053
|
}
|
|
6054
|
-
function WriteStream(
|
|
6055
|
-
if (!(this instanceof WriteStream)) return new WriteStream(
|
|
6054
|
+
function WriteStream(path14, options) {
|
|
6055
|
+
if (!(this instanceof WriteStream)) return new WriteStream(path14, options);
|
|
6056
6056
|
Stream.call(this);
|
|
6057
|
-
this.path =
|
|
6057
|
+
this.path = path14;
|
|
6058
6058
|
this.fd = null;
|
|
6059
6059
|
this.writable = true;
|
|
6060
6060
|
this.flags = "w";
|
|
@@ -6079,7 +6079,7 @@ var require_legacy_streams = __commonJS({
|
|
|
6079
6079
|
this.busy = false;
|
|
6080
6080
|
this._queue = [];
|
|
6081
6081
|
if (this.fd === null) {
|
|
6082
|
-
this._open =
|
|
6082
|
+
this._open = fs6.open;
|
|
6083
6083
|
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
6084
6084
|
this.flush();
|
|
6085
6085
|
}
|
|
@@ -6114,7 +6114,7 @@ var require_clone = __commonJS({
|
|
|
6114
6114
|
// ../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
6115
6115
|
var require_graceful_fs = __commonJS({
|
|
6116
6116
|
"../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports2, module2) {
|
|
6117
|
-
var
|
|
6117
|
+
var fs6 = require("fs");
|
|
6118
6118
|
var polyfills = require_polyfills();
|
|
6119
6119
|
var legacy = require_legacy_streams();
|
|
6120
6120
|
var clone2 = require_clone();
|
|
@@ -6146,12 +6146,12 @@ var require_graceful_fs = __commonJS({
|
|
|
6146
6146
|
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
6147
6147
|
console.error(m);
|
|
6148
6148
|
};
|
|
6149
|
-
if (!
|
|
6149
|
+
if (!fs6[gracefulQueue]) {
|
|
6150
6150
|
queue = global[gracefulQueue] || [];
|
|
6151
|
-
publishQueue(
|
|
6152
|
-
|
|
6151
|
+
publishQueue(fs6, queue);
|
|
6152
|
+
fs6.close = function(fs$close) {
|
|
6153
6153
|
function close(fd, cb) {
|
|
6154
|
-
return fs$close.call(
|
|
6154
|
+
return fs$close.call(fs6, fd, function(err) {
|
|
6155
6155
|
if (!err) {
|
|
6156
6156
|
resetQueue();
|
|
6157
6157
|
}
|
|
@@ -6163,48 +6163,48 @@ var require_graceful_fs = __commonJS({
|
|
|
6163
6163
|
value: fs$close
|
|
6164
6164
|
});
|
|
6165
6165
|
return close;
|
|
6166
|
-
}(
|
|
6167
|
-
|
|
6166
|
+
}(fs6.close);
|
|
6167
|
+
fs6.closeSync = function(fs$closeSync) {
|
|
6168
6168
|
function closeSync(fd) {
|
|
6169
|
-
fs$closeSync.apply(
|
|
6169
|
+
fs$closeSync.apply(fs6, arguments);
|
|
6170
6170
|
resetQueue();
|
|
6171
6171
|
}
|
|
6172
6172
|
Object.defineProperty(closeSync, previousSymbol, {
|
|
6173
6173
|
value: fs$closeSync
|
|
6174
6174
|
});
|
|
6175
6175
|
return closeSync;
|
|
6176
|
-
}(
|
|
6176
|
+
}(fs6.closeSync);
|
|
6177
6177
|
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
6178
6178
|
process.on("exit", function() {
|
|
6179
|
-
debug(
|
|
6180
|
-
require("assert").equal(
|
|
6179
|
+
debug(fs6[gracefulQueue]);
|
|
6180
|
+
require("assert").equal(fs6[gracefulQueue].length, 0);
|
|
6181
6181
|
});
|
|
6182
6182
|
}
|
|
6183
6183
|
}
|
|
6184
6184
|
var queue;
|
|
6185
6185
|
if (!global[gracefulQueue]) {
|
|
6186
|
-
publishQueue(global,
|
|
6187
|
-
}
|
|
6188
|
-
module2.exports = patch(clone2(
|
|
6189
|
-
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !
|
|
6190
|
-
module2.exports = patch(
|
|
6191
|
-
|
|
6192
|
-
}
|
|
6193
|
-
function patch(
|
|
6194
|
-
polyfills(
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6198
|
-
var fs$readFile =
|
|
6199
|
-
|
|
6200
|
-
function readFile2(
|
|
6186
|
+
publishQueue(global, fs6[gracefulQueue]);
|
|
6187
|
+
}
|
|
6188
|
+
module2.exports = patch(clone2(fs6));
|
|
6189
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs6.__patched) {
|
|
6190
|
+
module2.exports = patch(fs6);
|
|
6191
|
+
fs6.__patched = true;
|
|
6192
|
+
}
|
|
6193
|
+
function patch(fs7) {
|
|
6194
|
+
polyfills(fs7);
|
|
6195
|
+
fs7.gracefulify = patch;
|
|
6196
|
+
fs7.createReadStream = createReadStream;
|
|
6197
|
+
fs7.createWriteStream = createWriteStream;
|
|
6198
|
+
var fs$readFile = fs7.readFile;
|
|
6199
|
+
fs7.readFile = readFile2;
|
|
6200
|
+
function readFile2(path14, options, cb) {
|
|
6201
6201
|
if (typeof options === "function")
|
|
6202
6202
|
cb = options, options = null;
|
|
6203
|
-
return go$readFile(
|
|
6204
|
-
function go$readFile(
|
|
6205
|
-
return fs$readFile(
|
|
6203
|
+
return go$readFile(path14, options, cb);
|
|
6204
|
+
function go$readFile(path15, options2, cb2, startTime) {
|
|
6205
|
+
return fs$readFile(path15, options2, function(err) {
|
|
6206
6206
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6207
|
-
enqueue([go$readFile, [
|
|
6207
|
+
enqueue([go$readFile, [path15, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6208
6208
|
else {
|
|
6209
6209
|
if (typeof cb2 === "function")
|
|
6210
6210
|
cb2.apply(this, arguments);
|
|
@@ -6212,16 +6212,16 @@ var require_graceful_fs = __commonJS({
|
|
|
6212
6212
|
});
|
|
6213
6213
|
}
|
|
6214
6214
|
}
|
|
6215
|
-
var fs$writeFile =
|
|
6216
|
-
|
|
6217
|
-
function writeFile(
|
|
6215
|
+
var fs$writeFile = fs7.writeFile;
|
|
6216
|
+
fs7.writeFile = writeFile;
|
|
6217
|
+
function writeFile(path14, data, options, cb) {
|
|
6218
6218
|
if (typeof options === "function")
|
|
6219
6219
|
cb = options, options = null;
|
|
6220
|
-
return go$writeFile(
|
|
6221
|
-
function go$writeFile(
|
|
6222
|
-
return fs$writeFile(
|
|
6220
|
+
return go$writeFile(path14, data, options, cb);
|
|
6221
|
+
function go$writeFile(path15, data2, options2, cb2, startTime) {
|
|
6222
|
+
return fs$writeFile(path15, data2, options2, function(err) {
|
|
6223
6223
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6224
|
-
enqueue([go$writeFile, [
|
|
6224
|
+
enqueue([go$writeFile, [path15, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6225
6225
|
else {
|
|
6226
6226
|
if (typeof cb2 === "function")
|
|
6227
6227
|
cb2.apply(this, arguments);
|
|
@@ -6229,17 +6229,17 @@ var require_graceful_fs = __commonJS({
|
|
|
6229
6229
|
});
|
|
6230
6230
|
}
|
|
6231
6231
|
}
|
|
6232
|
-
var fs$appendFile =
|
|
6232
|
+
var fs$appendFile = fs7.appendFile;
|
|
6233
6233
|
if (fs$appendFile)
|
|
6234
|
-
|
|
6235
|
-
function appendFile(
|
|
6234
|
+
fs7.appendFile = appendFile;
|
|
6235
|
+
function appendFile(path14, data, options, cb) {
|
|
6236
6236
|
if (typeof options === "function")
|
|
6237
6237
|
cb = options, options = null;
|
|
6238
|
-
return go$appendFile(
|
|
6239
|
-
function go$appendFile(
|
|
6240
|
-
return fs$appendFile(
|
|
6238
|
+
return go$appendFile(path14, data, options, cb);
|
|
6239
|
+
function go$appendFile(path15, data2, options2, cb2, startTime) {
|
|
6240
|
+
return fs$appendFile(path15, data2, options2, function(err) {
|
|
6241
6241
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6242
|
-
enqueue([go$appendFile, [
|
|
6242
|
+
enqueue([go$appendFile, [path15, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6243
6243
|
else {
|
|
6244
6244
|
if (typeof cb2 === "function")
|
|
6245
6245
|
cb2.apply(this, arguments);
|
|
@@ -6247,9 +6247,9 @@ var require_graceful_fs = __commonJS({
|
|
|
6247
6247
|
});
|
|
6248
6248
|
}
|
|
6249
6249
|
}
|
|
6250
|
-
var fs$copyFile =
|
|
6250
|
+
var fs$copyFile = fs7.copyFile;
|
|
6251
6251
|
if (fs$copyFile)
|
|
6252
|
-
|
|
6252
|
+
fs7.copyFile = copyFile;
|
|
6253
6253
|
function copyFile(src, dest, flags, cb) {
|
|
6254
6254
|
if (typeof flags === "function") {
|
|
6255
6255
|
cb = flags;
|
|
@@ -6267,34 +6267,34 @@ var require_graceful_fs = __commonJS({
|
|
|
6267
6267
|
});
|
|
6268
6268
|
}
|
|
6269
6269
|
}
|
|
6270
|
-
var fs$readdir =
|
|
6271
|
-
|
|
6270
|
+
var fs$readdir = fs7.readdir;
|
|
6271
|
+
fs7.readdir = readdir;
|
|
6272
6272
|
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
6273
|
-
function readdir(
|
|
6273
|
+
function readdir(path14, options, cb) {
|
|
6274
6274
|
if (typeof options === "function")
|
|
6275
6275
|
cb = options, options = null;
|
|
6276
|
-
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(
|
|
6277
|
-
return fs$readdir(
|
|
6278
|
-
|
|
6276
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path15, options2, cb2, startTime) {
|
|
6277
|
+
return fs$readdir(path15, fs$readdirCallback(
|
|
6278
|
+
path15,
|
|
6279
6279
|
options2,
|
|
6280
6280
|
cb2,
|
|
6281
6281
|
startTime
|
|
6282
6282
|
));
|
|
6283
|
-
} : function go$readdir2(
|
|
6284
|
-
return fs$readdir(
|
|
6285
|
-
|
|
6283
|
+
} : function go$readdir2(path15, options2, cb2, startTime) {
|
|
6284
|
+
return fs$readdir(path15, options2, fs$readdirCallback(
|
|
6285
|
+
path15,
|
|
6286
6286
|
options2,
|
|
6287
6287
|
cb2,
|
|
6288
6288
|
startTime
|
|
6289
6289
|
));
|
|
6290
6290
|
};
|
|
6291
|
-
return go$readdir(
|
|
6292
|
-
function fs$readdirCallback(
|
|
6291
|
+
return go$readdir(path14, options, cb);
|
|
6292
|
+
function fs$readdirCallback(path15, options2, cb2, startTime) {
|
|
6293
6293
|
return function(err, files) {
|
|
6294
6294
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6295
6295
|
enqueue([
|
|
6296
6296
|
go$readdir,
|
|
6297
|
-
[
|
|
6297
|
+
[path15, options2, cb2],
|
|
6298
6298
|
err,
|
|
6299
6299
|
startTime || Date.now(),
|
|
6300
6300
|
Date.now()
|
|
@@ -6309,21 +6309,21 @@ var require_graceful_fs = __commonJS({
|
|
|
6309
6309
|
}
|
|
6310
6310
|
}
|
|
6311
6311
|
if (process.version.substr(0, 4) === "v0.8") {
|
|
6312
|
-
var legStreams = legacy(
|
|
6312
|
+
var legStreams = legacy(fs7);
|
|
6313
6313
|
ReadStream = legStreams.ReadStream;
|
|
6314
6314
|
WriteStream = legStreams.WriteStream;
|
|
6315
6315
|
}
|
|
6316
|
-
var fs$ReadStream =
|
|
6316
|
+
var fs$ReadStream = fs7.ReadStream;
|
|
6317
6317
|
if (fs$ReadStream) {
|
|
6318
6318
|
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
6319
6319
|
ReadStream.prototype.open = ReadStream$open;
|
|
6320
6320
|
}
|
|
6321
|
-
var fs$WriteStream =
|
|
6321
|
+
var fs$WriteStream = fs7.WriteStream;
|
|
6322
6322
|
if (fs$WriteStream) {
|
|
6323
6323
|
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
6324
6324
|
WriteStream.prototype.open = WriteStream$open;
|
|
6325
6325
|
}
|
|
6326
|
-
Object.defineProperty(
|
|
6326
|
+
Object.defineProperty(fs7, "ReadStream", {
|
|
6327
6327
|
get: function() {
|
|
6328
6328
|
return ReadStream;
|
|
6329
6329
|
},
|
|
@@ -6333,7 +6333,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6333
6333
|
enumerable: true,
|
|
6334
6334
|
configurable: true
|
|
6335
6335
|
});
|
|
6336
|
-
Object.defineProperty(
|
|
6336
|
+
Object.defineProperty(fs7, "WriteStream", {
|
|
6337
6337
|
get: function() {
|
|
6338
6338
|
return WriteStream;
|
|
6339
6339
|
},
|
|
@@ -6344,7 +6344,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6344
6344
|
configurable: true
|
|
6345
6345
|
});
|
|
6346
6346
|
var FileReadStream = ReadStream;
|
|
6347
|
-
Object.defineProperty(
|
|
6347
|
+
Object.defineProperty(fs7, "FileReadStream", {
|
|
6348
6348
|
get: function() {
|
|
6349
6349
|
return FileReadStream;
|
|
6350
6350
|
},
|
|
@@ -6355,7 +6355,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6355
6355
|
configurable: true
|
|
6356
6356
|
});
|
|
6357
6357
|
var FileWriteStream = WriteStream;
|
|
6358
|
-
Object.defineProperty(
|
|
6358
|
+
Object.defineProperty(fs7, "FileWriteStream", {
|
|
6359
6359
|
get: function() {
|
|
6360
6360
|
return FileWriteStream;
|
|
6361
6361
|
},
|
|
@@ -6365,7 +6365,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6365
6365
|
enumerable: true,
|
|
6366
6366
|
configurable: true
|
|
6367
6367
|
});
|
|
6368
|
-
function ReadStream(
|
|
6368
|
+
function ReadStream(path14, options) {
|
|
6369
6369
|
if (this instanceof ReadStream)
|
|
6370
6370
|
return fs$ReadStream.apply(this, arguments), this;
|
|
6371
6371
|
else
|
|
@@ -6385,7 +6385,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6385
6385
|
}
|
|
6386
6386
|
});
|
|
6387
6387
|
}
|
|
6388
|
-
function WriteStream(
|
|
6388
|
+
function WriteStream(path14, options) {
|
|
6389
6389
|
if (this instanceof WriteStream)
|
|
6390
6390
|
return fs$WriteStream.apply(this, arguments), this;
|
|
6391
6391
|
else
|
|
@@ -6403,22 +6403,22 @@ var require_graceful_fs = __commonJS({
|
|
|
6403
6403
|
}
|
|
6404
6404
|
});
|
|
6405
6405
|
}
|
|
6406
|
-
function createReadStream(
|
|
6407
|
-
return new
|
|
6406
|
+
function createReadStream(path14, options) {
|
|
6407
|
+
return new fs7.ReadStream(path14, options);
|
|
6408
6408
|
}
|
|
6409
|
-
function createWriteStream(
|
|
6410
|
-
return new
|
|
6409
|
+
function createWriteStream(path14, options) {
|
|
6410
|
+
return new fs7.WriteStream(path14, options);
|
|
6411
6411
|
}
|
|
6412
|
-
var fs$open =
|
|
6413
|
-
|
|
6414
|
-
function open(
|
|
6412
|
+
var fs$open = fs7.open;
|
|
6413
|
+
fs7.open = open;
|
|
6414
|
+
function open(path14, flags, mode, cb) {
|
|
6415
6415
|
if (typeof mode === "function")
|
|
6416
6416
|
cb = mode, mode = null;
|
|
6417
|
-
return go$open(
|
|
6418
|
-
function go$open(
|
|
6419
|
-
return fs$open(
|
|
6417
|
+
return go$open(path14, flags, mode, cb);
|
|
6418
|
+
function go$open(path15, flags2, mode2, cb2, startTime) {
|
|
6419
|
+
return fs$open(path15, flags2, mode2, function(err, fd) {
|
|
6420
6420
|
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
6421
|
-
enqueue([go$open, [
|
|
6421
|
+
enqueue([go$open, [path15, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
6422
6422
|
else {
|
|
6423
6423
|
if (typeof cb2 === "function")
|
|
6424
6424
|
cb2.apply(this, arguments);
|
|
@@ -6426,20 +6426,20 @@ var require_graceful_fs = __commonJS({
|
|
|
6426
6426
|
});
|
|
6427
6427
|
}
|
|
6428
6428
|
}
|
|
6429
|
-
return
|
|
6429
|
+
return fs7;
|
|
6430
6430
|
}
|
|
6431
6431
|
function enqueue(elem) {
|
|
6432
6432
|
debug("ENQUEUE", elem[0].name, elem[1]);
|
|
6433
|
-
|
|
6433
|
+
fs6[gracefulQueue].push(elem);
|
|
6434
6434
|
retry();
|
|
6435
6435
|
}
|
|
6436
6436
|
var retryTimer;
|
|
6437
6437
|
function resetQueue() {
|
|
6438
6438
|
var now = Date.now();
|
|
6439
|
-
for (var i = 0; i <
|
|
6440
|
-
if (
|
|
6441
|
-
|
|
6442
|
-
|
|
6439
|
+
for (var i = 0; i < fs6[gracefulQueue].length; ++i) {
|
|
6440
|
+
if (fs6[gracefulQueue][i].length > 2) {
|
|
6441
|
+
fs6[gracefulQueue][i][3] = now;
|
|
6442
|
+
fs6[gracefulQueue][i][4] = now;
|
|
6443
6443
|
}
|
|
6444
6444
|
}
|
|
6445
6445
|
retry();
|
|
@@ -6447,9 +6447,9 @@ var require_graceful_fs = __commonJS({
|
|
|
6447
6447
|
function retry() {
|
|
6448
6448
|
clearTimeout(retryTimer);
|
|
6449
6449
|
retryTimer = void 0;
|
|
6450
|
-
if (
|
|
6450
|
+
if (fs6[gracefulQueue].length === 0)
|
|
6451
6451
|
return;
|
|
6452
|
-
var elem =
|
|
6452
|
+
var elem = fs6[gracefulQueue].shift();
|
|
6453
6453
|
var fn = elem[0];
|
|
6454
6454
|
var args = elem[1];
|
|
6455
6455
|
var err = elem[2];
|
|
@@ -6471,7 +6471,7 @@ var require_graceful_fs = __commonJS({
|
|
|
6471
6471
|
debug("RETRY", fn.name, args);
|
|
6472
6472
|
fn.apply(null, args.concat([startTime]));
|
|
6473
6473
|
} else {
|
|
6474
|
-
|
|
6474
|
+
fs6[gracefulQueue].push(elem);
|
|
6475
6475
|
}
|
|
6476
6476
|
}
|
|
6477
6477
|
if (retryTimer === void 0) {
|
|
@@ -6906,10 +6906,10 @@ var require_mtime_precision = __commonJS({
|
|
|
6906
6906
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/mtime-precision.js"(exports2, module2) {
|
|
6907
6907
|
"use strict";
|
|
6908
6908
|
var cacheSymbol = Symbol();
|
|
6909
|
-
function probe(file2,
|
|
6910
|
-
const cachedPrecision =
|
|
6909
|
+
function probe(file2, fs6, callback) {
|
|
6910
|
+
const cachedPrecision = fs6[cacheSymbol];
|
|
6911
6911
|
if (cachedPrecision) {
|
|
6912
|
-
return
|
|
6912
|
+
return fs6.stat(file2, (err, stat2) => {
|
|
6913
6913
|
if (err) {
|
|
6914
6914
|
return callback(err);
|
|
6915
6915
|
}
|
|
@@ -6917,16 +6917,16 @@ var require_mtime_precision = __commonJS({
|
|
|
6917
6917
|
});
|
|
6918
6918
|
}
|
|
6919
6919
|
const mtime = new Date(Math.ceil(Date.now() / 1e3) * 1e3 + 5);
|
|
6920
|
-
|
|
6920
|
+
fs6.utimes(file2, mtime, mtime, (err) => {
|
|
6921
6921
|
if (err) {
|
|
6922
6922
|
return callback(err);
|
|
6923
6923
|
}
|
|
6924
|
-
|
|
6924
|
+
fs6.stat(file2, (err2, stat2) => {
|
|
6925
6925
|
if (err2) {
|
|
6926
6926
|
return callback(err2);
|
|
6927
6927
|
}
|
|
6928
6928
|
const precision = stat2.mtime.getTime() % 1e3 === 0 ? "s" : "ms";
|
|
6929
|
-
Object.defineProperty(
|
|
6929
|
+
Object.defineProperty(fs6, cacheSymbol, { value: precision });
|
|
6930
6930
|
callback(null, stat2.mtime, precision);
|
|
6931
6931
|
});
|
|
6932
6932
|
});
|
|
@@ -6947,8 +6947,8 @@ var require_mtime_precision = __commonJS({
|
|
|
6947
6947
|
var require_lockfile = __commonJS({
|
|
6948
6948
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/lockfile.js"(exports2, module2) {
|
|
6949
6949
|
"use strict";
|
|
6950
|
-
var
|
|
6951
|
-
var
|
|
6950
|
+
var path14 = require("path");
|
|
6951
|
+
var fs6 = require_graceful_fs();
|
|
6952
6952
|
var retry = require_retry2();
|
|
6953
6953
|
var onExit = require_signal_exit();
|
|
6954
6954
|
var mtimePrecision = require_mtime_precision();
|
|
@@ -6958,7 +6958,7 @@ var require_lockfile = __commonJS({
|
|
|
6958
6958
|
}
|
|
6959
6959
|
function resolveCanonicalPath(file2, options, callback) {
|
|
6960
6960
|
if (!options.realpath) {
|
|
6961
|
-
return callback(null,
|
|
6961
|
+
return callback(null, path14.resolve(file2));
|
|
6962
6962
|
}
|
|
6963
6963
|
options.fs.realpath(file2, callback);
|
|
6964
6964
|
}
|
|
@@ -7079,7 +7079,7 @@ var require_lockfile = __commonJS({
|
|
|
7079
7079
|
update: null,
|
|
7080
7080
|
realpath: true,
|
|
7081
7081
|
retries: 0,
|
|
7082
|
-
fs:
|
|
7082
|
+
fs: fs6,
|
|
7083
7083
|
onCompromised: (err) => {
|
|
7084
7084
|
throw err;
|
|
7085
7085
|
},
|
|
@@ -7123,7 +7123,7 @@ var require_lockfile = __commonJS({
|
|
|
7123
7123
|
}
|
|
7124
7124
|
function unlock(file2, options, callback) {
|
|
7125
7125
|
options = {
|
|
7126
|
-
fs:
|
|
7126
|
+
fs: fs6,
|
|
7127
7127
|
realpath: true,
|
|
7128
7128
|
...options
|
|
7129
7129
|
};
|
|
@@ -7145,7 +7145,7 @@ var require_lockfile = __commonJS({
|
|
|
7145
7145
|
options = {
|
|
7146
7146
|
stale: 1e4,
|
|
7147
7147
|
realpath: true,
|
|
7148
|
-
fs:
|
|
7148
|
+
fs: fs6,
|
|
7149
7149
|
...options
|
|
7150
7150
|
};
|
|
7151
7151
|
options.stale = Math.max(options.stale || 0, 2e3);
|
|
@@ -7184,16 +7184,16 @@ var require_lockfile = __commonJS({
|
|
|
7184
7184
|
var require_adapter = __commonJS({
|
|
7185
7185
|
"../../node_modules/.pnpm/proper-lockfile@4.1.2/node_modules/proper-lockfile/lib/adapter.js"(exports2, module2) {
|
|
7186
7186
|
"use strict";
|
|
7187
|
-
var
|
|
7188
|
-
function createSyncFs(
|
|
7187
|
+
var fs6 = require_graceful_fs();
|
|
7188
|
+
function createSyncFs(fs7) {
|
|
7189
7189
|
const methods = ["mkdir", "realpath", "stat", "rmdir", "utimes"];
|
|
7190
|
-
const newFs = { ...
|
|
7190
|
+
const newFs = { ...fs7 };
|
|
7191
7191
|
methods.forEach((method) => {
|
|
7192
7192
|
newFs[method] = (...args) => {
|
|
7193
7193
|
const callback = args.pop();
|
|
7194
7194
|
let ret;
|
|
7195
7195
|
try {
|
|
7196
|
-
ret =
|
|
7196
|
+
ret = fs7[`${method}Sync`](...args);
|
|
7197
7197
|
} catch (err) {
|
|
7198
7198
|
return callback(err);
|
|
7199
7199
|
}
|
|
@@ -7231,7 +7231,7 @@ var require_adapter = __commonJS({
|
|
|
7231
7231
|
}
|
|
7232
7232
|
function toSyncOptions(options) {
|
|
7233
7233
|
options = { ...options };
|
|
7234
|
-
options.fs = createSyncFs(options.fs ||
|
|
7234
|
+
options.fs = createSyncFs(options.fs || fs6);
|
|
7235
7235
|
if (typeof options.retries === "number" && options.retries > 0 || options.retries && typeof options.retries.retries === "number" && options.retries.retries > 0) {
|
|
7236
7236
|
throw Object.assign(new Error("Cannot use retries with the sync api"), { code: "ESYNC" });
|
|
7237
7237
|
}
|
|
@@ -8822,10 +8822,10 @@ var require_segments = __commonJS({
|
|
|
8822
8822
|
const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled());
|
|
8823
8823
|
const nodes = buildNodes(segs);
|
|
8824
8824
|
const graph = buildGraph(nodes, version2);
|
|
8825
|
-
const
|
|
8825
|
+
const path14 = dijkstra.find_path(graph.map, "start", "end");
|
|
8826
8826
|
const optimizedSegs = [];
|
|
8827
|
-
for (let i = 1; i <
|
|
8828
|
-
optimizedSegs.push(graph.table[
|
|
8827
|
+
for (let i = 1; i < path14.length - 1; i++) {
|
|
8828
|
+
optimizedSegs.push(graph.table[path14[i]].node);
|
|
8829
8829
|
}
|
|
8830
8830
|
return exports2.fromArray(mergeSegments(optimizedSegs));
|
|
8831
8831
|
};
|
|
@@ -11261,7 +11261,7 @@ var require_utils2 = __commonJS({
|
|
|
11261
11261
|
// ../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js
|
|
11262
11262
|
var require_png2 = __commonJS({
|
|
11263
11263
|
"../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/png.js"(exports2) {
|
|
11264
|
-
var
|
|
11264
|
+
var fs6 = require("fs");
|
|
11265
11265
|
var PNG = require_png().PNG;
|
|
11266
11266
|
var Utils = require_utils2();
|
|
11267
11267
|
exports2.render = function render(qrData, options) {
|
|
@@ -11302,7 +11302,7 @@ var require_png2 = __commonJS({
|
|
|
11302
11302
|
});
|
|
11303
11303
|
png.pack();
|
|
11304
11304
|
};
|
|
11305
|
-
exports2.renderToFile = function renderToFile(
|
|
11305
|
+
exports2.renderToFile = function renderToFile(path14, qrData, options, cb) {
|
|
11306
11306
|
if (typeof cb === "undefined") {
|
|
11307
11307
|
cb = options;
|
|
11308
11308
|
options = void 0;
|
|
@@ -11313,7 +11313,7 @@ var require_png2 = __commonJS({
|
|
|
11313
11313
|
called = true;
|
|
11314
11314
|
cb.apply(null, args);
|
|
11315
11315
|
};
|
|
11316
|
-
const stream =
|
|
11316
|
+
const stream = fs6.createWriteStream(path14);
|
|
11317
11317
|
stream.on("error", done);
|
|
11318
11318
|
stream.on("close", done);
|
|
11319
11319
|
exports2.renderToFileStream(stream, qrData, options);
|
|
@@ -11375,14 +11375,14 @@ var require_utf8 = __commonJS({
|
|
|
11375
11375
|
}
|
|
11376
11376
|
return output3;
|
|
11377
11377
|
};
|
|
11378
|
-
exports2.renderToFile = function renderToFile(
|
|
11378
|
+
exports2.renderToFile = function renderToFile(path14, qrData, options, cb) {
|
|
11379
11379
|
if (typeof cb === "undefined") {
|
|
11380
11380
|
cb = options;
|
|
11381
11381
|
options = void 0;
|
|
11382
11382
|
}
|
|
11383
|
-
const
|
|
11383
|
+
const fs6 = require("fs");
|
|
11384
11384
|
const utf8 = exports2.render(qrData, options);
|
|
11385
|
-
|
|
11385
|
+
fs6.writeFile(path14, utf8, cb);
|
|
11386
11386
|
};
|
|
11387
11387
|
}
|
|
11388
11388
|
});
|
|
@@ -11503,7 +11503,7 @@ var require_svg_tag = __commonJS({
|
|
|
11503
11503
|
return str;
|
|
11504
11504
|
}
|
|
11505
11505
|
function qrToPath(data, size, margin) {
|
|
11506
|
-
let
|
|
11506
|
+
let path14 = "";
|
|
11507
11507
|
let moveBy = 0;
|
|
11508
11508
|
let newRow = false;
|
|
11509
11509
|
let lineLength = 0;
|
|
@@ -11514,19 +11514,19 @@ var require_svg_tag = __commonJS({
|
|
|
11514
11514
|
if (data[i]) {
|
|
11515
11515
|
lineLength++;
|
|
11516
11516
|
if (!(i > 0 && col > 0 && data[i - 1])) {
|
|
11517
|
-
|
|
11517
|
+
path14 += newRow ? svgCmd("M", col + margin, 0.5 + row + margin) : svgCmd("m", moveBy, 0);
|
|
11518
11518
|
moveBy = 0;
|
|
11519
11519
|
newRow = false;
|
|
11520
11520
|
}
|
|
11521
11521
|
if (!(col + 1 < size && data[i + 1])) {
|
|
11522
|
-
|
|
11522
|
+
path14 += svgCmd("h", lineLength);
|
|
11523
11523
|
lineLength = 0;
|
|
11524
11524
|
}
|
|
11525
11525
|
} else {
|
|
11526
11526
|
moveBy++;
|
|
11527
11527
|
}
|
|
11528
11528
|
}
|
|
11529
|
-
return
|
|
11529
|
+
return path14;
|
|
11530
11530
|
}
|
|
11531
11531
|
exports2.render = function render(qrData, options, cb) {
|
|
11532
11532
|
const opts = Utils.getOptions(options);
|
|
@@ -11534,10 +11534,10 @@ var require_svg_tag = __commonJS({
|
|
|
11534
11534
|
const data = qrData.modules.data;
|
|
11535
11535
|
const qrcodesize = size + opts.margin * 2;
|
|
11536
11536
|
const bg = !opts.color.light.a ? "" : "<path " + getColorAttrib(opts.color.light, "fill") + ' d="M0 0h' + qrcodesize + "v" + qrcodesize + 'H0z"/>';
|
|
11537
|
-
const
|
|
11537
|
+
const path14 = "<path " + getColorAttrib(opts.color.dark, "stroke") + ' d="' + qrToPath(data, size, opts.margin) + '"/>';
|
|
11538
11538
|
const viewBox = 'viewBox="0 0 ' + qrcodesize + " " + qrcodesize + '"';
|
|
11539
11539
|
const width = !opts.width ? "" : 'width="' + opts.width + '" height="' + opts.width + '" ';
|
|
11540
|
-
const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg +
|
|
11540
|
+
const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path14 + "</svg>\n";
|
|
11541
11541
|
if (typeof cb === "function") {
|
|
11542
11542
|
cb(null, svgTag);
|
|
11543
11543
|
}
|
|
@@ -11551,15 +11551,15 @@ var require_svg = __commonJS({
|
|
|
11551
11551
|
"../../node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/svg.js"(exports2) {
|
|
11552
11552
|
var svgTagRenderer = require_svg_tag();
|
|
11553
11553
|
exports2.render = svgTagRenderer.render;
|
|
11554
|
-
exports2.renderToFile = function renderToFile(
|
|
11554
|
+
exports2.renderToFile = function renderToFile(path14, qrData, options, cb) {
|
|
11555
11555
|
if (typeof cb === "undefined") {
|
|
11556
11556
|
cb = options;
|
|
11557
11557
|
options = void 0;
|
|
11558
11558
|
}
|
|
11559
|
-
const
|
|
11559
|
+
const fs6 = require("fs");
|
|
11560
11560
|
const svgTag = exports2.render(qrData, options);
|
|
11561
11561
|
const xmlStr = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + svgTag;
|
|
11562
|
-
|
|
11562
|
+
fs6.writeFile(path14, xmlStr, cb);
|
|
11563
11563
|
};
|
|
11564
11564
|
}
|
|
11565
11565
|
});
|
|
@@ -11717,8 +11717,8 @@ var require_server = __commonJS({
|
|
|
11717
11717
|
cb
|
|
11718
11718
|
};
|
|
11719
11719
|
}
|
|
11720
|
-
function getTypeFromFilename(
|
|
11721
|
-
return
|
|
11720
|
+
function getTypeFromFilename(path14) {
|
|
11721
|
+
return path14.slice((path14.lastIndexOf(".") - 1 >>> 0) + 2).toLowerCase();
|
|
11722
11722
|
}
|
|
11723
11723
|
function getRendererFromType(type) {
|
|
11724
11724
|
switch (type) {
|
|
@@ -11782,17 +11782,17 @@ var require_server = __commonJS({
|
|
|
11782
11782
|
const renderer = getRendererFromType(params.opts.type);
|
|
11783
11783
|
return render(renderer.renderToBuffer, text, params);
|
|
11784
11784
|
};
|
|
11785
|
-
exports2.toFile = function toFile(
|
|
11786
|
-
if (typeof
|
|
11785
|
+
exports2.toFile = function toFile(path14, text, opts, cb) {
|
|
11786
|
+
if (typeof path14 !== "string" || !(typeof text === "string" || typeof text === "object")) {
|
|
11787
11787
|
throw new Error("Invalid argument");
|
|
11788
11788
|
}
|
|
11789
11789
|
if (arguments.length < 3 && !canPromise()) {
|
|
11790
11790
|
throw new Error("Too few arguments provided");
|
|
11791
11791
|
}
|
|
11792
11792
|
const params = checkParams(text, opts, cb);
|
|
11793
|
-
const type = params.opts.type || getTypeFromFilename(
|
|
11793
|
+
const type = params.opts.type || getTypeFromFilename(path14);
|
|
11794
11794
|
const renderer = getRendererFromType(type);
|
|
11795
|
-
const renderToFile = renderer.renderToFile.bind(null,
|
|
11795
|
+
const renderToFile = renderer.renderToFile.bind(null, path14);
|
|
11796
11796
|
return render(renderToFile, text, params);
|
|
11797
11797
|
};
|
|
11798
11798
|
exports2.toFileStream = function toFileStream(stream, text, opts) {
|
|
@@ -15010,8 +15010,8 @@ var require_utils3 = __commonJS({
|
|
|
15010
15010
|
}
|
|
15011
15011
|
return ind;
|
|
15012
15012
|
}
|
|
15013
|
-
function removeDotSegments(
|
|
15014
|
-
let input =
|
|
15013
|
+
function removeDotSegments(path14) {
|
|
15014
|
+
let input = path14;
|
|
15015
15015
|
const output3 = [];
|
|
15016
15016
|
let nextSlash = -1;
|
|
15017
15017
|
let len = 0;
|
|
@@ -15263,8 +15263,8 @@ var require_schemes = __commonJS({
|
|
|
15263
15263
|
wsComponent.secure = void 0;
|
|
15264
15264
|
}
|
|
15265
15265
|
if (wsComponent.resourceName) {
|
|
15266
|
-
const [
|
|
15267
|
-
wsComponent.path =
|
|
15266
|
+
const [path14, query] = wsComponent.resourceName.split("?");
|
|
15267
|
+
wsComponent.path = path14 && path14 !== "/" ? path14 : void 0;
|
|
15268
15268
|
wsComponent.query = query;
|
|
15269
15269
|
wsComponent.resourceName = void 0;
|
|
15270
15270
|
}
|
|
@@ -18657,12 +18657,12 @@ var require_dist = __commonJS({
|
|
|
18657
18657
|
throw new Error(`Unknown format "${name}"`);
|
|
18658
18658
|
return f;
|
|
18659
18659
|
};
|
|
18660
|
-
function addFormats(ajv, list,
|
|
18660
|
+
function addFormats(ajv, list, fs6, exportName) {
|
|
18661
18661
|
var _a3;
|
|
18662
18662
|
var _b;
|
|
18663
18663
|
(_a3 = (_b = ajv.opts.code).formats) !== null && _a3 !== void 0 ? _a3 : _b.formats = (0, codegen_1._)`require("ajv-formats/dist/formats").${exportName}`;
|
|
18664
18664
|
for (const f of list)
|
|
18665
|
-
ajv.addFormat(f,
|
|
18665
|
+
ajv.addFormat(f, fs6[f]);
|
|
18666
18666
|
}
|
|
18667
18667
|
module2.exports = exports2 = formatsPlugin;
|
|
18668
18668
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -18671,11 +18671,11 @@ var require_dist = __commonJS({
|
|
|
18671
18671
|
});
|
|
18672
18672
|
|
|
18673
18673
|
// src/bin.ts
|
|
18674
|
-
var
|
|
18674
|
+
var import_node_path20 = __toESM(require("node:path"), 1);
|
|
18675
18675
|
var import_node_child_process7 = require("node:child_process");
|
|
18676
|
-
var
|
|
18676
|
+
var import_node_fs14 = require("node:fs");
|
|
18677
18677
|
var import_node_os10 = require("node:os");
|
|
18678
|
-
var
|
|
18678
|
+
var import_node_path21 = __toESM(require("node:path"), 1);
|
|
18679
18679
|
|
|
18680
18680
|
// src/install-codex.ts
|
|
18681
18681
|
var import_promises = __toESM(require("node:fs/promises"), 1);
|
|
@@ -18759,9 +18759,10 @@ async function installCodex(options) {
|
|
|
18759
18759
|
const configPath = import_node_path.default.join(codexHome, "config.toml");
|
|
18760
18760
|
const distribution = await detectInstallDistribution(options);
|
|
18761
18761
|
await import_promises.default.mkdir(codexHome, { recursive: true, mode: 448 });
|
|
18762
|
+
const writePrompts = async () => installPrompts(codexHome, options.prompts ?? []);
|
|
18762
18763
|
if (!await pathExists(configPath)) {
|
|
18763
18764
|
await import_promises.default.writeFile(configPath, renderBlock(options.binPath, distribution).replace(/^\n/, ""), { mode: 384 });
|
|
18764
|
-
return { action: "created", configPath };
|
|
18765
|
+
return { action: "created", configPath, prompts: await writePrompts() };
|
|
18765
18766
|
}
|
|
18766
18767
|
const realPath = await resolveRealConfigPath(configPath);
|
|
18767
18768
|
const existing = await import_promises.default.readFile(realPath, "utf8");
|
|
@@ -18780,7 +18781,7 @@ async function installCodex(options) {
|
|
|
18780
18781
|
const existingTable = parsed?.mcp_servers?.["mrrlin"];
|
|
18781
18782
|
if (existingTable !== void 0) {
|
|
18782
18783
|
if (tablesEqual(existingTable, expectedTable(options.binPath, distribution))) {
|
|
18783
|
-
return { action: "noop", configPath: realPath };
|
|
18784
|
+
return { action: "noop", configPath: realPath, prompts: await writePrompts() };
|
|
18784
18785
|
}
|
|
18785
18786
|
if (!options.force) {
|
|
18786
18787
|
const err = {
|
|
@@ -18792,11 +18793,33 @@ async function installCodex(options) {
|
|
|
18792
18793
|
}
|
|
18793
18794
|
const replaced = replaceMrrlinBlock(existing, renderBlock(options.binPath, distribution));
|
|
18794
18795
|
await import_promises.default.writeFile(realPath, replaced, { mode: 384 });
|
|
18795
|
-
return { action: "replaced", configPath: realPath };
|
|
18796
|
+
return { action: "replaced", configPath: realPath, prompts: await writePrompts() };
|
|
18796
18797
|
}
|
|
18797
18798
|
const appended = appendMrrlinBlock(existing, renderBlock(options.binPath, distribution));
|
|
18798
18799
|
await import_promises.default.writeFile(realPath, appended, { mode: 384 });
|
|
18799
|
-
return { action: "appended", configPath: realPath };
|
|
18800
|
+
return { action: "appended", configPath: realPath, prompts: await writePrompts() };
|
|
18801
|
+
}
|
|
18802
|
+
async function installPrompts(codexHome, prompts) {
|
|
18803
|
+
if (prompts.length === 0) return [];
|
|
18804
|
+
const promptsDir2 = import_node_path.default.join(codexHome, "prompts");
|
|
18805
|
+
await import_promises.default.mkdir(promptsDir2, { recursive: true, mode: 448 });
|
|
18806
|
+
const out = [];
|
|
18807
|
+
for (const prompt of prompts) {
|
|
18808
|
+
const promptPath = import_node_path.default.join(promptsDir2, `${prompt.name}.md`);
|
|
18809
|
+
let existing = null;
|
|
18810
|
+
try {
|
|
18811
|
+
existing = await import_promises.default.readFile(promptPath, "utf8");
|
|
18812
|
+
} catch {
|
|
18813
|
+
existing = null;
|
|
18814
|
+
}
|
|
18815
|
+
if (existing === prompt.content) {
|
|
18816
|
+
out.push({ name: prompt.name, action: "noop", promptPath });
|
|
18817
|
+
continue;
|
|
18818
|
+
}
|
|
18819
|
+
await import_promises.default.writeFile(promptPath, prompt.content, { mode: 384 });
|
|
18820
|
+
out.push({ name: prompt.name, action: existing === null ? "created" : "updated", promptPath });
|
|
18821
|
+
}
|
|
18822
|
+
return out;
|
|
18800
18823
|
}
|
|
18801
18824
|
function appendMrrlinBlock(existing, block) {
|
|
18802
18825
|
const trimmed = existing.replace(/\s+$/, "");
|
|
@@ -20073,10 +20096,10 @@ function mergeDefs(...defs) {
|
|
|
20073
20096
|
function cloneDef(schema) {
|
|
20074
20097
|
return mergeDefs(schema._zod.def);
|
|
20075
20098
|
}
|
|
20076
|
-
function getElementAtPath(obj,
|
|
20077
|
-
if (!
|
|
20099
|
+
function getElementAtPath(obj, path14) {
|
|
20100
|
+
if (!path14)
|
|
20078
20101
|
return obj;
|
|
20079
|
-
return
|
|
20102
|
+
return path14.reduce((acc, key) => acc?.[key], obj);
|
|
20080
20103
|
}
|
|
20081
20104
|
function promiseAllObject(promisesObj) {
|
|
20082
20105
|
const keys = Object.keys(promisesObj);
|
|
@@ -20485,11 +20508,11 @@ function explicitlyAborted(x, startIndex = 0) {
|
|
|
20485
20508
|
}
|
|
20486
20509
|
return false;
|
|
20487
20510
|
}
|
|
20488
|
-
function prefixIssues(
|
|
20511
|
+
function prefixIssues(path14, issues) {
|
|
20489
20512
|
return issues.map((iss) => {
|
|
20490
20513
|
var _a3;
|
|
20491
20514
|
(_a3 = iss).path ?? (_a3.path = []);
|
|
20492
|
-
iss.path.unshift(
|
|
20515
|
+
iss.path.unshift(path14);
|
|
20493
20516
|
return iss;
|
|
20494
20517
|
});
|
|
20495
20518
|
}
|
|
@@ -20636,16 +20659,16 @@ function flattenError(error51, mapper = (issue2) => issue2.message) {
|
|
|
20636
20659
|
}
|
|
20637
20660
|
function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
20638
20661
|
const fieldErrors = { _errors: [] };
|
|
20639
|
-
const processError = (error52,
|
|
20662
|
+
const processError = (error52, path14 = []) => {
|
|
20640
20663
|
for (const issue2 of error52.issues) {
|
|
20641
20664
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
20642
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
20665
|
+
issue2.errors.map((issues) => processError({ issues }, [...path14, ...issue2.path]));
|
|
20643
20666
|
} else if (issue2.code === "invalid_key") {
|
|
20644
|
-
processError({ issues: issue2.issues }, [...
|
|
20667
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
20645
20668
|
} else if (issue2.code === "invalid_element") {
|
|
20646
|
-
processError({ issues: issue2.issues }, [...
|
|
20669
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
20647
20670
|
} else {
|
|
20648
|
-
const fullpath = [...
|
|
20671
|
+
const fullpath = [...path14, ...issue2.path];
|
|
20649
20672
|
if (fullpath.length === 0) {
|
|
20650
20673
|
fieldErrors._errors.push(mapper(issue2));
|
|
20651
20674
|
} else {
|
|
@@ -20672,17 +20695,17 @@ function formatError(error51, mapper = (issue2) => issue2.message) {
|
|
|
20672
20695
|
}
|
|
20673
20696
|
function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
20674
20697
|
const result = { errors: [] };
|
|
20675
|
-
const processError = (error52,
|
|
20698
|
+
const processError = (error52, path14 = []) => {
|
|
20676
20699
|
var _a3, _b;
|
|
20677
20700
|
for (const issue2 of error52.issues) {
|
|
20678
20701
|
if (issue2.code === "invalid_union" && issue2.errors.length) {
|
|
20679
|
-
issue2.errors.map((issues) => processError({ issues }, [...
|
|
20702
|
+
issue2.errors.map((issues) => processError({ issues }, [...path14, ...issue2.path]));
|
|
20680
20703
|
} else if (issue2.code === "invalid_key") {
|
|
20681
|
-
processError({ issues: issue2.issues }, [...
|
|
20704
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
20682
20705
|
} else if (issue2.code === "invalid_element") {
|
|
20683
|
-
processError({ issues: issue2.issues }, [...
|
|
20706
|
+
processError({ issues: issue2.issues }, [...path14, ...issue2.path]);
|
|
20684
20707
|
} else {
|
|
20685
|
-
const fullpath = [...
|
|
20708
|
+
const fullpath = [...path14, ...issue2.path];
|
|
20686
20709
|
if (fullpath.length === 0) {
|
|
20687
20710
|
result.errors.push(mapper(issue2));
|
|
20688
20711
|
continue;
|
|
@@ -20714,8 +20737,8 @@ function treeifyError(error51, mapper = (issue2) => issue2.message) {
|
|
|
20714
20737
|
}
|
|
20715
20738
|
function toDotPath(_path) {
|
|
20716
20739
|
const segs = [];
|
|
20717
|
-
const
|
|
20718
|
-
for (const seg of
|
|
20740
|
+
const path14 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
|
|
20741
|
+
for (const seg of path14) {
|
|
20719
20742
|
if (typeof seg === "number")
|
|
20720
20743
|
segs.push(`[${seg}]`);
|
|
20721
20744
|
else if (typeof seg === "symbol")
|
|
@@ -33407,13 +33430,13 @@ function resolveRef(ref, ctx) {
|
|
|
33407
33430
|
if (!ref.startsWith("#")) {
|
|
33408
33431
|
throw new Error("External $ref is not supported, only local refs (#/...) are allowed");
|
|
33409
33432
|
}
|
|
33410
|
-
const
|
|
33411
|
-
if (
|
|
33433
|
+
const path14 = ref.slice(1).split("/").filter(Boolean);
|
|
33434
|
+
if (path14.length === 0) {
|
|
33412
33435
|
return ctx.rootSchema;
|
|
33413
33436
|
}
|
|
33414
33437
|
const defsKey = ctx.version === "draft-2020-12" ? "$defs" : "definitions";
|
|
33415
|
-
if (
|
|
33416
|
-
const key =
|
|
33438
|
+
if (path14[0] === defsKey) {
|
|
33439
|
+
const key = path14[1];
|
|
33417
33440
|
if (!key || !ctx.defs[key]) {
|
|
33418
33441
|
throw new Error(`Reference not found: ${ref}`);
|
|
33419
33442
|
}
|
|
@@ -35035,18 +35058,18 @@ function createMrrlinClient(config2) {
|
|
|
35035
35058
|
const customFetch = config2.fetch ?? globalThis.fetch;
|
|
35036
35059
|
const baseUrl = config2.baseUrl.replace(/\/$/, "");
|
|
35037
35060
|
const token = config2.token;
|
|
35038
|
-
async function request(
|
|
35061
|
+
async function request(path14, init) {
|
|
35039
35062
|
const method = init?.method ?? "GET";
|
|
35040
35063
|
const headers = new Headers(init?.headers ?? {});
|
|
35041
35064
|
if (token && !headers.has("authorization")) {
|
|
35042
35065
|
headers.set("authorization", `Bearer ${token}`);
|
|
35043
35066
|
}
|
|
35044
|
-
const response = await customFetch(`${baseUrl}${
|
|
35067
|
+
const response = await customFetch(`${baseUrl}${path14}`, { ...init, headers });
|
|
35045
35068
|
if (!response.ok) {
|
|
35046
35069
|
const body = await response.text();
|
|
35047
35070
|
let code = `HTTP_${response.status}`;
|
|
35048
35071
|
let violations = null;
|
|
35049
|
-
let message = `Mrrlin API ${method} ${
|
|
35072
|
+
let message = `Mrrlin API ${method} ${path14} failed: ${response.status}`;
|
|
35050
35073
|
try {
|
|
35051
35074
|
const parsed = JSON.parse(body);
|
|
35052
35075
|
const violationsParsed = apiViolationsErrorSchema.safeParse(parsed);
|
|
@@ -35066,7 +35089,7 @@ function createMrrlinClient(config2) {
|
|
|
35066
35089
|
throw new MrrlinApiError({
|
|
35067
35090
|
code,
|
|
35068
35091
|
method,
|
|
35069
|
-
path:
|
|
35092
|
+
path: path14,
|
|
35070
35093
|
responseBody: body,
|
|
35071
35094
|
status: response.status,
|
|
35072
35095
|
violations,
|
|
@@ -35317,7 +35340,7 @@ function createMrrlinClient(config2) {
|
|
|
35317
35340
|
return taskEventListResponseSchema.parse(body).data;
|
|
35318
35341
|
},
|
|
35319
35342
|
async listTasks(projectSlug, filters = {}) {
|
|
35320
|
-
const
|
|
35343
|
+
const path14 = appendQuery(`${projectPath(projectSlug)}/tasks`, {
|
|
35321
35344
|
assignee: filters.assignee,
|
|
35322
35345
|
autonomyLevel: filters.autonomyLevel,
|
|
35323
35346
|
blockedBy: filters.blockedBy,
|
|
@@ -35329,7 +35352,7 @@ function createMrrlinClient(config2) {
|
|
|
35329
35352
|
subcategory: filters.subcategory,
|
|
35330
35353
|
type: filters.type
|
|
35331
35354
|
});
|
|
35332
|
-
const body = await request(
|
|
35355
|
+
const body = await request(path14);
|
|
35333
35356
|
return taskListResponseSchema.parse(body).data;
|
|
35334
35357
|
},
|
|
35335
35358
|
async listTaxonomy(projectSlug) {
|
|
@@ -35337,22 +35360,22 @@ function createMrrlinClient(config2) {
|
|
|
35337
35360
|
return taxonomyListResponseSchema.parse(body).data;
|
|
35338
35361
|
},
|
|
35339
35362
|
async listWikiPages(projectSlug, filters = {}) {
|
|
35340
|
-
const
|
|
35363
|
+
const path14 = appendQuery(`${projectPath(projectSlug)}/wiki`, {
|
|
35341
35364
|
folder: filters.folder,
|
|
35342
35365
|
q: filters.q,
|
|
35343
35366
|
taskId: filters.taskId
|
|
35344
35367
|
});
|
|
35345
|
-
const body = await request(
|
|
35368
|
+
const body = await request(path14);
|
|
35346
35369
|
return wikiPageListResponseSchema.parse(body).data;
|
|
35347
35370
|
},
|
|
35348
35371
|
async searchWikiPages(projectSlug, query) {
|
|
35349
|
-
const
|
|
35372
|
+
const path14 = appendQuery(`${projectPath(projectSlug)}/wiki/search`, {
|
|
35350
35373
|
folder: query.folder,
|
|
35351
35374
|
limit: query.limit === void 0 ? void 0 : String(query.limit),
|
|
35352
35375
|
pathPrefix: query.pathPrefix,
|
|
35353
35376
|
q: query.q
|
|
35354
35377
|
});
|
|
35355
|
-
const body = await request(
|
|
35378
|
+
const body = await request(path14);
|
|
35356
35379
|
return wikiPageSearchResponseSchema.parse(body).data;
|
|
35357
35380
|
},
|
|
35358
35381
|
async updatePlan(projectSlug, planId, patch) {
|
|
@@ -40661,9 +40684,9 @@ var DirectorRelay = class {
|
|
|
40661
40684
|
|
|
40662
40685
|
// src/remote-phone-relay.ts
|
|
40663
40686
|
function loadOrCreateAgentDeviceKey() {
|
|
40664
|
-
const
|
|
40687
|
+
const path14 = (0, import_node_path7.join)((0, import_node_os5.homedir)(), ".mrrlin", "agent-device-key");
|
|
40665
40688
|
try {
|
|
40666
|
-
const raw = JSON.parse((0, import_node_fs6.readFileSync)(
|
|
40689
|
+
const raw = JSON.parse((0, import_node_fs6.readFileSync)(path14, "utf8"));
|
|
40667
40690
|
if (typeof raw.priv === "string" && typeof raw.pub === "string") {
|
|
40668
40691
|
return { privateKey: fromBase64Url(raw.priv), publicKey: fromBase64Url(raw.pub) };
|
|
40669
40692
|
}
|
|
@@ -40673,7 +40696,7 @@ function loadOrCreateAgentDeviceKey() {
|
|
|
40673
40696
|
try {
|
|
40674
40697
|
(0, import_node_fs6.mkdirSync)((0, import_node_path7.join)((0, import_node_os5.homedir)(), ".mrrlin"), { recursive: true });
|
|
40675
40698
|
(0, import_node_fs6.writeFileSync)(
|
|
40676
|
-
|
|
40699
|
+
path14,
|
|
40677
40700
|
JSON.stringify({ priv: toBase64Url(kp.privateKey), pub: toBase64Url(kp.publicKey) }),
|
|
40678
40701
|
{ mode: 384 }
|
|
40679
40702
|
);
|
|
@@ -40888,9 +40911,9 @@ var CheckoutRegistry = class {
|
|
|
40888
40911
|
get(slug) {
|
|
40889
40912
|
return this.read()[slug] ?? null;
|
|
40890
40913
|
}
|
|
40891
|
-
confirm(slug,
|
|
40914
|
+
confirm(slug, path14, now) {
|
|
40892
40915
|
const all = this.read();
|
|
40893
|
-
all[slug] = { path:
|
|
40916
|
+
all[slug] = { path: path14, confirmedAt: now };
|
|
40894
40917
|
(0, import_node_fs7.writeFileSync)(this.file, JSON.stringify(all, null, 2));
|
|
40895
40918
|
}
|
|
40896
40919
|
};
|
|
@@ -48557,8 +48580,9 @@ var MRRLIN_BLOCK_RE2 = /(^|\n)\[mcp_servers\.mrrlin(?:\]|\.[^\]\n]*\])[\s\S]*?(?
|
|
|
48557
48580
|
async function uninstallCodex(options = {}) {
|
|
48558
48581
|
const codexHome = resolveCodexHome2(options);
|
|
48559
48582
|
const configPath = import_node_path18.default.join(codexHome, "config.toml");
|
|
48583
|
+
const removePrompts = async () => uninstallPrompts(codexHome, options.promptNames ?? []);
|
|
48560
48584
|
if (!await pathExists3(configPath)) {
|
|
48561
|
-
return { action: "missing", configPath };
|
|
48585
|
+
return { action: "missing", configPath, prompts: await removePrompts() };
|
|
48562
48586
|
}
|
|
48563
48587
|
const realPath = await import_promises4.default.realpath(configPath).catch(() => configPath);
|
|
48564
48588
|
const existing = await import_promises4.default.readFile(realPath, "utf8");
|
|
@@ -48575,11 +48599,44 @@ async function uninstallCodex(options = {}) {
|
|
|
48575
48599
|
throw Object.assign(new Error(err.detail), err);
|
|
48576
48600
|
}
|
|
48577
48601
|
if (parsed?.mcp_servers?.["mrrlin"] === void 0) {
|
|
48578
|
-
return { action: "noop", configPath: realPath };
|
|
48602
|
+
return { action: "noop", configPath: realPath, prompts: await removePrompts() };
|
|
48579
48603
|
}
|
|
48580
48604
|
const stripped = existing.replace(MRRLIN_BLOCK_RE2, (match) => match.startsWith("\n") ? "\n" : "").replace(/\n{3,}/g, "\n\n").replace(/^\n+/, "");
|
|
48581
48605
|
await import_promises4.default.writeFile(realPath, stripped, { mode: 384 });
|
|
48582
|
-
return { action: "removed", configPath: realPath };
|
|
48606
|
+
return { action: "removed", configPath: realPath, prompts: await removePrompts() };
|
|
48607
|
+
}
|
|
48608
|
+
async function uninstallPrompts(codexHome, names) {
|
|
48609
|
+
if (names.length === 0) return [];
|
|
48610
|
+
const promptsDir2 = import_node_path18.default.join(codexHome, "prompts");
|
|
48611
|
+
const out = [];
|
|
48612
|
+
for (const name of names) {
|
|
48613
|
+
const promptPath = import_node_path18.default.join(promptsDir2, `${name}.md`);
|
|
48614
|
+
try {
|
|
48615
|
+
await import_promises4.default.unlink(promptPath);
|
|
48616
|
+
out.push({ name, action: "removed", promptPath });
|
|
48617
|
+
} catch (error51) {
|
|
48618
|
+
const code = error51?.code;
|
|
48619
|
+
if (code === "ENOENT") {
|
|
48620
|
+
out.push({ name, action: "missing", promptPath });
|
|
48621
|
+
continue;
|
|
48622
|
+
}
|
|
48623
|
+
throw error51;
|
|
48624
|
+
}
|
|
48625
|
+
}
|
|
48626
|
+
return out;
|
|
48627
|
+
}
|
|
48628
|
+
|
|
48629
|
+
// src/report-issue-prompt.ts
|
|
48630
|
+
var import_node_fs13 = __toESM(require("node:fs"), 1);
|
|
48631
|
+
var import_node_path19 = __toESM(require("node:path"), 1);
|
|
48632
|
+
var import_node_url2 = require("node:url");
|
|
48633
|
+
var import_meta2 = {};
|
|
48634
|
+
function promptsDir() {
|
|
48635
|
+
if (typeof __dirname !== "undefined") return import_node_path19.default.join(__dirname, "prompts");
|
|
48636
|
+
return import_node_path19.default.join(import_node_path19.default.dirname((0, import_node_url2.fileURLToPath)(import_meta2.url)), "prompts");
|
|
48637
|
+
}
|
|
48638
|
+
function readReportIssuePrompt() {
|
|
48639
|
+
return import_node_fs13.default.readFileSync(import_node_path19.default.join(promptsDir(), "report-issue.md"), "utf8");
|
|
48583
48640
|
}
|
|
48584
48641
|
|
|
48585
48642
|
// src/bin.ts
|
|
@@ -48605,7 +48662,9 @@ Usage:
|
|
|
48605
48662
|
|
|
48606
48663
|
mrrlin-mcp install-codex Idempotently register Mrrlin in
|
|
48607
48664
|
[--force] ~/.codex/config.toml (or CODEX_HOME). Adds an
|
|
48608
|
-
[mcp_servers.mrrlin] block
|
|
48665
|
+
[mcp_servers.mrrlin] block AND drops the bundled
|
|
48666
|
+
slash-command prompts (currently: /report-issue)
|
|
48667
|
+
into <CODEX_HOME>/prompts/. Development
|
|
48609
48668
|
checkouts register the local dist/bin.cjs;
|
|
48610
48669
|
published npm installs register
|
|
48611
48670
|
\`mrrlin-mcp serve\`.
|
|
@@ -48688,6 +48747,15 @@ Usage:
|
|
|
48688
48747
|
binary) and the Settings credential revoke. Leaves
|
|
48689
48748
|
global pm2 alone (it may be used elsewhere).
|
|
48690
48749
|
|
|
48750
|
+
mrrlin-mcp report-issue Print the bundled support-report prompt to
|
|
48751
|
+
stdout. Normal users don't need this \u2014 install-codex
|
|
48752
|
+
already drops it as a /report-issue slash command.
|
|
48753
|
+
Useful for: piping it ad-hoc to a non-Codex client,
|
|
48754
|
+
inspecting the shipped contents, or repairing a
|
|
48755
|
+
deleted prompt file:
|
|
48756
|
+
codex "$(mrrlin-mcp report-issue)"
|
|
48757
|
+
mrrlin-mcp report-issue > ~/.codex/prompts/report-issue.md
|
|
48758
|
+
|
|
48691
48759
|
mrrlin-mcp --help Show this help.
|
|
48692
48760
|
|
|
48693
48761
|
Operator notes:
|
|
@@ -48712,9 +48780,21 @@ async function main() {
|
|
|
48712
48780
|
case "install-codex": {
|
|
48713
48781
|
const force = rest.includes("--force");
|
|
48714
48782
|
const binPath = resolveSelfBinPath();
|
|
48715
|
-
const result = await installCodex({
|
|
48783
|
+
const result = await installCodex({
|
|
48784
|
+
binPath,
|
|
48785
|
+
force,
|
|
48786
|
+
prompts: [{ name: "report-issue", content: readReportIssuePrompt() }]
|
|
48787
|
+
});
|
|
48716
48788
|
process.stderr.write(`[mrrlin-mcp install-codex] ${result.action} ${result.configPath}
|
|
48717
48789
|
`);
|
|
48790
|
+
for (const p of result.prompts) {
|
|
48791
|
+
process.stderr.write(`[mrrlin-mcp install-codex] prompt ${p.name}: ${p.action} ${p.promptPath}
|
|
48792
|
+
`);
|
|
48793
|
+
}
|
|
48794
|
+
return;
|
|
48795
|
+
}
|
|
48796
|
+
case "report-issue": {
|
|
48797
|
+
process.stdout.write(readReportIssuePrompt());
|
|
48718
48798
|
return;
|
|
48719
48799
|
}
|
|
48720
48800
|
case "director-bridge": {
|
|
@@ -48733,8 +48813,8 @@ async function main() {
|
|
|
48733
48813
|
env: process.env,
|
|
48734
48814
|
cwd: process.cwd(),
|
|
48735
48815
|
writeFile: (p, c) => {
|
|
48736
|
-
(0,
|
|
48737
|
-
(0,
|
|
48816
|
+
(0, import_node_fs14.mkdirSync)(import_node_path21.default.dirname(p), { recursive: true, mode: 448 });
|
|
48817
|
+
(0, import_node_fs14.writeFileSync)(p, c, { mode: 384 });
|
|
48738
48818
|
},
|
|
48739
48819
|
runPm2: pm2Runner,
|
|
48740
48820
|
which: whichBin,
|
|
@@ -48751,14 +48831,14 @@ async function main() {
|
|
|
48751
48831
|
runPm2: (a) => ({ code: pm2Runner(a).code }),
|
|
48752
48832
|
removeFile: (p) => {
|
|
48753
48833
|
try {
|
|
48754
|
-
(0,
|
|
48834
|
+
(0, import_node_fs14.rmSync)(p, { force: true });
|
|
48755
48835
|
} catch {
|
|
48756
48836
|
}
|
|
48757
48837
|
},
|
|
48758
48838
|
purgeSecret: purge,
|
|
48759
48839
|
secretPath: agentCredentialPath(),
|
|
48760
48840
|
tokenPath: operatorTokenPath(),
|
|
48761
|
-
ecoPath:
|
|
48841
|
+
ecoPath: import_node_path21.default.join(process.env.HOME ?? (0, import_node_os10.homedir)(), ".mrrlin", "ecosystem.config.cjs"),
|
|
48762
48842
|
log: (m) => process.stderr.write(`[mrrlin-mcp uninstall-service] ${m}
|
|
48763
48843
|
`)
|
|
48764
48844
|
});
|
|
@@ -48772,22 +48852,25 @@ async function main() {
|
|
|
48772
48852
|
runPm2: (a) => ({ code: pm2Runner(a).code }),
|
|
48773
48853
|
removeFile: (p) => {
|
|
48774
48854
|
try {
|
|
48775
|
-
(0,
|
|
48855
|
+
(0, import_node_fs14.rmSync)(p, { force: true });
|
|
48776
48856
|
} catch {
|
|
48777
48857
|
}
|
|
48778
48858
|
},
|
|
48779
48859
|
purgeSecret: true,
|
|
48780
48860
|
secretPath: agentCredentialPath(),
|
|
48781
48861
|
tokenPath: operatorTokenPath(),
|
|
48782
|
-
ecoPath:
|
|
48862
|
+
ecoPath: import_node_path21.default.join(home, ".mrrlin", "ecosystem.config.cjs"),
|
|
48783
48863
|
log
|
|
48784
48864
|
});
|
|
48785
48865
|
let codexOk = true;
|
|
48786
48866
|
let codexConfigPath = "~/.codex/config.toml";
|
|
48787
48867
|
try {
|
|
48788
|
-
const res = await uninstallCodex({});
|
|
48868
|
+
const res = await uninstallCodex({ promptNames: ["report-issue"] });
|
|
48789
48869
|
codexConfigPath = res.configPath;
|
|
48790
48870
|
log(`codex config: ${res.action} (${res.configPath})`);
|
|
48871
|
+
for (const p of res.prompts) {
|
|
48872
|
+
log(`codex prompt ${p.name}: ${p.action} (${p.promptPath})`);
|
|
48873
|
+
}
|
|
48791
48874
|
} catch (error51) {
|
|
48792
48875
|
codexOk = false;
|
|
48793
48876
|
if (error51 && typeof error51 === "object" && typeof error51.configPath === "string") {
|
|
@@ -48796,7 +48879,7 @@ async function main() {
|
|
|
48796
48879
|
log(`codex config NOT modified: ${error51 instanceof Error ? error51.message : String(error51)}`);
|
|
48797
48880
|
}
|
|
48798
48881
|
try {
|
|
48799
|
-
(0,
|
|
48882
|
+
(0, import_node_fs14.rmSync)(import_node_path21.default.join(home, ".mrrlin"), { recursive: true, force: true });
|
|
48800
48883
|
} catch {
|
|
48801
48884
|
}
|
|
48802
48885
|
log("removed ~/.mrrlin");
|
|
@@ -48837,7 +48920,7 @@ ${HELP_TEXT}`);
|
|
|
48837
48920
|
}
|
|
48838
48921
|
}
|
|
48839
48922
|
function resolveSelfBinPath() {
|
|
48840
|
-
return
|
|
48923
|
+
return import_node_path20.default.resolve(process.argv[1] ?? process.execPath);
|
|
48841
48924
|
}
|
|
48842
48925
|
main().catch((error51) => {
|
|
48843
48926
|
process.stderr.write(`mrrlin-mcp fatal error: ${error51 instanceof Error ? error51.message : String(error51)}
|