feat: Created a mini nodeJS server with NewMan for testing without PostMan GUI.

This will mimic a run in a CD/CI environment or docker container.
This commit is contained in:
Simon Priet
2021-09-08 14:01:19 +02:00
parent 5fbd7c88fa
commit e69a613a37
5610 changed files with 740417 additions and 3 deletions

37
node_modules/http-reasons/.npmignore generated vendored Normal file
View File

@@ -0,0 +1,37 @@
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history

201
node_modules/http-reasons/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2016, Postdot Technologies, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

1
node_modules/http-reasons/README.md generated vendored Normal file
View File

@@ -0,0 +1 @@
# http-reasons

278
node_modules/http-reasons/db.json generated vendored Normal file
View File

@@ -0,0 +1,278 @@
{
"100": {
"name": "Continue",
"detail": "This means that the server has received the request headers, and that the client should proceed to send the request body (in the case of a request for which a body needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient. To have a server check if the request could be accepted based on the request's headers alone, a client must send Expect: 100-continue as a header in its initial request and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue)."
},
"101": {
"name": "Switching Protocols",
"detail": "This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so."
},
"102": {
"name": "Processing (WebDAV) (RFC 2518)",
"detail": "As a WebDAV request may contain many sub-requests involving file operations, it may take a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet. This prevents the client from timing out and assuming the request was lost."
},
"103": {
"name": "Checkpoint",
"detail": "This code is used in the Resumable HTTP Requests Proposal to resume aborted PUT or POST requests."
},
"122": {
"name": "Request-URI too long",
"detail": "This is a non-standard IE7-only code which means the URI is longer than a maximum of 2083 characters."
},
"200": {
"name": "OK",
"detail": "Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an entity corresponding to the requested resource. In a POST request the response will contain an entity describing or containing the result of the action."
},
"201": {
"name": "Created",
"detail": "The request has been fulfilled and resulted in a new resource being created."
},
"202": {
"name": "Accepted",
"detail": "The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place."
},
"203": {
"name": "Non-Authoritative Information (since HTTP/1.1)",
"detail": "The server successfully processed the request, but is returning information that may be from another source."
},
"204": {
"name": "No Content",
"detail": "The server successfully processed the request, but is not returning any content."
},
"205": {
"name": "Reset Content",
"detail": "The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view."
},
"206": {
"name": "Partial Content",
"detail": "The server is delivering only part of the resource due to a range header sent by the client. The range header is used by tools like wget to enable resuming of interrupted downloads, or split a download into multiple simultaneous streams"
},
"207": {
"name": "Multi-Status (WebDAV) (RFC 4918)",
"detail": "The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests were made."
},
"208": {
"name": "Already Reported (WebDAV) (RFC 5842)",
"detail": "The members of a DAV binding have already been enumerated in a previous reply to this request, and are not being included again."
},
"226": {
"name": "IM Used (RFC 3229)",
"detail": "The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance. "
},
"300": {
"name": "Multiple Choices",
"detail": "Indicates multiple options for the resource that the client may follow. It, for instance, could be used to present different format options for video, list files with different extensions, or word sense disambiguation."
},
"301": {
"name": "Moved Permanently",
"detail": "This and all future requests should be directed to the given URI."
},
"302": {
"name": "Found",
"detail": "This is an example of industrial practice contradicting the standard. HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was \"Moved Temporarily\"), but popular browsers implemented 302 with the functionality of a 303. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours. However, some Web applications and frameworks use the 302 status code as if it were the 303."
},
"303": {
"name": "See Other",
"detail": "The response to the request can be found under another URI using a GET method. When received in response to a POST (or PUT/DELETE), it should be assumed that the server has received the data and the redirect should be issued with a separate GET message."
},
"304": {
"name": "Not Modified",
"detail": "Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header to provide a time against which to compare. Using this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to the entirety of the page being re-processed by the server, then sent again using more bandwidth of the server and client."
},
"305": {
"name": "Use Proxy (since HTTP/1.1)",
"detail": "Many HTTP clients (such as Mozilla and Internet Explorer) do not correctly handle responses with this status code, primarily for security reasons."
},
"306": {
"name": "Switch Proxy",
"detail": "No longer used. Originally meant \"Subsequent requests should use the specified proxy.\""
},
"307": {
"name": "Temporary Redirect (since HTTP/1.1)",
"detail": "In this occasion, the request should be repeated with another URI, but future requests can still use the original URI. In contrast to 303, the request method should not be changed when reissuing the original request. For instance, a POST request must be repeated using another POST request."
},
"308": {
"name": "Resume Incomplete",
"detail": "This code is used in the Resumable HTTP Requests Proposal to resume aborted PUT or POST requests."
},
"400": {
"name": "Bad Request",
"detail": "The request cannot be fulfilled due to bad syntax."
},
"401": {
"name": "Unauthorized",
"detail": "Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must include a WWW-Authenticate header field containing a challenge applicable to the requested resource."
},
"402": {
"name": "Payment Required",
"detail": "Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. As an example of its use, however, Apple's MobileMe service generates a 402 error (\"httpStatusCode:402\" in the Mac OS X Console log) if the MobileMe account is delinquent."
},
"403": {
"name": "Forbidden",
"detail": "The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no difference."
},
"404": {
"name": "Not Found",
"detail": "The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible."
},
"405": {
"name": "Method Not Allowed",
"detail": "A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data to be presented via POST, or using PUT on a read-only resource."
},
"406": {
"name": "Not Acceptable",
"detail": "The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request."
},
"407": {
"name": "Proxy Authentication Required",
"detail": "The client must first authenticate itself with the proxy."
},
"408": {
"name": "Request Timeout",
"detail": "The server timed out waiting for the request. According to W3 HTTP specifications: \"The client did not produce a request within the time that the server was prepared to wait. The client MAY repeat the request without modifications at any later time.\""
},
"409": {
"name": "Conflict",
"detail": "Indicates that the request could not be processed because of conflict in the request, such as an edit conflict."
},
"410": {
"name": "Gone",
"detail": "Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally removed and the resource should be purged. Upon receiving a 410 status code, the client should not request the resource again in the future. Clients such as search engines should remove the resource from their indices. Most use cases do not require clients and search engines to purge the resource, and a \"404 Not Found\" may be used instead."
},
"411": {
"name": "Length Required",
"detail": "The request did not specify the length of its content, which is required by the requested resource."
},
"412": {
"name": "Precondition Failed",
"detail": "The server does not meet one of the preconditions that the requester put on the request."
},
"413": {
"name": "Request Entity Too Large",
"detail": "The request is larger than the server is willing or able to process."
},
"414": {
"name": "Request-URI Too Long",
"detail": "The URI provided was too long for the server to process."
},
"415": {
"name": "Unsupported Media Type",
"detail": "The request entity has a media type which the server or resource does not support. For example, the client uploads an image as image/svg+xml, but the server requires that images use a different format."
},
"416": {
"name": "Requested Range Not Satisfiable",
"detail": "The client has asked for a portion of the file, but the server cannot supply that portion. For example, if the client asked for a part of the file that lies beyond the end of the file."
},
"417": {
"name": "Expectation Failed",
"detail": "The server cannot meet the requirements of the Expect request-header field."
},
"418": {
"name": "I'm a teapot (RFC 2324)",
"detail": "This code was defined in 1998 as one of the traditional IETF April Fools' jokes, in RFC 2324, Hyper Text Coffee Pot Control Protocol, and is not expected to be implemented by actual HTTP servers. However, known implementations do exist."
},
"422": {
"name": "Unprocessable Entity (WebDAV) (RFC 4918)",
"detail": "The request was well-formed but was unable to be followed due to semantic errors."
},
"423": {
"name": "Locked (WebDAV) (RFC 4918)",
"detail": "The resource that is being accessed is locked."
},
"424": {
"name": "Failed Dependency (WebDAV) (RFC 4918)",
"detail": "The request failed due to failure of a previous request (e.g. a PROPPATCH)."
},
"425": {
"name": "Unordered Collection (RFC 3648)",
"detail": "Defined in drafts of \"WebDAV Advanced Collections Protocol\",[14] but not present in \"Web Distributed Authoring and Versioning (WebDAV) Ordered Collections Protocol\".[15]"
},
"426": {
"name": "Upgrade Required (RFC 2817)",
"detail": "The client should switch to a different protocol such as TLS/1.0."
},
"428": {
"name": "Precondition Required",
"detail": "The origin server requires the request to be conditional. Intended to prevent \"the 'lost update' problem, where a client GETs a resource's state, modifies it, and PUTs it back to the server, when meanwhile a third party has modified the state on the server, leading to a conflict.\"[17] Proposed in an Internet-Draft."
},
"429": {
"name": "Too Many Requests",
"detail": "The user has sent too many requests in a given amount of time. Intended for use with rate limiting schemes. Proposed in an Internet-Draft."
},
"431": {
"name": "Request Header Fields Too Large",
"detail": "The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large. Proposed in an Internet-Draft."
},
"444": {
"name": "No Response",
"detail": "An nginx HTTP server extension. The server returns no information to the client and closes the connection (useful as a deterrent for malware)."
},
"449": {
"name": "Retry With",
"detail": "A Microsoft extension. The request should be retried after performing the appropriate action."
},
"450": {
"name": "Blocked by Windows Parental Controls",
"detail": "A Microsoft extension. This error is given when Windows Parental Controls are turned on and are blocking access to the given webpage."
},
"499": {
"name": "Client Closed Request",
"detail": "An Nginx HTTP server extension. This code is introduced to log the case when the connection is closed by client while HTTP server is processing its request, making server unable to send the HTTP header back."
},
"500": {
"name": "Internal Server Error",
"detail": "A generic error message, given when no more specific message is suitable."
},
"501": {
"name": "Not Implemented",
"detail": "The server either does not recognise the request method, or it lacks the ability to fulfill the request."
},
"502": {
"name": "Bad Gateway",
"detail": "The server was acting as a gateway or proxy and received an invalid response from the upstream server."
},
"503": {
"name": "Service Unavailable",
"detail": "The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state."
},
"504": {
"name": "Gateway Timeout",
"detail": "The server was acting as a gateway or proxy and did not receive a timely response from the upstream server."
},
"505": {
"name": "HTTP Version Not Supported",
"detail": "The server does not support the HTTP protocol version used in the request."
},
"506": {
"name": "Variant Also Negotiates (RFC 2295)",
"detail": "Transparent content negotiation for the request results in a circular reference.[21]"
},
"507": {
"name": "Insufficient Storage (WebDAV) (RFC 4918)",
"detail": "The server is unable to store the representation needed to complete the request."
},
"508": {
"name": "Loop Detected (WebDAV) (RFC 5842)",
"detail": "The server detected an infinite loop while processing the request (sent in lieu of 208)."
},
"509": {
"name": "Bandwidth Limit Exceeded (Apache bw/limited extension)",
"detail": "This status code, while used by many servers, is not specified in any RFCs."
},
"510": {
"name": "Not Extended (RFC 2774)",
"detail": "Further extensions to the request are required for the server to fulfill it.[22]"
},
"511": {
"name": "Network Authentication Required",
"detail": "The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network (e.g. \"captive portals\" used to require agreement to Terms of Service before granting full Internet access via a Wi-Fi hotspot). Proposed in an Internet-Draft."
},
"598": {
"name": "Network read timeout error",
"detail": "This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy."
},
"599": {
"name": "Network connect timeout error[23]",
"detail": "This status code is not specified in any RFCs, but is used by some HTTP proxies to signal a network connect timeout behind the proxy to a client in front of the proxy."
}
}

15
node_modules/http-reasons/index.js generated vendored Normal file
View File

@@ -0,0 +1,15 @@
var /**
* @private
* @type {Object}
*/
db = require('./db.json');
module.exports = {
/**
* @param {String|Number} code
* @returns {Object} - {name:String, detail:String}
*/
lookup: function httpCodeLookup (code) {
return db[code] || {};
}
};

26
node_modules/http-reasons/package.json generated vendored Normal file
View File

@@ -0,0 +1,26 @@
{
"name": "http-reasons",
"version": "0.1.0",
"description": "Database to lookup http reasons from http response status code",
"author": "Postman Labs <help@postmanlabs.com>",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "git+https://github.com/postmanlabs/http-reasons.git"
},
"keywords": [
"postman",
"http-code",
"response-code",
"reason"
],
"author": "Shamasis Bhattacharya <mail@shamasis.net> (=)",
"license": "Apache-2.0",
"bugs": {
"url": "https://github.com/postmanlabs/http-reasons/issues"
},
"homepage": "https://github.com/postmanlabs/http-reasons#readme"
}