10 Commits

Author SHA1 Message Date
1a36912461 1.0.22 2022-03-29 14:56:22 +02:00
1dcbdcc06d fix(core): update 2022-03-29 14:56:21 +02:00
c7d0c8723f 1.0.21 2022-03-29 13:18:10 +02:00
ae377b185e fix(core): update 2022-03-29 13:18:09 +02:00
eab145e736 1.0.20 2022-03-29 13:14:10 +02:00
4060d64ed4 fix(core): update 2022-03-29 13:14:10 +02:00
b7dfd8b1d5 1.0.19 2022-03-29 10:56:16 +02:00
82f2675910 fix(core): update 2022-03-29 10:56:16 +02:00
d1149d3877 1.0.18 2022-03-29 10:01:51 +02:00
758dcd671c fix(core): update 2022-03-29 10:01:50 +02:00
6 changed files with 71 additions and 249 deletions

236
package-lock.json generated
View File

@@ -1,26 +1,25 @@
{ {
"name": "@designestate/dees-comms", "name": "@designestate/dees-comms",
"version": "1.0.17", "version": "1.0.22",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@designestate/dees-comms", "name": "@designestate/dees-comms",
"version": "1.0.17", "version": "1.0.22",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@apiglobal/typedrequest": "^2.0.0", "@apiglobal/typedrequest": "^2.0.3",
"@apiglobal/typedrequest-interfaces": "^1.0.15", "@apiglobal/typedrequest-interfaces": "^1.0.15",
"@pushrocks/smartdelay": "^2.0.13",
"broadcast-channel": "^3.7.0" "broadcast-channel": "^3.7.0"
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.61", "@gitzone/tsbuild": "^2.1.61",
"@gitzone/tsbundle": "^1.0.101", "@gitzone/tsbundle": "^1.0.102",
"@gitzone/tstest": "^1.0.70", "@gitzone/tstest": "^1.0.70",
"@pushrocks/tapbundle": "^5.0.3", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.23", "@types/node": "^17.0.23"
"tslint": "^6.1.3",
"tslint-config-prettier": "^1.15.0"
} }
}, },
"node_modules/@ampproject/remapping": { "node_modules/@ampproject/remapping": {
@@ -37,9 +36,9 @@
} }
}, },
"node_modules/@apiglobal/typedrequest": { "node_modules/@apiglobal/typedrequest": {
"version": "2.0.0", "version": "2.0.3",
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.0.tgz", "resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.3.tgz",
"integrity": "sha512-dpgBO9kVC+n8sTBuUfmlc30k2exvZwYR8t40Svk3/rKtp6oxVFUXVNtdP+eoHb2ODihafmz3UV0fr4Tkpwh1kA==", "integrity": "sha512-bRXiv3OwPh4uA4ete9maHXyF3CMNz8rc81r41DBeYzscaadKlQSK0ewOBLQjjZ2MBWDAGR0NbGBEaJJrXqYS0w==",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"@apiglobal/typedrequest-interfaces": "^1.0.15", "@apiglobal/typedrequest-interfaces": "^1.0.15",
@@ -1841,9 +1840,9 @@
} }
}, },
"node_modules/@gitzone/tsbundle": { "node_modules/@gitzone/tsbundle": {
"version": "1.0.101", "version": "1.0.102",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.101.tgz", "resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.102.tgz",
"integrity": "sha512-OJlcZZofnSQX3ZnWv7UH51dyyyYN/n36zEzvEHszIcpb22cKHEqI9tQqqsTXo6bxJeA8lOmkJzu7wsVAwP9i1Q==", "integrity": "sha512-3DyYTEM/dXG43LqerBsvF/oNHSvsH117qAvLpKNMP71SSLmpqqSxYdXU3HTQGjOW9S6ejkTeuJE9HkzOix+6nQ==",
"dev": true, "dev": true,
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
@@ -10207,122 +10206,6 @@
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
"license": "0BSD" "license": "0BSD"
}, },
"node_modules/tslint": {
"version": "6.1.3",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-6.1.3.tgz",
"integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==",
"deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.",
"dev": true,
"license": "Apache-2.0",
"dependencies": {
"@babel/code-frame": "^7.0.0",
"builtin-modules": "^1.1.1",
"chalk": "^2.3.0",
"commander": "^2.12.1",
"diff": "^4.0.1",
"glob": "^7.1.1",
"js-yaml": "^3.13.1",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.3",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.13.0",
"tsutils": "^2.29.0"
},
"bin": {
"tslint": "bin/tslint"
},
"engines": {
"node": ">=4.8.0"
},
"peerDependencies": {
"typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev"
}
},
"node_modules/tslint-config-prettier": {
"version": "1.18.0",
"resolved": "https://verdaccio.lossless.one/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
"dev": true,
"license": "MIT",
"bin": {
"tslint-config-prettier-check": "bin/check.js"
},
"engines": {
"node": ">=4.0.0"
}
},
"node_modules/tslint/node_modules/argparse": {
"version": "1.0.10",
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"license": "MIT",
"dependencies": {
"sprintf-js": "~1.0.2"
}
},
"node_modules/tslint/node_modules/builtin-modules": {
"version": "1.1.1",
"resolved": "https://verdaccio.lossless.one/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/tslint/node_modules/js-yaml": {
"version": "3.14.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"license": "MIT",
"dependencies": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
},
"bin": {
"js-yaml": "bin/js-yaml.js"
}
},
"node_modules/tslint/node_modules/semver": {
"version": "5.7.1",
"resolved": "https://verdaccio.lossless.one/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true,
"license": "ISC",
"bin": {
"semver": "bin/semver"
}
},
"node_modules/tslint/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true,
"license": "0BSD"
},
"node_modules/tsutils": {
"version": "2.29.0",
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
"dev": true,
"license": "MIT",
"dependencies": {
"tslib": "^1.8.1"
},
"peerDependencies": {
"typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev"
}
},
"node_modules/tsutils/node_modules/tslib": {
"version": "1.14.1",
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true,
"license": "0BSD"
},
"node_modules/type-fest": { "node_modules/type-fest": {
"version": "2.12.1", "version": "2.12.1",
"resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.1.tgz", "resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.1.tgz",
@@ -10885,9 +10768,9 @@
} }
}, },
"@apiglobal/typedrequest": { "@apiglobal/typedrequest": {
"version": "2.0.0", "version": "2.0.3",
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.0.tgz", "resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.3.tgz",
"integrity": "sha512-dpgBO9kVC+n8sTBuUfmlc30k2exvZwYR8t40Svk3/rKtp6oxVFUXVNtdP+eoHb2ODihafmz3UV0fr4Tkpwh1kA==", "integrity": "sha512-bRXiv3OwPh4uA4ete9maHXyF3CMNz8rc81r41DBeYzscaadKlQSK0ewOBLQjjZ2MBWDAGR0NbGBEaJJrXqYS0w==",
"requires": { "requires": {
"@apiglobal/typedrequest-interfaces": "^1.0.15", "@apiglobal/typedrequest-interfaces": "^1.0.15",
"@pushrocks/isounique": "^1.0.5", "@pushrocks/isounique": "^1.0.5",
@@ -12079,9 +11962,9 @@
} }
}, },
"@gitzone/tsbundle": { "@gitzone/tsbundle": {
"version": "1.0.101", "version": "1.0.102",
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.101.tgz", "resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.102.tgz",
"integrity": "sha512-OJlcZZofnSQX3ZnWv7UH51dyyyYN/n36zEzvEHszIcpb22cKHEqI9tQqqsTXo6bxJeA8lOmkJzu7wsVAwP9i1Q==", "integrity": "sha512-3DyYTEM/dXG43LqerBsvF/oNHSvsH117qAvLpKNMP71SSLmpqqSxYdXU3HTQGjOW9S6ejkTeuJE9HkzOix+6nQ==",
"dev": true, "dev": true,
"requires": { "requires": {
"@babel/core": "^7.17.7", "@babel/core": "^7.17.7",
@@ -17941,89 +17824,6 @@
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.3.1.tgz", "resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==" "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
}, },
"tslint": {
"version": "6.1.3",
"resolved": "https://verdaccio.lossless.one/tslint/-/tslint-6.1.3.tgz",
"integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==",
"dev": true,
"requires": {
"@babel/code-frame": "^7.0.0",
"builtin-modules": "^1.1.1",
"chalk": "^2.3.0",
"commander": "^2.12.1",
"diff": "^4.0.1",
"glob": "^7.1.1",
"js-yaml": "^3.13.1",
"minimatch": "^3.0.4",
"mkdirp": "^0.5.3",
"resolve": "^1.3.2",
"semver": "^5.3.0",
"tslib": "^1.13.0",
"tsutils": "^2.29.0"
},
"dependencies": {
"argparse": {
"version": "1.0.10",
"resolved": "https://verdaccio.lossless.one/argparse/-/argparse-1.0.10.tgz",
"integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==",
"dev": true,
"requires": {
"sprintf-js": "~1.0.2"
}
},
"builtin-modules": {
"version": "1.1.1",
"resolved": "https://verdaccio.lossless.one/builtin-modules/-/builtin-modules-1.1.1.tgz",
"integrity": "sha1-Jw8HbFpywC9bZaR9+Uxf46J4iS8=",
"dev": true
},
"js-yaml": {
"version": "3.14.1",
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.1.tgz",
"integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==",
"dev": true,
"requires": {
"argparse": "^1.0.7",
"esprima": "^4.0.0"
}
},
"semver": {
"version": "5.7.1",
"resolved": "https://verdaccio.lossless.one/semver/-/semver-5.7.1.tgz",
"integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==",
"dev": true
},
"tslib": {
"version": "1.14.1",
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
}
}
},
"tslint-config-prettier": {
"version": "1.18.0",
"resolved": "https://verdaccio.lossless.one/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz",
"integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==",
"dev": true
},
"tsutils": {
"version": "2.29.0",
"resolved": "https://verdaccio.lossless.one/tsutils/-/tsutils-2.29.0.tgz",
"integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==",
"dev": true,
"requires": {
"tslib": "^1.8.1"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
"dev": true
}
}
},
"type-fest": { "type-fest": {
"version": "2.12.1", "version": "2.12.1",
"resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.1.tgz", "resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.1.tgz",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@designestate/dees-comms", "name": "@designestate/dees-comms",
"version": "1.0.17", "version": "1.0.22",
"private": false, "private": false,
"description": "a comms module for communicating within the DOM", "description": "a comms module for communicating within the DOM",
"main": "dist_ts/index.js", "main": "dist_ts/index.js",
@@ -14,14 +14,15 @@
}, },
"devDependencies": { "devDependencies": {
"@gitzone/tsbuild": "^2.1.61", "@gitzone/tsbuild": "^2.1.61",
"@gitzone/tsbundle": "^1.0.101", "@gitzone/tsbundle": "^1.0.102",
"@gitzone/tstest": "^1.0.70", "@gitzone/tstest": "^1.0.70",
"@pushrocks/tapbundle": "^5.0.3", "@pushrocks/tapbundle": "^5.0.3",
"@types/node": "^17.0.23" "@types/node": "^17.0.23"
}, },
"dependencies": { "dependencies": {
"@apiglobal/typedrequest": "^2.0.0", "@apiglobal/typedrequest": "^2.0.3",
"@apiglobal/typedrequest-interfaces": "^1.0.15", "@apiglobal/typedrequest-interfaces": "^1.0.15",
"@pushrocks/smartdelay": "^2.0.13",
"broadcast-channel": "^3.7.0" "broadcast-channel": "^3.7.0"
}, },
"files": [ "files": [

38
test/test.both.ts Normal file
View File

@@ -0,0 +1,38 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as deesComms from '../ts/index.js';
let deesCommsTest: deesComms.DeesComms;
let deesCommsTest2: deesComms.DeesComms;
tap.test('first test', async (tools) => {
deesCommsTest = new deesComms.DeesComms();
deesCommsTest2 = new deesComms.DeesComms();
let counter = 1;
deesCommsTest2.createTypedHandler<any>('test', async (requestData) => {
console.log(`got the request ${counter++}`);
return { hitheretoo: `greetings to ${requestData.hithere}` };
});
// lets fire a request
const typedrequest = deesCommsTest.createTypedRequest<any>('test');
const result = await typedrequest.fire({
hithere: 'hello',
});
console.log(JSON.stringify(result));
// lets fire a request
const typedrequest2 = deesCommsTest.createTypedRequest<any>('test2');
// TODO: return response after timeout
/* const result2 = await typedrequest2.fire({
hithere: 'hello',
});
console.log(JSON.stringify(result2)); */
});
tap.test('should end on nodejs', async (toolsArg) => {
if (globalThis.process) {
toolsArg.delayFor(2000).then(() => globalThis.process.exit(0));
}
})
tap.start();

View File

@@ -1,20 +0,0 @@
import { expect, tap } from '@pushrocks/tapbundle';
import * as deesComms from '../ts/index.js';
let deesCommsTest: deesComms.DeesComms;
tap.test('first test', async (tools) => {
deesCommsTest = new deesComms.DeesComms();
deesCommsTest.createTypedHandler<any>('test', async (requestData) => {
return { hitheretoo: `greetings to ${requestData.hithere}` };
});
// lets fire a request
const typedrequest = deesCommsTest.createTypedRequest<any>('test');
const result = await typedrequest.fire({
hithere: 'hello',
});
console.log(JSON.stringify(result));
});
tap.start();

View File

@@ -10,8 +10,9 @@ if (!BroadcastChannel) {
* a comm class for client side communication between workers and tabs. * a comm class for client side communication between workers and tabs.
*/ */
export class DeesComms { export class DeesComms {
private broadcastChannel = new BroadcastChannel('dees-comms');
// sending messages // sending messages
private postChannel = new BroadcastChannel('dees-comms');
public typedrouter = new plugins.typedrequest.TypedRouter(); public typedrouter = new plugins.typedrequest.TypedRouter();
public typedtarget = new plugins.typedrequest.TypedTarget({ public typedtarget = new plugins.typedrequest.TypedTarget({
postMethodWithTypedRouter: async (messageArg) => { postMethodWithTypedRouter: async (messageArg) => {
@@ -20,15 +21,16 @@ export class DeesComms {
typedRouterRef: this.typedrouter, typedRouterRef: this.typedrouter,
}); });
private subscriptionChannel = new BroadcastChannel('dees-comms'); // receiving messages
constructor() { constructor() {
this.subscriptionChannel.onmessage = async (eventArg) => { this.broadcastChannel.onmessage = async (eventArg) => {
const message = eventArg.data; const message = (eventArg as any).method ? eventArg : eventArg.data;
console.log(JSON.stringify(message)); console.log(JSON.stringify(message));
const response = await this.typedrouter.routeAndAddResponse(message); const response = await this.typedrouter.routeAndAddResponse(message);
if (response) { if (response && !response.error) {
this.postMessage(response); this.postMessage(response);
} else {
// console.log(response);
} }
}; };
} }
@@ -49,7 +51,7 @@ export class DeesComms {
public async postMessage<T = plugins.typedrequestInterfaces.ITypedRequest>( public async postMessage<T = plugins.typedrequestInterfaces.ITypedRequest>(
messageArg: T messageArg: T
): Promise<void> { ): Promise<void> {
this.postChannel.postMessage(messageArg); this.broadcastChannel.postMessage(messageArg);
} }
/** /**

View File

@@ -1,8 +1,9 @@
// pushrocks scope // pushrocks scope
import * as smartdelay from '@pushrocks/smartdelay';
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces'; import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
import * as typedrequest from '@apiglobal/typedrequest'; import * as typedrequest from '@apiglobal/typedrequest';
export { typedrequestInterfaces, typedrequest }; export { smartdelay, typedrequestInterfaces, typedrequest };
// third party scope // third party scope
import { BroadcastChannel as BroadCastChannelPolyfill } from 'broadcast-channel'; import { BroadcastChannel as BroadCastChannelPolyfill } from 'broadcast-channel';