Gathering detailed insights and metrics for @open-rpc/mock-server
Gathering detailed insights and metrics for @open-rpc/mock-server
Gathering detailed insights and metrics for @open-rpc/mock-server
Gathering detailed insights and metrics for @open-rpc/mock-server
npm install @open-rpc/mock-server
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
26 Stars
955 Commits
8 Forks
6 Watching
17 Branches
10 Contributors
Updated on 03 Nov 2024
TypeScript (70.35%)
JavaScript (20.07%)
Shell (9.58%)
Cumulative downloads
Total Downloads
Last day
-16%
1,183
Compared to previous day
Last week
36%
5,997
Compared to previous week
Last month
-4.8%
20,976
Compared to previous month
Last year
613%
88,657
Compared to previous year
Provide a Mock server for an OpenRPC Document.
Given an OpenRPC document, Mock server will provide a mock implementation of the JSON-RPC api that:
method.result.schema: JSONSchema
.Running the mock server in service mode will run a JSON-RPC service that:
mock
. It takes an openrpc document, returns a url path postfix. Appending the path to the services url will give us a mock server for the document provided.https://mock.open-rpc.org
Mock server is generally meant to be run via CLI, however it can also be imported to your project. doing so will:
1npm i -g @open-rpc/mock-server
1npm i -S @open-rpc/mock-server
The default settings expect to find a file in the root of your project called open-rpc.json
. It will must be a valid OpenRPC document as validated by OpenRPC Metaschema, or an error will be returned.
1npm run mock-server
this will start an HTTP server on http://localhost:3333 (default settings)
Where my-open-rpc-document.json is a file in the current directory which is a valid OpenRPC document as validated by OpenRPC Metaschema.
1open-rpc-mock-server -d my-open-rpc-document.json
You can also provide a URL that will resolve the OpenRPC document in JSON format:
1open-rpc-mock-server -d https://raw.githubusercontent.com/open-rpc/examples/master/service-descriptions/simple-math-openrpc.json
Allows you to add documents to the running server as a JSON-RPC request. One mock server in service mode can handle a large number of mocked services at once with this configuration.
1open-rpc-mock-server --mode service
A server is running on http://localhost:3333 now. You can call the mock
method, and pass it your OpenRPC document, which will start mocking that service (under the returned url path).
https://mock.open-rpc.org/
hereHow to contribute, build and release are outlined in CONTRIBUTING.md, BUILDING.md and RELEASING.md respectively. Commits in this repository follow the CONVENTIONAL_COMMITS.md specification.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
7 existing vulnerabilities detected
Details
Reason
Found 2/12 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
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 More