Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dc4f8230c | |||
| ebeedc6200 | |||
| 9d895913eb | |||
| b5cc8e7952 | |||
| 1a36912461 | |||
| 1dcbdcc06d | |||
| c7d0c8723f | |||
| ae377b185e |
@@ -3,10 +3,10 @@
|
|||||||
"projectType": "npm",
|
"projectType": "npm",
|
||||||
"module": {
|
"module": {
|
||||||
"githost": "gitlab.com",
|
"githost": "gitlab.com",
|
||||||
"gitscope": "designestate",
|
"gitscope": "design.estate",
|
||||||
"gitrepo": "dees-comms",
|
"gitrepo": "dees-comms",
|
||||||
"shortDescription": "a comms module for communicating within the DOM",
|
"shortDescription": "a comms module for communicating within the DOM",
|
||||||
"npmPackagename": "@designestate/dees-comms",
|
"npmPackagename": "@design.estate/dees-comms",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"projectDomain": "design.estate"
|
"projectDomain": "design.estate"
|
||||||
}
|
}
|
||||||
|
|||||||
18201
package-lock.json
generated
18201
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
21
package.json
21
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@designestate/dees-comms",
|
"name": "@design.estate/dees-comms",
|
||||||
"version": "1.0.20",
|
"version": "1.0.24",
|
||||||
"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",
|
||||||
@@ -13,16 +13,17 @@
|
|||||||
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)"
|
"build": "(tsbuild --web --allowimplicitany && tsbundle npm)"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gitzone/tsbuild": "^2.1.61",
|
"@gitzone/tsbuild": "^2.1.66",
|
||||||
"@gitzone/tsbundle": "^1.0.102",
|
"@gitzone/tsbundle": "^2.0.8",
|
||||||
"@gitzone/tstest": "^1.0.70",
|
"@gitzone/tsrun": "^1.2.44",
|
||||||
"@pushrocks/tapbundle": "^5.0.3",
|
"@gitzone/tstest": "^1.0.77",
|
||||||
"@types/node": "^17.0.23"
|
"@push.rocks/tapbundle": "^5.0.12",
|
||||||
|
"@types/node": "^20.4.8"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@apiglobal/typedrequest": "^2.0.2",
|
"@api.global/typedrequest": "^3.0.1",
|
||||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
"@api.global/typedrequest-interfaces": "^3.0.1",
|
||||||
"@pushrocks/smartdelay": "^2.0.13",
|
"@push.rocks/smartdelay": "^3.0.5",
|
||||||
"broadcast-channel": "^3.7.0"
|
"broadcast-channel": "^3.7.0"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
|
|||||||
4668
pnpm-lock.yaml
generated
Normal file
4668
pnpm-lock.yaml
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -1,4 +1,4 @@
|
|||||||
import { expect, tap } from '@pushrocks/tapbundle';
|
import { expect, tap } from '@push.rocks/tapbundle';
|
||||||
import * as deesComms from '../ts/index.js';
|
import * as deesComms from '../ts/index.js';
|
||||||
|
|
||||||
let deesCommsTest: deesComms.DeesComms;
|
let deesCommsTest: deesComms.DeesComms;
|
||||||
@@ -27,7 +27,12 @@ tap.test('first test', async (tools) => {
|
|||||||
hithere: 'hello',
|
hithere: 'hello',
|
||||||
});
|
});
|
||||||
console.log(JSON.stringify(result2)); */
|
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();
|
tap.start();
|
||||||
8
ts/00_commitinfo_data.ts
Normal file
8
ts/00_commitinfo_data.ts
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
/**
|
||||||
|
* autocreated commitinfo by @pushrocks/commitinfo
|
||||||
|
*/
|
||||||
|
export const commitinfo = {
|
||||||
|
name: '@design.estate/dees-comms',
|
||||||
|
version: '1.0.24',
|
||||||
|
description: 'a comms module for communicating within the DOM'
|
||||||
|
}
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
import { TypedRequest } from '@apiglobal/typedrequest';
|
|
||||||
import * as plugins from './dees-comms.plugins.js';
|
import * as plugins from './dees-comms.plugins.js';
|
||||||
|
|
||||||
let BroadcastChannel = globalThis.BroadcastChannel;
|
let BroadcastChannel = globalThis.BroadcastChannel;
|
||||||
@@ -27,8 +26,10 @@ export class DeesComms {
|
|||||||
const message = (eventArg as any).method ? eventArg : 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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -38,7 +39,7 @@ export class DeesComms {
|
|||||||
*/
|
*/
|
||||||
public createTypedRequest<T extends plugins.typedrequestInterfaces.ITypedRequest>(
|
public createTypedRequest<T extends plugins.typedrequestInterfaces.ITypedRequest>(
|
||||||
methodName: T['method']
|
methodName: T['method']
|
||||||
): TypedRequest<T> {
|
): plugins.typedrequest.TypedRequest<T> {
|
||||||
const typedrequest = new plugins.typedrequest.TypedRequest(this.typedtarget, methodName);
|
const typedrequest = new plugins.typedrequest.TypedRequest(this.typedtarget, methodName);
|
||||||
return typedrequest;
|
return typedrequest;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// pushrocks scope
|
// pushrocks scope
|
||||||
import * as smartdelay from '@pushrocks/smartdelay';
|
import * as smartdelay from '@push.rocks/smartdelay';
|
||||||
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
import * as typedrequestInterfaces from '@api.global/typedrequest-interfaces';
|
||||||
import * as typedrequest from '@apiglobal/typedrequest';
|
import * as typedrequest from '@api.global/typedrequest';
|
||||||
|
|
||||||
export { smartdelay, typedrequestInterfaces, typedrequest };
|
export { smartdelay, typedrequestInterfaces, typedrequest };
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@
|
|||||||
"useDefineForClassFields": false,
|
"useDefineForClassFields": false,
|
||||||
"target": "ES2022",
|
"target": "ES2022",
|
||||||
"module": "ES2022",
|
"module": "ES2022",
|
||||||
"moduleResolution": "nodenext"
|
"moduleResolution": "nodenext",
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"verbatimModuleSyntax": true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user