@formatjs/cli 6.1.5 → 6.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/formatjs +818 -3
- package/package.json +4 -4
package/bin/formatjs
CHANGED
|
@@ -6620,6 +6620,814 @@ var require_ensure = __commonJS({
|
|
|
6620
6620
|
}
|
|
6621
6621
|
});
|
|
6622
6622
|
|
|
6623
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js
|
|
6624
|
+
var require_polyfills2 = __commonJS({
|
|
6625
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports, module2) {
|
|
6626
|
+
var constants = require("constants");
|
|
6627
|
+
var origCwd = process.cwd;
|
|
6628
|
+
var cwd = null;
|
|
6629
|
+
var platform = process.env.GRACEFUL_FS_PLATFORM || process.platform;
|
|
6630
|
+
process.cwd = function() {
|
|
6631
|
+
if (!cwd)
|
|
6632
|
+
cwd = origCwd.call(process);
|
|
6633
|
+
return cwd;
|
|
6634
|
+
};
|
|
6635
|
+
try {
|
|
6636
|
+
process.cwd();
|
|
6637
|
+
} catch (er) {
|
|
6638
|
+
}
|
|
6639
|
+
if (typeof process.chdir === "function") {
|
|
6640
|
+
chdir = process.chdir;
|
|
6641
|
+
process.chdir = function(d) {
|
|
6642
|
+
cwd = null;
|
|
6643
|
+
chdir.call(process, d);
|
|
6644
|
+
};
|
|
6645
|
+
if (Object.setPrototypeOf)
|
|
6646
|
+
Object.setPrototypeOf(process.chdir, chdir);
|
|
6647
|
+
}
|
|
6648
|
+
var chdir;
|
|
6649
|
+
module2.exports = patch;
|
|
6650
|
+
function patch(fs) {
|
|
6651
|
+
if (constants.hasOwnProperty("O_SYMLINK") && process.version.match(/^v0\.6\.[0-2]|^v0\.5\./)) {
|
|
6652
|
+
patchLchmod(fs);
|
|
6653
|
+
}
|
|
6654
|
+
if (!fs.lutimes) {
|
|
6655
|
+
patchLutimes(fs);
|
|
6656
|
+
}
|
|
6657
|
+
fs.chown = chownFix(fs.chown);
|
|
6658
|
+
fs.fchown = chownFix(fs.fchown);
|
|
6659
|
+
fs.lchown = chownFix(fs.lchown);
|
|
6660
|
+
fs.chmod = chmodFix(fs.chmod);
|
|
6661
|
+
fs.fchmod = chmodFix(fs.fchmod);
|
|
6662
|
+
fs.lchmod = chmodFix(fs.lchmod);
|
|
6663
|
+
fs.chownSync = chownFixSync(fs.chownSync);
|
|
6664
|
+
fs.fchownSync = chownFixSync(fs.fchownSync);
|
|
6665
|
+
fs.lchownSync = chownFixSync(fs.lchownSync);
|
|
6666
|
+
fs.chmodSync = chmodFixSync(fs.chmodSync);
|
|
6667
|
+
fs.fchmodSync = chmodFixSync(fs.fchmodSync);
|
|
6668
|
+
fs.lchmodSync = chmodFixSync(fs.lchmodSync);
|
|
6669
|
+
fs.stat = statFix(fs.stat);
|
|
6670
|
+
fs.fstat = statFix(fs.fstat);
|
|
6671
|
+
fs.lstat = statFix(fs.lstat);
|
|
6672
|
+
fs.statSync = statFixSync(fs.statSync);
|
|
6673
|
+
fs.fstatSync = statFixSync(fs.fstatSync);
|
|
6674
|
+
fs.lstatSync = statFixSync(fs.lstatSync);
|
|
6675
|
+
if (fs.chmod && !fs.lchmod) {
|
|
6676
|
+
fs.lchmod = function(path, mode, cb) {
|
|
6677
|
+
if (cb)
|
|
6678
|
+
process.nextTick(cb);
|
|
6679
|
+
};
|
|
6680
|
+
fs.lchmodSync = function() {
|
|
6681
|
+
};
|
|
6682
|
+
}
|
|
6683
|
+
if (fs.chown && !fs.lchown) {
|
|
6684
|
+
fs.lchown = function(path, uid, gid, cb) {
|
|
6685
|
+
if (cb)
|
|
6686
|
+
process.nextTick(cb);
|
|
6687
|
+
};
|
|
6688
|
+
fs.lchownSync = function() {
|
|
6689
|
+
};
|
|
6690
|
+
}
|
|
6691
|
+
if (platform === "win32") {
|
|
6692
|
+
fs.rename = typeof fs.rename !== "function" ? fs.rename : function(fs$rename) {
|
|
6693
|
+
function rename(from, to, cb) {
|
|
6694
|
+
var start = Date.now();
|
|
6695
|
+
var backoff = 0;
|
|
6696
|
+
fs$rename(from, to, function CB(er) {
|
|
6697
|
+
if (er && (er.code === "EACCES" || er.code === "EPERM" || er.code === "EBUSY") && Date.now() - start < 6e4) {
|
|
6698
|
+
setTimeout(function() {
|
|
6699
|
+
fs.stat(to, function(stater, st) {
|
|
6700
|
+
if (stater && stater.code === "ENOENT")
|
|
6701
|
+
fs$rename(from, to, CB);
|
|
6702
|
+
else
|
|
6703
|
+
cb(er);
|
|
6704
|
+
});
|
|
6705
|
+
}, backoff);
|
|
6706
|
+
if (backoff < 100)
|
|
6707
|
+
backoff += 10;
|
|
6708
|
+
return;
|
|
6709
|
+
}
|
|
6710
|
+
if (cb)
|
|
6711
|
+
cb(er);
|
|
6712
|
+
});
|
|
6713
|
+
}
|
|
6714
|
+
if (Object.setPrototypeOf)
|
|
6715
|
+
Object.setPrototypeOf(rename, fs$rename);
|
|
6716
|
+
return rename;
|
|
6717
|
+
}(fs.rename);
|
|
6718
|
+
}
|
|
6719
|
+
fs.read = typeof fs.read !== "function" ? fs.read : function(fs$read) {
|
|
6720
|
+
function read(fd, buffer, offset, length, position, callback_) {
|
|
6721
|
+
var callback;
|
|
6722
|
+
if (callback_ && typeof callback_ === "function") {
|
|
6723
|
+
var eagCounter = 0;
|
|
6724
|
+
callback = function(er, _, __) {
|
|
6725
|
+
if (er && er.code === "EAGAIN" && eagCounter < 10) {
|
|
6726
|
+
eagCounter++;
|
|
6727
|
+
return fs$read.call(fs, fd, buffer, offset, length, position, callback);
|
|
6728
|
+
}
|
|
6729
|
+
callback_.apply(this, arguments);
|
|
6730
|
+
};
|
|
6731
|
+
}
|
|
6732
|
+
return fs$read.call(fs, fd, buffer, offset, length, position, callback);
|
|
6733
|
+
}
|
|
6734
|
+
if (Object.setPrototypeOf)
|
|
6735
|
+
Object.setPrototypeOf(read, fs$read);
|
|
6736
|
+
return read;
|
|
6737
|
+
}(fs.read);
|
|
6738
|
+
fs.readSync = typeof fs.readSync !== "function" ? fs.readSync : function(fs$readSync) {
|
|
6739
|
+
return function(fd, buffer, offset, length, position) {
|
|
6740
|
+
var eagCounter = 0;
|
|
6741
|
+
while (true) {
|
|
6742
|
+
try {
|
|
6743
|
+
return fs$readSync.call(fs, fd, buffer, offset, length, position);
|
|
6744
|
+
} catch (er) {
|
|
6745
|
+
if (er.code === "EAGAIN" && eagCounter < 10) {
|
|
6746
|
+
eagCounter++;
|
|
6747
|
+
continue;
|
|
6748
|
+
}
|
|
6749
|
+
throw er;
|
|
6750
|
+
}
|
|
6751
|
+
}
|
|
6752
|
+
};
|
|
6753
|
+
}(fs.readSync);
|
|
6754
|
+
function patchLchmod(fs2) {
|
|
6755
|
+
fs2.lchmod = function(path, mode, callback) {
|
|
6756
|
+
fs2.open(
|
|
6757
|
+
path,
|
|
6758
|
+
constants.O_WRONLY | constants.O_SYMLINK,
|
|
6759
|
+
mode,
|
|
6760
|
+
function(err, fd) {
|
|
6761
|
+
if (err) {
|
|
6762
|
+
if (callback)
|
|
6763
|
+
callback(err);
|
|
6764
|
+
return;
|
|
6765
|
+
}
|
|
6766
|
+
fs2.fchmod(fd, mode, function(err2) {
|
|
6767
|
+
fs2.close(fd, function(err22) {
|
|
6768
|
+
if (callback)
|
|
6769
|
+
callback(err2 || err22);
|
|
6770
|
+
});
|
|
6771
|
+
});
|
|
6772
|
+
}
|
|
6773
|
+
);
|
|
6774
|
+
};
|
|
6775
|
+
fs2.lchmodSync = function(path, mode) {
|
|
6776
|
+
var fd = fs2.openSync(path, constants.O_WRONLY | constants.O_SYMLINK, mode);
|
|
6777
|
+
var threw = true;
|
|
6778
|
+
var ret;
|
|
6779
|
+
try {
|
|
6780
|
+
ret = fs2.fchmodSync(fd, mode);
|
|
6781
|
+
threw = false;
|
|
6782
|
+
} finally {
|
|
6783
|
+
if (threw) {
|
|
6784
|
+
try {
|
|
6785
|
+
fs2.closeSync(fd);
|
|
6786
|
+
} catch (er) {
|
|
6787
|
+
}
|
|
6788
|
+
} else {
|
|
6789
|
+
fs2.closeSync(fd);
|
|
6790
|
+
}
|
|
6791
|
+
}
|
|
6792
|
+
return ret;
|
|
6793
|
+
};
|
|
6794
|
+
}
|
|
6795
|
+
function patchLutimes(fs2) {
|
|
6796
|
+
if (constants.hasOwnProperty("O_SYMLINK") && fs2.futimes) {
|
|
6797
|
+
fs2.lutimes = function(path, at, mt, cb) {
|
|
6798
|
+
fs2.open(path, constants.O_SYMLINK, function(er, fd) {
|
|
6799
|
+
if (er) {
|
|
6800
|
+
if (cb)
|
|
6801
|
+
cb(er);
|
|
6802
|
+
return;
|
|
6803
|
+
}
|
|
6804
|
+
fs2.futimes(fd, at, mt, function(er2) {
|
|
6805
|
+
fs2.close(fd, function(er22) {
|
|
6806
|
+
if (cb)
|
|
6807
|
+
cb(er2 || er22);
|
|
6808
|
+
});
|
|
6809
|
+
});
|
|
6810
|
+
});
|
|
6811
|
+
};
|
|
6812
|
+
fs2.lutimesSync = function(path, at, mt) {
|
|
6813
|
+
var fd = fs2.openSync(path, constants.O_SYMLINK);
|
|
6814
|
+
var ret;
|
|
6815
|
+
var threw = true;
|
|
6816
|
+
try {
|
|
6817
|
+
ret = fs2.futimesSync(fd, at, mt);
|
|
6818
|
+
threw = false;
|
|
6819
|
+
} finally {
|
|
6820
|
+
if (threw) {
|
|
6821
|
+
try {
|
|
6822
|
+
fs2.closeSync(fd);
|
|
6823
|
+
} catch (er) {
|
|
6824
|
+
}
|
|
6825
|
+
} else {
|
|
6826
|
+
fs2.closeSync(fd);
|
|
6827
|
+
}
|
|
6828
|
+
}
|
|
6829
|
+
return ret;
|
|
6830
|
+
};
|
|
6831
|
+
} else if (fs2.futimes) {
|
|
6832
|
+
fs2.lutimes = function(_a, _b, _c, cb) {
|
|
6833
|
+
if (cb)
|
|
6834
|
+
process.nextTick(cb);
|
|
6835
|
+
};
|
|
6836
|
+
fs2.lutimesSync = function() {
|
|
6837
|
+
};
|
|
6838
|
+
}
|
|
6839
|
+
}
|
|
6840
|
+
function chmodFix(orig) {
|
|
6841
|
+
if (!orig)
|
|
6842
|
+
return orig;
|
|
6843
|
+
return function(target, mode, cb) {
|
|
6844
|
+
return orig.call(fs, target, mode, function(er) {
|
|
6845
|
+
if (chownErOk(er))
|
|
6846
|
+
er = null;
|
|
6847
|
+
if (cb)
|
|
6848
|
+
cb.apply(this, arguments);
|
|
6849
|
+
});
|
|
6850
|
+
};
|
|
6851
|
+
}
|
|
6852
|
+
function chmodFixSync(orig) {
|
|
6853
|
+
if (!orig)
|
|
6854
|
+
return orig;
|
|
6855
|
+
return function(target, mode) {
|
|
6856
|
+
try {
|
|
6857
|
+
return orig.call(fs, target, mode);
|
|
6858
|
+
} catch (er) {
|
|
6859
|
+
if (!chownErOk(er))
|
|
6860
|
+
throw er;
|
|
6861
|
+
}
|
|
6862
|
+
};
|
|
6863
|
+
}
|
|
6864
|
+
function chownFix(orig) {
|
|
6865
|
+
if (!orig)
|
|
6866
|
+
return orig;
|
|
6867
|
+
return function(target, uid, gid, cb) {
|
|
6868
|
+
return orig.call(fs, target, uid, gid, function(er) {
|
|
6869
|
+
if (chownErOk(er))
|
|
6870
|
+
er = null;
|
|
6871
|
+
if (cb)
|
|
6872
|
+
cb.apply(this, arguments);
|
|
6873
|
+
});
|
|
6874
|
+
};
|
|
6875
|
+
}
|
|
6876
|
+
function chownFixSync(orig) {
|
|
6877
|
+
if (!orig)
|
|
6878
|
+
return orig;
|
|
6879
|
+
return function(target, uid, gid) {
|
|
6880
|
+
try {
|
|
6881
|
+
return orig.call(fs, target, uid, gid);
|
|
6882
|
+
} catch (er) {
|
|
6883
|
+
if (!chownErOk(er))
|
|
6884
|
+
throw er;
|
|
6885
|
+
}
|
|
6886
|
+
};
|
|
6887
|
+
}
|
|
6888
|
+
function statFix(orig) {
|
|
6889
|
+
if (!orig)
|
|
6890
|
+
return orig;
|
|
6891
|
+
return function(target, options, cb) {
|
|
6892
|
+
if (typeof options === "function") {
|
|
6893
|
+
cb = options;
|
|
6894
|
+
options = null;
|
|
6895
|
+
}
|
|
6896
|
+
function callback(er, stats) {
|
|
6897
|
+
if (stats) {
|
|
6898
|
+
if (stats.uid < 0)
|
|
6899
|
+
stats.uid += 4294967296;
|
|
6900
|
+
if (stats.gid < 0)
|
|
6901
|
+
stats.gid += 4294967296;
|
|
6902
|
+
}
|
|
6903
|
+
if (cb)
|
|
6904
|
+
cb.apply(this, arguments);
|
|
6905
|
+
}
|
|
6906
|
+
return options ? orig.call(fs, target, options, callback) : orig.call(fs, target, callback);
|
|
6907
|
+
};
|
|
6908
|
+
}
|
|
6909
|
+
function statFixSync(orig) {
|
|
6910
|
+
if (!orig)
|
|
6911
|
+
return orig;
|
|
6912
|
+
return function(target, options) {
|
|
6913
|
+
var stats = options ? orig.call(fs, target, options) : orig.call(fs, target);
|
|
6914
|
+
if (stats) {
|
|
6915
|
+
if (stats.uid < 0)
|
|
6916
|
+
stats.uid += 4294967296;
|
|
6917
|
+
if (stats.gid < 0)
|
|
6918
|
+
stats.gid += 4294967296;
|
|
6919
|
+
}
|
|
6920
|
+
return stats;
|
|
6921
|
+
};
|
|
6922
|
+
}
|
|
6923
|
+
function chownErOk(er) {
|
|
6924
|
+
if (!er)
|
|
6925
|
+
return true;
|
|
6926
|
+
if (er.code === "ENOSYS")
|
|
6927
|
+
return true;
|
|
6928
|
+
var nonroot = !process.getuid || process.getuid() !== 0;
|
|
6929
|
+
if (nonroot) {
|
|
6930
|
+
if (er.code === "EINVAL" || er.code === "EPERM")
|
|
6931
|
+
return true;
|
|
6932
|
+
}
|
|
6933
|
+
return false;
|
|
6934
|
+
}
|
|
6935
|
+
}
|
|
6936
|
+
}
|
|
6937
|
+
});
|
|
6938
|
+
|
|
6939
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js
|
|
6940
|
+
var require_legacy_streams2 = __commonJS({
|
|
6941
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/legacy-streams.js"(exports, module2) {
|
|
6942
|
+
var Stream = require("stream").Stream;
|
|
6943
|
+
module2.exports = legacy;
|
|
6944
|
+
function legacy(fs) {
|
|
6945
|
+
return {
|
|
6946
|
+
ReadStream,
|
|
6947
|
+
WriteStream
|
|
6948
|
+
};
|
|
6949
|
+
function ReadStream(path, options) {
|
|
6950
|
+
if (!(this instanceof ReadStream))
|
|
6951
|
+
return new ReadStream(path, options);
|
|
6952
|
+
Stream.call(this);
|
|
6953
|
+
var self = this;
|
|
6954
|
+
this.path = path;
|
|
6955
|
+
this.fd = null;
|
|
6956
|
+
this.readable = true;
|
|
6957
|
+
this.paused = false;
|
|
6958
|
+
this.flags = "r";
|
|
6959
|
+
this.mode = 438;
|
|
6960
|
+
this.bufferSize = 64 * 1024;
|
|
6961
|
+
options = options || {};
|
|
6962
|
+
var keys = Object.keys(options);
|
|
6963
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
6964
|
+
var key = keys[index];
|
|
6965
|
+
this[key] = options[key];
|
|
6966
|
+
}
|
|
6967
|
+
if (this.encoding)
|
|
6968
|
+
this.setEncoding(this.encoding);
|
|
6969
|
+
if (this.start !== void 0) {
|
|
6970
|
+
if ("number" !== typeof this.start) {
|
|
6971
|
+
throw TypeError("start must be a Number");
|
|
6972
|
+
}
|
|
6973
|
+
if (this.end === void 0) {
|
|
6974
|
+
this.end = Infinity;
|
|
6975
|
+
} else if ("number" !== typeof this.end) {
|
|
6976
|
+
throw TypeError("end must be a Number");
|
|
6977
|
+
}
|
|
6978
|
+
if (this.start > this.end) {
|
|
6979
|
+
throw new Error("start must be <= end");
|
|
6980
|
+
}
|
|
6981
|
+
this.pos = this.start;
|
|
6982
|
+
}
|
|
6983
|
+
if (this.fd !== null) {
|
|
6984
|
+
process.nextTick(function() {
|
|
6985
|
+
self._read();
|
|
6986
|
+
});
|
|
6987
|
+
return;
|
|
6988
|
+
}
|
|
6989
|
+
fs.open(this.path, this.flags, this.mode, function(err, fd) {
|
|
6990
|
+
if (err) {
|
|
6991
|
+
self.emit("error", err);
|
|
6992
|
+
self.readable = false;
|
|
6993
|
+
return;
|
|
6994
|
+
}
|
|
6995
|
+
self.fd = fd;
|
|
6996
|
+
self.emit("open", fd);
|
|
6997
|
+
self._read();
|
|
6998
|
+
});
|
|
6999
|
+
}
|
|
7000
|
+
function WriteStream(path, options) {
|
|
7001
|
+
if (!(this instanceof WriteStream))
|
|
7002
|
+
return new WriteStream(path, options);
|
|
7003
|
+
Stream.call(this);
|
|
7004
|
+
this.path = path;
|
|
7005
|
+
this.fd = null;
|
|
7006
|
+
this.writable = true;
|
|
7007
|
+
this.flags = "w";
|
|
7008
|
+
this.encoding = "binary";
|
|
7009
|
+
this.mode = 438;
|
|
7010
|
+
this.bytesWritten = 0;
|
|
7011
|
+
options = options || {};
|
|
7012
|
+
var keys = Object.keys(options);
|
|
7013
|
+
for (var index = 0, length = keys.length; index < length; index++) {
|
|
7014
|
+
var key = keys[index];
|
|
7015
|
+
this[key] = options[key];
|
|
7016
|
+
}
|
|
7017
|
+
if (this.start !== void 0) {
|
|
7018
|
+
if ("number" !== typeof this.start) {
|
|
7019
|
+
throw TypeError("start must be a Number");
|
|
7020
|
+
}
|
|
7021
|
+
if (this.start < 0) {
|
|
7022
|
+
throw new Error("start must be >= zero");
|
|
7023
|
+
}
|
|
7024
|
+
this.pos = this.start;
|
|
7025
|
+
}
|
|
7026
|
+
this.busy = false;
|
|
7027
|
+
this._queue = [];
|
|
7028
|
+
if (this.fd === null) {
|
|
7029
|
+
this._open = fs.open;
|
|
7030
|
+
this._queue.push([this._open, this.path, this.flags, this.mode, void 0]);
|
|
7031
|
+
this.flush();
|
|
7032
|
+
}
|
|
7033
|
+
}
|
|
7034
|
+
}
|
|
7035
|
+
}
|
|
7036
|
+
});
|
|
7037
|
+
|
|
7038
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js
|
|
7039
|
+
var require_clone2 = __commonJS({
|
|
7040
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/clone.js"(exports, module2) {
|
|
7041
|
+
"use strict";
|
|
7042
|
+
module2.exports = clone;
|
|
7043
|
+
var getPrototypeOf = Object.getPrototypeOf || function(obj) {
|
|
7044
|
+
return obj.__proto__;
|
|
7045
|
+
};
|
|
7046
|
+
function clone(obj) {
|
|
7047
|
+
if (obj === null || typeof obj !== "object")
|
|
7048
|
+
return obj;
|
|
7049
|
+
if (obj instanceof Object)
|
|
7050
|
+
var copy = { __proto__: getPrototypeOf(obj) };
|
|
7051
|
+
else
|
|
7052
|
+
var copy = /* @__PURE__ */ Object.create(null);
|
|
7053
|
+
Object.getOwnPropertyNames(obj).forEach(function(key) {
|
|
7054
|
+
Object.defineProperty(copy, key, Object.getOwnPropertyDescriptor(obj, key));
|
|
7055
|
+
});
|
|
7056
|
+
return copy;
|
|
7057
|
+
}
|
|
7058
|
+
}
|
|
7059
|
+
});
|
|
7060
|
+
|
|
7061
|
+
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js
|
|
7062
|
+
var require_graceful_fs2 = __commonJS({
|
|
7063
|
+
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/graceful-fs@4.2.11/node_modules/graceful-fs/graceful-fs.js"(exports, module2) {
|
|
7064
|
+
var fs = require("fs");
|
|
7065
|
+
var polyfills = require_polyfills2();
|
|
7066
|
+
var legacy = require_legacy_streams2();
|
|
7067
|
+
var clone = require_clone2();
|
|
7068
|
+
var util = require("util");
|
|
7069
|
+
var gracefulQueue;
|
|
7070
|
+
var previousSymbol;
|
|
7071
|
+
if (typeof Symbol === "function" && typeof Symbol.for === "function") {
|
|
7072
|
+
gracefulQueue = Symbol.for("graceful-fs.queue");
|
|
7073
|
+
previousSymbol = Symbol.for("graceful-fs.previous");
|
|
7074
|
+
} else {
|
|
7075
|
+
gracefulQueue = "___graceful-fs.queue";
|
|
7076
|
+
previousSymbol = "___graceful-fs.previous";
|
|
7077
|
+
}
|
|
7078
|
+
function noop() {
|
|
7079
|
+
}
|
|
7080
|
+
function publishQueue(context, queue2) {
|
|
7081
|
+
Object.defineProperty(context, gracefulQueue, {
|
|
7082
|
+
get: function() {
|
|
7083
|
+
return queue2;
|
|
7084
|
+
}
|
|
7085
|
+
});
|
|
7086
|
+
}
|
|
7087
|
+
var debug2 = noop;
|
|
7088
|
+
if (util.debuglog)
|
|
7089
|
+
debug2 = util.debuglog("gfs4");
|
|
7090
|
+
else if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || ""))
|
|
7091
|
+
debug2 = function() {
|
|
7092
|
+
var m = util.format.apply(util, arguments);
|
|
7093
|
+
m = "GFS4: " + m.split(/\n/).join("\nGFS4: ");
|
|
7094
|
+
console.error(m);
|
|
7095
|
+
};
|
|
7096
|
+
if (!fs[gracefulQueue]) {
|
|
7097
|
+
queue = global[gracefulQueue] || [];
|
|
7098
|
+
publishQueue(fs, queue);
|
|
7099
|
+
fs.close = function(fs$close) {
|
|
7100
|
+
function close(fd, cb) {
|
|
7101
|
+
return fs$close.call(fs, fd, function(err) {
|
|
7102
|
+
if (!err) {
|
|
7103
|
+
resetQueue();
|
|
7104
|
+
}
|
|
7105
|
+
if (typeof cb === "function")
|
|
7106
|
+
cb.apply(this, arguments);
|
|
7107
|
+
});
|
|
7108
|
+
}
|
|
7109
|
+
Object.defineProperty(close, previousSymbol, {
|
|
7110
|
+
value: fs$close
|
|
7111
|
+
});
|
|
7112
|
+
return close;
|
|
7113
|
+
}(fs.close);
|
|
7114
|
+
fs.closeSync = function(fs$closeSync) {
|
|
7115
|
+
function closeSync(fd) {
|
|
7116
|
+
fs$closeSync.apply(fs, arguments);
|
|
7117
|
+
resetQueue();
|
|
7118
|
+
}
|
|
7119
|
+
Object.defineProperty(closeSync, previousSymbol, {
|
|
7120
|
+
value: fs$closeSync
|
|
7121
|
+
});
|
|
7122
|
+
return closeSync;
|
|
7123
|
+
}(fs.closeSync);
|
|
7124
|
+
if (/\bgfs4\b/i.test(process.env.NODE_DEBUG || "")) {
|
|
7125
|
+
process.on("exit", function() {
|
|
7126
|
+
debug2(fs[gracefulQueue]);
|
|
7127
|
+
require("assert").equal(fs[gracefulQueue].length, 0);
|
|
7128
|
+
});
|
|
7129
|
+
}
|
|
7130
|
+
}
|
|
7131
|
+
var queue;
|
|
7132
|
+
if (!global[gracefulQueue]) {
|
|
7133
|
+
publishQueue(global, fs[gracefulQueue]);
|
|
7134
|
+
}
|
|
7135
|
+
module2.exports = patch(clone(fs));
|
|
7136
|
+
if (process.env.TEST_GRACEFUL_FS_GLOBAL_PATCH && !fs.__patched) {
|
|
7137
|
+
module2.exports = patch(fs);
|
|
7138
|
+
fs.__patched = true;
|
|
7139
|
+
}
|
|
7140
|
+
function patch(fs2) {
|
|
7141
|
+
polyfills(fs2);
|
|
7142
|
+
fs2.gracefulify = patch;
|
|
7143
|
+
fs2.createReadStream = createReadStream;
|
|
7144
|
+
fs2.createWriteStream = createWriteStream;
|
|
7145
|
+
var fs$readFile = fs2.readFile;
|
|
7146
|
+
fs2.readFile = readFile2;
|
|
7147
|
+
function readFile2(path, options, cb) {
|
|
7148
|
+
if (typeof options === "function")
|
|
7149
|
+
cb = options, options = null;
|
|
7150
|
+
return go$readFile(path, options, cb);
|
|
7151
|
+
function go$readFile(path2, options2, cb2, startTime) {
|
|
7152
|
+
return fs$readFile(path2, options2, function(err) {
|
|
7153
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7154
|
+
enqueue([go$readFile, [path2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7155
|
+
else {
|
|
7156
|
+
if (typeof cb2 === "function")
|
|
7157
|
+
cb2.apply(this, arguments);
|
|
7158
|
+
}
|
|
7159
|
+
});
|
|
7160
|
+
}
|
|
7161
|
+
}
|
|
7162
|
+
var fs$writeFile = fs2.writeFile;
|
|
7163
|
+
fs2.writeFile = writeFile;
|
|
7164
|
+
function writeFile(path, data, options, cb) {
|
|
7165
|
+
if (typeof options === "function")
|
|
7166
|
+
cb = options, options = null;
|
|
7167
|
+
return go$writeFile(path, data, options, cb);
|
|
7168
|
+
function go$writeFile(path2, data2, options2, cb2, startTime) {
|
|
7169
|
+
return fs$writeFile(path2, data2, options2, function(err) {
|
|
7170
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7171
|
+
enqueue([go$writeFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7172
|
+
else {
|
|
7173
|
+
if (typeof cb2 === "function")
|
|
7174
|
+
cb2.apply(this, arguments);
|
|
7175
|
+
}
|
|
7176
|
+
});
|
|
7177
|
+
}
|
|
7178
|
+
}
|
|
7179
|
+
var fs$appendFile = fs2.appendFile;
|
|
7180
|
+
if (fs$appendFile)
|
|
7181
|
+
fs2.appendFile = appendFile;
|
|
7182
|
+
function appendFile(path, data, options, cb) {
|
|
7183
|
+
if (typeof options === "function")
|
|
7184
|
+
cb = options, options = null;
|
|
7185
|
+
return go$appendFile(path, data, options, cb);
|
|
7186
|
+
function go$appendFile(path2, data2, options2, cb2, startTime) {
|
|
7187
|
+
return fs$appendFile(path2, data2, options2, function(err) {
|
|
7188
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7189
|
+
enqueue([go$appendFile, [path2, data2, options2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7190
|
+
else {
|
|
7191
|
+
if (typeof cb2 === "function")
|
|
7192
|
+
cb2.apply(this, arguments);
|
|
7193
|
+
}
|
|
7194
|
+
});
|
|
7195
|
+
}
|
|
7196
|
+
}
|
|
7197
|
+
var fs$copyFile = fs2.copyFile;
|
|
7198
|
+
if (fs$copyFile)
|
|
7199
|
+
fs2.copyFile = copyFile;
|
|
7200
|
+
function copyFile(src, dest, flags, cb) {
|
|
7201
|
+
if (typeof flags === "function") {
|
|
7202
|
+
cb = flags;
|
|
7203
|
+
flags = 0;
|
|
7204
|
+
}
|
|
7205
|
+
return go$copyFile(src, dest, flags, cb);
|
|
7206
|
+
function go$copyFile(src2, dest2, flags2, cb2, startTime) {
|
|
7207
|
+
return fs$copyFile(src2, dest2, flags2, function(err) {
|
|
7208
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7209
|
+
enqueue([go$copyFile, [src2, dest2, flags2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7210
|
+
else {
|
|
7211
|
+
if (typeof cb2 === "function")
|
|
7212
|
+
cb2.apply(this, arguments);
|
|
7213
|
+
}
|
|
7214
|
+
});
|
|
7215
|
+
}
|
|
7216
|
+
}
|
|
7217
|
+
var fs$readdir = fs2.readdir;
|
|
7218
|
+
fs2.readdir = readdir;
|
|
7219
|
+
var noReaddirOptionVersions = /^v[0-5]\./;
|
|
7220
|
+
function readdir(path, options, cb) {
|
|
7221
|
+
if (typeof options === "function")
|
|
7222
|
+
cb = options, options = null;
|
|
7223
|
+
var go$readdir = noReaddirOptionVersions.test(process.version) ? function go$readdir2(path2, options2, cb2, startTime) {
|
|
7224
|
+
return fs$readdir(path2, fs$readdirCallback(
|
|
7225
|
+
path2,
|
|
7226
|
+
options2,
|
|
7227
|
+
cb2,
|
|
7228
|
+
startTime
|
|
7229
|
+
));
|
|
7230
|
+
} : function go$readdir2(path2, options2, cb2, startTime) {
|
|
7231
|
+
return fs$readdir(path2, options2, fs$readdirCallback(
|
|
7232
|
+
path2,
|
|
7233
|
+
options2,
|
|
7234
|
+
cb2,
|
|
7235
|
+
startTime
|
|
7236
|
+
));
|
|
7237
|
+
};
|
|
7238
|
+
return go$readdir(path, options, cb);
|
|
7239
|
+
function fs$readdirCallback(path2, options2, cb2, startTime) {
|
|
7240
|
+
return function(err, files) {
|
|
7241
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7242
|
+
enqueue([
|
|
7243
|
+
go$readdir,
|
|
7244
|
+
[path2, options2, cb2],
|
|
7245
|
+
err,
|
|
7246
|
+
startTime || Date.now(),
|
|
7247
|
+
Date.now()
|
|
7248
|
+
]);
|
|
7249
|
+
else {
|
|
7250
|
+
if (files && files.sort)
|
|
7251
|
+
files.sort();
|
|
7252
|
+
if (typeof cb2 === "function")
|
|
7253
|
+
cb2.call(this, err, files);
|
|
7254
|
+
}
|
|
7255
|
+
};
|
|
7256
|
+
}
|
|
7257
|
+
}
|
|
7258
|
+
if (process.version.substr(0, 4) === "v0.8") {
|
|
7259
|
+
var legStreams = legacy(fs2);
|
|
7260
|
+
ReadStream = legStreams.ReadStream;
|
|
7261
|
+
WriteStream = legStreams.WriteStream;
|
|
7262
|
+
}
|
|
7263
|
+
var fs$ReadStream = fs2.ReadStream;
|
|
7264
|
+
if (fs$ReadStream) {
|
|
7265
|
+
ReadStream.prototype = Object.create(fs$ReadStream.prototype);
|
|
7266
|
+
ReadStream.prototype.open = ReadStream$open;
|
|
7267
|
+
}
|
|
7268
|
+
var fs$WriteStream = fs2.WriteStream;
|
|
7269
|
+
if (fs$WriteStream) {
|
|
7270
|
+
WriteStream.prototype = Object.create(fs$WriteStream.prototype);
|
|
7271
|
+
WriteStream.prototype.open = WriteStream$open;
|
|
7272
|
+
}
|
|
7273
|
+
Object.defineProperty(fs2, "ReadStream", {
|
|
7274
|
+
get: function() {
|
|
7275
|
+
return ReadStream;
|
|
7276
|
+
},
|
|
7277
|
+
set: function(val) {
|
|
7278
|
+
ReadStream = val;
|
|
7279
|
+
},
|
|
7280
|
+
enumerable: true,
|
|
7281
|
+
configurable: true
|
|
7282
|
+
});
|
|
7283
|
+
Object.defineProperty(fs2, "WriteStream", {
|
|
7284
|
+
get: function() {
|
|
7285
|
+
return WriteStream;
|
|
7286
|
+
},
|
|
7287
|
+
set: function(val) {
|
|
7288
|
+
WriteStream = val;
|
|
7289
|
+
},
|
|
7290
|
+
enumerable: true,
|
|
7291
|
+
configurable: true
|
|
7292
|
+
});
|
|
7293
|
+
var FileReadStream = ReadStream;
|
|
7294
|
+
Object.defineProperty(fs2, "FileReadStream", {
|
|
7295
|
+
get: function() {
|
|
7296
|
+
return FileReadStream;
|
|
7297
|
+
},
|
|
7298
|
+
set: function(val) {
|
|
7299
|
+
FileReadStream = val;
|
|
7300
|
+
},
|
|
7301
|
+
enumerable: true,
|
|
7302
|
+
configurable: true
|
|
7303
|
+
});
|
|
7304
|
+
var FileWriteStream = WriteStream;
|
|
7305
|
+
Object.defineProperty(fs2, "FileWriteStream", {
|
|
7306
|
+
get: function() {
|
|
7307
|
+
return FileWriteStream;
|
|
7308
|
+
},
|
|
7309
|
+
set: function(val) {
|
|
7310
|
+
FileWriteStream = val;
|
|
7311
|
+
},
|
|
7312
|
+
enumerable: true,
|
|
7313
|
+
configurable: true
|
|
7314
|
+
});
|
|
7315
|
+
function ReadStream(path, options) {
|
|
7316
|
+
if (this instanceof ReadStream)
|
|
7317
|
+
return fs$ReadStream.apply(this, arguments), this;
|
|
7318
|
+
else
|
|
7319
|
+
return ReadStream.apply(Object.create(ReadStream.prototype), arguments);
|
|
7320
|
+
}
|
|
7321
|
+
function ReadStream$open() {
|
|
7322
|
+
var that = this;
|
|
7323
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
7324
|
+
if (err) {
|
|
7325
|
+
if (that.autoClose)
|
|
7326
|
+
that.destroy();
|
|
7327
|
+
that.emit("error", err);
|
|
7328
|
+
} else {
|
|
7329
|
+
that.fd = fd;
|
|
7330
|
+
that.emit("open", fd);
|
|
7331
|
+
that.read();
|
|
7332
|
+
}
|
|
7333
|
+
});
|
|
7334
|
+
}
|
|
7335
|
+
function WriteStream(path, options) {
|
|
7336
|
+
if (this instanceof WriteStream)
|
|
7337
|
+
return fs$WriteStream.apply(this, arguments), this;
|
|
7338
|
+
else
|
|
7339
|
+
return WriteStream.apply(Object.create(WriteStream.prototype), arguments);
|
|
7340
|
+
}
|
|
7341
|
+
function WriteStream$open() {
|
|
7342
|
+
var that = this;
|
|
7343
|
+
open(that.path, that.flags, that.mode, function(err, fd) {
|
|
7344
|
+
if (err) {
|
|
7345
|
+
that.destroy();
|
|
7346
|
+
that.emit("error", err);
|
|
7347
|
+
} else {
|
|
7348
|
+
that.fd = fd;
|
|
7349
|
+
that.emit("open", fd);
|
|
7350
|
+
}
|
|
7351
|
+
});
|
|
7352
|
+
}
|
|
7353
|
+
function createReadStream(path, options) {
|
|
7354
|
+
return new fs2.ReadStream(path, options);
|
|
7355
|
+
}
|
|
7356
|
+
function createWriteStream(path, options) {
|
|
7357
|
+
return new fs2.WriteStream(path, options);
|
|
7358
|
+
}
|
|
7359
|
+
var fs$open = fs2.open;
|
|
7360
|
+
fs2.open = open;
|
|
7361
|
+
function open(path, flags, mode, cb) {
|
|
7362
|
+
if (typeof mode === "function")
|
|
7363
|
+
cb = mode, mode = null;
|
|
7364
|
+
return go$open(path, flags, mode, cb);
|
|
7365
|
+
function go$open(path2, flags2, mode2, cb2, startTime) {
|
|
7366
|
+
return fs$open(path2, flags2, mode2, function(err, fd) {
|
|
7367
|
+
if (err && (err.code === "EMFILE" || err.code === "ENFILE"))
|
|
7368
|
+
enqueue([go$open, [path2, flags2, mode2, cb2], err, startTime || Date.now(), Date.now()]);
|
|
7369
|
+
else {
|
|
7370
|
+
if (typeof cb2 === "function")
|
|
7371
|
+
cb2.apply(this, arguments);
|
|
7372
|
+
}
|
|
7373
|
+
});
|
|
7374
|
+
}
|
|
7375
|
+
}
|
|
7376
|
+
return fs2;
|
|
7377
|
+
}
|
|
7378
|
+
function enqueue(elem) {
|
|
7379
|
+
debug2("ENQUEUE", elem[0].name, elem[1]);
|
|
7380
|
+
fs[gracefulQueue].push(elem);
|
|
7381
|
+
retry();
|
|
7382
|
+
}
|
|
7383
|
+
var retryTimer;
|
|
7384
|
+
function resetQueue() {
|
|
7385
|
+
var now = Date.now();
|
|
7386
|
+
for (var i = 0; i < fs[gracefulQueue].length; ++i) {
|
|
7387
|
+
if (fs[gracefulQueue][i].length > 2) {
|
|
7388
|
+
fs[gracefulQueue][i][3] = now;
|
|
7389
|
+
fs[gracefulQueue][i][4] = now;
|
|
7390
|
+
}
|
|
7391
|
+
}
|
|
7392
|
+
retry();
|
|
7393
|
+
}
|
|
7394
|
+
function retry() {
|
|
7395
|
+
clearTimeout(retryTimer);
|
|
7396
|
+
retryTimer = void 0;
|
|
7397
|
+
if (fs[gracefulQueue].length === 0)
|
|
7398
|
+
return;
|
|
7399
|
+
var elem = fs[gracefulQueue].shift();
|
|
7400
|
+
var fn = elem[0];
|
|
7401
|
+
var args = elem[1];
|
|
7402
|
+
var err = elem[2];
|
|
7403
|
+
var startTime = elem[3];
|
|
7404
|
+
var lastTime = elem[4];
|
|
7405
|
+
if (startTime === void 0) {
|
|
7406
|
+
debug2("RETRY", fn.name, args);
|
|
7407
|
+
fn.apply(null, args);
|
|
7408
|
+
} else if (Date.now() - startTime >= 6e4) {
|
|
7409
|
+
debug2("TIMEOUT", fn.name, args);
|
|
7410
|
+
var cb = args.pop();
|
|
7411
|
+
if (typeof cb === "function")
|
|
7412
|
+
cb.call(null, err);
|
|
7413
|
+
} else {
|
|
7414
|
+
var sinceAttempt = Date.now() - lastTime;
|
|
7415
|
+
var sinceStart = Math.max(lastTime - startTime, 1);
|
|
7416
|
+
var desiredDelay = Math.min(sinceStart * 1.2, 100);
|
|
7417
|
+
if (sinceAttempt >= desiredDelay) {
|
|
7418
|
+
debug2("RETRY", fn.name, args);
|
|
7419
|
+
fn.apply(null, args.concat([startTime]));
|
|
7420
|
+
} else {
|
|
7421
|
+
fs[gracefulQueue].push(elem);
|
|
7422
|
+
}
|
|
7423
|
+
}
|
|
7424
|
+
if (retryTimer === void 0) {
|
|
7425
|
+
retryTimer = setTimeout(retry, 0);
|
|
7426
|
+
}
|
|
7427
|
+
}
|
|
7428
|
+
}
|
|
7429
|
+
});
|
|
7430
|
+
|
|
6623
7431
|
// ../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/jsonfile@6.1.0/node_modules/jsonfile/utils.js
|
|
6624
7432
|
var require_utils2 = __commonJS({
|
|
6625
7433
|
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/jsonfile@6.1.0/node_modules/jsonfile/utils.js"(exports, module2) {
|
|
@@ -6642,7 +7450,7 @@ var require_jsonfile = __commonJS({
|
|
|
6642
7450
|
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/node_modules/.aspect_rules_js/jsonfile@6.1.0/node_modules/jsonfile/index.js"(exports, module2) {
|
|
6643
7451
|
var _fs;
|
|
6644
7452
|
try {
|
|
6645
|
-
_fs =
|
|
7453
|
+
_fs = require_graceful_fs2();
|
|
6646
7454
|
} catch (_) {
|
|
6647
7455
|
_fs = require("fs");
|
|
6648
7456
|
}
|
|
@@ -192776,7 +193584,11 @@ function templateSimpleExpressionNodeVisitor(parseScriptFn) {
|
|
|
192776
193584
|
return;
|
|
192777
193585
|
}
|
|
192778
193586
|
const { content } = n;
|
|
192779
|
-
|
|
193587
|
+
try {
|
|
193588
|
+
parseScriptFn(`(${content})`);
|
|
193589
|
+
} catch (e) {
|
|
193590
|
+
console.warn(`Failed to parse "${content}". Ignore this if content has no extractable message`, e);
|
|
193591
|
+
}
|
|
192780
193592
|
};
|
|
192781
193593
|
}
|
|
192782
193594
|
function parseFile(source, filename, parseScriptFn) {
|
|
@@ -192801,7 +193613,7 @@ var import_compiler_sfc, ELEMENT, SIMPLE_EXPRESSION, INTERPOLATION, DIRECTIVE, C
|
|
|
192801
193613
|
var init_vue_extractor = __esm({
|
|
192802
193614
|
"../../../../../../../../execroot/formatjs/bazel-out/darwin-fastbuild/bin/packages/cli-lib/lib_esnext/src/vue_extractor.js"() {
|
|
192803
193615
|
"use strict";
|
|
192804
|
-
import_compiler_sfc = require("
|
|
193616
|
+
import_compiler_sfc = require("vue/compiler-sfc");
|
|
192805
193617
|
ELEMENT = 1;
|
|
192806
193618
|
SIMPLE_EXPRESSION = 4;
|
|
192807
193619
|
INTERPOLATION = 5;
|
|
@@ -192932,6 +193744,9 @@ ${JSON.stringify(message, void 0, 2)}`);
|
|
|
192932
193744
|
}
|
|
192933
193745
|
results[id] = msg;
|
|
192934
193746
|
}
|
|
193747
|
+
if (typeof formatter.serialize === "function") {
|
|
193748
|
+
return formatter.serialize(formatter.format(results));
|
|
193749
|
+
}
|
|
192935
193750
|
return (0, import_json_stable_stringify.default)(formatter.format(results), {
|
|
192936
193751
|
space: 2,
|
|
192937
193752
|
cmp: formatter.compareMessages || void 0
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formatjs/cli",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.2.0",
|
|
4
4
|
"description": "A CLI for formatjs.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"intl",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"url": "https://github.com/formatjs/formatjs/issues"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@formatjs/cli-lib": "6.
|
|
36
|
+
"@formatjs/cli-lib": "6.2.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
|
-
"
|
|
39
|
+
"vue": "^3.3.4"
|
|
40
40
|
},
|
|
41
41
|
"peerDependenciesMeta": {
|
|
42
|
-
"
|
|
42
|
+
"vue": {
|
|
43
43
|
"optional": true
|
|
44
44
|
}
|
|
45
45
|
},
|