Bump the npm group with 4 updates (#2419)
* Bump the npm group with 4 updates Bumps the npm group with 4 updates: [adm-zip](https://github.com/cthackers/adm-zip), [@eslint/js](https://github.com/eslint/eslint/tree/HEAD/packages/js), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `adm-zip` from 0.5.14 to 0.5.15 - [Release notes](https://github.com/cthackers/adm-zip/releases) - [Changelog](https://github.com/cthackers/adm-zip/blob/master/history.md) - [Commits](https://github.com/cthackers/adm-zip/compare/v0.5.14...v0.5.15) Updates `@eslint/js` from 9.8.0 to 9.9.0 - [Release notes](https://github.com/eslint/eslint/releases) - [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md) - [Commits](https://github.com/eslint/eslint/commits/v9.9.0/packages/js) Updates `@typescript-eslint/eslint-plugin` from 8.0.1 to 8.1.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.1.0/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.0.1 to 8.1.0 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.1.0/packages/parser) --- updated-dependencies: - dependency-name: adm-zip dependency-type: direct:production update-type: version-update:semver-patch dependency-group: npm - dependency-name: "@eslint/js" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: "@typescript-eslint/eslint-plugin" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm - dependency-name: "@typescript-eslint/parser" dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * Update checked-in dependencies --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This commit is contained in:
parent
25ad3c8e40
commit
d620faa0b4
103 changed files with 1631 additions and 740 deletions
134
node_modules/adm-zip/headers/entryHeader.js
generated
vendored
134
node_modules/adm-zip/headers/entryHeader.js
generated
vendored
|
|
@ -25,21 +25,16 @@ module.exports = function () {
|
|||
// Without it file names may be corrupted for other apps when file names use unicode chars
|
||||
_flags |= Constants.FLG_EFS;
|
||||
|
||||
var _localHeader = {};
|
||||
const _localHeader = {
|
||||
extraLen: 0
|
||||
};
|
||||
|
||||
function setTime(val) {
|
||||
val = new Date(val);
|
||||
_time =
|
||||
(((val.getFullYear() - 1980) & 0x7f) << 25) | // b09-16 years from 1980
|
||||
((val.getMonth() + 1) << 21) | // b05-08 month
|
||||
(val.getDate() << 16) | // b00-04 hour
|
||||
// 2 bytes time
|
||||
(val.getHours() << 11) | // b11-15 hour
|
||||
(val.getMinutes() << 5) | // b05-10 minute
|
||||
(val.getSeconds() >> 1); // b00-04 seconds divided by 2
|
||||
}
|
||||
// casting
|
||||
const uint32 = (val) => Math.max(0, val) >>> 0;
|
||||
const uint16 = (val) => Math.max(0, val) & 0xffff;
|
||||
const uint8 = (val) => Math.max(0, val) & 0xff;
|
||||
|
||||
setTime(+new Date());
|
||||
_time = Utils.fromDate2DOS(new Date());
|
||||
|
||||
return {
|
||||
get made() {
|
||||
|
|
@ -63,6 +58,28 @@ module.exports = function () {
|
|||
_flags = val;
|
||||
},
|
||||
|
||||
get flags_efs() {
|
||||
return (_flags & Constants.FLG_EFS) > 0;
|
||||
},
|
||||
set flags_efs(val) {
|
||||
if (val) {
|
||||
_flags |= Constants.FLG_EFS;
|
||||
} else {
|
||||
_flags &= ~Constants.FLG_EFS;
|
||||
}
|
||||
},
|
||||
|
||||
get flags_desc() {
|
||||
return (_flags & Constants.FLG_DESC) > 0;
|
||||
},
|
||||
set flags_desc(val) {
|
||||
if (val) {
|
||||
_flags |= Constants.FLG_DESC;
|
||||
} else {
|
||||
_flags &= ~Constants.FLG_DESC;
|
||||
}
|
||||
},
|
||||
|
||||
get method() {
|
||||
return _method;
|
||||
},
|
||||
|
|
@ -78,33 +95,41 @@ module.exports = function () {
|
|||
},
|
||||
|
||||
get time() {
|
||||
return new Date(((_time >> 25) & 0x7f) + 1980, ((_time >> 21) & 0x0f) - 1, (_time >> 16) & 0x1f, (_time >> 11) & 0x1f, (_time >> 5) & 0x3f, (_time & 0x1f) << 1);
|
||||
return Utils.fromDOS2Date(this.timeval);
|
||||
},
|
||||
set time(val) {
|
||||
setTime(val);
|
||||
this.timeval = Utils.fromDate2DOS(val);
|
||||
},
|
||||
|
||||
get timeval() {
|
||||
return _time;
|
||||
},
|
||||
set timeval(val) {
|
||||
_time = uint32(val);
|
||||
},
|
||||
|
||||
get timeHighByte() {
|
||||
return (_time >>> 8) & 0xff;
|
||||
return uint8(_time >>> 8);
|
||||
},
|
||||
get crc() {
|
||||
return _crc;
|
||||
},
|
||||
set crc(val) {
|
||||
_crc = Math.max(0, val) >>> 0;
|
||||
_crc = uint32(val);
|
||||
},
|
||||
|
||||
get compressedSize() {
|
||||
return _compressedSize;
|
||||
},
|
||||
set compressedSize(val) {
|
||||
_compressedSize = Math.max(0, val) >>> 0;
|
||||
_compressedSize = uint32(val);
|
||||
},
|
||||
|
||||
get size() {
|
||||
return _size;
|
||||
},
|
||||
set size(val) {
|
||||
_size = Math.max(0, val) >>> 0;
|
||||
_size = uint32(val);
|
||||
},
|
||||
|
||||
get fileNameLength() {
|
||||
|
|
@ -121,6 +146,13 @@ module.exports = function () {
|
|||
_extraLen = val;
|
||||
},
|
||||
|
||||
get extraLocalLength() {
|
||||
return _localHeader.extraLen;
|
||||
},
|
||||
set extraLocalLength(val) {
|
||||
_localHeader.extraLen = val;
|
||||
},
|
||||
|
||||
get commentLength() {
|
||||
return _comLen;
|
||||
},
|
||||
|
|
@ -132,37 +164,37 @@ module.exports = function () {
|
|||
return _diskStart;
|
||||
},
|
||||
set diskNumStart(val) {
|
||||
_diskStart = Math.max(0, val) >>> 0;
|
||||
_diskStart = uint32(val);
|
||||
},
|
||||
|
||||
get inAttr() {
|
||||
return _inattr;
|
||||
},
|
||||
set inAttr(val) {
|
||||
_inattr = Math.max(0, val) >>> 0;
|
||||
_inattr = uint32(val);
|
||||
},
|
||||
|
||||
get attr() {
|
||||
return _attr;
|
||||
},
|
||||
set attr(val) {
|
||||
_attr = Math.max(0, val) >>> 0;
|
||||
_attr = uint32(val);
|
||||
},
|
||||
|
||||
// get Unix file permissions
|
||||
get fileAttr() {
|
||||
return _attr ? (((_attr >>> 0) | 0) >> 16) & 0xfff : 0;
|
||||
return uint16(_attr >> 16) & 0xfff;
|
||||
},
|
||||
|
||||
get offset() {
|
||||
return _offset;
|
||||
},
|
||||
set offset(val) {
|
||||
_offset = Math.max(0, val) >>> 0;
|
||||
_offset = uint32(val);
|
||||
},
|
||||
|
||||
get encrypted() {
|
||||
return (_flags & 1) === 1;
|
||||
return (_flags & Constants.FLG_ENC) === Constants.FLG_ENC;
|
||||
},
|
||||
|
||||
get centralHeaderSize() {
|
||||
|
|
@ -181,34 +213,38 @@ module.exports = function () {
|
|||
var data = input.slice(_offset, _offset + Constants.LOCHDR);
|
||||
// 30 bytes and should start with "PK\003\004"
|
||||
if (data.readUInt32LE(0) !== Constants.LOCSIG) {
|
||||
throw new Error(Utils.Errors.INVALID_LOC);
|
||||
throw Utils.Errors.INVALID_LOC();
|
||||
}
|
||||
_localHeader = {
|
||||
// version needed to extract
|
||||
version: data.readUInt16LE(Constants.LOCVER),
|
||||
// general purpose bit flag
|
||||
flags: data.readUInt16LE(Constants.LOCFLG),
|
||||
// compression method
|
||||
method: data.readUInt16LE(Constants.LOCHOW),
|
||||
// modification time (2 bytes time, 2 bytes date)
|
||||
time: data.readUInt32LE(Constants.LOCTIM),
|
||||
// uncompressed file crc-32 value
|
||||
crc: data.readUInt32LE(Constants.LOCCRC),
|
||||
// compressed size
|
||||
compressedSize: data.readUInt32LE(Constants.LOCSIZ),
|
||||
// uncompressed size
|
||||
size: data.readUInt32LE(Constants.LOCLEN),
|
||||
// filename length
|
||||
fnameLen: data.readUInt16LE(Constants.LOCNAM),
|
||||
// extra field length
|
||||
extraLen: data.readUInt16LE(Constants.LOCEXT)
|
||||
};
|
||||
|
||||
// version needed to extract
|
||||
_localHeader.version = data.readUInt16LE(Constants.LOCVER);
|
||||
// general purpose bit flag
|
||||
_localHeader.flags = data.readUInt16LE(Constants.LOCFLG);
|
||||
// compression method
|
||||
_localHeader.method = data.readUInt16LE(Constants.LOCHOW);
|
||||
// modification time (2 bytes time, 2 bytes date)
|
||||
_localHeader.time = data.readUInt32LE(Constants.LOCTIM);
|
||||
// uncompressed file crc-32 valu
|
||||
_localHeader.crc = data.readUInt32LE(Constants.LOCCRC);
|
||||
// compressed size
|
||||
_localHeader.compressedSize = data.readUInt32LE(Constants.LOCSIZ);
|
||||
// uncompressed size
|
||||
_localHeader.size = data.readUInt32LE(Constants.LOCLEN);
|
||||
// filename length
|
||||
_localHeader.fnameLen = data.readUInt16LE(Constants.LOCNAM);
|
||||
// extra field length
|
||||
_localHeader.extraLen = data.readUInt16LE(Constants.LOCEXT);
|
||||
|
||||
// read extra data
|
||||
const extraStart = _offset + Constants.LOCHDR + _localHeader.fnameLen;
|
||||
const extraEnd = extraStart + _localHeader.extraLen;
|
||||
return input.slice(extraStart, extraEnd);
|
||||
},
|
||||
|
||||
loadFromBinary: function (/*Buffer*/ data) {
|
||||
// data should be 46 bytes and start with "PK 01 02"
|
||||
if (data.length !== Constants.CENHDR || data.readUInt32LE(0) !== Constants.CENSIG) {
|
||||
throw new Error(Utils.Errors.INVALID_CEN);
|
||||
throw Utils.Errors.INVALID_CEN();
|
||||
}
|
||||
// version made by
|
||||
_verMade = data.readUInt16LE(Constants.CENVEM);
|
||||
|
|
@ -264,7 +300,7 @@ module.exports = function () {
|
|||
// filename length
|
||||
data.writeUInt16LE(_fnameLen, Constants.LOCNAM);
|
||||
// extra field length
|
||||
data.writeUInt16LE(_extraLen, Constants.LOCEXT);
|
||||
data.writeUInt16LE(_localHeader.extraLen, Constants.LOCEXT);
|
||||
return data;
|
||||
},
|
||||
|
||||
|
|
@ -303,8 +339,6 @@ module.exports = function () {
|
|||
data.writeUInt32LE(_attr, Constants.CENATX);
|
||||
// LOC header offset
|
||||
data.writeUInt32LE(_offset, Constants.CENOFF);
|
||||
// fill all with
|
||||
data.fill(0x00, Constants.CENHDR);
|
||||
return data;
|
||||
},
|
||||
|
||||
|
|
|
|||
2
node_modules/adm-zip/headers/mainHeader.js
generated
vendored
2
node_modules/adm-zip/headers/mainHeader.js
generated
vendored
|
|
@ -56,7 +56,7 @@ module.exports = function () {
|
|||
(data.length !== Constants.ENDHDR || data.readUInt32LE(0) !== Constants.ENDSIG) &&
|
||||
(data.length < Constants.ZIP64HDR || data.readUInt32LE(0) !== Constants.ZIP64SIG)
|
||||
) {
|
||||
throw new Error(Utils.Errors.INVALID_END);
|
||||
throw Utils.Errors.INVALID_END();
|
||||
}
|
||||
|
||||
if (data.readUInt32LE(0) === Constants.ENDSIG) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue