MCPcopy
hub / github.com/webpack/webpack / readRecords

Method readRecords

lib/Compiler.js:1188–1208  ·  view source on GitHub ↗

* Processes the provided error callback. * @param {ErrorCallback} callback signals when the call finishes * @returns {void}

(callback)

Source from the content-addressed store, hash-verified

1186 * @returns {void}
1187 */
1188 readRecords(callback) {
1189 if (this.hooks.readRecords.isUsed()) {
1190 if (this.recordsInputPath) {
1191 asyncLib.parallel(
1192 [
1193 (cb) => this.hooks.readRecords.callAsync(cb),
1194 this._readRecords.bind(this)
1195 ],
1196 (err) => callback(/** @type {Error | null} */ (err))
1197 );
1198 } else {
1199 this.records = {};
1200 this.hooks.readRecords.callAsync(callback);
1201 }
1202 } else if (this.recordsInputPath) {
1203 this._readRecords(callback);
1204 } else {
1205 this.records = {};
1206 callback(null);
1207 }
1208 }
1209
1210 /**
1211 * Processes the provided error callback.

Callers 2

runMethod · 0.95
runMethod · 0.80

Calls 3

_readRecordsMethod · 0.95
isUsedMethod · 0.80
callbackFunction · 0.50

Tested by

no test coverage detected