Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gzipper

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gzipper - npm Package Compare versions

Comparing version 4.5.0 to 5.0.0

src/Compress.service.d.ts

11

CHANGELOG.md

@@ -8,2 +8,13 @@ # Changelog

## [5.0.0] - 2021-06-21
### Removed
- Support for Node.js versions < 12.
- Beta flag for `--incremental` compression.
### Added
- parallel execution with `--workers` option.
## [4.5.0] - 2021-04-19

@@ -10,0 +21,0 @@

6

package.json
{
"name": "gzipper",
"version": "4.5.0",
"version": "5.0.0",
"description": "CLI for compressing files.",

@@ -39,3 +39,2 @@ "main": "index.js",

"@types/node": "^14.14.41",
"@types/semver": "^7.3.4",
"@types/sinon": "^10.0.0",

@@ -54,3 +53,2 @@ "@types/uuid": "^8.3.0",

"rimraf": "^3.0.2",
"semver": "^7.3.5",
"sinon": "^10.0.0",

@@ -62,3 +60,3 @@ "source-map-support": "^0.5.19",

"engines": {
"node": ">=10"
"node": ">=12"
},

@@ -65,0 +63,0 @@ "dependencies": {

@@ -13,3 +13,3 @@ # Gzipper

By default `gzipper` compress **all the files** but you could use `include` or `exclude` options for better flexibility.
By default `gzipper` compress **all the files** but you could use `include` or `exclude` options for flexibility.

@@ -43,2 +43,3 @@ - [Gzipper](#gzipper)

- [--skip-compressed](#--skip-compressed)
- [--workers](#--workers)
- [Cache](#cache-1)

@@ -87,3 +88,3 @@ - [purge](#purge)

-v, --verbose detailed level of logs
--incremental (beta) incremental compression
--incremental incremental compression
-e, --exclude <extensions> exclude file extensions from compression, example: jpeg,jpg...

@@ -96,3 +97,3 @@ -i, --include <extensions> include file extensions for compression, example: js,css,html...

--deflate enable deflate compression
--brotli enable brotli compression, Node.js >= v11.7.0
--brotli enable brotli compression
--brotli-param-mode <value> default, text (for UTF-8 text), font (for WOFF 2.0 fonts)

@@ -104,2 +105,3 @@ --brotli-quality <number> brotli compression quality 11 (default), 0 - 11

--skip-compressed skip compressed files if they already exist
--workers numbers of workers which will be spawned, system CPU cores count (default)
-h, --help display help for command

@@ -222,3 +224,3 @@ ```

| ----------------------------------------------------------- | ---------------------------------- |
| [`--incremental`](#--incremental) (beta) | `GZIPPER_INCREMENTAL` (0 or 1) |
| [`--incremental`](#--incremental) | `GZIPPER_INCREMENTAL` (0 or 1) |
| [`-v, --verbose`](#-v---verbose) | `GZIPPER_VERBOSE` (0 or 1) |

@@ -239,2 +241,3 @@ | [`-e, --exclude <extensions>`](#-e---exclude-extensions) | `GZIPPER_EXCLUDE` |

| [`--skip-compressed`](#--skip-compressed) | `GZIPPER_SKIP_COMPRESSED` (0 or 1) |
| [`--workers`](#--workers) | `GZIPPER_WORKERS` |

@@ -301,3 +304,3 @@ > ENV Variables have higher priority over CLI arguments.

Enable brotli compression, Node.js >= v11.7.0.
Enable brotli compression.

@@ -390,2 +393,6 @@ #### --brotli-param-mode <value>

#### --workers
Spawn workers for parallel compression, be aware of workers number because every worker creates an additional thread. More info [there](https://nodesource.com/blog/worker-threads-nodejs/).
### Cache

@@ -420,2 +427,2 @@

- Node.js >= 10
- Node.js >= 12

@@ -65,3 +65,3 @@ "use strict";

.option('-v, --verbose', 'detailed level of logs')
.option('--incremental', '(beta) incremental compression')
.option('--incremental', 'incremental compression')
.option('-e, --exclude <extensions>', 'exclude file extensions from compression, example: jpeg,jpg...', this.optionToArray.bind(this))

@@ -74,3 +74,3 @@ .option('-i, --include <extensions>', 'include file extensions for compression, example: js,css,html...', this.optionToArray.bind(this))

.option('--deflate', 'enable deflate compression')
.option('--brotli', 'enable brotli compression, Node.js >= v11.7.0')
.option('--brotli', 'enable brotli compression')
.option('--brotli-param-mode <value>', 'default, text (for UTF-8 text), font (for WOFF 2.0 fonts)')

@@ -82,2 +82,3 @@ .option('--brotli-quality <number>', 'brotli compression quality 11 (default), 0 - 11', function (value) { return parseInt(value); })

.option('--skip-compressed', 'skip compressed files if they already exist')
.option('--workers <number>', 'numbers of workers which will be spawned, system CPU cores count (default)', function (value) { return parseInt(value); })
.action(this.compress.bind(this));

@@ -145,2 +146,3 @@ cache = this.commander

: options.skipCompressed,
workers: parseInt(this.env.GZIPPER_WORKERS) || options.workers,
};

@@ -157,7 +159,7 @@ return [4 /*yield*/, this.runCompress(target, outputPath, adjustedOptions)];

return __awaiter(this, void 0, void 0, function () {
var logger, config, incremental, err_1;
var config, incremental, err_1;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
logger = new Logger_1.Logger(true);
Logger_1.Logger.setVerboseMode(true);
config = new Config_1.Config();

@@ -171,7 +173,7 @@ incremental = new Incremental_1.Incremental(config);

_a.sent();
logger.log('Cache has been purged, you are free to initialize a new one.', LogLevel_enum_1.LogLevel.SUCCESS);
Logger_1.Logger.log('Cache has been purged, you are free to initialize a new one.', LogLevel_enum_1.LogLevel.SUCCESS);
return [3 /*break*/, 4];
case 3:
err_1 = _a.sent();
logger.log(err_1, LogLevel_enum_1.LogLevel.ERROR);
Logger_1.Logger.log(err_1, LogLevel_enum_1.LogLevel.ERROR);
return [3 /*break*/, 4];

@@ -185,9 +187,8 @@ case 4: return [2 /*return*/];

return __awaiter(this, void 0, void 0, function () {
var logger, config, incremental, size, err_2;
var incremental, size, err_2;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
logger = new Logger_1.Logger(true);
config = new Config_1.Config();
incremental = new Incremental_1.Incremental(config);
Logger_1.Logger.setVerboseMode(true);
incremental = new Incremental_1.Incremental();
_a.label = 1;

@@ -199,3 +200,3 @@ case 1:

size = _a.sent();
logger.log(size
Logger_1.Logger.log(size
? "Cache size is " + helpers_1.Helpers.readableSize(size)

@@ -206,3 +207,3 @@ : "Cache is empty, initialize a new one with --incremental option.", LogLevel_enum_1.LogLevel.INFO);

err_2 = _a.sent();
logger.log(err_2, LogLevel_enum_1.LogLevel.ERROR);
Logger_1.Logger.log(err_2, LogLevel_enum_1.LogLevel.ERROR);
return [3 /*break*/, 4];

@@ -216,7 +217,7 @@ case 4: return [2 /*return*/];

return __awaiter(this, void 0, void 0, function () {
var logger, compress, err_3;
var compress, err_3;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
logger = new Logger_1.Logger(true);
Logger_1.Logger.setVerboseMode(true);
compress = new Compress_1.Compress(target, outputPath, this.filterOptions(options));

@@ -232,3 +233,3 @@ _a.label = 1;

err_3 = _a.sent();
logger.log(err_3, LogLevel_enum_1.LogLevel.ERROR);
Logger_1.Logger.log(err_3, LogLevel_enum_1.LogLevel.ERROR);
return [3 /*break*/, 4];

@@ -263,2 +264,2 @@ case 4: return [2 /*return*/];

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmluLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2Jpbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSx1Q0FBb0M7QUFFcEMsdUNBQXNDO0FBQ3RDLHFDQUFvQztBQUVwQyw2Q0FBNEM7QUFDNUMsbUNBQWtDO0FBQ2xDLDBDQUF5QztBQUN6Qyx3REFBa0Q7QUFFbEQ7SUFBQTtRQUNtQixTQUFJLEdBQWEsT0FBTyxDQUFDLElBQUksQ0FBQztRQUM5QixRQUFHLEdBQXNCLE9BQU8sQ0FBQyxHQUFHLENBQUM7UUFDOUMsY0FBUyxHQUFHLElBQUksbUJBQU8sRUFBRSxDQUFDO0lBeU5wQyxDQUFDO0lBdk5PLG9CQUFJLEdBQVY7Ozs7Ozt3QkFDRSxJQUFJLENBQUMsU0FBUyxDQUFDLE9BQU8sQ0FBQyxpQkFBTyxDQUFDLFVBQVUsRUFBRSxDQUFDLENBQUMsSUFBSSxDQUFDLFNBQVMsQ0FBQyxDQUFDO3dCQUU3RCxJQUFJLENBQUMsU0FBUz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0FBSyxTQUFTLElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyxLQUFLLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRTtvQkFDL0QsT0FBTyxPQUFPLENBQUMsR0FBRyxDQUFDLENBQUM7aUJBQ3JCO2FBQ0Y7U0FDRjtRQUVELE9BQU8sT0FBTyxDQUFDO0lBQ2pCLENBQUM7SUFFTyw2QkFBYSxHQUFyQixVQUF5QixLQUFRO1FBQy9CLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxJQUFJLEtBQUssRUFBRTtZQUN0QyxPQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsR0FBRyxDQUFDLENBQUMsR0FBRyxDQUFDLFVBQUMsSUFBSSxJQUFLLE9BQUEsSUFBSSxDQUFDLElBQUksRUFBRSxFQUFYLENBQVcsQ0FBQyxDQUFDO1NBQ3BEO1FBRUQsT0FBTyxLQUFLLENBQUM7SUFDZixDQUFDO0lBQ0gsWUFBQztBQUFELENBQUMsQUFoT0QsSUFnT0M7QUFoT1ksc0JBQUs7QUFrT2xCLElBQUksT0FBTyxDQUFDLEdBQUcsQ0FBQyxRQUFRLEtBQUssU0FBUyxFQUFFO0lBQ3RDLElBQUksS0FBSyxFQUFFLENBQUMsSUFBSSxFQUFFLENBQUM7Q0FDcEIifQ==

@@ -7,4 +7,2 @@ import { CompressOptions } from './interfaces';

private readonly nativeFs;
private readonly nativeStream;
private readonly logger;
private readonly incremental;

@@ -16,3 +14,3 @@ private readonly config;

private readonly target;
private readonly createCompression;
private readonly service;
/**

@@ -27,13 +25,13 @@ * Creates an instance of Compress.

/**
* Return compression instance.
* Returns available files to compress.
*/
private getCompressionInstance;
private getFilesToCompress;
/**
* Compile files in folder recursively.
* Create workers for parallel compression.
*/
private compileFolderRecursively;
private createWorkers;
/**
* File compression.
* Run compress worker
*/
private compressFile;
private runCompressWorker;
/**

@@ -43,14 +41,2 @@ * Show message with compression params.

private compressionLog;
/**
* Get output path which is based on [outputFileFormat].
*/
private getOutputPath;
/**
* Returns if the file extension is valid.
*/
private isValidFileExtensions;
/**
* Returns information message about compressed file (size, time, cache, etc.)
*/
private getCompressedFileMsg;
}
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

@@ -78,13 +89,10 @@ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }

var util_1 = __importDefault(require("util"));
var uuid_1 = require("uuid");
var stream_1 = __importDefault(require("stream"));
var worker_threads_1 = require("worker_threads");
var helpers_1 = require("./helpers");
var Logger_1 = require("./logger/Logger");
var Brotli_1 = require("./compressions/Brotli");
var Gzip_1 = require("./compressions/Gzip");
var constants_1 = require("./constants");
var Deflate_1 = require("./compressions/Deflate");
var Incremental_1 = require("./Incremental");
var Config_1 = require("./Config");
var LogLevel_enum_1 = require("./logger/LogLevel.enum");
var Compress_service_1 = require("./Compress.service");
/**

@@ -102,13 +110,8 @@ * Compressing files.

readdir: util_1.default.promisify(fs_1.default.readdir),
exists: util_1.default.promisify(fs_1.default.exists),
unlink: util_1.default.promisify(fs_1.default.unlink),
};
this.nativeStream = {
pipeline: util_1.default.promisify(stream_1.default.pipeline),
};
this.logger = new Logger_1.Logger(options.verbose);
Logger_1.Logger.setVerboseMode(options.verbose);
this.config = new Config_1.Config();
if (!target) {
var message = constants_1.NO_PATH_MESSAGE;
this.logger.log(message, LogLevel_enum_1.LogLevel.ERROR);
Logger_1.Logger.log(message, LogLevel_enum_1.LogLevel.ERROR);
throw new Error(message);

@@ -124,4 +127,4 @@ }

this.options = options;
this.compressionInstance = this.getCompressionInstance();
this.createCompression = this.compressionInstance.getCompression();
this.service = new Compress_service_1.CompressService(this.options);
this.compressionInstance = this.service.getCompressionInstance();
}

@@ -133,7 +136,7 @@ /**

return __awaiter(this, void 0, void 0, function () {
var files, hrtime, hrtimeStart, error_1, filesCount;
var files, hrtime, hrtimeStart, workersResponse, error_1, filesCount;
return __generator(this, function (_a) {
switch (_a.label) {
case 0:
_a.trys.push([0, 10, , 11]);
_a.trys.push([0, 11, , 12]);
if (!this.outputPath) return [3 /*break*/, 2];

@@ -145,38 +148,43 @@ return [4 /*yield*/, helpers_1.Helpers.createFolders(this.outputPath)];

case 2:
if (!this.options.incremental) return [3 /*break*/, 5];
this.logger.log(constants_1.INCREMENTAL_ENABLE_MESSAGE, LogLevel_enum_1.LogLevel.INFO);
return [4 /*yield*/, this.incremental.initCacheFolder()];
if (!this.options.incremental) return [3 /*break*/, 6];
return [4 /*yield*/, this.config.readConfig()];
case 3:
_a.sent();
return [4 /*yield*/, this.incremental.readConfig()];
Logger_1.Logger.log(constants_1.INCREMENTAL_ENABLE_MESSAGE, LogLevel_enum_1.LogLevel.INFO);
return [4 /*yield*/, this.incremental.initCacheFolder()];
case 4:
_a.sent();
_a.label = 5;
return [4 /*yield*/, this.incremental.readConfig()];
case 5:
_a.sent();
_a.label = 6;
case 6:
this.compressionLog();
hrtimeStart = process.hrtime();
return [4 /*yield*/, this.compileFolderRecursively(this.target)];
case 6:
files = _a.sent();
return [4 /*yield*/, this.createWorkers()];
case 7:
workersResponse = _a.sent();
files = workersResponse.files;
hrtime = process.hrtime(hrtimeStart);
if (!this.options.incremental) return [3 /*break*/, 9];
if (!this.options.incremental) return [3 /*break*/, 10];
this.incremental.filePaths = workersResponse.filePaths;
return [4 /*yield*/, this.incremental.updateConfig()];
case 7:
case 8:
_a.sent();
return [4 /*yield*/, this.config.writeConfig()];
case 8:
case 9:
_a.sent();
_a.label = 9;
case 9: return [3 /*break*/, 11];
case 10:
_a.label = 10;
case 10: return [3 /*break*/, 12];
case 11:
error_1 = _a.sent();
this.logger.log(error_1, LogLevel_enum_1.LogLevel.ERROR);
Logger_1.Logger.log(error_1, LogLevel_enum_1.LogLevel.ERROR);
throw new Error(error_1.message);
case 11:
case 12:
filesCount = files.length;
if (filesCount) {
this.logger.log(filesCount + " " + (filesCount > 1 ? 'files have' : 'file has') + " been compressed. (" + helpers_1.Helpers.readableHrtime(hrtime) + ")", LogLevel_enum_1.LogLevel.SUCCESS);
Logger_1.Logger.log(filesCount + " " + (filesCount > 1 ? 'files have' : 'file has') + " been compressed. (" + helpers_1.Helpers.readableHrtime(hrtime) + ")", LogLevel_enum_1.LogLevel.SUCCESS);
}
else {
this.logger.log(constants_1.NO_FILES_MESSAGE, LogLevel_enum_1.LogLevel.WARNING);
Logger_1.Logger.log(constants_1.NO_FILES_MESSAGE, LogLevel_enum_1.LogLevel.WARNING);
}

@@ -189,21 +197,8 @@ return [2 /*return*/, files];

/**
* Return compression instance.
* Returns available files to compress.
*/
Compress.prototype.getCompressionInstance = function () {
if (this.options.brotli) {
return new Brotli_1.BrotliCompression(this.options, this.logger);
}
else if (this.options.deflate) {
return new Deflate_1.DeflateCompression(this.options, this.logger);
}
else {
return new Gzip_1.GzipCompression(this.options, this.logger);
}
};
/**
* Compile files in folder recursively.
*/
Compress.prototype.compileFolderRecursively = function (target) {
Compress.prototype.getFilesToCompress = function (target) {
if (target === void 0) { target = this.target; }
return __awaiter(this, void 0, void 0, function () {
var compressedFiles, isFileTarget, filesList, targetParsed, filesList_1, filesList_1_1, file, filePath, fileStat, _a, _b, _c, _d, hrtimeStart, fileInfo, hrTimeEnd, e_1_1;
var compressedFiles, isFileTarget, filesList, targetParsed, filesList_1, filesList_1_1, file, filePath, fileStat, _a, _b, _c, _d, e_1_1;
var e_1, _e;

@@ -227,7 +222,7 @@ return __generator(this, function (_f) {

case 4:
_f.trys.push([4, 12, 13, 14]);
_f.trys.push([4, 11, 12, 13]);
filesList_1 = __values(filesList), filesList_1_1 = filesList_1.next();
_f.label = 5;
case 5:
if (!!filesList_1_1.done) return [3 /*break*/, 11];
if (!!filesList_1_1.done) return [3 /*break*/, 10];
file = filesList_1_1.value;

@@ -242,33 +237,24 @@ filePath = path_1.default.resolve(target, file);

_d = [[]];
return [4 /*yield*/, this.compileFolderRecursively(filePath)];
return [4 /*yield*/, this.getFilesToCompress(filePath)];
case 7:
_b.apply(_a, _c.concat([__spreadArray.apply(void 0, _d.concat([__read.apply(void 0, [(_f.sent())])]))]));
return [3 /*break*/, 10];
return [3 /*break*/, 9];
case 8:
if (!(fileStat.isFile() &&
this.isValidFileExtensions(path_1.default.extname(filePath).slice(1)))) return [3 /*break*/, 10];
if (fileStat.size < this.options.threshold) {
return [3 /*break*/, 10];
if (fileStat.isFile() &&
this.service.isValidFileExtensions(path_1.default.extname(filePath).slice(1))) {
if (fileStat.size < this.options.threshold) {
return [3 /*break*/, 9];
}
compressedFiles.push(filePath);
}
hrtimeStart = process.hrtime();
return [4 /*yield*/, this.compressFile(file, target, this.outputPath)];
_f.label = 9;
case 9:
fileInfo = _f.sent();
if (!fileInfo.removeCompiled && !fileInfo.isSkipped) {
compressedFiles.push(filePath);
}
if (this.options.verbose) {
hrTimeEnd = process.hrtime(hrtimeStart);
this.logger.log(this.getCompressedFileMsg(file, fileInfo, hrTimeEnd));
}
_f.label = 10;
case 10:
filesList_1_1 = filesList_1.next();
return [3 /*break*/, 5];
case 11: return [3 /*break*/, 14];
case 12:
case 10: return [3 /*break*/, 13];
case 11:
e_1_1 = _f.sent();
e_1 = { error: e_1_1 };
return [3 /*break*/, 14];
case 13:
return [3 /*break*/, 13];
case 12:
try {

@@ -279,3 +265,3 @@ if (filesList_1_1 && !filesList_1_1.done && (_e = filesList_1.return)) _e.call(filesList_1);

return [7 /*endfinally*/];
case 14: return [2 /*return*/, compressedFiles];
case 13: return [2 /*return*/, compressedFiles];
}

@@ -286,83 +272,37 @@ });

/**
* File compression.
* Create workers for parallel compression.
*/
Compress.prototype.compressFile = function (filename, target, outputDir) {
Compress.prototype.createWorkers = function () {
return __awaiter(this, void 0, void 0, function () {
var isCached, isSkipped, inputPath, isFileTarget, outputPath, checksum, _a, isChanged, fileId, cachedFile, beforeSize, afterSize, removeCompiled;
return __generator(this, function (_b) {
switch (_b.label) {
case 0:
isCached = false;
isSkipped = false;
inputPath = path_1.default.join(target, filename);
if (!outputDir) return [3 /*break*/, 3];
return [4 /*yield*/, this.nativeFs.lstat(this.target)];
var files, cpus, size, chunks, workers, results, error_2;
var _this = this;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.getFilesToCompress()];
case 1:
isFileTarget = (_b.sent()).isFile();
target = isFileTarget
? outputDir
: path_1.default.join(outputDir, path_1.default.relative(this.target, target));
return [4 /*yield*/, helpers_1.Helpers.createFolders(target)];
files = _a.sent();
cpus = this.options.workers || helpers_1.Helpers.getCPUs();
size = Math.ceil(files.length / cpus);
chunks = helpers_1.Helpers.chunkArray(files, size);
workers = chunks.map(function (chunk) { return _this.runCompressWorker(chunk); });
_a.label = 2;
case 2:
_b.sent();
_b.label = 3;
_a.trys.push([2, 4, , 5]);
return [4 /*yield*/, Promise.all(workers)];
case 3:
outputPath = this.getOutputPath(target, filename);
if (!this.options.skipCompressed) return [3 /*break*/, 5];
return [4 /*yield*/, this.nativeFs.exists(outputPath)];
results = _a.sent();
return [2 /*return*/, results.reduce(function (accumulator, value) {
return {
files: __spreadArray(__spreadArray([], __read(accumulator.files)), __read(value.files)),
filePaths: __assign(__assign({}, accumulator.filePaths), value.filePaths),
};
}, {
files: [],
filePaths: {},
})];
case 4:
if (_b.sent()) {
isSkipped = true;
return [2 /*return*/, { isCached: isCached, isSkipped: isSkipped }];
}
_b.label = 5;
case 5:
if (!this.options.incremental) return [3 /*break*/, 13];
return [4 /*yield*/, this.incremental.getFileChecksum(inputPath)];
case 6:
checksum = _b.sent();
return [4 /*yield*/, this.incremental.setFile(inputPath, checksum, this.compressionInstance.compressionOptions)];
case 7:
_a = _b.sent(), isChanged = _a.isChanged, fileId = _a.fileId;
cachedFile = path_1.default.resolve(this.incremental.cacheFolder, fileId);
if (!isChanged) return [3 /*break*/, 10];
return [4 /*yield*/, this.nativeStream.pipeline(fs_1.default.createReadStream(inputPath), this.createCompression(), fs_1.default.createWriteStream(outputPath))];
case 8:
_b.sent();
return [4 /*yield*/, this.nativeStream.pipeline(fs_1.default.createReadStream(outputPath), fs_1.default.createWriteStream(cachedFile))];
case 9:
_b.sent();
return [3 /*break*/, 12];
case 10: return [4 /*yield*/, this.nativeStream.pipeline(fs_1.default.createReadStream(cachedFile), fs_1.default.createWriteStream(outputPath))];
case 11:
_b.sent();
isCached = true;
_b.label = 12;
case 12: return [3 /*break*/, 15];
case 13: return [4 /*yield*/, this.nativeStream.pipeline(fs_1.default.createReadStream(inputPath), this.createCompression(), fs_1.default.createWriteStream(outputPath))];
case 14:
_b.sent();
_b.label = 15;
case 15:
if (!(this.options.verbose || this.options.removeLarger)) return [3 /*break*/, 20];
return [4 /*yield*/, this.nativeFs.lstat(inputPath)];
case 16:
beforeSize = (_b.sent()).size;
return [4 /*yield*/, this.nativeFs.lstat(outputPath)];
case 17:
afterSize = (_b.sent()).size;
removeCompiled = this.options.removeLarger && beforeSize < afterSize;
if (!removeCompiled) return [3 /*break*/, 19];
return [4 /*yield*/, this.nativeFs.unlink(outputPath)];
case 18:
_b.sent();
_b.label = 19;
case 19: return [2 /*return*/, {
beforeSize: beforeSize,
afterSize: afterSize,
isCached: isCached,
isSkipped: isSkipped,
removeCompiled: removeCompiled,
}];
case 20: return [2 /*return*/, { isCached: isCached, isSkipped: isSkipped }];
error_2 = _a.sent();
Logger_1.Logger.log(error_2.message, LogLevel_enum_1.LogLevel.ERROR);
throw new Error(error_2.message);
case 5: return [2 /*return*/];
}

@@ -373,2 +313,39 @@ });

/**
* Run compress worker
*/
Compress.prototype.runCompressWorker = function (chunk) {
return __awaiter(this, void 0, void 0, function () {
var _this = this;
return __generator(this, function (_a) {
return [2 /*return*/, new Promise(function (resolve, reject) {
var worker = new worker_threads_1.Worker(path_1.default.resolve(__dirname, process.env.NODE_ENV !== 'testing'
? './Compress.worker.js'
: '../test/workers/Compress.worker.import.js'), {
workerData: {
chunk: chunk,
target: _this.target,
outputPath: _this.outputPath,
options: _this.options,
incrementalFilePaths: _this.options.incremental &&
helpers_1.Helpers.filterObject(_this.incremental.filePaths, function (key) {
return chunk.includes(key);
}),
},
});
worker.on('online', function () {
Logger_1.Logger.log("[" + worker.threadId + "] " + constants_1.WORKER_STARTED, LogLevel_enum_1.LogLevel.INFO);
});
worker.once('message', function (result) {
worker.terminate();
resolve(result);
});
worker.on('error', function (error) {
worker.terminate();
reject(error);
});
})];
});
});
};
/**
* Show message with compression params.

@@ -378,66 +355,10 @@ */

var options = this.compressionInstance.readableOptions();
this.logger.log("Compression " + options, LogLevel_enum_1.LogLevel.INFO);
Logger_1.Logger.log("Compression " + options, LogLevel_enum_1.LogLevel.INFO);
if (!this.options.outputFileFormat) {
this.logger.log(constants_1.DEFAULT_OUTPUT_FORMAT_MESSAGE, LogLevel_enum_1.LogLevel.INFO);
Logger_1.Logger.log(constants_1.DEFAULT_OUTPUT_FORMAT_MESSAGE, LogLevel_enum_1.LogLevel.INFO);
}
};
/**
* Get output path which is based on [outputFileFormat].
*/
Compress.prototype.getOutputPath = function (target, file) {
var artifactsMap = new Map([
['[filename]', path_1.default.parse(file).name],
['[ext]', path_1.default.extname(file).slice(1)],
['[compressExt]', this.compressionInstance.ext],
]);
var filename = artifactsMap.get('[filename]') + "." + artifactsMap.get('[ext]') + "." + artifactsMap.get('[compressExt]');
if (this.options.outputFileFormat) {
artifactsMap.set('[hash]', null);
filename = this.options.outputFileFormat.replace(constants_1.OUTPUT_FILE_FORMAT_REGEXP, function (artifact) {
if (artifactsMap.has(artifact)) {
// Need to generate hash only if we have appropriate param
if (artifact === '[hash]') {
artifactsMap.set('[hash]', uuid_1.v4());
}
return artifactsMap.get(artifact);
}
else {
return artifact;
}
});
}
return "" + path_1.default.join(target, filename);
};
/**
* Returns if the file extension is valid.
*/
Compress.prototype.isValidFileExtensions = function (ext) {
if (constants_1.COMPRESSION_EXTENSIONS.includes(ext)) {
return false;
}
var excludeExtensions = this.options.exclude;
var includeExtensions = this.options.include;
if (includeExtensions === null || includeExtensions === void 0 ? void 0 : includeExtensions.length) {
return includeExtensions.includes(ext);
}
if (excludeExtensions === null || excludeExtensions === void 0 ? void 0 : excludeExtensions.length) {
return !excludeExtensions.includes(ext);
}
return true;
};
/**
* Returns information message about compressed file (size, time, cache, etc.)
*/
Compress.prototype.getCompressedFileMsg = function (file, fileInfo, hrtime) {
if (fileInfo.isSkipped) {
return "File " + file + " has been skipped";
}
var getSize = helpers_1.Helpers.readableSize(fileInfo.beforeSize) + " -> " + helpers_1.Helpers.readableSize(fileInfo.afterSize);
return fileInfo.isCached
? "File " + file + " has been retrieved from the cache " + getSize + " (" + helpers_1.Helpers.readableHrtime(hrtime) + ")"
: "File " + file + " has been compressed " + getSize + " (" + helpers_1.Helpers.readableHrtime(hrtime) + ")";
};
return Compress;
}());
exports.Compress = Compress;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tcHJlc3MuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvQ29tcHJlc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSwwQ0FBb0I7QUFDcEIsOENBQXdCO0FBQ3hCLDhDQUF3QjtBQUN4Qiw2QkFBMEI7QUFDMUIsa0RBQTRCO0FBRTVCLHFDQUFvQztBQUNwQywwQ0FBeUM7QUFDekMsZ0RBQTBEO0FBQzFELDRDQUFzRDtBQUN0RCx5Q0FPcUI7QUFFckIsa0RBQTREO0FBQzVELDZDQUE0QztBQUM1QyxtQ0FBa0M7QUFDbEMsd0RBQWtEO0FBRWxEOztHQUVHO0FBQ0g7S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FDTCxDQUFDLENBQUMsRUFBQzs7O0tBQ0o7SUFFRDs7T0FFRztJQUNLLGlDQUFjLEdBQXRCO1FBQ0UsSUFBTSxPQUFPLEdBQUcsSUFBSSxDQUFDLG1CQUFtQixDQUFDLGVBQWUsRUFBRSxDQUFDO1FBQzNELGVBQU0sQ0FBQyxHQUFHLENBQUMsaUJBQWUsT0FBUyxFQUFFLHdCQUFRLENBQUMsSUFBSSxDQUFDLENBQUM7UUFFcEQsSUFBSSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsZ0JBQWdCLEVBQUU7WUFDbEMsZUFBTSxDQUFDLEdBQUcsQ0FBQyx5Q0FBNkIsRUFBRSx3QkFBUSxDQUFDLElBQUksQ0FBQyxDQUFDO1NBQzFEO0lBQ0gsQ0FBQztJQUNILGVBQUM7QUFBRCxDQUFDLEFBL01ELElBK01DO0FBL01ZLDRCQUFRIn0=
/// <reference types="node" />
import zlib from 'zlib';
import { Compression } from './Compression';
import { Logger } from '../logger/Logger';
import { CompressOptions, BrotliOptions } from '../interfaces';

@@ -15,3 +14,3 @@ /**

*/
constructor(options: CompressOptions, logger: Logger);
constructor(options: CompressOptions);
/**

@@ -33,6 +32,2 @@ * Returns brotli compression instance in closure.

protected getBrotliOptionName(index: string): string | undefined;
/**
* Check if brotli compression is exists on current Node.js version.
*/
private availability;
}

@@ -24,3 +24,2 @@ "use strict";

var Compression_1 = require("./Compression");
var LogLevel_enum_1 = require("../logger/LogLevel.enum");
/**

@@ -34,7 +33,6 @@ * Brotli compression

*/
function BrotliCompression(options, logger) {
var _this = _super.call(this, options, logger) || this;
function BrotliCompression(options) {
var _this = _super.call(this, options) || this;
_this.compressionName = 'BROTLI';
_this.ext = 'br';
_this.availability();
return _this;

@@ -102,15 +100,5 @@ }

};
/**
* Check if brotli compression is exists on current Node.js version.
*/
BrotliCompression.prototype.availability = function () {
if (typeof zlib_1.default.createBrotliCompress !== 'function') {
var message = "Can't use brotli compression, Node.js >= v11.7.0 required.";
this.logger.log(message, LogLevel_enum_1.LogLevel.ERROR);
throw new Error(message);
}
};
return BrotliCompression;
}(Compression_1.Compression));
exports.BrotliCompression = BrotliCompression;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQnJvdGxpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2NvbXByZXNzaW9ucy9Ccm90bGkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsOENBQXdCO0FBRXhCLDZDQUE0QztBQUc1Qyx5REFBbUQ7QUFFbkQ7O0dBRUc7QUFDSDtJQUF1QyxxQ0FBMEI7SUFHL0Q7O09BRUc7SUFDSCwyQkFBWSxPQUF3QixFQUFFLE1BQWM7UUFBcEQsWUFDRSxrQkFBTSxPQUFPLEVBQUUsTUFBTSxDQUFDLFNBRXZCO1FBUlEscUJBQWUsR0FBRyxRQUFRLENBQUM7UUFDM0IsU0FBRyxHQUFHLElBQUksQ0FBQztRQU1sQixLQUFJLENBQUMsWUFBWSxFQUFFLENBQUM7O0lBQ3RCLENBQUM7SUFFRDs7T0FFRztJQUNILDBDQUFjLEdBQWQ7UUFBQSxpQkFLQztRQUpDLE9BQU87WUFDTCxPQUFBLGNBQUksQ0FBQyxvQkFBb0IsQ0FBQztnQkFDeEIsTUFBTSxFQUFFLEtBQUksQ0FBQyxrQkFBa0I7YUFDaEMsQ0FBQztRQUZGLENBRUUsQ0FBQztJQUNQLENBQUM7SUFFRDs7T0FFRztJQUNILDJDQUFlLEdBQWY7UUFDRSxPQUFPLGlCQUFNLGVBQWUsWUFBQyxJQUFJLENBQUMsbUJBQW1CLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxDQUFDLENBQUM7SUFDcEUsQ0FBQztJQUVEOztPQUVHO0lBQ08sNkNBQWlCLEdBQTNCO1FBQ0UsSUFBTSxPQUFPLEdBQWtCL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Q0FBdUMseUJBQVcsR0FnRmpEO0FBaEZZLDhDQUFpQiJ9
/// <reference types="node" />
import zlib from 'zlib';
import { CompressOptions, CompressionOptions } from '../interfaces';
import { Logger } from '../logger/Logger';
export declare abstract class Compression<T extends CompressionOptions> {

@@ -10,7 +9,6 @@ compressionOptions: T;

protected readonly options: CompressOptions;
protected readonly logger: Logger;
/**
* Creates an instance of Compression.
*/
constructor(options: CompressOptions, logger: Logger);
constructor(options: CompressOptions);
/**

@@ -17,0 +15,0 @@ * Returns a compression instance in closure.

@@ -35,6 +35,5 @@ "use strict";

*/
function Compression(options, logger) {
function Compression(options) {
this.compressionOptions = {};
this.options = options;
this.logger = logger;
this.selectCompression();

@@ -83,2 +82,2 @@ }

exports.Compression = Compression;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29tcHJlc3Npb24uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tcHJlc3Npb25zL0NvbXByZXNzaW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQUtBO0lBT0U7O09BRUc7SUFDSCxxQkFBWSxPQUF3QixFQUFFLE1BQWM7UUFUcEQsdUJBQWtCLEdBQU0sRUFBTyxDQUFDO1FBVTlCLElBQUksQ0FBQyxPQUFPLEdBQUcsT0FBTyxDQUFDO1FBQ3ZCLElBQUksQ0FBQyxNQUFNLEdBQUcsTUFBTSxDQUFDO1FBQ3JCLElBQUksQ0FBQyxpQkFBaUIsRUFBRSxDQUFDO0lBQzNCLENBQUM7SUFPRDs7T0FFRztJQUNILHFDQUFlLEdBQWYsVUFDRSxVQUU0Qjs7UUFGNUIsMkJBQUEsRUFBQSx1QkFDRSxHQUFXLElBQ1ksT0FBQSxHQUFHLEVBQUgsQ0FBRztRQUU1QixJQUFJLE9BQU8sR0FBRyxFQUFFL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Q0FBaUIsR0FBM0I7UUFDRSxJQUFNLE9BQU8sR0FBTSxFQUFPLENBQUM7UUFFM0IsSUFBSSxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssS0FBSyxTQUFTLEVBQUU7WUFDcEMsT0FBTyxDQUFDLEtBQUssR0FBRyxJQUFJLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQztTQUNwQztRQUVELElBQUksSUFBSSxDQUFDLE9BQU8sQ0FBQyxXQUFXLEtBQUssU0FBUyxFQUFFO1lBQzFDLE9BQU8sQ0FBQyxRQUFRLEdBQUcsSUFBSSxDQUFDLE9BQU8sQ0FBQyxXQUFXLENBQUM7U0FDN0M7UUFFRCxJQUFJLElBQUksQ0FBQyxPQUFPLENBQUMsUUFBUSxLQUFLLFNBQVMsRUFBRTtZQUN2QyxPQUFPLENBQUMsUUFBUSxHQUFHLElBQUksQ0FBQyxPQUFPLENBQUMsUUFBUSxDQUFDO1NBQzFDO1FBRUQsSUFBSSxDQUFDLGtCQUFrQixHQUFHLE9BQU8sQ0FBQztJQUNwQyxDQUFDO0lBQ0gsa0JBQUM7QUFBRCxDQUFDLEFBeERELElBd0RDO0FBeERxQixrQ0FBVyJ9

@@ -5,3 +5,2 @@ /// <reference types="node" />

import { CompressOptions, CompressionOptions } from '../interfaces';
import { Logger } from '../logger/Logger';
/**

@@ -16,3 +15,3 @@ * Deflate compression

*/
constructor(options: CompressOptions, logger: Logger);
constructor(options: CompressOptions);
/**

@@ -19,0 +18,0 @@ * Returns deflate compression instance in closure.

@@ -32,4 +32,4 @@ "use strict";

*/
function DeflateCompression(options, logger) {
var _this = _super.call(this, options, logger) || this;
function DeflateCompression(options) {
var _this = _super.call(this, options) || this;
_this.compressionName = 'DEFLATE';

@@ -49,2 +49,2 @@ _this.ext = 'zz';

exports.DeflateCompression = DeflateCompression;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGVmbGF0ZS5qcyIsInNvdXJjZVJvb3Q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BRLHFCQUFlLEdBQUcsU0FBUyxDQUFDO1FBQzVCLFNBQUcsR0FBRyxJQUFJLENBQUM7O0lBTXBCLENBQUM7SUFFRDs7T0FFRztJQUNILDJDQUFjLEdBQWQ7UUFBQSxpQkFFQztRQURDLE9BQU8sY0FBb0IsT0FBQSxjQUFJLENBQUMsYUFBYSxDQUFDLEtBQUksQ0FBQyxrQkFBa0IsQ0FBQyxFQUEzQyxDQUEyQyxDQUFDO0lBQ3pFLENBQUM7SUFDSCx5QkFBQztBQUFELENBQUMsQUFoQkQsQ0FBd0MseUJBQVcsR0FnQmxEO0FBaEJZLGdEQUFrQiJ9

@@ -5,3 +5,2 @@ /// <reference types="node" />

import { CompressOptions, CompressionOptions } from '../interfaces';
import { Logger } from '../logger/Logger';
/**

@@ -16,3 +15,3 @@ * Gzip compression

*/
constructor(options: CompressOptions, logger: Logger);
constructor(options: CompressOptions);
/**

@@ -19,0 +18,0 @@ * Returns gzip compression instance in closure.

@@ -32,4 +32,4 @@ "use strict";

*/
function GzipCompression(options, logger) {
var _this = _super.call(this, options, logger) || this;
function GzipCompression(options) {
var _this = _super.call(this, options) || this;
_this.compressionName = 'GZIP';

@@ -49,2 +49,2 @@ _this.ext = 'gz';

exports.GzipCompression = GzipCompression;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiR3ppcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9jb21wcmVzc2lvbnMvR3ppcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSw4Q0FBd0I7QUFFeEIsNkNBQTRDO0FBSTVDOztHQUVHO0FBQ0g7SUFBcUMsbUNBQStCO0lBR2xFOztPQUVHO0lBQ0gseUJBQVksT0FBd0IsRUFBRSxNQUFjO1FBQXBELFlBQ0Usa0JBQU0sT0FBTyxFQUFFLE1BQU0sQ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QUFlIn0=
import { FileConfig } from './interfaces';
export declare class Config {
readonly configFile: string;
private readonly nativeFs;
private readonly writableContent;
private readonly _configFile;
private _configContent;
get configContent(): Readonly<FileConfig>;
set configContent(value: Readonly<FileConfig>);
/**

@@ -11,9 +13,13 @@ * Creates an instance of Config.

/**
* Read config (.gzipperconfig).
*/
readConfig(): Promise<void>;
/**
* set additional data for property to config file (.gzipperconfig).
*/
setWritableContentProperty<T extends keyof FileConfig, K extends FileConfig[T]>(field: T, content: K): void;
setProperty<T extends keyof FileConfig, K extends FileConfig[T]>(field: T, content: K): void;
/**
* delete property from config file (.gzipperconfig).
*/
deleteWritableContentProperty<T extends keyof FileConfig>(field: T): void;
deleteProperty<T extends keyof FileConfig>(field: T): void;
/**

@@ -20,0 +26,0 @@ * Init or update config (.gzipperconfig).

@@ -55,12 +55,44 @@ "use strict";

writeFile: util_1.default.promisify(fs_1.default.writeFile),
exists: util_1.default.promisify(fs_1.default.exists),
};
this.writableContent = {};
this.configFile = path_1.default.resolve(process.cwd(), constants_1.CONFIG_FOLDER, constants_1.CONFIG_FILE);
this.setWritableContentProperty('version', helpers_1.Helpers.getVersion());
this._configContent = {};
this._configFile = path_1.default.resolve(process.cwd(), constants_1.CONFIG_FOLDER, constants_1.CONFIG_FILE);
this.setProperty('version', helpers_1.Helpers.getVersion());
}
Object.defineProperty(Config.prototype, "configContent", {
get: function () {
return this._configContent;
},
set: function (value) {
this._configContent = value;
},
enumerable: false,
configurable: true
});
/**
* Read config (.gzipperconfig).
*/
Config.prototype.readConfig = function () {
return __awaiter(this, void 0, void 0, function () {
var response;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.nativeFs.exists(this._configFile)];
case 1:
if (!_a.sent()) return [3 /*break*/, 3];
return [4 /*yield*/, helpers_1.Helpers.readFile(this._configFile)];
case 2:
response = _a.sent();
this._configContent = JSON.parse(response.toString());
_a.label = 3;
case 3: return [2 /*return*/];
}
});
});
};
/**
* set additional data for property to config file (.gzipperconfig).
*/
Config.prototype.setWritableContentProperty = function (field, content) {
this.writableContent[field] = content;
Config.prototype.setProperty = function (field, content) {
this._configContent[field] = content;
};

@@ -70,4 +102,4 @@ /**

*/
Config.prototype.deleteWritableContentProperty = function (field) {
delete this.writableContent[field];
Config.prototype.deleteProperty = function (field) {
delete this._configContent[field];
};

@@ -81,3 +113,3 @@ /**

switch (_a.label) {
case 0: return [4 /*yield*/, this.nativeFs.writeFile(path_1.default.resolve(this.configFile), JSON.stringify(this.writableContent, null, 2))];
case 0: return [4 /*yield*/, this.nativeFs.writeFile(path_1.default.resolve(this._configFile), JSON.stringify(this._configContent, null, 2))];
case 1:

@@ -93,2 +125,2 @@ _a.sent();

exports.Config = Config;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiQ29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL0NvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSw4Q0FBd0I7QUFDeEIsOENBQXdCO0FBQ3hCLDBDQUFvQjtBQUdwQix5Q0FBeUQ7QUFDekQscUNBQW9DO0FBRXBDO0lBT0U7O09BRUc7SUFDSDtRQVJpQixhQUFRLEdBQUc7WUFDMUIsU0FBUyxFQUFFLGNBQUksQ0FBQyxTQUFTLENBQUMsWUFBRSxDQUFDLFNBQVMsQ0FBQztTQUN4QyxDQUFDO1FBQ2Usb0JBQWUsR0FBZSxFQUFnQixDQUFDO1FBTTlELElBQUksQ0FBQyxVQUFVLEdBQUcsY0FBSSxDQUFDLE9BQU8sQ0FBQyxPQUFPLENBQUMsR0FBRyxFQUFFLEVBQUUseUJBQWEsRUFBRSx1QkFBVyxDQUFDLENBQUM7UUFDMUUsSUFBSSxDQUFDLDBCQUEwQixDQUFDLFNBQVMs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BRUc7SUFDSCw0QkFBVyxHQUFYLFVBQ0UsS0FBUSxFQUNSLE9BQVU7UUFFVixJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxHQUFHLE9BQU8sQ0FBQztJQUN2QyxDQUFDO0lBRUQ7O09BRUc7SUFDSCwrQkFBYyxHQUFkLFVBQTJDLEtBQVE7UUFDakQsT0FBTyxJQUFJLENBQUMsY0FBYyxDQUFDLEtBQUssQ0FBQyxDQUFDO0lBQ3BDLENBQUM7SUFFRDs7T0FFRztJQUNHLDRCQUFXLEdBQWpCOzs7OzRCQUNFLHFCQUFNLElBQUksQ0FBQyxRQUFRLENBQUMsU0FBUyxDQUMzQixjQUFJLENBQUMsT0FBTyxDQUFDLElBQUksQ0FBQyxXQUFXLENBQUMsRUFDOUIsSUFBSSxDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsY0FBYyxFQUFFLElBQUksRUFBRSxDQUFDLENBQUMsQ0FDN0MsRUFBQTs7d0JBSEQsU0FHQyxDQUFDOzs7OztLQUNIO0lBQ0gsYUFBQztBQUFELENBQUMsQUE1REQsSUE0REM7QUE1RFksd0JBQU0ifQ==
export declare const OUTPUT_FILE_FORMAT_REGEXP: RegExp;
export declare const NO_FILES_MESSAGE = "No files for compression.";
export declare const WORKER_STARTED = "Worker has started.";
export declare const NO_PATH_MESSAGE = "Can't find a path.";

@@ -4,0 +5,0 @@ export declare const INCREMENTAL_ENABLE_MESSAGE = "Incremental compression has been enabled.";

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.COMPRESSION_EXTENSIONS = exports.CONFIG_FILE = exports.CACHE_FOLDER = exports.CONFIG_FOLDER = exports.DEFAULT_OUTPUT_FORMAT_MESSAGE = exports.INCREMENTAL_ENABLE_MESSAGE = exports.NO_PATH_MESSAGE = exports.NO_FILES_MESSAGE = exports.OUTPUT_FILE_FORMAT_REGEXP = void 0;
exports.COMPRESSION_EXTENSIONS = exports.CONFIG_FILE = exports.CACHE_FOLDER = exports.CONFIG_FOLDER = exports.DEFAULT_OUTPUT_FORMAT_MESSAGE = exports.INCREMENTAL_ENABLE_MESSAGE = exports.NO_PATH_MESSAGE = exports.WORKER_STARTED = exports.NO_FILES_MESSAGE = exports.OUTPUT_FILE_FORMAT_REGEXP = void 0;
exports.OUTPUT_FILE_FORMAT_REGEXP = /(\[filename\]*)|(\[hash\]*)|(\[compressExt\]*)|(\[ext\]*)/g;
exports.NO_FILES_MESSAGE = 'No files for compression.';
exports.WORKER_STARTED = 'Worker has started.';
exports.NO_PATH_MESSAGE = "Can't find a path.";

@@ -13,2 +14,2 @@ exports.INCREMENTAL_ENABLE_MESSAGE = 'Incremental compression has been enabled.';

exports.COMPRESSION_EXTENSIONS = ['gz', 'zz', 'br'];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHlCQUF5QixHQUFHLDREQUE0RCxDQUFDO0FBQ3pGLFFBQUEsZ0JBQWdCLEdBQUcsMkJBQTJCLENBQUM7QUFDL0MsUUFBQSxlQUFlLEdBQUcsb0JBQW9CLENBQUM7QUFDdkMsUUFBQSwwQkFBMEIsR0FDckMsMkNBQTJDLENBQUM7QUFDakMsUUFBQSw2QkFBNkIsR0FDeEMsNERBQTRELENBQUM7QUFDbEQsUUFBQSxhQUFhLEdBQUcsVUFBVSxDQUFDO0FBQzNCLFFBQUEsWUFBWSxHQUFHLE9BQU8sQ0FBQztBQUN2QixRQUFBLFdBQVcsR0FBRyxnQkFBZ0IsQ0FBQztBQUMvQixRQUFBLHNCQUFzQixHQUFHLENBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQyJ9
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLHlCQUF5QixHQUFHLDREQUE0RCxDQUFDO0FBQ3pGLFFBQUEsZ0JBQWdCLEdBQUcsMkJBQTJCLENBQUM7QUFDL0MsUUFBQSxjQUFjLEdBQUcscUJBQXFCLENBQUM7QUFDdkMsUUFBQSxlQUFlLEdBQUcsb0JBQW9CLENBQUM7QUFDdkMsUUFBQSwwQkFBMEIsR0FDckMsMkNBQTJDLENBQUM7QUFDakMsUUFBQSw2QkFBNkIsR0FDeEMsNERBQTRELENBQUM7QUFDbEQsUUFBQSxhQUFhLEdBQUcsVUFBVSxDQUFDO0FBQzNCLFFBQUEsWUFBWSxHQUFHLE9BQU8sQ0FBQztBQUN2QixRQUFBLFdBQVcsR0FBRyxnQkFBZ0IsQ0FBQztBQUMvQixRQUFBLHNCQUFzQixHQUFHLENBQUMsSUFBSSxFQUFFLElBQUksRUFBRSxJQUFJLENBQUMsQ0FBQyJ9

@@ -27,2 +27,14 @@ export declare class Helpers {

static readFile(file: string): Promise<string>;
/**
* Splits array into equal chunks.
*/
static chunkArray<T>(array: T[], size: number): T[][];
/**
* Returns number of CPU cores.
*/
static getCPUs(): number;
/**
* Filter object by predicate.
*/
static filterObject<T>(obj: T, predicate: (key: string, item: T[Extract<keyof T, string>]) => boolean): T;
}

@@ -80,2 +80,3 @@ "use strict";

var util_1 = __importDefault(require("util"));
var os_1 = __importDefault(require("os"));
var pack = __importStar(require("../package.json"));

@@ -148,2 +149,31 @@ var Helpers = /** @class */ (function () {

};
/**
* Splits array into equal chunks.
*/
Helpers.chunkArray = function (array, size) {
var result = [];
for (var i = 0; i < array.length; i += size) {
result.push(array.slice(i, i + size));
}
return result;
};
/**
* Returns number of CPU cores.
*/
Helpers.getCPUs = function () {
return os_1.default.cpus().length;
};
/**
* Filter object by predicate.
*/
Helpers.filterObject = function (obj, predicate) {
var result = {};
for (var key in obj) {
if (Object.prototype.hasOwnProperty.call(obj, key) &&
predicate(key, obj[key])) {
result[key] = obj[key];
}
}
return result;
};
Helpers.nativeFs = {

@@ -155,2 +185,2 @@ mkdir: util_1.default.promisify(fs_1.default.mkdir),

exports.Helpers = Helpers;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaGVscGVycy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9oZWxwZXJzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7O0FBQUEsMENBQW9CO0FBQ3BCLDhDQUF3QjtBQUV4QixvREFBd0M7QUFFeEM7SUFBQTtJQTZEQSxDQUFDO0lBeERDOztPQUVHO0lBQ1UscUJBQWEsR0FBMUIsVUFBMkIsTUFBYzs7Ozs0QkFDdkMscUJBQU0sSUFBSSxDQUFDLFFBQVEsQ0FBQyxLQUFLLENBQUMsTUFBTSxFQUFFLEVBQUUsU0FBUyxFQUFFLElBQUksRUFBRSxDQUFDLEVBQUE7O3dCQUF0RCxTQUFzRCxDQUFDOzs7OztLQUN4RDtJQUVEOztPQUVHO0lBQ0ksaUJBQVMsR0FBaEIsVUFBc0MsR0FBYztRQUNsRCxPQUFPLEtBQUssQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsTUFBTSxDQUFDLFVBQUMsR0FBRyxFQUFFLEVBQVk7Z0JBQVosS0FBQSxhQUFZLEVBQVgsR0FBRyxRQUFBLEVBQUUsS0FBSyxRQUFBO1lBQzdDLEdBQUcsQ0FBQyxHQUFHLENBQUMsR0FBR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UFDO1FBRXZCLEtBQUssSUFBTSxHQUFHLElBQUksR0FBRyxFQUFFO1lBQ3JCLElBQ0UsTUFBTSxDQUFDLFNBQVMsQ0FBQyxjQUFjLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxHQUFHLENBQUM7Z0JBQzlDLFNBQVMsQ0FBQyxHQUFHLEVBQUUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQ3hCO2dCQUNBLE1BQU0sQ0FBQyxHQUFHLENBQUMsR0FBRyxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUM7YUFDeEI7U0FDRjtRQUVELE9BQU8sTUFBTSxDQUFDO0lBQ2hCLENBQUM7SUFsR3VCLGdCQUFRLEdBQUc7UUFDakMsS0FBSyxFQUFFLGNBQUksQ0FBQyxTQUFTLENBQUMsWUFBRSxDQUFDLEtBQUssQ0FBQztLQUNoQyxDQUFDO0lBaUdKLGNBQUM7Q0FBQSxBQXBHRCxJQW9HQztBQXBHWSwwQkFBTyJ9
import { Cache, IncrementalFileValue } from './interfaces';
import { Config } from './Config';
export declare class Incremental implements Cache {
readonly cacheFolder: string;
private readonly nativeFs;
private readonly config;
private filePaths;
private readonly _cacheFolder;
private _filePaths;
get cacheFolder(): string;
get filePaths(): Record<string, IncrementalFileValue>;
set filePaths(value: Record<string, IncrementalFileValue>);
/**
* Creates an instance of Incremental.
*/
constructor(config: Config);
constructor(config?: Config);
/**

@@ -13,0 +16,0 @@ * Read config (.gzipperconfig).

@@ -85,6 +85,25 @@ "use strict";

};
this.filePaths = new Map();
this.config = config;
this.cacheFolder = path_1.default.resolve(process.cwd(), constants_1.CONFIG_FOLDER, constants_1.CACHE_FOLDER);
this._filePaths = new Map();
if (config) {
this.config = config;
}
this._cacheFolder = path_1.default.resolve(process.cwd(), constants_1.CONFIG_FOLDER, constants_1.CACHE_FOLDER);
}
Object.defineProperty(Incremental.prototype, "cacheFolder", {
get: function () {
return this._cacheFolder;
},
enumerable: false,
configurable: true
});
Object.defineProperty(Incremental.prototype, "filePaths", {
get: function () {
return Object.fromEntries(this._filePaths);
},
set: function (value) {
this._filePaths = new Map(Object.entries(value));
},
enumerable: false,
configurable: true
});
/**

@@ -95,18 +114,9 @@ * Read config (.gzipperconfig).

return __awaiter(this, void 0, void 0, function () {
var response, data;
var incrementalConfig;
return __generator(this, function (_a) {
switch (_a.label) {
case 0: return [4 /*yield*/, this.nativeFs.exists(this.config.configFile)];
case 1:
if (!_a.sent()) return [3 /*break*/, 3];
return [4 /*yield*/, helpers_1.Helpers.readFile(this.config.configFile)];
case 2:
response = _a.sent();
data = JSON.parse(response.toString());
if (data.incremental) {
this.filePaths = new Map(Object.entries(data.incremental.files));
}
_a.label = 3;
case 3: return [2 /*return*/];
incrementalConfig = this.config.configContent.incremental;
if (incrementalConfig) {
this._filePaths = new Map(Object.entries(incrementalConfig.files));
}
return [2 /*return*/];
});

@@ -121,4 +131,4 @@ });

return __generator(this, function (_a) {
this.config.setWritableContentProperty('incremental', {
files: helpers_1.Helpers.mapToJSON(this.filePaths),
this.config.setProperty('incremental', {
files: helpers_1.Helpers.mapToJSON(this._filePaths),
});

@@ -136,6 +146,6 @@ return [2 /*return*/];

switch (_a.label) {
case 0: return [4 /*yield*/, this.nativeFs.exists(this.cacheFolder)];
case 0: return [4 /*yield*/, this.nativeFs.exists(this._cacheFolder)];
case 1:
if (!!(_a.sent())) return [3 /*break*/, 3];
return [4 /*yield*/, helpers_1.Helpers.createFolders(this.cacheFolder)];
return [4 /*yield*/, helpers_1.Helpers.createFolders(this._cacheFolder)];
case 2:

@@ -153,3 +163,3 @@ _a.sent();

Incremental.prototype.setFile = function (target, checksum, compressOptions) {
var filePath = this.filePaths.get(target);
var filePath = this._filePaths.get(target);
var selectedRevision = filePath === null || filePath === void 0 ? void 0 : filePath.revisions.find(function (revision) {

@@ -160,3 +170,3 @@ return deep_equal_1.default(revision.options, compressOptions);

var fileId = uuid_1.v4();
this.filePaths.set(target, {
this._filePaths.set(target, {
revisions: [

@@ -178,3 +188,3 @@ {

var fileId = uuid_1.v4();
this.filePaths.set(target, {
this._filePaths.set(target, {
revisions: filePath.revisions.concat({

@@ -193,3 +203,3 @@ lastChecksum: checksum,

if (selectedRevision.lastChecksum !== checksum) {
this.filePaths.set(target, {
this._filePaths.set(target, {
revisions: filePath.revisions.map(function (revision) {

@@ -236,3 +246,3 @@ return revision.fileId === selectedRevision.fileId

switch (_a.label) {
case 0: return [4 /*yield*/, this.nativeFs.exists(this.cacheFolder)];
case 0: return [4 /*yield*/, this.nativeFs.exists(this._cacheFolder)];
case 1:

@@ -243,3 +253,3 @@ if (!(_a.sent())) {

recursiveRemove = function (folderPath) {
if (folderPath === void 0) { folderPath = _this.cacheFolder; }
if (folderPath === void 0) { folderPath = _this._cacheFolder; }
return __awaiter(_this, void 0, void 0, function () {

@@ -299,3 +309,3 @@ var files, files_1, files_1_1, file, filePath, isDirectory, e_1_1;

_a.sent();
this.config.deleteWritableContentProperty('incremental');
this.config.deleteProperty('incremental');
return [4 /*yield*/, this.config.writeConfig()];

@@ -313,3 +323,3 @@ case 3:

Incremental.prototype.cacheSize = function (folderPath, size) {
if (folderPath === void 0) { folderPath = this.cacheFolder; }
if (folderPath === void 0) { folderPath = this._cacheFolder; }
if (size === void 0) { size = 0; }

@@ -321,3 +331,3 @@ return __awaiter(this, void 0, void 0, function () {

switch (_c.label) {
case 0: return [4 /*yield*/, this.nativeFs.exists(this.cacheFolder)];
case 0: return [4 /*yield*/, this.nativeFs.exists(this._cacheFolder)];
case 1:

@@ -378,2 +388,2 @@ if (!(_c.sent())) {

exports.Incremental = Incremental;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiSW5jcmVtZW50YWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvSW5jcmVtZW50YWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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QyxDQUFDOzs7d0JBQ3hDLElBQUksUUFBUSxDQUFDLE1BQU0sRUFBRSxFQUFFOzRCQUM1QixJQUFJLElBQUksUUFBUSxDQUFDLElBQUksQ0FBQzt5QkFDdkI7Ozs7Ozs7Ozs7Ozs7Ozs7NkJBRUgsc0JBQU8sSUFBSSxFQUFDOzs7O0tBQ2I7SUFDSCxrQkFBQztBQUFELENBQUMsQUFuTkQsSUFtTkM7QUFuTlksa0NBQVcifQ==

@@ -20,2 +20,3 @@ /// <reference types="node" />

skipCompressed?: boolean;
workers?: number;
}

@@ -35,3 +36,3 @@ export declare type CompressionOptions = {

isSkipped: boolean;
removeCompiled: boolean;
removeCompressed: boolean;
}

@@ -58,1 +59,5 @@ export interface Cache {

}
export interface WorkerMessage {
files: string[];
filePaths: Record<string, IncrementalFileValue>;
}

@@ -25,2 +25,3 @@ "use strict";

exports.filter = void 0;
var Logger_1 = require("./Logger");
var LogLevel_enum_1 = require("./LogLevel.enum");

@@ -39,3 +40,3 @@ /**

var _a = __read(args, 2), level = _a[1];
var shouldLog = this.verbose ||
var shouldLog = Logger_1.Logger.verbose ||
level === LogLevel_enum_1.LogLevel.ERROR ||

@@ -50,2 +51,2 @@ level === LogLevel_enum_1.LogLevel.WARNING ||

exports.filter = filter;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZmlsdGVyLmRlY29yYXRvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy9sb2dnZXIvZmlsdGVyLmRlY29yYXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFDQSxpREFBMkM7QUFFM0M7O0dBRUc7QUFDSCxTQUFnQixNQUFNO0lBS3BCLE9BQU8sVUFBVSxPQUFPLEVBQUUsWUFBWSxFQUFFLFVBQVU7UUFDaEQsSUFBTSxlQUFlLEdBQUcsVU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Q0FBQyxLQUFLLENBQUM7UUFFekMsVUFBVSxDQUFDLEtBQUssR0FBRztZQUFVLGNBQTJCO2lCQUEzQixVQUEyQixFQUEzQixxQkFBMkIsRUFBM0IsSUFBMkI7Z0JBQTNCLHlCQUEyQjs7WUFDaEQsSUFBQSxLQUFBLE9BQVksSUFBSSxJQUFBLEVBQWIsS0FBSyxRQUFRLENBQUM7WUFDdkIsSUFBTSxTQUFTLEdBQ2IsZUFBTSxDQUFDLE9BQU87Z0JBQ2QsS0FBSyxLQUFLLHdCQUFRLENBQUMsS0FBSztnQkFDeEIsS0FBSyxLQUFLLHdCQUFRLENBQUMsT0FBTztnQkFDMUIsS0FBSyxLQUFLLHdCQUFRLENBQUMsT0FBTyxDQUFDO1lBRTdCLE9BQU8sU0FBUyxDQUFDLENBQUMsQ0FBQyxlQUFlLENBQUMsSUFBSSxPQUFwQixlQUFlLCtCQUFNLElBQUksVUFBSyxJQUFJLEtBQUUsS0FBSyxJQUFFLENBQUMsQ0FBQyxJQUFJLENBQUM7UUFDdkUsQ0FBQyxDQUFDO1FBRUYsT0FBTyxVQUFVLENBQUM7SUFDcEIsQ0FBQyxDQUFDO0FBQ0osQ0FBQztBQXJCRCx3QkFxQkMifQ==

@@ -6,15 +6,15 @@ import { LogLevel } from './LogLevel.enum';

export declare class Logger {
readonly verbose: boolean;
static verbose: boolean;
/**
* Creates an instance of Logger.
* Set verbose mode.
*/
constructor(verbose: boolean);
static setVerboseMode(verbose: boolean): void;
/**
* Log message.
*/
log(message: string, level?: LogLevel): void;
static log(message: string, level?: LogLevel): void;
/**
* Colorize messages depends on the level and return a wrapper.
*/
private logger;
private static logger;
}

@@ -16,14 +16,16 @@ "use strict";

var Logger = /** @class */ (function () {
function Logger() {
}
/**
* Creates an instance of Logger.
* Set verbose mode.
*/
function Logger(verbose) {
this.verbose = verbose;
}
Logger.setVerboseMode = function (verbose) {
Logger.verbose = verbose;
};
/**
* Log message.
*/
Logger.prototype.log = function (message, level) {
Logger.log = function (message, level) {
if (level === void 0) { level = LogLevel_enum_1.LogLevel.DEBUG; }
return this.logger(message, level);
return Logger.logger(message, level);
};

@@ -33,3 +35,3 @@ /**

*/
Logger.prototype.logger = function (message, level) {
Logger.logger = function (message, level) {
var colorfulMessage;

@@ -59,6 +61,6 @@ var prefix = 'gzipper';

filter_decorator_1.filter()
], Logger.prototype, "log", null);
], Logger, "log", null);
return Logger;
}());
exports.Logger = Logger;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiTG9nZ2VyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vc3JjL2xvZ2dlci9Mb2dnZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7O0FBQUEsdURBQTRDO0FBQzVDLGlEQUEyQztBQUUzQzs7R0FFRztBQUNIO0lBRUU7O09BRUc7SUFDSCxnQkFBWSxPQUFnQjtRQUMxQixJQUFJLENBQUMsT0FBTyxHQUFHLE9BQU8sQ0FBQztJQUN6QixDQUFDO0lBRUQ7O09BRUc7SUFFSCxvQkFBRyxHQUFILFVBQUksT0FBZSxFQUFFLEtBQWdDO1FBQWhDLHNCQUFBLEVBQUEsUUFBa0Isd0JBQVEsQ0FBQyxLQUFLO1FBQ25ELE9BQU8sSUFBSSxDQUFDLE1BQU0sQ0FBQyxPQUFPLEVBQUUsS0FBSyxDQUFDLENBQUM7SUFDckMsQ0FBQztJQUVEOztPQUVHO0lBQ0ssdUJBQU0sR0FBZCxVQUFlLE9BQWUsRUFBRSxLQUFlO1FBQzdDLElBQUksZUFBdUIsQ0FBQztRQUM1QixJQUFNLE1BQU0sR0FBRyxTQUFTLENBQUM7UUFFekIsUUFBUSxLQUFLLEVBQUU7WUFDYixLQUFLLHdCQUFRLENBQUMsSUFBSTtnQkFDaEIsZUFBZSxHQUFHLGtCQUFjLE1BQU0scUNBQTRCLENBQUM7Z0JBQ25FLE1BQU07WUFFUixL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Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc