From ce5dc4978d242d211ae955b3bc7ef2be8183acfd Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 30 Sep 2024 10:47:23 -0400 Subject: [PATCH] update reference.json (#257) Co-authored-by: ryepup <40441+ryepup@users.noreply.github.com> --- reference-lib/package-lock.json | 4 +- reference-lib/package.json | 2 +- reference-lib/src/reference.json | 106 ++++++++++++++++++++++++++++--- 3 files changed, 100 insertions(+), 12 deletions(-) diff --git a/reference-lib/package-lock.json b/reference-lib/package-lock.json index f130caf..1a2ec4f 100644 --- a/reference-lib/package-lock.json +++ b/reference-lib/package-lock.json @@ -1,12 +1,12 @@ { "name": "@nginx/reference-lib", - "version": "1.1.2", + "version": "1.1.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@nginx/reference-lib", - "version": "1.1.2", + "version": "1.1.3", "license": "Apache-2.0", "devDependencies": { "@rollup/plugin-json": "^6.1.0", diff --git a/reference-lib/package.json b/reference-lib/package.json index 0c748cb..dcd24ed 100644 --- a/reference-lib/package.json +++ b/reference-lib/package.json @@ -1,6 +1,6 @@ { "name": "@nginx/reference-lib", - "version": "1.1.2", + "version": "1.1.3", "description": "", "main": "dist/index.js", "type": "module", diff --git a/reference-lib/src/reference.json b/reference-lib/src/reference.json index 09a027a..726ccad 100644 --- a/reference-lib/src/reference.json +++ b/reference-lib/src/reference.json @@ -4699,6 +4699,42 @@ "description_md": "Sets an njs function as a location content handler.\nSince [0.4.0](https://nginx.org/en/docs/njs/changes.html#njs0.4.0),\na module function can be referenced.\n\n> The directive can be specified inside the\n> [if](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#if) block\n> since [0.7.7](https://nginx.org/en/docs/njs/changes.html#njs0.7.7).", "description_html": "

Sets an njs function as a location content handler.\nSince 0.4.0,\na module function can be referenced.

\n\n
\n

The directive can be specified inside the\nif block\nsince 0.7.7.

\n
\n" }, + { + "name": "js_context_reuse", + "default": "128", + "contexts": [ + "http", + "server", + "location" + ], + "syntax_md": [ + "*`number`*" + ], + "syntax_html": [ + "

number

\n" + ], + "isBlock": false, + "description_md": "Sets a maximum number of JS context to be reused for\n[QuickJS engine](https://nginx.org/en/docs/njs/engine.html).\nEach context is used for a single request.\nThe finished context is put into a pool of reusable contexts.\nIf the pool is full, the context is destroyed.", + "description_html": "

Sets a maximum number of JS context to be reused for\nQuickJS engine.\nEach context is used for a single request.\nThe finished context is put into a pool of reusable contexts.\nIf the pool is full, the context is destroyed.

\n" + }, + { + "name": "js_engine", + "default": "njs", + "contexts": [ + "http", + "server", + "location" + ], + "syntax_md": [ + "`njs` | `qjs`" + ], + "syntax_html": [ + "

njs | qjs

\n" + ], + "isBlock": false, + "description_md": "Sets a [JavaScript engine](https://nginx.org/en/docs/njs/engine.html)\nto be used for njs scripts.\nThe `njs` parameter sets the njs engine, also used by default.\nThe `qjs` parameter sets the QuickJS engine.", + "description_html": "

Sets a JavaScript engine\nto be used for njs scripts.\nThe njs parameter sets the njs engine, also used by default.\nThe qjs parameter sets the QuickJS engine.

\n" + }, { "name": "js_fetch_buffer_size", "default": "16k", @@ -4956,14 +4992,14 @@ "location" ], "syntax_md": [ - "*`$variable`* *`function`* | *`module.function`*" + "*`$variable`* *`function`* | *`module.function`* [`nocache`]" ], "syntax_html": [ - "

$variable function | module.function

\n" + "

$variable function | module.function [nocache]

\n" ], "isBlock": false, - "description_md": "Sets an njs `function`\nfor the specified `variable`.\nSince [0.4.0](https://nginx.org/en/docs/njs/changes.html#njs0.4.0),\na module function can be referenced.\n\nThe function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\n[phase](https://nginx.org/en/docs/dev/development_guide.html#http_phases)\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\n[`log_format`](https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.\n\n> As the `js_set` handler\n> returns its result immediately, it supports\n> only synchronous operations.\n> Thus, asynchronous operations such as\n> [r.subrequest()](https://nginx.org/en/docs/njs/reference.html#r_subrequest)\n> or\n> [setTimeout()](https://nginx.org/en/docs/njs/reference.html#settimeout)\n> are not supported.\n\n> The directive can be specified on the\n> `server` and `location` level\n> since [0.7.7](https://nginx.org/en/docs/njs/changes.html#njs0.7.7).", - "description_html": "

Sets an njs function\nfor the specified variable.\nSince 0.4.0,\na module function can be referenced.

\n\n

The function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\nphase\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\nlog_format directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.

\n\n
\n

As the js_set handler\nreturns its result immediately, it supports\nonly synchronous operations.\nThus, asynchronous operations such as\nr.subrequest()\nor\nsetTimeout()\nare not supported.

\n\n

The directive can be specified on the\nserver and location level\nsince 0.7.7.

\n
\n" + "description_md": "Sets an njs `function`\nfor the specified `variable`.\nSince [0.4.0](https://nginx.org/en/docs/njs/changes.html#njs0.4.0),\na module function can be referenced.\n\nThe function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\n[phase](https://nginx.org/en/docs/dev/development_guide.html#http_phases)\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\n[`log_format`](https://nginx.org/en/docs/http/ngx_http_log_module.html#log_format) directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.\n\nSince [0.8.6](https://nginx.org/en/docs/njs/changes.html#njs0.8.6),\nif an optional argument `nocache` is specified,\nthe handler is called every time it is referenced.\nDue to current limitations\nof the [rewrite](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html) module,\nwhen a `nocache` variable is referenced by the\n[set](https://nginx.org/en/docs/http/ngx_http_rewrite_module.html#set) directive\nits handler should always return a fixed-length value.\n\n> As the `js_set` handler\n> returns its result immediately, it supports\n> only synchronous operations.\n> Thus, asynchronous operations such as\n> [r.subrequest()](https://nginx.org/en/docs/njs/reference.html#r_subrequest)\n> or\n> [setTimeout()](https://nginx.org/en/docs/njs/reference.html#settimeout)\n> are not supported.\n\n> The directive can be specified on the\n> `server` and `location` level\n> since [0.7.7](https://nginx.org/en/docs/njs/changes.html#njs0.7.7).", + "description_html": "

Sets an njs function\nfor the specified variable.\nSince 0.4.0,\na module function can be referenced.

\n\n

The function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\nphase\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\nlog_format directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.

\n\n

Since 0.8.6,\nif an optional argument nocache is specified,\nthe handler is called every time it is referenced.\nDue to current limitations\nof the rewrite module,\nwhen a nocache variable is referenced by the\nset directive\nits handler should always return a fixed-length value.

\n\n
\n

As the js_set handler\nreturns its result immediately, it supports\nonly synchronous operations.\nThus, asynchronous operations such as\nr.subrequest()\nor\nsetTimeout()\nare not supported.

\n\n

The directive can be specified on the\nserver and location level\nsince 0.7.7.

\n
\n" }, { "name": "js_shared_dict_zone", @@ -6608,6 +6644,24 @@ "description_md": "Indicates whether the header fields of the original request are passed\nto the proxied server.\n```\nlocation /x-accel-redirect-here/ {\n proxy_method GET;\n proxy_pass_request_headers off;\n proxy_pass_request_body off;\n\n proxy_pass ...\n}\n```\nSee also the [`proxy_set_header`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_set_header) and\n[`proxy_pass_request_body`](https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_pass_request_body) directives.", "description_html": "

Indicates whether the header fields of the original request are passed\nto the proxied server.

\n\n
location /x-accel-redirect-here/ {\n    proxy_method GET;\n    proxy_pass_request_headers off;\n    proxy_pass_request_body off;\n\n    proxy_pass ...\n}\n
\n\n

See also the proxy_set_header and\nproxy_pass_request_body directives.

\n" }, + { + "name": "proxy_pass_trailers", + "default": "off", + "contexts": [ + "http", + "server", + "location" + ], + "syntax_md": [ + "`on` | `off`" + ], + "syntax_html": [ + "

on | off

\n" + ], + "isBlock": false, + "description_md": "Permits passing trailer fields from a proxied server to a client.\n\n> A trailer section in HTTP/1.1 is\n> [explicitly enabled](https://datatracker.ietf.org/doc/html/rfc9110#section-6.5.1).\n\n```\nlocation / {\n proxy_http_version 1.1;\n proxy_set_header Connection \"te\";\n proxy_set_header TE \"trailers\";\n proxy_pass_trailers on;\n\n proxy_pass ...\n}\n```", + "description_html": "

Permits passing trailer fields from a proxied server to a client.

\n\n
\n

A trailer section in HTTP/1.1 is\nexplicitly enabled.

\n
\n\n
location / {\n    proxy_http_version 1.1;\n    proxy_set_header Connection "te";\n    proxy_set_header TE "trailers";\n    proxy_pass_trailers on;\n\n    proxy_pass ...\n}\n
\n" + }, { "name": "proxy_read_timeout", "default": "60s", @@ -13852,6 +13906,40 @@ "description_md": "Sets an njs function which will be called at the\n[access](https://nginx.org/en/docs/stream/stream_processing.html#access_phase) phase.\nSince [0.4.0](https://nginx.org/en/docs/njs/changes.html#njs0.4.0),\na module function can be referenced.\n\nThe function is called once at the moment when the stream session reaches\nthe [access](https://nginx.org/en/docs/stream/stream_processing.html#access_phase) phase\nfor the first time.\nThe function is called with the following arguments:\n\n- `s`\n\n the [Stream Session](https://nginx.org/en/docs/njs/reference.html#stream) object\n\nAt this phase, it is possible to perform initialization\nor register a callback with\nthe [`s.on()`](https://nginx.org/en/docs/njs/reference.html#s_on)\nmethod\nfor each incoming data chunk until one of the following methods are called:\n[`s.allow()`](https://nginx.org/en/docs/njs/reference.html#s_allow),\n[`s.decline()`](https://nginx.org/en/docs/njs/reference.html#s_decline),\n[`s.done()`](https://nginx.org/en/docs/njs/reference.html#s_done).\nAs soon as one of these methods is called, the stream session processing\nswitches to the [next phase](https://nginx.org/en/docs/stream/stream_processing.html)\nand all current\n[`s.on()`](https://nginx.org/en/docs/njs/reference.html#s_on)\ncallbacks are dropped.", "description_html": "

Sets an njs function which will be called at the\naccess phase.\nSince 0.4.0,\na module function can be referenced.

\n\n

The function is called once at the moment when the stream session reaches\nthe access phase\nfor the first time.\nThe function is called with the following arguments:

\n\n\n\n

At this phase, it is possible to perform initialization\nor register a callback with\nthe s.on()\nmethod\nfor each incoming data chunk until one of the following methods are called:\ns.allow(),\ns.decline(),\ns.done().\nAs soon as one of these methods is called, the stream session processing\nswitches to the next phase\nand all current\ns.on()\ncallbacks are dropped.

\n" }, + { + "name": "js_context_reuse", + "default": "128", + "contexts": [ + "stream", + "server" + ], + "syntax_md": [ + "*`number`*" + ], + "syntax_html": [ + "

number

\n" + ], + "isBlock": false, + "description_md": "Sets a maximum number of JS context to be reused for\n[QuickJS engine](https://nginx.org/en/docs/njs/engine.html).\nEach context is used for a single stream session.\nThe finished context is put into a pool of reusable contexts.\nIf the pool is full, the context is destroyed.", + "description_html": "

Sets a maximum number of JS context to be reused for\nQuickJS engine.\nEach context is used for a single stream session.\nThe finished context is put into a pool of reusable contexts.\nIf the pool is full, the context is destroyed.

\n" + }, + { + "name": "js_engine", + "default": "njs", + "contexts": [ + "stream", + "server" + ], + "syntax_md": [ + "`njs` | `qjs`" + ], + "syntax_html": [ + "

njs | qjs

\n" + ], + "isBlock": false, + "description_md": "Sets a [JavaScript engine](https://nginx.org/en/docs/njs/engine.html)\nto be used for njs scripts.\nThe `njs` parameter sets the njs engine, also used by default.\nThe `qjs` parameter sets the QuickJS engine.", + "description_html": "

Sets a JavaScript engine\nto be used for njs scripts.\nThe njs parameter sets the njs engine, also used by default.\nThe qjs parameter sets the QuickJS engine.

\n" + }, { "name": "js_fetch_buffer_size", "default": "16k", @@ -14113,14 +14201,14 @@ "server" ], "syntax_md": [ - "*`$variable`* *`function`* | *`module.function`*" + "*`$variable`* *`function`* | *`module.function`* [`nocache`]" ], "syntax_html": [ - "

$variable function | module.function

\n" + "

$variable function | module.function [nocache]

\n" ], "isBlock": false, - "description_md": "Sets an njs `function`\nfor the specified `variable`.\nSince [0.4.0](https://nginx.org/en/docs/njs/changes.html#njs0.4.0),\na module function can be referenced.\n\nThe function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\n[phase](https://nginx.org/en/docs/stream/stream_processing.html)\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\n[`log_format`](https://nginx.org/en/docs/stream/ngx_stream_log_module.html#log_format) directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.\n\n> As the `js_set` handler\n> returns its result immediately, it supports\n> only synchronous callbacks.\n> Thus, asynchronous callbacks such as\n> [ngx.fetch()](https://nginx.org/en/docs/njs/reference.html#ngx_fetch)\n> or\n> [setTimeout()](https://nginx.org/en/docs/njs/reference.html#settimeout)\n> are not supported.\n\n> The directive can be specified on the\n> `server` level\n> since [0.7.7](https://nginx.org/en/docs/njs/changes.html#njs0.7.7).", - "description_html": "

Sets an njs function\nfor the specified variable.\nSince 0.4.0,\na module function can be referenced.

\n\n

The function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\nphase\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\nlog_format directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.

\n\n
\n

As the js_set handler\nreturns its result immediately, it supports\nonly synchronous callbacks.\nThus, asynchronous callbacks such as\nngx.fetch()\nor\nsetTimeout()\nare not supported.

\n\n

The directive can be specified on the\nserver level\nsince 0.7.7.

\n
\n" + "description_md": "Sets an njs `function`\nfor the specified `variable`.\nSince [0.4.0](https://nginx.org/en/docs/njs/changes.html#njs0.4.0),\na module function can be referenced.\n\nThe function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\n[phase](https://nginx.org/en/docs/stream/stream_processing.html)\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\n[`log_format`](https://nginx.org/en/docs/stream/ngx_stream_log_module.html#log_format) directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.\n\nSince [0.8.6](https://nginx.org/en/docs/njs/changes.html#njs0.8.6), when\noptional argument `nocache` is provided the handler\nis called every time it is referenced.\nDue to current limitations\nof the [rewrite](https://nginx.org/en/docs/stream/ngx_stream_js_module.html) module,\nwhen a `nocache` variable is referenced by the\n[set](https://nginx.org/en/docs/stream/ngx_stream_set_module.html#set) directive\nits handler should always return a fixed-length value.\n\n> As the `js_set` handler\n> returns its result immediately, it supports\n> only synchronous callbacks.\n> Thus, asynchronous callbacks such as\n> [ngx.fetch()](https://nginx.org/en/docs/njs/reference.html#ngx_fetch)\n> or\n> [setTimeout()](https://nginx.org/en/docs/njs/reference.html#settimeout)\n> are not supported.\n\n> The directive can be specified on the\n> `server` level\n> since [0.7.7](https://nginx.org/en/docs/njs/changes.html#njs0.7.7).", + "description_html": "

Sets an njs function\nfor the specified variable.\nSince 0.4.0,\na module function can be referenced.

\n\n

The function is called when\nthe variable is referenced for the first time for a given request.\nThe exact moment depends on a\nphase\nat which the variable is referenced.\nThis can be used to perform some logic\nnot related to variable evaluation.\nFor example, if the variable is referenced only in the\nlog_format directive,\nits handler will not be executed until the log phase.\nThis handler can be used to do some cleanup\nright before the request is freed.

\n\n

Since 0.8.6, when\noptional argument nocache is provided the handler\nis called every time it is referenced.\nDue to current limitations\nof the rewrite module,\nwhen a nocache variable is referenced by the\nset directive\nits handler should always return a fixed-length value.

\n\n
\n

As the js_set handler\nreturns its result immediately, it supports\nonly synchronous callbacks.\nThus, asynchronous callbacks such as\nngx.fetch()\nor\nsetTimeout()\nare not supported.

\n\n

The directive can be specified on the\nserver level\nsince 0.7.7.

\n
\n" }, { "name": "js_shared_dict_zone", @@ -16368,5 +16456,5 @@ ] } ], - "version": "https://github.com/nginx/nginx.org/commit/6e199dec7bb66c7683a37531b802fa7fbf216cac" + "version": "https://github.com/nginx/nginx.org/commit/2a84b6107338e8f3b8f1eb1862caf888ddde69bf" }