diff options
author | RaindropsSys <raindrops@equestria.dev> | 2023-10-24 17:43:37 +0200 |
---|---|---|
committer | RaindropsSys <raindrops@equestria.dev> | 2023-10-24 17:43:37 +0200 |
commit | ae187b6d75c8079da0be1dc288613bad8466fe61 (patch) | |
tree | 5ea0d34185a2270f29ffaa65e1f5258028d7d5d0 /desktop/node_modules/dir-compare/build/src | |
download | mist-ae187b6d75c8079da0be1dc288613bad8466fe61.tar.gz mist-ae187b6d75c8079da0be1dc288613bad8466fe61.tar.bz2 mist-ae187b6d75c8079da0be1dc288613bad8466fe61.zip |
Initial commit
Diffstat (limited to 'desktop/node_modules/dir-compare/build/src')
120 files changed, 2619 insertions, 0 deletions
diff --git a/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.d.ts b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.d.ts new file mode 100644 index 0000000..cdf33cb --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.d.ts @@ -0,0 +1,20 @@ +import { CompareFileHandler } from './types'; +export interface FileCompareHandlers { + /** + * Default file content comparison handlers, used if [[Options.compareFileAsync]] or [[Options.compareFileSync]] are not specified. + * + * Performs binary comparison. + */ + defaultFileCompare: CompareFileHandler; + /** + * Compares files line by line. + * + * Options: + * * ignoreLineEnding - true/false (default: false) - Ignore cr/lf line endings + * * ignoreWhiteSpaces - true/false (default: false) - Ignore white spaces at the beginning and ending of a line (similar to 'diff -b') + * * ignoreAllWhiteSpaces - true/false (default: false) - Ignore all white space differences (similar to 'diff -w') + * * ignoreEmptyLines - true/false (default: false) - Ignores differences caused by empty lines (similar to 'diff -B') + */ + lineBasedFileCompare: CompareFileHandler; +} +//# sourceMappingURL=FileCompareHandlers.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.d.ts.map b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.d.ts.map new file mode 100644 index 0000000..197397e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FileCompareHandlers.d.ts","sourceRoot":"","sources":["../../src/FileCompareHandlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C,MAAM,WAAW,mBAAmB;IAChC;;;;OAIG;IACH,kBAAkB,EAAE,kBAAkB,CAAC;IACvC;;;;;;;;OAQG;IACH,oBAAoB,EAAE,kBAAkB,CAAC;CAC5C"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.js b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.js new file mode 100644 index 0000000..66ae02d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=FileCompareHandlers.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.js.map b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.js.map new file mode 100644 index 0000000..737f305 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/FileCompareHandlers.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileCompareHandlers.js","sourceRoot":"","sources":["../../src/FileCompareHandlers.ts"],"names":[],"mappings":""}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareAsync.d.ts b/desktop/node_modules/dir-compare/build/src/compareAsync.d.ts new file mode 100644 index 0000000..d87ba9e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareAsync.d.ts @@ -0,0 +1,6 @@ +export = compare; +/** + * Compares two directories asynchronously. + */ +declare function compare(rootEntry1: any, rootEntry2: any, level: any, relativePath: any, options: any, statistics: any, diffSet: any, symlinkCache: any): any; +//# sourceMappingURL=compareAsync.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareAsync.d.ts.map b/desktop/node_modules/dir-compare/build/src/compareAsync.d.ts.map new file mode 100644 index 0000000..c80059e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareAsync.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareAsync.d.ts","sourceRoot":"","sources":["../../src/compareAsync.js"],"names":[],"mappings":";AA2BA;;GAEG;AACH,+JA2HC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareAsync.js b/desktop/node_modules/dir-compare/build/src/compareAsync.js new file mode 100644 index 0000000..8f3151b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareAsync.js @@ -0,0 +1,142 @@ +const entryBuilder = require('./entry/entryBuilder'); +const entryEquality = require('./entry/entryEquality'); +const stats = require('./statistics/statisticsUpdate'); +const pathUtils = require('path'); +const fsPromise = require('./fs/fsPromise'); +const loopDetector = require('./symlink/loopDetector'); +const entryComparator = require('./entry/entryComparator'); +const entryType = require('./entry/entryType'); +const { getPrmissionDenieStateWhenLeftMissing, getPrmissionDenieStateWhenRightMissing, getPermissionDeniedState } = require('./permissions/permissionDeniedState'); +/** + * Returns the sorted list of entries in a directory. + */ +function getEntries(rootEntry, relativePath, loopDetected, options) { + if (!rootEntry || loopDetected) { + return Promise.resolve([]); + } + if (rootEntry.isDirectory) { + if (rootEntry.isPermissionDenied) { + return []; + } + return fsPromise.readdir(rootEntry.absolutePath) + .then(entries => entryBuilder.buildDirEntries(rootEntry, entries, relativePath, options)); + } + return Promise.resolve([rootEntry]); +} +/** + * Compares two directories asynchronously. + */ +function compare(rootEntry1, rootEntry2, level, relativePath, options, statistics, diffSet, symlinkCache) { + const loopDetected1 = loopDetector.detectLoop(rootEntry1, symlinkCache.dir1); + const loopDetected2 = loopDetector.detectLoop(rootEntry2, symlinkCache.dir2); + loopDetector.updateSymlinkCache(symlinkCache, rootEntry1, rootEntry2, loopDetected1, loopDetected2); + return Promise.all([getEntries(rootEntry1, relativePath, loopDetected1, options), getEntries(rootEntry2, relativePath, loopDetected2, options)]) + .then(entriesResult => { + const entries1 = entriesResult[0]; + const entries2 = entriesResult[1]; + let i1 = 0, i2 = 0; + const comparePromises = []; + const compareFilePromises = []; + let subDiffSet; + while (i1 < entries1.length || i2 < entries2.length) { + const entry1 = entries1[i1]; + const entry2 = entries2[i2]; + let type1, type2; + // compare entry name (-1, 0, 1) + let cmp; + if (i1 < entries1.length && i2 < entries2.length) { + cmp = entryComparator.compareEntry(entry1, entry2, options); + type1 = entryType.getType(entry1); + type2 = entryType.getType(entry2); + } + else if (i1 < entries1.length) { + type1 = entryType.getType(entry1); + type2 = entryType.getType(undefined); + cmp = -1; + } + else { + type1 = entryType.getType(undefined); + type2 = entryType.getType(entry2); + cmp = 1; + } + // process entry + if (cmp === 0) { + // Both left/right exist and have the same name and type + const permissionDeniedState = getPermissionDeniedState(entry1, entry2); + if (permissionDeniedState === "access-ok") { + const compareEntryRes = entryEquality.isEntryEqualAsync(entry1, entry2, type1, diffSet, options); + const samePromise = compareEntryRes.samePromise; + const same = compareEntryRes.same; + if (same !== undefined) { + options.resultBuilder(entry1, entry2, same ? 'equal' : 'distinct', level, relativePath, options, statistics, diffSet, compareEntryRes.reason, permissionDeniedState); + stats.updateStatisticsBoth(entry1, entry2, compareEntryRes.same, compareEntryRes.reason, type1, permissionDeniedState, statistics, options); + } + else { + compareFilePromises.push(samePromise); + } + } + else { + const state = 'distinct'; + const reason = "permission-denied"; + const same = false; + options.resultBuilder(entry1, entry2, state, level, relativePath, options, statistics, diffSet, reason, permissionDeniedState); + stats.updateStatisticsBoth(entry1, entry2, same, reason, type1, permissionDeniedState, statistics, options); + } + i1++; + i2++; + if (!options.skipSubdirs && type1 === 'directory') { + if (!options.noDiffSet) { + subDiffSet = []; + diffSet.push(subDiffSet); + } + comparePromises.push(compare(entry1, entry2, level + 1, pathUtils.join(relativePath, entry1.name), options, statistics, subDiffSet, loopDetector.cloneSymlinkCache(symlinkCache))); + } + } + else if (cmp < 0) { + // Right missing + const permissionDeniedState = getPrmissionDenieStateWhenRightMissing(entry1); + options.resultBuilder(entry1, undefined, 'left', level, relativePath, options, statistics, diffSet, undefined, permissionDeniedState); + stats.updateStatisticsLeft(entry1, type1, permissionDeniedState, statistics, options); + i1++; + if (type1 === 'directory' && !options.skipSubdirs) { + if (!options.noDiffSet) { + subDiffSet = []; + diffSet.push(subDiffSet); + } + comparePromises.push(compare(entry1, undefined, level + 1, pathUtils.join(relativePath, entry1.name), options, statistics, subDiffSet, loopDetector.cloneSymlinkCache(symlinkCache))); + } + } + else { + // Left missing + let permissionDeniedState = getPrmissionDenieStateWhenLeftMissing(entry2); + options.resultBuilder(undefined, entry2, 'right', level, relativePath, options, statistics, diffSet, undefined, permissionDeniedState); + stats.updateStatisticsRight(entry2, type2, permissionDeniedState, statistics, options); + i2++; + if (type2 === 'directory' && !options.skipSubdirs) { + if (!options.noDiffSet) { + subDiffSet = []; + diffSet.push(subDiffSet); + } + comparePromises.push(compare(undefined, entry2, level + 1, pathUtils.join(relativePath, entry2.name), options, statistics, subDiffSet, loopDetector.cloneSymlinkCache(symlinkCache))); + } + } + } + return Promise.all(comparePromises) + .then(() => Promise.all(compareFilePromises) + .then(sameResults => { + for (let i = 0; i < sameResults.length; i++) { + const sameResult = sameResults[i]; + if (sameResult.error) { + return Promise.reject(sameResult.error); + } + else { + const permissionDeniedState = "access-ok"; + options.resultBuilder(sameResult.entry1, sameResult.entry2, sameResult.same ? 'equal' : 'distinct', level, relativePath, options, statistics, sameResult.diffSet, sameResult.reason, permissionDeniedState); + stats.updateStatisticsBoth(sameResult.entries1, sameResult.entries2, sameResult.same, sameResult.reason, sameResult.type1, permissionDeniedState, statistics, options); + } + } + })); + }); +} +module.exports = compare; +//# sourceMappingURL=compareAsync.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareAsync.js.map b/desktop/node_modules/dir-compare/build/src/compareAsync.js.map new file mode 100644 index 0000000..c48d298 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareAsync.js.map @@ -0,0 +1 @@ +{"version":3,"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AC,IAAI,EAChF,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,KAAK,EAAE,qBAAqB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAA;iBACvF;aACJ;QACL,CAAC,CAAC,CAAC,CAAA;IACf,CAAC,CAAC,CAAA;AACV,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareSync.d.ts b/desktop/node_modules/dir-compare/build/src/compareSync.d.ts new file mode 100644 index 0000000..83ab0cd --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareSync.d.ts @@ -0,0 +1,6 @@ +export = compare; +/** + * Compares two directories synchronously. + */ +declare function compare(rootEntry1: any, rootEntry2: any, level: any, relativePath: any, options: any, statistics: any, diffSet: any, symlinkCache: any): void; +//# sourceMappingURL=compareSync.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareSync.d.ts.map b/desktop/node_modules/dir-compare/build/src/compareSync.d.ts.map new file mode 100644 index 0000000..3232e17 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareSync.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareSync.d.ts","sourceRoot":"","sources":["../../src/compareSync.js"],"names":[],"mappings":";AA2BA;;GAEG;AACH,gKA0EC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareSync.js b/desktop/node_modules/dir-compare/build/src/compareSync.js new file mode 100644 index 0000000..7599c70 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareSync.js @@ -0,0 +1,104 @@ +const fs = require('fs'); +const pathUtils = require('path'); +const entryBuilder = require('./entry/entryBuilder'); +const entryEquality = require('./entry/entryEquality'); +const stats = require('./statistics/statisticsUpdate'); +const loopDetector = require('./symlink/loopDetector'); +const entryComparator = require('./entry/entryComparator'); +const entryType = require('./entry/entryType'); +const { getPrmissionDenieStateWhenLeftMissing, getPrmissionDenieStateWhenRightMissing, getPermissionDeniedState } = require('./permissions/permissionDeniedState'); +/** + * Returns the sorted list of entries in a directory. + */ +function getEntries(rootEntry, relativePath, loopDetected, options) { + if (!rootEntry || loopDetected) { + return []; + } + if (rootEntry.isDirectory) { + if (rootEntry.isPermissionDenied) { + return []; + } + const entries = fs.readdirSync(rootEntry.absolutePath); + return entryBuilder.buildDirEntries(rootEntry, entries, relativePath, options); + } + return [rootEntry]; +} +/** + * Compares two directories synchronously. + */ +function compare(rootEntry1, rootEntry2, level, relativePath, options, statistics, diffSet, symlinkCache) { + const loopDetected1 = loopDetector.detectLoop(rootEntry1, symlinkCache.dir1); + const loopDetected2 = loopDetector.detectLoop(rootEntry2, symlinkCache.dir2); + loopDetector.updateSymlinkCache(symlinkCache, rootEntry1, rootEntry2, loopDetected1, loopDetected2); + const entries1 = getEntries(rootEntry1, relativePath, loopDetected1, options); + const entries2 = getEntries(rootEntry2, relativePath, loopDetected2, options); + let i1 = 0, i2 = 0; + while (i1 < entries1.length || i2 < entries2.length) { + const entry1 = entries1[i1]; + const entry2 = entries2[i2]; + let type1, type2; + // compare entry name (-1, 0, 1) + let cmp; + if (i1 < entries1.length && i2 < entries2.length) { + cmp = entryComparator.compareEntry(entry1, entry2, options); + type1 = entryType.getType(entry1); + type2 = entryType.getType(entry2); + } + else if (i1 < entries1.length) { + type1 = entryType.getType(entry1); + type2 = entryType.getType(undefined); + cmp = -1; + } + else { + type1 = entryType.getType(undefined); + type2 = entryType.getType(entry2); + cmp = 1; + } + // process entry + if (cmp === 0) { + // Both left/right exist and have the same name and type + let same, reason, state; + const permissionDeniedState = getPermissionDeniedState(entry1, entry2); + if (permissionDeniedState === "access-ok") { + const compareEntryRes = entryEquality.isEntryEqualSync(entry1, entry2, type1, options); + state = compareEntryRes.same ? 'equal' : 'distinct'; + same = compareEntryRes.same; + reason = compareEntryRes.reason; + } + else { + state = 'distinct'; + same = false; + reason = "permission-denied"; + } + options.resultBuilder(entry1, entry2, state, level, relativePath, options, statistics, diffSet, reason, permissionDeniedState); + stats.updateStatisticsBoth(entry1, entry2, same, reason, type1, permissionDeniedState, statistics, options); + i1++; + i2++; + if (!options.skipSubdirs && type1 === 'directory') { + compare(entry1, entry2, level + 1, pathUtils.join(relativePath, entry1.name), options, statistics, diffSet, loopDetector.cloneSymlinkCache(symlinkCache)); + } + } + else if (cmp < 0) { + // Right missing + const permissionDeniedState = getPrmissionDenieStateWhenRightMissing(entry1); + options.resultBuilder(entry1, undefined, 'left', level, relativePath, options, statistics, diffSet, undefined, permissionDeniedState); + stats.updateStatisticsLeft(entry1, type1, permissionDeniedState, statistics, options); + i1++; + if (type1 === 'directory' && !options.skipSubdirs) { + compare(entry1, undefined, level + 1, pathUtils.join(relativePath, entry1.name), options, statistics, diffSet, loopDetector.cloneSymlinkCache(symlinkCache)); + } + } + else { + // Left missing + let permissionDeniedState = getPrmissionDenieStateWhenLeftMissing(entry2); + options.resultBuilder(undefined, entry2, "right", level, relativePath, options, statistics, diffSet, undefined, permissionDeniedState); + stats.updateStatisticsRight(entry2, type2, permissionDeniedState, statistics, options); + i2++; + if (type2 === 'directory' && !options.skipSubdirs) { + compare(undefined, entry2, level + 1, pathUtils.join(relativePath, entry2.name), options, statistics, diffSet, loopDetector.cloneSymlinkCache(symlinkCache)); + } + } + } +} +module.exports = compare; +//# sourceMappingURL=compareSync.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/compareSync.js.map b/desktop/node_modules/dir-compare/build/src/compareSync.js.map new file mode 100644 index 0000000..e6bb56b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/compareSync.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compareSync.js","sourceRoot":"","sources":["../../src/compareSync.js"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AACxB,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AACjC,MAAM,YAAY,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAAA;AACpD,M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I,CAAC,YAAY,EAAE,MAAM,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC,CAAA;aAC/J;SACJ;KACJ;AACL,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,OAAO,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.d.ts b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.d.ts new file mode 100644 index 0000000..4782009 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.d.ts @@ -0,0 +1,53 @@ +/// <reference types="node" /> +import fs = require("fs"); +/** + * Returns the sorted list of entries in a directory. + */ +export function buildDirEntries(rootEntry: any, dirEntries: any, relativePath: any, options: any): { + name: any; + absolutePath: any; + path: any; + stat: fs.Stats; + lstat: fs.Stats; + isSymlink: boolean; + isBrokenLink: boolean; + isDirectory: boolean; + isPermissionDenied: boolean; +}[]; +/** + * Returns the sorted list of entries in a directory. + */ +export function buildDirEntries(rootEntry: any, dirEntries: any, relativePath: any, options: any): { + name: any; + absolutePath: any; + path: any; + stat: fs.Stats; + lstat: fs.Stats; + isSymlink: boolean; + isBrokenLink: boolean; + isDirectory: boolean; + isPermissionDenied: boolean; +}[]; +export function buildEntry(absolutePath: any, path: any, name: any, options: any): { + name: any; + absolutePath: any; + path: any; + stat: fs.Stats; + lstat: fs.Stats; + isSymlink: boolean; + isBrokenLink: boolean; + isDirectory: boolean; + isPermissionDenied: boolean; +}; +export function buildEntry(absolutePath: any, path: any, name: any, options: any): { + name: any; + absolutePath: any; + path: any; + stat: fs.Stats; + lstat: fs.Stats; + isSymlink: boolean; + isBrokenLink: boolean; + isDirectory: boolean; + isPermissionDenied: boolean; +}; +//# sourceMappingURL=entryBuilder.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.d.ts.map b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.d.ts.map new file mode 100644 index 0000000..b7b559c --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"entryBuilder.d.ts","sourceRoot":"","sources":["../../../src/entry/entryBuilder.js"],"names":[],"mappings":";;AAQC;;GAEG;AACH;;;;;;;;;;IAiBC;AApBD;;GAEG;AACH;;;;;;;;;;IAiBC;AAED;;;;;;;;;;EAqBC;AArBD;;;;;;;;;;EAqBC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.js b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.js new file mode 100644 index 0000000..781ac4c --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.js @@ -0,0 +1,114 @@ +const fs = require('fs'); +const minimatch = require('minimatch'); +const pathUtils = require('path'); +const entryComparator = require('./entryComparator'); +const PATH_SEP = pathUtils.sep; +module.exports = { + /** + * Returns the sorted list of entries in a directory. + */ + buildDirEntries(rootEntry, dirEntries, relativePath, options) { + const res = []; + for (let i = 0; i < dirEntries.length; i++) { + const entryName = dirEntries[i]; + const entryAbsolutePath = rootEntry.absolutePath + PATH_SEP + entryName; + const entryPath = rootEntry.path + PATH_SEP + entryName; + const entry = this.buildEntry(entryAbsolutePath, entryPath, entryName, options); + if (options.skipSymlinks && entry.isSymlink) { + entry.stat = undefined; + } + if (filterEntry(entry, relativePath, options)) { + res.push(entry); + } + } + return res.sort((a, b) => entryComparator.compareEntry(a, b, options)); + }, + buildEntry(absolutePath, path, name, options) { + const stats = getStatIgnoreBrokenLink(absolutePath); + const isDirectory = stats.stat.isDirectory(); + let isPermissionDenied = false; + if (options.handlePermissionDenied) { + const isFile = !isDirectory; + isPermissionDenied = hasPermissionDenied(absolutePath, isFile, options); + } + return { + name: name, + absolutePath: absolutePath, + path: path, + stat: stats.stat, + lstat: stats.lstat, + isSymlink: stats.lstat.isSymbolicLink(), + isBrokenLink: stats.isBrokenLink, + isDirectory, + isPermissionDenied + }; + }, +}; +function hasPermissionDenied(absolutePath, isFile, options) { + if (isFile && !options.compareContent) { + return false; + } + try { + fs.accessSync(absolutePath, fs.constants.R_OK); + return false; + } + catch (_a) { + return true; + } +} +function getStatIgnoreBrokenLink(absolutePath) { + const lstat = fs.lstatSync(absolutePath); + try { + return { + stat: fs.statSync(absolutePath), + lstat: lstat, + isBrokenLink: false + }; + } + catch (error) { + if (error.code === 'ENOENT') { + return { + stat: lstat, + lstat: lstat, + isBrokenLink: true + }; + } + throw error; + } +} +/** + * Filter entries by file name. Returns true if the file is to be processed. + */ +function filterEntry(entry, relativePath, options) { + if (entry.isSymlink && options.skipSymlinks) { + return false; + } + const path = pathUtils.join(relativePath, entry.name); + if (options.skipEmptyDirs && entry.stat.isDirectory() && isEmptyDir(entry.absolutePath)) { + return false; + } + if ((entry.stat.isFile() && options.includeFilter) && (!match(path, options.includeFilter))) { + return false; + } + if ((options.excludeFilter) && (match(path, options.excludeFilter))) { + return false; + } + return true; +} +function isEmptyDir(path) { + return fs.readdirSync(path).length === 0; +} +/** + * Matches path by pattern. + */ +function match(path, pattern) { + const patternArray = pattern.split(','); + for (let i = 0; i < patternArray.length; i++) { + const pat = patternArray[i]; + if (minimatch(path, pat, { dot: true, matchBase: true })) { //nocase + return true; + } + } + return false; +} +//# sourceMappingURL=entryBuilder.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.js.map b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.js.map new file mode 100644 index 0000000..e5decbf --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryBuilder.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entryBuilder.js","sourceRoot":"","sources":["../../../src/entry/entryBuilder.js"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AACxB,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;AACtC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,CAAC,CAAC,CAAC,CAAA;QAC3B,IAAI,SAAS,CAAC,IAAI,EAAE,GAAG,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,EAAE,EAAE,QAAQ;YACnE,OAAO,IAAI,CAAA;SACX;KACD;IACD,OAAO,KAAK,CAAA;AACb,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryComparator.d.ts b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.d.ts new file mode 100644 index 0000000..45a46c5 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.d.ts @@ -0,0 +1,3 @@ +export function compareEntry(a: any, b: any, options: any): any; +export function compareEntry(a: any, b: any, options: any): any; +//# sourceMappingURL=entryComparator.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryComparator.d.ts.map b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.d.ts.map new file mode 100644 index 0000000..464d112 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"entryComparator.d.ts","sourceRoot":"","sources":["../../../src/entry/entryComparator.js"],"names":[],"mappings":"AAIC,gEAcC;AAdD,gEAcC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryComparator.js b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.js new file mode 100644 index 0000000..58d0cb3 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.js @@ -0,0 +1,26 @@ +/** + * Determines order criteria for sorting entries in a directory. + */ +module.exports = { + compareEntry(a, b, options) { + if (a.isBrokenLink && b.isBrokenLink) { + return options.compareNameHandler(a.name, b.name, options); + } + else if (a.isBrokenLink) { + return -1; + } + else if (b.isBrokenLink) { + return 1; + } + else if (a.stat.isDirectory() && b.stat.isFile()) { + return -1; + } + else if (a.stat.isFile() && b.stat.isDirectory()) { + return 1; + } + else { + return options.compareNameHandler(a.name, b.name, options); + } + } +}; +//# sourceMappingURL=entryComparator.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryComparator.js.map b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.js.map new file mode 100644 index 0000000..74c5d50 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryComparator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entryComparator.js","sourceRoot":"","sources":["../../../src/entry/entryComparator.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IAChB,YAAY,CAAE,CAAC,EAAE,CAAC,EAAE,OAAO;QAC1B,IAAI,CAAC,CAAC,YAAY,IAAI,CAAC,CAAC,YAAY,EAAE;YACrC,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;SAC1D;aAAM,IAAI,CAAC,CAAC,YAAY,EAAE;YAC1B,OAAO,CAAC,CAAC,CAAA;SACT;aAAM,IAAI,CAAC,CAAC,YAAY,EAAE;YAC1B,OAAO,CAAC,CAAA;SACR;aAAM,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE;YACnD,OAAO,CAAC,CAAC,CAAA;SACT;aAAM,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE;YACnD,OAAO,CAAC,CAAA;SACR;aAAM;YACN,OAAO,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;SAC1D;IACF,CAAC;CACD,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryEquality.d.ts b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.d.ts new file mode 100644 index 0000000..8c5ff18 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.d.ts @@ -0,0 +1,37 @@ +export function isEntryEqualSync(entry1: any, entry2: any, type: any, options: any): { + same: boolean; + reason: string; +} | { + same: boolean; + reason?: undefined; +}; +export function isEntryEqualSync(entry1: any, entry2: any, type: any, options: any): { + same: boolean; + reason: string; +} | { + same: boolean; + reason?: undefined; +}; +export function isEntryEqualAsync(entry1: any, entry2: any, type: any, diffSet: any, options: any): { + same: undefined; + samePromise: any; + reason?: undefined; +} | { + same: boolean; + reason: string; +} | { + same: boolean; + reason?: undefined; +}; +export function isEntryEqualAsync(entry1: any, entry2: any, type: any, diffSet: any, options: any): { + same: undefined; + samePromise: any; + reason?: undefined; +} | { + same: boolean; + reason: string; +} | { + same: boolean; + reason?: undefined; +}; +//# sourceMappingURL=entryEquality.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryEquality.d.ts.map b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.d.ts.map new file mode 100644 index 0000000..a2d59e8 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"entryEquality.d.ts","sourceRoot":"","sources":["../../../src/entry/entryEquality.js"],"names":[],"mappings":"AAKI;;;;;;EAWC;AAXD;;;;;;EAWC;AAED;;;;;;;;;;EAWC;AAXD;;;;;;;;;;EAWC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryEquality.js b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.js new file mode 100644 index 0000000..481ec0d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.js @@ -0,0 +1,121 @@ +const fs = require('fs'); +/** + * Compares two entries with identical name and type. + */ +module.exports = { + isEntryEqualSync(entry1, entry2, type, options) { + if (type === 'file') { + return isFileEqualSync(entry1, entry2, options); + } + if (type === 'directory') { + return isDirectoryEqual(entry1, entry2, options); + } + if (type === 'broken-link') { + return isBrokenLinkEqual(); + } + throw new Error('Unexpected type ' + type); + }, + isEntryEqualAsync(entry1, entry2, type, diffSet, options) { + if (type === 'file') { + return isFileEqualAsync(entry1, entry2, type, diffSet, options); + } + if (type === 'directory') { + return isDirectoryEqual(entry1, entry2, options); + } + if (type === 'broken-link') { + return isBrokenLinkEqual(); + } + throw new Error('Unexpected type ' + type); + } +}; +function isFileEqualSync(entry1, entry2, options) { + const p1 = entry1 ? entry1.absolutePath : undefined; + const p2 = entry2 ? entry2.absolutePath : undefined; + if (options.compareSymlink && !isSymlinkEqual(entry1, entry2)) { + return { same: false, reason: 'different-symlink' }; + } + if (options.compareSize && entry1.stat.size !== entry2.stat.size) { + return { same: false, reason: 'different-size' }; + } + if (options.compareDate && !isDateEqual(entry1.stat.mtime, entry2.stat.mtime, options.dateTolerance)) { + return { same: false, reason: 'different-date' }; + } + if (options.compareContent && !options.compareFileSync(p1, entry1.stat, p2, entry2.stat, options)) { + return { same: false, reason: 'different-content' }; + } + return { same: true }; +} +function isFileEqualAsync(entry1, entry2, type, diffSet, options) { + const p1 = entry1 ? entry1.absolutePath : undefined; + const p2 = entry2 ? entry2.absolutePath : undefined; + if (options.compareSymlink && !isSymlinkEqual(entry1, entry2)) { + return { same: false, reason: 'different-symlink' }; + } + if (options.compareSize && entry1.stat.size !== entry2.stat.size) { + return { same: false, samePromise: undefined, reason: 'different-size' }; + } + if (options.compareDate && !isDateEqual(entry1.stat.mtime, entry2.stat.mtime, options.dateTolerance)) { + return { same: false, samePromise: undefined, reason: 'different-date' }; + } + if (options.compareContent) { + let samePromise = undefined; + let subDiffSet; + if (!options.noDiffSet) { + subDiffSet = []; + diffSet.push(subDiffSet); + } + samePromise = options.compareFileAsync(p1, entry1.stat, p2, entry2.stat, options) + .then((comparisonResult) => { + let same, error; + if (typeof (comparisonResult) === "boolean") { + same = comparisonResult; + } + else { + error = comparisonResult; + } + return { + entry1: entry1, entry2: entry2, same: same, + error: error, type1: type, type2: type, + diffSet: subDiffSet, + reason: same ? undefined : 'different-content' + }; + }) + .catch((error) => ({ + error: error + })); + return { same: undefined, samePromise: samePromise }; + } + return { same: true, samePromise: undefined }; +} +function isDirectoryEqual(entry1, entry2, options) { + if (options.compareSymlink && !isSymlinkEqual(entry1, entry2)) { + return { same: false, reason: 'different-symlink' }; + } + return { same: true }; +} +function isBrokenLinkEqual() { + return { same: false, reason: 'broken-link' }; // broken links are never considered equal +} +/** + * Compares two dates and returns true/false depending on tolerance (milliseconds). + * Two dates are considered equal if the difference in milliseconds between them is less or equal than tolerance. + */ +function isDateEqual(date1, date2, tolerance) { + return Math.abs(date1.getTime() - date2.getTime()) <= tolerance ? true : false; +} +/** + * Compares two entries for symlink equality. + */ +function isSymlinkEqual(entry1, entry2) { + if (!entry1.isSymlink && !entry2.isSymlink) { + return true; + } + if (entry1.isSymlink && entry2.isSymlink && hasIdenticalLink(entry1.absolutePath, entry2.absolutePath)) { + return true; + } + return false; +} +function hasIdenticalLink(path1, path2) { + return fs.readlinkSync(path1) === fs.readlinkSync(path2); +} +//# sourceMappingURL=entryEquality.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryEquality.js.map b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.js.map new file mode 100644 index 0000000..e5b58a2 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryEquality.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entryEquality.js","sourceRoot":"","sources":["../../../src/entry/entryEquality.js"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AACxB;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACb,gBAAgB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO;QAC1C,IAAI,IAAI,KAAK,MAAM,EAAE;YACjB,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAA;SAClD;QACD,I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AK;IAClC,OAAO,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;AAC5D,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryType.d.ts b/desktop/node_modules/dir-compare/build/src/entry/entryType.d.ts new file mode 100644 index 0000000..98570b7 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryType.d.ts @@ -0,0 +1,9 @@ +/** + * One of 'missing','file','directory','broken-link' + */ +export function getType(entry: any): "file" | "broken-link" | "missing" | "directory"; +/** + * One of 'missing','file','directory','broken-link' + */ +export function getType(entry: any): "file" | "broken-link" | "missing" | "directory"; +//# sourceMappingURL=entryType.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryType.d.ts.map b/desktop/node_modules/dir-compare/build/src/entry/entryType.d.ts.map new file mode 100644 index 0000000..9d5b26b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryType.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"entryType.d.ts","sourceRoot":"","sources":["../../../src/entry/entryType.js"],"names":[],"mappings":"AAEC;;GAEG;AACH,sFAWC;AAdD;;GAEG;AACH,sFAWC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryType.js b/desktop/node_modules/dir-compare/build/src/entry/entryType.js new file mode 100644 index 0000000..a9a3afa --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryType.js @@ -0,0 +1,18 @@ +module.exports = { + /** + * One of 'missing','file','directory','broken-link' + */ + getType(entry) { + if (!entry) { + return 'missing'; + } + if (entry.isBrokenLink) { + return 'broken-link'; + } + if (entry.isDirectory) { + return 'directory'; + } + return 'file'; + } +}; +//# sourceMappingURL=entryType.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/entry/entryType.js.map b/desktop/node_modules/dir-compare/build/src/entry/entryType.js.map new file mode 100644 index 0000000..5648e78 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/entry/entryType.js.map @@ -0,0 +1 @@ +{"version":3,"file":"entryType.js","sourceRoot":"","sources":["../../../src/entry/entryType.js"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,GAAG;IAChB;;OAEG;IACH,OAAO,CAAE,KAAK;QACb,IAAI,CAAC,KAAK,EAAE;YACX,OAAO,SAAS,CAAA;SAChB;QACD,IAAI,KAAK,CAAC,YAAY,EAAE;YACvB,OAAO,aAAa,CAAA;SACpB;QACD,IAAI,KAAK,CAAC,WAAW,EAAE;YACtB,OAAO,WAAW,CAAA;SAClB;QACD,OAAO,MAAM,CAAA;IACd,CAAC;CACD,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.d.ts new file mode 100644 index 0000000..2aed22e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.d.ts @@ -0,0 +1,3 @@ +import { CompareFileHandler } from '../../types'; +export declare const defaultFileCompare: CompareFileHandler; +//# sourceMappingURL=defaultFileCompare.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.d.ts.map new file mode 100644 index 0000000..0725543 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultFileCompare.d.ts","sourceRoot":"","sources":["../../../../src/fileCompareHandler/default/defaultFileCompare.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAOhD,eAAO,MAAM,kBAAkB,EAAE,kBA+EhC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.js new file mode 100644 index 0000000..50ee858 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.js @@ -0,0 +1,118 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.defaultFileCompare = void 0; +const fs_1 = __importDefault(require("fs")); +const buffer_equal_1 = __importDefault(require("buffer-equal")); +const FileDescriptorQueue_1 = require("../../fs/FileDescriptorQueue"); +const fsPromise_1 = __importDefault(require("../../fs/fsPromise")); +const BufferPool_1 = require("../../fs/BufferPool"); +const closeFile_1 = __importDefault(require("../../fs/closeFile")); +const MAX_CONCURRENT_FILE_COMPARE = 8; +const BUF_SIZE = 100000; +const fdQueue = new FileDescriptorQueue_1.FileDescriptorQueue(MAX_CONCURRENT_FILE_COMPARE * 2); +const bufferPool = new BufferPool_1.BufferPool(BUF_SIZE, MAX_CONCURRENT_FILE_COMPARE); // fdQueue guarantees there will be no more than MAX_CONCURRENT_FILE_COMPARE async processes accessing the buffers concurrently +exports.defaultFileCompare = { + /** + * Compares two files by content. + */ + compareSync(path1, stat1, path2, stat2, options) { + let fd1; + let fd2; + if (stat1.size !== stat2.size) { + return false; + } + const bufferPair = bufferPool.allocateBuffers(); + try { + fd1 = fs_1.default.openSync(path1, 'r'); + fd2 = fs_1.default.openSync(path2, 'r'); + const buf1 = bufferPair.buf1; + const buf2 = bufferPair.buf2; + for (;;) { + const size1 = fs_1.default.readSync(fd1, buf1, 0, BUF_SIZE, null); + const size2 = fs_1.default.readSync(fd2, buf2, 0, BUF_SIZE, null); + if (size1 !== size2) { + return false; + } + else if (size1 === 0) { + // End of file reached + return true; + } + else if (!compareBuffers(buf1, buf2, size1)) { + return false; + } + } + } + finally { + closeFile_1.default.closeFilesSync(fd1, fd2); + bufferPool.freeBuffers(bufferPair); + } + }, + /** + * Compares two files by content + */ + compareAsync(path1, stat1, path2, stat2, options) { + return __awaiter(this, void 0, void 0, function* () { + let fd1; + let fd2; + let bufferPair; + if (stat1.size !== stat2.size) { + return Promise.resolve(false); + } + return Promise.all([fdQueue.openPromise(path1, 'r'), fdQueue.openPromise(path2, 'r')]) + .then(fds => { + bufferPair = bufferPool.allocateBuffers(); + fd1 = fds[0]; + fd2 = fds[1]; + const buf1 = bufferPair.buf1; + const buf2 = bufferPair.buf2; + const compareAsyncInternal = () => Promise.all([ + fsPromise_1.default.read(fd1, buf1, 0, BUF_SIZE, null), + fsPromise_1.default.read(fd2, buf2, 0, BUF_SIZE, null) + ]) + .then((bufferSizes) => { + const size1 = bufferSizes[0]; + const size2 = bufferSizes[1]; + if (size1 !== size2) { + return false; + } + else if (size1 === 0) { + // End of file reached + return true; + } + else if (!compareBuffers(buf1, buf2, size1)) { + return false; + } + else { + return compareAsyncInternal(); + } + }); + return compareAsyncInternal(); + }) + .then( + // 'finally' polyfill for node 8 and below + res => finalizeAsync(fd1, fd2, bufferPair).then(() => res), err => finalizeAsync(fd1, fd2, bufferPair).then(() => { throw err; })); + }); + } +}; +function compareBuffers(buf1, buf2, contentSize) { + return buffer_equal_1.default(buf1.slice(0, contentSize), buf2.slice(0, contentSize)); +} +function finalizeAsync(fd1, fd2, bufferPair) { + if (bufferPair) { + bufferPool.freeBuffers(bufferPair); + } + return closeFile_1.default.closeFilesAsync(fd1, fd2, fdQueue); +} +//# sourceMappingURL=defaultFileCompare.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.js.map new file mode 100644 index 0000000..5831652 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/default/defaultFileCompare.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultFileCompare.js","sourceRoot":"","sources":["../../../../src/fileCompareHandler/default/defaultFileCompare.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,4CAAmB;AACnB,gEAAsC;AACtC,sEAAkE;AAClE,mEAA0C;AAC1C,oDAA4D;AAC5D,mEAA0C;AAI1C,MAAM,2BAA2B,GAAG,CAAC,CAAA;AACrC,MAAM,QAAQ,GAAG,MAAM,CAAA;AACvB,MAAM,OAAO,GAAG,IAAI,yCAAmB,CAAC,2BAA2B,GAAG,CAAC,CAAC,CAAA;AACxE,MAAM,UAAU,GAAG,IAAI,uBAAU,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAA,CAAE,+HAA+H;AAE5L,QAAA,kBAAkB,GAAuB;IAClD;;OAEG;IACH,WAAW,CAAC,KAAa,EAAE,KAAe,EAAE,KAAa,EAAE,KAAe,EAAE,OAAgB;QACxF,IAAI,GAAuB,CAAA;QAC3B,IAAI,GAAuB,CAAA;QAC3B,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,EAAE;YAC3B,OAAO,KAAK,CAAA;SACf;QACD,MAAM,UAAU,GAAG,UAAU,CAAC,eAAe,EAAE,CAAA;QAC/C,IAAI;YACA,GAAG,GAAG,YAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;YAC7B,GAAG,GAAG,YAAE,CAAC,QAAQ,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;YAC7B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAA;YAC5B,MAAM,IA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AI,CAAC,GAAG,EAAE,GAAG,MAAM,GAAG,CAAA,CAAC,CAAC,CAAC,CACvE,CAAA;QACT,CAAC;KAAA;CAEJ,CAAA;AAGD,SAAS,cAAc,CAAC,IAAY,EAAE,IAAY,EAAE,WAAmB;IACnE,OAAO,sBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC,CAAA;AAC9E,CAAC;AAED,SAAS,aAAa,CAAC,GAAY,EAAE,GAAY,EAAE,UAAuB;IACtE,IAAI,UAAU,EAAE;QACZ,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,CAAA;KACrC;IACD,OAAO,mBAAS,CAAC,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,CAAC,CAAA;AACvD,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.d.ts new file mode 100644 index 0000000..9f3985b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.d.ts @@ -0,0 +1,36 @@ +import { BufferPair } from '../../fs/BufferPool'; +interface RestPair { + rest1: string; + rest2: string; +} +interface RestLines { + restLines1: string[]; + restLines2: string[]; +} +export declare class LineBasedCompareContext { + /** + * File to compare. + */ + fd1: number; + /** + * File to compare. + */ + fd2: number; + /** + * Buffers used as temporary storage. + */ + buffer: BufferPair; + /** + * Part of a line that was split at buffer boundary in a previous read. + * Will be prefixed to the next read. + */ + rest: RestPair; + /** + * Lines that remain unprocessed from a previous read. + * Will be prefixed to the next read. + */ + restLines: RestLines; + constructor(fd1: number, fd2: number, bufferPair: BufferPair); +} +export {}; +//# sourceMappingURL=LineBasedCompareContext.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.d.ts.map new file mode 100644 index 0000000..61af3b3 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LineBasedCompareContext.d.ts","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/LineBasedCompareContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAEhD,UAAU,QAAQ;IACd,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;CAChB;AAED,UAAU,SAAS;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,qBAAa,uBAAuB;IAChC;;OAEG;IACI,GAAG,EAAE,MAAM,CAAA;IAClB;;OAEG;IACI,GAAG,EAAE,MAAM,CAAA;IAClB;;OAEG;IACI,MAAM,EAAE,UAAU,CAAA;IACzB;;;OAGG;IACI,IAAI,EAAE,QAAQ,CAAyB;IAC9C;;;OAGG;IACI,SAAS,EAAE,SAAS,CAAmC;gBAElD,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,UAAU;CAK/D"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.js new file mode 100644 index 0000000..4ed51ef --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.js @@ -0,0 +1,22 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.LineBasedCompareContext = void 0; +class LineBasedCompareContext { + constructor(fd1, fd2, bufferPair) { + /** + * Part of a line that was split at buffer boundary in a previous read. + * Will be prefixed to the next read. + */ + this.rest = { rest1: '', rest2: '' }; + /** + * Lines that remain unprocessed from a previous read. + * Will be prefixed to the next read. + */ + this.restLines = { restLines1: [], restLines2: [] }; + this.fd1 = fd1; + this.fd2 = fd2; + this.buffer = bufferPair; + } +} +exports.LineBasedCompareContext = LineBasedCompareContext; +//# sourceMappingURL=LineBasedCompareContext.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.js.map new file mode 100644 index 0000000..1f2954d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/LineBasedCompareContext.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LineBasedCompareContext.js","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/LineBasedCompareContext.ts"],"names":[],"mappings":";;;AAYA,MAAa,uBAAuB;IAwBhC,YAAY,GAAW,EAAE,GAAW,EAAE,UAAsB;QAX5D;;;WAGG;QACI,SAAI,GAAa,EAAC,KAAK,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAC,CAAA;QAC9C;;;WAGG;QACI,cAAS,GAAc,EAAC,UAAU,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAC,CAAA;QAG1D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,GAAG,GAAG,GAAG,CAAA;QACd,IAAI,CAAC,MAAM,GAAG,UAAU,CAAA;IAC5B,CAAC;CACJ;AA7BD,0DA6BC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.d.ts new file mode 100644 index 0000000..e826dd0 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.d.ts @@ -0,0 +1,15 @@ +export interface CompareLinesResult { + /** + * Whether compared lines are identical. + */ + isEqual: boolean; + /** + * Lines that were not compared due to unbalanced buffers. + */ + restLines1: string[]; + /** + * Lines that were not compared due to unbalanced buffers. + */ + restLines2: string[]; +} +//# sourceMappingURL=CompareLinesResult.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.d.ts.map new file mode 100644 index 0000000..fa1fdd2 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"CompareLinesResult.d.ts","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/compare/CompareLinesResult.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,OAAO,EAAE,OAAO,CAAA;IAChB;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB;;OAEG;IACH,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.js new file mode 100644 index 0000000..3f82bd6 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=CompareLinesResult.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.js.map new file mode 100644 index 0000000..0500c02 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/CompareLinesResult.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CompareLinesResult.js","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/compare/CompareLinesResult.ts"],"names":[],"mappings":""}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.d.ts new file mode 100644 index 0000000..1c49810 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.d.ts @@ -0,0 +1,27 @@ +import { Options } from '../../../index'; +import { LineBatch } from '../lineReader/LineBatch'; +interface RestLines { + restLines1: string[]; + restLines2: string[]; +} +interface CompareLineBatchResult { + reachedEof: boolean; + batchIsEqual: boolean; + /** + * Lines that were not compared because the two line batches + * contained different number of lines. + * These remaining lines will be compared in the next step. + */ + restLines: RestLines; +} +/** + * Compares two batches of lines. + * + * @param lineBatch1 Batch to compare. + * @param lineBatch2 Batch to compare. + * @param context Comparison context. + * @param options Comparison options. + */ +export declare function compareLineBatches(lineBatch1: LineBatch, lineBatch2: LineBatch, options: Options): CompareLineBatchResult; +export {}; +//# sourceMappingURL=compareLineBatches.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.d.ts.map new file mode 100644 index 0000000..6697bc4 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareLineBatches.d.ts","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/compare/compareLineBatches.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAGnD,UAAU,SAAS;IACf,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,UAAU,EAAE,MAAM,EAAE,CAAA;CACvB;AAED,UAAU,sBAAsB;IAC5B,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,OAAO,CAAA;IACrB;;;;OAIG;IACH,SAAS,EAAE,SAAS,CAAA;CACvB;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,GAAG,sBAAsB,CAuBzH"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.js new file mode 100644 index 0000000..26b377d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.js @@ -0,0 +1,40 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.compareLineBatches = void 0; +const compareLines_1 = require("./compareLines"); +/** + * Compares two batches of lines. + * + * @param lineBatch1 Batch to compare. + * @param lineBatch2 Batch to compare. + * @param context Comparison context. + * @param options Comparison options. + */ +function compareLineBatches(lineBatch1, lineBatch2, options) { + const compareResult = compareLines_1.compareLines(lineBatch1.lines, lineBatch2.lines, options); + if (!compareResult.isEqual) { + return { batchIsEqual: false, reachedEof: false, restLines: emptyRestLines() }; + } + const reachedEof = lineBatch1.reachedEof && lineBatch2.reachedEof; + const hasMoreLinesToProcess = compareResult.restLines1.length > 0 || compareResult.restLines2.length > 0; + if (reachedEof && hasMoreLinesToProcess) { + return { batchIsEqual: false, reachedEof: true, restLines: emptyRestLines() }; + } + if (reachedEof) { + return { batchIsEqual: true, reachedEof: true, restLines: emptyRestLines() }; + } + return { batchIsEqual: true, reachedEof: false, + restLines: { + restLines1: compareResult.restLines1, + restLines2: compareResult.restLines2, + } + }; +} +exports.compareLineBatches = compareLineBatches; +function emptyRestLines() { + return { + restLines1: [], + restLines2: [] + }; +} +//# sourceMappingURL=compareLineBatches.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.js.map new file mode 100644 index 0000000..eab6a39 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLineBatches.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compareLineBatches.js","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/compare/compareLineBatches.ts"],"names":[],"mappings":";;;AAEA,iDAA6C;AAkB7C;;;;;;;GAOG;AACH,SAAgB,kBAAkB,CAAC,UAAqB,EAAE,UAAqB,EAAE,OAAgB;IAE7F,MAAM,aAAa,GAAG,2BAAY,CAAC,UAAU,CAAC,KAAK,EAAE,UAAU,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAC/E,IAAI,CAAC,aAAa,CAAC,OAAO,EAAE;QACxB,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,EAAC,CAAA;KAChF;IAED,MAAM,UAAU,GAAG,UAAU,CAAC,UAAU,IAAI,UAAU,CAAC,UAAU,CAAA;IACjE,MAAM,qBAAqB,GAAG,aAAa,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,IAAI,aAAa,CAAC,UAAU,CAAC,MAAM,GAAG,CAAC,CAAA;IACxG,IAAI,UAAU,IAAI,qBAAqB,EAAE;QACrC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAG,SAAS,EAAE,cAAc,EAAE,EAAC,CAAA;KAChF;IAED,IAAI,UAAU,EAAE;QACZ,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAG,SAAS,EAAE,cAAc,EAAE,EAAC,CAAA;KAC/E;IAED,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK;QAC1C,SAAS,EAAE;YACP,UAAU,EAAE,aAAa,CAAC,UAAU;YACpC,UAAU,EAAE,aAAa,CAAC,UAAU;SACvC;KACJ,CAAA;AACL,CAAC;AAvBD,gDAuBC;AAED,SAAS,cAAc;IACnB,OAAO;QACH,UAAU,EAAE,EAAE;QACd,UAAU,EAAE,EAAE;KACjB,CAAA;AACL,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.d.ts new file mode 100644 index 0000000..2519563 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.d.ts @@ -0,0 +1,4 @@ +import { Options } from "../../../index"; +import { CompareLinesResult } from "./CompareLinesResult"; +export declare function compareLines(lines1: string[], lines2: string[], options: Options): CompareLinesResult; +//# sourceMappingURL=compareLines.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.d.ts.map new file mode 100644 index 0000000..83bef63 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareLines.d.ts","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/compare/compareLines.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA;AAMzD,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,GAAG,kBAAkB,CAkBrG"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.js new file mode 100644 index 0000000..132a71e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.js @@ -0,0 +1,78 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.compareLines = void 0; +const TRIM_WHITE_SPACES_REGEXP = /^[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+|[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+$/g; +const TRIM_LINE_ENDING_REGEXP = /\r\n|\n$/g; +const REMOVE_WHITE_SPACES_REGEXP = /[ \f\t\v\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/g; +function compareLines(lines1, lines2, options) { + if (options.ignoreEmptyLines) { + lines1 = removeEmptyLines(lines1); + lines2 = removeEmptyLines(lines2); + } + const len = Math.min(lines1.length, lines2.length); + let i = 0; + for (; i < len; i++) { + const isEqual = compareLine(options, lines1[i], lines2[i]); + if (!isEqual) { + return { isEqual: false, restLines1: [], restLines2: [] }; + } + } + return { + isEqual: true, + restLines1: lines1.slice(i), + restLines2: lines2.slice(i) + }; +} +exports.compareLines = compareLines; +function compareLine(options, line1, line2) { + if (options.ignoreLineEnding) { + line1 = trimLineEnding(line1); + line2 = trimLineEnding(line2); + } + if (options.ignoreWhiteSpaces) { + line1 = trimSpaces(line1); + line2 = trimSpaces(line2); + } + if (options.ignoreAllWhiteSpaces) { + line1 = removeSpaces(line1); + line2 = removeSpaces(line2); + } + return line1 === line2; +} +// Trims string like ' abc \n' into 'abc\n' +function trimSpaces(s) { + const { content, lineEnding } = separateEol(s); + const trimmed = content.replace(TRIM_WHITE_SPACES_REGEXP, ''); + return trimmed + lineEnding; +} +function trimLineEnding(s) { + return s.replace(TRIM_LINE_ENDING_REGEXP, ''); +} +function removeSpaces(s) { + return s.replace(REMOVE_WHITE_SPACES_REGEXP, ''); +} +function removeEmptyLines(lines) { + return lines.filter(line => !isEmptyLine(line)); +} +function isEmptyLine(line) { + return line === '\n' || line === '\r\n'; +} +function separateEol(s) { + const len = s.length; + let lineEnding = ''; + let content = s; + if (s[len - 1] === '\n') { + if (s[len - 2] === '\r') { + return { + lineEnding: '\r\n', + content: s.slice(0, len - 2) + }; + } + { + lineEnding = '\n'; + content = s.slice(0, len - 1); + } + } + return { content, lineEnding }; +} +//# sourceMappingURL=compareLines.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.js.map new file mode 100644 index 0000000..0070f97 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compare/compareLines.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compareLines.js","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/compare/compareLines.ts"],"names":[],"mappings":";;;AAGA,MAAM,wBAAwB,GAAG,oJAAoJ,CAAA;AACrL,MAAM,uBAAuB,GAAG,WAAW,CAAA;AAC3C,MAAM,0BAA0B,GAAG,yEAAyE,CAAA;AAE5G,SAAgB,YAAY,CAAC,MAAgB,EAAE,MAAgB,EAAE,OAAgB;IAC7E,IAAI,OAAO,CAAC,gBAAgB,EAAE;QAC1B,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;QACjC,MAAM,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAA;KACpC;IACD,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAA;IAClD,IAAI,CAAC,GAAG,CAAC,CAAA;IACT,OAAO,CAAC,GAAG,GAAG,EAAE,CAAC,EAAE,EAAE;QACjB,MAAM,OAAO,GAAG,WAAW,CAAC,OAAO,EAAE,MAAM,CAAC,CAA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B,EAAE,EAAE,CAAC,CAAA;AACjD,CAAC;AAED,SAAS,YAAY,CAAC,CAAS;IAC3B,OAAO,CAAC,CAAC,OAAO,CAAC,0BAA0B,EAAE,EAAE,CAAC,CAAA;AACpD,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAe;IACrC,OAAO,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAA;AACnD,CAAC;AAED,SAAS,WAAW,CAAC,IAAY;IAC7B,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,KAAK,MAAM,CAAA;AAC3C,CAAC;AAED,SAAS,WAAW,CAAC,CAAS;IAC1B,MAAM,GAAG,GAAG,CAAC,CAAC,MAAM,CAAA;IACpB,IAAI,UAAU,GAAG,EAAE,CAAA;IACnB,IAAI,OAAO,GAAG,CAAC,CAAA;IACf,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;QACrB,IAAI,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,IAAI,EAAE;YACrB,OAAO;gBACH,UAAU,EAAE,MAAM;gBAClB,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC;aAC/B,CAAA;SACJ;QAED;YACI,UAAU,GAAG,IAAI,CAAA;YACjB,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,GAAG,CAAC,CAAC,CAAA;SAChC;KACJ;IACD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,CAAA;AAClC,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.d.ts new file mode 100644 index 0000000..4dae412 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.d.ts @@ -0,0 +1,3 @@ +import { CompareFileAsync } from '../../types'; +export declare const lineBasedCompareAsync: CompareFileAsync; +//# sourceMappingURL=compareAsync.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.d.ts.map new file mode 100644 index 0000000..451e2b7 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareAsync.d.ts","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/compareAsync.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAQ9C,eAAO,MAAM,qBAAqB,EAAE,gBA+BnC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.js new file mode 100644 index 0000000..f9d6afe --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.js @@ -0,0 +1,75 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lineBasedCompareAsync = void 0; +const FileDescriptorQueue_1 = require("../../fs/FileDescriptorQueue"); +const closeFile_1 = __importDefault(require("../../fs/closeFile")); +const fsPromise_1 = __importDefault(require("../../fs/fsPromise")); +const LineBasedCompareContext_1 = require("./LineBasedCompareContext"); +const BufferPool_1 = require("../../fs/BufferPool"); +const compareLineBatches_1 = require("./compare/compareLineBatches"); +const readBufferedLines_1 = require("./lineReader/readBufferedLines"); +const BUF_SIZE = 100000; +const MAX_CONCURRENT_FILE_COMPARE = 8; +const fdQueue = new FileDescriptorQueue_1.FileDescriptorQueue(MAX_CONCURRENT_FILE_COMPARE * 2); +const bufferPool = new BufferPool_1.BufferPool(BUF_SIZE, MAX_CONCURRENT_FILE_COMPARE); // fdQueue guarantees there will be no more than MAX_CONCURRENT_FILE_COMPARE async processes accessing the buffers concurrently +const lineBasedCompareAsync = (path1, stat1, path2, stat2, options) => __awaiter(void 0, void 0, void 0, function* () { + var _a; + const bufferSize = Math.min(BUF_SIZE, (_a = options.lineBasedHandlerBufferSize) !== null && _a !== void 0 ? _a : Number.MAX_VALUE); + let context; + try { + const fileDescriptors = yield Promise.all([fdQueue.openPromise(path1, 'r'), fdQueue.openPromise(path2, 'r')]); + context = new LineBasedCompareContext_1.LineBasedCompareContext(fileDescriptors[0], fileDescriptors[1], bufferPool.allocateBuffers()); + for (;;) { + const lineBatch1 = yield readLineBatchAsync(context.fd1, context.buffer.buf1, bufferSize, context.rest.rest1, context.restLines.restLines1); + const lineBatch2 = yield readLineBatchAsync(context.fd2, context.buffer.buf2, bufferSize, context.rest.rest2, context.restLines.restLines2); + context.rest.rest1 = lineBatch1.rest; + context.rest.rest2 = lineBatch2.rest; + const compareResult = compareLineBatches_1.compareLineBatches(lineBatch1, lineBatch2, options); + if (!compareResult.batchIsEqual) { + return false; + } + if (compareResult.reachedEof) { + return compareResult.batchIsEqual; + } + context.restLines.restLines1 = compareResult.restLines.restLines1; + context.restLines.restLines2 = compareResult.restLines.restLines2; + } + } + finally { + if (context) { + bufferPool.freeBuffers(context.buffer); + yield closeFile_1.default.closeFilesAsync(context.fd1, context.fd2, fdQueue); + } + } +}); +exports.lineBasedCompareAsync = lineBasedCompareAsync; +/** + * Reads a batch of lines from file starting with current position. + * + * @param fd File to read lines from. + * @param buf Buffer used as temporary line storage. + * @param bufferSize Allocated buffer size. The number of lines in the batch is limited by this size. + * @param rest Part of a line that was split at buffer boundary in a previous read. + * Will be added to result. + * @param restLines Lines that remain unprocessed from a previous read. + * Will be added to result. + */ +function readLineBatchAsync(fd, buf, bufferSize, rest, restLines) { + return __awaiter(this, void 0, void 0, function* () { + const size = yield fsPromise_1.default.read(fd, buf, 0, bufferSize, null); + return readBufferedLines_1.readBufferedLines(buf, size, bufferSize, rest, restLines); + }); +} +//# sourceMappingURL=compareAsync.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.js.map new file mode 100644 index 0000000..7d3ff45 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareAsync.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compareAsync.js","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/compareAsync.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,sEAAkE;AAClE,mEAA2C;AAC3C,mEAA0C;AAI1C,uEAAmE;AACnE,oDAAgD;AAChD,qEAAiE;AACjE,sEAAkE;AAGlE,MAAM,QAAQ,GAAG,MAAM,CAAA;AACvB,MAAM,2BAA2B,GAAG,CAAC,CAAA;AAErC,MAAM,OAAO,GAAG,IAAI,yCAAmB,CAAC,2BAA2B,GAAG,CAAC,CAAC,CAAA;AACxE,MAAM,UAAU,GAAG,IAAI,uBAAU,CAAC,QAAQ,EAAE,2BAA2B,CAAC,CAAA,CAAE,+HAA+H;AAElM,MAAM,qBAAqB,GAAqB,CAAO,KAAa,EAAE,KAAe,EAAE,KAAa,EAAE,KAAe,EAAE,OAAgB,EAAoB,EAAE;;IAChK,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,QAAQ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GAAG,aAAa,CAAC,SAAS,CAAC,UAAU,CAAA;YACjE,OAAO,CAAC,SAAS,CAAC,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,UAAU,CAAA;SACpE;KACJ;YAAS;QACN,IAAI,OAAO,EAAE;YACT,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;YACtC,MAAM,mBAAU,CAAC,eAAe,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAA;SACtE;KACJ;AACL,CAAC,CAAA,CAAA;AA/BY,QAAA,qBAAqB,yBA+BjC;AAED;;;;;;;;;;GAUG;AACH,SAAe,kBAAkB,CAAC,EAAU,EAAE,GAAW,EAAE,UAAkB,EAAE,IAAY,EAAE,SAAmB;;QAC5G,MAAM,IAAI,GAAG,MAAM,mBAAS,CAAC,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;QAC/D,OAAO,qCAAiB,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;IACpE,CAAC;CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.d.ts new file mode 100644 index 0000000..7f3a482 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.d.ts @@ -0,0 +1,3 @@ +import { CompareFileSync } from '../../types'; +export declare const lineBasedCompareSync: CompareFileSync; +//# sourceMappingURL=compareSync.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.d.ts.map new file mode 100644 index 0000000..fcb2c9e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"compareSync.d.ts","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/compareSync.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAU7C,eAAO,MAAM,oBAAoB,EAAE,eA8BlC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.js new file mode 100644 index 0000000..816583d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.js @@ -0,0 +1,60 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lineBasedCompareSync = void 0; +const fs_1 = __importDefault(require("fs")); +const closeFile_1 = __importDefault(require("../../fs/closeFile")); +const LineBasedCompareContext_1 = require("./LineBasedCompareContext"); +const compareLineBatches_1 = require("./compare/compareLineBatches"); +const readBufferedLines_1 = require("./lineReader/readBufferedLines"); +const BUF_SIZE = 100000; +const bufferPair = { + buf1: Buffer.alloc(BUF_SIZE), + buf2: Buffer.alloc(BUF_SIZE), + busy: true +}; +const lineBasedCompareSync = (path1, stat1, path2, stat2, options) => { + var _a; + const bufferSize = Math.min(BUF_SIZE, (_a = options.lineBasedHandlerBufferSize) !== null && _a !== void 0 ? _a : Number.MAX_VALUE); + let context; + try { + context = new LineBasedCompareContext_1.LineBasedCompareContext(fs_1.default.openSync(path1, 'r'), fs_1.default.openSync(path2, 'r'), bufferPair); + for (;;) { + const lineBatch1 = readLineBatchSync(context.fd1, context.buffer.buf1, bufferSize, context.rest.rest1, context.restLines.restLines1); + const lineBatch2 = readLineBatchSync(context.fd2, context.buffer.buf2, bufferSize, context.rest.rest2, context.restLines.restLines2); + context.rest.rest1 = lineBatch1.rest; + context.rest.rest2 = lineBatch2.rest; + const compareResult = compareLineBatches_1.compareLineBatches(lineBatch1, lineBatch2, options); + if (!compareResult.batchIsEqual) { + return false; + } + if (compareResult.reachedEof) { + return compareResult.batchIsEqual; + } + context.restLines.restLines1 = compareResult.restLines.restLines1; + context.restLines.restLines2 = compareResult.restLines.restLines2; + } + } + finally { + closeFile_1.default.closeFilesSync(context === null || context === void 0 ? void 0 : context.fd1, context === null || context === void 0 ? void 0 : context.fd2); + } +}; +exports.lineBasedCompareSync = lineBasedCompareSync; +/** + * Reads a batch of lines from file starting with current position. + * + * @param fd File to read lines from. + * @param buf Buffer used as temporary line storage. + * @param bufferSize Allocated buffer size. The number of lines in the batch is limited by this size. + * @param rest Part of a line that was split at buffer boundary in a previous read. + * Will be added to result. + * @param restLines Lines that remain unprocessed from a previous read. + * Will be added to result. + */ +function readLineBatchSync(fd, buf, bufferSize, rest, restLines) { + const size = fs_1.default.readSync(fd, buf, 0, bufferSize, null); + return readBufferedLines_1.readBufferedLines(buf, size, bufferSize, rest, restLines); +} +//# sourceMappingURL=compareSync.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.js.map new file mode 100644 index 0000000..cc0f38e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/compareSync.js.map @@ -0,0 +1 @@ +{"version":3,"file":"compareSync.js","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/compareSync.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AAEnB,mEAA2C;AAC3C,uEAAmE;AACnE,qEAAiE;AACjE,sEAAkE;AAKlE,MAAM,QAAQ,GAAG,MAAM,CAAA;AAEvB,MAAM,UAAU,GAAe;IAC3B,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC5B,IAAI,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,CAAC,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,UAAU,CAAA;YACjE,OAAO,CAAC,SAAS,CAAC,UAAU,GAAG,aAAa,CAAC,SAAS,CAAC,UAAU,CAAA;SACpE;KACJ;YAAS;QACN,mBAAU,CAAC,cAAc,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,EAAE,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAA;KACxD;AACL,CAAC,CAAA;AA9BY,QAAA,oBAAoB,wBA8BhC;AAED;;;;;;;;;;GAUG;AACH,SAAS,iBAAiB,CAAC,EAAU,EAAE,GAAW,EAAE,UAAkB,EAAE,IAAY,EAAE,SAAmB;IACrG,MAAM,IAAI,GAAG,YAAE,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,EAAE,UAAU,EAAE,IAAI,CAAC,CAAA;IACtD,OAAO,qCAAiB,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,CAAC,CAAA;AACpE,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.d.ts new file mode 100644 index 0000000..a9bc4b1 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.d.ts @@ -0,0 +1,7 @@ +import { CompareFileHandler } from '../../types'; +/** + * Compare files line by line with options to ignore + * line endings and white space differences. + */ +export declare const lineBasedFileCompare: CompareFileHandler; +//# sourceMappingURL=lineBasedFileCompare.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.d.ts.map new file mode 100644 index 0000000..8c7168d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"lineBasedFileCompare.d.ts","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/lineBasedFileCompare.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAA;AAEhD;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,kBAGlC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.js new file mode 100644 index 0000000..a88f613 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.js @@ -0,0 +1,14 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.lineBasedFileCompare = void 0; +const compareSync_1 = require("./compareSync"); +const compareAsync_1 = require("./compareAsync"); +/** + * Compare files line by line with options to ignore + * line endings and white space differences. + */ +exports.lineBasedFileCompare = { + compareSync: compareSync_1.lineBasedCompareSync, + compareAsync: compareAsync_1.lineBasedCompareAsync +}; +//# sourceMappingURL=lineBasedFileCompare.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.js.map new file mode 100644 index 0000000..36876d0 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineBasedFileCompare.js.map @@ -0,0 +1 @@ +{"version":3,"file":"lineBasedFileCompare.js","sourceRoot":"","sources":["../../../../src/fileCompareHandler/lines/lineBasedFileCompare.ts"],"names":[],"mappings":";;;AAAA,+CAAkD;AAClD,iDAAoD;AAGpD;;;GAGG;AACU,QAAA,oBAAoB,GAAuB;IACpD,WAAW,EAAE,kCAAoB;IACjC,YAAY,EAAE,oCAAqB;CACtC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.d.ts new file mode 100644 index 0000000..74a0470 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.d.ts @@ -0,0 +1,16 @@ +export interface LineBatch { + /** + * Batch of lines available after this read operation. + */ + lines: string[]; + /** + * First part of a line that was split due to buffer boundary. + * It will be used in a subsequent read to complete the next line. + */ + rest: string; + /** + * Whether we reached end of file. + */ + reachedEof: boolean; +} +//# sourceMappingURL=LineBatch.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.d.ts.map new file mode 100644 index 0000000..2b17f98 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"LineBatch.d.ts","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/lineReader/LineBatch.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,SAAS;IACtB;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;IACf;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,UAAU,EAAE,OAAO,CAAA;CACtB"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.js new file mode 100644 index 0000000..a6f78b2 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=LineBatch.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.js.map new file mode 100644 index 0000000..6d42ea9 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/LineBatch.js.map @@ -0,0 +1 @@ +{"version":3,"file":"LineBatch.js","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/lineReader/LineBatch.ts"],"names":[],"mappings":""}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.d.ts b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.d.ts new file mode 100644 index 0000000..5e2c85e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.d.ts @@ -0,0 +1,14 @@ +/// <reference types="node" /> +import { LineBatch } from './LineBatch'; +/** + * Reads lines from given buffer. + * @param buf Buffer to read lines from. + * @param size Size of data available in buffer. + * @param allocatedBufferSize Maximum buffer storage. + * @param rest Part of a line that was split at buffer boundary in a previous read. + * Will be added to result. + * @param restLines Lines that remain unprocessed from a previous read due to unbalanced buffers. + * Will be added to result. + */ +export declare function readBufferedLines(buf: Buffer, size: number, allocatedBufferSize: number, rest: string, restLines: string[]): LineBatch; +//# sourceMappingURL=readBufferedLines.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.d.ts.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.d.ts.map new file mode 100644 index 0000000..cc2dcc0 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"readBufferedLines.d.ts","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/lineReader/readBufferedLines.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAKvC;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,CAmBtI"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.js b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.js new file mode 100644 index 0000000..fe1f768 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.js @@ -0,0 +1,47 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.readBufferedLines = void 0; +const LINE_TOKENIZER_REGEXP = /[^\n]+\n?|\n/g; +/** + * Reads lines from given buffer. + * @param buf Buffer to read lines from. + * @param size Size of data available in buffer. + * @param allocatedBufferSize Maximum buffer storage. + * @param rest Part of a line that was split at buffer boundary in a previous read. + * Will be added to result. + * @param restLines Lines that remain unprocessed from a previous read due to unbalanced buffers. + * Will be added to result. + */ +function readBufferedLines(buf, size, allocatedBufferSize, rest, restLines) { + if (size === 0 && rest.length === 0) { + return { lines: [...restLines], rest: '', reachedEof: true }; + } + if (size === 0) { + return { lines: [...restLines, rest], rest: '', reachedEof: true }; + } + const fileContent = rest + buf.toString('utf8', 0, size); + const lines = [...restLines, ...fileContent.match(LINE_TOKENIZER_REGEXP)]; + const reachedEof = size < allocatedBufferSize; + if (reachedEof) { + return { + lines, rest: '', reachedEof: true + }; + } + return removeLastLine(lines); +} +exports.readBufferedLines = readBufferedLines; +/** + * Last line is usually incomplete because our buffer rarely matches exactly the end of a line. + * So we remove it from the line batch. + * The deleted line is returned as the 'rest' parameter and will be incorporate at the beginning + * of next read operation. + */ +function removeLastLine(lines) { + const lastLine = lines[lines.length - 1]; + return { + lines: lines.slice(0, lines.length - 1), + rest: lastLine, + reachedEof: false + }; +} +//# sourceMappingURL=readBufferedLines.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.js.map b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.js.map new file mode 100644 index 0000000..6b2f7e1 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fileCompareHandler/lines/lineReader/readBufferedLines.js.map @@ -0,0 +1 @@ +{"version":3,"file":"readBufferedLines.js","sourceRoot":"","sources":["../../../../../src/fileCompareHandler/lines/lineReader/readBufferedLines.ts"],"names":[],"mappings":";;;AAGA,MAAM,qBAAqB,GAAG,eAAe,CAAA;AAE7C;;;;;;;;;GASG;AACH,SAAgB,iBAAiB,CAAC,GAAW,EAAE,IAAY,EAAE,mBAA2B,EAAE,IAAY,EAAE,SAAmB;IACvH,IAAI,IAAI,KAAK,CAAC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;QACjC,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;KAC/D;IACD,IAAI,IAAI,KAAK,CAAC,EAAE;QACZ,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,SAAS,EAAE,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,CAAA;KACrE;IAED,MAAM,WAAW,GAAG,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,IAAI,CAAC,CAAA;IACxD,MAAM,KAAK,GAAG,CAAC,GAAG,SAAS,EAAE,GAAG,WAAW,CAAC,KAAK,CAAC,qBAAqB,CAAa,CAAC,CAAA;IAErF,MAAM,UAAU,GAAG,IAAI,GAAG,mBAAmB,CAAA;IAC7C,IAAI,UAAU,EAAE;QACZ,OAAO;YACH,KAAK,EAAE,IAAI,EAAE,EAAE,EAAE,UAAU,EAAE,IAAI;SACpC,CAAA;KACJ;IAED,OAAO,cAAc,CAAC,KAAK,CAAC,CAAA;AAChC,CAAC;AAnBD,8CAmBC;AAED;;;;;GAKG;AACH,SAAS,cAAc,CAAC,KAAe;IACnC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IACxC,OAAO;QACH,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC;QACvC,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE,KAAK;KACpB,CAAA;AACL,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/BufferPool.d.ts b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.d.ts new file mode 100644 index 0000000..74d730d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.d.ts @@ -0,0 +1,24 @@ +/// <reference types="node" /> +export interface BufferPair { + buf1: Buffer; + buf2: Buffer; + busy: boolean; +} +/** + * Collection of buffers to be shared between async processes. + * Avoids allocating buffers each time async process starts. + */ +export declare class BufferPool { + private readonly bufSize; + private readonly bufNo; + private readonly bufferPool; + /** + * + * @param bufSize Size of each buffer. + * @param bufNo Number of buffers. Caller has to make sure no more than bufNo async processes run simultaneously. + */ + constructor(bufSize: number, bufNo: number); + allocateBuffers(): BufferPair; + freeBuffers(bufferPair: BufferPair): void; +} +//# sourceMappingURL=BufferPool.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/BufferPool.d.ts.map b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.d.ts.map new file mode 100644 index 0000000..ca0b80b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"BufferPool.d.ts","sourceRoot":"","sources":["../../../src/fs/BufferPool.ts"],"names":[],"mappings":";AAAA,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,OAAO,CAAA;CAChB;AAED;;;GAGG;AACH,qBAAa,UAAU;IAOP,OAAO,CAAC,QAAQ,CAAC,OAAO;IAAU,OAAO,CAAC,QAAQ,CAAC,KAAK;IANpE,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAmB;IAC9C;;;;OAIG;gBAC0B,OAAO,EAAE,MAAM,EAAmB,KAAK,EAAE,MAAM;IAUrE,eAAe,IAAI,UAAU;IAW7B,WAAW,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;CAGnD"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/BufferPool.js b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.js new file mode 100644 index 0000000..0899013 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.js @@ -0,0 +1,41 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.BufferPool = void 0; +/** + * Collection of buffers to be shared between async processes. + * Avoids allocating buffers each time async process starts. + */ +class BufferPool { + /** + * + * @param bufSize Size of each buffer. + * @param bufNo Number of buffers. Caller has to make sure no more than bufNo async processes run simultaneously. + */ + constructor(bufSize, bufNo) { + this.bufSize = bufSize; + this.bufNo = bufNo; + this.bufferPool = []; + for (let i = 0; i < this.bufNo; i++) { + this.bufferPool.push({ + buf1: Buffer.alloc(this.bufSize), + buf2: Buffer.alloc(this.bufSize), + busy: false + }); + } + } + allocateBuffers() { + for (let j = 0; j < this.bufNo; j++) { + const bufferPair = this.bufferPool[j]; + if (!bufferPair.busy) { + bufferPair.busy = true; + return bufferPair; + } + } + throw new Error('Async buffer limit reached'); + } + freeBuffers(bufferPair) { + bufferPair.busy = false; + } +} +exports.BufferPool = BufferPool; +//# sourceMappingURL=BufferPool.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/BufferPool.js.map b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.js.map new file mode 100644 index 0000000..321d922 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/BufferPool.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BufferPool.js","sourceRoot":"","sources":["../../../src/fs/BufferPool.ts"],"names":[],"mappings":";;;AAMA;;;GAGG;AACH,MAAa,UAAU;IAEnB;;;;OAIG;IACH,YAA6B,OAAe,EAAmB,KAAa;QAA/C,YAAO,GAAP,OAAO,CAAQ;QAAmB,UAAK,GAAL,KAAK,CAAQ;QAN3D,eAAU,GAAiB,EAAE,CAAA;QAO1C,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;YACjC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;gBACjB,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;gBAChC,IAAI,EAAE,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC;gBAChC,IAAI,EAAE,KAAK;aACd,CAAC,CAAA;SACL;IACL,CAAC;IAEM,eAAe;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,EAAE;YACjC,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;YACrC,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;gBAClB,UAAU,CAAC,IAAI,GAAG,IAAI,CAAA;gBACtB,OAAO,UAAU,CAAA;aACpB;SACJ;QACD,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;IACjD,CAAC;IAEM,WAAW,CAAC,UAAsB;QACrC,UAAU,CAAC,IAAI,GAAG,KAAK,CAAA;IAC3B,CAAC;CACJ;AA/BD,gCA+BC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts new file mode 100644 index 0000000..c0dc67f --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts @@ -0,0 +1,30 @@ +/// <reference types="node" /> +import { NoParamCallback } from 'fs'; +declare type OpenFileFlags = string | undefined; +declare type OpenFileCallback = (err: NodeJS.ErrnoException | null, fd: number) => void; +/** + * Limits the number of concurrent file handlers. + * Use it as a wrapper over fs.open() and fs.close(). + * Example: + * const fdQueue = new FileDescriptorQueue(8) + * fdQueue.open(path, flags, (err, fd) =>{ + * ... + * fdQueue.close(fd, (err) =>{ + * ... + * }) + * }) + * As of node v7, calling fd.close without a callback is deprecated. + */ +export declare class FileDescriptorQueue { + private maxFilesNo; + private activeCount; + private pendingJobs; + constructor(maxFilesNo: number); + open(path: string, flags: OpenFileFlags, callback: OpenFileCallback): void; + process(): void; + close(fd: number, callback: NoParamCallback): void; + openPromise(path: string, flags: OpenFileFlags): Promise<number>; + closePromise(fd: number): Promise<void>; +} +export {}; +//# sourceMappingURL=FileDescriptorQueue.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts.map b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts.map new file mode 100644 index 0000000..52de39d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"FileDescriptorQueue.d.ts","sourceRoot":"","sources":["../../../src/fs/FileDescriptorQueue.ts"],"names":[],"mappings":";AAAA,OAAW,EAAE,eAAe,EAAE,MAAM,IAAI,CAAA;AAGxC,aAAK,aAAa,GAAG,MAAM,GAAG,SAAS,CAAA;AACvC,aAAK,gBAAgB,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,cAAc,GAAG,IAAI,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;AAE/E;;;;;;;;;;;;GAYG;AACH,qBAAa,mBAAmB;IAGnB,OAAO,CAAC,UAAU;IAF9B,OAAO,CAAC,WAAW,CAAI;IACvB,OAAO,CAAC,WAAW,CAAc;gBACb,UAAU,EAAE,MAAM;IAEtC,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,gBAAgB,GAAG,IAAI;IAS1E,OAAO,IAAI,IAAI;IAQf,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,eAAe,GAAG,IAAI;IAMlD,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC;IAYhE,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAWvC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js new file mode 100644 index 0000000..15585f4 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js @@ -0,0 +1,74 @@ +"use strict"; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.FileDescriptorQueue = void 0; +const fs_1 = __importDefault(require("fs")); +const Queue_1 = __importDefault(require("./Queue")); +/** + * Limits the number of concurrent file handlers. + * Use it as a wrapper over fs.open() and fs.close(). + * Example: + * const fdQueue = new FileDescriptorQueue(8) + * fdQueue.open(path, flags, (err, fd) =>{ + * ... + * fdQueue.close(fd, (err) =>{ + * ... + * }) + * }) + * As of node v7, calling fd.close without a callback is deprecated. + */ +class FileDescriptorQueue { + constructor(maxFilesNo) { + this.maxFilesNo = maxFilesNo; + this.activeCount = 0; + this.pendingJobs = new Queue_1.default(); + } + open(path, flags, callback) { + this.pendingJobs.enqueue({ + path: path, + flags: flags, + callback: callback + }); + this.process(); + } + process() { + if (this.pendingJobs.getLength() > 0 && this.activeCount < this.maxFilesNo) { + const job = this.pendingJobs.dequeue(); + this.activeCount++; + fs_1.default.open(job.path, job.flags, job.callback); + } + } + close(fd, callback) { + this.activeCount--; + fs_1.default.close(fd, callback); + this.process(); + } + openPromise(path, flags) { + return new Promise((resolve, reject) => { + this.open(path, flags, (err, fd) => { + if (err) { + reject(err); + } + else { + resolve(fd); + } + }); + }); + } + closePromise(fd) { + return new Promise((resolve, reject) => { + this.close(fd, (err) => { + if (err) { + reject(err); + } + else { + resolve(); + } + }); + }); + } +} +exports.FileDescriptorQueue = FileDescriptorQueue; +//# sourceMappingURL=FileDescriptorQueue.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js.map b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js.map new file mode 100644 index 0000000..47eea83 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"FileDescriptorQueue.js","sourceRoot":"","sources":["../../../src/fs/FileDescriptorQueue.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAwC;AACxC,oDAA2B;AAK3B;;;;;;;;;;;;GAYG;AACH,MAAa,mBAAmB;IAG/B,YAAoB,UAAkB;QAAlB,eAAU,GAAV,UAAU,CAAQ;QAF9B,gBAAW,GAAG,CAAC,CAAA;QACf,gBAAW,GAAG,IAAI,eAAK,EAAE,CAAA;IACS,CAAC;IAE3C,IAAI,CAAC,IAAY,EAAE,KAAoB,EAAE,QAA0B;QAClE,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YACxB,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,KAAK;YACZ,QAAQ,EAAE,QAAQ;SAClB,CAAC,CAAA;QACF,IAAI,CAAC,OAAO,EAAE,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,CAAC;CACD;AAnDD,kDAmDC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/Queue.d.ts b/desktop/node_modules/dir-compare/build/src/fs/Queue.d.ts new file mode 100644 index 0000000..53a7930 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/Queue.d.ts @@ -0,0 +1,8 @@ +export = Queue; +declare function Queue(): void; +declare class Queue { + getLength: () => number; + enqueue: (item: any) => void; + dequeue: () => any; +} +//# sourceMappingURL=Queue.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/Queue.d.ts.map b/desktop/node_modules/dir-compare/build/src/fs/Queue.d.ts.map new file mode 100644 index 0000000..5df7569 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/Queue.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"Queue.d.ts","sourceRoot":"","sources":["../../../src/fs/Queue.js"],"names":[],"mappings":";AAkBA,+BAwCC;;IAjCC,wBAA8C;IAM9C,6BAEC;IAKD,mBAmBC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/Queue.js b/desktop/node_modules/dir-compare/build/src/fs/Queue.js new file mode 100644 index 0000000..f6e280c --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/Queue.js @@ -0,0 +1,50 @@ +/* + +Queue.js + +A function to represent a queue + +Created by Kate Morley - http://code.iamkate.com/ - and released under the terms +of the CC0 1.0 Universal legal code: + +http://creativecommons.org/publicdomain/zero/1.0/legalcode + +*/ +const MAX_UNUSED_ARRAY_SIZE = 10000; +/* Creates a new queue. A queue is a first-in-first-out (FIFO) data structure - + * items are added to the end of the queue and removed from the front. + */ +function Queue() { + // initialise the queue and offset + let queue = []; + let offset = 0; + // Returns the length of the queue. + this.getLength = () => (queue.length - offset); + /* Enqueues the specified item. The parameter is: + * + * item - the item to enqueue + */ + this.enqueue = item => { + queue.push(item); + }; + /* Dequeues an item and returns it. If the queue is empty, the value + * 'undefined' is returned. + */ + this.dequeue = () => { + // if the queue is empty, return immediately + if (queue.length === 0) { + return undefined; + } + // store the item at the front of the queue + const item = queue[offset]; + // increment the offset and remove the free space if necessary + if (++offset > MAX_UNUSED_ARRAY_SIZE) { + queue = queue.slice(offset); + offset = 0; + } + // return the dequeued item + return item; + }; +} +module.exports = Queue; +//# sourceMappingURL=Queue.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/Queue.js.map b/desktop/node_modules/dir-compare/build/src/fs/Queue.js.map new file mode 100644 index 0000000..a8b1146 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/Queue.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Queue.js","sourceRoot":"","sources":["../../../src/fs/Queue.js"],"names":[],"mappings":"AAAA;;;;;;;;;;;EAWE;AAEF,MAAM,qBAAqB,GAAG,KAAK,CAAA;AAEnC;;GAEG;AACH,SAAS,KAAK;IAEZ,kCAAkC;IAClC,IAAI,KAAK,GAAG,EAAE,CAAA;IACd,IAAI,MAAM,GAAG,CAAC,CAAA;IAEd,mCAAmC;IACnC,IAAI,CAAC,SAAS,GAAG,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAA;IAE9C;;;OAGG;IACH,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC,EAAE;QACpB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;IAClB,CAAC,CAAA;IAED;;OAEG;IACH,IAAI,CAAC,OAAO,GAAG,GAAG,EAAE;QAElB,4CAA4C;QAC5C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;YACtB,OAAO,SAAS,CAAA;SACjB;QAED,2CAA2C;QAC3C,MAAM,IAAI,GAAG,KAAK,CAAC,MAAM,CAAC,CAAA;QAE1B,8DAA8D;QAC9D,IAAI,EAAE,MAAM,GAAG,qBAAqB,EAAE;YACpC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;YAC3B,MAAM,GAAG,CAAC,CAAA;SACX;QAED,2BAA2B;QAC3B,OAAO,IAAI,CAAA;IAEb,CAAC,CAAA;AACH,CAAC;AAED,MAAM,CAAC,OAAO,GAAG,KAAK,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/closeFile.d.ts b/desktop/node_modules/dir-compare/build/src/fs/closeFile.d.ts new file mode 100644 index 0000000..6403c19 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/closeFile.d.ts @@ -0,0 +1,9 @@ +import { FileDescriptorQueue } from './FileDescriptorQueue'; +declare function closeFilesSync(fd1?: number, fd2?: number): void; +declare function closeFilesAsync(fd1: number | undefined, fd2: number | undefined, fdQueue: FileDescriptorQueue): Promise<void>; +declare const _default: { + closeFilesSync: typeof closeFilesSync; + closeFilesAsync: typeof closeFilesAsync; +}; +export default _default; +//# sourceMappingURL=closeFile.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/closeFile.d.ts.map b/desktop/node_modules/dir-compare/build/src/fs/closeFile.d.ts.map new file mode 100644 index 0000000..c7b7101 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/closeFile.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"closeFile.d.ts","sourceRoot":"","sources":["../../../src/fs/closeFile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAE3D,iBAAS,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAOxD;AAED,iBAAe,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC,CAU5H;;;;;AAGD,wBAGC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/closeFile.js b/desktop/node_modules/dir-compare/build/src/fs/closeFile.js new file mode 100644 index 0000000..9ece2f6 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/closeFile.js @@ -0,0 +1,41 @@ +"use strict"; +var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { + function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } + return new (P || (P = Promise))(function (resolve, reject) { + function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } + function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } + function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } + step((generator = generator.apply(thisArg, _arguments || [])).next()); + }); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +const fs_1 = __importDefault(require("fs")); +function closeFilesSync(fd1, fd2) { + if (fd1) { + fs_1.default.closeSync(fd1); + } + if (fd2) { + fs_1.default.closeSync(fd2); + } +} +function closeFilesAsync(fd1, fd2, fdQueue) { + return __awaiter(this, void 0, void 0, function* () { + if (fd1 && fd2) { + return fdQueue.closePromise(fd1).then(() => fdQueue.closePromise(fd2)); + } + if (fd1) { + return fdQueue.closePromise(fd1); + } + if (fd2) { + return fdQueue.closePromise(fd2); + } + }); +} +exports.default = { + closeFilesSync, + closeFilesAsync +}; +//# sourceMappingURL=closeFile.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/closeFile.js.map b/desktop/node_modules/dir-compare/build/src/fs/closeFile.js.map new file mode 100644 index 0000000..36659e2 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/closeFile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"closeFile.js","sourceRoot":"","sources":["../../../src/fs/closeFile.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,4CAAmB;AAGnB,SAAS,cAAc,CAAC,GAAY,EAAE,GAAY;IAC9C,IAAI,GAAG,EAAE;QACL,YAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;KACpB;IACD,IAAI,GAAG,EAAE;QACL,YAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;KACpB;AACL,CAAC;AAED,SAAe,eAAe,CAAC,GAAuB,EAAE,GAAuB,EAAE,OAA4B;;QACzG,IAAI,GAAG,IAAI,GAAG,EAAE;YACZ,OAAO,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAA;SACzE;QACD,IAAI,GAAG,EAAE;YACL,OAAO,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;SACnC;QACD,IAAI,GAAG,EAAE;YACL,OAAO,OAAO,CAAC,YAAY,CAAC,GAAG,CAAC,CAAA;SACnC;IACL,CAAC;CAAA;AAGD,kBAAe;IACX,cAAc;IACd,eAAe;CAClB,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/fsPromise.d.ts b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.d.ts new file mode 100644 index 0000000..4eda47b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.d.ts @@ -0,0 +1,5 @@ +export function readdir(path: any): Promise<any>; +export function readdir(path: any): Promise<any>; +export function read(fd: any, buffer: any, offset: any, length: any, position: any): Promise<any>; +export function read(fd: any, buffer: any, offset: any, length: any, position: any): Promise<any>; +//# sourceMappingURL=fsPromise.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/fsPromise.d.ts.map b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.d.ts.map new file mode 100644 index 0000000..482aec5 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"fsPromise.d.ts","sourceRoot":"","sources":["../../../src/fs/fsPromise.js"],"names":[],"mappings":"AAGI,iDAUC;AAVD,iDAUC;AACD,kGAUC;AAVD,kGAUC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/fsPromise.js b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.js new file mode 100644 index 0000000..f135c6a --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.js @@ -0,0 +1,28 @@ +const fs = require('fs'); +module.exports = { + readdir(path) { + return new Promise((resolve, reject) => { + fs.readdir(path, (err, files) => { + if (err) { + reject(err); + } + else { + resolve(files); + } + }); + }); + }, + read(fd, buffer, offset, length, position) { + return new Promise((resolve, reject) => { + fs.read(fd, buffer, offset, length, position, (err, bytesRead) => { + if (err) { + reject(err); + } + else { + resolve(bytesRead); + } + }); + }); + }, +}; +//# sourceMappingURL=fsPromise.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/fs/fsPromise.js.map b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.js.map new file mode 100644 index 0000000..5131cbc --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/fs/fsPromise.js.map @@ -0,0 +1 @@ +{"version":3,"file":"fsPromise.js","sourceRoot":"","sources":["../../../src/fs/fsPromise.js"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB,MAAM,CAAC,OAAO,GAAG;IACb,OAAO,CAAC,IAAI;QACR,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC,GAAG,EAAE,KAAK,EAAE,EAAE;gBAC5B,IAAI,GAAG,EAAE;oBACL,MAAM,CAAC,GAAG,CAAC,CAAA;iBACd;qBAAM;oBACH,OAAO,CAAC,KAAK,CAAC,CAAA;iBACjB;YACL,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;IACD,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ;QACrC,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACnC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC,GAAG,EAAE,SAAS,EAAE,EAAE;gBAC7D,IAAI,GAAG,EAAE;oBACL,MAAM,CAAC,GAAG,CAAC,CAAA;iBACd;qBAAM;oBACH,OAAO,CAAC,SAAS,CAAC,CAAA;iBACrB;YACL,CAAC,CAAC,CAAA;QACN,CAAC,CAAC,CAAA;IACN,CAAC;CACJ,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/index.d.ts b/desktop/node_modules/dir-compare/build/src/index.d.ts new file mode 100644 index 0000000..3c7d3fe --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/index.d.ts @@ -0,0 +1,24 @@ +import { Options, Result } from './types'; +import { FileCompareHandlers } from './FileCompareHandlers'; +export * from './types'; +export { FileCompareHandlers }; +/** + * Synchronously compares given paths. + * @param path1 Left file or directory to be compared. + * @param path2 Right file or directory to be compared. + * @param options Comparison options. + */ +export declare function compareSync(path1: string, path2: string, options?: Options): Result; +/** + * Asynchronously compares given paths. + * @param path1 Left file or directory to be compared. + * @param path2 Right file or directory to be compared. + * @param options Comparison options. + */ +export declare function compare(path1: string, path2: string, options?: Options): Promise<Result>; +/** + * File comparison handlers. + * These handlers are used when [[Options.compareContent]] is set. + */ +export declare const fileCompareHandlers: FileCompareHandlers; +//# sourceMappingURL=index.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/index.d.ts.map b/desktop/node_modules/dir-compare/build/src/index.d.ts.map new file mode 100644 index 0000000..b7a9db2 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/index.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAI3D,cAAc,SAAS,CAAA;AACvB,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAE9B;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAkBnF;AAED;;;;;GAKG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAgCxF;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,mBAGjC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/index.js b/desktop/node_modules/dir-compare/build/src/index.js new file mode 100644 index 0000000..b6f6384 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/index.js @@ -0,0 +1,149 @@ +"use strict"; +var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); +}) : (function(o, m, k, k2) { + if (k2 === undefined) k2 = k; + o[k2] = m[k]; +})); +var __exportStar = (this && this.__exportStar) || function(m, exports) { + for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); +}; +var __importDefault = (this && this.__importDefault) || function (mod) { + return (mod && mod.__esModule) ? mod : { "default": mod }; +}; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.fileCompareHandlers = exports.compare = exports.compareSync = void 0; +const path_1 = __importDefault(require("path")); +const fs_1 = __importDefault(require("fs")); +const compareSync_1 = __importDefault(require("./compareSync")); +const compareAsync_1 = __importDefault(require("./compareAsync")); +const defaultResultBuilderCallback_1 = __importDefault(require("./resultBuilder/defaultResultBuilderCallback")); +const defaultFileCompare_1 = require("./fileCompareHandler/default/defaultFileCompare"); +const lineBasedFileCompare_1 = require("./fileCompareHandler/lines/lineBasedFileCompare"); +const defaultNameCompare_1 = __importDefault(require("./nameCompare/defaultNameCompare")); +const entryBuilder_1 = __importDefault(require("./entry/entryBuilder")); +const statisticsLifecycle_1 = __importDefault(require("./statistics/statisticsLifecycle")); +const loopDetector_1 = __importDefault(require("./symlink/loopDetector")); +const ROOT_PATH = path_1.default.sep; +__exportStar(require("./types"), exports); +/** + * Synchronously compares given paths. + * @param path1 Left file or directory to be compared. + * @param path2 Right file or directory to be compared. + * @param options Comparison options. + */ +function compareSync(path1, path2, options) { + // realpathSync() is necessary for loop detection to work properly + const absolutePath1 = path_1.default.normalize(path_1.default.resolve(fs_1.default.realpathSync(path1))); + const absolutePath2 = path_1.default.normalize(path_1.default.resolve(fs_1.default.realpathSync(path2))); + let diffSet; + options = prepareOptions(options); + if (!options.noDiffSet) { + diffSet = []; + } + const statistics = statisticsLifecycle_1.default.initStats(options); + compareSync_1.default(entryBuilder_1.default.buildEntry(absolutePath1, path1, path_1.default.basename(absolutePath1), options), entryBuilder_1.default.buildEntry(absolutePath2, path2, path_1.default.basename(absolutePath2), options), 0, ROOT_PATH, options, statistics, diffSet, loopDetector_1.default.initSymlinkCache()); + statisticsLifecycle_1.default.completeStatistics(statistics, options); + statistics.diffSet = diffSet; + return statistics; +} +exports.compareSync = compareSync; +/** + * Asynchronously compares given paths. + * @param path1 Left file or directory to be compared. + * @param path2 Right file or directory to be compared. + * @param options Comparison options. + */ +function compare(path1, path2, options) { + let absolutePath1, absolutePath2; + return Promise.resolve() + .then(() => Promise.all([wrapper.realPath(path1), wrapper.realPath(path2)])) + .then(realPaths => { + const realPath1 = realPaths[0]; + const realPath2 = realPaths[1]; + // realpath() is necessary for loop detection to work properly + absolutePath1 = path_1.default.normalize(path_1.default.resolve(realPath1)); + absolutePath2 = path_1.default.normalize(path_1.default.resolve(realPath2)); + }) + .then(() => { + options = prepareOptions(options); + let asyncDiffSet; + if (!options.noDiffSet) { + asyncDiffSet = []; + } + const statistics = statisticsLifecycle_1.default.initStats(options); + return compareAsync_1.default(entryBuilder_1.default.buildEntry(absolutePath1, path1, path_1.default.basename(path1), options), entryBuilder_1.default.buildEntry(absolutePath2, path2, path_1.default.basename(path2), options), 0, ROOT_PATH, options, statistics, asyncDiffSet, loopDetector_1.default.initSymlinkCache()) + .then(() => { + statisticsLifecycle_1.default.completeStatistics(statistics, options); + if (!(options === null || options === void 0 ? void 0 : options.noDiffSet)) { + const diffSet = []; + rebuildAsyncDiffSet(statistics, asyncDiffSet, diffSet); + statistics.diffSet = diffSet; + } + return statistics; + }); + }); +} +exports.compare = compare; +/** + * File comparison handlers. + * These handlers are used when [[Options.compareContent]] is set. + */ +exports.fileCompareHandlers = { + defaultFileCompare: defaultFileCompare_1.defaultFileCompare, + lineBasedFileCompare: lineBasedFileCompare_1.lineBasedFileCompare +}; +const wrapper = { + realPath(path, options) { + return new Promise((resolve, reject) => { + fs_1.default.realpath(path, options, (err, resolvedPath) => { + if (err) { + reject(err); + } + else { + resolve(resolvedPath); + } + }); + }); + } +}; +function prepareOptions(options) { + options = options || {}; + const clone = JSON.parse(JSON.stringify(options)); + clone.resultBuilder = options.resultBuilder; + clone.compareFileSync = options.compareFileSync; + clone.compareFileAsync = options.compareFileAsync; + clone.compareNameHandler = options.compareNameHandler; + if (!clone.resultBuilder) { + clone.resultBuilder = defaultResultBuilderCallback_1.default; + } + if (!clone.compareFileSync) { + clone.compareFileSync = defaultFileCompare_1.defaultFileCompare.compareSync; + } + if (!clone.compareFileAsync) { + clone.compareFileAsync = defaultFileCompare_1.defaultFileCompare.compareAsync; + } + if (!clone.compareNameHandler) { + clone.compareNameHandler = defaultNameCompare_1.default; + } + clone.dateTolerance = clone.dateTolerance || 1000; + clone.dateTolerance = Number(clone.dateTolerance); + if (isNaN(clone.dateTolerance)) { + throw new Error('Date tolerance is not a number'); + } + return clone; +} +// Async diffsets are kept into recursive structures. +// This method transforms them into one dimensional arrays. +function rebuildAsyncDiffSet(statistics, asyncDiffSet, diffSet) { + asyncDiffSet.forEach(rawDiff => { + if (!Array.isArray(rawDiff)) { + diffSet.push(rawDiff); + } + else { + rebuildAsyncDiffSet(statistics, rawDiff, diffSet); + } + }); +} +//# sourceMappingURL=index.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/index.js.map b/desktop/node_modules/dir-compare/build/src/index.js.map new file mode 100644 index 0000000..9d6be75 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA4B;AAC5B,4CAAmB;AACnB,gEAA+C;AAC/C,kEAAiD;AACjD,gHAAuF;AACvF,wFAAoF;AACpF,0FAAsF;AACtF,0FAAiE;AACjE,wEAA+C;AAC/C,2FAA6D;AAC7D,0EAAiD;AAIjD,MAAM,SAAS,GAAG,cAAS,CAAC,GAAG,CAAA;AAE/B,0CAAuB;AAGvB;;;;;GAKG;AACH,SAAgB,WAAW,CAAC,KAAa,EAAE,KAAa,EAAE,OAAiB;IACvE,kEAAkE;IAClE,MAAM,aAAa,GAAG,cAAS,CAAC,SAAS,CAAC,cAAS,CAAC,OAAO,CAAC,YAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACpF,MAAM,aAAa,GAAG,cAAS,CAAC,SAAS,CAAC,cAAS,CAAC,OAAO,CAAC,YAAE,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACpF,IAAI,OAAO,CAAA;IACX,OAAO,GAAG,cAAc,CAAC,OAAO,CAAC,CAAA;IACjC,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE;QACpB,OAAO,GAAG,EAAE,CAAA;KACf;IACD,MAAM,UAAU,GAAG,6BAAc,CAAC,SA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aAAa,CAAC,EAAE;QAC5B,MAAM,IAAI,KAAK,CAAC,gCAAgC,CAAC,CAAA;KACpD;IACD,OAAO,KAAK,CAAA;AAChB,CAAC;AAGD,qDAAqD;AACrD,2DAA2D;AAC3D,SAAS,mBAAmB,CAAC,UAAU,EAAE,YAAY,EAAE,OAAO;IAC1D,YAAY,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE;YACzB,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;SACxB;aAAM;YACH,mBAAmB,CAAC,UAAU,EAAE,OAAO,EAAE,OAAO,CAAC,CAAA;SACpD;IACL,CAAC,CAAC,CAAA;AACN,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.d.ts b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.d.ts new file mode 100644 index 0000000..c71f066 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.d.ts @@ -0,0 +1,3 @@ +declare function _exports(name1: any, name2: any, options: any): 1 | 0 | -1; +export = _exports; +//# sourceMappingURL=defaultNameCompare.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.d.ts.map b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.d.ts.map new file mode 100644 index 0000000..f8b4c67 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultNameCompare.d.ts","sourceRoot":"","sources":["../../../src/nameCompare/defaultNameCompare.js"],"names":[],"mappings":"AACiB,4EAMhB"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.js b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.js new file mode 100644 index 0000000..a5e1006 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.js @@ -0,0 +1,11 @@ +module.exports = function compareName(name1, name2, options) { + if (options.ignoreCase) { + name1 = name1.toLowerCase(); + name2 = name2.toLowerCase(); + } + return strcmp(name1, name2); +}; +function strcmp(str1, str2) { + return ((str1 === str2) ? 0 : ((str1 > str2) ? 1 : -1)); +} +//# sourceMappingURL=defaultNameCompare.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.js.map b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.js.map new file mode 100644 index 0000000..8d51823 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/nameCompare/defaultNameCompare.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultNameCompare.js","sourceRoot":"","sources":["../../../src/nameCompare/defaultNameCompare.js"],"names":[],"mappings":"AACA,MAAM,CAAC,OAAO,GAAG,SAAS,WAAW,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO;IAC1D,IAAI,OAAO,CAAC,UAAU,EAAE;QACvB,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAA;QAC3B,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAA;KAC3B;IACD,OAAO,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAA;AAC5B,CAAC,CAAA;AAED,SAAS,MAAM,CAAC,IAAI,EAAE,IAAI;IACzB,OAAO,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;AACxD,CAAC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.d.ts b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.d.ts new file mode 100644 index 0000000..bf71d4e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.d.ts @@ -0,0 +1,5 @@ +import { Entry, PermissionDeniedState } from "../types"; +export declare function getPermissionDeniedState(entry1: Entry, entry2: Entry): PermissionDeniedState; +export declare function getPrmissionDenieStateWhenLeftMissing(entry2: Entry): PermissionDeniedState; +export declare function getPrmissionDenieStateWhenRightMissing(entry1: Entry): PermissionDeniedState; +//# sourceMappingURL=permissionDeniedState.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.d.ts.map b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.d.ts.map new file mode 100644 index 0000000..f880c9e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"permissionDeniedState.d.ts","sourceRoot":"","sources":["../../../src/permissions/permissionDeniedState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAA;AAEvD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,GAAG,qBAAqB,CAU5F;AAED,wBAAgB,qCAAqC,CAAC,MAAM,EAAE,KAAK,GAAG,qBAAqB,CAM1F;AAED,wBAAgB,sCAAsC,CAAC,MAAM,EAAE,KAAK,GAAG,qBAAqB,CAM3F"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.js b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.js new file mode 100644 index 0000000..6aa4aa6 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.js @@ -0,0 +1,35 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.getPrmissionDenieStateWhenRightMissing = exports.getPrmissionDenieStateWhenLeftMissing = exports.getPermissionDeniedState = void 0; +function getPermissionDeniedState(entry1, entry2) { + if (entry1.isPermissionDenied && entry2.isPermissionDenied) { + return "access-error-both"; + } + else if (entry1.isPermissionDenied) { + return "access-error-left"; + } + else if (entry2.isPermissionDenied) { + return "access-error-right"; + } + else { + return "access-ok"; + } +} +exports.getPermissionDeniedState = getPermissionDeniedState; +function getPrmissionDenieStateWhenLeftMissing(entry2) { + let permissionDeniedState = "access-ok"; + if (entry2.isPermissionDenied) { + permissionDeniedState = "access-error-right"; + } + return permissionDeniedState; +} +exports.getPrmissionDenieStateWhenLeftMissing = getPrmissionDenieStateWhenLeftMissing; +function getPrmissionDenieStateWhenRightMissing(entry1) { + let permissionDeniedState = "access-ok"; + if (entry1.isPermissionDenied) { + permissionDeniedState = "access-error-left"; + } + return permissionDeniedState; +} +exports.getPrmissionDenieStateWhenRightMissing = getPrmissionDenieStateWhenRightMissing; +//# sourceMappingURL=permissionDeniedState.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.js.map b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.js.map new file mode 100644 index 0000000..43688d5 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/permissions/permissionDeniedState.js.map @@ -0,0 +1 @@ +{"version":3,"file":"permissionDeniedState.js","sourceRoot":"","sources":["../../../src/permissions/permissionDeniedState.ts"],"names":[],"mappings":";;;AAEA,SAAgB,wBAAwB,CAAC,MAAa,EAAE,MAAa;IACjE,IAAI,MAAM,CAAC,kBAAkB,IAAI,MAAM,CAAC,kBAAkB,EAAE;QACxD,OAAO,mBAAmB,CAAA;KAC7B;SAAM,IAAI,MAAM,CAAC,kBAAkB,EAAE;QAClC,OAAO,mBAAmB,CAAA;KAC7B;SAAM,IAAI,MAAM,CAAC,kBAAkB,EAAE;QAClC,OAAO,oBAAoB,CAAA;KAC9B;SAAM;QACH,OAAO,WAAW,CAAA;KACrB;AACL,CAAC;AAVD,4DAUC;AAED,SAAgB,qCAAqC,CAAC,MAAa;IAC/D,IAAI,qBAAqB,GAA0B,WAAW,CAAA;IAC9D,IAAI,MAAM,CAAC,kBAAkB,EAAE;QAC3B,qBAAqB,GAAG,oBAAoB,CAAA;KAC/C;IACD,OAAO,qBAAqB,CAAA;AAChC,CAAC;AAND,sFAMC;AAED,SAAgB,sCAAsC,CAAC,MAAa;IAChE,IAAI,qBAAqB,GAA0B,WAAW,CAAA;IAC9D,IAAI,MAAM,CAAC,kBAAkB,EAAE;QAC3B,qBAAqB,GAAG,mBAAmB,CAAA;KAC9C;IACD,OAAO,qBAAqB,CAAA;AAChC,CAAC;AAND,wFAMC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.d.ts b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.d.ts new file mode 100644 index 0000000..e6ea43a --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.d.ts @@ -0,0 +1,3 @@ +declare function _exports(entry1: any, entry2: any, state: any, level: any, relativePath: any, options: any, statistics: any, diffSet: any, reason: any, permissionDeniedState: any): void; +export = _exports; +//# sourceMappingURL=defaultResultBuilderCallback.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.d.ts.map b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.d.ts.map new file mode 100644 index 0000000..95572db --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultResultBuilderCallback.d.ts","sourceRoot":"","sources":["../../../src/resultBuilder/defaultResultBuilderCallback.js"],"names":[],"mappings":"AAGiB,2LAqBhB"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.js b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.js new file mode 100644 index 0000000..82f747c --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.js @@ -0,0 +1,25 @@ +const pathUtils = require('path'); +const entryType = require('../entry/entryType'); +module.exports = function (entry1, entry2, state, level, relativePath, options, statistics, diffSet, reason, permissionDeniedState) { + if (options.noDiffSet) { + return; + } + diffSet.push({ + path1: entry1 ? pathUtils.dirname(entry1.path) : undefined, + path2: entry2 ? pathUtils.dirname(entry2.path) : undefined, + relativePath: relativePath, + name1: entry1 ? entry1.name : undefined, + name2: entry2 ? entry2.name : undefined, + state: state, + permissionDeniedState, + type1: entryType.getType(entry1), + type2: entryType.getType(entry2), + level: level, + size1: entry1 ? entry1.stat.size : undefined, + size2: entry2 ? entry2.stat.size : undefined, + date1: entry1 ? entry1.stat.mtime : undefined, + date2: entry2 ? entry2.stat.mtime : undefined, + reason: reason + }); +}; +//# sourceMappingURL=defaultResultBuilderCallback.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.js.map b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.js.map new file mode 100644 index 0000000..425651d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/resultBuilder/defaultResultBuilderCallback.js.map @@ -0,0 +1 @@ +{"version":3,"file":"defaultResultBuilderCallback.js","sourceRoot":"","sources":["../../../src/resultBuilder/defaultResultBuilderCallback.js"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAAA;AACjC,MAAM,SAAS,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAA;AAE/C,MAAM,CAAC,OAAO,GAAG,UAAU,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,EAAE,qBAAqB;IAC9H,IAAI,OAAO,CAAC,SAAS,EAAE;QACnB,OAAM;KACT;IACD,OAAO,CAAC,IAAI,CAAC;QACT,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;QAC1D,YAAY,EAAE,YAAY;QAC1B,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACvC,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QACvC,KAAK,EAAE,KAAK;QACZ,qBAAqB;QACrB,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC,KAAK,EAAE,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC;QAChC,KAAK,EAAE,KAAK;QACZ,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QAC5C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;QAC5C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;QAC7C,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;QAC7C,MAAM,EAAE,MAAM;KACjB,CAAC,CAAA;AACN,CAAC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.d.ts b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.d.ts new file mode 100644 index 0000000..42f6c68 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.d.ts @@ -0,0 +1,69 @@ +export function initStats(options: any): { + distinct: number; + equal: number; + left: number; + right: number; + distinctFiles: number; + equalFiles: number; + leftFiles: number; + rightFiles: number; + distinctDirs: number; + equalDirs: number; + leftDirs: number; + rightDirs: number; + brokenLinks: { + leftBrokenLinks: number; + rightBrokenLinks: number; + distinctBrokenLinks: number; + }; + symlinks: { + distinctSymlinks: number; + equalSymlinks: number; + leftSymlinks: number; + rightSymlinks: number; + differencesSymlinks: number; + totalSymlinks: number; + } | undefined; + permissionDenied: { + leftPermissionDenied: number; + rightPermissionDenied: number; + distinctPermissionDenied: number; + }; + same: undefined; +}; +export function initStats(options: any): { + distinct: number; + equal: number; + left: number; + right: number; + distinctFiles: number; + equalFiles: number; + leftFiles: number; + rightFiles: number; + distinctDirs: number; + equalDirs: number; + leftDirs: number; + rightDirs: number; + brokenLinks: { + leftBrokenLinks: number; + rightBrokenLinks: number; + distinctBrokenLinks: number; + }; + symlinks: { + distinctSymlinks: number; + equalSymlinks: number; + leftSymlinks: number; + rightSymlinks: number; + differencesSymlinks: number; + totalSymlinks: number; + } | undefined; + permissionDenied: { + leftPermissionDenied: number; + rightPermissionDenied: number; + distinctPermissionDenied: number; + }; + same: undefined; +}; +export function completeStatistics(statistics: any, options: any): void; +export function completeStatistics(statistics: any, options: any): void; +//# sourceMappingURL=statisticsLifecycle.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.d.ts.map b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.d.ts.map new file mode 100644 index 0000000..ee8c1ae --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"statisticsLifecycle.d.ts","sourceRoot":"","sources":["../../../src/statistics/statisticsLifecycle.js"],"names":[],"mappings":"AAII;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCC;AAxCD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwCC;AAED,wEAkBC;AAlBD,wEAkBC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.js b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.js new file mode 100644 index 0000000..b12843d --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.js @@ -0,0 +1,65 @@ +/** + * Controls creation/completion of global statistics object. + */ +module.exports = { + initStats(options) { + let symlinkStatistics = undefined; + if (options.compareSymlink) { + symlinkStatistics = { + distinctSymlinks: 0, + equalSymlinks: 0, + leftSymlinks: 0, + rightSymlinks: 0, + differencesSymlinks: 0, + totalSymlinks: 0, + }; + } + const brokenLinksStatistics = { + leftBrokenLinks: 0, + rightBrokenLinks: 0, + distinctBrokenLinks: 0, + }; + const permissionDeniedStatistics = { + leftPermissionDenied: 0, + rightPermissionDenied: 0, + distinctPermissionDenied: 0, + }; + return { + distinct: 0, + equal: 0, + left: 0, + right: 0, + distinctFiles: 0, + equalFiles: 0, + leftFiles: 0, + rightFiles: 0, + distinctDirs: 0, + equalDirs: 0, + leftDirs: 0, + rightDirs: 0, + brokenLinks: brokenLinksStatistics, + symlinks: symlinkStatistics, + permissionDenied: permissionDeniedStatistics, + same: undefined + }; + }, + completeStatistics(statistics, options) { + statistics.differences = statistics.distinct + statistics.left + statistics.right; + statistics.differencesFiles = statistics.distinctFiles + statistics.leftFiles + statistics.rightFiles; + statistics.differencesDirs = statistics.distinctDirs + statistics.leftDirs + statistics.rightDirs; + statistics.total = statistics.equal + statistics.differences; + statistics.totalFiles = statistics.equalFiles + statistics.differencesFiles; + statistics.totalDirs = statistics.equalDirs + statistics.differencesDirs; + const brokenLInksStats = statistics.brokenLinks; + brokenLInksStats.totalBrokenLinks = brokenLInksStats.leftBrokenLinks + brokenLInksStats.rightBrokenLinks + brokenLInksStats.distinctBrokenLinks; + const permissionDeniedStats = statistics.permissionDenied; + permissionDeniedStats.totalPermissionDenied = permissionDeniedStats.leftPermissionDenied + permissionDeniedStats.rightPermissionDenied + permissionDeniedStats.distinctPermissionDenied; + statistics.same = statistics.differences ? false : true; + if (options.compareSymlink) { + statistics.symlinks.differencesSymlinks = statistics.symlinks.distinctSymlinks + + statistics.symlinks.leftSymlinks + statistics.symlinks.rightSymlinks; + statistics.symlinks.totalSymlinks = statistics.symlinks.differencesSymlinks + statistics.symlinks.equalSymlinks; + } + } +}; +//# sourceMappingURL=statisticsLifecycle.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.js.map b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.js.map new file mode 100644 index 0000000..4e46f81 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsLifecycle.js.map @@ -0,0 +1 @@ +{"version":3,"file":"statisticsLifecycle.js","sourceRoot":"","sources":["../../../src/statistics/statisticsLifecycle.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACb,SAAS,CAAC,OAAO;QACb,IAAI,iBAAiB,GAAG,SAAS,CAAA;QACjC,IAAI,OAAO,CAAC,cAAc,EAAE;YACxB,iBAAiB,GAAG;gBAChB,gBAAgB,EAAE,CAAC;gBACnB,aAAa,EAAE,CAAC;gBAChB,YAAY,EAAE,CAAC;gBACf,aAAa,EAAE,CAAC;gBAChB,mBAAmB,EAAE,CAAC;gBACtB,aAAa,EAAE,CAAC;aACnB,CAAA;SACJ;QACD,MAAM,qBAAqB,GAAG;YAC1B,eAAe,EAAE,CAAC;YAClB,gBAAgB,EAAE,CAAC;YACnB,mBAAmB,EAAE,CAAC;SACzB,CAAA;QACD,MAAM,0BAA0B,GAAG;YAC/B,oBAAoB,EAAE,CAAC;YACvB,qBAAqB,EAAE,CAAC;YACxB,wBAAwB,EAAE,CAAC;SAC9B,CAAA;QACD,OAAO;YACH,QAAQ,EAAE,CAAC;YACX,KAAK,EAAE,CAAC;YACR,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;YACR,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AC,wBAAwB,CAAA;QACvL,UAAU,CAAC,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAA;QAEvD,IAAI,OAAO,CAAC,cAAc,EAAE;YACxB,UAAU,CAAC,QAAQ,CAAC,mBAAmB,GAAG,UAAU,CAAC,QAAQ,CAAC,gBAAgB;gBAC1E,UAAU,CAAC,QAAQ,CAAC,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAA;YACxE,UAAU,CAAC,QAAQ,CAAC,aAAa,GAAG,UAAU,CAAC,QAAQ,CAAC,mBAAmB,GAAG,UAAU,CAAC,QAAQ,CAAC,aAAa,CAAA;SAClH;IACL,CAAC;CAEJ,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.d.ts b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.d.ts new file mode 100644 index 0000000..66e85c3 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.d.ts @@ -0,0 +1,7 @@ +export function updateStatisticsBoth(entry1: any, entry2: any, same: any, reason: any, type: any, permissionDeniedState: any, statistics: any, options: any): void; +export function updateStatisticsBoth(entry1: any, entry2: any, same: any, reason: any, type: any, permissionDeniedState: any, statistics: any, options: any): void; +export function updateStatisticsLeft(entry1: any, type: any, permissionDeniedState: any, statistics: any, options: any): void; +export function updateStatisticsLeft(entry1: any, type: any, permissionDeniedState: any, statistics: any, options: any): void; +export function updateStatisticsRight(entry2: any, type: any, permissionDeniedState: any, statistics: any, options: any): void; +export function updateStatisticsRight(entry2: any, type: any, permissionDeniedState: any, statistics: any, options: any): void; +//# sourceMappingURL=statisticsUpdate.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.d.ts.map b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.d.ts.map new file mode 100644 index 0000000..4d5c89e --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"statisticsUpdate.d.ts","sourceRoot":"","sources":["../../../src/statistics/statisticsUpdate.js"],"names":[],"mappings":"AAII,mKA+BC;AA/BD,mKA+BC;AACD,8HAmBC;AAnBD,8HAmBC;AACD,+HAmBC;AAnBD,+HAmBC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.js b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.js new file mode 100644 index 0000000..cfcb36b --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.js @@ -0,0 +1,84 @@ +/** + * Calculates comparison statistics. + */ +module.exports = { + updateStatisticsBoth(entry1, entry2, same, reason, type, permissionDeniedState, statistics, options) { + same ? statistics.equal++ : statistics.distinct++; + if (type === 'file') { + same ? statistics.equalFiles++ : statistics.distinctFiles++; + } + else if (type === 'directory') { + same ? statistics.equalDirs++ : statistics.distinctDirs++; + } + else if (type === 'broken-link') { + statistics.brokenLinks.distinctBrokenLinks++; + } + else { + throw new Error('Unexpected type ' + type); + } + const isSymlink1 = entry1 ? entry1.isSymlink : false; + const isSymlink2 = entry2 ? entry2.isSymlink : false; + const isSymlink = isSymlink1 || isSymlink2; + if (options.compareSymlink && isSymlink) { + const symlinks = statistics.symlinks; + if (reason === 'different-symlink') { + symlinks.distinctSymlinks++; + } + else { + symlinks.equalSymlinks++; + } + } + if (permissionDeniedState === "access-error-left") { + statistics.permissionDenied.leftPermissionDenied++; + } + else if (permissionDeniedState === "access-error-right") { + statistics.permissionDenied.rightPermissionDenied++; + } + else if (permissionDeniedState === "access-error-both") { + statistics.permissionDenied.distinctPermissionDenied++; + } + }, + updateStatisticsLeft(entry1, type, permissionDeniedState, statistics, options) { + statistics.left++; + if (type === 'file') { + statistics.leftFiles++; + } + else if (type === 'directory') { + statistics.leftDirs++; + } + else if (type === 'broken-link') { + statistics.brokenLinks.leftBrokenLinks++; + } + else { + throw new Error('Unexpected type ' + type); + } + if (options.compareSymlink && entry1.isSymlink) { + statistics.symlinks.leftSymlinks++; + } + if (permissionDeniedState === "access-error-left") { + statistics.permissionDenied.leftPermissionDenied++; + } + }, + updateStatisticsRight(entry2, type, permissionDeniedState, statistics, options) { + statistics.right++; + if (type === 'file') { + statistics.rightFiles++; + } + else if (type === 'directory') { + statistics.rightDirs++; + } + else if (type === 'broken-link') { + statistics.brokenLinks.rightBrokenLinks++; + } + else { + throw new Error('Unexpected type ' + type); + } + if (options.compareSymlink && entry2.isSymlink) { + statistics.symlinks.rightSymlinks++; + } + if (permissionDeniedState === "access-error-right") { + statistics.permissionDenied.rightPermissionDenied++; + } + }, +}; +//# sourceMappingURL=statisticsUpdate.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.js.map b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.js.map new file mode 100644 index 0000000..667a8f2 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/statistics/statisticsUpdate.js.map @@ -0,0 +1 @@ +{"version":3,"file":"statisticsUpdate.js","sourceRoot":"","sources":["../../../src/statistics/statisticsUpdate.js"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IACb,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE,UAAU,EAAE,OAAO;QAC/F,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAA;QACjD,IAAI,IAAI,KAAK,MAAM,EAAE;YACjB,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,aAAa,EAAE,CAAA;SAC9D;aAAM,IAAI,IAAI,KAAK,WAAW,EAAE;YAC7B,IAAI,CAAC,C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node_modules/dir-compare/build/src/symlink/loopDetector.d.ts new file mode 100644 index 0000000..162c966 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.d.ts @@ -0,0 +1,21 @@ +export function detectLoop(entry: any, symlinkCache: any): boolean; +export function detectLoop(entry: any, symlinkCache: any): boolean; +export function initSymlinkCache(): { + dir1: {}; + dir2: {}; +}; +export function initSymlinkCache(): { + dir1: {}; + dir2: {}; +}; +export function updateSymlinkCache(symlinkCache: any, rootEntry1: any, rootEntry2: any, loopDetected1: any, loopDetected2: any): void; +export function updateSymlinkCache(symlinkCache: any, rootEntry1: any, rootEntry2: any, loopDetected1: any, loopDetected2: any): void; +export function cloneSymlinkCache(symlinkCache: any): { + dir1: {}; + dir2: {}; +}; +export function cloneSymlinkCache(symlinkCache: any): { + dir1: {}; + dir2: {}; +}; +//# sourceMappingURL=loopDetector.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.d.ts.map b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.d.ts.map new file mode 100644 index 0000000..8a189b7 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"loopDetector.d.ts","sourceRoot":"","sources":["../../../src/symlink/loopDetector.js"],"names":[],"mappings":"AAMC,mEAQC;AARD,mEAQC;AAED;;;EAKC;AALD;;;EAKC;AAED,sIAUC;AAVD,sIAUC;AAED;;;EAKC;AALD;;;EAKC"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.js b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.js new file mode 100644 index 0000000..2e1bce7 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.js @@ -0,0 +1,46 @@ +const fs = require('fs'); +/** + * Provides symlink loop detection to directory traversal algorithm. + */ +module.exports = { + detectLoop(entry, symlinkCache) { + if (entry && entry.isSymlink) { + const realPath = fs.realpathSync(entry.absolutePath); + if (symlinkCache[realPath]) { + return true; + } + } + return false; + }, + initSymlinkCache() { + return { + dir1: {}, + dir2: {} + }; + }, + updateSymlinkCache(symlinkCache, rootEntry1, rootEntry2, loopDetected1, loopDetected2) { + let symlinkCachePath1, symlinkCachePath2; + if (rootEntry1 && !loopDetected1) { + symlinkCachePath1 = rootEntry1.isSymlink ? fs.realpathSync(rootEntry1.absolutePath) : rootEntry1.absolutePath; + symlinkCache.dir1[symlinkCachePath1] = true; + } + if (rootEntry2 && !loopDetected2) { + symlinkCachePath2 = rootEntry2.isSymlink ? fs.realpathSync(rootEntry2.absolutePath) : rootEntry2.absolutePath; + symlinkCache.dir2[symlinkCachePath2] = true; + } + }, + cloneSymlinkCache(symlinkCache) { + return { + dir1: shallowClone(symlinkCache.dir1), + dir2: shallowClone(symlinkCache.dir2) + }; + }, +}; +function shallowClone(obj) { + const cloned = {}; + Object.keys(obj).forEach(key => { + cloned[key] = obj[key]; + }); + return cloned; +} +//# sourceMappingURL=loopDetector.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.js.map b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.js.map new file mode 100644 index 0000000..3fda382 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/symlink/loopDetector.js.map @@ -0,0 +1 @@ +{"version":3,"file":"loopDetector.js","sourceRoot":"","sources":["../../../src/symlink/loopDetector.js"],"names":[],"mappings":"AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;AAExB;;GAEG;AACH,MAAM,CAAC,OAAO,GAAG;IAChB,UAAU,CAAC,KAAK,EAAE,YAAY;QAC7B,IAAI,KAAK,IAAI,KAAK,CAAC,SAAS,EAAE;YAC7B,MAAM,QAAQ,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,YAAY,CAAC,CAAA;YACpD,IAAI,YAAY,CAAC,QAAQ,CAAC,EAAE;gBAC3B,OAAO,IAAI,C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
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/types.d.ts b/desktop/node_modules/dir-compare/build/src/types.d.ts new file mode 100644 index 0000000..b9545e5 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/types.d.ts @@ -0,0 +1,448 @@ +/// <reference types="node" /> +import * as fs from "fs"; +/** + * Comparison options. + */ +export interface Options { + /** + * Properties to be used in various extension points ie. result builder. + */ + [key: string]: any; + /** + * Compares files by size. Defaults to 'false'. + * + * Usually one of `compareSize` or `compareContent` options has to be activated. Otherwise files are compared by name disregarding size or content. + */ + compareSize?: boolean; + /** + * Compares files by content. Defaults to 'false'. + * + * Usually one of `compareSize` or `compareContent` options has to be activated. Otherwise files are compared by name disregarding size or content. + */ + compareContent?: boolean; + /** + * Compares files by date of modification (stat.mtime). Defaults to 'false'. + * + * Also see [[Options.dateTolerance]]. + */ + compareDate?: boolean; + /** + * Two files are considered to have the same date if the difference between their modification dates fits within date tolerance. Defaults to 1000 ms. + */ + dateTolerance?: number; + /** + * Compares entries by symlink. Defaults to 'false'. + + * If this option is enabled two entries must have the same type in order to be considered equal. + * They have to be either two fies, two directories or two symlinks. + * + * If left entry is a file and right entry is a symlink, they are considered distinct disregarding the content of the file. + * + * Further if both entries are symlinks they need to have the same link value. For example if one symlink points to '/x/b.txt' and the other to '/x/../x/b.txt' the symlinks are considered distinct even if they point to the same file. + */ + compareSymlink?: boolean; + /** + * Skips sub directories. Defaults to 'false'. + */ + skipSubdirs?: boolean; + /** + * Ignore empty directories. Defaults to 'false'. + */ + skipEmptyDirs?: boolean; + /** + * Ignore symbolic links. Defaults to 'false'. + */ + skipSymlinks?: boolean; + /** + * Ignores case when comparing names. Defaults to 'false'. + */ + ignoreCase?: boolean; + /** + * Toggles presence of diffSet in output. If true, only statistics are provided. Use this when comparing large number of files to avoid out of memory situations. Defaults to 'false'. + */ + noDiffSet?: boolean; + /** + * File name filter. Comma separated minimatch patterns. See [Glob patterns](https://github.com/gliviu/dir-compare#glob-patterns). + */ + includeFilter?: string; + /** + * File/directory name exclude filter. Comma separated minimatch patterns. See [Glob patterns](https://github.com/gliviu/dir-compare#glob-patterns) + */ + excludeFilter?: string; + /** + * Handle permission denied errors. Defaults to 'false'. + * + * By default when some entry cannot be read due to `EACCES` error the comparison will + * stop immediately with an exception. + * + * If `handlePermissionDenied` is set to true the comparison will continue when unreadable entries are encountered. + * + * Offending entries will be reported within [[Difference.permissionDeniedState]], [[Difference.reason]] and [[Result.permissionDenied]]. + * + * Lets consider we want to compare two identical folders `A` and `B` with `B/dir2` being unreadable for the current user. + * ``` + * A B + * ├── dir1 ├── dir1 + * ├──── file1 ├──── file1 + * ├── dir2 ├── dir2 (permission denied) + * └─────file2 └─────file2 + * ``` + * + * [[Result.diffSet]] will look like: + * + * |relativePath |path1 |path2 | state |reason |permissionDeniedState| + * |--------------|---------|---------|------------|------------------------|---------------------| + * |[/] |dir1 |dir1 |`equal` | | | + * |[/dir1] |file1 |file1 |`equal` | | | + * |[/] |dir2 |dir2 |`distinct` | `permission-denied` |`access-error-right` | + * |[/dir2] |file2 |missing |`left` | | | + * + * And [[Result.permissionDenied]] statistics look like - left: 0, right: 1, distinct: 0, total: 1 + * + */ + handlePermissionDenied?: boolean; + /** + * Callback for constructing result. Called for each compared entry pair. + * + * Updates 'statistics' and 'diffSet'. + * + * See [Custom result builder](https://github.com/gliviu/dir-compare#custom-result-builder). + */ + resultBuilder?: ResultBuilder; + /** + * File comparison handler. See [Custom file comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators). + */ + compareFileSync?: CompareFileSync; + /** + * File comparison handler. See [Custom file comparators](https://github.com/gliviu/dir-compare#custom-file-content-comparators). + */ + compareFileAsync?: CompareFileAsync; + /** + * Entry name comparison handler. See [Custom name comparators](https://github.com/gliviu/dir-compare#custom-name-comparators). + */ + compareNameHandler?: CompareNameHandler; +} +/** + * Callback for constructing result. Called for each compared entry pair. + * + * Updates 'statistics' and 'diffSet'. + */ +export declare type ResultBuilder = +/** + * @param entry1 Left entry. + * @param entry2 Right entry. + * @param state See [[DifferenceState]]. + * @param level Depth level relative to root dir. + * @param relativePath Path relative to root dir. + * @param statistics Statistics to be updated. + * @param diffSet Status per each entry to be appended. + * Do not append if [[Options.noDiffSet]] is false. + * @param reason See [[Reason]]. Not available if entries are equal. + */ +(entry1: Entry | undefined, entry2: Entry | undefined, state: DifferenceState, level: number, relativePath: string, options: Options, statistics: Statistics, diffSet: Array<Difference> | undefined, reason: Reason | undefined) => void; +export interface Entry { + name: string; + absolutePath: string; + path: string; + stat: fs.Stats; + lstat: fs.Stats; + symlink: boolean; + /** + * True when this entry is not readable. + * This value is set only when [[Options.handlePermissionDenied]] is enabled. + */ + isPermissionDenied: boolean; +} +/** + * Comparison result. + */ +export interface Result extends Statistics { + /** + * List of changes (present if [[Options.noDiffSet]] is false). + */ + diffSet?: Array<Difference>; +} +export interface Statistics { + /** + * Any property is allowed if default result builder is not used. + */ + [key: string]: any; + /** + * True if directories are identical. + */ + same: boolean; + /** + * Number of distinct entries. + */ + distinct: number; + /** + * Number of equal entries. + */ + equal: number; + /** + * Number of entries only in path1. + */ + left: number; + /** + * Number of entries only in path2. + */ + right: number; + /** + * Total number of differences (distinct+left+right). + */ + differences: number; + /** + * Total number of entries (differences+equal). + */ + total: number; + /** + * Number of distinct files. + */ + distinctFiles: number; + /** + * Number of equal files. + */ + equalFiles: number; + /** + * Number of files only in path1. + */ + leftFiles: number; + /** + * Number of files only in path2 + */ + rightFiles: number; + /** + * Total number of different files (distinctFiles+leftFiles+rightFiles). + */ + differencesFiles: number; + /** + * Total number of files (differencesFiles+equalFiles). + */ + totalFiles: number; + /** + * Number of distinct directories. + */ + distinctDirs: number; + /** + * Number of equal directories. + */ + equalDirs: number; + /** + * Number of directories only in path1. + */ + leftDirs: number; + /** + * Number of directories only in path2. + */ + rightDirs: number; + /** + * Total number of different directories (distinctDirs+leftDirs+rightDirs). + */ + differencesDirs: number; + /** + * Total number of directories (differencesDirs+equalDirs). + */ + totalDirs: number; + /** + * Stats about broken links. + */ + brokenLinks: BrokenLinksStatistics; + /** + * Statistics available if 'compareSymlink' options is used. + */ + symlinks?: SymlinkStatistics; + /** + * Stats about entries that could not be accessed. + */ + permissionDenied: PermissionDeniedStatistics; +} +export interface BrokenLinksStatistics { + /** + * Number of broken links only in path1 + */ + leftBrokenLinks: number; + /** + * Number of broken links only in path2 + */ + rightBrokenLinks: number; + /** + * Number of broken links with same name appearing in both path1 and path2 (leftBrokenLinks + rightBrokenLinks + distinctBrokenLinks) + */ + distinctBrokenLinks: number; + /** + * Total number of broken links + */ + totalBrokenLinks: number; +} +export interface PermissionDeniedStatistics { + /** + * Number of forbidden entries found only in path1 + */ + leftPermissionDenied: number; + /** + * Number of forbidden entries found only in path2 + */ + rightPermissionDenied: number; + /** + * Number of forbidden entries with same name appearing in both path1 and path2 (leftPermissionDenied + rightPermissionDenied + distinctPermissionDenied) + */ + distinctPermissionDenied: number; + /** + * Total number of forbidden entries + */ + totalPermissionDenied: number; +} +export interface SymlinkStatistics { + /** + * Number of distinct links. + */ + distinctSymlinks: number; + /** + * Number of equal links. + */ + equalSymlinks: number; + /** + * Number of links only in path1. + */ + leftSymlinks: number; + /** + * Number of links only in path2 + */ + rightSymlinks: number; + /** + * Total number of different links (distinctSymlinks+leftSymlinks+rightSymlinks). + */ + differencesSymlinks: number; + /** + * Total number of links (differencesSymlinks+equalSymlinks). + */ + totalSymlinks: number; +} +/** + * State of left/right entries relative to each other. + * * `equal` - Identical entries are found in both left/right dirs. + * * `left` - Entry is found only in left dir. + * * `right` - Entry is found only in right dir. + * * `distinct` - Entries exist in both left/right dir but have different content. See [[Difference.reason]] to understan why entries are considered distinct. + */ +export declare type DifferenceState = "equal" | "left" | "right" | "distinct"; +/** + * Permission related state of left/right entries. Available only when [[Options.handlePermissionDenied]] is enabled. + * * `access-ok` - Both entries are accessible. + * * `access-error-both` - Neither entry can be accessed. + * * `access-error-left` - Left entry cannot be accessed. + * * `access-error-right` - Right entry cannot be accessed. + */ +export declare type PermissionDeniedState = "access-ok" | "access-error-both" | "access-error-left" | "access-error-right"; +/** + * Type of entry. + */ +export declare type DifferenceType = "missing" | "file" | "directory" | "broken-link"; +/** + * Provides reason when two identically named entries are distinct. + * + * Not available if entries are equal. + * + * * `different-size` - Files differ in size. + * * `different-date - Entry dates are different. Used when [[Options.compareDate]] is `true`. + * * `different-content` - File contents are different. Used when [[Options.compareContent]] is `true`. + * * `broken-link` - Both left/right entries are broken links. + * * `different-symlink` - Symlinks are different. See [[Options.compareSymlink]] for details. + * * `permission-denied` - One or both left/right entries are not accessible. See [[Options.handlePermissionDenied]] for details. + */ +export declare type Reason = undefined | "different-size" | "different-date" | "different-content" | "broken-link" | 'different-symlink' | 'permission-denied'; +export interface Difference { + /** + * Any property is allowed if default result builder is not used. + */ + [key: string]: any; + /** + * Path not including file/directory name; can be relative or absolute depending on call to compare(). + * Is undefined if missing on the left side. + */ + path1?: string; + /** + * Path not including file/directory name; can be relative or absolute depending on call to compare(). + * Is undefined if missing on the right side. + */ + path2?: string; + /** + * Path relative to root dir. + */ + relativePath: string; + /** + * Left file/directory name. + * Is undefined if missing on the left side. + */ + name1?: string; + /** + * Right file/directory name. + * Is undefined if missing on the right side. + */ + name2?: string; + /** + * See [[DifferenceState]] + */ + state: DifferenceState; + /** + * Permission related state of left/right entries. + */ + permissionDeniedState: PermissionDeniedState; + /** + * Type of left entry. + * Is undefined if missing on the left side. + */ + type1: DifferenceType; + /** + * Type of right entry. + * Is undefined if missing on the right side. + */ + type2: DifferenceType; + /** + * Left file size. + * Is undefined if missing on the left side. + */ + size1?: number; + /** + * Right file size. + * Is undefined if missing on the right side. + */ + size2?: number; + /** + * Left entry modification date (stat.mtime). + * Is undefined if missing on the left side. + */ + date1?: number; + /** + * Right entry modification date (stat.mtime). + * Is undefined if missing on the right side. + */ + date2?: number; + /** + * Depth level relative to root dir. + */ + level: number; + /** + * Provides reason when two identically named entries are distinct. + */ + reason: Reason; +} +/** + * Synchronous file content comparison handler. + */ +export declare type CompareFileSync = (path1: string, stat1: fs.Stats, path2: string, stat2: fs.Stats, options: Options) => boolean; +/** + * Asynchronous file content comparison handler. + */ +export declare type CompareFileAsync = (path1: string, stat1: fs.Stats, path2: string, stat2: fs.Stats, options: Options) => Promise<boolean>; +export interface CompareFileHandler { + compareSync: CompareFileSync; + compareAsync: CompareFileAsync; +} +/** + * Compares the names of two entries. + * The comparison should be dependent on received options (ie. case sensitive, ...). + * Returns 0 if names are identical, -1 if name1<name2, 1 if name1>name2. + */ +export declare type CompareNameHandler = (name1: string, name2: string, options: Options) => 0 | 1 | -1; +//# sourceMappingURL=types.d.ts.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/types.d.ts.map b/desktop/node_modules/dir-compare/build/src/types.d.ts.map new file mode 100644 index 0000000..6209d24 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/types.d.ts.map @@ -0,0 +1 @@ +{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AAIxB;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB;;OAEG;IAEH,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;IAElB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IAEtB;;;;;;;;;OASG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB;;OAEG;IACH,aAAa,CAAC,EAAE,OAAO,CAAA;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IAEtB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;IAEpB;;O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,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,KAAK,EAAE,eAAe,CAAA;IAEtB;;OAEG;IACH,qBAAqB,EAAE,qBAAqB,CAAA;IAE5C;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;IAErB;;;OAGG;IACH,KAAK,EAAE,cAAc,CAAA;IAErB;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IAEb;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,oBAAY,eAAe,GAAG,CAC1B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,EAAE,CAAC,KAAK,EACf,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,EAAE,CAAC,KAAK,EACf,OAAO,EAAE,OAAO,KACf,OAAO,CAAA;AAEZ;;GAEG;AACH,oBAAY,gBAAgB,GAAG,CAC3B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,EAAE,CAAC,KAAK,EACf,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,EAAE,CAAC,KAAK,EACf,OAAO,EAAE,OAAO,KACf,OAAO,CAAC,OAAO,CAAC,CAAA;AAErB,MAAM,WAAW,kBAAkB;IAC/B,WAAW,EAAE,eAAe,CAAC;IAC7B,YAAY,EAAE,gBAAgB,CAAA;CACjC;AAED;;;;GAIG;AACH,oBAAY,kBAAkB,GAAG,CAC7B,KAAK,EAAE,MAAM,EACb,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,OAAO,KACf,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAA"}
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/types.js b/desktop/node_modules/dir-compare/build/src/types.js new file mode 100644 index 0000000..ee46c6a --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/types.js @@ -0,0 +1,4 @@ +"use strict"; +/// <reference types="node" /> +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=types.js.map
\ No newline at end of file diff --git a/desktop/node_modules/dir-compare/build/src/types.js.map b/desktop/node_modules/dir-compare/build/src/types.js.map new file mode 100644 index 0000000..fa17631 --- /dev/null +++ b/desktop/node_modules/dir-compare/build/src/types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":";AAAA,8BAA8B"}
\ No newline at end of file |