Skip to content

Commit aa7ca6b

Browse files
committed
fixup! cli: generate man-page
1 parent 98136b5 commit aa7ca6b

File tree

1 file changed

+25
-46
lines changed

1 file changed

+25
-46
lines changed

doc/node.1

+25-46
Original file line numberDiff line numberDiff line change
@@ -135,15 +135,8 @@ Relative paths are NOT yet supported by the CLI flag.
135135
The initializer module also needs to be allowed. Consider the following example:
136136
.Bd -literal
137137
$ node --experimental-permission t.js
138-
node:internal/modules/cjs/loader:162
139-
const result = internalModuleStat(receiver, filename);
140-
^
141138

142139
Error: Access to this API has been restricted
143-
at stat (node:internal/modules/cjs/loader:162:18)
144-
at Module._findPath (node:internal/modules/cjs/loader:640:16)
145-
at resolveMainPath (node:internal/modules/run_main:15:25)
146-
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:53:24)
147140
at node:internal/main/run_main_module:23:47 {
148141
code: 'ERR_ACCESS_DENIED',
149142
permission: 'FileSystemRead',
@@ -190,18 +183,8 @@ new WASI({
190183
.Ed
191184
.Bd -literal
192185
$ node --experimental-permission --allow-fs-read=* index.js
193-
node:wasi:99
194-
const wrap = new _WASI(args, env, preopens, stdio);
195-
^
196186

197187
Error: Access to this API has been restricted
198-
at new WASI (node:wasi:99:18)
199-
at Object.<anonymous> (/home/index.js:3:1)
200-
at Module._compile (node:internal/modules/cjs/loader:1476:14)
201-
at Module._extensions..js (node:internal/modules/cjs/loader:1555:10)
202-
at Module.load (node:internal/modules/cjs/loader:1288:32)
203-
at Module._load (node:internal/modules/cjs/loader:1104:12)
204-
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:191:14)
205188
at node:internal/main/run_main_module:30:49 {
206189
code: 'ERR_ACCESS_DENIED',
207190
permission: 'WASI',
@@ -221,18 +204,8 @@ new Worker(__filename);
221204
.Ed
222205
.Bd -literal
223206
$ node --experimental-permission --allow-fs-read=* index.js
224-
node:internal/worker:188
225-
this[kHandle] = new WorkerImpl(url,
226-
^
227207

228208
Error: Access to this API has been restricted
229-
at new Worker (node:internal/worker:188:21)
230-
at Object.<anonymous> (/home/index.js.js:3:1)
231-
at Module._compile (node:internal/modules/cjs/loader:1120:14)
232-
at Module._extensions..js (node:internal/modules/cjs/loader:1174:10)
233-
at Module.load (node:internal/modules/cjs/loader:998:32)
234-
at Module._load (node:internal/modules/cjs/loader:839:12)
235-
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
236209
at node:internal/main/run_main_module:17:47 {
237210
code: 'ERR_ACCESS_DENIED',
238211
permission: 'WorkerThreads'
@@ -552,14 +525,6 @@ and \fB"\fR are usable.
552525
It is possible to run code containing inline types by passing
553526
\fB--experimental-strip-types\fR.
554527
.
555-
.It Fl -experimental-async-context-frame
556-
Enables the use of \fBAsyncLocalStorage\fR backed by \fBAsyncContextFrame\fR rather
557-
than the default implementation which relies on async_hooks. This new model is
558-
implemented very differently and so could have differences in how context data
559-
flows within the application. As such, it is presently recommended to be sure
560-
your application behaviour is unaffected by this change before using it in
561-
production.
562-
.
563528
.It Fl -experimental-default-type Ns = Ns Ar type
564529
Define which module system, \fBmodule\fR or \fBcommonjs\fR, to use for the following:
565530
.Bl -bullet
@@ -817,15 +782,15 @@ Allow spaces to be present after a chunk size and before \fB\\r\\n\fR.
817782
All the above will expose your application to request smuggling
818783
or poisoning attack. Avoid using this option.
819784
.
820-
.It Fl -inspect[ Ns = Ns Ar [host:]port
785+
.It Fl -inspect Ns = Ns Ar [[host:]port]
821786
Activate inspector on \fBhost:port\fR. Default is \fB127.0.0.1:9229\fR. If port \fB0\fR is
822787
specified, a random available port will be used.
823788
V8 inspector integration allows tools such as Chrome DevTools and IDEs to debug
824789
and profile Node.js instances. The tools attach to Node.js instances via a
825790
tcp port and communicate using the Chrome DevTools Protocol.
826791
See V8 Inspector integration for Node.js for further explanation on Node.js debugger.
827792
.
828-
.It Fl -inspect-brk[ Ns = Ns Ar [host:]port
793+
.It Fl -inspect-brk Ns = Ns Ar [[host:]port]
829794
Activate inspector on \fBhost:port\fR and break at start of user script.
830795
Default \fBhost:port\fR is \fB127.0.0.1:9229\fR. If port \fB0\fR is specified,
831796
a random available port will be used.
@@ -844,7 +809,7 @@ Specify ways of the inspector web socket url exposure.
844809
By default inspector websocket url is available in stderr and under \fB/json/list\fR
845810
endpoint on \fBhttp://host:port/json/list\fR.
846811
.
847-
.It Fl -inspect-wait[ Ns = Ns Ar [host:]port
812+
.It Fl -inspect-wait Ns = Ns Ar [[host:]port]
848813
Activate inspector on \fBhost:port\fR and wait for debugger to be attached.
849814
Default \fBhost:port\fR is \fB127.0.0.1:9229\fR. If port \fB0\fR is specified,
850815
a random available port will be used.
@@ -879,6 +844,12 @@ Disable the \fBnode-addons\fR exports condition as well as disable loading
879844
native addons. When \fB--no-addons\fR is specified, calling \fBprocess.dlopen\fR or
880845
requiring a native C++ addon will fail and throw an exception.
881846
.
847+
.It Fl -no-async-context-frame
848+
Disables the use of \fBAsyncLocalStorage\fR backed by \fBAsyncContextFrame\fR and
849+
uses the prior implementation which relied on async_hooks. The previous model
850+
is retained for compatibility with Electron and for cases where the context
851+
flow may differ. However, if a difference in flow is found please report it.
852+
.
882853
.It Fl -no-deprecation
883854
Silence deprecation warnings.
884855
.
@@ -1026,6 +997,14 @@ human consumption.
1026997
.It Fl -report-dir Ns = Ns Ar directory , Fl eport-directory Ns = Ns Ar directory
1027998
Location at which the report will be generated.
1028999
.
1000+
.It Fl -report-exclude-env
1001+
When \fB--report-exclude-env\fR is passed the diagnostic report generated will not
1002+
contain the \fBenvironmentVariables\fR data.
1003+
.
1004+
.It Fl -report-exclude-network
1005+
Exclude \fBheader.networkInterfaces\fR from the diagnostic report. By default
1006+
this is not set and the network interfaces are included.
1007+
.
10291008
.It Fl -report-filename Ns = Ns Ar filename
10301009
Name of the file to which the report will be written.
10311010
If the filename is set to \fB'stdout'\fR or \fB'stderr'\fR, the report is written to
@@ -1052,10 +1031,6 @@ Enables report to be generated when the process exits due to an uncaught
10521031
exception. Useful when inspecting the JavaScript stack in conjunction with
10531032
native stack and other runtime environment data.
10541033
.
1055-
.It Fl -report-exclude-network
1056-
Exclude \fBheader.networkInterfaces\fR from the diagnostic report. By default
1057-
this is not set and the network interfaces are included.
1058-
.
10591034
.It Fl r , Fl -require Ar module
10601035
Preload the specified module at startup.
10611036
Follows \fBrequire()\fR's module resolution
@@ -1528,8 +1503,6 @@ one is included in the list below.
15281503
.It
15291504
\fB--experimental-abortcontroller\fR
15301505
.It
1531-
\fB--experimental-async-context-frame\fR
1532-
.It
15331506
\fB--experimental-default-type\fR
15341507
.It
15351508
\fB--experimental-detect-module\fR
@@ -1620,6 +1593,8 @@ one is included in the list below.
16201593
.It
16211594
\fB--no-addons\fR
16221595
.It
1596+
\fB--no-async-context-frame\fR
1597+
.It
16231598
\fB--no-deprecation\fR
16241599
.It
16251600
\fB--no-experimental-global-navigator\fR
@@ -1660,6 +1635,8 @@ one is included in the list below.
16601635
.It
16611636
\fB--report-dir\fR, \fB--report-directory\fR
16621637
.It
1638+
\fB--report-exclude-env\fR
1639+
.It
16631640
\fB--report-exclude-network\fR
16641641
.It
16651642
\fB--report-filename\fR
@@ -1911,8 +1888,10 @@ reason any of these APIs takes a long time, other (seemingly unrelated) APIs
19111888
that run in libuv's threadpool will experience degraded performance. In order to
19121889
mitigate this issue, one potential solution is to increase the size of libuv's
19131890
threadpool by setting the \fB'UV_THREADPOOL_SIZE'\fR environment variable to a value
1914-
greater than \fB4\fR (its current default value). For more information, see the
1915-
libuv threadpool documentation.
1891+
greater than \fB4\fR (its current default value). However, setting this from inside
1892+
the process using \fBprocess.env.UV_THREADPOOL_SIZE=size\fR is not guranteed to work
1893+
as the threadpool would have been created as part of the runtime initialisation
1894+
much before user code is run. For more information, see the libuv threadpool documentation.
19161895
.
19171896

19181897
.El

0 commit comments

Comments
 (0)