@metamask/post-message-stream
Advanced tools
Comparing version 6.1.2 to 6.2.0
import { Duplex } from 'readable-stream'; | ||
import { StreamData } from './utils'; | ||
declare type Log = (data: unknown, out: boolean) => void; | ||
export interface PostMessageEvent { | ||
@@ -14,2 +15,3 @@ data?: StreamData; | ||
private _haveSyn; | ||
private _log; | ||
constructor(); | ||
@@ -28,2 +30,4 @@ /** | ||
_write(data: StreamData, _encoding: string | null, cb: () => void): void; | ||
_setLogger(log: Log): void; | ||
} | ||
export {}; |
@@ -19,2 +19,3 @@ "use strict"; | ||
this._haveSyn = false; | ||
this._log = () => null; | ||
} | ||
@@ -35,2 +36,3 @@ /** | ||
this.push(data); | ||
this._log(data, false); | ||
} | ||
@@ -58,7 +60,13 @@ catch (err) { | ||
_write(data, _encoding, cb) { | ||
if (data !== ACK && data !== SYN) { | ||
this._log(data, true); | ||
} | ||
this._postMessage(data); | ||
cb(); | ||
} | ||
_setLogger(log) { | ||
this._log = log; | ||
} | ||
} | ||
exports.BasePostMessageStream = BasePostMessageStream; | ||
//# sourceMappingURL=BasePostMessageStream.js.map |
{ | ||
"name": "@metamask/post-message-stream", | ||
"version": "6.1.2", | ||
"version": "6.2.0", | ||
"description": "Sets up a duplex object stream over window.postMessage", | ||
@@ -40,8 +40,8 @@ "homepage": "https://github.com/MetaMask/post-message-stream#readme", | ||
"@jest-runner/electron": "^3.0.1", | ||
"@lavamoat/allow-scripts": "^1.0.5", | ||
"@lavamoat/allow-scripts": "^2.3.1", | ||
"@metamask/auto-changelog": "^3.0.0", | ||
"@metamask/eslint-config": "^9.0.0", | ||
"@metamask/eslint-config-jest": "^9.0.0", | ||
"@metamask/eslint-config-nodejs": "^9.0.0", | ||
"@metamask/eslint-config-typescript": "^9.0.1", | ||
"@metamask/eslint-config": "^10.0.0", | ||
"@metamask/eslint-config-jest": "^10.0.0", | ||
"@metamask/eslint-config-nodejs": "^10.0.0", | ||
"@metamask/eslint-config-typescript": "^10.0.0", | ||
"@types/chrome": "^0.0.204", | ||
@@ -51,13 +51,13 @@ "@types/jest": "^26.0.13", | ||
"@types/readable-stream": "^2.3.9", | ||
"@typescript-eslint/eslint-plugin": "^4.33.0", | ||
"@typescript-eslint/parser": "^4.33.0", | ||
"@typescript-eslint/eslint-plugin": "^5.33.0", | ||
"@typescript-eslint/parser": "^5.33.0", | ||
"browserify": "^17.0.0", | ||
"electron": "^18.3.7", | ||
"eslint": "^7.30.0", | ||
"electron": "^18.3.15", | ||
"eslint": "^8.21.0", | ||
"eslint-config-prettier": "^8.1.0", | ||
"eslint-plugin-import": "^2.22.1", | ||
"eslint-plugin-jest": "^24.3.4", | ||
"eslint-plugin-import": "^2.26.0", | ||
"eslint-plugin-jest": "^26.8.2", | ||
"eslint-plugin-jsdoc": "^39.3.3", | ||
"eslint-plugin-node": "^11.1.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"jest": "^26.6.3", | ||
@@ -64,0 +64,0 @@ "jest-it-up": "^2.0.2", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
75654
40
735