mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-05 11:31:31 +08:00
- puppeteer replaced with puppeteer-core (20.7.3). DevTools does not actually need puppeteer as it downloads the browsers on its own. PUPPETEER_SKIP_CHROMIUM_DOWNLOAD is not needed too. - @puppeteer/replay upgraded to 2.11.2 DISABLE_THIRD_PARTY_CHECK=requires code updates for puppeteer-core Bug: none Change-Id: I173c228d766681a1a8a9ada3fcf17525cd191726 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/4640022 Reviewed-by: Simon Zünd <szuend@chromium.org> Commit-Queue: Randolf Jung <jrandolf@chromium.org>
24 lines
675 B
JavaScript
24 lines
675 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.StringWriter = void 0;
|
|
const stream_1 = require("stream");
|
|
class StringWriter extends stream_1.Writable {
|
|
constructor() {
|
|
super(...arguments);
|
|
this.buf = Buffer.alloc(0);
|
|
}
|
|
_write(chunk, _, callback) {
|
|
if (chunk instanceof Buffer) {
|
|
this.buf = Buffer.concat([this.buf, chunk]);
|
|
callback(null);
|
|
}
|
|
else {
|
|
callback(new Error("StringWriter expects chunks of type 'Buffer'."));
|
|
}
|
|
}
|
|
getText(encoding) {
|
|
return this.buf.toString(encoding);
|
|
}
|
|
}
|
|
exports.StringWriter = StringWriter;
|