mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-23 09:44:22 +03:00
Update npm package.
This commit is contained in:
parent
8f79ab632d
commit
95a000544b
@ -27,7 +27,7 @@ const fs = require("fs");
|
||||
* @param name name of the binary (without extension)
|
||||
*/
|
||||
function run(name) {
|
||||
const execPath = path.join(__dirname, "bin", os.platform() === "win32" ? name + ".exe" : name);
|
||||
const execPath = path.join(__dirname, "dist", "bin", os.platform() === "win32" ? name + ".exe" : name);
|
||||
|
||||
try {
|
||||
const result = child_process.spawnSync(
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH hurl 1 "11 Jan 2024" "hurl 4.2.0" " Hurl Manual"
|
||||
.TH hurl 1 "24 Apr 2024" "hurl 4.3.0" " Hurl Manual"
|
||||
.SH NAME
|
||||
|
||||
hurl - run and test HTTP requests.
|
||||
@ -106,7 +106,8 @@ More information on asserts can be found here \fIhttps://hurl.dev/docs/asserting
|
||||
|
||||
Options that exist in curl have exactly the same semantics.
|
||||
|
||||
Options specified on the command line are defined for every Hurl file's entry.
|
||||
Options specified on the command line are defined for every Hurl file's entry,
|
||||
except if they are tagged as cli-only (can not be defined in the Hurl request [Options] entry)
|
||||
|
||||
For instance:
|
||||
|
||||
@ -147,6 +148,8 @@ See also \fI--key\fP.
|
||||
|
||||
Colorize debug output (the HTTP response output is not colorized).
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--compressed "
|
||||
|
||||
Request a compressed response using one of the algorithms br, gzip, deflate and automatically decompress the content.
|
||||
@ -172,12 +175,16 @@ Note that this option does not affect the behavior with multiple input Hurl file
|
||||
|
||||
All the input files are executed independently. The result of one file does not affect the execution of the other Hurl files.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-b, --cookie <FILE> "
|
||||
|
||||
Read cookies from FILE (using the Netscape cookie file format).
|
||||
|
||||
Combined with \fI-c, --cookie-jar\fP, you can simulate a cookie storage between successive Hurl runs.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-c, --cookie-jar <FILE> "
|
||||
|
||||
Write cookies to FILE after running the session (only for one session).
|
||||
@ -185,6 +192,8 @@ The file will be written using the Netscape cookie file format.
|
||||
|
||||
Combined with \fI-b, --cookie\fP, you can simulate a cookie storage between successive Hurl runs.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--delay <MILLISECONDS> "
|
||||
|
||||
Sets delay before each request.
|
||||
@ -193,10 +202,20 @@ Sets delay before each request.
|
||||
|
||||
Control the format of error message (short by default or long)
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--file-root <DIR> "
|
||||
|
||||
Set root directory to import files in Hurl. This is used for files in multipart form data, request body and response output.
|
||||
When it is not explicitly defined, files are relative to the current directory in which Hurl is running.
|
||||
When it is not explicitly defined, files are relative to the Hurl file's directory.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--from-entry <ENTRY_NUMBER> "
|
||||
|
||||
Execute Hurl file from ENTRY_NUMBER (starting at 1).
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--glob <GLOB> "
|
||||
|
||||
@ -205,6 +224,8 @@ Specify input files that match the given glob pattern.
|
||||
Multiple glob flags may be used. This flag supports common Unix glob patterns like *, ? and [].
|
||||
However, to avoid your shell accidentally expanding glob patterns before Hurl handles them, you must use single quotes or double quotes around each pattern.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-0, --http1.0 "
|
||||
|
||||
Tells Hurl to use HTTP version 1.0 instead of using its internally preferred HTTP version.
|
||||
@ -227,10 +248,14 @@ Tells Hurl to try HTTP/3 to the host in the URL, but fallback to earlier HTTP ve
|
||||
|
||||
Ignore all asserts defined in the Hurl file.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-i, --include "
|
||||
|
||||
Include the HTTP headers in the output
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-k, --insecure "
|
||||
|
||||
This option explicitly allows Hurl to perform "insecure" SSL connections and transfers.
|
||||
@ -241,6 +266,8 @@ Stop between requests.
|
||||
|
||||
This is similar to a break point, You can then continue (Press C) or quit (Press Q).
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-4, --ipv4 "
|
||||
|
||||
This option tells Hurl to use IPv4 addresses only when resolving host names, and not for example try IPv6.
|
||||
@ -249,10 +276,21 @@ This option tells Hurl to use IPv4 addresses only when resolving host names, and
|
||||
|
||||
This option tells Hurl to use IPv6 addresses only when resolving host names, and not for example try IPv4.
|
||||
|
||||
.IP "--jobs <NUM> "
|
||||
|
||||
(Experimental) Maximum number of parallel jobs in parallel mode. Default value corresponds (in most cases) to the
|
||||
current amount of CPUs.
|
||||
|
||||
See also \fI--parallel\fP.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--json "
|
||||
|
||||
Output each Hurl file result to JSON. The format is very closed to HAR format.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--key <KEY> "
|
||||
|
||||
Private key file name.
|
||||
@ -266,6 +304,12 @@ Follow redirect. To limit the amount of redirects to follow use the \fI--max-red
|
||||
Like \fI-L, --location\fP, but allows sending the name + password to all hosts that the site may redirect to.
|
||||
This may or may not introduce a security breach if the site redirects you to a site to which you send your authentication info (which is plaintext in the case of HTTP Basic authentication).
|
||||
|
||||
.IP "--max-filesize <BYTES> "
|
||||
|
||||
Specify the maximum size (in bytes) of a file to download. If the file requested is larger than this value, the transfer does not start.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--max-redirs <NUM> "
|
||||
|
||||
Set maximum number of redirection-followings allowed
|
||||
@ -278,14 +322,38 @@ Maximum time in seconds that you allow a request/response to take. This is the s
|
||||
|
||||
See also \fI--connect-timeout\fP.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-n, --netrc "
|
||||
|
||||
Scan the .netrc file in the user's home directory for the username and password.
|
||||
|
||||
See also \fI--netrc-file\fP and \fI--netrc-optional\fP.
|
||||
|
||||
.IP "--netrc-file <FILE> "
|
||||
|
||||
Like \fI--netrc\fP, but provide the path to the netrc file.
|
||||
|
||||
See also \fI--netrc-optional\fP.
|
||||
|
||||
.IP "--netrc-optional "
|
||||
|
||||
Similar to \fI--netrc\fP, but make the .netrc usage optional.
|
||||
|
||||
See also \fI--netrc-file\fP.
|
||||
|
||||
.IP "--no-color "
|
||||
|
||||
Do not colorize output.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--no-output "
|
||||
|
||||
Suppress output. By default, Hurl outputs the body of the last response.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--noproxy <HOST(S)> "
|
||||
|
||||
Comma-separated list of hosts which do not use a proxy.
|
||||
@ -296,6 +364,16 @@ Override value from Environment variable no_proxy.
|
||||
|
||||
Write output to FILE instead of stdout.
|
||||
|
||||
.IP "--parallel "
|
||||
|
||||
(Experimental) Run files in parallel.
|
||||
|
||||
Each Hurl file is executed in its own worker thread, without sharing anything with the other workers. The default run mode is sequential.
|
||||
|
||||
See also \fI--jobs\fP.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--path-as-is "
|
||||
|
||||
Tell Hurl to not handle sequences of /../ or /./ in the given URL path. Normally Hurl will squash or merge them according to standards but with this option set you tell it not to do that.
|
||||
@ -310,18 +388,24 @@ Generate HTML report in DIR.
|
||||
|
||||
If the HTML report already exists, it will be updated with the new test results.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--report-junit <FILE> "
|
||||
|
||||
Generate JUnit File.
|
||||
|
||||
If the FILE report already exists, it will be updated with the new test results.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--report-tap <FILE> "
|
||||
|
||||
Generate TAP report.
|
||||
|
||||
If the FILE report already exists, it will be updated with the new test results.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--resolve <HOST:PORT:ADDR> "
|
||||
|
||||
Provide a custom address for a specific host and port pair. Using this, you can make the Hurl requests(s) use a specified address and prevent the otherwise normally resolved address to be used. Consider it a sort of /etc/hosts alternative provided on the command line.
|
||||
@ -338,15 +422,21 @@ Duration in milliseconds between each retry. Default is 1000 ms.
|
||||
|
||||
(Windows) This option tells Hurl to disable certificate revocation checks. WARNING: this option loosens the SSL security, and by using this flag you ask for exactly that.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--test "
|
||||
|
||||
Activate test mode: with this, the HTTP response is not outputted anymore, progress is reported for each Hurl file tested, and a text summary is displayed when all files have been run.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--to-entry <ENTRY_NUMBER> "
|
||||
|
||||
Execute Hurl file to ENTRY_NUMBER (starting at 1).
|
||||
Ignore the remaining of the file. It is useful for debugging a session.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--unix-socket <PATH> "
|
||||
|
||||
(HTTP) Connect through this Unix domain socket, instead of using the network.
|
||||
@ -359,6 +449,8 @@ Add basic Authentication header to each request.
|
||||
|
||||
Specify the User-Agent string to send to the HTTP server.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "--variable <NAME=VALUE> "
|
||||
|
||||
Define variable (name/value) to be used in Hurl templates.
|
||||
@ -371,6 +463,8 @@ Each variable is defined as name=value exactly as with \fI--variable\fP option.
|
||||
|
||||
Note that defining a variable twice produces an error.
|
||||
|
||||
This is a cli-only option.
|
||||
|
||||
.IP "-v, --verbose "
|
||||
|
||||
Turn on verbose output on standard error stream.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.TH hurl 1 "11 Jan 2024" "hurl 4.2.0" " Hurl Manual"
|
||||
.TH hurl 1 "24 Apr 2024" "hurl 4.3.0" " Hurl Manual"
|
||||
.SH NAME
|
||||
|
||||
hurlfmt - format Hurl files
|
||||
@ -60,28 +60,21 @@ hurlfmt can also be used to convert a curl command-line to Hurl
|
||||
|
||||
.IP "--check "
|
||||
|
||||
Run in 'check' mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
Run in 'check' mode. Exits with 0 if input is formatted correctly, 1 otherwise.
|
||||
|
||||
This can not be used with \fI--output\fP.
|
||||
|
||||
This option is not stable yet.
|
||||
|
||||
|
||||
.IP "--color "
|
||||
|
||||
Colorize Output.
|
||||
|
||||
|
||||
This can not be used \fI--in-place\fP.
|
||||
|
||||
.IP "--in <FORMAT> "
|
||||
|
||||
.IP "-h, --help "
|
||||
|
||||
Usage help.
|
||||
|
||||
.IP "--in "
|
||||
|
||||
Specify input format: hurl (default) or curl
|
||||
|
||||
Specify input format: hurl or curl.
|
||||
|
||||
.IP "--in-place "
|
||||
|
||||
@ -89,28 +82,28 @@ Modify file in place.
|
||||
|
||||
This can be used only with text output.
|
||||
|
||||
|
||||
.IP "--no-color "
|
||||
|
||||
Do not colorize Output.
|
||||
Do not colorize output.
|
||||
|
||||
.IP "--out <FORMAT> "
|
||||
|
||||
.IP "--out "
|
||||
Specify output format: hurl, json or html.
|
||||
|
||||
.IP "-o, --output <FILE> "
|
||||
|
||||
Specify output format: hurl (default), json or html
|
||||
|
||||
.IP "-o, --output <file> "
|
||||
|
||||
Write output to <file> instead of stdout.
|
||||
|
||||
Write output to FILE instead of stdout.
|
||||
|
||||
.IP "--standalone "
|
||||
|
||||
Output full html file with css instead of html fragment (default).
|
||||
|
||||
|
||||
This can be used only with html output.
|
||||
|
||||
.IP "-h, --help "
|
||||
|
||||
Usage help.
|
||||
|
||||
|
||||
.IP "-V, --version "
|
||||
|
||||
|
@ -4,7 +4,8 @@ const os = require("os");
|
||||
const path = require("path");
|
||||
const cTable = require("console.table");
|
||||
const archive = require("./archive");
|
||||
const {version} = require("./package.json");
|
||||
//const {version} = require("./package.json");
|
||||
const version = "4.3.0";
|
||||
|
||||
const supportedPlatforms = require("./platform.json")
|
||||
|
||||
@ -34,4 +35,4 @@ function getPlatformMetadata() {
|
||||
|
||||
const metadata = getPlatformMetadata();
|
||||
const url = `https://github.com/Orange-OpenSource/hurl/releases/download/${version}/hurl-${version}-${metadata.rust_target}${metadata.archive_extension}`;
|
||||
archive.install(url, path.join(__dirname, "bin"), metadata.checksum);
|
||||
archive.install(url, path.join(__dirname, "dist"), metadata.checksum);
|
4
contrib/npm/hurl/package-lock.json
generated
4
contrib/npm/hurl/package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@orangeopensource/hurl",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@orangeopensource/hurl",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.1",
|
||||
"hasInstallScript": true,
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@orangeopensource/hurl",
|
||||
"version": "4.2.0",
|
||||
"version": "4.3.1",
|
||||
"description": "Run and Test HTTP Requests with plain text and curl",
|
||||
"author": "Jean-Christophe Amiel <jeanchristophe.amiel@orange.com>",
|
||||
"contributors": [
|
||||
|
@ -5,7 +5,7 @@
|
||||
"rust_target": "x86_64-pc-windows-msvc",
|
||||
"binary_name": "hurl.exe",
|
||||
"archive_extension": ".zip",
|
||||
"checksum": "ba0b14c213431cd9cd7a0aa0956437aee16c89b8f543c6735c817a4e768b1779"
|
||||
"checksum": "1abd2f4d9a107cf1ed21392caf40455035741bb08f44307487e2e57ae91ec059"
|
||||
},
|
||||
{
|
||||
"type": "Linux",
|
||||
@ -13,7 +13,7 @@
|
||||
"rust_target": "x86_64-unknown-linux-gnu",
|
||||
"binary_name": "hurl",
|
||||
"archive_extension": ".tar.gz",
|
||||
"checksum": "fc9789905947c3960b273fb6b8b3548fd35761d9bfcc598feeb3dc5aece625cc"
|
||||
"checksum": "77992838d748483924e235d3d04a1d9b33cc32f49a7c6700917e0a20b4451dcb"
|
||||
},
|
||||
{
|
||||
"type": "Linux",
|
||||
@ -21,7 +21,7 @@
|
||||
"rust_target": "aarch64-unknown-linux-gnu",
|
||||
"binary_name": "hurl",
|
||||
"archive_extension": ".tar.gz",
|
||||
"checksum": "eed245dcd9e33db9331531b7de58e2c3749e74e49e1b34c789108eaf497bb0ed"
|
||||
"checksum": "d2eede6dfe633cc5a50617de8247efd38bd4d4b8c7a0bf9252d95441f686bda3"
|
||||
},
|
||||
{
|
||||
"type": "Darwin",
|
||||
@ -29,7 +29,7 @@
|
||||
"rust_target": "x86_64-apple-darwin",
|
||||
"binary_name": "hurl",
|
||||
"archive_extension": ".tar.gz",
|
||||
"checksum": "985945db39031a2b2c0fae2a7bbe046478e32ff719d2f55aba95806ed33c209c"
|
||||
"checksum": "d2f3a7b751b8906f85203841069239f5a68afe3b6926d1349fc847759a081983"
|
||||
},
|
||||
{
|
||||
"type": "Darwin",
|
||||
@ -37,6 +37,6 @@
|
||||
"rust_target": "aarch64-apple-darwin",
|
||||
"binary_name": "hurl",
|
||||
"archive_extension": ".tar.gz",
|
||||
"checksum": "73e7e7f517a09e9351696da2aac606eb7db1627b2520a2492bba47ccfbbe9582"
|
||||
"checksum": "8e0dacf7ba8c9c0e58feb0f0cff729da24893f782905f5a7a33a8418c5796dbb"
|
||||
}
|
||||
]
|
Loading…
Reference in New Issue
Block a user