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

scss-bundle

Package Overview
Dependencies
Maintainers
2
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scss-bundle - npm Package Compare versions

Comparing version 2.1.2 to 2.1.3

2

@types/bundler.d.ts

@@ -22,3 +22,3 @@ export interface FileRegistry {

constructor(fileRegistry?: FileRegistry);
BundleAll(files: string[], dedupeGlobs: string[]): Promise<BundleResult[]>;
BundleAll(files: string[], dedupeGlobs?: string[]): Promise<BundleResult[]>;
Bundle(file: string, dedupeGlobs?: string[], includePaths?: string[]): Promise<BundleResult>;

@@ -25,0 +25,0 @@ private bundle(filePath, content, dedupeFiles, includePaths);

@@ -28,6 +28,6 @@ "use strict";

}
BundleAll(files, dedupeGlobs) {
BundleAll(files, dedupeGlobs = []) {
return __awaiter(this, void 0, void 0, function* () {
const resultsPromises = files.map((file) => __awaiter(this, void 0, void 0, function* () { return this.Bundle(file, dedupeGlobs); }));
return yield Promise.all(resultsPromises);
return Promise.all(resultsPromises);
});

@@ -43,3 +43,3 @@ }

const [content, dedupeFiles] = yield Promise.all([contentPromise, dedupeFilesPromise]);
return yield this.bundle(file, content, dedupeFiles, includePaths);
return this.bundle(file, content, dedupeFiles, includePaths);
}

