update
This commit is contained in:
parent
44701c99fc
commit
76cb8a36fc
1
dist/index.d.ts
vendored
1
dist/index.d.ts
vendored
@ -1 +1,2 @@
|
||||
export * from './smartuniverse.classes.smartuniverse';
|
||||
export * from './smartuniverse.classes.universeclient';
|
||||
|
3
dist/index.js
vendored
3
dist/index.js
vendored
@ -4,4 +4,5 @@ function __export(m) {
|
||||
}
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
__export(require("./smartuniverse.classes.smartuniverse"));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDJEQUFzRCJ9
|
||||
__export(require("./smartuniverse.classes.universeclient"));
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7OztBQUFBLDJEQUFzRDtBQUN0RCw0REFBdUQifQ==
|
3
dist/smartuniverse.classes.manager.d.ts
vendored
Normal file
3
dist/smartuniverse.classes.manager.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
export declare class UniverseManager {
|
||||
registerMember(): void;
|
||||
}
|
8
dist/smartuniverse.classes.manager.js
vendored
Normal file
8
dist/smartuniverse.classes.manager.js
vendored
Normal file
@ -0,0 +1,8 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class UniverseManager {
|
||||
registerMember() {
|
||||
}
|
||||
}
|
||||
exports.UniverseManager = UniverseManager;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR1bml2ZXJzZS5jbGFzc2VzLm1hbmFnZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHVuaXZlcnNlLmNsYXNzZXMubWFuYWdlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUlBO0lBRUUsY0FBYztJQUVkLENBQUM7Q0FDRjtBQUxELDBDQUtDIn0=
|
21
dist/smartuniverse.classes.smartuniverse.d.ts
vendored
21
dist/smartuniverse.classes.smartuniverse.d.ts
vendored
@ -1,11 +1,26 @@
|
||||
import { UniverseManager } from './smartuniverse.classes.manager';
|
||||
import { UniverseStore } from './smartuniverse.classes.universestore';
|
||||
export interface ISmartUniverseConstructorOptions {
|
||||
port: number | string;
|
||||
messageExpiryInMilliseconds: number;
|
||||
}
|
||||
export declare class SmartUniverse {
|
||||
export interface IServerGetMessagesRequestBody {
|
||||
youngerThan: number;
|
||||
}
|
||||
export interface IServerPutMessageRequestBody {
|
||||
message: string;
|
||||
payload: any;
|
||||
}
|
||||
export declare class Universe {
|
||||
universeStore: UniverseStore;
|
||||
universeManager: UniverseManager;
|
||||
private options;
|
||||
private universeVersionStore;
|
||||
private readonly universeVersion;
|
||||
private smartexpressServer;
|
||||
constructor(optionsArg: ISmartUniverseConstructorOptions);
|
||||
init(): Promise<void>;
|
||||
/**
|
||||
* initiates a server
|
||||
*/
|
||||
initServer(portArg: number | string): Promise<void>;
|
||||
stopServer(): Promise<void>;
|
||||
}
|
||||
|
39
dist/smartuniverse.classes.smartuniverse.js
vendored
39
dist/smartuniverse.classes.smartuniverse.js
vendored
@ -10,8 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = require("./smartuniverse.plugins");
|
||||
const smartexpress_1 = require("smartexpress");
|
||||
const smartuniverse_classes_manager_1 = require("./smartuniverse.classes.manager");
|
||||
const smartuniverse_classes_universestore_1 = require("./smartuniverse.classes.universestore");
|
||||
const paths = require("./smartuniverse.paths");
|
||||
class SmartUniverse {
|
||||
class Universe {
|
||||
get universeVersion() {
|
||||
if (this.universeVersionStore) {
|
||||
return this.universeVersionStore;
|
||||
@ -24,22 +26,41 @@ class SmartUniverse {
|
||||
}
|
||||
constructor(optionsArg) {
|
||||
this.options = optionsArg;
|
||||
this.universeStore = new smartuniverse_classes_universestore_1.UniverseStore(this.options.messageExpiryInMilliseconds);
|
||||
this.universeManager = new smartuniverse_classes_manager_1.UniverseManager();
|
||||
}
|
||||
init() {
|
||||
/**
|
||||
* initiates a server
|
||||
*/
|
||||
initServer(portArg) {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
this.smartexpressServer = new plugins.smartexpress.Server({
|
||||
cors: true,
|
||||
defaultAnswer: `smartuniverse server ${this.universeVersion}`,
|
||||
forceSsl: false,
|
||||
port: this.options.port
|
||||
port: portArg
|
||||
});
|
||||
const addRoute = new smartexpress_1.Route(this.smartexpressServer, 'addMessage');
|
||||
const addHandler = new smartexpress_1.Handler('PUT', requestBody => {
|
||||
return 'hi';
|
||||
// route handling
|
||||
const addMessageHandler = new smartexpress_1.Handler('PUT', request => {
|
||||
const requestBody = request.body;
|
||||
this.universeStore.addMessage(requestBody.message, requestBody.payload);
|
||||
return true;
|
||||
});
|
||||
// await this.smartexpressServer.addRoute()
|
||||
const readMessageHandler = new smartexpress_1.Handler('GET', request => {
|
||||
const requestBody = request.body;
|
||||
this.universeStore.readMessagesYoungerThan(requestBody.since);
|
||||
});
|
||||
const messageRoute = new smartexpress_1.Route(this.smartexpressServer, 'message');
|
||||
messageRoute.addHandler(addMessageHandler);
|
||||
messageRoute.addHandler(readMessageHandler);
|
||||
yield this.smartexpressServer.start();
|
||||
});
|
||||
}
|
||||
stopServer() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
yield this.smartexpressServer.stop();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.SmartUniverse = SmartUniverse;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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EQsTUFBTSxXQUFXLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQztnQkFDakMsSUFBSSxDQUFDLGFBQWEsQ0FBQyx1QkFBdUIsQ0FBQyxXQUFXLENBQUMsS0FBSyxDQUFDLENBQUM7WUFDaEUsQ0FBQyxDQUFDLENBQUE7WUFFRixNQUFNLFlBQVksR0FBRyxJQUFJLG9CQUFLLENBQUMsSUFBSSxDQUFDLGtCQUFrQixFQUFFLFNBQVMsQ0FBQyxDQUFDO1lBQ25FLFlBQVksQ0FBQyxVQUFVLENBQUMsaUJBQWlCLENBQUMsQ0FBQztZQUMzQyxZQUFZLENBQUMsVUFBVSxDQUFDLGtCQUFrQixDQUFDLENBQUM7WUFFNUMsTUFBTSxJQUFJLENBQUMsa0JBQWtCLENBQUMsS0FBSyxFQUFFLENBQUM7UUFDeEMsQ0FBQztLQUFBO0lBRVksVUFBVTs7WUFDckIsTUFBTSxJQUFJLENBQUMsa0JBQWtCLENBQUMsSUFBSSxFQUFFLENBQUM7UUFDdkMsQ0FBQztLQUFBO0NBQ0Y7QUE3REQsNEJBNkRDIn0=
|
2
dist/smartuniverse.classes.universeclient.d.ts
vendored
Normal file
2
dist/smartuniverse.classes.universeclient.d.ts
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
export declare class UniverseClient {
|
||||
}
|
6
dist/smartuniverse.classes.universeclient.js
vendored
Normal file
6
dist/smartuniverse.classes.universeclient.js
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
class UniverseClient {
|
||||
}
|
||||
exports.UniverseClient = UniverseClient;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR1bml2ZXJzZS5jbGFzc2VzLnVuaXZlcnNlY2xpZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnR1bml2ZXJzZS5jbGFzc2VzLnVuaXZlcnNlY2xpZW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBRUE7Q0FFQztBQUZELHdDQUVDIn0=
|
17
dist/smartuniverse.classes.universemessage.d.ts
vendored
Normal file
17
dist/smartuniverse.classes.universemessage.d.ts
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { Timer, TimeStamp } from 'smarttime';
|
||||
import { UniverseStore } from './smartuniverse.classes.universestore';
|
||||
export declare class UniverseMessage {
|
||||
/**
|
||||
* public and unique id
|
||||
* numeric ascending
|
||||
* adheres to time in milliseconds
|
||||
* avoids duplications though
|
||||
*/
|
||||
id: number;
|
||||
universeStore: UniverseStore;
|
||||
timestamp: TimeStamp;
|
||||
message: string;
|
||||
attachedPayload: any;
|
||||
destructionTimer: Timer;
|
||||
constructor(parentUniverseStore: UniverseStore, messageArg: string, attachedPayloadArg: any, selfdestructAfterArg: number);
|
||||
}
|
27
dist/smartuniverse.classes.universemessage.js
vendored
Normal file
27
dist/smartuniverse.classes.universemessage.js
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const smarttime_1 = require("smarttime");
|
||||
class UniverseMessage {
|
||||
constructor(parentUniverseStore, messageArg, attachedPayloadArg, selfdestructAfterArg) {
|
||||
this.universeStore = parentUniverseStore;
|
||||
this.timestamp = new smarttime_1.TimeStamp();
|
||||
this.message = messageArg;
|
||||
this.attachedPayload = attachedPayloadArg;
|
||||
this.destructionTimer = new smarttime_1.Timer(selfdestructAfterArg);
|
||||
this.destructionTimer.start();
|
||||
// set up self destruction by removing this from the parent messageStore
|
||||
this.destructionTimer.completed.then(() => __awaiter(this, void 0, void 0, function* () {
|
||||
this.universeStore.messageStore.remove(this);
|
||||
}));
|
||||
}
|
||||
}
|
||||
exports.UniverseMessage = UniverseMessage;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR1bml2ZXJzZS5jbGFzc2VzLnVuaXZlcnNlbWVzc2FnZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL3NtYXJ0dW5pdmVyc2UuY2xhc3Nlcy51bml2ZXJzZW1lc3NhZ2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUVBLHlDQUE2QztBQUc3QztJQWNFLFlBQVksbUJBQWtDLEVBQUUsVUFBa0IsRUFBRSxrQkFBdUIsRUFBRSxvQkFBNEI7UUFDdkgsSUFBSSxDQUFDLGFBQWEsR0FBRyxtQkFBbUIsQ0FBQztRQUN6QyxJQUFJLENBQUMsU0FBUyxHQUFHLElBQUkscUJBQVMsRUFBRSxDQUFDO1FBQ2pDLElBQUksQ0FBQyxPQUFPLEdBQUcsVUFBVSxDQUFDO1FBQzFCLElBQUksQ0FBQyxlQUFlLEdBQUcsa0JBQWtCLENBQUM7UUFDMUMsSUFBSSxDQUFDLGdCQUFnQixHQUFHLElBQUksaUJBQUssQ0FBQyxvQkFBb0IsQ0FBQyxDQUFBO1FBQ3ZELElBQUksQ0FBQyxnQkFBZ0IsQ0FBQyxLQUFLLEVBQUUsQ0FBQTtRQUU3Qix3RUFBd0U7UUFDeEUsSUFBSSxDQUFDLGdCQUFnQixDQUFDLFNBQVMsQ0FBQyxJQUFJLENBQUMsR0FBUyxFQUFFO1lBQzlDLElBQUksQ0FBQyxhQUFhLENBQUMsWUFBWSxDQUFDLE1BQU0sQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMvQyxDQUFDLENBQUEsQ0FBQyxDQUFBO0lBQ0osQ0FBQztDQUNGO0FBM0JELDBDQTJCQyJ9
|
20
dist/smartuniverse.classes.universestore.d.ts
vendored
Normal file
20
dist/smartuniverse.classes.universestore.d.ts
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||
import { Observable } from 'rxjs';
|
||||
export declare class UniverseStore {
|
||||
standardMessageExpiry: number;
|
||||
destructionTime: number;
|
||||
messageStore: plugins.lik.Objectmap<UniverseMessage>;
|
||||
private lastId;
|
||||
constructor(standardMessageExpiryArg: number);
|
||||
/**
|
||||
* add a message to the UniverseStore
|
||||
* @param messageArg
|
||||
* @param attachedPayloadArg
|
||||
*/
|
||||
addMessage(messageArg: any, attachedPayloadArg: any): void;
|
||||
/**
|
||||
* Read a message from the UniverseStore
|
||||
*/
|
||||
readMessagesYoungerThan(unixTimeArg?: number): Observable<UniverseMessage>;
|
||||
}
|
34
dist/smartuniverse.classes.universestore.js
vendored
Normal file
34
dist/smartuniverse.classes.universestore.js
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const smartuniverse_classes_universemessage_1 = require("./smartuniverse.classes.universemessage");
|
||||
const lik_1 = require("lik");
|
||||
const smartrx_1 = require("smartrx");
|
||||
class UniverseStore {
|
||||
constructor(standardMessageExpiryArg) {
|
||||
this.destructionTime = 60000;
|
||||
this.messageStore = new lik_1.Objectmap();
|
||||
this.lastId = 0; // stores the last id
|
||||
this.standardMessageExpiry = standardMessageExpiryArg;
|
||||
}
|
||||
/**
|
||||
* add a message to the UniverseStore
|
||||
* @param messageArg
|
||||
* @param attachedPayloadArg
|
||||
*/
|
||||
addMessage(messageArg, attachedPayloadArg) {
|
||||
this.messageStore.add(new smartuniverse_classes_universemessage_1.UniverseMessage(this, messageArg, attachedPayloadArg, this.destructionTime));
|
||||
}
|
||||
/**
|
||||
* Read a message from the UniverseStore
|
||||
*/
|
||||
readMessagesYoungerThan(unixTimeArg) {
|
||||
const messageObservable = smartrx_1.rxjs.Observable
|
||||
.from(this.messageStore.getArray())
|
||||
.filter(messageArg => {
|
||||
return messageArg.timestamp.isYoungerThanMilliSeconds(this.destructionTime);
|
||||
});
|
||||
return messageObservable;
|
||||
}
|
||||
}
|
||||
exports.UniverseStore = UniverseStore;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR1bml2ZXJzZS5jbGFzc2VzLnVuaXZlcnNlc3RvcmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi90cy9zbWFydHVuaXZlcnNlLmNsYXNzZXMudW5pdmVyc2VzdG9yZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUVBLG1HQUEwRTtBQUUxRSw2QkFBK0I7QUFHL0IscUNBQThCO0FBRTlCO0lBTUUsWUFBWSx3QkFBZ0M7UUFKckMsb0JBQWUsR0FBVyxLQUFLLENBQUM7UUFDaEMsaUJBQVksR0FBRyxJQUFJLGVBQVMsRUFBbUIsQ0FBQztRQUMvQyxXQUFNLEdBQVcsQ0FBQyxDQUFDLENBQUMscUJBQXFCO1FBRy9DLElBQUksQ0FBQyxxQkFBcUIsR0FBRyx3QkFBd0IsQ0FBQztJQUN4RCxDQUFDO0lBRUQ7Ozs7T0FJRztJQUNJLFVBQVUsQ0FBQyxVQUFVLEVBQUUsa0JBQWtCO1FBQzlDLElBQUksQ0FBQyxZQUFZLENBQUMsR0FBRyxDQUFDLElBQUksdURBQWUsQ0FBQyxJQUFJLEVBQUUsVUFBVSxFQUFFLGtCQUFrQixFQUFFLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQyxDQUFDO0lBQ3pHLENBQUM7SUFFRDs7T0FFRztJQUNJLHVCQUF1QixDQUFDLFdBQW9CO1FBQ2pELE1BQU0saUJBQWlCLEdBQUcsY0FBSSxDQUFDLFVBQVU7YUFDdEMsSUFBSSxDQUFDLElBQUksQ0FBQyxZQUFZLENBQUMsUUFBUSxFQUFFLENBQUM7YUFDbEMsTUFBTSxDQUFDLFVBQVUsQ0FBQyxFQUFFO1lBQ25CLE1BQU0sQ0FBQyxVQUFVLENBQUMsU0FBUyxDQUFDLHlCQUF5QixDQUFDLElBQUksQ0FBQyxlQUFlLENBQUMsQ0FBQztRQUM5RSxDQUFDLENBQUMsQ0FBQztRQUNMLE1BQU0sQ0FBQyxpQkFBaUIsQ0FBQztJQUUzQixDQUFDO0NBQ0Y7QUEvQkQsc0NBK0JDIn0=
|
19
dist/smartuniverse.cli.js
vendored
19
dist/smartuniverse.cli.js
vendored
@ -1,12 +1,21 @@
|
||||
"use strict";
|
||||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const plugins = require("./smartuniverse.plugins");
|
||||
const index_1 = require("./index");
|
||||
process.env.CLI = 'true';
|
||||
const universeCli = new plugins.smartcli.Smartcli();
|
||||
universeCli.standardTask().then(argvArg => {
|
||||
const standardUniverse = new index_1.SmartUniverse({
|
||||
port: 8765
|
||||
universeCli.standardTask().then((argvArg) => __awaiter(this, void 0, void 0, function* () {
|
||||
const standardUniverse = new index_1.Universe({
|
||||
messageExpiryInMilliseconds: 60000
|
||||
});
|
||||
});
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJza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FnQixHQUFHLElBQUksZ0JBQVEsQ0FBQztRQUNwQywyQkFBMkIsRUFBRSxLQUFLO0tBQ25DLENBQUMsQ0FBQztJQUNILE1BQU0sZ0JBQWdCLENBQUMsVUFBVSxDQUFDLElBQUksQ0FBQyxDQUFDO0FBRTFDLENBQUMsQ0FBQSxDQUFDLENBQUMifQ==
|
6
dist/smartuniverse.plugins.d.ts
vendored
6
dist/smartuniverse.plugins.d.ts
vendored
@ -1,5 +1,9 @@
|
||||
import * as lik from 'lik';
|
||||
import * as path from 'path';
|
||||
import * as smartcli from 'smartcli';
|
||||
import * as smartexpress from 'smartexpress';
|
||||
import * as smartfile from 'smartfile';
|
||||
export { path, smartcli, smartexpress, smartfile };
|
||||
import * as smartrequest from 'smartrequest';
|
||||
import * as smartrx from 'smartrx';
|
||||
import * as smarttime from 'smarttime';
|
||||
export { lik, path, smartcli, smartexpress, smartfile, smartrx, smartrequest, smarttime };
|
||||
|
10
dist/smartuniverse.plugins.js
vendored
10
dist/smartuniverse.plugins.js
vendored
@ -1,5 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const lik = require("lik");
|
||||
exports.lik = lik;
|
||||
const path = require("path");
|
||||
exports.path = path;
|
||||
const smartcli = require("smartcli");
|
||||
@ -8,4 +10,10 @@ const smartexpress = require("smartexpress");
|
||||
exports.smartexpress = smartexpress;
|
||||
const smartfile = require("smartfile");
|
||||
exports.smartfile = smartfile;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR1bml2ZXJzZS5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnR1bml2ZXJzZS5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsNkJBQTZCO0FBS3BCLG9CQUFJO0FBSmIscUNBQXFDO0FBSXRCLDRCQUFRO0FBSHZCLDZDQUE2QztBQUdwQixvQ0FBWTtBQUZyQyx1Q0FBdUM7QUFFQSw4QkFBUyJ9
|
||||
const smartrequest = require("smartrequest");
|
||||
exports.smartrequest = smartrequest;
|
||||
const smartrx = require("smartrx");
|
||||
exports.smartrx = smartrx;
|
||||
const smarttime = require("smarttime");
|
||||
exports.smarttime = smarttime;
|
||||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic21hcnR1bml2ZXJzZS5wbHVnaW5zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvc21hcnR1bml2ZXJzZS5wbHVnaW5zLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUEsMkJBQTJCO0FBU2xCLGtCQUFHO0FBUlosNkJBQTZCO0FBUWYsb0JBQUk7QUFQbEIscUNBQXFDO0FBT2pCLDRCQUFRO0FBTjVCLDZDQUE2QztBQU1mLG9DQUFZO0FBTDFDLHVDQUF1QztBQUtLLDhCQUFTO0FBSnJELDZDQUE2QztBQUltQixvQ0FBWTtBQUg1RSxtQ0FBbUM7QUFHb0IsMEJBQU87QUFGOUQsdUNBQXVDO0FBRXVDLDhCQUFTIn0=
|
@ -14,8 +14,13 @@
|
||||
"tapbundle": "^2.0.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"lik": "^2.0.5",
|
||||
"rxjs": "^5.5.6",
|
||||
"smartcli": "^2.0.12",
|
||||
"smartexpress": "^1.0.19",
|
||||
"smartfile": "^4.2.28"
|
||||
"smartexpress": "^1.0.21",
|
||||
"smartfile": "^4.2.28",
|
||||
"smartrequest": "^1.0.8",
|
||||
"smartrx": "^1.0.5",
|
||||
"smarttime": "^2.0.0"
|
||||
}
|
||||
}
|
||||
|
24
test/test.ts
24
test/test.ts
@ -1,12 +1,28 @@
|
||||
// tslint:disable-next-line:no-implicit-dependencies
|
||||
import { expect, tap } from 'tapbundle';
|
||||
import * as smartuniverse from '../ts/index';
|
||||
|
||||
let testSmartUniverse: smartuniverse.SmartUniverse;
|
||||
let testUniverse: smartuniverse.Universe;
|
||||
let testUniverseClient: smartuniverse.UniverseClient
|
||||
|
||||
tap.test('first test', async () => {
|
||||
testSmartUniverse = new smartuniverse.SmartUniverse({
|
||||
port: 8765
|
||||
})
|
||||
testUniverse = new smartuniverse.Universe({
|
||||
messageExpiryInMilliseconds: 5000
|
||||
});
|
||||
});
|
||||
|
||||
tap.test('add a message to the SmartUniverse', async () => {
|
||||
await testUniverse.initServer(8765);
|
||||
})
|
||||
|
||||
// testing message handling
|
||||
tap.test('create smartuniverse client', async () => {
|
||||
testUniverseClient = new smartuniverse.UniverseClient();
|
||||
expect(testUniverseClient).to.be.instanceof(smartuniverse.UniverseClient)
|
||||
})
|
||||
|
||||
tap.test('should end the server correctly', async () => {
|
||||
await testUniverse.stopServer();
|
||||
})
|
||||
|
||||
tap.start();
|
||||
|
@ -1 +1,2 @@
|
||||
export * from './smartuniverse.classes.smartuniverse';
|
||||
export * from './smartuniverse.classes.universe';
|
||||
export * from './smartuniverse.classes.universeclient';
|
||||
|
10
ts/smartuniverse.classes.manager.ts
Normal file
10
ts/smartuniverse.classes.manager.ts
Normal file
@ -0,0 +1,10 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Objectmap } from 'lik';
|
||||
|
||||
export class UniverseManager {
|
||||
|
||||
registerMember () {
|
||||
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Handler, Route, Server } from 'smartexpress';
|
||||
|
||||
import * as paths from './smartuniverse.paths';
|
||||
|
||||
export interface ISmartUniverseConstructorOptions {
|
||||
port: number | string;
|
||||
}
|
||||
|
||||
export class SmartUniverse {
|
||||
private options: ISmartUniverseConstructorOptions;
|
||||
private universeVersionStore: string;
|
||||
private get universeVersion() {
|
||||
if (this.universeVersionStore) {
|
||||
return this.universeVersionStore;
|
||||
} else {
|
||||
const packageJson = plugins.smartfile.fs.toObjectSync(paths.packageJson);
|
||||
this.universeVersionStore = packageJson.version;
|
||||
return this.universeVersionStore;
|
||||
}
|
||||
}
|
||||
private smartexpressServer: plugins.smartexpress.Server;
|
||||
constructor(optionsArg: ISmartUniverseConstructorOptions) {
|
||||
this.options = optionsArg;
|
||||
}
|
||||
|
||||
public async init() {
|
||||
this.smartexpressServer = new plugins.smartexpress.Server({
|
||||
cors: true,
|
||||
defaultAnswer: `smartuniverse server ${this.universeVersion}`,
|
||||
forceSsl: false,
|
||||
port: this.options.port
|
||||
});
|
||||
|
||||
const addRoute = new Route(this.smartexpressServer, 'addMessage');
|
||||
const addHandler = new Handler('PUT', requestBody => {
|
||||
return 'hi';
|
||||
});
|
||||
// await this.smartexpressServer.addRoute()
|
||||
}
|
||||
}
|
84
ts/smartuniverse.classes.universe.ts
Normal file
84
ts/smartuniverse.classes.universe.ts
Normal file
@ -0,0 +1,84 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Handler, Route, Server } from 'smartexpress';
|
||||
|
||||
import { UniverseManager } from './smartuniverse.classes.manager';
|
||||
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||
import { UniverseStore } from './smartuniverse.classes.universestore';
|
||||
import * as paths from './smartuniverse.paths';
|
||||
|
||||
export interface ISmartUniverseConstructorOptions {
|
||||
messageExpiryInMilliseconds: number;
|
||||
}
|
||||
|
||||
export interface IServerGetMessagesRequestBody {
|
||||
youngerThan: number;
|
||||
}
|
||||
|
||||
export interface IServerPutMessageRequestBody {
|
||||
message: string,
|
||||
payload: any
|
||||
}
|
||||
|
||||
export class Universe {
|
||||
// subinstances
|
||||
public universeStore: UniverseStore;
|
||||
public universeManager: UniverseManager;
|
||||
|
||||
// options
|
||||
private options: ISmartUniverseConstructorOptions;
|
||||
|
||||
// Store version handling
|
||||
private universeVersionStore: string;
|
||||
private get universeVersion() {
|
||||
if (this.universeVersionStore) {
|
||||
return this.universeVersionStore;
|
||||
} else {
|
||||
const packageJson = plugins.smartfile.fs.toObjectSync(paths.packageJson);
|
||||
this.universeVersionStore = packageJson.version;
|
||||
return this.universeVersionStore;
|
||||
}
|
||||
}
|
||||
|
||||
private smartexpressServer: plugins.smartexpress.Server;
|
||||
|
||||
constructor(optionsArg: ISmartUniverseConstructorOptions) {
|
||||
this.options = optionsArg;
|
||||
this.universeStore = new UniverseStore(this.options.messageExpiryInMilliseconds);
|
||||
this.universeManager = new UniverseManager();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* initiates a server
|
||||
*/
|
||||
public async initServer(portArg: number | string) {
|
||||
this.smartexpressServer = new plugins.smartexpress.Server({
|
||||
cors: true,
|
||||
defaultAnswer: `smartuniverse server ${this.universeVersion}`,
|
||||
forceSsl: false,
|
||||
port: portArg
|
||||
});
|
||||
|
||||
// route handling
|
||||
const addMessageHandler = new Handler('PUT', request => {
|
||||
const requestBody = request.body;
|
||||
this.universeStore.addMessage(requestBody.message, requestBody.payload);
|
||||
return true;
|
||||
});
|
||||
const readMessageHandler = new Handler('GET', request => {
|
||||
const requestBody = request.body;
|
||||
this.universeStore.readMessagesYoungerThan(requestBody.since);
|
||||
})
|
||||
|
||||
const messageRoute = new Route(this.smartexpressServer, 'message');
|
||||
messageRoute.addHandler(addMessageHandler);
|
||||
messageRoute.addHandler(readMessageHandler);
|
||||
|
||||
await this.smartexpressServer.start();
|
||||
}
|
||||
|
||||
public async stopServer () {
|
||||
await this.smartexpressServer.stop();
|
||||
}
|
||||
}
|
14
ts/smartuniverse.classes.universeclient.ts
Normal file
14
ts/smartuniverse.classes.universeclient.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { IServerGetMessagesRequestBody, IServerPutMessageRequestBody } from './smartuniverse.classes.universe'
|
||||
|
||||
export class UniverseClient {
|
||||
public sendMessage(message, messagePayload) {
|
||||
|
||||
}
|
||||
|
||||
pulic getMessageObservable () {
|
||||
|
||||
}
|
||||
}
|
33
ts/smartuniverse.classes.universemessage.ts
Normal file
33
ts/smartuniverse.classes.universemessage.ts
Normal file
@ -0,0 +1,33 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { Timer, TimeStamp } from 'smarttime';
|
||||
import { UniverseStore } from './smartuniverse.classes.universestore';
|
||||
|
||||
export class UniverseMessage {
|
||||
/**
|
||||
* public and unique id
|
||||
* numeric ascending
|
||||
* adheres to time in milliseconds
|
||||
* avoids duplications though
|
||||
*/
|
||||
public id: number;
|
||||
public universeStore: UniverseStore;
|
||||
public timestamp: TimeStamp;
|
||||
public message: string;
|
||||
public attachedPayload: any;
|
||||
public destructionTimer: Timer;
|
||||
|
||||
constructor(parentUniverseStore: UniverseStore, messageArg: string, attachedPayloadArg: any, selfdestructAfterArg: number) {
|
||||
this.universeStore = parentUniverseStore;
|
||||
this.timestamp = new TimeStamp();
|
||||
this.message = messageArg;
|
||||
this.attachedPayload = attachedPayloadArg;
|
||||
this.destructionTimer = new Timer(selfdestructAfterArg)
|
||||
this.destructionTimer.start()
|
||||
|
||||
// set up self destruction by removing this from the parent messageStore
|
||||
this.destructionTimer.completed.then(async () => {
|
||||
this.universeStore.messageStore.remove(this);
|
||||
})
|
||||
}
|
||||
}
|
41
ts/smartuniverse.classes.universestore.ts
Normal file
41
ts/smartuniverse.classes.universestore.ts
Normal file
@ -0,0 +1,41 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { UniverseMessage } from './smartuniverse.classes.universemessage';
|
||||
|
||||
import { Objectmap } from 'lik'
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { rxjs } from 'smartrx'
|
||||
|
||||
export class UniverseStore {
|
||||
public standardMessageExpiry: number;
|
||||
public destructionTime: number = 60000;
|
||||
public messageStore = new Objectmap<UniverseMessage>();
|
||||
private lastId: number = 0; // stores the last id
|
||||
|
||||
constructor(standardMessageExpiryArg: number) {
|
||||
this.standardMessageExpiry = standardMessageExpiryArg;
|
||||
}
|
||||
|
||||
/**
|
||||
* add a message to the UniverseStore
|
||||
* @param messageArg
|
||||
* @param attachedPayloadArg
|
||||
*/
|
||||
public addMessage(messageArg, attachedPayloadArg) {
|
||||
this.messageStore.add(new UniverseMessage(this, messageArg, attachedPayloadArg, this.destructionTime));
|
||||
}
|
||||
|
||||
/**
|
||||
* Read a message from the UniverseStore
|
||||
*/
|
||||
public readMessagesYoungerThan(unixTimeArg?: number): Observable<UniverseMessage> {
|
||||
const messageObservable = rxjs.Observable
|
||||
.from(this.messageStore.getArray())
|
||||
.filter(messageArg => {
|
||||
return messageArg.timestamp.isYoungerThanMilliSeconds(this.destructionTime);
|
||||
});
|
||||
return messageObservable;
|
||||
|
||||
}
|
||||
}
|
@ -1,13 +1,15 @@
|
||||
import * as plugins from './smartuniverse.plugins';
|
||||
|
||||
import { SmartUniverse } from './index';
|
||||
import { Universe } from './index';
|
||||
|
||||
process.env.CLI = 'true';
|
||||
|
||||
const universeCli = new plugins.smartcli.Smartcli();
|
||||
|
||||
universeCli.standardTask().then(argvArg => {
|
||||
const standardUniverse = new SmartUniverse({
|
||||
port: 8765
|
||||
universeCli.standardTask().then(async argvArg => {
|
||||
const standardUniverse = new Universe({
|
||||
messageExpiryInMilliseconds: 60000
|
||||
});
|
||||
await standardUniverse.initServer(8765);
|
||||
|
||||
});
|
||||
|
@ -1,6 +1,10 @@
|
||||
import * as lik from 'lik';
|
||||
import * as path from 'path';
|
||||
import * as smartcli from 'smartcli';
|
||||
import * as smartexpress from 'smartexpress';
|
||||
import * as smartfile from 'smartfile';
|
||||
import * as smartrequest from 'smartrequest';
|
||||
import * as smartrx from 'smartrx';
|
||||
import * as smarttime from 'smarttime';
|
||||
|
||||
export { path, smartcli, smartexpress, smartfile };
|
||||
export { lik, path, smartcli, smartexpress, smartfile, smartrx, smartrequest, smarttime };
|
||||
|
@ -3,4 +3,4 @@
|
||||
"tslint:latest",
|
||||
"tslint-config-prettier"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
61
yarn.lock
61
yarn.lock
@ -36,7 +36,7 @@
|
||||
"@types/events" "*"
|
||||
"@types/node" "*"
|
||||
|
||||
"@types/express@*", "@types/express@^4.0.39":
|
||||
"@types/express@*", "@types/express@^4.11.1":
|
||||
version "4.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/express/-/express-4.11.1.tgz#f99663b3ab32d04cb11db612ef5dd7933f75465b"
|
||||
dependencies:
|
||||
@ -69,8 +69,8 @@
|
||||
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
|
||||
|
||||
"@types/node@*":
|
||||
version "9.4.6"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.6.tgz#d8176d864ee48753d053783e4e463aec86b8d82e"
|
||||
version "9.4.7"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.4.7.tgz#57d81cd98719df2c9de118f2d5f3b1120dcd7275"
|
||||
|
||||
"@types/serve-static@*":
|
||||
version "1.13.1"
|
||||
@ -583,7 +583,7 @@ helmet-csp@2.7.0:
|
||||
lodash.reduce "4.6.0"
|
||||
platform "1.3.5"
|
||||
|
||||
helmet@^3.10.0:
|
||||
helmet@^3.12.0:
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/helmet/-/helmet-3.12.0.tgz#2098e35cf4e51c64c2f1d38670b7d382a377d92c"
|
||||
dependencies:
|
||||
@ -735,7 +735,7 @@ left-pad@^1.1.3:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/left-pad/-/left-pad-1.2.0.tgz#d30a73c6b8201d8f7d8e7956ba9616087a68e0ee"
|
||||
|
||||
lik@^2.0.2:
|
||||
lik@^2.0.1, lik@^2.0.2, lik@^2.0.5:
|
||||
version "2.0.5"
|
||||
resolved "https://registry.yarnpkg.com/lik/-/lik-2.0.5.tgz#1338a3201828b557fa91a5b8a6013743ff720e10"
|
||||
dependencies:
|
||||
@ -827,8 +827,8 @@ log-symbols@^2.1.0:
|
||||
chalk "^2.0.1"
|
||||
|
||||
lru-cache@^4.0.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.1.tgz#622e32e82488b49279114a4f9ecf45e7cd6bba55"
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-4.1.2.tgz#45234b2e6e2f2b33da125624c4664929a0224c3f"
|
||||
dependencies:
|
||||
pseudomap "^1.0.2"
|
||||
yallist "^2.1.2"
|
||||
@ -886,6 +886,10 @@ minimist@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
|
||||
moment@^2.21.0:
|
||||
version "2.21.0"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.21.0.tgz#2a114b51d2a6ec9e6d83cf803f838a878d8a023a"
|
||||
|
||||
ms@2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||
@ -1097,7 +1101,7 @@ restore-cursor@^2.0.0:
|
||||
onetime "^2.0.0"
|
||||
signal-exit "^3.0.2"
|
||||
|
||||
rxjs@^5.4.3:
|
||||
rxjs@^5.4.3, rxjs@^5.5.2, rxjs@^5.5.6:
|
||||
version "5.5.6"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.6.tgz#e31fb96d6fd2ff1fd84bcea8ae9c02d007179c02"
|
||||
dependencies:
|
||||
@ -1184,7 +1188,7 @@ smartcli@^2.0.12:
|
||||
typings-global "^1.0.20"
|
||||
yargs "^11.0.0"
|
||||
|
||||
smartdelay@^1.0.3:
|
||||
smartdelay@^1.0.3, smartdelay@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/smartdelay/-/smartdelay-1.0.4.tgz#791c1a4ee6770494064c10b1d2d2b8e6f3105b82"
|
||||
dependencies:
|
||||
@ -1199,18 +1203,25 @@ smartenv@^2.0.0:
|
||||
smartq "^1.1.1"
|
||||
typings-global "^1.0.14"
|
||||
|
||||
smartexpress@^1.0.19:
|
||||
version "1.0.19"
|
||||
resolved "https://registry.yarnpkg.com/smartexpress/-/smartexpress-1.0.19.tgz#8dd16521d3e27f8336ba28ece6028f9fab1ed793"
|
||||
smartevent@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/smartevent/-/smartevent-1.0.1.tgz#13d2bf2cf094ebdf17813fa0d46041f817a302aa"
|
||||
dependencies:
|
||||
"@types/express" "^4.0.39"
|
||||
smartq "^1.1.1"
|
||||
typings-global "^1.0.16"
|
||||
|
||||
smartexpress@^1.0.21:
|
||||
version "1.0.21"
|
||||
resolved "https://registry.yarnpkg.com/smartexpress/-/smartexpress-1.0.21.tgz#c4fef833d3c6f879da67b7a4c7943c389d85b237"
|
||||
dependencies:
|
||||
"@types/express" "^4.11.1"
|
||||
"@types/helmet" "^0.0.37"
|
||||
body-parser "^1.18.2"
|
||||
cors "^2.8.4"
|
||||
express "^4.16.2"
|
||||
express-force-ssl "^0.3.2"
|
||||
helmet "^3.10.0"
|
||||
lik "^2.0.2"
|
||||
helmet "^3.12.0"
|
||||
lik "^2.0.5"
|
||||
smartq "^1.1.6"
|
||||
|
||||
smartfile@^4.2.28:
|
||||
@ -1258,6 +1269,24 @@ smartrequest@^1.0.8:
|
||||
dependencies:
|
||||
smartq "^1.1.1"
|
||||
|
||||
smartrx@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/smartrx/-/smartrx-1.0.5.tgz#28dc7bcaf5a33b13cfdf355572bcaf3ebb896e74"
|
||||
dependencies:
|
||||
lik "^2.0.1"
|
||||
rxjs "^5.5.2"
|
||||
smartevent "^1.0.1"
|
||||
smartq "^1.1.6"
|
||||
typings-global "^1.0.23"
|
||||
|
||||
smarttime@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/smarttime/-/smarttime-2.0.0.tgz#fefa32a5087174c4f32fbd3a862176aa9b774b93"
|
||||
dependencies:
|
||||
moment "^2.21.0"
|
||||
smartdelay "^1.0.4"
|
||||
smartq "^1.1.6"
|
||||
|
||||
sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
@ -1361,7 +1390,7 @@ type-is@~1.6.15:
|
||||
media-typer "0.3.0"
|
||||
mime-types "~2.1.18"
|
||||
|
||||
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20:
|
||||
typings-global@^1.0.14, typings-global@^1.0.16, typings-global@^1.0.19, typings-global@^1.0.20, typings-global@^1.0.23:
|
||||
version "1.0.28"
|
||||
resolved "https://registry.yarnpkg.com/typings-global/-/typings-global-1.0.28.tgz#e28cc965476564cbc00e438739e0aa0735d323d4"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user