Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1130672d88 | |||
| 6bf7061e84 | |||
| 10e0c5ca92 | |||
| 1de7879e13 | |||
| 4649af7ab0 | |||
| 87a561de5e | |||
| ae45222791 | |||
| 13f9926809 |
24
.vscode/launch.json
vendored
24
.vscode/launch.json
vendored
@@ -2,28 +2,10 @@
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "current file",
|
||||
"type": "node",
|
||||
"command": "npm test",
|
||||
"name": "Run npm test",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"${relativeFile}"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
},
|
||||
{
|
||||
"name": "test.ts",
|
||||
"type": "node",
|
||||
"request": "launch",
|
||||
"args": [
|
||||
"test/test.ts"
|
||||
],
|
||||
"runtimeArgs": ["-r", "@gitzone/tsrun"],
|
||||
"cwd": "${workspaceRoot}",
|
||||
"protocol": "inspector",
|
||||
"internalConsoleOptions": "openOnSessionStart"
|
||||
"type": "node-terminal"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
28
changelog.md
Normal file
28
changelog.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Changelog
|
||||
|
||||
## 2025-12-04 - 1.0.30 - fix(DeesComms)
|
||||
Skip routing hooks for BroadcastChannel-received messages to prevent infinite loops; update typedrequest dependency and bump package version.
|
||||
|
||||
- Skip hooks when routing responses for messages received from the BroadcastChannel (prevents infinite loops when global traffic-logging hooks are present).
|
||||
- Bump dependency @api.global/typedrequest to ^3.2.3.
|
||||
- Bump package version to 1.0.29.
|
||||
|
||||
## 2025-12-04 - 1.0.28 - fix(build)
|
||||
Upgrade build/test tooling and runtime deps; enable verbose tests
|
||||
|
||||
- Change test script to run tstest with --verbose instead of --web
|
||||
- Upgrade devDependencies: @git.zone/tsbuild -> ^3.1.2, @git.zone/tsbundle -> ^2.6.3, @git.zone/tsrun -> ^2.0.0, @git.zone/tstest -> ^3.1.3, @push.rocks/tapbundle -> ^6.0.3, @types/node -> ^24.10.1
|
||||
- Bump runtime dependencies: @api.global/typedrequest -> ^3.2.2, broadcast-channel -> ^7.2.0
|
||||
- No source code changes outside package.json
|
||||
|
||||
## 2024-05-25 - 1.0.27 - maintenance (1.0.2 → 1.0.27)
|
||||
Consolidated maintenance releases covering many small patches, core fixes, and version bumps between 2020-10-06 and 2024-05-25.
|
||||
|
||||
- Aggregated numerous "fix(core): update" changes applied across multiple patch releases.
|
||||
- Many releases were version bumps or had only minimal/internal changes with no user-facing features.
|
||||
- No breaking API changes recorded in these patch releases.
|
||||
|
||||
## 2024-04-20 - 1.0.24 - docs
|
||||
Update documentation.
|
||||
|
||||
- Updated project documentation.
|
||||
20
package.json
20
package.json
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@design.estate/dees-comms",
|
||||
"version": "1.0.25",
|
||||
"version": "1.0.30",
|
||||
"private": false,
|
||||
"description": "A communications module for enabling DOM-based messaging and synchronization across browser tabs and workers.",
|
||||
"main": "dist_ts/index.js",
|
||||
@@ -9,22 +9,22 @@
|
||||
"author": "Lossless GmbH",
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "(tstest test/ --web)",
|
||||
"test": "(tstest test/ --verbose)",
|
||||
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.66",
|
||||
"@gitzone/tsbundle": "^2.0.8",
|
||||
"@gitzone/tsrun": "^1.2.44",
|
||||
"@gitzone/tstest": "^1.0.77",
|
||||
"@push.rocks/tapbundle": "^5.0.23",
|
||||
"@types/node": "^20.12.12"
|
||||
"@git.zone/tsbuild": "^3.1.2",
|
||||
"@git.zone/tsbundle": "^2.6.3",
|
||||
"@git.zone/tsrun": "^2.0.0",
|
||||
"@git.zone/tstest": "^3.1.3",
|
||||
"@push.rocks/tapbundle": "^6.0.3",
|
||||
"@types/node": "^24.10.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@api.global/typedrequest": "^3.0.23",
|
||||
"@api.global/typedrequest": "^3.2.3",
|
||||
"@api.global/typedrequest-interfaces": "^3.0.19",
|
||||
"@push.rocks/smartdelay": "^3.0.5",
|
||||
"broadcast-channel": "^3.7.0"
|
||||
"broadcast-channel": "^7.2.0"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
||||
9253
pnpm-lock.yaml
generated
9253
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -1,8 +1,8 @@
|
||||
/**
|
||||
* autocreated commitinfo by @pushrocks/commitinfo
|
||||
* autocreated commitinfo by @push.rocks/commitinfo
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@design.estate/dees-comms',
|
||||
version: '1.0.25',
|
||||
version: '1.0.30',
|
||||
description: 'A communications module for enabling DOM-based messaging and synchronization across browser tabs and workers.'
|
||||
}
|
||||
|
||||
@@ -25,7 +25,9 @@ export class DeesComms {
|
||||
this.broadcastChannel.onmessage = async (eventArg) => {
|
||||
const message = (eventArg as any).method ? eventArg : eventArg.data;
|
||||
console.log(JSON.stringify(message));
|
||||
const response = await this.typedrouter.routeAndAddResponse(message);
|
||||
// Skip hooks for broadcast-received messages to prevent infinite loops
|
||||
// when traffic logging hooks are set up globally
|
||||
const response = await this.typedrouter.routeAndAddResponse(message, { skipHooks: true });
|
||||
if (response && !response.error) {
|
||||
this.postMessage(response);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user