New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mock-responses

Package Overview
Dependencies
Maintainers
3
Versions
117
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mock-responses - npm Package Compare versions

Comparing version 3.2.10 to 3.3.1

dist/server/mock-responses.config.js

1

dist/server/common/interfaces/mock-response.interface.d.ts

@@ -15,2 +15,3 @@ export interface MockResponse {

updated_by?: string;
username?: string;
}

7

dist/server/mock-responses/mock-responses.service.js

@@ -86,3 +86,4 @@ "use strict";

const resContentType = data.res_content_type || 'application/json';
const UUID = require('uuid-int');
const id = data.id || require('uuid-int')(0).uuid();
const userName = data.username || username.sync();
const sql = `

@@ -96,7 +97,7 @@ INSERT INTO mock_responses(

) VALUES (
${UUID(0).uuid()}, ${reqName},
${id}, ${reqName},
'${data.req_url}', ${reqMethod}, '${reqPayload}',
${resStatus}, ${resDelaySec},
'${resContentType}', '${resBody}',
${createdAt}, '${username.sync()}', ${createdAt}, '${username.sync()}'
${createdAt}, '${userName}', ${createdAt}, '${userName}'
)

@@ -103,0 +104,0 @@ `;

{
"name": "mock-responses",
"author": "Allen Kim <allenhwkim@gmail.com>",
"version": "3.2.10",
"version": "3.3.1",
"license": "MIT",

@@ -13,14 +13,8 @@ "homepage": "https://github.com/allenhwkim/mock-responses#readme",

"scripts": {
"prebuild": "npm i && cd client && npm i && cd - && cd server && npm i && cd - && rimraf dist",
"prebuild": "cd client && npm i && cd - && cd server && npm i && cd - && rm -rf dist",
"build": "npm run build:server && npm run build:client",
"build:server": "cd server && npm run build",
"build:client": "cd client && npm run build",
"start": "npm stop && npm run start:server:dev && npm run start:client:dev",
"start:server:dev": "cd server && npm start & cd ..",
"start:client:dev": "cd client && npm start & cd ..",
"start:prod": "cd dist && node server/main.js",
"status": "ps aux | grep -e 'nodemon\\|ts-node\\|ng serve\\|main.js' | grep -v grep; echo ''",
"stop": "npm run stop:server && npm run stop:client",
"stop:server": "ps aux | grep -e 'nodemon\\|ts-node' | grep -v grep | awk '{print $2}' | xargs kill -9",
"stop:client": "ps aux | grep 'ng serve' | grep -v grep | awk '{print $2}' | xargs kill -9"
"start:server": "cd dist/server && node main.js",
"start:client": "cd dist/client && open index.html"
},

@@ -39,27 +33,3 @@ "files": [

"middleware"
],
"dependencies": {
"@nestjs/common": "^6.7.2",
"@nestjs/core": "^6.7.2",
"@nestjs/platform-express": "^6.7.2",
"@nestjs/serve-static": "^2.1.1",
"better-sqlite3": "^5.4.3",
"body-parser": "^1.19.0",
"cookie-parser": "^1.4.4",
"express": "^4.16.2",
"morgan": "^1.9.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^6.5.3",
"username": "^4.0.0",
"uuid-int": "^2.0.1",
"yargs": "^14.0.0"
},
"devDependencies": {
"@nestjs/platform-express": "^6.11.11",
"kill-port": "^1.6.0",
"rimraf": "^3.0.2"
},
"publishConfig": {
"registry": "https://registry.npmjs.com/"
}
]
}
# mock-responses
Intentionally NOT-real API server for front-end development
## To Start
[Introduction](https://medium.com/allenhwkim/fake-it-until-make-it-mock-responses-9a9eb3361312)
### Install
### Start server(NestJS)
```
$ npm init # only if package.json not exists
$ npm i mock-responses @nestjs/platform-express -D
$ cd server
$ npm i
$ npm run build
$ cd dist/server && node main.js
```
### Start / Setup
```
$ npx mock-resonses # modify this file
$ open http://localhost:9001/developer/#/ # to see the main dashboard
```
### Start Client(Angular9)
$ cd client
$ npm i
$ npm run build
$ cd dist/client && open index.html

@@ -39,5 +39,1 @@ ### Configuration File

```
### Techinical Spec.
* server: NestJS
* client: Angular9

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc