mirror of
https://github.com/github/codeql-action.git
synced 2025-12-27 17:50:07 +08:00
* 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>
64 lines
2.8 KiB
JavaScript
64 lines
2.8 KiB
JavaScript
const errors = {
|
|
/* Header error messages */
|
|
INVALID_LOC: "Invalid LOC header (bad signature)",
|
|
INVALID_CEN: "Invalid CEN header (bad signature)",
|
|
INVALID_END: "Invalid END header (bad signature)",
|
|
|
|
/* Descriptor */
|
|
DESCRIPTOR_NOT_EXIST: "No descriptor present",
|
|
DESCRIPTOR_UNKNOWN: "Unknown descriptor format",
|
|
DESCRIPTOR_FAULTY: "Descriptor data is malformed",
|
|
|
|
/* ZipEntry error messages*/
|
|
NO_DATA: "Nothing to decompress",
|
|
BAD_CRC: "CRC32 checksum failed {0}",
|
|
FILE_IN_THE_WAY: "There is a file in the way: {0}",
|
|
UNKNOWN_METHOD: "Invalid/unsupported compression method",
|
|
|
|
/* Inflater error messages */
|
|
AVAIL_DATA: "inflate::Available inflate data did not terminate",
|
|
INVALID_DISTANCE: "inflate::Invalid literal/length or distance code in fixed or dynamic block",
|
|
TO_MANY_CODES: "inflate::Dynamic block code description: too many length or distance codes",
|
|
INVALID_REPEAT_LEN: "inflate::Dynamic block code description: repeat more than specified lengths",
|
|
INVALID_REPEAT_FIRST: "inflate::Dynamic block code description: repeat lengths with no first length",
|
|
INCOMPLETE_CODES: "inflate::Dynamic block code description: code lengths codes incomplete",
|
|
INVALID_DYN_DISTANCE: "inflate::Dynamic block code description: invalid distance code lengths",
|
|
INVALID_CODES_LEN: "inflate::Dynamic block code description: invalid literal/length code lengths",
|
|
INVALID_STORE_BLOCK: "inflate::Stored block length did not match one's complement",
|
|
INVALID_BLOCK_TYPE: "inflate::Invalid block type (type == 3)",
|
|
|
|
/* ADM-ZIP error messages */
|
|
CANT_EXTRACT_FILE: "Could not extract the file",
|
|
CANT_OVERRIDE: "Target file already exists",
|
|
DISK_ENTRY_TOO_LARGE: "Number of disk entries is too large",
|
|
NO_ZIP: "No zip file was loaded",
|
|
NO_ENTRY: "Entry doesn't exist",
|
|
DIRECTORY_CONTENT_ERROR: "A directory cannot have content",
|
|
FILE_NOT_FOUND: 'File not found: "{0}"',
|
|
NOT_IMPLEMENTED: "Not implemented",
|
|
INVALID_FILENAME: "Invalid filename",
|
|
INVALID_FORMAT: "Invalid or unsupported zip format. No END header found",
|
|
INVALID_PASS_PARAM: "Incompatible password parameter",
|
|
WRONG_PASSWORD: "Wrong Password",
|
|
|
|
/* ADM-ZIP */
|
|
COMMENT_TOO_LONG: "Comment is too long", // Comment can be max 65535 bytes long (NOTE: some non-US characters may take more space)
|
|
EXTRA_FIELD_PARSE_ERROR: "Extra field parsing error"
|
|
};
|
|
|
|
// template
|
|
function E(message) {
|
|
return function (...args) {
|
|
if (args.length) { // Allow {0} .. {9} arguments in error message, based on argument number
|
|
message = message.replace(/\{(\d)\}/g, (_, n) => args[n] || '');
|
|
}
|
|
|
|
return new Error('ADM-ZIP: ' + message);
|
|
};
|
|
}
|
|
|
|
// Init errors with template
|
|
for (const msg of Object.keys(errors)) {
|
|
exports[msg] = E(errors[msg]);
|
|
}
|