fix(core): update
This commit is contained in:
parent
39ed2dbd73
commit
b6b482f7db
28
package-lock.json
generated
28
package-lock.json
generated
@ -1515,6 +1515,7 @@
|
||||
"version": "8.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartfile/-/smartfile-8.0.0.tgz",
|
||||
"integrity": "sha512-A5uk7O3UZBXt0obIkQDpN9eihQwq4PVryr21xTv9Uw573mJWGfGB/xs07tdC6Qgbtlvl7i2vXl5qmKFDRky9Mg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@pushrocks/smarthash": "^2.1.6",
|
||||
"@pushrocks/smartmime": "^1.0.3",
|
||||
@ -1530,12 +1531,14 @@
|
||||
"@pushrocks/smartpath": {
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartpath/-/smartpath-4.0.3.tgz",
|
||||
"integrity": "sha512-KWz4DWOrB0sPfk6L4i+CPOo+UK5HXNaLI7ZAaqJe1nEWoDrpyeds1dNDaqVAmSgX4riLGxVpslKH5MnABCPsPg=="
|
||||
"integrity": "sha512-KWz4DWOrB0sPfk6L4i+CPOo+UK5HXNaLI7ZAaqJe1nEWoDrpyeds1dNDaqVAmSgX4riLGxVpslKH5MnABCPsPg==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/fs-extra": {
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2ffs-extra/-/fs-extra-9.0.1.tgz",
|
||||
"integrity": "sha512-B42Sxuaz09MhC3DDeW5kubRcQ5by4iuVQ0cRRWM2lggLzAa/KVom0Aft/208NgMvNQQZ86s5rVcqDdn/SH0/mg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/node": "*"
|
||||
}
|
||||
@ -1544,6 +1547,7 @@
|
||||
"version": "9.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/fs-extra/-/fs-extra-9.0.1.tgz",
|
||||
"integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"at-least-node": "^1.0.0",
|
||||
"graceful-fs": "^4.2.0",
|
||||
@ -1555,6 +1559,7 @@
|
||||
"version": "3.14.0",
|
||||
"resolved": "https://verdaccio.lossless.one/js-yaml/-/js-yaml-3.14.0.tgz",
|
||||
"integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"argparse": "^1.0.7",
|
||||
"esprima": "^4.0.0"
|
||||
@ -1564,6 +1569,7 @@
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://verdaccio.lossless.one/jsonfile/-/jsonfile-6.0.1.tgz",
|
||||
"integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"graceful-fs": "^4.1.6",
|
||||
"universalify": "^1.0.0"
|
||||
@ -1572,7 +1578,8 @@
|
||||
"universalify": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/universalify/-/universalify-1.0.0.tgz",
|
||||
"integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug=="
|
||||
"integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==",
|
||||
"dev": true
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -2026,6 +2033,7 @@
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fsmartunique/-/smartunique-3.0.3.tgz",
|
||||
"integrity": "sha512-f+c3s2WzzjASoRHyYTLU0kHDVWREg4sZVdi5L42bTA3CTUWNrcGUC62h4wP4U4BiPl3bopTr3LPhClZHJ738oA==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/shortid": "0.0.29",
|
||||
"@types/uuid": "^7.0.0",
|
||||
@ -2385,7 +2393,8 @@
|
||||
"@types/shortid": {
|
||||
"version": "0.0.29",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fshortid/-/shortid-0.0.29.tgz",
|
||||
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps="
|
||||
"integrity": "sha1-gJPuBBam4r8qpjOBCRFLP7/6Dps=",
|
||||
"dev": true
|
||||
},
|
||||
"@types/socket.io": {
|
||||
"version": "2.1.11",
|
||||
@ -2429,7 +2438,8 @@
|
||||
"@types/uuid": {
|
||||
"version": "7.0.4",
|
||||
"resolved": "https://verdaccio.lossless.one/@types%2fuuid/-/uuid-7.0.4.tgz",
|
||||
"integrity": "sha512-WGZCqBZZ0mXN2RxvLHL6/7RCu+OWs28jgQMP04LWfpyJlQUMTR6YU9CNJAKDgbw+EV/u687INXuLUc7FuML/4g=="
|
||||
"integrity": "sha512-WGZCqBZZ0mXN2RxvLHL6/7RCu+OWs28jgQMP04LWfpyJlQUMTR6YU9CNJAKDgbw+EV/u687INXuLUc7FuML/4g==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/which": {
|
||||
"version": "1.3.2",
|
||||
@ -2738,7 +2748,8 @@
|
||||
"at-least-node": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://verdaccio.lossless.one/at-least-node/-/at-least-node-1.0.0.tgz",
|
||||
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg=="
|
||||
"integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==",
|
||||
"dev": true
|
||||
},
|
||||
"atob": {
|
||||
"version": "2.1.2",
|
||||
@ -7600,7 +7611,8 @@
|
||||
"nanoid": {
|
||||
"version": "2.1.11",
|
||||
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-2.1.11.tgz",
|
||||
"integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA=="
|
||||
"integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==",
|
||||
"dev": true
|
||||
},
|
||||
"nanomatch": {
|
||||
"version": "1.2.13",
|
||||
@ -9800,6 +9812,7 @@
|
||||
"version": "2.2.15",
|
||||
"resolved": "https://verdaccio.lossless.one/shortid/-/shortid-2.2.15.tgz",
|
||||
"integrity": "sha512-5EaCy2mx2Jgc/Fdn9uuDuNIIfWBpzY4XIlhoqtXF6qsf+/+SGZ+FxDdX/ZsMZiWupIWNqAEmiNY4RC+LSmCeOw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"nanoid": "^2.1.0"
|
||||
}
|
||||
@ -11109,7 +11122,8 @@
|
||||
"uuid": {
|
||||
"version": "7.0.3",
|
||||
"resolved": "https://verdaccio.lossless.one/uuid/-/uuid-7.0.3.tgz",
|
||||
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg=="
|
||||
"integrity": "sha512-DPSke0pXhTZgoF/d+WSt2QaKMCFSfx7QegxEWT+JOuHF5aWrKEn0G+ztjuJg/gG8/ItK+rbPCD/yNv8yyih6Cg==",
|
||||
"dev": true
|
||||
},
|
||||
"v8-compile-cache": {
|
||||
"version": "2.1.1",
|
||||
|
@ -26,18 +26,16 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@apiglobal/typedrequest-interfaces": "^1.0.15",
|
||||
"@pushrocks/isohash": "^1.0.2",
|
||||
"@pushrocks/isounique": "^1.0.4",
|
||||
"@pushrocks/lik": "^4.0.17",
|
||||
"@pushrocks/smartdelay": "^2.0.10",
|
||||
"@pushrocks/smartexpress": "^3.0.76",
|
||||
"@pushrocks/smartfile": "^8.0.0",
|
||||
"@pushrocks/smarthash": "^2.1.6",
|
||||
"@pushrocks/smartlog": "^2.0.39",
|
||||
"@pushrocks/smartpromise": "^3.0.6",
|
||||
"@pushrocks/smartrequest": "^1.1.51",
|
||||
"@pushrocks/smartrx": "^2.0.19",
|
||||
"@pushrocks/smartsocket": "^1.1.67",
|
||||
"@pushrocks/smarttime": "^3.0.35",
|
||||
"@pushrocks/smartunique": "^3.0.3"
|
||||
"@pushrocks/smarttime": "^3.0.35"
|
||||
},
|
||||
"files": [
|
||||
"ts/**/*",
|
||||
|
@ -90,7 +90,7 @@ export class ClientUniverseChannel implements interfaces.IUniverseChannel {
|
||||
public async postMessage(messageArg: interfaces.IMessageCreator) {
|
||||
await this.clientUniverseRef.start(); // its ok to call this multiple times
|
||||
const universeMessageToSend: interfaces.IUniverseMessage = {
|
||||
id: plugins.smartunique.shortId(),
|
||||
id: plugins.isounique.uni(),
|
||||
timestamp: Date.now(),
|
||||
passphrase: this.passphrase,
|
||||
targetChannelName: this.name,
|
||||
|
@ -37,7 +37,7 @@ export class ReactionRequest<T extends plugins.typedrequestInterfaces.ITypedRequ
|
||||
) {
|
||||
const subscriptionMap = new plugins.lik.ObjectMap<plugins.smartrx.rxjs.Subscription>();
|
||||
const reactionResult = new ReactionResult<T>();
|
||||
const requestId = plugins.smartunique.shortId();
|
||||
const requestId = plugins.isounique.uni();
|
||||
for (const channel of channelsArg) {
|
||||
subscriptionMap.add(
|
||||
channel.subscribe(
|
||||
|
@ -4,8 +4,6 @@ import * as pluginsTyped from './smartuniverse.pluginstyped';
|
||||
import { Handler, Route, Server } from '@pushrocks/smartexpress';
|
||||
import { UniverseCache, UniverseChannel, UniverseMessage } from './';
|
||||
|
||||
import * as paths from './smartuniverse.paths';
|
||||
|
||||
import * as interfaces from './interfaces';
|
||||
import { UniverseConnection } from './smartuniverse.classes.universeconnection';
|
||||
import { logger } from './smartuniverse.logging';
|
||||
@ -49,7 +47,7 @@ export class Universe {
|
||||
/**
|
||||
* get the currently running version of smartuniverse
|
||||
*/
|
||||
public getUniverseVersion() {
|
||||
/* public getUniverseVersion() {
|
||||
if (this.universeVersionStore) {
|
||||
return this.universeVersionStore;
|
||||
} else {
|
||||
@ -57,7 +55,7 @@ export class Universe {
|
||||
this.universeVersionStore = packageJson.version;
|
||||
return this.universeVersionStore;
|
||||
}
|
||||
}
|
||||
} */
|
||||
|
||||
/**
|
||||
* adds a channel to the Universe
|
||||
@ -94,7 +92,7 @@ export class Universe {
|
||||
// add a role for the clients
|
||||
const ClientRole = new plugins.smartsocket.SocketRole({
|
||||
name: 'UniverseClient',
|
||||
passwordHash: plugins.smarthash.sha256FromStringSync('UniverseClient'), // authentication happens on another level
|
||||
passwordHash: await plugins.isohash.sha256FromString('UniverseClient'), // authentication happens on another level
|
||||
});
|
||||
|
||||
// add the role to smartsocket
|
||||
|
@ -157,7 +157,7 @@ export class UniverseChannel {
|
||||
*/
|
||||
public async postMessage(messageDescriptor: interfaces.IMessageCreator) {
|
||||
const messageToSend = new UniverseMessage({
|
||||
id: plugins.smartunique.shortId(),
|
||||
id: plugins.isounique.uni(),
|
||||
messageText: messageDescriptor.messageText,
|
||||
payload: messageDescriptor.payload,
|
||||
targetChannelName: this.name,
|
||||
|
@ -1,7 +1,5 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
import * as interfaces from './interfaces';
|
||||
|
||||
import { Timer, TimeStamp } from '@pushrocks/smarttime';
|
||||
import { Universe } from './smartuniverse.classes.universe';
|
||||
import { UniverseChannel } from './smartuniverse.classes.universechannel';
|
||||
import { UniverseCache } from './smartuniverse.classes.universecache';
|
||||
@ -24,7 +22,7 @@ export class UniverseMessage<T> implements interfaces.IUniverseMessage {
|
||||
|
||||
public id: string;
|
||||
public timestamp: number;
|
||||
public smartTimestamp: TimeStamp;
|
||||
public smartTimestamp: plugins.smarttime.TimeStamp;
|
||||
public messageText: string;
|
||||
public passphrase: string;
|
||||
public payload: T;
|
||||
@ -49,7 +47,7 @@ export class UniverseMessage<T> implements interfaces.IUniverseMessage {
|
||||
/**
|
||||
* a destruction timer for this message
|
||||
*/
|
||||
public destructionTimer: Timer; // a timer to take care of message destruction
|
||||
public destructionTimer: plugins.smarttime.Timer; // a timer to take care of message destruction
|
||||
|
||||
/**
|
||||
* the constructor to create a universe message
|
||||
@ -57,7 +55,7 @@ export class UniverseMessage<T> implements interfaces.IUniverseMessage {
|
||||
* @param attachedPayloadArg
|
||||
*/
|
||||
constructor(messageDescriptor: interfaces.IUniverseMessage) {
|
||||
this.smartTimestamp = new TimeStamp(this.timestamp);
|
||||
this.smartTimestamp = new plugins.smarttime.TimeStamp(this.timestamp);
|
||||
this.messageText = messageDescriptor.messageText;
|
||||
this.targetChannelName = messageDescriptor.targetChannelName;
|
||||
this.passphrase = messageDescriptor.passphrase;
|
||||
@ -74,7 +72,7 @@ export class UniverseMessage<T> implements interfaces.IUniverseMessage {
|
||||
|
||||
public setDestructionTimer(selfdestructAfterArg?: number) {
|
||||
if (selfdestructAfterArg) {
|
||||
this.destructionTimer = new Timer(selfdestructAfterArg);
|
||||
this.destructionTimer = new plugins.smarttime.Timer(selfdestructAfterArg);
|
||||
this.destructionTimer.start();
|
||||
// set up self destruction by removing this from the parent messageCache
|
||||
this.destructionTimer.completed
|
||||
|
@ -1,3 +0,0 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
export const packageJson = plugins.path.join(__dirname, '../package.json');
|
@ -1,8 +1,3 @@
|
||||
// node native
|
||||
import * as path from 'path';
|
||||
|
||||
export { path };
|
||||
|
||||
// apiglobal scope
|
||||
import * as typedrequestInterfaces from '@apiglobal/typedrequest-interfaces';
|
||||
|
||||
@ -10,27 +5,23 @@ export { typedrequestInterfaces };
|
||||
|
||||
// pushrocks scope
|
||||
import * as lik from '@pushrocks/lik';
|
||||
import * as smarthash from '@pushrocks/smarthash';
|
||||
import * as isohash from '@pushrocks/isohash';
|
||||
import * as smartdelay from '@pushrocks/smartdelay';
|
||||
import * as smartfile from '@pushrocks/smartfile';
|
||||
import * as smartlog from '@pushrocks/smartlog';
|
||||
import * as smartpromise from '@pushrocks/smartpromise';
|
||||
import * as smartrequest from '@pushrocks/smartrequest';
|
||||
import * as smartrx from '@pushrocks/smartrx';
|
||||
import * as smartsocket from '@pushrocks/smartsocket';
|
||||
import * as smarttime from '@pushrocks/smarttime';
|
||||
import * as smartunique from '@pushrocks/smartunique';
|
||||
import * as isounique from '@pushrocks/isounique';
|
||||
|
||||
export {
|
||||
lik,
|
||||
smarthash,
|
||||
isohash,
|
||||
smartdelay,
|
||||
smartfile,
|
||||
smartlog,
|
||||
smartpromise,
|
||||
smartrx,
|
||||
smartrequest,
|
||||
smartsocket,
|
||||
smarttime,
|
||||
smartunique,
|
||||
isounique,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user