Socket
Socket
Sign inDemoInstall

labs-angular-backend

Package Overview
Dependencies
129
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.4 to 1.0.5

2

lib/index.d.ts
import { ServerLoader } from "ts-express-decorators";
import SocketService from "./services/SocketService";
import { SocketService } from "./services/SocketService";
export declare class Server extends ServerLoader {

@@ -4,0 +4,0 @@ constructor();

@@ -71,3 +71,3 @@ "use strict";

__metadata("design:type", Function),
__metadata("design:paramtypes", [SocketService_1.default]),
__metadata("design:paramtypes", [SocketService_1.SocketService]),
__metadata("design:returntype", void 0)

@@ -74,0 +74,0 @@ ], Server.prototype, "$onReady", null);

/// <reference types="node" />
import * as Http from "http";
export default class SocketService {
export declare class SocketService {
private io;

@@ -5,0 +5,0 @@ private stacks;

@@ -47,3 +47,3 @@ "use strict";

], SocketService);
exports.default = SocketService;
exports.SocketService = SocketService;
//# sourceMappingURL=SocketService.js.map
import { IUser, PartialUser } from "../models/User";
import { SocketService } from "./SocketService";
export declare class UsersService {
private socketService;
private USERS;
private users;
constructor();
constructor(socketService: SocketService);
/**

@@ -28,4 +30,4 @@ *

* Create a new User
* @param name
* @returns {{id: any, name: string}}
* @param user
*/

@@ -32,0 +34,0 @@ create(user: IUser): IUser;

@@ -15,4 +15,6 @@ "use strict";

var ts_log_debug_1 = require("ts-log-debug");
var SocketService_1 = require("./SocketService");
var UsersService = (function () {
function UsersService() {
function UsersService(socketService) {
this.socketService = socketService;
this.users = this.USERS.map(function (u) { return Object.assign({}, u); });

@@ -59,4 +61,4 @@ }

* Create a new User
* @param name
* @returns {{id: any, name: string}}
* @param user
*/

@@ -69,2 +71,3 @@ UsersService.prototype.create = function (user) {

ts_log_debug_1.$log.debug("users size", this.users.length);
this.socketService.emit("users.update", this.query());
return user;

@@ -91,2 +94,3 @@ };

users[index] = Object.assign(users[index], user);
this.socketService.emit("users.update", this.query());
return users[index];

@@ -97,2 +101,3 @@ };

this.users.splice(index, 1);
this.socketService.emit("users.update", this.query());
};

@@ -107,5 +112,5 @@ return UsersService;

ts_express_decorators_1.Service(),
__metadata("design:paramtypes", [])
__metadata("design:paramtypes", [SocketService_1.SocketService])
], UsersService);
exports.UsersService = UsersService;
//# sourceMappingURL=UsersService.js.map
{
"name": "labs-angular-backend",
"version": "1.0.4",
"version": "1.0.5",
"description": "",

@@ -40,2 +40,3 @@ "main": "lib/index.js",

"morgan": "^1.8.1",
"node-uuid": "^1.4.8",
"socket.io": "^1.7.3",

@@ -42,0 +43,0 @@ "ts-express-decorators": "^1.4.6",

import {$log} from "ts-log-debug";
import {ServerLoader, ServerSettings, GlobalAcceptMimesMiddleware, Inject} from "ts-express-decorators";
import Path = require("path");
import SocketService from "./services/SocketService";
import {SocketService} from "./services/SocketService";
import {Properties} from "ts-json-properties";

@@ -6,0 +6,0 @@

@@ -6,3 +6,3 @@ import * as Http from "http";

@Service()
export default class SocketService {
export class SocketService {
private io: SocketIO.Server;

@@ -9,0 +9,0 @@ private stacks = [];

@@ -5,2 +5,3 @@ import {Value} from "ts-json-properties";

import {$log} from "ts-log-debug";
import {SocketService} from "./SocketService";

@@ -14,3 +15,5 @@ @Service()

constructor() {
constructor(
private socketService: SocketService
) {
this.users = this.USERS.map(u => Object.assign({}, u));

@@ -59,6 +62,7 @@ }

}
/**
* Create a new User
* @param name
* @returns {{id: any, name: string}}
* @param user
*/

@@ -71,2 +75,5 @@ public create(user: IUser) {

$log.debug("users size", this.users.length);
this.socketService.emit("users.update", this.query());
return user;

@@ -97,2 +104,4 @@ }

this.socketService.emit("users.update", this.query());
return users[index];

@@ -104,3 +113,5 @@ }

this.users.splice(index, 1);
this.socketService.emit("users.update", this.query());
}
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc