Installations
npm install @mocks-server/config
Score
87.2
Supply Chain
99.5
Quality
74.9
Maintenance
100
Vulnerability
99.3
License
Releases
Improve typings
Published on 06 Jun 2023
Support openapi example property
Published on 29 May 2023
Config: support nullable arrays and objects
Published on 25 May 2023
Fix plugins peerDependencies
Published on 24 May 2023
Migrating to TypeScript
Published on 23 May 2023
Fix OpenAPI paths with multiple params
Published on 09 Apr 2023
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
>=14.x
Typescript Support
No
Node Version
16.20.0
NPM Version
8.19.4
Statistics
293 Stars
4,048 Commits
17 Forks
4 Watching
6 Branches
4 Contributors
Updated on 27 Nov 2024
Languages
JavaScript (94.13%)
TypeScript (4.66%)
HTML (0.62%)
Handlebars (0.3%)
CSS (0.22%)
Shell (0.06%)
Total Downloads
Cumulative downloads
Total Downloads
1,826,898
Last day
-6%
5,547
Compared to previous day
Last week
-4%
26,943
Compared to previous week
Last month
8%
127,568
Compared to previous month
Last year
110.9%
1,200,893
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Introduction
Node.js mock server running live, interactive mocks in place of real APIs. It makes able to define many different responses for a same route, so, you can change the whole mocked API behavior by simply changing the response of one or many routes while the server is running.
Usage
Define your mocked API routes in YAML, JSON, JavaScript or TypeScript files. Mocks Server loads them automatically and watches for changes. Defining routes using any of the available APIs is also possible.
Routes can be defined in many ways, from plain objects to plain text and even Express middlewares, and they can act in different ways also, from sending a response to proxy the request to another host.
Configuration
Configure the server simply modifying the configuration file at the root folder of your project, or use command line arguments, or even environment variables.
For changing options while it is running, you can also use any of the available integrations tools that enable live interactions with Mocks Server.
Integrations
Providing a Javascript API, an interactive command line interface and a REST API for changing the responses of the mocked API while it is running, it is easy to use both for development and testing. Tools providing integrations with other ecosystems are also available, such as Cypress commands.
Documentation
To check out docs, visit www.mocks-server.org.
Ecosystem
Project | Status | Description |
---|---|---|
main | Main distribution. It includes all plugins preinstalled | |
core | Pluggable core. It can be used programmatically also | |
plugin-admin-api | Plugin providing an administration REST API | |
plugin-inquirer-cli | Plugin providing an administration interactive CLI | |
plugin-openapi | Plugin allowing to create routes and collections from OpenApi definitions | |
plugin-proxy | Plugin providing Proxy route handler | |
admin-api-client | API client for plugin-admin-api | |
admin-api-client-data-provider | API client for plugin-admin-api built using data-provider | |
admin-api-paths | Definition of plugin-admin-api routes | |
cypress-commands | Cypress commands to administrate Mocks Server | |
config | Provides configuration to core components and plugins | |
nested-collections | Nested collections manager. Used to provide alert namespaces to plugins | |
logger | Winston-based logger with namespaces and events emitter |
Contributing
Contributors are welcome. Please read the contributing guidelines and code of conduct.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0
Reason
no binaries found in the repo
Reason
Found 1/13 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/affected-projects.yml:1
- Warn: no topLevel permission defined: .github/workflows/build.yml:1
- Warn: no topLevel permission defined: .github/workflows/check-affected.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish-to-github.yml:1
- Warn: no topLevel permission defined: .github/workflows/publish-to-npm.yml:1
- Info: no jobLevel write permissions found
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/affected-projects.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/affected-projects.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/affected-projects.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/affected-projects.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/affected-projects.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/affected-projects.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/affected-projects.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/affected-projects.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/affected-projects.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/affected-projects.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/affected-projects.yml:42: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/affected-projects.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:64: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:66: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:78: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:104: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:112: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:116: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:124: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:137: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:142: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:151: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:175: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:180: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:186: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:192: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:198: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:215: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:217: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:221: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:229: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:255: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:257: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:261: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:269: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:291: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:293: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:297: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:305: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/build.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/build.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-affected.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/check-affected.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/check-affected.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/check-affected.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/check-affected.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/check-affected.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-affected.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/check-affected.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/check-affected.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/check-affected.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/check-affected.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/check-affected.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-to-github.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-github.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-to-github.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-github.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-to-github.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-github.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-to-github.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-github.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-to-npm.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-npm.yml/master?enable=pin
- Warn: third-party GitHubAction not pinned by hash: .github/workflows/publish-to-npm.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-npm.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/publish-to-npm.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/mocks-server/main/publish-to-npm.yml/master?enable=pin
- Info: 0 out of 32 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 21 third-party GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
- Warn: 0 commits out of 30 are checked with a SAST tool
Reason
64 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2jc-4fpr-4vhg
- Warn: Project is vulnerable to: GHSA-whgm-jr23-g3j9
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-wf5p-g6vw-rhxx
- Warn: Project is vulnerable to: GHSA-qwcr-r2fm-qrc7
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-x9w5-v3q2-3rhw
- Warn: Project is vulnerable to: GHSA-w8qv-6jwh-64r5
- Warn: Project is vulnerable to: GHSA-pxg6-pf52-xh8x
- Warn: Project is vulnerable to: GHSA-h452-7996-h45h
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-w573-4hg7-7wgq
- Warn: Project is vulnerable to: GHSA-phwq-j96m-2c2q
- Warn: Project is vulnerable to: GHSA-ghr5-ch3p-vcr6
- Warn: Project is vulnerable to: GHSA-434g-2637-qmqr
- Warn: Project is vulnerable to: GHSA-49q7-c7j4-3p7m
- Warn: Project is vulnerable to: GHSA-977x-g7h5-7qgw
- Warn: Project is vulnerable to: GHSA-f7q4-pwc6-w24p
- Warn: Project is vulnerable to: GHSA-fc9h-whq2-v747
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-6h5x-7c5m-7cr7
- Warn: Project is vulnerable to: GHSA-rv95-896h-c2vc
- Warn: Project is vulnerable to: GHSA-qw6h-vgh9-j6wx
- Warn: Project is vulnerable to: GHSA-jchw-25xp-jwwc
- Warn: Project is vulnerable to: GHSA-cxjh-pqwp-8mfp
- Warn: Project is vulnerable to: GHSA-pfrx-2q88-qq97
- Warn: Project is vulnerable to: GHSA-rc47-6667-2j5j
- Warn: Project is vulnerable to: GHSA-c7qv-q95q-8v27
- Warn: Project is vulnerable to: GHSA-33f9-j839-rf8h
- Warn: Project is vulnerable to: GHSA-c36v-fmgq-m8hx
- Warn: Project is vulnerable to: GHSA-78xj-cgh5-2h22
- Warn: Project is vulnerable to: GHSA-2p57-rm9w-gvfp
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-76p3-8jx3-jpfq
- Warn: Project is vulnerable to: GHSA-3rfm-jhwj-7488
- Warn: Project is vulnerable to: GHSA-hhq3-ff78-jv3g
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-5rrq-pxf6-6jx5
- Warn: Project is vulnerable to: GHSA-8fr3-hfg3-gpgp
- Warn: Project is vulnerable to: GHSA-gf8q-jrpm-jvxq
- Warn: Project is vulnerable to: GHSA-2r2c-g63r-vccr
- Warn: Project is vulnerable to: GHSA-cfm4-qjh2-4765
- Warn: Project is vulnerable to: GHSA-x4jg-mjrx-434g
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-9wv6-86v2-598j
- Warn: Project is vulnerable to: GHSA-7fh5-64p2-3v2j
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-gcx4-mw62-g8wm
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-m6fv-jmcg-4jfg
- Warn: Project is vulnerable to: GHSA-cm22-4g7w-348p
- Warn: Project is vulnerable to: GHSA-g4rg-993r-mgx7
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-4wf5-vphf-c2xc
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
- Warn: Project is vulnerable to: GHSA-4vvj-4cpr-p986
- Warn: Project is vulnerable to: GHSA-wr3j-pwj9-hqq6
- Warn: Project is vulnerable to: GHSA-j8xg-fqg3-53r7
- Warn: Project is vulnerable to: GHSA-3h5v-q93c-6h6q
Score
2.8
/10
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to @mocks-server/config
@mocks-server/admin-api-paths
Api paths of @mocks-server/plugin-admin-api
storybook-addon-manual-mocks
Mock your imports in the same way as Jest Manual Mocks do
@mocks-server/plugin-inquirer-cli
Mocks server plugin providing an interactive CLI
@mocks-server/main
Mock Server supporting multiple route variants and mocks