:dash: Simple yet powerful file-based mock server with recording abilities

Overview

💨 smoke

NPM version Build Status Node version XO code style License

Simple yet powerful file-based mock server with recording abilities

demo

Just drop a bunch of (JSON) files in a folder and you're ready to go!

Basic mock example

  1. Start the server: smoke
  2. Create a file named get_api#hello.json:
    {
      "message": "hello world!"
    }
  3. Test the mock: curl http://localhost:3000/api/hello

Features

Smoke is a file-based, convention over configuration mock server that can fill your API mocking needs without any complex setup. Yet, it supports many advanced features and dynamic mocks for almost any situation:

  • Generate mocks quickly by recording responses from an existing server
  • Use folders and file names to describe API routes and REST methods
  • Use templates to generate responses based on input queries and route parameters
  • Add / edit / remove mocks without restarting the server
  • Generate mocks with JavaScript for more complex responses
  • Define different mock sets to simulate various scenarii (errors...), with fallback
  • Customize headers and status code if needed, automatically detect content-type if not specified
  • Add custom middlewares to modify requests/responses
  • Mock only specific requests and proxy the rest to an existing server
  • Supports CORS (cross-origin resource-sharing)

Installation

npm install -g smoke

Usage

See some example mocks to quickly get a grasp of the syntax and possibilities.

CLI usage is quite straightforward you can just run smoke unless you want to add some options:

Usage: smoke [] [options]

Base options:
  -p, --port                   Server port           [default: 3000]
  -h, --host                  Server host           [default: "localhost"]
  -s, --set                   Mocks set to use      [default: none]
  -n, --not-found             Mocks for 404 errors  [default: "404.*"]
  -i, --ignore                Files to ignore       [default: none]
  -k, --hooks                 Middleware hooks      [default: none]
  -x, --proxy                 Fallback proxy if no mock found
  -o, --allow-cors [all|]    Enable CORS requests  [default: none]
  -l, --logs                        Enable server logs
  -v, --version                     Show version
  --help                            Show help

Mock recording:
  -r, --record                Proxy & record requests if no mock found
  -c, --collection            Save to single file mock collection
  -d, --depth                    Folder depth for mocks  [default: 1]
  -a, --save-headers                Save response headers
  -q, --save-query                  Save query parameters

File naming

General format: methods_api#route#@routeParam$queryParam=value.__set.extension

The path and file name of the mock is used to determinate:

Supported HTTP methods

Optionally prefix your file by the HTTP method supported followed by an underscore (for example get_). You can specify multiple methods at once using a + to separate them (for example post+put_); If no method is specified, the mock will be used for any HTTP method.

Server route and named route parameters

Use any combination of folders or hash-separated components to specify the server route.

For example api/example/get_hello.json is equivalent to get_api#example#hello.json and will repond to GET api/example/hello requests.

Additionaly, any route component can be defined as a route parameter by prefixing the name with @, for example api#resource#@id.json will match GET api/resource/1 and expose 1 as the value for the id parameter that can be used in dynamic mocks (templates or JavaScript).

Query parameters

You can further discriminate mocks by adding query parameters to match after defining the route, using a $ (instead of the regular ?) like you would specify them in a request.

For example get_api#hello$who=john.json will match the request api/get_hello?who=john.json.

Multiple query parameters to match can be added with &, for example get_api#hello$who=john&greet=hi.json. Any specified query parameter in the file name must be matched (in any order) by the request, but the opposite is not needed.

Note that special characters must be URL-encoded, for example use get_api#hello$who=john%20doe.json to set the parameter who with the value john doe.

Tip: If you need to URL-encode a string, just run node -p "encodeURIComponent('some string')" in a terminal.

Content type

The file extension will determine the content type of the response if it's not already specified in a custom header.

Files with no extension will use the default MIME type application/octet-stream.

You can have multiple mocks with the same API route and different file extensions, the server will then use the best mock depending of the Accept header of the request.

Mock set

You can optionally specify a mock set before the file extension by using a __set-name suffix after the file name.

For example get_api#hello__error.json will only be used if you start the server with the error set enabled: smoke --set error.

If you do not specify a mock set on your file name, it will be considered as the default mock for the specified route and will be used as a fallback if no mock with this set matched.

Templates

If you add an underscore _ after the file extension, the mock will be processed as a template before being sent to the client. Templates works only on text-based formats.

For example get_hello.html_ or get_hello.json_ will be treated as templates.

Every template can use an implicit context object that have these properties defined:

  • method: the HTTP method of the request (ex: 'GET', 'POST')
  • query: map with query parameters that were part of the request URL. For example, matched URL http://server/hello?who=world will result in the query value: { who: 'world' }.
  • params: map containing matched route parameters. For example the mock resource#@id.json_ with the matched URL http://server/resource/123 will result in the params value: { id: '123' }.
  • headers: map containing request headers
  • body: the request body. JSON bodies are automatically parsed.
  • files: if the request includes multipart/form-data, this will be the array of uploaded files (see multer documentation for more details)
Template syntax
  • {{ }} interpolates data in place

    For example, create get_hello.txt_ with this:

    Hello {{query.name}}!
    

    Then curl "http://localhost:3000/hello?name=John" returns Hello John!

  • {{{ }}} escapes HTML special chars from interpolated string

    For example, create get_hello.html_ with this:

    <h1>Hello {{{query.name}}}!h1>

    Then curl "http://localhost:3000/hello?name=%3CJack%26Jones%3E" returns:

    <h1>Hello <Jack&Jones>!h1>
  • <{ }> evaluates JavaScript to generate data

    For example, create get_hello.html_ with this:

    Hello to:
    <ul>
      <{ query.name.forEach(name => { }><li>{{name}}li><{ }); }>
    ul>

    Then curl "http://localhost:3000/hello?name=Jack&name=Jones" returns:

    Hello to:
    <ul>
      <li>Jackli><li>Jonesli>
    ul>

Custom status and headers

By default all mocks responses are sent with a status code 200 (OK), or 204 (No content) if a mock file is empty.

You can customize the response status and (optionally) headers with JSON and JavaScript files, using this syntax:

{
  "statusCode": 400,
  "body": {
    "error": "Bad request"
  },
  // headers can be omitted, only use if you want to customize them
  "headers": {
    "Content-Type": "text/plain"
  } 
}

You can also use non-string content type if you encode the content as a base64 string in the body property and add the property "buffer": true to the mock:

{
  "statusCode": 200,
  "body": "U21va2Ugcm9ja3Mh",
  "buffer": true,
  "headers": {
    "Content-Type": "application/octet-stream"
  } 
}

Mock formats

Any file format is supported for mocks, and the file extension will be used to determine the response content type. Files with no extension will use the default MIME type application/octet-stream.

Text formats (for example .json, .html, .txt...) can be processed as templates by adding an underscore to the file extension.

Note that JSON files and templates must use UTF-8 encoding.

JavaScript mocks

In addition, you can define dynamic mocks using JavaScript by using the .js extension, that will be loaded as a regular Node.js module.

In that case, your JS module is expected to export a function that take an input data object with the same properties as for templates and must returns the response body or an object containing the status code, headers and body.

Example:

module.exports = (data) => `Your user agent is: ${data.headers['user-agent']}`;

Note that by default, JS mocks use application/json for the response content type. If you want to use another type, you must set the Content-Type header yourself, for example:

module.exports = data => ({
  statusCode: 200,
  headers: {
    'Content-Type': 'text/plain'
  },
  body: `Your user agent is: ${data.headers['user-agent']}`
});

Fallback proxy

If you want to override responses of an existing server, you can use the --proxy option. This will proxy every request for which a mock does not exist to the specified host.

This can also be useful for mocking yet-to-be-implemented APIs and keep using real implemented APIs.

Mock recording

To quickly create a mock set of an existing server (to allow working offline for example), you can use the --record option. This will proxy every request for which a mock does not exist to the specified host, and record the resulting response as a mock file.

You can change the maximum folder depth for mock files created this way using the --depth option.

The recorded mock set can also be changed using the --set option.

Instead of recoring separate mock files, you can also record to a single file mock collection using the --collection option.

Note that by default response headers and request query parameters are not saved. To change this behavior, you can use the --save-headers and --save-query options.

Middleware hooks

For more advanced usages, you can hook on any standard Express middleware to modify the request and/or the response returned by the server.

To hook on your own middlewares, use the --hooks to specify a JavaScript module with exports setup like this:

module.exports = {
  before: [], // middlewares to be executed before the request is processed
  after: []   // middlewares to be executed after the request has been processed
};

Middlewares executed before the request is processed can be used to bypass regular mock response, for example to randomly simulate a server failure with an early error 500 response.

On the other hand, middlewares executed after the request have been processed can be used to augment or modify the response, for example by adding header or changing the response status. You can also access and modify the response body by using the special res.body property.

Remember that once you have used .send(), .sendStatus or .json() in a middleware the response cannot be altered anymore, that's why you should use the res.body property instead if you plan to alter the response later on.

See some example hooks.

Enabling CORS

Smoke offers support to requests originating from a different origin. However, by default, this would be disabled.

To enable CORS, pass the hosts that you want to allow to -o or --allow-cors arguments.

Accepted Values

  • all - Allow requests from *
  • - You could also pass a comma-separated list of hosts that you want to allow requests from something like 'http://localhost:3000,http://example.com'

Single file mock collection

You can regroup multiple mocks in a special single file with the extension .mocks.js, using this format:

module.exports = {
  '': '' // can be a string, an object (custom response) or a function (JavaScript mock)
};

See this example mock collection to get an idea of all possibilities.

The format of file name is the same as for individual mock files, and will be used to match the request using the same rules. As for the mock content, the format is also the same as what you would put in single file mock. If a request matches both a mock file and a mock within a collection with the same specificity, the mock file will always be used over the collection.

As the format is the same, you can convert a bunch of files to a single file mock collection and conversely. To convert separate mock files to a collection:

smoke-conv <glob> <output_file>  // Will create <output_file>.mocks.js from all mocks found

To convert a mock collection to separate files:

smoke-conv <file> <output_folder>  // Will extract separate mocks into <output_folder>

Note that only text-based file content will be inserted directly, other file content will be converted to a base64 string.

⚠️ There is a limitation regarding JavaScript mocks: only the exported function will be converted for a given mock, meaning that if you have non-exported functions, variables or imports they will be lost during the conversion.

Other mock servers

If you cannot find what you need here, you might want to check out one of these other Node.js mock servers:

Comments
  • Added support for CORS

    Added support for CORS

    Hi @sinedied,

    Firstly, kudos on coming up with a wonderful API mocking tool. It really helps me with quicker development sprints in situations where integration testing would not immediately be possible for me.

    So, I had a requirement where I wanted to mock an API which would be consumed by a front-end (both running on different origins) and hence I needed support for CORS. After doing so myself, I thought that it could be great if we could offer this out-of-the-box with smoke and hence this PR.

    Please do get back to me with your thoughts on this.

    opened by harshit-budhraja 4
  • Delay/Lag/Sleep for requests

    Delay/Lag/Sleep for requests

    Thanks for the project. I'm currently trying to use it as alternative to namshi/mockserver and like it much better. :)

    The only thing missing for me is the Response-Delay, which is useful to see if loading animations, spinners etc. are shown correctly.

    Do you think this can be added?

    question 
    opened by andreas-mausch 2
  • Bump terser from 5.5.1 to 5.14.2

    Bump terser from 5.5.1 to 5.14.2

    Bumps terser from 5.5.1 to 5.14.2.

    Changelog

    Sourced from terser's changelog.

    v5.14.2

    • Security fix for RegExps that should not be evaluated (regexp DDOS)
    • Source maps improvements (#1211)
    • Performance improvements in long property access evaluation (#1213)

    v5.14.1

    • keep_numbers option added to TypeScript defs (#1208)
    • Fixed parsing of nested template strings (#1204)

    v5.14.0

    • Switched to @​jridgewell/source-map for sourcemap generation (#1190, #1181)
    • Fixed source maps with non-terminated segments (#1106)
    • Enabled typescript types to be imported from the package (#1194)
    • Extra DOM props have been added (#1191)
    • Delete the AST while generating code, as a means to save RAM

    v5.13.1

    • Removed self-assignments (varname=varname) (closes #1081)
    • Separated inlining code (for inlining things into references, or removing IIFEs)
    • Allow multiple identifiers with the same name in var destructuring (eg var { a, a } = x) (#1176)

    v5.13.0

    • All calls to eval() were removed (#1171, #1184)
    • source-map was updated to 0.8.0-beta.0 (#1164)
    • NavigatorUAData was added to domprops to avoid property mangling (#1166)

    v5.12.1

    • Fixed an issue with function definitions inside blocks (#1155)
    • Fixed parens of new in some situations (closes #1159)

    v5.12.0

    • TERSER_DEBUG_DIR environment variable
    • @​copyright comments are now preserved with the comments="some" option (#1153)

    v5.11.0

    • Unicode code point escapes (\u{abcde}) are not emitted inside RegExp literals anymore (#1147)
    • acorn is now a regular dependency

    v5.10.0

    • Massive optimization to max_line_len (#1109)
    • Basic support for import assertions
    • Marked ES2022 Object.hasOwn as a pure function
    • Fix delete optional?.property
    • New CI/CD pipeline with github actions (#1057)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump trim-off-newlines from 1.0.1 to 1.0.3

    Bump trim-off-newlines from 1.0.1 to 1.0.3

    Bumps trim-off-newlines from 1.0.1 to 1.0.3.

    Commits
    • c3b28d3 1.0.3
    • 6226c95 Merge pull request #4 from Trott/fix-it-again
    • c77691d fix: remediate ReDOS further
    • 76ca93c chore: pin mocha to version that works with 0.10.x
    • 8cd3f73 1.0.2
    • fcbb73d Merge pull request #3 from Trott/patch-1
    • 6d89476 fix: update regular expression to remove ReDOS
    • 0cd87f5 chore: pin xo to latest version that works with current code
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by trott, a new releaser for trim-off-newlines since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump jsdom from 16.4.0 to 16.7.0

    Bump jsdom from 16.4.0 to 16.7.0

    Bumps jsdom from 16.4.0 to 16.7.0.

    Release notes

    Sourced from jsdom's releases.

    Version 16.7.0

    • Added AbortSignal.abort(). (ninevra)
    • Added dummy x and y properties to the return value of getBoundingClientRect(). (eiko)
    • Implemented wrapping for textareaEl.value if the wrap="" attribute is specified. (ninevra)
    • Changed newline normalization in <textarea>s according to recent HTML Standard updates. (ninevra)
    • Fixed some bad cascade computation in getComputedStyle(). (romain-trotard)

    Version 16.6.0

    • Added parentNode.replaceChildren(). (@​ninevra)
    • Fixed jsdom's handling of when code running inside the jsdom throws null or undefined as an exception. (@​mbest)
    • Removed the dependency on the deprecated request package, in the process fixing several issues with the XMLHttpRequest implementation around header processing. Thanks go to @​tobyhinloopen, @​andrewaylett, and especially @​vegardbb, for completing this months-long effort!

    Version 16.5.3

    • Fixed infinite recursion when using MutationObservers to observe elements inside a MutationObserver callback.

    Version 16.5.2

    • Fixed Access-Control-Allow-Headers: * to work with XMLHttpRequest. (silviot)
    • Fixed xhr.response to strip any leading BOM when xhr.responseType is "json".
    • Fixed new Text() and new Comment() constructors to properly set the resulting node's ownerDocument.
    • Fixed customElements.whenDefined() to resolve its returned promise with the custom element constructor, per recent spec updates. (ExE-Boss)
    • Fixed parsing to ensure that <svg>\<template></template></svg> does not throw an exception, but instead correctly produces a SVG-namespace \<template> element.
    • Fixed domParser.parseFromString() to treat <noscript> elements appropriately.
    • Fixed form control validity checking when the control was outside the <form> element and instead associated using the form="" attribute.
    • Fixed legendEl.form to return the correct result based on its parent <fieldset>.
    • Fixed optionEl.text to exclude <script> descendants.
    • Fixed radio buttons and checkboxes to not fire input and change events when disconnected.
    • Fixed inputEl.indeterminate to reset to its previous value when canceling a click event on a checkbox or radio button.
    • Fixed the behavior of event handler attributes (e.g. onclick="...code...") when there were global variables named element or formOwner. (ExE-Boss)
    • On Node.js v14.6.0+ where WeakRefs are available, fixed NodeIterator to no longer stop working when more than ten NodeIterator instances are created, and to use less memory due to inactive NodeIterators sticking around. (ExE-Boss)

    Version 16.5.1

    • Fixed a regression that broke customElements.get() in v16.5.0. (fdesforges)
    • Fixed window.event to have a setter which overwrites the window.event property with the given value, per the specification. This fixes an issue where after upgrading to jsdom v16.5.0 you would no longer be able to set a global variable named event in the jsdom context.

    Version 16.5.0

    • Added window.queueMicrotask().
    • Added window.event.
    • Added inputEvent.inputType. (diegohaz)
    • Removed ondragexit from Window and friends, per a spec update.
    • Fixed the URL of about:blank iframes. Previously it was getting set to the parent's URL. (SimonMueller)
    • Fixed the loading of subresources from the filesystem when they had non-ASCII filenames.
    • Fixed the hidden="" attribute to cause display: none per the user-agent stylesheet. (ph-fritsche)
    • Fixed the new File() constructor to no longer convert / to :, per a pending spec update.
    • Fixed mutation observer callbacks to be called with the MutationObserver instance as their this value.
    • Fixed <input type=checkbox> and <input type=radio> to be mutable even when disabled, per a spec update.
    • Fixed XMLHttpRequest to not fire a redundant final progress event if a progress event was previously fired with the same loaded value. This would usually occur with small files.
    • Fixed XMLHttpRequest to expose the Content-Length header on cross-origin responses.
    • Fixed xhr.response to return null for failures that occur during the middle of the download.
    • Fixed edge cases around passing callback functions or event handlers. (ExE-Boss)
    • Fixed edge cases around the properties of proxy-like objects such as localStorage or dataset. (ExE-Boss)

    ... (truncated)

    Changelog

    Sourced from jsdom's changelog.

    16.7.0

    • Added AbortSignal.abort(). (ninevra)
    • Added dummy x and y properties to the return value of getBoundingClientRect(). (eiko)
    • Implemented wrapping for textareaEl.value if the wrap="" attribute is specified. (ninevra)
    • Changed newline normalization in <textarea>s according to recent HTML Standard updates. (ninevra)
    • Fixed some bad cascade computation in getComputedStyle(). (romain-trotard)

    16.6.0

    • Added parentNode.replaceChildren(). (ninevra)
    • Fixed jsdom's handling of when code running inside the jsdom throws null or undefined as an exception. (mbest)
    • Removed the dependency on the deprecated request package, in the process fixing several issues with the XMLHttpRequest implementation around header processing. Special thanks to vegardbb for completing this months-long effort!

    16.5.3

    • Fixed infinite recursion when using MutationObservers to observe elements inside a MutationObserver callback.

    16.5.2

    • Fixed Access-Control-Allow-Headers: * to work with XMLHttpRequest. (silviot)
    • Fixed xhr.response to strip any leading BOM when xhr.responseType is "json".
    • Fixed new Text() and new Comment() constructors to properly set the resulting node's ownerDocument.
    • Fixed customElements.whenDefined() to resolve its returned promise with the custom element constructor, per recent spec updates. (ExE-Boss)
    • Fixed parsing to ensure that <svg>\<template></template></svg> does not throw an exception, but instead correctly produces a SVG-namespace \<template> element.
    • Fixed domParser.parseFromString() to treat <noscript> elements appropriately.
    • Fixed form control validity checking when the control was outside the <form> element and instead associated using the form="" attribute.
    • Fixed legendEl.form to return the correct result based on its parent <fieldset>.
    • Fixed optionEl.text to exclude <script> descendants.
    • Fixed radio buttons and checkboxes to not fire input and change events when disconnected.
    • Fixed inputEl.indeterminate to reset to its previous value when canceling a click event on a checkbox or radio button.
    • Fixed the behavior of event handler attributes (e.g. onclick="...code...") when there were global variables named element or formOwner. (ExE-Boss)
    • On Node.js v14.6.0+ where WeakRefs are available, fixed NodeIterator to no longer stop working when more than ten NodeIterator instances are created, and to use less memory due to inactive NodeIterators sticking around. (ExE-Boss)

    16.5.1

    • Fixed a regression that broke customElements.get() in v16.5.0. (fdesforges)
    • Fixed window.event to have a setter which overwrites the window.event property with the given value, per the specification. This fixes an issue where after upgrading to jsdom v16.5.0 you would no longer be able to set a global variable named event in the jsdom context.

    16.5.0

    • Added window.queueMicrotask().
    • Added window.event.
    • Added inputEvent.inputType. (diegohaz)
    • Removed ondragexit from Window and friends, per a spec update.
    • Fixed the URL of about:blank iframes. Previously it was getting set to the parent's URL. (SimonMueller)
    • Fixed the loading of subresources from the filesystem when they had non-ASCII filenames.
    • Fixed the hidden="" attribute to cause display: none per the user-agent stylesheet. (ph-fritsche)
    • Fixed the new File() constructor to no longer convert / to :, per a pending spec update.
    • Fixed mutation observer callbacks to be called with the MutationObserver instance as their this value.

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump semantic-release from 17.3.1 to 19.0.3

    Bump semantic-release from 17.3.1 to 19.0.3

    Bumps semantic-release from 17.3.1 to 19.0.3.

    Release notes

    Sourced from semantic-release's releases.

    v19.0.3

    19.0.3 (2022-06-09)

    Bug Fixes

    • log-repo: use the original form of the repo url to remove the need to mask credentials (#2459) (58a226f), closes #2449

    v19.0.2

    19.0.2 (2022-01-18)

    Bug Fixes

    • npm-plugin: upgraded to the stable version (0eca144)

    v19.0.1

    19.0.1 (2022-01-18)

    Bug Fixes

    • npm-plugin: upgraded to the latest beta version (8097afb)

    v19.0.0

    19.0.0 (2022-01-18)

    Bug Fixes

    • npm-plugin: upgraded to the beta, which upgrades npm to v8 (f634b8c)
    • upgrade marked to resolve ReDos vulnerability (#2330) (d9e5bc0)

    BREAKING CHANGES

    • npm-plugin: @semantic-release/npm has also dropped support for node v15
    • node v15 has been removed from our defined supported versions of node. this was done to upgrade to compatible versions of marked and marked-terminal that resolved the ReDoS vulnerability. removal of support of this node version should be low since it was not an LTS version and has been EOL for several months already.

    v19.0.0-beta.2

    19.0.0-beta.2 (2022-01-17)

    Bug Fixes

    • npm-plugin: upgraded to the beta, which upgrades npm to v8 (f634b8c)

    ... (truncated)

    Commits
    • 58a226f fix(log-repo): use the original form of the repo url to remove the need to ma...
    • 17d60d3 build(deps): bump npm from 8.3.1 to 8.12.0 (#2447)
    • ab45ab1 chore(lint): disabled rules that dont apply to this project (#2408)
    • ea389c3 chore(deps): update dependency yargs-parser to 13.1.2 [security] (#2402)
    • fa994db build(deps): bump node-fetch from 2.6.1 to 2.6.7 (#2399)
    • b79116b build(deps): bump trim-off-newlines from 1.0.1 to 1.0.3
    • 6fd7e56 build(deps): bump minimist from 1.2.5 to 1.2.6
    • 2b94bb4 docs: update broken link to CI config recipes (#2378)
    • b4bc191 docs: Correct circleci workflow (#2365)
    • 2c30e26 Merge pull request #2333 from semantic-release/next
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump semver-regex from 3.1.2 to 3.1.4

    Bump semver-regex from 3.1.2 to 3.1.4

    Bumps semver-regex from 3.1.2 to 3.1.4.

    Release notes

    Sourced from semver-regex's releases.

    v3.1.4

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump minimist from 1.2.5 to 1.2.6

    Bump minimist from 1.2.5 to 1.2.6

    Bumps minimist from 1.2.5 to 1.2.6.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump handlebars from 4.7.6 to 4.7.7

    Bump handlebars from 4.7.6 to 4.7.7

    Bumps handlebars from 4.7.6 to 4.7.7.

    Changelog

    Sourced from handlebars's changelog.

    v4.7.7 - February 15th, 2021

    • fix weird error in integration tests - eb860c0
    • fix: check prototype property access in strict-mode (#1736) - b6d3de7
    • fix: escape property names in compat mode (#1736) - f058970
    • refactor: In spec tests, use expectTemplate over equals and shouldThrow (#1683) - 77825f8
    • chore: start testing on Node.js 12 and 13 - 3789a30

    (POSSIBLY) BREAKING CHANGES:

    • the changes from version 4.6.0 now also apply in when using the compile-option "strict: true". Access to prototype properties is forbidden completely by default, specific properties or methods can be allowed via runtime-options. See #1633 for details. If you are using Handlebars as documented, you should not be accessing prototype properties from your template anyway, so the changes should not be a problem for you. Only the use of undocumented features can break your build.

    That is why we only bump the patch version despite mentioning breaking changes.

    Commits

    Commits
    • a9a8e40 v4.7.7
    • e66aed5 Update release notes
    • 7d4d170 disable IE in Saucelabs tests
    • eb860c0 fix weird error in integration tests
    • b6d3de7 fix: check prototype property access in strict-mode (#1736)
    • f058970 fix: escape property names in compat mode (#1736)
    • 77825f8 refator: In spec tests, use expectTemplate over equals and shouldThrow (#1683)
    • 3789a30 chore: start testing on Node.js 12 and 13
    • See full diff in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Bump node-notifier from 8.0.0 to 8.0.1

    Bump node-notifier from 8.0.0 to 8.0.1

    Bumps node-notifier from 8.0.0 to 8.0.1.

    Changelog

    Sourced from node-notifier's changelog.

    v8.0.1

    • fixes possible injection issue for notify-send
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies released 
    opened by dependabot[bot] 1
  • Bump ini from 1.3.5 to 1.3.7

    Bump ini from 1.3.5 to 1.3.7

    Bumps ini from 1.3.5 to 1.3.7.

    Commits
    • c74c8af 1.3.7
    • 024b8b5 update deps, add linting
    • 032fbaf Use Object.create(null) to avoid default object property hazards
    • 2da9039 1.3.6
    • cfea636 better git push script, before publish instead of after
    • 56d2805 do not allow invalid hazardous string as section name
    • See full diff in compare view
    Maintainer changes

    This version was pushed to npm by isaacs, a new releaser for ini since your current version.


    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • When running the server with -r and -a flags recording file body is empty

    When running the server with -r and -a flags recording file body is empty

    hey, Thanks for the project, it looks great. but when i running the server with recording and save-headers flags I get the file (response) body object = null : { "statusCode": 200, "headers": { "date": "Wed, 28 Apr 2021 08:53:00 GMT", "content-type": "application/json; charset=utf-8", ... }, "body": null } if I running the server with recording and without the "save-headers" flag then the file contains correct "body" value.

    opened by dennisbcloud 3
Releases(3.1.1)
Owner
Yohan Lasorsa
Code, OSS, DIY, Psytrance, Synths & Snow
Yohan Lasorsa
Simple, configurable part mock part proxy

Moxy Simple, configurable mock / proxy server. Table of Contents Quick start Programatic CLI Docker Docker compose Usage Programatic Via HTTP requests

Acrontum GmbH 7 Aug 12, 2022
Yet-Another-Relog-Mod - Just another relog mod. Call it YARM!

Yet Another Relog Mod A relog mod with a name so long, you can just call it YARM for short. Features An aesthetic relog list design that follows my "p

Hail 0 Oct 19, 2022
Alternatively called Yet Another Enhancement Point Tracker

Yet Another Talent Tracker Alternatively called Yet Another Enhancement Point Tracker, but that name doesn't sound as cool in an acronym, so let's cal

Hail 2 Oct 17, 2022
Async node.js implementation of the UDP Minecraft Server Query Protocol and TCP Minecraft Server List Ping Protocol

?? Mc Server Status Async node.js implementation of the UDP Minecraft Server Query Protocol and TCP Minecraft Server List Ping Protocol. Also availabl

Daniel 5 Nov 10, 2022
🌐 Human-friendly and powerful HTTP request library for Node.js

Sindre's open source work is supported by the community. Special thanks to: Human-friendly and powerful HTTP request library for Node.js Moving from R

Sindre Sorhus 12.5k Jan 9, 2023
Very very very powerful, extensible http client for both node.js and browser.

ES-Fetch-API 中文 | English Very very very powerful, extensible http client for both node.js and browser. Why should you use ES-Fetch API? Still using a

null 17 Dec 12, 2022
一个基于node.js,express,socket.io的websocket非常棒的聊天室,代码简单很适合新手. A very nice websocket chat room based on node.js, express, socket.io. the code is simple, very suitable for novices

来来往下看,虽然教程又臭又长但是一步步地保姆式教学很简单的,毕竟我是真菜鸟嘛,当然什么都往细了说╮(╯_╰)╭ 一、使用方法 该教程内容所有指令都为Linux CentOS 7.x环境下指令,其他平台请您自行查询(⊙x⊙;) 1.下载node.js并下载Sakura_Chat_Room node.j

樱樱怪 10 Jul 21, 2022
HTTP server mocking and expectations library for Node.js

Nock HTTP server mocking and expectations library for Node.js Nock can be used to test modules that perform HTTP requests in isolation. For instance,

Nock 11.9k Jan 3, 2023
SPDY server on Node.js

SPDY Server for node.js With this module you can create HTTP2 / SPDY servers in node.js with natural http module interface and fallback to regular htt

SPDY & HTTP2 in JavaScript 2.8k Jan 4, 2023
An HTTP Web Server for Chrome (chrome.sockets API)

An HTTP Web Server for Chrome (chrome.sockets API)

Kyle Graehl 1.2k Dec 31, 2022
A server side agnostic way to stream JavaScript.

JS in JSN A server side agnostic way to stream JavaScript, ideal for: inline hydration network free ad-hoc dependencies bootstrap on demand libraries

Andrea Giammarchi 26 Nov 21, 2022
A TurboRepo local cache server which uploads artifact cache to GH artifacts.

TurboRepo Github Artifacts action This action allows you use Github artifacts as TurboRepo remote cache server. How it works? It's starts a local Turb

Felix Mosheev 65 Dec 18, 2022
Node.js web server framework for Http/1.1 or Http/2

Node.js web server framework for Http/1.1 or Http/2 Description: This is http framework, you can use it to create Http/1.1 or Http/2 service。 Now let'

Jeremy Yu 10 Mar 24, 2022
Promise based HTTP client for the browser and node.js

axios Promise based HTTP client for the browser and node.js New axios docs website: click here Table of Contents Features Browser Support Installing E

axios 98k Dec 31, 2022
A simple NodeJS WebSocket WebApp vulnerable to blind SQL injection

NodeJS WebSocket SQLi vulnerable WebApp A one-day build of a vulnerable WebSocket app on NodeJS to practice boolean based SQLi over WebSocket. I made

Rayhan Ahmed 36 Dec 27, 2022
Simple proxy that is intended to support on chaos testing.

Proxy with Behavior Proxy with Behavior is a node application that work as a reverse proxy, and enables apply some behaviors to be executed in request

José Carlos de Moraes Filho 7 Jan 28, 2022
A simple emitter npm package

Emitter A simple emitter package This package is pretty self explanatory... need to get and send events? use an emitter Table of content How to use? P

null 3 Feb 26, 2022
NFC based attendance recording app for offline events.

NFC Entry NFC based attendance recording app for offline events. Capture proof of presence in offline events using NFC enabled ID Cards and a smartpho

Vaibhav Garg 9 Sep 24, 2022
zieeco 12 Jul 8, 2022