fix(core): update
This commit is contained in:
parent
4c59d38971
commit
758dcd671c
232
package-lock.json
generated
232
package-lock.json
generated
@ -9,18 +9,17 @@
|
||||
"version": "1.0.17",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest": "^2.0.0",
|
||||
"@apiglobal/typedrequest": "^2.0.1",
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"broadcast-channel": "^3.7.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tsbundle": "^1.0.101",
|
||||
"@gitzone/tsbundle": "^1.0.102",
|
||||
"@gitzone/tstest": "^1.0.70",
|
||||
"@pushrocks/tapbundle": "^5.0.3",
|
||||
"@types/node": "^17.0.23",
|
||||
"tslint": "^6.1.3",
|
||||
"tslint-config-prettier": "^1.15.0"
|
||||
"@types/node": "^17.0.23"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
@ -37,9 +36,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@apiglobal/typedrequest": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.0.tgz",
|
||||
"integrity": "sha512-dpgBO9kVC+n8sTBuUfmlc30k2exvZwYR8t40Svk3/rKtp6oxVFUXVNtdP+eoHb2ODihafmz3UV0fr4Tkpwh1kA==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.1.tgz",
|
||||
"integrity": "sha512-3Kk083oOdQEHLnQZRlLqCWkSFk2ZjwlJqF4YuBa4p3K1+UoxKumyyLve0xUJOHMnqvPADFT/5IBIQ2S7yEGRtg==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
@ -1841,9 +1840,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@gitzone/tsbundle": {
|
||||
"version": "1.0.101",
|
||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.101.tgz",
|
||||
"integrity": "sha512-OJlcZZofnSQX3ZnWv7UH51dyyyYN/n36zEzvEHszIcpb22cKHEqI9tQqqsTXo6bxJeA8lOmkJzu7wsVAwP9i1Q==",
|
||||
"version": "1.0.102",
|
||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.102.tgz",
|
||||
"integrity": "sha512-3DyYTEM/dXG43LqerBsvF/oNHSvsH117qAvLpKNMP71SSLmpqqSxYdXU3HTQGjOW9S6ejkTeuJE9HkzOix+6nQ==",
|
||||
"dev": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
@ -10207,122 +10206,6 @@
|
||||
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==",
|
||||
"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": {
|
||||
"version": "2.12.1",
|
||||
"resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.1.tgz",
|
||||
@ -10885,9 +10768,9 @@
|
||||
}
|
||||
},
|
||||
"@apiglobal/typedrequest": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.0.tgz",
|
||||
"integrity": "sha512-dpgBO9kVC+n8sTBuUfmlc30k2exvZwYR8t40Svk3/rKtp6oxVFUXVNtdP+eoHb2ODihafmz3UV0fr4Tkpwh1kA==",
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@apiglobal%2ftypedrequest/-/typedrequest-2.0.1.tgz",
|
||||
"integrity": "sha512-3Kk083oOdQEHLnQZRlLqCWkSFk2ZjwlJqF4YuBa4p3K1+UoxKumyyLve0xUJOHMnqvPADFT/5IBIQ2S7yEGRtg==",
|
||||
"requires": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/isounique": "^1.0.5",
|
||||
@ -12079,9 +11962,9 @@
|
||||
}
|
||||
},
|
||||
"@gitzone/tsbundle": {
|
||||
"version": "1.0.101",
|
||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.101.tgz",
|
||||
"integrity": "sha512-OJlcZZofnSQX3ZnWv7UH51dyyyYN/n36zEzvEHszIcpb22cKHEqI9tQqqsTXo6bxJeA8lOmkJzu7wsVAwP9i1Q==",
|
||||
"version": "1.0.102",
|
||||
"resolved": "https://verdaccio.lossless.one/@gitzone%2ftsbundle/-/tsbundle-1.0.102.tgz",
|
||||
"integrity": "sha512-3DyYTEM/dXG43LqerBsvF/oNHSvsH117qAvLpKNMP71SSLmpqqSxYdXU3HTQGjOW9S6ejkTeuJE9HkzOix+6nQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@babel/core": "^7.17.7",
|
||||
@ -17941,89 +17824,6 @@
|
||||
"resolved": "https://verdaccio.lossless.one/tslib/-/tslib-2.3.1.tgz",
|
||||
"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": {
|
||||
"version": "2.12.1",
|
||||
"resolved": "https://verdaccio.lossless.one/type-fest/-/type-fest-2.12.1.tgz",
|
||||
|
@ -14,14 +14,15 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@gitzone/tsbuild": "^2.1.61",
|
||||
"@gitzone/tsbundle": "^1.0.101",
|
||||
"@gitzone/tsbundle": "^1.0.102",
|
||||
"@gitzone/tstest": "^1.0.70",
|
||||
"@pushrocks/tapbundle": "^5.0.3",
|
||||
"@types/node": "^17.0.23"
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest": "^2.0.0",
|
||||
"@apiglobal/typedrequest": "^2.0.1",
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/smartdelay": "^2.0.13",
|
||||
"broadcast-channel": "^3.7.0"
|
||||
},
|
||||
"files": [
|
||||
|
@ -5,7 +5,9 @@ let deesCommsTest: deesComms.DeesComms;
|
||||
|
||||
tap.test('first test', async (tools) => {
|
||||
deesCommsTest = new deesComms.DeesComms();
|
||||
let counter = 1;
|
||||
deesCommsTest.createTypedHandler<any>('test', async (requestData) => {
|
||||
console.log(`got the request ${counter++}`);
|
||||
return { hitheretoo: `greetings to ${requestData.hithere}` };
|
||||
});
|
||||
|
||||
@ -15,6 +17,15 @@ tap.test('first test', async (tools) => {
|
||||
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.start();
|
||||
|
@ -20,11 +20,12 @@ export class DeesComms {
|
||||
typedRouterRef: this.typedrouter,
|
||||
});
|
||||
|
||||
// receiving messages
|
||||
private subscriptionChannel = new BroadcastChannel('dees-comms');
|
||||
|
||||
|
||||
constructor() {
|
||||
this.subscriptionChannel.onmessage = async (eventArg) => {
|
||||
const message = eventArg.data;
|
||||
const message = (eventArg as any).method ? eventArg : eventArg.data;
|
||||
console.log(JSON.stringify(message));
|
||||
const response = await this.typedrouter.routeAndAddResponse(message);
|
||||
if (response) {
|
||||
|
@ -1,8 +1,9 @@
|
||||
// pushrocks scope
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
||||
import * as typedrequest from '@apiglobal/typedrequest';
|
||||
|
||||
export { typedrequestInterfaces, typedrequest };
|
||||
export { smartdelay, typedrequestInterfaces, typedrequest };
|
||||
|
||||
// third party scope
|
||||
import { BroadcastChannel as BroadCastChannelPolyfill } from 'broadcast-channel';
|
||||
|
Loading…
Reference in New Issue
Block a user