@@ -229,2 +229,2 @@ catch (error) {

exports.Bundler = Bundler;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9idW5kbGVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7QUFBQSwrQkFBK0I7QUFDL0IseUJBQXlCO0FBQ3pCLDZCQUE2QjtBQUM3QiwrQkFBK0I7QUFFL0IscUNBQXFDO0FBRXJDLE1BQU0sY0FBYyxHQUFHLHdCQUF3QixDQUFDO0FBQ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b250ZW50O1xyXG4gICAgICAgIH1cclxuXHJcbiAgICAgICAgLy8gUmVzb2x2ZSBpbXBvcnRzIGZpbGUgbmFtZXMgKHByZXBlbmQgdW5kZXJzY29yZSBmb3IgcGFydGlhbHMpXHJcbiAgICAgICAgY29uc3QgaW1wb3J0c1Byb21pc2VzID0gSGVscGVycy5nZXRBbGxNYXRjaGVzKGNvbnRlbnQsIElNUE9SVF9QQVRURVJOKS5tYXAoYXN5bmMgbWF0Y2ggPT4ge1xyXG4gICAgICAgICAgICBsZXQgaW1wb3J0TmFtZSA9IG1hdGNoWzFdO1xyXG4gICAgICAgICAgICAvLyBBcHBlbmQgZXh0ZW5zaW9uIGlmIGl0J3MgYWJzZW50XHJcbiAgICAgICAgICAgIGlmIChpbXBvcnROYW1lLmluZGV4T2YoRklMRV9FWFRFTlNJT04pID09PSAtMSkge1xyXG4gICAgICAgICAgICAgICAgaW1wb3J0TmFtZSArPSBGSUxFX0VYVEVOU0lPTjtcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICBjb25zdCBmdWxsUGF0aCA9IHBhdGgucmVzb2x2ZShkaXJuYW1lLCBpbXBvcnROYW1lKTtcclxuXHJcbiAgICAgICAgICAgIGNvbnN0IGltcG9ydERhdGE6IEltcG9ydERhdGEgPSB7XHJcbiAgICAgICAgICAgICAgICBpbXBvcnRTdHJpbmc6IG1hdGNoWzBdLFxyXG4gICAgICAgICAgICAgICAgcGF0aDogaW1wb3J0TmFtZSxcclxuICAgICAgICAgICAgICAgIGZ1bGxQYXRoOiBmdWxsUGF0aCxcclxuICAgICAgICAgICAgICAgIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgdGhpcy5yZXNvbHZlSW1wb3J0KGltcG9ydERhdGEsIGluY2x1ZGVQYXRocyk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gaW1wb3J0RGF0YTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gV2FpdCBmb3IgYWxsIGltcG9ydHMgZmlsZSBuYW1lcyB0byBiZSByZXNvbHZlZFxyXG4gICAgICAgIGNvbnN0IGltcG9ydHMgPSBhd2FpdCBQcm9taXNlLmFsbChpbXBvcnRzUHJvbWlzZXMpO1xyXG5cclxuICAgICAgICBjb25zdCBidW5kbGVSZXN1bHQ6IEJ1bmRsZVJlc3VsdCA9IHtcclxuICAgICAgICAgICAgZmlsZVBhdGg6IGZpbGVQYXRoLFxyXG4gICAgICAgICAgICBmb3VuZDogdHJ1ZVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGNvbnN0IHNob3VsZENoZWNrRm9yRGVkdXBlcyA9IGRlZHVwZUZpbGVzICE9IG51bGwgJiYgZGVkdXBlRmlsZXMubGVuZ3RoID4gMDtcclxuXHJcbiAgICAgICAgLy8gQnVuZGxlIGFsbCBpbXBvcnRzXHJcbiAgICAgICAgY29uc3QgY3VycmVudEltcG9ydHM6IEJ1bmRsZVJlc3VsdFtdID0gW107XHJcbiAgICAgICAgZm9yIChjb25zdCBpbXAgb2YgaW1wb3J0cykge1xyXG4gICAgICAgICAgICBsZXQgY29udGVudFRvUmVwbGFjZTtcclxuXHJcbiAgICAgICAgICAgIGxldCBjdXJyZW50SW1wb3J0OiBCdW5kbGVSZXN1bHQ7XHJcblxyXG4gICAgICAgICAgICAvLyBJZiBuZWl0aGVyIGltcG9ydCBmaWxlLCBub3IgcGFydGlhbCBpcyBmb3VuZFxyXG4gICAgICAgICAgICBpZiAoIWltcC5mb3VuZCkge1xyXG4gICAgICAgICAgICAgICAgLy8gQWRkIGVtcHR5IGJ1bmRsZSByZXN1bHQgd2l0aCBmb3VuZDogZmFsc2VcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZmlsZVBhdGg6IGltcC5mdWxsUGF0aCxcclxuICAgICAgICAgICAgICAgICAgICBmb3VuZDogZmFsc2VcclxuICAgIC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EJ1bmRsZVJlc3VsdCB0byBjdXJyZW50IGltcG9ydHNcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQgPSBidW5kbGVkSW1wb3J0O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gRmlsZSBpcyBpbiB0aGUgcmVnaXN0cnlcclxuICAgICAgICAgICAgICAgIC8vIEluY3JlbWVudCBpdCdzIHVzYWdlIGNvdW50XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy51c2VkSW1wb3J0cyAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51c2VkSW1wb3J0c1tpbXAuZnVsbFBhdGhdKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBjaGlsZCBpbXBvcnRzLCBpZiB0aGVyZSBhcmUgYW55XHJcbiAgICAgICAgICAgICAgICBsZXQgY2hpbGRJbXBvcnRzOiBCdW5kbGVSZXN1bHRbXSA9IFtdO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaW1wb3J0c0J5RmlsZSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2hpbGRJbXBvcnRzID0gdGhpcy5pbXBvcnRzQnlGaWxlW2ltcC5mdWxsUGF0aF07XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQ29uc3RydWN0IGFuZCBhZGQgcmVzdWx0IHRvIGN1cnJlbnQgaW1wb3J0c1xyXG4gICAgICAgICAgICAgICAgY3VycmVudEltcG9ydCA9IHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlUGF0aDogaW1wLmZ1bGxQYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IGNoaWxkSW1wb3J0c1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gVGFrZSBjb250ZW50VG9SZXBsYWNlIGZyb20gdGhlIGZpbGVSZWdpc3RyeVxyXG4gICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gdGhpcy5maWxlUmVnaXN0cnlbaW1wLmZ1bGxQYXRoXTtcclxuXHJcbiAgICAgICAgICAgIC8vIElmIHRoZSBjb250ZW50IGlzIG5vdCBmb3VuZFxyXG4gICAgICAgICAgICBpZiAoY29udGVudFRvUmVwbGFjZSA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBJbmRpY2F0ZSB0aGlzIHdpdGggYSBjb21tZW50IGZvciBlYXNpZXIgZGVidWdnaW5nXHJcbiAgICAgICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gYC8qKiogSU1QT1JURUQgRklMRSBOT1QgRk9VTkQgKioqLyR7b3MuRU9MfSR7aW1wLmltcG9ydFN0cmluZ30vKioqIC0tLSAqKiovYDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gSWYgdXNlZEltcG9ydHMgZGljdGlvbmFyeSBpcyBkZWZpbmVkXHJcbiAgICAgICAgICAgIGlmIChzaG91bGRDaGVja0ZvckRlZHVwZXMgJiYgdGhpcy51c2VkSW1wb3J0cyAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBBbmQgY3VycmVudCBpbXBvcnQgcGF0aCBzaG91bGQgYmUgZGVkdXBlZCBhbmQgaXMgdXNlZCBhbHJlYWR5XHJcbiAgICAgICAgICAgICAgICBjb25zdCB0aW1lc1VzZWQgPSB0aGlzLnVzZWRJbXBvcnRzW2ltcC5mdWxsUGF0aF07XHJcbiAgICAgICAgICAgICAgICBpZiAoZGVkdXBlRmlsZXMuaW5kZXhPZihpbXAuZnVsbFBhdGgpICE9PSAtMSAmJlxyXG4gICAgICAgICAgICAgICAgICAgIHRpbWVzVXNlZCAhPSBudWxsICYmXHJcbiAgICAgICAgICAgICAgICAgICAgdGltZXNVc2VkID4gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFJlc2V0IGNvbnRlbnQgdG8gcmVwbGFjZSB0byBhbiBlbXB0eSBzdHJpbmcgdG8gc2tpcCBpdFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUb1JlcGxhY2UgPSBcIlwiO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEFuZCBpbmRpY2F0ZSB0aGF0IGltcG9ydCB3YXMgZGVkdXBlZFxyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQuZGVkdXBlZCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIEZpbmFsbHksIHJlcGxhY2UgaW1wb3J0IHN0cmluZyB3aXRoIGJ1bmRsZWQgY29udGVudCBvciBhIGRlYnVnIG1lc3NhZ2VcclxuICAgICAgICAgICAgY29udGVudCA9IGNvbnRlbnQucmVwbGFjZShpbXAuaW1wb3J0U3RyaW5nLCBjb250ZW50VG9SZXBsYWNlKTtcclxuXHJcbiAgICAgICAgICAgIC8vIEFuZCBwdXNoIGN1cnJlbnQgaW1wb3J0IGludG8gdGhlIGxpc3RcclxuICAgICAgICAgICAgY3VycmVudEltcG9ydHMucHVzaChjdXJyZW50SW1wb3J0KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFNldCByZXN1bHQgcHJvcGVydGllc1xyXG4gICAgICAgIGJ1bmRsZVJlc3VsdC5idW5kbGVkQ29udGVudCA9IGNvbnRlbnQ7XHJcbiAgICAgICAgYnVuZGxlUmVzdWx0LmltcG9ydHMgPSBjdXJyZW50SW1wb3J0cztcclxuXHJcbiAgICAgICAgaWYgKHRoaXMuaW1wb3J0c0J5RmlsZSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgIHRoaXMuaW1wb3J0c0J5RmlsZVtmaWxlUGF0aF0g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AgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBpbXBvcnREYXRhO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYXN5bmMgZ2xvYkZpbGVzT3JFbXB0eShnbG9ic0xpc3Q6IHN0cmluZ1tdKTogUHJvbWlzZTxzdHJpbmdbXT4ge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxzdHJpbmdbXT4oKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgICAgICBpZiAoZ2xvYnNMaXN0ID09IG51bGwgfHwgZ2xvYnNMaXN0Lmxlbmd0aCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShbXSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZ2xvYnMoZ2xvYnNMaXN0LCAoZXJyOiBFcnJvciwgZmlsZXM6IHN0cmluZ1tdKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAvLyBSZWplY3QgaWYgdGhlcmUncyBhbiBlcnJvclxyXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgZnVsbCBwYXRoc1xyXG4gICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gZmlsZXMubWFwKGZpbGUgPT4gcGF0aC5yZXNvbHZlKGZpbGUpKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBSZXNvbHZlIHByb21pc2VcclxuICAgICAgICAgICAgICAgIHJlc29sdmUocmVzdWx0KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbn1cclxuIl19
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlci5qcyIsInNvdXJjZVJv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AgICAgICAgIGZvdW5kOiBmYWxzZVxyXG4gICAgICAgICAgICB9O1xyXG5cclxuICAgICAgICAgICAgYXdhaXQgdGhpcy5yZXNvbHZlSW1wb3J0KGltcG9ydERhdGEsIGluY2x1ZGVQYXRocyk7XHJcblxyXG4gICAgICAgICAgICByZXR1cm4gaW1wb3J0RGF0YTtcclxuICAgICAgICB9KTtcclxuXHJcbiAgICAgICAgLy8gV2FpdCBmb3IgYWxsIGltcG9ydHMgZmlsZSBuYW1lcyB0byBiZSByZXNvbHZlZFxyXG4gICAgICAgIGNvbnN0IGltcG9ydHMgPSBhd2FpdCBQcm9taXNlLmFsbChpbXBvcnRzUHJvbWlzZXMpO1xyXG5cclxuICAgICAgICBjb25zdCBidW5kbGVSZXN1bHQ6IEJ1bmRsZVJlc3VsdCA9IHtcclxuICAgICAgICAgICAgZmlsZVBhdGg6IGZpbGVQYXRoLFxyXG4gICAgICAgICAgICBmb3VuZDogdHJ1ZVxyXG4gICAgICAgIH07XHJcblxyXG4gICAgICAgIGNvbnN0IHNob3VsZENoZWNrRm9yRGVkdXBlcyA9IGRlZHVwZUZpbGVzICE9IG51bGwgJiYgZGVkdXBlRmlsZXMubGVuZ3RoID4gMDtcclxuXHJcbiAgICAgICAgLy8gQnVuZGxlIGFsbCBpbXBvcnRzXHJcbiAgICAgICAgY29uc3QgY3VycmVudEltcG9ydHM6IEJ1bmRsZVJlc3VsdFtdID0gW107XHJcbiAgICAgICAgZm9yIChjb25zdCBpbXAgb2YgaW1wb3J0cykge1xyXG4gICAgICAgICAgICBsZXQgY29udGVudFRvUmVwbGFjZTtcclxuXHJcbiAgICAgICAgICAgIGxldCBjdXJyZW50SW1wb3J0OiBCdW5kbGVSZXN1bHQ7XHJcblxyXG4gICAgICAgICAgICAvLyBJZiBuZWl0aGVyIGltcG9ydCBmaWxlLCBub3IgcGFydGlhbCBpcyBmb3VuZFxyXG4gICAgICAgICAgICBpZiAoIWltcC5mb3VuZCkge1xyXG4gICAgICAgICAgICA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HMgIT0gbnVsbCAmJiB0aGlzLnVzZWRJbXBvcnRzW2ltcC5mdWxsUGF0aF0gPT0gbnVsbCkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMudXNlZEltcG9ydHNbaW1wLmZ1bGxQYXRoXSA9IDE7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQW5kIHdob2xlIEJ1bmRsZVJlc3VsdCB0byBjdXJyZW50IGltcG9ydHNcclxuICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQgPSBidW5kbGVkSW1wb3J0O1xyXG4gICAgICAgICAgICB9IGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgLy8gRmlsZSBpcyBpbiB0aGUgcmVnaXN0cnlcclxuICAgICAgICAgICAgICAgIC8vIEluY3JlbWVudCBpdCdzIHVzYWdlIGNvdW50XHJcbiAgICAgICAgICAgICAgICBpZiAodGhpcy51c2VkSW1wb3J0cyAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy51c2VkSW1wb3J0c1tpbXAuZnVsbFBhdGhdKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gUmVzb2x2ZSBjaGlsZCBpbXBvcnRzLCBpZiB0aGVyZSBhcmUgYW55XHJcbiAgICAgICAgICAgICAgICBsZXQgY2hpbGRJbXBvcnRzOiBCdW5kbGVSZXN1bHRbXSA9IFtdO1xyXG4gICAgICAgICAgICAgICAgaWYgKHRoaXMuaW1wb3J0c0J5RmlsZSAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgY2hpbGRJbXBvcnRzID0gdGhpcy5pbXBvcnRzQnlGaWxlW2ltcC5mdWxsUGF0aF07XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy8gQ29uc3RydWN0IGFuZCBhZGQgcmVzdWx0IHRvIGN1cnJlbnQgaW1wb3J0c1xyXG4gICAgICAgICAgICAgICAgY3VycmVudEltcG9ydCA9IHtcclxuICAgICAgICAgICAgICAgICAgICBmaWxlUGF0aDogaW1wLmZ1bGxQYXRoLFxyXG4gICAgICAgICAgICAgICAgICAgIGZvdW5kOiB0cnVlLFxyXG4gICAgICAgICAgICAgICAgICAgIGltcG9ydHM6IGNoaWxkSW1wb3J0c1xyXG4gICAgICAgICAgICAgICAgfTtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gVGFrZSBjb250ZW50VG9SZXBsYWNlIGZyb20gdGhlIGZpbGVSZWdpc3RyeVxyXG4gICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gdGhpcy5maWxlUmVnaXN0cnlbaW1wLmZ1bGxQYXRoXTtcclxuXHJcbiAgICAgICAgICAgIC8vIElmIHRoZSBjb250ZW50IGlzIG5vdCBmb3VuZFxyXG4gICAgICAgICAgICBpZiAoY29udGVudFRvUmVwbGFjZSA9PSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBJbmRpY2F0ZSB0aGlzIHdpdGggYSBjb21tZW50IGZvciBlYXNpZXIgZGVidWdnaW5nXHJcbiAgICAgICAgICAgICAgICBjb250ZW50VG9SZXBsYWNlID0gYC8qKiogSU1QT1JURUQgRklMRSBOT1QgRk9VTkQgKioqLyR7b3MuRU9MfSR7aW1wLmltcG9ydFN0cmluZ30vKioqIC0tLSAqKiovYDtcclxuICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgLy8gSWYgdXNlZEltcG9ydHMgZGljdGlvbmFyeSBpcyBkZWZpbmVkXHJcbiAgICAgICAgICAgIGlmIChzaG91bGRDaGVja0ZvckRlZHVwZXMgJiYgdGhpcy51c2VkSW1wb3J0cyAhPSBudWxsKSB7XHJcbiAgICAgICAgICAgICAgICAvLyBBbmQgY3VycmVudCBpbXBvcnQgcGF0aCBzaG91bGQgYmUgZGVkdXBlZCBhbmQgaXMgdXNlZCBhbHJlYWR5XHJcbiAgICAgICAgICAgICAgICBjb25zdCB0aW1lc1VzZWQgPSB0aGlzLnVzZWRJbXBvcnRzW2ltcC5mdWxsUGF0aF07XHJcbiAgICAgICAgICAgICAgICBpZiAoZGVkdXBlRmlsZXMuaW5kZXhPZihpbXAuZnVsbFBhdGgpICE9PSAtMSAmJlxyXG4gICAgICAgICAgICAgICAgICAgIHRpbWVzVXNlZCAhPSBudWxsICYmXHJcbiAgICAgICAgICAgICAgICAgICAgdGltZXNVc2VkID4gMSkge1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIFJlc2V0IGNvbnRlbnQgdG8gcmVwbGFjZSB0byBhbiBlbXB0eSBzdHJpbmcgdG8gc2tpcCBpdFxyXG4gICAgICAgICAgICAgICAgICAgIGNvbnRlbnRUb1JlcGxhY2UgPSBcIlwiO1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIEFuZCBpbmRpY2F0ZSB0aGF0IGltcG9ydCB3YXMgZGVkdXBlZFxyXG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRJbXBvcnQuZGVkdXBlZCA9IHRydWU7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgIC8vIEZpbmFsbHksIHJlcGxhY2UgaW1wb3J0IHN0cmluZyB3aXRoIGJ1bmRsZWQgY29udGVudCBvciBhIGRlYnVnIG1lc3NhZ2VcclxuICAgICAgICAgICAgY29udGVudCA9IGNvbnRlbnQucmVwbGFjZShpbXAuaW1wb3J0U3RyaW5nLCBjb250ZW50VG9SZXBsYWNlKTtcclxuXHJcbiAgICAgICAgICAgIC8vIEFuZCBwdXNoIGN1cnJlbnQgaW1wb3J0IGludG8gdGhlIGxpc3RcclxuICAgICAgICAgICAgY3VycmVudEltcG9ydHMucHVzaChjdXJyZW50SW1wb3J0KTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIC8vIFNldCByZXN1bHQgcHJvcGVydGllc1xyXG4gICAgICAgIGJ1bmRsZVJlc3VsdC5idW5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HJlbWFpbmluZ0luY2x1ZGVQYXRocyA9IGluY2x1ZGVQYXRocy5zbGljZSgxKTtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdGhpcy5yZXNvbHZlSW1wb3J0KGltcG9ydERhdGEsIHJlbWFpbmluZ0luY2x1ZGVQYXRocyk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIHJldHVybiBpbXBvcnREYXRhO1xyXG4gICAgfVxyXG5cclxuICAgIHByaXZhdGUgYXN5bmMgZ2xvYkZpbGVzT3JFbXB0eShnbG9ic0xpc3Q6IHN0cmluZ1tdKTogUHJvbWlzZTxzdHJpbmdbXT4ge1xyXG4gICAgICAgIHJldHVybiBuZXcgUHJvbWlzZTxzdHJpbmdbXT4oKHJlc29sdmUsIHJlamVjdCkgPT4ge1xyXG4gICAgICAgICAgICBpZiAoZ2xvYnNMaXN0ID09IG51bGwgfHwgZ2xvYnNMaXN0Lmxlbmd0aCA9PT0gMCkge1xyXG4gICAgICAgICAgICAgICAgcmVzb2x2ZShbXSk7XHJcbiAgICAgICAgICAgICAgICByZXR1cm47XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgZ2xvYnMoZ2xvYnNMaXN0LCAoZXJyOiBFcnJvciwgZmlsZXM6IHN0cmluZ1tdKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAvLyBSZWplY3QgaWYgdGhlcmUncyBhbiBlcnJvclxyXG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xyXG4gICAgICAgICAgICAgICAgICAgIHJlamVjdChlcnIpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIFJlc29sdmUgZnVsbCBwYXRoc1xyXG4gICAgICAgICAgICAgICAgY29uc3QgcmVzdWx0ID0gZmlsZXMubWFwKGZpbGUgPT4gcGF0aC5yZXNvbHZlKGZpbGUpKTtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBSZXNvbHZlIHByb21pc2VcclxuICAgICAgICAgICAgICAgIHJlc29sdmUocmVzdWx0KTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSk7XHJcbiAgICB9XHJcbn1cclxuIl19
{
"name": "scss-bundle",
"version": "2.1.2",
"version": "2.1.3",
"description": "Bundling SCSS files to one bundled file.",

@@ -5,0 +5,0 @@ "types": "@types/index.d.ts",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • 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