Skip to content

Commit

Permalink
rebuild sample
Browse files Browse the repository at this point in the history
  • Loading branch information
legobeat committed May 14, 2024
1 parent fc50058 commit 0c95648
Showing 1 changed file with 29 additions and 22 deletions.
51 changes: 29 additions & 22 deletions sample-extension/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -20875,7 +20875,7 @@ var objectKeys = Object.keys || function (obj) {
module.exports = Duplex;

/*<replacement>*/
var util = require('core-util-is');
var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/*</replacement>*/

Expand Down Expand Up @@ -20994,7 +20994,7 @@ module.exports = PassThrough;
var Transform = require('./_stream_transform');

/*<replacement>*/
var util = require('core-util-is');
var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/*</replacement>*/

Expand Down Expand Up @@ -21066,7 +21066,7 @@ var Stream = require('./internal/streams/stream');
/*<replacement>*/

var Buffer = require('safe-buffer').Buffer;
var OurUint8Array = global.Uint8Array || function () {};
var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
Expand All @@ -21077,7 +21077,7 @@ function _isUint8Array(obj) {
/*</replacement>*/

/*<replacement>*/
var util = require('core-util-is');
var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/*</replacement>*/

Expand Down Expand Up @@ -21636,8 +21636,8 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
// also returned false.
// => Check whether `dest` is still a piping destination.
if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
debug('false write response, pause', src._readableState.awaitDrain);
src._readableState.awaitDrain++;
debug('false write response, pause', state.awaitDrain);
state.awaitDrain++;
increasedAwaitDrain = true;
}
src.pause();
Expand Down Expand Up @@ -21731,7 +21731,7 @@ Readable.prototype.unpipe = function (dest) {
state.flowing = false;

for (var i = 0; i < len; i++) {
dests[i].emit('unpipe', this, unpipeInfo);
dests[i].emit('unpipe', this, { hasUnpiped: false });
}return this;
}

Expand Down Expand Up @@ -22102,7 +22102,7 @@ module.exports = Transform;
var Duplex = require('./_stream_duplex');

/*<replacement>*/
var util = require('core-util-is');
var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/*</replacement>*/

Expand Down Expand Up @@ -22314,7 +22314,7 @@ var Duplex;
Writable.WritableState = WritableState;

/*<replacement>*/
var util = require('core-util-is');
var util = Object.create(require('core-util-is'));
util.inherits = require('inherits');
/*</replacement>*/

Expand All @@ -22331,7 +22331,7 @@ var Stream = require('./internal/streams/stream');
/*<replacement>*/

var Buffer = require('safe-buffer').Buffer;
var OurUint8Array = global.Uint8Array || function () {};
var OurUint8Array = (typeof global !== 'undefined' ? global : typeof window !== 'undefined' ? window : typeof self !== 'undefined' ? self : {}).Uint8Array || function () {};
function _uint8ArrayToBuffer(chunk) {
return Buffer.from(chunk);
}
Expand Down Expand Up @@ -22599,7 +22599,7 @@ Writable.prototype.uncork = function () {
if (state.corked) {
state.corked--;

if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
if (!state.writing && !state.corked && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state);
}
};

Expand Down Expand Up @@ -22841,7 +22841,7 @@ Writable.prototype.end = function (chunk, encoding, cb) {
}

// ignore unnecessary end() calls.
if (!state.ending && !state.finished) endWritable(this, state, cb);
if (!state.ending) endWritable(this, state, cb);
};

function needFinish(state) {
Expand Down Expand Up @@ -22902,11 +22902,9 @@ function onCorkedFinish(corkReq, state, err) {
cb(err);
entry = entry.next;
}
if (state.corkedRequestsFree) {
state.corkedRequestsFree.next = corkReq;
} else {
state.corkedRequestsFree = corkReq;
}

// reuse the free corkReq.
state.corkedRequestsFree.next = corkReq;
}

Object.defineProperty(Writable.prototype, 'destroyed', {
Expand Down Expand Up @@ -22995,7 +22993,6 @@ module.exports = function () {

BufferList.prototype.concat = function concat(n) {
if (this.length === 0) return Buffer.alloc(0);
if (this.length === 1) return this.head.data;
var ret = Buffer.allocUnsafe(n >>> 0);
var p = this.head;
var i = 0;
Expand Down Expand Up @@ -23034,9 +23031,15 @@ function destroy(err, cb) {
if (readableDestroyed || writableDestroyed) {
if (cb) {
cb(err);
} else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
pna.nextTick(emitErrorNT, this, err);
} else if (err) {
if (!this._writableState) {
pna.nextTick(emitErrorNT, this, err);
} else if (!this._writableState.errorEmitted) {
this._writableState.errorEmitted = true;
pna.nextTick(emitErrorNT, this, err);
}
}

return this;
}

Expand All @@ -23054,9 +23057,11 @@ function destroy(err, cb) {

this._destroy(err || null, function (err) {
if (!cb && err) {
pna.nextTick(emitErrorNT, _this, err);
if (_this._writableState) {
if (!_this._writableState) {
pna.nextTick(emitErrorNT, _this, err);
} else if (!_this._writableState.errorEmitted) {
_this._writableState.errorEmitted = true;
pna.nextTick(emitErrorNT, _this, err);
}
} else if (cb) {
cb(err);
Expand All @@ -23078,6 +23083,8 @@ function undestroy() {
this._writableState.destroyed = false;
this._writableState.ended = false;
this._writableState.ending = false;
this._writableState.finalCalled = false;
this._writableState.prefinished = false;
this._writableState.finished = false;
this._writableState.errorEmitted = false;
}
Expand Down

0 comments on commit 0c95648

Please sign in to comment.