Mercurial > hg > nginx-site
changeset 2246:32ba43abf9cd
Renamed njs API, njs Changes.
author | Yaroslav Zhuravlev <yar@nginx.com> |
---|---|
date | Mon, 24 Sep 2018 19:24:04 +0300 |
parents | 87a0e2c73a25 |
children | 0f16ef9a8dbe |
files | xml/en/GNUmakefile xml/en/docs/http/ngx_http_js_module.xml xml/en/docs/njs/changes.xml xml/en/docs/njs/cli.xml xml/en/docs/njs/examples.xml xml/en/docs/njs/index.xml xml/en/docs/njs/njs_api.xml xml/en/docs/njs/njs_changes.xml xml/en/docs/njs/reference.xml xml/en/docs/stream/ngx_stream_js_module.xml xml/index.xml xml/ru/GNUmakefile xml/ru/docs/http/ngx_http_js_module.xml xml/ru/docs/njs/cli.xml xml/ru/docs/njs/examples.xml xml/ru/docs/njs/index.xml xml/ru/docs/njs/njs_api.xml xml/ru/docs/njs/reference.xml xml/ru/docs/stream/ngx_stream_js_module.xml |
diffstat | 16 files changed, 72 insertions(+), 72 deletions(-) [+] |
line wrap: on
line diff
--- a/xml/en/GNUmakefile +++ b/xml/en/GNUmakefile @@ -123,12 +123,12 @@ REFS = \ ngx_google_perftools_module \ dev/development_guide \ njs/index \ - njs/njs_changes \ - njs/njs_api \ + njs/changes \ njs/cli \ njs/compatibility \ njs/examples \ njs/install \ + njs/reference \ TOP = \ download \
--- a/xml/en/docs/http/ngx_http_js_module.xml +++ b/xml/en/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ <module name="Module ngx_http_js_module" link="/en/docs/http/ngx_http_js_module.html" lang="en" - rev="17"> + rev="18"> <section id="summary"> @@ -162,7 +162,7 @@ Sets an njs function for the specified v <para> Each HTTP njs handler receives one argument, a request -<link doc="../njs/njs_api.xml" id="http_request">object</link>. +<link doc="../njs/reference.xml" id="http">object</link>. </para> </section>
rename from xml/en/docs/njs/njs_changes.xml rename to xml/en/docs/njs/changes.xml --- a/xml/en/docs/njs/njs_changes.xml +++ b/xml/en/docs/njs/changes.xml @@ -6,10 +6,10 @@ <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> -<article name="njs Changes" - link="/en/docs/njs/njs_changes.html" +<article name="Changes" + link="/en/docs/njs/changes.html" lang="en" - rev="7" + rev="8" toc="no"> <section id="njs0.2.4" name="Changes with 0.2.4">
--- a/xml/en/docs/njs/cli.xml +++ b/xml/en/docs/njs/cli.xml @@ -9,7 +9,7 @@ <article name="Command-line interface" link="/en/docs/njs/cli.html" lang="en" - rev="1"> + rev="2"> <section> <para> @@ -21,8 +21,8 @@ or after building from the <link doc="install.xml" id="install_sources">sources</link>. Compared to njs running inside nginx, nginx objects -(<link doc="njs_api.xml" id="http">HTTP</link> and -<link doc="njs_api.xml" id="stream">Stream</link>) +(<link doc="reference.xml" id="http">HTTP</link> and +<link doc="reference.xml" id="stream">Stream</link>) are not available in the utility. <example> $ echo "2**3" | njs -
--- a/xml/en/docs/njs/examples.xml +++ b/xml/en/docs/njs/examples.xml @@ -9,7 +9,7 @@ <article name="Examples" link="/en/docs/njs/examples.html" lang="en" - rev="1"> + rev="2"> <section id="helloword" name="Hello World"> @@ -311,11 +311,11 @@ function create_secure_link(r) { <section id="legacy_stream" name="Injecting HTTP header using stream proxy"> <para> -Starting from njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, stream configuration <link doc="../stream/ngx_stream_js_module.xml" id="example">example</link> has been changed. -For njs <link doc="../njs/njs_changes.xml" id="njs0.2.3">0.2.3</link> +For njs <link doc="../njs/changes.xml" id="njs0.2.3">0.2.3</link> and earlier, use this configuration example: <example> load_module modules/ngx_stream_js_module.so;
--- a/xml/en/docs/njs/index.xml +++ b/xml/en/docs/njs/index.xml @@ -9,7 +9,7 @@ <article name="njs scripting language" link="/en/docs/njs/index.html" lang="en" - rev="24" + rev="25" toc="no"> <section id="links"> @@ -22,11 +22,11 @@ </listitem> <listitem> -<link doc="njs_changes.xml"/> +<link doc="changes.xml"/> </listitem> <listitem> -<link doc="njs_api.xml"/> +<link doc="reference.xml"/> </listitem> <listitem> @@ -121,7 +121,7 @@ To use njs in nginx: <listitem id="hello_world"> <para> create an njs script file, for example, <path>hello_world.js</path>. -See <link doc="njs_api.xml">Reference</link> +See <link doc="reference.xml">Reference</link> for the list of njs properties and methods. <example> function hello(r) {
rename from xml/en/docs/njs/njs_api.xml rename to xml/en/docs/njs/reference.xml --- a/xml/en/docs/njs/njs_api.xml +++ b/xml/en/docs/njs/reference.xml @@ -6,10 +6,10 @@ <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> -<article name="njs API" - link="/en/docs/njs/njs_api.html" +<article name="Reference" + link="/en/docs/njs/reference.html" lang="en" - rev="8"> + rev="9"> <section id="summary"> @@ -1041,7 +1041,7 @@ All string properties of the object are <para> <note> -Prior to njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Prior to njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the stream session object had some properties which are currently <link id="stream_obsolete">removed</link>. </note> @@ -1053,26 +1053,26 @@ the stream session object had some prope <tag-name id="s_allow"><literal>s.allow()</literal></tag-name> <tag-desc> successfully finalizes the phase handler -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>) +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) </tag-desc> <tag-name id="s_decline"><literal>s.decline()</literal></tag-name> <tag-desc> finalizes the phase handler and passes control to the next handler -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>) +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) </tag-desc> <tag-name id="s_deny"><literal>s.deny()</literal></tag-name> <tag-desc> finalizes the phase handler with the access error code -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>) +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) </tag-desc> <tag-name id="s_done"><literal>s.done</literal>(<value>[code]</value>)</tag-name> <tag-desc> successfully finalizes the current phase handler or finalizes it with the specified numeric code -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>). +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>). </tag-desc> <tag-name><literal>s.error(<value>string</value>)</literal></tag-name> @@ -1090,14 +1090,14 @@ on the <literal>info</literal> level of <tag-name id="s_off"><literal>s.off(<value>eventName</value>)</literal></tag-name> <tag-desc> unregisters the callback set by the <link id="s_on">s.on()</link> method -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>) +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>) </tag-desc> <tag-name id="s_on"><literal>s.on(<value>event</value>, <value>callback</value>)</literal></tag-name> <tag-desc> registers a <literal>callback</literal> for the specified <literal>event</literal> -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>). +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>). <para> An <literal>event</literal> may be one of the following strings: @@ -1140,7 +1140,7 @@ client address, read-only <value>options</value>])</literal></tag-name> <tag-desc> sends the data to the client -(<link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>). +(<link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>). The <literal>options</literal> is an object used to override nginx buffer flags derived from an incoming data chunk buffer. The flags can be overriden with the following flags: @@ -1180,7 +1180,7 @@ on the <literal>warning</literal> level <para> These properties have been removed -in njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link> +in njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link> and are not backward compatible with the existing njs code. </para> @@ -1191,7 +1191,7 @@ and are not backward compatible with the <tag-desc> the <literal>ABORT</literal> return code <note> -Starting from njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the <link id="s_deny">s.deny()</link> method should be used instead. </note> </tag-desc> @@ -1200,7 +1200,7 @@ the <link id="s_deny">s.deny()</link> me <tag-desc> the <literal>AGAIN</literal> return code <note> -Starting from njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the corresponding behavior is achieved if no <link id="s_allow">s.allow()</link>, <link id="s_deny">s.deny()</link>, @@ -1214,7 +1214,7 @@ is invoked and a callback is registered. <tag-desc> the current buffer, writable <note> -Starting from <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the <link id="s_send">s.send()</link> method should be used for writing. For reading, the current buffer is available as the first argument of the <literal>event</literal> callback. @@ -1225,7 +1225,7 @@ For reading, the current buffer is avail <tag-desc> the <literal>DECLINED</literal> return code <note> -Starting from njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the <link id="s_decline">s.decline()</link> method should be used instead. </note> </tag-desc> @@ -1234,7 +1234,7 @@ the <link id="s_decline">s.decline()</li <tag-desc> a boolean read-only property, true if the current buffer is the last buffer <note> -Starting from <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the <link id="s_on_callback_last">flags.last</link> property should be used instead. </note> @@ -1244,7 +1244,7 @@ should be used instead. <tag-desc> the <literal>ERROR</literal> return code <note> -Starting from njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, an appropriate exception can be thrown to report an error. </note> </tag-desc> @@ -1254,7 +1254,7 @@ an appropriate exception can be thrown t a boolean read-only property, true if the current buffer is from the upstream server to the client <note> -Starting from <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, a corresponding <link id="s_on">event</link> (<literal>upload</literal> or <literal>download</literal>) should be used to handle data to or from client. @@ -1265,7 +1265,7 @@ should be used to handle data to or from <tag-desc> the <literal>OK</literal> return code <note> -Starting from njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link>, +Starting from njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>, the <link id="s_allow">s.allow()</link> method should be used instead. </note> </tag-desc>
--- a/xml/en/docs/stream/ngx_stream_js_module.xml +++ b/xml/en/docs/stream/ngx_stream_js_module.xml @@ -33,8 +33,8 @@ Download and install instructions are av <para> <note> This example is valid for -njs <link doc="../njs/njs_changes.xml" id="njs-0.2.4">0.2.4</link>. -For njs <link doc="../njs/njs_changes.xml" id="njs-0.2.3">0.2.3</link> +njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link>. +For njs <link doc="../njs/changes.xml" id="njs0.2.3">0.2.3</link> and earlier, use <link doc="../njs/examples.xml" id="legacy">this</link> example. </note> @@ -208,7 +208,7 @@ Sets an njs function for the specified v <para> Each stream njs handler receives one argument, a stream session -<link doc="../njs/njs_api.xml" id="stream_session">object</link>. +<link doc="../njs/reference.xml" id="stream">object</link>. </para> </section>
--- a/xml/index.xml +++ b/xml/index.xml @@ -36,14 +36,14 @@ support and control API</link> for TLS c <para> <link doc="en/docs/njs/index.xml">njs-0.2.4</link> version has been released, featuring -<link doc="en/docs/njs/njs_api.xml" id="s_on">s.on()</link>, -<link doc="en/docs/njs/njs_api.xml" id="s_off">s.off()</link>, -<link doc="en/docs/njs/njs_api.xml" id="s_allow">s.allow()</link>, -<link doc="en/docs/njs/njs_api.xml" id="s_done">s.done()</link>, -<link doc="en/docs/njs/njs_api.xml" id="s_decline">s.decline()</link>, -<link doc="en/docs/njs/njs_api.xml" id="s_deny">s.deny()</link> +<link doc="en/docs/njs/reference.xml" id="s_on">s.on()</link>, +<link doc="en/docs/njs/reference.xml" id="s_off">s.off()</link>, +<link doc="en/docs/njs/reference.xml" id="s_allow">s.allow()</link>, +<link doc="en/docs/njs/reference.xml" id="s_done">s.done()</link>, +<link doc="en/docs/njs/reference.xml" id="s_decline">s.decline()</link>, +<link doc="en/docs/njs/reference.xml" id="s_deny">s.deny()</link> methods support -and <link doc="en/docs/njs/njs_changes.xml" id="njs0.2.4">more</link>. +and <link doc="en/docs/njs/changes.xml" id="njs0.2.4">more</link>. </para> </event> @@ -58,11 +58,11 @@ mainline version has been released. <para> <link doc="en/docs/njs/index.xml">njs-0.2.3</link> version has been released, featuring -<link doc="en/docs/njs/njs_api.xml" id="string_bytesfrom">String.bytesFrom()</link>, -<link doc="en/docs/njs/njs_api.xml" id="string_padstart">String.padStart()</link>, -<link doc="en/docs/njs/njs_api.xml" id="string_padend">String.padEnd()</link> +<link doc="en/docs/njs/reference.xml" id="string_bytesfrom">String.bytesFrom()</link>, +<link doc="en/docs/njs/reference.xml" id="string_padstart">String.padStart()</link>, +<link doc="en/docs/njs/reference.xml" id="string_padend">String.padEnd()</link> methods support -and <link doc="en/docs/njs/njs_changes.xml" id="njs0.2.3">more</link>. +and <link doc="en/docs/njs/changes.xml" id="njs0.2.3">more</link>. </para> </event> @@ -95,9 +95,9 @@ balancing method</link>. <para> <link doc="en/docs/njs/index.xml">njs-0.2.2</link> version has been released, featuring HTTP -<link doc="en/docs/njs/njs_api.xml" id="r_internal_redirect">internalRedirect()</link> +<link doc="en/docs/njs/reference.xml" id="r_internal_redirect">internalRedirect()</link> method support -and <link doc="en/docs/njs/njs_changes.xml" id="njs0.2.2">more</link>. +and <link doc="en/docs/njs/changes.xml" id="njs0.2.2">more</link>. </para> </event> @@ -121,7 +121,7 @@ mainline version has been released. <para> <link doc="en/docs/njs/index.xml">njs-0.2.1</link> version has been -<link doc="en/docs/njs/njs_changes.xml" id="njs0.2.1">released</link>. +<link doc="en/docs/njs/changes.xml" id="njs0.2.1">released</link>. </para> </event> @@ -180,9 +180,9 @@ mainline version has been released. <para> <link doc="en/docs/njs/index.xml">njs-0.2.0</link> version has been released, featuring HTTP -<link doc="en/docs/njs/njs_api.xml" id="subrequest">subrequest()</link> +<link doc="en/docs/njs/reference.xml" id="subrequest">subrequest()</link> method support -and <link doc="en/docs/njs/njs_changes.xml" id="njs0.2.0">more</link>. +and <link doc="en/docs/njs/changes.xml" id="njs0.2.0">more</link>. </para> </event>
--- a/xml/ru/GNUmakefile +++ b/xml/ru/GNUmakefile @@ -107,11 +107,11 @@ REFS = \ stream/stream_processing \ ngx_google_perftools_module \ njs/index \ - njs/njs_api \ njs/cli \ njs/compatibility \ njs/examples \ njs/install \ + njs/reference \ TOP = \ download \
--- a/xml/ru/docs/http/ngx_http_js_module.xml +++ b/xml/ru/docs/http/ngx_http_js_module.xml @@ -9,7 +9,7 @@ <module name="Модуль ngx_http_js_module" link="/ru/docs/http/ngx_http_js_module.html" lang="ru" - rev="17"> + rev="18"> <section id="summary">
--- a/xml/ru/docs/njs/cli.xml +++ b/xml/ru/docs/njs/cli.xml @@ -9,7 +9,7 @@ <article name="Интерфейс командной строки" link="/ru/docs/njs/cli.html" lang="ru" - rev="1"> + rev="2"> <section> <para> @@ -21,8 +21,8 @@ <link doc="install.xml" id="install_sources">исходных файлов</link>. В отличие от njs, запущенном внутри nginx, в утилите недоступны объекты nginx -(<link doc="njs_api.xml" id="http">HTTP</link> и -<link doc="njs_api.xml" id="stream">Stream</link>). +(<link doc="reference.xml" id="http">HTTP</link> и +<link doc="reference.xml" id="stream">Stream</link>). <example> $ echo "2**3" | njs - 8
--- a/xml/ru/docs/njs/examples.xml +++ b/xml/ru/docs/njs/examples.xml @@ -9,7 +9,7 @@ <article name="Примеры использования" link="/ru/docs/njs/examples.html" lang="ru" - rev="1"> + rev="2"> <section id="helloword" name="Hello World"> @@ -311,11 +311,11 @@ function create_secure_link(r) { <section id="legacy_stream" name="Внедрение HTTP-заголовка при помощи stream proxy"> <para> -Начиная с версии njs <link doc="../njs/njs_changes.xml" id="njs0.2.4">0.2.4</link> +Начиная с версии njs <link doc="../njs/changes.xml" id="njs0.2.4">0.2.4</link> <link doc="../stream/ngx_stream_js_module.xml" id="example">пример</link> конфигурации в stream был изменён. -Для njs <link doc="../njs/njs_changes.xml" id="njs0.2.3">0.2.3</link> +Для njs <link doc="../njs/changes.xml" id="njs0.2.3">0.2.3</link> и более ранних версий необходимо использовать следующий пример конфигурации: <example> load_module modules/ngx_stream_js_module.so;
--- a/xml/ru/docs/njs/index.xml +++ b/xml/ru/docs/njs/index.xml @@ -9,7 +9,7 @@ <article name="Сценарный язык njs" link="/ru/docs/njs/index.html" lang="ru" - rev="24" + rev="25" toc="no"> <section id="links"> @@ -22,11 +22,11 @@ </listitem> <listitem> -<link doc="njs_changes.xml">Изменения в njs</link> +<link doc="changes.xml">Изменения в njs</link> </listitem> <listitem> -<link doc="njs_api.xml"/> +<link doc="reference.xml"/> </listitem> <listitem> @@ -123,7 +123,7 @@ njs совместим с <para> создать файл сценария njs, например <path>hello_world.js</path>. Описание свойств и методов языка njs -см. в <link doc="njs_api.xml">справочнике</link>. +см. в <link doc="reference.xml">справочнике</link>. <example> function hello(r) { r.return(200, “Hello world!”);
rename from xml/ru/docs/njs/njs_api.xml rename to xml/ru/docs/njs/reference.xml --- a/xml/ru/docs/njs/njs_api.xml +++ b/xml/ru/docs/njs/reference.xml @@ -6,8 +6,8 @@ <!DOCTYPE article SYSTEM "../../../../dtd/article.dtd"> -<article name="njs API" - link="/ru/docs/njs/njs_api.html" +<article name="Справочник" + link="/ru/docs/njs/reference.html" lang="ru" rev="1">
--- a/xml/ru/docs/stream/ngx_stream_js_module.xml +++ b/xml/ru/docs/stream/ngx_stream_js_module.xml @@ -33,8 +33,8 @@ <para> <note> Данный пример необходимо использовать с -версией njs <link doc="../njs_changes.xml" id="njs-0.2.4">0.2.4</link>. -Для версий njs <link doc="../njs_changes.xml" id="njs-0.2.3">0.2.3</link> +версией njs <link doc="../changes.xml" id="njs0.2.4">0.2.4</link>. +Для версий njs <link doc="../changes.xml" id="njs0.2.3">0.2.3</link> и ранее необходимо использовать <link doc="../examples.xml" id="legacy">этот</link> пример. </note>