{"ast":null,"code":"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n  value: true\n});\nconst stream_1 = require(\"stream\");\nconst stream_2 = require(\"../readers/stream\");\nconst provider_1 = require(\"./provider\");\nclass ProviderStream extends provider_1.default {\n  constructor() {\n    super(...arguments);\n    this._reader = new stream_2.default(this._settings);\n  }\n  read(task) {\n    const root = this._getRootDirectory(task);\n    const options = this._getReaderOptions(task);\n    const source = this.api(root, task, options);\n    const destination = new stream_1.Readable({\n      objectMode: true,\n      read: () => {}\n    });\n    source.once('error', error => destination.emit('error', error)).on('data', entry => destination.emit('data', options.transform(entry))).once('end', () => destination.emit('end'));\n    destination.once('close', () => source.destroy());\n    return destination;\n  }\n  api(root, task, options) {\n    if (task.dynamic) {\n      return this._reader.dynamic(root, options);\n    }\n    return this._reader.static(task.patterns, options);\n  }\n}\nexports.default = ProviderStream;","map":{"version":3,"names":["Object","defineProperty","exports","value","stream_1","require","stream_2","provider_1","ProviderStream","default","constructor","arguments","_reader","_settings","read","task","root","_getRootDirectory","options","_getReaderOptions","source","api","destination","Readable","objectMode","once","error","emit","on","entry","transform","destroy","dynamic","static","patterns"],"sources":["C:/Users/user/Desktop/000newport/node_modules/fast-glob/out/providers/stream.js"],"sourcesContent":["\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst stream_1 = require(\"stream\");\nconst stream_2 = require(\"../readers/stream\");\nconst provider_1 = require(\"./provider\");\nclass ProviderStream extends provider_1.default {\n    constructor() {\n        super(...arguments);\n        this._reader = new stream_2.default(this._settings);\n    }\n    read(task) {\n        const root = this._getRootDirectory(task);\n        const options = this._getReaderOptions(task);\n        const source = this.api(root, task, options);\n        const destination = new stream_1.Readable({ objectMode: true, read: () => { } });\n        source\n            .once('error', (error) => destination.emit('error', error))\n            .on('data', (entry) => destination.emit('data', options.transform(entry)))\n            .once('end', () => destination.emit('end'));\n        destination\n            .once('close', () => source.destroy());\n        return destination;\n    }\n    api(root, task, options) {\n        if (task.dynamic) {\n            return this._reader.dynamic(root, options);\n        }\n        return this._reader.static(task.patterns, options);\n    }\n}\nexports.default = ProviderStream;\n"],"mappings":"AAAA,YAAY;;AACZA,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAAEC,KAAK,EAAE;AAAK,CAAC,CAAC;AAC7D,MAAMC,QAAQ,GAAGC,OAAO,CAAC,QAAQ,CAAC;AAClC,MAAMC,QAAQ,GAAGD,OAAO,CAAC,mBAAmB,CAAC;AAC7C,MAAME,UAAU,GAAGF,OAAO,CAAC,YAAY,CAAC;AACxC,MAAMG,cAAc,SAASD,UAAU,CAACE,OAAO,CAAC;EAC5CC,WAAWA,CAAA,EAAG;IACV,KAAK,CAAC,GAAGC,SAAS,CAAC;IACnB,IAAI,CAACC,OAAO,GAAG,IAAIN,QAAQ,CAACG,OAAO,CAAC,IAAI,CAACI,SAAS,CAAC;EACvD;EACAC,IAAIA,CAACC,IAAI,EAAE;IACP,MAAMC,IAAI,GAAG,IAAI,CAACC,iBAAiB,CAACF,IAAI,CAAC;IACzC,MAAMG,OAAO,GAAG,IAAI,CAACC,iBAAiB,CAACJ,IAAI,CAAC;IAC5C,MAAMK,MAAM,GAAG,IAAI,CAACC,GAAG,CAACL,IAAI,EAAED,IAAI,EAAEG,OAAO,CAAC;IAC5C,MAAMI,WAAW,GAAG,IAAIlB,QAAQ,CAACmB,QAAQ,CAAC;MAAEC,UAAU,EAAE,IAAI;MAAEV,IAAI,EAAEA,CAAA,KAAM,CAAE;IAAE,CAAC,CAAC;IAChFM,MAAM,CACDK,IAAI,CAAC,OAAO,EAAGC,KAAK,IAAKJ,WAAW,CAACK,IAAI,CAAC,OAAO,EAAED,KAAK,CAAC,CAAC,CAC1DE,EAAE,CAAC,MAAM,EAAGC,KAAK,IAAKP,WAAW,CAACK,IAAI,CAAC,MAAM,EAAET,OAAO,CAACY,SAAS,CAACD,KAAK,CAAC,CAAC,CAAC,CACzEJ,IAAI,CAAC,KAAK,EAAE,MAAMH,W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