{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nconst stream_1 = require(\"stream\");\nconst async_1 = require(\"../readers/async\");\nclass StreamProvider {\n  constructor(_root, _settings) {\n    this._root = _root;\n    this._settings = _settings;\n    this._reader = new async_1.default(this._root, this._settings);\n    this._stream = new stream_1.Readable({\n      objectMode: true,\n      read: () => {},\n      destroy: () => {\n        if (!this._reader.isDestroyed) {\n          this._reader.destroy();\n        }\n      }\n    });\n  }\n  read() {\n    this._reader.onError(error => {\n      this._stream.emit('error', error);\n    });\n    this._reader.onEntry(entry => {\n      this._stream.push(entry);\n    });\n    this._reader.onEnd(() => {\n      this._stream.push(null);\n    });\n    this._reader.read();\n    return this._stream;\n  }\n}\nexports.default = StreamProvider;","map":{"version":3,"names":["Object","defineProperty","exports","value","stream_1","require","async_1","StreamProvider","constructor","_root","_settings","_reader","default","_stream","Readable","objectMode","read","destroy","isDestroyed","onError","error","emit","onEntry","entry","push","onEnd"],"sources":["C:/Users/user/Desktop/000newport/node_modules/@nodelib/fs.walk/out/providers/stream.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst async_1 = require(\"../readers/async\");\nclass StreamProvider {\n    constructor(_root, _settings) {\n        this._root = _root;\n        this._settings = _settings;\n        this._reader = new async_1.default(this._root, this._settings);\n        this._stream = new stream_1.Readable({\n            objectMode: true,\n            read: () => { },\n            destroy: () => {\n                if (!this._reader.isDestroyed) {\n                    this._reader.destroy();\n                }\n            }\n        });\n    }\n    read() {\n        this._reader.onError((error) => {\n            this._stream.emit('error', error);\n        });\n        this._reader.onEntry((entry) => {\n            this._stream.push(entry);\n        });\n        this._reader.onEnd(() => {\n            this._stream.push(null);\n        });\n        this._reader.read();\n        return this._stream;\n    }\n}\nexports.default = StreamProvider;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;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