init
This commit is contained in:
24
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.d.ts
generated
vendored
Executable file
24
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.d.ts
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.d.ts.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.d.ts.map
generated
vendored
Executable file
@ -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"}
|
||||
41
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.js
generated
vendored
Executable file
41
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.js
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/BufferPool.js.map
generated
vendored
Executable file
@ -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"}
|
||||
30
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts
generated
vendored
Executable file
30
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.d.ts.map
generated
vendored
Executable file
@ -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"}
|
||||
74
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js
generated
vendored
Executable file
74
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/FileDescriptorQueue.js.map
generated
vendored
Executable file
@ -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,CAAA;IACf,CAAC;IAED,OAAO;QACN,IAAI,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,GAAG,CAAC,IAAI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,EAAE;YAC3E,MAAM,GAAG,GAAG,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAA;YACtC,IAAI,CAAC,WAAW,EAAE,CAAA;YAClB,YAAE,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,QAAQ,CAAC,CAAA;SAC1C;IACF,CAAC;IAED,KAAK,CAAC,EAAU,EAAE,QAAyB;QAC1C,IAAI,CAAC,WAAW,EAAE,CAAA;QAClB,YAAE,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,CAAA;QACtB,IAAI,CAAC,OAAO,EAAE,CAAA;IACf,CAAC;IAED,WAAW,CAAC,IAAY,EAAE,KAAoB;QAC7C,OAAO,IAAI,OAAO,CAAS,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC9C,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,EAAE,EAAE,EAAE;gBAClC,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAA;iBACX;qBAAM;oBACN,OAAO,CAAC,EAAE,CAAC,CAAA;iBACX;YACF,CAAC,CAAC,CAAA;QACH,CAAC,CAAC,CAAA;IACH,CAAC;IAED,YAAY,CAAC,EAAU;QACtB,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC5C,IAAI,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,EAAE;gBACtB,IAAI,GAAG,EAAE;oBACR,MAAM,CAAC,GAAG,CAAC,CAAA;iBACX;qBAAM;oBACN,OAAO,EAAE,CAAA;iBACT;YACF,CAAC,CAAC,CAAA;QACH,CAAC,CAAC,CAAA;IACH,CAAC;CACD;AAnDD,kDAmDC"}
|
||||
8
mc_test/node_modules/dir-compare/build/src/fs/Queue.d.ts
generated
vendored
Executable file
8
mc_test/node_modules/dir-compare/build/src/fs/Queue.d.ts
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/Queue.d.ts.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/Queue.d.ts.map
generated
vendored
Executable file
@ -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"}
|
||||
50
mc_test/node_modules/dir-compare/build/src/fs/Queue.js
generated
vendored
Executable file
50
mc_test/node_modules/dir-compare/build/src/fs/Queue.js
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/Queue.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/Queue.js.map
generated
vendored
Executable file
@ -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"}
|
||||
9
mc_test/node_modules/dir-compare/build/src/fs/closeFile.d.ts
generated
vendored
Executable file
9
mc_test/node_modules/dir-compare/build/src/fs/closeFile.d.ts
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/closeFile.d.ts.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/closeFile.d.ts.map
generated
vendored
Executable file
@ -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"}
|
||||
41
mc_test/node_modules/dir-compare/build/src/fs/closeFile.js
generated
vendored
Executable file
41
mc_test/node_modules/dir-compare/build/src/fs/closeFile.js
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/closeFile.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/closeFile.js.map
generated
vendored
Executable file
@ -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"}
|
||||
5
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.d.ts
generated
vendored
Executable file
5
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.d.ts
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.d.ts.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.d.ts.map
generated
vendored
Executable file
@ -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"}
|
||||
28
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.js
generated
vendored
Executable file
28
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.js
generated
vendored
Executable file
@ -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
|
||||
1
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.js.map
generated
vendored
Executable file
1
mc_test/node_modules/dir-compare/build/src/fs/fsPromise.js.map
generated
vendored
Executable file
@ -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"}
|
||||
Reference in New Issue
Block a user