Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

labs-angular-backend

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

labs-angular-backend - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

src/app.ts

36

package.json
{
"name": "labs-angular-backend",
"version": "1.0.0",
"version": "1.0.1",
"description": "",

@@ -8,11 +8,14 @@ "main": "lib/index.js",

"scripts": {
"build": "npm run tsc:project",
"coverage": "npm run test-cov && npm run test-remap",
"postinstall": "npm run build",
"tslint": "tslint ./*.ts ./src/*.ts",
"test": "mocha --reporter spec --check-leaks --bail test/",
"prepublish": "npm run tsc:compile",
"tslint": "tslint ./src/**/*.ts",
"release:major": "npm version major && npm publish && git push --follow-tags",
"release:minor": "npm version minor && npm publish && git push --follow-tags",
"release:patch": "npm version patch && npm publish && git push --follow-tags",
"test": "npm run tsc && mocha --reporter spec --check-leaks --bail test/ $NODE_DEBUG_OPTION && npm run tslint",
"test:cov": "npm run tsc && istanbul cover -x \"examples/**\" node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/ && npm run test:remap",
"test:remap": "./node_modules/.bin/remap-istanbul -i coverage/coverage.json -o coverage/lcov-report -t html",
"test:travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/",
"tsc": "tsc",
"tsc:w": "tsc -w",
"tsc:project": "tsc --project tsconfig.json",
"start": "concurrently \"npm run tsc:w\" \"nodemon app.js --ignore *.ts\""
"tsc:compile": "tsc --project tsconfig.compile.json",
"start": "concurrently \"npm run tsc:w\" \"nodemon src/app.js --ignore *.ts\""
},

@@ -46,4 +49,17 @@ "repository": {

"concurrently": "^3.4.0",
"nodemon": "^1.11.0"
"nodemon": "^1.11.0",
"@types/chai": "^3.4.32",
"@types/mocha": "^2.2.31",
"@types/superagent": "^2.0.34",
"@types/supertest": "^2.0.0",
"body-parser": "^1.15.1",
"chai": "^3.5.0",
"istanbul": "^0.4.2",
"mocha": "^3.1.2",
"morgan": "^1.7.0",
"remap-istanbul": "^0.9.1",
"supertest": "^3.0.0",
"tslint": "^4.4.2",
"typescript": "^2.0.2"
}
}

@@ -13,3 +13,3 @@ import {Controller, All, Get, RouteService, Render} from "ts-express-decorators";

@All('/')
@All("/")
public test(): Object {

@@ -19,3 +19,3 @@ return this.routeService.getAll();

@Get('/html')
@Get("/html")
@Render("rest")

@@ -22,0 +22,0 @@ public render() {

@@ -5,2 +5,3 @@ import {

import {UsersService} from "../../services/UsersService";
import {IUser} from "../../models/User";

@@ -14,14 +15,14 @@ @Controller("/users")

@Get('/:email')
@Get("/:email")
public getByEmail(
@PathParams("email") email: string
) {
): IUser {
return this.usersService.findByEmail(email);
}
@Patch('/:email/:status')
@Patch("/:email/:status")
public updateStatus(
@PathParams("email") email: string,
@PathParams("status") status: string
) {
): IUser {

@@ -38,3 +39,3 @@ const user = this.usersService.findByEmail(email);

@BodyParams("user") user: any
) {
): IUser {
const oldUser = this.usersService.find(id);

@@ -52,3 +53,3 @@

@BodyParams("user") user: any
) {
): IUser {
return this.usersService.create(user);

@@ -62,6 +63,6 @@ }

@Get('/')
public getList() {
@Get("/")
public getList(): IUser[] {
return this.usersService.query();
}
}

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

* Store all callbacks that will be adding to socket.io instance when
* it'll be created. See SocketService.createServer().
* it"ll be created. See SocketService.createServer().
*/

@@ -29,4 +29,4 @@ public onConnection(callback: Function): SocketService {

// Map all callbacks to this connection events.
this.stacks.forEach(cb => this.io.on('connection', cb));
this.stacks.forEach(cb => this.io.on("connection", cb));
}
}

@@ -34,4 +34,4 @@ import {Value} from "ts-json-properties";

*/
public create(user: IUser){
user._id = require('node-uuid').v4();
public create(user: IUser) {
user._id = require("node-uuid").v4();

@@ -38,0 +38,0 @@ this.users.push(user);

{
"compilerOptions": {
"target": "es6",
"lib": ["es6", "dom"],
"types": [
"module": "commonjs",
"target": "es5",
"noImplicitAny": false,
"sourceMap": true,
"experimentalDecorators":true,
"emitDecoratorMetadata": true,
"moduleResolution": "node",
"isolatedModules": false,
"suppressImplicitAnyIndexErrors": false,
"lib": [
"es6",
"dom"
],
"rootDir": "src/",
"outDir": "lib/",
"declaration": true,
"declarationDir": "lib/",
"noResolve": false,
"types":[
"express",
"socket.io",
"reflect-metadata"
],
"module": "commonjs",
"moduleResolution": "node",
"experimentalDecorators":true,
"emitDecoratorMetadata": true,
"sourceMap": true,
"declaration": false
]
},
"exclude": [
"node_modules"
"node_modules",
"test",
"dts",
"lib",
"testing"
]
}

@@ -8,3 +8,6 @@ {

"socket.io",
"reflect-metadata"
"reflect-metadata",
"mocha",
"chai",
"supertest"
],

@@ -11,0 +14,0 @@ "module": "commonjs",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc